diff options
Diffstat (limited to 'arch/arm/boards/karo-tx28')
-rw-r--r-- | arch/arm/boards/karo-tx28/Makefile | 2 | ||||
-rw-r--r-- | arch/arm/boards/karo-tx28/lowlevel.c | 25 | ||||
-rw-r--r-- | arch/arm/boards/karo-tx28/tx28-stk5.c | 34 | ||||
-rw-r--r-- | arch/arm/boards/karo-tx28/tx28.c | 27 | ||||
-rw-r--r-- | arch/arm/boards/karo-tx28/tx28.h | 4 |
5 files changed, 45 insertions, 47 deletions
diff --git a/arch/arm/boards/karo-tx28/Makefile b/arch/arm/boards/karo-tx28/Makefile index c7d7398cf3..b13ffc8f3c 100644 --- a/arch/arm/boards/karo-tx28/Makefile +++ b/arch/arm/boards/karo-tx28/Makefile @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: GPL-2.0-only + obj-y += tx28.o obj-$(CONFIG_MACH_TX28STK5) += tx28-stk5.o lwl-y += lowlevel.o diff --git a/arch/arm/boards/karo-tx28/lowlevel.c b/arch/arm/boards/karo-tx28/lowlevel.c index 84cc681816..3be5f521e1 100644 --- a/arch/arm/boards/karo-tx28/lowlevel.c +++ b/arch/arm/boards/karo-tx28/lowlevel.c @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: GPL-2.0-only + #define pr_fmt(fmt) "KARO TX28: " fmt #define DEBUG @@ -5,17 +7,30 @@ #include <linux/sizes.h> #include <asm/barebox-arm-head.h> #include <asm/barebox-arm.h> -#include <mach/imx28-regs.h> -#include <mach/init.h> +#include <mach/mxs/imx28-regs.h> +#include <mach/mxs/init.h> #include <io.h> #include <debug_ll.h> -#include <mach/iomux.h> +#include <mach/mxs/iomux.h> #include <stmp-device.h> -#include <generated/mach-types.h> +#include <asm/mach-types.h> + +static noinline void continue_imx_entry(size_t size) +{ + static struct barebox_arm_boarddata boarddata = { + .magic = BAREBOX_ARM_BOARDDATA_MAGIC, + .machine = MACH_TYPE_TX28, + }; + + barebox_arm_entry(IMX_MEMORY_BASE, size, &boarddata); +} ENTRY_FUNCTION(start_barebox_karo_tx28, r0, r1, r2) { - barebox_arm_entry(IMX_MEMORY_BASE, SZ_128M, (void *)MACH_TYPE_TX28); + relocate_to_current_adr(); + setup_c(); + + continue_imx_entry(SZ_128M); } static const uint32_t iomux_pads[] = { diff --git a/arch/arm/boards/karo-tx28/tx28-stk5.c b/arch/arm/boards/karo-tx28/tx28-stk5.c index 8628db2b25..d1fd526c00 100644 --- a/arch/arm/boards/karo-tx28/tx28-stk5.c +++ b/arch/arm/boards/karo-tx28/tx28-stk5.c @@ -1,16 +1,5 @@ -/* - * Copyright (C) 2010 Juergen Beisert, Pengutronix <kernel@pengutronix.de> - * - * 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: 2010 Juergen Beisert <kernel@pengutronix.de>, Pengutronix #include <common.h> #include <init.h> @@ -25,13 +14,14 @@ #include <asm/sections.h> #include <asm/barebox-arm.h> #include <linux/err.h> -#include <mach/imx-regs.h> -#include <mach/clock.h> -#include <mach/mci.h> -#include <mach/fb.h> -#include <mach/ocotp.h> -#include <mach/iomux.h> -#include <generated/mach-types.h> +#include <mach/mxs/imx-regs.h> +#include <mach/mxs/mci.h> +#include <mach/mxs/fb.h> +#include <mach/mxs/ocotp.h> +#include <mach/mxs/iomux.h> +#include <asm/mach-types.h> + +#include "tx28.h" static struct mxs_mci_platform_data mci_pdata = { .caps = MMC_CAP_4_BIT_DATA, @@ -344,9 +334,7 @@ static int register_persistent_environment(void) /* use the full partition as our persistent environment storage */ cdev = devfs_add_partition("disk0.1", 0, cdev->size, DEVFS_PARTITION_FIXED, "env0"); - if (IS_ERR(cdev)) - return PTR_ERR(cdev); - return 0; + return PTR_ERR_OR_ZERO(cdev); } static void tx28_get_ethaddr(void) diff --git a/arch/arm/boards/karo-tx28/tx28.c b/arch/arm/boards/karo-tx28/tx28.c index d99083b190..ef3c42b5f6 100644 --- a/arch/arm/boards/karo-tx28/tx28.c +++ b/arch/arm/boards/karo-tx28/tx28.c @@ -1,16 +1,5 @@ -/* - * Copyright (C) 2010 Juergen Beisert, Pengutronix <kernel@pengutronix.de> - * - * 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: 2010 Juergen Beisert <kernel@pengutronix.de>, Pengutronix #include <common.h> #include <init.h> @@ -20,12 +9,14 @@ #include <asm/armlinux.h> #include <asm/barebox-arm.h> #include <io.h> -#include <generated/mach-types.h> -#include <mach/imx-regs.h> -#include <mach/devices.h> -#include <mach/iomux.h> +#include <asm/mach-types.h> +#include <mach/mxs/imx-regs.h> +#include <mach/mxs/devices.h> +#include <mach/mxs/iomux.h> #include <asm/mmu.h> +#include "tx28.h" + /* setup the CPU card internal signals */ static const uint32_t tx28_pad_setup[] = { /* NAND interface */ @@ -72,8 +63,6 @@ static const uint32_t tx28_pad_setup[] = { }; -extern void base_board_init(void); - static int tx28_devices_init(void) { int i; diff --git a/arch/arm/boards/karo-tx28/tx28.h b/arch/arm/boards/karo-tx28/tx28.h new file mode 100644 index 0000000000..2e14211b7a --- /dev/null +++ b/arch/arm/boards/karo-tx28/tx28.h @@ -0,0 +1,4 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ + +void base_board_init(void); + |