summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWolfgang Denk <wd@denx.de>2008-07-13 14:44:04 +0200
committerWolfgang Denk <wd@denx.de>2008-07-13 14:44:04 +0200
commit0740ac26f4e590bf5b4e7b9a9886208dc2dacb32 (patch)
tree5d18fcb91d491f602c17c550af70a9a092b883f8
parentaf577da58642b81eb94067e3d9e9dc6998cd620d (diff)
parent47bf9c71ae838305a3ea3161af8d14e6f3fc2c82 (diff)
downloadu-boot-imx-0740ac26f4e590bf5b4e7b9a9886208dc2dacb32.zip
u-boot-imx-0740ac26f4e590bf5b4e7b9a9886208dc2dacb32.tar.gz
u-boot-imx-0740ac26f4e590bf5b4e7b9a9886208dc2dacb32.tar.bz2
Merge branch 'master' of git://git.denx.de/u-boot-coldfire
-rwxr-xr-xMAKEALL2
-rw-r--r--board/BuS/EB+MCF-EV123/mii.c2
-rw-r--r--board/cobra5272/mii.c2
-rw-r--r--board/freescale/m5235evb/m5235evb.c3
-rw-r--r--cpu/mcf5227x/cpu_init.c2
-rw-r--r--cpu/mcf52x2/cpu_init.c12
-rw-r--r--cpu/mcf52x2/speed.c2
-rw-r--r--cpu/mcf5445x/config.mk6
-rw-r--r--cpu/mcf5445x/cpu_init.c2
-rw-r--r--cpu/mcf5445x/start.S2
-rw-r--r--cpu/mcf547x_8x/config.mk6
-rw-r--r--cpu/mcf547x_8x/start.S2
-rw-r--r--drivers/serial/mcfuart.c4
-rw-r--r--include/asm-m68k/timer.h2
-rw-r--r--include/configs/EB+MCF-EV123.h2
-rw-r--r--include/configs/M5475EVB.h4
-rw-r--r--include/configs/M5485EVB.h4
-rw-r--r--lib_m68k/board.c6
18 files changed, 39 insertions, 26 deletions
diff --git a/MAKEALL b/MAKEALL
index 2ec2c22..804dd88 100755
--- a/MAKEALL
+++ b/MAKEALL
@@ -691,7 +691,7 @@ LIST_coldfire=" \
M52277EVB \
M5235EVB \
M5249EVB \
- M5253EVB \
+ M5253EVBE \
M5271EVB \
M5272C3 \
M5275EVB \
diff --git a/board/BuS/EB+MCF-EV123/mii.c b/board/BuS/EB+MCF-EV123/mii.c
index 3ea20a6..8ae2ec6 100644
--- a/board/BuS/EB+MCF-EV123/mii.c
+++ b/board/BuS/EB+MCF-EV123/mii.c
@@ -201,7 +201,7 @@ int mii_discover_phy(struct eth_device *dev)
}
#endif /* CFG_DISCOVER_PHY */
-int mii_init(void) __attribute__((weak,alias("__mii_init")));
+void mii_init(void) __attribute__((weak,alias("__mii_init")));
void __mii_init(void)
{
diff --git a/board/cobra5272/mii.c b/board/cobra5272/mii.c
index d0a4a39..b30ba80 100644
--- a/board/cobra5272/mii.c
+++ b/board/cobra5272/mii.c
@@ -200,7 +200,7 @@ int mii_discover_phy(struct eth_device *dev)
}
#endif /* CFG_DISCOVER_PHY */
-int mii_init(void) __attribute__((weak,alias("__mii_init")));
+void mii_init(void) __attribute__((weak,alias("__mii_init")));
void __mii_init(void)
{
diff --git a/board/freescale/m5235evb/m5235evb.c b/board/freescale/m5235evb/m5235evb.c
index c2c8fe8..bd8a4e5 100644
--- a/board/freescale/m5235evb/m5235evb.c
+++ b/board/freescale/m5235evb/m5235evb.c
@@ -75,9 +75,11 @@ phys_size_t initdram(int board_type)
sdram->dacr0 =
SDRAMC_DARCn_BA(CFG_SDRAM_BASE) | SDRAMC_DARCn_CASL_C1 |
SDRAMC_DARCn_CBM_CMD20 | SDRAMC_DARCn_PS_32;
+ asm("nop");
/* Initialize DMR0 */
sdram->dmr0 = ((dramsize - 1) & 0xFFFC0000) | SDRAMC_DMRn_V;
+ asm("nop");
/* Set IP (bit 3) in DACR */
sdram->dacr0 |= SDRAMC_DARCn_IP;
@@ -100,6 +102,7 @@ phys_size_t initdram(int board_type)
/* Finish the configuration by issuing the MRS. */
sdram->dacr0 |= SDRAMC_DARCn_IMRS;
+ asm("nop");
/* Write to the SDRAM Mode Register */
*(u32 *) (CFG_SDRAM_BASE + 0x400) = 0xA5A59696;
diff --git a/cpu/mcf5227x/cpu_init.c b/cpu/mcf5227x/cpu_init.c
index 71b053d..cf29559 100644
--- a/cpu/mcf5227x/cpu_init.c
+++ b/cpu/mcf5227x/cpu_init.c
@@ -106,7 +106,7 @@ void cpu_init_f(void)
*/
int cpu_init_r(void)
{
-#ifdef CONFIG_MCFTMR
+#ifdef CONFIG_MCFRTC
volatile rtc_t *rtc = (volatile rtc_t *)(CFG_MCFRTC_BASE);
volatile rtcex_t *rtcex = (volatile rtcex_t *)&rtc->extended;
u32 oscillator = CFG_RTC_OSCILLATOR;
diff --git a/cpu/mcf52x2/cpu_init.c b/cpu/mcf52x2/cpu_init.c
index 207a37e..344bcee 100644
--- a/cpu/mcf52x2/cpu_init.c
+++ b/cpu/mcf52x2/cpu_init.c
@@ -419,8 +419,7 @@ void cpu_init_f(void)
else is doing it! */
#if defined(CFG_CS0_BASE) & defined(CFG_CS0_SIZE) & \
- defined(CFG_CS0_WIDTH) & defined(CFG_CS0_RO) & \
- defined(CFG_CS0_WS)
+ defined(CFG_CS0_WIDTH) & defined(CFG_CS0_WS)
MCFCSM_CSAR0 = (CFG_CS0_BASE >> 16) & 0xFFFF;
@@ -447,8 +446,7 @@ void cpu_init_f(void)
#endif
#if defined(CFG_CS1_BASE) & defined(CFG_CS1_SIZE) & \
- defined(CFG_CS1_WIDTH) & defined(CFG_CS1_RO) & \
- defined(CFG_CS1_WS)
+ defined(CFG_CS1_WIDTH) & defined(CFG_CS1_WS)
MCFCSM_CSAR1 = (CFG_CS1_BASE >> 16) & 0xFFFF;
@@ -476,8 +474,7 @@ void cpu_init_f(void)
#endif
#if defined(CFG_CS2_BASE) & defined(CFG_CS2_SIZE) & \
- defined(CFG_CS2_WIDTH) & defined(CFG_CS2_RO) & \
- defined(CFG_CS2_WS)
+ defined(CFG_CS2_WIDTH) & defined(CFG_CS2_WS)
MCFCSM_CSAR2 = (CFG_CS2_BASE >> 16) & 0xFFFF;
@@ -505,8 +502,7 @@ void cpu_init_f(void)
#endif
#if defined(CFG_CS3_BASE) & defined(CFG_CS3_SIZE) & \
- defined(CFG_CS3_WIDTH) & defined(CFG_CS3_RO) & \
- defined(CFG_CS3_WS)
+ defined(CFG_CS3_WIDTH) & defined(CFG_CS3_WS)
MCFCSM_CSAR3 = (CFG_CS3_BASE >> 16) & 0xFFFF;
diff --git a/cpu/mcf52x2/speed.c b/cpu/mcf52x2/speed.c
index 5fafcd8..f6edd5b 100644
--- a/cpu/mcf52x2/speed.c
+++ b/cpu/mcf52x2/speed.c
@@ -69,7 +69,7 @@ int get_clocks (void)
/* Setup PLL */
pll->syncr = 0x01080000;
- while (!(pll->synsr & FMPLL_SYNSR_LOCK)
+ while (!(pll->synsr & FMPLL_SYNSR_LOCK))
;
pll->syncr = 0x01000000;
while (!(pll->synsr & FMPLL_SYNSR_LOCK))
diff --git a/cpu/mcf5445x/config.mk b/cpu/mcf5445x/config.mk
index 88433f2..67efa07 100644
--- a/cpu/mcf5445x/config.mk
+++ b/cpu/mcf5445x/config.mk
@@ -29,3 +29,9 @@ PLATFORM_CPPFLAGS += -mcpu=54455 -fPIC
else
PLATFORM_CPPFLAGS += -m5407 -fPIC
endif
+
+ifneq (,$(findstring -linux-,$(shell $(CC) --version)))
+ifneq (,$(findstring GOT,$(shell $(LD) --help)))
+PLATFORM_LDFLAGS += --got=single
+endif
+endif
diff --git a/cpu/mcf5445x/cpu_init.c b/cpu/mcf5445x/cpu_init.c
index 585216d..e07748b 100644
--- a/cpu/mcf5445x/cpu_init.c
+++ b/cpu/mcf5445x/cpu_init.c
@@ -110,7 +110,7 @@ void cpu_init_f(void)
*/
int cpu_init_r(void)
{
-#ifdef CONFIG_MCFTMR
+#ifdef CONFIG_MCFRTC
volatile rtc_t *rtc = (volatile rtc_t *)(CFG_MCFRTC_BASE);
volatile rtcex_t *rtcex = (volatile rtcex_t *)&rtc->extended;
diff --git a/cpu/mcf5445x/start.S b/cpu/mcf5445x/start.S
index 3241b27..89ec7bc 100644
--- a/cpu/mcf5445x/start.S
+++ b/cpu/mcf5445x/start.S
@@ -253,7 +253,7 @@ clear_bss:
/* exception code */
.globl _fault
_fault:
- jmp _fault
+ bra _fault
.globl _exc_handler
_exc_handler:
diff --git a/cpu/mcf547x_8x/config.mk b/cpu/mcf547x_8x/config.mk
index e5f4385..567b281 100644
--- a/cpu/mcf547x_8x/config.mk
+++ b/cpu/mcf547x_8x/config.mk
@@ -29,3 +29,9 @@ PLATFORM_CPPFLAGS += -mcpu=5485 -fPIC
else
PLATFORM_CPPFLAGS += -m5407 -fPIC
endif
+
+ifneq (,$(findstring -linux-,$(shell $(CC) --version)))
+ifneq (,$(findstring GOT,$(shell $(LD) --help)))
+PLATFORM_LDFLAGS += --got=single
+endif
+endif
diff --git a/cpu/mcf547x_8x/start.S b/cpu/mcf547x_8x/start.S
index 8b8708d..87355f9 100644
--- a/cpu/mcf547x_8x/start.S
+++ b/cpu/mcf547x_8x/start.S
@@ -259,7 +259,7 @@ clear_bss:
/* exception code */
.globl _fault
_fault:
- jmp _fault
+ bra _fault
.globl _exc_handler
_exc_handler:
diff --git a/drivers/serial/mcfuart.c b/drivers/serial/mcfuart.c
index 88f3eb1..5eb4f45 100644
--- a/drivers/serial/mcfuart.c
+++ b/drivers/serial/mcfuart.c
@@ -63,8 +63,8 @@ int serial_init(void)
uart->umr = UART_UMR_SB_STOP_BITS_1;
/* Setting up BaudRate */
- counter = (u32) (gd->bus_clk / (gd->baudrate));
- counter >>= 5;
+ counter = (u32) ((gd->bus_clk / 32) + (gd->baudrate / 2));
+ counter = counter / gd->baudrate;
/* write to CTUR: divide counter upper byte */
uart->ubg1 = (u8) ((counter & 0xff00) >> 8);
diff --git a/include/asm-m68k/timer.h b/include/asm-m68k/timer.h
index 030720c..1a5de05 100644
--- a/include/asm-m68k/timer.h
+++ b/include/asm-m68k/timer.h
@@ -33,7 +33,7 @@
/****************************************************************************/
/* DMA Timer module registers */
typedef struct dtimer_ctrl {
-#if defined(CONFIG_M5249) || defined(CONFIG_M5253)
+#if defined(CONFIG_M5249) || defined(CONFIG_M5253) || defined(CONFIG_M5272)
u16 tmr; /* 0x00 Mode register */
u16 res1; /* 0x02 */
u16 trr; /* 0x04 Reference register */
diff --git a/include/configs/EB+MCF-EV123.h b/include/configs/EB+MCF-EV123.h
index 417099e..324eb6c 100644
--- a/include/configs/EB+MCF-EV123.h
+++ b/include/configs/EB+MCF-EV123.h
@@ -84,6 +84,8 @@
#define CONFIG_CMD_MII
#define CONFIG_CMD_NET
+#define CONFIG_MCFTMR
+
#define CONFIG_MCFFEC
#ifdef CONFIG_MCFFEC
# define CONFIG_NET_MULTI 1
diff --git a/include/configs/M5475EVB.h b/include/configs/M5475EVB.h
index a19c342..e8804b5 100644
--- a/include/configs/M5475EVB.h
+++ b/include/configs/M5475EVB.h
@@ -303,9 +303,9 @@
#define CFG_CS0_CTRL 0x00101980
#ifdef CFG_NOR1SZ
-#define CFG_CS1_BASE 0xF8000000
+#define CFG_CS1_BASE 0xE0000000
#define CFG_CS1_MASK (((CFG_NOR1SZ << 20) - 1) & 0xFFFF0001)
-#define CFG_CS1_CTRL 0x00000D80
+#define CFG_CS1_CTRL 0x00101D80
#endif
#endif /* _M5475EVB_H */
diff --git a/include/configs/M5485EVB.h b/include/configs/M5485EVB.h
index b73e2e0..0f957ff 100644
--- a/include/configs/M5485EVB.h
+++ b/include/configs/M5485EVB.h
@@ -289,9 +289,9 @@
#define CFG_CS0_CTRL 0x00101980
#ifdef CFG_NOR1SZ
-#define CFG_CS1_BASE 0xF8000000
+#define CFG_CS1_BASE 0xE0000000
#define CFG_CS1_MASK (((CFG_NOR1SZ << 20) - 1) & 0xFFFF0001)
-#define CFG_CS1_CTRL 0x00000D80
+#define CFG_CS1_CTRL 0x00101D80
#endif
#endif /* _M5485EVB_H */
diff --git a/lib_m68k/board.c b/lib_m68k/board.c
index ae942e5..d27c89c 100644
--- a/lib_m68k/board.c
+++ b/lib_m68k/board.c
@@ -176,7 +176,7 @@ typedef int (init_fnc_t) (void);
static int init_baudrate (void)
{
- uchar tmp[64]; /* long enough for environment variables */
+ char tmp[64]; /* long enough for environment variables */
int i = getenv_r ("baudrate", tmp, sizeof (tmp));
gd->baudrate = (i > 0)
@@ -267,7 +267,7 @@ board_init_f (ulong bootflag)
#ifdef CONFIG_PRAM
int i;
ulong reg;
- uchar tmp[64]; /* long enough for environment variables */
+ char tmp[64]; /* long enough for environment variables */
#endif
/* Pointer is writable since we allocated a register for it */
@@ -752,7 +752,7 @@ void board_init_r (gd_t *id, ulong dest_addr)
*/
{
ulong pram;
- uchar memsz[32];
+ char memsz[32];
#ifdef CONFIG_PRAM
char *s;