From 8bde7f776c77b343aca29b8c7b58464d915ac245 Mon Sep 17 00:00:00 2001 From: wdenk Date: Fri, 27 Jun 2003 21:31:46 +0000 Subject: * Code cleanup: - remove trailing white space, trailing empty lines, C++ comments, etc. - split cmd_boot.c (separate cmd_bdinfo.c and cmd_load.c) * Patches by Kenneth Johansson, 25 Jun 2003: - major rework of command structure (work done mostly by Michal Cendrowski and Joakim Kristiansen) --- board/rpxsuper/Makefile | 2 +- board/rpxsuper/flash.c | 20 ++++++++++---------- board/rpxsuper/mii_phy.c | 7 +++---- board/rpxsuper/rpxsuper.c | 4 ++-- board/rpxsuper/u-boot.lds | 6 +++++- 5 files changed, 21 insertions(+), 18 deletions(-) (limited to 'board/rpxsuper') diff --git a/board/rpxsuper/Makefile b/board/rpxsuper/Makefile index 85ea1fcc9..4535106e6 100644 --- a/board/rpxsuper/Makefile +++ b/board/rpxsuper/Makefile @@ -28,7 +28,7 @@ LIB = lib$(BOARD).a OBJS := rpxsuper.o flash.o mii_phy.o $(LIB): $(OBJS) $(SOBJS) - $(AR) crv $@ $^ + $(AR) crv $@ $(OBJS) clean: rm -f $(SOBJS) $(OBJS) diff --git a/board/rpxsuper/flash.c b/board/rpxsuper/flash.c index 73281bd4e..d80e77862 100644 --- a/board/rpxsuper/flash.c +++ b/board/rpxsuper/flash.c @@ -172,7 +172,7 @@ static ulong flash_get_size (vu_long *addr, flash_info_t *info) * Bank 2 (48 Sectors): 23-70=64kbyte */ info->flash_id = (AMD_MANUFACT & FLASH_VENDMASK) | - (AMD_ID_DL323B & FLASH_TYPEMASK); + (AMD_ID_DL323B & FLASH_TYPEMASK); info->sector_count = 71; info->size = 4 * (8 * 8 + 63 * 64) * 1024; } @@ -183,24 +183,24 @@ static ulong flash_get_size (vu_long *addr, flash_info_t *info) /* set up sector start address table */ for (i = 0; i < 8; i++) { - info->start[i] = base + (i * 0x8000); + info->start[i] = base + (i * 0x8000); } for (i = 8; i < info->sector_count; i++) { - info->start[i] = base + (i * 0x40000) + 8 * 0x8000 - 8 * 0x40000; + info->start[i] = base + (i * 0x40000) + 8 * 0x8000 - 8 * 0x40000; } /* check for protected sectors */ for (i = 0; i < info->sector_count; i++) { - /* read sector protection at sector address */ + /* read sector protection at sector address */ addr = (volatile unsigned long *)(info->start[i]); - addr[2 * 0x0555] = 0xAAAAAAAA; + addr[2 * 0x0555] = 0xAAAAAAAA; addr[2 * 0x02AA] = 0x55555555; addr[2 * 0x0555] = 0x90909090; addr[2 * 0x0555 + 1] = 0xAAAAAAAA; addr[2 * 0x02AA + 1] = 0x55555555; addr[2 * 0x0555 + 1] = 0x90909090; udelay (1000); - base = RD_SWP32(&addr[4]); + base = RD_SWP32(&addr[4]); base |= RD_SWP32(&addr[5]); info->protect[i] = base & 0x00010001 ? 1 : 0; } @@ -404,14 +404,14 @@ static int write_word (flash_info_t *info, ulong dest, ulong data) flag = disable_interrupts(); if ((dest & 0x00000004) == 0) { - addr[2 * 0x0555] = 0xAAAAAAAA; + addr[2 * 0x0555] = 0xAAAAAAAA; addr[2 * 0x02AA] = 0x55555555; - addr[2 * 0x0555] = 0xA0A0A0A0; + addr[2 * 0x0555] = 0xA0A0A0A0; } else { - addr[2 * 0x0555 + 1] = 0xAAAAAAAA; + addr[2 * 0x0555 + 1] = 0xAAAAAAAA; addr[2 * 0x02AA + 1] = 0x55555555; - addr[2 * 0x0555 + 1] = 0xA0A0A0A0; + addr[2 * 0x0555 + 1] = 0xA0A0A0A0; } *((vu_long *)dest) = data; diff --git a/board/rpxsuper/mii_phy.c b/board/rpxsuper/mii_phy.c index 319f9595a..ef99affff 100644 --- a/board/rpxsuper/mii_phy.c +++ b/board/rpxsuper/mii_phy.c @@ -38,7 +38,7 @@ mii_discover_phy(void) if (phy_reg & 0x0400) printf("Phy operating at %d MBit/s in %s-duplex mode\n", phy_reg & 0x4000 ? 100 : 10, - phy_reg & 0x0200 ? "full" : "half"); + phy_reg & 0x0200 ? "full" : "half"); else printf("bad link!!\n"); /* @@ -59,7 +59,7 @@ mii_phy_read(unsigned short reg) tmp = 0x6002 | (adr << 7) | (reg << 2); regs->bcsr4 = 0xC3; for (i = 0; i < 64; i++) { - regs->bcsr4 ^= MII_MDCK; + regs->bcsr4 ^= MII_MDCK; } for (i = 0; i < 16; i++) { regs->bcsr4 &= ~MII_MDCK; @@ -92,7 +92,7 @@ mii_phy_write(unsigned short reg, unsigned short val) } for (i = 0; i < 16; i++) { regs->bcsr4 &= ~MII_MDCK; - if (tmp & 0x8000) regs->bcsr4 |= MII_MDIO; + if (tmp & 0x8000) regs->bcsr4 |= MII_MDIO; else regs->bcsr4 &= ~MII_MDIO; regs->bcsr4 |= MII_MDCK; tmp <<= 1; @@ -105,4 +105,3 @@ mii_phy_write(unsigned short reg, unsigned short val) val <<= 1; } } - diff --git a/board/rpxsuper/rpxsuper.c b/board/rpxsuper/rpxsuper.c index 2c0717ed2..50b3c5cac 100644 --- a/board/rpxsuper/rpxsuper.c +++ b/board/rpxsuper/rpxsuper.c @@ -42,7 +42,7 @@ const iop_conf_t iop_conf_tab[4][32] = { /* Port A configuration */ { /* conf ppar psor pdir podr pdat */ - /* PA31 */ { 1, 0, 0, 0, 0, 0 }, /* FCC1 *ATMTXEN */ + /* PA31 */ { 1, 0, 0, 0, 0, 0 }, /* FCC1 *ATMTXEN */ /* PA30 */ { 1, 0, 0, 0, 0, 0 }, /* FCC1 ATMTCA */ /* PA29 */ { 1, 0, 0, 0, 0, 0 }, /* FCC1 ATMTSOC */ /* PA28 */ { 1, 0, 0, 0, 0, 0 }, /* FCC1 *ATMRXEN */ @@ -271,7 +271,7 @@ long int initdram(int board_type) memctl->memc_psdmr = psdmr | PSDMR_OP_CBRR; for (i = 0; i < 8; i++) - *ramaddr = c; + *ramaddr = c; memctl->memc_psdmr = psdmr | PSDMR_OP_MRW; *ramaddr = c; diff --git a/board/rpxsuper/u-boot.lds b/board/rpxsuper/u-boot.lds index b4e502b0d..44224cbdd 100644 --- a/board/rpxsuper/u-boot.lds +++ b/board/rpxsuper/u-boot.lds @@ -93,6 +93,11 @@ SECTIONS _edata = .; PROVIDE (edata = .); + __u_boot_cmd_start = .; + .u_boot_cmd : { *(.u_boot_cmd) } + __u_boot_cmd_end = .; + + __start___ex_table = .; __ex_table : { *(__ex_table) } __stop___ex_table = .; @@ -115,4 +120,3 @@ SECTIONS _end = . ; PROVIDE (end = .); } - -- cgit v1.2.3