* [PATCH 1/2] ARM: i.MX6ull: Add SoC specific lowlevel_init function @ 2017-09-27 12:16 Sascha Hauer 2017-09-27 12:16 ` [PATCH 2/2] i.MX6ull evk support Sascha Hauer 2017-09-28 9:09 ` [PATCH 1/2] ARM: i.MX6ull: Add SoC specific lowlevel_init function Lucas Stach 0 siblings, 2 replies; 8+ messages in thread From: Sascha Hauer @ 2017-09-27 12:16 UTC (permalink / raw) To: Barebox List On i.MX6ull (Cortex A7) We have to set the SMP bit before enabling the caches, otherwise they won't work. Add a SoC specific lowlevel_init function to be called by the i.MX6ull boards. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> --- arch/arm/mach-imx/cpu_init.c | 12 ++++++++++++ arch/arm/mach-imx/include/mach/generic.h | 1 + 2 files changed, 13 insertions(+) diff --git a/arch/arm/mach-imx/cpu_init.c b/arch/arm/mach-imx/cpu_init.c index 2b388cad8c..8f6d4b7902 100644 --- a/arch/arm/mach-imx/cpu_init.c +++ b/arch/arm/mach-imx/cpu_init.c @@ -14,6 +14,7 @@ #include <asm/barebox-arm-head.h> #include <asm/errata.h> +#include <linux/types.h> void imx5_cpu_lowlevel_init(void) { @@ -34,6 +35,17 @@ void imx6_cpu_lowlevel_init(void) enable_arm_errata_845369_war(); } +void imx6ull_cpu_lowlevel_init(void) +{ + u32 val; + + asm volatile ("mrc p15, 0, %0, c1, c0, 1\n" : "=r"(val)); + val |= (1 << 6); + asm volatile("mcr p15, 0, %0, c1, c0, 1" : : "r" (val)); + + arm_cpu_lowlevel_init(); +} + void imx7_cpu_lowlevel_init(void) { arm_cpu_lowlevel_init(); diff --git a/arch/arm/mach-imx/include/mach/generic.h b/arch/arm/mach-imx/include/mach/generic.h index 73be9ceb55..eb8c7a5b7b 100644 --- a/arch/arm/mach-imx/include/mach/generic.h +++ b/arch/arm/mach-imx/include/mach/generic.h @@ -48,6 +48,7 @@ int imx6_devices_init(void); void imx5_cpu_lowlevel_init(void); void imx6_cpu_lowlevel_init(void); +void imx6ull_cpu_lowlevel_init(void); void imx7_cpu_lowlevel_init(void); void vf610_cpu_lowlevel_init(void); -- 2.11.0 _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox ^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 2/2] i.MX6ull evk support 2017-09-27 12:16 [PATCH 1/2] ARM: i.MX6ull: Add SoC specific lowlevel_init function Sascha Hauer @ 2017-09-27 12:16 ` Sascha Hauer 2017-09-28 9:16 ` Lucas Stach 2017-09-28 9:09 ` [PATCH 1/2] ARM: i.MX6ull: Add SoC specific lowlevel_init function Lucas Stach 1 sibling, 1 reply; 8+ messages in thread From: Sascha Hauer @ 2017-09-27 12:16 UTC (permalink / raw) To: Barebox List The i.MX6ull-EVK is a evaluation board for the i.MX6ull from NXP. The upstream DTS is used, support should be fairly complete: - 2x fec ethernet - 1x USB Host - 1x USB OTG - 2x SD Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> --- arch/arm/boards/Makefile | 1 + arch/arm/boards/nxp-imx6ull-evk/Makefile | 2 + arch/arm/boards/nxp-imx6ull-evk/board.c | 61 +++++++++++++++++ .../flash-header-nxp-imx6ull-evk.imxcfg | 77 ++++++++++++++++++++++ arch/arm/boards/nxp-imx6ull-evk/lowlevel.c | 75 +++++++++++++++++++++ arch/arm/dts/Makefile | 1 + arch/arm/dts/imx6ull-14x14-evk.dts | 29 ++++++++ arch/arm/mach-imx/Kconfig | 8 +++ arch/arm/mach-imx/include/mach/imx6-regs.h | 1 + images/Makefile.imx | 5 ++ 10 files changed, 260 insertions(+) create mode 100644 arch/arm/boards/nxp-imx6ull-evk/Makefile create mode 100644 arch/arm/boards/nxp-imx6ull-evk/board.c create mode 100644 arch/arm/boards/nxp-imx6ull-evk/flash-header-nxp-imx6ull-evk.imxcfg create mode 100644 arch/arm/boards/nxp-imx6ull-evk/lowlevel.c create mode 100644 arch/arm/dts/imx6ull-14x14-evk.dts diff --git a/arch/arm/boards/Makefile b/arch/arm/boards/Makefile index d6011adb28..456e6fea4b 100644 --- a/arch/arm/boards/Makefile +++ b/arch/arm/boards/Makefile @@ -78,6 +78,7 @@ obj-$(CONFIG_MACH_NOMADIK_8815NHK) += nhk8815/ obj-$(CONFIG_MACH_NVIDIA_BEAVER) += nvidia-beaver/ obj-$(CONFIG_MACH_NVIDIA_JETSON) += nvidia-jetson-tk1/ obj-$(CONFIG_MACH_NXDB500) += netx/ +obj-$(CONFIG_MACH_NXP_IMX6ULL_EVK) += nxp-imx6ull-evk/ obj-$(CONFIG_MACH_OMAP343xSDP) += omap343xdsp/ obj-$(CONFIG_MACH_OMAP3EVM) += omap3evm/ obj-$(CONFIG_MACH_PANDA) += panda/ diff --git a/arch/arm/boards/nxp-imx6ull-evk/Makefile b/arch/arm/boards/nxp-imx6ull-evk/Makefile new file mode 100644 index 0000000000..01c7a259e9 --- /dev/null +++ b/arch/arm/boards/nxp-imx6ull-evk/Makefile @@ -0,0 +1,2 @@ +obj-y += board.o +lwl-y += lowlevel.o diff --git a/arch/arm/boards/nxp-imx6ull-evk/board.c b/arch/arm/boards/nxp-imx6ull-evk/board.c new file mode 100644 index 0000000000..77e76ce024 --- /dev/null +++ b/arch/arm/boards/nxp-imx6ull-evk/board.c @@ -0,0 +1,61 @@ +/* + * Copyright (C) 2017 Michael Grzeschik, 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. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation. + * + */ + +#include <asm/armlinux.h> +#include <asm/io.h> +#include <bootsource.h> +#include <common.h> +#include <environment.h> +#include <envfs.h> +#include <gpio.h> +#include <init.h> +#include <mach/generic.h> +#include <mach/imx6-regs.h> +#include <mach/imx6.h> +#include <mach/bbu.h> +#include <linux/sizes.h> +#include <linux/phy.h> +#include <mfd/imx6q-iomuxc-gpr.h> + +#include <linux/micrel_phy.h> + +static int ksz8081_phy_fixup(struct phy_device *dev) +{ + phy_write(dev, 0x1f, 0x8190); + phy_write(dev, 0x16, 0x202); + + return 0; +} + +static int nxp_imx6ull_evk_init(void) +{ + if (!of_machine_is_compatible("fsl,imx6ull-14x14-evk")) + return 0; + + phy_register_fixup_for_uid(PHY_ID_KSZ8081, MICREL_PHY_ID_MASK, + ksz8081_phy_fixup); + + imx6_bbu_internal_mmc_register_handler("mmc", "/dev/mmc1.barebox", + BBU_HANDLER_FLAG_DEFAULT); + + barebox_set_hostname("imx6ull-evk"); + + return 0; +} +device_initcall(nxp_imx6ull_evk_init); diff --git a/arch/arm/boards/nxp-imx6ull-evk/flash-header-nxp-imx6ull-evk.imxcfg b/arch/arm/boards/nxp-imx6ull-evk/flash-header-nxp-imx6ull-evk.imxcfg new file mode 100644 index 0000000000..53270d0dc3 --- /dev/null +++ b/arch/arm/boards/nxp-imx6ull-evk/flash-header-nxp-imx6ull-evk.imxcfg @@ -0,0 +1,77 @@ +/* + * Copyright (C) 2016 Freescale Semiconductor, Inc. + * + * SPDX-License-Identifier: GPL-2.0+ + * + * Refer doc/README.imximage for more details about how-to configure + * and create imximage boot image + * + * The syntax is taken as close as possible with the kwbimage + */ + +loadaddr 0x80000000 +soc imx6 +dcdofs 0x400 + +/* Enable all clocks */ +wm 32 0x020c4068 0xffffffff +wm 32 0x020c406c 0xffffffff +wm 32 0x020c4070 0xffffffff +wm 32 0x020c4074 0xffffffff +wm 32 0x020c4078 0xffffffff +wm 32 0x020c407c 0xffffffff +wm 32 0x020c4080 0xffffffff + +wm 32 0x020e04b4 0x000c0000 +wm 32 0x020e04ac 0x00000000 +wm 32 0x020e027c 0x00000030 +wm 32 0x020e0250 0x00000030 +wm 32 0x020e024c 0x00000030 +wm 32 0x020e0490 0x00000030 +wm 32 0x020e0288 0x000c0030 +wm 32 0x020e0270 0x00000000 +wm 32 0x020e0260 0x00000030 +wm 32 0x020e0264 0x00000030 +wm 32 0x020e04a0 0x00000030 +wm 32 0x020e0494 0x00020000 +wm 32 0x020e0280 0x00000030 +wm 32 0x020e0284 0x00000030 +wm 32 0x020e04b0 0x00020000 +wm 32 0x020e0498 0x00000030 +wm 32 0x020e04a4 0x00000030 +wm 32 0x020e0244 0x00000030 +wm 32 0x020e0248 0x00000030 +wm 32 0x021b001c 0x00008000 +wm 32 0x021b0800 0xa1390003 +wm 32 0x021b080c 0x00000004 +wm 32 0x021b083c 0x41640158 +wm 32 0x021b0848 0x40403237 +wm 32 0x021b0850 0x40403c33 +wm 32 0x021b081c 0x33333333 +wm 32 0x021b0820 0x33333333 +wm 32 0x021b082c 0xf3333333 +wm 32 0x021b0830 0xf3333333 +wm 32 0x021b08c0 0x00944009 +wm 32 0x021b08b8 0x00000800 +wm 32 0x021b0004 0x0002002d +wm 32 0x021b0008 0x1b333030 +wm 32 0x021b000c 0x676b52f3 +wm 32 0x021b0010 0xb66d0b63 +wm 32 0x021b0014 0x01ff00db +wm 32 0x021b0018 0x00201740 +wm 32 0x021b001c 0x00008000 +wm 32 0x021b002c 0x000026d2 +wm 32 0x021b0030 0x006b1023 +wm 32 0x021b0040 0x0000004f +wm 32 0x021b0000 0x84180000 +wm 32 0x021b0890 0x00400000 +wm 32 0x021b001c 0x02008032 +wm 32 0x021b001c 0x00008033 +wm 32 0x021b001c 0x00048031 +wm 32 0x021b001c 0x15208030 +wm 32 0x021b001c 0x04008040 +wm 32 0x021b0020 0x00000800 +wm 32 0x021b0818 0x00000227 +wm 32 0x021b0004 0x0002552d +wm 32 0x021b0404 0x00011006 +wm 32 0x021b001c 0x00000000 diff --git a/arch/arm/boards/nxp-imx6ull-evk/lowlevel.c b/arch/arm/boards/nxp-imx6ull-evk/lowlevel.c new file mode 100644 index 0000000000..bb0906560c --- /dev/null +++ b/arch/arm/boards/nxp-imx6ull-evk/lowlevel.c @@ -0,0 +1,75 @@ +/* + * 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; version 2. + * + * 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. + */ + +#include <common.h> +#include <linux/sizes.h> +#include <mach/generic.h> +#include <asm/barebox-arm-head.h> +#include <asm/barebox-arm.h> +#include <mach/imx6-regs.h> +#include <io.h> +#include <debug_ll.h> +#include <mach/esdctl.h> +#include <asm/cache.h> +#include <asm/sections.h> +#include <image-metadata.h> + +static inline void setup_uart(void) +{ + void __iomem *iomuxbase = IOMEM(MX6_IOMUXC_BASE_ADDR); + void __iomem *uart = IOMEM(MX6_UART1_BASE_ADDR); + + imx6_ungate_all_peripherals(); + + writel(0x0, iomuxbase + 0x84); + writel(0x1b0b1, iomuxbase + 0x0310); + + writel(0x0, iomuxbase + 0x88); + writel(0x1b0b0, iomuxbase + 0x0314); + + writel(0x3, iomuxbase + 0x624); + + imx6_uart_setup(uart); + + pbl_set_putc(imx_uart_putc, uart); + + putc_ll('>'); +} + +extern char __dtb_imx6ull_14x14_evk_start[]; + +static noinline void nxp_imx6_ull(void) +{ + imx6ul_barebox_entry(__dtb_imx6ull_14x14_evk_start); +} + +ENTRY_FUNCTION(start_nxp_imx6ull_evk, r0, r1, r2) +{ + + imx6ull_cpu_lowlevel_init(); + + arm_setup_stack(0x00910000 - 8); + + arm_early_mmu_cache_invalidate(); + + relocate_to_current_adr(); + setup_c(); + barrier(); + + setup_uart(); + + /* disable all watchdog powerdown counters */ + writew(0x0, IOMEM(MX6_WDOG1_BASE_ADDR + 0x8)); + writew(0x0, IOMEM(MX6_WDOG2_BASE_ADDR + 0x8)); + writew(0x0, IOMEM(MX6ULL_WDOG3_BASE_ADDR + 0x8)); + + nxp_imx6_ull(); +} diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile index cf9d8ea940..33b2fff0f7 100644 --- a/arch/arm/dts/Makefile +++ b/arch/arm/dts/Makefile @@ -80,6 +80,7 @@ pbl-dtb-$(CONFIG_MACH_SOLIDRUN_MICROSOM) += imx6dl-hummingboard.dtb.o imx6q-humm imx6q-h100.dtb.o pbl-dtb-$(CONFIG_MACH_TECHNEXION_WANDBOARD) += imx6q-wandboard.dtb.o imx6dl-wandboard.dtb.o pbl-dtb-$(CONFIG_MACH_TECHNEXION_PICO_HOBBIT) += imx6ul-pico-hobbit.dtb.o +pbl-dtb-$(CONFIG_MACH_NXP_IMX6ULL_EVK) += imx6ull-14x14-evk.dtb.o pbl-dtb-$(CONFIG_MACH_TORADEX_COLIBRI_T20) += tegra20-colibri-iris.dtb.o pbl-dtb-$(CONFIG_MACH_TOSHIBA_AC100) += tegra20-paz00.dtb.o pbl-dtb-$(CONFIG_MACH_TQMA53) += imx53-mba53.dtb.o diff --git a/arch/arm/dts/imx6ull-14x14-evk.dts b/arch/arm/dts/imx6ull-14x14-evk.dts new file mode 100644 index 0000000000..9afe6402a2 --- /dev/null +++ b/arch/arm/dts/imx6ull-14x14-evk.dts @@ -0,0 +1,29 @@ +#include <arm/imx6ull-14x14-evk.dts> + +/{ + chosen { + environment@0 { + compatible = "barebox,environment"; + device-path = &environment_usdhc2; + }; + }; +}; + +&usdhc2 { + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "barebox"; + reg = <0x0 0xc0000>; + }; + + environment_usdhc2: partition@c0000 { + label = "barebox-environment"; + reg = <0xc0000 0x40000>; + }; +}; + +&ocotp { + barebox,provide-mac-address = <&fec1 0x620 &fec2 0x632>; +}; diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig index 92440e3a75..dab19a33ec 100644 --- a/arch/arm/mach-imx/Kconfig +++ b/arch/arm/mach-imx/Kconfig @@ -162,6 +162,10 @@ config ARCH_IMX6UL bool select ARCH_IMX6 +config ARCH_IMX6ULL + bool + select ARCH_IMX6 + config ARCH_IMX7 bool select CPU_V7 @@ -414,6 +418,10 @@ config MACH_FREESCALE_MX7_SABRESD https://goo.gl/6EKGdk +config MACH_NXP_IMX6ULL_EVK + bool "NXP i.MX6ull EVK Board" + select ARCH_IMX6ULL + endif # ---------------------------------------------------------- diff --git a/arch/arm/mach-imx/include/mach/imx6-regs.h b/arch/arm/mach-imx/include/mach/imx6-regs.h index e661c4ed12..ac2aa2109f 100644 --- a/arch/arm/mach-imx/include/mach/imx6-regs.h +++ b/arch/arm/mach-imx/include/mach/imx6-regs.h @@ -107,6 +107,7 @@ #define MX6_MIPI_CSI2_BASE_ADDR (MX6_AIPS2_OFF_BASE_ADDR + 0x5C000) #define MX6_MIPI_DSI_BASE_ADDR (MX6_AIPS2_OFF_BASE_ADDR + 0x60000) #define MX6_VDOA_BASE_ADDR (MX6_AIPS2_OFF_BASE_ADDR + 0x64000) +#define MX6ULL_WDOG3_BASE_ADDR (MX6_AIPS2_OFF_BASE_ADDR + 0x64000) #define MX6_UART2_BASE_ADDR (MX6_AIPS2_OFF_BASE_ADDR + 0x68000) #define MX6_UART3_BASE_ADDR (MX6_AIPS2_OFF_BASE_ADDR + 0x6C000) #define MX6_UART4_BASE_ADDR (MX6_AIPS2_OFF_BASE_ADDR + 0x70000) diff --git a/images/Makefile.imx b/images/Makefile.imx index e9176022bf..76e91ebd7d 100644 --- a/images/Makefile.imx +++ b/images/Makefile.imx @@ -325,6 +325,11 @@ CFG_start_imx6ul_pico_hobbit_512mb.pblx.imximg = $(board)/technexion-pico-hobbit FILE_barebox-imx6ul-pico-hobbit-512mb.img = start_imx6ul_pico_hobbit_512mb.pblx.imximg image-$(CONFIG_MACH_TECHNEXION_PICO_HOBBIT) += barebox-imx6ul-pico-hobbit-512mb.img +pblx-$(CONFIG_MACH_NXP_IMX6ULL_EVK) += start_nxp_imx6ull_evk +CFG_start_nxp_imx6ull_evk.pblx.imximg = $(board)/nxp-imx6ull-evk/flash-header-nxp-imx6ull-evk.imxcfg +FILE_barebox-nxp-imx6ull-evk.img = start_nxp_imx6ull_evk.pblx.imximg +image-$(CONFIG_MACH_NXP_IMX6ULL_EVK) += barebox-nxp-imx6ull-evk.img + pblx-$(CONFIG_MACH_NITROGEN6) += start_imx6q_nitrogen6x_1g CFG_start_imx6q_nitrogen6x_1g.pblx.imximg = $(board)/boundarydevices-nitrogen6/flash-header-nitrogen6q-1g.imxcfg FILE_barebox-boundarydevices-imx6q-nitrogen6x-1g.img = start_imx6q_nitrogen6x_1g.pblx.imximg -- 2.11.0 _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 2/2] i.MX6ull evk support 2017-09-27 12:16 ` [PATCH 2/2] i.MX6ull evk support Sascha Hauer @ 2017-09-28 9:16 ` Lucas Stach 2017-09-28 9:26 ` Sascha Hauer 0 siblings, 1 reply; 8+ messages in thread From: Lucas Stach @ 2017-09-28 9:16 UTC (permalink / raw) To: Sascha Hauer, Barebox List Am Mittwoch, den 27.09.2017, 14:16 +0200 schrieb Sascha Hauer: > The i.MX6ull-EVK is a evaluation board for the i.MX6ull from NXP. > The upstream DTS is used, support should be fairly complete: > > - 2x fec ethernet > - 1x USB Host > - 1x USB OTG > - 2x SD > > Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> > --- > arch/arm/boards/Makefile | 1 + > arch/arm/boards/nxp-imx6ull-evk/Makefile | 2 + > arch/arm/boards/nxp-imx6ull-evk/board.c | 61 > +++++++++++++++++ > .../flash-header-nxp-imx6ull-evk.imxcfg | 77 > ++++++++++++++++++++++ > arch/arm/boards/nxp-imx6ull-evk/lowlevel.c | 75 > +++++++++++++++++++++ > arch/arm/dts/Makefile | 1 + > arch/arm/dts/imx6ull-14x14-evk.dts | 29 ++++++++ > arch/arm/mach-imx/Kconfig | 8 +++ > arch/arm/mach-imx/include/mach/imx6-regs.h | 1 + > images/Makefile.imx | 5 ++ > 10 files changed, 260 insertions(+) > create mode 100644 arch/arm/boards/nxp-imx6ull-evk/Makefile > create mode 100644 arch/arm/boards/nxp-imx6ull-evk/board.c > create mode 100644 arch/arm/boards/nxp-imx6ull-evk/flash-header-nxp- > imx6ull-evk.imxcfg > create mode 100644 arch/arm/boards/nxp-imx6ull-evk/lowlevel.c > create mode 100644 arch/arm/dts/imx6ull-14x14-evk.dts > > diff --git a/arch/arm/boards/Makefile b/arch/arm/boards/Makefile > index d6011adb28..456e6fea4b 100644 > --- a/arch/arm/boards/Makefile > +++ b/arch/arm/boards/Makefile > @@ -78,6 +78,7 @@ obj-$(CONFIG_MACH_NOMADIK_8815NHK) + > = nhk8815/ > obj-$(CONFIG_MACH_NVIDIA_BEAVER) += nvidia-beaver/ > obj-$(CONFIG_MACH_NVIDIA_JETSON) += nvidia-jetson- > tk1/ > obj-$(CONFIG_MACH_NXDB500) += netx/ > +obj-$(CONFIG_MACH_NXP_IMX6ULL_EVK) += nxp-imx6ull- > evk/ > obj-$(CONFIG_MACH_OMAP343xSDP) += > omap343xdsp/ > obj-$(CONFIG_MACH_OMAP3EVM) += omap3evm/ > obj-$(CONFIG_MACH_PANDA) += panda/ > diff --git a/arch/arm/boards/nxp-imx6ull-evk/Makefile > b/arch/arm/boards/nxp-imx6ull-evk/Makefile > new file mode 100644 > index 0000000000..01c7a259e9 > --- /dev/null > +++ b/arch/arm/boards/nxp-imx6ull-evk/Makefile > @@ -0,0 +1,2 @@ > +obj-y += board.o > +lwl-y += lowlevel.o > diff --git a/arch/arm/boards/nxp-imx6ull-evk/board.c > b/arch/arm/boards/nxp-imx6ull-evk/board.c > new file mode 100644 > index 0000000000..77e76ce024 > --- /dev/null > +++ b/arch/arm/boards/nxp-imx6ull-evk/board.c > @@ -0,0 +1,61 @@ > +/* > + * Copyright (C) 2017 Michael Grzeschik, Pengutronix As long as you didn't get yourself a new name alias, I don't think this is correct. > + * > + * 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. > + * > + * You should have received a copy of the GNU General Public License > + * along with this program; if not, write to the Free Software > + * Foundation. > + * > + */ > + > +#include <asm/armlinux.h> > +#include <asm/io.h> > +#include <bootsource.h> > +#include <common.h> > +#include <environment.h> > +#include <envfs.h> > +#include <gpio.h> > +#include <init.h> > +#include <mach/generic.h> > +#include <mach/imx6-regs.h> > +#include <mach/imx6.h> > +#include <mach/bbu.h> > +#include <linux/sizes.h> > +#include <linux/phy.h> > +#include <mfd/imx6q-iomuxc-gpr.h> A lot of those headers are probably not needed for the relatively simple initcalls below. > +#include <linux/micrel_phy.h> > + > +static int ksz8081_phy_fixup(struct phy_device *dev) > +{ > + phy_write(dev, 0x1f, 0x8190); > + phy_write(dev, 0x16, 0x202); > + > + return 0; > +} > + > +static int nxp_imx6ull_evk_init(void) > +{ > + if (!of_machine_is_compatible("fsl,imx6ull-14x14-evk")) > + return 0; > + > + phy_register_fixup_for_uid(PHY_ID_KSZ8081, > MICREL_PHY_ID_MASK, > + ksz8081_phy_fixup); > + > + imx6_bbu_internal_mmc_register_handler("mmc", > "/dev/mmc1.barebox", > + BBU_HANDLER_FLAG_DEFAULT); > + > + barebox_set_hostname("imx6ull-evk"); > + > + return 0; > +} > +device_initcall(nxp_imx6ull_evk_init); > diff --git a/arch/arm/boards/nxp-imx6ull-evk/flash-header-nxp- > imx6ull-evk.imxcfg b/arch/arm/boards/nxp-imx6ull-evk/flash-header- > nxp-imx6ull-evk.imxcfg > new file mode 100644 > index 0000000000..53270d0dc3 > --- /dev/null > +++ b/arch/arm/boards/nxp-imx6ull-evk/flash-header-nxp-imx6ull- > evk.imxcfg If possible, please mention the source and commit where this is taken from. > @@ -0,0 +1,77 @@ > +/* > + * Copyright (C) 2016 Freescale Semiconductor, Inc. > + * > + * SPDX-License-Identifier: GPL-2.0+ > + * > + * Refer doc/README.imximage for more details about how-to configure > + * and create imximage boot image > + * > + * The syntax is taken as close as possible with the kwbimage > + */ > + > +loadaddr 0x80000000 > +soc imx6 > +dcdofs 0x400 > + > +/* Enable all clocks */ > +wm 32 0x020c4068 0xffffffff > +wm 32 0x020c406c 0xffffffff > +wm 32 0x020c4070 0xffffffff > +wm 32 0x020c4074 0xffffffff > +wm 32 0x020c4078 0xffffffff > +wm 32 0x020c407c 0xffffffff > +wm 32 0x020c4080 0xffffffff > + > +wm 32 0x020e04b4 0x000c0000 > +wm 32 0x020e04ac 0x00000000 > +wm 32 0x020e027c 0x00000030 > +wm 32 0x020e0250 0x00000030 > +wm 32 0x020e024c 0x00000030 > +wm 32 0x020e0490 0x00000030 > +wm 32 0x020e0288 0x000c0030 > +wm 32 0x020e0270 0x00000000 > +wm 32 0x020e0260 0x00000030 > +wm 32 0x020e0264 0x00000030 > +wm 32 0x020e04a0 0x00000030 > +wm 32 0x020e0494 0x00020000 > +wm 32 0x020e0280 0x00000030 > +wm 32 0x020e0284 0x00000030 > +wm 32 0x020e04b0 0x00020000 > +wm 32 0x020e0498 0x00000030 > +wm 32 0x020e04a4 0x00000030 > +wm 32 0x020e0244 0x00000030 > +wm 32 0x020e0248 0x00000030 > +wm 32 0x021b001c 0x00008000 > +wm 32 0x021b0800 0xa1390003 > +wm 32 0x021b080c 0x00000004 > +wm 32 0x021b083c 0x41640158 > +wm 32 0x021b0848 0x40403237 > +wm 32 0x021b0850 0x40403c33 > +wm 32 0x021b081c 0x33333333 > +wm 32 0x021b0820 0x33333333 > +wm 32 0x021b082c 0xf3333333 > +wm 32 0x021b0830 0xf3333333 > +wm 32 0x021b08c0 0x00944009 > +wm 32 0x021b08b8 0x00000800 > +wm 32 0x021b0004 0x0002002d > +wm 32 0x021b0008 0x1b333030 > +wm 32 0x021b000c 0x676b52f3 > +wm 32 0x021b0010 0xb66d0b63 > +wm 32 0x021b0014 0x01ff00db > +wm 32 0x021b0018 0x00201740 > +wm 32 0x021b001c 0x00008000 > +wm 32 0x021b002c 0x000026d2 > +wm 32 0x021b0030 0x006b1023 > +wm 32 0x021b0040 0x0000004f > +wm 32 0x021b0000 0x84180000 > +wm 32 0x021b0890 0x00400000 > +wm 32 0x021b001c 0x02008032 > +wm 32 0x021b001c 0x00008033 > +wm 32 0x021b001c 0x00048031 > +wm 32 0x021b001c 0x15208030 > +wm 32 0x021b001c 0x04008040 > +wm 32 0x021b0020 0x00000800 > +wm 32 0x021b0818 0x00000227 > +wm 32 0x021b0004 0x0002552d > +wm 32 0x021b0404 0x00011006 > +wm 32 0x021b001c 0x00000000 > diff --git a/arch/arm/boards/nxp-imx6ull-evk/lowlevel.c > b/arch/arm/boards/nxp-imx6ull-evk/lowlevel.c > new file mode 100644 > index 0000000000..bb0906560c > --- /dev/null > +++ b/arch/arm/boards/nxp-imx6ull-evk/lowlevel.c > @@ -0,0 +1,75 @@ > +/* > + * 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; version 2. > + * > + * 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. > + */ > + > +#include <common.h> > +#include <linux/sizes.h> > +#include <mach/generic.h> > +#include <asm/barebox-arm-head.h> > +#include <asm/barebox-arm.h> > +#include <mach/imx6-regs.h> > +#include <io.h> > +#include <debug_ll.h> > +#include <mach/esdctl.h> > +#include <asm/cache.h> > +#include <asm/sections.h> > +#include <image-metadata.h> > + > +static inline void setup_uart(void) > +{ > + void __iomem *iomuxbase = IOMEM(MX6_IOMUXC_BASE_ADDR); > + void __iomem *uart = IOMEM(MX6_UART1_BASE_ADDR); > + > + imx6_ungate_all_peripherals(); > + > + writel(0x0, iomuxbase + 0x84); > + writel(0x1b0b1, iomuxbase + 0x0310); > + > + writel(0x0, iomuxbase + 0x88); > + writel(0x1b0b0, iomuxbase + 0x0314); > + > + writel(0x3, iomuxbase + 0x624); > + > + imx6_uart_setup(uart); > + > + pbl_set_putc(imx_uart_putc, uart); > + > + putc_ll('>'); > +} > + > +extern char __dtb_imx6ull_14x14_evk_start[]; > + > +static noinline void nxp_imx6_ull(void) > +{ > + imx6ul_barebox_entry(__dtb_imx6ull_14x14_evk_start); > +} > + > +ENTRY_FUNCTION(start_nxp_imx6ull_evk, r0, r1, r2) > +{ > + > + imx6ull_cpu_lowlevel_init(); > + > + arm_setup_stack(0x00910000 - 8); > + > + arm_early_mmu_cache_invalidate(); > + > + relocate_to_current_adr(); > + setup_c(); > + barrier(); Function calls are already acting as a compiler barrier, so this is pure cargo-cult. > + > + setup_uart(); > + > + /* disable all watchdog powerdown counters */ > + writew(0x0, IOMEM(MX6_WDOG1_BASE_ADDR + 0x8)); > + writew(0x0, IOMEM(MX6_WDOG2_BASE_ADDR + 0x8)); > + writew(0x0, IOMEM(MX6ULL_WDOG3_BASE_ADDR + 0x8)); > + > + nxp_imx6_ull(); > +} > diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile > index cf9d8ea940..33b2fff0f7 100644 > --- a/arch/arm/dts/Makefile > +++ b/arch/arm/dts/Makefile > @@ -80,6 +80,7 @@ pbl-dtb-$(CONFIG_MACH_SOLIDRUN_MICROSOM) += imx6dl- > hummingboard.dtb.o imx6q-humm > imx6q-h100.dtb.o > pbl-dtb-$(CONFIG_MACH_TECHNEXION_WANDBOARD) += imx6q-wandboard.dtb.o > imx6dl-wandboard.dtb.o > pbl-dtb-$(CONFIG_MACH_TECHNEXION_PICO_HOBBIT) += imx6ul-pico- > hobbit.dtb.o > +pbl-dtb-$(CONFIG_MACH_NXP_IMX6ULL_EVK) += imx6ull-14x14-evk.dtb.o > pbl-dtb-$(CONFIG_MACH_TORADEX_COLIBRI_T20) += tegra20-colibri- > iris.dtb.o > pbl-dtb-$(CONFIG_MACH_TOSHIBA_AC100) += tegra20-paz00.dtb.o > pbl-dtb-$(CONFIG_MACH_TQMA53) += imx53-mba53.dtb.o > diff --git a/arch/arm/dts/imx6ull-14x14-evk.dts > b/arch/arm/dts/imx6ull-14x14-evk.dts > new file mode 100644 > index 0000000000..9afe6402a2 > --- /dev/null > +++ b/arch/arm/dts/imx6ull-14x14-evk.dts > @@ -0,0 +1,29 @@ > +#include <arm/imx6ull-14x14-evk.dts> > + > +/{ > + chosen { > + environment@0 { > + compatible = "barebox,environment"; > + device-path = &environment_usdhc2; > + }; > + }; > +}; > + > +&usdhc2 { > + #address-cells = <1>; > + #size-cells = <1>; > + > + partition@0 { > + label = "barebox"; > + reg = <0x0 0xc0000>; > + }; > + > + environment_usdhc2: partition@c0000 { > + label = "barebox-environment"; > + reg = <0xc0000 0x40000>; > + }; > +}; > + > +&ocotp { > + barebox,provide-mac-address = <&fec1 0x620 &fec2 0x632>; > +}; > diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig > index 92440e3a75..dab19a33ec 100644 > --- a/arch/arm/mach-imx/Kconfig > +++ b/arch/arm/mach-imx/Kconfig > @@ -162,6 +162,10 @@ config ARCH_IMX6UL > bool > select ARCH_IMX6 > > +config ARCH_IMX6ULL > + bool > + select ARCH_IMX6 > + Do we really need this? Seems the MX6ULL is just a stripped down version of the MX6UL. > config ARCH_IMX7 > bool > select CPU_V7 > @@ -414,6 +418,10 @@ config MACH_FREESCALE_MX7_SABRESD > > https://goo.gl/6EKGdk > > +config MACH_NXP_IMX6ULL_EVK > + bool "NXP i.MX6ull EVK Board" > + select ARCH_IMX6ULL > + > endif > > # ---------------------------------------------------------- > diff --git a/arch/arm/mach-imx/include/mach/imx6-regs.h > b/arch/arm/mach-imx/include/mach/imx6-regs.h > index e661c4ed12..ac2aa2109f 100644 > --- a/arch/arm/mach-imx/include/mach/imx6-regs.h > +++ b/arch/arm/mach-imx/include/mach/imx6-regs.h > @@ -107,6 +107,7 @@ > #define MX6_MIPI_CSI2_BASE_ADDR (MX6_AIPS2_OFF_BASE_ADDR + > 0x5C000) > #define MX6_MIPI_DSI_BASE_ADDR (MX6_AIPS2_OFF_BASE_ADDR + > 0x60000) > #define MX6_VDOA_BASE_ADDR (MX6_AIPS2_OFF_BASE_ADDR + > 0x64000) > +#define MX6ULL_WDOG3_BASE_ADDR (MX6_AIPS2_OFF_BASE_ADDR + > 0x64000) > #define MX6_UART2_BASE_ADDR (MX6_AIPS2_OFF_BASE_ADDR + > 0x68000) > #define MX6_UART3_BASE_ADDR (MX6_AIPS2_OFF_BASE_ADDR + > 0x6C000) > #define MX6_UART4_BASE_ADDR (MX6_AIPS2_OFF_BASE_ADDR + > 0x70000) > diff --git a/images/Makefile.imx b/images/Makefile.imx > index e9176022bf..76e91ebd7d 100644 > --- a/images/Makefile.imx > +++ b/images/Makefile.imx > @@ -325,6 +325,11 @@ CFG_start_imx6ul_pico_hobbit_512mb.pblx.imximg = > $(board)/technexion-pico-hobbit > FILE_barebox-imx6ul-pico-hobbit-512mb.img = > start_imx6ul_pico_hobbit_512mb.pblx.imximg > image-$(CONFIG_MACH_TECHNEXION_PICO_HOBBIT) += barebox-imx6ul-pico- > hobbit-512mb.img > > +pblx-$(CONFIG_MACH_NXP_IMX6ULL_EVK) += start_nxp_imx6ull_evk > +CFG_start_nxp_imx6ull_evk.pblx.imximg = $(board)/nxp-imx6ull- > evk/flash-header-nxp-imx6ull-evk.imxcfg > +FILE_barebox-nxp-imx6ull-evk.img = start_nxp_imx6ull_evk.pblx.imximg > +image-$(CONFIG_MACH_NXP_IMX6ULL_EVK) += barebox-nxp-imx6ull-evk.img > + > pblx-$(CONFIG_MACH_NITROGEN6) += start_imx6q_nitrogen6x_1g > CFG_start_imx6q_nitrogen6x_1g.pblx.imximg = > $(board)/boundarydevices-nitrogen6/flash-header-nitrogen6q-1g.imxcfg > FILE_barebox-boundarydevices-imx6q-nitrogen6x-1g.img = > start_imx6q_nitrogen6x_1g.pblx.imximg _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 2/2] i.MX6ull evk support 2017-09-28 9:16 ` Lucas Stach @ 2017-09-28 9:26 ` Sascha Hauer 2017-09-28 9:33 ` Lucas Stach 0 siblings, 1 reply; 8+ messages in thread From: Sascha Hauer @ 2017-09-28 9:26 UTC (permalink / raw) To: Lucas Stach; +Cc: Barebox List On Thu, Sep 28, 2017 at 11:16:15AM +0200, Lucas Stach wrote: > Am Mittwoch, den 27.09.2017, 14:16 +0200 schrieb Sascha Hauer: > > diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig > > index 92440e3a75..dab19a33ec 100644 > > --- a/arch/arm/mach-imx/Kconfig > > +++ b/arch/arm/mach-imx/Kconfig > > @@ -162,6 +162,10 @@ config ARCH_IMX6UL > > bool > > select ARCH_IMX6 > > > > +config ARCH_IMX6ULL > > + bool > > + select ARCH_IMX6 > > + > Do we really need this? Seems the MX6ULL is just a stripped down > version of the MX6UL. We probably do not need this, but I suggest to keep it anyway. I think it makes it a bit clearer that there are indeed i.MX6ul *and* i.MX6ull and both are supported. Sascha -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 2/2] i.MX6ull evk support 2017-09-28 9:26 ` Sascha Hauer @ 2017-09-28 9:33 ` Lucas Stach 2017-09-28 10:13 ` Sascha Hauer 0 siblings, 1 reply; 8+ messages in thread From: Lucas Stach @ 2017-09-28 9:33 UTC (permalink / raw) To: Sascha Hauer; +Cc: Barebox List Am Donnerstag, den 28.09.2017, 11:26 +0200 schrieb Sascha Hauer: > On Thu, Sep 28, 2017 at 11:16:15AM +0200, Lucas Stach wrote: > > Am Mittwoch, den 27.09.2017, 14:16 +0200 schrieb Sascha Hauer: > > > diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach- > > > imx/Kconfig > > > index 92440e3a75..dab19a33ec 100644 > > > --- a/arch/arm/mach-imx/Kconfig > > > +++ b/arch/arm/mach-imx/Kconfig > > > @@ -162,6 +162,10 @@ config ARCH_IMX6UL > > > bool > > > select ARCH_IMX6 > > > > > > +config ARCH_IMX6ULL > > > + bool > > > + select ARCH_IMX6 > > > + > > > > Do we really need this? Seems the MX6ULL is just a stripped down > > version of the MX6UL. > > We probably do not need this, but I suggest to keep it anyway. I > think > it makes it a bit clearer that there are indeed i.MX6ul *and* > i.MX6ull > and both are supported. Yeah, your decision, but I'll notice that we don't have separate Kconfig symbols for MX6Q/DL, which probably expose more software visible differences than MX6UL/ULL. Regards, Lucas _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 2/2] i.MX6ull evk support 2017-09-28 9:33 ` Lucas Stach @ 2017-09-28 10:13 ` Sascha Hauer 2017-10-10 14:04 ` Philipp Zabel 0 siblings, 1 reply; 8+ messages in thread From: Sascha Hauer @ 2017-09-28 10:13 UTC (permalink / raw) To: Lucas Stach; +Cc: Barebox List On Thu, Sep 28, 2017 at 11:33:32AM +0200, Lucas Stach wrote: > Am Donnerstag, den 28.09.2017, 11:26 +0200 schrieb Sascha Hauer: > > On Thu, Sep 28, 2017 at 11:16:15AM +0200, Lucas Stach wrote: > > > Am Mittwoch, den 27.09.2017, 14:16 +0200 schrieb Sascha Hauer: > > > > diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach- > > > > imx/Kconfig > > > > index 92440e3a75..dab19a33ec 100644 > > > > --- a/arch/arm/mach-imx/Kconfig > > > > +++ b/arch/arm/mach-imx/Kconfig > > > > @@ -162,6 +162,10 @@ config ARCH_IMX6UL > > > > bool > > > > select ARCH_IMX6 > > > > > > > > +config ARCH_IMX6ULL > > > > + bool > > > > + select ARCH_IMX6 > > > > + > > > > > > Do we really need this? Seems the MX6ULL is just a stripped down > > > version of the MX6UL. > > > > We probably do not need this, but I suggest to keep it anyway. I > > think > > it makes it a bit clearer that there are indeed i.MX6ul *and* > > i.MX6ull > > and both are supported. > > Yeah, your decision, but I'll notice that we don't have separate > Kconfig symbols for MX6Q/DL, which probably expose more software > visible differences than MX6UL/ULL. While refactoring the patches I realized that having a i.MX6ull function which just calls the corresponding i.MX6ul function doesn't look too nice when additionally we have a board which either has one of both SoCs calling the i.MX6ul version and needs a comment that this is the same as the i.MX6ull variant. I dropped the IMX6ULL symbol. Sascha -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 2/2] i.MX6ull evk support 2017-09-28 10:13 ` Sascha Hauer @ 2017-10-10 14:04 ` Philipp Zabel 0 siblings, 0 replies; 8+ messages in thread From: Philipp Zabel @ 2017-10-10 14:04 UTC (permalink / raw) To: Sascha Hauer, Lucas Stach; +Cc: Barebox List On Thu, 2017-09-28 at 12:13 +0200, Sascha Hauer wrote: > On Thu, Sep 28, 2017 at 11:33:32AM +0200, Lucas Stach wrote: > > Am Donnerstag, den 28.09.2017, 11:26 +0200 schrieb Sascha Hauer: > > > On Thu, Sep 28, 2017 at 11:16:15AM +0200, Lucas Stach wrote: > > > > Am Mittwoch, den 27.09.2017, 14:16 +0200 schrieb Sascha Hauer: > > > > > diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach- > > > > > imx/Kconfig > > > > > index 92440e3a75..dab19a33ec 100644 > > > > > --- a/arch/arm/mach-imx/Kconfig > > > > > +++ b/arch/arm/mach-imx/Kconfig > > > > > @@ -162,6 +162,10 @@ config ARCH_IMX6UL > > > > > bool > > > > > select ARCH_IMX6 > > > > > > > > > > +config ARCH_IMX6ULL > > > > > + bool > > > > > + select ARCH_IMX6 > > > > > + > > > > > > > > Do we really need this? Seems the MX6ULL is just a stripped down > > > > version of the MX6UL. > > > > > > We probably do not need this, but I suggest to keep it anyway. I > > > think > > > it makes it a bit clearer that there are indeed i.MX6ul *and* > > > i.MX6ull > > > and both are supported. > > > > Yeah, your decision, but I'll notice that we don't have separate > > Kconfig symbols for MX6Q/DL, which probably expose more software > > visible differences than MX6UL/ULL. > > While refactoring the patches I realized that having a i.MX6ull function > which just calls the corresponding i.MX6ul function doesn't look too > nice when additionally we have a board which either has one of both > SoCs calling the i.MX6ul version and needs a comment that this is the > same as the i.MX6ull variant. > > I dropped the IMX6ULL symbol. In next, ARCH_IMX6ULL is still separate from ARCH_IMX6UL, and it currently breaks i.MX6ULL support when building a barebox without any i.MX6UL board enabled, because of the missing clock driver. I'd prefer to just: ----------8<---------- diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig index dab19a33ec..1578875e95 100644 --- a/arch/arm/mach-imx/Kconfig +++ b/arch/arm/mach-imx/Kconfig @@ -162,10 +162,6 @@ config ARCH_IMX6UL bool select ARCH_IMX6 -config ARCH_IMX6ULL - bool - select ARCH_IMX6 - config ARCH_IMX7 bool select CPU_V7 @@ -420,7 +416,7 @@ config MACH_FREESCALE_MX7_SABRESD config MACH_NXP_IMX6ULL_EVK bool "NXP i.MX6ull EVK Board" - select ARCH_IMX6ULL + select ARCH_IMX6UL endif ---------->8---------- regards Philipp _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/2] ARM: i.MX6ull: Add SoC specific lowlevel_init function 2017-09-27 12:16 [PATCH 1/2] ARM: i.MX6ull: Add SoC specific lowlevel_init function Sascha Hauer 2017-09-27 12:16 ` [PATCH 2/2] i.MX6ull evk support Sascha Hauer @ 2017-09-28 9:09 ` Lucas Stach 1 sibling, 0 replies; 8+ messages in thread From: Lucas Stach @ 2017-09-28 9:09 UTC (permalink / raw) To: Sascha Hauer, Barebox List Am Mittwoch, den 27.09.2017, 14:16 +0200 schrieb Sascha Hauer: > On i.MX6ull (Cortex A7) We have to set the SMP bit before enabling > the > caches, otherwise they won't work. Add a SoC specific lowlevel_init > function to be called by the i.MX6ull boards. This isn't specific to the MX6ULL, but the Cortex-A7, which is used in the whole MX6UL family. So I would prefer if this is called imx6ul_... Also a follow-up commit should switch over the already supported MX6UL/ULL boards to the new init function. Regards, Lucas > Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> > --- > arch/arm/mach-imx/cpu_init.c | 12 ++++++++++++ > arch/arm/mach-imx/include/mach/generic.h | 1 + > 2 files changed, 13 insertions(+) > > diff --git a/arch/arm/mach-imx/cpu_init.c b/arch/arm/mach- > imx/cpu_init.c > index 2b388cad8c..8f6d4b7902 100644 > --- a/arch/arm/mach-imx/cpu_init.c > +++ b/arch/arm/mach-imx/cpu_init.c > @@ -14,6 +14,7 @@ > > #include <asm/barebox-arm-head.h> > #include <asm/errata.h> > +#include <linux/types.h> > > void imx5_cpu_lowlevel_init(void) > { > @@ -34,6 +35,17 @@ void imx6_cpu_lowlevel_init(void) > enable_arm_errata_845369_war(); > } > > +void imx6ull_cpu_lowlevel_init(void) > +{ > + u32 val; > + > + asm volatile ("mrc p15, 0, %0, c1, c0, 1\n" : "=r"(val)); > + val |= (1 << 6); > + asm volatile("mcr p15, 0, %0, c1, c0, 1" : : "r" (val)); > + > + arm_cpu_lowlevel_init(); > +} > + > void imx7_cpu_lowlevel_init(void) > { > arm_cpu_lowlevel_init(); > diff --git a/arch/arm/mach-imx/include/mach/generic.h > b/arch/arm/mach-imx/include/mach/generic.h > index 73be9ceb55..eb8c7a5b7b 100644 > --- a/arch/arm/mach-imx/include/mach/generic.h > +++ b/arch/arm/mach-imx/include/mach/generic.h > @@ -48,6 +48,7 @@ int imx6_devices_init(void); > > void imx5_cpu_lowlevel_init(void); > void imx6_cpu_lowlevel_init(void); > +void imx6ull_cpu_lowlevel_init(void); > void imx7_cpu_lowlevel_init(void); > void vf610_cpu_lowlevel_init(void); > _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2017-10-10 14:04 UTC | newest] Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2017-09-27 12:16 [PATCH 1/2] ARM: i.MX6ull: Add SoC specific lowlevel_init function Sascha Hauer 2017-09-27 12:16 ` [PATCH 2/2] i.MX6ull evk support Sascha Hauer 2017-09-28 9:16 ` Lucas Stach 2017-09-28 9:26 ` Sascha Hauer 2017-09-28 9:33 ` Lucas Stach 2017-09-28 10:13 ` Sascha Hauer 2017-10-10 14:04 ` Philipp Zabel 2017-09-28 9:09 ` [PATCH 1/2] ARM: i.MX6ull: Add SoC specific lowlevel_init function Lucas Stach
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox