From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mail-lf0-x244.google.com ([2a00:1450:4010:c07::244]) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1eW3GG-0001xA-My for barebox@lists.infradead.org; Mon, 01 Jan 2018 16:48:33 +0000 Received: by mail-lf0-x244.google.com with SMTP id u84so33796913lff.7 for ; Mon, 01 Jan 2018 08:48:18 -0800 (PST) From: Sam Ravnborg Date: Mon, 1 Jan 2018 17:48:06 +0100 Message-Id: <20180101164808.32371-3-sam@ravnborg.org> In-Reply-To: <20171231083407.GA16645@ravnborg.org> References: <20171231083407.GA16645@ravnborg.org> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "barebox" Errors-To: barebox-bounces+u.kleine-koenig=pengutronix.de@lists.infradead.org Subject: [PATCH 14/25] tny-a926x: move reset vector to board code To: Barebox List Cc: Sam Ravnborg Create two files (one for each CPU type) that contains the reset vector. Signed-off-by: Sam Ravnborg --- arch/arm/boards/tny-a926x/Makefile | 4 ++++ arch/arm/boards/tny-a926x/tny_a9260_lowlevel.c | 26 ++++++++++++++++++++++++++ arch/arm/boards/tny-a926x/tny_a9263_lowlevel.c | 26 ++++++++++++++++++++++++++ arch/arm/mach-at91/Kconfig | 3 --- 4 files changed, 56 insertions(+), 3 deletions(-) create mode 100644 arch/arm/boards/tny-a926x/tny_a9260_lowlevel.c create mode 100644 arch/arm/boards/tny-a926x/tny_a9263_lowlevel.c diff --git a/arch/arm/boards/tny-a926x/Makefile b/arch/arm/boards/tny-a926x/Makefile index 49e0d4649..a96d02061 100644 --- a/arch/arm/boards/tny-a926x/Makefile +++ b/arch/arm/boards/tny-a926x/Makefile @@ -2,4 +2,8 @@ obj-y += init.o obj-$(CONFIG_AT91_BOOTSTRAP) += tny_a9263_bootstrap.o +lwl-$(CONFIG_MACH_TNY_A9260) += tny_a9260_lowlevel.o +lwl-$(CONFIG_MACH_TNY_A9G20) += tny_a9260_lowlevel.o +lwl-$(CONFIG_MACH_TNY_A9263) += tny_a9263_lowlevel.o + bbenv-$(CONFIG_DEFAULT_ENVIRONMENT_GENERIC) += defaultenv-tny-a926x diff --git a/arch/arm/boards/tny-a926x/tny_a9260_lowlevel.c b/arch/arm/boards/tny-a926x/tny_a9260_lowlevel.c new file mode 100644 index 000000000..02896856d --- /dev/null +++ b/arch/arm/boards/tny-a926x/tny_a9260_lowlevel.c @@ -0,0 +1,26 @@ +/* + * Copyright (C) 2009-2013 Jean-Christophe PLAGNIOL-VILLARD + * + * Under GPLv2 + */ + +#include +#include + +#include +#include + +#include +#include +#include + +void __naked __bare_init barebox_arm_reset_vector(void) +{ + arm_cpu_lowlevel_init(); + + arm_setup_stack(AT91SAM9260_SRAM_BASE + AT91SAM9260_SRAM_SIZE - 16); + + barebox_arm_entry(AT91_CHIPSELECT_1, + at91_get_sdram_size(IOMEM(AT91SAM9260_BASE_SDRAMC)), + NULL); +} diff --git a/arch/arm/boards/tny-a926x/tny_a9263_lowlevel.c b/arch/arm/boards/tny-a926x/tny_a9263_lowlevel.c new file mode 100644 index 000000000..3ba24ce4c --- /dev/null +++ b/arch/arm/boards/tny-a926x/tny_a9263_lowlevel.c @@ -0,0 +1,26 @@ +/* + * Copyright (C) 2009-2013 Jean-Christophe PLAGNIOL-VILLARD + * + * Under GPLv2 + */ + +#include +#include + +#include +#include + +#include +#include +#include + +void __naked __bare_init barebox_arm_reset_vector(void) +{ + arm_cpu_lowlevel_init(); + + arm_setup_stack(AT91SAM9263_SRAM0_BASE + AT91SAM9263_SRAM0_SIZE - 16); + + barebox_arm_entry(AT91_CHIPSELECT_1, + at91_get_sdram_size(IOMEM(AT91SAM9263_BASE_SDRAMC0)), + NULL); +} diff --git a/arch/arm/mach-at91/Kconfig b/arch/arm/mach-at91/Kconfig index 4dd608f0e..2410ff8a9 100644 --- a/arch/arm/mach-at91/Kconfig +++ b/arch/arm/mach-at91/Kconfig @@ -297,7 +297,6 @@ config MACH_QIL_A9260 config MACH_TNY_A9260 bool "CALAO TNY-A9260" select SUPPORT_CALAO_MOB_TNY_MD2 - select AT91SAM9260_LWL help Select this if you are using a Calao Systems TNY-A9260. @@ -387,7 +386,6 @@ config MACH_AT91SAM9G20EK config MACH_TNY_A9G20 select SUPPORT_CALAO_MOB_TNY_MD2 bool "CALAO TNY-A9G20" - select AT91SAM9260_LWL help Select this if you are using a Calao Systems TNY-A9G20. @@ -455,7 +453,6 @@ config MACH_TNY_A9263 bool "CALAO TNY-A9263" select SUPPORT_CALAO_MOB_TNY_MD2 select HAVE_AT91_BOOTSTRAP - select AT91SAM9263_LWL help Select this if you are using a Calao Systems TNY-A9263. -- 2.12.0 _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox