Lines Matching refs:sc_reg
67 static u32 sis_scr_read (struct ata_port *ap, unsigned int sc_reg);
68 static void sis_scr_write (struct ata_port *ap, unsigned int sc_reg, u32 val);
146 static unsigned int get_scr_cfg_addr(struct ata_port *ap, unsigned int sc_reg)
149 unsigned int addr = SIS_SCR_BASE + (4 * sc_reg);
171 static u32 sis_scr_cfg_read (struct ata_port *ap, unsigned int sc_reg)
174 unsigned int cfg_addr = get_scr_cfg_addr(ap, sc_reg);
178 if (sc_reg == SCR_ERROR) /* doesn't exist in PCI cfg space */
192 static void sis_scr_cfg_write (struct ata_port *ap, unsigned int sc_reg, u32 val)
195 unsigned int cfg_addr = get_scr_cfg_addr(ap, sc_reg);
198 if (sc_reg == SCR_ERROR) /* doesn't exist in PCI cfg space */
210 static u32 sis_scr_read (struct ata_port *ap, unsigned int sc_reg)
216 if (sc_reg > SCR_CONTROL)
220 return sis_scr_cfg_read(ap, sc_reg);
224 val = ioread32(ap->ioaddr.scr_addr + (sc_reg * 4));
228 val2 = ioread32(ap->ioaddr.scr_addr + (sc_reg * 4) + 0x10);
233 static void sis_scr_write (struct ata_port *ap, unsigned int sc_reg, u32 val)
238 if (sc_reg > SCR_CONTROL)
244 sis_scr_cfg_write(ap, sc_reg, val);
246 iowrite32(val, ap->ioaddr.scr_addr + (sc_reg * 4));
249 iowrite32(val, ap->ioaddr.scr_addr + (sc_reg * 4)+0x10);