[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230307224627.28011-23-linux@zary.sk>
Date: Tue, 7 Mar 2023 23:46:17 +0100
From: Ondrej Zary <linux@...y.sk>
To: Damien Le Moal <damien.lemoal@...nsource.wdc.com>,
Sudip Mukherjee <sudipm.mukherjee@...il.com>
Cc: Christoph Hellwig <hch@....de>,
Sergey Shtylyov <s.shtylyov@....ru>,
Jens Axboe <axboe@...nel.dk>, Tim Waugh <tim@...erelk.net>,
linux-block@...r.kernel.org, linux-parport@...ts.infradead.org,
linux-ide@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH 22/32] pata_parport-bpck6: move ppc6_wait_for_fifo to bpck6.c and rename
Move ppc6_wait_for_fifo to bpck6.c and rename it to bpck6_wait_for_fifo
Signed-off-by: Ondrej Zary <linux@...y.sk>
---
drivers/ata/pata_parport/bpck6.c | 16 +++++++++++++---
drivers/ata/pata_parport/ppc6lnx.c | 14 --------------
2 files changed, 13 insertions(+), 17 deletions(-)
diff --git a/drivers/ata/pata_parport/bpck6.c b/drivers/ata/pata_parport/bpck6.c
index 27c1fa3bb336..1f976ee04ef2 100644
--- a/drivers/ata/pata_parport/bpck6.c
+++ b/drivers/ata/pata_parport/bpck6.c
@@ -35,6 +35,16 @@ static void bpck6_write_regr(struct pi_adapter *pi, int cont, int reg, int val)
ppc6_wr_data_byte(pi, val);
}
+static void bpck6_wait_for_fifo(struct pi_adapter *pi)
+{
+ int i;
+
+ if (pi->private & fifo_wait) {
+ for (i = 0; i < 20; i++)
+ parport_read_status(pi->pardev->port);
+ }
+}
+
static void bpck6_write_block(struct pi_adapter *pi, char *buf, int len)
{
u8 this, last;
@@ -87,17 +97,17 @@ static void bpck6_write_block(struct pi_adapter *pi, char *buf, int len)
case PPCMODE_EPP_BYTE:
pi->pardev->port->ops->epp_write_data(pi->pardev->port, buf,
len, PARPORT_EPP_FAST_8);
- ppc6_wait_for_fifo(pi);
+ bpck6_wait_for_fifo(pi);
break;
case PPCMODE_EPP_WORD:
pi->pardev->port->ops->epp_write_data(pi->pardev->port, buf,
len, PARPORT_EPP_FAST_16);
- ppc6_wait_for_fifo(pi);
+ bpck6_wait_for_fifo(pi);
break;
case PPCMODE_EPP_DWORD:
pi->pardev->port->ops->epp_write_data(pi->pardev->port, buf,
len, PARPORT_EPP_FAST_32);
- ppc6_wait_for_fifo(pi);
+ bpck6_wait_for_fifo(pi);
break;
}
diff --git a/drivers/ata/pata_parport/ppc6lnx.c b/drivers/ata/pata_parport/ppc6lnx.c
index 3ba920251c1c..cd4fa31a5ff8 100644
--- a/drivers/ata/pata_parport/ppc6lnx.c
+++ b/drivers/ata/pata_parport/ppc6lnx.c
@@ -72,7 +72,6 @@ static void ppc6_deselect(struct pi_adapter *pi);
static void ppc6_send_cmd(struct pi_adapter *pi, u8 cmd);
static void ppc6_wr_data_byte(struct pi_adapter *pi, u8 data);
static u8 ppc6_rd_data_byte(struct pi_adapter *pi);
-static void ppc6_wait_for_fifo(struct pi_adapter *pi);
static void ppc6_wr_extout(struct pi_adapter *pi, u8 regdata);
static int ppc6_open(struct pi_adapter *pi);
@@ -282,19 +281,6 @@ static u8 ppc6_rd_data_byte(struct pi_adapter *pi)
//***************************************************************************
-static void ppc6_wait_for_fifo(struct pi_adapter *pi)
-{
- int i;
-
- if (pi->private & fifo_wait)
- {
- for(i=0; i<20; i++)
- parport_read_status(pi->pardev->port);
- }
-}
-
-//***************************************************************************
-
static void ppc6_wr_extout(struct pi_adapter *pi, u8 regdata)
{
ppc6_send_cmd(pi, REG_VERSION | ACCESS_REG | ACCESS_WRITE);
--
Ondrej Zary
Powered by blists - more mailing lists