Lines Matching defs:reg

60 #define	CSR_WRITE_4(pcnp, reg, val) \
61 ddi_put32(pcnp->pcn_regshandle, (uint32_t *)(pcnp->pcn_regs + reg), val)
63 #define CSR_WRITE_2(pcnp, reg, val) \
64 ddi_put16(pcnp->pcn_regshandle, (uint16_t *)(pcnp->pcn_regs + reg), val)
66 #define CSR_READ_4(pcnp, reg) \
67 ddi_get32(pcnp->pcn_regshandle, (uint32_t *)(pcnp->pcn_regs + reg))
69 #define CSR_READ_2(pcnp, reg) \
70 ddi_get16(pcnp->pcn_regshandle, (uint16_t *)(pcnp->pcn_regs + reg))
72 #define PCN_CSR_SETBIT(pcnp, reg, x) \
73 pcn_csr_write(pcnp, reg, pcn_csr_read(pcnp, reg) | (x))
75 #define PCN_CSR_CLRBIT(pcnp, reg, x) \
76 pcn_csr_write(pcnp, reg, pcn_csr_read(pcnp, reg) & ~(x))
78 #define PCN_BCR_SETBIT(pncp, reg, x) \
79 pcn_bcr_write(pcnp, reg, pcn_bcr_read(pcnp, reg) | (x))
81 #define PCN_BCR_CLRBIT(pcnp, reg, x) \
82 pcn_bcr_write(pcnp, reg, pcn_bcr_read(pcnp, reg) & ~(x))
1324 pcn_mii_read(void *arg, uint8_t phy, uint8_t reg)
1353 val = ((uint16_t)phy << 5) | reg;
1354 pcn_bcr_write(pcnp, PCN_BCR_MIIADDR, phy << 5 | reg);
1369 pcn_mii_write(void *arg, uint8_t phy, uint8_t reg, uint16_t val)
1373 pcn_bcr_write(pcnp, PCN_BCR_MIIADDR, reg | (phy << 5));
1411 pcn_csr_read(pcn_t *pcnp, uint32_t reg)
1416 CSR_WRITE_4(pcnp, PCN_IO32_RAP, reg);
1423 pcn_csr_read16(pcn_t *pcnp, uint32_t reg)
1428 CSR_WRITE_2(pcnp, PCN_IO16_RAP, reg);
1435 pcn_csr_write(pcn_t *pcnp, uint32_t reg, uint32_t val)
1438 CSR_WRITE_4(pcnp, PCN_IO32_RAP, reg);
1444 pcn_bcr_read(pcn_t *pcnp, uint32_t reg)
1449 CSR_WRITE_4(pcnp, PCN_IO32_RAP, reg);
1456 pcn_bcr_read16(pcn_t *pcnp, uint32_t reg)
1461 CSR_WRITE_2(pcnp, PCN_IO16_RAP, reg);
1468 pcn_bcr_write(pcn_t *pcnp, uint32_t reg, uint32_t val)
1471 CSR_WRITE_4(pcnp, PCN_IO32_RAP, reg);