Lines Matching refs:sc_reg
50 static int sis_scr_read(struct ata_link *link, unsigned int sc_reg, u32 *val);
51 static int sis_scr_write(struct ata_link *link, unsigned int sc_reg, u32 val);
99 static unsigned int get_scr_cfg_addr(struct ata_link *link, unsigned int sc_reg) in get_scr_cfg_addr() argument
103 unsigned int addr = SIS_SCR_BASE + (4 * sc_reg); in get_scr_cfg_addr()
129 unsigned int sc_reg, u32 *val) in sis_scr_cfg_read() argument
132 unsigned int cfg_addr = get_scr_cfg_addr(link, sc_reg); in sis_scr_cfg_read()
134 if (sc_reg == SCR_ERROR) /* doesn't exist in PCI cfg space */ in sis_scr_cfg_read()
142 unsigned int sc_reg, u32 val) in sis_scr_cfg_write() argument
145 unsigned int cfg_addr = get_scr_cfg_addr(link, sc_reg); in sis_scr_cfg_write()
151 static int sis_scr_read(struct ata_link *link, unsigned int sc_reg, u32 *val) in sis_scr_read() argument
156 if (sc_reg > SCR_CONTROL) in sis_scr_read()
160 return sis_scr_cfg_read(link, sc_reg, val); in sis_scr_read()
162 *val = ioread32(base + sc_reg * 4); in sis_scr_read()
166 static int sis_scr_write(struct ata_link *link, unsigned int sc_reg, u32 val) in sis_scr_write() argument
171 if (sc_reg > SCR_CONTROL) in sis_scr_write()
175 return sis_scr_cfg_write(link, sc_reg, val); in sis_scr_write()
177 iowrite32(val, base + (sc_reg * 4)); in sis_scr_write()