MOXA linux-2.6.x / linux-2.6.9-uc0 from sdlinux-moxaart.tgz
[linux-2.6.9-moxart.git] / include / asm-arm / arch-moxacpu / ftpci.h
blob03d11a12c3d0bb027df93a468c595ed83b292ecf
1 #ifndef ARCH_CPE_FTPCI_H
2 #define ARCH_CPE_FTPCI_H
3 #include <asm/sizes.h>
4 #include <asm/arch/cpe/cpe.h>
5 // --------------------------------------------------------------------
6 // AHB Control Register
7 // --------------------------------------------------------------------
8 #define FTPCI_IOSIZE_REG 0x0
9 #define FTPCI_PROT_REG 0x4
10 #define FTPCI_CTRL_REG 0x8
11 #define FTPCI_ERREN_REG 0xc
12 #define FTPCI_SOFTRST_REG 0x10
13 #define FTPCI_EN64_REG 0x14
14 #define FTPCI_ADDRH32_REG 0x18
15 #define FTPCI_CFG_ADR_REG 0x28
16 #define FTPCI_CFG_DATA_REG 0x2c
19 // --------------------------------------------------------------------
20 // FTPCI_IOSIZE_REG ªº¤º®e
21 // --------------------------------------------------------------------
22 #define FTPCI_BASE_IO_SIZE_1M 0x0
23 #define FTPCI_BASE_IO_SIZE_2M 0x1
24 #define FTPCI_BASE_IO_SIZE_4M 0x2
25 #define FTPCI_BASE_IO_SIZE_8M 0x3
26 #define FTPCI_BASE_IO_SIZE_16M 0x4
27 #define FTPCI_BASE_IO_SIZE_32M 0x5
28 #define FTPCI_BASE_IO_SIZE_64M 0x6
29 #define FTPCI_BASE_IO_SIZE_128M 0x7
30 #define FTPCI_BASE_IO_SIZE_256M 0x8
31 #define FTPCI_BASE_IO_SIZE_512M 0x9
32 #define FTPCI_BASE_IO_SIZE_1G 0xa
33 #define FTPCI_BASE_IO_SIZE_2G 0xb
37 // --------------------------------------------------------------------
38 // PCI Configuration Register
39 // --------------------------------------------------------------------
40 #define PCI_INT_MASK 0x4e
41 #define PCI_MEM_BASE_SIZE1 0x50
42 #define PCI_MEM_BASE_SIZE2 0x54
43 #define PCI_MEM_BASE_SIZE3 0x58
46 // --------------------------------------------------------------------
47 // PCI_INT_MASK ªº¤º®e
48 // --------------------------------------------------------------------
49 #define PCI_INTA_ENABLE (1U<<6)
50 #define PCI_INTB_ENABLE (1U<<7)
51 #define PCI_INTC_ENABLE (1U<<8)
52 #define PCI_INTD_ENABLE (1U<<9)
55 // --------------------------------------------------------------------
56 // PCI_MEM_BASE_SIZE1... ªº¤º®e
57 // --------------------------------------------------------------------
58 #define FTPCI_BASE_ADR_SIZE_1MB (0x0<<16)
59 #define FTPCI_BASE_ADR_SIZE_2MB (0x1<<16)
60 #define FTPCI_BASE_ADR_SIZE_4MB (0x2<<16)
61 #define FTPCI_BASE_ADR_SIZE_8MB (0x3<<16)
62 #define FTPCI_BASE_ADR_SIZE_16MB (0x4<<16)
63 #define FTPCI_BASE_ADR_SIZE_32MB (0x5<<16)
64 #define FTPCI_BASE_ADR_SIZE_64MB (0x6<<16)
65 #define FTPCI_BASE_ADR_SIZE_128MB (0x7<<16)
66 #define FTPCI_BASE_ADR_SIZE_256MB (0x8<<16)
67 #define FTPCI_BASE_ADR_SIZE_512MB (0x9<<16)
68 #define FTPCI_BASE_ADR_SIZE_1GB (0xa<<16)
69 #define FTPCI_BASE_ADR_SIZE_2GB (0xb<<16)
71 void ftpci_clear_irq(unsigned int irq);
72 inline int ftpci_get_irq(void);
73 extern int ftpci_probed;
74 #endif