[7be6ad9] | 1 | #ifndef RTEMS_BSP_VME_CONFIG_H |
---|
| 2 | #define RTEMS_BSP_VME_CONFIG_H |
---|
[169480b] | 3 | /* VMEConfig.h, S. Kate Feng modified it for MVME5500 3/04 |
---|
| 4 | * |
---|
| 5 | * May 2011 : Use the VME shared IRQ handlers. |
---|
| 6 | * |
---|
| 7 | * It seems that the implementation of VMEUNIVERSE_IRQ_MGR_FLAG_PW_WORKAROUND |
---|
| 8 | * is not fully developed. The UNIV_REGOFF_VCSR_BS is defined for VME64 |
---|
| 9 | * specification, which does not apply to a VME32 crate. In order to avoid |
---|
| 10 | * spurious VME interrupts, a better and more universal solution is |
---|
| 11 | * to flush the vmeUniverse FIFO by reading a register back within the |
---|
| 12 | * users' Interrupt Service Routine (ISR) before returning. |
---|
| 13 | * |
---|
| 14 | * Some devices might require the ISR to issue an interrupt status READ |
---|
| 15 | * after its IRQ is cleared, but before its corresponding interrupt |
---|
| 16 | * is enabled again. |
---|
| 17 | * |
---|
| 18 | */ |
---|
[7be6ad9] | 19 | /* BSP specific address space configuration parameters */ |
---|
| 20 | |
---|
[169480b] | 21 | /* |
---|
[7be6ad9] | 22 | * The BSP maps VME address ranges into |
---|
| 23 | * one BAT. |
---|
| 24 | * NOTE: the BSP (startup/bspstart.c) uses |
---|
| 25 | * hardcoded window lengths that match this |
---|
| 26 | * layout: |
---|
| 27 | */ |
---|
| 28 | #define _VME_A32_WIN0_ON_PCI 0x90000000 |
---|
[169480b] | 29 | /* If _VME_CSR_ON_PCI is defined then the A32 window is reduced to accommodate |
---|
| 30 | * CSR for space. |
---|
| 31 | */ |
---|
| 32 | #define _VME_CSR_ON_PCI 0x9e000000 |
---|
[7be6ad9] | 33 | #define _VME_A24_ON_PCI 0x9f000000 |
---|
| 34 | #define _VME_A16_ON_PCI 0x9fff0000 |
---|
| 35 | |
---|
[bc2083c1] | 36 | /* Reuse BAT 0 for VME */ |
---|
| 37 | #define BSP_VME_BAT_IDX 0 |
---|
| 38 | |
---|
[7be6ad9] | 39 | /* start of the A32 window on the VME bus |
---|
| 40 | * TODO: this should perhaps be a configuration option |
---|
| 41 | */ |
---|
| 42 | #define _VME_A32_WIN0_ON_VME 0x20000000 |
---|
| 43 | |
---|
| 44 | /* if _VME_DRAM_OFFSET is defined, the BSP |
---|
| 45 | * will map our RAM onto the VME bus, starting |
---|
| 46 | * at _VME_DRAM_OFFSET |
---|
| 47 | */ |
---|
| 48 | #define _VME_DRAM_OFFSET 0x90000000 |
---|
| 49 | |
---|
[ae93b29] | 50 | #define BSP_VME_UNIVERSE_INSTALL_IRQ_MGR(err) \ |
---|
[bc2083c1] | 51 | do { \ |
---|
[169480b] | 52 | err = vmeUniverseInstallIrqMgrAlt(VMEUNIVERSE_IRQ_MGR_FLAG_SHARED,\ |
---|
| 53 | 0, BSP_GPP_VME_VLINT0, \ |
---|
| 54 | 1, BSP_GPP_VME_VLINT1, \ |
---|
| 55 | 2, BSP_GPP_VME_VLINT2, \ |
---|
| 56 | 3, BSP_GPP_VME_VLINT3, \ |
---|
| 57 | -1 /* terminate list */); \ |
---|
[bc2083c1] | 58 | } while (0) |
---|
| 59 | |
---|
[7be6ad9] | 60 | #endif |
---|