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/shannon/Makefile | 2 +- board/shannon/flash.c | 4 ++-- board/shannon/memsetup.S | 2 -- board/shannon/shannon.c | 36 ++++++++++++++++++------------------ board/shannon/u-boot.lds | 25 +++++++++++++++---------- 5 files changed, 36 insertions(+), 33 deletions(-) (limited to 'board/shannon') diff --git a/board/shannon/Makefile b/board/shannon/Makefile index ac5bf8192..86098a305 100644 --- a/board/shannon/Makefile +++ b/board/shannon/Makefile @@ -29,7 +29,7 @@ OBJS := shannon.o flash.o SOBJS := memsetup.o $(LIB): $(OBJS) $(SOBJS) - $(AR) crv $@ $^ + $(AR) crv $@ $(OBJS) $(SOBJS) clean: rm -f $(SOBJS) $(OBJS) diff --git a/board/shannon/flash.c b/board/shannon/flash.c index c340fea52..74f5f6929 100644 --- a/board/shannon/flash.c +++ b/board/shannon/flash.c @@ -327,7 +327,7 @@ volatile static int write_word (flash_info_t *info, ulong dest, ulong data) */ result = *addr; if ((result & data) != data) - return ERR_NOT_ERASED; + return ERR_NOT_ERASED; /* @@ -393,7 +393,7 @@ volatile static int write_word (flash_info_t *info, ulong dest, ulong data) *addr = CMD_READ_ARRAY; if (chip1 == ERR || chip2 == ERR || *addr != data) - rc = ERR_PROG_ERROR; + rc = ERR_PROG_ERROR; if (iflag) enable_interrupts(); diff --git a/board/shannon/memsetup.S b/board/shannon/memsetup.S index 4f0c464ce..a9a8777d3 100644 --- a/board/shannon/memsetup.S +++ b/board/shannon/memsetup.S @@ -24,7 +24,6 @@ */ - #include #include @@ -91,4 +90,3 @@ memsetup: /* everything is fine now */ mov pc, lr - diff --git a/board/shannon/shannon.c b/board/shannon/shannon.c index a55626d1d..1876e3ed3 100644 --- a/board/shannon/shannon.c +++ b/board/shannon/shannon.c @@ -40,24 +40,24 @@ int board_init (void) #ifdef CONFIG_INFERNO { - unsigned long temp; - __asm__ __volatile__(/* disable MMU, enable icache */ - "mrc p15, 0, %0, c1, c0\n" - "bic %0, %0, #0x00002000\n" - "bic %0, %0, #0x0000000f\n" - "orr %0, %0, #0x00001000\n" - "orr %0, %0, #0x00000002\n" - "mcr p15, 0, %0, c1, c0\n" - /* flush caches */ - "mov %0, #0\n" - "mcr p15, 0, %0, c7, c7, 0\n" - "mcr p15, 0, %0, c8, c7, 0\n" - : "=r" (temp) - : - : "memory"); - /* setup PCMCIA timing */ - temp = 0xa0000018; - *(unsigned long *)temp = 0x00060006; + unsigned long temp; + __asm__ __volatile__(/* disable MMU, enable icache */ + "mrc p15, 0, %0, c1, c0\n" + "bic %0, %0, #0x00002000\n" + "bic %0, %0, #0x0000000f\n" + "orr %0, %0, #0x00001000\n" + "orr %0, %0, #0x00000002\n" + "mcr p15, 0, %0, c1, c0\n" + /* flush caches */ + "mov %0, #0\n" + "mcr p15, 0, %0, c7, c7, 0\n" + "mcr p15, 0, %0, c8, c7, 0\n" + : "=r" (temp) + : + : "memory"); + /* setup PCMCIA timing */ + temp = 0xa0000018; + *(unsigned long *)temp = 0x00060006; } #endif /* CONFIG_INIT_CRITICAL */ diff --git a/board/shannon/u-boot.lds b/board/shannon/u-boot.lds index f4b0ade27..d1fe8aa6f 100644 --- a/board/shannon/u-boot.lds +++ b/board/shannon/u-boot.lds @@ -26,28 +26,33 @@ OUTPUT_ARCH(arm) ENTRY(_start) SECTIONS { - . = 0x00000000; + . = 0x00000000; - . = ALIGN(4); + . = ALIGN(4); .text : { cpu/sa1100/start.o (.text) *(.text) } - . = ALIGN(4); - .rodata : { *(.rodata) } + . = ALIGN(4); + .rodata : { *(.rodata) } - . = ALIGN(4); - .data : { *(.data) } + . = ALIGN(4); + .data : { *(.data) } - . = ALIGN(4); - .got : { *(.got) } + . = ALIGN(4); + .got : { *(.got) } + + __u_boot_cmd_start = .; + .u_boot_cmd : { *(.u_boot_cmd) } + __u_boot_cmd_end = .; armboot_end_data = .; - . = ALIGN(4); - .bss : { *(.bss) } + . = ALIGN(4); + .bss : { *(.bss) } armboot_end = .; + } -- cgit v1.2.3