wdenk | 452cfd6 | 2002-11-19 11:04:11 +0000 | [diff] [blame] | 1 | #ifndef ARTICIAS_H |
| 2 | #define ARTICIAS_H |
| 3 | |
| 4 | #include "short_types.h" |
| 5 | #include <common.h> |
| 6 | |
| 7 | #define REG_GROUP 0xF0 |
| 8 | |
| 9 | /* ArticiaS registers */ |
| 10 | #define GLOBALINFO0 0x50 |
| 11 | #define GLOBALINFO1 0x51 |
| 12 | #define GLOBALINFO2 0x52 |
| 13 | #define GLOBALINFO3 0x53 |
| 14 | #define GLOBALCTL0 0x54 |
| 15 | #define GLOBALCTL1 0x55 |
| 16 | #define NVRAMCTL 0x56 |
| 17 | #define PCI1ACR0 0x58 |
| 18 | #define PCI1ACR1 0x59 |
| 19 | #define PCI1ACR2 0x5a |
| 20 | #define PCI1ACR3 0x5b |
| 21 | #define HBUSACR0 0x5c |
| 22 | #define HBUSACR1 0x5d |
| 23 | #define HBUSACR2 0x5e |
| 24 | #define HBUSACR3 0x5f |
| 25 | #define HOSTINT0 0x68 |
| 26 | #define HOSTINT1 0x69 |
| 27 | #define HOSTINT2 0x6a |
| 28 | #define HOSTINT3 0x6b |
| 29 | #define HOSTRBCR 0x70 |
| 30 | #define XDBCR 0x74 |
| 31 | |
| 32 | #define LBSBCR2 0xd2 |
| 33 | |
| 34 | |
| 35 | /* Memory controller */ |
| 36 | |
| 37 | #define DIMM0_B0_SCR0 0x90 |
| 38 | #define DIMM0_B1_SCR0 0x94 |
| 39 | #define DIMM1_B2_SCR0 0x98 |
| 40 | #define DIMM1_B3_SCR0 0x9c |
| 41 | #define DIMM2_B4_SCR0 0xa0 |
| 42 | #define DIMM2_B5_SCR0 0xa4 |
| 43 | #define DIMM3_B6_SCR0 0xa8 |
| 44 | #define DIMM3_B7_SCR0 0xac |
| 45 | |
| 46 | #define DIMM0_TCR0 0xb0 |
| 47 | #define DIMM1_TCR0 0xb2 |
| 48 | #define DIMM2_TCR0 0xb4 |
| 49 | #define DIMM3_TCR0 0xb6 |
| 50 | |
| 51 | #define DRAM_REFRESH0 0xb8 |
| 52 | #define DRAM_GCR0 0xc0 |
| 53 | #define DRAM_PCR0 0xc6 |
| 54 | #define DRAM_ECC0 0xc4 |
| 55 | #define SRAM_CR 0xc8 |
| 56 | #define DRAM_RAS_CTL0 0xcc |
| 57 | #define DRAM_RAS_CTL1 0xcd |
| 58 | |
| 59 | /* Bits for REG_GROUP */ |
| 60 | #define REG_GROUP_MULTI (1<<1) |
| 61 | #define REG_GROUP_SPECIAL (1<<3) |
| 62 | #define REG_GROUP_DIAG (0x1<<4) |
| 63 | #define REG_GROUP_POWER (0x2<<4) |
| 64 | |
| 65 | |
| 66 | #define GLOBALINFO0_BO (1<<7) |
| 67 | |
| 68 | |
| 69 | #define GLOBALINFO2_B1ARBITER (1<<6) |
| 70 | |
| 71 | |
| 72 | #define HBUSACR0_CPUAPC (1<<0) |
| 73 | #define HBUSACR0_NUMREQ_2 (0<<1) |
| 74 | #define HBUSACR0_NUMREQ_3 (1<<1) |
| 75 | #define HBUSACR0_NUMREQ_4 (2<<1) |
| 76 | #define HBUSACR0_NUMREQ_MASK (7<<1) |
| 77 | #define HBUSACR0_RAW (1<<6) |
| 78 | #define HBUSACR0_WAIT (1<<7) |
| 79 | #define HBUSACR0_RESERVED (0x30) |
| 80 | |
| 81 | |
| 82 | #define HBUSACR2_BURST (1<<0) |
| 83 | #define HBUSACR2_LAT (1<<1) |
| 84 | |
| 85 | |
| 86 | #define HBUSACR3_LMWC_SM (1<<0) |
| 87 | #define HBUSACR3_LMWC_PCI1 (1<<1) |
| 88 | #define HBUSACR3_LMWC_PCI0 (1<<2) |
| 89 | #define HBUSACR3_PMWC_PCI1 (1<<3) |
| 90 | #define HBUSACR3_PMWC_PCI0 (1<<4) |
| 91 | #define HBUSACR3_FKH (1<<5) |
| 92 | #define HBUSACR3_92H_EN (1<<6) |
| 93 | #define HBUSACR3_60H_64H_EN (1<<7) |
| 94 | |
| 95 | |
| 96 | #define HOSTRBCR_PREFETCH (1<<4) |
| 97 | |
| 98 | |
| 99 | #define XDBCR_HWTOXD (1<<0) |
| 100 | #define XDBCR_KBTOXD (1<<1) |
| 101 | #define XDBCR_RTCTOXD (1<<2) |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame] | 102 | #define XDBCR_SCALE_1_1 (0x0<<3) |
| 103 | #define XDBCR_SCALE_2_2 (0x1<<3) |
| 104 | #define XDBCR_SCALE_3_2 (0x2<<3) |
| 105 | #define XDBCR_SCALE_4_4 (0x3<<3) |
| 106 | #define XDBCR_SCALE_5_8 (0x4<<3) |
| 107 | #define XDBCR_SCALE_6_8 (0x5<<3) |
| 108 | #define XDBCR_SCALE_8_8 (0x6<<3) |
| 109 | #define XDBCR_SCALE_0_16 (0x7<<3) |
wdenk | 452cfd6 | 2002-11-19 11:04:11 +0000 | [diff] [blame] | 110 | #define XDBCR_XDPROM (1<<7) |
| 111 | |
| 112 | |
| 113 | #define LBSBCR2_1_RWAC (1<<2) |
| 114 | |
| 115 | |
| 116 | /* PCI controller */ |
| 117 | #define ARTICIAS_PCI_CFGADDR 0xfec00cf8 |
| 118 | #define ARTICIAS_PCI_CFGDATA 0xfee00cfc |
| 119 | |
| 120 | #define ARTICIAS_PCI_BUS 0x80000000 |
| 121 | #define ARTICIAS_PCI_MAXSIZE 0x7cffffff |
| 122 | #define ARTICIAS_PCI_PHYS 0x80000000 |
| 123 | |
| 124 | #define ARTICIAS_SYS_BUS 0x00000000 |
| 125 | #define ARTICIAS_SYS_MAXSIZE 0x7fffffff |
| 126 | #define ARTICIAS_SYS_PHYS 0x00000000 |
| 127 | |
| 128 | #define ARTICIAS_PCIIO_BUS 0x00800000 |
| 129 | #define ARTICIAS_PCIIO_MAXSIZE 0x003fffff |
| 130 | #define ARTICIAS_PCIIO_PHYS 0xfe800000 |
| 131 | |
| 132 | #define ARTICIAS_ISAIO_BUS 0x00002000 |
| 133 | #define ARTICIAS_ISAIO_MAXSIZE 0x0000d000 |
| 134 | #define ARTICIAS_ISAIO_PHYS 0xfe002000 |
| 135 | |
| 136 | |
wdenk | 452cfd6 | 2002-11-19 11:04:11 +0000 | [diff] [blame] | 137 | /* Prototypes */ |
| 138 | long articiaS_ram_init(void); |
| 139 | void articiaS_pci_init(void); |
| 140 | |
| 141 | |
| 142 | #endif |