Commit 4e21c863 authored by Ondrej Zary's avatar Ondrej Zary Committed by Damien Le Moal

ata: pata_parport-bpck6: merge ppc6_wr_port16_blk into bpck6_write_block

ppc6_wr_port16_blk is only called by bpck6_write_block. Merge
ppc6_wr_port16_blk into bpck6_write_block.
Signed-off-by: default avatarOndrej Zary <linux@zary.sk>
Signed-off-by: default avatarDamien Le Moal <damien.lemoal@opensource.wdc.com>
parent 3967def8
...@@ -37,7 +37,15 @@ static void bpck6_write_regr(struct pi_adapter *pi, int cont, int reg, int val) ...@@ -37,7 +37,15 @@ static void bpck6_write_regr(struct pi_adapter *pi, int cont, int reg, int val)
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)
{ {
ppc6_wr_port16_blk(pi, ATA_REG_DATA, buf, (u32)len>>1); ppc6_send_cmd(pi, REG_BLKSIZE | ACCESS_REG | ACCESS_WRITE);
ppc6_wr_data_byte(pi, (u8)len);
ppc6_wr_data_byte(pi, (u8)(len >> 8));
ppc6_wr_data_byte(pi, 0);
ppc6_send_cmd(pi, CMD_PREFIX_SET | PREFIX_IO16 | PREFIX_BLK);
ppc6_send_cmd(pi, ATA_REG_DATA | ACCESS_PORT | ACCESS_WRITE);
ppc6_wr_data_blk(pi, buf, len);
ppc6_send_cmd(pi, CMD_PREFIX_RESET | PREFIX_IO16 | PREFIX_BLK);
} }
static void bpck6_read_block(struct pi_adapter *pi, char *buf, int len) static void bpck6_read_block(struct pi_adapter *pi, char *buf, int len)
......
...@@ -75,7 +75,6 @@ static u8 ppc6_rd_data_byte(struct pi_adapter *pi); ...@@ -75,7 +75,6 @@ static u8 ppc6_rd_data_byte(struct pi_adapter *pi);
static void ppc6_rd_data_blk(struct pi_adapter *pi, u8 *data, long count); static void ppc6_rd_data_blk(struct pi_adapter *pi, u8 *data, long count);
static void ppc6_wait_for_fifo(struct pi_adapter *pi); static void ppc6_wait_for_fifo(struct pi_adapter *pi);
static void ppc6_wr_data_blk(struct pi_adapter *pi, u8 *data, long count); static void ppc6_wr_data_blk(struct pi_adapter *pi, u8 *data, long count);
static void ppc6_wr_port16_blk(struct pi_adapter *pi, u8 port, u8 *data, long length);
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);
...@@ -478,26 +477,6 @@ static void ppc6_wr_data_blk(struct pi_adapter *pi, u8 *data, long count) ...@@ -478,26 +477,6 @@ static void ppc6_wr_data_blk(struct pi_adapter *pi, u8 *data, long count)
//*************************************************************************** //***************************************************************************
static void ppc6_wr_port16_blk(struct pi_adapter *pi, u8 port, u8 *data, long length)
{
length = length << 1;
ppc6_send_cmd(pi, REG_BLKSIZE | ACCESS_REG | ACCESS_WRITE);
ppc6_wr_data_byte(pi, (u8)length);
ppc6_wr_data_byte(pi, (u8)(length >> 8));
ppc6_wr_data_byte(pi, 0);
ppc6_send_cmd(pi, CMD_PREFIX_SET | PREFIX_IO16 | PREFIX_BLK);
ppc6_send_cmd(pi, port | ACCESS_PORT | ACCESS_WRITE);
ppc6_wr_data_blk(pi, data, length);
ppc6_send_cmd(pi, CMD_PREFIX_RESET | PREFIX_IO16 | PREFIX_BLK);
}
//***************************************************************************
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