ARM ep93xx boards: switch to barebox_arm_entry
This architecture is a bit strange. It has up to four SDRAM banks, but all have a quite limited size. The SDRAM size for the different boards currently is unknown as it's configurable with Kconfig. We use a SDRAM size based on the value of the only board we have in the defconfigs: edb9301. This likely breaks other ep93xx boards. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
parent
bf61adb050
commit
b7e7def623
|
@ -49,6 +49,8 @@ config ARCH_EP93XX
|
||||||
bool "Cirrus Logic EP93xx"
|
bool "Cirrus Logic EP93xx"
|
||||||
select CPU_ARM920T
|
select CPU_ARM920T
|
||||||
select GENERIC_GPIO
|
select GENERIC_GPIO
|
||||||
|
select MACH_HAS_LOWLEVEL_INIT
|
||||||
|
select MACH_DO_LOWLEVEL_INIT
|
||||||
|
|
||||||
config ARCH_IMX
|
config ARCH_IMX
|
||||||
bool "Freescale iMX-based"
|
bool "Freescale iMX-based"
|
||||||
|
|
|
@ -36,6 +36,10 @@ static void program_mode_registers(void);
|
||||||
void sdram_cfg(void)
|
void sdram_cfg(void)
|
||||||
{
|
{
|
||||||
struct sdram_regs *sdram = (struct sdram_regs *)SDRAM_BASE;
|
struct sdram_regs *sdram = (struct sdram_regs *)SDRAM_BASE;
|
||||||
|
unsigned long pc = get_pc();
|
||||||
|
|
||||||
|
if (pc < CONFIG_EP93XX_SDRAM_BANK3_BASE + CONFIG_EP93XX_SDRAM_BANK3_SIZE)
|
||||||
|
return;
|
||||||
|
|
||||||
writel(SDRAM_DEVCFG_VAL, &sdram->SDRAM_DEVCFG_REG);
|
writel(SDRAM_DEVCFG_VAL, &sdram->SDRAM_DEVCFG_REG);
|
||||||
|
|
||||||
|
|
|
@ -38,7 +38,6 @@ choice
|
||||||
config MACH_EDB9301
|
config MACH_EDB9301
|
||||||
bool "Cirrus Logic EDB9301"
|
bool "Cirrus Logic EDB9301"
|
||||||
select EP93XX_SDCE3_SYNC_PHYS_OFFSET
|
select EP93XX_SDCE3_SYNC_PHYS_OFFSET
|
||||||
select MACH_HAS_LOWLEVEL_INIT
|
|
||||||
help
|
help
|
||||||
Say y here if you are using Cirrus Logic's EDB9301 Evaluation board
|
Say y here if you are using Cirrus Logic's EDB9301 Evaluation board
|
||||||
|
|
||||||
|
@ -103,14 +102,12 @@ choice
|
||||||
config MACH_EDB9302
|
config MACH_EDB9302
|
||||||
bool "Cirrus Logic EDB9302"
|
bool "Cirrus Logic EDB9302"
|
||||||
select EP93XX_SDCE3_SYNC_PHYS_OFFSET
|
select EP93XX_SDCE3_SYNC_PHYS_OFFSET
|
||||||
select MACH_HAS_LOWLEVEL_INIT
|
|
||||||
help
|
help
|
||||||
Say y here if you are using Cirrus Logic's EDB9302 Evaluation board
|
Say y here if you are using Cirrus Logic's EDB9302 Evaluation board
|
||||||
|
|
||||||
config MACH_EDB9302A
|
config MACH_EDB9302A
|
||||||
bool "Cirrus Logic EDB9302A"
|
bool "Cirrus Logic EDB9302A"
|
||||||
select EP93XX_SDCE0_PHYS_OFFSET
|
select EP93XX_SDCE0_PHYS_OFFSET
|
||||||
select MACH_HAS_LOWLEVEL_INIT
|
|
||||||
help
|
help
|
||||||
Say y here if you are using Cirrus Logic's EDB9302A Evaluation board
|
Say y here if you are using Cirrus Logic's EDB9302A Evaluation board
|
||||||
|
|
||||||
|
@ -222,14 +219,12 @@ choice
|
||||||
config MACH_EDB9307
|
config MACH_EDB9307
|
||||||
bool "Cirrus Logic EDB9307"
|
bool "Cirrus Logic EDB9307"
|
||||||
select EP93XX_SDCE3_SYNC_PHYS_OFFSET
|
select EP93XX_SDCE3_SYNC_PHYS_OFFSET
|
||||||
select MACH_HAS_LOWLEVEL_INIT
|
|
||||||
help
|
help
|
||||||
Say y here if you are using Cirrus Logic's EDB9307 Evaluation board
|
Say y here if you are using Cirrus Logic's EDB9307 Evaluation board
|
||||||
|
|
||||||
config MACH_EDB9307A
|
config MACH_EDB9307A
|
||||||
bool "Cirrus Logic EDB9307A"
|
bool "Cirrus Logic EDB9307A"
|
||||||
select EP93XX_SDCE0_PHYS_OFFSET
|
select EP93XX_SDCE0_PHYS_OFFSET
|
||||||
select MACH_HAS_LOWLEVEL_INIT
|
|
||||||
help
|
help
|
||||||
Say y here if you are using Cirrus Logic's EDB9307A Evaluation board
|
Say y here if you are using Cirrus Logic's EDB9307A Evaluation board
|
||||||
|
|
||||||
|
@ -309,7 +304,6 @@ choice
|
||||||
config MACH_EDB9312
|
config MACH_EDB9312
|
||||||
bool "Cirrus Logic EDB9312"
|
bool "Cirrus Logic EDB9312"
|
||||||
select EP93XX_SDCE3_SYNC_PHYS_OFFSET
|
select EP93XX_SDCE3_SYNC_PHYS_OFFSET
|
||||||
select MACH_HAS_LOWLEVEL_INIT
|
|
||||||
help
|
help
|
||||||
Say y here if you are using Cirrus Logic's EDB9312 Evaluation board
|
Say y here if you are using Cirrus Logic's EDB9312 Evaluation board
|
||||||
|
|
||||||
|
@ -358,14 +352,12 @@ choice
|
||||||
config MACH_EDB9315
|
config MACH_EDB9315
|
||||||
bool "Cirrus Logic EDB9315"
|
bool "Cirrus Logic EDB9315"
|
||||||
select EP93XX_SDCE3_SYNC_PHYS_OFFSET
|
select EP93XX_SDCE3_SYNC_PHYS_OFFSET
|
||||||
select MACH_HAS_LOWLEVEL_INIT
|
|
||||||
help
|
help
|
||||||
Say y here if you are using Cirrus Logic's EDB9315 Evaluation board
|
Say y here if you are using Cirrus Logic's EDB9315 Evaluation board
|
||||||
|
|
||||||
config MACH_EDB9315A
|
config MACH_EDB9315A
|
||||||
bool "Cirrus Logic EDB9315A"
|
bool "Cirrus Logic EDB9315A"
|
||||||
select EP93XX_SDCE0_PHYS_OFFSET
|
select EP93XX_SDCE0_PHYS_OFFSET
|
||||||
select MACH_HAS_LOWLEVEL_INIT
|
|
||||||
help
|
help
|
||||||
Say y here if you are using Cirrus Logic's EDB9315A Evaluation board
|
Say y here if you are using Cirrus Logic's EDB9315A Evaluation board
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
obj-y += clocksource.o gpio.o led.o header.o
|
obj-y += clocksource.o gpio.o led.o header.o
|
||||||
|
|
||||||
obj-$(CONFIG_MACH_DO_LOWLEVEL_INIT) += lowlevel_init.o
|
obj-y += lowlevel_init.o
|
||||||
pbl-$(CONFIG_MACH_DO_LOWLEVEL_INIT) += lowlevel_init.o led.o
|
pbl-y += lowlevel_init.o led.o
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <sizes.h>
|
||||||
#include <mach/ep93xx-regs.h>
|
#include <mach/ep93xx-regs.h>
|
||||||
#include <asm/barebox-arm-head.h>
|
#include <asm/barebox-arm-head.h>
|
||||||
|
|
||||||
|
@ -52,4 +53,12 @@ reset:
|
||||||
orr r0, r0, #0xc0000000
|
orr r0, r0, #0xc0000000
|
||||||
mcr p15, 0, r0, c1, c0, 0
|
mcr p15, 0, r0, c1, c0, 0
|
||||||
|
|
||||||
b board_init_lowlevel_return
|
/*
|
||||||
|
* FIXME: This is suitable for the edb9301, the
|
||||||
|
* only ep93xx board we have in our defconfigs.
|
||||||
|
* Other boards need different values here.
|
||||||
|
*/
|
||||||
|
mov r0, #0x05000000
|
||||||
|
mov r1, #SZ_8M
|
||||||
|
mov r2, #0
|
||||||
|
b barebox_arm_entry
|
||||||
|
|
Loading…
Reference in New Issue