From b6e4c4033c4f889c452c511d38c77808c67f9cf7 Mon Sep 17 00:00:00 2001 From: wdenk Date: Fri, 2 Jan 2004 16:05:07 +0000 Subject: * Patch by Denis Peter, 8 Dec 2003 - add support for the PATI board (MPC555) - add SPI support for the MPC5xx * Patch by Anders Larsen, 08 Dec 2003: add configuration options CONFIG_SERIAL_TAG and CONFIG_REVISION_TAG to pass ATAG_SERIAL and ATAG_REVISION, resp., to the ARM target; cleanup some redundand #defines --- board/mpl/common/flash.c | 38 ++++++++++++++++++++++++++------------ 1 file changed, 26 insertions(+), 12 deletions(-) (limited to 'board/mpl/common/flash.c') diff --git a/board/mpl/common/flash.c b/board/mpl/common/flash.c index 5f50200b26e..fd430083e2f 100644 --- a/board/mpl/common/flash.c +++ b/board/mpl/common/flash.c @@ -36,6 +36,8 @@ */ #include + +#if !defined(CONFIG_PATI) #include #include #include "common_util.h" @@ -46,6 +48,9 @@ #include "../pip405/pip405.h" #endif #include <405gp_pci.h> +#else /* defined(CONFIG_PATI) */ +#include +#endif flash_info_t flash_info[CFG_MAX_FLASH_BANKS]; /* info for FLASH chips */ /*----------------------------------------------------------------------- @@ -56,22 +61,15 @@ static int write_word (flash_info_t *info, ulong dest, ulong data); void unlock_intel_sectors(flash_info_t *info,ulong addr,ulong cnt); - -#ifdef CONFIG_PIP405 #define ADDR0 0x5555 #define ADDR1 0x2aaa #define FLASH_WORD_SIZE unsigned short -#endif - -#ifdef CONFIG_MIP405 -#define ADDR0 0x5555 -#define ADDR1 0x2aaa -#define FLASH_WORD_SIZE unsigned short -#endif #define FALSE 0 #define TRUE 1 +#if !defined(CONFIG_PATI) + /*----------------------------------------------------------------------- * Some CS switching routines: * @@ -151,11 +149,16 @@ void setup_cs_reloc(void) } } +#endif /* #if !defined(CONFIG_PATI) */ unsigned long flash_init (void) { - unsigned long size_b0, size_b1,flashcr, size_reg; - int mode, i; + unsigned long size_b0; + int i; + +#if !defined(CONFIG_PATI) + unsigned long size_b1,flashcr,size_reg; + int mode; extern char version_string; char *p=&version_string; @@ -169,6 +172,7 @@ unsigned long flash_init (void) else printf("(%s Boot) ",(mode & BOOT_MPS) ? "MPS" : "Flash"); +#endif /* #if !defined(CONFIG_PATI) */ /* Init: no FLASHes known */ for (i=0; i