diff options
| -rw-r--r-- | arch/arm/Kconfig | 5 | ||||
| -rw-r--r-- | arch/arm/mach-clps711x/include/mach/memory.h | 2 | ||||
| -rw-r--r-- | arch/arm/mach-footbridge/common.c | 22 | ||||
| -rw-r--r-- | arch/arm/mach-footbridge/include/mach/memory.h | 15 | ||||
| -rw-r--r-- | arch/arm/mach-integrator/include/mach/memory.h | 3 | ||||
| -rw-r--r-- | arch/arm/mach-ixp2000/include/mach/memory.h | 12 | ||||
| -rw-r--r-- | arch/arm/mach-ixp23xx/include/mach/memory.h | 19 | ||||
| -rw-r--r-- | arch/arm/mach-lh7a40x/clocks.c | 8 | ||||
| -rw-r--r-- | arch/arm/mach-s3c24a0/include/mach/memory.h | 2 | ||||
| -rw-r--r-- | arch/arm/mach-sa1100/Kconfig | 13 | ||||
| -rw-r--r-- | arch/arm/mach-sa1100/generic.c | 12 | ||||
| -rw-r--r-- | arch/arm/vfp/vfpmodule.c | 83 | ||||
| -rw-r--r-- | drivers/pcmcia/pxa2xx_base.c | 16 | ||||
| -rw-r--r-- | drivers/pcmcia/pxa2xx_base.h | 3 | ||||
| -rw-r--r-- | drivers/pcmcia/pxa2xx_palmtc.c | 2 | ||||
| -rw-r--r-- | drivers/pcmcia/pxa2xx_stargate2.c | 2 |
16 files changed, 134 insertions, 85 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index cf8a99f19dc4..233a222752c0 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig | |||
| @@ -603,6 +603,7 @@ config ARCH_SA1100 | |||
| 603 | select ARCH_SPARSEMEM_ENABLE | 603 | select ARCH_SPARSEMEM_ENABLE |
| 604 | select ARCH_MTD_XIP | 604 | select ARCH_MTD_XIP |
| 605 | select ARCH_HAS_CPUFREQ | 605 | select ARCH_HAS_CPUFREQ |
| 606 | select CPU_FREQ | ||
| 606 | select GENERIC_GPIO | 607 | select GENERIC_GPIO |
| 607 | select GENERIC_TIME | 608 | select GENERIC_TIME |
| 608 | select GENERIC_CLOCKEVENTS | 609 | select GENERIC_CLOCKEVENTS |
| @@ -1359,13 +1360,9 @@ source "drivers/cpufreq/Kconfig" | |||
| 1359 | 1360 | ||
| 1360 | config CPU_FREQ_SA1100 | 1361 | config CPU_FREQ_SA1100 |
| 1361 | bool | 1362 | bool |
| 1362 | depends on CPU_FREQ && (SA1100_H3100 || SA1100_H3600 || SA1100_LART || SA1100_PLEB || SA1100_BADGE4 || SA1100_HACKKIT) | ||
| 1363 | default y | ||
| 1364 | 1363 | ||
| 1365 | config CPU_FREQ_SA1110 | 1364 | config CPU_FREQ_SA1110 |
| 1366 | bool | 1365 | bool |
| 1367 | depends on CPU_FREQ && (SA1100_ASSABET || SA1100_CERF || SA1100_PT_SYSTEM3) | ||
| 1368 | default y | ||
| 1369 | 1366 | ||
| 1370 | config CPU_FREQ_INTEGRATOR | 1367 | config CPU_FREQ_INTEGRATOR |
| 1371 | tristate "CPUfreq driver for ARM Integrator CPUs" | 1368 | tristate "CPUfreq driver for ARM Integrator CPUs" |
diff --git a/arch/arm/mach-clps711x/include/mach/memory.h b/arch/arm/mach-clps711x/include/mach/memory.h index e522b20bcbc2..f70d52be48a2 100644 --- a/arch/arm/mach-clps711x/include/mach/memory.h +++ b/arch/arm/mach-clps711x/include/mach/memory.h | |||
| @@ -30,6 +30,8 @@ | |||
| 30 | 30 | ||
| 31 | #define __virt_to_bus(x) ((x) - PAGE_OFFSET) | 31 | #define __virt_to_bus(x) ((x) - PAGE_OFFSET) |
| 32 | #define __bus_to_virt(x) ((x) + PAGE_OFFSET) | 32 | #define __bus_to_virt(x) ((x) + PAGE_OFFSET) |
| 33 | #define __pfn_to_bus(x) (__pfn_to_phys(x) - PHYS_OFFSET) | ||
| 34 | #define __bus_to_pfn(x) __phys_to_pfn((x) + PHYS_OFFSET) | ||
| 33 | 35 | ||
| 34 | #endif | 36 | #endif |
| 35 | 37 | ||
diff --git a/arch/arm/mach-footbridge/common.c b/arch/arm/mach-footbridge/common.c index b97f529e58e8..41febc796b1c 100644 --- a/arch/arm/mach-footbridge/common.c +++ b/arch/arm/mach-footbridge/common.c | |||
| @@ -201,6 +201,11 @@ void __init footbridge_map_io(void) | |||
| 201 | 201 | ||
| 202 | #ifdef CONFIG_FOOTBRIDGE_ADDIN | 202 | #ifdef CONFIG_FOOTBRIDGE_ADDIN |
| 203 | 203 | ||
| 204 | static inline unsigned long fb_bus_sdram_offset(void) | ||
| 205 | { | ||
| 206 | return *CSR_PCISDRAMBASE & 0xfffffff0; | ||
| 207 | } | ||
| 208 | |||
| 204 | /* | 209 | /* |
| 205 | * These two functions convert virtual addresses to PCI addresses and PCI | 210 | * These two functions convert virtual addresses to PCI addresses and PCI |
| 206 | * addresses to virtual addresses. Note that it is only legal to use these | 211 | * addresses to virtual addresses. Note that it is only legal to use these |
| @@ -210,14 +215,13 @@ unsigned long __virt_to_bus(unsigned long res) | |||
| 210 | { | 215 | { |
| 211 | WARN_ON(res < PAGE_OFFSET || res >= (unsigned long)high_memory); | 216 | WARN_ON(res < PAGE_OFFSET || res >= (unsigned long)high_memory); |
| 212 | 217 | ||
| 213 | return (res - PAGE_OFFSET) + (*CSR_PCISDRAMBASE & 0xfffffff0); | 218 | return res + (fb_bus_sdram_offset() - PAGE_OFFSET); |
| 214 | } | 219 | } |
| 215 | EXPORT_SYMBOL(__virt_to_bus); | 220 | EXPORT_SYMBOL(__virt_to_bus); |
| 216 | 221 | ||
| 217 | unsigned long __bus_to_virt(unsigned long res) | 222 | unsigned long __bus_to_virt(unsigned long res) |
| 218 | { | 223 | { |
| 219 | res -= (*CSR_PCISDRAMBASE & 0xfffffff0); | 224 | res = res - (fb_bus_sdram_offset() - PAGE_OFFSET); |
| 220 | res += PAGE_OFFSET; | ||
| 221 | 225 | ||
| 222 | WARN_ON(res < PAGE_OFFSET || res >= (unsigned long)high_memory); | 226 | WARN_ON(res < PAGE_OFFSET || res >= (unsigned long)high_memory); |
| 223 | 227 | ||
| @@ -225,4 +229,16 @@ unsigned long __bus_to_virt(unsigned long res) | |||
| 225 | } | 229 | } |
| 226 | EXPORT_SYMBOL(__bus_to_virt); | 230 | EXPORT_SYMBOL(__bus_to_virt); |
| 227 | 231 | ||
| 232 | unsigned long __pfn_to_bus(unsigned long pfn) | ||
| 233 | { | ||
| 234 | return __pfn_to_phys(pfn) + (fb_bus_sdram_offset() - PHYS_OFFSET)); | ||
| 235 | } | ||
| 236 | EXPORT_SYMBOL(__pfn_to_bus); | ||
| 237 | |||
| 238 | unsigned long __bus_to_pfn(unsigned long bus) | ||
| 239 | { | ||
| 240 | return __phys_to_pfn(bus - (fb_bus_sdram_offset() - PHYS_OFFSET)); | ||
| 241 | } | ||
| 242 | EXPORT_SYMBOL(__bus_to_pfn); | ||
| 243 | |||
| 228 | #endif | 244 | #endif |
diff --git a/arch/arm/mach-footbridge/include/mach/memory.h b/arch/arm/mach-footbridge/include/mach/memory.h index cb16e59d87b6..8d64f4574087 100644 --- a/arch/arm/mach-footbridge/include/mach/memory.h +++ b/arch/arm/mach-footbridge/include/mach/memory.h | |||
| @@ -29,6 +29,8 @@ | |||
| 29 | #ifndef __ASSEMBLY__ | 29 | #ifndef __ASSEMBLY__ |
| 30 | extern unsigned long __virt_to_bus(unsigned long); | 30 | extern unsigned long __virt_to_bus(unsigned long); |
| 31 | extern unsigned long __bus_to_virt(unsigned long); | 31 | extern unsigned long __bus_to_virt(unsigned long); |
| 32 | extern unsigned long __pfn_to_bus(unsigned long); | ||
| 33 | extern unsigned long __bus_to_pfn(unsigned long); | ||
| 32 | #endif | 34 | #endif |
| 33 | #define __virt_to_bus __virt_to_bus | 35 | #define __virt_to_bus __virt_to_bus |
| 34 | #define __bus_to_virt __bus_to_virt | 36 | #define __bus_to_virt __bus_to_virt |
| @@ -36,14 +38,15 @@ extern unsigned long __bus_to_virt(unsigned long); | |||
| 36 | #elif defined(CONFIG_FOOTBRIDGE_HOST) | 38 | #elif defined(CONFIG_FOOTBRIDGE_HOST) |
| 37 | 39 | ||
| 38 | /* | 40 | /* |
| 39 | * The footbridge is programmed to expose the system RAM at the corresponding | 41 | * The footbridge is programmed to expose the system RAM at 0xe0000000. |
| 40 | * address. So, if PAGE_OFFSET is 0xc0000000, RAM appears at 0xe0000000. | 42 | * The requirement is that the RAM isn't placed at bus address 0, which |
| 41 | * If 0x80000000, then its exposed at 0xa0000000 on the bus. etc. | ||
| 42 | * The only requirement is that the RAM isn't placed at bus address 0 which | ||
| 43 | * would clash with VGA cards. | 43 | * would clash with VGA cards. |
| 44 | */ | 44 | */ |
| 45 | #define __virt_to_bus(x) ((x) - 0xe0000000) | 45 | #define BUS_OFFSET 0xe0000000 |
| 46 | #define __bus_to_virt(x) ((x) + 0xe0000000) | 46 | #define __virt_to_bus(x) ((x) + (BUS_OFFSET - PAGE_OFFSET)) |
| 47 | #define __bus_to_virt(x) ((x) - (BUS_OFFSET - PAGE_OFFSET)) | ||
| 48 | #define __pfn_to_bus(x) (__pfn_to_phys(x) + (BUS_OFFSET - PHYS_OFFSET)) | ||
| 49 | #define __bus_to_pfn(x) __phys_to_pfn((x) - (BUS_OFFSET - PHYS_OFFSET)) | ||
| 47 | 50 | ||
| 48 | #else | 51 | #else |
| 49 | 52 | ||
diff --git a/arch/arm/mach-integrator/include/mach/memory.h b/arch/arm/mach-integrator/include/mach/memory.h index 4891828454f5..991f24d2c115 100644 --- a/arch/arm/mach-integrator/include/mach/memory.h +++ b/arch/arm/mach-integrator/include/mach/memory.h | |||
| @@ -28,6 +28,7 @@ | |||
| 28 | #define BUS_OFFSET UL(0x80000000) | 28 | #define BUS_OFFSET UL(0x80000000) |
| 29 | #define __virt_to_bus(x) ((x) - PAGE_OFFSET + BUS_OFFSET) | 29 | #define __virt_to_bus(x) ((x) - PAGE_OFFSET + BUS_OFFSET) |
| 30 | #define __bus_to_virt(x) ((x) - BUS_OFFSET + PAGE_OFFSET) | 30 | #define __bus_to_virt(x) ((x) - BUS_OFFSET + PAGE_OFFSET) |
| 31 | #define __pfn_to_bus(x) (((x) << PAGE_SHIFT) + BUS_OFFSET) | 31 | #define __pfn_to_bus(x) (__pfn_to_phys(x) + (BUS_OFFSET - PHYS_OFFSET)) |
| 32 | #define __bus_to_pfn(x) __phys_to_pfn((x) - (BUS_OFFSET - PHYS_OFFSET)) | ||
| 32 | 33 | ||
| 33 | #endif | 34 | #endif |
diff --git a/arch/arm/mach-ixp2000/include/mach/memory.h b/arch/arm/mach-ixp2000/include/mach/memory.h index aee7eb8a71b2..98e3471be15b 100644 --- a/arch/arm/mach-ixp2000/include/mach/memory.h +++ b/arch/arm/mach-ixp2000/include/mach/memory.h | |||
| @@ -17,11 +17,15 @@ | |||
| 17 | 17 | ||
| 18 | #include <mach/ixp2000-regs.h> | 18 | #include <mach/ixp2000-regs.h> |
| 19 | 19 | ||
| 20 | #define __virt_to_bus(v) \ | 20 | #define IXP2000_PCI_SDRAM_OFFSET (*IXP2000_PCI_SDRAM_BAR & 0xfffffff0) |
| 21 | (((__virt_to_phys(v) - 0x0) + (*IXP2000_PCI_SDRAM_BAR & 0xfffffff0))) | ||
| 22 | 21 | ||
| 23 | #define __bus_to_virt(b) \ | 22 | #define __phys_to_bus(x) ((x) + (IXP2000_PCI_SDRAM_OFFSET - PHYS_OFFSET)) |
| 24 | __phys_to_virt((((b - (*IXP2000_PCI_SDRAM_BAR & 0xfffffff0)) + 0x0))) | 23 | #define __bus_to_phys(x) ((x) - (IXP2000_PCI_SDRAM_OFFSET - PHYS_OFFSET)) |
| 24 | |||
| 25 | #define __virt_to_bus(v) __phys_to_bus(__virt_to_phys(v)) | ||
| 26 | #define __bus_to_virt(b) __phys_to_virt(__bus_to_phys(b)) | ||
| 27 | #define __pfn_to_bus(p) __phys_to_bus(__pfn_to_phys(p)) | ||
| 28 | #define __bus_to_pfn(b) __phys_to_pfn(__bus_to_phys(b)) | ||
| 25 | 29 | ||
| 26 | #endif | 30 | #endif |
| 27 | 31 | ||
diff --git a/arch/arm/mach-ixp23xx/include/mach/memory.h b/arch/arm/mach-ixp23xx/include/mach/memory.h index fdd138706c70..94a3a86cfeb8 100644 --- a/arch/arm/mach-ixp23xx/include/mach/memory.h +++ b/arch/arm/mach-ixp23xx/include/mach/memory.h | |||
| @@ -19,16 +19,15 @@ | |||
| 19 | */ | 19 | */ |
| 20 | #define PHYS_OFFSET (0x00000000) | 20 | #define PHYS_OFFSET (0x00000000) |
| 21 | 21 | ||
| 22 | #define __virt_to_bus(v) \ | 22 | #define IXP23XX_PCI_SDRAM_OFFSET (*((volatile int *)IXP23XX_PCI_SDRAM_BAR) & 0xfffffff0)) |
| 23 | ({ unsigned int ret; \ | 23 | |
| 24 | ret = ((__virt_to_phys(v) - 0x00000000) + \ | 24 | #define __phys_to_bus(x) ((x) + (IXP23XX_PCI_SDRAM_OFFSET - PHYS_OFFSET)) |
| 25 | (*((volatile int *)IXP23XX_PCI_SDRAM_BAR) & 0xfffffff0)); \ | 25 | #define __bus_to_phys(x) ((x) - (IXP23XX_PCI_SDRAM_OFFSET - PHYS_OFFSET)) |
| 26 | ret; }) | 26 | |
| 27 | 27 | #define __virt_to_bus(v) __phys_to_bus(__virt_to_phys(v)) | |
| 28 | #define __bus_to_virt(b) \ | 28 | #define __bus_to_virt(b) __phys_to_virt(__bus_to_phys(b)) |
| 29 | ({ unsigned int data; \ | 29 | #define __pfn_to_bus(p) __phys_to_bus(__pfn_to_phys(p)) |
| 30 | data = *((volatile int *)IXP23XX_PCI_SDRAM_BAR); \ | 30 | #define __bus_to_pfn(b) __phys_to_pfn(__bus_to_phys(b)) |
| 31 | __phys_to_virt((((b - (data & 0xfffffff0)) + 0x00000000))); }) | ||
| 32 | 31 | ||
| 33 | #define arch_is_coherent() 1 | 32 | #define arch_is_coherent() 1 |
| 34 | 33 | ||
diff --git a/arch/arm/mach-lh7a40x/clocks.c b/arch/arm/mach-lh7a40x/clocks.c index 6182f5410b4d..fcaf876f19b6 100644 --- a/arch/arm/mach-lh7a40x/clocks.c +++ b/arch/arm/mach-lh7a40x/clocks.c | |||
| @@ -7,8 +7,6 @@ | |||
| 7 | * version 2 as published by the Free Software Foundation. | 7 | * version 2 as published by the Free Software Foundation. |
| 8 | * | 8 | * |
| 9 | */ | 9 | */ |
| 10 | |||
| 11 | #include <linux/cpufreq.h> | ||
| 12 | #include <mach/hardware.h> | 10 | #include <mach/hardware.h> |
| 13 | #include <mach/clocks.h> | 11 | #include <mach/clocks.h> |
| 14 | #include <linux/err.h> | 12 | #include <linux/err.h> |
| @@ -31,12 +29,6 @@ struct clk { | |||
| 31 | #define HCLKDIV(c) (((c) >> 0) & 0x02) | 29 | #define HCLKDIV(c) (((c) >> 0) & 0x02) |
| 32 | #define PCLKDIV(c) (((c) >> 16) & 0x03) | 30 | #define PCLKDIV(c) (((c) >> 16) & 0x03) |
| 33 | 31 | ||
| 34 | unsigned int cpufreq_get (unsigned int cpu) /* in kHz */ | ||
| 35 | { | ||
| 36 | return fclkfreq_get ()/1000; | ||
| 37 | } | ||
| 38 | EXPORT_SYMBOL(cpufreq_get); | ||
| 39 | |||
| 40 | unsigned int fclkfreq_get (void) | 32 | unsigned int fclkfreq_get (void) |
| 41 | { | 33 | { |
| 42 | unsigned int clkset = CSC_CLKSET; | 34 | unsigned int clkset = CSC_CLKSET; |
diff --git a/arch/arm/mach-s3c24a0/include/mach/memory.h b/arch/arm/mach-s3c24a0/include/mach/memory.h index 585211ca0187..7d74fd5c8d66 100644 --- a/arch/arm/mach-s3c24a0/include/mach/memory.h +++ b/arch/arm/mach-s3c24a0/include/mach/memory.h | |||
| @@ -15,5 +15,7 @@ | |||
| 15 | 15 | ||
| 16 | #define __virt_to_bus(x) __virt_to_phys(x) | 16 | #define __virt_to_bus(x) __virt_to_phys(x) |
| 17 | #define __bus_to_virt(x) __phys_to_virt(x) | 17 | #define __bus_to_virt(x) __phys_to_virt(x) |
| 18 | #define __pfn_to_bus(x) __pfn_to_phys(x) | ||
| 19 | #define __bus_to_pfn(x) __phys_to_pfn(x) | ||
| 18 | 20 | ||
| 19 | #endif | 21 | #endif |
diff --git a/arch/arm/mach-sa1100/Kconfig b/arch/arm/mach-sa1100/Kconfig index 03a7f3857c5e..b17d52f7cc48 100644 --- a/arch/arm/mach-sa1100/Kconfig +++ b/arch/arm/mach-sa1100/Kconfig | |||
| @@ -4,6 +4,7 @@ menu "SA11x0 Implementations" | |||
| 4 | 4 | ||
| 5 | config SA1100_ASSABET | 5 | config SA1100_ASSABET |
| 6 | bool "Assabet" | 6 | bool "Assabet" |
| 7 | select CPU_FREQ_SA1110 | ||
| 7 | help | 8 | help |
| 8 | Say Y here if you are using the Intel(R) StrongARM(R) SA-1110 | 9 | Say Y here if you are using the Intel(R) StrongARM(R) SA-1110 |
| 9 | Microprocessor Development Board (also known as the Assabet). | 10 | Microprocessor Development Board (also known as the Assabet). |
| @@ -19,6 +20,7 @@ config ASSABET_NEPONSET | |||
| 19 | 20 | ||
| 20 | config SA1100_CERF | 21 | config SA1100_CERF |
| 21 | bool "CerfBoard" | 22 | bool "CerfBoard" |
| 23 | select CPU_FREQ_SA1110 | ||
| 22 | help | 24 | help |
| 23 | The Intrinsyc CerfBoard is based on the StrongARM 1110 (Discontinued). | 25 | The Intrinsyc CerfBoard is based on the StrongARM 1110 (Discontinued). |
| 24 | More information is available at: | 26 | More information is available at: |
| @@ -45,6 +47,7 @@ endchoice | |||
| 45 | 47 | ||
| 46 | config SA1100_COLLIE | 48 | config SA1100_COLLIE |
| 47 | bool "Sharp Zaurus SL5500" | 49 | bool "Sharp Zaurus SL5500" |
| 50 | # FIXME: select CPU_FREQ_SA11x0 | ||
| 48 | select SHARP_LOCOMO | 51 | select SHARP_LOCOMO |
| 49 | select SHARP_SCOOP | 52 | select SHARP_SCOOP |
| 50 | select SHARP_PARAM | 53 | select SHARP_PARAM |
| @@ -54,6 +57,7 @@ config SA1100_COLLIE | |||
| 54 | config SA1100_H3100 | 57 | config SA1100_H3100 |
| 55 | bool "Compaq iPAQ H3100" | 58 | bool "Compaq iPAQ H3100" |
| 56 | select HTC_EGPIO | 59 | select HTC_EGPIO |
| 60 | select CPU_FREQ_SA1100 | ||
| 57 | help | 61 | help |
| 58 | Say Y here if you intend to run this kernel on the Compaq iPAQ | 62 | Say Y here if you intend to run this kernel on the Compaq iPAQ |
| 59 | H3100 handheld computer. Information about this machine and the | 63 | H3100 handheld computer. Information about this machine and the |
| @@ -64,6 +68,7 @@ config SA1100_H3100 | |||
| 64 | config SA1100_H3600 | 68 | config SA1100_H3600 |
| 65 | bool "Compaq iPAQ H3600/H3700" | 69 | bool "Compaq iPAQ H3600/H3700" |
| 66 | select HTC_EGPIO | 70 | select HTC_EGPIO |
| 71 | select CPU_FREQ_SA1100 | ||
| 67 | help | 72 | help |
| 68 | Say Y here if you intend to run this kernel on the Compaq iPAQ | 73 | Say Y here if you intend to run this kernel on the Compaq iPAQ |
| 69 | H3600 handheld computer. Information about this machine and the | 74 | H3600 handheld computer. Information about this machine and the |
| @@ -74,6 +79,7 @@ config SA1100_H3600 | |||
| 74 | config SA1100_BADGE4 | 79 | config SA1100_BADGE4 |
| 75 | bool "HP Labs BadgePAD 4" | 80 | bool "HP Labs BadgePAD 4" |
| 76 | select SA1111 | 81 | select SA1111 |
| 82 | select CPU_FREQ_SA1100 | ||
| 77 | help | 83 | help |
| 78 | Say Y here if you want to build a kernel for the HP Laboratories | 84 | Say Y here if you want to build a kernel for the HP Laboratories |
| 79 | BadgePAD 4. | 85 | BadgePAD 4. |
| @@ -81,6 +87,7 @@ config SA1100_BADGE4 | |||
| 81 | config SA1100_JORNADA720 | 87 | config SA1100_JORNADA720 |
| 82 | bool "HP Jornada 720" | 88 | bool "HP Jornada 720" |
| 83 | select SA1111 | 89 | select SA1111 |
| 90 | # FIXME: select CPU_FREQ_SA11x0 | ||
| 84 | help | 91 | help |
| 85 | Say Y here if you want to build a kernel for the HP Jornada 720 | 92 | Say Y here if you want to build a kernel for the HP Jornada 720 |
| 86 | handheld computer. See <http://www.hp.com/jornada/products/720> | 93 | handheld computer. See <http://www.hp.com/jornada/products/720> |
| @@ -98,12 +105,14 @@ config SA1100_JORNADA720_SSP | |||
| 98 | 105 | ||
| 99 | config SA1100_HACKKIT | 106 | config SA1100_HACKKIT |
| 100 | bool "HackKit Core CPU Board" | 107 | bool "HackKit Core CPU Board" |
| 108 | select CPU_FREQ_SA1100 | ||
| 101 | help | 109 | help |
| 102 | Say Y here to support the HackKit Core CPU Board | 110 | Say Y here to support the HackKit Core CPU Board |
| 103 | <http://hackkit.eletztrick.de>; | 111 | <http://hackkit.eletztrick.de>; |
| 104 | 112 | ||
| 105 | config SA1100_LART | 113 | config SA1100_LART |
| 106 | bool "LART" | 114 | bool "LART" |
| 115 | select CPU_FREQ_SA1100 | ||
| 107 | help | 116 | help |
| 108 | Say Y here if you are using the Linux Advanced Radio Terminal | 117 | Say Y here if you are using the Linux Advanced Radio Terminal |
| 109 | (also known as the LART). See <http://www.lartmaker.nl/> for | 118 | (also known as the LART). See <http://www.lartmaker.nl/> for |
| @@ -111,6 +120,7 @@ config SA1100_LART | |||
| 111 | 120 | ||
| 112 | config SA1100_PLEB | 121 | config SA1100_PLEB |
| 113 | bool "PLEB" | 122 | bool "PLEB" |
| 123 | select CPU_FREQ_SA1100 | ||
| 114 | help | 124 | help |
| 115 | Say Y here if you are using version 1 of the Portable Linux | 125 | Say Y here if you are using version 1 of the Portable Linux |
| 116 | Embedded Board (also known as PLEB). | 126 | Embedded Board (also known as PLEB). |
| @@ -119,6 +129,7 @@ config SA1100_PLEB | |||
| 119 | 129 | ||
| 120 | config SA1100_SHANNON | 130 | config SA1100_SHANNON |
| 121 | bool "Shannon" | 131 | bool "Shannon" |
| 132 | select CPU_FREQ_SA1100 | ||
| 122 | help | 133 | help |
| 123 | The Shannon (also known as a Tuxscreen, and also as a IS2630) was a | 134 | The Shannon (also known as a Tuxscreen, and also as a IS2630) was a |
| 124 | limited edition webphone produced by Philips. The Shannon is a SA1100 | 135 | limited edition webphone produced by Philips. The Shannon is a SA1100 |
| @@ -127,6 +138,7 @@ config SA1100_SHANNON | |||
| 127 | 138 | ||
| 128 | config SA1100_SIMPAD | 139 | config SA1100_SIMPAD |
| 129 | bool "Simpad" | 140 | bool "Simpad" |
| 141 | select CPU_FREQ_SA1110 | ||
| 130 | help | 142 | help |
| 131 | The SIEMENS webpad SIMpad is based on the StrongARM 1110. There | 143 | The SIEMENS webpad SIMpad is based on the StrongARM 1110. There |
| 132 | are two different versions CL4 and SL4. CL4 has 32MB RAM and 16MB | 144 | are two different versions CL4 and SL4. CL4 has 32MB RAM and 16MB |
| @@ -145,3 +157,4 @@ config SA1100_SSP | |||
| 145 | endmenu | 157 | endmenu |
| 146 | 158 | ||
| 147 | endif | 159 | endif |
| 160 | |||
diff --git a/arch/arm/mach-sa1100/generic.c b/arch/arm/mach-sa1100/generic.c index 9faea1511c1f..3c1fcd696714 100644 --- a/arch/arm/mach-sa1100/generic.c +++ b/arch/arm/mach-sa1100/generic.c | |||
| @@ -58,7 +58,6 @@ static const unsigned short cclk_frequency_100khz[NR_FREQS] = { | |||
| 58 | 2802 /* 280.2 MHz */ | 58 | 2802 /* 280.2 MHz */ |
| 59 | }; | 59 | }; |
| 60 | 60 | ||
| 61 | #if defined(CONFIG_CPU_FREQ_SA1100) || defined(CONFIG_CPU_FREQ_SA1110) | ||
| 62 | /* rounds up(!) */ | 61 | /* rounds up(!) */ |
| 63 | unsigned int sa11x0_freq_to_ppcr(unsigned int khz) | 62 | unsigned int sa11x0_freq_to_ppcr(unsigned int khz) |
| 64 | { | 63 | { |
| @@ -110,17 +109,6 @@ unsigned int sa11x0_getspeed(unsigned int cpu) | |||
| 110 | return cclk_frequency_100khz[PPCR & 0xf] * 100; | 109 | return cclk_frequency_100khz[PPCR & 0xf] * 100; |
| 111 | } | 110 | } |
| 112 | 111 | ||
| 113 | #else | ||
| 114 | /* | ||
| 115 | * We still need to provide this so building without cpufreq works. | ||
| 116 | */ | ||
| 117 | unsigned int cpufreq_get(unsigned int cpu) | ||
| 118 | { | ||
| 119 | return cclk_frequency_100khz[PPCR & 0xf] * 100; | ||
| 120 | } | ||
| 121 | EXPORT_SYMBOL(cpufreq_get); | ||
| 122 | #endif | ||
| 123 | |||
| 124 | /* | 112 | /* |
| 125 | * This is the SA11x0 sched_clock implementation. This has | 113 | * This is the SA11x0 sched_clock implementation. This has |
| 126 | * a resolution of 271ns, and a maximum value of 32025597s (370 days). | 114 | * a resolution of 271ns, and a maximum value of 32025597s (370 days). |
diff --git a/arch/arm/vfp/vfpmodule.c b/arch/arm/vfp/vfpmodule.c index 2d7423af1197..aed05bc3c2ea 100644 --- a/arch/arm/vfp/vfpmodule.c +++ b/arch/arm/vfp/vfpmodule.c | |||
| @@ -38,16 +38,72 @@ union vfp_state *last_VFP_context[NR_CPUS]; | |||
| 38 | */ | 38 | */ |
| 39 | unsigned int VFP_arch; | 39 | unsigned int VFP_arch; |
| 40 | 40 | ||
| 41 | /* | ||
| 42 | * Per-thread VFP initialization. | ||
| 43 | */ | ||
| 44 | static void vfp_thread_flush(struct thread_info *thread) | ||
| 45 | { | ||
| 46 | union vfp_state *vfp = &thread->vfpstate; | ||
| 47 | unsigned int cpu; | ||
| 48 | |||
| 49 | memset(vfp, 0, sizeof(union vfp_state)); | ||
| 50 | |||
| 51 | vfp->hard.fpexc = FPEXC_EN; | ||
| 52 | vfp->hard.fpscr = FPSCR_ROUND_NEAREST; | ||
| 53 | |||
| 54 | /* | ||
| 55 | * Disable VFP to ensure we initialize it first. We must ensure | ||
| 56 | * that the modification of last_VFP_context[] and hardware disable | ||
| 57 | * are done for the same CPU and without preemption. | ||
| 58 | */ | ||
| 59 | cpu = get_cpu(); | ||
| 60 | if (last_VFP_context[cpu] == vfp) | ||
| 61 | last_VFP_context[cpu] = NULL; | ||
| 62 | fmxr(FPEXC, fmrx(FPEXC) & ~FPEXC_EN); | ||
| 63 | put_cpu(); | ||
| 64 | } | ||
| 65 | |||
| 66 | static void vfp_thread_release(struct thread_info *thread) | ||
| 67 | { | ||
| 68 | /* release case: Per-thread VFP cleanup. */ | ||
| 69 | union vfp_state *vfp = &thread->vfpstate; | ||
| 70 | unsigned int cpu = thread->cpu; | ||
| 71 | |||
| 72 | if (last_VFP_context[cpu] == vfp) | ||
| 73 | last_VFP_context[cpu] = NULL; | ||
| 74 | } | ||
| 75 | |||
| 76 | /* | ||
| 77 | * When this function is called with the following 'cmd's, the following | ||
| 78 | * is true while this function is being run: | ||
| 79 | * THREAD_NOFTIFY_SWTICH: | ||
| 80 | * - the previously running thread will not be scheduled onto another CPU. | ||
| 81 | * - the next thread to be run (v) will not be running on another CPU. | ||
| 82 | * - thread->cpu is the local CPU number | ||
| 83 | * - not preemptible as we're called in the middle of a thread switch | ||
| 84 | * THREAD_NOTIFY_FLUSH: | ||
| 85 | * - the thread (v) will be running on the local CPU, so | ||
| 86 | * v === current_thread_info() | ||
| 87 | * - thread->cpu is the local CPU number at the time it is accessed, | ||
| 88 | * but may change at any time. | ||
| 89 | * - we could be preempted if tree preempt rcu is enabled, so | ||
| 90 | * it is unsafe to use thread->cpu. | ||
| 91 | * THREAD_NOTIFY_RELEASE: | ||
| 92 | * - the thread (v) will not be running on any CPU; it is a dead thread. | ||
| 93 | * - thread->cpu will be the last CPU the thread ran on, which may not | ||
| 94 | * be the current CPU. | ||
| 95 | * - we could be preempted if tree preempt rcu is enabled. | ||
| 96 | */ | ||
| 41 | static int vfp_notifier(struct notifier_block *self, unsigned long cmd, void *v) | 97 | static int vfp_notifier(struct notifier_block *self, unsigned long cmd, void *v) |
| 42 | { | 98 | { |
| 43 | struct thread_info *thread = v; | 99 | struct thread_info *thread = v; |
| 44 | union vfp_state *vfp; | ||
| 45 | __u32 cpu = thread->cpu; | ||
| 46 | 100 | ||
| 47 | if (likely(cmd == THREAD_NOTIFY_SWITCH)) { | 101 | if (likely(cmd == THREAD_NOTIFY_SWITCH)) { |
| 48 | u32 fpexc = fmrx(FPEXC); | 102 | u32 fpexc = fmrx(FPEXC); |
| 49 | 103 | ||
| 50 | #ifdef CONFIG_SMP | 104 | #ifdef CONFIG_SMP |
| 105 | unsigned int cpu = thread->cpu; | ||
| 106 | |||
| 51 | /* | 107 | /* |
| 52 | * On SMP, if VFP is enabled, save the old state in | 108 | * On SMP, if VFP is enabled, save the old state in |
| 53 | * case the thread migrates to a different CPU. The | 109 | * case the thread migrates to a different CPU. The |
| @@ -74,25 +130,10 @@ static int vfp_notifier(struct notifier_block *self, unsigned long cmd, void *v) | |||
| 74 | return NOTIFY_DONE; | 130 | return NOTIFY_DONE; |
| 75 | } | 131 | } |
| 76 | 132 | ||
| 77 | vfp = &thread->vfpstate; | 133 | if (cmd == THREAD_NOTIFY_FLUSH) |
| 78 | if (cmd == THREAD_NOTIFY_FLUSH) { | 134 | vfp_thread_flush(thread); |
| 79 | /* | 135 | else |
| 80 | * Per-thread VFP initialisation. | 136 | vfp_thread_release(thread); |
| 81 | */ | ||
| 82 | memset(vfp, 0, sizeof(union vfp_state)); | ||
| 83 | |||
| 84 | vfp->hard.fpexc = FPEXC_EN; | ||
| 85 | vfp->hard.fpscr = FPSCR_ROUND_NEAREST; | ||
| 86 | |||
| 87 | /* | ||
| 88 | * Disable VFP to ensure we initialise it first. | ||
| 89 | */ | ||
| 90 | fmxr(FPEXC, fmrx(FPEXC) & ~FPEXC_EN); | ||
| 91 | } | ||
| 92 | |||
| 93 | /* flush and release case: Per-thread VFP cleanup. */ | ||
| 94 | if (last_VFP_context[cpu] == vfp) | ||
| 95 | last_VFP_context[cpu] = NULL; | ||
| 96 | 137 | ||
| 97 | return NOTIFY_DONE; | 138 | return NOTIFY_DONE; |
| 98 | } | 139 | } |
diff --git a/drivers/pcmcia/pxa2xx_base.c b/drivers/pcmcia/pxa2xx_base.c index 87481ce60dfb..da346eb7e77e 100644 --- a/drivers/pcmcia/pxa2xx_base.c +++ b/drivers/pcmcia/pxa2xx_base.c | |||
| @@ -253,6 +253,7 @@ int pxa2xx_drv_pcmcia_add_one(struct soc_pcmcia_socket *skt) | |||
| 253 | 253 | ||
| 254 | return soc_pcmcia_add_one(skt); | 254 | return soc_pcmcia_add_one(skt); |
| 255 | } | 255 | } |
| 256 | EXPORT_SYMBOL(pxa2xx_drv_pcmcia_add_one); | ||
| 256 | 257 | ||
| 257 | void pxa2xx_drv_pcmcia_ops(struct pcmcia_low_level *ops) | 258 | void pxa2xx_drv_pcmcia_ops(struct pcmcia_low_level *ops) |
| 258 | { | 259 | { |
| @@ -262,19 +263,19 @@ void pxa2xx_drv_pcmcia_ops(struct pcmcia_low_level *ops) | |||
| 262 | ops->frequency_change = pxa2xx_pcmcia_frequency_change; | 263 | ops->frequency_change = pxa2xx_pcmcia_frequency_change; |
| 263 | #endif | 264 | #endif |
| 264 | } | 265 | } |
| 266 | EXPORT_SYMBOL(pxa2xx_drv_pcmcia_ops); | ||
| 265 | 267 | ||
| 266 | int __pxa2xx_drv_pcmcia_probe(struct device *dev) | 268 | static int pxa2xx_drv_pcmcia_probe(struct platform_device *dev) |
| 267 | { | 269 | { |
| 268 | int i, ret = 0; | 270 | int i, ret = 0; |
| 269 | struct pcmcia_low_level *ops; | 271 | struct pcmcia_low_level *ops; |
| 270 | struct skt_dev_info *sinfo; | 272 | struct skt_dev_info *sinfo; |
| 271 | struct soc_pcmcia_socket *skt; | 273 | struct soc_pcmcia_socket *skt; |
| 272 | 274 | ||
| 273 | if (!dev || !dev->platform_data) | 275 | ops = (struct pcmcia_low_level *)dev->dev.platform_data; |
| 276 | if (!ops) | ||
| 274 | return -ENODEV; | 277 | return -ENODEV; |
| 275 | 278 | ||
| 276 | ops = (struct pcmcia_low_level *)dev->platform_data; | ||
| 277 | |||
| 278 | pxa2xx_drv_pcmcia_ops(ops); | 279 | pxa2xx_drv_pcmcia_ops(ops); |
| 279 | 280 | ||
| 280 | sinfo = kzalloc(SKT_DEV_INFO_SIZE(ops->nr), GFP_KERNEL); | 281 | sinfo = kzalloc(SKT_DEV_INFO_SIZE(ops->nr), GFP_KERNEL); |
| @@ -309,13 +310,6 @@ int __pxa2xx_drv_pcmcia_probe(struct device *dev) | |||
| 309 | 310 | ||
| 310 | return ret; | 311 | return ret; |
| 311 | } | 312 | } |
| 312 | EXPORT_SYMBOL(__pxa2xx_drv_pcmcia_probe); | ||
| 313 | |||
| 314 | |||
| 315 | static int pxa2xx_drv_pcmcia_probe(struct platform_device *dev) | ||
| 316 | { | ||
| 317 | return __pxa2xx_drv_pcmcia_probe(&dev->dev); | ||
| 318 | } | ||
| 319 | 313 | ||
| 320 | static int pxa2xx_drv_pcmcia_remove(struct platform_device *dev) | 314 | static int pxa2xx_drv_pcmcia_remove(struct platform_device *dev) |
| 321 | { | 315 | { |
diff --git a/drivers/pcmcia/pxa2xx_base.h b/drivers/pcmcia/pxa2xx_base.h index cb5efaec886f..bb62ea87b8f9 100644 --- a/drivers/pcmcia/pxa2xx_base.h +++ b/drivers/pcmcia/pxa2xx_base.h | |||
| @@ -1,6 +1,3 @@ | |||
| 1 | /* temporary measure */ | ||
| 2 | extern int __pxa2xx_drv_pcmcia_probe(struct device *); | ||
| 3 | |||
| 4 | int pxa2xx_drv_pcmcia_add_one(struct soc_pcmcia_socket *skt); | 1 | int pxa2xx_drv_pcmcia_add_one(struct soc_pcmcia_socket *skt); |
| 5 | void pxa2xx_drv_pcmcia_ops(struct pcmcia_low_level *ops); | 2 | void pxa2xx_drv_pcmcia_ops(struct pcmcia_low_level *ops); |
| 6 | 3 | ||
diff --git a/drivers/pcmcia/pxa2xx_palmtc.c b/drivers/pcmcia/pxa2xx_palmtc.c index 3a8993ed5621..459a232d66be 100644 --- a/drivers/pcmcia/pxa2xx_palmtc.c +++ b/drivers/pcmcia/pxa2xx_palmtc.c | |||
| @@ -67,7 +67,7 @@ static int palmtc_pcmcia_hw_init(struct soc_pcmcia_socket *skt) | |||
| 67 | if (ret) | 67 | if (ret) |
| 68 | goto err7; | 68 | goto err7; |
| 69 | 69 | ||
| 70 | skt->irq = IRQ_GPIO(GPIO_NR_PALMTC_PCMCIA_READY); | 70 | skt->socket.pci_irq = IRQ_GPIO(GPIO_NR_PALMTC_PCMCIA_READY); |
| 71 | return 0; | 71 | return 0; |
| 72 | 72 | ||
| 73 | err7: | 73 | err7: |
diff --git a/drivers/pcmcia/pxa2xx_stargate2.c b/drivers/pcmcia/pxa2xx_stargate2.c index 490749ea677f..d08802fe35f9 100644 --- a/drivers/pcmcia/pxa2xx_stargate2.c +++ b/drivers/pcmcia/pxa2xx_stargate2.c | |||
| @@ -40,7 +40,7 @@ static struct pcmcia_irqs irqs[] = { | |||
| 40 | 40 | ||
| 41 | static int sg2_pcmcia_hw_init(struct soc_pcmcia_socket *skt) | 41 | static int sg2_pcmcia_hw_init(struct soc_pcmcia_socket *skt) |
| 42 | { | 42 | { |
| 43 | skt->irq = IRQ_GPIO(SG2_S0_GPIO_READY); | 43 | skt->socket.pci_irq = IRQ_GPIO(SG2_S0_GPIO_READY); |
| 44 | return soc_pcmcia_request_irqs(skt, irqs, ARRAY_SIZE(irqs)); | 44 | return soc_pcmcia_request_irqs(skt, irqs, ARRAY_SIZE(irqs)); |
| 45 | } | 45 | } |
| 46 | 46 | ||
