diff options
Diffstat (limited to 'arch/arm')
36 files changed, 476 insertions, 478 deletions
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/freescale-mx53-qsb/board.c b/arch/arm/boards/freescale-mx53-qsb/board.c index f75c9d12cd..0b1c927b81 100644 --- a/arch/arm/boards/freescale-mx53-qsb/board.c +++ b/arch/arm/boards/freescale-mx53-qsb/board.c @@ -64,15 +64,6 @@ static void set_board_rev(int rev) loco_system_rev = (loco_system_rev & ~(0xF << 8)) | (rev & 0xF) << 8; } -#define LOCO_FEC_PHY_RST IMX_GPIO_NR(7, 6) - -static void loco_fec_reset(void) -{ - gpio_direction_output(LOCO_FEC_PHY_RST, 0); - mdelay(1); - gpio_set_value(LOCO_FEC_PHY_RST, 1); -} - #define MX53_LOCO_USB_PWREN IMX_GPIO_NR(7, 8) static int loco_late_init(void) @@ -148,8 +139,6 @@ static int loco_late_init(void) gpio_direction_output(MX53_LOCO_USB_PWREN, 0); gpio_set_value(MX53_LOCO_USB_PWREN, 1); - loco_fec_reset(); - set_silicon_rev(imx_silicon_revision()); armlinux_set_architecture(MACH_TYPE_MX53_LOCO); 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..a0ca268f82 --- /dev/null +++ b/arch/arm/boards/nxp-imx6ull-evk/board.c @@ -0,0 +1,50 @@ +/* + * Copyright (C) 2017 Sascha Hauer, 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 <common.h> +#include <init.h> +#include <mach/bbu.h> +#include <linux/phy.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..a507ab3e24 --- /dev/null +++ b/arch/arm/boards/nxp-imx6ull-evk/flash-header-nxp-imx6ull-evk.imxcfg @@ -0,0 +1,75 @@ +/* + * Copyright (C) 2016 Freescale Semiconductor, Inc. + * + * SPDX-License-Identifier: GPL-2.0+ + * + * Values taken from U-Boot-2017.07-rc1 + * + */ + +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..bb2e3623dc --- /dev/null +++ b/arch/arm/boards/nxp-imx6ull-evk/lowlevel.c @@ -0,0 +1,74 @@ +/* + * 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) +{ + + imx6ul_cpu_lowlevel_init(); + + arm_setup_stack(0x00910000 - 8); + + arm_early_mmu_cache_invalidate(); + + relocate_to_current_adr(); + setup_c(); + + 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/boards/phytec-som-imx6/lowlevel.c b/arch/arm/boards/phytec-som-imx6/lowlevel.c index 07ac4437ab..29811d34ef 100644 --- a/arch/arm/boards/phytec-som-imx6/lowlevel.c +++ b/arch/arm/boards/phytec-som-imx6/lowlevel.c @@ -56,7 +56,7 @@ static void __noreturn start_imx6_phytec_common(uint32_t size, if (cpu_type == IMX6_CPUTYPE_IMX6UL || cpu_type == IMX6_CPUTYPE_IMX6ULL) { - arm_cpu_lowlevel_init(); + imx6ul_cpu_lowlevel_init(); /* OCRAM Free Area is 0x00907000 to 0x00918000 (68KB) */ arm_setup_stack(0x00910000 - 8); } else { diff --git a/arch/arm/boards/technexion-pico-hobbit/lowlevel.c b/arch/arm/boards/technexion-pico-hobbit/lowlevel.c index aad55127bf..f351e67dd7 100644 --- a/arch/arm/boards/technexion-pico-hobbit/lowlevel.c +++ b/arch/arm/boards/technexion-pico-hobbit/lowlevel.c @@ -37,7 +37,7 @@ static void __noreturn start_imx6_pico_hobbit_common(uint32_t size, { void *fdt; - arm_cpu_lowlevel_init(); + imx6ul_cpu_lowlevel_init(); arm_setup_stack(0x00910000 - 8); diff --git a/arch/arm/boards/vexpress/Makefile b/arch/arm/boards/vexpress/Makefile index c89d7bf182..2da0494d49 100644 --- a/arch/arm/boards/vexpress/Makefile +++ b/arch/arm/boards/vexpress/Makefile @@ -1,4 +1,2 @@ obj-y += init.o - lwl-y += lowlevel.o -bbenv-$(CONFIG_DEFAULT_ENVIRONMENT_GENERIC) += defaultenv-vexpress diff --git a/arch/arm/boards/vexpress/defaultenv-vexpress/config b/arch/arm/boards/vexpress/defaultenv-vexpress/config deleted file mode 100644 index 6c0abda40c..0000000000 --- a/arch/arm/boards/vexpress/defaultenv-vexpress/config +++ /dev/null @@ -1,38 +0,0 @@ -#!/bin/sh - -# use 'dhcp' to do dhcp in barebox and in kernel -# use 'none' if you want to skip kernel ip autoconfiguration -ip=dhcp -global.dhcp.vendor_id=barebox-${global.hostname} - -# or set your networking parameters here -#eth0.ipaddr=a.b.c.d -#eth0.netmask=a.b.c.d -#eth0.gateway=a.b.c.d -#eth0.serverip=a.b.c.d - -# can be either 'nfs', 'tftp' or 'nor' -kernel_loc=tftp -# can be either 'net', 'nor' or 'initrd' -rootfs_loc=initrd - -# can be either 'jffs2' or 'ubifs' -rootfs_type=ubifs -rootfsimage=root.$rootfs_type - -kernelimage=zImage -#kernelimage=uImage -#kernelimage=Image -#kernelimage=Image.lzo - -nfsroot="$eth0.serverip:/opt/work/busybox/arm9/rootfs_arm" - -nor_parts="256k(barebox)ro,64k(bareboxenv),1536k(kernel),-(root)" -rootfs_mtdblock_nor=3 - -autoboot_timeout=3 - -bootargs="console=ttyAMA0,115200n8 CONSOLE=/dev/ttyAMA0" - -# set a fancy prompt (if support is compiled in) -PS1="\e[1;31m[barebox@\h]:\w\e[0m\n# " diff --git a/arch/arm/boards/vexpress/init.c b/arch/arm/boards/vexpress/init.c index f89dff9392..946385393f 100644 --- a/arch/arm/boards/vexpress/init.c +++ b/arch/arm/boards/vexpress/init.c @@ -11,129 +11,23 @@ #include <generated/mach-types.h> #include <mach/devices.h> #include <environment.h> -#include <partition.h> #include <linux/sizes.h> #include <io.h> #include <envfs.h> #include <globalvar.h> #include <linux/amba/sp804.h> -#include <mci.h> - -struct vexpress_init { - void (*core_init)(void); - void (*mem_init)(void); - void (*console_init)(void); - void (*devices_init)(void); -}; - -struct mmci_platform_data mmci_plat = { - .ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34, - .clkdiv_init = SDI_CLKCR_CLKDIV_INIT, -}; - -struct vexpress_init *v2m_init; - -static void vexpress_ax_mem_init(void) -{ - vexpress_add_ddram(SZ_512M); -} #define V2M_SYS_FLASH 0x03c -static void vexpress_ax_devices_init(void) -{ - add_cfi_flash_device(0, 0x08000000, SZ_64M, 0); - add_cfi_flash_device(1, 0x0c000000, SZ_64M, 0); - vexpress_register_mmc(&mmci_plat); - add_generic_device("smc911x", DEVICE_ID_DYNAMIC, NULL, 0x1a000000, - 64 * 1024, IORESOURCE_MEM, NULL); -} - -static void vexpress_ax_console_init(void) -{ - vexpress_register_uart(0); - vexpress_register_uart(1); - vexpress_register_uart(2); - vexpress_register_uart(3); -} - -struct vexpress_init vexpress_init_ax = { - .core_init = vexpress_init, - .mem_init = vexpress_ax_mem_init, - .console_init = vexpress_ax_console_init, - .devices_init = vexpress_ax_devices_init, -}; - -static void vexpress_a9_legacy_mem_init(void) -{ - vexpress_a9_legacy_add_ddram(SZ_512M, SZ_512M); -} - -static void vexpress_a9_legacy_devices_init(void) -{ - add_cfi_flash_device(0, 0x40000000, SZ_64M, 0); - add_cfi_flash_device(1, 0x44000000, SZ_64M, 0); - add_generic_device("smc911x", DEVICE_ID_DYNAMIC, NULL, 0x4e000000, - 64 * 1024, IORESOURCE_MEM, NULL); - vexpress_a9_legacy_register_mmc(&mmci_plat); - armlinux_set_architecture(MACH_TYPE_VEXPRESS); -} - -static void vexpress_a9_legacy_console_init(void) -{ - vexpress_a9_legacy_register_uart(0); - vexpress_a9_legacy_register_uart(1); - vexpress_a9_legacy_register_uart(2); - vexpress_a9_legacy_register_uart(3); -} - -struct vexpress_init vexpress_init_a9_legacy = { - .core_init = vexpress_a9_legacy_init, - .mem_init = vexpress_a9_legacy_mem_init, - .console_init = vexpress_a9_legacy_console_init, - .devices_init = vexpress_a9_legacy_devices_init, -}; - -static int vexpress_mem_init(void) -{ - v2m_init->mem_init(); - - return 0; -} -mem_initcall(vexpress_mem_init); - -static int vexpress_devices_init(void) -{ - writel(1, v2m_sysreg_base + V2M_SYS_FLASH); - v2m_init->devices_init(); - - devfs_add_partition("nor0", 0x00000, 0x40000, DEVFS_PARTITION_FIXED, "self"); - devfs_add_partition("nor0", 0x40000, 0x20000, DEVFS_PARTITION_FIXED, "env0"); - - if (IS_ENABLED(CONFIG_DEFAULT_ENVIRONMENT_GENERIC)) - defaultenv_append_directory(defaultenv_vexpress); - - return 0; -} -device_initcall(vexpress_devices_init); - -static int vexpress_console_init(void) -{ - v2m_init->console_init(); - - return 0; -} -console_initcall(vexpress_console_init); - static int vexpress_core_init(void) { char *hostname = "vexpress-unknown"; if (amba_is_arm_sp804(IOMEM(0x10011000))) { - v2m_init = &vexpress_init_a9_legacy; + vexpress_a9_legacy_init(); hostname = "vexpress-a9-legacy"; } else { - v2m_init = &vexpress_init_ax; + vexpress_init(); if (cpu_is_cortex_a5()) hostname = "vexpress-a5"; else if (cpu_is_cortex_a7()) @@ -144,11 +38,39 @@ static int vexpress_core_init(void) hostname = "vexpress-a15"; } - barebox_set_model("ARM Vexpress"); - barebox_set_hostname(hostname); + writel(1, v2m_sysreg_base + V2M_SYS_FLASH); - v2m_init->core_init(); + barebox_set_hostname(hostname); return 0; } postcore_initcall(vexpress_core_init); + +static int of_fixup_virtio_mmio(struct device_node *root, void *unused) +{ + struct device_node *barebox_root, *np, *parent; + + barebox_root = of_get_root_node(); + if (root == barebox_root) + return 0; + + for_each_compatible_node_from(np, barebox_root, NULL, "virtio,mmio") { + if (of_get_parent(np) == barebox_root) + parent = root; + else + parent = of_find_node_by_path_from(root, + of_get_parent(np)->full_name); + if (!parent) + return -EINVAL; + + of_copy_node(parent, np); + } + + return 0; +} + +static int of_register_virtio_mmio_fixup(void) +{ + return of_register_fixup(of_fixup_virtio_mmio, NULL); +} +late_initcall(of_register_virtio_mmio_fixup); diff --git a/arch/arm/boards/vexpress/lowlevel.c b/arch/arm/boards/vexpress/lowlevel.c index 204d29d8f0..9fe7c836b7 100644 --- a/arch/arm/boards/vexpress/lowlevel.c +++ b/arch/arm/boards/vexpress/lowlevel.c @@ -9,14 +9,44 @@ #include <asm/barebox-arm-head.h> #include <asm/barebox-arm.h> #include <asm/system_info.h> +#include <asm/unaligned.h> #include <linux/amba/sp804.h> -void __naked barebox_arm_reset_vector(void) +static inline void start_vexpress_common(void *internal_dt) { + void *fdt = internal_dt - get_runtime_offset(); + unsigned long membase, memsize = SZ_512M; + arm_cpu_lowlevel_init(); if (amba_is_arm_sp804(IOMEM(0x10011000))) - barebox_arm_entry(0x60000000, SZ_512M, NULL); + membase = 0x60000000; else - barebox_arm_entry(0x80000000, SZ_512M, NULL); + membase = 0x80000000; + + /* QEMU may put a DTB at the start of RAM */ + if (IS_ENABLED(CONFIG_OFDEVICE) && + get_unaligned_be32((void*)membase) == FDT_MAGIC) { + fdt = (void*)membase; + /* + * Need to move membase a bit as the PBL wants to relocate + * to the start of RAM, which would overwrite the DTB. + */ + membase += SZ_4M; + memsize -= SZ_4M; + } + + barebox_arm_entry(membase, memsize, fdt); +} + +extern char __dtb_vexpress_v2p_ca9_start[]; +ENTRY_FUNCTION(start_vexpress_ca9, r0, r1, r2) +{ + start_vexpress_common(__dtb_vexpress_v2p_ca9_start); +} + +extern char __dtb_vexpress_v2p_ca15_start[]; +ENTRY_FUNCTION(start_vexpress_ca15, r0, r1, r2) +{ + start_vexpress_common(__dtb_vexpress_v2p_ca15_start); } diff --git a/arch/arm/configs/vexpress_ca9_defconfig b/arch/arm/configs/vexpress_ca9_defconfig deleted file mode 100644 index a1c42512d2..0000000000 --- a/arch/arm/configs/vexpress_ca9_defconfig +++ /dev/null @@ -1,52 +0,0 @@ -CONFIG_ARCH_VEXPRESS=y -CONFIG_AEABI=y -CONFIG_ARM_OPTIMZED_STRING_FUNCTIONS=y -CONFIG_TEXT_BASE=0x63f00000 -CONFIG_MALLOC_TLSF=y -CONFIG_PROMPT="vexpress: " -CONFIG_GLOB=y -CONFIG_HUSH_FANCY_PROMPT=y -CONFIG_CMDLINE_EDITING=y -CONFIG_AUTO_COMPLETE=y -CONFIG_MENU=y -CONFIG_BOOTM_SHOW_TYPE=y -CONFIG_BOOTM_VERBOSE=y -CONFIG_BOOTM_INITRD=y -CONFIG_PARTITION=y -CONFIG_DEFAULT_ENVIRONMENT_GENERIC=y -CONFIG_LONGHELP=y -CONFIG_CMD_MEMINFO=y -# CONFIG_CMD_BOOTU is not set -CONFIG_CMD_GO=y -CONFIG_CMD_LOADB=y -CONFIG_CMD_RESET=y -CONFIG_CMD_UIMAGE=y -CONFIG_CMD_PARTITION=y -CONFIG_CMD_EXPORT=y -CONFIG_CMD_PRINTENV=y -CONFIG_CMD_SAVEENV=y -CONFIG_CMD_UNCOMPRESS=y -CONFIG_CMD_SLEEP=y -CONFIG_CMD_DHCP=y -CONFIG_CMD_PING=y -CONFIG_CMD_TFTP=y -CONFIG_CMD_ECHO_E=y -CONFIG_CMD_EDIT=y -CONFIG_CMD_LOGIN=y -CONFIG_CMD_MENU=y -CONFIG_CMD_MENU_MANAGEMENT=y -CONFIG_CMD_PASSWD=y -CONFIG_CMD_READLINE=y -CONFIG_CMD_TIMEOUT=y -CONFIG_CMD_CLK=y -CONFIG_CMD_OFTREE=y -CONFIG_NET=y -CONFIG_NET_NFS=y -CONFIG_NET_NETCONSOLE=y -CONFIG_NET_RESOLV=y -CONFIG_SERIAL_AMBA_PL011=y -CONFIG_DRIVER_NET_SMC91111=y -# CONFIG_SPI is not set -CONFIG_FS_TFTP=y -CONFIG_DIGEST_SHA1_GENERIC=y -CONFIG_DIGEST_SHA256_GENERIC=y diff --git a/arch/arm/configs/vexpress_defconfig b/arch/arm/configs/vexpress_defconfig index 94fe1eaa72..f6a57de75c 100644 --- a/arch/arm/configs/vexpress_defconfig +++ b/arch/arm/configs/vexpress_defconfig @@ -1,9 +1,9 @@ CONFIG_ARCH_VEXPRESS=y CONFIG_AEABI=y CONFIG_ARM_OPTIMZED_STRING_FUNCTIONS=y +CONFIG_MALLOC_SIZE=0x0 CONFIG_MALLOC_TLSF=y CONFIG_PROMPT="vexpress: " -CONFIG_GLOB=y CONFIG_HUSH_FANCY_PROMPT=y CONFIG_CMDLINE_EDITING=y CONFIG_AUTO_COMPLETE=y @@ -11,9 +11,10 @@ CONFIG_MENU=y CONFIG_BOOTM_SHOW_TYPE=y CONFIG_BOOTM_VERBOSE=y CONFIG_BOOTM_INITRD=y -CONFIG_PARTITION=y -CONFIG_DEFAULT_ENVIRONMENT_GENERIC=y +CONFIG_DEFAULT_ENVIRONMENT_GENERIC_NEW=y +CONFIG_CMD_DMESG=y CONFIG_LONGHELP=y +CONFIG_CMD_IOMEM=y CONFIG_CMD_MEMINFO=y # CONFIG_CMD_BOOTU is not set CONFIG_CMD_GO=y @@ -37,15 +38,25 @@ CONFIG_CMD_MENU_MANAGEMENT=y CONFIG_CMD_PASSWD=y CONFIG_CMD_READLINE=y CONFIG_CMD_TIMEOUT=y +CONFIG_CMD_CRC=y +CONFIG_CMD_CRC_CMP=y CONFIG_CMD_CLK=y +CONFIG_CMD_DETECT=y CONFIG_CMD_OFTREE=y CONFIG_NET=y CONFIG_NET_NFS=y CONFIG_NET_NETCONSOLE=y CONFIG_NET_RESOLV=y +CONFIG_OF_BAREBOX_DRIVERS=y CONFIG_SERIAL_AMBA_PL011=y CONFIG_DRIVER_NET_SMC91111=y # CONFIG_SPI is not set +CONFIG_MTD=y +CONFIG_MTD_CONCAT=y +CONFIG_DRIVER_CFI=y +CONFIG_MCI=y +CONFIG_MCI_MMCI=y +# CONFIG_PINCTRL is not set CONFIG_FS_TFTP=y CONFIG_DIGEST_SHA1_GENERIC=y CONFIG_DIGEST_SHA256_GENERIC=y diff --git a/arch/arm/cpu/cache-armv7.S b/arch/arm/cpu/cache-armv7.S index aaa8bf8c62..7a1c5c0189 100644 --- a/arch/arm/cpu/cache-armv7.S +++ b/arch/arm/cpu/cache-armv7.S @@ -9,7 +9,7 @@ ENTRY(v7_mmu_cache_on) mrc p15, 0, r11, c0, c1, 4 @ read ID_MMFR0 tst r11, #0xf @ VMSA mov r0, #0 - mcr p15, 0, r0, c7, c10, 4 @ drain write buffer + dsb @ drain write buffer tst r11, #0xf @ VMSA mcrne p15, 0, r0, c8, c7, 0 @ flush I,D TLBs #endif @@ -24,11 +24,11 @@ ENTRY(v7_mmu_cache_on) movne r1, #-1 mcrne p15, 0, r1, c3, c0, 0 @ load domain access control #endif - mcr p15, 0, r0, c7, c5, 4 @ ISB + isb mcr p15, 0, r0, c1, c0, 0 @ load control register mrc p15, 0, r0, c1, c0, 0 @ and read it back mov r0, #0 - mcr p15, 0, r0, c7, c5, 4 @ ISB + isb ldmfd sp!, {r11, pc} ENDPROC(v7_mmu_cache_on) @@ -51,8 +51,8 @@ ENTRY(v7_mmu_cache_off) mcr p15, 0, r0, c8, c7, 0 @ invalidate whole TLB #endif mcr p15, 0, r0, c7, c5, 6 @ invalidate BTC - mcr p15, 0, r0, c7, c10, 4 @ DSB - mcr p15, 0, r0, c7, c5, 4 @ ISB + dsb + isb ldmfd sp!, {r4-r12, pc} ENDPROC(v7_mmu_cache_off) @@ -68,7 +68,7 @@ ENTRY(v7_mmu_cache_flush) ENDPROC(v7_mmu_cache_flush) ENTRY(__v7_mmu_cache_flush_invalidate) - mcr p15, 0, r12, c7, c10, 5 @ DMB + dmb mrc p15, 0, r12, c0, c1, 5 @ read ID_MMFR1 tst r12, #0xf << 16 @ hierarchical cache (ARMv7) mov r12, #0 @@ -78,7 +78,7 @@ ENTRY(__v7_mmu_cache_flush_invalidate) hierarchical: stmfd sp!, {r4-r11} mov r8, r0 - mcr p15, 0, r12, c7, c10, 5 @ DMB + dmb mrc p15, 1, r0, c0, c0, 1 @ read clidr ands r3, r0, #0x7000000 @ extract loc from clidr mov r3, r3, lsr #23 @ left align loc bit field @@ -91,7 +91,7 @@ loop1: cmp r1, #2 @ see what cache we have at this level blt skip @ skip if no cache, or just i-cache mcr p15, 2, r12, c0, c0, 0 @ select current cache level in cssr - mcr p15, 0, r12, c7, c5, 4 @ isb to sych the new cssr&csidr + isb @ isb to sych the new cssr&csidr mrc p15, 1, r1, c0, c0, 0 @ read the new csidr and r2, r1, #7 @ extract the length of the cache lines add r2, r2, #4 @ add 4 (line length offset) @@ -126,10 +126,10 @@ finished: mov r12, #0 @ switch back to cache level 0 mcr p15, 2, r12, c0, c0, 0 @ select current cache level in cssr iflush: - mcr p15, 0, r12, c7, c10, 4 @ DSB + dsb mcr p15, 0, r12, c7, c5, 0 @ invalidate I+BTB - mcr p15, 0, r12, c7, c10, 4 @ DSB - mcr p15, 0, r12, c7, c5, 4 @ ISB + dsb + isb mov pc, lr ENDPROC(__v7_mmu_cache_flush_invalidate) diff --git a/arch/arm/cpu/common.c b/arch/arm/cpu/common.c index dcd8f0b732..7d749967e1 100644 --- a/arch/arm/cpu/common.c +++ b/arch/arm/cpu/common.c @@ -63,7 +63,7 @@ void relocate_to_current_adr(void) memset(dynsym, 0, (unsigned long)dynend - (unsigned long)dynsym); arm_early_mmu_cache_flush(); - flush_icache(); + icache_invalidate(); } #ifdef ARM_MULTIARCH diff --git a/arch/arm/cpu/cpu.c b/arch/arm/cpu/cpu.c index b4804634b7..bf604fd60d 100644 --- a/arch/arm/cpu/cpu.c +++ b/arch/arm/cpu/cpu.c @@ -103,7 +103,7 @@ static void arch_shutdown(void) #ifdef CONFIG_MMU mmu_disable(); #endif - flush_icache(); + icache_invalidate(); #if __LINUX_ARM_ARCH__ <= 7 /* diff --git a/arch/arm/cpu/lowlevel.S b/arch/arm/cpu/lowlevel.S index e5baa12346..7696a198e7 100644 --- a/arch/arm/cpu/lowlevel.S +++ b/arch/arm/cpu/lowlevel.S @@ -58,3 +58,10 @@ ENTRY(arm_cpu_lowlevel_init) mov pc, r2 ENDPROC(arm_cpu_lowlevel_init) + +ENTRY(cortex_a7_lowlevel_init) + mrc p15, 0, r12, c1, c0, 1 + orr r12, r12, #(1 << 6) /* Enable SMP for cortex-a7 to make caches work */ + mcr p15, 0, r12, c1, c0, 1 + mov pc, lr +ENDPROC(cortex_a7_lowlevel_init) diff --git a/arch/arm/cpu/start-pbl.c b/arch/arm/cpu/start-pbl.c index 5f1469bb3e..e851b4a2da 100644 --- a/arch/arm/cpu/start-pbl.c +++ b/arch/arm/cpu/start-pbl.c @@ -93,7 +93,7 @@ __noreturn void barebox_single_pbl_start(unsigned long membase, pbl_barebox_uncompress((void*)barebox_base, (void *)pg_start, pg_len); arm_early_mmu_cache_flush(); - flush_icache(); + icache_invalidate(); if (IS_ENABLED(CONFIG_THUMB2_BAREBOX)) barebox = (void *)(barebox_base + 1); diff --git a/arch/arm/cpu/uncompress.c b/arch/arm/cpu/uncompress.c index eeb5a65439..9d7fe0e921 100644 --- a/arch/arm/cpu/uncompress.c +++ b/arch/arm/cpu/uncompress.c @@ -100,7 +100,7 @@ void __noreturn barebox_multi_pbl_start(unsigned long membase, pbl_barebox_uncompress((void*)barebox_base, pg_start, pg_len); arm_early_mmu_cache_flush(); - flush_icache(); + icache_invalidate(); if (IS_ENABLED(CONFIG_THUMB2_BAREBOX)) barebox = (void *)(barebox_base + 1); diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile index cf9d8ea940..4f13d4e372 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 @@ -91,6 +92,8 @@ pbl-dtb-$(CONFIG_MACH_TURRIS_OMNIA) += armada-385-turris-omnia-bb.dtb.o pbl-dtb-$(CONFIG_MACH_UDOO) += imx6q-udoo.dtb.o pbl-dtb-$(CONFIG_MACH_USI_TOPKICK) += kirkwood-topkick-bb.dtb.o pbl-dtb-$(CONFIG_MACH_VARISCITE_MX6) += imx6q-var-custom.dtb.o +pbl-dtb-$(CONFIG_MACH_VEXPRESS) += vexpress-v2p-ca9.dtb.o +pbl-dtb-$(CONFIG_MACH_VEXPRESS) += vexpress-v2p-ca15.dtb.o pbl-dtb-$(CONFIG_MACH_VSCOM_BALTOS) += am335x-baltos-minimal.dtb.o pbl-dtb-$(CONFIG_MACH_WARP7) += imx7s-warp.dtb.o pbl-dtb-$(CONFIG_MACH_VF610_TWR) += vf610-twr.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/dts/socfpga_cyclone5_sockit.dts b/arch/arm/dts/socfpga_cyclone5_sockit.dts index 8df5ed4775..7cb9b96005 100644 --- a/arch/arm/dts/socfpga_cyclone5_sockit.dts +++ b/arch/arm/dts/socfpga_cyclone5_sockit.dts @@ -25,112 +25,4 @@ chosen { stdout-path = &uart0; }; - - leds: gpio-leds { - }; - - buttons: gpio-keys { - }; -}; - -&gpio1 { - status = "okay"; -}; - -&gpio2 { - status = "okay"; -}; - -&leds { - compatible = "gpio-leds"; - - led@0 { - label = "0"; - gpios = <&portb 24 0>; - linux,default-trigger = "heartbeat"; - }; - - led@1 { - label = "1"; - gpios = <&portb 25 0>; - }; - - led@2 { - label = "2"; - gpios = <&portb 26 0>; - }; - - led@3 { - label = "3"; - gpios = <&portb 27 0>; - }; -}; - -&buttons { - compatible = "gpio-keys"; - - key@0 { - label = "F1"; - gpios = <&portc 21 0>; - linux,code = <59>; - }; - - key@1 { - label = "F2"; - gpios = <&portc 22 0>; - linux,code = <60>; - }; - - key@2 { - label = "F3"; - gpios = <&portc 23 0>; - linux,code = <61>; - }; - - key@3 { - label = "F4"; - gpios = <&portc 24 0>; - linux,code = <62>; - }; -}; - -&i2c0 { - status = "disabled"; - - eeprom@51 { - compatible = "atmel,24c32"; - reg = <0x51>; - pagesize = <0x20>; - }; -}; - -&i2c1 { - status = "disabled"; - - adxl345@53 { - compatible = "adi,adxl34x"; - reg = <0x53>; - interrupt-parent = <0x2>; - interrupts = <0x0 0xa6 0x4>; - }; -}; - -&qspi { - status = "okay"; - - flash: flash@0 { - #address-cells = <1>; - #size-cells = <1>; - compatible = "n25q00"; - reg = <0>; - spi-max-frequency = <108000000>; - m25p,fast-read; - cdns,page-size = <256>; - cdns,block-size = <16>; - cdns,read-delay = <4>; - cdns,tshsl-ns = <50>; - cdns,tsd2d-ns = <50>; - cdns,tchsh-ns = <4>; - cdns,tslch-ns = <4>; - }; }; diff --git a/arch/arm/dts/vexpress-v2p-ca15.dts b/arch/arm/dts/vexpress-v2p-ca15.dts new file mode 100644 index 0000000000..211eaccb62 --- /dev/null +++ b/arch/arm/dts/vexpress-v2p-ca15.dts @@ -0,0 +1,27 @@ +#include <arm/vexpress-v2p-ca15_a7.dts> + +/ { + barebox_environment { + compatible = "barebox,environment"; + device-path = &barebox_env; + }; + + smb@8000000 { + motherboard { + flash@0,00000000 { + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "barebox"; + reg = <0x0 0x80000>; + }; + + barebox_env: partition@80000 { + label = "barebox-environment"; + reg = <0x80000 0x80000>; + }; + }; + }; + }; +}; diff --git a/arch/arm/dts/vexpress-v2p-ca9.dts b/arch/arm/dts/vexpress-v2p-ca9.dts new file mode 100644 index 0000000000..d0975330f2 --- /dev/null +++ b/arch/arm/dts/vexpress-v2p-ca9.dts @@ -0,0 +1,90 @@ +#include <arm/vexpress-v2p-ca9.dts> + +/ { + barebox_environment { + compatible = "barebox,environment"; + device-path = &barebox_env; + }; + + aliases { + state = &state; + }; + + smb@4000000 { + motherboard { + flash@0,00000000 { + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "barebox"; + reg = <0x0 0x80000>; + }; + + barebox_env: partition@80000 { + label = "barebox-environment"; + reg = <0x80000 0x80000>; + }; + + state_storage: partition@100000 { + label = "barebox-state"; + reg = <0x100000 0x100000>; + }; + }; + }; + }; + + /* State: mutable part */ + state: state { + magic = <0x4d433230>; + compatible = "barebox,state"; + backend-type = "raw"; + backend = <&state_storage>; + backend-stridesize = <0x40>; + backend-storage-type = "circular"; + #address-cells = <1>; + #size-cells = <1>; + + bootstate { + #address-cells = <1>; + #size-cells = <1>; + + system0 { /* the node's name here must match the subnode's name in the 'bootstate' node */ + #address-cells = <1>; + #size-cells = <1>; + + remaining_attempts@0 { + reg = <0x0 0x4>; + type = "uint32"; + default = <3>; + }; + priority@4 { + reg = <0x4 0x4>; + type = "uint32"; + default = <20>; + }; + }; + + system1 { /* the node's name here must match the subnode's name in the 'bootstate' node */ + #address-cells = <1>; + #size-cells = <1>; + + remaining_attempts@8 { + reg = <0x8 0x4>; + type = "uint32"; + default = <3>; + }; + priority@c { + reg = <0xC 0x4>; + type = "uint32"; + default = <20>; + }; + }; + + last_chosen@10 { + reg = <0x10 0x4>; + type = "uint32"; + }; + }; + }; +}; diff --git a/arch/arm/include/asm/barebox-arm-head.h b/arch/arm/include/asm/barebox-arm-head.h index 0a2eb6bdca..bd9c9b1c4f 100644 --- a/arch/arm/include/asm/barebox-arm-head.h +++ b/arch/arm/include/asm/barebox-arm-head.h @@ -6,6 +6,7 @@ #ifndef __ASSEMBLY__ void arm_cpu_lowlevel_init(void); +void cortex_a7_lowlevel_init(void); /* * 32 bytes at this offset is reserved in the barebox head for board/SoC diff --git a/arch/arm/include/asm/cache.h b/arch/arm/include/asm/cache.h index 8fcdb64f74..b5460a7876 100644 --- a/arch/arm/include/asm/cache.h +++ b/arch/arm/include/asm/cache.h @@ -6,7 +6,7 @@ extern void v8_invalidate_icache_all(void); extern void v8_dcache_all(void); #endif -static inline void flush_icache(void) +static inline void icache_invalidate(void) { #if __LINUX_ARM_ARCH__ <= 7 asm volatile("mcr p15, 0, %0, c7, c5, 0" : : "r" (0)); diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig index 92440e3a75..1578875e95 100644 --- a/arch/arm/mach-imx/Kconfig +++ b/arch/arm/mach-imx/Kconfig @@ -414,6 +414,10 @@ config MACH_FREESCALE_MX7_SABRESD https://goo.gl/6EKGdk +config MACH_NXP_IMX6ULL_EVK + bool "NXP i.MX6ull EVK Board" + select ARCH_IMX6UL + endif # ---------------------------------------------------------- diff --git a/arch/arm/mach-imx/cpu_init.c b/arch/arm/mach-imx/cpu_init.c index 2b388cad8c..6a6c4c5210 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,12 @@ void imx6_cpu_lowlevel_init(void) enable_arm_errata_845369_war(); } +void imx6ul_cpu_lowlevel_init(void) +{ + cortex_a7_lowlevel_init(); + 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..f68dc875b0 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 imx6ul_cpu_lowlevel_init(void); void imx7_cpu_lowlevel_init(void); void vf610_cpu_lowlevel_init(void); 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/arch/arm/mach-vexpress/Kconfig b/arch/arm/mach-vexpress/Kconfig index bf1dd5a791..aaa535f073 100644 --- a/arch/arm/mach-vexpress/Kconfig +++ b/arch/arm/mach-vexpress/Kconfig @@ -2,13 +2,18 @@ if ARCH_VEXPRESS config ARCH_TEXT_BASE hex - default 0x83f00000 + default 0x0 choice prompt "ARM Board type" config MACH_VEXPRESS bool "ARM Vexpress" + select RELOCATABLE + select HAVE_PBL_MULTI_IMAGES + select OFTREE + select OFDEVICE + select COMMON_CLK_OF_PROVIDER endchoice diff --git a/arch/arm/mach-vexpress/Makefile b/arch/arm/mach-vexpress/Makefile index 74b4a0feb2..9a06e648a6 100644 --- a/arch/arm/mach-vexpress/Makefile +++ b/arch/arm/mach-vexpress/Makefile @@ -1,3 +1,2 @@ obj-y += v2m.o -obj-y += devices.o obj-y += reset.o diff --git a/arch/arm/mach-vexpress/devices.c b/arch/arm/mach-vexpress/devices.c deleted file mode 100644 index 5b53011924..0000000000 --- a/arch/arm/mach-vexpress/devices.c +++ /dev/null @@ -1,83 +0,0 @@ -/* - * Copyright (C) 2013 Jean-Christophe PLAGNIOL-VILLARD <plagnio@jcrosoft.com> - * - * GPLv2 only - */ - -#include <common.h> - -#include <linux/amba/bus.h> - -#include <asm/memory.h> - -#include <mach/devices.h> - -void vexpress_a9_legacy_add_ddram(u32 ddr0_size, u32 ddr1_size) -{ - arm_add_mem_device("ram0", 0x60000000, ddr0_size); - - if (ddr1_size) - arm_add_mem_device("ram1", 0x80000000, ddr1_size); -} - -void vexpress_a9_legacy_register_uart(unsigned id) -{ - resource_size_t start; - - switch (id) { - case 0: - start = 0x10009000; - break; - case 1: - start = 0x1000a000; - break; - case 2: - start = 0x1000b000; - break; - case 3: - start = 0x1000c000; - break; - default: - return; - } - amba_apb_device_add(NULL, "uart-pl011", id, start, 4096, NULL, 0); -} - -void vexpress_a9_legacy_register_mmc(struct mmci_platform_data *plat) -{ - amba_apb_device_add(NULL, "mmci-pl18x", DEVICE_ID_SINGLE, 0x10005000, - 4096, plat, 0); -} - -void vexpress_add_ddram(u32 size) -{ - arm_add_mem_device("ram1", 0x80000000, size); -} - -void vexpress_register_uart(unsigned id) -{ - resource_size_t start; - - switch (id) { - case 0: - start = 0x1c090000; - break; - case 1: - start = 0x1c0a0000; - break; - case 2: - start = 0x1c0b0000; - break; - case 3: - start = 0x1c0c0000; - break; - default: - return; - } - amba_apb_device_add(NULL, "uart-pl011", id, start, 4096, NULL, 0); -} - -void vexpress_register_mmc(struct mmci_platform_data *plat) -{ - amba_apb_device_add(NULL, "mmci-pl18x", DEVICE_ID_SINGLE, 0x1c050000, 4096, plat, 0); -} diff --git a/arch/arm/mach-vexpress/include/mach/devices.h b/arch/arm/mach-vexpress/include/mach/devices.h index 96d1400501..bef8c8b94f 100644 --- a/arch/arm/mach-vexpress/include/mach/devices.h +++ b/arch/arm/mach-vexpress/include/mach/devices.h @@ -9,18 +9,9 @@ #include <linux/amba/mmci.h> -void vexpress_a9_legacy_add_ddram(u32 ddr0_size, u32 ddr1_size); -void vexpress_add_ddram(u32 size); - -void vexpress_a9_legacy_register_uart(unsigned id); -void vexpress_register_uart(unsigned id); - void vexpress_a9_legacy_init(void); void vexpress_init(void); -void vexpress_a9_legacy_register_mmc(struct mmci_platform_data *plat); -void vexpress_register_mmc(struct mmci_platform_data *plat); - extern void *v2m_wdt_base; extern void *v2m_sysreg_base; diff --git a/arch/arm/mach-vexpress/v2m.c b/arch/arm/mach-vexpress/v2m.c index 025bbb17fc..3535262848 100644 --- a/arch/arm/mach-vexpress/v2m.c +++ b/arch/arm/mach-vexpress/v2m.c @@ -19,31 +19,6 @@ void __iomem *v2m_sysreg_base; -static const char *v2m_osc2_periphs[] = { - "mb:mmci", "mmci-pl18x", /* PL180 MMCI */ - "mb:uart0", "uart-pl0110", /* PL011 UART0 */ - "mb:uart1", "uart-pl0111", /* PL011 UART1 */ - "mb:uart2", "uart-pl0112", /* PL011 UART2 */ - "mb:uart3", "uart-pl0113", /* PL011 UART3 */ -}; - -static void v2m_clk_init(void) -{ - struct clk *clk; - int i; - - clk = clk_fixed("dummy_apb_pclk", 0); - clk_register_clkdev(clk, "apb_pclk", NULL); - - clk = clk_fixed("mb:sp804_clk", 1000000); - clk_register_clkdev(clk, NULL, "sp804"); - - clk = clk_fixed("mb:osc2", 24000000); - for (i = 0; i < ARRAY_SIZE(v2m_osc2_periphs); i++) - clk_register_clkdev(clk, NULL, v2m_osc2_periphs[i]); - -} - static void v2m_sysctl_init(void __iomem *base) { u32 scctrl; @@ -58,21 +33,11 @@ static void v2m_sysctl_init(void __iomem *base) writel(scctrl, base + SCCTRL); } -static void __init v2m_sp804_init(void __iomem *base) -{ - writel(0, base + TIMER_1_BASE + TIMER_CTRL); - - amba_apb_device_add(NULL, "sp804", DEVICE_ID_SINGLE, (resource_size_t)base, 4096, NULL, 0); -} - void vexpress_a9_legacy_init(void) { v2m_wdt_base = IOMEM(0x1000f000); v2m_sysreg_base = IOMEM(0x10001000); v2m_sysctl_init(IOMEM(0x10001000)); - v2m_clk_init(); - - v2m_sp804_init(IOMEM(0x10011000)); } void vexpress_init(void) @@ -80,7 +45,4 @@ void vexpress_init(void) v2m_wdt_base = IOMEM(0x1c0f0000); v2m_sysreg_base = IOMEM(0x1c020000); v2m_sysctl_init(IOMEM(0x1c020000)); - v2m_clk_init(); - - v2m_sp804_init(IOMEM(0x1c110000)); } |