mirror of
https://github.com/ipxe/ipxe
synced 2025-12-26 17:42:47 +03:00
[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:
@@ -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 )
|
||||
|
||||
Reference in New Issue
Block a user