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