diff options
Diffstat (limited to 'include')
50 files changed, 1259 insertions, 598 deletions
diff --git a/include/asm-arm/arch-ixp2000/enp2611.h b/include/asm-arm/arch-ixp2000/enp2611.h index 31ae88674968..95128d9f5026 100644 --- a/include/asm-arm/arch-ixp2000/enp2611.h +++ b/include/asm-arm/arch-ixp2000/enp2611.h | |||
| @@ -21,8 +21,20 @@ | |||
| 21 | #ifndef __ENP2611_H | 21 | #ifndef __ENP2611_H |
| 22 | #define __ENP2611_H | 22 | #define __ENP2611_H |
| 23 | 23 | ||
| 24 | #define ENP2611_GPIO_SCL 0x07 | 24 | #define ENP2611_CALEB_PHYS_BASE 0xc5000000 |
| 25 | #define ENP2611_GPIO_SDA 0x06 | 25 | #define ENP2611_CALEB_VIRT_BASE 0xfe000000 |
| 26 | #define ENP2611_CALEB_SIZE 0x00100000 | ||
| 27 | |||
| 28 | #define ENP2611_PM3386_0_PHYS_BASE 0xc6000000 | ||
| 29 | #define ENP2611_PM3386_0_VIRT_BASE 0xfe100000 | ||
| 30 | #define ENP2611_PM3386_0_SIZE 0x00100000 | ||
| 31 | |||
| 32 | #define ENP2611_PM3386_1_PHYS_BASE 0xc6400000 | ||
| 33 | #define ENP2611_PM3386_1_VIRT_BASE 0xfe200000 | ||
| 34 | #define ENP2611_PM3386_1_SIZE 0x00100000 | ||
| 35 | |||
| 36 | #define ENP2611_GPIO_SCL 7 | ||
| 37 | #define ENP2611_GPIO_SDA 6 | ||
| 26 | 38 | ||
| 27 | 39 | ||
| 28 | #endif | 40 | #endif |
diff --git a/include/asm-arm/arch-ixp2000/ixp2000-regs.h b/include/asm-arm/arch-ixp2000/ixp2000-regs.h index def089d693d2..fc5ac6aec4f2 100644 --- a/include/asm-arm/arch-ixp2000/ixp2000-regs.h +++ b/include/asm-arm/arch-ixp2000/ixp2000-regs.h | |||
| @@ -59,14 +59,15 @@ | |||
| 59 | #define IXP2000_CAP_SIZE 0x00100000 | 59 | #define IXP2000_CAP_SIZE 0x00100000 |
| 60 | 60 | ||
| 61 | /* | 61 | /* |
| 62 | * Addresses for specific on-chip peripherals | 62 | * Addresses for specific on-chip peripherals. |
| 63 | */ | 63 | */ |
| 64 | #define IXP2000_SLOWPORT_CSR_VIRT_BASE 0xfef80000 | 64 | #define IXP2000_SLOWPORT_CSR_VIRT_BASE 0xfef80000 |
| 65 | #define IXP2000_GLOBAL_REG_VIRT_BASE 0xfef04000 | 65 | #define IXP2000_GLOBAL_REG_VIRT_BASE 0xfef04000 |
| 66 | #define IXP2000_UART_PHYS_BASE 0xc0030000 | 66 | #define IXP2000_UART_PHYS_BASE 0xc0030000 |
| 67 | #define IXP2000_UART_VIRT_BASE 0xfef30000 | 67 | #define IXP2000_UART_VIRT_BASE 0xfef30000 |
| 68 | #define IXP2000_TIMER_VIRT_BASE 0xfef20000 | 68 | #define IXP2000_TIMER_VIRT_BASE 0xfef20000 |
| 69 | #define IXP2000_GPIO_VIRT_BASE 0Xfef10000 | 69 | #define IXP2000_UENGINE_CSR_VIRT_BASE 0xfef18000 |
| 70 | #define IXP2000_GPIO_VIRT_BASE 0xfef10000 | ||
| 70 | 71 | ||
| 71 | /* | 72 | /* |
| 72 | * Devices outside of the 0xc0000000 -> 0xc0100000 range. The virtual | 73 | * Devices outside of the 0xc0000000 -> 0xc0100000 range. The virtual |
| @@ -252,7 +253,7 @@ | |||
| 252 | #define IXP2000_PCI_XSCALE_INT_ENABLE IXP2000_PCI_CSR(0x15C) | 253 | #define IXP2000_PCI_XSCALE_INT_ENABLE IXP2000_PCI_CSR(0x15C) |
| 253 | 254 | ||
| 254 | #define IXP2000_PCICNTL_PNR (1<<17) /* PCI not Reset bit of PCI_CONTROL */ | 255 | #define IXP2000_PCICNTL_PNR (1<<17) /* PCI not Reset bit of PCI_CONTROL */ |
| 255 | #define IXP2000_PCICNTL_PCF (1<<28) /* PCI Centrolfunction bit */ | 256 | #define IXP2000_PCICNTL_PCF (1<<28) /* PCI Central function bit */ |
| 256 | #define IXP2000_XSCALE_INT (1<<1) /* Interrupt from XScale to PCI */ | 257 | #define IXP2000_XSCALE_INT (1<<1) /* Interrupt from XScale to PCI */ |
| 257 | 258 | ||
| 258 | /* These are from the IRQ register in the PCI ISR register */ | 259 | /* These are from the IRQ register in the PCI ISR register */ |
diff --git a/include/asm-arm/arch-ixp2000/system.h b/include/asm-arm/arch-ixp2000/system.h index 4f489cc0dfa5..ddbbb34b5f95 100644 --- a/include/asm-arm/arch-ixp2000/system.h +++ b/include/asm-arm/arch-ixp2000/system.h | |||
| @@ -26,29 +26,24 @@ static inline void arch_reset(char mode) | |||
| 26 | * RedBoot bank. | 26 | * RedBoot bank. |
| 27 | */ | 27 | */ |
| 28 | if (machine_is_ixdp2401()) { | 28 | if (machine_is_ixdp2401()) { |
| 29 | *IXDP2X01_CPLD_FLASH_REG = ((0 >> IXDP2X01_FLASH_WINDOW_BITS) | 29 | ixp2000_reg_write(IXDP2X01_CPLD_FLASH_REG, |
| 30 | | IXDP2X01_CPLD_FLASH_INTERN); | 30 | ((0 >> IXDP2X01_FLASH_WINDOW_BITS) |
| 31 | *IXDP2X01_CPLD_RESET_REG = 0xffffffff; | 31 | | IXDP2X01_CPLD_FLASH_INTERN)); |
| 32 | ixp2000_reg_wrb(IXDP2X01_CPLD_RESET_REG, 0xffffffff); | ||
| 32 | } | 33 | } |
| 33 | 34 | ||
| 34 | /* | 35 | /* |
| 35 | * On IXDP2801 we need to write this magic sequence to the CPLD | 36 | * On IXDP2801 we need to write this magic sequence to the CPLD |
| 36 | * to cause a complete reset of the CPU and all external devices | 37 | * to cause a complete reset of the CPU and all external devices |
| 37 | * and moves the flash bank register back to 0. | 38 | * and move the flash bank register back to 0. |
| 38 | */ | 39 | */ |
| 39 | if (machine_is_ixdp2801()) { | 40 | if (machine_is_ixdp2801()) { |
| 40 | unsigned long reset_reg = *IXDP2X01_CPLD_RESET_REG; | 41 | unsigned long reset_reg = *IXDP2X01_CPLD_RESET_REG; |
| 42 | |||
| 41 | reset_reg = 0x55AA0000 | (reset_reg & 0x0000FFFF); | 43 | reset_reg = 0x55AA0000 | (reset_reg & 0x0000FFFF); |
| 42 | *IXDP2X01_CPLD_RESET_REG = reset_reg; | 44 | ixp2000_reg_write(IXDP2X01_CPLD_RESET_REG, reset_reg); |
| 43 | mb(); | 45 | ixp2000_reg_wrb(IXDP2X01_CPLD_RESET_REG, 0x80000000); |
| 44 | *IXDP2X01_CPLD_RESET_REG = 0x80000000; | ||
| 45 | } | 46 | } |
| 46 | 47 | ||
| 47 | /* | 48 | ixp2000_reg_wrb(IXP2000_RESET0, RSTALL); |
| 48 | * We do a reset all if we are PCI master. We could be a slave and we | ||
| 49 | * don't want to do anything funky on the PCI bus. | ||
| 50 | */ | ||
| 51 | if (*IXP2000_STRAP_OPTIONS & CFG_PCI_BOOT_HOST) { | ||
| 52 | *(IXP2000_RESET0) |= (RSTALL); | ||
| 53 | } | ||
| 54 | } | 49 | } |
diff --git a/include/asm-arm/arch-ixp2000/uengine.h b/include/asm-arm/arch-ixp2000/uengine.h new file mode 100644 index 000000000000..b442d65c6593 --- /dev/null +++ b/include/asm-arm/arch-ixp2000/uengine.h | |||
| @@ -0,0 +1,62 @@ | |||
| 1 | /* | ||
| 2 | * Generic library functions for the microengines found on the Intel | ||
| 3 | * IXP2000 series of network processors. | ||
| 4 | * | ||
| 5 | * Copyright (C) 2004, 2005 Lennert Buytenhek <buytenh@wantstofly.org> | ||
| 6 | * Dedicated to Marija Kulikova. | ||
| 7 | * | ||
| 8 | * This program is free software; you can redistribute it and/or modify | ||
| 9 | * it under the terms of the GNU Lesser General Public License as | ||
| 10 | * published by the Free Software Foundation; either version 2.1 of the | ||
| 11 | * License, or (at your option) any later version. | ||
| 12 | */ | ||
| 13 | |||
| 14 | #ifndef __IXP2000_UENGINE_H | ||
| 15 | #define __IXP2000_UENGINE_H | ||
| 16 | |||
| 17 | extern u32 ixp2000_uengine_mask; | ||
| 18 | |||
| 19 | struct ixp2000_uengine_code | ||
| 20 | { | ||
| 21 | u32 cpu_model_bitmask; | ||
| 22 | u8 cpu_min_revision; | ||
| 23 | u8 cpu_max_revision; | ||
| 24 | |||
| 25 | u32 uengine_parameters; | ||
| 26 | |||
| 27 | struct ixp2000_reg_value { | ||
| 28 | int reg; | ||
| 29 | u32 value; | ||
| 30 | } *initial_reg_values; | ||
| 31 | |||
| 32 | int num_insns; | ||
| 33 | u8 *insns; | ||
| 34 | }; | ||
| 35 | |||
| 36 | u32 ixp2000_uengine_csr_read(int uengine, int offset); | ||
| 37 | void ixp2000_uengine_csr_write(int uengine, int offset, u32 value); | ||
| 38 | void ixp2000_uengine_reset(u32 uengine_mask); | ||
| 39 | void ixp2000_uengine_set_mode(int uengine, u32 mode); | ||
| 40 | void ixp2000_uengine_load_microcode(int uengine, u8 *ucode, int insns); | ||
| 41 | void ixp2000_uengine_init_context(int uengine, int context, int pc); | ||
| 42 | void ixp2000_uengine_start_contexts(int uengine, u8 ctx_mask); | ||
| 43 | void ixp2000_uengine_stop_contexts(int uengine, u8 ctx_mask); | ||
| 44 | int ixp2000_uengine_load(int uengine, struct ixp2000_uengine_code *c); | ||
| 45 | |||
| 46 | #define IXP2000_UENGINE_8_CONTEXTS 0x00000000 | ||
| 47 | #define IXP2000_UENGINE_4_CONTEXTS 0x80000000 | ||
| 48 | #define IXP2000_UENGINE_PRN_UPDATE_EVERY 0x40000000 | ||
| 49 | #define IXP2000_UENGINE_PRN_UPDATE_ON_ACCESS 0x00000000 | ||
| 50 | #define IXP2000_UENGINE_NN_FROM_SELF 0x00100000 | ||
| 51 | #define IXP2000_UENGINE_NN_FROM_PREVIOUS 0x00000000 | ||
| 52 | #define IXP2000_UENGINE_ASSERT_EMPTY_AT_3 0x000c0000 | ||
| 53 | #define IXP2000_UENGINE_ASSERT_EMPTY_AT_2 0x00080000 | ||
| 54 | #define IXP2000_UENGINE_ASSERT_EMPTY_AT_1 0x00040000 | ||
| 55 | #define IXP2000_UENGINE_ASSERT_EMPTY_AT_0 0x00000000 | ||
| 56 | #define IXP2000_UENGINE_LM_ADDR1_GLOBAL 0x00020000 | ||
| 57 | #define IXP2000_UENGINE_LM_ADDR1_PER_CONTEXT 0x00000000 | ||
| 58 | #define IXP2000_UENGINE_LM_ADDR0_GLOBAL 0x00010000 | ||
| 59 | #define IXP2000_UENGINE_LM_ADDR0_PER_CONTEXT 0x00000000 | ||
| 60 | |||
| 61 | |||
| 62 | #endif | ||
diff --git a/include/asm-arm/arch-ixp4xx/io.h b/include/asm-arm/arch-ixp4xx/io.h index 80d05ecad2f0..688f7f90d93e 100644 --- a/include/asm-arm/arch-ixp4xx/io.h +++ b/include/asm-arm/arch-ixp4xx/io.h | |||
| @@ -80,9 +80,9 @@ __ixp4xx_iounmap(void __iomem *addr) | |||
| 80 | #define __arch_ioremap(a, s, f, x) __ixp4xx_ioremap(a, s, f, x) | 80 | #define __arch_ioremap(a, s, f, x) __ixp4xx_ioremap(a, s, f, x) |
| 81 | #define __arch_iounmap(a) __ixp4xx_iounmap(a) | 81 | #define __arch_iounmap(a) __ixp4xx_iounmap(a) |
| 82 | 82 | ||
| 83 | #define writeb(p, v) __ixp4xx_writeb(p, v) | 83 | #define writeb(v, p) __ixp4xx_writeb(v, p) |
| 84 | #define writew(p, v) __ixp4xx_writew(p, v) | 84 | #define writew(v, p) __ixp4xx_writew(v, p) |
| 85 | #define writel(p, v) __ixp4xx_writel(p, v) | 85 | #define writel(v, p) __ixp4xx_writel(v, p) |
| 86 | 86 | ||
| 87 | #define writesb(p, v, l) __ixp4xx_writesb(p, v, l) | 87 | #define writesb(p, v, l) __ixp4xx_writesb(p, v, l) |
| 88 | #define writesw(p, v, l) __ixp4xx_writesw(p, v, l) | 88 | #define writesw(p, v, l) __ixp4xx_writesw(p, v, l) |
| @@ -97,8 +97,9 @@ __ixp4xx_iounmap(void __iomem *addr) | |||
| 97 | #define readsl(p, v, l) __ixp4xx_readsl(p, v, l) | 97 | #define readsl(p, v, l) __ixp4xx_readsl(p, v, l) |
| 98 | 98 | ||
| 99 | static inline void | 99 | static inline void |
| 100 | __ixp4xx_writeb(u8 value, u32 addr) | 100 | __ixp4xx_writeb(u8 value, volatile void __iomem *p) |
| 101 | { | 101 | { |
| 102 | u32 addr = (u32)p; | ||
| 102 | u32 n, byte_enables, data; | 103 | u32 n, byte_enables, data; |
| 103 | 104 | ||
| 104 | if (addr >= VMALLOC_START) { | 105 | if (addr >= VMALLOC_START) { |
| @@ -113,15 +114,16 @@ __ixp4xx_writeb(u8 value, u32 addr) | |||
| 113 | } | 114 | } |
| 114 | 115 | ||
| 115 | static inline void | 116 | static inline void |
| 116 | __ixp4xx_writesb(u32 bus_addr, const u8 *vaddr, int count) | 117 | __ixp4xx_writesb(volatile void __iomem *bus_addr, const u8 *vaddr, int count) |
| 117 | { | 118 | { |
| 118 | while (count--) | 119 | while (count--) |
| 119 | writeb(*vaddr++, bus_addr); | 120 | writeb(*vaddr++, bus_addr); |
| 120 | } | 121 | } |
| 121 | 122 | ||
| 122 | static inline void | 123 | static inline void |
| 123 | __ixp4xx_writew(u16 value, u32 addr) | 124 | __ixp4xx_writew(u16 value, volatile void __iomem *p) |
| 124 | { | 125 | { |
| 126 | u32 addr = (u32)p; | ||
| 125 | u32 n, byte_enables, data; | 127 | u32 n, byte_enables, data; |
| 126 | 128 | ||
| 127 | if (addr >= VMALLOC_START) { | 129 | if (addr >= VMALLOC_START) { |
| @@ -136,15 +138,16 @@ __ixp4xx_writew(u16 value, u32 addr) | |||
| 136 | } | 138 | } |
| 137 | 139 | ||
| 138 | static inline void | 140 | static inline void |
| 139 | __ixp4xx_writesw(u32 bus_addr, const u16 *vaddr, int count) | 141 | __ixp4xx_writesw(volatile void __iomem *bus_addr, const u16 *vaddr, int count) |
| 140 | { | 142 | { |
| 141 | while (count--) | 143 | while (count--) |
| 142 | writew(*vaddr++, bus_addr); | 144 | writew(*vaddr++, bus_addr); |
| 143 | } | 145 | } |
| 144 | 146 | ||
| 145 | static inline void | 147 | static inline void |
| 146 | __ixp4xx_writel(u32 value, u32 addr) | 148 | __ixp4xx_writel(u32 value, volatile void __iomem *p) |
| 147 | { | 149 | { |
| 150 | u32 addr = (u32)p; | ||
| 148 | if (addr >= VMALLOC_START) { | 151 | if (addr >= VMALLOC_START) { |
| 149 | __raw_writel(value, addr); | 152 | __raw_writel(value, addr); |
| 150 | return; | 153 | return; |
| @@ -154,15 +157,16 @@ __ixp4xx_writel(u32 value, u32 addr) | |||
| 154 | } | 157 | } |
| 155 | 158 | ||
| 156 | static inline void | 159 | static inline void |
| 157 | __ixp4xx_writesl(u32 bus_addr, const u32 *vaddr, int count) | 160 | __ixp4xx_writesl(volatile void __iomem *bus_addr, const u32 *vaddr, int count) |
| 158 | { | 161 | { |
| 159 | while (count--) | 162 | while (count--) |
| 160 | writel(*vaddr++, bus_addr); | 163 | writel(*vaddr++, bus_addr); |
| 161 | } | 164 | } |
| 162 | 165 | ||
| 163 | static inline unsigned char | 166 | static inline unsigned char |
| 164 | __ixp4xx_readb(u32 addr) | 167 | __ixp4xx_readb(const volatile void __iomem *p) |
| 165 | { | 168 | { |
| 169 | u32 addr = (u32)p; | ||
| 166 | u32 n, byte_enables, data; | 170 | u32 n, byte_enables, data; |
| 167 | 171 | ||
| 168 | if (addr >= VMALLOC_START) | 172 | if (addr >= VMALLOC_START) |
| @@ -177,15 +181,16 @@ __ixp4xx_readb(u32 addr) | |||
| 177 | } | 181 | } |
| 178 | 182 | ||
| 179 | static inline void | 183 | static inline void |
| 180 | __ixp4xx_readsb(u32 bus_addr, u8 *vaddr, u32 count) | 184 | __ixp4xx_readsb(const volatile void __iomem *bus_addr, u8 *vaddr, u32 count) |
| 181 | { | 185 | { |
| 182 | while (count--) | 186 | while (count--) |
| 183 | *vaddr++ = readb(bus_addr); | 187 | *vaddr++ = readb(bus_addr); |
| 184 | } | 188 | } |
| 185 | 189 | ||
| 186 | static inline unsigned short | 190 | static inline unsigned short |
| 187 | __ixp4xx_readw(u32 addr) | 191 | __ixp4xx_readw(const volatile void __iomem *p) |
| 188 | { | 192 | { |
| 193 | u32 addr = (u32)p; | ||
| 189 | u32 n, byte_enables, data; | 194 | u32 n, byte_enables, data; |
| 190 | 195 | ||
| 191 | if (addr >= VMALLOC_START) | 196 | if (addr >= VMALLOC_START) |
| @@ -200,15 +205,16 @@ __ixp4xx_readw(u32 addr) | |||
| 200 | } | 205 | } |
| 201 | 206 | ||
| 202 | static inline void | 207 | static inline void |
| 203 | __ixp4xx_readsw(u32 bus_addr, u16 *vaddr, u32 count) | 208 | __ixp4xx_readsw(const volatile void __iomem *bus_addr, u16 *vaddr, u32 count) |
| 204 | { | 209 | { |
| 205 | while (count--) | 210 | while (count--) |
| 206 | *vaddr++ = readw(bus_addr); | 211 | *vaddr++ = readw(bus_addr); |
| 207 | } | 212 | } |
| 208 | 213 | ||
| 209 | static inline unsigned long | 214 | static inline unsigned long |
| 210 | __ixp4xx_readl(u32 addr) | 215 | __ixp4xx_readl(const volatile void __iomem *p) |
| 211 | { | 216 | { |
| 217 | u32 addr = (u32)p; | ||
| 212 | u32 data; | 218 | u32 data; |
| 213 | 219 | ||
| 214 | if (addr >= VMALLOC_START) | 220 | if (addr >= VMALLOC_START) |
| @@ -221,7 +227,7 @@ __ixp4xx_readl(u32 addr) | |||
| 221 | } | 227 | } |
| 222 | 228 | ||
| 223 | static inline void | 229 | static inline void |
| 224 | __ixp4xx_readsl(u32 bus_addr, u32 *vaddr, u32 count) | 230 | __ixp4xx_readsl(const volatile void __iomem *bus_addr, u32 *vaddr, u32 count) |
| 225 | { | 231 | { |
| 226 | while (count--) | 232 | while (count--) |
| 227 | *vaddr++ = readl(bus_addr); | 233 | *vaddr++ = readl(bus_addr); |
| @@ -239,7 +245,7 @@ __ixp4xx_readsl(u32 bus_addr, u32 *vaddr, u32 count) | |||
| 239 | eth_copy_and_sum((s),__mem_pci(c),(l),(b)) | 245 | eth_copy_and_sum((s),__mem_pci(c),(l),(b)) |
| 240 | 246 | ||
| 241 | static inline int | 247 | static inline int |
| 242 | check_signature(unsigned long bus_addr, const unsigned char *signature, | 248 | check_signature(const unsigned char __iomem *bus_addr, const unsigned char *signature, |
| 243 | int length) | 249 | int length) |
| 244 | { | 250 | { |
| 245 | int retval = 0; | 251 | int retval = 0; |
| @@ -389,7 +395,7 @@ __ixp4xx_insl(u32 io_addr, u32 *vaddr, u32 count) | |||
| 389 | #define __is_io_address(p) (((unsigned long)p >= PIO_OFFSET) && \ | 395 | #define __is_io_address(p) (((unsigned long)p >= PIO_OFFSET) && \ |
| 390 | ((unsigned long)p <= (PIO_MASK + PIO_OFFSET))) | 396 | ((unsigned long)p <= (PIO_MASK + PIO_OFFSET))) |
| 391 | static inline unsigned int | 397 | static inline unsigned int |
| 392 | __ixp4xx_ioread8(void __iomem *addr) | 398 | __ixp4xx_ioread8(const void __iomem *addr) |
| 393 | { | 399 | { |
| 394 | unsigned long port = (unsigned long __force)addr; | 400 | unsigned long port = (unsigned long __force)addr; |
| 395 | if (__is_io_address(port)) | 401 | if (__is_io_address(port)) |
| @@ -398,12 +404,12 @@ __ixp4xx_ioread8(void __iomem *addr) | |||
| 398 | #ifndef CONFIG_IXP4XX_INDIRECT_PCI | 404 | #ifndef CONFIG_IXP4XX_INDIRECT_PCI |
| 399 | return (unsigned int)__raw_readb(port); | 405 | return (unsigned int)__raw_readb(port); |
| 400 | #else | 406 | #else |
| 401 | return (unsigned int)__ixp4xx_readb(port); | 407 | return (unsigned int)__ixp4xx_readb(addr); |
| 402 | #endif | 408 | #endif |
| 403 | } | 409 | } |
| 404 | 410 | ||
| 405 | static inline void | 411 | static inline void |
| 406 | __ixp4xx_ioread8_rep(void __iomem *addr, void *vaddr, u32 count) | 412 | __ixp4xx_ioread8_rep(const void __iomem *addr, void *vaddr, u32 count) |
| 407 | { | 413 | { |
| 408 | unsigned long port = (unsigned long __force)addr; | 414 | unsigned long port = (unsigned long __force)addr; |
| 409 | if (__is_io_address(port)) | 415 | if (__is_io_address(port)) |
| @@ -412,12 +418,12 @@ __ixp4xx_ioread8_rep(void __iomem *addr, void *vaddr, u32 count) | |||
| 412 | #ifndef CONFIG_IXP4XX_INDIRECT_PCI | 418 | #ifndef CONFIG_IXP4XX_INDIRECT_PCI |
| 413 | __raw_readsb(addr, vaddr, count); | 419 | __raw_readsb(addr, vaddr, count); |
| 414 | #else | 420 | #else |
| 415 | __ixp4xx_readsb(port, vaddr, count); | 421 | __ixp4xx_readsb(addr, vaddr, count); |
| 416 | #endif | 422 | #endif |
| 417 | } | 423 | } |
| 418 | 424 | ||
| 419 | static inline unsigned int | 425 | static inline unsigned int |
| 420 | __ixp4xx_ioread16(void __iomem *addr) | 426 | __ixp4xx_ioread16(const void __iomem *addr) |
| 421 | { | 427 | { |
| 422 | unsigned long port = (unsigned long __force)addr; | 428 | unsigned long port = (unsigned long __force)addr; |
| 423 | if (__is_io_address(port)) | 429 | if (__is_io_address(port)) |
| @@ -426,12 +432,12 @@ __ixp4xx_ioread16(void __iomem *addr) | |||
| 426 | #ifndef CONFIG_IXP4XX_INDIRECT_PCI | 432 | #ifndef CONFIG_IXP4XX_INDIRECT_PCI |
| 427 | return le16_to_cpu(__raw_readw((u32)port)); | 433 | return le16_to_cpu(__raw_readw((u32)port)); |
| 428 | #else | 434 | #else |
| 429 | return (unsigned int)__ixp4xx_readw((u32)port); | 435 | return (unsigned int)__ixp4xx_readw(addr); |
| 430 | #endif | 436 | #endif |
| 431 | } | 437 | } |
| 432 | 438 | ||
| 433 | static inline void | 439 | static inline void |
| 434 | __ixp4xx_ioread16_rep(void __iomem *addr, void *vaddr, u32 count) | 440 | __ixp4xx_ioread16_rep(const void __iomem *addr, void *vaddr, u32 count) |
| 435 | { | 441 | { |
| 436 | unsigned long port = (unsigned long __force)addr; | 442 | unsigned long port = (unsigned long __force)addr; |
| 437 | if (__is_io_address(port)) | 443 | if (__is_io_address(port)) |
| @@ -440,12 +446,12 @@ __ixp4xx_ioread16_rep(void __iomem *addr, void *vaddr, u32 count) | |||
| 440 | #ifndef CONFIG_IXP4XX_INDIRECT_PCI | 446 | #ifndef CONFIG_IXP4XX_INDIRECT_PCI |
| 441 | __raw_readsw(addr, vaddr, count); | 447 | __raw_readsw(addr, vaddr, count); |
| 442 | #else | 448 | #else |
| 443 | __ixp4xx_readsw(port, vaddr, count); | 449 | __ixp4xx_readsw(addr, vaddr, count); |
| 444 | #endif | 450 | #endif |
| 445 | } | 451 | } |
| 446 | 452 | ||
| 447 | static inline unsigned int | 453 | static inline unsigned int |
| 448 | __ixp4xx_ioread32(void __iomem *addr) | 454 | __ixp4xx_ioread32(const void __iomem *addr) |
| 449 | { | 455 | { |
| 450 | unsigned long port = (unsigned long __force)addr; | 456 | unsigned long port = (unsigned long __force)addr; |
| 451 | if (__is_io_address(port)) | 457 | if (__is_io_address(port)) |
| @@ -454,13 +460,13 @@ __ixp4xx_ioread32(void __iomem *addr) | |||
| 454 | #ifndef CONFIG_IXP4XX_INDIRECT_PCI | 460 | #ifndef CONFIG_IXP4XX_INDIRECT_PCI |
| 455 | return le32_to_cpu(__raw_readl((u32)port)); | 461 | return le32_to_cpu(__raw_readl((u32)port)); |
| 456 | #else | 462 | #else |
| 457 | return (unsigned int)__ixp4xx_readl((u32)port); | 463 | return (unsigned int)__ixp4xx_readl(addr); |
| 458 | #endif | 464 | #endif |
| 459 | } | 465 | } |
| 460 | } | 466 | } |
| 461 | 467 | ||
| 462 | static inline void | 468 | static inline void |
| 463 | __ixp4xx_ioread32_rep(void __iomem *addr, void *vaddr, u32 count) | 469 | __ixp4xx_ioread32_rep(const void __iomem *addr, void *vaddr, u32 count) |
| 464 | { | 470 | { |
| 465 | unsigned long port = (unsigned long __force)addr; | 471 | unsigned long port = (unsigned long __force)addr; |
| 466 | if (__is_io_address(port)) | 472 | if (__is_io_address(port)) |
| @@ -469,7 +475,7 @@ __ixp4xx_ioread32_rep(void __iomem *addr, void *vaddr, u32 count) | |||
| 469 | #ifndef CONFIG_IXP4XX_INDIRECT_PCI | 475 | #ifndef CONFIG_IXP4XX_INDIRECT_PCI |
| 470 | __raw_readsl(addr, vaddr, count); | 476 | __raw_readsl(addr, vaddr, count); |
| 471 | #else | 477 | #else |
| 472 | __ixp4xx_readsl(port, vaddr, count); | 478 | __ixp4xx_readsl(addr, vaddr, count); |
| 473 | #endif | 479 | #endif |
| 474 | } | 480 | } |
| 475 | 481 | ||
| @@ -483,7 +489,7 @@ __ixp4xx_iowrite8(u8 value, void __iomem *addr) | |||
| 483 | #ifndef CONFIG_IXP4XX_INDIRECT_PCI | 489 | #ifndef CONFIG_IXP4XX_INDIRECT_PCI |
| 484 | __raw_writeb(value, port); | 490 | __raw_writeb(value, port); |
| 485 | #else | 491 | #else |
| 486 | __ixp4xx_writeb(value, port); | 492 | __ixp4xx_writeb(value, addr); |
| 487 | #endif | 493 | #endif |
| 488 | } | 494 | } |
| 489 | 495 | ||
| @@ -497,7 +503,7 @@ __ixp4xx_iowrite8_rep(void __iomem *addr, const void *vaddr, u32 count) | |||
| 497 | #ifndef CONFIG_IXP4XX_INDIRECT_PCI | 503 | #ifndef CONFIG_IXP4XX_INDIRECT_PCI |
| 498 | __raw_writesb(addr, vaddr, count); | 504 | __raw_writesb(addr, vaddr, count); |
| 499 | #else | 505 | #else |
| 500 | __ixp4xx_writesb(port, vaddr, count); | 506 | __ixp4xx_writesb(addr, vaddr, count); |
| 501 | #endif | 507 | #endif |
| 502 | } | 508 | } |
| 503 | 509 | ||
| @@ -511,7 +517,7 @@ __ixp4xx_iowrite16(u16 value, void __iomem *addr) | |||
| 511 | #ifndef CONFIG_IXP4XX_INDIRECT_PCI | 517 | #ifndef CONFIG_IXP4XX_INDIRECT_PCI |
| 512 | __raw_writew(cpu_to_le16(value), addr); | 518 | __raw_writew(cpu_to_le16(value), addr); |
| 513 | #else | 519 | #else |
| 514 | __ixp4xx_writew(value, port); | 520 | __ixp4xx_writew(value, addr); |
| 515 | #endif | 521 | #endif |
| 516 | } | 522 | } |
| 517 | 523 | ||
| @@ -525,7 +531,7 @@ __ixp4xx_iowrite16_rep(void __iomem *addr, const void *vaddr, u32 count) | |||
| 525 | #ifndef CONFIG_IXP4XX_INDIRECT_PCI | 531 | #ifndef CONFIG_IXP4XX_INDIRECT_PCI |
| 526 | __raw_writesw(addr, vaddr, count); | 532 | __raw_writesw(addr, vaddr, count); |
| 527 | #else | 533 | #else |
| 528 | __ixp4xx_writesw(port, vaddr, count); | 534 | __ixp4xx_writesw(addr, vaddr, count); |
| 529 | #endif | 535 | #endif |
| 530 | } | 536 | } |
| 531 | 537 | ||
| @@ -539,7 +545,7 @@ __ixp4xx_iowrite32(u32 value, void __iomem *addr) | |||
| 539 | #ifndef CONFIG_IXP4XX_INDIRECT_PCI | 545 | #ifndef CONFIG_IXP4XX_INDIRECT_PCI |
| 540 | __raw_writel(cpu_to_le32(value), port); | 546 | __raw_writel(cpu_to_le32(value), port); |
| 541 | #else | 547 | #else |
| 542 | __ixp4xx_writel(value, port); | 548 | __ixp4xx_writel(value, addr); |
| 543 | #endif | 549 | #endif |
| 544 | } | 550 | } |
| 545 | 551 | ||
| @@ -553,7 +559,7 @@ __ixp4xx_iowrite32_rep(void __iomem *addr, const void *vaddr, u32 count) | |||
| 553 | #ifndef CONFIG_IXP4XX_INDIRECT_PCI | 559 | #ifndef CONFIG_IXP4XX_INDIRECT_PCI |
| 554 | __raw_writesl(addr, vaddr, count); | 560 | __raw_writesl(addr, vaddr, count); |
| 555 | #else | 561 | #else |
| 556 | __ixp4xx_writesl(port, vaddr, count); | 562 | __ixp4xx_writesl(addr, vaddr, count); |
| 557 | #endif | 563 | #endif |
| 558 | } | 564 | } |
| 559 | 565 | ||
diff --git a/include/asm-arm/arch-realview/debug-macro.S b/include/asm-arm/arch-realview/debug-macro.S new file mode 100644 index 000000000000..ed28bd012236 --- /dev/null +++ b/include/asm-arm/arch-realview/debug-macro.S | |||
| @@ -0,0 +1,38 @@ | |||
| 1 | /* linux/include/asm-arm/arch-realview/debug-macro.S | ||
| 2 | * | ||
| 3 | * Debugging macro include header | ||
| 4 | * | ||
| 5 | * Copyright (C) 1994-1999 Russell King | ||
| 6 | * Moved from linux/arch/arm/kernel/debug.S by Ben Dooks | ||
| 7 | * | ||
| 8 | * This program is free software; you can redistribute it and/or modify | ||
| 9 | * it under the terms of the GNU General Public License version 2 as | ||
| 10 | * published by the Free Software Foundation. | ||
| 11 | * | ||
| 12 | */ | ||
| 13 | |||
| 14 | #include <asm/hardware/amba_serial.h> | ||
| 15 | |||
| 16 | .macro addruart,rx | ||
| 17 | mrc p15, 0, \rx, c1, c0 | ||
| 18 | tst \rx, #1 @ MMU enabled? | ||
| 19 | moveq \rx, #0x10000000 | ||
| 20 | movne \rx, #0xf1000000 @ virtual base | ||
| 21 | orr \rx, \rx, #0x00009000 | ||
| 22 | .endm | ||
| 23 | |||
| 24 | .macro senduart,rd,rx | ||
| 25 | strb \rd, [\rx, #UART01x_DR] | ||
| 26 | .endm | ||
| 27 | |||
| 28 | .macro waituart,rd,rx | ||
| 29 | 1001: ldr \rd, [\rx, #0x18] @ UARTFLG | ||
| 30 | tst \rd, #1 << 5 @ UARTFLGUTXFF - 1 when full | ||
| 31 | bne 1001b | ||
| 32 | .endm | ||
| 33 | |||
| 34 | .macro busyuart,rd,rx | ||
| 35 | 1001: ldr \rd, [\rx, #0x18] @ UARTFLG | ||
| 36 | tst \rd, #1 << 3 @ UARTFLGUBUSY - 1 when busy | ||
| 37 | bne 1001b | ||
| 38 | .endm | ||
diff --git a/include/asm-arm/arch-realview/dma.h b/include/asm-arm/arch-realview/dma.h new file mode 100644 index 000000000000..744491a74bd9 --- /dev/null +++ b/include/asm-arm/arch-realview/dma.h | |||
| @@ -0,0 +1,27 @@ | |||
| 1 | /* | ||
| 2 | * linux/include/asm-arm/arch-realview/dma.h | ||
| 3 | * | ||
| 4 | * Copyright (C) 2003 ARM Limited. | ||
| 5 | * Copyright (C) 1997,1998 Russell King | ||
| 6 | * | ||
| 7 | * This program is free software; you can redistribute it and/or modify | ||
| 8 | * it under the terms of the GNU General Public License as published by | ||
| 9 | * the Free Software Foundation; either version 2 of the License, or | ||
| 10 | * (at your option) any later version. | ||
| 11 | * | ||
| 12 | * This program is distributed in the hope that it will be useful, | ||
| 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 15 | * GNU General Public License for more details. | ||
| 16 | * | ||
| 17 | * You should have received a copy of the GNU General Public License | ||
| 18 | * along with this program; if not, write to the Free Software | ||
| 19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
| 20 | */ | ||
| 21 | #ifndef __ASM_ARCH_DMA_H | ||
| 22 | #define __ASM_ARCH_DMA_H | ||
| 23 | |||
| 24 | #define MAX_DMA_ADDRESS 0xffffffff | ||
| 25 | #define MAX_DMA_CHANNELS 0 | ||
| 26 | |||
| 27 | #endif /* _ASM_ARCH_DMA_H */ | ||
diff --git a/include/asm-arm/arch-realview/entry-macro.S b/include/asm-arm/arch-realview/entry-macro.S new file mode 100644 index 000000000000..2712ba77bb3a --- /dev/null +++ b/include/asm-arm/arch-realview/entry-macro.S | |||
| @@ -0,0 +1,49 @@ | |||
| 1 | /* | ||
| 2 | * include/asm-arm/arch-realview/entry-macro.S | ||
| 3 | * | ||
| 4 | * Low-level IRQ helper macros for RealView platforms | ||
| 5 | * | ||
| 6 | * This file is licensed under the terms of the GNU General Public | ||
| 7 | * License version 2. This program is licensed "as is" without any | ||
| 8 | * warranty of any kind, whether express or implied. | ||
| 9 | */ | ||
| 10 | |||
| 11 | #include <asm/hardware/gic.h> | ||
| 12 | |||
| 13 | .macro disable_fiq | ||
| 14 | .endm | ||
| 15 | |||
| 16 | /* | ||
| 17 | * The interrupt numbering scheme is defined in the | ||
| 18 | * interrupt controller spec. To wit: | ||
| 19 | * | ||
| 20 | * Interrupts 0-15 are IPI | ||
| 21 | * 16-28 are reserved | ||
| 22 | * 29-31 are local. We allow 30 to be used for the watchdog. | ||
| 23 | * 32-1020 are global | ||
| 24 | * 1021-1022 are reserved | ||
| 25 | * 1023 is "spurious" (no interrupt) | ||
| 26 | * | ||
| 27 | * For now, we ignore all local interrupts so only return an interrupt if it's | ||
| 28 | * between 30 and 1020. The test_for_ipi routine below will pick up on IPIs. | ||
| 29 | * | ||
| 30 | * A simple read from the controller will tell us the number of the highest | ||
| 31 | * priority enabled interrupt. We then just need to check whether it is in the | ||
| 32 | * valid range for an IRQ (30-1020 inclusive). | ||
| 33 | */ | ||
| 34 | |||
| 35 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | ||
| 36 | |||
| 37 | ldr \base, =IO_ADDRESS(REALVIEW_GIC_CPU_BASE) | ||
| 38 | ldr \irqstat, [\base, #GIC_CPU_INTACK] /* bits 12-10 = src CPU, 9-0 = int # */ | ||
| 39 | |||
| 40 | ldr \tmp, =1021 | ||
| 41 | |||
| 42 | bic \irqnr, \irqstat, #0x1c00 | ||
| 43 | |||
| 44 | cmp \irqnr, #29 | ||
| 45 | cmpcc \irqnr, \irqnr | ||
| 46 | cmpne \irqnr, \tmp | ||
| 47 | cmpcs \irqnr, \irqnr | ||
| 48 | |||
| 49 | .endm | ||
diff --git a/include/asm-arm/arch-realview/hardware.h b/include/asm-arm/arch-realview/hardware.h new file mode 100644 index 000000000000..67879cdb6ef2 --- /dev/null +++ b/include/asm-arm/arch-realview/hardware.h | |||
| @@ -0,0 +1,31 @@ | |||
| 1 | /* | ||
| 2 | * linux/include/asm-arm/arch-realview/hardware.h | ||
| 3 | * | ||
| 4 | * This file contains the hardware definitions of the RealView boards. | ||
| 5 | * | ||
| 6 | * Copyright (C) 2003 ARM Limited. | ||
| 7 | * | ||
| 8 | * This program is free software; you can redistribute it and/or modify | ||
| 9 | * it under the terms of the GNU General Public License as published by | ||
| 10 | * the Free Software Foundation; either version 2 of the License, or | ||
| 11 | * (at your option) any later version. | ||
| 12 | * | ||
| 13 | * This program is distributed in the hope that it will be useful, | ||
| 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 16 | * GNU General Public License for more details. | ||
| 17 | * | ||
| 18 | * You should have received a copy of the GNU General Public License | ||
| 19 | * along with this program; if not, write to the Free Software | ||
| 20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
| 21 | */ | ||
| 22 | #ifndef __ASM_ARCH_HARDWARE_H | ||
| 23 | #define __ASM_ARCH_HARDWARE_H | ||
| 24 | |||
| 25 | #include <asm/sizes.h> | ||
| 26 | #include <asm/arch/platform.h> | ||
| 27 | |||
| 28 | /* macro to get at IO space when running virtually */ | ||
| 29 | #define IO_ADDRESS(x) (((x) & 0x0fffffff) + (((x) >> 4) & 0x0f000000) + 0xf0000000) | ||
| 30 | |||
| 31 | #endif | ||
diff --git a/include/asm-arm/arch-realview/io.h b/include/asm-arm/arch-realview/io.h new file mode 100644 index 000000000000..d444a68ac330 --- /dev/null +++ b/include/asm-arm/arch-realview/io.h | |||
| @@ -0,0 +1,34 @@ | |||
| 1 | /* | ||
| 2 | * linux/include/asm-arm/arch-realview/io.h | ||
| 3 | * | ||
| 4 | * Copyright (C) 2003 ARM Limited | ||
| 5 | * | ||
| 6 | * This program is free software; you can redistribute it and/or modify | ||
| 7 | * it under the terms of the GNU General Public License as published by | ||
| 8 | * the Free Software Foundation; either version 2 of the License, or | ||
| 9 | * (at your option) any later version. | ||
| 10 | * | ||
| 11 | * This program is distributed in the hope that it will be useful, | ||
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 14 | * GNU General Public License for more details. | ||
| 15 | * | ||
| 16 | * You should have received a copy of the GNU General Public License | ||
| 17 | * along with this program; if not, write to the Free Software | ||
| 18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
| 19 | */ | ||
| 20 | #ifndef __ASM_ARM_ARCH_IO_H | ||
| 21 | #define __ASM_ARM_ARCH_IO_H | ||
| 22 | |||
| 23 | #define IO_SPACE_LIMIT 0xffffffff | ||
| 24 | |||
| 25 | static inline void __iomem *__io(unsigned long addr) | ||
| 26 | { | ||
| 27 | return (void __iomem *)addr; | ||
| 28 | } | ||
| 29 | |||
| 30 | #define __io(a) __io(a) | ||
| 31 | #define __mem_pci(a) (a) | ||
| 32 | #define __mem_isa(a) (a) | ||
| 33 | |||
| 34 | #endif | ||
diff --git a/include/asm-arm/arch-realview/irqs.h b/include/asm-arm/arch-realview/irqs.h new file mode 100644 index 000000000000..ff376494e5b1 --- /dev/null +++ b/include/asm-arm/arch-realview/irqs.h | |||
| @@ -0,0 +1,103 @@ | |||
| 1 | /* | ||
| 2 | * linux/include/asm-arm/arch-realview/irqs.h | ||
| 3 | * | ||
| 4 | * Copyright (C) 2003 ARM Limited | ||
| 5 | * Copyright (C) 2000 Deep Blue Solutions Ltd. | ||
| 6 | * | ||
| 7 | * This program is free software; you can redistribute it and/or modify | ||
| 8 | * it under the terms of the GNU General Public License as published by | ||
| 9 | * the Free Software Foundation; either version 2 of the License, or | ||
| 10 | * (at your option) any later version. | ||
| 11 | * | ||
| 12 | * This program is distributed in the hope that it will be useful, | ||
| 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 15 | * GNU General Public License for more details. | ||
| 16 | * | ||
| 17 | * You should have received a copy of the GNU General Public License | ||
| 18 | * along with this program; if not, write to the Free Software | ||
| 19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
| 20 | */ | ||
| 21 | |||
| 22 | #include <asm/arch/platform.h> | ||
| 23 | |||
| 24 | /* | ||
| 25 | * IRQ interrupts definitions are the same the INT definitions | ||
| 26 | * held within platform.h | ||
| 27 | */ | ||
| 28 | #define IRQ_GIC_START 32 | ||
| 29 | #define IRQ_WDOGINT (IRQ_GIC_START + INT_WDOGINT) | ||
| 30 | #define IRQ_SOFTINT (IRQ_GIC_START + INT_SOFTINT) | ||
| 31 | #define IRQ_COMMRx (IRQ_GIC_START + INT_COMMRx) | ||
| 32 | #define IRQ_COMMTx (IRQ_GIC_START + INT_COMMTx) | ||
| 33 | #define IRQ_TIMERINT0_1 (IRQ_GIC_START + INT_TIMERINT0_1) | ||
| 34 | #define IRQ_TIMERINT2_3 (IRQ_GIC_START + INT_TIMERINT2_3) | ||
| 35 | #define IRQ_GPIOINT0 (IRQ_GIC_START + INT_GPIOINT0) | ||
| 36 | #define IRQ_GPIOINT1 (IRQ_GIC_START + INT_GPIOINT1) | ||
| 37 | #define IRQ_GPIOINT2 (IRQ_GIC_START + INT_GPIOINT2) | ||
| 38 | #define IRQ_GPIOINT3 (IRQ_GIC_START + INT_GPIOINT3) | ||
| 39 | #define IRQ_RTCINT (IRQ_GIC_START + INT_RTCINT) | ||
| 40 | #define IRQ_SSPINT (IRQ_GIC_START + INT_SSPINT) | ||
| 41 | #define IRQ_UARTINT0 (IRQ_GIC_START + INT_UARTINT0) | ||
| 42 | #define IRQ_UARTINT1 (IRQ_GIC_START + INT_UARTINT1) | ||
| 43 | #define IRQ_UARTINT2 (IRQ_GIC_START + INT_UARTINT2) | ||
| 44 | #define IRQ_UART3 (IRQ_GIC_START + INT_UARTINT3) | ||
| 45 | #define IRQ_SCIINT (IRQ_GIC_START + INT_SCIINT) | ||
| 46 | #define IRQ_CLCDINT (IRQ_GIC_START + INT_CLCDINT) | ||
| 47 | #define IRQ_DMAINT (IRQ_GIC_START + INT_DMAINT) | ||
| 48 | #define IRQ_PWRFAILINT (IRQ_GIC_START + INT_PWRFAILINT) | ||
| 49 | #define IRQ_MBXINT (IRQ_GIC_START + INT_MBXINT) | ||
| 50 | #define IRQ_GNDINT (IRQ_GIC_START + INT_GNDINT) | ||
| 51 | #define IRQ_MMCI0B (IRQ_GIC_START + INT_MMCI0B) | ||
| 52 | #define IRQ_MMCI1B (IRQ_GIC_START + INT_MMCI1B) | ||
| 53 | #define IRQ_KMI0 (IRQ_GIC_START + INT_KMI0) | ||
| 54 | #define IRQ_KMI1 (IRQ_GIC_START + INT_KMI1) | ||
| 55 | #define IRQ_SCI3 (IRQ_GIC_START + INT_SCI3) | ||
| 56 | #define IRQ_CLCD (IRQ_GIC_START + INT_CLCD) | ||
| 57 | #define IRQ_TOUCH (IRQ_GIC_START + INT_TOUCH) | ||
| 58 | #define IRQ_KEYPAD (IRQ_GIC_START + INT_KEYPAD) | ||
| 59 | #define IRQ_DoC (IRQ_GIC_START + INT_DoC) | ||
| 60 | #define IRQ_MMCI0A (IRQ_GIC_START + INT_MMCI0A) | ||
| 61 | #define IRQ_MMCI1A (IRQ_GIC_START + INT_MMCI1A) | ||
| 62 | #define IRQ_AACI (IRQ_GIC_START + INT_AACI) | ||
| 63 | #define IRQ_ETH (IRQ_GIC_START + INT_ETH) | ||
| 64 | #define IRQ_USB (IRQ_GIC_START + INT_USB) | ||
| 65 | |||
| 66 | #define IRQMASK_WDOGINT INTMASK_WDOGINT | ||
| 67 | #define IRQMASK_SOFTINT INTMASK_SOFTINT | ||
| 68 | #define IRQMASK_COMMRx INTMASK_COMMRx | ||
| 69 | #define IRQMASK_COMMTx INTMASK_COMMTx | ||
| 70 | #define IRQMASK_TIMERINT0_1 INTMASK_TIMERINT0_1 | ||
| 71 | #define IRQMASK_TIMERINT2_3 INTMASK_TIMERINT2_3 | ||
| 72 | #define IRQMASK_GPIOINT0 INTMASK_GPIOINT0 | ||
| 73 | #define IRQMASK_GPIOINT1 INTMASK_GPIOINT1 | ||
| 74 | #define IRQMASK_GPIOINT2 INTMASK_GPIOINT2 | ||
| 75 | #define IRQMASK_GPIOINT3 INTMASK_GPIOINT3 | ||
| 76 | #define IRQMASK_RTCINT INTMASK_RTCINT | ||
| 77 | #define IRQMASK_SSPINT INTMASK_SSPINT | ||
| 78 | #define IRQMASK_UARTINT0 INTMASK_UARTINT0 | ||
| 79 | #define IRQMASK_UARTINT1 INTMASK_UARTINT1 | ||
| 80 | #define IRQMASK_UARTINT2 INTMASK_UARTINT2 | ||
| 81 | #define IRQMASK_SCIINT INTMASK_SCIINT | ||
| 82 | #define IRQMASK_CLCDINT INTMASK_CLCDINT | ||
| 83 | #define IRQMASK_DMAINT INTMASK_DMAINT | ||
| 84 | #define IRQMASK_PWRFAILINT INTMASK_PWRFAILINT | ||
| 85 | #define IRQMASK_MBXINT INTMASK_MBXINT | ||
| 86 | #define IRQMASK_GNDINT INTMASK_GNDINT | ||
| 87 | #define IRQMASK_MMCI0B INTMASK_MMCI0B | ||
| 88 | #define IRQMASK_MMCI1B INTMASK_MMCI1B | ||
| 89 | #define IRQMASK_KMI0 INTMASK_KMI0 | ||
| 90 | #define IRQMASK_KMI1 INTMASK_KMI1 | ||
| 91 | #define IRQMASK_SCI3 INTMASK_SCI3 | ||
| 92 | #define IRQMASK_UART3 INTMASK_UART3 | ||
| 93 | #define IRQMASK_CLCD INTMASK_CLCD | ||
| 94 | #define IRQMASK_TOUCH INTMASK_TOUCH | ||
| 95 | #define IRQMASK_KEYPAD INTMASK_KEYPAD | ||
| 96 | #define IRQMASK_DoC INTMASK_DoC | ||
| 97 | #define IRQMASK_MMCI0A INTMASK_MMCI0A | ||
| 98 | #define IRQMASK_MMCI1A INTMASK_MMCI1A | ||
| 99 | #define IRQMASK_AACI INTMASK_AACI | ||
| 100 | #define IRQMASK_ETH INTMASK_ETH | ||
| 101 | #define IRQMASK_USB INTMASK_USB | ||
| 102 | |||
| 103 | #define NR_IRQS (IRQ_GIC_START + 64) | ||
diff --git a/include/asm-arm/arch-realview/memory.h b/include/asm-arm/arch-realview/memory.h new file mode 100644 index 000000000000..ed370abb638f --- /dev/null +++ b/include/asm-arm/arch-realview/memory.h | |||
| @@ -0,0 +1,38 @@ | |||
| 1 | /* | ||
| 2 | * linux/include/asm-arm/arch-realview/memory.h | ||
| 3 | * | ||
| 4 | * Copyright (C) 2003 ARM Limited | ||
| 5 | * | ||
| 6 | * This program is free software; you can redistribute it and/or modify | ||
| 7 | * it under the terms of the GNU General Public License as published by | ||
| 8 | * the Free Software Foundation; either version 2 of the License, or | ||
| 9 | * (at your option) any later version. | ||
| 10 | * | ||
| 11 | * This program is distributed in the hope that it will be useful, | ||
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 14 | * GNU General Public License for more details. | ||
| 15 | * | ||
| 16 | * You should have received a copy of the GNU General Public License | ||
| 17 | * along with this program; if not, write to the Free Software | ||
| 18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
| 19 | */ | ||
| 20 | #ifndef __ASM_ARCH_MEMORY_H | ||
| 21 | #define __ASM_ARCH_MEMORY_H | ||
| 22 | |||
| 23 | /* | ||
| 24 | * Physical DRAM offset. | ||
| 25 | */ | ||
| 26 | #define PHYS_OFFSET UL(0x00000000) | ||
| 27 | |||
| 28 | /* | ||
| 29 | * Virtual view <-> DMA view memory address translations | ||
| 30 | * virt_to_bus: Used to translate the virtual address to an | ||
| 31 | * address suitable to be passed to set_dma_addr | ||
| 32 | * bus_to_virt: Used to convert an address for DMA operations | ||
| 33 | * to an address that the kernel can use. | ||
| 34 | */ | ||
| 35 | #define __virt_to_bus(x) ((x) - PAGE_OFFSET) | ||
| 36 | #define __bus_to_virt(x) ((x) + PAGE_OFFSET) | ||
| 37 | |||
| 38 | #endif | ||
diff --git a/include/asm-arm/arch-realview/param.h b/include/asm-arm/arch-realview/param.h new file mode 100644 index 000000000000..89b1235d32bd --- /dev/null +++ b/include/asm-arm/arch-realview/param.h | |||
| @@ -0,0 +1,19 @@ | |||
| 1 | /* | ||
| 2 | * linux/include/asm-arm/arch-realview/param.h | ||
| 3 | * | ||
| 4 | * Copyright (C) 2002 ARM Limited | ||
| 5 | * | ||
| 6 | * This program is free software; you can redistribute it and/or modify | ||
| 7 | * it under the terms of the GNU General Public License as published by | ||
| 8 | * the Free Software Foundation; either version 2 of the License, or | ||
| 9 | * (at your option) any later version. | ||
| 10 | * | ||
| 11 | * This program is distributed in the hope that it will be useful, | ||
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 14 | * GNU General Public License for more details. | ||
| 15 | * | ||
| 16 | * You should have received a copy of the GNU General Public License | ||
| 17 | * along with this program; if not, write to the Free Software | ||
| 18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
| 19 | */ | ||
diff --git a/include/asm-arm/arch-realview/platform.h b/include/asm-arm/arch-realview/platform.h new file mode 100644 index 000000000000..4b6de13a6b9a --- /dev/null +++ b/include/asm-arm/arch-realview/platform.h | |||
| @@ -0,0 +1,395 @@ | |||
| 1 | /* | ||
| 2 | * linux/include/asm-arm/arch-realview/platform.h | ||
| 3 | * | ||
| 4 | * Copyright (c) ARM Limited 2003. All rights reserved. | ||
| 5 | * | ||
| 6 | * This program is free software; you can redistribute it and/or modify | ||
| 7 | * it under the terms of the GNU General Public License as published by | ||
| 8 | * the Free Software Foundation; either version 2 of the License, or | ||
| 9 | * (at your option) any later version. | ||
| 10 | * | ||
| 11 | * This program is distributed in the hope that it will be useful, | ||
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 14 | * GNU General Public License for more details. | ||
| 15 | * | ||
| 16 | * You should have received a copy of the GNU General Public License | ||
| 17 | * along with this program; if not, write to the Free Software | ||
| 18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
| 19 | */ | ||
| 20 | |||
| 21 | #ifndef __address_h | ||
| 22 | #define __address_h 1 | ||
| 23 | |||
| 24 | /* | ||
| 25 | * Memory definitions | ||
| 26 | */ | ||
| 27 | #define REALVIEW_BOOT_ROM_LO 0x30000000 /* DoC Base (64Mb)...*/ | ||
| 28 | #define REALVIEW_BOOT_ROM_HI 0x30000000 | ||
| 29 | #define REALVIEW_BOOT_ROM_BASE REALVIEW_BOOT_ROM_HI /* Normal position */ | ||
| 30 | #define REALVIEW_BOOT_ROM_SIZE SZ_64M | ||
| 31 | |||
| 32 | #define REALVIEW_SSRAM_BASE /* REALVIEW_SSMC_BASE ? */ | ||
| 33 | #define REALVIEW_SSRAM_SIZE SZ_2M | ||
| 34 | |||
| 35 | #define REALVIEW_FLASH_BASE 0x40000000 | ||
| 36 | #define REALVIEW_FLASH_SIZE SZ_64M | ||
| 37 | |||
| 38 | /* | ||
| 39 | * SDRAM | ||
| 40 | */ | ||
| 41 | #define REALVIEW_SDRAM_BASE 0x00000000 | ||
| 42 | |||
| 43 | /* | ||
| 44 | * Logic expansion modules | ||
| 45 | * | ||
| 46 | */ | ||
| 47 | |||
| 48 | |||
| 49 | /* ------------------------------------------------------------------------ | ||
| 50 | * RealView Registers | ||
| 51 | * ------------------------------------------------------------------------ | ||
| 52 | * | ||
| 53 | */ | ||
| 54 | #define REALVIEW_SYS_ID_OFFSET 0x00 | ||
| 55 | #define REALVIEW_SYS_SW_OFFSET 0x04 | ||
| 56 | #define REALVIEW_SYS_LED_OFFSET 0x08 | ||
| 57 | #define REALVIEW_SYS_OSC0_OFFSET 0x0C | ||
| 58 | |||
| 59 | #define REALVIEW_SYS_OSC1_OFFSET 0x10 | ||
| 60 | #define REALVIEW_SYS_OSC2_OFFSET 0x14 | ||
| 61 | #define REALVIEW_SYS_OSC3_OFFSET 0x18 | ||
| 62 | #define REALVIEW_SYS_OSC4_OFFSET 0x1C /* OSC1 for RealView/AB */ | ||
| 63 | |||
| 64 | #define REALVIEW_SYS_LOCK_OFFSET 0x20 | ||
| 65 | #define REALVIEW_SYS_100HZ_OFFSET 0x24 | ||
| 66 | #define REALVIEW_SYS_CFGDATA1_OFFSET 0x28 | ||
| 67 | #define REALVIEW_SYS_CFGDATA2_OFFSET 0x2C | ||
| 68 | #define REALVIEW_SYS_FLAGS_OFFSET 0x30 | ||
| 69 | #define REALVIEW_SYS_FLAGSSET_OFFSET 0x30 | ||
| 70 | #define REALVIEW_SYS_FLAGSCLR_OFFSET 0x34 | ||
| 71 | #define REALVIEW_SYS_NVFLAGS_OFFSET 0x38 | ||
| 72 | #define REALVIEW_SYS_NVFLAGSSET_OFFSET 0x38 | ||
| 73 | #define REALVIEW_SYS_NVFLAGSCLR_OFFSET 0x3C | ||
| 74 | #define REALVIEW_SYS_RESETCTL_OFFSET 0x40 | ||
| 75 | #define REALVIEW_SYS_PCICTL_OFFSET 0x44 | ||
| 76 | #define REALVIEW_SYS_MCI_OFFSET 0x48 | ||
| 77 | #define REALVIEW_SYS_FLASH_OFFSET 0x4C | ||
| 78 | #define REALVIEW_SYS_CLCD_OFFSET 0x50 | ||
| 79 | #define REALVIEW_SYS_CLCDSER_OFFSET 0x54 | ||
| 80 | #define REALVIEW_SYS_BOOTCS_OFFSET 0x58 | ||
| 81 | #define REALVIEW_SYS_24MHz_OFFSET 0x5C | ||
| 82 | #define REALVIEW_SYS_MISC_OFFSET 0x60 | ||
| 83 | #define REALVIEW_SYS_IOSEL_OFFSET 0x70 | ||
| 84 | #define REALVIEW_SYS_TEST_OSC0_OFFSET 0x80 | ||
| 85 | #define REALVIEW_SYS_TEST_OSC1_OFFSET 0x84 | ||
| 86 | #define REALVIEW_SYS_TEST_OSC2_OFFSET 0x88 | ||
| 87 | #define REALVIEW_SYS_TEST_OSC3_OFFSET 0x8C | ||
| 88 | #define REALVIEW_SYS_TEST_OSC4_OFFSET 0x90 | ||
| 89 | |||
| 90 | #define REALVIEW_SYS_BASE 0x10000000 | ||
| 91 | #define REALVIEW_SYS_ID (REALVIEW_SYS_BASE + REALVIEW_SYS_ID_OFFSET) | ||
| 92 | #define REALVIEW_SYS_SW (REALVIEW_SYS_BASE + REALVIEW_SYS_SW_OFFSET) | ||
| 93 | #define REALVIEW_SYS_LED (REALVIEW_SYS_BASE + REALVIEW_SYS_LED_OFFSET) | ||
| 94 | #define REALVIEW_SYS_OSC0 (REALVIEW_SYS_BASE + REALVIEW_SYS_OSC0_OFFSET) | ||
| 95 | #define REALVIEW_SYS_OSC1 (REALVIEW_SYS_BASE + REALVIEW_SYS_OSC1_OFFSET) | ||
| 96 | |||
| 97 | #define REALVIEW_SYS_LOCK (REALVIEW_SYS_BASE + REALVIEW_SYS_LOCK_OFFSET) | ||
| 98 | #define REALVIEW_SYS_100HZ (REALVIEW_SYS_BASE + REALVIEW_SYS_100HZ_OFFSET) | ||
| 99 | #define REALVIEW_SYS_CFGDATA1 (REALVIEW_SYS_BASE + REALVIEW_SYS_CFGDATA1_OFFSET) | ||
| 100 | #define REALVIEW_SYS_CFGDATA2 (REALVIEW_SYS_BASE + REALVIEW_SYS_CFGDATA2_OFFSET) | ||
| 101 | #define REALVIEW_SYS_FLAGS (REALVIEW_SYS_BASE + REALVIEW_SYS_FLAGS_OFFSET) | ||
| 102 | #define REALVIEW_SYS_FLAGSSET (REALVIEW_SYS_BASE + REALVIEW_SYS_FLAGSSET_OFFSET) | ||
| 103 | #define REALVIEW_SYS_FLAGSCLR (REALVIEW_SYS_BASE + REALVIEW_SYS_FLAGSCLR_OFFSET) | ||
| 104 | #define REALVIEW_SYS_NVFLAGS (REALVIEW_SYS_BASE + REALVIEW_SYS_NVFLAGS_OFFSET) | ||
| 105 | #define REALVIEW_SYS_NVFLAGSSET (REALVIEW_SYS_BASE + REALVIEW_SYS_NVFLAGSSET_OFFSET) | ||
| 106 | #define REALVIEW_SYS_NVFLAGSCLR (REALVIEW_SYS_BASE + REALVIEW_SYS_NVFLAGSCLR_OFFSET) | ||
| 107 | #define REALVIEW_SYS_RESETCTL (REALVIEW_SYS_BASE + REALVIEW_SYS_RESETCTL_OFFSET) | ||
| 108 | #define REALVIEW_SYS_PCICTL (REALVIEW_SYS_BASE + REALVIEW_SYS_PCICTL_OFFSET) | ||
| 109 | #define REALVIEW_SYS_MCI (REALVIEW_SYS_BASE + REALVIEW_SYS_MCI_OFFSET) | ||
| 110 | #define REALVIEW_SYS_FLASH (REALVIEW_SYS_BASE + REALVIEW_SYS_FLASH_OFFSET) | ||
| 111 | #define REALVIEW_SYS_CLCD (REALVIEW_SYS_BASE + REALVIEW_SYS_CLCD_OFFSET) | ||
| 112 | #define REALVIEW_SYS_CLCDSER (REALVIEW_SYS_BASE + REALVIEW_SYS_CLCDSER_OFFSET) | ||
| 113 | #define REALVIEW_SYS_BOOTCS (REALVIEW_SYS_BASE + REALVIEW_SYS_BOOTCS_OFFSET) | ||
| 114 | #define REALVIEW_SYS_24MHz (REALVIEW_SYS_BASE + REALVIEW_SYS_24MHz_OFFSET) | ||
| 115 | #define REALVIEW_SYS_MISC (REALVIEW_SYS_BASE + REALVIEW_SYS_MISC_OFFSET) | ||
| 116 | #define REALVIEW_SYS_IOSEL (REALVIEW_SYS_BASE + REALVIEW_SYS_IOSEL_OFFSET) | ||
| 117 | #define REALVIEW_SYS_TEST_OSC0 (REALVIEW_SYS_BASE + REALVIEW_SYS_TEST_OSC0_OFFSET) | ||
| 118 | #define REALVIEW_SYS_TEST_OSC1 (REALVIEW_SYS_BASE + REALVIEW_SYS_TEST_OSC1_OFFSET) | ||
| 119 | #define REALVIEW_SYS_TEST_OSC2 (REALVIEW_SYS_BASE + REALVIEW_SYS_TEST_OSC2_OFFSET) | ||
| 120 | #define REALVIEW_SYS_TEST_OSC3 (REALVIEW_SYS_BASE + REALVIEW_SYS_TEST_OSC3_OFFSET) | ||
| 121 | #define REALVIEW_SYS_TEST_OSC4 (REALVIEW_SYS_BASE + REALVIEW_SYS_TEST_OSC4_OFFSET) | ||
| 122 | |||
| 123 | /* | ||
| 124 | * Values for REALVIEW_SYS_RESET_CTRL | ||
| 125 | */ | ||
| 126 | #define REALVIEW_SYS_CTRL_RESET_CONFIGCLR 0x01 | ||
| 127 | #define REALVIEW_SYS_CTRL_RESET_CONFIGINIT 0x02 | ||
| 128 | #define REALVIEW_SYS_CTRL_RESET_DLLRESET 0x03 | ||
| 129 | #define REALVIEW_SYS_CTRL_RESET_PLLRESET 0x04 | ||
| 130 | #define REALVIEW_SYS_CTRL_RESET_POR 0x05 | ||
| 131 | #define REALVIEW_SYS_CTRL_RESET_DoC 0x06 | ||
| 132 | |||
| 133 | #define REALVIEW_SYS_CTRL_LED (1 << 0) | ||
| 134 | |||
| 135 | |||
| 136 | /* ------------------------------------------------------------------------ | ||
| 137 | * RealView control registers | ||
| 138 | * ------------------------------------------------------------------------ | ||
| 139 | */ | ||
| 140 | |||
| 141 | /* | ||
| 142 | * REALVIEW_IDFIELD | ||
| 143 | * | ||
| 144 | * 31:24 = manufacturer (0x41 = ARM) | ||
| 145 | * 23:16 = architecture (0x08 = AHB system bus, ASB processor bus) | ||
| 146 | * 15:12 = FPGA (0x3 = XVC600 or XVC600E) | ||
| 147 | * 11:4 = build value | ||
| 148 | * 3:0 = revision number (0x1 = rev B (AHB)) | ||
| 149 | */ | ||
| 150 | |||
| 151 | /* | ||
| 152 | * REALVIEW_SYS_LOCK | ||
| 153 | * control access to SYS_OSCx, SYS_CFGDATAx, SYS_RESETCTL, | ||
| 154 | * SYS_CLD, SYS_BOOTCS | ||
| 155 | */ | ||
| 156 | #define REALVIEW_SYS_LOCK_LOCKED (1 << 16) | ||
| 157 | #define REALVIEW_SYS_LOCKVAL_MASK 0xFFFF /* write 0xA05F to enable write access */ | ||
| 158 | |||
| 159 | /* | ||
| 160 | * REALVIEW_SYS_FLASH | ||
| 161 | */ | ||
| 162 | #define REALVIEW_FLASHPROG_FLVPPEN (1 << 0) /* Enable writing to flash */ | ||
| 163 | |||
| 164 | /* | ||
| 165 | * REALVIEW_INTREG | ||
| 166 | * - used to acknowledge and control MMCI and UART interrupts | ||
| 167 | */ | ||
| 168 | #define REALVIEW_INTREG_WPROT 0x00 /* MMC protection status (no interrupt generated) */ | ||
| 169 | #define REALVIEW_INTREG_RI0 0x01 /* Ring indicator UART0 is asserted, */ | ||
| 170 | #define REALVIEW_INTREG_CARDIN 0x08 /* MMCI card in detect */ | ||
| 171 | /* write 1 to acknowledge and clear */ | ||
| 172 | #define REALVIEW_INTREG_RI1 0x02 /* Ring indicator UART1 is asserted, */ | ||
| 173 | #define REALVIEW_INTREG_CARDINSERT 0x03 /* Signal insertion of MMC card */ | ||
| 174 | |||
| 175 | /* | ||
| 176 | * REALVIEW peripheral addresses | ||
| 177 | */ | ||
| 178 | #define REALVIEW_SCTL_BASE 0x10001000 /* System controller */ | ||
| 179 | #define REALVIEW_I2C_BASE 0x10002000 /* I2C control */ | ||
| 180 | /* Reserved 0x10003000 */ | ||
| 181 | #define REALVIEW_AACI_BASE 0x10004000 /* Audio */ | ||
| 182 | #define REALVIEW_MMCI0_BASE 0x10005000 /* MMC interface */ | ||
| 183 | #define REALVIEW_KMI0_BASE 0x10006000 /* KMI interface */ | ||
| 184 | #define REALVIEW_KMI1_BASE 0x10007000 /* KMI 2nd interface */ | ||
| 185 | #define REALVIEW_CHAR_LCD_BASE 0x10008000 /* Character LCD */ | ||
| 186 | #define REALVIEW_UART0_BASE 0x10009000 /* UART 0 */ | ||
| 187 | #define REALVIEW_UART1_BASE 0x1000A000 /* UART 1 */ | ||
| 188 | #define REALVIEW_UART2_BASE 0x1000B000 /* UART 2 */ | ||
| 189 | #define REALVIEW_UART3_BASE 0x1000C000 /* UART 3 */ | ||
| 190 | #define REALVIEW_SSP_BASE 0x1000D000 /* Synchronous Serial Port */ | ||
| 191 | #define REALVIEW_SCI_BASE 0x1000E000 /* Smart card controller */ | ||
| 192 | /* Reserved 0x1000F000 */ | ||
| 193 | #define REALVIEW_WATCHDOG_BASE 0x10010000 /* watchdog interface */ | ||
| 194 | #define REALVIEW_TIMER0_1_BASE 0x10011000 /* Timer 0 and 1 */ | ||
| 195 | #define REALVIEW_TIMER2_3_BASE 0x10012000 /* Timer 2 and 3 */ | ||
| 196 | #define REALVIEW_GPIO0_BASE 0x10013000 /* GPIO port 0 */ | ||
| 197 | #define REALVIEW_GPIO1_BASE 0x10014000 /* GPIO port 1 */ | ||
| 198 | #define REALVIEW_GPIO2_BASE 0x10015000 /* GPIO port 2 */ | ||
| 199 | /* Reserved 0x10016000 */ | ||
| 200 | #define REALVIEW_RTC_BASE 0x10017000 /* Real Time Clock */ | ||
| 201 | #define REALVIEW_DMC_BASE 0x10018000 /* DMC configuration */ | ||
| 202 | #define REALVIEW_PCI_CORE_BASE 0x10019000 /* PCI configuration */ | ||
| 203 | /* Reserved 0x1001A000 - 0x1001FFFF */ | ||
| 204 | #define REALVIEW_CLCD_BASE 0x10020000 /* CLCD */ | ||
| 205 | #define REALVIEW_DMAC_BASE 0x10030000 /* DMA controller */ | ||
| 206 | #define REALVIEW_GIC_CPU_BASE 0x10040000 /* Generic interrupt controller CPU interface */ | ||
| 207 | #define REALVIEW_GIC_DIST_BASE 0x10041000 /* Generic interrupt controller distributor */ | ||
| 208 | #define REALVIEW_SMC_BASE 0x10080000 /* SMC */ | ||
| 209 | /* Reserved 0x10090000 - 0x100EFFFF */ | ||
| 210 | |||
| 211 | #define REALVIEW_ETH_BASE 0x4E000000 /* Ethernet */ | ||
| 212 | |||
| 213 | /* PCI space */ | ||
| 214 | #define REALVIEW_PCI_BASE 0x41000000 /* PCI Interface */ | ||
| 215 | #define REALVIEW_PCI_CFG_BASE 0x42000000 | ||
| 216 | #define REALVIEW_PCI_MEM_BASE0 0x44000000 | ||
| 217 | #define REALVIEW_PCI_MEM_BASE1 0x50000000 | ||
| 218 | #define REALVIEW_PCI_MEM_BASE2 0x60000000 | ||
| 219 | /* Sizes of above maps */ | ||
| 220 | #define REALVIEW_PCI_BASE_SIZE 0x01000000 | ||
| 221 | #define REALVIEW_PCI_CFG_BASE_SIZE 0x02000000 | ||
| 222 | #define REALVIEW_PCI_MEM_BASE0_SIZE 0x0c000000 /* 32Mb */ | ||
| 223 | #define REALVIEW_PCI_MEM_BASE1_SIZE 0x10000000 /* 256Mb */ | ||
| 224 | #define REALVIEW_PCI_MEM_BASE2_SIZE 0x10000000 /* 256Mb */ | ||
| 225 | |||
| 226 | #define REALVIEW_SDRAM67_BASE 0x70000000 /* SDRAM banks 6 and 7 */ | ||
| 227 | #define REALVIEW_LT_BASE 0x80000000 /* Logic Tile expansion */ | ||
| 228 | |||
| 229 | /* | ||
| 230 | * Disk on Chip | ||
| 231 | */ | ||
| 232 | #define REALVIEW_DOC_BASE 0x2C000000 | ||
| 233 | #define REALVIEW_DOC_SIZE (16 << 20) | ||
| 234 | #define REALVIEW_DOC_PAGE_SIZE 512 | ||
| 235 | #define REALVIEW_DOC_TOTAL_PAGES (DOC_SIZE / PAGE_SIZE) | ||
| 236 | |||
| 237 | #define ERASE_UNIT_PAGES 32 | ||
| 238 | #define START_PAGE 0x80 | ||
| 239 | |||
| 240 | /* | ||
| 241 | * LED settings, bits [7:0] | ||
| 242 | */ | ||
| 243 | #define REALVIEW_SYS_LED0 (1 << 0) | ||
| 244 | #define REALVIEW_SYS_LED1 (1 << 1) | ||
| 245 | #define REALVIEW_SYS_LED2 (1 << 2) | ||
| 246 | #define REALVIEW_SYS_LED3 (1 << 3) | ||
| 247 | #define REALVIEW_SYS_LED4 (1 << 4) | ||
| 248 | #define REALVIEW_SYS_LED5 (1 << 5) | ||
| 249 | #define REALVIEW_SYS_LED6 (1 << 6) | ||
| 250 | #define REALVIEW_SYS_LED7 (1 << 7) | ||
| 251 | |||
| 252 | #define ALL_LEDS 0xFF | ||
| 253 | |||
| 254 | #define LED_BANK REALVIEW_SYS_LED | ||
| 255 | |||
| 256 | /* | ||
| 257 | * Control registers | ||
| 258 | */ | ||
| 259 | #define REALVIEW_IDFIELD_OFFSET 0x0 /* RealView build information */ | ||
| 260 | #define REALVIEW_FLASHPROG_OFFSET 0x4 /* Flash devices */ | ||
| 261 | #define REALVIEW_INTREG_OFFSET 0x8 /* Interrupt control */ | ||
| 262 | #define REALVIEW_DECODE_OFFSET 0xC /* Fitted logic modules */ | ||
| 263 | |||
| 264 | /* ------------------------------------------------------------------------ | ||
| 265 | * Interrupts - bit assignment (primary) | ||
| 266 | * ------------------------------------------------------------------------ | ||
| 267 | */ | ||
| 268 | #define INT_WDOGINT 0 /* Watchdog timer */ | ||
| 269 | #define INT_SOFTINT 1 /* Software interrupt */ | ||
| 270 | #define INT_COMMRx 2 /* Debug Comm Rx interrupt */ | ||
| 271 | #define INT_COMMTx 3 /* Debug Comm Tx interrupt */ | ||
| 272 | #define INT_TIMERINT0_1 4 /* Timer 0 and 1 */ | ||
| 273 | #define INT_TIMERINT2_3 5 /* Timer 2 and 3 */ | ||
| 274 | #define INT_GPIOINT0 6 /* GPIO 0 */ | ||
| 275 | #define INT_GPIOINT1 7 /* GPIO 1 */ | ||
| 276 | #define INT_GPIOINT2 8 /* GPIO 2 */ | ||
| 277 | /* 9 reserved */ | ||
| 278 | #define INT_RTCINT 10 /* Real Time Clock */ | ||
| 279 | #define INT_SSPINT 11 /* Synchronous Serial Port */ | ||
| 280 | #define INT_UARTINT0 12 /* UART 0 on development chip */ | ||
| 281 | #define INT_UARTINT1 13 /* UART 1 on development chip */ | ||
| 282 | #define INT_UARTINT2 14 /* UART 2 on development chip */ | ||
| 283 | #define INT_UARTINT3 15 /* UART 3 on development chip */ | ||
| 284 | #define INT_SCIINT 16 /* Smart Card Interface */ | ||
| 285 | #define INT_MMCI0A 17 /* Multimedia Card 0A */ | ||
| 286 | #define INT_MMCI0B 18 /* Multimedia Card 0B */ | ||
| 287 | #define INT_AACI 19 /* Audio Codec */ | ||
| 288 | #define INT_KMI0 20 /* Keyboard/Mouse port 0 */ | ||
| 289 | #define INT_KMI1 21 /* Keyboard/Mouse port 1 */ | ||
| 290 | #define INT_CHARLCD 22 /* Character LCD */ | ||
| 291 | #define INT_CLCDINT 23 /* CLCD controller */ | ||
| 292 | #define INT_DMAINT 24 /* DMA controller */ | ||
| 293 | #define INT_PWRFAILINT 25 /* Power failure */ | ||
| 294 | #define INT_PISMO 26 | ||
| 295 | #define INT_DoC 27 /* Disk on Chip memory controller */ | ||
| 296 | #define INT_ETH 28 /* Ethernet controller */ | ||
| 297 | #define INT_USB 29 /* USB controller */ | ||
| 298 | #define INT_TSPENINT 30 /* Touchscreen pen */ | ||
| 299 | #define INT_TSKPADINT 31 /* Touchscreen keypad */ | ||
| 300 | |||
| 301 | /* | ||
| 302 | * Interrupt bit positions | ||
| 303 | * | ||
| 304 | */ | ||
| 305 | #define INTMASK_WDOGINT (1 << INT_WDOGINT) | ||
| 306 | #define INTMASK_SOFTINT (1 << INT_SOFTINT) | ||
| 307 | #define INTMASK_COMMRx (1 << INT_COMMRx) | ||
| 308 | #define INTMASK_COMMTx (1 << INT_COMMTx) | ||
| 309 | #define INTMASK_TIMERINT0_1 (1 << INT_TIMERINT0_1) | ||
| 310 | #define INTMASK_TIMERINT2_3 (1 << INT_TIMERINT2_3) | ||
| 311 | #define INTMASK_GPIOINT0 (1 << INT_GPIOINT0) | ||
| 312 | #define INTMASK_GPIOINT1 (1 << INT_GPIOINT1) | ||
| 313 | #define INTMASK_GPIOINT2 (1 << INT_GPIOINT2) | ||
| 314 | #define INTMASK_RTCINT (1 << INT_RTCINT) | ||
| 315 | #define INTMASK_SSPINT (1 << INT_SSPINT) | ||
| 316 | #define INTMASK_UARTINT0 (1 << INT_UARTINT0) | ||
| 317 | #define INTMASK_UARTINT1 (1 << INT_UARTINT1) | ||
| 318 | #define INTMASK_UARTINT2 (1 << INT_UARTINT2) | ||
| 319 | #define INTMASK_UARTINT3 (1 << INT_UARTINT3) | ||
| 320 | #define INTMASK_SCIINT (1 << INT_SCIINT) | ||
| 321 | #define INTMASK_MMCI0A (1 << INT_MMCI0A) | ||
| 322 | #define INTMASK_MMCI0B (1 << INT_MMCI0B) | ||
| 323 | #define INTMASK_AACI (1 << INT_AACI) | ||
| 324 | #define INTMASK_KMI0 (1 << INT_KMI0) | ||
| 325 | #define INTMASK_KMI1 (1 << INT_KMI1) | ||
| 326 | #define INTMASK_CHARLCD (1 << INT_CHARLCD) | ||
| 327 | #define INTMASK_CLCDINT (1 << INT_CLCDINT) | ||
| 328 | #define INTMASK_DMAINT (1 << INT_DMAINT) | ||
| 329 | #define INTMASK_PWRFAILINT (1 << INT_PWRFAILINT) | ||
| 330 | #define INTMASK_PISMO (1 << INT_PISMO) | ||
| 331 | #define INTMASK_DoC (1 << INT_DoC) | ||
| 332 | #define INTMASK_ETH (1 << INT_ETH) | ||
| 333 | #define INTMASK_USB (1 << INT_USB) | ||
| 334 | #define INTMASK_TSPENINT (1 << INT_TSPENINT) | ||
| 335 | #define INTMASK_TSKPADINT (1 << INT_TSKPADINT) | ||
| 336 | |||
| 337 | #define MAXIRQNUM 31 | ||
| 338 | #define MAXFIQNUM 31 | ||
| 339 | #define MAXSWINUM 31 | ||
| 340 | |||
| 341 | /* | ||
| 342 | * Application Flash | ||
| 343 | * | ||
| 344 | */ | ||
| 345 | #define FLASH_BASE REALVIEW_FLASH_BASE | ||
| 346 | #define FLASH_SIZE REALVIEW_FLASH_SIZE | ||
| 347 | #define FLASH_END (FLASH_BASE + FLASH_SIZE - 1) | ||
| 348 | #define FLASH_BLOCK_SIZE SZ_128K | ||
| 349 | |||
| 350 | /* | ||
| 351 | * Boot Flash | ||
| 352 | * | ||
| 353 | */ | ||
| 354 | #define EPROM_BASE REALVIEW_BOOT_ROM_HI | ||
| 355 | #define EPROM_SIZE REALVIEW_BOOT_ROM_SIZE | ||
| 356 | #define EPROM_END (EPROM_BASE + EPROM_SIZE - 1) | ||
| 357 | |||
| 358 | /* | ||
| 359 | * Clean base - dummy | ||
| 360 | * | ||
| 361 | */ | ||
| 362 | #define CLEAN_BASE EPROM_BASE | ||
| 363 | |||
| 364 | /* | ||
| 365 | * System controller bit assignment | ||
| 366 | */ | ||
| 367 | #define REALVIEW_REFCLK 0 | ||
| 368 | #define REALVIEW_TIMCLK 1 | ||
| 369 | |||
| 370 | #define REALVIEW_TIMER1_EnSel 15 | ||
| 371 | #define REALVIEW_TIMER2_EnSel 17 | ||
| 372 | #define REALVIEW_TIMER3_EnSel 19 | ||
| 373 | #define REALVIEW_TIMER4_EnSel 21 | ||
| 374 | |||
| 375 | |||
| 376 | #define MAX_TIMER 2 | ||
| 377 | #define MAX_PERIOD 699050 | ||
| 378 | #define TICKS_PER_uSEC 1 | ||
| 379 | |||
| 380 | /* | ||
| 381 | * These are useconds NOT ticks. | ||
| 382 | * | ||
| 383 | */ | ||
| 384 | #define mSEC_1 1000 | ||
| 385 | #define mSEC_5 (mSEC_1 * 5) | ||
| 386 | #define mSEC_10 (mSEC_1 * 10) | ||
| 387 | #define mSEC_25 (mSEC_1 * 25) | ||
| 388 | #define SEC_1 (mSEC_1 * 1000) | ||
| 389 | |||
| 390 | #define REALVIEW_CSR_BASE 0x10000000 | ||
| 391 | #define REALVIEW_CSR_SIZE 0x10000000 | ||
| 392 | |||
| 393 | #endif | ||
| 394 | |||
| 395 | /* END */ | ||
diff --git a/include/asm-arm/arch-realview/system.h b/include/asm-arm/arch-realview/system.h new file mode 100644 index 000000000000..9f8fcbca0869 --- /dev/null +++ b/include/asm-arm/arch-realview/system.h | |||
| @@ -0,0 +1,51 @@ | |||
| 1 | /* | ||
| 2 | * linux/include/asm-arm/arch-realview/system.h | ||
| 3 | * | ||
| 4 | * Copyright (C) 2003 ARM Limited | ||
| 5 | * Copyright (C) 2000 Deep Blue Solutions Ltd | ||
| 6 | * | ||
| 7 | * This program is free software; you can redistribute it and/or modify | ||
| 8 | * it under the terms of the GNU General Public License as published by | ||
| 9 | * the Free Software Foundation; either version 2 of the License, or | ||
| 10 | * (at your option) any later version. | ||
| 11 | * | ||
| 12 | * This program is distributed in the hope that it will be useful, | ||
| 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 15 | * GNU General Public License for more details. | ||
| 16 | * | ||
| 17 | * You should have received a copy of the GNU General Public License | ||
| 18 | * along with this program; if not, write to the Free Software | ||
| 19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
| 20 | */ | ||
| 21 | #ifndef __ASM_ARCH_SYSTEM_H | ||
| 22 | #define __ASM_ARCH_SYSTEM_H | ||
| 23 | |||
| 24 | #include <asm/hardware.h> | ||
| 25 | #include <asm/io.h> | ||
| 26 | #include <asm/arch/platform.h> | ||
| 27 | |||
| 28 | static inline void arch_idle(void) | ||
| 29 | { | ||
| 30 | /* | ||
| 31 | * This should do all the clock switching | ||
| 32 | * and wait for interrupt tricks | ||
| 33 | */ | ||
| 34 | cpu_do_idle(); | ||
| 35 | } | ||
| 36 | |||
| 37 | static inline void arch_reset(char mode) | ||
| 38 | { | ||
| 39 | unsigned int hdr_ctrl = (IO_ADDRESS(REALVIEW_SYS_BASE) + REALVIEW_SYS_RESETCTL_OFFSET); | ||
| 40 | unsigned int val; | ||
| 41 | |||
| 42 | /* | ||
| 43 | * To reset, we hit the on-board reset register | ||
| 44 | * in the system FPGA | ||
| 45 | */ | ||
| 46 | val = __raw_readl(hdr_ctrl); | ||
| 47 | val |= REALVIEW_SYS_CTRL_RESET_CONFIGCLR; | ||
| 48 | __raw_writel(val, hdr_ctrl); | ||
| 49 | } | ||
| 50 | |||
| 51 | #endif | ||
diff --git a/include/asm-arm/arch-realview/timex.h b/include/asm-arm/arch-realview/timex.h new file mode 100644 index 000000000000..5b9d82d0a5e0 --- /dev/null +++ b/include/asm-arm/arch-realview/timex.h | |||
| @@ -0,0 +1,23 @@ | |||
| 1 | /* | ||
| 2 | * linux/include/asm-arm/arch-realview/timex.h | ||
| 3 | * | ||
| 4 | * RealView architecture timex specifications | ||
| 5 | * | ||
| 6 | * Copyright (C) 2003 ARM Limited | ||
| 7 | * | ||
| 8 | * This program is free software; you can redistribute it and/or modify | ||
| 9 | * it under the terms of the GNU General Public License as published by | ||
| 10 | * the Free Software Foundation; either version 2 of the License, or | ||
| 11 | * (at your option) any later version. | ||
| 12 | * | ||
| 13 | * This program is distributed in the hope that it will be useful, | ||
| 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 16 | * GNU General Public License for more details. | ||
| 17 | * | ||
| 18 | * You should have received a copy of the GNU General Public License | ||
| 19 | * along with this program; if not, write to the Free Software | ||
| 20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
| 21 | */ | ||
| 22 | |||
| 23 | #define CLOCK_TICK_RATE (50000000 / 16) | ||
diff --git a/include/asm-arm/arch-realview/uncompress.h b/include/asm-arm/arch-realview/uncompress.h new file mode 100644 index 000000000000..b5e4d360665b --- /dev/null +++ b/include/asm-arm/arch-realview/uncompress.h | |||
| @@ -0,0 +1,54 @@ | |||
| 1 | /* | ||
| 2 | * linux/include/asm-arm/arch-realview/uncompress.h | ||
| 3 | * | ||
| 4 | * Copyright (C) 2003 ARM Limited | ||
| 5 | * | ||
| 6 | * This program is free software; you can redistribute it and/or modify | ||
| 7 | * it under the terms of the GNU General Public License as published by | ||
| 8 | * the Free Software Foundation; either version 2 of the License, or | ||
| 9 | * (at your option) any later version. | ||
| 10 | * | ||
| 11 | * This program is distributed in the hope that it will be useful, | ||
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 14 | * GNU General Public License for more details. | ||
| 15 | * | ||
| 16 | * You should have received a copy of the GNU General Public License | ||
| 17 | * along with this program; if not, write to the Free Software | ||
| 18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
| 19 | */ | ||
| 20 | #include <asm/hardware.h> | ||
| 21 | |||
| 22 | #define AMBA_UART_DR (*(volatile unsigned char *) (REALVIEW_UART0_BASE + 0x00)) | ||
| 23 | #define AMBA_UART_LCRH (*(volatile unsigned char *) (REALVIEW_UART0_BASE + 0x2c)) | ||
| 24 | #define AMBA_UART_CR (*(volatile unsigned char *) (REALVIEW_UART0_BASE + 0x30)) | ||
| 25 | #define AMBA_UART_FR (*(volatile unsigned char *) (REALVIEW_UART0_BASE + 0x18)) | ||
| 26 | |||
| 27 | /* | ||
| 28 | * This does not append a newline | ||
| 29 | */ | ||
| 30 | static void putstr(const char *s) | ||
| 31 | { | ||
| 32 | while (*s) { | ||
| 33 | while (AMBA_UART_FR & (1 << 5)) | ||
| 34 | barrier(); | ||
| 35 | |||
| 36 | AMBA_UART_DR = *s; | ||
| 37 | |||
| 38 | if (*s == '\n') { | ||
| 39 | while (AMBA_UART_FR & (1 << 5)) | ||
| 40 | barrier(); | ||
| 41 | |||
| 42 | AMBA_UART_DR = '\r'; | ||
| 43 | } | ||
| 44 | s++; | ||
| 45 | } | ||
| 46 | while (AMBA_UART_FR & (1 << 3)) | ||
| 47 | barrier(); | ||
| 48 | } | ||
| 49 | |||
| 50 | /* | ||
| 51 | * nothing to do | ||
| 52 | */ | ||
| 53 | #define arch_decomp_setup() | ||
| 54 | #define arch_decomp_wdog() | ||
diff --git a/include/asm-arm/arch-realview/vmalloc.h b/include/asm-arm/arch-realview/vmalloc.h new file mode 100644 index 000000000000..0ad49af186af --- /dev/null +++ b/include/asm-arm/arch-realview/vmalloc.h | |||
| @@ -0,0 +1,21 @@ | |||
| 1 | /* | ||
| 2 | * linux/include/asm-arm/arch-realview/vmalloc.h | ||
| 3 | * | ||
| 4 | * Copyright (C) 2003 ARM Limited | ||
| 5 | * Copyright (C) 2000 Russell King. | ||
| 6 | * | ||
| 7 | * This program is free software; you can redistribute it and/or modify | ||
| 8 | * it under the terms of the GNU General Public License as published by | ||
| 9 | * the Free Software Foundation; either version 2 of the License, or | ||
| 10 | * (at your option) any later version. | ||
| 11 | * | ||
| 12 | * This program is distributed in the hope that it will be useful, | ||
| 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 15 | * GNU General Public License for more details. | ||
| 16 | * | ||
| 17 | * You should have received a copy of the GNU General Public License | ||
| 18 | * along with this program; if not, write to the Free Software | ||
| 19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
| 20 | */ | ||
| 21 | #define VMALLOC_END (PAGE_OFFSET + 0x18000000) | ||
diff --git a/include/asm-arm/arch-s3c2410/regs-iis.h b/include/asm-arm/arch-s3c2410/regs-iis.h index fdd62e8cd6cb..7fdde9b91cb4 100644 --- a/include/asm-arm/arch-s3c2410/regs-iis.h +++ b/include/asm-arm/arch-s3c2410/regs-iis.h | |||
| @@ -55,6 +55,7 @@ | |||
| 55 | #define S3C2410_IISMOD_16FS (0<<0) | 55 | #define S3C2410_IISMOD_16FS (0<<0) |
| 56 | #define S3C2410_IISMOD_32FS (1<<0) | 56 | #define S3C2410_IISMOD_32FS (1<<0) |
| 57 | #define S3C2410_IISMOD_48FS (2<<0) | 57 | #define S3C2410_IISMOD_48FS (2<<0) |
| 58 | #define S3C2410_IISMOD_FS_MASK (3<<0) | ||
| 58 | 59 | ||
| 59 | #define S3C2410_IISPSR (0x08) | 60 | #define S3C2410_IISPSR (0x08) |
| 60 | #define S3C2410_IISPSR_INTMASK (31<<5) | 61 | #define S3C2410_IISPSR_INTMASK (31<<5) |
diff --git a/include/asm-arm/cpu.h b/include/asm-arm/cpu.h index fcbdd40cb667..751bc7462074 100644 --- a/include/asm-arm/cpu.h +++ b/include/asm-arm/cpu.h | |||
| @@ -16,6 +16,7 @@ | |||
| 16 | struct cpuinfo_arm { | 16 | struct cpuinfo_arm { |
| 17 | struct cpu cpu; | 17 | struct cpu cpu; |
| 18 | #ifdef CONFIG_SMP | 18 | #ifdef CONFIG_SMP |
| 19 | struct task_struct *idle; | ||
| 19 | unsigned int loops_per_jiffy; | 20 | unsigned int loops_per_jiffy; |
| 20 | #endif | 21 | #endif |
| 21 | }; | 22 | }; |
diff --git a/include/asm-arm/hardware/amba_clcd.h b/include/asm-arm/hardware/amba_clcd.h index ce4cf5c1c05d..6b8d73dc1ab0 100644 --- a/include/asm-arm/hardware/amba_clcd.h +++ b/include/asm-arm/hardware/amba_clcd.h | |||
| @@ -22,7 +22,7 @@ | |||
| 22 | #define CLCD_UBAS 0x00000010 | 22 | #define CLCD_UBAS 0x00000010 |
| 23 | #define CLCD_LBAS 0x00000014 | 23 | #define CLCD_LBAS 0x00000014 |
| 24 | 24 | ||
| 25 | #ifndef CONFIG_ARCH_VERSATILE | 25 | #if !defined(CONFIG_ARCH_VERSATILE) && !defined(CONFIG_ARCH_REALVIEW) |
| 26 | #define CLCD_IENB 0x00000018 | 26 | #define CLCD_IENB 0x00000018 |
| 27 | #define CLCD_CNTL 0x0000001c | 27 | #define CLCD_CNTL 0x0000001c |
| 28 | #else | 28 | #else |
diff --git a/include/asm-arm/irq.h b/include/asm-arm/irq.h index f97912fbb10f..59975ee43cf1 100644 --- a/include/asm-arm/irq.h +++ b/include/asm-arm/irq.h | |||
| @@ -47,5 +47,6 @@ struct irqaction; | |||
| 47 | struct pt_regs; | 47 | struct pt_regs; |
| 48 | int handle_IRQ_event(unsigned int, struct pt_regs *, struct irqaction *); | 48 | int handle_IRQ_event(unsigned int, struct pt_regs *, struct irqaction *); |
| 49 | 49 | ||
| 50 | extern void migrate_irqs(void); | ||
| 50 | #endif | 51 | #endif |
| 51 | 52 | ||
diff --git a/include/asm-arm/smp.h b/include/asm-arm/smp.h index dbb4d859c586..551cd3c3093c 100644 --- a/include/asm-arm/smp.h +++ b/include/asm-arm/smp.h | |||
| @@ -66,4 +66,14 @@ struct secondary_data { | |||
| 66 | }; | 66 | }; |
| 67 | extern struct secondary_data secondary_data; | 67 | extern struct secondary_data secondary_data; |
| 68 | 68 | ||
| 69 | extern int __cpu_disable(void); | ||
| 70 | extern int mach_cpu_disable(unsigned int cpu); | ||
| 71 | |||
| 72 | extern void __cpu_die(unsigned int cpu); | ||
| 73 | extern void cpu_die(void); | ||
| 74 | |||
| 75 | extern void platform_cpu_die(unsigned int cpu); | ||
| 76 | extern int platform_cpu_kill(unsigned int cpu); | ||
| 77 | extern void platform_cpu_enable(unsigned int cpu); | ||
| 78 | |||
| 69 | #endif /* ifndef __ASM_ARM_SMP_H */ | 79 | #endif /* ifndef __ASM_ARM_SMP_H */ |
diff --git a/include/asm-arm/spinlock.h b/include/asm-arm/spinlock.h index cb4906b45555..6ed4f916b166 100644 --- a/include/asm-arm/spinlock.h +++ b/include/asm-arm/spinlock.h | |||
| @@ -80,7 +80,7 @@ static inline void __raw_spin_unlock(raw_spinlock_t *lock) | |||
| 80 | */ | 80 | */ |
| 81 | #define rwlock_is_locked(x) (*((volatile unsigned int *)(x)) != 0) | 81 | #define rwlock_is_locked(x) (*((volatile unsigned int *)(x)) != 0) |
| 82 | 82 | ||
| 83 | static inline void __raw_write_lock(rwlock_t *rw) | 83 | static inline void __raw_write_lock(raw_rwlock_t *rw) |
| 84 | { | 84 | { |
| 85 | unsigned long tmp; | 85 | unsigned long tmp; |
| 86 | 86 | ||
| @@ -97,7 +97,7 @@ static inline void __raw_write_lock(rwlock_t *rw) | |||
| 97 | smp_mb(); | 97 | smp_mb(); |
| 98 | } | 98 | } |
| 99 | 99 | ||
| 100 | static inline int __raw_write_trylock(rwlock_t *rw) | 100 | static inline int __raw_write_trylock(raw_rwlock_t *rw) |
| 101 | { | 101 | { |
| 102 | unsigned long tmp; | 102 | unsigned long tmp; |
| 103 | 103 | ||
| @@ -157,7 +157,7 @@ static inline void __raw_read_lock(raw_rwlock_t *rw) | |||
| 157 | smp_mb(); | 157 | smp_mb(); |
| 158 | } | 158 | } |
| 159 | 159 | ||
| 160 | static inline void __raw_read_unlock(rwlock_t *rw) | 160 | static inline void __raw_read_unlock(raw_rwlock_t *rw) |
| 161 | { | 161 | { |
| 162 | unsigned long tmp, tmp2; | 162 | unsigned long tmp, tmp2; |
| 163 | 163 | ||
diff --git a/include/asm-m68knommu/anchor.h b/include/asm-m68knommu/anchor.h index 75390e0b40c9..871c0d5cfc3d 100644 --- a/include/asm-m68knommu/anchor.h +++ b/include/asm-m68knommu/anchor.h | |||
| @@ -14,7 +14,7 @@ | |||
| 14 | /* | 14 | /* |
| 15 | * Define basic addressing info. | 15 | * Define basic addressing info. |
| 16 | */ | 16 | */ |
| 17 | #if defined(CONFIG_MOTOROLA) && defined(CONFIG_M5407) | 17 | #if defined(CONFIG_M5407C3) |
| 18 | #define COMEM_BASE 0xFFFF0000 /* Base of CO-MEM address space */ | 18 | #define COMEM_BASE 0xFFFF0000 /* Base of CO-MEM address space */ |
| 19 | #define COMEM_IRQ 25 /* IRQ of anchor part */ | 19 | #define COMEM_IRQ 25 /* IRQ of anchor part */ |
| 20 | #else | 20 | #else |
| @@ -96,7 +96,7 @@ | |||
| 96 | * The PCI bus will be limited in what slots will actually be used. | 96 | * The PCI bus will be limited in what slots will actually be used. |
| 97 | * Define valid device numbers for different boards. | 97 | * Define valid device numbers for different boards. |
| 98 | */ | 98 | */ |
| 99 | #if defined(CONFIG_MOTOROLA) && defined(CONFIG_M5407) | 99 | #if defined(CONFIG_M5407C3) |
| 100 | #define COMEM_MINDEV 14 /* Minimum valid DEVICE */ | 100 | #define COMEM_MINDEV 14 /* Minimum valid DEVICE */ |
| 101 | #define COMEM_MAXDEV 14 /* Maximum valid DEVICE */ | 101 | #define COMEM_MAXDEV 14 /* Maximum valid DEVICE */ |
| 102 | #define COMEM_BRIDGEDEV 15 /* Slot bridge is in */ | 102 | #define COMEM_BRIDGEDEV 15 /* Slot bridge is in */ |
diff --git a/include/asm-m68knommu/asm-offsets.h b/include/asm-m68knommu/asm-offsets.h deleted file mode 100644 index 825f6e210f19..000000000000 --- a/include/asm-m68knommu/asm-offsets.h +++ /dev/null | |||
| @@ -1,49 +0,0 @@ | |||
| 1 | #ifndef __ASM_OFFSETS_H__ | ||
| 2 | #define __ASM_OFFSETS_H__ | ||
| 3 | /* | ||
| 4 | * DO NOT MODIFY. | ||
| 5 | * | ||
| 6 | * This file was generated by arch/m68knommu/Makefile | ||
| 7 | * | ||
| 8 | */ | ||
| 9 | |||
| 10 | #define TASK_STATE 0 /* offsetof(struct task_struct, state) */ | ||
| 11 | #define TASK_FLAGS 12 /* offsetof(struct task_struct, flags) */ | ||
| 12 | #define TASK_PTRACE 16 /* offsetof(struct task_struct, ptrace) */ | ||
| 13 | #define TASK_BLOCKED 922 /* offsetof(struct task_struct, blocked) */ | ||
| 14 | #define TASK_THREAD 772 /* offsetof(struct task_struct, thread) */ | ||
| 15 | #define TASK_THREAD_INFO 4 /* offsetof(struct task_struct, thread_info) */ | ||
| 16 | #define TASK_MM 92 /* offsetof(struct task_struct, mm) */ | ||
| 17 | #define TASK_ACTIVE_MM 96 /* offsetof(struct task_struct, active_mm) */ | ||
| 18 | #define CPUSTAT_SOFTIRQ_PENDING 0 /* offsetof(irq_cpustat_t, __softirq_pending) */ | ||
| 19 | #define THREAD_KSP 0 /* offsetof(struct thread_struct, ksp) */ | ||
| 20 | #define THREAD_USP 4 /* offsetof(struct thread_struct, usp) */ | ||
| 21 | #define THREAD_SR 8 /* offsetof(struct thread_struct, sr) */ | ||
| 22 | #define THREAD_FS 10 /* offsetof(struct thread_struct, fs) */ | ||
| 23 | #define THREAD_CRP 12 /* offsetof(struct thread_struct, crp) */ | ||
| 24 | #define THREAD_ESP0 20 /* offsetof(struct thread_struct, esp0) */ | ||
| 25 | #define THREAD_FPREG 24 /* offsetof(struct thread_struct, fp) */ | ||
| 26 | #define THREAD_FPCNTL 120 /* offsetof(struct thread_struct, fpcntl) */ | ||
| 27 | #define THREAD_FPSTATE 132 /* offsetof(struct thread_struct, fpstate) */ | ||
| 28 | #define PT_D0 32 /* offsetof(struct pt_regs, d0) */ | ||
| 29 | #define PT_ORIG_D0 36 /* offsetof(struct pt_regs, orig_d0) */ | ||
| 30 | #define PT_D1 0 /* offsetof(struct pt_regs, d1) */ | ||
| 31 | #define PT_D2 4 /* offsetof(struct pt_regs, d2) */ | ||
| 32 | #define PT_D3 8 /* offsetof(struct pt_regs, d3) */ | ||
| 33 | #define PT_D4 12 /* offsetof(struct pt_regs, d4) */ | ||
| 34 | #define PT_D5 16 /* offsetof(struct pt_regs, d5) */ | ||
| 35 | #define PT_A0 20 /* offsetof(struct pt_regs, a0) */ | ||
| 36 | #define PT_A1 24 /* offsetof(struct pt_regs, a1) */ | ||
| 37 | #define PT_A2 28 /* offsetof(struct pt_regs, a2) */ | ||
| 38 | #define PT_PC 48 /* offsetof(struct pt_regs, pc) */ | ||
| 39 | #define PT_SR 46 /* offsetof(struct pt_regs, sr) */ | ||
| 40 | #define PT_VECTOR 52 /* offsetof(struct pt_regs, pc) + 4 */ | ||
| 41 | #define STAT_IRQ 5140 /* offsetof(struct kernel_stat, irqs) */ | ||
| 42 | #define SIGSEGV 11 /* SIGSEGV */ | ||
| 43 | #define SEGV_MAPERR 196609 /* SEGV_MAPERR */ | ||
| 44 | #define SIGTRAP 5 /* SIGTRAP */ | ||
| 45 | #define TRAP_TRACE 196610 /* TRAP_TRACE */ | ||
| 46 | #define PT_PTRACED 1 /* PT_PTRACED */ | ||
| 47 | #define PT_DTRACE 2 /* PT_DTRACE */ | ||
| 48 | |||
| 49 | #endif | ||
diff --git a/include/asm-m68knommu/atomic.h b/include/asm-m68knommu/atomic.h index b1957fba083b..a83631ed8c8f 100644 --- a/include/asm-m68knommu/atomic.h +++ b/include/asm-m68knommu/atomic.h | |||
| @@ -100,7 +100,7 @@ static __inline__ void atomic_set_mask(unsigned long mask, unsigned long *v) | |||
| 100 | #define smp_mb__before_atomic_inc() barrier() | 100 | #define smp_mb__before_atomic_inc() barrier() |
| 101 | #define smp_mb__after_atomic_inc() barrier() | 101 | #define smp_mb__after_atomic_inc() barrier() |
| 102 | 102 | ||
| 103 | extern __inline__ int atomic_add_return(int i, atomic_t * v) | 103 | static inline int atomic_add_return(int i, atomic_t * v) |
| 104 | { | 104 | { |
| 105 | unsigned long temp, flags; | 105 | unsigned long temp, flags; |
| 106 | 106 | ||
| @@ -115,7 +115,7 @@ extern __inline__ int atomic_add_return(int i, atomic_t * v) | |||
| 115 | 115 | ||
| 116 | #define atomic_add_negative(a, v) (atomic_add_return((a), (v)) < 0) | 116 | #define atomic_add_negative(a, v) (atomic_add_return((a), (v)) < 0) |
| 117 | 117 | ||
| 118 | extern __inline__ int atomic_sub_return(int i, atomic_t * v) | 118 | static inline int atomic_sub_return(int i, atomic_t * v) |
| 119 | { | 119 | { |
| 120 | unsigned long temp, flags; | 120 | unsigned long temp, flags; |
| 121 | 121 | ||
diff --git a/include/asm-m68knommu/coldfire.h b/include/asm-m68knommu/coldfire.h index 1df3f666a28e..6190f77b1e6c 100644 --- a/include/asm-m68knommu/coldfire.h +++ b/include/asm-m68knommu/coldfire.h | |||
| @@ -20,9 +20,14 @@ | |||
| 20 | */ | 20 | */ |
| 21 | #define MCF_MBAR 0x10000000 | 21 | #define MCF_MBAR 0x10000000 |
| 22 | #define MCF_MBAR2 0x80000000 | 22 | #define MCF_MBAR2 0x80000000 |
| 23 | #if defined(CONFIG_M520x) | ||
| 24 | #define MCF_IPSBAR 0xFC000000 | ||
| 25 | #else | ||
| 23 | #define MCF_IPSBAR 0x40000000 | 26 | #define MCF_IPSBAR 0x40000000 |
| 27 | #endif | ||
| 24 | 28 | ||
| 25 | #if defined(CONFIG_M523x) || defined(CONFIG_M527x) || defined(CONFIG_M528x) | 29 | #if defined(CONFIG_M523x) || defined(CONFIG_M527x) || defined(CONFIG_M528x) || \ |
| 30 | defined(CONFIG_M520x) | ||
| 26 | #undef MCF_MBAR | 31 | #undef MCF_MBAR |
| 27 | #define MCF_MBAR MCF_IPSBAR | 32 | #define MCF_MBAR MCF_IPSBAR |
| 28 | #endif | 33 | #endif |
| @@ -78,7 +83,8 @@ | |||
| 78 | * One some ColdFire family members the bus clock (used by internal | 83 | * One some ColdFire family members the bus clock (used by internal |
| 79 | * peripherals) is not the same as the CPU clock. | 84 | * peripherals) is not the same as the CPU clock. |
| 80 | */ | 85 | */ |
| 81 | #if defined(CONFIG_M523x) || defined(CONFIG_M5249) || defined(CONFIG_M527x) | 86 | #if defined(CONFIG_M523x) || defined(CONFIG_M5249) || defined(CONFIG_M527x) || \ |
| 87 | defined(CONFIG_M520x) | ||
| 82 | #define MCF_BUSCLK (MCF_CLK / 2) | 88 | #define MCF_BUSCLK (MCF_CLK / 2) |
| 83 | #else | 89 | #else |
| 84 | #define MCF_BUSCLK MCF_CLK | 90 | #define MCF_BUSCLK MCF_CLK |
diff --git a/include/asm-m68knommu/delay.h b/include/asm-m68knommu/delay.h index e3a976254672..04a20fd051cf 100644 --- a/include/asm-m68knommu/delay.h +++ b/include/asm-m68knommu/delay.h | |||
| @@ -8,7 +8,7 @@ | |||
| 8 | 8 | ||
| 9 | #include <asm/param.h> | 9 | #include <asm/param.h> |
| 10 | 10 | ||
| 11 | extern __inline__ void __delay(unsigned long loops) | 11 | static inline void __delay(unsigned long loops) |
| 12 | { | 12 | { |
| 13 | #if defined(CONFIG_COLDFIRE) | 13 | #if defined(CONFIG_COLDFIRE) |
| 14 | /* The coldfire runs this loop at significantly different speeds | 14 | /* The coldfire runs this loop at significantly different speeds |
| @@ -48,7 +48,7 @@ extern __inline__ void __delay(unsigned long loops) | |||
| 48 | 48 | ||
| 49 | extern unsigned long loops_per_jiffy; | 49 | extern unsigned long loops_per_jiffy; |
| 50 | 50 | ||
| 51 | extern __inline__ void _udelay(unsigned long usecs) | 51 | static inline void _udelay(unsigned long usecs) |
| 52 | { | 52 | { |
| 53 | #if defined(CONFIG_M68328) || defined(CONFIG_M68EZ328) || \ | 53 | #if defined(CONFIG_M68328) || defined(CONFIG_M68EZ328) || \ |
| 54 | defined(CONFIG_M68VZ328) || defined(CONFIG_M68360) || \ | 54 | defined(CONFIG_M68VZ328) || defined(CONFIG_M68360) || \ |
diff --git a/include/asm-m68knommu/ide.h b/include/asm-m68knommu/ide.h deleted file mode 100644 index 836f0721ecf9..000000000000 --- a/include/asm-m68knommu/ide.h +++ /dev/null | |||
| @@ -1,437 +0,0 @@ | |||
| 1 | /****************************************************************************/ | ||
| 2 | /* | ||
| 3 | * linux/include/asm-m68knommu/ide.h | ||
| 4 | * | ||
| 5 | * Copyright (C) 1994-1996 Linus Torvalds & authors | ||
| 6 | * Copyright (C) 2001 Lineo Inc., davidm@uclinux.org | ||
| 7 | */ | ||
| 8 | /****************************************************************************/ | ||
| 9 | #ifndef _M68KNOMMU_IDE_H | ||
| 10 | #define _M68KNOMMU_IDE_H | ||
| 11 | |||
| 12 | #ifdef __KERNEL__ | ||
| 13 | /****************************************************************************/ | ||
| 14 | |||
| 15 | #include <linux/config.h> | ||
| 16 | #include <linux/interrupt.h> | ||
| 17 | |||
| 18 | #include <asm/setup.h> | ||
| 19 | #include <asm/io.h> | ||
| 20 | #include <asm/irq.h> | ||
| 21 | |||
| 22 | /****************************************************************************/ | ||
| 23 | /* | ||
| 24 | * some coldfire specifics | ||
| 25 | */ | ||
| 26 | |||
| 27 | #ifdef CONFIG_COLDFIRE | ||
| 28 | #include <asm/coldfire.h> | ||
| 29 | #include <asm/mcfsim.h> | ||
| 30 | |||
| 31 | /* | ||
| 32 | * Save some space, only have 1 interface | ||
| 33 | */ | ||
| 34 | #define MAX_HWIFS 1 /* we only have one interface for now */ | ||
| 35 | |||
| 36 | #ifdef CONFIG_SECUREEDGEMP3 | ||
| 37 | #define MCFSIM_LOCALCS MCFSIM_CSCR4 | ||
| 38 | #else | ||
| 39 | #define MCFSIM_LOCALCS MCFSIM_CSCR6 | ||
| 40 | #endif | ||
| 41 | |||
| 42 | #endif /* CONFIG_COLDFIRE */ | ||
| 43 | |||
| 44 | /****************************************************************************/ | ||
| 45 | /* | ||
| 46 | * Fix up things that may not have been provided | ||
| 47 | */ | ||
| 48 | |||
| 49 | #ifndef MAX_HWIFS | ||
| 50 | #define MAX_HWIFS 4 /* same as the other archs */ | ||
| 51 | #endif | ||
| 52 | |||
| 53 | #undef SUPPORT_SLOW_DATA_PORTS | ||
| 54 | #define SUPPORT_SLOW_DATA_PORTS 0 | ||
| 55 | |||
| 56 | #undef SUPPORT_VLB_SYNC | ||
| 57 | #define SUPPORT_VLB_SYNC 0 | ||
| 58 | |||
| 59 | /* this definition is used only on startup .. */ | ||
| 60 | #undef HD_DATA | ||
| 61 | #define HD_DATA NULL | ||
| 62 | |||
| 63 | #define DBGIDE(fmt,a...) | ||
| 64 | // #define DBGIDE(fmt,a...) printk(fmt, ##a) | ||
| 65 | #define IDE_INLINE __inline__ | ||
| 66 | // #define IDE_INLINE | ||
| 67 | |||
| 68 | /****************************************************************************/ | ||
| 69 | |||
| 70 | typedef union { | ||
| 71 | unsigned all : 8; /* all of the bits together */ | ||
| 72 | struct { | ||
| 73 | unsigned bit7 : 1; /* always 1 */ | ||
| 74 | unsigned lba : 1; /* using LBA instead of CHS */ | ||
| 75 | unsigned bit5 : 1; /* always 1 */ | ||
| 76 | unsigned unit : 1; /* drive select number, 0 or 1 */ | ||
| 77 | unsigned head : 4; /* always zeros here */ | ||
| 78 | } b; | ||
| 79 | } select_t; | ||
| 80 | |||
| 81 | /* | ||
| 82 | * our list of ports/irq's for different boards | ||
| 83 | */ | ||
| 84 | |||
| 85 | static struct m68k_ide_defaults { | ||
| 86 | ide_ioreg_t base; | ||
| 87 | int irq; | ||
| 88 | } m68k_ide_defaults[MAX_HWIFS] = { | ||
| 89 | #if defined(CONFIG_SECUREEDGEMP3) | ||
| 90 | { ((ide_ioreg_t)0x30800000), 29 }, | ||
| 91 | #elif defined(CONFIG_eLIA) | ||
| 92 | { ((ide_ioreg_t)0x30c00000), 29 }, | ||
| 93 | #else | ||
| 94 | { ((ide_ioreg_t)0x0), 0 } | ||
| 95 | #endif | ||
| 96 | }; | ||
| 97 | |||
| 98 | /****************************************************************************/ | ||
| 99 | |||
| 100 | static IDE_INLINE int ide_default_irq(ide_ioreg_t base) | ||
| 101 | { | ||
| 102 | int i; | ||
| 103 | |||
| 104 | for (i = 0; i < MAX_HWIFS; i++) | ||
| 105 | if (m68k_ide_defaults[i].base == base) | ||
| 106 | return(m68k_ide_defaults[i].irq); | ||
| 107 | return 0; | ||
| 108 | } | ||
| 109 | |||
| 110 | static IDE_INLINE ide_ioreg_t ide_default_io_base(int index) | ||
| 111 | { | ||
| 112 | if (index >= 0 && index < MAX_HWIFS) | ||
| 113 | return(m68k_ide_defaults[index].base); | ||
| 114 | return 0; | ||
| 115 | } | ||
| 116 | |||
| 117 | |||
| 118 | /* | ||
| 119 | * Set up a hw structure for a specified data port, control port and IRQ. | ||
| 120 | * This should follow whatever the default interface uses. | ||
| 121 | */ | ||
| 122 | static IDE_INLINE void ide_init_hwif_ports( | ||
| 123 | hw_regs_t *hw, | ||
| 124 | ide_ioreg_t data_port, | ||
| 125 | ide_ioreg_t ctrl_port, | ||
| 126 | int *irq) | ||
| 127 | { | ||
| 128 | ide_ioreg_t reg = data_port; | ||
| 129 | int i; | ||
| 130 | |||
| 131 | for (i = IDE_DATA_OFFSET; i <= IDE_STATUS_OFFSET; i++) { | ||
| 132 | hw->io_ports[i] = reg; | ||
| 133 | reg += 1; | ||
| 134 | } | ||
| 135 | if (ctrl_port) { | ||
| 136 | hw->io_ports[IDE_CONTROL_OFFSET] = ctrl_port; | ||
| 137 | } else { | ||
| 138 | hw->io_ports[IDE_CONTROL_OFFSET] = data_port + 0xe; | ||
| 139 | } | ||
| 140 | } | ||
| 141 | |||
| 142 | #define ide_init_default_irq(base) ide_default_irq(base) | ||
| 143 | |||
| 144 | static IDE_INLINE int | ||
| 145 | ide_request_irq( | ||
| 146 | unsigned int irq, | ||
| 147 | void (*handler)(int, void *, struct pt_regs *), | ||
| 148 | unsigned long flags, | ||
| 149 | const char *device, | ||
| 150 | void *dev_id) | ||
| 151 | { | ||
| 152 | #ifdef CONFIG_COLDFIRE | ||
| 153 | mcf_autovector(irq); | ||
| 154 | #endif | ||
| 155 | return(request_irq(irq, handler, flags, device, dev_id)); | ||
| 156 | } | ||
| 157 | |||
| 158 | |||
| 159 | static IDE_INLINE void | ||
| 160 | ide_free_irq(unsigned int irq, void *dev_id) | ||
| 161 | { | ||
| 162 | free_irq(irq, dev_id); | ||
| 163 | } | ||
| 164 | |||
| 165 | |||
| 166 | static IDE_INLINE void | ||
| 167 | ide_request_region(ide_ioreg_t from, unsigned int extent, const char *name) | ||
| 168 | { | ||
| 169 | } | ||
| 170 | |||
| 171 | |||
| 172 | static IDE_INLINE void | ||
| 173 | ide_release_region(ide_ioreg_t from, unsigned int extent) | ||
| 174 | { | ||
| 175 | } | ||
| 176 | |||
| 177 | |||
| 178 | static IDE_INLINE void | ||
| 179 | ide_fix_driveid(struct hd_driveid *id) | ||
| 180 | { | ||
| 181 | #ifdef CONFIG_COLDFIRE | ||
| 182 | int i, n; | ||
| 183 | unsigned short *wp = (unsigned short *) id; | ||
| 184 | int avoid[] = {49, 51, 52, 59, -1 }; /* do not swap these words */ | ||
| 185 | |||
| 186 | /* Need to byte swap shorts, but not char fields */ | ||
| 187 | for (i = n = 0; i < sizeof(*id) / sizeof(*wp); i++, wp++) { | ||
| 188 | if (avoid[n] == i) { | ||
| 189 | n++; | ||
| 190 | continue; | ||
| 191 | } | ||
| 192 | *wp = ((*wp & 0xff) << 8) | ((*wp >> 8) & 0xff); | ||
| 193 | } | ||
| 194 | /* have to word swap the one 32 bit field */ | ||
| 195 | id->lba_capacity = ((id->lba_capacity & 0xffff) << 16) | | ||
| 196 | ((id->lba_capacity >> 16) & 0xffff); | ||
| 197 | #endif | ||
| 198 | } | ||
| 199 | |||
| 200 | |||
| 201 | static IDE_INLINE void | ||
| 202 | ide_release_lock (int *ide_lock) | ||
| 203 | { | ||
| 204 | } | ||
| 205 | |||
| 206 | |||
| 207 | static IDE_INLINE void | ||
| 208 | ide_get_lock( | ||
| 209 | int *ide_lock, | ||
| 210 | void (*handler)(int, void *, struct pt_regs *), | ||
| 211 | void *data) | ||
| 212 | { | ||
| 213 | } | ||
| 214 | |||
| 215 | |||
| 216 | #define ide_ack_intr(hwif) \ | ||
| 217 | ((hwif)->hw.ack_intr ? (hwif)->hw.ack_intr(hwif) : 1) | ||
| 218 | #define ide__sti() __sti() | ||
| 219 | |||
| 220 | /****************************************************************************/ | ||
| 221 | /* | ||
| 222 | * System specific IO requirements | ||
| 223 | */ | ||
| 224 | |||
| 225 | #ifdef CONFIG_COLDFIRE | ||
| 226 | |||
| 227 | #ifdef CONFIG_SECUREEDGEMP3 | ||
| 228 | |||
| 229 | /* Replace standard IO functions for funky mapping of MP3 board */ | ||
| 230 | #undef outb | ||
| 231 | #undef outb_p | ||
| 232 | #undef inb | ||
| 233 | #undef inb_p | ||
| 234 | |||
| 235 | #define outb(v, a) ide_outb(v, (unsigned long) (a)) | ||
| 236 | #define outb_p(v, a) ide_outb(v, (unsigned long) (a)) | ||
| 237 | #define inb(a) ide_inb((unsigned long) (a)) | ||
| 238 | #define inb_p(a) ide_inb((unsigned long) (a)) | ||
| 239 | |||
| 240 | #define ADDR8_PTR(addr) (((addr) & 0x1) ? (0x8000 + (addr) - 1) : (addr)) | ||
| 241 | #define ADDR16_PTR(addr) (addr) | ||
| 242 | #define ADDR32_PTR(addr) (addr) | ||
| 243 | #define SWAP8(w) ((((w) & 0xffff) << 8) | (((w) & 0xffff) >> 8)) | ||
| 244 | #define SWAP16(w) (w) | ||
| 245 | #define SWAP32(w) (w) | ||
| 246 | |||
| 247 | |||
| 248 | static IDE_INLINE void | ||
| 249 | ide_outb(unsigned int val, unsigned int addr) | ||
| 250 | { | ||
| 251 | volatile unsigned short *rp; | ||
| 252 | |||
| 253 | DBGIDE("%s(val=%x,addr=%x)\n", __FUNCTION__, val, addr); | ||
| 254 | rp = (volatile unsigned short *) ADDR8_PTR(addr); | ||
| 255 | *rp = SWAP8(val); | ||
| 256 | } | ||
| 257 | |||
| 258 | |||
| 259 | static IDE_INLINE int | ||
| 260 | ide_inb(unsigned int addr) | ||
| 261 | { | ||
| 262 | volatile unsigned short *rp, val; | ||
| 263 | |||
| 264 | DBGIDE("%s(addr=%x)\n", __FUNCTION__, addr); | ||
| 265 | rp = (volatile unsigned short *) ADDR8_PTR(addr); | ||
| 266 | val = *rp; | ||
| 267 | return(SWAP8(val)); | ||
| 268 | } | ||
| 269 | |||
| 270 | |||
| 271 | static IDE_INLINE void | ||
| 272 | ide_outw(unsigned int val, unsigned int addr) | ||
| 273 | { | ||
| 274 | volatile unsigned short *rp; | ||
| 275 | |||
| 276 | DBGIDE("%s(val=%x,addr=%x)\n", __FUNCTION__, val, addr); | ||
| 277 | rp = (volatile unsigned short *) ADDR16_PTR(addr); | ||
| 278 | *rp = SWAP16(val); | ||
| 279 | } | ||
| 280 | |||
| 281 | static IDE_INLINE void | ||
| 282 | ide_outsw(unsigned int addr, const void *vbuf, unsigned long len) | ||
| 283 | { | ||
| 284 | volatile unsigned short *rp, val; | ||
| 285 | unsigned short *buf; | ||
| 286 | |||
| 287 | DBGIDE("%s(addr=%x,vbuf=%p,len=%x)\n", __FUNCTION__, addr, vbuf, len); | ||
| 288 | buf = (unsigned short *) vbuf; | ||
| 289 | rp = (volatile unsigned short *) ADDR16_PTR(addr); | ||
| 290 | for (; (len > 0); len--) { | ||
| 291 | val = *buf++; | ||
| 292 | *rp = SWAP16(val); | ||
| 293 | } | ||
| 294 | } | ||
| 295 | |||
| 296 | static IDE_INLINE int | ||
| 297 | ide_inw(unsigned int addr) | ||
| 298 | { | ||
| 299 | volatile unsigned short *rp, val; | ||
| 300 | |||
| 301 | DBGIDE("%s(addr=%x)\n", __FUNCTION__, addr); | ||
| 302 | rp = (volatile unsigned short *) ADDR16_PTR(addr); | ||
| 303 | val = *rp; | ||
| 304 | return(SWAP16(val)); | ||
| 305 | } | ||
| 306 | |||
| 307 | static IDE_INLINE void | ||
| 308 | ide_insw(unsigned int addr, void *vbuf, unsigned long len) | ||
| 309 | { | ||
| 310 | volatile unsigned short *rp; | ||
| 311 | unsigned short w, *buf; | ||
| 312 | |||
| 313 | DBGIDE("%s(addr=%x,vbuf=%p,len=%x)\n", __FUNCTION__, addr, vbuf, len); | ||
| 314 | buf = (unsigned short *) vbuf; | ||
| 315 | rp = (volatile unsigned short *) ADDR16_PTR(addr); | ||
| 316 | for (; (len > 0); len--) { | ||
| 317 | w = *rp; | ||
| 318 | *buf++ = SWAP16(w); | ||
| 319 | } | ||
| 320 | } | ||
| 321 | |||
| 322 | static IDE_INLINE void | ||
| 323 | ide_insl(unsigned int addr, void *vbuf, unsigned long len) | ||
| 324 | { | ||
| 325 | volatile unsigned long *rp; | ||
| 326 | unsigned long w, *buf; | ||
| 327 | |||
| 328 | DBGIDE("%s(addr=%x,vbuf=%p,len=%x)\n", __FUNCTION__, addr, vbuf, len); | ||
| 329 | buf = (unsigned long *) vbuf; | ||
| 330 | rp = (volatile unsigned long *) ADDR32_PTR(addr); | ||
| 331 | for (; (len > 0); len--) { | ||
| 332 | w = *rp; | ||
| 333 | *buf++ = SWAP32(w); | ||
| 334 | } | ||
| 335 | } | ||
| 336 | |||
| 337 | static IDE_INLINE void | ||
| 338 | ide_outsl(unsigned int addr, const void *vbuf, unsigned long len) | ||
| 339 | { | ||
| 340 | volatile unsigned long *rp, val; | ||
| 341 | unsigned long *buf; | ||
| 342 | |||
| 343 | DBGIDE("%s(addr=%x,vbuf=%p,len=%x)\n", __FUNCTION__, addr, vbuf, len); | ||
| 344 | buf = (unsigned long *) vbuf; | ||
| 345 | rp = (volatile unsigned long *) ADDR32_PTR(addr); | ||
| 346 | for (; (len > 0); len--) { | ||
| 347 | val = *buf++; | ||
| 348 | *rp = SWAP32(val); | ||
| 349 | } | ||
| 350 | } | ||
| 351 | |||
| 352 | #elif CONFIG_eLIA | ||
| 353 | |||
| 354 | /* 8/16 bit acesses are controlled by flicking bits in the CS register */ | ||
| 355 | #define ACCESS_MODE_16BIT() \ | ||
| 356 | *((volatile unsigned short *) (MCF_MBAR + MCFSIM_LOCALCS)) = 0x0080 | ||
| 357 | #define ACCESS_MODE_8BIT() \ | ||
| 358 | *((volatile unsigned short *) (MCF_MBAR + MCFSIM_LOCALCS)) = 0x0040 | ||
| 359 | |||
| 360 | |||
| 361 | static IDE_INLINE void | ||
| 362 | ide_outw(unsigned int val, unsigned int addr) | ||
| 363 | { | ||
| 364 | ACCESS_MODE_16BIT(); | ||
| 365 | outw(val, addr); | ||
| 366 | ACCESS_MODE_8BIT(); | ||
| 367 | } | ||
| 368 | |||
| 369 | static IDE_INLINE void | ||
| 370 | ide_outsw(unsigned int addr, const void *vbuf, unsigned long len) | ||
| 371 | { | ||
| 372 | ACCESS_MODE_16BIT(); | ||
| 373 | outsw(addr, vbuf, len); | ||
| 374 | ACCESS_MODE_8BIT(); | ||
| 375 | } | ||
| 376 | |||
| 377 | static IDE_INLINE int | ||
| 378 | ide_inw(unsigned int addr) | ||
| 379 | { | ||
| 380 | int ret; | ||
| 381 | |||
| 382 | ACCESS_MODE_16BIT(); | ||
| 383 | ret = inw(addr); | ||
| 384 | ACCESS_MODE_8BIT(); | ||
| 385 | return(ret); | ||
| 386 | } | ||
| 387 | |||
| 388 | static IDE_INLINE void | ||
| 389 | ide_insw(unsigned int addr, void *vbuf, unsigned long len) | ||
| 390 | { | ||
| 391 | ACCESS_MODE_16BIT(); | ||
| 392 | insw(addr, vbuf, len); | ||
| 393 | ACCESS_MODE_8BIT(); | ||
| 394 | } | ||
| 395 | |||
| 396 | static IDE_INLINE void | ||
| 397 | ide_insl(unsigned int addr, void *vbuf, unsigned long len) | ||
| 398 | { | ||
| 399 | ACCESS_MODE_16BIT(); | ||
| 400 | insl(addr, vbuf, len); | ||
| 401 | ACCESS_MODE_8BIT(); | ||
| 402 | } | ||
| 403 | |||
| 404 | static IDE_INLINE void | ||
| 405 | ide_outsl(unsigned int addr, const void *vbuf, unsigned long len) | ||
| 406 | { | ||
| 407 | ACCESS_MODE_16BIT(); | ||
| 408 | outsl(addr, vbuf, len); | ||
| 409 | ACCESS_MODE_8BIT(); | ||
| 410 | } | ||
| 411 | |||
| 412 | #endif /* CONFIG_SECUREEDGEMP3 */ | ||
| 413 | |||
| 414 | #undef outw | ||
| 415 | #undef outw_p | ||
| 416 | #undef outsw | ||
| 417 | #undef inw | ||
| 418 | #undef inw_p | ||
| 419 | #undef insw | ||
| 420 | #undef insl | ||
| 421 | #undef outsl | ||
| 422 | |||
| 423 | #define outw(v, a) ide_outw(v, (unsigned long) (a)) | ||
| 424 | #define outw_p(v, a) ide_outw(v, (unsigned long) (a)) | ||
| 425 | #define outsw(a, b, n) ide_outsw((unsigned long) (a), b, n) | ||
| 426 | #define inw(a) ide_inw((unsigned long) (a)) | ||
| 427 | #define inw_p(a) ide_inw((unsigned long) (a)) | ||
| 428 | #define insw(a, b, n) ide_insw((unsigned long) (a), b, n) | ||
| 429 | #define insl(a, b, n) ide_insl((unsigned long) (a), b, n) | ||
| 430 | #define outsl(a, b, n) ide_outsl((unsigned long) (a), b, n) | ||
| 431 | |||
| 432 | #endif CONFIG_COLDFIRE | ||
| 433 | |||
| 434 | /****************************************************************************/ | ||
| 435 | #endif /* __KERNEL__ */ | ||
| 436 | #endif /* _M68KNOMMU_IDE_H */ | ||
| 437 | /****************************************************************************/ | ||
diff --git a/include/asm-m68knommu/io.h b/include/asm-m68knommu/io.h index 30fade4149b8..e08f2ee4b4a2 100644 --- a/include/asm-m68knommu/io.h +++ b/include/asm-m68knommu/io.h | |||
| @@ -147,19 +147,19 @@ static inline void io_insl(unsigned int addr, void *buf, int len) | |||
| 147 | extern void *__ioremap(unsigned long physaddr, unsigned long size, int cacheflag); | 147 | extern void *__ioremap(unsigned long physaddr, unsigned long size, int cacheflag); |
| 148 | extern void __iounmap(void *addr, unsigned long size); | 148 | extern void __iounmap(void *addr, unsigned long size); |
| 149 | 149 | ||
| 150 | extern inline void *ioremap(unsigned long physaddr, unsigned long size) | 150 | static inline void *ioremap(unsigned long physaddr, unsigned long size) |
| 151 | { | 151 | { |
| 152 | return __ioremap(physaddr, size, IOMAP_NOCACHE_SER); | 152 | return __ioremap(physaddr, size, IOMAP_NOCACHE_SER); |
| 153 | } | 153 | } |
| 154 | extern inline void *ioremap_nocache(unsigned long physaddr, unsigned long size) | 154 | static inline void *ioremap_nocache(unsigned long physaddr, unsigned long size) |
| 155 | { | 155 | { |
| 156 | return __ioremap(physaddr, size, IOMAP_NOCACHE_SER); | 156 | return __ioremap(physaddr, size, IOMAP_NOCACHE_SER); |
| 157 | } | 157 | } |
| 158 | extern inline void *ioremap_writethrough(unsigned long physaddr, unsigned long size) | 158 | static inline void *ioremap_writethrough(unsigned long physaddr, unsigned long size) |
| 159 | { | 159 | { |
| 160 | return __ioremap(physaddr, size, IOMAP_WRITETHROUGH); | 160 | return __ioremap(physaddr, size, IOMAP_WRITETHROUGH); |
| 161 | } | 161 | } |
| 162 | extern inline void *ioremap_fullcache(unsigned long physaddr, unsigned long size) | 162 | static inline void *ioremap_fullcache(unsigned long physaddr, unsigned long size) |
| 163 | { | 163 | { |
| 164 | return __ioremap(physaddr, size, IOMAP_FULL_CACHING); | 164 | return __ioremap(physaddr, size, IOMAP_FULL_CACHING); |
| 165 | } | 165 | } |
diff --git a/include/asm-m68knommu/m520xsim.h b/include/asm-m68knommu/m520xsim.h new file mode 100644 index 000000000000..6dc62869e62b --- /dev/null +++ b/include/asm-m68knommu/m520xsim.h | |||
| @@ -0,0 +1,54 @@ | |||
| 1 | /****************************************************************************/ | ||
| 2 | |||
| 3 | /* | ||
| 4 | * m520xsim.h -- ColdFire 5207/5208 System Integration Module support. | ||
| 5 | * | ||
| 6 | * (C) Copyright 2005, Intec Automation (mike@steroidmicros.com) | ||
| 7 | */ | ||
| 8 | |||
| 9 | /****************************************************************************/ | ||
| 10 | #ifndef m520xsim_h | ||
| 11 | #define m520xsim_h | ||
| 12 | /****************************************************************************/ | ||
| 13 | |||
| 14 | #include <linux/config.h> | ||
| 15 | |||
| 16 | /* | ||
| 17 | * Define the 5282 SIM register set addresses. | ||
| 18 | */ | ||
| 19 | #define MCFICM_INTC0 0x48000 /* Base for Interrupt Ctrl 0 */ | ||
| 20 | #define MCFINTC_IPRH 0x00 /* Interrupt pending 32-63 */ | ||
| 21 | #define MCFINTC_IPRL 0x04 /* Interrupt pending 1-31 */ | ||
| 22 | #define MCFINTC_IMRH 0x08 /* Interrupt mask 32-63 */ | ||
| 23 | #define MCFINTC_IMRL 0x0c /* Interrupt mask 1-31 */ | ||
| 24 | #define MCFINTC_INTFRCH 0x10 /* Interrupt force 32-63 */ | ||
| 25 | #define MCFINTC_INTFRCL 0x14 /* Interrupt force 1-31 */ | ||
| 26 | #define MCFINTC_ICR0 0x40 /* Base ICR register */ | ||
| 27 | |||
| 28 | #define MCFINT_VECBASE 64 | ||
| 29 | #define MCFINT_UART0 26 /* Interrupt number for UART0 */ | ||
| 30 | #define MCFINT_UART1 27 /* Interrupt number for UART1 */ | ||
| 31 | #define MCFINT_UART2 28 /* Interrupt number for UART2 */ | ||
| 32 | #define MCFINT_QSPI 31 /* Interrupt number for QSPI */ | ||
| 33 | #define MCFINT_PIT1 4 /* Interrupt number for PIT1 (PIT0 in processor) */ | ||
| 34 | |||
| 35 | |||
| 36 | #define MCF_GPIO_PAR_UART (0xA4036) | ||
| 37 | #define MCF_GPIO_PAR_FECI2C (0xA4033) | ||
| 38 | #define MCF_GPIO_PAR_FEC (0xA4038) | ||
| 39 | |||
| 40 | #define MCF_GPIO_PAR_UART_PAR_URXD0 (0x0001) | ||
| 41 | #define MCF_GPIO_PAR_UART_PAR_UTXD0 (0x0002) | ||
| 42 | |||
| 43 | #define MCF_GPIO_PAR_UART_PAR_URXD1 (0x0040) | ||
| 44 | #define MCF_GPIO_PAR_UART_PAR_UTXD1 (0x0080) | ||
| 45 | |||
| 46 | #define MCF_GPIO_PAR_FECI2C_PAR_SDA_URXD2 (0x02) | ||
| 47 | #define MCF_GPIO_PAR_FECI2C_PAR_SCL_UTXD2 (0x04) | ||
| 48 | |||
| 49 | #define ICR_INTRCONF 0x05 | ||
| 50 | #define MCFPIT_IMR MCFINTC_IMRL | ||
| 51 | #define MCFPIT_IMR_IBIT (1 << MCFINT_PIT1) | ||
| 52 | |||
| 53 | /****************************************************************************/ | ||
| 54 | #endif /* m520xsim_h */ | ||
diff --git a/include/asm-m68knommu/mcfcache.h b/include/asm-m68knommu/mcfcache.h index b17cd920977f..9cb401421835 100644 --- a/include/asm-m68knommu/mcfcache.h +++ b/include/asm-m68knommu/mcfcache.h | |||
| @@ -117,6 +117,20 @@ | |||
| 117 | .endm | 117 | .endm |
| 118 | #endif /* CONFIG_M5407 */ | 118 | #endif /* CONFIG_M5407 */ |
| 119 | 119 | ||
| 120 | #if defined(CONFIG_M520x) | ||
| 121 | .macro CACHE_ENABLE | ||
| 122 | move.l #0x01000000,%d0 /* invalidate whole cache */ | ||
| 123 | movec %d0,%CACR | ||
| 124 | nop | ||
| 125 | move.l #0x0000c000,%d0 /* set SDRAM cached (write-thru) */ | ||
| 126 | movec %d0,%ACR0 | ||
| 127 | move.l #0x00000000,%d0 /* no other regions cached */ | ||
| 128 | movec %d0,%ACR1 | ||
| 129 | move.l #0x80400000,%d0 /* enable 8K instruction cache */ | ||
| 130 | movec %d0,%CACR | ||
| 131 | nop | ||
| 132 | .endm | ||
| 133 | #endif /* CONFIG_M520x */ | ||
| 120 | 134 | ||
| 121 | /****************************************************************************/ | 135 | /****************************************************************************/ |
| 122 | #endif /* __M68KNOMMU_MCFCACHE_H */ | 136 | #endif /* __M68KNOMMU_MCFCACHE_H */ |
diff --git a/include/asm-m68knommu/mcfne.h b/include/asm-m68knommu/mcfne.h index 045875651e4d..a71b1c8cb4f8 100644 --- a/include/asm-m68knommu/mcfne.h +++ b/include/asm-m68knommu/mcfne.h | |||
| @@ -35,7 +35,7 @@ | |||
| 35 | * Define the basic hardware resources of NE2000 boards. | 35 | * Define the basic hardware resources of NE2000 boards. |
| 36 | */ | 36 | */ |
| 37 | 37 | ||
| 38 | #if defined(CONFIG_M5206) && defined(CONFIG_ARNEWSH) | 38 | #if defined(CONFIG_ARN5206) |
| 39 | #define NE2000_ADDR 0x40000300 | 39 | #define NE2000_ADDR 0x40000300 |
| 40 | #define NE2000_ODDOFFSET 0x00010000 | 40 | #define NE2000_ODDOFFSET 0x00010000 |
| 41 | #define NE2000_IRQ_VECTOR 0xf0 | 41 | #define NE2000_IRQ_VECTOR 0xf0 |
| @@ -44,7 +44,7 @@ | |||
| 44 | #define NE2000_BYTE volatile unsigned short | 44 | #define NE2000_BYTE volatile unsigned short |
| 45 | #endif | 45 | #endif |
| 46 | 46 | ||
| 47 | #if defined(CONFIG_M5206e) && defined(CONFIG_MOTOROLA) | 47 | #if defined(CONFIG_M5206eC3) |
| 48 | #define NE2000_ADDR 0x40000300 | 48 | #define NE2000_ADDR 0x40000300 |
| 49 | #define NE2000_ODDOFFSET 0x00010000 | 49 | #define NE2000_ODDOFFSET 0x00010000 |
| 50 | #define NE2000_IRQ_VECTOR 0x1c | 50 | #define NE2000_IRQ_VECTOR 0x1c |
| @@ -61,7 +61,7 @@ | |||
| 61 | #define NE2000_BYTE volatile unsigned char | 61 | #define NE2000_BYTE volatile unsigned char |
| 62 | #endif | 62 | #endif |
| 63 | 63 | ||
| 64 | #if defined(CONFIG_M5206e) && defined(CONFIG_CFV240) | 64 | #if defined(CONFIG_CFV240) |
| 65 | #define NE2000_ADDR 0x40010000 | 65 | #define NE2000_ADDR 0x40010000 |
| 66 | #define NE2000_ADDR1 0x40010001 | 66 | #define NE2000_ADDR1 0x40010001 |
| 67 | #define NE2000_ODDOFFSET 0x00000000 | 67 | #define NE2000_ODDOFFSET 0x00000000 |
| @@ -72,7 +72,7 @@ | |||
| 72 | #define NE2000_BYTE volatile unsigned char | 72 | #define NE2000_BYTE volatile unsigned char |
| 73 | #endif | 73 | #endif |
| 74 | 74 | ||
| 75 | #if defined(CONFIG_M5307) && defined(CONFIG_MOTOROLA) | 75 | #if defined(CONFIG_M5307C3) |
| 76 | #define NE2000_ADDR 0x40000300 | 76 | #define NE2000_ADDR 0x40000300 |
| 77 | #define NE2000_ODDOFFSET 0x00010000 | 77 | #define NE2000_ODDOFFSET 0x00010000 |
| 78 | #define NE2000_IRQ_VECTOR 0x1b | 78 | #define NE2000_IRQ_VECTOR 0x1b |
| @@ -114,7 +114,7 @@ | |||
| 114 | #define RSWAP(w) (((w) << 8) | ((w) >> 8)) | 114 | #define RSWAP(w) (((w) << 8) | ((w) >> 8)) |
| 115 | #endif | 115 | #endif |
| 116 | 116 | ||
| 117 | #if defined(CONFIG_M5307) && defined(CONFIG_ARNEWSH) | 117 | #if defined(CONFIG_ARN5307) |
| 118 | #define NE2000_ADDR 0xfe600300 | 118 | #define NE2000_ADDR 0xfe600300 |
| 119 | #define NE2000_ODDOFFSET 0x00010000 | 119 | #define NE2000_ODDOFFSET 0x00010000 |
| 120 | #define NE2000_IRQ_VECTOR 0x1b | 120 | #define NE2000_IRQ_VECTOR 0x1b |
| @@ -123,7 +123,7 @@ | |||
| 123 | #define NE2000_BYTE volatile unsigned short | 123 | #define NE2000_BYTE volatile unsigned short |
| 124 | #endif | 124 | #endif |
| 125 | 125 | ||
| 126 | #if defined(CONFIG_M5407) | 126 | #if defined(CONFIG_M5407C3) |
| 127 | #define NE2000_ADDR 0x40000300 | 127 | #define NE2000_ADDR 0x40000300 |
| 128 | #define NE2000_ODDOFFSET 0x00010000 | 128 | #define NE2000_ODDOFFSET 0x00010000 |
| 129 | #define NE2000_IRQ_VECTOR 0x1b | 129 | #define NE2000_IRQ_VECTOR 0x1b |
| @@ -264,7 +264,7 @@ void ne2000_outsw(unsigned int addr, const void *vbuf, unsigned long len) | |||
| 264 | * Minor differences between the different board types. | 264 | * Minor differences between the different board types. |
| 265 | */ | 265 | */ |
| 266 | 266 | ||
| 267 | #if defined(CONFIG_M5206) && defined(CONFIG_ARNEWSH) | 267 | #if defined(CONFIG_ARN5206) |
| 268 | void ne2000_irqsetup(int irq) | 268 | void ne2000_irqsetup(int irq) |
| 269 | { | 269 | { |
| 270 | volatile unsigned char *icrp; | 270 | volatile unsigned char *icrp; |
| @@ -275,7 +275,7 @@ void ne2000_irqsetup(int irq) | |||
| 275 | } | 275 | } |
| 276 | #endif | 276 | #endif |
| 277 | 277 | ||
| 278 | #if defined(CONFIG_M5206e) && defined(CONFIG_MOTOROLA) | 278 | #if defined(CONFIG_M5206eC3) |
| 279 | void ne2000_irqsetup(int irq) | 279 | void ne2000_irqsetup(int irq) |
| 280 | { | 280 | { |
| 281 | volatile unsigned char *icrp; | 281 | volatile unsigned char *icrp; |
| @@ -286,7 +286,7 @@ void ne2000_irqsetup(int irq) | |||
| 286 | } | 286 | } |
| 287 | #endif | 287 | #endif |
| 288 | 288 | ||
| 289 | #if defined(CONFIG_M5206e) && defined(CONFIG_CFV240) | 289 | #if defined(CONFIG_CFV240) |
| 290 | void ne2000_irqsetup(int irq) | 290 | void ne2000_irqsetup(int irq) |
| 291 | { | 291 | { |
| 292 | volatile unsigned char *icrp; | 292 | volatile unsigned char *icrp; |
diff --git a/include/asm-m68knommu/mcfpit.h b/include/asm-m68knommu/mcfpit.h index 4cc2e9fd6ad0..a685f1b45401 100644 --- a/include/asm-m68knommu/mcfpit.h +++ b/include/asm-m68knommu/mcfpit.h | |||
| @@ -14,13 +14,17 @@ | |||
| 14 | #include <linux/config.h> | 14 | #include <linux/config.h> |
| 15 | 15 | ||
| 16 | /* | 16 | /* |
| 17 | * Get address specific defines for the 5270/5271 and 5280/5282. | 17 | * Get address specific defines for the 5270/5271, 5280/5282, and 5208. |
| 18 | */ | 18 | */ |
| 19 | #if defined(CONFIG_M520x) | ||
| 20 | #define MCFPIT_BASE1 0x00080000 /* Base address of TIMER1 */ | ||
| 21 | #define MCFPIT_BASE2 0x00084000 /* Base address of TIMER2 */ | ||
| 22 | #else | ||
| 19 | #define MCFPIT_BASE1 0x00150000 /* Base address of TIMER1 */ | 23 | #define MCFPIT_BASE1 0x00150000 /* Base address of TIMER1 */ |
| 20 | #define MCFPIT_BASE2 0x00160000 /* Base address of TIMER2 */ | 24 | #define MCFPIT_BASE2 0x00160000 /* Base address of TIMER2 */ |
| 21 | #define MCFPIT_BASE3 0x00170000 /* Base address of TIMER3 */ | 25 | #define MCFPIT_BASE3 0x00170000 /* Base address of TIMER3 */ |
| 22 | #define MCFPIT_BASE4 0x00180000 /* Base address of TIMER4 */ | 26 | #define MCFPIT_BASE4 0x00180000 /* Base address of TIMER4 */ |
| 23 | 27 | #endif | |
| 24 | 28 | ||
| 25 | /* | 29 | /* |
| 26 | * Define the PIT timer register set addresses. | 30 | * Define the PIT timer register set addresses. |
diff --git a/include/asm-m68knommu/mcfsim.h b/include/asm-m68knommu/mcfsim.h index b0c7736f7a99..81d74a31dc43 100644 --- a/include/asm-m68knommu/mcfsim.h +++ b/include/asm-m68knommu/mcfsim.h | |||
| @@ -22,6 +22,8 @@ | |||
| 22 | #include <asm/m5204sim.h> | 22 | #include <asm/m5204sim.h> |
| 23 | #elif defined(CONFIG_M5206) || defined(CONFIG_M5206e) | 23 | #elif defined(CONFIG_M5206) || defined(CONFIG_M5206e) |
| 24 | #include <asm/m5206sim.h> | 24 | #include <asm/m5206sim.h> |
| 25 | #elif defined(CONFIG_M520x) | ||
| 26 | #include <asm/m520xsim.h> | ||
| 25 | #elif defined(CONFIG_M523x) | 27 | #elif defined(CONFIG_M523x) |
| 26 | #include <asm/m523xsim.h> | 28 | #include <asm/m523xsim.h> |
| 27 | #elif defined(CONFIG_M5249) | 29 | #elif defined(CONFIG_M5249) |
| @@ -99,6 +101,19 @@ | |||
| 99 | #define MCFSIM_IMR_MASKALL 0x3ffe /* All intr sources */ | 101 | #define MCFSIM_IMR_MASKALL 0x3ffe /* All intr sources */ |
| 100 | #endif | 102 | #endif |
| 101 | 103 | ||
| 104 | /* | ||
| 105 | * PIT interrupt settings, if not found in mXXXXsim.h file. | ||
| 106 | */ | ||
| 107 | #ifndef ICR_INTRCONF | ||
| 108 | #define ICR_INTRCONF 0x2b /* PIT1 level 5, priority 3 */ | ||
| 109 | #endif | ||
| 110 | #ifndef MCFPIT_IMR | ||
| 111 | #define MCFPIT_IMR MCFINTC_IMRH | ||
| 112 | #endif | ||
| 113 | #ifndef MCFPIT_IMR_IBIT | ||
| 114 | #define MCFPIT_IMR_IBIT (1 << (MCFINT_PIT1 - 32)) | ||
| 115 | #endif | ||
| 116 | |||
| 102 | 117 | ||
| 103 | #ifndef __ASSEMBLY__ | 118 | #ifndef __ASSEMBLY__ |
| 104 | /* | 119 | /* |
diff --git a/include/asm-m68knommu/mcfuart.h b/include/asm-m68knommu/mcfuart.h index 9c1210613bc7..b016fad83119 100644 --- a/include/asm-m68knommu/mcfuart.h +++ b/include/asm-m68knommu/mcfuart.h | |||
| @@ -41,6 +41,10 @@ | |||
| 41 | #define MCFUART_BASE1 0x1c0 /* Base address of UART1 */ | 41 | #define MCFUART_BASE1 0x1c0 /* Base address of UART1 */ |
| 42 | #define MCFUART_BASE2 0x200 /* Base address of UART2 */ | 42 | #define MCFUART_BASE2 0x200 /* Base address of UART2 */ |
| 43 | #endif | 43 | #endif |
| 44 | #elif defined(CONFIG_M520x) | ||
| 45 | #define MCFUART_BASE1 0x60000 /* Base address of UART1 */ | ||
| 46 | #define MCFUART_BASE2 0x64000 /* Base address of UART2 */ | ||
| 47 | #define MCFUART_BASE3 0x68000 /* Base address of UART2 */ | ||
| 44 | #endif | 48 | #endif |
| 45 | 49 | ||
| 46 | 50 | ||
diff --git a/include/asm-m68knommu/mcfwdebug.h b/include/asm-m68knommu/mcfwdebug.h index c425dd568155..6ceae103596b 100644 --- a/include/asm-m68knommu/mcfwdebug.h +++ b/include/asm-m68knommu/mcfwdebug.h | |||
| @@ -90,7 +90,7 @@ | |||
| 90 | * that the debug module instructions (2 longs) must be long word aligned and | 90 | * that the debug module instructions (2 longs) must be long word aligned and |
| 91 | * some pointer fiddling is performed to ensure this. | 91 | * some pointer fiddling is performed to ensure this. |
| 92 | */ | 92 | */ |
| 93 | extern inline void wdebug(int reg, unsigned long data) { | 93 | static inline void wdebug(int reg, unsigned long data) { |
| 94 | unsigned short dbg_spc[6]; | 94 | unsigned short dbg_spc[6]; |
| 95 | unsigned short *dbg; | 95 | unsigned short *dbg; |
| 96 | 96 | ||
diff --git a/include/asm-m68knommu/mmu_context.h b/include/asm-m68knommu/mmu_context.h index 9bc0fd49b8aa..1e080eca9ca8 100644 --- a/include/asm-m68knommu/mmu_context.h +++ b/include/asm-m68knommu/mmu_context.h | |||
| @@ -10,7 +10,7 @@ static inline void enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk) | |||
| 10 | { | 10 | { |
| 11 | } | 11 | } |
| 12 | 12 | ||
| 13 | extern inline int | 13 | static inline int |
| 14 | init_new_context(struct task_struct *tsk, struct mm_struct *mm) | 14 | init_new_context(struct task_struct *tsk, struct mm_struct *mm) |
| 15 | { | 15 | { |
| 16 | // mm->context = virt_to_phys(mm->pgd); | 16 | // mm->context = virt_to_phys(mm->pgd); |
| @@ -25,7 +25,7 @@ static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next, str | |||
| 25 | 25 | ||
| 26 | #define deactivate_mm(tsk,mm) do { } while (0) | 26 | #define deactivate_mm(tsk,mm) do { } while (0) |
| 27 | 27 | ||
| 28 | extern inline void activate_mm(struct mm_struct *prev_mm, | 28 | static inline void activate_mm(struct mm_struct *prev_mm, |
| 29 | struct mm_struct *next_mm) | 29 | struct mm_struct *next_mm) |
| 30 | { | 30 | { |
| 31 | } | 31 | } |
diff --git a/include/asm-m68knommu/processor.h b/include/asm-m68knommu/processor.h index 85a054e758b1..ba393b1a023b 100644 --- a/include/asm-m68knommu/processor.h +++ b/include/asm-m68knommu/processor.h | |||
| @@ -21,7 +21,7 @@ | |||
| 21 | #include <asm/ptrace.h> | 21 | #include <asm/ptrace.h> |
| 22 | #include <asm/current.h> | 22 | #include <asm/current.h> |
| 23 | 23 | ||
| 24 | extern inline unsigned long rdusp(void) | 24 | static inline unsigned long rdusp(void) |
| 25 | { | 25 | { |
| 26 | #ifdef CONFIG_COLDFIRE | 26 | #ifdef CONFIG_COLDFIRE |
| 27 | extern unsigned int sw_usp; | 27 | extern unsigned int sw_usp; |
| @@ -33,7 +33,7 @@ extern inline unsigned long rdusp(void) | |||
| 33 | #endif | 33 | #endif |
| 34 | } | 34 | } |
| 35 | 35 | ||
| 36 | extern inline void wrusp(unsigned long usp) | 36 | static inline void wrusp(unsigned long usp) |
| 37 | { | 37 | { |
| 38 | #ifdef CONFIG_COLDFIRE | 38 | #ifdef CONFIG_COLDFIRE |
| 39 | extern unsigned int sw_usp; | 39 | extern unsigned int sw_usp; |
diff --git a/include/asm-m68knommu/semaphore.h b/include/asm-m68knommu/semaphore.h index 17aee15906a6..5cc1fdd86f50 100644 --- a/include/asm-m68knommu/semaphore.h +++ b/include/asm-m68knommu/semaphore.h | |||
| @@ -41,7 +41,7 @@ struct semaphore { | |||
| 41 | #define DECLARE_MUTEX(name) __DECLARE_SEMAPHORE_GENERIC(name,1) | 41 | #define DECLARE_MUTEX(name) __DECLARE_SEMAPHORE_GENERIC(name,1) |
| 42 | #define DECLARE_MUTEX_LOCKED(name) __DECLARE_SEMAPHORE_GENERIC(name,0) | 42 | #define DECLARE_MUTEX_LOCKED(name) __DECLARE_SEMAPHORE_GENERIC(name,0) |
| 43 | 43 | ||
| 44 | extern inline void sema_init (struct semaphore *sem, int val) | 44 | static inline void sema_init (struct semaphore *sem, int val) |
| 45 | { | 45 | { |
| 46 | *sem = (struct semaphore)__SEMAPHORE_INITIALIZER(*sem, val); | 46 | *sem = (struct semaphore)__SEMAPHORE_INITIALIZER(*sem, val); |
| 47 | } | 47 | } |
| @@ -73,7 +73,7 @@ extern spinlock_t semaphore_wake_lock; | |||
| 73 | * "down_failed" is a special asm handler that calls the C | 73 | * "down_failed" is a special asm handler that calls the C |
| 74 | * routine that actually waits. See arch/m68k/lib/semaphore.S | 74 | * routine that actually waits. See arch/m68k/lib/semaphore.S |
| 75 | */ | 75 | */ |
| 76 | extern inline void down(struct semaphore * sem) | 76 | static inline void down(struct semaphore * sem) |
| 77 | { | 77 | { |
| 78 | might_sleep(); | 78 | might_sleep(); |
| 79 | __asm__ __volatile__( | 79 | __asm__ __volatile__( |
| @@ -88,7 +88,7 @@ extern inline void down(struct semaphore * sem) | |||
| 88 | : "cc", "%a0", "%a1", "memory"); | 88 | : "cc", "%a0", "%a1", "memory"); |
| 89 | } | 89 | } |
| 90 | 90 | ||
| 91 | extern inline int down_interruptible(struct semaphore * sem) | 91 | static inline int down_interruptible(struct semaphore * sem) |
| 92 | { | 92 | { |
| 93 | int ret; | 93 | int ret; |
| 94 | 94 | ||
| @@ -107,7 +107,7 @@ extern inline int down_interruptible(struct semaphore * sem) | |||
| 107 | return(ret); | 107 | return(ret); |
| 108 | } | 108 | } |
| 109 | 109 | ||
| 110 | extern inline int down_trylock(struct semaphore * sem) | 110 | static inline int down_trylock(struct semaphore * sem) |
| 111 | { | 111 | { |
| 112 | register struct semaphore *sem1 __asm__ ("%a1") = sem; | 112 | register struct semaphore *sem1 __asm__ ("%a1") = sem; |
| 113 | register int result __asm__ ("%d0"); | 113 | register int result __asm__ ("%d0"); |
| @@ -135,7 +135,7 @@ extern inline int down_trylock(struct semaphore * sem) | |||
| 135 | * The default case (no contention) will result in NO | 135 | * The default case (no contention) will result in NO |
| 136 | * jumps for both down() and up(). | 136 | * jumps for both down() and up(). |
| 137 | */ | 137 | */ |
| 138 | extern inline void up(struct semaphore * sem) | 138 | static inline void up(struct semaphore * sem) |
| 139 | { | 139 | { |
| 140 | __asm__ __volatile__( | 140 | __asm__ __volatile__( |
| 141 | "| atomic up operation\n\t" | 141 | "| atomic up operation\n\t" |
diff --git a/include/asm-m68knommu/system.h b/include/asm-m68knommu/system.h index 53cbbad0f130..6338afc850ba 100644 --- a/include/asm-m68knommu/system.h +++ b/include/asm-m68knommu/system.h | |||
| @@ -312,6 +312,19 @@ cmpxchg(volatile int *p, int old, int new) | |||
| 312 | moveb #0x80, (%a0); \ | 312 | moveb #0x80, (%a0); \ |
| 313 | "); \ | 313 | "); \ |
| 314 | }) | 314 | }) |
| 315 | #elif defined(CONFIG_M520x) | ||
| 316 | /* | ||
| 317 | * The MCF5208 has a bit (SOFTRST) in memory (Reset Control Register | ||
| 318 | * RCR), that when set, resets the MCF5208. | ||
| 319 | */ | ||
| 320 | #define HARD_RESET_NOW() \ | ||
| 321 | ({ \ | ||
| 322 | unsigned char volatile *reset; \ | ||
| 323 | asm("move.w #0x2700, %sr"); \ | ||
| 324 | reset = ((volatile unsigned short *)(MCF_IPSBAR + 0xA0000)); \ | ||
| 325 | while(1) \ | ||
| 326 | *reset |= 0x80; \ | ||
| 327 | }) | ||
| 315 | #else | 328 | #else |
| 316 | #define HARD_RESET_NOW() ({ \ | 329 | #define HARD_RESET_NOW() ({ \ |
| 317 | asm(" \ | 330 | asm(" \ |
diff --git a/include/asm-m68knommu/tlbflush.h b/include/asm-m68knommu/tlbflush.h index bf7004e1afe0..de858db28b00 100644 --- a/include/asm-m68knommu/tlbflush.h +++ b/include/asm-m68knommu/tlbflush.h | |||
| @@ -47,12 +47,12 @@ static inline void flush_tlb_range(struct mm_struct *mm, | |||
| 47 | BUG(); | 47 | BUG(); |
| 48 | } | 48 | } |
| 49 | 49 | ||
| 50 | extern inline void flush_tlb_kernel_page(unsigned long addr) | 50 | static inline void flush_tlb_kernel_page(unsigned long addr) |
| 51 | { | 51 | { |
| 52 | BUG(); | 52 | BUG(); |
| 53 | } | 53 | } |
| 54 | 54 | ||
| 55 | extern inline void flush_tlb_pgtables(struct mm_struct *mm, | 55 | static inline void flush_tlb_pgtables(struct mm_struct *mm, |
| 56 | unsigned long start, unsigned long end) | 56 | unsigned long start, unsigned long end) |
| 57 | { | 57 | { |
| 58 | BUG(); | 58 | BUG(); |
diff --git a/include/asm-ppc/mv64x60.h b/include/asm-ppc/mv64x60.h index ee2f9188cc64..4f2405b83612 100644 --- a/include/asm-ppc/mv64x60.h +++ b/include/asm-ppc/mv64x60.h | |||
| @@ -27,6 +27,8 @@ | |||
| 27 | #include <asm/pci-bridge.h> | 27 | #include <asm/pci-bridge.h> |
| 28 | #include <asm/mv64x60_defs.h> | 28 | #include <asm/mv64x60_defs.h> |
| 29 | 29 | ||
| 30 | struct platform_device; | ||
| 31 | |||
| 30 | extern u8 mv64x60_pci_exclude_bridge; | 32 | extern u8 mv64x60_pci_exclude_bridge; |
| 31 | 33 | ||
| 32 | extern spinlock_t mv64x60_lock; | 34 | extern spinlock_t mv64x60_lock; |
diff --git a/include/asm-x86_64/dma-mapping.h b/include/asm-x86_64/dma-mapping.h index 54a380efed41..36d16dfbac88 100644 --- a/include/asm-x86_64/dma-mapping.h +++ b/include/asm-x86_64/dma-mapping.h | |||
| @@ -85,10 +85,33 @@ static inline void dma_sync_single_for_device(struct device *hwdev, | |||
| 85 | flush_write_buffers(); | 85 | flush_write_buffers(); |
| 86 | } | 86 | } |
| 87 | 87 | ||
| 88 | #define dma_sync_single_range_for_cpu(dev, dma_handle, offset, size, dir) \ | 88 | static inline void dma_sync_single_range_for_cpu(struct device *hwdev, |
| 89 | dma_sync_single_for_cpu(dev, dma_handle, size, dir) | 89 | dma_addr_t dma_handle, |
| 90 | #define dma_sync_single_range_for_device(dev, dma_handle, offset, size, dir) \ | 90 | unsigned long offset, |
| 91 | dma_sync_single_for_device(dev, dma_handle, size, dir) | 91 | size_t size, int direction) |
| 92 | { | ||
| 93 | if (direction == DMA_NONE) | ||
| 94 | out_of_line_bug(); | ||
| 95 | |||
| 96 | if (swiotlb) | ||
| 97 | return swiotlb_sync_single_range_for_cpu(hwdev,dma_handle,offset,size,direction); | ||
| 98 | |||
| 99 | flush_write_buffers(); | ||
| 100 | } | ||
| 101 | |||
| 102 | static inline void dma_sync_single_range_for_device(struct device *hwdev, | ||
| 103 | dma_addr_t dma_handle, | ||
| 104 | unsigned long offset, | ||
| 105 | size_t size, int direction) | ||
| 106 | { | ||
| 107 | if (direction == DMA_NONE) | ||
| 108 | out_of_line_bug(); | ||
| 109 | |||
| 110 | if (swiotlb) | ||
| 111 | return swiotlb_sync_single_range_for_device(hwdev,dma_handle,offset,size,direction); | ||
| 112 | |||
| 113 | flush_write_buffers(); | ||
| 114 | } | ||
| 92 | 115 | ||
| 93 | static inline void dma_sync_sg_for_cpu(struct device *hwdev, | 116 | static inline void dma_sync_sg_for_cpu(struct device *hwdev, |
| 94 | struct scatterlist *sg, | 117 | struct scatterlist *sg, |
diff --git a/include/asm-x86_64/swiotlb.h b/include/asm-x86_64/swiotlb.h index 7cbfd10ecc3c..dddf1b218681 100644 --- a/include/asm-x86_64/swiotlb.h +++ b/include/asm-x86_64/swiotlb.h | |||
| @@ -15,6 +15,14 @@ extern void swiotlb_sync_single_for_cpu(struct device *hwdev, | |||
| 15 | extern void swiotlb_sync_single_for_device(struct device *hwdev, | 15 | extern void swiotlb_sync_single_for_device(struct device *hwdev, |
| 16 | dma_addr_t dev_addr, | 16 | dma_addr_t dev_addr, |
| 17 | size_t size, int dir); | 17 | size_t size, int dir); |
| 18 | extern void swiotlb_sync_single_range_for_cpu(struct device *hwdev, | ||
| 19 | dma_addr_t dev_addr, | ||
| 20 | unsigned long offset, | ||
| 21 | size_t size, int dir); | ||
| 22 | extern void swiotlb_sync_single_range_for_device(struct device *hwdev, | ||
| 23 | dma_addr_t dev_addr, | ||
| 24 | unsigned long offset, | ||
| 25 | size_t size, int dir); | ||
| 18 | extern void swiotlb_sync_sg_for_cpu(struct device *hwdev, | 26 | extern void swiotlb_sync_sg_for_cpu(struct device *hwdev, |
| 19 | struct scatterlist *sg, int nelems, | 27 | struct scatterlist *sg, int nelems, |
| 20 | int dir); | 28 | int dir); |
diff --git a/include/linux/genhd.h b/include/linux/genhd.h index eabdb5cce357..8eeaa53a68c9 100644 --- a/include/linux/genhd.h +++ b/include/linux/genhd.h | |||
| @@ -78,7 +78,7 @@ struct hd_struct { | |||
| 78 | sector_t start_sect; | 78 | sector_t start_sect; |
| 79 | sector_t nr_sects; | 79 | sector_t nr_sects; |
| 80 | struct kobject kobj; | 80 | struct kobject kobj; |
| 81 | unsigned reads, read_sectors, writes, write_sectors; | 81 | unsigned ios[2], sectors[2]; |
| 82 | int policy, partno; | 82 | int policy, partno; |
| 83 | }; | 83 | }; |
| 84 | 84 | ||
| @@ -89,10 +89,10 @@ struct hd_struct { | |||
| 89 | #define GENHD_FL_SUPPRESS_PARTITION_INFO 32 | 89 | #define GENHD_FL_SUPPRESS_PARTITION_INFO 32 |
| 90 | 90 | ||
| 91 | struct disk_stats { | 91 | struct disk_stats { |
| 92 | unsigned read_sectors, write_sectors; | 92 | unsigned sectors[2]; |
| 93 | unsigned reads, writes; | 93 | unsigned ios[2]; |
| 94 | unsigned read_merges, write_merges; | 94 | unsigned merges[2]; |
| 95 | unsigned read_ticks, write_ticks; | 95 | unsigned ticks[2]; |
| 96 | unsigned io_ticks; | 96 | unsigned io_ticks; |
| 97 | unsigned time_in_queue; | 97 | unsigned time_in_queue; |
| 98 | }; | 98 | }; |
diff --git a/include/linux/netfilter_arp/arp_tables.h b/include/linux/netfilter_arp/arp_tables.h index d759a637bded..e98a870a20be 100644 --- a/include/linux/netfilter_arp/arp_tables.h +++ b/include/linux/netfilter_arp/arp_tables.h | |||
| @@ -68,7 +68,8 @@ struct arpt_entry_target | |||
| 68 | u_int16_t target_size; | 68 | u_int16_t target_size; |
| 69 | 69 | ||
| 70 | /* Used by userspace */ | 70 | /* Used by userspace */ |
| 71 | char name[ARPT_FUNCTION_MAXNAMELEN]; | 71 | char name[ARPT_FUNCTION_MAXNAMELEN-1]; |
| 72 | u_int8_t revision; | ||
| 72 | } user; | 73 | } user; |
| 73 | struct { | 74 | struct { |
| 74 | u_int16_t target_size; | 75 | u_int16_t target_size; |
| @@ -148,7 +149,9 @@ struct arpt_entry | |||
| 148 | 149 | ||
| 149 | #define ARPT_SO_GET_INFO (ARPT_BASE_CTL) | 150 | #define ARPT_SO_GET_INFO (ARPT_BASE_CTL) |
| 150 | #define ARPT_SO_GET_ENTRIES (ARPT_BASE_CTL + 1) | 151 | #define ARPT_SO_GET_ENTRIES (ARPT_BASE_CTL + 1) |
| 151 | #define ARPT_SO_GET_MAX ARPT_SO_GET_ENTRIES | 152 | /* #define ARPT_SO_GET_REVISION_MATCH (ARPT_BASE_CTL + 2)*/ |
| 153 | #define ARPT_SO_GET_REVISION_TARGET (ARPT_BASE_CTL + 3) | ||
| 154 | #define ARPT_SO_GET_MAX ARPT_SO_GET_REVISION_TARGET | ||
| 152 | 155 | ||
| 153 | /* CONTINUE verdict for targets */ | 156 | /* CONTINUE verdict for targets */ |
| 154 | #define ARPT_CONTINUE 0xFFFFFFFF | 157 | #define ARPT_CONTINUE 0xFFFFFFFF |
| @@ -236,6 +239,15 @@ struct arpt_get_entries | |||
| 236 | struct arpt_entry entrytable[0]; | 239 | struct arpt_entry entrytable[0]; |
| 237 | }; | 240 | }; |
| 238 | 241 | ||
| 242 | /* The argument to ARPT_SO_GET_REVISION_*. Returns highest revision | ||
| 243 | * kernel supports, if >= revision. */ | ||
| 244 | struct arpt_get_revision | ||
| 245 | { | ||
| 246 | char name[ARPT_FUNCTION_MAXNAMELEN-1]; | ||
| 247 | |||
| 248 | u_int8_t revision; | ||
| 249 | }; | ||
| 250 | |||
| 239 | /* Standard return verdict, or do jump. */ | 251 | /* Standard return verdict, or do jump. */ |
| 240 | #define ARPT_STANDARD_TARGET "" | 252 | #define ARPT_STANDARD_TARGET "" |
| 241 | /* Error verdict. */ | 253 | /* Error verdict. */ |
| @@ -274,7 +286,9 @@ struct arpt_target | |||
| 274 | { | 286 | { |
| 275 | struct list_head list; | 287 | struct list_head list; |
| 276 | 288 | ||
| 277 | const char name[ARPT_FUNCTION_MAXNAMELEN]; | 289 | const char name[ARPT_FUNCTION_MAXNAMELEN-1]; |
| 290 | |||
| 291 | u_int8_t revision; | ||
| 278 | 292 | ||
| 279 | /* Returns verdict. */ | 293 | /* Returns verdict. */ |
| 280 | unsigned int (*target)(struct sk_buff **pskb, | 294 | unsigned int (*target)(struct sk_buff **pskb, |
diff --git a/include/linux/netfilter_ipv6/ip6_tables.h b/include/linux/netfilter_ipv6/ip6_tables.h index 59f70b34e029..2efc046d9e94 100644 --- a/include/linux/netfilter_ipv6/ip6_tables.h +++ b/include/linux/netfilter_ipv6/ip6_tables.h | |||
| @@ -57,7 +57,8 @@ struct ip6t_entry_match | |||
| 57 | u_int16_t match_size; | 57 | u_int16_t match_size; |
| 58 | 58 | ||
| 59 | /* Used by userspace */ | 59 | /* Used by userspace */ |
| 60 | char name[IP6T_FUNCTION_MAXNAMELEN]; | 60 | char name[IP6T_FUNCTION_MAXNAMELEN-1]; |
| 61 | u_int8_t revision; | ||
| 61 | } user; | 62 | } user; |
| 62 | struct { | 63 | struct { |
| 63 | u_int16_t match_size; | 64 | u_int16_t match_size; |
| @@ -80,7 +81,8 @@ struct ip6t_entry_target | |||
| 80 | u_int16_t target_size; | 81 | u_int16_t target_size; |
| 81 | 82 | ||
| 82 | /* Used by userspace */ | 83 | /* Used by userspace */ |
| 83 | char name[IP6T_FUNCTION_MAXNAMELEN]; | 84 | char name[IP6T_FUNCTION_MAXNAMELEN-1]; |
| 85 | u_int8_t revision; | ||
| 84 | } user; | 86 | } user; |
| 85 | struct { | 87 | struct { |
| 86 | u_int16_t target_size; | 88 | u_int16_t target_size; |
| @@ -161,7 +163,9 @@ struct ip6t_entry | |||
| 161 | 163 | ||
| 162 | #define IP6T_SO_GET_INFO (IP6T_BASE_CTL) | 164 | #define IP6T_SO_GET_INFO (IP6T_BASE_CTL) |
| 163 | #define IP6T_SO_GET_ENTRIES (IP6T_BASE_CTL + 1) | 165 | #define IP6T_SO_GET_ENTRIES (IP6T_BASE_CTL + 1) |
| 164 | #define IP6T_SO_GET_MAX IP6T_SO_GET_ENTRIES | 166 | #define IP6T_SO_GET_REVISION_MATCH (IP6T_BASE_CTL + 2) |
| 167 | #define IP6T_SO_GET_REVISION_TARGET (IP6T_BASE_CTL + 3) | ||
| 168 | #define IP6T_SO_GET_MAX IP6T_SO_GET_REVISION_TARGET | ||
| 165 | 169 | ||
| 166 | /* CONTINUE verdict for targets */ | 170 | /* CONTINUE verdict for targets */ |
| 167 | #define IP6T_CONTINUE 0xFFFFFFFF | 171 | #define IP6T_CONTINUE 0xFFFFFFFF |
| @@ -291,6 +295,15 @@ struct ip6t_get_entries | |||
| 291 | struct ip6t_entry entrytable[0]; | 295 | struct ip6t_entry entrytable[0]; |
| 292 | }; | 296 | }; |
| 293 | 297 | ||
| 298 | /* The argument to IP6T_SO_GET_REVISION_*. Returns highest revision | ||
| 299 | * kernel supports, if >= revision. */ | ||
| 300 | struct ip6t_get_revision | ||
| 301 | { | ||
| 302 | char name[IP6T_FUNCTION_MAXNAMELEN-1]; | ||
| 303 | |||
| 304 | u_int8_t revision; | ||
| 305 | }; | ||
| 306 | |||
| 294 | /* Standard return verdict, or do jump. */ | 307 | /* Standard return verdict, or do jump. */ |
| 295 | #define IP6T_STANDARD_TARGET "" | 308 | #define IP6T_STANDARD_TARGET "" |
| 296 | /* Error verdict. */ | 309 | /* Error verdict. */ |
| @@ -352,7 +365,9 @@ struct ip6t_match | |||
| 352 | { | 365 | { |
| 353 | struct list_head list; | 366 | struct list_head list; |
| 354 | 367 | ||
| 355 | const char name[IP6T_FUNCTION_MAXNAMELEN]; | 368 | const char name[IP6T_FUNCTION_MAXNAMELEN-1]; |
| 369 | |||
| 370 | u_int8_t revision; | ||
| 356 | 371 | ||
| 357 | /* Return true or false: return FALSE and set *hotdrop = 1 to | 372 | /* Return true or false: return FALSE and set *hotdrop = 1 to |
| 358 | force immediate packet drop. */ | 373 | force immediate packet drop. */ |
| @@ -387,7 +402,9 @@ struct ip6t_target | |||
| 387 | { | 402 | { |
| 388 | struct list_head list; | 403 | struct list_head list; |
| 389 | 404 | ||
| 390 | const char name[IP6T_FUNCTION_MAXNAMELEN]; | 405 | const char name[IP6T_FUNCTION_MAXNAMELEN-1]; |
| 406 | |||
| 407 | u_int8_t revision; | ||
| 391 | 408 | ||
| 392 | /* Returns verdict. Argument order changed since 2.6.9, as this | 409 | /* Returns verdict. Argument order changed since 2.6.9, as this |
| 393 | must now handle non-linear skbs, using skb_copy_bits and | 410 | must now handle non-linear skbs, using skb_copy_bits and |
diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h index 2b0401b93f2b..9d2579230689 100644 --- a/include/linux/serial_core.h +++ b/include/linux/serial_core.h | |||
| @@ -39,8 +39,7 @@ | |||
| 39 | #define PORT_RSA 13 | 39 | #define PORT_RSA 13 |
| 40 | #define PORT_NS16550A 14 | 40 | #define PORT_NS16550A 14 |
| 41 | #define PORT_XSCALE 15 | 41 | #define PORT_XSCALE 15 |
| 42 | #define PORT_IP3106 16 | 42 | #define PORT_MAX_8250 15 /* max port ID */ |
| 43 | #define PORT_MAX_8250 16 /* max port ID */ | ||
| 44 | 43 | ||
| 45 | /* | 44 | /* |
| 46 | * ARM specific type numbers. These are not currently guaranteed | 45 | * ARM specific type numbers. These are not currently guaranteed |
| @@ -118,7 +117,9 @@ | |||
| 118 | #define PORT_M32R_SIO 68 | 117 | #define PORT_M32R_SIO 68 |
| 119 | 118 | ||
| 120 | /*Digi jsm */ | 119 | /*Digi jsm */ |
| 121 | #define PORT_JSM 65 | 120 | #define PORT_JSM 69 |
| 121 | |||
| 122 | #define PORT_IP3106 70 | ||
| 122 | 123 | ||
| 123 | #ifdef __KERNEL__ | 124 | #ifdef __KERNEL__ |
| 124 | 125 | ||
