From: wdenk Date: Wed, 22 May 2002 00:55:04 +0000 (+0000) Subject: Fix bugs in OXC flash driver X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=be8b2a8977b9ff97969f42754b253f8504e65f1a;p=users%2Frw%2Fppcboot.git Fix bugs in OXC flash driver --- diff --git a/board/oxc/flash.c b/board/oxc/flash.c index d4d4c09..32512a3 100644 --- a/board/oxc/flash.c +++ b/board/oxc/flash.c @@ -6,7 +6,7 @@ * (C) Copyright 2000 * Wolfgang Denk, DENX Software Engineering, wd@denx.de. * - * Flash Routines for STM29W320DB flash chips + * Flash Routines for STM29W320DB/STM29W800D flash chips * *-------------------------------------------------------------------- * See file CREDITS for list of people who contributed to this @@ -65,8 +65,7 @@ unsigned long flash_init (void) flash_get_size((vu_char *)(-size), &flash_info[0]); } -#if (CFG_MONITOR_BASE >= CFG_FLASH0_BASE) || \ - (CFG_MONITOR_BASE >= CFG_FLASH1_BASE) +#if (CFG_MONITOR_BASE >= CFG_FLASH_PRELIMBASE) /* monitor protection ON by default */ flash_protect(FLAG_PROTECT_SET, CFG_MONITOR_BASE, diff --git a/include/config_OXC.h b/include/config_OXC.h index 4399bde..61ec6f5 100644 --- a/include/config_OXC.h +++ b/include/config_OXC.h @@ -102,10 +102,8 @@ * FLASH */ -#define CFG_FLASH0_BASE 0xFFF00000 -#define CFG_FLASH1_BASE 0xFFE00000 -#define CFG_FLASH_BASE (0-flash_info[0].size) #define CFG_FLASH_PRELIMBASE 0xFF800000 +#define CFG_FLASH_BASE (0-flash_info[0].size) #define CFG_MAX_FLASH_BANKS 1 /* max number of memory banks */ #define CFG_MAX_FLASH_SECT 32 /* max number of sectors on one chip */ @@ -125,8 +123,7 @@ #define CFG_MONITOR_BASE TEXT_BASE #define CFG_MONITOR_LEN 0x00030000 -#if (CFG_MONITOR_BASE < CFG_FLASH0_BASE) && \ - (CFG_MONITOR_BASE < CFG_FLASH1_BASE) +#if (CFG_MONITOR_BASE < CFG_FLASH_PRELIMBASE) # define CFG_RAMBOOT 1 #else # undef CFG_RAMBOOT