From 144e7799ad1115c933c31138758d57646d4cbb44 Mon Sep 17 00:00:00 2001 From: Ondrej Zary Date: Tue, 7 Mar 2023 23:46:17 +0100 Subject: ata: 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 Signed-off-by: Damien Le Moal --- 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); -- cgit v1.2.3