diff mbox series

[U-Boot] ata: ahci: drop read-only ahci_ioports members

Message ID 20190514083341.13828-1-christian.gmeiner@gmail.com
State Accepted
Commit 26992928e80a7f8d86267985b211a858094dc389
Delegated to: Tom Rini
Headers show
Series [U-Boot] ata: ahci: drop read-only ahci_ioports members | expand

Commit Message

Christian Gmeiner May 14, 2019, 8:33 a.m. UTC
Also get rid of ahci_setup_port(..).

Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
---
 drivers/ata/ahci.c | 12 ------------
 include/ahci.h     |  2 --
 2 files changed, 14 deletions(-)

Comments

Simon Glass May 18, 2019, 4:08 p.m. UTC | #1
On Tue, 14 May 2019 at 02:33, Christian Gmeiner
<christian.gmeiner@gmail.com> wrote:
>
> Also get rid of ahci_setup_port(..).
>
> Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
> ---
>  drivers/ata/ahci.c | 12 ------------
>  include/ahci.h     |  2 --
>  2 files changed, 14 deletions(-)
>

Reviewed-by: Simon Glass <sjg@chromium.org>
Tom Rini May 19, 2019, 8:45 p.m. UTC | #2
On Tue, May 14, 2019 at 10:33:41AM +0200, Christian Gmeiner wrote:

> Also get rid of ahci_setup_port(..).
> 
> Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>

Applied to u-boot/master, thanks!
diff mbox series

Patch

diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
index 188d843197..e3135bb75f 100644
--- a/drivers/ata/ahci.c
+++ b/drivers/ata/ahci.c
@@ -55,17 +55,6 @@  __weak void __iomem *ahci_port_base(void __iomem *base, u32 port)
 	return base + 0x100 + (port * 0x80);
 }
 
-
-static void ahci_setup_port(struct ahci_ioports *port, void __iomem *base,
-			    unsigned int port_idx)
-{
-	base = ahci_port_base(base, port_idx);
-
-	port->cmd_addr = base;
-	port->scr_addr = base + PORT_SCR;
-}
-
-
 #define msleep(a) udelay(a * 1000)
 
 static void ahci_dcache_flush_range(unsigned long begin, unsigned long len)
@@ -240,7 +229,6 @@  static int ahci_host_init(struct ahci_uc_priv *uc_priv)
 			continue;
 		uc_priv->port[i].port_mmio = ahci_port_base(mmio, i);
 		port_mmio = (u8 *)uc_priv->port[i].port_mmio;
-		ahci_setup_port(&uc_priv->port[i], mmio, i);
 
 		/* make sure port is not active */
 		tmp = readl(port_mmio + PORT_CMD);
diff --git a/include/ahci.h b/include/ahci.h
index b42df6c77e..fb96dd8861 100644
--- a/include/ahci.h
+++ b/include/ahci.h
@@ -134,8 +134,6 @@  struct ahci_sg {
 };
 
 struct ahci_ioports {
-	void __iomem	*cmd_addr;
-	void __iomem	*scr_addr;
 	void __iomem	*port_mmio;
 	struct ahci_cmd_hdr	*cmd_slot;
 	struct ahci_sg		*cmd_tbl_sg;