diff --git a/arch/arm/boards/sama5d27-giantboard/lowlevel.c b/arch/arm/boards/sama5d27-giantboard/lowlevel.c index 3dada9b..ee8297f 100644 --- a/arch/arm/boards/sama5d27-giantboard/lowlevel.c +++ b/arch/arm/boards/sama5d27-giantboard/lowlevel.c @@ -5,22 +5,33 @@ #include #include - -#include #include #include +#include +#include #include #include -#include /* PCK = 492MHz, MCK = 164MHz */ #define MASTER_CLOCK 164000000 -static void dbgu_init(void) +SAMA5_ENTRY_FUNCTION(start_sama5d27_giantboard_xload_mmc, r4) { - sama5d2_resetup_uart_console(MASTER_CLOCK); + void __iomem *dbgu_base; + sama5d2_lowlevel_init(); + + dbgu_base = sama5d2_resetup_uart_console(MASTER_CLOCK); putc_ll('>'); + + relocate_to_current_adr(); + setup_c(); + + pbl_set_putc(at91_dbgu_putc, dbgu_base); + + sama5d2_udelay_init(MASTER_CLOCK); + sama5d2_d1g_ddrconf(); + sama5d2_sdhci_start_image(r4); } extern char __dtb_z_at91_sama5d27_giantboard_start[]; @@ -29,10 +40,7 @@ { void *fdt; - arm_cpu_lowlevel_init(); - - if (IS_ENABLED(CONFIG_DEBUG_LL)) - dbgu_init(); + putc_ll('>'); fdt = __dtb_z_at91_sama5d27_giantboard_start + get_runtime_offset(); diff --git a/images/Makefile.at91 b/images/Makefile.at91 index bc63357..00fa4ca 100644 --- a/images/Makefile.at91 +++ b/images/Makefile.at91 @@ -26,3 +26,8 @@ pblb-$(CONFIG_MACH_SAMA5D27_GIANTBOARD) += start_sama5d27_giantboard FILE_barebox-groboards-sama5d27-giantboard.img = start_sama5d27_giantboard.pblb image-$(CONFIG_MACH_SAMA5D27_GIANTBOARD) += barebox-groboards-sama5d27-giantboard.img + +pblb-$(CONFIG_MACH_SAMA5D27_GIANTBOARD) += start_sama5d27_giantboard_xload_mmc +FILE_barebox-groboards-sama5d27-giantboard-xload-mmc.img = start_sama5d27_giantboard_xload_mmc.pblb +MAX_PBL_IMAGE_SIZE_start_sama5d27_giantboard_xload_mmc = 0xffff +image-$(CONFIG_MACH_SAMA5D27_GIANTBOARD) += barebox-groboards-sama5d27-giantboard-xload-mmc.img