diff options
Diffstat (limited to 'arch/arm/boards')
28 files changed, 9 insertions, 410 deletions
diff --git a/arch/arm/boards/Makefile b/arch/arm/boards/Makefile index f8cdd90ed6..7a3645df11 100644 --- a/arch/arm/boards/Makefile +++ b/arch/arm/boards/Makefile @@ -60,7 +60,6 @@ obj-$(CONFIG_MACH_GUF_SANTARO) += guf-santaro/ obj-$(CONFIG_MACH_GUF_VINCELL) += guf-vincell/ obj-$(CONFIG_MACH_GW_VENTANA) += gateworks-ventana/ obj-$(CONFIG_MACH_HABA_KNX_LITE) += haba-knx/ -obj-$(CONFIG_MACH_HIGHBANK) += highbank/ obj-$(CONFIG_MACH_IMX21ADS) += freescale-mx21-ads/ obj-$(CONFIG_MACH_IMX233_OLINUXINO) += imx233-olinuxino/ obj-$(CONFIG_MACH_IMX27ADS) += freescale-mx27-ads/ @@ -163,8 +162,7 @@ obj-$(CONFIG_MACH_ZEDBOARD) += avnet-zedboard/ obj-$(CONFIG_MACH_ZYLONITE) += zylonite/ obj-$(CONFIG_MACH_VARISCITE_MX6) += variscite-mx6/ obj-$(CONFIG_MACH_VSCOM_BALTOS) += vscom-baltos/ -obj-$(CONFIG_MACH_QEMU_VIRT64) += qemu-virt64/ -obj-$(CONFIG_MACH_VIRT) += qemu-virt/ +obj-$(CONFIG_BOARD_ARM_VIRT) += qemu-virt/ obj-$(CONFIG_MACH_WARP7) += element14-warp7/ obj-$(CONFIG_MACH_WEBASTO_CCBV2) += webasto-ccbv2/ obj-$(CONFIG_MACH_VF610_TWR) += freescale-vf610-twr/ diff --git a/arch/arm/boards/highbank/Makefile b/arch/arm/boards/highbank/Makefile deleted file mode 100644 index e5e4536cd1..0000000000 --- a/arch/arm/boards/highbank/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -obj-y += init.o - -lwl-y += lowlevel.o -bbenv-$(CONFIG_DEFAULT_ENVIRONMENT_GENERIC) += defaultenv-highbank diff --git a/arch/arm/boards/highbank/defaultenv-highbank/boot.d/010-ahci-boot b/arch/arm/boards/highbank/defaultenv-highbank/boot.d/010-ahci-boot deleted file mode 120000 index 3672f0495e..0000000000 --- a/arch/arm/boards/highbank/defaultenv-highbank/boot.d/010-ahci-boot +++ /dev/null @@ -1 +0,0 @@ -../boot/ahci-boot
\ No newline at end of file diff --git a/arch/arm/boards/highbank/defaultenv-highbank/boot.d/011-ahci b/arch/arm/boards/highbank/defaultenv-highbank/boot.d/011-ahci deleted file mode 120000 index 36b3b2815b..0000000000 --- a/arch/arm/boards/highbank/defaultenv-highbank/boot.d/011-ahci +++ /dev/null @@ -1 +0,0 @@ -../boot/ahci
\ No newline at end of file diff --git a/arch/arm/boards/highbank/defaultenv-highbank/boot.d/020-mmc-boot b/arch/arm/boards/highbank/defaultenv-highbank/boot.d/020-mmc-boot deleted file mode 120000 index 85c19bbd66..0000000000 --- a/arch/arm/boards/highbank/defaultenv-highbank/boot.d/020-mmc-boot +++ /dev/null @@ -1 +0,0 @@ -../boot/mmc-boot
\ No newline at end of file diff --git a/arch/arm/boards/highbank/defaultenv-highbank/boot.d/021-mmc b/arch/arm/boards/highbank/defaultenv-highbank/boot.d/021-mmc deleted file mode 120000 index 5af95d0ac7..0000000000 --- a/arch/arm/boards/highbank/defaultenv-highbank/boot.d/021-mmc +++ /dev/null @@ -1 +0,0 @@ -../boot/mmc
\ No newline at end of file diff --git a/arch/arm/boards/highbank/defaultenv-highbank/boot.d/030-net b/arch/arm/boards/highbank/defaultenv-highbank/boot.d/030-net deleted file mode 120000 index 70b8ea3965..0000000000 --- a/arch/arm/boards/highbank/defaultenv-highbank/boot.d/030-net +++ /dev/null @@ -1 +0,0 @@ -../boot/net
\ No newline at end of file diff --git a/arch/arm/boards/highbank/defaultenv-highbank/boot.d/031-net-eth1 b/arch/arm/boards/highbank/defaultenv-highbank/boot.d/031-net-eth1 deleted file mode 120000 index 5a30a308c7..0000000000 --- a/arch/arm/boards/highbank/defaultenv-highbank/boot.d/031-net-eth1 +++ /dev/null @@ -1 +0,0 @@ -../boot/net-eth1
\ No newline at end of file diff --git a/arch/arm/boards/highbank/defaultenv-highbank/boot/ahci b/arch/arm/boards/highbank/defaultenv-highbank/boot/ahci deleted file mode 100644 index 46a8c1b321..0000000000 --- a/arch/arm/boards/highbank/defaultenv-highbank/boot/ahci +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh - -path="/mnt/ahci" - -global.bootm.image="${path}/zImage" - -. /env/data/oftree - -oftree=${path}/oftree -if [ -f $oftree ]; then - global.bootm.oftree="$oftree" -fi - -# The rootdevice may actually be mmcblk1p2 if a card -# is inserted to the back MMC slot -global.linux.bootargs.dyn.root="root=/dev/sda2" diff --git a/arch/arm/boards/highbank/defaultenv-highbank/boot/ahci-boot b/arch/arm/boards/highbank/defaultenv-highbank/boot/ahci-boot deleted file mode 100644 index 919eac54a7..0000000000 --- a/arch/arm/boards/highbank/defaultenv-highbank/boot/ahci-boot +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh - -path="/mnt/ahci-boot" - -global.bootm.image="${path}/zImage" - -. /env/data/oftree - -oftree=${path}/oftree -if [ -f $oftree ]; then - global.bootm.oftree="$oftree" -fi - -# The rootdevice may actually be mmcblk1p2 if a card -# is inserted to the back MMC slot -global.linux.bootargs.dyn.root="root=/dev/sda2" diff --git a/arch/arm/boards/highbank/defaultenv-highbank/boot/mmc b/arch/arm/boards/highbank/defaultenv-highbank/boot/mmc deleted file mode 100644 index 0fff5b4a81..0000000000 --- a/arch/arm/boards/highbank/defaultenv-highbank/boot/mmc +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh - -path="/mnt/mmc" - -global.bootm.image="${path}/zimage" - -. /env/data/oftree - -oftree=${path}/oftree -if [ -f $oftree ]; then - global.bootm.oftree="$oftree" -fi - -# The rootdevice may actually be mmcblk1p2 if a card -# is inserted to the back MMC slot -global.linux.bootargs.dyn.root="root=/dev/mmcblk0p2" diff --git a/arch/arm/boards/highbank/defaultenv-highbank/boot/mmc-boot b/arch/arm/boards/highbank/defaultenv-highbank/boot/mmc-boot deleted file mode 100644 index f3ae301e1b..0000000000 --- a/arch/arm/boards/highbank/defaultenv-highbank/boot/mmc-boot +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh - -path="/mnt/mmc-boot" - -global.bootm.image="${path}/zimage" - -. /env/data/oftree - -oftree=${path}/oftree -if [ -f $oftree ]; then - global.bootm.oftree="$oftree" -fi - -# The rootdevice may actually be mmcblk1p2 if a card -# is inserted to the back MMC slot -global.linux.bootargs.dyn.root="root=/dev/mmcblk0p2" diff --git a/arch/arm/boards/highbank/defaultenv-highbank/boot/net b/arch/arm/boards/highbank/defaultenv-highbank/boot/net deleted file mode 100644 index 6a700087fb..0000000000 --- a/arch/arm/boards/highbank/defaultenv-highbank/boot/net +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/sh - -ethact eth0 - -path="/mnt/tftp" - -. /env/data/oftree - -global.bootm.image="${path}/${global.user}-linux-${global.hostname}" -#global.bootm.oftree="${path}/${global.user}-oftree-${global.hostname}" -nfsroot="/home/${global.user}/nfsroot/${global.hostname}" -bootargs-ip -global.linux.bootargs.dyn.root="root=/dev/nfs nfsroot=$nfsroot,v3,tcp" diff --git a/arch/arm/boards/highbank/defaultenv-highbank/boot/net-eth1 b/arch/arm/boards/highbank/defaultenv-highbank/boot/net-eth1 deleted file mode 100644 index 1c70bdf3f0..0000000000 --- a/arch/arm/boards/highbank/defaultenv-highbank/boot/net-eth1 +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/sh - -ethact eth1 - -path="/mnt/tftp" - -. /env/data/oftree - -global.bootm.image="${path}/${global.user}-linux-${global.hostname}" -#global.bootm.oftree="${path}/${global.user}-oftree-${global.hostname}" -nfsroot="/home/${global.user}/nfsroot/${global.hostname}" -bootargs-ip -global.linux.bootargs.dyn.root="root=/dev/nfs nfsroot=$nfsroot,v3,tcp" diff --git a/arch/arm/boards/highbank/defaultenv-highbank/data/oftree b/arch/arm/boards/highbank/defaultenv-highbank/data/oftree deleted file mode 100644 index 9a94b310c3..0000000000 --- a/arch/arm/boards/highbank/defaultenv-highbank/data/oftree +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh - -#device tree provided by the firmware -global.bootm.oftree="/dev/dtb" diff --git a/arch/arm/boards/highbank/defaultenv-highbank/init/001-dtb-probe b/arch/arm/boards/highbank/defaultenv-highbank/init/001-dtb-probe deleted file mode 100644 index 610db1500e..0000000000 --- a/arch/arm/boards/highbank/defaultenv-highbank/init/001-dtb-probe +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh - -if [ -e /dev/dtb ] -then - oftree -l /dev/dtb - oftree -p -fi diff --git a/arch/arm/boards/highbank/defaultenv-highbank/init/automount b/arch/arm/boards/highbank/defaultenv-highbank/init/automount deleted file mode 100644 index eb5c07a739..0000000000 --- a/arch/arm/boards/highbank/defaultenv-highbank/init/automount +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/sh - -# automount tftp server based on $eth0.serverip - -mkdir -p /mnt/tftp -automount /mnt/tftp 'ifup eth0 && mount -t tftp $eth0.serverip /mnt/tftp' - -# SD card slot, boot partition -mkdir -p /mnt/mmc-boot -automount -d /mnt/mmc 'mount /dev/disk0.boot /mnt/mmc-boot' - -# SD card slot, first partition -mkdir -p /mnt/mmc -automount -d /mnt/mmc 'mount /dev/disk0.0 /mnt/mmc' - -# AHCI, boot partition -mkdir -p /mnt/ahci-boot -automount -d /mnt/ahci 'mount /dev/ata0.boot /mnt/ahci-boot' - -# AHCI, first partition -mkdir -p /mnt/ahci -automount -d /mnt/ahci 'mount /dev/ata0.0 /mnt/ahci' diff --git a/arch/arm/boards/highbank/defaultenv-highbank/nv/boot.default b/arch/arm/boards/highbank/defaultenv-highbank/nv/boot.default deleted file mode 100644 index c47e1b2bca..0000000000 --- a/arch/arm/boards/highbank/defaultenv-highbank/nv/boot.default +++ /dev/null @@ -1 +0,0 @@ -/env/boot.d diff --git a/arch/arm/boards/highbank/defaultenv-highbank/nv/bootm.oftree b/arch/arm/boards/highbank/defaultenv-highbank/nv/bootm.oftree deleted file mode 100644 index c373173805..0000000000 --- a/arch/arm/boards/highbank/defaultenv-highbank/nv/bootm.oftree +++ /dev/null @@ -1 +0,0 @@ -/dev/dtb diff --git a/arch/arm/boards/highbank/defaultenv-highbank/nv/linux.bootargs.console b/arch/arm/boards/highbank/defaultenv-highbank/nv/linux.bootargs.console deleted file mode 100644 index 826debe7c2..0000000000 --- a/arch/arm/boards/highbank/defaultenv-highbank/nv/linux.bootargs.console +++ /dev/null @@ -1 +0,0 @@ -console=ttyAMA0,115200n8 CONSOLE=/dev/ttyAMA0 diff --git a/arch/arm/boards/highbank/init.c b/arch/arm/boards/highbank/init.c deleted file mode 100644 index 32e217321a..0000000000 --- a/arch/arm/boards/highbank/init.c +++ /dev/null @@ -1,144 +0,0 @@ -/* - * Copyright (C) 2013 Jean-Christophe PLAGNIOL-VILLARD <plagnio@jcrosoft.com> - * - * GPLv2 only - */ - -#include <common.h> -#include <init.h> -#include <asm/armlinux.h> -#include <asm/system_info.h> -#include <generated/mach-types.h> -#include <mach/devices.h> -#include <mach/hardware.h> -#include <mach/sysregs.h> -#include <environment.h> -#include <partition.h> -#include <linux/sizes.h> -#include <io.h> -#include <of.h> -#include <envfs.h> - -#define FIRMWARE_DTB_BASE 0x1000 - -#define HB_OPP_VERSION 0 - -struct fdt_header *fdt = NULL; - -static int hb_fixup(struct device_node *root, void *unused) -{ - struct device_node *node; - u32 reg = readl(sregs_base + HB_SREG_A9_PWRDOM_DATA); - u32 *opp_table = (u32 *)HB_SYSRAM_OPP_TABLE_BASE; - u32 dtb_table[2*10]; - u32 i; - u32 num_opps; - __be32 latency; - - if (!(reg & HB_PWRDOM_STAT_SATA)) { - for_each_compatible_node_from(node, root, NULL, "calxeda,hb-ahci") - of_property_write_string(node, "status", "disabled"); - } - - if (!(reg & HB_PWRDOM_STAT_EMMC)) { - for_each_compatible_node_from(node, root, NULL, "calxeda,hb-sdhci") - of_property_write_string(node, "status", "disabled"); - } - - if ((opp_table[0] >> 16) != HB_OPP_VERSION) - return 0; - - node = of_find_node_by_path("/cpus/cpu@0"); - if (!node) - return 0; - - num_opps = opp_table[0] & 0xff; - - for (i = 0; i < num_opps; i++) { - dtb_table[2 * i] = cpu_to_be32(opp_table[3 + 3 * i]); - dtb_table[2 * i + 1] = cpu_to_be32(opp_table[2 + 3 * i]); - } - - latency = cpu_to_be32(opp_table[1]); - - of_set_property(node, "transition-latency", &latency, 4, 1); - of_set_property(node, "operating-points", dtb_table, 8 * num_opps, 1); - - return 0; -} - -static int highbank_mem_init(void) -{ - struct device_node *root, *np; - int ret; - - /* load by the firmware at 0x1000 */ - fdt = IOMEM(FIRMWARE_DTB_BASE); - - root = of_unflatten_dtb(fdt); - if (IS_ERR(root)) { - pr_warn("no dtb found at 0x1000 use default configuration\n"); - fdt = NULL; - goto not_found; - } - - of_set_root_node(root); - - np = of_find_node_by_path("/memory"); - if (!np) { - pr_warn("no memory node use default configuration\n"); - goto not_found; - } - - ret = of_add_memory(np, true); - if (ret) { - pr_warn("memory node: probe failed use default configuration\n"); - goto not_found; - } - - pr_info("highbank: dtb probed memory size\n"); - - return 0; -not_found: - highbank_add_ddram(4089 << 20); - return 0; -} -mem_initcall(highbank_mem_init); - -static int highbank_devices_init(void) -{ - of_register_fixup(hb_fixup, NULL); - if (!fdt) { - highbank_register_gpio(0); - highbank_register_gpio(1); - highbank_register_gpio(2); - highbank_register_gpio(3); - highbank_register_ahci(); - highbank_register_xgmac(0); - highbank_register_xgmac(1); - } else { - fdt = of_get_fixed_tree(NULL); - add_mem_device("dtb", (unsigned long)fdt, be32_to_cpu(fdt->totalsize), - IORESOURCE_MEM_WRITEABLE); - devfs_add_partition("ram0", FIRMWARE_DTB_BASE, SZ_64K, DEVFS_PARTITION_FIXED, "firmware-dtb"); - } - - devfs_add_partition("nvram", 0x00000, SZ_16K, DEVFS_PARTITION_FIXED, "env0"); - - if (IS_ENABLED(CONFIG_DEFAULT_ENVIRONMENT_GENERIC)) - defaultenv_append_directory(defaultenv_highbank); - - return 0; -} -device_initcall(highbank_devices_init); - -static int highbank_console_init(void) -{ - barebox_set_model("Calxeda Highbank"); - barebox_set_hostname("highbank"); - - highbank_register_uart(); - - return 0; -} -console_initcall(highbank_console_init); diff --git a/arch/arm/boards/highbank/lowlevel.c b/arch/arm/boards/highbank/lowlevel.c deleted file mode 100644 index 6363ec96df..0000000000 --- a/arch/arm/boards/highbank/lowlevel.c +++ /dev/null @@ -1,17 +0,0 @@ -/* - * Copyright (C) 2013 Jean-Christophe PLAGNIOL-VILLARD <plagnio@jcrosoft.com> - * - * GPLv2 only - */ - -#include <common.h> -#include <linux/sizes.h> -#include <asm/barebox-arm-head.h> -#include <asm/barebox-arm.h> -#include <asm/system_info.h> - -void __naked barebox_arm_reset_vector(uint32_t r0, uint32_t r1, uint32_t r2) -{ - arm_cpu_lowlevel_init(); - barebox_arm_entry(0x00000000, SZ_512M, NULL); -} diff --git a/arch/arm/boards/qemu-virt/board.c b/arch/arm/boards/qemu-virt/board.c index 9d8c90eb5b..d0a7e3da4f 100644 --- a/arch/arm/boards/qemu-virt/board.c +++ b/arch/arm/boards/qemu-virt/board.c @@ -9,6 +9,12 @@ #include <asm/system_info.h> #include <asm/barebox-arm.h> +#ifdef CONFIG_64BIT +#define MACHINE "virt64" +#else +#define MACHINE "virt" +#endif + extern char __dtb_overlay_of_flash_start[]; static int replace_dtb(void) { @@ -43,14 +49,14 @@ pure_initcall(replace_dtb); static int virt_probe(struct device_d *dev) { - char *hostname = "virt"; + const char *hostname = MACHINE; if (cpu_is_cortex_a7()) hostname = "virt-a7"; else if (cpu_is_cortex_a15()) hostname = "virt-a15"; - barebox_set_model("ARM QEMU virt"); + barebox_set_model("ARM QEMU " MACHINE); barebox_set_hostname(hostname); return 0; diff --git a/arch/arm/boards/qemu-virt64/Makefile b/arch/arm/boards/qemu-virt64/Makefile deleted file mode 100644 index b394dde0a1..0000000000 --- a/arch/arm/boards/qemu-virt64/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -obj-y += init.o -lwl-y += lowlevel.o lowlevel_init.o -bbenv-$(CONFIG_DEFAULT_ENVIRONMENT_GENERIC) += defaultenv-qemu-virt64 diff --git a/arch/arm/boards/qemu-virt64/defaultenv-qemu-virt64/config b/arch/arm/boards/qemu-virt64/defaultenv-qemu-virt64/config deleted file mode 100644 index 781dbfefa6..0000000000 --- a/arch/arm/boards/qemu-virt64/defaultenv-qemu-virt64/config +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh - -autoboot_timeout=3 - -bootargs="console=ttyAMA0,115200" - -# 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/qemu-virt64/init.c b/arch/arm/boards/qemu-virt64/init.c deleted file mode 100644 index 19cfcae1f0..0000000000 --- a/arch/arm/boards/qemu-virt64/init.c +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright (C) 2016 Raphaƫl Poggi <poggi.raph@gmail.com> - * - * GPLv2 only - */ - -#include <common.h> -#include <init.h> -#include <asm/armlinux.h> -#include <asm/system_info.h> -#include <asm/pgtable64.h> -#include <mach/devices.h> -#include <environment.h> -#include <linux/sizes.h> -#include <io.h> -#include <envfs.h> -#include <globalvar.h> -#include <asm/mmu.h> - -static int virt_mem_init(void) -{ - virt_add_ddram(SZ_2G); - - return 0; -} -mem_initcall(virt_mem_init); - -static int virt_env_init(void) -{ - add_cfi_flash_device(0, 0x00000000, SZ_128M, 0); - - devfs_add_partition("nor0", 0x00000, 0x40000, DEVFS_PARTITION_FIXED, "self0"); - devfs_add_partition("nor0", 0x40000, 0x20000, DEVFS_PARTITION_FIXED, "env0"); - - if (IS_ENABLED(CONFIG_DEFAULT_ENVIRONMENT_GENERIC)) - defaultenv_append_directory(defaultenv_qemu_virt64); - - return 0; -} -device_initcall(virt_env_init); - -static int virt_console_init(void) -{ - virt_register_uart(0); - - return 0; -} -console_initcall(virt_console_init); - -static int virt_core_init(void) -{ - char *hostname = "virt64"; - - if (cpu_is_cortex_a53()) - hostname = "virt64-a53"; - else if (cpu_is_cortex_a57()) - hostname = "virt64-a57"; - - barebox_set_model("ARM QEMU virt64"); - barebox_set_hostname(hostname); - - return 0; -} -postcore_initcall(virt_core_init); diff --git a/arch/arm/boards/qemu-virt64/lowlevel.c b/arch/arm/boards/qemu-virt64/lowlevel.c deleted file mode 100644 index fcb052369a..0000000000 --- a/arch/arm/boards/qemu-virt64/lowlevel.c +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Copyright (C) 2013 Jean-Christophe PLAGNIOL-VILLARD <plagnio@jcrosoft.com> - * - * GPLv2 only - */ - -#include <common.h> -#include <linux/sizes.h> -#include <asm/barebox-arm-head.h> -#include <asm/barebox-arm.h> -#include <asm/system_info.h> - -void qemu_virt64_start(uint32_t, uint32_t, uint32_t); - -void noinline qemu_virt64_start(uint32_t r0, uint32_t r1, uint32_t r2) -{ - arm_cpu_lowlevel_init(); - arm_setup_stack(0x40000000 + SZ_2G - SZ_16K); - - barebox_arm_entry(0x40000000, SZ_2G, NULL); -} diff --git a/arch/arm/boards/qemu-virt64/lowlevel_init.S b/arch/arm/boards/qemu-virt64/lowlevel_init.S deleted file mode 100644 index 1967fadb6c..0000000000 --- a/arch/arm/boards/qemu-virt64/lowlevel_init.S +++ /dev/null @@ -1,12 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0-or-later */ -#include <linux/linkage.h> -#include <asm/barebox-arm64.h> - -/* The DRAM is already setup */ -#define STACK_TOP 0x80000000 - -ENTRY_PROC(barebox_arm_reset_vector) - mov x0, #STACK_TOP - mov sp, x0 - b qemu_virt64_start -ENTRY_PROC_END(barebox_arm_reset_vector) |