Commit 54d5102f authored by Paul Mundt's avatar Paul Mundt

cdrom: gdrom: Kill off PHYSADDR use.

PHYSADDR() is gone, and completely unecessary in all of the cases the
gdrom driver was using it. Kill off all references to it, and change the
one legitimate use over to virt_to_phys() instead.
Signed-off-by: default avatarPaul Mundt <lethal@linux-sh.org>
parent 95019b48
...@@ -214,7 +214,7 @@ static void gdrom_spicommand(void *spi_string, int buflen) ...@@ -214,7 +214,7 @@ static void gdrom_spicommand(void *spi_string, int buflen)
gdrom_getsense(NULL); gdrom_getsense(NULL);
return; return;
} }
outsw(PHYSADDR(GDROM_DATA_REG), cmd, 6); outsw(GDROM_DATA_REG, cmd, 6);
} }
...@@ -298,7 +298,7 @@ static int gdrom_readtoc_cmd(struct gdromtoc *toc, int session) ...@@ -298,7 +298,7 @@ static int gdrom_readtoc_cmd(struct gdromtoc *toc, int session)
err = -EINVAL; err = -EINVAL;
goto cleanup_readtoc; goto cleanup_readtoc;
} }
insw(PHYSADDR(GDROM_DATA_REG), toc, tocsize/2); insw(GDROM_DATA_REG, toc, tocsize/2);
if (gd.status & 0x01) if (gd.status & 0x01)
err = -EINVAL; err = -EINVAL;
...@@ -449,7 +449,7 @@ static int gdrom_getsense(short *bufstring) ...@@ -449,7 +449,7 @@ static int gdrom_getsense(short *bufstring)
GDROM_DEFAULT_TIMEOUT); GDROM_DEFAULT_TIMEOUT);
if (gd.pending) if (gd.pending)
goto cleanup_sense; goto cleanup_sense;
insw(PHYSADDR(GDROM_DATA_REG), &sense, sense_command->buflen/2); insw(GDROM_DATA_REG, &sense, sense_command->buflen/2);
if (sense[1] & 40) { if (sense[1] & 40) {
printk(KERN_INFO "GDROM: Drive not ready - command aborted\n"); printk(KERN_INFO "GDROM: Drive not ready - command aborted\n");
goto cleanup_sense; goto cleanup_sense;
...@@ -586,7 +586,7 @@ static void gdrom_readdisk_dma(struct work_struct *work) ...@@ -586,7 +586,7 @@ static void gdrom_readdisk_dma(struct work_struct *work)
spin_unlock(&gdrom_lock); spin_unlock(&gdrom_lock);
block = blk_rq_pos(req)/GD_TO_BLK + GD_SESSION_OFFSET; block = blk_rq_pos(req)/GD_TO_BLK + GD_SESSION_OFFSET;
block_cnt = blk_rq_sectors(req)/GD_TO_BLK; block_cnt = blk_rq_sectors(req)/GD_TO_BLK;
ctrl_outl(PHYSADDR(req->buffer), GDROM_DMA_STARTADDR_REG); ctrl_outl(virt_to_phys(req->buffer), GDROM_DMA_STARTADDR_REG);
ctrl_outl(block_cnt * GDROM_HARD_SECTOR, GDROM_DMA_LENGTH_REG); ctrl_outl(block_cnt * GDROM_HARD_SECTOR, GDROM_DMA_LENGTH_REG);
ctrl_outl(1, GDROM_DMA_DIRECTION_REG); ctrl_outl(1, GDROM_DMA_DIRECTION_REG);
ctrl_outl(1, GDROM_DMA_ENABLE_REG); ctrl_outl(1, GDROM_DMA_ENABLE_REG);
...@@ -615,7 +615,7 @@ static void gdrom_readdisk_dma(struct work_struct *work) ...@@ -615,7 +615,7 @@ static void gdrom_readdisk_dma(struct work_struct *work)
cpu_relax(); cpu_relax();
gd.pending = 1; gd.pending = 1;
gd.transfer = 1; gd.transfer = 1;
outsw(PHYSADDR(GDROM_DATA_REG), &read_command->cmd, 6); outsw(GDROM_DATA_REG, &read_command->cmd, 6);
timeout = jiffies + HZ / 2; timeout = jiffies + HZ / 2;
/* Wait for any pending DMA to finish */ /* Wait for any pending DMA to finish */
while (ctrl_inb(GDROM_DMA_STATUS_REG) && while (ctrl_inb(GDROM_DMA_STATUS_REG) &&
......
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