From bdccc4fedcf9c5fc1f06e8f833d792198c9d04ae Mon Sep 17 00:00:00 2001 From: wdenk Date: Tue, 5 Aug 2003 17:43:17 +0000 Subject: * Map ISP1362 USB OTG controller for NSCU board * Patch by Brad Parker, 02 Aug 2003: fix sc520_cdp problems * Implement Boot Cycle Detection (Req. 2.3 of OSDL CGL Reqirements) * Allow erase command to cross flash bank boundaries --- board/sc520_cdp/Makefile | 2 +- board/sc520_cdp/flash.c | 2 +- board/sc520_cdp/sc520_cdp.c | 21 ++++++++++++++++++++- board/sc520_cdp/u-boot.lds | 2 +- 4 files changed, 23 insertions(+), 4 deletions(-) (limited to 'board/sc520_cdp') diff --git a/board/sc520_cdp/Makefile b/board/sc520_cdp/Makefile index f9a36f9f4..ab06ebc81 100644 --- a/board/sc520_cdp/Makefile +++ b/board/sc520_cdp/Makefile @@ -29,7 +29,7 @@ OBJS := sc520_cdp.o flash.o SOBJS := sc520_cdp_asm.o sc520_cdp_asm16.o $(LIB): $(OBJS) $(SOBJS) - $(AR) crv $@ $(OBJS) + $(AR) crv $@ $(OBJS) $(SOBJS) clean: rm -f $(SOBJS) $(OBJS) diff --git a/board/sc520_cdp/flash.c b/board/sc520_cdp/flash.c index a4d37e508..2f7ce5254 100644 --- a/board/sc520_cdp/flash.c +++ b/board/sc520_cdp/flash.c @@ -325,7 +325,7 @@ void flash_print_info(flash_info_t *info) } printf ("\n"); - done: +done: ; } /*----------------------------------------------------------------------- diff --git a/board/sc520_cdp/sc520_cdp.c b/board/sc520_cdp/sc520_cdp.c index 0fc836c62..cd5232482 100644 --- a/board/sc520_cdp/sc520_cdp.c +++ b/board/sc520_cdp/sc520_cdp.c @@ -28,7 +28,7 @@ #include #include #include -#include +#include #undef SC520_CDP_DEBUG @@ -557,6 +557,19 @@ void ssi_chip_select(int dev) } } +void spi_eeprom_probe(int x) +{ +} + +int spi_eeprom_read(int x, int offset, char *buffer, int len) +{ + return 0; +} + +int spi_eeprom_write(int x, int offset, char *buffer, int len) +{ + return 0; +} void spi_init_f(void) { @@ -585,6 +598,9 @@ ssize_t spi_read(uchar *addr, int alen, uchar *buffer, int len) #endif #ifdef CONFIG_SC520_CDP_USE_MW res = mw_eeprom_read(2, offset, buffer, len); +#endif +#if !defined(CONFIG_SC520_CDP_USE_SPI) && !defined(CONFIG_SC520_CDP_USE_MW) + res = 0; #endif return res; } @@ -606,6 +622,9 @@ ssize_t spi_write(uchar *addr, int alen, uchar *buffer, int len) #endif #ifdef CONFIG_SC520_CDP_USE_MW res = mw_eeprom_write(2, offset, buffer, len); +#endif +#if !defined(CONFIG_SC520_CDP_USE_SPI) && !defined(CONFIG_SC520_CDP_USE_MW) + res = 0; #endif return res; } diff --git a/board/sc520_cdp/u-boot.lds b/board/sc520_cdp/u-boot.lds index 1944a74aa..9d2f71c33 100644 --- a/board/sc520_cdp/u-boot.lds +++ b/board/sc520_cdp/u-boot.lds @@ -31,7 +31,7 @@ SECTIONS .text : { *(.text); } . = ALIGN(4); - .rodata : { *(.rodata) } + .rodata : { *(.rodata) *(.rodata.str1.1) *(.rodata.str1.32) } . = 0x400000; /* Ram data segment to use */ _i386boot_romdata_dest = ABSOLUTE(.); -- cgit v1.2.3