From 662e5cb397249c3ea88a4c3255e9ccfc40b98d82 Mon Sep 17 00:00:00 2001 From: Shinya Kuribayashi Date: Sat, 27 Oct 2007 15:00:24 +0900 Subject: [MIPS] u-boot.lds: Cleanup __u_boot_cmd_{start,end} Signed-off-by: Shinya Kuribayashi --- board/dbau1x00/u-boot.lds | 9 +++++---- board/gth2/u-boot.lds | 8 +++++--- board/incaip/u-boot.lds | 9 +++++---- board/pb1x00/u-boot.lds | 8 +++++--- board/purple/u-boot.lds | 9 +++++---- board/tb0229/u-boot.lds | 9 +++++---- 6 files changed, 30 insertions(+), 22 deletions(-) diff --git a/board/dbau1x00/u-boot.lds b/board/dbau1x00/u-boot.lds index 9639b81..8618732 100644 --- a/board/dbau1x00/u-boot.lds +++ b/board/dbau1x00/u-boot.lds @@ -54,10 +54,11 @@ SECTIONS .sdata : { *(.sdata) } - . = .; - __u_boot_cmd_start = .; - .u_boot_cmd : { *(.u_boot_cmd) } - __u_boot_cmd_end = .; + .u_boot_cmd : { + __u_boot_cmd_start = .; + *(.u_boot_cmd) + __u_boot_cmd_end = .; + } uboot_end_data = .; num_got_entries = (__got_end - __got_start) >> 2; diff --git a/board/gth2/u-boot.lds b/board/gth2/u-boot.lds index 90432cb..ce53d9d 100644 --- a/board/gth2/u-boot.lds +++ b/board/gth2/u-boot.lds @@ -54,9 +54,11 @@ SECTIONS .sdata : { *(.sdata) } - __u_boot_cmd_start = .; - .u_boot_cmd : { *(.u_boot_cmd) } - __u_boot_cmd_end = .; + .u_boot_cmd : { + __u_boot_cmd_start = .; + *(.u_boot_cmd) + __u_boot_cmd_end = .; + } uboot_end_data = .; num_got_entries = (__got_end - __got_start) >> 2; diff --git a/board/incaip/u-boot.lds b/board/incaip/u-boot.lds index 9639b81..8618732 100644 --- a/board/incaip/u-boot.lds +++ b/board/incaip/u-boot.lds @@ -54,10 +54,11 @@ SECTIONS .sdata : { *(.sdata) } - . = .; - __u_boot_cmd_start = .; - .u_boot_cmd : { *(.u_boot_cmd) } - __u_boot_cmd_end = .; + .u_boot_cmd : { + __u_boot_cmd_start = .; + *(.u_boot_cmd) + __u_boot_cmd_end = .; + } uboot_end_data = .; num_got_entries = (__got_end - __got_start) >> 2; diff --git a/board/pb1x00/u-boot.lds b/board/pb1x00/u-boot.lds index 363d974..8618732 100644 --- a/board/pb1x00/u-boot.lds +++ b/board/pb1x00/u-boot.lds @@ -54,9 +54,11 @@ SECTIONS .sdata : { *(.sdata) } - __u_boot_cmd_start = .; - .u_boot_cmd : { *(.u_boot_cmd) } - __u_boot_cmd_end = .; + .u_boot_cmd : { + __u_boot_cmd_start = .; + *(.u_boot_cmd) + __u_boot_cmd_end = .; + } uboot_end_data = .; num_got_entries = (__got_end - __got_start) >> 2; diff --git a/board/purple/u-boot.lds b/board/purple/u-boot.lds index e7ec012..50e7f84 100644 --- a/board/purple/u-boot.lds +++ b/board/purple/u-boot.lds @@ -64,10 +64,11 @@ SECTIONS .sdata : { *(.sdata) } - . = .; - __u_boot_cmd_start = .; - .u_boot_cmd : { *(.u_boot_cmd) } - __u_boot_cmd_end = .; + .u_boot_cmd : { + __u_boot_cmd_start = .; + *(.u_boot_cmd) + __u_boot_cmd_end = .; + } uboot_end_data = .; num_got_entries = (__got_end - __got_start) >> 2; diff --git a/board/tb0229/u-boot.lds b/board/tb0229/u-boot.lds index b2fa9f2..c629040 100644 --- a/board/tb0229/u-boot.lds +++ b/board/tb0229/u-boot.lds @@ -54,10 +54,11 @@ SECTIONS .sdata : { *(.sdata) } - . = .; - __u_boot_cmd_start = .; - .u_boot_cmd : { *(.u_boot_cmd) } - __u_boot_cmd_end = .; + .u_boot_cmd : { + __u_boot_cmd_start = .; + *(.u_boot_cmd) + __u_boot_cmd_end = .; + } uboot_end_data = .; num_got_entries = (__got_end - __got_start) >> 2; -- cgit v1.1 From 2e4a6e3667a1e39c0e6e99498686b15d2718b369 Mon Sep 17 00:00:00 2001 From: Shinya Kuribayashi Date: Sat, 27 Oct 2007 15:00:24 +0900 Subject: [MIPS] pb1000: Replace obsolete memsetup.S with lowlevel_init.S Signed-off-by: Shinya Kuribayashi --- board/pb1x00/Makefile | 2 +- board/pb1x00/lowlevel_init.S | 392 +++++++++++++++++++++++++++++++++++++++++++ board/pb1x00/memsetup.S | 392 ------------------------------------------- 3 files changed, 393 insertions(+), 393 deletions(-) create mode 100644 board/pb1x00/lowlevel_init.S delete mode 100644 board/pb1x00/memsetup.S diff --git a/board/pb1x00/Makefile b/board/pb1x00/Makefile index f7d5841..afe02c2 100644 --- a/board/pb1x00/Makefile +++ b/board/pb1x00/Makefile @@ -26,7 +26,7 @@ include $(TOPDIR)/config.mk LIB = $(obj)lib$(BOARD).a COBJS = $(BOARD).o flash.o -SOBJS = memsetup.o +SOBJS = lowlevel_init.o SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) OBJS := $(addprefix $(obj),$(COBJS)) diff --git a/board/pb1x00/lowlevel_init.S b/board/pb1x00/lowlevel_init.S new file mode 100644 index 0000000..e851e2f --- /dev/null +++ b/board/pb1x00/lowlevel_init.S @@ -0,0 +1,392 @@ +/* Memory sub-system initialization code */ + +#include +#include +#include +#include +#include + +#define AU1500_SYS_ADDR 0xB1900000 +#define sys_endian 0x0038 +#define CP0_Config0 $16 +#define MEM_1MS ((396000000/1000000) * 1000) + + .text + .set noreorder + .set mips32 + + .globl lowlevel_init +lowlevel_init: + /* + * Step 1) Establish CPU endian mode. + * NOTE: A fair amount of code is necessary on the Pb1000 to + * obtain the value of Switch S8.1 which is used to determine + * endian at run-time. + */ + + /* RCE1 */ + li t0, MEM_STCFG1 + li t1, 0x00000083 + sw t1, 0(t0) + + li t0, MEM_STTIME1 + li t1, 0x33030A10 + sw t1, 0(t0) + + li t0, MEM_STADDR1 + li t1, 0x11803E40 + sw t1, 0(t0) + + /* Set DSTRB bits so switch will read correctly */ + li t1, 0xBE00000C + lw t2, 0(t1) + or t2, t2, 0x00000300 + sw t2, 0(t1) + + /* Check switch setting */ + li t1, 0xBE000014 + lw t2, 0(t1) + and t2, t2, 0x00000100 + bne t2, zero, big_endian + nop + +little_endian: + + /* Change Au1 core to little endian */ + li t0, AU1500_SYS_ADDR + li t1, 1 + sw t1, sys_endian(t0) + mfc0 t2, CP0_CONFIG + mtc0 t2, CP0_CONFIG + nop + nop + + /* Big Endian is default so nothing to do but fall through */ + +big_endian: + + /* + * Step 2) Establish Status Register + * (set BEV, clear ERL, clear EXL, clear IE) + */ + li t1, 0x00400000 + mtc0 t1, CP0_STATUS + + /* + * Step 3) Establish CP0 Config0 + * (set OD, set K0=3) + */ + li t1, 0x00080003 + mtc0 t1, CP0_CONFIG + + /* + * Step 4) Disable Watchpoint facilities + */ + li t1, 0x00000000 + mtc0 t1, CP0_WATCHLO + mtc0 t1, CP0_IWATCHLO + /* + * Step 5) Disable the performance counters + */ + mtc0 zero, CP0_PERFORMANCE + nop + + /* + * Step 6) Establish EJTAG Debug register + */ + mtc0 zero, CP0_DEBUG + nop + + /* + * Step 7) Establish Cause + * (set IV bit) + */ + li t1, 0x00800000 + mtc0 t1, CP0_CAUSE + + /* Establish Wired (and Random) */ + mtc0 zero, CP0_WIRED + nop + + /* First setup pll:s to make serial work ok */ + /* We have a 12 MHz crystal */ + li t0, SYS_CPUPLL + li t1, 0x21 /* 396 MHz */ + sw t1, 0(t0) + sync + nop + nop + + /* wait 1mS for clocks to settle */ + li t1, MEM_1MS +1: add t1, -1 + bne t1, zero, 1b + nop + /* Setup AUX PLL */ + li t0, SYS_AUXPLL + li t1, 8 /* 96 MHz */ + sw t1, 0(t0) /* aux pll */ + sync + + /* Static memory controller */ + + /* RCE0 8MB AMD29D323 Flash */ + li t0, MEM_STCFG0 + li t1, 0x00001403 + sw t1, 0(t0) + + li t0, MEM_STTIME0 + li t1, 0xFFFFFFDD + sw t1, 0(t0) + + li t0, MEM_STADDR0 + li t1, 0x11F83FE0 + sw t1, 0(t0) + + /* RCE1 CPLD Board Logic */ + li t0, MEM_STCFG1 + li t1, 0x00000083 + sw t1, 0(t0) + + li t0, MEM_STTIME1 + li t1, 0x33030A10 + sw t1, 0(t0) + + li t0, MEM_STADDR1 + li t1, 0x11803E40 + sw t1, 0(t0) + + /* RCE2 CPLD Board Logic */ + li t0, MEM_STCFG2 + li t1, 0x00000004 + sw t1, 0(t0) + + li t0, MEM_STTIME2 + li t1, 0x08061908 + sw t1, 0(t0) + + li t0, MEM_STADDR2 + li t1, 0x12A03FC0 + sw t1, 0(t0) + + /* RCE3 PCMCIA 250ns */ + li t0, MEM_STCFG3 + li t1, 0x00000002 + sw t1, 0(t0) + + li t0, MEM_STTIME3 + li t1, 0x280E3E07 + sw t1, 0(t0) + + li t0, MEM_STADDR3 + li t1, 0x10000000 + sw t1, 0(t0) + + sync + + /* Set peripherals to a known state */ + li t0, IC0_CFG0CLR + li t1, 0xFFFFFFFF + sw t1, 0(t0) + + li t0, IC0_CFG0CLR + sw t1, 0(t0) + + li t0, IC0_CFG1CLR + sw t1, 0(t0) + + li t0, IC0_CFG2CLR + sw t1, 0(t0) + + li t0, IC0_SRCSET + sw t1, 0(t0) + + li t0, IC0_ASSIGNSET + sw t1, 0(t0) + + li t0, IC0_WAKECLR + sw t1, 0(t0) + + li t0, IC0_RISINGCLR + sw t1, 0(t0) + + li t0, IC0_FALLINGCLR + sw t1, 0(t0) + + li t0, IC0_TESTBIT + li t1, 0x00000000 + sw t1, 0(t0) + sync + + li t0, IC1_CFG0CLR + li t1, 0xFFFFFFFF + sw t1, 0(t0) + + li t0, IC1_CFG0CLR + sw t1, 0(t0) + + li t0, IC1_CFG1CLR + sw t1, 0(t0) + + li t0, IC1_CFG2CLR + sw t1, 0(t0) + + li t0, IC1_SRCSET + sw t1, 0(t0) + + li t0, IC1_ASSIGNSET + sw t1, 0(t0) + + li t0, IC1_WAKECLR + sw t1, 0(t0) + + li t0, IC1_RISINGCLR + sw t1, 0(t0) + + li t0, IC1_FALLINGCLR + sw t1, 0(t0) + + li t0, IC1_TESTBIT + li t1, 0x00000000 + sw t1, 0(t0) + sync + + li t0, SYS_FREQCTRL0 + li t1, 0x00000000 + sw t1, 0(t0) + + li t0, SYS_FREQCTRL1 + li t1, 0x00000000 + sw t1, 0(t0) + + li t0, SYS_CLKSRC + li t1, 0x00000000 + sw t1, 0(t0) + + li t0, SYS_PININPUTEN + li t1, 0x00000000 + sw t1, 0(t0) + sync + + li t0, 0xB1100100 + li t1, 0x00000000 + sw t1, 0(t0) + + li t0, 0xB1400100 + li t1, 0x00000000 + sw t1, 0(t0) + + + li t0, SYS_WAKEMSK + li t1, 0x00000000 + sw t1, 0(t0) + + li t0, SYS_WAKESRC + li t1, 0x00000000 + sw t1, 0(t0) + + /* wait 1mS before setup */ + li t1, MEM_1MS +1: add t1, -1 + bne t1, zero, 1b + nop + + /* + * Skip memory setup if we are running from memory + */ + li t0, 0x90000000 + sub t0, ra, t0 + bltz t0, skip_memsetup + nop + + /* + * SDCS0 - Not used, for SMROM + * SDCS1 - 32MB Micron 48LCBM16A2 + * SDCS2 - 32MB Micron 48LCBM16A2 + */ + li t0, MEM_SDMODE0 + li t1, 0x00000000 + sw t1, 0(t0) + + li t0, MEM_SDMODE1 + li t1, 0x00552229 + sw t1, 0(t0) + + li t0, MEM_SDMODE2 + li t1, 0x00552229 + sw t1, 0(t0) + + li t0, MEM_SDADDR0 + li t1, 0x00000000 + sw t1, 0(t0) + + li t0, MEM_SDADDR1 + li t1, 0x001003F8 + sw t1, 0(t0) + + li t0, MEM_SDADDR2 + li t1, 0x001023F8 + sw t1, 0(t0) + + sync + + li t0, MEM_SDREFCFG + li t1, 0x74000c30 /* Disable */ + sw t1, 0(t0) + sync + + li t0, MEM_SDPRECMD + sw zero, 0(t0) + sync + + li t0, MEM_SDAUTOREF + sw zero, 0(t0) + sync + sw zero, 0(t0) + sync + + li t0, MEM_SDREFCFG + li t1, 0x76000c30 /* Enable */ + sw t1, 0(t0) + sync + + li t0, MEM_SDWRMD0 + li t1, 0x00000023 + sw t1, 0(t0) + sync + + li t0, MEM_SDWRMD1 + li t1, 0x00000023 + sw t1, 0(t0) + sync + + li t0, MEM_SDWRMD2 + li t1, 0x00000023 + sw t1, 0(t0) + sync + + /* wait 1mS after setup */ + li t1, MEM_1MS +1: add t1, -1 + bne t1, zero, 1b + nop + +skip_memsetup: + + li t0, SYS_PINFUNC + li t1, 0/*0x00008080*/ + sw t1, 0(t0) + + /* + li t0, SYS_TRIOUTCLR + li t1, 0x00001FFF + sw t1, 0(t0) + + li t0, SYS_OUTPUTCLR + li t1, 0x00008000 + sw t1, 0(t0) + */ + sync + + j ra + nop diff --git a/board/pb1x00/memsetup.S b/board/pb1x00/memsetup.S deleted file mode 100644 index 44f02b9..0000000 --- a/board/pb1x00/memsetup.S +++ /dev/null @@ -1,392 +0,0 @@ -/* Memory sub-system initialization code */ - -#include -#include -#include -#include -#include - -#define AU1500_SYS_ADDR 0xB1900000 -#define sys_endian 0x0038 -#define CP0_Config0 $16 -#define MEM_1MS ((396000000/1000000) * 1000) - - .text - .set noreorder - .set mips32 - - .globl memsetup -memsetup: - /* - * Step 1) Establish CPU endian mode. - * NOTE: A fair amount of code is necessary on the Pb1000 to - * obtain the value of Switch S8.1 which is used to determine - * endian at run-time. - */ - - /* RCE1 */ - li t0, MEM_STCFG1 - li t1, 0x00000083 - sw t1, 0(t0) - - li t0, MEM_STTIME1 - li t1, 0x33030A10 - sw t1, 0(t0) - - li t0, MEM_STADDR1 - li t1, 0x11803E40 - sw t1, 0(t0) - - /* Set DSTRB bits so switch will read correctly */ - li t1, 0xBE00000C - lw t2, 0(t1) - or t2, t2, 0x00000300 - sw t2, 0(t1) - - /* Check switch setting */ - li t1, 0xBE000014 - lw t2, 0(t1) - and t2, t2, 0x00000100 - bne t2, zero, big_endian - nop - -little_endian: - - /* Change Au1 core to little endian */ - li t0, AU1500_SYS_ADDR - li t1, 1 - sw t1, sys_endian(t0) - mfc0 t2, CP0_CONFIG - mtc0 t2, CP0_CONFIG - nop - nop - - /* Big Endian is default so nothing to do but fall through */ - -big_endian: - - /* - * Step 2) Establish Status Register - * (set BEV, clear ERL, clear EXL, clear IE) - */ - li t1, 0x00400000 - mtc0 t1, CP0_STATUS - - /* - * Step 3) Establish CP0 Config0 - * (set OD, set K0=3) - */ - li t1, 0x00080003 - mtc0 t1, CP0_CONFIG - - /* - * Step 4) Disable Watchpoint facilities - */ - li t1, 0x00000000 - mtc0 t1, CP0_WATCHLO - mtc0 t1, CP0_IWATCHLO - /* - * Step 5) Disable the performance counters - */ - mtc0 zero, CP0_PERFORMANCE - nop - - /* - * Step 6) Establish EJTAG Debug register - */ - mtc0 zero, CP0_DEBUG - nop - - /* - * Step 7) Establish Cause - * (set IV bit) - */ - li t1, 0x00800000 - mtc0 t1, CP0_CAUSE - - /* Establish Wired (and Random) */ - mtc0 zero, CP0_WIRED - nop - - /* First setup pll:s to make serial work ok */ - /* We have a 12 MHz crystal */ - li t0, SYS_CPUPLL - li t1, 0x21 /* 396 MHz */ - sw t1, 0(t0) - sync - nop - nop - - /* wait 1mS for clocks to settle */ - li t1, MEM_1MS -1: add t1, -1 - bne t1, zero, 1b - nop - /* Setup AUX PLL */ - li t0, SYS_AUXPLL - li t1, 8 /* 96 MHz */ - sw t1, 0(t0) /* aux pll */ - sync - - /* Static memory controller */ - - /* RCE0 8MB AMD29D323 Flash */ - li t0, MEM_STCFG0 - li t1, 0x00001403 - sw t1, 0(t0) - - li t0, MEM_STTIME0 - li t1, 0xFFFFFFDD - sw t1, 0(t0) - - li t0, MEM_STADDR0 - li t1, 0x11F83FE0 - sw t1, 0(t0) - - /* RCE1 CPLD Board Logic */ - li t0, MEM_STCFG1 - li t1, 0x00000083 - sw t1, 0(t0) - - li t0, MEM_STTIME1 - li t1, 0x33030A10 - sw t1, 0(t0) - - li t0, MEM_STADDR1 - li t1, 0x11803E40 - sw t1, 0(t0) - - /* RCE2 CPLD Board Logic */ - li t0, MEM_STCFG2 - li t1, 0x00000004 - sw t1, 0(t0) - - li t0, MEM_STTIME2 - li t1, 0x08061908 - sw t1, 0(t0) - - li t0, MEM_STADDR2 - li t1, 0x12A03FC0 - sw t1, 0(t0) - - /* RCE3 PCMCIA 250ns */ - li t0, MEM_STCFG3 - li t1, 0x00000002 - sw t1, 0(t0) - - li t0, MEM_STTIME3 - li t1, 0x280E3E07 - sw t1, 0(t0) - - li t0, MEM_STADDR3 - li t1, 0x10000000 - sw t1, 0(t0) - - sync - - /* Set peripherals to a known state */ - li t0, IC0_CFG0CLR - li t1, 0xFFFFFFFF - sw t1, 0(t0) - - li t0, IC0_CFG0CLR - sw t1, 0(t0) - - li t0, IC0_CFG1CLR - sw t1, 0(t0) - - li t0, IC0_CFG2CLR - sw t1, 0(t0) - - li t0, IC0_SRCSET - sw t1, 0(t0) - - li t0, IC0_ASSIGNSET - sw t1, 0(t0) - - li t0, IC0_WAKECLR - sw t1, 0(t0) - - li t0, IC0_RISINGCLR - sw t1, 0(t0) - - li t0, IC0_FALLINGCLR - sw t1, 0(t0) - - li t0, IC0_TESTBIT - li t1, 0x00000000 - sw t1, 0(t0) - sync - - li t0, IC1_CFG0CLR - li t1, 0xFFFFFFFF - sw t1, 0(t0) - - li t0, IC1_CFG0CLR - sw t1, 0(t0) - - li t0, IC1_CFG1CLR - sw t1, 0(t0) - - li t0, IC1_CFG2CLR - sw t1, 0(t0) - - li t0, IC1_SRCSET - sw t1, 0(t0) - - li t0, IC1_ASSIGNSET - sw t1, 0(t0) - - li t0, IC1_WAKECLR - sw t1, 0(t0) - - li t0, IC1_RISINGCLR - sw t1, 0(t0) - - li t0, IC1_FALLINGCLR - sw t1, 0(t0) - - li t0, IC1_TESTBIT - li t1, 0x00000000 - sw t1, 0(t0) - sync - - li t0, SYS_FREQCTRL0 - li t1, 0x00000000 - sw t1, 0(t0) - - li t0, SYS_FREQCTRL1 - li t1, 0x00000000 - sw t1, 0(t0) - - li t0, SYS_CLKSRC - li t1, 0x00000000 - sw t1, 0(t0) - - li t0, SYS_PININPUTEN - li t1, 0x00000000 - sw t1, 0(t0) - sync - - li t0, 0xB1100100 - li t1, 0x00000000 - sw t1, 0(t0) - - li t0, 0xB1400100 - li t1, 0x00000000 - sw t1, 0(t0) - - - li t0, SYS_WAKEMSK - li t1, 0x00000000 - sw t1, 0(t0) - - li t0, SYS_WAKESRC - li t1, 0x00000000 - sw t1, 0(t0) - - /* wait 1mS before setup */ - li t1, MEM_1MS -1: add t1, -1 - bne t1, zero, 1b - nop - - /* - * Skip memory setup if we are running from memory - */ - li t0, 0x90000000 - sub t0, ra, t0 - bltz t0, skip_memsetup - nop - - /* - * SDCS0 - Not used, for SMROM - * SDCS1 - 32MB Micron 48LCBM16A2 - * SDCS2 - 32MB Micron 48LCBM16A2 - */ - li t0, MEM_SDMODE0 - li t1, 0x00000000 - sw t1, 0(t0) - - li t0, MEM_SDMODE1 - li t1, 0x00552229 - sw t1, 0(t0) - - li t0, MEM_SDMODE2 - li t1, 0x00552229 - sw t1, 0(t0) - - li t0, MEM_SDADDR0 - li t1, 0x00000000 - sw t1, 0(t0) - - li t0, MEM_SDADDR1 - li t1, 0x001003F8 - sw t1, 0(t0) - - li t0, MEM_SDADDR2 - li t1, 0x001023F8 - sw t1, 0(t0) - - sync - - li t0, MEM_SDREFCFG - li t1, 0x74000c30 /* Disable */ - sw t1, 0(t0) - sync - - li t0, MEM_SDPRECMD - sw zero, 0(t0) - sync - - li t0, MEM_SDAUTOREF - sw zero, 0(t0) - sync - sw zero, 0(t0) - sync - - li t0, MEM_SDREFCFG - li t1, 0x76000c30 /* Enable */ - sw t1, 0(t0) - sync - - li t0, MEM_SDWRMD0 - li t1, 0x00000023 - sw t1, 0(t0) - sync - - li t0, MEM_SDWRMD1 - li t1, 0x00000023 - sw t1, 0(t0) - sync - - li t0, MEM_SDWRMD2 - li t1, 0x00000023 - sw t1, 0(t0) - sync - - /* wait 1mS after setup */ - li t1, MEM_1MS -1: add t1, -1 - bne t1, zero, 1b - nop - -skip_memsetup: - - li t0, SYS_PINFUNC - li t1, 0/*0x00008080*/ - sw t1, 0(t0) - - /* - li t0, SYS_TRIOUTCLR - li t1, 0x00001FFF - sw t1, 0(t0) - - li t0, SYS_OUTPUTCLR - li t1, 0x00008000 - sw t1, 0(t0) - */ - sync - - j ra - nop -- cgit v1.1 From b09258c5393edd1087c5f39ae68338f16b49f8b3 Mon Sep 17 00:00:00 2001 From: Shinya Kuribayashi Date: Sat, 27 Oct 2007 15:00:25 +0900 Subject: MAKEALL: Added missing pb1000 board Signed-off-by: Shinya Kuribayashi --- MAKEALL | 1 + 1 file changed, 1 insertion(+) diff --git a/MAKEALL b/MAKEALL index 20e8137..20ef4e1 100755 --- a/MAKEALL +++ b/MAKEALL @@ -554,6 +554,7 @@ LIST_mips5kc_el="" LIST_au1xx0_el=" \ dbau1550_el \ + pb1000 \ " LIST_mips_el=" \ -- cgit v1.1 From f01320459736f156707425cf8112f98606301aa4 Mon Sep 17 00:00:00 2001 From: Shinya Kuribayashi Date: Sat, 27 Oct 2007 15:00:25 +0900 Subject: [MIPS] au1x00_eth.c: Fix au1x00_miiphy_{read,write} build error au1x00_eth.c: In function 'au1x00_enet_initialize': au1x00_eth.c:246: error: 'au1x00_miiphy_read' undeclared (first use in this function) au1x00_eth.c:246: error: (Each undeclared identifier is reported only once au1x00_eth.c:246: error: for each function it appears in.) au1x00_eth.c:246: error: 'au1x00_miiphy_write' undeclared (first use in this function) au1x00_eth.c: In function 'au1x00_miiphy_write': au1x00_eth.c:298: warning: 'return' with no value, in function returning non-void make[1]: *** [au1x00_eth.o] Error 1 Fixed by moving these two functions forward. Signed-off-by: Shinya Kuribayashi --- cpu/mips/au1x00_eth.c | 118 +++++++++++++++++++++++++------------------------- 1 file changed, 59 insertions(+), 59 deletions(-) diff --git a/cpu/mips/au1x00_eth.c b/cpu/mips/au1x00_eth.c index b69741a..23f2f94 100644 --- a/cpu/mips/au1x00_eth.c +++ b/cpu/mips/au1x00_eth.c @@ -90,6 +90,65 @@ mac_fifo_t mac_fifo[NO_OF_FIFOS]; #define MAX_WAIT 1000 +#if defined(CONFIG_CMD_MII) +int au1x00_miiphy_read(char *devname, unsigned char addr, + unsigned char reg, unsigned short * value) +{ + volatile u32 *mii_control_reg = (volatile u32*)(ETH0_BASE+MAC_MII_CNTRL); + volatile u32 *mii_data_reg = (volatile u32*)(ETH0_BASE+MAC_MII_DATA); + u32 mii_control; + unsigned int timedout = 20; + + while (*mii_control_reg & MAC_MII_BUSY) { + udelay(1000); + if (--timedout == 0) { + printf("au1x00_eth: miiphy_read busy timeout!!\n"); + return -1; + } + } + + mii_control = MAC_SET_MII_SELECT_REG(reg) | + MAC_SET_MII_SELECT_PHY(addr) | MAC_MII_READ; + + *mii_control_reg = mii_control; + + timedout = 20; + while (*mii_control_reg & MAC_MII_BUSY) { + udelay(1000); + if (--timedout == 0) { + printf("au1x00_eth: miiphy_read busy timeout!!\n"); + return -1; + } + } + *value = *mii_data_reg; + return 0; +} + +int au1x00_miiphy_write(char *devname, unsigned char addr, + unsigned char reg, unsigned short value) +{ + volatile u32 *mii_control_reg = (volatile u32*)(ETH0_BASE+MAC_MII_CNTRL); + volatile u32 *mii_data_reg = (volatile u32*)(ETH0_BASE+MAC_MII_DATA); + u32 mii_control; + unsigned int timedout = 20; + + while (*mii_control_reg & MAC_MII_BUSY) { + udelay(1000); + if (--timedout == 0) { + printf("au1x00_eth: miiphy_write busy timeout!!\n"); + return; + } + } + + mii_control = MAC_SET_MII_SELECT_REG(reg) | + MAC_SET_MII_SELECT_PHY(addr) | MAC_MII_WRITE; + + *mii_data_reg = value; + *mii_control_reg = mii_control; + return 0; +} +#endif + static int au1x00_send(struct eth_device* dev, volatile void *packet, int length){ volatile mac_fifo_t *fifo_tx = (volatile mac_fifo_t*)(MAC0_TX_DMA_ADDR+MAC_TX_BUFF0_STATUS); @@ -249,63 +308,4 @@ int au1x00_enet_initialize(bd_t *bis){ return 1; } -#if defined(CONFIG_CMD_MII) -int au1x00_miiphy_read(char *devname, unsigned char addr, - unsigned char reg, unsigned short * value) -{ - volatile u32 *mii_control_reg = (volatile u32*)(ETH0_BASE+MAC_MII_CNTRL); - volatile u32 *mii_data_reg = (volatile u32*)(ETH0_BASE+MAC_MII_DATA); - u32 mii_control; - unsigned int timedout = 20; - - while (*mii_control_reg & MAC_MII_BUSY) { - udelay(1000); - if (--timedout == 0) { - printf("au1x00_eth: miiphy_read busy timeout!!\n"); - return -1; - } - } - - mii_control = MAC_SET_MII_SELECT_REG(reg) | - MAC_SET_MII_SELECT_PHY(addr) | MAC_MII_READ; - - *mii_control_reg = mii_control; - - timedout = 20; - while (*mii_control_reg & MAC_MII_BUSY) { - udelay(1000); - if (--timedout == 0) { - printf("au1x00_eth: miiphy_read busy timeout!!\n"); - return -1; - } - } - *value = *mii_data_reg; - return 0; -} - -int au1x00_miiphy_write(char *devname, unsigned char addr, - unsigned char reg, unsigned short value) -{ - volatile u32 *mii_control_reg = (volatile u32*)(ETH0_BASE+MAC_MII_CNTRL); - volatile u32 *mii_data_reg = (volatile u32*)(ETH0_BASE+MAC_MII_DATA); - u32 mii_control; - unsigned int timedout = 20; - - while (*mii_control_reg & MAC_MII_BUSY) { - udelay(1000); - if (--timedout == 0) { - printf("au1x00_eth: miiphy_write busy timeout!!\n"); - return; - } - } - - mii_control = MAC_SET_MII_SELECT_REG(reg) | - MAC_SET_MII_SELECT_PHY(addr) | MAC_MII_WRITE; - - *mii_data_reg = value; - *mii_control_reg = mii_control; - return 0; -} -#endif - #endif /* CONFIG_AU1X00 */ -- cgit v1.1 From 4fbd0741b2b6441da10be93e10267122581b7079 Mon Sep 17 00:00:00 2001 From: Shinya Kuribayashi Date: Sat, 27 Oct 2007 15:22:33 +0900 Subject: [MIPS] au1x00_eth.c: Fixed a warning on pb1000 build. au1x00_eth.c: In function 'au1x00_miiphy_write': au1x00_eth.c:139: warning: 'return' with no value, in function returning non-void Signed-off-by: Shinya Kuribayashi --- cpu/mips/au1x00_eth.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpu/mips/au1x00_eth.c b/cpu/mips/au1x00_eth.c index 23f2f94..d70c5fe 100644 --- a/cpu/mips/au1x00_eth.c +++ b/cpu/mips/au1x00_eth.c @@ -136,7 +136,7 @@ int au1x00_miiphy_write(char *devname, unsigned char addr, udelay(1000); if (--timedout == 0) { printf("au1x00_eth: miiphy_write busy timeout!!\n"); - return; + return -1; } } -- cgit v1.1 From f5e429d3860bba4c6ae8bead8f78349fa24491b2 Mon Sep 17 00:00:00 2001 From: Shinya Kuribayashi Date: Sat, 17 Nov 2007 20:05:20 +0900 Subject: [MIPS] gth2.c: Fix a warning on gth2 build. gth2.c: In function 'misc_init_r': gth2.c:434: warning: pointer targets in passing argument 2 of 'setenv' differ in signedness Signed-off-by: Shinya Kuribayashi --- board/gth2/gth2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/board/gth2/gth2.c b/board/gth2/gth2.c index 1593f02..6da80dc 100644 --- a/board/gth2/gth2.c +++ b/board/gth2/gth2.c @@ -431,7 +431,7 @@ int misc_init_r(void){ (Rx[8] != ':') | (Rx[11] != ':') | (Rx[14] != ':')) { printf ("*** ethernet addr invalid, using default ***\n"); } else { - setenv ("ethaddr", Rx); + setenv ("ethaddr", (char *)Rx); } return (0); } -- cgit v1.1 From 03c031d5660ea946c39af6e2e16267da857c609f Mon Sep 17 00:00:00 2001 From: Shinya Kuribayashi Date: Sat, 27 Oct 2007 15:27:06 +0900 Subject: [MIPS] MIPS 4K core: Coding style cleanups No logical changes. Signed-off-by: Shinya Kuribayashi --- cpu/mips/cache.S | 30 +++++++++++++----------------- cpu/mips/cpu.c | 6 +++--- cpu/mips/start.S | 50 +++++++++++++++++++++++--------------------------- 3 files changed, 39 insertions(+), 47 deletions(-) diff --git a/cpu/mips/cache.S b/cpu/mips/cache.S index aad76e0..443240e 100644 --- a/cpu/mips/cache.S +++ b/cpu/mips/cache.S @@ -22,7 +22,6 @@ * MA 02111-1307 USA */ - #include #include #include @@ -30,13 +29,11 @@ #include #include - /* 16KB is the maximum size of instruction and data caches on * MIPS 4K. */ #define MIPS_MAX_CACHE_SIZE 0x4000 - /* * cacheop macro to automate cache operations * first some helpers... @@ -131,7 +128,6 @@ mips_cache_reset: li t4, CFG_CACHELINE_SIZE move t5, t4 - li v0, MIPS_MAX_CACHE_SIZE /* Now clear that much memory starting from zero. @@ -139,8 +135,8 @@ mips_cache_reset: li a0, KSEG1 addu a1, a0, v0 - -2: sw zero, 0(a0) +2: + sw zero, 0(a0) sw zero, 4(a0) sw zero, 8(a0) sw zero, 12(a0) @@ -156,11 +152,11 @@ mips_cache_reset: mtc0 zero, CP0_TAGLO - /* - * The caches are probably in an indeterminate state, - * so we force good parity into them by doing an - * invalidate, load/fill, invalidate for each line. - */ + /* + * The caches are probably in an indeterminate state, + * so we force good parity into them by doing an + * invalidate, load/fill, invalidate for each line. + */ /* Assume bottom of RAM will generate good parity for the cache. */ @@ -201,9 +197,9 @@ mips_cache_reset: move a1, a2 icacheop(a0,a1,a2,a3,Index_Store_Tag_D) - j ra - .end mips_cache_reset + j ra + .end mips_cache_reset /******************************************************************************* * @@ -220,7 +216,7 @@ dcache_status: andi v0, v0, 1 j ra - .end dcache_status + .end dcache_status /******************************************************************************* * @@ -237,11 +233,10 @@ dcache_disable: li t1, -8 and t0, t0, t1 ori t0, t0, CONF_CM_UNCACHED - mtc0 t0, CP0_CONFIG + mtc0 t0, CP0_CONFIG j ra - .end dcache_disable - + .end dcache_disable /******************************************************************************* * @@ -266,4 +261,5 @@ mips_cache_lock: icacheop(a0,a1,a2,a3,0x1d) j ra + .end mips_cache_lock diff --git a/cpu/mips/cpu.c b/cpu/mips/cpu.c index f48675e..7559ac6 100644 --- a/cpu/mips/cpu.c +++ b/cpu/mips/cpu.c @@ -39,12 +39,12 @@ int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) return 0; } -void flush_cache (ulong start_addr, ulong size) +void flush_cache(ulong start_addr, ulong size) { - } -void write_one_tlb( int index, u32 pagemask, u32 hi, u32 low0, u32 low1 ){ +void write_one_tlb(int index, u32 pagemask, u32 hi, u32 low0, u32 low1) +{ write_32bit_cp0_register(CP0_ENTRYLO0, low0); write_32bit_cp0_register(CP0_PAGEMASK, pagemask); write_32bit_cp0_register(CP0_ENTRYLO1, low1); diff --git a/cpu/mips/start.S b/cpu/mips/start.S index 074d01d..5a278b6 100644 --- a/cpu/mips/start.S +++ b/cpu/mips/start.S @@ -22,13 +22,11 @@ * MA 02111-1307 USA */ - #include #include #include #include - #define RVECENT(f,n) \ b f; nop #define XVECENT(f,bev) \ @@ -192,7 +190,7 @@ _start: .word 0x00000000 .word 0x03e00008 .word 0x00000000 - .word 0x00000000 + .word 0x00000000 /* 0xbfc00428 */ .word 0xdc870000 .word 0xfca70000 @@ -203,7 +201,7 @@ _start: .word 0x00000000 .word 0x03e00008 .word 0x00000000 - .word 0x00000000 + .word 0x00000000 #endif /* CONFIG_PURPLE */ .align 4 reset: @@ -235,33 +233,33 @@ reset: mtc0 t0, CP0_CONFIG /* Initialize $gp. - */ - bal 1f + */ + bal 1f nop .word _gp - 1: - move gp, ra - lw t1, 0(ra) +1: + move gp, ra + lw t1, 0(ra) move gp, t1 #ifdef CONFIG_INCA_IP /* Disable INCA-IP Watchdog. */ - la t9, disable_incaip_wdt - jalr t9 + la t9, disable_incaip_wdt + jalr t9 nop #endif /* Initialize any external memory. */ - la t9, lowlevel_init - jalr t9 + la t9, lowlevel_init + jalr t9 nop /* Initialize caches... */ - la t9, mips_cache_reset - jalr t9 + la t9, mips_cache_reset + jalr t9 nop /* ... and enable them. @@ -269,12 +267,11 @@ reset: li t0, CONF_CM_CACHABLE_NONCOHERENT mtc0 t0, CP0_CONFIG - /* Set up temporary stack. */ li a0, CFG_INIT_SP_OFFSET - la t9, mips_cache_lock - jalr t9 + la t9, mips_cache_lock + jalr t9 nop li t0, CFG_SDRAM_BASE + CFG_INIT_SP_OFFSET @@ -284,7 +281,6 @@ reset: j t9 nop - /* * void relocate_code (addr_sp, gd, addr_moni) * @@ -298,7 +294,7 @@ reset: .globl relocate_code .ent relocate_code relocate_code: - move sp, a0 /* Set new stack pointer */ + move sp, a0 /* Set new stack pointer */ li t0, CFG_MONITOR_BASE la t3, in_ram @@ -312,8 +308,8 @@ relocate_code: */ move t6, gp sub gp, CFG_MONITOR_BASE - add gp, a2 /* gp now adjusted */ - sub t6, gp, t6 /* t6 <-- relocation offset */ + add gp, a2 /* gp now adjusted */ + sub t6, gp, t6 /* t6 <-- relocation offset */ /* * t0 = source address @@ -329,7 +325,7 @@ relocate_code: sw t3, 0(t1) addu t0, 4 ble t0, t2, 1b - addu t1, 4 /* delay slot */ + addu t1, 4 /* delay slot */ #endif /* If caches were enabled, we would have to flush them here. @@ -376,7 +372,8 @@ in_ram: add t2, t6 sub t1, 4 -1: addi t1, 4 +1: + addi t1, 4 bltl t1, t2, 1b sw zero, 0(t1) /* delay slot */ @@ -387,11 +384,10 @@ in_ram: .end relocate_code - /* Exception handlers. */ romReserved: - b romReserved + b romReserved romExcHandle: - b romExcHandle + b romExcHandle -- cgit v1.1 From 16664f72850846e645616da1c0fa5afcd6d15f15 Mon Sep 17 00:00:00 2001 From: Shinya Kuribayashi Date: Sat, 17 Nov 2007 20:05:26 +0900 Subject: [MIPS] Remove useless instructions for initializing $gp. Signed-off-by: Shinya Kuribayashi --- cpu/mips/start.S | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/cpu/mips/start.S b/cpu/mips/start.S index 5a278b6..c92b162 100644 --- a/cpu/mips/start.S +++ b/cpu/mips/start.S @@ -238,9 +238,7 @@ reset: nop .word _gp 1: - move gp, ra - lw t1, 0(ra) - move gp, t1 + lw gp, 0(ra) #ifdef CONFIG_INCA_IP /* Disable INCA-IP Watchdog. -- cgit v1.1 From 7e1d884b7cb602007329c517ec1c453e3a6a5d9c Mon Sep 17 00:00:00 2001 From: Shinya Kuribayashi Date: Sat, 17 Nov 2007 20:05:26 +0900 Subject: [MIPS] cpu/mips/config.mk: Fix GNU assembler minor version picker Current trick to pick up GNU assembler minor version does not work with the latest binutils (2007-03-01 or later) due to ${PKGVERSION} now default to "(GNU Binutils) ". $ sde-as --version |grep "GNU assembler" GNU assembler 2.15.94 mipssde-6.02.02-20050602 $ sde-as --version |grep "GNU assembler" |awk '{print $3}' 2.15.94 $ sde-as --version |grep "GNU assembler" |awk '{print $3}' |awk -F. '{print $2}' 15 $ $ mips-linux-as --version |grep "GNU assembler" GNU assembler (GNU Binutils) 2.18 $ mips-linux-as --version |grep "GNU assembler" |awk '{print $3}' (GNU $ mips-linux-as --version |grep "GNU assembler" |awk '{print $3}' |awk -F. '{print $2}' (no output) $ As a result of above, you'll see many noises with such binutils: make -C cpu/mips/ /bin/sh: line 0: [: : integer expression expected /bin/sh: line 0: [: : integer expression expected make[1]: Entering directory `/home/skuribay/devel/u-boot.git/cpu/mips' mips-linux-gcc -D__ASSEMBLY__ -g -Os -D__KERNEL__ -DTEXT_BASE=0xB0000000 -I/home/skuribay/devel/u-boot.git/include -fno-builtin -ffreestanding -nostdinc -isystem /home/skuribay/devel/buildroot/build_mips/staging_dir/usr/bin/../lib/gcc/mips-linux-uclibc/4.2.1/include -pipe -DCONFIG_MIPS -D__MIPS__ -G 0 -mabicalls -fpic -pipe -msoft-float -march=4kc -mtune=4kc -EB -c -o incaip_wdt.o incaip_wdt.S /bin/sh: line 0: [: : integer expression expected mips-linux-gcc -D__ASSEMBLY__ -g -Os -D__KERNEL__ -DTEXT_BASE=0xB0000000 -I/home/skuribay/devel/u-boot.git/include -fno-builtin -ffreestanding -nostdinc -isystem /home/skuribay/devel/buildroot/build_mips/staging_dir/usr/bin/../lib/gcc/mips-linux-uclibc/4.2.1/include -pipe -DCONFIG_MIPS -D__MIPS__ -G 0 -mabicalls -fpic -pipe -msoft-float -march=4kc -mtune=4kc -EB -c -o cache.o cache.S /bin/sh: line 0: [: : integer expression expected mips-linux-gcc -g -Os -D__KERNEL__ -DTEXT_BASE=0xB0000000 -I/home/skuribay/devel/u-boot.git/include -fno-builtin -ffreestanding -nostdinc -isystem /home/skuribay/devel/buildroot/build_mips/staging_dir/usr/bin/../lib/gcc/mips-linux-uclibc/4.2.1/include -pipe -DCONFIG_MIPS -D__MIPS__ -G 0 -mabicalls -fpic -pipe -msoft-float -march=4kc -mtune=4kc -EB -Wall -Wstrict-prototypes -c -o asc_serial.o asc_serial.c /bin/sh: line 0: [: : integer expression expected This patch simplifies the trick and makes it work with both versions of gas. I also replace an expensive `awk (or gawk)' with `cut'. Signed-off-by: Shinya Kuribayashi --- cpu/mips/config.mk | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cpu/mips/config.mk b/cpu/mips/config.mk index 487c4eb..ad03bd6 100644 --- a/cpu/mips/config.mk +++ b/cpu/mips/config.mk @@ -20,8 +20,7 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, # MA 02111-1307 USA # -v=$(shell \ -$(CROSS_COMPILE)as --version|grep "GNU assembler"|awk '{print $$3}'|awk -F . '{print $$2}') +v=$(shell $(AS) --version |grep "GNU assembler" |cut -d. -f2) MIPSFLAGS=$(shell \ if [ "$v" -lt "14" ]; then \ echo "-mcpu=4kc"; \ -- cgit v1.1 From 2309c130aa4c84b91bd874a41269c923eb61b555 Mon Sep 17 00:00:00 2001 From: Stefan Roese Date: Sat, 17 Nov 2007 07:58:25 +0100 Subject: Fix warning differ in signedness in common/cmd_scsi.c Signed-off-by: Stefan Roese --- common/cmd_scsi.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/common/cmd_scsi.c b/common/cmd_scsi.c index f563931..b2d4eb6 100644 --- a/common/cmd_scsi.c +++ b/common/cmd_scsi.c @@ -129,9 +129,12 @@ void scsi_scan(int mode) if((modi&0x80)==0x80) /* drive is removable */ scsi_dev_desc[scsi_max_devs].removable=TRUE; /* get info for this device */ - scsi_ident_cpy(&scsi_dev_desc[scsi_max_devs].vendor[0],&tempbuff[8],8); - scsi_ident_cpy(&scsi_dev_desc[scsi_max_devs].product[0],&tempbuff[16],16); - scsi_ident_cpy(&scsi_dev_desc[scsi_max_devs].revision[0],&tempbuff[32],4); + scsi_ident_cpy((unsigned char *)&scsi_dev_desc[scsi_max_devs].vendor[0], + &tempbuff[8], 8); + scsi_ident_cpy((unsigned char *)&scsi_dev_desc[scsi_max_devs].product[0], + &tempbuff[16], 16); + scsi_ident_cpy((unsigned char *)&scsi_dev_desc[scsi_max_devs].revision[0], + &tempbuff[32], 4); scsi_dev_desc[scsi_max_devs].target=pccb->target; scsi_dev_desc[scsi_max_devs].lun=pccb->lun; -- cgit v1.1 From 7e14fc65368cbd2861b1207453da55a4fc7b3f81 Mon Sep 17 00:00:00 2001 From: Shinya Kuribayashi Date: Sat, 17 Nov 2007 20:42:45 +0900 Subject: gth2.c: Fix a warning on gth2 build. gth2.c: In function 'misc_init_r': gth2.c:434: warning: pointer targets in passing argument 2 of 'setenv' differ in signedness Signed-off-by: Shinya Kuribayashi --- board/gth2/gth2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/board/gth2/gth2.c b/board/gth2/gth2.c index 1593f02..6da80dc 100644 --- a/board/gth2/gth2.c +++ b/board/gth2/gth2.c @@ -431,7 +431,7 @@ int misc_init_r(void){ (Rx[8] != ':') | (Rx[11] != ':') | (Rx[14] != ':')) { printf ("*** ethernet addr invalid, using default ***\n"); } else { - setenv ("ethaddr", Rx); + setenv ("ethaddr", (char *)Rx); } return (0); } -- cgit v1.1 From 079c2c4fa71c0d1ebef394508df9088df8a308d3 Mon Sep 17 00:00:00 2001 From: Jean-Christophe PLAGNIOL-VILLARD Date: Sat, 17 Nov 2007 11:31:10 +0100 Subject: Fix warning differ in signedness in net/net.c and net/nfs.c --- net/bootp.c | 2 +- net/bootp.h | 2 +- net/net.c | 8 ++++---- net/nfs.c | 2 +- net/rarp.c | 2 +- net/tftp.c | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/net/bootp.c b/net/bootp.c index 55dcc81..89e30d2 100644 --- a/net/bootp.c +++ b/net/bootp.c @@ -33,7 +33,7 @@ #if defined(CONFIG_CMD_NET) -#define TIMEOUT 5 /* Seconds before trying BOOTP again */ +#define TIMEOUT 5UL /* Seconds before trying BOOTP again */ #ifndef CONFIG_NET_RETRY_COUNT # define TIMEOUT_COUNT 5 /* # of timeouts before giving up */ #else diff --git a/net/bootp.h b/net/bootp.h index ba9826e..320cc3b 100644 --- a/net/bootp.h +++ b/net/bootp.h @@ -88,7 +88,7 @@ typedef enum { INIT, #define DHCP_NAK 6 #define DHCP_RELEASE 7 -#define SELECT_TIMEOUT 3 /* Seconds to wait for offers */ +#define SELECT_TIMEOUT 3UL /* Seconds to wait for offers */ /**********************************************************************/ diff --git a/net/net.c b/net/net.c index cde2680..c719bc4 100644 --- a/net/net.c +++ b/net/net.c @@ -94,7 +94,7 @@ DECLARE_GLOBAL_DATA_PTR; -#define ARP_TIMEOUT 5 /* Seconds before trying ARP again */ +#define ARP_TIMEOUT 5UL /* Seconds before trying ARP again */ #ifndef CONFIG_NET_RETRY_COUNT # define ARP_TIMEOUT_COUNT 5 /* # of timeouts before giving up */ #else @@ -589,7 +589,7 @@ void NetStartAgain (void) return; } #ifndef CONFIG_NET_MULTI - NetSetTimeout (10 * CFG_HZ, startAgainTimeout); + NetSetTimeout (10UL * CFG_HZ, startAgainTimeout); NetSetHandler (startAgainHandler); #else /* !CONFIG_NET_MULTI*/ eth_halt (); @@ -598,7 +598,7 @@ void NetStartAgain (void) if (NetRestartWrap) { NetRestartWrap = 0; if (NetDevExists && !once) { - NetSetTimeout (10 * CFG_HZ, startAgainTimeout); + NetSetTimeout (10UL * CFG_HZ, startAgainTimeout); NetSetHandler (startAgainHandler); } else { NetState = NETLOOP_FAIL; @@ -774,7 +774,7 @@ static void PingStart(void) #if defined(CONFIG_NET_MULTI) printf ("Using %s device\n", eth_get_name()); #endif /* CONFIG_NET_MULTI */ - NetSetTimeout (10 * CFG_HZ, PingTimeout); + NetSetTimeout (10UL * CFG_HZ, PingTimeout); NetSetHandler (PingHandler); PingSend(); diff --git a/net/nfs.c b/net/nfs.c index 1b27c97..aa8d612 100644 --- a/net/nfs.c +++ b/net/nfs.c @@ -34,7 +34,7 @@ #if defined(CONFIG_CMD_NET) && defined(CONFIG_CMD_NFS) #define HASHES_PER_LINE 65 /* Number of "loading" hashes per line */ -#define NFS_TIMEOUT 60 +#define NFS_TIMEOUT 60UL static int fs_mounted = 0; static unsigned long rpc_id = 0; diff --git a/net/rarp.c b/net/rarp.c index 21dfa52..ecf38e4 100644 --- a/net/rarp.c +++ b/net/rarp.c @@ -31,7 +31,7 @@ #if defined(CONFIG_CMD_NET) -#define TIMEOUT 5 /* Seconds before trying BOOTP again */ +#define TIMEOUT 5UL /* Seconds before trying BOOTP again */ #ifndef CONFIG_NET_RETRY_COUNT # define TIMEOUT_COUNT 5 /* # of timeouts before giving up */ #else diff --git a/net/tftp.c b/net/tftp.c index 5ee7676..8b95bcf 100644 --- a/net/tftp.c +++ b/net/tftp.c @@ -15,7 +15,7 @@ #if defined(CONFIG_CMD_NET) #define WELL_KNOWN_PORT 69 /* Well known TFTP port # */ -#define TIMEOUT 5 /* Seconds to timeout for a lost pkt */ +#define TIMEOUT 5UL /* Seconds to timeout for a lost pkt */ #ifndef CONFIG_NET_RETRY_COUNT # define TIMEOUT_COUNT 10 /* # of timeouts before giving up */ #else -- cgit v1.1 From 409ecdc0bb47dd28b0af6c25ffd658d22cc36b37 Mon Sep 17 00:00:00 2001 From: Wolfgang Denk Date: Sun, 18 Nov 2007 16:36:27 +0100 Subject: Fix compiler warnings for PPC systems. Update CHANGELOG. Signed-off-by: Wolfgang Denk --- CHANGELOG | 160 ++++++++++++++++++++++++++++++++++ board/freescale/mpc8544ds/mpc8544ds.c | 2 +- board/tqm5200/tqm5200.c | 4 +- common/usb_storage.c | 2 +- cpu/mpc86xx/spd_sdram.c | 4 +- cpu/mpc86xx/speed.c | 3 + drivers/ati_radeon_fb.c | 8 +- drivers/bios_emulator/besys.c | 2 +- drivers/bios_emulator/biosemu.c | 6 +- drivers/tsec.c | 3 + drivers/tsi108_i2c.c | 2 +- drivers/tsi108_pci.c | 3 + 12 files changed, 187 insertions(+), 12 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 5085cb6..6a4b222 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,163 @@ +commit 079c2c4fa71c0d1ebef394508df9088df8a308d3 +Author: Jean-Christophe PLAGNIOL-VILLARD +Date: Sat Nov 17 11:31:10 2007 +0100 + + Fix warning differ in signedness in net/net.c and net/nfs.c + +commit 7e14fc65368cbd2861b1207453da55a4fc7b3f81 +Author: Shinya Kuribayashi +Date: Sat Nov 17 20:42:45 2007 +0900 + + gth2.c: Fix a warning on gth2 build. + + gth2.c: In function 'misc_init_r': + gth2.c:434: warning: pointer targets in passing argument 2 of 'setenv' differ in signedness + + Signed-off-by: Shinya Kuribayashi + +commit 2309c130aa4c84b91bd874a41269c923eb61b555 +Author: Stefan Roese +Date: Sat Nov 17 07:58:25 2007 +0100 + + Fix warning differ in signedness in common/cmd_scsi.c + + Signed-off-by: Stefan Roese + +commit 7e1d884b7cb602007329c517ec1c453e3a6a5d9c +Author: Shinya Kuribayashi +Date: Sat Nov 17 20:05:26 2007 +0900 + + [MIPS] cpu/mips/config.mk: Fix GNU assembler minor version picker + + Current trick to pick up GNU assembler minor version does not work with the + latest binutils (2007-03-01 or later) due to ${PKGVERSION} now default to + "(GNU Binutils) ". + + $ sde-as --version |grep "GNU assembler" + GNU assembler 2.15.94 mipssde-6.02.02-20050602 + $ sde-as --version |grep "GNU assembler" |awk '{print $3}' + 2.15.94 + $ sde-as --version |grep "GNU assembler" |awk '{print $3}' |awk -F. '{print $2}' + 15 + $ + + $ mips-linux-as --version |grep "GNU assembler" + GNU assembler (GNU Binutils) 2.18 + $ mips-linux-as --version |grep "GNU assembler" |awk '{print $3}' + (GNU + $ mips-linux-as --version |grep "GNU assembler" |awk '{print $3}' |awk -F. '{print $2}' + (no output) + $ + + As a result of above, you'll see many noises with such binutils: + + make -C cpu/mips/ + /bin/sh: line 0: [: : integer expression expected + /bin/sh: line 0: [: : integer expression expected + make[1]: Entering directory `/home/skuribay/devel/u-boot.git/cpu/mips' + mips-linux-gcc -D__ASSEMBLY__ -g -Os -D__KERNEL__ -DTEXT_BASE=0xB0000000 -I/home/skuribay/devel/u-boot.git/include -fno-builtin -ffreestanding -nostdinc -isystem /home/skuribay/devel/buildroot/build_mips/staging_dir/usr/bin/../lib/gcc/mips-linux-uclibc/4.2.1/include -pipe -DCONFIG_MIPS -D__MIPS__ -G 0 -mabicalls -fpic -pipe -msoft-float -march=4kc -mtune=4kc -EB -c -o incaip_wdt.o incaip_wdt.S + /bin/sh: line 0: [: : integer expression expected + mips-linux-gcc -D__ASSEMBLY__ -g -Os -D__KERNEL__ -DTEXT_BASE=0xB0000000 -I/home/skuribay/devel/u-boot.git/include -fno-builtin -ffreestanding -nostdinc -isystem /home/skuribay/devel/buildroot/build_mips/staging_dir/usr/bin/../lib/gcc/mips-linux-uclibc/4.2.1/include -pipe -DCONFIG_MIPS -D__MIPS__ -G 0 -mabicalls -fpic -pipe -msoft-float -march=4kc -mtune=4kc -EB -c -o cache.o cache.S + /bin/sh: line 0: [: : integer expression expected + mips-linux-gcc -g -Os -D__KERNEL__ -DTEXT_BASE=0xB0000000 -I/home/skuribay/devel/u-boot.git/include -fno-builtin -ffreestanding -nostdinc -isystem /home/skuribay/devel/buildroot/build_mips/staging_dir/usr/bin/../lib/gcc/mips-linux-uclibc/4.2.1/include -pipe -DCONFIG_MIPS -D__MIPS__ -G 0 -mabicalls -fpic -pipe -msoft-float -march=4kc -mtune=4kc -EB -Wall -Wstrict-prototypes -c -o asc_serial.o asc_serial.c + /bin/sh: line 0: [: : integer expression expected + + This patch simplifies the trick and makes it work with both versions of gas. + I also replace an expensive `awk (or gawk)' with `cut'. + + Signed-off-by: Shinya Kuribayashi + +commit 16664f72850846e645616da1c0fa5afcd6d15f15 +Author: Shinya Kuribayashi +Date: Sat Nov 17 20:05:26 2007 +0900 + + [MIPS] Remove useless instructions for initializing $gp. + + Signed-off-by: Shinya Kuribayashi + +commit 03c031d5660ea946c39af6e2e16267da857c609f +Author: Shinya Kuribayashi +Date: Sat Oct 27 15:27:06 2007 +0900 + + [MIPS] MIPS 4K core: Coding style cleanups + + No logical changes. + + Signed-off-by: Shinya Kuribayashi + +commit f5e429d3860bba4c6ae8bead8f78349fa24491b2 +Author: Shinya Kuribayashi +Date: Sat Nov 17 20:05:20 2007 +0900 + + [MIPS] gth2.c: Fix a warning on gth2 build. + + gth2.c: In function 'misc_init_r': + gth2.c:434: warning: pointer targets in passing argument 2 of 'setenv' differ in signedness + + Signed-off-by: Shinya Kuribayashi + +commit 4fbd0741b2b6441da10be93e10267122581b7079 +Author: Shinya Kuribayashi +Date: Sat Oct 27 15:22:33 2007 +0900 + + [MIPS] au1x00_eth.c: Fixed a warning on pb1000 build. + + au1x00_eth.c: In function 'au1x00_miiphy_write': + au1x00_eth.c:139: warning: 'return' with no value, in function returning non-void + + Signed-off-by: Shinya Kuribayashi + +commit f01320459736f156707425cf8112f98606301aa4 +Author: Shinya Kuribayashi +Date: Sat Oct 27 15:00:25 2007 +0900 + + [MIPS] au1x00_eth.c: Fix au1x00_miiphy_{read,write} build error + + au1x00_eth.c: In function 'au1x00_enet_initialize': + au1x00_eth.c:246: error: 'au1x00_miiphy_read' undeclared (first use in this function) + au1x00_eth.c:246: error: (Each undeclared identifier is reported only once + au1x00_eth.c:246: error: for each function it appears in.) + au1x00_eth.c:246: error: 'au1x00_miiphy_write' undeclared (first use in this function) + au1x00_eth.c: In function 'au1x00_miiphy_write': + au1x00_eth.c:298: warning: 'return' with no value, in function returning non-void + make[1]: *** [au1x00_eth.o] Error 1 + + Fixed by moving these two functions forward. + + Signed-off-by: Shinya Kuribayashi + +commit b09258c5393edd1087c5f39ae68338f16b49f8b3 +Author: Shinya Kuribayashi +Date: Sat Oct 27 15:00:25 2007 +0900 + + MAKEALL: Added missing pb1000 board + + Signed-off-by: Shinya Kuribayashi + +commit 2e4a6e3667a1e39c0e6e99498686b15d2718b369 +Author: Shinya Kuribayashi +Date: Sat Oct 27 15:00:24 2007 +0900 + + [MIPS] pb1000: Replace obsolete memsetup.S with lowlevel_init.S + + Signed-off-by: Shinya Kuribayashi + +commit 662e5cb397249c3ea88a4c3255e9ccfc40b98d82 +Author: Shinya Kuribayashi +Date: Sat Oct 27 15:00:24 2007 +0900 + + [MIPS] u-boot.lds: Cleanup __u_boot_cmd_{start,end} + + Signed-off-by: Shinya Kuribayashi + +commit 5947f6999aafa7c54c1390983d264a8463dfea8e +Author: Wolfgang Denk +Date: Sat Nov 17 02:34:38 2007 +0100 + + Update CHANGELOIG, prepare for -rc4 + + Signed-off-by: Wolfgang Denk + commit fd329e6f05bbdfe6bd71b0e09f0c76d3b0a025a5 Author: Luotao Fu Date: Wed Nov 14 18:58:33 2007 +0100 diff --git a/board/freescale/mpc8544ds/mpc8544ds.c b/board/freescale/mpc8544ds/mpc8544ds.c index 76d9091..b6c9e93 100644 --- a/board/freescale/mpc8544ds/mpc8544ds.c +++ b/board/freescale/mpc8544ds/mpc8544ds.c @@ -227,7 +227,7 @@ pci_init_board(void) * Activate ULI1575 legacy chip by performing a fake * memory access. Needed to make ULI RTC work. */ - in_be32(CFG_PCIE3_MEM_BASE); + in_be32((u32 *)CFG_PCIE3_MEM_BASE); } else { printf (" PCIE3: disabled\n"); } diff --git a/board/tqm5200/tqm5200.c b/board/tqm5200/tqm5200.c index da4e228..f33d172 100644 --- a/board/tqm5200/tqm5200.c +++ b/board/tqm5200/tqm5200.c @@ -444,6 +444,8 @@ ulong post_word_load (void) #ifdef CONFIG_BOARD_EARLY_INIT_R int board_early_init_r (void) { + extern int usb_cpu_init(void); + #ifdef CONFIG_PS2MULT ps2mult_early_init(); #endif /* CONFIG_PS2MULT */ @@ -591,9 +593,9 @@ int last_stage_init (void) disable_ctrlc(1); } #endif +#endif /* !CONFIG_TQM5200S */ return 0; -#endif /* !CONFIG_TQM5200S */ } #ifdef CONFIG_VIDEO_SM501 diff --git a/common/usb_storage.c b/common/usb_storage.c index 0f79f36..443d785 100644 --- a/common/usb_storage.c +++ b/common/usb_storage.c @@ -1195,7 +1195,7 @@ int usb_stor_get_info(struct usb_device *dev,struct us_data *ss,block_dev_desc_t dev_desc->product[16] = 0; dev_desc->revision[4] = 0; #ifdef CONFIG_USB_BIN_FIXUP - usb_bin_fixup(dev->descriptor, dev_desc->vendor, dev_desc->product); + usb_bin_fixup(dev->descriptor, (uchar *)dev_desc->vendor, (uchar *)dev_desc->product); #endif /* CONFIG_USB_BIN_FIXUP */ USB_STOR_PRINTF("ISO Vers %X, Response Data %X\n",usb_stor_buf[2],usb_stor_buf[3]); if(usb_test_unit_ready(pccb,ss)) { diff --git a/cpu/mpc86xx/spd_sdram.c b/cpu/mpc86xx/spd_sdram.c index d57bcdf..265e033 100644 --- a/cpu/mpc86xx/spd_sdram.c +++ b/cpu/mpc86xx/spd_sdram.c @@ -1114,8 +1114,10 @@ spd_sdram(void) int memsize_ddr1 = 0; unsigned int law_size_ddr1; volatile immap_t *immap = (immap_t *)CFG_IMMR; - volatile ccsr_ddr_t *ddr1 = &immap->im_ddr1; volatile ccsr_local_mcm_t *mcm = &immap->im_local_mcm; +#ifdef CONFIG_DDR_INTERLEAVE + volatile ccsr_ddr_t *ddr1 = &immap->im_ddr1; +#endif #if (CONFIG_NUM_DDR_CONTROLLERS > 1) int memsize_ddr2_dimm1 = 0; diff --git a/cpu/mpc86xx/speed.c b/cpu/mpc86xx/speed.c index 23161ca..4f7e8f1 100644 --- a/cpu/mpc86xx/speed.c +++ b/cpu/mpc86xx/speed.c @@ -31,6 +31,9 @@ DECLARE_GLOBAL_DATA_PTR; +/* used in some defintiions of CONFIG_SYS_CLK_FREQ */ +extern unsigned long get_board_sys_clk(unsigned long dummy); + void get_sys_info(sys_info_t *sysInfo) { volatile immap_t *immap = (immap_t *) CFG_IMMR; diff --git a/drivers/ati_radeon_fb.c b/drivers/ati_radeon_fb.c index c174f37..9613d80 100644 --- a/drivers/ati_radeon_fb.c +++ b/drivers/ati_radeon_fb.c @@ -300,7 +300,7 @@ typedef struct { u32 val; } reg_val; - +#if 0 /* unused ? -> scheduled for removal */ /* these common regs are cleared before mode setting so they do not * interfere with anything */ @@ -316,11 +316,10 @@ static reg_val common_regs[] = { { CAP0_TRIG_CNTL, 0 }, { CAP1_TRIG_CNTL, 0 }, }; - +#endif /* 0 */ void radeon_setmode(void) { - int i; struct radeon_regs *mode = malloc(sizeof(struct radeon_regs)); mode->crtc_gen_cntl = 0x03000200; @@ -351,6 +350,9 @@ void radeon_setmode(void) radeon_write_pll_regs(rinfo, mode); } +#include "bios_emulator/include/biosemu.h" +extern int BootVideoCardBIOS(pci_dev_t pcidev, BE_VGAInfo ** pVGAInfo, int cleanUp); + int radeon_probe(struct radeonfb_info *rinfo) { pci_dev_t pdev; diff --git a/drivers/bios_emulator/besys.c b/drivers/bios_emulator/besys.c index 8f1d8b2..cb1b0c1 100644 --- a/drivers/bios_emulator/besys.c +++ b/drivers/bios_emulator/besys.c @@ -96,7 +96,7 @@ static u8 *BE_memaddr(u32 addr) else if (addr >= 0xFFFF5 && addr < 0xFFFFE) { /* Return a faked BIOS date string for non-x86 machines */ DB(printf("BE_memaddr - Returning BIOS date\n");) - return BE_biosDate + addr - 0xFFFF5; + return (u8 *)(BE_biosDate + addr - 0xFFFF5); } else if (addr == 0xFFFFE) { /* Return system model identifier for non-x86 machines */ DB(printf("BE_memaddr - Returning model\n");) diff --git a/drivers/bios_emulator/biosemu.c b/drivers/bios_emulator/biosemu.c index ccfc872..75ceb45 100644 --- a/drivers/bios_emulator/biosemu.c +++ b/drivers/bios_emulator/biosemu.c @@ -96,7 +96,7 @@ int X86API BE_init(u32 debugFlags, int memSize, BE_VGAInfo * info, int shared) return 0; } - M.mem_base = (unsigned long)malloc(memSize); + M.mem_base = malloc(memSize); if (M.mem_base == NULL){ printf("Biosemu:Out of memory!"); @@ -106,7 +106,7 @@ int X86API BE_init(u32 debugFlags, int memSize, BE_VGAInfo * info, int shared) _BE_env.emulateVGA = 0; _BE_env.busmem_base = (unsigned long)malloc(128 * 1024); - if (_BE_env.busmem_base == NULL){ + if ((void *)_BE_env.busmem_base == NULL){ printf("Biosemu:Out of memory!"); return 0; } @@ -230,7 +230,7 @@ Cleans up and exits the emulator. void X86API BE_exit(void) { free(M.mem_base); - free(_BE_env.busmem_base); + free((void *)_BE_env.busmem_base); } /**************************************************************************** diff --git a/drivers/tsec.c b/drivers/tsec.c index 7ba8f0c..ca6284b 100644 --- a/drivers/tsec.c +++ b/drivers/tsec.c @@ -117,10 +117,13 @@ struct phy_info *get_phy_info(struct eth_device *dev); void phy_run_commands(struct tsec_private *priv, struct phy_cmd *cmd); static void adjust_link(struct eth_device *dev); static void relocate_cmds(void); +#if defined(CONFIG_MII) || defined(CONFIG_CMD_MII) \ + && !defined(BITBANGMII) static int tsec_miiphy_write(char *devname, unsigned char addr, unsigned char reg, unsigned short value); static int tsec_miiphy_read(char *devname, unsigned char addr, unsigned char reg, unsigned short *value); +#endif #ifdef CONFIG_MCAST_TFTP static int tsec_mcast_addr (struct eth_device *dev, u8 mcast_mac, u8 set); #endif diff --git a/drivers/tsi108_i2c.c b/drivers/tsi108_i2c.c index 3a3b75c..d6736b0 100644 --- a/drivers/tsi108_i2c.c +++ b/drivers/tsi108_i2c.c @@ -276,7 +276,7 @@ int i2c_probe (uchar chip) * The Tsi108 HW doesn't support sending just the chip address * and checkong for an back. */ - return i2c_read (chip, 0, 1, (char *)&tmp, 1); + return i2c_read (chip, 0, 1, (uchar *)&tmp, 1); } #endif diff --git a/drivers/tsi108_pci.c b/drivers/tsi108_pci.c index 9f606df..d5f11e4 100644 --- a/drivers/tsi108_pci.c +++ b/drivers/tsi108_pci.c @@ -33,6 +33,9 @@ #include #include #include +#ifdef CONFIG_OF_FLAT_TREE +#include +#endif struct pci_controller local_hose; -- cgit v1.1 From 8412d814ce8bf5570a2b747f1e7fd321097fe987 Mon Sep 17 00:00:00 2001 From: Wolfgang Denk Date: Sun, 18 Nov 2007 17:11:09 +0100 Subject: Fix compiler warnings for ARM systems. Signed-off-by: Wolfgang Denk --- board/mpl/vcma9/flash.c | 2 +- board/mpl/vcma9/vcma9.h | 2 +- board/pleb2/flash.c | 2 +- board/sbc2410x/flash.c | 2 +- board/smdk2410/flash.c | 2 +- board/wepep250/flash.c | 5 ++++- cpu/pxa/i2c.c | 2 +- drivers/s3c4510b_eth.c | 2 +- 8 files changed, 11 insertions(+), 8 deletions(-) diff --git a/board/mpl/vcma9/flash.c b/board/mpl/vcma9/flash.c index ccfe176..d15a191 100644 --- a/board/mpl/vcma9/flash.c +++ b/board/mpl/vcma9/flash.c @@ -290,7 +290,7 @@ int flash_erase (flash_info_t * info, int s_first, int s_last) * Copy memory to flash */ -volatile static int write_hword (flash_info_t * info, ulong dest, ushort data) +static int write_hword (flash_info_t * info, ulong dest, ushort data) { vu_short *addr = (vu_short *) dest; ushort result; diff --git a/board/mpl/vcma9/vcma9.h b/board/mpl/vcma9/vcma9.h index 7a32343..220b705 100644 --- a/board/mpl/vcma9/vcma9.h +++ b/board/mpl/vcma9/vcma9.h @@ -128,7 +128,7 @@ typedef struct { } /*__attribute__((__packed__))*/ VCMA9_PLD; #define VCMA9_PLD_BASE 0x2C000100 -static inline VCMA9_PLD * const VCMA9_GetBase_PLD(void) +static inline VCMA9_PLD * VCMA9_GetBase_PLD(void) { return (VCMA9_PLD * const)VCMA9_PLD_BASE; } diff --git a/board/pleb2/flash.c b/board/pleb2/flash.c index 97271d9..5a1eba6 100644 --- a/board/pleb2/flash.c +++ b/board/pleb2/flash.c @@ -196,7 +196,7 @@ void flash_print_info (flash_info_t * info) int i; uchar *boottype; uchar *bootletter; - uchar *fmt; + char *fmt; uchar botbootletter[] = "B"; uchar topbootletter[] = "T"; uchar botboottype[] = "bottom boot sector"; diff --git a/board/sbc2410x/flash.c b/board/sbc2410x/flash.c index f2718f2..0c669e4 100644 --- a/board/sbc2410x/flash.c +++ b/board/sbc2410x/flash.c @@ -288,7 +288,7 @@ int flash_erase (flash_info_t * info, int s_first, int s_last) * Copy memory to flash */ -volatile static int write_hword (flash_info_t * info, ulong dest, ushort data) +static int write_hword (flash_info_t * info, ulong dest, ushort data) { vu_short *addr = (vu_short *) dest; ushort result; diff --git a/board/smdk2410/flash.c b/board/smdk2410/flash.c index 993946b..376930b 100644 --- a/board/smdk2410/flash.c +++ b/board/smdk2410/flash.c @@ -290,7 +290,7 @@ int flash_erase (flash_info_t * info, int s_first, int s_last) * Copy memory to flash */ -volatile static int write_hword (flash_info_t * info, ulong dest, ushort data) +static int write_hword (flash_info_t * info, ulong dest, ushort data) { vu_short *addr = (vu_short *) dest; ushort result; diff --git a/board/wepep250/flash.c b/board/wepep250/flash.c index 2a32290..e2e08f7 100644 --- a/board/wepep250/flash.c +++ b/board/wepep250/flash.c @@ -44,6 +44,7 @@ #if ( WEP_FLASH_BUS_WIDTH == 1 ) # define FLASH_BUS vu_char +# define FLASH_BUS_RET u_char # if ( WEP_FLASH_INTERLEAVE == 1 ) # define FLASH_CMD( x ) x # else @@ -53,6 +54,7 @@ #elif ( WEP_FLASH_BUS_WIDTH == 2 ) # define FLASH_BUS vu_short +# define FLASH_BUS_RET u_short # if ( WEP_FLASH_INTERLEAVE == 1 ) # define FLASH_CMD( x ) x # elif ( WEP_FLASH_INTERLEAVE == 2 ) @@ -64,6 +66,7 @@ #elif ( WEP_FLASH_BUS_WIDTH == 4 ) # define FLASH_BUS vu_long +# define FLASH_BUS_RET u_long # if ( WEP_FLASH_INTERLEAVE == 1 ) # define FLASH_CMD( x ) x # elif ( WEP_FLASH_INTERLEAVE == 2 ) @@ -81,7 +84,7 @@ flash_info_t flash_info[CFG_MAX_FLASH_BANKS]; -static FLASH_BUS flash_status_reg (void) +static FLASH_BUS_RET flash_status_reg (void) { FLASH_BUS *addr = (FLASH_BUS *) 0; diff --git a/cpu/pxa/i2c.c b/cpu/pxa/i2c.c index 722d949..92dd19f 100644 --- a/cpu/pxa/i2c.c +++ b/cpu/pxa/i2c.c @@ -457,7 +457,7 @@ int i2c_write(uchar chip, uint addr, int alen, uchar *buffer, int len) uchar i2c_reg_read (uchar chip, uchar reg) { - char buf; + uchar buf; PRINTD(("i2c_reg_read(chip=0x%02x, reg=0x%02x)\n",chip,reg)); i2c_read(chip, reg, 1, &buf, 1); diff --git a/drivers/s3c4510b_eth.c b/drivers/s3c4510b_eth.c index 48901aa..3d9066a 100644 --- a/drivers/s3c4510b_eth.c +++ b/drivers/s3c4510b_eth.c @@ -175,7 +175,7 @@ s32 eth_send(volatile void *packet, s32 length) } /* copy user data into frame data pointer */ - memcpy((void *)(eth->m_curTX_FD->m_frameDataPtr.bf.dataPtr), + memcpy((void *)((u32)(eth->m_curTX_FD->m_frameDataPtr.bf.dataPtr)), (void *)packet, length); -- cgit v1.1 From 6073f61e078da5ddb521b56256bcc36508589883 Mon Sep 17 00:00:00 2001 From: Jean-Christophe PLAGNIOL-VILLARD Date: Sun, 18 Nov 2007 12:55:02 +0100 Subject: pb1x00 board: Fix u16 status declaration when PCMCIA is defined Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD --- board/pb1x00/pb1x00.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/board/pb1x00/pb1x00.c b/board/pb1x00/pb1x00.c index 95b7d82..536c954 100644 --- a/board/pb1x00/pb1x00.c +++ b/board/pb1x00/pb1x00.c @@ -42,7 +42,9 @@ void write_one_tlb( int index, u32 pagemask, u32 hi, u32 low0, u32 low1 ); int checkboard (void) { +#if defined(CONFIG_IDE_PCMCIA) && 0 u16 status; +#endif /* volatile u32 *pcmcia_bcsr = (u32*)(DB1000_BCSR_ADDR+0x10); */ volatile u32 *sys_counter = (volatile u32*)SYS_COUNTER_CNTRL; u32 proc_id; -- cgit v1.1 From 6bf4c686afca1e86e1c384d59218f914605713bf Mon Sep 17 00:00:00 2001 From: Jean-Christophe PLAGNIOL-VILLARD Date: Sun, 18 Nov 2007 18:36:11 +0100 Subject: s3c24x0: Fix usb_ohci.c missing in Makefile and usb_ohci.c warning differ in signedness Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD --- cpu/arm920t/s3c24x0/Makefile | 2 +- cpu/arm920t/s3c24x0/usb_ohci.c | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/cpu/arm920t/s3c24x0/Makefile b/cpu/arm920t/s3c24x0/Makefile index 0ff36c5..1ed9bf3 100644 --- a/cpu/arm920t/s3c24x0/Makefile +++ b/cpu/arm920t/s3c24x0/Makefile @@ -26,7 +26,7 @@ include $(TOPDIR)/config.mk LIB = $(obj)lib$(SOC).a COBJS = i2c.o interrupts.o serial.o speed.o \ - usb.o + usb.o usb_ohci.o SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS)) diff --git a/cpu/arm920t/s3c24x0/usb_ohci.c b/cpu/arm920t/s3c24x0/usb_ohci.c index 869ca79..4075f2e 100644 --- a/cpu/arm920t/s3c24x0/usb_ohci.c +++ b/cpu/arm920t/s3c24x0/usb_ohci.c @@ -498,7 +498,7 @@ static int ep_link (ohci_t *ohci, ed_t *edi) if (ohci->ed_controltail == NULL) { writel (ed, &ohci->regs->ed_controlhead); } else { - ohci->ed_controltail->hwNextED = m32_swap (ed); + ohci->ed_controltail->hwNextED = (__u32)m32_swap (ed); } ed->ed_prev = ohci->ed_controltail; if (!ohci->ed_controltail && !ohci->ed_rm_list[0] && @@ -514,7 +514,7 @@ static int ep_link (ohci_t *ohci, ed_t *edi) if (ohci->ed_bulktail == NULL) { writel (ed, &ohci->regs->ed_bulkhead); } else { - ohci->ed_bulktail->hwNextED = m32_swap (ed); + ohci->ed_bulktail->hwNextED = (__u32)m32_swap (ed); } ed->ed_prev = ohci->ed_bulktail; if (!ohci->ed_bulktail && !ohci->ed_rm_list[0] && @@ -606,7 +606,7 @@ static ed_t * ep_add_ed (struct usb_device *usb_dev, unsigned long pipe) ed->hwINFO = m32_swap (OHCI_ED_SKIP); /* skip ed */ /* dummy td; end of td list for ed */ td = td_alloc (usb_dev); - ed->hwTailP = m32_swap (td); + ed->hwTailP = (__u32)m32_swap (td); ed->hwHeadP = ed->hwTailP; ed->state = ED_UNLINK; ed->type = usb_pipetype (pipe); @@ -663,13 +663,13 @@ static void td_fill (ohci_t *ohci, unsigned int info, if (!len) data = 0; - td->hwINFO = m32_swap (info); - td->hwCBP = m32_swap (data); + td->hwINFO = (__u32)m32_swap (info); + td->hwCBP = (__u32)m32_swap (data); if (data) - td->hwBE = m32_swap (data + len - 1); + td->hwBE = (__u32)m32_swap (data + len - 1); else td->hwBE = 0; - td->hwNextTD = m32_swap (td_pt); + td->hwNextTD = (__u32)m32_swap (td_pt); /* append to queue */ td->ed->hwTailP = td->hwNextTD; -- cgit v1.1 From e8da58f2bc092891e8cc92b927ed5c4bd0cb0cab Mon Sep 17 00:00:00 2001 From: Wolfgang Denk Date: Mon, 19 Nov 2007 12:59:14 +0100 Subject: Fix build problems with mp2usb board Signed-off-by: Wolfgang Denk --- drivers/usb_ohci.c | 4 ++++ include/asm-arm/arch-at91rm9200/hardware.h | 2 -- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/usb_ohci.c b/drivers/usb_ohci.c index 7ddcab6..cfa384e 100644 --- a/drivers/usb_ohci.c +++ b/drivers/usb_ohci.c @@ -59,6 +59,10 @@ #include #include "usb_ohci.h" +#ifdef CONFIG_AT91RM9200 +#include /* needed for AT91_USB_HOST_BASE */ +#endif + #if defined(CONFIG_ARM920T) || \ defined(CONFIG_S3C2400) || \ defined(CONFIG_S3C2410) || \ diff --git a/include/asm-arm/arch-at91rm9200/hardware.h b/include/asm-arm/arch-at91rm9200/hardware.h index 8bb0c47..b868e38 100644 --- a/include/asm-arm/arch-at91rm9200/hardware.h +++ b/include/asm-arm/arch-at91rm9200/hardware.h @@ -24,8 +24,6 @@ #ifndef __ASSEMBLY__ #include "AT91RM9200.h" -#else -#include "AT91RM9200_inc.h" #endif /* Virtual and Physical base address for system peripherals */ -- cgit v1.1 From f8c320609366176b31104d9bf5e295232e1c7f1d Mon Sep 17 00:00:00 2001 From: Shinya Kuribayashi Date: Mon, 19 Nov 2007 11:14:16 +0900 Subject: [MIPS] board/gth2/lowlevel_init.S: Fix a build warning lowlevel_init.S: Assembler messages: lowlevel_init.S:413: Warning: Pretending global symbol used as branch target is local. Looking at codes, the `memtest' and `clearmem' are intentional mixed use of `global symbols' and `label' for debugging purpose. To make it build, just disable global-symbols-use for now. As a result `memtest' still remains as unused, but leave it be... Signed-off-by: Shinya Kuribayashi --- board/gth2/lowlevel_init.S | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/board/gth2/lowlevel_init.S b/board/gth2/lowlevel_init.S index 983ff70..eea378a 100644 --- a/board/gth2/lowlevel_init.S +++ b/board/gth2/lowlevel_init.S @@ -413,7 +413,9 @@ noCacheJump: j clearmem nop +#if 0 .globl memtest +#endif memtest: /* Fill memory with address */ li t0, 0x80000000 @@ -434,7 +436,9 @@ mt1: lw t2, 0(t0) bne t1, zero, mt1 nop nop +#if 0 .globl clearmem +#endif clearmem: /* Clear memory */ li t0, 0x80000000 -- cgit v1.1 From f30ad49b16bf998b03c1a5228b6c86369d61c258 Mon Sep 17 00:00:00 2001 From: Haiying Wang Date: Mon, 19 Nov 2007 10:02:13 -0500 Subject: Move CONFIG_QE out of CONFIG_PCI wrap for MPC8568MDS CONFIG_QE shouldn't be in the wrap of CONFIG_PCI, fix it. Signed-off-by: Haiying Wang --- include/configs/MPC8568MDS.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/include/configs/MPC8568MDS.h b/include/configs/MPC8568MDS.h index 548e158..b9366cc 100644 --- a/include/configs/MPC8568MDS.h +++ b/include/configs/MPC8568MDS.h @@ -334,11 +334,6 @@ extern unsigned long get_clock_freq(void); #define CFG_SRIO_MEM_BASE 0xc0000000 -#if defined(CONFIG_PCI) - -#define CONFIG_NET_MULTI -#define CONFIG_PCI_PNP /* do pci plug-and-play */ - #ifdef CONFIG_QE /* * QE UEC ethernet configuration @@ -377,6 +372,11 @@ extern unsigned long get_clock_freq(void); #endif #endif /* CONFIG_QE */ +#if defined(CONFIG_PCI) + +#define CONFIG_NET_MULTI +#define CONFIG_PCI_PNP /* do pci plug-and-play */ + #undef CONFIG_EEPRO100 #undef CONFIG_TULIP -- cgit v1.1 From 9a337ddc154a10a26f117fd147b009abcdeba75a Mon Sep 17 00:00:00 2001 From: Wolfgang Denk Date: Mon, 19 Nov 2007 22:20:24 +0100 Subject: Prepare for 1.3.0 release. Signed-off-by: Wolfgang Denk --- CHANGELOG | 67 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Makefile | 2 +- 2 files changed, 68 insertions(+), 1 deletion(-) diff --git a/CHANGELOG b/CHANGELOG index 6a4b222..bc8c01e 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,70 @@ +commit f30ad49b16bf998b03c1a5228b6c86369d61c258 +Author: Haiying Wang +Date: Mon Nov 19 10:02:13 2007 -0500 + + Move CONFIG_QE out of CONFIG_PCI wrap for MPC8568MDS + + CONFIG_QE shouldn't be in the wrap of CONFIG_PCI, fix it. + + Signed-off-by: Haiying Wang + +commit f8c320609366176b31104d9bf5e295232e1c7f1d +Author: Shinya Kuribayashi +Date: Mon Nov 19 11:14:16 2007 +0900 + + [MIPS] board/gth2/lowlevel_init.S: Fix a build warning + + lowlevel_init.S: Assembler messages: + lowlevel_init.S:413: Warning: Pretending global symbol used as branch target is local. + + Looking at codes, the `memtest' and `clearmem' are intentional mixed + use of `global symbols' and `label' for debugging purpose. To make it + build, just disable global-symbols-use for now. As a result `memtest' + still remains as unused, but leave it be... + + Signed-off-by: Shinya Kuribayashi + +commit e8da58f2bc092891e8cc92b927ed5c4bd0cb0cab +Author: Wolfgang Denk +Date: Mon Nov 19 12:59:14 2007 +0100 + + Fix build problems with mp2usb board + + Signed-off-by: Wolfgang Denk + +commit 6bf4c686afca1e86e1c384d59218f914605713bf +Author: Jean-Christophe PLAGNIOL-VILLARD +Date: Sun Nov 18 18:36:11 2007 +0100 + + s3c24x0: Fix usb_ohci.c missing in Makefile + and usb_ohci.c warning differ in signedness + + Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD + +commit 6073f61e078da5ddb521b56256bcc36508589883 +Author: Jean-Christophe PLAGNIOL-VILLARD +Date: Sun Nov 18 12:55:02 2007 +0100 + + pb1x00 board: Fix u16 status declaration when PCMCIA is defined + + Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD + +commit 8412d814ce8bf5570a2b747f1e7fd321097fe987 +Author: Wolfgang Denk +Date: Sun Nov 18 17:11:09 2007 +0100 + + Fix compiler warnings for ARM systems. + + Signed-off-by: Wolfgang Denk + +commit 409ecdc0bb47dd28b0af6c25ffd658d22cc36b37 +Author: Wolfgang Denk +Date: Sun Nov 18 16:36:27 2007 +0100 + + Fix compiler warnings for PPC systems. Update CHANGELOG. + + Signed-off-by: Wolfgang Denk + commit 079c2c4fa71c0d1ebef394508df9088df8a308d3 Author: Jean-Christophe PLAGNIOL-VILLARD Date: Sat Nov 17 11:31:10 2007 +0100 diff --git a/Makefile b/Makefile index fc50275..ac4b430 100644 --- a/Makefile +++ b/Makefile @@ -24,7 +24,7 @@ VERSION = 1 PATCHLEVEL = 3 SUBLEVEL = 0 -EXTRAVERSION = -rc4 +EXTRAVERSION = U_BOOT_VERSION = $(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION) VERSION_FILE = $(obj)include/version_autogenerated.h -- cgit v1.1