42#define ELAN_BASE 0xa8800000
45#define ELAN_MAGIC 0xe1ad0000
48#define ELAN_RAM_BASE_P0 0x0a000000
50#define ELAN_RAM_BASE (MEM_AREA_P2_BASE | ELAN_RAM_BASE_P0)
52#define ELAN_RAM_SIZE (32 * 1024 * 1024)
60#define ELAN_REG_ID 0x00
61#define ELAN_REG_REVISION 0x04
62#define ELAN_REG_CMDQ 0x0c
63#define ELAN_REG_IFCTL 0x10
64#define ELAN_REG_REFRESH 0x14
65#define ELAN_REG_SDRAMCFG 0x1c
66#define ELAN_REG_TILER 0x30
67#define ELAN_REG_IRQSTAT 0x74
68#define ELAN_REG_IRQMASK 0x78
77#define ELAN_IFCTL_CS1_BCAST BIT(0)
78#define ELAN_IFCTL_CH2 BIT(1)
79#define ELAN_IFCTL_PVR2 BIT(2)
83#define ELAN_GET(reg) (*(volatile uint32_t *)(ELAN_BASE + (reg)))
85#define ELAN_SET(reg, value) (ELAN_GET(reg) = (value))
Various common macros used throughout the codebase.
Constants for areas of the system memory map.
uint32_t elan_ifctl_get(void)
Current IFCTL value, or 0 if Elan is absent.
void elan_pvr2_enable(void)
Enable CLXB address windows (IFCTL bit 2, never bit 0).
bool elan_present(void)
True when Elan is present (NAOMI 2).
void elan_pvr2_disable(void)
Disable CLXB address windows (IFCTL = 0).
bool elan_pvr2_enabled(void)
True if IFCTL bit 2 is set.
uint32_t elan_revision(void)
Elan revision register, or 0 if absent.
void elan_ifctl_set(uint32_t value)
Write IFCTL.
Macros to help dealing with register fields.