diff --git a/Makefile b/Makefile index cc79d95..a780bed 100644 --- a/Makefile +++ b/Makefile @@ -519,7 +519,7 @@ images/%.s: barebox.bin FORCE $(Q)$(MAKE) $(build)=images $@ -ifdef CONFIG_PBL_MULTI_IMAGES +ifdef CONFIG_PBL_IMAGE all: barebox.bin images else all: barebox-flash-image barebox-flash-images diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index b227bb7..349ad33 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -25,20 +25,6 @@ menu "System Type" -config BUILTIN_DTB - bool "link a DTB into the barebox image" - depends on OFTREE - depends on !HAVE_PBL_MULTI_IMAGES - -config BUILTIN_DTB_NAME - string "DTB to build into the barebox image" - depends on BUILTIN_DTB - default "canon-a1100" if MACH_CANON_A1100 - default "imx51-genesi-efika-sb" if MACH_EFIKA_MX_SMARTBOOK - default "versatile-pb" if ARCH_VERSATILE_PB - default "virt2real" if MACH_VIRT2REAL - default "module-mb7707" if MACH_MB7707 - choice prompt "ARM system type" @@ -145,10 +131,6 @@ select CLKDEV_LOOKUP select HAS_DEBUG_LL -config ARCH_NETX - bool "Hilscher NetX based" - select CPU_ARM926T - config ARCH_NOMADIK bool "STMicroelectronics Nomadik" select CPU_ARM926T @@ -298,7 +280,6 @@ source "arch/arm/mach-layerscape/Kconfig" source "arch/arm/mach-mxs/Kconfig" source "arch/arm/mach-mvebu/Kconfig" -source "arch/arm/mach-netx/Kconfig" source "arch/arm/mach-nomadik/Kconfig" source "arch/arm/mach-omap/Kconfig" source "arch/arm/mach-pxa/Kconfig" diff --git a/arch/arm/Makefile b/arch/arm/Makefile index 5cb46f6..13e8cee 100644 --- a/arch/arm/Makefile +++ b/arch/arm/Makefile @@ -92,7 +92,6 @@ machine-$(CONFIG_ARCH_MXS) := mxs machine-$(CONFIG_ARCH_MVEBU) := mvebu machine-$(CONFIG_ARCH_NOMADIK) := nomadik -machine-$(CONFIG_ARCH_NETX) := netx machine-$(CONFIG_ARCH_OMAP) := omap machine-$(CONFIG_ARCH_PXA) := pxa machine-$(CONFIG_ARCH_ROCKCHIP) := rockchip @@ -148,23 +147,7 @@ LDFLAGS_barebox += -static endif -ifdef CONFIG_IMAGE_COMPRESSION -KBUILD_BINARY := arch/arm/pbl/zbarebox.bin -else KBUILD_BINARY := barebox.bin -endif - -barebox.netx: $(KBUILD_BINARY) - $(Q)scripts/gen_netx_image -i $< -o barebox.netx \ - --sdramctrl=$(CONFIG_NETX_SDRAM_CTRL) \ - --sdramtimctrl=$(CONFIG_NETX_SDRAM_TIMING_CTRL) \ - --memctrl=$(CONFIG_NETX_MEM_CTRL) \ - --entrypoint=$(CONFIG_TEXT_BASE) \ - --cookie=$(CONFIG_NETX_COOKIE); - -ifeq ($(machine-y),netx) -KBUILD_IMAGE := barebox.netx -endif barebox.s5p: $(KBUILD_BINARY) $(Q)scripts/s5p_cksum $< barebox.s5p @@ -267,10 +250,6 @@ KBUILD_IMAGE := barebox.imximg endif -pbl := arch/arm/pbl -$(pbl)/zbarebox.S $(pbl)/zbarebox.bin $(pbl)/zbarebox: barebox.bin FORCE - $(Q)$(MAKE) $(build)=$(pbl) $@ - archclean: $(MAKE) $(clean)=$(pbl) diff --git a/arch/arm/boards/Makefile b/arch/arm/boards/Makefile index a814ab8..8c0e5e5 100644 --- a/arch/arm/boards/Makefile +++ b/arch/arm/boards/Makefile @@ -81,7 +81,6 @@ 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_NXP_IMX8MQ_EVK) += nxp-imx8mq-evk/ obj-$(CONFIG_MACH_OMAP343xSDP) += omap343xdsp/ diff --git a/arch/arm/boards/canon-a1100/lowlevel.c b/arch/arm/boards/canon-a1100/lowlevel.c index 744ce59..b75a1bf 100644 --- a/arch/arm/boards/canon-a1100/lowlevel.c +++ b/arch/arm/boards/canon-a1100/lowlevel.c @@ -3,10 +3,16 @@ #include #include +extern char __dtb_canon_a1100_start[]; + void __naked barebox_arm_reset_vector(uint32_t r0, uint32_t r1, uint32_t r2) { + void *fdt; + arm_cpu_lowlevel_init(); + fdt = __dtb_canon_a1100_start + get_runtime_offset(); + /* FIXME: can we determine RAM size using CP15 register? * * see http://chdk.setepontos.com/index.php?topic=5980.90 @@ -19,5 +25,6 @@ * The Control Register value (mrc p15, 0, %0, c0, c1, 4) * is 0x00051078. */ - barebox_arm_entry(0x0, SZ_64M, 0); + + barebox_arm_entry(0x0, SZ_64M, fdt); } diff --git a/arch/arm/boards/module-mb7707/lowlevel.c b/arch/arm/boards/module-mb7707/lowlevel.c index 055e432..fc102e2 100644 --- a/arch/arm/boards/module-mb7707/lowlevel.c +++ b/arch/arm/boards/module-mb7707/lowlevel.c @@ -26,9 +26,15 @@ #define MB7707_SRAM_BASE 0x40000000 #define MB7707_SRAM_SIZE SZ_128M +extern char __dtb_module_mb7707_start[]; + void __naked __bare_init barebox_arm_reset_vector(uint32_t r0, uint32_t r1, uint32_t r2) { + void *fdt; + arm_cpu_lowlevel_init(); - barebox_arm_entry(MB7707_SRAM_BASE, MB7707_SRAM_SIZE, 0); + fdt = __dtb_module_mb7707_start + get_runtime_offset(); + + barebox_arm_entry(MB7707_SRAM_BASE, MB7707_SRAM_SIZE, fdt); } diff --git a/arch/arm/boards/netx/Makefile b/arch/arm/boards/netx/Makefile deleted file mode 100644 index 90979ac..0000000 --- a/arch/arm/boards/netx/Makefile +++ /dev/null @@ -1,2 +0,0 @@ -obj-y += netx.o -lwl-y += platform.o diff --git a/arch/arm/boards/netx/netx.c b/arch/arm/boards/netx/netx.c deleted file mode 100644 index a9cb6a5..0000000 --- a/arch/arm/boards/netx/netx.c +++ /dev/null @@ -1,84 +0,0 @@ -/* - * Copyright (C) 2004 Sascha Hauer, Synertronixx GmbH - * - * 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. - * - * - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -struct netx_eth_platform_data eth0_data = { - .xcno = 0, -}; - -struct netx_eth_platform_data eth1_data = { - .xcno = 1, -}; - -static int netx_mem_init(void) -{ - arm_add_mem_device("ram0", 0x80000000, 64 * 1024 * 1024); - - return 0; -} -mem_initcall(netx_mem_init); - -static int netx_devices_init(void) { - add_cfi_flash_device(DEVICE_ID_DYNAMIC, 0xC0000000, 32 * 1024 * 1024, 0); - - add_generic_device("netx-eth", DEVICE_ID_DYNAMIC, NULL, 0, 0, IORESOURCE_MEM, - ð0_data); - add_generic_device("netx-eth", DEVICE_ID_DYNAMIC, NULL, 0, 0, IORESOURCE_MEM, - ð1_data); - - devfs_add_partition("nor0", 0x00000, 0x40000, DEVFS_PARTITION_FIXED, "self0"); - - /* Do not overwrite primary env for now */ - devfs_add_partition("nor0", 0xc0000, 0x80000, DEVFS_PARTITION_FIXED, "env0"); - - protect_file("/dev/env0", 1); - - armlinux_set_architecture(MACH_TYPE_NXDB500); - - return 0; -} - -device_initcall(netx_devices_init); - -static int netx_console_init(void) -{ - /* configure gpio for serial */ - *(volatile unsigned long *)(0x00100800) = 2; - *(volatile unsigned long *)(0x00100804) = 2; - *(volatile unsigned long *)(0x00100808) = 2; - *(volatile unsigned long *)(0x0010080c) = 2; - - barebox_set_model("Hilscher Netx nxdb500"); - barebox_set_hostname("nxdb500"); - - add_generic_device("netx_serial", DEVICE_ID_DYNAMIC, NULL, NETX_PA_UART0, 0x40, - IORESOURCE_MEM, NULL); - return 0; -} - -console_initcall(netx_console_init); - diff --git a/arch/arm/boards/netx/platform.S b/arch/arm/boards/netx/platform.S deleted file mode 100644 index 95ae46c..0000000 --- a/arch/arm/boards/netx/platform.S +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Board specific setup info - * - * - * See file CREDITS for list of people who contributed to this - * project. - * - * 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. - * - */ -#include -#include - -.globl barebox_arm_reset_vector -barebox_arm_reset_vector: - bl arm_cpu_lowlevel_init - mov r0, #0x80000000 - mov r1, #SZ_64M - mov r2, #0 - b barebox_arm_entry diff --git a/arch/arm/boards/versatile/lowlevel.c b/arch/arm/boards/versatile/lowlevel.c index a9ccf1f..beab04d 100644 --- a/arch/arm/boards/versatile/lowlevel.c +++ b/arch/arm/boards/versatile/lowlevel.c @@ -3,8 +3,15 @@ #include #include +extern char __dtb_versatile_pb_start[]; + void __naked barebox_arm_reset_vector(uint32_t r0, uint32_t r1, uint32_t r2) { + void *fdt; + arm_cpu_lowlevel_init(); - barebox_arm_entry(0x0, SZ_64M, NULL); + + fdt = __dtb_versatile_pb_start + get_runtime_offset(); + + barebox_arm_entry(0x0, SZ_64M, fdt); } diff --git a/arch/arm/boards/virt2real/lowlevel.c b/arch/arm/boards/virt2real/lowlevel.c index 264ebee..a72334b 100644 --- a/arch/arm/boards/virt2real/lowlevel.c +++ b/arch/arm/boards/virt2real/lowlevel.c @@ -26,9 +26,15 @@ #define VIRT2REAL_SRAM_BASE 0x82000000 #define VIRT2REAL_SRAM_SIZE SZ_16M +extern char __dtb_virt2real_start[]; + void __naked __bare_init barebox_arm_reset_vector(uint32_t r0, uint32_t r1, uint32_t r2) { + void *fdt; + arm_cpu_lowlevel_init(); - barebox_arm_entry(VIRT2REAL_SRAM_BASE, VIRT2REAL_SRAM_SIZE, NULL); + fdt = __dtb_virt2real_start + get_runtime_offset(); + + barebox_arm_entry(VIRT2REAL_SRAM_BASE, VIRT2REAL_SRAM_SIZE, fdt); } diff --git a/arch/arm/configs/canon-a1100_defconfig b/arch/arm/configs/canon-a1100_defconfig index 9887c4c..12a3f0a 100644 --- a/arch/arm/configs/canon-a1100_defconfig +++ b/arch/arm/configs/canon-a1100_defconfig @@ -1,5 +1,4 @@ CONFIG_TEXT_BASE=0x00300000 -CONFIG_BUILTIN_DTB=y CONFIG_ARCH_DIGIC=y CONFIG_ARM_OPTIMZED_STRING_FUNCTIONS=y CONFIG_PBL_IMAGE=y diff --git a/arch/arm/configs/datamodul-edm-qmx6_defconfig b/arch/arm/configs/datamodul-edm-qmx6_defconfig deleted file mode 100644 index b828b38..0000000 --- a/arch/arm/configs/datamodul-edm-qmx6_defconfig +++ /dev/null @@ -1,88 +0,0 @@ -CONFIG_ARCH_IMX=y -CONFIG_BAREBOX_MAX_IMAGE_SIZE=0x31000 -CONFIG_IMX_MULTI_BOARDS=y -CONFIG_MACH_REALQ7=y -CONFIG_IMX_IIM=y -CONFIG_IMX_IIM_FUSE_BLOW=y -CONFIG_THUMB2_BAREBOX=y -CONFIG_ARM_OPTIMZED_STRING_FUNCTIONS=y -CONFIG_ARM_UNWIND=y -CONFIG_MMU=y -CONFIG_MALLOC_SIZE=0x0 -CONFIG_MALLOC_TLSF=y -CONFIG_RELOCATABLE=y -CONFIG_HUSH_FANCY_PROMPT=y -CONFIG_CMDLINE_EDITING=y -CONFIG_AUTO_COMPLETE=y -CONFIG_BOOTM_SHOW_TYPE=y -CONFIG_BOOTM_VERBOSE=y -CONFIG_BOOTM_INITRD=y -CONFIG_BOOTM_OFTREE=y -CONFIG_BOOTM_OFTREE_UIMAGE=y -CONFIG_CONSOLE_ACTIVATE_NONE=y -CONFIG_DEFAULT_ENVIRONMENT_GENERIC_NEW=y -CONFIG_DEFAULT_ENVIRONMENT_PATH="arch/arm/boards/datamodul-edm-qmx6/env" -CONFIG_RESET_SOURCE=y -CONFIG_LONGHELP=y -CONFIG_CMD_IOMEM=y -CONFIG_CMD_MEMINFO=y -CONFIG_CMD_ARM_MMUINFO=y -# CONFIG_CMD_BOOTU is not set -CONFIG_CMD_GO=y -CONFIG_CMD_RESET=y -CONFIG_CMD_PARTITION=y -CONFIG_CMD_EXPORT=y -CONFIG_CMD_PRINTENV=y -CONFIG_CMD_MAGICVAR=y -CONFIG_CMD_MAGICVAR_HELP=y -CONFIG_CMD_SAVEENV=y -CONFIG_CMD_FILETYPE=y -CONFIG_CMD_LN=y -CONFIG_CMD_MD5SUM=y -CONFIG_CMD_UNCOMPRESS=y -CONFIG_CMD_MSLEEP=y -CONFIG_CMD_SLEEP=y -CONFIG_CMD_DHCP=y -CONFIG_CMD_MIITOOL=y -CONFIG_CMD_PING=y -CONFIG_CMD_TFTP=y -CONFIG_CMD_ECHO_E=y -CONFIG_CMD_EDIT=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_FLASH=y -CONFIG_CMD_GPIO=y -CONFIG_CMD_I2C=y -CONFIG_CMD_SPI=y -CONFIG_CMD_WD=y -CONFIG_CMD_BAREBOX_UPDATE=y -CONFIG_CMD_OF_NODE=y -CONFIG_CMD_OF_PROPERTY=y -CONFIG_CMD_OFTREE=y -CONFIG_CMD_TIME=y -CONFIG_NET=y -CONFIG_OFDEVICE=y -CONFIG_OF_BAREBOX_DRIVERS=y -CONFIG_DRIVER_NET_FEC_IMX=y -CONFIG_DRIVER_SPI_IMX=y -CONFIG_I2C=y -CONFIG_I2C_IMX=y -CONFIG_MTD=y -CONFIG_MTD_M25P80=y -CONFIG_DISK_AHCI=y -CONFIG_DISK_AHCI_IMX=y -CONFIG_MCI=y -CONFIG_MCI_IMX_ESDHC=y -CONFIG_MFD_STMPE=y -CONFIG_WATCHDOG=y -CONFIG_WATCHDOG_IMX=y -CONFIG_GPIO_STMPE=y -CONFIG_FS_TFTP=y -CONFIG_FS_NFS=y -CONFIG_FS_FAT=y -CONFIG_FS_FAT_WRITE=y -CONFIG_FS_FAT_LFN=y diff --git a/arch/arm/configs/module-mb7707_defconfig b/arch/arm/configs/module-mb7707_defconfig index 189f295..9484c39 100644 --- a/arch/arm/configs/module-mb7707_defconfig +++ b/arch/arm/configs/module-mb7707_defconfig @@ -1,4 +1,3 @@ -CONFIG_BUILTIN_DTB=y CONFIG_ARCH_UEMD=y CONFIG_AEABI=y CONFIG_ARM_OPTIMZED_STRING_FUNCTIONS=y diff --git a/arch/arm/configs/netx_nxdb500_defconfig b/arch/arm/configs/netx_nxdb500_defconfig deleted file mode 100644 index a8b5ffb..0000000 --- a/arch/arm/configs/netx_nxdb500_defconfig +++ /dev/null @@ -1,30 +0,0 @@ -CONFIG_TEXT_BASE=0x08f80000 -CONFIG_ARCH_NETX=y -CONFIG_CMDLINE_EDITING=y -CONFIG_AUTO_COMPLETE=y -CONFIG_PARTITION=y -# CONFIG_DEFAULT_ENVIRONMENT is not set -CONFIG_LONGHELP=y -CONFIG_CMD_MEMINFO=y -CONFIG_CMD_GO=y -CONFIG_CMD_RESET=y -CONFIG_CMD_PARTITION=y -CONFIG_CMD_EXPORT=y -CONFIG_CMD_LOADENV=y -CONFIG_CMD_PRINTENV=y -CONFIG_CMD_SAVEENV=y -CONFIG_CMD_SLEEP=y -CONFIG_CMD_DHCP=y -CONFIG_CMD_PING=y -CONFIG_CMD_TFTP=y -CONFIG_CMD_EDIT=y -CONFIG_CMD_READLINE=y -CONFIG_CMD_TIMEOUT=y -CONFIG_CMD_CRC=y -CONFIG_CMD_FLASH=y -CONFIG_NET=y -CONFIG_DRIVER_NET_NETX=y -CONFIG_MTD=y -CONFIG_DRIVER_CFI=y -CONFIG_CFI_BUFFER_WRITE=y -CONFIG_FS_TFTP=y diff --git a/arch/arm/configs/tqma53_defconfig b/arch/arm/configs/tqma53_defconfig deleted file mode 100644 index 3b0dc30..0000000 --- a/arch/arm/configs/tqma53_defconfig +++ /dev/null @@ -1,72 +0,0 @@ -CONFIG_ARCH_IMX=y -CONFIG_IMX_MULTI_BOARDS=y -CONFIG_MACH_TQMA53=y -CONFIG_IMX_IIM=y -CONFIG_IMX_IIM_FUSE_BLOW=y -CONFIG_AEABI=y -CONFIG_ARM_OPTIMZED_STRING_FUNCTIONS=y -CONFIG_ARM_UNWIND=y -CONFIG_MMU=y -CONFIG_MALLOC_SIZE=0x0 -CONFIG_MALLOC_TLSF=y -CONFIG_KALLSYMS=y -CONFIG_RELOCATABLE=y -CONFIG_HUSH_FANCY_PROMPT=y -CONFIG_CMDLINE_EDITING=y -CONFIG_AUTO_COMPLETE=y -CONFIG_BOOTM_SHOW_TYPE=y -CONFIG_BOOTM_VERBOSE=y -CONFIG_BOOTM_INITRD=y -CONFIG_BOOTM_OFTREE=y -CONFIG_BOOTM_OFTREE_UIMAGE=y -CONFIG_BLSPEC=y -CONFIG_CONSOLE_ACTIVATE_NONE=y -CONFIG_DEFAULT_ENVIRONMENT_GENERIC_NEW=y -CONFIG_LONGHELP=y -CONFIG_CMD_IOMEM=y -CONFIG_CMD_MEMINFO=y -# CONFIG_CMD_BOOTU is not set -CONFIG_CMD_GO=y -CONFIG_CMD_RESET=y -CONFIG_CMD_UIMAGE=y -CONFIG_CMD_PARTITION=y -CONFIG_CMD_EXPORT=y -CONFIG_CMD_PRINTENV=y -CONFIG_CMD_MAGICVAR=y -CONFIG_CMD_MAGICVAR_HELP=y -CONFIG_CMD_SAVEENV=y -CONFIG_CMD_UNCOMPRESS=y -CONFIG_CMD_MSLEEP=y -CONFIG_CMD_SLEEP=y -CONFIG_CMD_DHCP=y -CONFIG_CMD_MIITOOL=y -CONFIG_CMD_PING=y -CONFIG_CMD_ECHO_E=y -CONFIG_CMD_EDIT=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_GPIO=y -CONFIG_CMD_OF_NODE=y -CONFIG_CMD_OF_PROPERTY=y -CONFIG_CMD_OFTREE=y -CONFIG_CMD_TIME=y -CONFIG_NET=y -CONFIG_NET_NETCONSOLE=y -CONFIG_OFDEVICE=y -CONFIG_OF_BAREBOX_DRIVERS=y -CONFIG_DRIVER_NET_FEC_IMX=y -# CONFIG_SPI is not set -CONFIG_MCI=y -CONFIG_MCI_STARTUP=y -CONFIG_MCI_IMX_ESDHC=y -CONFIG_FS_TFTP=y -CONFIG_FS_NFS=y -CONFIG_FS_FAT=y -CONFIG_FS_FAT_WRITE=y -CONFIG_FS_FAT_LFN=y -CONFIG_ZLIB=y -CONFIG_LZO_DECOMPRESS=y diff --git a/arch/arm/configs/tx53stk5_defconfig b/arch/arm/configs/tx53stk5_defconfig deleted file mode 100644 index 7c3c51d..0000000 --- a/arch/arm/configs/tx53stk5_defconfig +++ /dev/null @@ -1,64 +0,0 @@ -CONFIG_TEXT_BASE=0x87f00000 -CONFIG_ARCH_IMX=y -CONFIG_IMX_IIM=y -CONFIG_ARM_OPTIMZED_STRING_FUNCTIONS=y -CONFIG_PBL_IMAGE=y -CONFIG_IMAGE_COMPRESSION_GZIP=y -CONFIG_MMU=y -CONFIG_MALLOC_SIZE=0x2000000 -CONFIG_MALLOC_TLSF=y -CONFIG_KALLSYMS=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_BOOTM_OFTREE=y -CONFIG_BOOTM_OFTREE_UIMAGE=y -CONFIG_DEFAULT_ENVIRONMENT_GENERIC_NEW=y -CONFIG_RESET_SOURCE=y -CONFIG_LONGHELP=y -CONFIG_CMD_IOMEM=y -CONFIG_CMD_MEMINFO=y -CONFIG_CMD_GO=y -CONFIG_CMD_RESET=y -CONFIG_CMD_UIMAGE=y -CONFIG_CMD_PARTITION=y -CONFIG_CMD_EXPORT=y -CONFIG_CMD_PRINTENV=y -CONFIG_CMD_MAGICVAR=y -CONFIG_CMD_MAGICVAR_HELP=y -CONFIG_CMD_SAVEENV=y -CONFIG_CMD_UNCOMPRESS=y -CONFIG_CMD_MSLEEP=y -CONFIG_CMD_SLEEP=y -CONFIG_CMD_DHCP=y -CONFIG_CMD_PING=y -CONFIG_CMD_ECHO_E=y -CONFIG_CMD_EDIT=y -CONFIG_CMD_MENU=y -CONFIG_CMD_MENU_MANAGEMENT=y -CONFIG_CMD_READLINE=y -CONFIG_CMD_TIMEOUT=y -CONFIG_CMD_CRC=y -CONFIG_CMD_CRC_CMP=y -CONFIG_CMD_FLASH=y -CONFIG_CMD_GPIO=y -CONFIG_CMD_LED=y -CONFIG_CMD_TIME=y -CONFIG_NET=y -CONFIG_MTD=y -CONFIG_NAND=y -CONFIG_NAND_IMX=y -CONFIG_MCI=y -CONFIG_MCI_STARTUP=y -CONFIG_MCI_IMX_ESDHC=y -CONFIG_LED=y -CONFIG_LED_GPIO=y -CONFIG_FS_TFTP=y -CONFIG_FS_NFS=y -CONFIG_FS_FAT=y -CONFIG_ZLIB=y -CONFIG_LZO_DECOMPRESS=y diff --git a/arch/arm/configs/versatilepb_arm1176_defconfig b/arch/arm/configs/versatilepb_arm1176_defconfig index 284fbd1..e8c6621 100644 --- a/arch/arm/configs/versatilepb_arm1176_defconfig +++ b/arch/arm/configs/versatilepb_arm1176_defconfig @@ -1,5 +1,3 @@ -CONFIG_BUILTIN_DTB=y -CONFIG_BUILTIN_DTB_NAME="versatile-pb" CONFIG_ARCH_VERSATILE=y CONFIG_BAREBOX_MAX_IMAGE_SIZE=0x80000 CONFIG_MACH_VERSATILEPB_ARM1176=y diff --git a/arch/arm/configs/versatilepb_defconfig b/arch/arm/configs/versatilepb_defconfig index 61b9ff1..14481ea 100644 --- a/arch/arm/configs/versatilepb_defconfig +++ b/arch/arm/configs/versatilepb_defconfig @@ -1,5 +1,3 @@ -CONFIG_BUILTIN_DTB=y -CONFIG_BUILTIN_DTB_NAME="versatile-pb" CONFIG_ARCH_VERSATILE=y CONFIG_BAREBOX_MAX_IMAGE_SIZE=0x80000 CONFIG_ARM_OPTIMZED_STRING_FUNCTIONS=y diff --git a/arch/arm/configs/vincell_defconfig b/arch/arm/configs/vincell_defconfig deleted file mode 100644 index a09161d..0000000 --- a/arch/arm/configs/vincell_defconfig +++ /dev/null @@ -1,110 +0,0 @@ -CONFIG_ARCH_IMX=y -CONFIG_IMX_MULTI_BOARDS=y -CONFIG_MACH_GUF_VINCELL=y -CONFIG_IMX_IIM=y -CONFIG_IMX_IIM_FUSE_BLOW=y -CONFIG_THUMB2_BAREBOX=y -CONFIG_ARM_OPTIMZED_STRING_FUNCTIONS=y -CONFIG_ARM_UNWIND=y -CONFIG_IMAGE_COMPRESSION_XZKERN=y -CONFIG_MMU=y -CONFIG_MALLOC_SIZE=0x0 -CONFIG_MALLOC_TLSF=y -CONFIG_RELOCATABLE=y -CONFIG_HUSH_FANCY_PROMPT=y -CONFIG_CMDLINE_EDITING=y -CONFIG_AUTO_COMPLETE=y -CONFIG_BOOTM_SHOW_TYPE=y -CONFIG_BOOTM_VERBOSE=y -CONFIG_BOOTM_INITRD=y -CONFIG_BOOTM_OFTREE=y -CONFIG_BOOTM_OFTREE_UIMAGE=y -CONFIG_BLSPEC=y -CONFIG_CONSOLE_ACTIVATE_NONE=y -CONFIG_DEFAULT_ENVIRONMENT_GENERIC_NEW=y -CONFIG_POLLER=y -CONFIG_STATE=y -CONFIG_RESET_SOURCE=y -CONFIG_LONGHELP=y -CONFIG_CMD_IOMEM=y -CONFIG_CMD_MEMINFO=y -CONFIG_CMD_ARM_MMUINFO=y -# CONFIG_CMD_BOOTU is not set -CONFIG_CMD_GO=y -CONFIG_CMD_RESET=y -CONFIG_CMD_UIMAGE=y -CONFIG_CMD_PARTITION=y -CONFIG_CMD_UBIFORMAT=y -CONFIG_CMD_EXPORT=y -CONFIG_CMD_LOADENV=y -CONFIG_CMD_PRINTENV=y -CONFIG_CMD_MAGICVAR=y -CONFIG_CMD_MAGICVAR_HELP=y -CONFIG_CMD_SAVEENV=y -CONFIG_CMD_FILETYPE=y -CONFIG_CMD_LN=y -CONFIG_CMD_MD5SUM=y -CONFIG_CMD_UNCOMPRESS=y -CONFIG_CMD_LET=y -CONFIG_CMD_MSLEEP=y -CONFIG_CMD_READF=y -CONFIG_CMD_SLEEP=y -CONFIG_CMD_DHCP=y -CONFIG_CMD_MIITOOL=y -CONFIG_CMD_PING=y -CONFIG_CMD_TFTP=y -CONFIG_CMD_ECHO_E=y -CONFIG_CMD_EDIT=y -CONFIG_CMD_READLINE=y -CONFIG_CMD_TIMEOUT=y -CONFIG_CMD_CRC=y -CONFIG_CMD_CRC_CMP=y -CONFIG_CMD_MEMTEST=y -CONFIG_CMD_MM=y -CONFIG_CMD_CLK=y -CONFIG_CMD_DETECT=y -CONFIG_CMD_FLASH=y -CONFIG_CMD_GPIO=y -CONFIG_CMD_I2C=y -CONFIG_CMD_SPI=y -CONFIG_CMD_WD=y -CONFIG_CMD_BAREBOX_UPDATE=y -CONFIG_CMD_OF_NODE=y -CONFIG_CMD_OF_PROPERTY=y -CONFIG_CMD_OFTREE=y -CONFIG_CMD_TIME=y -CONFIG_CMD_STATE=y -CONFIG_NET=y -CONFIG_NET_NETCONSOLE=y -CONFIG_OFDEVICE=y -CONFIG_OF_BAREBOX_DRIVERS=y -CONFIG_DRIVER_NET_FEC_IMX=y -CONFIG_AT803X_PHY=y -CONFIG_DRIVER_SPI_IMX=y -CONFIG_I2C=y -CONFIG_I2C_IMX=y -CONFIG_MTD=y -CONFIG_MTD_RAW_DEVICE=y -CONFIG_MTD_DATAFLASH=y -CONFIG_MTD_M25P80=y -CONFIG_MTD_SST25L=y -CONFIG_NAND=y -CONFIG_NAND_ALLOW_ERASE_BAD=y -CONFIG_NAND_IMX=y -CONFIG_NAND_IMX_BBM=y -CONFIG_MTD_UBI=y -CONFIG_MTD_UBI_FASTMAP=y -CONFIG_USB_HOST=y -CONFIG_USB_IMX_CHIPIDEA=y -CONFIG_USB_EHCI=y -CONFIG_USB_ULPI=y -CONFIG_USB_STORAGE=y -CONFIG_MCI=y -CONFIG_MCI_IMX_ESDHC=y -CONFIG_STATE_DRV=y -CONFIG_EEPROM_AT25=y -CONFIG_EEPROM_AT24=y -CONFIG_WATCHDOG=y -CONFIG_WATCHDOG_IMX=y -CONFIG_FS_TFTP=y -CONFIG_LZO_DECOMPRESS=y diff --git a/arch/arm/configs/virt2real_defconfig b/arch/arm/configs/virt2real_defconfig index 4fb61cb..814fe69 100644 --- a/arch/arm/configs/virt2real_defconfig +++ b/arch/arm/configs/virt2real_defconfig @@ -1,5 +1,4 @@ CONFIG_TEXT_BASE=0x82300000 -CONFIG_BUILTIN_DTB=y CONFIG_ARCH_DAVINCI=y CONFIG_AEABI=y CONFIG_ARM_OPTIMZED_STRING_FUNCTIONS=y diff --git a/arch/arm/cpu/Makefile b/arch/arm/cpu/Makefile index 97e4eb5..e0b1674 100644 --- a/arch/arm/cpu/Makefile +++ b/arch/arm/cpu/Makefile @@ -8,7 +8,7 @@ AFLAGS_hyp.o :=-Wa,-march=armv7-a -Wa,-mcpu=all AFLAGS_pbl-hyp.o :=-Wa,-march=armv7-a -Wa,-mcpu=all -obj-y += start.o entry.o +obj-y += start.o entry.o entry_ll$(S64).o pbl-$(CONFIG_BOARD_ARM_GENERIC_DT) += board-dt-2nd.o pbl-$(CONFIG_BOARD_ARM_GENERIC_DT_AARCH64) += board-dt-2nd-aarch64.o @@ -47,8 +47,7 @@ obj-pbl-$(CONFIG_CPU_64v8) += cache-armv8.o AFLAGS_pbl-cache-armv8.o :=-Wa,-march=armv8-a -pbl-y += entry.o -pbl-$(CONFIG_PBL_SINGLE_IMAGE) += start-pbl.o -pbl-$(CONFIG_PBL_MULTI_IMAGES) += uncompress.o +pbl-y += entry.o entry_ll$(S64).o +pbl-y += uncompress.o obj-pbl-y += common.o sections.o diff --git a/arch/arm/cpu/cache-armv7.S b/arch/arm/cpu/cache-armv7.S index 6a8aff8..0f61084 100644 --- a/arch/arm/cpu/cache-armv7.S +++ b/arch/arm/cpu/cache-armv7.S @@ -7,7 +7,6 @@ mov r12, lr #ifdef CONFIG_MMU mrc p15, 0, r11, c0, c1, 4 @ read ID_MMFR0 - tst r11, #0xf @ VMSA mov r0, #0 dsb @ drain write buffer tst r11, #0xf @ VMSA @@ -21,8 +20,6 @@ orr r0, r0, #1 << 25 @ big-endian page tables #endif orrne r0, r0, #1 @ MMU enabled - movne r1, #-1 - mcrne p15, 0, r1, c3, c0, 0 @ load domain access control #endif isb mcr p15, 0, r0, c1, c0, 0 @ load control register diff --git a/arch/arm/cpu/cpuinfo.c b/arch/arm/cpu/cpuinfo.c index 1ba3b43..ff6e1eb 100644 --- a/arch/arm/cpu/cpuinfo.c +++ b/arch/arm/cpu/cpuinfo.c @@ -76,8 +76,6 @@ : "=r" (cache) : : "memory"); - - cr = get_cr(); #else __asm__ __volatile__( "mrc p15, 0, %0, c0, c0, 0 @ read control reg\n" @@ -90,13 +88,8 @@ : "=r" (cache) : : "memory"); - - __asm__ __volatile__( - "mrc p15, 0, %0, c1, c0, 0 @ read control reg\n" - : "=r" (cr) - : - : "memory"); #endif + cr = get_cr(); switch (mainid >> 24) { case 0x41: diff --git a/arch/arm/cpu/dtb.c b/arch/arm/cpu/dtb.c index b9390b4..1ba5aa4 100644 --- a/arch/arm/cpu/dtb.c +++ b/arch/arm/cpu/dtb.c @@ -36,12 +36,6 @@ if (fdt) pr_debug("using boarddata provided DTB\n"); - /* Next see if we have a builtin dtb */ - if (!fdt && IS_ENABLED(CONFIG_BUILTIN_DTB)) { - fdt = __dtb_start; - pr_debug("using internal DTB\n"); - } - if (!fdt) { pr_debug("No DTB found\n"); return 0; diff --git a/arch/arm/cpu/entry.c b/arch/arm/cpu/entry.c index 30df95f..0b447de 100644 --- a/arch/arm/cpu/entry.c +++ b/arch/arm/cpu/entry.c @@ -24,16 +24,19 @@ * be fine. */ -void NAKED __noreturn barebox_arm_entry(unsigned long membase, - unsigned long memsize, void *boarddata) -{ - arm_setup_stack(arm_mem_stack_top(membase, membase + memsize)); - arm_early_mmu_cache_invalidate(); +/* + * It can be hard to convince GCC to not use old stack pointer after + * we modify it with arm_setup_stack() on ARM64, so we implement the + * low level details in assembly + */ +void __noreturn __barebox_arm_entry(unsigned long membase, + unsigned long memsize, + void *boarddata, + unsigned long sp); - if (IS_ENABLED(CONFIG_PBL_MULTI_IMAGES)) - barebox_multi_pbl_start(membase, memsize, boarddata); - else if (IS_ENABLED(CONFIG_PBL_SINGLE_IMAGE)) - barebox_single_pbl_start(membase, memsize, boarddata); - else - barebox_non_pbl_start(membase, memsize, boarddata); +void NAKED __noreturn barebox_arm_entry(unsigned long membase, + unsigned long memsize, void *boarddata) +{ + __barebox_arm_entry(membase, memsize, boarddata, + arm_mem_stack_top(membase, membase + memsize)); } diff --git a/arch/arm/cpu/entry.h b/arch/arm/cpu/entry.h index f0163a3..18110ea 100644 --- a/arch/arm/cpu/entry.h +++ b/arch/arm/cpu/entry.h @@ -7,12 +7,8 @@ unsigned long memsize, void *boarddata); -void __noreturn barebox_multi_pbl_start(unsigned long membase, - unsigned long memsize, - void *boarddata); - -void __noreturn barebox_single_pbl_start(unsigned long membase, - unsigned long memsize, - void *boarddata); +void __noreturn barebox_pbl_start(unsigned long membase, + unsigned long memsize, + void *boarddata); #endif diff --git a/arch/arm/cpu/entry_ll.S b/arch/arm/cpu/entry_ll.S new file mode 100644 index 0000000..8cc7a84 --- /dev/null +++ b/arch/arm/cpu/entry_ll.S @@ -0,0 +1,25 @@ +#include +#include + +/* + * r0: memory base + * r1: memory size + * r2: board data + * r3: new value for SP + */ +.section .text.__barebox_arm_entry +ENTRY(__barebox_arm_entry) + mov sp, r3 + mov r4, r0 + mov r5, r1 + mov r6, r2 + bl arm_early_mmu_cache_invalidate + mov r0, r4 + mov r1, r5 + mov r2, r6 +#if IS_ENABLED(CONFIG_PBL_IMAGE) + b barebox_pbl_start +#else + b barebox_non_pbl_start +#endif +ENDPROC(__barebox_arm_entry) diff --git a/arch/arm/cpu/entry_ll_64.S b/arch/arm/cpu/entry_ll_64.S new file mode 100644 index 0000000..37e0cb6 --- /dev/null +++ b/arch/arm/cpu/entry_ll_64.S @@ -0,0 +1,23 @@ +#include +#include + +/* + * x0: memory base + * x1: memory size + * x2: board data + * x3: new value for SP + */ +.section .text.__barebox_arm_entry +ENTRY(__barebox_arm_entry) + mov sp, x3 + /* + * arm_early_mmu_cache_invalidate is jsut a call to + * v8_invalidate_icache_all() which doesn't clobber x0, x1 or x2 + */ + bl arm_early_mmu_cache_invalidate +#if IS_ENABLED(CONFIG_PBL_IMAGE) + b barebox_pbl_start +#else + b barebox_non_pbl_start +#endif +ENDPROC(__barebox_arm_entry) \ No newline at end of file diff --git a/arch/arm/cpu/mmu-early.c b/arch/arm/cpu/mmu-early.c index 2f5876f..7c30526 100644 --- a/arch/arm/cpu/mmu-early.c +++ b/arch/arm/cpu/mmu-early.c @@ -29,7 +29,12 @@ arm_set_cache_functions(); set_ttbr(ttb); - set_domain(DOMAIN_MANAGER); + + /* For the XN bit to take effect, we can't be using DOMAIN_MANAGER. */ + if (cpu_architecture() >= CPU_ARCH_ARMv7) + set_domain(DOMAIN_CLIENT); + else + set_domain(DOMAIN_MANAGER); /* * This marks the whole address space as uncachable as well as diff --git a/arch/arm/cpu/mmu.c b/arch/arm/cpu/mmu.c index 123e19e..158b130 100644 --- a/arch/arm/cpu/mmu.c +++ b/arch/arm/cpu/mmu.c @@ -56,13 +56,14 @@ ); } -#define PTE_FLAGS_CACHED_V7 (PTE_EXT_TEX(1) | PTE_BUFFERABLE | PTE_CACHEABLE) -#define PTE_FLAGS_WC_V7 (PTE_EXT_TEX(1) | PTE_EXT_XN) -#define PTE_FLAGS_UNCACHED_V7 PTE_EXT_XN +#define PTE_FLAGS_CACHED_V7 (PTE_EXT_TEX(1) | PTE_BUFFERABLE | PTE_CACHEABLE | \ + PTE_EXT_AP_URW_SRW) +#define PTE_FLAGS_WC_V7 (PTE_EXT_TEX(1) | PTE_EXT_AP_URW_SRW | PTE_EXT_XN) +#define PTE_FLAGS_UNCACHED_V7 (PTE_EXT_AP_URW_SRW | PTE_EXT_XN) #define PTE_FLAGS_CACHED_V4 (PTE_SMALL_AP_UNO_SRW | PTE_BUFFERABLE | PTE_CACHEABLE) #define PTE_FLAGS_UNCACHED_V4 PTE_SMALL_AP_UNO_SRW -#define PGD_FLAGS_WC_V7 (PMD_SECT_TEX(1) | PMD_TYPE_SECT | PMD_SECT_BUFFERABLE | \ - PMD_SECT_XN) +#define PGD_FLAGS_WC_V7 (PMD_SECT_TEX(1) | PMD_SECT_DEF_UNCACHED | \ + PMD_SECT_BUFFERABLE | PMD_SECT_XN) #define PGD_FLAGS_UNCACHED_V7 (PMD_SECT_DEF_UNCACHED | PMD_SECT_XN) /* @@ -445,7 +446,12 @@ ttb = xmemalign(ARM_TTB_SIZE, ARM_TTB_SIZE); set_ttbr(ttb); - set_domain(DOMAIN_MANAGER); + + /* For the XN bit to take effect, we can't be using DOMAIN_MANAGER. */ + if (cpu_architecture() >= CPU_ARCH_ARMv7) + set_domain(DOMAIN_CLIENT); + else + set_domain(DOMAIN_MANAGER); create_flat_mapping(ttb); __mmu_cache_flush(); @@ -455,11 +461,6 @@ vectors_init(); - /* - * First remap sdram cached using sections. - * This is to speed up the generation of 2nd level page tables - * below - */ for_each_memory_bank(bank) { create_sections(ttb, bank->start, bank->start + bank->size - 1, PMD_SECT_DEF_CACHED); diff --git a/arch/arm/cpu/mmu.h b/arch/arm/cpu/mmu.h index c911ee2..6e7a4c0 100644 --- a/arch/arm/cpu/mmu.h +++ b/arch/arm/cpu/mmu.h @@ -36,6 +36,7 @@ asm volatile ("mcr p15,0,%0,c2,c0,0" : : "r"(ttb) /*:*/); } +#define DOMAIN_CLIENT 1 #define DOMAIN_MANAGER 3 static inline void set_domain(unsigned val) diff --git a/arch/arm/cpu/start-pbl.c b/arch/arm/cpu/start-pbl.c deleted file mode 100644 index 796239d..0000000 --- a/arch/arm/cpu/start-pbl.c +++ /dev/null @@ -1,109 +0,0 @@ -/* - * start-pbl.c - * - * Copyright (c) 2010-2012 Sascha Hauer , Pengutronix - * Copyright (c) 2012 Jean-Christophe PLAGNIOL-VILLARD - * - * See file CREDITS for list of people who contributed to this - * project. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 - * as published by the Free Software Foundation. - * - * 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 -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "entry.h" - -unsigned long free_mem_ptr; -unsigned long free_mem_end_ptr; - -void pbl_start(void); - -/* - * First instructions in the pbl image - */ -void __naked __section(.text_head_entry) pbl_start(void) -{ - barebox_arm_head(); -} - -extern void *input_data; -extern void *input_data_end; - -__noreturn void barebox_single_pbl_start(unsigned long membase, - unsigned long memsize, void *boarddata) -{ - unsigned long offset; - unsigned long pg_start, pg_end, pg_len, uncompressed_len; - void __noreturn (*barebox)(unsigned long, unsigned long, void *); - unsigned long endmem = membase + memsize; - unsigned long barebox_base; - - if (IS_ENABLED(CONFIG_PBL_RELOCATABLE)) - relocate_to_current_adr(); - - /* Get offset between linked address and runtime address */ - offset = get_runtime_offset(); - - pg_start = (unsigned long)&input_data + global_variable_offset(); - pg_end = (unsigned long)&input_data_end + global_variable_offset(); - pg_len = pg_end - pg_start; - uncompressed_len = get_unaligned((const u32 *)(pg_start + pg_len - 4)); - - if (IS_ENABLED(CONFIG_RELOCATABLE)) - barebox_base = arm_mem_barebox_image(membase, endmem, uncompressed_len + MAX_BSS_SIZE); - else - barebox_base = TEXT_BASE; - - if (offset && (IS_ENABLED(CONFIG_PBL_FORCE_PIGGYDATA_COPY) || - region_overlap(pg_start, pg_len, barebox_base, pg_len * 4))) { - /* - * copy piggydata binary to its link address - */ - memcpy(&input_data, (void *)pg_start, pg_len); - pg_start = (uint32_t)&input_data; - } - - setup_c(); - - if (IS_ENABLED(CONFIG_MMU_EARLY)) { - unsigned long ttb = arm_mem_ttb(membase, endmem); - mmu_early_enable(membase, memsize, ttb); - } - - free_mem_ptr = arm_mem_early_malloc(membase, endmem); - free_mem_end_ptr = arm_mem_early_malloc_end(membase, endmem); - - pbl_barebox_uncompress((void*)barebox_base, (void *)pg_start, pg_len); - - sync_caches_for_execution(); - - if (IS_ENABLED(CONFIG_THUMB2_BAREBOX)) - barebox = (void *)(barebox_base + 1); - else - barebox = (void *)barebox_base; - - if (IS_ENABLED(CONFIG_CPU_V7) && boot_cpu_mode() == HYP_MODE) - armv7_switch_to_hyp(); - - barebox(membase, memsize, boarddata); -} diff --git a/arch/arm/cpu/uncompress.c b/arch/arm/cpu/uncompress.c index 4f16af2..88d073e 100644 --- a/arch/arm/cpu/uncompress.c +++ b/arch/arm/cpu/uncompress.c @@ -36,14 +36,27 @@ #include "entry.h" +#ifndef CONFIG_HAVE_PBL_MULTI_IMAGES + +void start_pbl(void); + +/* + * First instructions in the pbl image + */ +void __naked __section(.text_head_entry_start_single_pbl) start_pbl(void) +{ + barebox_arm_head(); +} +#endif + unsigned long free_mem_ptr; unsigned long free_mem_end_ptr; extern unsigned char input_data[]; extern unsigned char input_data_end[]; -void __noreturn barebox_multi_pbl_start(unsigned long membase, - unsigned long memsize, void *boarddata) +void __noreturn barebox_pbl_start(unsigned long membase, unsigned long memsize, + void *boarddata) { uint32_t pg_len, uncompressed_len; void __noreturn (*barebox)(unsigned long, unsigned long, void *); diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile index f33e6a4..8cb8467 100644 --- a/arch/arm/dts/Makefile +++ b/arch/arm/dts/Makefile @@ -1,51 +1,48 @@ -BUILTIN_DTB := $(patsubst "%",%,$(CONFIG_BUILTIN_DTB_NAME)) -ifneq ($(BUILTIN_DTB),) -obj-dtb-$(CONFIG_BUILTIN_DTB) += $(BUILTIN_DTB).dtb.o -endif - # just to build a built-in.o. Otherwise compilation fails when no devicetree is # created. obj- += dummy.o -pbl-dtb-$(CONFIG_MACH_ADVANTECH_ROM_742X) += imx6dl-advantech-rom-7421.dtb.o -pbl-dtb-$(CONFIG_MACH_AFI_GF) += am335x-afi-gf.dtb.o -pbl-dtb-$(CONFIG_MACH_BEAGLEBONE) += am335x-bone.dtb.o am335x-boneblack.dtb.o am335x-bone-common.dtb.o -pbl-dtb-$(CONFIG_MACH_CM_FX6) += imx6dl-cm-fx6.dtb.o imx6q-cm-fx6.dtb.o imx6q-utilite.dtb.o -pbl-dtb-$(CONFIG_MACH_DFI_FS700_M60) += imx6q-dfi-fs700-m60-6q.dtb.o imx6dl-dfi-fs700-m60-6s.dtb.o -pbl-dtb-$(CONFIG_MACH_DUCKBILL) += imx28-duckbill.dtb.o -pbl-dtb-$(CONFIG_MACH_KINDLE_MX50) += imx50-kindle-d01100.dtb.o imx50-kindle-d01200.dtb.o imx50-kindle-ey21.dtb.o -pbl-dtb-$(CONFIG_MACH_EFIKA_MX_SMARTBOOK) += imx51-genesi-efika-sb.dtb.o -pbl-dtb-$(CONFIG_MACH_ELTEC_HIPERCAM) += imx6dl-eltec-hipercam.dtb.o -pbl-dtb-$(CONFIG_MACH_EMBEST_RIOTBOARD) += imx6s-riotboard.dtb.o -pbl-dtb-$(CONFIG_MACH_EMBEDSKY_E9) += imx6q-embedsky-e9.dtb.o -pbl-dtb-$(CONFIG_MACH_FREESCALE_MX51_PDK) += imx51-babbage.dtb.o -pbl-dtb-$(CONFIG_MACH_FREESCALE_MX53_LOCO) += imx53-qsb.dtb.o imx53-qsrb.dtb.o -pbl-dtb-$(CONFIG_MACH_TX53) += imx53-tx53-xx30.dtb.o imx53-tx53-1011.dtb.o -pbl-dtb-$(CONFIG_MACH_CCMX51) += imx51-ccxmx51.dtb.o -pbl-dtb-$(CONFIG_MACH_CCMX53) += imx53-ccxmx53.dtb.o -pbl-dtb-$(CONFIG_MACH_DIGI_CCIMX6ULSBCPRO) += imx6ul-ccimx6ulsbcpro.dtb.o -pbl-dtb-$(CONFIG_MACH_FREESCALE_MX53_VMX53) += imx53-voipac-bsb.dtb.o -pbl-dtb-$(CONFIG_MACH_FREESCALE_MX7_SABRESD) += imx7d-sdb.dtb.o -pbl-dtb-$(CONFIG_MACH_GK802) += imx6q-gk802.dtb.o -pbl-dtb-$(CONFIG_MACH_GLOBALSCALE_GURUPLUG) += kirkwood-guruplug-server-plus-bb.dtb.o -pbl-dtb-$(CONFIG_MACH_GLOBALSCALE_MIRABOX) += armada-370-mirabox-bb.dtb.o -pbl-dtb-$(CONFIG_MACH_GRINN_LITEBOARD) += imx6ul-liteboard.dtb.o -pbl-dtb-$(CONFIG_MACH_GUF_SANTARO) += imx6q-guf-santaro.dtb.o -pbl-dtb-$(CONFIG_MACH_GUF_VINCELL) += imx53-guf-vincell.dtb.o imx53-guf-vincell-lt.dtb.o -pbl-dtb-$(CONFIG_MACH_GW_VENTANA) += imx6q-gw54xx.dtb.o -pbl-dtb-$(CONFIG_MACH_KONTRON_SAMX6I) += imx6q-samx6i.dtb.o \ +lwl-dtb-$(CONFIG_MACH_ADVANTECH_ROM_742X) += imx6dl-advantech-rom-7421.dtb.o +lwl-dtb-$(CONFIG_MACH_AFI_GF) += am335x-afi-gf.dtb.o +lwl-dtb-$(CONFIG_MACH_BEAGLEBONE) += am335x-bone.dtb.o am335x-boneblack.dtb.o am335x-bone-common.dtb.o +lwl-dtb-$(CONFIG_MACH_CANON_A1100) += canon-a1100.dtb.o +lwl-dtb-$(CONFIG_MACH_CM_FX6) += imx6dl-cm-fx6.dtb.o imx6q-cm-fx6.dtb.o imx6q-utilite.dtb.o +lwl-dtb-$(CONFIG_MACH_DFI_FS700_M60) += imx6q-dfi-fs700-m60-6q.dtb.o imx6dl-dfi-fs700-m60-6s.dtb.o +lwl-dtb-$(CONFIG_MACH_DUCKBILL) += imx28-duckbill.dtb.o +lwl-dtb-$(CONFIG_MACH_KINDLE_MX50) += imx50-kindle-d01100.dtb.o imx50-kindle-d01200.dtb.o imx50-kindle-ey21.dtb.o +lwl-dtb-$(CONFIG_MACH_EFIKA_MX_SMARTBOOK) += imx51-genesi-efika-sb.dtb.o +lwl-dtb-$(CONFIG_MACH_ELTEC_HIPERCAM) += imx6dl-eltec-hipercam.dtb.o +lwl-dtb-$(CONFIG_MACH_EMBEST_RIOTBOARD) += imx6s-riotboard.dtb.o +lwl-dtb-$(CONFIG_MACH_EMBEDSKY_E9) += imx6q-embedsky-e9.dtb.o +lwl-dtb-$(CONFIG_MACH_FREESCALE_MX51_PDK) += imx51-babbage.dtb.o +lwl-dtb-$(CONFIG_MACH_FREESCALE_MX53_LOCO) += imx53-qsb.dtb.o imx53-qsrb.dtb.o +lwl-dtb-$(CONFIG_MACH_TX53) += imx53-tx53-xx30.dtb.o imx53-tx53-1011.dtb.o +lwl-dtb-$(CONFIG_MACH_CCMX51) += imx51-ccxmx51.dtb.o +lwl-dtb-$(CONFIG_MACH_CCMX53) += imx53-ccxmx53.dtb.o +lwl-dtb-$(CONFIG_MACH_DIGI_CCIMX6ULSBCPRO) += imx6ul-ccimx6ulsbcpro.dtb.o +lwl-dtb-$(CONFIG_MACH_FREESCALE_MX53_VMX53) += imx53-voipac-bsb.dtb.o +lwl-dtb-$(CONFIG_MACH_FREESCALE_MX7_SABRESD) += imx7d-sdb.dtb.o +lwl-dtb-$(CONFIG_MACH_GK802) += imx6q-gk802.dtb.o +lwl-dtb-$(CONFIG_MACH_GLOBALSCALE_GURUPLUG) += kirkwood-guruplug-server-plus-bb.dtb.o +lwl-dtb-$(CONFIG_MACH_GLOBALSCALE_MIRABOX) += armada-370-mirabox-bb.dtb.o +lwl-dtb-$(CONFIG_MACH_GRINN_LITEBOARD) += imx6ul-liteboard.dtb.o +lwl-dtb-$(CONFIG_MACH_GUF_SANTARO) += imx6q-guf-santaro.dtb.o +lwl-dtb-$(CONFIG_MACH_GUF_VINCELL) += imx53-guf-vincell.dtb.o imx53-guf-vincell-lt.dtb.o +lwl-dtb-$(CONFIG_MACH_GW_VENTANA) += imx6q-gw54xx.dtb.o +lwl-dtb-$(CONFIG_MACH_KONTRON_SAMX6I) += imx6q-samx6i.dtb.o \ imx6dl-samx6i.dtb.o -pbl-dtb-$(CONFIG_MACH_LENOVO_IX4_300D) += armada-xp-lenovo-ix4-300d-bb.dtb.o -pbl-dtb-$(CONFIG_MACH_MARVELL_ARMADA_XP_GP) += armada-xp-gp-bb.dtb.o armada-xp-db-bb.dtb.o -pbl-dtb-$(CONFIG_MACH_MX28EVK) += imx28-evk.dtb.o -pbl-dtb-$(CONFIG_MACH_NETGEAR_RN104) += armada-370-rn104-bb.dtb.o -pbl-dtb-$(CONFIG_MACH_NETGEAR_RN2120) += armada-xp-rn2120-bb.dtb.o -pbl-dtb-$(CONFIG_MACH_NITROGEN6) += imx6q-nitrogen6x.dtb.o imx6dl-nitrogen6x.dtb.o imx6qp-nitrogen6_max.dtb.o -pbl-dtb-$(CONFIG_MACH_NVIDIA_BEAVER) += tegra30-beaver.dtb.o -pbl-dtb-$(CONFIG_MACH_NVIDIA_JETSON) += tegra124-jetson-tk1.dtb.o -pbl-dtb-$(CONFIG_MACH_PCA100) += imx27-phytec-phycard-s-rdk-bb.dtb.o -pbl-dtb-$(CONFIG_MACH_PCM038) += imx27-phytec-phycore-rdk.dtb.o -pbl-dtb-$(CONFIG_MACH_PHYTEC_SOM_AM335X) += am335x-phytec-phyflex-som.dtb.o am335x-phytec-phyflex-som-mlo.dtb.o \ +lwl-dtb-$(CONFIG_MACH_LENOVO_IX4_300D) += armada-xp-lenovo-ix4-300d-bb.dtb.o +lwl-dtb-$(CONFIG_MACH_MARVELL_ARMADA_XP_GP) += armada-xp-gp-bb.dtb.o armada-xp-db-bb.dtb.o +lwl-dtb-$(CONFIG_MACH_MB7707) += module-mb7707.dtb.o +lwl-dtb-$(CONFIG_MACH_MX28EVK) += imx28-evk.dtb.o +lwl-dtb-$(CONFIG_MACH_NETGEAR_RN104) += armada-370-rn104-bb.dtb.o +lwl-dtb-$(CONFIG_MACH_NETGEAR_RN2120) += armada-xp-rn2120-bb.dtb.o +lwl-dtb-$(CONFIG_MACH_NITROGEN6) += imx6q-nitrogen6x.dtb.o imx6dl-nitrogen6x.dtb.o imx6qp-nitrogen6_max.dtb.o +lwl-dtb-$(CONFIG_MACH_NVIDIA_BEAVER) += tegra30-beaver.dtb.o +lwl-dtb-$(CONFIG_MACH_NVIDIA_JETSON) += tegra124-jetson-tk1.dtb.o +lwl-dtb-$(CONFIG_MACH_PCA100) += imx27-phytec-phycard-s-rdk-bb.dtb.o +lwl-dtb-$(CONFIG_MACH_PCM038) += imx27-phytec-phycore-rdk.dtb.o +lwl-dtb-$(CONFIG_MACH_PHYTEC_SOM_AM335X) += am335x-phytec-phyflex-som.dtb.o am335x-phytec-phyflex-som-mlo.dtb.o \ am335x-phytec-phyflex-som-no-spi.dtb.o am335x-phytec-phyflex-som-no-eeprom.dtb.o \ am335x-phytec-phyflex-som-no-spi-no-eeprom.dtb.o \ am335x-phytec-phycore-som-mlo.dtb.o \ @@ -53,7 +50,7 @@ am335x-phytec-phycore-som-nand-no-eeprom.dtb.o am335x-phytec-phycore-som-nand-no-spi-no-eeprom.dtb.o \ am335x-phytec-phycore-som-emmc.dtb.o \ am335x-phytec-phycard-som.dtb.o am335x-phytec-phycard-som-mlo.dtb.o -pbl-dtb-$(CONFIG_MACH_PHYTEC_SOM_IMX6) += imx6q-phytec-pbaa03.dtb.o \ +lwl-dtb-$(CONFIG_MACH_PHYTEC_SOM_IMX6) += imx6q-phytec-pbaa03.dtb.o \ imx6s-phytec-pbab01.dtb.o \ imx6dl-phytec-pbab01.dtb.o \ imx6q-phytec-pbab01.dtb.o \ @@ -71,61 +68,63 @@ imx6ull-phytec-phycore-som-lc-nand.dtb.o \ imx6ull-phytec-phycore-som-nand.dtb.o \ imx6ull-phytec-phycore-som-emmc.dtb.o -pbl-dtb-$(CONFIG_MACH_PHYTEC_PHYCORE_IMX7) += imx7d-phyboard-zeta.dtb.o -pbl-dtb-$(CONFIG_MACH_PHYTEC_SOM_IMX8MQ) += imx8mq-phytec-phycore-som.dtb.o -pbl-dtb-$(CONFIG_MACH_PLATHOME_OPENBLOCKS_AX3) += armada-xp-openblocks-ax3-4-bb.dtb.o -pbl-dtb-$(CONFIG_MACH_PLATHOME_OPENBLOCKS_A6) += kirkwood-openblocks_a6-bb.dtb.o -pbl-dtb-$(CONFIG_MACH_RADXA_ROCK) += rk3188-radxarock.dtb.o -pbl-dtb-$(CONFIG_MACH_PHYTEC_SOM_RK3288) += rk3288-phycore-som.dtb.o -pbl-dtb-$(CONFIG_MACH_REALQ7) += imx6q-dmo-edmqmx6.dtb.o -pbl-dtb-$(CONFIG_MACH_RPI) += bcm2835-rpi.dtb.o -pbl-dtb-$(CONFIG_MACH_RPI2) += bcm2836-rpi-2.dtb.o -pbl-dtb-$(CONFIG_MACH_RPI3) += bcm2837-rpi-3.dtb.o -pbl-dtb-$(CONFIG_MACH_RPI_CM3) += bcm2837-rpi-cm3.dtb.o -pbl-dtb-$(CONFIG_MACH_SABRELITE) += imx6q-sabrelite.dtb.o imx6dl-sabrelite.dtb.o -pbl-dtb-$(CONFIG_MACH_SABRESD) += imx6q-sabresd.dtb.o -pbl-dtb-$(CONFIG_MACH_FREESCALE_IMX6SX_SABRESDB) += imx6sx-sdb.dtb.o -pbl-dtb-$(CONFIG_MACH_SOCFPGA_ALTERA_SOCDK) += socfpga_cyclone5_socdk.dtb.o -pbl-dtb-$(CONFIG_MACH_SOCFPGA_EBV_SOCRATES) += socfpga_cyclone5_socrates.dtb.o -pbl-dtb-$(CONFIG_MACH_SOCFPGA_REFLEX_ACHILLES) += socfpga_arria10_achilles.dtb.o -pbl-dtb-$(CONFIG_MACH_SOCFPGA_TERASIC_DE0_NANO_SOC) += socfpga_cyclone5_de0_nano_soc.dtb.o -pbl-dtb-$(CONFIG_MACH_SOCFPGA_TERASIC_SOCKIT) += socfpga_cyclone5_sockit.dtb.o -pbl-dtb-$(CONFIG_MACH_SOLIDRUN_CUBOX) += dove-cubox-bb.dtb.o -pbl-dtb-$(CONFIG_MACH_SOLIDRUN_MICROSOM) += imx6dl-hummingboard.dtb.o imx6q-hummingboard.dtb.o \ +lwl-dtb-$(CONFIG_MACH_PHYTEC_PHYCORE_IMX7) += imx7d-phyboard-zeta.dtb.o +lwl-dtb-$(CONFIG_MACH_PHYTEC_SOM_IMX8MQ) += imx8mq-phytec-phycore-som.dtb.o +lwl-dtb-$(CONFIG_MACH_PLATHOME_OPENBLOCKS_AX3) += armada-xp-openblocks-ax3-4-bb.dtb.o +lwl-dtb-$(CONFIG_MACH_PLATHOME_OPENBLOCKS_A6) += kirkwood-openblocks_a6-bb.dtb.o +lwl-dtb-$(CONFIG_MACH_RADXA_ROCK) += rk3188-radxarock.dtb.o +lwl-dtb-$(CONFIG_MACH_PHYTEC_SOM_RK3288) += rk3288-phycore-som.dtb.o +lwl-dtb-$(CONFIG_MACH_REALQ7) += imx6q-dmo-edmqmx6.dtb.o +lwl-dtb-$(CONFIG_MACH_RPI) += bcm2835-rpi.dtb.o +lwl-dtb-$(CONFIG_MACH_RPI2) += bcm2836-rpi-2.dtb.o +lwl-dtb-$(CONFIG_MACH_RPI3) += bcm2837-rpi-3.dtb.o +lwl-dtb-$(CONFIG_MACH_RPI_CM3) += bcm2837-rpi-cm3.dtb.o +lwl-dtb-$(CONFIG_MACH_SABRELITE) += imx6q-sabrelite.dtb.o imx6dl-sabrelite.dtb.o +lwl-dtb-$(CONFIG_MACH_SABRESD) += imx6q-sabresd.dtb.o +lwl-dtb-$(CONFIG_MACH_FREESCALE_IMX6SX_SABRESDB) += imx6sx-sdb.dtb.o +lwl-dtb-$(CONFIG_MACH_SOCFPGA_ALTERA_SOCDK) += socfpga_cyclone5_socdk.dtb.o +lwl-dtb-$(CONFIG_MACH_SOCFPGA_EBV_SOCRATES) += socfpga_cyclone5_socrates.dtb.o +lwl-dtb-$(CONFIG_MACH_SOCFPGA_REFLEX_ACHILLES) += socfpga_arria10_achilles.dtb.o +lwl-dtb-$(CONFIG_MACH_SOCFPGA_TERASIC_DE0_NANO_SOC) += socfpga_cyclone5_de0_nano_soc.dtb.o +lwl-dtb-$(CONFIG_MACH_SOCFPGA_TERASIC_SOCKIT) += socfpga_cyclone5_sockit.dtb.o +lwl-dtb-$(CONFIG_MACH_SOLIDRUN_CUBOX) += dove-cubox-bb.dtb.o +lwl-dtb-$(CONFIG_MACH_SOLIDRUN_MICROSOM) += imx6dl-hummingboard.dtb.o imx6q-hummingboard.dtb.o \ imx6dl-hummingboard2.dtb.o imx6q-hummingboard2.dtb.o \ imx6q-h100.dtb.o -pbl-dtb-$(CONFIG_MACH_STM32MP157C_DK2) += stm32mp157c-dk2.dtb.o -pbl-dtb-$(CONFIG_MACH_SCB9328) += imx1-scb9328.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_NXP_IMX8MQ_EVK) += imx8mq-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 -pbl-dtb-$(CONFIG_MACH_TQMA6X) += imx6dl-mba6x.dtb.o imx6q-mba6x.dtb.o -pbl-dtb-$(CONFIG_MACH_TX25) += imx25-karo-tx25.dtb.o -pbl-dtb-$(CONFIG_MACH_TX6X) += imx6dl-tx6u.dtb.o -pbl-dtb-$(CONFIG_MACH_TX6X) += imx6q-tx6q.dtb.o -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_UDOO_NEO) += imx6sx-udoo-neo-full.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 -pbl-dtb-$(CONFIG_MACH_ZII_RDU1) += \ +lwl-dtb-$(CONFIG_MACH_STM32MP157C_DK2) += stm32mp157c-dk2.dtb.o +lwl-dtb-$(CONFIG_MACH_SCB9328) += imx1-scb9328.dtb.o +lwl-dtb-$(CONFIG_MACH_TECHNEXION_WANDBOARD) += imx6q-wandboard.dtb.o imx6dl-wandboard.dtb.o +lwl-dtb-$(CONFIG_MACH_TECHNEXION_PICO_HOBBIT) += imx6ul-pico-hobbit.dtb.o +lwl-dtb-$(CONFIG_MACH_NXP_IMX6ULL_EVK) += imx6ull-14x14-evk.dtb.o +lwl-dtb-$(CONFIG_MACH_NXP_IMX8MQ_EVK) += imx8mq-evk.dtb.o +lwl-dtb-$(CONFIG_MACH_TORADEX_COLIBRI_T20) += tegra20-colibri-iris.dtb.o +lwl-dtb-$(CONFIG_MACH_TOSHIBA_AC100) += tegra20-paz00.dtb.o +lwl-dtb-$(CONFIG_MACH_TQMA53) += imx53-mba53.dtb.o +lwl-dtb-$(CONFIG_MACH_TQMA6X) += imx6dl-mba6x.dtb.o imx6q-mba6x.dtb.o +lwl-dtb-$(CONFIG_MACH_TX25) += imx25-karo-tx25.dtb.o +lwl-dtb-$(CONFIG_MACH_TX6X) += imx6dl-tx6u.dtb.o +lwl-dtb-$(CONFIG_MACH_TX6X) += imx6q-tx6q.dtb.o +lwl-dtb-$(CONFIG_MACH_TURRIS_OMNIA) += armada-385-turris-omnia-bb.dtb.o +lwl-dtb-$(CONFIG_MACH_UDOO) += imx6q-udoo.dtb.o +lwl-dtb-$(CONFIG_MACH_UDOO_NEO) += imx6sx-udoo-neo-full.dtb.o +lwl-dtb-$(CONFIG_MACH_USI_TOPKICK) += kirkwood-topkick-bb.dtb.o +lwl-dtb-$(CONFIG_MACH_VARISCITE_MX6) += imx6q-var-custom.dtb.o +lwl-dtb-$(CONFIG_MACH_VERSATILEPB) += versatile-pb.dtb.o +lwl-dtb-$(CONFIG_MACH_VEXPRESS) += vexpress-v2p-ca9.dtb.o +lwl-dtb-$(CONFIG_MACH_VEXPRESS) += vexpress-v2p-ca15.dtb.o +lwl-dtb-$(CONFIG_MACH_VIRT2REAL) += virt2real.dtb.o +lwl-dtb-$(CONFIG_MACH_VSCOM_BALTOS) += am335x-baltos-minimal.dtb.o +lwl-dtb-$(CONFIG_MACH_WARP7) += imx7s-warp.dtb.o +lwl-dtb-$(CONFIG_MACH_VF610_TWR) += vf610-twr.dtb.o +lwl-dtb-$(CONFIG_MACH_ZII_RDU1) += \ imx51-zii-rdu1.dtb.o \ imx51-zii-scu2-mezz.dtb.o \ imx51-zii-scu3-esb.dtb.o -pbl-dtb-$(CONFIG_MACH_ZII_RDU2) += imx6q-zii-rdu2.dtb.o imx6qp-zii-rdu2.dtb.o -pbl-dtb-$(CONFIG_MACH_ZII_IMX8MQ_DEV) += \ +lwl-dtb-$(CONFIG_MACH_ZII_RDU2) += imx6q-zii-rdu2.dtb.o imx6qp-zii-rdu2.dtb.o +lwl-dtb-$(CONFIG_MACH_ZII_IMX8MQ_DEV) += \ imx8mq-zii-ultra-rmb3.dtb.o \ imx8mq-zii-ultra-zest.dtb.o -pbl-dtb-$(CONFIG_MACH_ZII_VF610_DEV) += \ +lwl-dtb-$(CONFIG_MACH_ZII_VF610_DEV) += \ vf610-zii-dev-rev-b.dtb.o \ vf610-zii-dev-rev-c.dtb.o \ vf610-zii-cfu1.dtb.o \ @@ -133,14 +132,14 @@ vf610-zii-scu4-aib.dtb.o \ vf610-zii-spb4.dtb.o \ vf610-zii-ssmb-dtu.dtb.o -pbl-dtb-$(CONFIG_MACH_AT91SAM9263EK_DT) += at91sam9263ek.dtb.o -pbl-dtb-$(CONFIG_MACH_MICROCHIP_KSZ9477_EVB) += at91-microchip-ksz9477-evb.dtb.o -pbl-dtb-$(CONFIG_MACH_AT91SAM9X5EK) += at91sam9x5ek.dtb.o -pbl-dtb-$(CONFIG_MACH_XILINX_ZCU104) += zynqmp-zcu104-revA.dtb.o +lwl-dtb-$(CONFIG_MACH_AT91SAM9263EK_DT) += at91sam9263ek.dtb.o +lwl-dtb-$(CONFIG_MACH_MICROCHIP_KSZ9477_EVB) += at91-microchip-ksz9477-evb.dtb.o +lwl-dtb-$(CONFIG_MACH_AT91SAM9X5EK) += at91sam9x5ek.dtb.o +lwl-dtb-$(CONFIG_MACH_XILINX_ZCU104) += zynqmp-zcu104-revA.dtb.o -pbl-dtb-$(CONFIG_MACH_ZII_IMX7D_DEV) += imx7d-zii-rpu2.dtb.o imx7d-zii-rmu2.dtb.o -pbl-dtb-$(CONFIG_MACH_WAGO_PFC_AM35XX) += am35xx-pfc-750_820x.dtb.o -pbl-dtb-$(CONFIG_MACH_LS1046ARDB) += fsl-ls1046a-rdb.dtb.o -pbl-dtb-$(CONFIG_MACH_TQMLS1046A) += fsl-tqmls1046a-mbls10xxa.dtb.o +lwl-dtb-$(CONFIG_MACH_ZII_IMX7D_DEV) += imx7d-zii-rpu2.dtb.o imx7d-zii-rmu2.dtb.o +lwl-dtb-$(CONFIG_MACH_WAGO_PFC_AM35XX) += am35xx-pfc-750_820x.dtb.o +lwl-dtb-$(CONFIG_MACH_LS1046ARDB) += fsl-ls1046a-rdb.dtb.o +lwl-dtb-$(CONFIG_MACH_TQMLS1046A) += fsl-tqmls1046a-mbls10xxa.dtb.o clean-files := *.dtb *.dtb.S .*.dtc .*.pre .*.dts *.dtb.lzo diff --git a/arch/arm/include/asm/common.h b/arch/arm/include/asm/common.h index c32cdfe..d03ee62 100644 --- a/arch/arm/include/asm/common.h +++ b/arch/arm/include/asm/common.h @@ -50,8 +50,7 @@ { __asm__ __volatile__("mov sp, %0" : - : "r"(top) - : "sp"); + : "r"(top)); } #endif /* __ASM_ARM_COMMON_H */ diff --git a/arch/arm/mach-netx/Kconfig b/arch/arm/mach-netx/Kconfig deleted file mode 100644 index 63cfe3b..0000000 --- a/arch/arm/mach-netx/Kconfig +++ /dev/null @@ -1,34 +0,0 @@ -if ARCH_NETX - -config ARCH_TEXT_BASE - hex - default 0x81f00000 if MACH_NXDB500 - -config NETX_SDRAM_CTRL - hex - default 0x010D0121 if MACH_NXDB500 - -config NETX_SDRAM_TIMING_CTRL - hex - default 0x03C13261 if MACH_NXDB500 - -config NETX_MEM_CTRL - hex - default 0x0203030F if MACH_NXDB500 - -config NETX_COOKIE - hex - default 32 if MACH_NXDB500 - -choice - prompt "Netx Board Type" - -config MACH_NXDB500 - bool "Hilscher Netx nxdb500" - select HAS_NETX_ETHER - help - Say Y here if you are using the Hilscher Netx nxdb500 board - -endchoice - -endif diff --git a/arch/arm/mach-netx/Makefile b/arch/arm/mach-netx/Makefile deleted file mode 100644 index 0b6791e..0000000 --- a/arch/arm/mach-netx/Makefile +++ /dev/null @@ -1,5 +0,0 @@ - -obj-y += clocksource.o -obj-y += lowlevel_init.o -obj-y += generic.o - diff --git a/arch/arm/mach-netx/clocksource.c b/arch/arm/mach-netx/clocksource.c deleted file mode 100644 index 1eb977d..0000000 --- a/arch/arm/mach-netx/clocksource.c +++ /dev/null @@ -1,51 +0,0 @@ -/* - * - * (C) Copyright 2007 - * Sascha Hauer, Pengutronix - * - * See file CREDITS for list of people who contributed to this - * project. - * - * 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. - * - */ - -#include -#include -#include -#include - -static uint64_t netx_clocksource_read(void) -{ - return GPIO_REG(GPIO_COUNTER_CURRENT(0)); -} - -static struct clocksource cs = { - .read = netx_clocksource_read, - .mask = CLOCKSOURCE_MASK(32), - .shift = 10, -}; - -static int clocksource_init (void) -{ - /* disable timer initially */ - GPIO_REG(GPIO_COUNTER_CTRL(0)) = 0; - /* Reset the timer value to zero */ - GPIO_REG(GPIO_COUNTER_CURRENT(0)) = 0; - GPIO_REG(GPIO_COUNTER_MAX(0)) = 0xffffffff; - GPIO_REG(GPIO_COUNTER_CTRL(0)) = COUNTER_CTRL_RUN; - - cs.mult = clocksource_hz2mult(100 * 1000 * 1000, cs.shift); - - return init_clock(&cs); -} - -core_initcall(clocksource_init); diff --git a/arch/arm/mach-netx/eth_firmware.h b/arch/arm/mach-netx/eth_firmware.h deleted file mode 100644 index a90d0a5..0000000 --- a/arch/arm/mach-netx/eth_firmware.h +++ /dev/null @@ -1,370 +0,0 @@ - -unsigned int rpu_eth0[] = { - 0x00f40401, 0x915fdb81, 0x01e7fffd, 0x915fdb82, 0x01e3fffd, 0x915fdb83, 0x012bff01, 0x915fdb84, 0x01240001, - 0x915fdb85, 0x00ac17bd, 0x915fdb86, 0x00dc0000, 0x001be686, 0x20dc0000, 0x001c1c87, 0x0137f811, 0x91561ca4, - 0x20c000c9, 0x8d9e1ca4, 0x0137fe41, 0x91481b8d, 0x00dc0000, 0x001be689, 0x00001800, 0x01dfdbac, 0x20700021, - 0x82b61ca4, 0x007000c9, 0x859fdb8f, 0x20dc0000, 0x001e1ca4, 0x1c700020, 0xf2bfdb91, 0x20dc0000, 0x001e1ca4, - 0x20dc0000, 0x001e1ca4, 0x1c700020, 0xf2be1911, 0x00ac17cd, 0x91485b95, 0x20dc0000, 0x001c1c9b, 0x00dc0000, - 0x00185cab, 0x00000c00, 0x01c91aac, 0x20dc0000, 0x001c1ca8, 0x18dc0000, 0x00185cab, 0x04700020, 0xf2ba1c95, - 0x00dc0000, 0x001be524, 0x00000c00, 0x01c91aac, 0x00000400, 0x01ce1b9f, 0x00001c00, 0x01c8c81f, 0x0137feb1, - 0x915fdba0, 0x00020000, 0x01d08820, 0x00dc0000, 0x001fdba2, 0x00000001, 0x9153c022, 0x00dc0000, 0x001fdb81, - 0x00c8005a, 0x52305cab, 0x00001400, 0x01c89b2c, 0x00001000, 0x01ca1bac, 0x00001400, 0x01dfdb9f, 0x00dc0000, - 0x001be524, 0x00000800, 0x01ce1b9f, 0x00dc0000, 0x001fdb9e, 0x00000400, 0x01dfdbac, 0x00dc0000, 0x00181cac, - 0x00dc0000, 0x001fdb9f, -}; - -unsigned int rpu_eth0_patch[] = { - 0x00160844, 0x00000000, 0x0016089c, 0x0000dd7b, 0x001608a0, 0x0000c704, 0x001608f0, 0x00000280, 0x00160934, - 0x00000000, 0x0016093c, 0x0000ff00, 0x00160940, 0x0000d500, 0x00160944, 0x0000ffff, 0x00160948, 0x00000081, - 0x001609d8, 0x00001db7, 0x001609dc, 0x000004c1, 0x001609e8, 0x000003f8, -}; - -unsigned int tpu_eth0[] = { - 0x010c0041, 0x915fdb81, 0x01fbfffd, 0x915fdb82, 0x01f7fffd, 0x915fdb83, 0x012ffdfd, 0x915fdb84, 0x00dc0000, - 0x001bc82d, 0x01380001, 0x91489c86, 0x01390001, 0x914ba707, 0x00dc0000, 0x001bc82d, 0x00b00020, 0xea97c085, - 0x00b000b0, 0xeddfdb8a, 0x01300001, 0x627fdb8b, 0x00dc0000, 0x001b8093, 0x01380001, 0x91489c8d, 0x00c80102, - 0x727fdb8e, 0x00dc0000, 0x00199b10, 0x00dc0000, 0x001fdb8c, 0x00c80182, 0x727fdb91, 0x00dc0000, 0x00199b16, - 0x00dc0000, 0x001fdb90, 0x00a40020, 0xea918813, 0x00a400a4, 0xedd18814, 0x00ec0005, 0x9157d995, 0x20855555, - 0x915fdb97, 0x00ec0005, 0x915fdb98, 0x013bff11, 0x915fdb99, 0x28dc0000, 0x0018dcd3, 0x00840035, 0x91565919, - 0x280800c5, 0x955fdb9c, 0x00048000, 0x09d8dcd7, 0x048400c8, 0xed9fdb9e, 0x28dc0000, 0x0018dcdd, 0x3cc800c9, - 0x0d58dcdd, 0x00dc0000, 0x001d881d, 0x008401f5, 0x94bfdba2, 0x28dc0000, 0x0018dcdd, 0x00041000, 0x09cfd924, - 0x28dc0000, 0x0018dcdd, 0x28dc0000, 0x0018dcdd, 0x288401f9, 0x94b0dcdd, 0x28dc0000, 0x0018dcdd, 0x28dc0000, - 0x0018dcdd, 0x28dc0000, 0x0018dcdd, 0x0084000d, 0x08cfd92b, 0x28ec0001, 0x9150dcdd, 0x0087fffd, 0x915bd96d, - 0x01390001, 0x914ba72e, 0x00dc0000, 0x001fc805, 0x00b00020, 0xea97c0ad, 0x00b000b0, 0xeddfdbb1, 0x01300001, - 0x627fdbb2, 0x00dc0000, 0x001b80b6, 0x00c80182, 0x727fdbb4, 0x00dc0000, 0x00199b39, 0x00dc0000, 0x001fdbb3, - 0x00a40020, 0xea918836, 0x00a400a4, 0xedd18837, 0x00ec0005, 0x9157d9b8, 0x20855555, 0x915fdbba, 0x00ec0005, - 0x915fdbbb, 0x013bff11, 0x915fdbbc, 0x20dc0000, 0x001fdbbd, 0x00840035, 0x9156593c, 0x200800c5, 0x955fdbbf, - 0x00048000, 0x09dfdbc0, 0x048400c8, 0xed9fdbc1, 0x20dc0000, 0x001fdbc2, 0x34c800c9, 0x0d5fdbc3, 0x00dc0000, - 0x001d8840, 0x008401f5, 0x94bfdbc5, 0x20dc0000, 0x001fdbc6, 0x00041000, 0x09cfd947, 0x20dc0000, 0x001fdbc8, - 0x20dc0000, 0x001fdbc9, 0x20dc0000, 0x001fdbca, 0x008401f9, 0x94bfdbcb, 0x20dc0000, 0x001fdbcc, 0x20dc0000, - 0x001fdbcd, 0x20dc0000, 0x001fdbce, 0x0084000d, 0x08cfd94f, 0x20ec0001, 0x915fdbd0, 0x0087fffd, 0x915bd96d, - 0x01380001, 0x915fdbd2, 0x0005fffc, 0x091fdb81, 0x00840035, 0x914a5956, 0x20dc0000, 0x001fdbd5, 0x00840035, - 0x91565953, 0x20040400, 0x09dfdbd8, 0x00040400, 0x09dfdbd8, 0x013bff81, 0x915fdbd9, 0x0086aaab, 0xe8dfdbda, - 0x20dc0000, 0x001fdbdb, 0x00ec0001, 0x9156595a, 0x0087fffd, 0x915fdbd1, 0x013bff81, 0x915fdbde, 0x0086aaab, - 0xe8dfdbdf, 0x20040400, 0x09cbe5e0, 0x00ec0001, 0x9156595e, 0x0087fffd, 0x915fdbe2, 0x00040800, 0x09cfe5e3, - 0x00dc0000, 0x001fdbd1, 0x20ec000d, 0x915fdbe5, 0x00dc0000, 0x001fdbe6, 0x013bffd1, 0x915fdbe9, 0x013bffc1, - 0x915fdbe8, 0x00855557, 0xe8dfdbe9, 0x213bffc1, 0x91565969, 0x00855557, 0xf0dfdbeb, 0x20dc0000, 0x001e596b, - 0x00ec0001, 0x915fdbd1, 0x00040c00, 0x09cf086e, 0x00dc0000, 0x001fdbd1, -}; - -unsigned int tpu_eth0_patch[] = { - 0x00160884, 0x0000ffff, 0x00160888, 0x00000000, 0x001608a8, 0x0000ffff, 0x00160938, 0x00000000, 0x001609ec, - 0x00001db7, 0x001609f0, 0x000004c1, 0x001609fc, 0x000002f9, -}; - -unsigned int xpec_eth0_mac[] = { - 0x0a00c2df, 0x0a28e2e0, 0x0580c2e1, 0x3400c000, 0x0400c813, 0x1080c813, 0x2800c000, 0x3480c000, 0x3500c000, - 0x0480c813, 0x1100c813, 0x2880c000, 0x1c70e2e2, 0x0000c2e3, 0x00b9b838, 0x40810000, 0x09f042e4, 0xa6000014, - 0x1c70e2e5, 0xbe000015, 0x1c7022e5, 0x09f042e6, 0xa6000019, 0x1c70e2e7, 0xbe00001a, 0x1c7022e7, 0x0e80c2e8, - 0x0f00c2e9, 0x0e00c2ea, 0x0f80c2eb, 0x0a80c2ec, 0x0b00c2ed, 0x2700c3e8, 0xc0fff000, 0x0d00c826, 0x0d80c824, - 0x30c28001, 0x30c26001, 0x0011a83c, 0x0001083c, 0x00b682ee, 0x013682ef, 0x09810801, 0x9600002e, 0x0180c2f0, - 0x01071802, 0x0080c2f1, 0x0100e802, 0x410100c1, 0x0080c2f2, 0x09b70530, 0x92000035, 0x0d3502f3, 0x4d0100c1, - 0x0e80c2f4, 0x2800c000, 0xaf1e0038, 0x29cb0000, 0x8e00003e, 0x30c2e004, 0x042702e7, 0xbe000049, 0xaf00003e, - 0x044ae2e7, 0x001082f5, 0x002db800, 0x008172f6, 0x001082f7, 0x0021b800, 0x21817618, 0x0100c2f8, 0x00870801, - 0x408100c2, 0x29c24001, 0xa6000059, 0x29c24004, 0xa6000053, 0x0100c2f9, 0x2080c003, 0x0183052e, 0x418100c2, - 0x0180c2fa, 0x418102c2, 0x0d00c2fb, 0x0d80c2fc, 0x0080c2fd, 0x0300c2fe, 0x2680c008, 0x430180c1, 0x29c24004, - 0xa6000061, 0x0100c2ff, 0x2080c003, 0x0183052e, 0x418100c2, 0x0180c300, 0x418102c2, 0x0d00c301, 0x0d80c302, - 0x0080c2fd, 0x0380c303, 0x2680c008, 0x438180c1, 0x21a11006, 0x8e00006b, 0x0687a803, 0xc0fff000, 0x0081852f, - 0x0000c304, 0x61010141, 0x41010140, 0x61010141, 0x41010140, 0x61010141, 0x41010140, 0x49810040, 0x29c24004, - 0xa600007d, 0x0100c305, 0x2080c001, 0x20830600, 0x0183052e, 0x418100c2, 0x0180c306, 0x418102c2, 0x0e80c307, - 0x2680c008, 0xc0fff000, 0x0000c304, 0x0180c308, 0x0080c813, 0x00826d00, 0x00826d00, 0x00826d00, 0x00826d00, - 0x00826d00, 0x00826d00, 0x408100c3, 0x0100c309, 0x0007b801, 0x400100c2, 0x0100c30a, 0x20028007, 0x20012001, - 0x400100c2, 0x0e80c30b, 0x2680c008, 0xc0fff000, 0x2180c001, 0x01868558, 0xa6000099, 0x30c2e010, 0xbe0000b5, - 0x00270528, 0x29808001, 0xa60000ad, 0x00270528, 0x098102f3, 0x860000a5, 0x00270529, 0x098102ee, 0x860000a5, - 0x30c2e400, 0x30c2e010, 0xbe0000b5, 0x30c2e200, 0x0080c30c, 0x00830533, 0x00270534, 0x09808c01, 0xa60000b5, - 0x30c2e010, 0xbe0000b5, 0x30c2e100, 0x00270528, 0x09810559, 0x860000b5, 0x00270529, 0x0981055a, 0x860000b5, - 0x30c2e010, 0x0e80c30d, 0x2680c008, 0xc0fff000, 0x21a1100c, 0x8e0000bc, 0x0687a803, 0xc0fff000, 0x008d852f, - 0x0000c30e, 0x61010141, 0x41010140, 0x61010141, 0x41010140, 0x61010141, 0x41010140, 0x49810040, 0x0e80c30f, - 0x2680c008, 0xc0fff000, 0x0000c30e, 0x0180c310, 0x00a66d00, 0x00826d00, 0x00826d00, 0x00826d00, 0x00826d00, - 0x00826d00, 0x408100c3, 0x0100c311, 0x0007b801, 0x400100c2, 0x0100c312, 0x20028007, 0x20012001, 0x400100c2, - 0x0027052a, 0x29808001, 0xa60000e5, 0x0027052a, 0x098102f3, 0x860000e3, 0x0027052b, 0x098102ee, 0x860000e3, - 0x10c2e2e7, 0xbe0000e6, 0x10c2e313, 0xbe0000e6, 0x10c2e2e5, 0x0e80c314, 0x2680c008, 0xc0fff000, 0x21a11012, - 0x8e0000ed, 0x0687a803, 0xc0fff000, 0x0099852f, 0x0e80c2ee, 0x610101c1, 0x018482ee, 0x29870081, 0x820000f7, - 0x0000c315, 0x041022f6, 0x30c22002, 0x41018040, 0x0000c316, 0x0410e2f6, 0x410100c0, 0x01048317, 0x012bb802, - 0x0000c318, 0x00008558, 0x0021b800, 0x09810802, 0x96000103, 0x30c22002, 0xbe000104, 0x30c2e002, 0x0000c315, - 0x61010041, 0x410180c0, 0x5e018106, 0x098d0303, 0x82000115, 0x09f08319, 0xa600010e, 0x2600c008, 0xbe000110, - 0x2680c050, 0xbe000110, 0x09a7080d, 0x86000110, 0x09f0831a, 0xa6000115, 0x5e010106, 0x230d0020, 0x0080c2f8, - 0x20270020, 0x0001052e, 0x400100c1, 0x30c26001, 0x0380c303, 0x0d00c301, 0x0d80c302, 0x29c24004, 0xa6000021, - 0x0100c2ff, 0x2080c003, 0x0183052e, 0x418100c2, 0x0180c300, 0x418182c2, 0x5e018107, 0x098f031b, 0x82000134, - 0x09f08319, 0xa600012d, 0x2680c008, 0xbe00012f, 0x2680c050, 0xbe00012f, 0x09a7080d, 0x8600012f, 0x09f0831a, - 0xa6000134, 0x5e010107, 0x238f0020, 0x0080c2f8, 0x20270020, 0x0001052e, 0x400100c1, 0x30c26001, 0x0300c2fe, - 0x0d00c2fb, 0x0d80c2fc, 0x29c24004, 0xa6000021, 0x0100c2f9, 0x2080c003, 0x0183052e, 0x418100c2, 0x0180c2fa, - 0x418182c2, 0x01d082df, 0x145022f6, 0x3c70e400, 0x0e80c2e8, 0x0d00c2ee, 0x0d80c2ee, 0x3c702400, 0x00899810, - 0x0410e801, 0x0100c31c, 0x0011b803, 0x00b9a800, 0x0402e808, 0x0300c2f3, 0x690400d0, 0x0380c2f3, 0x0080c31d, - 0x00038561, 0x400100c1, 0xbe000159, 0x29c28004, 0xa600015f, 0x0080c31e, 0x00038568, 0x400100c1, 0xc0fff000, - 0x29c28010, 0xa600019f, 0x29c28002, 0xa600016d, 0x29c28010, 0xa6000021, 0x81808000, 0x1280c808, 0xae000167, - 0x00270558, 0x0980831f, 0xa6000021, 0x31c6e002, 0xc0fff000, 0x29c28010, 0xa6000021, 0x81810000, 0x1280c808, - 0xae000171, 0x00270558, 0x09808320, 0xa6000021, 0x31c6e008, 0xc0fff000, 0x0080c321, 0x00038562, 0x400100c1, - 0x0410e2e0, 0xbe00019a, 0x0080c322, 0x00038563, 0x400100c1, 0x0410e323, 0xbe00019a, 0x0080c324, 0x00038564, - 0x400100c1, 0x0410e325, 0xbe00019a, 0x0080c326, 0x00038565, 0x400100c1, 0x0410e327, 0xbe00019a, 0x0080c328, - 0x00038566, 0x400100c1, 0x0410e329, 0xbe00019a, 0x0080c32a, 0x00038567, 0x400100c1, 0x0410e32b, 0xbe00019a, - 0x0080c32c, 0x00038569, 0x400100c1, 0x0410e32d, 0xbe00019a, 0x29c24004, 0xa6000021, 0x00270558, 0x29804002, - 0xa600015f, 0x81800000, 0x1290832e, 0xae0001a1, 0xc0fff000, 0xaf0181a3, 0x0480c825, 0x3144e008, 0xbe0001ab, - 0xaf0201a7, 0x0480c825, 0x31442008, 0xbe0001ab, 0x0e00c2ee, 0x0f80c2ee, 0x0000c32f, 0x0100c330, 0x009282f5, - 0x00adb801, 0x008372f6, 0x019282f7, 0x01a1b803, 0x21877618, 0x00870801, 0x408100c0, 0x408100c2, 0x0100c331, - 0x201287ff, 0x400100c2, 0x0180c332, 0x00c19800, 0x408100c3, 0x2981003c, 0x8a0001e1, 0x099282f6, 0xa60001c4, - 0x298105ee, 0x920001e1, 0x298105ea, 0x920001e1, 0x0f80c333, 0x31446002, 0x2880c000, 0x1e11b800, 0x3e0080ff, - 0x29c44002, 0xa60001d7, 0x0280c334, 0x0500c335, 0x0e00c336, 0x31442001, 0x0100c337, 0x2080c000, 0x01830500, - 0x418100c2, 0x0180c338, 0x418182c2, 0x0280c339, 0x0500c33a, 0x0e00c33b, 0x3144e001, 0x0100c33c, 0x2080c000, - 0x01830500, 0x418100c2, 0x0180c33d, 0x418182c2, 0x0039b327, 0xbe0002b2, 0x14a702f6, 0x0b80c2ee, 0x0c00c33e, - 0x0c80c33f, 0xbe00020f, 0x14a702f6, 0x0b80c2ee, 0x0c00c33e, 0x0c80c33f, 0xbe00022a, 0x0b80c826, 0x0c80c824, - 0x005482ee, 0x00b282ee, 0x013282ef, 0x09810801, 0x960001f6, 0x0180c2f0, 0x01071802, 0x0080c340, 0x0100e802, - 0x410100c1, 0x0080c341, 0x09b30506, 0x920001fd, 0x0baf02f3, 0x4b8100c1, 0x0c80c342, 0x0b80c343, 0x0100c344, - 0x2080c001, 0x20830600, 0x01830500, 0x418100c2, 0x0180c345, 0x418182c2, 0x29c48001, 0xa600020b, 0x2600c020, - 0xc0fff000, 0x29c48004, 0xa600020f, 0x0e00c2ee, 0xc0fff000, 0x2180c020, 0x0100c330, 0x00870501, 0x408100c2, - 0x0000c332, 0x09870503, 0x8a000218, 0x498100c0, 0xbe00021a, 0x00871503, 0x408100c0, 0x0e00c346, 0x3144e002, - 0x0100c33c, 0x2080c000, 0x01830501, 0x418100c2, 0x0180c33d, 0x418182c2, 0x29c44001, 0xa6000226, 0x2600c020, - 0xc0fff000, 0x29c48004, 0xa600022a, 0x0e00c2ee, 0xc0fff000, 0x2180c020, 0x0100c330, 0x00870501, 0x408100c2, - 0x0000c332, 0x09870503, 0x8a000233, 0x498100c0, 0xbe000235, 0x00871503, 0x408100c0, 0x0e00c347, 0x31442002, - 0x0100c337, 0x2080c000, 0x01830501, 0x418100c2, 0x0180c338, 0x418182c2, 0x7e018105, 0x0021b80a, 0x00008348, - 0x098b0800, 0x82000021, 0x0c80c349, 0x09a60813, 0xc0fff000, 0x7e010105, 0x0c80c342, 0xc0fff000, 0x29c44004, - 0xa6000268, 0x0000c331, 0x2100c020, 0x00851502, 0x408100c0, 0x09850502, 0x8a00025e, 0x3144e004, 0x01270502, - 0x29c44001, 0xa6000259, 0x0280c339, 0x010b0802, 0x0521a802, 0x3144e001, 0xc0fff000, 0x0280c334, 0x010b0802, - 0x0521a802, 0x31442001, 0xc0fff000, 0x29c44001, 0xa6000264, 0x0280c339, 0x0500c33a, 0x3144e001, 0xc0fff000, - 0x0280c334, 0x0500c335, 0x31442001, 0xc0fff000, 0x31442004, 0x0c00c2ee, 0x0c80c2ee, 0x0b80c2ee, 0xc0fff000, - 0x0c00c2ee, 0x0c80c2ee, 0x0b80c2ee, 0x0100c34a, 0x005282df, 0x0091b800, 0x1c70e34b, 0x690400d1, 0x1c70234b, - 0x0080c34c, 0x0003855b, 0x400100c1, 0x09818504, 0x8600027d, 0x2492e000, 0xbe0002b2, 0x0492e2e4, 0xbe0002b2, - 0x09818504, 0x86000285, 0x0080c34d, 0x0003855c, 0x400100c1, 0xbe00028c, 0x0080c34e, 0x0003855d, 0x400100c1, - 0x099f8504, 0x9200028c, 0x0492e325, 0xbe0002b2, 0x0000c34f, 0x00838504, 0x408100c0, 0x09958504, 0x8a000293, - 0x00a70504, 0xbe000294, 0x20a7000a, 0x0180c350, 0x00486351, 0x008302f3, 0x20832002, 0x008302f3, 0x00028800, - 0x20017200, 0x09f04319, 0xa600029e, 0x2001700a, 0x400100c3, 0x0f80c352, 0x0e00c2ee, 0x06158505, 0xc0fff000, - 0x0080c353, 0x0003855e, 0x400100c1, 0x0492e2e0, 0xbe0002b2, 0x0080c354, 0x0003855f, 0x400100c1, 0x0492e323, - 0xbe0002b2, 0x0080c355, 0x00038560, 0x400100c1, 0x0492e32b, 0xbe0002b2, 0x29c48008, 0xa60002bc, 0x81828000, - 0x1280c809, 0xae0002b6, 0x00270558, 0x09808356, 0xa60002c3, 0x31c6e001, 0xbe0002c3, 0x81830000, 0x1280c809, - 0xae0002be, 0x00270558, 0x09808357, 0xa60002c3, 0x31c6e004, 0x0000c34f, 0x0f80c2ea, 0x0e00c2eb, 0x498180c0, - 0x0000c2e3, 0x00b9b838, 0x40810000, 0x09f042e4, 0xa60002ce, 0x1c70e2e5, 0xbe0002cf, 0x1c7022e5, 0x00270558, - 0x09808358, 0xa6000021, 0x31c6e010, 0xc0fff000, 0x0000c2e3, 0x00b9b838, 0x40810000, 0x09f042e6, 0xa60002db, - 0x1c70e2e7, 0xbe0002dc, 0x1c7022e7, 0x2700c3e8, 0xc0fff000, 0xc0000fff, 0x00000f00, 0x80000000, 0x15601540, - 0x0000a000, 0x000015b4, 0x10000000, 0x00001000, 0x20000000, 0x00004000, 0x8022ffb6, 0x8145ff47, 0x89a3ffc1, - 0x89a7ffc2, 0xdac70c0c, 0x92d4ff42, 0x0000ffff, 0xffff0000, 0x00010000, 0x000014c0, 0x000014c4, 0xffffffff, - 0x9067ff41, 0x03c00000, 0x00008000, 0x003f0000, 0x000014b8, 0x00001ffc, 0x0854877e, 0x0107b4b6, 0x9908ffb4, - 0x000014bc, 0x00001520, 0x00001ff4, 0x085507fd, 0x0126b5b6, 0x9927ffb5, 0x00001540, 0x000014a0, 0x00001fdc, - 0x0253047a, 0x9080ff41, 0x000014c8, 0x000014cc, 0x000014d0, 0x9094ff41, 0x000015e0, 0x90b8ff41, 0x000014a8, - 0x90c8ff41, 0x000014d4, 0x000014d8, 0x000014dc, 0x00002000, 0x90e9ff41, 0x000014b0, 0x000014b4, 0x00e00000, - 0x000f0000, 0x40000000, 0x00040000, 0x00001560, 0x000014e0, 0x00001584, 0x000015a0, 0x00100000, 0x00200000, - 0x00001588, 0x0000158c, 0x90000000, 0x00001590, 0xa0000000, 0x00001594, 0xb0000000, 0x00001598, 0xc0000000, - 0x0000159c, 0xd0000000, 0x000015a4, 0xe0000000, 0x03ff0000, 0x00001400, 0x00001404, 0x00001408, 0x0000140c, - 0x9a6dff4b, 0x00001460, 0x14800000, 0x91e3ff86, 0x00001fec, 0x08518c7c, 0x00001480, 0x14a00000, 0x91e8ff87, - 0x00001fe4, 0x08520c7b, 0x023db3ba, 0x91edff49, 0x00001418, 0x0000141c, 0x023eabba, 0x2a48abb3, 0x00001fd4, - 0x0250647f, 0xd2224087, 0xd2074086, 0x00001fff, 0x8245ff04, 0x00001420, 0x00000800, 0x0000156c, 0x00001570, - 0x00001574, 0x00001410, 0x00001414, 0x55555555, 0x91abff40, 0x00001578, 0x0000157c, 0x00001580, 0x00400000, - 0x00800000, 0x01000000, -}; - -unsigned int xpec_eth0_mac_patch[] = { - 0x00170054, 0x0000ffff, 0x00170058, 0x0000ffff, 0x0017005c, 0x0000ffff, 0x00170060, 0x0000ffff, 0x00170064, - 0x0000ffff, 0x00170068, 0x0000ffff, 0x0017006c, 0x0000ffff, 0x00170070, 0x0000ffff, 0x00170074, 0x0000ffff, - 0x00170078, 0x0000ffff, 0x0017007c, 0x0000ffff, 0x00170080, 0x0000ffff, 0x00173400, 0x00000000, 0x00173404, - 0x00000000, 0x00173408, 0x00000000, 0x0017340c, 0x00000000, 0x00173410, 0x00000000, 0x00173414, 0x00000000, - 0x00173418, 0x00000000, 0x0017341c, 0x00000000, 0x00173420, 0x00000276, 0x00173424, 0x0000027f, 0x00173428, - 0x000002a3, 0x0017342c, 0x000002a8, 0x00173430, 0x000002ad, 0x00173434, 0x000002de, 0x00173438, 0x000002de, - 0x0017343c, 0x000002de, 0x00173440, 0x000002de, 0x00173444, 0x000002de, 0x00173448, 0x000002de, 0x0017344c, - 0x000002de, 0x00173450, 0x000002de, 0x00173454, 0x000002de, 0x00173458, 0x000002de, 0x0017345c, 0x000002de, - 0x00173460, 0x00000000, 0x00173464, 0x00000000, 0x00173468, 0x00000000, 0x0017346c, 0x00000000, 0x00173470, - 0x00000000, 0x00173474, 0x00000000, 0x00173478, 0x00000000, 0x0017347c, 0x00000000, 0x00173480, 0x00000000, - 0x00173484, 0x00000000, 0x00173488, 0x00000000, 0x0017348c, 0x00000000, 0x00173490, 0x00000000, 0x00173494, - 0x00000000, 0x00173498, 0x00000000, 0x0017349c, 0x00000000, 0x001734a0, 0x00000000, 0x001734a4, 0x00000000, - 0x001734a8, 0x00000000, 0x001734ac, 0x00000000, 0x001734b0, 0x00000000, 0x001734b4, 0x00000000, 0x001734b8, - 0x00000000, 0x001734bc, 0x00000000, 0x001734c0, 0x00000000, 0x001734c4, 0x00000000, 0x001734c8, 0x00000000, - 0x001734cc, 0x00000000, 0x001734d0, 0x00000000, 0x001734d4, 0x00000000, 0x001734d8, 0x00000000, 0x001734dc, - 0x00000000, 0x001734e0, 0x00000155, 0x001734e4, 0x00000177, 0x001734e8, 0x0000017c, 0x001734ec, 0x00000181, - 0x001734f0, 0x00000186, 0x001734f4, 0x0000018b, 0x001734f8, 0x00000190, 0x001734fc, 0x00000195, 0x00173500, - 0x000002de, 0x00173504, 0x000002de, 0x00173508, 0x000002de, 0x0017350c, 0x000002de, 0x00173510, 0x000002de, - 0x00173514, 0x000002de, 0x00173518, 0x000002de, 0x0017351c, 0x000002de, 0x00173520, 0x00000000, 0x00173524, - 0x00000000, 0x00173528, 0x00000000, 0x0017352c, 0x00000000, 0x00173530, 0x00000000, 0x00173534, 0x00000000, - 0x00173538, 0x00000000, 0x0017353c, 0x00000000, 0x00173540, 0x00000000, 0x00173544, 0x00000000, 0x00173548, - 0x00000000, 0x0017354c, 0x00000000, 0x00173550, 0x00000000, 0x00173554, 0x00000000, 0x00173558, 0x00000000, - 0x0017355c, 0x00000000, 0x00173560, 0x00080000, 0x00173564, 0x03020100, 0x00173568, 0x00000504, 0x0017356c, - 0x00000000, 0x00173570, 0x00000000, 0x00173574, 0x00000000, 0x00173578, 0x00000000, 0x0017357c, 0x00000000, - 0x00173580, 0x00000000, 0x00173584, 0x00000000, 0x00173588, 0x00000000, 0x0017358c, 0x00000000, 0x00173590, - 0x00000000, 0x00173594, 0x00000000, 0x00173598, 0x00000000, 0x0017359c, 0x00000000, 0x001735a0, 0x00000000, - 0x001735a4, 0x00000000, 0x001735a8, 0x00000000, 0x001735ac, 0x00000000, 0x001735b0, 0x00000000, 0x001735e0, - 0x00000000, 0x001735e4, 0x00000000, 0x001735e8, 0x00000000, 0x001735ec, 0x00000000, 0x001735f0, 0x00000000, - 0x001735f4, 0x00000000, 0x001735f8, 0x00000000, 0x001735fc, 0x00000000, 0x00173fd0, 0x0250607f, 0x00173fd8, - 0x0253007a, 0x00173fe0, 0x0852087b, 0x00173fe8, 0x0851887c, 0x00173ff0, 0x085503fd, 0x00173ff8, 0x0854837e, -}; - -static unsigned int rpu_eth1[] = { - 0x00f40401, 0x915fdb81, 0x01e7fffd, 0x915fdb82, 0x01e3fffd, 0x915fdb83, 0x012bff01, 0x915fdb84, 0x01240001, - 0x915fdb85, 0x00ac17bd, 0x915fdb86, 0x00dc0000, 0x001be686, 0x20dc0000, 0x001c1c87, 0x0137f811, 0x91561ca4, - 0x20c000c9, 0x8d9e1ca4, 0x0137fe41, 0x91481b8d, 0x00dc0000, 0x001be689, 0x00101800, 0x21dfdbac, 0x20700021, - 0x82b61ca4, 0x007000c9, 0x859fdb8f, 0x20dc0000, 0x001e1ca4, 0x1c700020, 0xf2bfdb91, 0x20dc0000, 0x001e1ca4, - 0x20dc0000, 0x001e1ca4, 0x1c700020, 0xf2be1911, 0x00ac17cd, 0x91485b95, 0x20dc0000, 0x001c1c9b, 0x00dc0000, - 0x00185cab, 0x00100c00, 0x21c91aac, 0x20dc0000, 0x001c1ca8, 0x18dc0000, 0x00185cab, 0x04700020, 0xf2ba1c95, - 0x00dc0000, 0x001be524, 0x00100c00, 0x21c91aac, 0x00100400, 0x21ce1b9f, 0x00101c00, 0x21c8c91f, 0x0137feb1, - 0x915fdba0, 0x00120000, 0x21d08920, 0x00dc0000, 0x001fdba2, 0x00100001, 0x9153c222, 0x00dc0000, 0x001fdb81, - 0x00c8005a, 0x52305cab, 0x00101400, 0x21c89b2c, 0x00101000, 0x21ca1bac, 0x00101400, 0x21dfdb9f, 0x00dc0000, - 0x001be524, 0x00100800, 0x21ce1b9f, 0x00dc0000, 0x001fdb9e, 0x00100400, 0x21dfdbac, 0x00dc0000, 0x00181cac, - 0x00dc0000, 0x001fdb9f, -}; - -static unsigned int rpu_eth1_patch[] = { - 0x0016184c, 0x00000000, 0x0016189c, 0x0000dd7b, 0x001618a0, 0x0000c704, 0x001618f0, 0x00000200, 0x00161934, - 0x00000000, 0x0016193c, 0x0000ff00, 0x00161940, 0x0000d500, 0x00161944, 0x0000ffff, 0x00161948, 0x00000081, - 0x001619d8, 0x00001db7, 0x001619dc, 0x000004c1, 0x001619e8, 0x000003f8, -}; - -static unsigned int tpu_eth1[] = { - 0x010c0041, 0x915fdb81, 0x01fbfffd, 0x915fdb82, 0x01f7fffd, 0x915fdb83, 0x012ffdfd, 0x915fdb84, - 0x00dc0000, 0x001bc92d, 0x01380001, 0x91489c86, 0x01390001, 0x914ba707, 0x00dc0000, 0x001bc92d, 0x00b00020, - 0xea97c285, 0x00b000b0, 0xeddfdb8a, 0x01300001, 0x627fdb8b, 0x00dc0000, 0x001b8293, 0x01380001, 0x91489c8d, - 0x00c80102, 0x727fdb8e, 0x00dc0000, 0x00199b10, 0x00dc0000, 0x001fdb8c, 0x00c80182, 0x727fdb91, 0x00dc0000, - 0x00199b16, 0x00dc0000, 0x001fdb90, 0x00a40020, 0xea918913, 0x00a400a4, 0xedd18914, 0x00ec0005, 0x9157d995, - 0x20855555, 0x915fdb97, 0x00ec0005, 0x915fdb98, 0x013bff11, 0x915fdb99, 0x28dc0000, 0x0018dcd3, 0x00840035, - 0x91565919, 0x281800c5, 0x955fdb9c, 0x00148000, 0x29d8dcd7, 0x048400c8, 0xed9fdb9e, 0x28dc0000, 0x0018dcdd, - 0x3cc800c9, 0x0d58dcdd, 0x00dc0000, 0x001d891d, 0x008401f5, 0x94bfdba2, 0x28dc0000, 0x0018dcdd, 0x00141000, - 0x29cfd924, 0x28dc0000, 0x0018dcdd, 0x28dc0000, 0x0018dcdd, 0x288401f9, 0x94b0dcdd, 0x28dc0000, 0x0018dcdd, - 0x28dc0000, 0x0018dcdd, 0x28dc0000, 0x0018dcdd, 0x0084000d, 0x08cfd92b, 0x28ec0001, 0x9150dcdd, 0x0087fffd, - 0x915bd96d, 0x01390001, 0x914ba72e, 0x00dc0000, 0x001fc905, 0x00b00020, 0xea97c2ad, 0x00b000b0, 0xeddfdbb1, - 0x01300001, 0x627fdbb2, 0x00dc0000, 0x001b82b6, 0x00c80182, 0x727fdbb4, 0x00dc0000, 0x00199b39, 0x00dc0000, - 0x001fdbb3, 0x00a40020, 0xea918936, 0x00a400a4, 0xedd18937, 0x00ec0005, 0x9157d9b8, 0x20855555, 0x915fdbba, - 0x00ec0005, 0x915fdbbb, 0x013bff11, 0x915fdbbc, 0x20dc0000, 0x001fdbbd, 0x00840035, 0x9156593c, 0x201800c5, - 0x955fdbbf, 0x00148000, 0x29dfdbc0, 0x048400c8, 0xed9fdbc1, 0x20dc0000, 0x001fdbc2, 0x34c800c9, 0x0d5fdbc3, - 0x00dc0000, 0x001d8940, 0x008401f5, 0x94bfdbc5, 0x20dc0000, 0x001fdbc6, 0x00141000, 0x29cfd947, 0x20dc0000, - 0x001fdbc8, 0x20dc0000, 0x001fdbc9, 0x20dc0000, 0x001fdbca, 0x008401f9, 0x94bfdbcb, 0x20dc0000, 0x001fdbcc, - 0x20dc0000, 0x001fdbcd, 0x20dc0000, 0x001fdbce, 0x0084000d, 0x08cfd94f, 0x20ec0001, 0x915fdbd0, 0x0087fffd, - 0x915bd96d, 0x01380001, 0x915fdbd2, 0x0015fffc, 0x291fdb81, 0x00840035, 0x914a5956, 0x20dc0000, 0x001fdbd5, - 0x00840035, 0x91565953, 0x20140400, 0x29dfdbd8, 0x00140400, 0x29dfdbd8, 0x013bff81, 0x915fdbd9, 0x0086aaab, - 0xe8dfdbda, 0x20dc0000, 0x001fdbdb, 0x00ec0001, 0x9156595a, 0x0087fffd, 0x915fdbd1, 0x013bff81, 0x915fdbde, - 0x0086aaab, 0xe8dfdbdf, 0x20140400, 0x29cbe5e0, 0x00ec0001, 0x9156595e, 0x0087fffd, 0x915fdbe2, 0x00140800, - 0x29cfe5e3, 0x00dc0000, 0x001fdbd1, 0x20ec000d, 0x915fdbe5, 0x00dc0000, 0x001fdbe6, 0x013bffd1, 0x915fdbe9, - 0x013bffc1, 0x915fdbe8, 0x00855557, 0xe8dfdbe9, 0x213bffc1, 0x91565969, 0x00855557, 0xf0dfdbeb, 0x20dc0000, - 0x001e596b, 0x00ec0001, 0x915fdbd1, 0x00140c00, 0x29cf096e, 0x00dc0000, 0x001fdbd1, -}; - -static unsigned int tpu_eth1_patch[] = { - 0x00161884, 0x0000ffff, 0x00161888, 0x00000000, 0x001618a8, 0x0000ffff, 0x00161938, 0x00000000, 0x001619ec, - 0x00001db7, 0x001619f0, 0x000004c1, 0x001619fc, 0x000002f9, -}; - -static unsigned int xpec_eth1_mac[] = { - 0x0a00c2df, 0x0a28e2e0, 0x0580c2e1, 0x3600c000, 0x0400c813, 0x1080c813, 0x2800c000, 0x3680c000, 0x3700c000, - 0x0480c813, 0x1100c813, 0x2880c000, 0x1cf2e2e2, 0x0000c2e3, 0x00b9b839, 0x40810000, 0x09f242e4, 0xa6000014, - 0x1cf2e2e5, 0xbe000015, 0x1cf222e5, 0x09f242e6, 0xa6000019, 0x1cf2e2e7, 0xbe00001a, 0x1cf222e7, 0x0e80c2e8, - 0x0f00c2e9, 0x0e00c2ea, 0x0f80c2eb, 0x0a80c2ec, 0x0b00c2ed, 0x2700c3e8, 0xc0fff000, 0x0d00c826, 0x0d80c824, - 0x30c28001, 0x30c26001, 0x0011a83d, 0x0001083d, 0x00b682ee, 0x013682ef, 0x09810801, 0x9600002e, 0x0180c2f0, - 0x01071802, 0x0080c2f1, 0x0100e802, 0x410100c1, 0x0080c2f2, 0x09b70530, 0x92000035, 0x0d3502f3, 0x4d0100c1, - 0x0e80c2f4, 0x2800c000, 0xaf220038, 0x29cb0000, 0x8e00003e, 0x30c2e004, 0x042702e7, 0xbe000049, 0xaf04003e, - 0x044ae2e7, 0x001082f5, 0x002db800, 0x008172f6, 0x001082f7, 0x0021b800, 0x21817618, 0x0100c2f8, 0x00870801, - 0x408100c2, 0x29c24001, 0xa6000059, 0x29c24004, 0xa6000053, 0x0100c2f9, 0x2080c003, 0x0183052e, 0x418100c2, - 0x0180c2fa, 0x418102c2, 0x0d00c2fb, 0x0d80c2fc, 0x0080c2fd, 0x0300c2fe, 0x2680c008, 0x430180c1, 0x29c24004, - 0xa6000061, 0x0100c2ff, 0x2080c003, 0x0183052e, 0x418100c2, 0x0180c300, 0x418102c2, 0x0d00c301, 0x0d80c302, - 0x0080c2fd, 0x0380c303, 0x2680c008, 0x438180c1, 0x21a11006, 0x8e00006b, 0x0687a803, 0xc0fff000, 0x0081852f, - 0x0000c304, 0x61010141, 0x41010140, 0x61010141, 0x41010140, 0x61010141, 0x41010140, 0x49810040, 0x29c24004, - 0xa600007d, 0x0100c305, 0x2080c001, 0x20830600, 0x0183052e, 0x418100c2, 0x0180c306, 0x418102c2, 0x0e80c307, - 0x2680c008, 0xc0fff000, 0x0000c304, 0x0180c308, 0x0080c813, 0x00826d00, 0x00826d00, 0x00826d00, 0x00826d00, - 0x00826d00, 0x00826d00, 0x408100c3, 0x0100c309, 0x0007b801, 0x400100c2, 0x0100c30a, 0x20028007, 0x20012001, - 0x400100c2, 0x0e80c30b, 0x2680c008, 0xc0fff000, 0x2180c001, 0x01868558, 0xa6000099, 0x30c2e010, 0xbe0000b5, - 0x00270528, 0x29808001, 0xa60000ad, 0x00270528, 0x098102f3, 0x860000a5, 0x00270529, 0x098102ee, 0x860000a5, - 0x30c2e400, 0x30c2e010, 0xbe0000b5, 0x30c2e200, 0x0080c30c, 0x00830533, 0x00270534, 0x09808c01, 0xa60000b5, - 0x30c2e010, 0xbe0000b5, 0x30c2e100, 0x00270528, 0x09810559, 0x860000b5, 0x00270529, 0x0981055a, 0x860000b5, - 0x30c2e010, 0x0e80c30d, 0x2680c008, 0xc0fff000, 0x21a1100c, 0x8e0000bc, 0x0687a803, 0xc0fff000, 0x008d852f, - 0x0000c30e, 0x61010141, 0x41010140, 0x61010141, 0x41010140, 0x61010141, 0x41010140, 0x49810040, 0x0e80c30f, - 0x2680c008, 0xc0fff000, 0x0000c30e, 0x0180c310, 0x00a66d00, 0x00826d00, 0x00826d00, 0x00826d00, 0x00826d00, - 0x00826d00, 0x408100c3, 0x0100c311, 0x0007b801, 0x400100c2, 0x0100c312, 0x20028007, 0x20012001, 0x400100c2, - 0x0027052a, 0x29808001, 0xa60000e5, 0x0027052a, 0x098102f3, 0x860000e3, 0x0027052b, 0x098102ee, 0x860000e3, - 0x10c2e2e7, 0xbe0000e6, 0x10c2e313, 0xbe0000e6, 0x10c2e2e5, 0x0e80c314, 0x2680c008, 0xc0fff000, 0x21a11012, - 0x8e0000ed, 0x0687a803, 0xc0fff000, 0x0099852f, 0x0e80c2ee, 0x610101c1, 0x018482ee, 0x29870081, 0x820000f7, - 0x0000c315, 0x041022f6, 0x30c22002, 0x41018040, 0x0000c316, 0x0410e2f6, 0x410100c0, 0x01048317, 0x012bb802, - 0x0000c318, 0x00008558, 0x0021b800, 0x09810802, 0x96000103, 0x30c22002, 0xbe000104, 0x30c2e002, 0x0000c315, - 0x61010041, 0x410180c0, 0x5e818106, 0x098d0303, 0x82000115, 0x09f28319, 0xa600010e, 0x2600c008, 0xbe000110, - 0x2680c050, 0xbe000110, 0x09a7080d, 0x86000110, 0x09f2831a, 0xa6000115, 0x5e810106, 0x230d0020, 0x0080c2f8, - 0x20270020, 0x0001052e, 0x400100c1, 0x30c26001, 0x0380c303, 0x0d00c301, 0x0d80c302, 0x29c24004, 0xa6000021, - 0x0100c2ff, 0x2080c003, 0x0183052e, 0x418100c2, 0x0180c300, 0x418182c2, 0x5e818107, 0x098f031b, 0x82000134, - 0x09f28319, 0xa600012d, 0x2680c008, 0xbe00012f, 0x2680c050, 0xbe00012f, 0x09a7080d, 0x8600012f, 0x09f2831a, - 0xa6000134, 0x5e810107, 0x238f0020, 0x0080c2f8, 0x20270020, 0x0001052e, 0x400100c1, 0x30c26001, 0x0300c2fe, - 0x0d00c2fb, 0x0d80c2fc, 0x29c24004, 0xa6000021, 0x0100c2f9, 0x2080c003, 0x0183052e, 0x418100c2, 0x0180c2fa, - 0x418182c2, 0x01d882df, 0x165822f6, 0x3cf2e400, 0x0e80c2e8, 0x0d00c2ee, 0x0d80c2ee, 0x3cf22400, 0x00899810, - 0x0410e801, 0x0100c31c, 0x0011b803, 0x00b9a800, 0x0402e808, 0x0300c2f3, 0x690400d0, 0x0380c2f3, 0x0080c31d, - 0x00038561, 0x400100c1, 0xbe000159, 0x29c28004, 0xa600015f, 0x0080c31e, 0x00038568, 0x400100c1, 0xc0fff000, - 0x29c28010, 0xa600019f, 0x29c28002, 0xa600016d, 0x29c28010, 0xa6000021, 0x81848000, 0x1280c808, 0xae000167, - 0x00270558, 0x0980831f, 0xa6000021, 0x31c6e002, 0xc0fff000, 0x29c28010, 0xa6000021, 0x81850000, 0x1280c808, - 0xae000171, 0x00270558, 0x09808320, 0xa6000021, 0x31c6e008, 0xc0fff000, 0x0080c321, 0x00038562, 0x400100c1, - 0x0410e2e0, 0xbe00019a, 0x0080c322, 0x00038563, 0x400100c1, 0x0410e323, 0xbe00019a, 0x0080c324, 0x00038564, - 0x400100c1, 0x0410e325, 0xbe00019a, 0x0080c326, 0x00038565, 0x400100c1, 0x0410e327, 0xbe00019a, 0x0080c328, - 0x00038566, 0x400100c1, 0x0410e329, 0xbe00019a, 0x0080c32a, 0x00038567, 0x400100c1, 0x0410e32b, 0xbe00019a, - 0x0080c32c, 0x00038569, 0x400100c1, 0x0410e32d, 0xbe00019a, 0x29c24004, 0xa6000021, 0x00270558, 0x29804002, - 0xa600015f, 0x81840000, 0x1290832e, 0xae0001a1, 0xc0fff000, 0xaf0581a3, 0x0480c825, 0x3144e008, 0xbe0001ab, - 0xaf0601a7, 0x0480c825, 0x31442008, 0xbe0001ab, 0x0e00c2ee, 0x0f80c2ee, 0x0000c32f, 0x0100c330, 0x009282f5, - 0x00adb801, 0x008372f6, 0x019282f7, 0x01a1b803, 0x21877618, 0x00870801, 0x408100c0, 0x408100c2, 0x0100c331, - 0x201287ff, 0x400100c2, 0x0180c332, 0x00c19800, 0x408100c3, 0x2981003c, 0x8a0001e1, 0x099282f6, 0xa60001c4, - 0x298105ee, 0x920001e1, 0x298105ea, 0x920001e1, 0x0f80c333, 0x31446002, 0x2880c000, 0x1e91b800, 0x3e8080ff, - 0x29c44002, 0xa60001d7, 0x0280c334, 0x0500c335, 0x0e00c336, 0x31442001, 0x0100c337, 0x2080c000, 0x01830500, - 0x418100c2, 0x0180c338, 0x418182c2, 0x0280c339, 0x0500c33a, 0x0e00c33b, 0x3144e001, 0x0100c33c, 0x2080c000, - 0x01830500, 0x418100c2, 0x0180c33d, 0x418182c2, 0x0039b327, 0xbe0002b2, 0x16a702f6, 0x0b80c2ee, 0x0c00c33e, - 0x0c80c33f, 0xbe00020f, 0x16a702f6, 0x0b80c2ee, 0x0c00c33e, 0x0c80c33f, 0xbe00022a, 0x0b80c826, 0x0c80c824, - 0x005c82ee, 0x00b282ee, 0x013282ef, 0x09810801, 0x960001f6, 0x0180c2f0, 0x01071802, 0x0080c340, 0x0100e802, - 0x410100c1, 0x0080c341, 0x09b30506, 0x920001fd, 0x0baf02f3, 0x4b8100c1, 0x0c80c342, 0x0b80c343, 0x0100c344, - 0x2080c001, 0x20830600, 0x01830500, 0x418100c2, 0x0180c345, 0x418182c2, 0x29c48001, 0xa600020b, 0x2600c020, - 0xc0fff000, 0x29c48004, 0xa600020f, 0x0e00c2ee, 0xc0fff000, 0x2180c020, 0x0100c330, 0x00870501, 0x408100c2, - 0x0000c332, 0x09870503, 0x8a000218, 0x498100c0, 0xbe00021a, 0x00871503, 0x408100c0, 0x0e00c346, 0x3144e002, - 0x0100c33c, 0x2080c000, 0x01830501, 0x418100c2, 0x0180c33d, 0x418182c2, 0x29c44001, 0xa6000226, 0x2600c020, - 0xc0fff000, 0x29c48004, 0xa600022a, 0x0e00c2ee, 0xc0fff000, 0x2180c020, 0x0100c330, 0x00870501, 0x408100c2, - 0x0000c332, 0x09870503, 0x8a000233, 0x498100c0, 0xbe000235, 0x00871503, 0x408100c0, 0x0e00c347, 0x31442002, - 0x0100c337, 0x2080c000, 0x01830501, 0x418100c2, 0x0180c338, 0x418182c2, 0x7e818105, 0x0021b80a, 0x00008348, - 0x098b0800, 0x82000021, 0x0c80c349, 0x09a60813, 0xc0fff000, 0x7e810105, 0x0c80c342, 0xc0fff000, 0x29c44004, - 0xa6000268, 0x0000c331, 0x2100c020, 0x00851502, 0x408100c0, 0x09850502, 0x8a00025e, 0x3144e004, 0x01270502, - 0x29c44001, 0xa6000259, 0x0280c339, 0x010b0802, 0x0521a802, 0x3144e001, 0xc0fff000, 0x0280c334, 0x010b0802, - 0x0521a802, 0x31442001, 0xc0fff000, 0x29c44001, 0xa6000264, 0x0280c339, 0x0500c33a, 0x3144e001, 0xc0fff000, - 0x0280c334, 0x0500c335, 0x31442001, 0xc0fff000, 0x31442004, 0x0c00c2ee, 0x0c80c2ee, 0x0b80c2ee, 0xc0fff000, - 0x0c00c2ee, 0x0c80c2ee, 0x0b80c2ee, 0x0100c34a, 0x005a82df, 0x0091b800, 0x1cf2e34b, 0x690400d1, 0x1cf2234b, - 0x0080c34c, 0x0003855b, 0x400100c1, 0x09818504, 0x8600027d, 0x2492e000, 0xbe0002b2, 0x0492e2e4, 0xbe0002b2, - 0x09818504, 0x86000285, 0x0080c34d, 0x0003855c, 0x400100c1, 0xbe00028c, 0x0080c34e, 0x0003855d, 0x400100c1, - 0x099f8504, 0x9200028c, 0x0492e325, 0xbe0002b2, 0x0000c34f, 0x00838504, 0x408100c0, 0x09958504, 0x8a000293, - 0x00a70504, 0xbe000294, 0x20a7000a, 0x0180c350, 0x00486351, 0x008302f3, 0x20832002, 0x008302f3, 0x00028800, - 0x20017200, 0x09f24319, 0xa600029e, 0x2001700a, 0x400100c3, 0x0f80c352, 0x0e00c2ee, 0x06158505, 0xc0fff000, - 0x0080c353, 0x0003855e, 0x400100c1, 0x0492e2e0, 0xbe0002b2, 0x0080c354, 0x0003855f, 0x400100c1, 0x0492e323, - 0xbe0002b2, 0x0080c355, 0x00038560, 0x400100c1, 0x0492e32b, 0xbe0002b2, 0x29c48008, 0xa60002bc, 0x81868000, - 0x1280c809, 0xae0002b6, 0x00270558, 0x09808356, 0xa60002c3, 0x31c6e001, 0xbe0002c3, 0x81870000, 0x1280c809, - 0xae0002be, 0x00270558, 0x09808357, 0xa60002c3, 0x31c6e004, 0x0000c34f, 0x0f80c2ea, 0x0e00c2eb, 0x498180c0, - 0x0000c2e3, 0x00b9b839, 0x40810000, 0x09f242e4, 0xa60002ce, 0x1cf2e2e5, 0xbe0002cf, 0x1cf222e5, 0x00270558, - 0x09808358, 0xa6000021, 0x31c6e010, 0xc0fff000, 0x0000c2e3, 0x00b9b839, 0x40810000, 0x09f242e6, 0xa60002db, - 0x1cf2e2e7, 0xbe0002dc, 0x1cf222e7, 0x2700c3e8, 0xc0fff000, 0xc0000fff, 0x00000f00, 0x80000000, 0x15601540, - 0x0000a000, 0x000015b4, 0x10000000, 0x00001000, 0x20000000, 0x00004000, 0x8022ffb7, 0x8145ff57, 0x89a3ffc9, - 0x89a7ffca, 0xdac71c1c, 0x92d4ff42, 0x0000ffff, 0xffff0000, 0x00010000, 0x000014c0, 0x000014c4, 0xffffffff, - 0x9067ff41, 0x03c00000, 0x00008000, 0x003f0000, 0x000014b8, 0x00001ffc, 0x0854877e, 0x0107b4b7, 0x9908ffb4, - 0x000014bc, 0x00001520, 0x00001ff4, 0x085507fd, 0x0126b5b7, 0x9927ffb5, 0x00001540, 0x000014a0, 0x00001fdc, - 0x0253047a, 0x9080ff41, 0x000014c8, 0x000014cc, 0x000014d0, 0x9094ff41, 0x000015e0, 0x90b8ff41, 0x000014a8, - 0x90c8ff41, 0x000014d4, 0x000014d8, 0x000014dc, 0x00002000, 0x90e9ff41, 0x000014b0, 0x000014b4, 0x00e00000, - 0x000f0000, 0x40000000, 0x00040000, 0x00001560, 0x000014e0, 0x00001584, 0x000015a0, 0x00100000, 0x00200000, - 0x00001588, 0x0000158c, 0x90000000, 0x00001590, 0xa0000000, 0x00001594, 0xb0000000, 0x00001598, 0xc0000000, - 0x0000159c, 0xd0000000, 0x000015a4, 0xe0000000, 0x03ff0000, 0x00001400, 0x00001404, 0x00001408, 0x0000140c, - 0x9a6dff5b, 0x00001460, 0x14800000, 0x91e3ff8e, 0x00001fec, 0x08518c7c, 0x00001480, 0x14a00000, 0x91e8ff8f, - 0x00001fe4, 0x08520c7b, 0x023db3bb, 0x91edff59, 0x00001418, 0x0000141c, 0x023eabbb, 0x2a48abb3, 0x00001fd4, - 0x0250647f, 0xd222408f, 0xd207408e, 0x00001fff, 0x8245ff14, 0x00001420, 0x00000800, 0x0000156c, 0x00001570, - 0x00001574, 0x00001410, 0x00001414, 0x55555555, 0x91abff40, 0x00001578, 0x0000157c, 0x00001580, 0x00400000, - 0x00800000, 0x01000000, -}; - -static unsigned int xpec_eth1_mac_patch[] = { - 0x00174054, 0x0000ffff, 0x00174058, 0x0000ffff, 0x0017405c, 0x0000ffff, 0x00174060, 0x0000ffff, 0x00174064, - 0x0000ffff, 0x00174068, 0x0000ffff, 0x0017406c, 0x0000ffff, 0x00174070, 0x0000ffff, 0x00174074, 0x0000ffff, - 0x00174078, 0x0000ffff, 0x0017407c, 0x0000ffff, 0x00174080, 0x0000ffff, 0x00177400, 0x00000000, 0x00177404, - 0x00000000, 0x00177408, 0x00000000, 0x0017740c, 0x00000000, 0x00177410, 0x00000000, 0x00177414, 0x00000000, - 0x00177418, 0x00000000, 0x0017741c, 0x00000000, 0x00177420, 0x00000276, 0x00177424, 0x0000027f, 0x00177428, - 0x000002a3, 0x0017742c, 0x000002a8, 0x00177430, 0x000002ad, 0x00177434, 0x000002de, 0x00177438, 0x000002de, - 0x0017743c, 0x000002de, 0x00177440, 0x000002de, 0x00177444, 0x000002de, 0x00177448, 0x000002de, 0x0017744c, - 0x000002de, 0x00177450, 0x000002de, 0x00177454, 0x000002de, 0x00177458, 0x000002de, 0x0017745c, 0x000002de, - 0x00177460, 0x00000000, 0x00177464, 0x00000000, 0x00177468, 0x00000000, 0x0017746c, 0x00000000, 0x00177470, - 0x00000000, 0x00177474, 0x00000000, 0x00177478, 0x00000000, 0x0017747c, 0x00000000, 0x00177480, 0x00000000, - 0x00177484, 0x00000000, 0x00177488, 0x00000000, 0x0017748c, 0x00000000, 0x00177490, 0x00000000, 0x00177494, - 0x00000000, 0x00177498, 0x00000000, 0x0017749c, 0x00000000, 0x001774a0, 0x00000000, 0x001774a4, 0x00000000, - 0x001774a8, 0x00000000, 0x001774ac, 0x00000000, 0x001774b0, 0x00000000, 0x001774b4, 0x00000000, 0x001774b8, - 0x00000000, 0x001774bc, 0x00000000, 0x001774c0, 0x00000000, 0x001774c4, 0x00000000, 0x001774c8, 0x00000000, - 0x001774cc, 0x00000000, 0x001774d0, 0x00000000, 0x001774d4, 0x00000000, 0x001774d8, 0x00000000, 0x001774dc, - 0x00000000, 0x001774e0, 0x00000155, 0x001774e4, 0x00000177, 0x001774e8, 0x0000017c, 0x001774ec, 0x00000181, - 0x001774f0, 0x00000186, 0x001774f4, 0x0000018b, 0x001774f8, 0x00000190, 0x001774fc, 0x00000195, 0x00177500, - 0x000002de, 0x00177504, 0x000002de, 0x00177508, 0x000002de, 0x0017750c, 0x000002de, 0x00177510, 0x000002de, - 0x00177514, 0x000002de, 0x00177518, 0x000002de, 0x0017751c, 0x000002de, 0x00177520, 0x00000000, 0x00177524, - 0x00000000, 0x00177528, 0x00000000, 0x0017752c, 0x00000000, 0x00177530, 0x00000000, 0x00177534, 0x00000000, - 0x00177538, 0x00000000, 0x0017753c, 0x00000000, 0x00177540, 0x00000000, 0x00177544, 0x00000000, 0x00177548, - 0x00000000, 0x0017754c, 0x00000000, 0x00177550, 0x00000000, 0x00177554, 0x00000000, 0x00177558, 0x00000000, - 0x0017755c, 0x00000000, 0x00177560, 0x00080000, 0x00177564, 0x03020100, 0x00177568, 0x00000504, 0x0017756c, - 0x00000000, 0x00177570, 0x00000000, 0x00177574, 0x00000000, 0x00177578, 0x00000000, 0x0017757c, 0x00000000, - 0x00177580, 0x00000000, 0x00177584, 0x00000000, 0x00177588, 0x00000000, 0x0017758c, 0x00000000, 0x00177590, - 0x00000000, 0x00177594, 0x00000000, 0x00177598, 0x00000000, 0x0017759c, 0x00000000, 0x001775a0, 0x00000000, - 0x001775a4, 0x00000000, 0x001775a8, 0x00000000, 0x001775ac, 0x00000000, 0x001775b0, 0x00000000, 0x001775e0, - 0x00000000, 0x001775e4, 0x00000000, 0x001775e8, 0x00000000, 0x001775ec, 0x00000000, 0x001775f0, 0x00000000, - 0x001775f4, 0x00000000, 0x001775f8, 0x00000000, 0x001775fc, 0x00000000, 0x00177fd0, 0x0250607f, 0x00177fd8, - 0x0253007a, 0x00177fe0, 0x0852087b, 0x00177fe8, 0x0851887c, 0x00177ff0, 0x085503fd, 0x00177ff8, 0x0854837e, -}; diff --git a/arch/arm/mach-netx/generic.c b/arch/arm/mach-netx/generic.c deleted file mode 100644 index 450226d..0000000 --- a/arch/arm/mach-netx/generic.c +++ /dev/null @@ -1,160 +0,0 @@ -/* - * See file CREDITS for list of people who contributed to this - * project. - * - * 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. - * - */ - -#include -#include -#include -#include -#include -#include -#include -#include "eth_firmware.h" - -struct fw_header { - unsigned int magic; - unsigned int type; - unsigned int version; - unsigned int table_size; - unsigned int reserved[4]; -} __attribute__((packed)); - -static int xc_check_ptr(int xcno, unsigned long adr, unsigned int size) -{ - if (adr >= NETX_PA_XMAC(xcno) && - adr + size < NETX_PA_XMAC(xcno) + XMAC_MEM_SIZE) - return 0; - - if (adr >= NETX_PA_XPEC(xcno) && - adr + size < NETX_PA_XPEC(xcno) + XPEC_MEM_SIZE) - return 0; - - printf("%s: illegal pointer 0x%08lx\n", __func__ ,adr); - return -1; -} - -static int xc_patch(int xcno, const u32 *patch, int count) -{ - unsigned int adr, val; - - int i; - for (i = 0; i < count; i++) { - adr = *patch++; - val = *patch++; - if (xc_check_ptr(xcno, adr, 1) < 0) - return -1; - writel(val, adr); - } - return 0; -} - -static void memset32(void *s, int c, int n) -{ - int i; - u32 *t = s; - - for (i = 0; i < (n >> 2); i++) - *t++ = 0; -} - -static void memcpy32(void *trg, const void *src, int size) -{ - int i; - u32 *t = trg; - const u32 *s = src; - for (i = 0; i < (size >> 2); i++) - *t++ = *s++; -} - -int loadxc(int xcno) -{ - /* stop xmac / xpec */ - XMAC_REG(xcno, XMAC_RPU_HOLD_PC) = RPU_HOLD_PC; - XMAC_REG(xcno, XMAC_TPU_HOLD_PC) = TPU_HOLD_PC; - XPEC_REG(xcno, XPEC_XPU_HOLD_PC) = XPU_HOLD_PC; - - XPEC_REG(xcno, XPEC_PC) = 0; - - /* load firmware */ - memset32((void*)NETX_PA_XPEC(xcno) + XPEC_RAM_START, 0, 0x2000); - memset32((void*)NETX_PA_XMAC(xcno), 0, 0x800); - - /* can't use barebox memcpy here, we need 32bit accesses */ - if (xcno == 0) { - memcpy32((void*)(NETX_PA_XMAC(xcno) + XMAC_RPU_PROGRAM_START), rpu_eth0, sizeof(rpu_eth0)); - memcpy32((void*)(NETX_PA_XMAC(xcno) + XMAC_TPU_PROGRAM_START), tpu_eth0, sizeof(tpu_eth0)); - memcpy32((void*)NETX_PA_XPEC(xcno) + XPEC_RAM_START, xpec_eth0_mac, sizeof(xpec_eth0_mac)); - xc_patch(xcno, rpu_eth0_patch, ARRAY_SIZE(rpu_eth0_patch) >> 1); - xc_patch(xcno, tpu_eth0_patch, ARRAY_SIZE(tpu_eth0_patch) >> 1); - xc_patch(xcno, xpec_eth0_mac_patch, ARRAY_SIZE(xpec_eth0_mac_patch) >> 1); - } else { - memcpy32((void*)(NETX_PA_XMAC(xcno) + XMAC_RPU_PROGRAM_START), rpu_eth1, sizeof(rpu_eth1)); - memcpy32((void*)(NETX_PA_XMAC(xcno) + XMAC_TPU_PROGRAM_START), tpu_eth1, sizeof(tpu_eth1)); - memcpy32((void*)NETX_PA_XPEC(xcno) + XPEC_RAM_START, xpec_eth1_mac, sizeof(xpec_eth1_mac)); - xc_patch(xcno, rpu_eth1_patch, ARRAY_SIZE(rpu_eth1_patch) >> 1); - xc_patch(xcno, tpu_eth1_patch, ARRAY_SIZE(tpu_eth1_patch) >> 1); - xc_patch(xcno, xpec_eth1_mac_patch, ARRAY_SIZE(xpec_eth1_mac_patch) >> 1); - } - - /* start xmac / xpec */ - XPEC_REG(xcno, XPEC_XPU_HOLD_PC) = 0; - XMAC_REG(xcno, XMAC_TPU_HOLD_PC) = 0; - XMAC_REG(xcno, XMAC_RPU_HOLD_PC) = 0; - - return 0; -} - -static int do_loadxc(int argc, char *argv[]) -{ - int xcno; - - if (argc < 2) - goto failure; - - xcno = simple_strtoul(argv[1], NULL, 16); - - printf("loading xc%d\n",xcno); - - /* There is a bug in the netx internal firmware. For now we have to call this twice */ - loadxc(xcno); - loadxc(xcno); - - return 0; - -failure: - return COMMAND_ERROR_USAGE; -} - -BAREBOX_CMD_START(loadxc) - .cmd = do_loadxc, - BAREBOX_CMD_DESC("load XMAC/XPEC engine with ethernet firmware") - BAREBOX_CMD_GROUP(CMD_GRP_NET) -BAREBOX_CMD_END - -static void __noreturn netx_restart_soc(struct restart_handler *rst) -{ - SYSTEM_REG(SYSTEM_RES_CR) = 0x01000008; - - /* Not reached */ - hang(); -} - -static int restart_register_feature(void) -{ - restart_handler_register_fn(netx_restart_soc); - - return 0; -} -coredevice_initcall(restart_register_feature); diff --git a/arch/arm/mach-netx/include/mach/netx-cm.h b/arch/arm/mach-netx/include/mach/netx-cm.h deleted file mode 100644 index 37cf76d..0000000 --- a/arch/arm/mach-netx/include/mach/netx-cm.h +++ /dev/null @@ -1,32 +0,0 @@ - -#ifndef __AT_CM_USERAREAS_H__ -#define __AT_CM_USERAREAS_H__ - -int netx_cm_init(void); - -struct netx_cm_userarea_1 { - unsigned short signature; /* configuration block signature */ - unsigned short version; /* version information */ - unsigned short crc16; /* crc16 checksum over all 3 areas, including the reserved blocks */ - unsigned char mac[4][6]; /* mac addresses */ - unsigned char reserved[2]; /* reserved, must be 0 */ -}; - -struct netx_cm_userarea_2 { - unsigned long sdram_size; /* sdram size in bytes */ - unsigned long sdram_control; /* sdram control register value (sdram_general_ctrl) */ - unsigned long sdram_timing; /* sdram timing register value (sdram_timing_ctrl) */ - unsigned char reserved0[20]; /* reserved, must be 0 */ -}; - -struct netx_cm_userarea_3 { - unsigned char reserved[32]; /* reserved, must be 0 */ -}; - -struct netx_cm_userarea { - struct netx_cm_userarea_1 area_1; - struct netx_cm_userarea_2 area_2; - struct netx_cm_userarea_3 area_3; -}; - -#endif /* __AT_CM_USERAREAS_H__ */ diff --git a/arch/arm/mach-netx/include/mach/netx-eth.h b/arch/arm/mach-netx/include/mach/netx-eth.h deleted file mode 100644 index 654cfe7..0000000 --- a/arch/arm/mach-netx/include/mach/netx-eth.h +++ /dev/null @@ -1,9 +0,0 @@ -#ifndef _ASM_ARCH_NETX_ETH_H -#define _ASM_ARCH_NETX_ETH_H - -struct netx_eth_platform_data { - int xcno; -}; - -#endif /* _ASM_ARCH_NETX_ETH_H */ - diff --git a/arch/arm/mach-netx/include/mach/netx-regs.h b/arch/arm/mach-netx/include/mach/netx-regs.h deleted file mode 100644 index c984eec..0000000 --- a/arch/arm/mach-netx/include/mach/netx-regs.h +++ /dev/null @@ -1,324 +0,0 @@ -/* - * include/asm-arm/arch-netx/netx-regs.h - * - * Copyright (c) 2005 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 version 2 - * as published by the Free Software Foundation. - * - * 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. - * - */ - -#ifndef __ASM_ARCH_NETX_REGS_H -#define __ASM_ARCH_NETX_REGS_H - -#define NETX_SDRAM_BASE 0x80000000 -#define NETX_CS0_BASE 0xc0000000 -#define NETX_CS1_BASE 0xc8000000 -#define NETX_CS2_BASE 0xd0000000 - -#define NETX_IO_PHYS 0x00100000 -#define io_p2v(x) (x) -#define __REG(base,ofs) (*((volatile unsigned long *)(io_p2v(base) + ofs))) - -#define XPEC_MEM_SIZE 0x4000 -#define XMAC_MEM_SIZE 0x1000 -#define SRAM_MEM_SIZE 0x8000 - -/* offsets relative to the beginning of the io space */ -#define NETX_OFS_SYSTEM 0x00000 -#define NETX_OFS_MEMCR 0x00100 -#define NETX_OFS_DPRAM 0x03000 -#define NETX_OFS_GPIO 0x00800 -#define NETX_OFS_PIO 0x00900 -#define NETX_OFS_UART0 0x00a00 -#define NETX_OFS_UART1 0x00a40 -#define NETX_OFS_UART2 0x00a80 -#define NETX_OF_MIIMU 0x00b00 -#define NETX_OFS_SPI 0x00c00 -#define NETX_OFS_I2C 0x00d00 -#define NETX_OFS_SYSTIME 0x01100 -#define NETX_OFS_RTC 0x01200 -#define NETX_OFS_LCD 0x04000 -#define NETX_OFS_USB 0x20000 -#define NETX_OFS_XMAC0 0x60000 -#define NETX_OFS_XMAC1 0x61000 -#define NETX_OFS_XMAC2 0x62000 -#define NETX_OFS_XMAC3 0x63000 -#define NETX_OFS_XMAC(no) (0x60000 + (no) * 0x1000) -#define NETX_OFS_PFIFO 0x64000 -#define NETX_OFS_XPEC0 0x70000 -#define NETX_OFS_XPEC1 0x74000 -#define NETX_OFS_XPEC2 0x78000 -#define NETX_OFS_XPEC3 0x7c000 -#define NETX_OFS_XPEC(no) (0x70000 + (no) * 0x4000) -#define NETX_OFS_VIC 0xff000 - -#define NETX_PA_SYSTEM (NETX_IO_PHYS + NETX_OFS_SYSTEM) -#define NETX_PA_MEMCR (NETX_IO_PHYS + NETX_OFS_MEMCR) -#define NETX_PA_DPMAS (NETX_IO_PHYS + NETX_OFS_DPRAM) -#define NETX_PA_GPIO (NETX_IO_PHYS + NETX_OFS_GPIO) -#define NETX_PA_PIO (NETX_IO_PHYS + NETX_OFS_PIO) -#define NETX_PA_UART0 (NETX_IO_PHYS + NETX_OFS_UART0) -#define NETX_PA_UART1 (NETX_IO_PHYS + NETX_OFS_UART1) -#define NETX_PA_UART2 (NETX_IO_PHYS + NETX_OFS_UART2) -#define NETX_PA_MIIMU (NETX_IO_PHYS + NETX_OF_MIIMU) -#define NETX_PA_SPI (NETX_IO_PHYS + NETX_OFS_SPI) -#define NETX_PA_I2C (NETX_IO_PHYS + NETX_OFS_I2C) -#define NETX_PA_SYSTIME (NETX_IO_PHYS + NETX_OFS_SYSTIME) -#define NETX_PA_RTC (NETX_IO_PHYS + NETX_OFS_RTC) -#define NETX_PA_LCD (NETX_IO_PHYS + NETX_OFS_LCD) -#define NETX_PA_USB (NETX_IO_PHYS + NETX_OFS_USB) -#define NETX_PA_XMAC0 (NETX_IO_PHYS + NETX_OFS_XMAC0) -#define NETX_PA_XMAC1 (NETX_IO_PHYS + NETX_OFS_XMAC1) -#define NETX_PA_XMAC2 (NETX_IO_PHYS + NETX_OFS_XMAC2) -#define NETX_PA_XMAC3 (NETX_IO_PHYS + NETX_OFS_XMAC3) -#define NETX_PA_XMAC(no) (NETX_IO_PHYS + NETX_OFS_XMAC(no)) -#define NETX_PA_PFIFO (NETX_IO_PHYS + NETX_OFS_PFIFO) -#define NETX_PA_XPEC0 (NETX_IO_PHYS + NETX_OFS_XPEC0) -#define NETX_PA_XPEC1 (NETX_IO_PHYS + NETX_OFS_XPEC1) -#define NETX_PA_XPEC2 (NETX_IO_PHYS + NETX_OFS_XPEC2) -#define NETX_PA_XPEC3 (NETX_IO_PHYS + NETX_OFS_XPEC3) -#define NETX_PA_XPEC(no) (NETX_IO_PHYS + NETX_OFS_XPEC(no)) -#define NETX_PA_VIC (NETX_IO_PHYS + NETX_OFS_VIC) - -/********************************* - * System functions * - *********************************/ - -#define SYSTEM_REG(x) __REG(NETX_PA_SYSTEM, (x)) -#define SYSTEM_BOO_SR 0x00 -#define SYSTEM_IOC_CR 0x04 -#define SYSTEM_IOC_MR 0x08 -#define SYSTEM_RES_CR 0x0c -#define SYSTEM_PHY_CONTROL 0x10 -#define SYSTEM_REV 0x34 -#define SYSTEM_IOC_ACCESS_KEY 0x70 -#define SYSTEM_WDG_TR 0x200 -#define SYSTEM_WDG_CTR 0x204 -#define SYSTEM_WDG_IRQ_TIMEOUT 0x208 -#define SYSTEM_WDG_RES_TIMEOUT 0x20c - -#define PHY_CONTROL_RESET (1<<31) -#define PHY_CONTROL_SIM_BYP (1<<30) -#define PHY_CONTROL_CLK_XLATIN (1<<29) -#define PHY_CONTROL_PHY1_EN (1<<21) -#define PHY_CONTROL_PHY1_NP_MSG_CODE -#define PHY_CONTROL_PHY1_AUTOMDIX (1<<17) -#define PHY_CONTROL_PHY1_FIXMODE (1<<16) -#define PHY_CONTROL_PHY1_MODE(mode) (((mode) & 0x7) << 13) -#define PHY_CONTROL_PHY0_EN (1<<12) -#define PHY_CONTROL_PHY0_NP_MSG_CODE -#define PHY_CONTROL_PHY0_AUTOMDIX (1<<8) -#define PHY_CONTROL_PHY0_FIXMODE (1<<7) -#define PHY_CONTROL_PHY0_MODE(mode) (((mode) & 0x7) << 4) -#define PHY_CONTROL_PHY_ADDRESS(adr) ((adr) & 0xf) - -#define PHY_MODE_10BASE_T_HALF 0 -#define PHY_MODE_10BASE_T_FULL 1 -#define PHY_MODE_100BASE_TX_FX_FULL 2 -#define PHY_MODE_100BASE_TX_FX_HALF 3 -#define PHY_MODE_100BASE_TX_HALF 4 -#define PHY_MODE_REPEATER 5 -#define PHY_MODE_POWER_DOWN 6 -#define PHY_MODE_ALL 7 - -/********************************* - * Vector interrupt controller * - *********************************/ - -/* Registers */ -#define VIC_REG(x) __REG(NETX_PA_VIC, (x)) -#define VIC_IRQ_STATUS 0x00 -#define VIC_FIQ_STATUS 0x04 -#define VIC_IRQ_RAW_STATUS 0x08 -#define VIC_INT_SELECT 0x0C /* 1 = FIQ, 0 = IRQ */ -#define VIC_IRQ_ENABLE 0x10 /* 1 = enable, 0 = disable */ -#define VIC_IRQ_ENABLE_CLEAR 0x14 -#define VIC_IRQ_SOFT 0x18 -#define VIC_IRQ_SOFT_CLEAR 0x1C -#define VIC_PROTECT 0x20 -#define VIC_VECT_ADDR 0x30 -#define VIC_DEF_VECT_ADDR 0x34 -#define VIC_VECT_ADDR0 0x100 /* 0 to 15 */ -#define VIC_VECT_CNTL0 0x200 /* 0 to 15 */ -#define VIC_ITCR 0x300 /* VIC test control register */ - -/* Bits */ -#define VECT_CNTL_ENABLE (1 << 5) - -/******************************* - * GPIO and timer module * - *******************************/ - -/* Registers */ -#define GPIO_REG(x) __REG(NETX_PA_GPIO, (x)) -#define GPIO_CFG(gpio) (0x0 + ((gpio)<<2)) -#define GPIO_THRESHOLD_CAPTURE(gpio) (0x40 + ((gpio)<<2)) -#define GPIO_COUNTER_CTRL(counter) (0x80 + ((counter)<<2)) -#define GPIO_COUNTER_MAX(counter) (0x94 + ((counter)<<2)) -#define GPIO_COUNTER_CURRENT(counter) (0xa8 + ((counter)<<2)) -#define GPIO_IRQ_ENABLE (0xbc) -#define GPIO_IRQ_DISABLE (0xc0) -#define GPIO_SYSTIME_NS_CMP (0xc4) -#define GPIO_LINE (0xc8) -#define GPIO_IRQ (0xd0) - -/* Bits */ -#define CFG_IOCFG_GP_INPUT (0x0) -#define CFG_IOCFG_GP_OUTPUT (0x1) -#define CFG_IOCFG_GP_UART (0x2) -#define CFG_INV (1<<2) -#define CFG_MODE_INPUT_READ (0<<3) -#define CFG_MODE_INPUT_CAPTURE_CONT_RISING (1<<3) -#define CFG_MODE_INPUT_CAPTURE_ONCE_RISING (2<<3) -#define CFG_MODE_INPUT_CAPTURE_HIGH_LEVEL (3<<3) -#define CFG_COUNT_REF_COUNTER0 (0<<5) -#define CFG_COUNT_REF_COUNTER1 (1<<5) -#define CFG_COUNT_REF_COUNTER2 (2<<5) -#define CFG_COUNT_REF_COUNTER3 (3<<5) -#define CFG_COUNT_REF_COUNTER4 (4<<5) -#define CFG_COUNT_REF_SYSTIME (7<<5) - -#define COUNTER_CTRL_RUN (1<<0) -#define COUNTER_CTRL_SYM (1<<1) -#define COUNTER_CTRL_ONCE (1<<2) -#define COUNTER_CTRL_IRQ_EN (1<<3) -#define COUNTER_CTRL_CNT_EVENT (1<<4) -#define COUNTER_CTRL_RST_EN (1<<5) -#define COUNTER_CTRL_SEL_EVENT (1<<6) -#define COUNTER_CTRL_GPIO_REF /* FIXME */ - -#define GPIO_BIT(gpio) (1<<(gpio)) -#define COUNTER_BIT(counter) ((1<<16)<<(counter)) - -/******************************* - * PIO * - *******************************/ - -/* Registers */ -#define NETX_PIO_REG(ofs) __REG(NETX_PA_PIO, ofs) -#define NETX_PIO_INPIO NETX_PIO_REG(0x0) -#define NETX_PIO_OUTPIO NETX_PIO_REG(0x4) -#define NETX_PIO_OEPIO NETX_PIO_REG(0x8) - -/******************************* - * MII Unit * - *******************************/ -#define MIIMU_REG __REG(NETX_PA_MIIMU, 0) -/* Bits */ -#define MIIMU_SNRDY (1<<0) -#define MIIMU_PREAMBLE (1<<1) -#define MIIMU_OPMODE_WRITE (1<<2) -#define MIIMU_MDC_PERIOD (1<<3) -#define MIIMU_PHY_NRES (1<<4) -#define MIIMU_RTA (1<<5) -#define MIIMU_REGADDR(adr) (((adr) & 0x1f) << 6) -#define MIIMU_PHYADDR(adr) (((adr) & 0x1f) << 11) -#define MIIMU_DATA(data) (((data) & 0xffff) << 16) - -/******************************* - * xmac / xpec * - *******************************/ -#define XPEC_REG(no, reg) __REG(NETX_PA_XPEC(no), (reg)) -#define XPEC_R0 0x00 -#define XPEC_R1 0x04 -#define XPEC_R2 0x08 -#define XPEC_R3 0x0c -#define XPEC_R4 0x10 -#define XPEC_R5 0x14 -#define XPEC_R6 0x18 -#define XPEC_R7 0x1c -#define XPEC_RANGE01 0x20 -#define XPEC_RANGE23 0x24 -#define XPEC_RANGE45 0x28 -#define XPEC_RANGE67 0x2c -#define XPEC_PC 0x48 -#define XPEC_TIMER(timer) (0x30 + ((timer)<<2)) -#define XPEC_IRQ 0x8c -#define XPEC_SYSTIME_NS 0x90 -#define XPEC_FIFO_DATA 0x94 -#define XPEC_SYSTIME_S 0x98 -#define XPEC_ADC 0x9c -#define XPEC_URX_COUNT 0x40 -#define XPEC_UTX_COUNT 0x44 -#define XPEC_PC 0x48 -#define XPEC_ZERO 0x4c -#define XPEC_STATCFG 0x50 -#define XPEC_EC_MASKA 0x54 -#define XPEC_EC_MASKB 0x58 -#define XPEC_EC_MASK0 0x5c -#define XPEC_EC_MASK8 0x7c -#define XPEC_EC_MASK9 0x80 -#define XPEC_XPU_HOLD_PC 0x100 -#define XPEC_RAM_START 0x2000 - -#define XPU_HOLD_PC (1<<0) - -#define XMAC_REG(no, reg) __REG(NETX_PA_XMAC(no), (reg)) -#define XMAC_RPU_PROGRAM_START 0x000 -#define XMAC_RPU_PROGRAM_END 0x3ff -#define XMAC_TPU_PROGRAM_START 0x400 -#define XMAC_TPU_PROGRAM_END 0x7ff -#define XMAC_RPU_HOLD_PC 0xa00 -#define XMAC_TPU_HOLD_PC 0xa04 - -#define RPU_HOLD_PC (1<<15) -#define TPU_HOLD_PC (1<<15) -/******************************* - * Pointer FIFO * - *******************************/ -#define PFIFO_REG(x) __REG(NETX_PA_PFIFO, (x)) -#define PFIFO_BASE(pfifo) (0x00 + ((pfifo)<<2) ) -#define PFIFO_BORDER_BASE(pfifo) (0x80 + ((pfifo)<<2) ) -#define PFIFO_RESET 0x100 -#define PFIFO_FULL 0x104 -#define PFIFO_EMPTY 0x108 -#define PFIFO_OVEFLOW 0x10c -#define PFIFO_UNDERRUN 0x110 -#define PFIFO_FILL_LEVEL(pfifo) (0x180 + ((pfifo)<<2)) - -/******************************* - * Dual Port Memory * - *******************************/ - -/* Registers */ -#define NETX_DPMAS_REG(ofs) __REG(NETX_PA_DPMAS, (ofs)) -#define NETX_DPMAS_IF_CONF0_REG NETX_DPMAS_REG(0x608) -#define NETX_DPMAS_IF_CONF1_REG NETX_DPMAS_REG(0x60c) -#define NETX_DPMAS_EXT_CONFIG0_REG NETX_DPMAS_REG(0x610) -#define NETX_DPMAS_EXT_CONFIG1_REG NETX_DPMAS_REG(0x614) -#define NETX_DPMAS_EXT_CONFIG2_REG NETX_DPMAS_REG(0x618) -#define NETX_DPMAS_EXT_CONFIG3_REG NETX_DPMAS_REG(0x61c) -#define NETX_DPMAS_IO_MODE0_REG NETX_DPMAS_REG(0x620) /* I/O 32..63 */ -#define NETX_DPMAS_DRV_EN0_REG NETX_DPMAS_REG(0x624) -#define NETX_DPMAS_DATA0_REG NETX_DPMAS_REG(0x628) -#define NETX_DPMAS_IO_MODE1_REG NETX_DPMAS_REG(0x630) /* I/O 64..84 */ -#define NETX_DPMAS_DRV_EN1_REG NETX_DPMAS_REG(0x634) -#define NETX_DPMAS_DATA1_REG NETX_DPMAS_REG(0x638) - -/* Bits */ -#define IF_CONF0_HIF_DISABLED (0<<28) -#define IF_CONF0_HIF_EXT_BUS (1<<28) -#define IF_CONF0_HIF_UP_8BIT (2<<28) -#define IF_CONF0_HIF_UP_16BIT (3<<28) -#define IF_CONF0_HIF_IO (4<<28) - -#define IO_MODE1_SAMPLE_NPOR (0<<30) -#define IO_MODE1_SAMPLE_100MHZ (1<<30) -#define IO_MODE1_SAMPLE_NPIO36 (2<<30) -#define IO_MODE1_SAMPLE_PIO36 (3<<30) - -/******************************* - * I2C * - *******************************/ -#define NETX_I2C_REG(ofs) __REG(NETX_PA_I2C, (ofs)) -#define NETX_I2C_CTRL_REG NETX_I2C_REG(0x0) -#define NETX_I2C_DATA_REG NETX_I2C_REG(0x4) - -#endif /* __ASM_ARCH_NETX_REGS_H */ diff --git a/arch/arm/mach-netx/include/mach/netx-xc.h b/arch/arm/mach-netx/include/mach/netx-xc.h deleted file mode 100644 index 060a9b3..0000000 --- a/arch/arm/mach-netx/include/mach/netx-xc.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef __ASM_ARCH_NETX_XC_H -#define __ASM_ARCH_NETX_XC_H - -int loadxc(int); - -#endif diff --git a/arch/arm/mach-netx/interrupts.c b/arch/arm/mach-netx/interrupts.c deleted file mode 100644 index af78e19..0000000 --- a/arch/arm/mach-netx/interrupts.c +++ /dev/null @@ -1,70 +0,0 @@ -#include - -#include - -int timer_init (void) -{ - /* disable timer initially */ - GPIO_REG(GPIO_COUNTER_CTRL(0)) = 0; - /* Reset the timer value to zero */ - GPIO_REG(GPIO_COUNTER_CURRENT(0)) = 0; - GPIO_REG(GPIO_COUNTER_MAX(0)) = 0xffffffff; - GPIO_REG(GPIO_COUNTER_CTRL(0)) = COUNTER_CTRL_RUN; - - return 0; -} - -/* current timestamp in ms */ -static unsigned long timestamp = 0; - -static unsigned long last_timer = 0; - -/* We can't detect overruns here since we don't know how often - * we get called. The only thing we can do is to make sure that - * time moves forward. - */ -ulong get_timer (ulong start) -{ - unsigned long cur_timer = GPIO_REG(GPIO_COUNTER_CURRENT(0)); - unsigned long time_inc; - - - if(cur_timer > last_timer) - time_inc = (cur_timer - last_timer) / 100000; - else - time_inc = ((0xffffffff - last_timer) + cur_timer) / 100000; - - if(time_inc) - last_timer = cur_timer; - - timestamp += time_inc; - - return timestamp - start; -} - -void mdelay(unsigned long msec) -{ - unsigned long now = get_timer(0); - - while( get_timer(0) < now + msec ); -} - -void udelay(unsigned long usec) -{ - unsigned long start, end, msec = usec / 1000; - - if(msec) - mdelay(msec); - - usec -= msec * 1000; - - start = GPIO_REG(GPIO_COUNTER_CURRENT(0)); - end = start + usec * 100; - - if(end < start) { - /* wait for overrun */ - while( GPIO_REG(GPIO_COUNTER_CURRENT(0)) > start); - } - - while( GPIO_REG(GPIO_COUNTER_CURRENT(0)) < end); -} diff --git a/arch/arm/mach-netx/lowlevel_init.S b/arch/arm/mach-netx/lowlevel_init.S deleted file mode 100644 index 7990545..0000000 --- a/arch/arm/mach-netx/lowlevel_init.S +++ /dev/null @@ -1,3 +0,0 @@ -.globl lowlevel_init -lowlevel_init: - mov pc, lr diff --git a/arch/arm/mach-netx/netx-cm.c b/arch/arm/mach-netx/netx-cm.c deleted file mode 100644 index ebf9901..0000000 --- a/arch/arm/mach-netx/netx-cm.c +++ /dev/null @@ -1,317 +0,0 @@ -#include -#include -#include - -#define I2C_CTRL_ENABLE (1<<0) -#define I2C_CTRL_SPEED_25 (0<<1) -#define I2C_CTRL_SPEED_50 (1<<1) -#define I2C_CTRL_SPEED_100 (2<<1) -#define I2C_CTRL_SPEED_200 (3<<1) -#define I2C_CTRL_SPEED_400 (4<<1) -#define I2C_CTRL_SPEED_600 (5<<1) -#define I2C_CTRL_SPEED_800 (6<<1) -#define I2C_CTRL_SPEED_1000 (7<<1) -#define I2C_CTRL_SLAVEID(id) (((id) & 0x7f) << 4) - -#define I2C_DATA_SEND_STOP (1<<8) -#define I2C_DATA_READ (1<<9) -#define I2C_DATA_SEND_START (1<<10) -#define I2C_DATA_BUSY (1<<11) -#define I2C_DATA_EXECUTE (1<<11) -#define I2C_DATA_RDF (1<<12) - -/* INS */ -#define AT88_WRITE_USER_ZONE 0xb0 -#define AT88_READ_USER_ZONE 0xb2 -#define AT88_SYSTEM_WRITE 0xb4 -#define AT88_SYSTEM_READ 0xb6 - -/* P1 */ -#define AT88_READ_CONFIG_ZONE 0x00 -#define AT88_SET_USER_ZONE 0x03 -#define SEND_START (1<<0) -#define SEND_STOP (1<<1) -#define IGNORE_RDF (1<<2) - -#define MAX_USER_ZONE_SIZE 128 - -/* - * netx i2c functions - */ -static inline void i2c_set_slaveid(uchar id) -{ - unsigned int val; - val = NETX_I2C_CTRL_REG; - val &= 0xf; - val |= I2C_CTRL_SLAVEID(id); - NETX_I2C_CTRL_REG = val; -} - -static inline uchar i2c_read_byte(int flags) -{ - unsigned int val = I2C_DATA_EXECUTE | I2C_DATA_READ; - - if(flags & SEND_START) - val |= I2C_DATA_SEND_START; - if(flags & SEND_STOP) - val |= I2C_DATA_SEND_STOP; - - NETX_I2C_DATA_REG = val; - - while(NETX_I2C_DATA_REG & I2C_DATA_BUSY); - - return NETX_I2C_DATA_REG & 0xff; -} - -static inline void i2c_write_byte(uchar byte, int flags) -{ - unsigned int val = byte; - - if(flags & SEND_START) - val |= I2C_DATA_SEND_START; - if(flags & SEND_STOP) - val |= I2C_DATA_SEND_STOP; - val |= I2C_DATA_EXECUTE; - - NETX_I2C_DATA_REG = val; - - while(NETX_I2C_DATA_REG & I2C_DATA_BUSY); -} - -void i2c_init (int speed) -{ - unsigned int val; - - switch(speed) { - case 25000: - val = I2C_CTRL_SPEED_25; - break; - case 50000: - val = I2C_CTRL_SPEED_50; - break; - case 100000: - val = I2C_CTRL_SPEED_100; - break; - case 200000: - val = I2C_CTRL_SPEED_200; - break; - case 400000: - val = I2C_CTRL_SPEED_400; - break; - case 600000: - val = I2C_CTRL_SPEED_600; - break; - case 800000: - val = I2C_CTRL_SPEED_800; - break; - case 1000000: - val = I2C_CTRL_SPEED_1000; - break; - default: - printf("unsupported speed %d. defaulting to 100kHz\n",speed); - val = I2C_CTRL_SPEED_100; - break; - } - - NETX_I2C_CTRL_REG = val | I2C_CTRL_ENABLE; - - i2c_write_byte(0xff, 0); - - udelay(2000); -} - -/* - * at88SCxxxx CryptoMemory functions - */ -struct at88_parm { - char *name; - int zones; - int zone_size; - uchar atr[8]; -}; - -struct at88_parm at88_parm_table[] = { - { .name = "at88sc0104c", .zones = 4, .zone_size = 32, .atr = { 0x3b, 0xb2, 0x11, 0x00, 0x10, 0x80, 0x00, 0x01 } }, - { .name = "at88sc0204c", .zones = 4, .zone_size = 64, .atr = { 0x3b, 0xb2, 0x11, 0x00, 0x10, 0x80, 0x00, 0x02 } }, - { .name = "at88sc0404c", .zones = 4, .zone_size = 128, .atr = { 0x3b, 0xb2, 0x11, 0x00, 0x10, 0x80, 0x00, 0x04 } }, - { .name = "at88sc0808c", .zones = 8, .zone_size = 128, .atr = { 0x3b, 0xb2, 0x11, 0x00, 0x10, 0x80, 0x00, 0x08 } }, - { .name = "at88sc1616c", .zones = 16, .zone_size = 128, .atr = { 0x3b, 0xb2, 0x11, 0x00, 0x10, 0x80, 0x00, 0x16 } }, -}; -#define parm_size (sizeof(at88_parm_table) / sizeof(struct at88_parm)) - -struct at88_parm *at88_parm = NULL; - -int set_user_zone(uchar zone) -{ - if(zone >= at88_parm->zones) - return -1; - - i2c_set_slaveid(AT88_SYSTEM_WRITE >> 1); - i2c_write_byte(AT88_SET_USER_ZONE, SEND_START); - i2c_write_byte(zone, 0); - i2c_write_byte(8, SEND_STOP); - - return 0; -} - -/* - * We chose the easy way here and read/write whole zones at once - */ -int read_user_zone(char *buf) -{ - int i; - - i2c_set_slaveid(AT88_READ_USER_ZONE >> 1); - i2c_write_byte(0, SEND_START); - i2c_write_byte(0, 0); - i2c_write_byte(at88_parm->zone_size, 0); - - for(i=0; i < at88_parm->zone_size; i++) - buf[i] = i2c_read_byte( i==at88_parm->zone_size - 1 ? SEND_STOP : 0); - - return 0; -} - -#define BLK_SIZE 16 -int write_user_zone(char *buf) -{ - int i,block; - - for(block=0; block < at88_parm->zone_size/16; block++) { - i2c_set_slaveid(AT88_WRITE_USER_ZONE >> 1); - i2c_write_byte(0, SEND_START); - i2c_write_byte(block * BLK_SIZE, 0); - i2c_write_byte(BLK_SIZE, 0); - - for(i=0; iarea_1 ) ) - return -1; - - set_user_zone(2); - if( write_user_zone( (char *)&area->area_2 ) ) - return -1; - - set_user_zone(3); - if( write_user_zone( (char *)&area->area_2 ) ) - return -1; - return 0; -} - - -unsigned short crc16(unsigned short crc, unsigned int data) -{ - crc = (crc >> 8) | ((crc & 0xff) << 8); - crc ^= data; - crc ^= (crc & 0xff) >> 4; - crc ^= (crc & 0x0f) << 12; - crc ^= ((crc & 0xff) << 4) << 1; - - return crc; -} - - -#define ETH_MAC_4321 0x1564 -#define ETH_MAC_65 0x1568 - -int netx_cm_init(void) -{ - int i; - char buf[MAX_USER_ZONE_SIZE]; - struct netx_cm_userarea *area; - - i2c_init(100000); - - i2c_set_slaveid(AT88_SYSTEM_READ >> 1); - i2c_write_byte(AT88_READ_CONFIG_ZONE, SEND_START); - i2c_write_byte(0, 0); /* adr */ - i2c_write_byte(8, 0); /* len */ - - for(i=0;i<8;i++) - buf[i] = i2c_read_byte( i==7 ? SEND_STOP : 0 ); - - for(i=0; iname); - - area = netx_cm_get_userarea(); - - for(i=0;i<4;i++) { - printf("xc%d mac: %02x:%02x:%02x:%02x:%02x:%02x\n", i, - area->area_1.mac[i][0], - area->area_1.mac[i][1], - area->area_1.mac[i][2], - area->area_1.mac[i][3], - area->area_1.mac[i][4], - area->area_1.mac[i][5]); - - XPEC_REG(i, XPEC_RAM_START + ETH_MAC_4321) = - area->area_1.mac[i][0] | - area->area_1.mac[i][1]<<8 | - area->area_1.mac[i][2]<<16 | - area->area_1.mac[i][3]<<24; - - XPEC_REG(i, XPEC_RAM_START + ETH_MAC_65) = - area->area_1.mac[i][4] | - area->area_1.mac[i][5]<<8; - } - - for(i=0; i<6; i++) - gd->bd->bi_enetaddr[i] = area->area_1.mac[CONFIG_DRIVER_NET_NETX_XCNO][i]; - - - sprintf(buf, "%02x:%02x:%02x:%02x:%02x:%02x", - area->area_1.mac[CONFIG_DRIVER_NET_NETX_XCNO][0], - area->area_1.mac[CONFIG_DRIVER_NET_NETX_XCNO][1], - area->area_1.mac[CONFIG_DRIVER_NET_NETX_XCNO][2], - area->area_1.mac[CONFIG_DRIVER_NET_NETX_XCNO][3], - area->area_1.mac[CONFIG_DRIVER_NET_NETX_XCNO][4], - area->area_1.mac[CONFIG_DRIVER_NET_NETX_XCNO][5]); - - setenv("ethaddr", buf); - - return 0; -} diff --git a/arch/arm/mach-stm32mp/Makefile b/arch/arm/mach-stm32mp/Makefile index 16a2186..204cad6 100644 --- a/arch/arm/mach-stm32mp/Makefile +++ b/arch/arm/mach-stm32mp/Makefile @@ -1 +1 @@ -obj- := __dummy__.o +obj-$(CONFIG_BOOTM) := stm32image.o diff --git a/arch/arm/mach-stm32mp/stm32image.c b/arch/arm/mach-stm32mp/stm32image.c new file mode 100644 index 0000000..84975c5 --- /dev/null +++ b/arch/arm/mach-stm32mp/stm32image.c @@ -0,0 +1,50 @@ +#define pr_fmt(fmt) "stm32image: " fmt + +#include +#include +#include +#include +#include + +#define BAREBOX_STAGE2_OFFSET 256 + +static int do_bootm_stm32image(struct image_data *data) +{ + void (*barebox)(void); + resource_size_t start, end; + int ret; + + ret = memory_bank_first_find_space(&start, &end); + if (ret) + return ret; + + ret = bootm_load_os(data, start); + if (ret) + return ret; + + barebox = (void*)start + BAREBOX_STAGE2_OFFSET; + + if (data->verbose) + printf("Loaded barebox image to 0x%08lx\n", + (unsigned long)barebox); + + shutdown_barebox(); + + barebox(); + + return -EIO; +} + +static struct image_handler image_handler_stm32_image_v1_handler = { + .name = "STM32 image (v1)", + .bootm = do_bootm_stm32image, + .filetype = filetype_stm32_image_v1, +}; + +static int stm32mp_register_stm32image_image_handler(void) +{ + register_image_handler(&image_handler_stm32_image_v1_handler); + + return 0; +} +late_initcall(stm32mp_register_stm32image_image_handler); diff --git a/arch/arm/pbl/.gitignore b/arch/arm/pbl/.gitignore deleted file mode 100644 index be604a8..0000000 --- a/arch/arm/pbl/.gitignore +++ /dev/null @@ -1,9 +0,0 @@ -piggy.gzip -piggy.lzo -piggy.lz4 -piggy.xzkern -piggy.shipped -zbarebox -zbarebox.bin -zbarebox.lds -zbarebox.map diff --git a/arch/arm/pbl/Makefile b/arch/arm/pbl/Makefile deleted file mode 100644 index 5d7e85b..0000000 --- a/arch/arm/pbl/Makefile +++ /dev/null @@ -1,61 +0,0 @@ - -suffix_$(CONFIG_IMAGE_COMPRESSION_GZIP) = gzip -suffix_$(CONFIG_IMAGE_COMPRESSION_LZO) = lzo -suffix_$(CONFIG_IMAGE_COMPRESSION_LZ4) = lz4 -suffix_$(CONFIG_IMAGE_COMPRESSION_XZKERN) = xzkern -suffix_$(CONFIG_IMAGE_COMPRESSION_NONE) = comp_copy - -OBJCOPYFLAGS_zbarebox.bin = -O binary -piggy_o := piggy.$(suffix_y).o - -targets := zbarebox.lds zbarebox zbarebox.bin zbarebox.S \ - $(piggy_o) piggy.$(suffix_y) - -# Make sure files are removed during clean -extra-y += piggy.gzip piggy.lz4 piggy.lzo piggy.lzma piggy.xzkern piggy.shipped zbarebox.map - -ifeq ($(CONFIG_CPU_BIG_ENDIAN),y) -FIX_SIZE=-b -else -FIX_SIZE= -endif - -$(obj)/zbarebox.bin: $(obj)/zbarebox FORCE - $(call if_changed,objcopy) - $(call cmd,check_file_size,$@,$(CONFIG_BAREBOX_MAX_IMAGE_SIZE)) - $(Q)$(kecho) ' Barebox: fix size' - $(Q)$(objtree)/scripts/fix_size -i -f $(objtree)/$@ $(FIX_SIZE) - $(Q)$(kecho) ' Barebox: $@ is ready' - -$(obj)/zbarebox.S: $(obj)/zbarebox FORCE - $(call if_changed,disasm) - -PBL_CPPFLAGS += -fdata-sections -ffunction-sections -LDFLAGS_zbarebox := -Map $(obj)/zbarebox.map --gc-sections -ifdef CONFIG_PBL_RELOCATABLE -LDFLAGS_zbarebox += -pie -else -LDFLAGS_zbarebox += -static -endif - -LDFLAGS_zbarebox += $(call ld-option, --no-dynamic-linker) - -zbarebox-common := $(barebox-pbl-common) $(obj)/$(piggy_o) -zbarebox-lds := $(obj)/zbarebox.lds - -$(zbarebox-lds): $(obj)/../lib/pbl.lds.S FORCE - $(call if_changed_dep,cpp_lds_S) - -quiet_cmd_zbarebox__ ?= LD $@ - cmd_zbarebox__ ?= $(LD) $(LDFLAGS) $(LDFLAGS_zbarebox) -o $@ \ - -e pbl_start -T $(zbarebox-lds) \ - --start-group $(zbarebox-common) --end-group \ - $(filter-out $(zbarebox-lds) $(zbarebox-common) FORCE ,$^) - -$(obj)/zbarebox: $(zbarebox-lds) $(zbarebox-common) FORCE - $(call if_changed,zbarebox__) - -$(obj)/piggy.$(suffix_y): $(obj)/../../../barebox.bin FORCE - $(call if_changed,$(suffix_y)) - -$(obj)/$(piggy_o): $(obj)/piggy.$(suffix_y) FORCE diff --git a/arch/arm/pbl/piggy.comp_copy.S b/arch/arm/pbl/piggy.comp_copy.S deleted file mode 100644 index 2b5a812..0000000 --- a/arch/arm/pbl/piggy.comp_copy.S +++ /dev/null @@ -1,6 +0,0 @@ - .section .piggydata,#alloc - .globl input_data -input_data: - .incbin "arch/arm/pbl/piggy.comp_copy" - .globl input_data_end -input_data_end: diff --git a/arch/arm/pbl/piggy.gzip.S b/arch/arm/pbl/piggy.gzip.S deleted file mode 100644 index 4a623c0..0000000 --- a/arch/arm/pbl/piggy.gzip.S +++ /dev/null @@ -1,6 +0,0 @@ - .section .piggydata,#alloc - .globl input_data -input_data: - .incbin "arch/arm/pbl/piggy.gzip" - .globl input_data_end -input_data_end: diff --git a/arch/arm/pbl/piggy.lz4.S b/arch/arm/pbl/piggy.lz4.S deleted file mode 100644 index fa9b246..0000000 --- a/arch/arm/pbl/piggy.lz4.S +++ /dev/null @@ -1,6 +0,0 @@ - .section .piggydata,#alloc - .globl input_data -input_data: - .incbin "arch/arm/pbl/piggy.lz4" - .globl input_data_end -input_data_end: diff --git a/arch/arm/pbl/piggy.lzo.S b/arch/arm/pbl/piggy.lzo.S deleted file mode 100644 index e0484c7..0000000 --- a/arch/arm/pbl/piggy.lzo.S +++ /dev/null @@ -1,6 +0,0 @@ - .section .piggydata,#alloc - .globl input_data -input_data: - .incbin "arch/arm/pbl/piggy.lzo" - .globl input_data_end -input_data_end: diff --git a/arch/arm/pbl/piggy.xzkern.S b/arch/arm/pbl/piggy.xzkern.S deleted file mode 100644 index a7c0259..0000000 --- a/arch/arm/pbl/piggy.xzkern.S +++ /dev/null @@ -1,6 +0,0 @@ - .section .piggydata,#alloc - .globl input_data -input_data: - .incbin "arch/arm/pbl/piggy.xzkern" - .globl input_data_end -input_data_end: diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig index beeb4b8..57f0b57 100644 --- a/drivers/net/Kconfig +++ b/drivers/net/Kconfig @@ -16,9 +16,6 @@ config HAS_MACB bool -config HAS_NETX_ETHER - bool - config PHYLIB bool @@ -180,11 +177,6 @@ select PHYLIB select MDIO_MVEBU -config DRIVER_NET_NETX - bool "Hilscher Netx ethernet driver" - depends on HAS_NETX_ETHER - select PHYLIB - config DRIVER_NET_ORION bool "Marvell Orion SoC Ethernet" depends on ARCH_MVEBU diff --git a/drivers/net/Makefile b/drivers/net/Makefile index 6ccd22c..f6a8213 100644 --- a/drivers/net/Makefile +++ b/drivers/net/Makefile @@ -24,7 +24,6 @@ obj-$(CONFIG_DRIVER_NET_MICREL) += ksz8864rmn.o obj-$(CONFIG_DRIVER_NET_MPC5200) += fec_mpc5200.o obj-$(CONFIG_DRIVER_NET_MVNETA) += mvneta.o -obj-$(CONFIG_DRIVER_NET_NETX) += netx_eth.o obj-$(CONFIG_DRIVER_NET_ORION) += orion-gbe.o obj-$(CONFIG_DRIVER_NET_RTL8139) += rtl8139.o obj-$(CONFIG_DRIVER_NET_RTL8169) += rtl8169.o diff --git a/drivers/net/netx_eth.c b/drivers/net/netx_eth.c deleted file mode 100644 index 64e9886..0000000 --- a/drivers/net/netx_eth.c +++ /dev/null @@ -1,279 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#define ETH_MAC_LOCAL_CONFIG 0x1560 -#define ETH_MAC_4321 0x1564 -#define ETH_MAC_65 0x1568 - -#define MAC_TRAFFIC_CLASS_ARRANGEMENT_SHIFT 16 -#define MAC_TRAFFIC_CLASS_ARRANGEMENT_MASK (0xf<priv; - int xcno = priv->xcno; - unsigned int val; - int timeout = 500; - unsigned char *dst = (unsigned char *)(SRAM_BASE(xcno) + 1560); - - memcpy(dst, (void *)packet, length); - - if( length < 60 ) { - memset(dst + length, 0, 60 - length); - length = 60; - } - - PFIFO_REG(PFIFO_BASE(REQ_FIFO_PORT_LO(xcno))) = - FIFO_PTR_SEGMENT(xcno) | - FIFO_PTR_FRAMENO(1) | - FIFO_PTR_FRAMELEN(length); - - while (!PFIFO_REG( PFIFO_FILL_LEVEL(CON_FIFO_PORT_LO(xcno))) && timeout) { - timeout--; - udelay(100); - } -#if 0 - if (!timeout) { - loadxc(0); - loadxc(1); - eth_init(gd->bd); - return -1; - } -#endif - val = PFIFO_REG( PFIFO_BASE(CON_FIFO_PORT_LO(xcno)) ); - if((val & FIFO_PTR_ERROR_MASK) & 0x8) - printf("error sending frame: %u\n", val); - - return 0; -} - -static int netx_eth_rx (struct eth_device *edev) -{ - struct netx_eth_priv *priv = (struct netx_eth_priv *)edev->priv; - int xcno = priv->xcno; - unsigned int val, frameno, seg, len; - - if(!PFIFO_REG( PFIFO_FILL_LEVEL(IND_FIFO_PORT_LO(xcno)))) { - return 0; - } - - val = PFIFO_REG( PFIFO_BASE(IND_FIFO_PORT_LO(xcno)) ); - - frameno = (val & FIFO_PTR_FRAMENO_MASK) >> FIFO_PTR_FRAMENO_SHIFT; - seg = (val & FIFO_PTR_SEGMENT_MASK) >> FIFO_PTR_SEGMENT_SHIFT; - len = (val & FIFO_PTR_FRAMELEN_MASK) >> FIFO_PTR_FRAMELEN_SHIFT; - - /* get data */ - memcpy((void*)NetRxPackets[0], (void *)(SRAM_BASE(seg) + frameno * 1560), len); - /* pass to barebox */ - net_receive(edev, NetRxPackets[0], len); - - PFIFO_REG(PFIFO_BASE(EMPTY_PTR_FIFO(xcno))) = - FIFO_PTR_SEGMENT(seg) | - FIFO_PTR_FRAMENO(frameno); - return 0; -} - -static int netx_miibus_read(struct mii_bus *bus, int phy_addr, int reg) -{ - int value; - - MIIMU_REG = MIIMU_SNRDY | MIIMU_PREAMBLE | MIIMU_PHYADDR(phy_addr) | - MIIMU_REGADDR(reg) | MIIMU_PHY_NRES; - - while(MIIMU_REG & MIIMU_SNRDY); - - value = MIIMU_REG >> 16; - - debug("%s: addr: 0x%02x reg: 0x%02x val: 0x%04x\n", __func__, - phy_addr, reg, value); - - return value; -} - -static int netx_miibus_write(struct mii_bus *bus, int phy_addr, - int reg, u16 val) -{ - debug("%s: addr: 0x%02x reg: 0x%02x val: 0x%04x\n",__func__, - phy_addr, reg, val); - - MIIMU_REG = MIIMU_SNRDY | MIIMU_PREAMBLE | MIIMU_PHYADDR(phy_addr) | - MIIMU_REGADDR(reg) | MIIMU_PHY_NRES | MIIMU_OPMODE_WRITE | - MIIMU_DATA(val); - - while(MIIMU_REG & MIIMU_SNRDY); - - return 0; -} - -static int netx_eth_init_phy(void) -{ - unsigned int phy_control; - - phy_control = PHY_CONTROL_PHY_ADDRESS(0xe) | - PHY_CONTROL_PHY1_MODE(PHY_MODE_ALL) | - PHY_CONTROL_PHY1_AUTOMDIX | - PHY_CONTROL_PHY1_EN | - PHY_CONTROL_PHY0_MODE(PHY_MODE_ALL) | - PHY_CONTROL_PHY0_AUTOMDIX | - PHY_CONTROL_PHY0_EN | - PHY_CONTROL_CLK_XLATIN; - - /* enable asic control */ - SYSTEM_REG(SYSTEM_IOC_ACCESS_KEY) = SYSTEM_REG(SYSTEM_IOC_ACCESS_KEY); - - SYSTEM_REG(SYSTEM_PHY_CONTROL) = phy_control | PHY_CONTROL_RESET; - udelay(100); - - /* enable asic control */ - SYSTEM_REG(SYSTEM_IOC_ACCESS_KEY) = SYSTEM_REG(SYSTEM_IOC_ACCESS_KEY); - - SYSTEM_REG(SYSTEM_PHY_CONTROL) = phy_control; - - return 0; -} - -static int netx_eth_init_dev(struct eth_device *edev) -{ - struct netx_eth_priv *priv = (struct netx_eth_priv *)edev->priv; - int xcno = priv->xcno; - int i; - - loadxc(xcno); - - /* Fill empty pointer fifo */ - for (i = 2; i <= 18; i++) - PFIFO_REG( PFIFO_BASE(EMPTY_PTR_FIFO(xcno)) ) = FIFO_PTR_FRAMENO(i) | FIFO_PTR_SEGMENT(xcno); - - return 0; -} - -static int netx_eth_open(struct eth_device *edev) -{ - struct netx_eth_priv *priv = (struct netx_eth_priv *)edev->priv; - - return phy_device_connect(edev, &priv->miibus, 0, NULL, - 0, PHY_INTERFACE_MODE_NA); -} - -static void netx_eth_halt (struct eth_device *edev) -{ -} - -static int netx_eth_get_ethaddr(struct eth_device *edev, unsigned char *adr) -{ - /* FIXME: get from crypto flash */ - return -1; -} - -static int netx_eth_set_ethaddr(struct eth_device *edev, const unsigned char *adr) -{ - struct netx_eth_priv *priv = (struct netx_eth_priv *)edev->priv; - int xcno = priv->xcno; - - debug("%s\n", __func__); - - /* set MAC address */ - XMAC_REG(xcno, XMAC_RPU_HOLD_PC) = RPU_HOLD_PC; - XMAC_REG(xcno, XMAC_TPU_HOLD_PC) = TPU_HOLD_PC; - XPEC_REG(xcno, XPEC_XPU_HOLD_PC) = XPU_HOLD_PC; - XPEC_REG(xcno, XPEC_RAM_START + ETH_MAC_4321) = adr[0] | adr[1]<<8 | adr[2]<<16 | adr[3]<<24; - XPEC_REG(xcno, XPEC_RAM_START + ETH_MAC_65) = adr[4] | adr[5]<<8; - XPEC_REG(xcno, XPEC_RAM_START + ETH_MAC_LOCAL_CONFIG) = MAC_TRAFFIC_CLASS_ARRANGEMENT(8); - XMAC_REG(xcno, XMAC_RPU_HOLD_PC) = 0; - XMAC_REG(xcno, XMAC_TPU_HOLD_PC) = 0; - XPEC_REG(xcno, XPEC_XPU_HOLD_PC) = 0; - -#if 0 - for (i = 0; i < 5; i++) - printf ("%02x:", adr[i]); - printf ("%02x\n", adr[5]); -#endif - return -0; -} - -static int netx_eth_probe(struct device_d *dev) -{ - struct eth_device *edev; - struct netx_eth_priv *priv; - struct netx_eth_platform_data *pdata; - - debug("netx_eth_probe()\n"); - - pdata = dev->platform_data; - - edev = xzalloc(sizeof(struct eth_device) + sizeof(struct netx_eth_priv)); - edev->priv = (struct netx_priv *)(edev + 1); - - priv = edev->priv; - priv->xcno = pdata->xcno; - - edev->init = netx_eth_init_dev; - edev->open = netx_eth_open; - edev->send = netx_eth_send; - edev->recv = netx_eth_rx; - edev->halt = netx_eth_halt; - edev->get_ethaddr = netx_eth_get_ethaddr; - edev->set_ethaddr = netx_eth_set_ethaddr; - edev->parent = dev; - - priv->miibus.read = netx_miibus_read; - priv->miibus.write = netx_miibus_write; - priv->miibus.parent = dev; - - netx_eth_init_phy(); - mdiobus_register(&priv->miibus); - eth_register(edev); - - return 0; -} - -static struct driver_d netx_eth_driver = { - .name = "netx-eth", - .probe = netx_eth_probe, -}; -device_platform_driver(netx_eth_driver); diff --git a/drivers/serial/Kconfig b/drivers/serial/Kconfig index f12ff93..c5bce2f 100644 --- a/drivers/serial/Kconfig +++ b/drivers/serial/Kconfig @@ -50,11 +50,6 @@ depends on ARCH_MXS bool "i.MX23/i.MX28 application UART serial driver" -config DRIVER_SERIAL_NETX - depends on ARCH_NETX - default y - bool "Netx serial driver" - config DRIVER_SERIAL_LINUX_CONSOLE depends on LINUX default y diff --git a/drivers/serial/Makefile b/drivers/serial/Makefile index 4174cc1..993e5d6 100644 --- a/drivers/serial/Makefile +++ b/drivers/serial/Makefile @@ -5,7 +5,6 @@ obj-$(CONFIG_DRIVER_SERIAL_IMX) += serial_imx.o obj-$(CONFIG_DRIVER_SERIAL_STM378X) += stm-serial.o obj-$(CONFIG_DRIVER_SERIAL_ATMEL) += atmel.o -obj-$(CONFIG_DRIVER_SERIAL_NETX) += serial_netx.o obj-$(CONFIG_DRIVER_SERIAL_LINUX_CONSOLE) += linux_console.o obj-$(CONFIG_DRIVER_SERIAL_MPC5XXX) += serial_mpc5xxx.o obj-$(CONFIG_DRIVER_SERIAL_BLACKFIN) += serial_blackfin.o diff --git a/drivers/serial/serial_netx.c b/drivers/serial/serial_netx.c deleted file mode 100644 index 55ed89b..0000000 --- a/drivers/serial/serial_netx.c +++ /dev/null @@ -1,161 +0,0 @@ -/* - * (C) Copyright 2005 - * Sascha Hauer, Pengutronix - * - * See file CREDITS for list of people who contributed to this - * project. - * - * 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. - * - */ - -#include -#include -#include -#include -#include -#include - -enum uart_regs { - UART_DR = 0x00, - UART_SR = 0x04, - UART_LINE_CR = 0x08, - UART_BAUDDIV_MSB = 0x0c, - UART_BAUDDIV_LSB = 0x10, - UART_CR = 0x14, - UART_FR = 0x18, - UART_IIR = 0x1c, - UART_ILPR = 0x20, - UART_RTS_CR = 0x24, - UART_RTS_LEAD = 0x28, - UART_RTS_TRAIL = 0x2c, - UART_DRV_ENABLE = 0x30, - UART_BRM_CR = 0x34, - UART_RXFIFO_IRQLEVEL = 0x38, - UART_TXFIFO_IRQLEVEL = 0x3c, -}; - -#define LINE_CR_5BIT (0<<5) -#define LINE_CR_6BIT (1<<5) -#define LINE_CR_7BIT (2<<5) -#define LINE_CR_8BIT (3<<5) -#define LINE_CR_FEN (1<<4) - -#define CR_UARTEN (1<<0) - -#define FR_TXFE (1<<7) -#define FR_RXFF (1<<6) -#define FR_TXFF (1<<5) -#define FR_RXFE (1<<4) -#define FR_BUSY (1<<3) -#define FR_DCD (1<<2) -#define FR_DSR (1<<1) -#define FR_CTS (1<<0) - -#define DRV_ENABLE_TX (1<<1) -#define DRV_ENABLE_RTS (1<<0) - -#define BRM_CR_BAUD_RATE_MODE (1<<0) - -static int netx_serial_init_port(struct console_device *cdev) -{ - struct device_d *dev = cdev->dev; - void __iomem *base = dev->priv; - unsigned int divisor; - - /* disable uart */ - writel(0, base + UART_CR); - writel(BRM_CR_BAUD_RATE_MODE, base + UART_BRM_CR); - - /* set baud rate */ - divisor = 115200 * 4096; - divisor /= 1000; - divisor *= 256; - divisor /= 100000; - - writel(divisor & 0xff, base + UART_BAUDDIV_LSB); - writel((divisor >> 8) & 0xff, base + UART_BAUDDIV_MSB); - writel(DRV_ENABLE_TX | DRV_ENABLE_RTS, base + UART_DRV_ENABLE); - - writel(LINE_CR_8BIT | LINE_CR_FEN, base + UART_LINE_CR); - - /* Finally, enable the UART */ - writel(CR_UARTEN, base + UART_CR); - - return 0; -} - -static int netx_serial_setbaudrate(struct console_device *cdev, int baudrate) -{ - return 0; -} - -static void netx_serial_putc(struct console_device *cdev, char c) -{ - struct device_d *dev = cdev->dev; - void __iomem *base = dev->priv; - - while (readl(base + UART_FR) & FR_TXFF ); - - writel(c, base + UART_DR); -} - -static int netx_serial_getc(struct console_device *cdev) -{ - struct device_d *dev = cdev->dev; - void __iomem *base = dev->priv; - int c; - - while (readl(base + UART_FR) & FR_RXFE ); - - c = readl(base + UART_DR); - - readl(base + UART_SR); - - return c; -} - -static int netx_serial_tstc(struct console_device *cdev) -{ - struct device_d *dev = cdev->dev; - void __iomem *base = dev->priv; - - return (readl(base + UART_FR) & FR_RXFE) ? 0 : 1; -} - -static int netx_serial_probe(struct device_d *dev) -{ - struct resource *iores; - struct console_device *cdev; - - cdev = xzalloc(sizeof(struct console_device)); - iores = dev_request_mem_resource(dev, 0); - if (IS_ERR(iores)) - return PTR_ERR(iores); - dev->priv = IOMEM(iores->start); - cdev->dev = dev; - cdev->tstc = netx_serial_tstc; - cdev->putc = netx_serial_putc; - cdev->getc = netx_serial_getc; - cdev->setbrg = netx_serial_setbaudrate; - - netx_serial_init_port(cdev); - - console_register(cdev); - - return 0; -} - -static struct driver_d netx_serial_driver = { - .name = "netx_serial", - .probe = netx_serial_probe, -}; -console_platform_driver(netx_serial_driver); diff --git a/images/Makefile b/images/Makefile index dd39f44..ceb0061 100644 --- a/images/Makefile +++ b/images/Makefile @@ -164,10 +164,17 @@ include $(srctree)/images/Makefile.zynqmp include $(srctree)/images/Makefile.layerscape + pblb-$(CONFIG_BOARD_ARM_GENERIC_DT) += start_dt_2nd FILE_barebox-dt-2nd.img = start_dt_2nd.pblb image-$(CONFIG_BOARD_ARM_GENERIC_DT) += barebox-dt-2nd.img +ifdef CONFIG_ARM +pblb-$(CONFIG_PBL_SINGLE_IMAGE) += start_pbl +FILE_barebox.img = start_pbl.pblb +image-$(CONFIG_PBL_SINGLE_IMAGE) += barebox.img +endif + ifneq ($(pblx-y)$(pblx-),) $(error pblx- has been removed. Please use pblb- instead.) endif diff --git a/pbl/Kconfig b/pbl/Kconfig index 7e6077f..6e8cc3a 100644 --- a/pbl/Kconfig +++ b/pbl/Kconfig @@ -24,14 +24,6 @@ depends on !HAVE_PBL_MULTI_IMAGES default y -config PBL_FORCE_PIGGYDATA_COPY - bool - help - In some case we need to copy the PIGGYDATA as the link address - as example we run from SRAM and shutdown the SDRAM/DDR for - reconfiguration but most of the time we just need to copy the - executable code. - if PBL_IMAGE config PBL_RELOCATABLE diff --git a/scripts/Makefile b/scripts/Makefile index dffab53..8aaa01f 100644 --- a/scripts/Makefile +++ b/scripts/Makefile @@ -14,7 +14,6 @@ hostprogs-$(CONFIG_KALLSYMS) += kallsyms hostprogs-$(CONFIG_MIPS) += mips-relocs hostprogs-$(CONFIG_MVEBU_HOSTTOOLS) += kwbimage kwboot mvebuimg -hostprogs-$(CONFIG_ARCH_NETX) += gen_netx_image hostprogs-$(CONFIG_ARCH_OMAP) += omap_signGP mk-omap-image hostprogs-$(CONFIG_ARCH_S5PCxx) += s5p_cksum hostprogs-$(CONFIG_ARCH_DAVINCI) += mkublheader diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib index c4d307a..a0fd710 100644 --- a/scripts/Makefile.lib +++ b/scripts/Makefile.lib @@ -18,6 +18,8 @@ extra-y += $(patsubst %.dtb.o,%.dtb,$(obj-dtb-y)) extra-y += $(patsubst %.dtb.o,%.dtb.S,$(pbl-dtb-y)) extra-y += $(patsubst %.dtb.o,%.dtb,$(pbl-dtb-y)) +extra-y += $(patsubst %.dtb.o,%.dtb.S,$(lwl-dtb-y)) +extra-y += $(patsubst %.dtb.o,%.dtb,$(lwl-dtb-y)) # Handle objects in subdirs # --------------------------------------------------------------------------- @@ -29,9 +31,9 @@ # lowlevel is present in the PBL if enabled # otherwise in barebox ifeq ($(CONFIG_PBL_IMAGE), y) -pbl-y += $(lwl-y) +pbl-y += $(lwl-y) $(lwl-dtb-y) else -obj-y += $(lwl-y) +obj-y += $(lwl-y) $(lwl-dtb-y) endif obj-y += $(obj-pbl-y) diff --git a/scripts/gen_netx_image.c b/scripts/gen_netx_image.c deleted file mode 100644 index 18e10bc..0000000 --- a/scripts/gen_netx_image.c +++ /dev/null @@ -1,243 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -struct netx_block_normal { - uint32_t sdram_general_ctrl; /* SDRam General control value */ - uint32_t sdram_timing_ctrl; /* SDRam Timing control register value */ - uint32_t reserved[3]; -}; - -struct netx_block_expbus { - uint32_t exp_bus_reg; /* Expension bus register value (EXPBus Bootmode) */ - uint32_t io_reg_mode0; /* IORegmode0 register value (EXPBus Bootmode) */ - uint32_t io_reg_mode1; /* IORegmode1 register value (EXPBus Bootmode) */ - uint32_t if_conf1; /* IfConfig1 register value (EXPBus Bootmode) */ - uint32_t if_conf2; /* IfConfig2 register value (EXPBus Bootmode) */ -}; - -struct netx_bootblock { - uint32_t cookie; /* Cookie identifying bus width and valid bootblock */ -# define MAGICCOOKIE_8BIT 0xF8BEAF08 /* Cookie used for 8Bit Flashes */ -# define MAGICCOOKIE_16BIT 0xF8BEAF16 /* Cookie used for 16Bit Flashes */ -# define MAGICCOOKIE_32BIT 0xF8BEAF32 /* Cookie used for 32Bit Flashes */ - - union { - uint32_t mem_ctrl; /* Parallel/Serial Flash Mode for setting up timing parameters */ - uint32_t speed; /* I2C/SPI Mode for identifying speed of device */ - uint32_t reserved; /* PCI/DPM mode */ - } ctrl; - - uint32_t appl_entrypoint; /* Entrypoint to application after relocation */ - uint32_t appl_checksum; /* Checksum of application (DWORD sum over application) */ - uint32_t appl_size; /* size of application in DWORDs */ - uint32_t appl_start_addr; /* Relocation address of application */ - uint32_t signature; /* Bootblock signature ('NETX') */ -# define NETX_IDENTIFICATION 0x5854454E /* Valid signature 'N' 'E' 'T' 'X' */ - - union { - struct netx_block_normal normal; - struct netx_block_expbus expbus; - } config; - - uint32_t misc_asic_ctrl; /* ASIC CTRL register value */ - uint32_t UserParameter; /* Serial number or user parameter */ - uint32_t SourceType; /* 1 = parallel falsh at the SRAM bus */ -# define ST_PFLASH 1 -# define ST_SFLASH 2 -# define ST_SEEPROM 3 - - uint32_t boot_checksum; /* Bootblock checksum (complement of DWORD sum over bootblock) */ -}; - -void print_usage(char *prg) -{ - fprintf(stderr, "Usage: %s [Options]\n" - "Options:\n" - " -i, --infile=FILE input file\n" - " -o --outfile=FILE outputfile\n" - " -m --memctrl=REG Memory Control register value\n" - " -s, --sdramctrl=REG SDRAM Control regster value\n" - " -t, --sdramtimctrl=REG SDRAM Timing Control regster value\n" - " -e, --entrypoint=ADR Application entrypoint\n" - " -c, --cookie=BITS Cookie to use (8|16|32)\n" - " -h, --help this help\n", - prg); -} - -int main(int argc, char *argv[]) -{ - struct netx_bootblock *nb; - int fd; - struct stat s; - int opt; - unsigned char *buf; - int bytes, err, barebox_size, ofs, i; - uint32_t *ptr; - uint32_t checksum = 0; - uint32_t memctrl = 0, sdramctrl = 0, sdramtimctrl = 0, entrypoint = 0, cookie = 0; - char *infile = NULL, *outfile = NULL; - - struct option long_options[] = { - { "help", no_argument, 0, 'h' }, - { "infile", required_argument, 0, 'i'}, - { "outfile", required_argument, 0, 'o'}, - { "memctrl", required_argument, 0, 'm'}, - { "sdramctrl", required_argument, 0, 's' }, - { "sdramtimctrl", required_argument, 0, 't' }, - { "entrypoint", required_argument, 0, 'e' }, - { "cookie", required_argument, 0 , 'c' }, - { 0, 0, 0, 0}, - }; - - while ((opt = getopt_long(argc, argv, "hi:o:m:s:t:e:c:", long_options, NULL)) != -1) { - switch (opt) { - case 'h': - print_usage(basename(argv[0])); - exit(0); - case 'i': - infile = optarg; - break; - case 'o': - outfile = optarg; - break; - case 'm': - memctrl = strtoul(optarg, NULL, 0); - break; - case 's': - sdramctrl = strtoul(optarg, NULL, 0); - break; - case 't': - sdramtimctrl = strtoul(optarg, NULL, 0); - break; - case 'e': - entrypoint = strtoul(optarg, NULL, 0); - break; - case 'c': - cookie = strtoul(optarg, NULL, 0); - break; - } - } - - if(!infile) { - printf("no input filename supplied\n"); - exit(1); - } - - if(!outfile) { - printf("no outpu filename supplied\n"); - exit(1); - } - - switch (cookie) { - case 8: - cookie = MAGICCOOKIE_8BIT; - break; - case 16: - cookie = MAGICCOOKIE_16BIT; - break; - case 32: - cookie = MAGICCOOKIE_32BIT; - break; - default: - fprintf(stderr, "invalid coookie size %d\n",cookie); - } - - fd = open(infile,O_RDONLY); - if(fd < 0) { - perror("open"); - exit(1); - } - - if( fstat(fd, &s) < 0) { - perror("fstat"); - exit(1); - } - - barebox_size = s.st_size; - printf("found barebox image. size: %d bytes. Using entrypoint 0x%08x\n",barebox_size,entrypoint); - - buf = malloc(barebox_size + sizeof(struct netx_bootblock) + 4); - if(!buf) { - perror("malloc"); - exit(1); - } - memset(buf, 0, barebox_size + sizeof(struct netx_bootblock) + 4); - - nb = (struct netx_bootblock *)buf; - - nb->cookie = cookie; - nb->ctrl.mem_ctrl = memctrl; - nb->appl_entrypoint = entrypoint; - nb->appl_size = (barebox_size >> 2); - - nb->appl_start_addr = entrypoint; - nb->signature = NETX_IDENTIFICATION; - nb->config.normal.sdram_general_ctrl = sdramctrl; - nb->config.normal.sdram_timing_ctrl = sdramtimctrl; - nb->SourceType = ST_PFLASH; - - ofs = sizeof(struct netx_bootblock); - bytes = barebox_size; - - while(bytes) { - err = read(fd, buf + ofs, bytes); - if( err < 0 ) { - perror("read"); - exit(1); - } - bytes -= err; - ofs += err; - } - - close(fd); - - /* calculate application checksum */ - ptr = (uint32_t *)(buf + sizeof(struct netx_bootblock)); - - checksum = 0; - - for( i = 0; i < nb->appl_size; i++) { - checksum += *ptr++; - } - - nb->appl_checksum = checksum; - printf("application checksum: 0x%08x\n",nb->appl_checksum); - - /* calculate bootblock checksum */ - ptr = (uint32_t *)buf; - checksum = 0; - for( i = 0; i < (sizeof(struct netx_bootblock) >> 2); i++) - checksum += *ptr++; - nb->boot_checksum = -1 * checksum; - - fd = open(outfile, O_WRONLY | O_CREAT | O_TRUNC, S_IRUSR | S_IWUSR | - S_IRGRP | S_IWGRP | S_IROTH); - if(fd < 0) { - perror("open"); - exit(1); - } - - bytes = barebox_size + sizeof(struct netx_bootblock); - ofs = 0; - while(bytes) { - err = write(fd, buf + ofs, bytes); - if( err < 0) { - perror("write"); - exit(1); - } - bytes -= err; - ofs += err; - } - - close(fd); - free(buf); - return 0; -}