summaryrefslogtreecommitdiffstats
path: root/arch/arm/boards/rockchip-rk3568-evb/board.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/boards/rockchip-rk3568-evb/board.c')
-rw-r--r--arch/arm/boards/rockchip-rk3568-evb/board.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/arch/arm/boards/rockchip-rk3568-evb/board.c b/arch/arm/boards/rockchip-rk3568-evb/board.c
index 9cd84d7fb9..f404af217b 100644
--- a/arch/arm/boards/rockchip-rk3568-evb/board.c
+++ b/arch/arm/boards/rockchip-rk3568-evb/board.c
@@ -4,16 +4,17 @@
#include <common.h>
#include <init.h>
-#include <mach/bbu.h>
+#include <mach/rockchip/bbu.h>
#include <aiodev.h>
#include <bootsource.h>
#include <environment.h>
#include <globalvar.h>
#include <magicvar.h>
+#include <deep-probe.h>
static bool machine_is_rk3568_evb = false;
-static int rk3568_evb_probe(struct device_d *dev)
+static int rk3568_evb_probe(struct device *dev)
{
enum bootsource bootsource = bootsource_get();
int instance = bootsource_get_instance();
@@ -22,13 +23,14 @@ static int rk3568_evb_probe(struct device_d *dev)
barebox_set_hostname("rk3568-evb");
machine_is_rk3568_evb = true;
- if (bootsource == BOOTSOURCE_MMC && instance == 1)
+ if (bootsource == BOOTSOURCE_MMC && instance == 0)
of_device_enable_path("/chosen/environment-sd");
else
of_device_enable_path("/chosen/environment-emmc");
- rk3568_bbu_mmc_register("emmc", BBU_HANDLER_FLAG_DEFAULT, "/dev/emmc.barebox");
- rk3568_bbu_mmc_register("sd", 0, "/dev/sd.barebox");
+ rk3568_bbu_mmc_register("sd", 0, "/dev/mmc0");
+ rk3568_bbu_mmc_register("emmc", BBU_HANDLER_FLAG_DEFAULT,
+ "/dev/mmc1");
return 0;
}
@@ -38,13 +40,15 @@ static const struct of_device_id rk3568_evb_of_match[] = {
{ /* Sentinel */},
};
-static struct driver_d rk3568_evb_board_driver = {
+static struct driver rk3568_evb_board_driver = {
.name = "board-rk3568-evb",
.probe = rk3568_evb_probe,
.of_compatible = rk3568_evb_of_match,
};
coredevice_platform_driver(rk3568_evb_board_driver);
+BAREBOX_DEEP_PROBE_ENABLE(rk3568_evb_of_match);
+
static int rk3568_evb_detect_hwid(void)
{
int ret;
@@ -90,7 +94,7 @@ static int rk3568_evb_detect_hwid(void)
return 0;
err_hwid:
- pr_err("couldn't retrieve hardware ID");
+ pr_err("couldn't retrieve hardware ID\n");
return ret;
}
late_initcall(rk3568_evb_detect_hwid);