diff options
138 files changed, 1485 insertions, 645 deletions
diff --git a/Documentation/devicetree/bindings/barebox/barebox,environment.rst b/Documentation/devicetree/bindings/barebox/barebox,environment.rst index 8a57bf1add..40239f424a 100644 --- a/Documentation/devicetree/bindings/barebox/barebox,environment.rst +++ b/Documentation/devicetree/bindings/barebox/barebox,environment.rst @@ -23,6 +23,9 @@ the path to the environment. Supported values for <type>: be the label for MTD partitions, the number for DOS partitions (beginning with 0) or the name for GPT partitions. +If the *environmnet* is located in a GPT partition, use +``6C3737F2-07F8-45D1-AD45-15D260AAB24D`` as partition type GUID. + The file-path is the name of a file located in a FAT filesystem on the device named in device-path. This filesystem will be mounted and the environment loaded from the file's location in the directory tree. diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index abe649de49..5aef8fcd3b 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -45,6 +45,7 @@ config ARCH_MULTIARCH config ARCH_AT91 bool "Atmel AT91" + depends on 32BIT select GPIOLIB select CLKDEV_LOOKUP select HAVE_PBL_MULTI_IMAGES @@ -54,6 +55,7 @@ config ARCH_AT91 config ARCH_CLPS711X bool "Cirrus Logic EP711x/EP721x/EP731x" + depends on 32BIT select CLKDEV_LOOKUP select CLOCKSOURCE_CLPS711X select COMMON_CLK @@ -67,12 +69,14 @@ config ARCH_CLPS711X config ARCH_DAVINCI bool "TI Davinci" + depends on 32BIT select CPU_ARM926T select HAS_DEBUG_LL select GPIOLIB config ARCH_DIGIC bool "Canon DIGIC-based cameras" + depends on 32BIT select CPU_ARM946E select HAS_DEBUG_LL select CLOCKSOURCE_DIGIC @@ -82,6 +86,7 @@ config ARCH_DIGIC config ARCH_EP93XX bool "Cirrus Logic EP93xx" + depends on 32BIT select CPU_ARM920T select GENERIC_GPIO @@ -99,6 +104,7 @@ config ARCH_LAYERSCAPE config ARCH_MVEBU bool "Marvell EBU platforms" + depends on 32BIT select COMMON_CLK select COMMON_CLK_OF_PROVIDER select CLKDEV_LOOKUP @@ -113,6 +119,7 @@ config ARCH_MVEBU config ARCH_MXS bool "Freescale i.MX23/28 (mxs) based" + depends on 32BIT select GPIOLIB select GENERIC_GPIO select COMMON_CLK @@ -122,6 +129,7 @@ config ARCH_MXS config ARCH_NOMADIK bool "STMicroelectronics Nomadik" + depends on 32BIT select CPU_ARM926T select CLOCKSOURCE_NOMADIK select HAVE_CLK @@ -130,14 +138,17 @@ config ARCH_NOMADIK config ARCH_OMAP_SINGLE bool "TI OMAP" + depends on 32BIT select ARCH_OMAP config ARCH_PXA bool "Intel/Marvell PXA based" + depends on 32BIT select GENERIC_GPIO config ARCH_SOCFPGA bool "Altera SOCFPGA" + depends on 32BIT select HAS_DEBUG_LL select ARM_SMP_TWD select CPU_V7 @@ -146,12 +157,14 @@ config ARCH_SOCFPGA config ARCH_VERSATILE bool "ARM Versatile boards (ARM926EJ-S)" + depends on 32BIT select GPIOLIB select HAVE_CLK select HAS_DEBUG_LL config ARCH_TEGRA bool "NVIDIA Tegra" + depends on 32BIT select CPU_V7 select HAS_DEBUG_LL select HW_HAS_PCI @@ -169,6 +182,7 @@ config ARCH_TEGRA config ARCH_UEMD bool "RC Module UEMD Platform" + depends on 32BIT select CPU_ARM1176 select COMMON_CLK select COMMON_CLK_OF_PROVIDER @@ -180,18 +194,19 @@ config ARCH_UEMD config ARCH_ZYNQ bool "Xilinx Zynq-based boards" + depends on 32BIT select HAS_DEBUG_LL select PBL_IMAGE select GPIOLIB config ARCH_ARM64_VIRT bool "ARM64 QEMU Virt board" + depends on 64BIT select CPU_V8 select HAVE_PBL_MULTI_IMAGES select OFDEVICE select OFTREE select RELOCATABLE - select CPU_SUPPORTS_64BIT_KERNEL select ARM_AMBA select BOARD_ARM_VIRT select HW_HAS_PCI @@ -212,8 +227,6 @@ config ARCH_BCM283X select OFTREE select OFDEVICE select HAVE_PBL_MULTI_IMAGES - select CPU_SUPPORTS_32BIT_KERNEL - select CPU_SUPPORTS_64BIT_KERNEL config ARCH_IMX bool "Freescale iMX-based" @@ -225,11 +238,10 @@ config ARCH_IMX select HAS_DEBUG_LL select HAVE_PBL_MULTI_IMAGES select RELOCATABLE - select CPU_SUPPORTS_32BIT_KERNEL - select CPU_SUPPORTS_64BIT_KERNEL config ARCH_OMAP_MULTI bool "TI OMAP" + depends on 32BIT depends on ARCH_MULTIARCH select OMAP_MULTI_BOARDS select ARCH_OMAP @@ -251,6 +263,7 @@ config ARCH_ROCKCHIP config ARCH_STM32MP bool "STMicroelectronics STM32MP" + depends on 32BIT select ARCH_STM32 select CPU_V7 select HAVE_PBL_MULTI_IMAGES @@ -267,6 +280,7 @@ config ARCH_STM32MP config ARCH_VEXPRESS bool "ARM Vexpress & virt boards" + depends on 32BIT select HAS_DEBUG_LL select CPU_V7 select ARM_AMBA @@ -281,6 +295,7 @@ config ARCH_VEXPRESS config ARCH_ZYNQMP bool "Xilinx ZynqMP-based boards" + depends on 64BIT select CPU_V8 select HAS_DEBUG_LL select HAVE_PBL_MULTI_IMAGES @@ -292,7 +307,6 @@ config ARCH_ZYNQMP select OFDEVICE select OFTREE select RELOCATABLE - select CPU_SUPPORTS_64BIT_KERNEL select HAS_MACB source "arch/arm/cpu/Kconfig" @@ -388,28 +402,18 @@ config ARM_BOARD_PREPEND_ATAG endmenu -choice - prompt "Barebox code model" - help - You should only select this option if you have a workload that - actually benefits from 64-bit processing or if your machine has - large memory. You will only be presented a single option in this - menu if your system does not support both 32-bit and 64-bit modes. - -config 32BIT - bool "32-bit barebox" - depends on CPU_SUPPORTS_32BIT_KERNEL - help - Select this option if you want to build a 32-bit barebox. - config 64BIT - bool "64-bit barebox" - depends on CPU_SUPPORTS_64BIT_KERNEL + bool "64bit barebox" if "$(ARCH)" != "arm64" + default "$(ARCH)" = "arm64" select ARCH_DMA_ADDR_T_64BIT help Select this option if you want to build a 64-bit barebox. -endchoice +config 32BIT + bool + default !64BIT + help + Select this option if you want to build a 32-bit barebox. menu "ARM specific settings" diff --git a/arch/arm/boards/innocomm-imx8mm-wb15/lowlevel.c b/arch/arm/boards/innocomm-imx8mm-wb15/lowlevel.c index 31b64ddb0e..2f6061f0e2 100644 --- a/arch/arm/boards/innocomm-imx8mm-wb15/lowlevel.c +++ b/arch/arm/boards/innocomm-imx8mm-wb15/lowlevel.c @@ -14,7 +14,6 @@ #include <mfd/bd71837.h> #include <mach/imx/xload.h> #include <soc/imx8m/ddr.h> -#include <image-metadata.h> #include "lowlevel.h" @@ -75,8 +74,6 @@ void innocomm_wb15_power_init_board(void) ENTRY_FUNCTION(start_innocomm_wb15_evk, r0, r1, r2) { - IMD_USED_OF(imx8mm_innocomm_wb15_evk); - imx8mm_cpu_lowlevel_init(); relocate_to_current_adr(); diff --git a/arch/arm/boards/ls1021aiot/lowlevel.c b/arch/arm/boards/ls1021aiot/lowlevel.c index b7106887f2..f255c425b7 100644 --- a/arch/arm/boards/ls1021aiot/lowlevel.c +++ b/arch/arm/boards/ls1021aiot/lowlevel.c @@ -8,7 +8,6 @@ #include <common.h> #include <clock.h> #include <debug_ll.h> -#include <image-metadata.h> #include <soc/fsl/fsl_ddr_sdram.h> #include <asm/barebox-arm-head.h> #include <asm/barebox-arm.h> @@ -92,8 +91,6 @@ static noinline __noreturn void ls1021aiot_r_entry(void) udelay(500); putc_ll('>'); - IMD_USED_OF(fsl_ls1021a_iot); - fsl_ddr_set_memctl_regs(&ddrc[0], 0); ls1021a_errata_post_ddr(); diff --git a/arch/arm/boards/ls1046ardb/lowlevel.c b/arch/arm/boards/ls1046ardb/lowlevel.c index bbb6c1c43d..a9dbfa7e71 100644 --- a/arch/arm/boards/ls1046ardb/lowlevel.c +++ b/arch/arm/boards/ls1046ardb/lowlevel.c @@ -202,8 +202,6 @@ static noinline __noreturn void ls1046ardb_r_entry(unsigned long memsize) ls1046a_debug_ll_init(); ls1046a_init_lowlevel(); - IMD_USED_OF(fsl_ls1046a_rdb); - i2c = ls1046_i2c_init(IOMEM(LSCH2_I2C1_BASE_ADDR)); ret = spd_read_eeprom(i2c, 0x51, &spd_eeprom, SPD_MEMTYPE_DDR4); if (ret) { diff --git a/arch/arm/boards/nxp-imx8mm-evk/lowlevel.c b/arch/arm/boards/nxp-imx8mm-evk/lowlevel.c index 46b5f317b5..ee18fe72b4 100644 --- a/arch/arm/boards/nxp-imx8mm-evk/lowlevel.c +++ b/arch/arm/boards/nxp-imx8mm-evk/lowlevel.c @@ -20,7 +20,6 @@ #include <mfd/pca9450.h> #include <mach/imx/xload.h> #include <soc/imx8m/ddr.h> -#include <image-metadata.h> #define UART_PAD_CTRL MUX_PAD_CTRL(PAD_CTL_DSE_3P3V_45_OHM) @@ -160,8 +159,5 @@ ENTRY_FUNCTION(start_nxp_imx8mm_evk, r0, r1, r2) relocate_to_current_adr(); setup_c(); - IMD_USED_OF(imx8mm_evk); - IMD_USED_OF(imx8mm_evkb); - nxp_imx8mm_evk_start(); } diff --git a/arch/arm/boards/nxp-imx8mp-evk/lowlevel.c b/arch/arm/boards/nxp-imx8mp-evk/lowlevel.c index a60730bcb2..c129b5e7fa 100644 --- a/arch/arm/boards/nxp-imx8mp-evk/lowlevel.c +++ b/arch/arm/boards/nxp-imx8mp-evk/lowlevel.c @@ -5,7 +5,6 @@ #include <debug_ll.h> #include <mach/imx/debug_ll.h> #include <firmware.h> -#include <image-metadata.h> #include <asm/mmu.h> #include <asm/cache.h> #include <asm/sections.h> @@ -141,7 +140,5 @@ ENTRY_FUNCTION(start_nxp_imx8mp_evk, r0, r1, r2) relocate_to_current_adr(); setup_c(); - IMD_USED_OF(imx8mp_evk); - nxp_imx8mp_evk_start(); } diff --git a/arch/arm/boards/nxp-imx8mq-evk/lowlevel.c b/arch/arm/boards/nxp-imx8mq-evk/lowlevel.c index ecd91d7165..5167c5f606 100644 --- a/arch/arm/boards/nxp-imx8mq-evk/lowlevel.c +++ b/arch/arm/boards/nxp-imx8mq-evk/lowlevel.c @@ -2,7 +2,6 @@ #include <common.h> #include <firmware.h> -#include <image-metadata.h> #include <linux/sizes.h> #include <mach/imx/generic.h> #include <asm/barebox-arm-head.h> @@ -108,7 +107,5 @@ ENTRY_FUNCTION(start_nxp_imx8mq_evk, r0, r1, r2) relocate_to_current_adr(); setup_c(); - IMD_USED_OF(imx8mq_evk); - nxp_imx8mq_evk_start(); } diff --git a/arch/arm/boards/phytec-som-imx6/lowlevel.c b/arch/arm/boards/phytec-som-imx6/lowlevel.c index bbd77dd734..da5665a716 100644 --- a/arch/arm/boards/phytec-som-imx6/lowlevel.c +++ b/arch/arm/boards/phytec-som-imx6/lowlevel.c @@ -76,7 +76,6 @@ static void __noreturn start_imx6_phytec_common(uint32_t size, extern char __dtb_##fdt_name##_start[]; \ \ IMD_USED(physom_mx6_memsize_##memory_size); \ - IMD_USED_OF(fdt_name); \ \ start_imx6_phytec_common(memory_size, do_early_uart_config, \ __dtb_##fdt_name##_start); \ diff --git a/arch/arm/boards/protonic-imx8m/lowlevel-prt8mm.c b/arch/arm/boards/protonic-imx8m/lowlevel-prt8mm.c index 603f8add07..711316ae4b 100644 --- a/arch/arm/boards/protonic-imx8m/lowlevel-prt8mm.c +++ b/arch/arm/boards/protonic-imx8m/lowlevel-prt8mm.c @@ -2,7 +2,6 @@ #include <asm/barebox-arm.h> #include <common.h> -#include <image-metadata.h> #include <debug_ll.h> #include <mach/imx/debug_ll.h> #include <firmware.h> @@ -88,7 +87,5 @@ ENTRY_FUNCTION(start_prt_prt8mm, r0, r1, r2) relocate_to_current_adr(); setup_c(); - IMD_USED_OF(imx8mm_prt8mm); - prt_prt8mm_start(); } diff --git a/arch/arm/boards/raspberry-pi/rpi-common.c b/arch/arm/boards/raspberry-pi/rpi-common.c index 3ed4510296..319a3d85ea 100644 --- a/arch/arm/boards/raspberry-pi/rpi-common.c +++ b/arch/arm/boards/raspberry-pi/rpi-common.c @@ -256,6 +256,21 @@ static enum reset_src_type rpi_decode_pm_rsts(struct device_node *chosen, return RESET_UKWN; } +static int rpi_vc_fdt_fixup(struct device_node *root, void *data) +{ + const struct device_node *vc_chosen = data; + struct device_node *chosen; + + chosen = of_create_node(root, "/chosen"); + if (!chosen) + return -ENOMEM; + + of_copy_property(vc_chosen, "overlay_prefix", chosen); + of_copy_property(vc_chosen, "os_prefix", chosen); + + return 0; +} + static u32 rpi_boot_mode, rpi_boot_part; /* Extract useful information from the VideoCore FDT we got. * Some parameters are defined here: @@ -289,6 +304,8 @@ static void rpi_vc_fdt_parse(void *fdt) goto out; } + of_register_fixup(rpi_vc_fdt_fixup, of_dup(chosen)); + bootloader = of_find_node_by_name(chosen, "bootloader"); str = of_read_vc_string(chosen, "bootargs"); diff --git a/arch/arm/boards/tqmls1046a/lowlevel.c b/arch/arm/boards/tqmls1046a/lowlevel.c index 3d3e9e702d..d302f63ebc 100644 --- a/arch/arm/boards/tqmls1046a/lowlevel.c +++ b/arch/arm/boards/tqmls1046a/lowlevel.c @@ -1,7 +1,6 @@ // SPDX-License-Identifier: GPL-2.0+ #include <common.h> #include <debug_ll.h> -#include <image-metadata.h> #include <platform_data/mmc-esdhc-imx.h> #include <soc/fsl/fsl_ddr_sdram.h> #include <soc/fsl/immap_lsch2.h> @@ -109,8 +108,6 @@ static noinline __noreturn void tqmls1046a_r_entry(void) udelay(500); putc_ll('>'); - IMD_USED_OF(fsl_tqmls1046a_mbls10xxa); - fsl_ddr_set_memctl_regs(&ddrc[0], 0); ls1046a_errata_post_ddr(); diff --git a/arch/arm/boards/variscite-dt8mcustomboard-imx8mp/lowlevel.c b/arch/arm/boards/variscite-dt8mcustomboard-imx8mp/lowlevel.c index cf040069b4..92325fd20e 100644 --- a/arch/arm/boards/variscite-dt8mcustomboard-imx8mp/lowlevel.c +++ b/arch/arm/boards/variscite-dt8mcustomboard-imx8mp/lowlevel.c @@ -5,7 +5,6 @@ #include <debug_ll.h> #include <mach/imx/debug_ll.h> #include <firmware.h> -#include <image-metadata.h> #include <asm/mmu.h> #include <asm/cache.h> #include <asm/sections.h> @@ -131,7 +130,5 @@ ENTRY_FUNCTION(start_variscite_imx8mp_dart, r0, r1, r2) relocate_to_current_adr(); setup_c(); - IMD_USED_OF(imx8mp_var_dart_dt8mcustomboard); - variscite_imx8mp_dart_cb_start(); } diff --git a/arch/arm/boards/zii-imx8mq-dev/lowlevel.c b/arch/arm/boards/zii-imx8mq-dev/lowlevel.c index 1655a1e55b..d8c429d195 100644 --- a/arch/arm/boards/zii-imx8mq-dev/lowlevel.c +++ b/arch/arm/boards/zii-imx8mq-dev/lowlevel.c @@ -6,7 +6,6 @@ #include <common.h> #include <firmware.h> -#include <image-metadata.h> #include <linux/sizes.h> #include <mach/imx/generic.h> #include <asm/barebox-arm-head.h> @@ -202,8 +201,5 @@ ENTRY_FUNCTION(start_zii_imx8mq_dev, r0, r1, r2) relocate_to_current_adr(); setup_c(); - IMD_USED_OF(imx8mq_zii_ultra_rmb3); - IMD_USED_OF(imx8mq_zii_ultra_zest); - zii_imx8mq_dev_start(); } diff --git a/arch/arm/configs/am335x_mlo_defconfig b/arch/arm/configs/am335x_mlo_defconfig index f2b722056b..1ceb996187 100644 --- a/arch/arm/configs/am335x_mlo_defconfig +++ b/arch/arm/configs/am335x_mlo_defconfig @@ -1,5 +1,4 @@ CONFIG_ARCH_OMAP_SINGLE=y -CONFIG_BAREBOX_MAX_IMAGE_SIZE=0x1b400 CONFIG_OMAP_BUILD_IFT=y CONFIG_OMAP_SERIALBOOT=y CONFIG_OMAP_MULTI_BOARDS=y @@ -11,6 +10,7 @@ CONFIG_THUMB2_BAREBOX=y # CONFIG_MEMINFO is not set CONFIG_IMAGE_COMPRESSION_XZKERN=y CONFIG_MMU=y +CONFIG_BAREBOX_MAX_IMAGE_SIZE=0x1b400 CONFIG_MALLOC_SIZE=0x0 CONFIG_MALLOC_TLSF=y CONFIG_RELOCATABLE=y diff --git a/arch/arm/configs/am35xx_pfc200_xload_defconfig b/arch/arm/configs/am35xx_pfc200_xload_defconfig index 4bc119f75b..73888fd7b4 100644 --- a/arch/arm/configs/am35xx_pfc200_xload_defconfig +++ b/arch/arm/configs/am35xx_pfc200_xload_defconfig @@ -22,11 +22,6 @@ CONFIG_MTD=y # CONFIG_MTD_WRITE is not set # CONFIG_MTD_OOB_DEVICE is not set CONFIG_NAND=y -# CONFIG_NAND_ECC_SOFT is not set -# CONFIG_NAND_ECC_HW_SYNDROME is not set -# CONFIG_NAND_ECC_HW_NONE is not set -# CONFIG_NAND_INFO is not set -# CONFIG_NAND_BBT is not set CONFIG_NAND_OMAP_GPMC=y CONFIG_MCI=y CONFIG_MCI_STARTUP=y diff --git a/arch/arm/configs/animeo_ip_defconfig b/arch/arm/configs/animeo_ip_defconfig index 9005d65e22..930f19ddb5 100644 --- a/arch/arm/configs/animeo_ip_defconfig +++ b/arch/arm/configs/animeo_ip_defconfig @@ -1,15 +1,13 @@ CONFIG_ARCH_AT91=y CONFIG_ARCH_AT91SAM9260=y -CONFIG_BAREBOX_MAX_IMAGE_SIZE=0x40000 CONFIG_AEABI=y CONFIG_ARM_OPTIMZED_STRING_FUNCTIONS=y -CONFIG_PBL_IMAGE=y CONFIG_MMU=y +CONFIG_BAREBOX_MAX_IMAGE_SIZE=0x40000 CONFIG_EXPERIMENTAL=y CONFIG_MALLOC_TLSF=y CONFIG_PROMPT="Animeo-IP:" CONFIG_BAUDRATE=38400 -CONFIG_GLOB=y CONFIG_PROMPT_HUSH_PS2="y" CONFIG_HUSH_FANCY_PROMPT=y CONFIG_CMDLINE_EDITING=y @@ -58,9 +56,6 @@ CONFIG_NET_USB_ASIX=y CONFIG_MTD=y # CONFIG_MTD_OOB_DEVICE is not set CONFIG_NAND=y -# CONFIG_NAND_ECC_HW is not set -# CONFIG_NAND_ECC_HW_SYNDROME is not set -# CONFIG_NAND_ECC_HW_NONE is not set CONFIG_NAND_ATMEL=y CONFIG_USB_HOST=y CONFIG_MCI=y diff --git a/arch/arm/configs/archosg9_xload_defconfig b/arch/arm/configs/archosg9_xload_defconfig index f90757d954..fd475d65ca 100644 --- a/arch/arm/configs/archosg9_xload_defconfig +++ b/arch/arm/configs/archosg9_xload_defconfig @@ -1,6 +1,5 @@ CONFIG_TEXT_BASE=0x40300000 CONFIG_ARCH_OMAP_SINGLE=y -CONFIG_BAREBOX_MAX_IMAGE_SIZE=0xC000 # CONFIG_OMAP_GPMC is not set CONFIG_OMAP_BUILD_IFT=y CONFIG_OMAP4_USBBOOT=y @@ -8,6 +7,7 @@ CONFIG_MACH_ARCHOSG9=y CONFIG_THUMB2_BAREBOX=y # CONFIG_BANNER is not set # CONFIG_MEMINFO is not set +CONFIG_BAREBOX_MAX_IMAGE_SIZE=0xC000 CONFIG_MALLOC_SIZE=0x2000000 CONFIG_SHELL_NONE=y # CONFIG_ERRNO_MESSAGES is not set diff --git a/arch/arm/configs/at91_multi_defconfig b/arch/arm/configs/at91_multi_defconfig index 151f9a7069..c93c2f5786 100644 --- a/arch/arm/configs/at91_multi_defconfig +++ b/arch/arm/configs/at91_multi_defconfig @@ -98,7 +98,6 @@ CONFIG_I2C_AT91=y CONFIG_MTD=y CONFIG_NAND=y CONFIG_NAND_ATMEL=y -CONFIG_NAND_ATMEL_PMECC=y CONFIG_MTD_UBI=y CONFIG_MTD_UBI_FASTMAP=y CONFIG_USB_HOST=y diff --git a/arch/arm/configs/at91rm9200ek_defconfig b/arch/arm/configs/at91rm9200ek_defconfig index fa6130e8ee..aa91c0cda6 100644 --- a/arch/arm/configs/at91rm9200ek_defconfig +++ b/arch/arm/configs/at91rm9200ek_defconfig @@ -5,7 +5,6 @@ CONFIG_BAREBOX_MAX_IMAGE_SIZE=0x40000 CONFIG_EXPERIMENTAL=y CONFIG_MALLOC_TLSF=y CONFIG_PROMPT="9200-EK:" -CONFIG_GLOB=y CONFIG_HUSH_FANCY_PROMPT=y CONFIG_CMDLINE_EDITING=y CONFIG_AUTO_COMPLETE=y diff --git a/arch/arm/configs/at91sam9260ek_defconfig b/arch/arm/configs/at91sam9260ek_defconfig index e39be7953a..b4a291ed57 100644 --- a/arch/arm/configs/at91sam9260ek_defconfig +++ b/arch/arm/configs/at91sam9260ek_defconfig @@ -1,14 +1,12 @@ CONFIG_ARCH_AT91=y CONFIG_ARCH_AT91SAM9260=y CONFIG_MACH_AT91SAM9260EK=y -CONFIG_BAREBOX_MAX_IMAGE_SIZE=0x40000 CONFIG_AEABI=y CONFIG_ARM_OPTIMZED_STRING_FUNCTIONS=y -CONFIG_PBL_IMAGE=y CONFIG_MMU=y +CONFIG_BAREBOX_MAX_IMAGE_SIZE=0x40000 CONFIG_EXPERIMENTAL=y CONFIG_PROMPT="9260-EK:" -CONFIG_GLOB=y CONFIG_PROMPT_HUSH_PS2="y" CONFIG_HUSH_FANCY_PROMPT=y CONFIG_CMDLINE_EDITING=y @@ -52,9 +50,6 @@ CONFIG_DRIVER_NET_MACB=y CONFIG_MTD=y # CONFIG_MTD_OOB_DEVICE is not set CONFIG_NAND=y -# CONFIG_NAND_ECC_HW is not set -# CONFIG_NAND_ECC_HW_SYNDROME is not set -# CONFIG_NAND_ECC_HW_NONE is not set CONFIG_NAND_ATMEL=y CONFIG_USB_GADGET=y CONFIG_USB_GADGET_DFU=y diff --git a/arch/arm/configs/at91sam9261ek_bootstrap_defconfig b/arch/arm/configs/at91sam9261ek_bootstrap_defconfig index 61ead6282b..3811594b1a 100644 --- a/arch/arm/configs/at91sam9261ek_bootstrap_defconfig +++ b/arch/arm/configs/at91sam9261ek_bootstrap_defconfig @@ -1,11 +1,10 @@ CONFIG_ARCH_AT91=y CONFIG_ARCH_AT91SAM9261=y CONFIG_AT91_BOOTSTRAP=y -CONFIG_BAREBOX_MAX_IMAGE_SIZE=0x27000 CONFIG_AEABI=y CONFIG_ARM_OPTIMZED_STRING_FUNCTIONS=y -CONFIG_PBL_IMAGE=y CONFIG_MMU=y +CONFIG_BAREBOX_MAX_IMAGE_SIZE=0x27000 CONFIG_MALLOC_DUMMY=y CONFIG_PROMPT="9261-EK:" CONFIG_SHELL_NONE=y @@ -16,9 +15,6 @@ CONFIG_MTD=y # CONFIG_MTD_WRITE is not set # CONFIG_MTD_OOB_DEVICE is not set CONFIG_NAND=y -# CONFIG_NAND_ECC_HW is not set -# CONFIG_NAND_ECC_HW_SYNDROME is not set -# CONFIG_NAND_ECC_HW_NONE is not set CONFIG_NAND_ATMEL=y # CONFIG_FS_RAMFS is not set CONFIG_BOOTSTRAP_DEVFS=y diff --git a/arch/arm/configs/at91sam9261ek_defconfig b/arch/arm/configs/at91sam9261ek_defconfig index 430eca553c..cf8c74de9e 100644 --- a/arch/arm/configs/at91sam9261ek_defconfig +++ b/arch/arm/configs/at91sam9261ek_defconfig @@ -1,14 +1,12 @@ CONFIG_ARCH_AT91=y CONFIG_ARCH_AT91SAM9261=y -CONFIG_BAREBOX_MAX_IMAGE_SIZE=0x40000 CONFIG_AEABI=y CONFIG_ARM_OPTIMZED_STRING_FUNCTIONS=y -CONFIG_PBL_IMAGE=y CONFIG_MMU=y +CONFIG_BAREBOX_MAX_IMAGE_SIZE=0x40000 CONFIG_EXPERIMENTAL=y CONFIG_MALLOC_TLSF=y CONFIG_PROMPT="9261-EK:" -CONFIG_GLOB=y CONFIG_HUSH_FANCY_PROMPT=y CONFIG_CMDLINE_EDITING=y CONFIG_AUTO_COMPLETE=y @@ -55,9 +53,6 @@ CONFIG_MTD=y # CONFIG_MTD_OOB_DEVICE is not set CONFIG_MTD_DATAFLASH=y CONFIG_NAND=y -# CONFIG_NAND_ECC_HW is not set -# CONFIG_NAND_ECC_HW_SYNDROME is not set -# CONFIG_NAND_ECC_HW_NONE is not set CONFIG_NAND_ATMEL=y CONFIG_USB_GADGET=y CONFIG_USB_GADGET_DFU=y diff --git a/arch/arm/configs/at91sam9261ek_first_stage_defconfig b/arch/arm/configs/at91sam9261ek_first_stage_defconfig index b05cff14e1..8e6065de34 100644 --- a/arch/arm/configs/at91sam9261ek_first_stage_defconfig +++ b/arch/arm/configs/at91sam9261ek_first_stage_defconfig @@ -1,15 +1,13 @@ CONFIG_ARCH_AT91=y CONFIG_ARCH_AT91SAM9261=y CONFIG_AT91_LOAD_BAREBOX_SRAM=y -CONFIG_BAREBOX_MAX_IMAGE_SIZE=0x27000 CONFIG_AEABI=y CONFIG_ARM_OPTIMZED_STRING_FUNCTIONS=y -CONFIG_PBL_IMAGE=y CONFIG_MMU=y +CONFIG_BAREBOX_MAX_IMAGE_SIZE=0x27000 CONFIG_EXPERIMENTAL=y CONFIG_MALLOC_TLSF=y CONFIG_PROMPT="9261-EK:" -CONFIG_GLOB=y CONFIG_HUSH_FANCY_PROMPT=y CONFIG_CMDLINE_EDITING=y CONFIG_AUTO_COMPLETE=y @@ -56,9 +54,6 @@ CONFIG_MTD=y # CONFIG_MTD_OOB_DEVICE is not set CONFIG_MTD_DATAFLASH=y CONFIG_NAND=y -# CONFIG_NAND_ECC_HW is not set -# CONFIG_NAND_ECC_HW_SYNDROME is not set -# CONFIG_NAND_ECC_HW_NONE is not set CONFIG_NAND_ATMEL=y CONFIG_USB_GADGET=y CONFIG_USB_GADGET_DFU=y diff --git a/arch/arm/configs/at91sam9g10ek_defconfig b/arch/arm/configs/at91sam9g10ek_defconfig index 3db3993419..4672efdc57 100644 --- a/arch/arm/configs/at91sam9g10ek_defconfig +++ b/arch/arm/configs/at91sam9g10ek_defconfig @@ -1,14 +1,12 @@ CONFIG_ARCH_AT91=y CONFIG_ARCH_AT91SAM9G10=y -CONFIG_BAREBOX_MAX_IMAGE_SIZE=0x40000 CONFIG_AEABI=y CONFIG_ARM_OPTIMZED_STRING_FUNCTIONS=y -CONFIG_PBL_IMAGE=y CONFIG_MMU=y +CONFIG_BAREBOX_MAX_IMAGE_SIZE=0x40000 CONFIG_EXPERIMENTAL=y CONFIG_MALLOC_TLSF=y CONFIG_PROMPT="9G10-EK:" -CONFIG_GLOB=y CONFIG_HUSH_FANCY_PROMPT=y CONFIG_CMDLINE_EDITING=y CONFIG_AUTO_COMPLETE=y @@ -53,9 +51,6 @@ CONFIG_DRIVER_NET_DM9K=y CONFIG_MTD=y # CONFIG_MTD_OOB_DEVICE is not set CONFIG_NAND=y -# CONFIG_NAND_ECC_HW is not set -# CONFIG_NAND_ECC_HW_SYNDROME is not set -# CONFIG_NAND_ECC_HW_NONE is not set CONFIG_NAND_ATMEL=y CONFIG_USB_GADGET=y CONFIG_USB_GADGET_DFU=y diff --git a/arch/arm/configs/at91sam9g20ek_defconfig b/arch/arm/configs/at91sam9g20ek_defconfig index 70f42078d9..b102d26414 100644 --- a/arch/arm/configs/at91sam9g20ek_defconfig +++ b/arch/arm/configs/at91sam9g20ek_defconfig @@ -1,14 +1,12 @@ CONFIG_ARCH_AT91=y CONFIG_ARCH_AT91SAM9G20=y CONFIG_AT91_HAVE_2MMC=y -CONFIG_BAREBOX_MAX_IMAGE_SIZE=0x40000 CONFIG_AEABI=y CONFIG_ARM_OPTIMZED_STRING_FUNCTIONS=y -CONFIG_PBL_IMAGE=y CONFIG_MMU=y +CONFIG_BAREBOX_MAX_IMAGE_SIZE=0x40000 CONFIG_EXPERIMENTAL=y CONFIG_PROMPT="9G20-EK:" -CONFIG_GLOB=y CONFIG_PROMPT_HUSH_PS2="y" CONFIG_HUSH_FANCY_PROMPT=y CONFIG_CMDLINE_EDITING=y @@ -52,9 +50,6 @@ CONFIG_DRIVER_NET_MACB=y CONFIG_MTD=y # CONFIG_MTD_OOB_DEVICE is not set CONFIG_NAND=y -# CONFIG_NAND_ECC_HW is not set -# CONFIG_NAND_ECC_HW_SYNDROME is not set -# CONFIG_NAND_ECC_HW_NONE is not set CONFIG_NAND_ATMEL=y CONFIG_USB_GADGET=y CONFIG_USB_GADGET_DFU=y diff --git a/arch/arm/configs/at91sam9m10g45ek_defconfig b/arch/arm/configs/at91sam9m10g45ek_defconfig index cf473ff488..9cc66d4e77 100644 --- a/arch/arm/configs/at91sam9m10g45ek_defconfig +++ b/arch/arm/configs/at91sam9m10g45ek_defconfig @@ -1,15 +1,13 @@ CONFIG_ARCH_AT91=y CONFIG_ARCH_AT91SAM9G45=y CONFIG_MACH_AT91SAM9M10G45EK=y -CONFIG_BAREBOX_MAX_IMAGE_SIZE=0x40000 CONFIG_AEABI=y CONFIG_ARM_OPTIMZED_STRING_FUNCTIONS=y -CONFIG_PBL_IMAGE=y CONFIG_MMU=y +CONFIG_BAREBOX_MAX_IMAGE_SIZE=0x40000 CONFIG_MALLOC_SIZE=0x800000 CONFIG_MALLOC_TLSF=y CONFIG_PROMPT="9M10G45-EK:" -CONFIG_GLOB=y CONFIG_PROMPT_HUSH_PS2=">" CONFIG_HUSH_FANCY_PROMPT=y CONFIG_CMDLINE_EDITING=y @@ -67,9 +65,6 @@ CONFIG_MTD=y # CONFIG_MTD_OOB_DEVICE is not set CONFIG_MTD_DATAFLASH=y CONFIG_NAND=y -# CONFIG_NAND_ECC_HW is not set -# CONFIG_NAND_ECC_HW_SYNDROME is not set -# CONFIG_NAND_ECC_HW_NONE is not set CONFIG_NAND_ATMEL=y CONFIG_USB_HOST=y CONFIG_USB_EHCI=y diff --git a/arch/arm/configs/at91sam9m10ihd_defconfig b/arch/arm/configs/at91sam9m10ihd_defconfig index 9507e36223..6428274318 100644 --- a/arch/arm/configs/at91sam9m10ihd_defconfig +++ b/arch/arm/configs/at91sam9m10ihd_defconfig @@ -1,10 +1,9 @@ CONFIG_ARCH_AT91=y CONFIG_ARCH_AT91SAM9G45=y -CONFIG_BAREBOX_MAX_IMAGE_SIZE=0x40000 CONFIG_AEABI=y CONFIG_ARM_OPTIMZED_STRING_FUNCTIONS=y -CONFIG_PBL_IMAGE=y CONFIG_MMU=y +CONFIG_BAREBOX_MAX_IMAGE_SIZE=0x40000 CONFIG_MALLOC_SIZE=0xa00000 CONFIG_MALLOC_TLSF=y CONFIG_PROMPT="9M10IHD:" @@ -68,9 +67,6 @@ CONFIG_MTD=y # CONFIG_MTD_OOB_DEVICE is not set CONFIG_MTD_M25P80=y CONFIG_NAND=y -# CONFIG_NAND_ECC_HW is not set -# CONFIG_NAND_ECC_HW_SYNDROME is not set -# CONFIG_NAND_ECC_HW_NONE is not set CONFIG_NAND_ATMEL=y CONFIG_USB_HOST=y CONFIG_USB_EHCI=y diff --git a/arch/arm/configs/at91sam9n12ek_defconfig b/arch/arm/configs/at91sam9n12ek_defconfig index 3b58ac1101..813934a116 100644 --- a/arch/arm/configs/at91sam9n12ek_defconfig +++ b/arch/arm/configs/at91sam9n12ek_defconfig @@ -1,12 +1,11 @@ CONFIG_TEXT_BASE=0x26f00000 CONFIG_ARCH_AT91=y CONFIG_ARCH_AT91SAM9N12=y -CONFIG_BAREBOX_MAX_IMAGE_SIZE=0x40000 CONFIG_AEABI=y CONFIG_ARM_OPTIMZED_STRING_FUNCTIONS=y -CONFIG_PBL_IMAGE=y CONFIG_IMAGE_COMPRESSION_XZKERN=y CONFIG_MMU=y +CONFIG_BAREBOX_MAX_IMAGE_SIZE=0x40000 CONFIG_MALLOC_SIZE=0xa00000 CONFIG_EXPERIMENTAL=y CONFIG_MALLOC_TLSF=y diff --git a/arch/arm/configs/canon-a1100_defconfig b/arch/arm/configs/canon-a1100_defconfig index 12a3f0af95..53348f6e8a 100644 --- a/arch/arm/configs/canon-a1100_defconfig +++ b/arch/arm/configs/canon-a1100_defconfig @@ -2,10 +2,8 @@ CONFIG_TEXT_BASE=0x00300000 CONFIG_ARCH_DIGIC=y CONFIG_ARM_OPTIMZED_STRING_FUNCTIONS=y CONFIG_PBL_IMAGE=y -CONFIG_IMAGE_COMPRESSION_LZ4=y CONFIG_MALLOC_SIZE=0x200000 CONFIG_PROMPT="canon-a1100 > " -CONFIG_GLOB=y CONFIG_HUSH_FANCY_PROMPT=y CONFIG_CMDLINE_EDITING=y CONFIG_AUTO_COMPLETE=y diff --git a/arch/arm/configs/clps711x_defconfig b/arch/arm/configs/clps711x_defconfig index 684ae79e22..3a2d8b5a05 100644 --- a/arch/arm/configs/clps711x_defconfig +++ b/arch/arm/configs/clps711x_defconfig @@ -10,7 +10,6 @@ CONFIG_CMDLINE_EDITING=y CONFIG_AUTO_COMPLETE=y CONFIG_BOOTM_SHOW_TYPE=y CONFIG_BOOTM_INITRD=y -CONFIG_DEFAULT_COMPRESSION_LZO=y CONFIG_DEFAULT_ENVIRONMENT_GENERIC_NEW=y CONFIG_CMD_IOMEM=y # CONFIG_CMD_BOOTU is not set diff --git a/arch/arm/configs/dss11_defconfig b/arch/arm/configs/dss11_defconfig index e057e7d6a9..fe2680e431 100644 --- a/arch/arm/configs/dss11_defconfig +++ b/arch/arm/configs/dss11_defconfig @@ -25,8 +25,6 @@ CONFIG_DRIVER_NET_MACB=y CONFIG_DRIVER_SPI_ATMEL=y CONFIG_MTD=y CONFIG_NAND=y -# CONFIG_NAND_ECC_HW_SYNDROME is not set -# CONFIG_NAND_ECC_HW_NONE is not set CONFIG_NAND_ATMEL=y CONFIG_DISK_WRITE=y CONFIG_USB_HOST=y diff --git a/arch/arm/configs/edb93xx_defconfig b/arch/arm/configs/edb93xx_defconfig index 84c920aa97..0632be1945 100644 --- a/arch/arm/configs/edb93xx_defconfig +++ b/arch/arm/configs/edb93xx_defconfig @@ -1,7 +1,6 @@ CONFIG_ARCH_EP93XX=y CONFIG_AEABI=y CONFIG_ARM_OPTIMZED_STRING_FUNCTIONS=y -CONFIG_GLOB=y CONFIG_CMDLINE_EDITING=y CONFIG_AUTO_COMPLETE=y CONFIG_PARTITION=y diff --git a/arch/arm/configs/freescale-mx21-ads_defconfig b/arch/arm/configs/freescale-mx21-ads_defconfig deleted file mode 100644 index b1d37f76a8..0000000000 --- a/arch/arm/configs/freescale-mx21-ads_defconfig +++ /dev/null @@ -1,38 +0,0 @@ -CONFIG_TEXT_BASE=0xc3000000 -CONFIG_ARCH_IMX=y -CONFIG_ARM_OPTIMZED_STRING_FUNCTIONS=y -CONFIG_MALLOC_SIZE=0x2000000 -CONFIG_CMDLINE_EDITING=y -CONFIG_AUTO_COMPLETE=y -CONFIG_BOOTM_SHOW_TYPE=y -CONFIG_PARTITION=y -CONFIG_DEFAULT_ENVIRONMENT_PATH="arch/arm/boards/freescale-mx21-ads/env" -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_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_CMD_GPIO=y -CONFIG_NET=y -CONFIG_NET_NFS=y -CONFIG_DRIVER_NET_CS8900=y -# CONFIG_SPI is not set -CONFIG_MTD=y -CONFIG_DRIVER_CFI=y -# CONFIG_DRIVER_CFI_INTEL is not set -CONFIG_CFI_BUFFER_WRITE=y -CONFIG_NAND=y -CONFIG_NAND_IMX=y -CONFIG_FS_TFTP=y diff --git a/arch/arm/configs/haba_knx_lite_defconfig b/arch/arm/configs/haba_knx_lite_defconfig index 7222fd312e..a72359931d 100644 --- a/arch/arm/configs/haba_knx_lite_defconfig +++ b/arch/arm/configs/haba_knx_lite_defconfig @@ -2,15 +2,13 @@ CONFIG_TEXT_BASE=0x27f00000 CONFIG_ARCH_AT91=y CONFIG_ARCH_AT91SAM9G20=y CONFIG_MACH_HABA_KNX_LITE=y -CONFIG_BAREBOX_MAX_IMAGE_SIZE=0x40000 CONFIG_AEABI=y CONFIG_ARM_OPTIMZED_STRING_FUNCTIONS=y -CONFIG_PBL_IMAGE=y CONFIG_MMU=y +CONFIG_BAREBOX_MAX_IMAGE_SIZE=0x40000 CONFIG_EXPERIMENTAL=y CONFIG_MALLOC_TLSF=y CONFIG_PROMPT="HABA-KNX-LITE:" -CONFIG_GLOB=y CONFIG_PROMPT_HUSH_PS2="y" CONFIG_HUSH_FANCY_PROMPT=y CONFIG_CMDLINE_EDITING=y @@ -64,9 +62,6 @@ CONFIG_MTD=y # CONFIG_MTD_OOB_DEVICE is not set CONFIG_MTD_M25P80=y CONFIG_NAND=y -# CONFIG_NAND_ECC_HW is not set -# CONFIG_NAND_ECC_HW_SYNDROME is not set -# CONFIG_NAND_ECC_HW_NONE is not set CONFIG_NAND_ATMEL=y CONFIG_MTD_UBI=y CONFIG_USB_GADGET=y diff --git a/arch/arm/configs/imx28_defconfig b/arch/arm/configs/imx28_defconfig index beb0bc2f76..8e66983e35 100644 --- a/arch/arm/configs/imx28_defconfig +++ b/arch/arm/configs/imx28_defconfig @@ -92,7 +92,6 @@ CONFIG_NET_USB_ASIX=y CONFIG_USB_NET_AX88179_178A=y CONFIG_NET_USB_SMSC95XX=y CONFIG_DRIVER_SPI_MXS=y -CONFIG_I2C=y CONFIG_MTD=y CONFIG_NAND=y CONFIG_NAND_MXS=y diff --git a/arch/arm/configs/imx_defconfig b/arch/arm/configs/imx_defconfig index e6333220b6..4813b4d4ce 100644 --- a/arch/arm/configs/imx_defconfig +++ b/arch/arm/configs/imx_defconfig @@ -1,5 +1,4 @@ CONFIG_ARCH_IMX=y -CONFIG_IMX_MULTI_BOARDS=y CONFIG_MACH_SCB9328=y CONFIG_MACH_TX25=y CONFIG_MACH_PCA100=y @@ -85,8 +84,6 @@ CONFIG_MTD_RAW_DEVICE=y CONFIG_DRIVER_CFI=y CONFIG_CFI_BUFFER_WRITE=y CONFIG_NAND=y -# CONFIG_NAND_ECC_SOFT is not set -# CONFIG_NAND_ECC_HW_SYNDROME is not set CONFIG_NAND_ALLOW_ERASE_BAD=y CONFIG_NAND_IMX=y CONFIG_MTD_UBI=y diff --git a/arch/arm/configs/imx_v7_defconfig b/arch/arm/configs/imx_v7_defconfig index f8deca324a..3af6526376 100644 --- a/arch/arm/configs/imx_v7_defconfig +++ b/arch/arm/configs/imx_v7_defconfig @@ -1,58 +1,57 @@ CONFIG_ARCH_IMX=y -CONFIG_IMX_MULTI_BOARDS=y CONFIG_MACH_KINDLE_MX50=y CONFIG_MACH_CCMX51=y CONFIG_MACH_EFIKA_MX_SMARTBOOK=y -CONFIG_MACH_EMBEDSKY_E9=y CONFIG_MACH_FREESCALE_MX51_PDK=y CONFIG_MACH_CCMX53=y CONFIG_MACH_FREESCALE_MX53_LOCO=y CONFIG_MACH_GUF_VINCELL=y +CONFIG_MACH_TX53=y CONFIG_MACH_TQMA53=y CONFIG_MACH_FREESCALE_MX53_VMX53=y -CONFIG_MACH_TX53=y -CONFIG_MACH_PHYTEC_SOM_IMX6=y -CONFIG_MACH_PROTONIC_IMX6=y -CONFIG_MACH_KONTRON_SAMX6I=y -CONFIG_MACH_DFI_FS700_M60=y -CONFIG_MACH_GUF_SANTARO=y +CONFIG_MACH_ZII_RDU1=y +CONFIG_MACH_ADVANTECH_ROM_742X=y +CONFIG_MACH_NITROGEN6=y +CONFIG_MACH_CM_FX6=y CONFIG_MACH_REALQ7=y -CONFIG_MACH_GK802=y +CONFIG_MACH_DFI_FS700_M60=y +CONFIG_MACH_DIGI_CCIMX6ULSBCPRO=y CONFIG_MACH_ELTEC_HIPERCAM=y -CONFIG_MACH_TQMA6X=y -CONFIG_MACH_TX6X=y +CONFIG_MACH_EMBEDSKY_E9=y +CONFIG_MACH_EMBEST_MARSBOARD=y +CONFIG_MACH_EMBEST_RIOTBOARD=y CONFIG_MACH_SABRELITE=y CONFIG_MACH_SABRESD=y CONFIG_MACH_FREESCALE_IMX6SX_SABRESDB=y -CONFIG_MACH_NITROGEN6=y +CONFIG_MACH_UDOO=y +CONFIG_MACH_UDOO_NEO=y +CONFIG_MACH_GUF_SANTARO=y +CONFIG_MACH_GW_VENTANA=y +CONFIG_MACH_GRINN_LITEBOARD=y +CONFIG_MACH_TX6X=y +CONFIG_MACH_KONTRON_SAMX6I=y CONFIG_MACH_NOVENA=y +CONFIG_MACH_NXP_IMX6ULL_EVK=y +CONFIG_MACH_PHYTEC_SOM_IMX6=y +CONFIG_MACH_PROTONIC_IMX6=y +CONFIG_MACH_SKOV_IMX6=y CONFIG_MACH_SOLIDRUN_MICROSOM=y CONFIG_MACH_TECHNEXION_PICO_HOBBIT=y CONFIG_MACH_TECHNEXION_WANDBOARD=y -CONFIG_MACH_EMBEST_MARSBOARD=y -CONFIG_MACH_EMBEST_RIOTBOARD=y -CONFIG_MACH_UDOO=y -CONFIG_MACH_UDOO_NEO=y +CONFIG_MACH_TQMA6X=y CONFIG_MACH_VARISCITE_MX6=y -CONFIG_MACH_GW_VENTANA=y -CONFIG_MACH_CM_FX6=y -CONFIG_MACH_ADVANTECH_ROM_742X=y -CONFIG_MACH_WARP7=y -CONFIG_MACH_AC_SXB=y -CONFIG_MACH_MEERKAT96=y -CONFIG_MACH_VF610_TWR=y -CONFIG_MACH_ZII_RDU1=y +CONFIG_MACH_WEBASTO_CCBV2=y +CONFIG_MACH_GK802=y CONFIG_MACH_ZII_RDU2=y -CONFIG_MACH_ZII_VF610_DEV=y -CONFIG_MACH_ZII_IMX7D_DEV=y -CONFIG_MACH_PHYTEC_PHYCORE_IMX7=y +CONFIG_MACH_MEERKAT96=y +CONFIG_MACH_AC_SXB=y +CONFIG_MACH_WARP7=y CONFIG_MACH_FREESCALE_MX7_SABRESD=y +CONFIG_MACH_PHYTEC_PHYCORE_IMX7=y +CONFIG_MACH_ZII_IMX7D_DEV=y CONFIG_MACH_KAMSTRUP_MX7_CONCENTRATOR=y -CONFIG_MACH_NXP_IMX6ULL_EVK=y -CONFIG_MACH_GRINN_LITEBOARD=y -CONFIG_MACH_DIGI_CCIMX6ULSBCPRO=y -CONFIG_MACH_WEBASTO_CCBV2=y -CONFIG_MACH_SKOV_IMX6=y +CONFIG_MACH_VF610_TWR=y +CONFIG_MACH_ZII_VF610_DEV=y CONFIG_IMX_IIM_FUSE_BLOW=y CONFIG_THUMB2_BAREBOX=y CONFIG_ARM_OPTIMZED_STRING_FUNCTIONS=y @@ -152,7 +151,6 @@ CONFIG_NET=y CONFIG_NET_NETCONSOLE=y CONFIG_OF_BAREBOX_DRIVERS=y CONFIG_DRIVER_NET_FEC_IMX=y -CONFIG_AT803X_PHY=y CONFIG_MICREL_PHY=y CONFIG_MDIO_BITBANG=y CONFIG_MDIO_GPIO=y diff --git a/arch/arm/configs/imx_v8_defconfig b/arch/arm/configs/imx_v8_defconfig index 104863f05f..93b85ff5ea 100644 --- a/arch/arm/configs/imx_v8_defconfig +++ b/arch/arm/configs/imx_v8_defconfig @@ -1,16 +1,15 @@ CONFIG_ARCH_IMX=y -CONFIG_IMX_MULTI_BOARDS=y -CONFIG_MACH_PROTONIC_IMX8M=y CONFIG_MACH_INNOCOMM_WB15=y -CONFIG_MACH_ZII_IMX8MQ_DEV=y CONFIG_MACH_NXP_IMX8MM_EVK=y CONFIG_MACH_NXP_IMX8MN_EVK=y CONFIG_MACH_NXP_IMX8MP_EVK=y CONFIG_MACH_NXP_IMX8MQ_EVK=y CONFIG_MACH_PHYTEC_SOM_IMX8MQ=y -CONFIG_MACH_TQ_MBA8MPXL=y CONFIG_MACH_POLYHEX_DEBIX=y +CONFIG_MACH_PROTONIC_IMX8M=y +CONFIG_MACH_TQ_MBA8MPXL=y CONFIG_MACH_VARISCITE_DT8MCUSTOMBOARD_IMX8MP=y +CONFIG_MACH_ZII_IMX8MQ_DEV=y CONFIG_64BIT=y CONFIG_ARM_OPTIMZED_STRING_FUNCTIONS=y CONFIG_MMU=y @@ -94,7 +93,6 @@ CONFIG_OF_BAREBOX_DRIVERS=y CONFIG_SERIAL_DEV_BUS=y CONFIG_DRIVER_NET_DESIGNWARE_IMX8=y CONFIG_DRIVER_NET_FEC_IMX=y -CONFIG_AT803X_PHY=y CONFIG_DP83867_PHY=y CONFIG_MICREL_PHY=y CONFIG_REALTEK_PHY=y diff --git a/arch/arm/configs/kindle-mx50_defconfig b/arch/arm/configs/kindle-mx50_defconfig index 95fafd56e6..1ceef8088a 100644 --- a/arch/arm/configs/kindle-mx50_defconfig +++ b/arch/arm/configs/kindle-mx50_defconfig @@ -1,5 +1,4 @@ CONFIG_ARCH_IMX=y -CONFIG_IMX_MULTI_BOARDS=y CONFIG_MACH_KINDLE_MX50=y CONFIG_THUMB2_BAREBOX=y CONFIG_ARM_OPTIMZED_STRING_FUNCTIONS=y diff --git a/arch/arm/configs/layerscape_defconfig b/arch/arm/configs/layerscape_defconfig index fb8e885353..35b254f139 100644 --- a/arch/arm/configs/layerscape_defconfig +++ b/arch/arm/configs/layerscape_defconfig @@ -2,6 +2,7 @@ CONFIG_ARCH_LAYERSCAPE=y CONFIG_ARCH_LAYERSCAPE_PPA=y CONFIG_MACH_LS1046ARDB=y CONFIG_MACH_TQMLS1046A=y +CONFIG_64BIT=y CONFIG_MMU=y CONFIG_MALLOC_SIZE=0x0 CONFIG_MALLOC_TLSF=y @@ -34,10 +35,7 @@ CONFIG_CMD_GO=y CONFIG_CMD_RESET=y CONFIG_CMD_UIMAGE=y CONFIG_CMD_PARTITION=y -CONFIG_CMD_MOUNT=y -CONFIG_CMD_UBI=y CONFIG_CMD_UBIFORMAT=y -CONFIG_CMD_UMOUNT=y CONFIG_CMD_EXPORT=y CONFIG_CMD_LOADENV=y CONFIG_CMD_PRINTENV=y @@ -73,7 +71,6 @@ CONFIG_CMD_GPIO=y CONFIG_CMD_I2C=y CONFIG_CMD_LED=y CONFIG_CMD_SPI=y -CONFIG_CMD_NAND=y CONFIG_CMD_LED_TRIGGER=y CONFIG_CMD_WD=y CONFIG_CMD_BAREBOX_UPDATE=y @@ -90,16 +87,15 @@ CONFIG_DP83867_PHY=y CONFIG_REALTEK_PHY=y CONFIG_NET_DSA_MV88E6XXX=y CONFIG_DRIVER_SPI_FSL_QUADSPI=y -CONFIG_NAND=y -CONFIG_NAND_FSL_IFC=y -CONFIG_MTD_UBI=y -CONFIG_MTD_UBI_BEB_LIMIT=20 CONFIG_I2C=y CONFIG_I2C_IMX=y CONFIG_I2C_MUX=y CONFIG_I2C_MUX_PCA954x=y CONFIG_MTD=y CONFIG_MTD_M25P80=y +CONFIG_NAND=y +CONFIG_NAND_FSL_IFC=y +CONFIG_MTD_UBI=y CONFIG_MCI=y CONFIG_MCI_MMC_BOOT_PARTITIONS=y CONFIG_MCI_IMX_ESDHC=y @@ -124,4 +120,3 @@ CONFIG_FS_FAT_LFN=y CONFIG_FS_UBIFS=y CONFIG_FS_UBIFS_COMPRESSION_LZO=y CONFIG_ZLIB=y -CONFIG_LZO_DECOMPRESS=y diff --git a/arch/arm/configs/layerscape_v7_defconfig b/arch/arm/configs/layerscape_v7_defconfig index 69176738d7..792e9274b2 100644 --- a/arch/arm/configs/layerscape_v7_defconfig +++ b/arch/arm/configs/layerscape_v7_defconfig @@ -29,10 +29,7 @@ CONFIG_CMD_GO=y CONFIG_CMD_RESET=y CONFIG_CMD_UIMAGE=y CONFIG_CMD_PARTITION=y -CONFIG_CMD_MOUNT=y -CONFIG_CMD_UBI=y CONFIG_CMD_UBIFORMAT=y -CONFIG_CMD_UMOUNT=y CONFIG_CMD_EXPORT=y CONFIG_CMD_LOADENV=y CONFIG_CMD_PRINTENV=y @@ -63,9 +60,7 @@ CONFIG_CMD_DETECT=y CONFIG_CMD_FLASH=y CONFIG_CMD_GPIO=y CONFIG_CMD_I2C=y -CONFIG_CMD_LED=y CONFIG_CMD_SPI=y -CONFIG_CMD_LED_TRIGGER=y CONFIG_CMD_BAREBOX_UPDATE=y CONFIG_CMD_OF_NODE=y CONFIG_CMD_OF_PROPERTY=y @@ -74,21 +69,18 @@ CONFIG_CMD_TIME=y CONFIG_OF_BAREBOX_DRIVERS=y CONFIG_DRIVER_SERIAL_NS16550=y CONFIG_DRIVER_SPI_FSL_QUADSPI=y -CONFIG_MTD_UBI=y -CONFIG_MTD_UBI_BEB_LIMIT=20 CONFIG_I2C=y CONFIG_I2C_IMX=y CONFIG_I2C_MUX=y CONFIG_I2C_MUX_PCA954x=y CONFIG_MTD=y CONFIG_MTD_M25P80=y +CONFIG_MTD_UBI=y CONFIG_MCI=y CONFIG_MCI_MMC_BOOT_PARTITIONS=y CONFIG_MCI_IMX_ESDHC=y -CONFIG_LED_PCA955X=y CONFIG_EEPROM_AT25=y CONFIG_EEPROM_AT24=y CONFIG_GPIO_PCA953X=y CONFIG_ZLIB=y CONFIG_LZO_DECOMPRESS=y -CONFIG_FS_TFTP=y diff --git a/arch/arm/configs/lubbock_defconfig b/arch/arm/configs/lubbock_defconfig index a3f988aec9..78f2236648 100644 --- a/arch/arm/configs/lubbock_defconfig +++ b/arch/arm/configs/lubbock_defconfig @@ -1,11 +1,11 @@ CONFIG_ARCH_PXA=y -CONFIG_BAREBOX_MAX_IMAGE_SIZE=0x100000 CONFIG_AEABI=y CONFIG_ARM_BOARD_APPEND_ATAG=y CONFIG_ARM_OPTIMZED_STRING_FUNCTIONS=y CONFIG_ARM_UNWIND=y # CONFIG_BANNER is not set CONFIG_MMU=y +CONFIG_BAREBOX_MAX_IMAGE_SIZE=0x100000 CONFIG_BAREBOX_MAX_BARE_INIT_SIZE=0x80000 CONFIG_MALLOC_SIZE=0x1000000 CONFIG_EXPERIMENTAL=y diff --git a/arch/arm/configs/mainstone_defconfig b/arch/arm/configs/mainstone_defconfig index b685e7fc8d..d452885e6d 100644 --- a/arch/arm/configs/mainstone_defconfig +++ b/arch/arm/configs/mainstone_defconfig @@ -1,5 +1,4 @@ CONFIG_ARCH_PXA=y -CONFIG_BAREBOX_MAX_IMAGE_SIZE=0x100000 CONFIG_ARCH_PXA27X=y CONFIG_AEABI=y CONFIG_ARM_BOARD_APPEND_ATAG=y @@ -7,6 +6,7 @@ CONFIG_ARM_OPTIMZED_STRING_FUNCTIONS=y CONFIG_ARM_UNWIND=y # CONFIG_BANNER is not set CONFIG_MMU=y +CONFIG_BAREBOX_MAX_IMAGE_SIZE=0x100000 CONFIG_BAREBOX_MAX_BARE_INIT_SIZE=0x80000 CONFIG_MALLOC_SIZE=0x1000000 CONFIG_EXPERIMENTAL=y diff --git a/arch/arm/configs/mioa701_defconfig b/arch/arm/configs/mioa701_defconfig index a786d1618e..991fca0d7b 100644 --- a/arch/arm/configs/mioa701_defconfig +++ b/arch/arm/configs/mioa701_defconfig @@ -1,5 +1,4 @@ CONFIG_ARCH_PXA=y -CONFIG_BAREBOX_MAX_IMAGE_SIZE=0x100000 CONFIG_ARCH_PXA27X=y CONFIG_AEABI=y CONFIG_ARM_BOARD_APPEND_ATAG=y @@ -7,12 +6,12 @@ CONFIG_ARM_OPTIMZED_STRING_FUNCTIONS=y CONFIG_ARM_UNWIND=y # CONFIG_BANNER is not set CONFIG_MMU=y +CONFIG_BAREBOX_MAX_IMAGE_SIZE=0x100000 CONFIG_BAREBOX_MAX_BARE_INIT_SIZE=0x80000 CONFIG_MALLOC_SIZE=0x1000000 CONFIG_EXPERIMENTAL=y CONFIG_MODULES=y CONFIG_KALLSYMS=y -CONFIG_GLOB=y CONFIG_HUSH_FANCY_PROMPT=y CONFIG_CMDLINE_EDITING=y CONFIG_AUTO_COMPLETE=y diff --git a/arch/arm/configs/module-mb7707_defconfig b/arch/arm/configs/module-mb7707_defconfig index 9484c39fb8..60be16df74 100644 --- a/arch/arm/configs/module-mb7707_defconfig +++ b/arch/arm/configs/module-mb7707_defconfig @@ -6,7 +6,6 @@ CONFIG_PBL_RELOCATABLE=y CONFIG_MALLOC_TLSF=y CONFIG_PROMPT="MB 77.07: " CONFIG_BAUDRATE=38400 -CONFIG_GLOB=y CONFIG_HUSH_FANCY_PROMPT=y CONFIG_CMDLINE_EDITING=y CONFIG_AUTO_COMPLETE=y diff --git a/arch/arm/configs/mvebu_defconfig b/arch/arm/configs/mvebu_defconfig index c830cf2f09..6a436f3abd 100644 --- a/arch/arm/configs/mvebu_defconfig +++ b/arch/arm/configs/mvebu_defconfig @@ -28,7 +28,6 @@ CONFIG_BOOTM_INITRD=y CONFIG_BOOTM_OFTREE=y CONFIG_BOOTM_OFTREE_UIMAGE=y CONFIG_BLSPEC=y -CONFIG_IMD_TARGET=y CONFIG_CONSOLE_ACTIVATE_NONE=y CONFIG_CONSOLE_ALLOW_COLOR=y CONFIG_PBL_CONSOLE=y @@ -131,3 +130,4 @@ CONFIG_FS_FAT_WRITE=y CONFIG_FS_FAT_LFN=y CONFIG_BZLIB=y CONFIG_LZO_DECOMPRESS=y +CONFIG_IMD_TARGET=y diff --git a/arch/arm/configs/nhk8815_defconfig b/arch/arm/configs/nhk8815_defconfig index bc19301249..b2816f563b 100644 --- a/arch/arm/configs/nhk8815_defconfig +++ b/arch/arm/configs/nhk8815_defconfig @@ -2,7 +2,6 @@ CONFIG_TEXT_BASE=0x03F80000 CONFIG_ARCH_NOMADIK=y CONFIG_ARM_OPTIMZED_STRING_FUNCTIONS=y CONFIG_PROMPT="Nomadik:" -CONFIG_GLOB=y CONFIG_HUSH_FANCY_PROMPT=y CONFIG_CMDLINE_EDITING=y CONFIG_AUTO_COMPLETE=y diff --git a/arch/arm/configs/omap3530_beagle_defconfig b/arch/arm/configs/omap3530_beagle_defconfig index d1f5669cb3..5bd6de0cc5 100644 --- a/arch/arm/configs/omap3530_beagle_defconfig +++ b/arch/arm/configs/omap3530_beagle_defconfig @@ -20,7 +20,6 @@ CONFIG_BOOTM_INITRD=y CONFIG_BOOTM_OFTREE=y CONFIG_BOOTM_OFTREE_UIMAGE=y CONFIG_BLSPEC=y -CONFIG_IMD_TARGET=y CONFIG_DEFAULT_ENVIRONMENT_GENERIC_NEW=y CONFIG_RESET_SOURCE=y CONFIG_DEBUG_LL=y @@ -95,3 +94,4 @@ CONFIG_FS_NFS=y CONFIG_FS_FAT=y CONFIG_FS_FAT_WRITE=y CONFIG_FS_FAT_LFN=y +CONFIG_IMD_TARGET=y diff --git a/arch/arm/configs/omap3530_beagle_xload_defconfig b/arch/arm/configs/omap3530_beagle_xload_defconfig index 15984e129e..a69989449d 100644 --- a/arch/arm/configs/omap3530_beagle_xload_defconfig +++ b/arch/arm/configs/omap3530_beagle_xload_defconfig @@ -22,11 +22,6 @@ CONFIG_MTD=y # CONFIG_MTD_WRITE is not set # CONFIG_MTD_OOB_DEVICE is not set CONFIG_NAND=y -# CONFIG_NAND_ECC_SOFT is not set -# CONFIG_NAND_ECC_HW_SYNDROME is not set -# CONFIG_NAND_ECC_HW_NONE is not set -# CONFIG_NAND_INFO is not set -# CONFIG_NAND_BBT is not set CONFIG_NAND_OMAP_GPMC=y CONFIG_MCI=y CONFIG_MCI_STARTUP=y diff --git a/arch/arm/configs/phytec-phycard-omap3-xload_defconfig b/arch/arm/configs/phytec-phycard-omap3-xload_defconfig index 048f7c0bde..24c50694d1 100644 --- a/arch/arm/configs/phytec-phycard-omap3-xload_defconfig +++ b/arch/arm/configs/phytec-phycard-omap3-xload_defconfig @@ -1,11 +1,11 @@ CONFIG_TEXT_BASE=0x40200000 CONFIG_ARCH_OMAP_SINGLE=y -CONFIG_BAREBOX_MAX_IMAGE_SIZE=0x0000f000 CONFIG_OMAP_BUILD_IFT=y CONFIG_MACH_PCAAL1=y CONFIG_THUMB2_BAREBOX=y # CONFIG_ARM_EXCEPTIONS is not set CONFIG_ENVIRONMENT_VARIABLES=y +CONFIG_BAREBOX_MAX_IMAGE_SIZE=0x0000f000 CONFIG_BAREBOX_MAX_BARE_INIT_SIZE=0x0000f000 CONFIG_STACK_SIZE=0xc00 CONFIG_MALLOC_SIZE=0x1000000 @@ -22,10 +22,6 @@ CONFIG_MTD=y # CONFIG_MTD_WRITE is not set # CONFIG_MTD_OOB_DEVICE is not set CONFIG_NAND=y -# CONFIG_NAND_ECC_SOFT is not set -# CONFIG_NAND_ECC_HW_SYNDROME is not set -# CONFIG_NAND_ECC_HW_NONE is not set -# CONFIG_NAND_BBT is not set CONFIG_NAND_OMAP_GPMC=y CONFIG_MCI=y CONFIG_MCI_STARTUP=y diff --git a/arch/arm/configs/phytec-phycard-omap3_defconfig b/arch/arm/configs/phytec-phycard-omap3_defconfig index fbcf5c6390..aede243c91 100644 --- a/arch/arm/configs/phytec-phycard-omap3_defconfig +++ b/arch/arm/configs/phytec-phycard-omap3_defconfig @@ -5,7 +5,6 @@ CONFIG_AEABI=y CONFIG_MALLOC_SIZE=0x1000000 CONFIG_EXPERIMENTAL=y CONFIG_PROMPT="phyCARD-A-L1 >" -CONFIG_GLOB=y CONFIG_HUSH_FANCY_PROMPT=y CONFIG_CMDLINE_EDITING=y CONFIG_AUTO_COMPLETE=y diff --git a/arch/arm/configs/phytec-phycard-omap4-xload_defconfig b/arch/arm/configs/phytec-phycard-omap4-xload_defconfig index 1761a15b72..6c14e4635f 100644 --- a/arch/arm/configs/phytec-phycard-omap4-xload_defconfig +++ b/arch/arm/configs/phytec-phycard-omap4-xload_defconfig @@ -18,11 +18,6 @@ CONFIG_MTD=y # CONFIG_MTD_WRITE is not set # CONFIG_MTD_OOB_DEVICE is not set CONFIG_NAND=y -# CONFIG_NAND_ECC_SOFT is not set -# CONFIG_NAND_ECC_HW_SYNDROME is not set -# CONFIG_NAND_ECC_HW_NONE is not set -# CONFIG_NAND_INFO is not set -# CONFIG_NAND_BBT is not set CONFIG_NAND_OMAP_GPMC=y CONFIG_MCI=y CONFIG_MCI_STARTUP=y diff --git a/arch/arm/configs/phytec-phycard-omap4_defconfig b/arch/arm/configs/phytec-phycard-omap4_defconfig index ae3cfb751d..9614b29422 100644 --- a/arch/arm/configs/phytec-phycard-omap4_defconfig +++ b/arch/arm/configs/phytec-phycard-omap4_defconfig @@ -7,7 +7,6 @@ CONFIG_MMU=y CONFIG_MALLOC_SIZE=0x2000000 CONFIG_KALLSYMS=y CONFIG_PROMPT="barebox> " -CONFIG_GLOB=y CONFIG_HUSH_FANCY_PROMPT=y CONFIG_CMDLINE_EDITING=y CONFIG_AUTO_COMPLETE=y diff --git a/arch/arm/configs/phytec-phycore-omap4460-xload-mmc_defconfig b/arch/arm/configs/phytec-phycore-omap4460-xload-mmc_defconfig index 8ffdd90789..327d212e18 100644 --- a/arch/arm/configs/phytec-phycore-omap4460-xload-mmc_defconfig +++ b/arch/arm/configs/phytec-phycore-omap4460-xload-mmc_defconfig @@ -1,12 +1,12 @@ CONFIG_TEXT_BASE=0x40300000 CONFIG_ARCH_OMAP_SINGLE=y -CONFIG_BAREBOX_MAX_IMAGE_SIZE=0xC000 CONFIG_OMAP_BUILD_IFT=y CONFIG_MACH_PCM049=y CONFIG_THUMB2_BAREBOX=y # CONFIG_ARM_EXCEPTIONS is not set # CONFIG_MEMINFO is not set CONFIG_MMU=y +CONFIG_BAREBOX_MAX_IMAGE_SIZE=0xC000 CONFIG_MALLOC_SIZE=0x2000000 CONFIG_MALLOC_DUMMY=y CONFIG_PROMPT="barebox> " diff --git a/arch/arm/configs/phytec-phycore-omap4460-xload-nand_defconfig b/arch/arm/configs/phytec-phycore-omap4460-xload-nand_defconfig index 66ee694542..237fa48cfb 100644 --- a/arch/arm/configs/phytec-phycore-omap4460-xload-nand_defconfig +++ b/arch/arm/configs/phytec-phycore-omap4460-xload-nand_defconfig @@ -1,12 +1,12 @@ CONFIG_TEXT_BASE=0x40300000 CONFIG_ARCH_OMAP_SINGLE=y -CONFIG_BAREBOX_MAX_IMAGE_SIZE=0xC000 CONFIG_OMAP_BUILD_IFT=y CONFIG_MACH_PCM049=y CONFIG_THUMB2_BAREBOX=y # CONFIG_ARM_EXCEPTIONS is not set # CONFIG_MEMINFO is not set CONFIG_MMU=y +CONFIG_BAREBOX_MAX_IMAGE_SIZE=0xC000 CONFIG_MALLOC_SIZE=0x2000000 CONFIG_MALLOC_DUMMY=y CONFIG_PROMPT="barebox> " @@ -21,11 +21,6 @@ CONFIG_MTD=y # CONFIG_MTD_WRITE is not set # CONFIG_MTD_OOB_DEVICE is not set CONFIG_NAND=y -# CONFIG_NAND_ECC_SOFT is not set -# CONFIG_NAND_ECC_HW_SYNDROME is not set -# CONFIG_NAND_ECC_HW_NONE is not set -# CONFIG_NAND_INFO is not set -# CONFIG_NAND_BBT is not set CONFIG_NAND_OMAP_GPMC=y # CONFIG_FS_RAMFS is not set # CONFIG_FS_DEVFS is not set diff --git a/arch/arm/configs/phytec-phycore-omap4460_defconfig b/arch/arm/configs/phytec-phycore-omap4460_defconfig index a2362a0fce..6a3ebea244 100644 --- a/arch/arm/configs/phytec-phycore-omap4460_defconfig +++ b/arch/arm/configs/phytec-phycore-omap4460_defconfig @@ -1,14 +1,13 @@ CONFIG_TEXT_BASE=0x8f000000 CONFIG_ARCH_OMAP_SINGLE=y -CONFIG_BAREBOX_MAX_IMAGE_SIZE=0x80000 CONFIG_MACH_PCM049=y CONFIG_AEABI=y CONFIG_ARM_UNWIND=y CONFIG_MMU=y +CONFIG_BAREBOX_MAX_IMAGE_SIZE=0x80000 CONFIG_MALLOC_SIZE=0x2000000 CONFIG_KALLSYMS=y CONFIG_PROMPT="barebox> " -CONFIG_GLOB=y CONFIG_HUSH_FANCY_PROMPT=y CONFIG_CMDLINE_EDITING=y CONFIG_AUTO_COMPLETE=y diff --git a/arch/arm/configs/pm9261_defconfig b/arch/arm/configs/pm9261_defconfig index b52d9cc90c..228b4234f6 100644 --- a/arch/arm/configs/pm9261_defconfig +++ b/arch/arm/configs/pm9261_defconfig @@ -3,7 +3,6 @@ CONFIG_ARCH_AT91SAM9261=y CONFIG_MACH_PM9261=y CONFIG_ARM_OPTIMZED_STRING_FUNCTIONS=y CONFIG_PROMPT="PM9261:" -CONFIG_GLOB=y CONFIG_HUSH_FANCY_PROMPT=y CONFIG_CMDLINE_EDITING=y CONFIG_AUTO_COMPLETE=y diff --git a/arch/arm/configs/pm9263_defconfig b/arch/arm/configs/pm9263_defconfig index e20317a22c..2b7149c058 100644 --- a/arch/arm/configs/pm9263_defconfig +++ b/arch/arm/configs/pm9263_defconfig @@ -1,7 +1,6 @@ CONFIG_ARCH_AT91=y CONFIG_ARCH_AT91SAM9263=y CONFIG_ARM_OPTIMZED_STRING_FUNCTIONS=y -CONFIG_GLOB=y CONFIG_PROMPT_HUSH_PS2="y" CONFIG_CMDLINE_EDITING=y CONFIG_AUTO_COMPLETE=y diff --git a/arch/arm/configs/pm9g45_defconfig b/arch/arm/configs/pm9g45_defconfig index 90cd27d7f6..00f3eeca1c 100644 --- a/arch/arm/configs/pm9g45_defconfig +++ b/arch/arm/configs/pm9g45_defconfig @@ -1,13 +1,11 @@ CONFIG_ARCH_AT91=y CONFIG_ARCH_AT91SAM9G45=y CONFIG_MACH_PM9G45=y -CONFIG_BAREBOX_MAX_IMAGE_SIZE=0x40000 CONFIG_AEABI=y CONFIG_ARM_OPTIMZED_STRING_FUNCTIONS=y -CONFIG_PBL_IMAGE=y CONFIG_MMU=y +CONFIG_BAREBOX_MAX_IMAGE_SIZE=0x40000 CONFIG_MALLOC_TLSF=y -CONFIG_GLOB=y CONFIG_GLOB_SORT=y CONFIG_HUSH_FANCY_PROMPT=y CONFIG_CMDLINE_EDITING=y @@ -44,9 +42,6 @@ CONFIG_DRIVER_NET_MACB=y CONFIG_MTD=y # CONFIG_MTD_OOB_DEVICE is not set CONFIG_NAND=y -# CONFIG_NAND_ECC_HW is not set -# CONFIG_NAND_ECC_HW_SYNDROME is not set -# CONFIG_NAND_ECC_HW_NONE is not set CONFIG_NAND_ATMEL=y CONFIG_DISK_ATA=y CONFIG_USB_HOST=y diff --git a/arch/arm/configs/qemu_virt64_defconfig b/arch/arm/configs/qemu_virt64_defconfig index 3802ead279..f9265cb3a3 100644 --- a/arch/arm/configs/qemu_virt64_defconfig +++ b/arch/arm/configs/qemu_virt64_defconfig @@ -1,4 +1,5 @@ CONFIG_ARCH_ARM64_VIRT=y +CONFIG_64BIT=y CONFIG_ARM_PSCI_CLIENT=y CONFIG_MALLOC_SIZE=0x0 CONFIG_KALLSYMS=y diff --git a/arch/arm/configs/qil_a9260_defconfig b/arch/arm/configs/qil_a9260_defconfig index 45bedb98b6..c08e59e940 100644 --- a/arch/arm/configs/qil_a9260_defconfig +++ b/arch/arm/configs/qil_a9260_defconfig @@ -2,14 +2,12 @@ CONFIG_ARCH_AT91=y CONFIG_ARCH_AT91SAM9260=y CONFIG_MACH_QIL_A9260=y CONFIG_CALAO_MB_QIL_A9260=y -CONFIG_BAREBOX_MAX_IMAGE_SIZE=0x40000 CONFIG_AEABI=y CONFIG_ARM_OPTIMZED_STRING_FUNCTIONS=y -CONFIG_PBL_IMAGE=y CONFIG_MMU=y +CONFIG_BAREBOX_MAX_IMAGE_SIZE=0x40000 CONFIG_EXPERIMENTAL=y CONFIG_PROMPT="USB-9G20:" -CONFIG_GLOB=y CONFIG_PROMPT_HUSH_PS2="y" CONFIG_HUSH_FANCY_PROMPT=y CONFIG_CMDLINE_EDITING=y @@ -58,9 +56,6 @@ CONFIG_DRIVER_NET_MACB=y CONFIG_MTD=y # CONFIG_MTD_OOB_DEVICE is not set CONFIG_NAND=y -# CONFIG_NAND_ECC_HW is not set -# CONFIG_NAND_ECC_HW_SYNDROME is not set -# CONFIG_NAND_ECC_HW_NONE is not set CONFIG_NAND_ATMEL=y CONFIG_USB_GADGET=y CONFIG_USB_GADGET_DFU=y diff --git a/arch/arm/configs/qil_a9g20_defconfig b/arch/arm/configs/qil_a9g20_defconfig index b42ba2f468..03b96684e4 100644 --- a/arch/arm/configs/qil_a9g20_defconfig +++ b/arch/arm/configs/qil_a9g20_defconfig @@ -2,14 +2,12 @@ CONFIG_ARCH_AT91=y CONFIG_ARCH_AT91SAM9G20=y CONFIG_MACH_QIL_A9G20=y CONFIG_CALAO_MB_QIL_A9260=y -CONFIG_BAREBOX_MAX_IMAGE_SIZE=0x40000 CONFIG_AEABI=y CONFIG_ARM_OPTIMZED_STRING_FUNCTIONS=y -CONFIG_PBL_IMAGE=y CONFIG_MMU=y +CONFIG_BAREBOX_MAX_IMAGE_SIZE=0x40000 CONFIG_EXPERIMENTAL=y CONFIG_PROMPT="USB-9G20:" -CONFIG_GLOB=y CONFIG_PROMPT_HUSH_PS2="y" CONFIG_HUSH_FANCY_PROMPT=y CONFIG_CMDLINE_EDITING=y @@ -58,9 +56,6 @@ CONFIG_DRIVER_NET_MACB=y CONFIG_MTD=y # CONFIG_MTD_OOB_DEVICE is not set CONFIG_NAND=y -# CONFIG_NAND_ECC_HW is not set -# CONFIG_NAND_ECC_HW_SYNDROME is not set -# CONFIG_NAND_ECC_HW_NONE is not set CONFIG_NAND_ATMEL=y CONFIG_USB_GADGET=y CONFIG_USB_GADGET_DFU=y diff --git a/arch/arm/configs/rockchip_v7a_defconfig b/arch/arm/configs/rockchip_v7a_defconfig index 41a63d3749..5dc41bff35 100644 --- a/arch/arm/configs/rockchip_v7a_defconfig +++ b/arch/arm/configs/rockchip_v7a_defconfig @@ -23,7 +23,6 @@ CONFIG_BOOTM_OFTREE=y CONFIG_BOOTM_OFTREE_UIMAGE=y CONFIG_BOOTM_AIMAGE=y CONFIG_CONSOLE_ACTIVATE_NONE=y -CONFIG_DEFAULT_COMPRESSION_LZO=y CONFIG_DEFAULT_ENVIRONMENT_GENERIC_NEW=y CONFIG_RESET_SOURCE=y CONFIG_CMD_DMESG=y diff --git a/arch/arm/configs/rockchip_v8_defconfig b/arch/arm/configs/rockchip_v8_defconfig index 0c3c498c03..f23c192870 100644 --- a/arch/arm/configs/rockchip_v8_defconfig +++ b/arch/arm/configs/rockchip_v8_defconfig @@ -4,6 +4,7 @@ CONFIG_MACH_RK3568_BPI_R2PRO=y CONFIG_MACH_PINE64_QUARTZ64=y CONFIG_MACH_RADXA_ROCK3=y CONFIG_BOARD_ARM_GENERIC_DT=y +CONFIG_64BIT=y CONFIG_ARM_OPTIMZED_STRING_FUNCTIONS=y CONFIG_ARM_PSCI_CLIENT=y CONFIG_MMU=y diff --git a/arch/arm/configs/sama5d3xek_defconfig b/arch/arm/configs/sama5d3xek_defconfig index 5a9f701066..c868bd0daf 100644 --- a/arch/arm/configs/sama5d3xek_defconfig +++ b/arch/arm/configs/sama5d3xek_defconfig @@ -1,16 +1,14 @@ -CONFIG_ARCH_AT91=y CONFIG_TEXT_BASE=0x26f00000 +CONFIG_ARCH_AT91=y CONFIG_ARCH_SAMA5D3=y -CONFIG_BAREBOX_MAX_IMAGE_SIZE=0x60000 CONFIG_AEABI=y CONFIG_ARM_OPTIMZED_STRING_FUNCTIONS=y -CONFIG_PBL_IMAGE=y CONFIG_MMU=y +CONFIG_BAREBOX_MAX_IMAGE_SIZE=0x60000 CONFIG_MALLOC_SIZE=0xA00000 CONFIG_EXPERIMENTAL=y CONFIG_MALLOC_TLSF=y CONFIG_PROMPT="A5D3X-EK:" -CONFIG_GLOB=y CONFIG_PROMPT_HUSH_PS2="y" CONFIG_HUSH_FANCY_PROMPT=y CONFIG_CMDLINE_EDITING=y @@ -64,9 +62,6 @@ CONFIG_MTD=y # CONFIG_MTD_OOB_DEVICE is not set CONFIG_MTD_M25P80=y CONFIG_NAND=y -# CONFIG_NAND_ECC_SOFT is not set -# CONFIG_NAND_ECC_HW_SYNDROME is not set -# CONFIG_NAND_ECC_HW_NONE is not set CONFIG_NAND_ATMEL=y CONFIG_NAND_ATMEL_PMECC=y CONFIG_VIDEO=y diff --git a/arch/arm/configs/sama5d4_xplained_defconfig b/arch/arm/configs/sama5d4_xplained_defconfig index 4d19a07b34..90a45b97c2 100644 --- a/arch/arm/configs/sama5d4_xplained_defconfig +++ b/arch/arm/configs/sama5d4_xplained_defconfig @@ -1,12 +1,11 @@ -CONFIG_ARCH_AT91=y CONFIG_TEXT_BASE=0x26f00000 +CONFIG_ARCH_AT91=y CONFIG_ARCH_SAMA5D4=y CONFIG_MACH_SAMA5D4_XPLAINED=y -CONFIG_BAREBOX_MAX_IMAGE_SIZE=0x60000 CONFIG_AEABI=y CONFIG_ARM_OPTIMZED_STRING_FUNCTIONS=y -CONFIG_PBL_IMAGE=y CONFIG_MMU=y +CONFIG_BAREBOX_MAX_IMAGE_SIZE=0x60000 CONFIG_MALLOC_SIZE=0xA00000 CONFIG_EXPERIMENTAL=y CONFIG_MALLOC_TLSF=y @@ -65,8 +64,6 @@ CONFIG_MTD=y CONFIG_MTD_RAW_DEVICE=y CONFIG_MTD_M25P80=y CONFIG_NAND=y -# CONFIG_NAND_ECC_SOFT is not set -# CONFIG_NAND_ECC_HW_SYNDROME is not set CONFIG_NAND_ATMEL=y CONFIG_NAND_ATMEL_PMECC=y CONFIG_VIDEO=y diff --git a/arch/arm/configs/sama5d4ek_defconfig b/arch/arm/configs/sama5d4ek_defconfig index 02cb12f90e..ba06991c4a 100644 --- a/arch/arm/configs/sama5d4ek_defconfig +++ b/arch/arm/configs/sama5d4ek_defconfig @@ -1,11 +1,10 @@ -CONFIG_ARCH_AT91=y CONFIG_TEXT_BASE=0x26f00000 +CONFIG_ARCH_AT91=y CONFIG_ARCH_SAMA5D4=y -CONFIG_BAREBOX_MAX_IMAGE_SIZE=0x60000 CONFIG_AEABI=y CONFIG_ARM_OPTIMZED_STRING_FUNCTIONS=y -CONFIG_PBL_IMAGE=y CONFIG_MMU=y +CONFIG_BAREBOX_MAX_IMAGE_SIZE=0x60000 CONFIG_MALLOC_SIZE=0xA00000 CONFIG_EXPERIMENTAL=y CONFIG_MALLOC_TLSF=y @@ -64,8 +63,6 @@ CONFIG_MTD=y CONFIG_MTD_RAW_DEVICE=y CONFIG_MTD_M25P80=y CONFIG_NAND=y -# CONFIG_NAND_ECC_SOFT is not set -# CONFIG_NAND_ECC_HW_SYNDROME is not set CONFIG_NAND_ATMEL=y CONFIG_NAND_ATMEL_PMECC=y CONFIG_VIDEO=y diff --git a/arch/arm/configs/socfpga-arria10_defconfig b/arch/arm/configs/socfpga-arria10_defconfig index 5ac2198d41..8c19b48450 100644 --- a/arch/arm/configs/socfpga-arria10_defconfig +++ b/arch/arm/configs/socfpga-arria10_defconfig @@ -17,7 +17,6 @@ CONFIG_BOOTM_SHOW_TYPE=y CONFIG_BOOTM_VERBOSE=y CONFIG_BOOTM_INITRD=y CONFIG_BOOTM_OFTREE=y -CONFIG_DEFAULT_COMPRESSION_LZO=y CONFIG_DEFAULT_ENVIRONMENT_GENERIC_NEW=y CONFIG_STATE=y CONFIG_LONGHELP=y @@ -66,7 +65,6 @@ CONFIG_NET_NETCONSOLE=y CONFIG_OF_BAREBOX_DRIVERS=y CONFIG_OF_BAREBOX_ENV_IN_FS=y CONFIG_DRIVER_SERIAL_NS16550=y -CONFIG_DRIVER_NET_DESIGNWARE=y CONFIG_DRIVER_NET_DESIGNWARE_SOCFPGA=y CONFIG_MICREL_PHY=y # CONFIG_SPI is not set diff --git a/arch/arm/configs/socfpga_defconfig b/arch/arm/configs/socfpga_defconfig index 9f39285a9c..8c9c1f7642 100644 --- a/arch/arm/configs/socfpga_defconfig +++ b/arch/arm/configs/socfpga_defconfig @@ -72,7 +72,6 @@ CONFIG_NET_NETCONSOLE=y CONFIG_OF_BAREBOX_DRIVERS=y CONFIG_OF_BAREBOX_ENV_IN_FS=y CONFIG_DRIVER_SERIAL_NS16550=y -CONFIG_DRIVER_NET_DESIGNWARE=y CONFIG_DRIVER_NET_DESIGNWARE_SOCFPGA=y CONFIG_MTD=y CONFIG_NAND=y diff --git a/arch/arm/configs/stm32mp_defconfig b/arch/arm/configs/stm32mp_defconfig index 1a8548b3e2..f6c6ca71b1 100644 --- a/arch/arm/configs/stm32mp_defconfig +++ b/arch/arm/configs/stm32mp_defconfig @@ -102,7 +102,6 @@ CONFIG_OF_BAREBOX_DRIVERS=y CONFIG_AIODEV=y CONFIG_STM32_ADC=y CONFIG_DRIVER_SERIAL_STM32=y -CONFIG_DRIVER_NET_DESIGNWARE_EQOS=y CONFIG_DRIVER_NET_DESIGNWARE_STM32=y CONFIG_AT803X_PHY=y CONFIG_MICREL_PHY=y diff --git a/arch/arm/configs/telit_evk_pro3_defconfig b/arch/arm/configs/telit_evk_pro3_defconfig index d9d22150c8..298401a30d 100644 --- a/arch/arm/configs/telit_evk_pro3_defconfig +++ b/arch/arm/configs/telit_evk_pro3_defconfig @@ -1,11 +1,10 @@ CONFIG_ARCH_AT91=y CONFIG_ARCH_AT91SAM9260=y CONFIG_MACH_GE863=y -CONFIG_BAREBOX_MAX_IMAGE_SIZE=0x40000 CONFIG_AEABI=y CONFIG_ARM_OPTIMZED_STRING_FUNCTIONS=y -CONFIG_PBL_IMAGE=y CONFIG_MMU=y +CONFIG_BAREBOX_MAX_IMAGE_SIZE=0x40000 CONFIG_EXPERIMENTAL=y CONFIG_PROMPT="EVK-PRO3:" CONFIG_PROMPT_HUSH_PS2="y" @@ -52,9 +51,6 @@ CONFIG_DRIVER_NET_MACB=y CONFIG_MTD=y # CONFIG_MTD_OOB_DEVICE is not set CONFIG_NAND=y -# CONFIG_NAND_ECC_HW is not set -# CONFIG_NAND_ECC_HW_SYNDROME is not set -# CONFIG_NAND_ECC_HW_NONE is not set CONFIG_NAND_ATMEL=y CONFIG_USB_GADGET=y CONFIG_USB_GADGET_DFU=y diff --git a/arch/arm/configs/tny_a9260_defconfig b/arch/arm/configs/tny_a9260_defconfig index de846d245a..eb9782c446 100644 --- a/arch/arm/configs/tny_a9260_defconfig +++ b/arch/arm/configs/tny_a9260_defconfig @@ -2,15 +2,13 @@ CONFIG_ARCH_AT91=y CONFIG_ARCH_AT91SAM9260=y CONFIG_MACH_TNY_A9260=y CONFIG_CALAO_MOB_TNY_MD2=y -CONFIG_BAREBOX_MAX_IMAGE_SIZE=0x40000 CONFIG_AEABI=y CONFIG_ARM_OPTIMZED_STRING_FUNCTIONS=y -CONFIG_PBL_IMAGE=y CONFIG_MMU=y +CONFIG_BAREBOX_MAX_IMAGE_SIZE=0x40000 CONFIG_EXPERIMENTAL=y CONFIG_MALLOC_TLSF=y CONFIG_PROMPT="TNY-9260:" -CONFIG_GLOB=y CONFIG_PROMPT_HUSH_PS2="y" CONFIG_HUSH_FANCY_PROMPT=y CONFIG_CMDLINE_EDITING=y @@ -59,9 +57,6 @@ CONFIG_DRIVER_SPI_ATMEL=y CONFIG_MTD=y # CONFIG_MTD_OOB_DEVICE is not set CONFIG_NAND=y -# CONFIG_NAND_ECC_HW is not set -# CONFIG_NAND_ECC_HW_SYNDROME is not set -# CONFIG_NAND_ECC_HW_NONE is not set CONFIG_NAND_ATMEL=y CONFIG_USB_GADGET=y CONFIG_USB_GADGET_SERIAL=y diff --git a/arch/arm/configs/tny_a9263_bootstrap_defconfig b/arch/arm/configs/tny_a9263_bootstrap_defconfig index 7977d9ead3..80b42f5f86 100644 --- a/arch/arm/configs/tny_a9263_bootstrap_defconfig +++ b/arch/arm/configs/tny_a9263_bootstrap_defconfig @@ -1,12 +1,11 @@ CONFIG_ARCH_AT91=y CONFIG_ARCH_AT91SAM9263=y CONFIG_MACH_TNY_A9263=y -CONFIG_BAREBOX_MAX_IMAGE_SIZE=0x12000 CONFIG_AEABI=y CONFIG_ARM_OPTIMZED_STRING_FUNCTIONS=y CONFIG_ENVIRONMENT_VARIABLES=y -CONFIG_PBL_IMAGE=y CONFIG_MMU=y +CONFIG_BAREBOX_MAX_IMAGE_SIZE=0x12000 CONFIG_MALLOC_DUMMY=y CONFIG_PROMPT="USB-9263:" CONFIG_SHELL_NONE=y @@ -16,8 +15,5 @@ CONFIG_MTD=y # CONFIG_MTD_WRITE is not set # CONFIG_MTD_OOB_DEVICE is not set CONFIG_NAND=y -# CONFIG_NAND_ECC_HW is not set -# CONFIG_NAND_ECC_HW_SYNDROME is not set -# CONFIG_NAND_ECC_HW_NONE is not set CONFIG_NAND_ATMEL=y # CONFIG_FS_RAMFS is not set diff --git a/arch/arm/configs/tny_a9263_defconfig b/arch/arm/configs/tny_a9263_defconfig index a9a9159b6f..d4a732d94b 100644 --- a/arch/arm/configs/tny_a9263_defconfig +++ b/arch/arm/configs/tny_a9263_defconfig @@ -2,15 +2,13 @@ CONFIG_ARCH_AT91=y CONFIG_ARCH_AT91SAM9263=y CONFIG_MACH_TNY_A9263=y CONFIG_CALAO_MOB_TNY_MD2=y -CONFIG_BAREBOX_MAX_IMAGE_SIZE=0x40000 CONFIG_AEABI=y CONFIG_ARM_OPTIMZED_STRING_FUNCTIONS=y -CONFIG_PBL_IMAGE=y CONFIG_MMU=y +CONFIG_BAREBOX_MAX_IMAGE_SIZE=0x40000 CONFIG_EXPERIMENTAL=y CONFIG_MALLOC_TLSF=y CONFIG_PROMPT="TNY-9263:" -CONFIG_GLOB=y CONFIG_PROMPT_HUSH_PS2="y" CONFIG_HUSH_FANCY_PROMPT=y CONFIG_CMDLINE_EDITING=y @@ -60,9 +58,6 @@ CONFIG_MTD=y # CONFIG_MTD_OOB_DEVICE is not set CONFIG_MTD_DATAFLASH=y CONFIG_NAND=y -# CONFIG_NAND_ECC_HW is not set -# CONFIG_NAND_ECC_HW_SYNDROME is not set -# CONFIG_NAND_ECC_HW_NONE is not set CONFIG_NAND_ATMEL=y CONFIG_USB_GADGET=y CONFIG_USB_GADGET_SERIAL=y diff --git a/arch/arm/configs/tny_a9g20_defconfig b/arch/arm/configs/tny_a9g20_defconfig index 7372b2c3ec..bc145cc2db 100644 --- a/arch/arm/configs/tny_a9g20_defconfig +++ b/arch/arm/configs/tny_a9g20_defconfig @@ -2,15 +2,13 @@ CONFIG_ARCH_AT91=y CONFIG_ARCH_AT91SAM9G20=y CONFIG_MACH_TNY_A9G20=y CONFIG_CALAO_MOB_TNY_MD2=y -CONFIG_BAREBOX_MAX_IMAGE_SIZE=0x40000 CONFIG_AEABI=y CONFIG_ARM_OPTIMZED_STRING_FUNCTIONS=y -CONFIG_PBL_IMAGE=y CONFIG_MMU=y +CONFIG_BAREBOX_MAX_IMAGE_SIZE=0x40000 CONFIG_EXPERIMENTAL=y CONFIG_MALLOC_TLSF=y CONFIG_PROMPT="TNY-9G20:" -CONFIG_GLOB=y CONFIG_PROMPT_HUSH_PS2="y" CONFIG_HUSH_FANCY_PROMPT=y CONFIG_CMDLINE_EDITING=y @@ -60,9 +58,6 @@ CONFIG_DRIVER_SPI_ATMEL=y CONFIG_MTD=y # CONFIG_MTD_OOB_DEVICE is not set CONFIG_NAND=y -# CONFIG_NAND_ECC_HW is not set -# CONFIG_NAND_ECC_HW_SYNDROME is not set -# CONFIG_NAND_ECC_HW_NONE is not set CONFIG_NAND_ATMEL=y CONFIG_USB_GADGET=y CONFIG_USB_GADGET_SERIAL=y diff --git a/arch/arm/configs/usb_a9260_defconfig b/arch/arm/configs/usb_a9260_defconfig index 1ebb0f9d0e..a94d330568 100644 --- a/arch/arm/configs/usb_a9260_defconfig +++ b/arch/arm/configs/usb_a9260_defconfig @@ -1,15 +1,13 @@ CONFIG_ARCH_AT91=y CONFIG_ARCH_AT91SAM9260=y CONFIG_MACH_USB_A9260=y -CONFIG_BAREBOX_MAX_IMAGE_SIZE=0x40000 CONFIG_AEABI=y CONFIG_ARM_OPTIMZED_STRING_FUNCTIONS=y -CONFIG_PBL_IMAGE=y CONFIG_MMU=y +CONFIG_BAREBOX_MAX_IMAGE_SIZE=0x40000 CONFIG_EXPERIMENTAL=y CONFIG_MALLOC_TLSF=y CONFIG_PROMPT="USB-9G20:" -CONFIG_GLOB=y CONFIG_PROMPT_HUSH_PS2="y" CONFIG_HUSH_FANCY_PROMPT=y CONFIG_CMDLINE_EDITING=y @@ -63,9 +61,6 @@ CONFIG_DRIVER_NET_MACB=y CONFIG_MTD=y # CONFIG_MTD_OOB_DEVICE is not set CONFIG_NAND=y -# CONFIG_NAND_ECC_HW is not set -# CONFIG_NAND_ECC_HW_SYNDROME is not set -# CONFIG_NAND_ECC_HW_NONE is not set CONFIG_NAND_ATMEL=y CONFIG_USB_GADGET=y CONFIG_USB_GADGET_DFU=y diff --git a/arch/arm/configs/usb_a9263_bootstrap_defconfig b/arch/arm/configs/usb_a9263_bootstrap_defconfig index 893a0c0f79..2adf114389 100644 --- a/arch/arm/configs/usb_a9263_bootstrap_defconfig +++ b/arch/arm/configs/usb_a9263_bootstrap_defconfig @@ -2,12 +2,11 @@ CONFIG_ARCH_AT91=y CONFIG_ARCH_AT91SAM9263=y CONFIG_MACH_USB_A9263=y CONFIG_AT91_BOOTSTRAP=y -CONFIG_BAREBOX_MAX_IMAGE_SIZE=0x12000 CONFIG_AEABI=y CONFIG_ARM_OPTIMZED_STRING_FUNCTIONS=y CONFIG_ENVIRONMENT_VARIABLES=y -CONFIG_PBL_IMAGE=y CONFIG_MMU=y +CONFIG_BAREBOX_MAX_IMAGE_SIZE=0x12000 CONFIG_MALLOC_DUMMY=y CONFIG_PROMPT="USB-9263:" CONFIG_SHELL_NONE=y @@ -16,9 +15,6 @@ CONFIG_MTD=y # CONFIG_MTD_WRITE is not set # CONFIG_MTD_OOB_DEVICE is not set CONFIG_NAND=y -# CONFIG_NAND_ECC_HW is not set -# CONFIG_NAND_ECC_HW_SYNDROME is not set -# CONFIG_NAND_ECC_HW_NONE is not set CONFIG_NAND_ATMEL=y # CONFIG_FS_RAMFS is not set CONFIG_BOOTSTRAP_DEVFS=y diff --git a/arch/arm/configs/usb_a9263_defconfig b/arch/arm/configs/usb_a9263_defconfig index 1ea6f718fb..a41e64298c 100644 --- a/arch/arm/configs/usb_a9263_defconfig +++ b/arch/arm/configs/usb_a9263_defconfig @@ -1,15 +1,13 @@ CONFIG_ARCH_AT91=y CONFIG_ARCH_AT91SAM9263=y CONFIG_MACH_USB_A9263=y -CONFIG_BAREBOX_MAX_IMAGE_SIZE=0x40000 CONFIG_AEABI=y CONFIG_ARM_OPTIMZED_STRING_FUNCTIONS=y -CONFIG_PBL_IMAGE=y CONFIG_MMU=y +CONFIG_BAREBOX_MAX_IMAGE_SIZE=0x40000 CONFIG_EXPERIMENTAL=y CONFIG_MALLOC_TLSF=y CONFIG_PROMPT="USB-9263:" -CONFIG_GLOB=y CONFIG_PROMPT_HUSH_PS2="y" CONFIG_HUSH_FANCY_PROMPT=y CONFIG_CMDLINE_EDITING=y @@ -64,9 +62,6 @@ CONFIG_MTD=y # CONFIG_MTD_OOB_DEVICE is not set CONFIG_MTD_DATAFLASH=y CONFIG_NAND=y -# CONFIG_NAND_ECC_HW is not set -# CONFIG_NAND_ECC_HW_SYNDROME is not set -# CONFIG_NAND_ECC_HW_NONE is not set CONFIG_NAND_ATMEL=y CONFIG_USB_GADGET=y CONFIG_USB_GADGET_DFU=y diff --git a/arch/arm/configs/usb_a9g20_defconfig b/arch/arm/configs/usb_a9g20_defconfig index cca8ee6097..20b1f27b9e 100644 --- a/arch/arm/configs/usb_a9g20_defconfig +++ b/arch/arm/configs/usb_a9g20_defconfig @@ -1,15 +1,13 @@ CONFIG_ARCH_AT91=y CONFIG_ARCH_AT91SAM9G20=y CONFIG_MACH_USB_A9G20=y -CONFIG_BAREBOX_MAX_IMAGE_SIZE=0x40000 CONFIG_AEABI=y CONFIG_ARM_OPTIMZED_STRING_FUNCTIONS=y -CONFIG_PBL_IMAGE=y CONFIG_MMU=y +CONFIG_BAREBOX_MAX_IMAGE_SIZE=0x40000 CONFIG_EXPERIMENTAL=y CONFIG_MALLOC_TLSF=y CONFIG_PROMPT="USB-9G20:" -CONFIG_GLOB=y CONFIG_PROMPT_HUSH_PS2="y" CONFIG_HUSH_FANCY_PROMPT=y CONFIG_CMDLINE_EDITING=y @@ -63,9 +61,6 @@ CONFIG_DRIVER_SPI_ATMEL=y CONFIG_MTD=y # CONFIG_MTD_OOB_DEVICE is not set CONFIG_NAND=y -# CONFIG_NAND_ECC_HW is not set -# CONFIG_NAND_ECC_HW_SYNDROME is not set -# CONFIG_NAND_ECC_HW_NONE is not set CONFIG_NAND_ATMEL=y CONFIG_USB_GADGET=y CONFIG_USB_GADGET_DFU=y diff --git a/arch/arm/configs/versatilepb_arm1176_defconfig b/arch/arm/configs/versatilepb_arm1176_defconfig index e8c662183a..d6b0ec898e 100644 --- a/arch/arm/configs/versatilepb_arm1176_defconfig +++ b/arch/arm/configs/versatilepb_arm1176_defconfig @@ -1,9 +1,9 @@ CONFIG_ARCH_VERSATILE=y -CONFIG_BAREBOX_MAX_IMAGE_SIZE=0x80000 CONFIG_MACH_VERSATILEPB_ARM1176=y CONFIG_ARM_OPTIMZED_STRING_FUNCTIONS=y CONFIG_PBL_IMAGE=y CONFIG_PBL_RELOCATABLE=y +CONFIG_BAREBOX_MAX_IMAGE_SIZE=0x80000 CONFIG_MALLOC_SIZE=0xa00000 CONFIG_PROMPT="versatilepb> " CONFIG_HUSH_FANCY_PROMPT=y @@ -16,7 +16,6 @@ CONFIG_BOOTM_INITRD=y CONFIG_BOOTM_OFTREE=y CONFIG_BOOTM_OFTREE_UIMAGE=y CONFIG_CONSOLE_ACTIVATE_ALL=y -CONFIG_DEFAULT_COMPRESSION_GZIP=y CONFIG_DEFAULT_ENVIRONMENT_GENERIC_NEW=y CONFIG_DEFAULT_ENVIRONMENT_PATH="arch/arm/boards/versatile/env" CONFIG_CMD_DMESG=y diff --git a/arch/arm/configs/versatilepb_defconfig b/arch/arm/configs/versatilepb_defconfig index 14481ea58e..2165dd37cb 100644 --- a/arch/arm/configs/versatilepb_defconfig +++ b/arch/arm/configs/versatilepb_defconfig @@ -1,8 +1,8 @@ CONFIG_ARCH_VERSATILE=y -CONFIG_BAREBOX_MAX_IMAGE_SIZE=0x80000 CONFIG_ARM_OPTIMZED_STRING_FUNCTIONS=y CONFIG_PBL_IMAGE=y CONFIG_PBL_RELOCATABLE=y +CONFIG_BAREBOX_MAX_IMAGE_SIZE=0x80000 CONFIG_PROMPT="versatilepb> " CONFIG_HUSH_FANCY_PROMPT=y CONFIG_CMDLINE_EDITING=y @@ -15,7 +15,6 @@ CONFIG_BOOTM_OFTREE=y CONFIG_BOOTM_OFTREE_UIMAGE=y CONFIG_CONSOLE_ACTIVATE_ALL=y CONFIG_PARTITION=y -CONFIG_DEFAULT_COMPRESSION_GZIP=y CONFIG_DEFAULT_ENVIRONMENT_GENERIC_NEW=y CONFIG_DEFAULT_ENVIRONMENT_PATH="arch/arm/boards/versatile/env" CONFIG_CMD_DMESG=y diff --git a/arch/arm/configs/virt2real_defconfig b/arch/arm/configs/virt2real_defconfig index 62315b8cb3..6e51f53f19 100644 --- a/arch/arm/configs/virt2real_defconfig +++ b/arch/arm/configs/virt2real_defconfig @@ -5,7 +5,6 @@ CONFIG_ARM_OPTIMZED_STRING_FUNCTIONS=y CONFIG_MALLOC_SIZE=0x200000 CONFIG_MALLOC_TLSF=y CONFIG_PROMPT="virt2real: " -CONFIG_GLOB=y CONFIG_HUSH_FANCY_PROMPT=y CONFIG_CMDLINE_EDITING=y CONFIG_AUTO_COMPLETE=y diff --git a/arch/arm/configs/zii_vf610_dev_defconfig b/arch/arm/configs/zii_vf610_dev_defconfig index 3ed5d37458..5e9fca65e6 100644 --- a/arch/arm/configs/zii_vf610_dev_defconfig +++ b/arch/arm/configs/zii_vf610_dev_defconfig @@ -1,5 +1,4 @@ CONFIG_ARCH_IMX=y -CONFIG_IMX_MULTI_BOARDS=y CONFIG_MACH_ZII_VF610_DEV=y CONFIG_THUMB2_BAREBOX=y CONFIG_ARM_OPTIMZED_STRING_FUNCTIONS=y diff --git a/arch/arm/configs/zylonite310_defconfig b/arch/arm/configs/zylonite310_defconfig index a8ac92040a..cdbd135081 100644 --- a/arch/arm/configs/zylonite310_defconfig +++ b/arch/arm/configs/zylonite310_defconfig @@ -1,5 +1,4 @@ CONFIG_ARCH_PXA=y -CONFIG_BAREBOX_MAX_IMAGE_SIZE=0x100000 CONFIG_ARCH_PXA3XX=y CONFIG_AEABI=y CONFIG_ARM_BOARD_APPEND_ATAG=y @@ -7,6 +6,7 @@ CONFIG_ARM_OPTIMZED_STRING_FUNCTIONS=y CONFIG_ARM_UNWIND=y # CONFIG_BANNER is not set CONFIG_MMU=y +CONFIG_BAREBOX_MAX_IMAGE_SIZE=0x100000 CONFIG_BAREBOX_MAX_BARE_INIT_SIZE=0x80000 CONFIG_MALLOC_SIZE=0x800000 CONFIG_EXPERIMENTAL=y diff --git a/arch/arm/configs/zynqmp_defconfig b/arch/arm/configs/zynqmp_defconfig index 8dd0f40b3d..c9b6fa69ef 100644 --- a/arch/arm/configs/zynqmp_defconfig +++ b/arch/arm/configs/zynqmp_defconfig @@ -1,5 +1,6 @@ CONFIG_ARCH_ZYNQMP=y CONFIG_MACH_XILINX_ZCU104=y +CONFIG_64BIT=y CONFIG_ARM_PSCI_CLIENT=y CONFIG_MMU=y CONFIG_MALLOC_SIZE=0x0 @@ -56,6 +57,7 @@ CONFIG_DP83867_PHY=y # CONFIG_SPI is not set CONFIG_MCI=y CONFIG_MCI_ARASAN=y +CONFIG_GPIO_ZYNQ=y CONFIG_FIRMWARE_ZYNQMP_FPGA=y # CONFIG_VIRTIO_MENU is not set CONFIG_FS_EXT4=y @@ -64,4 +66,3 @@ CONFIG_FS_NFS=y CONFIG_FS_FAT=y CONFIG_FS_FAT_WRITE=y CONFIG_DIGEST=y -CONFIG_GPIO_ZYNQ=y diff --git a/arch/arm/cpu/Kconfig b/arch/arm/cpu/Kconfig index f6e2ae9b8a..26f07043fe 100644 --- a/arch/arm/cpu/Kconfig +++ b/arch/arm/cpu/Kconfig @@ -157,8 +157,3 @@ config CACHE_L2X0 bool "Enable L2x0 PrimeCell" depends on MMU && ARCH_HAS_L2X0 -config CPU_SUPPORTS_32BIT_KERNEL - bool - -config CPU_SUPPORTS_64BIT_KERNEL - bool diff --git a/arch/arm/dts/imx8mp-evk.dts b/arch/arm/dts/imx8mp-evk.dts index c7e1f35d2d..0376743068 100644 --- a/arch/arm/dts/imx8mp-evk.dts +++ b/arch/arm/dts/imx8mp-evk.dts @@ -60,6 +60,23 @@ off-on-delay-us = <20000>; }; +&usb3_phy0 { + status = "okay"; +}; + +&usb3_0 { + status = "okay"; +}; + +&usb_dwc3_0 { + dr_mode = "otg"; + hnp-disable; + srp-disable; + adp-disable; + usb-role-switch; + status = "okay"; +}; + &usdhc2 { #address-cells = <1>; #size-cells = <1>; diff --git a/arch/arm/mach-layerscape/Kconfig b/arch/arm/mach-layerscape/Kconfig index 461859ab6c..52527f0c15 100644 --- a/arch/arm/mach-layerscape/Kconfig +++ b/arch/arm/mach-layerscape/Kconfig @@ -17,9 +17,10 @@ config ARCH_LAYERSCAPE_PPA config ARCH_LS1046 select CPU_V8 - select CPU_SUPPORTS_64BIT_KERNEL bool +if 64BIT + config MACH_LS1046ARDB bool "QorIQ LS1046A Reference Design Board" select ARCH_LS1046 @@ -36,10 +37,14 @@ config MACH_TQMLS1046A select DDR_FSL select DDR_FSL_DDR4 +endif + config ARCH_LS1021 select CPU_V7 bool +if 32BIT + config MACH_LS1021AIOT bool "LS1021AIOT Board" select ARCH_LS1021 @@ -47,3 +52,5 @@ config MACH_LS1021AIOT select DDR_FSL_DDR3 endif + +endif diff --git a/arch/arm/mach-rockchip/Kconfig b/arch/arm/mach-rockchip/Kconfig index 4ac75ab947..9b4913d5da 100644 --- a/arch/arm/mach-rockchip/Kconfig +++ b/arch/arm/mach-rockchip/Kconfig @@ -30,7 +30,6 @@ config ARCH_RK3288 config ARCH_ROCKCHIP_V8 bool select CPU_V8 - select CPU_SUPPORTS_64BIT_KERNEL select ARM_ATF select RELOCATABLE @@ -49,6 +48,8 @@ config ARCH_RK3568 comment "select Rockchip boards:" +if 32BIT + config MACH_RADXA_ROCK select ARCH_RK3188 select I2C @@ -62,6 +63,10 @@ config MACH_PHYTEC_SOM_RK3288 help Say Y here if you are using a RK3288 based Phytecs SOM +endif + +if 64BIT + config MACH_RK3568_EVB select ARCH_RK3568 bool "RK3568 EVB" @@ -86,6 +91,8 @@ config MACH_RADXA_ROCK3 help Say Y here if you are using a Radxa ROCK3 +endif + comment "select board features:" config ARCH_ROCKCHIP_ATF diff --git a/arch/arm/mach-zynqmp/Kconfig b/arch/arm/mach-zynqmp/Kconfig index 78cb901653..0e7d930137 100644 --- a/arch/arm/mach-zynqmp/Kconfig +++ b/arch/arm/mach-zynqmp/Kconfig @@ -1,5 +1,7 @@ # SPDX-License-Identifier: GPL-2.0-or-later -if ARCH_ZYNQMP + +menu "ZynqMP Features" + depends on ARCH_ZYNQMP config MACH_XILINX_ZCU104 bool "Xilinx Zynq UltraScale+ MPSoC ZCU104" @@ -13,4 +15,4 @@ config MACH_XILINX_ZCU106 Say Y here if you are using the Xilinx Zynq UltraScale+ MPSoC ZCU106 evaluation board. -endif +endmenu diff --git a/commands/menu.c b/commands/menu.c index 7a01aff280..e0fe09b508 100644 --- a/commands/menu.c +++ b/commands/menu.c @@ -406,64 +406,65 @@ end: return 1; } -static const __maybe_unused char cmd_menu_help[] = -"Manage Menu:\n" -" -m menu\n" -" -l list\n" -" -s show\n" +BAREBOX_CMD_HELP_START(menu) +BAREBOX_CMD_HELP_TEXT("Manage Menu:") +BAREBOX_CMD_HELP_OPT ("-m", "menu") +BAREBOX_CMD_HELP_OPT ("-l", "list") +BAREBOX_CMD_HELP_OPT ("-s", "show") +BAREBOX_CMD_HELP_TEXT("") #if defined(CONFIG_CMD_MENU_MANAGEMENT) -"Advanced menu management:\n" -" -e menu entry\n" -" -a add\n" -" -r remove\n" -" -S select\n" +BAREBOX_CMD_HELP_TEXT("Advanced menu management:") +BAREBOX_CMD_HELP_OPT ("-e", "menu entry") +BAREBOX_CMD_HELP_OPT ("-a", "add") +BAREBOX_CMD_HELP_OPT ("-r", "remove") +BAREBOX_CMD_HELP_OPT ("-S", "select") +BAREBOX_CMD_HELP_TEXT("") #endif -"\n" -"Show menu:\n" -" (-A auto select delay)\n" -" (-d auto select description)\n" -" menu -s -m MENU [-A delay] [-d auto_display]\n" -"\n" -"List menu:\n" -" menu -l\n" -"\n" +BAREBOX_CMD_HELP_TEXT("Show menu:") +BAREBOX_CMD_HELP_OPT ("-A", "auto select delay") +BAREBOX_CMD_HELP_OPT ("-d", "auto select description") +BAREBOX_CMD_HELP_TEXT("\tmenu -s -m MENU [-A delay] [-d auto_display]") +BAREBOX_CMD_HELP_TEXT("") +BAREBOX_CMD_HELP_TEXT("List menu:") +BAREBOX_CMD_HELP_TEXT("\tmenu -l\n") +BAREBOX_CMD_HELP_TEXT("") #if defined(CONFIG_CMD_MENU_MANAGEMENT) -"Add a menu:\n" -" menu -a -m NAME -d DESC\n" -"\n" -"Remove a menu:\n" -" menu -r -m NAME\n" -"\n" -"Add an entry:\n" -" (-R for do no exit the menu after executing the command)\n" -" (-b for box style 1 for selected)\n" -" (and optional -c for the command to run when we change the state)\n" -" menu -e -a -m MENU -c COMMAND [-R] [-b 0|1] -d DESC\n" - -"Add a submenu entry:\n" -" (-R is not needed)\n" -" (-b for box style 1 for selected)\n" -" (and -c is not needed)\n" -" menu -e -a -m MENU -u submenu -d [-b 0|1] DESC\n" -"\n" -"Remove an entry:\n" -" menu -e -r -m NAME -n ENTRY\n" -"\n" -"Select an entry:\n" -" menu -m <menu> -S -n ENTRY\n" -"\n" -"List menu:\n" -" menu -e -l [menu]\n" -"\n" -"Menu examples:\n" -" menu -a -m boot -d \"Boot Menu\"\n" -" menu -e -a -m boot -c boot -d \"Boot\"\n" -" menu -e -a -m boot -c reset -d \"Reset\"\n" +BAREBOX_CMD_HELP_TEXT("Add a menu:") +BAREBOX_CMD_HELP_TEXT("\tmenu -a -m NAME -d DESC") +BAREBOX_CMD_HELP_TEXT("") +BAREBOX_CMD_HELP_TEXT("Remove a menu:") +BAREBOX_CMD_HELP_TEXT("\tmenu -r -m NAME") +BAREBOX_CMD_HELP_TEXT("") +BAREBOX_CMD_HELP_TEXT("Add an entry:") +BAREBOX_CMD_HELP_TEXT("\t(-R for do no exit the menu after executing the command)") +BAREBOX_CMD_HELP_TEXT("\t(-b for box style 1 for selected)") +BAREBOX_CMD_HELP_TEXT("\t(and optional -c for the command to run when we change the state)") +BAREBOX_CMD_HELP_TEXT("\tmenu -e -a -m MENU -c COMMAND [-R] [-b 0|1] -d DESC") +BAREBOX_CMD_HELP_TEXT("") +BAREBOX_CMD_HELP_TEXT("Add a submenu entry:") +BAREBOX_CMD_HELP_TEXT("\t(-R is not needed)") +BAREBOX_CMD_HELP_TEXT("\t(-b for box style 1 for selected)") +BAREBOX_CMD_HELP_TEXT("\t(and -c is not needed)") +BAREBOX_CMD_HELP_TEXT("\tmenu -e -a -m MENU -u submenu -d [-b 0|1] DESC") +BAREBOX_CMD_HELP_TEXT("") +BAREBOX_CMD_HELP_TEXT("Remove an entry:") +BAREBOX_CMD_HELP_TEXT("\tmenu -e -r -m NAME -n ENTRY") +BAREBOX_CMD_HELP_TEXT("") +BAREBOX_CMD_HELP_TEXT("Select an entry:") +BAREBOX_CMD_HELP_TEXT("\tmenu -m <menu> -S -n ENTRY") +BAREBOX_CMD_HELP_TEXT("") +BAREBOX_CMD_HELP_TEXT("List menu:") +BAREBOX_CMD_HELP_TEXT("\tmenu -e -l [menu]") +BAREBOX_CMD_HELP_TEXT("") +BAREBOX_CMD_HELP_TEXT("Menu examples:") +BAREBOX_CMD_HELP_TEXT("\tmenu -a -m boot -d \"Boot Menu\"") +BAREBOX_CMD_HELP_TEXT("\tmenu -e -a -m boot -c boot -d \"Boot\"") +BAREBOX_CMD_HELP_TEXT("\tmenu -e -a -m boot -c reset -d \"Reset\"") #else -"Menu example:\n" +BAREBOX_CMD_HELP_TEXT("Menu example:") #endif -" menu -s -m boot\n" -; +BAREBOX_CMD_HELP_TEXT("\tmenu -s -m boot") +BAREBOX_CMD_HELP_END BAREBOX_CMD_START(menu) .cmd = do_menu, diff --git a/commands/mmc_extcsd.c b/commands/mmc_extcsd.c index 7ae068348d..f67c48404a 100644 --- a/commands/mmc_extcsd.c +++ b/commands/mmc_extcsd.c @@ -1427,7 +1427,7 @@ static int print_field(u8 *reg, int index) case EXT_CSD_MAX_ENH_SIZE_MULT: tmp = get_field_val(EXT_CSD_HC_WP_GRP_SIZE, 0, 0xFF); - tmp = tmp + get_field_val(EXT_CSD_HC_ERASE_GRP_SIZE, 0, 0xFF); + tmp = tmp * get_field_val(EXT_CSD_HC_ERASE_GRP_SIZE, 0, 0xFF); tmp64 *= tmp; tmp64 *= SZ_512K; printf("\tMax Enhanced Area: %llu B\n", tmp64); diff --git a/common/Kconfig b/common/Kconfig index 98544c0750..ac3df75acb 100644 --- a/common/Kconfig +++ b/common/Kconfig @@ -1016,6 +1016,8 @@ config STATE select ENVIRONMENT_VARIABLES select OFTREE select PARAMETER + imply STATE_DRV + imply CMD_STATE help barebox state is a generic framework for atomic power fail-safe variable storage and retrieval. It can be used to safely maintain diff --git a/common/firmware.c b/common/firmware.c index e4ad6ac867..6dc621d308 100644 --- a/common/firmware.c +++ b/common/firmware.c @@ -304,6 +304,38 @@ out: return ret; } +/* + * request_firmware - load a firmware to a device + */ +int request_firmware(const struct firmware **out, const char *fw_name, struct device *dev) +{ + char fw_path[PATH_MAX + 1]; + struct firmware *fw; + int ret; + + fw = kzalloc(sizeof(struct firmware), GFP_KERNEL); + if (!fw) + return -ENOMEM; + + snprintf(fw_path, sizeof(fw_path), "%s/%s", firmware_path, fw_name); + + ret = read_file_2(fw_path, &fw->size, (void *)&fw->data, FILESIZE_MAX); + if (ret) { + kfree(fw); + return ret; + } + + *out = fw; + + return 0; +} + +void release_firmware(const struct firmware *fw) +{ + kfree_const(fw->data); + kfree_const(fw); +} + static int firmware_init(void) { firmware_path = strdup("/env/firmware"); diff --git a/drivers/base/resource.c b/drivers/base/resource.c index 3725c79eb9..0d6f200a9d 100644 --- a/drivers/base/resource.c +++ b/drivers/base/resource.c @@ -57,13 +57,15 @@ int device_add_resource(struct device *dev, const char *resname, return device_add_resources(dev, &res, 1); } -struct device *add_generic_device(const char* devname, int id, const char *resname, +struct device *add_child_device(struct device *parent, + const char* devname, int id, const char *resname, resource_size_t start, resource_size_t size, unsigned int flags, void *pdata) { struct device *dev; dev = device_alloc(devname, id); + dev->parent = parent; dev->platform_data = pdata; device_add_resource(dev, resname, start, size, flags); @@ -71,7 +73,7 @@ struct device *add_generic_device(const char* devname, int id, const char *resna return dev; } -EXPORT_SYMBOL(add_generic_device); +EXPORT_SYMBOL(add_child_device); struct device *add_generic_device_res(const char* devname, int id, struct resource *res, int nb, void *pdata) diff --git a/drivers/firmware/zynqmp-fpga.c b/drivers/firmware/zynqmp-fpga.c index 2544d015d6..fe3a7df6d3 100644 --- a/drivers/firmware/zynqmp-fpga.c +++ b/drivers/firmware/zynqmp-fpga.c @@ -197,6 +197,7 @@ static void zynqmp_fpga_show_header(const struct device *dev, static int fpgamgr_program_finish(struct firmware_handler *fh) { struct fpgamgr *mgr = container_of(fh, struct fpgamgr, fh); + struct device *hw_dev = mgr->dev.parent; u32 *buf_aligned; u32 buf_size; u32 *body; @@ -254,9 +255,9 @@ static int fpgamgr_program_finish(struct firmware_handler *fh) memcpy((u32 *)buf_aligned, body, body_length); buf_aligned[body_length / sizeof(*buf_aligned)] = body_length; - addr = dma_map_single(&mgr->dev, buf_aligned, + addr = dma_map_single(hw_dev, buf_aligned, body_length + sizeof(buf_size), DMA_TO_DEVICE); - if (dma_mapping_error(&mgr->dev, addr)) { + if (dma_mapping_error(hw_dev, addr)) { status = -EFAULT; goto err_free_dma; } @@ -267,7 +268,7 @@ static int fpgamgr_program_finish(struct firmware_handler *fh) buf_size = addr + body_length; status = mgr->eemi_ops->fpga_load((u64)addr, buf_size, flags); - dma_unmap_single(&mgr->dev, addr, body_length + sizeof(buf_size), + dma_unmap_single(hw_dev, addr, body_length + sizeof(buf_size), DMA_TO_DEVICE); if (status < 0) dev_err(&mgr->dev, "unable to load fpga\n"); diff --git a/drivers/mci/arasan-sdhci.c b/drivers/mci/arasan-sdhci.c index 00a8ceed68..0b839ee7dc 100644 --- a/drivers/mci/arasan-sdhci.c +++ b/drivers/mci/arasan-sdhci.c @@ -73,14 +73,11 @@ static int arasan_sdhci_card_write_protected(struct mci_host *mci) static int arasan_sdhci_reset(struct arasan_sdhci_host *host, u8 mask) { - sdhci_write8(&host->sdhci, SDHCI_SOFTWARE_RESET, mask); + int ret; - /* wait for reset completion */ - if (wait_on_timeout(100 * MSECOND, - !(sdhci_read8(&host->sdhci, SDHCI_SOFTWARE_RESET) & mask))) { - dev_err(host->mci.hw_dev, "SDHCI reset timeout\n"); - return -ETIMEDOUT; - } + ret = sdhci_reset(&host->sdhci, mask); + if (ret) + return ret; if (host->quirks & SDHCI_ARASAN_QUIRK_FORCE_CDTEST) { u8 ctrl; @@ -133,33 +130,6 @@ static void arasan_sdhci_set_ios(struct mci_host *mci, struct mci_ios *ios) sdhci_write8(&host->sdhci, SDHCI_HOST_CONTROL, val); } -static int arasan_sdhci_wait_for_done(struct arasan_sdhci_host *host, u32 mask) -{ - u64 start = get_time_ns(); - u32 stat; - - do { - stat = sdhci_read32(&host->sdhci, SDHCI_INT_STATUS); - - if (stat & SDHCI_INT_TIMEOUT) - return -ETIMEDOUT; - - if (stat & SDHCI_INT_ERROR) { - dev_err(host->mci.hw_dev, "SDHCI_INT_ERROR: 0x%08x\n", - stat); - return -EPERM; - } - - if (is_timeout(start, 1000 * MSECOND)) { - dev_err(host->mci.hw_dev, - "SDHCI timeout while waiting for done\n"); - return -ETIMEDOUT; - } - } while ((stat & mask) != mask); - - return 0; -} - static void print_error(struct arasan_sdhci_host *host, int cmdidx, int ret) { if (ret == -ETIMEDOUT) @@ -213,7 +183,7 @@ static int arasan_sdhci_send_cmd(struct mci_host *mci, struct mci_cmd *cmd, sdhci_write32(&host->sdhci, SDHCI_ARGUMENT, cmd->cmdarg); sdhci_write16(&host->sdhci, SDHCI_COMMAND, command); - ret = arasan_sdhci_wait_for_done(host, mask); + ret = sdhci_wait_for_done(&host->sdhci, mask); if (ret) goto error; @@ -226,8 +196,8 @@ static int arasan_sdhci_send_cmd(struct mci_host *mci, struct mci_cmd *cmd, error: if (ret) { print_error(host, cmd->cmdidx, ret); - arasan_sdhci_reset(host, BIT(1)); // SDHCI_RESET_CMD - arasan_sdhci_reset(host, BIT(2)); // SDHCI_RESET_DATA + arasan_sdhci_reset(host, SDHCI_RESET_CMD); + arasan_sdhci_reset(host, SDHCI_RESET_DATA); } sdhci_write32(&host->sdhci, SDHCI_INT_STATUS, ~0); diff --git a/drivers/mci/atmel-sdhci-common.c b/drivers/mci/atmel-sdhci-common.c index 05a019beb6..58ba0b9b3d 100644 --- a/drivers/mci/atmel-sdhci-common.c +++ b/drivers/mci/atmel-sdhci-common.c @@ -89,32 +89,6 @@ exit: return is_inserted; } -static int at91_sdhci_wait_for_done(struct at91_sdhci *host, u32 mask) -{ - struct sdhci *sdhci = &host->sdhci; - u32 status; - int ret; - - ret = sdhci_read32_poll_timeout(sdhci, SDHCI_INT_STATUS, status, - (status & mask) == mask || (status & SDHCI_INT_ERROR), - USEC_PER_SEC); - - if (ret < 0) { - dev_err(host->dev, "SDHCI timeout while waiting for done\n"); - return ret; - } - - if (status & SDHCI_INT_TIMEOUT) - return -ETIMEDOUT; - - if (status & SDHCI_INT_ERROR) { - dev_err(host->dev, "SDHCI_INT_STATUS: 0x%08x\n", status); - return -EPERM; - } - - return status & 0xFFFF; -} - int at91_sdhci_send_command(struct at91_sdhci *host, struct mci_cmd *cmd, struct mci_data *data) { @@ -158,7 +132,7 @@ int at91_sdhci_send_command(struct at91_sdhci *host, struct mci_cmd *cmd, sdhci_write32(sdhci, SDHCI_ARGUMENT, cmd->cmdarg); sdhci_write16(sdhci, SDHCI_COMMAND, command); - status = at91_sdhci_wait_for_done(host, mask); + status = sdhci_wait_for_done(&host->sdhci, mask); if (status < 0) goto error; diff --git a/drivers/mci/rockchip-dwcmshc-sdhci.c b/drivers/mci/rockchip-dwcmshc-sdhci.c index 4b4e8b7bd6..e1eb4fc788 100644 --- a/drivers/mci/rockchip-dwcmshc-sdhci.c +++ b/drivers/mci/rockchip-dwcmshc-sdhci.c @@ -87,26 +87,12 @@ static int rk_sdhci_card_present(struct mci_host *mci) return !!(sdhci_read32(&host->sdhci, SDHCI_PRESENT_STATE) & SDHCI_CARD_DETECT); } -static int rk_sdhci_reset(struct rk_sdhci_host *host, u8 mask) -{ - sdhci_write8(&host->sdhci, SDHCI_SOFTWARE_RESET, mask); - - /* wait for reset completion */ - if (wait_on_timeout(100 * MSECOND, - !(sdhci_read8(&host->sdhci, SDHCI_SOFTWARE_RESET) & mask))){ - dev_err(host->mci.hw_dev, "SDHCI reset timeout\n"); - return -ETIMEDOUT; - } - - return 0; -} - static int rk_sdhci_init(struct mci_host *mci, struct device *dev) { struct rk_sdhci_host *host = to_rk_sdhci_host(mci); int ret; - ret = rk_sdhci_reset(host, SDHCI_RESET_ALL); + ret = sdhci_reset(&host->sdhci, SDHCI_RESET_ALL); if (ret) return ret; @@ -216,29 +202,6 @@ static void rk_sdhci_set_ios(struct mci_host *mci, struct mci_ios *ios) sdhci_write8(&host->sdhci, SDHCI_HOST_CONTROL, val); } -static int rk_sdhci_wait_for_done(struct rk_sdhci_host *host, u32 mask) -{ - u64 start = get_time_ns(); - u16 stat; - - do { - stat = sdhci_read16(&host->sdhci, SDHCI_INT_NORMAL_STATUS); - if (stat & SDHCI_INT_ERROR) { - dev_dbg(host->mci.hw_dev, "SDHCI_INT_ERROR: 0x%08x\n", - sdhci_read16(&host->sdhci, SDHCI_INT_ERROR_STATUS)); - return -EPERM; - } - - if (is_timeout(start, 1000 * MSECOND)) { - dev_err(host->mci.hw_dev, - "SDHCI timeout while waiting for done\n"); - return -ETIMEDOUT; - } - } while ((stat & mask) != mask); - - return 0; -} - static void print_error(struct rk_sdhci_host *host, int cmdidx) { dev_dbg(host->mci.hw_dev, @@ -285,11 +248,9 @@ static int rk_sdhci_send_cmd(struct mci_host *mci, struct mci_cmd *cmd, sdhci_write32(&host->sdhci, SDHCI_ARGUMENT, cmd->cmdarg); sdhci_write16(&host->sdhci, SDHCI_COMMAND, command); - ret = rk_sdhci_wait_for_done(host, SDHCI_INT_CMD_COMPLETE); - if (ret == -EPERM) + ret = sdhci_wait_for_done(&host->sdhci, SDHCI_INT_CMD_COMPLETE); + if (ret) goto error; - else if (ret) - return ret; sdhci_read_response(&host->sdhci, cmd); sdhci_write32(&host->sdhci, SDHCI_INT_STATUS, SDHCI_INT_CMD_COMPLETE); @@ -299,8 +260,8 @@ static int rk_sdhci_send_cmd(struct mci_host *mci, struct mci_cmd *cmd, error: if (ret) { print_error(host, cmd->cmdidx); - rk_sdhci_reset(host, BIT(1)); /* SDHCI_RESET_CMD */ - rk_sdhci_reset(host, BIT(2)); /* SDHCI_RESET_DATA */ + sdhci_reset(&host->sdhci, SDHCI_RESET_CMD); + sdhci_reset(&host->sdhci, SDHCI_RESET_DATA); } sdhci_write32(&host->sdhci, SDHCI_INT_STATUS, ~0); diff --git a/drivers/mci/sdhci.c b/drivers/mci/sdhci.c index 2cdd3c3c8f..635884e2a2 100644 --- a/drivers/mci/sdhci.c +++ b/drivers/mci/sdhci.c @@ -124,6 +124,33 @@ void sdhci_set_bus_width(struct sdhci *host, int width) #endif +int sdhci_wait_for_done(struct sdhci *sdhci, u32 mask) +{ + u64 start = get_time_ns(); + u32 stat; + + do { + stat = sdhci_read32(sdhci, SDHCI_INT_STATUS); + + if (stat & SDHCI_INT_TIMEOUT) + return -ETIMEDOUT; + + if (stat & SDHCI_INT_ERROR) { + dev_err(sdhci->mci->hw_dev, "SDHCI_INT_ERROR: 0x%08x\n", + stat); + return -EPERM; + } + + if (is_timeout(start, 1000 * MSECOND)) { + dev_err(sdhci->mci->hw_dev, + "SDHCI timeout while waiting for done\n"); + return -ETIMEDOUT; + } + } while ((stat & mask) != mask); + + return 0; +} + void sdhci_setup_data_pio(struct sdhci *sdhci, struct mci_data *data) { if (!data) diff --git a/drivers/mci/sdhci.h b/drivers/mci/sdhci.h index c538385939..fe8c25cb9c 100644 --- a/drivers/mci/sdhci.h +++ b/drivers/mci/sdhci.h @@ -257,6 +257,7 @@ static inline void sdhci_write8(struct sdhci *host, int reg, u32 val) } #define SDHCI_NO_DMA DMA_ERROR_CODE +int sdhci_wait_for_done(struct sdhci *host, u32 mask); void sdhci_read_response(struct sdhci *host, struct mci_cmd *cmd); void sdhci_set_cmd_xfer_mode(struct sdhci *host, struct mci_cmd *cmd, struct mci_data *data, bool dma, u32 *command, diff --git a/drivers/net/designware_eqos.c b/drivers/net/designware_eqos.c index ee5a10a007..2e2a1cf8bf 100644 --- a/drivers/net/designware_eqos.c +++ b/drivers/net/designware_eqos.c @@ -687,7 +687,6 @@ static void eqos_stop(struct eth_device *edev) static int eqos_send(struct eth_device *edev, void *packet, int length) { struct eqos *eqos = edev->priv; - struct device *dev = &eqos->netdev.dev; struct eqos_desc *tx_desc; dma_addr_t dma; u32 des3; @@ -697,8 +696,8 @@ static int eqos_send(struct eth_device *edev, void *packet, int length) eqos->tx_currdescnum++; eqos->tx_currdescnum %= EQOS_DESCRIPTORS_TX; - dma = dma_map_single(dev, packet, length, DMA_TO_DEVICE); - if (dma_mapping_error(dev, dma)) + dma = dma_map_single(edev->parent, packet, length, DMA_TO_DEVICE); + if (dma_mapping_error(edev->parent, dma)) return -EFAULT; tx_desc->des0 = (unsigned long)dma; @@ -717,7 +716,7 @@ static int eqos_send(struct eth_device *edev, void *packet, int length) !(des3 & EQOS_DESC3_OWN), 100 * USEC_PER_MSEC); - dma_unmap_single(dev, dma, length, DMA_TO_DEVICE); + dma_unmap_single(edev->parent, dma, length, DMA_TO_DEVICE); if (ret == -ETIMEDOUT) eqos_dbg(eqos, "TX timeout\n"); @@ -764,7 +763,7 @@ static int eqos_recv(struct eth_device *edev) static int eqos_init_resources(struct eqos *eqos) { - struct device *dev = eqos->netdev.parent; + struct eth_device *edev = &eqos->netdev; int ret = -ENOMEM; void *descs; void *p; @@ -785,8 +784,8 @@ static int eqos_init_resources(struct eqos *eqos) struct eqos_desc *rx_desc = &eqos->rx_descs[i]; dma_addr_t dma; - dma = dma_map_single(dev, p, EQOS_MAX_PACKET_SIZE, DMA_FROM_DEVICE); - if (dma_mapping_error(dev, dma)) { + dma = dma_map_single(edev->parent, p, EQOS_MAX_PACKET_SIZE, DMA_FROM_DEVICE); + if (dma_mapping_error(edev->parent, dma)) { ret = -EFAULT; goto err_free_rx_bufs; } diff --git a/drivers/net/dsa.c b/drivers/net/dsa.c index 6a3b829e15..ccd7d87550 100644 --- a/drivers/net/dsa.c +++ b/drivers/net/dsa.c @@ -104,8 +104,8 @@ static int dsa_port_start(struct eth_device *edev) return ret; } - ret = phy_device_connect(edev, ds->slave_mii_bus, dp->index, NULL, 0, - interface); + ret = phy_device_connect(edev, ds->slave_mii_bus, dp->index, + ops->adjust_link, 0, interface); if (ret) return ret; diff --git a/drivers/net/rtl8169.c b/drivers/net/rtl8169.c index ffc4ef238b..cbcd065980 100644 --- a/drivers/net/rtl8169.c +++ b/drivers/net/rtl8169.c @@ -216,6 +216,7 @@ static void __set_rx_mode(struct rtl8169_priv *priv) static void rtl8169_init_ring(struct rtl8169_priv *priv) { + struct eth_device *edev = &priv->edev; int i; priv->cur_rx = priv->cur_tx = 0; @@ -223,13 +224,13 @@ static void rtl8169_init_ring(struct rtl8169_priv *priv) priv->tx_desc = dma_alloc_coherent(NUM_TX_DESC * sizeof(struct bufdesc), &priv->tx_desc_phys); priv->tx_buf = malloc(NUM_TX_DESC * PKT_BUF_SIZE); - priv->tx_buf_phys = dma_map_single(&priv->edev.dev, priv->tx_buf, + priv->tx_buf_phys = dma_map_single(edev->parent, priv->tx_buf, NUM_TX_DESC * PKT_BUF_SIZE, DMA_TO_DEVICE); priv->rx_desc = dma_alloc_coherent(NUM_RX_DESC * sizeof(struct bufdesc), &priv->rx_desc_phys); priv->rx_buf = malloc(NUM_RX_DESC * PKT_BUF_SIZE); - priv->rx_buf_phys = dma_map_single(&priv->edev.dev, priv->rx_buf, + priv->rx_buf_phys = dma_map_single(edev->parent, priv->rx_buf, NUM_RX_DESC * PKT_BUF_SIZE, DMA_FROM_DEVICE); for (i = 0; i < NUM_RX_DESC; i++) { @@ -479,13 +480,13 @@ static void rtl8169_eth_halt(struct eth_device *edev) pci_clear_master(priv->pci_dev); - dma_unmap_single(&edev->dev, priv->tx_buf_phys, NUM_TX_DESC * PKT_BUF_SIZE, + dma_unmap_single(edev->parent, priv->tx_buf_phys, NUM_TX_DESC * PKT_BUF_SIZE, DMA_TO_DEVICE); free(priv->tx_buf); dma_free_coherent((void *)priv->tx_desc, priv->tx_desc_phys, NUM_TX_DESC * sizeof(struct bufdesc)); - dma_unmap_single(&edev->dev, priv->rx_buf_phys, NUM_RX_DESC * PKT_BUF_SIZE, + dma_unmap_single(edev->parent, priv->rx_buf_phys, NUM_RX_DESC * PKT_BUF_SIZE, DMA_FROM_DEVICE); free(priv->rx_buf); dma_free_coherent((void *)priv->rx_desc, priv->rx_desc_phys, diff --git a/drivers/net/sja1105.c b/drivers/net/sja1105.c index b85184ed92..328e5a6369 100644 --- a/drivers/net/sja1105.c +++ b/drivers/net/sja1105.c @@ -1432,7 +1432,7 @@ static int sja1105_init_mac_settings(struct sja1105_private *priv) .top = {0x1FF, 0, 0, 0, 0, 0, 0}, .base = {0x0, 0, 0, 0, 0, 0, 0, 0}, .enabled = {1, 0, 0, 0, 0, 0, 0, 0}, - /* Will be overridden in sja1105_port_enable. */ + /* Will be overridden in sja1105_adjust_link. */ .speed = priv->dcfg->port_speed[SJA1105_SPEED_AUTO], .egress = true, .ingress = true, @@ -2727,14 +2727,16 @@ static int sja1105_port_pre_enable(struct dsa_port *dp, int port, return sja1105_static_config_reload(priv); } -static int sja1105_port_enable(struct dsa_port *dp, int port, - struct phy_device *phy) +static void sja1105_adjust_link(struct eth_device *edev) { + struct dsa_port *dp = edev->priv; struct device *dev = dp->ds->dev; struct sja1105_private *priv = dev_get_priv(dev); + struct phy_device *phy = dp->edev.phydev; phy_interface_t phy_mode = phy->interface; struct sja1105_xmii_params_entry *mii; struct sja1105_mac_config_entry *mac; + int port = dp->index; int ret; mii = priv->static_config.tables[BLK_IDX_XMII_PARAMS].entries; @@ -2742,7 +2744,7 @@ static int sja1105_port_enable(struct dsa_port *dp, int port, ret = sja1105_port_set_mode(dp, port, phy_mode); if (ret) - return ret; + goto error; /* Let the PHY handle the RGMII delays, if present. */ if (phy->phy_id == 0) { @@ -2758,7 +2760,7 @@ static int sja1105_port_enable(struct dsa_port *dp, int port, priv->rgmii_tx_delay[port]) && !priv->dcfg->setup_rgmii_delay) { dev_err(priv->dev, "Chip does not support internal RGMII delays\n"); - return -EINVAL; + return; } } @@ -2776,12 +2778,19 @@ static int sja1105_port_enable(struct dsa_port *dp, int port, mac[port].speed = priv->dcfg->port_speed[SJA1105_SPEED_10MBPS]; } else { - dev_err(priv->dev, "Invalid PHY speed %d on port %d\n", - phy->speed, port); - return -EINVAL; + mac[port].speed = priv->dcfg->port_speed[SJA1105_SPEED_AUTO]; + return; } - return sja1105_static_config_reload(priv); + ret = sja1105_static_config_reload(priv); + if (ret) + goto error; + + return; + +error: + dev_err(priv->dev, "Failed to adjust link on port %d, error %pe\n", + port, ERR_PTR(ret)); } static int sja1105_xmit(struct dsa_port *dp, int port, void *packet, int length) @@ -2816,7 +2825,7 @@ static int sja1105_rcv(struct dsa_switch *ds, int *port, void *packet, static const struct dsa_switch_ops sja1105_dsa_ops = { .port_pre_enable = sja1105_port_pre_enable, - .port_enable = sja1105_port_enable, + .adjust_link = sja1105_adjust_link, .xmit = sja1105_xmit, .rcv = sja1105_rcv, }; diff --git a/drivers/of/base.c b/drivers/of/base.c index 01bb7e3906..5644e8e953 100644 --- a/drivers/of/base.c +++ b/drivers/of/base.c @@ -2318,6 +2318,22 @@ struct property *of_rename_property(struct device_node *np, return pp; } +struct property *of_copy_property(const struct device_node *src, + const char *propname, + struct device_node *dst) +{ + struct property *prop; + + prop = of_find_property(src, propname, NULL); + if (!prop) + return NULL; + + return of_new_property(dst, propname, + of_property_get_value(prop), prop->length); +} +EXPORT_SYMBOL_GPL(of_copy_property); + + /** * of_set_property - create a property for a given node * @node - the node diff --git a/drivers/spi/stm32_spi.c b/drivers/spi/stm32_spi.c index 0d7407c279..bdaeb6b5d0 100644 --- a/drivers/spi/stm32_spi.c +++ b/drivers/spi/stm32_spi.c @@ -111,6 +111,24 @@ static inline struct stm32_spi_priv *to_stm32_spi_priv(struct spi_master *master return container_of(master, struct stm32_spi_priv, master); } +static int stm32_spi_get_bpw_mask(struct stm32_spi_priv *priv) +{ + u32 cfg1, max_bpw; + + /* + * The most significant bit at DSIZE bit field is reserved when the + * maximum data size of periperal instances is limited to 16-bit + */ + setbits_le32(priv->base + STM32_SPI_CFG1, SPI_CFG1_DSIZE); + + cfg1 = readl(priv->base + STM32_SPI_CFG1); + max_bpw = FIELD_GET(SPI_CFG1_DSIZE, cfg1) + 1; + + dev_dbg(priv->master.dev, "%d-bit maximum data frame\n", max_bpw); + + return SPI_BPW_RANGE_MASK(4, max_bpw); +} + static void stm32_spi_write_txfifo(struct stm32_spi_priv *priv) { while ((priv->tx_len > 0) && @@ -261,19 +279,15 @@ static void stm32_spi_set_mode(struct stm32_spi_priv *priv, unsigned mode) static void stm32_spi_set_fthlv(struct stm32_spi_priv *priv, u32 xfer_len) { - u32 fthlv, half_fifo; + u32 fthlv, packet, bpw; /* data packet should not exceed 1/2 of fifo space */ - half_fifo = (priv->fifo_size / 2); - - /* data_packet should not exceed transfer length */ - fthlv = (half_fifo > xfer_len) ? xfer_len : half_fifo; + packet = clamp(xfer_len, 1U, priv->fifo_size / 2); /* align packet size with data registers access */ - fthlv -= (fthlv % 4); + bpw = DIV_ROUND_UP(priv->cur_bpw, 8); + fthlv = DIV_ROUND_UP(packet, bpw); - if (!fthlv) - fthlv = 1; clrsetbits_le32(priv->base + STM32_SPI_CFG1, SPI_CFG1_FTHLV, (fthlv - 1) << SPI_CFG1_FTHLV_SHIFT); } @@ -344,9 +358,17 @@ static int stm32_spi_transfer_one(struct stm32_spi_priv *priv, u32 ifcr = 0; u32 mode; int xfer_status = 0; + int nb_words; - if (t->len <= SPI_CR2_TSIZE) - writel(t->len, priv->base + STM32_SPI_CR2); + if (t->bits_per_word <= 8) + nb_words = t->len; + else if (t->bits_per_word <= 16) + nb_words = DIV_ROUND_UP(t->len * 8, 16); + else + nb_words = DIV_ROUND_UP(t->len * 8, 32); + + if (nb_words <= SPI_CR2_TSIZE) + writel(nb_words, priv->base + STM32_SPI_CR2); else return -EMSGSIZE; @@ -361,9 +383,11 @@ static int stm32_spi_transfer_one(struct stm32_spi_priv *priv, else if (!priv->rx_buf) mode = SPI_SIMPLEX_TX; - if (priv->cur_xferlen != t->len || priv->cur_mode != mode) { + if (priv->cur_xferlen != t->len || priv->cur_mode != mode || + priv->cur_bpw != t->bits_per_word) { priv->cur_mode = mode; priv->cur_xferlen = t->len; + priv->cur_bpw = t->bits_per_word; /* Disable the SPI hardware to unlock CFG1/CFG2 registers */ stm32_spi_disable(priv); @@ -373,6 +397,9 @@ static int stm32_spi_transfer_one(struct stm32_spi_priv *priv, stm32_spi_set_fthlv(priv, t->len); + clrsetbits_le32(priv->base + STM32_SPI_CFG1, SPI_CFG1_DSIZE, + priv->cur_bpw - 1); + /* Enable the SPI hardware */ stm32_spi_enable(priv); } @@ -560,6 +587,7 @@ static int stm32_spi_probe(struct device *dev) if (ret) return ret; + master->bits_per_word_mask = stm32_spi_get_bpw_mask(priv); priv->fifo_size = stm32_spi_get_fifo_size(priv); priv->cur_mode = SPI_FULL_DUPLEX; diff --git a/drivers/usb/dwc3/host.c b/drivers/usb/dwc3/host.c index a3a27db6fb..09ed01fc56 100644 --- a/drivers/usb/dwc3/host.c +++ b/drivers/usb/dwc3/host.c @@ -24,13 +24,13 @@ int dwc3_host_init(struct dwc3 *dwc) return PTR_ERR(io); } - dwc->xhci = add_generic_device("xHCI", DEVICE_ID_DYNAMIC, NULL, - io->start, resource_size(io), - IORESOURCE_MEM, NULL); + dwc->xhci = add_child_device(dev, "xHCI", DEVICE_ID_DYNAMIC, NULL, + io->start, resource_size(io), + IORESOURCE_MEM, NULL); if (!dwc->xhci) { dev_err(dev, "Failed to register xHCI device\n"); return -ENODEV; } - + return 0; } diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c index 60764222af..0abe8a67a3 100644 --- a/drivers/usb/host/xhci-ring.c +++ b/drivers/usb/host/xhci-ring.c @@ -594,7 +594,7 @@ int xhci_bulk_tx(struct usb_device *udev, unsigned long pipe, memcpy(bounce, buffer, length); } - map = addr = dma_map_single(ctrl->dev, bounce, length, direction); + map = addr = dma_map_single(ctrl->host.hw_dev, bounce, length, direction); dev_dbg(&udev->dev, "pipe=0x%lx, buffer=%p, length=%d\n", pipe, buffer, length); @@ -740,7 +740,7 @@ int xhci_bulk_tx(struct usb_device *udev, unsigned long pipe, record_transfer_result(udev, event, length); xhci_acknowledge_event(ctrl); - dma_unmap_single(ctrl->dev, map, length, direction); + dma_unmap_single(ctrl->host.hw_dev, map, length, direction); if (usb_pipein(pipe)) memcpy(buffer, bounce, length); @@ -895,7 +895,7 @@ int xhci_ctrl_tx(struct usb_device *udev, unsigned long pipe, if (length > 0) { if (req->requesttype & USB_DIR_IN) field |= TRB_DIR_IN; - map = buf_64 = dma_map_single(ctrl->dev, buffer, length, direction); + map = buf_64 = dma_map_single(ctrl->host.hw_dev, buffer, length, direction); trb_fields[0] = lower_32_bits(buf_64); trb_fields[1] = upper_32_bits(buf_64); @@ -947,7 +947,7 @@ int xhci_ctrl_tx(struct usb_device *udev, unsigned long pipe, /* Invalidate buffer to make it available to usb-core */ if (length > 0) - dma_unmap_single(ctrl->dev, map, length, direction); + dma_unmap_single(ctrl->host.hw_dev, map, length, direction); if (GET_COMP_CODE(le32_to_cpu(event->trans_event.transfer_len)) == COMP_SHORT_TX) { diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c index 55f51ca951..27fca63f96 100644 --- a/drivers/usb/host/xhci.c +++ b/drivers/usb/host/xhci.c @@ -1359,7 +1359,11 @@ int xhci_register(struct xhci_ctrl *ctrl) */ host->no_desc_before_addr = true; - host->hw_dev = dev; + /* + * If xHCI doesn't have its own DT node, it'll be a child of a + * physical USB host controller device that should be used for DMA + */ + host->hw_dev = dev_of_node(dev) ? dev : dev->parent; host->submit_int_msg = xhci_submit_int_msg; host->submit_control_msg = xhci_submit_control_msg; host->submit_bulk_msg = xhci_submit_bulk_msg; diff --git a/drivers/usb/misc/onboard_usb_hub.h b/drivers/usb/misc/onboard_usb_hub.h index e90be47b67..aca5f50eb0 100644 --- a/drivers/usb/misc/onboard_usb_hub.h +++ b/drivers/usb/misc/onboard_usb_hub.h @@ -22,14 +22,31 @@ static const struct onboard_hub_pdata ti_tusb8041_data = { .reset_us = 3000, }; -const struct of_device_id onboard_hub_match[] = { +static const struct onboard_hub_pdata genesys_gl850g_data = { + .reset_us = 3, +}; + +static const struct onboard_hub_pdata genesys_gl852g_data = { + .reset_us = 50, +}; + +static const struct onboard_hub_pdata vialab_vl817_data = { + .reset_us = 10, +}; + +static const struct of_device_id onboard_hub_match[] = { { .compatible = "usb424,2514", .data = µchip_usb424_data, }, + { .compatible = "usb424,2517", .data = µchip_usb424_data, }, { .compatible = "usb451,8140", .data = &ti_tusb8041_data, }, { .compatible = "usb451,8142", .data = &ti_tusb8041_data, }, + { .compatible = "usb5e3,608", .data = &genesys_gl850g_data, }, + { .compatible = "usb5e3,610", .data = &genesys_gl852g_data, }, { .compatible = "usbbda,411", .data = &realtek_rts5411_data, }, { .compatible = "usbbda,5411", .data = &realtek_rts5411_data, }, { .compatible = "usbbda,414", .data = &realtek_rts5411_data, }, { .compatible = "usbbda,5414", .data = &realtek_rts5411_data, }, + { .compatible = "usb2109,817", .data = &vialab_vl817_data, }, + { .compatible = "usb2109,2817", .data = &vialab_vl817_data, }, {} }; diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig index f20cc0befc..b4e37a9258 100644 --- a/drivers/video/Kconfig +++ b/drivers/video/Kconfig @@ -185,4 +185,16 @@ config DRIVER_VIDEO_PANEL_ILITEK_ILI9341 QVGA (240x320) RGB panels. support serial & parallel rgb interface. +config DRIVER_VIDEO_PANEL_MIPI_DBI + tristate "DRM support for MIPI DBI compatible panels" + depends on OFTREE && SPI + select DRIVER_VIDEO_MIPI_DBI + select FIRMWARE + select VIDEO_VPL + help + Say Y here if you want to enable support for MIPI DBI compatible + panels. The controller command setup can be provided using a + firmware file. For more information see + https://github.com/notro/panel-mipi-dbi/wiki. + endif diff --git a/drivers/video/Makefile b/drivers/video/Makefile index 1b6d2986d7..85cffb5a33 100644 --- a/drivers/video/Makefile +++ b/drivers/video/Makefile @@ -11,6 +11,7 @@ obj-$(CONFIG_DRIVER_VIDEO_TC358767) += tc358767.o obj-$(CONFIG_DRIVER_VIDEO_SIMPLE_PANEL) += simple-panel.o obj-$(CONFIG_DRIVER_VIDEO_MIPI_DBI) += mipi_dbi.o obj-$(CONFIG_DRIVER_VIDEO_PANEL_ILITEK_ILI9341) += panel-ilitek-ili9341.o +obj-$(CONFIG_DRIVER_VIDEO_PANEL_MIPI_DBI) += panel-mipi-dbi.o obj-$(CONFIG_DRIVER_VIDEO_ATMEL) += atmel_lcdfb.o atmel_lcdfb_core.o obj-$(CONFIG_DRIVER_VIDEO_ATMEL_HLCD) += atmel_hlcdfb.o atmel_lcdfb_core.o diff --git a/drivers/video/fb.c b/drivers/video/fb.c index 44754065e7..6f412d62c4 100644 --- a/drivers/video/fb.c +++ b/drivers/video/fb.c @@ -43,6 +43,12 @@ static int fb_close(struct cdev *cdev) return 0; } +void fb_damage(struct fb_info *info, struct fb_rect *rect) +{ + if (info->fbops->fb_damage) + info->fbops->fb_damage(info, rect); +} + static int fb_op_flush(struct cdev *cdev) { struct fb_info *info = cdev->priv; diff --git a/drivers/video/fbconsole.c b/drivers/video/fbconsole.c index 070378aa23..6c85e8e06a 100644 --- a/drivers/video/fbconsole.c +++ b/drivers/video/fbconsole.c @@ -18,6 +18,12 @@ enum state_t { struct fbc_priv { struct console_device cdev; struct fb_info *fb; + struct { + u32 top; + u32 left; + u32 bottom; + u32 right; + } margin; struct screen *sc; @@ -60,9 +66,26 @@ static int fbc_tstc(struct console_device *cdev) static void cls(struct fbc_priv *priv) { void *buf = gui_screen_render_buffer(priv->sc); + struct fb_info *fb = priv->fb; + int width = fb->xres - priv->margin.left - priv->margin.right; + int height = fb->yres - priv->margin.top - priv->margin.bottom; + void *adr; + + adr = buf + priv->fb->line_length * priv->margin.top; + + if (!priv->margin.left && !priv->margin.right) { + memset(adr, 0, priv->fb->line_length * height); + } else { + int bpp = priv->fb->bits_per_pixel >> 3; + int y; - memset(buf, 0, priv->fb->line_length * priv->fb->yres); - gu_screen_blit(priv->sc); + for (y = 0; y < height; y++) { + memset(adr + priv->margin.left * bpp, 0, width * bpp); + adr += priv->fb->line_length; + } + } + gu_screen_blit_area(priv->sc, priv->margin.left, priv->margin.top, + width, height); } struct rgb { @@ -122,7 +145,8 @@ static void drawchar(struct fbc_priv *priv, int x, int y, int c) uint8_t t = inbuf[i]; int j; - adr = buf + line_length * (y * priv->font->height + i) + x * priv->font->width * bpp; + adr = buf + line_length * (priv->margin.top + y * priv->font->height + i) + + (priv->margin.left + x * priv->font->width) * bpp; for (j = 0; j < priv->font->width; j++) { if (t & 0x80) @@ -142,9 +166,11 @@ static void video_invertchar(struct fbc_priv *priv, int x, int y) buf = gui_screen_render_buffer(priv->sc); - gu_invert_area(priv->fb, buf, x * priv->font->width, y * priv->font->height, + gu_invert_area(priv->fb, buf, priv->margin.left + x * priv->font->width, + priv->margin.top + y * priv->font->height, priv->font->width, priv->font->height); - gu_screen_blit_area(priv->sc, x * priv->font->width, y * priv->font->height, + gu_screen_blit_area(priv->sc, priv->margin.left + x * priv->font->width, + priv->margin.top + y * priv->font->height, priv->font->width, priv->font->height); } @@ -185,8 +211,9 @@ static void printchar(struct fbc_priv *priv, int c) default: drawchar(priv, priv->x, priv->y, c); - gu_screen_blit_area(priv->sc, priv->x * priv->font->width, - priv->y * priv->font->height, + gu_screen_blit_area(priv->sc, + priv->margin.left + priv->x * priv->font->width, + priv->margin.top + priv->y * priv->font->height, priv->font->width, priv->font->height); priv->x++; @@ -198,15 +225,36 @@ static void printchar(struct fbc_priv *priv, int c) if (priv->y > priv->rows) { void *buf; + void *adr; u32 line_length = priv->fb->line_length; int line_height = line_length * priv->font->height; + int width = priv->fb->xres - priv->margin.left - priv->margin.right; + int height = (priv->rows + 1) * priv->font->height; buf = gui_screen_render_buffer(priv->sc); + adr = buf + priv->margin.top * line_length; + + if (!priv->margin.left && !priv->margin.right) { + memcpy(adr, adr + line_height, line_height * priv->rows); + memset(adr + line_height * priv->rows, 0, line_height); + } else { + int bpp = priv->fb->bits_per_pixel >> 3; + int y; + + adr += priv->margin.left * bpp; + + for (y = 0; y < height - priv->font->height; y++) { + memcpy(adr, adr + line_height, width * bpp); + adr += line_length; + } + for (y = height - priv->font->height; y < height; y++) { + memset(adr, 0, width * bpp); + adr += line_length; + } + } - memcpy(buf, buf + line_height, line_height * priv->rows); - memset(buf + line_height * priv->rows, 0, line_height); - - gu_screen_blit(priv->sc); + gu_screen_blit_area(priv->sc, priv->margin.left, priv->margin.top, + width, height); priv->y = priv->rows; } @@ -401,8 +449,9 @@ static void fbc_putc(struct console_device *cdev, char c) static int setup_font(struct fbc_priv *priv) { - struct fb_info *fb = priv->fb; const struct font_desc *font; + unsigned int height = priv->fb->yres - priv->margin.top - priv->margin.bottom; + unsigned int width = priv->fb->xres - priv->margin.left - priv->margin.right; font = find_font_enum(priv->par_font_val); if (!font) { @@ -411,8 +460,8 @@ static int setup_font(struct fbc_priv *priv) priv->font = font; - priv->rows = fb->yres / priv->font->height - 1; - priv->cols = fb->xres / priv->font->width - 1; + priv->rows = height / priv->font->height - 1; + priv->cols = width / priv->font->width - 1; return 0; } @@ -472,6 +521,35 @@ static int set_font(struct param_d *p, void *vpriv) return 0; } +static int set_margin(struct param_d *p, void *vpriv) +{ + struct fbc_priv *priv = vpriv; + struct console_device *cdev = &priv->cdev; + int ret; + + if (!priv->font) { + ret = setup_font(priv); + if (ret) + return ret; + } + + priv->margin.left = min(priv->margin.left, + priv->fb->xres - priv->margin.right - priv->font->width); + priv->margin.top = min(priv->margin.top, + priv->fb->yres - priv->margin.bottom - priv->font->height); + priv->margin.right = min(priv->margin.right, + priv->fb->xres - priv->margin.left - priv->font->width); + priv->margin.bottom = min(priv->margin.bottom, + priv->fb->yres - priv->margin.top - priv->font->height); + + if (cdev->f_active & (CONSOLE_STDOUT | CONSOLE_STDERR)) { + cls(priv); + setup_font(priv); + } + + return 0; +} + int register_fbconsole(struct fb_info *fb) { struct fbc_priv *priv; @@ -508,6 +586,15 @@ int register_fbconsole(struct fb_info *fb) set_font, NULL, &priv->par_font_val, priv); + dev_add_param_uint32(&cdev->class_dev, "margin.top", set_margin, + NULL, &priv->margin.top, "%u", priv); + dev_add_param_uint32(&cdev->class_dev, "margin.left", set_margin, + NULL, &priv->margin.left, "%u", priv); + dev_add_param_uint32(&cdev->class_dev, "margin.bottom", set_margin, + NULL, &priv->margin.bottom, "%u", priv); + dev_add_param_uint32(&cdev->class_dev, "margin.right", set_margin, + NULL, &priv->margin.right, "%u", priv); + pr_info("registered as %s%d\n", cdev->class_dev.name, cdev->class_dev.id); return 0; diff --git a/drivers/video/mipi_dbi.c b/drivers/video/mipi_dbi.c index 50d2fc4b29..a2333150b9 100644 --- a/drivers/video/mipi_dbi.c +++ b/drivers/video/mipi_dbi.c @@ -8,11 +8,13 @@ #define pr_fmt(fmt) "mipi-dbi: " fmt #include <common.h> +#include <dma.h> #include <linux/kernel.h> #include <linux/sizes.h> #include <gpiod.h> #include <regulator.h> #include <spi/spi.h> +#include <video/backlight.h> #include <video/mipi_dbi.h> #include <video/vpl.h> @@ -197,6 +199,221 @@ int mipi_dbi_command_stackbuf(struct mipi_dbi *dbi, u8 cmd, const u8 *data, EXPORT_SYMBOL(mipi_dbi_command_stackbuf); /** + * mipi_dbi_buf_copy - Copy a framebuffer, transforming it if necessary + * @dst: The destination buffer + * @info: The source framebuffer info + * @clip: Clipping rectangle of the area to be copied + * @swap: When true, swap MSB/LSB of 16-bit values + */ +static void mipi_dbi_buf_copy(u16 *dst, struct fb_info *info, + struct fb_rect *clip, bool swap) +{ + u16 *src = (u16 *)info->screen_base; + unsigned int height = clip->y2 - clip->y1; + unsigned int width = clip->x2 - clip->x1; + int x, y; + + src += clip->y1 * info->xres + clip->x1; + if (swap) { + for (y = 0; y < height; y++) { + for (x = 0; x < width; x++) + *dst++ = src[x] << 8 | src[x] >> 8; + src += info->xres; + } + } else { + for (y = 0; y < height; y++) { + memcpy(dst, src, 2 * width); + dst += width; + src += info->xres; + } + } +} + +static void mipi_dbi_set_window_address(struct mipi_dbi_dev *dbidev, + unsigned int xs, unsigned int xe, + unsigned int ys, unsigned int ye) +{ + struct mipi_dbi *dbi = &dbidev->dbi; + + xs += dbidev->mode.left_margin; + xe += dbidev->mode.left_margin; + ys += dbidev->mode.upper_margin; + ye += dbidev->mode.upper_margin; + + mipi_dbi_command(dbi, MIPI_DCS_SET_COLUMN_ADDRESS, (xs >> 8) & 0xff, + xs & 0xff, (xe >> 8) & 0xff, xe & 0xff); + mipi_dbi_command(dbi, MIPI_DCS_SET_PAGE_ADDRESS, (ys >> 8) & 0xff, + ys & 0xff, (ye >> 8) & 0xff, ye & 0xff); +} + +static void mipi_dbi_fb_dirty(struct mipi_dbi_dev *dbidev, struct fb_info *info, + struct fb_rect *rect) +{ + unsigned int height = rect->y2 - rect->y1; + unsigned int width = rect->x2 - rect->x1; + struct mipi_dbi *dbi = &dbidev->dbi; + bool swap = dbi->swap_bytes; + int ret; + bool full; + void *tr; + + full = width == info->xres && height == info->yres; + + if (!full || swap) { + tr = dbidev->tx_buf; + mipi_dbi_buf_copy(tr, info, rect, swap); + } else { + tr = info->screen_base; + } + + mipi_dbi_set_window_address(dbidev, rect->x1, rect->x2 - 1, rect->y1, + rect->y2 - 1); + + ret = mipi_dbi_command_buf(dbi, MIPI_DCS_WRITE_MEMORY_START, tr, + width * height * 2); + if (ret) + pr_err_once("Failed to update display %d\n", ret); + + dbidev->damage.x1 = 0; + dbidev->damage.y1 = 0; + dbidev->damage.x2 = 0; + dbidev->damage.y2 = 0; +} + +/** + * mipi_dbi_enable_flush - MIPI DBI enable helper + * @dbidev: MIPI DBI device structure + * @info: Framebuffer info + * + * Flushes the whole framebuffer and enables the backlight. Drivers can use this + * in their &fb_ops->fb_enable callback. + */ +void mipi_dbi_enable_flush(struct mipi_dbi_dev *dbidev, + struct fb_info *info) +{ + struct fb_rect rect = { + .x1 = 0, + .y1 = 0, + .x2 = info->xres, + .y2 = info->yres + }; + + mipi_dbi_fb_dirty(dbidev, info, &rect); + + if (dbidev->backlight) + backlight_set_brightness_default(dbidev->backlight); +} +EXPORT_SYMBOL(mipi_dbi_enable_flush); + +static void mipi_dbi_blank(struct mipi_dbi_dev *dbidev) +{ + u16 height = dbidev->mode.xres; + u16 width = dbidev->mode.yres; + struct mipi_dbi *dbi = &dbidev->dbi; + size_t len = width * height * 2; + + memset(dbidev->tx_buf, 0, len); + + mipi_dbi_set_window_address(dbidev, 0, width - 1, 0, height - 1); + mipi_dbi_command_buf(dbi, MIPI_DCS_WRITE_MEMORY_START, dbidev->tx_buf, len); +} + +/** + * mipi_dbi_fb_disable - MIPI DBI framebuffer disable helper + * @info: Framebuffer info + * + * This function disables backlight if present, if not the display memory is + * blanked. The regulator is disabled if in use. Drivers can use this as their + * &fb_ops->fb_disable callback. + */ +void mipi_dbi_fb_disable(struct fb_info *info) +{ + struct mipi_dbi_dev *dbidev = container_of(info, struct mipi_dbi_dev, info); + + if (dbidev->backlight) + backlight_set_brightness(dbidev->backlight, 0); + else + mipi_dbi_blank(dbidev); + + regulator_disable(dbidev->regulator); + regulator_disable(dbidev->io_regulator); +} +EXPORT_SYMBOL(mipi_dbi_fb_disable); + +void mipi_dbi_fb_damage(struct fb_info *info, const struct fb_rect *rect) +{ + struct mipi_dbi_dev *dbidev = container_of(info, struct mipi_dbi_dev, info); + + if (dbidev->damage.x2 && dbidev->damage.y2) { + dbidev->damage.x1 = min(dbidev->damage.x1, rect->x1); + dbidev->damage.y1 = min(dbidev->damage.y1, rect->y1); + dbidev->damage.x2 = max(dbidev->damage.x2, rect->x2); + dbidev->damage.y2 = max(dbidev->damage.y2, rect->y2); + } else { + dbidev->damage = *rect; + } +} +EXPORT_SYMBOL(mipi_dbi_fb_damage); + +void mipi_dbi_fb_flush(struct fb_info *info) +{ + struct mipi_dbi_dev *dbidev = container_of(info, struct mipi_dbi_dev, info); + + if (!dbidev->damage.x2 || !dbidev->damage.y2) { + dbidev->damage.x1 = 0; + dbidev->damage.y1 = 0; + dbidev->damage.x2 = info->xres; + dbidev->damage.y2 = info->yres; + } + + mipi_dbi_fb_dirty(dbidev, info, &dbidev->damage); +} +EXPORT_SYMBOL(mipi_dbi_fb_flush); + +/** + * mipi_dbi_dev_init - MIPI DBI device initialization + * @dbidev: MIPI DBI device structure to initialize + * @ops: Framebuffer operations + * @mode: Display mode + * + * This function sets up a &fb_info with one fixed &fb_videomode. + * Additionally &mipi_dbi.tx_buf is allocated. + * + * Supported format: RGB565. + * + * Returns: + * Zero on success, negative error code on failure. + */ +int mipi_dbi_dev_init(struct mipi_dbi_dev *dbidev, struct fb_ops *ops, + struct fb_videomode *mode) +{ + struct fb_info *info = &dbidev->info; + + info->mode = mode; + info->fbops = ops; + info->dev.parent = dbidev->dev; + + info->xres = mode->xres; + info->yres = mode->yres; + info->bits_per_pixel = 16; + info->line_length = info->xres * 2; + info->screen_size = info->line_length * info->yres; + info->screen_base = dma_alloc(info->screen_size); + memset(info->screen_base, 0, info->screen_size); + + info->red.length = 5; + info->red.offset = 11; + info->green.length = 6; + info->green.offset = 5; + info->blue.length = 5; + info->blue.offset = 0; + + dbidev->tx_buf = dma_alloc(info->screen_size); + + return 0; +} + +/** * mipi_dbi_hw_reset - Hardware reset of controller * @dbi: MIPI DBI structure * @@ -246,6 +463,68 @@ bool mipi_dbi_display_is_on(struct mipi_dbi *dbi) } EXPORT_SYMBOL(mipi_dbi_display_is_on); +static int mipi_dbi_poweron_reset_conditional(struct mipi_dbi_dev *dbidev, bool cond) +{ + struct device *dev = dbidev->dev; + struct mipi_dbi *dbi = &dbidev->dbi; + int ret; + + ret = regulator_enable(dbidev->regulator); + if (ret) { + dev_err(dev, "Failed to enable regulator (%d)\n", ret); + return ret; + } + + ret = regulator_enable(dbidev->io_regulator); + if (ret) { + dev_err(dev, "Failed to enable I/O regulator (%d)\n", ret); + regulator_disable(dbidev->regulator); + return ret; + } + + if (cond && mipi_dbi_display_is_on(dbi)) + return 1; + + mipi_dbi_hw_reset(dbi); + ret = mipi_dbi_command(dbi, MIPI_DCS_SOFT_RESET); + if (ret) { + dev_err(dev, "Failed to send reset command (%d)\n", ret); + regulator_disable(dbidev->io_regulator); + regulator_disable(dbidev->regulator); + return ret; + } + + /* + * If we did a hw reset, we know the controller is in Sleep mode and + * per MIPI DSC spec should wait 5ms after soft reset. If we didn't, + * we assume worst case and wait 120ms. + */ + if (dbi->reset) + mdelay(5); + else + mdelay(120); + + return 0; +} + +/** + * mipi_dbi_poweron_conditional_reset - MIPI DBI poweron and conditional reset + * @dbidev: MIPI DBI device structure + * + * This function enables the regulator if used and if the display is off, it + * does a hardware and software reset. If mipi_dbi_display_is_on() determines + * that the display is on, no reset is performed. + * + * Returns: + * Zero if the controller was reset, 1 if the display was already on, or a + * negative error code. + */ +int mipi_dbi_poweron_conditional_reset(struct mipi_dbi_dev *dbidev) +{ + return mipi_dbi_poweron_reset_conditional(dbidev, true); +} +EXPORT_SYMBOL(mipi_dbi_poweron_conditional_reset); + #if IS_ENABLED(CONFIG_SPI) /** @@ -406,8 +685,7 @@ int mipi_dbi_spi_init(struct spi_device *spi, struct mipi_dbi *dbi, dbi->command = mipi_dbi_typec3_command; dbi->dc = dc; - // TODO: can we just force 16 bit? - if (mipi_dbi_machine_little_endian() && spi->bits_per_word != 16) + if (mipi_dbi_machine_little_endian() && !spi_is_bpw_supported(spi, 16)) dbi->swap_bytes = true; dev_dbg(dev, "SPI speed: %uMHz\n", spi->max_speed_hz / 1000000); diff --git a/drivers/video/of_display_timing.c b/drivers/video/of_display_timing.c index 6fe1e1b08b..6082d45493 100644 --- a/drivers/video/of_display_timing.c +++ b/drivers/video/of_display_timing.c @@ -99,6 +99,28 @@ static int of_parse_display_timing(const struct device_node *np, } /** + * of_get_display_timing - parse a display_timing entry + * @np: device_node with the timing subnode + * @name: name of the timing node + * @mode: fb_videomode struct to fill + **/ +int of_get_display_timing(const struct device_node *np, const char *name, + struct fb_videomode *mode) +{ + struct device_node *timing_np; + + if (!np) + return -EINVAL; + + timing_np = of_get_child_by_name(np, name); + if (!timing_np) + return -ENOENT; + + return of_parse_display_timing(timing_np, mode); +} +EXPORT_SYMBOL_GPL(of_get_display_timing); + +/** * of_get_display_timings - parse all display_timing entries from a device_node * @np: device_node with the subnodes **/ diff --git a/drivers/video/panel-mipi-dbi.c b/drivers/video/panel-mipi-dbi.c new file mode 100644 index 0000000000..7fada69d6f --- /dev/null +++ b/drivers/video/panel-mipi-dbi.c @@ -0,0 +1,331 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * DRM driver for MIPI DBI compatible display panels + * + * Copyright 2022 Noralf Trønnes + */ + +#include <clock.h> +#include <common.h> +#include <fb.h> +#include <firmware.h> +#include <gpiod.h> +#include <linux/printk.h> +#include <of.h> +#include <regulator.h> +#include <spi/spi.h> + +#include <video/backlight.h> +#include <video/mipi_dbi.h> +#include <video/mipi_display.h> + +static const u8 panel_mipi_dbi_magic[15] = { 'M', 'I', 'P', 'I', ' ', 'D', 'B', 'I', + 0, 0, 0, 0, 0, 0, 0 }; + +/* + * The display controller configuration is stored in a firmware file. + * The Device Tree 'compatible' property value with a '.bin' suffix is passed + * to request_firmware() to fetch this file. + */ +struct panel_mipi_dbi_config { + /* Magic string: panel_mipi_dbi_magic */ + u8 magic[15]; + + /* Config file format version */ + u8 file_format_version; + + /* + * MIPI commands to execute when the display pipeline is enabled. + * This is used to configure the display controller. + * + * The commands are stored in a byte array with the format: + * command, num_parameters, [ parameter, ...], command, ... + * + * Some commands require a pause before the next command can be received. + * Inserting a delay in the command sequence is done by using the NOP command with one + * parameter: delay in miliseconds (the No Operation command is part of the MIPI Display + * Command Set where it has no parameters). + * + * Example: + * command 0x11 + * sleep 120ms + * command 0xb1 parameters 0x01, 0x2c, 0x2d + * command 0x29 + * + * Byte sequence: + * 0x11 0x00 + * 0x00 0x01 0x78 + * 0xb1 0x03 0x01 0x2c 0x2d + * 0x29 0x00 + */ + u8 commands[]; +}; + +struct panel_mipi_dbi_commands { + const u8 *buf; + size_t len; +}; + +static struct panel_mipi_dbi_commands * +panel_mipi_dbi_check_commands(struct device *dev, const struct firmware *fw) +{ + const struct panel_mipi_dbi_config *config = (struct panel_mipi_dbi_config *)fw->data; + struct panel_mipi_dbi_commands *commands; + size_t size = fw->size, commands_len; + unsigned int i = 0; + + if (size < sizeof(*config) + 2) { /* At least 1 command */ + dev_err(dev, "config: file size=%zu is too small\n", size); + return ERR_PTR(-EINVAL); + } + + if (memcmp(config->magic, panel_mipi_dbi_magic, sizeof(config->magic))) { + dev_err(dev, "config: Bad magic: %15ph\n", config->magic); + return ERR_PTR(-EINVAL); + } + + if (config->file_format_version != 1) { + dev_err(dev, "config: version=%u is not supported\n", config->file_format_version); + return ERR_PTR(-EINVAL); + } + + dev_dbg(dev, "size=%zu version=%u\n", size, config->file_format_version); + + commands_len = size - sizeof(*config); + + while ((i + 1) < commands_len) { + u8 command = config->commands[i++]; + u8 num_parameters = config->commands[i++]; + const u8 *parameters = &config->commands[i]; + + i += num_parameters; + if (i > commands_len) { + dev_err(dev, "config: command=0x%02x num_parameters=%u overflows\n", + command, num_parameters); + return ERR_PTR(-EINVAL); + } + + if (command == 0x00 && num_parameters == 1) + dev_dbg(dev, "sleep %ums\n", parameters[0]); + else + dev_dbg(dev, "command %02x %*ph\n", + command, num_parameters, parameters); + } + + if (i != commands_len) { + dev_err(dev, "config: malformed command array\n"); + return ERR_PTR(-EINVAL); + } + + commands = kzalloc(sizeof(*commands), GFP_KERNEL); + if (!commands) + return ERR_PTR(-ENOMEM); + + commands->len = commands_len; + commands->buf = kmemdup(config->commands, commands->len, GFP_KERNEL); + if (!commands->buf) + return ERR_PTR(-ENOMEM); + + return commands; +} + +static struct panel_mipi_dbi_commands *panel_mipi_dbi_commands_from_fw(struct device *dev) +{ + struct panel_mipi_dbi_commands *commands; + const struct firmware *fw; + const char *compatible; + char fw_name[40]; + int ret; + + ret = of_property_read_string_index(dev->of_node, "compatible", 0, &compatible); + if (ret) + return ERR_PTR(ret); + + snprintf(fw_name, sizeof(fw_name), "%s.bin", compatible); + ret = request_firmware(&fw, fw_name, dev); + if (ret) { + dev_err(dev, "No config file found for compatible '%s' (error=%d)\n", + compatible, ret); + + return ERR_PTR(ret); + } + + commands = panel_mipi_dbi_check_commands(dev, fw); + release_firmware(fw); + + return commands; +} + +static void panel_mipi_dbi_commands_execute(struct mipi_dbi *dbi, + struct panel_mipi_dbi_commands *commands) +{ + unsigned int i = 0; + + if (!commands) + return; + + while (i < commands->len) { + u8 command = commands->buf[i++]; + u8 num_parameters = commands->buf[i++]; + const u8 *parameters = &commands->buf[i]; + + if (command == 0x00 && num_parameters == 1) + mdelay(parameters[0]); + else if (num_parameters) + mipi_dbi_command_stackbuf(dbi, command, parameters, num_parameters); + else + mipi_dbi_command(dbi, command); + + i += num_parameters; + } +} + +static void panel_mipi_dbi_enable(struct fb_info *info) +{ + struct mipi_dbi_dev *dbidev = container_of(info, struct mipi_dbi_dev, info); + struct mipi_dbi *dbi = &dbidev->dbi; + int ret; + + if (!info->mode) { + dev_err(dbidev->dev, "No valid mode found\n"); + return; + } + + if (dbidev->backlight_node && !dbidev->backlight) { + dbidev->backlight = of_backlight_find(dbidev->backlight_node); + if (!dbidev->backlight) + dev_err(dbidev->dev, "No backlight found\n"); + } + + if (!dbidev->driver_private) { + dbidev->driver_private = panel_mipi_dbi_commands_from_fw(dbidev->dev); + if (IS_ERR(dbidev->driver_private)) { + dbidev->driver_private = NULL; + return; + } + } + + ret = mipi_dbi_poweron_conditional_reset(dbidev); + if (ret < 0) + return; + if (!ret) + panel_mipi_dbi_commands_execute(dbi, dbidev->driver_private); + + mipi_dbi_enable_flush(dbidev, info); +} + + +static struct fb_ops panel_mipi_dbi_ops = { + .fb_enable = panel_mipi_dbi_enable, + .fb_disable = mipi_dbi_fb_disable, + .fb_damage = mipi_dbi_fb_damage, + .fb_flush = mipi_dbi_fb_flush, +}; + + +static int panel_mipi_dbi_get_mode(struct mipi_dbi_dev *dbidev, struct fb_videomode *mode) +{ + struct device *dev = dbidev->dev; + int ret; + + ret = of_get_display_timing(dev->of_node, "panel-timing", mode); + if (ret) { + dev_err(dev, "%pOF: failed to get panel-timing (error=%d)\n", dev->of_node, ret); + return ret; + } + + /* + * Make sure width and height are set and that only back porch and + * pixelclock are set in the other timing values. Also check that + * width and height don't exceed the 16-bit value specified by MIPI DCS. + */ + if (!mode->xres || !mode->yres || mode->display_flags || + mode->right_margin || mode->hsync_len || (mode->left_margin + mode->xres) > 0xffff || + mode->lower_margin || mode->vsync_len || (mode->upper_margin + mode->yres) > 0xffff) { + dev_err(dev, "%pOF: panel-timing out of bounds\n", dev->of_node); + return -EINVAL; + } + + /* The driver doesn't use the pixel clock but it is mandatory so fake one if not set */ + if (!mode->pixclock) { + mode->pixclock = + (mode->left_margin + mode->xres + mode->right_margin + mode->hsync_len) * + (mode->upper_margin + mode->yres + mode->lower_margin + mode->vsync_len) * + 60 / 1000; + } + + return 0; +} + +static int panel_mipi_dbi_spi_probe(struct device *dev) +{ + struct mipi_dbi_dev *dbidev; + struct spi_device *spi = to_spi_device(dev); + struct mipi_dbi *dbi; + struct fb_info *info; + int dc; + int ret; + + dbidev = kzalloc(sizeof(*dbidev), GFP_KERNEL); + if (!dbidev) + return -ENOMEM; + + dbidev->dev = dev; + dbi = &dbidev->dbi; + info = &dbidev->info; + + ret = panel_mipi_dbi_get_mode(dbidev, &dbidev->mode); + if (ret) + return ret; + + dbidev->regulator = regulator_get(dev, "power"); + if (IS_ERR(dbidev->regulator)) + return dev_err_probe(dev, PTR_ERR(dbidev->regulator), + "Failed to get regulator 'power'\n"); + + dbidev->io_regulator = regulator_get(dev, "io"); + if (IS_ERR(dbidev->io_regulator)) + return dev_err_probe(dev, PTR_ERR(dbidev->io_regulator), + "Failed to get regulator 'io'\n"); + + dbidev->backlight_node = of_parse_phandle(dev->of_node, "backlight", 0); + + dbi->reset = gpiod_get(dev, "reset", GPIOD_OUT_HIGH); + if (dbi->reset < 0 && dbi->reset != -ENOENT) + return dev_err_probe(dev, dbi->reset, "Failed to get GPIO 'reset'\n"); + + dc = gpiod_get(dev, "dc", GPIOD_OUT_LOW); + if (dc < 0 && dc != -ENOENT) + return dev_err_probe(dev, dc, "Failed to get GPIO 'dc'\n"); + + ret = mipi_dbi_spi_init(spi, dbi, dc); + if (ret) + return ret; + + ret = mipi_dbi_dev_init(dbidev, &panel_mipi_dbi_ops, &dbidev->mode); + if (ret) + return ret; + + ret = register_framebuffer(info); + if (ret < 0) + return dev_err_probe(dev, ret, "Failed to register framebuffer\n"); + + return 0; +} + +static const struct of_device_id panel_mipi_dbi_spi_of_match[] = { + { .compatible = "panel-mipi-dbi-spi" }, + {}, +}; +MODULE_DEVICE_TABLE(of, panel_mipi_dbi_spi_of_match); + +static struct driver panel_mipi_dbi_spi_driver = { + .name = "panel-mipi-dbi-spi", + .probe = panel_mipi_dbi_spi_probe, + .of_compatible = DRV_OF_COMPAT(panel_mipi_dbi_spi_of_match), +}; +device_spi_driver(panel_mipi_dbi_spi_driver); + +MODULE_DESCRIPTION("MIPI DBI compatible display panel driver"); +MODULE_AUTHOR("Noralf Trønnes"); +MODULE_LICENSE("GPL"); diff --git a/include/asm-generic/pointer.h b/include/asm-generic/pointer.h new file mode 100644 index 0000000000..8b9600b029 --- /dev/null +++ b/include/asm-generic/pointer.h @@ -0,0 +1,30 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ + +#ifndef __ASM_GENERIC_PTR_H___ +#define __ASM_GENERIC_PTR_H___ + +#if __SIZEOF_POINTER__ == 8 +#ifdef __ASSEMBLY__ +#define ASM_PTR .quad +#define ASM_SZPTR 8 +#define ASM_LGPTR 3 +#else +#define ASM_PTR ".quad" +#define ASM_SZPTR "8" +#define ASM_LGPTR "3" +#endif +#elif __SIZEOF_POINTER__ == 4 +#ifdef __ASSEMBLY__ +#define ASM_PTR .word +#define ASM_SZPTR 4 +#define ASM_LGPTR 2 +#else +#define ASM_PTR ".word" +#define ASM_SZPTR "4" +#define ASM_LGPTR "2" +#endif +#else +#error "Unexpected __SIZEOF_POINTER__" +#endif + +#endif /* __ASM_GENERIC_PTR_H___ */ diff --git a/include/clock.h b/include/clock.h index 8e07c35d37..03a38911a7 100644 --- a/include/clock.h +++ b/include/clock.h @@ -4,8 +4,9 @@ #include <types.h> #include <linux/time.h> +#include <linux/bitops.h> -#define CLOCKSOURCE_MASK(bits) (uint64_t)((bits) < 64 ? ((1ULL<<(bits))-1) : -1) +#define CLOCKSOURCE_MASK(bits) GENMASK_ULL((bits) - 1, 0) struct clocksource { uint32_t shift; diff --git a/include/driver.h b/include/driver.h index 2cf0190699..68e4bf559e 100644 --- a/include/driver.h +++ b/include/driver.h @@ -275,13 +275,21 @@ int device_add_resource(struct device *dev, const char *resname, int device_add_data(struct device *dev, const void *data, size_t size); +struct device *add_child_device(struct device *parent, + const char* devname, int id, const char *resname, + resource_size_t start, resource_size_t size, unsigned int flags, + void *pdata); + /* * register a generic device * with only one resource */ -struct device *add_generic_device(const char* devname, int id, const char *resname, +static inline struct device *add_generic_device(const char* devname, int id, const char *resname, resource_size_t start, resource_size_t size, unsigned int flags, - void *pdata); + void *pdata) +{ + return add_child_device(NULL, devname, id, resname, start, size, flags, pdata); +} /* * register a generic device diff --git a/include/dsa.h b/include/dsa.h index e823bac0a7..527941c269 100644 --- a/include/dsa.h +++ b/include/dsa.h @@ -55,6 +55,7 @@ struct dsa_switch_ops { int (*phy_read)(struct dsa_switch *ds, int port, int regnum); int (*phy_write)(struct dsa_switch *ds, int port, int regnum, u16 val); + void (*adjust_link)(struct eth_device *dev); }; struct dsa_port { diff --git a/include/fb.h b/include/fb.h index bf5f688342..88e6c0e458 100644 --- a/include/fb.h +++ b/include/fb.h @@ -80,6 +80,13 @@ struct fb_bitfield { struct fb_info; +struct fb_rect { + u32 x1; + u32 y1; + u32 x2; + u32 y2; +}; + struct fb_ops { /* set color register */ int (*fb_setcolreg)(unsigned regno, unsigned red, unsigned green, @@ -87,6 +94,7 @@ struct fb_ops { void (*fb_enable)(struct fb_info *info); void (*fb_disable)(struct fb_info *info); int (*fb_activate_var)(struct fb_info *info); + void (*fb_damage)(struct fb_info *info, const struct fb_rect *rect); void (*fb_flush)(struct fb_info *info); }; @@ -147,6 +155,8 @@ struct fb_info { int shadowfb; }; +int of_get_display_timing(const struct device_node *np, const char *name, + struct fb_videomode *mode); struct display_timings *of_get_display_timings(struct device_node *np); void display_timings_release(struct display_timings *); @@ -154,6 +164,7 @@ int register_framebuffer(struct fb_info *info); int fb_enable(struct fb_info *info); int fb_disable(struct fb_info *info); +void fb_damage(struct fb_info *info, struct fb_rect *rect); void fb_flush(struct fb_info *info); #define FBIOGET_SCREENINFO _IOR('F', 1, loff_t) diff --git a/include/firmware.h b/include/firmware.h index 05433f2f78..93c800e11b 100644 --- a/include/firmware.h +++ b/include/firmware.h @@ -13,6 +13,11 @@ #include <debug_ll.h> #include <linux/kernel.h> +struct firmware { + size_t size; + const u8 *data; +}; + struct firmware_handler { char *id; /* unique identifier for this firmware device */ char *model; /* description for this device */ @@ -37,6 +42,8 @@ struct firmware_mgr *firmwaremgr_find_by_node(struct device_node *np); int firmwaremgr_load_file(struct firmware_mgr *, const char *path); char *firmware_get_searchpath(void); void firmware_set_searchpath(const char *path); +int request_firmware(const struct firmware **fw, const char *fw_name, struct device *dev); +void release_firmware(const struct firmware *fw); #else static inline struct firmware_mgr *firmwaremgr_find_by_node(struct device_node *np) { @@ -57,6 +64,15 @@ static inline void firmware_set_searchpath(const char *path) { } +static inline int request_firmware(const struct firmware **fw, const char *fw_name, + struct device *dev) +{ + return -EINVAL; +} + +static inline void release_firmware(const struct firmware *fw) +{ +} #endif void firmwaremgr_list_handlers(void); diff --git a/include/image-metadata.h b/include/image-metadata.h index bf4e08d98a..615632f9ce 100644 --- a/include/image-metadata.h +++ b/include/image-metadata.h @@ -156,10 +156,12 @@ static inline void imd_used(const void *unused) #define IMD_USED(_name) \ imd_used(&__barebox_imd_##_name) -#define IMD_USED_OF(_name) ({ \ - extern char __barebox_imd_OF_ ## _name[]; \ - imd_used(&__barebox_imd_OF_ ## _name); \ - }) + +__attribute__((deprecated("IMD entries are now always referenced if DT itself is"))) +static inline void IMD_USED_OF(void) +{} + +#define IMD_USED_OF(_name) IMD_USED_OF() #endif /* __BAREBOX__ */ diff --git a/include/linux/remoteproc.h b/include/linux/remoteproc.h index 170fff7987..33fe2f81b7 100644 --- a/include/linux/remoteproc.h +++ b/include/linux/remoteproc.h @@ -18,11 +18,6 @@ struct resource_table { u32 offset[0]; } __packed; -struct firmware { - size_t size; - const u8 *data; -}; - struct rproc; struct rproc_ops { diff --git a/include/of.h b/include/of.h index 3fb6ecec8d..4b0266fd31 100644 --- a/include/of.h +++ b/include/of.h @@ -152,6 +152,9 @@ extern struct property *__of_new_property(struct device_node *node, extern void of_delete_property(struct property *pp); extern struct property *of_rename_property(struct device_node *np, const char *old_name, const char *new_name); +extern struct property *of_copy_property(const struct device_node *src, + const char *propname, + struct device_node *dst); extern struct device_node *of_find_node_by_name(struct device_node *from, const char *name); @@ -576,6 +579,13 @@ static inline struct property *__of_new_property(struct device_node *node, return NULL; } +static inline struct property *of_copy_property(const struct device_node *src, + const char *propname, + struct device_node *dst) +{ + return NULL; +} + static inline void of_delete_property(struct property *pp) { } @@ -1038,8 +1048,10 @@ static inline int of_property_read_string_index(const struct device_node *np, * @np: device node from which the property value is to be read. * @propname: name of the property to be searched. * - * Search for a property in a device node. - * Returns true if the property exist false otherwise. + * Search for a boolean property in a device node. Usage on non-boolean + * property types is deprecated. + + * Return: true if the property exist false otherwise. */ static inline bool of_property_read_bool(const struct device_node *np, const char *propname) @@ -1049,6 +1061,20 @@ static inline bool of_property_read_bool(const struct device_node *np, return prop ? true : false; } +/** + * of_property_present - Test if a property is present in a node + * @np: device node to search for the property. + * @propname: name of the property to be searched. + * + * Test for a property present in a device node. + * + * Return: true if the property exists false otherwise. + */ +static inline bool of_property_present(const struct device_node *np, const char *propname) +{ + return of_property_read_bool(np, propname); +} + static inline int of_property_read_u8(const struct device_node *np, const char *propname, u8 *out_value) diff --git a/include/spi/spi.h b/include/spi/spi.h index fa9329b08c..f806c7a30b 100644 --- a/include/spi/spi.h +++ b/include/spi/spi.h @@ -6,6 +6,7 @@ #include <linux/err.h> #include <linux/kernel.h> #include <linux/string.h> +#include <linux/bitops.h> struct spi_controller_mem_ops; @@ -44,7 +45,7 @@ struct spi_board_info { * This may be changed by the device's driver, or left at the * default (0) indicating protocol words are eight bit bytes. * The spi_transfer.bits_per_word can override this for each transfer - * (FIXME: not currently implemented). + * (FIXME: not currently implemented by most drivers). * @irq: Negative, or the number passed to request_irq() to receive * interrupts from this device. * @controller_state: Controller's runtime state @@ -131,6 +132,11 @@ struct spi_message; * SPI slaves, and are numbered from zero to num_chipselects. * each slave has a chipselect signal, but it's common that not * every chipselect is connected to a slave. + * @bits_per_word_mask: A mask indicating which values of bits_per_word are + * supported by the driver. Bit n indicates that a bits_per_word n+1 is + * supported. If set, the SPI core will reject any transfer with an + * unsupported bits_per_word. If not set, this value is simply ignored, + * and it's up to the individual driver to perform any validation. * @max_speed_hz: Highest supported transfer speed * @setup: updates the device mode and clocking records used by a * device's SPI controller; protocol code may call this. This @@ -165,6 +171,12 @@ struct spi_controller { /* Optimized handlers for SPI memory-like operations */ const struct spi_controller_mem_ops *mem_ops; + + /* Bitmask of supported bits_per_word for transfers */ + u32 bits_per_word_mask; +#define SPI_BPW_MASK(bits) BIT((bits) - 1) +#define SPI_BPW_RANGE_MASK(min, max) GENMASK((max) - 1, (min) - 1) + /* * on some hardware transfer size may be constrained * the limit may depend on device transfer settings @@ -435,6 +447,26 @@ spi_transfer_del(struct spi_transfer *t) list_del(&t->transfer_list); } +/** + * spi_is_bpw_supported - Check if bits per word is supported + * @spi: SPI device + * @bpw: Bits per word + * + * This function checks to see if the SPI controller supports @bpw. + * + * Returns: + * True if @bpw is supported, false otherwise. + */ +static inline bool spi_is_bpw_supported(struct spi_device *spi, u32 bpw) +{ + u32 bpw_mask = spi->master->bits_per_word_mask; + + if (bpw == 8 || (bpw <= 32 && bpw_mask & SPI_BPW_MASK(bpw))) + return true; + + return false; +} + /* All these synchronous SPI transfer routines are utilities layered * over the core async transfer primitive. Here, "synchronous" means * they will sleep uninterruptibly until the async transfer completes. diff --git a/include/video/mipi_dbi.h b/include/video/mipi_dbi.h index 5452600693..a15264c833 100644 --- a/include/video/mipi_dbi.h +++ b/include/video/mipi_dbi.h @@ -11,6 +11,7 @@ #include <linux/types.h> #include <spi/spi.h> #include <driver.h> +#include <fb.h> struct regulator; struct fb_videomode; @@ -55,6 +56,66 @@ struct mipi_dbi { struct list_head list; }; +/** + * struct mipi_dbi_dev - MIPI DBI device + */ +struct mipi_dbi_dev { + /** + * @dev: Device + */ + struct device *dev; + + /** + * @info: Framebuffer info + */ + struct fb_info info; + + /** + * @mode: Fixed display mode + */ + struct fb_videomode mode; + + /** + * @tx_buf: Buffer used for transfer (copy clip rect area) + */ + u8 *tx_buf; + + /** + * @backlight_node: backlight device node (optional) + */ + struct device_node *backlight_node; + + /** + * @backlight: backlight device (optional) + */ + struct backlight_device *backlight; + + /** + * @regulator: power regulator (Vdd) (optional) + */ + struct regulator *regulator; + + /** + * @io_regulator: I/O power regulator (Vddi) (optional) + */ + struct regulator *io_regulator; + + /** + * @dbi: MIPI DBI interface + */ + struct mipi_dbi dbi; + + /** + * @driver_private: Driver private data. + */ + void *driver_private; + + /** + * @damage: Damage rectangle. + */ + struct fb_rect damage; +}; + static inline const char *mipi_dbi_name(struct mipi_dbi *dbi) { return dev_name(&dbi->spi->dev); @@ -62,8 +123,16 @@ static inline const char *mipi_dbi_name(struct mipi_dbi *dbi) int mipi_dbi_spi_init(struct spi_device *spi, struct mipi_dbi *dbi, int dc); +int mipi_dbi_dev_init(struct mipi_dbi_dev *dbidev, + struct fb_ops *ops, struct fb_videomode *mode); +void mipi_dbi_fb_damage(struct fb_info *info, const struct fb_rect *rect); +void mipi_dbi_fb_flush(struct fb_info *info); +void mipi_dbi_enable_flush(struct mipi_dbi_dev *dbidev, + struct fb_info *info); +void mipi_dbi_fb_disable(struct fb_info *info); void mipi_dbi_hw_reset(struct mipi_dbi *dbi); bool mipi_dbi_display_is_on(struct mipi_dbi *dbi); +int mipi_dbi_poweron_conditional_reset(struct mipi_dbi_dev *dbidev); u32 mipi_dbi_spi_cmd_max_speed(struct spi_device *spi, size_t len); int mipi_dbi_spi_transfer(struct spi_device *spi, u32 speed_hz, diff --git a/lib/gui/graphic_utils.c b/lib/gui/graphic_utils.c index 92f249e722..d91a7f3550 100644 --- a/lib/gui/graphic_utils.c +++ b/lib/gui/graphic_utils.c @@ -313,6 +313,12 @@ void gu_screen_blit_area(struct screen *sc, int startx, int starty, int width, { struct fb_info *info = sc->info; int bpp = info->bits_per_pixel >> 3; + struct fb_rect rect = { + .x1 = startx, + .y1 = starty, + .x2 = startx + width, + .y2 = starty + height, + }; if (info->screen_base_shadow) { int y; @@ -325,14 +331,24 @@ void gu_screen_blit_area(struct screen *sc, int startx, int starty, int width, fboff += sc->info->line_length; } } + + fb_damage(info, &rect); } void gu_screen_blit(struct screen *sc) { struct fb_info *info = sc->info; + struct fb_rect rect = { + .x1 = 0, + .y1 = 0, + .x2 = info->xres, + .y2 = info->yres, + }; if (info->screen_base_shadow) memcpy(info->screen_base, info->screen_base_shadow, sc->fbsize); + + fb_damage(info, &rect); } void gu_fill_rectangle(struct screen *sc, diff --git a/pbl/console.c b/pbl/console.c index a147e2a19e..1a6e839c15 100644 --- a/pbl/console.c +++ b/pbl/console.c @@ -79,6 +79,21 @@ int pr_print(int level, const char *fmt, ...) return i; } +int dev_printf(int level, const struct device *dev, const char *fmt, ...) +{ + va_list args; + uint i; + char printbuffer[CFG_PBSIZE]; + + va_start(args, fmt); + i = vsnprintf(printbuffer, sizeof(printbuffer), fmt, args); + va_end(args); + + console_puts(CONSOLE_STDERR, printbuffer); + + return i; +} + int ctrlc(void) { return 0; diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib index 4deaa5dfa7..51beff56ae 100644 --- a/scripts/Makefile.lib +++ b/scripts/Makefile.lib @@ -371,9 +371,8 @@ $(obj)/%.dtb.z: $(obj)/%.dtb FORCE dts-frags = $(subst $(quote),,$(CONFIG_EXTERNAL_DTS_FRAGMENTS)) quiet_cmd_dtc = DTC $@ -# For compatibility between make 4.2 and 4.3 -cmd_dtc = /usr/bin/env echo -e '$(pound)define $(subst -,_,$(*F))_dts 1\n'$(foreach f,$< $(2),'$(pound)include "$(f)"\n') | \ - $(CPP) $(dtc_cpp_flags) -x assembler-with-cpp -o $(dtc-tmp) - ; \ +cmd_dtc = $(CPP) $(dtc_cpp_flags) -x assembler-with-cpp -o $(dtc-tmp) \ + -D'$(subst -,_,$(*F))_dts=1' $(foreach f,$< $(2),-include '$(f)') /dev/null ; \ $(objtree)/scripts/dtc/dtc -O dtb -o $@ -b 0 \ -i $(srctree)/arch/$(SRCARCH)/dts $(DTC_FLAGS) \ -i $(srctree)/dts/src/$(SRCARCH) \ diff --git a/scripts/common.c b/scripts/common.c index e2c53c5aef..88173bc977 100644 --- a/scripts/common.c +++ b/scripts/common.c @@ -9,7 +9,6 @@ #include <string.h> #include <errno.h> #include <stdarg.h> -#include <sys/mman.h> #include "common.h" diff --git a/scripts/compiler.h b/scripts/compiler.h index c932f715c5..925cad21b6 100644 --- a/scripts/compiler.h +++ b/scripts/compiler.h @@ -61,6 +61,37 @@ typedef unsigned int uint; #elif defined(__OpenBSD__) || defined(__FreeBSD__) || \ defined(__NetBSD__) || defined(__DragonFly__) # include <sys/endian.h> +#elif defined _WIN32 +# if defined(_MSC_VER) +# include <stdlib.h> +# define htobe16(x) _byteswap_ushort(x) +# define htole16(x) (x) +# define be16toh(x) _byteswap_ushort(x) +# define le16toh(x) (x) +# define htobe32(x) _byteswap_ulong(x) +# define htole32(x) (x) +# define be32toh(x) _byteswap_ulong(x) +# define le32toh(x) (x) +# define htobe64(x) _byteswap_uint64(x) +# define htole64(x) (x) +# define be64toh(x) _byteswap_uint64(x) +# define le64toh(x) (x) +# elif defined(__GNUC__) || defined(__clang__) +# define htobe16(x) __builtin_bswap16(x) +# define htole16(x) (x) +# define be16toh(x) __builtin_bswap16(x) +# define le16toh(x) (x) +# define htobe32(x) __builtin_bswap32(x) +# define htole32(x) (x) +# define be32toh(x) __builtin_bswap32(x) +# define le32toh(x) (x) +# define htobe64(x) __builtin_bswap64(x) +# define htole64(x) (x) +# define be64toh(x) __builtin_bswap64(x) +# define le64toh(x) (x) +#else +# error platform not supported +#endif #else /* assume Linux */ # include <sys/types.h> # include <endian.h> @@ -128,11 +159,13 @@ typedef uint32_t __u32; # define be64_to_cpu(x) (x) #endif +#ifndef min #define min(x, y) ({ \ typeof(x) _min1 = (x); \ typeof(y) _min2 = (y); \ (void) (&_min1 == &_min2); \ _min1 < _min2 ? _min1 : _min2; }) +#endif static inline void *xmalloc(size_t size) { diff --git a/scripts/gen-dtb-s b/scripts/gen-dtb-s index c5c46a4d86..f6fa152593 100755 --- a/scripts/gen-dtb-s +++ b/scripts/gen-dtb-s @@ -5,6 +5,7 @@ dtb=$2 imd=$3 echo "#include <asm/barebox.lds.h>" +echo "#include <asm-generic/pointer.h>" le32() { printf ".byte 0x%02x, 0x%02x, 0x%02x, 0x%02x\n" \ @@ -49,6 +50,10 @@ echo "__dtb_${name}_start:" echo ".incbin \"$dtb\"" echo "__dtb_${name}_end:" echo ".global __dtb_${name}_end" +if [ "$imd" = "y" ]; then + echo ".balign ASM_SZPTR" + echo "ASM_PTR __barebox_imd_OF_${name}" +fi echo ".balign STRUCT_ALIGNMENT" compressed=$(${CONFIG_SHELL} "${srctree}/scripts/file-size.sh" $dtb.z) @@ -65,5 +70,9 @@ printf ".int 0x%08x\n" $uncompressed echo ".incbin \"$dtb.z\"" echo "__dtb_z_${name}_end:" echo ".global __dtb_z_${name}_end" +if [ "$imd" = "y" ]; then + echo ".balign ASM_SZPTR" + echo "ASM_PTR __barebox_imd_OF_${name}" +fi echo ".balign STRUCT_ALIGNMENT" echo "#endif" diff --git a/scripts/imx/imx-usb-loader.c b/scripts/imx/imx-usb-loader.c index 4bcb4cbab6..41d57906c7 100644 --- a/scripts/imx/imx-usb-loader.c +++ b/scripts/imx/imx-usb-loader.c @@ -31,7 +31,6 @@ #include <stdlib.h> #include <libusb.h> #include <getopt.h> -#include <arpa/inet.h> #include <linux/kernel.h> #include "../common.h" @@ -594,8 +593,8 @@ static int read_memory(unsigned addr, void *dest, unsigned cnt) int err; int rem; unsigned char tmp[64]; - read_reg_command.addr = htonl(addr); - read_reg_command.cnt = htonl(cnt); + read_reg_command.addr = htobe32(addr); + read_reg_command.cnt = htobe32(cnt); for (;;) { err = transfer(1, &read_reg_command, 16, &last_trans); @@ -651,8 +650,8 @@ static int write_memory(unsigned addr, unsigned val, int width) .rsvd = 0, }; - write_reg_command.addr = htonl(addr); - write_reg_command.cnt = htonl(4); + write_reg_command.addr = htobe32(addr); + write_reg_command.cnt = htobe32(4); if (verbose > 1) printf("write memory reg: 0x%08x val: 0x%08x width: %d\n", addr, val, width); @@ -671,7 +670,7 @@ static int write_memory(unsigned addr, unsigned val, int width) return -1; } - write_reg_command.data = htonl(val); + write_reg_command.data = htobe32(val); for (;;) { err = transfer(1, &write_reg_command, 16, &last_trans); @@ -771,8 +770,8 @@ static int load_file(void *buf, unsigned len, unsigned dladdr, len = ALIGN(len, 4); - dl_command.addr = htonl(dladdr); - dl_command.cnt = htonl(len); + dl_command.addr = htobe32(dladdr); + dl_command.cnt = htobe32(len); dl_command.rsvd = type; for (;;) { @@ -833,7 +832,7 @@ static int sdp_jump_address(unsigned addr) int last_trans, err; int retry = 0; - jump_command.addr = htonl(addr); + jump_command.addr = htobe32(addr); for (;;) { err = transfer(1, &jump_command, 16, &last_trans); @@ -862,10 +861,10 @@ static int do_dcd_v2_cmd_write(const unsigned char *dcd) int set_bits = 0, clear_bits = 0; int idx, bytes; struct imx_dcd_v2_write *recs = (struct imx_dcd_v2_write *) dcd; - int num_rec = (ntohs(recs->length) - 4) / + int num_rec = (be16toh(recs->length) - 4) / sizeof(struct imx_dcd_v2_write_rec); printf("DCD write: sub dcd length: 0x%04x, flags: 0x%02x\n", - ntohs(recs->length), recs->param); + be16toh(recs->length), recs->param); if (recs->param & PARAMETER_FLAG_MASK) { if (recs->param & PARAMETER_FLAG_SET) @@ -886,8 +885,8 @@ static int do_dcd_v2_cmd_write(const unsigned char *dcd) for (idx = 0; idx < num_rec; idx++) { const struct imx_dcd_v2_write_rec *record = &recs->data[idx]; - int ret = modify_memory(ntohl(record->addr), - ntohl(record->val), bytes, + int ret = modify_memory(be32toh(record->addr), + be32toh(record->val), bytes, set_bits, clear_bits); if (ret < 0) return ret; @@ -902,13 +901,13 @@ static int do_dcd_v2_cmd_check(const unsigned char *dcd) int bytes; enum imx_dcd_v2_check_cond cond; struct imx_dcd_v2_check *check = (struct imx_dcd_v2_check *) dcd; - switch (ntohs(check->length)) { + switch (be16toh(check->length)) { case 12: /* poll indefinitely */ poll_count = 0xffffffff; break; case 16: - poll_count = ntohl(check->count); + poll_count = be32toh(check->count); if (poll_count == 0) /* this command behaves as for NOP */ return 0; @@ -941,10 +940,10 @@ static int do_dcd_v2_cmd_check(const unsigned char *dcd) return -1; } - mask = ntohl(check->mask); + mask = be32toh(check->mask); fprintf(stderr, "DCD check condition %i on address 0x%x\n", - cond, ntohl(check->addr)); + cond, be32toh(check->addr)); /* Reduce the poll count to some arbitrary practical limit. Polling via SRP commands will be much slower compared to polling when DCD is interpreted by the SOC microcode. @@ -954,7 +953,7 @@ static int do_dcd_v2_cmd_check(const unsigned char *dcd) while (poll_count > 0) { uint32_t data = 0; - int ret = read_memory(ntohl(check->addr), &data, bytes); + int ret = read_memory(be32toh(check->addr), &data, bytes); if (ret < 0) return ret; @@ -983,7 +982,7 @@ static int do_dcd_v2_cmd_check(const unsigned char *dcd) fprintf(stderr, "Error: timeout waiting for DCD check condition %i " "on address 0x%08x to match 0x%08x\n", cond, - ntohl(check->addr), ntohl(check->mask)); + be32toh(check->addr), be32toh(check->mask)); return -1; } @@ -1015,7 +1014,7 @@ static int process_dcd_table_ivt(const struct imx_flash_header_v2 *hdr, fprintf(stderr, "Error: Unknown DCD header tag\n"); return -1; } - m_length = ntohs(dcd_hdr->length); + m_length = be16toh(dcd_hdr->length); dcd_end = dcd + m_length; if (dcd_end > file_end) { fprintf(stderr, "Error: DCD length %08x exceeds EOF\n", @@ -1028,7 +1027,7 @@ static int process_dcd_table_ivt(const struct imx_flash_header_v2 *hdr, while (dcd < dcd_end) { int ret = 0; struct imx_ivt_header *cmd_hdr = (struct imx_ivt_header *) dcd; - unsigned s_length = ntohs(cmd_hdr->length); + unsigned s_length = be16toh(cmd_hdr->length); if (dcd + s_length > file_end) { fprintf(stderr, "Error: DCD length %08x exceeds EOF\n", s_length); @@ -1473,14 +1472,14 @@ static int mxs_load_buf(uint8_t *data, int size) static struct mxs_command dl_command; int last_trans, err; - dl_command.sign = htonl(0x424c5443); /* Signature: BLTC */ - dl_command.tag = htonl(0x1); - dl_command.size = htonl(size); + dl_command.sign = htobe32(0x424c5443); /* Signature: BLTC */ + dl_command.tag = htobe32(0x1); + dl_command.size = htobe32(size); dl_command.flags = 0; dl_command.rsvd[0] = 0; dl_command.rsvd[1] = 0; dl_command.cmd = MXS_CMD_FW_DOWNLOAD; - dl_command.dw_size = htonl(size); + dl_command.dw_size = htobe32(size); err = transfer(1, &dl_command, 20, &last_trans); if (err) { diff --git a/test/self/of_manipulation.c b/test/self/of_manipulation.c index f7f95fa269..64913ac1ea 100644 --- a/test/self/of_manipulation.c +++ b/test/self/of_manipulation.c @@ -63,7 +63,7 @@ static void test_of_basics(struct device_node *root) of_property_write_u32(node2, "property2", 2); of_property_write_u32(node1, "property3", 1); - of_property_write_u32(node1, "property2", 2); + of_copy_property(node2, "property2", node1); of_rename_property(node1, "property3", "property1"); assert_equal(node1, node2); |