diff options
Diffstat (limited to 'arch/arm/boards/freescale-mx23-evk')
-rw-r--r-- | arch/arm/boards/freescale-mx23-evk/Makefile | 3 | ||||
-rw-r--r-- | arch/arm/boards/freescale-mx23-evk/lowlevel.c | 22 | ||||
-rw-r--r-- | arch/arm/boards/freescale-mx23-evk/mx23-evk.c | 35 |
3 files changed, 31 insertions, 29 deletions
diff --git a/arch/arm/boards/freescale-mx23-evk/Makefile b/arch/arm/boards/freescale-mx23-evk/Makefile index 3e0026252c..7723ad93b0 100644 --- a/arch/arm/boards/freescale-mx23-evk/Makefile +++ b/arch/arm/boards/freescale-mx23-evk/Makefile @@ -1,3 +1,4 @@ -# +# SPDX-License-Identifier: GPL-2.0-only + obj-y := mx23-evk.o lwl-y += lowlevel.o diff --git a/arch/arm/boards/freescale-mx23-evk/lowlevel.c b/arch/arm/boards/freescale-mx23-evk/lowlevel.c index 99e08d88c7..195ade3a7f 100644 --- a/arch/arm/boards/freescale-mx23-evk/lowlevel.c +++ b/arch/arm/boards/freescale-mx23-evk/lowlevel.c @@ -1,12 +1,28 @@ +// SPDX-License-Identifier: GPL-2.0-only + #include <common.h> #include <linux/sizes.h> -#include <generated/mach-types.h> +#include <asm/mach-types.h> #include <asm/barebox-arm-head.h> #include <asm/barebox-arm.h> -#include <mach/imx23-regs.h> +#include <mach/mxs/imx23-regs.h> + +static noinline void continue_imx_entry(size_t size) +{ + static struct barebox_arm_boarddata boarddata = { + .magic = BAREBOX_ARM_BOARDDATA_MAGIC, + .machine = MACH_TYPE_MX23EVK, + }; + + barebox_arm_entry(IMX_MEMORY_BASE, size, &boarddata); +} ENTRY_FUNCTION(start_imx23_evk, r0, r1, r2) { arm_cpu_lowlevel_init(); - barebox_arm_entry(IMX_MEMORY_BASE, SZ_32M, (void *)MACH_TYPE_MX23EVK); + + relocate_to_current_adr(); + setup_c(); + + continue_imx_entry(SZ_32M); } diff --git a/arch/arm/boards/freescale-mx23-evk/mx23-evk.c b/arch/arm/boards/freescale-mx23-evk/mx23-evk.c index 75a7d5a6b4..d4de99eafb 100644 --- a/arch/arm/boards/freescale-mx23-evk/mx23-evk.c +++ b/arch/arm/boards/freescale-mx23-evk/mx23-evk.c @@ -1,18 +1,6 @@ -/* - * (C) Copyright 2010 Juergen Beisert - Pengutronix - * (C) Copyright 2011 Wolfram Sang - Pengutronix - * - * 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, Pengutronix +// SPDX-FileCopyrightText: 2011 Wolfram Sang, Pengutronix #include <common.h> #include <init.h> @@ -21,14 +9,13 @@ #include <mci.h> #include <linux/err.h> #include <asm/armlinux.h> -#include <generated/mach-types.h> +#include <asm/mach-types.h> #include <asm/barebox-arm.h> -#include <mach/imx-regs.h> -#include <mach/clock.h> -#include <mach/mci.h> -#include <usb/fsl_usb2.h> -#include <mach/usb.h> -#include <mach/iomux.h> +#include <mach/mxs/imx-regs.h> +#include <mach/mxs/mci.h> +#include <linux/usb/fsl_usb2.h> +#include <mach/mxs/usb.h> +#include <mach/mxs/iomux.h> static struct mxs_mci_platform_data mci_pdata = { .caps = MMC_CAP_4_BIT_DATA | MMC_CAP_SD_HIGHSPEED | MMC_CAP_MMC_HIGHSPEED, @@ -91,9 +78,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 int mx23_evk_devices_init(void) |