summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-rockchip/rk3288.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-rockchip/rk3288.c')
-rw-r--r--arch/arm/mach-rockchip/rk3288.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/arch/arm/mach-rockchip/rk3288.c b/arch/arm/mach-rockchip/rk3288.c
index 9076fd9227..3a43e911db 100644
--- a/arch/arm/mach-rockchip/rk3288.c
+++ b/arch/arm/mach-rockchip/rk3288.c
@@ -18,9 +18,10 @@
#include <restart.h>
#include <reset_source.h>
#include <bootsource.h>
-#include <mach/rk3288-regs.h>
-#include <mach/cru_rk3288.h>
-#include <mach/hardware.h>
+#include <mach/rockchip/rk3288-regs.h>
+#include <mach/rockchip/cru_rk3288.h>
+#include <mach/rockchip/hardware.h>
+#include <mach/rockchip/rockchip.h>
static void __noreturn rockchip_restart_soc(struct restart_handler *rst)
{
@@ -58,17 +59,6 @@ static void rk3288_detect_reset_reason(void)
}
}
-static int rk3288_init(void)
-{
- restart_handler_register_fn("soc", rockchip_restart_soc);
-
- if (IS_ENABLED(CONFIG_RESET_SOURCE))
- rk3288_detect_reset_reason();
-
- return 0;
-}
-postcore_initcall(rk3288_init);
-
/*
* ATM we are not able to determine the boot source.
* So let's handle the environment on eMMC, regardless which device
@@ -79,8 +69,7 @@ static int rk3288_env_init(void)
const char *envpath = "/chosen/environment-emmc";
int ret;
- bootsource_set(BOOTSOURCE_MMC);
- bootsource_set_instance(0);
+ bootsource_set_raw(BOOTSOURCE_MMC, 0);
ret = of_device_enable_path(envpath);
if (ret < 0)
@@ -89,4 +78,15 @@ static int rk3288_env_init(void)
return 0;
}
-device_initcall(rk3288_env_init);
+
+int rk3288_init(void)
+{
+ restart_handler_register_fn("soc", rockchip_restart_soc);
+
+ if (IS_ENABLED(CONFIG_RESET_SOURCE))
+ rk3288_detect_reset_reason();
+
+ rk3288_env_init();
+
+ return 0;
+}