Lines Matching refs:tok
145 #define LBA_CFG_BUS(tok) ((u8) ((tok)>>16)) argument
146 #define LBA_CFG_DEV(tok) ((u8) ((tok)>>11) & 0x1f) argument
147 #define LBA_CFG_FUNC(tok) ((u8) ((tok)>>8 ) & 0x7) argument
205 #define LBA_CFG_SETUP(d, tok) { \ argument
232 #define LBA_CFG_PROBE(d, tok) { \ argument
237 WRITE_REG32(tok | PCI_VENDOR_ID, (d)->hba.base_addr + LBA_PCI_CFG_ADDR);\
283 #define LBA_CFG_MASTER_ABORT_CHECK(d, base, tok, error) { \ argument
337 lba_rd_cfg(struct lba_device *d, u32 tok, u8 reg, u32 size) in lba_rd_cfg() argument
345 LBA_CFG_SETUP(d, tok); in lba_rd_cfg()
346 LBA_CFG_PROBE(d, tok); in lba_rd_cfg()
347 LBA_CFG_MASTER_ABORT_CHECK(d, d->hba.base_addr, tok, error); in lba_rd_cfg()
351 LBA_CFG_ADDR_SETUP(d, tok | reg); in lba_rd_cfg()
367 u32 tok = LBA_CFG_TOK(local_bus, devfn); in elroy_cfg_read() local
377 *data = lba_rd_cfg(d, tok, pos, size); in elroy_cfg_read()
378 DBG_CFG("%s(%x+%2x) -> 0x%x (a)\n", __func__, tok, pos, *data); in elroy_cfg_read()
383 DBG_CFG("%s(%x+%2x) -> -1 (b)\n", __func__, tok, pos); in elroy_cfg_read()
393 LBA_CFG_ADDR_SETUP(d, tok | pos); in elroy_cfg_read()
399 DBG_CFG("%s(%x+%2x) -> 0x%x (c)\n", __func__, tok, pos, *data); in elroy_cfg_read()
405 lba_wr_cfg(struct lba_device *d, u32 tok, u8 reg, u32 data, u32 size) in lba_wr_cfg() argument
413 LBA_CFG_SETUP(d, tok); in lba_wr_cfg()
414 LBA_CFG_ADDR_SETUP(d, tok | reg); in lba_wr_cfg()
420 LBA_CFG_MASTER_ABORT_CHECK(d, d->hba.base_addr, tok, error); in lba_wr_cfg()
434 u32 tok = LBA_CFG_TOK(local_bus,devfn); in elroy_cfg_write() local
441 lba_wr_cfg(d, tok, pos, (u32) data, size); in elroy_cfg_write()
442 DBG_CFG("%s(%x+%2x) = 0x%x (a)\n", __func__, tok, pos,data); in elroy_cfg_write()
447 DBG_CFG("%s(%x+%2x) = 0x%x (b)\n", __func__, tok, pos,data); in elroy_cfg_write()
451 DBG_CFG("%s(%x+%2x) = 0x%x (c)\n", __func__, tok, pos, data); in elroy_cfg_write()
454 LBA_CFG_ADDR_SETUP(d, tok | pos); in elroy_cfg_write()
484 u32 tok = LBA_CFG_TOK(local_bus, devfn); in mercury_cfg_read() local
490 LBA_CFG_TR4_ADDR_SETUP(d, tok | pos); in mercury_cfg_read()
503 DBG_CFG("mercury_cfg_read(%x+%2x) -> 0x%x\n", tok, pos, *data); in mercury_cfg_read()
517 u32 tok = LBA_CFG_TOK(local_bus,devfn); in mercury_cfg_write() local
522 DBG_CFG("%s(%x+%2x) <- 0x%x (c)\n", __func__, tok, pos, data); in mercury_cfg_write()
524 LBA_CFG_TR4_ADDR_SETUP(d, tok | pos); in mercury_cfg_write()