ide: Drop unused CONFIG options

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@chromium.org>
diff --git a/README b/README
index 05b0d3f..5dee3ee 100644
--- a/README
+++ b/README
@@ -772,9 +772,6 @@
 		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 cf6b1b9..9fd9061 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 a97b72d..3541371 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 c99076c..5b9fb82 100644
--- a/drivers/block/ide.c
+++ b/drivers/block/ide.c
@@ -45,9 +45,7 @@
 
 #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 @@
 {
 	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 @@
 		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 @@
 #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 664d6d1..6b487b3 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 58ca6c2..1dd83db 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 d376216..207d1ac 100644
--- a/scripts/config_whitelist.txt
+++ b/scripts/config_whitelist.txt
@@ -605,7 +605,6 @@
 CONFIG_ICS307_REFCLK_HZ
 CONFIG_IDE_PREINIT
 CONFIG_IDE_RESET
-CONFIG_IDE_SWAP_IO
 CONFIG_IMA
 CONFIG_IMX
 CONFIG_IMX6_PWM_PER_CLK
@@ -1229,7 +1228,6 @@
 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