sunxi: Move common defconfig options to Kconfig
authorAndre Przywara <andre.przywara@arm.com>
Thu, 20 Feb 2020 17:51:14 +0000 (17:51 +0000)
committerJagan Teki <jagan@amarulasolutions.com>
Wed, 18 Mar 2020 12:55:00 +0000 (18:25 +0530)
Some config symbols are found in *almost* every _defconfig file for
Allwinner boards, because those options are actually a platform choice,
and not a per-board decision.
Some of these options are older, some have recently been added.

Move those options to be set for all Allwinner boards in their
respective Kconfig files.

The rationales are as follows:
- NR_DRAM_BANKS: All Allwinner SoC map DRAM at one contiguous region of
  address space only, starting at 1 GB. So it's always one bank.
- SPL_{DOS,EFI}_PARTITION: The Allwinner SPL does only support raw MMC
  accesses, we don't care about filesystems or partitions in there, so
  there is no need to define those symbols at all.
- USE_PREBOOT: We start USB early when a keyboard is configured, using the
  preboot env variable, so we need to set this variable.
- SYS_RELOC_GD_ENV_ADDR: We don't specify any ENV_ADDR, so need this
  symbol to be set (according to 8d8ee47e03e).
- SYS_USB_EVENT_POLL_VIA_INT_QUEUE: According to commit eab9433aa55428,
  specifying this reduces the latency of the USB keyboard handling, so
  this was formerly enabled in config headers for all Allwinner boards.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Acked-by: Maxime Ripard <mripard@kernel.org>
Tested-by: Jagan Teki <jagan@amarulasolutions.com> # Amarula A64-Relic
Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
Kconfig
arch/arm/Kconfig
disk/Kconfig
drivers/usb/Kconfig

diff --git a/Kconfig b/Kconfig
index 66148ce477908e3129c9e3b3804c7fb7fbc1855b..b4864cdf8d3e448995c3f89e50bff35a51bb43f3 100644 (file)
--- a/Kconfig
+++ b/Kconfig
@@ -115,6 +115,7 @@ config ENV_VARS_UBOOT_CONFIG
 
 config NR_DRAM_BANKS
        int "Number of DRAM banks"
+       default 1 if ARCH_SUNXI
        default 4
        help
          This defines the number of DRAM banks.
index 5d367888d8a5488fe224b2694d627afd4955a248..1cf134624a95135937906bff2714d5ebdb0526fd 100644 (file)
@@ -989,6 +989,8 @@ config ARCH_SUNXI
        select USB_KEYBOARD if DISTRO_DEFAULTS
        select USB_STORAGE if DISTRO_DEFAULTS
        select SPL_USE_TINY_PRINTF
+       select USE_PREBOOT
+       select SYS_RELOC_GD_ENV_ADDR
        imply CMD_DM
        imply CMD_GPT
        imply CMD_UBI if MTD_RAW_NAND
index 28fb81c2ee6d16d6a2e3d679740c8336aa17d13b..747275c2ba140c9c3c913baf2d59556d89ac3e27 100644 (file)
@@ -46,6 +46,7 @@ config DOS_PARTITION
 config SPL_DOS_PARTITION
        bool "Enable MS Dos partition table for SPL"
        depends on SPL && PARTITIONS
+       default n if ARCH_SUNXI
        default y if DOS_PARTITION
 
 config ISO_PARTITION
@@ -112,6 +113,7 @@ config EFI_PARTITION_ENTRIES_OFF
 config SPL_EFI_PARTITION
        bool "Enable EFI GPT partition table for SPL"
        depends on  SPL && PARTITIONS
+       default n if ARCH_SUNXI
        default y if EFI_PARTITION
 
 config PARTITION_UUIDS
index bea4a92b61f02d7a41f8532456ab731e83cd8e5e..928a89133cf89dd4f6ee31f22e8b31a6d9d567dd 100644 (file)
@@ -108,6 +108,7 @@ config USB_KEYBOARD_FN_KEYS
 
 choice
        prompt "USB keyboard polling"
+       default SYS_USB_EVENT_POLL_VIA_INT_QUEUE if ARCH_SUNXI
        default SYS_USB_EVENT_POLL
        ---help---
          Enable a polling mechanism for USB keyboard.