| 1 | /***********************************************************************/ |
|---|
| 2 | /* */ |
|---|
| 3 | /* MODULE: bcmebi.h */ |
|---|
| 4 | /* DATE: Jan 29, 2002 */ |
|---|
| 5 | /* PURPOSE: Definitions for EBI block */ |
|---|
| 6 | /* */ |
|---|
| 7 | /***********************************************************************/ |
|---|
| 8 | #ifndef BCMEBI_H |
|---|
| 9 | #define BCMEBI_H |
|---|
| 10 | |
|---|
| 11 | #include "bcmmips.h" |
|---|
| 12 | #include "bchp_common.h" |
|---|
| 13 | #include "bchp_ebi.h" |
|---|
| 14 | |
|---|
| 15 | #if !defined _ASMLANGUAGE |
|---|
| 16 | #if __cplusplus |
|---|
| 17 | extern "C" { |
|---|
| 18 | #endif |
|---|
| 19 | #endif |
|---|
| 20 | |
|---|
| 21 | |
|---|
| 22 | /* CSxCNTL settings */ |
|---|
| 23 | #define EBI_TA_WAIT 0x40000000 |
|---|
| 24 | #define EBI_WAIT_MASK 0x1F000000 /* mask for wait states */ |
|---|
| 25 | #define EBI_WAIT_SHIFT 24 /* shift for wait states */ |
|---|
| 26 | #define EBI_WAIT(n) (((n) << EBI_WAIT_SHIFT) & EBI_WAIT_MASK) |
|---|
| 27 | #define EBI_THOLD_MASK 0x00f00000 |
|---|
| 28 | #define EBI_THOLD_SHIFT 20 |
|---|
| 29 | #define EBI_THOLD(n) (((n) << EBI_THOLD_SHIFT) & EBI_THOLD_MASK) |
|---|
| 30 | #define EBI_TSETUP_MASK 0x000f0000 |
|---|
| 31 | #define EBI_TSETUP_SHIFT 16 |
|---|
| 32 | #define EBI_TSETUP(n) (((n) << EBI_TSETUP_SHIFT) & EBI_TSETUP_MASK) |
|---|
| 33 | #define EBI_CSHOLD 0x00008000 |
|---|
| 34 | #define EBI_SPLITCS 0x00004000 |
|---|
| 35 | #define EBI_MASKEN 0x00002000 |
|---|
| 36 | #define EBI_NESAMPLE 0x00001000 |
|---|
| 37 | #define EBI_M68K 0x00000800 |
|---|
| 38 | #define EBI_REV_END 0x00000400 /* Reverse Endian */ |
|---|
| 39 | #define EBI_RE 0x00000400 /* Reverse Endian */ |
|---|
| 40 | #define EBI_FIFO 0x00000200 /* enable fifo */ |
|---|
| 41 | #define EBI_TS_SEL 0x00000100 /* drive tsize, not bs_b */ |
|---|
| 42 | #define EBI_TS_TA_MODE 0x00000080 /* use TS/TA mode */ |
|---|
| 43 | #define EBI_POLARITY 0x00000040 /* set to invert cs polarity */ |
|---|
| 44 | #define EBI_WREN 0x00000020 /* enable posted writes */ |
|---|
| 45 | #define EBI_WORD_WIDE 0x00000010 /* 16-bit peripheral, else 8 */ |
|---|
| 46 | #define EBI_MSINH 0x00000008 |
|---|
| 47 | #define EBI_MSINL 0x00000004 |
|---|
| 48 | #define EBI_TSEN 0x00000002 |
|---|
| 49 | #define EBI_ENABLE 0x00000001 /* enable this range */ |
|---|
| 50 | |
|---|
| 51 | /* EBICONFIG settings */ |
|---|
| 52 | #define EBI_MASTER_ENABLE 0x80000000 /* allow external masters */ |
|---|
| 53 | #define EBI_EXT_MAST_PRIO 0x40000000 /* maximize ext master priority */ |
|---|
| 54 | #define EBI_CTRL_ENABLE 0x20000000 |
|---|
| 55 | #define EBI_TA_ENABLE 0x10000000 |
|---|
| 56 | |
|---|
| 57 | /* EBI DMA control register settings */ |
|---|
| 58 | #define EBI_TX_INV_IRQ_EN 0x00080000 |
|---|
| 59 | #define EBI_RX_INV_IRQ_EN 0x00040000 |
|---|
| 60 | #define EBI_TX_PKT_DN_IRQ_EN 0x00020000 |
|---|
| 61 | #define EBI_RX_PKT_DN_IRQ_EN 0x00010000 |
|---|
| 62 | #define EBI_TX_INV_CLR 0x00001000 |
|---|
| 63 | #define EBI_RX_INV_CLR 0x00000800 |
|---|
| 64 | #define EBI_CHAINING 0x00000400 |
|---|
| 65 | #define EBI_HALF_WORD 0x00000100 |
|---|
| 66 | #define EBI_TX_PKT_DN_CLR 0x00000080 |
|---|
| 67 | #define EBI_RX_PKT_DN_CLR 0x00000040 |
|---|
| 68 | #define EBI_TX_BUF_DN_CLR 0x00000020 |
|---|
| 69 | #define EBI_RX_BUF_DN_CLR 0x00000010 |
|---|
| 70 | #define EBI_TX_BUF_DN_IRQ_EN 0x00000008 |
|---|
| 71 | #define EBI_RX_BUF_DN_IRQ_EN 0x00000004 |
|---|
| 72 | #define EBI_TX_EN 0x00000002 |
|---|
| 73 | #define EBI_RX_EN 0x00000001 |
|---|
| 74 | |
|---|
| 75 | /* EBI DMA status register settings */ |
|---|
| 76 | #define EBI_TX_INV_DESC 0x00000020 |
|---|
| 77 | #define EBI_RX_INV_DESC 0x00000010 |
|---|
| 78 | #define EBI_TX_PKT_DN 0x00000008 |
|---|
| 79 | #define EBI_RX_PKT_DN 0x00000004 |
|---|
| 80 | #define EBI_TX_BUF_DN 0x00000002 |
|---|
| 81 | #define EBI_RX_BUF_DN 0x00000001 |
|---|
| 82 | |
|---|
| 83 | |
|---|
| 84 | #if !defined _ASMLANGUAGE |
|---|
| 85 | #if __cplusplus |
|---|
| 86 | } |
|---|
| 87 | #endif |
|---|
| 88 | #endif |
|---|
| 89 | |
|---|
| 90 | #endif /* BCMEBI_H */ |
|---|