Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@xxxxxxxxxxxx> --- arch/arm/mach-at91/Kconfig | 2 ++ arch/arm/mach-at91/Makefile | 1 + arch/arm/mach-at91/at91sam9n12_lowlevel_init.c | 26 ++++++++++++++++++++++++ 3 files changed, 29 insertions(+) create mode 100644 arch/arm/mach-at91/at91sam9n12_lowlevel_init.c diff --git a/arch/arm/mach-at91/Kconfig b/arch/arm/mach-at91/Kconfig index 21949e7..f4b8f9f 100644 --- a/arch/arm/mach-at91/Kconfig +++ b/arch/arm/mach-at91/Kconfig @@ -153,6 +153,8 @@ config SOC_AT91SAM9N12 select SOC_AT91SAM9 select HAVE_AT91_DBGU0 select AT91SAM9G45_RESET + select MACH_HAS_LOWLEVEL_INIT + select MACH_DO_LOWLEVEL_INIT help Select this if you are using Atmel's AT91SAM9N12 SoC. diff --git a/arch/arm/mach-at91/Makefile b/arch/arm/mach-at91/Makefile index a03398e..c4cbe36 100644 --- a/arch/arm/mach-at91/Makefile +++ b/arch/arm/mach-at91/Makefile @@ -9,6 +9,7 @@ lowlevel_init-$(CONFIG_SOC_AT91SAM9261) += at91sam9261_lowlevel_init.o lowlevel_init-$(CONFIG_SOC_AT91SAM9263) += at91sam9263_lowlevel_init.o lowlevel_init-$(CONFIG_SOC_AT91SAM9G45) += at91sam9g45_lowlevel_init.o lowlevel_init-$(CONFIG_SOC_AT91SAM9X5) += at91sam9x5_lowlevel_init.o +lowlevel_init-$(CONFIG_SOC_AT91SAM9N12) += at91sam9n12_lowlevel_init.o lowlevel_init-$(CONFIG_ARCH_AT91RM9200) = at91rm9200_lowlevel_init.o obj-y += $(lowlevel_init-y) diff --git a/arch/arm/mach-at91/at91sam9n12_lowlevel_init.c b/arch/arm/mach-at91/at91sam9n12_lowlevel_init.c new file mode 100644 index 0000000..6acbd06 --- /dev/null +++ b/arch/arm/mach-at91/at91sam9n12_lowlevel_init.c @@ -0,0 +1,26 @@ +/* + * Copyright (C) 2009-2013 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@xxxxxxxxxxxx> + * + * Under GPLv2 + */ + +#define __LOWLEVEL_INIT__ + +#include <common.h> +#include <asm/system.h> +#include <asm/barebox-arm.h> +#include <asm/barebox-arm-head.h> +#include <mach/hardware.h> +#include <mach/io.h> +#include <mach/at91sam9_ddrsdr.h> +#include <init.h> +#include <sizes.h> + +void __naked __bare_init reset(void) +{ + common_reset(); + + arm_setup_stack(AT91SAM9N12_SRAM_BASE + AT91SAM9N12_SRAM_SIZE - 16); + + barebox_arm_entry(AT91_CHIPSELECT_1, at91sam9n12_get_ddram_size(), 0); +} -- 1.7.10.4 _______________________________________________ barebox mailing list barebox@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/barebox