Commit 144e7799 authored by Ondrej Zary's avatar Ondrej Zary Committed by Damien Le Moal

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: default avatarOndrej Zary <linux@zary.sk>
Signed-off-by: default avatarDamien Le Moal <damien.lemoal@opensource.wdc.com>
parent 99c40a70
...@@ -35,6 +35,16 @@ static void bpck6_write_regr(struct pi_adapter *pi, int cont, int reg, int val) ...@@ -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); 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) static void bpck6_write_block(struct pi_adapter *pi, char *buf, int len)
{ {
u8 this, last; u8 this, last;
...@@ -87,17 +97,17 @@ static void bpck6_write_block(struct pi_adapter *pi, char *buf, int len) ...@@ -87,17 +97,17 @@ static void bpck6_write_block(struct pi_adapter *pi, char *buf, int len)
case PPCMODE_EPP_BYTE: case PPCMODE_EPP_BYTE:
pi->pardev->port->ops->epp_write_data(pi->pardev->port, buf, pi->pardev->port->ops->epp_write_data(pi->pardev->port, buf,
len, PARPORT_EPP_FAST_8); len, PARPORT_EPP_FAST_8);
ppc6_wait_for_fifo(pi); bpck6_wait_for_fifo(pi);
break; break;
case PPCMODE_EPP_WORD: case PPCMODE_EPP_WORD:
pi->pardev->port->ops->epp_write_data(pi->pardev->port, buf, pi->pardev->port->ops->epp_write_data(pi->pardev->port, buf,
len, PARPORT_EPP_FAST_16); len, PARPORT_EPP_FAST_16);
ppc6_wait_for_fifo(pi); bpck6_wait_for_fifo(pi);
break; break;
case PPCMODE_EPP_DWORD: case PPCMODE_EPP_DWORD:
pi->pardev->port->ops->epp_write_data(pi->pardev->port, buf, pi->pardev->port->ops->epp_write_data(pi->pardev->port, buf,
len, PARPORT_EPP_FAST_32); len, PARPORT_EPP_FAST_32);
ppc6_wait_for_fifo(pi); bpck6_wait_for_fifo(pi);
break; break;
} }
......
...@@ -72,7 +72,6 @@ static void ppc6_deselect(struct pi_adapter *pi); ...@@ -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_send_cmd(struct pi_adapter *pi, u8 cmd);
static void ppc6_wr_data_byte(struct pi_adapter *pi, u8 data); static void ppc6_wr_data_byte(struct pi_adapter *pi, u8 data);
static u8 ppc6_rd_data_byte(struct pi_adapter *pi); 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 void ppc6_wr_extout(struct pi_adapter *pi, u8 regdata);
static int ppc6_open(struct pi_adapter *pi); static int ppc6_open(struct pi_adapter *pi);
...@@ -282,19 +281,6 @@ static u8 ppc6_rd_data_byte(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) static void ppc6_wr_extout(struct pi_adapter *pi, u8 regdata)
{ {
ppc6_send_cmd(pi, REG_VERSION | ACCESS_REG | ACCESS_WRITE); ppc6_send_cmd(pi, REG_VERSION | ACCESS_REG | ACCESS_WRITE);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment