Home
last modified time | relevance | path

Searched refs:sc_reg (Results 1 – 13 of 13) sorted by relevance

/drivers/ata/
Dsata_sis.c67 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_port *ap, unsigned int sc_reg) in get_scr_cfg_addr() argument
115 unsigned int addr = SIS_SCR_BASE + (4 * sc_reg); in get_scr_cfg_addr()
138 unsigned int sc_reg, u32 *val) in sis_scr_cfg_read() argument
141 unsigned int cfg_addr = get_scr_cfg_addr(link->ap, sc_reg); in sis_scr_cfg_read()
145 if (sc_reg == SCR_ERROR) /* doesn't exist in PCI cfg space */ in sis_scr_cfg_read()
163 unsigned int sc_reg, u32 val) in sis_scr_cfg_write() argument
166 unsigned int cfg_addr = get_scr_cfg_addr(link->ap, sc_reg); in sis_scr_cfg_write()
169 if (sc_reg == SCR_ERROR) /* doesn't exist in PCI cfg space */ in sis_scr_cfg_write()
[all …]
Dsata_uli.c60 static int uli_scr_read(struct ata_link *link, unsigned int sc_reg, u32 *val);
61 static int uli_scr_write(struct ata_link *link, unsigned int sc_reg, u32 val);
104 static unsigned int get_scr_cfg_addr(struct ata_port *ap, unsigned int sc_reg) in get_scr_cfg_addr() argument
107 return hpriv->scr_cfg_addr[ap->port_no] + (4 * sc_reg); in get_scr_cfg_addr()
110 static u32 uli_scr_cfg_read(struct ata_link *link, unsigned int sc_reg) in uli_scr_cfg_read() argument
113 unsigned int cfg_addr = get_scr_cfg_addr(link->ap, sc_reg); in uli_scr_cfg_read()
128 static int uli_scr_read(struct ata_link *link, unsigned int sc_reg, u32 *val) in uli_scr_read() argument
130 if (sc_reg > SCR_CONTROL) in uli_scr_read()
133 *val = uli_scr_cfg_read(link, sc_reg); in uli_scr_read()
137 static int uli_scr_write(struct ata_link *link, unsigned int sc_reg, u32 val) in uli_scr_write() argument
[all …]
Dsata_via.c76 static int svia_scr_read(struct ata_link *link, unsigned int sc_reg, u32 *val);
77 static int svia_scr_write(struct ata_link *link, unsigned int sc_reg, u32 val);
186 static int svia_scr_read(struct ata_link *link, unsigned int sc_reg, u32 *val) in svia_scr_read() argument
188 if (sc_reg > SCR_CONTROL) in svia_scr_read()
190 *val = ioread32(link->ap->ioaddr.scr_addr + (4 * sc_reg)); in svia_scr_read()
194 static int svia_scr_write(struct ata_link *link, unsigned int sc_reg, u32 val) in svia_scr_write() argument
196 if (sc_reg > SCR_CONTROL) in svia_scr_write()
198 iowrite32(val, link->ap->ioaddr.scr_addr + (4 * sc_reg)); in svia_scr_write()
Dsata_vsc.c102 unsigned int sc_reg, u32 *val) in vsc_sata_scr_read() argument
104 if (sc_reg > SCR_CONTROL) in vsc_sata_scr_read()
106 *val = readl(link->ap->ioaddr.scr_addr + (sc_reg * 4)); in vsc_sata_scr_read()
112 unsigned int sc_reg, u32 val) in vsc_sata_scr_write() argument
114 if (sc_reg > SCR_CONTROL) in vsc_sata_scr_write()
116 writel(val, link->ap->ioaddr.scr_addr + (sc_reg * 4)); in vsc_sata_scr_write()
Dsata_sil.c121 static int sil_scr_read(struct ata_link *link, unsigned int sc_reg, u32 *val);
122 static int sil_scr_write(struct ata_link *link, unsigned int sc_reg, u32 val);
394 unsigned int sc_reg) in sil_scr_addr() argument
398 switch (sc_reg) { in sil_scr_addr()
413 static int sil_scr_read(struct ata_link *link, unsigned int sc_reg, u32 *val) in sil_scr_read() argument
415 void __iomem *mmio = sil_scr_addr(link->ap, sc_reg); in sil_scr_read()
424 static int sil_scr_write(struct ata_link *link, unsigned int sc_reg, u32 val) in sil_scr_write() argument
426 void __iomem *mmio = sil_scr_addr(link->ap, sc_reg); in sil_scr_write()
Dsata_qstor.c114 static int qs_scr_read(struct ata_link *link, unsigned int sc_reg, u32 *val);
115 static int qs_scr_write(struct ata_link *link, unsigned int sc_reg, u32 val);
245 static int qs_scr_read(struct ata_link *link, unsigned int sc_reg, u32 *val) in qs_scr_read() argument
247 if (sc_reg > SCR_CONTROL) in qs_scr_read()
249 *val = readl(link->ap->ioaddr.scr_addr + (sc_reg * 8)); in qs_scr_read()
259 static int qs_scr_write(struct ata_link *link, unsigned int sc_reg, u32 val) in qs_scr_write() argument
261 if (sc_reg > SCR_CONTROL) in qs_scr_write()
263 writel(val, link->ap->ioaddr.scr_addr + (sc_reg * 8)); in qs_scr_write()
Dsata_svw.c127 unsigned int sc_reg, u32 *val) in k2_sata_scr_read() argument
129 if (sc_reg > SCR_CONTROL) in k2_sata_scr_read()
131 *val = readl(link->ap->ioaddr.scr_addr + (sc_reg * 4)); in k2_sata_scr_read()
137 unsigned int sc_reg, u32 val) in k2_sata_scr_write() argument
139 if (sc_reg > SCR_CONTROL) in k2_sata_scr_write()
141 writel(val, link->ap->ioaddr.scr_addr + (sc_reg * 4)); in k2_sata_scr_write()
Dsata_inic162x.c272 static int inic_scr_read(struct ata_link *link, unsigned sc_reg, u32 *val) in inic_scr_read() argument
277 if (unlikely(sc_reg >= ARRAY_SIZE(scr_map))) in inic_scr_read()
280 addr = scr_addr + scr_map[sc_reg] * 4; in inic_scr_read()
281 *val = readl(scr_addr + scr_map[sc_reg] * 4); in inic_scr_read()
284 if (sc_reg == SCR_ERROR) in inic_scr_read()
289 static int inic_scr_write(struct ata_link *link, unsigned sc_reg, u32 val) in inic_scr_write() argument
293 if (unlikely(sc_reg >= ARRAY_SIZE(scr_map))) in inic_scr_write()
296 writel(val, scr_addr + scr_map[sc_reg] * 4); in inic_scr_write()
Dsata_sil24.c336 static int sil24_scr_read(struct ata_link *link, unsigned sc_reg, u32 *val);
337 static int sil24_scr_write(struct ata_link *link, unsigned sc_reg, u32 val);
500 static int sil24_scr_read(struct ata_link *link, unsigned sc_reg, u32 *val) in sil24_scr_read() argument
504 if (sc_reg < ARRAY_SIZE(sil24_scr_map)) { in sil24_scr_read()
506 addr = scr_addr + sil24_scr_map[sc_reg] * 4; in sil24_scr_read()
507 *val = readl(scr_addr + sil24_scr_map[sc_reg] * 4); in sil24_scr_read()
513 static int sil24_scr_write(struct ata_link *link, unsigned sc_reg, u32 val) in sil24_scr_write() argument
517 if (sc_reg < ARRAY_SIZE(sil24_scr_map)) { in sil24_scr_write()
519 addr = scr_addr + sil24_scr_map[sc_reg] * 4; in sil24_scr_write()
520 writel(val, scr_addr + sil24_scr_map[sc_reg] * 4); in sil24_scr_write()
Dsata_promise.c140 static int pdc_sata_scr_read(struct ata_link *link, unsigned int sc_reg, u32 *val);
141 static int pdc_sata_scr_write(struct ata_link *link, unsigned int sc_reg, u32 val);
396 unsigned int sc_reg, u32 *val) in pdc_sata_scr_read() argument
398 if (sc_reg > SCR_CONTROL) in pdc_sata_scr_read()
400 *val = readl(link->ap->ioaddr.scr_addr + (sc_reg * 4)); in pdc_sata_scr_read()
405 unsigned int sc_reg, u32 val) in pdc_sata_scr_write() argument
407 if (sc_reg > SCR_CONTROL) in pdc_sata_scr_write()
409 writel(val, link->ap->ioaddr.scr_addr + (sc_reg * 4)); in pdc_sata_scr_write()
Dsata_fsl.c477 unsigned int sc_reg; in sata_fsl_scr_write() local
484 sc_reg = sc_reg_in; in sata_fsl_scr_write()
490 VPRINTK("xx_scr_write, reg_in = %d\n", sc_reg); in sata_fsl_scr_write()
492 iowrite32(val, ssr_base + (sc_reg * 4)); in sata_fsl_scr_write()
501 unsigned int sc_reg; in sata_fsl_scr_read() local
508 sc_reg = sc_reg_in; in sata_fsl_scr_read()
514 VPRINTK("xx_scr_read, reg_in = %d\n", sc_reg); in sata_fsl_scr_read()
516 *val = ioread32(ssr_base + (sc_reg * 4)); in sata_fsl_scr_read()
Dahci.c286 static int ahci_scr_read(struct ata_link *link, unsigned int sc_reg, u32 *val);
287 static int ahci_scr_write(struct ata_link *link, unsigned int sc_reg, u32 val);
826 static unsigned ahci_scr_offset(struct ata_port *ap, unsigned int sc_reg) in ahci_scr_offset() argument
837 if (sc_reg < ARRAY_SIZE(offset) && in ahci_scr_offset()
838 (sc_reg != SCR_NOTIFICATION || (hpriv->cap & HOST_CAP_SNTF))) in ahci_scr_offset()
839 return offset[sc_reg]; in ahci_scr_offset()
843 static int ahci_scr_read(struct ata_link *link, unsigned int sc_reg, u32 *val) in ahci_scr_read() argument
846 int offset = ahci_scr_offset(link->ap, sc_reg); in ahci_scr_read()
855 static int ahci_scr_write(struct ata_link *link, unsigned int sc_reg, u32 val) in ahci_scr_write() argument
858 int offset = ahci_scr_offset(link->ap, sc_reg); in ahci_scr_write()
Dsata_nv.c305 static int nv_scr_read(struct ata_link *link, unsigned int sc_reg, u32 *val);
306 static int nv_scr_write(struct ata_link *link, unsigned int sc_reg, u32 val);
1543 static int nv_scr_read(struct ata_link *link, unsigned int sc_reg, u32 *val) in nv_scr_read() argument
1545 if (sc_reg > SCR_CONTROL) in nv_scr_read()
1548 *val = ioread32(link->ap->ioaddr.scr_addr + (sc_reg * 4)); in nv_scr_read()
1552 static int nv_scr_write(struct ata_link *link, unsigned int sc_reg, u32 val) in nv_scr_write() argument
1554 if (sc_reg > SCR_CONTROL) in nv_scr_write()
1557 iowrite32(val, link->ap->ioaddr.scr_addr + (sc_reg * 4)); in nv_scr_write()