diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/asm-arm/arch-iop32x/iop32x.h | 9 | ||||
| -rw-r--r-- | include/asm-arm/arch-iop32x/memory.h | 4 | ||||
| -rw-r--r-- | include/asm-arm/arch-iop33x/iop33x.h | 10 | ||||
| -rw-r--r-- | include/asm-arm/arch-iop33x/memory.h | 4 | ||||
| -rw-r--r-- | include/asm-arm/hardware/iop3xx.h | 22 |
5 files changed, 41 insertions, 8 deletions
diff --git a/include/asm-arm/arch-iop32x/iop32x.h b/include/asm-arm/arch-iop32x/iop32x.h index 2e9469047eb1..0d8af57221a1 100644 --- a/include/asm-arm/arch-iop32x/iop32x.h +++ b/include/asm-arm/arch-iop32x/iop32x.h | |||
| @@ -24,5 +24,14 @@ | |||
| 24 | 24 | ||
| 25 | #include <asm/hardware/iop3xx.h> | 25 | #include <asm/hardware/iop3xx.h> |
| 26 | 26 | ||
| 27 | /* ATU Parameters | ||
| 28 | * set up a 1:1 bus to physical ram relationship | ||
| 29 | * w/ physical ram on top of pci in the memory map | ||
| 30 | */ | ||
| 31 | #define IOP32X_MAX_RAM_SIZE 0x40000000UL | ||
| 32 | #define IOP3XX_MAX_RAM_SIZE IOP32X_MAX_RAM_SIZE | ||
| 33 | #define IOP3XX_PCI_LOWER_MEM_BA 0x80000000 | ||
| 34 | #define IOP32X_PCI_MEM_WINDOW_SIZE 0x04000000 | ||
| 35 | #define IOP3XX_PCI_MEM_WINDOW_SIZE IOP32X_PCI_MEM_WINDOW_SIZE | ||
| 27 | 36 | ||
| 28 | #endif | 37 | #endif |
diff --git a/include/asm-arm/arch-iop32x/memory.h b/include/asm-arm/arch-iop32x/memory.h index 764cd3f0d416..c51072af214e 100644 --- a/include/asm-arm/arch-iop32x/memory.h +++ b/include/asm-arm/arch-iop32x/memory.h | |||
| @@ -19,8 +19,8 @@ | |||
| 19 | * bus_to_virt: Used to convert an address for DMA operations | 19 | * bus_to_virt: Used to convert an address for DMA operations |
| 20 | * to an address that the kernel can use. | 20 | * to an address that the kernel can use. |
| 21 | */ | 21 | */ |
| 22 | #define __virt_to_bus(x) (((__virt_to_phys(x)) & ~(*IOP3XX_IATVR2)) | ((*IOP3XX_IABAR2) & 0xfffffff0)) | 22 | #define __virt_to_bus(x) (__virt_to_phys(x)) |
| 23 | #define __bus_to_virt(x) (__phys_to_virt(((x) & ~(*IOP3XX_IALR2)) | ( *IOP3XX_IATVR2))) | 23 | #define __bus_to_virt(x) (__phys_to_virt(x)) |
| 24 | 24 | ||
| 25 | 25 | ||
| 26 | #endif | 26 | #endif |
diff --git a/include/asm-arm/arch-iop33x/iop33x.h b/include/asm-arm/arch-iop33x/iop33x.h index 7ac6e93db5ff..766985b9a723 100644 --- a/include/asm-arm/arch-iop33x/iop33x.h +++ b/include/asm-arm/arch-iop33x/iop33x.h | |||
| @@ -29,5 +29,15 @@ | |||
| 29 | #define IOP33X_UART1_PHYS (IOP3XX_PERIPHERAL_PHYS_BASE + 0x1740) | 29 | #define IOP33X_UART1_PHYS (IOP3XX_PERIPHERAL_PHYS_BASE + 0x1740) |
| 30 | #define IOP33X_UART1_VIRT (IOP3XX_PERIPHERAL_VIRT_BASE + 0x1740) | 30 | #define IOP33X_UART1_VIRT (IOP3XX_PERIPHERAL_VIRT_BASE + 0x1740) |
| 31 | 31 | ||
| 32 | /* ATU Parameters | ||
| 33 | * set up a 1:1 bus to physical ram relationship | ||
| 34 | * w/ pci on top of physical ram in memory map | ||
| 35 | */ | ||
| 36 | #define IOP33X_MAX_RAM_SIZE 0x80000000UL | ||
| 37 | #define IOP3XX_MAX_RAM_SIZE IOP33X_MAX_RAM_SIZE | ||
| 38 | #define IOP3XX_PCI_LOWER_MEM_BA (PHYS_OFFSET + IOP33X_MAX_RAM_SIZE) | ||
| 39 | #define IOP33X_PCI_MEM_WINDOW_SIZE 0x08000000 | ||
| 40 | #define IOP3XX_PCI_MEM_WINDOW_SIZE IOP33X_PCI_MEM_WINDOW_SIZE | ||
| 41 | |||
| 32 | 42 | ||
| 33 | #endif | 43 | #endif |
diff --git a/include/asm-arm/arch-iop33x/memory.h b/include/asm-arm/arch-iop33x/memory.h index 0d39139b241e..c8749127d6ab 100644 --- a/include/asm-arm/arch-iop33x/memory.h +++ b/include/asm-arm/arch-iop33x/memory.h | |||
| @@ -19,8 +19,8 @@ | |||
| 19 | * bus_to_virt: Used to convert an address for DMA operations | 19 | * bus_to_virt: Used to convert an address for DMA operations |
| 20 | * to an address that the kernel can use. | 20 | * to an address that the kernel can use. |
| 21 | */ | 21 | */ |
| 22 | #define __virt_to_bus(x) (((__virt_to_phys(x)) & ~(*IOP3XX_IATVR2)) | ((*IOP3XX_IABAR2) & 0xfffffff0)) | 22 | #define __virt_to_bus(x) (__virt_to_phys(x)) |
| 23 | #define __bus_to_virt(x) (__phys_to_virt(((x) & ~(*IOP3XX_IALR2)) | ( *IOP3XX_IATVR2))) | 23 | #define __bus_to_virt(x) (__phys_to_virt(x)) |
| 24 | 24 | ||
| 25 | 25 | ||
| 26 | #endif | 26 | #endif |
diff --git a/include/asm-arm/hardware/iop3xx.h b/include/asm-arm/hardware/iop3xx.h index 15141a9caca8..ebbcd9be3fe5 100644 --- a/include/asm-arm/hardware/iop3xx.h +++ b/include/asm-arm/hardware/iop3xx.h | |||
| @@ -28,6 +28,7 @@ | |||
| 28 | extern void gpio_line_config(int line, int direction); | 28 | extern void gpio_line_config(int line, int direction); |
| 29 | extern int gpio_line_get(int line); | 29 | extern int gpio_line_get(int line); |
| 30 | extern void gpio_line_set(int line, int value); | 30 | extern void gpio_line_set(int line, int value); |
| 31 | extern int init_atu; | ||
| 31 | #endif | 32 | #endif |
| 32 | 33 | ||
| 33 | 34 | ||
| @@ -103,6 +104,21 @@ extern void gpio_line_set(int line, int value); | |||
| 103 | #define IOP3XX_PCIXCMD (volatile u16 *)IOP3XX_REG_ADDR(0x01e2) | 104 | #define IOP3XX_PCIXCMD (volatile u16 *)IOP3XX_REG_ADDR(0x01e2) |
| 104 | #define IOP3XX_PCIXSR (volatile u32 *)IOP3XX_REG_ADDR(0x01e4) | 105 | #define IOP3XX_PCIXSR (volatile u32 *)IOP3XX_REG_ADDR(0x01e4) |
| 105 | #define IOP3XX_PCIIRSR (volatile u32 *)IOP3XX_REG_ADDR(0x01ec) | 106 | #define IOP3XX_PCIIRSR (volatile u32 *)IOP3XX_REG_ADDR(0x01ec) |
| 107 | #define IOP3XX_PCSR_OUT_Q_BUSY (1 << 15) | ||
| 108 | #define IOP3XX_PCSR_IN_Q_BUSY (1 << 14) | ||
| 109 | #define IOP3XX_ATUCR_OUT_EN (1 << 1) | ||
| 110 | |||
| 111 | #define IOP3XX_INIT_ATU_DEFAULT 0 | ||
| 112 | #define IOP3XX_INIT_ATU_DISABLE -1 | ||
| 113 | #define IOP3XX_INIT_ATU_ENABLE 1 | ||
| 114 | |||
| 115 | #ifdef CONFIG_IOP3XX_ATU | ||
| 116 | #define iop3xx_get_init_atu(x) (init_atu == IOP3XX_INIT_ATU_DEFAULT ?\ | ||
| 117 | IOP3XX_INIT_ATU_ENABLE : init_atu) | ||
| 118 | #else | ||
| 119 | #define iop3xx_get_init_atu(x) (init_atu == IOP3XX_INIT_ATU_DEFAULT ?\ | ||
| 120 | IOP3XX_INIT_ATU_DISABLE : init_atu) | ||
| 121 | #endif | ||
| 106 | 122 | ||
| 107 | /* Messaging Unit */ | 123 | /* Messaging Unit */ |
| 108 | #define IOP3XX_IMR0 (volatile u32 *)IOP3XX_REG_ADDR(0x0310) | 124 | #define IOP3XX_IMR0 (volatile u32 *)IOP3XX_REG_ADDR(0x0310) |
| @@ -253,14 +269,12 @@ extern void gpio_line_set(int line, int value); | |||
| 253 | /* | 269 | /* |
| 254 | * IOP3XX I/O and Mem space regions for PCI autoconfiguration | 270 | * IOP3XX I/O and Mem space regions for PCI autoconfiguration |
| 255 | */ | 271 | */ |
| 256 | #define IOP3XX_PCI_MEM_WINDOW_SIZE 0x04000000 | 272 | #define IOP3XX_PCI_LOWER_MEM_PA 0x80000000 |
| 257 | #define IOP3XX_PCI_LOWER_MEM_PA 0x80000000 | ||
| 258 | #define IOP3XX_PCI_LOWER_MEM_BA (*IOP3XX_OMWTVR0) | ||
| 259 | 273 | ||
| 260 | #define IOP3XX_PCI_IO_WINDOW_SIZE 0x00010000 | 274 | #define IOP3XX_PCI_IO_WINDOW_SIZE 0x00010000 |
| 261 | #define IOP3XX_PCI_LOWER_IO_PA 0x90000000 | 275 | #define IOP3XX_PCI_LOWER_IO_PA 0x90000000 |
| 262 | #define IOP3XX_PCI_LOWER_IO_VA 0xfe000000 | 276 | #define IOP3XX_PCI_LOWER_IO_VA 0xfe000000 |
| 263 | #define IOP3XX_PCI_LOWER_IO_BA (*IOP3XX_OIOWTVR) | 277 | #define IOP3XX_PCI_LOWER_IO_BA 0x90000000 |
| 264 | #define IOP3XX_PCI_UPPER_IO_PA (IOP3XX_PCI_LOWER_IO_PA +\ | 278 | #define IOP3XX_PCI_UPPER_IO_PA (IOP3XX_PCI_LOWER_IO_PA +\ |
| 265 | IOP3XX_PCI_IO_WINDOW_SIZE - 1) | 279 | IOP3XX_PCI_IO_WINDOW_SIZE - 1) |
| 266 | #define IOP3XX_PCI_UPPER_IO_VA (IOP3XX_PCI_LOWER_IO_VA +\ | 280 | #define IOP3XX_PCI_UPPER_IO_VA (IOP3XX_PCI_LOWER_IO_VA +\ |
