Home
last modified time | relevance | path

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

/linux-6.1.9/drivers/ata/
Dsata_sis.c50 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
[all …]
Dsata_uli.c44 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);
87 static unsigned int get_scr_cfg_addr(struct ata_port *ap, unsigned int sc_reg) in get_scr_cfg_addr() argument
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
[all …]
Dsata_vsc.c85 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()
Dsata_qstor.c98 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()
Dsata_svw.c106 unsigned int sc_reg, u32 *val) in k2_sata_scr_read() argument
108 if (sc_reg > SCR_CONTROL) in k2_sata_scr_read()
110 *val = readl(link->ap->ioaddr.scr_addr + (sc_reg * 4)); in k2_sata_scr_read()
116 unsigned int sc_reg, u32 val) in k2_sata_scr_write() argument
118 if (sc_reg > SCR_CONTROL) in k2_sata_scr_write()
120 writel(val, link->ap->ioaddr.scr_addr + (sc_reg * 4)); in k2_sata_scr_write()
Dsata_via.c73 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()
Dsata_sil.c103 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()
Dsata_inic162x.c291 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()
Dsata_sil24.c326 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()
Dsata_promise.c137 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()
Dsata_rcar.c481 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()
Dsata_fsl.c588 unsigned int sc_reg; in sata_fsl_scr_write() local
595 sc_reg = sc_reg_in; in sata_fsl_scr_write()
601 ata_link_dbg(link, "reg_in = %d\n", sc_reg); in sata_fsl_scr_write()
603 iowrite32(val, ssr_base + (sc_reg * 4)); in sata_fsl_scr_write()
612 unsigned int sc_reg; in sata_fsl_scr_read() local
619 sc_reg = sc_reg_in; in sata_fsl_scr_read()
625 ata_link_dbg(link, "reg_in = %d\n", sc_reg); in sata_fsl_scr_read()
627 *val = ioread32(ssr_base + (sc_reg * 4)); in sata_fsl_scr_read()
Dlibahci.c56 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);
637 static unsigned ahci_scr_offset(struct ata_port *ap, unsigned int sc_reg) in ahci_scr_offset() argument
648 if (sc_reg < ARRAY_SIZE(offset) && in ahci_scr_offset()
649 (sc_reg != SCR_NOTIFICATION || (hpriv->cap & HOST_CAP_SNTF))) in ahci_scr_offset()
650 return offset[sc_reg]; in ahci_scr_offset()
654 static int ahci_scr_read(struct ata_link *link, unsigned int sc_reg, u32 *val) in ahci_scr_read() argument
657 int offset = ahci_scr_offset(link->ap, sc_reg); in ahci_scr_read()
666 static int ahci_scr_write(struct ata_link *link, unsigned int sc_reg, u32 val) in ahci_scr_write() argument
669 int offset = ahci_scr_offset(link->ap, sc_reg); in ahci_scr_write()
Dsata_nv.c290 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()
/linux-6.1.9/drivers/net/ethernet/hisilicon/
Dhns_mdio.c40 struct hns_mdio_sc_reg sc_reg; member
352 const struct hns_mdio_sc_reg *sc_reg; in hns_mdio_reset() local
361 sc_reg = &mdio_dev->sc_reg; in hns_mdio_reset()
363 ret = mdio_sc_cfg_reg_write(mdio_dev, sc_reg->mdio_reset_req, in hns_mdio_reset()
364 0x1, sc_reg->mdio_reset_st, 0x1, in hns_mdio_reset()
372 ret = mdio_sc_cfg_reg_write(mdio_dev, sc_reg->mdio_clk_dis, in hns_mdio_reset()
373 0x1, sc_reg->mdio_clk_st, 0x1, in hns_mdio_reset()
381 ret = mdio_sc_cfg_reg_write(mdio_dev, sc_reg->mdio_reset_dreq, in hns_mdio_reset()
382 0x1, sc_reg->mdio_reset_st, 0x1, in hns_mdio_reset()
390 ret = mdio_sc_cfg_reg_write(mdio_dev, sc_reg->mdio_clk_en, in hns_mdio_reset()
[all …]
/linux-6.1.9/include/linux/
Dlibata.h913 int (*scr_read)(struct ata_link *link, unsigned int sc_reg, u32 *val);
914 int (*scr_write)(struct ata_link *link, unsigned int sc_reg, u32 val);
/linux-6.1.9/Documentation/driver-api/
Dlibata.rst361 int (*scr_read) (struct ata_port *ap, unsigned int sc_reg,
363 int (*scr_write) (struct ata_port *ap, unsigned int sc_reg,
369 sc_reg is one of SCR_STATUS, SCR_CONTROL, SCR_ERROR, or SCR_ACTIVE.