Lines Matching refs:apid
13 #define REG_APID_MAP(apid) (0x0C440900U + 4U * i) argument
18 #define REG_ARB_CMD(apid) (0x0C600000U + 0x10000U * apid) argument
23 #define REG_ARB_STATUS(apid) (0x0C600008U + 0x10000U * apid) argument
32 #define REG_ARB_RDATA0(apid) (0x0C600018U + 0x10000U * apid) argument
33 #define REG_ARB_WDATA0(apid) (0x0C600010U + 0x10000U * apid) argument
49 static int wait_for_done(uint16_t apid) in wait_for_done() argument
54 uint32_t status = mmio_read_32(REG_ARB_STATUS(apid)); in wait_for_done()
69 static void arb_command(uint16_t apid, uint8_t opcode, uint32_t addr, in arb_command() argument
72 mmio_write_32(REG_ARB_CMD(apid), (uint32_t)opcode << 27 | in arb_command()
78 int apid = addr_to_apid(addr); in spmi_arb_read8() local
80 if (apid < 0) { in spmi_arb_read8()
81 return apid; in spmi_arb_read8()
84 arb_command(apid, OPC_EXT_READL, addr, 1); in spmi_arb_read8()
86 int ret = wait_for_done(apid); in spmi_arb_read8()
92 return mmio_read_32(REG_ARB_RDATA0(apid)) & 0xff; in spmi_arb_read8()
97 int apid = addr_to_apid(addr); in spmi_arb_write8() local
99 if (apid < 0) { in spmi_arb_write8()
100 return apid; in spmi_arb_write8()
103 mmio_write_32(REG_ARB_WDATA0(apid), data); in spmi_arb_write8()
104 arb_command(apid, OPC_EXT_WRITEL, addr, 1); in spmi_arb_write8()
106 int ret = wait_for_done(apid); in spmi_arb_write8()