/openbmc/linux/drivers/ata/ |
H A D | sata_sis.c | 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() 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() 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() 171 if (sc_reg > SCR_CONTROL) in sis_scr_write() 175 return sis_scr_cfg_write(link, sc_reg, val); in sis_scr_write() [all …]
|
H A D | sata_uli.c | 44 static int uli_scr_read(struct ata_link *link, unsigned int sc_reg, u32 *val); 45 static int uli_scr_write(struct ata_link *link, unsigned int sc_reg, u32 val); 90 return hpriv->scr_cfg_addr[ap->port_no] + (4 * sc_reg); in get_scr_cfg_addr() 93 static u32 uli_scr_cfg_read(struct ata_link *link, unsigned int sc_reg) in uli_scr_cfg_read() argument 96 unsigned int cfg_addr = get_scr_cfg_addr(link->ap, sc_reg); in uli_scr_cfg_read() 111 static int uli_scr_read(struct ata_link *link, unsigned int sc_reg, u32 *val) in uli_scr_read() argument 113 if (sc_reg > SCR_CONTROL) in uli_scr_read() 116 *val = uli_scr_cfg_read(link, sc_reg); in uli_scr_read() 120 static int uli_scr_write(struct ata_link *link, unsigned int sc_reg, u32 val) in uli_scr_write() argument 122 if (sc_reg > SCR_CONTROL) //SCR_CONTROL=2, SCR_ERROR=1, SCR_STATUS=0 in uli_scr_write() [all …]
|
H A D | sata_vsc.c | 85 unsigned int sc_reg, u32 *val) in vsc_sata_scr_read() argument 87 if (sc_reg > SCR_CONTROL) in vsc_sata_scr_read() 89 *val = readl(link->ap->ioaddr.scr_addr + (sc_reg * 4)); in vsc_sata_scr_read() 95 unsigned int sc_reg, u32 val) in vsc_sata_scr_write() argument 97 if (sc_reg > SCR_CONTROL) in vsc_sata_scr_write() 99 writel(val, link->ap->ioaddr.scr_addr + (sc_reg * 4)); in vsc_sata_scr_write()
|
H A D | sata_qstor.c | 98 static int qs_scr_read(struct ata_link *link, unsigned int sc_reg, u32 *val); 99 static int qs_scr_write(struct ata_link *link, unsigned int sc_reg, u32 val); 214 static int qs_scr_read(struct ata_link *link, unsigned int sc_reg, u32 *val) in qs_scr_read() argument 216 if (sc_reg > SCR_CONTROL) in qs_scr_read() 218 *val = readl(link->ap->ioaddr.scr_addr + (sc_reg * 8)); in qs_scr_read() 228 static int qs_scr_write(struct ata_link *link, unsigned int sc_reg, u32 val) in qs_scr_write() argument 230 if (sc_reg > SCR_CONTROL) in qs_scr_write() 232 writel(val, link->ap->ioaddr.scr_addr + (sc_reg * 8)); in qs_scr_write()
|
H A D | sata_svw.c | 107 unsigned int sc_reg, u32 *val) in k2_sata_scr_read() argument 109 if (sc_reg > SCR_CONTROL) in k2_sata_scr_read() 111 *val = readl(link->ap->ioaddr.scr_addr + (sc_reg * 4)); in k2_sata_scr_read() 117 unsigned int sc_reg, u32 val) in k2_sata_scr_write() argument 119 if (sc_reg > SCR_CONTROL) in k2_sata_scr_write() 121 writel(val, link->ap->ioaddr.scr_addr + (sc_reg * 4)); in k2_sata_scr_write()
|
H A D | sata_via.c | 73 static int svia_scr_read(struct ata_link *link, unsigned int sc_reg, u32 *val); 74 static int svia_scr_write(struct ata_link *link, unsigned int sc_reg, u32 val); 185 static int svia_scr_read(struct ata_link *link, unsigned int sc_reg, u32 *val) in svia_scr_read() argument 187 if (sc_reg > SCR_CONTROL) in svia_scr_read() 189 *val = ioread32(link->ap->ioaddr.scr_addr + (4 * sc_reg)); in svia_scr_read() 193 static int svia_scr_write(struct ata_link *link, unsigned int sc_reg, u32 val) in svia_scr_write() argument 195 if (sc_reg > SCR_CONTROL) in svia_scr_write() 197 iowrite32(val, link->ap->ioaddr.scr_addr + (4 * sc_reg)); in svia_scr_write()
|
H A D | sata_sil.c | 103 static int sil_scr_read(struct ata_link *link, unsigned int sc_reg, u32 *val); 104 static int sil_scr_write(struct ata_link *link, unsigned int sc_reg, u32 val); 378 unsigned int sc_reg) in sil_scr_addr() argument 382 switch (sc_reg) { in sil_scr_addr() 397 static int sil_scr_read(struct ata_link *link, unsigned int sc_reg, u32 *val) in sil_scr_read() argument 399 void __iomem *mmio = sil_scr_addr(link->ap, sc_reg); in sil_scr_read() 408 static int sil_scr_write(struct ata_link *link, unsigned int sc_reg, u32 val) in sil_scr_write() argument 410 void __iomem *mmio = sil_scr_addr(link->ap, sc_reg); in sil_scr_write()
|
H A D | sata_inic162x.c | 291 static int inic_scr_read(struct ata_link *link, unsigned sc_reg, u32 *val) in inic_scr_read() argument 295 if (unlikely(sc_reg >= ARRAY_SIZE(scr_map))) in inic_scr_read() 298 *val = readl(scr_addr + scr_map[sc_reg] * 4); in inic_scr_read() 301 if (sc_reg == SCR_ERROR) in inic_scr_read() 306 static int inic_scr_write(struct ata_link *link, unsigned sc_reg, u32 val) in inic_scr_write() argument 310 if (unlikely(sc_reg >= ARRAY_SIZE(scr_map))) in inic_scr_write() 313 writel(val, scr_addr + scr_map[sc_reg] * 4); in inic_scr_write()
|
H A D | sata_sil24.c | 326 static int sil24_scr_read(struct ata_link *link, unsigned sc_reg, u32 *val); 327 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() 505 *val = readl(scr_addr + sil24_scr_map[sc_reg] * 4); in sil24_scr_read() 511 static int sil24_scr_write(struct ata_link *link, unsigned sc_reg, u32 val) in sil24_scr_write() argument 515 if (sc_reg < ARRAY_SIZE(sil24_scr_map)) { in sil24_scr_write() 516 writel(val, scr_addr + sil24_scr_map[sc_reg] * 4); in sil24_scr_write()
|
H A D | sata_promise.c | 137 static int pdc_sata_scr_read(struct ata_link *link, unsigned int sc_reg, u32 *val); 138 static int pdc_sata_scr_write(struct ata_link *link, unsigned int sc_reg, u32 val); 462 unsigned int sc_reg, u32 *val) in pdc_sata_scr_read() argument 464 if (sc_reg > SCR_CONTROL) in pdc_sata_scr_read() 466 *val = readl(link->ap->ioaddr.scr_addr + (sc_reg * 4)); in pdc_sata_scr_read() 471 unsigned int sc_reg, u32 val) in pdc_sata_scr_write() argument 473 if (sc_reg > SCR_CONTROL) in pdc_sata_scr_write() 475 writel(val, link->ap->ioaddr.scr_addr + (sc_reg * 4)); in pdc_sata_scr_write()
|
H A D | sata_rcar.c | 481 static int sata_rcar_scr_read(struct ata_link *link, unsigned int sc_reg, in sata_rcar_scr_read() argument 484 if (sc_reg > SCR_ACTIVE) in sata_rcar_scr_read() 487 *val = ioread32(link->ap->ioaddr.scr_addr + (sc_reg << 2)); in sata_rcar_scr_read() 491 static int sata_rcar_scr_write(struct ata_link *link, unsigned int sc_reg, in sata_rcar_scr_write() argument 494 if (sc_reg > SCR_ACTIVE) in sata_rcar_scr_write() 497 iowrite32(val, link->ap->ioaddr.scr_addr + (sc_reg << 2)); in sata_rcar_scr_write()
|
H A D | sata_fsl.c | 587 unsigned int sc_reg; in sata_fsl_scr_write() local 594 sc_reg = sc_reg_in; in sata_fsl_scr_write() 600 ata_link_dbg(link, "reg_in = %d\n", sc_reg); in sata_fsl_scr_write() 602 iowrite32(val, ssr_base + (sc_reg * 4)); in sata_fsl_scr_write() 611 unsigned int sc_reg; in sata_fsl_scr_read() local 618 sc_reg = sc_reg_in; in sata_fsl_scr_read() 624 ata_link_dbg(link, "reg_in = %d\n", sc_reg); in sata_fsl_scr_read() 626 *val = ioread32(ssr_base + (sc_reg * 4)); in sata_fsl_scr_read()
|
H A D | libahci.c | 56 static int ahci_scr_read(struct ata_link *link, unsigned int sc_reg, u32 *val); 57 static int ahci_scr_write(struct ata_link *link, unsigned int sc_reg, u32 val); 639 static unsigned ahci_scr_offset(struct ata_port *ap, unsigned int sc_reg) in ahci_scr_offset() argument 650 if (sc_reg < ARRAY_SIZE(offset) && in ahci_scr_offset() 651 (sc_reg != SCR_NOTIFICATION || (hpriv->cap & HOST_CAP_SNTF))) in ahci_scr_offset() 652 return offset[sc_reg]; in ahci_scr_offset() 656 static int ahci_scr_read(struct ata_link *link, unsigned int sc_reg, u32 *val) in ahci_scr_read() argument 659 int offset = ahci_scr_offset(link->ap, sc_reg); in ahci_scr_read() 668 static int ahci_scr_write(struct ata_link *link, unsigned int sc_reg, u32 val) in ahci_scr_write() argument 671 int offset = ahci_scr_offset(link->ap, sc_reg); in ahci_scr_write()
|
H A D | sata_nv.c | 290 static int nv_scr_read(struct ata_link *link, unsigned int sc_reg, u32 *val); 291 static int nv_scr_write(struct ata_link *link, unsigned int sc_reg, u32 val); 1501 static int nv_scr_read(struct ata_link *link, unsigned int sc_reg, u32 *val) in nv_scr_read() argument 1503 if (sc_reg > SCR_CONTROL) in nv_scr_read() 1506 *val = ioread32(link->ap->ioaddr.scr_addr + (sc_reg * 4)); in nv_scr_read() 1510 static int nv_scr_write(struct ata_link *link, unsigned int sc_reg, u32 val) in nv_scr_write() argument 1512 if (sc_reg > SCR_CONTROL) in nv_scr_write() 1515 iowrite32(val, link->ap->ioaddr.scr_addr + (sc_reg * 4)); in nv_scr_write()
|
/openbmc/linux/drivers/net/ethernet/hisilicon/ |
H A D | hns_mdio.c | 40 struct hns_mdio_sc_reg sc_reg; member 428 const struct hns_mdio_sc_reg *sc_reg; in hns_mdio_reset() local 437 sc_reg = &mdio_dev->sc_reg; in hns_mdio_reset() 550 mdio_dev->sc_reg.mdio_clk_en = in hns_mdio_probe() 552 mdio_dev->sc_reg.mdio_clk_dis = in hns_mdio_probe() 558 mdio_dev->sc_reg.mdio_clk_st = in hns_mdio_probe() 560 mdio_dev->sc_reg.mdio_reset_st = in hns_mdio_probe() 564 mdio_dev->sc_reg.mdio_clk_en = in hns_mdio_probe() 566 mdio_dev->sc_reg.mdio_clk_dis = in hns_mdio_probe() 572 mdio_dev->sc_reg.mdio_clk_st = in hns_mdio_probe() [all …]
|
/openbmc/linux/include/linux/ |
H A D | libata.h | 933 int (*scr_read)(struct ata_link *link, unsigned int sc_reg, u32 *val); 934 int (*scr_write)(struct ata_link *link, unsigned int sc_reg, u32 val);
|
/openbmc/linux/Documentation/driver-api/ |
H A D | libata.rst | 337 int (*scr_read) (struct ata_port *ap, unsigned int sc_reg, 339 int (*scr_write) (struct ata_port *ap, unsigned int sc_reg, 344 sc_reg is one of SCR_STATUS, SCR_CONTROL, SCR_ERROR, or SCR_ACTIVE.
|