* here from the previous interrupt.
*/
struct sil24_port_priv {
- void *port;
struct sil24_cmd_block *cmd_block; /* 32 cmd blocks */
dma_addr_t cmd_block_dma; /* DMA base addr for them */
};
static int sil24_qc_issue(struct ata_queued_cmd *qc)
{
struct ata_port *ap = qc->ap;
+ void *port = (void *)ap->ioaddr.cmd_addr;
struct sil24_port_priv *pp = ap->private_data;
dma_addr_t paddr = pp->cmd_block_dma + qc->tag * sizeof(*pp->cmd_block);
- writel((u32)paddr, pp->port + PORT_CMD_ACTIVATE);
+ writel((u32)paddr, port + PORT_CMD_ACTIVATE);
return 0;
}
static void sil24_reset_controller(struct ata_port *ap)
{
- struct sil24_port_priv *pp = ap->private_data;
- void *port = pp->port;
+ void *port = (void *)ap->ioaddr.cmd_addr;
int cnt;
u32 tmp;
static void sil24_error_intr(struct ata_port *ap, u32 slot_stat)
{
struct ata_queued_cmd *qc = ata_qc_from_tag(ap, ap->active_tag);
- struct sil24_port_priv *pp = ap->private_data;
- void *port = pp->port;
+ void *port = (void *)ap->ioaddr.cmd_addr;
u32 irq_stat, cmd_err, sstatus, serror;
irq_stat = readl(port + PORT_IRQ_STAT);
static inline void sil24_host_intr(struct ata_port *ap)
{
struct ata_queued_cmd *qc = ata_qc_from_tag(ap, ap->active_tag);
- struct sil24_port_priv *pp = ap->private_data;
- void *port = pp->port;
+ void *port = (void *)ap->ioaddr.cmd_addr;
u32 slot_stat;
slot_stat = readl(port + PORT_SLOT_STAT);
static int sil24_port_start(struct ata_port *ap)
{
struct device *dev = ap->host_set->dev;
- struct sil24_host_priv *hpriv = ap->host_set->private_data;
struct sil24_port_priv *pp;
struct sil24_cmd_block *cb;
size_t cb_size = sizeof(*cb);
}
memset(cb, 0, cb_size);
- pp->port = hpriv->port_base + ap->port_no * PORT_REGS_SIZE;
pp->cmd_block = cb;
pp->cmd_block_dma = cb_dma;
u32 tmp;
int cnt;
- probe_ent->port[i].cmd_addr = portu;
+ probe_ent->port[i].cmd_addr = portu + PORT_PRB;
probe_ent->port[i].scr_addr = portu + PORT_SCONTROL;
ata_std_ports(&probe_ent->port[i]);