diff options
Diffstat (limited to 'arch/arm')
382 files changed, 3652 insertions, 3065 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 05589e85c180..e91cec43f2c0 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,8 +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 (EXPERIMENTAL)" | 198 | bool "Patch physical to virtual translations at runtime" if EMBEDDED |
199 | depends on EXPERIMENTAL | 199 | default y |
200 | depends on !XIP_KERNEL && MMU | 200 | depends on !XIP_KERNEL && MMU |
201 | depends on !ARCH_REALVIEW || !SPARSEMEM | 201 | depends on !ARCH_REALVIEW || !SPARSEMEM |
202 | help | 202 | help |
@@ -205,16 +205,16 @@ config ARM_PATCH_PHYS_VIRT | |||
205 | kernel in system memory. | 205 | kernel in system memory. |
206 | 206 | ||
207 | 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 |
208 | of physical memory is at a 16MB boundary, or theoretically 64K | 208 | of physical memory is at a 16MB boundary. |
209 | for the MSM machine class. | ||
210 | 209 | ||
211 | config ARM_PATCH_PHYS_VIRT_16BIT | 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. | ||
213 | |||
214 | |||
215 | config GENERIC_BUG | ||
212 | def_bool y | 216 | def_bool y |
213 | depends on ARM_PATCH_PHYS_VIRT && ARCH_MSM | 217 | depends on BUG |
214 | help | ||
215 | This option extends the physical to virtual translation patching | ||
216 | to allow physical memory down to a theoretical minimum of 64K | ||
217 | boundaries. | ||
218 | 218 | ||
219 | source "init/Kconfig" | 219 | source "init/Kconfig" |
220 | 220 | ||
@@ -302,7 +302,6 @@ config ARCH_AT91 | |||
302 | select ARCH_REQUIRE_GPIOLIB | 302 | select ARCH_REQUIRE_GPIOLIB |
303 | select HAVE_CLK | 303 | select HAVE_CLK |
304 | select CLKDEV_LOOKUP | 304 | select CLKDEV_LOOKUP |
305 | select ARM_PATCH_PHYS_VIRT if MMU | ||
306 | help | 305 | help |
307 | This enables support for systems based on the Atmel AT91RM9200, | 306 | This enables support for systems based on the Atmel AT91RM9200, |
308 | AT91SAM9 and AT91CAP9 processors. | 307 | AT91SAM9 and AT91CAP9 processors. |
@@ -347,7 +346,6 @@ config ARCH_GEMINI | |||
347 | config ARCH_PRIMA2 | 346 | config ARCH_PRIMA2 |
348 | bool "CSR SiRFSoC PRIMA2 ARM Cortex A9 Platform" | 347 | bool "CSR SiRFSoC PRIMA2 ARM Cortex A9 Platform" |
349 | select CPU_V7 | 348 | select CPU_V7 |
350 | select GENERIC_TIME | ||
351 | select NO_IOPORT | 349 | select NO_IOPORT |
352 | select GENERIC_CLOCKEVENTS | 350 | select GENERIC_CLOCKEVENTS |
353 | select CLKDEV_LOOKUP | 351 | select CLKDEV_LOOKUP |
@@ -386,6 +384,7 @@ config ARCH_FOOTBRIDGE | |||
386 | select CPU_SA110 | 384 | select CPU_SA110 |
387 | select FOOTBRIDGE | 385 | select FOOTBRIDGE |
388 | select GENERIC_CLOCKEVENTS | 386 | select GENERIC_CLOCKEVENTS |
387 | select HAVE_IDE | ||
389 | help | 388 | help |
390 | Support for systems based on the DC21285 companion chip | 389 | Support for systems based on the DC21285 companion chip |
391 | ("FootBridge"), such as the Simtec CATS and the Rebel NetWinder. | 390 | ("FootBridge"), such as the Simtec CATS and the Rebel NetWinder. |
@@ -520,7 +519,6 @@ config ARCH_LPC32XX | |||
520 | select ARM_AMBA | 519 | select ARM_AMBA |
521 | select USB_ARCH_HAS_OHCI | 520 | select USB_ARCH_HAS_OHCI |
522 | select CLKDEV_LOOKUP | 521 | select CLKDEV_LOOKUP |
523 | select GENERIC_TIME | ||
524 | select GENERIC_CLOCKEVENTS | 522 | select GENERIC_CLOCKEVENTS |
525 | help | 523 | help |
526 | Support for the NXP LPC32XX family of processors | 524 | Support for the NXP LPC32XX family of processors |
@@ -599,7 +597,6 @@ config ARCH_TEGRA | |||
599 | bool "NVIDIA Tegra" | 597 | bool "NVIDIA Tegra" |
600 | select CLKDEV_LOOKUP | 598 | select CLKDEV_LOOKUP |
601 | select CLKSRC_MMIO | 599 | select CLKSRC_MMIO |
602 | select GENERIC_TIME | ||
603 | select GENERIC_CLOCKEVENTS | 600 | select GENERIC_CLOCKEVENTS |
604 | select GENERIC_GPIO | 601 | select GENERIC_GPIO |
605 | select HAVE_CLK | 602 | select HAVE_CLK |
@@ -632,6 +629,8 @@ config ARCH_PXA | |||
632 | select SPARSE_IRQ | 629 | select SPARSE_IRQ |
633 | select AUTO_ZRELADDR | 630 | select AUTO_ZRELADDR |
634 | select MULTI_IRQ_HANDLER | 631 | select MULTI_IRQ_HANDLER |
632 | select ARM_CPU_SUSPEND if PM | ||
633 | select HAVE_IDE | ||
635 | help | 634 | help |
636 | Support for Intel/Marvell's PXA2xx/PXA3xx processor line. | 635 | Support for Intel/Marvell's PXA2xx/PXA3xx processor line. |
637 | 636 | ||
@@ -672,6 +671,7 @@ config ARCH_RPC | |||
672 | select NO_IOPORT | 671 | select NO_IOPORT |
673 | select ARCH_SPARSEMEM_ENABLE | 672 | select ARCH_SPARSEMEM_ENABLE |
674 | select ARCH_USES_GETTIMEOFFSET | 673 | select ARCH_USES_GETTIMEOFFSET |
674 | select HAVE_IDE | ||
675 | help | 675 | help |
676 | On the Acorn Risc-PC, Linux can support the internal IDE disk and | 676 | On the Acorn Risc-PC, Linux can support the internal IDE disk and |
677 | CD-ROM interface, serial and parallel port, and the floppy drive. | 677 | CD-ROM interface, serial and parallel port, and the floppy drive. |
@@ -690,6 +690,7 @@ config ARCH_SA1100 | |||
690 | select HAVE_SCHED_CLOCK | 690 | select HAVE_SCHED_CLOCK |
691 | select TICK_ONESHOT | 691 | select TICK_ONESHOT |
692 | select ARCH_REQUIRE_GPIOLIB | 692 | select ARCH_REQUIRE_GPIOLIB |
693 | select HAVE_IDE | ||
693 | help | 694 | help |
694 | Support for StrongARM 11x0 based boards. | 695 | Support for StrongARM 11x0 based boards. |
695 | 696 | ||
@@ -723,7 +724,6 @@ config ARCH_S3C64XX | |||
723 | select ARCH_REQUIRE_GPIOLIB | 724 | select ARCH_REQUIRE_GPIOLIB |
724 | select SAMSUNG_CLKSRC | 725 | select SAMSUNG_CLKSRC |
725 | select SAMSUNG_IRQ_VIC_TIMER | 726 | select SAMSUNG_IRQ_VIC_TIMER |
726 | select SAMSUNG_IRQ_UART | ||
727 | select S3C_GPIO_TRACK | 727 | select S3C_GPIO_TRACK |
728 | select S3C_GPIO_PULL_UPDOWN | 728 | select S3C_GPIO_PULL_UPDOWN |
729 | select S3C_GPIO_CFG_S3C24XX | 729 | select S3C_GPIO_CFG_S3C24XX |
@@ -912,7 +912,6 @@ config ARCH_VT8500 | |||
912 | config ARCH_ZYNQ | 912 | config ARCH_ZYNQ |
913 | bool "Xilinx Zynq ARM Cortex A9 Platform" | 913 | bool "Xilinx Zynq ARM Cortex A9 Platform" |
914 | select CPU_V7 | 914 | select CPU_V7 |
915 | select GENERIC_TIME | ||
916 | select GENERIC_CLOCKEVENTS | 915 | select GENERIC_CLOCKEVENTS |
917 | select CLKDEV_LOOKUP | 916 | select CLKDEV_LOOKUP |
918 | select ARM_GIC | 917 | select ARM_GIC |
@@ -1273,6 +1272,32 @@ config ARM_ERRATA_754327 | |||
1273 | This workaround defines cpu_relax() as smp_mb(), preventing correctly | 1272 | This workaround defines cpu_relax() as smp_mb(), preventing correctly |
1274 | written polling loops from denying visibility of updates to memory. | 1273 | written polling loops from denying visibility of updates to memory. |
1275 | 1274 | ||
1275 | config ARM_ERRATA_364296 | ||
1276 | bool "ARM errata: Possible cache data corruption with hit-under-miss enabled" | ||
1277 | depends on CPU_V6 && !SMP | ||
1278 | help | ||
1279 | This options enables the workaround for the 364296 ARM1136 | ||
1280 | r0p2 erratum (possible cache data corruption with | ||
1281 | hit-under-miss enabled). It sets the undocumented bit 31 in | ||
1282 | the auxiliary control register and the FI bit in the control | ||
1283 | register, thus disabling hit-under-miss without putting the | ||
1284 | processor into full low interrupt latency mode. ARM11MPCore | ||
1285 | is not affected. | ||
1286 | |||
1287 | config ARM_ERRATA_764369 | ||
1288 | bool "ARM errata: Data cache line maintenance operation by MVA may not succeed" | ||
1289 | depends on CPU_V7 && SMP | ||
1290 | help | ||
1291 | This option enables the workaround for erratum 764369 | ||
1292 | affecting Cortex-A9 MPCore with two or more processors (all | ||
1293 | current revisions). Under certain timing circumstances, a data | ||
1294 | cache line maintenance operation by MVA targeting an Inner | ||
1295 | Shareable memory region may fail to proceed up to either the | ||
1296 | Point of Coherency or to the Point of Unification of the | ||
1297 | system. This workaround adds a DSB instruction before the | ||
1298 | relevant cache maintenance functions and sets a specific bit | ||
1299 | in the diagnostic control register of the SCU. | ||
1300 | |||
1276 | endmenu | 1301 | endmenu |
1277 | 1302 | ||
1278 | source "arch/arm/common/Kconfig" | 1303 | source "arch/arm/common/Kconfig" |
@@ -1351,6 +1376,7 @@ config SMP | |||
1351 | MACH_REALVIEW_PB11MP || MACH_REALVIEW_PBX || ARCH_OMAP4 || \ | 1376 | MACH_REALVIEW_PB11MP || MACH_REALVIEW_PBX || ARCH_OMAP4 || \ |
1352 | ARCH_EXYNOS4 || ARCH_TEGRA || ARCH_U8500 || ARCH_VEXPRESS_CA9X4 || \ | 1377 | ARCH_EXYNOS4 || ARCH_TEGRA || ARCH_U8500 || ARCH_VEXPRESS_CA9X4 || \ |
1353 | ARCH_MSM_SCORPIONMP || ARCH_SHMOBILE | 1378 | ARCH_MSM_SCORPIONMP || ARCH_SHMOBILE |
1379 | depends on MMU | ||
1354 | select USE_GENERIC_SMP_HELPERS | 1380 | select USE_GENERIC_SMP_HELPERS |
1355 | select HAVE_ARM_SCU if !ARCH_MSM_SCORPIONMP | 1381 | select HAVE_ARM_SCU if !ARCH_MSM_SCORPIONMP |
1356 | help | 1382 | help |
@@ -1364,7 +1390,7 @@ config SMP | |||
1364 | processor machines. On a single processor machine, the kernel will | 1390 | processor machines. On a single processor machine, the kernel will |
1365 | run faster if you say N here. | 1391 | run faster if you say N here. |
1366 | 1392 | ||
1367 | See also <file:Documentation/i386/IO-APIC.txt>, | 1393 | See also <file:Documentation/x86/i386/IO-APIC.txt>, |
1368 | <file:Documentation/nmi_watchdog.txt> and the SMP-HOWTO available at | 1394 | <file:Documentation/nmi_watchdog.txt> and the SMP-HOWTO available at |
1369 | <http://tldp.org/HOWTO/SMP-HOWTO.html>. | 1395 | <http://tldp.org/HOWTO/SMP-HOWTO.html>. |
1370 | 1396 | ||
@@ -1383,6 +1409,31 @@ config SMP_ON_UP | |||
1383 | 1409 | ||
1384 | If you don't know what to do here, say Y. | 1410 | If you don't know what to do here, say Y. |
1385 | 1411 | ||
1412 | config ARM_CPU_TOPOLOGY | ||
1413 | bool "Support cpu topology definition" | ||
1414 | depends on SMP && CPU_V7 | ||
1415 | default y | ||
1416 | help | ||
1417 | Support ARM cpu topology definition. The MPIDR register defines | ||
1418 | affinity between processors which is then used to describe the cpu | ||
1419 | topology of an ARM System. | ||
1420 | |||
1421 | config SCHED_MC | ||
1422 | bool "Multi-core scheduler support" | ||
1423 | depends on ARM_CPU_TOPOLOGY | ||
1424 | help | ||
1425 | Multi-core scheduler support improves the CPU scheduler's decision | ||
1426 | making when dealing with multi-core CPU chips at a cost of slightly | ||
1427 | increased overhead in some places. If unsure say N here. | ||
1428 | |||
1429 | config SCHED_SMT | ||
1430 | bool "SMT scheduler support" | ||
1431 | depends on ARM_CPU_TOPOLOGY | ||
1432 | help | ||
1433 | Improves the CPU scheduler's decision making when dealing with | ||
1434 | MultiThreading at a cost of slightly increased overhead in some | ||
1435 | places. If unsure say N here. | ||
1436 | |||
1386 | config HAVE_ARM_SCU | 1437 | config HAVE_ARM_SCU |
1387 | bool | 1438 | bool |
1388 | help | 1439 | help |
@@ -1458,6 +1509,7 @@ config THUMB2_KERNEL | |||
1458 | depends on CPU_V7 && !CPU_V6 && !CPU_V6K && EXPERIMENTAL | 1509 | depends on CPU_V7 && !CPU_V6 && !CPU_V6K && EXPERIMENTAL |
1459 | select AEABI | 1510 | select AEABI |
1460 | select ARM_ASM_UNIFIED | 1511 | select ARM_ASM_UNIFIED |
1512 | select ARM_UNWIND | ||
1461 | help | 1513 | help |
1462 | By enabling this option, the kernel will be compiled in | 1514 | By enabling this option, the kernel will be compiled in |
1463 | Thumb-2 mode. A compiler/assembler that understand the unified | 1515 | Thumb-2 mode. A compiler/assembler that understand the unified |
@@ -2077,6 +2129,9 @@ config ARCH_SUSPEND_POSSIBLE | |||
2077 | CPU_V6 || CPU_V6K || CPU_V7 || CPU_XSC3 || CPU_XSCALE | 2129 | CPU_V6 || CPU_V6K || CPU_V7 || CPU_XSC3 || CPU_XSCALE |
2078 | def_bool y | 2130 | def_bool y |
2079 | 2131 | ||
2132 | config ARM_CPU_SUSPEND | ||
2133 | def_bool PM_SLEEP | ||
2134 | |||
2080 | endmenu | 2135 | endmenu |
2081 | 2136 | ||
2082 | source "net/Kconfig" | 2137 | 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/compressed/mmcif-sh7372.c b/arch/arm/boot/compressed/mmcif-sh7372.c index b6f61d9a5a1b..672ae95db5c3 100644 --- a/arch/arm/boot/compressed/mmcif-sh7372.c +++ b/arch/arm/boot/compressed/mmcif-sh7372.c | |||
@@ -82,7 +82,7 @@ asmlinkage void mmc_loader(unsigned char *buf, unsigned long len) | |||
82 | 82 | ||
83 | 83 | ||
84 | /* Disable clock to MMC hardware block */ | 84 | /* Disable clock to MMC hardware block */ |
85 | __raw_writel(__raw_readl(SMSTPCR3) & (1 << 12), SMSTPCR3); | 85 | __raw_writel(__raw_readl(SMSTPCR3) | (1 << 12), SMSTPCR3); |
86 | 86 | ||
87 | mmc_update_progress(MMC_PROGRESS_DONE); | 87 | mmc_update_progress(MMC_PROGRESS_DONE); |
88 | } | 88 | } |
diff --git a/arch/arm/boot/compressed/sdhi-sh7372.c b/arch/arm/boot/compressed/sdhi-sh7372.c index d403a8b24d7f..d279294f2381 100644 --- a/arch/arm/boot/compressed/sdhi-sh7372.c +++ b/arch/arm/boot/compressed/sdhi-sh7372.c | |||
@@ -85,7 +85,7 @@ asmlinkage void mmc_loader(unsigned short *buf, unsigned long len) | |||
85 | goto err; | 85 | goto err; |
86 | 86 | ||
87 | /* Disable clock to SDHI1 hardware block */ | 87 | /* Disable clock to SDHI1 hardware block */ |
88 | __raw_writel(__raw_readl(SMSTPCR3) & (1 << 13), SMSTPCR3); | 88 | __raw_writel(__raw_readl(SMSTPCR3) | (1 << 13), SMSTPCR3); |
89 | 89 | ||
90 | mmc_update_progress(MMC_PROGRESS_DONE); | 90 | mmc_update_progress(MMC_PROGRESS_DONE); |
91 | 91 | ||
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..bdbb3f74f0fe 100644 --- a/arch/arm/common/gic.c +++ b/arch/arm/common/gic.c | |||
@@ -33,7 +33,7 @@ | |||
33 | #include <asm/mach/irq.h> | 33 | #include <asm/mach/irq.h> |
34 | #include <asm/hardware/gic.h> | 34 | #include <asm/hardware/gic.h> |
35 | 35 | ||
36 | static DEFINE_SPINLOCK(irq_controller_lock); | 36 | static DEFINE_RAW_SPINLOCK(irq_controller_lock); |
37 | 37 | ||
38 | /* Address of GIC 0 CPU interface */ | 38 | /* Address of GIC 0 CPU interface */ |
39 | void __iomem *gic_cpu_base_addr __read_mostly; | 39 | void __iomem *gic_cpu_base_addr __read_mostly; |
@@ -82,30 +82,30 @@ static void gic_mask_irq(struct irq_data *d) | |||
82 | { | 82 | { |
83 | u32 mask = 1 << (d->irq % 32); | 83 | u32 mask = 1 << (d->irq % 32); |
84 | 84 | ||
85 | spin_lock(&irq_controller_lock); | 85 | raw_spin_lock(&irq_controller_lock); |
86 | writel_relaxed(mask, gic_dist_base(d) + GIC_DIST_ENABLE_CLEAR + (gic_irq(d) / 32) * 4); | 86 | writel_relaxed(mask, gic_dist_base(d) + GIC_DIST_ENABLE_CLEAR + (gic_irq(d) / 32) * 4); |
87 | if (gic_arch_extn.irq_mask) | 87 | if (gic_arch_extn.irq_mask) |
88 | gic_arch_extn.irq_mask(d); | 88 | gic_arch_extn.irq_mask(d); |
89 | spin_unlock(&irq_controller_lock); | 89 | raw_spin_unlock(&irq_controller_lock); |
90 | } | 90 | } |
91 | 91 | ||
92 | static void gic_unmask_irq(struct irq_data *d) | 92 | static void gic_unmask_irq(struct irq_data *d) |
93 | { | 93 | { |
94 | u32 mask = 1 << (d->irq % 32); | 94 | u32 mask = 1 << (d->irq % 32); |
95 | 95 | ||
96 | spin_lock(&irq_controller_lock); | 96 | raw_spin_lock(&irq_controller_lock); |
97 | if (gic_arch_extn.irq_unmask) | 97 | if (gic_arch_extn.irq_unmask) |
98 | gic_arch_extn.irq_unmask(d); | 98 | gic_arch_extn.irq_unmask(d); |
99 | writel_relaxed(mask, gic_dist_base(d) + GIC_DIST_ENABLE_SET + (gic_irq(d) / 32) * 4); | 99 | writel_relaxed(mask, gic_dist_base(d) + GIC_DIST_ENABLE_SET + (gic_irq(d) / 32) * 4); |
100 | spin_unlock(&irq_controller_lock); | 100 | raw_spin_unlock(&irq_controller_lock); |
101 | } | 101 | } |
102 | 102 | ||
103 | static void gic_eoi_irq(struct irq_data *d) | 103 | static void gic_eoi_irq(struct irq_data *d) |
104 | { | 104 | { |
105 | if (gic_arch_extn.irq_eoi) { | 105 | if (gic_arch_extn.irq_eoi) { |
106 | spin_lock(&irq_controller_lock); | 106 | raw_spin_lock(&irq_controller_lock); |
107 | gic_arch_extn.irq_eoi(d); | 107 | gic_arch_extn.irq_eoi(d); |
108 | spin_unlock(&irq_controller_lock); | 108 | raw_spin_unlock(&irq_controller_lock); |
109 | } | 109 | } |
110 | 110 | ||
111 | writel_relaxed(gic_irq(d), gic_cpu_base(d) + GIC_CPU_EOI); | 111 | writel_relaxed(gic_irq(d), gic_cpu_base(d) + GIC_CPU_EOI); |
@@ -129,7 +129,7 @@ static int gic_set_type(struct irq_data *d, unsigned int type) | |||
129 | if (type != IRQ_TYPE_LEVEL_HIGH && type != IRQ_TYPE_EDGE_RISING) | 129 | if (type != IRQ_TYPE_LEVEL_HIGH && type != IRQ_TYPE_EDGE_RISING) |
130 | return -EINVAL; | 130 | return -EINVAL; |
131 | 131 | ||
132 | spin_lock(&irq_controller_lock); | 132 | raw_spin_lock(&irq_controller_lock); |
133 | 133 | ||
134 | if (gic_arch_extn.irq_set_type) | 134 | if (gic_arch_extn.irq_set_type) |
135 | gic_arch_extn.irq_set_type(d, type); | 135 | gic_arch_extn.irq_set_type(d, type); |
@@ -154,7 +154,7 @@ static int gic_set_type(struct irq_data *d, unsigned int type) | |||
154 | if (enabled) | 154 | if (enabled) |
155 | writel_relaxed(enablemask, base + GIC_DIST_ENABLE_SET + enableoff); | 155 | writel_relaxed(enablemask, base + GIC_DIST_ENABLE_SET + enableoff); |
156 | 156 | ||
157 | spin_unlock(&irq_controller_lock); | 157 | raw_spin_unlock(&irq_controller_lock); |
158 | 158 | ||
159 | return 0; | 159 | return 0; |
160 | } | 160 | } |
@@ -180,12 +180,12 @@ 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 | raw_spin_lock(&irq_controller_lock); |
186 | val = readl_relaxed(reg) & ~mask; | 186 | val = readl_relaxed(reg) & ~mask; |
187 | writel_relaxed(val | bit, reg); | 187 | writel_relaxed(val | bit, reg); |
188 | spin_unlock(&irq_controller_lock); | 188 | raw_spin_unlock(&irq_controller_lock); |
189 | 189 | ||
190 | return IRQ_SET_MASK_OK; | 190 | return IRQ_SET_MASK_OK; |
191 | } | 191 | } |
@@ -215,9 +215,9 @@ static void gic_handle_cascade_irq(unsigned int irq, struct irq_desc *desc) | |||
215 | 215 | ||
216 | chained_irq_enter(chip, desc); | 216 | chained_irq_enter(chip, desc); |
217 | 217 | ||
218 | spin_lock(&irq_controller_lock); | 218 | raw_spin_lock(&irq_controller_lock); |
219 | status = readl_relaxed(chip_data->cpu_base + GIC_CPU_INTACK); | 219 | status = readl_relaxed(chip_data->cpu_base + GIC_CPU_INTACK); |
220 | spin_unlock(&irq_controller_lock); | 220 | raw_spin_unlock(&irq_controller_lock); |
221 | 221 | ||
222 | gic_irq = (status & 0x3ff); | 222 | gic_irq = (status & 0x3ff); |
223 | if (gic_irq == 1023) | 223 | if (gic_irq == 1023) |
@@ -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/dma.h b/arch/arm/include/asm/dma.h index 628670e9d7c9..69a5b0b6455c 100644 --- a/arch/arm/include/asm/dma.h +++ b/arch/arm/include/asm/dma.h | |||
@@ -34,18 +34,18 @@ | |||
34 | #define DMA_MODE_CASCADE 0xc0 | 34 | #define DMA_MODE_CASCADE 0xc0 |
35 | #define DMA_AUTOINIT 0x10 | 35 | #define DMA_AUTOINIT 0x10 |
36 | 36 | ||
37 | extern spinlock_t dma_spin_lock; | 37 | extern raw_spinlock_t dma_spin_lock; |
38 | 38 | ||
39 | static inline unsigned long claim_dma_lock(void) | 39 | static inline unsigned long claim_dma_lock(void) |
40 | { | 40 | { |
41 | unsigned long flags; | 41 | unsigned long flags; |
42 | spin_lock_irqsave(&dma_spin_lock, flags); | 42 | raw_spin_lock_irqsave(&dma_spin_lock, flags); |
43 | return flags; | 43 | return flags; |
44 | } | 44 | } |
45 | 45 | ||
46 | static inline void release_dma_lock(unsigned long flags) | 46 | static inline void release_dma_lock(unsigned long flags) |
47 | { | 47 | { |
48 | spin_unlock_irqrestore(&dma_spin_lock, flags); | 48 | raw_spin_unlock_irqrestore(&dma_spin_lock, flags); |
49 | } | 49 | } |
50 | 50 | ||
51 | /* Clear the 'DMA Pointer Flip Flop'. | 51 | /* Clear the 'DMA Pointer Flip Flop'. |
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 16bd48031583..434edccdf7f3 100644 --- a/arch/arm/include/asm/hardware/cache-l2x0.h +++ b/arch/arm/include/asm/hardware/cache-l2x0.h | |||
@@ -45,8 +45,15 @@ | |||
45 | #define L2X0_CLEAN_INV_LINE_PA 0x7F0 | 45 | #define L2X0_CLEAN_INV_LINE_PA 0x7F0 |
46 | #define L2X0_CLEAN_INV_LINE_IDX 0x7F8 | 46 | #define L2X0_CLEAN_INV_LINE_IDX 0x7F8 |
47 | #define L2X0_CLEAN_INV_WAY 0x7FC | 47 | #define L2X0_CLEAN_INV_WAY 0x7FC |
48 | #define L2X0_LOCKDOWN_WAY_D 0x900 | 48 | /* |
49 | #define L2X0_LOCKDOWN_WAY_I 0x904 | 49 | * The lockdown registers repeat 8 times for L310, the L210 has only one |
50 | * D and one I lockdown register at 0x0900 and 0x0904. | ||
51 | */ | ||
52 | #define L2X0_LOCKDOWN_WAY_D_BASE 0x900 | ||
53 | #define L2X0_LOCKDOWN_WAY_I_BASE 0x904 | ||
54 | #define L2X0_LOCKDOWN_STRIDE 0x08 | ||
55 | #define L2X0_ADDR_FILTER_START 0xC00 | ||
56 | #define L2X0_ADDR_FILTER_END 0xC04 | ||
50 | #define L2X0_TEST_OPERATION 0xF00 | 57 | #define L2X0_TEST_OPERATION 0xF00 |
51 | #define L2X0_LINE_DATA 0xF10 | 58 | #define L2X0_LINE_DATA 0xF10 |
52 | #define L2X0_LINE_TAG 0xF30 | 59 | #define L2X0_LINE_TAG 0xF30 |
@@ -60,11 +67,26 @@ | |||
60 | #define L2X0_CACHE_ID_PART_MASK (0xf << 6) | 67 | #define L2X0_CACHE_ID_PART_MASK (0xf << 6) |
61 | #define L2X0_CACHE_ID_PART_L210 (1 << 6) | 68 | #define L2X0_CACHE_ID_PART_L210 (1 << 6) |
62 | #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 | ||
63 | 77 | ||
64 | #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) | ||
65 | #define L2X0_AUX_CTRL_ASSOCIATIVITY_SHIFT 16 | 87 | #define L2X0_AUX_CTRL_ASSOCIATIVITY_SHIFT 16 |
66 | #define L2X0_AUX_CTRL_WAY_SIZE_SHIFT 17 | 88 | #define L2X0_AUX_CTRL_WAY_SIZE_SHIFT 17 |
67 | #define L2X0_AUX_CTRL_WAY_SIZE_MASK (0x3 << 17) | 89 | #define L2X0_AUX_CTRL_WAY_SIZE_MASK (0x7 << 17) |
68 | #define L2X0_AUX_CTRL_SHARE_OVERRIDE_SHIFT 22 | 90 | #define L2X0_AUX_CTRL_SHARE_OVERRIDE_SHIFT 22 |
69 | #define L2X0_AUX_CTRL_NS_LOCKDOWN_SHIFT 26 | 91 | #define L2X0_AUX_CTRL_NS_LOCKDOWN_SHIFT 26 |
70 | #define L2X0_AUX_CTRL_NS_INT_CTRL_SHIFT 27 | 92 | #define L2X0_AUX_CTRL_NS_INT_CTRL_SHIFT 27 |
@@ -72,8 +94,33 @@ | |||
72 | #define L2X0_AUX_CTRL_INSTR_PREFETCH_SHIFT 29 | 94 | #define L2X0_AUX_CTRL_INSTR_PREFETCH_SHIFT 29 |
73 | #define L2X0_AUX_CTRL_EARLY_BRESP_SHIFT 30 | 95 | #define L2X0_AUX_CTRL_EARLY_BRESP_SHIFT 30 |
74 | 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 | |||
75 | #ifndef __ASSEMBLY__ | 103 | #ifndef __ASSEMBLY__ |
76 | 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 | |||
77 | #endif | 124 | #endif |
78 | 125 | ||
79 | #endif | 126 | #endif |
diff --git a/arch/arm/include/asm/io.h b/arch/arm/include/asm/io.h index d66605dea55a..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) \ |
@@ -238,7 +260,7 @@ extern void _memset_io(volatile void __iomem *, int, size_t); | |||
238 | * ioremap and friends. | 260 | * ioremap and friends. |
239 | * | 261 | * |
240 | * ioremap takes a PCI memory address, as specified in | 262 | * ioremap takes a PCI memory address, as specified in |
241 | * Documentation/IO-mapping.txt. | 263 | * Documentation/io-mapping.txt. |
242 | * | 264 | * |
243 | */ | 265 | */ |
244 | #ifndef __arch_ioremap | 266 | #ifndef __arch_ioremap |
@@ -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/mmu.h b/arch/arm/include/asm/mmu.h index b4ffe9d5b526..14965658a923 100644 --- a/arch/arm/include/asm/mmu.h +++ b/arch/arm/include/asm/mmu.h | |||
@@ -6,7 +6,7 @@ | |||
6 | typedef struct { | 6 | typedef struct { |
7 | #ifdef CONFIG_CPU_HAS_ASID | 7 | #ifdef CONFIG_CPU_HAS_ASID |
8 | unsigned int id; | 8 | unsigned int id; |
9 | spinlock_t id_lock; | 9 | raw_spinlock_t id_lock; |
10 | #endif | 10 | #endif |
11 | unsigned int kvm_seq; | 11 | unsigned int kvm_seq; |
12 | } mm_context_t; | 12 | } mm_context_t; |
@@ -16,7 +16,7 @@ typedef struct { | |||
16 | 16 | ||
17 | /* init_mm.context.id_lock should be initialized. */ | 17 | /* init_mm.context.id_lock should be initialized. */ |
18 | #define INIT_MM_CONTEXT(name) \ | 18 | #define INIT_MM_CONTEXT(name) \ |
19 | .context.id_lock = __SPIN_LOCK_UNLOCKED(name.context.id_lock), | 19 | .context.id_lock = __RAW_SPIN_LOCK_UNLOCKED(name.context.id_lock), |
20 | #else | 20 | #else |
21 | #define ASID(mm) (0) | 21 | #define ASID(mm) (0) |
22 | #endif | 22 | #endif |
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/pmu.h b/arch/arm/include/asm/pmu.h index 67c70a31a1be..b7e82c4aced6 100644 --- a/arch/arm/include/asm/pmu.h +++ b/arch/arm/include/asm/pmu.h | |||
@@ -41,7 +41,7 @@ struct arm_pmu_platdata { | |||
41 | * encoded error on failure. | 41 | * encoded error on failure. |
42 | */ | 42 | */ |
43 | extern struct platform_device * | 43 | extern struct platform_device * |
44 | reserve_pmu(enum arm_pmu_type device); | 44 | reserve_pmu(enum arm_pmu_type type); |
45 | 45 | ||
46 | /** | 46 | /** |
47 | * release_pmu() - Relinquish control of the performance counters | 47 | * release_pmu() - Relinquish control of the performance counters |
@@ -62,26 +62,26 @@ release_pmu(enum arm_pmu_type type); | |||
62 | * the actual hardware initialisation. | 62 | * the actual hardware initialisation. |
63 | */ | 63 | */ |
64 | extern int | 64 | extern int |
65 | init_pmu(enum arm_pmu_type device); | 65 | init_pmu(enum arm_pmu_type type); |
66 | 66 | ||
67 | #else /* CONFIG_CPU_HAS_PMU */ | 67 | #else /* CONFIG_CPU_HAS_PMU */ |
68 | 68 | ||
69 | #include <linux/err.h> | 69 | #include <linux/err.h> |
70 | 70 | ||
71 | static inline struct platform_device * | 71 | static inline struct platform_device * |
72 | reserve_pmu(enum arm_pmu_type device) | 72 | reserve_pmu(enum arm_pmu_type type) |
73 | { | 73 | { |
74 | return ERR_PTR(-ENODEV); | 74 | return ERR_PTR(-ENODEV); |
75 | } | 75 | } |
76 | 76 | ||
77 | static inline int | 77 | static inline int |
78 | release_pmu(struct platform_device *pdev) | 78 | release_pmu(enum arm_pmu_type type) |
79 | { | 79 | { |
80 | return -ENODEV; | 80 | return -ENODEV; |
81 | } | 81 | } |
82 | 82 | ||
83 | static inline int | 83 | static inline int |
84 | init_pmu(enum arm_pmu_type device) | 84 | init_pmu(enum arm_pmu_type type) |
85 | { | 85 | { |
86 | return -ENODEV; | 86 | return -ENODEV; |
87 | } | 87 | } |
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/calls.S b/arch/arm/kernel/calls.S index 80f7896cc016..9943e9e74a1b 100644 --- a/arch/arm/kernel/calls.S +++ b/arch/arm/kernel/calls.S | |||
@@ -178,7 +178,7 @@ | |||
178 | CALL(sys_ni_syscall) /* vm86 */ | 178 | CALL(sys_ni_syscall) /* vm86 */ |
179 | CALL(sys_ni_syscall) /* was sys_query_module */ | 179 | CALL(sys_ni_syscall) /* was sys_query_module */ |
180 | CALL(sys_poll) | 180 | CALL(sys_poll) |
181 | CALL(sys_nfsservctl) | 181 | CALL(sys_ni_syscall) /* was nfsservctl */ |
182 | /* 170 */ CALL(sys_setresgid16) | 182 | /* 170 */ CALL(sys_setresgid16) |
183 | CALL(sys_getresgid16) | 183 | CALL(sys_getresgid16) |
184 | CALL(sys_prctl) | 184 | CALL(sys_prctl) |
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/dma.c b/arch/arm/kernel/dma.c index 2c4a185f92cd..7b829d9663b1 100644 --- a/arch/arm/kernel/dma.c +++ b/arch/arm/kernel/dma.c | |||
@@ -23,7 +23,7 @@ | |||
23 | 23 | ||
24 | #include <asm/mach/dma.h> | 24 | #include <asm/mach/dma.h> |
25 | 25 | ||
26 | DEFINE_SPINLOCK(dma_spin_lock); | 26 | DEFINE_RAW_SPINLOCK(dma_spin_lock); |
27 | EXPORT_SYMBOL(dma_spin_lock); | 27 | EXPORT_SYMBOL(dma_spin_lock); |
28 | 28 | ||
29 | static dma_t *dma_chan[MAX_DMA_CHANNELS]; | 29 | static dma_t *dma_chan[MAX_DMA_CHANNELS]; |
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/iwmmxt.S b/arch/arm/kernel/iwmmxt.S index 7fa3bb0d2397..a08783823b32 100644 --- a/arch/arm/kernel/iwmmxt.S +++ b/arch/arm/kernel/iwmmxt.S | |||
@@ -195,10 +195,10 @@ ENTRY(iwmmxt_task_disable) | |||
195 | 195 | ||
196 | @ enable access to CP0 and CP1 | 196 | @ enable access to CP0 and CP1 |
197 | XSC(mrc p15, 0, r4, c15, c1, 0) | 197 | XSC(mrc p15, 0, r4, c15, c1, 0) |
198 | XSC(orr r4, r4, #0xf) | 198 | XSC(orr r4, r4, #0x3) |
199 | XSC(mcr p15, 0, r4, c15, c1, 0) | 199 | XSC(mcr p15, 0, r4, c15, c1, 0) |
200 | PJ4(mrc p15, 0, r4, c1, c0, 2) | 200 | PJ4(mrc p15, 0, r4, c1, c0, 2) |
201 | PJ4(orr r4, r4, #0x3) | 201 | PJ4(orr r4, r4, #0xf) |
202 | PJ4(mcr p15, 0, r4, c1, c0, 2) | 202 | PJ4(mcr p15, 0, r4, c1, c0, 2) |
203 | 203 | ||
204 | mov r0, #0 @ nothing to load | 204 | mov r0, #0 @ nothing to load |
@@ -313,7 +313,7 @@ ENTRY(iwmmxt_task_switch) | |||
313 | teq r2, r3 @ next task owns it? | 313 | teq r2, r3 @ next task owns it? |
314 | movne pc, lr @ no: leave Concan disabled | 314 | movne pc, lr @ no: leave Concan disabled |
315 | 315 | ||
316 | 1: @ flip Conan access | 316 | 1: @ flip Concan access |
317 | XSC(eor r1, r1, #0x3) | 317 | XSC(eor r1, r1, #0x3) |
318 | XSC(mcr p15, 0, r1, c15, c1, 0) | 318 | XSC(mcr p15, 0, r1, c15, c1, 0) |
319 | PJ4(eor r1, r1, #0xf) | 319 | PJ4(eor r1, r1, #0xf) |
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 05b377616fd5..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 |
@@ -323,7 +323,11 @@ int module_finalize(const Elf32_Ehdr *hdr, const Elf_Shdr *sechdrs, | |||
323 | #endif | 323 | #endif |
324 | s = find_mod_section(hdr, sechdrs, ".alt.smp.init"); | 324 | s = find_mod_section(hdr, sechdrs, ".alt.smp.init"); |
325 | if (s && !is_smp()) | 325 | if (s && !is_smp()) |
326 | #ifdef CONFIG_SMP_ON_UP | ||
326 | fixup_smp((void *)s->sh_addr, s->sh_size); | 327 | fixup_smp((void *)s->sh_addr, s->sh_size); |
328 | #else | ||
329 | return -EINVAL; | ||
330 | #endif | ||
327 | return 0; | 331 | return 0; |
328 | } | 332 | } |
329 | 333 | ||
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/pmu.c b/arch/arm/kernel/pmu.c index 2b70709376c3..c53474fe84df 100644 --- a/arch/arm/kernel/pmu.c +++ b/arch/arm/kernel/pmu.c | |||
@@ -31,7 +31,7 @@ static int __devinit pmu_register(struct platform_device *pdev, | |||
31 | { | 31 | { |
32 | if (type < 0 || type >= ARM_NUM_PMU_DEVICES) { | 32 | if (type < 0 || type >= ARM_NUM_PMU_DEVICES) { |
33 | pr_warning("received registration request for unknown " | 33 | pr_warning("received registration request for unknown " |
34 | "device %d\n", type); | 34 | "PMU device type %d\n", type); |
35 | return -EINVAL; | 35 | return -EINVAL; |
36 | } | 36 | } |
37 | 37 | ||
@@ -112,17 +112,17 @@ static int __init register_pmu_driver(void) | |||
112 | device_initcall(register_pmu_driver); | 112 | device_initcall(register_pmu_driver); |
113 | 113 | ||
114 | struct platform_device * | 114 | struct platform_device * |
115 | reserve_pmu(enum arm_pmu_type device) | 115 | reserve_pmu(enum arm_pmu_type type) |
116 | { | 116 | { |
117 | struct platform_device *pdev; | 117 | struct platform_device *pdev; |
118 | 118 | ||
119 | if (test_and_set_bit_lock(device, &pmu_lock)) { | 119 | if (test_and_set_bit_lock(type, &pmu_lock)) { |
120 | pdev = ERR_PTR(-EBUSY); | 120 | pdev = ERR_PTR(-EBUSY); |
121 | } else if (pmu_devices[device] == NULL) { | 121 | } else if (pmu_devices[type] == NULL) { |
122 | clear_bit_unlock(device, &pmu_lock); | 122 | clear_bit_unlock(type, &pmu_lock); |
123 | pdev = ERR_PTR(-ENODEV); | 123 | pdev = ERR_PTR(-ENODEV); |
124 | } else { | 124 | } else { |
125 | pdev = pmu_devices[device]; | 125 | pdev = pmu_devices[type]; |
126 | } | 126 | } |
127 | 127 | ||
128 | return pdev; | 128 | return pdev; |
@@ -130,11 +130,11 @@ reserve_pmu(enum arm_pmu_type device) | |||
130 | EXPORT_SYMBOL_GPL(reserve_pmu); | 130 | EXPORT_SYMBOL_GPL(reserve_pmu); |
131 | 131 | ||
132 | int | 132 | int |
133 | release_pmu(enum arm_pmu_type device) | 133 | release_pmu(enum arm_pmu_type type) |
134 | { | 134 | { |
135 | if (WARN_ON(!pmu_devices[device])) | 135 | if (WARN_ON(!pmu_devices[type])) |
136 | return -EINVAL; | 136 | return -EINVAL; |
137 | clear_bit_unlock(device, &pmu_lock); | 137 | clear_bit_unlock(type, &pmu_lock); |
138 | return 0; | 138 | return 0; |
139 | } | 139 | } |
140 | EXPORT_SYMBOL_GPL(release_pmu); | 140 | EXPORT_SYMBOL_GPL(release_pmu); |
@@ -182,17 +182,17 @@ init_cpu_pmu(void) | |||
182 | } | 182 | } |
183 | 183 | ||
184 | int | 184 | int |
185 | init_pmu(enum arm_pmu_type device) | 185 | init_pmu(enum arm_pmu_type type) |
186 | { | 186 | { |
187 | int err = 0; | 187 | int err = 0; |
188 | 188 | ||
189 | switch (device) { | 189 | switch (type) { |
190 | case ARM_PMU_DEVICE_CPU: | 190 | case ARM_PMU_DEVICE_CPU: |
191 | err = init_cpu_pmu(); | 191 | err = init_cpu_pmu(); |
192 | break; | 192 | break; |
193 | default: | 193 | default: |
194 | pr_warning("attempt to initialise unknown device %d\n", | 194 | pr_warning("attempt to initialise PMU of unknown " |
195 | device); | 195 | "type %d\n", type); |
196 | err = -EINVAL; | 196 | err = -EINVAL; |
197 | } | 197 | } |
198 | 198 | ||
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/relocate_kernel.S b/arch/arm/kernel/relocate_kernel.S index 9cf4cbf8f95b..d0cdedf4864d 100644 --- a/arch/arm/kernel/relocate_kernel.S +++ b/arch/arm/kernel/relocate_kernel.S | |||
@@ -57,7 +57,8 @@ relocate_new_kernel: | |||
57 | mov r0,#0 | 57 | mov r0,#0 |
58 | ldr r1,kexec_mach_type | 58 | ldr r1,kexec_mach_type |
59 | ldr r2,kexec_boot_atags | 59 | ldr r2,kexec_boot_atags |
60 | mov pc,lr | 60 | ARM( mov pc, lr ) |
61 | THUMB( bx lr ) | ||
61 | 62 | ||
62 | .align | 63 | .align |
63 | 64 | ||
diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c index 70bca649e925..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: |
@@ -280,18 +301,25 @@ static void __init cacheid_init(void) | |||
280 | if (arch >= CPU_ARCH_ARMv6) { | 301 | if (arch >= CPU_ARCH_ARMv6) { |
281 | if ((cachetype & (7 << 29)) == 4 << 29) { | 302 | if ((cachetype & (7 << 29)) == 4 << 29) { |
282 | /* ARMv7 register format */ | 303 | /* ARMv7 register format */ |
304 | arch = CPU_ARCH_ARMv7; | ||
283 | cacheid = CACHEID_VIPT_NONALIASING; | 305 | cacheid = CACHEID_VIPT_NONALIASING; |
284 | if ((cachetype & (3 << 14)) == 1 << 14) | 306 | switch (cachetype & (3 << 14)) { |
307 | case (1 << 14): | ||
285 | cacheid |= CACHEID_ASID_TAGGED; | 308 | cacheid |= CACHEID_ASID_TAGGED; |
286 | else if (cpu_has_aliasing_icache(CPU_ARCH_ARMv7)) | 309 | break; |
287 | cacheid |= CACHEID_VIPT_I_ALIASING; | 310 | case (3 << 14): |
288 | } else if (cachetype & (1 << 23)) { | 311 | cacheid |= CACHEID_PIPT; |
289 | cacheid = CACHEID_VIPT_ALIASING; | 312 | break; |
313 | } | ||
290 | } else { | 314 | } else { |
291 | cacheid = CACHEID_VIPT_NONALIASING; | 315 | arch = CPU_ARCH_ARMv6; |
292 | if (cpu_has_aliasing_icache(CPU_ARCH_ARMv6)) | 316 | if (cachetype & (1 << 23)) |
293 | cacheid |= CACHEID_VIPT_I_ALIASING; | 317 | cacheid = CACHEID_VIPT_ALIASING; |
318 | else | ||
319 | cacheid = CACHEID_VIPT_NONALIASING; | ||
294 | } | 320 | } |
321 | if (cpu_has_aliasing_icache(arch)) | ||
322 | cacheid |= CACHEID_VIPT_I_ALIASING; | ||
295 | } else { | 323 | } else { |
296 | cacheid = CACHEID_VIVT; | 324 | cacheid = CACHEID_VIVT; |
297 | } | 325 | } |
@@ -299,10 +327,11 @@ static void __init cacheid_init(void) | |||
299 | printk("CPU: %s data cache, %s instruction cache\n", | 327 | printk("CPU: %s data cache, %s instruction cache\n", |
300 | cache_is_vivt() ? "VIVT" : | 328 | cache_is_vivt() ? "VIVT" : |
301 | cache_is_vipt_aliasing() ? "VIPT aliasing" : | 329 | cache_is_vipt_aliasing() ? "VIPT aliasing" : |
302 | cache_is_vipt_nonaliasing() ? "VIPT nonaliasing" : "unknown", | 330 | cache_is_vipt_nonaliasing() ? "PIPT / VIPT nonaliasing" : "unknown", |
303 | cache_is_vivt() ? "VIVT" : | 331 | cache_is_vivt() ? "VIVT" : |
304 | icache_is_vivt_asid_tagged() ? "VIVT ASID tagged" : | 332 | icache_is_vivt_asid_tagged() ? "VIVT ASID tagged" : |
305 | icache_is_vipt_aliasing() ? "VIPT aliasing" : | 333 | icache_is_vipt_aliasing() ? "VIPT aliasing" : |
334 | icache_is_pipt() ? "PIPT" : | ||
306 | cache_is_vipt_nonaliasing() ? "VIPT nonaliasing" : "unknown"); | 335 | cache_is_vipt_nonaliasing() ? "VIPT nonaliasing" : "unknown"); |
307 | } | 336 | } |
308 | 337 | ||
@@ -413,6 +442,7 @@ static void __init setup_processor(void) | |||
413 | } | 442 | } |
414 | 443 | ||
415 | cpu_name = list->cpu_name; | 444 | cpu_name = list->cpu_name; |
445 | __cpu_architecture = __get_cpu_architecture(); | ||
416 | 446 | ||
417 | #ifdef MULTI_CPU | 447 | #ifdef MULTI_CPU |
418 | processor = *list->proc; | 448 | processor = *list->proc; |
@@ -860,7 +890,7 @@ static struct machine_desc * __init setup_machine_tags(unsigned int nr) | |||
860 | } | 890 | } |
861 | 891 | ||
862 | if (mdesc->fixup) | 892 | if (mdesc->fixup) |
863 | mdesc->fixup(mdesc, tags, &from, &meminfo); | 893 | mdesc->fixup(tags, &from, &meminfo); |
864 | 894 | ||
865 | if (tags->hdr.tag == ATAG_CORE) { | 895 | if (tags->hdr.tag == ATAG_CORE) { |
866 | 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..94f34a6c8610 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 | ||
@@ -538,7 +566,7 @@ static void percpu_timer_stop(void) | |||
538 | } | 566 | } |
539 | #endif | 567 | #endif |
540 | 568 | ||
541 | static DEFINE_SPINLOCK(stop_lock); | 569 | static DEFINE_RAW_SPINLOCK(stop_lock); |
542 | 570 | ||
543 | /* | 571 | /* |
544 | * ipi_cpu_stop - handle IPI from smp_send_stop() | 572 | * ipi_cpu_stop - handle IPI from smp_send_stop() |
@@ -547,10 +575,10 @@ static void ipi_cpu_stop(unsigned int cpu) | |||
547 | { | 575 | { |
548 | if (system_state == SYSTEM_BOOTING || | 576 | if (system_state == SYSTEM_BOOTING || |
549 | system_state == SYSTEM_RUNNING) { | 577 | system_state == SYSTEM_RUNNING) { |
550 | spin_lock(&stop_lock); | 578 | raw_spin_lock(&stop_lock); |
551 | printk(KERN_CRIT "CPU%u: stopping\n", cpu); | 579 | printk(KERN_CRIT "CPU%u: stopping\n", cpu); |
552 | dump_stack(); | 580 | dump_stack(); |
553 | spin_unlock(&stop_lock); | 581 | raw_spin_unlock(&stop_lock); |
554 | } | 582 | } |
555 | 583 | ||
556 | set_cpu_online(cpu, false); | 584 | set_cpu_online(cpu, false); |
@@ -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/smp_twd.c b/arch/arm/kernel/smp_twd.c index 2c277d40cee6..01c186222f3b 100644 --- a/arch/arm/kernel/smp_twd.c +++ b/arch/arm/kernel/smp_twd.c | |||
@@ -137,8 +137,8 @@ void __cpuinit twd_timer_setup(struct clock_event_device *clk) | |||
137 | clk->max_delta_ns = clockevent_delta2ns(0xffffffff, clk); | 137 | clk->max_delta_ns = clockevent_delta2ns(0xffffffff, clk); |
138 | clk->min_delta_ns = clockevent_delta2ns(0xf, clk); | 138 | clk->min_delta_ns = clockevent_delta2ns(0xf, clk); |
139 | 139 | ||
140 | clockevents_register_device(clk); | ||
141 | |||
140 | /* Make sure our local interrupt controller has this enabled */ | 142 | /* Make sure our local interrupt controller has this enabled */ |
141 | gic_enable_ppi(clk->irq); | 143 | gic_enable_ppi(clk->irq); |
142 | |||
143 | clockevents_register_device(clk); | ||
144 | } | 144 | } |
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..99a572702509 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> |
@@ -255,7 +257,7 @@ static int __die(const char *str, int err, struct thread_info *thread, struct pt | |||
255 | return ret; | 257 | return ret; |
256 | } | 258 | } |
257 | 259 | ||
258 | static DEFINE_SPINLOCK(die_lock); | 260 | static DEFINE_RAW_SPINLOCK(die_lock); |
259 | 261 | ||
260 | /* | 262 | /* |
261 | * This function is protected against re-entrancy. | 263 | * This function is protected against re-entrancy. |
@@ -267,9 +269,11 @@ void die(const char *str, struct pt_regs *regs, int err) | |||
267 | 269 | ||
268 | oops_enter(); | 270 | oops_enter(); |
269 | 271 | ||
270 | spin_lock_irq(&die_lock); | 272 | raw_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)) |
@@ -277,7 +281,7 @@ void die(const char *str, struct pt_regs *regs, int err) | |||
277 | 281 | ||
278 | bust_spinlocks(0); | 282 | bust_spinlocks(0); |
279 | add_taint(TAINT_DIE); | 283 | add_taint(TAINT_DIE); |
280 | spin_unlock_irq(&die_lock); | 284 | raw_spin_unlock_irq(&die_lock); |
281 | oops_exit(); | 285 | oops_exit(); |
282 | 286 | ||
283 | if (in_interrupt()) | 287 | if (in_interrupt()) |
@@ -301,25 +305,43 @@ 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_RAW_SPINLOCK(undef_lock); |
306 | 328 | ||
307 | void register_undef_hook(struct undef_hook *hook) | 329 | void register_undef_hook(struct undef_hook *hook) |
308 | { | 330 | { |
309 | unsigned long flags; | 331 | unsigned long flags; |
310 | 332 | ||
311 | spin_lock_irqsave(&undef_lock, flags); | 333 | raw_spin_lock_irqsave(&undef_lock, flags); |
312 | list_add(&hook->node, &undef_hook); | 334 | list_add(&hook->node, &undef_hook); |
313 | spin_unlock_irqrestore(&undef_lock, flags); | 335 | raw_spin_unlock_irqrestore(&undef_lock, flags); |
314 | } | 336 | } |
315 | 337 | ||
316 | void unregister_undef_hook(struct undef_hook *hook) | 338 | void unregister_undef_hook(struct undef_hook *hook) |
317 | { | 339 | { |
318 | unsigned long flags; | 340 | unsigned long flags; |
319 | 341 | ||
320 | spin_lock_irqsave(&undef_lock, flags); | 342 | raw_spin_lock_irqsave(&undef_lock, flags); |
321 | list_del(&hook->node); | 343 | list_del(&hook->node); |
322 | spin_unlock_irqrestore(&undef_lock, flags); | 344 | raw_spin_unlock_irqrestore(&undef_lock, flags); |
323 | } | 345 | } |
324 | 346 | ||
325 | static int call_undef_hook(struct pt_regs *regs, unsigned int instr) | 347 | static int call_undef_hook(struct pt_regs *regs, unsigned int instr) |
@@ -328,12 +350,12 @@ static int call_undef_hook(struct pt_regs *regs, unsigned int instr) | |||
328 | unsigned long flags; | 350 | unsigned long flags; |
329 | int (*fn)(struct pt_regs *regs, unsigned int instr) = NULL; | 351 | int (*fn)(struct pt_regs *regs, unsigned int instr) = NULL; |
330 | 352 | ||
331 | spin_lock_irqsave(&undef_lock, flags); | 353 | raw_spin_lock_irqsave(&undef_lock, flags); |
332 | list_for_each_entry(hook, &undef_hook, node) | 354 | list_for_each_entry(hook, &undef_hook, node) |
333 | if ((instr & hook->instr_mask) == hook->instr_val && | 355 | if ((instr & hook->instr_mask) == hook->instr_val && |
334 | (regs->ARM_cpsr & hook->cpsr_mask) == hook->cpsr_val) | 356 | (regs->ARM_cpsr & hook->cpsr_mask) == hook->cpsr_val) |
335 | fn = hook->fn; | 357 | fn = hook->fn; |
336 | spin_unlock_irqrestore(&undef_lock, flags); | 358 | raw_spin_unlock_irqrestore(&undef_lock, flags); |
337 | 359 | ||
338 | return fn ? fn(regs, instr) : 1; | 360 | return fn ? fn(regs, instr) : 1; |
339 | } | 361 | } |
@@ -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-at91/at91sam9261.c b/arch/arm/mach-at91/at91sam9261.c index d522b47e30b5..6c8e3b5f669f 100644 --- a/arch/arm/mach-at91/at91sam9261.c +++ b/arch/arm/mach-at91/at91sam9261.c | |||
@@ -157,7 +157,7 @@ static struct clk_lookup periph_clocks_lookups[] = { | |||
157 | CLKDEV_CON_DEV_ID("spi_clk", "atmel_spi.1", &spi1_clk), | 157 | CLKDEV_CON_DEV_ID("spi_clk", "atmel_spi.1", &spi1_clk), |
158 | CLKDEV_CON_DEV_ID("t0_clk", "atmel_tcb.0", &tc0_clk), | 158 | CLKDEV_CON_DEV_ID("t0_clk", "atmel_tcb.0", &tc0_clk), |
159 | CLKDEV_CON_DEV_ID("t1_clk", "atmel_tcb.0", &tc1_clk), | 159 | CLKDEV_CON_DEV_ID("t1_clk", "atmel_tcb.0", &tc1_clk), |
160 | CLKDEV_CON_DEV_ID("t2_clk", "atmel_tcb.0", &tc1_clk), | 160 | CLKDEV_CON_DEV_ID("t2_clk", "atmel_tcb.0", &tc2_clk), |
161 | CLKDEV_CON_DEV_ID("pclk", "ssc.0", &ssc0_clk), | 161 | CLKDEV_CON_DEV_ID("pclk", "ssc.0", &ssc0_clk), |
162 | CLKDEV_CON_DEV_ID("pclk", "ssc.1", &ssc1_clk), | 162 | CLKDEV_CON_DEV_ID("pclk", "ssc.1", &ssc1_clk), |
163 | CLKDEV_CON_DEV_ID("pclk", "ssc.2", &ssc2_clk), | 163 | CLKDEV_CON_DEV_ID("pclk", "ssc.2", &ssc2_clk), |
diff --git a/arch/arm/mach-bcmring/Kconfig b/arch/arm/mach-bcmring/Kconfig index 457b4384913e..9170d16dca50 100644 --- a/arch/arm/mach-bcmring/Kconfig +++ b/arch/arm/mach-bcmring/Kconfig | |||
@@ -17,5 +17,3 @@ config BCM_ZRELADDR | |||
17 | hex "Compressed ZREL ADDR" | 17 | hex "Compressed ZREL ADDR" |
18 | 18 | ||
19 | endmenu | 19 | endmenu |
20 | |||
21 | # source "drivers/char/bcmring/Kconfig" | ||
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-bcmring/irq.c b/arch/arm/mach-bcmring/irq.c index c48feaf4e8e9..437fa683bcb2 100644 --- a/arch/arm/mach-bcmring/irq.c +++ b/arch/arm/mach-bcmring/irq.c | |||
@@ -20,7 +20,6 @@ | |||
20 | #include <linux/stddef.h> | 20 | #include <linux/stddef.h> |
21 | #include <linux/list.h> | 21 | #include <linux/list.h> |
22 | #include <linux/timer.h> | 22 | #include <linux/timer.h> |
23 | #include <linux/version.h> | ||
24 | #include <linux/io.h> | 23 | #include <linux/io.h> |
25 | 24 | ||
26 | #include <mach/hardware.h> | 25 | #include <mach/hardware.h> |
diff --git a/arch/arm/mach-bcmring/timer.c b/arch/arm/mach-bcmring/timer.c index 2d415d2a8e68..af9c3d7e2a0c 100644 --- a/arch/arm/mach-bcmring/timer.c +++ b/arch/arm/mach-bcmring/timer.c | |||
@@ -12,7 +12,6 @@ | |||
12 | * consent. | 12 | * consent. |
13 | *****************************************************************************/ | 13 | *****************************************************************************/ |
14 | 14 | ||
15 | #include <linux/version.h> | ||
16 | #include <linux/types.h> | 15 | #include <linux/types.h> |
17 | #include <linux/module.h> | 16 | #include <linux/module.h> |
18 | #include <csp/tmrHw.h> | 17 | #include <csp/tmrHw.h> |
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-cns3xxx/include/mach/entry-macro.S b/arch/arm/mach-cns3xxx/include/mach/entry-macro.S index 6bd83ed90afe..d87bfc397d39 100644 --- a/arch/arm/mach-cns3xxx/include/mach/entry-macro.S +++ b/arch/arm/mach-cns3xxx/include/mach/entry-macro.S | |||
@@ -8,7 +8,6 @@ | |||
8 | * published by the Free Software Foundation. | 8 | * published by the Free Software Foundation. |
9 | */ | 9 | */ |
10 | 10 | ||
11 | #include <mach/hardware.h> | ||
12 | #include <asm/hardware/entry-macro-gic.S> | 11 | #include <asm/hardware/entry-macro-gic.S> |
13 | 12 | ||
14 | .macro disable_fiq | 13 | .macro disable_fiq |
diff --git a/arch/arm/mach-cns3xxx/include/mach/system.h b/arch/arm/mach-cns3xxx/include/mach/system.h index 58bb03ae3cf4..4f16c9b79f78 100644 --- a/arch/arm/mach-cns3xxx/include/mach/system.h +++ b/arch/arm/mach-cns3xxx/include/mach/system.h | |||
@@ -13,7 +13,6 @@ | |||
13 | 13 | ||
14 | #include <linux/io.h> | 14 | #include <linux/io.h> |
15 | #include <asm/proc-fns.h> | 15 | #include <asm/proc-fns.h> |
16 | #include <mach/hardware.h> | ||
17 | 16 | ||
18 | static inline void arch_idle(void) | 17 | static inline void arch_idle(void) |
19 | { | 18 | { |
diff --git a/arch/arm/mach-cns3xxx/include/mach/uncompress.h b/arch/arm/mach-cns3xxx/include/mach/uncompress.h index de8ead9b91f7..a91b6058ab4f 100644 --- a/arch/arm/mach-cns3xxx/include/mach/uncompress.h +++ b/arch/arm/mach-cns3xxx/include/mach/uncompress.h | |||
@@ -8,7 +8,6 @@ | |||
8 | */ | 8 | */ |
9 | 9 | ||
10 | #include <asm/mach-types.h> | 10 | #include <asm/mach-types.h> |
11 | #include <mach/hardware.h> | ||
12 | #include <mach/cns3xxx.h> | 11 | #include <mach/cns3xxx.h> |
13 | 12 | ||
14 | #define AMBA_UART_DR(base) (*(volatile unsigned char *)((base) + 0x00)) | 13 | #define AMBA_UART_DR(base) (*(volatile unsigned char *)((base) + 0x00)) |
diff --git a/arch/arm/mach-cns3xxx/pcie.c b/arch/arm/mach-cns3xxx/pcie.c index 06fd25d70aec..0f8fca48a5ed 100644 --- a/arch/arm/mach-cns3xxx/pcie.c +++ b/arch/arm/mach-cns3xxx/pcie.c | |||
@@ -49,7 +49,7 @@ static struct cns3xxx_pcie *sysdata_to_cnspci(void *sysdata) | |||
49 | return &cns3xxx_pcie[root->domain]; | 49 | return &cns3xxx_pcie[root->domain]; |
50 | } | 50 | } |
51 | 51 | ||
52 | static struct cns3xxx_pcie *pdev_to_cnspci(struct pci_dev *dev) | 52 | static struct cns3xxx_pcie *pdev_to_cnspci(const struct pci_dev *dev) |
53 | { | 53 | { |
54 | return sysdata_to_cnspci(dev->sysdata); | 54 | return sysdata_to_cnspci(dev->sysdata); |
55 | } | 55 | } |
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-davinci/board-da850-evm.c b/arch/arm/mach-davinci/board-da850-evm.c index bd5394537c88..008d51407cd7 100644 --- a/arch/arm/mach-davinci/board-da850-evm.c +++ b/arch/arm/mach-davinci/board-da850-evm.c | |||
@@ -115,6 +115,32 @@ static struct spi_board_info da850evm_spi_info[] = { | |||
115 | }, | 115 | }, |
116 | }; | 116 | }; |
117 | 117 | ||
118 | #ifdef CONFIG_MTD | ||
119 | static void da850_evm_m25p80_notify_add(struct mtd_info *mtd) | ||
120 | { | ||
121 | char *mac_addr = davinci_soc_info.emac_pdata->mac_addr; | ||
122 | size_t retlen; | ||
123 | |||
124 | if (!strcmp(mtd->name, "MAC-Address")) { | ||
125 | mtd->read(mtd, 0, ETH_ALEN, &retlen, mac_addr); | ||
126 | if (retlen == ETH_ALEN) | ||
127 | pr_info("Read MAC addr from SPI Flash: %pM\n", | ||
128 | mac_addr); | ||
129 | } | ||
130 | } | ||
131 | |||
132 | static struct mtd_notifier da850evm_spi_notifier = { | ||
133 | .add = da850_evm_m25p80_notify_add, | ||
134 | }; | ||
135 | |||
136 | static void da850_evm_setup_mac_addr(void) | ||
137 | { | ||
138 | register_mtd_user(&da850evm_spi_notifier); | ||
139 | } | ||
140 | #else | ||
141 | static void da850_evm_setup_mac_addr(void) { } | ||
142 | #endif | ||
143 | |||
118 | static struct mtd_partition da850_evm_norflash_partition[] = { | 144 | static struct mtd_partition da850_evm_norflash_partition[] = { |
119 | { | 145 | { |
120 | .name = "bootloaders + env", | 146 | .name = "bootloaders + env", |
@@ -1244,6 +1270,8 @@ static __init void da850_evm_init(void) | |||
1244 | if (ret) | 1270 | if (ret) |
1245 | pr_warning("da850_evm_init: sata registration failed: %d\n", | 1271 | pr_warning("da850_evm_init: sata registration failed: %d\n", |
1246 | ret); | 1272 | ret); |
1273 | |||
1274 | da850_evm_setup_mac_addr(); | ||
1247 | } | 1275 | } |
1248 | 1276 | ||
1249 | #ifdef CONFIG_SERIAL_8250_CONSOLE | 1277 | #ifdef CONFIG_SERIAL_8250_CONSOLE |
diff --git a/arch/arm/mach-davinci/include/mach/psc.h b/arch/arm/mach-davinci/include/mach/psc.h index 47fd0bc3d3e7..fa59c097223d 100644 --- a/arch/arm/mach-davinci/include/mach/psc.h +++ b/arch/arm/mach-davinci/include/mach/psc.h | |||
@@ -243,7 +243,7 @@ | |||
243 | #define PSC_STATE_DISABLE 2 | 243 | #define PSC_STATE_DISABLE 2 |
244 | #define PSC_STATE_ENABLE 3 | 244 | #define PSC_STATE_ENABLE 3 |
245 | 245 | ||
246 | #define MDSTAT_STATE_MASK 0x1f | 246 | #define MDSTAT_STATE_MASK 0x3f |
247 | #define MDCTL_FORCE BIT(31) | 247 | #define MDCTL_FORCE BIT(31) |
248 | 248 | ||
249 | #ifndef __ASSEMBLER__ | 249 | #ifndef __ASSEMBLER__ |
diff --git a/arch/arm/mach-davinci/sleep.S b/arch/arm/mach-davinci/sleep.S index fb5e72b532b0..5f1e045a3ad1 100644 --- a/arch/arm/mach-davinci/sleep.S +++ b/arch/arm/mach-davinci/sleep.S | |||
@@ -217,7 +217,11 @@ ddr2clk_stop_done: | |||
217 | ENDPROC(davinci_ddr_psc_config) | 217 | ENDPROC(davinci_ddr_psc_config) |
218 | 218 | ||
219 | CACHE_FLUSH: | 219 | CACHE_FLUSH: |
220 | .word arm926_flush_kern_cache_all | 220 | #ifdef CONFIG_CPU_V6 |
221 | .word v6_flush_kern_cache_all | ||
222 | #else | ||
223 | .word arm926_flush_kern_cache_all | ||
224 | #endif | ||
221 | 225 | ||
222 | ENTRY(davinci_cpu_suspend_sz) | 226 | ENTRY(davinci_cpu_suspend_sz) |
223 | .word . - davinci_cpu_suspend | 227 | .word . - davinci_cpu_suspend |
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-ep93xx/include/mach/ts72xx.h b/arch/arm/mach-ep93xx/include/mach/ts72xx.h index 0eabec62cd9d..f1397a13e76b 100644 --- a/arch/arm/mach-ep93xx/include/mach/ts72xx.h +++ b/arch/arm/mach-ep93xx/include/mach/ts72xx.h | |||
@@ -6,7 +6,7 @@ | |||
6 | * TS72xx memory map: | 6 | * TS72xx memory map: |
7 | * | 7 | * |
8 | * virt phys size | 8 | * virt phys size |
9 | * febff000 22000000 4K model number register | 9 | * febff000 22000000 4K model number register (bits 0-2) |
10 | * febfe000 22400000 4K options register | 10 | * febfe000 22400000 4K options register |
11 | * febfd000 22800000 4K options register #2 | 11 | * febfd000 22800000 4K options register #2 |
12 | * febf9000 10800000 4K TS-5620 RTC index register | 12 | * febf9000 10800000 4K TS-5620 RTC index register |
@@ -20,6 +20,9 @@ | |||
20 | #define TS72XX_MODEL_TS7200 0x00 | 20 | #define TS72XX_MODEL_TS7200 0x00 |
21 | #define TS72XX_MODEL_TS7250 0x01 | 21 | #define TS72XX_MODEL_TS7250 0x01 |
22 | #define TS72XX_MODEL_TS7260 0x02 | 22 | #define TS72XX_MODEL_TS7260 0x02 |
23 | #define TS72XX_MODEL_TS7300 0x03 | ||
24 | #define TS72XX_MODEL_TS7400 0x04 | ||
25 | #define TS72XX_MODEL_MASK 0x07 | ||
23 | 26 | ||
24 | 27 | ||
25 | #define TS72XX_OPTIONS_PHYS_BASE 0x22400000 | 28 | #define TS72XX_OPTIONS_PHYS_BASE 0x22400000 |
@@ -51,19 +54,34 @@ | |||
51 | 54 | ||
52 | #ifndef __ASSEMBLY__ | 55 | #ifndef __ASSEMBLY__ |
53 | 56 | ||
57 | static inline int ts72xx_model(void) | ||
58 | { | ||
59 | return __raw_readb(TS72XX_MODEL_VIRT_BASE) & TS72XX_MODEL_MASK; | ||
60 | } | ||
61 | |||
54 | static inline int board_is_ts7200(void) | 62 | static inline int board_is_ts7200(void) |
55 | { | 63 | { |
56 | return __raw_readb(TS72XX_MODEL_VIRT_BASE) == TS72XX_MODEL_TS7200; | 64 | return ts72xx_model() == TS72XX_MODEL_TS7200; |
57 | } | 65 | } |
58 | 66 | ||
59 | static inline int board_is_ts7250(void) | 67 | static inline int board_is_ts7250(void) |
60 | { | 68 | { |
61 | return __raw_readb(TS72XX_MODEL_VIRT_BASE) == TS72XX_MODEL_TS7250; | 69 | return ts72xx_model() == TS72XX_MODEL_TS7250; |
62 | } | 70 | } |
63 | 71 | ||
64 | static inline int board_is_ts7260(void) | 72 | static inline int board_is_ts7260(void) |
65 | { | 73 | { |
66 | return __raw_readb(TS72XX_MODEL_VIRT_BASE) == TS72XX_MODEL_TS7260; | 74 | return ts72xx_model() == TS72XX_MODEL_TS7260; |
75 | } | ||
76 | |||
77 | static inline int board_is_ts7300(void) | ||
78 | { | ||
79 | return ts72xx_model() == TS72XX_MODEL_TS7300; | ||
80 | } | ||
81 | |||
82 | static inline int board_is_ts7400(void) | ||
83 | { | ||
84 | return ts72xx_model() == TS72XX_MODEL_TS7400; | ||
67 | } | 85 | } |
68 | 86 | ||
69 | static inline int is_max197_installed(void) | 87 | static inline int is_max197_installed(void) |
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 851dea018578..86964d2e9e1b 100644 --- a/arch/arm/mach-exynos4/clock.c +++ b/arch/arm/mach-exynos4/clock.c | |||
@@ -520,7 +520,7 @@ static struct clk init_clocks_off[] = { | |||
520 | .ctrlbit = (1 << 21), | 520 | .ctrlbit = (1 << 21), |
521 | }, { | 521 | }, { |
522 | .name = "ac97", | 522 | .name = "ac97", |
523 | .id = -1, | 523 | .devname = "samsung-ac97", |
524 | .enable = exynos4_clk_ip_peril_ctrl, | 524 | .enable = exynos4_clk_ip_peril_ctrl, |
525 | .ctrlbit = (1 << 27), | 525 | .ctrlbit = (1 << 27), |
526 | }, { | 526 | }, { |
@@ -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/cpu.c b/arch/arm/mach-exynos4/cpu.c index 2d8a40c9e6e5..746d6fc6d397 100644 --- a/arch/arm/mach-exynos4/cpu.c +++ b/arch/arm/mach-exynos4/cpu.c | |||
@@ -24,12 +24,13 @@ | |||
24 | #include <plat/exynos4.h> | 24 | #include <plat/exynos4.h> |
25 | #include <plat/adc-core.h> | 25 | #include <plat/adc-core.h> |
26 | #include <plat/sdhci.h> | 26 | #include <plat/sdhci.h> |
27 | #include <plat/devs.h> | ||
28 | #include <plat/fb-core.h> | 27 | #include <plat/fb-core.h> |
29 | #include <plat/fimc-core.h> | 28 | #include <plat/fimc-core.h> |
30 | #include <plat/iic-core.h> | 29 | #include <plat/iic-core.h> |
30 | #include <plat/reset.h> | ||
31 | 31 | ||
32 | #include <mach/regs-irq.h> | 32 | #include <mach/regs-irq.h> |
33 | #include <mach/regs-pmu.h> | ||
33 | 34 | ||
34 | extern int combiner_init(unsigned int combiner_nr, void __iomem *base, | 35 | extern int combiner_init(unsigned int combiner_nr, void __iomem *base, |
35 | unsigned int irq_start); | 36 | unsigned int irq_start); |
@@ -128,6 +129,11 @@ static void exynos4_idle(void) | |||
128 | local_irq_enable(); | 129 | local_irq_enable(); |
129 | } | 130 | } |
130 | 131 | ||
132 | static void exynos4_sw_reset(void) | ||
133 | { | ||
134 | __raw_writel(0x1, S5P_SWRESET); | ||
135 | } | ||
136 | |||
131 | /* | 137 | /* |
132 | * exynos4_map_io | 138 | * exynos4_map_io |
133 | * | 139 | * |
@@ -241,5 +247,8 @@ int __init exynos4_init(void) | |||
241 | /* set idle function */ | 247 | /* set idle function */ |
242 | pm_idle = exynos4_idle; | 248 | pm_idle = exynos4_idle; |
243 | 249 | ||
250 | /* set sw_reset function */ | ||
251 | s5p_reset_hook = exynos4_sw_reset; | ||
252 | |||
244 | return sysdev_register(&exynos4_sysdev); | 253 | return sysdev_register(&exynos4_sysdev); |
245 | } | 254 | } |
diff --git a/arch/arm/mach-exynos4/include/mach/irqs.h b/arch/arm/mach-exynos4/include/mach/irqs.h index 934d2a493982..f8952f8f3757 100644 --- a/arch/arm/mach-exynos4/include/mach/irqs.h +++ b/arch/arm/mach-exynos4/include/mach/irqs.h | |||
@@ -80,9 +80,8 @@ | |||
80 | #define IRQ_HSMMC3 IRQ_SPI(76) | 80 | #define IRQ_HSMMC3 IRQ_SPI(76) |
81 | #define IRQ_DWMCI IRQ_SPI(77) | 81 | #define IRQ_DWMCI IRQ_SPI(77) |
82 | 82 | ||
83 | #define IRQ_MIPICSI0 IRQ_SPI(78) | 83 | #define IRQ_MIPI_CSIS0 IRQ_SPI(78) |
84 | 84 | #define IRQ_MIPI_CSIS1 IRQ_SPI(80) | |
85 | #define IRQ_MIPICSI1 IRQ_SPI(80) | ||
86 | 85 | ||
87 | #define IRQ_ONENAND_AUDI IRQ_SPI(82) | 86 | #define IRQ_ONENAND_AUDI IRQ_SPI(82) |
88 | #define IRQ_ROTATOR IRQ_SPI(83) | 87 | #define IRQ_ROTATOR IRQ_SPI(83) |
diff --git a/arch/arm/mach-exynos4/include/mach/regs-pmu.h b/arch/arm/mach-exynos4/include/mach/regs-pmu.h index fa49bbb8e7b0..cdf9b47c303c 100644 --- a/arch/arm/mach-exynos4/include/mach/regs-pmu.h +++ b/arch/arm/mach-exynos4/include/mach/regs-pmu.h | |||
@@ -29,6 +29,8 @@ | |||
29 | #define S5P_USE_STANDBY_WFE1 (1 << 25) | 29 | #define S5P_USE_STANDBY_WFE1 (1 << 25) |
30 | #define S5P_USE_MASK ((0x3 << 16) | (0x3 << 24)) | 30 | #define S5P_USE_MASK ((0x3 << 16) | (0x3 << 24)) |
31 | 31 | ||
32 | #define S5P_SWRESET S5P_PMUREG(0x0400) | ||
33 | |||
32 | #define S5P_WAKEUP_STAT S5P_PMUREG(0x0600) | 34 | #define S5P_WAKEUP_STAT S5P_PMUREG(0x0600) |
33 | #define S5P_EINT_WAKEUP_MASK S5P_PMUREG(0x0604) | 35 | #define S5P_EINT_WAKEUP_MASK S5P_PMUREG(0x0604) |
34 | #define S5P_WAKEUP_MASK S5P_PMUREG(0x0608) | 36 | #define S5P_WAKEUP_MASK S5P_PMUREG(0x0608) |
diff --git a/arch/arm/mach-exynos4/irq-eint.c b/arch/arm/mach-exynos4/irq-eint.c index 9d87d2ac7f68..badb8c66fc9b 100644 --- a/arch/arm/mach-exynos4/irq-eint.c +++ b/arch/arm/mach-exynos4/irq-eint.c | |||
@@ -23,6 +23,8 @@ | |||
23 | 23 | ||
24 | #include <mach/regs-gpio.h> | 24 | #include <mach/regs-gpio.h> |
25 | 25 | ||
26 | #include <asm/mach/irq.h> | ||
27 | |||
26 | static DEFINE_SPINLOCK(eint_lock); | 28 | static DEFINE_SPINLOCK(eint_lock); |
27 | 29 | ||
28 | static unsigned int eint0_15_data[16]; | 30 | static unsigned int eint0_15_data[16]; |
@@ -184,8 +186,11 @@ static inline void exynos4_irq_demux_eint(unsigned int start) | |||
184 | 186 | ||
185 | static void exynos4_irq_demux_eint16_31(unsigned int irq, struct irq_desc *desc) | 187 | static void exynos4_irq_demux_eint16_31(unsigned int irq, struct irq_desc *desc) |
186 | { | 188 | { |
189 | struct irq_chip *chip = irq_get_chip(irq); | ||
190 | chained_irq_enter(chip, desc); | ||
187 | exynos4_irq_demux_eint(IRQ_EINT(16)); | 191 | exynos4_irq_demux_eint(IRQ_EINT(16)); |
188 | exynos4_irq_demux_eint(IRQ_EINT(24)); | 192 | exynos4_irq_demux_eint(IRQ_EINT(24)); |
193 | chained_irq_exit(chip, desc); | ||
189 | } | 194 | } |
190 | 195 | ||
191 | static void exynos4_irq_eint0_15(unsigned int irq, struct irq_desc *desc) | 196 | static void exynos4_irq_eint0_15(unsigned int irq, struct irq_desc *desc) |
@@ -193,6 +198,7 @@ static void exynos4_irq_eint0_15(unsigned int irq, struct irq_desc *desc) | |||
193 | u32 *irq_data = irq_get_handler_data(irq); | 198 | u32 *irq_data = irq_get_handler_data(irq); |
194 | struct irq_chip *chip = irq_get_chip(irq); | 199 | struct irq_chip *chip = irq_get_chip(irq); |
195 | 200 | ||
201 | chained_irq_enter(chip, desc); | ||
196 | chip->irq_mask(&desc->irq_data); | 202 | chip->irq_mask(&desc->irq_data); |
197 | 203 | ||
198 | if (chip->irq_ack) | 204 | if (chip->irq_ack) |
@@ -201,6 +207,7 @@ static void exynos4_irq_eint0_15(unsigned int irq, struct irq_desc *desc) | |||
201 | generic_handle_irq(*irq_data); | 207 | generic_handle_irq(*irq_data); |
202 | 208 | ||
203 | chip->irq_unmask(&desc->irq_data); | 209 | chip->irq_unmask(&desc->irq_data); |
210 | chained_irq_exit(chip, desc); | ||
204 | } | 211 | } |
205 | 212 | ||
206 | int __init exynos4_init_irq_eint(void) | 213 | int __init exynos4_init_irq_eint(void) |
diff --git a/arch/arm/mach-exynos4/mach-universal_c210.c b/arch/arm/mach-exynos4/mach-universal_c210.c index 0e280d12301e..b3b5d8911004 100644 --- a/arch/arm/mach-exynos4/mach-universal_c210.c +++ b/arch/arm/mach-exynos4/mach-universal_c210.c | |||
@@ -79,7 +79,7 @@ static struct s3c2410_uartcfg universal_uartcfgs[] __initdata = { | |||
79 | }; | 79 | }; |
80 | 80 | ||
81 | static struct regulator_consumer_supply max8952_consumer = | 81 | static struct regulator_consumer_supply max8952_consumer = |
82 | REGULATOR_SUPPLY("vddarm", NULL); | 82 | REGULATOR_SUPPLY("vdd_arm", NULL); |
83 | 83 | ||
84 | static struct max8952_platform_data universal_max8952_pdata __initdata = { | 84 | static struct max8952_platform_data universal_max8952_pdata __initdata = { |
85 | .gpio_vid0 = EXYNOS4_GPX0(3), | 85 | .gpio_vid0 = EXYNOS4_GPX0(3), |
@@ -105,7 +105,7 @@ static struct max8952_platform_data universal_max8952_pdata __initdata = { | |||
105 | }; | 105 | }; |
106 | 106 | ||
107 | static struct regulator_consumer_supply lp3974_buck1_consumer = | 107 | static struct regulator_consumer_supply lp3974_buck1_consumer = |
108 | REGULATOR_SUPPLY("vddint", NULL); | 108 | REGULATOR_SUPPLY("vdd_int", NULL); |
109 | 109 | ||
110 | static struct regulator_consumer_supply lp3974_buck2_consumer = | 110 | static struct regulator_consumer_supply lp3974_buck2_consumer = |
111 | REGULATOR_SUPPLY("vddg3d", NULL); | 111 | REGULATOR_SUPPLY("vddg3d", NULL); |
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-exynos4/setup-usb-phy.c b/arch/arm/mach-exynos4/setup-usb-phy.c index 0883c1b824b9..39aca045f660 100644 --- a/arch/arm/mach-exynos4/setup-usb-phy.c +++ b/arch/arm/mach-exynos4/setup-usb-phy.c | |||
@@ -82,7 +82,7 @@ static int exynos4_usb_phy1_init(struct platform_device *pdev) | |||
82 | 82 | ||
83 | rstcon &= ~(HOST_LINK_PORT_SWRST_MASK | PHY1_SWRST_MASK); | 83 | rstcon &= ~(HOST_LINK_PORT_SWRST_MASK | PHY1_SWRST_MASK); |
84 | writel(rstcon, EXYNOS4_RSTCON); | 84 | writel(rstcon, EXYNOS4_RSTCON); |
85 | udelay(50); | 85 | udelay(80); |
86 | 86 | ||
87 | clk_disable(otg_clk); | 87 | clk_disable(otg_clk); |
88 | clk_put(otg_clk); | 88 | clk_put(otg_clk); |
diff --git a/arch/arm/mach-footbridge/Kconfig b/arch/arm/mach-footbridge/Kconfig index dc26fff22cf0..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,6 +61,7 @@ config ARCH_EBSA285_HOST | |||
61 | 61 | ||
62 | config ARCH_NETWINDER | 62 | config ARCH_NETWINDER |
63 | bool "NetWinder" | 63 | bool "NetWinder" |
64 | select CLKEVT_I8253 | ||
64 | select CLKSRC_I8253 | 65 | select CLKSRC_I8253 |
65 | select FOOTBRIDGE_HOST | 66 | select FOOTBRIDGE_HOST |
66 | select ISA | 67 | select ISA |
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/dc21285.c b/arch/arm/mach-footbridge/dc21285.c index 1331fff51ae2..18c32a5541d9 100644 --- a/arch/arm/mach-footbridge/dc21285.c +++ b/arch/arm/mach-footbridge/dc21285.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/irq.h> | 18 | #include <linux/irq.h> |
19 | #include <linux/io.h> | 19 | #include <linux/io.h> |
20 | #include <linux/spinlock.h> | 20 | #include <linux/spinlock.h> |
21 | #include <video/vga.h> | ||
21 | 22 | ||
22 | #include <asm/irq.h> | 23 | #include <asm/irq.h> |
23 | #include <asm/system.h> | 24 | #include <asm/system.h> |
diff --git a/arch/arm/mach-footbridge/include/mach/hardware.h b/arch/arm/mach-footbridge/include/mach/hardware.h index 15d54981674c..e3d6ccac2162 100644 --- a/arch/arm/mach-footbridge/include/mach/hardware.h +++ b/arch/arm/mach-footbridge/include/mach/hardware.h | |||
@@ -93,7 +93,7 @@ | |||
93 | #define CPLD_FLASH_WR_ENABLE 1 | 93 | #define CPLD_FLASH_WR_ENABLE 1 |
94 | 94 | ||
95 | #ifndef __ASSEMBLY__ | 95 | #ifndef __ASSEMBLY__ |
96 | extern spinlock_t nw_gpio_lock; | 96 | extern raw_spinlock_t nw_gpio_lock; |
97 | extern void nw_gpio_modify_op(unsigned int mask, unsigned int set); | 97 | extern void nw_gpio_modify_op(unsigned int mask, unsigned int set); |
98 | extern void nw_gpio_modify_io(unsigned int mask, unsigned int in); | 98 | extern void nw_gpio_modify_io(unsigned int mask, unsigned int in); |
99 | extern unsigned int nw_gpio_read(void); | 99 | extern unsigned int nw_gpio_read(void); |
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..0f7aeff486c9 100644 --- a/arch/arm/mach-footbridge/netwinder-hw.c +++ b/arch/arm/mach-footbridge/netwinder-hw.c | |||
@@ -68,7 +68,7 @@ static inline void wb977_ww(int reg, int val) | |||
68 | /* | 68 | /* |
69 | * This is a lock for accessing ports GP1_IO_BASE and GP2_IO_BASE | 69 | * This is a lock for accessing ports GP1_IO_BASE and GP2_IO_BASE |
70 | */ | 70 | */ |
71 | DEFINE_SPINLOCK(nw_gpio_lock); | 71 | DEFINE_RAW_SPINLOCK(nw_gpio_lock); |
72 | EXPORT_SYMBOL(nw_gpio_lock); | 72 | EXPORT_SYMBOL(nw_gpio_lock); |
73 | 73 | ||
74 | static unsigned int current_gpio_op; | 74 | static unsigned int current_gpio_op; |
@@ -327,9 +327,9 @@ static inline void wb977_init_gpio(void) | |||
327 | /* | 327 | /* |
328 | * Set Group1/Group2 outputs | 328 | * Set Group1/Group2 outputs |
329 | */ | 329 | */ |
330 | spin_lock_irqsave(&nw_gpio_lock, flags); | 330 | raw_spin_lock_irqsave(&nw_gpio_lock, flags); |
331 | nw_gpio_modify_op(-1, GPIO_RED_LED | GPIO_FAN); | 331 | nw_gpio_modify_op(-1, GPIO_RED_LED | GPIO_FAN); |
332 | spin_unlock_irqrestore(&nw_gpio_lock, flags); | 332 | raw_spin_unlock_irqrestore(&nw_gpio_lock, flags); |
333 | } | 333 | } |
334 | 334 | ||
335 | /* | 335 | /* |
@@ -390,9 +390,9 @@ static void __init cpld_init(void) | |||
390 | { | 390 | { |
391 | unsigned long flags; | 391 | unsigned long flags; |
392 | 392 | ||
393 | spin_lock_irqsave(&nw_gpio_lock, flags); | 393 | raw_spin_lock_irqsave(&nw_gpio_lock, flags); |
394 | nw_cpld_modify(-1, CPLD_UNMUTE | CPLD_7111_DISABLE); | 394 | nw_cpld_modify(-1, CPLD_UNMUTE | CPLD_7111_DISABLE); |
395 | spin_unlock_irqrestore(&nw_gpio_lock, flags); | 395 | raw_spin_unlock_irqrestore(&nw_gpio_lock, flags); |
396 | } | 396 | } |
397 | 397 | ||
398 | static unsigned char rwa_unlock[] __initdata = | 398 | static unsigned char rwa_unlock[] __initdata = |
@@ -616,9 +616,9 @@ static int __init nw_hw_init(void) | |||
616 | cpld_init(); | 616 | cpld_init(); |
617 | rwa010_init(); | 617 | rwa010_init(); |
618 | 618 | ||
619 | spin_lock_irqsave(&nw_gpio_lock, flags); | 619 | raw_spin_lock_irqsave(&nw_gpio_lock, flags); |
620 | nw_gpio_modify_op(GPIO_RED_LED|GPIO_GREEN_LED, DEFAULT_LEDS); | 620 | nw_gpio_modify_op(GPIO_RED_LED|GPIO_GREEN_LED, DEFAULT_LEDS); |
621 | spin_unlock_irqrestore(&nw_gpio_lock, flags); | 621 | raw_spin_unlock_irqrestore(&nw_gpio_lock, flags); |
622 | } | 622 | } |
623 | return 0; | 623 | return 0; |
624 | } | 624 | } |
@@ -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-footbridge/netwinder-leds.c b/arch/arm/mach-footbridge/netwinder-leds.c index 00269fe0be8a..e57102e871fc 100644 --- a/arch/arm/mach-footbridge/netwinder-leds.c +++ b/arch/arm/mach-footbridge/netwinder-leds.c | |||
@@ -31,13 +31,13 @@ | |||
31 | static char led_state; | 31 | static char led_state; |
32 | static char hw_led_state; | 32 | static char hw_led_state; |
33 | 33 | ||
34 | static DEFINE_SPINLOCK(leds_lock); | 34 | static DEFINE_RAW_SPINLOCK(leds_lock); |
35 | 35 | ||
36 | static void netwinder_leds_event(led_event_t evt) | 36 | static void netwinder_leds_event(led_event_t evt) |
37 | { | 37 | { |
38 | unsigned long flags; | 38 | unsigned long flags; |
39 | 39 | ||
40 | spin_lock_irqsave(&leds_lock, flags); | 40 | raw_spin_lock_irqsave(&leds_lock, flags); |
41 | 41 | ||
42 | switch (evt) { | 42 | switch (evt) { |
43 | case led_start: | 43 | case led_start: |
@@ -117,12 +117,12 @@ static void netwinder_leds_event(led_event_t evt) | |||
117 | break; | 117 | break; |
118 | } | 118 | } |
119 | 119 | ||
120 | spin_unlock_irqrestore(&leds_lock, flags); | 120 | raw_spin_unlock_irqrestore(&leds_lock, flags); |
121 | 121 | ||
122 | if (led_state & LED_STATE_ENABLED) { | 122 | if (led_state & LED_STATE_ENABLED) { |
123 | spin_lock_irqsave(&nw_gpio_lock, flags); | 123 | raw_spin_lock_irqsave(&nw_gpio_lock, flags); |
124 | nw_gpio_modify_op(GPIO_RED_LED | GPIO_GREEN_LED, hw_led_state); | 124 | nw_gpio_modify_op(GPIO_RED_LED | GPIO_GREEN_LED, hw_led_state); |
125 | spin_unlock_irqrestore(&nw_gpio_lock, flags); | 125 | raw_spin_unlock_irqrestore(&nw_gpio_lock, flags); |
126 | } | 126 | } |
127 | } | 127 | } |
128 | 128 | ||
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-imx/clock-imx25.c b/arch/arm/mach-imx/clock-imx25.c index 0fc7ba56d616..e63e23504fe5 100644 --- a/arch/arm/mach-imx/clock-imx25.c +++ b/arch/arm/mach-imx/clock-imx25.c | |||
@@ -331,6 +331,9 @@ int __init mx25_clocks_init(void) | |||
331 | __raw_writel(__raw_readl(CRM_BASE+0x64) | (1 << 7) | (1 << 0), | 331 | __raw_writel(__raw_readl(CRM_BASE+0x64) | (1 << 7) | (1 << 0), |
332 | CRM_BASE + 0x64); | 332 | CRM_BASE + 0x64); |
333 | 333 | ||
334 | /* Clock source for gpt is ahb_div */ | ||
335 | __raw_writel(__raw_readl(CRM_BASE+0x64) & ~(1 << 5), CRM_BASE + 0x64); | ||
336 | |||
334 | mxc_timer_init(&gpt_clk, MX25_IO_ADDRESS(MX25_GPT1_BASE_ADDR), 54); | 337 | mxc_timer_init(&gpt_clk, MX25_IO_ADDRESS(MX25_GPT1_BASE_ADDR), 54); |
335 | 338 | ||
336 | return 0; | 339 | return 0; |
diff --git a/arch/arm/mach-imx/mach-cpuimx27.c b/arch/arm/mach-imx/mach-cpuimx27.c index 87887ac5806b..f851fe903687 100644 --- a/arch/arm/mach-imx/mach-cpuimx27.c +++ b/arch/arm/mach-imx/mach-cpuimx27.c | |||
@@ -310,7 +310,7 @@ static struct sys_timer eukrea_cpuimx27_timer = { | |||
310 | .init = eukrea_cpuimx27_timer_init, | 310 | .init = eukrea_cpuimx27_timer_init, |
311 | }; | 311 | }; |
312 | 312 | ||
313 | MACHINE_START(CPUIMX27, "EUKREA CPUIMX27") | 313 | MACHINE_START(EUKREA_CPUIMX27, "EUKREA CPUIMX27") |
314 | .boot_params = MX27_PHYS_OFFSET + 0x100, | 314 | .boot_params = MX27_PHYS_OFFSET + 0x100, |
315 | .map_io = mx27_map_io, | 315 | .map_io = mx27_map_io, |
316 | .init_early = imx27_init_early, | 316 | .init_early = imx27_init_early, |
diff --git a/arch/arm/mach-imx/mach-cpuimx35.c b/arch/arm/mach-imx/mach-cpuimx35.c index f39a478ba1a6..4bd083ba9af2 100644 --- a/arch/arm/mach-imx/mach-cpuimx35.c +++ b/arch/arm/mach-imx/mach-cpuimx35.c | |||
@@ -192,7 +192,7 @@ struct sys_timer eukrea_cpuimx35_timer = { | |||
192 | .init = eukrea_cpuimx35_timer_init, | 192 | .init = eukrea_cpuimx35_timer_init, |
193 | }; | 193 | }; |
194 | 194 | ||
195 | MACHINE_START(EUKREA_CPUIMX35, "Eukrea CPUIMX35") | 195 | MACHINE_START(EUKREA_CPUIMX35SD, "Eukrea CPUIMX35") |
196 | /* Maintainer: Eukrea Electromatique */ | 196 | /* Maintainer: Eukrea Electromatique */ |
197 | .boot_params = MX3x_PHYS_OFFSET + 0x100, | 197 | .boot_params = MX3x_PHYS_OFFSET + 0x100, |
198 | .map_io = mx35_map_io, | 198 | .map_io = mx35_map_io, |
diff --git a/arch/arm/mach-imx/mach-eukrea_cpuimx25.c b/arch/arm/mach-imx/mach-eukrea_cpuimx25.c index da36da52969d..2442d5da883d 100644 --- a/arch/arm/mach-imx/mach-eukrea_cpuimx25.c +++ b/arch/arm/mach-imx/mach-eukrea_cpuimx25.c | |||
@@ -161,7 +161,7 @@ static struct sys_timer eukrea_cpuimx25_timer = { | |||
161 | .init = eukrea_cpuimx25_timer_init, | 161 | .init = eukrea_cpuimx25_timer_init, |
162 | }; | 162 | }; |
163 | 163 | ||
164 | MACHINE_START(EUKREA_CPUIMX25, "Eukrea CPUIMX25") | 164 | MACHINE_START(EUKREA_CPUIMX25SD, "Eukrea CPUIMX25") |
165 | /* Maintainer: Eukrea Electromatique */ | 165 | /* Maintainer: Eukrea Electromatique */ |
166 | .boot_params = MX25_PHYS_OFFSET + 0x100, | 166 | .boot_params = MX25_PHYS_OFFSET + 0x100, |
167 | .map_io = mx25_map_io, | 167 | .map_io = mx25_map_io, |
diff --git a/arch/arm/mach-imx/mach-imx27_visstrim_m10.c b/arch/arm/mach-imx/mach-imx27_visstrim_m10.c index 6707de0ab716..6778f8193bc6 100644 --- a/arch/arm/mach-imx/mach-imx27_visstrim_m10.c +++ b/arch/arm/mach-imx/mach-imx27_visstrim_m10.c | |||
@@ -30,6 +30,7 @@ | |||
30 | #include <linux/input.h> | 30 | #include <linux/input.h> |
31 | #include <linux/gpio.h> | 31 | #include <linux/gpio.h> |
32 | #include <linux/delay.h> | 32 | #include <linux/delay.h> |
33 | #include <sound/tlv320aic32x4.h> | ||
33 | #include <asm/mach-types.h> | 34 | #include <asm/mach-types.h> |
34 | #include <asm/mach/arch.h> | 35 | #include <asm/mach/arch.h> |
35 | #include <asm/mach/time.h> | 36 | #include <asm/mach/time.h> |
@@ -196,6 +197,17 @@ static struct pca953x_platform_data visstrim_m10_pca9555_pdata = { | |||
196 | .invert = 0, | 197 | .invert = 0, |
197 | }; | 198 | }; |
198 | 199 | ||
200 | static struct aic32x4_pdata visstrim_m10_aic32x4_pdata = { | ||
201 | .power_cfg = AIC32X4_PWR_MICBIAS_2075_LDOIN | | ||
202 | AIC32X4_PWR_AVDD_DVDD_WEAK_DISABLE | | ||
203 | AIC32X4_PWR_AIC32X4_LDO_ENABLE | | ||
204 | AIC32X4_PWR_CMMODE_LDOIN_RANGE_18_36 | | ||
205 | AIC32X4_PWR_CMMODE_HP_LDOIN_POWERED, | ||
206 | .micpga_routing = AIC32X4_MICPGA_ROUTE_LMIC_IN2R_10K | | ||
207 | AIC32X4_MICPGA_ROUTE_RMIC_IN1L_10K, | ||
208 | .swapdacs = false, | ||
209 | }; | ||
210 | |||
199 | static struct i2c_board_info visstrim_m10_i2c_devices[] = { | 211 | static struct i2c_board_info visstrim_m10_i2c_devices[] = { |
200 | { | 212 | { |
201 | I2C_BOARD_INFO("pca9555", 0x20), | 213 | I2C_BOARD_INFO("pca9555", 0x20), |
@@ -203,6 +215,7 @@ static struct i2c_board_info visstrim_m10_i2c_devices[] = { | |||
203 | }, | 215 | }, |
204 | { | 216 | { |
205 | I2C_BOARD_INFO("tlv320aic32x4", 0x18), | 217 | I2C_BOARD_INFO("tlv320aic32x4", 0x18), |
218 | .platform_data = &visstrim_m10_aic32x4_pdata, | ||
206 | } | 219 | } |
207 | }; | 220 | }; |
208 | 221 | ||
diff --git a/arch/arm/mach-imx/mach-mx31ads.c b/arch/arm/mach-imx/mach-mx31ads.c index 0ce49478a479..29ca8907a780 100644 --- a/arch/arm/mach-imx/mach-mx31ads.c +++ b/arch/arm/mach-imx/mach-mx31ads.c | |||
@@ -468,7 +468,7 @@ static struct i2c_board_info __initdata mx31ads_i2c1_devices[] = { | |||
468 | #endif | 468 | #endif |
469 | }; | 469 | }; |
470 | 470 | ||
471 | static void mxc_init_i2c(void) | 471 | static void __init mxc_init_i2c(void) |
472 | { | 472 | { |
473 | i2c_register_board_info(1, mx31ads_i2c1_devices, | 473 | i2c_register_board_info(1, mx31ads_i2c1_devices, |
474 | ARRAY_SIZE(mx31ads_i2c1_devices)); | 474 | ARRAY_SIZE(mx31ads_i2c1_devices)); |
@@ -486,7 +486,7 @@ static unsigned int ssi_pins[] = { | |||
486 | MX31_PIN_STXD5__STXD5, | 486 | MX31_PIN_STXD5__STXD5, |
487 | }; | 487 | }; |
488 | 488 | ||
489 | static void mxc_init_audio(void) | 489 | static void __init mxc_init_audio(void) |
490 | { | 490 | { |
491 | imx31_add_imx_ssi(0, NULL); | 491 | imx31_add_imx_ssi(0, NULL); |
492 | mxc_iomux_setup_multiple_pins(ssi_pins, ARRAY_SIZE(ssi_pins), "ssi"); | 492 | mxc_iomux_setup_multiple_pins(ssi_pins, ARRAY_SIZE(ssi_pins), "ssi"); |
diff --git a/arch/arm/mach-imx/mach-mx31lilly.c b/arch/arm/mach-imx/mach-mx31lilly.c index 750368ddf0f9..126913ad106a 100644 --- a/arch/arm/mach-imx/mach-mx31lilly.c +++ b/arch/arm/mach-imx/mach-mx31lilly.c | |||
@@ -192,7 +192,7 @@ static struct mxc_usbh_platform_data usbh2_pdata __initdata = { | |||
192 | .portsc = MXC_EHCI_MODE_ULPI | MXC_EHCI_UTMI_8BIT, | 192 | .portsc = MXC_EHCI_MODE_ULPI | MXC_EHCI_UTMI_8BIT, |
193 | }; | 193 | }; |
194 | 194 | ||
195 | static void lilly1131_usb_init(void) | 195 | static void __init lilly1131_usb_init(void) |
196 | { | 196 | { |
197 | imx31_add_mxc_ehci_hs(1, &usbh1_pdata); | 197 | imx31_add_mxc_ehci_hs(1, &usbh1_pdata); |
198 | 198 | ||
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..4b38e13667ac 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, |
@@ -205,7 +209,7 @@ static struct amba_pl010_data integrator_uart_data = { | |||
205 | 209 | ||
206 | #define CM_CTRL IO_ADDRESS(INTEGRATOR_HDR_CTRL) | 210 | #define CM_CTRL IO_ADDRESS(INTEGRATOR_HDR_CTRL) |
207 | 211 | ||
208 | static DEFINE_SPINLOCK(cm_lock); | 212 | static DEFINE_RAW_SPINLOCK(cm_lock); |
209 | 213 | ||
210 | /** | 214 | /** |
211 | * cm_control - update the CM_CTRL register. | 215 | * cm_control - update the CM_CTRL register. |
@@ -217,10 +221,10 @@ void cm_control(u32 mask, u32 set) | |||
217 | unsigned long flags; | 221 | unsigned long flags; |
218 | u32 val; | 222 | u32 val; |
219 | 223 | ||
220 | spin_lock_irqsave(&cm_lock, flags); | 224 | raw_spin_lock_irqsave(&cm_lock, flags); |
221 | val = readl(CM_CTRL) & ~mask; | 225 | val = readl(CM_CTRL) & ~mask; |
222 | writel(val | set, CM_CTRL); | 226 | writel(val | set, CM_CTRL); |
223 | spin_unlock_irqrestore(&cm_lock, flags); | 227 | raw_spin_unlock_irqrestore(&cm_lock, flags); |
224 | } | 228 | } |
225 | 229 | ||
226 | EXPORT_SYMBOL(cm_control); | 230 | EXPORT_SYMBOL(cm_control); |
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 2fbbdd5eac35..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,35 +323,24 @@ 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; | 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 | ||
347 | writel(ctrl, base + TIMER_CTRL); | ||
348 | writel(0xffff, base + TIMER_LOAD); | 339 | writel(0xffff, base + TIMER_LOAD); |
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..b4d8f8b8a085 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> |
@@ -164,7 +163,7 @@ | |||
164 | * 7:2 register number | 163 | * 7:2 register number |
165 | * | 164 | * |
166 | */ | 165 | */ |
167 | static DEFINE_SPINLOCK(v3_lock); | 166 | static DEFINE_RAW_SPINLOCK(v3_lock); |
168 | 167 | ||
169 | #define PCI_BUS_NONMEM_START 0x00000000 | 168 | #define PCI_BUS_NONMEM_START 0x00000000 |
170 | #define PCI_BUS_NONMEM_SIZE SZ_256M | 169 | #define PCI_BUS_NONMEM_SIZE SZ_256M |
@@ -285,7 +284,7 @@ static int v3_read_config(struct pci_bus *bus, unsigned int devfn, int where, | |||
285 | unsigned long flags; | 284 | unsigned long flags; |
286 | u32 v; | 285 | u32 v; |
287 | 286 | ||
288 | spin_lock_irqsave(&v3_lock, flags); | 287 | raw_spin_lock_irqsave(&v3_lock, flags); |
289 | addr = v3_open_config_window(bus, devfn, where); | 288 | addr = v3_open_config_window(bus, devfn, where); |
290 | 289 | ||
291 | switch (size) { | 290 | switch (size) { |
@@ -303,7 +302,7 @@ static int v3_read_config(struct pci_bus *bus, unsigned int devfn, int where, | |||
303 | } | 302 | } |
304 | 303 | ||
305 | v3_close_config_window(); | 304 | v3_close_config_window(); |
306 | spin_unlock_irqrestore(&v3_lock, flags); | 305 | raw_spin_unlock_irqrestore(&v3_lock, flags); |
307 | 306 | ||
308 | *val = v; | 307 | *val = v; |
309 | return PCIBIOS_SUCCESSFUL; | 308 | return PCIBIOS_SUCCESSFUL; |
@@ -315,7 +314,7 @@ static int v3_write_config(struct pci_bus *bus, unsigned int devfn, int where, | |||
315 | unsigned long addr; | 314 | unsigned long addr; |
316 | unsigned long flags; | 315 | unsigned long flags; |
317 | 316 | ||
318 | spin_lock_irqsave(&v3_lock, flags); | 317 | raw_spin_lock_irqsave(&v3_lock, flags); |
319 | addr = v3_open_config_window(bus, devfn, where); | 318 | addr = v3_open_config_window(bus, devfn, where); |
320 | 319 | ||
321 | switch (size) { | 320 | switch (size) { |
@@ -336,7 +335,7 @@ static int v3_write_config(struct pci_bus *bus, unsigned int devfn, int where, | |||
336 | } | 335 | } |
337 | 336 | ||
338 | v3_close_config_window(); | 337 | v3_close_config_window(); |
339 | spin_unlock_irqrestore(&v3_lock, flags); | 338 | raw_spin_unlock_irqrestore(&v3_lock, flags); |
340 | 339 | ||
341 | return PCIBIOS_SUCCESSFUL; | 340 | return PCIBIOS_SUCCESSFUL; |
342 | } | 341 | } |
@@ -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 |
@@ -515,7 +513,7 @@ void __init pci_v3_preinit(void) | |||
515 | hook_fault_code(8, v3_pci_fault, SIGBUS, 0, "external abort on non-linefetch"); | 513 | hook_fault_code(8, v3_pci_fault, SIGBUS, 0, "external abort on non-linefetch"); |
516 | hook_fault_code(10, v3_pci_fault, SIGBUS, 0, "external abort on non-linefetch"); | 514 | hook_fault_code(10, v3_pci_fault, SIGBUS, 0, "external abort on non-linefetch"); |
517 | 515 | ||
518 | spin_lock_irqsave(&v3_lock, flags); | 516 | raw_spin_lock_irqsave(&v3_lock, flags); |
519 | 517 | ||
520 | /* | 518 | /* |
521 | * Unlock V3 registers, but only if they were previously locked. | 519 | * Unlock V3 registers, but only if they were previously locked. |
@@ -588,7 +586,7 @@ void __init pci_v3_preinit(void) | |||
588 | printk(KERN_ERR "PCI: unable to grab PCI error " | 586 | printk(KERN_ERR "PCI: unable to grab PCI error " |
589 | "interrupt: %d\n", ret); | 587 | "interrupt: %d\n", ret); |
590 | 588 | ||
591 | spin_unlock_irqrestore(&v3_lock, flags); | 589 | raw_spin_unlock_irqrestore(&v3_lock, flags); |
592 | } | 590 | } |
593 | 591 | ||
594 | void __init pci_v3_postinit(void) | 592 | void __init pci_v3_postinit(void) |
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..f72a3a893c47 100644 --- a/arch/arm/mach-ixp4xx/common-pci.c +++ b/arch/arm/mach-ixp4xx/common-pci.c | |||
@@ -54,7 +54,7 @@ unsigned long ixp4xx_pci_reg_base = 0; | |||
54 | * these transactions are atomic or we will end up | 54 | * these transactions are atomic or we will end up |
55 | * with corrupt data on the bus or in a driver. | 55 | * with corrupt data on the bus or in a driver. |
56 | */ | 56 | */ |
57 | static DEFINE_SPINLOCK(ixp4xx_pci_lock); | 57 | static DEFINE_RAW_SPINLOCK(ixp4xx_pci_lock); |
58 | 58 | ||
59 | /* | 59 | /* |
60 | * Read from PCI config space | 60 | * Read from PCI config space |
@@ -62,10 +62,10 @@ static DEFINE_SPINLOCK(ixp4xx_pci_lock); | |||
62 | static void crp_read(u32 ad_cbe, u32 *data) | 62 | static void crp_read(u32 ad_cbe, u32 *data) |
63 | { | 63 | { |
64 | unsigned long flags; | 64 | unsigned long flags; |
65 | spin_lock_irqsave(&ixp4xx_pci_lock, flags); | 65 | raw_spin_lock_irqsave(&ixp4xx_pci_lock, flags); |
66 | *PCI_CRP_AD_CBE = ad_cbe; | 66 | *PCI_CRP_AD_CBE = ad_cbe; |
67 | *data = *PCI_CRP_RDATA; | 67 | *data = *PCI_CRP_RDATA; |
68 | spin_unlock_irqrestore(&ixp4xx_pci_lock, flags); | 68 | raw_spin_unlock_irqrestore(&ixp4xx_pci_lock, flags); |
69 | } | 69 | } |
70 | 70 | ||
71 | /* | 71 | /* |
@@ -74,10 +74,10 @@ static void crp_read(u32 ad_cbe, u32 *data) | |||
74 | static void crp_write(u32 ad_cbe, u32 data) | 74 | static void crp_write(u32 ad_cbe, u32 data) |
75 | { | 75 | { |
76 | unsigned long flags; | 76 | unsigned long flags; |
77 | spin_lock_irqsave(&ixp4xx_pci_lock, flags); | 77 | raw_spin_lock_irqsave(&ixp4xx_pci_lock, flags); |
78 | *PCI_CRP_AD_CBE = CRP_AD_CBE_WRITE | ad_cbe; | 78 | *PCI_CRP_AD_CBE = CRP_AD_CBE_WRITE | ad_cbe; |
79 | *PCI_CRP_WDATA = data; | 79 | *PCI_CRP_WDATA = data; |
80 | spin_unlock_irqrestore(&ixp4xx_pci_lock, flags); | 80 | raw_spin_unlock_irqrestore(&ixp4xx_pci_lock, flags); |
81 | } | 81 | } |
82 | 82 | ||
83 | static inline int check_master_abort(void) | 83 | static inline int check_master_abort(void) |
@@ -101,7 +101,7 @@ int ixp4xx_pci_read_errata(u32 addr, u32 cmd, u32* data) | |||
101 | int retval = 0; | 101 | int retval = 0; |
102 | int i; | 102 | int i; |
103 | 103 | ||
104 | spin_lock_irqsave(&ixp4xx_pci_lock, flags); | 104 | raw_spin_lock_irqsave(&ixp4xx_pci_lock, flags); |
105 | 105 | ||
106 | *PCI_NP_AD = addr; | 106 | *PCI_NP_AD = addr; |
107 | 107 | ||
@@ -118,7 +118,7 @@ int ixp4xx_pci_read_errata(u32 addr, u32 cmd, u32* data) | |||
118 | if(check_master_abort()) | 118 | if(check_master_abort()) |
119 | retval = 1; | 119 | retval = 1; |
120 | 120 | ||
121 | spin_unlock_irqrestore(&ixp4xx_pci_lock, flags); | 121 | raw_spin_unlock_irqrestore(&ixp4xx_pci_lock, flags); |
122 | return retval; | 122 | return retval; |
123 | } | 123 | } |
124 | 124 | ||
@@ -127,7 +127,7 @@ int ixp4xx_pci_read_no_errata(u32 addr, u32 cmd, u32* data) | |||
127 | unsigned long flags; | 127 | unsigned long flags; |
128 | int retval = 0; | 128 | int retval = 0; |
129 | 129 | ||
130 | spin_lock_irqsave(&ixp4xx_pci_lock, flags); | 130 | raw_spin_lock_irqsave(&ixp4xx_pci_lock, flags); |
131 | 131 | ||
132 | *PCI_NP_AD = addr; | 132 | *PCI_NP_AD = addr; |
133 | 133 | ||
@@ -140,7 +140,7 @@ int ixp4xx_pci_read_no_errata(u32 addr, u32 cmd, u32* data) | |||
140 | if(check_master_abort()) | 140 | if(check_master_abort()) |
141 | retval = 1; | 141 | retval = 1; |
142 | 142 | ||
143 | spin_unlock_irqrestore(&ixp4xx_pci_lock, flags); | 143 | raw_spin_unlock_irqrestore(&ixp4xx_pci_lock, flags); |
144 | return retval; | 144 | return retval; |
145 | } | 145 | } |
146 | 146 | ||
@@ -149,7 +149,7 @@ int ixp4xx_pci_write(u32 addr, u32 cmd, u32 data) | |||
149 | unsigned long flags; | 149 | unsigned long flags; |
150 | int retval = 0; | 150 | int retval = 0; |
151 | 151 | ||
152 | spin_lock_irqsave(&ixp4xx_pci_lock, flags); | 152 | raw_spin_lock_irqsave(&ixp4xx_pci_lock, flags); |
153 | 153 | ||
154 | *PCI_NP_AD = addr; | 154 | *PCI_NP_AD = addr; |
155 | 155 | ||
@@ -162,7 +162,7 @@ int ixp4xx_pci_write(u32 addr, u32 cmd, u32 data) | |||
162 | if(check_master_abort()) | 162 | if(check_master_abort()) |
163 | retval = 1; | 163 | retval = 1; |
164 | 164 | ||
165 | spin_unlock_irqrestore(&ixp4xx_pci_lock, flags); | 165 | raw_spin_unlock_irqrestore(&ixp4xx_pci_lock, flags); |
166 | return retval; | 166 | return retval; |
167 | } | 167 | } |
168 | 168 | ||
@@ -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 833c3a2784aa..06b5ad774604 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/gplugd.c b/arch/arm/mach-mmp/gplugd.c index ef738deb20b5..32776f3739f1 100644 --- a/arch/arm/mach-mmp/gplugd.c +++ b/arch/arm/mach-mmp/gplugd.c | |||
@@ -16,16 +16,18 @@ | |||
16 | 16 | ||
17 | #include <mach/pxa168.h> | 17 | #include <mach/pxa168.h> |
18 | #include <mach/mfp-pxa168.h> | 18 | #include <mach/mfp-pxa168.h> |
19 | #include <mach/mfp-gplugd.h> | ||
20 | 19 | ||
21 | #include "common.h" | 20 | #include "common.h" |
22 | 21 | ||
23 | static unsigned long gplugd_pin_config[] __initdata = { | 22 | static unsigned long gplugd_pin_config[] __initdata = { |
24 | /* UART3 */ | 23 | /* UART3 */ |
25 | GPIO8_UART3_SOUT, | 24 | GPIO8_UART3_TXD, |
26 | GPIO9_UART3_SIN, | 25 | GPIO9_UART3_RXD, |
27 | GPI1O_UART3_CTS, | 26 | GPIO1O_UART3_CTS, |
28 | GPI11_UART3_RTS, | 27 | GPIO11_UART3_RTS, |
28 | |||
29 | /* USB OTG PEN */ | ||
30 | GPIO18_GPIO, | ||
29 | 31 | ||
30 | /* MMC2 */ | 32 | /* MMC2 */ |
31 | GPIO28_MMC2_CMD, | 33 | GPIO28_MMC2_CMD, |
@@ -109,6 +111,12 @@ static unsigned long gplugd_pin_config[] __initdata = { | |||
109 | GPIO105_CI2C_SDA, | 111 | GPIO105_CI2C_SDA, |
110 | GPIO106_CI2C_SCL, | 112 | GPIO106_CI2C_SCL, |
111 | 113 | ||
114 | /* SPI NOR Flash on SSP2 */ | ||
115 | GPIO107_SSP2_RXD, | ||
116 | GPIO108_SSP2_TXD, | ||
117 | GPIO110_GPIO, /* SPI_CSn */ | ||
118 | GPIO111_SSP2_CLK, | ||
119 | |||
112 | /* Select JTAG */ | 120 | /* Select JTAG */ |
113 | GPIO109_GPIO, | 121 | GPIO109_GPIO, |
114 | 122 | ||
@@ -154,7 +162,7 @@ static void __init select_disp_freq(void) | |||
154 | "frequency\n"); | 162 | "frequency\n"); |
155 | } else { | 163 | } else { |
156 | gpio_direction_output(35, 1); | 164 | gpio_direction_output(35, 1); |
157 | gpio_free(104); | 165 | gpio_free(35); |
158 | } | 166 | } |
159 | 167 | ||
160 | if (unlikely(gpio_request(85, "DISP_FREQ_SEL_2"))) { | 168 | if (unlikely(gpio_request(85, "DISP_FREQ_SEL_2"))) { |
@@ -162,7 +170,7 @@ static void __init select_disp_freq(void) | |||
162 | "frequency\n"); | 170 | "frequency\n"); |
163 | } else { | 171 | } else { |
164 | gpio_direction_output(85, 0); | 172 | gpio_direction_output(85, 0); |
165 | gpio_free(104); | 173 | gpio_free(85); |
166 | } | 174 | } |
167 | } | 175 | } |
168 | 176 | ||
diff --git a/arch/arm/mach-mmp/include/mach/mfp-gplugd.h b/arch/arm/mach-mmp/include/mach/mfp-gplugd.h deleted file mode 100644 index b8cf38d85600..000000000000 --- a/arch/arm/mach-mmp/include/mach/mfp-gplugd.h +++ /dev/null | |||
@@ -1,52 +0,0 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/mach-mmp/include/mach/mfp-gplugd.h | ||
3 | * | ||
4 | * MFP definitions used in gplugD | ||
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 | |||
11 | #ifndef __MACH_MFP_GPLUGD_H | ||
12 | #define __MACH_MFP_GPLUGD_H | ||
13 | |||
14 | #include <plat/mfp.h> | ||
15 | #include <mach/mfp.h> | ||
16 | |||
17 | /* UART3 */ | ||
18 | #define GPIO8_UART3_SOUT MFP_CFG(GPIO8, AF2) | ||
19 | #define GPIO9_UART3_SIN MFP_CFG(GPIO9, AF2) | ||
20 | #define GPI1O_UART3_CTS MFP_CFG(GPIO10, AF2) | ||
21 | #define GPI11_UART3_RTS MFP_CFG(GPIO11, AF2) | ||
22 | |||
23 | /* MMC2 */ | ||
24 | #define GPIO28_MMC2_CMD MFP_CFG_DRV(GPIO28, AF6, FAST) | ||
25 | #define GPIO29_MMC2_CLK MFP_CFG_DRV(GPIO29, AF6, FAST) | ||
26 | #define GPIO30_MMC2_DAT0 MFP_CFG_DRV(GPIO30, AF6, FAST) | ||
27 | #define GPIO31_MMC2_DAT1 MFP_CFG_DRV(GPIO31, AF6, FAST) | ||
28 | #define GPIO32_MMC2_DAT2 MFP_CFG_DRV(GPIO32, AF6, FAST) | ||
29 | #define GPIO33_MMC2_DAT3 MFP_CFG_DRV(GPIO33, AF6, FAST) | ||
30 | |||
31 | /* I2S */ | ||
32 | #undef GPIO114_I2S_FRM | ||
33 | #undef GPIO115_I2S_BCLK | ||
34 | |||
35 | #define GPIO114_I2S_FRM MFP_CFG_DRV(GPIO114, AF1, FAST) | ||
36 | #define GPIO115_I2S_BCLK MFP_CFG_DRV(GPIO115, AF1, FAST) | ||
37 | #define GPIO116_I2S_TXD MFP_CFG_DRV(GPIO116, AF1, FAST) | ||
38 | |||
39 | /* MMC4 */ | ||
40 | #define GPIO125_MMC4_DAT3 MFP_CFG_DRV(GPIO125, AF7, FAST) | ||
41 | #define GPIO126_MMC4_DAT2 MFP_CFG_DRV(GPIO126, AF7, FAST) | ||
42 | #define GPIO127_MMC4_DAT1 MFP_CFG_DRV(GPIO127, AF7, FAST) | ||
43 | #define GPIO0_2_MMC4_DAT0 MFP_CFG_DRV(GPIO0_2, AF7, FAST) | ||
44 | #define GPIO1_2_MMC4_CMD MFP_CFG_DRV(GPIO1_2, AF7, FAST) | ||
45 | #define GPIO2_2_MMC4_CLK MFP_CFG_DRV(GPIO2_2, AF7, FAST) | ||
46 | |||
47 | /* OTG GPIO */ | ||
48 | #define GPIO_USB_OTG_PEN 18 | ||
49 | #define GPIO_USB_OIDIR 20 | ||
50 | |||
51 | /* Other GPIOs are 35, 84, 85 */ | ||
52 | #endif /* __MACH_MFP_GPLUGD_H */ | ||
diff --git a/arch/arm/mach-mmp/include/mach/mfp-pxa168.h b/arch/arm/mach-mmp/include/mach/mfp-pxa168.h index 8c782328b21c..92aaa3c19d61 100644 --- a/arch/arm/mach-mmp/include/mach/mfp-pxa168.h +++ b/arch/arm/mach-mmp/include/mach/mfp-pxa168.h | |||
@@ -203,6 +203,10 @@ | |||
203 | #define GPIO33_CF_nCD2 MFP_CFG(GPIO33, AF3) | 203 | #define GPIO33_CF_nCD2 MFP_CFG(GPIO33, AF3) |
204 | 204 | ||
205 | /* UART */ | 205 | /* UART */ |
206 | #define GPIO8_UART3_TXD MFP_CFG(GPIO8, AF2) | ||
207 | #define GPIO9_UART3_RXD MFP_CFG(GPIO9, AF2) | ||
208 | #define GPIO1O_UART3_CTS MFP_CFG(GPIO10, AF2) | ||
209 | #define GPIO11_UART3_RTS MFP_CFG(GPIO11, AF2) | ||
206 | #define GPIO88_UART2_TXD MFP_CFG(GPIO88, AF2) | 210 | #define GPIO88_UART2_TXD MFP_CFG(GPIO88, AF2) |
207 | #define GPIO89_UART2_RXD MFP_CFG(GPIO89, AF2) | 211 | #define GPIO89_UART2_RXD MFP_CFG(GPIO89, AF2) |
208 | #define GPIO107_UART1_TXD MFP_CFG_DRV(GPIO107, AF1, FAST) | 212 | #define GPIO107_UART1_TXD MFP_CFG_DRV(GPIO107, AF1, FAST) |
@@ -232,6 +236,22 @@ | |||
232 | #define GPIO53_MMC1_CD MFP_CFG(GPIO53, AF1) | 236 | #define GPIO53_MMC1_CD MFP_CFG(GPIO53, AF1) |
233 | #define GPIO46_MMC1_WP MFP_CFG(GPIO46, AF1) | 237 | #define GPIO46_MMC1_WP MFP_CFG(GPIO46, AF1) |
234 | 238 | ||
239 | /* MMC2 */ | ||
240 | #define GPIO28_MMC2_CMD MFP_CFG_DRV(GPIO28, AF6, FAST) | ||
241 | #define GPIO29_MMC2_CLK MFP_CFG_DRV(GPIO29, AF6, FAST) | ||
242 | #define GPIO30_MMC2_DAT0 MFP_CFG_DRV(GPIO30, AF6, FAST) | ||
243 | #define GPIO31_MMC2_DAT1 MFP_CFG_DRV(GPIO31, AF6, FAST) | ||
244 | #define GPIO32_MMC2_DAT2 MFP_CFG_DRV(GPIO32, AF6, FAST) | ||
245 | #define GPIO33_MMC2_DAT3 MFP_CFG_DRV(GPIO33, AF6, FAST) | ||
246 | |||
247 | /* MMC4 */ | ||
248 | #define GPIO125_MMC4_DAT3 MFP_CFG_DRV(GPIO125, AF7, FAST) | ||
249 | #define GPIO126_MMC4_DAT2 MFP_CFG_DRV(GPIO126, AF7, FAST) | ||
250 | #define GPIO127_MMC4_DAT1 MFP_CFG_DRV(GPIO127, AF7, FAST) | ||
251 | #define GPIO0_2_MMC4_DAT0 MFP_CFG_DRV(GPIO0_2, AF7, FAST) | ||
252 | #define GPIO1_2_MMC4_CMD MFP_CFG_DRV(GPIO1_2, AF7, FAST) | ||
253 | #define GPIO2_2_MMC4_CLK MFP_CFG_DRV(GPIO2_2, AF7, FAST) | ||
254 | |||
235 | /* LCD */ | 255 | /* LCD */ |
236 | #define GPIO84_LCD_CS MFP_CFG(GPIO84, AF1) | 256 | #define GPIO84_LCD_CS MFP_CFG(GPIO84, AF1) |
237 | #define GPIO60_LCD_DD0 MFP_CFG(GPIO60, AF1) | 257 | #define GPIO60_LCD_DD0 MFP_CFG(GPIO60, AF1) |
@@ -269,11 +289,12 @@ | |||
269 | #define GPIO106_CI2C_SCL MFP_CFG(GPIO106, AF1) | 289 | #define GPIO106_CI2C_SCL MFP_CFG(GPIO106, AF1) |
270 | 290 | ||
271 | /* I2S */ | 291 | /* I2S */ |
272 | #define GPIO113_I2S_MCLK MFP_CFG(GPIO113,AF6) | 292 | #define GPIO113_I2S_MCLK MFP_CFG(GPIO113, AF6) |
273 | #define GPIO114_I2S_FRM MFP_CFG(GPIO114,AF1) | 293 | #define GPIO114_I2S_FRM MFP_CFG(GPIO114, AF1) |
274 | #define GPIO115_I2S_BCLK MFP_CFG(GPIO115,AF1) | 294 | #define GPIO115_I2S_BCLK MFP_CFG(GPIO115, AF1) |
275 | #define GPIO116_I2S_RXD MFP_CFG(GPIO116,AF2) | 295 | #define GPIO116_I2S_RXD MFP_CFG(GPIO116, AF2) |
276 | #define GPIO117_I2S_TXD MFP_CFG(GPIO117,AF2) | 296 | #define GPIO116_I2S_TXD MFP_CFG(GPIO116, AF1) |
297 | #define GPIO117_I2S_TXD MFP_CFG(GPIO117, AF2) | ||
277 | 298 | ||
278 | /* PWM */ | 299 | /* PWM */ |
279 | #define GPIO96_PWM3_OUT MFP_CFG(GPIO96, AF1) | 300 | #define GPIO96_PWM3_OUT MFP_CFG(GPIO96, AF1) |
@@ -324,4 +345,10 @@ | |||
324 | #define GPIO101_MII_MDIO MFP_CFG(GPIO101, AF5) | 345 | #define GPIO101_MII_MDIO MFP_CFG(GPIO101, AF5) |
325 | #define GPIO103_RX_DV MFP_CFG(GPIO103, AF5) | 346 | #define GPIO103_RX_DV MFP_CFG(GPIO103, AF5) |
326 | 347 | ||
348 | /* SSP2 */ | ||
349 | #define GPIO107_SSP2_RXD MFP_CFG(GPIO107, AF4) | ||
350 | #define GPIO108_SSP2_TXD MFP_CFG(GPIO108, AF4) | ||
351 | #define GPIO111_SSP2_CLK MFP_CFG(GPIO111, AF4) | ||
352 | #define GPIO112_SSP2_FRM MFP_CFG(GPIO112, AF4) | ||
353 | |||
327 | #endif /* __ASM_MACH_MFP_PXA168_H */ | 354 | #endif /* __ASM_MACH_MFP_PXA168_H */ |
diff --git a/arch/arm/mach-mmp/include/mach/pxa168.h b/arch/arm/mach-mmp/include/mach/pxa168.h index 7f005843a707..7fb568d2845b 100644 --- a/arch/arm/mach-mmp/include/mach/pxa168.h +++ b/arch/arm/mach-mmp/include/mach/pxa168.h | |||
@@ -35,6 +35,13 @@ extern struct pxa_device_desc pxa168_device_fb; | |||
35 | extern struct pxa_device_desc pxa168_device_keypad; | 35 | extern struct pxa_device_desc pxa168_device_keypad; |
36 | extern struct pxa_device_desc pxa168_device_eth; | 36 | extern struct pxa_device_desc pxa168_device_eth; |
37 | 37 | ||
38 | struct pxa168_usb_pdata { | ||
39 | /* If NULL, default phy init routine for PXA168 would be called */ | ||
40 | int (*phy_init)(void __iomem *usb_phy_reg_base); | ||
41 | }; | ||
42 | /* pdata can be NULL */ | ||
43 | int __init pxa168_add_usb_host(struct pxa168_usb_pdata *pdata); | ||
44 | |||
38 | static inline int pxa168_add_uart(int id) | 45 | static inline int pxa168_add_uart(int id) |
39 | { | 46 | { |
40 | struct pxa_device_desc *d = NULL; | 47 | struct pxa_device_desc *d = NULL; |
diff --git a/arch/arm/mach-mmp/pxa168.c b/arch/arm/mach-mmp/pxa168.c index 50c1763911ff..76ca15c00e45 100644 --- a/arch/arm/mach-mmp/pxa168.c +++ b/arch/arm/mach-mmp/pxa168.c | |||
@@ -24,6 +24,9 @@ | |||
24 | #include <mach/dma.h> | 24 | #include <mach/dma.h> |
25 | #include <mach/devices.h> | 25 | #include <mach/devices.h> |
26 | #include <mach/mfp.h> | 26 | #include <mach/mfp.h> |
27 | #include <linux/platform_device.h> | ||
28 | #include <linux/dma-mapping.h> | ||
29 | #include <mach/pxa168.h> | ||
27 | 30 | ||
28 | #include "common.h" | 31 | #include "common.h" |
29 | #include "clock.h" | 32 | #include "clock.h" |
@@ -82,6 +85,7 @@ static APBC_CLK(keypad, PXA168_KPC, 0, 32000); | |||
82 | static APMU_CLK(nand, NAND, 0x19b, 156000000); | 85 | static APMU_CLK(nand, NAND, 0x19b, 156000000); |
83 | static APMU_CLK(lcd, LCD, 0x7f, 312000000); | 86 | static APMU_CLK(lcd, LCD, 0x7f, 312000000); |
84 | static APMU_CLK(eth, ETH, 0x09, 0); | 87 | static APMU_CLK(eth, ETH, 0x09, 0); |
88 | static APMU_CLK(usb, USB, 0x12, 0); | ||
85 | 89 | ||
86 | /* device and clock bindings */ | 90 | /* device and clock bindings */ |
87 | static struct clk_lookup pxa168_clkregs[] = { | 91 | static struct clk_lookup pxa168_clkregs[] = { |
@@ -103,6 +107,7 @@ static struct clk_lookup pxa168_clkregs[] = { | |||
103 | INIT_CLKREG(&clk_lcd, "pxa168-fb", NULL), | 107 | INIT_CLKREG(&clk_lcd, "pxa168-fb", NULL), |
104 | INIT_CLKREG(&clk_keypad, "pxa27x-keypad", NULL), | 108 | INIT_CLKREG(&clk_keypad, "pxa27x-keypad", NULL), |
105 | INIT_CLKREG(&clk_eth, "pxa168-eth", "MFUCLK"), | 109 | INIT_CLKREG(&clk_eth, "pxa168-eth", "MFUCLK"), |
110 | INIT_CLKREG(&clk_usb, "pxa168-ehci", "PXA168-USBCLK"), | ||
106 | }; | 111 | }; |
107 | 112 | ||
108 | static int __init pxa168_init(void) | 113 | static int __init pxa168_init(void) |
@@ -168,3 +173,44 @@ PXA168_DEVICE(ssp5, "pxa168-ssp", 4, SSP5, 0xd4021000, 0x40, 60, 61); | |||
168 | PXA168_DEVICE(fb, "pxa168-fb", -1, LCD, 0xd420b000, 0x1c8); | 173 | PXA168_DEVICE(fb, "pxa168-fb", -1, LCD, 0xd420b000, 0x1c8); |
169 | PXA168_DEVICE(keypad, "pxa27x-keypad", -1, KEYPAD, 0xd4012000, 0x4c); | 174 | PXA168_DEVICE(keypad, "pxa27x-keypad", -1, KEYPAD, 0xd4012000, 0x4c); |
170 | PXA168_DEVICE(eth, "pxa168-eth", -1, MFU, 0xc0800000, 0x0fff); | 175 | PXA168_DEVICE(eth, "pxa168-eth", -1, MFU, 0xc0800000, 0x0fff); |
176 | |||
177 | struct resource pxa168_usb_host_resources[] = { | ||
178 | /* USB Host conroller register base */ | ||
179 | [0] = { | ||
180 | .start = 0xd4209000, | ||
181 | .end = 0xd4209000 + 0x200, | ||
182 | .flags = IORESOURCE_MEM, | ||
183 | .name = "pxa168-usb-host", | ||
184 | }, | ||
185 | /* USB PHY register base */ | ||
186 | [1] = { | ||
187 | .start = 0xd4206000, | ||
188 | .end = 0xd4206000 + 0xff, | ||
189 | .flags = IORESOURCE_MEM, | ||
190 | .name = "pxa168-usb-phy", | ||
191 | }, | ||
192 | [2] = { | ||
193 | .start = IRQ_PXA168_USB2, | ||
194 | .end = IRQ_PXA168_USB2, | ||
195 | .flags = IORESOURCE_IRQ, | ||
196 | }, | ||
197 | }; | ||
198 | |||
199 | static u64 pxa168_usb_host_dmamask = DMA_BIT_MASK(32); | ||
200 | struct platform_device pxa168_device_usb_host = { | ||
201 | .name = "pxa168-ehci", | ||
202 | .id = -1, | ||
203 | .dev = { | ||
204 | .dma_mask = &pxa168_usb_host_dmamask, | ||
205 | .coherent_dma_mask = DMA_BIT_MASK(32), | ||
206 | }, | ||
207 | |||
208 | .num_resources = ARRAY_SIZE(pxa168_usb_host_resources), | ||
209 | .resource = pxa168_usb_host_resources, | ||
210 | }; | ||
211 | |||
212 | int __init pxa168_add_usb_host(struct pxa168_usb_pdata *pdata) | ||
213 | { | ||
214 | pxa168_device_usb_host.dev.platform_data = pdata; | ||
215 | return platform_device_register(&pxa168_device_usb_host); | ||
216 | } | ||
diff --git a/arch/arm/mach-mmp/time.c b/arch/arm/mach-mmp/time.c index 99833b9485cf..4e91ee6e27c8 100644 --- a/arch/arm/mach-mmp/time.c +++ b/arch/arm/mach-mmp/time.c | |||
@@ -51,12 +51,12 @@ static inline uint32_t timer_read(void) | |||
51 | { | 51 | { |
52 | int delay = 100; | 52 | int delay = 100; |
53 | 53 | ||
54 | __raw_writel(1, TIMERS_VIRT_BASE + TMR_CVWR(0)); | 54 | __raw_writel(1, TIMERS_VIRT_BASE + TMR_CVWR(1)); |
55 | 55 | ||
56 | while (delay--) | 56 | while (delay--) |
57 | cpu_relax(); | 57 | cpu_relax(); |
58 | 58 | ||
59 | return __raw_readl(TIMERS_VIRT_BASE + TMR_CVWR(0)); | 59 | return __raw_readl(TIMERS_VIRT_BASE + TMR_CVWR(1)); |
60 | } | 60 | } |
61 | 61 | ||
62 | unsigned long long notrace sched_clock(void) | 62 | unsigned long long notrace sched_clock(void) |
@@ -75,28 +75,51 @@ static irqreturn_t timer_interrupt(int irq, void *dev_id) | |||
75 | { | 75 | { |
76 | struct clock_event_device *c = dev_id; | 76 | struct clock_event_device *c = dev_id; |
77 | 77 | ||
78 | /* disable and clear pending interrupt status */ | 78 | /* |
79 | __raw_writel(0x0, TIMERS_VIRT_BASE + TMR_IER(0)); | 79 | * Clear pending interrupt status. |
80 | __raw_writel(0x1, TIMERS_VIRT_BASE + TMR_ICR(0)); | 80 | */ |
81 | __raw_writel(0x01, TIMERS_VIRT_BASE + TMR_ICR(0)); | ||
82 | |||
83 | /* | ||
84 | * Disable timer 0. | ||
85 | */ | ||
86 | __raw_writel(0x02, TIMERS_VIRT_BASE + TMR_CER); | ||
87 | |||
81 | c->event_handler(c); | 88 | c->event_handler(c); |
89 | |||
82 | return IRQ_HANDLED; | 90 | return IRQ_HANDLED; |
83 | } | 91 | } |
84 | 92 | ||
85 | static int timer_set_next_event(unsigned long delta, | 93 | static int timer_set_next_event(unsigned long delta, |
86 | struct clock_event_device *dev) | 94 | struct clock_event_device *dev) |
87 | { | 95 | { |
88 | unsigned long flags, next; | 96 | unsigned long flags; |
89 | 97 | ||
90 | local_irq_save(flags); | 98 | local_irq_save(flags); |
91 | 99 | ||
92 | /* clear pending interrupt status and enable */ | 100 | /* |
101 | * Disable timer 0. | ||
102 | */ | ||
103 | __raw_writel(0x02, TIMERS_VIRT_BASE + TMR_CER); | ||
104 | |||
105 | /* | ||
106 | * Clear and enable timer match 0 interrupt. | ||
107 | */ | ||
93 | __raw_writel(0x01, TIMERS_VIRT_BASE + TMR_ICR(0)); | 108 | __raw_writel(0x01, TIMERS_VIRT_BASE + TMR_ICR(0)); |
94 | __raw_writel(0x01, TIMERS_VIRT_BASE + TMR_IER(0)); | 109 | __raw_writel(0x01, TIMERS_VIRT_BASE + TMR_IER(0)); |
95 | 110 | ||
96 | next = timer_read() + delta; | 111 | /* |
97 | __raw_writel(next, TIMERS_VIRT_BASE + TMR_TN_MM(0, 0)); | 112 | * Setup new clockevent timer value. |
113 | */ | ||
114 | __raw_writel(delta - 1, TIMERS_VIRT_BASE + TMR_TN_MM(0, 0)); | ||
115 | |||
116 | /* | ||
117 | * Enable timer 0. | ||
118 | */ | ||
119 | __raw_writel(0x03, TIMERS_VIRT_BASE + TMR_CER); | ||
98 | 120 | ||
99 | local_irq_restore(flags); | 121 | local_irq_restore(flags); |
122 | |||
100 | return 0; | 123 | return 0; |
101 | } | 124 | } |
102 | 125 | ||
@@ -145,23 +168,26 @@ static struct clocksource cksrc = { | |||
145 | static void __init timer_config(void) | 168 | static void __init timer_config(void) |
146 | { | 169 | { |
147 | uint32_t ccr = __raw_readl(TIMERS_VIRT_BASE + TMR_CCR); | 170 | uint32_t ccr = __raw_readl(TIMERS_VIRT_BASE + TMR_CCR); |
148 | uint32_t cer = __raw_readl(TIMERS_VIRT_BASE + TMR_CER); | ||
149 | uint32_t cmr = __raw_readl(TIMERS_VIRT_BASE + TMR_CMR); | ||
150 | 171 | ||
151 | __raw_writel(cer & ~0x1, TIMERS_VIRT_BASE + TMR_CER); /* disable */ | 172 | __raw_writel(0x0, TIMERS_VIRT_BASE + TMR_CER); /* disable */ |
152 | 173 | ||
153 | ccr &= (cpu_is_mmp2()) ? TMR_CCR_CS_0(0) : TMR_CCR_CS_0(3); | 174 | ccr &= (cpu_is_mmp2()) ? (TMR_CCR_CS_0(0) | TMR_CCR_CS_1(0)) : |
175 | (TMR_CCR_CS_0(3) | TMR_CCR_CS_1(3)); | ||
154 | __raw_writel(ccr, TIMERS_VIRT_BASE + TMR_CCR); | 176 | __raw_writel(ccr, TIMERS_VIRT_BASE + TMR_CCR); |
155 | 177 | ||
156 | /* free-running mode */ | 178 | /* set timer 0 to periodic mode, and timer 1 to free-running mode */ |
157 | __raw_writel(cmr | 0x01, TIMERS_VIRT_BASE + TMR_CMR); | 179 | __raw_writel(0x2, TIMERS_VIRT_BASE + TMR_CMR); |
158 | 180 | ||
159 | __raw_writel(0x0, TIMERS_VIRT_BASE + TMR_PLCR(0)); /* free-running */ | 181 | __raw_writel(0x1, TIMERS_VIRT_BASE + TMR_PLCR(0)); /* periodic */ |
160 | __raw_writel(0x7, TIMERS_VIRT_BASE + TMR_ICR(0)); /* clear status */ | 182 | __raw_writel(0x7, TIMERS_VIRT_BASE + TMR_ICR(0)); /* clear status */ |
161 | __raw_writel(0x0, TIMERS_VIRT_BASE + TMR_IER(0)); | 183 | __raw_writel(0x0, TIMERS_VIRT_BASE + TMR_IER(0)); |
162 | 184 | ||
163 | /* enable timer counter */ | 185 | __raw_writel(0x0, TIMERS_VIRT_BASE + TMR_PLCR(1)); /* free-running */ |
164 | __raw_writel(cer | 0x01, TIMERS_VIRT_BASE + TMR_CER); | 186 | __raw_writel(0x7, TIMERS_VIRT_BASE + TMR_ICR(1)); /* clear status */ |
187 | __raw_writel(0x0, TIMERS_VIRT_BASE + TMR_IER(1)); | ||
188 | |||
189 | /* enable timer 1 counter */ | ||
190 | __raw_writel(0x2, TIMERS_VIRT_BASE + TMR_CER); | ||
165 | } | 191 | } |
166 | 192 | ||
167 | static struct irqaction timer_irq = { | 193 | static struct irqaction timer_irq = { |
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 92afaf6583ea..9043417ea52f 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> |
@@ -41,6 +42,21 @@ | |||
41 | 42 | ||
42 | extern struct sys_timer msm_timer; | 43 | extern struct sys_timer msm_timer; |
43 | 44 | ||
45 | static void __init msm7x30_fixup(struct machine_desc *desc, struct tag *tag, | ||
46 | char **cmdline, struct meminfo *mi) | ||
47 | { | ||
48 | for (; tag->hdr.size; tag = tag_next(tag)) | ||
49 | if (tag->hdr.tag == ATAG_MEM && tag->u.mem.start == 0x200000) { | ||
50 | tag->u.mem.start = 0; | ||
51 | tag->u.mem.size += SZ_2M; | ||
52 | } | ||
53 | } | ||
54 | |||
55 | static void __init msm7x30_reserve(void) | ||
56 | { | ||
57 | memblock_remove(0x0, SZ_2M); | ||
58 | } | ||
59 | |||
44 | static int hsusb_phy_init_seq[] = { | 60 | static int hsusb_phy_init_seq[] = { |
45 | 0x30, 0x32, /* Enable and set Pre-Emphasis Depth to 20% */ | 61 | 0x30, 0x32, /* Enable and set Pre-Emphasis Depth to 20% */ |
46 | 0x02, 0x36, /* Disable CDR Auto Reset feature */ | 62 | 0x02, 0x36, /* Disable CDR Auto Reset feature */ |
@@ -106,6 +122,8 @@ static void __init msm7x30_map_io(void) | |||
106 | 122 | ||
107 | MACHINE_START(MSM7X30_SURF, "QCT MSM7X30 SURF") | 123 | MACHINE_START(MSM7X30_SURF, "QCT MSM7X30 SURF") |
108 | .boot_params = PLAT_PHYS_OFFSET + 0x100, | 124 | .boot_params = PLAT_PHYS_OFFSET + 0x100, |
125 | .fixup = msm7x30_fixup, | ||
126 | .reserve = msm7x30_reserve, | ||
109 | .map_io = msm7x30_map_io, | 127 | .map_io = msm7x30_map_io, |
110 | .init_irq = msm7x30_init_irq, | 128 | .init_irq = msm7x30_init_irq, |
111 | .init_machine = msm7x30_init, | 129 | .init_machine = msm7x30_init, |
@@ -114,6 +132,8 @@ MACHINE_END | |||
114 | 132 | ||
115 | MACHINE_START(MSM7X30_FFA, "QCT MSM7X30 FFA") | 133 | MACHINE_START(MSM7X30_FFA, "QCT MSM7X30 FFA") |
116 | .boot_params = PLAT_PHYS_OFFSET + 0x100, | 134 | .boot_params = PLAT_PHYS_OFFSET + 0x100, |
135 | .fixup = msm7x30_fixup, | ||
136 | .reserve = msm7x30_reserve, | ||
117 | .map_io = msm7x30_map_io, | 137 | .map_io = msm7x30_map_io, |
118 | .init_irq = msm7x30_init_irq, | 138 | .init_irq = msm7x30_init_irq, |
119 | .init_machine = msm7x30_init, | 139 | .init_machine = msm7x30_init, |
@@ -122,6 +142,8 @@ MACHINE_END | |||
122 | 142 | ||
123 | MACHINE_START(MSM7X30_FLUID, "QCT MSM7X30 FLUID") | 143 | MACHINE_START(MSM7X30_FLUID, "QCT MSM7X30 FLUID") |
124 | .boot_params = PLAT_PHYS_OFFSET + 0x100, | 144 | .boot_params = PLAT_PHYS_OFFSET + 0x100, |
145 | .fixup = msm7x30_fixup, | ||
146 | .reserve = msm7x30_reserve, | ||
125 | .map_io = msm7x30_map_io, | 147 | .map_io = msm7x30_map_io, |
126 | .init_irq = msm7x30_init_irq, | 148 | .init_irq = msm7x30_init_irq, |
127 | .init_machine = msm7x30_init, | 149 | .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 863394c59e86..11c1e75ebb1b 100644 --- a/arch/arm/mach-msm/board-sapphire.c +++ b/arch/arm/mach-msm/board-sapphire.c | |||
@@ -76,8 +76,8 @@ static struct map_desc sapphire_io_desc[] __initdata = { | |||
76 | } | 76 | } |
77 | }; | 77 | }; |
78 | 78 | ||
79 | static void __init sapphire_fixup(struct machine_desc *desc, struct tag *tags, | 79 | static void __init sapphire_fixup(struct tag *tags, char **cmdline, |
80 | char **cmdline, struct meminfo *mi) | 80 | struct meminfo *mi) |
81 | { | 81 | { |
82 | int smi_sz = parse_tag_smi((const struct tag *)tags); | 82 | int smi_sz = parse_tag_smi((const struct tag *)tags); |
83 | 83 | ||
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/clock.c b/arch/arm/mach-msm/clock.c index 22a537669624..d9145dfc2a3b 100644 --- a/arch/arm/mach-msm/clock.c +++ b/arch/arm/mach-msm/clock.c | |||
@@ -18,7 +18,7 @@ | |||
18 | #include <linux/list.h> | 18 | #include <linux/list.h> |
19 | #include <linux/err.h> | 19 | #include <linux/err.h> |
20 | #include <linux/spinlock.h> | 20 | #include <linux/spinlock.h> |
21 | #include <linux/pm_qos_params.h> | 21 | #include <linux/pm_qos.h> |
22 | #include <linux/mutex.h> | 22 | #include <linux/mutex.h> |
23 | #include <linux/clk.h> | 23 | #include <linux/clk.h> |
24 | #include <linux/string.h> | 24 | #include <linux/string.h> |
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-mx5/board-cpuimx51.c b/arch/arm/mach-mx5/board-cpuimx51.c index 7c893fa70266..68934ea8725a 100644 --- a/arch/arm/mach-mx5/board-cpuimx51.c +++ b/arch/arm/mach-mx5/board-cpuimx51.c | |||
@@ -81,7 +81,7 @@ static struct plat_serial8250_port serial_platform_data[] = { | |||
81 | .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | UPF_IOREMAP, | 81 | .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | UPF_IOREMAP, |
82 | }, { | 82 | }, { |
83 | .mapbase = (unsigned long)(MX51_CS1_BASE_ADDR + 0x2000000), | 83 | .mapbase = (unsigned long)(MX51_CS1_BASE_ADDR + 0x2000000), |
84 | .irq = irq_to_gpio(CPUIMX51_QUARTD_GPIO), | 84 | .irq = gpio_to_irq(CPUIMX51_QUARTD_GPIO), |
85 | .irqflags = IRQF_TRIGGER_HIGH, | 85 | .irqflags = IRQF_TRIGGER_HIGH, |
86 | .uartclk = CPUIMX51_QUART_XTAL, | 86 | .uartclk = CPUIMX51_QUART_XTAL, |
87 | .regshift = CPUIMX51_QUART_REGSHIFT, | 87 | .regshift = CPUIMX51_QUART_REGSHIFT, |
diff --git a/arch/arm/mach-mx5/board-mx51_babbage.c b/arch/arm/mach-mx5/board-mx51_babbage.c index e400b09109ce..11b0ff67f89d 100644 --- a/arch/arm/mach-mx5/board-mx51_babbage.c +++ b/arch/arm/mach-mx5/board-mx51_babbage.c | |||
@@ -369,7 +369,7 @@ static void __init mx51_babbage_init(void) | |||
369 | ARRAY_SIZE(mx51babbage_pads)); | 369 | ARRAY_SIZE(mx51babbage_pads)); |
370 | 370 | ||
371 | imx51_add_imx_uart(0, &uart_pdata); | 371 | imx51_add_imx_uart(0, &uart_pdata); |
372 | imx51_add_imx_uart(1, &uart_pdata); | 372 | imx51_add_imx_uart(1, NULL); |
373 | imx51_add_imx_uart(2, &uart_pdata); | 373 | imx51_add_imx_uart(2, &uart_pdata); |
374 | 374 | ||
375 | babbage_fec_reset(); | 375 | babbage_fec_reset(); |
diff --git a/arch/arm/mach-mx5/board-mx51_efikamx.c b/arch/arm/mach-mx5/board-mx51_efikamx.c index f70700dc0ec1..551daf85ff8c 100644 --- a/arch/arm/mach-mx5/board-mx51_efikamx.c +++ b/arch/arm/mach-mx5/board-mx51_efikamx.c | |||
@@ -108,9 +108,9 @@ static void __init mx51_efikamx_board_id(void) | |||
108 | gpio_request(EFIKAMX_PCBID2, "pcbid2"); | 108 | gpio_request(EFIKAMX_PCBID2, "pcbid2"); |
109 | gpio_direction_input(EFIKAMX_PCBID2); | 109 | gpio_direction_input(EFIKAMX_PCBID2); |
110 | 110 | ||
111 | id = gpio_get_value(EFIKAMX_PCBID0); | 111 | id = gpio_get_value(EFIKAMX_PCBID0) ? 1 : 0; |
112 | id |= gpio_get_value(EFIKAMX_PCBID1) << 1; | 112 | id |= (gpio_get_value(EFIKAMX_PCBID1) ? 1 : 0) << 1; |
113 | id |= gpio_get_value(EFIKAMX_PCBID2) << 2; | 113 | id |= (gpio_get_value(EFIKAMX_PCBID2) ? 1 : 0) << 2; |
114 | 114 | ||
115 | switch (id) { | 115 | switch (id) { |
116 | case 7: | 116 | case 7: |
diff --git a/arch/arm/mach-mx5/board-mx51_efikasb.c b/arch/arm/mach-mx5/board-mx51_efikasb.c index 2e4d9d32a87c..8a9bca22beb5 100644 --- a/arch/arm/mach-mx5/board-mx51_efikasb.c +++ b/arch/arm/mach-mx5/board-mx51_efikasb.c | |||
@@ -156,23 +156,24 @@ static struct gpio_keys_button mx51_efikasb_keys[] = { | |||
156 | { | 156 | { |
157 | .code = KEY_POWER, | 157 | .code = KEY_POWER, |
158 | .gpio = EFIKASB_PWRKEY, | 158 | .gpio = EFIKASB_PWRKEY, |
159 | .type = EV_PWR, | 159 | .type = EV_KEY, |
160 | .desc = "Power Button", | 160 | .desc = "Power Button", |
161 | .wakeup = 1, | 161 | .wakeup = 1, |
162 | .debounce_interval = 10, /* ms */ | 162 | .active_low = 1, |
163 | }, | 163 | }, |
164 | { | 164 | { |
165 | .code = SW_LID, | 165 | .code = SW_LID, |
166 | .gpio = EFIKASB_LID, | 166 | .gpio = EFIKASB_LID, |
167 | .type = EV_SW, | 167 | .type = EV_SW, |
168 | .desc = "Lid Switch", | 168 | .desc = "Lid Switch", |
169 | .active_low = 1, | ||
169 | }, | 170 | }, |
170 | { | 171 | { |
171 | /* SW_RFKILLALL vs KEY_RFKILL ? */ | 172 | .code = KEY_RFKILL, |
172 | .code = SW_RFKILL_ALL, | ||
173 | .gpio = EFIKASB_RFKILL, | 173 | .gpio = EFIKASB_RFKILL, |
174 | .type = EV_SW, | 174 | .type = EV_KEY, |
175 | .desc = "rfkill", | 175 | .desc = "rfkill", |
176 | .active_low = 1, | ||
176 | }, | 177 | }, |
177 | }; | 178 | }; |
178 | 179 | ||
@@ -224,8 +225,8 @@ static void __init mx51_efikasb_board_id(void) | |||
224 | gpio_request(EFIKASB_PCBID1, "pcb id1"); | 225 | gpio_request(EFIKASB_PCBID1, "pcb id1"); |
225 | gpio_direction_input(EFIKASB_PCBID1); | 226 | gpio_direction_input(EFIKASB_PCBID1); |
226 | 227 | ||
227 | id = gpio_get_value(EFIKASB_PCBID0); | 228 | id = gpio_get_value(EFIKASB_PCBID0) ? 1 : 0; |
228 | id |= gpio_get_value(EFIKASB_PCBID1) << 1; | 229 | id |= (gpio_get_value(EFIKASB_PCBID1) ? 1 : 0) << 1; |
229 | 230 | ||
230 | switch (id) { | 231 | switch (id) { |
231 | default: | 232 | default: |
diff --git a/arch/arm/mach-mx5/clock-mx51-mx53.c b/arch/arm/mach-mx5/clock-mx51-mx53.c index 7f20308c4dbd..f7bf996f463b 100644 --- a/arch/arm/mach-mx5/clock-mx51-mx53.c +++ b/arch/arm/mach-mx5/clock-mx51-mx53.c | |||
@@ -271,7 +271,11 @@ static int _clk_pll_enable(struct clk *clk) | |||
271 | int i = 0; | 271 | int i = 0; |
272 | 272 | ||
273 | pllbase = _get_pll_base(clk); | 273 | pllbase = _get_pll_base(clk); |
274 | reg = __raw_readl(pllbase + MXC_PLL_DP_CTL) | MXC_PLL_DP_CTL_UPEN; | 274 | reg = __raw_readl(pllbase + MXC_PLL_DP_CTL); |
275 | if (reg & MXC_PLL_DP_CTL_UPEN) | ||
276 | return 0; | ||
277 | |||
278 | reg |= MXC_PLL_DP_CTL_UPEN; | ||
275 | __raw_writel(reg, pllbase + MXC_PLL_DP_CTL); | 279 | __raw_writel(reg, pllbase + MXC_PLL_DP_CTL); |
276 | 280 | ||
277 | /* Wait for lock */ | 281 | /* Wait for lock */ |
diff --git a/arch/arm/mach-mx5/mx51_efika.c b/arch/arm/mach-mx5/mx51_efika.c index 4435e03cea5d..c9209454807a 100644 --- a/arch/arm/mach-mx5/mx51_efika.c +++ b/arch/arm/mach-mx5/mx51_efika.c | |||
@@ -186,7 +186,7 @@ static int initialize_usbh1_port(struct platform_device *pdev) | |||
186 | 186 | ||
187 | mdelay(10); | 187 | mdelay(10); |
188 | 188 | ||
189 | return mx51_initialize_usb_hw(0, MXC_EHCI_ITC_NO_THRESHOLD); | 189 | return mx51_initialize_usb_hw(pdev->id, MXC_EHCI_ITC_NO_THRESHOLD); |
190 | } | 190 | } |
191 | 191 | ||
192 | static struct mxc_usbh_platform_data usbh1_config = { | 192 | static struct mxc_usbh_platform_data usbh1_config = { |
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-nuc93x/time.c b/arch/arm/mach-nuc93x/time.c index 2f90f9dc6e30..f9807c029ec5 100644 --- a/arch/arm/mach-nuc93x/time.c +++ b/arch/arm/mach-nuc93x/time.c | |||
@@ -82,7 +82,7 @@ static void nuc93x_timer_setup(void) | |||
82 | timer0_load = (rate / TICKS_PER_SEC); | 82 | timer0_load = (rate / TICKS_PER_SEC); |
83 | __raw_writel(timer0_load, REG_TICR0); | 83 | __raw_writel(timer0_load, REG_TICR0); |
84 | 84 | ||
85 | val |= (PERIOD | COUNTEN | INTEN | PRESCALE);; | 85 | val |= (PERIOD | COUNTEN | INTEN | PRESCALE); |
86 | __raw_writel(val, REG_TCSR0); | 86 | __raw_writel(val, REG_TCSR0); |
87 | 87 | ||
88 | } | 88 | } |
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-omap1/pm_bus.c b/arch/arm/mach-omap1/pm_bus.c index 943072d5a1d5..7868e75ad077 100644 --- a/arch/arm/mach-omap1/pm_bus.c +++ b/arch/arm/mach-omap1/pm_bus.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <linux/kernel.h> | 13 | #include <linux/kernel.h> |
14 | #include <linux/io.h> | 14 | #include <linux/io.h> |
15 | #include <linux/pm_runtime.h> | 15 | #include <linux/pm_runtime.h> |
16 | #include <linux/pm_clock.h> | ||
16 | #include <linux/platform_device.h> | 17 | #include <linux/platform_device.h> |
17 | #include <linux/mutex.h> | 18 | #include <linux/mutex.h> |
18 | #include <linux/clk.h> | 19 | #include <linux/clk.h> |
diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig index 4ae6257b39a4..89bfb49389f2 100644 --- a/arch/arm/mach-omap2/Kconfig +++ b/arch/arm/mach-omap2/Kconfig | |||
@@ -7,7 +7,6 @@ config ARCH_OMAP2PLUS_TYPICAL | |||
7 | default y | 7 | default y |
8 | select AEABI | 8 | select AEABI |
9 | select REGULATOR | 9 | select REGULATOR |
10 | select PM | ||
11 | select PM_RUNTIME | 10 | select PM_RUNTIME |
12 | select VFP | 11 | select VFP |
13 | select NEON if ARCH_OMAP3 || ARCH_OMAP4 | 12 | select NEON if ARCH_OMAP3 || ARCH_OMAP4 |
@@ -37,6 +36,7 @@ config ARCH_OMAP3 | |||
37 | select ARM_L1_CACHE_SHIFT_6 if !ARCH_OMAP4 | 36 | select ARM_L1_CACHE_SHIFT_6 if !ARCH_OMAP4 |
38 | select ARCH_HAS_OPP | 37 | select ARCH_HAS_OPP |
39 | select PM_OPP if PM | 38 | select PM_OPP if PM |
39 | select ARM_CPU_SUSPEND if PM | ||
40 | 40 | ||
41 | config ARCH_OMAP4 | 41 | config ARCH_OMAP4 |
42 | bool "TI OMAP4" | 42 | bool "TI OMAP4" |
@@ -51,6 +51,7 @@ config ARCH_OMAP4 | |||
51 | select ARCH_HAS_OPP | 51 | select ARCH_HAS_OPP |
52 | select PM_OPP if PM | 52 | select PM_OPP if PM |
53 | select USB_ARCH_HAS_EHCI | 53 | select USB_ARCH_HAS_EHCI |
54 | select ARM_CPU_SUSPEND if PM | ||
54 | 55 | ||
55 | comment "OMAP Core Type" | 56 | comment "OMAP Core Type" |
56 | depends on ARCH_OMAP2 | 57 | depends on ARCH_OMAP2 |
diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile index f34336560437..7317a2b39dd1 100644 --- a/arch/arm/mach-omap2/Makefile +++ b/arch/arm/mach-omap2/Makefile | |||
@@ -242,14 +242,11 @@ obj-$(CONFIG_MACH_IGEP0020) += board-igep0020.o \ | |||
242 | obj-$(CONFIG_MACH_OMAP3_TOUCHBOOK) += board-omap3touchbook.o \ | 242 | obj-$(CONFIG_MACH_OMAP3_TOUCHBOOK) += board-omap3touchbook.o \ |
243 | hsmmc.o | 243 | hsmmc.o |
244 | obj-$(CONFIG_MACH_OMAP_4430SDP) += board-4430sdp.o \ | 244 | obj-$(CONFIG_MACH_OMAP_4430SDP) += board-4430sdp.o \ |
245 | hsmmc.o \ | 245 | hsmmc.o |
246 | omap_phy_internal.o | ||
247 | obj-$(CONFIG_MACH_OMAP4_PANDA) += board-omap4panda.o \ | 246 | obj-$(CONFIG_MACH_OMAP4_PANDA) += board-omap4panda.o \ |
248 | hsmmc.o \ | 247 | hsmmc.o |
249 | omap_phy_internal.o | ||
250 | 248 | ||
251 | obj-$(CONFIG_MACH_OMAP3517EVM) += board-am3517evm.o \ | 249 | obj-$(CONFIG_MACH_OMAP3517EVM) += board-am3517evm.o |
252 | omap_phy_internal.o \ | ||
253 | 250 | ||
254 | obj-$(CONFIG_MACH_CRANEBOARD) += board-am3517crane.o | 251 | obj-$(CONFIG_MACH_CRANEBOARD) += board-am3517crane.o |
255 | 252 | ||
@@ -260,6 +257,8 @@ obj-$(CONFIG_MACH_TI8168EVM) += board-ti8168evm.o | |||
260 | usbfs-$(CONFIG_ARCH_OMAP_OTG) := usb-fs.o | 257 | usbfs-$(CONFIG_ARCH_OMAP_OTG) := usb-fs.o |
261 | obj-y += $(usbfs-m) $(usbfs-y) | 258 | obj-y += $(usbfs-m) $(usbfs-y) |
262 | obj-y += usb-musb.o | 259 | obj-y += usb-musb.o |
260 | obj-y += omap_phy_internal.o | ||
261 | |||
263 | obj-$(CONFIG_MACH_OMAP2_TUSB6010) += usb-tusb6010.o | 262 | obj-$(CONFIG_MACH_OMAP2_TUSB6010) += usb-tusb6010.o |
264 | obj-y += usb-host.o | 263 | obj-y += usb-host.o |
265 | 264 | ||
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/board-am3517crane.c b/arch/arm/mach-omap2/board-am3517crane.c index 5f2b55ff04ff..933e9353cb37 100644 --- a/arch/arm/mach-omap2/board-am3517crane.c +++ b/arch/arm/mach-omap2/board-am3517crane.c | |||
@@ -45,8 +45,6 @@ static struct omap_board_config_kernel am3517_crane_config[] __initdata = { | |||
45 | static struct omap_board_mux board_mux[] __initdata = { | 45 | static struct omap_board_mux board_mux[] __initdata = { |
46 | { .reg_offset = OMAP_MUX_TERMINATOR }, | 46 | { .reg_offset = OMAP_MUX_TERMINATOR }, |
47 | }; | 47 | }; |
48 | #else | ||
49 | #define board_mux NULL | ||
50 | #endif | 48 | #endif |
51 | 49 | ||
52 | static void __init am3517_crane_init_early(void) | 50 | static void __init am3517_crane_init_early(void) |
diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c index 32f5f895568a..3ae16b4e3f52 100644 --- a/arch/arm/mach-omap2/board-omap3beagle.c +++ b/arch/arm/mach-omap2/board-omap3beagle.c | |||
@@ -491,23 +491,22 @@ static void __init beagle_opp_init(void) | |||
491 | 491 | ||
492 | /* Custom OPP enabled for all xM versions */ | 492 | /* Custom OPP enabled for all xM versions */ |
493 | if (cpu_is_omap3630()) { | 493 | if (cpu_is_omap3630()) { |
494 | struct omap_hwmod *mh = omap_hwmod_lookup("mpu"); | 494 | struct device *mpu_dev, *iva_dev; |
495 | struct omap_hwmod *dh = omap_hwmod_lookup("iva"); | ||
496 | struct device *dev; | ||
497 | 495 | ||
498 | if (!mh || !dh) { | 496 | mpu_dev = omap2_get_mpuss_device(); |
497 | iva_dev = omap2_get_iva_device(); | ||
498 | |||
499 | if (!mpu_dev || !iva_dev) { | ||
499 | pr_err("%s: Aiee.. no mpu/dsp devices? %p %p\n", | 500 | pr_err("%s: Aiee.. no mpu/dsp devices? %p %p\n", |
500 | __func__, mh, dh); | 501 | __func__, mpu_dev, iva_dev); |
501 | return; | 502 | return; |
502 | } | 503 | } |
503 | /* Enable MPU 1GHz and lower opps */ | 504 | /* Enable MPU 1GHz and lower opps */ |
504 | dev = &mh->od->pdev.dev; | 505 | r = opp_enable(mpu_dev, 800000000); |
505 | r = opp_enable(dev, 800000000); | ||
506 | /* TODO: MPU 1GHz needs SR and ABB */ | 506 | /* TODO: MPU 1GHz needs SR and ABB */ |
507 | 507 | ||
508 | /* Enable IVA 800MHz and lower opps */ | 508 | /* Enable IVA 800MHz and lower opps */ |
509 | dev = &dh->od->pdev.dev; | 509 | r |= opp_enable(iva_dev, 660000000); |
510 | r |= opp_enable(dev, 660000000); | ||
511 | /* TODO: DSP 800MHz needs SR and ABB */ | 510 | /* TODO: DSP 800MHz needs SR and ABB */ |
512 | if (r) { | 511 | if (r) { |
513 | pr_err("%s: failed to enable higher opp %d\n", | 512 | pr_err("%s: failed to enable higher opp %d\n", |
@@ -516,10 +515,8 @@ static void __init beagle_opp_init(void) | |||
516 | * Cleanup - disable the higher freqs - we dont care | 515 | * Cleanup - disable the higher freqs - we dont care |
517 | * about the results | 516 | * about the results |
518 | */ | 517 | */ |
519 | dev = &mh->od->pdev.dev; | 518 | opp_disable(mpu_dev, 800000000); |
520 | opp_disable(dev, 800000000); | 519 | opp_disable(iva_dev, 660000000); |
521 | dev = &dh->od->pdev.dev; | ||
522 | opp_disable(dev, 660000000); | ||
523 | } | 520 | } |
524 | } | 521 | } |
525 | return; | 522 | return; |
diff --git a/arch/arm/mach-omap2/clock3xxx_data.c b/arch/arm/mach-omap2/clock3xxx_data.c index ffd55b1c4396..b9b844683147 100644 --- a/arch/arm/mach-omap2/clock3xxx_data.c +++ b/arch/arm/mach-omap2/clock3xxx_data.c | |||
@@ -3078,6 +3078,7 @@ static struct clk gpt12_fck = { | |||
3078 | .name = "gpt12_fck", | 3078 | .name = "gpt12_fck", |
3079 | .ops = &clkops_null, | 3079 | .ops = &clkops_null, |
3080 | .parent = &secure_32k_fck, | 3080 | .parent = &secure_32k_fck, |
3081 | .clkdm_name = "wkup_clkdm", | ||
3081 | .recalc = &followparent_recalc, | 3082 | .recalc = &followparent_recalc, |
3082 | }; | 3083 | }; |
3083 | 3084 | ||
@@ -3085,6 +3086,7 @@ static struct clk wdt1_fck = { | |||
3085 | .name = "wdt1_fck", | 3086 | .name = "wdt1_fck", |
3086 | .ops = &clkops_null, | 3087 | .ops = &clkops_null, |
3087 | .parent = &secure_32k_fck, | 3088 | .parent = &secure_32k_fck, |
3089 | .clkdm_name = "wkup_clkdm", | ||
3088 | .recalc = &followparent_recalc, | 3090 | .recalc = &followparent_recalc, |
3089 | }; | 3091 | }; |
3090 | 3092 | ||
diff --git a/arch/arm/mach-omap2/clock44xx_data.c b/arch/arm/mach-omap2/clock44xx_data.c index 2af0e3f00ce1..c0b6fbda3408 100644 --- a/arch/arm/mach-omap2/clock44xx_data.c +++ b/arch/arm/mach-omap2/clock44xx_data.c | |||
@@ -3376,10 +3376,18 @@ int __init omap4xxx_clk_init(void) | |||
3376 | } else if (cpu_is_omap446x()) { | 3376 | } else if (cpu_is_omap446x()) { |
3377 | cpu_mask = RATE_IN_4460; | 3377 | cpu_mask = RATE_IN_4460; |
3378 | cpu_clkflg = CK_446X; | 3378 | cpu_clkflg = CK_446X; |
3379 | } else { | ||
3380 | return 0; | ||
3379 | } | 3381 | } |
3380 | 3382 | ||
3381 | clk_init(&omap2_clk_functions); | 3383 | clk_init(&omap2_clk_functions); |
3382 | omap2_clk_disable_clkdm_control(); | 3384 | |
3385 | /* | ||
3386 | * Must stay commented until all OMAP SoC drivers are | ||
3387 | * converted to runtime PM, or drivers may start crashing | ||
3388 | * | ||
3389 | * omap2_clk_disable_clkdm_control(); | ||
3390 | */ | ||
3383 | 3391 | ||
3384 | for (c = omap44xx_clks; c < omap44xx_clks + ARRAY_SIZE(omap44xx_clks); | 3392 | for (c = omap44xx_clks; c < omap44xx_clks + ARRAY_SIZE(omap44xx_clks); |
3385 | c++) | 3393 | c++) |
diff --git a/arch/arm/mach-omap2/clockdomain.c b/arch/arm/mach-omap2/clockdomain.c index ab7db083f97f..8f0890685d7b 100644 --- a/arch/arm/mach-omap2/clockdomain.c +++ b/arch/arm/mach-omap2/clockdomain.c | |||
@@ -747,6 +747,7 @@ int clkdm_wakeup(struct clockdomain *clkdm) | |||
747 | spin_lock_irqsave(&clkdm->lock, flags); | 747 | spin_lock_irqsave(&clkdm->lock, flags); |
748 | clkdm->_flags &= ~_CLKDM_FLAG_HWSUP_ENABLED; | 748 | clkdm->_flags &= ~_CLKDM_FLAG_HWSUP_ENABLED; |
749 | ret = arch_clkdm->clkdm_wakeup(clkdm); | 749 | ret = arch_clkdm->clkdm_wakeup(clkdm); |
750 | ret |= pwrdm_state_switch(clkdm->pwrdm.ptr); | ||
750 | spin_unlock_irqrestore(&clkdm->lock, flags); | 751 | spin_unlock_irqrestore(&clkdm->lock, flags); |
751 | return ret; | 752 | return ret; |
752 | } | 753 | } |
@@ -818,6 +819,7 @@ void clkdm_deny_idle(struct clockdomain *clkdm) | |||
818 | spin_lock_irqsave(&clkdm->lock, flags); | 819 | spin_lock_irqsave(&clkdm->lock, flags); |
819 | clkdm->_flags &= ~_CLKDM_FLAG_HWSUP_ENABLED; | 820 | clkdm->_flags &= ~_CLKDM_FLAG_HWSUP_ENABLED; |
820 | arch_clkdm->clkdm_deny_idle(clkdm); | 821 | arch_clkdm->clkdm_deny_idle(clkdm); |
822 | pwrdm_state_switch(clkdm->pwrdm.ptr); | ||
821 | spin_unlock_irqrestore(&clkdm->lock, flags); | 823 | spin_unlock_irqrestore(&clkdm->lock, flags); |
822 | } | 824 | } |
823 | 825 | ||
diff --git a/arch/arm/mach-omap2/cminst44xx.h b/arch/arm/mach-omap2/cminst44xx.h index f2ea6453ade0..a018a7327879 100644 --- a/arch/arm/mach-omap2/cminst44xx.h +++ b/arch/arm/mach-omap2/cminst44xx.h | |||
@@ -18,13 +18,36 @@ extern void omap4_cminst_clkdm_force_sleep(u8 part, s16 inst, u16 cdoffs); | |||
18 | extern void omap4_cminst_clkdm_force_wakeup(u8 part, s16 inst, u16 cdoffs); | 18 | extern void omap4_cminst_clkdm_force_wakeup(u8 part, s16 inst, u16 cdoffs); |
19 | 19 | ||
20 | extern int omap4_cminst_wait_module_ready(u8 part, u16 inst, s16 cdoffs, u16 clkctrl_offs); | 20 | extern int omap4_cminst_wait_module_ready(u8 part, u16 inst, s16 cdoffs, u16 clkctrl_offs); |
21 | extern int omap4_cminst_wait_module_idle(u8 part, u16 inst, s16 cdoffs, u16 clkctrl_offs); | 21 | |
22 | # ifdef CONFIG_ARCH_OMAP4 | ||
23 | extern int omap4_cminst_wait_module_idle(u8 part, u16 inst, s16 cdoffs, | ||
24 | u16 clkctrl_offs); | ||
22 | 25 | ||
23 | extern void omap4_cminst_module_enable(u8 mode, u8 part, u16 inst, s16 cdoffs, | 26 | extern void omap4_cminst_module_enable(u8 mode, u8 part, u16 inst, s16 cdoffs, |
24 | u16 clkctrl_offs); | 27 | u16 clkctrl_offs); |
25 | extern void omap4_cminst_module_disable(u8 part, u16 inst, s16 cdoffs, | 28 | extern void omap4_cminst_module_disable(u8 part, u16 inst, s16 cdoffs, |
26 | u16 clkctrl_offs); | 29 | u16 clkctrl_offs); |
27 | 30 | ||
31 | # else | ||
32 | |||
33 | static inline int omap4_cminst_wait_module_idle(u8 part, u16 inst, s16 cdoffs, | ||
34 | u16 clkctrl_offs) | ||
35 | { | ||
36 | return 0; | ||
37 | } | ||
38 | |||
39 | static inline void omap4_cminst_module_enable(u8 mode, u8 part, u16 inst, | ||
40 | s16 cdoffs, u16 clkctrl_offs) | ||
41 | { | ||
42 | } | ||
43 | |||
44 | static inline void omap4_cminst_module_disable(u8 part, u16 inst, s16 cdoffs, | ||
45 | u16 clkctrl_offs) | ||
46 | { | ||
47 | } | ||
48 | |||
49 | # endif | ||
50 | |||
28 | /* | 51 | /* |
29 | * In an ideal world, we would not export these low-level functions, | 52 | * In an ideal world, we would not export these low-level functions, |
30 | * but this will probably take some time to fix properly | 53 | * but this will probably take some time to fix properly |
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/mux.c b/arch/arm/mach-omap2/mux.c index c7fb22abc219..655e9480eb98 100644 --- a/arch/arm/mach-omap2/mux.c +++ b/arch/arm/mach-omap2/mux.c | |||
@@ -821,11 +821,10 @@ static void __init omap_mux_set_cmdline_signals(void) | |||
821 | if (!omap_mux_options) | 821 | if (!omap_mux_options) |
822 | return; | 822 | return; |
823 | 823 | ||
824 | options = kmalloc(strlen(omap_mux_options) + 1, GFP_KERNEL); | 824 | options = kstrdup(omap_mux_options, GFP_KERNEL); |
825 | if (!options) | 825 | if (!options) |
826 | return; | 826 | return; |
827 | 827 | ||
828 | strcpy(options, omap_mux_options); | ||
829 | next_opt = options; | 828 | next_opt = options; |
830 | 829 | ||
831 | while ((token = strsep(&next_opt, ",")) != NULL) { | 830 | while ((token = strsep(&next_opt, ",")) != NULL) { |
@@ -855,24 +854,19 @@ static int __init omap_mux_copy_names(struct omap_mux *src, | |||
855 | 854 | ||
856 | for (i = 0; i < OMAP_MUX_NR_MODES; i++) { | 855 | for (i = 0; i < OMAP_MUX_NR_MODES; i++) { |
857 | if (src->muxnames[i]) { | 856 | if (src->muxnames[i]) { |
858 | dst->muxnames[i] = | 857 | dst->muxnames[i] = kstrdup(src->muxnames[i], |
859 | kmalloc(strlen(src->muxnames[i]) + 1, | 858 | GFP_KERNEL); |
860 | GFP_KERNEL); | ||
861 | if (!dst->muxnames[i]) | 859 | if (!dst->muxnames[i]) |
862 | goto free; | 860 | goto free; |
863 | strcpy(dst->muxnames[i], src->muxnames[i]); | ||
864 | } | 861 | } |
865 | } | 862 | } |
866 | 863 | ||
867 | #ifdef CONFIG_DEBUG_FS | 864 | #ifdef CONFIG_DEBUG_FS |
868 | for (i = 0; i < OMAP_MUX_NR_SIDES; i++) { | 865 | for (i = 0; i < OMAP_MUX_NR_SIDES; i++) { |
869 | if (src->balls[i]) { | 866 | if (src->balls[i]) { |
870 | dst->balls[i] = | 867 | dst->balls[i] = kstrdup(src->balls[i], GFP_KERNEL); |
871 | kmalloc(strlen(src->balls[i]) + 1, | ||
872 | GFP_KERNEL); | ||
873 | if (!dst->balls[i]) | 868 | if (!dst->balls[i]) |
874 | goto free; | 869 | goto free; |
875 | strcpy(dst->balls[i], src->balls[i]); | ||
876 | } | 870 | } |
877 | } | 871 | } |
878 | #endif | 872 | #endif |
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/omap_hwmod_2430_data.c b/arch/arm/mach-omap2/omap_hwmod_2430_data.c index 16743c7d6e8e..408193d8e044 100644 --- a/arch/arm/mach-omap2/omap_hwmod_2430_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_2430_data.c | |||
@@ -192,6 +192,7 @@ static struct omap_hwmod_addr_space omap2430_usbhsotg_addrs[] = { | |||
192 | .pa_end = OMAP243X_HS_BASE + SZ_4K - 1, | 192 | .pa_end = OMAP243X_HS_BASE + SZ_4K - 1, |
193 | .flags = ADDR_TYPE_RT | 193 | .flags = ADDR_TYPE_RT |
194 | }, | 194 | }, |
195 | { } | ||
195 | }; | 196 | }; |
196 | 197 | ||
197 | /* l4_core ->usbhsotg interface */ | 198 | /* l4_core ->usbhsotg interface */ |
diff --git a/arch/arm/mach-omap2/pm.c b/arch/arm/mach-omap2/pm.c index 3feb35911a32..472bf22d5e84 100644 --- a/arch/arm/mach-omap2/pm.c +++ b/arch/arm/mach-omap2/pm.c | |||
@@ -130,7 +130,6 @@ int omap_set_pwrdm_state(struct powerdomain *pwrdm, u32 state) | |||
130 | } else { | 130 | } else { |
131 | hwsup = clkdm_in_hwsup(pwrdm->pwrdm_clkdms[0]); | 131 | hwsup = clkdm_in_hwsup(pwrdm->pwrdm_clkdms[0]); |
132 | clkdm_wakeup(pwrdm->pwrdm_clkdms[0]); | 132 | clkdm_wakeup(pwrdm->pwrdm_clkdms[0]); |
133 | pwrdm_wait_transition(pwrdm); | ||
134 | sleep_switch = FORCEWAKEUP_SWITCH; | 133 | sleep_switch = FORCEWAKEUP_SWITCH; |
135 | } | 134 | } |
136 | } | 135 | } |
@@ -156,7 +155,6 @@ int omap_set_pwrdm_state(struct powerdomain *pwrdm, u32 state) | |||
156 | return ret; | 155 | return ret; |
157 | } | 156 | } |
158 | 157 | ||
159 | pwrdm_wait_transition(pwrdm); | ||
160 | pwrdm_state_switch(pwrdm); | 158 | pwrdm_state_switch(pwrdm); |
161 | err: | 159 | err: |
162 | return ret; | 160 | return ret; |
diff --git a/arch/arm/mach-omap2/powerdomain.c b/arch/arm/mach-omap2/powerdomain.c index 9af08473bf10..ef71fdd40fc4 100644 --- a/arch/arm/mach-omap2/powerdomain.c +++ b/arch/arm/mach-omap2/powerdomain.c | |||
@@ -195,28 +195,35 @@ static int _pwrdm_post_transition_cb(struct powerdomain *pwrdm, void *unused) | |||
195 | 195 | ||
196 | /** | 196 | /** |
197 | * pwrdm_init - set up the powerdomain layer | 197 | * pwrdm_init - set up the powerdomain layer |
198 | * @pwrdm_list: array of struct powerdomain pointers to register | 198 | * @pwrdms: array of struct powerdomain pointers to register |
199 | * @custom_funcs: func pointers for arch specific implementations | 199 | * @custom_funcs: func pointers for arch specific implementations |
200 | * | 200 | * |
201 | * Loop through the array of powerdomains @pwrdm_list, registering all | 201 | * Loop through the array of powerdomains @pwrdms, registering all |
202 | * that are available on the current CPU. If pwrdm_list is supplied | 202 | * that are available on the current CPU. Also, program all |
203 | * and not null, all of the referenced powerdomains will be | 203 | * powerdomain target state as ON; this is to prevent domains from |
204 | * registered. No return value. XXX pwrdm_list is not really a | 204 | * hitting low power states (if bootloader has target states set to |
205 | * "list"; it is an array. Rename appropriately. | 205 | * something other than ON) and potentially even losing context while |
206 | * PM is not fully initialized. The PM late init code can then program | ||
207 | * the desired target state for all the power domains. No return | ||
208 | * value. | ||
206 | */ | 209 | */ |
207 | void pwrdm_init(struct powerdomain **pwrdm_list, struct pwrdm_ops *custom_funcs) | 210 | void pwrdm_init(struct powerdomain **pwrdms, struct pwrdm_ops *custom_funcs) |
208 | { | 211 | { |
209 | struct powerdomain **p = NULL; | 212 | struct powerdomain **p = NULL; |
213 | struct powerdomain *temp_p; | ||
210 | 214 | ||
211 | if (!custom_funcs) | 215 | if (!custom_funcs) |
212 | WARN(1, "powerdomain: No custom pwrdm functions registered\n"); | 216 | WARN(1, "powerdomain: No custom pwrdm functions registered\n"); |
213 | else | 217 | else |
214 | arch_pwrdm = custom_funcs; | 218 | arch_pwrdm = custom_funcs; |
215 | 219 | ||
216 | if (pwrdm_list) { | 220 | if (pwrdms) { |
217 | for (p = pwrdm_list; *p; p++) | 221 | for (p = pwrdms; *p; p++) |
218 | _pwrdm_register(*p); | 222 | _pwrdm_register(*p); |
219 | } | 223 | } |
224 | |||
225 | list_for_each_entry(temp_p, &pwrdm_list, node) | ||
226 | pwrdm_set_next_pwrst(temp_p, PWRDM_POWER_ON); | ||
220 | } | 227 | } |
221 | 228 | ||
222 | /** | 229 | /** |
diff --git a/arch/arm/mach-omap2/smartreflex.c b/arch/arm/mach-omap2/smartreflex.c index 2ce2fb7664bc..f49804f181d4 100644 --- a/arch/arm/mach-omap2/smartreflex.c +++ b/arch/arm/mach-omap2/smartreflex.c | |||
@@ -247,7 +247,7 @@ static void sr_stop_vddautocomp(struct omap_sr *sr) | |||
247 | * driver register and sr device intializtion API's. Only one call | 247 | * driver register and sr device intializtion API's. Only one call |
248 | * will ultimately succeed. | 248 | * will ultimately succeed. |
249 | * | 249 | * |
250 | * Currently this function registers interrrupt handler for a particular SR | 250 | * Currently this function registers interrupt handler for a particular SR |
251 | * if smartreflex class driver is already registered and has | 251 | * if smartreflex class driver is already registered and has |
252 | * requested for interrupts and the SR interrupt line in present. | 252 | * requested for interrupts and the SR interrupt line in present. |
253 | */ | 253 | */ |
@@ -621,7 +621,7 @@ void sr_disable(struct voltagedomain *voltdm) | |||
621 | sr_v2_disable(sr); | 621 | sr_v2_disable(sr); |
622 | } | 622 | } |
623 | 623 | ||
624 | pm_runtime_put_sync(&sr->pdev->dev); | 624 | pm_runtime_put_sync_suspend(&sr->pdev->dev); |
625 | } | 625 | } |
626 | 626 | ||
627 | /** | 627 | /** |
@@ -860,6 +860,7 @@ static int __init omap_sr_probe(struct platform_device *pdev) | |||
860 | irq = platform_get_resource(pdev, IORESOURCE_IRQ, 0); | 860 | irq = platform_get_resource(pdev, IORESOURCE_IRQ, 0); |
861 | 861 | ||
862 | pm_runtime_enable(&pdev->dev); | 862 | pm_runtime_enable(&pdev->dev); |
863 | pm_runtime_irq_safe(&pdev->dev); | ||
863 | 864 | ||
864 | sr_info->pdev = pdev; | 865 | sr_info->pdev = pdev; |
865 | sr_info->srid = pdev->id; | 866 | sr_info->srid = pdev->id; |
diff --git a/arch/arm/mach-omap2/timer.c b/arch/arm/mach-omap2/timer.c index e9640728239b..cf1de7d2630d 100644 --- a/arch/arm/mach-omap2/timer.c +++ b/arch/arm/mach-omap2/timer.c | |||
@@ -293,7 +293,8 @@ static void __init omap2_gp_clocksource_init(int gptimer_id, | |||
293 | pr_info("OMAP clocksource: GPTIMER%d at %lu Hz\n", | 293 | pr_info("OMAP clocksource: GPTIMER%d at %lu Hz\n", |
294 | gptimer_id, clksrc.rate); | 294 | gptimer_id, clksrc.rate); |
295 | 295 | ||
296 | __omap_dm_timer_load_start(clksrc.io_base, OMAP_TIMER_CTRL_ST, 0, 1); | 296 | __omap_dm_timer_load_start(clksrc.io_base, |
297 | OMAP_TIMER_CTRL_ST | OMAP_TIMER_CTRL_AR, 0, 1); | ||
297 | init_sched_clock(&cd, dmtimer_update_sched_clock, 32, clksrc.rate); | 298 | init_sched_clock(&cd, dmtimer_update_sched_clock, 32, clksrc.rate); |
298 | 299 | ||
299 | if (clocksource_register_hz(&clocksource_gpt, clksrc.rate)) | 300 | if (clocksource_register_hz(&clocksource_gpt, clksrc.rate)) |
diff --git a/arch/arm/mach-omap2/twl-common.c b/arch/arm/mach-omap2/twl-common.c index 2543342dbccb..daa056ed8738 100644 --- a/arch/arm/mach-omap2/twl-common.c +++ b/arch/arm/mach-omap2/twl-common.c | |||
@@ -48,14 +48,7 @@ void __init omap_pmic_init(int bus, u32 clkrate, | |||
48 | omap_register_i2c_bus(bus, clkrate, &pmic_i2c_board_info, 1); | 48 | omap_register_i2c_bus(bus, clkrate, &pmic_i2c_board_info, 1); |
49 | } | 49 | } |
50 | 50 | ||
51 | static struct twl4030_usb_data omap4_usb_pdata = { | 51 | #if defined(CONFIG_ARCH_OMAP3) |
52 | .phy_init = omap4430_phy_init, | ||
53 | .phy_exit = omap4430_phy_exit, | ||
54 | .phy_power = omap4430_phy_power, | ||
55 | .phy_set_clock = omap4430_phy_set_clk, | ||
56 | .phy_suspend = omap4430_phy_suspend, | ||
57 | }; | ||
58 | |||
59 | static struct twl4030_usb_data omap3_usb_pdata = { | 52 | static struct twl4030_usb_data omap3_usb_pdata = { |
60 | .usb_mode = T2_USB_MODE_ULPI, | 53 | .usb_mode = T2_USB_MODE_ULPI, |
61 | }; | 54 | }; |
@@ -122,6 +115,45 @@ static struct regulator_init_data omap3_vpll2_idata = { | |||
122 | .consumer_supplies = omap3_vpll2_supplies, | 115 | .consumer_supplies = omap3_vpll2_supplies, |
123 | }; | 116 | }; |
124 | 117 | ||
118 | void __init omap3_pmic_get_config(struct twl4030_platform_data *pmic_data, | ||
119 | u32 pdata_flags, u32 regulators_flags) | ||
120 | { | ||
121 | if (!pmic_data->irq_base) | ||
122 | pmic_data->irq_base = TWL4030_IRQ_BASE; | ||
123 | if (!pmic_data->irq_end) | ||
124 | pmic_data->irq_end = TWL4030_IRQ_END; | ||
125 | |||
126 | /* Common platform data configurations */ | ||
127 | if (pdata_flags & TWL_COMMON_PDATA_USB && !pmic_data->usb) | ||
128 | pmic_data->usb = &omap3_usb_pdata; | ||
129 | |||
130 | if (pdata_flags & TWL_COMMON_PDATA_BCI && !pmic_data->bci) | ||
131 | pmic_data->bci = &omap3_bci_pdata; | ||
132 | |||
133 | if (pdata_flags & TWL_COMMON_PDATA_MADC && !pmic_data->madc) | ||
134 | pmic_data->madc = &omap3_madc_pdata; | ||
135 | |||
136 | if (pdata_flags & TWL_COMMON_PDATA_AUDIO && !pmic_data->audio) | ||
137 | pmic_data->audio = &omap3_audio_pdata; | ||
138 | |||
139 | /* Common regulator configurations */ | ||
140 | if (regulators_flags & TWL_COMMON_REGULATOR_VDAC && !pmic_data->vdac) | ||
141 | pmic_data->vdac = &omap3_vdac_idata; | ||
142 | |||
143 | if (regulators_flags & TWL_COMMON_REGULATOR_VPLL2 && !pmic_data->vpll2) | ||
144 | pmic_data->vpll2 = &omap3_vpll2_idata; | ||
145 | } | ||
146 | #endif /* CONFIG_ARCH_OMAP3 */ | ||
147 | |||
148 | #if defined(CONFIG_ARCH_OMAP4) | ||
149 | static struct twl4030_usb_data omap4_usb_pdata = { | ||
150 | .phy_init = omap4430_phy_init, | ||
151 | .phy_exit = omap4430_phy_exit, | ||
152 | .phy_power = omap4430_phy_power, | ||
153 | .phy_set_clock = omap4430_phy_set_clk, | ||
154 | .phy_suspend = omap4430_phy_suspend, | ||
155 | }; | ||
156 | |||
125 | static struct regulator_init_data omap4_vdac_idata = { | 157 | static struct regulator_init_data omap4_vdac_idata = { |
126 | .constraints = { | 158 | .constraints = { |
127 | .min_uV = 1800000, | 159 | .min_uV = 1800000, |
@@ -273,32 +305,4 @@ void __init omap4_pmic_get_config(struct twl4030_platform_data *pmic_data, | |||
273 | !pmic_data->clk32kg) | 305 | !pmic_data->clk32kg) |
274 | pmic_data->clk32kg = &omap4_clk32kg_idata; | 306 | pmic_data->clk32kg = &omap4_clk32kg_idata; |
275 | } | 307 | } |
276 | 308 | #endif /* CONFIG_ARCH_OMAP4 */ | |
277 | void __init omap3_pmic_get_config(struct twl4030_platform_data *pmic_data, | ||
278 | u32 pdata_flags, u32 regulators_flags) | ||
279 | { | ||
280 | if (!pmic_data->irq_base) | ||
281 | pmic_data->irq_base = TWL4030_IRQ_BASE; | ||
282 | if (!pmic_data->irq_end) | ||
283 | pmic_data->irq_end = TWL4030_IRQ_END; | ||
284 | |||
285 | /* Common platform data configurations */ | ||
286 | if (pdata_flags & TWL_COMMON_PDATA_USB && !pmic_data->usb) | ||
287 | pmic_data->usb = &omap3_usb_pdata; | ||
288 | |||
289 | if (pdata_flags & TWL_COMMON_PDATA_BCI && !pmic_data->bci) | ||
290 | pmic_data->bci = &omap3_bci_pdata; | ||
291 | |||
292 | if (pdata_flags & TWL_COMMON_PDATA_MADC && !pmic_data->madc) | ||
293 | pmic_data->madc = &omap3_madc_pdata; | ||
294 | |||
295 | if (pdata_flags & TWL_COMMON_PDATA_AUDIO && !pmic_data->audio) | ||
296 | pmic_data->audio = &omap3_audio_pdata; | ||
297 | |||
298 | /* Common regulator configurations */ | ||
299 | if (regulators_flags & TWL_COMMON_REGULATOR_VDAC && !pmic_data->vdac) | ||
300 | pmic_data->vdac = &omap3_vdac_idata; | ||
301 | |||
302 | if (regulators_flags & TWL_COMMON_REGULATOR_VPLL2 && !pmic_data->vpll2) | ||
303 | pmic_data->vpll2 = &omap3_vpll2_idata; | ||
304 | } | ||
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-orion5x/dns323-setup.c b/arch/arm/mach-orion5x/dns323-setup.c index 64e68fa85b0e..6fb4908e998b 100644 --- a/arch/arm/mach-orion5x/dns323-setup.c +++ b/arch/arm/mach-orion5x/dns323-setup.c | |||
@@ -76,7 +76,7 @@ static int __init dns323_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) | |||
76 | /* | 76 | /* |
77 | * Check for devices with hard-wired IRQs. | 77 | * Check for devices with hard-wired IRQs. |
78 | */ | 78 | */ |
79 | irq = orion5x_pci_map_irq(const dev, slot, pin); | 79 | irq = orion5x_pci_map_irq(dev, slot, pin); |
80 | if (irq != -1) | 80 | if (irq != -1) |
81 | return irq; | 81 | return irq; |
82 | 82 | ||
diff --git a/arch/arm/mach-orion5x/pci.c b/arch/arm/mach-orion5x/pci.c index 28b8760ab9fa..bc4a920e26ee 100644 --- a/arch/arm/mach-orion5x/pci.c +++ b/arch/arm/mach-orion5x/pci.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/pci.h> | 14 | #include <linux/pci.h> |
15 | #include <linux/slab.h> | 15 | #include <linux/slab.h> |
16 | #include <linux/mbus.h> | 16 | #include <linux/mbus.h> |
17 | #include <video/vga.h> | ||
17 | #include <asm/irq.h> | 18 | #include <asm/irq.h> |
18 | #include <asm/mach/pci.h> | 19 | #include <asm/mach/pci.h> |
19 | #include <plat/pcie.h> | 20 | #include <plat/pcie.h> |
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-prima2/clock.c b/arch/arm/mach-prima2/clock.c index f9a2aaf63f71..615a4e75ceab 100644 --- a/arch/arm/mach-prima2/clock.c +++ b/arch/arm/mach-prima2/clock.c | |||
@@ -481,6 +481,7 @@ static void __init sirfsoc_clk_init(void) | |||
481 | 481 | ||
482 | static struct of_device_id clkc_ids[] = { | 482 | static struct of_device_id clkc_ids[] = { |
483 | { .compatible = "sirf,prima2-clkc" }, | 483 | { .compatible = "sirf,prima2-clkc" }, |
484 | {}, | ||
484 | }; | 485 | }; |
485 | 486 | ||
486 | void __init sirfsoc_of_clk_init(void) | 487 | void __init sirfsoc_of_clk_init(void) |
diff --git a/arch/arm/mach-prima2/irq.c b/arch/arm/mach-prima2/irq.c index c3404cbb6ff7..7af254d046ba 100644 --- a/arch/arm/mach-prima2/irq.c +++ b/arch/arm/mach-prima2/irq.c | |||
@@ -51,6 +51,7 @@ static __init void sirfsoc_irq_init(void) | |||
51 | 51 | ||
52 | static struct of_device_id intc_ids[] = { | 52 | static struct of_device_id intc_ids[] = { |
53 | { .compatible = "sirf,prima2-intc" }, | 53 | { .compatible = "sirf,prima2-intc" }, |
54 | {}, | ||
54 | }; | 55 | }; |
55 | 56 | ||
56 | void __init sirfsoc_of_irq_init(void) | 57 | void __init sirfsoc_of_irq_init(void) |
diff --git a/arch/arm/mach-prima2/rstc.c b/arch/arm/mach-prima2/rstc.c index d074786e83d4..492cfa8d2610 100644 --- a/arch/arm/mach-prima2/rstc.c +++ b/arch/arm/mach-prima2/rstc.c | |||
@@ -19,6 +19,7 @@ static DEFINE_MUTEX(rstc_lock); | |||
19 | 19 | ||
20 | static struct of_device_id rstc_ids[] = { | 20 | static struct of_device_id rstc_ids[] = { |
21 | { .compatible = "sirf,prima2-rstc" }, | 21 | { .compatible = "sirf,prima2-rstc" }, |
22 | {}, | ||
22 | }; | 23 | }; |
23 | 24 | ||
24 | static int __init sirfsoc_of_rstc_init(void) | 25 | static int __init sirfsoc_of_rstc_init(void) |
diff --git a/arch/arm/mach-prima2/timer.c b/arch/arm/mach-prima2/timer.c index 44027f34a88a..ed7ec48d11da 100644 --- a/arch/arm/mach-prima2/timer.c +++ b/arch/arm/mach-prima2/timer.c | |||
@@ -190,6 +190,7 @@ static void __init sirfsoc_timer_init(void) | |||
190 | 190 | ||
191 | static struct of_device_id timer_ids[] = { | 191 | static struct of_device_id timer_ids[] = { |
192 | { .compatible = "sirf,prima2-tick" }, | 192 | { .compatible = "sirf,prima2-tick" }, |
193 | {}, | ||
193 | }; | 194 | }; |
194 | 195 | ||
195 | static void __init sirfsoc_of_timer_map(void) | 196 | static void __init sirfsoc_of_timer_map(void) |
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 d493a230addf..8d9200f92268 100644 --- a/arch/arm/mach-pxa/irq.c +++ b/arch/arm/mach-pxa/irq.c | |||
@@ -18,6 +18,8 @@ | |||
18 | #include <linux/io.h> | 18 | #include <linux/io.h> |
19 | #include <linux/irq.h> | 19 | #include <linux/irq.h> |
20 | 20 | ||
21 | #include <asm/exception.h> | ||
22 | |||
21 | #include <mach/hardware.h> | 23 | #include <mach/hardware.h> |
22 | #include <mach/irqs.h> | 24 | #include <mach/irqs.h> |
23 | #include <mach/gpio-pxa.h> | 25 | #include <mach/gpio-pxa.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-pxa/xcep.c b/arch/arm/mach-pxa/xcep.c index acc600f5e72f..937c42845df9 100644 --- a/arch/arm/mach-pxa/xcep.c +++ b/arch/arm/mach-pxa/xcep.c | |||
@@ -142,8 +142,7 @@ static struct platform_device *devices[] __initdata = { | |||
142 | 142 | ||
143 | /* We have to state that there are HWMON devices on the I2C bus on XCEP. | 143 | /* We have to state that there are HWMON devices on the I2C bus on XCEP. |
144 | * Drivers for HWMON verify capabilities of the adapter when loading and | 144 | * Drivers for HWMON verify capabilities of the adapter when loading and |
145 | * refuse to attach if the adapter doesn't support HWMON class of devices. | 145 | * refuse to attach if the adapter doesn't support HWMON class of devices. */ |
146 | * See also Documentation/i2c/porting-clients. */ | ||
147 | static struct i2c_pxa_platform_data xcep_i2c_platform_data = { | 146 | static struct i2c_pxa_platform_data xcep_i2c_platform_data = { |
148 | .class = I2C_CLASS_HWMON | 147 | .class = I2C_CLASS_HWMON |
149 | }; | 148 | }; |
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/include/mach/system.h b/arch/arm/mach-realview/include/mach/system.h index a30f2e3ec178..6657ff231161 100644 --- a/arch/arm/mach-realview/include/mach/system.h +++ b/arch/arm/mach-realview/include/mach/system.h | |||
@@ -44,6 +44,7 @@ static inline void arch_reset(char mode, const char *cmd) | |||
44 | */ | 44 | */ |
45 | if (realview_reset) | 45 | if (realview_reset) |
46 | realview_reset(mode); | 46 | realview_reset(mode); |
47 | dsb(); | ||
47 | } | 48 | } |
48 | 49 | ||
49 | #endif | 50 | #endif |
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/dev-uart.c b/arch/arm/mach-s3c64xx/dev-uart.c index f797f748b999..c681b99eda08 100644 --- a/arch/arm/mach-s3c64xx/dev-uart.c +++ b/arch/arm/mach-s3c64xx/dev-uart.c | |||
@@ -37,21 +37,10 @@ static struct resource s3c64xx_uart0_resource[] = { | |||
37 | .flags = IORESOURCE_MEM, | 37 | .flags = IORESOURCE_MEM, |
38 | }, | 38 | }, |
39 | [1] = { | 39 | [1] = { |
40 | .start = IRQ_S3CUART_RX0, | 40 | .start = IRQ_UART0, |
41 | .end = IRQ_S3CUART_RX0, | 41 | .end = IRQ_UART0, |
42 | .flags = IORESOURCE_IRQ, | 42 | .flags = IORESOURCE_IRQ, |
43 | }, | 43 | }, |
44 | [2] = { | ||
45 | .start = IRQ_S3CUART_TX0, | ||
46 | .end = IRQ_S3CUART_TX0, | ||
47 | .flags = IORESOURCE_IRQ, | ||
48 | |||
49 | }, | ||
50 | [3] = { | ||
51 | .start = IRQ_S3CUART_ERR0, | ||
52 | .end = IRQ_S3CUART_ERR0, | ||
53 | .flags = IORESOURCE_IRQ, | ||
54 | } | ||
55 | }; | 44 | }; |
56 | 45 | ||
57 | static struct resource s3c64xx_uart1_resource[] = { | 46 | static struct resource s3c64xx_uart1_resource[] = { |
@@ -61,19 +50,8 @@ static struct resource s3c64xx_uart1_resource[] = { | |||
61 | .flags = IORESOURCE_MEM, | 50 | .flags = IORESOURCE_MEM, |
62 | }, | 51 | }, |
63 | [1] = { | 52 | [1] = { |
64 | .start = IRQ_S3CUART_RX1, | 53 | .start = IRQ_UART1, |
65 | .end = IRQ_S3CUART_RX1, | 54 | .end = IRQ_UART1, |
66 | .flags = IORESOURCE_IRQ, | ||
67 | }, | ||
68 | [2] = { | ||
69 | .start = IRQ_S3CUART_TX1, | ||
70 | .end = IRQ_S3CUART_TX1, | ||
71 | .flags = IORESOURCE_IRQ, | ||
72 | |||
73 | }, | ||
74 | [3] = { | ||
75 | .start = IRQ_S3CUART_ERR1, | ||
76 | .end = IRQ_S3CUART_ERR1, | ||
77 | .flags = IORESOURCE_IRQ, | 55 | .flags = IORESOURCE_IRQ, |
78 | }, | 56 | }, |
79 | }; | 57 | }; |
@@ -85,19 +63,8 @@ static struct resource s3c6xx_uart2_resource[] = { | |||
85 | .flags = IORESOURCE_MEM, | 63 | .flags = IORESOURCE_MEM, |
86 | }, | 64 | }, |
87 | [1] = { | 65 | [1] = { |
88 | .start = IRQ_S3CUART_RX2, | 66 | .start = IRQ_UART2, |
89 | .end = IRQ_S3CUART_RX2, | 67 | .end = IRQ_UART2, |
90 | .flags = IORESOURCE_IRQ, | ||
91 | }, | ||
92 | [2] = { | ||
93 | .start = IRQ_S3CUART_TX2, | ||
94 | .end = IRQ_S3CUART_TX2, | ||
95 | .flags = IORESOURCE_IRQ, | ||
96 | |||
97 | }, | ||
98 | [3] = { | ||
99 | .start = IRQ_S3CUART_ERR2, | ||
100 | .end = IRQ_S3CUART_ERR2, | ||
101 | .flags = IORESOURCE_IRQ, | 68 | .flags = IORESOURCE_IRQ, |
102 | }, | 69 | }, |
103 | }; | 70 | }; |
@@ -109,19 +76,8 @@ static struct resource s3c64xx_uart3_resource[] = { | |||
109 | .flags = IORESOURCE_MEM, | 76 | .flags = IORESOURCE_MEM, |
110 | }, | 77 | }, |
111 | [1] = { | 78 | [1] = { |
112 | .start = IRQ_S3CUART_RX3, | 79 | .start = IRQ_UART3, |
113 | .end = IRQ_S3CUART_RX3, | 80 | .end = IRQ_UART3, |
114 | .flags = IORESOURCE_IRQ, | ||
115 | }, | ||
116 | [2] = { | ||
117 | .start = IRQ_S3CUART_TX3, | ||
118 | .end = IRQ_S3CUART_TX3, | ||
119 | .flags = IORESOURCE_IRQ, | ||
120 | |||
121 | }, | ||
122 | [3] = { | ||
123 | .start = IRQ_S3CUART_ERR3, | ||
124 | .end = IRQ_S3CUART_ERR3, | ||
125 | .flags = IORESOURCE_IRQ, | 81 | .flags = IORESOURCE_IRQ, |
126 | }, | 82 | }, |
127 | }; | 83 | }; |
diff --git a/arch/arm/mach-s3c64xx/include/mach/irqs.h b/arch/arm/mach-s3c64xx/include/mach/irqs.h index c026f67a80de..443f85b3c203 100644 --- a/arch/arm/mach-s3c64xx/include/mach/irqs.h +++ b/arch/arm/mach-s3c64xx/include/mach/irqs.h | |||
@@ -27,36 +27,6 @@ | |||
27 | #define IRQ_VIC0_BASE S3C_IRQ(0) | 27 | #define IRQ_VIC0_BASE S3C_IRQ(0) |
28 | #define IRQ_VIC1_BASE S3C_IRQ(32) | 28 | #define IRQ_VIC1_BASE S3C_IRQ(32) |
29 | 29 | ||
30 | /* UART interrupts, each UART has 4 intterupts per channel so | ||
31 | * use the space between the ISA and S3C main interrupts. Note, these | ||
32 | * are not in the same order as the S3C24XX series! */ | ||
33 | |||
34 | #define IRQ_S3CUART_BASE0 (16) | ||
35 | #define IRQ_S3CUART_BASE1 (20) | ||
36 | #define IRQ_S3CUART_BASE2 (24) | ||
37 | #define IRQ_S3CUART_BASE3 (28) | ||
38 | |||
39 | #define UART_IRQ_RXD (0) | ||
40 | #define UART_IRQ_ERR (1) | ||
41 | #define UART_IRQ_TXD (2) | ||
42 | #define UART_IRQ_MODEM (3) | ||
43 | |||
44 | #define IRQ_S3CUART_RX0 (IRQ_S3CUART_BASE0 + UART_IRQ_RXD) | ||
45 | #define IRQ_S3CUART_TX0 (IRQ_S3CUART_BASE0 + UART_IRQ_TXD) | ||
46 | #define IRQ_S3CUART_ERR0 (IRQ_S3CUART_BASE0 + UART_IRQ_ERR) | ||
47 | |||
48 | #define IRQ_S3CUART_RX1 (IRQ_S3CUART_BASE1 + UART_IRQ_RXD) | ||
49 | #define IRQ_S3CUART_TX1 (IRQ_S3CUART_BASE1 + UART_IRQ_TXD) | ||
50 | #define IRQ_S3CUART_ERR1 (IRQ_S3CUART_BASE1 + UART_IRQ_ERR) | ||
51 | |||
52 | #define IRQ_S3CUART_RX2 (IRQ_S3CUART_BASE2 + UART_IRQ_RXD) | ||
53 | #define IRQ_S3CUART_TX2 (IRQ_S3CUART_BASE2 + UART_IRQ_TXD) | ||
54 | #define IRQ_S3CUART_ERR2 (IRQ_S3CUART_BASE2 + UART_IRQ_ERR) | ||
55 | |||
56 | #define IRQ_S3CUART_RX3 (IRQ_S3CUART_BASE3 + UART_IRQ_RXD) | ||
57 | #define IRQ_S3CUART_TX3 (IRQ_S3CUART_BASE3 + UART_IRQ_TXD) | ||
58 | #define IRQ_S3CUART_ERR3 (IRQ_S3CUART_BASE3 + UART_IRQ_ERR) | ||
59 | |||
60 | /* VIC based IRQs */ | 30 | /* VIC based IRQs */ |
61 | 31 | ||
62 | #define S3C64XX_IRQ_VIC0(x) (IRQ_VIC0_BASE + (x)) | 32 | #define S3C64XX_IRQ_VIC0(x) (IRQ_VIC0_BASE + (x)) |
diff --git a/arch/arm/mach-s3c64xx/irq.c b/arch/arm/mach-s3c64xx/irq.c index 75d9a0e49193..b07357e94958 100644 --- a/arch/arm/mach-s3c64xx/irq.c +++ b/arch/arm/mach-s3c64xx/irq.c | |||
@@ -25,29 +25,6 @@ | |||
25 | #include <plat/irq-uart.h> | 25 | #include <plat/irq-uart.h> |
26 | #include <plat/cpu.h> | 26 | #include <plat/cpu.h> |
27 | 27 | ||
28 | static struct s3c_uart_irq uart_irqs[] = { | ||
29 | [0] = { | ||
30 | .regs = S3C_VA_UART0, | ||
31 | .base_irq = IRQ_S3CUART_BASE0, | ||
32 | .parent_irq = IRQ_UART0, | ||
33 | }, | ||
34 | [1] = { | ||
35 | .regs = S3C_VA_UART1, | ||
36 | .base_irq = IRQ_S3CUART_BASE1, | ||
37 | .parent_irq = IRQ_UART1, | ||
38 | }, | ||
39 | [2] = { | ||
40 | .regs = S3C_VA_UART2, | ||
41 | .base_irq = IRQ_S3CUART_BASE2, | ||
42 | .parent_irq = IRQ_UART2, | ||
43 | }, | ||
44 | [3] = { | ||
45 | .regs = S3C_VA_UART3, | ||
46 | .base_irq = IRQ_S3CUART_BASE3, | ||
47 | .parent_irq = IRQ_UART3, | ||
48 | }, | ||
49 | }; | ||
50 | |||
51 | /* setup the sources the vic should advertise resume for, even though it | 28 | /* setup the sources the vic should advertise resume for, even though it |
52 | * is not doing the wake (set_irq_wake needs to be valid) */ | 29 | * is not doing the wake (set_irq_wake needs to be valid) */ |
53 | #define IRQ_VIC0_RESUME (1 << (IRQ_RTC_TIC - IRQ_VIC0_BASE)) | 30 | #define IRQ_VIC0_RESUME (1 << (IRQ_RTC_TIC - IRQ_VIC0_BASE)) |
@@ -67,6 +44,4 @@ void __init s3c64xx_init_irq(u32 vic0_valid, u32 vic1_valid) | |||
67 | 44 | ||
68 | /* add the timer sub-irqs */ | 45 | /* add the timer sub-irqs */ |
69 | s3c_init_vic_timer_irq(5, IRQ_TIMER0); | 46 | s3c_init_vic_timer_irq(5, IRQ_TIMER0); |
70 | |||
71 | s3c_init_uart_irqs(uart_irqs, ARRAY_SIZE(uart_irqs)); | ||
72 | } | 47 | } |
diff --git a/arch/arm/mach-s3c64xx/mach-crag6410.c b/arch/arm/mach-s3c64xx/mach-crag6410.c index 9026249233ad..af0c2fe1ea37 100644 --- a/arch/arm/mach-s3c64xx/mach-crag6410.c +++ b/arch/arm/mach-s3c64xx/mach-crag6410.c | |||
@@ -65,7 +65,7 @@ | |||
65 | #include <plat/iic.h> | 65 | #include <plat/iic.h> |
66 | #include <plat/pm.h> | 66 | #include <plat/pm.h> |
67 | 67 | ||
68 | #include <sound/wm8915.h> | 68 | #include <sound/wm8996.h> |
69 | #include <sound/wm8962.h> | 69 | #include <sound/wm8962.h> |
70 | #include <sound/wm9081.h> | 70 | #include <sound/wm9081.h> |
71 | 71 | ||
@@ -614,7 +614,7 @@ static struct wm831x_pdata glenfarclas_pmic_pdata __initdata = { | |||
614 | .disable_touch = true, | 614 | .disable_touch = true, |
615 | }; | 615 | }; |
616 | 616 | ||
617 | static struct wm8915_retune_mobile_config wm8915_retune[] = { | 617 | static struct wm8996_retune_mobile_config wm8996_retune[] = { |
618 | { | 618 | { |
619 | .name = "Sub LPF", | 619 | .name = "Sub LPF", |
620 | .rate = 48000, | 620 | .rate = 48000, |
@@ -635,12 +635,12 @@ static struct wm8915_retune_mobile_config wm8915_retune[] = { | |||
635 | }, | 635 | }, |
636 | }; | 636 | }; |
637 | 637 | ||
638 | static struct wm8915_pdata wm8915_pdata __initdata = { | 638 | static struct wm8996_pdata wm8996_pdata __initdata = { |
639 | .ldo_ena = S3C64XX_GPN(7), | 639 | .ldo_ena = S3C64XX_GPN(7), |
640 | .gpio_base = CODEC_GPIO_BASE, | 640 | .gpio_base = CODEC_GPIO_BASE, |
641 | .micdet_def = 1, | 641 | .micdet_def = 1, |
642 | .inl_mode = WM8915_DIFFERRENTIAL_1, | 642 | .inl_mode = WM8996_DIFFERRENTIAL_1, |
643 | .inr_mode = WM8915_DIFFERRENTIAL_1, | 643 | .inr_mode = WM8996_DIFFERRENTIAL_1, |
644 | 644 | ||
645 | .irq_flags = IRQF_TRIGGER_RISING, | 645 | .irq_flags = IRQF_TRIGGER_RISING, |
646 | 646 | ||
@@ -652,8 +652,8 @@ static struct wm8915_pdata wm8915_pdata __initdata = { | |||
652 | 0x020e, /* GPIO5 == CLKOUT */ | 652 | 0x020e, /* GPIO5 == CLKOUT */ |
653 | }, | 653 | }, |
654 | 654 | ||
655 | .retune_mobile_cfgs = wm8915_retune, | 655 | .retune_mobile_cfgs = wm8996_retune, |
656 | .num_retune_mobile_cfgs = ARRAY_SIZE(wm8915_retune), | 656 | .num_retune_mobile_cfgs = ARRAY_SIZE(wm8996_retune), |
657 | }; | 657 | }; |
658 | 658 | ||
659 | static struct wm8962_pdata wm8962_pdata __initdata = { | 659 | static struct wm8962_pdata wm8962_pdata __initdata = { |
@@ -679,8 +679,8 @@ static struct i2c_board_info i2c_devs1[] __initdata = { | |||
679 | .platform_data = &glenfarclas_pmic_pdata }, | 679 | .platform_data = &glenfarclas_pmic_pdata }, |
680 | 680 | ||
681 | { I2C_BOARD_INFO("wm1250-ev1", 0x27) }, | 681 | { I2C_BOARD_INFO("wm1250-ev1", 0x27) }, |
682 | { I2C_BOARD_INFO("wm8915", 0x1a), | 682 | { I2C_BOARD_INFO("wm8996", 0x1a), |
683 | .platform_data = &wm8915_pdata, | 683 | .platform_data = &wm8996_pdata, |
684 | .irq = GLENFARCLAS_PMIC_IRQ_BASE + WM831X_IRQ_GPIO_2, | 684 | .irq = GLENFARCLAS_PMIC_IRQ_BASE + WM831X_IRQ_GPIO_2, |
685 | }, | 685 | }, |
686 | { I2C_BOARD_INFO("wm9081", 0x6c), | 686 | { I2C_BOARD_INFO("wm9081", 0x6c), |
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-s3c64xx/pm.c b/arch/arm/mach-s3c64xx/pm.c index 8bad64370689..055e2858b0dd 100644 --- a/arch/arm/mach-s3c64xx/pm.c +++ b/arch/arm/mach-s3c64xx/pm.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/suspend.h> | 16 | #include <linux/suspend.h> |
17 | #include <linux/serial_core.h> | 17 | #include <linux/serial_core.h> |
18 | #include <linux/io.h> | 18 | #include <linux/io.h> |
19 | #include <linux/gpio.h> | ||
19 | 20 | ||
20 | #include <mach/map.h> | 21 | #include <mach/map.h> |
21 | #include <mach/irqs.h> | 22 | #include <mach/irqs.h> |
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-s5p64x0/irq-eint.c b/arch/arm/mach-s5p64x0/irq-eint.c index 69ed4545112b..fe7380f5c3cd 100644 --- a/arch/arm/mach-s5p64x0/irq-eint.c +++ b/arch/arm/mach-s5p64x0/irq-eint.c | |||
@@ -129,7 +129,7 @@ static int s5p64x0_alloc_gc(void) | |||
129 | } | 129 | } |
130 | 130 | ||
131 | ct = gc->chip_types; | 131 | ct = gc->chip_types; |
132 | ct->chip.irq_ack = irq_gc_ack; | 132 | ct->chip.irq_ack = irq_gc_ack_set_bit; |
133 | ct->chip.irq_mask = irq_gc_mask_set_bit; | 133 | ct->chip.irq_mask = irq_gc_mask_set_bit; |
134 | ct->chip.irq_unmask = irq_gc_mask_clr_bit; | 134 | ct->chip.irq_unmask = irq_gc_mask_clr_bit; |
135 | ct->chip.irq_set_type = s5p64x0_irq_eint_set_type; | 135 | ct->chip.irq_set_type = s5p64x0_irq_eint_set_type; |
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-s5pv210/pm.c b/arch/arm/mach-s5pv210/pm.c index 309e388a8a83..f149d278377b 100644 --- a/arch/arm/mach-s5pv210/pm.c +++ b/arch/arm/mach-s5pv210/pm.c | |||
@@ -88,7 +88,7 @@ static struct sleep_save s5pv210_core_save[] = { | |||
88 | SAVE_ITEM(S3C2410_TCNTO(0)), | 88 | SAVE_ITEM(S3C2410_TCNTO(0)), |
89 | }; | 89 | }; |
90 | 90 | ||
91 | void s5pv210_cpu_suspend(unsigned long arg) | 91 | static int s5pv210_cpu_suspend(unsigned long arg) |
92 | { | 92 | { |
93 | unsigned long tmp; | 93 | unsigned long tmp; |
94 | 94 | ||
diff --git a/arch/arm/mach-sa1100/Makefile b/arch/arm/mach-sa1100/Makefile index 73a5c6431792..ed7408d3216c 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/pci-nanoengine.c b/arch/arm/mach-sa1100/pci-nanoengine.c index 964c6c3cd7a6..dd39fee59549 100644 --- a/arch/arm/mach-sa1100/pci-nanoengine.c +++ b/arch/arm/mach-sa1100/pci-nanoengine.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #include <asm/mach-types.h> | 28 | #include <asm/mach-types.h> |
29 | 29 | ||
30 | #include <mach/nanoengine.h> | 30 | #include <mach/nanoengine.h> |
31 | #include <mach/hardware.h> | ||
31 | 32 | ||
32 | static DEFINE_SPINLOCK(nano_lock); | 33 | static DEFINE_SPINLOCK(nano_lock); |
33 | 34 | ||
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-shark/leds.c b/arch/arm/mach-shark/leds.c index c9e32de4adf9..ccd49189bbd0 100644 --- a/arch/arm/mach-shark/leds.c +++ b/arch/arm/mach-shark/leds.c | |||
@@ -36,7 +36,7 @@ static char led_state; | |||
36 | static short hw_led_state; | 36 | static short hw_led_state; |
37 | static short saved_state; | 37 | static short saved_state; |
38 | 38 | ||
39 | static DEFINE_SPINLOCK(leds_lock); | 39 | static DEFINE_RAW_SPINLOCK(leds_lock); |
40 | 40 | ||
41 | short sequoia_read(int addr) { | 41 | short sequoia_read(int addr) { |
42 | outw(addr,0x24); | 42 | outw(addr,0x24); |
@@ -52,7 +52,7 @@ static void sequoia_leds_event(led_event_t evt) | |||
52 | { | 52 | { |
53 | unsigned long flags; | 53 | unsigned long flags; |
54 | 54 | ||
55 | spin_lock_irqsave(&leds_lock, flags); | 55 | raw_spin_lock_irqsave(&leds_lock, flags); |
56 | 56 | ||
57 | hw_led_state = sequoia_read(0x09); | 57 | hw_led_state = sequoia_read(0x09); |
58 | 58 | ||
@@ -144,7 +144,7 @@ static void sequoia_leds_event(led_event_t evt) | |||
144 | if (led_state & LED_STATE_ENABLED) | 144 | if (led_state & LED_STATE_ENABLED) |
145 | sequoia_write(hw_led_state,0x09); | 145 | sequoia_write(hw_led_state,0x09); |
146 | 146 | ||
147 | spin_unlock_irqrestore(&leds_lock, flags); | 147 | raw_spin_unlock_irqrestore(&leds_lock, flags); |
148 | } | 148 | } |
149 | 149 | ||
150 | static int __init leds_init(void) | 150 | static int __init leds_init(void) |
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/board-ag5evm.c b/arch/arm/mach-shmobile/board-ag5evm.c index ce5c2513c6ce..cdfdd624d21d 100644 --- a/arch/arm/mach-shmobile/board-ag5evm.c +++ b/arch/arm/mach-shmobile/board-ag5evm.c | |||
@@ -341,6 +341,7 @@ static struct platform_device mipidsi0_device = { | |||
341 | static struct sh_mobile_sdhi_info sdhi0_info = { | 341 | static struct sh_mobile_sdhi_info sdhi0_info = { |
342 | .dma_slave_tx = SHDMA_SLAVE_SDHI0_TX, | 342 | .dma_slave_tx = SHDMA_SLAVE_SDHI0_TX, |
343 | .dma_slave_rx = SHDMA_SLAVE_SDHI0_RX, | 343 | .dma_slave_rx = SHDMA_SLAVE_SDHI0_RX, |
344 | .tmio_flags = TMIO_MMC_HAS_IDLE_WAIT, | ||
344 | .tmio_caps = MMC_CAP_SD_HIGHSPEED, | 345 | .tmio_caps = MMC_CAP_SD_HIGHSPEED, |
345 | .tmio_ocr_mask = MMC_VDD_27_28 | MMC_VDD_28_29, | 346 | .tmio_ocr_mask = MMC_VDD_27_28 | MMC_VDD_28_29, |
346 | }; | 347 | }; |
@@ -382,7 +383,7 @@ void ag5evm_sdhi1_set_pwr(struct platform_device *pdev, int state) | |||
382 | } | 383 | } |
383 | 384 | ||
384 | static struct sh_mobile_sdhi_info sh_sdhi1_info = { | 385 | static struct sh_mobile_sdhi_info sh_sdhi1_info = { |
385 | .tmio_flags = TMIO_MMC_WRPROTECT_DISABLE, | 386 | .tmio_flags = TMIO_MMC_WRPROTECT_DISABLE | TMIO_MMC_HAS_IDLE_WAIT, |
386 | .tmio_caps = MMC_CAP_NONREMOVABLE | MMC_CAP_SDIO_IRQ, | 387 | .tmio_caps = MMC_CAP_NONREMOVABLE | MMC_CAP_SDIO_IRQ, |
387 | .tmio_ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34, | 388 | .tmio_ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34, |
388 | .set_pwr = ag5evm_sdhi1_set_pwr, | 389 | .set_pwr = ag5evm_sdhi1_set_pwr, |
diff --git a/arch/arm/mach-shmobile/board-ap4evb.c b/arch/arm/mach-shmobile/board-ap4evb.c index 9e0856b2f9e9..7e90d064ebcb 100644 --- a/arch/arm/mach-shmobile/board-ap4evb.c +++ b/arch/arm/mach-shmobile/board-ap4evb.c | |||
@@ -42,6 +42,7 @@ | |||
42 | #include <linux/leds.h> | 42 | #include <linux/leds.h> |
43 | #include <linux/input/sh_keysc.h> | 43 | #include <linux/input/sh_keysc.h> |
44 | #include <linux/usb/r8a66597.h> | 44 | #include <linux/usb/r8a66597.h> |
45 | #include <linux/pm_clock.h> | ||
45 | 46 | ||
46 | #include <media/sh_mobile_ceu.h> | 47 | #include <media/sh_mobile_ceu.h> |
47 | #include <media/sh_mobile_csi2.h> | 48 | #include <media/sh_mobile_csi2.h> |
@@ -1408,10 +1409,16 @@ static void __init ap4evb_init(void) | |||
1408 | sh7372_add_device_to_domain(&sh7372_a4lc, &lcdc_device); | 1409 | sh7372_add_device_to_domain(&sh7372_a4lc, &lcdc_device); |
1409 | sh7372_add_device_to_domain(&sh7372_a4mp, &fsi_device); | 1410 | sh7372_add_device_to_domain(&sh7372_a4mp, &fsi_device); |
1410 | 1411 | ||
1412 | sh7372_add_device_to_domain(&sh7372_a3sp, &sh_mmcif_device); | ||
1413 | sh7372_add_device_to_domain(&sh7372_a3sp, &sdhi0_device); | ||
1414 | sh7372_add_device_to_domain(&sh7372_a3sp, &sdhi1_device); | ||
1415 | sh7372_add_device_to_domain(&sh7372_a4r, &ceu_device); | ||
1416 | |||
1411 | hdmi_init_pm_clock(); | 1417 | hdmi_init_pm_clock(); |
1412 | fsi_init_pm_clock(); | 1418 | fsi_init_pm_clock(); |
1413 | sh7372_pm_init(); | 1419 | sh7372_pm_init(); |
1414 | pm_clk_add(&fsi_device.dev, "spu2"); | 1420 | pm_clk_add(&fsi_device.dev, "spu2"); |
1421 | pm_clk_add(&lcdc1_device.dev, "hdmi"); | ||
1415 | } | 1422 | } |
1416 | 1423 | ||
1417 | static void __init ap4evb_timer_init(void) | 1424 | static void __init ap4evb_timer_init(void) |
diff --git a/arch/arm/mach-shmobile/board-mackerel.c b/arch/arm/mach-shmobile/board-mackerel.c index d41c01f83f15..00273dad5bf0 100644 --- a/arch/arm/mach-shmobile/board-mackerel.c +++ b/arch/arm/mach-shmobile/board-mackerel.c | |||
@@ -39,7 +39,7 @@ | |||
39 | #include <linux/mtd/mtd.h> | 39 | #include <linux/mtd/mtd.h> |
40 | #include <linux/mtd/partitions.h> | 40 | #include <linux/mtd/partitions.h> |
41 | #include <linux/mtd/physmap.h> | 41 | #include <linux/mtd/physmap.h> |
42 | #include <linux/pm_runtime.h> | 42 | #include <linux/pm_clock.h> |
43 | #include <linux/smsc911x.h> | 43 | #include <linux/smsc911x.h> |
44 | #include <linux/sh_intc.h> | 44 | #include <linux/sh_intc.h> |
45 | #include <linux/tca6416_keypad.h> | 45 | #include <linux/tca6416_keypad.h> |
@@ -641,6 +641,8 @@ static struct usbhs_private usbhs0_private = { | |||
641 | }, | 641 | }, |
642 | .driver_param = { | 642 | .driver_param = { |
643 | .buswait_bwait = 4, | 643 | .buswait_bwait = 4, |
644 | .d0_tx_id = SHDMA_SLAVE_USB0_TX, | ||
645 | .d1_rx_id = SHDMA_SLAVE_USB0_RX, | ||
644 | }, | 646 | }, |
645 | }, | 647 | }, |
646 | }; | 648 | }; |
@@ -808,8 +810,11 @@ static struct usbhs_private usbhs1_private = { | |||
808 | }, | 810 | }, |
809 | .driver_param = { | 811 | .driver_param = { |
810 | .buswait_bwait = 4, | 812 | .buswait_bwait = 4, |
813 | .has_otg = 1, | ||
811 | .pipe_type = usbhs1_pipe_cfg, | 814 | .pipe_type = usbhs1_pipe_cfg, |
812 | .pipe_size = ARRAY_SIZE(usbhs1_pipe_cfg), | 815 | .pipe_size = ARRAY_SIZE(usbhs1_pipe_cfg), |
816 | .d0_tx_id = SHDMA_SLAVE_USB1_TX, | ||
817 | .d1_rx_id = SHDMA_SLAVE_USB1_RX, | ||
813 | }, | 818 | }, |
814 | }, | 819 | }, |
815 | }; | 820 | }; |
@@ -1584,10 +1589,20 @@ static void __init mackerel_init(void) | |||
1584 | sh7372_add_device_to_domain(&sh7372_a4lc, &lcdc_device); | 1589 | sh7372_add_device_to_domain(&sh7372_a4lc, &lcdc_device); |
1585 | sh7372_add_device_to_domain(&sh7372_a4lc, &hdmi_lcdc_device); | 1590 | sh7372_add_device_to_domain(&sh7372_a4lc, &hdmi_lcdc_device); |
1586 | sh7372_add_device_to_domain(&sh7372_a4mp, &fsi_device); | 1591 | sh7372_add_device_to_domain(&sh7372_a4mp, &fsi_device); |
1592 | sh7372_add_device_to_domain(&sh7372_a3sp, &usbhs0_device); | ||
1593 | sh7372_add_device_to_domain(&sh7372_a3sp, &usbhs1_device); | ||
1594 | sh7372_add_device_to_domain(&sh7372_a3sp, &sh_mmcif_device); | ||
1595 | sh7372_add_device_to_domain(&sh7372_a3sp, &sdhi0_device); | ||
1596 | #if !defined(CONFIG_MMC_SH_MMCIF) && !defined(CONFIG_MMC_SH_MMCIF_MODULE) | ||
1597 | sh7372_add_device_to_domain(&sh7372_a3sp, &sdhi1_device); | ||
1598 | #endif | ||
1599 | sh7372_add_device_to_domain(&sh7372_a3sp, &sdhi2_device); | ||
1600 | sh7372_add_device_to_domain(&sh7372_a4r, &ceu_device); | ||
1587 | 1601 | ||
1588 | hdmi_init_pm_clock(); | 1602 | hdmi_init_pm_clock(); |
1589 | sh7372_pm_init(); | 1603 | sh7372_pm_init(); |
1590 | pm_clk_add(&fsi_device.dev, "spu2"); | 1604 | pm_clk_add(&fsi_device.dev, "spu2"); |
1605 | pm_clk_add(&hdmi_lcdc_device.dev, "hdmi"); | ||
1591 | } | 1606 | } |
1592 | 1607 | ||
1593 | static void __init mackerel_timer_init(void) | 1608 | static void __init mackerel_timer_init(void) |
diff --git a/arch/arm/mach-shmobile/clock-sh7372.c b/arch/arm/mach-shmobile/clock-sh7372.c index 6b1619a65dba..66975921e646 100644 --- a/arch/arm/mach-shmobile/clock-sh7372.c +++ b/arch/arm/mach-shmobile/clock-sh7372.c | |||
@@ -503,16 +503,17 @@ static struct clk *late_main_clks[] = { | |||
503 | &sh7372_fsidivb_clk, | 503 | &sh7372_fsidivb_clk, |
504 | }; | 504 | }; |
505 | 505 | ||
506 | enum { MSTP001, | 506 | enum { MSTP001, MSTP000, |
507 | MSTP131, MSTP130, | 507 | MSTP131, MSTP130, |
508 | MSTP129, MSTP128, MSTP127, MSTP126, MSTP125, | 508 | MSTP129, MSTP128, MSTP127, MSTP126, MSTP125, |
509 | MSTP118, MSTP117, MSTP116, MSTP113, | 509 | MSTP118, MSTP117, MSTP116, MSTP113, |
510 | MSTP106, MSTP101, MSTP100, | 510 | MSTP106, MSTP101, MSTP100, |
511 | MSTP223, | 511 | MSTP223, |
512 | MSTP218, MSTP217, MSTP216, | 512 | MSTP218, MSTP217, MSTP216, MSTP214, MSTP208, MSTP207, |
513 | MSTP207, MSTP206, MSTP204, MSTP203, MSTP202, MSTP201, MSTP200, | 513 | MSTP206, MSTP205, MSTP204, MSTP203, MSTP202, MSTP201, MSTP200, |
514 | MSTP329, MSTP328, MSTP323, MSTP322, MSTP314, MSTP313, MSTP312, | 514 | MSTP328, MSTP323, MSTP322, MSTP314, MSTP313, MSTP312, |
515 | MSTP423, MSTP415, MSTP413, MSTP411, MSTP410, MSTP406, MSTP403, | 515 | MSTP423, MSTP415, MSTP413, MSTP411, MSTP410, MSTP407, MSTP406, |
516 | MSTP405, MSTP404, MSTP403, MSTP400, | ||
516 | MSTP_NR }; | 517 | MSTP_NR }; |
517 | 518 | ||
518 | #define MSTP(_parent, _reg, _bit, _flags) \ | 519 | #define MSTP(_parent, _reg, _bit, _flags) \ |
@@ -520,6 +521,7 @@ enum { MSTP001, | |||
520 | 521 | ||
521 | static struct clk mstp_clks[MSTP_NR] = { | 522 | static struct clk mstp_clks[MSTP_NR] = { |
522 | [MSTP001] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR0, 1, 0), /* IIC2 */ | 523 | [MSTP001] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR0, 1, 0), /* IIC2 */ |
524 | [MSTP000] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR0, 0, 0), /* MSIOF0 */ | ||
523 | [MSTP131] = MSTP(&div4_clks[DIV4_B], SMSTPCR1, 31, 0), /* VEU3 */ | 525 | [MSTP131] = MSTP(&div4_clks[DIV4_B], SMSTPCR1, 31, 0), /* VEU3 */ |
524 | [MSTP130] = MSTP(&div4_clks[DIV4_B], SMSTPCR1, 30, 0), /* VEU2 */ | 526 | [MSTP130] = MSTP(&div4_clks[DIV4_B], SMSTPCR1, 30, 0), /* VEU2 */ |
525 | [MSTP129] = MSTP(&div4_clks[DIV4_B], SMSTPCR1, 29, 0), /* VEU1 */ | 527 | [MSTP129] = MSTP(&div4_clks[DIV4_B], SMSTPCR1, 29, 0), /* VEU1 */ |
@@ -538,14 +540,16 @@ static struct clk mstp_clks[MSTP_NR] = { | |||
538 | [MSTP218] = MSTP(&div4_clks[DIV4_HP], SMSTPCR2, 18, 0), /* DMAC1 */ | 540 | [MSTP218] = MSTP(&div4_clks[DIV4_HP], SMSTPCR2, 18, 0), /* DMAC1 */ |
539 | [MSTP217] = MSTP(&div4_clks[DIV4_HP], SMSTPCR2, 17, 0), /* DMAC2 */ | 541 | [MSTP217] = MSTP(&div4_clks[DIV4_HP], SMSTPCR2, 17, 0), /* DMAC2 */ |
540 | [MSTP216] = MSTP(&div4_clks[DIV4_HP], SMSTPCR2, 16, 0), /* DMAC3 */ | 542 | [MSTP216] = MSTP(&div4_clks[DIV4_HP], SMSTPCR2, 16, 0), /* DMAC3 */ |
543 | [MSTP214] = MSTP(&div4_clks[DIV4_HP], SMSTPCR2, 14, 0), /* USBDMAC */ | ||
544 | [MSTP208] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR2, 8, 0), /* MSIOF1 */ | ||
541 | [MSTP207] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR2, 7, 0), /* SCIFA5 */ | 545 | [MSTP207] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR2, 7, 0), /* SCIFA5 */ |
542 | [MSTP206] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR2, 6, 0), /* SCIFB */ | 546 | [MSTP206] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR2, 6, 0), /* SCIFB */ |
547 | [MSTP205] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR2, 5, 0), /* MSIOF2 */ | ||
543 | [MSTP204] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR2, 4, 0), /* SCIFA0 */ | 548 | [MSTP204] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR2, 4, 0), /* SCIFA0 */ |
544 | [MSTP203] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR2, 3, 0), /* SCIFA1 */ | 549 | [MSTP203] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR2, 3, 0), /* SCIFA1 */ |
545 | [MSTP202] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR2, 2, 0), /* SCIFA2 */ | 550 | [MSTP202] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR2, 2, 0), /* SCIFA2 */ |
546 | [MSTP201] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR2, 1, 0), /* SCIFA3 */ | 551 | [MSTP201] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR2, 1, 0), /* SCIFA3 */ |
547 | [MSTP200] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR2, 0, 0), /* SCIFA4 */ | 552 | [MSTP200] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR2, 0, 0), /* SCIFA4 */ |
548 | [MSTP329] = MSTP(&r_clk, SMSTPCR3, 29, 0), /* CMT10 */ | ||
549 | [MSTP328] = MSTP(&div6_clks[DIV6_SPU], SMSTPCR3, 28, 0), /* FSI2 */ | 553 | [MSTP328] = MSTP(&div6_clks[DIV6_SPU], SMSTPCR3, 28, 0), /* FSI2 */ |
550 | [MSTP323] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR3, 23, 0), /* IIC1 */ | 554 | [MSTP323] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR3, 23, 0), /* IIC1 */ |
551 | [MSTP322] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR3, 22, 0), /* USB0 */ | 555 | [MSTP322] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR3, 22, 0), /* USB0 */ |
@@ -557,8 +561,12 @@ static struct clk mstp_clks[MSTP_NR] = { | |||
557 | [MSTP413] = MSTP(&pllc1_div2_clk, SMSTPCR4, 13, 0), /* HDMI */ | 561 | [MSTP413] = MSTP(&pllc1_div2_clk, SMSTPCR4, 13, 0), /* HDMI */ |
558 | [MSTP411] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR4, 11, 0), /* IIC3 */ | 562 | [MSTP411] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR4, 11, 0), /* IIC3 */ |
559 | [MSTP410] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR4, 10, 0), /* IIC4 */ | 563 | [MSTP410] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR4, 10, 0), /* IIC4 */ |
564 | [MSTP407] = MSTP(&div4_clks[DIV4_HP], SMSTPCR4, 7, 0), /* USB-DMAC1 */ | ||
560 | [MSTP406] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR4, 6, 0), /* USB1 */ | 565 | [MSTP406] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR4, 6, 0), /* USB1 */ |
566 | [MSTP405] = MSTP(&r_clk, SMSTPCR4, 5, 0), /* CMT4 */ | ||
567 | [MSTP404] = MSTP(&r_clk, SMSTPCR4, 4, 0), /* CMT3 */ | ||
561 | [MSTP403] = MSTP(&r_clk, SMSTPCR4, 3, 0), /* KEYSC */ | 568 | [MSTP403] = MSTP(&r_clk, SMSTPCR4, 3, 0), /* KEYSC */ |
569 | [MSTP400] = MSTP(&r_clk, SMSTPCR4, 0, 0), /* CMT2 */ | ||
562 | }; | 570 | }; |
563 | 571 | ||
564 | static struct clk_lookup lookups[] = { | 572 | static struct clk_lookup lookups[] = { |
@@ -609,6 +617,7 @@ static struct clk_lookup lookups[] = { | |||
609 | 617 | ||
610 | /* MSTP32 clocks */ | 618 | /* MSTP32 clocks */ |
611 | CLKDEV_DEV_ID("i2c-sh_mobile.2", &mstp_clks[MSTP001]), /* IIC2 */ | 619 | CLKDEV_DEV_ID("i2c-sh_mobile.2", &mstp_clks[MSTP001]), /* IIC2 */ |
620 | CLKDEV_DEV_ID("spi_sh_msiof.0", &mstp_clks[MSTP000]), /* MSIOF0 */ | ||
612 | CLKDEV_DEV_ID("uio_pdrv_genirq.4", &mstp_clks[MSTP131]), /* VEU3 */ | 621 | CLKDEV_DEV_ID("uio_pdrv_genirq.4", &mstp_clks[MSTP131]), /* VEU3 */ |
613 | CLKDEV_DEV_ID("uio_pdrv_genirq.3", &mstp_clks[MSTP130]), /* VEU2 */ | 622 | CLKDEV_DEV_ID("uio_pdrv_genirq.3", &mstp_clks[MSTP130]), /* VEU2 */ |
614 | CLKDEV_DEV_ID("uio_pdrv_genirq.2", &mstp_clks[MSTP129]), /* VEU1 */ | 623 | CLKDEV_DEV_ID("uio_pdrv_genirq.2", &mstp_clks[MSTP129]), /* VEU1 */ |
@@ -629,14 +638,16 @@ static struct clk_lookup lookups[] = { | |||
629 | CLKDEV_DEV_ID("sh-dma-engine.0", &mstp_clks[MSTP218]), /* DMAC1 */ | 638 | CLKDEV_DEV_ID("sh-dma-engine.0", &mstp_clks[MSTP218]), /* DMAC1 */ |
630 | CLKDEV_DEV_ID("sh-dma-engine.1", &mstp_clks[MSTP217]), /* DMAC2 */ | 639 | CLKDEV_DEV_ID("sh-dma-engine.1", &mstp_clks[MSTP217]), /* DMAC2 */ |
631 | CLKDEV_DEV_ID("sh-dma-engine.2", &mstp_clks[MSTP216]), /* DMAC3 */ | 640 | CLKDEV_DEV_ID("sh-dma-engine.2", &mstp_clks[MSTP216]), /* DMAC3 */ |
641 | CLKDEV_DEV_ID("sh-dma-engine.3", &mstp_clks[MSTP214]), /* USB-DMAC0 */ | ||
642 | CLKDEV_DEV_ID("spi_sh_msiof.1", &mstp_clks[MSTP208]), /* MSIOF1 */ | ||
632 | CLKDEV_DEV_ID("sh-sci.5", &mstp_clks[MSTP207]), /* SCIFA5 */ | 643 | CLKDEV_DEV_ID("sh-sci.5", &mstp_clks[MSTP207]), /* SCIFA5 */ |
633 | CLKDEV_DEV_ID("sh-sci.6", &mstp_clks[MSTP206]), /* SCIFB */ | 644 | CLKDEV_DEV_ID("sh-sci.6", &mstp_clks[MSTP206]), /* SCIFB */ |
645 | CLKDEV_DEV_ID("spi_sh_msiof.2", &mstp_clks[MSTP205]), /* MSIOF2 */ | ||
634 | CLKDEV_DEV_ID("sh-sci.0", &mstp_clks[MSTP204]), /* SCIFA0 */ | 646 | CLKDEV_DEV_ID("sh-sci.0", &mstp_clks[MSTP204]), /* SCIFA0 */ |
635 | CLKDEV_DEV_ID("sh-sci.1", &mstp_clks[MSTP203]), /* SCIFA1 */ | 647 | CLKDEV_DEV_ID("sh-sci.1", &mstp_clks[MSTP203]), /* SCIFA1 */ |
636 | CLKDEV_DEV_ID("sh-sci.2", &mstp_clks[MSTP202]), /* SCIFA2 */ | 648 | CLKDEV_DEV_ID("sh-sci.2", &mstp_clks[MSTP202]), /* SCIFA2 */ |
637 | CLKDEV_DEV_ID("sh-sci.3", &mstp_clks[MSTP201]), /* SCIFA3 */ | 649 | CLKDEV_DEV_ID("sh-sci.3", &mstp_clks[MSTP201]), /* SCIFA3 */ |
638 | CLKDEV_DEV_ID("sh-sci.4", &mstp_clks[MSTP200]), /* SCIFA4 */ | 650 | CLKDEV_DEV_ID("sh-sci.4", &mstp_clks[MSTP200]), /* SCIFA4 */ |
639 | CLKDEV_DEV_ID("sh_cmt.10", &mstp_clks[MSTP329]), /* CMT10 */ | ||
640 | CLKDEV_DEV_ID("sh_fsi2", &mstp_clks[MSTP328]), /* FSI2 */ | 651 | CLKDEV_DEV_ID("sh_fsi2", &mstp_clks[MSTP328]), /* FSI2 */ |
641 | CLKDEV_DEV_ID("i2c-sh_mobile.1", &mstp_clks[MSTP323]), /* IIC1 */ | 652 | CLKDEV_DEV_ID("i2c-sh_mobile.1", &mstp_clks[MSTP323]), /* IIC1 */ |
642 | CLKDEV_DEV_ID("r8a66597_hcd.0", &mstp_clks[MSTP322]), /* USB0 */ | 653 | CLKDEV_DEV_ID("r8a66597_hcd.0", &mstp_clks[MSTP322]), /* USB0 */ |
@@ -650,11 +661,17 @@ static struct clk_lookup lookups[] = { | |||
650 | CLKDEV_DEV_ID("sh-mobile-hdmi", &mstp_clks[MSTP413]), /* HDMI */ | 661 | CLKDEV_DEV_ID("sh-mobile-hdmi", &mstp_clks[MSTP413]), /* HDMI */ |
651 | CLKDEV_DEV_ID("i2c-sh_mobile.3", &mstp_clks[MSTP411]), /* IIC3 */ | 662 | CLKDEV_DEV_ID("i2c-sh_mobile.3", &mstp_clks[MSTP411]), /* IIC3 */ |
652 | CLKDEV_DEV_ID("i2c-sh_mobile.4", &mstp_clks[MSTP410]), /* IIC4 */ | 663 | CLKDEV_DEV_ID("i2c-sh_mobile.4", &mstp_clks[MSTP410]), /* IIC4 */ |
664 | CLKDEV_DEV_ID("sh-dma-engine.4", &mstp_clks[MSTP407]), /* USB-DMAC1 */ | ||
653 | CLKDEV_DEV_ID("r8a66597_hcd.1", &mstp_clks[MSTP406]), /* USB1 */ | 665 | CLKDEV_DEV_ID("r8a66597_hcd.1", &mstp_clks[MSTP406]), /* USB1 */ |
654 | CLKDEV_DEV_ID("r8a66597_udc.1", &mstp_clks[MSTP406]), /* USB1 */ | 666 | CLKDEV_DEV_ID("r8a66597_udc.1", &mstp_clks[MSTP406]), /* USB1 */ |
655 | CLKDEV_DEV_ID("renesas_usbhs.1", &mstp_clks[MSTP406]), /* USB1 */ | 667 | CLKDEV_DEV_ID("renesas_usbhs.1", &mstp_clks[MSTP406]), /* USB1 */ |
668 | CLKDEV_DEV_ID("sh_cmt.4", &mstp_clks[MSTP405]), /* CMT4 */ | ||
669 | CLKDEV_DEV_ID("sh_cmt.3", &mstp_clks[MSTP404]), /* CMT3 */ | ||
656 | CLKDEV_DEV_ID("sh_keysc.0", &mstp_clks[MSTP403]), /* KEYSC */ | 670 | CLKDEV_DEV_ID("sh_keysc.0", &mstp_clks[MSTP403]), /* KEYSC */ |
671 | CLKDEV_DEV_ID("sh_cmt.2", &mstp_clks[MSTP400]), /* CMT2 */ | ||
657 | 672 | ||
673 | CLKDEV_ICK_ID("hdmi", "sh_mobile_lcdc_fb.1", | ||
674 | &div6_reparent_clks[DIV6_HDMI]), | ||
658 | CLKDEV_ICK_ID("ick", "sh-mobile-hdmi", &div6_reparent_clks[DIV6_HDMI]), | 675 | CLKDEV_ICK_ID("ick", "sh-mobile-hdmi", &div6_reparent_clks[DIV6_HDMI]), |
659 | CLKDEV_ICK_ID("icka", "sh_fsi2", &div6_reparent_clks[DIV6_FSIA]), | 676 | CLKDEV_ICK_ID("icka", "sh_fsi2", &div6_reparent_clks[DIV6_FSIA]), |
660 | CLKDEV_ICK_ID("ickb", "sh_fsi2", &div6_reparent_clks[DIV6_FSIB]), | 677 | CLKDEV_ICK_ID("ickb", "sh_fsi2", &div6_reparent_clks[DIV6_FSIB]), |
diff --git a/arch/arm/mach-shmobile/clock-sh73a0.c b/arch/arm/mach-shmobile/clock-sh73a0.c index 6db2ccabc2bf..61a846bb30f2 100644 --- a/arch/arm/mach-shmobile/clock-sh73a0.c +++ b/arch/arm/mach-shmobile/clock-sh73a0.c | |||
@@ -365,7 +365,7 @@ void __init sh73a0_clock_init(void) | |||
365 | __raw_writel(0x108, SD2CKCR); | 365 | __raw_writel(0x108, SD2CKCR); |
366 | 366 | ||
367 | /* detect main clock parent */ | 367 | /* detect main clock parent */ |
368 | switch ((__raw_readl(CKSCR) >> 24) & 0x03) { | 368 | switch ((__raw_readl(CKSCR) >> 28) & 0x03) { |
369 | case 0: | 369 | case 0: |
370 | main_clk.parent = &sh73a0_extal1_clk; | 370 | main_clk.parent = &sh73a0_extal1_clk; |
371 | break; | 371 | break; |
diff --git a/arch/arm/mach-shmobile/include/mach/common.h b/arch/arm/mach-shmobile/include/mach/common.h index 06aecb31d9c7..c0cdbf997c91 100644 --- a/arch/arm/mach-shmobile/include/mach/common.h +++ b/arch/arm/mach-shmobile/include/mach/common.h | |||
@@ -35,8 +35,8 @@ extern void sh7372_add_standard_devices(void); | |||
35 | extern void sh7372_clock_init(void); | 35 | extern void sh7372_clock_init(void); |
36 | extern void sh7372_pinmux_init(void); | 36 | extern void sh7372_pinmux_init(void); |
37 | extern void sh7372_pm_init(void); | 37 | extern void sh7372_pm_init(void); |
38 | extern void sh7372_cpu_suspend(void); | 38 | extern void sh7372_resume_core_standby_a3sm(void); |
39 | extern void sh7372_cpu_resume(void); | 39 | extern int sh7372_do_idle_a3sm(unsigned long unused); |
40 | extern struct clk sh7372_extal1_clk; | 40 | extern struct clk sh7372_extal1_clk; |
41 | extern struct clk sh7372_extal2_clk; | 41 | extern struct clk sh7372_extal2_clk; |
42 | 42 | ||
diff --git a/arch/arm/mach-shmobile/include/mach/sh7372.h b/arch/arm/mach-shmobile/include/mach/sh7372.h index ce595cee86cd..84532f9629b2 100644 --- a/arch/arm/mach-shmobile/include/mach/sh7372.h +++ b/arch/arm/mach-shmobile/include/mach/sh7372.h | |||
@@ -459,6 +459,10 @@ enum { | |||
459 | SHDMA_SLAVE_SDHI2_TX, | 459 | SHDMA_SLAVE_SDHI2_TX, |
460 | SHDMA_SLAVE_MMCIF_RX, | 460 | SHDMA_SLAVE_MMCIF_RX, |
461 | SHDMA_SLAVE_MMCIF_TX, | 461 | SHDMA_SLAVE_MMCIF_TX, |
462 | SHDMA_SLAVE_USB0_TX, | ||
463 | SHDMA_SLAVE_USB0_RX, | ||
464 | SHDMA_SLAVE_USB1_TX, | ||
465 | SHDMA_SLAVE_USB1_RX, | ||
462 | }; | 466 | }; |
463 | 467 | ||
464 | extern struct clk sh7372_extal1_clk; | 468 | extern struct clk sh7372_extal1_clk; |
@@ -475,7 +479,12 @@ struct platform_device; | |||
475 | 479 | ||
476 | struct sh7372_pm_domain { | 480 | struct sh7372_pm_domain { |
477 | struct generic_pm_domain genpd; | 481 | struct generic_pm_domain genpd; |
482 | struct dev_power_governor *gov; | ||
483 | void (*suspend)(void); | ||
484 | void (*resume)(void); | ||
478 | unsigned int bit_shift; | 485 | unsigned int bit_shift; |
486 | bool no_debug; | ||
487 | bool stay_on; | ||
479 | }; | 488 | }; |
480 | 489 | ||
481 | static inline struct sh7372_pm_domain *to_sh7372_pd(struct generic_pm_domain *d) | 490 | static inline struct sh7372_pm_domain *to_sh7372_pd(struct generic_pm_domain *d) |
@@ -487,16 +496,24 @@ static inline struct sh7372_pm_domain *to_sh7372_pd(struct generic_pm_domain *d) | |||
487 | extern struct sh7372_pm_domain sh7372_a4lc; | 496 | extern struct sh7372_pm_domain sh7372_a4lc; |
488 | extern struct sh7372_pm_domain sh7372_a4mp; | 497 | extern struct sh7372_pm_domain sh7372_a4mp; |
489 | extern struct sh7372_pm_domain sh7372_d4; | 498 | extern struct sh7372_pm_domain sh7372_d4; |
499 | extern struct sh7372_pm_domain sh7372_a4r; | ||
490 | extern struct sh7372_pm_domain sh7372_a3rv; | 500 | extern struct sh7372_pm_domain sh7372_a3rv; |
491 | extern struct sh7372_pm_domain sh7372_a3ri; | 501 | extern struct sh7372_pm_domain sh7372_a3ri; |
502 | extern struct sh7372_pm_domain sh7372_a3sp; | ||
492 | extern struct sh7372_pm_domain sh7372_a3sg; | 503 | extern struct sh7372_pm_domain sh7372_a3sg; |
493 | 504 | ||
494 | extern void sh7372_init_pm_domain(struct sh7372_pm_domain *sh7372_pd); | 505 | extern void sh7372_init_pm_domain(struct sh7372_pm_domain *sh7372_pd); |
495 | extern void sh7372_add_device_to_domain(struct sh7372_pm_domain *sh7372_pd, | 506 | extern void sh7372_add_device_to_domain(struct sh7372_pm_domain *sh7372_pd, |
496 | struct platform_device *pdev); | 507 | struct platform_device *pdev); |
508 | extern void sh7372_pm_add_subdomain(struct sh7372_pm_domain *sh7372_pd, | ||
509 | struct sh7372_pm_domain *sh7372_sd); | ||
497 | #else | 510 | #else |
498 | #define sh7372_init_pm_domain(pd) do { } while(0) | 511 | #define sh7372_init_pm_domain(pd) do { } while(0) |
499 | #define sh7372_add_device_to_domain(pd, pdev) do { } while(0) | 512 | #define sh7372_add_device_to_domain(pd, pdev) do { } while(0) |
513 | #define sh7372_pm_add_subdomain(pd, sd) do { } while(0) | ||
500 | #endif /* CONFIG_PM */ | 514 | #endif /* CONFIG_PM */ |
501 | 515 | ||
516 | extern void sh7372_intcs_suspend(void); | ||
517 | extern void sh7372_intcs_resume(void); | ||
518 | |||
502 | #endif /* __ASM_SH7372_H__ */ | 519 | #endif /* __ASM_SH7372_H__ */ |
diff --git a/arch/arm/mach-shmobile/intc-sh7372.c b/arch/arm/mach-shmobile/intc-sh7372.c index 3b28743c77eb..29cdc0522d9c 100644 --- a/arch/arm/mach-shmobile/intc-sh7372.c +++ b/arch/arm/mach-shmobile/intc-sh7372.c | |||
@@ -379,7 +379,7 @@ enum { | |||
379 | /* BBIF2 */ | 379 | /* BBIF2 */ |
380 | VPU, | 380 | VPU, |
381 | TSIF1, | 381 | TSIF1, |
382 | _3DG_SGX530, | 382 | /* 3DG */ |
383 | _2DDMAC, | 383 | _2DDMAC, |
384 | IIC2_ALI2, IIC2_TACKI2, IIC2_WAITI2, IIC2_DTEI2, | 384 | IIC2_ALI2, IIC2_TACKI2, IIC2_WAITI2, IIC2_DTEI2, |
385 | IPMMU_IPMMUR, IPMMU_IPMMUR2, | 385 | IPMMU_IPMMUR, IPMMU_IPMMUR2, |
@@ -436,7 +436,7 @@ static struct intc_vect intcs_vectors[] = { | |||
436 | /* BBIF2 */ | 436 | /* BBIF2 */ |
437 | INTCS_VECT(VPU, 0x980), | 437 | INTCS_VECT(VPU, 0x980), |
438 | INTCS_VECT(TSIF1, 0x9a0), | 438 | INTCS_VECT(TSIF1, 0x9a0), |
439 | INTCS_VECT(_3DG_SGX530, 0x9e0), | 439 | /* 3DG */ |
440 | INTCS_VECT(_2DDMAC, 0xa00), | 440 | INTCS_VECT(_2DDMAC, 0xa00), |
441 | INTCS_VECT(IIC2_ALI2, 0xa80), INTCS_VECT(IIC2_TACKI2, 0xaa0), | 441 | INTCS_VECT(IIC2_ALI2, 0xa80), INTCS_VECT(IIC2_TACKI2, 0xaa0), |
442 | INTCS_VECT(IIC2_WAITI2, 0xac0), INTCS_VECT(IIC2_DTEI2, 0xae0), | 442 | INTCS_VECT(IIC2_WAITI2, 0xac0), INTCS_VECT(IIC2_DTEI2, 0xae0), |
@@ -521,7 +521,7 @@ static struct intc_mask_reg intcs_mask_registers[] = { | |||
521 | RTDMAC_1_DEI3, RTDMAC_1_DEI2, RTDMAC_1_DEI1, RTDMAC_1_DEI0 } }, | 521 | RTDMAC_1_DEI3, RTDMAC_1_DEI2, RTDMAC_1_DEI1, RTDMAC_1_DEI0 } }, |
522 | { 0xffd20198, 0xffd201d8, 8, /* IMR6SA / IMCR6SA */ | 522 | { 0xffd20198, 0xffd201d8, 8, /* IMR6SA / IMCR6SA */ |
523 | { 0, 0, MSIOF, 0, | 523 | { 0, 0, MSIOF, 0, |
524 | _3DG_SGX530, 0, 0, 0 } }, | 524 | 0, 0, 0, 0 } }, |
525 | { 0xffd2019c, 0xffd201dc, 8, /* IMR7SA / IMCR7SA */ | 525 | { 0xffd2019c, 0xffd201dc, 8, /* IMR7SA / IMCR7SA */ |
526 | { 0, TMU_TUNI2, TMU_TUNI1, TMU_TUNI0, | 526 | { 0, TMU_TUNI2, TMU_TUNI1, TMU_TUNI0, |
527 | 0, 0, 0, 0 } }, | 527 | 0, 0, 0, 0 } }, |
@@ -561,7 +561,6 @@ static struct intc_prio_reg intcs_prio_registers[] = { | |||
561 | TMU_TUNI2, TSIF1 } }, | 561 | TMU_TUNI2, TSIF1 } }, |
562 | { 0xffd2001c, 0, 16, 4, /* IPRHS */ { 0, 0, VEU, BEU } }, | 562 | { 0xffd2001c, 0, 16, 4, /* IPRHS */ { 0, 0, VEU, BEU } }, |
563 | { 0xffd20020, 0, 16, 4, /* IPRIS */ { 0, MSIOF, TSIF0, IIC0 } }, | 563 | { 0xffd20020, 0, 16, 4, /* IPRIS */ { 0, MSIOF, TSIF0, IIC0 } }, |
564 | { 0xffd20024, 0, 16, 4, /* IPRJS */ { 0, _3DG_SGX530, 0, 0 } }, | ||
565 | { 0xffd20028, 0, 16, 4, /* IPRKS */ { 0, 0, LMB, 0 } }, | 564 | { 0xffd20028, 0, 16, 4, /* IPRKS */ { 0, 0, LMB, 0 } }, |
566 | { 0xffd2002c, 0, 16, 4, /* IPRLS */ { IPMMU, 0, 0, 0 } }, | 565 | { 0xffd2002c, 0, 16, 4, /* IPRLS */ { IPMMU, 0, 0, 0 } }, |
567 | { 0xffd20030, 0, 16, 4, /* IPRMS */ { IIC2, 0, 0, 0 } }, | 566 | { 0xffd20030, 0, 16, 4, /* IPRMS */ { IIC2, 0, 0, 0 } }, |
@@ -607,9 +606,16 @@ static void intcs_demux(unsigned int irq, struct irq_desc *desc) | |||
607 | generic_handle_irq(intcs_evt2irq(evtcodeas)); | 606 | generic_handle_irq(intcs_evt2irq(evtcodeas)); |
608 | } | 607 | } |
609 | 608 | ||
609 | static void __iomem *intcs_ffd2; | ||
610 | static void __iomem *intcs_ffd5; | ||
611 | |||
610 | void __init sh7372_init_irq(void) | 612 | void __init sh7372_init_irq(void) |
611 | { | 613 | { |
612 | void __iomem *intevtsa = ioremap_nocache(0xffd20100, PAGE_SIZE); | 614 | void __iomem *intevtsa; |
615 | |||
616 | intcs_ffd2 = ioremap_nocache(0xffd20000, PAGE_SIZE); | ||
617 | intevtsa = intcs_ffd2 + 0x100; | ||
618 | intcs_ffd5 = ioremap_nocache(0xffd50000, PAGE_SIZE); | ||
613 | 619 | ||
614 | register_intc_controller(&intca_desc); | 620 | register_intc_controller(&intca_desc); |
615 | register_intc_controller(&intcs_desc); | 621 | register_intc_controller(&intcs_desc); |
@@ -618,3 +624,46 @@ void __init sh7372_init_irq(void) | |||
618 | irq_set_handler_data(evt2irq(0xf80), (void *)intevtsa); | 624 | irq_set_handler_data(evt2irq(0xf80), (void *)intevtsa); |
619 | irq_set_chained_handler(evt2irq(0xf80), intcs_demux); | 625 | irq_set_chained_handler(evt2irq(0xf80), intcs_demux); |
620 | } | 626 | } |
627 | |||
628 | static unsigned short ffd2[0x200]; | ||
629 | static unsigned short ffd5[0x100]; | ||
630 | |||
631 | void sh7372_intcs_suspend(void) | ||
632 | { | ||
633 | int k; | ||
634 | |||
635 | for (k = 0x00; k <= 0x30; k += 4) | ||
636 | ffd2[k] = __raw_readw(intcs_ffd2 + k); | ||
637 | |||
638 | for (k = 0x80; k <= 0xb0; k += 4) | ||
639 | ffd2[k] = __raw_readb(intcs_ffd2 + k); | ||
640 | |||
641 | for (k = 0x180; k <= 0x188; k += 4) | ||
642 | ffd2[k] = __raw_readb(intcs_ffd2 + k); | ||
643 | |||
644 | for (k = 0x00; k <= 0x3c; k += 4) | ||
645 | ffd5[k] = __raw_readw(intcs_ffd5 + k); | ||
646 | |||
647 | for (k = 0x80; k <= 0x9c; k += 4) | ||
648 | ffd5[k] = __raw_readb(intcs_ffd5 + k); | ||
649 | } | ||
650 | |||
651 | void sh7372_intcs_resume(void) | ||
652 | { | ||
653 | int k; | ||
654 | |||
655 | for (k = 0x00; k <= 0x30; k += 4) | ||
656 | __raw_writew(ffd2[k], intcs_ffd2 + k); | ||
657 | |||
658 | for (k = 0x80; k <= 0xb0; k += 4) | ||
659 | __raw_writeb(ffd2[k], intcs_ffd2 + k); | ||
660 | |||
661 | for (k = 0x180; k <= 0x188; k += 4) | ||
662 | __raw_writeb(ffd2[k], intcs_ffd2 + k); | ||
663 | |||
664 | for (k = 0x00; k <= 0x3c; k += 4) | ||
665 | __raw_writew(ffd5[k], intcs_ffd5 + k); | ||
666 | |||
667 | for (k = 0x80; k <= 0x9c; k += 4) | ||
668 | __raw_writeb(ffd5[k], intcs_ffd5 + k); | ||
669 | } | ||
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-shmobile/pm-sh7372.c b/arch/arm/mach-shmobile/pm-sh7372.c index 933fb411be0f..79612737c5b2 100644 --- a/arch/arm/mach-shmobile/pm-sh7372.c +++ b/arch/arm/mach-shmobile/pm-sh7372.c | |||
@@ -15,23 +15,61 @@ | |||
15 | #include <linux/list.h> | 15 | #include <linux/list.h> |
16 | #include <linux/err.h> | 16 | #include <linux/err.h> |
17 | #include <linux/slab.h> | 17 | #include <linux/slab.h> |
18 | #include <linux/pm_runtime.h> | 18 | #include <linux/pm_clock.h> |
19 | #include <linux/platform_device.h> | 19 | #include <linux/platform_device.h> |
20 | #include <linux/delay.h> | 20 | #include <linux/delay.h> |
21 | #include <linux/irq.h> | ||
22 | #include <linux/bitrev.h> | ||
21 | #include <asm/system.h> | 23 | #include <asm/system.h> |
22 | #include <asm/io.h> | 24 | #include <asm/io.h> |
23 | #include <asm/tlbflush.h> | 25 | #include <asm/tlbflush.h> |
26 | #include <asm/suspend.h> | ||
24 | #include <mach/common.h> | 27 | #include <mach/common.h> |
25 | #include <mach/sh7372.h> | 28 | #include <mach/sh7372.h> |
26 | 29 | ||
27 | #define SMFRAM 0xe6a70000 | 30 | /* DBG */ |
28 | #define SYSTBCR 0xe6150024 | 31 | #define DBGREG1 0xe6100020 |
29 | #define SBAR 0xe6180020 | 32 | #define DBGREG9 0xe6100040 |
30 | #define APARMBAREA 0xe6f10020 | ||
31 | 33 | ||
34 | /* CPGA */ | ||
35 | #define SYSTBCR 0xe6150024 | ||
36 | #define MSTPSR0 0xe6150030 | ||
37 | #define MSTPSR1 0xe6150038 | ||
38 | #define MSTPSR2 0xe6150040 | ||
39 | #define MSTPSR3 0xe6150048 | ||
40 | #define MSTPSR4 0xe615004c | ||
41 | #define PLLC01STPCR 0xe61500c8 | ||
42 | |||
43 | /* SYSC */ | ||
32 | #define SPDCR 0xe6180008 | 44 | #define SPDCR 0xe6180008 |
33 | #define SWUCR 0xe6180014 | 45 | #define SWUCR 0xe6180014 |
46 | #define SBAR 0xe6180020 | ||
47 | #define WUPRMSK 0xe6180028 | ||
48 | #define WUPSMSK 0xe618002c | ||
49 | #define WUPSMSK2 0xe6180048 | ||
34 | #define PSTR 0xe6180080 | 50 | #define PSTR 0xe6180080 |
51 | #define WUPSFAC 0xe6180098 | ||
52 | #define IRQCR 0xe618022c | ||
53 | #define IRQCR2 0xe6180238 | ||
54 | #define IRQCR3 0xe6180244 | ||
55 | #define IRQCR4 0xe6180248 | ||
56 | #define PDNSEL 0xe6180254 | ||
57 | |||
58 | /* INTC */ | ||
59 | #define ICR1A 0xe6900000 | ||
60 | #define ICR2A 0xe6900004 | ||
61 | #define ICR3A 0xe6900008 | ||
62 | #define ICR4A 0xe690000c | ||
63 | #define INTMSK00A 0xe6900040 | ||
64 | #define INTMSK10A 0xe6900044 | ||
65 | #define INTMSK20A 0xe6900048 | ||
66 | #define INTMSK30A 0xe690004c | ||
67 | |||
68 | /* MFIS */ | ||
69 | #define SMFRAM 0xe6a70000 | ||
70 | |||
71 | /* AP-System Core */ | ||
72 | #define APARMBAREA 0xe6f10020 | ||
35 | 73 | ||
36 | #define PSTR_RETRIES 100 | 74 | #define PSTR_RETRIES 100 |
37 | #define PSTR_DELAY_US 10 | 75 | #define PSTR_DELAY_US 10 |
@@ -43,6 +81,12 @@ static int pd_power_down(struct generic_pm_domain *genpd) | |||
43 | struct sh7372_pm_domain *sh7372_pd = to_sh7372_pd(genpd); | 81 | struct sh7372_pm_domain *sh7372_pd = to_sh7372_pd(genpd); |
44 | unsigned int mask = 1 << sh7372_pd->bit_shift; | 82 | unsigned int mask = 1 << sh7372_pd->bit_shift; |
45 | 83 | ||
84 | if (sh7372_pd->suspend) | ||
85 | sh7372_pd->suspend(); | ||
86 | |||
87 | if (sh7372_pd->stay_on) | ||
88 | return 0; | ||
89 | |||
46 | if (__raw_readl(PSTR) & mask) { | 90 | if (__raw_readl(PSTR) & mask) { |
47 | unsigned int retry_count; | 91 | unsigned int retry_count; |
48 | 92 | ||
@@ -55,8 +99,9 @@ static int pd_power_down(struct generic_pm_domain *genpd) | |||
55 | } | 99 | } |
56 | } | 100 | } |
57 | 101 | ||
58 | pr_debug("sh7372 power domain down 0x%08x -> PSTR = 0x%08x\n", | 102 | if (!sh7372_pd->no_debug) |
59 | mask, __raw_readl(PSTR)); | 103 | pr_debug("sh7372 power domain down 0x%08x -> PSTR = 0x%08x\n", |
104 | mask, __raw_readl(PSTR)); | ||
60 | 105 | ||
61 | return 0; | 106 | return 0; |
62 | } | 107 | } |
@@ -68,6 +113,9 @@ static int pd_power_up(struct generic_pm_domain *genpd) | |||
68 | unsigned int retry_count; | 113 | unsigned int retry_count; |
69 | int ret = 0; | 114 | int ret = 0; |
70 | 115 | ||
116 | if (sh7372_pd->stay_on) | ||
117 | goto out; | ||
118 | |||
71 | if (__raw_readl(PSTR) & mask) | 119 | if (__raw_readl(PSTR) & mask) |
72 | goto out; | 120 | goto out; |
73 | 121 | ||
@@ -84,66 +132,48 @@ static int pd_power_up(struct generic_pm_domain *genpd) | |||
84 | if (__raw_readl(SWUCR) & mask) | 132 | if (__raw_readl(SWUCR) & mask) |
85 | ret = -EIO; | 133 | ret = -EIO; |
86 | 134 | ||
135 | if (!sh7372_pd->no_debug) | ||
136 | pr_debug("sh7372 power domain up 0x%08x -> PSTR = 0x%08x\n", | ||
137 | mask, __raw_readl(PSTR)); | ||
138 | |||
87 | out: | 139 | out: |
88 | pr_debug("sh7372 power domain up 0x%08x -> PSTR = 0x%08x\n", | 140 | if (ret == 0 && sh7372_pd->resume) |
89 | mask, __raw_readl(PSTR)); | 141 | sh7372_pd->resume(); |
90 | 142 | ||
91 | return ret; | 143 | return ret; |
92 | } | 144 | } |
93 | 145 | ||
94 | static int pd_power_up_a3rv(struct generic_pm_domain *genpd) | 146 | static void sh7372_a4r_suspend(void) |
95 | { | 147 | { |
96 | int ret = pd_power_up(genpd); | 148 | sh7372_intcs_suspend(); |
97 | 149 | __raw_writel(0x300fffff, WUPRMSK); /* avoid wakeup */ | |
98 | /* force A4LC on after A3RV has been requested on */ | ||
99 | pm_genpd_poweron(&sh7372_a4lc.genpd); | ||
100 | |||
101 | return ret; | ||
102 | } | 150 | } |
103 | 151 | ||
104 | static int pd_power_down_a3rv(struct generic_pm_domain *genpd) | 152 | static bool pd_active_wakeup(struct device *dev) |
105 | { | 153 | { |
106 | int ret = pd_power_down(genpd); | 154 | return true; |
107 | |||
108 | /* try to power down A4LC after A3RV is requested off */ | ||
109 | genpd_queue_power_off_work(&sh7372_a4lc.genpd); | ||
110 | |||
111 | return ret; | ||
112 | } | 155 | } |
113 | 156 | ||
114 | static int pd_power_down_a4lc(struct generic_pm_domain *genpd) | 157 | static bool sh7372_power_down_forbidden(struct dev_pm_domain *domain) |
115 | { | 158 | { |
116 | /* only power down A4LC if A3RV is off */ | 159 | return false; |
117 | if (!(__raw_readl(PSTR) & (1 << sh7372_a3rv.bit_shift))) | ||
118 | return pd_power_down(genpd); | ||
119 | |||
120 | return -EBUSY; | ||
121 | } | 160 | } |
122 | 161 | ||
123 | static bool pd_active_wakeup(struct device *dev) | 162 | struct dev_power_governor sh7372_always_on_gov = { |
124 | { | 163 | .power_down_ok = sh7372_power_down_forbidden, |
125 | return true; | 164 | }; |
126 | } | ||
127 | 165 | ||
128 | void sh7372_init_pm_domain(struct sh7372_pm_domain *sh7372_pd) | 166 | void sh7372_init_pm_domain(struct sh7372_pm_domain *sh7372_pd) |
129 | { | 167 | { |
130 | struct generic_pm_domain *genpd = &sh7372_pd->genpd; | 168 | struct generic_pm_domain *genpd = &sh7372_pd->genpd; |
131 | 169 | ||
132 | pm_genpd_init(genpd, NULL, false); | 170 | pm_genpd_init(genpd, sh7372_pd->gov, false); |
133 | genpd->stop_device = pm_clk_suspend; | 171 | genpd->stop_device = pm_clk_suspend; |
134 | genpd->start_device = pm_clk_resume; | 172 | genpd->start_device = pm_clk_resume; |
173 | genpd->dev_irq_safe = true; | ||
135 | genpd->active_wakeup = pd_active_wakeup; | 174 | genpd->active_wakeup = pd_active_wakeup; |
136 | 175 | genpd->power_off = pd_power_down; | |
137 | if (sh7372_pd == &sh7372_a4lc) { | 176 | genpd->power_on = pd_power_up; |
138 | genpd->power_off = pd_power_down_a4lc; | ||
139 | genpd->power_on = pd_power_up; | ||
140 | } else if (sh7372_pd == &sh7372_a3rv) { | ||
141 | genpd->power_off = pd_power_down_a3rv; | ||
142 | genpd->power_on = pd_power_up_a3rv; | ||
143 | } else { | ||
144 | genpd->power_off = pd_power_down; | ||
145 | genpd->power_on = pd_power_up; | ||
146 | } | ||
147 | genpd->power_on(&sh7372_pd->genpd); | 177 | genpd->power_on(&sh7372_pd->genpd); |
148 | } | 178 | } |
149 | 179 | ||
@@ -152,11 +182,15 @@ void sh7372_add_device_to_domain(struct sh7372_pm_domain *sh7372_pd, | |||
152 | { | 182 | { |
153 | struct device *dev = &pdev->dev; | 183 | struct device *dev = &pdev->dev; |
154 | 184 | ||
155 | if (!dev->power.subsys_data) { | ||
156 | pm_clk_init(dev); | ||
157 | pm_clk_add(dev, NULL); | ||
158 | } | ||
159 | pm_genpd_add_device(&sh7372_pd->genpd, dev); | 185 | pm_genpd_add_device(&sh7372_pd->genpd, dev); |
186 | if (pm_clk_no_clocks(dev)) | ||
187 | pm_clk_add(dev, NULL); | ||
188 | } | ||
189 | |||
190 | void sh7372_pm_add_subdomain(struct sh7372_pm_domain *sh7372_pd, | ||
191 | struct sh7372_pm_domain *sh7372_sd) | ||
192 | { | ||
193 | pm_genpd_add_subdomain(&sh7372_pd->genpd, &sh7372_sd->genpd); | ||
160 | } | 194 | } |
161 | 195 | ||
162 | struct sh7372_pm_domain sh7372_a4lc = { | 196 | struct sh7372_pm_domain sh7372_a4lc = { |
@@ -171,6 +205,14 @@ struct sh7372_pm_domain sh7372_d4 = { | |||
171 | .bit_shift = 3, | 205 | .bit_shift = 3, |
172 | }; | 206 | }; |
173 | 207 | ||
208 | struct sh7372_pm_domain sh7372_a4r = { | ||
209 | .bit_shift = 5, | ||
210 | .gov = &sh7372_always_on_gov, | ||
211 | .suspend = sh7372_a4r_suspend, | ||
212 | .resume = sh7372_intcs_resume, | ||
213 | .stay_on = true, | ||
214 | }; | ||
215 | |||
174 | struct sh7372_pm_domain sh7372_a3rv = { | 216 | struct sh7372_pm_domain sh7372_a3rv = { |
175 | .bit_shift = 6, | 217 | .bit_shift = 6, |
176 | }; | 218 | }; |
@@ -179,39 +221,187 @@ struct sh7372_pm_domain sh7372_a3ri = { | |||
179 | .bit_shift = 8, | 221 | .bit_shift = 8, |
180 | }; | 222 | }; |
181 | 223 | ||
224 | struct sh7372_pm_domain sh7372_a3sp = { | ||
225 | .bit_shift = 11, | ||
226 | .gov = &sh7372_always_on_gov, | ||
227 | .no_debug = true, | ||
228 | }; | ||
229 | |||
182 | struct sh7372_pm_domain sh7372_a3sg = { | 230 | struct sh7372_pm_domain sh7372_a3sg = { |
183 | .bit_shift = 13, | 231 | .bit_shift = 13, |
184 | }; | 232 | }; |
185 | 233 | ||
186 | #endif /* CONFIG_PM */ | 234 | #endif /* CONFIG_PM */ |
187 | 235 | ||
236 | #if defined(CONFIG_SUSPEND) || defined(CONFIG_CPU_IDLE) | ||
237 | static int sh7372_do_idle_core_standby(unsigned long unused) | ||
238 | { | ||
239 | cpu_do_idle(); /* WFI when SYSTBCR == 0x10 -> Core Standby */ | ||
240 | return 0; | ||
241 | } | ||
242 | |||
188 | static void sh7372_enter_core_standby(void) | 243 | static void sh7372_enter_core_standby(void) |
189 | { | 244 | { |
190 | void __iomem *smfram = (void __iomem *)SMFRAM; | 245 | /* set reset vector, translate 4k */ |
246 | __raw_writel(__pa(sh7372_resume_core_standby_a3sm), SBAR); | ||
247 | __raw_writel(0, APARMBAREA); | ||
191 | 248 | ||
192 | __raw_writel(0, APARMBAREA); /* translate 4k */ | 249 | /* enter sleep mode with SYSTBCR to 0x10 */ |
193 | __raw_writel(__pa(sh7372_cpu_resume), SBAR); /* set reset vector */ | 250 | __raw_writel(0x10, SYSTBCR); |
194 | __raw_writel(0x10, SYSTBCR); /* enable core standby */ | 251 | cpu_suspend(0, sh7372_do_idle_core_standby); |
252 | __raw_writel(0, SYSTBCR); | ||
195 | 253 | ||
196 | __raw_writel(0, smfram + 0x3c); /* clear page table address */ | 254 | /* disable reset vector translation */ |
255 | __raw_writel(0, SBAR); | ||
256 | } | ||
257 | #endif | ||
258 | |||
259 | #ifdef CONFIG_SUSPEND | ||
260 | static void sh7372_enter_a3sm_common(int pllc0_on) | ||
261 | { | ||
262 | /* set reset vector, translate 4k */ | ||
263 | __raw_writel(__pa(sh7372_resume_core_standby_a3sm), SBAR); | ||
264 | __raw_writel(0, APARMBAREA); | ||
265 | |||
266 | if (pllc0_on) | ||
267 | __raw_writel(0, PLLC01STPCR); | ||
268 | else | ||
269 | __raw_writel(1 << 28, PLLC01STPCR); | ||
270 | |||
271 | __raw_writel(0, PDNSEL); /* power-down A3SM only, not A4S */ | ||
272 | __raw_readl(WUPSFAC); /* read wakeup int. factor before sleep */ | ||
273 | cpu_suspend(0, sh7372_do_idle_a3sm); | ||
274 | __raw_readl(WUPSFAC); /* read wakeup int. factor after wakeup */ | ||
275 | |||
276 | /* disable reset vector translation */ | ||
277 | __raw_writel(0, SBAR); | ||
278 | } | ||
279 | |||
280 | static int sh7372_a3sm_valid(unsigned long *mskp, unsigned long *msk2p) | ||
281 | { | ||
282 | unsigned long mstpsr0, mstpsr1, mstpsr2, mstpsr3, mstpsr4; | ||
283 | unsigned long msk, msk2; | ||
284 | |||
285 | /* check active clocks to determine potential wakeup sources */ | ||
286 | |||
287 | mstpsr0 = __raw_readl(MSTPSR0); | ||
288 | if ((mstpsr0 & 0x00000003) != 0x00000003) { | ||
289 | pr_debug("sh7372 mstpsr0 0x%08lx\n", mstpsr0); | ||
290 | return 0; | ||
291 | } | ||
292 | |||
293 | mstpsr1 = __raw_readl(MSTPSR1); | ||
294 | if ((mstpsr1 & 0xff079b7f) != 0xff079b7f) { | ||
295 | pr_debug("sh7372 mstpsr1 0x%08lx\n", mstpsr1); | ||
296 | return 0; | ||
297 | } | ||
197 | 298 | ||
198 | sh7372_cpu_suspend(); | 299 | mstpsr2 = __raw_readl(MSTPSR2); |
199 | cpu_init(); | 300 | if ((mstpsr2 & 0x000741ff) != 0x000741ff) { |
301 | pr_debug("sh7372 mstpsr2 0x%08lx\n", mstpsr2); | ||
302 | return 0; | ||
303 | } | ||
200 | 304 | ||
201 | /* if page table address is non-NULL then we have been powered down */ | 305 | mstpsr3 = __raw_readl(MSTPSR3); |
202 | if (__raw_readl(smfram + 0x3c)) { | 306 | if ((mstpsr3 & 0x1a60f010) != 0x1a60f010) { |
203 | __raw_writel(__raw_readl(smfram + 0x40), | 307 | pr_debug("sh7372 mstpsr3 0x%08lx\n", mstpsr3); |
204 | __va(__raw_readl(smfram + 0x3c))); | 308 | return 0; |
309 | } | ||
205 | 310 | ||
206 | flush_tlb_all(); | 311 | mstpsr4 = __raw_readl(MSTPSR4); |
207 | set_cr(__raw_readl(smfram + 0x38)); | 312 | if ((mstpsr4 & 0x00008cf0) != 0x00008cf0) { |
313 | pr_debug("sh7372 mstpsr4 0x%08lx\n", mstpsr4); | ||
314 | return 0; | ||
208 | } | 315 | } |
209 | 316 | ||
210 | __raw_writel(0, SYSTBCR); /* disable core standby */ | 317 | msk = 0; |
211 | __raw_writel(0, SBAR); /* disable reset vector translation */ | 318 | msk2 = 0; |
319 | |||
320 | /* make bitmaps of limited number of wakeup sources */ | ||
321 | |||
322 | if ((mstpsr2 & (1 << 23)) == 0) /* SPU2 */ | ||
323 | msk |= 1 << 31; | ||
324 | |||
325 | if ((mstpsr2 & (1 << 12)) == 0) /* MFI_MFIM */ | ||
326 | msk |= 1 << 21; | ||
327 | |||
328 | if ((mstpsr4 & (1 << 3)) == 0) /* KEYSC */ | ||
329 | msk |= 1 << 2; | ||
330 | |||
331 | if ((mstpsr1 & (1 << 24)) == 0) /* CMT0 */ | ||
332 | msk |= 1 << 1; | ||
333 | |||
334 | if ((mstpsr3 & (1 << 29)) == 0) /* CMT1 */ | ||
335 | msk |= 1 << 1; | ||
336 | |||
337 | if ((mstpsr4 & (1 << 0)) == 0) /* CMT2 */ | ||
338 | msk |= 1 << 1; | ||
339 | |||
340 | if ((mstpsr2 & (1 << 13)) == 0) /* MFI_MFIS */ | ||
341 | msk2 |= 1 << 17; | ||
342 | |||
343 | *mskp = msk; | ||
344 | *msk2p = msk2; | ||
345 | |||
346 | return 1; | ||
347 | } | ||
348 | |||
349 | static void sh7372_icr_to_irqcr(unsigned long icr, u16 *irqcr1p, u16 *irqcr2p) | ||
350 | { | ||
351 | u16 tmp, irqcr1, irqcr2; | ||
352 | int k; | ||
353 | |||
354 | irqcr1 = 0; | ||
355 | irqcr2 = 0; | ||
356 | |||
357 | /* convert INTCA ICR register layout to SYSC IRQCR+IRQCR2 */ | ||
358 | for (k = 0; k <= 7; k++) { | ||
359 | tmp = (icr >> ((7 - k) * 4)) & 0xf; | ||
360 | irqcr1 |= (tmp & 0x03) << (k * 2); | ||
361 | irqcr2 |= (tmp >> 2) << (k * 2); | ||
362 | } | ||
363 | |||
364 | *irqcr1p = irqcr1; | ||
365 | *irqcr2p = irqcr2; | ||
366 | } | ||
367 | |||
368 | static void sh7372_setup_a3sm(unsigned long msk, unsigned long msk2) | ||
369 | { | ||
370 | u16 irqcrx_low, irqcrx_high, irqcry_low, irqcry_high; | ||
371 | unsigned long tmp; | ||
372 | |||
373 | /* read IRQ0A -> IRQ15A mask */ | ||
374 | tmp = bitrev8(__raw_readb(INTMSK00A)); | ||
375 | tmp |= bitrev8(__raw_readb(INTMSK10A)) << 8; | ||
376 | |||
377 | /* setup WUPSMSK from clocks and external IRQ mask */ | ||
378 | msk = (~msk & 0xc030000f) | (tmp << 4); | ||
379 | __raw_writel(msk, WUPSMSK); | ||
380 | |||
381 | /* propage level/edge trigger for external IRQ 0->15 */ | ||
382 | sh7372_icr_to_irqcr(__raw_readl(ICR1A), &irqcrx_low, &irqcry_low); | ||
383 | sh7372_icr_to_irqcr(__raw_readl(ICR2A), &irqcrx_high, &irqcry_high); | ||
384 | __raw_writel((irqcrx_high << 16) | irqcrx_low, IRQCR); | ||
385 | __raw_writel((irqcry_high << 16) | irqcry_low, IRQCR2); | ||
386 | |||
387 | /* read IRQ16A -> IRQ31A mask */ | ||
388 | tmp = bitrev8(__raw_readb(INTMSK20A)); | ||
389 | tmp |= bitrev8(__raw_readb(INTMSK30A)) << 8; | ||
390 | |||
391 | /* setup WUPSMSK2 from clocks and external IRQ mask */ | ||
392 | msk2 = (~msk2 & 0x00030000) | tmp; | ||
393 | __raw_writel(msk2, WUPSMSK2); | ||
394 | |||
395 | /* propage level/edge trigger for external IRQ 16->31 */ | ||
396 | sh7372_icr_to_irqcr(__raw_readl(ICR3A), &irqcrx_low, &irqcry_low); | ||
397 | sh7372_icr_to_irqcr(__raw_readl(ICR4A), &irqcrx_high, &irqcry_high); | ||
398 | __raw_writel((irqcrx_high << 16) | irqcrx_low, IRQCR3); | ||
399 | __raw_writel((irqcry_high << 16) | irqcry_low, IRQCR4); | ||
212 | } | 400 | } |
401 | #endif | ||
213 | 402 | ||
214 | #ifdef CONFIG_CPU_IDLE | 403 | #ifdef CONFIG_CPU_IDLE |
404 | |||
215 | static void sh7372_cpuidle_setup(struct cpuidle_device *dev) | 405 | static void sh7372_cpuidle_setup(struct cpuidle_device *dev) |
216 | { | 406 | { |
217 | struct cpuidle_state *state; | 407 | struct cpuidle_state *state; |
@@ -239,9 +429,25 @@ static void sh7372_cpuidle_init(void) {} | |||
239 | #endif | 429 | #endif |
240 | 430 | ||
241 | #ifdef CONFIG_SUSPEND | 431 | #ifdef CONFIG_SUSPEND |
432 | |||
242 | static int sh7372_enter_suspend(suspend_state_t suspend_state) | 433 | static int sh7372_enter_suspend(suspend_state_t suspend_state) |
243 | { | 434 | { |
244 | sh7372_enter_core_standby(); | 435 | unsigned long msk, msk2; |
436 | |||
437 | /* check active clocks to determine potential wakeup sources */ | ||
438 | if (sh7372_a3sm_valid(&msk, &msk2)) { | ||
439 | |||
440 | /* convert INTC mask and sense to SYSC mask and sense */ | ||
441 | sh7372_setup_a3sm(msk, msk2); | ||
442 | |||
443 | /* enter A3SM sleep with PLLC0 off */ | ||
444 | pr_debug("entering A3SM\n"); | ||
445 | sh7372_enter_a3sm_common(0); | ||
446 | } else { | ||
447 | /* default to Core Standby that supports all wakeup sources */ | ||
448 | pr_debug("entering Core Standby\n"); | ||
449 | sh7372_enter_core_standby(); | ||
450 | } | ||
245 | return 0; | 451 | return 0; |
246 | } | 452 | } |
247 | 453 | ||
@@ -253,9 +459,6 @@ static void sh7372_suspend_init(void) | |||
253 | static void sh7372_suspend_init(void) {} | 459 | static void sh7372_suspend_init(void) {} |
254 | #endif | 460 | #endif |
255 | 461 | ||
256 | #define DBGREG1 0xe6100020 | ||
257 | #define DBGREG9 0xe6100040 | ||
258 | |||
259 | void __init sh7372_pm_init(void) | 462 | void __init sh7372_pm_init(void) |
260 | { | 463 | { |
261 | /* enable DBG hardware block to kick SYSC */ | 464 | /* enable DBG hardware block to kick SYSC */ |
@@ -263,6 +466,9 @@ void __init sh7372_pm_init(void) | |||
263 | __raw_writel(0x0000a501, DBGREG9); | 466 | __raw_writel(0x0000a501, DBGREG9); |
264 | __raw_writel(0x00000000, DBGREG1); | 467 | __raw_writel(0x00000000, DBGREG1); |
265 | 468 | ||
469 | /* do not convert A3SM, A3SP, A3SG, A4R power down into A4S */ | ||
470 | __raw_writel(0, PDNSEL); | ||
471 | |||
266 | sh7372_suspend_init(); | 472 | sh7372_suspend_init(); |
267 | sh7372_cpuidle_init(); | 473 | sh7372_cpuidle_init(); |
268 | } | 474 | } |
diff --git a/arch/arm/mach-shmobile/pm_runtime.c b/arch/arm/mach-shmobile/pm_runtime.c index 6ec454e1e063..bd5c6a3b8c55 100644 --- a/arch/arm/mach-shmobile/pm_runtime.c +++ b/arch/arm/mach-shmobile/pm_runtime.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/io.h> | 15 | #include <linux/io.h> |
16 | #include <linux/pm_runtime.h> | 16 | #include <linux/pm_runtime.h> |
17 | #include <linux/pm_domain.h> | 17 | #include <linux/pm_domain.h> |
18 | #include <linux/pm_clock.h> | ||
18 | #include <linux/platform_device.h> | 19 | #include <linux/platform_device.h> |
19 | #include <linux/clk.h> | 20 | #include <linux/clk.h> |
20 | #include <linux/sh_clk.h> | 21 | #include <linux/sh_clk.h> |
diff --git a/arch/arm/mach-shmobile/setup-sh7372.c b/arch/arm/mach-shmobile/setup-sh7372.c index 79f0413d8725..2380389e6ac5 100644 --- a/arch/arm/mach-shmobile/setup-sh7372.c +++ b/arch/arm/mach-shmobile/setup-sh7372.c | |||
@@ -30,6 +30,7 @@ | |||
30 | #include <linux/sh_dma.h> | 30 | #include <linux/sh_dma.h> |
31 | #include <linux/sh_intc.h> | 31 | #include <linux/sh_intc.h> |
32 | #include <linux/sh_timer.h> | 32 | #include <linux/sh_timer.h> |
33 | #include <linux/pm_domain.h> | ||
33 | #include <mach/hardware.h> | 34 | #include <mach/hardware.h> |
34 | #include <mach/sh7372.h> | 35 | #include <mach/sh7372.h> |
35 | #include <asm/mach-types.h> | 36 | #include <asm/mach-types.h> |
@@ -169,35 +170,35 @@ static struct platform_device scif6_device = { | |||
169 | }; | 170 | }; |
170 | 171 | ||
171 | /* CMT */ | 172 | /* CMT */ |
172 | static struct sh_timer_config cmt10_platform_data = { | 173 | static struct sh_timer_config cmt2_platform_data = { |
173 | .name = "CMT10", | 174 | .name = "CMT2", |
174 | .channel_offset = 0x10, | 175 | .channel_offset = 0x40, |
175 | .timer_bit = 0, | 176 | .timer_bit = 5, |
176 | .clockevent_rating = 125, | 177 | .clockevent_rating = 125, |
177 | .clocksource_rating = 125, | 178 | .clocksource_rating = 125, |
178 | }; | 179 | }; |
179 | 180 | ||
180 | static struct resource cmt10_resources[] = { | 181 | static struct resource cmt2_resources[] = { |
181 | [0] = { | 182 | [0] = { |
182 | .name = "CMT10", | 183 | .name = "CMT2", |
183 | .start = 0xe6138010, | 184 | .start = 0xe6130040, |
184 | .end = 0xe613801b, | 185 | .end = 0xe613004b, |
185 | .flags = IORESOURCE_MEM, | 186 | .flags = IORESOURCE_MEM, |
186 | }, | 187 | }, |
187 | [1] = { | 188 | [1] = { |
188 | .start = evt2irq(0x0b00), /* CMT1_CMT10 */ | 189 | .start = evt2irq(0x0b80), /* CMT2 */ |
189 | .flags = IORESOURCE_IRQ, | 190 | .flags = IORESOURCE_IRQ, |
190 | }, | 191 | }, |
191 | }; | 192 | }; |
192 | 193 | ||
193 | static struct platform_device cmt10_device = { | 194 | static struct platform_device cmt2_device = { |
194 | .name = "sh_cmt", | 195 | .name = "sh_cmt", |
195 | .id = 10, | 196 | .id = 2, |
196 | .dev = { | 197 | .dev = { |
197 | .platform_data = &cmt10_platform_data, | 198 | .platform_data = &cmt2_platform_data, |
198 | }, | 199 | }, |
199 | .resource = cmt10_resources, | 200 | .resource = cmt2_resources, |
200 | .num_resources = ARRAY_SIZE(cmt10_resources), | 201 | .num_resources = ARRAY_SIZE(cmt2_resources), |
201 | }; | 202 | }; |
202 | 203 | ||
203 | /* TMU */ | 204 | /* TMU */ |
@@ -602,6 +603,150 @@ static struct platform_device dma2_device = { | |||
602 | }, | 603 | }, |
603 | }; | 604 | }; |
604 | 605 | ||
606 | /* | ||
607 | * USB-DMAC | ||
608 | */ | ||
609 | |||
610 | unsigned int usbts_shift[] = {3, 4, 5}; | ||
611 | |||
612 | enum { | ||
613 | XMIT_SZ_8BYTE = 0, | ||
614 | XMIT_SZ_16BYTE = 1, | ||
615 | XMIT_SZ_32BYTE = 2, | ||
616 | }; | ||
617 | |||
618 | #define USBTS_INDEX2VAL(i) (((i) & 3) << 6) | ||
619 | |||
620 | static const struct sh_dmae_channel sh7372_usb_dmae_channels[] = { | ||
621 | { | ||
622 | .offset = 0, | ||
623 | }, { | ||
624 | .offset = 0x20, | ||
625 | }, | ||
626 | }; | ||
627 | |||
628 | /* USB DMAC0 */ | ||
629 | static const struct sh_dmae_slave_config sh7372_usb_dmae0_slaves[] = { | ||
630 | { | ||
631 | .slave_id = SHDMA_SLAVE_USB0_TX, | ||
632 | .chcr = USBTS_INDEX2VAL(XMIT_SZ_8BYTE), | ||
633 | }, { | ||
634 | .slave_id = SHDMA_SLAVE_USB0_RX, | ||
635 | .chcr = USBTS_INDEX2VAL(XMIT_SZ_8BYTE), | ||
636 | }, | ||
637 | }; | ||
638 | |||
639 | static struct sh_dmae_pdata usb_dma0_platform_data = { | ||
640 | .slave = sh7372_usb_dmae0_slaves, | ||
641 | .slave_num = ARRAY_SIZE(sh7372_usb_dmae0_slaves), | ||
642 | .channel = sh7372_usb_dmae_channels, | ||
643 | .channel_num = ARRAY_SIZE(sh7372_usb_dmae_channels), | ||
644 | .ts_low_shift = 6, | ||
645 | .ts_low_mask = 0xc0, | ||
646 | .ts_high_shift = 0, | ||
647 | .ts_high_mask = 0, | ||
648 | .ts_shift = usbts_shift, | ||
649 | .ts_shift_num = ARRAY_SIZE(usbts_shift), | ||
650 | .dmaor_init = DMAOR_DME, | ||
651 | .chcr_offset = 0x14, | ||
652 | .chcr_ie_bit = 1 << 5, | ||
653 | .dmaor_is_32bit = 1, | ||
654 | .needs_tend_set = 1, | ||
655 | .no_dmars = 1, | ||
656 | }; | ||
657 | |||
658 | static struct resource sh7372_usb_dmae0_resources[] = { | ||
659 | { | ||
660 | /* Channel registers and DMAOR */ | ||
661 | .start = 0xe68a0020, | ||
662 | .end = 0xe68a0064 - 1, | ||
663 | .flags = IORESOURCE_MEM, | ||
664 | }, | ||
665 | { | ||
666 | /* VCR/SWR/DMICR */ | ||
667 | .start = 0xe68a0000, | ||
668 | .end = 0xe68a0014 - 1, | ||
669 | .flags = IORESOURCE_MEM, | ||
670 | }, | ||
671 | { | ||
672 | /* IRQ for channels */ | ||
673 | .start = evt2irq(0x0a00), | ||
674 | .end = evt2irq(0x0a00), | ||
675 | .flags = IORESOURCE_IRQ, | ||
676 | }, | ||
677 | }; | ||
678 | |||
679 | static struct platform_device usb_dma0_device = { | ||
680 | .name = "sh-dma-engine", | ||
681 | .id = 3, | ||
682 | .resource = sh7372_usb_dmae0_resources, | ||
683 | .num_resources = ARRAY_SIZE(sh7372_usb_dmae0_resources), | ||
684 | .dev = { | ||
685 | .platform_data = &usb_dma0_platform_data, | ||
686 | }, | ||
687 | }; | ||
688 | |||
689 | /* USB DMAC1 */ | ||
690 | static const struct sh_dmae_slave_config sh7372_usb_dmae1_slaves[] = { | ||
691 | { | ||
692 | .slave_id = SHDMA_SLAVE_USB1_TX, | ||
693 | .chcr = USBTS_INDEX2VAL(XMIT_SZ_8BYTE), | ||
694 | }, { | ||
695 | .slave_id = SHDMA_SLAVE_USB1_RX, | ||
696 | .chcr = USBTS_INDEX2VAL(XMIT_SZ_8BYTE), | ||
697 | }, | ||
698 | }; | ||
699 | |||
700 | static struct sh_dmae_pdata usb_dma1_platform_data = { | ||
701 | .slave = sh7372_usb_dmae1_slaves, | ||
702 | .slave_num = ARRAY_SIZE(sh7372_usb_dmae1_slaves), | ||
703 | .channel = sh7372_usb_dmae_channels, | ||
704 | .channel_num = ARRAY_SIZE(sh7372_usb_dmae_channels), | ||
705 | .ts_low_shift = 6, | ||
706 | .ts_low_mask = 0xc0, | ||
707 | .ts_high_shift = 0, | ||
708 | .ts_high_mask = 0, | ||
709 | .ts_shift = usbts_shift, | ||
710 | .ts_shift_num = ARRAY_SIZE(usbts_shift), | ||
711 | .dmaor_init = DMAOR_DME, | ||
712 | .chcr_offset = 0x14, | ||
713 | .chcr_ie_bit = 1 << 5, | ||
714 | .dmaor_is_32bit = 1, | ||
715 | .needs_tend_set = 1, | ||
716 | .no_dmars = 1, | ||
717 | }; | ||
718 | |||
719 | static struct resource sh7372_usb_dmae1_resources[] = { | ||
720 | { | ||
721 | /* Channel registers and DMAOR */ | ||
722 | .start = 0xe68c0020, | ||
723 | .end = 0xe68c0064 - 1, | ||
724 | .flags = IORESOURCE_MEM, | ||
725 | }, | ||
726 | { | ||
727 | /* VCR/SWR/DMICR */ | ||
728 | .start = 0xe68c0000, | ||
729 | .end = 0xe68c0014 - 1, | ||
730 | .flags = IORESOURCE_MEM, | ||
731 | }, | ||
732 | { | ||
733 | /* IRQ for channels */ | ||
734 | .start = evt2irq(0x1d00), | ||
735 | .end = evt2irq(0x1d00), | ||
736 | .flags = IORESOURCE_IRQ, | ||
737 | }, | ||
738 | }; | ||
739 | |||
740 | static struct platform_device usb_dma1_device = { | ||
741 | .name = "sh-dma-engine", | ||
742 | .id = 4, | ||
743 | .resource = sh7372_usb_dmae1_resources, | ||
744 | .num_resources = ARRAY_SIZE(sh7372_usb_dmae1_resources), | ||
745 | .dev = { | ||
746 | .platform_data = &usb_dma1_platform_data, | ||
747 | }, | ||
748 | }; | ||
749 | |||
605 | /* VPU */ | 750 | /* VPU */ |
606 | static struct uio_info vpu_platform_data = { | 751 | static struct uio_info vpu_platform_data = { |
607 | .name = "VPU5HG", | 752 | .name = "VPU5HG", |
@@ -818,7 +963,7 @@ static struct platform_device *sh7372_early_devices[] __initdata = { | |||
818 | &scif4_device, | 963 | &scif4_device, |
819 | &scif5_device, | 964 | &scif5_device, |
820 | &scif6_device, | 965 | &scif6_device, |
821 | &cmt10_device, | 966 | &cmt2_device, |
822 | &tmu00_device, | 967 | &tmu00_device, |
823 | &tmu01_device, | 968 | &tmu01_device, |
824 | }; | 969 | }; |
@@ -829,6 +974,8 @@ static struct platform_device *sh7372_late_devices[] __initdata = { | |||
829 | &dma0_device, | 974 | &dma0_device, |
830 | &dma1_device, | 975 | &dma1_device, |
831 | &dma2_device, | 976 | &dma2_device, |
977 | &usb_dma0_device, | ||
978 | &usb_dma1_device, | ||
832 | &vpu_device, | 979 | &vpu_device, |
833 | &veu0_device, | 980 | &veu0_device, |
834 | &veu1_device, | 981 | &veu1_device, |
@@ -844,9 +991,14 @@ void __init sh7372_add_standard_devices(void) | |||
844 | sh7372_init_pm_domain(&sh7372_a4lc); | 991 | sh7372_init_pm_domain(&sh7372_a4lc); |
845 | sh7372_init_pm_domain(&sh7372_a4mp); | 992 | sh7372_init_pm_domain(&sh7372_a4mp); |
846 | sh7372_init_pm_domain(&sh7372_d4); | 993 | sh7372_init_pm_domain(&sh7372_d4); |
994 | sh7372_init_pm_domain(&sh7372_a4r); | ||
847 | sh7372_init_pm_domain(&sh7372_a3rv); | 995 | sh7372_init_pm_domain(&sh7372_a3rv); |
848 | sh7372_init_pm_domain(&sh7372_a3ri); | 996 | sh7372_init_pm_domain(&sh7372_a3ri); |
849 | sh7372_init_pm_domain(&sh7372_a3sg); | 997 | sh7372_init_pm_domain(&sh7372_a3sg); |
998 | sh7372_init_pm_domain(&sh7372_a3sp); | ||
999 | |||
1000 | sh7372_pm_add_subdomain(&sh7372_a4lc, &sh7372_a3rv); | ||
1001 | sh7372_pm_add_subdomain(&sh7372_a4r, &sh7372_a4lc); | ||
850 | 1002 | ||
851 | platform_add_devices(sh7372_early_devices, | 1003 | platform_add_devices(sh7372_early_devices, |
852 | ARRAY_SIZE(sh7372_early_devices)); | 1004 | ARRAY_SIZE(sh7372_early_devices)); |
@@ -857,6 +1009,25 @@ void __init sh7372_add_standard_devices(void) | |||
857 | sh7372_add_device_to_domain(&sh7372_a3rv, &vpu_device); | 1009 | sh7372_add_device_to_domain(&sh7372_a3rv, &vpu_device); |
858 | sh7372_add_device_to_domain(&sh7372_a4mp, &spu0_device); | 1010 | sh7372_add_device_to_domain(&sh7372_a4mp, &spu0_device); |
859 | sh7372_add_device_to_domain(&sh7372_a4mp, &spu1_device); | 1011 | sh7372_add_device_to_domain(&sh7372_a4mp, &spu1_device); |
1012 | sh7372_add_device_to_domain(&sh7372_a3sp, &scif0_device); | ||
1013 | sh7372_add_device_to_domain(&sh7372_a3sp, &scif1_device); | ||
1014 | sh7372_add_device_to_domain(&sh7372_a3sp, &scif2_device); | ||
1015 | sh7372_add_device_to_domain(&sh7372_a3sp, &scif3_device); | ||
1016 | sh7372_add_device_to_domain(&sh7372_a3sp, &scif4_device); | ||
1017 | sh7372_add_device_to_domain(&sh7372_a3sp, &scif5_device); | ||
1018 | sh7372_add_device_to_domain(&sh7372_a3sp, &scif6_device); | ||
1019 | sh7372_add_device_to_domain(&sh7372_a3sp, &iic1_device); | ||
1020 | sh7372_add_device_to_domain(&sh7372_a3sp, &dma0_device); | ||
1021 | sh7372_add_device_to_domain(&sh7372_a3sp, &dma1_device); | ||
1022 | sh7372_add_device_to_domain(&sh7372_a3sp, &dma2_device); | ||
1023 | sh7372_add_device_to_domain(&sh7372_a3sp, &usb_dma0_device); | ||
1024 | sh7372_add_device_to_domain(&sh7372_a3sp, &usb_dma1_device); | ||
1025 | sh7372_add_device_to_domain(&sh7372_a4r, &iic0_device); | ||
1026 | sh7372_add_device_to_domain(&sh7372_a4r, &veu0_device); | ||
1027 | sh7372_add_device_to_domain(&sh7372_a4r, &veu1_device); | ||
1028 | sh7372_add_device_to_domain(&sh7372_a4r, &veu2_device); | ||
1029 | sh7372_add_device_to_domain(&sh7372_a4r, &veu3_device); | ||
1030 | sh7372_add_device_to_domain(&sh7372_a4r, &jpu_device); | ||
860 | } | 1031 | } |
861 | 1032 | ||
862 | void __init sh7372_add_early_devices(void) | 1033 | void __init sh7372_add_early_devices(void) |
diff --git a/arch/arm/mach-shmobile/sleep-sh7372.S b/arch/arm/mach-shmobile/sleep-sh7372.S index d37d3ca4d18f..f3ab3c5810ea 100644 --- a/arch/arm/mach-shmobile/sleep-sh7372.S +++ b/arch/arm/mach-shmobile/sleep-sh7372.S | |||
@@ -30,58 +30,20 @@ | |||
30 | */ | 30 | */ |
31 | 31 | ||
32 | #include <linux/linkage.h> | 32 | #include <linux/linkage.h> |
33 | #include <linux/init.h> | ||
34 | #include <asm/memory.h> | ||
33 | #include <asm/assembler.h> | 35 | #include <asm/assembler.h> |
34 | 36 | ||
35 | #define SMFRAM 0xe6a70000 | 37 | #if defined(CONFIG_SUSPEND) || defined(CONFIG_CPU_IDLE) |
36 | 38 | .align 12 | |
37 | .align | 39 | .text |
38 | kernel_flush: | 40 | .global sh7372_resume_core_standby_a3sm |
39 | .word v7_flush_dcache_all | 41 | sh7372_resume_core_standby_a3sm: |
40 | 42 | ldr pc, 1f | |
41 | .align 3 | 43 | 1: .long cpu_resume - PAGE_OFFSET + PLAT_PHYS_OFFSET |
42 | ENTRY(sh7372_cpu_suspend) | ||
43 | stmfd sp!, {r0-r12, lr} @ save registers on stack | ||
44 | |||
45 | ldr r8, =SMFRAM | ||
46 | |||
47 | mov r4, sp @ Store sp | ||
48 | mrs r5, spsr @ Store spsr | ||
49 | mov r6, lr @ Store lr | ||
50 | stmia r8!, {r4-r6} | ||
51 | |||
52 | mrc p15, 0, r4, c1, c0, 2 @ Coprocessor access control register | ||
53 | mrc p15, 0, r5, c2, c0, 0 @ TTBR0 | ||
54 | mrc p15, 0, r6, c2, c0, 1 @ TTBR1 | ||
55 | mrc p15, 0, r7, c2, c0, 2 @ TTBCR | ||
56 | stmia r8!, {r4-r7} | ||
57 | |||
58 | mrc p15, 0, r4, c3, c0, 0 @ Domain access Control Register | ||
59 | mrc p15, 0, r5, c10, c2, 0 @ PRRR | ||
60 | mrc p15, 0, r6, c10, c2, 1 @ NMRR | ||
61 | stmia r8!,{r4-r6} | ||
62 | |||
63 | mrc p15, 0, r4, c13, c0, 1 @ Context ID | ||
64 | mrc p15, 0, r5, c13, c0, 2 @ User r/w thread and process ID | ||
65 | mrc p15, 0, r6, c12, c0, 0 @ Secure or NS vector base address | ||
66 | mrs r7, cpsr @ Store current cpsr | ||
67 | stmia r8!, {r4-r7} | ||
68 | |||
69 | mrc p15, 0, r4, c1, c0, 0 @ save control register | ||
70 | stmia r8!, {r4} | ||
71 | |||
72 | /* | ||
73 | * jump out to kernel flush routine | ||
74 | * - reuse that code is better | ||
75 | * - it executes in a cached space so is faster than refetch per-block | ||
76 | * - should be faster and will change with kernel | ||
77 | * - 'might' have to copy address, load and jump to it | ||
78 | * Flush all data from the L1 data cache before disabling | ||
79 | * SCTLR.C bit. | ||
80 | */ | ||
81 | ldr r1, kernel_flush | ||
82 | mov lr, pc | ||
83 | bx r1 | ||
84 | 44 | ||
45 | .global sh7372_do_idle_a3sm | ||
46 | sh7372_do_idle_a3sm: | ||
85 | /* | 47 | /* |
86 | * Clear the SCTLR.C bit to prevent further data cache | 48 | * Clear the SCTLR.C bit to prevent further data cache |
87 | * allocation. Clearing SCTLR.C would make all the data accesses | 49 | * allocation. Clearing SCTLR.C would make all the data accesses |
@@ -92,10 +54,13 @@ ENTRY(sh7372_cpu_suspend) | |||
92 | mcr p15, 0, r0, c1, c0, 0 | 54 | mcr p15, 0, r0, c1, c0, 0 |
93 | isb | 55 | isb |
94 | 56 | ||
57 | /* disable L2 cache in the aux control register */ | ||
58 | mrc p15, 0, r10, c1, c0, 1 | ||
59 | bic r10, r10, #2 | ||
60 | mcr p15, 0, r10, c1, c0, 1 | ||
61 | |||
95 | /* | 62 | /* |
96 | * Invalidate L1 data cache. Even though only invalidate is | 63 | * Invalidate data cache again. |
97 | * necessary exported flush API is used here. Doing clean | ||
98 | * on already clean cache would be almost NOP. | ||
99 | */ | 64 | */ |
100 | ldr r1, kernel_flush | 65 | ldr r1, kernel_flush |
101 | blx r1 | 66 | blx r1 |
@@ -115,146 +80,16 @@ ENTRY(sh7372_cpu_suspend) | |||
115 | dsb | 80 | dsb |
116 | dmb | 81 | dmb |
117 | 82 | ||
118 | /* | 83 | #define SPDCR 0xe6180008 |
119 | * =================================== | 84 | #define A3SM (1 << 12) |
120 | * == WFI instruction => Enter idle == | ||
121 | * =================================== | ||
122 | */ | ||
123 | wfi @ wait for interrupt | ||
124 | |||
125 | /* | ||
126 | * =================================== | ||
127 | * == Resume path for non-OFF modes == | ||
128 | * =================================== | ||
129 | */ | ||
130 | mrc p15, 0, r0, c1, c0, 0 | ||
131 | tst r0, #(1 << 2) @ Check C bit enabled? | ||
132 | orreq r0, r0, #(1 << 2) @ Enable the C bit if cleared | ||
133 | mcreq p15, 0, r0, c1, c0, 0 | ||
134 | isb | ||
135 | |||
136 | /* | ||
137 | * =================================== | ||
138 | * == Exit point from non-OFF modes == | ||
139 | * =================================== | ||
140 | */ | ||
141 | ldmfd sp!, {r0-r12, pc} @ restore regs and return | ||
142 | 85 | ||
143 | .pool | 86 | /* A3SM power down */ |
87 | ldr r0, =SPDCR | ||
88 | ldr r1, =A3SM | ||
89 | str r1, [r0] | ||
90 | 1: | ||
91 | b 1b | ||
144 | 92 | ||
145 | .align 12 | 93 | kernel_flush: |
146 | .text | 94 | .word v7_flush_dcache_all |
147 | .global sh7372_cpu_resume | 95 | #endif |
148 | sh7372_cpu_resume: | ||
149 | |||
150 | mov r1, #0 | ||
151 | /* | ||
152 | * Invalidate all instruction caches to PoU | ||
153 | * and flush branch target cache | ||
154 | */ | ||
155 | mcr p15, 0, r1, c7, c5, 0 | ||
156 | |||
157 | ldr r3, =SMFRAM | ||
158 | |||
159 | ldmia r3!, {r4-r6} | ||
160 | mov sp, r4 @ Restore sp | ||
161 | msr spsr_cxsf, r5 @ Restore spsr | ||
162 | mov lr, r6 @ Restore lr | ||
163 | |||
164 | ldmia r3!, {r4-r7} | ||
165 | mcr p15, 0, r4, c1, c0, 2 @ Coprocessor access Control Register | ||
166 | mcr p15, 0, r5, c2, c0, 0 @ TTBR0 | ||
167 | mcr p15, 0, r6, c2, c0, 1 @ TTBR1 | ||
168 | mcr p15, 0, r7, c2, c0, 2 @ TTBCR | ||
169 | |||
170 | ldmia r3!,{r4-r6} | ||
171 | mcr p15, 0, r4, c3, c0, 0 @ Domain access Control Register | ||
172 | mcr p15, 0, r5, c10, c2, 0 @ PRRR | ||
173 | mcr p15, 0, r6, c10, c2, 1 @ NMRR | ||
174 | |||
175 | ldmia r3!,{r4-r7} | ||
176 | mcr p15, 0, r4, c13, c0, 1 @ Context ID | ||
177 | mcr p15, 0, r5, c13, c0, 2 @ User r/w thread and process ID | ||
178 | mrc p15, 0, r6, c12, c0, 0 @ Secure or NS vector base address | ||
179 | msr cpsr, r7 @ store cpsr | ||
180 | |||
181 | /* Starting to enable MMU here */ | ||
182 | mrc p15, 0, r7, c2, c0, 2 @ Read TTBRControl | ||
183 | /* Extract N (0:2) bits and decide whether to use TTBR0 or TTBR1 */ | ||
184 | and r7, #0x7 | ||
185 | cmp r7, #0x0 | ||
186 | beq usettbr0 | ||
187 | ttbr_error: | ||
188 | /* | ||
189 | * More work needs to be done to support N[0:2] value other than 0 | ||
190 | * So looping here so that the error can be detected | ||
191 | */ | ||
192 | b ttbr_error | ||
193 | |||
194 | .align | ||
195 | cache_pred_disable_mask: | ||
196 | .word 0xFFFFE7FB | ||
197 | ttbrbit_mask: | ||
198 | .word 0xFFFFC000 | ||
199 | table_index_mask: | ||
200 | .word 0xFFF00000 | ||
201 | table_entry: | ||
202 | .word 0x00000C02 | ||
203 | usettbr0: | ||
204 | |||
205 | mrc p15, 0, r2, c2, c0, 0 | ||
206 | ldr r5, ttbrbit_mask | ||
207 | and r2, r5 | ||
208 | mov r4, pc | ||
209 | ldr r5, table_index_mask | ||
210 | and r4, r5 @ r4 = 31 to 20 bits of pc | ||
211 | /* Extract the value to be written to table entry */ | ||
212 | ldr r6, table_entry | ||
213 | /* r6 has the value to be written to table entry */ | ||
214 | add r6, r6, r4 | ||
215 | /* Getting the address of table entry to modify */ | ||
216 | lsr r4, #18 | ||
217 | /* r2 has the location which needs to be modified */ | ||
218 | add r2, r4 | ||
219 | ldr r4, [r2] | ||
220 | str r6, [r2] /* modify the table entry */ | ||
221 | |||
222 | mov r7, r6 | ||
223 | mov r5, r2 | ||
224 | mov r6, r4 | ||
225 | /* r5 = original page table address */ | ||
226 | /* r6 = original page table data */ | ||
227 | |||
228 | mov r0, #0 | ||
229 | mcr p15, 0, r0, c7, c5, 4 @ Flush prefetch buffer | ||
230 | mcr p15, 0, r0, c7, c5, 6 @ Invalidate branch predictor array | ||
231 | mcr p15, 0, r0, c8, c5, 0 @ Invalidate instruction TLB | ||
232 | mcr p15, 0, r0, c8, c6, 0 @ Invalidate data TLB | ||
233 | |||
234 | /* | ||
235 | * Restore control register. This enables the MMU. | ||
236 | * The caches and prediction are not enabled here, they | ||
237 | * will be enabled after restoring the MMU table entry. | ||
238 | */ | ||
239 | ldmia r3!, {r4} | ||
240 | stmia r3!, {r5} /* save original page table address */ | ||
241 | stmia r3!, {r6} /* save original page table data */ | ||
242 | stmia r3!, {r7} /* save modified page table data */ | ||
243 | |||
244 | ldr r2, cache_pred_disable_mask | ||
245 | and r4, r2 | ||
246 | mcr p15, 0, r4, c1, c0, 0 | ||
247 | dsb | ||
248 | isb | ||
249 | |||
250 | ldr r0, =restoremmu_on | ||
251 | bx r0 | ||
252 | |||
253 | /* | ||
254 | * ============================== | ||
255 | * == Exit point from OFF mode == | ||
256 | * ============================== | ||
257 | */ | ||
258 | restoremmu_on: | ||
259 | |||
260 | ldmfd sp!, {r0-r12, pc} @ restore regs and return | ||
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/Kconfig b/arch/arm/mach-u300/Kconfig index 7b5c229dc7ea..d6e5d306557b 100644 --- a/arch/arm/mach-u300/Kconfig +++ b/arch/arm/mach-u300/Kconfig | |||
@@ -6,6 +6,8 @@ comment "ST-Ericsson Mobile Platform Products" | |||
6 | 6 | ||
7 | config MACH_U300 | 7 | config MACH_U300 |
8 | bool "U300" | 8 | bool "U300" |
9 | select PINCTRL | ||
10 | select PINMUX_U300 | ||
9 | select GPIO_U300 | 11 | select GPIO_U300 |
10 | 12 | ||
11 | comment "ST-Ericsson U300/U330/U335/U365 Feature Selections" | 13 | comment "ST-Ericsson U300/U330/U335/U365 Feature Selections" |
diff --git a/arch/arm/mach-u300/Makefile b/arch/arm/mach-u300/Makefile index 8fd354aaf0a7..285538124e5e 100644 --- a/arch/arm/mach-u300/Makefile +++ b/arch/arm/mach-u300/Makefile | |||
@@ -2,7 +2,7 @@ | |||
2 | # Makefile for the linux kernel, U300 machine. | 2 | # Makefile for the linux kernel, U300 machine. |
3 | # | 3 | # |
4 | 4 | ||
5 | obj-y := core.o clock.o timer.o padmux.o | 5 | obj-y := core.o clock.o timer.o |
6 | obj-m := | 6 | obj-m := |
7 | obj-n := | 7 | obj-n := |
8 | obj- := | 8 | obj- := |
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-u300/core.c b/arch/arm/mach-u300/core.c index fd435f44098b..24f3a96aac35 100644 --- a/arch/arm/mach-u300/core.c +++ b/arch/arm/mach-u300/core.c | |||
@@ -25,6 +25,8 @@ | |||
25 | #include <linux/err.h> | 25 | #include <linux/err.h> |
26 | #include <linux/mtd/nand.h> | 26 | #include <linux/mtd/nand.h> |
27 | #include <linux/mtd/fsmc.h> | 27 | #include <linux/mtd/fsmc.h> |
28 | #include <linux/pinctrl/machine.h> | ||
29 | #include <linux/pinctrl/pinmux.h> | ||
28 | 30 | ||
29 | #include <asm/types.h> | 31 | #include <asm/types.h> |
30 | #include <asm/setup.h> | 32 | #include <asm/setup.h> |
@@ -1536,6 +1538,14 @@ static struct coh901318_platform coh901318_platform = { | |||
1536 | .max_channels = U300_DMA_CHANNELS, | 1538 | .max_channels = U300_DMA_CHANNELS, |
1537 | }; | 1539 | }; |
1538 | 1540 | ||
1541 | static struct resource pinmux_resources[] = { | ||
1542 | { | ||
1543 | .start = U300_SYSCON_BASE, | ||
1544 | .end = U300_SYSCON_BASE + SZ_4K - 1, | ||
1545 | .flags = IORESOURCE_MEM, | ||
1546 | }, | ||
1547 | }; | ||
1548 | |||
1539 | static struct platform_device wdog_device = { | 1549 | static struct platform_device wdog_device = { |
1540 | .name = "coh901327_wdog", | 1550 | .name = "coh901327_wdog", |
1541 | .id = -1, | 1551 | .id = -1, |
@@ -1655,6 +1665,72 @@ static struct platform_device dma_device = { | |||
1655 | }, | 1665 | }, |
1656 | }; | 1666 | }; |
1657 | 1667 | ||
1668 | static struct platform_device pinmux_device = { | ||
1669 | .name = "pinmux-u300", | ||
1670 | .id = -1, | ||
1671 | .num_resources = ARRAY_SIZE(pinmux_resources), | ||
1672 | .resource = pinmux_resources, | ||
1673 | }; | ||
1674 | |||
1675 | /* Pinmux settings */ | ||
1676 | static struct pinmux_map u300_pinmux_map[] = { | ||
1677 | /* anonymous maps for chip power and EMIFs */ | ||
1678 | PINMUX_MAP_PRIMARY_SYS_HOG("POWER", "power"), | ||
1679 | PINMUX_MAP_PRIMARY_SYS_HOG("EMIF0", "emif0"), | ||
1680 | PINMUX_MAP_PRIMARY_SYS_HOG("EMIF1", "emif1"), | ||
1681 | /* per-device maps for MMC/SD, SPI and UART */ | ||
1682 | PINMUX_MAP_PRIMARY("MMCSD", "mmc0", "mmci"), | ||
1683 | PINMUX_MAP_PRIMARY("SPI", "spi0", "pl022"), | ||
1684 | PINMUX_MAP_PRIMARY("UART0", "uart0", "uart0"), | ||
1685 | }; | ||
1686 | |||
1687 | struct u300_mux_hog { | ||
1688 | const char *name; | ||
1689 | struct device *dev; | ||
1690 | struct pinmux *pmx; | ||
1691 | }; | ||
1692 | |||
1693 | static struct u300_mux_hog u300_mux_hogs[] = { | ||
1694 | { | ||
1695 | .name = "uart0", | ||
1696 | .dev = &uart0_device.dev, | ||
1697 | }, | ||
1698 | { | ||
1699 | .name = "spi0", | ||
1700 | .dev = &pl022_device.dev, | ||
1701 | }, | ||
1702 | { | ||
1703 | .name = "mmc0", | ||
1704 | .dev = &mmcsd_device.dev, | ||
1705 | }, | ||
1706 | }; | ||
1707 | |||
1708 | static int __init u300_pinmux_fetch(void) | ||
1709 | { | ||
1710 | int i; | ||
1711 | |||
1712 | for (i = 0; i < ARRAY_SIZE(u300_mux_hogs); i++) { | ||
1713 | struct pinmux *pmx; | ||
1714 | int ret; | ||
1715 | |||
1716 | pmx = pinmux_get(u300_mux_hogs[i].dev, NULL); | ||
1717 | if (IS_ERR(pmx)) { | ||
1718 | pr_err("u300: could not get pinmux hog %s\n", | ||
1719 | u300_mux_hogs[i].name); | ||
1720 | continue; | ||
1721 | } | ||
1722 | ret = pinmux_enable(pmx); | ||
1723 | if (ret) { | ||
1724 | pr_err("u300: could enable pinmux hog %s\n", | ||
1725 | u300_mux_hogs[i].name); | ||
1726 | continue; | ||
1727 | } | ||
1728 | u300_mux_hogs[i].pmx = pmx; | ||
1729 | } | ||
1730 | return 0; | ||
1731 | } | ||
1732 | subsys_initcall(u300_pinmux_fetch); | ||
1733 | |||
1658 | /* | 1734 | /* |
1659 | * Notice that AMBA devices are initialized before platform devices. | 1735 | * Notice that AMBA devices are initialized before platform devices. |
1660 | * | 1736 | * |
@@ -1668,10 +1744,10 @@ static struct platform_device *platform_devs[] __initdata = { | |||
1668 | &gpio_device, | 1744 | &gpio_device, |
1669 | &nand_device, | 1745 | &nand_device, |
1670 | &wdog_device, | 1746 | &wdog_device, |
1671 | &ave_device | 1747 | &ave_device, |
1748 | &pinmux_device, | ||
1672 | }; | 1749 | }; |
1673 | 1750 | ||
1674 | |||
1675 | /* | 1751 | /* |
1676 | * Interrupts: the U300 platforms have two pl190 ARM PrimeCells connected | 1752 | * Interrupts: the U300 platforms have two pl190 ARM PrimeCells connected |
1677 | * together so some interrupts are connected to the first one and some | 1753 | * together so some interrupts are connected to the first one and some |
@@ -1853,6 +1929,10 @@ void __init u300_init_devices(void) | |||
1853 | 1929 | ||
1854 | u300_assign_physmem(); | 1930 | u300_assign_physmem(); |
1855 | 1931 | ||
1932 | /* Initialize pinmuxing */ | ||
1933 | pinmux_register_mappings(u300_pinmux_map, | ||
1934 | ARRAY_SIZE(u300_pinmux_map)); | ||
1935 | |||
1856 | /* Register subdevices on the I2C buses */ | 1936 | /* Register subdevices on the I2C buses */ |
1857 | u300_i2c_register_board_devices(); | 1937 | u300_i2c_register_board_devices(); |
1858 | 1938 | ||
diff --git a/arch/arm/mach-u300/include/mach/syscon.h b/arch/arm/mach-u300/include/mach/syscon.h index 7444f5c7da97..6e84f07a7c6f 100644 --- a/arch/arm/mach-u300/include/mach/syscon.h +++ b/arch/arm/mach-u300/include/mach/syscon.h | |||
@@ -234,91 +234,6 @@ | |||
234 | #define U300_SYSCON_ECCR_EMIF_1_RET_OUT_CLK_EN_N_DISABLE (0x0004) | 234 | #define U300_SYSCON_ECCR_EMIF_1_RET_OUT_CLK_EN_N_DISABLE (0x0004) |
235 | #define U300_SYSCON_ECCR_EMIF_MEMCLK_RET_EN_N_DISABLE (0x0002) | 235 | #define U300_SYSCON_ECCR_EMIF_MEMCLK_RET_EN_N_DISABLE (0x0002) |
236 | #define U300_SYSCON_ECCR_EMIF_SDRCLK_RET_EN_N_DISABLE (0x0001) | 236 | #define U300_SYSCON_ECCR_EMIF_SDRCLK_RET_EN_N_DISABLE (0x0001) |
237 | /* PAD MUX Control register 1 (LOW) 16bit (R/W) */ | ||
238 | #define U300_SYSCON_PMC1LR (0x007C) | ||
239 | #define U300_SYSCON_PMC1LR_MASK (0xFFFF) | ||
240 | #define U300_SYSCON_PMC1LR_CDI_MASK (0xC000) | ||
241 | #define U300_SYSCON_PMC1LR_CDI_CDI (0x0000) | ||
242 | #define U300_SYSCON_PMC1LR_CDI_EMIF (0x4000) | ||
243 | #ifdef CONFIG_MACH_U300_BS335 | ||
244 | #define U300_SYSCON_PMC1LR_CDI_CDI2 (0x8000) | ||
245 | #define U300_SYSCON_PMC1LR_CDI_WCDMA_APP_GPIO (0xC000) | ||
246 | #elif CONFIG_MACH_U300_BS365 | ||
247 | #define U300_SYSCON_PMC1LR_CDI_GPIO (0x8000) | ||
248 | #define U300_SYSCON_PMC1LR_CDI_WCDMA (0xC000) | ||
249 | #endif | ||
250 | #define U300_SYSCON_PMC1LR_PDI_MASK (0x3000) | ||
251 | #define U300_SYSCON_PMC1LR_PDI_PDI (0x0000) | ||
252 | #define U300_SYSCON_PMC1LR_PDI_EGG (0x1000) | ||
253 | #define U300_SYSCON_PMC1LR_PDI_WCDMA (0x3000) | ||
254 | #define U300_SYSCON_PMC1LR_MMCSD_MASK (0x0C00) | ||
255 | #define U300_SYSCON_PMC1LR_MMCSD_MMCSD (0x0000) | ||
256 | #define U300_SYSCON_PMC1LR_MMCSD_MSPRO (0x0400) | ||
257 | #define U300_SYSCON_PMC1LR_MMCSD_DSP (0x0800) | ||
258 | #define U300_SYSCON_PMC1LR_MMCSD_WCDMA (0x0C00) | ||
259 | #define U300_SYSCON_PMC1LR_ETM_MASK (0x0300) | ||
260 | #define U300_SYSCON_PMC1LR_ETM_ACC (0x0000) | ||
261 | #define U300_SYSCON_PMC1LR_ETM_APP (0x0100) | ||
262 | #define U300_SYSCON_PMC1LR_EMIF_1_CS2_MASK (0x00C0) | ||
263 | #define U300_SYSCON_PMC1LR_EMIF_1_CS2_STATIC (0x0000) | ||
264 | #define U300_SYSCON_PMC1LR_EMIF_1_CS2_NFIF (0x0040) | ||
265 | #define U300_SYSCON_PMC1LR_EMIF_1_CS2_SDRAM (0x0080) | ||
266 | #define U300_SYSCON_PMC1LR_EMIF_1_CS2_STATIC_2GB (0x00C0) | ||
267 | #define U300_SYSCON_PMC1LR_EMIF_1_CS1_MASK (0x0030) | ||
268 | #define U300_SYSCON_PMC1LR_EMIF_1_CS1_STATIC (0x0000) | ||
269 | #define U300_SYSCON_PMC1LR_EMIF_1_CS1_NFIF (0x0010) | ||
270 | #define U300_SYSCON_PMC1LR_EMIF_1_CS1_SDRAM (0x0020) | ||
271 | #define U300_SYSCON_PMC1LR_EMIF_1_CS1_SEMI (0x0030) | ||
272 | #define U300_SYSCON_PMC1LR_EMIF_1_CS0_MASK (0x000C) | ||
273 | #define U300_SYSCON_PMC1LR_EMIF_1_CS0_STATIC (0x0000) | ||
274 | #define U300_SYSCON_PMC1LR_EMIF_1_CS0_NFIF (0x0004) | ||
275 | #define U300_SYSCON_PMC1LR_EMIF_1_CS0_SDRAM (0x0008) | ||
276 | #define U300_SYSCON_PMC1LR_EMIF_1_CS0_SEMI (0x000C) | ||
277 | #define U300_SYSCON_PMC1LR_EMIF_1_MASK (0x0003) | ||
278 | #define U300_SYSCON_PMC1LR_EMIF_1_STATIC (0x0000) | ||
279 | #define U300_SYSCON_PMC1LR_EMIF_1_SDRAM0 (0x0001) | ||
280 | #define U300_SYSCON_PMC1LR_EMIF_1_SDRAM1 (0x0002) | ||
281 | #define U300_SYSCON_PMC1LR_EMIF_1 (0x0003) | ||
282 | /* PAD MUX Control register 2 (HIGH) 16bit (R/W) */ | ||
283 | #define U300_SYSCON_PMC1HR (0x007E) | ||
284 | #define U300_SYSCON_PMC1HR_MASK (0xFFFF) | ||
285 | #define U300_SYSCON_PMC1HR_MISC_2_MASK (0xC000) | ||
286 | #define U300_SYSCON_PMC1HR_MISC_2_APP_GPIO (0x0000) | ||
287 | #define U300_SYSCON_PMC1HR_MISC_2_MSPRO (0x4000) | ||
288 | #define U300_SYSCON_PMC1HR_MISC_2_DSP (0x8000) | ||
289 | #define U300_SYSCON_PMC1HR_MISC_2_AAIF (0xC000) | ||
290 | #define U300_SYSCON_PMC1HR_APP_GPIO_2_MASK (0x3000) | ||
291 | #define U300_SYSCON_PMC1HR_APP_GPIO_2_APP_GPIO (0x0000) | ||
292 | #define U300_SYSCON_PMC1HR_APP_GPIO_2_NFIF (0x1000) | ||
293 | #define U300_SYSCON_PMC1HR_APP_GPIO_2_DSP (0x2000) | ||
294 | #define U300_SYSCON_PMC1HR_APP_GPIO_2_AAIF (0x3000) | ||
295 | #define U300_SYSCON_PMC1HR_APP_GPIO_1_MASK (0x0C00) | ||
296 | #define U300_SYSCON_PMC1HR_APP_GPIO_1_APP_GPIO (0x0000) | ||
297 | #define U300_SYSCON_PMC1HR_APP_GPIO_1_MMC (0x0400) | ||
298 | #define U300_SYSCON_PMC1HR_APP_GPIO_1_DSP (0x0800) | ||
299 | #define U300_SYSCON_PMC1HR_APP_GPIO_1_AAIF (0x0C00) | ||
300 | #define U300_SYSCON_PMC1HR_APP_SPI_CS_2_MASK (0x0300) | ||
301 | #define U300_SYSCON_PMC1HR_APP_SPI_CS_2_APP_GPIO (0x0000) | ||
302 | #define U300_SYSCON_PMC1HR_APP_SPI_CS_2_SPI (0x0100) | ||
303 | #define U300_SYSCON_PMC1HR_APP_SPI_CS_2_AAIF (0x0300) | ||
304 | #define U300_SYSCON_PMC1HR_APP_SPI_CS_1_MASK (0x00C0) | ||
305 | #define U300_SYSCON_PMC1HR_APP_SPI_CS_1_APP_GPIO (0x0000) | ||
306 | #define U300_SYSCON_PMC1HR_APP_SPI_CS_1_SPI (0x0040) | ||
307 | #define U300_SYSCON_PMC1HR_APP_SPI_CS_1_AAIF (0x00C0) | ||
308 | #define U300_SYSCON_PMC1HR_APP_SPI_2_MASK (0x0030) | ||
309 | #define U300_SYSCON_PMC1HR_APP_SPI_2_APP_GPIO (0x0000) | ||
310 | #define U300_SYSCON_PMC1HR_APP_SPI_2_SPI (0x0010) | ||
311 | #define U300_SYSCON_PMC1HR_APP_SPI_2_DSP (0x0020) | ||
312 | #define U300_SYSCON_PMC1HR_APP_SPI_2_AAIF (0x0030) | ||
313 | #define U300_SYSCON_PMC1HR_APP_UART0_2_MASK (0x000C) | ||
314 | #define U300_SYSCON_PMC1HR_APP_UART0_2_APP_GPIO (0x0000) | ||
315 | #define U300_SYSCON_PMC1HR_APP_UART0_2_UART0 (0x0004) | ||
316 | #define U300_SYSCON_PMC1HR_APP_UART0_2_NFIF_CS (0x0008) | ||
317 | #define U300_SYSCON_PMC1HR_APP_UART0_2_AAIF (0x000C) | ||
318 | #define U300_SYSCON_PMC1HR_APP_UART0_1_MASK (0x0003) | ||
319 | #define U300_SYSCON_PMC1HR_APP_UART0_1_APP_GPIO (0x0000) | ||
320 | #define U300_SYSCON_PMC1HR_APP_UART0_1_UART0 (0x0001) | ||
321 | #define U300_SYSCON_PMC1HR_APP_UART0_1_AAIF (0x0003) | ||
322 | /* Step one for killing the applications system 16bit (-/W) */ | 237 | /* Step one for killing the applications system 16bit (-/W) */ |
323 | #define U300_SYSCON_KA1R (0x0080) | 238 | #define U300_SYSCON_KA1R (0x0080) |
324 | #define U300_SYSCON_KA1R_MASK (0xFFFF) | 239 | #define U300_SYSCON_KA1R_MASK (0xFFFF) |
@@ -357,57 +272,6 @@ | |||
357 | #define U300_SYSCON_PUCR_EMIF_1_16BIT_PU_ENABLE (0x0080) | 272 | #define U300_SYSCON_PUCR_EMIF_1_16BIT_PU_ENABLE (0x0080) |
358 | #define U300_SYSCON_PUCR_EMIF_1_8BIT_PU_ENABLE (0x0040) | 273 | #define U300_SYSCON_PUCR_EMIF_1_8BIT_PU_ENABLE (0x0040) |
359 | #define U300_SYSCON_PUCR_KEY_IN_PU_EN_MASK (0x003F) | 274 | #define U300_SYSCON_PUCR_KEY_IN_PU_EN_MASK (0x003F) |
360 | /* Padmux 2 control */ | ||
361 | #define U300_SYSCON_PMC2R (0x100) | ||
362 | #define U300_SYSCON_PMC2R_APP_MISC_0_MASK (0x00C0) | ||
363 | #define U300_SYSCON_PMC2R_APP_MISC_0_APP_GPIO (0x0000) | ||
364 | #define U300_SYSCON_PMC2R_APP_MISC_0_EMIF_SDRAM (0x0040) | ||
365 | #define U300_SYSCON_PMC2R_APP_MISC_0_MMC (0x0080) | ||
366 | #define U300_SYSCON_PMC2R_APP_MISC_0_CDI2 (0x00C0) | ||
367 | #define U300_SYSCON_PMC2R_APP_MISC_1_MASK (0x0300) | ||
368 | #define U300_SYSCON_PMC2R_APP_MISC_1_APP_GPIO (0x0000) | ||
369 | #define U300_SYSCON_PMC2R_APP_MISC_1_EMIF_SDRAM (0x0100) | ||
370 | #define U300_SYSCON_PMC2R_APP_MISC_1_MMC (0x0200) | ||
371 | #define U300_SYSCON_PMC2R_APP_MISC_1_CDI2 (0x0300) | ||
372 | #define U300_SYSCON_PMC2R_APP_MISC_2_MASK (0x0C00) | ||
373 | #define U300_SYSCON_PMC2R_APP_MISC_2_APP_GPIO (0x0000) | ||
374 | #define U300_SYSCON_PMC2R_APP_MISC_2_EMIF_SDRAM (0x0400) | ||
375 | #define U300_SYSCON_PMC2R_APP_MISC_2_MMC (0x0800) | ||
376 | #define U300_SYSCON_PMC2R_APP_MISC_2_CDI2 (0x0C00) | ||
377 | #define U300_SYSCON_PMC2R_APP_MISC_3_MASK (0x3000) | ||
378 | #define U300_SYSCON_PMC2R_APP_MISC_3_APP_GPIO (0x0000) | ||
379 | #define U300_SYSCON_PMC2R_APP_MISC_3_EMIF_SDRAM (0x1000) | ||
380 | #define U300_SYSCON_PMC2R_APP_MISC_3_MMC (0x2000) | ||
381 | #define U300_SYSCON_PMC2R_APP_MISC_3_CDI2 (0x3000) | ||
382 | #define U300_SYSCON_PMC2R_APP_MISC_4_MASK (0xC000) | ||
383 | #define U300_SYSCON_PMC2R_APP_MISC_4_APP_GPIO (0x0000) | ||
384 | #define U300_SYSCON_PMC2R_APP_MISC_4_EMIF_SDRAM (0x4000) | ||
385 | #define U300_SYSCON_PMC2R_APP_MISC_4_MMC (0x8000) | ||
386 | #define U300_SYSCON_PMC2R_APP_MISC_4_ACC_GPIO (0xC000) | ||
387 | /* TODO: More SYSCON registers missing */ | ||
388 | #define U300_SYSCON_PMC3R (0x10c) | ||
389 | #define U300_SYSCON_PMC3R_APP_MISC_11_MASK (0xc000) | ||
390 | #define U300_SYSCON_PMC3R_APP_MISC_11_SPI (0x4000) | ||
391 | #define U300_SYSCON_PMC3R_APP_MISC_10_MASK (0x3000) | ||
392 | #define U300_SYSCON_PMC3R_APP_MISC_10_SPI (0x1000) | ||
393 | /* TODO: Missing other configs */ | ||
394 | #define U300_SYSCON_PMC4R (0x168) | ||
395 | #define U300_SYSCON_PMC4R_APP_MISC_12_MASK (0x0003) | ||
396 | #define U300_SYSCON_PMC4R_APP_MISC_12_APP_GPIO (0x0000) | ||
397 | #define U300_SYSCON_PMC4R_APP_MISC_13_MASK (0x000C) | ||
398 | #define U300_SYSCON_PMC4R_APP_MISC_13_CDI (0x0000) | ||
399 | #define U300_SYSCON_PMC4R_APP_MISC_13_SMIA (0x0004) | ||
400 | #define U300_SYSCON_PMC4R_APP_MISC_13_SMIA2 (0x0008) | ||
401 | #define U300_SYSCON_PMC4R_APP_MISC_13_APP_GPIO (0x000C) | ||
402 | #define U300_SYSCON_PMC4R_APP_MISC_14_MASK (0x0030) | ||
403 | #define U300_SYSCON_PMC4R_APP_MISC_14_CDI (0x0000) | ||
404 | #define U300_SYSCON_PMC4R_APP_MISC_14_SMIA (0x0010) | ||
405 | #define U300_SYSCON_PMC4R_APP_MISC_14_CDI2 (0x0020) | ||
406 | #define U300_SYSCON_PMC4R_APP_MISC_14_APP_GPIO (0x0030) | ||
407 | #define U300_SYSCON_PMC4R_APP_MISC_16_MASK (0x0300) | ||
408 | #define U300_SYSCON_PMC4R_APP_MISC_16_APP_GPIO_13 (0x0000) | ||
409 | #define U300_SYSCON_PMC4R_APP_MISC_16_APP_UART1_CTS (0x0100) | ||
410 | #define U300_SYSCON_PMC4R_APP_MISC_16_EMIF_1_STATIC_CS5_N (0x0200) | ||
411 | /* SYS_0_CLK_CONTROL first clock control 16bit (R/W) */ | 275 | /* SYS_0_CLK_CONTROL first clock control 16bit (R/W) */ |
412 | #define U300_SYSCON_S0CCR (0x120) | 276 | #define U300_SYSCON_S0CCR (0x120) |
413 | #define U300_SYSCON_S0CCR_FIELD_MASK (0x43FF) | 277 | #define U300_SYSCON_S0CCR_FIELD_MASK (0x43FF) |
diff --git a/arch/arm/mach-u300/mmc.c b/arch/arm/mach-u300/mmc.c index d9a5c92db74a..4d482aacc272 100644 --- a/arch/arm/mach-u300/mmc.c +++ b/arch/arm/mach-u300/mmc.c | |||
@@ -21,7 +21,6 @@ | |||
21 | #include <mach/gpio-u300.h> | 21 | #include <mach/gpio-u300.h> |
22 | 22 | ||
23 | #include "mmc.h" | 23 | #include "mmc.h" |
24 | #include "padmux.h" | ||
25 | 24 | ||
26 | static struct mmci_platform_data mmc0_plat_data = { | 25 | static struct mmci_platform_data mmc0_plat_data = { |
27 | /* | 26 | /* |
@@ -45,24 +44,9 @@ static struct mmci_platform_data mmc0_plat_data = { | |||
45 | int __devinit mmc_init(struct amba_device *adev) | 44 | int __devinit mmc_init(struct amba_device *adev) |
46 | { | 45 | { |
47 | struct device *mmcsd_device = &adev->dev; | 46 | struct device *mmcsd_device = &adev->dev; |
48 | struct pmx *pmx; | ||
49 | int ret = 0; | 47 | int ret = 0; |
50 | 48 | ||
51 | mmcsd_device->platform_data = &mmc0_plat_data; | 49 | mmcsd_device->platform_data = &mmc0_plat_data; |
52 | 50 | ||
53 | /* | ||
54 | * Setup padmuxing for MMC. Since this must always be | ||
55 | * compiled into the kernel, pmx is never released. | ||
56 | */ | ||
57 | pmx = pmx_get(mmcsd_device, U300_APP_PMX_MMC_SETTING); | ||
58 | |||
59 | if (IS_ERR(pmx)) | ||
60 | pr_warning("Could not get padmux handle\n"); | ||
61 | else { | ||
62 | ret = pmx_activate(mmcsd_device, pmx); | ||
63 | if (IS_ERR_VALUE(ret)) | ||
64 | pr_warning("Could not activate padmuxing\n"); | ||
65 | } | ||
66 | |||
67 | return ret; | 51 | return ret; |
68 | } | 52 | } |
diff --git a/arch/arm/mach-u300/padmux.c b/arch/arm/mach-u300/padmux.c deleted file mode 100644 index 4c93c6cefd37..000000000000 --- a/arch/arm/mach-u300/padmux.c +++ /dev/null | |||
@@ -1,367 +0,0 @@ | |||
1 | /* | ||
2 | * | ||
3 | * arch/arm/mach-u300/padmux.c | ||
4 | * | ||
5 | * | ||
6 | * Copyright (C) 2009 ST-Ericsson AB | ||
7 | * License terms: GNU General Public License (GPL) version 2 | ||
8 | * U300 PADMUX functions | ||
9 | * Author: Martin Persson <martin.persson@stericsson.com> | ||
10 | */ | ||
11 | |||
12 | #include <linux/module.h> | ||
13 | #include <linux/kernel.h> | ||
14 | #include <linux/device.h> | ||
15 | #include <linux/err.h> | ||
16 | #include <linux/errno.h> | ||
17 | #include <linux/io.h> | ||
18 | #include <linux/mutex.h> | ||
19 | #include <linux/string.h> | ||
20 | #include <linux/bug.h> | ||
21 | #include <linux/debugfs.h> | ||
22 | #include <linux/seq_file.h> | ||
23 | #include <mach/u300-regs.h> | ||
24 | #include <mach/syscon.h> | ||
25 | #include "padmux.h" | ||
26 | |||
27 | static DEFINE_MUTEX(pmx_mutex); | ||
28 | |||
29 | const u32 pmx_registers[] = { | ||
30 | (U300_SYSCON_VBASE + U300_SYSCON_PMC1LR), | ||
31 | (U300_SYSCON_VBASE + U300_SYSCON_PMC1HR), | ||
32 | (U300_SYSCON_VBASE + U300_SYSCON_PMC2R), | ||
33 | (U300_SYSCON_VBASE + U300_SYSCON_PMC3R), | ||
34 | (U300_SYSCON_VBASE + U300_SYSCON_PMC4R) | ||
35 | }; | ||
36 | |||
37 | /* High level functionality */ | ||
38 | |||
39 | /* Lazy dog: | ||
40 | * onmask = { | ||
41 | * {"PMC1LR" mask, "PMC1LR" value}, | ||
42 | * {"PMC1HR" mask, "PMC1HR" value}, | ||
43 | * {"PMC2R" mask, "PMC2R" value}, | ||
44 | * {"PMC3R" mask, "PMC3R" value}, | ||
45 | * {"PMC4R" mask, "PMC4R" value} | ||
46 | * } | ||
47 | */ | ||
48 | static struct pmx mmc_setting = { | ||
49 | .setting = U300_APP_PMX_MMC_SETTING, | ||
50 | .default_on = false, | ||
51 | .activated = false, | ||
52 | .name = "MMC", | ||
53 | .onmask = { | ||
54 | {U300_SYSCON_PMC1LR_MMCSD_MASK, | ||
55 | U300_SYSCON_PMC1LR_MMCSD_MMCSD}, | ||
56 | {0, 0}, | ||
57 | {0, 0}, | ||
58 | {0, 0}, | ||
59 | {U300_SYSCON_PMC4R_APP_MISC_12_MASK, | ||
60 | U300_SYSCON_PMC4R_APP_MISC_12_APP_GPIO} | ||
61 | }, | ||
62 | }; | ||
63 | |||
64 | static struct pmx spi_setting = { | ||
65 | .setting = U300_APP_PMX_SPI_SETTING, | ||
66 | .default_on = false, | ||
67 | .activated = false, | ||
68 | .name = "SPI", | ||
69 | .onmask = {{0, 0}, | ||
70 | {U300_SYSCON_PMC1HR_APP_SPI_2_MASK | | ||
71 | U300_SYSCON_PMC1HR_APP_SPI_CS_1_MASK | | ||
72 | U300_SYSCON_PMC1HR_APP_SPI_CS_2_MASK, | ||
73 | U300_SYSCON_PMC1HR_APP_SPI_2_SPI | | ||
74 | U300_SYSCON_PMC1HR_APP_SPI_CS_1_SPI | | ||
75 | U300_SYSCON_PMC1HR_APP_SPI_CS_2_SPI}, | ||
76 | {0, 0}, | ||
77 | {0, 0}, | ||
78 | {0, 0} | ||
79 | }, | ||
80 | }; | ||
81 | |||
82 | /* Available padmux settings */ | ||
83 | static struct pmx *pmx_settings[] = { | ||
84 | &mmc_setting, | ||
85 | &spi_setting, | ||
86 | }; | ||
87 | |||
88 | static void update_registers(struct pmx *pmx, bool activate) | ||
89 | { | ||
90 | u16 regval, val, mask; | ||
91 | int i; | ||
92 | |||
93 | for (i = 0; i < ARRAY_SIZE(pmx_registers); i++) { | ||
94 | if (activate) | ||
95 | val = pmx->onmask[i].val; | ||
96 | else | ||
97 | val = 0; | ||
98 | |||
99 | mask = pmx->onmask[i].mask; | ||
100 | if (mask != 0) { | ||
101 | regval = readw(pmx_registers[i]); | ||
102 | regval &= ~mask; | ||
103 | regval |= val; | ||
104 | writew(regval, pmx_registers[i]); | ||
105 | } | ||
106 | } | ||
107 | } | ||
108 | |||
109 | struct pmx *pmx_get(struct device *dev, enum pmx_settings setting) | ||
110 | { | ||
111 | int i; | ||
112 | struct pmx *pmx = ERR_PTR(-ENOENT); | ||
113 | |||
114 | if (dev == NULL) | ||
115 | return ERR_PTR(-EINVAL); | ||
116 | |||
117 | mutex_lock(&pmx_mutex); | ||
118 | for (i = 0; i < ARRAY_SIZE(pmx_settings); i++) { | ||
119 | |||
120 | if (setting == pmx_settings[i]->setting) { | ||
121 | |||
122 | if (pmx_settings[i]->dev != NULL) { | ||
123 | WARN(1, "padmux: required setting " | ||
124 | "in use by another consumer\n"); | ||
125 | } else { | ||
126 | pmx = pmx_settings[i]; | ||
127 | pmx->dev = dev; | ||
128 | dev_dbg(dev, "padmux: setting nr %d is now " | ||
129 | "bound to %s and ready to use\n", | ||
130 | setting, dev_name(dev)); | ||
131 | break; | ||
132 | } | ||
133 | } | ||
134 | } | ||
135 | mutex_unlock(&pmx_mutex); | ||
136 | |||
137 | return pmx; | ||
138 | } | ||
139 | EXPORT_SYMBOL(pmx_get); | ||
140 | |||
141 | int pmx_put(struct device *dev, struct pmx *pmx) | ||
142 | { | ||
143 | int i; | ||
144 | int ret = -ENOENT; | ||
145 | |||
146 | if (pmx == NULL || dev == NULL) | ||
147 | return -EINVAL; | ||
148 | |||
149 | mutex_lock(&pmx_mutex); | ||
150 | for (i = 0; i < ARRAY_SIZE(pmx_settings); i++) { | ||
151 | |||
152 | if (pmx->setting == pmx_settings[i]->setting) { | ||
153 | |||
154 | if (dev != pmx->dev) { | ||
155 | WARN(1, "padmux: cannot release handle as " | ||
156 | "it is bound to another consumer\n"); | ||
157 | ret = -EINVAL; | ||
158 | break; | ||
159 | } else { | ||
160 | pmx_settings[i]->dev = NULL; | ||
161 | ret = 0; | ||
162 | break; | ||
163 | } | ||
164 | } | ||
165 | } | ||
166 | mutex_unlock(&pmx_mutex); | ||
167 | |||
168 | return ret; | ||
169 | } | ||
170 | EXPORT_SYMBOL(pmx_put); | ||
171 | |||
172 | int pmx_activate(struct device *dev, struct pmx *pmx) | ||
173 | { | ||
174 | int i, j, ret; | ||
175 | ret = 0; | ||
176 | |||
177 | if (pmx == NULL || dev == NULL) | ||
178 | return -EINVAL; | ||
179 | |||
180 | mutex_lock(&pmx_mutex); | ||
181 | |||
182 | /* Make sure the required bits are not used */ | ||
183 | for (i = 0; i < ARRAY_SIZE(pmx_settings); i++) { | ||
184 | |||
185 | if (pmx_settings[i]->dev == NULL || pmx_settings[i] == pmx) | ||
186 | continue; | ||
187 | |||
188 | for (j = 0; j < ARRAY_SIZE(pmx_registers); j++) { | ||
189 | |||
190 | if (pmx_settings[i]->onmask[j].mask & pmx-> | ||
191 | onmask[j].mask) { | ||
192 | /* More than one entry on the same bits */ | ||
193 | WARN(1, "padmux: cannot activate " | ||
194 | "setting. Bit conflict with " | ||
195 | "an active setting\n"); | ||
196 | |||
197 | ret = -EUSERS; | ||
198 | goto exit; | ||
199 | } | ||
200 | } | ||
201 | } | ||
202 | update_registers(pmx, true); | ||
203 | pmx->activated = true; | ||
204 | dev_dbg(dev, "padmux: setting nr %d is activated\n", | ||
205 | pmx->setting); | ||
206 | |||
207 | exit: | ||
208 | mutex_unlock(&pmx_mutex); | ||
209 | return ret; | ||
210 | } | ||
211 | EXPORT_SYMBOL(pmx_activate); | ||
212 | |||
213 | int pmx_deactivate(struct device *dev, struct pmx *pmx) | ||
214 | { | ||
215 | int i; | ||
216 | int ret = -ENOENT; | ||
217 | |||
218 | if (pmx == NULL || dev == NULL) | ||
219 | return -EINVAL; | ||
220 | |||
221 | mutex_lock(&pmx_mutex); | ||
222 | for (i = 0; i < ARRAY_SIZE(pmx_settings); i++) { | ||
223 | |||
224 | if (pmx_settings[i]->dev == NULL) | ||
225 | continue; | ||
226 | |||
227 | if (pmx->setting == pmx_settings[i]->setting) { | ||
228 | |||
229 | if (dev != pmx->dev) { | ||
230 | WARN(1, "padmux: cannot deactivate " | ||
231 | "pmx setting as it was activated " | ||
232 | "by another consumer\n"); | ||
233 | |||
234 | ret = -EBUSY; | ||
235 | continue; | ||
236 | } else { | ||
237 | update_registers(pmx, false); | ||
238 | pmx_settings[i]->dev = NULL; | ||
239 | pmx->activated = false; | ||
240 | ret = 0; | ||
241 | dev_dbg(dev, "padmux: setting nr %d is deactivated", | ||
242 | pmx->setting); | ||
243 | break; | ||
244 | } | ||
245 | } | ||
246 | } | ||
247 | mutex_unlock(&pmx_mutex); | ||
248 | |||
249 | return ret; | ||
250 | } | ||
251 | EXPORT_SYMBOL(pmx_deactivate); | ||
252 | |||
253 | /* | ||
254 | * For internal use only. If it is to be exported, | ||
255 | * it should be reentrant. Notice that pmx_activate | ||
256 | * (i.e. runtime settings) always override default settings. | ||
257 | */ | ||
258 | static int pmx_set_default(void) | ||
259 | { | ||
260 | /* Used to identify several entries on the same bits */ | ||
261 | u16 modbits[ARRAY_SIZE(pmx_registers)]; | ||
262 | |||
263 | int i, j; | ||
264 | |||
265 | memset(modbits, 0, ARRAY_SIZE(pmx_registers) * sizeof(u16)); | ||
266 | |||
267 | for (i = 0; i < ARRAY_SIZE(pmx_settings); i++) { | ||
268 | |||
269 | if (!pmx_settings[i]->default_on) | ||
270 | continue; | ||
271 | |||
272 | for (j = 0; j < ARRAY_SIZE(pmx_registers); j++) { | ||
273 | |||
274 | /* Make sure there is only one entry on the same bits */ | ||
275 | if (modbits[j] & pmx_settings[i]->onmask[j].mask) { | ||
276 | BUG(); | ||
277 | return -EUSERS; | ||
278 | } | ||
279 | modbits[j] |= pmx_settings[i]->onmask[j].mask; | ||
280 | } | ||
281 | update_registers(pmx_settings[i], true); | ||
282 | } | ||
283 | return 0; | ||
284 | } | ||
285 | |||
286 | #if (defined(CONFIG_DEBUG_FS) && defined(CONFIG_U300_DEBUG)) | ||
287 | static int pmx_show(struct seq_file *s, void *data) | ||
288 | { | ||
289 | int i; | ||
290 | seq_printf(s, "-------------------------------------------------\n"); | ||
291 | seq_printf(s, "SETTING BOUND TO DEVICE STATE\n"); | ||
292 | seq_printf(s, "-------------------------------------------------\n"); | ||
293 | mutex_lock(&pmx_mutex); | ||
294 | for (i = 0; i < ARRAY_SIZE(pmx_settings); i++) { | ||
295 | /* Format pmx and device name nicely */ | ||
296 | char cdp[33]; | ||
297 | int chars; | ||
298 | |||
299 | chars = snprintf(&cdp[0], 17, "%s", pmx_settings[i]->name); | ||
300 | while (chars < 16) { | ||
301 | cdp[chars] = ' '; | ||
302 | chars++; | ||
303 | } | ||
304 | chars = snprintf(&cdp[16], 17, "%s", pmx_settings[i]->dev ? | ||
305 | dev_name(pmx_settings[i]->dev) : "N/A"); | ||
306 | while (chars < 16) { | ||
307 | cdp[chars+16] = ' '; | ||
308 | chars++; | ||
309 | } | ||
310 | cdp[32] = '\0'; | ||
311 | |||
312 | seq_printf(s, | ||
313 | "%s\t%s\n", | ||
314 | &cdp[0], | ||
315 | pmx_settings[i]->activated ? | ||
316 | "ACTIVATED" : "DEACTIVATED" | ||
317 | ); | ||
318 | |||
319 | } | ||
320 | mutex_unlock(&pmx_mutex); | ||
321 | return 0; | ||
322 | } | ||
323 | |||
324 | static int pmx_open(struct inode *inode, struct file *file) | ||
325 | { | ||
326 | return single_open(file, pmx_show, NULL); | ||
327 | } | ||
328 | |||
329 | static const struct file_operations pmx_operations = { | ||
330 | .owner = THIS_MODULE, | ||
331 | .open = pmx_open, | ||
332 | .read = seq_read, | ||
333 | .llseek = seq_lseek, | ||
334 | .release = single_release, | ||
335 | }; | ||
336 | |||
337 | static int __init init_pmx_read_debugfs(void) | ||
338 | { | ||
339 | /* Expose a simple debugfs interface to view pmx settings */ | ||
340 | (void) debugfs_create_file("padmux", S_IFREG | S_IRUGO, | ||
341 | NULL, NULL, | ||
342 | &pmx_operations); | ||
343 | return 0; | ||
344 | } | ||
345 | |||
346 | /* | ||
347 | * This needs to come in after the core_initcall(), | ||
348 | * because debugfs is not available until | ||
349 | * the subsystems come up. | ||
350 | */ | ||
351 | module_init(init_pmx_read_debugfs); | ||
352 | #endif | ||
353 | |||
354 | static int __init pmx_init(void) | ||
355 | { | ||
356 | int ret; | ||
357 | |||
358 | ret = pmx_set_default(); | ||
359 | |||
360 | if (IS_ERR_VALUE(ret)) | ||
361 | pr_crit("padmux: default settings could not be set\n"); | ||
362 | |||
363 | return 0; | ||
364 | } | ||
365 | |||
366 | /* Should be initialized before consumers */ | ||
367 | core_initcall(pmx_init); | ||
diff --git a/arch/arm/mach-u300/padmux.h b/arch/arm/mach-u300/padmux.h deleted file mode 100644 index 6e8b86064097..000000000000 --- a/arch/arm/mach-u300/padmux.h +++ /dev/null | |||
@@ -1,39 +0,0 @@ | |||
1 | /* | ||
2 | * | ||
3 | * arch/arm/mach-u300/padmux.h | ||
4 | * | ||
5 | * | ||
6 | * Copyright (C) 2009 ST-Ericsson AB | ||
7 | * License terms: GNU General Public License (GPL) version 2 | ||
8 | * U300 PADMUX API | ||
9 | * Author: Martin Persson <martin.persson@stericsson.com> | ||
10 | */ | ||
11 | |||
12 | #ifndef __MACH_U300_PADMUX_H | ||
13 | #define __MACH_U300_PADMUX_H | ||
14 | |||
15 | enum pmx_settings { | ||
16 | U300_APP_PMX_MMC_SETTING, | ||
17 | U300_APP_PMX_SPI_SETTING | ||
18 | }; | ||
19 | |||
20 | struct pmx_onmask { | ||
21 | u16 mask; /* Mask bits */ | ||
22 | u16 val; /* Value when active */ | ||
23 | }; | ||
24 | |||
25 | struct pmx { | ||
26 | struct device *dev; | ||
27 | enum pmx_settings setting; | ||
28 | char *name; | ||
29 | bool activated; | ||
30 | bool default_on; | ||
31 | struct pmx_onmask onmask[]; | ||
32 | }; | ||
33 | |||
34 | struct pmx *pmx_get(struct device *dev, enum pmx_settings setting); | ||
35 | int pmx_put(struct device *dev, struct pmx *pmx); | ||
36 | int pmx_activate(struct device *dev, struct pmx *pmx); | ||
37 | int pmx_deactivate(struct device *dev, struct pmx *pmx); | ||
38 | |||
39 | #endif | ||
diff --git a/arch/arm/mach-u300/spi.c b/arch/arm/mach-u300/spi.c index 7b597e2b19e2..a1affacfa59c 100644 --- a/arch/arm/mach-u300/spi.c +++ b/arch/arm/mach-u300/spi.c | |||
@@ -14,8 +14,6 @@ | |||
14 | #include <mach/coh901318.h> | 14 | #include <mach/coh901318.h> |
15 | #include <mach/dma_channels.h> | 15 | #include <mach/dma_channels.h> |
16 | 16 | ||
17 | #include "padmux.h" | ||
18 | |||
19 | /* | 17 | /* |
20 | * The following is for the actual devices on the SSP/SPI bus | 18 | * The following is for the actual devices on the SSP/SPI bus |
21 | */ | 19 | */ |
@@ -95,25 +93,7 @@ static struct pl022_ssp_controller ssp_platform_data = { | |||
95 | 93 | ||
96 | void __init u300_spi_init(struct amba_device *adev) | 94 | void __init u300_spi_init(struct amba_device *adev) |
97 | { | 95 | { |
98 | struct pmx *pmx; | ||
99 | |||
100 | adev->dev.platform_data = &ssp_platform_data; | 96 | adev->dev.platform_data = &ssp_platform_data; |
101 | /* | ||
102 | * Setup padmuxing for SPI. Since this must always be | ||
103 | * compiled into the kernel, pmx is never released. | ||
104 | */ | ||
105 | pmx = pmx_get(&adev->dev, U300_APP_PMX_SPI_SETTING); | ||
106 | |||
107 | if (IS_ERR(pmx)) | ||
108 | dev_warn(&adev->dev, "Could not get padmux handle\n"); | ||
109 | else { | ||
110 | int ret; | ||
111 | |||
112 | ret = pmx_activate(&adev->dev, pmx); | ||
113 | if (IS_ERR_VALUE(ret)) | ||
114 | dev_warn(&adev->dev, "Could not activate padmuxing\n"); | ||
115 | } | ||
116 | |||
117 | } | 97 | } |
118 | 98 | ||
119 | void __init u300_spi_register_board_devices(void) | 99 | void __init u300_spi_register_board_devices(void) |
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-vexpress/v2m.c b/arch/arm/mach-vexpress/v2m.c index 9e6b93b1a043..d0d267a8d3f9 100644 --- a/arch/arm/mach-vexpress/v2m.c +++ b/arch/arm/mach-vexpress/v2m.c | |||
@@ -318,6 +318,10 @@ static struct clk v2m_sp804_clk = { | |||
318 | .rate = 1000000, | 318 | .rate = 1000000, |
319 | }; | 319 | }; |
320 | 320 | ||
321 | static struct clk v2m_ref_clk = { | ||
322 | .rate = 32768, | ||
323 | }; | ||
324 | |||
321 | static struct clk dummy_apb_pclk; | 325 | static struct clk dummy_apb_pclk; |
322 | 326 | ||
323 | static struct clk_lookup v2m_lookups[] = { | 327 | static struct clk_lookup v2m_lookups[] = { |
@@ -348,6 +352,9 @@ static struct clk_lookup v2m_lookups[] = { | |||
348 | }, { /* CLCD */ | 352 | }, { /* CLCD */ |
349 | .dev_id = "mb:clcd", | 353 | .dev_id = "mb:clcd", |
350 | .clk = &osc1_clk, | 354 | .clk = &osc1_clk, |
355 | }, { /* SP805 WDT */ | ||
356 | .dev_id = "mb:wdt", | ||
357 | .clk = &v2m_ref_clk, | ||
351 | }, { /* SP804 timers */ | 358 | }, { /* SP804 timers */ |
352 | .dev_id = "sp804", | 359 | .dev_id = "sp804", |
353 | .con_id = "v2m-timer0", | 360 | .con_id = "v2m-timer0", |
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-w90x900/cpu.c b/arch/arm/mach-w90x900/cpu.c index 83c56324a472..0a235e502330 100644 --- a/arch/arm/mach-w90x900/cpu.c +++ b/arch/arm/mach-w90x900/cpu.c | |||
@@ -60,7 +60,7 @@ static DEFINE_CLK(emc, 7); | |||
60 | static DEFINE_SUBCLK(rmii, 2); | 60 | static DEFINE_SUBCLK(rmii, 2); |
61 | static DEFINE_CLK(usbd, 8); | 61 | static DEFINE_CLK(usbd, 8); |
62 | static DEFINE_CLK(usbh, 9); | 62 | static DEFINE_CLK(usbh, 9); |
63 | static DEFINE_CLK(g2d, 10);; | 63 | static DEFINE_CLK(g2d, 10); |
64 | static DEFINE_CLK(pwm, 18); | 64 | static DEFINE_CLK(pwm, 18); |
65 | static DEFINE_CLK(ps2, 24); | 65 | static DEFINE_CLK(ps2, 24); |
66 | static DEFINE_CLK(kpi, 25); | 66 | static DEFINE_CLK(kpi, 25); |
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/abort-macro.S b/arch/arm/mm/abort-macro.S index 52162d59407a..2cbf68ef0e83 100644 --- a/arch/arm/mm/abort-macro.S +++ b/arch/arm/mm/abort-macro.S | |||
@@ -17,7 +17,7 @@ | |||
17 | cmp \tmp, # 0x5600 @ Is it ldrsb? | 17 | cmp \tmp, # 0x5600 @ Is it ldrsb? |
18 | orreq \tmp, \tmp, #1 << 11 @ Set L-bit if yes | 18 | orreq \tmp, \tmp, #1 << 11 @ Set L-bit if yes |
19 | tst \tmp, #1 << 11 @ L = 0 -> write | 19 | tst \tmp, #1 << 11 @ L = 0 -> write |
20 | orreq \psr, \psr, #1 << 11 @ yes. | 20 | orreq \fsr, \fsr, #1 << 11 @ yes. |
21 | b do_DataAbort | 21 | b do_DataAbort |
22 | not_thumb: | 22 | not_thumb: |
23 | .endm | 23 | .endm |
diff --git a/arch/arm/mm/alignment.c b/arch/arm/mm/alignment.c index be7c638b648b..c335c76e0d88 100644 --- a/arch/arm/mm/alignment.c +++ b/arch/arm/mm/alignment.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/sched.h> | 22 | #include <linux/sched.h> |
23 | #include <linux/uaccess.h> | 23 | #include <linux/uaccess.h> |
24 | 24 | ||
25 | #include <asm/system.h> | ||
25 | #include <asm/unaligned.h> | 26 | #include <asm/unaligned.h> |
26 | 27 | ||
27 | #include "fault.h" | 28 | #include "fault.h" |
@@ -85,6 +86,33 @@ core_param(alignment, ai_usermode, int, 0600); | |||
85 | #define UM_FIXUP (1 << 1) | 86 | #define UM_FIXUP (1 << 1) |
86 | #define UM_SIGNAL (1 << 2) | 87 | #define UM_SIGNAL (1 << 2) |
87 | 88 | ||
89 | /* Return true if and only if the ARMv6 unaligned access model is in use. */ | ||
90 | static bool cpu_is_v6_unaligned(void) | ||
91 | { | ||
92 | return cpu_architecture() >= CPU_ARCH_ARMv6 && (cr_alignment & CR_U); | ||
93 | } | ||
94 | |||
95 | static int safe_usermode(int new_usermode, bool warn) | ||
96 | { | ||
97 | /* | ||
98 | * ARMv6 and later CPUs can perform unaligned accesses for | ||
99 | * most single load and store instructions up to word size. | ||
100 | * LDM, STM, LDRD and STRD still need to be handled. | ||
101 | * | ||
102 | * Ignoring the alignment fault is not an option on these | ||
103 | * CPUs since we spin re-faulting the instruction without | ||
104 | * making any progress. | ||
105 | */ | ||
106 | if (cpu_is_v6_unaligned() && !(new_usermode & (UM_FIXUP | UM_SIGNAL))) { | ||
107 | new_usermode |= UM_FIXUP; | ||
108 | |||
109 | if (warn) | ||
110 | printk(KERN_WARNING "alignment: ignoring faults is unsafe on this CPU. Defaulting to fixup mode.\n"); | ||
111 | } | ||
112 | |||
113 | return new_usermode; | ||
114 | } | ||
115 | |||
88 | #ifdef CONFIG_PROC_FS | 116 | #ifdef CONFIG_PROC_FS |
89 | static const char *usermode_action[] = { | 117 | static const char *usermode_action[] = { |
90 | "ignored", | 118 | "ignored", |
@@ -125,7 +153,7 @@ static ssize_t alignment_proc_write(struct file *file, const char __user *buffer | |||
125 | if (get_user(mode, buffer)) | 153 | if (get_user(mode, buffer)) |
126 | return -EFAULT; | 154 | return -EFAULT; |
127 | if (mode >= '0' && mode <= '5') | 155 | if (mode >= '0' && mode <= '5') |
128 | ai_usermode = mode - '0'; | 156 | ai_usermode = safe_usermode(mode - '0', true); |
129 | } | 157 | } |
130 | return count; | 158 | return count; |
131 | } | 159 | } |
@@ -886,9 +914,16 @@ do_alignment(unsigned long addr, unsigned int fsr, struct pt_regs *regs) | |||
886 | if (ai_usermode & UM_FIXUP) | 914 | if (ai_usermode & UM_FIXUP) |
887 | goto fixup; | 915 | goto fixup; |
888 | 916 | ||
889 | if (ai_usermode & UM_SIGNAL) | 917 | if (ai_usermode & UM_SIGNAL) { |
890 | force_sig(SIGBUS, current); | 918 | siginfo_t si; |
891 | else { | 919 | |
920 | si.si_signo = SIGBUS; | ||
921 | si.si_errno = 0; | ||
922 | si.si_code = BUS_ADRALN; | ||
923 | si.si_addr = (void __user *)addr; | ||
924 | |||
925 | force_sig_info(si.si_signo, &si, current); | ||
926 | } else { | ||
892 | /* | 927 | /* |
893 | * We're about to disable the alignment trap and return to | 928 | * We're about to disable the alignment trap and return to |
894 | * user space. But if an interrupt occurs before actually | 929 | * user space. But if an interrupt occurs before actually |
@@ -926,20 +961,11 @@ static int __init alignment_init(void) | |||
926 | return -ENOMEM; | 961 | return -ENOMEM; |
927 | #endif | 962 | #endif |
928 | 963 | ||
929 | /* | 964 | if (cpu_is_v6_unaligned()) { |
930 | * ARMv6 and later CPUs can perform unaligned accesses for | ||
931 | * most single load and store instructions up to word size. | ||
932 | * LDM, STM, LDRD and STRD still need to be handled. | ||
933 | * | ||
934 | * Ignoring the alignment fault is not an option on these | ||
935 | * CPUs since we spin re-faulting the instruction without | ||
936 | * making any progress. | ||
937 | */ | ||
938 | if (cpu_architecture() >= CPU_ARCH_ARMv6 && (cr_alignment & CR_U)) { | ||
939 | cr_alignment &= ~CR_A; | 965 | cr_alignment &= ~CR_A; |
940 | cr_no_alignment &= ~CR_A; | 966 | cr_no_alignment &= ~CR_A; |
941 | set_cr(cr_alignment); | 967 | set_cr(cr_alignment); |
942 | ai_usermode = UM_FIXUP; | 968 | ai_usermode = safe_usermode(ai_usermode, false); |
943 | } | 969 | } |
944 | 970 | ||
945 | hook_fault_code(1, do_alignment, SIGBUS, BUS_ADRALN, | 971 | hook_fault_code(1, do_alignment, SIGBUS, BUS_ADRALN, |
diff --git a/arch/arm/mm/cache-l2x0.c b/arch/arm/mm/cache-l2x0.c index 44c086710d2b..8ac9e9f84790 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> |
@@ -26,15 +29,23 @@ | |||
26 | #define CACHE_LINE_SIZE 32 | 29 | #define CACHE_LINE_SIZE 32 |
27 | 30 | ||
28 | static void __iomem *l2x0_base; | 31 | static void __iomem *l2x0_base; |
29 | static DEFINE_SPINLOCK(l2x0_lock); | 32 | static DEFINE_RAW_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 |
@@ -115,9 +126,9 @@ static void l2x0_cache_sync(void) | |||
115 | { | 126 | { |
116 | unsigned long flags; | 127 | unsigned long flags; |
117 | 128 | ||
118 | spin_lock_irqsave(&l2x0_lock, flags); | 129 | raw_spin_lock_irqsave(&l2x0_lock, flags); |
119 | cache_sync(); | 130 | cache_sync(); |
120 | spin_unlock_irqrestore(&l2x0_lock, flags); | 131 | raw_spin_unlock_irqrestore(&l2x0_lock, flags); |
121 | } | 132 | } |
122 | 133 | ||
123 | static void __l2x0_flush_all(void) | 134 | static void __l2x0_flush_all(void) |
@@ -134,9 +145,9 @@ static void l2x0_flush_all(void) | |||
134 | unsigned long flags; | 145 | unsigned long flags; |
135 | 146 | ||
136 | /* clean all ways */ | 147 | /* clean all ways */ |
137 | spin_lock_irqsave(&l2x0_lock, flags); | 148 | raw_spin_lock_irqsave(&l2x0_lock, flags); |
138 | __l2x0_flush_all(); | 149 | __l2x0_flush_all(); |
139 | spin_unlock_irqrestore(&l2x0_lock, flags); | 150 | raw_spin_unlock_irqrestore(&l2x0_lock, flags); |
140 | } | 151 | } |
141 | 152 | ||
142 | static void l2x0_clean_all(void) | 153 | static void l2x0_clean_all(void) |
@@ -144,11 +155,11 @@ static void l2x0_clean_all(void) | |||
144 | unsigned long flags; | 155 | unsigned long flags; |
145 | 156 | ||
146 | /* clean all ways */ | 157 | /* clean all ways */ |
147 | spin_lock_irqsave(&l2x0_lock, flags); | 158 | raw_spin_lock_irqsave(&l2x0_lock, flags); |
148 | writel_relaxed(l2x0_way_mask, l2x0_base + L2X0_CLEAN_WAY); | 159 | writel_relaxed(l2x0_way_mask, l2x0_base + L2X0_CLEAN_WAY); |
149 | cache_wait_way(l2x0_base + L2X0_CLEAN_WAY, l2x0_way_mask); | 160 | cache_wait_way(l2x0_base + L2X0_CLEAN_WAY, l2x0_way_mask); |
150 | cache_sync(); | 161 | cache_sync(); |
151 | spin_unlock_irqrestore(&l2x0_lock, flags); | 162 | raw_spin_unlock_irqrestore(&l2x0_lock, flags); |
152 | } | 163 | } |
153 | 164 | ||
154 | static void l2x0_inv_all(void) | 165 | static void l2x0_inv_all(void) |
@@ -156,13 +167,13 @@ static void l2x0_inv_all(void) | |||
156 | unsigned long flags; | 167 | unsigned long flags; |
157 | 168 | ||
158 | /* invalidate all ways */ | 169 | /* invalidate all ways */ |
159 | spin_lock_irqsave(&l2x0_lock, flags); | 170 | raw_spin_lock_irqsave(&l2x0_lock, flags); |
160 | /* Invalidating when L2 is enabled is a nono */ | 171 | /* Invalidating when L2 is enabled is a nono */ |
161 | BUG_ON(readl(l2x0_base + L2X0_CTRL) & 1); | 172 | BUG_ON(readl(l2x0_base + L2X0_CTRL) & 1); |
162 | writel_relaxed(l2x0_way_mask, l2x0_base + L2X0_INV_WAY); | 173 | writel_relaxed(l2x0_way_mask, l2x0_base + L2X0_INV_WAY); |
163 | cache_wait_way(l2x0_base + L2X0_INV_WAY, l2x0_way_mask); | 174 | cache_wait_way(l2x0_base + L2X0_INV_WAY, l2x0_way_mask); |
164 | cache_sync(); | 175 | cache_sync(); |
165 | spin_unlock_irqrestore(&l2x0_lock, flags); | 176 | raw_spin_unlock_irqrestore(&l2x0_lock, flags); |
166 | } | 177 | } |
167 | 178 | ||
168 | static void l2x0_inv_range(unsigned long start, unsigned long end) | 179 | static void l2x0_inv_range(unsigned long start, unsigned long end) |
@@ -170,7 +181,7 @@ static void l2x0_inv_range(unsigned long start, unsigned long end) | |||
170 | void __iomem *base = l2x0_base; | 181 | void __iomem *base = l2x0_base; |
171 | unsigned long flags; | 182 | unsigned long flags; |
172 | 183 | ||
173 | spin_lock_irqsave(&l2x0_lock, flags); | 184 | raw_spin_lock_irqsave(&l2x0_lock, flags); |
174 | if (start & (CACHE_LINE_SIZE - 1)) { | 185 | if (start & (CACHE_LINE_SIZE - 1)) { |
175 | start &= ~(CACHE_LINE_SIZE - 1); | 186 | start &= ~(CACHE_LINE_SIZE - 1); |
176 | debug_writel(0x03); | 187 | debug_writel(0x03); |
@@ -195,13 +206,13 @@ static void l2x0_inv_range(unsigned long start, unsigned long end) | |||
195 | } | 206 | } |
196 | 207 | ||
197 | if (blk_end < end) { | 208 | if (blk_end < end) { |
198 | spin_unlock_irqrestore(&l2x0_lock, flags); | 209 | raw_spin_unlock_irqrestore(&l2x0_lock, flags); |
199 | spin_lock_irqsave(&l2x0_lock, flags); | 210 | raw_spin_lock_irqsave(&l2x0_lock, flags); |
200 | } | 211 | } |
201 | } | 212 | } |
202 | cache_wait(base + L2X0_INV_LINE_PA, 1); | 213 | cache_wait(base + L2X0_INV_LINE_PA, 1); |
203 | cache_sync(); | 214 | cache_sync(); |
204 | spin_unlock_irqrestore(&l2x0_lock, flags); | 215 | raw_spin_unlock_irqrestore(&l2x0_lock, flags); |
205 | } | 216 | } |
206 | 217 | ||
207 | static void l2x0_clean_range(unsigned long start, unsigned long end) | 218 | static void l2x0_clean_range(unsigned long start, unsigned long end) |
@@ -214,7 +225,7 @@ static void l2x0_clean_range(unsigned long start, unsigned long end) | |||
214 | return; | 225 | return; |
215 | } | 226 | } |
216 | 227 | ||
217 | spin_lock_irqsave(&l2x0_lock, flags); | 228 | raw_spin_lock_irqsave(&l2x0_lock, flags); |
218 | start &= ~(CACHE_LINE_SIZE - 1); | 229 | start &= ~(CACHE_LINE_SIZE - 1); |
219 | while (start < end) { | 230 | while (start < end) { |
220 | unsigned long blk_end = start + min(end - start, 4096UL); | 231 | unsigned long blk_end = start + min(end - start, 4096UL); |
@@ -225,13 +236,13 @@ static void l2x0_clean_range(unsigned long start, unsigned long end) | |||
225 | } | 236 | } |
226 | 237 | ||
227 | if (blk_end < end) { | 238 | if (blk_end < end) { |
228 | spin_unlock_irqrestore(&l2x0_lock, flags); | 239 | raw_spin_unlock_irqrestore(&l2x0_lock, flags); |
229 | spin_lock_irqsave(&l2x0_lock, flags); | 240 | raw_spin_lock_irqsave(&l2x0_lock, flags); |
230 | } | 241 | } |
231 | } | 242 | } |
232 | cache_wait(base + L2X0_CLEAN_LINE_PA, 1); | 243 | cache_wait(base + L2X0_CLEAN_LINE_PA, 1); |
233 | cache_sync(); | 244 | cache_sync(); |
234 | spin_unlock_irqrestore(&l2x0_lock, flags); | 245 | raw_spin_unlock_irqrestore(&l2x0_lock, flags); |
235 | } | 246 | } |
236 | 247 | ||
237 | static void l2x0_flush_range(unsigned long start, unsigned long end) | 248 | static void l2x0_flush_range(unsigned long start, unsigned long end) |
@@ -244,7 +255,7 @@ static void l2x0_flush_range(unsigned long start, unsigned long end) | |||
244 | return; | 255 | return; |
245 | } | 256 | } |
246 | 257 | ||
247 | spin_lock_irqsave(&l2x0_lock, flags); | 258 | raw_spin_lock_irqsave(&l2x0_lock, flags); |
248 | start &= ~(CACHE_LINE_SIZE - 1); | 259 | start &= ~(CACHE_LINE_SIZE - 1); |
249 | while (start < end) { | 260 | while (start < end) { |
250 | unsigned long blk_end = start + min(end - start, 4096UL); | 261 | unsigned long blk_end = start + min(end - start, 4096UL); |
@@ -257,24 +268,43 @@ static void l2x0_flush_range(unsigned long start, unsigned long end) | |||
257 | debug_writel(0x00); | 268 | debug_writel(0x00); |
258 | 269 | ||
259 | if (blk_end < end) { | 270 | if (blk_end < end) { |
260 | spin_unlock_irqrestore(&l2x0_lock, flags); | 271 | raw_spin_unlock_irqrestore(&l2x0_lock, flags); |
261 | spin_lock_irqsave(&l2x0_lock, flags); | 272 | raw_spin_lock_irqsave(&l2x0_lock, flags); |
262 | } | 273 | } |
263 | } | 274 | } |
264 | cache_wait(base + L2X0_CLEAN_INV_LINE_PA, 1); | 275 | cache_wait(base + L2X0_CLEAN_INV_LINE_PA, 1); |
265 | cache_sync(); | 276 | cache_sync(); |
266 | spin_unlock_irqrestore(&l2x0_lock, flags); | 277 | raw_spin_unlock_irqrestore(&l2x0_lock, flags); |
267 | } | 278 | } |
268 | 279 | ||
269 | static void l2x0_disable(void) | 280 | static void l2x0_disable(void) |
270 | { | 281 | { |
271 | unsigned long flags; | 282 | unsigned long flags; |
272 | 283 | ||
273 | spin_lock_irqsave(&l2x0_lock, flags); | 284 | raw_spin_lock_irqsave(&l2x0_lock, flags); |
274 | __l2x0_flush_all(); | 285 | __l2x0_flush_all(); |
275 | writel_relaxed(0, l2x0_base + L2X0_CTRL); | 286 | writel_relaxed(0, l2x0_base + L2X0_CTRL); |
276 | dsb(); | 287 | dsb(); |
277 | spin_unlock_irqrestore(&l2x0_lock, flags); | 288 | raw_spin_unlock_irqrestore(&l2x0_lock, flags); |
289 | } | ||
290 | |||
291 | static void l2x0_unlock(__u32 cache_id) | ||
292 | { | ||
293 | int lockregs; | ||
294 | int i; | ||
295 | |||
296 | if (cache_id == L2X0_CACHE_ID_PART_L310) | ||
297 | lockregs = 8; | ||
298 | else | ||
299 | /* L210 and unknown types */ | ||
300 | lockregs = 1; | ||
301 | |||
302 | for (i = 0; i < lockregs; i++) { | ||
303 | writel_relaxed(0x0, l2x0_base + L2X0_LOCKDOWN_WAY_D_BASE + | ||
304 | i * L2X0_LOCKDOWN_STRIDE); | ||
305 | writel_relaxed(0x0, l2x0_base + L2X0_LOCKDOWN_WAY_I_BASE + | ||
306 | i * L2X0_LOCKDOWN_STRIDE); | ||
307 | } | ||
278 | } | 308 | } |
279 | 309 | ||
280 | void __init l2x0_init(void __iomem *base, __u32 aux_val, __u32 aux_mask) | 310 | void __init l2x0_init(void __iomem *base, __u32 aux_val, __u32 aux_mask) |
@@ -328,10 +358,14 @@ void __init l2x0_init(void __iomem *base, __u32 aux_val, __u32 aux_mask) | |||
328 | * accessing the below registers will fault. | 358 | * accessing the below registers will fault. |
329 | */ | 359 | */ |
330 | if (!(readl_relaxed(l2x0_base + L2X0_CTRL) & 1)) { | 360 | if (!(readl_relaxed(l2x0_base + L2X0_CTRL) & 1)) { |
361 | /* Make sure that I&D is not locked down when starting */ | ||
362 | l2x0_unlock(cache_id); | ||
331 | 363 | ||
332 | /* l2x0 controller is disabled */ | 364 | /* l2x0 controller is disabled */ |
333 | writel_relaxed(aux, l2x0_base + L2X0_AUX_CTRL); | 365 | writel_relaxed(aux, l2x0_base + L2X0_AUX_CTRL); |
334 | 366 | ||
367 | l2x0_saved_regs.aux_ctrl = aux; | ||
368 | |||
335 | l2x0_inv_all(); | 369 | l2x0_inv_all(); |
336 | 370 | ||
337 | /* enable L2X0 */ | 371 | /* enable L2X0 */ |
@@ -351,3 +385,202 @@ void __init l2x0_init(void __iomem *base, __u32 aux_val, __u32 aux_mask) | |||
351 | 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", |
352 | ways, cache_id, aux, l2x0_size); | 386 | ways, cache_id, aux, l2x0_size); |
353 | } | 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/context.c b/arch/arm/mm/context.c index b0ee9ba3cfab..93aac068da94 100644 --- a/arch/arm/mm/context.c +++ b/arch/arm/mm/context.c | |||
@@ -16,7 +16,7 @@ | |||
16 | #include <asm/mmu_context.h> | 16 | #include <asm/mmu_context.h> |
17 | #include <asm/tlbflush.h> | 17 | #include <asm/tlbflush.h> |
18 | 18 | ||
19 | static DEFINE_SPINLOCK(cpu_asid_lock); | 19 | static DEFINE_RAW_SPINLOCK(cpu_asid_lock); |
20 | unsigned int cpu_last_asid = ASID_FIRST_VERSION; | 20 | unsigned int cpu_last_asid = ASID_FIRST_VERSION; |
21 | #ifdef CONFIG_SMP | 21 | #ifdef CONFIG_SMP |
22 | DEFINE_PER_CPU(struct mm_struct *, current_mm); | 22 | DEFINE_PER_CPU(struct mm_struct *, current_mm); |
@@ -31,7 +31,7 @@ DEFINE_PER_CPU(struct mm_struct *, current_mm); | |||
31 | void __init_new_context(struct task_struct *tsk, struct mm_struct *mm) | 31 | void __init_new_context(struct task_struct *tsk, struct mm_struct *mm) |
32 | { | 32 | { |
33 | mm->context.id = 0; | 33 | mm->context.id = 0; |
34 | spin_lock_init(&mm->context.id_lock); | 34 | raw_spin_lock_init(&mm->context.id_lock); |
35 | } | 35 | } |
36 | 36 | ||
37 | static void flush_context(void) | 37 | static void flush_context(void) |
@@ -58,7 +58,7 @@ static void set_mm_context(struct mm_struct *mm, unsigned int asid) | |||
58 | * the broadcast. This function is also called via IPI so the | 58 | * the broadcast. This function is also called via IPI so the |
59 | * mm->context.id_lock has to be IRQ-safe. | 59 | * mm->context.id_lock has to be IRQ-safe. |
60 | */ | 60 | */ |
61 | spin_lock_irqsave(&mm->context.id_lock, flags); | 61 | raw_spin_lock_irqsave(&mm->context.id_lock, flags); |
62 | if (likely((mm->context.id ^ cpu_last_asid) >> ASID_BITS)) { | 62 | if (likely((mm->context.id ^ cpu_last_asid) >> ASID_BITS)) { |
63 | /* | 63 | /* |
64 | * Old version of ASID found. Set the new one and | 64 | * Old version of ASID found. Set the new one and |
@@ -67,7 +67,7 @@ static void set_mm_context(struct mm_struct *mm, unsigned int asid) | |||
67 | mm->context.id = asid; | 67 | mm->context.id = asid; |
68 | cpumask_clear(mm_cpumask(mm)); | 68 | cpumask_clear(mm_cpumask(mm)); |
69 | } | 69 | } |
70 | spin_unlock_irqrestore(&mm->context.id_lock, flags); | 70 | raw_spin_unlock_irqrestore(&mm->context.id_lock, flags); |
71 | 71 | ||
72 | /* | 72 | /* |
73 | * Set the mm_cpumask(mm) bit for the current CPU. | 73 | * Set the mm_cpumask(mm) bit for the current CPU. |
@@ -117,7 +117,7 @@ void __new_context(struct mm_struct *mm) | |||
117 | { | 117 | { |
118 | unsigned int asid; | 118 | unsigned int asid; |
119 | 119 | ||
120 | spin_lock(&cpu_asid_lock); | 120 | raw_spin_lock(&cpu_asid_lock); |
121 | #ifdef CONFIG_SMP | 121 | #ifdef CONFIG_SMP |
122 | /* | 122 | /* |
123 | * Check the ASID again, in case the change was broadcast from | 123 | * Check the ASID again, in case the change was broadcast from |
@@ -125,7 +125,7 @@ void __new_context(struct mm_struct *mm) | |||
125 | */ | 125 | */ |
126 | if (unlikely(((mm->context.id ^ cpu_last_asid) >> ASID_BITS) == 0)) { | 126 | if (unlikely(((mm->context.id ^ cpu_last_asid) >> ASID_BITS) == 0)) { |
127 | cpumask_set_cpu(smp_processor_id(), mm_cpumask(mm)); | 127 | cpumask_set_cpu(smp_processor_id(), mm_cpumask(mm)); |
128 | spin_unlock(&cpu_asid_lock); | 128 | raw_spin_unlock(&cpu_asid_lock); |
129 | return; | 129 | return; |
130 | } | 130 | } |
131 | #endif | 131 | #endif |
@@ -153,5 +153,5 @@ void __new_context(struct mm_struct *mm) | |||
153 | } | 153 | } |
154 | 154 | ||
155 | set_mm_context(mm, asid); | 155 | set_mm_context(mm, asid); |
156 | spin_unlock(&cpu_asid_lock); | 156 | raw_spin_unlock(&cpu_asid_lock); |
157 | } | 157 | } |
diff --git a/arch/arm/mm/copypage-v4mc.c b/arch/arm/mm/copypage-v4mc.c index b8061519ce77..7d0a8c230342 100644 --- a/arch/arm/mm/copypage-v4mc.c +++ b/arch/arm/mm/copypage-v4mc.c | |||
@@ -30,7 +30,7 @@ | |||
30 | #define minicache_pgprot __pgprot(L_PTE_PRESENT | L_PTE_YOUNG | \ | 30 | #define minicache_pgprot __pgprot(L_PTE_PRESENT | L_PTE_YOUNG | \ |
31 | L_PTE_MT_MINICACHE) | 31 | L_PTE_MT_MINICACHE) |
32 | 32 | ||
33 | static DEFINE_SPINLOCK(minicache_lock); | 33 | static DEFINE_RAW_SPINLOCK(minicache_lock); |
34 | 34 | ||
35 | /* | 35 | /* |
36 | * ARMv4 mini-dcache optimised copy_user_highpage | 36 | * ARMv4 mini-dcache optimised copy_user_highpage |
@@ -76,14 +76,14 @@ void v4_mc_copy_user_highpage(struct page *to, struct page *from, | |||
76 | if (!test_and_set_bit(PG_dcache_clean, &from->flags)) | 76 | if (!test_and_set_bit(PG_dcache_clean, &from->flags)) |
77 | __flush_dcache_page(page_mapping(from), from); | 77 | __flush_dcache_page(page_mapping(from), from); |
78 | 78 | ||
79 | spin_lock(&minicache_lock); | 79 | raw_spin_lock(&minicache_lock); |
80 | 80 | ||
81 | set_pte_ext(TOP_PTE(0xffff8000), pfn_pte(page_to_pfn(from), minicache_pgprot), 0); | 81 | set_pte_ext(TOP_PTE(0xffff8000), pfn_pte(page_to_pfn(from), minicache_pgprot), 0); |
82 | flush_tlb_kernel_page(0xffff8000); | 82 | flush_tlb_kernel_page(0xffff8000); |
83 | 83 | ||
84 | mc_copy_user_page((void *)0xffff8000, kto); | 84 | mc_copy_user_page((void *)0xffff8000, kto); |
85 | 85 | ||
86 | spin_unlock(&minicache_lock); | 86 | raw_spin_unlock(&minicache_lock); |
87 | 87 | ||
88 | kunmap_atomic(kto, KM_USER1); | 88 | kunmap_atomic(kto, KM_USER1); |
89 | } | 89 | } |
diff --git a/arch/arm/mm/copypage-v6.c b/arch/arm/mm/copypage-v6.c index 63cca0097130..3d9a1552cef6 100644 --- a/arch/arm/mm/copypage-v6.c +++ b/arch/arm/mm/copypage-v6.c | |||
@@ -27,7 +27,7 @@ | |||
27 | #define from_address (0xffff8000) | 27 | #define from_address (0xffff8000) |
28 | #define to_address (0xffffc000) | 28 | #define to_address (0xffffc000) |
29 | 29 | ||
30 | static DEFINE_SPINLOCK(v6_lock); | 30 | static DEFINE_RAW_SPINLOCK(v6_lock); |
31 | 31 | ||
32 | /* | 32 | /* |
33 | * Copy the user page. No aliasing to deal with so we can just | 33 | * Copy the user page. No aliasing to deal with so we can just |
@@ -88,7 +88,7 @@ static void v6_copy_user_highpage_aliasing(struct page *to, | |||
88 | * Now copy the page using the same cache colour as the | 88 | * Now copy the page using the same cache colour as the |
89 | * pages ultimate destination. | 89 | * pages ultimate destination. |
90 | */ | 90 | */ |
91 | spin_lock(&v6_lock); | 91 | raw_spin_lock(&v6_lock); |
92 | 92 | ||
93 | set_pte_ext(TOP_PTE(from_address) + offset, pfn_pte(page_to_pfn(from), PAGE_KERNEL), 0); | 93 | set_pte_ext(TOP_PTE(from_address) + offset, pfn_pte(page_to_pfn(from), PAGE_KERNEL), 0); |
94 | set_pte_ext(TOP_PTE(to_address) + offset, pfn_pte(page_to_pfn(to), PAGE_KERNEL), 0); | 94 | set_pte_ext(TOP_PTE(to_address) + offset, pfn_pte(page_to_pfn(to), PAGE_KERNEL), 0); |
@@ -101,7 +101,7 @@ static void v6_copy_user_highpage_aliasing(struct page *to, | |||
101 | 101 | ||
102 | copy_page((void *)kto, (void *)kfrom); | 102 | copy_page((void *)kto, (void *)kfrom); |
103 | 103 | ||
104 | spin_unlock(&v6_lock); | 104 | raw_spin_unlock(&v6_lock); |
105 | } | 105 | } |
106 | 106 | ||
107 | /* | 107 | /* |
@@ -121,13 +121,13 @@ static void v6_clear_user_highpage_aliasing(struct page *page, unsigned long vad | |||
121 | * Now clear the page using the same cache colour as | 121 | * Now clear the page using the same cache colour as |
122 | * the pages ultimate destination. | 122 | * the pages ultimate destination. |
123 | */ | 123 | */ |
124 | spin_lock(&v6_lock); | 124 | raw_spin_lock(&v6_lock); |
125 | 125 | ||
126 | set_pte_ext(TOP_PTE(to_address) + offset, pfn_pte(page_to_pfn(page), PAGE_KERNEL), 0); | 126 | set_pte_ext(TOP_PTE(to_address) + offset, pfn_pte(page_to_pfn(page), PAGE_KERNEL), 0); |
127 | flush_tlb_kernel_page(to); | 127 | flush_tlb_kernel_page(to); |
128 | clear_page((void *)to); | 128 | clear_page((void *)to); |
129 | 129 | ||
130 | spin_unlock(&v6_lock); | 130 | raw_spin_unlock(&v6_lock); |
131 | } | 131 | } |
132 | 132 | ||
133 | struct cpu_user_fns v6_user_fns __initdata = { | 133 | struct cpu_user_fns v6_user_fns __initdata = { |
diff --git a/arch/arm/mm/copypage-xscale.c b/arch/arm/mm/copypage-xscale.c index 649bbcd325bf..610c24ced310 100644 --- a/arch/arm/mm/copypage-xscale.c +++ b/arch/arm/mm/copypage-xscale.c | |||
@@ -32,7 +32,7 @@ | |||
32 | #define minicache_pgprot __pgprot(L_PTE_PRESENT | L_PTE_YOUNG | \ | 32 | #define minicache_pgprot __pgprot(L_PTE_PRESENT | L_PTE_YOUNG | \ |
33 | L_PTE_MT_MINICACHE) | 33 | L_PTE_MT_MINICACHE) |
34 | 34 | ||
35 | static DEFINE_SPINLOCK(minicache_lock); | 35 | static DEFINE_RAW_SPINLOCK(minicache_lock); |
36 | 36 | ||
37 | /* | 37 | /* |
38 | * XScale mini-dcache optimised copy_user_highpage | 38 | * XScale mini-dcache optimised copy_user_highpage |
@@ -98,14 +98,14 @@ void xscale_mc_copy_user_highpage(struct page *to, struct page *from, | |||
98 | if (!test_and_set_bit(PG_dcache_clean, &from->flags)) | 98 | if (!test_and_set_bit(PG_dcache_clean, &from->flags)) |
99 | __flush_dcache_page(page_mapping(from), from); | 99 | __flush_dcache_page(page_mapping(from), from); |
100 | 100 | ||
101 | spin_lock(&minicache_lock); | 101 | raw_spin_lock(&minicache_lock); |
102 | 102 | ||
103 | set_pte_ext(TOP_PTE(COPYPAGE_MINICACHE), pfn_pte(page_to_pfn(from), minicache_pgprot), 0); | 103 | set_pte_ext(TOP_PTE(COPYPAGE_MINICACHE), pfn_pte(page_to_pfn(from), minicache_pgprot), 0); |
104 | flush_tlb_kernel_page(COPYPAGE_MINICACHE); | 104 | flush_tlb_kernel_page(COPYPAGE_MINICACHE); |
105 | 105 | ||
106 | mc_copy_user_page((void *)COPYPAGE_MINICACHE, kto); | 106 | mc_copy_user_page((void *)COPYPAGE_MINICACHE, kto); |
107 | 107 | ||
108 | spin_unlock(&minicache_lock); | 108 | raw_spin_unlock(&minicache_lock); |
109 | 109 | ||
110 | kunmap_atomic(kto, KM_USER1); | 110 | kunmap_atomic(kto, KM_USER1); |
111 | } | 111 | } |
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 2fee782077c1..f8037ba338ac 100644 --- a/arch/arm/mm/init.c +++ b/arch/arm/mm/init.c | |||
@@ -298,7 +298,7 @@ static void __init arm_bootmem_free(unsigned long min, unsigned long max_low, | |||
298 | #ifdef CONFIG_HAVE_ARCH_PFN_VALID | 298 | #ifdef CONFIG_HAVE_ARCH_PFN_VALID |
299 | int pfn_valid(unsigned long pfn) | 299 | int pfn_valid(unsigned long pfn) |
300 | { | 300 | { |
301 | return memblock_is_memory(pfn << PAGE_SHIFT); | 301 | return memblock_is_memory(__pfn_to_phys(pfn)); |
302 | } | 302 | } |
303 | EXPORT_SYMBOL(pfn_valid); | 303 | EXPORT_SYMBOL(pfn_valid); |
304 | #endif | 304 | #endif |
@@ -441,7 +441,7 @@ static inline int free_area(unsigned long pfn, unsigned long end, char *s) | |||
441 | static inline void poison_init_mem(void *s, size_t count) | 441 | static inline void poison_init_mem(void *s, size_t count) |
442 | { | 442 | { |
443 | u32 *p = (u32 *)s; | 443 | u32 *p = (u32 *)s; |
444 | while ((count = count - 4)) | 444 | for (; count != 0; count -= 4) |
445 | *p++ = 0xe7fddef0; | 445 | *p++ = 0xe7fddef0; |
446 | } | 446 | } |
447 | 447 | ||
@@ -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-arm920.S b/arch/arm/mm/proc-arm920.S index 92bd102e3982..2e6849b41f66 100644 --- a/arch/arm/mm/proc-arm920.S +++ b/arch/arm/mm/proc-arm920.S | |||
@@ -379,7 +379,7 @@ ENTRY(cpu_arm920_set_pte_ext) | |||
379 | 379 | ||
380 | /* Suspend/resume support: taken from arch/arm/plat-s3c24xx/sleep.S */ | 380 | /* Suspend/resume support: taken from arch/arm/plat-s3c24xx/sleep.S */ |
381 | .globl cpu_arm920_suspend_size | 381 | .globl cpu_arm920_suspend_size |
382 | .equ cpu_arm920_suspend_size, 4 * 3 | 382 | .equ cpu_arm920_suspend_size, 4 * 4 |
383 | #ifdef CONFIG_PM_SLEEP | 383 | #ifdef CONFIG_PM_SLEEP |
384 | ENTRY(cpu_arm920_do_suspend) | 384 | ENTRY(cpu_arm920_do_suspend) |
385 | stmfd sp!, {r4 - r7, lr} | 385 | stmfd sp!, {r4 - r7, lr} |
diff --git a/arch/arm/mm/proc-arm926.S b/arch/arm/mm/proc-arm926.S index 2bbcf053dffd..cd8f79c3a282 100644 --- a/arch/arm/mm/proc-arm926.S +++ b/arch/arm/mm/proc-arm926.S | |||
@@ -394,7 +394,7 @@ ENTRY(cpu_arm926_set_pte_ext) | |||
394 | 394 | ||
395 | /* Suspend/resume support: taken from arch/arm/plat-s3c24xx/sleep.S */ | 395 | /* Suspend/resume support: taken from arch/arm/plat-s3c24xx/sleep.S */ |
396 | .globl cpu_arm926_suspend_size | 396 | .globl cpu_arm926_suspend_size |
397 | .equ cpu_arm926_suspend_size, 4 * 3 | 397 | .equ cpu_arm926_suspend_size, 4 * 4 |
398 | #ifdef CONFIG_PM_SLEEP | 398 | #ifdef CONFIG_PM_SLEEP |
399 | ENTRY(cpu_arm926_do_suspend) | 399 | ENTRY(cpu_arm926_do_suspend) |
400 | stmfd sp!, {r4 - r7, lr} | 400 | stmfd sp!, {r4 - r7, lr} |
diff --git a/arch/arm/mm/proc-arm946.S b/arch/arm/mm/proc-arm946.S index f8f7ea34bfc5..683af3a182b7 100644 --- a/arch/arm/mm/proc-arm946.S +++ b/arch/arm/mm/proc-arm946.S | |||
@@ -410,6 +410,7 @@ __arm946_proc_info: | |||
410 | .long 0x41009460 | 410 | .long 0x41009460 |
411 | .long 0xff00fff0 | 411 | .long 0xff00fff0 |
412 | .long 0 | 412 | .long 0 |
413 | .long 0 | ||
413 | b __arm946_setup | 414 | b __arm946_setup |
414 | .long cpu_arch_name | 415 | .long cpu_arch_name |
415 | .long cpu_elf_name | 416 | .long cpu_elf_name |
@@ -418,6 +419,6 @@ __arm946_proc_info: | |||
418 | .long arm946_processor_functions | 419 | .long arm946_processor_functions |
419 | .long 0 | 420 | .long 0 |
420 | .long 0 | 421 | .long 0 |
421 | .long arm940_cache_fns | 422 | .long arm946_cache_fns |
422 | .size __arm946_proc_info, . - __arm946_proc_info | 423 | .size __arm946_proc_info, . - __arm946_proc_info |
423 | 424 | ||
diff --git a/arch/arm/mm/proc-sa1100.S b/arch/arm/mm/proc-sa1100.S index 07219c2ae114..69e7f2ef7384 100644 --- a/arch/arm/mm/proc-sa1100.S +++ b/arch/arm/mm/proc-sa1100.S | |||
@@ -182,11 +182,11 @@ ENDPROC(cpu_sa1100_do_suspend) | |||
182 | 182 | ||
183 | ENTRY(cpu_sa1100_do_resume) | 183 | ENTRY(cpu_sa1100_do_resume) |
184 | ldmia r0, {r4 - r7} @ load cp regs | 184 | ldmia r0, {r4 - r7} @ load cp regs |
185 | mov r1, #0 | 185 | mov ip, #0 |
186 | mcr p15, 0, r1, c8, c7, 0 @ flush I+D TLBs | 186 | mcr p15, 0, ip, c8, c7, 0 @ flush I+D TLBs |
187 | mcr p15, 0, r1, c7, c7, 0 @ flush I&D cache | 187 | mcr p15, 0, ip, c7, c7, 0 @ flush I&D cache |
188 | mcr p15, 0, r1, c9, c0, 0 @ invalidate RB | 188 | mcr p15, 0, ip, c9, c0, 0 @ invalidate RB |
189 | mcr p15, 0, r1, c9, c0, 5 @ allow user space to use RB | 189 | mcr p15, 0, ip, c9, c0, 5 @ allow user space to use RB |
190 | 190 | ||
191 | mcr p15, 0, r4, c3, c0, 0 @ domain ID | 191 | mcr p15, 0, r4, c3, c0, 0 @ domain ID |
192 | mcr p15, 0, r5, c2, c0, 0 @ translation table base addr | 192 | mcr p15, 0, r5, c2, c0, 0 @ translation table base addr |
diff --git a/arch/arm/mm/proc-v6.S b/arch/arm/mm/proc-v6.S index 219138d2f158..a923aa0fd00d 100644 --- a/arch/arm/mm/proc-v6.S +++ b/arch/arm/mm/proc-v6.S | |||
@@ -223,6 +223,22 @@ __v6_setup: | |||
223 | mrc p15, 0, r0, c1, c0, 0 @ read control register | 223 | mrc p15, 0, r0, c1, c0, 0 @ read control register |
224 | bic r0, r0, r5 @ clear bits them | 224 | bic r0, r0, r5 @ clear bits them |
225 | orr r0, r0, r6 @ set them | 225 | orr r0, r0, r6 @ set them |
226 | #ifdef CONFIG_ARM_ERRATA_364296 | ||
227 | /* | ||
228 | * Workaround for the 364296 ARM1136 r0p2 erratum (possible cache data | ||
229 | * corruption with hit-under-miss enabled). The conditional code below | ||
230 | * (setting the undocumented bit 31 in the auxiliary control register | ||
231 | * and the FI bit in the control register) disables hit-under-miss | ||
232 | * without putting the processor into full low interrupt latency mode. | ||
233 | */ | ||
234 | ldr r6, =0x4107b362 @ id for ARM1136 r0p2 | ||
235 | mrc p15, 0, r5, c0, c0, 0 @ get processor id | ||
236 | teq r5, r6 @ check for the faulty core | ||
237 | mrceq p15, 0, r5, c1, c0, 1 @ load aux control reg | ||
238 | orreq r5, r5, #(1 << 31) @ set the undocumented bit 31 | ||
239 | mcreq p15, 0, r5, c1, c0, 1 @ write aux control reg | ||
240 | orreq r0, r0, #(1 << 21) @ low interrupt latency configuration | ||
241 | #endif | ||
226 | mov pc, lr @ return to head.S:__ret | 242 | mov pc, lr @ return to head.S:__ret |
227 | 243 | ||
228 | /* | 244 | /* |
diff --git a/arch/arm/mm/proc-v7.S b/arch/arm/mm/proc-v7.S index a30e78542ccf..9591c8e9fb8c 100644 --- a/arch/arm/mm/proc-v7.S +++ b/arch/arm/mm/proc-v7.S | |||
@@ -66,6 +66,7 @@ ENDPROC(cpu_v7_proc_fin) | |||
66 | ENTRY(cpu_v7_reset) | 66 | ENTRY(cpu_v7_reset) |
67 | mrc p15, 0, r1, c1, c0, 0 @ ctrl register | 67 | mrc p15, 0, r1, c1, c0, 0 @ ctrl register |
68 | bic r1, r1, #0x1 @ ...............m | 68 | bic r1, r1, #0x1 @ ...............m |
69 | THUMB( bic r1, r1, #1 << 30 ) @ SCTLR.TE (Thumb exceptions) | ||
69 | mcr p15, 0, r1, c1, c0, 0 @ disable MMU | 70 | mcr p15, 0, r1, c1, c0, 0 @ disable MMU |
70 | isb | 71 | isb |
71 | mov pc, r0 | 72 | mov pc, r0 |
@@ -217,7 +218,7 @@ ENDPROC(cpu_v7_set_pte_ext) | |||
217 | /* Suspend/resume support: derived from arch/arm/mach-s5pv210/sleep.S */ | 218 | /* Suspend/resume support: derived from arch/arm/mach-s5pv210/sleep.S */ |
218 | .globl cpu_v7_suspend_size | 219 | .globl cpu_v7_suspend_size |
219 | .equ cpu_v7_suspend_size, 4 * 9 | 220 | .equ cpu_v7_suspend_size, 4 * 9 |
220 | #ifdef CONFIG_PM_SLEEP | 221 | #ifdef CONFIG_ARM_CPU_SUSPEND |
221 | ENTRY(cpu_v7_do_suspend) | 222 | ENTRY(cpu_v7_do_suspend) |
222 | stmfd sp!, {r4 - r11, lr} | 223 | stmfd sp!, {r4 - r11, lr} |
223 | mrc p15, 0, r4, c13, c0, 0 @ FCSE/PID | 224 | mrc p15, 0, r4, c13, c0, 0 @ FCSE/PID |
@@ -247,13 +248,16 @@ ENTRY(cpu_v7_do_resume) | |||
247 | mcr p15, 0, r7, c2, c0, 0 @ TTB 0 | 248 | mcr p15, 0, r7, c2, c0, 0 @ TTB 0 |
248 | mcr p15, 0, r8, c2, c0, 1 @ TTB 1 | 249 | mcr p15, 0, r8, c2, c0, 1 @ TTB 1 |
249 | mcr p15, 0, ip, c2, c0, 2 @ TTB control register | 250 | mcr p15, 0, ip, c2, c0, 2 @ TTB control register |
250 | mcr p15, 0, r10, c1, c0, 1 @ Auxiliary control register | 251 | mrc p15, 0, r4, c1, c0, 1 @ Read Auxiliary control register |
252 | teq r4, r10 @ Is it already set? | ||
253 | mcrne p15, 0, r10, c1, c0, 1 @ No, so write it | ||
251 | mcr p15, 0, r11, c1, c0, 2 @ Co-processor access control | 254 | mcr p15, 0, r11, c1, c0, 2 @ Co-processor access control |
252 | ldr r4, =PRRR @ PRRR | 255 | ldr r4, =PRRR @ PRRR |
253 | ldr r5, =NMRR @ NMRR | 256 | ldr r5, =NMRR @ NMRR |
254 | mcr p15, 0, r4, c10, c2, 0 @ write PRRR | 257 | mcr p15, 0, r4, c10, c2, 0 @ write PRRR |
255 | mcr p15, 0, r5, c10, c2, 1 @ write NMRR | 258 | mcr p15, 0, r5, c10, c2, 1 @ write NMRR |
256 | isb | 259 | isb |
260 | dsb | ||
257 | mov r0, r9 @ control register | 261 | mov r0, r9 @ control register |
258 | mov r2, r7, lsr #14 @ get TTB0 base | 262 | mov r2, r7, lsr #14 @ get TTB0 base |
259 | mov r2, r2, lsl #14 | 263 | mov r2, r2, lsl #14 |
diff --git a/arch/arm/mm/proc-xsc3.S b/arch/arm/mm/proc-xsc3.S index 28c72a2006a1..755e1bf22681 100644 --- a/arch/arm/mm/proc-xsc3.S +++ b/arch/arm/mm/proc-xsc3.S | |||
@@ -406,7 +406,7 @@ ENTRY(cpu_xsc3_set_pte_ext) | |||
406 | .align | 406 | .align |
407 | 407 | ||
408 | .globl cpu_xsc3_suspend_size | 408 | .globl cpu_xsc3_suspend_size |
409 | .equ cpu_xsc3_suspend_size, 4 * 8 | 409 | .equ cpu_xsc3_suspend_size, 4 * 7 |
410 | #ifdef CONFIG_PM_SLEEP | 410 | #ifdef CONFIG_PM_SLEEP |
411 | ENTRY(cpu_xsc3_do_suspend) | 411 | ENTRY(cpu_xsc3_do_suspend) |
412 | stmfd sp!, {r4 - r10, lr} | 412 | stmfd sp!, {r4 - r10, lr} |
@@ -418,12 +418,12 @@ ENTRY(cpu_xsc3_do_suspend) | |||
418 | mrc p15, 0, r9, c1, c0, 1 @ auxiliary control reg | 418 | mrc p15, 0, r9, c1, c0, 1 @ auxiliary control reg |
419 | mrc p15, 0, r10, c1, c0, 0 @ control reg | 419 | mrc p15, 0, r10, c1, c0, 0 @ control reg |
420 | bic r4, r4, #2 @ clear frequency change bit | 420 | bic r4, r4, #2 @ clear frequency change bit |
421 | stmia r0, {r1, r4 - r10} @ store v:p offset + cp regs | 421 | stmia r0, {r4 - r10} @ store cp regs |
422 | ldmia sp!, {r4 - r10, pc} | 422 | ldmia sp!, {r4 - r10, pc} |
423 | ENDPROC(cpu_xsc3_do_suspend) | 423 | ENDPROC(cpu_xsc3_do_suspend) |
424 | 424 | ||
425 | ENTRY(cpu_xsc3_do_resume) | 425 | ENTRY(cpu_xsc3_do_resume) |
426 | ldmia r0, {r1, r4 - r10} @ load v:p offset + cp regs | 426 | ldmia r0, {r4 - r10} @ load cp regs |
427 | mov ip, #0 | 427 | mov ip, #0 |
428 | mcr p15, 0, ip, c7, c7, 0 @ invalidate I & D caches, BTB | 428 | mcr p15, 0, ip, c7, c7, 0 @ invalidate I & D caches, BTB |
429 | mcr p15, 0, ip, c7, c10, 4 @ drain write (&fill) buffer | 429 | mcr p15, 0, ip, c7, c10, 4 @ drain write (&fill) buffer |
diff --git a/arch/arm/plat-mxc/Kconfig b/arch/arm/plat-mxc/Kconfig index a5353fc0793f..4c8fdbcc9467 100644 --- a/arch/arm/plat-mxc/Kconfig +++ b/arch/arm/plat-mxc/Kconfig | |||
@@ -39,7 +39,7 @@ config ARCH_MX503 | |||
39 | select ARCH_MX50_SUPPORTED | 39 | select ARCH_MX50_SUPPORTED |
40 | select ARCH_MX53_SUPPORTED | 40 | select ARCH_MX53_SUPPORTED |
41 | help | 41 | help |
42 | This enables support for machines using Freescale's i.MX50 and i.MX51 | 42 | This enables support for machines using Freescale's i.MX50 and i.MX53 |
43 | processors. | 43 | processors. |
44 | 44 | ||
45 | config ARCH_MX51 | 45 | config ARCH_MX51 |
diff --git a/arch/arm/plat-mxc/devices.c b/arch/arm/plat-mxc/devices.c index 0d6ed31bdbf2..a34b2ae895f2 100644 --- a/arch/arm/plat-mxc/devices.c +++ b/arch/arm/plat-mxc/devices.c | |||
@@ -37,59 +37,6 @@ int __init mxc_register_device(struct platform_device *pdev, void *data) | |||
37 | return ret; | 37 | return ret; |
38 | } | 38 | } |
39 | 39 | ||
40 | struct platform_device *__init imx_add_platform_device_dmamask( | ||
41 | const char *name, int id, | ||
42 | const struct resource *res, unsigned int num_resources, | ||
43 | const void *data, size_t size_data, u64 dmamask) | ||
44 | { | ||
45 | int ret = -ENOMEM; | ||
46 | struct platform_device *pdev; | ||
47 | |||
48 | pdev = platform_device_alloc(name, id); | ||
49 | if (!pdev) | ||
50 | goto err; | ||
51 | |||
52 | if (dmamask) { | ||
53 | /* | ||
54 | * This memory isn't freed when the device is put, | ||
55 | * I don't have a nice idea for that though. Conceptually | ||
56 | * dma_mask in struct device should not be a pointer. | ||
57 | * See http://thread.gmane.org/gmane.linux.kernel.pci/9081 | ||
58 | */ | ||
59 | pdev->dev.dma_mask = | ||
60 | kmalloc(sizeof(*pdev->dev.dma_mask), GFP_KERNEL); | ||
61 | if (!pdev->dev.dma_mask) | ||
62 | /* ret is still -ENOMEM; */ | ||
63 | goto err; | ||
64 | |||
65 | *pdev->dev.dma_mask = dmamask; | ||
66 | pdev->dev.coherent_dma_mask = dmamask; | ||
67 | } | ||
68 | |||
69 | if (res) { | ||
70 | ret = platform_device_add_resources(pdev, res, num_resources); | ||
71 | if (ret) | ||
72 | goto err; | ||
73 | } | ||
74 | |||
75 | if (data) { | ||
76 | ret = platform_device_add_data(pdev, data, size_data); | ||
77 | if (ret) | ||
78 | goto err; | ||
79 | } | ||
80 | |||
81 | ret = platform_device_add(pdev); | ||
82 | if (ret) { | ||
83 | err: | ||
84 | if (dmamask) | ||
85 | kfree(pdev->dev.dma_mask); | ||
86 | platform_device_put(pdev); | ||
87 | return ERR_PTR(ret); | ||
88 | } | ||
89 | |||
90 | return pdev; | ||
91 | } | ||
92 | |||
93 | struct device mxc_aips_bus = { | 40 | struct device mxc_aips_bus = { |
94 | .init_name = "mxc_aips", | 41 | .init_name = "mxc_aips", |
95 | .parent = &platform_bus, | 42 | .parent = &platform_bus, |
diff --git a/arch/arm/plat-mxc/include/mach/debug-macro.S b/arch/arm/plat-mxc/include/mach/debug-macro.S index 91fc7cdb5dc9..e4dde91f0231 100644 --- a/arch/arm/plat-mxc/include/mach/debug-macro.S +++ b/arch/arm/plat-mxc/include/mach/debug-macro.S | |||
@@ -44,6 +44,14 @@ | |||
44 | #define UART_PADDR MX51_UART1_BASE_ADDR | 44 | #define UART_PADDR MX51_UART1_BASE_ADDR |
45 | #endif | 45 | #endif |
46 | 46 | ||
47 | /* iMX50/53 have same addresses, but not iMX51 */ | ||
48 | #if defined(CONFIG_SOC_IMX50) || defined(CONFIG_SOC_IMX53) | ||
49 | #ifdef UART_PADDR | ||
50 | #error "CONFIG_DEBUG_LL is incompatible with multiple archs" | ||
51 | #endif | ||
52 | #define UART_PADDR MX53_UART1_BASE_ADDR | ||
53 | #endif | ||
54 | |||
47 | #define UART_VADDR IMX_IO_ADDRESS(UART_PADDR) | 55 | #define UART_VADDR IMX_IO_ADDRESS(UART_PADDR) |
48 | 56 | ||
49 | .macro addruart, rp, rv | 57 | .macro addruart, rp, rv |
diff --git a/arch/arm/plat-mxc/include/mach/devices-common.h b/arch/arm/plat-mxc/include/mach/devices-common.h index 524538aabc4b..543525d76a60 100644 --- a/arch/arm/plat-mxc/include/mach/devices-common.h +++ b/arch/arm/plat-mxc/include/mach/devices-common.h | |||
@@ -14,10 +14,22 @@ | |||
14 | extern struct device mxc_aips_bus; | 14 | extern struct device mxc_aips_bus; |
15 | extern struct device mxc_ahb_bus; | 15 | extern struct device mxc_ahb_bus; |
16 | 16 | ||
17 | struct platform_device *imx_add_platform_device_dmamask( | 17 | static inline struct platform_device *imx_add_platform_device_dmamask( |
18 | const char *name, int id, | 18 | const char *name, int id, |
19 | const struct resource *res, unsigned int num_resources, | 19 | const struct resource *res, unsigned int num_resources, |
20 | const void *data, size_t size_data, u64 dmamask); | 20 | const void *data, size_t size_data, u64 dmamask) |
21 | { | ||
22 | struct platform_device_info pdevinfo = { | ||
23 | .name = name, | ||
24 | .id = id, | ||
25 | .res = res, | ||
26 | .num_res = num_resources, | ||
27 | .data = data, | ||
28 | .size_data = size_data, | ||
29 | .dma_mask = dmamask, | ||
30 | }; | ||
31 | return platform_device_register_full(&pdevinfo); | ||
32 | } | ||
21 | 33 | ||
22 | static inline struct platform_device *imx_add_platform_device( | 34 | static inline struct platform_device *imx_add_platform_device( |
23 | const char *name, int id, | 35 | const char *name, int id, |
diff --git a/arch/arm/plat-mxc/include/mach/iomux-mx53.h b/arch/arm/plat-mxc/include/mach/iomux-mx53.h index 9440b9e00e89..5408fd1fc736 100644 --- a/arch/arm/plat-mxc/include/mach/iomux-mx53.h +++ b/arch/arm/plat-mxc/include/mach/iomux-mx53.h | |||
@@ -30,6 +30,9 @@ | |||
30 | #define MX53_SDHC_PAD_CTRL (PAD_CTL_HYS | PAD_CTL_PKE | PAD_CTL_PUE | \ | 30 | #define MX53_SDHC_PAD_CTRL (PAD_CTL_HYS | PAD_CTL_PKE | PAD_CTL_PUE | \ |
31 | PAD_CTL_PUS_47K_UP | PAD_CTL_DSE_HIGH | \ | 31 | PAD_CTL_PUS_47K_UP | PAD_CTL_DSE_HIGH | \ |
32 | PAD_CTL_SRE_FAST) | 32 | PAD_CTL_SRE_FAST) |
33 | #define PAD_CTRL_I2C (PAD_CTL_SRE_FAST | PAD_CTL_ODE | PAD_CTL_PKE | \ | ||
34 | PAD_CTL_PUE | PAD_CTL_DSE_HIGH | PAD_CTL_PUS_100K_UP \ | ||
35 | | PAD_CTL_HYS) | ||
33 | 36 | ||
34 | #define _MX53_PAD_GPIO_19__KPP_COL_5 IOMUX_PAD(0x348, 0x20, 0, 0x840, 0, 0) | 37 | #define _MX53_PAD_GPIO_19__KPP_COL_5 IOMUX_PAD(0x348, 0x20, 0, 0x840, 0, 0) |
35 | #define _MX53_PAD_GPIO_19__GPIO4_5 IOMUX_PAD(0x348, 0x20, 1, 0x0, 0, 0) | 38 | #define _MX53_PAD_GPIO_19__GPIO4_5 IOMUX_PAD(0x348, 0x20, 1, 0x0, 0, 0) |
@@ -1256,7 +1259,7 @@ | |||
1256 | #define MX53_PAD_KEY_COL3__GPIO4_12 (_MX53_PAD_KEY_COL3__GPIO4_12 | MUX_PAD_CTRL(NO_PAD_CTRL)) | 1259 | #define MX53_PAD_KEY_COL3__GPIO4_12 (_MX53_PAD_KEY_COL3__GPIO4_12 | MUX_PAD_CTRL(NO_PAD_CTRL)) |
1257 | #define MX53_PAD_KEY_COL3__USBOH3_H2_DP (_MX53_PAD_KEY_COL3__USBOH3_H2_DP | MUX_PAD_CTRL(NO_PAD_CTRL)) | 1260 | #define MX53_PAD_KEY_COL3__USBOH3_H2_DP (_MX53_PAD_KEY_COL3__USBOH3_H2_DP | MUX_PAD_CTRL(NO_PAD_CTRL)) |
1258 | #define MX53_PAD_KEY_COL3__SPDIF_IN1 (_MX53_PAD_KEY_COL3__SPDIF_IN1 | MUX_PAD_CTRL(NO_PAD_CTRL)) | 1261 | #define MX53_PAD_KEY_COL3__SPDIF_IN1 (_MX53_PAD_KEY_COL3__SPDIF_IN1 | MUX_PAD_CTRL(NO_PAD_CTRL)) |
1259 | #define MX53_PAD_KEY_COL3__I2C2_SCL (_MX53_PAD_KEY_COL3__I2C2_SCL | MUX_PAD_CTRL(NO_PAD_CTRL)) | 1262 | #define MX53_PAD_KEY_COL3__I2C2_SCL (_MX53_PAD_KEY_COL3__I2C2_SCL | MUX_PAD_CTRL(PAD_CTRL_I2C)) |
1260 | #define MX53_PAD_KEY_COL3__ECSPI1_SS3 (_MX53_PAD_KEY_COL3__ECSPI1_SS3 | MUX_PAD_CTRL(NO_PAD_CTRL)) | 1263 | #define MX53_PAD_KEY_COL3__ECSPI1_SS3 (_MX53_PAD_KEY_COL3__ECSPI1_SS3 | MUX_PAD_CTRL(NO_PAD_CTRL)) |
1261 | #define MX53_PAD_KEY_COL3__FEC_CRS (_MX53_PAD_KEY_COL3__FEC_CRS | MUX_PAD_CTRL(NO_PAD_CTRL)) | 1264 | #define MX53_PAD_KEY_COL3__FEC_CRS (_MX53_PAD_KEY_COL3__FEC_CRS | MUX_PAD_CTRL(NO_PAD_CTRL)) |
1262 | #define MX53_PAD_KEY_COL3__USBPHY1_SIECLOCK (_MX53_PAD_KEY_COL3__USBPHY1_SIECLOCK | MUX_PAD_CTRL(NO_PAD_CTRL)) | 1265 | #define MX53_PAD_KEY_COL3__USBPHY1_SIECLOCK (_MX53_PAD_KEY_COL3__USBPHY1_SIECLOCK | MUX_PAD_CTRL(NO_PAD_CTRL)) |
@@ -1264,7 +1267,7 @@ | |||
1264 | #define MX53_PAD_KEY_ROW3__GPIO4_13 (_MX53_PAD_KEY_ROW3__GPIO4_13 | MUX_PAD_CTRL(NO_PAD_CTRL)) | 1267 | #define MX53_PAD_KEY_ROW3__GPIO4_13 (_MX53_PAD_KEY_ROW3__GPIO4_13 | MUX_PAD_CTRL(NO_PAD_CTRL)) |
1265 | #define MX53_PAD_KEY_ROW3__USBOH3_H2_DM (_MX53_PAD_KEY_ROW3__USBOH3_H2_DM | MUX_PAD_CTRL(NO_PAD_CTRL)) | 1268 | #define MX53_PAD_KEY_ROW3__USBOH3_H2_DM (_MX53_PAD_KEY_ROW3__USBOH3_H2_DM | MUX_PAD_CTRL(NO_PAD_CTRL)) |
1266 | #define MX53_PAD_KEY_ROW3__CCM_ASRC_EXT_CLK (_MX53_PAD_KEY_ROW3__CCM_ASRC_EXT_CLK | MUX_PAD_CTRL(NO_PAD_CTRL)) | 1269 | #define MX53_PAD_KEY_ROW3__CCM_ASRC_EXT_CLK (_MX53_PAD_KEY_ROW3__CCM_ASRC_EXT_CLK | MUX_PAD_CTRL(NO_PAD_CTRL)) |
1267 | #define MX53_PAD_KEY_ROW3__I2C2_SDA (_MX53_PAD_KEY_ROW3__I2C2_SDA | MUX_PAD_CTRL(NO_PAD_CTRL)) | 1270 | #define MX53_PAD_KEY_ROW3__I2C2_SDA (_MX53_PAD_KEY_ROW3__I2C2_SDA | MUX_PAD_CTRL(PAD_CTRL_I2C)) |
1268 | #define MX53_PAD_KEY_ROW3__OSC32K_32K_OUT (_MX53_PAD_KEY_ROW3__OSC32K_32K_OUT | MUX_PAD_CTRL(NO_PAD_CTRL)) | 1271 | #define MX53_PAD_KEY_ROW3__OSC32K_32K_OUT (_MX53_PAD_KEY_ROW3__OSC32K_32K_OUT | MUX_PAD_CTRL(NO_PAD_CTRL)) |
1269 | #define MX53_PAD_KEY_ROW3__CCM_PLL4_BYP (_MX53_PAD_KEY_ROW3__CCM_PLL4_BYP | MUX_PAD_CTRL(NO_PAD_CTRL)) | 1272 | #define MX53_PAD_KEY_ROW3__CCM_PLL4_BYP (_MX53_PAD_KEY_ROW3__CCM_PLL4_BYP | MUX_PAD_CTRL(NO_PAD_CTRL)) |
1270 | #define MX53_PAD_KEY_ROW3__USBPHY1_LINESTATE_0 (_MX53_PAD_KEY_ROW3__USBPHY1_LINESTATE_0 | MUX_PAD_CTRL(NO_PAD_CTRL)) | 1273 | #define MX53_PAD_KEY_ROW3__USBPHY1_LINESTATE_0 (_MX53_PAD_KEY_ROW3__USBPHY1_LINESTATE_0 | MUX_PAD_CTRL(NO_PAD_CTRL)) |
@@ -1536,7 +1539,7 @@ | |||
1536 | #define MX53_PAD_CSI0_DAT8__KPP_COL_7 (_MX53_PAD_CSI0_DAT8__KPP_COL_7 | MUX_PAD_CTRL(NO_PAD_CTRL)) | 1539 | #define MX53_PAD_CSI0_DAT8__KPP_COL_7 (_MX53_PAD_CSI0_DAT8__KPP_COL_7 | MUX_PAD_CTRL(NO_PAD_CTRL)) |
1537 | #define MX53_PAD_CSI0_DAT8__ECSPI2_SCLK (_MX53_PAD_CSI0_DAT8__ECSPI2_SCLK | MUX_PAD_CTRL(NO_PAD_CTRL)) | 1540 | #define MX53_PAD_CSI0_DAT8__ECSPI2_SCLK (_MX53_PAD_CSI0_DAT8__ECSPI2_SCLK | MUX_PAD_CTRL(NO_PAD_CTRL)) |
1538 | #define MX53_PAD_CSI0_DAT8__USBOH3_USBH3_OC (_MX53_PAD_CSI0_DAT8__USBOH3_USBH3_OC | MUX_PAD_CTRL(NO_PAD_CTRL)) | 1541 | #define MX53_PAD_CSI0_DAT8__USBOH3_USBH3_OC (_MX53_PAD_CSI0_DAT8__USBOH3_USBH3_OC | MUX_PAD_CTRL(NO_PAD_CTRL)) |
1539 | #define MX53_PAD_CSI0_DAT8__I2C1_SDA (_MX53_PAD_CSI0_DAT8__I2C1_SDA | MUX_PAD_CTRL(NO_PAD_CTRL)) | 1542 | #define MX53_PAD_CSI0_DAT8__I2C1_SDA (_MX53_PAD_CSI0_DAT8__I2C1_SDA | MUX_PAD_CTRL(PAD_CTRL_I2C)) |
1540 | #define MX53_PAD_CSI0_DAT8__EMI_EMI_DEBUG_37 (_MX53_PAD_CSI0_DAT8__EMI_EMI_DEBUG_37 | MUX_PAD_CTRL(NO_PAD_CTRL)) | 1543 | #define MX53_PAD_CSI0_DAT8__EMI_EMI_DEBUG_37 (_MX53_PAD_CSI0_DAT8__EMI_EMI_DEBUG_37 | MUX_PAD_CTRL(NO_PAD_CTRL)) |
1541 | #define MX53_PAD_CSI0_DAT8__TPIU_TRACE_5 (_MX53_PAD_CSI0_DAT8__TPIU_TRACE_5 | MUX_PAD_CTRL(NO_PAD_CTRL)) | 1544 | #define MX53_PAD_CSI0_DAT8__TPIU_TRACE_5 (_MX53_PAD_CSI0_DAT8__TPIU_TRACE_5 | MUX_PAD_CTRL(NO_PAD_CTRL)) |
1542 | #define MX53_PAD_CSI0_DAT9__IPU_CSI0_D_9 (_MX53_PAD_CSI0_DAT9__IPU_CSI0_D_9 | MUX_PAD_CTRL(NO_PAD_CTRL)) | 1545 | #define MX53_PAD_CSI0_DAT9__IPU_CSI0_D_9 (_MX53_PAD_CSI0_DAT9__IPU_CSI0_D_9 | MUX_PAD_CTRL(NO_PAD_CTRL)) |
@@ -1544,7 +1547,7 @@ | |||
1544 | #define MX53_PAD_CSI0_DAT9__KPP_ROW_7 (_MX53_PAD_CSI0_DAT9__KPP_ROW_7 | MUX_PAD_CTRL(NO_PAD_CTRL)) | 1547 | #define MX53_PAD_CSI0_DAT9__KPP_ROW_7 (_MX53_PAD_CSI0_DAT9__KPP_ROW_7 | MUX_PAD_CTRL(NO_PAD_CTRL)) |
1545 | #define MX53_PAD_CSI0_DAT9__ECSPI2_MOSI (_MX53_PAD_CSI0_DAT9__ECSPI2_MOSI | MUX_PAD_CTRL(NO_PAD_CTRL)) | 1548 | #define MX53_PAD_CSI0_DAT9__ECSPI2_MOSI (_MX53_PAD_CSI0_DAT9__ECSPI2_MOSI | MUX_PAD_CTRL(NO_PAD_CTRL)) |
1546 | #define MX53_PAD_CSI0_DAT9__USBOH3_USBH3_PWR (_MX53_PAD_CSI0_DAT9__USBOH3_USBH3_PWR | MUX_PAD_CTRL(NO_PAD_CTRL)) | 1549 | #define MX53_PAD_CSI0_DAT9__USBOH3_USBH3_PWR (_MX53_PAD_CSI0_DAT9__USBOH3_USBH3_PWR | MUX_PAD_CTRL(NO_PAD_CTRL)) |
1547 | #define MX53_PAD_CSI0_DAT9__I2C1_SCL (_MX53_PAD_CSI0_DAT9__I2C1_SCL | MUX_PAD_CTRL(NO_PAD_CTRL)) | 1550 | #define MX53_PAD_CSI0_DAT9__I2C1_SCL (_MX53_PAD_CSI0_DAT9__I2C1_SCL | MUX_PAD_CTRL(PAD_CTRL_I2C)) |
1548 | #define MX53_PAD_CSI0_DAT9__EMI_EMI_DEBUG_38 (_MX53_PAD_CSI0_DAT9__EMI_EMI_DEBUG_38 | MUX_PAD_CTRL(NO_PAD_CTRL)) | 1551 | #define MX53_PAD_CSI0_DAT9__EMI_EMI_DEBUG_38 (_MX53_PAD_CSI0_DAT9__EMI_EMI_DEBUG_38 | MUX_PAD_CTRL(NO_PAD_CTRL)) |
1549 | #define MX53_PAD_CSI0_DAT9__TPIU_TRACE_6 (_MX53_PAD_CSI0_DAT9__TPIU_TRACE_6 | MUX_PAD_CTRL(NO_PAD_CTRL)) | 1552 | #define MX53_PAD_CSI0_DAT9__TPIU_TRACE_6 (_MX53_PAD_CSI0_DAT9__TPIU_TRACE_6 | MUX_PAD_CTRL(NO_PAD_CTRL)) |
1550 | #define MX53_PAD_CSI0_DAT10__IPU_CSI0_D_10 (_MX53_PAD_CSI0_DAT10__IPU_CSI0_D_10 | MUX_PAD_CTRL(NO_PAD_CTRL)) | 1553 | #define MX53_PAD_CSI0_DAT10__IPU_CSI0_D_10 (_MX53_PAD_CSI0_DAT10__IPU_CSI0_D_10 | MUX_PAD_CTRL(NO_PAD_CTRL)) |
@@ -1631,25 +1634,25 @@ | |||
1631 | #define MX53_PAD_EIM_EB2__CCM_DI1_EXT_CLK (_MX53_PAD_EIM_EB2__CCM_DI1_EXT_CLK | MUX_PAD_CTRL(NO_PAD_CTRL)) | 1634 | #define MX53_PAD_EIM_EB2__CCM_DI1_EXT_CLK (_MX53_PAD_EIM_EB2__CCM_DI1_EXT_CLK | MUX_PAD_CTRL(NO_PAD_CTRL)) |
1632 | #define MX53_PAD_EIM_EB2__IPU_SER_DISP1_CS (_MX53_PAD_EIM_EB2__IPU_SER_DISP1_CS | MUX_PAD_CTRL(NO_PAD_CTRL)) | 1635 | #define MX53_PAD_EIM_EB2__IPU_SER_DISP1_CS (_MX53_PAD_EIM_EB2__IPU_SER_DISP1_CS | MUX_PAD_CTRL(NO_PAD_CTRL)) |
1633 | #define MX53_PAD_EIM_EB2__ECSPI1_SS0 (_MX53_PAD_EIM_EB2__ECSPI1_SS0 | MUX_PAD_CTRL(NO_PAD_CTRL)) | 1636 | #define MX53_PAD_EIM_EB2__ECSPI1_SS0 (_MX53_PAD_EIM_EB2__ECSPI1_SS0 | MUX_PAD_CTRL(NO_PAD_CTRL)) |
1634 | #define MX53_PAD_EIM_EB2__I2C2_SCL (_MX53_PAD_EIM_EB2__I2C2_SCL | MUX_PAD_CTRL(NO_PAD_CTRL)) | 1637 | #define MX53_PAD_EIM_EB2__I2C2_SCL (_MX53_PAD_EIM_EB2__I2C2_SCL | MUX_PAD_CTRL(PAD_CTRL_I2C)) |
1635 | #define MX53_PAD_EIM_D16__EMI_WEIM_D_16 (_MX53_PAD_EIM_D16__EMI_WEIM_D_16 | MUX_PAD_CTRL(NO_PAD_CTRL)) | 1638 | #define MX53_PAD_EIM_D16__EMI_WEIM_D_16 (_MX53_PAD_EIM_D16__EMI_WEIM_D_16 | MUX_PAD_CTRL(NO_PAD_CTRL)) |
1636 | #define MX53_PAD_EIM_D16__GPIO3_16 (_MX53_PAD_EIM_D16__GPIO3_16 | MUX_PAD_CTRL(NO_PAD_CTRL)) | 1639 | #define MX53_PAD_EIM_D16__GPIO3_16 (_MX53_PAD_EIM_D16__GPIO3_16 | MUX_PAD_CTRL(NO_PAD_CTRL)) |
1637 | #define MX53_PAD_EIM_D16__IPU_DI0_PIN5 (_MX53_PAD_EIM_D16__IPU_DI0_PIN5 | MUX_PAD_CTRL(NO_PAD_CTRL)) | 1640 | #define MX53_PAD_EIM_D16__IPU_DI0_PIN5 (_MX53_PAD_EIM_D16__IPU_DI0_PIN5 | MUX_PAD_CTRL(NO_PAD_CTRL)) |
1638 | #define MX53_PAD_EIM_D16__IPU_DISPB1_SER_CLK (_MX53_PAD_EIM_D16__IPU_DISPB1_SER_CLK | MUX_PAD_CTRL(NO_PAD_CTRL)) | 1641 | #define MX53_PAD_EIM_D16__IPU_DISPB1_SER_CLK (_MX53_PAD_EIM_D16__IPU_DISPB1_SER_CLK | MUX_PAD_CTRL(NO_PAD_CTRL)) |
1639 | #define MX53_PAD_EIM_D16__ECSPI1_SCLK (_MX53_PAD_EIM_D16__ECSPI1_SCLK | MUX_PAD_CTRL(NO_PAD_CTRL)) | 1642 | #define MX53_PAD_EIM_D16__ECSPI1_SCLK (_MX53_PAD_EIM_D16__ECSPI1_SCLK | MUX_PAD_CTRL(NO_PAD_CTRL)) |
1640 | #define MX53_PAD_EIM_D16__I2C2_SDA (_MX53_PAD_EIM_D16__I2C2_SDA | MUX_PAD_CTRL(NO_PAD_CTRL)) | 1643 | #define MX53_PAD_EIM_D16__I2C2_SDA (_MX53_PAD_EIM_D16__I2C2_SDA | MUX_PAD_CTRL(PAD_CTRL_I2C)) |
1641 | #define MX53_PAD_EIM_D17__EMI_WEIM_D_17 (_MX53_PAD_EIM_D17__EMI_WEIM_D_17 | MUX_PAD_CTRL(NO_PAD_CTRL)) | 1644 | #define MX53_PAD_EIM_D17__EMI_WEIM_D_17 (_MX53_PAD_EIM_D17__EMI_WEIM_D_17 | MUX_PAD_CTRL(NO_PAD_CTRL)) |
1642 | #define MX53_PAD_EIM_D17__GPIO3_17 (_MX53_PAD_EIM_D17__GPIO3_17 | MUX_PAD_CTRL(NO_PAD_CTRL)) | 1645 | #define MX53_PAD_EIM_D17__GPIO3_17 (_MX53_PAD_EIM_D17__GPIO3_17 | MUX_PAD_CTRL(NO_PAD_CTRL)) |
1643 | #define MX53_PAD_EIM_D17__IPU_DI0_PIN6 (_MX53_PAD_EIM_D17__IPU_DI0_PIN6 | MUX_PAD_CTRL(NO_PAD_CTRL)) | 1646 | #define MX53_PAD_EIM_D17__IPU_DI0_PIN6 (_MX53_PAD_EIM_D17__IPU_DI0_PIN6 | MUX_PAD_CTRL(NO_PAD_CTRL)) |
1644 | #define MX53_PAD_EIM_D17__IPU_DISPB1_SER_DIN (_MX53_PAD_EIM_D17__IPU_DISPB1_SER_DIN | MUX_PAD_CTRL(NO_PAD_CTRL)) | 1647 | #define MX53_PAD_EIM_D17__IPU_DISPB1_SER_DIN (_MX53_PAD_EIM_D17__IPU_DISPB1_SER_DIN | MUX_PAD_CTRL(NO_PAD_CTRL)) |
1645 | #define MX53_PAD_EIM_D17__ECSPI1_MISO (_MX53_PAD_EIM_D17__ECSPI1_MISO | MUX_PAD_CTRL(NO_PAD_CTRL)) | 1648 | #define MX53_PAD_EIM_D17__ECSPI1_MISO (_MX53_PAD_EIM_D17__ECSPI1_MISO | MUX_PAD_CTRL(NO_PAD_CTRL)) |
1646 | #define MX53_PAD_EIM_D17__I2C3_SCL (_MX53_PAD_EIM_D17__I2C3_SCL | MUX_PAD_CTRL(NO_PAD_CTRL)) | 1649 | #define MX53_PAD_EIM_D17__I2C3_SCL (_MX53_PAD_EIM_D17__I2C3_SCL | MUX_PAD_CTRL(PAD_CTRL_I2C)) |
1647 | #define MX53_PAD_EIM_D18__EMI_WEIM_D_18 (_MX53_PAD_EIM_D18__EMI_WEIM_D_18 | MUX_PAD_CTRL(NO_PAD_CTRL)) | 1650 | #define MX53_PAD_EIM_D18__EMI_WEIM_D_18 (_MX53_PAD_EIM_D18__EMI_WEIM_D_18 | MUX_PAD_CTRL(NO_PAD_CTRL)) |
1648 | #define MX53_PAD_EIM_D18__GPIO3_18 (_MX53_PAD_EIM_D18__GPIO3_18 | MUX_PAD_CTRL(NO_PAD_CTRL)) | 1651 | #define MX53_PAD_EIM_D18__GPIO3_18 (_MX53_PAD_EIM_D18__GPIO3_18 | MUX_PAD_CTRL(NO_PAD_CTRL)) |
1649 | #define MX53_PAD_EIM_D18__IPU_DI0_PIN7 (_MX53_PAD_EIM_D18__IPU_DI0_PIN7 | MUX_PAD_CTRL(NO_PAD_CTRL)) | 1652 | #define MX53_PAD_EIM_D18__IPU_DI0_PIN7 (_MX53_PAD_EIM_D18__IPU_DI0_PIN7 | MUX_PAD_CTRL(NO_PAD_CTRL)) |
1650 | #define MX53_PAD_EIM_D18__IPU_DISPB1_SER_DIO (_MX53_PAD_EIM_D18__IPU_DISPB1_SER_DIO | MUX_PAD_CTRL(NO_PAD_CTRL)) | 1653 | #define MX53_PAD_EIM_D18__IPU_DISPB1_SER_DIO (_MX53_PAD_EIM_D18__IPU_DISPB1_SER_DIO | MUX_PAD_CTRL(NO_PAD_CTRL)) |
1651 | #define MX53_PAD_EIM_D18__ECSPI1_MOSI (_MX53_PAD_EIM_D18__ECSPI1_MOSI | MUX_PAD_CTRL(NO_PAD_CTRL)) | 1654 | #define MX53_PAD_EIM_D18__ECSPI1_MOSI (_MX53_PAD_EIM_D18__ECSPI1_MOSI | MUX_PAD_CTRL(NO_PAD_CTRL)) |
1652 | #define MX53_PAD_EIM_D18__I2C3_SDA (_MX53_PAD_EIM_D18__I2C3_SDA | MUX_PAD_CTRL(NO_PAD_CTRL)) | 1655 | #define MX53_PAD_EIM_D18__I2C3_SDA (_MX53_PAD_EIM_D18__I2C3_SDA | MUX_PAD_CTRL(PAD_CTRL_I2C)) |
1653 | #define MX53_PAD_EIM_D18__IPU_DI1_D0_CS (_MX53_PAD_EIM_D18__IPU_DI1_D0_CS | MUX_PAD_CTRL(NO_PAD_CTRL)) | 1656 | #define MX53_PAD_EIM_D18__IPU_DI1_D0_CS (_MX53_PAD_EIM_D18__IPU_DI1_D0_CS | MUX_PAD_CTRL(NO_PAD_CTRL)) |
1654 | #define MX53_PAD_EIM_D19__EMI_WEIM_D_19 (_MX53_PAD_EIM_D19__EMI_WEIM_D_19 | MUX_PAD_CTRL(NO_PAD_CTRL)) | 1657 | #define MX53_PAD_EIM_D19__EMI_WEIM_D_19 (_MX53_PAD_EIM_D19__EMI_WEIM_D_19 | MUX_PAD_CTRL(NO_PAD_CTRL)) |
1655 | #define MX53_PAD_EIM_D19__GPIO3_19 (_MX53_PAD_EIM_D19__GPIO3_19 | MUX_PAD_CTRL(NO_PAD_CTRL)) | 1658 | #define MX53_PAD_EIM_D19__GPIO3_19 (_MX53_PAD_EIM_D19__GPIO3_19 | MUX_PAD_CTRL(NO_PAD_CTRL)) |
@@ -1672,7 +1675,7 @@ | |||
1672 | #define MX53_PAD_EIM_D21__IPU_DI0_PIN17 (_MX53_PAD_EIM_D21__IPU_DI0_PIN17 | MUX_PAD_CTRL(NO_PAD_CTRL)) | 1675 | #define MX53_PAD_EIM_D21__IPU_DI0_PIN17 (_MX53_PAD_EIM_D21__IPU_DI0_PIN17 | MUX_PAD_CTRL(NO_PAD_CTRL)) |
1673 | #define MX53_PAD_EIM_D21__IPU_DISPB0_SER_CLK (_MX53_PAD_EIM_D21__IPU_DISPB0_SER_CLK | MUX_PAD_CTRL(NO_PAD_CTRL)) | 1676 | #define MX53_PAD_EIM_D21__IPU_DISPB0_SER_CLK (_MX53_PAD_EIM_D21__IPU_DISPB0_SER_CLK | MUX_PAD_CTRL(NO_PAD_CTRL)) |
1674 | #define MX53_PAD_EIM_D21__CSPI_SCLK (_MX53_PAD_EIM_D21__CSPI_SCLK | MUX_PAD_CTRL(NO_PAD_CTRL)) | 1677 | #define MX53_PAD_EIM_D21__CSPI_SCLK (_MX53_PAD_EIM_D21__CSPI_SCLK | MUX_PAD_CTRL(NO_PAD_CTRL)) |
1675 | #define MX53_PAD_EIM_D21__I2C1_SCL (_MX53_PAD_EIM_D21__I2C1_SCL | MUX_PAD_CTRL(NO_PAD_CTRL)) | 1678 | #define MX53_PAD_EIM_D21__I2C1_SCL (_MX53_PAD_EIM_D21__I2C1_SCL | MUX_PAD_CTRL(PAD_CTRL_I2C)) |
1676 | #define MX53_PAD_EIM_D21__USBOH3_USBOTG_OC (_MX53_PAD_EIM_D21__USBOH3_USBOTG_OC | MUX_PAD_CTRL(NO_PAD_CTRL)) | 1679 | #define MX53_PAD_EIM_D21__USBOH3_USBOTG_OC (_MX53_PAD_EIM_D21__USBOH3_USBOTG_OC | MUX_PAD_CTRL(NO_PAD_CTRL)) |
1677 | #define MX53_PAD_EIM_D22__EMI_WEIM_D_22 (_MX53_PAD_EIM_D22__EMI_WEIM_D_22 | MUX_PAD_CTRL(NO_PAD_CTRL)) | 1680 | #define MX53_PAD_EIM_D22__EMI_WEIM_D_22 (_MX53_PAD_EIM_D22__EMI_WEIM_D_22 | MUX_PAD_CTRL(NO_PAD_CTRL)) |
1678 | #define MX53_PAD_EIM_D22__GPIO3_22 (_MX53_PAD_EIM_D22__GPIO3_22 | MUX_PAD_CTRL(NO_PAD_CTRL)) | 1681 | #define MX53_PAD_EIM_D22__GPIO3_22 (_MX53_PAD_EIM_D22__GPIO3_22 | MUX_PAD_CTRL(NO_PAD_CTRL)) |
@@ -1732,7 +1735,7 @@ | |||
1732 | #define MX53_PAD_EIM_D28__UART2_CTS (_MX53_PAD_EIM_D28__UART2_CTS | MUX_PAD_CTRL(MX53_UART_PAD_CTRL)) | 1735 | #define MX53_PAD_EIM_D28__UART2_CTS (_MX53_PAD_EIM_D28__UART2_CTS | MUX_PAD_CTRL(MX53_UART_PAD_CTRL)) |
1733 | #define MX53_PAD_EIM_D28__IPU_DISPB0_SER_DIO (_MX53_PAD_EIM_D28__IPU_DISPB0_SER_DIO | MUX_PAD_CTRL(NO_PAD_CTRL)) | 1736 | #define MX53_PAD_EIM_D28__IPU_DISPB0_SER_DIO (_MX53_PAD_EIM_D28__IPU_DISPB0_SER_DIO | MUX_PAD_CTRL(NO_PAD_CTRL)) |
1734 | #define MX53_PAD_EIM_D28__CSPI_MOSI (_MX53_PAD_EIM_D28__CSPI_MOSI | MUX_PAD_CTRL(NO_PAD_CTRL)) | 1737 | #define MX53_PAD_EIM_D28__CSPI_MOSI (_MX53_PAD_EIM_D28__CSPI_MOSI | MUX_PAD_CTRL(NO_PAD_CTRL)) |
1735 | #define MX53_PAD_EIM_D28__I2C1_SDA (_MX53_PAD_EIM_D28__I2C1_SDA | MUX_PAD_CTRL(NO_PAD_CTRL)) | 1738 | #define MX53_PAD_EIM_D28__I2C1_SDA (_MX53_PAD_EIM_D28__I2C1_SDA | MUX_PAD_CTRL(PAD_CTRL_I2C)) |
1736 | #define MX53_PAD_EIM_D28__IPU_EXT_TRIG (_MX53_PAD_EIM_D28__IPU_EXT_TRIG | MUX_PAD_CTRL(NO_PAD_CTRL)) | 1739 | #define MX53_PAD_EIM_D28__IPU_EXT_TRIG (_MX53_PAD_EIM_D28__IPU_EXT_TRIG | MUX_PAD_CTRL(NO_PAD_CTRL)) |
1737 | #define MX53_PAD_EIM_D28__IPU_DI0_PIN13 (_MX53_PAD_EIM_D28__IPU_DI0_PIN13 | MUX_PAD_CTRL(NO_PAD_CTRL)) | 1740 | #define MX53_PAD_EIM_D28__IPU_DI0_PIN13 (_MX53_PAD_EIM_D28__IPU_DI0_PIN13 | MUX_PAD_CTRL(NO_PAD_CTRL)) |
1738 | #define MX53_PAD_EIM_D29__EMI_WEIM_D_29 (_MX53_PAD_EIM_D29__EMI_WEIM_D_29 | MUX_PAD_CTRL(NO_PAD_CTRL)) | 1741 | #define MX53_PAD_EIM_D29__EMI_WEIM_D_29 (_MX53_PAD_EIM_D29__EMI_WEIM_D_29 | MUX_PAD_CTRL(NO_PAD_CTRL)) |
@@ -2297,7 +2300,7 @@ | |||
2297 | #define MX53_PAD_GPIO_9__SCC_FAIL_STATE (_MX53_PAD_GPIO_9__SCC_FAIL_STATE | MUX_PAD_CTRL(NO_PAD_CTRL)) | 2300 | #define MX53_PAD_GPIO_9__SCC_FAIL_STATE (_MX53_PAD_GPIO_9__SCC_FAIL_STATE | MUX_PAD_CTRL(NO_PAD_CTRL)) |
2298 | #define MX53_PAD_GPIO_3__ESAI1_HCKR (_MX53_PAD_GPIO_3__ESAI1_HCKR | MUX_PAD_CTRL(NO_PAD_CTRL)) | 2301 | #define MX53_PAD_GPIO_3__ESAI1_HCKR (_MX53_PAD_GPIO_3__ESAI1_HCKR | MUX_PAD_CTRL(NO_PAD_CTRL)) |
2299 | #define MX53_PAD_GPIO_3__GPIO1_3 (_MX53_PAD_GPIO_3__GPIO1_3 | MUX_PAD_CTRL(NO_PAD_CTRL)) | 2302 | #define MX53_PAD_GPIO_3__GPIO1_3 (_MX53_PAD_GPIO_3__GPIO1_3 | MUX_PAD_CTRL(NO_PAD_CTRL)) |
2300 | #define MX53_PAD_GPIO_3__I2C3_SCL (_MX53_PAD_GPIO_3__I2C3_SCL | MUX_PAD_CTRL(NO_PAD_CTRL)) | 2303 | #define MX53_PAD_GPIO_3__I2C3_SCL (_MX53_PAD_GPIO_3__I2C3_SCL | MUX_PAD_CTRL(PAD_CTRL_I2C)) |
2301 | #define MX53_PAD_GPIO_3__DPLLIP1_TOG_EN (_MX53_PAD_GPIO_3__DPLLIP1_TOG_EN | MUX_PAD_CTRL(NO_PAD_CTRL)) | 2304 | #define MX53_PAD_GPIO_3__DPLLIP1_TOG_EN (_MX53_PAD_GPIO_3__DPLLIP1_TOG_EN | MUX_PAD_CTRL(NO_PAD_CTRL)) |
2302 | #define MX53_PAD_GPIO_3__CCM_CLKO2 (_MX53_PAD_GPIO_3__CCM_CLKO2 | MUX_PAD_CTRL(NO_PAD_CTRL)) | 2305 | #define MX53_PAD_GPIO_3__CCM_CLKO2 (_MX53_PAD_GPIO_3__CCM_CLKO2 | MUX_PAD_CTRL(NO_PAD_CTRL)) |
2303 | #define MX53_PAD_GPIO_3__OBSERVE_MUX_OBSRV_INT_OUT0 (_MX53_PAD_GPIO_3__OBSERVE_MUX_OBSRV_INT_OUT0 | MUX_PAD_CTRL(NO_PAD_CTRL)) | 2306 | #define MX53_PAD_GPIO_3__OBSERVE_MUX_OBSRV_INT_OUT0 (_MX53_PAD_GPIO_3__OBSERVE_MUX_OBSRV_INT_OUT0 | MUX_PAD_CTRL(NO_PAD_CTRL)) |
@@ -2305,7 +2308,7 @@ | |||
2305 | #define MX53_PAD_GPIO_3__MLB_MLBCLK (_MX53_PAD_GPIO_3__MLB_MLBCLK | MUX_PAD_CTRL(NO_PAD_CTRL)) | 2308 | #define MX53_PAD_GPIO_3__MLB_MLBCLK (_MX53_PAD_GPIO_3__MLB_MLBCLK | MUX_PAD_CTRL(NO_PAD_CTRL)) |
2306 | #define MX53_PAD_GPIO_6__ESAI1_SCKT (_MX53_PAD_GPIO_6__ESAI1_SCKT | MUX_PAD_CTRL(NO_PAD_CTRL)) | 2309 | #define MX53_PAD_GPIO_6__ESAI1_SCKT (_MX53_PAD_GPIO_6__ESAI1_SCKT | MUX_PAD_CTRL(NO_PAD_CTRL)) |
2307 | #define MX53_PAD_GPIO_6__GPIO1_6 (_MX53_PAD_GPIO_6__GPIO1_6 | MUX_PAD_CTRL(NO_PAD_CTRL)) | 2310 | #define MX53_PAD_GPIO_6__GPIO1_6 (_MX53_PAD_GPIO_6__GPIO1_6 | MUX_PAD_CTRL(NO_PAD_CTRL)) |
2308 | #define MX53_PAD_GPIO_6__I2C3_SDA (_MX53_PAD_GPIO_6__I2C3_SDA | MUX_PAD_CTRL(NO_PAD_CTRL)) | 2311 | #define MX53_PAD_GPIO_6__I2C3_SDA (_MX53_PAD_GPIO_6__I2C3_SDA | MUX_PAD_CTRL(PAD_CTRL_I2C)) |
2309 | #define MX53_PAD_GPIO_6__CCM_CCM_OUT_0 (_MX53_PAD_GPIO_6__CCM_CCM_OUT_0 | MUX_PAD_CTRL(NO_PAD_CTRL)) | 2312 | #define MX53_PAD_GPIO_6__CCM_CCM_OUT_0 (_MX53_PAD_GPIO_6__CCM_CCM_OUT_0 | MUX_PAD_CTRL(NO_PAD_CTRL)) |
2310 | #define MX53_PAD_GPIO_6__CSU_CSU_INT_DEB (_MX53_PAD_GPIO_6__CSU_CSU_INT_DEB | MUX_PAD_CTRL(NO_PAD_CTRL)) | 2313 | #define MX53_PAD_GPIO_6__CSU_CSU_INT_DEB (_MX53_PAD_GPIO_6__CSU_CSU_INT_DEB | MUX_PAD_CTRL(NO_PAD_CTRL)) |
2311 | #define MX53_PAD_GPIO_6__OBSERVE_MUX_OBSRV_INT_OUT1 (_MX53_PAD_GPIO_6__OBSERVE_MUX_OBSRV_INT_OUT1 | MUX_PAD_CTRL(NO_PAD_CTRL)) | 2314 | #define MX53_PAD_GPIO_6__OBSERVE_MUX_OBSRV_INT_OUT1 (_MX53_PAD_GPIO_6__OBSERVE_MUX_OBSRV_INT_OUT1 | MUX_PAD_CTRL(NO_PAD_CTRL)) |
@@ -2333,7 +2336,7 @@ | |||
2333 | #define MX53_PAD_GPIO_5__CCM_CLKO (_MX53_PAD_GPIO_5__CCM_CLKO | MUX_PAD_CTRL(NO_PAD_CTRL)) | 2336 | #define MX53_PAD_GPIO_5__CCM_CLKO (_MX53_PAD_GPIO_5__CCM_CLKO | MUX_PAD_CTRL(NO_PAD_CTRL)) |
2334 | #define MX53_PAD_GPIO_5__CSU_CSU_ALARM_AUT_2 (_MX53_PAD_GPIO_5__CSU_CSU_ALARM_AUT_2 | MUX_PAD_CTRL(NO_PAD_CTRL)) | 2337 | #define MX53_PAD_GPIO_5__CSU_CSU_ALARM_AUT_2 (_MX53_PAD_GPIO_5__CSU_CSU_ALARM_AUT_2 | MUX_PAD_CTRL(NO_PAD_CTRL)) |
2335 | #define MX53_PAD_GPIO_5__OBSERVE_MUX_OBSRV_INT_OUT4 (_MX53_PAD_GPIO_5__OBSERVE_MUX_OBSRV_INT_OUT4 | MUX_PAD_CTRL(NO_PAD_CTRL)) | 2338 | #define MX53_PAD_GPIO_5__OBSERVE_MUX_OBSRV_INT_OUT4 (_MX53_PAD_GPIO_5__OBSERVE_MUX_OBSRV_INT_OUT4 | MUX_PAD_CTRL(NO_PAD_CTRL)) |
2336 | #define MX53_PAD_GPIO_5__I2C3_SCL (_MX53_PAD_GPIO_5__I2C3_SCL | MUX_PAD_CTRL(NO_PAD_CTRL)) | 2339 | #define MX53_PAD_GPIO_5__I2C3_SCL (_MX53_PAD_GPIO_5__I2C3_SCL | MUX_PAD_CTRL(PAD_CTRL_I2C)) |
2337 | #define MX53_PAD_GPIO_5__CCM_PLL1_BYP (_MX53_PAD_GPIO_5__CCM_PLL1_BYP | MUX_PAD_CTRL(NO_PAD_CTRL)) | 2340 | #define MX53_PAD_GPIO_5__CCM_PLL1_BYP (_MX53_PAD_GPIO_5__CCM_PLL1_BYP | MUX_PAD_CTRL(NO_PAD_CTRL)) |
2338 | #define MX53_PAD_GPIO_7__ESAI1_TX4_RX1 (_MX53_PAD_GPIO_7__ESAI1_TX4_RX1 | MUX_PAD_CTRL(NO_PAD_CTRL)) | 2341 | #define MX53_PAD_GPIO_7__ESAI1_TX4_RX1 (_MX53_PAD_GPIO_7__ESAI1_TX4_RX1 | MUX_PAD_CTRL(NO_PAD_CTRL)) |
2339 | #define MX53_PAD_GPIO_7__GPIO1_7 (_MX53_PAD_GPIO_7__GPIO1_7 | MUX_PAD_CTRL(NO_PAD_CTRL)) | 2342 | #define MX53_PAD_GPIO_7__GPIO1_7 (_MX53_PAD_GPIO_7__GPIO1_7 | MUX_PAD_CTRL(NO_PAD_CTRL)) |
@@ -2356,7 +2359,7 @@ | |||
2356 | #define MX53_PAD_GPIO_16__TZIC_PWRFAIL_INT (_MX53_PAD_GPIO_16__TZIC_PWRFAIL_INT | MUX_PAD_CTRL(NO_PAD_CTRL)) | 2359 | #define MX53_PAD_GPIO_16__TZIC_PWRFAIL_INT (_MX53_PAD_GPIO_16__TZIC_PWRFAIL_INT | MUX_PAD_CTRL(NO_PAD_CTRL)) |
2357 | #define MX53_PAD_GPIO_16__RTC_CE_RTC_EXT_TRIG1 (_MX53_PAD_GPIO_16__RTC_CE_RTC_EXT_TRIG1 | MUX_PAD_CTRL(NO_PAD_CTRL)) | 2360 | #define MX53_PAD_GPIO_16__RTC_CE_RTC_EXT_TRIG1 (_MX53_PAD_GPIO_16__RTC_CE_RTC_EXT_TRIG1 | MUX_PAD_CTRL(NO_PAD_CTRL)) |
2358 | #define MX53_PAD_GPIO_16__SPDIF_IN1 (_MX53_PAD_GPIO_16__SPDIF_IN1 | MUX_PAD_CTRL(NO_PAD_CTRL)) | 2361 | #define MX53_PAD_GPIO_16__SPDIF_IN1 (_MX53_PAD_GPIO_16__SPDIF_IN1 | MUX_PAD_CTRL(NO_PAD_CTRL)) |
2359 | #define MX53_PAD_GPIO_16__I2C3_SDA (_MX53_PAD_GPIO_16__I2C3_SDA | MUX_PAD_CTRL(NO_PAD_CTRL)) | 2362 | #define MX53_PAD_GPIO_16__I2C3_SDA (_MX53_PAD_GPIO_16__I2C3_SDA | MUX_PAD_CTRL(PAD_CTRL_I2C)) |
2360 | #define MX53_PAD_GPIO_16__SJC_DE_B (_MX53_PAD_GPIO_16__SJC_DE_B | MUX_PAD_CTRL(NO_PAD_CTRL)) | 2363 | #define MX53_PAD_GPIO_16__SJC_DE_B (_MX53_PAD_GPIO_16__SJC_DE_B | MUX_PAD_CTRL(NO_PAD_CTRL)) |
2361 | #define MX53_PAD_GPIO_17__ESAI1_TX0 (_MX53_PAD_GPIO_17__ESAI1_TX0 | MUX_PAD_CTRL(NO_PAD_CTRL)) | 2364 | #define MX53_PAD_GPIO_17__ESAI1_TX0 (_MX53_PAD_GPIO_17__ESAI1_TX0 | MUX_PAD_CTRL(NO_PAD_CTRL)) |
2362 | #define MX53_PAD_GPIO_17__GPIO7_12 (_MX53_PAD_GPIO_17__GPIO7_12 | MUX_PAD_CTRL(NO_PAD_CTRL)) | 2365 | #define MX53_PAD_GPIO_17__GPIO7_12 (_MX53_PAD_GPIO_17__GPIO7_12 | MUX_PAD_CTRL(NO_PAD_CTRL)) |
diff --git a/arch/arm/plat-omap/Kconfig b/arch/arm/plat-omap/Kconfig index 6e6735f04ee3..5b605a9eb091 100644 --- a/arch/arm/plat-omap/Kconfig +++ b/arch/arm/plat-omap/Kconfig | |||
@@ -13,6 +13,8 @@ config ARCH_OMAP1 | |||
13 | bool "TI OMAP1" | 13 | bool "TI OMAP1" |
14 | select CLKDEV_LOOKUP | 14 | select CLKDEV_LOOKUP |
15 | select CLKSRC_MMIO | 15 | select CLKSRC_MMIO |
16 | select GENERIC_IRQ_CHIP | ||
17 | select HAVE_IDE | ||
16 | help | 18 | help |
17 | "Systems based on omap7xx, omap15xx or omap16xx" | 19 | "Systems based on omap7xx, omap15xx or omap16xx" |
18 | 20 | ||
diff --git a/arch/arm/plat-omap/include/plat/dma.h b/arch/arm/plat-omap/include/plat/dma.h index d1c916fcf770..dc562a5c0a8a 100644 --- a/arch/arm/plat-omap/include/plat/dma.h +++ b/arch/arm/plat-omap/include/plat/dma.h | |||
@@ -195,6 +195,11 @@ | |||
195 | 195 | ||
196 | #define OMAP36XX_DMA_UART4_TX 81 /* S_DMA_80 */ | 196 | #define OMAP36XX_DMA_UART4_TX 81 /* S_DMA_80 */ |
197 | #define OMAP36XX_DMA_UART4_RX 82 /* S_DMA_81 */ | 197 | #define OMAP36XX_DMA_UART4_RX 82 /* S_DMA_81 */ |
198 | |||
199 | /* Only for AM35xx */ | ||
200 | #define AM35XX_DMA_UART4_TX 54 | ||
201 | #define AM35XX_DMA_UART4_RX 55 | ||
202 | |||
198 | /*----------------------------------------------------------------------------*/ | 203 | /*----------------------------------------------------------------------------*/ |
199 | 204 | ||
200 | #define OMAP1_DMA_TOUT_IRQ (1 << 0) | 205 | #define OMAP1_DMA_TOUT_IRQ (1 << 0) |
diff --git a/arch/arm/plat-omap/include/plat/irqs.h b/arch/arm/plat-omap/include/plat/irqs.h index 926d25c780f3..30e10719b774 100644 --- a/arch/arm/plat-omap/include/plat/irqs.h +++ b/arch/arm/plat-omap/include/plat/irqs.h | |||
@@ -357,6 +357,7 @@ | |||
357 | #define INT_35XX_EMAC_C0_TX_PULSE_IRQ 69 | 357 | #define INT_35XX_EMAC_C0_TX_PULSE_IRQ 69 |
358 | #define INT_35XX_EMAC_C0_MISC_PULSE_IRQ 70 | 358 | #define INT_35XX_EMAC_C0_MISC_PULSE_IRQ 70 |
359 | #define INT_35XX_USBOTG_IRQ 71 | 359 | #define INT_35XX_USBOTG_IRQ 71 |
360 | #define INT_35XX_UART4 84 | ||
360 | #define INT_35XX_CCDC_VD0_IRQ 88 | 361 | #define INT_35XX_CCDC_VD0_IRQ 88 |
361 | #define INT_35XX_CCDC_VD1_IRQ 92 | 362 | #define INT_35XX_CCDC_VD1_IRQ 92 |
362 | #define INT_35XX_CCDC_VD2_IRQ 93 | 363 | #define INT_35XX_CCDC_VD2_IRQ 93 |
diff --git a/arch/arm/plat-omap/include/plat/serial.h b/arch/arm/plat-omap/include/plat/serial.h index 2723f9166ea2..de3b10c18127 100644 --- a/arch/arm/plat-omap/include/plat/serial.h +++ b/arch/arm/plat-omap/include/plat/serial.h | |||
@@ -56,6 +56,9 @@ | |||
56 | #define TI816X_UART2_BASE 0x48022000 | 56 | #define TI816X_UART2_BASE 0x48022000 |
57 | #define TI816X_UART3_BASE 0x48024000 | 57 | #define TI816X_UART3_BASE 0x48024000 |
58 | 58 | ||
59 | /* AM3505/3517 UART4 */ | ||
60 | #define AM35XX_UART4_BASE 0x4809E000 /* Only on AM3505/3517 */ | ||
61 | |||
59 | /* External port on Zoom2/3 */ | 62 | /* External port on Zoom2/3 */ |
60 | #define ZOOM_UART_BASE 0x10000000 | 63 | #define ZOOM_UART_BASE 0x10000000 |
61 | #define ZOOM_UART_VIRT 0xfa400000 | 64 | #define ZOOM_UART_VIRT 0xfa400000 |
diff --git a/arch/arm/plat-omap/iovmm.c b/arch/arm/plat-omap/iovmm.c index c60737c49a32..79e7fedb8602 100644 --- a/arch/arm/plat-omap/iovmm.c +++ b/arch/arm/plat-omap/iovmm.c | |||
@@ -423,9 +423,6 @@ static void sgtable_fill_kmalloc(struct sg_table *sgt, u32 pa, u32 da, | |||
423 | { | 423 | { |
424 | unsigned int i; | 424 | unsigned int i; |
425 | struct scatterlist *sg; | 425 | struct scatterlist *sg; |
426 | void *va; | ||
427 | |||
428 | va = phys_to_virt(pa); | ||
429 | 426 | ||
430 | for_each_sg(sgt->sgl, sg, sgt->nents, i) { | 427 | for_each_sg(sgt->sgl, sg, sgt->nents, i) { |
431 | unsigned bytes; | 428 | unsigned bytes; |
diff --git a/arch/arm/plat-omap/omap_device.c b/arch/arm/plat-omap/omap_device.c index b6b409744954..02609eee0562 100644 --- a/arch/arm/plat-omap/omap_device.c +++ b/arch/arm/plat-omap/omap_device.c | |||
@@ -615,6 +615,9 @@ static int _od_resume_noirq(struct device *dev) | |||
615 | 615 | ||
616 | return pm_generic_resume_noirq(dev); | 616 | return pm_generic_resume_noirq(dev); |
617 | } | 617 | } |
618 | #else | ||
619 | #define _od_suspend_noirq NULL | ||
620 | #define _od_resume_noirq NULL | ||
618 | #endif | 621 | #endif |
619 | 622 | ||
620 | static struct dev_pm_domain omap_device_pm_domain = { | 623 | static struct dev_pm_domain omap_device_pm_domain = { |
@@ -622,7 +625,8 @@ static struct dev_pm_domain omap_device_pm_domain = { | |||
622 | SET_RUNTIME_PM_OPS(_od_runtime_suspend, _od_runtime_resume, | 625 | SET_RUNTIME_PM_OPS(_od_runtime_suspend, _od_runtime_resume, |
623 | _od_runtime_idle) | 626 | _od_runtime_idle) |
624 | USE_PLATFORM_PM_SLEEP_OPS | 627 | USE_PLATFORM_PM_SLEEP_OPS |
625 | SET_SYSTEM_SLEEP_PM_OPS(_od_suspend_noirq, _od_resume_noirq) | 628 | .suspend_noirq = _od_suspend_noirq, |
629 | .resume_noirq = _od_resume_noirq, | ||
626 | } | 630 | } |
627 | }; | 631 | }; |
628 | 632 | ||
diff --git a/arch/arm/plat-s5p/Kconfig b/arch/arm/plat-s5p/Kconfig index 9843c954c042..9a197e55f669 100644 --- a/arch/arm/plat-s5p/Kconfig +++ b/arch/arm/plat-s5p/Kconfig | |||
@@ -22,7 +22,6 @@ config PLAT_S5P | |||
22 | select PLAT_SAMSUNG | 22 | select PLAT_SAMSUNG |
23 | select SAMSUNG_CLKSRC | 23 | select SAMSUNG_CLKSRC |
24 | select SAMSUNG_IRQ_VIC_TIMER | 24 | select SAMSUNG_IRQ_VIC_TIMER |
25 | select SAMSUNG_IRQ_UART | ||
26 | help | 25 | help |
27 | Base platform code for Samsung's S5P series SoC. | 26 | Base platform code for Samsung's S5P series SoC. |
28 | 27 | ||
diff --git a/arch/arm/plat-s5p/clock.c b/arch/arm/plat-s5p/clock.c index 02af235298e2..5f84a3f13ef9 100644 --- a/arch/arm/plat-s5p/clock.c +++ b/arch/arm/plat-s5p/clock.c | |||
@@ -192,7 +192,7 @@ unsigned long s5p_spdif_get_rate(struct clk *clk) | |||
192 | if (IS_ERR(pclk)) | 192 | if (IS_ERR(pclk)) |
193 | return -EINVAL; | 193 | return -EINVAL; |
194 | 194 | ||
195 | rate = pclk->ops->get_rate(clk); | 195 | rate = pclk->ops->get_rate(pclk); |
196 | clk_put(pclk); | 196 | clk_put(pclk); |
197 | 197 | ||
198 | return rate; | 198 | return rate; |
diff --git a/arch/arm/plat-s5p/dev-uart.c b/arch/arm/plat-s5p/dev-uart.c index afaf87fdb93e..c9308db36183 100644 --- a/arch/arm/plat-s5p/dev-uart.c +++ b/arch/arm/plat-s5p/dev-uart.c | |||
@@ -32,20 +32,10 @@ static struct resource s5p_uart0_resource[] = { | |||
32 | .flags = IORESOURCE_MEM, | 32 | .flags = IORESOURCE_MEM, |
33 | }, | 33 | }, |
34 | [1] = { | 34 | [1] = { |
35 | .start = IRQ_S5P_UART_RX0, | 35 | .start = IRQ_UART0, |
36 | .end = IRQ_S5P_UART_RX0, | 36 | .end = IRQ_UART0, |
37 | .flags = IORESOURCE_IRQ, | 37 | .flags = IORESOURCE_IRQ, |
38 | }, | 38 | }, |
39 | [2] = { | ||
40 | .start = IRQ_S5P_UART_TX0, | ||
41 | .end = IRQ_S5P_UART_TX0, | ||
42 | .flags = IORESOURCE_IRQ, | ||
43 | }, | ||
44 | [3] = { | ||
45 | .start = IRQ_S5P_UART_ERR0, | ||
46 | .end = IRQ_S5P_UART_ERR0, | ||
47 | .flags = IORESOURCE_IRQ, | ||
48 | } | ||
49 | }; | 39 | }; |
50 | 40 | ||
51 | static struct resource s5p_uart1_resource[] = { | 41 | static struct resource s5p_uart1_resource[] = { |
@@ -55,18 +45,8 @@ static struct resource s5p_uart1_resource[] = { | |||
55 | .flags = IORESOURCE_MEM, | 45 | .flags = IORESOURCE_MEM, |
56 | }, | 46 | }, |
57 | [1] = { | 47 | [1] = { |
58 | .start = IRQ_S5P_UART_RX1, | 48 | .start = IRQ_UART1, |
59 | .end = IRQ_S5P_UART_RX1, | 49 | .end = IRQ_UART1, |
60 | .flags = IORESOURCE_IRQ, | ||
61 | }, | ||
62 | [2] = { | ||
63 | .start = IRQ_S5P_UART_TX1, | ||
64 | .end = IRQ_S5P_UART_TX1, | ||
65 | .flags = IORESOURCE_IRQ, | ||
66 | }, | ||
67 | [3] = { | ||
68 | .start = IRQ_S5P_UART_ERR1, | ||
69 | .end = IRQ_S5P_UART_ERR1, | ||
70 | .flags = IORESOURCE_IRQ, | 50 | .flags = IORESOURCE_IRQ, |
71 | }, | 51 | }, |
72 | }; | 52 | }; |
@@ -78,18 +58,8 @@ static struct resource s5p_uart2_resource[] = { | |||
78 | .flags = IORESOURCE_MEM, | 58 | .flags = IORESOURCE_MEM, |
79 | }, | 59 | }, |
80 | [1] = { | 60 | [1] = { |
81 | .start = IRQ_S5P_UART_RX2, | 61 | .start = IRQ_UART2, |
82 | .end = IRQ_S5P_UART_RX2, | 62 | .end = IRQ_UART2, |
83 | .flags = IORESOURCE_IRQ, | ||
84 | }, | ||
85 | [2] = { | ||
86 | .start = IRQ_S5P_UART_TX2, | ||
87 | .end = IRQ_S5P_UART_TX2, | ||
88 | .flags = IORESOURCE_IRQ, | ||
89 | }, | ||
90 | [3] = { | ||
91 | .start = IRQ_S5P_UART_ERR2, | ||
92 | .end = IRQ_S5P_UART_ERR2, | ||
93 | .flags = IORESOURCE_IRQ, | 63 | .flags = IORESOURCE_IRQ, |
94 | }, | 64 | }, |
95 | }; | 65 | }; |
@@ -102,18 +72,8 @@ static struct resource s5p_uart3_resource[] = { | |||
102 | .flags = IORESOURCE_MEM, | 72 | .flags = IORESOURCE_MEM, |
103 | }, | 73 | }, |
104 | [1] = { | 74 | [1] = { |
105 | .start = IRQ_S5P_UART_RX3, | 75 | .start = IRQ_UART3, |
106 | .end = IRQ_S5P_UART_RX3, | 76 | .end = IRQ_UART3, |
107 | .flags = IORESOURCE_IRQ, | ||
108 | }, | ||
109 | [2] = { | ||
110 | .start = IRQ_S5P_UART_TX3, | ||
111 | .end = IRQ_S5P_UART_TX3, | ||
112 | .flags = IORESOURCE_IRQ, | ||
113 | }, | ||
114 | [3] = { | ||
115 | .start = IRQ_S5P_UART_ERR3, | ||
116 | .end = IRQ_S5P_UART_ERR3, | ||
117 | .flags = IORESOURCE_IRQ, | 77 | .flags = IORESOURCE_IRQ, |
118 | }, | 78 | }, |
119 | #endif | 79 | #endif |
@@ -127,18 +87,8 @@ static struct resource s5p_uart4_resource[] = { | |||
127 | .flags = IORESOURCE_MEM, | 87 | .flags = IORESOURCE_MEM, |
128 | }, | 88 | }, |
129 | [1] = { | 89 | [1] = { |
130 | .start = IRQ_S5P_UART_RX4, | 90 | .start = IRQ_UART4, |
131 | .end = IRQ_S5P_UART_RX4, | 91 | .end = IRQ_UART4, |
132 | .flags = IORESOURCE_IRQ, | ||
133 | }, | ||
134 | [2] = { | ||
135 | .start = IRQ_S5P_UART_TX4, | ||
136 | .end = IRQ_S5P_UART_TX4, | ||
137 | .flags = IORESOURCE_IRQ, | ||
138 | }, | ||
139 | [3] = { | ||
140 | .start = IRQ_S5P_UART_ERR4, | ||
141 | .end = IRQ_S5P_UART_ERR4, | ||
142 | .flags = IORESOURCE_IRQ, | 92 | .flags = IORESOURCE_IRQ, |
143 | }, | 93 | }, |
144 | #endif | 94 | #endif |
@@ -152,18 +102,8 @@ static struct resource s5p_uart5_resource[] = { | |||
152 | .flags = IORESOURCE_MEM, | 102 | .flags = IORESOURCE_MEM, |
153 | }, | 103 | }, |
154 | [1] = { | 104 | [1] = { |
155 | .start = IRQ_S5P_UART_RX5, | 105 | .start = IRQ_UART5, |
156 | .end = IRQ_S5P_UART_RX5, | 106 | .end = IRQ_UART5, |
157 | .flags = IORESOURCE_IRQ, | ||
158 | }, | ||
159 | [2] = { | ||
160 | .start = IRQ_S5P_UART_TX5, | ||
161 | .end = IRQ_S5P_UART_TX5, | ||
162 | .flags = IORESOURCE_IRQ, | ||
163 | }, | ||
164 | [3] = { | ||
165 | .start = IRQ_S5P_UART_ERR5, | ||
166 | .end = IRQ_S5P_UART_ERR5, | ||
167 | .flags = IORESOURCE_IRQ, | 107 | .flags = IORESOURCE_IRQ, |
168 | }, | 108 | }, |
169 | #endif | 109 | #endif |
diff --git a/arch/arm/plat-s5p/include/plat/irqs.h b/arch/arm/plat-s5p/include/plat/irqs.h index ba9121c60a2a..144dbfc6506d 100644 --- a/arch/arm/plat-s5p/include/plat/irqs.h +++ b/arch/arm/plat-s5p/include/plat/irqs.h | |||
@@ -37,41 +37,6 @@ | |||
37 | #define IRQ_VIC1_BASE S5P_VIC1_BASE | 37 | #define IRQ_VIC1_BASE S5P_VIC1_BASE |
38 | #define IRQ_VIC2_BASE S5P_VIC2_BASE | 38 | #define IRQ_VIC2_BASE S5P_VIC2_BASE |
39 | 39 | ||
40 | /* UART interrupts, each UART has 4 intterupts per channel so | ||
41 | * use the space between the ISA and S3C main interrupts. Note, these | ||
42 | * are not in the same order as the S3C24XX series! */ | ||
43 | |||
44 | #define IRQ_S5P_UART_BASE0 (16) | ||
45 | #define IRQ_S5P_UART_BASE1 (20) | ||
46 | #define IRQ_S5P_UART_BASE2 (24) | ||
47 | #define IRQ_S5P_UART_BASE3 (28) | ||
48 | |||
49 | #define UART_IRQ_RXD (0) | ||
50 | #define UART_IRQ_ERR (1) | ||
51 | #define UART_IRQ_TXD (2) | ||
52 | |||
53 | #define IRQ_S5P_UART_RX0 (IRQ_S5P_UART_BASE0 + UART_IRQ_RXD) | ||
54 | #define IRQ_S5P_UART_TX0 (IRQ_S5P_UART_BASE0 + UART_IRQ_TXD) | ||
55 | #define IRQ_S5P_UART_ERR0 (IRQ_S5P_UART_BASE0 + UART_IRQ_ERR) | ||
56 | |||
57 | #define IRQ_S5P_UART_RX1 (IRQ_S5P_UART_BASE1 + UART_IRQ_RXD) | ||
58 | #define IRQ_S5P_UART_TX1 (IRQ_S5P_UART_BASE1 + UART_IRQ_TXD) | ||
59 | #define IRQ_S5P_UART_ERR1 (IRQ_S5P_UART_BASE1 + UART_IRQ_ERR) | ||
60 | |||
61 | #define IRQ_S5P_UART_RX2 (IRQ_S5P_UART_BASE2 + UART_IRQ_RXD) | ||
62 | #define IRQ_S5P_UART_TX2 (IRQ_S5P_UART_BASE2 + UART_IRQ_TXD) | ||
63 | #define IRQ_S5P_UART_ERR2 (IRQ_S5P_UART_BASE2 + UART_IRQ_ERR) | ||
64 | |||
65 | #define IRQ_S5P_UART_RX3 (IRQ_S5P_UART_BASE3 + UART_IRQ_RXD) | ||
66 | #define IRQ_S5P_UART_TX3 (IRQ_S5P_UART_BASE3 + UART_IRQ_TXD) | ||
67 | #define IRQ_S5P_UART_ERR3 (IRQ_S5P_UART_BASE3 + UART_IRQ_ERR) | ||
68 | |||
69 | /* S3C compatibilty defines */ | ||
70 | #define IRQ_S3CUART_RX0 IRQ_S5P_UART_RX0 | ||
71 | #define IRQ_S3CUART_RX1 IRQ_S5P_UART_RX1 | ||
72 | #define IRQ_S3CUART_RX2 IRQ_S5P_UART_RX2 | ||
73 | #define IRQ_S3CUART_RX3 IRQ_S5P_UART_RX3 | ||
74 | |||
75 | /* VIC based IRQs */ | 40 | /* VIC based IRQs */ |
76 | 41 | ||
77 | #define S5P_IRQ_VIC0(x) (S5P_VIC0_BASE + (x)) | 42 | #define S5P_IRQ_VIC0(x) (S5P_VIC0_BASE + (x)) |
diff --git a/arch/arm/plat-s5p/irq-gpioint.c b/arch/arm/plat-s5p/irq-gpioint.c index 327ab9f662e8..c65eb791d1bb 100644 --- a/arch/arm/plat-s5p/irq-gpioint.c +++ b/arch/arm/plat-s5p/irq-gpioint.c | |||
@@ -23,6 +23,8 @@ | |||
23 | #include <plat/gpio-core.h> | 23 | #include <plat/gpio-core.h> |
24 | #include <plat/gpio-cfg.h> | 24 | #include <plat/gpio-cfg.h> |
25 | 25 | ||
26 | #include <asm/mach/irq.h> | ||
27 | |||
26 | #define GPIO_BASE(chip) (((unsigned long)(chip)->base) & 0xFFFFF000u) | 28 | #define GPIO_BASE(chip) (((unsigned long)(chip)->base) & 0xFFFFF000u) |
27 | 29 | ||
28 | #define CON_OFFSET 0x700 | 30 | #define CON_OFFSET 0x700 |
@@ -81,6 +83,9 @@ static void s5p_gpioint_handler(unsigned int irq, struct irq_desc *desc) | |||
81 | int group, pend_offset, mask_offset; | 83 | int group, pend_offset, mask_offset; |
82 | unsigned int pend, mask; | 84 | unsigned int pend, mask; |
83 | 85 | ||
86 | struct irq_chip *chip = irq_get_chip(irq); | ||
87 | chained_irq_enter(chip, desc); | ||
88 | |||
84 | for (group = 0; group < bank->nr_groups; group++) { | 89 | for (group = 0; group < bank->nr_groups; group++) { |
85 | struct s3c_gpio_chip *chip = bank->chips[group]; | 90 | struct s3c_gpio_chip *chip = bank->chips[group]; |
86 | if (!chip) | 91 | if (!chip) |
@@ -102,23 +107,25 @@ static void s5p_gpioint_handler(unsigned int irq, struct irq_desc *desc) | |||
102 | pend &= ~BIT(offset); | 107 | pend &= ~BIT(offset); |
103 | } | 108 | } |
104 | } | 109 | } |
110 | chained_irq_exit(chip, desc); | ||
105 | } | 111 | } |
106 | 112 | ||
107 | static __init int s5p_gpioint_add(struct s3c_gpio_chip *chip) | 113 | static __init int s5p_gpioint_add(struct s3c_gpio_chip *chip) |
108 | { | 114 | { |
109 | static int used_gpioint_groups = 0; | 115 | static int used_gpioint_groups = 0; |
110 | int group = chip->group; | 116 | int group = chip->group; |
111 | struct s5p_gpioint_bank *bank = NULL; | 117 | struct s5p_gpioint_bank *b, *bank = NULL; |
112 | struct irq_chip_generic *gc; | 118 | struct irq_chip_generic *gc; |
113 | struct irq_chip_type *ct; | 119 | struct irq_chip_type *ct; |
114 | 120 | ||
115 | if (used_gpioint_groups >= S5P_GPIOINT_GROUP_COUNT) | 121 | if (used_gpioint_groups >= S5P_GPIOINT_GROUP_COUNT) |
116 | return -ENOMEM; | 122 | return -ENOMEM; |
117 | 123 | ||
118 | list_for_each_entry(bank, &banks, list) { | 124 | list_for_each_entry(b, &banks, list) { |
119 | if (group >= bank->start && | 125 | if (group >= b->start && group < b->start + b->nr_groups) { |
120 | group < bank->start + bank->nr_groups) | 126 | bank = b; |
121 | break; | 127 | break; |
128 | } | ||
122 | } | 129 | } |
123 | if (!bank) | 130 | if (!bank) |
124 | return -EINVAL; | 131 | return -EINVAL; |
@@ -156,9 +163,9 @@ static __init int s5p_gpioint_add(struct s3c_gpio_chip *chip) | |||
156 | ct->chip.irq_mask = irq_gc_mask_set_bit; | 163 | ct->chip.irq_mask = irq_gc_mask_set_bit; |
157 | ct->chip.irq_unmask = irq_gc_mask_clr_bit; | 164 | ct->chip.irq_unmask = irq_gc_mask_clr_bit; |
158 | ct->chip.irq_set_type = s5p_gpioint_set_type, | 165 | ct->chip.irq_set_type = s5p_gpioint_set_type, |
159 | ct->regs.ack = PEND_OFFSET + REG_OFFSET(chip->group); | 166 | ct->regs.ack = PEND_OFFSET + REG_OFFSET(group - bank->start); |
160 | ct->regs.mask = MASK_OFFSET + REG_OFFSET(chip->group); | 167 | ct->regs.mask = MASK_OFFSET + REG_OFFSET(group - bank->start); |
161 | ct->regs.type = CON_OFFSET + REG_OFFSET(chip->group); | 168 | ct->regs.type = CON_OFFSET + REG_OFFSET(group - bank->start); |
162 | irq_setup_generic_chip(gc, IRQ_MSK(chip->chip.ngpio), | 169 | irq_setup_generic_chip(gc, IRQ_MSK(chip->chip.ngpio), |
163 | IRQ_GC_INIT_MASK_CACHE, | 170 | IRQ_GC_INIT_MASK_CACHE, |
164 | IRQ_NOREQUEST | IRQ_NOPROBE, 0); | 171 | IRQ_NOREQUEST | IRQ_NOPROBE, 0); |
diff --git a/arch/arm/plat-s5p/irq.c b/arch/arm/plat-s5p/irq.c index a97c08957f49..afdaa1082b9f 100644 --- a/arch/arm/plat-s5p/irq.c +++ b/arch/arm/plat-s5p/irq.c | |||
@@ -17,42 +17,10 @@ | |||
17 | 17 | ||
18 | #include <asm/hardware/vic.h> | 18 | #include <asm/hardware/vic.h> |
19 | 19 | ||
20 | #include <linux/serial_core.h> | ||
21 | #include <mach/map.h> | 20 | #include <mach/map.h> |
22 | #include <plat/regs-timer.h> | 21 | #include <plat/regs-timer.h> |
23 | #include <plat/regs-serial.h> | ||
24 | #include <plat/cpu.h> | 22 | #include <plat/cpu.h> |
25 | #include <plat/irq-vic-timer.h> | 23 | #include <plat/irq-vic-timer.h> |
26 | #include <plat/irq-uart.h> | ||
27 | |||
28 | /* | ||
29 | * Note, we make use of the fact that the parent IRQs, IRQ_UART[0..3] | ||
30 | * are consecutive when looking up the interrupt in the demux routines. | ||
31 | */ | ||
32 | static struct s3c_uart_irq uart_irqs[] = { | ||
33 | [0] = { | ||
34 | .regs = S5P_VA_UART0, | ||
35 | .base_irq = IRQ_S5P_UART_BASE0, | ||
36 | .parent_irq = IRQ_UART0, | ||
37 | }, | ||
38 | [1] = { | ||
39 | .regs = S5P_VA_UART1, | ||
40 | .base_irq = IRQ_S5P_UART_BASE1, | ||
41 | .parent_irq = IRQ_UART1, | ||
42 | }, | ||
43 | [2] = { | ||
44 | .regs = S5P_VA_UART2, | ||
45 | .base_irq = IRQ_S5P_UART_BASE2, | ||
46 | .parent_irq = IRQ_UART2, | ||
47 | }, | ||
48 | #if CONFIG_SERIAL_SAMSUNG_UARTS > 3 | ||
49 | [3] = { | ||
50 | .regs = S5P_VA_UART3, | ||
51 | .base_irq = IRQ_S5P_UART_BASE3, | ||
52 | .parent_irq = IRQ_UART3, | ||
53 | }, | ||
54 | #endif | ||
55 | }; | ||
56 | 24 | ||
57 | void __init s5p_init_irq(u32 *vic, u32 num_vic) | 25 | void __init s5p_init_irq(u32 *vic, u32 num_vic) |
58 | { | 26 | { |
@@ -65,6 +33,4 @@ void __init s5p_init_irq(u32 *vic, u32 num_vic) | |||
65 | #endif | 33 | #endif |
66 | 34 | ||
67 | s3c_init_vic_timer_irq(5, IRQ_TIMER0); | 35 | s3c_init_vic_timer_irq(5, IRQ_TIMER0); |
68 | |||
69 | s3c_init_uart_irqs(uart_irqs, ARRAY_SIZE(uart_irqs)); | ||
70 | } | 36 | } |
diff --git a/arch/arm/plat-samsung/Kconfig b/arch/arm/plat-samsung/Kconfig index b3e10659e4b8..dffa37bc4a0b 100644 --- a/arch/arm/plat-samsung/Kconfig +++ b/arch/arm/plat-samsung/Kconfig | |||
@@ -65,11 +65,6 @@ config SAMSUNG_IRQ_VIC_TIMER | |||
65 | help | 65 | help |
66 | Internal configuration to build the VIC timer interrupt code. | 66 | Internal configuration to build the VIC timer interrupt code. |
67 | 67 | ||
68 | config SAMSUNG_IRQ_UART | ||
69 | bool | ||
70 | help | ||
71 | Internal configuration to build the IRQ UART demux code. | ||
72 | |||
73 | # options for gpio configuration support | 68 | # options for gpio configuration support |
74 | 69 | ||
75 | config SAMSUNG_GPIOLIB_4BIT | 70 | config SAMSUNG_GPIOLIB_4BIT |
diff --git a/arch/arm/plat-samsung/Makefile b/arch/arm/plat-samsung/Makefile index 853764ba8cc5..1105922342fe 100644 --- a/arch/arm/plat-samsung/Makefile +++ b/arch/arm/plat-samsung/Makefile | |||
@@ -21,7 +21,6 @@ obj-y += dev-asocdma.o | |||
21 | 21 | ||
22 | obj-$(CONFIG_SAMSUNG_CLKSRC) += clock-clksrc.o | 22 | obj-$(CONFIG_SAMSUNG_CLKSRC) += clock-clksrc.o |
23 | 23 | ||
24 | obj-$(CONFIG_SAMSUNG_IRQ_UART) += irq-uart.o | ||
25 | obj-$(CONFIG_SAMSUNG_IRQ_VIC_TIMER) += irq-vic-timer.o | 24 | obj-$(CONFIG_SAMSUNG_IRQ_VIC_TIMER) += irq-vic-timer.o |
26 | 25 | ||
27 | # ADC | 26 | # ADC |
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/backlight.h b/arch/arm/plat-samsung/include/plat/backlight.h index 51d8da846a62..ad530c78fe8c 100644 --- a/arch/arm/plat-samsung/include/plat/backlight.h +++ b/arch/arm/plat-samsung/include/plat/backlight.h | |||
@@ -20,7 +20,7 @@ struct samsung_bl_gpio_info { | |||
20 | int func; | 20 | int func; |
21 | }; | 21 | }; |
22 | 22 | ||
23 | extern void samsung_bl_set(struct samsung_bl_gpio_info *gpio_info, | 23 | extern void __init samsung_bl_set(struct samsung_bl_gpio_info *gpio_info, |
24 | struct platform_pwm_backlight_data *bl_data); | 24 | struct platform_pwm_backlight_data *bl_data); |
25 | 25 | ||
26 | #endif /* __ASM_PLAT_BACKLIGHT_H */ | 26 | #endif /* __ASM_PLAT_BACKLIGHT_H */ |
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/regs-serial.h b/arch/arm/plat-samsung/include/plat/regs-serial.h index bac36fa3becb..720734847027 100644 --- a/arch/arm/plat-samsung/include/plat/regs-serial.h +++ b/arch/arm/plat-samsung/include/plat/regs-serial.h | |||
@@ -186,6 +186,11 @@ | |||
186 | #define S3C64XX_UINTSP 0x34 | 186 | #define S3C64XX_UINTSP 0x34 |
187 | #define S3C64XX_UINTM 0x38 | 187 | #define S3C64XX_UINTM 0x38 |
188 | 188 | ||
189 | #define S3C64XX_UINTM_RXD (0) | ||
190 | #define S3C64XX_UINTM_TXD (2) | ||
191 | #define S3C64XX_UINTM_RXD_MSK (1 << S3C64XX_UINTM_RXD) | ||
192 | #define S3C64XX_UINTM_TXD_MSK (1 << S3C64XX_UINTM_TXD) | ||
193 | |||
189 | /* Following are specific to S5PV210 */ | 194 | /* Following are specific to S5PV210 */ |
190 | #define S5PV210_UCON_CLKMASK (1<<10) | 195 | #define S5PV210_UCON_CLKMASK (1<<10) |
191 | #define S5PV210_UCON_PCLK (0<<10) | 196 | #define S5PV210_UCON_PCLK (0<<10) |
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/plat-samsung/irq-uart.c b/arch/arm/plat-samsung/irq-uart.c deleted file mode 100644 index 3014c7226bd1..000000000000 --- a/arch/arm/plat-samsung/irq-uart.c +++ /dev/null | |||
@@ -1,96 +0,0 @@ | |||
1 | /* arch/arm/plat-samsung/irq-uart.c | ||
2 | * originally part of arch/arm/plat-s3c64xx/irq.c | ||
3 | * | ||
4 | * Copyright 2008 Openmoko, Inc. | ||
5 | * Copyright 2008 Simtec Electronics | ||
6 | * Ben Dooks <ben@simtec.co.uk> | ||
7 | * http://armlinux.simtec.co.uk/ | ||
8 | * | ||
9 | * Samsung- UART Interrupt handling | ||
10 | * | ||
11 | * This program is free software; you can redistribute it and/or modify | ||
12 | * it under the terms of the GNU General Public License version 2 as | ||
13 | * published by the Free Software Foundation. | ||
14 | */ | ||
15 | |||
16 | #include <linux/kernel.h> | ||
17 | #include <linux/interrupt.h> | ||
18 | #include <linux/serial_core.h> | ||
19 | #include <linux/irq.h> | ||
20 | #include <linux/io.h> | ||
21 | |||
22 | #include <asm/mach/irq.h> | ||
23 | |||
24 | #include <mach/map.h> | ||
25 | #include <plat/irq-uart.h> | ||
26 | #include <plat/regs-serial.h> | ||
27 | #include <plat/cpu.h> | ||
28 | |||
29 | /* Note, we make use of the fact that the parent IRQs, IRQ_UART[0..3] | ||
30 | * are consecutive when looking up the interrupt in the demux routines. | ||
31 | */ | ||
32 | static void s3c_irq_demux_uart(unsigned int irq, struct irq_desc *desc) | ||
33 | { | ||
34 | struct s3c_uart_irq *uirq = desc->irq_data.handler_data; | ||
35 | struct irq_chip *chip = irq_get_chip(irq); | ||
36 | u32 pend = __raw_readl(uirq->regs + S3C64XX_UINTP); | ||
37 | int base = uirq->base_irq; | ||
38 | |||
39 | chained_irq_enter(chip, desc); | ||
40 | |||
41 | if (pend & (1 << 0)) | ||
42 | generic_handle_irq(base); | ||
43 | if (pend & (1 << 1)) | ||
44 | generic_handle_irq(base + 1); | ||
45 | if (pend & (1 << 2)) | ||
46 | generic_handle_irq(base + 2); | ||
47 | if (pend & (1 << 3)) | ||
48 | generic_handle_irq(base + 3); | ||
49 | |||
50 | chained_irq_exit(chip, desc); | ||
51 | } | ||
52 | |||
53 | static void __init s3c_init_uart_irq(struct s3c_uart_irq *uirq) | ||
54 | { | ||
55 | void __iomem *reg_base = uirq->regs; | ||
56 | struct irq_chip_generic *gc; | ||
57 | struct irq_chip_type *ct; | ||
58 | |||
59 | /* mask all interrupts at the start. */ | ||
60 | __raw_writel(0xf, reg_base + S3C64XX_UINTM); | ||
61 | |||
62 | gc = irq_alloc_generic_chip("s3c-uart", 1, uirq->base_irq, reg_base, | ||
63 | handle_level_irq); | ||
64 | |||
65 | if (!gc) { | ||
66 | pr_err("%s: irq_alloc_generic_chip for IRQ %u failed\n", | ||
67 | __func__, uirq->base_irq); | ||
68 | return; | ||
69 | } | ||
70 | |||
71 | ct = gc->chip_types; | ||
72 | ct->chip.irq_ack = irq_gc_ack_set_bit; | ||
73 | ct->chip.irq_mask = irq_gc_mask_set_bit; | ||
74 | ct->chip.irq_unmask = irq_gc_mask_clr_bit; | ||
75 | ct->regs.ack = S3C64XX_UINTP; | ||
76 | ct->regs.mask = S3C64XX_UINTM; | ||
77 | irq_setup_generic_chip(gc, IRQ_MSK(4), IRQ_GC_INIT_MASK_CACHE, | ||
78 | IRQ_NOREQUEST | IRQ_NOPROBE, 0); | ||
79 | |||
80 | irq_set_handler_data(uirq->parent_irq, uirq); | ||
81 | irq_set_chained_handler(uirq->parent_irq, s3c_irq_demux_uart); | ||
82 | } | ||
83 | |||
84 | /** | ||
85 | * s3c_init_uart_irqs() - initialise UART IRQs and the necessary demuxing | ||
86 | * @irq: The interrupt data for registering | ||
87 | * @nr_irqs: The number of interrupt descriptions in @irq. | ||
88 | * | ||
89 | * Register the UART interrupts specified by @irq including the demuxing | ||
90 | * routines. This supports the S3C6400 and newer style of devices. | ||
91 | */ | ||
92 | void __init s3c_init_uart_irqs(struct s3c_uart_irq *irq, unsigned int nr_irqs) | ||
93 | { | ||
94 | for (; nr_irqs > 0; nr_irqs--, irq++) | ||
95 | s3c_init_uart_irq(irq); | ||
96 | } | ||
diff --git a/arch/arm/plat-samsung/irq-vic-timer.c b/arch/arm/plat-samsung/irq-vic-timer.c index f714d060370d..51583cd30164 100644 --- a/arch/arm/plat-samsung/irq-vic-timer.c +++ b/arch/arm/plat-samsung/irq-vic-timer.c | |||
@@ -22,9 +22,14 @@ | |||
22 | #include <plat/irq-vic-timer.h> | 22 | #include <plat/irq-vic-timer.h> |
23 | #include <plat/regs-timer.h> | 23 | #include <plat/regs-timer.h> |
24 | 24 | ||
25 | #include <asm/mach/irq.h> | ||
26 | |||
25 | static void s3c_irq_demux_vic_timer(unsigned int irq, struct irq_desc *desc) | 27 | static void s3c_irq_demux_vic_timer(unsigned int irq, struct irq_desc *desc) |
26 | { | 28 | { |
29 | struct irq_chip *chip = irq_get_chip(irq); | ||
30 | chained_irq_enter(chip, desc); | ||
27 | generic_handle_irq((int)desc->irq_data.handler_data); | 31 | generic_handle_irq((int)desc->irq_data.handler_data); |
32 | chained_irq_exit(chip, desc); | ||
28 | } | 33 | } |
29 | 34 | ||
30 | /* We assume the IRQ_TIMER0..IRQ_TIMER4 range is continuous. */ | 35 | /* We assume the IRQ_TIMER0..IRQ_TIMER4 range is continuous. */ |
diff --git a/arch/arm/tools/mach-types b/arch/arm/tools/mach-types index 3b3776d0a1a7..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 |
@@ -351,7 +355,7 @@ centro MACH_CENTRO CENTRO 1944 | |||
351 | nokia_rx51 MACH_NOKIA_RX51 NOKIA_RX51 1955 | 355 | nokia_rx51 MACH_NOKIA_RX51 NOKIA_RX51 1955 |
352 | omap_zoom2 MACH_OMAP_ZOOM2 OMAP_ZOOM2 1967 | 356 | omap_zoom2 MACH_OMAP_ZOOM2 OMAP_ZOOM2 1967 |
353 | cpuat9260 MACH_CPUAT9260 CPUAT9260 1973 | 357 | cpuat9260 MACH_CPUAT9260 CPUAT9260 1973 |
354 | eukrea_cpuimx27 MACH_CPUIMX27 CPUIMX27 1975 | 358 | eukrea_cpuimx27 MACH_EUKREA_CPUIMX27 EUKREA_CPUIMX27 1975 |
355 | acs5k MACH_ACS5K ACS5K 1982 | 359 | acs5k MACH_ACS5K ACS5K 1982 |
356 | snapper_9260 MACH_SNAPPER_9260 SNAPPER_9260 1987 | 360 | snapper_9260 MACH_SNAPPER_9260 SNAPPER_9260 1987 |
357 | dsm320 MACH_DSM320 DSM320 1988 | 361 | dsm320 MACH_DSM320 DSM320 1988 |
@@ -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 |
@@ -476,8 +486,8 @@ cns3420vb MACH_CNS3420VB CNS3420VB 2776 | |||
476 | omap4_panda MACH_OMAP4_PANDA OMAP4_PANDA 2791 | 486 | omap4_panda MACH_OMAP4_PANDA OMAP4_PANDA 2791 |
477 | ti8168evm MACH_TI8168EVM TI8168EVM 2800 | 487 | ti8168evm MACH_TI8168EVM TI8168EVM 2800 |
478 | teton_bga MACH_TETON_BGA TETON_BGA 2816 | 488 | teton_bga MACH_TETON_BGA TETON_BGA 2816 |
479 | eukrea_cpuimx25sd MACH_EUKREA_CPUIMX25 EUKREA_CPUIMX25 2820 | 489 | eukrea_cpuimx25sd MACH_EUKREA_CPUIMX25SD EUKREA_CPUIMX25SD 2820 |
480 | eukrea_cpuimx35sd MACH_EUKREA_CPUIMX35 EUKREA_CPUIMX35 2821 | 490 | eukrea_cpuimx35sd MACH_EUKREA_CPUIMX35SD EUKREA_CPUIMX35SD 2821 |
481 | eukrea_cpuimx51sd MACH_EUKREA_CPUIMX51SD EUKREA_CPUIMX51SD 2822 | 491 | eukrea_cpuimx51sd MACH_EUKREA_CPUIMX51SD EUKREA_CPUIMX51SD 2822 |
482 | eukrea_cpuimx51 MACH_EUKREA_CPUIMX51 EUKREA_CPUIMX51 2823 | 492 | eukrea_cpuimx51 MACH_EUKREA_CPUIMX51 EUKREA_CPUIMX51 2823 |
483 | smdkc210 MACH_SMDKC210 SMDKC210 2838 | 493 | smdkc210 MACH_SMDKC210 SMDKC210 2838 |
@@ -910,7 +920,7 @@ omapl138_case_a3 MACH_OMAPL138_CASE_A3 OMAPL138_CASE_A3 3280 | |||
910 | uemd MACH_UEMD UEMD 3281 | 920 | uemd MACH_UEMD UEMD 3281 |
911 | ccwmx51mut MACH_CCWMX51MUT CCWMX51MUT 3282 | 921 | ccwmx51mut MACH_CCWMX51MUT CCWMX51MUT 3282 |
912 | rockhopper MACH_ROCKHOPPER ROCKHOPPER 3283 | 922 | rockhopper MACH_ROCKHOPPER ROCKHOPPER 3283 |
913 | nookcolor MACH_NOOKCOLOR NOOKCOLOR 3284 | 923 | encore MACH_ENCORE ENCORE 3284 |
914 | hkdkc100 MACH_HKDKC100 HKDKC100 3285 | 924 | hkdkc100 MACH_HKDKC100 HKDKC100 3285 |
915 | ts42xx MACH_TS42XX TS42XX 3286 | 925 | ts42xx MACH_TS42XX TS42XX 3286 |
916 | aebl MACH_AEBL AEBL 3287 | 926 | aebl MACH_AEBL AEBL 3287 |
@@ -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 |