diff options
| author | Dan Williams <dan.j.williams@intel.com> | 2007-02-13 11:11:04 -0500 |
|---|---|---|
| committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2007-02-14 10:21:21 -0500 |
| commit | 6df26700c0884cb3cce2b9fa4795888f86ca4d8f (patch) | |
| tree | 30444218ed615b3eb0569d8602be3e522a2d8895 /include/asm-arm/hardware | |
| parent | ae0a846e411dc0b568e8ccda584896310ee5f369 (diff) | |
[ARM] 4182/1: iop3xx: fix the ioremap implementation to not remap static ranges
Implement a custom ioremap implementation for iop3xx. This saves
establishing new mappings. It also cleans up the PCI IO resource to be a
physical address rather than a virtual address as Russell pointed out on
the original iop13xx port.
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'include/asm-arm/hardware')
| -rw-r--r-- | include/asm-arm/hardware/iop3xx.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/include/asm-arm/hardware/iop3xx.h b/include/asm-arm/hardware/iop3xx.h index 13ac8a4cd0..adb96c72ec 100644 --- a/include/asm-arm/hardware/iop3xx.h +++ b/include/asm-arm/hardware/iop3xx.h | |||
| @@ -37,6 +37,13 @@ extern void gpio_line_set(int line, int value); | |||
| 37 | #define IOP3XX_PERIPHERAL_PHYS_BASE 0xffffe000 | 37 | #define IOP3XX_PERIPHERAL_PHYS_BASE 0xffffe000 |
| 38 | #define IOP3XX_PERIPHERAL_VIRT_BASE 0xfeffe000 | 38 | #define IOP3XX_PERIPHERAL_VIRT_BASE 0xfeffe000 |
| 39 | #define IOP3XX_PERIPHERAL_SIZE 0x00002000 | 39 | #define IOP3XX_PERIPHERAL_SIZE 0x00002000 |
| 40 | #define IOP3XX_PERIPHERAL_UPPER_PA (IOP3XX_PERIPHERAL_PHYS_BASE +\ | ||
| 41 | IOP3XX_PERIPHERAL_SIZE - 1) | ||
| 42 | #define IOP3XX_PERIPHERAL_UPPER_VA (IOP3XX_PERIPHERAL_VIRT_BASE +\ | ||
| 43 | IOP3XX_PERIPHERAL_SIZE - 1) | ||
| 44 | #define IOP3XX_PMMR_PHYS_TO_VIRT(addr) (u32) ((u32) addr -\ | ||
| 45 | (IOP3XX_PERIPHERAL_PHYS_BASE\ | ||
| 46 | - IOP3XX_PERIPHERAL_VIRT_BASE)) | ||
| 40 | #define IOP3XX_REG_ADDR(reg) (IOP3XX_PERIPHERAL_VIRT_BASE + (reg)) | 47 | #define IOP3XX_REG_ADDR(reg) (IOP3XX_PERIPHERAL_VIRT_BASE + (reg)) |
| 41 | 48 | ||
| 42 | /* Address Translation Unit */ | 49 | /* Address Translation Unit */ |
| @@ -258,6 +265,13 @@ extern void gpio_line_set(int line, int value); | |||
| 258 | #define IOP3XX_PCI_LOWER_IO_PA 0x90000000 | 265 | #define IOP3XX_PCI_LOWER_IO_PA 0x90000000 |
| 259 | #define IOP3XX_PCI_LOWER_IO_VA 0xfe000000 | 266 | #define IOP3XX_PCI_LOWER_IO_VA 0xfe000000 |
| 260 | #define IOP3XX_PCI_LOWER_IO_BA (*IOP3XX_OIOWTVR) | 267 | #define IOP3XX_PCI_LOWER_IO_BA (*IOP3XX_OIOWTVR) |
| 268 | #define IOP3XX_PCI_UPPER_IO_PA (IOP3XX_PCI_LOWER_IO_PA +\ | ||
| 269 | IOP3XX_PCI_IO_WINDOW_SIZE - 1) | ||
| 270 | #define IOP3XX_PCI_UPPER_IO_VA (IOP3XX_PCI_LOWER_IO_VA +\ | ||
| 271 | IOP3XX_PCI_IO_WINDOW_SIZE - 1) | ||
| 272 | #define IOP3XX_PCI_IO_PHYS_TO_VIRT(addr) (((u32) addr -\ | ||
| 273 | IOP3XX_PCI_LOWER_IO_PA) +\ | ||
| 274 | IOP3XX_PCI_LOWER_IO_VA) | ||
| 261 | 275 | ||
| 262 | 276 | ||
| 263 | #ifndef __ASSEMBLY__ | 277 | #ifndef __ASSEMBLY__ |
