diff options
Diffstat (limited to 'arch/arm/boards/zii-imx8mq-dev/board.c')
-rw-r--r-- | arch/arm/boards/zii-imx8mq-dev/board.c | 26 |
1 files changed, 20 insertions, 6 deletions
diff --git a/arch/arm/boards/zii-imx8mq-dev/board.c b/arch/arm/boards/zii-imx8mq-dev/board.c index ac455990b0..3581c7251d 100644 --- a/arch/arm/boards/zii-imx8mq-dev/board.c +++ b/arch/arm/boards/zii-imx8mq-dev/board.c @@ -10,7 +10,7 @@ #include <init.h> #include <asm/memory.h> #include <linux/sizes.h> -#include <mach/bbu.h> +#include <mach/imx/bbu.h> #include "../zii-common/pn-fixup.h" #define LRU_FLAG_EGALAX BIT(0) @@ -26,16 +26,21 @@ static int zii_imx8mq_dev_init(void) if (!of_machine_is_compatible("zii,imx8mq-ultra")) return 0; - barebox_set_hostname("imx8mq-zii-rdu3"); + if (of_machine_is_compatible("zii,imx8mq-ultra-zest")) + barebox_set_hostname("zest"); + if (of_machine_is_compatible("zii,imx8mq-ultra-rmb3")) + barebox_set_hostname("rmb3"); - imx8mq_bbu_internal_mmcboot_register_handler("eMMC", "/dev/mmc0", - BBU_HANDLER_FLAG_DEFAULT); + imx8m_bbu_internal_mmcboot_register_handler("eMMC", "/dev/mmc0", + BBU_HANDLER_FLAG_DEFAULT); + imx8m_bbu_internal_mmc_register_handler("SD", "/dev/mmc1", 0); if (bootsource_get_instance() == 0) of_device_enable_path("/chosen/environment-emmc"); else of_device_enable_path("/chosen/environment-sd"); + defaultenv_append_directory(defaultenv_zii_common); defaultenv_append_directory(defaultenv_imx8mq_zii_dev); return 0; @@ -76,7 +81,7 @@ static int zii_imx8mq_dev_fixup_egalax_ts(struct device_node *root, void *ctx) static int zii_imx8mq_dev_fixup_deb_internal(void) { struct device_node *np, *aliases; - struct device_d *dev; + struct device *dev; /* * In the internal DT remove the complete FEC hierarchy and move the @@ -101,7 +106,7 @@ static int zii_imx8mq_dev_fixup_deb_internal(void) unregister_device(dev); - np = of_find_node_by_name(NULL, "i210@0"); + np = of_find_node_by_name_address(NULL, "i210@0"); if (!np) return -ENODEV; @@ -110,6 +115,15 @@ static int zii_imx8mq_dev_fixup_deb_internal(void) /* Refresh the internal aliases list from the patched DT */ of_alias_scan(); + /* + * Disable switch watchdog to make rave_reset_switch a no-op + */ + np = of_find_compatible_node(NULL, NULL, "zii,rave-wdt"); + if (!np) + return -ENODEV; + + of_device_disable(np); + return 0; } |