ide: Drop CONFIG_IDE_AHB
authorSimon Glass <sjg@chromium.org>
Sat, 22 Jan 2022 12:53:23 +0000 (05:53 -0700)
committerTom Rini <trini@konsulko.com>
Wed, 9 Feb 2022 14:16:47 +0000 (09:16 -0500)
This is not used in U-Boot anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Stefan Roese <sr@denx.de>
README
drivers/block/ide.c
include/ide.h

diff --git a/README b/README
index 9ebd4f2..4cad8f8 100644 (file)
--- a/README
+++ b/README
@@ -2393,14 +2393,6 @@ Low Level (hardware related) configuration options:
                If this macro is defined, then CONFIG_SYS_CCSRBAR_PHYS will be
                forced to a value that ensures that CCSR is not relocated.
 
-- CONFIG_IDE_AHB:
-               Most IDE controllers were designed to be connected with PCI
-               interface. Only few of them were designed for AHB interface.
-               When software is doing ATA command and data transfer to
-               IDE devices through IDE-AHB controller, some additional
-               registers accessing to these kind of IDE-AHB controller
-               is required.
-
 - CONFIG_SYS_IMMR:     Physical address of the Internal Memory.
                DO NOT CHANGE unless you know exactly what you're
                doing! (11-4) [MPC8xx systems only]
index 085aa35..63c4cfd 100644 (file)
@@ -676,28 +676,14 @@ __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) + port);
 
-#if defined(CONFIG_IDE_AHB)
-       if (port) {
-               /* write command */
-               ide_write_register(dev, port, val);
-       } else {
-               /* write data */
-               outb(val, (ATA_CURR_BASE(dev)));
-       }
-#else
        outb(val, ATA_CURR_BASE(dev) + port);
-#endif
 }
 
 __weak unsigned char ide_inb(int dev, int port)
 {
        uchar val;
 
-#if defined(CONFIG_IDE_AHB)
-       val = ide_read_register(dev, port);
-#else
        val = inb(ATA_CURR_BASE(dev) + port);
-#endif
 
        debug("ide_inb (dev= %d, port= 0x%x) : @ 0x%08lx -> 0x%02x\n",
              dev, port, ATA_CURR_BASE(dev) + port, val);
@@ -824,9 +810,6 @@ __weak void ide_input_swap_data(int dev, ulong *sect_buf, int words)
 
 __weak void ide_output_data(int dev, const ulong *sect_buf, int words)
 {
-#if defined(CONFIG_IDE_AHB)
-       ide_write_data(dev, sect_buf, words);
-#else
        uintptr_t paddr = (ATA_CURR_BASE(dev) + ATA_DATA_REG);
        ushort *dbuf;
 
@@ -837,14 +820,10 @@ __weak void ide_output_data(int dev, const ulong *sect_buf, int words)
                EIEIO;
                outw(cpu_to_le16(*dbuf++), paddr);
        }
-#endif /* CONFIG_IDE_AHB */
 }
 
 __weak void ide_input_data(int dev, ulong *sect_buf, int words)
 {
-#if defined(CONFIG_IDE_AHB)
-       ide_read_data(dev, sect_buf, words);
-#else
        uintptr_t paddr = (ATA_CURR_BASE(dev) + ATA_DATA_REG);
        ushort *dbuf;
 
@@ -858,7 +837,6 @@ __weak void ide_input_data(int dev, ulong *sect_buf, int words)
                EIEIO;
                *dbuf++ = le16_to_cpu(inw(paddr));
        }
-#endif /* CONFIG_IDE_AHB */
 }
 
 #ifdef CONFIG_BLK
index 6073943..2994b7a 100644 (file)
@@ -41,13 +41,6 @@ int ide_preinit(void);
 int ide_device_present(int dev);
 #endif
 
-#if defined(CONFIG_IDE_AHB)
-unsigned char ide_read_register(int dev, unsigned int port);
-void ide_write_register(int dev, unsigned int port, unsigned char val);
-void ide_read_data(int dev, ulong *sect_buf, int words);
-void ide_write_data(int dev, const ulong *sect_buf, int words);
-#endif
-
 /*
  * I/O function overrides
  */