diff options
Diffstat (limited to 'arch/arm/mach-rockchip/rk3568.c')
-rw-r--r-- | arch/arm/mach-rockchip/rk3568.c | 38 |
1 files changed, 6 insertions, 32 deletions
diff --git a/arch/arm/mach-rockchip/rk3568.c b/arch/arm/mach-rockchip/rk3568.c index 234c6d22d1..75b0824479 100644 --- a/arch/arm/mach-rockchip/rk3568.c +++ b/arch/arm/mach-rockchip/rk3568.c @@ -2,8 +2,9 @@ #include <common.h> #include <io.h> #include <bootsource.h> -#include <mach/rk3568-regs.h> -#include <mach/rockchip.h> +#include <mach/rockchip/bootrom.h> +#include <mach/rockchip/rk3568-regs.h> +#include <mach/rockchip/rockchip.h> #define GRF_BASE 0xfdc60000 #define GRF_GPIO1B_DS_2 0x218 @@ -92,6 +93,8 @@ static void qos_priority_init(void) void rk3568_lowlevel_init(void) { + arm_cpu_lowlevel_init(); + /* * When perform idle operation, corresponding clock can * be opened or gated automatically. @@ -137,38 +140,9 @@ void rk3568_lowlevel_init(void) qos_priority_init(); } -struct rk_bootsource { - enum bootsource src; - int instance; -}; - -static struct rk_bootsource bootdev_map[] = { - [0x1] = { .src = BOOTSOURCE_NAND, .instance = 0 }, - [0x2] = { .src = BOOTSOURCE_MMC, .instance = 0 }, - [0x3] = { .src = BOOTSOURCE_SPI_NOR, .instance = 0 }, - [0x4] = { .src = BOOTSOURCE_SPI_NAND, .instance = 0 }, - [0x5] = { .src = BOOTSOURCE_MMC, .instance = 1 }, - [0xa] = { .src = BOOTSOURCE_USB, .instance = 0 }, -}; - -static enum bootsource rk3568_bootsource(void) -{ - u32 v; - - v = readl(RK3568_IRAM_BASE + 0x10); - - if (v >= ARRAY_SIZE(bootdev_map)) - return BOOTSOURCE_UNKNOWN; - - bootsource_set(bootdev_map[v].src); - bootsource_set_instance(bootdev_map[v].instance); - - return bootdev_map[v].src; -} - int rk3568_init(void) { - rk3568_bootsource(); + rockchip_parse_bootrom_iram(rockchip_scratch_space()); return 0; } |