[phantom] Change register space abstraction to match other drivers

Most other Phantom drivers define a register space in terms of a 64M
virtual address space.  While this doesn't map in any meaningful way
to the actual addresses used on the latest cards, it makes maintenance
easier if we do the same.
This commit is contained in:
Michael Brown
2008-10-23 23:35:01 +01:00
parent bcc70d6b99
commit d4c8273569
2 changed files with 46 additions and 54 deletions

View File

@@ -76,14 +76,14 @@ typedef uint32_t nx_rcode_t;
* address by the phantom_crb_access_xxx() methods.
*/
enum unm_reg_blocks {
UNM_CRB_BLK_PCIE,
UNM_CRB_BLK_CAM,
UNM_CRB_BLK_ROMUSB,
UNM_CRB_BLK_TEST,
UNM_CRB_BLK_PCIE = 0x01,
UNM_CRB_BLK_CAM = 0x22,
UNM_CRB_BLK_ROMUSB = 0x33,
UNM_CRB_BLK_TEST = 0x02,
};
#define UNM_CRB_BASE(blk) ( (blk) << 24 )
#define UNM_CRB_BLK(reg) ( (reg) >> 24 )
#define UNM_CRB_OFFSET(reg) ( (reg) & 0x00ffffff )
#define UNM_CRB_BASE(blk) ( (blk) << 20 )
#define UNM_CRB_BLK(reg) ( (reg) >> 20 )
#define UNM_CRB_OFFSET(reg) ( (reg) & 0x000fffff )
#define UNM_CRB_PCIE UNM_CRB_BASE ( UNM_CRB_BLK_PCIE )
#define UNM_PCIE_SEM2_LOCK ( UNM_CRB_PCIE + 0x1c010 )