Lines Matching refs:sc_reg
67 static int sis_scr_read(struct ata_link *link, unsigned int sc_reg, u32 *val);
68 static int sis_scr_write(struct ata_link *link, unsigned int sc_reg, u32 val);
112 static unsigned int get_scr_cfg_addr(struct ata_link *link, unsigned int sc_reg) in get_scr_cfg_addr() argument
116 unsigned int addr = SIS_SCR_BASE + (4 * sc_reg); in get_scr_cfg_addr()
142 unsigned int sc_reg, u32 *val) in sis_scr_cfg_read() argument
145 unsigned int cfg_addr = get_scr_cfg_addr(link, sc_reg); in sis_scr_cfg_read()
147 if (sc_reg == SCR_ERROR) /* doesn't exist in PCI cfg space */ in sis_scr_cfg_read()
155 unsigned int sc_reg, u32 val) in sis_scr_cfg_write() argument
158 unsigned int cfg_addr = get_scr_cfg_addr(link, sc_reg); in sis_scr_cfg_write()
164 static int sis_scr_read(struct ata_link *link, unsigned int sc_reg, u32 *val) in sis_scr_read() argument
169 if (sc_reg > SCR_CONTROL) in sis_scr_read()
173 return sis_scr_cfg_read(link, sc_reg, val); in sis_scr_read()
175 *val = ioread32(base + sc_reg * 4); in sis_scr_read()
179 static int sis_scr_write(struct ata_link *link, unsigned int sc_reg, u32 val) in sis_scr_write() argument
184 if (sc_reg > SCR_CONTROL) in sis_scr_write()
188 return sis_scr_cfg_write(link, sc_reg, val); in sis_scr_write()
190 iowrite32(val, base + (sc_reg * 4)); in sis_scr_write()