diff options
Diffstat (limited to 'arch/arm')
243 files changed, 2176 insertions, 1357 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 05b53941b819..7536b9cbb072 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig | |||
@@ -3,7 +3,7 @@ config ARM | |||
3 | default y | 3 | default y |
4 | select HAVE_AOUT | 4 | select HAVE_AOUT |
5 | select HAVE_DMA_API_DEBUG | 5 | select HAVE_DMA_API_DEBUG |
6 | select HAVE_IDE | 6 | select HAVE_IDE if PCI || ISA || PCMCIA |
7 | select HAVE_MEMBLOCK | 7 | select HAVE_MEMBLOCK |
8 | select RTC_LIB | 8 | select RTC_LIB |
9 | select SYS_SUPPORTS_APM_EMULATION | 9 | select SYS_SUPPORTS_APM_EMULATION |
@@ -195,7 +195,8 @@ config VECTORS_BASE | |||
195 | The base address of exception vectors. | 195 | The base address of exception vectors. |
196 | 196 | ||
197 | config ARM_PATCH_PHYS_VIRT | 197 | config ARM_PATCH_PHYS_VIRT |
198 | bool "Patch physical to virtual translations at runtime" | 198 | bool "Patch physical to virtual translations at runtime" if EMBEDDED |
199 | default y | ||
199 | depends on !XIP_KERNEL && MMU | 200 | depends on !XIP_KERNEL && MMU |
200 | depends on !ARCH_REALVIEW || !SPARSEMEM | 201 | depends on !ARCH_REALVIEW || !SPARSEMEM |
201 | help | 202 | help |
@@ -204,16 +205,16 @@ config ARM_PATCH_PHYS_VIRT | |||
204 | kernel in system memory. | 205 | kernel in system memory. |
205 | 206 | ||
206 | This can only be used with non-XIP MMU kernels where the base | 207 | This can only be used with non-XIP MMU kernels where the base |
207 | of physical memory is at a 16MB boundary, or theoretically 64K | 208 | of physical memory is at a 16MB boundary. |
208 | for the MSM machine class. | 209 | |
210 | Only disable this option if you know that you do not require | ||
211 | this feature (eg, building a kernel for a single machine) and | ||
212 | you need to shrink the kernel to the minimal size. | ||
209 | 213 | ||
210 | config ARM_PATCH_PHYS_VIRT_16BIT | 214 | |
215 | config GENERIC_BUG | ||
211 | def_bool y | 216 | def_bool y |
212 | depends on ARM_PATCH_PHYS_VIRT && ARCH_MSM | 217 | depends on BUG |
213 | help | ||
214 | This option extends the physical to virtual translation patching | ||
215 | to allow physical memory down to a theoretical minimum of 64K | ||
216 | boundaries. | ||
217 | 218 | ||
218 | source "init/Kconfig" | 219 | source "init/Kconfig" |
219 | 220 | ||
@@ -301,7 +302,6 @@ config ARCH_AT91 | |||
301 | select ARCH_REQUIRE_GPIOLIB | 302 | select ARCH_REQUIRE_GPIOLIB |
302 | select HAVE_CLK | 303 | select HAVE_CLK |
303 | select CLKDEV_LOOKUP | 304 | select CLKDEV_LOOKUP |
304 | select ARM_PATCH_PHYS_VIRT if MMU | ||
305 | help | 305 | help |
306 | This enables support for systems based on the Atmel AT91RM9200, | 306 | This enables support for systems based on the Atmel AT91RM9200, |
307 | AT91SAM9 and AT91CAP9 processors. | 307 | AT91SAM9 and AT91CAP9 processors. |
@@ -385,6 +385,7 @@ config ARCH_FOOTBRIDGE | |||
385 | select CPU_SA110 | 385 | select CPU_SA110 |
386 | select FOOTBRIDGE | 386 | select FOOTBRIDGE |
387 | select GENERIC_CLOCKEVENTS | 387 | select GENERIC_CLOCKEVENTS |
388 | select HAVE_IDE | ||
388 | help | 389 | help |
389 | Support for systems based on the DC21285 companion chip | 390 | Support for systems based on the DC21285 companion chip |
390 | ("FootBridge"), such as the Simtec CATS and the Rebel NetWinder. | 391 | ("FootBridge"), such as the Simtec CATS and the Rebel NetWinder. |
@@ -631,6 +632,8 @@ config ARCH_PXA | |||
631 | select SPARSE_IRQ | 632 | select SPARSE_IRQ |
632 | select AUTO_ZRELADDR | 633 | select AUTO_ZRELADDR |
633 | select MULTI_IRQ_HANDLER | 634 | select MULTI_IRQ_HANDLER |
635 | select ARM_CPU_SUSPEND if PM | ||
636 | select HAVE_IDE | ||
634 | help | 637 | help |
635 | Support for Intel/Marvell's PXA2xx/PXA3xx processor line. | 638 | Support for Intel/Marvell's PXA2xx/PXA3xx processor line. |
636 | 639 | ||
@@ -671,6 +674,7 @@ config ARCH_RPC | |||
671 | select NO_IOPORT | 674 | select NO_IOPORT |
672 | select ARCH_SPARSEMEM_ENABLE | 675 | select ARCH_SPARSEMEM_ENABLE |
673 | select ARCH_USES_GETTIMEOFFSET | 676 | select ARCH_USES_GETTIMEOFFSET |
677 | select HAVE_IDE | ||
674 | help | 678 | help |
675 | On the Acorn Risc-PC, Linux can support the internal IDE disk and | 679 | On the Acorn Risc-PC, Linux can support the internal IDE disk and |
676 | CD-ROM interface, serial and parallel port, and the floppy drive. | 680 | CD-ROM interface, serial and parallel port, and the floppy drive. |
@@ -689,6 +693,7 @@ config ARCH_SA1100 | |||
689 | select HAVE_SCHED_CLOCK | 693 | select HAVE_SCHED_CLOCK |
690 | select TICK_ONESHOT | 694 | select TICK_ONESHOT |
691 | select ARCH_REQUIRE_GPIOLIB | 695 | select ARCH_REQUIRE_GPIOLIB |
696 | select HAVE_IDE | ||
692 | help | 697 | help |
693 | Support for StrongARM 11x0 based boards. | 698 | Support for StrongARM 11x0 based boards. |
694 | 699 | ||
@@ -1283,6 +1288,20 @@ config ARM_ERRATA_364296 | |||
1283 | processor into full low interrupt latency mode. ARM11MPCore | 1288 | processor into full low interrupt latency mode. ARM11MPCore |
1284 | is not affected. | 1289 | is not affected. |
1285 | 1290 | ||
1291 | config ARM_ERRATA_764369 | ||
1292 | bool "ARM errata: Data cache line maintenance operation by MVA may not succeed" | ||
1293 | depends on CPU_V7 && SMP | ||
1294 | help | ||
1295 | This option enables the workaround for erratum 764369 | ||
1296 | affecting Cortex-A9 MPCore with two or more processors (all | ||
1297 | current revisions). Under certain timing circumstances, a data | ||
1298 | cache line maintenance operation by MVA targeting an Inner | ||
1299 | Shareable memory region may fail to proceed up to either the | ||
1300 | Point of Coherency or to the Point of Unification of the | ||
1301 | system. This workaround adds a DSB instruction before the | ||
1302 | relevant cache maintenance functions and sets a specific bit | ||
1303 | in the diagnostic control register of the SCU. | ||
1304 | |||
1286 | endmenu | 1305 | endmenu |
1287 | 1306 | ||
1288 | source "arch/arm/common/Kconfig" | 1307 | source "arch/arm/common/Kconfig" |
@@ -1361,6 +1380,7 @@ config SMP | |||
1361 | MACH_REALVIEW_PB11MP || MACH_REALVIEW_PBX || ARCH_OMAP4 || \ | 1380 | MACH_REALVIEW_PB11MP || MACH_REALVIEW_PBX || ARCH_OMAP4 || \ |
1362 | ARCH_EXYNOS4 || ARCH_TEGRA || ARCH_U8500 || ARCH_VEXPRESS_CA9X4 || \ | 1381 | ARCH_EXYNOS4 || ARCH_TEGRA || ARCH_U8500 || ARCH_VEXPRESS_CA9X4 || \ |
1363 | ARCH_MSM_SCORPIONMP || ARCH_SHMOBILE | 1382 | ARCH_MSM_SCORPIONMP || ARCH_SHMOBILE |
1383 | depends on MMU | ||
1364 | select USE_GENERIC_SMP_HELPERS | 1384 | select USE_GENERIC_SMP_HELPERS |
1365 | select HAVE_ARM_SCU if !ARCH_MSM_SCORPIONMP | 1385 | select HAVE_ARM_SCU if !ARCH_MSM_SCORPIONMP |
1366 | help | 1386 | help |
@@ -1393,6 +1413,31 @@ config SMP_ON_UP | |||
1393 | 1413 | ||
1394 | If you don't know what to do here, say Y. | 1414 | If you don't know what to do here, say Y. |
1395 | 1415 | ||
1416 | config ARM_CPU_TOPOLOGY | ||
1417 | bool "Support cpu topology definition" | ||
1418 | depends on SMP && CPU_V7 | ||
1419 | default y | ||
1420 | help | ||
1421 | Support ARM cpu topology definition. The MPIDR register defines | ||
1422 | affinity between processors which is then used to describe the cpu | ||
1423 | topology of an ARM System. | ||
1424 | |||
1425 | config SCHED_MC | ||
1426 | bool "Multi-core scheduler support" | ||
1427 | depends on ARM_CPU_TOPOLOGY | ||
1428 | help | ||
1429 | Multi-core scheduler support improves the CPU scheduler's decision | ||
1430 | making when dealing with multi-core CPU chips at a cost of slightly | ||
1431 | increased overhead in some places. If unsure say N here. | ||
1432 | |||
1433 | config SCHED_SMT | ||
1434 | bool "SMT scheduler support" | ||
1435 | depends on ARM_CPU_TOPOLOGY | ||
1436 | help | ||
1437 | Improves the CPU scheduler's decision making when dealing with | ||
1438 | MultiThreading at a cost of slightly increased overhead in some | ||
1439 | places. If unsure say N here. | ||
1440 | |||
1396 | config HAVE_ARM_SCU | 1441 | config HAVE_ARM_SCU |
1397 | bool | 1442 | bool |
1398 | help | 1443 | help |
@@ -1468,6 +1513,7 @@ config THUMB2_KERNEL | |||
1468 | depends on CPU_V7 && !CPU_V6 && !CPU_V6K && EXPERIMENTAL | 1513 | depends on CPU_V7 && !CPU_V6 && !CPU_V6K && EXPERIMENTAL |
1469 | select AEABI | 1514 | select AEABI |
1470 | select ARM_ASM_UNIFIED | 1515 | select ARM_ASM_UNIFIED |
1516 | select ARM_UNWIND | ||
1471 | help | 1517 | help |
1472 | By enabling this option, the kernel will be compiled in | 1518 | By enabling this option, the kernel will be compiled in |
1473 | Thumb-2 mode. A compiler/assembler that understand the unified | 1519 | Thumb-2 mode. A compiler/assembler that understand the unified |
@@ -2087,6 +2133,9 @@ config ARCH_SUSPEND_POSSIBLE | |||
2087 | CPU_V6 || CPU_V6K || CPU_V7 || CPU_XSC3 || CPU_XSCALE | 2133 | CPU_V6 || CPU_V6K || CPU_V7 || CPU_XSC3 || CPU_XSCALE |
2088 | def_bool y | 2134 | def_bool y |
2089 | 2135 | ||
2136 | config ARM_CPU_SUSPEND | ||
2137 | def_bool PM_SLEEP | ||
2138 | |||
2090 | endmenu | 2139 | endmenu |
2091 | 2140 | ||
2092 | source "net/Kconfig" | 2141 | source "net/Kconfig" |
diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug index 81cbe40c159c..df3eb3ccd769 100644 --- a/arch/arm/Kconfig.debug +++ b/arch/arm/Kconfig.debug | |||
@@ -65,13 +65,71 @@ config DEBUG_USER | |||
65 | 65 | ||
66 | # These options are only for real kernel hackers who want to get their hands dirty. | 66 | # These options are only for real kernel hackers who want to get their hands dirty. |
67 | config DEBUG_LL | 67 | config DEBUG_LL |
68 | bool "Kernel low-level debugging functions" | 68 | bool "Kernel low-level debugging functions (read help!)" |
69 | depends on DEBUG_KERNEL | 69 | depends on DEBUG_KERNEL |
70 | help | 70 | help |
71 | Say Y here to include definitions of printascii, printch, printhex | 71 | Say Y here to include definitions of printascii, printch, printhex |
72 | in the kernel. This is helpful if you are debugging code that | 72 | in the kernel. This is helpful if you are debugging code that |
73 | executes before the console is initialized. | 73 | executes before the console is initialized. |
74 | 74 | ||
75 | Note that selecting this option will limit the kernel to a single | ||
76 | UART definition, as specified below. Attempting to boot the kernel | ||
77 | image on a different platform *will not work*, so this option should | ||
78 | not be enabled for kernels that are intended to be portable. | ||
79 | |||
80 | choice | ||
81 | prompt "Kernel low-level debugging port" | ||
82 | depends on DEBUG_LL | ||
83 | |||
84 | config DEBUG_LL_UART_NONE | ||
85 | bool "No low-level debugging UART" | ||
86 | help | ||
87 | Say Y here if your platform doesn't provide a UART option | ||
88 | below. This relies on your platform choosing the right UART | ||
89 | definition internally in order for low-level debugging to | ||
90 | work. | ||
91 | |||
92 | config DEBUG_ICEDCC | ||
93 | bool "Kernel low-level debugging via EmbeddedICE DCC channel" | ||
94 | help | ||
95 | Say Y here if you want the debug print routines to direct | ||
96 | their output to the EmbeddedICE macrocell's DCC channel using | ||
97 | co-processor 14. This is known to work on the ARM9 style ICE | ||
98 | channel and on the XScale with the PEEDI. | ||
99 | |||
100 | Note that the system will appear to hang during boot if there | ||
101 | is nothing connected to read from the DCC. | ||
102 | |||
103 | config DEBUG_FOOTBRIDGE_COM1 | ||
104 | bool "Kernel low-level debugging messages via footbridge 8250 at PCI COM1" | ||
105 | depends on FOOTBRIDGE | ||
106 | help | ||
107 | Say Y here if you want the debug print routines to direct | ||
108 | their output to the 8250 at PCI COM1. | ||
109 | |||
110 | config DEBUG_DC21285_PORT | ||
111 | bool "Kernel low-level debugging messages via footbridge serial port" | ||
112 | depends on FOOTBRIDGE | ||
113 | help | ||
114 | Say Y here if you want the debug print routines to direct | ||
115 | their output to the serial port in the DC21285 (Footbridge). | ||
116 | |||
117 | config DEBUG_CLPS711X_UART1 | ||
118 | bool "Kernel low-level debugging messages via UART1" | ||
119 | depends on ARCH_CLPS711X | ||
120 | help | ||
121 | Say Y here if you want the debug print routines to direct | ||
122 | their output to the first serial port on these devices. | ||
123 | |||
124 | config DEBUG_CLPS711X_UART2 | ||
125 | bool "Kernel low-level debugging messages via UART2" | ||
126 | depends on ARCH_CLPS711X | ||
127 | help | ||
128 | Say Y here if you want the debug print routines to direct | ||
129 | their output to the second serial port on these devices. | ||
130 | |||
131 | endchoice | ||
132 | |||
75 | config EARLY_PRINTK | 133 | config EARLY_PRINTK |
76 | bool "Early printk" | 134 | bool "Early printk" |
77 | depends on DEBUG_LL | 135 | depends on DEBUG_LL |
@@ -80,43 +138,14 @@ config EARLY_PRINTK | |||
80 | kernel low-level debugging functions. Add earlyprintk to your | 138 | kernel low-level debugging functions. Add earlyprintk to your |
81 | kernel parameters to enable this console. | 139 | kernel parameters to enable this console. |
82 | 140 | ||
83 | config DEBUG_ICEDCC | ||
84 | bool "Kernel low-level debugging via EmbeddedICE DCC channel" | ||
85 | depends on DEBUG_LL | ||
86 | help | ||
87 | Say Y here if you want the debug print routines to direct their | ||
88 | output to the EmbeddedICE macrocell's DCC channel using | ||
89 | co-processor 14. This is known to work on the ARM9 style ICE | ||
90 | channel and on the XScale with the PEEDI. | ||
91 | |||
92 | It does include a timeout to ensure that the system does not | ||
93 | totally freeze when there is nothing connected to read. | ||
94 | |||
95 | config OC_ETM | 141 | config OC_ETM |
96 | bool "On-chip ETM and ETB" | 142 | bool "On-chip ETM and ETB" |
97 | select ARM_AMBA | 143 | depends on ARM_AMBA |
98 | help | 144 | help |
99 | Enables the on-chip embedded trace macrocell and embedded trace | 145 | Enables the on-chip embedded trace macrocell and embedded trace |
100 | buffer driver that will allow you to collect traces of the | 146 | buffer driver that will allow you to collect traces of the |
101 | kernel code. | 147 | kernel code. |
102 | 148 | ||
103 | config DEBUG_DC21285_PORT | ||
104 | bool "Kernel low-level debugging messages via footbridge serial port" | ||
105 | depends on DEBUG_LL && FOOTBRIDGE | ||
106 | help | ||
107 | Say Y here if you want the debug print routines to direct their | ||
108 | output to the serial port in the DC21285 (Footbridge). Saying N | ||
109 | will cause the debug messages to appear on the first 16550 | ||
110 | serial port. | ||
111 | |||
112 | config DEBUG_CLPS711X_UART2 | ||
113 | bool "Kernel low-level debugging messages via UART2" | ||
114 | depends on DEBUG_LL && ARCH_CLPS711X | ||
115 | help | ||
116 | Say Y here if you want the debug print routines to direct their | ||
117 | output to the second serial port on these devices. Saying N will | ||
118 | cause the debug messages to appear on the first serial port. | ||
119 | |||
120 | config DEBUG_S3C_UART | 149 | config DEBUG_S3C_UART |
121 | depends on PLAT_SAMSUNG | 150 | depends on PLAT_SAMSUNG |
122 | int "S3C UART to use for low-level debug" | 151 | int "S3C UART to use for low-level debug" |
diff --git a/arch/arm/Makefile b/arch/arm/Makefile index 70c424eaf7b0..5665c2a3b652 100644 --- a/arch/arm/Makefile +++ b/arch/arm/Makefile | |||
@@ -128,6 +128,9 @@ textofs-$(CONFIG_PM_H1940) := 0x00108000 | |||
128 | ifeq ($(CONFIG_ARCH_SA1100),y) | 128 | ifeq ($(CONFIG_ARCH_SA1100),y) |
129 | textofs-$(CONFIG_SA1111) := 0x00208000 | 129 | textofs-$(CONFIG_SA1111) := 0x00208000 |
130 | endif | 130 | endif |
131 | textofs-$(CONFIG_ARCH_MSM7X30) := 0x00208000 | ||
132 | textofs-$(CONFIG_ARCH_MSM8X60) := 0x00208000 | ||
133 | textofs-$(CONFIG_ARCH_MSM8960) := 0x00208000 | ||
131 | 134 | ||
132 | # Machine directory name. This list is sorted alphanumerically | 135 | # Machine directory name. This list is sorted alphanumerically |
133 | # by CONFIG_* macro name. | 136 | # by CONFIG_* macro name. |
diff --git a/arch/arm/boot/Makefile b/arch/arm/boot/Makefile index a1edfd5a129a..176062ac7f07 100644 --- a/arch/arm/boot/Makefile +++ b/arch/arm/boot/Makefile | |||
@@ -78,7 +78,16 @@ endif | |||
78 | 78 | ||
79 | $(obj)/uImage: STARTADDR=$(LOADADDR) | 79 | $(obj)/uImage: STARTADDR=$(LOADADDR) |
80 | 80 | ||
81 | check_for_multiple_loadaddr = \ | ||
82 | if [ $(words $(LOADADDR)) -gt 1 ]; then \ | ||
83 | echo 'multiple load addresses: $(LOADADDR)'; \ | ||
84 | echo 'This is incompatible with uImages'; \ | ||
85 | echo 'Specify LOADADDR on the commandline to build an uImage'; \ | ||
86 | false; \ | ||
87 | fi | ||
88 | |||
81 | $(obj)/uImage: $(obj)/zImage FORCE | 89 | $(obj)/uImage: $(obj)/zImage FORCE |
90 | @$(check_for_multiple_loadaddr) | ||
82 | $(call if_changed,uimage) | 91 | $(call if_changed,uimage) |
83 | @echo ' Image $@ is ready' | 92 | @echo ' Image $@ is ready' |
84 | 93 | ||
diff --git a/arch/arm/boot/compressed/Makefile b/arch/arm/boot/compressed/Makefile index 0c74a6fab952..a6b30b35ca65 100644 --- a/arch/arm/boot/compressed/Makefile +++ b/arch/arm/boot/compressed/Makefile | |||
@@ -139,8 +139,16 @@ bad_syms=$$($(CROSS_COMPILE)nm $@ | sed -n 's/^.\{8\} [bc] \(.*\)/\1/p') && \ | |||
139 | ( echo "following symbols must have non local/private scope:" >&2; \ | 139 | ( echo "following symbols must have non local/private scope:" >&2; \ |
140 | echo "$$bad_syms" >&2; rm -f $@; false ) | 140 | echo "$$bad_syms" >&2; rm -f $@; false ) |
141 | 141 | ||
142 | check_for_multiple_zreladdr = \ | ||
143 | if [ $(words $(ZRELADDR)) -gt 1 -a "$(CONFIG_AUTO_ZRELADDR)" = "" ]; then \ | ||
144 | echo 'multiple zreladdrs: $(ZRELADDR)'; \ | ||
145 | echo 'This needs CONFIG_AUTO_ZRELADDR to be set'; \ | ||
146 | false; \ | ||
147 | fi | ||
148 | |||
142 | $(obj)/vmlinux: $(obj)/vmlinux.lds $(obj)/$(HEAD) $(obj)/piggy.$(suffix_y).o \ | 149 | $(obj)/vmlinux: $(obj)/vmlinux.lds $(obj)/$(HEAD) $(obj)/piggy.$(suffix_y).o \ |
143 | $(addprefix $(obj)/, $(OBJS)) $(lib1funcs) FORCE | 150 | $(addprefix $(obj)/, $(OBJS)) $(lib1funcs) FORCE |
151 | @$(check_for_multiple_zreladdr) | ||
144 | $(call if_changed,ld) | 152 | $(call if_changed,ld) |
145 | @$(check_for_bad_syms) | 153 | @$(check_for_bad_syms) |
146 | 154 | ||
diff --git a/arch/arm/boot/dts/tegra-harmony.dts b/arch/arm/boot/dts/tegra-harmony.dts index 4c053340ce33..e5818668d091 100644 --- a/arch/arm/boot/dts/tegra-harmony.dts +++ b/arch/arm/boot/dts/tegra-harmony.dts | |||
@@ -57,14 +57,14 @@ | |||
57 | }; | 57 | }; |
58 | 58 | ||
59 | sdhci@c8000200 { | 59 | sdhci@c8000200 { |
60 | gpios = <&gpio 69 0>, /* cd, gpio PI5 */ | 60 | cd-gpios = <&gpio 69 0>; /* gpio PI5 */ |
61 | <&gpio 57 0>, /* wp, gpio PH1 */ | 61 | wp-gpios = <&gpio 57 0>; /* gpio PH1 */ |
62 | <&gpio 155 0>; /* power, gpio PT3 */ | 62 | power-gpios = <&gpio 155 0>; /* gpio PT3 */ |
63 | }; | 63 | }; |
64 | 64 | ||
65 | sdhci@c8000600 { | 65 | sdhci@c8000600 { |
66 | gpios = <&gpio 58 0>, /* cd, gpio PH2 */ | 66 | cd-gpios = <&gpio 58 0>; /* gpio PH2 */ |
67 | <&gpio 59 0>, /* wp, gpio PH3 */ | 67 | wp-gpios = <&gpio 59 0>; /* gpio PH3 */ |
68 | <&gpio 70 0>; /* power, gpio PI6 */ | 68 | power-gpios = <&gpio 70 0>; /* gpio PI6 */ |
69 | }; | 69 | }; |
70 | }; | 70 | }; |
diff --git a/arch/arm/boot/dts/tegra-seaboard.dts b/arch/arm/boot/dts/tegra-seaboard.dts index 1940cae00748..64cedca6fc79 100644 --- a/arch/arm/boot/dts/tegra-seaboard.dts +++ b/arch/arm/boot/dts/tegra-seaboard.dts | |||
@@ -21,8 +21,8 @@ | |||
21 | }; | 21 | }; |
22 | 22 | ||
23 | sdhci@c8000400 { | 23 | sdhci@c8000400 { |
24 | gpios = <&gpio 69 0>, /* cd, gpio PI5 */ | 24 | cd-gpios = <&gpio 69 0>; /* gpio PI5 */ |
25 | <&gpio 57 0>, /* wp, gpio PH1 */ | 25 | wp-gpios = <&gpio 57 0>; /* gpio PH1 */ |
26 | <&gpio 70 0>; /* power, gpio PI6 */ | 26 | power-gpios = <&gpio 70 0>; /* gpio PI6 */ |
27 | }; | 27 | }; |
28 | }; | 28 | }; |
diff --git a/arch/arm/common/gic.c b/arch/arm/common/gic.c index 3227ca952a12..666b278e56d7 100644 --- a/arch/arm/common/gic.c +++ b/arch/arm/common/gic.c | |||
@@ -180,7 +180,7 @@ static int gic_set_affinity(struct irq_data *d, const struct cpumask *mask_val, | |||
180 | return -EINVAL; | 180 | return -EINVAL; |
181 | 181 | ||
182 | mask = 0xff << shift; | 182 | mask = 0xff << shift; |
183 | bit = 1 << (cpu + shift); | 183 | bit = 1 << (cpu_logical_map(cpu) + shift); |
184 | 184 | ||
185 | spin_lock(&irq_controller_lock); | 185 | spin_lock(&irq_controller_lock); |
186 | val = readl_relaxed(reg) & ~mask; | 186 | val = readl_relaxed(reg) & ~mask; |
@@ -259,9 +259,15 @@ static void __init gic_dist_init(struct gic_chip_data *gic, | |||
259 | unsigned int irq_start) | 259 | unsigned int irq_start) |
260 | { | 260 | { |
261 | unsigned int gic_irqs, irq_limit, i; | 261 | unsigned int gic_irqs, irq_limit, i; |
262 | u32 cpumask; | ||
262 | void __iomem *base = gic->dist_base; | 263 | void __iomem *base = gic->dist_base; |
263 | u32 cpumask = 1 << smp_processor_id(); | 264 | u32 cpu = 0; |
264 | 265 | ||
266 | #ifdef CONFIG_SMP | ||
267 | cpu = cpu_logical_map(smp_processor_id()); | ||
268 | #endif | ||
269 | |||
270 | cpumask = 1 << cpu; | ||
265 | cpumask |= cpumask << 8; | 271 | cpumask |= cpumask << 8; |
266 | cpumask |= cpumask << 16; | 272 | cpumask |= cpumask << 16; |
267 | 273 | ||
@@ -382,7 +388,12 @@ void __cpuinit gic_enable_ppi(unsigned int irq) | |||
382 | #ifdef CONFIG_SMP | 388 | #ifdef CONFIG_SMP |
383 | void gic_raise_softirq(const struct cpumask *mask, unsigned int irq) | 389 | void gic_raise_softirq(const struct cpumask *mask, unsigned int irq) |
384 | { | 390 | { |
385 | unsigned long map = *cpus_addr(*mask); | 391 | int cpu; |
392 | unsigned long map = 0; | ||
393 | |||
394 | /* Convert our logical CPU mask into a physical one. */ | ||
395 | for_each_cpu(cpu, mask) | ||
396 | map |= 1 << cpu_logical_map(cpu); | ||
386 | 397 | ||
387 | /* | 398 | /* |
388 | * Ensure that stores to Normal memory are visible to the | 399 | * Ensure that stores to Normal memory are visible to the |
diff --git a/arch/arm/common/pl330.c b/arch/arm/common/pl330.c index 97912fa48782..7129cfbdacd6 100644 --- a/arch/arm/common/pl330.c +++ b/arch/arm/common/pl330.c | |||
@@ -1546,7 +1546,7 @@ int pl330_chan_ctrl(void *ch_id, enum pl330_chan_op op) | |||
1546 | 1546 | ||
1547 | /* Start the next */ | 1547 | /* Start the next */ |
1548 | case PL330_OP_START: | 1548 | case PL330_OP_START: |
1549 | if (!_start(thrd)) | 1549 | if (!_thrd_active(thrd) && !_start(thrd)) |
1550 | ret = -EIO; | 1550 | ret = -EIO; |
1551 | break; | 1551 | break; |
1552 | 1552 | ||
diff --git a/arch/arm/common/vic.c b/arch/arm/common/vic.c index 7aa4262ada7a..01f18a421b17 100644 --- a/arch/arm/common/vic.c +++ b/arch/arm/common/vic.c | |||
@@ -259,7 +259,6 @@ static void __init vic_disable(void __iomem *base) | |||
259 | writel(0, base + VIC_INT_SELECT); | 259 | writel(0, base + VIC_INT_SELECT); |
260 | writel(0, base + VIC_INT_ENABLE); | 260 | writel(0, base + VIC_INT_ENABLE); |
261 | writel(~0, base + VIC_INT_ENABLE_CLEAR); | 261 | writel(~0, base + VIC_INT_ENABLE_CLEAR); |
262 | writel(0, base + VIC_IRQ_STATUS); | ||
263 | writel(0, base + VIC_ITCR); | 262 | writel(0, base + VIC_ITCR); |
264 | writel(~0, base + VIC_INT_SOFT_CLEAR); | 263 | writel(~0, base + VIC_INT_SOFT_CLEAR); |
265 | } | 264 | } |
@@ -347,7 +346,8 @@ void __init vic_init(void __iomem *base, unsigned int irq_start, | |||
347 | 346 | ||
348 | /* Identify which VIC cell this one is, by reading the ID */ | 347 | /* Identify which VIC cell this one is, by reading the ID */ |
349 | for (i = 0; i < 4; i++) { | 348 | for (i = 0; i < 4; i++) { |
350 | u32 addr = ((u32)base & PAGE_MASK) + 0xfe0 + (i * 4); | 349 | void __iomem *addr; |
350 | addr = (void __iomem *)((u32)base & PAGE_MASK) + 0xfe0 + (i * 4); | ||
351 | cellid |= (readl(addr) & 0xff) << (8 * i); | 351 | cellid |= (readl(addr) & 0xff) << (8 * i); |
352 | } | 352 | } |
353 | vendor = (cellid >> 12) & 0xff; | 353 | vendor = (cellid >> 12) & 0xff; |
diff --git a/arch/arm/configs/integrator_defconfig b/arch/arm/configs/integrator_defconfig index 7196ade07e27..1103f62a1964 100644 --- a/arch/arm/configs/integrator_defconfig +++ b/arch/arm/configs/integrator_defconfig | |||
@@ -1,5 +1,6 @@ | |||
1 | CONFIG_EXPERIMENTAL=y | 1 | CONFIG_EXPERIMENTAL=y |
2 | CONFIG_SYSVIPC=y | 2 | CONFIG_SYSVIPC=y |
3 | CONFIG_TINY_RCU=y | ||
3 | CONFIG_IKCONFIG=y | 4 | CONFIG_IKCONFIG=y |
4 | CONFIG_IKCONFIG_PROC=y | 5 | CONFIG_IKCONFIG_PROC=y |
5 | CONFIG_LOG_BUF_SHIFT=14 | 6 | CONFIG_LOG_BUF_SHIFT=14 |
@@ -8,20 +9,29 @@ CONFIG_MODULES=y | |||
8 | CONFIG_MODULE_UNLOAD=y | 9 | CONFIG_MODULE_UNLOAD=y |
9 | CONFIG_ARCH_INTEGRATOR=y | 10 | CONFIG_ARCH_INTEGRATOR=y |
10 | CONFIG_ARCH_INTEGRATOR_AP=y | 11 | CONFIG_ARCH_INTEGRATOR_AP=y |
12 | CONFIG_ARCH_INTEGRATOR_CP=y | ||
11 | CONFIG_CPU_ARM720T=y | 13 | CONFIG_CPU_ARM720T=y |
12 | CONFIG_CPU_ARM920T=y | 14 | CONFIG_CPU_ARM920T=y |
15 | CONFIG_CPU_ARM922T=y | ||
16 | CONFIG_CPU_ARM926T=y | ||
17 | CONFIG_CPU_ARM1020=y | ||
18 | CONFIG_CPU_ARM1022=y | ||
19 | CONFIG_CPU_ARM1026=y | ||
13 | CONFIG_PCI=y | 20 | CONFIG_PCI=y |
21 | CONFIG_NO_HZ=y | ||
22 | CONFIG_HIGH_RES_TIMERS=y | ||
23 | CONFIG_PREEMPT=y | ||
24 | CONFIG_AEABI=y | ||
14 | CONFIG_LEDS=y | 25 | CONFIG_LEDS=y |
15 | CONFIG_LEDS_CPU=y | 26 | CONFIG_LEDS_CPU=y |
16 | CONFIG_ZBOOT_ROM_TEXT=0x0 | 27 | CONFIG_ZBOOT_ROM_TEXT=0x0 |
17 | CONFIG_ZBOOT_ROM_BSS=0x0 | 28 | CONFIG_ZBOOT_ROM_BSS=0x0 |
18 | CONFIG_CMDLINE="console=ttyAM0,38400n8 root=/dev/nfs ip=bootp mem=32M" | 29 | CONFIG_CMDLINE="console=ttyAM0,38400n8 root=/dev/nfs ip=bootp" |
19 | CONFIG_CPU_FREQ=y | 30 | CONFIG_CPU_FREQ=y |
20 | CONFIG_CPU_FREQ_GOV_POWERSAVE=y | 31 | CONFIG_CPU_FREQ_GOV_POWERSAVE=y |
21 | CONFIG_CPU_FREQ_GOV_USERSPACE=y | 32 | CONFIG_CPU_FREQ_GOV_USERSPACE=y |
22 | CONFIG_CPU_FREQ_GOV_ONDEMAND=y | 33 | CONFIG_CPU_FREQ_GOV_ONDEMAND=y |
23 | CONFIG_FPE_NWFPE=y | 34 | CONFIG_FPE_NWFPE=y |
24 | CONFIG_PM=y | ||
25 | CONFIG_NET=y | 35 | CONFIG_NET=y |
26 | CONFIG_PACKET=y | 36 | CONFIG_PACKET=y |
27 | CONFIG_UNIX=y | 37 | CONFIG_UNIX=y |
@@ -32,7 +42,6 @@ CONFIG_IP_PNP_DHCP=y | |||
32 | CONFIG_IP_PNP_BOOTP=y | 42 | CONFIG_IP_PNP_BOOTP=y |
33 | # CONFIG_IPV6 is not set | 43 | # CONFIG_IPV6 is not set |
34 | CONFIG_MTD=y | 44 | CONFIG_MTD=y |
35 | CONFIG_MTD_PARTITIONS=y | ||
36 | CONFIG_MTD_CMDLINE_PARTS=y | 45 | CONFIG_MTD_CMDLINE_PARTS=y |
37 | CONFIG_MTD_AFS_PARTS=y | 46 | CONFIG_MTD_AFS_PARTS=y |
38 | CONFIG_MTD_CHAR=y | 47 | CONFIG_MTD_CHAR=y |
@@ -40,6 +49,7 @@ CONFIG_MTD_BLOCK=y | |||
40 | CONFIG_MTD_CFI=y | 49 | CONFIG_MTD_CFI=y |
41 | CONFIG_MTD_CFI_ADV_OPTIONS=y | 50 | CONFIG_MTD_CFI_ADV_OPTIONS=y |
42 | CONFIG_MTD_CFI_INTELEXT=y | 51 | CONFIG_MTD_CFI_INTELEXT=y |
52 | CONFIG_MTD_PHYSMAP=y | ||
43 | CONFIG_BLK_DEV_LOOP=y | 53 | CONFIG_BLK_DEV_LOOP=y |
44 | CONFIG_BLK_DEV_RAM=y | 54 | CONFIG_BLK_DEV_RAM=y |
45 | CONFIG_BLK_DEV_RAM_SIZE=8192 | 55 | CONFIG_BLK_DEV_RAM_SIZE=8192 |
@@ -56,6 +66,8 @@ CONFIG_FB_MODE_HELPERS=y | |||
56 | CONFIG_FB_MATROX=y | 66 | CONFIG_FB_MATROX=y |
57 | CONFIG_FB_MATROX_MILLENIUM=y | 67 | CONFIG_FB_MATROX_MILLENIUM=y |
58 | CONFIG_FB_MATROX_MYSTIQUE=y | 68 | CONFIG_FB_MATROX_MYSTIQUE=y |
69 | CONFIG_RTC_CLASS=y | ||
70 | CONFIG_RTC_DRV_PL030=y | ||
59 | CONFIG_EXT2_FS=y | 71 | CONFIG_EXT2_FS=y |
60 | CONFIG_TMPFS=y | 72 | CONFIG_TMPFS=y |
61 | CONFIG_JFFS2_FS=y | 73 | CONFIG_JFFS2_FS=y |
@@ -68,4 +80,3 @@ CONFIG_NFSD_V3=y | |||
68 | CONFIG_PARTITION_ADVANCED=y | 80 | CONFIG_PARTITION_ADVANCED=y |
69 | CONFIG_MAGIC_SYSRQ=y | 81 | CONFIG_MAGIC_SYSRQ=y |
70 | CONFIG_DEBUG_KERNEL=y | 82 | CONFIG_DEBUG_KERNEL=y |
71 | CONFIG_DEBUG_ERRORS=y | ||
diff --git a/arch/arm/include/asm/Kbuild b/arch/arm/include/asm/Kbuild index 6550db3aa5c7..960abceb8e14 100644 --- a/arch/arm/include/asm/Kbuild +++ b/arch/arm/include/asm/Kbuild | |||
@@ -1,3 +1,20 @@ | |||
1 | include include/asm-generic/Kbuild.asm | 1 | include include/asm-generic/Kbuild.asm |
2 | 2 | ||
3 | header-y += hwcap.h | 3 | header-y += hwcap.h |
4 | |||
5 | generic-y += auxvec.h | ||
6 | generic-y += bitsperlong.h | ||
7 | generic-y += cputime.h | ||
8 | generic-y += emergency-restart.h | ||
9 | generic-y += errno.h | ||
10 | generic-y += ioctl.h | ||
11 | generic-y += irq_regs.h | ||
12 | generic-y += kdebug.h | ||
13 | generic-y += local.h | ||
14 | generic-y += local64.h | ||
15 | generic-y += percpu.h | ||
16 | generic-y += poll.h | ||
17 | generic-y += resource.h | ||
18 | generic-y += sections.h | ||
19 | generic-y += siginfo.h | ||
20 | generic-y += sizes.h | ||
diff --git a/arch/arm/include/asm/auxvec.h b/arch/arm/include/asm/auxvec.h deleted file mode 100644 index c0536f6b29a7..000000000000 --- a/arch/arm/include/asm/auxvec.h +++ /dev/null | |||
@@ -1,4 +0,0 @@ | |||
1 | #ifndef __ASMARM_AUXVEC_H | ||
2 | #define __ASMARM_AUXVEC_H | ||
3 | |||
4 | #endif | ||
diff --git a/arch/arm/include/asm/bitsperlong.h b/arch/arm/include/asm/bitsperlong.h deleted file mode 100644 index 6dc0bb0c13b2..000000000000 --- a/arch/arm/include/asm/bitsperlong.h +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | #include <asm-generic/bitsperlong.h> | ||
diff --git a/arch/arm/include/asm/bug.h b/arch/arm/include/asm/bug.h index 4d88425a4169..9abe7a07d5ac 100644 --- a/arch/arm/include/asm/bug.h +++ b/arch/arm/include/asm/bug.h | |||
@@ -3,21 +3,58 @@ | |||
3 | 3 | ||
4 | 4 | ||
5 | #ifdef CONFIG_BUG | 5 | #ifdef CONFIG_BUG |
6 | #ifdef CONFIG_DEBUG_BUGVERBOSE | ||
7 | extern void __bug(const char *file, int line) __attribute__((noreturn)); | ||
8 | |||
9 | /* give file/line information */ | ||
10 | #define BUG() __bug(__FILE__, __LINE__) | ||
11 | 6 | ||
7 | /* | ||
8 | * Use a suitable undefined instruction to use for ARM/Thumb2 bug handling. | ||
9 | * We need to be careful not to conflict with those used by other modules and | ||
10 | * the register_undef_hook() system. | ||
11 | */ | ||
12 | #ifdef CONFIG_THUMB2_KERNEL | ||
13 | #define BUG_INSTR_VALUE 0xde02 | ||
14 | #define BUG_INSTR_TYPE ".hword " | ||
12 | #else | 15 | #else |
16 | #define BUG_INSTR_VALUE 0xe7f001f2 | ||
17 | #define BUG_INSTR_TYPE ".word " | ||
18 | #endif | ||
13 | 19 | ||
14 | /* this just causes an oops */ | ||
15 | #define BUG() do { *(int *)0 = 0; } while (1) | ||
16 | 20 | ||
17 | #endif | 21 | #define BUG() _BUG(__FILE__, __LINE__, BUG_INSTR_VALUE) |
22 | #define _BUG(file, line, value) __BUG(file, line, value) | ||
23 | |||
24 | #ifdef CONFIG_DEBUG_BUGVERBOSE | ||
25 | |||
26 | /* | ||
27 | * The extra indirection is to ensure that the __FILE__ string comes through | ||
28 | * OK. Many version of gcc do not support the asm %c parameter which would be | ||
29 | * preferable to this unpleasantness. We use mergeable string sections to | ||
30 | * avoid multiple copies of the string appearing in the kernel image. | ||
31 | */ | ||
32 | |||
33 | #define __BUG(__file, __line, __value) \ | ||
34 | do { \ | ||
35 | BUILD_BUG_ON(sizeof(struct bug_entry) != 12); \ | ||
36 | asm volatile("1:\t" BUG_INSTR_TYPE #__value "\n" \ | ||
37 | ".pushsection .rodata.str, \"aMS\", %progbits, 1\n" \ | ||
38 | "2:\t.asciz " #__file "\n" \ | ||
39 | ".popsection\n" \ | ||
40 | ".pushsection __bug_table,\"a\"\n" \ | ||
41 | "3:\t.word 1b, 2b\n" \ | ||
42 | "\t.hword " #__line ", 0\n" \ | ||
43 | ".popsection"); \ | ||
44 | unreachable(); \ | ||
45 | } while (0) | ||
46 | |||
47 | #else /* not CONFIG_DEBUG_BUGVERBOSE */ | ||
48 | |||
49 | #define __BUG(__file, __line, __value) \ | ||
50 | do { \ | ||
51 | asm volatile(BUG_INSTR_TYPE #__value); \ | ||
52 | unreachable(); \ | ||
53 | } while (0) | ||
54 | #endif /* CONFIG_DEBUG_BUGVERBOSE */ | ||
18 | 55 | ||
19 | #define HAVE_ARCH_BUG | 56 | #define HAVE_ARCH_BUG |
20 | #endif | 57 | #endif /* CONFIG_BUG */ |
21 | 58 | ||
22 | #include <asm-generic/bug.h> | 59 | #include <asm-generic/bug.h> |
23 | 60 | ||
diff --git a/arch/arm/include/asm/cachetype.h b/arch/arm/include/asm/cachetype.h index c023db09fcc1..7ea78144ae22 100644 --- a/arch/arm/include/asm/cachetype.h +++ b/arch/arm/include/asm/cachetype.h | |||
@@ -7,6 +7,7 @@ | |||
7 | #define CACHEID_VIPT (CACHEID_VIPT_ALIASING|CACHEID_VIPT_NONALIASING) | 7 | #define CACHEID_VIPT (CACHEID_VIPT_ALIASING|CACHEID_VIPT_NONALIASING) |
8 | #define CACHEID_ASID_TAGGED (1 << 3) | 8 | #define CACHEID_ASID_TAGGED (1 << 3) |
9 | #define CACHEID_VIPT_I_ALIASING (1 << 4) | 9 | #define CACHEID_VIPT_I_ALIASING (1 << 4) |
10 | #define CACHEID_PIPT (1 << 5) | ||
10 | 11 | ||
11 | extern unsigned int cacheid; | 12 | extern unsigned int cacheid; |
12 | 13 | ||
@@ -16,6 +17,7 @@ extern unsigned int cacheid; | |||
16 | #define cache_is_vipt_aliasing() cacheid_is(CACHEID_VIPT_ALIASING) | 17 | #define cache_is_vipt_aliasing() cacheid_is(CACHEID_VIPT_ALIASING) |
17 | #define icache_is_vivt_asid_tagged() cacheid_is(CACHEID_ASID_TAGGED) | 18 | #define icache_is_vivt_asid_tagged() cacheid_is(CACHEID_ASID_TAGGED) |
18 | #define icache_is_vipt_aliasing() cacheid_is(CACHEID_VIPT_I_ALIASING) | 19 | #define icache_is_vipt_aliasing() cacheid_is(CACHEID_VIPT_I_ALIASING) |
20 | #define icache_is_pipt() cacheid_is(CACHEID_PIPT) | ||
19 | 21 | ||
20 | /* | 22 | /* |
21 | * __LINUX_ARM_ARCH__ is the minimum supported CPU architecture | 23 | * __LINUX_ARM_ARCH__ is the minimum supported CPU architecture |
@@ -26,7 +28,8 @@ extern unsigned int cacheid; | |||
26 | #if __LINUX_ARM_ARCH__ >= 7 | 28 | #if __LINUX_ARM_ARCH__ >= 7 |
27 | #define __CACHEID_ARCH_MIN (CACHEID_VIPT_NONALIASING |\ | 29 | #define __CACHEID_ARCH_MIN (CACHEID_VIPT_NONALIASING |\ |
28 | CACHEID_ASID_TAGGED |\ | 30 | CACHEID_ASID_TAGGED |\ |
29 | CACHEID_VIPT_I_ALIASING) | 31 | CACHEID_VIPT_I_ALIASING |\ |
32 | CACHEID_PIPT) | ||
30 | #elif __LINUX_ARM_ARCH__ >= 6 | 33 | #elif __LINUX_ARM_ARCH__ >= 6 |
31 | #define __CACHEID_ARCH_MIN (~CACHEID_VIVT) | 34 | #define __CACHEID_ARCH_MIN (~CACHEID_VIVT) |
32 | #else | 35 | #else |
diff --git a/arch/arm/include/asm/cputime.h b/arch/arm/include/asm/cputime.h deleted file mode 100644 index 3a8002a5fec7..000000000000 --- a/arch/arm/include/asm/cputime.h +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | #ifndef __ARM_CPUTIME_H | ||
2 | #define __ARM_CPUTIME_H | ||
3 | |||
4 | #include <asm-generic/cputime.h> | ||
5 | |||
6 | #endif /* __ARM_CPUTIME_H */ | ||
diff --git a/arch/arm/include/asm/cputype.h b/arch/arm/include/asm/cputype.h index cd4458f64171..cb47d28cbe1f 100644 --- a/arch/arm/include/asm/cputype.h +++ b/arch/arm/include/asm/cputype.h | |||
@@ -8,6 +8,7 @@ | |||
8 | #define CPUID_CACHETYPE 1 | 8 | #define CPUID_CACHETYPE 1 |
9 | #define CPUID_TCM 2 | 9 | #define CPUID_TCM 2 |
10 | #define CPUID_TLBTYPE 3 | 10 | #define CPUID_TLBTYPE 3 |
11 | #define CPUID_MPIDR 5 | ||
11 | 12 | ||
12 | #define CPUID_EXT_PFR0 "c1, 0" | 13 | #define CPUID_EXT_PFR0 "c1, 0" |
13 | #define CPUID_EXT_PFR1 "c1, 1" | 14 | #define CPUID_EXT_PFR1 "c1, 1" |
@@ -70,6 +71,11 @@ static inline unsigned int __attribute_const__ read_cpuid_tcmstatus(void) | |||
70 | return read_cpuid(CPUID_TCM); | 71 | return read_cpuid(CPUID_TCM); |
71 | } | 72 | } |
72 | 73 | ||
74 | static inline unsigned int __attribute_const__ read_cpuid_mpidr(void) | ||
75 | { | ||
76 | return read_cpuid(CPUID_MPIDR); | ||
77 | } | ||
78 | |||
73 | /* | 79 | /* |
74 | * Intel's XScale3 core supports some v6 features (supersections, L2) | 80 | * Intel's XScale3 core supports some v6 features (supersections, L2) |
75 | * but advertises itself as v5 as it does not support the v6 ISA. For | 81 | * but advertises itself as v5 as it does not support the v6 ISA. For |
diff --git a/arch/arm/include/asm/device.h b/arch/arm/include/asm/device.h index 9f390ce335cb..6615f03f56a5 100644 --- a/arch/arm/include/asm/device.h +++ b/arch/arm/include/asm/device.h | |||
@@ -10,6 +10,9 @@ struct dev_archdata { | |||
10 | #ifdef CONFIG_DMABOUNCE | 10 | #ifdef CONFIG_DMABOUNCE |
11 | struct dmabounce_device_info *dmabounce; | 11 | struct dmabounce_device_info *dmabounce; |
12 | #endif | 12 | #endif |
13 | #ifdef CONFIG_IOMMU_API | ||
14 | void *iommu; /* private IOMMU data */ | ||
15 | #endif | ||
13 | }; | 16 | }; |
14 | 17 | ||
15 | struct pdev_archdata { | 18 | struct pdev_archdata { |
diff --git a/arch/arm/include/asm/dma-mapping.h b/arch/arm/include/asm/dma-mapping.h index 7a21d0bf7134..28b7ee8d7398 100644 --- a/arch/arm/include/asm/dma-mapping.h +++ b/arch/arm/include/asm/dma-mapping.h | |||
@@ -32,7 +32,7 @@ static inline unsigned long dma_to_pfn(struct device *dev, dma_addr_t addr) | |||
32 | 32 | ||
33 | static inline void *dma_to_virt(struct device *dev, dma_addr_t addr) | 33 | static inline void *dma_to_virt(struct device *dev, dma_addr_t addr) |
34 | { | 34 | { |
35 | return (void *)__bus_to_virt(addr); | 35 | return (void *)__bus_to_virt((unsigned long)addr); |
36 | } | 36 | } |
37 | 37 | ||
38 | static inline dma_addr_t virt_to_dma(struct device *dev, void *addr) | 38 | static inline dma_addr_t virt_to_dma(struct device *dev, void *addr) |
diff --git a/arch/arm/include/asm/ecard.h b/arch/arm/include/asm/ecard.h index 29f2610efc70..eaea14676d57 100644 --- a/arch/arm/include/asm/ecard.h +++ b/arch/arm/include/asm/ecard.h | |||
@@ -161,7 +161,6 @@ struct expansion_card { | |||
161 | 161 | ||
162 | /* Private internal data */ | 162 | /* Private internal data */ |
163 | const char *card_desc; /* Card description */ | 163 | const char *card_desc; /* Card description */ |
164 | CONST unsigned int podaddr; /* Base Linux address for card */ | ||
165 | CONST loader_t loader; /* loader program */ | 164 | CONST loader_t loader; /* loader program */ |
166 | u64 dma_mask; | 165 | u64 dma_mask; |
167 | }; | 166 | }; |
diff --git a/arch/arm/include/asm/emergency-restart.h b/arch/arm/include/asm/emergency-restart.h deleted file mode 100644 index 108d8c48e42e..000000000000 --- a/arch/arm/include/asm/emergency-restart.h +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | #ifndef _ASM_EMERGENCY_RESTART_H | ||
2 | #define _ASM_EMERGENCY_RESTART_H | ||
3 | |||
4 | #include <asm-generic/emergency-restart.h> | ||
5 | |||
6 | #endif /* _ASM_EMERGENCY_RESTART_H */ | ||
diff --git a/arch/arm/include/asm/errno.h b/arch/arm/include/asm/errno.h deleted file mode 100644 index 6e60f0612bb6..000000000000 --- a/arch/arm/include/asm/errno.h +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | #ifndef _ARM_ERRNO_H | ||
2 | #define _ARM_ERRNO_H | ||
3 | |||
4 | #include <asm-generic/errno.h> | ||
5 | |||
6 | #endif | ||
diff --git a/arch/arm/include/asm/exception.h b/arch/arm/include/asm/exception.h new file mode 100644 index 000000000000..5abaf5bbd985 --- /dev/null +++ b/arch/arm/include/asm/exception.h | |||
@@ -0,0 +1,19 @@ | |||
1 | /* | ||
2 | * Annotations for marking C functions as exception handlers. | ||
3 | * | ||
4 | * These should only be used for C functions that are called from the low | ||
5 | * level exception entry code and not any intervening C code. | ||
6 | */ | ||
7 | #ifndef __ASM_ARM_EXCEPTION_H | ||
8 | #define __ASM_ARM_EXCEPTION_H | ||
9 | |||
10 | #include <linux/ftrace.h> | ||
11 | |||
12 | #define __exception __attribute__((section(".exception.text"))) | ||
13 | #ifdef CONFIG_FUNCTION_GRAPH_TRACER | ||
14 | #define __exception_irq_entry __irq_entry | ||
15 | #else | ||
16 | #define __exception_irq_entry __exception | ||
17 | #endif | ||
18 | |||
19 | #endif /* __ASM_ARM_EXCEPTION_H */ | ||
diff --git a/arch/arm/include/asm/futex.h b/arch/arm/include/asm/futex.h index 8c73900da9ed..253cc86318bf 100644 --- a/arch/arm/include/asm/futex.h +++ b/arch/arm/include/asm/futex.h | |||
@@ -25,17 +25,17 @@ | |||
25 | 25 | ||
26 | #ifdef CONFIG_SMP | 26 | #ifdef CONFIG_SMP |
27 | 27 | ||
28 | #define __futex_atomic_op(insn, ret, oldval, uaddr, oparg) \ | 28 | #define __futex_atomic_op(insn, ret, oldval, tmp, uaddr, oparg) \ |
29 | smp_mb(); \ | 29 | smp_mb(); \ |
30 | __asm__ __volatile__( \ | 30 | __asm__ __volatile__( \ |
31 | "1: ldrex %1, [%2]\n" \ | 31 | "1: ldrex %1, [%3]\n" \ |
32 | " " insn "\n" \ | 32 | " " insn "\n" \ |
33 | "2: strex %1, %0, [%2]\n" \ | 33 | "2: strex %2, %0, [%3]\n" \ |
34 | " teq %1, #0\n" \ | 34 | " teq %2, #0\n" \ |
35 | " bne 1b\n" \ | 35 | " bne 1b\n" \ |
36 | " mov %0, #0\n" \ | 36 | " mov %0, #0\n" \ |
37 | __futex_atomic_ex_table("%4") \ | 37 | __futex_atomic_ex_table("%5") \ |
38 | : "=&r" (ret), "=&r" (oldval) \ | 38 | : "=&r" (ret), "=&r" (oldval), "=&r" (tmp) \ |
39 | : "r" (uaddr), "r" (oparg), "Ir" (-EFAULT) \ | 39 | : "r" (uaddr), "r" (oparg), "Ir" (-EFAULT) \ |
40 | : "cc", "memory") | 40 | : "cc", "memory") |
41 | 41 | ||
@@ -73,14 +73,14 @@ futex_atomic_cmpxchg_inatomic(u32 *uval, u32 __user *uaddr, | |||
73 | #include <linux/preempt.h> | 73 | #include <linux/preempt.h> |
74 | #include <asm/domain.h> | 74 | #include <asm/domain.h> |
75 | 75 | ||
76 | #define __futex_atomic_op(insn, ret, oldval, uaddr, oparg) \ | 76 | #define __futex_atomic_op(insn, ret, oldval, tmp, uaddr, oparg) \ |
77 | __asm__ __volatile__( \ | 77 | __asm__ __volatile__( \ |
78 | "1: " T(ldr) " %1, [%2]\n" \ | 78 | "1: " T(ldr) " %1, [%3]\n" \ |
79 | " " insn "\n" \ | 79 | " " insn "\n" \ |
80 | "2: " T(str) " %0, [%2]\n" \ | 80 | "2: " T(str) " %0, [%3]\n" \ |
81 | " mov %0, #0\n" \ | 81 | " mov %0, #0\n" \ |
82 | __futex_atomic_ex_table("%4") \ | 82 | __futex_atomic_ex_table("%5") \ |
83 | : "=&r" (ret), "=&r" (oldval) \ | 83 | : "=&r" (ret), "=&r" (oldval), "=&r" (tmp) \ |
84 | : "r" (uaddr), "r" (oparg), "Ir" (-EFAULT) \ | 84 | : "r" (uaddr), "r" (oparg), "Ir" (-EFAULT) \ |
85 | : "cc", "memory") | 85 | : "cc", "memory") |
86 | 86 | ||
@@ -117,7 +117,7 @@ futex_atomic_op_inuser (int encoded_op, u32 __user *uaddr) | |||
117 | int cmp = (encoded_op >> 24) & 15; | 117 | int cmp = (encoded_op >> 24) & 15; |
118 | int oparg = (encoded_op << 8) >> 20; | 118 | int oparg = (encoded_op << 8) >> 20; |
119 | int cmparg = (encoded_op << 20) >> 20; | 119 | int cmparg = (encoded_op << 20) >> 20; |
120 | int oldval = 0, ret; | 120 | int oldval = 0, ret, tmp; |
121 | 121 | ||
122 | if (encoded_op & (FUTEX_OP_OPARG_SHIFT << 28)) | 122 | if (encoded_op & (FUTEX_OP_OPARG_SHIFT << 28)) |
123 | oparg = 1 << oparg; | 123 | oparg = 1 << oparg; |
@@ -129,19 +129,19 @@ futex_atomic_op_inuser (int encoded_op, u32 __user *uaddr) | |||
129 | 129 | ||
130 | switch (op) { | 130 | switch (op) { |
131 | case FUTEX_OP_SET: | 131 | case FUTEX_OP_SET: |
132 | __futex_atomic_op("mov %0, %3", ret, oldval, uaddr, oparg); | 132 | __futex_atomic_op("mov %0, %4", ret, oldval, tmp, uaddr, oparg); |
133 | break; | 133 | break; |
134 | case FUTEX_OP_ADD: | 134 | case FUTEX_OP_ADD: |
135 | __futex_atomic_op("add %0, %1, %3", ret, oldval, uaddr, oparg); | 135 | __futex_atomic_op("add %0, %1, %4", ret, oldval, tmp, uaddr, oparg); |
136 | break; | 136 | break; |
137 | case FUTEX_OP_OR: | 137 | case FUTEX_OP_OR: |
138 | __futex_atomic_op("orr %0, %1, %3", ret, oldval, uaddr, oparg); | 138 | __futex_atomic_op("orr %0, %1, %4", ret, oldval, tmp, uaddr, oparg); |
139 | break; | 139 | break; |
140 | case FUTEX_OP_ANDN: | 140 | case FUTEX_OP_ANDN: |
141 | __futex_atomic_op("and %0, %1, %3", ret, oldval, uaddr, ~oparg); | 141 | __futex_atomic_op("and %0, %1, %4", ret, oldval, tmp, uaddr, ~oparg); |
142 | break; | 142 | break; |
143 | case FUTEX_OP_XOR: | 143 | case FUTEX_OP_XOR: |
144 | __futex_atomic_op("eor %0, %1, %3", ret, oldval, uaddr, oparg); | 144 | __futex_atomic_op("eor %0, %1, %4", ret, oldval, tmp, uaddr, oparg); |
145 | break; | 145 | break; |
146 | default: | 146 | default: |
147 | ret = -ENOSYS; | 147 | ret = -ENOSYS; |
diff --git a/arch/arm/include/asm/hardware/cache-l2x0.h b/arch/arm/include/asm/hardware/cache-l2x0.h index 99a6ed7e1bfd..434edccdf7f3 100644 --- a/arch/arm/include/asm/hardware/cache-l2x0.h +++ b/arch/arm/include/asm/hardware/cache-l2x0.h | |||
@@ -52,6 +52,8 @@ | |||
52 | #define L2X0_LOCKDOWN_WAY_D_BASE 0x900 | 52 | #define L2X0_LOCKDOWN_WAY_D_BASE 0x900 |
53 | #define L2X0_LOCKDOWN_WAY_I_BASE 0x904 | 53 | #define L2X0_LOCKDOWN_WAY_I_BASE 0x904 |
54 | #define L2X0_LOCKDOWN_STRIDE 0x08 | 54 | #define L2X0_LOCKDOWN_STRIDE 0x08 |
55 | #define L2X0_ADDR_FILTER_START 0xC00 | ||
56 | #define L2X0_ADDR_FILTER_END 0xC04 | ||
55 | #define L2X0_TEST_OPERATION 0xF00 | 57 | #define L2X0_TEST_OPERATION 0xF00 |
56 | #define L2X0_LINE_DATA 0xF10 | 58 | #define L2X0_LINE_DATA 0xF10 |
57 | #define L2X0_LINE_TAG 0xF30 | 59 | #define L2X0_LINE_TAG 0xF30 |
@@ -65,8 +67,23 @@ | |||
65 | #define L2X0_CACHE_ID_PART_MASK (0xf << 6) | 67 | #define L2X0_CACHE_ID_PART_MASK (0xf << 6) |
66 | #define L2X0_CACHE_ID_PART_L210 (1 << 6) | 68 | #define L2X0_CACHE_ID_PART_L210 (1 << 6) |
67 | #define L2X0_CACHE_ID_PART_L310 (3 << 6) | 69 | #define L2X0_CACHE_ID_PART_L310 (3 << 6) |
70 | #define L2X0_CACHE_ID_RTL_MASK 0x3f | ||
71 | #define L2X0_CACHE_ID_RTL_R0P0 0x0 | ||
72 | #define L2X0_CACHE_ID_RTL_R1P0 0x2 | ||
73 | #define L2X0_CACHE_ID_RTL_R2P0 0x4 | ||
74 | #define L2X0_CACHE_ID_RTL_R3P0 0x5 | ||
75 | #define L2X0_CACHE_ID_RTL_R3P1 0x6 | ||
76 | #define L2X0_CACHE_ID_RTL_R3P2 0x8 | ||
68 | 77 | ||
69 | #define L2X0_AUX_CTRL_MASK 0xc0000fff | 78 | #define L2X0_AUX_CTRL_MASK 0xc0000fff |
79 | #define L2X0_AUX_CTRL_DATA_RD_LATENCY_SHIFT 0 | ||
80 | #define L2X0_AUX_CTRL_DATA_RD_LATENCY_MASK 0x7 | ||
81 | #define L2X0_AUX_CTRL_DATA_WR_LATENCY_SHIFT 3 | ||
82 | #define L2X0_AUX_CTRL_DATA_WR_LATENCY_MASK (0x7 << 3) | ||
83 | #define L2X0_AUX_CTRL_TAG_LATENCY_SHIFT 6 | ||
84 | #define L2X0_AUX_CTRL_TAG_LATENCY_MASK (0x7 << 6) | ||
85 | #define L2X0_AUX_CTRL_DIRTY_LATENCY_SHIFT 9 | ||
86 | #define L2X0_AUX_CTRL_DIRTY_LATENCY_MASK (0x7 << 9) | ||
70 | #define L2X0_AUX_CTRL_ASSOCIATIVITY_SHIFT 16 | 87 | #define L2X0_AUX_CTRL_ASSOCIATIVITY_SHIFT 16 |
71 | #define L2X0_AUX_CTRL_WAY_SIZE_SHIFT 17 | 88 | #define L2X0_AUX_CTRL_WAY_SIZE_SHIFT 17 |
72 | #define L2X0_AUX_CTRL_WAY_SIZE_MASK (0x7 << 17) | 89 | #define L2X0_AUX_CTRL_WAY_SIZE_MASK (0x7 << 17) |
@@ -77,8 +94,33 @@ | |||
77 | #define L2X0_AUX_CTRL_INSTR_PREFETCH_SHIFT 29 | 94 | #define L2X0_AUX_CTRL_INSTR_PREFETCH_SHIFT 29 |
78 | #define L2X0_AUX_CTRL_EARLY_BRESP_SHIFT 30 | 95 | #define L2X0_AUX_CTRL_EARLY_BRESP_SHIFT 30 |
79 | 96 | ||
97 | #define L2X0_LATENCY_CTRL_SETUP_SHIFT 0 | ||
98 | #define L2X0_LATENCY_CTRL_RD_SHIFT 4 | ||
99 | #define L2X0_LATENCY_CTRL_WR_SHIFT 8 | ||
100 | |||
101 | #define L2X0_ADDR_FILTER_EN 1 | ||
102 | |||
80 | #ifndef __ASSEMBLY__ | 103 | #ifndef __ASSEMBLY__ |
81 | extern void __init l2x0_init(void __iomem *base, __u32 aux_val, __u32 aux_mask); | 104 | extern void __init l2x0_init(void __iomem *base, __u32 aux_val, __u32 aux_mask); |
105 | extern int l2x0_of_init(__u32 aux_val, __u32 aux_mask); | ||
106 | |||
107 | struct l2x0_regs { | ||
108 | unsigned long phy_base; | ||
109 | unsigned long aux_ctrl; | ||
110 | /* | ||
111 | * Whether the following registers need to be saved/restored | ||
112 | * depends on platform | ||
113 | */ | ||
114 | unsigned long tag_latency; | ||
115 | unsigned long data_latency; | ||
116 | unsigned long filter_start; | ||
117 | unsigned long filter_end; | ||
118 | unsigned long prefetch_ctrl; | ||
119 | unsigned long pwr_ctrl; | ||
120 | }; | ||
121 | |||
122 | extern struct l2x0_regs l2x0_saved_regs; | ||
123 | |||
82 | #endif | 124 | #endif |
83 | 125 | ||
84 | #endif | 126 | #endif |
diff --git a/arch/arm/include/asm/io.h b/arch/arm/include/asm/io.h index 4bdb77bb5e62..065d100fa63e 100644 --- a/arch/arm/include/asm/io.h +++ b/arch/arm/include/asm/io.h | |||
@@ -80,6 +80,7 @@ extern void __iomem *__arm_ioremap_caller(unsigned long, size_t, unsigned int, | |||
80 | 80 | ||
81 | extern void __iomem *__arm_ioremap_pfn(unsigned long, unsigned long, size_t, unsigned int); | 81 | extern void __iomem *__arm_ioremap_pfn(unsigned long, unsigned long, size_t, unsigned int); |
82 | extern void __iomem *__arm_ioremap(unsigned long, size_t, unsigned int); | 82 | extern void __iomem *__arm_ioremap(unsigned long, size_t, unsigned int); |
83 | extern void __iomem *__arm_ioremap_exec(unsigned long, size_t, bool cached); | ||
83 | extern void __iounmap(volatile void __iomem *addr); | 84 | extern void __iounmap(volatile void __iomem *addr); |
84 | 85 | ||
85 | /* | 86 | /* |
@@ -110,6 +111,27 @@ static inline void __iomem *__typesafe_io(unsigned long addr) | |||
110 | #include <mach/io.h> | 111 | #include <mach/io.h> |
111 | 112 | ||
112 | /* | 113 | /* |
114 | * This is the limit of PC card/PCI/ISA IO space, which is by default | ||
115 | * 64K if we have PC card, PCI or ISA support. Otherwise, default to | ||
116 | * zero to prevent ISA/PCI drivers claiming IO space (and potentially | ||
117 | * oopsing.) | ||
118 | * | ||
119 | * Only set this larger if you really need inb() et.al. to operate over | ||
120 | * a larger address space. Note that SOC_COMMON ioremaps each sockets | ||
121 | * IO space area, and so inb() et.al. must be defined to operate as per | ||
122 | * readb() et.al. on such platforms. | ||
123 | */ | ||
124 | #ifndef IO_SPACE_LIMIT | ||
125 | #if defined(CONFIG_PCMCIA_SOC_COMMON) || defined(CONFIG_PCMCIA_SOC_COMMON_MODULE) | ||
126 | #define IO_SPACE_LIMIT ((resource_size_t)0xffffffff) | ||
127 | #elif defined(CONFIG_PCI) || defined(CONFIG_ISA) || defined(CONFIG_PCCARD) | ||
128 | #define IO_SPACE_LIMIT ((resource_size_t)0xffff) | ||
129 | #else | ||
130 | #define IO_SPACE_LIMIT ((resource_size_t)0) | ||
131 | #endif | ||
132 | #endif | ||
133 | |||
134 | /* | ||
113 | * IO port access primitives | 135 | * IO port access primitives |
114 | * ------------------------- | 136 | * ------------------------- |
115 | * | 137 | * |
@@ -189,11 +211,11 @@ extern void _memset_io(volatile void __iomem *, int, size_t); | |||
189 | * IO port primitives for more information. | 211 | * IO port primitives for more information. |
190 | */ | 212 | */ |
191 | #ifdef __mem_pci | 213 | #ifdef __mem_pci |
192 | #define readb_relaxed(c) ({ u8 __v = __raw_readb(__mem_pci(c)); __v; }) | 214 | #define readb_relaxed(c) ({ u8 __r = __raw_readb(__mem_pci(c)); __r; }) |
193 | #define readw_relaxed(c) ({ u16 __v = le16_to_cpu((__force __le16) \ | 215 | #define readw_relaxed(c) ({ u16 __r = le16_to_cpu((__force __le16) \ |
194 | __raw_readw(__mem_pci(c))); __v; }) | 216 | __raw_readw(__mem_pci(c))); __r; }) |
195 | #define readl_relaxed(c) ({ u32 __v = le32_to_cpu((__force __le32) \ | 217 | #define readl_relaxed(c) ({ u32 __r = le32_to_cpu((__force __le32) \ |
196 | __raw_readl(__mem_pci(c))); __v; }) | 218 | __raw_readl(__mem_pci(c))); __r; }) |
197 | 219 | ||
198 | #define writeb_relaxed(v,c) ((void)__raw_writeb(v,__mem_pci(c))) | 220 | #define writeb_relaxed(v,c) ((void)__raw_writeb(v,__mem_pci(c))) |
199 | #define writew_relaxed(v,c) ((void)__raw_writew((__force u16) \ | 221 | #define writew_relaxed(v,c) ((void)__raw_writew((__force u16) \ |
@@ -260,10 +282,16 @@ extern void _memset_io(volatile void __iomem *, int, size_t); | |||
260 | #define ioread16(p) ({ unsigned int __v = le16_to_cpu((__force __le16)__raw_readw(p)); __iormb(); __v; }) | 282 | #define ioread16(p) ({ unsigned int __v = le16_to_cpu((__force __le16)__raw_readw(p)); __iormb(); __v; }) |
261 | #define ioread32(p) ({ unsigned int __v = le32_to_cpu((__force __le32)__raw_readl(p)); __iormb(); __v; }) | 283 | #define ioread32(p) ({ unsigned int __v = le32_to_cpu((__force __le32)__raw_readl(p)); __iormb(); __v; }) |
262 | 284 | ||
285 | #define ioread16be(p) ({ unsigned int __v = be16_to_cpu((__force __be16)__raw_readw(p)); __iormb(); __v; }) | ||
286 | #define ioread32be(p) ({ unsigned int __v = be32_to_cpu((__force __be32)__raw_readl(p)); __iormb(); __v; }) | ||
287 | |||
263 | #define iowrite8(v,p) ({ __iowmb(); (void)__raw_writeb(v, p); }) | 288 | #define iowrite8(v,p) ({ __iowmb(); (void)__raw_writeb(v, p); }) |
264 | #define iowrite16(v,p) ({ __iowmb(); (void)__raw_writew((__force __u16)cpu_to_le16(v), p); }) | 289 | #define iowrite16(v,p) ({ __iowmb(); (void)__raw_writew((__force __u16)cpu_to_le16(v), p); }) |
265 | #define iowrite32(v,p) ({ __iowmb(); (void)__raw_writel((__force __u32)cpu_to_le32(v), p); }) | 290 | #define iowrite32(v,p) ({ __iowmb(); (void)__raw_writel((__force __u32)cpu_to_le32(v), p); }) |
266 | 291 | ||
292 | #define iowrite16be(v,p) ({ __iowmb(); (void)__raw_writew((__force __u16)cpu_to_be16(v), p); }) | ||
293 | #define iowrite32be(v,p) ({ __iowmb(); (void)__raw_writel((__force __u32)cpu_to_be32(v), p); }) | ||
294 | |||
267 | #define ioread8_rep(p,d,c) __raw_readsb(p,d,c) | 295 | #define ioread8_rep(p,d,c) __raw_readsb(p,d,c) |
268 | #define ioread16_rep(p,d,c) __raw_readsw(p,d,c) | 296 | #define ioread16_rep(p,d,c) __raw_readsw(p,d,c) |
269 | #define ioread32_rep(p,d,c) __raw_readsl(p,d,c) | 297 | #define ioread32_rep(p,d,c) __raw_readsl(p,d,c) |
diff --git a/arch/arm/include/asm/ioctl.h b/arch/arm/include/asm/ioctl.h deleted file mode 100644 index b279fe06dfe5..000000000000 --- a/arch/arm/include/asm/ioctl.h +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | #include <asm-generic/ioctl.h> | ||
diff --git a/arch/arm/include/asm/irq_regs.h b/arch/arm/include/asm/irq_regs.h deleted file mode 100644 index 3dd9c0b70270..000000000000 --- a/arch/arm/include/asm/irq_regs.h +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | #include <asm-generic/irq_regs.h> | ||
diff --git a/arch/arm/include/asm/kdebug.h b/arch/arm/include/asm/kdebug.h deleted file mode 100644 index 6ece1b037665..000000000000 --- a/arch/arm/include/asm/kdebug.h +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | #include <asm-generic/kdebug.h> | ||
diff --git a/arch/arm/include/asm/local.h b/arch/arm/include/asm/local.h deleted file mode 100644 index c11c530f74d0..000000000000 --- a/arch/arm/include/asm/local.h +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | #include <asm-generic/local.h> | ||
diff --git a/arch/arm/include/asm/local64.h b/arch/arm/include/asm/local64.h deleted file mode 100644 index 36c93b5cc239..000000000000 --- a/arch/arm/include/asm/local64.h +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | #include <asm-generic/local64.h> | ||
diff --git a/arch/arm/include/asm/localtimer.h b/arch/arm/include/asm/localtimer.h index 080d74f8128d..6fd955d34c65 100644 --- a/arch/arm/include/asm/localtimer.h +++ b/arch/arm/include/asm/localtimer.h | |||
@@ -10,6 +10,8 @@ | |||
10 | #ifndef __ASM_ARM_LOCALTIMER_H | 10 | #ifndef __ASM_ARM_LOCALTIMER_H |
11 | #define __ASM_ARM_LOCALTIMER_H | 11 | #define __ASM_ARM_LOCALTIMER_H |
12 | 12 | ||
13 | #include <linux/errno.h> | ||
14 | |||
13 | struct clock_event_device; | 15 | struct clock_event_device; |
14 | 16 | ||
15 | /* | 17 | /* |
@@ -22,6 +24,10 @@ void percpu_timer_setup(void); | |||
22 | */ | 24 | */ |
23 | asmlinkage void do_local_timer(struct pt_regs *); | 25 | asmlinkage void do_local_timer(struct pt_regs *); |
24 | 26 | ||
27 | /* | ||
28 | * Called from C code | ||
29 | */ | ||
30 | void handle_local_timer(struct pt_regs *); | ||
25 | 31 | ||
26 | #ifdef CONFIG_LOCAL_TIMERS | 32 | #ifdef CONFIG_LOCAL_TIMERS |
27 | 33 | ||
diff --git a/arch/arm/include/asm/mach/arch.h b/arch/arm/include/asm/mach/arch.h index 217aa1911dd7..c5699987fa98 100644 --- a/arch/arm/include/asm/mach/arch.h +++ b/arch/arm/include/asm/mach/arch.h | |||
@@ -34,8 +34,7 @@ struct machine_desc { | |||
34 | unsigned int reserve_lp1 :1; /* never has lp1 */ | 34 | unsigned int reserve_lp1 :1; /* never has lp1 */ |
35 | unsigned int reserve_lp2 :1; /* never has lp2 */ | 35 | unsigned int reserve_lp2 :1; /* never has lp2 */ |
36 | unsigned int soft_reboot :1; /* soft reboot */ | 36 | unsigned int soft_reboot :1; /* soft reboot */ |
37 | void (*fixup)(struct machine_desc *, | 37 | void (*fixup)(struct tag *, char **, |
38 | struct tag *, char **, | ||
39 | struct meminfo *); | 38 | struct meminfo *); |
40 | void (*reserve)(void);/* reserve mem blocks */ | 39 | void (*reserve)(void);/* reserve mem blocks */ |
41 | void (*map_io)(void);/* IO mapping function */ | 40 | void (*map_io)(void);/* IO mapping function */ |
diff --git a/arch/arm/include/asm/memory.h b/arch/arm/include/asm/memory.h index b8de516e600e..441fc4fe8263 100644 --- a/arch/arm/include/asm/memory.h +++ b/arch/arm/include/asm/memory.h | |||
@@ -160,7 +160,6 @@ | |||
160 | * so that all we need to do is modify the 8-bit constant field. | 160 | * so that all we need to do is modify the 8-bit constant field. |
161 | */ | 161 | */ |
162 | #define __PV_BITS_31_24 0x81000000 | 162 | #define __PV_BITS_31_24 0x81000000 |
163 | #define __PV_BITS_23_16 0x00810000 | ||
164 | 163 | ||
165 | extern unsigned long __pv_phys_offset; | 164 | extern unsigned long __pv_phys_offset; |
166 | #define PHYS_OFFSET __pv_phys_offset | 165 | #define PHYS_OFFSET __pv_phys_offset |
@@ -178,9 +177,6 @@ static inline unsigned long __virt_to_phys(unsigned long x) | |||
178 | { | 177 | { |
179 | unsigned long t; | 178 | unsigned long t; |
180 | __pv_stub(x, t, "add", __PV_BITS_31_24); | 179 | __pv_stub(x, t, "add", __PV_BITS_31_24); |
181 | #ifdef CONFIG_ARM_PATCH_PHYS_VIRT_16BIT | ||
182 | __pv_stub(t, t, "add", __PV_BITS_23_16); | ||
183 | #endif | ||
184 | return t; | 180 | return t; |
185 | } | 181 | } |
186 | 182 | ||
@@ -188,9 +184,6 @@ static inline unsigned long __phys_to_virt(unsigned long x) | |||
188 | { | 184 | { |
189 | unsigned long t; | 185 | unsigned long t; |
190 | __pv_stub(x, t, "sub", __PV_BITS_31_24); | 186 | __pv_stub(x, t, "sub", __PV_BITS_31_24); |
191 | #ifdef CONFIG_ARM_PATCH_PHYS_VIRT_16BIT | ||
192 | __pv_stub(t, t, "sub", __PV_BITS_23_16); | ||
193 | #endif | ||
194 | return t; | 187 | return t; |
195 | } | 188 | } |
196 | #else | 189 | #else |
diff --git a/arch/arm/include/asm/module.h b/arch/arm/include/asm/module.h index 543b44916d2c..6c6809f982f1 100644 --- a/arch/arm/include/asm/module.h +++ b/arch/arm/include/asm/module.h | |||
@@ -31,11 +31,7 @@ struct mod_arch_specific { | |||
31 | 31 | ||
32 | /* Add __virt_to_phys patching state as well */ | 32 | /* Add __virt_to_phys patching state as well */ |
33 | #ifdef CONFIG_ARM_PATCH_PHYS_VIRT | 33 | #ifdef CONFIG_ARM_PATCH_PHYS_VIRT |
34 | #ifdef CONFIG_ARM_PATCH_PHYS_VIRT_16BIT | ||
35 | #define MODULE_ARCH_VERMAGIC_P2V "p2v16 " | ||
36 | #else | ||
37 | #define MODULE_ARCH_VERMAGIC_P2V "p2v8 " | 34 | #define MODULE_ARCH_VERMAGIC_P2V "p2v8 " |
38 | #endif | ||
39 | #else | 35 | #else |
40 | #define MODULE_ARCH_VERMAGIC_P2V "" | 36 | #define MODULE_ARCH_VERMAGIC_P2V "" |
41 | #endif | 37 | #endif |
diff --git a/arch/arm/include/asm/outercache.h b/arch/arm/include/asm/outercache.h index d8387437ec5a..53426c66352a 100644 --- a/arch/arm/include/asm/outercache.h +++ b/arch/arm/include/asm/outercache.h | |||
@@ -34,6 +34,7 @@ struct outer_cache_fns { | |||
34 | void (*sync)(void); | 34 | void (*sync)(void); |
35 | #endif | 35 | #endif |
36 | void (*set_debug)(unsigned long); | 36 | void (*set_debug)(unsigned long); |
37 | void (*resume)(void); | ||
37 | }; | 38 | }; |
38 | 39 | ||
39 | #ifdef CONFIG_OUTER_CACHE | 40 | #ifdef CONFIG_OUTER_CACHE |
@@ -74,6 +75,12 @@ static inline void outer_disable(void) | |||
74 | outer_cache.disable(); | 75 | outer_cache.disable(); |
75 | } | 76 | } |
76 | 77 | ||
78 | static inline void outer_resume(void) | ||
79 | { | ||
80 | if (outer_cache.resume) | ||
81 | outer_cache.resume(); | ||
82 | } | ||
83 | |||
77 | #else | 84 | #else |
78 | 85 | ||
79 | static inline void outer_inv_range(phys_addr_t start, phys_addr_t end) | 86 | static inline void outer_inv_range(phys_addr_t start, phys_addr_t end) |
diff --git a/arch/arm/include/asm/page.h b/arch/arm/include/asm/page.h index ac75d0848889..ca94653f1ecb 100644 --- a/arch/arm/include/asm/page.h +++ b/arch/arm/include/asm/page.h | |||
@@ -151,47 +151,7 @@ extern void __cpu_copy_user_highpage(struct page *to, struct page *from, | |||
151 | #define clear_page(page) memset((void *)(page), 0, PAGE_SIZE) | 151 | #define clear_page(page) memset((void *)(page), 0, PAGE_SIZE) |
152 | extern void copy_page(void *to, const void *from); | 152 | extern void copy_page(void *to, const void *from); |
153 | 153 | ||
154 | typedef unsigned long pteval_t; | 154 | #include <asm/pgtable-2level-types.h> |
155 | |||
156 | #undef STRICT_MM_TYPECHECKS | ||
157 | |||
158 | #ifdef STRICT_MM_TYPECHECKS | ||
159 | /* | ||
160 | * These are used to make use of C type-checking.. | ||
161 | */ | ||
162 | typedef struct { pteval_t pte; } pte_t; | ||
163 | typedef struct { unsigned long pmd; } pmd_t; | ||
164 | typedef struct { unsigned long pgd[2]; } pgd_t; | ||
165 | typedef struct { unsigned long pgprot; } pgprot_t; | ||
166 | |||
167 | #define pte_val(x) ((x).pte) | ||
168 | #define pmd_val(x) ((x).pmd) | ||
169 | #define pgd_val(x) ((x).pgd[0]) | ||
170 | #define pgprot_val(x) ((x).pgprot) | ||
171 | |||
172 | #define __pte(x) ((pte_t) { (x) } ) | ||
173 | #define __pmd(x) ((pmd_t) { (x) } ) | ||
174 | #define __pgprot(x) ((pgprot_t) { (x) } ) | ||
175 | |||
176 | #else | ||
177 | /* | ||
178 | * .. while these make it easier on the compiler | ||
179 | */ | ||
180 | typedef pteval_t pte_t; | ||
181 | typedef unsigned long pmd_t; | ||
182 | typedef unsigned long pgd_t[2]; | ||
183 | typedef unsigned long pgprot_t; | ||
184 | |||
185 | #define pte_val(x) (x) | ||
186 | #define pmd_val(x) (x) | ||
187 | #define pgd_val(x) ((x)[0]) | ||
188 | #define pgprot_val(x) (x) | ||
189 | |||
190 | #define __pte(x) (x) | ||
191 | #define __pmd(x) (x) | ||
192 | #define __pgprot(x) (x) | ||
193 | |||
194 | #endif /* STRICT_MM_TYPECHECKS */ | ||
195 | 155 | ||
196 | #endif /* CONFIG_MMU */ | 156 | #endif /* CONFIG_MMU */ |
197 | 157 | ||
diff --git a/arch/arm/include/asm/percpu.h b/arch/arm/include/asm/percpu.h deleted file mode 100644 index b4e32d8ec072..000000000000 --- a/arch/arm/include/asm/percpu.h +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | #ifndef __ARM_PERCPU | ||
2 | #define __ARM_PERCPU | ||
3 | |||
4 | #include <asm-generic/percpu.h> | ||
5 | |||
6 | #endif | ||
diff --git a/arch/arm/include/asm/pgalloc.h b/arch/arm/include/asm/pgalloc.h index 22de005f159c..3e08fd3fbb6b 100644 --- a/arch/arm/include/asm/pgalloc.h +++ b/arch/arm/include/asm/pgalloc.h | |||
@@ -105,9 +105,9 @@ static inline void pte_free(struct mm_struct *mm, pgtable_t pte) | |||
105 | } | 105 | } |
106 | 106 | ||
107 | static inline void __pmd_populate(pmd_t *pmdp, phys_addr_t pte, | 107 | static inline void __pmd_populate(pmd_t *pmdp, phys_addr_t pte, |
108 | unsigned long prot) | 108 | pmdval_t prot) |
109 | { | 109 | { |
110 | unsigned long pmdval = (pte + PTE_HWTABLE_OFF) | prot; | 110 | pmdval_t pmdval = (pte + PTE_HWTABLE_OFF) | prot; |
111 | pmdp[0] = __pmd(pmdval); | 111 | pmdp[0] = __pmd(pmdval); |
112 | pmdp[1] = __pmd(pmdval + 256 * sizeof(pte_t)); | 112 | pmdp[1] = __pmd(pmdval + 256 * sizeof(pte_t)); |
113 | flush_pmd_entry(pmdp); | 113 | flush_pmd_entry(pmdp); |
diff --git a/arch/arm/include/asm/pgtable-2level-hwdef.h b/arch/arm/include/asm/pgtable-2level-hwdef.h new file mode 100644 index 000000000000..5cfba15cb401 --- /dev/null +++ b/arch/arm/include/asm/pgtable-2level-hwdef.h | |||
@@ -0,0 +1,93 @@ | |||
1 | /* | ||
2 | * arch/arm/include/asm/pgtable-2level-hwdef.h | ||
3 | * | ||
4 | * Copyright (C) 1995-2002 Russell King | ||
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 version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | */ | ||
10 | #ifndef _ASM_PGTABLE_2LEVEL_HWDEF_H | ||
11 | #define _ASM_PGTABLE_2LEVEL_HWDEF_H | ||
12 | |||
13 | /* | ||
14 | * Hardware page table definitions. | ||
15 | * | ||
16 | * + Level 1 descriptor (PMD) | ||
17 | * - common | ||
18 | */ | ||
19 | #define PMD_TYPE_MASK (_AT(pmdval_t, 3) << 0) | ||
20 | #define PMD_TYPE_FAULT (_AT(pmdval_t, 0) << 0) | ||
21 | #define PMD_TYPE_TABLE (_AT(pmdval_t, 1) << 0) | ||
22 | #define PMD_TYPE_SECT (_AT(pmdval_t, 2) << 0) | ||
23 | #define PMD_BIT4 (_AT(pmdval_t, 1) << 4) | ||
24 | #define PMD_DOMAIN(x) (_AT(pmdval_t, (x)) << 5) | ||
25 | #define PMD_PROTECTION (_AT(pmdval_t, 1) << 9) /* v5 */ | ||
26 | /* | ||
27 | * - section | ||
28 | */ | ||
29 | #define PMD_SECT_BUFFERABLE (_AT(pmdval_t, 1) << 2) | ||
30 | #define PMD_SECT_CACHEABLE (_AT(pmdval_t, 1) << 3) | ||
31 | #define PMD_SECT_XN (_AT(pmdval_t, 1) << 4) /* v6 */ | ||
32 | #define PMD_SECT_AP_WRITE (_AT(pmdval_t, 1) << 10) | ||
33 | #define PMD_SECT_AP_READ (_AT(pmdval_t, 1) << 11) | ||
34 | #define PMD_SECT_TEX(x) (_AT(pmdval_t, (x)) << 12) /* v5 */ | ||
35 | #define PMD_SECT_APX (_AT(pmdval_t, 1) << 15) /* v6 */ | ||
36 | #define PMD_SECT_S (_AT(pmdval_t, 1) << 16) /* v6 */ | ||
37 | #define PMD_SECT_nG (_AT(pmdval_t, 1) << 17) /* v6 */ | ||
38 | #define PMD_SECT_SUPER (_AT(pmdval_t, 1) << 18) /* v6 */ | ||
39 | #define PMD_SECT_AF (_AT(pmdval_t, 0)) | ||
40 | |||
41 | #define PMD_SECT_UNCACHED (_AT(pmdval_t, 0)) | ||
42 | #define PMD_SECT_BUFFERED (PMD_SECT_BUFFERABLE) | ||
43 | #define PMD_SECT_WT (PMD_SECT_CACHEABLE) | ||
44 | #define PMD_SECT_WB (PMD_SECT_CACHEABLE | PMD_SECT_BUFFERABLE) | ||
45 | #define PMD_SECT_MINICACHE (PMD_SECT_TEX(1) | PMD_SECT_CACHEABLE) | ||
46 | #define PMD_SECT_WBWA (PMD_SECT_TEX(1) | PMD_SECT_CACHEABLE | PMD_SECT_BUFFERABLE) | ||
47 | #define PMD_SECT_NONSHARED_DEV (PMD_SECT_TEX(2)) | ||
48 | |||
49 | /* | ||
50 | * - coarse table (not used) | ||
51 | */ | ||
52 | |||
53 | /* | ||
54 | * + Level 2 descriptor (PTE) | ||
55 | * - common | ||
56 | */ | ||
57 | #define PTE_TYPE_MASK (_AT(pteval_t, 3) << 0) | ||
58 | #define PTE_TYPE_FAULT (_AT(pteval_t, 0) << 0) | ||
59 | #define PTE_TYPE_LARGE (_AT(pteval_t, 1) << 0) | ||
60 | #define PTE_TYPE_SMALL (_AT(pteval_t, 2) << 0) | ||
61 | #define PTE_TYPE_EXT (_AT(pteval_t, 3) << 0) /* v5 */ | ||
62 | #define PTE_BUFFERABLE (_AT(pteval_t, 1) << 2) | ||
63 | #define PTE_CACHEABLE (_AT(pteval_t, 1) << 3) | ||
64 | |||
65 | /* | ||
66 | * - extended small page/tiny page | ||
67 | */ | ||
68 | #define PTE_EXT_XN (_AT(pteval_t, 1) << 0) /* v6 */ | ||
69 | #define PTE_EXT_AP_MASK (_AT(pteval_t, 3) << 4) | ||
70 | #define PTE_EXT_AP0 (_AT(pteval_t, 1) << 4) | ||
71 | #define PTE_EXT_AP1 (_AT(pteval_t, 2) << 4) | ||
72 | #define PTE_EXT_AP_UNO_SRO (_AT(pteval_t, 0) << 4) | ||
73 | #define PTE_EXT_AP_UNO_SRW (PTE_EXT_AP0) | ||
74 | #define PTE_EXT_AP_URO_SRW (PTE_EXT_AP1) | ||
75 | #define PTE_EXT_AP_URW_SRW (PTE_EXT_AP1|PTE_EXT_AP0) | ||
76 | #define PTE_EXT_TEX(x) (_AT(pteval_t, (x)) << 6) /* v5 */ | ||
77 | #define PTE_EXT_APX (_AT(pteval_t, 1) << 9) /* v6 */ | ||
78 | #define PTE_EXT_COHERENT (_AT(pteval_t, 1) << 9) /* XScale3 */ | ||
79 | #define PTE_EXT_SHARED (_AT(pteval_t, 1) << 10) /* v6 */ | ||
80 | #define PTE_EXT_NG (_AT(pteval_t, 1) << 11) /* v6 */ | ||
81 | |||
82 | /* | ||
83 | * - small page | ||
84 | */ | ||
85 | #define PTE_SMALL_AP_MASK (_AT(pteval_t, 0xff) << 4) | ||
86 | #define PTE_SMALL_AP_UNO_SRO (_AT(pteval_t, 0x00) << 4) | ||
87 | #define PTE_SMALL_AP_UNO_SRW (_AT(pteval_t, 0x55) << 4) | ||
88 | #define PTE_SMALL_AP_URO_SRW (_AT(pteval_t, 0xaa) << 4) | ||
89 | #define PTE_SMALL_AP_URW_SRW (_AT(pteval_t, 0xff) << 4) | ||
90 | |||
91 | #define PHYS_MASK (~0UL) | ||
92 | |||
93 | #endif | ||
diff --git a/arch/arm/include/asm/pgtable-2level-types.h b/arch/arm/include/asm/pgtable-2level-types.h new file mode 100644 index 000000000000..66cb5b0e89c5 --- /dev/null +++ b/arch/arm/include/asm/pgtable-2level-types.h | |||
@@ -0,0 +1,67 @@ | |||
1 | /* | ||
2 | * arch/arm/include/asm/pgtable-2level-types.h | ||
3 | * | ||
4 | * Copyright (C) 1995-2003 Russell King | ||
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 version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | * | ||
10 | * This program is distributed in the hope that it will be useful, | ||
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 | * GNU General Public License for more details. | ||
14 | * | ||
15 | * You should have received a copy of the GNU General Public License | ||
16 | * along with this program; if not, write to the Free Software | ||
17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
18 | */ | ||
19 | #ifndef _ASM_PGTABLE_2LEVEL_TYPES_H | ||
20 | #define _ASM_PGTABLE_2LEVEL_TYPES_H | ||
21 | |||
22 | #include <asm/types.h> | ||
23 | |||
24 | typedef u32 pteval_t; | ||
25 | typedef u32 pmdval_t; | ||
26 | |||
27 | #undef STRICT_MM_TYPECHECKS | ||
28 | |||
29 | #ifdef STRICT_MM_TYPECHECKS | ||
30 | /* | ||
31 | * These are used to make use of C type-checking.. | ||
32 | */ | ||
33 | typedef struct { pteval_t pte; } pte_t; | ||
34 | typedef struct { pmdval_t pmd; } pmd_t; | ||
35 | typedef struct { pmdval_t pgd[2]; } pgd_t; | ||
36 | typedef struct { pteval_t pgprot; } pgprot_t; | ||
37 | |||
38 | #define pte_val(x) ((x).pte) | ||
39 | #define pmd_val(x) ((x).pmd) | ||
40 | #define pgd_val(x) ((x).pgd[0]) | ||
41 | #define pgprot_val(x) ((x).pgprot) | ||
42 | |||
43 | #define __pte(x) ((pte_t) { (x) } ) | ||
44 | #define __pmd(x) ((pmd_t) { (x) } ) | ||
45 | #define __pgprot(x) ((pgprot_t) { (x) } ) | ||
46 | |||
47 | #else | ||
48 | /* | ||
49 | * .. while these make it easier on the compiler | ||
50 | */ | ||
51 | typedef pteval_t pte_t; | ||
52 | typedef pmdval_t pmd_t; | ||
53 | typedef pmdval_t pgd_t[2]; | ||
54 | typedef pteval_t pgprot_t; | ||
55 | |||
56 | #define pte_val(x) (x) | ||
57 | #define pmd_val(x) (x) | ||
58 | #define pgd_val(x) ((x)[0]) | ||
59 | #define pgprot_val(x) (x) | ||
60 | |||
61 | #define __pte(x) (x) | ||
62 | #define __pmd(x) (x) | ||
63 | #define __pgprot(x) (x) | ||
64 | |||
65 | #endif /* STRICT_MM_TYPECHECKS */ | ||
66 | |||
67 | #endif /* _ASM_PGTABLE_2LEVEL_TYPES_H */ | ||
diff --git a/arch/arm/include/asm/pgtable-2level.h b/arch/arm/include/asm/pgtable-2level.h new file mode 100644 index 000000000000..470457e1cfc5 --- /dev/null +++ b/arch/arm/include/asm/pgtable-2level.h | |||
@@ -0,0 +1,143 @@ | |||
1 | /* | ||
2 | * arch/arm/include/asm/pgtable-2level.h | ||
3 | * | ||
4 | * Copyright (C) 1995-2002 Russell King | ||
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 version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | */ | ||
10 | #ifndef _ASM_PGTABLE_2LEVEL_H | ||
11 | #define _ASM_PGTABLE_2LEVEL_H | ||
12 | |||
13 | /* | ||
14 | * Hardware-wise, we have a two level page table structure, where the first | ||
15 | * level has 4096 entries, and the second level has 256 entries. Each entry | ||
16 | * is one 32-bit word. Most of the bits in the second level entry are used | ||
17 | * by hardware, and there aren't any "accessed" and "dirty" bits. | ||
18 | * | ||
19 | * Linux on the other hand has a three level page table structure, which can | ||
20 | * be wrapped to fit a two level page table structure easily - using the PGD | ||
21 | * and PTE only. However, Linux also expects one "PTE" table per page, and | ||
22 | * at least a "dirty" bit. | ||
23 | * | ||
24 | * Therefore, we tweak the implementation slightly - we tell Linux that we | ||
25 | * have 2048 entries in the first level, each of which is 8 bytes (iow, two | ||
26 | * hardware pointers to the second level.) The second level contains two | ||
27 | * hardware PTE tables arranged contiguously, preceded by Linux versions | ||
28 | * which contain the state information Linux needs. We, therefore, end up | ||
29 | * with 512 entries in the "PTE" level. | ||
30 | * | ||
31 | * This leads to the page tables having the following layout: | ||
32 | * | ||
33 | * pgd pte | ||
34 | * | | | ||
35 | * +--------+ | ||
36 | * | | +------------+ +0 | ||
37 | * +- - - - + | Linux pt 0 | | ||
38 | * | | +------------+ +1024 | ||
39 | * +--------+ +0 | Linux pt 1 | | ||
40 | * | |-----> +------------+ +2048 | ||
41 | * +- - - - + +4 | h/w pt 0 | | ||
42 | * | |-----> +------------+ +3072 | ||
43 | * +--------+ +8 | h/w pt 1 | | ||
44 | * | | +------------+ +4096 | ||
45 | * | ||
46 | * See L_PTE_xxx below for definitions of bits in the "Linux pt", and | ||
47 | * PTE_xxx for definitions of bits appearing in the "h/w pt". | ||
48 | * | ||
49 | * PMD_xxx definitions refer to bits in the first level page table. | ||
50 | * | ||
51 | * The "dirty" bit is emulated by only granting hardware write permission | ||
52 | * iff the page is marked "writable" and "dirty" in the Linux PTE. This | ||
53 | * means that a write to a clean page will cause a permission fault, and | ||
54 | * the Linux MM layer will mark the page dirty via handle_pte_fault(). | ||
55 | * For the hardware to notice the permission change, the TLB entry must | ||
56 | * be flushed, and ptep_set_access_flags() does that for us. | ||
57 | * | ||
58 | * The "accessed" or "young" bit is emulated by a similar method; we only | ||
59 | * allow accesses to the page if the "young" bit is set. Accesses to the | ||
60 | * page will cause a fault, and handle_pte_fault() will set the young bit | ||
61 | * for us as long as the page is marked present in the corresponding Linux | ||
62 | * PTE entry. Again, ptep_set_access_flags() will ensure that the TLB is | ||
63 | * up to date. | ||
64 | * | ||
65 | * However, when the "young" bit is cleared, we deny access to the page | ||
66 | * by clearing the hardware PTE. Currently Linux does not flush the TLB | ||
67 | * for us in this case, which means the TLB will retain the transation | ||
68 | * until either the TLB entry is evicted under pressure, or a context | ||
69 | * switch which changes the user space mapping occurs. | ||
70 | */ | ||
71 | #define PTRS_PER_PTE 512 | ||
72 | #define PTRS_PER_PMD 1 | ||
73 | #define PTRS_PER_PGD 2048 | ||
74 | |||
75 | #define PTE_HWTABLE_PTRS (PTRS_PER_PTE) | ||
76 | #define PTE_HWTABLE_OFF (PTE_HWTABLE_PTRS * sizeof(pte_t)) | ||
77 | #define PTE_HWTABLE_SIZE (PTRS_PER_PTE * sizeof(u32)) | ||
78 | |||
79 | /* | ||
80 | * PMD_SHIFT determines the size of the area a second-level page table can map | ||
81 | * PGDIR_SHIFT determines what a third-level page table entry can map | ||
82 | */ | ||
83 | #define PMD_SHIFT 21 | ||
84 | #define PGDIR_SHIFT 21 | ||
85 | |||
86 | #define PMD_SIZE (1UL << PMD_SHIFT) | ||
87 | #define PMD_MASK (~(PMD_SIZE-1)) | ||
88 | #define PGDIR_SIZE (1UL << PGDIR_SHIFT) | ||
89 | #define PGDIR_MASK (~(PGDIR_SIZE-1)) | ||
90 | |||
91 | /* | ||
92 | * section address mask and size definitions. | ||
93 | */ | ||
94 | #define SECTION_SHIFT 20 | ||
95 | #define SECTION_SIZE (1UL << SECTION_SHIFT) | ||
96 | #define SECTION_MASK (~(SECTION_SIZE-1)) | ||
97 | |||
98 | /* | ||
99 | * ARMv6 supersection address mask and size definitions. | ||
100 | */ | ||
101 | #define SUPERSECTION_SHIFT 24 | ||
102 | #define SUPERSECTION_SIZE (1UL << SUPERSECTION_SHIFT) | ||
103 | #define SUPERSECTION_MASK (~(SUPERSECTION_SIZE-1)) | ||
104 | |||
105 | #define USER_PTRS_PER_PGD (TASK_SIZE / PGDIR_SIZE) | ||
106 | |||
107 | /* | ||
108 | * "Linux" PTE definitions. | ||
109 | * | ||
110 | * We keep two sets of PTEs - the hardware and the linux version. | ||
111 | * This allows greater flexibility in the way we map the Linux bits | ||
112 | * onto the hardware tables, and allows us to have YOUNG and DIRTY | ||
113 | * bits. | ||
114 | * | ||
115 | * The PTE table pointer refers to the hardware entries; the "Linux" | ||
116 | * entries are stored 1024 bytes below. | ||
117 | */ | ||
118 | #define L_PTE_PRESENT (_AT(pteval_t, 1) << 0) | ||
119 | #define L_PTE_YOUNG (_AT(pteval_t, 1) << 1) | ||
120 | #define L_PTE_FILE (_AT(pteval_t, 1) << 2) /* only when !PRESENT */ | ||
121 | #define L_PTE_DIRTY (_AT(pteval_t, 1) << 6) | ||
122 | #define L_PTE_RDONLY (_AT(pteval_t, 1) << 7) | ||
123 | #define L_PTE_USER (_AT(pteval_t, 1) << 8) | ||
124 | #define L_PTE_XN (_AT(pteval_t, 1) << 9) | ||
125 | #define L_PTE_SHARED (_AT(pteval_t, 1) << 10) /* shared(v6), coherent(xsc3) */ | ||
126 | |||
127 | /* | ||
128 | * These are the memory types, defined to be compatible with | ||
129 | * pre-ARMv6 CPUs cacheable and bufferable bits: XXCB | ||
130 | */ | ||
131 | #define L_PTE_MT_UNCACHED (_AT(pteval_t, 0x00) << 2) /* 0000 */ | ||
132 | #define L_PTE_MT_BUFFERABLE (_AT(pteval_t, 0x01) << 2) /* 0001 */ | ||
133 | #define L_PTE_MT_WRITETHROUGH (_AT(pteval_t, 0x02) << 2) /* 0010 */ | ||
134 | #define L_PTE_MT_WRITEBACK (_AT(pteval_t, 0x03) << 2) /* 0011 */ | ||
135 | #define L_PTE_MT_MINICACHE (_AT(pteval_t, 0x06) << 2) /* 0110 (sa1100, xscale) */ | ||
136 | #define L_PTE_MT_WRITEALLOC (_AT(pteval_t, 0x07) << 2) /* 0111 */ | ||
137 | #define L_PTE_MT_DEV_SHARED (_AT(pteval_t, 0x04) << 2) /* 0100 */ | ||
138 | #define L_PTE_MT_DEV_NONSHARED (_AT(pteval_t, 0x0c) << 2) /* 1100 */ | ||
139 | #define L_PTE_MT_DEV_WC (_AT(pteval_t, 0x09) << 2) /* 1001 */ | ||
140 | #define L_PTE_MT_DEV_CACHED (_AT(pteval_t, 0x0b) << 2) /* 1011 */ | ||
141 | #define L_PTE_MT_MASK (_AT(pteval_t, 0x0f) << 2) | ||
142 | |||
143 | #endif /* _ASM_PGTABLE_2LEVEL_H */ | ||
diff --git a/arch/arm/include/asm/pgtable-hwdef.h b/arch/arm/include/asm/pgtable-hwdef.h index fd1521d5cb9d..183111164ce9 100644 --- a/arch/arm/include/asm/pgtable-hwdef.h +++ b/arch/arm/include/asm/pgtable-hwdef.h | |||
@@ -10,81 +10,6 @@ | |||
10 | #ifndef _ASMARM_PGTABLE_HWDEF_H | 10 | #ifndef _ASMARM_PGTABLE_HWDEF_H |
11 | #define _ASMARM_PGTABLE_HWDEF_H | 11 | #define _ASMARM_PGTABLE_HWDEF_H |
12 | 12 | ||
13 | /* | 13 | #include <asm/pgtable-2level-hwdef.h> |
14 | * Hardware page table definitions. | ||
15 | * | ||
16 | * + Level 1 descriptor (PMD) | ||
17 | * - common | ||
18 | */ | ||
19 | #define PMD_TYPE_MASK (3 << 0) | ||
20 | #define PMD_TYPE_FAULT (0 << 0) | ||
21 | #define PMD_TYPE_TABLE (1 << 0) | ||
22 | #define PMD_TYPE_SECT (2 << 0) | ||
23 | #define PMD_BIT4 (1 << 4) | ||
24 | #define PMD_DOMAIN(x) ((x) << 5) | ||
25 | #define PMD_PROTECTION (1 << 9) /* v5 */ | ||
26 | /* | ||
27 | * - section | ||
28 | */ | ||
29 | #define PMD_SECT_BUFFERABLE (1 << 2) | ||
30 | #define PMD_SECT_CACHEABLE (1 << 3) | ||
31 | #define PMD_SECT_XN (1 << 4) /* v6 */ | ||
32 | #define PMD_SECT_AP_WRITE (1 << 10) | ||
33 | #define PMD_SECT_AP_READ (1 << 11) | ||
34 | #define PMD_SECT_TEX(x) ((x) << 12) /* v5 */ | ||
35 | #define PMD_SECT_APX (1 << 15) /* v6 */ | ||
36 | #define PMD_SECT_S (1 << 16) /* v6 */ | ||
37 | #define PMD_SECT_nG (1 << 17) /* v6 */ | ||
38 | #define PMD_SECT_SUPER (1 << 18) /* v6 */ | ||
39 | |||
40 | #define PMD_SECT_UNCACHED (0) | ||
41 | #define PMD_SECT_BUFFERED (PMD_SECT_BUFFERABLE) | ||
42 | #define PMD_SECT_WT (PMD_SECT_CACHEABLE) | ||
43 | #define PMD_SECT_WB (PMD_SECT_CACHEABLE | PMD_SECT_BUFFERABLE) | ||
44 | #define PMD_SECT_MINICACHE (PMD_SECT_TEX(1) | PMD_SECT_CACHEABLE) | ||
45 | #define PMD_SECT_WBWA (PMD_SECT_TEX(1) | PMD_SECT_CACHEABLE | PMD_SECT_BUFFERABLE) | ||
46 | #define PMD_SECT_NONSHARED_DEV (PMD_SECT_TEX(2)) | ||
47 | |||
48 | /* | ||
49 | * - coarse table (not used) | ||
50 | */ | ||
51 | |||
52 | /* | ||
53 | * + Level 2 descriptor (PTE) | ||
54 | * - common | ||
55 | */ | ||
56 | #define PTE_TYPE_MASK (3 << 0) | ||
57 | #define PTE_TYPE_FAULT (0 << 0) | ||
58 | #define PTE_TYPE_LARGE (1 << 0) | ||
59 | #define PTE_TYPE_SMALL (2 << 0) | ||
60 | #define PTE_TYPE_EXT (3 << 0) /* v5 */ | ||
61 | #define PTE_BUFFERABLE (1 << 2) | ||
62 | #define PTE_CACHEABLE (1 << 3) | ||
63 | |||
64 | /* | ||
65 | * - extended small page/tiny page | ||
66 | */ | ||
67 | #define PTE_EXT_XN (1 << 0) /* v6 */ | ||
68 | #define PTE_EXT_AP_MASK (3 << 4) | ||
69 | #define PTE_EXT_AP0 (1 << 4) | ||
70 | #define PTE_EXT_AP1 (2 << 4) | ||
71 | #define PTE_EXT_AP_UNO_SRO (0 << 4) | ||
72 | #define PTE_EXT_AP_UNO_SRW (PTE_EXT_AP0) | ||
73 | #define PTE_EXT_AP_URO_SRW (PTE_EXT_AP1) | ||
74 | #define PTE_EXT_AP_URW_SRW (PTE_EXT_AP1|PTE_EXT_AP0) | ||
75 | #define PTE_EXT_TEX(x) ((x) << 6) /* v5 */ | ||
76 | #define PTE_EXT_APX (1 << 9) /* v6 */ | ||
77 | #define PTE_EXT_COHERENT (1 << 9) /* XScale3 */ | ||
78 | #define PTE_EXT_SHARED (1 << 10) /* v6 */ | ||
79 | #define PTE_EXT_NG (1 << 11) /* v6 */ | ||
80 | |||
81 | /* | ||
82 | * - small page | ||
83 | */ | ||
84 | #define PTE_SMALL_AP_MASK (0xff << 4) | ||
85 | #define PTE_SMALL_AP_UNO_SRO (0x00 << 4) | ||
86 | #define PTE_SMALL_AP_UNO_SRW (0x55 << 4) | ||
87 | #define PTE_SMALL_AP_URO_SRW (0xaa << 4) | ||
88 | #define PTE_SMALL_AP_URW_SRW (0xff << 4) | ||
89 | 14 | ||
90 | #endif | 15 | #endif |
diff --git a/arch/arm/include/asm/pgtable.h b/arch/arm/include/asm/pgtable.h index 5750704e0271..8ade1840c6f2 100644 --- a/arch/arm/include/asm/pgtable.h +++ b/arch/arm/include/asm/pgtable.h | |||
@@ -24,6 +24,8 @@ | |||
24 | #include <mach/vmalloc.h> | 24 | #include <mach/vmalloc.h> |
25 | #include <asm/pgtable-hwdef.h> | 25 | #include <asm/pgtable-hwdef.h> |
26 | 26 | ||
27 | #include <asm/pgtable-2level.h> | ||
28 | |||
27 | /* | 29 | /* |
28 | * Just any arbitrary offset to the start of the vmalloc VM area: the | 30 | * Just any arbitrary offset to the start of the vmalloc VM area: the |
29 | * current 8MB value just means that there will be a 8MB "hole" after the | 31 | * current 8MB value just means that there will be a 8MB "hole" after the |
@@ -41,79 +43,6 @@ | |||
41 | #define VMALLOC_START (((unsigned long)high_memory + VMALLOC_OFFSET) & ~(VMALLOC_OFFSET-1)) | 43 | #define VMALLOC_START (((unsigned long)high_memory + VMALLOC_OFFSET) & ~(VMALLOC_OFFSET-1)) |
42 | #endif | 44 | #endif |
43 | 45 | ||
44 | /* | ||
45 | * Hardware-wise, we have a two level page table structure, where the first | ||
46 | * level has 4096 entries, and the second level has 256 entries. Each entry | ||
47 | * is one 32-bit word. Most of the bits in the second level entry are used | ||
48 | * by hardware, and there aren't any "accessed" and "dirty" bits. | ||
49 | * | ||
50 | * Linux on the other hand has a three level page table structure, which can | ||
51 | * be wrapped to fit a two level page table structure easily - using the PGD | ||
52 | * and PTE only. However, Linux also expects one "PTE" table per page, and | ||
53 | * at least a "dirty" bit. | ||
54 | * | ||
55 | * Therefore, we tweak the implementation slightly - we tell Linux that we | ||
56 | * have 2048 entries in the first level, each of which is 8 bytes (iow, two | ||
57 | * hardware pointers to the second level.) The second level contains two | ||
58 | * hardware PTE tables arranged contiguously, preceded by Linux versions | ||
59 | * which contain the state information Linux needs. We, therefore, end up | ||
60 | * with 512 entries in the "PTE" level. | ||
61 | * | ||
62 | * This leads to the page tables having the following layout: | ||
63 | * | ||
64 | * pgd pte | ||
65 | * | | | ||
66 | * +--------+ | ||
67 | * | | +------------+ +0 | ||
68 | * +- - - - + | Linux pt 0 | | ||
69 | * | | +------------+ +1024 | ||
70 | * +--------+ +0 | Linux pt 1 | | ||
71 | * | |-----> +------------+ +2048 | ||
72 | * +- - - - + +4 | h/w pt 0 | | ||
73 | * | |-----> +------------+ +3072 | ||
74 | * +--------+ +8 | h/w pt 1 | | ||
75 | * | | +------------+ +4096 | ||
76 | * | ||
77 | * See L_PTE_xxx below for definitions of bits in the "Linux pt", and | ||
78 | * PTE_xxx for definitions of bits appearing in the "h/w pt". | ||
79 | * | ||
80 | * PMD_xxx definitions refer to bits in the first level page table. | ||
81 | * | ||
82 | * The "dirty" bit is emulated by only granting hardware write permission | ||
83 | * iff the page is marked "writable" and "dirty" in the Linux PTE. This | ||
84 | * means that a write to a clean page will cause a permission fault, and | ||
85 | * the Linux MM layer will mark the page dirty via handle_pte_fault(). | ||
86 | * For the hardware to notice the permission change, the TLB entry must | ||
87 | * be flushed, and ptep_set_access_flags() does that for us. | ||
88 | * | ||
89 | * The "accessed" or "young" bit is emulated by a similar method; we only | ||
90 | * allow accesses to the page if the "young" bit is set. Accesses to the | ||
91 | * page will cause a fault, and handle_pte_fault() will set the young bit | ||
92 | * for us as long as the page is marked present in the corresponding Linux | ||
93 | * PTE entry. Again, ptep_set_access_flags() will ensure that the TLB is | ||
94 | * up to date. | ||
95 | * | ||
96 | * However, when the "young" bit is cleared, we deny access to the page | ||
97 | * by clearing the hardware PTE. Currently Linux does not flush the TLB | ||
98 | * for us in this case, which means the TLB will retain the transation | ||
99 | * until either the TLB entry is evicted under pressure, or a context | ||
100 | * switch which changes the user space mapping occurs. | ||
101 | */ | ||
102 | #define PTRS_PER_PTE 512 | ||
103 | #define PTRS_PER_PMD 1 | ||
104 | #define PTRS_PER_PGD 2048 | ||
105 | |||
106 | #define PTE_HWTABLE_PTRS (PTRS_PER_PTE) | ||
107 | #define PTE_HWTABLE_OFF (PTE_HWTABLE_PTRS * sizeof(pte_t)) | ||
108 | #define PTE_HWTABLE_SIZE (PTRS_PER_PTE * sizeof(u32)) | ||
109 | |||
110 | /* | ||
111 | * PMD_SHIFT determines the size of the area a second-level page table can map | ||
112 | * PGDIR_SHIFT determines what a third-level page table entry can map | ||
113 | */ | ||
114 | #define PMD_SHIFT 21 | ||
115 | #define PGDIR_SHIFT 21 | ||
116 | |||
117 | #define LIBRARY_TEXT_START 0x0c000000 | 46 | #define LIBRARY_TEXT_START 0x0c000000 |
118 | 47 | ||
119 | #ifndef __ASSEMBLY__ | 48 | #ifndef __ASSEMBLY__ |
@@ -124,12 +53,6 @@ extern void __pgd_error(const char *file, int line, pgd_t); | |||
124 | #define pte_ERROR(pte) __pte_error(__FILE__, __LINE__, pte) | 53 | #define pte_ERROR(pte) __pte_error(__FILE__, __LINE__, pte) |
125 | #define pmd_ERROR(pmd) __pmd_error(__FILE__, __LINE__, pmd) | 54 | #define pmd_ERROR(pmd) __pmd_error(__FILE__, __LINE__, pmd) |
126 | #define pgd_ERROR(pgd) __pgd_error(__FILE__, __LINE__, pgd) | 55 | #define pgd_ERROR(pgd) __pgd_error(__FILE__, __LINE__, pgd) |
127 | #endif /* !__ASSEMBLY__ */ | ||
128 | |||
129 | #define PMD_SIZE (1UL << PMD_SHIFT) | ||
130 | #define PMD_MASK (~(PMD_SIZE-1)) | ||
131 | #define PGDIR_SIZE (1UL << PGDIR_SHIFT) | ||
132 | #define PGDIR_MASK (~(PGDIR_SIZE-1)) | ||
133 | 56 | ||
134 | /* | 57 | /* |
135 | * This is the lowest virtual address we can permit any user space | 58 | * This is the lowest virtual address we can permit any user space |
@@ -138,60 +61,6 @@ extern void __pgd_error(const char *file, int line, pgd_t); | |||
138 | */ | 61 | */ |
139 | #define FIRST_USER_ADDRESS PAGE_SIZE | 62 | #define FIRST_USER_ADDRESS PAGE_SIZE |
140 | 63 | ||
141 | #define USER_PTRS_PER_PGD (TASK_SIZE / PGDIR_SIZE) | ||
142 | |||
143 | /* | ||
144 | * section address mask and size definitions. | ||
145 | */ | ||
146 | #define SECTION_SHIFT 20 | ||
147 | #define SECTION_SIZE (1UL << SECTION_SHIFT) | ||
148 | #define SECTION_MASK (~(SECTION_SIZE-1)) | ||
149 | |||
150 | /* | ||
151 | * ARMv6 supersection address mask and size definitions. | ||
152 | */ | ||
153 | #define SUPERSECTION_SHIFT 24 | ||
154 | #define SUPERSECTION_SIZE (1UL << SUPERSECTION_SHIFT) | ||
155 | #define SUPERSECTION_MASK (~(SUPERSECTION_SIZE-1)) | ||
156 | |||
157 | /* | ||
158 | * "Linux" PTE definitions. | ||
159 | * | ||
160 | * We keep two sets of PTEs - the hardware and the linux version. | ||
161 | * This allows greater flexibility in the way we map the Linux bits | ||
162 | * onto the hardware tables, and allows us to have YOUNG and DIRTY | ||
163 | * bits. | ||
164 | * | ||
165 | * The PTE table pointer refers to the hardware entries; the "Linux" | ||
166 | * entries are stored 1024 bytes below. | ||
167 | */ | ||
168 | #define L_PTE_PRESENT (_AT(pteval_t, 1) << 0) | ||
169 | #define L_PTE_YOUNG (_AT(pteval_t, 1) << 1) | ||
170 | #define L_PTE_FILE (_AT(pteval_t, 1) << 2) /* only when !PRESENT */ | ||
171 | #define L_PTE_DIRTY (_AT(pteval_t, 1) << 6) | ||
172 | #define L_PTE_RDONLY (_AT(pteval_t, 1) << 7) | ||
173 | #define L_PTE_USER (_AT(pteval_t, 1) << 8) | ||
174 | #define L_PTE_XN (_AT(pteval_t, 1) << 9) | ||
175 | #define L_PTE_SHARED (_AT(pteval_t, 1) << 10) /* shared(v6), coherent(xsc3) */ | ||
176 | |||
177 | /* | ||
178 | * These are the memory types, defined to be compatible with | ||
179 | * pre-ARMv6 CPUs cacheable and bufferable bits: XXCB | ||
180 | */ | ||
181 | #define L_PTE_MT_UNCACHED (_AT(pteval_t, 0x00) << 2) /* 0000 */ | ||
182 | #define L_PTE_MT_BUFFERABLE (_AT(pteval_t, 0x01) << 2) /* 0001 */ | ||
183 | #define L_PTE_MT_WRITETHROUGH (_AT(pteval_t, 0x02) << 2) /* 0010 */ | ||
184 | #define L_PTE_MT_WRITEBACK (_AT(pteval_t, 0x03) << 2) /* 0011 */ | ||
185 | #define L_PTE_MT_MINICACHE (_AT(pteval_t, 0x06) << 2) /* 0110 (sa1100, xscale) */ | ||
186 | #define L_PTE_MT_WRITEALLOC (_AT(pteval_t, 0x07) << 2) /* 0111 */ | ||
187 | #define L_PTE_MT_DEV_SHARED (_AT(pteval_t, 0x04) << 2) /* 0100 */ | ||
188 | #define L_PTE_MT_DEV_NONSHARED (_AT(pteval_t, 0x0c) << 2) /* 1100 */ | ||
189 | #define L_PTE_MT_DEV_WC (_AT(pteval_t, 0x09) << 2) /* 1001 */ | ||
190 | #define L_PTE_MT_DEV_CACHED (_AT(pteval_t, 0x0b) << 2) /* 1011 */ | ||
191 | #define L_PTE_MT_MASK (_AT(pteval_t, 0x0f) << 2) | ||
192 | |||
193 | #ifndef __ASSEMBLY__ | ||
194 | |||
195 | /* | 64 | /* |
196 | * The pgprot_* and protection_map entries will be fixed up in runtime | 65 | * The pgprot_* and protection_map entries will be fixed up in runtime |
197 | * to include the cachable and bufferable bits based on memory policy, | 66 | * to include the cachable and bufferable bits based on memory policy, |
@@ -327,10 +196,10 @@ extern pgd_t swapper_pg_dir[PTRS_PER_PGD]; | |||
327 | 196 | ||
328 | static inline pte_t *pmd_page_vaddr(pmd_t pmd) | 197 | static inline pte_t *pmd_page_vaddr(pmd_t pmd) |
329 | { | 198 | { |
330 | return __va(pmd_val(pmd) & PAGE_MASK); | 199 | return __va(pmd_val(pmd) & PHYS_MASK & (s32)PAGE_MASK); |
331 | } | 200 | } |
332 | 201 | ||
333 | #define pmd_page(pmd) pfn_to_page(__phys_to_pfn(pmd_val(pmd))) | 202 | #define pmd_page(pmd) pfn_to_page(__phys_to_pfn(pmd_val(pmd) & PHYS_MASK)) |
334 | 203 | ||
335 | /* we don't need complex calculations here as the pmd is folded into the pgd */ | 204 | /* we don't need complex calculations here as the pmd is folded into the pgd */ |
336 | #define pmd_addr_end(addr,end) (end) | 205 | #define pmd_addr_end(addr,end) (end) |
@@ -351,7 +220,7 @@ static inline pte_t *pmd_page_vaddr(pmd_t pmd) | |||
351 | #define pte_offset_map(pmd,addr) (__pte_map(pmd) + pte_index(addr)) | 220 | #define pte_offset_map(pmd,addr) (__pte_map(pmd) + pte_index(addr)) |
352 | #define pte_unmap(pte) __pte_unmap(pte) | 221 | #define pte_unmap(pte) __pte_unmap(pte) |
353 | 222 | ||
354 | #define pte_pfn(pte) (pte_val(pte) >> PAGE_SHIFT) | 223 | #define pte_pfn(pte) ((pte_val(pte) & PHYS_MASK) >> PAGE_SHIFT) |
355 | #define pfn_pte(pfn,prot) __pte(__pfn_to_phys(pfn) | pgprot_val(prot)) | 224 | #define pfn_pte(pfn,prot) __pte(__pfn_to_phys(pfn) | pgprot_val(prot)) |
356 | 225 | ||
357 | #define pte_page(pte) pfn_to_page(pte_pfn(pte)) | 226 | #define pte_page(pte) pfn_to_page(pte_pfn(pte)) |
diff --git a/arch/arm/include/asm/poll.h b/arch/arm/include/asm/poll.h deleted file mode 100644 index c98509d3149e..000000000000 --- a/arch/arm/include/asm/poll.h +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | #include <asm-generic/poll.h> | ||
diff --git a/arch/arm/include/asm/resource.h b/arch/arm/include/asm/resource.h deleted file mode 100644 index 734b581b5b6a..000000000000 --- a/arch/arm/include/asm/resource.h +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | #ifndef _ARM_RESOURCE_H | ||
2 | #define _ARM_RESOURCE_H | ||
3 | |||
4 | #include <asm-generic/resource.h> | ||
5 | |||
6 | #endif | ||
diff --git a/arch/arm/include/asm/sections.h b/arch/arm/include/asm/sections.h deleted file mode 100644 index 2b8c5160388f..000000000000 --- a/arch/arm/include/asm/sections.h +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | #include <asm-generic/sections.h> | ||
diff --git a/arch/arm/include/asm/siginfo.h b/arch/arm/include/asm/siginfo.h deleted file mode 100644 index 5e21852e6039..000000000000 --- a/arch/arm/include/asm/siginfo.h +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | #ifndef _ASMARM_SIGINFO_H | ||
2 | #define _ASMARM_SIGINFO_H | ||
3 | |||
4 | #include <asm-generic/siginfo.h> | ||
5 | |||
6 | #endif | ||
diff --git a/arch/arm/include/asm/sizes.h b/arch/arm/include/asm/sizes.h deleted file mode 100644 index 154b89b81d3e..000000000000 --- a/arch/arm/include/asm/sizes.h +++ /dev/null | |||
@@ -1,21 +0,0 @@ | |||
1 | /* | ||
2 | * This program is free software; you can redistribute it and/or modify | ||
3 | * it under the terms of the GNU General Public License as published by | ||
4 | * the Free Software Foundation; either version 2 of the License, or | ||
5 | * (at your option) any later version. | ||
6 | * | ||
7 | * This program is distributed in the hope that it will be useful, | ||
8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
10 | * GNU General Public License for more details. | ||
11 | * | ||
12 | * You should have received a copy of the GNU General Public License | ||
13 | * along with this program; if not, write to the Free Software | ||
14 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
15 | */ | ||
16 | /* Size definitions | ||
17 | * Copyright (C) ARM Limited 1998. All rights reserved. | ||
18 | */ | ||
19 | #include <asm-generic/sizes.h> | ||
20 | |||
21 | #define SZ_48M (SZ_32M + SZ_16M) | ||
diff --git a/arch/arm/include/asm/smp.h b/arch/arm/include/asm/smp.h index e42d96a45d3e..0a17b62538c2 100644 --- a/arch/arm/include/asm/smp.h +++ b/arch/arm/include/asm/smp.h | |||
@@ -33,6 +33,11 @@ extern void show_ipi_list(struct seq_file *, int); | |||
33 | asmlinkage void do_IPI(int ipinr, struct pt_regs *regs); | 33 | asmlinkage void do_IPI(int ipinr, struct pt_regs *regs); |
34 | 34 | ||
35 | /* | 35 | /* |
36 | * Called from C code, this handles an IPI. | ||
37 | */ | ||
38 | void handle_IPI(int ipinr, struct pt_regs *regs); | ||
39 | |||
40 | /* | ||
36 | * Setup the set of possible CPUs (via set_cpu_possible) | 41 | * Setup the set of possible CPUs (via set_cpu_possible) |
37 | */ | 42 | */ |
38 | extern void smp_init_cpus(void); | 43 | extern void smp_init_cpus(void); |
@@ -66,6 +71,12 @@ extern void platform_secondary_init(unsigned int cpu); | |||
66 | extern void platform_smp_prepare_cpus(unsigned int); | 71 | extern void platform_smp_prepare_cpus(unsigned int); |
67 | 72 | ||
68 | /* | 73 | /* |
74 | * Logical CPU mapping. | ||
75 | */ | ||
76 | extern int __cpu_logical_map[NR_CPUS]; | ||
77 | #define cpu_logical_map(cpu) __cpu_logical_map[cpu] | ||
78 | |||
79 | /* | ||
69 | * Initial data for bringing up a secondary CPU. | 80 | * Initial data for bringing up a secondary CPU. |
70 | */ | 81 | */ |
71 | struct secondary_data { | 82 | struct secondary_data { |
diff --git a/arch/arm/include/asm/system.h b/arch/arm/include/asm/system.h index 832888d0c20c..984014b92647 100644 --- a/arch/arm/include/asm/system.h +++ b/arch/arm/include/asm/system.h | |||
@@ -57,18 +57,12 @@ | |||
57 | 57 | ||
58 | #ifndef __ASSEMBLY__ | 58 | #ifndef __ASSEMBLY__ |
59 | 59 | ||
60 | #include <linux/compiler.h> | ||
60 | #include <linux/linkage.h> | 61 | #include <linux/linkage.h> |
61 | #include <linux/irqflags.h> | 62 | #include <linux/irqflags.h> |
62 | 63 | ||
63 | #include <asm/outercache.h> | 64 | #include <asm/outercache.h> |
64 | 65 | ||
65 | #define __exception __attribute__((section(".exception.text"))) | ||
66 | #ifdef CONFIG_FUNCTION_GRAPH_TRACER | ||
67 | #define __exception_irq_entry __irq_entry | ||
68 | #else | ||
69 | #define __exception_irq_entry __exception | ||
70 | #endif | ||
71 | |||
72 | struct thread_info; | 66 | struct thread_info; |
73 | struct task_struct; | 67 | struct task_struct; |
74 | 68 | ||
@@ -97,14 +91,13 @@ void hook_ifault_code(int nr, int (*fn)(unsigned long, unsigned int, | |||
97 | #define xchg(ptr,x) \ | 91 | #define xchg(ptr,x) \ |
98 | ((__typeof__(*(ptr)))__xchg((unsigned long)(x),(ptr),sizeof(*(ptr)))) | 92 | ((__typeof__(*(ptr)))__xchg((unsigned long)(x),(ptr),sizeof(*(ptr)))) |
99 | 93 | ||
100 | extern asmlinkage void __backtrace(void); | ||
101 | extern asmlinkage void c_backtrace(unsigned long fp, int pmode); | 94 | extern asmlinkage void c_backtrace(unsigned long fp, int pmode); |
102 | 95 | ||
103 | struct mm_struct; | 96 | struct mm_struct; |
104 | extern void show_pte(struct mm_struct *mm, unsigned long addr); | 97 | extern void show_pte(struct mm_struct *mm, unsigned long addr); |
105 | extern void __show_regs(struct pt_regs *); | 98 | extern void __show_regs(struct pt_regs *); |
106 | 99 | ||
107 | extern int cpu_architecture(void); | 100 | extern int __pure cpu_architecture(void); |
108 | extern void cpu_init(void); | 101 | extern void cpu_init(void); |
109 | 102 | ||
110 | void arm_machine_restart(char mode, const char *cmd); | 103 | void arm_machine_restart(char mode, const char *cmd); |
diff --git a/arch/arm/include/asm/tlbflush.h b/arch/arm/include/asm/tlbflush.h index 8077145698ff..02b2f8203982 100644 --- a/arch/arm/include/asm/tlbflush.h +++ b/arch/arm/include/asm/tlbflush.h | |||
@@ -471,7 +471,7 @@ static inline void local_flush_tlb_kernel_page(unsigned long kaddr) | |||
471 | * these operations. This is typically used when we are removing | 471 | * these operations. This is typically used when we are removing |
472 | * PMD entries. | 472 | * PMD entries. |
473 | */ | 473 | */ |
474 | static inline void flush_pmd_entry(pmd_t *pmd) | 474 | static inline void flush_pmd_entry(void *pmd) |
475 | { | 475 | { |
476 | const unsigned int __tlb_flag = __cpu_tlb_flags; | 476 | const unsigned int __tlb_flag = __cpu_tlb_flags; |
477 | 477 | ||
@@ -487,7 +487,7 @@ static inline void flush_pmd_entry(pmd_t *pmd) | |||
487 | dsb(); | 487 | dsb(); |
488 | } | 488 | } |
489 | 489 | ||
490 | static inline void clean_pmd_entry(pmd_t *pmd) | 490 | static inline void clean_pmd_entry(void *pmd) |
491 | { | 491 | { |
492 | const unsigned int __tlb_flag = __cpu_tlb_flags; | 492 | const unsigned int __tlb_flag = __cpu_tlb_flags; |
493 | 493 | ||
diff --git a/arch/arm/include/asm/topology.h b/arch/arm/include/asm/topology.h index accbd7cad9b5..a7e457ed27c3 100644 --- a/arch/arm/include/asm/topology.h +++ b/arch/arm/include/asm/topology.h | |||
@@ -1,6 +1,39 @@ | |||
1 | #ifndef _ASM_ARM_TOPOLOGY_H | 1 | #ifndef _ASM_ARM_TOPOLOGY_H |
2 | #define _ASM_ARM_TOPOLOGY_H | 2 | #define _ASM_ARM_TOPOLOGY_H |
3 | 3 | ||
4 | #ifdef CONFIG_ARM_CPU_TOPOLOGY | ||
5 | |||
6 | #include <linux/cpumask.h> | ||
7 | |||
8 | struct cputopo_arm { | ||
9 | int thread_id; | ||
10 | int core_id; | ||
11 | int socket_id; | ||
12 | cpumask_t thread_sibling; | ||
13 | cpumask_t core_sibling; | ||
14 | }; | ||
15 | |||
16 | extern struct cputopo_arm cpu_topology[NR_CPUS]; | ||
17 | |||
18 | #define topology_physical_package_id(cpu) (cpu_topology[cpu].socket_id) | ||
19 | #define topology_core_id(cpu) (cpu_topology[cpu].core_id) | ||
20 | #define topology_core_cpumask(cpu) (&cpu_topology[cpu].core_sibling) | ||
21 | #define topology_thread_cpumask(cpu) (&cpu_topology[cpu].thread_sibling) | ||
22 | |||
23 | #define mc_capable() (cpu_topology[0].socket_id != -1) | ||
24 | #define smt_capable() (cpu_topology[0].thread_id != -1) | ||
25 | |||
26 | void init_cpu_topology(void); | ||
27 | void store_cpu_topology(unsigned int cpuid); | ||
28 | const struct cpumask *cpu_coregroup_mask(unsigned int cpu); | ||
29 | |||
30 | #else | ||
31 | |||
32 | static inline void init_cpu_topology(void) { } | ||
33 | static inline void store_cpu_topology(unsigned int cpuid) { } | ||
34 | |||
35 | #endif | ||
36 | |||
4 | #include <asm-generic/topology.h> | 37 | #include <asm-generic/topology.h> |
5 | 38 | ||
6 | #endif /* _ASM_ARM_TOPOLOGY_H */ | 39 | #endif /* _ASM_ARM_TOPOLOGY_H */ |
diff --git a/arch/arm/include/asm/unistd.h b/arch/arm/include/asm/unistd.h index 2c04ed5efeb5..c60a2944f95b 100644 --- a/arch/arm/include/asm/unistd.h +++ b/arch/arm/include/asm/unistd.h | |||
@@ -478,8 +478,8 @@ | |||
478 | /* | 478 | /* |
479 | * Unimplemented (or alternatively implemented) syscalls | 479 | * Unimplemented (or alternatively implemented) syscalls |
480 | */ | 480 | */ |
481 | #define __IGNORE_fadvise64_64 1 | 481 | #define __IGNORE_fadvise64_64 |
482 | #define __IGNORE_migrate_pages 1 | 482 | #define __IGNORE_migrate_pages |
483 | 483 | ||
484 | #endif /* __KERNEL__ */ | 484 | #endif /* __KERNEL__ */ |
485 | #endif /* __ASM_ARM_UNISTD_H */ | 485 | #endif /* __ASM_ARM_UNISTD_H */ |
diff --git a/arch/arm/kernel/Makefile b/arch/arm/kernel/Makefile index f7887dc53c1f..68036eece340 100644 --- a/arch/arm/kernel/Makefile +++ b/arch/arm/kernel/Makefile | |||
@@ -29,7 +29,7 @@ obj-$(CONFIG_MODULES) += armksyms.o module.o | |||
29 | obj-$(CONFIG_ARTHUR) += arthur.o | 29 | obj-$(CONFIG_ARTHUR) += arthur.o |
30 | obj-$(CONFIG_ISA_DMA) += dma-isa.o | 30 | obj-$(CONFIG_ISA_DMA) += dma-isa.o |
31 | obj-$(CONFIG_PCI) += bios32.o isa.o | 31 | obj-$(CONFIG_PCI) += bios32.o isa.o |
32 | obj-$(CONFIG_PM_SLEEP) += sleep.o | 32 | obj-$(CONFIG_ARM_CPU_SUSPEND) += sleep.o |
33 | obj-$(CONFIG_HAVE_SCHED_CLOCK) += sched_clock.o | 33 | obj-$(CONFIG_HAVE_SCHED_CLOCK) += sched_clock.o |
34 | obj-$(CONFIG_SMP) += smp.o smp_tlb.o | 34 | obj-$(CONFIG_SMP) += smp.o smp_tlb.o |
35 | obj-$(CONFIG_HAVE_ARM_SCU) += smp_scu.o | 35 | obj-$(CONFIG_HAVE_ARM_SCU) += smp_scu.o |
@@ -66,6 +66,7 @@ obj-$(CONFIG_IWMMXT) += iwmmxt.o | |||
66 | obj-$(CONFIG_CPU_HAS_PMU) += pmu.o | 66 | obj-$(CONFIG_CPU_HAS_PMU) += pmu.o |
67 | obj-$(CONFIG_HW_PERF_EVENTS) += perf_event.o | 67 | obj-$(CONFIG_HW_PERF_EVENTS) += perf_event.o |
68 | AFLAGS_iwmmxt.o := -Wa,-mcpu=iwmmxt | 68 | AFLAGS_iwmmxt.o := -Wa,-mcpu=iwmmxt |
69 | obj-$(CONFIG_ARM_CPU_TOPOLOGY) += topology.o | ||
69 | 70 | ||
70 | ifneq ($(CONFIG_ARCH_EBSA110),y) | 71 | ifneq ($(CONFIG_ARCH_EBSA110),y) |
71 | obj-y += io.o | 72 | obj-y += io.o |
diff --git a/arch/arm/kernel/armksyms.c b/arch/arm/kernel/armksyms.c index aeef960ff795..8e3c6f11b0a1 100644 --- a/arch/arm/kernel/armksyms.c +++ b/arch/arm/kernel/armksyms.c | |||
@@ -49,9 +49,6 @@ extern void __aeabi_ulcmp(void); | |||
49 | 49 | ||
50 | extern void fpundefinstr(void); | 50 | extern void fpundefinstr(void); |
51 | 51 | ||
52 | |||
53 | EXPORT_SYMBOL(__backtrace); | ||
54 | |||
55 | /* platform dependent support */ | 52 | /* platform dependent support */ |
56 | EXPORT_SYMBOL(__udelay); | 53 | EXPORT_SYMBOL(__udelay); |
57 | EXPORT_SYMBOL(__const_udelay); | 54 | EXPORT_SYMBOL(__const_udelay); |
diff --git a/arch/arm/kernel/asm-offsets.c b/arch/arm/kernel/asm-offsets.c index 16baba2e4369..1429d8989fb9 100644 --- a/arch/arm/kernel/asm-offsets.c +++ b/arch/arm/kernel/asm-offsets.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <asm/thread_info.h> | 20 | #include <asm/thread_info.h> |
21 | #include <asm/memory.h> | 21 | #include <asm/memory.h> |
22 | #include <asm/procinfo.h> | 22 | #include <asm/procinfo.h> |
23 | #include <asm/hardware/cache-l2x0.h> | ||
23 | #include <linux/kbuild.h> | 24 | #include <linux/kbuild.h> |
24 | 25 | ||
25 | /* | 26 | /* |
@@ -92,6 +93,17 @@ int main(void) | |||
92 | DEFINE(S_OLD_R0, offsetof(struct pt_regs, ARM_ORIG_r0)); | 93 | DEFINE(S_OLD_R0, offsetof(struct pt_regs, ARM_ORIG_r0)); |
93 | DEFINE(S_FRAME_SIZE, sizeof(struct pt_regs)); | 94 | DEFINE(S_FRAME_SIZE, sizeof(struct pt_regs)); |
94 | BLANK(); | 95 | BLANK(); |
96 | #ifdef CONFIG_CACHE_L2X0 | ||
97 | DEFINE(L2X0_R_PHY_BASE, offsetof(struct l2x0_regs, phy_base)); | ||
98 | DEFINE(L2X0_R_AUX_CTRL, offsetof(struct l2x0_regs, aux_ctrl)); | ||
99 | DEFINE(L2X0_R_TAG_LATENCY, offsetof(struct l2x0_regs, tag_latency)); | ||
100 | DEFINE(L2X0_R_DATA_LATENCY, offsetof(struct l2x0_regs, data_latency)); | ||
101 | DEFINE(L2X0_R_FILTER_START, offsetof(struct l2x0_regs, filter_start)); | ||
102 | DEFINE(L2X0_R_FILTER_END, offsetof(struct l2x0_regs, filter_end)); | ||
103 | DEFINE(L2X0_R_PREFETCH_CTRL, offsetof(struct l2x0_regs, prefetch_ctrl)); | ||
104 | DEFINE(L2X0_R_PWR_CTRL, offsetof(struct l2x0_regs, pwr_ctrl)); | ||
105 | BLANK(); | ||
106 | #endif | ||
95 | #ifdef CONFIG_CPU_HAS_ASID | 107 | #ifdef CONFIG_CPU_HAS_ASID |
96 | DEFINE(MM_CONTEXT_ID, offsetof(struct mm_struct, context.id)); | 108 | DEFINE(MM_CONTEXT_ID, offsetof(struct mm_struct, context.id)); |
97 | BLANK(); | 109 | BLANK(); |
diff --git a/arch/arm/kernel/bios32.c b/arch/arm/kernel/bios32.c index d6df359408f0..c0d9203fc75e 100644 --- a/arch/arm/kernel/bios32.c +++ b/arch/arm/kernel/bios32.c | |||
@@ -412,6 +412,9 @@ void pcibios_fixup_bus(struct pci_bus *bus) | |||
412 | printk(KERN_INFO "PCI: bus%d: Fast back to back transfers %sabled\n", | 412 | printk(KERN_INFO "PCI: bus%d: Fast back to back transfers %sabled\n", |
413 | bus->number, (features & PCI_COMMAND_FAST_BACK) ? "en" : "dis"); | 413 | bus->number, (features & PCI_COMMAND_FAST_BACK) ? "en" : "dis"); |
414 | } | 414 | } |
415 | #ifdef CONFIG_HOTPLUG | ||
416 | EXPORT_SYMBOL(pcibios_fixup_bus); | ||
417 | #endif | ||
415 | 418 | ||
416 | /* | 419 | /* |
417 | * Convert from Linux-centric to bus-centric addresses for bridge devices. | 420 | * Convert from Linux-centric to bus-centric addresses for bridge devices. |
@@ -431,6 +434,7 @@ pcibios_resource_to_bus(struct pci_dev *dev, struct pci_bus_region *region, | |||
431 | region->start = res->start - offset; | 434 | region->start = res->start - offset; |
432 | region->end = res->end - offset; | 435 | region->end = res->end - offset; |
433 | } | 436 | } |
437 | EXPORT_SYMBOL(pcibios_resource_to_bus); | ||
434 | 438 | ||
435 | void __devinit | 439 | void __devinit |
436 | pcibios_bus_to_resource(struct pci_dev *dev, struct resource *res, | 440 | pcibios_bus_to_resource(struct pci_dev *dev, struct resource *res, |
@@ -447,12 +451,7 @@ pcibios_bus_to_resource(struct pci_dev *dev, struct resource *res, | |||
447 | res->start = region->start + offset; | 451 | res->start = region->start + offset; |
448 | res->end = region->end + offset; | 452 | res->end = region->end + offset; |
449 | } | 453 | } |
450 | |||
451 | #ifdef CONFIG_HOTPLUG | ||
452 | EXPORT_SYMBOL(pcibios_fixup_bus); | ||
453 | EXPORT_SYMBOL(pcibios_resource_to_bus); | ||
454 | EXPORT_SYMBOL(pcibios_bus_to_resource); | 454 | EXPORT_SYMBOL(pcibios_bus_to_resource); |
455 | #endif | ||
456 | 455 | ||
457 | /* | 456 | /* |
458 | * Swizzle the device pin each time we cross a bridge. | 457 | * Swizzle the device pin each time we cross a bridge. |
diff --git a/arch/arm/kernel/debug.S b/arch/arm/kernel/debug.S index bcd66e00bdbe..0f852d082fcf 100644 --- a/arch/arm/kernel/debug.S +++ b/arch/arm/kernel/debug.S | |||
@@ -151,6 +151,8 @@ printhex: adr r2, hexbuf | |||
151 | b printascii | 151 | b printascii |
152 | ENDPROC(printhex2) | 152 | ENDPROC(printhex2) |
153 | 153 | ||
154 | hexbuf: .space 16 | ||
155 | |||
154 | .ltorg | 156 | .ltorg |
155 | 157 | ||
156 | ENTRY(printascii) | 158 | ENTRY(printascii) |
@@ -175,5 +177,3 @@ ENTRY(printch) | |||
175 | mov r0, #0 | 177 | mov r0, #0 |
176 | b 1b | 178 | b 1b |
177 | ENDPROC(printch) | 179 | ENDPROC(printch) |
178 | |||
179 | hexbuf: .space 16 | ||
diff --git a/arch/arm/kernel/ecard.c b/arch/arm/kernel/ecard.c index d16500110ee9..4dd0edab6a65 100644 --- a/arch/arm/kernel/ecard.c +++ b/arch/arm/kernel/ecard.c | |||
@@ -237,7 +237,7 @@ static void ecard_init_pgtables(struct mm_struct *mm) | |||
237 | 237 | ||
238 | memcpy(dst_pgd, src_pgd, sizeof(pgd_t) * (IO_SIZE / PGDIR_SIZE)); | 238 | memcpy(dst_pgd, src_pgd, sizeof(pgd_t) * (IO_SIZE / PGDIR_SIZE)); |
239 | 239 | ||
240 | src_pgd = pgd_offset(mm, EASI_BASE); | 240 | src_pgd = pgd_offset(mm, (unsigned long)EASI_BASE); |
241 | dst_pgd = pgd_offset(mm, EASI_START); | 241 | dst_pgd = pgd_offset(mm, EASI_START); |
242 | 242 | ||
243 | memcpy(dst_pgd, src_pgd, sizeof(pgd_t) * (EASI_SIZE / PGDIR_SIZE)); | 243 | memcpy(dst_pgd, src_pgd, sizeof(pgd_t) * (EASI_SIZE / PGDIR_SIZE)); |
@@ -674,44 +674,37 @@ static int __init ecard_probeirqhw(void) | |||
674 | #define ecard_probeirqhw() (0) | 674 | #define ecard_probeirqhw() (0) |
675 | #endif | 675 | #endif |
676 | 676 | ||
677 | #ifndef IO_EC_MEMC8_BASE | 677 | static void __iomem *__ecard_address(ecard_t *ec, card_type_t type, card_speed_t speed) |
678 | #define IO_EC_MEMC8_BASE 0 | ||
679 | #endif | ||
680 | |||
681 | static unsigned int __ecard_address(ecard_t *ec, card_type_t type, card_speed_t speed) | ||
682 | { | 678 | { |
683 | unsigned long address = 0; | 679 | void __iomem *address = NULL; |
684 | int slot = ec->slot_no; | 680 | int slot = ec->slot_no; |
685 | 681 | ||
686 | if (ec->slot_no == 8) | 682 | if (ec->slot_no == 8) |
687 | return IO_EC_MEMC8_BASE; | 683 | return ECARD_MEMC8_BASE; |
688 | 684 | ||
689 | ectcr &= ~(1 << slot); | 685 | ectcr &= ~(1 << slot); |
690 | 686 | ||
691 | switch (type) { | 687 | switch (type) { |
692 | case ECARD_MEMC: | 688 | case ECARD_MEMC: |
693 | if (slot < 4) | 689 | if (slot < 4) |
694 | address = IO_EC_MEMC_BASE + (slot << 12); | 690 | address = ECARD_MEMC_BASE + (slot << 14); |
695 | break; | 691 | break; |
696 | 692 | ||
697 | case ECARD_IOC: | 693 | case ECARD_IOC: |
698 | if (slot < 4) | 694 | if (slot < 4) |
699 | address = IO_EC_IOC_BASE + (slot << 12); | 695 | address = ECARD_IOC_BASE + (slot << 14); |
700 | #ifdef IO_EC_IOC4_BASE | ||
701 | else | 696 | else |
702 | address = IO_EC_IOC4_BASE + ((slot - 4) << 12); | 697 | address = ECARD_IOC4_BASE + ((slot - 4) << 14); |
703 | #endif | ||
704 | if (address) | 698 | if (address) |
705 | address += speed << 17; | 699 | address += speed << 19; |
706 | break; | 700 | break; |
707 | 701 | ||
708 | #ifdef IO_EC_EASI_BASE | ||
709 | case ECARD_EASI: | 702 | case ECARD_EASI: |
710 | address = IO_EC_EASI_BASE + (slot << 22); | 703 | address = ECARD_EASI_BASE + (slot << 24); |
711 | if (speed == ECARD_FAST) | 704 | if (speed == ECARD_FAST) |
712 | ectcr |= 1 << slot; | 705 | ectcr |= 1 << slot; |
713 | break; | 706 | break; |
714 | #endif | 707 | |
715 | default: | 708 | default: |
716 | break; | 709 | break; |
717 | } | 710 | } |
@@ -990,6 +983,7 @@ ecard_probe(int slot, card_type_t type) | |||
990 | ecard_t **ecp; | 983 | ecard_t **ecp; |
991 | ecard_t *ec; | 984 | ecard_t *ec; |
992 | struct ex_ecid cid; | 985 | struct ex_ecid cid; |
986 | void __iomem *addr; | ||
993 | int i, rc; | 987 | int i, rc; |
994 | 988 | ||
995 | ec = ecard_alloc_card(type, slot); | 989 | ec = ecard_alloc_card(type, slot); |
@@ -999,7 +993,7 @@ ecard_probe(int slot, card_type_t type) | |||
999 | } | 993 | } |
1000 | 994 | ||
1001 | rc = -ENODEV; | 995 | rc = -ENODEV; |
1002 | if ((ec->podaddr = __ecard_address(ec, type, ECARD_SYNC)) == 0) | 996 | if ((addr = __ecard_address(ec, type, ECARD_SYNC)) == NULL) |
1003 | goto nodev; | 997 | goto nodev; |
1004 | 998 | ||
1005 | cid.r_zero = 1; | 999 | cid.r_zero = 1; |
@@ -1019,7 +1013,7 @@ ecard_probe(int slot, card_type_t type) | |||
1019 | ec->cid.fiqmask = cid.r_fiqmask; | 1013 | ec->cid.fiqmask = cid.r_fiqmask; |
1020 | ec->cid.fiqoff = ecard_gets24(cid.r_fiqoff); | 1014 | ec->cid.fiqoff = ecard_gets24(cid.r_fiqoff); |
1021 | ec->fiqaddr = | 1015 | ec->fiqaddr = |
1022 | ec->irqaddr = (void __iomem *)ioaddr(ec->podaddr); | 1016 | ec->irqaddr = addr; |
1023 | 1017 | ||
1024 | if (ec->cid.is) { | 1018 | if (ec->cid.is) { |
1025 | ec->irqmask = ec->cid.irqmask; | 1019 | ec->irqmask = ec->cid.irqmask; |
@@ -1048,10 +1042,8 @@ ecard_probe(int slot, card_type_t type) | |||
1048 | set_irq_flags(ec->irq, IRQF_VALID); | 1042 | set_irq_flags(ec->irq, IRQF_VALID); |
1049 | } | 1043 | } |
1050 | 1044 | ||
1051 | #ifdef IO_EC_MEMC8_BASE | ||
1052 | if (slot == 8) | 1045 | if (slot == 8) |
1053 | ec->irq = 11; | 1046 | ec->irq = 11; |
1054 | #endif | ||
1055 | #ifdef CONFIG_ARCH_RPC | 1047 | #ifdef CONFIG_ARCH_RPC |
1056 | /* On RiscPC, only first two slots have DMA capability */ | 1048 | /* On RiscPC, only first two slots have DMA capability */ |
1057 | if (slot < 2) | 1049 | if (slot < 2) |
@@ -1097,9 +1089,7 @@ static int __init ecard_init(void) | |||
1097 | ecard_probe(slot, ECARD_IOC); | 1089 | ecard_probe(slot, ECARD_IOC); |
1098 | } | 1090 | } |
1099 | 1091 | ||
1100 | #ifdef IO_EC_MEMC8_BASE | ||
1101 | ecard_probe(8, ECARD_IOC); | 1092 | ecard_probe(8, ECARD_IOC); |
1102 | #endif | ||
1103 | 1093 | ||
1104 | irqhw = ecard_probeirqhw(); | 1094 | irqhw = ecard_probeirqhw(); |
1105 | 1095 | ||
diff --git a/arch/arm/kernel/entry-armv.S b/arch/arm/kernel/entry-armv.S index a87cbf889ff4..9ad50c4208ae 100644 --- a/arch/arm/kernel/entry-armv.S +++ b/arch/arm/kernel/entry-armv.S | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <asm/unwind.h> | 24 | #include <asm/unwind.h> |
25 | #include <asm/unistd.h> | 25 | #include <asm/unistd.h> |
26 | #include <asm/tls.h> | 26 | #include <asm/tls.h> |
27 | #include <asm/system.h> | ||
27 | 28 | ||
28 | #include "entry-header.S" | 29 | #include "entry-header.S" |
29 | #include <asm/entry-macro-multi.S> | 30 | #include <asm/entry-macro-multi.S> |
@@ -262,8 +263,7 @@ __und_svc: | |||
262 | ldr r0, [r4, #-4] | 263 | ldr r0, [r4, #-4] |
263 | #else | 264 | #else |
264 | ldrh r0, [r4, #-2] @ Thumb instruction at LR - 2 | 265 | ldrh r0, [r4, #-2] @ Thumb instruction at LR - 2 |
265 | and r9, r0, #0xf800 | 266 | cmp r0, #0xe800 @ 32-bit instruction if xx >= 0 |
266 | cmp r9, #0xe800 @ 32-bit instruction if xx >= 0 | ||
267 | ldrhhs r9, [r4] @ bottom 16 bits | 267 | ldrhhs r9, [r4] @ bottom 16 bits |
268 | orrhs r0, r9, r0, lsl #16 | 268 | orrhs r0, r9, r0, lsl #16 |
269 | #endif | 269 | #endif |
@@ -440,18 +440,46 @@ __und_usr: | |||
440 | #endif | 440 | #endif |
441 | beq call_fpe | 441 | beq call_fpe |
442 | @ Thumb instruction | 442 | @ Thumb instruction |
443 | #if __LINUX_ARM_ARCH__ >= 7 | 443 | #if CONFIG_ARM_THUMB && __LINUX_ARM_ARCH__ >= 6 && CONFIG_CPU_V7 |
444 | /* | ||
445 | * Thumb-2 instruction handling. Note that because pre-v6 and >= v6 platforms | ||
446 | * can never be supported in a single kernel, this code is not applicable at | ||
447 | * all when __LINUX_ARM_ARCH__ < 6. This allows simplifying assumptions to be | ||
448 | * made about .arch directives. | ||
449 | */ | ||
450 | #if __LINUX_ARM_ARCH__ < 7 | ||
451 | /* If the target CPU may not be Thumb-2-capable, a run-time check is needed: */ | ||
452 | #define NEED_CPU_ARCHITECTURE | ||
453 | ldr r5, .LCcpu_architecture | ||
454 | ldr r5, [r5] | ||
455 | cmp r5, #CPU_ARCH_ARMv7 | ||
456 | blo __und_usr_unknown | ||
457 | /* | ||
458 | * The following code won't get run unless the running CPU really is v7, so | ||
459 | * coding round the lack of ldrht on older arches is pointless. Temporarily | ||
460 | * override the assembler target arch with the minimum required instead: | ||
461 | */ | ||
462 | .arch armv6t2 | ||
463 | #endif | ||
444 | 2: | 464 | 2: |
445 | ARM( ldrht r5, [r4], #2 ) | 465 | ARM( ldrht r5, [r4], #2 ) |
446 | THUMB( ldrht r5, [r4] ) | 466 | THUMB( ldrht r5, [r4] ) |
447 | THUMB( add r4, r4, #2 ) | 467 | THUMB( add r4, r4, #2 ) |
448 | and r0, r5, #0xf800 @ mask bits 111x x... .... .... | 468 | cmp r5, #0xe800 @ 32bit instruction if xx != 0 |
449 | cmp r0, #0xe800 @ 32bit instruction if xx != 0 | ||
450 | blo __und_usr_unknown | 469 | blo __und_usr_unknown |
451 | 3: ldrht r0, [r4] | 470 | 3: ldrht r0, [r4] |
452 | add r2, r2, #2 @ r2 is PC + 2, make it PC + 4 | 471 | add r2, r2, #2 @ r2 is PC + 2, make it PC + 4 |
453 | orr r0, r0, r5, lsl #16 | 472 | orr r0, r0, r5, lsl #16 |
473 | |||
474 | #if __LINUX_ARM_ARCH__ < 7 | ||
475 | /* If the target arch was overridden, change it back: */ | ||
476 | #ifdef CONFIG_CPU_32v6K | ||
477 | .arch armv6k | ||
454 | #else | 478 | #else |
479 | .arch armv6 | ||
480 | #endif | ||
481 | #endif /* __LINUX_ARM_ARCH__ < 7 */ | ||
482 | #else /* !(CONFIG_ARM_THUMB && __LINUX_ARM_ARCH__ >= 6 && CONFIG_CPU_V7) */ | ||
455 | b __und_usr_unknown | 483 | b __und_usr_unknown |
456 | #endif | 484 | #endif |
457 | UNWIND(.fnend ) | 485 | UNWIND(.fnend ) |
@@ -578,6 +606,12 @@ call_fpe: | |||
578 | movw_pc lr @ CP#14 (Debug) | 606 | movw_pc lr @ CP#14 (Debug) |
579 | movw_pc lr @ CP#15 (Control) | 607 | movw_pc lr @ CP#15 (Control) |
580 | 608 | ||
609 | #ifdef NEED_CPU_ARCHITECTURE | ||
610 | .align 2 | ||
611 | .LCcpu_architecture: | ||
612 | .word __cpu_architecture | ||
613 | #endif | ||
614 | |||
581 | #ifdef CONFIG_NEON | 615 | #ifdef CONFIG_NEON |
582 | .align 6 | 616 | .align 6 |
583 | 617 | ||
diff --git a/arch/arm/kernel/head.S b/arch/arm/kernel/head.S index 742b6108a001..239703dbdf4f 100644 --- a/arch/arm/kernel/head.S +++ b/arch/arm/kernel/head.S | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <asm/memory.h> | 21 | #include <asm/memory.h> |
22 | #include <asm/thread_info.h> | 22 | #include <asm/thread_info.h> |
23 | #include <asm/system.h> | 23 | #include <asm/system.h> |
24 | #include <asm/pgtable.h> | ||
24 | 25 | ||
25 | #ifdef CONFIG_DEBUG_LL | 26 | #ifdef CONFIG_DEBUG_LL |
26 | #include <mach/debug-macro.S> | 27 | #include <mach/debug-macro.S> |
@@ -38,11 +39,14 @@ | |||
38 | #error KERNEL_RAM_VADDR must start at 0xXXXX8000 | 39 | #error KERNEL_RAM_VADDR must start at 0xXXXX8000 |
39 | #endif | 40 | #endif |
40 | 41 | ||
42 | #define PG_DIR_SIZE 0x4000 | ||
43 | #define PMD_ORDER 2 | ||
44 | |||
41 | .globl swapper_pg_dir | 45 | .globl swapper_pg_dir |
42 | .equ swapper_pg_dir, KERNEL_RAM_VADDR - 0x4000 | 46 | .equ swapper_pg_dir, KERNEL_RAM_VADDR - PG_DIR_SIZE |
43 | 47 | ||
44 | .macro pgtbl, rd, phys | 48 | .macro pgtbl, rd, phys |
45 | add \rd, \phys, #TEXT_OFFSET - 0x4000 | 49 | add \rd, \phys, #TEXT_OFFSET - PG_DIR_SIZE |
46 | .endm | 50 | .endm |
47 | 51 | ||
48 | #ifdef CONFIG_XIP_KERNEL | 52 | #ifdef CONFIG_XIP_KERNEL |
@@ -148,11 +152,11 @@ __create_page_tables: | |||
148 | pgtbl r4, r8 @ page table address | 152 | pgtbl r4, r8 @ page table address |
149 | 153 | ||
150 | /* | 154 | /* |
151 | * Clear the 16K level 1 swapper page table | 155 | * Clear the swapper page table |
152 | */ | 156 | */ |
153 | mov r0, r4 | 157 | mov r0, r4 |
154 | mov r3, #0 | 158 | mov r3, #0 |
155 | add r6, r0, #0x4000 | 159 | add r6, r0, #PG_DIR_SIZE |
156 | 1: str r3, [r0], #4 | 160 | 1: str r3, [r0], #4 |
157 | str r3, [r0], #4 | 161 | str r3, [r0], #4 |
158 | str r3, [r0], #4 | 162 | str r3, [r0], #4 |
@@ -171,30 +175,30 @@ __create_page_tables: | |||
171 | sub r0, r0, r3 @ virt->phys offset | 175 | sub r0, r0, r3 @ virt->phys offset |
172 | add r5, r5, r0 @ phys __enable_mmu | 176 | add r5, r5, r0 @ phys __enable_mmu |
173 | add r6, r6, r0 @ phys __enable_mmu_end | 177 | add r6, r6, r0 @ phys __enable_mmu_end |
174 | mov r5, r5, lsr #20 | 178 | mov r5, r5, lsr #SECTION_SHIFT |
175 | mov r6, r6, lsr #20 | 179 | mov r6, r6, lsr #SECTION_SHIFT |
176 | 180 | ||
177 | 1: orr r3, r7, r5, lsl #20 @ flags + kernel base | 181 | 1: orr r3, r7, r5, lsl #SECTION_SHIFT @ flags + kernel base |
178 | str r3, [r4, r5, lsl #2] @ identity mapping | 182 | str r3, [r4, r5, lsl #PMD_ORDER] @ identity mapping |
179 | teq r5, r6 | 183 | cmp r5, r6 |
180 | addne r5, r5, #1 @ next section | 184 | addlo r5, r5, #1 @ next section |
181 | bne 1b | 185 | blo 1b |
182 | 186 | ||
183 | /* | 187 | /* |
184 | * Now setup the pagetables for our kernel direct | 188 | * Now setup the pagetables for our kernel direct |
185 | * mapped region. | 189 | * mapped region. |
186 | */ | 190 | */ |
187 | mov r3, pc | 191 | mov r3, pc |
188 | mov r3, r3, lsr #20 | 192 | mov r3, r3, lsr #SECTION_SHIFT |
189 | orr r3, r7, r3, lsl #20 | 193 | orr r3, r7, r3, lsl #SECTION_SHIFT |
190 | add r0, r4, #(KERNEL_START & 0xff000000) >> 18 | 194 | add r0, r4, #(KERNEL_START & 0xff000000) >> (SECTION_SHIFT - PMD_ORDER) |
191 | str r3, [r0, #(KERNEL_START & 0x00f00000) >> 18]! | 195 | str r3, [r0, #((KERNEL_START & 0x00f00000) >> SECTION_SHIFT) << PMD_ORDER]! |
192 | ldr r6, =(KERNEL_END - 1) | 196 | ldr r6, =(KERNEL_END - 1) |
193 | add r0, r0, #4 | 197 | add r0, r0, #1 << PMD_ORDER |
194 | add r6, r4, r6, lsr #18 | 198 | add r6, r4, r6, lsr #(SECTION_SHIFT - PMD_ORDER) |
195 | 1: cmp r0, r6 | 199 | 1: cmp r0, r6 |
196 | add r3, r3, #1 << 20 | 200 | add r3, r3, #1 << SECTION_SHIFT |
197 | strls r3, [r0], #4 | 201 | strls r3, [r0], #1 << PMD_ORDER |
198 | bls 1b | 202 | bls 1b |
199 | 203 | ||
200 | #ifdef CONFIG_XIP_KERNEL | 204 | #ifdef CONFIG_XIP_KERNEL |
@@ -203,11 +207,11 @@ __create_page_tables: | |||
203 | */ | 207 | */ |
204 | add r3, r8, #TEXT_OFFSET | 208 | add r3, r8, #TEXT_OFFSET |
205 | orr r3, r3, r7 | 209 | orr r3, r3, r7 |
206 | add r0, r4, #(KERNEL_RAM_VADDR & 0xff000000) >> 18 | 210 | add r0, r4, #(KERNEL_RAM_VADDR & 0xff000000) >> (SECTION_SHIFT - PMD_ORDER) |
207 | str r3, [r0, #(KERNEL_RAM_VADDR & 0x00f00000) >> 18]! | 211 | str r3, [r0, #(KERNEL_RAM_VADDR & 0x00f00000) >> (SECTION_SHIFT - PMD_ORDER)]! |
208 | ldr r6, =(_end - 1) | 212 | ldr r6, =(_end - 1) |
209 | add r0, r0, #4 | 213 | add r0, r0, #4 |
210 | add r6, r4, r6, lsr #18 | 214 | add r6, r4, r6, lsr #(SECTION_SHIFT - PMD_ORDER) |
211 | 1: cmp r0, r6 | 215 | 1: cmp r0, r6 |
212 | add r3, r3, #1 << 20 | 216 | add r3, r3, #1 << 20 |
213 | strls r3, [r0], #4 | 217 | strls r3, [r0], #4 |
@@ -218,12 +222,12 @@ __create_page_tables: | |||
218 | * Then map boot params address in r2 or | 222 | * Then map boot params address in r2 or |
219 | * the first 1MB of ram if boot params address is not specified. | 223 | * the first 1MB of ram if boot params address is not specified. |
220 | */ | 224 | */ |
221 | mov r0, r2, lsr #20 | 225 | mov r0, r2, lsr #SECTION_SHIFT |
222 | movs r0, r0, lsl #20 | 226 | movs r0, r0, lsl #SECTION_SHIFT |
223 | moveq r0, r8 | 227 | moveq r0, r8 |
224 | sub r3, r0, r8 | 228 | sub r3, r0, r8 |
225 | add r3, r3, #PAGE_OFFSET | 229 | add r3, r3, #PAGE_OFFSET |
226 | add r3, r4, r3, lsr #18 | 230 | add r3, r4, r3, lsr #(SECTION_SHIFT - PMD_ORDER) |
227 | orr r6, r7, r0 | 231 | orr r6, r7, r0 |
228 | str r6, [r3] | 232 | str r6, [r3] |
229 | 233 | ||
@@ -236,21 +240,21 @@ __create_page_tables: | |||
236 | */ | 240 | */ |
237 | addruart r7, r3 | 241 | addruart r7, r3 |
238 | 242 | ||
239 | mov r3, r3, lsr #20 | 243 | mov r3, r3, lsr #SECTION_SHIFT |
240 | mov r3, r3, lsl #2 | 244 | mov r3, r3, lsl #PMD_ORDER |
241 | 245 | ||
242 | add r0, r4, r3 | 246 | add r0, r4, r3 |
243 | rsb r3, r3, #0x4000 @ PTRS_PER_PGD*sizeof(long) | 247 | rsb r3, r3, #0x4000 @ PTRS_PER_PGD*sizeof(long) |
244 | cmp r3, #0x0800 @ limit to 512MB | 248 | cmp r3, #0x0800 @ limit to 512MB |
245 | movhi r3, #0x0800 | 249 | movhi r3, #0x0800 |
246 | add r6, r0, r3 | 250 | add r6, r0, r3 |
247 | mov r3, r7, lsr #20 | 251 | mov r3, r7, lsr #SECTION_SHIFT |
248 | ldr r7, [r10, #PROCINFO_IO_MMUFLAGS] @ io_mmuflags | 252 | ldr r7, [r10, #PROCINFO_IO_MMUFLAGS] @ io_mmuflags |
249 | orr r3, r7, r3, lsl #20 | 253 | orr r3, r7, r3, lsl #SECTION_SHIFT |
250 | 1: str r3, [r0], #4 | 254 | 1: str r3, [r0], #4 |
251 | add r3, r3, #1 << 20 | 255 | add r3, r3, #1 << SECTION_SHIFT |
252 | teq r0, r6 | 256 | cmp r0, r6 |
253 | bne 1b | 257 | blo 1b |
254 | 258 | ||
255 | #else /* CONFIG_DEBUG_ICEDCC */ | 259 | #else /* CONFIG_DEBUG_ICEDCC */ |
256 | /* we don't need any serial debugging mappings for ICEDCC */ | 260 | /* we don't need any serial debugging mappings for ICEDCC */ |
@@ -262,7 +266,7 @@ __create_page_tables: | |||
262 | * If we're using the NetWinder or CATS, we also need to map | 266 | * If we're using the NetWinder or CATS, we also need to map |
263 | * in the 16550-type serial port for the debug messages | 267 | * in the 16550-type serial port for the debug messages |
264 | */ | 268 | */ |
265 | add r0, r4, #0xff000000 >> 18 | 269 | add r0, r4, #0xff000000 >> (SECTION_SHIFT - PMD_ORDER) |
266 | orr r3, r7, #0x7c000000 | 270 | orr r3, r7, #0x7c000000 |
267 | str r3, [r0] | 271 | str r3, [r0] |
268 | #endif | 272 | #endif |
@@ -272,10 +276,10 @@ __create_page_tables: | |||
272 | * Similar reasons here - for debug. This is | 276 | * Similar reasons here - for debug. This is |
273 | * only for Acorn RiscPC architectures. | 277 | * only for Acorn RiscPC architectures. |
274 | */ | 278 | */ |
275 | add r0, r4, #0x02000000 >> 18 | 279 | add r0, r4, #0x02000000 >> (SECTION_SHIFT - PMD_ORDER) |
276 | orr r3, r7, #0x02000000 | 280 | orr r3, r7, #0x02000000 |
277 | str r3, [r0] | 281 | str r3, [r0] |
278 | add r0, r4, #0xd8000000 >> 18 | 282 | add r0, r4, #0xd8000000 >> (SECTION_SHIFT - PMD_ORDER) |
279 | str r3, [r0] | 283 | str r3, [r0] |
280 | #endif | 284 | #endif |
281 | #endif | 285 | #endif |
@@ -488,13 +492,8 @@ __fixup_pv_table: | |||
488 | add r5, r5, r3 @ adjust table end address | 492 | add r5, r5, r3 @ adjust table end address |
489 | add r7, r7, r3 @ adjust __pv_phys_offset address | 493 | add r7, r7, r3 @ adjust __pv_phys_offset address |
490 | str r8, [r7] @ save computed PHYS_OFFSET to __pv_phys_offset | 494 | str r8, [r7] @ save computed PHYS_OFFSET to __pv_phys_offset |
491 | #ifndef CONFIG_ARM_PATCH_PHYS_VIRT_16BIT | ||
492 | mov r6, r3, lsr #24 @ constant for add/sub instructions | 495 | mov r6, r3, lsr #24 @ constant for add/sub instructions |
493 | teq r3, r6, lsl #24 @ must be 16MiB aligned | 496 | teq r3, r6, lsl #24 @ must be 16MiB aligned |
494 | #else | ||
495 | mov r6, r3, lsr #16 @ constant for add/sub instructions | ||
496 | teq r3, r6, lsl #16 @ must be 64kiB aligned | ||
497 | #endif | ||
498 | THUMB( it ne @ cross section branch ) | 497 | THUMB( it ne @ cross section branch ) |
499 | bne __error | 498 | bne __error |
500 | str r6, [r7, #4] @ save to __pv_offset | 499 | str r6, [r7, #4] @ save to __pv_offset |
@@ -510,20 +509,8 @@ ENDPROC(__fixup_pv_table) | |||
510 | .text | 509 | .text |
511 | __fixup_a_pv_table: | 510 | __fixup_a_pv_table: |
512 | #ifdef CONFIG_THUMB2_KERNEL | 511 | #ifdef CONFIG_THUMB2_KERNEL |
513 | #ifdef CONFIG_ARM_PATCH_PHYS_VIRT_16BIT | 512 | lsls r6, #24 |
514 | lsls r0, r6, #24 | 513 | beq 2f |
515 | lsr r6, #8 | ||
516 | beq 1f | ||
517 | clz r7, r0 | ||
518 | lsr r0, #24 | ||
519 | lsl r0, r7 | ||
520 | bic r0, 0x0080 | ||
521 | lsrs r7, #1 | ||
522 | orrcs r0, #0x0080 | ||
523 | orr r0, r0, r7, lsl #12 | ||
524 | #endif | ||
525 | 1: lsls r6, #24 | ||
526 | beq 4f | ||
527 | clz r7, r6 | 514 | clz r7, r6 |
528 | lsr r6, #24 | 515 | lsr r6, #24 |
529 | lsl r6, r7 | 516 | lsl r6, r7 |
@@ -532,43 +519,25 @@ __fixup_a_pv_table: | |||
532 | orrcs r6, #0x0080 | 519 | orrcs r6, #0x0080 |
533 | orr r6, r6, r7, lsl #12 | 520 | orr r6, r6, r7, lsl #12 |
534 | orr r6, #0x4000 | 521 | orr r6, #0x4000 |
535 | b 4f | 522 | b 2f |
536 | 2: @ at this point the C flag is always clear | 523 | 1: add r7, r3 |
537 | add r7, r3 | 524 | ldrh ip, [r7, #2] |
538 | #ifdef CONFIG_ARM_PATCH_PHYS_VIRT_16BIT | ||
539 | ldrh ip, [r7] | ||
540 | tst ip, 0x0400 @ the i bit tells us LS or MS byte | ||
541 | beq 3f | ||
542 | cmp r0, #0 @ set C flag, and ... | ||
543 | biceq ip, 0x0400 @ immediate zero value has a special encoding | ||
544 | streqh ip, [r7] @ that requires the i bit cleared | ||
545 | #endif | ||
546 | 3: ldrh ip, [r7, #2] | ||
547 | and ip, 0x8f00 | 525 | and ip, 0x8f00 |
548 | orrcc ip, r6 @ mask in offset bits 31-24 | 526 | orr ip, r6 @ mask in offset bits 31-24 |
549 | orrcs ip, r0 @ mask in offset bits 23-16 | ||
550 | strh ip, [r7, #2] | 527 | strh ip, [r7, #2] |
551 | 4: cmp r4, r5 | 528 | 2: cmp r4, r5 |
552 | ldrcc r7, [r4], #4 @ use branch for delay slot | 529 | ldrcc r7, [r4], #4 @ use branch for delay slot |
553 | bcc 2b | 530 | bcc 1b |
554 | bx lr | 531 | bx lr |
555 | #else | 532 | #else |
556 | #ifdef CONFIG_ARM_PATCH_PHYS_VIRT_16BIT | 533 | b 2f |
557 | and r0, r6, #255 @ offset bits 23-16 | 534 | 1: ldr ip, [r7, r3] |
558 | mov r6, r6, lsr #8 @ offset bits 31-24 | ||
559 | #else | ||
560 | mov r0, #0 @ just in case... | ||
561 | #endif | ||
562 | b 3f | ||
563 | 2: ldr ip, [r7, r3] | ||
564 | bic ip, ip, #0x000000ff | 535 | bic ip, ip, #0x000000ff |
565 | tst ip, #0x400 @ rotate shift tells us LS or MS byte | 536 | orr ip, ip, r6 @ mask in offset bits 31-24 |
566 | orrne ip, ip, r6 @ mask in offset bits 31-24 | ||
567 | orreq ip, ip, r0 @ mask in offset bits 23-16 | ||
568 | str ip, [r7, r3] | 537 | str ip, [r7, r3] |
569 | 3: cmp r4, r5 | 538 | 2: cmp r4, r5 |
570 | ldrcc r7, [r4], #4 @ use branch for delay slot | 539 | ldrcc r7, [r4], #4 @ use branch for delay slot |
571 | bcc 2b | 540 | bcc 1b |
572 | mov pc, lr | 541 | mov pc, lr |
573 | #endif | 542 | #endif |
574 | ENDPROC(__fixup_a_pv_table) | 543 | ENDPROC(__fixup_a_pv_table) |
diff --git a/arch/arm/kernel/irq.c b/arch/arm/kernel/irq.c index de3dcab8610b..53919b230e8b 100644 --- a/arch/arm/kernel/irq.c +++ b/arch/arm/kernel/irq.c | |||
@@ -35,8 +35,8 @@ | |||
35 | #include <linux/list.h> | 35 | #include <linux/list.h> |
36 | #include <linux/kallsyms.h> | 36 | #include <linux/kallsyms.h> |
37 | #include <linux/proc_fs.h> | 37 | #include <linux/proc_fs.h> |
38 | #include <linux/ftrace.h> | ||
39 | 38 | ||
39 | #include <asm/exception.h> | ||
40 | #include <asm/system.h> | 40 | #include <asm/system.h> |
41 | #include <asm/mach/arch.h> | 41 | #include <asm/mach/arch.h> |
42 | #include <asm/mach/irq.h> | 42 | #include <asm/mach/irq.h> |
diff --git a/arch/arm/kernel/machine_kexec.c b/arch/arm/kernel/machine_kexec.c index e59bbd496c39..c1b4463dcc83 100644 --- a/arch/arm/kernel/machine_kexec.c +++ b/arch/arm/kernel/machine_kexec.c | |||
@@ -32,6 +32,24 @@ static atomic_t waiting_for_crash_ipi; | |||
32 | 32 | ||
33 | int machine_kexec_prepare(struct kimage *image) | 33 | int machine_kexec_prepare(struct kimage *image) |
34 | { | 34 | { |
35 | unsigned long page_list; | ||
36 | void *reboot_code_buffer; | ||
37 | page_list = image->head & PAGE_MASK; | ||
38 | |||
39 | reboot_code_buffer = page_address(image->control_code_page); | ||
40 | |||
41 | /* Prepare parameters for reboot_code_buffer*/ | ||
42 | kexec_start_address = image->start; | ||
43 | kexec_indirection_page = page_list; | ||
44 | kexec_mach_type = machine_arch_type; | ||
45 | kexec_boot_atags = image->start - KEXEC_ARM_ZIMAGE_OFFSET + KEXEC_ARM_ATAGS_OFFSET; | ||
46 | |||
47 | /* copy our kernel relocation code to the control code page */ | ||
48 | memcpy(reboot_code_buffer, | ||
49 | relocate_new_kernel, relocate_new_kernel_size); | ||
50 | |||
51 | flush_icache_range((unsigned long) reboot_code_buffer, | ||
52 | (unsigned long) reboot_code_buffer + KEXEC_CONTROL_PAGE_SIZE); | ||
35 | return 0; | 53 | return 0; |
36 | } | 54 | } |
37 | 55 | ||
@@ -82,31 +100,14 @@ void (*kexec_reinit)(void); | |||
82 | 100 | ||
83 | void machine_kexec(struct kimage *image) | 101 | void machine_kexec(struct kimage *image) |
84 | { | 102 | { |
85 | unsigned long page_list; | ||
86 | unsigned long reboot_code_buffer_phys; | 103 | unsigned long reboot_code_buffer_phys; |
87 | void *reboot_code_buffer; | 104 | void *reboot_code_buffer; |
88 | 105 | ||
89 | |||
90 | page_list = image->head & PAGE_MASK; | ||
91 | |||
92 | /* we need both effective and real address here */ | 106 | /* we need both effective and real address here */ |
93 | reboot_code_buffer_phys = | 107 | reboot_code_buffer_phys = |
94 | page_to_pfn(image->control_code_page) << PAGE_SHIFT; | 108 | page_to_pfn(image->control_code_page) << PAGE_SHIFT; |
95 | reboot_code_buffer = page_address(image->control_code_page); | 109 | reboot_code_buffer = page_address(image->control_code_page); |
96 | 110 | ||
97 | /* Prepare parameters for reboot_code_buffer*/ | ||
98 | kexec_start_address = image->start; | ||
99 | kexec_indirection_page = page_list; | ||
100 | kexec_mach_type = machine_arch_type; | ||
101 | kexec_boot_atags = image->start - KEXEC_ARM_ZIMAGE_OFFSET + KEXEC_ARM_ATAGS_OFFSET; | ||
102 | |||
103 | /* copy our kernel relocation code to the control code page */ | ||
104 | memcpy(reboot_code_buffer, | ||
105 | relocate_new_kernel, relocate_new_kernel_size); | ||
106 | |||
107 | |||
108 | flush_icache_range((unsigned long) reboot_code_buffer, | ||
109 | (unsigned long) reboot_code_buffer + KEXEC_CONTROL_PAGE_SIZE); | ||
110 | printk(KERN_INFO "Bye!\n"); | 111 | printk(KERN_INFO "Bye!\n"); |
111 | 112 | ||
112 | if (kexec_reinit) | 113 | if (kexec_reinit) |
diff --git a/arch/arm/kernel/module.c b/arch/arm/kernel/module.c index cc2020c2c709..1e9be5d25e56 100644 --- a/arch/arm/kernel/module.c +++ b/arch/arm/kernel/module.c | |||
@@ -33,7 +33,7 @@ | |||
33 | * recompiling the whole kernel when CONFIG_XIP_KERNEL is turned on/off. | 33 | * recompiling the whole kernel when CONFIG_XIP_KERNEL is turned on/off. |
34 | */ | 34 | */ |
35 | #undef MODULES_VADDR | 35 | #undef MODULES_VADDR |
36 | #define MODULES_VADDR (((unsigned long)_etext + ~PGDIR_MASK) & PGDIR_MASK) | 36 | #define MODULES_VADDR (((unsigned long)_etext + ~PMD_MASK) & PMD_MASK) |
37 | #endif | 37 | #endif |
38 | 38 | ||
39 | #ifdef CONFIG_MMU | 39 | #ifdef CONFIG_MMU |
diff --git a/arch/arm/kernel/perf_event_v7.c b/arch/arm/kernel/perf_event_v7.c index 4c851834f68e..6be3e2e4d838 100644 --- a/arch/arm/kernel/perf_event_v7.c +++ b/arch/arm/kernel/perf_event_v7.c | |||
@@ -321,8 +321,8 @@ static const unsigned armv7_a9_perf_map[PERF_COUNT_HW_MAX] = { | |||
321 | [PERF_COUNT_HW_CPU_CYCLES] = ARMV7_PERFCTR_CPU_CYCLES, | 321 | [PERF_COUNT_HW_CPU_CYCLES] = ARMV7_PERFCTR_CPU_CYCLES, |
322 | [PERF_COUNT_HW_INSTRUCTIONS] = | 322 | [PERF_COUNT_HW_INSTRUCTIONS] = |
323 | ARMV7_PERFCTR_INST_OUT_OF_RENAME_STAGE, | 323 | ARMV7_PERFCTR_INST_OUT_OF_RENAME_STAGE, |
324 | [PERF_COUNT_HW_CACHE_REFERENCES] = ARMV7_PERFCTR_COHERENT_LINE_HIT, | 324 | [PERF_COUNT_HW_CACHE_REFERENCES] = ARMV7_PERFCTR_DCACHE_ACCESS, |
325 | [PERF_COUNT_HW_CACHE_MISSES] = ARMV7_PERFCTR_COHERENT_LINE_MISS, | 325 | [PERF_COUNT_HW_CACHE_MISSES] = ARMV7_PERFCTR_DCACHE_REFILL, |
326 | [PERF_COUNT_HW_BRANCH_INSTRUCTIONS] = ARMV7_PERFCTR_PC_WRITE, | 326 | [PERF_COUNT_HW_BRANCH_INSTRUCTIONS] = ARMV7_PERFCTR_PC_WRITE, |
327 | [PERF_COUNT_HW_BRANCH_MISSES] = ARMV7_PERFCTR_PC_BRANCH_MIS_PRED, | 327 | [PERF_COUNT_HW_BRANCH_MISSES] = ARMV7_PERFCTR_PC_BRANCH_MIS_PRED, |
328 | [PERF_COUNT_HW_BUS_CYCLES] = ARMV7_PERFCTR_CLOCK_CYCLES, | 328 | [PERF_COUNT_HW_BUS_CYCLES] = ARMV7_PERFCTR_CLOCK_CYCLES, |
diff --git a/arch/arm/kernel/process.c b/arch/arm/kernel/process.c index 1a347f481e5e..fd0814076ff6 100644 --- a/arch/arm/kernel/process.c +++ b/arch/arm/kernel/process.c | |||
@@ -319,7 +319,7 @@ void show_regs(struct pt_regs * regs) | |||
319 | printk("\n"); | 319 | printk("\n"); |
320 | printk("Pid: %d, comm: %20s\n", task_pid_nr(current), current->comm); | 320 | printk("Pid: %d, comm: %20s\n", task_pid_nr(current), current->comm); |
321 | __show_regs(regs); | 321 | __show_regs(regs); |
322 | __backtrace(); | 322 | dump_stack(); |
323 | } | 323 | } |
324 | 324 | ||
325 | ATOMIC_NOTIFIER_HEAD(thread_notify_head); | 325 | ATOMIC_NOTIFIER_HEAD(thread_notify_head); |
diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c index e514c76043b4..3fe93f75b55a 100644 --- a/arch/arm/kernel/setup.c +++ b/arch/arm/kernel/setup.c | |||
@@ -29,6 +29,8 @@ | |||
29 | #include <linux/fs.h> | 29 | #include <linux/fs.h> |
30 | #include <linux/proc_fs.h> | 30 | #include <linux/proc_fs.h> |
31 | #include <linux/memblock.h> | 31 | #include <linux/memblock.h> |
32 | #include <linux/bug.h> | ||
33 | #include <linux/compiler.h> | ||
32 | 34 | ||
33 | #include <asm/unified.h> | 35 | #include <asm/unified.h> |
34 | #include <asm/cpu.h> | 36 | #include <asm/cpu.h> |
@@ -42,6 +44,7 @@ | |||
42 | #include <asm/cacheflush.h> | 44 | #include <asm/cacheflush.h> |
43 | #include <asm/cachetype.h> | 45 | #include <asm/cachetype.h> |
44 | #include <asm/tlbflush.h> | 46 | #include <asm/tlbflush.h> |
47 | #include <asm/system.h> | ||
45 | 48 | ||
46 | #include <asm/prom.h> | 49 | #include <asm/prom.h> |
47 | #include <asm/mach/arch.h> | 50 | #include <asm/mach/arch.h> |
@@ -115,6 +118,13 @@ struct outer_cache_fns outer_cache __read_mostly; | |||
115 | EXPORT_SYMBOL(outer_cache); | 118 | EXPORT_SYMBOL(outer_cache); |
116 | #endif | 119 | #endif |
117 | 120 | ||
121 | /* | ||
122 | * Cached cpu_architecture() result for use by assembler code. | ||
123 | * C code should use the cpu_architecture() function instead of accessing this | ||
124 | * variable directly. | ||
125 | */ | ||
126 | int __cpu_architecture __read_mostly = CPU_ARCH_UNKNOWN; | ||
127 | |||
118 | struct stack { | 128 | struct stack { |
119 | u32 irq[3]; | 129 | u32 irq[3]; |
120 | u32 abt[3]; | 130 | u32 abt[3]; |
@@ -210,7 +220,7 @@ static const char *proc_arch[] = { | |||
210 | "?(17)", | 220 | "?(17)", |
211 | }; | 221 | }; |
212 | 222 | ||
213 | int cpu_architecture(void) | 223 | static int __get_cpu_architecture(void) |
214 | { | 224 | { |
215 | int cpu_arch; | 225 | int cpu_arch; |
216 | 226 | ||
@@ -243,11 +253,22 @@ int cpu_architecture(void) | |||
243 | return cpu_arch; | 253 | return cpu_arch; |
244 | } | 254 | } |
245 | 255 | ||
256 | int __pure cpu_architecture(void) | ||
257 | { | ||
258 | BUG_ON(__cpu_architecture == CPU_ARCH_UNKNOWN); | ||
259 | |||
260 | return __cpu_architecture; | ||
261 | } | ||
262 | |||
246 | static int cpu_has_aliasing_icache(unsigned int arch) | 263 | static int cpu_has_aliasing_icache(unsigned int arch) |
247 | { | 264 | { |
248 | int aliasing_icache; | 265 | int aliasing_icache; |
249 | unsigned int id_reg, num_sets, line_size; | 266 | unsigned int id_reg, num_sets, line_size; |
250 | 267 | ||
268 | /* PIPT caches never alias. */ | ||
269 | if (icache_is_pipt()) | ||
270 | return 0; | ||
271 | |||
251 | /* arch specifies the register format */ | 272 | /* arch specifies the register format */ |
252 | switch (arch) { | 273 | switch (arch) { |
253 | case CPU_ARCH_ARMv7: | 274 | case CPU_ARCH_ARMv7: |
@@ -282,8 +303,14 @@ static void __init cacheid_init(void) | |||
282 | /* ARMv7 register format */ | 303 | /* ARMv7 register format */ |
283 | arch = CPU_ARCH_ARMv7; | 304 | arch = CPU_ARCH_ARMv7; |
284 | cacheid = CACHEID_VIPT_NONALIASING; | 305 | cacheid = CACHEID_VIPT_NONALIASING; |
285 | if ((cachetype & (3 << 14)) == 1 << 14) | 306 | switch (cachetype & (3 << 14)) { |
307 | case (1 << 14): | ||
286 | cacheid |= CACHEID_ASID_TAGGED; | 308 | cacheid |= CACHEID_ASID_TAGGED; |
309 | break; | ||
310 | case (3 << 14): | ||
311 | cacheid |= CACHEID_PIPT; | ||
312 | break; | ||
313 | } | ||
287 | } else { | 314 | } else { |
288 | arch = CPU_ARCH_ARMv6; | 315 | arch = CPU_ARCH_ARMv6; |
289 | if (cachetype & (1 << 23)) | 316 | if (cachetype & (1 << 23)) |
@@ -300,10 +327,11 @@ static void __init cacheid_init(void) | |||
300 | printk("CPU: %s data cache, %s instruction cache\n", | 327 | printk("CPU: %s data cache, %s instruction cache\n", |
301 | cache_is_vivt() ? "VIVT" : | 328 | cache_is_vivt() ? "VIVT" : |
302 | cache_is_vipt_aliasing() ? "VIPT aliasing" : | 329 | cache_is_vipt_aliasing() ? "VIPT aliasing" : |
303 | cache_is_vipt_nonaliasing() ? "VIPT nonaliasing" : "unknown", | 330 | cache_is_vipt_nonaliasing() ? "PIPT / VIPT nonaliasing" : "unknown", |
304 | cache_is_vivt() ? "VIVT" : | 331 | cache_is_vivt() ? "VIVT" : |
305 | icache_is_vivt_asid_tagged() ? "VIVT ASID tagged" : | 332 | icache_is_vivt_asid_tagged() ? "VIVT ASID tagged" : |
306 | icache_is_vipt_aliasing() ? "VIPT aliasing" : | 333 | icache_is_vipt_aliasing() ? "VIPT aliasing" : |
334 | icache_is_pipt() ? "PIPT" : | ||
307 | cache_is_vipt_nonaliasing() ? "VIPT nonaliasing" : "unknown"); | 335 | cache_is_vipt_nonaliasing() ? "VIPT nonaliasing" : "unknown"); |
308 | } | 336 | } |
309 | 337 | ||
@@ -414,6 +442,7 @@ static void __init setup_processor(void) | |||
414 | } | 442 | } |
415 | 443 | ||
416 | cpu_name = list->cpu_name; | 444 | cpu_name = list->cpu_name; |
445 | __cpu_architecture = __get_cpu_architecture(); | ||
417 | 446 | ||
418 | #ifdef MULTI_CPU | 447 | #ifdef MULTI_CPU |
419 | processor = *list->proc; | 448 | processor = *list->proc; |
@@ -861,7 +890,7 @@ static struct machine_desc * __init setup_machine_tags(unsigned int nr) | |||
861 | } | 890 | } |
862 | 891 | ||
863 | if (mdesc->fixup) | 892 | if (mdesc->fixup) |
864 | mdesc->fixup(mdesc, tags, &from, &meminfo); | 893 | mdesc->fixup(tags, &from, &meminfo); |
865 | 894 | ||
866 | if (tags->hdr.tag == ATAG_CORE) { | 895 | if (tags->hdr.tag == ATAG_CORE) { |
867 | if (meminfo.nr_banks != 0) | 896 | if (meminfo.nr_banks != 0) |
diff --git a/arch/arm/kernel/smp.c b/arch/arm/kernel/smp.c index d88ff0230e82..854ce33715f4 100644 --- a/arch/arm/kernel/smp.c +++ b/arch/arm/kernel/smp.c | |||
@@ -16,7 +16,6 @@ | |||
16 | #include <linux/cache.h> | 16 | #include <linux/cache.h> |
17 | #include <linux/profile.h> | 17 | #include <linux/profile.h> |
18 | #include <linux/errno.h> | 18 | #include <linux/errno.h> |
19 | #include <linux/ftrace.h> | ||
20 | #include <linux/mm.h> | 19 | #include <linux/mm.h> |
21 | #include <linux/err.h> | 20 | #include <linux/err.h> |
22 | #include <linux/cpu.h> | 21 | #include <linux/cpu.h> |
@@ -31,6 +30,8 @@ | |||
31 | #include <asm/cacheflush.h> | 30 | #include <asm/cacheflush.h> |
32 | #include <asm/cpu.h> | 31 | #include <asm/cpu.h> |
33 | #include <asm/cputype.h> | 32 | #include <asm/cputype.h> |
33 | #include <asm/exception.h> | ||
34 | #include <asm/topology.h> | ||
34 | #include <asm/mmu_context.h> | 35 | #include <asm/mmu_context.h> |
35 | #include <asm/pgtable.h> | 36 | #include <asm/pgtable.h> |
36 | #include <asm/pgalloc.h> | 37 | #include <asm/pgalloc.h> |
@@ -39,6 +40,7 @@ | |||
39 | #include <asm/tlbflush.h> | 40 | #include <asm/tlbflush.h> |
40 | #include <asm/ptrace.h> | 41 | #include <asm/ptrace.h> |
41 | #include <asm/localtimer.h> | 42 | #include <asm/localtimer.h> |
43 | #include <asm/smp_plat.h> | ||
42 | 44 | ||
43 | /* | 45 | /* |
44 | * as from 2.5, kernels no longer have an init_tasks structure | 46 | * as from 2.5, kernels no longer have an init_tasks structure |
@@ -259,6 +261,20 @@ void __ref cpu_die(void) | |||
259 | } | 261 | } |
260 | #endif /* CONFIG_HOTPLUG_CPU */ | 262 | #endif /* CONFIG_HOTPLUG_CPU */ |
261 | 263 | ||
264 | int __cpu_logical_map[NR_CPUS]; | ||
265 | |||
266 | void __init smp_setup_processor_id(void) | ||
267 | { | ||
268 | int i; | ||
269 | u32 cpu = is_smp() ? read_cpuid_mpidr() & 0xff : 0; | ||
270 | |||
271 | cpu_logical_map(0) = cpu; | ||
272 | for (i = 1; i < NR_CPUS; ++i) | ||
273 | cpu_logical_map(i) = i == cpu ? 0 : i; | ||
274 | |||
275 | printk(KERN_INFO "Booting Linux on physical CPU %d\n", cpu); | ||
276 | } | ||
277 | |||
262 | /* | 278 | /* |
263 | * Called by both boot and secondaries to move global data into | 279 | * Called by both boot and secondaries to move global data into |
264 | * per-processor storage. | 280 | * per-processor storage. |
@@ -268,6 +284,8 @@ static void __cpuinit smp_store_cpu_info(unsigned int cpuid) | |||
268 | struct cpuinfo_arm *cpu_info = &per_cpu(cpu_data, cpuid); | 284 | struct cpuinfo_arm *cpu_info = &per_cpu(cpu_data, cpuid); |
269 | 285 | ||
270 | cpu_info->loops_per_jiffy = loops_per_jiffy; | 286 | cpu_info->loops_per_jiffy = loops_per_jiffy; |
287 | |||
288 | store_cpu_topology(cpuid); | ||
271 | } | 289 | } |
272 | 290 | ||
273 | /* | 291 | /* |
@@ -301,17 +319,7 @@ asmlinkage void __cpuinit secondary_start_kernel(void) | |||
301 | */ | 319 | */ |
302 | platform_secondary_init(cpu); | 320 | platform_secondary_init(cpu); |
303 | 321 | ||
304 | /* | ||
305 | * Enable local interrupts. | ||
306 | */ | ||
307 | notify_cpu_starting(cpu); | 322 | notify_cpu_starting(cpu); |
308 | local_irq_enable(); | ||
309 | local_fiq_enable(); | ||
310 | |||
311 | /* | ||
312 | * Setup the percpu timer for this CPU. | ||
313 | */ | ||
314 | percpu_timer_setup(); | ||
315 | 323 | ||
316 | calibrate_delay(); | 324 | calibrate_delay(); |
317 | 325 | ||
@@ -323,10 +331,23 @@ asmlinkage void __cpuinit secondary_start_kernel(void) | |||
323 | * before we continue. | 331 | * before we continue. |
324 | */ | 332 | */ |
325 | set_cpu_online(cpu, true); | 333 | set_cpu_online(cpu, true); |
334 | |||
335 | /* | ||
336 | * Setup the percpu timer for this CPU. | ||
337 | */ | ||
338 | percpu_timer_setup(); | ||
339 | |||
326 | while (!cpu_active(cpu)) | 340 | while (!cpu_active(cpu)) |
327 | cpu_relax(); | 341 | cpu_relax(); |
328 | 342 | ||
329 | /* | 343 | /* |
344 | * cpu_active bit is set, so it's safe to enalbe interrupts | ||
345 | * now. | ||
346 | */ | ||
347 | local_irq_enable(); | ||
348 | local_fiq_enable(); | ||
349 | |||
350 | /* | ||
330 | * OK, it's off to the idle thread for us | 351 | * OK, it's off to the idle thread for us |
331 | */ | 352 | */ |
332 | cpu_idle(); | 353 | cpu_idle(); |
@@ -358,6 +379,8 @@ void __init smp_prepare_cpus(unsigned int max_cpus) | |||
358 | { | 379 | { |
359 | unsigned int ncores = num_possible_cpus(); | 380 | unsigned int ncores = num_possible_cpus(); |
360 | 381 | ||
382 | init_cpu_topology(); | ||
383 | |||
361 | smp_store_cpu_info(smp_processor_id()); | 384 | smp_store_cpu_info(smp_processor_id()); |
362 | 385 | ||
363 | /* | 386 | /* |
@@ -460,6 +483,11 @@ static void ipi_timer(void) | |||
460 | #ifdef CONFIG_LOCAL_TIMERS | 483 | #ifdef CONFIG_LOCAL_TIMERS |
461 | asmlinkage void __exception_irq_entry do_local_timer(struct pt_regs *regs) | 484 | asmlinkage void __exception_irq_entry do_local_timer(struct pt_regs *regs) |
462 | { | 485 | { |
486 | handle_local_timer(regs); | ||
487 | } | ||
488 | |||
489 | void handle_local_timer(struct pt_regs *regs) | ||
490 | { | ||
463 | struct pt_regs *old_regs = set_irq_regs(regs); | 491 | struct pt_regs *old_regs = set_irq_regs(regs); |
464 | int cpu = smp_processor_id(); | 492 | int cpu = smp_processor_id(); |
465 | 493 | ||
@@ -567,6 +595,11 @@ static void ipi_cpu_stop(unsigned int cpu) | |||
567 | */ | 595 | */ |
568 | asmlinkage void __exception_irq_entry do_IPI(int ipinr, struct pt_regs *regs) | 596 | asmlinkage void __exception_irq_entry do_IPI(int ipinr, struct pt_regs *regs) |
569 | { | 597 | { |
598 | handle_IPI(ipinr, regs); | ||
599 | } | ||
600 | |||
601 | void handle_IPI(int ipinr, struct pt_regs *regs) | ||
602 | { | ||
570 | unsigned int cpu = smp_processor_id(); | 603 | unsigned int cpu = smp_processor_id(); |
571 | struct pt_regs *old_regs = set_irq_regs(regs); | 604 | struct pt_regs *old_regs = set_irq_regs(regs); |
572 | 605 | ||
diff --git a/arch/arm/kernel/smp_scu.c b/arch/arm/kernel/smp_scu.c index 79ed5e7f204a..8f5dd7963356 100644 --- a/arch/arm/kernel/smp_scu.c +++ b/arch/arm/kernel/smp_scu.c | |||
@@ -13,6 +13,7 @@ | |||
13 | 13 | ||
14 | #include <asm/smp_scu.h> | 14 | #include <asm/smp_scu.h> |
15 | #include <asm/cacheflush.h> | 15 | #include <asm/cacheflush.h> |
16 | #include <asm/cputype.h> | ||
16 | 17 | ||
17 | #define SCU_CTRL 0x00 | 18 | #define SCU_CTRL 0x00 |
18 | #define SCU_CONFIG 0x04 | 19 | #define SCU_CONFIG 0x04 |
@@ -33,10 +34,19 @@ unsigned int __init scu_get_core_count(void __iomem *scu_base) | |||
33 | /* | 34 | /* |
34 | * Enable the SCU | 35 | * Enable the SCU |
35 | */ | 36 | */ |
36 | void __init scu_enable(void __iomem *scu_base) | 37 | void scu_enable(void __iomem *scu_base) |
37 | { | 38 | { |
38 | u32 scu_ctrl; | 39 | u32 scu_ctrl; |
39 | 40 | ||
41 | #ifdef CONFIG_ARM_ERRATA_764369 | ||
42 | /* Cortex-A9 only */ | ||
43 | if ((read_cpuid(CPUID_ID) & 0xff0ffff0) == 0x410fc090) { | ||
44 | scu_ctrl = __raw_readl(scu_base + 0x30); | ||
45 | if (!(scu_ctrl & 1)) | ||
46 | __raw_writel(scu_ctrl | 0x1, scu_base + 0x30); | ||
47 | } | ||
48 | #endif | ||
49 | |||
40 | scu_ctrl = __raw_readl(scu_base + SCU_CTRL); | 50 | scu_ctrl = __raw_readl(scu_base + SCU_CTRL); |
41 | /* already enabled? */ | 51 | /* already enabled? */ |
42 | if (scu_ctrl & 1) | 52 | if (scu_ctrl & 1) |
diff --git a/arch/arm/kernel/time.c b/arch/arm/kernel/time.c index cb634c3e28e9..5a54b95d6bd2 100644 --- a/arch/arm/kernel/time.c +++ b/arch/arm/kernel/time.c | |||
@@ -39,13 +39,11 @@ | |||
39 | */ | 39 | */ |
40 | static struct sys_timer *system_timer; | 40 | static struct sys_timer *system_timer; |
41 | 41 | ||
42 | #if defined(CONFIG_RTC_DRV_CMOS) || defined(CONFIG_RTC_DRV_CMOS_MODULE) | 42 | #if defined(CONFIG_RTC_DRV_CMOS) || defined(CONFIG_RTC_DRV_CMOS_MODULE) || \ |
43 | defined(CONFIG_NVRAM) || defined(CONFIG_NVRAM_MODULE) | ||
43 | /* this needs a better home */ | 44 | /* this needs a better home */ |
44 | DEFINE_SPINLOCK(rtc_lock); | 45 | DEFINE_SPINLOCK(rtc_lock); |
45 | |||
46 | #ifdef CONFIG_RTC_DRV_CMOS_MODULE | ||
47 | EXPORT_SYMBOL(rtc_lock); | 46 | EXPORT_SYMBOL(rtc_lock); |
48 | #endif | ||
49 | #endif /* pc-style 'CMOS' RTC support */ | 47 | #endif /* pc-style 'CMOS' RTC support */ |
50 | 48 | ||
51 | /* change this if you have some constant time drift */ | 49 | /* change this if you have some constant time drift */ |
diff --git a/arch/arm/kernel/topology.c b/arch/arm/kernel/topology.c new file mode 100644 index 000000000000..1040c00405d0 --- /dev/null +++ b/arch/arm/kernel/topology.c | |||
@@ -0,0 +1,148 @@ | |||
1 | /* | ||
2 | * arch/arm/kernel/topology.c | ||
3 | * | ||
4 | * Copyright (C) 2011 Linaro Limited. | ||
5 | * Written by: Vincent Guittot | ||
6 | * | ||
7 | * based on arch/sh/kernel/topology.c | ||
8 | * | ||
9 | * This file is subject to the terms and conditions of the GNU General Public | ||
10 | * License. See the file "COPYING" in the main directory of this archive | ||
11 | * for more details. | ||
12 | */ | ||
13 | |||
14 | #include <linux/cpu.h> | ||
15 | #include <linux/cpumask.h> | ||
16 | #include <linux/init.h> | ||
17 | #include <linux/percpu.h> | ||
18 | #include <linux/node.h> | ||
19 | #include <linux/nodemask.h> | ||
20 | #include <linux/sched.h> | ||
21 | |||
22 | #include <asm/cputype.h> | ||
23 | #include <asm/topology.h> | ||
24 | |||
25 | #define MPIDR_SMP_BITMASK (0x3 << 30) | ||
26 | #define MPIDR_SMP_VALUE (0x2 << 30) | ||
27 | |||
28 | #define MPIDR_MT_BITMASK (0x1 << 24) | ||
29 | |||
30 | /* | ||
31 | * These masks reflect the current use of the affinity levels. | ||
32 | * The affinity level can be up to 16 bits according to ARM ARM | ||
33 | */ | ||
34 | |||
35 | #define MPIDR_LEVEL0_MASK 0x3 | ||
36 | #define MPIDR_LEVEL0_SHIFT 0 | ||
37 | |||
38 | #define MPIDR_LEVEL1_MASK 0xF | ||
39 | #define MPIDR_LEVEL1_SHIFT 8 | ||
40 | |||
41 | #define MPIDR_LEVEL2_MASK 0xFF | ||
42 | #define MPIDR_LEVEL2_SHIFT 16 | ||
43 | |||
44 | struct cputopo_arm cpu_topology[NR_CPUS]; | ||
45 | |||
46 | const struct cpumask *cpu_coregroup_mask(unsigned int cpu) | ||
47 | { | ||
48 | return &cpu_topology[cpu].core_sibling; | ||
49 | } | ||
50 | |||
51 | /* | ||
52 | * store_cpu_topology is called at boot when only one cpu is running | ||
53 | * and with the mutex cpu_hotplug.lock locked, when several cpus have booted, | ||
54 | * which prevents simultaneous write access to cpu_topology array | ||
55 | */ | ||
56 | void store_cpu_topology(unsigned int cpuid) | ||
57 | { | ||
58 | struct cputopo_arm *cpuid_topo = &cpu_topology[cpuid]; | ||
59 | unsigned int mpidr; | ||
60 | unsigned int cpu; | ||
61 | |||
62 | /* If the cpu topology has been already set, just return */ | ||
63 | if (cpuid_topo->core_id != -1) | ||
64 | return; | ||
65 | |||
66 | mpidr = read_cpuid_mpidr(); | ||
67 | |||
68 | /* create cpu topology mapping */ | ||
69 | if ((mpidr & MPIDR_SMP_BITMASK) == MPIDR_SMP_VALUE) { | ||
70 | /* | ||
71 | * This is a multiprocessor system | ||
72 | * multiprocessor format & multiprocessor mode field are set | ||
73 | */ | ||
74 | |||
75 | if (mpidr & MPIDR_MT_BITMASK) { | ||
76 | /* core performance interdependency */ | ||
77 | cpuid_topo->thread_id = (mpidr >> MPIDR_LEVEL0_SHIFT) | ||
78 | & MPIDR_LEVEL0_MASK; | ||
79 | cpuid_topo->core_id = (mpidr >> MPIDR_LEVEL1_SHIFT) | ||
80 | & MPIDR_LEVEL1_MASK; | ||
81 | cpuid_topo->socket_id = (mpidr >> MPIDR_LEVEL2_SHIFT) | ||
82 | & MPIDR_LEVEL2_MASK; | ||
83 | } else { | ||
84 | /* largely independent cores */ | ||
85 | cpuid_topo->thread_id = -1; | ||
86 | cpuid_topo->core_id = (mpidr >> MPIDR_LEVEL0_SHIFT) | ||
87 | & MPIDR_LEVEL0_MASK; | ||
88 | cpuid_topo->socket_id = (mpidr >> MPIDR_LEVEL1_SHIFT) | ||
89 | & MPIDR_LEVEL1_MASK; | ||
90 | } | ||
91 | } else { | ||
92 | /* | ||
93 | * This is an uniprocessor system | ||
94 | * we are in multiprocessor format but uniprocessor system | ||
95 | * or in the old uniprocessor format | ||
96 | */ | ||
97 | cpuid_topo->thread_id = -1; | ||
98 | cpuid_topo->core_id = 0; | ||
99 | cpuid_topo->socket_id = -1; | ||
100 | } | ||
101 | |||
102 | /* update core and thread sibling masks */ | ||
103 | for_each_possible_cpu(cpu) { | ||
104 | struct cputopo_arm *cpu_topo = &cpu_topology[cpu]; | ||
105 | |||
106 | if (cpuid_topo->socket_id == cpu_topo->socket_id) { | ||
107 | cpumask_set_cpu(cpuid, &cpu_topo->core_sibling); | ||
108 | if (cpu != cpuid) | ||
109 | cpumask_set_cpu(cpu, | ||
110 | &cpuid_topo->core_sibling); | ||
111 | |||
112 | if (cpuid_topo->core_id == cpu_topo->core_id) { | ||
113 | cpumask_set_cpu(cpuid, | ||
114 | &cpu_topo->thread_sibling); | ||
115 | if (cpu != cpuid) | ||
116 | cpumask_set_cpu(cpu, | ||
117 | &cpuid_topo->thread_sibling); | ||
118 | } | ||
119 | } | ||
120 | } | ||
121 | smp_wmb(); | ||
122 | |||
123 | printk(KERN_INFO "CPU%u: thread %d, cpu %d, socket %d, mpidr %x\n", | ||
124 | cpuid, cpu_topology[cpuid].thread_id, | ||
125 | cpu_topology[cpuid].core_id, | ||
126 | cpu_topology[cpuid].socket_id, mpidr); | ||
127 | } | ||
128 | |||
129 | /* | ||
130 | * init_cpu_topology is called at boot when only one cpu is running | ||
131 | * which prevent simultaneous write access to cpu_topology array | ||
132 | */ | ||
133 | void init_cpu_topology(void) | ||
134 | { | ||
135 | unsigned int cpu; | ||
136 | |||
137 | /* init core mask */ | ||
138 | for_each_possible_cpu(cpu) { | ||
139 | struct cputopo_arm *cpu_topo = &(cpu_topology[cpu]); | ||
140 | |||
141 | cpu_topo->thread_id = -1; | ||
142 | cpu_topo->core_id = -1; | ||
143 | cpu_topo->socket_id = -1; | ||
144 | cpumask_clear(&cpu_topo->core_sibling); | ||
145 | cpumask_clear(&cpu_topo->thread_sibling); | ||
146 | } | ||
147 | smp_wmb(); | ||
148 | } | ||
diff --git a/arch/arm/kernel/traps.c b/arch/arm/kernel/traps.c index bc9f9da782cb..7f5b99eb2c50 100644 --- a/arch/arm/kernel/traps.c +++ b/arch/arm/kernel/traps.c | |||
@@ -21,12 +21,14 @@ | |||
21 | #include <linux/kdebug.h> | 21 | #include <linux/kdebug.h> |
22 | #include <linux/module.h> | 22 | #include <linux/module.h> |
23 | #include <linux/kexec.h> | 23 | #include <linux/kexec.h> |
24 | #include <linux/bug.h> | ||
24 | #include <linux/delay.h> | 25 | #include <linux/delay.h> |
25 | #include <linux/init.h> | 26 | #include <linux/init.h> |
26 | #include <linux/sched.h> | 27 | #include <linux/sched.h> |
27 | 28 | ||
28 | #include <linux/atomic.h> | 29 | #include <linux/atomic.h> |
29 | #include <asm/cacheflush.h> | 30 | #include <asm/cacheflush.h> |
31 | #include <asm/exception.h> | ||
30 | #include <asm/system.h> | 32 | #include <asm/system.h> |
31 | #include <asm/unistd.h> | 33 | #include <asm/unistd.h> |
32 | #include <asm/traps.h> | 34 | #include <asm/traps.h> |
@@ -270,6 +272,8 @@ void die(const char *str, struct pt_regs *regs, int err) | |||
270 | spin_lock_irq(&die_lock); | 272 | spin_lock_irq(&die_lock); |
271 | console_verbose(); | 273 | console_verbose(); |
272 | bust_spinlocks(1); | 274 | bust_spinlocks(1); |
275 | if (!user_mode(regs)) | ||
276 | report_bug(regs->ARM_pc, regs); | ||
273 | ret = __die(str, err, thread, regs); | 277 | ret = __die(str, err, thread, regs); |
274 | 278 | ||
275 | if (regs && kexec_should_crash(thread->task)) | 279 | if (regs && kexec_should_crash(thread->task)) |
@@ -301,6 +305,24 @@ void arm_notify_die(const char *str, struct pt_regs *regs, | |||
301 | } | 305 | } |
302 | } | 306 | } |
303 | 307 | ||
308 | #ifdef CONFIG_GENERIC_BUG | ||
309 | |||
310 | int is_valid_bugaddr(unsigned long pc) | ||
311 | { | ||
312 | #ifdef CONFIG_THUMB2_KERNEL | ||
313 | unsigned short bkpt; | ||
314 | #else | ||
315 | unsigned long bkpt; | ||
316 | #endif | ||
317 | |||
318 | if (probe_kernel_address((unsigned *)pc, bkpt)) | ||
319 | return 0; | ||
320 | |||
321 | return bkpt == BUG_INSTR_VALUE; | ||
322 | } | ||
323 | |||
324 | #endif | ||
325 | |||
304 | static LIST_HEAD(undef_hook); | 326 | static LIST_HEAD(undef_hook); |
305 | static DEFINE_SPINLOCK(undef_lock); | 327 | static DEFINE_SPINLOCK(undef_lock); |
306 | 328 | ||
@@ -706,16 +728,6 @@ baddataabort(int code, unsigned long instr, struct pt_regs *regs) | |||
706 | arm_notify_die("unknown data abort code", regs, &info, instr, 0); | 728 | arm_notify_die("unknown data abort code", regs, &info, instr, 0); |
707 | } | 729 | } |
708 | 730 | ||
709 | void __attribute__((noreturn)) __bug(const char *file, int line) | ||
710 | { | ||
711 | printk(KERN_CRIT"kernel BUG at %s:%d!\n", file, line); | ||
712 | *(int *)0 = 0; | ||
713 | |||
714 | /* Avoid "noreturn function does return" */ | ||
715 | for (;;); | ||
716 | } | ||
717 | EXPORT_SYMBOL(__bug); | ||
718 | |||
719 | void __readwrite_bug(const char *fn) | 731 | void __readwrite_bug(const char *fn) |
720 | { | 732 | { |
721 | printk("%s called, but not implemented\n", fn); | 733 | printk("%s called, but not implemented\n", fn); |
diff --git a/arch/arm/kernel/vmlinux.lds.S b/arch/arm/kernel/vmlinux.lds.S index bf977f8514f6..20b3041e0860 100644 --- a/arch/arm/kernel/vmlinux.lds.S +++ b/arch/arm/kernel/vmlinux.lds.S | |||
@@ -21,10 +21,13 @@ | |||
21 | #define ARM_CPU_KEEP(x) | 21 | #define ARM_CPU_KEEP(x) |
22 | #endif | 22 | #endif |
23 | 23 | ||
24 | #if defined(CONFIG_SMP_ON_UP) && !defined(CONFIG_DEBUG_SPINLOCK) | 24 | #if (defined(CONFIG_SMP_ON_UP) && !defined(CONFIG_DEBUG_SPINLOCK)) || \ |
25 | defined(CONFIG_GENERIC_BUG) | ||
25 | #define ARM_EXIT_KEEP(x) x | 26 | #define ARM_EXIT_KEEP(x) x |
27 | #define ARM_EXIT_DISCARD(x) | ||
26 | #else | 28 | #else |
27 | #define ARM_EXIT_KEEP(x) | 29 | #define ARM_EXIT_KEEP(x) |
30 | #define ARM_EXIT_DISCARD(x) x | ||
28 | #endif | 31 | #endif |
29 | 32 | ||
30 | OUTPUT_ARCH(arm) | 33 | OUTPUT_ARCH(arm) |
@@ -39,6 +42,11 @@ jiffies = jiffies_64 + 4; | |||
39 | SECTIONS | 42 | SECTIONS |
40 | { | 43 | { |
41 | /* | 44 | /* |
45 | * XXX: The linker does not define how output sections are | ||
46 | * assigned to input sections when there are multiple statements | ||
47 | * matching the same input section name. There is no documented | ||
48 | * order of matching. | ||
49 | * | ||
42 | * unwind exit sections must be discarded before the rest of the | 50 | * unwind exit sections must be discarded before the rest of the |
43 | * unwind sections get included. | 51 | * unwind sections get included. |
44 | */ | 52 | */ |
@@ -47,6 +55,9 @@ SECTIONS | |||
47 | *(.ARM.extab.exit.text) | 55 | *(.ARM.extab.exit.text) |
48 | ARM_CPU_DISCARD(*(.ARM.exidx.cpuexit.text)) | 56 | ARM_CPU_DISCARD(*(.ARM.exidx.cpuexit.text)) |
49 | ARM_CPU_DISCARD(*(.ARM.extab.cpuexit.text)) | 57 | ARM_CPU_DISCARD(*(.ARM.extab.cpuexit.text)) |
58 | ARM_EXIT_DISCARD(EXIT_TEXT) | ||
59 | ARM_EXIT_DISCARD(EXIT_DATA) | ||
60 | EXIT_CALL | ||
50 | #ifndef CONFIG_HOTPLUG | 61 | #ifndef CONFIG_HOTPLUG |
51 | *(.ARM.exidx.devexit.text) | 62 | *(.ARM.exidx.devexit.text) |
52 | *(.ARM.extab.devexit.text) | 63 | *(.ARM.extab.devexit.text) |
@@ -58,6 +69,8 @@ SECTIONS | |||
58 | #ifndef CONFIG_SMP_ON_UP | 69 | #ifndef CONFIG_SMP_ON_UP |
59 | *(.alt.smp.init) | 70 | *(.alt.smp.init) |
60 | #endif | 71 | #endif |
72 | *(.discard) | ||
73 | *(.discard.*) | ||
61 | } | 74 | } |
62 | 75 | ||
63 | #ifdef CONFIG_XIP_KERNEL | 76 | #ifdef CONFIG_XIP_KERNEL |
@@ -279,9 +292,6 @@ SECTIONS | |||
279 | 292 | ||
280 | STABS_DEBUG | 293 | STABS_DEBUG |
281 | .comment 0 : { *(.comment) } | 294 | .comment 0 : { *(.comment) } |
282 | |||
283 | /* Default discards */ | ||
284 | DISCARDS | ||
285 | } | 295 | } |
286 | 296 | ||
287 | /* | 297 | /* |
diff --git a/arch/arm/lib/backtrace.S b/arch/arm/lib/backtrace.S index a673297b0cf1..cd07b5814c23 100644 --- a/arch/arm/lib/backtrace.S +++ b/arch/arm/lib/backtrace.S | |||
@@ -22,15 +22,10 @@ | |||
22 | #define mask r7 | 22 | #define mask r7 |
23 | #define offset r8 | 23 | #define offset r8 |
24 | 24 | ||
25 | ENTRY(__backtrace) | ||
26 | mov r1, #0x10 | ||
27 | mov r0, fp | ||
28 | |||
29 | ENTRY(c_backtrace) | 25 | ENTRY(c_backtrace) |
30 | 26 | ||
31 | #if !defined(CONFIG_FRAME_POINTER) || !defined(CONFIG_PRINTK) | 27 | #if !defined(CONFIG_FRAME_POINTER) || !defined(CONFIG_PRINTK) |
32 | mov pc, lr | 28 | mov pc, lr |
33 | ENDPROC(__backtrace) | ||
34 | ENDPROC(c_backtrace) | 29 | ENDPROC(c_backtrace) |
35 | #else | 30 | #else |
36 | stmfd sp!, {r4 - r8, lr} @ Save an extra register so we have a location... | 31 | stmfd sp!, {r4 - r8, lr} @ Save an extra register so we have a location... |
@@ -107,7 +102,6 @@ for_each_frame: tst frame, mask @ Check for address exceptions | |||
107 | mov r1, frame | 102 | mov r1, frame |
108 | bl printk | 103 | bl printk |
109 | no_frame: ldmfd sp!, {r4 - r8, pc} | 104 | no_frame: ldmfd sp!, {r4 - r8, pc} |
110 | ENDPROC(__backtrace) | ||
111 | ENDPROC(c_backtrace) | 105 | ENDPROC(c_backtrace) |
112 | 106 | ||
113 | .pushsection __ex_table,"a" | 107 | .pushsection __ex_table,"a" |
diff --git a/arch/arm/lib/div64.S b/arch/arm/lib/div64.S index faa7748142da..e55c4842c290 100644 --- a/arch/arm/lib/div64.S +++ b/arch/arm/lib/div64.S | |||
@@ -13,6 +13,7 @@ | |||
13 | */ | 13 | */ |
14 | 14 | ||
15 | #include <linux/linkage.h> | 15 | #include <linux/linkage.h> |
16 | #include <asm/unwind.h> | ||
16 | 17 | ||
17 | #ifdef __ARMEB__ | 18 | #ifdef __ARMEB__ |
18 | #define xh r0 | 19 | #define xh r0 |
@@ -44,6 +45,7 @@ | |||
44 | */ | 45 | */ |
45 | 46 | ||
46 | ENTRY(__do_div64) | 47 | ENTRY(__do_div64) |
48 | UNWIND(.fnstart) | ||
47 | 49 | ||
48 | @ Test for easy paths first. | 50 | @ Test for easy paths first. |
49 | subs ip, r4, #1 | 51 | subs ip, r4, #1 |
@@ -189,7 +191,12 @@ ENTRY(__do_div64) | |||
189 | moveq yh, xh | 191 | moveq yh, xh |
190 | moveq xh, #0 | 192 | moveq xh, #0 |
191 | moveq pc, lr | 193 | moveq pc, lr |
194 | UNWIND(.fnend) | ||
192 | 195 | ||
196 | UNWIND(.fnstart) | ||
197 | UNWIND(.pad #4) | ||
198 | UNWIND(.save {lr}) | ||
199 | Ldiv0_64: | ||
193 | @ Division by 0: | 200 | @ Division by 0: |
194 | str lr, [sp, #-8]! | 201 | str lr, [sp, #-8]! |
195 | bl __div0 | 202 | bl __div0 |
@@ -200,4 +207,5 @@ ENTRY(__do_div64) | |||
200 | mov xh, #0 | 207 | mov xh, #0 |
201 | ldr pc, [sp], #8 | 208 | ldr pc, [sp], #8 |
202 | 209 | ||
210 | UNWIND(.fnend) | ||
203 | ENDPROC(__do_div64) | 211 | ENDPROC(__do_div64) |
diff --git a/arch/arm/lib/uaccess_with_memcpy.c b/arch/arm/lib/uaccess_with_memcpy.c index 8b9b13649f81..025f742dd4df 100644 --- a/arch/arm/lib/uaccess_with_memcpy.c +++ b/arch/arm/lib/uaccess_with_memcpy.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/sched.h> | 17 | #include <linux/sched.h> |
18 | #include <linux/hardirq.h> /* for in_atomic() */ | 18 | #include <linux/hardirq.h> /* for in_atomic() */ |
19 | #include <linux/gfp.h> | 19 | #include <linux/gfp.h> |
20 | #include <linux/highmem.h> | ||
20 | #include <asm/current.h> | 21 | #include <asm/current.h> |
21 | #include <asm/page.h> | 22 | #include <asm/page.h> |
22 | 23 | ||
diff --git a/arch/arm/mach-at91/Makefile.boot b/arch/arm/mach-at91/Makefile.boot index 3462b815054a..9ab5a3e5f4f1 100644 --- a/arch/arm/mach-at91/Makefile.boot +++ b/arch/arm/mach-at91/Makefile.boot | |||
@@ -4,15 +4,15 @@ | |||
4 | # INITRD_PHYS must be in RAM | 4 | # INITRD_PHYS must be in RAM |
5 | 5 | ||
6 | ifeq ($(CONFIG_ARCH_AT91CAP9),y) | 6 | ifeq ($(CONFIG_ARCH_AT91CAP9),y) |
7 | zreladdr-y := 0x70008000 | 7 | zreladdr-y += 0x70008000 |
8 | params_phys-y := 0x70000100 | 8 | params_phys-y := 0x70000100 |
9 | initrd_phys-y := 0x70410000 | 9 | initrd_phys-y := 0x70410000 |
10 | else ifeq ($(CONFIG_ARCH_AT91SAM9G45),y) | 10 | else ifeq ($(CONFIG_ARCH_AT91SAM9G45),y) |
11 | zreladdr-y := 0x70008000 | 11 | zreladdr-y += 0x70008000 |
12 | params_phys-y := 0x70000100 | 12 | params_phys-y := 0x70000100 |
13 | initrd_phys-y := 0x70410000 | 13 | initrd_phys-y := 0x70410000 |
14 | else | 14 | else |
15 | zreladdr-y := 0x20008000 | 15 | zreladdr-y += 0x20008000 |
16 | params_phys-y := 0x20000100 | 16 | params_phys-y := 0x20000100 |
17 | initrd_phys-y := 0x20410000 | 17 | initrd_phys-y := 0x20410000 |
18 | endif | 18 | endif |
diff --git a/arch/arm/mach-bcmring/Makefile.boot b/arch/arm/mach-bcmring/Makefile.boot index fb53b283bebb..aef2467757fa 100644 --- a/arch/arm/mach-bcmring/Makefile.boot +++ b/arch/arm/mach-bcmring/Makefile.boot | |||
@@ -1,6 +1,6 @@ | |||
1 | # Address where decompressor will be written and eventually executed. | 1 | # Address where decompressor will be written and eventually executed. |
2 | # | 2 | # |
3 | # default to SDRAM | 3 | # default to SDRAM |
4 | zreladdr-y := $(CONFIG_BCM_ZRELADDR) | 4 | zreladdr-y += $(CONFIG_BCM_ZRELADDR) |
5 | params_phys-y := 0x00000800 | 5 | params_phys-y := 0x00000800 |
6 | 6 | ||
diff --git a/arch/arm/mach-bcmring/arch.c b/arch/arm/mach-bcmring/arch.c index a604b9ebb501..31a143592c81 100644 --- a/arch/arm/mach-bcmring/arch.c +++ b/arch/arm/mach-bcmring/arch.c | |||
@@ -136,8 +136,8 @@ static void __init bcmring_init_machine(void) | |||
136 | * | 136 | * |
137 | *****************************************************************************/ | 137 | *****************************************************************************/ |
138 | 138 | ||
139 | static void __init bcmring_fixup(struct machine_desc *desc, | 139 | static void __init bcmring_fixup(struct tag *t, char **cmdline, |
140 | struct tag *t, char **cmdline, struct meminfo *mi) { | 140 | struct meminfo *mi) { |
141 | #ifdef CONFIG_BLK_DEV_INITRD | 141 | #ifdef CONFIG_BLK_DEV_INITRD |
142 | printk(KERN_NOTICE "bcmring_fixup\n"); | 142 | printk(KERN_NOTICE "bcmring_fixup\n"); |
143 | t->hdr.tag = ATAG_CORE; | 143 | t->hdr.tag = ATAG_CORE; |
diff --git a/arch/arm/mach-clps711x/Makefile.boot b/arch/arm/mach-clps711x/Makefile.boot index a51fcef64fe0..9398e859b5af 100644 --- a/arch/arm/mach-clps711x/Makefile.boot +++ b/arch/arm/mach-clps711x/Makefile.boot | |||
@@ -1,5 +1,5 @@ | |||
1 | # The standard locations for stuff on CLPS711x type processors | 1 | # The standard locations for stuff on CLPS711x type processors |
2 | zreladdr-y := 0xc0028000 | 2 | zreladdr-y += 0xc0028000 |
3 | params_phys-y := 0xc0000100 | 3 | params_phys-y := 0xc0000100 |
4 | # Should probably have some agreement on these... | 4 | # Should probably have some agreement on these... |
5 | initrd_phys-$(CONFIG_ARCH_P720T) := 0xc0400000 | 5 | initrd_phys-$(CONFIG_ARCH_P720T) := 0xc0400000 |
diff --git a/arch/arm/mach-clps711x/clep7312.c b/arch/arm/mach-clps711x/clep7312.c index 67b5abb4a60a..0a2e74feb24a 100644 --- a/arch/arm/mach-clps711x/clep7312.c +++ b/arch/arm/mach-clps711x/clep7312.c | |||
@@ -26,8 +26,7 @@ | |||
26 | #include "common.h" | 26 | #include "common.h" |
27 | 27 | ||
28 | static void __init | 28 | static void __init |
29 | fixup_clep7312(struct machine_desc *desc, struct tag *tags, | 29 | fixup_clep7312(struct tag *tags, char **cmdline, struct meminfo *mi) |
30 | char **cmdline, struct meminfo *mi) | ||
31 | { | 30 | { |
32 | mi->nr_banks=1; | 31 | mi->nr_banks=1; |
33 | mi->bank[0].start = 0xc0000000; | 32 | mi->bank[0].start = 0xc0000000; |
diff --git a/arch/arm/mach-clps711x/edb7211-arch.c b/arch/arm/mach-clps711x/edb7211-arch.c index 98ca5b2e940d..725a7a54ba42 100644 --- a/arch/arm/mach-clps711x/edb7211-arch.c +++ b/arch/arm/mach-clps711x/edb7211-arch.c | |||
@@ -37,8 +37,7 @@ static void __init edb7211_reserve(void) | |||
37 | } | 37 | } |
38 | 38 | ||
39 | static void __init | 39 | static void __init |
40 | fixup_edb7211(struct machine_desc *desc, struct tag *tags, | 40 | fixup_edb7211(struct tag *tags, char **cmdline, struct meminfo *mi) |
41 | char **cmdline, struct meminfo *mi) | ||
42 | { | 41 | { |
43 | /* | 42 | /* |
44 | * Bank start addresses are not present in the information | 43 | * Bank start addresses are not present in the information |
diff --git a/arch/arm/mach-clps711x/fortunet.c b/arch/arm/mach-clps711x/fortunet.c index b1cb479e71e9..1947b30f9b8c 100644 --- a/arch/arm/mach-clps711x/fortunet.c +++ b/arch/arm/mach-clps711x/fortunet.c | |||
@@ -57,8 +57,7 @@ typedef struct tag_IMAGE_PARAMS | |||
57 | #define IMAGE_PARAMS_PHYS 0xC01F0000 | 57 | #define IMAGE_PARAMS_PHYS 0xC01F0000 |
58 | 58 | ||
59 | static void __init | 59 | static void __init |
60 | fortunet_fixup(struct machine_desc *desc, struct tag *tags, | 60 | fortunet_fixup(struct tag *tags, char **cmdline, struct meminfo *mi) |
61 | char **cmdline, struct meminfo *mi) | ||
62 | { | 61 | { |
63 | IMAGE_PARAMS *ip = phys_to_virt(IMAGE_PARAMS_PHYS); | 62 | IMAGE_PARAMS *ip = phys_to_virt(IMAGE_PARAMS_PHYS); |
64 | *cmdline = phys_to_virt(ip->command_line); | 63 | *cmdline = phys_to_virt(ip->command_line); |
diff --git a/arch/arm/mach-clps711x/p720t.c b/arch/arm/mach-clps711x/p720t.c index cefbce0480b9..3f796e0d3284 100644 --- a/arch/arm/mach-clps711x/p720t.c +++ b/arch/arm/mach-clps711x/p720t.c | |||
@@ -56,8 +56,7 @@ static struct map_desc p720t_io_desc[] __initdata = { | |||
56 | }; | 56 | }; |
57 | 57 | ||
58 | static void __init | 58 | static void __init |
59 | fixup_p720t(struct machine_desc *desc, struct tag *tag, | 59 | fixup_p720t(struct tag *tag, char **cmdline, struct meminfo *mi) |
60 | char **cmdline, struct meminfo *mi) | ||
61 | { | 60 | { |
62 | /* | 61 | /* |
63 | * Our bootloader doesn't setup any tags (yet). | 62 | * Our bootloader doesn't setup any tags (yet). |
diff --git a/arch/arm/mach-cns3xxx/Makefile.boot b/arch/arm/mach-cns3xxx/Makefile.boot index 777012865220..d079de0b6e3b 100644 --- a/arch/arm/mach-cns3xxx/Makefile.boot +++ b/arch/arm/mach-cns3xxx/Makefile.boot | |||
@@ -1,3 +1,3 @@ | |||
1 | zreladdr-y := 0x00008000 | 1 | zreladdr-y += 0x00008000 |
2 | params_phys-y := 0x00000100 | 2 | params_phys-y := 0x00000100 |
3 | initrd_phys-y := 0x00C00000 | 3 | initrd_phys-y := 0x00C00000 |
diff --git a/arch/arm/mach-davinci/Makefile.boot b/arch/arm/mach-davinci/Makefile.boot index db97ef2c6477..04a6c4e67b14 100644 --- a/arch/arm/mach-davinci/Makefile.boot +++ b/arch/arm/mach-davinci/Makefile.boot | |||
@@ -2,12 +2,12 @@ ifeq ($(CONFIG_ARCH_DAVINCI_DA8XX),y) | |||
2 | ifeq ($(CONFIG_ARCH_DAVINCI_DMx),y) | 2 | ifeq ($(CONFIG_ARCH_DAVINCI_DMx),y) |
3 | $(error Cannot enable DaVinci and DA8XX platforms concurrently) | 3 | $(error Cannot enable DaVinci and DA8XX platforms concurrently) |
4 | else | 4 | else |
5 | zreladdr-y := 0xc0008000 | 5 | zreladdr-y += 0xc0008000 |
6 | params_phys-y := 0xc0000100 | 6 | params_phys-y := 0xc0000100 |
7 | initrd_phys-y := 0xc0800000 | 7 | initrd_phys-y := 0xc0800000 |
8 | endif | 8 | endif |
9 | else | 9 | else |
10 | zreladdr-y := 0x80008000 | 10 | zreladdr-y += 0x80008000 |
11 | params_phys-y := 0x80000100 | 11 | params_phys-y := 0x80000100 |
12 | initrd_phys-y := 0x80800000 | 12 | initrd_phys-y := 0x80800000 |
13 | endif | 13 | endif |
diff --git a/arch/arm/mach-dove/Makefile.boot b/arch/arm/mach-dove/Makefile.boot index 67039c3e0c48..760a0efe7580 100644 --- a/arch/arm/mach-dove/Makefile.boot +++ b/arch/arm/mach-dove/Makefile.boot | |||
@@ -1,3 +1,3 @@ | |||
1 | zreladdr-y := 0x00008000 | 1 | zreladdr-y += 0x00008000 |
2 | params_phys-y := 0x00000100 | 2 | params_phys-y := 0x00000100 |
3 | initrd_phys-y := 0x00800000 | 3 | initrd_phys-y := 0x00800000 |
diff --git a/arch/arm/mach-dove/common.c b/arch/arm/mach-dove/common.c index 83dce859886d..a9e0dae86a26 100644 --- a/arch/arm/mach-dove/common.c +++ b/arch/arm/mach-dove/common.c | |||
@@ -158,7 +158,7 @@ void __init dove_spi0_init(void) | |||
158 | 158 | ||
159 | void __init dove_spi1_init(void) | 159 | void __init dove_spi1_init(void) |
160 | { | 160 | { |
161 | orion_spi_init(DOVE_SPI1_PHYS_BASE, get_tclk()); | 161 | orion_spi_1_init(DOVE_SPI1_PHYS_BASE, get_tclk()); |
162 | } | 162 | } |
163 | 163 | ||
164 | /***************************************************************************** | 164 | /***************************************************************************** |
diff --git a/arch/arm/mach-ebsa110/Makefile.boot b/arch/arm/mach-ebsa110/Makefile.boot index 232126044935..83cf07c38ada 100644 --- a/arch/arm/mach-ebsa110/Makefile.boot +++ b/arch/arm/mach-ebsa110/Makefile.boot | |||
@@ -1,4 +1,4 @@ | |||
1 | zreladdr-y := 0x00008000 | 1 | zreladdr-y += 0x00008000 |
2 | params_phys-y := 0x00000400 | 2 | params_phys-y := 0x00000400 |
3 | initrd_phys-y := 0x00800000 | 3 | initrd_phys-y := 0x00800000 |
4 | 4 | ||
diff --git a/arch/arm/mach-ebsa110/include/mach/io.h b/arch/arm/mach-ebsa110/include/mach/io.h index f68daa632af0..44679db672fb 100644 --- a/arch/arm/mach-ebsa110/include/mach/io.h +++ b/arch/arm/mach-ebsa110/include/mach/io.h | |||
@@ -13,8 +13,6 @@ | |||
13 | #ifndef __ASM_ARM_ARCH_IO_H | 13 | #ifndef __ASM_ARM_ARCH_IO_H |
14 | #define __ASM_ARM_ARCH_IO_H | 14 | #define __ASM_ARM_ARCH_IO_H |
15 | 15 | ||
16 | #define IO_SPACE_LIMIT 0xffff | ||
17 | |||
18 | u8 __inb8(unsigned int port); | 16 | u8 __inb8(unsigned int port); |
19 | void __outb8(u8 val, unsigned int port); | 17 | void __outb8(u8 val, unsigned int port); |
20 | 18 | ||
diff --git a/arch/arm/mach-ep93xx/Makefile.boot b/arch/arm/mach-ep93xx/Makefile.boot index 0ad33f15c622..d3113a71cb40 100644 --- a/arch/arm/mach-ep93xx/Makefile.boot +++ b/arch/arm/mach-ep93xx/Makefile.boot | |||
@@ -1,14 +1,14 @@ | |||
1 | zreladdr-$(CONFIG_EP93XX_SDCE3_SYNC_PHYS_OFFSET) := 0x00008000 | 1 | zreladdr-$(CONFIG_EP93XX_SDCE3_SYNC_PHYS_OFFSET) += 0x00008000 |
2 | params_phys-$(CONFIG_EP93XX_SDCE3_SYNC_PHYS_OFFSET) := 0x00000100 | 2 | params_phys-$(CONFIG_EP93XX_SDCE3_SYNC_PHYS_OFFSET) := 0x00000100 |
3 | 3 | ||
4 | zreladdr-$(CONFIG_EP93XX_SDCE0_PHYS_OFFSET) := 0xc0008000 | 4 | zreladdr-$(CONFIG_EP93XX_SDCE0_PHYS_OFFSET) += 0xc0008000 |
5 | params_phys-$(CONFIG_EP93XX_SDCE0_PHYS_OFFSET) := 0xc0000100 | 5 | params_phys-$(CONFIG_EP93XX_SDCE0_PHYS_OFFSET) := 0xc0000100 |
6 | 6 | ||
7 | zreladdr-$(CONFIG_EP93XX_SDCE1_PHYS_OFFSET) := 0xd0008000 | 7 | zreladdr-$(CONFIG_EP93XX_SDCE1_PHYS_OFFSET) += 0xd0008000 |
8 | params_phys-$(CONFIG_EP93XX_SDCE1_PHYS_OFFSET) := 0xd0000100 | 8 | params_phys-$(CONFIG_EP93XX_SDCE1_PHYS_OFFSET) := 0xd0000100 |
9 | 9 | ||
10 | zreladdr-$(CONFIG_EP93XX_SDCE2_PHYS_OFFSET) := 0xe0008000 | 10 | zreladdr-$(CONFIG_EP93XX_SDCE2_PHYS_OFFSET) += 0xe0008000 |
11 | params_phys-$(CONFIG_EP93XX_SDCE2_PHYS_OFFSET) := 0xe0000100 | 11 | params_phys-$(CONFIG_EP93XX_SDCE2_PHYS_OFFSET) := 0xe0000100 |
12 | 12 | ||
13 | zreladdr-$(CONFIG_EP93XX_SDCE3_ASYNC_PHYS_OFFSET) := 0xf0008000 | 13 | zreladdr-$(CONFIG_EP93XX_SDCE3_ASYNC_PHYS_OFFSET) += 0xf0008000 |
14 | params_phys-$(CONFIG_EP93XX_SDCE3_ASYNC_PHYS_OFFSET) := 0xf0000100 | 14 | params_phys-$(CONFIG_EP93XX_SDCE3_ASYNC_PHYS_OFFSET) := 0xf0000100 |
diff --git a/arch/arm/mach-exynos4/Kconfig b/arch/arm/mach-exynos4/Kconfig index 0c77ab99fa16..fc1f92dfbea8 100644 --- a/arch/arm/mach-exynos4/Kconfig +++ b/arch/arm/mach-exynos4/Kconfig | |||
@@ -12,6 +12,7 @@ if ARCH_EXYNOS4 | |||
12 | config CPU_EXYNOS4210 | 12 | config CPU_EXYNOS4210 |
13 | bool | 13 | bool |
14 | select S3C_PL330_DMA | 14 | select S3C_PL330_DMA |
15 | select ARM_CPU_SUSPEND if PM | ||
15 | help | 16 | help |
16 | Enable EXYNOS4210 CPU support | 17 | Enable EXYNOS4210 CPU support |
17 | 18 | ||
diff --git a/arch/arm/mach-exynos4/Makefile.boot b/arch/arm/mach-exynos4/Makefile.boot index d65956ffb43d..b9862e22bf10 100644 --- a/arch/arm/mach-exynos4/Makefile.boot +++ b/arch/arm/mach-exynos4/Makefile.boot | |||
@@ -1,2 +1,2 @@ | |||
1 | zreladdr-y := 0x40008000 | 1 | zreladdr-y += 0x40008000 |
2 | params_phys-y := 0x40000100 | 2 | params_phys-y := 0x40000100 |
diff --git a/arch/arm/mach-exynos4/clock.c b/arch/arm/mach-exynos4/clock.c index 1561b036a9bf..86964d2e9e1b 100644 --- a/arch/arm/mach-exynos4/clock.c +++ b/arch/arm/mach-exynos4/clock.c | |||
@@ -899,8 +899,7 @@ static struct clksrc_clk clksrcs[] = { | |||
899 | .reg_div = { .reg = S5P_CLKDIV_CAM, .shift = 28, .size = 4 }, | 899 | .reg_div = { .reg = S5P_CLKDIV_CAM, .shift = 28, .size = 4 }, |
900 | }, { | 900 | }, { |
901 | .clk = { | 901 | .clk = { |
902 | .name = "sclk_cam", | 902 | .name = "sclk_cam0", |
903 | .devname = "exynos4-fimc.0", | ||
904 | .enable = exynos4_clksrc_mask_cam_ctrl, | 903 | .enable = exynos4_clksrc_mask_cam_ctrl, |
905 | .ctrlbit = (1 << 16), | 904 | .ctrlbit = (1 << 16), |
906 | }, | 905 | }, |
@@ -909,8 +908,7 @@ static struct clksrc_clk clksrcs[] = { | |||
909 | .reg_div = { .reg = S5P_CLKDIV_CAM, .shift = 16, .size = 4 }, | 908 | .reg_div = { .reg = S5P_CLKDIV_CAM, .shift = 16, .size = 4 }, |
910 | }, { | 909 | }, { |
911 | .clk = { | 910 | .clk = { |
912 | .name = "sclk_cam", | 911 | .name = "sclk_cam1", |
913 | .devname = "exynos4-fimc.1", | ||
914 | .enable = exynos4_clksrc_mask_cam_ctrl, | 912 | .enable = exynos4_clksrc_mask_cam_ctrl, |
915 | .ctrlbit = (1 << 20), | 913 | .ctrlbit = (1 << 20), |
916 | }, | 914 | }, |
@@ -1160,7 +1158,7 @@ void __init_or_cpufreq exynos4_setup_clocks(void) | |||
1160 | 1158 | ||
1161 | vpllsrc = clk_get_rate(&clk_vpllsrc.clk); | 1159 | vpllsrc = clk_get_rate(&clk_vpllsrc.clk); |
1162 | vpll = s5p_get_pll46xx(vpllsrc, __raw_readl(S5P_VPLL_CON0), | 1160 | vpll = s5p_get_pll46xx(vpllsrc, __raw_readl(S5P_VPLL_CON0), |
1163 | __raw_readl(S5P_VPLL_CON1), pll_4650); | 1161 | __raw_readl(S5P_VPLL_CON1), pll_4650c); |
1164 | 1162 | ||
1165 | clk_fout_apll.ops = &exynos4_fout_apll_ops; | 1163 | clk_fout_apll.ops = &exynos4_fout_apll_ops; |
1166 | clk_fout_mpll.rate = mpll; | 1164 | clk_fout_mpll.rate = mpll; |
diff --git a/arch/arm/mach-exynos4/mct.c b/arch/arm/mach-exynos4/mct.c index 1ae059b7ad7b..ddd86864fb83 100644 --- a/arch/arm/mach-exynos4/mct.c +++ b/arch/arm/mach-exynos4/mct.c | |||
@@ -132,12 +132,18 @@ static cycle_t exynos4_frc_read(struct clocksource *cs) | |||
132 | return ((cycle_t)hi << 32) | lo; | 132 | return ((cycle_t)hi << 32) | lo; |
133 | } | 133 | } |
134 | 134 | ||
135 | static void exynos4_frc_resume(struct clocksource *cs) | ||
136 | { | ||
137 | exynos4_mct_frc_start(0, 0); | ||
138 | } | ||
139 | |||
135 | struct clocksource mct_frc = { | 140 | struct clocksource mct_frc = { |
136 | .name = "mct-frc", | 141 | .name = "mct-frc", |
137 | .rating = 400, | 142 | .rating = 400, |
138 | .read = exynos4_frc_read, | 143 | .read = exynos4_frc_read, |
139 | .mask = CLOCKSOURCE_MASK(64), | 144 | .mask = CLOCKSOURCE_MASK(64), |
140 | .flags = CLOCK_SOURCE_IS_CONTINUOUS, | 145 | .flags = CLOCK_SOURCE_IS_CONTINUOUS, |
146 | .resume = exynos4_frc_resume, | ||
141 | }; | 147 | }; |
142 | 148 | ||
143 | static void __init exynos4_clocksource_init(void) | 149 | static void __init exynos4_clocksource_init(void) |
@@ -389,9 +395,11 @@ static void exynos4_mct_tick_init(struct clock_event_device *evt) | |||
389 | } | 395 | } |
390 | 396 | ||
391 | /* Setup the local clock events for a CPU */ | 397 | /* Setup the local clock events for a CPU */ |
392 | void __cpuinit local_timer_setup(struct clock_event_device *evt) | 398 | int __cpuinit local_timer_setup(struct clock_event_device *evt) |
393 | { | 399 | { |
394 | exynos4_mct_tick_init(evt); | 400 | exynos4_mct_tick_init(evt); |
401 | |||
402 | return 0; | ||
395 | } | 403 | } |
396 | 404 | ||
397 | int local_timer_ack(void) | 405 | int local_timer_ack(void) |
diff --git a/arch/arm/mach-exynos4/platsmp.c b/arch/arm/mach-exynos4/platsmp.c index 7c2282c6ba81..0c90896ad9a0 100644 --- a/arch/arm/mach-exynos4/platsmp.c +++ b/arch/arm/mach-exynos4/platsmp.c | |||
@@ -106,6 +106,8 @@ void __cpuinit platform_secondary_init(unsigned int cpu) | |||
106 | */ | 106 | */ |
107 | spin_lock(&boot_lock); | 107 | spin_lock(&boot_lock); |
108 | spin_unlock(&boot_lock); | 108 | spin_unlock(&boot_lock); |
109 | |||
110 | set_cpu_online(cpu, true); | ||
109 | } | 111 | } |
110 | 112 | ||
111 | int __cpuinit boot_secondary(unsigned int cpu, struct task_struct *idle) | 113 | int __cpuinit boot_secondary(unsigned int cpu, struct task_struct *idle) |
@@ -191,12 +193,10 @@ void __init smp_init_cpus(void) | |||
191 | ncores = scu_base ? scu_get_core_count(scu_base) : 1; | 193 | ncores = scu_base ? scu_get_core_count(scu_base) : 1; |
192 | 194 | ||
193 | /* sanity check */ | 195 | /* sanity check */ |
194 | if (ncores > NR_CPUS) { | 196 | if (ncores > nr_cpu_ids) { |
195 | printk(KERN_WARNING | 197 | pr_warn("SMP: %u cores greater than maximum (%u), clipping\n", |
196 | "EXYNOS4: no. of cores (%d) greater than configured " | 198 | ncores, nr_cpu_ids); |
197 | "maximum of %d - clipping\n", | 199 | ncores = nr_cpu_ids; |
198 | ncores, NR_CPUS); | ||
199 | ncores = NR_CPUS; | ||
200 | } | 200 | } |
201 | 201 | ||
202 | for (i = 0; i < ncores; i++) | 202 | for (i = 0; i < ncores; i++) |
diff --git a/arch/arm/mach-exynos4/setup-keypad.c b/arch/arm/mach-exynos4/setup-keypad.c index 1ee0ebff111f..7862bfb5933d 100644 --- a/arch/arm/mach-exynos4/setup-keypad.c +++ b/arch/arm/mach-exynos4/setup-keypad.c | |||
@@ -19,15 +19,16 @@ void samsung_keypad_cfg_gpio(unsigned int rows, unsigned int cols) | |||
19 | 19 | ||
20 | if (rows > 8) { | 20 | if (rows > 8) { |
21 | /* Set all the necessary GPX2 pins: KP_ROW[0~7] */ | 21 | /* Set all the necessary GPX2 pins: KP_ROW[0~7] */ |
22 | s3c_gpio_cfgrange_nopull(EXYNOS4_GPX2(0), 8, S3C_GPIO_SFN(3)); | 22 | s3c_gpio_cfgall_range(EXYNOS4_GPX2(0), 8, S3C_GPIO_SFN(3), |
23 | S3C_GPIO_PULL_UP); | ||
23 | 24 | ||
24 | /* Set all the necessary GPX3 pins: KP_ROW[8~] */ | 25 | /* Set all the necessary GPX3 pins: KP_ROW[8~] */ |
25 | s3c_gpio_cfgrange_nopull(EXYNOS4_GPX3(0), (rows - 8), | 26 | s3c_gpio_cfgall_range(EXYNOS4_GPX3(0), (rows - 8), |
26 | S3C_GPIO_SFN(3)); | 27 | S3C_GPIO_SFN(3), S3C_GPIO_PULL_UP); |
27 | } else { | 28 | } else { |
28 | /* Set all the necessary GPX2 pins: KP_ROW[x] */ | 29 | /* Set all the necessary GPX2 pins: KP_ROW[x] */ |
29 | s3c_gpio_cfgrange_nopull(EXYNOS4_GPX2(0), rows, | 30 | s3c_gpio_cfgall_range(EXYNOS4_GPX2(0), rows, S3C_GPIO_SFN(3), |
30 | S3C_GPIO_SFN(3)); | 31 | S3C_GPIO_PULL_UP); |
31 | } | 32 | } |
32 | 33 | ||
33 | /* Set all the necessary GPX1 pins to special-function 3: KP_COL[x] */ | 34 | /* Set all the necessary GPX1 pins to special-function 3: KP_COL[x] */ |
diff --git a/arch/arm/mach-footbridge/Kconfig b/arch/arm/mach-footbridge/Kconfig index c8e7afcf14ec..f643ef819da6 100644 --- a/arch/arm/mach-footbridge/Kconfig +++ b/arch/arm/mach-footbridge/Kconfig | |||
@@ -4,8 +4,8 @@ menu "Footbridge Implementations" | |||
4 | 4 | ||
5 | config ARCH_CATS | 5 | config ARCH_CATS |
6 | bool "CATS" | 6 | bool "CATS" |
7 | select CLKSRC_I8253 | ||
8 | select CLKEVT_I8253 | 7 | select CLKEVT_I8253 |
8 | select CLKSRC_I8253 | ||
9 | select FOOTBRIDGE_HOST | 9 | select FOOTBRIDGE_HOST |
10 | select ISA | 10 | select ISA |
11 | select ISA_DMA | 11 | select ISA_DMA |
@@ -61,8 +61,8 @@ config ARCH_EBSA285_HOST | |||
61 | 61 | ||
62 | config ARCH_NETWINDER | 62 | config ARCH_NETWINDER |
63 | bool "NetWinder" | 63 | bool "NetWinder" |
64 | select CLKSRC_I8253 | ||
65 | select CLKEVT_I8253 | 64 | select CLKEVT_I8253 |
65 | select CLKSRC_I8253 | ||
66 | select FOOTBRIDGE_HOST | 66 | select FOOTBRIDGE_HOST |
67 | select ISA | 67 | select ISA |
68 | select ISA_DMA | 68 | select ISA_DMA |
diff --git a/arch/arm/mach-footbridge/Makefile.boot b/arch/arm/mach-footbridge/Makefile.boot index c7e75acfe6c9..ff0a4b5b0a82 100644 --- a/arch/arm/mach-footbridge/Makefile.boot +++ b/arch/arm/mach-footbridge/Makefile.boot | |||
@@ -1,4 +1,4 @@ | |||
1 | zreladdr-y := 0x00008000 | 1 | zreladdr-y += 0x00008000 |
2 | params_phys-y := 0x00000100 | 2 | params_phys-y := 0x00000100 |
3 | initrd_phys-y := 0x00800000 | 3 | initrd_phys-y := 0x00800000 |
4 | 4 | ||
diff --git a/arch/arm/mach-footbridge/cats-hw.c b/arch/arm/mach-footbridge/cats-hw.c index 5b1a8db779be..206ff2f39d6c 100644 --- a/arch/arm/mach-footbridge/cats-hw.c +++ b/arch/arm/mach-footbridge/cats-hw.c | |||
@@ -76,8 +76,7 @@ __initcall(cats_hw_init); | |||
76 | * hard reboots fail on early boards. | 76 | * hard reboots fail on early boards. |
77 | */ | 77 | */ |
78 | static void __init | 78 | static void __init |
79 | fixup_cats(struct machine_desc *desc, struct tag *tags, | 79 | fixup_cats(struct tag *tags, char **cmdline, struct meminfo *mi) |
80 | char **cmdline, struct meminfo *mi) | ||
81 | { | 80 | { |
82 | screen_info.orig_video_lines = 25; | 81 | screen_info.orig_video_lines = 25; |
83 | screen_info.orig_video_points = 16; | 82 | screen_info.orig_video_points = 16; |
diff --git a/arch/arm/mach-footbridge/include/mach/io.h b/arch/arm/mach-footbridge/include/mach/io.h index 32e4cc397c28..15a70396c27d 100644 --- a/arch/arm/mach-footbridge/include/mach/io.h +++ b/arch/arm/mach-footbridge/include/mach/io.h | |||
@@ -23,8 +23,6 @@ | |||
23 | #define PCIO_SIZE 0x00100000 | 23 | #define PCIO_SIZE 0x00100000 |
24 | #define PCIO_BASE MMU_IO(0xff000000, 0x7c000000) | 24 | #define PCIO_BASE MMU_IO(0xff000000, 0x7c000000) |
25 | 25 | ||
26 | #define IO_SPACE_LIMIT 0xffff | ||
27 | |||
28 | /* | 26 | /* |
29 | * Translation of various region addresses to virtual addresses | 27 | * Translation of various region addresses to virtual addresses |
30 | */ | 28 | */ |
diff --git a/arch/arm/mach-footbridge/netwinder-hw.c b/arch/arm/mach-footbridge/netwinder-hw.c index 06e514f372d0..4cbc2e65ce3a 100644 --- a/arch/arm/mach-footbridge/netwinder-hw.c +++ b/arch/arm/mach-footbridge/netwinder-hw.c | |||
@@ -631,8 +631,7 @@ __initcall(nw_hw_init); | |||
631 | * the parameter page. | 631 | * the parameter page. |
632 | */ | 632 | */ |
633 | static void __init | 633 | static void __init |
634 | fixup_netwinder(struct machine_desc *desc, struct tag *tags, | 634 | fixup_netwinder(struct tag *tags, char **cmdline, struct meminfo *mi) |
635 | char **cmdline, struct meminfo *mi) | ||
636 | { | 635 | { |
637 | #ifdef CONFIG_ISAPNP | 636 | #ifdef CONFIG_ISAPNP |
638 | extern int isapnp_disable; | 637 | extern int isapnp_disable; |
diff --git a/arch/arm/mach-gemini/Makefile.boot b/arch/arm/mach-gemini/Makefile.boot index 22a52c228d93..683f52b20e3d 100644 --- a/arch/arm/mach-gemini/Makefile.boot +++ b/arch/arm/mach-gemini/Makefile.boot | |||
@@ -1,9 +1,9 @@ | |||
1 | ifeq ($(CONFIG_GEMINI_MEM_SWAP),y) | 1 | ifeq ($(CONFIG_GEMINI_MEM_SWAP),y) |
2 | zreladdr-y := 0x00008000 | 2 | zreladdr-y += 0x00008000 |
3 | params_phys-y := 0x00000100 | 3 | params_phys-y := 0x00000100 |
4 | initrd_phys-y := 0x00800000 | 4 | initrd_phys-y := 0x00800000 |
5 | else | 5 | else |
6 | zreladdr-y := 0x10008000 | 6 | zreladdr-y += 0x10008000 |
7 | params_phys-y := 0x10000100 | 7 | params_phys-y := 0x10000100 |
8 | initrd_phys-y := 0x10800000 | 8 | initrd_phys-y := 0x10800000 |
9 | endif | 9 | endif |
diff --git a/arch/arm/mach-h720x/Makefile.boot b/arch/arm/mach-h720x/Makefile.boot index 52984017bd91..d875a7094dfe 100644 --- a/arch/arm/mach-h720x/Makefile.boot +++ b/arch/arm/mach-h720x/Makefile.boot | |||
@@ -1,2 +1,2 @@ | |||
1 | zreladdr-$(CONFIG_ARCH_H720X) := 0x40008000 | 1 | zreladdr-$(CONFIG_ARCH_H720X) += 0x40008000 |
2 | 2 | ||
diff --git a/arch/arm/mach-imx/Makefile.boot b/arch/arm/mach-imx/Makefile.boot index ebee18b3884c..dbe61201bcd8 100644 --- a/arch/arm/mach-imx/Makefile.boot +++ b/arch/arm/mach-imx/Makefile.boot | |||
@@ -1,19 +1,19 @@ | |||
1 | zreladdr-$(CONFIG_ARCH_MX1) := 0x08008000 | 1 | zreladdr-$(CONFIG_ARCH_MX1) += 0x08008000 |
2 | params_phys-$(CONFIG_ARCH_MX1) := 0x08000100 | 2 | params_phys-$(CONFIG_ARCH_MX1) := 0x08000100 |
3 | initrd_phys-$(CONFIG_ARCH_MX1) := 0x08800000 | 3 | initrd_phys-$(CONFIG_ARCH_MX1) := 0x08800000 |
4 | 4 | ||
5 | zreladdr-$(CONFIG_MACH_MX21) := 0xC0008000 | 5 | zreladdr-$(CONFIG_MACH_MX21) += 0xC0008000 |
6 | params_phys-$(CONFIG_MACH_MX21) := 0xC0000100 | 6 | params_phys-$(CONFIG_MACH_MX21) := 0xC0000100 |
7 | initrd_phys-$(CONFIG_MACH_MX21) := 0xC0800000 | 7 | initrd_phys-$(CONFIG_MACH_MX21) := 0xC0800000 |
8 | 8 | ||
9 | zreladdr-$(CONFIG_ARCH_MX25) := 0x80008000 | 9 | zreladdr-$(CONFIG_ARCH_MX25) += 0x80008000 |
10 | params_phys-$(CONFIG_ARCH_MX25) := 0x80000100 | 10 | params_phys-$(CONFIG_ARCH_MX25) := 0x80000100 |
11 | initrd_phys-$(CONFIG_ARCH_MX25) := 0x80800000 | 11 | initrd_phys-$(CONFIG_ARCH_MX25) := 0x80800000 |
12 | 12 | ||
13 | zreladdr-$(CONFIG_MACH_MX27) := 0xA0008000 | 13 | zreladdr-$(CONFIG_MACH_MX27) += 0xA0008000 |
14 | params_phys-$(CONFIG_MACH_MX27) := 0xA0000100 | 14 | params_phys-$(CONFIG_MACH_MX27) := 0xA0000100 |
15 | initrd_phys-$(CONFIG_MACH_MX27) := 0xA0800000 | 15 | initrd_phys-$(CONFIG_MACH_MX27) := 0xA0800000 |
16 | 16 | ||
17 | zreladdr-$(CONFIG_ARCH_MX3) := 0x80008000 | 17 | zreladdr-$(CONFIG_ARCH_MX3) += 0x80008000 |
18 | params_phys-$(CONFIG_ARCH_MX3) := 0x80000100 | 18 | params_phys-$(CONFIG_ARCH_MX3) := 0x80000100 |
19 | initrd_phys-$(CONFIG_ARCH_MX3) := 0x80800000 | 19 | initrd_phys-$(CONFIG_ARCH_MX3) := 0x80800000 |
diff --git a/arch/arm/mach-integrator/Makefile.boot b/arch/arm/mach-integrator/Makefile.boot index c7e75acfe6c9..ff0a4b5b0a82 100644 --- a/arch/arm/mach-integrator/Makefile.boot +++ b/arch/arm/mach-integrator/Makefile.boot | |||
@@ -1,4 +1,4 @@ | |||
1 | zreladdr-y := 0x00008000 | 1 | zreladdr-y += 0x00008000 |
2 | params_phys-y := 0x00000100 | 2 | params_phys-y := 0x00000100 |
3 | initrd_phys-y := 0x00800000 | 3 | initrd_phys-y := 0x00800000 |
4 | 4 | ||
diff --git a/arch/arm/mach-integrator/core.c b/arch/arm/mach-integrator/core.c index 77315b995681..82ebc8d772d3 100644 --- a/arch/arm/mach-integrator/core.c +++ b/arch/arm/mach-integrator/core.c | |||
@@ -126,6 +126,10 @@ static struct clk_lookup lookups[] = { | |||
126 | { /* Bus clock */ | 126 | { /* Bus clock */ |
127 | .con_id = "apb_pclk", | 127 | .con_id = "apb_pclk", |
128 | .clk = &dummy_apb_pclk, | 128 | .clk = &dummy_apb_pclk, |
129 | }, { | ||
130 | /* Integrator/AP timer frequency */ | ||
131 | .dev_id = "ap_timer", | ||
132 | .clk = &clk24mhz, | ||
129 | }, { /* UART0 */ | 133 | }, { /* UART0 */ |
130 | .dev_id = "mb:16", | 134 | .dev_id = "mb:16", |
131 | .clk = &uartclk, | 135 | .clk = &uartclk, |
diff --git a/arch/arm/mach-integrator/include/mach/io.h b/arch/arm/mach-integrator/include/mach/io.h index f21bb5493dd9..37beed3fa3ed 100644 --- a/arch/arm/mach-integrator/include/mach/io.h +++ b/arch/arm/mach-integrator/include/mach/io.h | |||
@@ -20,8 +20,6 @@ | |||
20 | #ifndef __ASM_ARM_ARCH_IO_H | 20 | #ifndef __ASM_ARM_ARCH_IO_H |
21 | #define __ASM_ARM_ARCH_IO_H | 21 | #define __ASM_ARM_ARCH_IO_H |
22 | 22 | ||
23 | #define IO_SPACE_LIMIT 0xffff | ||
24 | |||
25 | /* | 23 | /* |
26 | * WARNING: this has to mirror definitions in platform.h | 24 | * WARNING: this has to mirror definitions in platform.h |
27 | */ | 25 | */ |
diff --git a/arch/arm/mach-integrator/include/mach/platform.h b/arch/arm/mach-integrator/include/mach/platform.h index 5e6ea5cfea6e..ec467baade09 100644 --- a/arch/arm/mach-integrator/include/mach/platform.h +++ b/arch/arm/mach-integrator/include/mach/platform.h | |||
@@ -13,9 +13,6 @@ | |||
13 | * along with this program; if not, write to the Free Software | 13 | * along with this program; if not, write to the Free Software |
14 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 14 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
15 | */ | 15 | */ |
16 | /* DO NOT EDIT!! - this file automatically generated | ||
17 | * from .s file by awk -f s2h.awk | ||
18 | */ | ||
19 | /************************************************************************** | 16 | /************************************************************************** |
20 | * * Copyright © ARM Limited 1998. All rights reserved. | 17 | * * Copyright © ARM Limited 1998. All rights reserved. |
21 | * ***********************************************************************/ | 18 | * ***********************************************************************/ |
@@ -399,15 +396,6 @@ | |||
399 | #define INTEGRATOR_TIMER1_BASE (INTEGRATOR_CT_BASE + 0x100) | 396 | #define INTEGRATOR_TIMER1_BASE (INTEGRATOR_CT_BASE + 0x100) |
400 | #define INTEGRATOR_TIMER2_BASE (INTEGRATOR_CT_BASE + 0x200) | 397 | #define INTEGRATOR_TIMER2_BASE (INTEGRATOR_CT_BASE + 0x200) |
401 | 398 | ||
402 | #define TICKS_PER_uSEC 24 | ||
403 | |||
404 | /* | ||
405 | * These are useconds NOT ticks. | ||
406 | * | ||
407 | */ | ||
408 | #define mSEC_1 1000 | ||
409 | #define mSEC_10 (mSEC_1 * 10) | ||
410 | |||
411 | #define INTEGRATOR_CSR_BASE 0x10000000 | 399 | #define INTEGRATOR_CSR_BASE 0x10000000 |
412 | #define INTEGRATOR_CSR_SIZE 0x10000000 | 400 | #define INTEGRATOR_CSR_SIZE 0x10000000 |
413 | 401 | ||
diff --git a/arch/arm/mach-integrator/integrator_ap.c b/arch/arm/mach-integrator/integrator_ap.c index fcf0ae95651f..f2119908a0b3 100644 --- a/arch/arm/mach-integrator/integrator_ap.c +++ b/arch/arm/mach-integrator/integrator_ap.c | |||
@@ -32,6 +32,8 @@ | |||
32 | #include <linux/interrupt.h> | 32 | #include <linux/interrupt.h> |
33 | #include <linux/io.h> | 33 | #include <linux/io.h> |
34 | #include <linux/mtd/physmap.h> | 34 | #include <linux/mtd/physmap.h> |
35 | #include <linux/clk.h> | ||
36 | #include <video/vga.h> | ||
35 | 37 | ||
36 | #include <mach/hardware.h> | 38 | #include <mach/hardware.h> |
37 | #include <mach/platform.h> | 39 | #include <mach/platform.h> |
@@ -154,6 +156,7 @@ static struct map_desc ap_io_desc[] __initdata = { | |||
154 | static void __init ap_map_io(void) | 156 | static void __init ap_map_io(void) |
155 | { | 157 | { |
156 | iotable_init(ap_io_desc, ARRAY_SIZE(ap_io_desc)); | 158 | iotable_init(ap_io_desc, ARRAY_SIZE(ap_io_desc)); |
159 | vga_base = PCI_MEMORY_VADDR; | ||
157 | } | 160 | } |
158 | 161 | ||
159 | #define INTEGRATOR_SC_VALID_INT 0x003fffff | 162 | #define INTEGRATOR_SC_VALID_INT 0x003fffff |
@@ -320,27 +323,16 @@ static void __init ap_init(void) | |||
320 | #define TIMER1_VA_BASE IO_ADDRESS(INTEGRATOR_TIMER1_BASE) | 323 | #define TIMER1_VA_BASE IO_ADDRESS(INTEGRATOR_TIMER1_BASE) |
321 | #define TIMER2_VA_BASE IO_ADDRESS(INTEGRATOR_TIMER2_BASE) | 324 | #define TIMER2_VA_BASE IO_ADDRESS(INTEGRATOR_TIMER2_BASE) |
322 | 325 | ||
323 | /* | ||
324 | * How long is the timer interval? | ||
325 | */ | ||
326 | #define TIMER_INTERVAL (TICKS_PER_uSEC * mSEC_10) | ||
327 | #if TIMER_INTERVAL >= 0x100000 | ||
328 | #define TICKS2USECS(x) (256 * (x) / TICKS_PER_uSEC) | ||
329 | #elif TIMER_INTERVAL >= 0x10000 | ||
330 | #define TICKS2USECS(x) (16 * (x) / TICKS_PER_uSEC) | ||
331 | #else | ||
332 | #define TICKS2USECS(x) ((x) / TICKS_PER_uSEC) | ||
333 | #endif | ||
334 | |||
335 | static unsigned long timer_reload; | 326 | static unsigned long timer_reload; |
336 | 327 | ||
337 | static void integrator_clocksource_init(u32 khz) | 328 | static void integrator_clocksource_init(unsigned long inrate) |
338 | { | 329 | { |
339 | void __iomem *base = (void __iomem *)TIMER2_VA_BASE; | 330 | void __iomem *base = (void __iomem *)TIMER2_VA_BASE; |
340 | u32 ctrl = TIMER_CTRL_ENABLE | TIMER_CTRL_PERIODIC; | 331 | u32 ctrl = TIMER_CTRL_ENABLE | TIMER_CTRL_PERIODIC; |
332 | unsigned long rate = inrate; | ||
341 | 333 | ||
342 | if (khz >= 1500) { | 334 | if (rate >= 1500000) { |
343 | khz /= 16; | 335 | rate /= 16; |
344 | ctrl |= TIMER_CTRL_DIV16; | 336 | ctrl |= TIMER_CTRL_DIV16; |
345 | } | 337 | } |
346 | 338 | ||
@@ -348,7 +340,7 @@ static void integrator_clocksource_init(u32 khz) | |||
348 | writel(ctrl, base + TIMER_CTRL); | 340 | writel(ctrl, base + TIMER_CTRL); |
349 | 341 | ||
350 | clocksource_mmio_init(base + TIMER_VALUE, "timer2", | 342 | clocksource_mmio_init(base + TIMER_VALUE, "timer2", |
351 | khz * 1000, 200, 16, clocksource_mmio_readl_down); | 343 | rate, 200, 16, clocksource_mmio_readl_down); |
352 | } | 344 | } |
353 | 345 | ||
354 | static void __iomem * const clkevt_base = (void __iomem *)TIMER1_VA_BASE; | 346 | static void __iomem * const clkevt_base = (void __iomem *)TIMER1_VA_BASE; |
@@ -372,15 +364,29 @@ static void clkevt_set_mode(enum clock_event_mode mode, struct clock_event_devic | |||
372 | { | 364 | { |
373 | u32 ctrl = readl(clkevt_base + TIMER_CTRL) & ~TIMER_CTRL_ENABLE; | 365 | u32 ctrl = readl(clkevt_base + TIMER_CTRL) & ~TIMER_CTRL_ENABLE; |
374 | 366 | ||
375 | BUG_ON(mode == CLOCK_EVT_MODE_ONESHOT); | 367 | /* Disable timer */ |
368 | writel(ctrl, clkevt_base + TIMER_CTRL); | ||
376 | 369 | ||
377 | if (mode == CLOCK_EVT_MODE_PERIODIC) { | 370 | switch (mode) { |
378 | writel(ctrl, clkevt_base + TIMER_CTRL); | 371 | case CLOCK_EVT_MODE_PERIODIC: |
372 | /* Enable the timer and start the periodic tick */ | ||
379 | writel(timer_reload, clkevt_base + TIMER_LOAD); | 373 | writel(timer_reload, clkevt_base + TIMER_LOAD); |
380 | ctrl |= TIMER_CTRL_PERIODIC | TIMER_CTRL_ENABLE; | 374 | ctrl |= TIMER_CTRL_PERIODIC | TIMER_CTRL_ENABLE; |
375 | writel(ctrl, clkevt_base + TIMER_CTRL); | ||
376 | break; | ||
377 | case CLOCK_EVT_MODE_ONESHOT: | ||
378 | /* Leave the timer disabled, .set_next_event will enable it */ | ||
379 | ctrl &= ~TIMER_CTRL_PERIODIC; | ||
380 | writel(ctrl, clkevt_base + TIMER_CTRL); | ||
381 | break; | ||
382 | case CLOCK_EVT_MODE_UNUSED: | ||
383 | case CLOCK_EVT_MODE_SHUTDOWN: | ||
384 | case CLOCK_EVT_MODE_RESUME: | ||
385 | default: | ||
386 | /* Just leave in disabled state */ | ||
387 | break; | ||
381 | } | 388 | } |
382 | 389 | ||
383 | writel(ctrl, clkevt_base + TIMER_CTRL); | ||
384 | } | 390 | } |
385 | 391 | ||
386 | static int clkevt_set_next_event(unsigned long next, struct clock_event_device *evt) | 392 | static int clkevt_set_next_event(unsigned long next, struct clock_event_device *evt) |
@@ -396,12 +402,10 @@ static int clkevt_set_next_event(unsigned long next, struct clock_event_device * | |||
396 | 402 | ||
397 | static struct clock_event_device integrator_clockevent = { | 403 | static struct clock_event_device integrator_clockevent = { |
398 | .name = "timer1", | 404 | .name = "timer1", |
399 | .shift = 34, | 405 | .features = CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT, |
400 | .features = CLOCK_EVT_FEAT_PERIODIC, | ||
401 | .set_mode = clkevt_set_mode, | 406 | .set_mode = clkevt_set_mode, |
402 | .set_next_event = clkevt_set_next_event, | 407 | .set_next_event = clkevt_set_next_event, |
403 | .rating = 300, | 408 | .rating = 300, |
404 | .cpumask = cpu_all_mask, | ||
405 | }; | 409 | }; |
406 | 410 | ||
407 | static struct irqaction integrator_timer_irq = { | 411 | static struct irqaction integrator_timer_irq = { |
@@ -411,29 +415,27 @@ static struct irqaction integrator_timer_irq = { | |||
411 | .dev_id = &integrator_clockevent, | 415 | .dev_id = &integrator_clockevent, |
412 | }; | 416 | }; |
413 | 417 | ||
414 | static void integrator_clockevent_init(u32 khz) | 418 | static void integrator_clockevent_init(unsigned long inrate) |
415 | { | 419 | { |
416 | struct clock_event_device *evt = &integrator_clockevent; | 420 | unsigned long rate = inrate; |
417 | unsigned int ctrl = 0; | 421 | unsigned int ctrl = 0; |
418 | 422 | ||
419 | if (khz * 1000 > 0x100000 * HZ) { | 423 | /* Calculate and program a divisor */ |
420 | khz /= 256; | 424 | if (rate > 0x100000 * HZ) { |
425 | rate /= 256; | ||
421 | ctrl |= TIMER_CTRL_DIV256; | 426 | ctrl |= TIMER_CTRL_DIV256; |
422 | } else if (khz * 1000 > 0x10000 * HZ) { | 427 | } else if (rate > 0x10000 * HZ) { |
423 | khz /= 16; | 428 | rate /= 16; |
424 | ctrl |= TIMER_CTRL_DIV16; | 429 | ctrl |= TIMER_CTRL_DIV16; |
425 | } | 430 | } |
426 | 431 | timer_reload = rate / HZ; | |
427 | timer_reload = khz * 1000 / HZ; | ||
428 | writel(ctrl, clkevt_base + TIMER_CTRL); | 432 | writel(ctrl, clkevt_base + TIMER_CTRL); |
429 | 433 | ||
430 | evt->irq = IRQ_TIMERINT1; | ||
431 | evt->mult = div_sc(khz, NSEC_PER_MSEC, evt->shift); | ||
432 | evt->max_delta_ns = clockevent_delta2ns(0xffff, evt); | ||
433 | evt->min_delta_ns = clockevent_delta2ns(0xf, evt); | ||
434 | |||
435 | setup_irq(IRQ_TIMERINT1, &integrator_timer_irq); | 434 | setup_irq(IRQ_TIMERINT1, &integrator_timer_irq); |
436 | clockevents_register_device(evt); | 435 | clockevents_config_and_register(&integrator_clockevent, |
436 | rate, | ||
437 | 1, | ||
438 | 0xffffU); | ||
437 | } | 439 | } |
438 | 440 | ||
439 | /* | 441 | /* |
@@ -441,14 +443,20 @@ static void integrator_clockevent_init(u32 khz) | |||
441 | */ | 443 | */ |
442 | static void __init ap_init_timer(void) | 444 | static void __init ap_init_timer(void) |
443 | { | 445 | { |
444 | u32 khz = TICKS_PER_uSEC * 1000; | 446 | struct clk *clk; |
447 | unsigned long rate; | ||
448 | |||
449 | clk = clk_get_sys("ap_timer", NULL); | ||
450 | BUG_ON(IS_ERR(clk)); | ||
451 | clk_enable(clk); | ||
452 | rate = clk_get_rate(clk); | ||
445 | 453 | ||
446 | writel(0, TIMER0_VA_BASE + TIMER_CTRL); | 454 | writel(0, TIMER0_VA_BASE + TIMER_CTRL); |
447 | writel(0, TIMER1_VA_BASE + TIMER_CTRL); | 455 | writel(0, TIMER1_VA_BASE + TIMER_CTRL); |
448 | writel(0, TIMER2_VA_BASE + TIMER_CTRL); | 456 | writel(0, TIMER2_VA_BASE + TIMER_CTRL); |
449 | 457 | ||
450 | integrator_clocksource_init(khz); | 458 | integrator_clocksource_init(rate); |
451 | integrator_clockevent_init(khz); | 459 | integrator_clockevent_init(rate); |
452 | } | 460 | } |
453 | 461 | ||
454 | static struct sys_timer ap_timer = { | 462 | static struct sys_timer ap_timer = { |
diff --git a/arch/arm/mach-integrator/pci_v3.c b/arch/arm/mach-integrator/pci_v3.c index dd56bfb351e3..11b86e5b71c2 100644 --- a/arch/arm/mach-integrator/pci_v3.c +++ b/arch/arm/mach-integrator/pci_v3.c | |||
@@ -27,7 +27,6 @@ | |||
27 | #include <linux/spinlock.h> | 27 | #include <linux/spinlock.h> |
28 | #include <linux/init.h> | 28 | #include <linux/init.h> |
29 | #include <linux/io.h> | 29 | #include <linux/io.h> |
30 | #include <video/vga.h> | ||
31 | 30 | ||
32 | #include <mach/hardware.h> | 31 | #include <mach/hardware.h> |
33 | #include <mach/platform.h> | 32 | #include <mach/platform.h> |
@@ -505,7 +504,6 @@ void __init pci_v3_preinit(void) | |||
505 | 504 | ||
506 | pcibios_min_io = 0x6000; | 505 | pcibios_min_io = 0x6000; |
507 | pcibios_min_mem = 0x00100000; | 506 | pcibios_min_mem = 0x00100000; |
508 | vga_base = PCI_MEMORY_VADDR; | ||
509 | 507 | ||
510 | /* | 508 | /* |
511 | * Hook in our fault handler for PCI errors | 509 | * Hook in our fault handler for PCI errors |
diff --git a/arch/arm/mach-iop13xx/Makefile.boot b/arch/arm/mach-iop13xx/Makefile.boot index 0b0e19fdfe6c..3a8c38c3189c 100644 --- a/arch/arm/mach-iop13xx/Makefile.boot +++ b/arch/arm/mach-iop13xx/Makefile.boot | |||
@@ -1,3 +1,3 @@ | |||
1 | zreladdr-y := 0x00008000 | 1 | zreladdr-y += 0x00008000 |
2 | params_phys-y := 0x00000100 | 2 | params_phys-y := 0x00000100 |
3 | initrd_phys-y := 0x00800000 | 3 | initrd_phys-y := 0x00800000 |
diff --git a/arch/arm/mach-iop32x/Makefile.boot b/arch/arm/mach-iop32x/Makefile.boot index 47000dccd61f..0a833b11e38c 100644 --- a/arch/arm/mach-iop32x/Makefile.boot +++ b/arch/arm/mach-iop32x/Makefile.boot | |||
@@ -1,3 +1,3 @@ | |||
1 | zreladdr-y := 0xa0008000 | 1 | zreladdr-y += 0xa0008000 |
2 | params_phys-y := 0xa0000100 | 2 | params_phys-y := 0xa0000100 |
3 | initrd_phys-y := 0xa0800000 | 3 | initrd_phys-y := 0xa0800000 |
diff --git a/arch/arm/mach-iop33x/Makefile.boot b/arch/arm/mach-iop33x/Makefile.boot index 67039c3e0c48..760a0efe7580 100644 --- a/arch/arm/mach-iop33x/Makefile.boot +++ b/arch/arm/mach-iop33x/Makefile.boot | |||
@@ -1,3 +1,3 @@ | |||
1 | zreladdr-y := 0x00008000 | 1 | zreladdr-y += 0x00008000 |
2 | params_phys-y := 0x00000100 | 2 | params_phys-y := 0x00000100 |
3 | initrd_phys-y := 0x00800000 | 3 | initrd_phys-y := 0x00800000 |
diff --git a/arch/arm/mach-ixp2000/Makefile.boot b/arch/arm/mach-ixp2000/Makefile.boot index d84c5807a43d..9c7af91d93da 100644 --- a/arch/arm/mach-ixp2000/Makefile.boot +++ b/arch/arm/mach-ixp2000/Makefile.boot | |||
@@ -1,3 +1,3 @@ | |||
1 | zreladdr-y := 0x00008000 | 1 | zreladdr-y += 0x00008000 |
2 | params_phys-y := 0x00000100 | 2 | params_phys-y := 0x00000100 |
3 | 3 | ||
diff --git a/arch/arm/mach-ixp23xx/Makefile.boot b/arch/arm/mach-ixp23xx/Makefile.boot index d5561ad15bad..44fb4a717c3f 100644 --- a/arch/arm/mach-ixp23xx/Makefile.boot +++ b/arch/arm/mach-ixp23xx/Makefile.boot | |||
@@ -1,2 +1,2 @@ | |||
1 | zreladdr-y := 0x00008000 | 1 | zreladdr-y += 0x00008000 |
2 | params_phys-y := 0x00000100 | 2 | params_phys-y := 0x00000100 |
diff --git a/arch/arm/mach-ixp4xx/Makefile.boot b/arch/arm/mach-ixp4xx/Makefile.boot index d84c5807a43d..9c7af91d93da 100644 --- a/arch/arm/mach-ixp4xx/Makefile.boot +++ b/arch/arm/mach-ixp4xx/Makefile.boot | |||
@@ -1,3 +1,3 @@ | |||
1 | zreladdr-y := 0x00008000 | 1 | zreladdr-y += 0x00008000 |
2 | params_phys-y := 0x00000100 | 2 | params_phys-y := 0x00000100 |
3 | 3 | ||
diff --git a/arch/arm/mach-ixp4xx/common-pci.c b/arch/arm/mach-ixp4xx/common-pci.c index 2131832ee6ba..85245e48099c 100644 --- a/arch/arm/mach-ixp4xx/common-pci.c +++ b/arch/arm/mach-ixp4xx/common-pci.c | |||
@@ -397,7 +397,8 @@ void __init ixp4xx_pci_preinit(void) | |||
397 | local_write_config(PCI_BASE_ADDRESS_0, 4, PHYS_OFFSET); | 397 | local_write_config(PCI_BASE_ADDRESS_0, 4, PHYS_OFFSET); |
398 | local_write_config(PCI_BASE_ADDRESS_1, 4, PHYS_OFFSET + SZ_16M); | 398 | local_write_config(PCI_BASE_ADDRESS_1, 4, PHYS_OFFSET + SZ_16M); |
399 | local_write_config(PCI_BASE_ADDRESS_2, 4, PHYS_OFFSET + SZ_32M); | 399 | local_write_config(PCI_BASE_ADDRESS_2, 4, PHYS_OFFSET + SZ_32M); |
400 | local_write_config(PCI_BASE_ADDRESS_3, 4, PHYS_OFFSET + SZ_48M); | 400 | local_write_config(PCI_BASE_ADDRESS_3, 4, |
401 | PHYS_OFFSET + SZ_32M + SZ_16M); | ||
401 | 402 | ||
402 | /* | 403 | /* |
403 | * Enable CSR window at 64 MiB to allow PCI masters | 404 | * Enable CSR window at 64 MiB to allow PCI masters |
diff --git a/arch/arm/mach-ixp4xx/include/mach/io.h b/arch/arm/mach-ixp4xx/include/mach/io.h index 57b5410c31f4..ffb9d6afb89f 100644 --- a/arch/arm/mach-ixp4xx/include/mach/io.h +++ b/arch/arm/mach-ixp4xx/include/mach/io.h | |||
@@ -17,8 +17,6 @@ | |||
17 | 17 | ||
18 | #include <mach/hardware.h> | 18 | #include <mach/hardware.h> |
19 | 19 | ||
20 | #define IO_SPACE_LIMIT 0x0000ffff | ||
21 | |||
22 | extern int (*ixp4xx_pci_read)(u32 addr, u32 cmd, u32* data); | 20 | extern int (*ixp4xx_pci_read)(u32 addr, u32 cmd, u32* data); |
23 | extern int ixp4xx_pci_write(u32 addr, u32 cmd, u32 data); | 21 | extern int ixp4xx_pci_write(u32 addr, u32 cmd, u32 data); |
24 | 22 | ||
diff --git a/arch/arm/mach-kirkwood/Makefile.boot b/arch/arm/mach-kirkwood/Makefile.boot index 67039c3e0c48..760a0efe7580 100644 --- a/arch/arm/mach-kirkwood/Makefile.boot +++ b/arch/arm/mach-kirkwood/Makefile.boot | |||
@@ -1,3 +1,3 @@ | |||
1 | zreladdr-y := 0x00008000 | 1 | zreladdr-y += 0x00008000 |
2 | params_phys-y := 0x00000100 | 2 | params_phys-y := 0x00000100 |
3 | initrd_phys-y := 0x00800000 | 3 | initrd_phys-y := 0x00800000 |
diff --git a/arch/arm/mach-ks8695/Makefile.boot b/arch/arm/mach-ks8695/Makefile.boot index 48eb2cb3ac77..c9b0bebcf237 100644 --- a/arch/arm/mach-ks8695/Makefile.boot +++ b/arch/arm/mach-ks8695/Makefile.boot | |||
@@ -3,6 +3,6 @@ | |||
3 | # PARAMS_PHYS must be within 4MB of ZRELADDR | 3 | # PARAMS_PHYS must be within 4MB of ZRELADDR |
4 | # INITRD_PHYS must be in RAM | 4 | # INITRD_PHYS must be in RAM |
5 | 5 | ||
6 | zreladdr-y := 0x00008000 | 6 | zreladdr-y += 0x00008000 |
7 | params_phys-y := 0x00000100 | 7 | params_phys-y := 0x00000100 |
8 | initrd_phys-y := 0x00800000 | 8 | initrd_phys-y := 0x00800000 |
diff --git a/arch/arm/mach-lpc32xx/Makefile.boot b/arch/arm/mach-lpc32xx/Makefile.boot index b796b41ebf8f..2cfe0ee635c5 100644 --- a/arch/arm/mach-lpc32xx/Makefile.boot +++ b/arch/arm/mach-lpc32xx/Makefile.boot | |||
@@ -1,4 +1,4 @@ | |||
1 | zreladdr-y := 0x80008000 | 1 | zreladdr-y += 0x80008000 |
2 | params_phys-y := 0x80000100 | 2 | params_phys-y := 0x80000100 |
3 | initrd_phys-y := 0x82000000 | 3 | initrd_phys-y := 0x82000000 |
4 | 4 | ||
diff --git a/arch/arm/mach-mmp/Makefile.boot b/arch/arm/mach-mmp/Makefile.boot index 574a4aa8321a..5edf03e2beed 100644 --- a/arch/arm/mach-mmp/Makefile.boot +++ b/arch/arm/mach-mmp/Makefile.boot | |||
@@ -1 +1 @@ | |||
zreladdr-y := 0x00008000 | zreladdr-y += 0x00008000 | ||
diff --git a/arch/arm/mach-mmp/aspenite.c b/arch/arm/mach-mmp/aspenite.c index 06b5fa853c93..49c5d6d843d6 100644 --- a/arch/arm/mach-mmp/aspenite.c +++ b/arch/arm/mach-mmp/aspenite.c | |||
@@ -160,7 +160,7 @@ static struct mtd_partition aspenite_nand_partitions[] = { | |||
160 | }, { | 160 | }, { |
161 | .name = "filesystem", | 161 | .name = "filesystem", |
162 | .offset = MTDPART_OFS_APPEND, | 162 | .offset = MTDPART_OFS_APPEND, |
163 | .size = SZ_48M, | 163 | .size = SZ_32M + SZ_16M, |
164 | .mask_flags = 0, | 164 | .mask_flags = 0, |
165 | } | 165 | } |
166 | }; | 166 | }; |
diff --git a/arch/arm/mach-mmp/ttc_dkb.c b/arch/arm/mach-mmp/ttc_dkb.c index 6bd37a27e5fc..176515a76989 100644 --- a/arch/arm/mach-mmp/ttc_dkb.c +++ b/arch/arm/mach-mmp/ttc_dkb.c | |||
@@ -93,7 +93,7 @@ static struct mtd_partition ttc_dkb_onenand_partitions[] = { | |||
93 | }, { | 93 | }, { |
94 | .name = "filesystem", | 94 | .name = "filesystem", |
95 | .offset = MTDPART_OFS_APPEND, | 95 | .offset = MTDPART_OFS_APPEND, |
96 | .size = SZ_48M, | 96 | .size = SZ_32M + SZ_16M, |
97 | .mask_flags = 0, | 97 | .mask_flags = 0, |
98 | } | 98 | } |
99 | }; | 99 | }; |
diff --git a/arch/arm/mach-msm/Makefile.boot b/arch/arm/mach-msm/Makefile.boot index 24dfbf8c07c4..9b803a578b4d 100644 --- a/arch/arm/mach-msm/Makefile.boot +++ b/arch/arm/mach-msm/Makefile.boot | |||
@@ -1,3 +1,3 @@ | |||
1 | zreladdr-y := 0x10008000 | 1 | zreladdr-y += 0x10008000 |
2 | params_phys-y := 0x10000100 | 2 | params_phys-y := 0x10000100 |
3 | initrd_phys-y := 0x10800000 | 3 | initrd_phys-y := 0x10800000 |
diff --git a/arch/arm/mach-msm/board-halibut.c b/arch/arm/mach-msm/board-halibut.c index 18a3c97bc863..f81ef1f9d46f 100644 --- a/arch/arm/mach-msm/board-halibut.c +++ b/arch/arm/mach-msm/board-halibut.c | |||
@@ -78,8 +78,8 @@ static void __init halibut_init(void) | |||
78 | platform_add_devices(devices, ARRAY_SIZE(devices)); | 78 | platform_add_devices(devices, ARRAY_SIZE(devices)); |
79 | } | 79 | } |
80 | 80 | ||
81 | static void __init halibut_fixup(struct machine_desc *desc, struct tag *tags, | 81 | static void __init halibut_fixup(struct tag *tags, char **cmdline, |
82 | char **cmdline, struct meminfo *mi) | 82 | struct meminfo *mi) |
83 | { | 83 | { |
84 | mi->nr_banks=1; | 84 | mi->nr_banks=1; |
85 | mi->bank[0].start = PHYS_OFFSET; | 85 | mi->bank[0].start = PHYS_OFFSET; |
diff --git a/arch/arm/mach-msm/board-mahimahi.c b/arch/arm/mach-msm/board-mahimahi.c index 7a9a03eb189c..1df15aa3c66d 100644 --- a/arch/arm/mach-msm/board-mahimahi.c +++ b/arch/arm/mach-msm/board-mahimahi.c | |||
@@ -53,8 +53,8 @@ static void __init mahimahi_init(void) | |||
53 | platform_add_devices(devices, ARRAY_SIZE(devices)); | 53 | platform_add_devices(devices, ARRAY_SIZE(devices)); |
54 | } | 54 | } |
55 | 55 | ||
56 | static void __init mahimahi_fixup(struct machine_desc *desc, struct tag *tags, | 56 | static void __init mahimahi_fixup(struct tag *tags, char **cmdline, |
57 | char **cmdline, struct meminfo *mi) | 57 | struct meminfo *mi) |
58 | { | 58 | { |
59 | mi->nr_banks = 2; | 59 | mi->nr_banks = 2; |
60 | mi->bank[0].start = PHYS_OFFSET; | 60 | mi->bank[0].start = PHYS_OFFSET; |
diff --git a/arch/arm/mach-msm/board-msm7x30.c b/arch/arm/mach-msm/board-msm7x30.c index b7a84966b711..d1e4cc83b1e6 100644 --- a/arch/arm/mach-msm/board-msm7x30.c +++ b/arch/arm/mach-msm/board-msm7x30.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/smsc911x.h> | 24 | #include <linux/smsc911x.h> |
25 | #include <linux/usb/msm_hsusb.h> | 25 | #include <linux/usb/msm_hsusb.h> |
26 | #include <linux/clkdev.h> | 26 | #include <linux/clkdev.h> |
27 | #include <linux/memblock.h> | ||
27 | 28 | ||
28 | #include <asm/mach-types.h> | 29 | #include <asm/mach-types.h> |
29 | #include <asm/mach/arch.h> | 30 | #include <asm/mach/arch.h> |
@@ -42,6 +43,21 @@ | |||
42 | 43 | ||
43 | extern struct sys_timer msm_timer; | 44 | extern struct sys_timer msm_timer; |
44 | 45 | ||
46 | static void __init msm7x30_fixup(struct machine_desc *desc, struct tag *tag, | ||
47 | char **cmdline, struct meminfo *mi) | ||
48 | { | ||
49 | for (; tag->hdr.size; tag = tag_next(tag)) | ||
50 | if (tag->hdr.tag == ATAG_MEM && tag->u.mem.start == 0x200000) { | ||
51 | tag->u.mem.start = 0; | ||
52 | tag->u.mem.size += SZ_2M; | ||
53 | } | ||
54 | } | ||
55 | |||
56 | static void __init msm7x30_reserve(void) | ||
57 | { | ||
58 | memblock_remove(0x0, SZ_2M); | ||
59 | } | ||
60 | |||
45 | static int hsusb_phy_init_seq[] = { | 61 | static int hsusb_phy_init_seq[] = { |
46 | 0x30, 0x32, /* Enable and set Pre-Emphasis Depth to 20% */ | 62 | 0x30, 0x32, /* Enable and set Pre-Emphasis Depth to 20% */ |
47 | 0x02, 0x36, /* Disable CDR Auto Reset feature */ | 63 | 0x02, 0x36, /* Disable CDR Auto Reset feature */ |
@@ -107,6 +123,8 @@ static void __init msm7x30_map_io(void) | |||
107 | 123 | ||
108 | MACHINE_START(MSM7X30_SURF, "QCT MSM7X30 SURF") | 124 | MACHINE_START(MSM7X30_SURF, "QCT MSM7X30 SURF") |
109 | .boot_params = PLAT_PHYS_OFFSET + 0x100, | 125 | .boot_params = PLAT_PHYS_OFFSET + 0x100, |
126 | .fixup = msm7x30_fixup, | ||
127 | .reserve = msm7x30_reserve, | ||
110 | .map_io = msm7x30_map_io, | 128 | .map_io = msm7x30_map_io, |
111 | .init_irq = msm7x30_init_irq, | 129 | .init_irq = msm7x30_init_irq, |
112 | .init_machine = msm7x30_init, | 130 | .init_machine = msm7x30_init, |
@@ -115,6 +133,8 @@ MACHINE_END | |||
115 | 133 | ||
116 | MACHINE_START(MSM7X30_FFA, "QCT MSM7X30 FFA") | 134 | MACHINE_START(MSM7X30_FFA, "QCT MSM7X30 FFA") |
117 | .boot_params = PLAT_PHYS_OFFSET + 0x100, | 135 | .boot_params = PLAT_PHYS_OFFSET + 0x100, |
136 | .fixup = msm7x30_fixup, | ||
137 | .reserve = msm7x30_reserve, | ||
118 | .map_io = msm7x30_map_io, | 138 | .map_io = msm7x30_map_io, |
119 | .init_irq = msm7x30_init_irq, | 139 | .init_irq = msm7x30_init_irq, |
120 | .init_machine = msm7x30_init, | 140 | .init_machine = msm7x30_init, |
@@ -123,6 +143,8 @@ MACHINE_END | |||
123 | 143 | ||
124 | MACHINE_START(MSM7X30_FLUID, "QCT MSM7X30 FLUID") | 144 | MACHINE_START(MSM7X30_FLUID, "QCT MSM7X30 FLUID") |
125 | .boot_params = PLAT_PHYS_OFFSET + 0x100, | 145 | .boot_params = PLAT_PHYS_OFFSET + 0x100, |
146 | .fixup = msm7x30_fixup, | ||
147 | .reserve = msm7x30_reserve, | ||
126 | .map_io = msm7x30_map_io, | 148 | .map_io = msm7x30_map_io, |
127 | .init_irq = msm7x30_init_irq, | 149 | .init_irq = msm7x30_init_irq, |
128 | .init_machine = msm7x30_init, | 150 | .init_machine = msm7x30_init, |
diff --git a/arch/arm/mach-msm/board-msm8960.c b/arch/arm/mach-msm/board-msm8960.c index 35c7ceeb3f29..b04468e7d00e 100644 --- a/arch/arm/mach-msm/board-msm8960.c +++ b/arch/arm/mach-msm/board-msm8960.c | |||
@@ -20,16 +20,34 @@ | |||
20 | #include <linux/io.h> | 20 | #include <linux/io.h> |
21 | #include <linux/irq.h> | 21 | #include <linux/irq.h> |
22 | #include <linux/clkdev.h> | 22 | #include <linux/clkdev.h> |
23 | #include <linux/memblock.h> | ||
23 | 24 | ||
24 | #include <asm/mach-types.h> | 25 | #include <asm/mach-types.h> |
25 | #include <asm/mach/arch.h> | 26 | #include <asm/mach/arch.h> |
26 | #include <asm/hardware/gic.h> | 27 | #include <asm/hardware/gic.h> |
28 | #include <asm/setup.h> | ||
27 | 29 | ||
28 | #include <mach/board.h> | 30 | #include <mach/board.h> |
29 | #include <mach/msm_iomap.h> | 31 | #include <mach/msm_iomap.h> |
30 | 32 | ||
31 | #include "devices.h" | 33 | #include "devices.h" |
32 | 34 | ||
35 | static void __init msm8960_fixup(struct machine_desc *desc, struct tag *tag, | ||
36 | char **cmdline, struct meminfo *mi) | ||
37 | { | ||
38 | for (; tag->hdr.size; tag = tag_next(tag)) | ||
39 | if (tag->hdr.tag == ATAG_MEM && | ||
40 | tag->u.mem.start == 0x40200000) { | ||
41 | tag->u.mem.start = 0x40000000; | ||
42 | tag->u.mem.size += SZ_2M; | ||
43 | } | ||
44 | } | ||
45 | |||
46 | static void __init msm8960_reserve(void) | ||
47 | { | ||
48 | memblock_remove(0x40000000, SZ_2M); | ||
49 | } | ||
50 | |||
33 | static void __init msm8960_map_io(void) | 51 | static void __init msm8960_map_io(void) |
34 | { | 52 | { |
35 | msm_map_msm8960_io(); | 53 | msm_map_msm8960_io(); |
@@ -76,6 +94,8 @@ static void __init msm8960_rumi3_init(void) | |||
76 | } | 94 | } |
77 | 95 | ||
78 | MACHINE_START(MSM8960_SIM, "QCT MSM8960 SIMULATOR") | 96 | MACHINE_START(MSM8960_SIM, "QCT MSM8960 SIMULATOR") |
97 | .fixup = msm8960_fixup, | ||
98 | .reserve = msm8960_reserve, | ||
79 | .map_io = msm8960_map_io, | 99 | .map_io = msm8960_map_io, |
80 | .init_irq = msm8960_init_irq, | 100 | .init_irq = msm8960_init_irq, |
81 | .timer = &msm_timer, | 101 | .timer = &msm_timer, |
@@ -83,6 +103,8 @@ MACHINE_START(MSM8960_SIM, "QCT MSM8960 SIMULATOR") | |||
83 | MACHINE_END | 103 | MACHINE_END |
84 | 104 | ||
85 | MACHINE_START(MSM8960_RUMI3, "QCT MSM8960 RUMI3") | 105 | MACHINE_START(MSM8960_RUMI3, "QCT MSM8960 RUMI3") |
106 | .fixup = msm8960_fixup, | ||
107 | .reserve = msm8960_reserve, | ||
86 | .map_io = msm8960_map_io, | 108 | .map_io = msm8960_map_io, |
87 | .init_irq = msm8960_init_irq, | 109 | .init_irq = msm8960_init_irq, |
88 | .timer = &msm_timer, | 110 | .timer = &msm_timer, |
diff --git a/arch/arm/mach-msm/board-msm8x60.c b/arch/arm/mach-msm/board-msm8x60.c index 1163b6fd05d2..9221f54778be 100644 --- a/arch/arm/mach-msm/board-msm8x60.c +++ b/arch/arm/mach-msm/board-msm8x60.c | |||
@@ -20,14 +20,31 @@ | |||
20 | #include <linux/platform_device.h> | 20 | #include <linux/platform_device.h> |
21 | #include <linux/io.h> | 21 | #include <linux/io.h> |
22 | #include <linux/irq.h> | 22 | #include <linux/irq.h> |
23 | #include <linux/memblock.h> | ||
23 | 24 | ||
24 | #include <asm/mach-types.h> | 25 | #include <asm/mach-types.h> |
25 | #include <asm/mach/arch.h> | 26 | #include <asm/mach/arch.h> |
26 | #include <asm/hardware/gic.h> | 27 | #include <asm/hardware/gic.h> |
28 | #include <asm/setup.h> | ||
27 | 29 | ||
28 | #include <mach/board.h> | 30 | #include <mach/board.h> |
29 | #include <mach/msm_iomap.h> | 31 | #include <mach/msm_iomap.h> |
30 | 32 | ||
33 | static void __init msm8x60_fixup(struct machine_desc *desc, struct tag *tag, | ||
34 | char **cmdline, struct meminfo *mi) | ||
35 | { | ||
36 | for (; tag->hdr.size; tag = tag_next(tag)) | ||
37 | if (tag->hdr.tag == ATAG_MEM && | ||
38 | tag->u.mem.start == 0x40200000) { | ||
39 | tag->u.mem.start = 0x40000000; | ||
40 | tag->u.mem.size += SZ_2M; | ||
41 | } | ||
42 | } | ||
43 | |||
44 | static void __init msm8x60_reserve(void) | ||
45 | { | ||
46 | memblock_remove(0x40000000, SZ_2M); | ||
47 | } | ||
31 | 48 | ||
32 | static void __init msm8x60_map_io(void) | 49 | static void __init msm8x60_map_io(void) |
33 | { | 50 | { |
@@ -65,6 +82,8 @@ static void __init msm8x60_init(void) | |||
65 | } | 82 | } |
66 | 83 | ||
67 | MACHINE_START(MSM8X60_RUMI3, "QCT MSM8X60 RUMI3") | 84 | MACHINE_START(MSM8X60_RUMI3, "QCT MSM8X60 RUMI3") |
85 | .fixup = msm8x60_fixup, | ||
86 | .reserve = msm8x60_reserve, | ||
68 | .map_io = msm8x60_map_io, | 87 | .map_io = msm8x60_map_io, |
69 | .init_irq = msm8x60_init_irq, | 88 | .init_irq = msm8x60_init_irq, |
70 | .init_machine = msm8x60_init, | 89 | .init_machine = msm8x60_init, |
@@ -72,6 +91,8 @@ MACHINE_START(MSM8X60_RUMI3, "QCT MSM8X60 RUMI3") | |||
72 | MACHINE_END | 91 | MACHINE_END |
73 | 92 | ||
74 | MACHINE_START(MSM8X60_SURF, "QCT MSM8X60 SURF") | 93 | MACHINE_START(MSM8X60_SURF, "QCT MSM8X60 SURF") |
94 | .fixup = msm8x60_fixup, | ||
95 | .reserve = msm8x60_reserve, | ||
75 | .map_io = msm8x60_map_io, | 96 | .map_io = msm8x60_map_io, |
76 | .init_irq = msm8x60_init_irq, | 97 | .init_irq = msm8x60_init_irq, |
77 | .init_machine = msm8x60_init, | 98 | .init_machine = msm8x60_init, |
@@ -79,6 +100,8 @@ MACHINE_START(MSM8X60_SURF, "QCT MSM8X60 SURF") | |||
79 | MACHINE_END | 100 | MACHINE_END |
80 | 101 | ||
81 | MACHINE_START(MSM8X60_SIM, "QCT MSM8X60 SIMULATOR") | 102 | MACHINE_START(MSM8X60_SIM, "QCT MSM8X60 SIMULATOR") |
103 | .fixup = msm8x60_fixup, | ||
104 | .reserve = msm8x60_reserve, | ||
82 | .map_io = msm8x60_map_io, | 105 | .map_io = msm8x60_map_io, |
83 | .init_irq = msm8x60_init_irq, | 106 | .init_irq = msm8x60_init_irq, |
84 | .init_machine = msm8x60_init, | 107 | .init_machine = msm8x60_init, |
@@ -86,6 +109,8 @@ MACHINE_START(MSM8X60_SIM, "QCT MSM8X60 SIMULATOR") | |||
86 | MACHINE_END | 109 | MACHINE_END |
87 | 110 | ||
88 | MACHINE_START(MSM8X60_FFA, "QCT MSM8X60 FFA") | 111 | MACHINE_START(MSM8X60_FFA, "QCT MSM8X60 FFA") |
112 | .fixup = msm8x60_fixup, | ||
113 | .reserve = msm8x60_reserve, | ||
89 | .map_io = msm8x60_map_io, | 114 | .map_io = msm8x60_map_io, |
90 | .init_irq = msm8x60_init_irq, | 115 | .init_irq = msm8x60_init_irq, |
91 | .init_machine = msm8x60_init, | 116 | .init_machine = msm8x60_init, |
diff --git a/arch/arm/mach-msm/board-sapphire.c b/arch/arm/mach-msm/board-sapphire.c index 68f930f07d77..c6e043c896aa 100644 --- a/arch/arm/mach-msm/board-sapphire.c +++ b/arch/arm/mach-msm/board-sapphire.c | |||
@@ -77,8 +77,8 @@ static struct map_desc sapphire_io_desc[] __initdata = { | |||
77 | } | 77 | } |
78 | }; | 78 | }; |
79 | 79 | ||
80 | static void __init sapphire_fixup(struct machine_desc *desc, struct tag *tags, | 80 | static void __init sapphire_fixup(struct tag *tags, char **cmdline, |
81 | char **cmdline, struct meminfo *mi) | 81 | struct meminfo *mi) |
82 | { | 82 | { |
83 | int smi_sz = parse_tag_smi((const struct tag *)tags); | 83 | int smi_sz = parse_tag_smi((const struct tag *)tags); |
84 | 84 | ||
diff --git a/arch/arm/mach-msm/board-trout.c b/arch/arm/mach-msm/board-trout.c index 814386772c66..7acd2021ada9 100644 --- a/arch/arm/mach-msm/board-trout.c +++ b/arch/arm/mach-msm/board-trout.c | |||
@@ -48,8 +48,8 @@ static void __init trout_init_irq(void) | |||
48 | msm_init_irq(); | 48 | msm_init_irq(); |
49 | } | 49 | } |
50 | 50 | ||
51 | static void __init trout_fixup(struct machine_desc *desc, struct tag *tags, | 51 | static void __init trout_fixup(struct tag *tags, char **cmdline, |
52 | char **cmdline, struct meminfo *mi) | 52 | struct meminfo *mi) |
53 | { | 53 | { |
54 | mi->nr_banks = 1; | 54 | mi->nr_banks = 1; |
55 | mi->bank[0].start = PHYS_OFFSET; | 55 | mi->bank[0].start = PHYS_OFFSET; |
diff --git a/arch/arm/mach-msm/include/mach/memory.h b/arch/arm/mach-msm/include/mach/memory.h index f2f8d299ba95..58d5e7eec431 100644 --- a/arch/arm/mach-msm/include/mach/memory.h +++ b/arch/arm/mach-msm/include/mach/memory.h | |||
@@ -22,11 +22,11 @@ | |||
22 | #elif defined(CONFIG_ARCH_QSD8X50) | 22 | #elif defined(CONFIG_ARCH_QSD8X50) |
23 | #define PLAT_PHYS_OFFSET UL(0x20000000) | 23 | #define PLAT_PHYS_OFFSET UL(0x20000000) |
24 | #elif defined(CONFIG_ARCH_MSM7X30) | 24 | #elif defined(CONFIG_ARCH_MSM7X30) |
25 | #define PLAT_PHYS_OFFSET UL(0x00200000) | 25 | #define PLAT_PHYS_OFFSET UL(0x00000000) |
26 | #elif defined(CONFIG_ARCH_MSM8X60) | 26 | #elif defined(CONFIG_ARCH_MSM8X60) |
27 | #define PLAT_PHYS_OFFSET UL(0x40200000) | 27 | #define PLAT_PHYS_OFFSET UL(0x40000000) |
28 | #elif defined(CONFIG_ARCH_MSM8960) | 28 | #elif defined(CONFIG_ARCH_MSM8960) |
29 | #define PLAT_PHYS_OFFSET UL(0x40200000) | 29 | #define PLAT_PHYS_OFFSET UL(0x40000000) |
30 | #else | 30 | #else |
31 | #define PLAT_PHYS_OFFSET UL(0x10000000) | 31 | #define PLAT_PHYS_OFFSET UL(0x10000000) |
32 | #endif | 32 | #endif |
diff --git a/arch/arm/mach-msm/platsmp.c b/arch/arm/mach-msm/platsmp.c index 1a1af9e56250..727659520912 100644 --- a/arch/arm/mach-msm/platsmp.c +++ b/arch/arm/mach-msm/platsmp.c | |||
@@ -156,6 +156,12 @@ void __init smp_init_cpus(void) | |||
156 | { | 156 | { |
157 | unsigned int i, ncores = get_core_count(); | 157 | unsigned int i, ncores = get_core_count(); |
158 | 158 | ||
159 | if (ncores > nr_cpu_ids) { | ||
160 | pr_warn("SMP: %u cores greater than maximum (%u), clipping\n", | ||
161 | ncores, nr_cpu_ids); | ||
162 | ncores = nr_cpu_ids; | ||
163 | } | ||
164 | |||
159 | for (i = 0; i < ncores; i++) | 165 | for (i = 0; i < ncores; i++) |
160 | set_cpu_possible(i, true); | 166 | set_cpu_possible(i, true); |
161 | 167 | ||
diff --git a/arch/arm/mach-mv78xx0/Makefile.boot b/arch/arm/mach-mv78xx0/Makefile.boot index 67039c3e0c48..760a0efe7580 100644 --- a/arch/arm/mach-mv78xx0/Makefile.boot +++ b/arch/arm/mach-mv78xx0/Makefile.boot | |||
@@ -1,3 +1,3 @@ | |||
1 | zreladdr-y := 0x00008000 | 1 | zreladdr-y += 0x00008000 |
2 | params_phys-y := 0x00000100 | 2 | params_phys-y := 0x00000100 |
3 | initrd_phys-y := 0x00800000 | 3 | initrd_phys-y := 0x00800000 |
diff --git a/arch/arm/mach-mx5/Makefile.boot b/arch/arm/mach-mx5/Makefile.boot index e928be1b6757..ca207ca305ec 100644 --- a/arch/arm/mach-mx5/Makefile.boot +++ b/arch/arm/mach-mx5/Makefile.boot | |||
@@ -1,9 +1,9 @@ | |||
1 | zreladdr-$(CONFIG_ARCH_MX50) := 0x70008000 | 1 | zreladdr-$(CONFIG_ARCH_MX50) += 0x70008000 |
2 | params_phys-$(CONFIG_ARCH_MX50) := 0x70000100 | 2 | params_phys-$(CONFIG_ARCH_MX50) := 0x70000100 |
3 | initrd_phys-$(CONFIG_ARCH_MX50) := 0x70800000 | 3 | initrd_phys-$(CONFIG_ARCH_MX50) := 0x70800000 |
4 | zreladdr-$(CONFIG_ARCH_MX51) := 0x90008000 | 4 | zreladdr-$(CONFIG_ARCH_MX51) += 0x90008000 |
5 | params_phys-$(CONFIG_ARCH_MX51) := 0x90000100 | 5 | params_phys-$(CONFIG_ARCH_MX51) := 0x90000100 |
6 | initrd_phys-$(CONFIG_ARCH_MX51) := 0x90800000 | 6 | initrd_phys-$(CONFIG_ARCH_MX51) := 0x90800000 |
7 | zreladdr-$(CONFIG_ARCH_MX53) := 0x70008000 | 7 | zreladdr-$(CONFIG_ARCH_MX53) += 0x70008000 |
8 | params_phys-$(CONFIG_ARCH_MX53) := 0x70000100 | 8 | params_phys-$(CONFIG_ARCH_MX53) := 0x70000100 |
9 | initrd_phys-$(CONFIG_ARCH_MX53) := 0x70800000 | 9 | initrd_phys-$(CONFIG_ARCH_MX53) := 0x70800000 |
diff --git a/arch/arm/mach-mxs/Makefile.boot b/arch/arm/mach-mxs/Makefile.boot index eb541e0291da..07b11fe6453f 100644 --- a/arch/arm/mach-mxs/Makefile.boot +++ b/arch/arm/mach-mxs/Makefile.boot | |||
@@ -1 +1 @@ | |||
zreladdr-y := 0x40008000 | zreladdr-y += 0x40008000 | ||
diff --git a/arch/arm/mach-netx/Makefile.boot b/arch/arm/mach-netx/Makefile.boot index b81cf6aff0ac..534a4d27055e 100644 --- a/arch/arm/mach-netx/Makefile.boot +++ b/arch/arm/mach-netx/Makefile.boot | |||
@@ -1,2 +1,2 @@ | |||
1 | zreladdr-y := 0x80008000 | 1 | zreladdr-y += 0x80008000 |
2 | 2 | ||
diff --git a/arch/arm/mach-nomadik/Makefile.boot b/arch/arm/mach-nomadik/Makefile.boot index c7e75acfe6c9..ff0a4b5b0a82 100644 --- a/arch/arm/mach-nomadik/Makefile.boot +++ b/arch/arm/mach-nomadik/Makefile.boot | |||
@@ -1,4 +1,4 @@ | |||
1 | zreladdr-y := 0x00008000 | 1 | zreladdr-y += 0x00008000 |
2 | params_phys-y := 0x00000100 | 2 | params_phys-y := 0x00000100 |
3 | initrd_phys-y := 0x00800000 | 3 | initrd_phys-y := 0x00800000 |
4 | 4 | ||
diff --git a/arch/arm/mach-nuc93x/Makefile.boot b/arch/arm/mach-nuc93x/Makefile.boot index a057b546b6e5..6c3d421c2d11 100644 --- a/arch/arm/mach-nuc93x/Makefile.boot +++ b/arch/arm/mach-nuc93x/Makefile.boot | |||
@@ -1,3 +1,3 @@ | |||
1 | zreladdr-y := 0x00008000 | 1 | zreladdr-y += 0x00008000 |
2 | params_phys-y := 0x00000100 | 2 | params_phys-y := 0x00000100 |
3 | 3 | ||
diff --git a/arch/arm/mach-omap1/Makefile.boot b/arch/arm/mach-omap1/Makefile.boot index 292d56c5a888..13bda8dbd604 100644 --- a/arch/arm/mach-omap1/Makefile.boot +++ b/arch/arm/mach-omap1/Makefile.boot | |||
@@ -1,3 +1,3 @@ | |||
1 | zreladdr-y := 0x10008000 | 1 | zreladdr-y += 0x10008000 |
2 | params_phys-y := 0x10000100 | 2 | params_phys-y := 0x10000100 |
3 | initrd_phys-y := 0x10800000 | 3 | initrd_phys-y := 0x10800000 |
diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig index 57b66d590c52..89bfb49389f2 100644 --- a/arch/arm/mach-omap2/Kconfig +++ b/arch/arm/mach-omap2/Kconfig | |||
@@ -36,6 +36,7 @@ config ARCH_OMAP3 | |||
36 | select ARM_L1_CACHE_SHIFT_6 if !ARCH_OMAP4 | 36 | select ARM_L1_CACHE_SHIFT_6 if !ARCH_OMAP4 |
37 | select ARCH_HAS_OPP | 37 | select ARCH_HAS_OPP |
38 | select PM_OPP if PM | 38 | select PM_OPP if PM |
39 | select ARM_CPU_SUSPEND if PM | ||
39 | 40 | ||
40 | config ARCH_OMAP4 | 41 | config ARCH_OMAP4 |
41 | bool "TI OMAP4" | 42 | bool "TI OMAP4" |
@@ -50,6 +51,7 @@ config ARCH_OMAP4 | |||
50 | select ARCH_HAS_OPP | 51 | select ARCH_HAS_OPP |
51 | select PM_OPP if PM | 52 | select PM_OPP if PM |
52 | select USB_ARCH_HAS_EHCI | 53 | select USB_ARCH_HAS_EHCI |
54 | select ARM_CPU_SUSPEND if PM | ||
53 | 55 | ||
54 | comment "OMAP Core Type" | 56 | comment "OMAP Core Type" |
55 | depends on ARCH_OMAP2 | 57 | depends on ARCH_OMAP2 |
diff --git a/arch/arm/mach-omap2/Makefile.boot b/arch/arm/mach-omap2/Makefile.boot index 565aff7f37a9..b03e562acc60 100644 --- a/arch/arm/mach-omap2/Makefile.boot +++ b/arch/arm/mach-omap2/Makefile.boot | |||
@@ -1,3 +1,3 @@ | |||
1 | zreladdr-y := 0x80008000 | 1 | zreladdr-y += 0x80008000 |
2 | params_phys-y := 0x80000100 | 2 | params_phys-y := 0x80000100 |
3 | initrd_phys-y := 0x80800000 | 3 | initrd_phys-y := 0x80800000 |
diff --git a/arch/arm/mach-omap2/board-2430sdp.c b/arch/arm/mach-omap2/board-2430sdp.c index 2028464cf5b9..f79b7d2a8ed4 100644 --- a/arch/arm/mach-omap2/board-2430sdp.c +++ b/arch/arm/mach-omap2/board-2430sdp.c | |||
@@ -193,7 +193,8 @@ static int __init omap2430_i2c_init(void) | |||
193 | { | 193 | { |
194 | omap_register_i2c_bus(1, 100, sdp2430_i2c1_boardinfo, | 194 | omap_register_i2c_bus(1, 100, sdp2430_i2c1_boardinfo, |
195 | ARRAY_SIZE(sdp2430_i2c1_boardinfo)); | 195 | ARRAY_SIZE(sdp2430_i2c1_boardinfo)); |
196 | omap2_pmic_init("twl4030", &sdp2430_twldata); | 196 | omap_pmic_init(2, 100, "twl4030", INT_24XX_SYS_NIRQ, |
197 | &sdp2430_twldata); | ||
197 | return 0; | 198 | return 0; |
198 | } | 199 | } |
199 | 200 | ||
diff --git a/arch/arm/mach-omap2/hsmmc.c b/arch/arm/mach-omap2/hsmmc.c index a9b45c76e1d3..097a42d81e59 100644 --- a/arch/arm/mach-omap2/hsmmc.c +++ b/arch/arm/mach-omap2/hsmmc.c | |||
@@ -137,8 +137,7 @@ static void omap4_hsmmc1_before_set_reg(struct device *dev, int slot, | |||
137 | */ | 137 | */ |
138 | reg = omap4_ctrl_pad_readl(control_pbias_offset); | 138 | reg = omap4_ctrl_pad_readl(control_pbias_offset); |
139 | reg &= ~(OMAP4_MMC1_PBIASLITE_PWRDNZ_MASK | | 139 | reg &= ~(OMAP4_MMC1_PBIASLITE_PWRDNZ_MASK | |
140 | OMAP4_MMC1_PWRDNZ_MASK | | 140 | OMAP4_MMC1_PWRDNZ_MASK); |
141 | OMAP4_USBC1_ICUSB_PWRDNZ_MASK); | ||
142 | omap4_ctrl_pad_writel(reg, control_pbias_offset); | 141 | omap4_ctrl_pad_writel(reg, control_pbias_offset); |
143 | } | 142 | } |
144 | 143 | ||
@@ -156,8 +155,7 @@ static void omap4_hsmmc1_after_set_reg(struct device *dev, int slot, | |||
156 | else | 155 | else |
157 | reg |= OMAP4_MMC1_PBIASLITE_VMODE_MASK; | 156 | reg |= OMAP4_MMC1_PBIASLITE_VMODE_MASK; |
158 | reg |= (OMAP4_MMC1_PBIASLITE_PWRDNZ_MASK | | 157 | reg |= (OMAP4_MMC1_PBIASLITE_PWRDNZ_MASK | |
159 | OMAP4_MMC1_PWRDNZ_MASK | | 158 | OMAP4_MMC1_PWRDNZ_MASK); |
160 | OMAP4_USBC1_ICUSB_PWRDNZ_MASK); | ||
161 | omap4_ctrl_pad_writel(reg, control_pbias_offset); | 159 | omap4_ctrl_pad_writel(reg, control_pbias_offset); |
162 | 160 | ||
163 | timeout = jiffies + msecs_to_jiffies(5); | 161 | timeout = jiffies + msecs_to_jiffies(5); |
@@ -171,16 +169,14 @@ static void omap4_hsmmc1_after_set_reg(struct device *dev, int slot, | |||
171 | if (reg & OMAP4_MMC1_PBIASLITE_VMODE_ERROR_MASK) { | 169 | if (reg & OMAP4_MMC1_PBIASLITE_VMODE_ERROR_MASK) { |
172 | pr_err("Pbias Voltage is not same as LDO\n"); | 170 | pr_err("Pbias Voltage is not same as LDO\n"); |
173 | /* Caution : On VMODE_ERROR Power Down MMC IO */ | 171 | /* Caution : On VMODE_ERROR Power Down MMC IO */ |
174 | reg &= ~(OMAP4_MMC1_PWRDNZ_MASK | | 172 | reg &= ~(OMAP4_MMC1_PWRDNZ_MASK); |
175 | OMAP4_USBC1_ICUSB_PWRDNZ_MASK); | ||
176 | omap4_ctrl_pad_writel(reg, control_pbias_offset); | 173 | omap4_ctrl_pad_writel(reg, control_pbias_offset); |
177 | } | 174 | } |
178 | } else { | 175 | } else { |
179 | reg = omap4_ctrl_pad_readl(control_pbias_offset); | 176 | reg = omap4_ctrl_pad_readl(control_pbias_offset); |
180 | reg |= (OMAP4_MMC1_PBIASLITE_PWRDNZ_MASK | | 177 | reg |= (OMAP4_MMC1_PBIASLITE_PWRDNZ_MASK | |
181 | OMAP4_MMC1_PWRDNZ_MASK | | 178 | OMAP4_MMC1_PWRDNZ_MASK | |
182 | OMAP4_MMC1_PBIASLITE_VMODE_MASK | | 179 | OMAP4_MMC1_PBIASLITE_VMODE_MASK); |
183 | OMAP4_USBC1_ICUSB_PWRDNZ_MASK); | ||
184 | omap4_ctrl_pad_writel(reg, control_pbias_offset); | 180 | omap4_ctrl_pad_writel(reg, control_pbias_offset); |
185 | } | 181 | } |
186 | } | 182 | } |
diff --git a/arch/arm/mach-omap2/omap-smp.c b/arch/arm/mach-omap2/omap-smp.c index ce65e9329c7b..889464dc7b2d 100644 --- a/arch/arm/mach-omap2/omap-smp.c +++ b/arch/arm/mach-omap2/omap-smp.c | |||
@@ -109,12 +109,10 @@ void __init smp_init_cpus(void) | |||
109 | ncores = scu_get_core_count(scu_base); | 109 | ncores = scu_get_core_count(scu_base); |
110 | 110 | ||
111 | /* sanity check */ | 111 | /* sanity check */ |
112 | if (ncores > NR_CPUS) { | 112 | if (ncores > nr_cpu_ids) { |
113 | printk(KERN_WARNING | 113 | pr_warn("SMP: %u cores greater than maximum (%u), clipping\n", |
114 | "OMAP4: no. of cores (%d) greater than configured " | 114 | ncores, nr_cpu_ids); |
115 | "maximum of %d - clipping\n", | 115 | ncores = nr_cpu_ids; |
116 | ncores, NR_CPUS); | ||
117 | ncores = NR_CPUS; | ||
118 | } | 116 | } |
119 | 117 | ||
120 | for (i = 0; i < ncores; i++) | 118 | for (i = 0; i < ncores; i++) |
diff --git a/arch/arm/mach-omap2/usb-musb.c b/arch/arm/mach-omap2/usb-musb.c index a65145b02a55..19e4dac62a8c 100644 --- a/arch/arm/mach-omap2/usb-musb.c +++ b/arch/arm/mach-omap2/usb-musb.c | |||
@@ -137,9 +137,6 @@ void __init usb_musb_init(struct omap_musb_board_data *musb_board_data) | |||
137 | musb_plat.mode = board_data->mode; | 137 | musb_plat.mode = board_data->mode; |
138 | musb_plat.extvbus = board_data->extvbus; | 138 | musb_plat.extvbus = board_data->extvbus; |
139 | 139 | ||
140 | if (cpu_is_omap44xx()) | ||
141 | omap4430_phy_init(dev); | ||
142 | |||
143 | if (cpu_is_omap3517() || cpu_is_omap3505()) { | 140 | if (cpu_is_omap3517() || cpu_is_omap3505()) { |
144 | oh_name = "am35x_otg_hs"; | 141 | oh_name = "am35x_otg_hs"; |
145 | name = "musb-am35x"; | 142 | name = "musb-am35x"; |
diff --git a/arch/arm/mach-orion5x/Makefile.boot b/arch/arm/mach-orion5x/Makefile.boot index 67039c3e0c48..760a0efe7580 100644 --- a/arch/arm/mach-orion5x/Makefile.boot +++ b/arch/arm/mach-orion5x/Makefile.boot | |||
@@ -1,3 +1,3 @@ | |||
1 | zreladdr-y := 0x00008000 | 1 | zreladdr-y += 0x00008000 |
2 | params_phys-y := 0x00000100 | 2 | params_phys-y := 0x00000100 |
3 | initrd_phys-y := 0x00800000 | 3 | initrd_phys-y := 0x00800000 |
diff --git a/arch/arm/mach-orion5x/common.c b/arch/arm/mach-orion5x/common.c index 0ab531d047fc..22ace0bf2f92 100644 --- a/arch/arm/mach-orion5x/common.c +++ b/arch/arm/mach-orion5x/common.c | |||
@@ -308,8 +308,8 @@ void __init orion5x_init(void) | |||
308 | * Many orion-based systems have buggy bootloader implementations. | 308 | * Many orion-based systems have buggy bootloader implementations. |
309 | * This is a common fixup for bogus memory tags. | 309 | * This is a common fixup for bogus memory tags. |
310 | */ | 310 | */ |
311 | void __init tag_fixup_mem32(struct machine_desc *mdesc, struct tag *t, | 311 | void __init tag_fixup_mem32(struct tag *t, char **from, |
312 | char **from, struct meminfo *meminfo) | 312 | struct meminfo *meminfo) |
313 | { | 313 | { |
314 | for (; t->hdr.size; t = tag_next(t)) | 314 | for (; t->hdr.size; t = tag_next(t)) |
315 | if (t->hdr.tag == ATAG_MEM && | 315 | if (t->hdr.tag == ATAG_MEM && |
diff --git a/arch/arm/mach-orion5x/common.h b/arch/arm/mach-orion5x/common.h index 3e5499dda49a..909489f4d23e 100644 --- a/arch/arm/mach-orion5x/common.h +++ b/arch/arm/mach-orion5x/common.h | |||
@@ -53,11 +53,9 @@ int orion5x_pci_sys_setup(int nr, struct pci_sys_data *sys); | |||
53 | struct pci_bus *orion5x_pci_sys_scan_bus(int nr, struct pci_sys_data *sys); | 53 | struct pci_bus *orion5x_pci_sys_scan_bus(int nr, struct pci_sys_data *sys); |
54 | int orion5x_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin); | 54 | int orion5x_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin); |
55 | 55 | ||
56 | struct machine_desc; | ||
57 | struct meminfo; | 56 | struct meminfo; |
58 | struct tag; | 57 | struct tag; |
59 | extern void __init tag_fixup_mem32(struct machine_desc *, struct tag *, | 58 | extern void __init tag_fixup_mem32(struct tag *, char **, struct meminfo *); |
60 | char **, struct meminfo *); | ||
61 | 59 | ||
62 | 60 | ||
63 | #endif | 61 | #endif |
diff --git a/arch/arm/mach-pnx4008/Makefile.boot b/arch/arm/mach-pnx4008/Makefile.boot index 44c7117e20dd..9fa19baa7f2e 100644 --- a/arch/arm/mach-pnx4008/Makefile.boot +++ b/arch/arm/mach-pnx4008/Makefile.boot | |||
@@ -1,4 +1,4 @@ | |||
1 | zreladdr-y := 0x80008000 | 1 | zreladdr-y += 0x80008000 |
2 | params_phys-y := 0x80000100 | 2 | params_phys-y := 0x80000100 |
3 | initrd_phys-y := 0x80800000 | 3 | initrd_phys-y := 0x80800000 |
4 | 4 | ||
diff --git a/arch/arm/mach-prima2/Makefile.boot b/arch/arm/mach-prima2/Makefile.boot index d023db3ae4ff..c77a4883a4ee 100644 --- a/arch/arm/mach-prima2/Makefile.boot +++ b/arch/arm/mach-prima2/Makefile.boot | |||
@@ -1,3 +1,3 @@ | |||
1 | zreladdr-y := 0x00008000 | 1 | zreladdr-y += 0x00008000 |
2 | params_phys-y := 0x00000100 | 2 | params_phys-y := 0x00000100 |
3 | initrd_phys-y := 0x00800000 | 3 | initrd_phys-y := 0x00800000 |
diff --git a/arch/arm/mach-pxa/Makefile.boot b/arch/arm/mach-pxa/Makefile.boot index 1ead67178eca..2c1ae92f2106 100644 --- a/arch/arm/mach-pxa/Makefile.boot +++ b/arch/arm/mach-pxa/Makefile.boot | |||
@@ -1,2 +1,2 @@ | |||
1 | zreladdr-y := 0xa0008000 | 1 | zreladdr-y += 0xa0008000 |
2 | 2 | ||
diff --git a/arch/arm/mach-pxa/cm-x300.c b/arch/arm/mach-pxa/cm-x300.c index b6a51340270b..d940e8a72270 100644 --- a/arch/arm/mach-pxa/cm-x300.c +++ b/arch/arm/mach-pxa/cm-x300.c | |||
@@ -839,8 +839,8 @@ static void __init cm_x300_init(void) | |||
839 | cm_x300_init_bl(); | 839 | cm_x300_init_bl(); |
840 | } | 840 | } |
841 | 841 | ||
842 | static void __init cm_x300_fixup(struct machine_desc *mdesc, struct tag *tags, | 842 | static void __init cm_x300_fixup(struct tag *tags, char **cmdline, |
843 | char **cmdline, struct meminfo *mi) | 843 | struct meminfo *mi) |
844 | { | 844 | { |
845 | /* Make sure that mi->bank[0].start = PHYS_ADDR */ | 845 | /* Make sure that mi->bank[0].start = PHYS_ADDR */ |
846 | for (; tags->hdr.size; tags = tag_next(tags)) | 846 | for (; tags->hdr.size; tags = tag_next(tags)) |
diff --git a/arch/arm/mach-pxa/corgi.c b/arch/arm/mach-pxa/corgi.c index 185a37cad254..3e9483b06053 100644 --- a/arch/arm/mach-pxa/corgi.c +++ b/arch/arm/mach-pxa/corgi.c | |||
@@ -705,8 +705,8 @@ static void __init corgi_init(void) | |||
705 | platform_add_devices(devices, ARRAY_SIZE(devices)); | 705 | platform_add_devices(devices, ARRAY_SIZE(devices)); |
706 | } | 706 | } |
707 | 707 | ||
708 | static void __init fixup_corgi(struct machine_desc *desc, | 708 | static void __init fixup_corgi(struct tag *tags, char **cmdline, |
709 | struct tag *tags, char **cmdline, struct meminfo *mi) | 709 | struct meminfo *mi) |
710 | { | 710 | { |
711 | sharpsl_save_param(); | 711 | sharpsl_save_param(); |
712 | mi->nr_banks=1; | 712 | mi->nr_banks=1; |
diff --git a/arch/arm/mach-pxa/eseries.c b/arch/arm/mach-pxa/eseries.c index b4599ec9d619..e4a1f4dc89ff 100644 --- a/arch/arm/mach-pxa/eseries.c +++ b/arch/arm/mach-pxa/eseries.c | |||
@@ -41,8 +41,7 @@ | |||
41 | #include "clock.h" | 41 | #include "clock.h" |
42 | 42 | ||
43 | /* Only e800 has 128MB RAM */ | 43 | /* Only e800 has 128MB RAM */ |
44 | void __init eseries_fixup(struct machine_desc *desc, | 44 | void __init eseries_fixup(struct tag *tags, char **cmdline, struct meminfo *mi) |
45 | struct tag *tags, char **cmdline, struct meminfo *mi) | ||
46 | { | 45 | { |
47 | mi->nr_banks=1; | 46 | mi->nr_banks=1; |
48 | mi->bank[0].start = 0xa0000000; | 47 | mi->bank[0].start = 0xa0000000; |
diff --git a/arch/arm/mach-pxa/eseries.h b/arch/arm/mach-pxa/eseries.h index 5930f5e2a123..be921965e91a 100644 --- a/arch/arm/mach-pxa/eseries.h +++ b/arch/arm/mach-pxa/eseries.h | |||
@@ -1,5 +1,4 @@ | |||
1 | void __init eseries_fixup(struct machine_desc *desc, | 1 | void __init eseries_fixup(struct tag *tags, char **cmdline, struct meminfo *mi); |
2 | struct tag *tags, char **cmdline, struct meminfo *mi); | ||
3 | 2 | ||
4 | extern struct pxa2xx_udc_mach_info e7xx_udc_mach_info; | 3 | extern struct pxa2xx_udc_mach_info e7xx_udc_mach_info; |
5 | extern struct pxaficp_platform_data e7xx_ficp_platform_data; | 4 | extern struct pxaficp_platform_data e7xx_ficp_platform_data; |
diff --git a/arch/arm/mach-pxa/irq.c b/arch/arm/mach-pxa/irq.c index b09e848eb6c6..ca6075717824 100644 --- a/arch/arm/mach-pxa/irq.c +++ b/arch/arm/mach-pxa/irq.c | |||
@@ -19,6 +19,8 @@ | |||
19 | #include <linux/io.h> | 19 | #include <linux/io.h> |
20 | #include <linux/irq.h> | 20 | #include <linux/irq.h> |
21 | 21 | ||
22 | #include <asm/exception.h> | ||
23 | |||
22 | #include <mach/hardware.h> | 24 | #include <mach/hardware.h> |
23 | #include <mach/irqs.h> | 25 | #include <mach/irqs.h> |
24 | #include <mach/gpio.h> | 26 | #include <mach/gpio.h> |
diff --git a/arch/arm/mach-pxa/poodle.c b/arch/arm/mach-pxa/poodle.c index a113ea9ab4ab..948ce3e729fa 100644 --- a/arch/arm/mach-pxa/poodle.c +++ b/arch/arm/mach-pxa/poodle.c | |||
@@ -454,8 +454,8 @@ static void __init poodle_init(void) | |||
454 | poodle_init_spi(); | 454 | poodle_init_spi(); |
455 | } | 455 | } |
456 | 456 | ||
457 | static void __init fixup_poodle(struct machine_desc *desc, | 457 | static void __init fixup_poodle(struct tag *tags, char **cmdline, |
458 | struct tag *tags, char **cmdline, struct meminfo *mi) | 458 | struct meminfo *mi) |
459 | { | 459 | { |
460 | sharpsl_save_param(); | 460 | sharpsl_save_param(); |
461 | mi->nr_banks=1; | 461 | mi->nr_banks=1; |
diff --git a/arch/arm/mach-pxa/saar.c b/arch/arm/mach-pxa/saar.c index df4356e8acae..72001ec6e7b5 100644 --- a/arch/arm/mach-pxa/saar.c +++ b/arch/arm/mach-pxa/saar.c | |||
@@ -540,7 +540,7 @@ static struct mtd_partition saar_onenand_partitions[] = { | |||
540 | }, { | 540 | }, { |
541 | .name = "filesystem", | 541 | .name = "filesystem", |
542 | .offset = MTDPART_OFS_APPEND, | 542 | .offset = MTDPART_OFS_APPEND, |
543 | .size = SZ_48M, | 543 | .size = SZ_32M + SZ_16M, |
544 | .mask_flags = 0, | 544 | .mask_flags = 0, |
545 | } | 545 | } |
546 | }; | 546 | }; |
diff --git a/arch/arm/mach-pxa/spitz.c b/arch/arm/mach-pxa/spitz.c index 438c7b5e451f..d8dec9113aad 100644 --- a/arch/arm/mach-pxa/spitz.c +++ b/arch/arm/mach-pxa/spitz.c | |||
@@ -970,8 +970,8 @@ static void __init spitz_init(void) | |||
970 | spitz_i2c_init(); | 970 | spitz_i2c_init(); |
971 | } | 971 | } |
972 | 972 | ||
973 | static void __init spitz_fixup(struct machine_desc *desc, | 973 | static void __init spitz_fixup(struct tag *tags, char **cmdline, |
974 | struct tag *tags, char **cmdline, struct meminfo *mi) | 974 | struct meminfo *mi) |
975 | { | 975 | { |
976 | sharpsl_save_param(); | 976 | sharpsl_save_param(); |
977 | mi->nr_banks = 1; | 977 | mi->nr_banks = 1; |
diff --git a/arch/arm/mach-pxa/tosa.c b/arch/arm/mach-pxa/tosa.c index 9f69a2682693..402b0c96613b 100644 --- a/arch/arm/mach-pxa/tosa.c +++ b/arch/arm/mach-pxa/tosa.c | |||
@@ -960,8 +960,8 @@ static void __init tosa_init(void) | |||
960 | platform_add_devices(devices, ARRAY_SIZE(devices)); | 960 | platform_add_devices(devices, ARRAY_SIZE(devices)); |
961 | } | 961 | } |
962 | 962 | ||
963 | static void __init fixup_tosa(struct machine_desc *desc, | 963 | static void __init fixup_tosa(struct tag *tags, char **cmdline, |
964 | struct tag *tags, char **cmdline, struct meminfo *mi) | 964 | struct meminfo *mi) |
965 | { | 965 | { |
966 | sharpsl_save_param(); | 966 | sharpsl_save_param(); |
967 | mi->nr_banks=1; | 967 | mi->nr_banks=1; |
diff --git a/arch/arm/mach-realview/Makefile.boot b/arch/arm/mach-realview/Makefile.boot index d97e003d3df4..d2c3d788f688 100644 --- a/arch/arm/mach-realview/Makefile.boot +++ b/arch/arm/mach-realview/Makefile.boot | |||
@@ -1,9 +1,9 @@ | |||
1 | ifeq ($(CONFIG_REALVIEW_HIGH_PHYS_OFFSET),y) | 1 | ifeq ($(CONFIG_REALVIEW_HIGH_PHYS_OFFSET),y) |
2 | zreladdr-y := 0x70008000 | 2 | zreladdr-y += 0x70008000 |
3 | params_phys-y := 0x70000100 | 3 | params_phys-y := 0x70000100 |
4 | initrd_phys-y := 0x70800000 | 4 | initrd_phys-y := 0x70800000 |
5 | else | 5 | else |
6 | zreladdr-y := 0x00008000 | 6 | zreladdr-y += 0x00008000 |
7 | params_phys-y := 0x00000100 | 7 | params_phys-y := 0x00000100 |
8 | initrd_phys-y := 0x00800000 | 8 | initrd_phys-y := 0x00800000 |
9 | endif | 9 | endif |
diff --git a/arch/arm/mach-realview/core.c b/arch/arm/mach-realview/core.c index 5c23450d2d1d..d5ed5d4f77d6 100644 --- a/arch/arm/mach-realview/core.c +++ b/arch/arm/mach-realview/core.c | |||
@@ -517,8 +517,7 @@ void __init realview_timer_init(unsigned int timer_irq) | |||
517 | /* | 517 | /* |
518 | * Setup the memory banks. | 518 | * Setup the memory banks. |
519 | */ | 519 | */ |
520 | void realview_fixup(struct machine_desc *mdesc, struct tag *tags, char **from, | 520 | void realview_fixup(struct tag *tags, char **from, struct meminfo *meminfo) |
521 | struct meminfo *meminfo) | ||
522 | { | 521 | { |
523 | /* | 522 | /* |
524 | * Most RealView platforms have 512MB contiguous RAM at 0x70000000. | 523 | * Most RealView platforms have 512MB contiguous RAM at 0x70000000. |
diff --git a/arch/arm/mach-realview/core.h b/arch/arm/mach-realview/core.h index 5c83d1e87a03..47259c89a75e 100644 --- a/arch/arm/mach-realview/core.h +++ b/arch/arm/mach-realview/core.h | |||
@@ -63,8 +63,8 @@ extern int realview_flash_register(struct resource *res, u32 num); | |||
63 | extern int realview_eth_register(const char *name, struct resource *res); | 63 | extern int realview_eth_register(const char *name, struct resource *res); |
64 | extern int realview_usb_register(struct resource *res); | 64 | extern int realview_usb_register(struct resource *res); |
65 | extern void realview_init_early(void); | 65 | extern void realview_init_early(void); |
66 | extern void realview_fixup(struct machine_desc *mdesc, struct tag *tags, | 66 | extern void realview_fixup(struct tag *tags, char **from, |
67 | char **from, struct meminfo *meminfo); | 67 | struct meminfo *meminfo); |
68 | extern void (*realview_reset)(char); | 68 | extern void (*realview_reset)(char); |
69 | 69 | ||
70 | #endif | 70 | #endif |
diff --git a/arch/arm/mach-realview/include/mach/board-pb1176.h b/arch/arm/mach-realview/include/mach/board-pb1176.h index 002ab5d8c11c..2a15fef94730 100644 --- a/arch/arm/mach-realview/include/mach/board-pb1176.h +++ b/arch/arm/mach-realview/include/mach/board-pb1176.h | |||
@@ -70,6 +70,7 @@ | |||
70 | 70 | ||
71 | #define REALVIEW_DC1176_GIC_CPU_BASE 0x10120000 /* GIC CPU interface, on devchip */ | 71 | #define REALVIEW_DC1176_GIC_CPU_BASE 0x10120000 /* GIC CPU interface, on devchip */ |
72 | #define REALVIEW_DC1176_GIC_DIST_BASE 0x10121000 /* GIC distributor, on devchip */ | 72 | #define REALVIEW_DC1176_GIC_DIST_BASE 0x10121000 /* GIC distributor, on devchip */ |
73 | #define REALVIEW_DC1176_ROM_BASE 0x10200000 /* 16KiB NRAM preudo-ROM, on devchip */ | ||
73 | #define REALVIEW_PB1176_GIC_CPU_BASE 0x10040000 /* GIC CPU interface, on FPGA */ | 74 | #define REALVIEW_PB1176_GIC_CPU_BASE 0x10040000 /* GIC CPU interface, on FPGA */ |
74 | #define REALVIEW_PB1176_GIC_DIST_BASE 0x10041000 /* GIC distributor, on FPGA */ | 75 | #define REALVIEW_PB1176_GIC_DIST_BASE 0x10041000 /* GIC distributor, on FPGA */ |
75 | #define REALVIEW_PB1176_L220_BASE 0x10110000 /* L220 registers */ | 76 | #define REALVIEW_PB1176_L220_BASE 0x10110000 /* L220 registers */ |
diff --git a/arch/arm/mach-realview/platsmp.c b/arch/arm/mach-realview/platsmp.c index 4ae943bafa92..e83c654a58d0 100644 --- a/arch/arm/mach-realview/platsmp.c +++ b/arch/arm/mach-realview/platsmp.c | |||
@@ -52,12 +52,10 @@ void __init smp_init_cpus(void) | |||
52 | ncores = scu_base ? scu_get_core_count(scu_base) : 1; | 52 | ncores = scu_base ? scu_get_core_count(scu_base) : 1; |
53 | 53 | ||
54 | /* sanity check */ | 54 | /* sanity check */ |
55 | if (ncores > NR_CPUS) { | 55 | if (ncores > nr_cpu_ids) { |
56 | printk(KERN_WARNING | 56 | pr_warn("SMP: %u cores greater than maximum (%u), clipping\n", |
57 | "Realview: no. of cores (%d) greater than configured " | 57 | ncores, nr_cpu_ids); |
58 | "maximum of %d - clipping\n", | 58 | ncores = nr_cpu_ids; |
59 | ncores, NR_CPUS); | ||
60 | ncores = NR_CPUS; | ||
61 | } | 59 | } |
62 | 60 | ||
63 | for (i = 0; i < ncores; i++) | 61 | for (i = 0; i < ncores; i++) |
diff --git a/arch/arm/mach-realview/realview_pb1176.c b/arch/arm/mach-realview/realview_pb1176.c index ad5671acb66a..865d440fcf58 100644 --- a/arch/arm/mach-realview/realview_pb1176.c +++ b/arch/arm/mach-realview/realview_pb1176.c | |||
@@ -26,6 +26,8 @@ | |||
26 | #include <linux/amba/pl061.h> | 26 | #include <linux/amba/pl061.h> |
27 | #include <linux/amba/mmci.h> | 27 | #include <linux/amba/mmci.h> |
28 | #include <linux/amba/pl022.h> | 28 | #include <linux/amba/pl022.h> |
29 | #include <linux/mtd/physmap.h> | ||
30 | #include <linux/mtd/partitions.h> | ||
29 | #include <linux/io.h> | 31 | #include <linux/io.h> |
30 | 32 | ||
31 | #include <mach/hardware.h> | 33 | #include <mach/hardware.h> |
@@ -204,22 +206,48 @@ static struct amba_device *amba_devs[] __initdata = { | |||
204 | * RealView PB1176 platform devices | 206 | * RealView PB1176 platform devices |
205 | */ | 207 | */ |
206 | static struct resource realview_pb1176_flash_resources[] = { | 208 | static struct resource realview_pb1176_flash_resources[] = { |
207 | [0] = { | 209 | { |
208 | .start = REALVIEW_PB1176_FLASH_BASE, | 210 | .start = REALVIEW_PB1176_FLASH_BASE, |
209 | .end = REALVIEW_PB1176_FLASH_BASE + REALVIEW_PB1176_FLASH_SIZE - 1, | 211 | .end = REALVIEW_PB1176_FLASH_BASE + REALVIEW_PB1176_FLASH_SIZE - 1, |
210 | .flags = IORESOURCE_MEM, | 212 | .flags = IORESOURCE_MEM, |
211 | }, | 213 | }, |
212 | [1] = { | 214 | #ifdef CONFIG_REALVIEW_PB1176_SECURE_FLASH |
215 | { | ||
213 | .start = REALVIEW_PB1176_SEC_FLASH_BASE, | 216 | .start = REALVIEW_PB1176_SEC_FLASH_BASE, |
214 | .end = REALVIEW_PB1176_SEC_FLASH_BASE + REALVIEW_PB1176_SEC_FLASH_SIZE - 1, | 217 | .end = REALVIEW_PB1176_SEC_FLASH_BASE + REALVIEW_PB1176_SEC_FLASH_SIZE - 1, |
215 | .flags = IORESOURCE_MEM, | 218 | .flags = IORESOURCE_MEM, |
216 | }, | 219 | }, |
217 | }; | ||
218 | #ifdef CONFIG_REALVIEW_PB1176_SECURE_FLASH | ||
219 | #define PB1176_FLASH_BLOCKS 2 | ||
220 | #else | ||
221 | #define PB1176_FLASH_BLOCKS 1 | ||
222 | #endif | 220 | #endif |
221 | }; | ||
222 | |||
223 | static struct physmap_flash_data pb1176_rom_pdata = { | ||
224 | .probe_type = "map_rom", | ||
225 | .width = 4, | ||
226 | .nr_parts = 0, | ||
227 | }; | ||
228 | |||
229 | static struct resource pb1176_rom_resources[] = { | ||
230 | /* | ||
231 | * This exposes the PB1176 DevChip ROM as an MTD ROM mapping. | ||
232 | * The reference manual states that this is actually a pseudo-ROM | ||
233 | * programmed in NVRAM. | ||
234 | */ | ||
235 | { | ||
236 | .start = REALVIEW_DC1176_ROM_BASE, | ||
237 | .end = REALVIEW_DC1176_ROM_BASE + SZ_16K - 1, | ||
238 | .flags = IORESOURCE_MEM, | ||
239 | } | ||
240 | }; | ||
241 | |||
242 | static struct platform_device pb1176_rom_device = { | ||
243 | .name = "physmap-flash", | ||
244 | .id = -1, | ||
245 | .num_resources = ARRAY_SIZE(pb1176_rom_resources), | ||
246 | .resource = pb1176_rom_resources, | ||
247 | .dev = { | ||
248 | .platform_data = &pb1176_rom_pdata, | ||
249 | }, | ||
250 | }; | ||
223 | 251 | ||
224 | static struct resource realview_pb1176_smsc911x_resources[] = { | 252 | static struct resource realview_pb1176_smsc911x_resources[] = { |
225 | [0] = { | 253 | [0] = { |
@@ -316,8 +344,7 @@ static void realview_pb1176_reset(char mode) | |||
316 | __raw_writel(REALVIEW_PB1176_SYS_SOFT_RESET, reset_ctrl); | 344 | __raw_writel(REALVIEW_PB1176_SYS_SOFT_RESET, reset_ctrl); |
317 | } | 345 | } |
318 | 346 | ||
319 | static void realview_pb1176_fixup(struct machine_desc *mdesc, | 347 | static void realview_pb1176_fixup(struct tag *tags, char **from, |
320 | struct tag *tags, char **from, | ||
321 | struct meminfo *meminfo) | 348 | struct meminfo *meminfo) |
322 | { | 349 | { |
323 | /* | 350 | /* |
@@ -338,7 +365,8 @@ static void __init realview_pb1176_init(void) | |||
338 | #endif | 365 | #endif |
339 | 366 | ||
340 | realview_flash_register(realview_pb1176_flash_resources, | 367 | realview_flash_register(realview_pb1176_flash_resources, |
341 | PB1176_FLASH_BLOCKS); | 368 | ARRAY_SIZE(realview_pb1176_flash_resources)); |
369 | platform_device_register(&pb1176_rom_device); | ||
342 | realview_eth_register(NULL, realview_pb1176_smsc911x_resources); | 370 | realview_eth_register(NULL, realview_pb1176_smsc911x_resources); |
343 | platform_device_register(&realview_i2c_device); | 371 | platform_device_register(&realview_i2c_device); |
344 | realview_usb_register(realview_pb1176_isp1761_resources); | 372 | realview_usb_register(realview_pb1176_isp1761_resources); |
diff --git a/arch/arm/mach-realview/realview_pbx.c b/arch/arm/mach-realview/realview_pbx.c index 363b0ab56150..3e1eb2eb8132 100644 --- a/arch/arm/mach-realview/realview_pbx.c +++ b/arch/arm/mach-realview/realview_pbx.c | |||
@@ -319,8 +319,8 @@ static struct sys_timer realview_pbx_timer = { | |||
319 | .init = realview_pbx_timer_init, | 319 | .init = realview_pbx_timer_init, |
320 | }; | 320 | }; |
321 | 321 | ||
322 | static void realview_pbx_fixup(struct machine_desc *mdesc, struct tag *tags, | 322 | static void realview_pbx_fixup(struct tag *tags, char **from, |
323 | char **from, struct meminfo *meminfo) | 323 | struct meminfo *meminfo) |
324 | { | 324 | { |
325 | #ifdef CONFIG_SPARSEMEM | 325 | #ifdef CONFIG_SPARSEMEM |
326 | /* | 326 | /* |
@@ -335,7 +335,7 @@ static void realview_pbx_fixup(struct machine_desc *mdesc, struct tag *tags, | |||
335 | meminfo->bank[2].size = SZ_256M; | 335 | meminfo->bank[2].size = SZ_256M; |
336 | meminfo->nr_banks = 3; | 336 | meminfo->nr_banks = 3; |
337 | #else | 337 | #else |
338 | realview_fixup(mdesc, tags, from, meminfo); | 338 | realview_fixup(tags, from, meminfo); |
339 | #endif | 339 | #endif |
340 | } | 340 | } |
341 | 341 | ||
diff --git a/arch/arm/mach-rpc/Makefile.boot b/arch/arm/mach-rpc/Makefile.boot index 9c9e7685ec7c..ae2df0d7d037 100644 --- a/arch/arm/mach-rpc/Makefile.boot +++ b/arch/arm/mach-rpc/Makefile.boot | |||
@@ -1,4 +1,4 @@ | |||
1 | zreladdr-y := 0x10008000 | 1 | zreladdr-y += 0x10008000 |
2 | params_phys-y := 0x10000100 | 2 | params_phys-y := 0x10000100 |
3 | initrd_phys-y := 0x18000000 | 3 | initrd_phys-y := 0x18000000 |
4 | 4 | ||
diff --git a/arch/arm/mach-rpc/include/mach/hardware.h b/arch/arm/mach-rpc/include/mach/hardware.h index dde6b3c0e299..050d63c74cc1 100644 --- a/arch/arm/mach-rpc/include/mach/hardware.h +++ b/arch/arm/mach-rpc/include/mach/hardware.h | |||
@@ -36,7 +36,7 @@ | |||
36 | 36 | ||
37 | #define EASI_SIZE 0x08000000 /* EASI I/O */ | 37 | #define EASI_SIZE 0x08000000 /* EASI I/O */ |
38 | #define EASI_START 0x08000000 | 38 | #define EASI_START 0x08000000 |
39 | #define EASI_BASE 0xe5000000 | 39 | #define EASI_BASE IOMEM(0xe5000000) |
40 | 40 | ||
41 | #define IO_START 0x03000000 /* I/O */ | 41 | #define IO_START 0x03000000 /* I/O */ |
42 | #define IO_SIZE 0x01000000 | 42 | #define IO_SIZE 0x01000000 |
@@ -51,21 +51,20 @@ | |||
51 | /* | 51 | /* |
52 | * IO Addresses | 52 | * IO Addresses |
53 | */ | 53 | */ |
54 | #define VIDC_BASE IOMEM(0xe0400000) | 54 | #define ECARD_EASI_BASE (EASI_BASE) |
55 | #define EXPMASK_BASE 0xe0360000 | 55 | #define VIDC_BASE (IO_BASE + 0x00400000) |
56 | #define IOMD_BASE IOMEM(0xe0200000) | 56 | #define EXPMASK_BASE (IO_BASE + 0x00360000) |
57 | #define IOC_BASE IOMEM(0xe0200000) | 57 | #define ECARD_IOC4_BASE (IO_BASE + 0x00270000) |
58 | #define PCIO_BASE IOMEM(0xe0010000) | 58 | #define ECARD_IOC_BASE (IO_BASE + 0x00240000) |
59 | #define FLOPPYDMA_BASE IOMEM(0xe002a000) | 59 | #define IOMD_BASE (IO_BASE + 0x00200000) |
60 | #define IOC_BASE (IO_BASE + 0x00200000) | ||
61 | #define ECARD_MEMC8_BASE (IO_BASE + 0x0002b000) | ||
62 | #define FLOPPYDMA_BASE (IO_BASE + 0x0002a000) | ||
63 | #define PCIO_BASE (IO_BASE + 0x00010000) | ||
64 | #define ECARD_MEMC_BASE (IO_BASE + 0x00000000) | ||
60 | 65 | ||
61 | #define vidc_writel(val) __raw_writel(val, VIDC_BASE) | 66 | #define vidc_writel(val) __raw_writel(val, VIDC_BASE) |
62 | 67 | ||
63 | #define IO_EC_EASI_BASE 0x81400000 | ||
64 | #define IO_EC_IOC4_BASE 0x8009c000 | ||
65 | #define IO_EC_IOC_BASE 0x80090000 | ||
66 | #define IO_EC_MEMC8_BASE 0x8000ac00 | ||
67 | #define IO_EC_MEMC_BASE 0x80000000 | ||
68 | |||
69 | #define NETSLOT_BASE 0x0302b000 | 68 | #define NETSLOT_BASE 0x0302b000 |
70 | #define NETSLOT_SIZE 0x00001000 | 69 | #define NETSLOT_SIZE 0x00001000 |
71 | 70 | ||
diff --git a/arch/arm/mach-rpc/include/mach/io.h b/arch/arm/mach-rpc/include/mach/io.h index 20da7f486e51..695f4ed2e11b 100644 --- a/arch/arm/mach-rpc/include/mach/io.h +++ b/arch/arm/mach-rpc/include/mach/io.h | |||
@@ -15,195 +15,18 @@ | |||
15 | 15 | ||
16 | #include <mach/hardware.h> | 16 | #include <mach/hardware.h> |
17 | 17 | ||
18 | #define IO_SPACE_LIMIT 0xffffffff | 18 | #define IO_SPACE_LIMIT 0xffff |
19 | 19 | ||
20 | /* | 20 | /* |
21 | * We use two different types of addressing - PC style addresses, and ARM | 21 | * We need PC style IO addressing for: |
22 | * addresses. PC style accesses the PC hardware with the normal PC IO | 22 | * - floppy (at 0x3f2,0x3f4,0x3f5,0x3f7) |
23 | * addresses, eg 0x3f8 for serial#1. ARM addresses are 0x80000000+ | 23 | * - parport (at 0x278-0x27a, 0x27b-0x27f, 0x778-0x77a) |
24 | * and are translated to the start of IO. Note that all addresses are | 24 | * - 8250 serial (only for compile) |
25 | * shifted left! | ||
26 | */ | ||
27 | #define __PORT_PCIO(x) (!((x) & 0x80000000)) | ||
28 | |||
29 | /* | ||
30 | * Dynamic IO functions. | ||
31 | */ | ||
32 | static inline void __outb (unsigned int value, unsigned int port) | ||
33 | { | ||
34 | unsigned long temp; | ||
35 | __asm__ __volatile__( | ||
36 | "tst %2, #0x80000000\n\t" | ||
37 | "mov %0, %4\n\t" | ||
38 | "addeq %0, %0, %3\n\t" | ||
39 | "strb %1, [%0, %2, lsl #2] @ outb" | ||
40 | : "=&r" (temp) | ||
41 | : "r" (value), "r" (port), "Ir" (PCIO_BASE - IO_BASE), "Ir" (IO_BASE) | ||
42 | : "cc"); | ||
43 | } | ||
44 | |||
45 | static inline void __outw (unsigned int value, unsigned int port) | ||
46 | { | ||
47 | unsigned long temp; | ||
48 | __asm__ __volatile__( | ||
49 | "tst %2, #0x80000000\n\t" | ||
50 | "mov %0, %4\n\t" | ||
51 | "addeq %0, %0, %3\n\t" | ||
52 | "str %1, [%0, %2, lsl #2] @ outw" | ||
53 | : "=&r" (temp) | ||
54 | : "r" (value|value<<16), "r" (port), "Ir" (PCIO_BASE - IO_BASE), "Ir" (IO_BASE) | ||
55 | : "cc"); | ||
56 | } | ||
57 | |||
58 | static inline void __outl (unsigned int value, unsigned int port) | ||
59 | { | ||
60 | unsigned long temp; | ||
61 | __asm__ __volatile__( | ||
62 | "tst %2, #0x80000000\n\t" | ||
63 | "mov %0, %4\n\t" | ||
64 | "addeq %0, %0, %3\n\t" | ||
65 | "str %1, [%0, %2, lsl #2] @ outl" | ||
66 | : "=&r" (temp) | ||
67 | : "r" (value), "r" (port), "Ir" (PCIO_BASE - IO_BASE), "Ir" (IO_BASE) | ||
68 | : "cc"); | ||
69 | } | ||
70 | |||
71 | #define DECLARE_DYN_IN(sz,fnsuffix,instr) \ | ||
72 | static inline unsigned sz __in##fnsuffix (unsigned int port) \ | ||
73 | { \ | ||
74 | unsigned long temp, value; \ | ||
75 | __asm__ __volatile__( \ | ||
76 | "tst %2, #0x80000000\n\t" \ | ||
77 | "mov %0, %4\n\t" \ | ||
78 | "addeq %0, %0, %3\n\t" \ | ||
79 | "ldr" instr " %1, [%0, %2, lsl #2] @ in" #fnsuffix \ | ||
80 | : "=&r" (temp), "=r" (value) \ | ||
81 | : "r" (port), "Ir" (PCIO_BASE - IO_BASE), "Ir" (IO_BASE) \ | ||
82 | : "cc"); \ | ||
83 | return (unsigned sz)value; \ | ||
84 | } | ||
85 | |||
86 | static inline void __iomem *__deprecated __ioaddr(unsigned int port) | ||
87 | { | ||
88 | void __iomem *ret; | ||
89 | if (__PORT_PCIO(port)) | ||
90 | ret = PCIO_BASE; | ||
91 | else | ||
92 | ret = IO_BASE; | ||
93 | return ret + (port << 2); | ||
94 | } | ||
95 | |||
96 | #define DECLARE_IO(sz,fnsuffix,instr) \ | ||
97 | DECLARE_DYN_IN(sz,fnsuffix,instr) | ||
98 | |||
99 | DECLARE_IO(char,b,"b") | ||
100 | DECLARE_IO(short,w,"") | ||
101 | DECLARE_IO(int,l,"") | ||
102 | |||
103 | #undef DECLARE_IO | ||
104 | #undef DECLARE_DYN_IN | ||
105 | |||
106 | /* | ||
107 | * Constant address IO functions | ||
108 | * | 25 | * |
109 | * These have to be macros for the 'J' constraint to work - | 26 | * These peripherals are found in an area of MMIO which looks very much |
110 | * +/-4096 immediate operand. | 27 | * like an ISA bus, but with registers at the low byte of each word. |
111 | */ | 28 | */ |
112 | #define __outbc(value,port) \ | 29 | #define __io(a) (PCIO_BASE + ((a) << 2)) |
113 | ({ \ | ||
114 | if (__PORT_PCIO((port))) \ | ||
115 | __asm__ __volatile__( \ | ||
116 | "strb %0, [%1, %2] @ outbc" \ | ||
117 | : : "r" (value), "r" (PCIO_BASE), "Jr" ((port) << 2)); \ | ||
118 | else \ | ||
119 | __asm__ __volatile__( \ | ||
120 | "strb %0, [%1, %2] @ outbc" \ | ||
121 | : : "r" (value), "r" (IO_BASE), "r" ((port) << 2)); \ | ||
122 | }) | ||
123 | |||
124 | #define __inbc(port) \ | ||
125 | ({ \ | ||
126 | unsigned char result; \ | ||
127 | if (__PORT_PCIO((port))) \ | ||
128 | __asm__ __volatile__( \ | ||
129 | "ldrb %0, [%1, %2] @ inbc" \ | ||
130 | : "=r" (result) : "r" (PCIO_BASE), "Jr" ((port) << 2)); \ | ||
131 | else \ | ||
132 | __asm__ __volatile__( \ | ||
133 | "ldrb %0, [%1, %2] @ inbc" \ | ||
134 | : "=r" (result) : "r" (IO_BASE), "r" ((port) << 2)); \ | ||
135 | result; \ | ||
136 | }) | ||
137 | |||
138 | #define __outwc(value,port) \ | ||
139 | ({ \ | ||
140 | unsigned long __v = value; \ | ||
141 | if (__PORT_PCIO((port))) \ | ||
142 | __asm__ __volatile__( \ | ||
143 | "str %0, [%1, %2] @ outwc" \ | ||
144 | : : "r" (__v|__v<<16), "r" (PCIO_BASE), "Jr" ((port) << 2)); \ | ||
145 | else \ | ||
146 | __asm__ __volatile__( \ | ||
147 | "str %0, [%1, %2] @ outwc" \ | ||
148 | : : "r" (__v|__v<<16), "r" (IO_BASE), "r" ((port) << 2)); \ | ||
149 | }) | ||
150 | |||
151 | #define __inwc(port) \ | ||
152 | ({ \ | ||
153 | unsigned short result; \ | ||
154 | if (__PORT_PCIO((port))) \ | ||
155 | __asm__ __volatile__( \ | ||
156 | "ldr %0, [%1, %2] @ inwc" \ | ||
157 | : "=r" (result) : "r" (PCIO_BASE), "Jr" ((port) << 2)); \ | ||
158 | else \ | ||
159 | __asm__ __volatile__( \ | ||
160 | "ldr %0, [%1, %2] @ inwc" \ | ||
161 | : "=r" (result) : "r" (IO_BASE), "r" ((port) << 2)); \ | ||
162 | result & 0xffff; \ | ||
163 | }) | ||
164 | |||
165 | #define __outlc(value,port) \ | ||
166 | ({ \ | ||
167 | unsigned long __v = value; \ | ||
168 | if (__PORT_PCIO((port))) \ | ||
169 | __asm__ __volatile__( \ | ||
170 | "str %0, [%1, %2] @ outlc" \ | ||
171 | : : "r" (__v), "r" (PCIO_BASE), "Jr" ((port) << 2)); \ | ||
172 | else \ | ||
173 | __asm__ __volatile__( \ | ||
174 | "str %0, [%1, %2] @ outlc" \ | ||
175 | : : "r" (__v), "r" (IO_BASE), "r" ((port) << 2)); \ | ||
176 | }) | ||
177 | |||
178 | #define __inlc(port) \ | ||
179 | ({ \ | ||
180 | unsigned long result; \ | ||
181 | if (__PORT_PCIO((port))) \ | ||
182 | __asm__ __volatile__( \ | ||
183 | "ldr %0, [%1, %2] @ inlc" \ | ||
184 | : "=r" (result) : "r" (PCIO_BASE), "Jr" ((port) << 2)); \ | ||
185 | else \ | ||
186 | __asm__ __volatile__( \ | ||
187 | "ldr %0, [%1, %2] @ inlc" \ | ||
188 | : "=r" (result) : "r" (IO_BASE), "r" ((port) << 2)); \ | ||
189 | result; \ | ||
190 | }) | ||
191 | |||
192 | #define inb(p) (__builtin_constant_p((p)) ? __inbc(p) : __inb(p)) | ||
193 | #define inw(p) (__builtin_constant_p((p)) ? __inwc(p) : __inw(p)) | ||
194 | #define inl(p) (__builtin_constant_p((p)) ? __inlc(p) : __inl(p)) | ||
195 | #define outb(v,p) (__builtin_constant_p((p)) ? __outbc(v,p) : __outb(v,p)) | ||
196 | #define outw(v,p) (__builtin_constant_p((p)) ? __outwc(v,p) : __outw(v,p)) | ||
197 | #define outl(v,p) (__builtin_constant_p((p)) ? __outlc(v,p) : __outl(v,p)) | ||
198 | |||
199 | /* the following macro is deprecated */ | ||
200 | #define ioaddr(port) ((unsigned long)__ioaddr((port))) | ||
201 | |||
202 | #define insb(p,d,l) __raw_readsb(__ioaddr(p),d,l) | ||
203 | #define insw(p,d,l) __raw_readsw(__ioaddr(p),d,l) | ||
204 | |||
205 | #define outsb(p,d,l) __raw_writesb(__ioaddr(p),d,l) | ||
206 | #define outsw(p,d,l) __raw_writesw(__ioaddr(p),d,l) | ||
207 | 30 | ||
208 | /* | 31 | /* |
209 | * 1:1 mapping for ioremapped regions. | 32 | * 1:1 mapping for ioremapped regions. |
diff --git a/arch/arm/mach-rpc/riscpc.c b/arch/arm/mach-rpc/riscpc.c index 580b3c73d2c7..1e0e60d04622 100644 --- a/arch/arm/mach-rpc/riscpc.c +++ b/arch/arm/mach-rpc/riscpc.c | |||
@@ -74,7 +74,7 @@ static struct map_desc rpc_io_desc[] __initdata = { | |||
74 | .length = IO_SIZE , | 74 | .length = IO_SIZE , |
75 | .type = MT_DEVICE | 75 | .type = MT_DEVICE |
76 | }, { /* EASI space */ | 76 | }, { /* EASI space */ |
77 | .virtual = EASI_BASE, | 77 | .virtual = (unsigned long)EASI_BASE, |
78 | .pfn = __phys_to_pfn(EASI_START), | 78 | .pfn = __phys_to_pfn(EASI_START), |
79 | .length = EASI_SIZE, | 79 | .length = EASI_SIZE, |
80 | .type = MT_DEVICE | 80 | .type = MT_DEVICE |
diff --git a/arch/arm/mach-s3c2410/Makefile.boot b/arch/arm/mach-s3c2410/Makefile.boot index 58c1dd7f8e1d..4457605ba04a 100644 --- a/arch/arm/mach-s3c2410/Makefile.boot +++ b/arch/arm/mach-s3c2410/Makefile.boot | |||
@@ -1,7 +1,7 @@ | |||
1 | ifeq ($(CONFIG_PM_H1940),y) | 1 | ifeq ($(CONFIG_PM_H1940),y) |
2 | zreladdr-y := 0x30108000 | 2 | zreladdr-y += 0x30108000 |
3 | params_phys-y := 0x30100100 | 3 | params_phys-y := 0x30100100 |
4 | else | 4 | else |
5 | zreladdr-y := 0x30008000 | 5 | zreladdr-y += 0x30008000 |
6 | params_phys-y := 0x30000100 | 6 | params_phys-y := 0x30000100 |
7 | endif | 7 | endif |
diff --git a/arch/arm/mach-s3c2410/include/mach/io.h b/arch/arm/mach-s3c2410/include/mach/io.h index 9813dbf2ae4f..118749f37c4c 100644 --- a/arch/arm/mach-s3c2410/include/mach/io.h +++ b/arch/arm/mach-s3c2410/include/mach/io.h | |||
@@ -199,8 +199,6 @@ DECLARE_IO(int,l,"") | |||
199 | #define outw(v,p) (__builtin_constant_p((p)) ? __outwc(v,p) : __outw(v,p)) | 199 | #define outw(v,p) (__builtin_constant_p((p)) ? __outwc(v,p) : __outw(v,p)) |
200 | #define outl(v,p) (__builtin_constant_p((p)) ? __outlc(v,p) : __outl(v,p)) | 200 | #define outl(v,p) (__builtin_constant_p((p)) ? __outlc(v,p) : __outl(v,p)) |
201 | #define __ioaddr(p) (__builtin_constant_p((p)) ? __ioaddr(p) : __ioaddrc(p)) | 201 | #define __ioaddr(p) (__builtin_constant_p((p)) ? __ioaddr(p) : __ioaddrc(p)) |
202 | /* the following macro is deprecated */ | ||
203 | #define ioaddr(port) __ioaddr((port)) | ||
204 | 202 | ||
205 | #define insb(p,d,l) __raw_readsb(__ioaddr(p),d,l) | 203 | #define insb(p,d,l) __raw_readsb(__ioaddr(p),d,l) |
206 | #define insw(p,d,l) __raw_readsw(__ioaddr(p),d,l) | 204 | #define insw(p,d,l) __raw_readsw(__ioaddr(p),d,l) |
diff --git a/arch/arm/mach-s3c2410/s3c2410.c b/arch/arm/mach-s3c2410/s3c2410.c index f1d3bd8f6f17..343a540d86a9 100644 --- a/arch/arm/mach-s3c2410/s3c2410.c +++ b/arch/arm/mach-s3c2410/s3c2410.c | |||
@@ -170,7 +170,9 @@ int __init s3c2410_init(void) | |||
170 | { | 170 | { |
171 | printk("S3C2410: Initialising architecture\n"); | 171 | printk("S3C2410: Initialising architecture\n"); |
172 | 172 | ||
173 | #ifdef CONFIG_PM | ||
173 | register_syscore_ops(&s3c2410_pm_syscore_ops); | 174 | register_syscore_ops(&s3c2410_pm_syscore_ops); |
175 | #endif | ||
174 | register_syscore_ops(&s3c24xx_irq_syscore_ops); | 176 | register_syscore_ops(&s3c24xx_irq_syscore_ops); |
175 | 177 | ||
176 | return sysdev_register(&s3c2410_sysdev); | 178 | return sysdev_register(&s3c2410_sysdev); |
diff --git a/arch/arm/mach-s3c2412/mach-smdk2413.c b/arch/arm/mach-s3c2412/mach-smdk2413.c index 834cfb61bcfe..3391713e0c92 100644 --- a/arch/arm/mach-s3c2412/mach-smdk2413.c +++ b/arch/arm/mach-s3c2412/mach-smdk2413.c | |||
@@ -92,8 +92,7 @@ static struct platform_device *smdk2413_devices[] __initdata = { | |||
92 | &s3c_device_usbgadget, | 92 | &s3c_device_usbgadget, |
93 | }; | 93 | }; |
94 | 94 | ||
95 | static void __init smdk2413_fixup(struct machine_desc *desc, | 95 | static void __init smdk2413_fixup(struct tag *tags, char **cmdline, |
96 | struct tag *tags, char **cmdline, | ||
97 | struct meminfo *mi) | 96 | struct meminfo *mi) |
98 | { | 97 | { |
99 | if (tags != phys_to_virt(S3C2410_SDRAM_PA + 0x100)) { | 98 | if (tags != phys_to_virt(S3C2410_SDRAM_PA + 0x100)) { |
diff --git a/arch/arm/mach-s3c2412/mach-vstms.c b/arch/arm/mach-s3c2412/mach-vstms.c index 83544ebe20ac..b6ed4573553a 100644 --- a/arch/arm/mach-s3c2412/mach-vstms.c +++ b/arch/arm/mach-s3c2412/mach-vstms.c | |||
@@ -129,9 +129,8 @@ static struct platform_device *vstms_devices[] __initdata = { | |||
129 | &s3c_device_nand, | 129 | &s3c_device_nand, |
130 | }; | 130 | }; |
131 | 131 | ||
132 | static void __init vstms_fixup(struct machine_desc *desc, | 132 | static void __init vstms_fixup(struct tag *tags, char **cmdline, |
133 | struct tag *tags, char **cmdline, | 133 | struct meminfo *mi) |
134 | struct meminfo *mi) | ||
135 | { | 134 | { |
136 | if (tags != phys_to_virt(S3C2410_SDRAM_PA + 0x100)) { | 135 | if (tags != phys_to_virt(S3C2410_SDRAM_PA + 0x100)) { |
137 | mi->nr_banks=1; | 136 | mi->nr_banks=1; |
diff --git a/arch/arm/mach-s3c2412/s3c2412.c b/arch/arm/mach-s3c2412/s3c2412.c index ef0958d3e5c6..57a1e01e4e50 100644 --- a/arch/arm/mach-s3c2412/s3c2412.c +++ b/arch/arm/mach-s3c2412/s3c2412.c | |||
@@ -245,7 +245,9 @@ int __init s3c2412_init(void) | |||
245 | { | 245 | { |
246 | printk("S3C2412: Initialising architecture\n"); | 246 | printk("S3C2412: Initialising architecture\n"); |
247 | 247 | ||
248 | #ifdef CONFIG_PM | ||
248 | register_syscore_ops(&s3c2412_pm_syscore_ops); | 249 | register_syscore_ops(&s3c2412_pm_syscore_ops); |
250 | #endif | ||
249 | register_syscore_ops(&s3c24xx_irq_syscore_ops); | 251 | register_syscore_ops(&s3c24xx_irq_syscore_ops); |
250 | 252 | ||
251 | return sysdev_register(&s3c2412_sysdev); | 253 | return sysdev_register(&s3c2412_sysdev); |
diff --git a/arch/arm/mach-s3c2416/s3c2416.c b/arch/arm/mach-s3c2416/s3c2416.c index 494ce913dc95..20b3fdfb3051 100644 --- a/arch/arm/mach-s3c2416/s3c2416.c +++ b/arch/arm/mach-s3c2416/s3c2416.c | |||
@@ -97,7 +97,9 @@ int __init s3c2416_init(void) | |||
97 | 97 | ||
98 | s3c_fb_setname("s3c2443-fb"); | 98 | s3c_fb_setname("s3c2443-fb"); |
99 | 99 | ||
100 | #ifdef CONFIG_PM | ||
100 | register_syscore_ops(&s3c2416_pm_syscore_ops); | 101 | register_syscore_ops(&s3c2416_pm_syscore_ops); |
102 | #endif | ||
101 | register_syscore_ops(&s3c24xx_irq_syscore_ops); | 103 | register_syscore_ops(&s3c24xx_irq_syscore_ops); |
102 | 104 | ||
103 | return sysdev_register(&s3c2416_sysdev); | 105 | return sysdev_register(&s3c2416_sysdev); |
diff --git a/arch/arm/mach-s3c2440/s3c2440.c b/arch/arm/mach-s3c2440/s3c2440.c index ce99ff72838d..2270d3360216 100644 --- a/arch/arm/mach-s3c2440/s3c2440.c +++ b/arch/arm/mach-s3c2440/s3c2440.c | |||
@@ -55,7 +55,9 @@ int __init s3c2440_init(void) | |||
55 | 55 | ||
56 | /* register suspend/resume handlers */ | 56 | /* register suspend/resume handlers */ |
57 | 57 | ||
58 | #ifdef CONFIG_PM | ||
58 | register_syscore_ops(&s3c2410_pm_syscore_ops); | 59 | register_syscore_ops(&s3c2410_pm_syscore_ops); |
60 | #endif | ||
59 | register_syscore_ops(&s3c244x_pm_syscore_ops); | 61 | register_syscore_ops(&s3c244x_pm_syscore_ops); |
60 | register_syscore_ops(&s3c24xx_irq_syscore_ops); | 62 | register_syscore_ops(&s3c24xx_irq_syscore_ops); |
61 | 63 | ||
diff --git a/arch/arm/mach-s3c2440/s3c2442.c b/arch/arm/mach-s3c2440/s3c2442.c index 9ad99f8016a1..6f2b65e6e068 100644 --- a/arch/arm/mach-s3c2440/s3c2442.c +++ b/arch/arm/mach-s3c2440/s3c2442.c | |||
@@ -169,7 +169,9 @@ int __init s3c2442_init(void) | |||
169 | { | 169 | { |
170 | printk("S3C2442: Initialising architecture\n"); | 170 | printk("S3C2442: Initialising architecture\n"); |
171 | 171 | ||
172 | #ifdef CONFIG_PM | ||
172 | register_syscore_ops(&s3c2410_pm_syscore_ops); | 173 | register_syscore_ops(&s3c2410_pm_syscore_ops); |
174 | #endif | ||
173 | register_syscore_ops(&s3c244x_pm_syscore_ops); | 175 | register_syscore_ops(&s3c244x_pm_syscore_ops); |
174 | register_syscore_ops(&s3c24xx_irq_syscore_ops); | 176 | register_syscore_ops(&s3c24xx_irq_syscore_ops); |
175 | 177 | ||
diff --git a/arch/arm/mach-s3c2443/clock.c b/arch/arm/mach-s3c2443/clock.c index a1a7176675b9..38058af48972 100644 --- a/arch/arm/mach-s3c2443/clock.c +++ b/arch/arm/mach-s3c2443/clock.c | |||
@@ -128,7 +128,7 @@ static int s3c2443_armclk_setrate(struct clk *clk, unsigned long rate) | |||
128 | unsigned long clkcon0; | 128 | unsigned long clkcon0; |
129 | 129 | ||
130 | clkcon0 = __raw_readl(S3C2443_CLKDIV0); | 130 | clkcon0 = __raw_readl(S3C2443_CLKDIV0); |
131 | clkcon0 &= S3C2443_CLKDIV0_ARMDIV_MASK; | 131 | clkcon0 &= ~S3C2443_CLKDIV0_ARMDIV_MASK; |
132 | clkcon0 |= val << S3C2443_CLKDIV0_ARMDIV_SHIFT; | 132 | clkcon0 |= val << S3C2443_CLKDIV0_ARMDIV_SHIFT; |
133 | __raw_writel(clkcon0, S3C2443_CLKDIV0); | 133 | __raw_writel(clkcon0, S3C2443_CLKDIV0); |
134 | } | 134 | } |
diff --git a/arch/arm/mach-s3c64xx/Makefile.boot b/arch/arm/mach-s3c64xx/Makefile.boot index ba41fdc0a586..c642333af3ed 100644 --- a/arch/arm/mach-s3c64xx/Makefile.boot +++ b/arch/arm/mach-s3c64xx/Makefile.boot | |||
@@ -1,2 +1,2 @@ | |||
1 | zreladdr-y := 0x50008000 | 1 | zreladdr-y += 0x50008000 |
2 | params_phys-y := 0x50000100 | 2 | params_phys-y := 0x50000100 |
diff --git a/arch/arm/mach-s3c64xx/mach-smdk6410.c b/arch/arm/mach-s3c64xx/mach-smdk6410.c index ecbea92bf83b..a9f3183e0290 100644 --- a/arch/arm/mach-s3c64xx/mach-smdk6410.c +++ b/arch/arm/mach-s3c64xx/mach-smdk6410.c | |||
@@ -262,45 +262,6 @@ static struct samsung_keypad_platdata smdk6410_keypad_data __initdata = { | |||
262 | .cols = 8, | 262 | .cols = 8, |
263 | }; | 263 | }; |
264 | 264 | ||
265 | static int smdk6410_backlight_init(struct device *dev) | ||
266 | { | ||
267 | int ret; | ||
268 | |||
269 | ret = gpio_request(S3C64XX_GPF(15), "Backlight"); | ||
270 | if (ret) { | ||
271 | printk(KERN_ERR "failed to request GPF for PWM-OUT1\n"); | ||
272 | return ret; | ||
273 | } | ||
274 | |||
275 | /* Configure GPIO pin with S3C64XX_GPF15_PWM_TOUT1 */ | ||
276 | s3c_gpio_cfgpin(S3C64XX_GPF(15), S3C_GPIO_SFN(2)); | ||
277 | |||
278 | return 0; | ||
279 | } | ||
280 | |||
281 | static void smdk6410_backlight_exit(struct device *dev) | ||
282 | { | ||
283 | s3c_gpio_cfgpin(S3C64XX_GPF(15), S3C_GPIO_OUTPUT); | ||
284 | gpio_free(S3C64XX_GPF(15)); | ||
285 | } | ||
286 | |||
287 | static struct platform_pwm_backlight_data smdk6410_backlight_data = { | ||
288 | .pwm_id = 1, | ||
289 | .max_brightness = 255, | ||
290 | .dft_brightness = 255, | ||
291 | .pwm_period_ns = 78770, | ||
292 | .init = smdk6410_backlight_init, | ||
293 | .exit = smdk6410_backlight_exit, | ||
294 | }; | ||
295 | |||
296 | static struct platform_device smdk6410_backlight_device = { | ||
297 | .name = "pwm-backlight", | ||
298 | .dev = { | ||
299 | .parent = &s3c_device_timer[1].dev, | ||
300 | .platform_data = &smdk6410_backlight_data, | ||
301 | }, | ||
302 | }; | ||
303 | |||
304 | static struct map_desc smdk6410_iodesc[] = {}; | 265 | static struct map_desc smdk6410_iodesc[] = {}; |
305 | 266 | ||
306 | static struct platform_device *smdk6410_devices[] __initdata = { | 267 | static struct platform_device *smdk6410_devices[] __initdata = { |
diff --git a/arch/arm/mach-s5p64x0/Makefile.boot b/arch/arm/mach-s5p64x0/Makefile.boot index ff90aa13bd67..79ece4055b02 100644 --- a/arch/arm/mach-s5p64x0/Makefile.boot +++ b/arch/arm/mach-s5p64x0/Makefile.boot | |||
@@ -1,2 +1,2 @@ | |||
1 | zreladdr-y := 0x20008000 | 1 | zreladdr-y += 0x20008000 |
2 | params_phys-y := 0x20000100 | 2 | params_phys-y := 0x20000100 |
diff --git a/arch/arm/mach-s5pc100/Makefile.boot b/arch/arm/mach-s5pc100/Makefile.boot index ff90aa13bd67..79ece4055b02 100644 --- a/arch/arm/mach-s5pc100/Makefile.boot +++ b/arch/arm/mach-s5pc100/Makefile.boot | |||
@@ -1,2 +1,2 @@ | |||
1 | zreladdr-y := 0x20008000 | 1 | zreladdr-y += 0x20008000 |
2 | params_phys-y := 0x20000100 | 2 | params_phys-y := 0x20000100 |
diff --git a/arch/arm/mach-s5pv210/Makefile.boot b/arch/arm/mach-s5pv210/Makefile.boot index ff90aa13bd67..79ece4055b02 100644 --- a/arch/arm/mach-s5pv210/Makefile.boot +++ b/arch/arm/mach-s5pv210/Makefile.boot | |||
@@ -1,2 +1,2 @@ | |||
1 | zreladdr-y := 0x20008000 | 1 | zreladdr-y += 0x20008000 |
2 | params_phys-y := 0x20000100 | 2 | params_phys-y := 0x20000100 |
diff --git a/arch/arm/mach-s5pv210/clock.c b/arch/arm/mach-s5pv210/clock.c index 52a8e607bcc2..f5f8fa89679c 100644 --- a/arch/arm/mach-s5pv210/clock.c +++ b/arch/arm/mach-s5pv210/clock.c | |||
@@ -815,8 +815,7 @@ static struct clksrc_clk clksrcs[] = { | |||
815 | .reg_div = { .reg = S5P_CLK_DIV3, .shift = 20, .size = 4 }, | 815 | .reg_div = { .reg = S5P_CLK_DIV3, .shift = 20, .size = 4 }, |
816 | }, { | 816 | }, { |
817 | .clk = { | 817 | .clk = { |
818 | .name = "sclk_cam", | 818 | .name = "sclk_cam0", |
819 | .devname = "s5pv210-fimc.0", | ||
820 | .enable = s5pv210_clk_mask0_ctrl, | 819 | .enable = s5pv210_clk_mask0_ctrl, |
821 | .ctrlbit = (1 << 3), | 820 | .ctrlbit = (1 << 3), |
822 | }, | 821 | }, |
@@ -825,8 +824,7 @@ static struct clksrc_clk clksrcs[] = { | |||
825 | .reg_div = { .reg = S5P_CLK_DIV1, .shift = 12, .size = 4 }, | 824 | .reg_div = { .reg = S5P_CLK_DIV1, .shift = 12, .size = 4 }, |
826 | }, { | 825 | }, { |
827 | .clk = { | 826 | .clk = { |
828 | .name = "sclk_cam", | 827 | .name = "sclk_cam1", |
829 | .devname = "s5pv210-fimc.1", | ||
830 | .enable = s5pv210_clk_mask0_ctrl, | 828 | .enable = s5pv210_clk_mask0_ctrl, |
831 | .ctrlbit = (1 << 4), | 829 | .ctrlbit = (1 << 4), |
832 | }, | 830 | }, |
diff --git a/arch/arm/mach-sa1100/Makefile b/arch/arm/mach-sa1100/Makefile index 41252d22e659..00631787e80a 100644 --- a/arch/arm/mach-sa1100/Makefile +++ b/arch/arm/mach-sa1100/Makefile | |||
@@ -45,7 +45,6 @@ obj-$(CONFIG_SA1100_PLEB) += pleb.o | |||
45 | obj-$(CONFIG_SA1100_SHANNON) += shannon.o | 45 | obj-$(CONFIG_SA1100_SHANNON) += shannon.o |
46 | 46 | ||
47 | obj-$(CONFIG_SA1100_SIMPAD) += simpad.o | 47 | obj-$(CONFIG_SA1100_SIMPAD) += simpad.o |
48 | led-$(CONFIG_SA1100_SIMPAD) += leds-simpad.o | ||
49 | 48 | ||
50 | # LEDs support | 49 | # LEDs support |
51 | obj-$(CONFIG_LEDS) += $(led-y) | 50 | obj-$(CONFIG_LEDS) += $(led-y) |
diff --git a/arch/arm/mach-sa1100/Makefile.boot b/arch/arm/mach-sa1100/Makefile.boot index a56ad0417cf2..5a616f6e5612 100644 --- a/arch/arm/mach-sa1100/Makefile.boot +++ b/arch/arm/mach-sa1100/Makefile.boot | |||
@@ -1,6 +1,7 @@ | |||
1 | zreladdr-y := 0xc0008000 | ||
2 | ifeq ($(CONFIG_ARCH_SA1100),y) | 1 | ifeq ($(CONFIG_ARCH_SA1100),y) |
3 | zreladdr-$(CONFIG_SA1111) := 0xc0208000 | 2 | zreladdr-$(CONFIG_SA1111) += 0xc0208000 |
3 | else | ||
4 | zreladdr-y += 0xc0008000 | ||
4 | endif | 5 | endif |
5 | params_phys-y := 0xc0000100 | 6 | params_phys-y := 0xc0000100 |
6 | initrd_phys-y := 0xc0800000 | 7 | initrd_phys-y := 0xc0800000 |
diff --git a/arch/arm/mach-sa1100/assabet.c b/arch/arm/mach-sa1100/assabet.c index 26257df19b63..6290ce28b883 100644 --- a/arch/arm/mach-sa1100/assabet.c +++ b/arch/arm/mach-sa1100/assabet.c | |||
@@ -301,8 +301,7 @@ static void __init get_assabet_scr(void) | |||
301 | } | 301 | } |
302 | 302 | ||
303 | static void __init | 303 | static void __init |
304 | fixup_assabet(struct machine_desc *desc, struct tag *tags, | 304 | fixup_assabet(struct tag *tags, char **cmdline, struct meminfo *mi) |
305 | char **cmdline, struct meminfo *mi) | ||
306 | { | 305 | { |
307 | /* This must be done before any call to machine_has_neponset() */ | 306 | /* This must be done before any call to machine_has_neponset() */ |
308 | map_sa1100_gpio_regs(); | 307 | map_sa1100_gpio_regs(); |
diff --git a/arch/arm/mach-sa1100/include/mach/io.h b/arch/arm/mach-sa1100/include/mach/io.h index d8b43f3dcd2d..dfc27ff08344 100644 --- a/arch/arm/mach-sa1100/include/mach/io.h +++ b/arch/arm/mach-sa1100/include/mach/io.h | |||
@@ -10,11 +10,9 @@ | |||
10 | #ifndef __ASM_ARM_ARCH_IO_H | 10 | #ifndef __ASM_ARM_ARCH_IO_H |
11 | #define __ASM_ARM_ARCH_IO_H | 11 | #define __ASM_ARM_ARCH_IO_H |
12 | 12 | ||
13 | #define IO_SPACE_LIMIT 0xffffffff | ||
14 | |||
15 | /* | 13 | /* |
16 | * We don't actually have real ISA nor PCI buses, but there is so many | 14 | * __io() is required to be an equivalent mapping to __mem_pci() for |
17 | * drivers out there that might just work if we fake them... | 15 | * SOC_COMMON to work. |
18 | */ | 16 | */ |
19 | #define __io(a) __typesafe_io(a) | 17 | #define __io(a) __typesafe_io(a) |
20 | #define __mem_pci(a) (a) | 18 | #define __mem_pci(a) (a) |
diff --git a/arch/arm/mach-sa1100/include/mach/simpad.h b/arch/arm/mach-sa1100/include/mach/simpad.h index 9296c4513ce1..db28118103eb 100644 --- a/arch/arm/mach-sa1100/include/mach/simpad.h +++ b/arch/arm/mach-sa1100/include/mach/simpad.h | |||
@@ -48,32 +48,80 @@ | |||
48 | #define GPIO_SMART_CARD GPIO_GPIO10 | 48 | #define GPIO_SMART_CARD GPIO_GPIO10 |
49 | #define IRQ_GPIO_SMARD_CARD IRQ_GPIO10 | 49 | #define IRQ_GPIO_SMARD_CARD IRQ_GPIO10 |
50 | 50 | ||
51 | // CS3 Latch is write only, a shadow is necessary | 51 | /*--- ucb1x00 GPIO ---*/ |
52 | #define SIMPAD_UCB1X00_GPIO_BASE (GPIO_MAX + 1) | ||
53 | #define SIMPAD_UCB1X00_GPIO_PROG1 (SIMPAD_UCB1X00_GPIO_BASE) | ||
54 | #define SIMPAD_UCB1X00_GPIO_PROG2 (SIMPAD_UCB1X00_GPIO_BASE + 1) | ||
55 | #define SIMPAD_UCB1X00_GPIO_UP (SIMPAD_UCB1X00_GPIO_BASE + 2) | ||
56 | #define SIMPAD_UCB1X00_GPIO_DOWN (SIMPAD_UCB1X00_GPIO_BASE + 3) | ||
57 | #define SIMPAD_UCB1X00_GPIO_LEFT (SIMPAD_UCB1X00_GPIO_BASE + 4) | ||
58 | #define SIMPAD_UCB1X00_GPIO_RIGHT (SIMPAD_UCB1X00_GPIO_BASE + 5) | ||
59 | #define SIMPAD_UCB1X00_GPIO_6 (SIMPAD_UCB1X00_GPIO_BASE + 6) | ||
60 | #define SIMPAD_UCB1X00_GPIO_7 (SIMPAD_UCB1X00_GPIO_BASE + 7) | ||
61 | #define SIMPAD_UCB1X00_GPIO_HEADSET (SIMPAD_UCB1X00_GPIO_BASE + 8) | ||
62 | #define SIMPAD_UCB1X00_GPIO_SPEAKER (SIMPAD_UCB1X00_GPIO_BASE + 9) | ||
63 | |||
64 | /*--- CS3 Latch ---*/ | ||
65 | #define SIMPAD_CS3_GPIO_BASE (GPIO_MAX + 11) | ||
66 | #define SIMPAD_CS3_VCC_5V_EN (SIMPAD_CS3_GPIO_BASE) | ||
67 | #define SIMPAD_CS3_VCC_3V_EN (SIMPAD_CS3_GPIO_BASE + 1) | ||
68 | #define SIMPAD_CS3_EN1 (SIMPAD_CS3_GPIO_BASE + 2) | ||
69 | #define SIMPAD_CS3_EN0 (SIMPAD_CS3_GPIO_BASE + 3) | ||
70 | #define SIMPAD_CS3_DISPLAY_ON (SIMPAD_CS3_GPIO_BASE + 4) | ||
71 | #define SIMPAD_CS3_PCMCIA_BUFF_DIS (SIMPAD_CS3_GPIO_BASE + 5) | ||
72 | #define SIMPAD_CS3_MQ_RESET (SIMPAD_CS3_GPIO_BASE + 6) | ||
73 | #define SIMPAD_CS3_PCMCIA_RESET (SIMPAD_CS3_GPIO_BASE + 7) | ||
74 | #define SIMPAD_CS3_DECT_POWER_ON (SIMPAD_CS3_GPIO_BASE + 8) | ||
75 | #define SIMPAD_CS3_IRDA_SD (SIMPAD_CS3_GPIO_BASE + 9) | ||
76 | #define SIMPAD_CS3_RS232_ON (SIMPAD_CS3_GPIO_BASE + 10) | ||
77 | #define SIMPAD_CS3_SD_MEDIAQ (SIMPAD_CS3_GPIO_BASE + 11) | ||
78 | #define SIMPAD_CS3_LED2_ON (SIMPAD_CS3_GPIO_BASE + 12) | ||
79 | #define SIMPAD_CS3_IRDA_MODE (SIMPAD_CS3_GPIO_BASE + 13) | ||
80 | #define SIMPAD_CS3_ENABLE_5V (SIMPAD_CS3_GPIO_BASE + 14) | ||
81 | #define SIMPAD_CS3_RESET_SIMCARD (SIMPAD_CS3_GPIO_BASE + 15) | ||
82 | |||
83 | #define SIMPAD_CS3_PCMCIA_BVD1 (SIMPAD_CS3_GPIO_BASE + 16) | ||
84 | #define SIMPAD_CS3_PCMCIA_BVD2 (SIMPAD_CS3_GPIO_BASE + 17) | ||
85 | #define SIMPAD_CS3_PCMCIA_VS1 (SIMPAD_CS3_GPIO_BASE + 18) | ||
86 | #define SIMPAD_CS3_PCMCIA_VS2 (SIMPAD_CS3_GPIO_BASE + 19) | ||
87 | #define SIMPAD_CS3_LOCK_IND (SIMPAD_CS3_GPIO_BASE + 20) | ||
88 | #define SIMPAD_CS3_CHARGING_STATE (SIMPAD_CS3_GPIO_BASE + 21) | ||
89 | #define SIMPAD_CS3_PCMCIA_SHORT (SIMPAD_CS3_GPIO_BASE + 22) | ||
90 | #define SIMPAD_CS3_GPIO_23 (SIMPAD_CS3_GPIO_BASE + 23) | ||
52 | 91 | ||
53 | #define CS3BUSTYPE unsigned volatile long | ||
54 | #define CS3_BASE 0xf1000000 | 92 | #define CS3_BASE 0xf1000000 |
55 | 93 | ||
56 | #define VCC_5V_EN 0x0001 // For 5V PCMCIA | 94 | long simpad_get_cs3_ro(void); |
57 | #define VCC_3V_EN 0x0002 // FOR 3.3V PCMCIA | 95 | long simpad_get_cs3_shadow(void); |
58 | #define EN1 0x0004 // This is only for EPROM's | 96 | void simpad_set_cs3_bit(int value); |
59 | #define EN0 0x0008 // Both should be enable for 3.3V or 5V | 97 | void simpad_clear_cs3_bit(int value); |
60 | #define DISPLAY_ON 0x0010 | 98 | |
61 | #define PCMCIA_BUFF_DIS 0x0020 | 99 | #define VCC_5V_EN 0x0001 /* For 5V PCMCIA */ |
62 | #define MQ_RESET 0x0040 | 100 | #define VCC_3V_EN 0x0002 /* FOR 3.3V PCMCIA */ |
63 | #define PCMCIA_RESET 0x0080 | 101 | #define EN1 0x0004 /* This is only for EPROM's */ |
64 | #define DECT_POWER_ON 0x0100 | 102 | #define EN0 0x0008 /* Both should be enable for 3.3V or 5V */ |
65 | #define IRDA_SD 0x0200 // Shutdown for powersave | 103 | #define DISPLAY_ON 0x0010 |
66 | #define RS232_ON 0x0400 | 104 | #define PCMCIA_BUFF_DIS 0x0020 |
67 | #define SD_MEDIAQ 0x0800 // Shutdown for powersave | 105 | #define MQ_RESET 0x0040 |
68 | #define LED2_ON 0x1000 | 106 | #define PCMCIA_RESET 0x0080 |
69 | #define IRDA_MODE 0x2000 // Fast/Slow IrDA mode | 107 | #define DECT_POWER_ON 0x0100 |
70 | #define ENABLE_5V 0x4000 // Enable 5V circuit | 108 | #define IRDA_SD 0x0200 /* Shutdown for powersave */ |
71 | #define RESET_SIMCARD 0x8000 | 109 | #define RS232_ON 0x0400 |
72 | 110 | #define SD_MEDIAQ 0x0800 /* Shutdown for powersave */ | |
73 | #define RS232_ENABLE 0x0440 | 111 | #define LED2_ON 0x1000 |
74 | #define PCMCIAMASK 0x402f | 112 | #define IRDA_MODE 0x2000 /* Fast/Slow IrDA mode */ |
75 | 113 | #define ENABLE_5V 0x4000 /* Enable 5V circuit */ | |
76 | 114 | #define RESET_SIMCARD 0x8000 | |
115 | |||
116 | #define PCMCIA_BVD1 0x01 | ||
117 | #define PCMCIA_BVD2 0x02 | ||
118 | #define PCMCIA_VS1 0x04 | ||
119 | #define PCMCIA_VS2 0x08 | ||
120 | #define LOCK_IND 0x10 | ||
121 | #define CHARGING_STATE 0x20 | ||
122 | #define PCMCIA_SHORT 0x40 | ||
123 | |||
124 | /*--- Battery ---*/ | ||
77 | struct simpad_battery { | 125 | struct simpad_battery { |
78 | unsigned char ac_status; /* line connected yes/no */ | 126 | unsigned char ac_status; /* line connected yes/no */ |
79 | unsigned char status; /* battery loading yes/no */ | 127 | unsigned char status; /* battery loading yes/no */ |
diff --git a/arch/arm/mach-sa1100/leds-simpad.c b/arch/arm/mach-sa1100/leds-simpad.c deleted file mode 100644 index d50f4eeaa12e..000000000000 --- a/arch/arm/mach-sa1100/leds-simpad.c +++ /dev/null | |||
@@ -1,100 +0,0 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/mach-sa1100/leds-simpad.c | ||
3 | * | ||
4 | * Author: Juergen Messerer <juergen.messerer@siemens.ch> | ||
5 | */ | ||
6 | #include <linux/init.h> | ||
7 | |||
8 | #include <mach/hardware.h> | ||
9 | #include <asm/leds.h> | ||
10 | #include <asm/system.h> | ||
11 | #include <mach/simpad.h> | ||
12 | |||
13 | #include "leds.h" | ||
14 | |||
15 | |||
16 | #define LED_STATE_ENABLED 1 | ||
17 | #define LED_STATE_CLAIMED 2 | ||
18 | |||
19 | static unsigned int led_state; | ||
20 | static unsigned int hw_led_state; | ||
21 | |||
22 | #define LED_GREEN (1) | ||
23 | #define LED_MASK (1) | ||
24 | |||
25 | extern void set_cs3_bit(int value); | ||
26 | extern void clear_cs3_bit(int value); | ||
27 | |||
28 | void simpad_leds_event(led_event_t evt) | ||
29 | { | ||
30 | switch (evt) | ||
31 | { | ||
32 | case led_start: | ||
33 | hw_led_state = LED_GREEN; | ||
34 | led_state = LED_STATE_ENABLED; | ||
35 | break; | ||
36 | |||
37 | case led_stop: | ||
38 | led_state &= ~LED_STATE_ENABLED; | ||
39 | break; | ||
40 | |||
41 | case led_claim: | ||
42 | led_state |= LED_STATE_CLAIMED; | ||
43 | hw_led_state = LED_GREEN; | ||
44 | break; | ||
45 | |||
46 | case led_release: | ||
47 | led_state &= ~LED_STATE_CLAIMED; | ||
48 | hw_led_state = LED_GREEN; | ||
49 | break; | ||
50 | |||
51 | #ifdef CONFIG_LEDS_TIMER | ||
52 | case led_timer: | ||
53 | if (!(led_state & LED_STATE_CLAIMED)) | ||
54 | hw_led_state ^= LED_GREEN; | ||
55 | break; | ||
56 | #endif | ||
57 | |||
58 | #ifdef CONFIG_LEDS_CPU | ||
59 | case led_idle_start: | ||
60 | break; | ||
61 | |||
62 | case led_idle_end: | ||
63 | break; | ||
64 | #endif | ||
65 | |||
66 | case led_halted: | ||
67 | break; | ||
68 | |||
69 | case led_green_on: | ||
70 | if (led_state & LED_STATE_CLAIMED) | ||
71 | hw_led_state |= LED_GREEN; | ||
72 | break; | ||
73 | |||
74 | case led_green_off: | ||
75 | if (led_state & LED_STATE_CLAIMED) | ||
76 | hw_led_state &= ~LED_GREEN; | ||
77 | break; | ||
78 | |||
79 | case led_amber_on: | ||
80 | break; | ||
81 | |||
82 | case led_amber_off: | ||
83 | break; | ||
84 | |||
85 | case led_red_on: | ||
86 | break; | ||
87 | |||
88 | case led_red_off: | ||
89 | break; | ||
90 | |||
91 | default: | ||
92 | break; | ||
93 | } | ||
94 | |||
95 | if (led_state & LED_STATE_ENABLED) | ||
96 | set_cs3_bit(LED2_ON); | ||
97 | else | ||
98 | clear_cs3_bit(LED2_ON); | ||
99 | } | ||
100 | |||
diff --git a/arch/arm/mach-sa1100/leds.c b/arch/arm/mach-sa1100/leds.c index bbfe197fb4d6..5fe71a0f1053 100644 --- a/arch/arm/mach-sa1100/leds.c +++ b/arch/arm/mach-sa1100/leds.c | |||
@@ -42,8 +42,6 @@ sa1100_leds_init(void) | |||
42 | leds_event = adsbitsy_leds_event; | 42 | leds_event = adsbitsy_leds_event; |
43 | if (machine_is_pt_system3()) | 43 | if (machine_is_pt_system3()) |
44 | leds_event = system3_leds_event; | 44 | leds_event = system3_leds_event; |
45 | if (machine_is_simpad()) | ||
46 | leds_event = simpad_leds_event; /* what about machine registry? including led, apm... -zecke */ | ||
47 | 45 | ||
48 | leds_event(led_start); | 46 | leds_event(led_start); |
49 | return 0; | 47 | return 0; |
diff --git a/arch/arm/mach-sa1100/leds.h b/arch/arm/mach-sa1100/leds.h index 68cc9f773d6d..776b6020f550 100644 --- a/arch/arm/mach-sa1100/leds.h +++ b/arch/arm/mach-sa1100/leds.h | |||
@@ -11,4 +11,3 @@ extern void pfs168_leds_event(led_event_t evt); | |||
11 | extern void graphicsmaster_leds_event(led_event_t evt); | 11 | extern void graphicsmaster_leds_event(led_event_t evt); |
12 | extern void adsbitsy_leds_event(led_event_t evt); | 12 | extern void adsbitsy_leds_event(led_event_t evt); |
13 | extern void system3_leds_event(led_event_t evt); | 13 | extern void system3_leds_event(led_event_t evt); |
14 | extern void simpad_leds_event(led_event_t evt); | ||
diff --git a/arch/arm/mach-sa1100/simpad.c b/arch/arm/mach-sa1100/simpad.c index cfb76077bd25..34659f354bef 100644 --- a/arch/arm/mach-sa1100/simpad.c +++ b/arch/arm/mach-sa1100/simpad.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <linux/mtd/mtd.h> | 13 | #include <linux/mtd/mtd.h> |
14 | #include <linux/mtd/partitions.h> | 14 | #include <linux/mtd/partitions.h> |
15 | #include <linux/io.h> | 15 | #include <linux/io.h> |
16 | #include <linux/gpio.h> | ||
16 | 17 | ||
17 | #include <asm/irq.h> | 18 | #include <asm/irq.h> |
18 | #include <mach/hardware.h> | 19 | #include <mach/hardware.h> |
@@ -28,35 +29,92 @@ | |||
28 | 29 | ||
29 | #include <linux/serial_core.h> | 30 | #include <linux/serial_core.h> |
30 | #include <linux/ioport.h> | 31 | #include <linux/ioport.h> |
32 | #include <linux/input.h> | ||
33 | #include <linux/gpio_keys.h> | ||
34 | #include <linux/leds.h> | ||
35 | #include <linux/i2c-gpio.h> | ||
31 | 36 | ||
32 | #include "generic.h" | 37 | #include "generic.h" |
33 | 38 | ||
34 | long cs3_shadow; | 39 | /* |
40 | * CS3 support | ||
41 | */ | ||
35 | 42 | ||
36 | long get_cs3_shadow(void) | 43 | static long cs3_shadow; |
44 | static spinlock_t cs3_lock; | ||
45 | static struct gpio_chip cs3_gpio; | ||
46 | |||
47 | long simpad_get_cs3_ro(void) | ||
48 | { | ||
49 | return readl(CS3_BASE); | ||
50 | } | ||
51 | EXPORT_SYMBOL(simpad_get_cs3_ro); | ||
52 | |||
53 | long simpad_get_cs3_shadow(void) | ||
37 | { | 54 | { |
38 | return cs3_shadow; | 55 | return cs3_shadow; |
39 | } | 56 | } |
57 | EXPORT_SYMBOL(simpad_get_cs3_shadow); | ||
40 | 58 | ||
41 | void set_cs3(long value) | 59 | static void __simpad_write_cs3(void) |
42 | { | 60 | { |
43 | *(CS3BUSTYPE *)(CS3_BASE) = cs3_shadow = value; | 61 | writel(cs3_shadow, CS3_BASE); |
44 | } | 62 | } |
45 | 63 | ||
46 | void set_cs3_bit(int value) | 64 | void simpad_set_cs3_bit(int value) |
47 | { | 65 | { |
66 | unsigned long flags; | ||
67 | |||
68 | spin_lock_irqsave(&cs3_lock, flags); | ||
48 | cs3_shadow |= value; | 69 | cs3_shadow |= value; |
49 | *(CS3BUSTYPE *)(CS3_BASE) = cs3_shadow; | 70 | __simpad_write_cs3(); |
71 | spin_unlock_irqrestore(&cs3_lock, flags); | ||
50 | } | 72 | } |
73 | EXPORT_SYMBOL(simpad_set_cs3_bit); | ||
51 | 74 | ||
52 | void clear_cs3_bit(int value) | 75 | void simpad_clear_cs3_bit(int value) |
53 | { | 76 | { |
77 | unsigned long flags; | ||
78 | |||
79 | spin_lock_irqsave(&cs3_lock, flags); | ||
54 | cs3_shadow &= ~value; | 80 | cs3_shadow &= ~value; |
55 | *(CS3BUSTYPE *)(CS3_BASE) = cs3_shadow; | 81 | __simpad_write_cs3(); |
82 | spin_unlock_irqrestore(&cs3_lock, flags); | ||
56 | } | 83 | } |
84 | EXPORT_SYMBOL(simpad_clear_cs3_bit); | ||
85 | |||
86 | static void cs3_gpio_set(struct gpio_chip *chip, unsigned offset, int value) | ||
87 | { | ||
88 | if (offset > 15) | ||
89 | return; | ||
90 | if (value) | ||
91 | simpad_set_cs3_bit(1 << offset); | ||
92 | else | ||
93 | simpad_clear_cs3_bit(1 << offset); | ||
94 | }; | ||
95 | |||
96 | static int cs3_gpio_get(struct gpio_chip *chip, unsigned offset) | ||
97 | { | ||
98 | if (offset > 15) | ||
99 | return simpad_get_cs3_ro() & (1 << (offset - 16)); | ||
100 | return simpad_get_cs3_shadow() & (1 << offset); | ||
101 | }; | ||
57 | 102 | ||
58 | EXPORT_SYMBOL(set_cs3_bit); | 103 | static int cs3_gpio_direction_input(struct gpio_chip *chip, unsigned offset) |
59 | EXPORT_SYMBOL(clear_cs3_bit); | 104 | { |
105 | if (offset > 15) | ||
106 | return 0; | ||
107 | return -EINVAL; | ||
108 | }; | ||
109 | |||
110 | static int cs3_gpio_direction_output(struct gpio_chip *chip, unsigned offset, | ||
111 | int value) | ||
112 | { | ||
113 | if (offset > 15) | ||
114 | return -EINVAL; | ||
115 | cs3_gpio_set(chip, offset, value); | ||
116 | return 0; | ||
117 | }; | ||
60 | 118 | ||
61 | static struct map_desc simpad_io_desc[] __initdata = { | 119 | static struct map_desc simpad_io_desc[] __initdata = { |
62 | { /* MQ200 */ | 120 | { /* MQ200 */ |
@@ -64,9 +122,9 @@ static struct map_desc simpad_io_desc[] __initdata = { | |||
64 | .pfn = __phys_to_pfn(0x4b800000), | 122 | .pfn = __phys_to_pfn(0x4b800000), |
65 | .length = 0x00800000, | 123 | .length = 0x00800000, |
66 | .type = MT_DEVICE | 124 | .type = MT_DEVICE |
67 | }, { /* Paules CS3, write only */ | 125 | }, { /* Simpad CS3 */ |
68 | .virtual = 0xf1000000, | 126 | .virtual = CS3_BASE, |
69 | .pfn = __phys_to_pfn(0x18000000), | 127 | .pfn = __phys_to_pfn(SA1100_CS3_PHYS), |
70 | .length = 0x00100000, | 128 | .length = 0x00100000, |
71 | .type = MT_DEVICE | 129 | .type = MT_DEVICE |
72 | }, | 130 | }, |
@@ -78,12 +136,12 @@ static void simpad_uart_pm(struct uart_port *port, u_int state, u_int oldstate) | |||
78 | if (port->mapbase == (u_int)&Ser1UTCR0) { | 136 | if (port->mapbase == (u_int)&Ser1UTCR0) { |
79 | if (state) | 137 | if (state) |
80 | { | 138 | { |
81 | clear_cs3_bit(RS232_ON); | 139 | simpad_clear_cs3_bit(RS232_ON); |
82 | clear_cs3_bit(DECT_POWER_ON); | 140 | simpad_clear_cs3_bit(DECT_POWER_ON); |
83 | }else | 141 | }else |
84 | { | 142 | { |
85 | set_cs3_bit(RS232_ON); | 143 | simpad_set_cs3_bit(RS232_ON); |
86 | set_cs3_bit(DECT_POWER_ON); | 144 | simpad_set_cs3_bit(DECT_POWER_ON); |
87 | } | 145 | } |
88 | } | 146 | } |
89 | } | 147 | } |
@@ -132,6 +190,7 @@ static struct resource simpad_flash_resources [] = { | |||
132 | static struct mcp_plat_data simpad_mcp_data = { | 190 | static struct mcp_plat_data simpad_mcp_data = { |
133 | .mccr0 = MCCR0_ADM, | 191 | .mccr0 = MCCR0_ADM, |
134 | .sclk_rate = 11981000, | 192 | .sclk_rate = 11981000, |
193 | .gpio_base = SIMPAD_UCB1X00_GPIO_BASE, | ||
135 | }; | 194 | }; |
136 | 195 | ||
137 | 196 | ||
@@ -142,9 +201,10 @@ static void __init simpad_map_io(void) | |||
142 | 201 | ||
143 | iotable_init(simpad_io_desc, ARRAY_SIZE(simpad_io_desc)); | 202 | iotable_init(simpad_io_desc, ARRAY_SIZE(simpad_io_desc)); |
144 | 203 | ||
145 | set_cs3_bit (EN1 | EN0 | LED2_ON | DISPLAY_ON | RS232_ON | | 204 | /* Initialize CS3 */ |
146 | ENABLE_5V | RESET_SIMCARD | DECT_POWER_ON); | 205 | cs3_shadow = (EN1 | EN0 | LED2_ON | DISPLAY_ON | |
147 | 206 | RS232_ON | ENABLE_5V | RESET_SIMCARD | DECT_POWER_ON); | |
207 | __simpad_write_cs3(); /* Spinlocks not yet initialized */ | ||
148 | 208 | ||
149 | sa1100_register_uart_fns(&simpad_port_fns); | 209 | sa1100_register_uart_fns(&simpad_port_fns); |
150 | sa1100_register_uart(0, 3); /* serial interface */ | 210 | sa1100_register_uart(0, 3); /* serial interface */ |
@@ -170,13 +230,14 @@ static void __init simpad_map_io(void) | |||
170 | 230 | ||
171 | static void simpad_power_off(void) | 231 | static void simpad_power_off(void) |
172 | { | 232 | { |
173 | local_irq_disable(); // was cli | 233 | local_irq_disable(); |
174 | set_cs3(0x800); /* only SD_MEDIAQ */ | 234 | cs3_shadow = SD_MEDIAQ; |
235 | __simpad_write_cs3(); /* Bypass spinlock here */ | ||
175 | 236 | ||
176 | /* disable internal oscillator, float CS lines */ | 237 | /* disable internal oscillator, float CS lines */ |
177 | PCFR = (PCFR_OPDE | PCFR_FP | PCFR_FS); | 238 | PCFR = (PCFR_OPDE | PCFR_FP | PCFR_FS); |
178 | /* enable wake-up on GPIO0 (Assabet...) */ | 239 | /* enable wake-up on GPIO0 */ |
179 | PWER = GFER = GRER = 1; | 240 | PWER = GFER = GRER = PWER_GPIO0; |
180 | /* | 241 | /* |
181 | * set scratchpad to zero, just in case it is used as a | 242 | * set scratchpad to zero, just in case it is used as a |
182 | * restart address by the bootloader. | 243 | * restart address by the bootloader. |
@@ -192,6 +253,91 @@ static void simpad_power_off(void) | |||
192 | 253 | ||
193 | } | 254 | } |
194 | 255 | ||
256 | /* | ||
257 | * gpio_keys | ||
258 | */ | ||
259 | |||
260 | static struct gpio_keys_button simpad_button_table[] = { | ||
261 | { KEY_POWER, IRQ_GPIO_POWER_BUTTON, 1, "power button" }, | ||
262 | }; | ||
263 | |||
264 | static struct gpio_keys_platform_data simpad_keys_data = { | ||
265 | .buttons = simpad_button_table, | ||
266 | .nbuttons = ARRAY_SIZE(simpad_button_table), | ||
267 | }; | ||
268 | |||
269 | static struct platform_device simpad_keys = { | ||
270 | .name = "gpio-keys", | ||
271 | .dev = { | ||
272 | .platform_data = &simpad_keys_data, | ||
273 | }, | ||
274 | }; | ||
275 | |||
276 | static struct gpio_keys_button simpad_polled_button_table[] = { | ||
277 | { KEY_PROG1, SIMPAD_UCB1X00_GPIO_PROG1, 1, "prog1 button" }, | ||
278 | { KEY_PROG2, SIMPAD_UCB1X00_GPIO_PROG2, 1, "prog2 button" }, | ||
279 | { KEY_UP, SIMPAD_UCB1X00_GPIO_UP, 1, "up button" }, | ||
280 | { KEY_DOWN, SIMPAD_UCB1X00_GPIO_DOWN, 1, "down button" }, | ||
281 | { KEY_LEFT, SIMPAD_UCB1X00_GPIO_LEFT, 1, "left button" }, | ||
282 | { KEY_RIGHT, SIMPAD_UCB1X00_GPIO_RIGHT, 1, "right button" }, | ||
283 | }; | ||
284 | |||
285 | static struct gpio_keys_platform_data simpad_polled_keys_data = { | ||
286 | .buttons = simpad_polled_button_table, | ||
287 | .nbuttons = ARRAY_SIZE(simpad_polled_button_table), | ||
288 | .poll_interval = 50, | ||
289 | }; | ||
290 | |||
291 | static struct platform_device simpad_polled_keys = { | ||
292 | .name = "gpio-keys-polled", | ||
293 | .dev = { | ||
294 | .platform_data = &simpad_polled_keys_data, | ||
295 | }, | ||
296 | }; | ||
297 | |||
298 | /* | ||
299 | * GPIO LEDs | ||
300 | */ | ||
301 | |||
302 | static struct gpio_led simpad_leds[] = { | ||
303 | { | ||
304 | .name = "simpad:power", | ||
305 | .gpio = SIMPAD_CS3_LED2_ON, | ||
306 | .active_low = 0, | ||
307 | .default_trigger = "default-on", | ||
308 | }, | ||
309 | }; | ||
310 | |||
311 | static struct gpio_led_platform_data simpad_led_data = { | ||
312 | .num_leds = ARRAY_SIZE(simpad_leds), | ||
313 | .leds = simpad_leds, | ||
314 | }; | ||
315 | |||
316 | static struct platform_device simpad_gpio_leds = { | ||
317 | .name = "leds-gpio", | ||
318 | .id = 0, | ||
319 | .dev = { | ||
320 | .platform_data = &simpad_led_data, | ||
321 | }, | ||
322 | }; | ||
323 | |||
324 | /* | ||
325 | * i2c | ||
326 | */ | ||
327 | static struct i2c_gpio_platform_data simpad_i2c_data = { | ||
328 | .sda_pin = GPIO_GPIO21, | ||
329 | .scl_pin = GPIO_GPIO25, | ||
330 | .udelay = 10, | ||
331 | .timeout = HZ, | ||
332 | }; | ||
333 | |||
334 | static struct platform_device simpad_i2c = { | ||
335 | .name = "i2c-gpio", | ||
336 | .id = 0, | ||
337 | .dev = { | ||
338 | .platform_data = &simpad_i2c_data, | ||
339 | }, | ||
340 | }; | ||
195 | 341 | ||
196 | /* | 342 | /* |
197 | * MediaQ Video Device | 343 | * MediaQ Video Device |
@@ -202,7 +348,11 @@ static struct platform_device simpad_mq200fb = { | |||
202 | }; | 348 | }; |
203 | 349 | ||
204 | static struct platform_device *devices[] __initdata = { | 350 | static struct platform_device *devices[] __initdata = { |
205 | &simpad_mq200fb | 351 | &simpad_keys, |
352 | &simpad_polled_keys, | ||
353 | &simpad_mq200fb, | ||
354 | &simpad_gpio_leds, | ||
355 | &simpad_i2c, | ||
206 | }; | 356 | }; |
207 | 357 | ||
208 | 358 | ||
@@ -211,6 +361,19 @@ static int __init simpad_init(void) | |||
211 | { | 361 | { |
212 | int ret; | 362 | int ret; |
213 | 363 | ||
364 | spin_lock_init(&cs3_lock); | ||
365 | |||
366 | cs3_gpio.label = "simpad_cs3"; | ||
367 | cs3_gpio.base = SIMPAD_CS3_GPIO_BASE; | ||
368 | cs3_gpio.ngpio = 24; | ||
369 | cs3_gpio.set = cs3_gpio_set; | ||
370 | cs3_gpio.get = cs3_gpio_get; | ||
371 | cs3_gpio.direction_input = cs3_gpio_direction_input; | ||
372 | cs3_gpio.direction_output = cs3_gpio_direction_output; | ||
373 | ret = gpiochip_add(&cs3_gpio); | ||
374 | if (ret) | ||
375 | printk(KERN_WARNING "simpad: Unable to register cs3 GPIO device"); | ||
376 | |||
214 | pm_power_off = simpad_power_off; | 377 | pm_power_off = simpad_power_off; |
215 | 378 | ||
216 | sa11x0_register_mtd(&simpad_flash_data, simpad_flash_resources, | 379 | sa11x0_register_mtd(&simpad_flash_data, simpad_flash_resources, |
diff --git a/arch/arm/mach-shark/Makefile.boot b/arch/arm/mach-shark/Makefile.boot index 4320f8b92771..e40e24e4ca34 100644 --- a/arch/arm/mach-shark/Makefile.boot +++ b/arch/arm/mach-shark/Makefile.boot | |||
@@ -1,2 +1,2 @@ | |||
1 | zreladdr-y := 0x08008000 | 1 | zreladdr-y += 0x08008000 |
2 | 2 | ||
diff --git a/arch/arm/mach-shmobile/Makefile.boot b/arch/arm/mach-shmobile/Makefile.boot index 1c08ee9de86a..498efd99338d 100644 --- a/arch/arm/mach-shmobile/Makefile.boot +++ b/arch/arm/mach-shmobile/Makefile.boot | |||
@@ -1,7 +1,7 @@ | |||
1 | __ZRELADDR := $(shell /bin/bash -c 'printf "0x%08x" \ | 1 | __ZRELADDR := $(shell /bin/bash -c 'printf "0x%08x" \ |
2 | $$[$(CONFIG_MEMORY_START) + 0x8000]') | 2 | $$[$(CONFIG_MEMORY_START) + 0x8000]') |
3 | 3 | ||
4 | zreladdr-y := $(__ZRELADDR) | 4 | zreladdr-y += $(__ZRELADDR) |
5 | 5 | ||
6 | # Unsupported legacy stuff | 6 | # Unsupported legacy stuff |
7 | # | 7 | # |
diff --git a/arch/arm/mach-shmobile/platsmp.c b/arch/arm/mach-shmobile/platsmp.c index 66f980625a33..e4e485fa2532 100644 --- a/arch/arm/mach-shmobile/platsmp.c +++ b/arch/arm/mach-shmobile/platsmp.c | |||
@@ -56,6 +56,12 @@ void __init smp_init_cpus(void) | |||
56 | unsigned int ncores = shmobile_smp_get_core_count(); | 56 | unsigned int ncores = shmobile_smp_get_core_count(); |
57 | unsigned int i; | 57 | unsigned int i; |
58 | 58 | ||
59 | if (ncores > nr_cpu_ids) { | ||
60 | pr_warn("SMP: %u cores greater than maximum (%u), clipping\n", | ||
61 | ncores, nr_cpu_ids); | ||
62 | ncores = nr_cpu_ids; | ||
63 | } | ||
64 | |||
59 | for (i = 0; i < ncores; i++) | 65 | for (i = 0; i < ncores; i++) |
60 | set_cpu_possible(i, true); | 66 | set_cpu_possible(i, true); |
61 | 67 | ||
diff --git a/arch/arm/mach-spear3xx/Makefile.boot b/arch/arm/mach-spear3xx/Makefile.boot index 7a1f3c0eadb8..4674a4c221db 100644 --- a/arch/arm/mach-spear3xx/Makefile.boot +++ b/arch/arm/mach-spear3xx/Makefile.boot | |||
@@ -1,3 +1,3 @@ | |||
1 | zreladdr-y := 0x00008000 | 1 | zreladdr-y += 0x00008000 |
2 | params_phys-y := 0x00000100 | 2 | params_phys-y := 0x00000100 |
3 | initrd_phys-y := 0x00800000 | 3 | initrd_phys-y := 0x00800000 |
diff --git a/arch/arm/mach-spear6xx/Makefile.boot b/arch/arm/mach-spear6xx/Makefile.boot index 7a1f3c0eadb8..4674a4c221db 100644 --- a/arch/arm/mach-spear6xx/Makefile.boot +++ b/arch/arm/mach-spear6xx/Makefile.boot | |||
@@ -1,3 +1,3 @@ | |||
1 | zreladdr-y := 0x00008000 | 1 | zreladdr-y += 0x00008000 |
2 | params_phys-y := 0x00000100 | 2 | params_phys-y := 0x00000100 |
3 | initrd_phys-y := 0x00800000 | 3 | initrd_phys-y := 0x00800000 |
diff --git a/arch/arm/mach-tcc8k/Makefile.boot b/arch/arm/mach-tcc8k/Makefile.boot index f135c9deae10..5e02d4156b04 100644 --- a/arch/arm/mach-tcc8k/Makefile.boot +++ b/arch/arm/mach-tcc8k/Makefile.boot | |||
@@ -1,3 +1,3 @@ | |||
1 | zreladdr-y := 0x20008000 | 1 | zreladdr-y += 0x20008000 |
2 | params_phys-y := 0x20000100 | 2 | params_phys-y := 0x20000100 |
3 | initrd_phys-y := 0x20800000 | 3 | initrd_phys-y := 0x20800000 |
diff --git a/arch/arm/mach-tegra/Makefile.boot b/arch/arm/mach-tegra/Makefile.boot index 428ad122be03..5e870d29eca1 100644 --- a/arch/arm/mach-tegra/Makefile.boot +++ b/arch/arm/mach-tegra/Makefile.boot | |||
@@ -1,4 +1,4 @@ | |||
1 | zreladdr-$(CONFIG_ARCH_TEGRA_2x_SOC) := 0x00008000 | 1 | zreladdr-$(CONFIG_ARCH_TEGRA_2x_SOC) += 0x00008000 |
2 | params_phys-$(CONFIG_ARCH_TEGRA_2x_SOC) := 0x00000100 | 2 | params_phys-$(CONFIG_ARCH_TEGRA_2x_SOC) := 0x00000100 |
3 | initrd_phys-$(CONFIG_ARCH_TEGRA_2x_SOC) := 0x00800000 | 3 | initrd_phys-$(CONFIG_ARCH_TEGRA_2x_SOC) := 0x00800000 |
4 | 4 | ||
diff --git a/arch/arm/mach-tegra/board-harmony.c b/arch/arm/mach-tegra/board-harmony.c index 846cd7d69e3e..c78ce41cca16 100644 --- a/arch/arm/mach-tegra/board-harmony.c +++ b/arch/arm/mach-tegra/board-harmony.c | |||
@@ -123,8 +123,8 @@ static struct platform_device *harmony_devices[] __initdata = { | |||
123 | &harmony_audio_device, | 123 | &harmony_audio_device, |
124 | }; | 124 | }; |
125 | 125 | ||
126 | static void __init tegra_harmony_fixup(struct machine_desc *desc, | 126 | static void __init tegra_harmony_fixup(struct tag *tags, char **cmdline, |
127 | struct tag *tags, char **cmdline, struct meminfo *mi) | 127 | struct meminfo *mi) |
128 | { | 128 | { |
129 | mi->nr_banks = 2; | 129 | mi->nr_banks = 2; |
130 | mi->bank[0].start = PHYS_OFFSET; | 130 | mi->bank[0].start = PHYS_OFFSET; |
diff --git a/arch/arm/mach-tegra/board-paz00.c b/arch/arm/mach-tegra/board-paz00.c index ea2f79c9879b..5e6bc7719642 100644 --- a/arch/arm/mach-tegra/board-paz00.c +++ b/arch/arm/mach-tegra/board-paz00.c | |||
@@ -84,8 +84,8 @@ static void paz00_usb_init(void) | |||
84 | platform_device_register(&tegra_ehci3_device); | 84 | platform_device_register(&tegra_ehci3_device); |
85 | } | 85 | } |
86 | 86 | ||
87 | static void __init tegra_paz00_fixup(struct machine_desc *desc, | 87 | static void __init tegra_paz00_fixup(struct tag *tags, char **cmdline, |
88 | struct tag *tags, char **cmdline, struct meminfo *mi) | 88 | struct meminfo *mi) |
89 | { | 89 | { |
90 | mi->nr_banks = 1; | 90 | mi->nr_banks = 1; |
91 | mi->bank[0].start = PHYS_OFFSET; | 91 | mi->bank[0].start = PHYS_OFFSET; |
diff --git a/arch/arm/mach-tegra/board-trimslice.c b/arch/arm/mach-tegra/board-trimslice.c index 89a6d2adc1de..652c3404d0e2 100644 --- a/arch/arm/mach-tegra/board-trimslice.c +++ b/arch/arm/mach-tegra/board-trimslice.c | |||
@@ -126,8 +126,8 @@ static void trimslice_usb_init(void) | |||
126 | platform_device_register(&tegra_ehci1_device); | 126 | platform_device_register(&tegra_ehci1_device); |
127 | } | 127 | } |
128 | 128 | ||
129 | static void __init tegra_trimslice_fixup(struct machine_desc *desc, | 129 | static void __init tegra_trimslice_fixup(struct tag *tags, char **cmdline, |
130 | struct tag *tags, char **cmdline, struct meminfo *mi) | 130 | struct meminfo *mi) |
131 | { | 131 | { |
132 | mi->nr_banks = 2; | 132 | mi->nr_banks = 2; |
133 | mi->bank[0].start = PHYS_OFFSET; | 133 | mi->bank[0].start = PHYS_OFFSET; |
diff --git a/arch/arm/mach-tegra/cpu-tegra.c b/arch/arm/mach-tegra/cpu-tegra.c index 0e1016a827ac..0e0fd4d889bd 100644 --- a/arch/arm/mach-tegra/cpu-tegra.c +++ b/arch/arm/mach-tegra/cpu-tegra.c | |||
@@ -32,7 +32,6 @@ | |||
32 | 32 | ||
33 | #include <asm/system.h> | 33 | #include <asm/system.h> |
34 | 34 | ||
35 | #include <mach/hardware.h> | ||
36 | #include <mach/clk.h> | 35 | #include <mach/clk.h> |
37 | 36 | ||
38 | /* Frequency table index must be sequential starting at 0 */ | 37 | /* Frequency table index must be sequential starting at 0 */ |
diff --git a/arch/arm/mach-tegra/platsmp.c b/arch/arm/mach-tegra/platsmp.c index 0886cbccddee..7d2b5d03c1df 100644 --- a/arch/arm/mach-tegra/platsmp.c +++ b/arch/arm/mach-tegra/platsmp.c | |||
@@ -114,10 +114,10 @@ void __init smp_init_cpus(void) | |||
114 | { | 114 | { |
115 | unsigned int i, ncores = scu_get_core_count(scu_base); | 115 | unsigned int i, ncores = scu_get_core_count(scu_base); |
116 | 116 | ||
117 | if (ncores > NR_CPUS) { | 117 | if (ncores > nr_cpu_ids) { |
118 | printk(KERN_ERR "Tegra: no. of cores (%u) greater than configured (%u), clipping\n", | 118 | pr_warn("SMP: %u cores greater than maximum (%u), clipping\n", |
119 | ncores, NR_CPUS); | 119 | ncores, nr_cpu_ids); |
120 | ncores = NR_CPUS; | 120 | ncores = nr_cpu_ids; |
121 | } | 121 | } |
122 | 122 | ||
123 | for (i = 0; i < ncores; i++) | 123 | for (i = 0; i < ncores; i++) |
diff --git a/arch/arm/mach-u300/Makefile.boot b/arch/arm/mach-u300/Makefile.boot index 6fbfc6ea2d35..69357affbd77 100644 --- a/arch/arm/mach-u300/Makefile.boot +++ b/arch/arm/mach-u300/Makefile.boot | |||
@@ -4,10 +4,10 @@ | |||
4 | # INITRD_PHYS must be in RAM | 4 | # INITRD_PHYS must be in RAM |
5 | 5 | ||
6 | ifdef CONFIG_MACH_U300_SINGLE_RAM | 6 | ifdef CONFIG_MACH_U300_SINGLE_RAM |
7 | zreladdr-y := 0x28E08000 | 7 | zreladdr-y += 0x28E08000 |
8 | params_phys-y := 0x28E00100 | 8 | params_phys-y := 0x28E00100 |
9 | else | 9 | else |
10 | zreladdr-y := 0x48008000 | 10 | zreladdr-y += 0x48008000 |
11 | params_phys-y := 0x48000100 | 11 | params_phys-y := 0x48000100 |
12 | endif | 12 | endif |
13 | 13 | ||
diff --git a/arch/arm/mach-ux500/Kconfig b/arch/arm/mach-ux500/Kconfig index 4210cb434dbc..a3e0c8692f0d 100644 --- a/arch/arm/mach-ux500/Kconfig +++ b/arch/arm/mach-ux500/Kconfig | |||
@@ -6,6 +6,7 @@ config UX500_SOC_COMMON | |||
6 | select ARM_GIC | 6 | select ARM_GIC |
7 | select HAS_MTU | 7 | select HAS_MTU |
8 | select ARM_ERRATA_753970 | 8 | select ARM_ERRATA_753970 |
9 | select ARM_ERRATA_754322 | ||
9 | 10 | ||
10 | menu "Ux500 SoC" | 11 | menu "Ux500 SoC" |
11 | 12 | ||
diff --git a/arch/arm/mach-ux500/Makefile.boot b/arch/arm/mach-ux500/Makefile.boot index c7e75acfe6c9..ff0a4b5b0a82 100644 --- a/arch/arm/mach-ux500/Makefile.boot +++ b/arch/arm/mach-ux500/Makefile.boot | |||
@@ -1,4 +1,4 @@ | |||
1 | zreladdr-y := 0x00008000 | 1 | zreladdr-y += 0x00008000 |
2 | params_phys-y := 0x00000100 | 2 | params_phys-y := 0x00000100 |
3 | initrd_phys-y := 0x00800000 | 3 | initrd_phys-y := 0x00800000 |
4 | 4 | ||
diff --git a/arch/arm/mach-ux500/platsmp.c b/arch/arm/mach-ux500/platsmp.c index a33df5f4c27a..eb5199102cfa 100644 --- a/arch/arm/mach-ux500/platsmp.c +++ b/arch/arm/mach-ux500/platsmp.c | |||
@@ -156,12 +156,10 @@ void __init smp_init_cpus(void) | |||
156 | ncores = scu_base ? scu_get_core_count(scu_base) : 1; | 156 | ncores = scu_base ? scu_get_core_count(scu_base) : 1; |
157 | 157 | ||
158 | /* sanity check */ | 158 | /* sanity check */ |
159 | if (ncores > NR_CPUS) { | 159 | if (ncores > nr_cpu_ids) { |
160 | printk(KERN_WARNING | 160 | pr_warn("SMP: %u cores greater than maximum (%u), clipping\n", |
161 | "U8500: no. of cores (%d) greater than configured " | 161 | ncores, nr_cpu_ids); |
162 | "maximum of %d - clipping\n", | 162 | ncores = nr_cpu_ids; |
163 | ncores, NR_CPUS); | ||
164 | ncores = NR_CPUS; | ||
165 | } | 163 | } |
166 | 164 | ||
167 | for (i = 0; i < ncores; i++) | 165 | for (i = 0; i < ncores; i++) |
diff --git a/arch/arm/mach-versatile/Makefile.boot b/arch/arm/mach-versatile/Makefile.boot index c7e75acfe6c9..ff0a4b5b0a82 100644 --- a/arch/arm/mach-versatile/Makefile.boot +++ b/arch/arm/mach-versatile/Makefile.boot | |||
@@ -1,4 +1,4 @@ | |||
1 | zreladdr-y := 0x00008000 | 1 | zreladdr-y += 0x00008000 |
2 | params_phys-y := 0x00000100 | 2 | params_phys-y := 0x00000100 |
3 | initrd_phys-y := 0x00800000 | 3 | initrd_phys-y := 0x00800000 |
4 | 4 | ||
diff --git a/arch/arm/mach-vexpress/Makefile.boot b/arch/arm/mach-vexpress/Makefile.boot index 07c2d9c457ec..8630b3d10a4d 100644 --- a/arch/arm/mach-vexpress/Makefile.boot +++ b/arch/arm/mach-vexpress/Makefile.boot | |||
@@ -1,3 +1,3 @@ | |||
1 | zreladdr-y := 0x60008000 | 1 | zreladdr-y += 0x60008000 |
2 | params_phys-y := 0x60000100 | 2 | params_phys-y := 0x60000100 |
3 | initrd_phys-y := 0x60800000 | 3 | initrd_phys-y := 0x60800000 |
diff --git a/arch/arm/mach-vexpress/ct-ca9x4.c b/arch/arm/mach-vexpress/ct-ca9x4.c index bfd32f52c2db..2b1e836a76ed 100644 --- a/arch/arm/mach-vexpress/ct-ca9x4.c +++ b/arch/arm/mach-vexpress/ct-ca9x4.c | |||
@@ -221,6 +221,12 @@ static void ct_ca9x4_init_cpu_map(void) | |||
221 | { | 221 | { |
222 | int i, ncores = scu_get_core_count(MMIO_P2V(A9_MPCORE_SCU)); | 222 | int i, ncores = scu_get_core_count(MMIO_P2V(A9_MPCORE_SCU)); |
223 | 223 | ||
224 | if (ncores > nr_cpu_ids) { | ||
225 | pr_warn("SMP: %u cores greater than maximum (%u), clipping\n", | ||
226 | ncores, nr_cpu_ids); | ||
227 | ncores = nr_cpu_ids; | ||
228 | } | ||
229 | |||
224 | for (i = 0; i < ncores; ++i) | 230 | for (i = 0; i < ncores; ++i) |
225 | set_cpu_possible(i, true); | 231 | set_cpu_possible(i, true); |
226 | 232 | ||
diff --git a/arch/arm/mach-vexpress/hotplug.c b/arch/arm/mach-vexpress/hotplug.c index ea4cbfb90a66..3668cf91d2de 100644 --- a/arch/arm/mach-vexpress/hotplug.c +++ b/arch/arm/mach-vexpress/hotplug.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <linux/smp.h> | 13 | #include <linux/smp.h> |
14 | 14 | ||
15 | #include <asm/cacheflush.h> | 15 | #include <asm/cacheflush.h> |
16 | #include <asm/system.h> | ||
16 | 17 | ||
17 | extern volatile int pen_release; | 18 | extern volatile int pen_release; |
18 | 19 | ||
@@ -62,13 +63,7 @@ static inline void platform_do_lowpower(unsigned int cpu, int *spurious) | |||
62 | * code will have already disabled interrupts | 63 | * code will have already disabled interrupts |
63 | */ | 64 | */ |
64 | for (;;) { | 65 | for (;;) { |
65 | /* | 66 | wfi(); |
66 | * here's the WFI | ||
67 | */ | ||
68 | asm(".word 0xe320f003\n" | ||
69 | : | ||
70 | : | ||
71 | : "memory", "cc"); | ||
72 | 67 | ||
73 | if (pen_release == cpu) { | 68 | if (pen_release == cpu) { |
74 | /* | 69 | /* |
diff --git a/arch/arm/mach-vexpress/include/mach/io.h b/arch/arm/mach-vexpress/include/mach/io.h index 748bb524ee71..13522d86685e 100644 --- a/arch/arm/mach-vexpress/include/mach/io.h +++ b/arch/arm/mach-vexpress/include/mach/io.h | |||
@@ -20,8 +20,6 @@ | |||
20 | #ifndef __ASM_ARM_ARCH_IO_H | 20 | #ifndef __ASM_ARM_ARCH_IO_H |
21 | #define __ASM_ARM_ARCH_IO_H | 21 | #define __ASM_ARM_ARCH_IO_H |
22 | 22 | ||
23 | #define IO_SPACE_LIMIT 0xffffffff | ||
24 | |||
25 | #define __io(a) __typesafe_io(a) | 23 | #define __io(a) __typesafe_io(a) |
26 | #define __mem_pci(a) (a) | 24 | #define __mem_pci(a) (a) |
27 | 25 | ||
diff --git a/arch/arm/mach-vt8500/Makefile.boot b/arch/arm/mach-vt8500/Makefile.boot index a8acc4e24902..b79c41cdfdff 100644 --- a/arch/arm/mach-vt8500/Makefile.boot +++ b/arch/arm/mach-vt8500/Makefile.boot | |||
@@ -1,3 +1,3 @@ | |||
1 | zreladdr-y := 0x00008000 | 1 | zreladdr-y += 0x00008000 |
2 | params_phys-y := 0x00000100 | 2 | params_phys-y := 0x00000100 |
3 | initrd_phys-y := 0x01000000 | 3 | initrd_phys-y := 0x01000000 |
diff --git a/arch/arm/mach-vt8500/include/mach/io.h b/arch/arm/mach-vt8500/include/mach/io.h index 9077239f78c9..46181eecf273 100644 --- a/arch/arm/mach-vt8500/include/mach/io.h +++ b/arch/arm/mach-vt8500/include/mach/io.h | |||
@@ -20,8 +20,6 @@ | |||
20 | #ifndef __ASM_ARM_ARCH_IO_H | 20 | #ifndef __ASM_ARM_ARCH_IO_H |
21 | #define __ASM_ARM_ARCH_IO_H | 21 | #define __ASM_ARM_ARCH_IO_H |
22 | 22 | ||
23 | #define IO_SPACE_LIMIT 0xffff | ||
24 | |||
25 | #define __io(a) __typesafe_io((a) + 0xf0000000) | 23 | #define __io(a) __typesafe_io((a) + 0xf0000000) |
26 | #define __mem_pci(a) (a) | 24 | #define __mem_pci(a) (a) |
27 | 25 | ||
diff --git a/arch/arm/mach-w90x900/Makefile.boot b/arch/arm/mach-w90x900/Makefile.boot index a057b546b6e5..6c3d421c2d11 100644 --- a/arch/arm/mach-w90x900/Makefile.boot +++ b/arch/arm/mach-w90x900/Makefile.boot | |||
@@ -1,3 +1,3 @@ | |||
1 | zreladdr-y := 0x00008000 | 1 | zreladdr-y += 0x00008000 |
2 | params_phys-y := 0x00000100 | 2 | params_phys-y := 0x00000100 |
3 | 3 | ||
diff --git a/arch/arm/mach-zynq/Makefile.boot b/arch/arm/mach-zynq/Makefile.boot index 67039c3e0c48..760a0efe7580 100644 --- a/arch/arm/mach-zynq/Makefile.boot +++ b/arch/arm/mach-zynq/Makefile.boot | |||
@@ -1,3 +1,3 @@ | |||
1 | zreladdr-y := 0x00008000 | 1 | zreladdr-y += 0x00008000 |
2 | params_phys-y := 0x00000100 | 2 | params_phys-y := 0x00000100 |
3 | initrd_phys-y := 0x00800000 | 3 | initrd_phys-y := 0x00800000 |
diff --git a/arch/arm/mm/alignment.c b/arch/arm/mm/alignment.c index cfbcf8b95599..c335c76e0d88 100644 --- a/arch/arm/mm/alignment.c +++ b/arch/arm/mm/alignment.c | |||
@@ -86,16 +86,6 @@ core_param(alignment, ai_usermode, int, 0600); | |||
86 | #define UM_FIXUP (1 << 1) | 86 | #define UM_FIXUP (1 << 1) |
87 | #define UM_SIGNAL (1 << 2) | 87 | #define UM_SIGNAL (1 << 2) |
88 | 88 | ||
89 | #ifdef CONFIG_PROC_FS | ||
90 | static const char *usermode_action[] = { | ||
91 | "ignored", | ||
92 | "warn", | ||
93 | "fixup", | ||
94 | "fixup+warn", | ||
95 | "signal", | ||
96 | "signal+warn" | ||
97 | }; | ||
98 | |||
99 | /* Return true if and only if the ARMv6 unaligned access model is in use. */ | 89 | /* Return true if and only if the ARMv6 unaligned access model is in use. */ |
100 | static bool cpu_is_v6_unaligned(void) | 90 | static bool cpu_is_v6_unaligned(void) |
101 | { | 91 | { |
@@ -123,6 +113,16 @@ static int safe_usermode(int new_usermode, bool warn) | |||
123 | return new_usermode; | 113 | return new_usermode; |
124 | } | 114 | } |
125 | 115 | ||
116 | #ifdef CONFIG_PROC_FS | ||
117 | static const char *usermode_action[] = { | ||
118 | "ignored", | ||
119 | "warn", | ||
120 | "fixup", | ||
121 | "fixup+warn", | ||
122 | "signal", | ||
123 | "signal+warn" | ||
124 | }; | ||
125 | |||
126 | static int alignment_proc_show(struct seq_file *m, void *v) | 126 | static int alignment_proc_show(struct seq_file *m, void *v) |
127 | { | 127 | { |
128 | seq_printf(m, "User:\t\t%lu\n", ai_user); | 128 | seq_printf(m, "User:\t\t%lu\n", ai_user); |
diff --git a/arch/arm/mm/cache-l2x0.c b/arch/arm/mm/cache-l2x0.c index 9ecfdb511951..3f9b9980478e 100644 --- a/arch/arm/mm/cache-l2x0.c +++ b/arch/arm/mm/cache-l2x0.c | |||
@@ -16,9 +16,12 @@ | |||
16 | * along with this program; if not, write to the Free Software | 16 | * along with this program; if not, write to the Free Software |
17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
18 | */ | 18 | */ |
19 | #include <linux/err.h> | ||
19 | #include <linux/init.h> | 20 | #include <linux/init.h> |
20 | #include <linux/spinlock.h> | 21 | #include <linux/spinlock.h> |
21 | #include <linux/io.h> | 22 | #include <linux/io.h> |
23 | #include <linux/of.h> | ||
24 | #include <linux/of_address.h> | ||
22 | 25 | ||
23 | #include <asm/cacheflush.h> | 26 | #include <asm/cacheflush.h> |
24 | #include <asm/hardware/cache-l2x0.h> | 27 | #include <asm/hardware/cache-l2x0.h> |
@@ -30,11 +33,19 @@ static DEFINE_SPINLOCK(l2x0_lock); | |||
30 | static uint32_t l2x0_way_mask; /* Bitmask of active ways */ | 33 | static uint32_t l2x0_way_mask; /* Bitmask of active ways */ |
31 | static uint32_t l2x0_size; | 34 | static uint32_t l2x0_size; |
32 | 35 | ||
36 | struct l2x0_regs l2x0_saved_regs; | ||
37 | |||
38 | struct l2x0_of_data { | ||
39 | void (*setup)(const struct device_node *, __u32 *, __u32 *); | ||
40 | void (*save)(void); | ||
41 | void (*resume)(void); | ||
42 | }; | ||
43 | |||
33 | static inline void cache_wait_way(void __iomem *reg, unsigned long mask) | 44 | static inline void cache_wait_way(void __iomem *reg, unsigned long mask) |
34 | { | 45 | { |
35 | /* wait for cache operation by line or way to complete */ | 46 | /* wait for cache operation by line or way to complete */ |
36 | while (readl_relaxed(reg) & mask) | 47 | while (readl_relaxed(reg) & mask) |
37 | ; | 48 | cpu_relax(); |
38 | } | 49 | } |
39 | 50 | ||
40 | #ifdef CONFIG_CACHE_PL310 | 51 | #ifdef CONFIG_CACHE_PL310 |
@@ -277,7 +288,7 @@ static void l2x0_disable(void) | |||
277 | spin_unlock_irqrestore(&l2x0_lock, flags); | 288 | spin_unlock_irqrestore(&l2x0_lock, flags); |
278 | } | 289 | } |
279 | 290 | ||
280 | static void __init l2x0_unlock(__u32 cache_id) | 291 | static void l2x0_unlock(__u32 cache_id) |
281 | { | 292 | { |
282 | int lockregs; | 293 | int lockregs; |
283 | int i; | 294 | int i; |
@@ -353,6 +364,8 @@ void __init l2x0_init(void __iomem *base, __u32 aux_val, __u32 aux_mask) | |||
353 | /* l2x0 controller is disabled */ | 364 | /* l2x0 controller is disabled */ |
354 | writel_relaxed(aux, l2x0_base + L2X0_AUX_CTRL); | 365 | writel_relaxed(aux, l2x0_base + L2X0_AUX_CTRL); |
355 | 366 | ||
367 | l2x0_saved_regs.aux_ctrl = aux; | ||
368 | |||
356 | l2x0_inv_all(); | 369 | l2x0_inv_all(); |
357 | 370 | ||
358 | /* enable L2X0 */ | 371 | /* enable L2X0 */ |
@@ -372,3 +385,202 @@ void __init l2x0_init(void __iomem *base, __u32 aux_val, __u32 aux_mask) | |||
372 | printk(KERN_INFO "l2x0: %d ways, CACHE_ID 0x%08x, AUX_CTRL 0x%08x, Cache size: %d B\n", | 385 | printk(KERN_INFO "l2x0: %d ways, CACHE_ID 0x%08x, AUX_CTRL 0x%08x, Cache size: %d B\n", |
373 | ways, cache_id, aux, l2x0_size); | 386 | ways, cache_id, aux, l2x0_size); |
374 | } | 387 | } |
388 | |||
389 | #ifdef CONFIG_OF | ||
390 | static void __init l2x0_of_setup(const struct device_node *np, | ||
391 | __u32 *aux_val, __u32 *aux_mask) | ||
392 | { | ||
393 | u32 data[2] = { 0, 0 }; | ||
394 | u32 tag = 0; | ||
395 | u32 dirty = 0; | ||
396 | u32 val = 0, mask = 0; | ||
397 | |||
398 | of_property_read_u32(np, "arm,tag-latency", &tag); | ||
399 | if (tag) { | ||
400 | mask |= L2X0_AUX_CTRL_TAG_LATENCY_MASK; | ||
401 | val |= (tag - 1) << L2X0_AUX_CTRL_TAG_LATENCY_SHIFT; | ||
402 | } | ||
403 | |||
404 | of_property_read_u32_array(np, "arm,data-latency", | ||
405 | data, ARRAY_SIZE(data)); | ||
406 | if (data[0] && data[1]) { | ||
407 | mask |= L2X0_AUX_CTRL_DATA_RD_LATENCY_MASK | | ||
408 | L2X0_AUX_CTRL_DATA_WR_LATENCY_MASK; | ||
409 | val |= ((data[0] - 1) << L2X0_AUX_CTRL_DATA_RD_LATENCY_SHIFT) | | ||
410 | ((data[1] - 1) << L2X0_AUX_CTRL_DATA_WR_LATENCY_SHIFT); | ||
411 | } | ||
412 | |||
413 | of_property_read_u32(np, "arm,dirty-latency", &dirty); | ||
414 | if (dirty) { | ||
415 | mask |= L2X0_AUX_CTRL_DIRTY_LATENCY_MASK; | ||
416 | val |= (dirty - 1) << L2X0_AUX_CTRL_DIRTY_LATENCY_SHIFT; | ||
417 | } | ||
418 | |||
419 | *aux_val &= ~mask; | ||
420 | *aux_val |= val; | ||
421 | *aux_mask &= ~mask; | ||
422 | } | ||
423 | |||
424 | static void __init pl310_of_setup(const struct device_node *np, | ||
425 | __u32 *aux_val, __u32 *aux_mask) | ||
426 | { | ||
427 | u32 data[3] = { 0, 0, 0 }; | ||
428 | u32 tag[3] = { 0, 0, 0 }; | ||
429 | u32 filter[2] = { 0, 0 }; | ||
430 | |||
431 | of_property_read_u32_array(np, "arm,tag-latency", tag, ARRAY_SIZE(tag)); | ||
432 | if (tag[0] && tag[1] && tag[2]) | ||
433 | writel_relaxed( | ||
434 | ((tag[0] - 1) << L2X0_LATENCY_CTRL_RD_SHIFT) | | ||
435 | ((tag[1] - 1) << L2X0_LATENCY_CTRL_WR_SHIFT) | | ||
436 | ((tag[2] - 1) << L2X0_LATENCY_CTRL_SETUP_SHIFT), | ||
437 | l2x0_base + L2X0_TAG_LATENCY_CTRL); | ||
438 | |||
439 | of_property_read_u32_array(np, "arm,data-latency", | ||
440 | data, ARRAY_SIZE(data)); | ||
441 | if (data[0] && data[1] && data[2]) | ||
442 | writel_relaxed( | ||
443 | ((data[0] - 1) << L2X0_LATENCY_CTRL_RD_SHIFT) | | ||
444 | ((data[1] - 1) << L2X0_LATENCY_CTRL_WR_SHIFT) | | ||
445 | ((data[2] - 1) << L2X0_LATENCY_CTRL_SETUP_SHIFT), | ||
446 | l2x0_base + L2X0_DATA_LATENCY_CTRL); | ||
447 | |||
448 | of_property_read_u32_array(np, "arm,filter-ranges", | ||
449 | filter, ARRAY_SIZE(filter)); | ||
450 | if (filter[1]) { | ||
451 | writel_relaxed(ALIGN(filter[0] + filter[1], SZ_1M), | ||
452 | l2x0_base + L2X0_ADDR_FILTER_END); | ||
453 | writel_relaxed((filter[0] & ~(SZ_1M - 1)) | L2X0_ADDR_FILTER_EN, | ||
454 | l2x0_base + L2X0_ADDR_FILTER_START); | ||
455 | } | ||
456 | } | ||
457 | |||
458 | static void __init pl310_save(void) | ||
459 | { | ||
460 | u32 l2x0_revision = readl_relaxed(l2x0_base + L2X0_CACHE_ID) & | ||
461 | L2X0_CACHE_ID_RTL_MASK; | ||
462 | |||
463 | l2x0_saved_regs.tag_latency = readl_relaxed(l2x0_base + | ||
464 | L2X0_TAG_LATENCY_CTRL); | ||
465 | l2x0_saved_regs.data_latency = readl_relaxed(l2x0_base + | ||
466 | L2X0_DATA_LATENCY_CTRL); | ||
467 | l2x0_saved_regs.filter_end = readl_relaxed(l2x0_base + | ||
468 | L2X0_ADDR_FILTER_END); | ||
469 | l2x0_saved_regs.filter_start = readl_relaxed(l2x0_base + | ||
470 | L2X0_ADDR_FILTER_START); | ||
471 | |||
472 | if (l2x0_revision >= L2X0_CACHE_ID_RTL_R2P0) { | ||
473 | /* | ||
474 | * From r2p0, there is Prefetch offset/control register | ||
475 | */ | ||
476 | l2x0_saved_regs.prefetch_ctrl = readl_relaxed(l2x0_base + | ||
477 | L2X0_PREFETCH_CTRL); | ||
478 | /* | ||
479 | * From r3p0, there is Power control register | ||
480 | */ | ||
481 | if (l2x0_revision >= L2X0_CACHE_ID_RTL_R3P0) | ||
482 | l2x0_saved_regs.pwr_ctrl = readl_relaxed(l2x0_base + | ||
483 | L2X0_POWER_CTRL); | ||
484 | } | ||
485 | } | ||
486 | |||
487 | static void l2x0_resume(void) | ||
488 | { | ||
489 | if (!(readl_relaxed(l2x0_base + L2X0_CTRL) & 1)) { | ||
490 | /* restore aux ctrl and enable l2 */ | ||
491 | l2x0_unlock(readl_relaxed(l2x0_base + L2X0_CACHE_ID)); | ||
492 | |||
493 | writel_relaxed(l2x0_saved_regs.aux_ctrl, l2x0_base + | ||
494 | L2X0_AUX_CTRL); | ||
495 | |||
496 | l2x0_inv_all(); | ||
497 | |||
498 | writel_relaxed(1, l2x0_base + L2X0_CTRL); | ||
499 | } | ||
500 | } | ||
501 | |||
502 | static void pl310_resume(void) | ||
503 | { | ||
504 | u32 l2x0_revision; | ||
505 | |||
506 | if (!(readl_relaxed(l2x0_base + L2X0_CTRL) & 1)) { | ||
507 | /* restore pl310 setup */ | ||
508 | writel_relaxed(l2x0_saved_regs.tag_latency, | ||
509 | l2x0_base + L2X0_TAG_LATENCY_CTRL); | ||
510 | writel_relaxed(l2x0_saved_regs.data_latency, | ||
511 | l2x0_base + L2X0_DATA_LATENCY_CTRL); | ||
512 | writel_relaxed(l2x0_saved_regs.filter_end, | ||
513 | l2x0_base + L2X0_ADDR_FILTER_END); | ||
514 | writel_relaxed(l2x0_saved_regs.filter_start, | ||
515 | l2x0_base + L2X0_ADDR_FILTER_START); | ||
516 | |||
517 | l2x0_revision = readl_relaxed(l2x0_base + L2X0_CACHE_ID) & | ||
518 | L2X0_CACHE_ID_RTL_MASK; | ||
519 | |||
520 | if (l2x0_revision >= L2X0_CACHE_ID_RTL_R2P0) { | ||
521 | writel_relaxed(l2x0_saved_regs.prefetch_ctrl, | ||
522 | l2x0_base + L2X0_PREFETCH_CTRL); | ||
523 | if (l2x0_revision >= L2X0_CACHE_ID_RTL_R3P0) | ||
524 | writel_relaxed(l2x0_saved_regs.pwr_ctrl, | ||
525 | l2x0_base + L2X0_POWER_CTRL); | ||
526 | } | ||
527 | } | ||
528 | |||
529 | l2x0_resume(); | ||
530 | } | ||
531 | |||
532 | static const struct l2x0_of_data pl310_data = { | ||
533 | pl310_of_setup, | ||
534 | pl310_save, | ||
535 | pl310_resume, | ||
536 | }; | ||
537 | |||
538 | static const struct l2x0_of_data l2x0_data = { | ||
539 | l2x0_of_setup, | ||
540 | NULL, | ||
541 | l2x0_resume, | ||
542 | }; | ||
543 | |||
544 | static const struct of_device_id l2x0_ids[] __initconst = { | ||
545 | { .compatible = "arm,pl310-cache", .data = (void *)&pl310_data }, | ||
546 | { .compatible = "arm,l220-cache", .data = (void *)&l2x0_data }, | ||
547 | { .compatible = "arm,l210-cache", .data = (void *)&l2x0_data }, | ||
548 | {} | ||
549 | }; | ||
550 | |||
551 | int __init l2x0_of_init(__u32 aux_val, __u32 aux_mask) | ||
552 | { | ||
553 | struct device_node *np; | ||
554 | struct l2x0_of_data *data; | ||
555 | struct resource res; | ||
556 | |||
557 | np = of_find_matching_node(NULL, l2x0_ids); | ||
558 | if (!np) | ||
559 | return -ENODEV; | ||
560 | |||
561 | if (of_address_to_resource(np, 0, &res)) | ||
562 | return -ENODEV; | ||
563 | |||
564 | l2x0_base = ioremap(res.start, resource_size(&res)); | ||
565 | if (!l2x0_base) | ||
566 | return -ENOMEM; | ||
567 | |||
568 | l2x0_saved_regs.phy_base = res.start; | ||
569 | |||
570 | data = of_match_node(l2x0_ids, np)->data; | ||
571 | |||
572 | /* L2 configuration can only be changed if the cache is disabled */ | ||
573 | if (!(readl_relaxed(l2x0_base + L2X0_CTRL) & 1)) { | ||
574 | if (data->setup) | ||
575 | data->setup(np, &aux_val, &aux_mask); | ||
576 | } | ||
577 | |||
578 | if (data->save) | ||
579 | data->save(); | ||
580 | |||
581 | l2x0_init(l2x0_base, aux_val, aux_mask); | ||
582 | |||
583 | outer_cache.resume = data->resume; | ||
584 | return 0; | ||
585 | } | ||
586 | #endif | ||
diff --git a/arch/arm/mm/cache-v7.S b/arch/arm/mm/cache-v7.S index 3b24bfa3b828..07c4bc8ea0a4 100644 --- a/arch/arm/mm/cache-v7.S +++ b/arch/arm/mm/cache-v7.S | |||
@@ -174,6 +174,10 @@ ENTRY(v7_coherent_user_range) | |||
174 | dcache_line_size r2, r3 | 174 | dcache_line_size r2, r3 |
175 | sub r3, r2, #1 | 175 | sub r3, r2, #1 |
176 | bic r12, r0, r3 | 176 | bic r12, r0, r3 |
177 | #ifdef CONFIG_ARM_ERRATA_764369 | ||
178 | ALT_SMP(W(dsb)) | ||
179 | ALT_UP(W(nop)) | ||
180 | #endif | ||
177 | 1: | 181 | 1: |
178 | USER( mcr p15, 0, r12, c7, c11, 1 ) @ clean D line to the point of unification | 182 | USER( mcr p15, 0, r12, c7, c11, 1 ) @ clean D line to the point of unification |
179 | add r12, r12, r2 | 183 | add r12, r12, r2 |
@@ -223,6 +227,10 @@ ENTRY(v7_flush_kern_dcache_area) | |||
223 | add r1, r0, r1 | 227 | add r1, r0, r1 |
224 | sub r3, r2, #1 | 228 | sub r3, r2, #1 |
225 | bic r0, r0, r3 | 229 | bic r0, r0, r3 |
230 | #ifdef CONFIG_ARM_ERRATA_764369 | ||
231 | ALT_SMP(W(dsb)) | ||
232 | ALT_UP(W(nop)) | ||
233 | #endif | ||
226 | 1: | 234 | 1: |
227 | mcr p15, 0, r0, c7, c14, 1 @ clean & invalidate D line / unified line | 235 | mcr p15, 0, r0, c7, c14, 1 @ clean & invalidate D line / unified line |
228 | add r0, r0, r2 | 236 | add r0, r0, r2 |
@@ -247,6 +255,10 @@ v7_dma_inv_range: | |||
247 | sub r3, r2, #1 | 255 | sub r3, r2, #1 |
248 | tst r0, r3 | 256 | tst r0, r3 |
249 | bic r0, r0, r3 | 257 | bic r0, r0, r3 |
258 | #ifdef CONFIG_ARM_ERRATA_764369 | ||
259 | ALT_SMP(W(dsb)) | ||
260 | ALT_UP(W(nop)) | ||
261 | #endif | ||
250 | mcrne p15, 0, r0, c7, c14, 1 @ clean & invalidate D / U line | 262 | mcrne p15, 0, r0, c7, c14, 1 @ clean & invalidate D / U line |
251 | 263 | ||
252 | tst r1, r3 | 264 | tst r1, r3 |
@@ -270,6 +282,10 @@ v7_dma_clean_range: | |||
270 | dcache_line_size r2, r3 | 282 | dcache_line_size r2, r3 |
271 | sub r3, r2, #1 | 283 | sub r3, r2, #1 |
272 | bic r0, r0, r3 | 284 | bic r0, r0, r3 |
285 | #ifdef CONFIG_ARM_ERRATA_764369 | ||
286 | ALT_SMP(W(dsb)) | ||
287 | ALT_UP(W(nop)) | ||
288 | #endif | ||
273 | 1: | 289 | 1: |
274 | mcr p15, 0, r0, c7, c10, 1 @ clean D / U line | 290 | mcr p15, 0, r0, c7, c10, 1 @ clean D / U line |
275 | add r0, r0, r2 | 291 | add r0, r0, r2 |
@@ -288,6 +304,10 @@ ENTRY(v7_dma_flush_range) | |||
288 | dcache_line_size r2, r3 | 304 | dcache_line_size r2, r3 |
289 | sub r3, r2, #1 | 305 | sub r3, r2, #1 |
290 | bic r0, r0, r3 | 306 | bic r0, r0, r3 |
307 | #ifdef CONFIG_ARM_ERRATA_764369 | ||
308 | ALT_SMP(W(dsb)) | ||
309 | ALT_UP(W(nop)) | ||
310 | #endif | ||
291 | 1: | 311 | 1: |
292 | mcr p15, 0, r0, c7, c14, 1 @ clean & invalidate D / U line | 312 | mcr p15, 0, r0, c7, c14, 1 @ clean & invalidate D / U line |
293 | add r0, r0, r2 | 313 | add r0, r0, r2 |
diff --git a/arch/arm/mm/dma-mapping.c b/arch/arm/mm/dma-mapping.c index 0a0a1e7c20d2..235eb775fc78 100644 --- a/arch/arm/mm/dma-mapping.c +++ b/arch/arm/mm/dma-mapping.c | |||
@@ -123,8 +123,8 @@ static void __dma_free_buffer(struct page *page, size_t size) | |||
123 | #endif | 123 | #endif |
124 | 124 | ||
125 | #define CONSISTENT_OFFSET(x) (((unsigned long)(x) - CONSISTENT_BASE) >> PAGE_SHIFT) | 125 | #define CONSISTENT_OFFSET(x) (((unsigned long)(x) - CONSISTENT_BASE) >> PAGE_SHIFT) |
126 | #define CONSISTENT_PTE_INDEX(x) (((unsigned long)(x) - CONSISTENT_BASE) >> PGDIR_SHIFT) | 126 | #define CONSISTENT_PTE_INDEX(x) (((unsigned long)(x) - CONSISTENT_BASE) >> PMD_SHIFT) |
127 | #define NUM_CONSISTENT_PTES (CONSISTENT_DMA_SIZE >> PGDIR_SHIFT) | 127 | #define NUM_CONSISTENT_PTES (CONSISTENT_DMA_SIZE >> PMD_SHIFT) |
128 | 128 | ||
129 | /* | 129 | /* |
130 | * These are the page tables (2MB each) covering uncached, DMA consistent allocations | 130 | * These are the page tables (2MB each) covering uncached, DMA consistent allocations |
@@ -183,7 +183,7 @@ static int __init consistent_init(void) | |||
183 | } | 183 | } |
184 | 184 | ||
185 | consistent_pte[i++] = pte; | 185 | consistent_pte[i++] = pte; |
186 | base += (1 << PGDIR_SHIFT); | 186 | base += PMD_SIZE; |
187 | } while (base < CONSISTENT_END); | 187 | } while (base < CONSISTENT_END); |
188 | 188 | ||
189 | return ret; | 189 | return ret; |
@@ -324,6 +324,8 @@ __dma_alloc(struct device *dev, size_t size, dma_addr_t *handle, gfp_t gfp, | |||
324 | 324 | ||
325 | if (addr) | 325 | if (addr) |
326 | *handle = pfn_to_dma(dev, page_to_pfn(page)); | 326 | *handle = pfn_to_dma(dev, page_to_pfn(page)); |
327 | else | ||
328 | __dma_free_buffer(page, size); | ||
327 | 329 | ||
328 | return addr; | 330 | return addr; |
329 | } | 331 | } |
diff --git a/arch/arm/mm/fault.c b/arch/arm/mm/fault.c index 3b5ea68acbb8..aa33949fef60 100644 --- a/arch/arm/mm/fault.c +++ b/arch/arm/mm/fault.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/highmem.h> | 20 | #include <linux/highmem.h> |
21 | #include <linux/perf_event.h> | 21 | #include <linux/perf_event.h> |
22 | 22 | ||
23 | #include <asm/exception.h> | ||
23 | #include <asm/system.h> | 24 | #include <asm/system.h> |
24 | #include <asm/pgtable.h> | 25 | #include <asm/pgtable.h> |
25 | #include <asm/tlbflush.h> | 26 | #include <asm/tlbflush.h> |
diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c index cc7e2d8be9aa..f8037ba338ac 100644 --- a/arch/arm/mm/init.c +++ b/arch/arm/mm/init.c | |||
@@ -496,6 +496,13 @@ static void __init free_unused_memmap(struct meminfo *mi) | |||
496 | */ | 496 | */ |
497 | bank_start = min(bank_start, | 497 | bank_start = min(bank_start, |
498 | ALIGN(prev_bank_end, PAGES_PER_SECTION)); | 498 | ALIGN(prev_bank_end, PAGES_PER_SECTION)); |
499 | #else | ||
500 | /* | ||
501 | * Align down here since the VM subsystem insists that the | ||
502 | * memmap entries are valid from the bank start aligned to | ||
503 | * MAX_ORDER_NR_PAGES. | ||
504 | */ | ||
505 | bank_start = round_down(bank_start, MAX_ORDER_NR_PAGES); | ||
499 | #endif | 506 | #endif |
500 | /* | 507 | /* |
501 | * If we had a previous bank, and there is a space | 508 | * If we had a previous bank, and there is a space |
diff --git a/arch/arm/mm/ioremap.c b/arch/arm/mm/ioremap.c index ab506272b2d3..bdb248c4f55c 100644 --- a/arch/arm/mm/ioremap.c +++ b/arch/arm/mm/ioremap.c | |||
@@ -289,6 +289,27 @@ __arm_ioremap(unsigned long phys_addr, size_t size, unsigned int mtype) | |||
289 | } | 289 | } |
290 | EXPORT_SYMBOL(__arm_ioremap); | 290 | EXPORT_SYMBOL(__arm_ioremap); |
291 | 291 | ||
292 | /* | ||
293 | * Remap an arbitrary physical address space into the kernel virtual | ||
294 | * address space as memory. Needed when the kernel wants to execute | ||
295 | * code in external memory. This is needed for reprogramming source | ||
296 | * clocks that would affect normal memory for example. Please see | ||
297 | * CONFIG_GENERIC_ALLOCATOR for allocating external memory. | ||
298 | */ | ||
299 | void __iomem * | ||
300 | __arm_ioremap_exec(unsigned long phys_addr, size_t size, bool cached) | ||
301 | { | ||
302 | unsigned int mtype; | ||
303 | |||
304 | if (cached) | ||
305 | mtype = MT_MEMORY; | ||
306 | else | ||
307 | mtype = MT_MEMORY_NONCACHED; | ||
308 | |||
309 | return __arm_ioremap_caller(phys_addr, size, mtype, | ||
310 | __builtin_return_address(0)); | ||
311 | } | ||
312 | |||
292 | void __iounmap(volatile void __iomem *io_addr) | 313 | void __iounmap(volatile void __iomem *io_addr) |
293 | { | 314 | { |
294 | void *addr = (void *)(PAGE_MASK & (unsigned long)io_addr); | 315 | void *addr = (void *)(PAGE_MASK & (unsigned long)io_addr); |
diff --git a/arch/arm/mm/mm.h b/arch/arm/mm/mm.h index 010566799c80..ad7cce3bc431 100644 --- a/arch/arm/mm/mm.h +++ b/arch/arm/mm/mm.h | |||
@@ -12,8 +12,8 @@ static inline pmd_t *pmd_off_k(unsigned long virt) | |||
12 | 12 | ||
13 | struct mem_type { | 13 | struct mem_type { |
14 | pteval_t prot_pte; | 14 | pteval_t prot_pte; |
15 | unsigned int prot_l1; | 15 | pmdval_t prot_l1; |
16 | unsigned int prot_sect; | 16 | pmdval_t prot_sect; |
17 | unsigned int domain; | 17 | unsigned int domain; |
18 | }; | 18 | }; |
19 | 19 | ||
diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c index 594d677b92c8..226f1804be12 100644 --- a/arch/arm/mm/mmu.c +++ b/arch/arm/mm/mmu.c | |||
@@ -60,7 +60,7 @@ EXPORT_SYMBOL(pgprot_kernel); | |||
60 | struct cachepolicy { | 60 | struct cachepolicy { |
61 | const char policy[16]; | 61 | const char policy[16]; |
62 | unsigned int cr_mask; | 62 | unsigned int cr_mask; |
63 | unsigned int pmd; | 63 | pmdval_t pmd; |
64 | pteval_t pte; | 64 | pteval_t pte; |
65 | }; | 65 | }; |
66 | 66 | ||
@@ -288,7 +288,7 @@ static void __init build_mem_type_table(void) | |||
288 | { | 288 | { |
289 | struct cachepolicy *cp; | 289 | struct cachepolicy *cp; |
290 | unsigned int cr = get_cr(); | 290 | unsigned int cr = get_cr(); |
291 | unsigned int user_pgprot, kern_pgprot, vecs_pgprot; | 291 | pteval_t user_pgprot, kern_pgprot, vecs_pgprot; |
292 | int cpu_arch = cpu_architecture(); | 292 | int cpu_arch = cpu_architecture(); |
293 | int i; | 293 | int i; |
294 | 294 | ||
@@ -863,14 +863,14 @@ static inline void prepare_page_table(void) | |||
863 | /* | 863 | /* |
864 | * Clear out all the mappings below the kernel image. | 864 | * Clear out all the mappings below the kernel image. |
865 | */ | 865 | */ |
866 | for (addr = 0; addr < MODULES_VADDR; addr += PGDIR_SIZE) | 866 | for (addr = 0; addr < MODULES_VADDR; addr += PMD_SIZE) |
867 | pmd_clear(pmd_off_k(addr)); | 867 | pmd_clear(pmd_off_k(addr)); |
868 | 868 | ||
869 | #ifdef CONFIG_XIP_KERNEL | 869 | #ifdef CONFIG_XIP_KERNEL |
870 | /* The XIP kernel is mapped in the module area -- skip over it */ | 870 | /* The XIP kernel is mapped in the module area -- skip over it */ |
871 | addr = ((unsigned long)_etext + PGDIR_SIZE - 1) & PGDIR_MASK; | 871 | addr = ((unsigned long)_etext + PMD_SIZE - 1) & PMD_MASK; |
872 | #endif | 872 | #endif |
873 | for ( ; addr < PAGE_OFFSET; addr += PGDIR_SIZE) | 873 | for ( ; addr < PAGE_OFFSET; addr += PMD_SIZE) |
874 | pmd_clear(pmd_off_k(addr)); | 874 | pmd_clear(pmd_off_k(addr)); |
875 | 875 | ||
876 | /* | 876 | /* |
@@ -885,10 +885,12 @@ static inline void prepare_page_table(void) | |||
885 | * memory bank, up to the end of the vmalloc region. | 885 | * memory bank, up to the end of the vmalloc region. |
886 | */ | 886 | */ |
887 | for (addr = __phys_to_virt(end); | 887 | for (addr = __phys_to_virt(end); |
888 | addr < VMALLOC_END; addr += PGDIR_SIZE) | 888 | addr < VMALLOC_END; addr += PMD_SIZE) |
889 | pmd_clear(pmd_off_k(addr)); | 889 | pmd_clear(pmd_off_k(addr)); |
890 | } | 890 | } |
891 | 891 | ||
892 | #define SWAPPER_PG_DIR_SIZE (PTRS_PER_PGD * sizeof(pgd_t)) | ||
893 | |||
892 | /* | 894 | /* |
893 | * Reserve the special regions of memory | 895 | * Reserve the special regions of memory |
894 | */ | 896 | */ |
@@ -898,7 +900,7 @@ void __init arm_mm_memblock_reserve(void) | |||
898 | * Reserve the page tables. These are already in use, | 900 | * Reserve the page tables. These are already in use, |
899 | * and can only be in node 0. | 901 | * and can only be in node 0. |
900 | */ | 902 | */ |
901 | memblock_reserve(__pa(swapper_pg_dir), PTRS_PER_PGD * sizeof(pgd_t)); | 903 | memblock_reserve(__pa(swapper_pg_dir), SWAPPER_PG_DIR_SIZE); |
902 | 904 | ||
903 | #ifdef CONFIG_SA1111 | 905 | #ifdef CONFIG_SA1111 |
904 | /* | 906 | /* |
@@ -926,7 +928,7 @@ static void __init devicemaps_init(struct machine_desc *mdesc) | |||
926 | */ | 928 | */ |
927 | vectors_page = early_alloc(PAGE_SIZE); | 929 | vectors_page = early_alloc(PAGE_SIZE); |
928 | 930 | ||
929 | for (addr = VMALLOC_END; addr; addr += PGDIR_SIZE) | 931 | for (addr = VMALLOC_END; addr; addr += PMD_SIZE) |
930 | pmd_clear(pmd_off_k(addr)); | 932 | pmd_clear(pmd_off_k(addr)); |
931 | 933 | ||
932 | /* | 934 | /* |
diff --git a/arch/arm/mm/proc-v7.S b/arch/arm/mm/proc-v7.S index 9049c0764db2..9591c8e9fb8c 100644 --- a/arch/arm/mm/proc-v7.S +++ b/arch/arm/mm/proc-v7.S | |||
@@ -218,7 +218,7 @@ ENDPROC(cpu_v7_set_pte_ext) | |||
218 | /* Suspend/resume support: derived from arch/arm/mach-s5pv210/sleep.S */ | 218 | /* Suspend/resume support: derived from arch/arm/mach-s5pv210/sleep.S */ |
219 | .globl cpu_v7_suspend_size | 219 | .globl cpu_v7_suspend_size |
220 | .equ cpu_v7_suspend_size, 4 * 9 | 220 | .equ cpu_v7_suspend_size, 4 * 9 |
221 | #ifdef CONFIG_PM_SLEEP | 221 | #ifdef CONFIG_ARM_CPU_SUSPEND |
222 | ENTRY(cpu_v7_do_suspend) | 222 | ENTRY(cpu_v7_do_suspend) |
223 | stmfd sp!, {r4 - r11, lr} | 223 | stmfd sp!, {r4 - r11, lr} |
224 | mrc p15, 0, r4, c13, c0, 0 @ FCSE/PID | 224 | mrc p15, 0, r4, c13, c0, 0 @ FCSE/PID |
diff --git a/arch/arm/plat-omap/Kconfig b/arch/arm/plat-omap/Kconfig index bb8f4a6b3e37..5b605a9eb091 100644 --- a/arch/arm/plat-omap/Kconfig +++ b/arch/arm/plat-omap/Kconfig | |||
@@ -14,6 +14,7 @@ config ARCH_OMAP1 | |||
14 | select CLKDEV_LOOKUP | 14 | select CLKDEV_LOOKUP |
15 | select CLKSRC_MMIO | 15 | select CLKSRC_MMIO |
16 | select GENERIC_IRQ_CHIP | 16 | select GENERIC_IRQ_CHIP |
17 | select HAVE_IDE | ||
17 | help | 18 | help |
18 | "Systems based on omap7xx, omap15xx or omap16xx" | 19 | "Systems based on omap7xx, omap15xx or omap16xx" |
19 | 20 | ||
diff --git a/arch/arm/plat-s5p/irq-gpioint.c b/arch/arm/plat-s5p/irq-gpioint.c index f71078ef6bb5..c65eb791d1bb 100644 --- a/arch/arm/plat-s5p/irq-gpioint.c +++ b/arch/arm/plat-s5p/irq-gpioint.c | |||
@@ -114,17 +114,18 @@ static __init int s5p_gpioint_add(struct s3c_gpio_chip *chip) | |||
114 | { | 114 | { |
115 | static int used_gpioint_groups = 0; | 115 | static int used_gpioint_groups = 0; |
116 | int group = chip->group; | 116 | int group = chip->group; |
117 | struct s5p_gpioint_bank *bank = NULL; | 117 | struct s5p_gpioint_bank *b, *bank = NULL; |
118 | struct irq_chip_generic *gc; | 118 | struct irq_chip_generic *gc; |
119 | struct irq_chip_type *ct; | 119 | struct irq_chip_type *ct; |
120 | 120 | ||
121 | if (used_gpioint_groups >= S5P_GPIOINT_GROUP_COUNT) | 121 | if (used_gpioint_groups >= S5P_GPIOINT_GROUP_COUNT) |
122 | return -ENOMEM; | 122 | return -ENOMEM; |
123 | 123 | ||
124 | list_for_each_entry(bank, &banks, list) { | 124 | list_for_each_entry(b, &banks, list) { |
125 | if (group >= bank->start && | 125 | if (group >= b->start && group < b->start + b->nr_groups) { |
126 | group < bank->start + bank->nr_groups) | 126 | bank = b; |
127 | break; | 127 | break; |
128 | } | ||
128 | } | 129 | } |
129 | if (!bank) | 130 | if (!bank) |
130 | return -EINVAL; | 131 | return -EINVAL; |
@@ -162,9 +163,9 @@ static __init int s5p_gpioint_add(struct s3c_gpio_chip *chip) | |||
162 | ct->chip.irq_mask = irq_gc_mask_set_bit; | 163 | ct->chip.irq_mask = irq_gc_mask_set_bit; |
163 | ct->chip.irq_unmask = irq_gc_mask_clr_bit; | 164 | ct->chip.irq_unmask = irq_gc_mask_clr_bit; |
164 | ct->chip.irq_set_type = s5p_gpioint_set_type, | 165 | ct->chip.irq_set_type = s5p_gpioint_set_type, |
165 | ct->regs.ack = PEND_OFFSET + REG_OFFSET(chip->group); | 166 | ct->regs.ack = PEND_OFFSET + REG_OFFSET(group - bank->start); |
166 | ct->regs.mask = MASK_OFFSET + REG_OFFSET(chip->group); | 167 | ct->regs.mask = MASK_OFFSET + REG_OFFSET(group - bank->start); |
167 | ct->regs.type = CON_OFFSET + REG_OFFSET(chip->group); | 168 | ct->regs.type = CON_OFFSET + REG_OFFSET(group - bank->start); |
168 | irq_setup_generic_chip(gc, IRQ_MSK(chip->chip.ngpio), | 169 | irq_setup_generic_chip(gc, IRQ_MSK(chip->chip.ngpio), |
169 | IRQ_GC_INIT_MASK_CACHE, | 170 | IRQ_GC_INIT_MASK_CACHE, |
170 | IRQ_NOREQUEST | IRQ_NOPROBE, 0); | 171 | IRQ_NOREQUEST | IRQ_NOPROBE, 0); |
diff --git a/arch/arm/plat-samsung/clock.c b/arch/arm/plat-samsung/clock.c index 302c42670bd1..3b4451979d1b 100644 --- a/arch/arm/plat-samsung/clock.c +++ b/arch/arm/plat-samsung/clock.c | |||
@@ -64,6 +64,17 @@ static LIST_HEAD(clocks); | |||
64 | */ | 64 | */ |
65 | DEFINE_SPINLOCK(clocks_lock); | 65 | DEFINE_SPINLOCK(clocks_lock); |
66 | 66 | ||
67 | /* Global watchdog clock used by arch_wtd_reset() callback */ | ||
68 | struct clk *s3c2410_wdtclk; | ||
69 | static int __init s3c_wdt_reset_init(void) | ||
70 | { | ||
71 | s3c2410_wdtclk = clk_get(NULL, "watchdog"); | ||
72 | if (IS_ERR(s3c2410_wdtclk)) | ||
73 | printk(KERN_WARNING "%s: warning: cannot get watchdog clock\n", __func__); | ||
74 | return 0; | ||
75 | } | ||
76 | arch_initcall(s3c_wdt_reset_init); | ||
77 | |||
67 | /* enable and disable calls for use with the clk struct */ | 78 | /* enable and disable calls for use with the clk struct */ |
68 | 79 | ||
69 | static int clk_null_enable(struct clk *clk, int enable) | 80 | static int clk_null_enable(struct clk *clk, int enable) |
diff --git a/arch/arm/plat-samsung/include/plat/clock.h b/arch/arm/plat-samsung/include/plat/clock.h index 87d5b38a86fb..73c66d4d10fa 100644 --- a/arch/arm/plat-samsung/include/plat/clock.h +++ b/arch/arm/plat-samsung/include/plat/clock.h | |||
@@ -9,6 +9,9 @@ | |||
9 | * published by the Free Software Foundation. | 9 | * published by the Free Software Foundation. |
10 | */ | 10 | */ |
11 | 11 | ||
12 | #ifndef __ASM_PLAT_CLOCK_H | ||
13 | #define __ASM_PLAT_CLOCK_H __FILE__ | ||
14 | |||
12 | #include <linux/spinlock.h> | 15 | #include <linux/spinlock.h> |
13 | #include <linux/clkdev.h> | 16 | #include <linux/clkdev.h> |
14 | 17 | ||
@@ -121,3 +124,8 @@ extern int s3c64xx_sclk_ctrl(struct clk *clk, int enable); | |||
121 | 124 | ||
122 | extern void s3c_pwmclk_init(void); | 125 | extern void s3c_pwmclk_init(void); |
123 | 126 | ||
127 | /* Global watchdog clock used by arch_wtd_reset() callback */ | ||
128 | |||
129 | extern struct clk *s3c2410_wdtclk; | ||
130 | |||
131 | #endif /* __ASM_PLAT_CLOCK_H */ | ||
diff --git a/arch/arm/plat-samsung/include/plat/watchdog-reset.h b/arch/arm/plat-samsung/include/plat/watchdog-reset.h index 54b762acb5a0..40dbb2b0ae22 100644 --- a/arch/arm/plat-samsung/include/plat/watchdog-reset.h +++ b/arch/arm/plat-samsung/include/plat/watchdog-reset.h | |||
@@ -10,6 +10,7 @@ | |||
10 | * published by the Free Software Foundation. | 10 | * published by the Free Software Foundation. |
11 | */ | 11 | */ |
12 | 12 | ||
13 | #include <plat/clock.h> | ||
13 | #include <plat/regs-watchdog.h> | 14 | #include <plat/regs-watchdog.h> |
14 | #include <mach/map.h> | 15 | #include <mach/map.h> |
15 | 16 | ||
@@ -19,17 +20,12 @@ | |||
19 | 20 | ||
20 | static inline void arch_wdt_reset(void) | 21 | static inline void arch_wdt_reset(void) |
21 | { | 22 | { |
22 | struct clk *wdtclk; | ||
23 | |||
24 | printk("arch_reset: attempting watchdog reset\n"); | 23 | printk("arch_reset: attempting watchdog reset\n"); |
25 | 24 | ||
26 | __raw_writel(0, S3C2410_WTCON); /* disable watchdog, to be safe */ | 25 | __raw_writel(0, S3C2410_WTCON); /* disable watchdog, to be safe */ |
27 | 26 | ||
28 | wdtclk = clk_get(NULL, "watchdog"); | 27 | if (s3c2410_wdtclk) |
29 | if (!IS_ERR(wdtclk)) { | 28 | clk_enable(s3c2410_wdtclk); |
30 | clk_enable(wdtclk); | ||
31 | } else | ||
32 | printk(KERN_WARNING "%s: warning: cannot get watchdog clock\n", __func__); | ||
33 | 29 | ||
34 | /* put initial values into count and data */ | 30 | /* put initial values into count and data */ |
35 | __raw_writel(0x80, S3C2410_WTCNT); | 31 | __raw_writel(0x80, S3C2410_WTCNT); |
diff --git a/arch/arm/tools/mach-types b/arch/arm/tools/mach-types index 62cc8f981171..5bdeef969847 100644 --- a/arch/arm/tools/mach-types +++ b/arch/arm/tools/mach-types | |||
@@ -12,10 +12,9 @@ | |||
12 | # | 12 | # |
13 | # http://www.arm.linux.org.uk/developer/machines/?action=new | 13 | # http://www.arm.linux.org.uk/developer/machines/?action=new |
14 | # | 14 | # |
15 | # XXX: This is a cut-down version of the file; it contains only machines that | 15 | # This is a cut-down version of the file; it contains only machines that |
16 | # XXX: are in mainline or have been submitted to the machine database within | 16 | # are merged into mainline or have been edited in the machine database |
17 | # XXX: the last 12 months. If your entry is missing please email rmk at | 17 | # within the last 12 months. References to machine_is_NAME() do not count! |
18 | # XXX: <linux@arm.linux.org.uk> | ||
19 | # | 18 | # |
20 | # Last update: Sat May 7 08:48:24 2011 | 19 | # Last update: Sat May 7 08:48:24 2011 |
21 | # | 20 | # |
@@ -65,6 +64,7 @@ h7201 ARCH_H7201 H7201 161 | |||
65 | h7202 ARCH_H7202 H7202 162 | 64 | h7202 ARCH_H7202 H7202 162 |
66 | iq80321 ARCH_IQ80321 IQ80321 169 | 65 | iq80321 ARCH_IQ80321 IQ80321 169 |
67 | ks8695 ARCH_KS8695 KS8695 180 | 66 | ks8695 ARCH_KS8695 KS8695 180 |
67 | karo ARCH_KARO KARO 190 | ||
68 | smdk2410 ARCH_SMDK2410 SMDK2410 193 | 68 | smdk2410 ARCH_SMDK2410 SMDK2410 193 |
69 | ceiva ARCH_CEIVA CEIVA 200 | 69 | ceiva ARCH_CEIVA CEIVA 200 |
70 | voiceblue MACH_VOICEBLUE VOICEBLUE 218 | 70 | voiceblue MACH_VOICEBLUE VOICEBLUE 218 |
@@ -188,6 +188,7 @@ omap_2430sdp MACH_OMAP_2430SDP OMAP_2430SDP 900 | |||
188 | davinci_evm MACH_DAVINCI_EVM DAVINCI_EVM 901 | 188 | davinci_evm MACH_DAVINCI_EVM DAVINCI_EVM 901 |
189 | palmz72 MACH_PALMZ72 PALMZ72 904 | 189 | palmz72 MACH_PALMZ72 PALMZ72 904 |
190 | nxdb500 MACH_NXDB500 NXDB500 905 | 190 | nxdb500 MACH_NXDB500 NXDB500 905 |
191 | apf9328 MACH_APF9328 APF9328 906 | ||
191 | palmt5 MACH_PALMT5 PALMT5 917 | 192 | palmt5 MACH_PALMT5 PALMT5 917 |
192 | palmtc MACH_PALMTC PALMTC 918 | 193 | palmtc MACH_PALMTC PALMTC 918 |
193 | omap_apollon MACH_OMAP_APOLLON OMAP_APOLLON 919 | 194 | omap_apollon MACH_OMAP_APOLLON OMAP_APOLLON 919 |
@@ -271,10 +272,12 @@ pcm038 MACH_PCM038 PCM038 1551 | |||
271 | ts_x09 MACH_TS209 TS209 1565 | 272 | ts_x09 MACH_TS209 TS209 1565 |
272 | at91cap9adk MACH_AT91CAP9ADK AT91CAP9ADK 1566 | 273 | at91cap9adk MACH_AT91CAP9ADK AT91CAP9ADK 1566 |
273 | mx31moboard MACH_MX31MOBOARD MX31MOBOARD 1574 | 274 | mx31moboard MACH_MX31MOBOARD MX31MOBOARD 1574 |
275 | vision_ep9307 MACH_VISION_EP9307 VISION_EP9307 1578 | ||
274 | terastation_pro2 MACH_TERASTATION_PRO2 TERASTATION_PRO2 1584 | 276 | terastation_pro2 MACH_TERASTATION_PRO2 TERASTATION_PRO2 1584 |
275 | linkstation_pro MACH_LINKSTATION_PRO LINKSTATION_PRO 1585 | 277 | linkstation_pro MACH_LINKSTATION_PRO LINKSTATION_PRO 1585 |
276 | e350 MACH_E350 E350 1596 | 278 | e350 MACH_E350 E350 1596 |
277 | ts409 MACH_TS409 TS409 1601 | 279 | ts409 MACH_TS409 TS409 1601 |
280 | rsi_ews MACH_RSI_EWS RSI_EWS 1609 | ||
278 | cm_x300 MACH_CM_X300 CM_X300 1616 | 281 | cm_x300 MACH_CM_X300 CM_X300 1616 |
279 | at91sam9g20ek MACH_AT91SAM9G20EK AT91SAM9G20EK 1624 | 282 | at91sam9g20ek MACH_AT91SAM9G20EK AT91SAM9G20EK 1624 |
280 | smdk6410 MACH_SMDK6410 SMDK6410 1626 | 283 | smdk6410 MACH_SMDK6410 SMDK6410 1626 |
@@ -331,6 +334,7 @@ smdkc100 MACH_SMDKC100 SMDKC100 1826 | |||
331 | tavorevb MACH_TAVOREVB TAVOREVB 1827 | 334 | tavorevb MACH_TAVOREVB TAVOREVB 1827 |
332 | saar MACH_SAAR SAAR 1828 | 335 | saar MACH_SAAR SAAR 1828 |
333 | at91sam9m10g45ek MACH_AT91SAM9M10G45EK AT91SAM9M10G45EK 1830 | 336 | at91sam9m10g45ek MACH_AT91SAM9M10G45EK AT91SAM9M10G45EK 1830 |
337 | usb_a9g20 MACH_USB_A9G20 USB_A9G20 1841 | ||
334 | mxlads MACH_MXLADS MXLADS 1851 | 338 | mxlads MACH_MXLADS MXLADS 1851 |
335 | linkstation_mini MACH_LINKSTATION_MINI LINKSTATION_MINI 1858 | 339 | linkstation_mini MACH_LINKSTATION_MINI LINKSTATION_MINI 1858 |
336 | afeb9260 MACH_AFEB9260 AFEB9260 1859 | 340 | afeb9260 MACH_AFEB9260 AFEB9260 1859 |
@@ -369,6 +373,7 @@ pcm043 MACH_PCM043 PCM043 2072 | |||
369 | sheevaplug MACH_SHEEVAPLUG SHEEVAPLUG 2097 | 373 | sheevaplug MACH_SHEEVAPLUG SHEEVAPLUG 2097 |
370 | avengers_lite MACH_AVENGERS_LITE AVENGERS_LITE 2104 | 374 | avengers_lite MACH_AVENGERS_LITE AVENGERS_LITE 2104 |
371 | mx51_babbage MACH_MX51_BABBAGE MX51_BABBAGE 2125 | 375 | mx51_babbage MACH_MX51_BABBAGE MX51_BABBAGE 2125 |
376 | tx37 MACH_TX37 TX37 2127 | ||
372 | rd78x00_masa MACH_RD78X00_MASA RD78X00_MASA 2135 | 377 | rd78x00_masa MACH_RD78X00_MASA RD78X00_MASA 2135 |
373 | dm355_leopard MACH_DM355_LEOPARD DM355_LEOPARD 2138 | 378 | dm355_leopard MACH_DM355_LEOPARD DM355_LEOPARD 2138 |
374 | ts219 MACH_TS219 TS219 2139 | 379 | ts219 MACH_TS219 TS219 2139 |
@@ -379,6 +384,7 @@ omap_4430sdp MACH_OMAP_4430SDP OMAP_4430SDP 2160 | |||
379 | magx_zn5 MACH_MAGX_ZN5 MAGX_ZN5 2162 | 384 | magx_zn5 MACH_MAGX_ZN5 MAGX_ZN5 2162 |
380 | btmavb101 MACH_BTMAVB101 BTMAVB101 2172 | 385 | btmavb101 MACH_BTMAVB101 BTMAVB101 2172 |
381 | btmawb101 MACH_BTMAWB101 BTMAWB101 2173 | 386 | btmawb101 MACH_BTMAWB101 BTMAWB101 2173 |
387 | tx25 MACH_TX25 TX25 2177 | ||
382 | omap3_torpedo MACH_OMAP3_TORPEDO OMAP3_TORPEDO 2178 | 388 | omap3_torpedo MACH_OMAP3_TORPEDO OMAP3_TORPEDO 2178 |
383 | anw6410 MACH_ANW6410 ANW6410 2183 | 389 | anw6410 MACH_ANW6410 ANW6410 2183 |
384 | imx27_visstrim_m10 MACH_IMX27_VISSTRIM_M10 IMX27_VISSTRIM_M10 2187 | 390 | imx27_visstrim_m10 MACH_IMX27_VISSTRIM_M10 IMX27_VISSTRIM_M10 2187 |
@@ -423,6 +429,7 @@ raumfeld_rc MACH_RAUMFELD_RC RAUMFELD_RC 2413 | |||
423 | raumfeld_connector MACH_RAUMFELD_CONNECTOR RAUMFELD_CONNECTOR 2414 | 429 | raumfeld_connector MACH_RAUMFELD_CONNECTOR RAUMFELD_CONNECTOR 2414 |
424 | raumfeld_speaker MACH_RAUMFELD_SPEAKER RAUMFELD_SPEAKER 2415 | 430 | raumfeld_speaker MACH_RAUMFELD_SPEAKER RAUMFELD_SPEAKER 2415 |
425 | tnetv107x MACH_TNETV107X TNETV107X 2418 | 431 | tnetv107x MACH_TNETV107X TNETV107X 2418 |
432 | mx51_m2id MACH_MX51_M2ID MX51_M2ID 2428 | ||
426 | smdkv210 MACH_SMDKV210 SMDKV210 2456 | 433 | smdkv210 MACH_SMDKV210 SMDKV210 2456 |
427 | omap_zoom3 MACH_OMAP_ZOOM3 OMAP_ZOOM3 2464 | 434 | omap_zoom3 MACH_OMAP_ZOOM3 OMAP_ZOOM3 2464 |
428 | omap_3630sdp MACH_OMAP_3630SDP OMAP_3630SDP 2465 | 435 | omap_3630sdp MACH_OMAP_3630SDP OMAP_3630SDP 2465 |
@@ -433,14 +440,17 @@ omapl138_hawkboard MACH_OMAPL138_HAWKBOARD OMAPL138_HAWKBOARD 2495 | |||
433 | ts41x MACH_TS41X TS41X 2502 | 440 | ts41x MACH_TS41X TS41X 2502 |
434 | phy3250 MACH_PHY3250 PHY3250 2511 | 441 | phy3250 MACH_PHY3250 PHY3250 2511 |
435 | mini6410 MACH_MINI6410 MINI6410 2520 | 442 | mini6410 MACH_MINI6410 MINI6410 2520 |
443 | tx51 MACH_TX51 TX51 2529 | ||
436 | mx28evk MACH_MX28EVK MX28EVK 2531 | 444 | mx28evk MACH_MX28EVK MX28EVK 2531 |
437 | smartq5 MACH_SMARTQ5 SMARTQ5 2534 | 445 | smartq5 MACH_SMARTQ5 SMARTQ5 2534 |
438 | davinci_dm6467tevm MACH_DAVINCI_DM6467TEVM DAVINCI_DM6467TEVM 2548 | 446 | davinci_dm6467tevm MACH_DAVINCI_DM6467TEVM DAVINCI_DM6467TEVM 2548 |
439 | mxt_td60 MACH_MXT_TD60 MXT_TD60 2550 | 447 | mxt_td60 MACH_MXT_TD60 MXT_TD60 2550 |
440 | riot_bei2 MACH_RIOT_BEI2 RIOT_BEI2 2576 | 448 | riot_bei2 MACH_RIOT_BEI2 RIOT_BEI2 2576 |
441 | riot_x37 MACH_RIOT_X37 RIOT_X37 2578 | 449 | riot_x37 MACH_RIOT_X37 RIOT_X37 2578 |
450 | pca101 MACH_PCA101 PCA101 2595 | ||
442 | capc7117 MACH_CAPC7117 CAPC7117 2612 | 451 | capc7117 MACH_CAPC7117 CAPC7117 2612 |
443 | icontrol MACH_ICONTROL ICONTROL 2624 | 452 | icontrol MACH_ICONTROL ICONTROL 2624 |
453 | gplugd MACH_GPLUGD GPLUGD 2625 | ||
444 | qsd8x50a_st1_5 MACH_QSD8X50A_ST1_5 QSD8X50A_ST1_5 2627 | 454 | qsd8x50a_st1_5 MACH_QSD8X50A_ST1_5 QSD8X50A_ST1_5 2627 |
445 | mx23evk MACH_MX23EVK MX23EVK 2629 | 455 | mx23evk MACH_MX23EVK MX23EVK 2629 |
446 | ap4evb MACH_AP4EVB AP4EVB 2630 | 456 | ap4evb MACH_AP4EVB AP4EVB 2630 |
@@ -1113,3 +1123,5 @@ blissc MACH_BLISSC BLISSC 3491 | |||
1113 | thales_adc MACH_THALES_ADC THALES_ADC 3492 | 1123 | thales_adc MACH_THALES_ADC THALES_ADC 3492 |
1114 | ubisys_p9d_evp MACH_UBISYS_P9D_EVP UBISYS_P9D_EVP 3493 | 1124 | ubisys_p9d_evp MACH_UBISYS_P9D_EVP UBISYS_P9D_EVP 3493 |
1115 | atdgp318 MACH_ATDGP318 ATDGP318 3494 | 1125 | atdgp318 MACH_ATDGP318 ATDGP318 3494 |
1126 | smdk4212 MACH_SMDK4212 SMDK4212 3638 | ||
1127 | smdk4412 MACH_SMDK4412 SMDK4412 3765 | ||
diff --git a/arch/arm/vfp/Makefile b/arch/arm/vfp/Makefile index 6de73aab0195..a81404c09d5d 100644 --- a/arch/arm/vfp/Makefile +++ b/arch/arm/vfp/Makefile | |||
@@ -7,7 +7,7 @@ | |||
7 | # ccflags-y := -DDEBUG | 7 | # ccflags-y := -DDEBUG |
8 | # asflags-y := -DDEBUG | 8 | # asflags-y := -DDEBUG |
9 | 9 | ||
10 | KBUILD_AFLAGS :=$(KBUILD_AFLAGS:-msoft-float=-Wa,-mfpu=softvfp+vfp) | 10 | KBUILD_AFLAGS :=$(KBUILD_AFLAGS:-msoft-float=-Wa,-mfpu=softvfp+vfp -mfloat-abi=soft) |
11 | LDFLAGS +=--no-warn-mismatch | 11 | LDFLAGS +=--no-warn-mismatch |
12 | 12 | ||
13 | obj-y += vfp.o | 13 | obj-y += vfp.o |