[PATCH 1/6] sunxi: Drop BOOTCMD_SUNXI_COMPAT
Simon Glass
sjg at chromium.org
Wed Aug 7 22:50:27 CEST 2024
This dates from 2015 and talks about 'old' 3.x kernels. Perhaps we can
drop this functionality now?
Signed-off-by: Simon Glass <sjg at chromium.org>
---
arch/arm/include/asm/arch-sunxi/clock_sun4i.h | 10 ----------
arch/arm/mach-sunxi/Kconfig | 12 ------------
arch/arm/mach-sunxi/dram_sun4i.c | 4 ----
configs/icnova-a20-swac_defconfig | 1 -
include/configs/sunxi-common.h | 17 -----------------
5 files changed, 44 deletions(-)
diff --git a/arch/arm/include/asm/arch-sunxi/clock_sun4i.h b/arch/arm/include/asm/arch-sunxi/clock_sun4i.h
index 2cec91cb20e..c0a438dee53 100644
--- a/arch/arm/include/asm/arch-sunxi/clock_sun4i.h
+++ b/arch/arm/include/asm/arch-sunxi/clock_sun4i.h
@@ -142,17 +142,7 @@ struct sunxi_ccm_reg {
#define CCM_PLL1_CFG_FACTOR_M_SHIFT 0
#define PLL1_CFG_DEFAULT 0xa1005000
-
-#if defined CONFIG_OLD_SUNXI_KERNEL_COMPAT && defined CONFIG_MACH_SUN5I
-/*
- * Older linux-sunxi-3.4 kernels override our PLL6 setting with 300 MHz,
- * halving the mbus frequency, so set it to 300 MHz ourselves and base the
- * mbus divider on that.
- */
-#define PLL6_CFG_DEFAULT 0xa1009900
-#else
#define PLL6_CFG_DEFAULT 0xa1009911
-#endif
/* nand clock */
#define NAND_CLK_SRC_OSC24 0
diff --git a/arch/arm/mach-sunxi/Kconfig b/arch/arm/mach-sunxi/Kconfig
index 17666814c52..67c141ced80 100644
--- a/arch/arm/mach-sunxi/Kconfig
+++ b/arch/arm/mach-sunxi/Kconfig
@@ -294,7 +294,6 @@ config MACH_SUN6I
select SUNXI_GEN_SUN6I
select SUPPORT_SPL
select SYS_I2C_SUN6I_P2WI
- select ARMV7_BOOT_SEC_DEFAULT if OLD_SUNXI_KERNEL_COMPAT
config MACH_SUN7I
bool "sun7i (Allwinner A20)"
@@ -306,7 +305,6 @@ config MACH_SUN7I
select DRAM_SUN4I
select SUNXI_GEN_SUN4I
select SUPPORT_SPL
- select ARMV7_BOOT_SEC_DEFAULT if OLD_SUNXI_KERNEL_COMPAT
imply SPL_SYS_I2C_LEGACY
imply SYS_I2C_LEGACY
@@ -321,7 +319,6 @@ config MACH_SUN8I_A23
select SUNXI_GEN_SUN6I
select SUPPORT_SPL
select SYS_I2C_SUN8I_RSB
- select ARMV7_BOOT_SEC_DEFAULT if OLD_SUNXI_KERNEL_COMPAT
config MACH_SUN8I_A33
bool "sun8i (Allwinner A33)"
@@ -334,7 +331,6 @@ config MACH_SUN8I_A33
select SUNXI_GEN_SUN6I
select SUPPORT_SPL
select SYS_I2C_SUN8I_RSB
- select ARMV7_BOOT_SEC_DEFAULT if OLD_SUNXI_KERNEL_COMPAT
config MACH_SUN8I_A83T
bool "sun8i (Allwinner A83T)"
@@ -354,7 +350,6 @@ config MACH_SUN8I_H3
select CPU_V7_HAS_VIRT
select ARCH_SUPPORT_PSCI
select MACH_SUNXI_H3_H5
- select ARMV7_BOOT_SEC_DEFAULT if OLD_SUNXI_KERNEL_COMPAT
config MACH_SUN8I_R40
bool "sun8i (Allwinner R40)"
@@ -392,7 +387,6 @@ config MACH_SUN8I_V3S
select SUNXI_DRAM_DW
select SUNXI_DRAM_DW_16BIT
select SUPPORT_SPL
- select ARMV7_BOOT_SEC_DEFAULT if OLD_SUNXI_KERNEL_COMPAT
config MACH_SUN9I
bool "sun9i (Allwinner A80)"
@@ -746,12 +740,6 @@ config UART0_PORT_F
at the same time, the system can be only booted in the FEL mode.
Only enable this if you really know what you are doing.
-config OLD_SUNXI_KERNEL_COMPAT
- bool "Enable workarounds for booting old kernels"
- ---help---
- Set this to enable various workarounds for old kernels, this results in
- sub-optimal settings for newer kernels, only enable if needed.
-
config MMC1_PINS_PH
bool "Pins for mmc1 are on Port H"
depends on MACH_SUN4I || MACH_SUN7I || MACH_SUN8I_R40
diff --git a/arch/arm/mach-sunxi/dram_sun4i.c b/arch/arm/mach-sunxi/dram_sun4i.c
index 2cce381c9df..dfdb32111b4 100644
--- a/arch/arm/mach-sunxi/dram_sun4i.c
+++ b/arch/arm/mach-sunxi/dram_sun4i.c
@@ -249,10 +249,6 @@ static void mctl_setup_dram_clock(u32 clk, u32 mbus_clk)
reg_val &= ~CCM_PLL5_CTRL_K_MASK; /* set K to 0 (x1) */
reg_val &= ~CCM_PLL5_CTRL_N_MASK; /* set N to 0 (x0) */
reg_val &= ~CCM_PLL5_CTRL_P_MASK; /* set P to 0 (x1) */
-#ifdef CONFIG_OLD_SUNXI_KERNEL_COMPAT
- /* Old kernels are hardcoded to P=1 (divide by 2) */
- reg_val |= CCM_PLL5_CTRL_P(1);
-#endif
if (clk >= 540 && clk < 552) {
/* dram = 540MHz */
reg_val |= CCM_PLL5_CTRL_M(CCM_PLL5_CTRL_M_X(2));
diff --git a/configs/icnova-a20-swac_defconfig b/configs/icnova-a20-swac_defconfig
index 30c28f70857..b942fab2bc7 100644
--- a/configs/icnova-a20-swac_defconfig
+++ b/configs/icnova-a20-swac_defconfig
@@ -8,7 +8,6 @@ CONFIG_DEFAULT_DEVICE_TREE="sun7i-a20-icnova-swac"
CONFIG_SPL=y
CONFIG_MACH_SUN7I=y
CONFIG_DRAM_CLK=384
-CONFIG_OLD_SUNXI_KERNEL_COMPAT=y
CONFIG_USB0_VBUS_PIN="PG11"
CONFIG_USB0_VBUS_DET="PH7"
CONFIG_USB1_VBUS_PIN="PG10"
diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h
index b29a25d5617..6ae6ef1b19c 100644
--- a/include/configs/sunxi-common.h
+++ b/include/configs/sunxi-common.h
@@ -226,22 +226,6 @@
BOOT_TARGET_DEVICES_PXE(func) \
BOOT_TARGET_DEVICES_DHCP(func)
-#ifdef CONFIG_OLD_SUNXI_KERNEL_COMPAT
-#define BOOTCMD_SUNXI_COMPAT \
- "bootcmd_sunxi_compat=" \
- "setenv root /dev/mmcblk0p3 rootwait; " \
- "if ext2load mmc 0 0x44000000 uEnv.txt; then " \
- "echo Loaded environment from uEnv.txt; " \
- "env import -t 0x44000000 ${filesize}; " \
- "fi; " \
- "setenv bootargs console=${console} root=${root} ${extraargs}; " \
- "ext2load mmc 0 0x43000000 script.bin && " \
- "ext2load mmc 0 0x48000000 uImage && " \
- "bootm 0x48000000\0"
-#else
-#define BOOTCMD_SUNXI_COMPAT
-#endif
-
#include <config_distro_bootcmd.h>
#ifdef CONFIG_USB_KEYBOARD
@@ -296,7 +280,6 @@
"uuid_gpt_esp=" UUID_GPT_ESP "\0" \
"uuid_gpt_system=" UUID_GPT_SYSTEM "\0" \
"partitions=" PARTS_DEFAULT "\0" \
- BOOTCMD_SUNXI_COMPAT \
BOOTENV
#endif /* _SUNXI_COMMON_CONFIG_H */
--
2.34.1
More information about the U-Boot
mailing list