summaryrefslogtreecommitdiffstats
path: root/arch/arm/boards/rockchip-rk3568-bpi-r2pro/board.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/boards/rockchip-rk3568-bpi-r2pro/board.c')
-rw-r--r--arch/arm/boards/rockchip-rk3568-bpi-r2pro/board.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/arch/arm/boards/rockchip-rk3568-bpi-r2pro/board.c b/arch/arm/boards/rockchip-rk3568-bpi-r2pro/board.c
index e472f13c8b..94d1dac2c2 100644
--- a/arch/arm/boards/rockchip-rk3568-bpi-r2pro/board.c
+++ b/arch/arm/boards/rockchip-rk3568-bpi-r2pro/board.c
@@ -4,7 +4,7 @@
#include <common.h>
#include <init.h>
-#include <mach/bbu.h>
+#include <mach/rockchip/bbu.h>
#include <aiodev.h>
#include <bootsource.h>
#include <environment.h>
@@ -14,7 +14,7 @@
static bool machine_is_bpi_r2pro = false;
-static int rk3568_bpi_r2pro_probe(struct device_d *dev)
+static int rk3568_bpi_r2pro_probe(struct device *dev)
{
enum bootsource bootsource = bootsource_get();
int instance = bootsource_get_instance();
@@ -23,13 +23,14 @@ static int rk3568_bpi_r2pro_probe(struct device_d *dev)
barebox_set_hostname("bpi-r2pro");
machine_is_bpi_r2pro = 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");
- rk3568_bbu_mmc_register("sd", 0, "/dev/sd");
+ rk3568_bbu_mmc_register("sd", 0, "/dev/mmc0");
+ rk3568_bbu_mmc_register("emmc", BBU_HANDLER_FLAG_DEFAULT,
+ "/dev/mmc1");
return 0;
}
@@ -39,7 +40,7 @@ static const struct of_device_id rk3568_bpi_r2pro_of_match[] = {
{ /* Sentinel */},
};
-static struct driver_d rk3568_bpi_r2pro_board_driver = {
+static struct driver rk3568_bpi_r2pro_board_driver = {
.name = "board-rk3568-bpi-r2pro",
.probe = rk3568_bpi_r2pro_probe,
.of_compatible = rk3568_bpi_r2pro_of_match,