diff options
Diffstat (limited to 'arch/arm/boards/tny-a926x')
-rw-r--r-- | arch/arm/boards/tny-a926x/Makefile | 2 | ||||
-rw-r--r-- | arch/arm/boards/tny-a926x/init.c | 35 | ||||
-rw-r--r-- | arch/arm/boards/tny-a926x/tny_a9260_lowlevel.c | 21 | ||||
-rw-r--r-- | arch/arm/boards/tny-a926x/tny_a9263_bootstrap.c | 4 | ||||
-rw-r--r-- | arch/arm/boards/tny-a926x/tny_a9263_lowlevel.c | 10 |
5 files changed, 34 insertions, 38 deletions
diff --git a/arch/arm/boards/tny-a926x/Makefile b/arch/arm/boards/tny-a926x/Makefile index d400788757..1ebe527d60 100644 --- a/arch/arm/boards/tny-a926x/Makefile +++ b/arch/arm/boards/tny-a926x/Makefile @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: GPL-2.0-only + obj-y += init.o obj-$(CONFIG_AT91_BOOTSTRAP) += tny_a9263_bootstrap.o diff --git a/arch/arm/boards/tny-a926x/init.c b/arch/arm/boards/tny-a926x/init.c index dab373009f..0a448aa822 100644 --- a/arch/arm/boards/tny-a926x/init.c +++ b/arch/arm/boards/tny-a926x/init.c @@ -1,42 +1,29 @@ -/* - * Copyright (C) 2011 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * - */ +// SPDX-License-Identifier: GPL-2.0-or-later +// SPDX-FileCopyrightText: 2011 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> #include <common.h> #include <net.h> #include <init.h> #include <environment.h> #include <asm/armlinux.h> -#include <generated/mach-types.h> -#include <partition.h> +#include <asm/mach-types.h> #include <fs.h> #include <fcntl.h> #include <io.h> #include <envfs.h> -#include <mach/hardware.h> +#include <mach/at91/hardware.h> #include <nand.h> #include <linux/sizes.h> #include <linux/mtd/nand.h> +#include <linux/mtd/rawnand.h> #include <linux/clk.h> -#include <mach/board.h> -#include <mach/at91sam9_smc.h> -#include <mach/at91sam9_sdramc.h> +#include <mach/at91/board.h> +#include <mach/at91/at91sam9_smc.h> +#include <mach/at91/at91sam9_sdramc.h> #include <gpio.h> -#include <mach/iomux.h> -#include <mach/at91_pmc.h> -#include <mach/at91_rstc.h> +#include <mach/at91/iomux.h> +#include <mach/at91/at91_pmc.h> +#include <mach/at91/at91_rstc.h> #include <spi/eeprom.h> static void tny_a9260_set_board_type(void) diff --git a/arch/arm/boards/tny-a926x/tny_a9260_lowlevel.c b/arch/arm/boards/tny-a926x/tny_a9260_lowlevel.c index 7f52f824df..91bf68e798 100644 --- a/arch/arm/boards/tny-a926x/tny_a9260_lowlevel.c +++ b/arch/arm/boards/tny-a926x/tny_a9260_lowlevel.c @@ -7,14 +7,23 @@ #include <common.h> #include <init.h> -#include <asm/barebox-arm-head.h> -#include <asm/barebox-arm.h> +#include <mach/at91/barebox-arm.h> +#include <mach/at91/at91sam9_sdramc.h> +#include <mach/at91/at91sam9260.h> +#include <mach/at91/hardware.h> -#include <mach/at91sam9_sdramc.h> -#include <mach/at91sam9260.h> -#include <mach/hardware.h> +AT91_ENTRY_FUNCTION(start_tny_a9260, r0, r1, r2) +{ + arm_cpu_lowlevel_init(); + + arm_setup_stack(AT91SAM9260_SRAM_BASE + AT91SAM9260_SRAM_SIZE); + + barebox_arm_entry(AT91_CHIPSELECT_1, + at91_get_sdram_size(IOMEM(AT91SAM9260_BASE_SDRAMC)), + NULL); +} -void __naked __bare_init barebox_arm_reset_vector(uint32_t r0, uint32_t r1, uint32_t r2) +AT91_ENTRY_FUNCTION(start_tny_a9g20, r0, r1, r2) { arm_cpu_lowlevel_init(); diff --git a/arch/arm/boards/tny-a926x/tny_a9263_bootstrap.c b/arch/arm/boards/tny-a926x/tny_a9263_bootstrap.c index 368c67744f..5739b0f2da 100644 --- a/arch/arm/boards/tny-a926x/tny_a9263_bootstrap.c +++ b/arch/arm/boards/tny-a926x/tny_a9263_bootstrap.c @@ -6,11 +6,11 @@ #include <common.h> #include <bootstrap.h> -#include <mach/bootstrap.h> +#include <mach/at91/bootstrap.h> #ifdef CONFIG_MTD_DATAFLASH void * bootstrap_board_read_dataflash(void) { - return bootstrap_read_devfs("dataflash0", false, 0xffc0, 204864, 204864); + return bootstrap_read_devfs("dataflash0", false, 0xffc0, 204864, 204864, NULL); } #endif diff --git a/arch/arm/boards/tny-a926x/tny_a9263_lowlevel.c b/arch/arm/boards/tny-a926x/tny_a9263_lowlevel.c index 565ba438d2..d20ffe9c71 100644 --- a/arch/arm/boards/tny-a926x/tny_a9263_lowlevel.c +++ b/arch/arm/boards/tny-a926x/tny_a9263_lowlevel.c @@ -7,11 +7,9 @@ #include <common.h> #include <init.h> -#include <asm/barebox-arm-head.h> -#include <asm/barebox-arm.h> - -#include <mach/at91sam926x_board_init.h> -#include <mach/at91sam9263_matrix.h> +#include <mach/at91/barebox-arm.h> +#include <mach/at91/at91sam926x_board_init.h> +#include <mach/at91/at91sam9263_matrix.h> #define MASTER_CLOCK 180 @@ -118,7 +116,7 @@ static void __bare_init tny_a9263_init(void) NULL); } -void __naked __bare_init barebox_arm_reset_vector(uint32_t r0, uint32_t r1, uint32_t r2) +AT91_ENTRY_FUNCTION(start_tny_a9263, r0, r1, r2) { arm_cpu_lowlevel_init(); |