ARM: tqma53: Add barebox_update support
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
parent
d238e3ace5
commit
68d6b605b6
|
@ -20,10 +20,12 @@
|
|||
|
||||
#include <asm/armlinux.h>
|
||||
#include <generated/mach-types.h>
|
||||
#include <mach/bbu.h>
|
||||
|
||||
static int tqma53_devices_init(void)
|
||||
{
|
||||
char *of_env_path = "/chosen/environment-emmc";
|
||||
char *of_env_path;
|
||||
unsigned bbu_flag_emmc = 0, bbu_flag_sd = 0;
|
||||
|
||||
if (!of_machine_is_compatible("tq,tqma53"))
|
||||
return 0;
|
||||
|
@ -32,8 +34,16 @@ static int tqma53_devices_init(void)
|
|||
barebox_set_hostname("tqma53");
|
||||
|
||||
if (bootsource_get() == BOOTSOURCE_MMC &&
|
||||
bootsource_get_instance() == 1)
|
||||
bootsource_get_instance() == 1) {
|
||||
of_env_path = "/chosen/environment-sd";
|
||||
bbu_flag_sd = BBU_HANDLER_FLAG_DEFAULT;
|
||||
} else {
|
||||
of_env_path = "/chosen/environment-emmc";
|
||||
bbu_flag_emmc = BBU_HANDLER_FLAG_DEFAULT;
|
||||
}
|
||||
|
||||
imx53_bbu_internal_mmc_register_handler("sd", "/dev/mmc1", bbu_flag_sd);
|
||||
imx53_bbu_internal_mmc_register_handler("emmc", "/dev/mmc2", bbu_flag_emmc);
|
||||
|
||||
of_device_enable_path(of_env_path);
|
||||
|
||||
|
|
Loading…
Reference in New Issue