[PATCH v2 09/11] ide: Drop unused CONFIG options
Simon Glass
sjg at chromium.org
Wed Nov 24 17:26:47 CET 2021
CONFIG_SYS_ATA_PORT_ADDR is not used in the code anymore. Drop it and use
ATA_PORT_ADDR() locally instead.
Drop CONFIG_IDE_RESET_ROUTINE and CONFIG_IDE_SWAP_IO which are also
unused.
Signed-off-by: Simon Glass <sjg at chromium.org>
---
(no changes since v1)
README | 3 ---
arch/arm/mach-kirkwood/include/mach/config.h | 2 --
arch/powerpc/include/asm/config.h | 3 ---
drivers/block/ide.c | 12 +++++-------
include/configs/edminiv2.h | 2 --
include/configs/r2dplus.h | 1 -
scripts/config_whitelist.txt | 2 --
7 files changed, 5 insertions(+), 20 deletions(-)
diff --git a/README b/README
index 91eeaca96d2..715d693f1d6 100644
--- a/README
+++ b/README
@@ -785,9 +785,6 @@ The following options need to be configured:
least one non-MTD partition type as well.
- IDE Reset method:
- CONFIG_IDE_RESET_ROUTINE - this is defined in several
- board configurations files but used nowhere!
-
CONFIG_IDE_RESET - is this is defined, IDE Reset will
be performed by calling the function
ide_set_reset(int reset)
diff --git a/arch/arm/mach-kirkwood/include/mach/config.h b/arch/arm/mach-kirkwood/include/mach/config.h
index cf6b1b9b634..9fd90611bd9 100644
--- a/arch/arm/mach-kirkwood/include/mach/config.h
+++ b/arch/arm/mach-kirkwood/include/mach/config.h
@@ -67,8 +67,6 @@
*/
#ifdef CONFIG_IDE
#define __io
-/* Needs byte-swapping for ATA data register */
-#define CONFIG_IDE_SWAP_IO
/* Data, registers and alternate blocks are at the same offset */
#define CONFIG_SYS_ATA_DATA_OFFSET (0x0100)
#define CONFIG_SYS_ATA_REG_OFFSET (0x0100)
diff --git a/arch/powerpc/include/asm/config.h b/arch/powerpc/include/asm/config.h
index a97b72de1b8..354137124d8 100644
--- a/arch/powerpc/include/asm/config.h
+++ b/arch/powerpc/include/asm/config.h
@@ -51,9 +51,6 @@
/* The FMAN driver uses the PHYLIB infrastructure */
-/* All PPC boards must swap IDE bytes */
-#define CONFIG_IDE_SWAP_IO
-
#if defined(CONFIG_DM_SERIAL) && !defined(CONFIG_CLK_MPC83XX)
/*
* TODO: Convert this to a clock driver exists that can give us the UART
diff --git a/drivers/block/ide.c b/drivers/block/ide.c
index c99076c6f45..5b9fb821e06 100644
--- a/drivers/block/ide.c
+++ b/drivers/block/ide.c
@@ -45,9 +45,7 @@ struct blk_desc ide_dev_desc[CONFIG_SYS_IDE_MAXDEVICE];
#define IDE_SPIN_UP_TIME_OUT 5000 /* 5 sec spin-up timeout */
-#ifndef CONFIG_SYS_ATA_PORT_ADDR
-#define CONFIG_SYS_ATA_PORT_ADDR(port) (port)
-#endif
+#define ATA_PORT_ADDR(port) (port)
#ifdef CONFIG_IDE_RESET
extern void ide_set_reset(int idereset);
@@ -679,7 +677,7 @@ __weak void ide_outb(int dev, int port, unsigned char val)
{
debug("ide_outb (dev= %d, port= 0x%x, val= 0x%02x) : @ 0x%08lx\n",
dev, port, val,
- (ATA_CURR_BASE(dev) + CONFIG_SYS_ATA_PORT_ADDR(port)));
+ (ATA_CURR_BASE(dev) + ATA_PORT_ADDR(port)));
#if defined(CONFIG_IDE_AHB)
if (port) {
@@ -690,7 +688,7 @@ __weak void ide_outb(int dev, int port, unsigned char val)
outb(val, (ATA_CURR_BASE(dev)));
}
#else
- outb(val, (ATA_CURR_BASE(dev) + CONFIG_SYS_ATA_PORT_ADDR(port)));
+ outb(val, (ATA_CURR_BASE(dev) + ATA_PORT_ADDR(port)));
#endif
}
@@ -701,12 +699,12 @@ __weak unsigned char ide_inb(int dev, int port)
#if defined(CONFIG_IDE_AHB)
val = ide_read_register(dev, port);
#else
- val = inb((ATA_CURR_BASE(dev) + CONFIG_SYS_ATA_PORT_ADDR(port)));
+ val = inb((ATA_CURR_BASE(dev) + ATA_PORT_ADDR(port)));
#endif
debug("ide_inb (dev= %d, port= 0x%x) : @ 0x%08lx -> 0x%02x\n",
dev, port,
- (ATA_CURR_BASE(dev) + CONFIG_SYS_ATA_PORT_ADDR(port)), val);
+ (ATA_CURR_BASE(dev) + ATA_PORT_ADDR(port)), val);
return val;
}
diff --git a/include/configs/edminiv2.h b/include/configs/edminiv2.h
index 664d6d1f340..6b487b310cc 100644
--- a/include/configs/edminiv2.h
+++ b/include/configs/edminiv2.h
@@ -113,8 +113,6 @@
*/
#ifdef CONFIG_IDE
#define __io
-/* Needs byte-swapping for ATA data register */
-#define CONFIG_IDE_SWAP_IO
/* Data, registers and alternate blocks are at the same offset */
#define CONFIG_SYS_ATA_DATA_OFFSET (0x0100)
#define CONFIG_SYS_ATA_REG_OFFSET (0x0100)
diff --git a/include/configs/r2dplus.h b/include/configs/r2dplus.h
index 58ca6c28b53..1dd83dbf64d 100644
--- a/include/configs/r2dplus.h
+++ b/include/configs/r2dplus.h
@@ -44,7 +44,6 @@
#define CONFIG_SYS_ATA_DATA_OFFSET 0x1000 /* data reg offset */
#define CONFIG_SYS_ATA_REG_OFFSET 0x1000 /* reg offset */
#define CONFIG_SYS_ATA_ALT_OFFSET 0x800 /* alternate register offset */
-#define CONFIG_IDE_SWAP_IO
/*
* SuperH PCI Bridge Configration
diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt
index 74d52c871fc..e34643ba527 100644
--- a/scripts/config_whitelist.txt
+++ b/scripts/config_whitelist.txt
@@ -605,7 +605,6 @@ CONFIG_ICACHE
CONFIG_ICS307_REFCLK_HZ
CONFIG_IDE_PREINIT
CONFIG_IDE_RESET
-CONFIG_IDE_SWAP_IO
CONFIG_IMA
CONFIG_IMX
CONFIG_IMX6_PWM_PER_CLK
@@ -1231,7 +1230,6 @@ CONFIG_SYS_ATA_BASE_ADDR
CONFIG_SYS_ATA_DATA_OFFSET
CONFIG_SYS_ATA_IDE0_OFFSET
CONFIG_SYS_ATA_IDE1_OFFSET
-CONFIG_SYS_ATA_PORT_ADDR
CONFIG_SYS_ATA_REG_OFFSET
CONFIG_SYS_ATA_STRIDE
CONFIG_SYS_ATMEL_CPU_NAME
--
2.34.0.rc2.393.gf8c9666880-goog
More information about the U-Boot
mailing list