diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-12-12 15:05:15 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-12-12 15:05:15 -0500 |
commit | d027db132b395dabfac208e52a7e510e441bb9d2 (patch) | |
tree | 24b055b2385f9848e77e646ce475991d8675c3c4 /arch | |
parent | d01e4afdbb65e030fd6f1f96c30a558e2eb0f279 (diff) | |
parent | 5faf7cbb848da827f6ea1458b5a1c26a44e7510a (diff) |
Merge tag 'soc' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
Pull ARM SoC updates from Olof Johansson:
"This contains the bulk of new SoC development for this merge window.
Two new platforms have been added, the sunxi platforms (Allwinner A1x
SoCs) by Maxime Ripard, and a generic Broadcom platform for a new
series of ARMv7 platforms from them, where the hope is that we can
keep the platform code generic enough to have them all share one mach
directory. The new Broadcom platform is contributed by Christian
Daudt.
Highbank has grown support for Calxeda's next generation of hardware,
ECX-2000.
clps711x has seen a lot of cleanup from Alexander Shiyan, and he's
also taken on maintainership of the platform.
Beyond this there has been a bunch of work from a number of people on
converting more platforms to IRQ domains, pinctrl conversion, cleanup
and general feature enablement across most of the active platforms."
Fix up trivial conflicts as per Olof.
* tag 'soc' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (174 commits)
mfd: vexpress-sysreg: Remove LEDs code
irqchip: irq-sunxi: Add terminating entry for sunxi_irq_dt_ids
clocksource: sunxi_timer: Add terminating entry for sunxi_timer_dt_ids
irq: versatile: delete dangling variable
ARM: sunxi: add missing include for mdelay()
ARM: EXYNOS: Avoid early use of of_machine_is_compatible()
ARM: dts: add node for PL330 MDMA1 controller for exynos4
ARM: EXYNOS: Add support for secondary CPU bring-up on Exynos4412
ARM: EXYNOS: add UART3 to DEBUG_LL ports
ARM: S3C24XX: Add clkdev entry for camif-upll clock
ARM: SAMSUNG: Add s3c24xx/s3c64xx CAMIF GPIO setup helpers
ARM: sunxi: Add missing sun4i.dtsi file
pinctrl: samsung: Do not initialise statics to 0
ARM i.MX6: remove gate_mask from pllv3
ARM i.MX6: Fix ethernet PLL clocks
ARM i.MX6: rename PLLs according to datasheet
ARM i.MX6: Add pwm support
ARM i.MX51: Add pwm support
ARM i.MX53: Add pwm support
ARM: mx5: Replace clk_register_clkdev with clock DT lookup
...
Diffstat (limited to 'arch')
216 files changed, 6422 insertions, 9496 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 03e0460d5067..29b85e6bd71d 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig | |||
@@ -286,8 +286,8 @@ config ARCH_INTEGRATOR | |||
286 | select MULTI_IRQ_HANDLER | 286 | select MULTI_IRQ_HANDLER |
287 | select NEED_MACH_MEMORY_H | 287 | select NEED_MACH_MEMORY_H |
288 | select PLAT_VERSATILE | 288 | select PLAT_VERSATILE |
289 | select PLAT_VERSATILE_FPGA_IRQ | ||
290 | select SPARSE_IRQ | 289 | select SPARSE_IRQ |
290 | select VERSATILE_FPGA_IRQ | ||
291 | help | 291 | help |
292 | Support for ARM's Integrator platform. | 292 | Support for ARM's Integrator platform. |
293 | 293 | ||
@@ -320,7 +320,7 @@ config ARCH_VERSATILE | |||
320 | select PLAT_VERSATILE | 320 | select PLAT_VERSATILE |
321 | select PLAT_VERSATILE_CLCD | 321 | select PLAT_VERSATILE_CLCD |
322 | select PLAT_VERSATILE_CLOCK | 322 | select PLAT_VERSATILE_CLOCK |
323 | select PLAT_VERSATILE_FPGA_IRQ | 323 | select VERSATILE_FPGA_IRQ |
324 | help | 324 | help |
325 | This enables support for ARM Ltd Versatile board. | 325 | This enables support for ARM Ltd Versatile board. |
326 | 326 | ||
@@ -340,7 +340,7 @@ config ARCH_AT91 | |||
340 | 340 | ||
341 | config ARCH_BCM2835 | 341 | config ARCH_BCM2835 |
342 | bool "Broadcom BCM2835 family" | 342 | bool "Broadcom BCM2835 family" |
343 | select ARCH_WANT_OPTIONAL_GPIOLIB | 343 | select ARCH_REQUIRE_GPIOLIB |
344 | select ARM_AMBA | 344 | select ARM_AMBA |
345 | select ARM_ERRATA_411920 | 345 | select ARM_ERRATA_411920 |
346 | select ARM_TIMER_SP804 | 346 | select ARM_TIMER_SP804 |
@@ -348,7 +348,10 @@ config ARCH_BCM2835 | |||
348 | select COMMON_CLK | 348 | select COMMON_CLK |
349 | select CPU_V6 | 349 | select CPU_V6 |
350 | select GENERIC_CLOCKEVENTS | 350 | select GENERIC_CLOCKEVENTS |
351 | select GENERIC_GPIO | ||
351 | select MULTI_IRQ_HANDLER | 352 | select MULTI_IRQ_HANDLER |
353 | select PINCTRL | ||
354 | select PINCTRL_BCM2835 | ||
352 | select SPARSE_IRQ | 355 | select SPARSE_IRQ |
353 | select USE_OF | 356 | select USE_OF |
354 | help | 357 | help |
@@ -370,10 +373,14 @@ config ARCH_CLPS711X | |||
370 | bool "Cirrus Logic CLPS711x/EP721x/EP731x-based" | 373 | bool "Cirrus Logic CLPS711x/EP721x/EP731x-based" |
371 | select ARCH_REQUIRE_GPIOLIB | 374 | select ARCH_REQUIRE_GPIOLIB |
372 | select ARCH_USES_GETTIMEOFFSET | 375 | select ARCH_USES_GETTIMEOFFSET |
376 | select AUTO_ZRELADDR | ||
373 | select CLKDEV_LOOKUP | 377 | select CLKDEV_LOOKUP |
374 | select COMMON_CLK | 378 | select COMMON_CLK |
375 | select CPU_ARM720T | 379 | select CPU_ARM720T |
380 | select GENERIC_CLOCKEVENTS | ||
381 | select MULTI_IRQ_HANDLER | ||
376 | select NEED_MACH_MEMORY_H | 382 | select NEED_MACH_MEMORY_H |
383 | select SPARSE_IRQ | ||
377 | help | 384 | help |
378 | Support for Cirrus Logic 711x/721x/731x based boards. | 385 | Support for Cirrus Logic 711x/721x/731x based boards. |
379 | 386 | ||
@@ -1015,6 +1022,8 @@ source "arch/arm/mach-mvebu/Kconfig" | |||
1015 | 1022 | ||
1016 | source "arch/arm/mach-at91/Kconfig" | 1023 | source "arch/arm/mach-at91/Kconfig" |
1017 | 1024 | ||
1025 | source "arch/arm/mach-bcm/Kconfig" | ||
1026 | |||
1018 | source "arch/arm/mach-clps711x/Kconfig" | 1027 | source "arch/arm/mach-clps711x/Kconfig" |
1019 | 1028 | ||
1020 | source "arch/arm/mach-cns3xxx/Kconfig" | 1029 | source "arch/arm/mach-cns3xxx/Kconfig" |
@@ -1106,6 +1115,8 @@ source "arch/arm/mach-exynos/Kconfig" | |||
1106 | 1115 | ||
1107 | source "arch/arm/mach-shmobile/Kconfig" | 1116 | source "arch/arm/mach-shmobile/Kconfig" |
1108 | 1117 | ||
1118 | source "arch/arm/mach-sunxi/Kconfig" | ||
1119 | |||
1109 | source "arch/arm/mach-prima2/Kconfig" | 1120 | source "arch/arm/mach-prima2/Kconfig" |
1110 | 1121 | ||
1111 | source "arch/arm/mach-tegra/Kconfig" | 1122 | source "arch/arm/mach-tegra/Kconfig" |
diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug index 5566520686a5..04a3f0d1d053 100644 --- a/arch/arm/Kconfig.debug +++ b/arch/arm/Kconfig.debug | |||
@@ -338,6 +338,17 @@ choice | |||
338 | The uncompressor code port configuration is now handled | 338 | The uncompressor code port configuration is now handled |
339 | by CONFIG_S3C_LOWLEVEL_UART_PORT. | 339 | by CONFIG_S3C_LOWLEVEL_UART_PORT. |
340 | 340 | ||
341 | config DEBUG_S3C_UART3 | ||
342 | depends on PLAT_SAMSUNG && ARCH_EXYNOS | ||
343 | bool "Use S3C UART 3 for low-level debug" | ||
344 | help | ||
345 | Say Y here if you want the debug print routines to direct | ||
346 | their output to UART 3. The port must have been initialised | ||
347 | by the boot-loader before use. | ||
348 | |||
349 | The uncompressor code port configuration is now handled | ||
350 | by CONFIG_S3C_LOWLEVEL_UART_PORT. | ||
351 | |||
341 | config DEBUG_SOCFPGA_UART | 352 | config DEBUG_SOCFPGA_UART |
342 | depends on ARCH_SOCFPGA | 353 | depends on ARCH_SOCFPGA |
343 | bool "Use SOCFPGA UART for low-level debug" | 354 | bool "Use SOCFPGA UART for low-level debug" |
@@ -345,6 +356,20 @@ choice | |||
345 | Say Y here if you want kernel low-level debugging support | 356 | Say Y here if you want kernel low-level debugging support |
346 | on SOCFPGA based platforms. | 357 | on SOCFPGA based platforms. |
347 | 358 | ||
359 | config DEBUG_SUNXI_UART0 | ||
360 | bool "Kernel low-level debugging messages via sunXi UART0" | ||
361 | depends on ARCH_SUNXI | ||
362 | help | ||
363 | Say Y here if you want kernel low-level debugging support | ||
364 | on Allwinner A1X based platforms on the UART0. | ||
365 | |||
366 | config DEBUG_SUNXI_UART1 | ||
367 | bool "Kernel low-level debugging messages via sunXi UART1" | ||
368 | depends on ARCH_SUNXI | ||
369 | help | ||
370 | Say Y here if you want kernel low-level debugging support | ||
371 | on Allwinner A1X based platforms on the UART1. | ||
372 | |||
348 | config DEBUG_VEXPRESS_UART0_DETECT | 373 | config DEBUG_VEXPRESS_UART0_DETECT |
349 | bool "Autodetect UART0 on Versatile Express Cortex-A core tiles" | 374 | bool "Autodetect UART0 on Versatile Express Cortex-A core tiles" |
350 | depends on ARCH_VEXPRESS && CPU_CP15_MMU | 375 | depends on ARCH_VEXPRESS && CPU_CP15_MMU |
@@ -424,6 +449,7 @@ config DEBUG_LL_INCLUDE | |||
424 | default "debug/mvebu.S" if DEBUG_MVEBU_UART | 449 | default "debug/mvebu.S" if DEBUG_MVEBU_UART |
425 | default "debug/picoxcell.S" if DEBUG_PICOXCELL_UART | 450 | default "debug/picoxcell.S" if DEBUG_PICOXCELL_UART |
426 | default "debug/socfpga.S" if DEBUG_SOCFPGA_UART | 451 | default "debug/socfpga.S" if DEBUG_SOCFPGA_UART |
452 | default "debug/sunxi.S" if DEBUG_SUNXI_UART0 || DEBUG_SUNXI_UART1 | ||
427 | default "debug/vexpress.S" if DEBUG_VEXPRESS_UART0_DETECT || \ | 453 | default "debug/vexpress.S" if DEBUG_VEXPRESS_UART0_DETECT || \ |
428 | DEBUG_VEXPRESS_UART0_CA9 || DEBUG_VEXPRESS_UART0_RS1 | 454 | DEBUG_VEXPRESS_UART0_CA9 || DEBUG_VEXPRESS_UART0_RS1 |
429 | default "mach/debug-macro.S" | 455 | default "mach/debug-macro.S" |
diff --git a/arch/arm/Makefile b/arch/arm/Makefile index 20d295aca51f..9c60f474a559 100644 --- a/arch/arm/Makefile +++ b/arch/arm/Makefile | |||
@@ -138,6 +138,7 @@ textofs-$(CONFIG_ARCH_MSM8960) := 0x00208000 | |||
138 | # Machine directory name. This list is sorted alphanumerically | 138 | # Machine directory name. This list is sorted alphanumerically |
139 | # by CONFIG_* macro name. | 139 | # by CONFIG_* macro name. |
140 | machine-$(CONFIG_ARCH_AT91) += at91 | 140 | machine-$(CONFIG_ARCH_AT91) += at91 |
141 | machine-$(CONFIG_ARCH_BCM) += bcm | ||
141 | machine-$(CONFIG_ARCH_BCM2835) += bcm2835 | 142 | machine-$(CONFIG_ARCH_BCM2835) += bcm2835 |
142 | machine-$(CONFIG_ARCH_CLPS711X) += clps711x | 143 | machine-$(CONFIG_ARCH_CLPS711X) += clps711x |
143 | machine-$(CONFIG_ARCH_CNS3XXX) += cns3xxx | 144 | machine-$(CONFIG_ARCH_CNS3XXX) += cns3xxx |
@@ -194,6 +195,7 @@ machine-$(CONFIG_ARCH_SPEAR13XX) += spear13xx | |||
194 | machine-$(CONFIG_ARCH_SPEAR3XX) += spear3xx | 195 | machine-$(CONFIG_ARCH_SPEAR3XX) += spear3xx |
195 | machine-$(CONFIG_MACH_SPEAR600) += spear6xx | 196 | machine-$(CONFIG_MACH_SPEAR600) += spear6xx |
196 | machine-$(CONFIG_ARCH_ZYNQ) += zynq | 197 | machine-$(CONFIG_ARCH_ZYNQ) += zynq |
198 | machine-$(CONFIG_ARCH_SUNXI) += sunxi | ||
197 | 199 | ||
198 | # Platform directory name. This list is sorted alphanumerically | 200 | # Platform directory name. This list is sorted alphanumerically |
199 | # by CONFIG_* macro name. | 201 | # by CONFIG_* macro name. |
diff --git a/arch/arm/boot/compressed/Makefile b/arch/arm/boot/compressed/Makefile index 537208f22e56..5cad8a6dadb0 100644 --- a/arch/arm/boot/compressed/Makefile +++ b/arch/arm/boot/compressed/Makefile | |||
@@ -45,11 +45,6 @@ ifeq ($(CONFIG_ARCH_SHARK),y) | |||
45 | OBJS += head-shark.o ofw-shark.o | 45 | OBJS += head-shark.o ofw-shark.o |
46 | endif | 46 | endif |
47 | 47 | ||
48 | ifeq ($(CONFIG_ARCH_P720T),y) | ||
49 | # Borrow this code from SA1100 | ||
50 | OBJS += head-sa1100.o | ||
51 | endif | ||
52 | |||
53 | ifeq ($(CONFIG_ARCH_SA1100),y) | 48 | ifeq ($(CONFIG_ARCH_SA1100),y) |
54 | OBJS += head-sa1100.o | 49 | OBJS += head-sa1100.o |
55 | endif | 50 | endif |
diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile index 5e98094a3e1b..42917866fcde 100644 --- a/arch/arm/boot/dts/Makefile +++ b/arch/arm/boot/dts/Makefile | |||
@@ -33,14 +33,17 @@ dtb-$(CONFIG_ARCH_AT91) += at91sam9x25ek.dtb | |||
33 | dtb-$(CONFIG_ARCH_AT91) += at91sam9x35ek.dtb | 33 | dtb-$(CONFIG_ARCH_AT91) += at91sam9x35ek.dtb |
34 | 34 | ||
35 | dtb-$(CONFIG_ARCH_BCM2835) += bcm2835-rpi-b.dtb | 35 | dtb-$(CONFIG_ARCH_BCM2835) += bcm2835-rpi-b.dtb |
36 | dtb-$(CONFIG_ARCH_BCM) += bcm11351-brt.dtb | ||
36 | dtb-$(CONFIG_ARCH_DOVE) += dove-cm-a510.dtb \ | 37 | dtb-$(CONFIG_ARCH_DOVE) += dove-cm-a510.dtb \ |
37 | dove-cubox.dtb \ | 38 | dove-cubox.dtb \ |
38 | dove-dove-db.dtb | 39 | dove-dove-db.dtb |
39 | dtb-$(CONFIG_ARCH_EXYNOS) += exynos4210-origen.dtb \ | 40 | dtb-$(CONFIG_ARCH_EXYNOS) += exynos4210-origen.dtb \ |
40 | exynos4210-smdkv310.dtb \ | 41 | exynos4210-smdkv310.dtb \ |
41 | exynos4210-trats.dtb \ | 42 | exynos4210-trats.dtb \ |
42 | exynos5250-smdk5250.dtb | 43 | exynos5250-smdk5250.dtb \ |
43 | dtb-$(CONFIG_ARCH_HIGHBANK) += highbank.dtb | 44 | exynos5440-ssdk5440.dtb |
45 | dtb-$(CONFIG_ARCH_HIGHBANK) += highbank.dtb \ | ||
46 | ecx-2000.dtb | ||
44 | dtb-$(CONFIG_ARCH_INTEGRATOR) += integratorap.dtb \ | 47 | dtb-$(CONFIG_ARCH_INTEGRATOR) += integratorap.dtb \ |
45 | integratorcp.dtb | 48 | integratorcp.dtb |
46 | dtb-$(CONFIG_ARCH_LPC32XX) += ea3250.dtb phy3250.dtb | 49 | dtb-$(CONFIG_ARCH_LPC32XX) += ea3250.dtb phy3250.dtb |
@@ -102,6 +105,8 @@ dtb-$(CONFIG_ARCH_SPEAR3XX)+= spear300-evb.dtb \ | |||
102 | spear310-evb.dtb \ | 105 | spear310-evb.dtb \ |
103 | spear320-evb.dtb | 106 | spear320-evb.dtb |
104 | dtb-$(CONFIG_ARCH_SPEAR6XX)+= spear600-evb.dtb | 107 | dtb-$(CONFIG_ARCH_SPEAR6XX)+= spear600-evb.dtb |
108 | dtb-$(CONFIG_ARCH_SUNXI) += sun4i-cubieboard.dtb \ | ||
109 | sun5i-olinuxino.dtb | ||
105 | dtb-$(CONFIG_ARCH_TEGRA) += tegra20-harmony.dtb \ | 110 | dtb-$(CONFIG_ARCH_TEGRA) += tegra20-harmony.dtb \ |
106 | tegra20-medcom-wide.dtb \ | 111 | tegra20-medcom-wide.dtb \ |
107 | tegra20-paz00.dtb \ | 112 | tegra20-paz00.dtb \ |
diff --git a/arch/arm/boot/dts/bcm11351-brt.dts b/arch/arm/boot/dts/bcm11351-brt.dts new file mode 100644 index 000000000000..248067cf7069 --- /dev/null +++ b/arch/arm/boot/dts/bcm11351-brt.dts | |||
@@ -0,0 +1,30 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2012 Broadcom Corporation | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or | ||
5 | * modify it under the terms of the GNU General Public License as | ||
6 | * published by the Free Software Foundation version 2. | ||
7 | * | ||
8 | * This program is distributed "as is" WITHOUT ANY WARRANTY of any | ||
9 | * kind, whether express or implied; without even the implied warranty | ||
10 | * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
11 | * GNU General Public License for more details. | ||
12 | */ | ||
13 | |||
14 | /dts-v1/; | ||
15 | |||
16 | /include/ "bcm11351.dtsi" | ||
17 | |||
18 | / { | ||
19 | model = "BCM11351 BRT board"; | ||
20 | compatible = "bcm,bcm11351-brt", "bcm,bcm11351"; | ||
21 | |||
22 | memory { | ||
23 | reg = <0x80000000 0x40000000>; /* 1 GB */ | ||
24 | }; | ||
25 | |||
26 | uart@3e000000 { | ||
27 | status = "okay"; | ||
28 | }; | ||
29 | |||
30 | }; | ||
diff --git a/arch/arm/boot/dts/bcm11351.dtsi b/arch/arm/boot/dts/bcm11351.dtsi new file mode 100644 index 000000000000..ad135885bd2a --- /dev/null +++ b/arch/arm/boot/dts/bcm11351.dtsi | |||
@@ -0,0 +1,50 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2012 Broadcom Corporation | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or | ||
5 | * modify it under the terms of the GNU General Public License as | ||
6 | * published by the Free Software Foundation version 2. | ||
7 | * | ||
8 | * This program is distributed "as is" WITHOUT ANY WARRANTY of any | ||
9 | * kind, whether express or implied; without even the implied warranty | ||
10 | * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
11 | * GNU General Public License for more details. | ||
12 | */ | ||
13 | |||
14 | /include/ "skeleton.dtsi" | ||
15 | |||
16 | / { | ||
17 | model = "BCM11351 SoC"; | ||
18 | compatible = "bcm,bcm11351"; | ||
19 | interrupt-parent = <&gic>; | ||
20 | |||
21 | chosen { | ||
22 | bootargs = "console=ttyS0,115200n8"; | ||
23 | }; | ||
24 | |||
25 | gic: interrupt-controller@3ff00100 { | ||
26 | compatible = "arm,cortex-a9-gic"; | ||
27 | #interrupt-cells = <3>; | ||
28 | #address-cells = <0>; | ||
29 | interrupt-controller; | ||
30 | reg = <0x3ff01000 0x1000>, | ||
31 | <0x3ff00100 0x100>; | ||
32 | }; | ||
33 | |||
34 | uart@3e000000 { | ||
35 | compatible = "bcm,bcm11351-dw-apb-uart", "snps,dw-apb-uart"; | ||
36 | status = "disabled"; | ||
37 | reg = <0x3e000000 0x1000>; | ||
38 | clock-frequency = <13000000>; | ||
39 | interrupts = <0x0 67 0x4>; | ||
40 | reg-shift = <2>; | ||
41 | reg-io-width = <4>; | ||
42 | }; | ||
43 | |||
44 | L2: l2-cache { | ||
45 | compatible = "arm,pl310-cache"; | ||
46 | reg = <0x3ff20000 0x1000>; | ||
47 | cache-unified; | ||
48 | cache-level = <2>; | ||
49 | }; | ||
50 | }; | ||
diff --git a/arch/arm/boot/dts/bcm2835-rpi-b.dts b/arch/arm/boot/dts/bcm2835-rpi-b.dts index 7dd860f83f96..9b72054a0bc0 100644 --- a/arch/arm/boot/dts/bcm2835-rpi-b.dts +++ b/arch/arm/boot/dts/bcm2835-rpi-b.dts | |||
@@ -10,3 +10,18 @@ | |||
10 | reg = <0 0x10000000>; | 10 | reg = <0 0x10000000>; |
11 | }; | 11 | }; |
12 | }; | 12 | }; |
13 | |||
14 | &gpio { | ||
15 | pinctrl-names = "default"; | ||
16 | pinctrl-0 = <&alt0 &alt3>; | ||
17 | |||
18 | alt0: alt0 { | ||
19 | brcm,pins = <0 1 2 3 4 5 6 7 8 9 10 11 14 15 40 45>; | ||
20 | brcm,function = <4>; /* alt0 */ | ||
21 | }; | ||
22 | |||
23 | alt3: alt3 { | ||
24 | brcm,pins = <48 49 50 51 52 53>; | ||
25 | brcm,function = <7>; /* alt3 */ | ||
26 | }; | ||
27 | }; | ||
diff --git a/arch/arm/boot/dts/bcm2835.dtsi b/arch/arm/boot/dts/bcm2835.dtsi index 0b619398532c..8917550fd1bb 100644 --- a/arch/arm/boot/dts/bcm2835.dtsi +++ b/arch/arm/boot/dts/bcm2835.dtsi | |||
@@ -29,11 +29,39 @@ | |||
29 | #interrupt-cells = <2>; | 29 | #interrupt-cells = <2>; |
30 | }; | 30 | }; |
31 | 31 | ||
32 | watchdog { | ||
33 | compatible = "brcm,bcm2835-pm-wdt"; | ||
34 | reg = <0x7e100000 0x28>; | ||
35 | }; | ||
36 | |||
32 | uart@20201000 { | 37 | uart@20201000 { |
33 | compatible = "brcm,bcm2835-pl011", "arm,pl011", "arm,primecell"; | 38 | compatible = "brcm,bcm2835-pl011", "arm,pl011", "arm,primecell"; |
34 | reg = <0x7e201000 0x1000>; | 39 | reg = <0x7e201000 0x1000>; |
35 | interrupts = <2 25>; | 40 | interrupts = <2 25>; |
36 | clock-frequency = <3000000>; | 41 | clock-frequency = <3000000>; |
37 | }; | 42 | }; |
43 | |||
44 | gpio: gpio { | ||
45 | compatible = "brcm,bcm2835-gpio"; | ||
46 | reg = <0x7e200000 0xb4>; | ||
47 | /* | ||
48 | * The GPIO IP block is designed for 3 banks of GPIOs. | ||
49 | * Each bank has a GPIO interrupt for itself. | ||
50 | * There is an overall "any bank" interrupt. | ||
51 | * In order, these are GIC interrupts 17, 18, 19, 20. | ||
52 | * Since the BCM2835 only has 2 banks, the 2nd bank | ||
53 | * interrupt output appears to be mirrored onto the | ||
54 | * 3rd bank's interrupt signal. | ||
55 | * So, a bank0 interrupt shows up on 17, 20, and | ||
56 | * a bank1 interrupt shows up on 18, 19, 20! | ||
57 | */ | ||
58 | interrupts = <2 17>, <2 18>, <2 19>, <2 20>; | ||
59 | |||
60 | gpio-controller; | ||
61 | #gpio-cells = <2>; | ||
62 | |||
63 | interrupt-controller; | ||
64 | #interrupt-cells = <2>; | ||
65 | }; | ||
38 | }; | 66 | }; |
39 | }; | 67 | }; |
diff --git a/arch/arm/boot/dts/ecx-2000.dts b/arch/arm/boot/dts/ecx-2000.dts new file mode 100644 index 000000000000..46477ac1de99 --- /dev/null +++ b/arch/arm/boot/dts/ecx-2000.dts | |||
@@ -0,0 +1,104 @@ | |||
1 | /* | ||
2 | * Copyright 2011-2012 Calxeda, Inc. | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify it | ||
5 | * under the terms and conditions of the GNU General Public License, | ||
6 | * version 2, as published by the Free Software Foundation. | ||
7 | * | ||
8 | * This program is distributed in the hope it will be useful, but WITHOUT | ||
9 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
10 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
11 | * more details. | ||
12 | * | ||
13 | * You should have received a copy of the GNU General Public License along with | ||
14 | * this program. If not, see <http://www.gnu.org/licenses/>. | ||
15 | */ | ||
16 | |||
17 | /dts-v1/; | ||
18 | |||
19 | /* First 4KB has pen for secondary cores. */ | ||
20 | /memreserve/ 0x00000000 0x0001000; | ||
21 | |||
22 | / { | ||
23 | model = "Calxeda ECX-2000"; | ||
24 | compatible = "calxeda,ecx-2000"; | ||
25 | #address-cells = <2>; | ||
26 | #size-cells = <2>; | ||
27 | clock-ranges; | ||
28 | |||
29 | cpus { | ||
30 | #address-cells = <1>; | ||
31 | #size-cells = <0>; | ||
32 | |||
33 | cpu@0 { | ||
34 | compatible = "arm,cortex-a15"; | ||
35 | reg = <0>; | ||
36 | clocks = <&a9pll>; | ||
37 | clock-names = "cpu"; | ||
38 | }; | ||
39 | |||
40 | cpu@1 { | ||
41 | compatible = "arm,cortex-a15"; | ||
42 | reg = <1>; | ||
43 | clocks = <&a9pll>; | ||
44 | clock-names = "cpu"; | ||
45 | }; | ||
46 | |||
47 | cpu@2 { | ||
48 | compatible = "arm,cortex-a15"; | ||
49 | reg = <2>; | ||
50 | clocks = <&a9pll>; | ||
51 | clock-names = "cpu"; | ||
52 | }; | ||
53 | |||
54 | cpu@3 { | ||
55 | compatible = "arm,cortex-a15"; | ||
56 | reg = <3>; | ||
57 | clocks = <&a9pll>; | ||
58 | clock-names = "cpu"; | ||
59 | }; | ||
60 | }; | ||
61 | |||
62 | memory@0 { | ||
63 | name = "memory"; | ||
64 | device_type = "memory"; | ||
65 | reg = <0x00000000 0x00000000 0x00000000 0xff800000>; | ||
66 | }; | ||
67 | |||
68 | memory@200000000 { | ||
69 | name = "memory"; | ||
70 | device_type = "memory"; | ||
71 | reg = <0x00000002 0x00000000 0x00000003 0x00000000>; | ||
72 | }; | ||
73 | |||
74 | soc { | ||
75 | ranges = <0x00000000 0x00000000 0x00000000 0xffffffff>; | ||
76 | |||
77 | timer { | ||
78 | compatible = "arm,cortex-a15-timer", "arm,armv7-timer"; interrupts = <1 13 0xf08>, | ||
79 | <1 14 0xf08>, | ||
80 | <1 11 0xf08>, | ||
81 | <1 10 0xf08>; | ||
82 | }; | ||
83 | |||
84 | intc: interrupt-controller@fff11000 { | ||
85 | compatible = "arm,cortex-a15-gic"; | ||
86 | #interrupt-cells = <3>; | ||
87 | #size-cells = <0>; | ||
88 | #address-cells = <1>; | ||
89 | interrupt-controller; | ||
90 | interrupts = <1 9 0xf04>; | ||
91 | reg = <0xfff11000 0x1000>, | ||
92 | <0xfff12000 0x1000>, | ||
93 | <0xfff14000 0x2000>, | ||
94 | <0xfff16000 0x2000>; | ||
95 | }; | ||
96 | |||
97 | pmu { | ||
98 | compatible = "arm,cortex-a9-pmu"; | ||
99 | interrupts = <0 76 4 0 75 4 0 74 4 0 73 4>; | ||
100 | }; | ||
101 | }; | ||
102 | }; | ||
103 | |||
104 | /include/ "ecx-common.dtsi" | ||
diff --git a/arch/arm/boot/dts/ecx-common.dtsi b/arch/arm/boot/dts/ecx-common.dtsi new file mode 100644 index 000000000000..d61b535f682a --- /dev/null +++ b/arch/arm/boot/dts/ecx-common.dtsi | |||
@@ -0,0 +1,237 @@ | |||
1 | /* | ||
2 | * Copyright 2011-2012 Calxeda, Inc. | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify it | ||
5 | * under the terms and conditions of the GNU General Public License, | ||
6 | * version 2, as published by the Free Software Foundation. | ||
7 | * | ||
8 | * This program is distributed in the hope it will be useful, but WITHOUT | ||
9 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
10 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
11 | * more details. | ||
12 | * | ||
13 | * You should have received a copy of the GNU General Public License along with | ||
14 | * this program. If not, see <http://www.gnu.org/licenses/>. | ||
15 | */ | ||
16 | |||
17 | / { | ||
18 | chosen { | ||
19 | bootargs = "console=ttyAMA0"; | ||
20 | }; | ||
21 | |||
22 | soc { | ||
23 | #address-cells = <1>; | ||
24 | #size-cells = <1>; | ||
25 | compatible = "simple-bus"; | ||
26 | interrupt-parent = <&intc>; | ||
27 | |||
28 | sata@ffe08000 { | ||
29 | compatible = "calxeda,hb-ahci"; | ||
30 | reg = <0xffe08000 0x10000>; | ||
31 | interrupts = <0 83 4>; | ||
32 | dma-coherent; | ||
33 | calxeda,port-phys = <&combophy5 0 &combophy0 0 | ||
34 | &combophy0 1 &combophy0 2 | ||
35 | &combophy0 3>; | ||
36 | }; | ||
37 | |||
38 | sdhci@ffe0e000 { | ||
39 | compatible = "calxeda,hb-sdhci"; | ||
40 | reg = <0xffe0e000 0x1000>; | ||
41 | interrupts = <0 90 4>; | ||
42 | clocks = <&eclk>; | ||
43 | status = "disabled"; | ||
44 | }; | ||
45 | |||
46 | memory-controller@fff00000 { | ||
47 | compatible = "calxeda,hb-ddr-ctrl"; | ||
48 | reg = <0xfff00000 0x1000>; | ||
49 | interrupts = <0 91 4>; | ||
50 | }; | ||
51 | |||
52 | ipc@fff20000 { | ||
53 | compatible = "arm,pl320", "arm,primecell"; | ||
54 | reg = <0xfff20000 0x1000>; | ||
55 | interrupts = <0 7 4>; | ||
56 | clocks = <&pclk>; | ||
57 | clock-names = "apb_pclk"; | ||
58 | }; | ||
59 | |||
60 | gpioe: gpio@fff30000 { | ||
61 | #gpio-cells = <2>; | ||
62 | compatible = "arm,pl061", "arm,primecell"; | ||
63 | gpio-controller; | ||
64 | reg = <0xfff30000 0x1000>; | ||
65 | interrupts = <0 14 4>; | ||
66 | clocks = <&pclk>; | ||
67 | clock-names = "apb_pclk"; | ||
68 | status = "disabled"; | ||
69 | }; | ||
70 | |||
71 | gpiof: gpio@fff31000 { | ||
72 | #gpio-cells = <2>; | ||
73 | compatible = "arm,pl061", "arm,primecell"; | ||
74 | gpio-controller; | ||
75 | reg = <0xfff31000 0x1000>; | ||
76 | interrupts = <0 15 4>; | ||
77 | clocks = <&pclk>; | ||
78 | clock-names = "apb_pclk"; | ||
79 | status = "disabled"; | ||
80 | }; | ||
81 | |||
82 | gpiog: gpio@fff32000 { | ||
83 | #gpio-cells = <2>; | ||
84 | compatible = "arm,pl061", "arm,primecell"; | ||
85 | gpio-controller; | ||
86 | reg = <0xfff32000 0x1000>; | ||
87 | interrupts = <0 16 4>; | ||
88 | clocks = <&pclk>; | ||
89 | clock-names = "apb_pclk"; | ||
90 | status = "disabled"; | ||
91 | }; | ||
92 | |||
93 | gpioh: gpio@fff33000 { | ||
94 | #gpio-cells = <2>; | ||
95 | compatible = "arm,pl061", "arm,primecell"; | ||
96 | gpio-controller; | ||
97 | reg = <0xfff33000 0x1000>; | ||
98 | interrupts = <0 17 4>; | ||
99 | clocks = <&pclk>; | ||
100 | clock-names = "apb_pclk"; | ||
101 | status = "disabled"; | ||
102 | }; | ||
103 | |||
104 | timer@fff34000 { | ||
105 | compatible = "arm,sp804", "arm,primecell"; | ||
106 | reg = <0xfff34000 0x1000>; | ||
107 | interrupts = <0 18 4>; | ||
108 | clocks = <&pclk>; | ||
109 | clock-names = "apb_pclk"; | ||
110 | }; | ||
111 | |||
112 | rtc@fff35000 { | ||
113 | compatible = "arm,pl031", "arm,primecell"; | ||
114 | reg = <0xfff35000 0x1000>; | ||
115 | interrupts = <0 19 4>; | ||
116 | clocks = <&pclk>; | ||
117 | clock-names = "apb_pclk"; | ||
118 | }; | ||
119 | |||
120 | serial@fff36000 { | ||
121 | compatible = "arm,pl011", "arm,primecell"; | ||
122 | reg = <0xfff36000 0x1000>; | ||
123 | interrupts = <0 20 4>; | ||
124 | clocks = <&pclk>; | ||
125 | clock-names = "apb_pclk"; | ||
126 | }; | ||
127 | |||
128 | smic@fff3a000 { | ||
129 | compatible = "ipmi-smic"; | ||
130 | device_type = "ipmi"; | ||
131 | reg = <0xfff3a000 0x1000>; | ||
132 | interrupts = <0 24 4>; | ||
133 | reg-size = <4>; | ||
134 | reg-spacing = <4>; | ||
135 | }; | ||
136 | |||
137 | sregs@fff3c000 { | ||
138 | compatible = "calxeda,hb-sregs"; | ||
139 | reg = <0xfff3c000 0x1000>; | ||
140 | |||
141 | clocks { | ||
142 | #address-cells = <1>; | ||
143 | #size-cells = <0>; | ||
144 | |||
145 | osc: oscillator { | ||
146 | #clock-cells = <0>; | ||
147 | compatible = "fixed-clock"; | ||
148 | clock-frequency = <33333000>; | ||
149 | }; | ||
150 | |||
151 | ddrpll: ddrpll { | ||
152 | #clock-cells = <0>; | ||
153 | compatible = "calxeda,hb-pll-clock"; | ||
154 | clocks = <&osc>; | ||
155 | reg = <0x108>; | ||
156 | }; | ||
157 | |||
158 | a9pll: a9pll { | ||
159 | #clock-cells = <0>; | ||
160 | compatible = "calxeda,hb-pll-clock"; | ||
161 | clocks = <&osc>; | ||
162 | reg = <0x100>; | ||
163 | }; | ||
164 | |||
165 | a9periphclk: a9periphclk { | ||
166 | #clock-cells = <0>; | ||
167 | compatible = "calxeda,hb-a9periph-clock"; | ||
168 | clocks = <&a9pll>; | ||
169 | reg = <0x104>; | ||
170 | }; | ||
171 | |||
172 | a9bclk: a9bclk { | ||
173 | #clock-cells = <0>; | ||
174 | compatible = "calxeda,hb-a9bus-clock"; | ||
175 | clocks = <&a9pll>; | ||
176 | reg = <0x104>; | ||
177 | }; | ||
178 | |||
179 | emmcpll: emmcpll { | ||
180 | #clock-cells = <0>; | ||
181 | compatible = "calxeda,hb-pll-clock"; | ||
182 | clocks = <&osc>; | ||
183 | reg = <0x10C>; | ||
184 | }; | ||
185 | |||
186 | eclk: eclk { | ||
187 | #clock-cells = <0>; | ||
188 | compatible = "calxeda,hb-emmc-clock"; | ||
189 | clocks = <&emmcpll>; | ||
190 | reg = <0x114>; | ||
191 | }; | ||
192 | |||
193 | pclk: pclk { | ||
194 | #clock-cells = <0>; | ||
195 | compatible = "fixed-clock"; | ||
196 | clock-frequency = <150000000>; | ||
197 | }; | ||
198 | }; | ||
199 | }; | ||
200 | |||
201 | dma@fff3d000 { | ||
202 | compatible = "arm,pl330", "arm,primecell"; | ||
203 | reg = <0xfff3d000 0x1000>; | ||
204 | interrupts = <0 92 4>; | ||
205 | clocks = <&pclk>; | ||
206 | clock-names = "apb_pclk"; | ||
207 | }; | ||
208 | |||
209 | ethernet@fff50000 { | ||
210 | compatible = "calxeda,hb-xgmac"; | ||
211 | reg = <0xfff50000 0x1000>; | ||
212 | interrupts = <0 77 4 0 78 4 0 79 4>; | ||
213 | dma-coherent; | ||
214 | }; | ||
215 | |||
216 | ethernet@fff51000 { | ||
217 | compatible = "calxeda,hb-xgmac"; | ||
218 | reg = <0xfff51000 0x1000>; | ||
219 | interrupts = <0 80 4 0 81 4 0 82 4>; | ||
220 | dma-coherent; | ||
221 | }; | ||
222 | |||
223 | combophy0: combo-phy@fff58000 { | ||
224 | compatible = "calxeda,hb-combophy"; | ||
225 | #phy-cells = <1>; | ||
226 | reg = <0xfff58000 0x1000>; | ||
227 | phydev = <5>; | ||
228 | }; | ||
229 | |||
230 | combophy5: combo-phy@fff5d000 { | ||
231 | compatible = "calxeda,hb-combophy"; | ||
232 | #phy-cells = <1>; | ||
233 | reg = <0xfff5d000 0x1000>; | ||
234 | phydev = <31>; | ||
235 | }; | ||
236 | }; | ||
237 | }; | ||
diff --git a/arch/arm/boot/dts/exynos4.dtsi b/arch/arm/boot/dts/exynos4.dtsi index a26c3dd58269..96d4462730fb 100644 --- a/arch/arm/boot/dts/exynos4.dtsi +++ b/arch/arm/boot/dts/exynos4.dtsi | |||
@@ -244,5 +244,11 @@ | |||
244 | reg = <0x12690000 0x1000>; | 244 | reg = <0x12690000 0x1000>; |
245 | interrupts = <0 36 0>; | 245 | interrupts = <0 36 0>; |
246 | }; | 246 | }; |
247 | |||
248 | mdma1: mdma@12850000 { | ||
249 | compatible = "arm,pl330", "arm,primecell"; | ||
250 | reg = <0x12850000 0x1000>; | ||
251 | interrupts = <0 34 0>; | ||
252 | }; | ||
247 | }; | 253 | }; |
248 | }; | 254 | }; |
diff --git a/arch/arm/boot/dts/exynos4210-pinctrl.dtsi b/arch/arm/boot/dts/exynos4210-pinctrl.dtsi index b12cf272ad0d..6a4a1a04221c 100644 --- a/arch/arm/boot/dts/exynos4210-pinctrl.dtsi +++ b/arch/arm/boot/dts/exynos4210-pinctrl.dtsi | |||
@@ -16,6 +16,134 @@ | |||
16 | 16 | ||
17 | / { | 17 | / { |
18 | pinctrl@11400000 { | 18 | pinctrl@11400000 { |
19 | gpa0: gpa0 { | ||
20 | gpio-controller; | ||
21 | #gpio-cells = <2>; | ||
22 | |||
23 | interrupt-controller; | ||
24 | #interrupt-cells = <2>; | ||
25 | }; | ||
26 | |||
27 | gpa1: gpa1 { | ||
28 | gpio-controller; | ||
29 | #gpio-cells = <2>; | ||
30 | |||
31 | interrupt-controller; | ||
32 | #interrupt-cells = <2>; | ||
33 | }; | ||
34 | |||
35 | gpb: gpb { | ||
36 | gpio-controller; | ||
37 | #gpio-cells = <2>; | ||
38 | |||
39 | interrupt-controller; | ||
40 | #interrupt-cells = <2>; | ||
41 | }; | ||
42 | |||
43 | gpc0: gpc0 { | ||
44 | gpio-controller; | ||
45 | #gpio-cells = <2>; | ||
46 | |||
47 | interrupt-controller; | ||
48 | #interrupt-cells = <2>; | ||
49 | }; | ||
50 | |||
51 | gpc1: gpc1 { | ||
52 | gpio-controller; | ||
53 | #gpio-cells = <2>; | ||
54 | |||
55 | interrupt-controller; | ||
56 | #interrupt-cells = <2>; | ||
57 | }; | ||
58 | |||
59 | gpd0: gpd0 { | ||
60 | gpio-controller; | ||
61 | #gpio-cells = <2>; | ||
62 | |||
63 | interrupt-controller; | ||
64 | #interrupt-cells = <2>; | ||
65 | }; | ||
66 | |||
67 | gpd1: gpd1 { | ||
68 | gpio-controller; | ||
69 | #gpio-cells = <2>; | ||
70 | |||
71 | interrupt-controller; | ||
72 | #interrupt-cells = <2>; | ||
73 | }; | ||
74 | |||
75 | gpe0: gpe0 { | ||
76 | gpio-controller; | ||
77 | #gpio-cells = <2>; | ||
78 | |||
79 | interrupt-controller; | ||
80 | #interrupt-cells = <2>; | ||
81 | }; | ||
82 | |||
83 | gpe1: gpe1 { | ||
84 | gpio-controller; | ||
85 | #gpio-cells = <2>; | ||
86 | |||
87 | interrupt-controller; | ||
88 | #interrupt-cells = <2>; | ||
89 | }; | ||
90 | |||
91 | gpe2: gpe2 { | ||
92 | gpio-controller; | ||
93 | #gpio-cells = <2>; | ||
94 | |||
95 | interrupt-controller; | ||
96 | #interrupt-cells = <2>; | ||
97 | }; | ||
98 | |||
99 | gpe3: gpe3 { | ||
100 | gpio-controller; | ||
101 | #gpio-cells = <2>; | ||
102 | |||
103 | interrupt-controller; | ||
104 | #interrupt-cells = <2>; | ||
105 | }; | ||
106 | |||
107 | gpe4: gpe4 { | ||
108 | gpio-controller; | ||
109 | #gpio-cells = <2>; | ||
110 | |||
111 | interrupt-controller; | ||
112 | #interrupt-cells = <2>; | ||
113 | }; | ||
114 | |||
115 | gpf0: gpf0 { | ||
116 | gpio-controller; | ||
117 | #gpio-cells = <2>; | ||
118 | |||
119 | interrupt-controller; | ||
120 | #interrupt-cells = <2>; | ||
121 | }; | ||
122 | |||
123 | gpf1: gpf1 { | ||
124 | gpio-controller; | ||
125 | #gpio-cells = <2>; | ||
126 | |||
127 | interrupt-controller; | ||
128 | #interrupt-cells = <2>; | ||
129 | }; | ||
130 | |||
131 | gpf2: gpf2 { | ||
132 | gpio-controller; | ||
133 | #gpio-cells = <2>; | ||
134 | |||
135 | interrupt-controller; | ||
136 | #interrupt-cells = <2>; | ||
137 | }; | ||
138 | |||
139 | gpf3: gpf3 { | ||
140 | gpio-controller; | ||
141 | #gpio-cells = <2>; | ||
142 | |||
143 | interrupt-controller; | ||
144 | #interrupt-cells = <2>; | ||
145 | }; | ||
146 | |||
19 | uart0_data: uart0-data { | 147 | uart0_data: uart0-data { |
20 | samsung,pins = "gpa0-0", "gpa0-1"; | 148 | samsung,pins = "gpa0-0", "gpa0-1"; |
21 | samsung,pin-function = <0x2>; | 149 | samsung,pin-function = <0x2>; |
@@ -205,6 +333,151 @@ | |||
205 | }; | 333 | }; |
206 | 334 | ||
207 | pinctrl@11000000 { | 335 | pinctrl@11000000 { |
336 | gpj0: gpj0 { | ||
337 | gpio-controller; | ||
338 | #gpio-cells = <2>; | ||
339 | |||
340 | interrupt-controller; | ||
341 | #interrupt-cells = <2>; | ||
342 | }; | ||
343 | |||
344 | gpj1: gpj1 { | ||
345 | gpio-controller; | ||
346 | #gpio-cells = <2>; | ||
347 | |||
348 | interrupt-controller; | ||
349 | #interrupt-cells = <2>; | ||
350 | }; | ||
351 | |||
352 | gpk0: gpk0 { | ||
353 | gpio-controller; | ||
354 | #gpio-cells = <2>; | ||
355 | |||
356 | interrupt-controller; | ||
357 | #interrupt-cells = <2>; | ||
358 | }; | ||
359 | |||
360 | gpk1: gpk1 { | ||
361 | gpio-controller; | ||
362 | #gpio-cells = <2>; | ||
363 | |||
364 | interrupt-controller; | ||
365 | #interrupt-cells = <2>; | ||
366 | }; | ||
367 | |||
368 | gpk2: gpk2 { | ||
369 | gpio-controller; | ||
370 | #gpio-cells = <2>; | ||
371 | |||
372 | interrupt-controller; | ||
373 | #interrupt-cells = <2>; | ||
374 | }; | ||
375 | |||
376 | gpk3: gpk3 { | ||
377 | gpio-controller; | ||
378 | #gpio-cells = <2>; | ||
379 | |||
380 | interrupt-controller; | ||
381 | #interrupt-cells = <2>; | ||
382 | }; | ||
383 | |||
384 | gpl0: gpl0 { | ||
385 | gpio-controller; | ||
386 | #gpio-cells = <2>; | ||
387 | |||
388 | interrupt-controller; | ||
389 | #interrupt-cells = <2>; | ||
390 | }; | ||
391 | |||
392 | gpl1: gpl1 { | ||
393 | gpio-controller; | ||
394 | #gpio-cells = <2>; | ||
395 | |||
396 | interrupt-controller; | ||
397 | #interrupt-cells = <2>; | ||
398 | }; | ||
399 | |||
400 | gpl2: gpl2 { | ||
401 | gpio-controller; | ||
402 | #gpio-cells = <2>; | ||
403 | |||
404 | interrupt-controller; | ||
405 | #interrupt-cells = <2>; | ||
406 | }; | ||
407 | |||
408 | gpy0: gpy0 { | ||
409 | gpio-controller; | ||
410 | #gpio-cells = <2>; | ||
411 | }; | ||
412 | |||
413 | gpy1: gpy1 { | ||
414 | gpio-controller; | ||
415 | #gpio-cells = <2>; | ||
416 | }; | ||
417 | |||
418 | gpy2: gpy2 { | ||
419 | gpio-controller; | ||
420 | #gpio-cells = <2>; | ||
421 | }; | ||
422 | |||
423 | gpy3: gpy3 { | ||
424 | gpio-controller; | ||
425 | #gpio-cells = <2>; | ||
426 | }; | ||
427 | |||
428 | gpy4: gpy4 { | ||
429 | gpio-controller; | ||
430 | #gpio-cells = <2>; | ||
431 | }; | ||
432 | |||
433 | gpy5: gpy5 { | ||
434 | gpio-controller; | ||
435 | #gpio-cells = <2>; | ||
436 | }; | ||
437 | |||
438 | gpy6: gpy6 { | ||
439 | gpio-controller; | ||
440 | #gpio-cells = <2>; | ||
441 | }; | ||
442 | |||
443 | gpx0: gpx0 { | ||
444 | gpio-controller; | ||
445 | #gpio-cells = <2>; | ||
446 | |||
447 | interrupt-controller; | ||
448 | interrupt-parent = <&gic>; | ||
449 | interrupts = <0 16 0>, <0 17 0>, <0 18 0>, <0 19 0>, | ||
450 | <0 20 0>, <0 21 0>, <0 22 0>, <0 23 0>; | ||
451 | #interrupt-cells = <2>; | ||
452 | }; | ||
453 | |||
454 | gpx1: gpx1 { | ||
455 | gpio-controller; | ||
456 | #gpio-cells = <2>; | ||
457 | |||
458 | interrupt-controller; | ||
459 | interrupt-parent = <&gic>; | ||
460 | interrupts = <0 24 0>, <0 25 0>, <0 26 0>, <0 27 0>, | ||
461 | <0 28 0>, <0 29 0>, <0 30 0>, <0 31 0>; | ||
462 | #interrupt-cells = <2>; | ||
463 | }; | ||
464 | |||
465 | gpx2: gpx2 { | ||
466 | gpio-controller; | ||
467 | #gpio-cells = <2>; | ||
468 | |||
469 | interrupt-controller; | ||
470 | #interrupt-cells = <2>; | ||
471 | }; | ||
472 | |||
473 | gpx3: gpx3 { | ||
474 | gpio-controller; | ||
475 | #gpio-cells = <2>; | ||
476 | |||
477 | interrupt-controller; | ||
478 | #interrupt-cells = <2>; | ||
479 | }; | ||
480 | |||
208 | sd0_clk: sd0-clk { | 481 | sd0_clk: sd0-clk { |
209 | samsung,pins = "gpk0-0"; | 482 | samsung,pins = "gpk0-0"; |
210 | samsung,pin-function = <2>; | 483 | samsung,pin-function = <2>; |
@@ -438,6 +711,11 @@ | |||
438 | }; | 711 | }; |
439 | 712 | ||
440 | pinctrl@03860000 { | 713 | pinctrl@03860000 { |
714 | gpz: gpz { | ||
715 | gpio-controller; | ||
716 | #gpio-cells = <2>; | ||
717 | }; | ||
718 | |||
441 | i2s0_bus: i2s0-bus { | 719 | i2s0_bus: i2s0-bus { |
442 | samsung,pins = "gpz-0", "gpz-1", "gpz-2", "gpz-3", | 720 | samsung,pins = "gpz-0", "gpz-1", "gpz-2", "gpz-3", |
443 | "gpz-4", "gpz-5", "gpz-6"; | 721 | "gpz-4", "gpz-5", "gpz-6"; |
diff --git a/arch/arm/boot/dts/exynos4210.dtsi b/arch/arm/boot/dts/exynos4210.dtsi index 214c557eda7f..d877dbe7ac0e 100644 --- a/arch/arm/boot/dts/exynos4210.dtsi +++ b/arch/arm/boot/dts/exynos4210.dtsi | |||
@@ -46,27 +46,17 @@ | |||
46 | compatible = "samsung,pinctrl-exynos4210"; | 46 | compatible = "samsung,pinctrl-exynos4210"; |
47 | reg = <0x11400000 0x1000>; | 47 | reg = <0x11400000 0x1000>; |
48 | interrupts = <0 47 0>; | 48 | interrupts = <0 47 0>; |
49 | interrupt-controller; | ||
50 | #interrupt-cells = <2>; | ||
51 | }; | 49 | }; |
52 | 50 | ||
53 | pinctrl_1: pinctrl@11000000 { | 51 | pinctrl_1: pinctrl@11000000 { |
54 | compatible = "samsung,pinctrl-exynos4210"; | 52 | compatible = "samsung,pinctrl-exynos4210"; |
55 | reg = <0x11000000 0x1000>; | 53 | reg = <0x11000000 0x1000>; |
56 | interrupts = <0 46 0>; | 54 | interrupts = <0 46 0>; |
57 | interrupt-controller; | ||
58 | #interrupt-cells = <2>; | ||
59 | 55 | ||
60 | wakup_eint: wakeup-interrupt-controller { | 56 | wakup_eint: wakeup-interrupt-controller { |
61 | compatible = "samsung,exynos4210-wakeup-eint"; | 57 | compatible = "samsung,exynos4210-wakeup-eint"; |
62 | interrupt-parent = <&gic>; | 58 | interrupt-parent = <&gic>; |
63 | interrupt-controller; | 59 | interrupts = <0 32 0>; |
64 | #interrupt-cells = <2>; | ||
65 | interrupts = <0 16 0>, <0 17 0>, <0 18 0>, <0 19 0>, | ||
66 | <0 20 0>, <0 21 0>, <0 22 0>, <0 23 0>, | ||
67 | <0 24 0>, <0 25 0>, <0 26 0>, <0 27 0>, | ||
68 | <0 28 0>, <0 29 0>, <0 30 0>, <0 31 0>, | ||
69 | <0 32 0>; | ||
70 | }; | 60 | }; |
71 | }; | 61 | }; |
72 | 62 | ||
@@ -74,233 +64,4 @@ | |||
74 | compatible = "samsung,pinctrl-exynos4210"; | 64 | compatible = "samsung,pinctrl-exynos4210"; |
75 | reg = <0x03860000 0x1000>; | 65 | reg = <0x03860000 0x1000>; |
76 | }; | 66 | }; |
77 | |||
78 | gpio-controllers { | ||
79 | #address-cells = <1>; | ||
80 | #size-cells = <1>; | ||
81 | gpio-controller; | ||
82 | ranges; | ||
83 | |||
84 | gpa0: gpio-controller@11400000 { | ||
85 | compatible = "samsung,exynos4-gpio"; | ||
86 | reg = <0x11400000 0x20>; | ||
87 | #gpio-cells = <4>; | ||
88 | }; | ||
89 | |||
90 | gpa1: gpio-controller@11400020 { | ||
91 | compatible = "samsung,exynos4-gpio"; | ||
92 | reg = <0x11400020 0x20>; | ||
93 | #gpio-cells = <4>; | ||
94 | }; | ||
95 | |||
96 | gpb: gpio-controller@11400040 { | ||
97 | compatible = "samsung,exynos4-gpio"; | ||
98 | reg = <0x11400040 0x20>; | ||
99 | #gpio-cells = <4>; | ||
100 | }; | ||
101 | |||
102 | gpc0: gpio-controller@11400060 { | ||
103 | compatible = "samsung,exynos4-gpio"; | ||
104 | reg = <0x11400060 0x20>; | ||
105 | #gpio-cells = <4>; | ||
106 | }; | ||
107 | |||
108 | gpc1: gpio-controller@11400080 { | ||
109 | compatible = "samsung,exynos4-gpio"; | ||
110 | reg = <0x11400080 0x20>; | ||
111 | #gpio-cells = <4>; | ||
112 | }; | ||
113 | |||
114 | gpd0: gpio-controller@114000A0 { | ||
115 | compatible = "samsung,exynos4-gpio"; | ||
116 | reg = <0x114000A0 0x20>; | ||
117 | #gpio-cells = <4>; | ||
118 | }; | ||
119 | |||
120 | gpd1: gpio-controller@114000C0 { | ||
121 | compatible = "samsung,exynos4-gpio"; | ||
122 | reg = <0x114000C0 0x20>; | ||
123 | #gpio-cells = <4>; | ||
124 | }; | ||
125 | |||
126 | gpe0: gpio-controller@114000E0 { | ||
127 | compatible = "samsung,exynos4-gpio"; | ||
128 | reg = <0x114000E0 0x20>; | ||
129 | #gpio-cells = <4>; | ||
130 | }; | ||
131 | |||
132 | gpe1: gpio-controller@11400100 { | ||
133 | compatible = "samsung,exynos4-gpio"; | ||
134 | reg = <0x11400100 0x20>; | ||
135 | #gpio-cells = <4>; | ||
136 | }; | ||
137 | |||
138 | gpe2: gpio-controller@11400120 { | ||
139 | compatible = "samsung,exynos4-gpio"; | ||
140 | reg = <0x11400120 0x20>; | ||
141 | #gpio-cells = <4>; | ||
142 | }; | ||
143 | |||
144 | gpe3: gpio-controller@11400140 { | ||
145 | compatible = "samsung,exynos4-gpio"; | ||
146 | reg = <0x11400140 0x20>; | ||
147 | #gpio-cells = <4>; | ||
148 | }; | ||
149 | |||
150 | gpe4: gpio-controller@11400160 { | ||
151 | compatible = "samsung,exynos4-gpio"; | ||
152 | reg = <0x11400160 0x20>; | ||
153 | #gpio-cells = <4>; | ||
154 | }; | ||
155 | |||
156 | gpf0: gpio-controller@11400180 { | ||
157 | compatible = "samsung,exynos4-gpio"; | ||
158 | reg = <0x11400180 0x20>; | ||
159 | #gpio-cells = <4>; | ||
160 | }; | ||
161 | |||
162 | gpf1: gpio-controller@114001A0 { | ||
163 | compatible = "samsung,exynos4-gpio"; | ||
164 | reg = <0x114001A0 0x20>; | ||
165 | #gpio-cells = <4>; | ||
166 | }; | ||
167 | |||
168 | gpf2: gpio-controller@114001C0 { | ||
169 | compatible = "samsung,exynos4-gpio"; | ||
170 | reg = <0x114001C0 0x20>; | ||
171 | #gpio-cells = <4>; | ||
172 | }; | ||
173 | |||
174 | gpf3: gpio-controller@114001E0 { | ||
175 | compatible = "samsung,exynos4-gpio"; | ||
176 | reg = <0x114001E0 0x20>; | ||
177 | #gpio-cells = <4>; | ||
178 | }; | ||
179 | |||
180 | gpj0: gpio-controller@11000000 { | ||
181 | compatible = "samsung,exynos4-gpio"; | ||
182 | reg = <0x11000000 0x20>; | ||
183 | #gpio-cells = <4>; | ||
184 | }; | ||
185 | |||
186 | gpj1: gpio-controller@11000020 { | ||
187 | compatible = "samsung,exynos4-gpio"; | ||
188 | reg = <0x11000020 0x20>; | ||
189 | #gpio-cells = <4>; | ||
190 | }; | ||
191 | |||
192 | gpk0: gpio-controller@11000040 { | ||
193 | compatible = "samsung,exynos4-gpio"; | ||
194 | reg = <0x11000040 0x20>; | ||
195 | #gpio-cells = <4>; | ||
196 | }; | ||
197 | |||
198 | gpk1: gpio-controller@11000060 { | ||
199 | compatible = "samsung,exynos4-gpio"; | ||
200 | reg = <0x11000060 0x20>; | ||
201 | #gpio-cells = <4>; | ||
202 | }; | ||
203 | |||
204 | gpk2: gpio-controller@11000080 { | ||
205 | compatible = "samsung,exynos4-gpio"; | ||
206 | reg = <0x11000080 0x20>; | ||
207 | #gpio-cells = <4>; | ||
208 | }; | ||
209 | |||
210 | gpk3: gpio-controller@110000A0 { | ||
211 | compatible = "samsung,exynos4-gpio"; | ||
212 | reg = <0x110000A0 0x20>; | ||
213 | #gpio-cells = <4>; | ||
214 | }; | ||
215 | |||
216 | gpl0: gpio-controller@110000C0 { | ||
217 | compatible = "samsung,exynos4-gpio"; | ||
218 | reg = <0x110000C0 0x20>; | ||
219 | #gpio-cells = <4>; | ||
220 | }; | ||
221 | |||
222 | gpl1: gpio-controller@110000E0 { | ||
223 | compatible = "samsung,exynos4-gpio"; | ||
224 | reg = <0x110000E0 0x20>; | ||
225 | #gpio-cells = <4>; | ||
226 | }; | ||
227 | |||
228 | gpl2: gpio-controller@11000100 { | ||
229 | compatible = "samsung,exynos4-gpio"; | ||
230 | reg = <0x11000100 0x20>; | ||
231 | #gpio-cells = <4>; | ||
232 | }; | ||
233 | |||
234 | gpy0: gpio-controller@11000120 { | ||
235 | compatible = "samsung,exynos4-gpio"; | ||
236 | reg = <0x11000120 0x20>; | ||
237 | #gpio-cells = <4>; | ||
238 | }; | ||
239 | |||
240 | gpy1: gpio-controller@11000140 { | ||
241 | compatible = "samsung,exynos4-gpio"; | ||
242 | reg = <0x11000140 0x20>; | ||
243 | #gpio-cells = <4>; | ||
244 | }; | ||
245 | |||
246 | gpy2: gpio-controller@11000160 { | ||
247 | compatible = "samsung,exynos4-gpio"; | ||
248 | reg = <0x11000160 0x20>; | ||
249 | #gpio-cells = <4>; | ||
250 | }; | ||
251 | |||
252 | gpy3: gpio-controller@11000180 { | ||
253 | compatible = "samsung,exynos4-gpio"; | ||
254 | reg = <0x11000180 0x20>; | ||
255 | #gpio-cells = <4>; | ||
256 | }; | ||
257 | |||
258 | gpy4: gpio-controller@110001A0 { | ||
259 | compatible = "samsung,exynos4-gpio"; | ||
260 | reg = <0x110001A0 0x20>; | ||
261 | #gpio-cells = <4>; | ||
262 | }; | ||
263 | |||
264 | gpy5: gpio-controller@110001C0 { | ||
265 | compatible = "samsung,exynos4-gpio"; | ||
266 | reg = <0x110001C0 0x20>; | ||
267 | #gpio-cells = <4>; | ||
268 | }; | ||
269 | |||
270 | gpy6: gpio-controller@110001E0 { | ||
271 | compatible = "samsung,exynos4-gpio"; | ||
272 | reg = <0x110001E0 0x20>; | ||
273 | #gpio-cells = <4>; | ||
274 | }; | ||
275 | |||
276 | gpx0: gpio-controller@11000C00 { | ||
277 | compatible = "samsung,exynos4-gpio"; | ||
278 | reg = <0x11000C00 0x20>; | ||
279 | #gpio-cells = <4>; | ||
280 | }; | ||
281 | |||
282 | gpx1: gpio-controller@11000C20 { | ||
283 | compatible = "samsung,exynos4-gpio"; | ||
284 | reg = <0x11000C20 0x20>; | ||
285 | #gpio-cells = <4>; | ||
286 | }; | ||
287 | |||
288 | gpx2: gpio-controller@11000C40 { | ||
289 | compatible = "samsung,exynos4-gpio"; | ||
290 | reg = <0x11000C40 0x20>; | ||
291 | #gpio-cells = <4>; | ||
292 | }; | ||
293 | |||
294 | gpx3: gpio-controller@11000C60 { | ||
295 | compatible = "samsung,exynos4-gpio"; | ||
296 | reg = <0x11000C60 0x20>; | ||
297 | #gpio-cells = <4>; | ||
298 | }; | ||
299 | |||
300 | gpz: gpio-controller@03860000 { | ||
301 | compatible = "samsung,exynos4-gpio"; | ||
302 | reg = <0x03860000 0x20>; | ||
303 | #gpio-cells = <4>; | ||
304 | }; | ||
305 | }; | ||
306 | }; | 67 | }; |
diff --git a/arch/arm/boot/dts/exynos5440-ssdk5440.dts b/arch/arm/boot/dts/exynos5440-ssdk5440.dts new file mode 100644 index 000000000000..921c83cf694f --- /dev/null +++ b/arch/arm/boot/dts/exynos5440-ssdk5440.dts | |||
@@ -0,0 +1,46 @@ | |||
1 | /* | ||
2 | * SAMSUNG SSDK5440 board device tree source | ||
3 | * | ||
4 | * Copyright (c) 2012 Samsung Electronics Co., Ltd. | ||
5 | * http://www.samsung.com | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License version 2 as | ||
9 | * published by the Free Software Foundation. | ||
10 | */ | ||
11 | |||
12 | /dts-v1/; | ||
13 | /include/ "exynos5440.dtsi" | ||
14 | |||
15 | / { | ||
16 | model = "SAMSUNG SSDK5440 board based on EXYNOS5440"; | ||
17 | compatible = "samsung,ssdk5440", "samsung,exynos5440"; | ||
18 | |||
19 | memory { | ||
20 | reg = <0x80000000 0x80000000>; | ||
21 | }; | ||
22 | |||
23 | chosen { | ||
24 | bootargs = "root=/dev/ram0 rw ramdisk=8192 initrd=0x81000000,8M console=ttySAC2,115200 init=/linuxrc"; | ||
25 | }; | ||
26 | |||
27 | spi { | ||
28 | status = "disabled"; | ||
29 | }; | ||
30 | |||
31 | i2c@F0000 { | ||
32 | status = "disabled"; | ||
33 | }; | ||
34 | |||
35 | i2c@100000 { | ||
36 | status = "disabled"; | ||
37 | }; | ||
38 | |||
39 | watchdog { | ||
40 | status = "disabled"; | ||
41 | }; | ||
42 | |||
43 | rtc { | ||
44 | status = "disabled"; | ||
45 | }; | ||
46 | }; | ||
diff --git a/arch/arm/boot/dts/exynos5440.dtsi b/arch/arm/boot/dts/exynos5440.dtsi new file mode 100644 index 000000000000..024269de8ee5 --- /dev/null +++ b/arch/arm/boot/dts/exynos5440.dtsi | |||
@@ -0,0 +1,159 @@ | |||
1 | /* | ||
2 | * SAMSUNG EXYNOS5440 SoC device tree source | ||
3 | * | ||
4 | * Copyright (c) 2012 Samsung Electronics Co., Ltd. | ||
5 | * http://www.samsung.com | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License version 2 as | ||
9 | * published by the Free Software Foundation. | ||
10 | */ | ||
11 | |||
12 | /include/ "skeleton.dtsi" | ||
13 | |||
14 | / { | ||
15 | compatible = "samsung,exynos5440"; | ||
16 | |||
17 | interrupt-parent = <&gic>; | ||
18 | |||
19 | gic:interrupt-controller@2E0000 { | ||
20 | compatible = "arm,cortex-a15-gic"; | ||
21 | #interrupt-cells = <3>; | ||
22 | interrupt-controller; | ||
23 | reg = <0x2E1000 0x1000>, <0x2E2000 0x1000>; | ||
24 | }; | ||
25 | |||
26 | cpus { | ||
27 | cpu@0 { | ||
28 | compatible = "arm,cortex-a15"; | ||
29 | timer { | ||
30 | compatible = "arm,armv7-timer"; | ||
31 | interrupts = <1 13 0xf08>; | ||
32 | clock-frequency = <1000000>; | ||
33 | }; | ||
34 | }; | ||
35 | cpu@1 { | ||
36 | compatible = "arm,cortex-a15"; | ||
37 | timer { | ||
38 | compatible = "arm,armv7-timer"; | ||
39 | interrupts = <1 14 0xf08>; | ||
40 | clock-frequency = <1000000>; | ||
41 | }; | ||
42 | }; | ||
43 | cpu@2 { | ||
44 | compatible = "arm,cortex-a15"; | ||
45 | timer { | ||
46 | compatible = "arm,armv7-timer"; | ||
47 | interrupts = <1 14 0xf08>; | ||
48 | clock-frequency = <1000000>; | ||
49 | }; | ||
50 | }; | ||
51 | cpu@3 { | ||
52 | compatible = "arm,cortex-a15"; | ||
53 | timer { | ||
54 | compatible = "arm,armv7-timer"; | ||
55 | interrupts = <1 14 0xf08>; | ||
56 | clock-frequency = <1000000>; | ||
57 | }; | ||
58 | }; | ||
59 | }; | ||
60 | |||
61 | common { | ||
62 | compatible = "samsung,exynos5440"; | ||
63 | |||
64 | }; | ||
65 | |||
66 | serial@B0000 { | ||
67 | compatible = "samsung,exynos4210-uart"; | ||
68 | reg = <0xB0000 0x1000>; | ||
69 | interrupts = <0 2 0>; | ||
70 | }; | ||
71 | |||
72 | serial@C0000 { | ||
73 | compatible = "samsung,exynos4210-uart"; | ||
74 | reg = <0xC0000 0x1000>; | ||
75 | interrupts = <0 3 0>; | ||
76 | }; | ||
77 | |||
78 | spi { | ||
79 | compatible = "samsung,exynos4210-spi"; | ||
80 | reg = <0xD0000 0x1000>; | ||
81 | interrupts = <0 4 0>; | ||
82 | tx-dma-channel = <&pdma0 5>; /* preliminary */ | ||
83 | rx-dma-channel = <&pdma0 4>; /* preliminary */ | ||
84 | #address-cells = <1>; | ||
85 | #size-cells = <0>; | ||
86 | }; | ||
87 | |||
88 | pinctrl { | ||
89 | compatible = "samsung,pinctrl-exynos5440"; | ||
90 | reg = <0xE0000 0x1000>; | ||
91 | interrupt-controller; | ||
92 | #interrupt-cells = <2>; | ||
93 | #gpio-cells = <2>; | ||
94 | |||
95 | fan: fan { | ||
96 | samsung,exynos5440-pin-function = <1>; | ||
97 | }; | ||
98 | |||
99 | hdd_led0: hdd_led0 { | ||
100 | samsung,exynos5440-pin-function = <2>; | ||
101 | }; | ||
102 | |||
103 | hdd_led1: hdd_led1 { | ||
104 | samsung,exynos5440-pin-function = <3>; | ||
105 | }; | ||
106 | |||
107 | uart1: uart1 { | ||
108 | samsung,exynos5440-pin-function = <4>; | ||
109 | }; | ||
110 | }; | ||
111 | |||
112 | i2c@F0000 { | ||
113 | compatible = "samsung,s3c2440-i2c"; | ||
114 | reg = <0xF0000 0x1000>; | ||
115 | interrupts = <0 5 0>; | ||
116 | #address-cells = <1>; | ||
117 | #size-cells = <0>; | ||
118 | }; | ||
119 | |||
120 | i2c@100000 { | ||
121 | compatible = "samsung,s3c2440-i2c"; | ||
122 | reg = <0x100000 0x1000>; | ||
123 | interrupts = <0 6 0>; | ||
124 | #address-cells = <1>; | ||
125 | #size-cells = <0>; | ||
126 | }; | ||
127 | |||
128 | watchdog { | ||
129 | compatible = "samsung,s3c2410-wdt"; | ||
130 | reg = <0x110000 0x1000>; | ||
131 | interrupts = <0 1 0>; | ||
132 | }; | ||
133 | |||
134 | amba { | ||
135 | #address-cells = <1>; | ||
136 | #size-cells = <1>; | ||
137 | compatible = "arm,amba-bus"; | ||
138 | interrupt-parent = <&gic>; | ||
139 | ranges; | ||
140 | |||
141 | pdma0: pdma@121A0000 { | ||
142 | compatible = "arm,pl330", "arm,primecell"; | ||
143 | reg = <0x120000 0x1000>; | ||
144 | interrupts = <0 34 0>; | ||
145 | }; | ||
146 | |||
147 | pdma1: pdma@121B0000 { | ||
148 | compatible = "arm,pl330", "arm,primecell"; | ||
149 | reg = <0x121000 0x1000>; | ||
150 | interrupts = <0 35 0>; | ||
151 | }; | ||
152 | }; | ||
153 | |||
154 | rtc { | ||
155 | compatible = "samsung,s3c6410-rtc"; | ||
156 | reg = <0x130000 0x1000>; | ||
157 | interrupts = <0 16 0>, <0 17 0>; | ||
158 | }; | ||
159 | }; | ||
diff --git a/arch/arm/boot/dts/highbank.dts b/arch/arm/boot/dts/highbank.dts index 0c6fc34821f9..a9ae5d32e80d 100644 --- a/arch/arm/boot/dts/highbank.dts +++ b/arch/arm/boot/dts/highbank.dts | |||
@@ -69,16 +69,8 @@ | |||
69 | reg = <0x00000000 0xff900000>; | 69 | reg = <0x00000000 0xff900000>; |
70 | }; | 70 | }; |
71 | 71 | ||
72 | chosen { | ||
73 | bootargs = "console=ttyAMA0"; | ||
74 | }; | ||
75 | |||
76 | soc { | 72 | soc { |
77 | #address-cells = <1>; | 73 | ranges = <0x00000000 0x00000000 0xffffffff>; |
78 | #size-cells = <1>; | ||
79 | compatible = "simple-bus"; | ||
80 | interrupt-parent = <&intc>; | ||
81 | ranges; | ||
82 | 74 | ||
83 | timer@fff10600 { | 75 | timer@fff10600 { |
84 | compatible = "arm,cortex-a9-twd-timer"; | 76 | compatible = "arm,cortex-a9-twd-timer"; |
@@ -117,173 +109,6 @@ | |||
117 | interrupts = <0 76 4 0 75 4 0 74 4 0 73 4>; | 109 | interrupts = <0 76 4 0 75 4 0 74 4 0 73 4>; |
118 | }; | 110 | }; |
119 | 111 | ||
120 | sata@ffe08000 { | ||
121 | compatible = "calxeda,hb-ahci"; | ||
122 | reg = <0xffe08000 0x10000>; | ||
123 | interrupts = <0 83 4>; | ||
124 | calxeda,port-phys = <&combophy5 0 &combophy0 0 | ||
125 | &combophy0 1 &combophy0 2 | ||
126 | &combophy0 3>; | ||
127 | dma-coherent; | ||
128 | }; | ||
129 | |||
130 | sdhci@ffe0e000 { | ||
131 | compatible = "calxeda,hb-sdhci"; | ||
132 | reg = <0xffe0e000 0x1000>; | ||
133 | interrupts = <0 90 4>; | ||
134 | clocks = <&eclk>; | ||
135 | }; | ||
136 | |||
137 | memory-controller@fff00000 { | ||
138 | compatible = "calxeda,hb-ddr-ctrl"; | ||
139 | reg = <0xfff00000 0x1000>; | ||
140 | interrupts = <0 91 4>; | ||
141 | }; | ||
142 | |||
143 | ipc@fff20000 { | ||
144 | compatible = "arm,pl320", "arm,primecell"; | ||
145 | reg = <0xfff20000 0x1000>; | ||
146 | interrupts = <0 7 4>; | ||
147 | clocks = <&pclk>; | ||
148 | clock-names = "apb_pclk"; | ||
149 | }; | ||
150 | |||
151 | gpioe: gpio@fff30000 { | ||
152 | #gpio-cells = <2>; | ||
153 | compatible = "arm,pl061", "arm,primecell"; | ||
154 | gpio-controller; | ||
155 | reg = <0xfff30000 0x1000>; | ||
156 | interrupts = <0 14 4>; | ||
157 | clocks = <&pclk>; | ||
158 | clock-names = "apb_pclk"; | ||
159 | }; | ||
160 | |||
161 | gpiof: gpio@fff31000 { | ||
162 | #gpio-cells = <2>; | ||
163 | compatible = "arm,pl061", "arm,primecell"; | ||
164 | gpio-controller; | ||
165 | reg = <0xfff31000 0x1000>; | ||
166 | interrupts = <0 15 4>; | ||
167 | clocks = <&pclk>; | ||
168 | clock-names = "apb_pclk"; | ||
169 | }; | ||
170 | |||
171 | gpiog: gpio@fff32000 { | ||
172 | #gpio-cells = <2>; | ||
173 | compatible = "arm,pl061", "arm,primecell"; | ||
174 | gpio-controller; | ||
175 | reg = <0xfff32000 0x1000>; | ||
176 | interrupts = <0 16 4>; | ||
177 | clocks = <&pclk>; | ||
178 | clock-names = "apb_pclk"; | ||
179 | }; | ||
180 | |||
181 | gpioh: gpio@fff33000 { | ||
182 | #gpio-cells = <2>; | ||
183 | compatible = "arm,pl061", "arm,primecell"; | ||
184 | gpio-controller; | ||
185 | reg = <0xfff33000 0x1000>; | ||
186 | interrupts = <0 17 4>; | ||
187 | clocks = <&pclk>; | ||
188 | clock-names = "apb_pclk"; | ||
189 | }; | ||
190 | |||
191 | timer { | ||
192 | compatible = "arm,sp804", "arm,primecell"; | ||
193 | reg = <0xfff34000 0x1000>; | ||
194 | interrupts = <0 18 4>; | ||
195 | clocks = <&pclk>; | ||
196 | clock-names = "apb_pclk"; | ||
197 | }; | ||
198 | |||
199 | rtc@fff35000 { | ||
200 | compatible = "arm,pl031", "arm,primecell"; | ||
201 | reg = <0xfff35000 0x1000>; | ||
202 | interrupts = <0 19 4>; | ||
203 | clocks = <&pclk>; | ||
204 | clock-names = "apb_pclk"; | ||
205 | }; | ||
206 | |||
207 | serial@fff36000 { | ||
208 | compatible = "arm,pl011", "arm,primecell"; | ||
209 | reg = <0xfff36000 0x1000>; | ||
210 | interrupts = <0 20 4>; | ||
211 | clocks = <&pclk>; | ||
212 | clock-names = "apb_pclk"; | ||
213 | }; | ||
214 | |||
215 | smic@fff3a000 { | ||
216 | compatible = "ipmi-smic"; | ||
217 | device_type = "ipmi"; | ||
218 | reg = <0xfff3a000 0x1000>; | ||
219 | interrupts = <0 24 4>; | ||
220 | reg-size = <4>; | ||
221 | reg-spacing = <4>; | ||
222 | }; | ||
223 | |||
224 | sregs@fff3c000 { | ||
225 | compatible = "calxeda,hb-sregs"; | ||
226 | reg = <0xfff3c000 0x1000>; | ||
227 | |||
228 | clocks { | ||
229 | #address-cells = <1>; | ||
230 | #size-cells = <0>; | ||
231 | |||
232 | osc: oscillator { | ||
233 | #clock-cells = <0>; | ||
234 | compatible = "fixed-clock"; | ||
235 | clock-frequency = <33333000>; | ||
236 | }; | ||
237 | |||
238 | ddrpll: ddrpll { | ||
239 | #clock-cells = <0>; | ||
240 | compatible = "calxeda,hb-pll-clock"; | ||
241 | clocks = <&osc>; | ||
242 | reg = <0x108>; | ||
243 | }; | ||
244 | |||
245 | a9pll: a9pll { | ||
246 | #clock-cells = <0>; | ||
247 | compatible = "calxeda,hb-pll-clock"; | ||
248 | clocks = <&osc>; | ||
249 | reg = <0x100>; | ||
250 | }; | ||
251 | |||
252 | a9periphclk: a9periphclk { | ||
253 | #clock-cells = <0>; | ||
254 | compatible = "calxeda,hb-a9periph-clock"; | ||
255 | clocks = <&a9pll>; | ||
256 | reg = <0x104>; | ||
257 | }; | ||
258 | |||
259 | a9bclk: a9bclk { | ||
260 | #clock-cells = <0>; | ||
261 | compatible = "calxeda,hb-a9bus-clock"; | ||
262 | clocks = <&a9pll>; | ||
263 | reg = <0x104>; | ||
264 | }; | ||
265 | |||
266 | emmcpll: emmcpll { | ||
267 | #clock-cells = <0>; | ||
268 | compatible = "calxeda,hb-pll-clock"; | ||
269 | clocks = <&osc>; | ||
270 | reg = <0x10C>; | ||
271 | }; | ||
272 | |||
273 | eclk: eclk { | ||
274 | #clock-cells = <0>; | ||
275 | compatible = "calxeda,hb-emmc-clock"; | ||
276 | clocks = <&emmcpll>; | ||
277 | reg = <0x114>; | ||
278 | }; | ||
279 | |||
280 | pclk: pclk { | ||
281 | #clock-cells = <0>; | ||
282 | compatible = "fixed-clock"; | ||
283 | clock-frequency = <150000000>; | ||
284 | }; | ||
285 | }; | ||
286 | }; | ||
287 | 112 | ||
288 | sregs@fff3c200 { | 113 | sregs@fff3c200 { |
289 | compatible = "calxeda,hb-sregs-l2-ecc"; | 114 | compatible = "calxeda,hb-sregs-l2-ecc"; |
@@ -291,38 +116,7 @@ | |||
291 | interrupts = <0 71 4 0 72 4>; | 116 | interrupts = <0 71 4 0 72 4>; |
292 | }; | 117 | }; |
293 | 118 | ||
294 | dma@fff3d000 { | ||
295 | compatible = "arm,pl330", "arm,primecell"; | ||
296 | reg = <0xfff3d000 0x1000>; | ||
297 | interrupts = <0 92 4>; | ||
298 | clocks = <&pclk>; | ||
299 | clock-names = "apb_pclk"; | ||
300 | }; | ||
301 | |||
302 | ethernet@fff50000 { | ||
303 | compatible = "calxeda,hb-xgmac"; | ||
304 | reg = <0xfff50000 0x1000>; | ||
305 | interrupts = <0 77 4 0 78 4 0 79 4>; | ||
306 | }; | ||
307 | |||
308 | ethernet@fff51000 { | ||
309 | compatible = "calxeda,hb-xgmac"; | ||
310 | reg = <0xfff51000 0x1000>; | ||
311 | interrupts = <0 80 4 0 81 4 0 82 4>; | ||
312 | }; | ||
313 | |||
314 | combophy0: combo-phy@fff58000 { | ||
315 | compatible = "calxeda,hb-combophy"; | ||
316 | #phy-cells = <1>; | ||
317 | reg = <0xfff58000 0x1000>; | ||
318 | phydev = <5>; | ||
319 | }; | ||
320 | |||
321 | combophy5: combo-phy@fff5d000 { | ||
322 | compatible = "calxeda,hb-combophy"; | ||
323 | #phy-cells = <1>; | ||
324 | reg = <0xfff5d000 0x1000>; | ||
325 | phydev = <31>; | ||
326 | }; | ||
327 | }; | 119 | }; |
328 | }; | 120 | }; |
121 | |||
122 | /include/ "ecx-common.dtsi" | ||
diff --git a/arch/arm/boot/dts/imx27-3ds.dts b/arch/arm/boot/dts/imx27-3ds.dts index 0a8978a40ece..b01c0d745fc5 100644 --- a/arch/arm/boot/dts/imx27-3ds.dts +++ b/arch/arm/boot/dts/imx27-3ds.dts | |||
@@ -23,10 +23,6 @@ | |||
23 | soc { | 23 | soc { |
24 | aipi@10000000 { /* aipi */ | 24 | aipi@10000000 { /* aipi */ |
25 | 25 | ||
26 | wdog@10002000 { | ||
27 | status = "okay"; | ||
28 | }; | ||
29 | |||
30 | uart1: serial@1000a000 { | 26 | uart1: serial@1000a000 { |
31 | fsl,uart-has-rtscts; | 27 | fsl,uart-has-rtscts; |
32 | status = "okay"; | 28 | status = "okay"; |
diff --git a/arch/arm/boot/dts/imx51-babbage.dts b/arch/arm/boot/dts/imx51-babbage.dts index cbd2b1c7487b..567e7ee72f91 100644 --- a/arch/arm/boot/dts/imx51-babbage.dts +++ b/arch/arm/boot/dts/imx51-babbage.dts | |||
@@ -22,6 +22,22 @@ | |||
22 | }; | 22 | }; |
23 | 23 | ||
24 | soc { | 24 | soc { |
25 | display@di0 { | ||
26 | compatible = "fsl,imx-parallel-display"; | ||
27 | crtcs = <&ipu 0>; | ||
28 | interface-pix-fmt = "rgb24"; | ||
29 | pinctrl-names = "default"; | ||
30 | pinctrl-0 = <&pinctrl_ipu_disp1_1>; | ||
31 | }; | ||
32 | |||
33 | display@di1 { | ||
34 | compatible = "fsl,imx-parallel-display"; | ||
35 | crtcs = <&ipu 1>; | ||
36 | interface-pix-fmt = "rgb565"; | ||
37 | pinctrl-names = "default"; | ||
38 | pinctrl-0 = <&pinctrl_ipu_disp2_1>; | ||
39 | }; | ||
40 | |||
25 | aips@70000000 { /* aips-1 */ | 41 | aips@70000000 { /* aips-1 */ |
26 | spba@70000000 { | 42 | spba@70000000 { |
27 | esdhc@70004000 { /* ESDHC1 */ | 43 | esdhc@70004000 { /* ESDHC1 */ |
diff --git a/arch/arm/boot/dts/imx51.dtsi b/arch/arm/boot/dts/imx51.dtsi index 54aea74769a1..2781e47cff0d 100644 --- a/arch/arm/boot/dts/imx51.dtsi +++ b/arch/arm/boot/dts/imx51.dtsi | |||
@@ -62,6 +62,13 @@ | |||
62 | interrupt-parent = <&tzic>; | 62 | interrupt-parent = <&tzic>; |
63 | ranges; | 63 | ranges; |
64 | 64 | ||
65 | ipu: ipu@40000000 { | ||
66 | #crtc-cells = <1>; | ||
67 | compatible = "fsl,imx51-ipu"; | ||
68 | reg = <0x40000000 0x20000000>; | ||
69 | interrupts = <11 10>; | ||
70 | }; | ||
71 | |||
65 | aips@70000000 { /* AIPS1 */ | 72 | aips@70000000 { /* AIPS1 */ |
66 | compatible = "fsl,aips-bus", "simple-bus"; | 73 | compatible = "fsl,aips-bus", "simple-bus"; |
67 | #address-cells = <1>; | 74 | #address-cells = <1>; |
@@ -80,6 +87,8 @@ | |||
80 | compatible = "fsl,imx51-esdhc"; | 87 | compatible = "fsl,imx51-esdhc"; |
81 | reg = <0x70004000 0x4000>; | 88 | reg = <0x70004000 0x4000>; |
82 | interrupts = <1>; | 89 | interrupts = <1>; |
90 | clocks = <&clks 44>, <&clks 0>, <&clks 71>; | ||
91 | clock-names = "ipg", "ahb", "per"; | ||
83 | status = "disabled"; | 92 | status = "disabled"; |
84 | }; | 93 | }; |
85 | 94 | ||
@@ -87,6 +96,8 @@ | |||
87 | compatible = "fsl,imx51-esdhc"; | 96 | compatible = "fsl,imx51-esdhc"; |
88 | reg = <0x70008000 0x4000>; | 97 | reg = <0x70008000 0x4000>; |
89 | interrupts = <2>; | 98 | interrupts = <2>; |
99 | clocks = <&clks 45>, <&clks 0>, <&clks 72>; | ||
100 | clock-names = "ipg", "ahb", "per"; | ||
90 | status = "disabled"; | 101 | status = "disabled"; |
91 | }; | 102 | }; |
92 | 103 | ||
@@ -94,6 +105,8 @@ | |||
94 | compatible = "fsl,imx51-uart", "fsl,imx21-uart"; | 105 | compatible = "fsl,imx51-uart", "fsl,imx21-uart"; |
95 | reg = <0x7000c000 0x4000>; | 106 | reg = <0x7000c000 0x4000>; |
96 | interrupts = <33>; | 107 | interrupts = <33>; |
108 | clocks = <&clks 32>, <&clks 33>; | ||
109 | clock-names = "ipg", "per"; | ||
97 | status = "disabled"; | 110 | status = "disabled"; |
98 | }; | 111 | }; |
99 | 112 | ||
@@ -103,6 +116,8 @@ | |||
103 | compatible = "fsl,imx51-ecspi"; | 116 | compatible = "fsl,imx51-ecspi"; |
104 | reg = <0x70010000 0x4000>; | 117 | reg = <0x70010000 0x4000>; |
105 | interrupts = <36>; | 118 | interrupts = <36>; |
119 | clocks = <&clks 51>, <&clks 52>; | ||
120 | clock-names = "ipg", "per"; | ||
106 | status = "disabled"; | 121 | status = "disabled"; |
107 | }; | 122 | }; |
108 | 123 | ||
@@ -110,6 +125,7 @@ | |||
110 | compatible = "fsl,imx51-ssi", "fsl,imx21-ssi"; | 125 | compatible = "fsl,imx51-ssi", "fsl,imx21-ssi"; |
111 | reg = <0x70014000 0x4000>; | 126 | reg = <0x70014000 0x4000>; |
112 | interrupts = <30>; | 127 | interrupts = <30>; |
128 | clocks = <&clks 49>; | ||
113 | fsl,fifo-depth = <15>; | 129 | fsl,fifo-depth = <15>; |
114 | fsl,ssi-dma-events = <25 24 23 22>; /* TX0 RX0 TX1 RX1 */ | 130 | fsl,ssi-dma-events = <25 24 23 22>; /* TX0 RX0 TX1 RX1 */ |
115 | status = "disabled"; | 131 | status = "disabled"; |
@@ -119,6 +135,8 @@ | |||
119 | compatible = "fsl,imx51-esdhc"; | 135 | compatible = "fsl,imx51-esdhc"; |
120 | reg = <0x70020000 0x4000>; | 136 | reg = <0x70020000 0x4000>; |
121 | interrupts = <3>; | 137 | interrupts = <3>; |
138 | clocks = <&clks 46>, <&clks 0>, <&clks 73>; | ||
139 | clock-names = "ipg", "ahb", "per"; | ||
122 | status = "disabled"; | 140 | status = "disabled"; |
123 | }; | 141 | }; |
124 | 142 | ||
@@ -126,6 +144,8 @@ | |||
126 | compatible = "fsl,imx51-esdhc"; | 144 | compatible = "fsl,imx51-esdhc"; |
127 | reg = <0x70024000 0x4000>; | 145 | reg = <0x70024000 0x4000>; |
128 | interrupts = <4>; | 146 | interrupts = <4>; |
147 | clocks = <&clks 47>, <&clks 0>, <&clks 74>; | ||
148 | clock-names = "ipg", "ahb", "per"; | ||
129 | status = "disabled"; | 149 | status = "disabled"; |
130 | }; | 150 | }; |
131 | }; | 151 | }; |
@@ -202,12 +222,14 @@ | |||
202 | compatible = "fsl,imx51-wdt", "fsl,imx21-wdt"; | 222 | compatible = "fsl,imx51-wdt", "fsl,imx21-wdt"; |
203 | reg = <0x73f98000 0x4000>; | 223 | reg = <0x73f98000 0x4000>; |
204 | interrupts = <58>; | 224 | interrupts = <58>; |
225 | clocks = <&clks 0>; | ||
205 | }; | 226 | }; |
206 | 227 | ||
207 | wdog@73f9c000 { /* WDOG2 */ | 228 | wdog@73f9c000 { /* WDOG2 */ |
208 | compatible = "fsl,imx51-wdt", "fsl,imx21-wdt"; | 229 | compatible = "fsl,imx51-wdt", "fsl,imx21-wdt"; |
209 | reg = <0x73f9c000 0x4000>; | 230 | reg = <0x73f9c000 0x4000>; |
210 | interrupts = <59>; | 231 | interrupts = <59>; |
232 | clocks = <&clks 0>; | ||
211 | status = "disabled"; | 233 | status = "disabled"; |
212 | }; | 234 | }; |
213 | 235 | ||
@@ -295,6 +317,66 @@ | |||
295 | }; | 317 | }; |
296 | }; | 318 | }; |
297 | 319 | ||
320 | ipu_disp1 { | ||
321 | pinctrl_ipu_disp1_1: ipudisp1grp-1 { | ||
322 | fsl,pins = < | ||
323 | 528 0x5 /* MX51_PAD_DISP1_DAT0__DISP1_DAT0 */ | ||
324 | 529 0x5 /* MX51_PAD_DISP1_DAT1__DISP1_DAT1 */ | ||
325 | 530 0x5 /* MX51_PAD_DISP1_DAT2__DISP1_DAT2 */ | ||
326 | 531 0x5 /* MX51_PAD_DISP1_DAT3__DISP1_DAT3 */ | ||
327 | 532 0x5 /* MX51_PAD_DISP1_DAT4__DISP1_DAT4 */ | ||
328 | 533 0x5 /* MX51_PAD_DISP1_DAT5__DISP1_DAT5 */ | ||
329 | 535 0x5 /* MX51_PAD_DISP1_DAT6__DISP1_DAT6 */ | ||
330 | 537 0x5 /* MX51_PAD_DISP1_DAT7__DISP1_DAT7 */ | ||
331 | 539 0x5 /* MX51_PAD_DISP1_DAT8__DISP1_DAT8 */ | ||
332 | 541 0x5 /* MX51_PAD_DISP1_DAT9__DISP1_DAT9 */ | ||
333 | 543 0x5 /* MX51_PAD_DISP1_DAT10__DISP1_DAT10 */ | ||
334 | 545 0x5 /* MX51_PAD_DISP1_DAT11__DISP1_DAT11 */ | ||
335 | 547 0x5 /* MX51_PAD_DISP1_DAT12__DISP1_DAT12 */ | ||
336 | 549 0x5 /* MX51_PAD_DISP1_DAT13__DISP1_DAT13 */ | ||
337 | 551 0x5 /* MX51_PAD_DISP1_DAT14__DISP1_DAT14 */ | ||
338 | 553 0x5 /* MX51_PAD_DISP1_DAT15__DISP1_DAT15 */ | ||
339 | 555 0x5 /* MX51_PAD_DISP1_DAT16__DISP1_DAT16 */ | ||
340 | 557 0x5 /* MX51_PAD_DISP1_DAT17__DISP1_DAT17 */ | ||
341 | 559 0x5 /* MX51_PAD_DISP1_DAT18__DISP1_DAT18 */ | ||
342 | 563 0x5 /* MX51_PAD_DISP1_DAT19__DISP1_DAT19 */ | ||
343 | 567 0x5 /* MX51_PAD_DISP1_DAT20__DISP1_DAT20 */ | ||
344 | 571 0x5 /* MX51_PAD_DISP1_DAT21__DISP1_DAT21 */ | ||
345 | 575 0x5 /* MX51_PAD_DISP1_DAT22__DISP1_DAT22 */ | ||
346 | 579 0x5 /* MX51_PAD_DISP1_DAT23__DISP1_DAT23 */ | ||
347 | 584 0x5 /* MX51_PAD_DI1_PIN2__DI1_PIN2 (hsync) */ | ||
348 | 583 0x5 /* MX51_PAD_DI1_PIN3__DI1_PIN3 (vsync) */ | ||
349 | >; | ||
350 | }; | ||
351 | }; | ||
352 | |||
353 | ipu_disp2 { | ||
354 | pinctrl_ipu_disp2_1: ipudisp2grp-1 { | ||
355 | fsl,pins = < | ||
356 | 603 0x5 /* MX51_PAD_DISP2_DAT0__DISP2_DAT0 */ | ||
357 | 608 0x5 /* MX51_PAD_DISP2_DAT1__DISP2_DAT1 */ | ||
358 | 613 0x5 /* MX51_PAD_DISP2_DAT2__DISP2_DAT2 */ | ||
359 | 614 0x5 /* MX51_PAD_DISP2_DAT3__DISP2_DAT3 */ | ||
360 | 615 0x5 /* MX51_PAD_DISP2_DAT4__DISP2_DAT4 */ | ||
361 | 616 0x5 /* MX51_PAD_DISP2_DAT5__DISP2_DAT5 */ | ||
362 | 617 0x5 /* MX51_PAD_DISP2_DAT6__DISP2_DAT6 */ | ||
363 | 622 0x5 /* MX51_PAD_DISP2_DAT7__DISP2_DAT7 */ | ||
364 | 627 0x5 /* MX51_PAD_DISP2_DAT8__DISP2_DAT8 */ | ||
365 | 633 0x5 /* MX51_PAD_DISP2_DAT9__DISP2_DAT9 */ | ||
366 | 637 0x5 /* MX51_PAD_DISP2_DAT10__DISP2_DAT10 */ | ||
367 | 643 0x5 /* MX51_PAD_DISP2_DAT11__DISP2_DAT11 */ | ||
368 | 648 0x5 /* MX51_PAD_DISP2_DAT12__DISP2_DAT12 */ | ||
369 | 652 0x5 /* MX51_PAD_DISP2_DAT13__DISP2_DAT13 */ | ||
370 | 656 0x5 /* MX51_PAD_DISP2_DAT14__DISP2_DAT14 */ | ||
371 | 661 0x5 /* MX51_PAD_DISP2_DAT15__DISP2_DAT15 */ | ||
372 | 593 0x5 /* MX51_PAD_DI2_PIN2__DI2_PIN2 (hsync) */ | ||
373 | 595 0x5 /* MX51_PAD_DI2_PIN3__DI2_PIN3 (vsync) */ | ||
374 | 597 0x5 /* MX51_PAD_DI2_DISP_CLK__DI2_DISP_CLK */ | ||
375 | 599 0x5 /* MX51_PAD_DI_GP4__DI2_PIN15 */ | ||
376 | >; | ||
377 | }; | ||
378 | }; | ||
379 | |||
298 | uart1 { | 380 | uart1 { |
299 | pinctrl_uart1_1: uart1grp-1 { | 381 | pinctrl_uart1_1: uart1grp-1 { |
300 | fsl,pins = < | 382 | fsl,pins = < |
@@ -327,10 +409,30 @@ | |||
327 | }; | 409 | }; |
328 | }; | 410 | }; |
329 | 411 | ||
412 | pwm1: pwm@73fb4000 { | ||
413 | #pwm-cells = <2>; | ||
414 | compatible = "fsl,imx51-pwm", "fsl,imx27-pwm"; | ||
415 | reg = <0x73fb4000 0x4000>; | ||
416 | clocks = <&clks 37>, <&clks 38>; | ||
417 | clock-names = "ipg", "per"; | ||
418 | interrupts = <61>; | ||
419 | }; | ||
420 | |||
421 | pwm2: pwm@73fb8000 { | ||
422 | #pwm-cells = <2>; | ||
423 | compatible = "fsl,imx51-pwm", "fsl,imx27-pwm"; | ||
424 | reg = <0x73fb8000 0x4000>; | ||
425 | clocks = <&clks 39>, <&clks 40>; | ||
426 | clock-names = "ipg", "per"; | ||
427 | interrupts = <94>; | ||
428 | }; | ||
429 | |||
330 | uart1: serial@73fbc000 { | 430 | uart1: serial@73fbc000 { |
331 | compatible = "fsl,imx51-uart", "fsl,imx21-uart"; | 431 | compatible = "fsl,imx51-uart", "fsl,imx21-uart"; |
332 | reg = <0x73fbc000 0x4000>; | 432 | reg = <0x73fbc000 0x4000>; |
333 | interrupts = <31>; | 433 | interrupts = <31>; |
434 | clocks = <&clks 28>, <&clks 29>; | ||
435 | clock-names = "ipg", "per"; | ||
334 | status = "disabled"; | 436 | status = "disabled"; |
335 | }; | 437 | }; |
336 | 438 | ||
@@ -338,8 +440,17 @@ | |||
338 | compatible = "fsl,imx51-uart", "fsl,imx21-uart"; | 440 | compatible = "fsl,imx51-uart", "fsl,imx21-uart"; |
339 | reg = <0x73fc0000 0x4000>; | 441 | reg = <0x73fc0000 0x4000>; |
340 | interrupts = <32>; | 442 | interrupts = <32>; |
443 | clocks = <&clks 30>, <&clks 31>; | ||
444 | clock-names = "ipg", "per"; | ||
341 | status = "disabled"; | 445 | status = "disabled"; |
342 | }; | 446 | }; |
447 | |||
448 | clks: ccm@73fd4000{ | ||
449 | compatible = "fsl,imx51-ccm"; | ||
450 | reg = <0x73fd4000 0x4000>; | ||
451 | interrupts = <0 71 0x04 0 72 0x04>; | ||
452 | #clock-cells = <1>; | ||
453 | }; | ||
343 | }; | 454 | }; |
344 | 455 | ||
345 | aips@80000000 { /* AIPS2 */ | 456 | aips@80000000 { /* AIPS2 */ |
@@ -355,6 +466,8 @@ | |||
355 | compatible = "fsl,imx51-ecspi"; | 466 | compatible = "fsl,imx51-ecspi"; |
356 | reg = <0x83fac000 0x4000>; | 467 | reg = <0x83fac000 0x4000>; |
357 | interrupts = <37>; | 468 | interrupts = <37>; |
469 | clocks = <&clks 53>, <&clks 54>; | ||
470 | clock-names = "ipg", "per"; | ||
358 | status = "disabled"; | 471 | status = "disabled"; |
359 | }; | 472 | }; |
360 | 473 | ||
@@ -362,6 +475,8 @@ | |||
362 | compatible = "fsl,imx51-sdma", "fsl,imx35-sdma"; | 475 | compatible = "fsl,imx51-sdma", "fsl,imx35-sdma"; |
363 | reg = <0x83fb0000 0x4000>; | 476 | reg = <0x83fb0000 0x4000>; |
364 | interrupts = <6>; | 477 | interrupts = <6>; |
478 | clocks = <&clks 56>, <&clks 56>; | ||
479 | clock-names = "ipg", "ahb"; | ||
365 | fsl,sdma-ram-script-name = "imx/sdma/sdma-imx51.bin"; | 480 | fsl,sdma-ram-script-name = "imx/sdma/sdma-imx51.bin"; |
366 | }; | 481 | }; |
367 | 482 | ||
@@ -371,6 +486,8 @@ | |||
371 | compatible = "fsl,imx51-cspi", "fsl,imx35-cspi"; | 486 | compatible = "fsl,imx51-cspi", "fsl,imx35-cspi"; |
372 | reg = <0x83fc0000 0x4000>; | 487 | reg = <0x83fc0000 0x4000>; |
373 | interrupts = <38>; | 488 | interrupts = <38>; |
489 | clocks = <&clks 55>, <&clks 0>; | ||
490 | clock-names = "ipg", "per"; | ||
374 | status = "disabled"; | 491 | status = "disabled"; |
375 | }; | 492 | }; |
376 | 493 | ||
@@ -380,6 +497,7 @@ | |||
380 | compatible = "fsl,imx51-i2c", "fsl,imx21-i2c"; | 497 | compatible = "fsl,imx51-i2c", "fsl,imx21-i2c"; |
381 | reg = <0x83fc4000 0x4000>; | 498 | reg = <0x83fc4000 0x4000>; |
382 | interrupts = <63>; | 499 | interrupts = <63>; |
500 | clocks = <&clks 35>; | ||
383 | status = "disabled"; | 501 | status = "disabled"; |
384 | }; | 502 | }; |
385 | 503 | ||
@@ -389,6 +507,7 @@ | |||
389 | compatible = "fsl,imx51-i2c", "fsl,imx21-i2c"; | 507 | compatible = "fsl,imx51-i2c", "fsl,imx21-i2c"; |
390 | reg = <0x83fc8000 0x4000>; | 508 | reg = <0x83fc8000 0x4000>; |
391 | interrupts = <62>; | 509 | interrupts = <62>; |
510 | clocks = <&clks 34>; | ||
392 | status = "disabled"; | 511 | status = "disabled"; |
393 | }; | 512 | }; |
394 | 513 | ||
@@ -396,6 +515,7 @@ | |||
396 | compatible = "fsl,imx51-ssi", "fsl,imx21-ssi"; | 515 | compatible = "fsl,imx51-ssi", "fsl,imx21-ssi"; |
397 | reg = <0x83fcc000 0x4000>; | 516 | reg = <0x83fcc000 0x4000>; |
398 | interrupts = <29>; | 517 | interrupts = <29>; |
518 | clocks = <&clks 48>; | ||
399 | fsl,fifo-depth = <15>; | 519 | fsl,fifo-depth = <15>; |
400 | fsl,ssi-dma-events = <29 28 27 26>; /* TX0 RX0 TX1 RX1 */ | 520 | fsl,ssi-dma-events = <29 28 27 26>; /* TX0 RX0 TX1 RX1 */ |
401 | status = "disabled"; | 521 | status = "disabled"; |
@@ -411,6 +531,7 @@ | |||
411 | compatible = "fsl,imx51-nand"; | 531 | compatible = "fsl,imx51-nand"; |
412 | reg = <0x83fdb000 0x1000 0xcfff0000 0x10000>; | 532 | reg = <0x83fdb000 0x1000 0xcfff0000 0x10000>; |
413 | interrupts = <8>; | 533 | interrupts = <8>; |
534 | clocks = <&clks 60>; | ||
414 | status = "disabled"; | 535 | status = "disabled"; |
415 | }; | 536 | }; |
416 | 537 | ||
@@ -418,6 +539,7 @@ | |||
418 | compatible = "fsl,imx51-ssi", "fsl,imx21-ssi"; | 539 | compatible = "fsl,imx51-ssi", "fsl,imx21-ssi"; |
419 | reg = <0x83fe8000 0x4000>; | 540 | reg = <0x83fe8000 0x4000>; |
420 | interrupts = <96>; | 541 | interrupts = <96>; |
542 | clocks = <&clks 50>; | ||
421 | fsl,fifo-depth = <15>; | 543 | fsl,fifo-depth = <15>; |
422 | fsl,ssi-dma-events = <47 46 37 35>; /* TX0 RX0 TX1 RX1 */ | 544 | fsl,ssi-dma-events = <47 46 37 35>; /* TX0 RX0 TX1 RX1 */ |
423 | status = "disabled"; | 545 | status = "disabled"; |
@@ -427,6 +549,8 @@ | |||
427 | compatible = "fsl,imx51-fec", "fsl,imx27-fec"; | 549 | compatible = "fsl,imx51-fec", "fsl,imx27-fec"; |
428 | reg = <0x83fec000 0x4000>; | 550 | reg = <0x83fec000 0x4000>; |
429 | interrupts = <87>; | 551 | interrupts = <87>; |
552 | clocks = <&clks 42>, <&clks 42>, <&clks 42>; | ||
553 | clock-names = "ipg", "ahb", "ptp"; | ||
430 | status = "disabled"; | 554 | status = "disabled"; |
431 | }; | 555 | }; |
432 | }; | 556 | }; |
diff --git a/arch/arm/boot/dts/imx53.dtsi b/arch/arm/boot/dts/imx53.dtsi index caf09ff73f10..da9a047ce4cf 100644 --- a/arch/arm/boot/dts/imx53.dtsi +++ b/arch/arm/boot/dts/imx53.dtsi | |||
@@ -67,6 +67,13 @@ | |||
67 | interrupt-parent = <&tzic>; | 67 | interrupt-parent = <&tzic>; |
68 | ranges; | 68 | ranges; |
69 | 69 | ||
70 | ipu: ipu@18000000 { | ||
71 | #crtc-cells = <1>; | ||
72 | compatible = "fsl,imx53-ipu"; | ||
73 | reg = <0x18000000 0x080000000>; | ||
74 | interrupts = <11 10>; | ||
75 | }; | ||
76 | |||
70 | aips@50000000 { /* AIPS1 */ | 77 | aips@50000000 { /* AIPS1 */ |
71 | compatible = "fsl,aips-bus", "simple-bus"; | 78 | compatible = "fsl,aips-bus", "simple-bus"; |
72 | #address-cells = <1>; | 79 | #address-cells = <1>; |
@@ -85,6 +92,8 @@ | |||
85 | compatible = "fsl,imx53-esdhc"; | 92 | compatible = "fsl,imx53-esdhc"; |
86 | reg = <0x50004000 0x4000>; | 93 | reg = <0x50004000 0x4000>; |
87 | interrupts = <1>; | 94 | interrupts = <1>; |
95 | clocks = <&clks 44>, <&clks 0>, <&clks 71>; | ||
96 | clock-names = "ipg", "ahb", "per"; | ||
88 | status = "disabled"; | 97 | status = "disabled"; |
89 | }; | 98 | }; |
90 | 99 | ||
@@ -92,6 +101,8 @@ | |||
92 | compatible = "fsl,imx53-esdhc"; | 101 | compatible = "fsl,imx53-esdhc"; |
93 | reg = <0x50008000 0x4000>; | 102 | reg = <0x50008000 0x4000>; |
94 | interrupts = <2>; | 103 | interrupts = <2>; |
104 | clocks = <&clks 45>, <&clks 0>, <&clks 72>; | ||
105 | clock-names = "ipg", "ahb", "per"; | ||
95 | status = "disabled"; | 106 | status = "disabled"; |
96 | }; | 107 | }; |
97 | 108 | ||
@@ -99,6 +110,8 @@ | |||
99 | compatible = "fsl,imx53-uart", "fsl,imx21-uart"; | 110 | compatible = "fsl,imx53-uart", "fsl,imx21-uart"; |
100 | reg = <0x5000c000 0x4000>; | 111 | reg = <0x5000c000 0x4000>; |
101 | interrupts = <33>; | 112 | interrupts = <33>; |
113 | clocks = <&clks 32>, <&clks 33>; | ||
114 | clock-names = "ipg", "per"; | ||
102 | status = "disabled"; | 115 | status = "disabled"; |
103 | }; | 116 | }; |
104 | 117 | ||
@@ -108,6 +121,8 @@ | |||
108 | compatible = "fsl,imx53-ecspi", "fsl,imx51-ecspi"; | 121 | compatible = "fsl,imx53-ecspi", "fsl,imx51-ecspi"; |
109 | reg = <0x50010000 0x4000>; | 122 | reg = <0x50010000 0x4000>; |
110 | interrupts = <36>; | 123 | interrupts = <36>; |
124 | clocks = <&clks 51>, <&clks 52>; | ||
125 | clock-names = "ipg", "per"; | ||
111 | status = "disabled"; | 126 | status = "disabled"; |
112 | }; | 127 | }; |
113 | 128 | ||
@@ -115,6 +130,7 @@ | |||
115 | compatible = "fsl,imx53-ssi", "fsl,imx21-ssi"; | 130 | compatible = "fsl,imx53-ssi", "fsl,imx21-ssi"; |
116 | reg = <0x50014000 0x4000>; | 131 | reg = <0x50014000 0x4000>; |
117 | interrupts = <30>; | 132 | interrupts = <30>; |
133 | clocks = <&clks 49>; | ||
118 | fsl,fifo-depth = <15>; | 134 | fsl,fifo-depth = <15>; |
119 | fsl,ssi-dma-events = <25 24 23 22>; /* TX0 RX0 TX1 RX1 */ | 135 | fsl,ssi-dma-events = <25 24 23 22>; /* TX0 RX0 TX1 RX1 */ |
120 | status = "disabled"; | 136 | status = "disabled"; |
@@ -124,6 +140,8 @@ | |||
124 | compatible = "fsl,imx53-esdhc"; | 140 | compatible = "fsl,imx53-esdhc"; |
125 | reg = <0x50020000 0x4000>; | 141 | reg = <0x50020000 0x4000>; |
126 | interrupts = <3>; | 142 | interrupts = <3>; |
143 | clocks = <&clks 46>, <&clks 0>, <&clks 73>; | ||
144 | clock-names = "ipg", "ahb", "per"; | ||
127 | status = "disabled"; | 145 | status = "disabled"; |
128 | }; | 146 | }; |
129 | 147 | ||
@@ -131,6 +149,8 @@ | |||
131 | compatible = "fsl,imx53-esdhc"; | 149 | compatible = "fsl,imx53-esdhc"; |
132 | reg = <0x50024000 0x4000>; | 150 | reg = <0x50024000 0x4000>; |
133 | interrupts = <4>; | 151 | interrupts = <4>; |
152 | clocks = <&clks 47>, <&clks 0>, <&clks 74>; | ||
153 | clock-names = "ipg", "ahb", "per"; | ||
134 | status = "disabled"; | 154 | status = "disabled"; |
135 | }; | 155 | }; |
136 | }; | 156 | }; |
@@ -207,12 +227,14 @@ | |||
207 | compatible = "fsl,imx53-wdt", "fsl,imx21-wdt"; | 227 | compatible = "fsl,imx53-wdt", "fsl,imx21-wdt"; |
208 | reg = <0x53f98000 0x4000>; | 228 | reg = <0x53f98000 0x4000>; |
209 | interrupts = <58>; | 229 | interrupts = <58>; |
230 | clocks = <&clks 0>; | ||
210 | }; | 231 | }; |
211 | 232 | ||
212 | wdog@53f9c000 { /* WDOG2 */ | 233 | wdog@53f9c000 { /* WDOG2 */ |
213 | compatible = "fsl,imx53-wdt", "fsl,imx21-wdt"; | 234 | compatible = "fsl,imx53-wdt", "fsl,imx21-wdt"; |
214 | reg = <0x53f9c000 0x4000>; | 235 | reg = <0x53f9c000 0x4000>; |
215 | interrupts = <59>; | 236 | interrupts = <59>; |
237 | clocks = <&clks 0>; | ||
216 | status = "disabled"; | 238 | status = "disabled"; |
217 | }; | 239 | }; |
218 | 240 | ||
@@ -371,10 +393,30 @@ | |||
371 | }; | 393 | }; |
372 | }; | 394 | }; |
373 | 395 | ||
396 | pwm1: pwm@53fb4000 { | ||
397 | #pwm-cells = <2>; | ||
398 | compatible = "fsl,imx53-pwm", "fsl,imx27-pwm"; | ||
399 | reg = <0x53fb4000 0x4000>; | ||
400 | clocks = <&clks 37>, <&clks 38>; | ||
401 | clock-names = "ipg", "per"; | ||
402 | interrupts = <61>; | ||
403 | }; | ||
404 | |||
405 | pwm2: pwm@53fb8000 { | ||
406 | #pwm-cells = <2>; | ||
407 | compatible = "fsl,imx53-pwm", "fsl,imx27-pwm"; | ||
408 | reg = <0x53fb8000 0x4000>; | ||
409 | clocks = <&clks 39>, <&clks 40>; | ||
410 | clock-names = "ipg", "per"; | ||
411 | interrupts = <94>; | ||
412 | }; | ||
413 | |||
374 | uart1: serial@53fbc000 { | 414 | uart1: serial@53fbc000 { |
375 | compatible = "fsl,imx53-uart", "fsl,imx21-uart"; | 415 | compatible = "fsl,imx53-uart", "fsl,imx21-uart"; |
376 | reg = <0x53fbc000 0x4000>; | 416 | reg = <0x53fbc000 0x4000>; |
377 | interrupts = <31>; | 417 | interrupts = <31>; |
418 | clocks = <&clks 28>, <&clks 29>; | ||
419 | clock-names = "ipg", "per"; | ||
378 | status = "disabled"; | 420 | status = "disabled"; |
379 | }; | 421 | }; |
380 | 422 | ||
@@ -382,6 +424,8 @@ | |||
382 | compatible = "fsl,imx53-uart", "fsl,imx21-uart"; | 424 | compatible = "fsl,imx53-uart", "fsl,imx21-uart"; |
383 | reg = <0x53fc0000 0x4000>; | 425 | reg = <0x53fc0000 0x4000>; |
384 | interrupts = <32>; | 426 | interrupts = <32>; |
427 | clocks = <&clks 30>, <&clks 31>; | ||
428 | clock-names = "ipg", "per"; | ||
385 | status = "disabled"; | 429 | status = "disabled"; |
386 | }; | 430 | }; |
387 | 431 | ||
@@ -389,6 +433,8 @@ | |||
389 | compatible = "fsl,imx53-flexcan", "fsl,p1010-flexcan"; | 433 | compatible = "fsl,imx53-flexcan", "fsl,p1010-flexcan"; |
390 | reg = <0x53fc8000 0x4000>; | 434 | reg = <0x53fc8000 0x4000>; |
391 | interrupts = <82>; | 435 | interrupts = <82>; |
436 | clocks = <&clks 158>, <&clks 157>; | ||
437 | clock-names = "ipg", "per"; | ||
392 | status = "disabled"; | 438 | status = "disabled"; |
393 | }; | 439 | }; |
394 | 440 | ||
@@ -396,9 +442,18 @@ | |||
396 | compatible = "fsl,imx53-flexcan", "fsl,p1010-flexcan"; | 442 | compatible = "fsl,imx53-flexcan", "fsl,p1010-flexcan"; |
397 | reg = <0x53fcc000 0x4000>; | 443 | reg = <0x53fcc000 0x4000>; |
398 | interrupts = <83>; | 444 | interrupts = <83>; |
445 | clocks = <&clks 158>, <&clks 157>; | ||
446 | clock-names = "ipg", "per"; | ||
399 | status = "disabled"; | 447 | status = "disabled"; |
400 | }; | 448 | }; |
401 | 449 | ||
450 | clks: ccm@53fd4000{ | ||
451 | compatible = "fsl,imx53-ccm"; | ||
452 | reg = <0x53fd4000 0x4000>; | ||
453 | interrupts = <0 71 0x04 0 72 0x04>; | ||
454 | #clock-cells = <1>; | ||
455 | }; | ||
456 | |||
402 | gpio5: gpio@53fdc000 { | 457 | gpio5: gpio@53fdc000 { |
403 | compatible = "fsl,imx53-gpio", "fsl,imx35-gpio"; | 458 | compatible = "fsl,imx53-gpio", "fsl,imx35-gpio"; |
404 | reg = <0x53fdc000 0x4000>; | 459 | reg = <0x53fdc000 0x4000>; |
@@ -435,6 +490,7 @@ | |||
435 | compatible = "fsl,imx53-i2c", "fsl,imx21-i2c"; | 490 | compatible = "fsl,imx53-i2c", "fsl,imx21-i2c"; |
436 | reg = <0x53fec000 0x4000>; | 491 | reg = <0x53fec000 0x4000>; |
437 | interrupts = <64>; | 492 | interrupts = <64>; |
493 | clocks = <&clks 88>; | ||
438 | status = "disabled"; | 494 | status = "disabled"; |
439 | }; | 495 | }; |
440 | 496 | ||
@@ -442,6 +498,8 @@ | |||
442 | compatible = "fsl,imx53-uart", "fsl,imx21-uart"; | 498 | compatible = "fsl,imx53-uart", "fsl,imx21-uart"; |
443 | reg = <0x53ff0000 0x4000>; | 499 | reg = <0x53ff0000 0x4000>; |
444 | interrupts = <13>; | 500 | interrupts = <13>; |
501 | clocks = <&clks 65>, <&clks 66>; | ||
502 | clock-names = "ipg", "per"; | ||
445 | status = "disabled"; | 503 | status = "disabled"; |
446 | }; | 504 | }; |
447 | }; | 505 | }; |
@@ -457,6 +515,8 @@ | |||
457 | compatible = "fsl,imx53-uart", "fsl,imx21-uart"; | 515 | compatible = "fsl,imx53-uart", "fsl,imx21-uart"; |
458 | reg = <0x63f90000 0x4000>; | 516 | reg = <0x63f90000 0x4000>; |
459 | interrupts = <86>; | 517 | interrupts = <86>; |
518 | clocks = <&clks 67>, <&clks 68>; | ||
519 | clock-names = "ipg", "per"; | ||
460 | status = "disabled"; | 520 | status = "disabled"; |
461 | }; | 521 | }; |
462 | 522 | ||
@@ -466,6 +526,8 @@ | |||
466 | compatible = "fsl,imx53-ecspi", "fsl,imx51-ecspi"; | 526 | compatible = "fsl,imx53-ecspi", "fsl,imx51-ecspi"; |
467 | reg = <0x63fac000 0x4000>; | 527 | reg = <0x63fac000 0x4000>; |
468 | interrupts = <37>; | 528 | interrupts = <37>; |
529 | clocks = <&clks 53>, <&clks 54>; | ||
530 | clock-names = "ipg", "per"; | ||
469 | status = "disabled"; | 531 | status = "disabled"; |
470 | }; | 532 | }; |
471 | 533 | ||
@@ -473,6 +535,8 @@ | |||
473 | compatible = "fsl,imx53-sdma", "fsl,imx35-sdma"; | 535 | compatible = "fsl,imx53-sdma", "fsl,imx35-sdma"; |
474 | reg = <0x63fb0000 0x4000>; | 536 | reg = <0x63fb0000 0x4000>; |
475 | interrupts = <6>; | 537 | interrupts = <6>; |
538 | clocks = <&clks 56>, <&clks 56>; | ||
539 | clock-names = "ipg", "ahb"; | ||
476 | fsl,sdma-ram-script-name = "imx/sdma/sdma-imx53.bin"; | 540 | fsl,sdma-ram-script-name = "imx/sdma/sdma-imx53.bin"; |
477 | }; | 541 | }; |
478 | 542 | ||
@@ -482,6 +546,8 @@ | |||
482 | compatible = "fsl,imx53-cspi", "fsl,imx35-cspi"; | 546 | compatible = "fsl,imx53-cspi", "fsl,imx35-cspi"; |
483 | reg = <0x63fc0000 0x4000>; | 547 | reg = <0x63fc0000 0x4000>; |
484 | interrupts = <38>; | 548 | interrupts = <38>; |
549 | clocks = <&clks 55>, <&clks 0>; | ||
550 | clock-names = "ipg", "per"; | ||
485 | status = "disabled"; | 551 | status = "disabled"; |
486 | }; | 552 | }; |
487 | 553 | ||
@@ -491,6 +557,7 @@ | |||
491 | compatible = "fsl,imx53-i2c", "fsl,imx21-i2c"; | 557 | compatible = "fsl,imx53-i2c", "fsl,imx21-i2c"; |
492 | reg = <0x63fc4000 0x4000>; | 558 | reg = <0x63fc4000 0x4000>; |
493 | interrupts = <63>; | 559 | interrupts = <63>; |
560 | clocks = <&clks 35>; | ||
494 | status = "disabled"; | 561 | status = "disabled"; |
495 | }; | 562 | }; |
496 | 563 | ||
@@ -500,6 +567,7 @@ | |||
500 | compatible = "fsl,imx53-i2c", "fsl,imx21-i2c"; | 567 | compatible = "fsl,imx53-i2c", "fsl,imx21-i2c"; |
501 | reg = <0x63fc8000 0x4000>; | 568 | reg = <0x63fc8000 0x4000>; |
502 | interrupts = <62>; | 569 | interrupts = <62>; |
570 | clocks = <&clks 34>; | ||
503 | status = "disabled"; | 571 | status = "disabled"; |
504 | }; | 572 | }; |
505 | 573 | ||
@@ -507,6 +575,7 @@ | |||
507 | compatible = "fsl,imx53-ssi", "fsl,imx21-ssi"; | 575 | compatible = "fsl,imx53-ssi", "fsl,imx21-ssi"; |
508 | reg = <0x63fcc000 0x4000>; | 576 | reg = <0x63fcc000 0x4000>; |
509 | interrupts = <29>; | 577 | interrupts = <29>; |
578 | clocks = <&clks 48>; | ||
510 | fsl,fifo-depth = <15>; | 579 | fsl,fifo-depth = <15>; |
511 | fsl,ssi-dma-events = <29 28 27 26>; /* TX0 RX0 TX1 RX1 */ | 580 | fsl,ssi-dma-events = <29 28 27 26>; /* TX0 RX0 TX1 RX1 */ |
512 | status = "disabled"; | 581 | status = "disabled"; |
@@ -522,6 +591,7 @@ | |||
522 | compatible = "fsl,imx53-nand"; | 591 | compatible = "fsl,imx53-nand"; |
523 | reg = <0x63fdb000 0x1000 0xf7ff0000 0x10000>; | 592 | reg = <0x63fdb000 0x1000 0xf7ff0000 0x10000>; |
524 | interrupts = <8>; | 593 | interrupts = <8>; |
594 | clocks = <&clks 60>; | ||
525 | status = "disabled"; | 595 | status = "disabled"; |
526 | }; | 596 | }; |
527 | 597 | ||
@@ -529,6 +599,7 @@ | |||
529 | compatible = "fsl,imx53-ssi", "fsl,imx21-ssi"; | 599 | compatible = "fsl,imx53-ssi", "fsl,imx21-ssi"; |
530 | reg = <0x63fe8000 0x4000>; | 600 | reg = <0x63fe8000 0x4000>; |
531 | interrupts = <96>; | 601 | interrupts = <96>; |
602 | clocks = <&clks 50>; | ||
532 | fsl,fifo-depth = <15>; | 603 | fsl,fifo-depth = <15>; |
533 | fsl,ssi-dma-events = <47 46 45 44>; /* TX0 RX0 TX1 RX1 */ | 604 | fsl,ssi-dma-events = <47 46 45 44>; /* TX0 RX0 TX1 RX1 */ |
534 | status = "disabled"; | 605 | status = "disabled"; |
@@ -538,6 +609,8 @@ | |||
538 | compatible = "fsl,imx53-fec", "fsl,imx25-fec"; | 609 | compatible = "fsl,imx53-fec", "fsl,imx25-fec"; |
539 | reg = <0x63fec000 0x4000>; | 610 | reg = <0x63fec000 0x4000>; |
540 | interrupts = <87>; | 611 | interrupts = <87>; |
612 | clocks = <&clks 42>, <&clks 42>, <&clks 42>; | ||
613 | clock-names = "ipg", "ahb", "ptp"; | ||
541 | status = "disabled"; | 614 | status = "disabled"; |
542 | }; | 615 | }; |
543 | }; | 616 | }; |
diff --git a/arch/arm/boot/dts/imx6q.dtsi b/arch/arm/boot/dts/imx6q.dtsi index f604a44a5c66..d907d062e5dd 100644 --- a/arch/arm/boot/dts/imx6q.dtsi +++ b/arch/arm/boot/dts/imx6q.dtsi | |||
@@ -268,23 +268,39 @@ | |||
268 | }; | 268 | }; |
269 | 269 | ||
270 | pwm@02080000 { /* PWM1 */ | 270 | pwm@02080000 { /* PWM1 */ |
271 | #pwm-cells = <2>; | ||
272 | compatible = "fsl,imx6q-pwm", "fsl,imx27-pwm"; | ||
271 | reg = <0x02080000 0x4000>; | 273 | reg = <0x02080000 0x4000>; |
272 | interrupts = <0 83 0x04>; | 274 | interrupts = <0 83 0x04>; |
275 | clocks = <&clks 62>, <&clks 145>; | ||
276 | clock-names = "ipg", "per"; | ||
273 | }; | 277 | }; |
274 | 278 | ||
275 | pwm@02084000 { /* PWM2 */ | 279 | pwm@02084000 { /* PWM2 */ |
280 | #pwm-cells = <2>; | ||
281 | compatible = "fsl,imx6q-pwm", "fsl,imx27-pwm"; | ||
276 | reg = <0x02084000 0x4000>; | 282 | reg = <0x02084000 0x4000>; |
277 | interrupts = <0 84 0x04>; | 283 | interrupts = <0 84 0x04>; |
284 | clocks = <&clks 62>, <&clks 146>; | ||
285 | clock-names = "ipg", "per"; | ||
278 | }; | 286 | }; |
279 | 287 | ||
280 | pwm@02088000 { /* PWM3 */ | 288 | pwm@02088000 { /* PWM3 */ |
289 | #pwm-cells = <2>; | ||
290 | compatible = "fsl,imx6q-pwm", "fsl,imx27-pwm"; | ||
281 | reg = <0x02088000 0x4000>; | 291 | reg = <0x02088000 0x4000>; |
282 | interrupts = <0 85 0x04>; | 292 | interrupts = <0 85 0x04>; |
293 | clocks = <&clks 62>, <&clks 147>; | ||
294 | clock-names = "ipg", "per"; | ||
283 | }; | 295 | }; |
284 | 296 | ||
285 | pwm@0208c000 { /* PWM4 */ | 297 | pwm@0208c000 { /* PWM4 */ |
298 | #pwm-cells = <2>; | ||
299 | compatible = "fsl,imx6q-pwm", "fsl,imx27-pwm"; | ||
286 | reg = <0x0208c000 0x4000>; | 300 | reg = <0x0208c000 0x4000>; |
287 | interrupts = <0 86 0x04>; | 301 | interrupts = <0 86 0x04>; |
302 | clocks = <&clks 62>, <&clks 148>; | ||
303 | clock-names = "ipg", "per"; | ||
288 | }; | 304 | }; |
289 | 305 | ||
290 | flexcan@02090000 { /* CAN1 */ | 306 | flexcan@02090000 { /* CAN1 */ |
@@ -1001,5 +1017,23 @@ | |||
1001 | status = "disabled"; | 1017 | status = "disabled"; |
1002 | }; | 1018 | }; |
1003 | }; | 1019 | }; |
1020 | |||
1021 | ipu1: ipu@02400000 { | ||
1022 | #crtc-cells = <1>; | ||
1023 | compatible = "fsl,imx6q-ipu"; | ||
1024 | reg = <0x02400000 0x400000>; | ||
1025 | interrupts = <0 6 0x4 0 5 0x4>; | ||
1026 | clocks = <&clks 130>, <&clks 131>, <&clks 132>; | ||
1027 | clock-names = "bus", "di0", "di1"; | ||
1028 | }; | ||
1029 | |||
1030 | ipu2: ipu@02800000 { | ||
1031 | #crtc-cells = <1>; | ||
1032 | compatible = "fsl,imx6q-ipu"; | ||
1033 | reg = <0x02800000 0x400000>; | ||
1034 | interrupts = <0 8 0x4 0 7 0x4>; | ||
1035 | clocks = <&clks 133>, <&clks 134>, <&clks 137>; | ||
1036 | clock-names = "bus", "di0", "di1"; | ||
1037 | }; | ||
1004 | }; | 1038 | }; |
1005 | }; | 1039 | }; |
diff --git a/arch/arm/boot/dts/sh7377.dtsi b/arch/arm/boot/dts/sh7377.dtsi deleted file mode 100644 index 767ee0796daa..000000000000 --- a/arch/arm/boot/dts/sh7377.dtsi +++ /dev/null | |||
@@ -1,21 +0,0 @@ | |||
1 | /* | ||
2 | * Device Tree Source for the sh7377 SoC | ||
3 | * | ||
4 | * Copyright (C) 2012 Renesas Solutions Corp. | ||
5 | * | ||
6 | * This file is licensed under the terms of the GNU General Public License | ||
7 | * version 2. This program is licensed "as is" without any warranty of any | ||
8 | * kind, whether express or implied. | ||
9 | */ | ||
10 | |||
11 | /include/ "skeleton.dtsi" | ||
12 | |||
13 | / { | ||
14 | compatible = "renesas,sh7377"; | ||
15 | |||
16 | cpus { | ||
17 | cpu@0 { | ||
18 | compatible = "arm,cortex-a8"; | ||
19 | }; | ||
20 | }; | ||
21 | }; | ||
diff --git a/arch/arm/boot/dts/sun4i-cubieboard.dts b/arch/arm/boot/dts/sun4i-cubieboard.dts new file mode 100644 index 000000000000..f4ca126ad994 --- /dev/null +++ b/arch/arm/boot/dts/sun4i-cubieboard.dts | |||
@@ -0,0 +1,38 @@ | |||
1 | /* | ||
2 | * Copyright 2012 Stefan Roese | ||
3 | * Stefan Roese <sr@denx.de> | ||
4 | * | ||
5 | * The code contained herein is licensed under the GNU General Public | ||
6 | * License. You may obtain a copy of the GNU General Public License | ||
7 | * Version 2 or later at the following locations: | ||
8 | * | ||
9 | * http://www.opensource.org/licenses/gpl-license.html | ||
10 | * http://www.gnu.org/copyleft/gpl.html | ||
11 | */ | ||
12 | |||
13 | /dts-v1/; | ||
14 | /include/ "sun4i.dtsi" | ||
15 | |||
16 | / { | ||
17 | model = "Cubietech Cubieboard"; | ||
18 | compatible = "cubietech,cubieboard", "allwinner,sun4i"; | ||
19 | |||
20 | aliases { | ||
21 | serial0 = &uart0; | ||
22 | serial1 = &uart1; | ||
23 | }; | ||
24 | |||
25 | chosen { | ||
26 | bootargs = "earlyprintk console=ttyS0,115200"; | ||
27 | }; | ||
28 | |||
29 | soc { | ||
30 | uart0: uart@01c28000 { | ||
31 | status = "okay"; | ||
32 | }; | ||
33 | |||
34 | uart1: uart@01c28400 { | ||
35 | status = "okay"; | ||
36 | }; | ||
37 | }; | ||
38 | }; | ||
diff --git a/arch/arm/boot/dts/sun4i.dtsi b/arch/arm/boot/dts/sun4i.dtsi new file mode 100644 index 000000000000..e61fdd47bd01 --- /dev/null +++ b/arch/arm/boot/dts/sun4i.dtsi | |||
@@ -0,0 +1,19 @@ | |||
1 | /* | ||
2 | * Copyright 2012 Stefan Roese | ||
3 | * Stefan Roese <sr@denx.de> | ||
4 | * | ||
5 | * The code contained herein is licensed under the GNU General Public | ||
6 | * License. You may obtain a copy of the GNU General Public License | ||
7 | * Version 2 or later at the following locations: | ||
8 | * | ||
9 | * http://www.opensource.org/licenses/gpl-license.html | ||
10 | * http://www.gnu.org/copyleft/gpl.html | ||
11 | */ | ||
12 | |||
13 | /include/ "sunxi.dtsi" | ||
14 | |||
15 | / { | ||
16 | memory { | ||
17 | reg = <0x40000000 0x80000000>; | ||
18 | }; | ||
19 | }; | ||
diff --git a/arch/arm/boot/dts/sun5i-olinuxino.dts b/arch/arm/boot/dts/sun5i-olinuxino.dts new file mode 100644 index 000000000000..d6ff889a5d87 --- /dev/null +++ b/arch/arm/boot/dts/sun5i-olinuxino.dts | |||
@@ -0,0 +1,30 @@ | |||
1 | /* | ||
2 | * Copyright 2012 Maxime Ripard | ||
3 | * | ||
4 | * Maxime Ripard <maxime.ripard@free-electrons.com> | ||
5 | * | ||
6 | * The code contained herein is licensed under the GNU General Public | ||
7 | * License. You may obtain a copy of the GNU General Public License | ||
8 | * Version 2 or later at the following locations: | ||
9 | * | ||
10 | * http://www.opensource.org/licenses/gpl-license.html | ||
11 | * http://www.gnu.org/copyleft/gpl.html | ||
12 | */ | ||
13 | |||
14 | /dts-v1/; | ||
15 | /include/ "sun5i.dtsi" | ||
16 | |||
17 | / { | ||
18 | model = "Olimex A13-Olinuxino"; | ||
19 | compatible = "olimex,a13-olinuxino", "allwinner,sun5i"; | ||
20 | |||
21 | chosen { | ||
22 | bootargs = "earlyprintk console=ttyS0,115200"; | ||
23 | }; | ||
24 | |||
25 | soc { | ||
26 | uart1: uart@01c28400 { | ||
27 | status = "okay"; | ||
28 | }; | ||
29 | }; | ||
30 | }; | ||
diff --git a/arch/arm/boot/dts/sun5i.dtsi b/arch/arm/boot/dts/sun5i.dtsi new file mode 100644 index 000000000000..59a2d265a98e --- /dev/null +++ b/arch/arm/boot/dts/sun5i.dtsi | |||
@@ -0,0 +1,20 @@ | |||
1 | /* | ||
2 | * Copyright 2012 Maxime Ripard | ||
3 | * | ||
4 | * Maxime Ripard <maxime.ripard@free-electrons.com> | ||
5 | * | ||
6 | * The code contained herein is licensed under the GNU General Public | ||
7 | * License. You may obtain a copy of the GNU General Public License | ||
8 | * Version 2 or later at the following locations: | ||
9 | * | ||
10 | * http://www.opensource.org/licenses/gpl-license.html | ||
11 | * http://www.gnu.org/copyleft/gpl.html | ||
12 | */ | ||
13 | |||
14 | /include/ "sunxi.dtsi" | ||
15 | |||
16 | / { | ||
17 | memory { | ||
18 | reg = <0x40000000 0x20000000>; | ||
19 | }; | ||
20 | }; | ||
diff --git a/arch/arm/boot/dts/sunxi.dtsi b/arch/arm/boot/dts/sunxi.dtsi new file mode 100644 index 000000000000..8bbc2bfef221 --- /dev/null +++ b/arch/arm/boot/dts/sunxi.dtsi | |||
@@ -0,0 +1,80 @@ | |||
1 | /* | ||
2 | * Copyright 2012 Maxime Ripard | ||
3 | * | ||
4 | * Maxime Ripard <maxime.ripard@free-electrons.com> | ||
5 | * | ||
6 | * The code contained herein is licensed under the GNU General Public | ||
7 | * License. You may obtain a copy of the GNU General Public License | ||
8 | * Version 2 or later at the following locations: | ||
9 | * | ||
10 | * http://www.opensource.org/licenses/gpl-license.html | ||
11 | * http://www.gnu.org/copyleft/gpl.html | ||
12 | */ | ||
13 | |||
14 | /include/ "skeleton.dtsi" | ||
15 | |||
16 | / { | ||
17 | interrupt-parent = <&intc>; | ||
18 | |||
19 | cpus { | ||
20 | cpu@0 { | ||
21 | compatible = "arm,cortex-a8"; | ||
22 | }; | ||
23 | }; | ||
24 | |||
25 | clocks { | ||
26 | #address-cells = <1>; | ||
27 | #size-cells = <0>; | ||
28 | |||
29 | osc: oscillator { | ||
30 | #clock-cells = <0>; | ||
31 | compatible = "fixed-clock"; | ||
32 | clock-frequency = <24000000>; | ||
33 | }; | ||
34 | }; | ||
35 | |||
36 | soc { | ||
37 | compatible = "simple-bus"; | ||
38 | #address-cells = <1>; | ||
39 | #size-cells = <1>; | ||
40 | reg = <0x01c20000 0x300000>; | ||
41 | ranges; | ||
42 | |||
43 | timer@01c20c00 { | ||
44 | compatible = "allwinner,sunxi-timer"; | ||
45 | reg = <0x01c20c00 0x90>; | ||
46 | interrupts = <22>; | ||
47 | clocks = <&osc>; | ||
48 | }; | ||
49 | |||
50 | wdt: watchdog@01c20c90 { | ||
51 | compatible = "allwinner,sunxi-wdt"; | ||
52 | reg = <0x01c20c90 0x10>; | ||
53 | }; | ||
54 | |||
55 | intc: interrupt-controller@01c20400 { | ||
56 | compatible = "allwinner,sunxi-ic"; | ||
57 | reg = <0x01c20400 0x400>; | ||
58 | interrupt-controller; | ||
59 | #interrupt-cells = <1>; | ||
60 | }; | ||
61 | |||
62 | uart0: uart@01c28000 { | ||
63 | compatible = "ns8250"; | ||
64 | reg = <0x01c28000 0x400>; | ||
65 | interrupts = <1>; | ||
66 | reg-shift = <2>; | ||
67 | clock-frequency = <24000000>; | ||
68 | status = "disabled"; | ||
69 | }; | ||
70 | |||
71 | uart1: uart@01c28400 { | ||
72 | compatible = "ns8250"; | ||
73 | reg = <0x01c28400 0x400>; | ||
74 | interrupts = <2>; | ||
75 | reg-shift = <2>; | ||
76 | clock-frequency = <24000000>; | ||
77 | status = "disabled"; | ||
78 | }; | ||
79 | }; | ||
80 | }; | ||
diff --git a/arch/arm/boot/dts/tegra20.dtsi b/arch/arm/boot/dts/tegra20.dtsi index f3a09d0d45bc..f40cfbaa7c7e 100644 --- a/arch/arm/boot/dts/tegra20.dtsi +++ b/arch/arm/boot/dts/tegra20.dtsi | |||
@@ -4,6 +4,15 @@ | |||
4 | compatible = "nvidia,tegra20"; | 4 | compatible = "nvidia,tegra20"; |
5 | interrupt-parent = <&intc>; | 5 | interrupt-parent = <&intc>; |
6 | 6 | ||
7 | cache-controller@50043000 { | ||
8 | compatible = "arm,pl310-cache"; | ||
9 | reg = <0x50043000 0x1000>; | ||
10 | arm,data-latency = <5 5 2>; | ||
11 | arm,tag-latency = <4 4 2>; | ||
12 | cache-unified; | ||
13 | cache-level = <2>; | ||
14 | }; | ||
15 | |||
7 | intc: interrupt-controller { | 16 | intc: interrupt-controller { |
8 | compatible = "arm,cortex-a9-gic"; | 17 | compatible = "arm,cortex-a9-gic"; |
9 | reg = <0x50041000 0x1000 | 18 | reg = <0x50041000 0x1000 |
diff --git a/arch/arm/boot/dts/tegra30.dtsi b/arch/arm/boot/dts/tegra30.dtsi index df7f2270fc91..fed8dca1692d 100644 --- a/arch/arm/boot/dts/tegra30.dtsi +++ b/arch/arm/boot/dts/tegra30.dtsi | |||
@@ -4,6 +4,15 @@ | |||
4 | compatible = "nvidia,tegra30"; | 4 | compatible = "nvidia,tegra30"; |
5 | interrupt-parent = <&intc>; | 5 | interrupt-parent = <&intc>; |
6 | 6 | ||
7 | cache-controller@50043000 { | ||
8 | compatible = "arm,pl310-cache"; | ||
9 | reg = <0x50043000 0x1000>; | ||
10 | arm,data-latency = <6 6 2>; | ||
11 | arm,tag-latency = <5 5 2>; | ||
12 | cache-unified; | ||
13 | cache-level = <2>; | ||
14 | }; | ||
15 | |||
7 | intc: interrupt-controller { | 16 | intc: interrupt-controller { |
8 | compatible = "arm,cortex-a9-gic"; | 17 | compatible = "arm,cortex-a9-gic"; |
9 | reg = <0x50041000 0x1000 | 18 | reg = <0x50041000 0x1000 |
diff --git a/arch/arm/boot/dts/vexpress-v2m-rs1.dtsi b/arch/arm/boot/dts/vexpress-v2m-rs1.dtsi index d8a827bd2bf3..ac870fb3fa0d 100644 --- a/arch/arm/boot/dts/vexpress-v2m-rs1.dtsi +++ b/arch/arm/boot/dts/vexpress-v2m-rs1.dtsi | |||
@@ -17,17 +17,16 @@ | |||
17 | * CHANGES TO vexpress-v2m.dtsi! | 17 | * CHANGES TO vexpress-v2m.dtsi! |
18 | */ | 18 | */ |
19 | 19 | ||
20 | / { | ||
21 | aliases { | ||
22 | arm,v2m_timer = &v2m_timer01; | ||
23 | }; | ||
24 | |||
25 | motherboard { | 20 | motherboard { |
26 | compatible = "simple-bus"; | 21 | model = "V2M-P1"; |
22 | arm,hbi = <0x190>; | ||
23 | arm,vexpress,site = <0>; | ||
27 | arm,v2m-memory-map = "rs1"; | 24 | arm,v2m-memory-map = "rs1"; |
25 | compatible = "arm,vexpress,v2m-p1", "simple-bus"; | ||
28 | #address-cells = <2>; /* SMB chipselect number and offset */ | 26 | #address-cells = <2>; /* SMB chipselect number and offset */ |
29 | #size-cells = <1>; | 27 | #size-cells = <1>; |
30 | #interrupt-cells = <1>; | 28 | #interrupt-cells = <1>; |
29 | ranges; | ||
31 | 30 | ||
32 | flash@0,00000000 { | 31 | flash@0,00000000 { |
33 | compatible = "arm,vexpress-flash", "cfi-flash"; | 32 | compatible = "arm,vexpress-flash", "cfi-flash"; |
@@ -72,14 +71,20 @@ | |||
72 | #size-cells = <1>; | 71 | #size-cells = <1>; |
73 | ranges = <0 3 0 0x200000>; | 72 | ranges = <0 3 0 0x200000>; |
74 | 73 | ||
75 | sysreg@010000 { | 74 | v2m_sysreg: sysreg@010000 { |
76 | compatible = "arm,vexpress-sysreg"; | 75 | compatible = "arm,vexpress-sysreg"; |
77 | reg = <0x010000 0x1000>; | 76 | reg = <0x010000 0x1000>; |
77 | gpio-controller; | ||
78 | #gpio-cells = <2>; | ||
78 | }; | 79 | }; |
79 | 80 | ||
80 | sysctl@020000 { | 81 | v2m_sysctl: sysctl@020000 { |
81 | compatible = "arm,sp810", "arm,primecell"; | 82 | compatible = "arm,sp810", "arm,primecell"; |
82 | reg = <0x020000 0x1000>; | 83 | reg = <0x020000 0x1000>; |
84 | clocks = <&v2m_refclk32khz>, <&v2m_refclk1mhz>, <&smbclk>; | ||
85 | clock-names = "refclk", "timclk", "apb_pclk"; | ||
86 | #clock-cells = <1>; | ||
87 | clock-output-names = "timerclken0", "timerclken1", "timerclken2", "timerclken3"; | ||
83 | }; | 88 | }; |
84 | 89 | ||
85 | /* PCI-E I2C bus */ | 90 | /* PCI-E I2C bus */ |
@@ -100,66 +105,92 @@ | |||
100 | compatible = "arm,pl041", "arm,primecell"; | 105 | compatible = "arm,pl041", "arm,primecell"; |
101 | reg = <0x040000 0x1000>; | 106 | reg = <0x040000 0x1000>; |
102 | interrupts = <11>; | 107 | interrupts = <11>; |
108 | clocks = <&smbclk>; | ||
109 | clock-names = "apb_pclk"; | ||
103 | }; | 110 | }; |
104 | 111 | ||
105 | mmci@050000 { | 112 | mmci@050000 { |
106 | compatible = "arm,pl180", "arm,primecell"; | 113 | compatible = "arm,pl180", "arm,primecell"; |
107 | reg = <0x050000 0x1000>; | 114 | reg = <0x050000 0x1000>; |
108 | interrupts = <9 10>; | 115 | interrupts = <9 10>; |
116 | cd-gpios = <&v2m_sysreg 0 0>; | ||
117 | wp-gpios = <&v2m_sysreg 1 0>; | ||
118 | max-frequency = <12000000>; | ||
119 | vmmc-supply = <&v2m_fixed_3v3>; | ||
120 | clocks = <&v2m_clk24mhz>, <&smbclk>; | ||
121 | clock-names = "mclk", "apb_pclk"; | ||
109 | }; | 122 | }; |
110 | 123 | ||
111 | kmi@060000 { | 124 | kmi@060000 { |
112 | compatible = "arm,pl050", "arm,primecell"; | 125 | compatible = "arm,pl050", "arm,primecell"; |
113 | reg = <0x060000 0x1000>; | 126 | reg = <0x060000 0x1000>; |
114 | interrupts = <12>; | 127 | interrupts = <12>; |
128 | clocks = <&v2m_clk24mhz>, <&smbclk>; | ||
129 | clock-names = "KMIREFCLK", "apb_pclk"; | ||
115 | }; | 130 | }; |
116 | 131 | ||
117 | kmi@070000 { | 132 | kmi@070000 { |
118 | compatible = "arm,pl050", "arm,primecell"; | 133 | compatible = "arm,pl050", "arm,primecell"; |
119 | reg = <0x070000 0x1000>; | 134 | reg = <0x070000 0x1000>; |
120 | interrupts = <13>; | 135 | interrupts = <13>; |
136 | clocks = <&v2m_clk24mhz>, <&smbclk>; | ||
137 | clock-names = "KMIREFCLK", "apb_pclk"; | ||
121 | }; | 138 | }; |
122 | 139 | ||
123 | v2m_serial0: uart@090000 { | 140 | v2m_serial0: uart@090000 { |
124 | compatible = "arm,pl011", "arm,primecell"; | 141 | compatible = "arm,pl011", "arm,primecell"; |
125 | reg = <0x090000 0x1000>; | 142 | reg = <0x090000 0x1000>; |
126 | interrupts = <5>; | 143 | interrupts = <5>; |
144 | clocks = <&v2m_oscclk2>, <&smbclk>; | ||
145 | clock-names = "uartclk", "apb_pclk"; | ||
127 | }; | 146 | }; |
128 | 147 | ||
129 | v2m_serial1: uart@0a0000 { | 148 | v2m_serial1: uart@0a0000 { |
130 | compatible = "arm,pl011", "arm,primecell"; | 149 | compatible = "arm,pl011", "arm,primecell"; |
131 | reg = <0x0a0000 0x1000>; | 150 | reg = <0x0a0000 0x1000>; |
132 | interrupts = <6>; | 151 | interrupts = <6>; |
152 | clocks = <&v2m_oscclk2>, <&smbclk>; | ||
153 | clock-names = "uartclk", "apb_pclk"; | ||
133 | }; | 154 | }; |
134 | 155 | ||
135 | v2m_serial2: uart@0b0000 { | 156 | v2m_serial2: uart@0b0000 { |
136 | compatible = "arm,pl011", "arm,primecell"; | 157 | compatible = "arm,pl011", "arm,primecell"; |
137 | reg = <0x0b0000 0x1000>; | 158 | reg = <0x0b0000 0x1000>; |
138 | interrupts = <7>; | 159 | interrupts = <7>; |
160 | clocks = <&v2m_oscclk2>, <&smbclk>; | ||
161 | clock-names = "uartclk", "apb_pclk"; | ||
139 | }; | 162 | }; |
140 | 163 | ||
141 | v2m_serial3: uart@0c0000 { | 164 | v2m_serial3: uart@0c0000 { |
142 | compatible = "arm,pl011", "arm,primecell"; | 165 | compatible = "arm,pl011", "arm,primecell"; |
143 | reg = <0x0c0000 0x1000>; | 166 | reg = <0x0c0000 0x1000>; |
144 | interrupts = <8>; | 167 | interrupts = <8>; |
168 | clocks = <&v2m_oscclk2>, <&smbclk>; | ||
169 | clock-names = "uartclk", "apb_pclk"; | ||
145 | }; | 170 | }; |
146 | 171 | ||
147 | wdt@0f0000 { | 172 | wdt@0f0000 { |
148 | compatible = "arm,sp805", "arm,primecell"; | 173 | compatible = "arm,sp805", "arm,primecell"; |
149 | reg = <0x0f0000 0x1000>; | 174 | reg = <0x0f0000 0x1000>; |
150 | interrupts = <0>; | 175 | interrupts = <0>; |
176 | clocks = <&v2m_refclk32khz>, <&smbclk>; | ||
177 | clock-names = "wdogclk", "apb_pclk"; | ||
151 | }; | 178 | }; |
152 | 179 | ||
153 | v2m_timer01: timer@110000 { | 180 | v2m_timer01: timer@110000 { |
154 | compatible = "arm,sp804", "arm,primecell"; | 181 | compatible = "arm,sp804", "arm,primecell"; |
155 | reg = <0x110000 0x1000>; | 182 | reg = <0x110000 0x1000>; |
156 | interrupts = <2>; | 183 | interrupts = <2>; |
184 | clocks = <&v2m_sysctl 0>, <&v2m_sysctl 1>, <&smbclk>; | ||
185 | clock-names = "timclken1", "timclken2", "apb_pclk"; | ||
157 | }; | 186 | }; |
158 | 187 | ||
159 | v2m_timer23: timer@120000 { | 188 | v2m_timer23: timer@120000 { |
160 | compatible = "arm,sp804", "arm,primecell"; | 189 | compatible = "arm,sp804", "arm,primecell"; |
161 | reg = <0x120000 0x1000>; | 190 | reg = <0x120000 0x1000>; |
162 | interrupts = <3>; | 191 | interrupts = <3>; |
192 | clocks = <&v2m_sysctl 2>, <&v2m_sysctl 3>, <&smbclk>; | ||
193 | clock-names = "timclken1", "timclken2", "apb_pclk"; | ||
163 | }; | 194 | }; |
164 | 195 | ||
165 | /* DVI I2C bus */ | 196 | /* DVI I2C bus */ |
@@ -185,6 +216,8 @@ | |||
185 | compatible = "arm,pl031", "arm,primecell"; | 216 | compatible = "arm,pl031", "arm,primecell"; |
186 | reg = <0x170000 0x1000>; | 217 | reg = <0x170000 0x1000>; |
187 | interrupts = <4>; | 218 | interrupts = <4>; |
219 | clocks = <&smbclk>; | ||
220 | clock-names = "apb_pclk"; | ||
188 | }; | 221 | }; |
189 | 222 | ||
190 | compact-flash@1a0000 { | 223 | compact-flash@1a0000 { |
@@ -198,6 +231,8 @@ | |||
198 | compatible = "arm,pl111", "arm,primecell"; | 231 | compatible = "arm,pl111", "arm,primecell"; |
199 | reg = <0x1f0000 0x1000>; | 232 | reg = <0x1f0000 0x1000>; |
200 | interrupts = <14>; | 233 | interrupts = <14>; |
234 | clocks = <&v2m_oscclk1>, <&smbclk>; | ||
235 | clock-names = "clcdclk", "apb_pclk"; | ||
201 | }; | 236 | }; |
202 | }; | 237 | }; |
203 | 238 | ||
@@ -208,5 +243,98 @@ | |||
208 | regulator-max-microvolt = <3300000>; | 243 | regulator-max-microvolt = <3300000>; |
209 | regulator-always-on; | 244 | regulator-always-on; |
210 | }; | 245 | }; |
246 | |||
247 | v2m_clk24mhz: clk24mhz { | ||
248 | compatible = "fixed-clock"; | ||
249 | #clock-cells = <0>; | ||
250 | clock-frequency = <24000000>; | ||
251 | clock-output-names = "v2m:clk24mhz"; | ||
252 | }; | ||
253 | |||
254 | v2m_refclk1mhz: refclk1mhz { | ||
255 | compatible = "fixed-clock"; | ||
256 | #clock-cells = <0>; | ||
257 | clock-frequency = <1000000>; | ||
258 | clock-output-names = "v2m:refclk1mhz"; | ||
259 | }; | ||
260 | |||
261 | v2m_refclk32khz: refclk32khz { | ||
262 | compatible = "fixed-clock"; | ||
263 | #clock-cells = <0>; | ||
264 | clock-frequency = <32768>; | ||
265 | clock-output-names = "v2m:refclk32khz"; | ||
266 | }; | ||
267 | |||
268 | mcc { | ||
269 | compatible = "arm,vexpress,config-bus"; | ||
270 | arm,vexpress,config-bridge = <&v2m_sysreg>; | ||
271 | |||
272 | osc@0 { | ||
273 | /* MCC static memory clock */ | ||
274 | compatible = "arm,vexpress-osc"; | ||
275 | arm,vexpress-sysreg,func = <1 0>; | ||
276 | freq-range = <25000000 60000000>; | ||
277 | #clock-cells = <0>; | ||
278 | clock-output-names = "v2m:oscclk0"; | ||
279 | }; | ||
280 | |||
281 | v2m_oscclk1: osc@1 { | ||
282 | /* CLCD clock */ | ||
283 | compatible = "arm,vexpress-osc"; | ||
284 | arm,vexpress-sysreg,func = <1 1>; | ||
285 | freq-range = <23750000 63500000>; | ||
286 | #clock-cells = <0>; | ||
287 | clock-output-names = "v2m:oscclk1"; | ||
288 | }; | ||
289 | |||
290 | v2m_oscclk2: osc@2 { | ||
291 | /* IO FPGA peripheral clock */ | ||
292 | compatible = "arm,vexpress-osc"; | ||
293 | arm,vexpress-sysreg,func = <1 2>; | ||
294 | freq-range = <24000000 24000000>; | ||
295 | #clock-cells = <0>; | ||
296 | clock-output-names = "v2m:oscclk2"; | ||
297 | }; | ||
298 | |||
299 | volt@0 { | ||
300 | /* Logic level voltage */ | ||
301 | compatible = "arm,vexpress-volt"; | ||
302 | arm,vexpress-sysreg,func = <2 0>; | ||
303 | regulator-name = "VIO"; | ||
304 | regulator-always-on; | ||
305 | label = "VIO"; | ||
306 | }; | ||
307 | |||
308 | temp@0 { | ||
309 | /* MCC internal operating temperature */ | ||
310 | compatible = "arm,vexpress-temp"; | ||
311 | arm,vexpress-sysreg,func = <4 0>; | ||
312 | label = "MCC"; | ||
313 | }; | ||
314 | |||
315 | reset@0 { | ||
316 | compatible = "arm,vexpress-reset"; | ||
317 | arm,vexpress-sysreg,func = <5 0>; | ||
318 | }; | ||
319 | |||
320 | muxfpga@0 { | ||
321 | compatible = "arm,vexpress-muxfpga"; | ||
322 | arm,vexpress-sysreg,func = <7 0>; | ||
323 | }; | ||
324 | |||
325 | shutdown@0 { | ||
326 | compatible = "arm,vexpress-shutdown"; | ||
327 | arm,vexpress-sysreg,func = <8 0>; | ||
328 | }; | ||
329 | |||
330 | reboot@0 { | ||
331 | compatible = "arm,vexpress-reboot"; | ||
332 | arm,vexpress-sysreg,func = <9 0>; | ||
333 | }; | ||
334 | |||
335 | dvimode@0 { | ||
336 | compatible = "arm,vexpress-dvimode"; | ||
337 | arm,vexpress-sysreg,func = <11 0>; | ||
338 | }; | ||
339 | }; | ||
211 | }; | 340 | }; |
212 | }; | ||
diff --git a/arch/arm/boot/dts/vexpress-v2m.dtsi b/arch/arm/boot/dts/vexpress-v2m.dtsi index dba53fd026bb..f1420368355b 100644 --- a/arch/arm/boot/dts/vexpress-v2m.dtsi +++ b/arch/arm/boot/dts/vexpress-v2m.dtsi | |||
@@ -17,16 +17,15 @@ | |||
17 | * CHANGES TO vexpress-v2m-rs1.dtsi! | 17 | * CHANGES TO vexpress-v2m-rs1.dtsi! |
18 | */ | 18 | */ |
19 | 19 | ||
20 | / { | ||
21 | aliases { | ||
22 | arm,v2m_timer = &v2m_timer01; | ||
23 | }; | ||
24 | |||
25 | motherboard { | 20 | motherboard { |
26 | compatible = "simple-bus"; | 21 | model = "V2M-P1"; |
22 | arm,hbi = <0x190>; | ||
23 | arm,vexpress,site = <0>; | ||
24 | compatible = "arm,vexpress,v2m-p1", "simple-bus"; | ||
27 | #address-cells = <2>; /* SMB chipselect number and offset */ | 25 | #address-cells = <2>; /* SMB chipselect number and offset */ |
28 | #size-cells = <1>; | 26 | #size-cells = <1>; |
29 | #interrupt-cells = <1>; | 27 | #interrupt-cells = <1>; |
28 | ranges; | ||
30 | 29 | ||
31 | flash@0,00000000 { | 30 | flash@0,00000000 { |
32 | compatible = "arm,vexpress-flash", "cfi-flash"; | 31 | compatible = "arm,vexpress-flash", "cfi-flash"; |
@@ -71,14 +70,20 @@ | |||
71 | #size-cells = <1>; | 70 | #size-cells = <1>; |
72 | ranges = <0 7 0 0x20000>; | 71 | ranges = <0 7 0 0x20000>; |
73 | 72 | ||
74 | sysreg@00000 { | 73 | v2m_sysreg: sysreg@00000 { |
75 | compatible = "arm,vexpress-sysreg"; | 74 | compatible = "arm,vexpress-sysreg"; |
76 | reg = <0x00000 0x1000>; | 75 | reg = <0x00000 0x1000>; |
76 | gpio-controller; | ||
77 | #gpio-cells = <2>; | ||
77 | }; | 78 | }; |
78 | 79 | ||
79 | sysctl@01000 { | 80 | v2m_sysctl: sysctl@01000 { |
80 | compatible = "arm,sp810", "arm,primecell"; | 81 | compatible = "arm,sp810", "arm,primecell"; |
81 | reg = <0x01000 0x1000>; | 82 | reg = <0x01000 0x1000>; |
83 | clocks = <&v2m_refclk32khz>, <&v2m_refclk1mhz>, <&smbclk>; | ||
84 | clock-names = "refclk", "timclk", "apb_pclk"; | ||
85 | #clock-cells = <1>; | ||
86 | clock-output-names = "timerclken0", "timerclken1", "timerclken2", "timerclken3"; | ||
82 | }; | 87 | }; |
83 | 88 | ||
84 | /* PCI-E I2C bus */ | 89 | /* PCI-E I2C bus */ |
@@ -99,66 +104,92 @@ | |||
99 | compatible = "arm,pl041", "arm,primecell"; | 104 | compatible = "arm,pl041", "arm,primecell"; |
100 | reg = <0x04000 0x1000>; | 105 | reg = <0x04000 0x1000>; |
101 | interrupts = <11>; | 106 | interrupts = <11>; |
107 | clocks = <&smbclk>; | ||
108 | clock-names = "apb_pclk"; | ||
102 | }; | 109 | }; |
103 | 110 | ||
104 | mmci@05000 { | 111 | mmci@05000 { |
105 | compatible = "arm,pl180", "arm,primecell"; | 112 | compatible = "arm,pl180", "arm,primecell"; |
106 | reg = <0x05000 0x1000>; | 113 | reg = <0x05000 0x1000>; |
107 | interrupts = <9 10>; | 114 | interrupts = <9 10>; |
115 | cd-gpios = <&v2m_sysreg 0 0>; | ||
116 | wp-gpios = <&v2m_sysreg 1 0>; | ||
117 | max-frequency = <12000000>; | ||
118 | vmmc-supply = <&v2m_fixed_3v3>; | ||
119 | clocks = <&v2m_clk24mhz>, <&smbclk>; | ||
120 | clock-names = "mclk", "apb_pclk"; | ||
108 | }; | 121 | }; |
109 | 122 | ||
110 | kmi@06000 { | 123 | kmi@06000 { |
111 | compatible = "arm,pl050", "arm,primecell"; | 124 | compatible = "arm,pl050", "arm,primecell"; |
112 | reg = <0x06000 0x1000>; | 125 | reg = <0x06000 0x1000>; |
113 | interrupts = <12>; | 126 | interrupts = <12>; |
127 | clocks = <&v2m_clk24mhz>, <&smbclk>; | ||
128 | clock-names = "KMIREFCLK", "apb_pclk"; | ||
114 | }; | 129 | }; |
115 | 130 | ||
116 | kmi@07000 { | 131 | kmi@07000 { |
117 | compatible = "arm,pl050", "arm,primecell"; | 132 | compatible = "arm,pl050", "arm,primecell"; |
118 | reg = <0x07000 0x1000>; | 133 | reg = <0x07000 0x1000>; |
119 | interrupts = <13>; | 134 | interrupts = <13>; |
135 | clocks = <&v2m_clk24mhz>, <&smbclk>; | ||
136 | clock-names = "KMIREFCLK", "apb_pclk"; | ||
120 | }; | 137 | }; |
121 | 138 | ||
122 | v2m_serial0: uart@09000 { | 139 | v2m_serial0: uart@09000 { |
123 | compatible = "arm,pl011", "arm,primecell"; | 140 | compatible = "arm,pl011", "arm,primecell"; |
124 | reg = <0x09000 0x1000>; | 141 | reg = <0x09000 0x1000>; |
125 | interrupts = <5>; | 142 | interrupts = <5>; |
143 | clocks = <&v2m_oscclk2>, <&smbclk>; | ||
144 | clock-names = "uartclk", "apb_pclk"; | ||
126 | }; | 145 | }; |
127 | 146 | ||
128 | v2m_serial1: uart@0a000 { | 147 | v2m_serial1: uart@0a000 { |
129 | compatible = "arm,pl011", "arm,primecell"; | 148 | compatible = "arm,pl011", "arm,primecell"; |
130 | reg = <0x0a000 0x1000>; | 149 | reg = <0x0a000 0x1000>; |
131 | interrupts = <6>; | 150 | interrupts = <6>; |
151 | clocks = <&v2m_oscclk2>, <&smbclk>; | ||
152 | clock-names = "uartclk", "apb_pclk"; | ||
132 | }; | 153 | }; |
133 | 154 | ||
134 | v2m_serial2: uart@0b000 { | 155 | v2m_serial2: uart@0b000 { |
135 | compatible = "arm,pl011", "arm,primecell"; | 156 | compatible = "arm,pl011", "arm,primecell"; |
136 | reg = <0x0b000 0x1000>; | 157 | reg = <0x0b000 0x1000>; |
137 | interrupts = <7>; | 158 | interrupts = <7>; |
159 | clocks = <&v2m_oscclk2>, <&smbclk>; | ||
160 | clock-names = "uartclk", "apb_pclk"; | ||
138 | }; | 161 | }; |
139 | 162 | ||
140 | v2m_serial3: uart@0c000 { | 163 | v2m_serial3: uart@0c000 { |
141 | compatible = "arm,pl011", "arm,primecell"; | 164 | compatible = "arm,pl011", "arm,primecell"; |
142 | reg = <0x0c000 0x1000>; | 165 | reg = <0x0c000 0x1000>; |
143 | interrupts = <8>; | 166 | interrupts = <8>; |
167 | clocks = <&v2m_oscclk2>, <&smbclk>; | ||
168 | clock-names = "uartclk", "apb_pclk"; | ||
144 | }; | 169 | }; |
145 | 170 | ||
146 | wdt@0f000 { | 171 | wdt@0f000 { |
147 | compatible = "arm,sp805", "arm,primecell"; | 172 | compatible = "arm,sp805", "arm,primecell"; |
148 | reg = <0x0f000 0x1000>; | 173 | reg = <0x0f000 0x1000>; |
149 | interrupts = <0>; | 174 | interrupts = <0>; |
175 | clocks = <&v2m_refclk32khz>, <&smbclk>; | ||
176 | clock-names = "wdogclk", "apb_pclk"; | ||
150 | }; | 177 | }; |
151 | 178 | ||
152 | v2m_timer01: timer@11000 { | 179 | v2m_timer01: timer@11000 { |
153 | compatible = "arm,sp804", "arm,primecell"; | 180 | compatible = "arm,sp804", "arm,primecell"; |
154 | reg = <0x11000 0x1000>; | 181 | reg = <0x11000 0x1000>; |
155 | interrupts = <2>; | 182 | interrupts = <2>; |
183 | clocks = <&v2m_sysctl 0>, <&v2m_sysctl 1>, <&smbclk>; | ||
184 | clock-names = "timclken1", "timclken2", "apb_pclk"; | ||
156 | }; | 185 | }; |
157 | 186 | ||
158 | v2m_timer23: timer@12000 { | 187 | v2m_timer23: timer@12000 { |
159 | compatible = "arm,sp804", "arm,primecell"; | 188 | compatible = "arm,sp804", "arm,primecell"; |
160 | reg = <0x12000 0x1000>; | 189 | reg = <0x12000 0x1000>; |
161 | interrupts = <3>; | 190 | interrupts = <3>; |
191 | clocks = <&v2m_sysctl 2>, <&v2m_sysctl 3>, <&smbclk>; | ||
192 | clock-names = "timclken1", "timclken2", "apb_pclk"; | ||
162 | }; | 193 | }; |
163 | 194 | ||
164 | /* DVI I2C bus */ | 195 | /* DVI I2C bus */ |
@@ -184,6 +215,8 @@ | |||
184 | compatible = "arm,pl031", "arm,primecell"; | 215 | compatible = "arm,pl031", "arm,primecell"; |
185 | reg = <0x17000 0x1000>; | 216 | reg = <0x17000 0x1000>; |
186 | interrupts = <4>; | 217 | interrupts = <4>; |
218 | clocks = <&smbclk>; | ||
219 | clock-names = "apb_pclk"; | ||
187 | }; | 220 | }; |
188 | 221 | ||
189 | compact-flash@1a000 { | 222 | compact-flash@1a000 { |
@@ -197,6 +230,8 @@ | |||
197 | compatible = "arm,pl111", "arm,primecell"; | 230 | compatible = "arm,pl111", "arm,primecell"; |
198 | reg = <0x1f000 0x1000>; | 231 | reg = <0x1f000 0x1000>; |
199 | interrupts = <14>; | 232 | interrupts = <14>; |
233 | clocks = <&v2m_oscclk1>, <&smbclk>; | ||
234 | clock-names = "clcdclk", "apb_pclk"; | ||
200 | }; | 235 | }; |
201 | }; | 236 | }; |
202 | 237 | ||
@@ -207,5 +242,98 @@ | |||
207 | regulator-max-microvolt = <3300000>; | 242 | regulator-max-microvolt = <3300000>; |
208 | regulator-always-on; | 243 | regulator-always-on; |
209 | }; | 244 | }; |
245 | |||
246 | v2m_clk24mhz: clk24mhz { | ||
247 | compatible = "fixed-clock"; | ||
248 | #clock-cells = <0>; | ||
249 | clock-frequency = <24000000>; | ||
250 | clock-output-names = "v2m:clk24mhz"; | ||
251 | }; | ||
252 | |||
253 | v2m_refclk1mhz: refclk1mhz { | ||
254 | compatible = "fixed-clock"; | ||
255 | #clock-cells = <0>; | ||
256 | clock-frequency = <1000000>; | ||
257 | clock-output-names = "v2m:refclk1mhz"; | ||
258 | }; | ||
259 | |||
260 | v2m_refclk32khz: refclk32khz { | ||
261 | compatible = "fixed-clock"; | ||
262 | #clock-cells = <0>; | ||
263 | clock-frequency = <32768>; | ||
264 | clock-output-names = "v2m:refclk32khz"; | ||
265 | }; | ||
266 | |||
267 | mcc { | ||
268 | compatible = "arm,vexpress,config-bus"; | ||
269 | arm,vexpress,config-bridge = <&v2m_sysreg>; | ||
270 | |||
271 | osc@0 { | ||
272 | /* MCC static memory clock */ | ||
273 | compatible = "arm,vexpress-osc"; | ||
274 | arm,vexpress-sysreg,func = <1 0>; | ||
275 | freq-range = <25000000 60000000>; | ||
276 | #clock-cells = <0>; | ||
277 | clock-output-names = "v2m:oscclk0"; | ||
278 | }; | ||
279 | |||
280 | v2m_oscclk1: osc@1 { | ||
281 | /* CLCD clock */ | ||
282 | compatible = "arm,vexpress-osc"; | ||
283 | arm,vexpress-sysreg,func = <1 1>; | ||
284 | freq-range = <23750000 63500000>; | ||
285 | #clock-cells = <0>; | ||
286 | clock-output-names = "v2m:oscclk1"; | ||
287 | }; | ||
288 | |||
289 | v2m_oscclk2: osc@2 { | ||
290 | /* IO FPGA peripheral clock */ | ||
291 | compatible = "arm,vexpress-osc"; | ||
292 | arm,vexpress-sysreg,func = <1 2>; | ||
293 | freq-range = <24000000 24000000>; | ||
294 | #clock-cells = <0>; | ||
295 | clock-output-names = "v2m:oscclk2"; | ||
296 | }; | ||
297 | |||
298 | volt@0 { | ||
299 | /* Logic level voltage */ | ||
300 | compatible = "arm,vexpress-volt"; | ||
301 | arm,vexpress-sysreg,func = <2 0>; | ||
302 | regulator-name = "VIO"; | ||
303 | regulator-always-on; | ||
304 | label = "VIO"; | ||
305 | }; | ||
306 | |||
307 | temp@0 { | ||
308 | /* MCC internal operating temperature */ | ||
309 | compatible = "arm,vexpress-temp"; | ||
310 | arm,vexpress-sysreg,func = <4 0>; | ||
311 | label = "MCC"; | ||
312 | }; | ||
313 | |||
314 | reset@0 { | ||
315 | compatible = "arm,vexpress-reset"; | ||
316 | arm,vexpress-sysreg,func = <5 0>; | ||
317 | }; | ||
318 | |||
319 | muxfpga@0 { | ||
320 | compatible = "arm,vexpress-muxfpga"; | ||
321 | arm,vexpress-sysreg,func = <7 0>; | ||
322 | }; | ||
323 | |||
324 | shutdown@0 { | ||
325 | compatible = "arm,vexpress-shutdown"; | ||
326 | arm,vexpress-sysreg,func = <8 0>; | ||
327 | }; | ||
328 | |||
329 | reboot@0 { | ||
330 | compatible = "arm,vexpress-reboot"; | ||
331 | arm,vexpress-sysreg,func = <9 0>; | ||
332 | }; | ||
333 | |||
334 | dvimode@0 { | ||
335 | compatible = "arm,vexpress-dvimode"; | ||
336 | arm,vexpress-sysreg,func = <11 0>; | ||
337 | }; | ||
338 | }; | ||
210 | }; | 339 | }; |
211 | }; | ||
diff --git a/arch/arm/boot/dts/vexpress-v2p-ca15-tc1.dts b/arch/arm/boot/dts/vexpress-v2p-ca15-tc1.dts index d12b34ca0568..a3d37ec2655d 100644 --- a/arch/arm/boot/dts/vexpress-v2p-ca15-tc1.dts +++ b/arch/arm/boot/dts/vexpress-v2p-ca15-tc1.dts | |||
@@ -12,6 +12,7 @@ | |||
12 | / { | 12 | / { |
13 | model = "V2P-CA15"; | 13 | model = "V2P-CA15"; |
14 | arm,hbi = <0x237>; | 14 | arm,hbi = <0x237>; |
15 | arm,vexpress,site = <0xf>; | ||
15 | compatible = "arm,vexpress,v2p-ca15,tc1", "arm,vexpress,v2p-ca15", "arm,vexpress"; | 16 | compatible = "arm,vexpress,v2p-ca15,tc1", "arm,vexpress,v2p-ca15", "arm,vexpress"; |
16 | interrupt-parent = <&gic>; | 17 | interrupt-parent = <&gic>; |
17 | #address-cells = <2>; | 18 | #address-cells = <2>; |
@@ -54,17 +55,24 @@ | |||
54 | compatible = "arm,hdlcd"; | 55 | compatible = "arm,hdlcd"; |
55 | reg = <0 0x2b000000 0 0x1000>; | 56 | reg = <0 0x2b000000 0 0x1000>; |
56 | interrupts = <0 85 4>; | 57 | interrupts = <0 85 4>; |
58 | clocks = <&oscclk5>; | ||
59 | clock-names = "pxlclk"; | ||
57 | }; | 60 | }; |
58 | 61 | ||
59 | memory-controller@2b0a0000 { | 62 | memory-controller@2b0a0000 { |
60 | compatible = "arm,pl341", "arm,primecell"; | 63 | compatible = "arm,pl341", "arm,primecell"; |
61 | reg = <0 0x2b0a0000 0 0x1000>; | 64 | reg = <0 0x2b0a0000 0 0x1000>; |
65 | clocks = <&oscclk7>; | ||
66 | clock-names = "apb_pclk"; | ||
62 | }; | 67 | }; |
63 | 68 | ||
64 | wdt@2b060000 { | 69 | wdt@2b060000 { |
65 | compatible = "arm,sp805", "arm,primecell"; | 70 | compatible = "arm,sp805", "arm,primecell"; |
71 | status = "disabled"; | ||
66 | reg = <0 0x2b060000 0 0x1000>; | 72 | reg = <0 0x2b060000 0 0x1000>; |
67 | interrupts = <98>; | 73 | interrupts = <98>; |
74 | clocks = <&oscclk7>; | ||
75 | clock-names = "apb_pclk"; | ||
68 | }; | 76 | }; |
69 | 77 | ||
70 | gic: interrupt-controller@2c001000 { | 78 | gic: interrupt-controller@2c001000 { |
@@ -84,6 +92,8 @@ | |||
84 | reg = <0 0x7ffd0000 0 0x1000>; | 92 | reg = <0 0x7ffd0000 0 0x1000>; |
85 | interrupts = <0 86 4>, | 93 | interrupts = <0 86 4>, |
86 | <0 87 4>; | 94 | <0 87 4>; |
95 | clocks = <&oscclk7>; | ||
96 | clock-names = "apb_pclk"; | ||
87 | }; | 97 | }; |
88 | 98 | ||
89 | dma@7ffb0000 { | 99 | dma@7ffb0000 { |
@@ -94,6 +104,8 @@ | |||
94 | <0 89 4>, | 104 | <0 89 4>, |
95 | <0 90 4>, | 105 | <0 90 4>, |
96 | <0 91 4>; | 106 | <0 91 4>; |
107 | clocks = <&oscclk7>; | ||
108 | clock-names = "apb_pclk"; | ||
97 | }; | 109 | }; |
98 | 110 | ||
99 | timer { | 111 | timer { |
@@ -110,7 +122,109 @@ | |||
110 | <0 69 4>; | 122 | <0 69 4>; |
111 | }; | 123 | }; |
112 | 124 | ||
113 | motherboard { | 125 | dcc { |
126 | compatible = "arm,vexpress,config-bus"; | ||
127 | arm,vexpress,config-bridge = <&v2m_sysreg>; | ||
128 | |||
129 | osc@0 { | ||
130 | /* CPU PLL reference clock */ | ||
131 | compatible = "arm,vexpress-osc"; | ||
132 | arm,vexpress-sysreg,func = <1 0>; | ||
133 | freq-range = <50000000 60000000>; | ||
134 | #clock-cells = <0>; | ||
135 | clock-output-names = "oscclk0"; | ||
136 | }; | ||
137 | |||
138 | osc@4 { | ||
139 | /* Multiplexed AXI master clock */ | ||
140 | compatible = "arm,vexpress-osc"; | ||
141 | arm,vexpress-sysreg,func = <1 4>; | ||
142 | freq-range = <20000000 40000000>; | ||
143 | #clock-cells = <0>; | ||
144 | clock-output-names = "oscclk4"; | ||
145 | }; | ||
146 | |||
147 | oscclk5: osc@5 { | ||
148 | /* HDLCD PLL reference clock */ | ||
149 | compatible = "arm,vexpress-osc"; | ||
150 | arm,vexpress-sysreg,func = <1 5>; | ||
151 | freq-range = <23750000 165000000>; | ||
152 | #clock-cells = <0>; | ||
153 | clock-output-names = "oscclk5"; | ||
154 | }; | ||
155 | |||
156 | smbclk: osc@6 { | ||
157 | /* SMB clock */ | ||
158 | compatible = "arm,vexpress-osc"; | ||
159 | arm,vexpress-sysreg,func = <1 6>; | ||
160 | freq-range = <20000000 50000000>; | ||
161 | #clock-cells = <0>; | ||
162 | clock-output-names = "oscclk6"; | ||
163 | }; | ||
164 | |||
165 | oscclk7: osc@7 { | ||
166 | /* SYS PLL reference clock */ | ||
167 | compatible = "arm,vexpress-osc"; | ||
168 | arm,vexpress-sysreg,func = <1 7>; | ||
169 | freq-range = <20000000 60000000>; | ||
170 | #clock-cells = <0>; | ||
171 | clock-output-names = "oscclk7"; | ||
172 | }; | ||
173 | |||
174 | osc@8 { | ||
175 | /* DDR2 PLL reference clock */ | ||
176 | compatible = "arm,vexpress-osc"; | ||
177 | arm,vexpress-sysreg,func = <1 8>; | ||
178 | freq-range = <40000000 40000000>; | ||
179 | #clock-cells = <0>; | ||
180 | clock-output-names = "oscclk8"; | ||
181 | }; | ||
182 | |||
183 | volt@0 { | ||
184 | /* CPU core voltage */ | ||
185 | compatible = "arm,vexpress-volt"; | ||
186 | arm,vexpress-sysreg,func = <2 0>; | ||
187 | regulator-name = "Cores"; | ||
188 | regulator-min-microvolt = <800000>; | ||
189 | regulator-max-microvolt = <1050000>; | ||
190 | regulator-always-on; | ||
191 | label = "Cores"; | ||
192 | }; | ||
193 | |||
194 | amp@0 { | ||
195 | /* Total current for the two cores */ | ||
196 | compatible = "arm,vexpress-amp"; | ||
197 | arm,vexpress-sysreg,func = <3 0>; | ||
198 | label = "Cores"; | ||
199 | }; | ||
200 | |||
201 | temp@0 { | ||
202 | /* DCC internal temperature */ | ||
203 | compatible = "arm,vexpress-temp"; | ||
204 | arm,vexpress-sysreg,func = <4 0>; | ||
205 | label = "DCC"; | ||
206 | }; | ||
207 | |||
208 | power@0 { | ||
209 | /* Total power */ | ||
210 | compatible = "arm,vexpress-power"; | ||
211 | arm,vexpress-sysreg,func = <12 0>; | ||
212 | label = "Cores"; | ||
213 | }; | ||
214 | |||
215 | energy@0 { | ||
216 | /* Total energy */ | ||
217 | compatible = "arm,vexpress-energy"; | ||
218 | arm,vexpress-sysreg,func = <13 0>; | ||
219 | label = "Cores"; | ||
220 | }; | ||
221 | }; | ||
222 | |||
223 | smb { | ||
224 | compatible = "simple-bus"; | ||
225 | |||
226 | #address-cells = <2>; | ||
227 | #size-cells = <1>; | ||
114 | ranges = <0 0 0 0x08000000 0x04000000>, | 228 | ranges = <0 0 0 0x08000000 0x04000000>, |
115 | <1 0 0 0x14000000 0x04000000>, | 229 | <1 0 0 0x14000000 0x04000000>, |
116 | <2 0 0 0x18000000 0x04000000>, | 230 | <2 0 0 0x18000000 0x04000000>, |
@@ -118,6 +232,7 @@ | |||
118 | <4 0 0 0x0c000000 0x04000000>, | 232 | <4 0 0 0x0c000000 0x04000000>, |
119 | <5 0 0 0x10000000 0x04000000>; | 233 | <5 0 0 0x10000000 0x04000000>; |
120 | 234 | ||
235 | #interrupt-cells = <1>; | ||
121 | interrupt-map-mask = <0 0 63>; | 236 | interrupt-map-mask = <0 0 63>; |
122 | interrupt-map = <0 0 0 &gic 0 0 4>, | 237 | interrupt-map = <0 0 0 &gic 0 0 4>, |
123 | <0 0 1 &gic 0 1 4>, | 238 | <0 0 1 &gic 0 1 4>, |
@@ -162,7 +277,7 @@ | |||
162 | <0 0 40 &gic 0 40 4>, | 277 | <0 0 40 &gic 0 40 4>, |
163 | <0 0 41 &gic 0 41 4>, | 278 | <0 0 41 &gic 0 41 4>, |
164 | <0 0 42 &gic 0 42 4>; | 279 | <0 0 42 &gic 0 42 4>; |
280 | |||
281 | /include/ "vexpress-v2m-rs1.dtsi" | ||
165 | }; | 282 | }; |
166 | }; | 283 | }; |
167 | |||
168 | /include/ "vexpress-v2m-rs1.dtsi" | ||
diff --git a/arch/arm/boot/dts/vexpress-v2p-ca15_a7.dts b/arch/arm/boot/dts/vexpress-v2p-ca15_a7.dts index 4890a81c5467..1fc405a9ecfb 100644 --- a/arch/arm/boot/dts/vexpress-v2p-ca15_a7.dts +++ b/arch/arm/boot/dts/vexpress-v2p-ca15_a7.dts | |||
@@ -12,6 +12,7 @@ | |||
12 | / { | 12 | / { |
13 | model = "V2P-CA15_CA7"; | 13 | model = "V2P-CA15_CA7"; |
14 | arm,hbi = <0x249>; | 14 | arm,hbi = <0x249>; |
15 | arm,vexpress,site = <0xf>; | ||
15 | compatible = "arm,vexpress,v2p-ca15_a7", "arm,vexpress"; | 16 | compatible = "arm,vexpress,v2p-ca15_a7", "arm,vexpress"; |
16 | interrupt-parent = <&gic>; | 17 | interrupt-parent = <&gic>; |
17 | #address-cells = <2>; | 18 | #address-cells = <2>; |
@@ -74,17 +75,23 @@ | |||
74 | compatible = "arm,sp805", "arm,primecell"; | 75 | compatible = "arm,sp805", "arm,primecell"; |
75 | reg = <0 0x2a490000 0 0x1000>; | 76 | reg = <0 0x2a490000 0 0x1000>; |
76 | interrupts = <98>; | 77 | interrupts = <98>; |
78 | clocks = <&oscclk6a>, <&oscclk6a>; | ||
79 | clock-names = "wdogclk", "apb_pclk"; | ||
77 | }; | 80 | }; |
78 | 81 | ||
79 | hdlcd@2b000000 { | 82 | hdlcd@2b000000 { |
80 | compatible = "arm,hdlcd"; | 83 | compatible = "arm,hdlcd"; |
81 | reg = <0 0x2b000000 0 0x1000>; | 84 | reg = <0 0x2b000000 0 0x1000>; |
82 | interrupts = <0 85 4>; | 85 | interrupts = <0 85 4>; |
86 | clocks = <&oscclk5>; | ||
87 | clock-names = "pxlclk"; | ||
83 | }; | 88 | }; |
84 | 89 | ||
85 | memory-controller@2b0a0000 { | 90 | memory-controller@2b0a0000 { |
86 | compatible = "arm,pl341", "arm,primecell"; | 91 | compatible = "arm,pl341", "arm,primecell"; |
87 | reg = <0 0x2b0a0000 0 0x1000>; | 92 | reg = <0 0x2b0a0000 0 0x1000>; |
93 | clocks = <&oscclk6a>; | ||
94 | clock-names = "apb_pclk"; | ||
88 | }; | 95 | }; |
89 | 96 | ||
90 | gic: interrupt-controller@2c001000 { | 97 | gic: interrupt-controller@2c001000 { |
@@ -104,6 +111,8 @@ | |||
104 | reg = <0 0x7ffd0000 0 0x1000>; | 111 | reg = <0 0x7ffd0000 0 0x1000>; |
105 | interrupts = <0 86 4>, | 112 | interrupts = <0 86 4>, |
106 | <0 87 4>; | 113 | <0 87 4>; |
114 | clocks = <&oscclk6a>; | ||
115 | clock-names = "apb_pclk"; | ||
107 | }; | 116 | }; |
108 | 117 | ||
109 | dma@7ff00000 { | 118 | dma@7ff00000 { |
@@ -114,6 +123,8 @@ | |||
114 | <0 89 4>, | 123 | <0 89 4>, |
115 | <0 90 4>, | 124 | <0 90 4>, |
116 | <0 91 4>; | 125 | <0 91 4>; |
126 | clocks = <&oscclk6a>; | ||
127 | clock-names = "apb_pclk"; | ||
117 | }; | 128 | }; |
118 | 129 | ||
119 | timer { | 130 | timer { |
@@ -130,7 +141,175 @@ | |||
130 | <0 69 4>; | 141 | <0 69 4>; |
131 | }; | 142 | }; |
132 | 143 | ||
133 | motherboard { | 144 | oscclk6a: oscclk6a { |
145 | /* Reference 24MHz clock */ | ||
146 | compatible = "fixed-clock"; | ||
147 | #clock-cells = <0>; | ||
148 | clock-frequency = <24000000>; | ||
149 | clock-output-names = "oscclk6a"; | ||
150 | }; | ||
151 | |||
152 | dcc { | ||
153 | compatible = "arm,vexpress,config-bus"; | ||
154 | arm,vexpress,config-bridge = <&v2m_sysreg>; | ||
155 | |||
156 | osc@0 { | ||
157 | /* A15 PLL 0 reference clock */ | ||
158 | compatible = "arm,vexpress-osc"; | ||
159 | arm,vexpress-sysreg,func = <1 0>; | ||
160 | freq-range = <17000000 50000000>; | ||
161 | #clock-cells = <0>; | ||
162 | clock-output-names = "oscclk0"; | ||
163 | }; | ||
164 | |||
165 | osc@1 { | ||
166 | /* A15 PLL 1 reference clock */ | ||
167 | compatible = "arm,vexpress-osc"; | ||
168 | arm,vexpress-sysreg,func = <1 1>; | ||
169 | freq-range = <17000000 50000000>; | ||
170 | #clock-cells = <0>; | ||
171 | clock-output-names = "oscclk1"; | ||
172 | }; | ||
173 | |||
174 | osc@2 { | ||
175 | /* A7 PLL 0 reference clock */ | ||
176 | compatible = "arm,vexpress-osc"; | ||
177 | arm,vexpress-sysreg,func = <1 2>; | ||
178 | freq-range = <17000000 50000000>; | ||
179 | #clock-cells = <0>; | ||
180 | clock-output-names = "oscclk2"; | ||
181 | }; | ||
182 | |||
183 | osc@3 { | ||
184 | /* A7 PLL 1 reference clock */ | ||
185 | compatible = "arm,vexpress-osc"; | ||
186 | arm,vexpress-sysreg,func = <1 3>; | ||
187 | freq-range = <17000000 50000000>; | ||
188 | #clock-cells = <0>; | ||
189 | clock-output-names = "oscclk3"; | ||
190 | }; | ||
191 | |||
192 | osc@4 { | ||
193 | /* External AXI master clock */ | ||
194 | compatible = "arm,vexpress-osc"; | ||
195 | arm,vexpress-sysreg,func = <1 4>; | ||
196 | freq-range = <20000000 40000000>; | ||
197 | #clock-cells = <0>; | ||
198 | clock-output-names = "oscclk4"; | ||
199 | }; | ||
200 | |||
201 | oscclk5: osc@5 { | ||
202 | /* HDLCD PLL reference clock */ | ||
203 | compatible = "arm,vexpress-osc"; | ||
204 | arm,vexpress-sysreg,func = <1 5>; | ||
205 | freq-range = <23750000 165000000>; | ||
206 | #clock-cells = <0>; | ||
207 | clock-output-names = "oscclk5"; | ||
208 | }; | ||
209 | |||
210 | smbclk: osc@6 { | ||
211 | /* Static memory controller clock */ | ||
212 | compatible = "arm,vexpress-osc"; | ||
213 | arm,vexpress-sysreg,func = <1 6>; | ||
214 | freq-range = <20000000 40000000>; | ||
215 | #clock-cells = <0>; | ||
216 | clock-output-names = "oscclk6"; | ||
217 | }; | ||
218 | |||
219 | osc@7 { | ||
220 | /* SYS PLL reference clock */ | ||
221 | compatible = "arm,vexpress-osc"; | ||
222 | arm,vexpress-sysreg,func = <1 7>; | ||
223 | freq-range = <17000000 50000000>; | ||
224 | #clock-cells = <0>; | ||
225 | clock-output-names = "oscclk7"; | ||
226 | }; | ||
227 | |||
228 | osc@8 { | ||
229 | /* DDR2 PLL reference clock */ | ||
230 | compatible = "arm,vexpress-osc"; | ||
231 | arm,vexpress-sysreg,func = <1 8>; | ||
232 | freq-range = <20000000 50000000>; | ||
233 | #clock-cells = <0>; | ||
234 | clock-output-names = "oscclk8"; | ||
235 | }; | ||
236 | |||
237 | volt@0 { | ||
238 | /* A15 CPU core voltage */ | ||
239 | compatible = "arm,vexpress-volt"; | ||
240 | arm,vexpress-sysreg,func = <2 0>; | ||
241 | regulator-name = "A15 Vcore"; | ||
242 | regulator-min-microvolt = <800000>; | ||
243 | regulator-max-microvolt = <1050000>; | ||
244 | regulator-always-on; | ||
245 | label = "A15 Vcore"; | ||
246 | }; | ||
247 | |||
248 | volt@1 { | ||
249 | /* A7 CPU core voltage */ | ||
250 | compatible = "arm,vexpress-volt"; | ||
251 | arm,vexpress-sysreg,func = <2 1>; | ||
252 | regulator-name = "A7 Vcore"; | ||
253 | regulator-min-microvolt = <800000>; | ||
254 | regulator-max-microvolt = <1050000>; | ||
255 | regulator-always-on; | ||
256 | label = "A7 Vcore"; | ||
257 | }; | ||
258 | |||
259 | amp@0 { | ||
260 | /* Total current for the two A15 cores */ | ||
261 | compatible = "arm,vexpress-amp"; | ||
262 | arm,vexpress-sysreg,func = <3 0>; | ||
263 | label = "A15 Icore"; | ||
264 | }; | ||
265 | |||
266 | amp@1 { | ||
267 | /* Total current for the three A7 cores */ | ||
268 | compatible = "arm,vexpress-amp"; | ||
269 | arm,vexpress-sysreg,func = <3 1>; | ||
270 | label = "A7 Icore"; | ||
271 | }; | ||
272 | |||
273 | temp@0 { | ||
274 | /* DCC internal temperature */ | ||
275 | compatible = "arm,vexpress-temp"; | ||
276 | arm,vexpress-sysreg,func = <4 0>; | ||
277 | label = "DCC"; | ||
278 | }; | ||
279 | |||
280 | power@0 { | ||
281 | /* Total power for the two A15 cores */ | ||
282 | compatible = "arm,vexpress-power"; | ||
283 | arm,vexpress-sysreg,func = <12 0>; | ||
284 | label = "A15 Pcore"; | ||
285 | }; | ||
286 | power@1 { | ||
287 | /* Total power for the three A7 cores */ | ||
288 | compatible = "arm,vexpress-power"; | ||
289 | arm,vexpress-sysreg,func = <12 1>; | ||
290 | label = "A7 Pcore"; | ||
291 | }; | ||
292 | |||
293 | energy@0 { | ||
294 | /* Total energy for the two A15 cores */ | ||
295 | compatible = "arm,vexpress-energy"; | ||
296 | arm,vexpress-sysreg,func = <13 0>; | ||
297 | label = "A15 Jcore"; | ||
298 | }; | ||
299 | |||
300 | energy@2 { | ||
301 | /* Total energy for the three A7 cores */ | ||
302 | compatible = "arm,vexpress-energy"; | ||
303 | arm,vexpress-sysreg,func = <13 2>; | ||
304 | label = "A7 Jcore"; | ||
305 | }; | ||
306 | }; | ||
307 | |||
308 | smb { | ||
309 | compatible = "simple-bus"; | ||
310 | |||
311 | #address-cells = <2>; | ||
312 | #size-cells = <1>; | ||
134 | ranges = <0 0 0 0x08000000 0x04000000>, | 313 | ranges = <0 0 0 0x08000000 0x04000000>, |
135 | <1 0 0 0x14000000 0x04000000>, | 314 | <1 0 0 0x14000000 0x04000000>, |
136 | <2 0 0 0x18000000 0x04000000>, | 315 | <2 0 0 0x18000000 0x04000000>, |
@@ -138,6 +317,7 @@ | |||
138 | <4 0 0 0x0c000000 0x04000000>, | 317 | <4 0 0 0x0c000000 0x04000000>, |
139 | <5 0 0 0x10000000 0x04000000>; | 318 | <5 0 0 0x10000000 0x04000000>; |
140 | 319 | ||
320 | #interrupt-cells = <1>; | ||
141 | interrupt-map-mask = <0 0 63>; | 321 | interrupt-map-mask = <0 0 63>; |
142 | interrupt-map = <0 0 0 &gic 0 0 4>, | 322 | interrupt-map = <0 0 0 &gic 0 0 4>, |
143 | <0 0 1 &gic 0 1 4>, | 323 | <0 0 1 &gic 0 1 4>, |
@@ -182,7 +362,7 @@ | |||
182 | <0 0 40 &gic 0 40 4>, | 362 | <0 0 40 &gic 0 40 4>, |
183 | <0 0 41 &gic 0 41 4>, | 363 | <0 0 41 &gic 0 41 4>, |
184 | <0 0 42 &gic 0 42 4>; | 364 | <0 0 42 &gic 0 42 4>; |
365 | |||
366 | /include/ "vexpress-v2m-rs1.dtsi" | ||
185 | }; | 367 | }; |
186 | }; | 368 | }; |
187 | |||
188 | /include/ "vexpress-v2m-rs1.dtsi" | ||
diff --git a/arch/arm/boot/dts/vexpress-v2p-ca5s.dts b/arch/arm/boot/dts/vexpress-v2p-ca5s.dts index 18917a0f8604..6328cbc71d30 100644 --- a/arch/arm/boot/dts/vexpress-v2p-ca5s.dts +++ b/arch/arm/boot/dts/vexpress-v2p-ca5s.dts | |||
@@ -12,6 +12,7 @@ | |||
12 | / { | 12 | / { |
13 | model = "V2P-CA5s"; | 13 | model = "V2P-CA5s"; |
14 | arm,hbi = <0x225>; | 14 | arm,hbi = <0x225>; |
15 | arm,vexpress,site = <0xf>; | ||
15 | compatible = "arm,vexpress,v2p-ca5s", "arm,vexpress"; | 16 | compatible = "arm,vexpress,v2p-ca5s", "arm,vexpress"; |
16 | interrupt-parent = <&gic>; | 17 | interrupt-parent = <&gic>; |
17 | #address-cells = <1>; | 18 | #address-cells = <1>; |
@@ -56,11 +57,15 @@ | |||
56 | compatible = "arm,hdlcd"; | 57 | compatible = "arm,hdlcd"; |
57 | reg = <0x2a110000 0x1000>; | 58 | reg = <0x2a110000 0x1000>; |
58 | interrupts = <0 85 4>; | 59 | interrupts = <0 85 4>; |
60 | clocks = <&oscclk3>; | ||
61 | clock-names = "pxlclk"; | ||
59 | }; | 62 | }; |
60 | 63 | ||
61 | memory-controller@2a150000 { | 64 | memory-controller@2a150000 { |
62 | compatible = "arm,pl341", "arm,primecell"; | 65 | compatible = "arm,pl341", "arm,primecell"; |
63 | reg = <0x2a150000 0x1000>; | 66 | reg = <0x2a150000 0x1000>; |
67 | clocks = <&oscclk1>; | ||
68 | clock-names = "apb_pclk"; | ||
64 | }; | 69 | }; |
65 | 70 | ||
66 | memory-controller@2a190000 { | 71 | memory-controller@2a190000 { |
@@ -68,6 +73,8 @@ | |||
68 | reg = <0x2a190000 0x1000>; | 73 | reg = <0x2a190000 0x1000>; |
69 | interrupts = <0 86 4>, | 74 | interrupts = <0 86 4>, |
70 | <0 87 4>; | 75 | <0 87 4>; |
76 | clocks = <&oscclk1>; | ||
77 | clock-names = "apb_pclk"; | ||
71 | }; | 78 | }; |
72 | 79 | ||
73 | scu@2c000000 { | 80 | scu@2c000000 { |
@@ -109,7 +116,77 @@ | |||
109 | <0 69 4>; | 116 | <0 69 4>; |
110 | }; | 117 | }; |
111 | 118 | ||
112 | motherboard { | 119 | dcc { |
120 | compatible = "arm,vexpress,config-bus"; | ||
121 | arm,vexpress,config-bridge = <&v2m_sysreg>; | ||
122 | |||
123 | osc@0 { | ||
124 | /* CPU and internal AXI reference clock */ | ||
125 | compatible = "arm,vexpress-osc"; | ||
126 | arm,vexpress-sysreg,func = <1 0>; | ||
127 | freq-range = <50000000 100000000>; | ||
128 | #clock-cells = <0>; | ||
129 | clock-output-names = "oscclk0"; | ||
130 | }; | ||
131 | |||
132 | oscclk1: osc@1 { | ||
133 | /* Multiplexed AXI master clock */ | ||
134 | compatible = "arm,vexpress-osc"; | ||
135 | arm,vexpress-sysreg,func = <1 1>; | ||
136 | freq-range = <5000000 50000000>; | ||
137 | #clock-cells = <0>; | ||
138 | clock-output-names = "oscclk1"; | ||
139 | }; | ||
140 | |||
141 | osc@2 { | ||
142 | /* DDR2 */ | ||
143 | compatible = "arm,vexpress-osc"; | ||
144 | arm,vexpress-sysreg,func = <1 2>; | ||
145 | freq-range = <80000000 120000000>; | ||
146 | #clock-cells = <0>; | ||
147 | clock-output-names = "oscclk2"; | ||
148 | }; | ||
149 | |||
150 | oscclk3: osc@3 { | ||
151 | /* HDLCD */ | ||
152 | compatible = "arm,vexpress-osc"; | ||
153 | arm,vexpress-sysreg,func = <1 3>; | ||
154 | freq-range = <23750000 165000000>; | ||
155 | #clock-cells = <0>; | ||
156 | clock-output-names = "oscclk3"; | ||
157 | }; | ||
158 | |||
159 | osc@4 { | ||
160 | /* Test chip gate configuration */ | ||
161 | compatible = "arm,vexpress-osc"; | ||
162 | arm,vexpress-sysreg,func = <1 4>; | ||
163 | freq-range = <80000000 80000000>; | ||
164 | #clock-cells = <0>; | ||
165 | clock-output-names = "oscclk4"; | ||
166 | }; | ||
167 | |||
168 | smbclk: osc@5 { | ||
169 | /* SMB clock */ | ||
170 | compatible = "arm,vexpress-osc"; | ||
171 | arm,vexpress-sysreg,func = <1 5>; | ||
172 | freq-range = <25000000 60000000>; | ||
173 | #clock-cells = <0>; | ||
174 | clock-output-names = "oscclk5"; | ||
175 | }; | ||
176 | |||
177 | temp@0 { | ||
178 | /* DCC internal operating temperature */ | ||
179 | compatible = "arm,vexpress-temp"; | ||
180 | arm,vexpress-sysreg,func = <4 0>; | ||
181 | label = "DCC"; | ||
182 | }; | ||
183 | }; | ||
184 | |||
185 | smb { | ||
186 | compatible = "simple-bus"; | ||
187 | |||
188 | #address-cells = <2>; | ||
189 | #size-cells = <1>; | ||
113 | ranges = <0 0 0x08000000 0x04000000>, | 190 | ranges = <0 0 0x08000000 0x04000000>, |
114 | <1 0 0x14000000 0x04000000>, | 191 | <1 0 0x14000000 0x04000000>, |
115 | <2 0 0x18000000 0x04000000>, | 192 | <2 0 0x18000000 0x04000000>, |
@@ -117,6 +194,7 @@ | |||
117 | <4 0 0x0c000000 0x04000000>, | 194 | <4 0 0x0c000000 0x04000000>, |
118 | <5 0 0x10000000 0x04000000>; | 195 | <5 0 0x10000000 0x04000000>; |
119 | 196 | ||
197 | #interrupt-cells = <1>; | ||
120 | interrupt-map-mask = <0 0 63>; | 198 | interrupt-map-mask = <0 0 63>; |
121 | interrupt-map = <0 0 0 &gic 0 0 4>, | 199 | interrupt-map = <0 0 0 &gic 0 0 4>, |
122 | <0 0 1 &gic 0 1 4>, | 200 | <0 0 1 &gic 0 1 4>, |
@@ -161,7 +239,7 @@ | |||
161 | <0 0 40 &gic 0 40 4>, | 239 | <0 0 40 &gic 0 40 4>, |
162 | <0 0 41 &gic 0 41 4>, | 240 | <0 0 41 &gic 0 41 4>, |
163 | <0 0 42 &gic 0 42 4>; | 241 | <0 0 42 &gic 0 42 4>; |
242 | |||
243 | /include/ "vexpress-v2m-rs1.dtsi" | ||
164 | }; | 244 | }; |
165 | }; | 245 | }; |
166 | |||
167 | /include/ "vexpress-v2m-rs1.dtsi" | ||
diff --git a/arch/arm/boot/dts/vexpress-v2p-ca9.dts b/arch/arm/boot/dts/vexpress-v2p-ca9.dts index 3f0c736d31d6..1420bb14d95c 100644 --- a/arch/arm/boot/dts/vexpress-v2p-ca9.dts +++ b/arch/arm/boot/dts/vexpress-v2p-ca9.dts | |||
@@ -12,6 +12,7 @@ | |||
12 | / { | 12 | / { |
13 | model = "V2P-CA9"; | 13 | model = "V2P-CA9"; |
14 | arm,hbi = <0x191>; | 14 | arm,hbi = <0x191>; |
15 | arm,vexpress,site = <0xf>; | ||
15 | compatible = "arm,vexpress,v2p-ca9", "arm,vexpress"; | 16 | compatible = "arm,vexpress,v2p-ca9", "arm,vexpress"; |
16 | interrupt-parent = <&gic>; | 17 | interrupt-parent = <&gic>; |
17 | #address-cells = <1>; | 18 | #address-cells = <1>; |
@@ -70,11 +71,15 @@ | |||
70 | compatible = "arm,pl111", "arm,primecell"; | 71 | compatible = "arm,pl111", "arm,primecell"; |
71 | reg = <0x10020000 0x1000>; | 72 | reg = <0x10020000 0x1000>; |
72 | interrupts = <0 44 4>; | 73 | interrupts = <0 44 4>; |
74 | clocks = <&oscclk1>, <&oscclk2>; | ||
75 | clock-names = "clcdclk", "apb_pclk"; | ||
73 | }; | 76 | }; |
74 | 77 | ||
75 | memory-controller@100e0000 { | 78 | memory-controller@100e0000 { |
76 | compatible = "arm,pl341", "arm,primecell"; | 79 | compatible = "arm,pl341", "arm,primecell"; |
77 | reg = <0x100e0000 0x1000>; | 80 | reg = <0x100e0000 0x1000>; |
81 | clocks = <&oscclk2>; | ||
82 | clock-names = "apb_pclk"; | ||
78 | }; | 83 | }; |
79 | 84 | ||
80 | memory-controller@100e1000 { | 85 | memory-controller@100e1000 { |
@@ -82,6 +87,8 @@ | |||
82 | reg = <0x100e1000 0x1000>; | 87 | reg = <0x100e1000 0x1000>; |
83 | interrupts = <0 45 4>, | 88 | interrupts = <0 45 4>, |
84 | <0 46 4>; | 89 | <0 46 4>; |
90 | clocks = <&oscclk2>; | ||
91 | clock-names = "apb_pclk"; | ||
85 | }; | 92 | }; |
86 | 93 | ||
87 | timer@100e4000 { | 94 | timer@100e4000 { |
@@ -89,12 +96,16 @@ | |||
89 | reg = <0x100e4000 0x1000>; | 96 | reg = <0x100e4000 0x1000>; |
90 | interrupts = <0 48 4>, | 97 | interrupts = <0 48 4>, |
91 | <0 49 4>; | 98 | <0 49 4>; |
99 | clocks = <&oscclk2>, <&oscclk2>; | ||
100 | clock-names = "timclk", "apb_pclk"; | ||
92 | }; | 101 | }; |
93 | 102 | ||
94 | watchdog@100e5000 { | 103 | watchdog@100e5000 { |
95 | compatible = "arm,sp805", "arm,primecell"; | 104 | compatible = "arm,sp805", "arm,primecell"; |
96 | reg = <0x100e5000 0x1000>; | 105 | reg = <0x100e5000 0x1000>; |
97 | interrupts = <0 51 4>; | 106 | interrupts = <0 51 4>; |
107 | clocks = <&oscclk2>, <&oscclk2>; | ||
108 | clock-names = "wdogclk", "apb_pclk"; | ||
98 | }; | 109 | }; |
99 | 110 | ||
100 | scu@1e000000 { | 111 | scu@1e000000 { |
@@ -140,13 +151,132 @@ | |||
140 | <0 63 4>; | 151 | <0 63 4>; |
141 | }; | 152 | }; |
142 | 153 | ||
143 | motherboard { | 154 | dcc { |
155 | compatible = "arm,vexpress,config-bus"; | ||
156 | arm,vexpress,config-bridge = <&v2m_sysreg>; | ||
157 | |||
158 | osc@0 { | ||
159 | /* ACLK clock to the AXI master port on the test chip */ | ||
160 | compatible = "arm,vexpress-osc"; | ||
161 | arm,vexpress-sysreg,func = <1 0>; | ||
162 | freq-range = <30000000 50000000>; | ||
163 | #clock-cells = <0>; | ||
164 | clock-output-names = "extsaxiclk"; | ||
165 | }; | ||
166 | |||
167 | oscclk1: osc@1 { | ||
168 | /* Reference clock for the CLCD */ | ||
169 | compatible = "arm,vexpress-osc"; | ||
170 | arm,vexpress-sysreg,func = <1 1>; | ||
171 | freq-range = <10000000 80000000>; | ||
172 | #clock-cells = <0>; | ||
173 | clock-output-names = "clcdclk"; | ||
174 | }; | ||
175 | |||
176 | smbclk: oscclk2: osc@2 { | ||
177 | /* Reference clock for the test chip internal PLLs */ | ||
178 | compatible = "arm,vexpress-osc"; | ||
179 | arm,vexpress-sysreg,func = <1 2>; | ||
180 | freq-range = <33000000 100000000>; | ||
181 | #clock-cells = <0>; | ||
182 | clock-output-names = "tcrefclk"; | ||
183 | }; | ||
184 | |||
185 | volt@0 { | ||
186 | /* Test Chip internal logic voltage */ | ||
187 | compatible = "arm,vexpress-volt"; | ||
188 | arm,vexpress-sysreg,func = <2 0>; | ||
189 | regulator-name = "VD10"; | ||
190 | regulator-always-on; | ||
191 | label = "VD10"; | ||
192 | }; | ||
193 | |||
194 | volt@1 { | ||
195 | /* PL310, L2 cache, RAM cell supply (not PL310 logic) */ | ||
196 | compatible = "arm,vexpress-volt"; | ||
197 | arm,vexpress-sysreg,func = <2 1>; | ||
198 | regulator-name = "VD10_S2"; | ||
199 | regulator-always-on; | ||
200 | label = "VD10_S2"; | ||
201 | }; | ||
202 | |||
203 | volt@2 { | ||
204 | /* Cortex-A9 system supply, Cores, MPEs, SCU and PL310 logic */ | ||
205 | compatible = "arm,vexpress-volt"; | ||
206 | arm,vexpress-sysreg,func = <2 2>; | ||
207 | regulator-name = "VD10_S3"; | ||
208 | regulator-always-on; | ||
209 | label = "VD10_S3"; | ||
210 | }; | ||
211 | |||
212 | volt@3 { | ||
213 | /* DDR2 SDRAM and Test Chip DDR2 I/O supply */ | ||
214 | compatible = "arm,vexpress-volt"; | ||
215 | arm,vexpress-sysreg,func = <2 3>; | ||
216 | regulator-name = "VCC1V8"; | ||
217 | regulator-always-on; | ||
218 | label = "VCC1V8"; | ||
219 | }; | ||
220 | |||
221 | volt@4 { | ||
222 | /* DDR2 SDRAM VTT termination voltage */ | ||
223 | compatible = "arm,vexpress-volt"; | ||
224 | arm,vexpress-sysreg,func = <2 4>; | ||
225 | regulator-name = "DDR2VTT"; | ||
226 | regulator-always-on; | ||
227 | label = "DDR2VTT"; | ||
228 | }; | ||
229 | |||
230 | volt@5 { | ||
231 | /* Local board supply for miscellaneous logic external to the Test Chip */ | ||
232 | arm,vexpress-sysreg,func = <2 5>; | ||
233 | compatible = "arm,vexpress-volt"; | ||
234 | regulator-name = "VCC3V3"; | ||
235 | regulator-always-on; | ||
236 | label = "VCC3V3"; | ||
237 | }; | ||
238 | |||
239 | amp@0 { | ||
240 | /* PL310, L2 cache, RAM cell supply (not PL310 logic) */ | ||
241 | compatible = "arm,vexpress-amp"; | ||
242 | arm,vexpress-sysreg,func = <3 0>; | ||
243 | label = "VD10_S2"; | ||
244 | }; | ||
245 | |||
246 | amp@1 { | ||
247 | /* Cortex-A9 system supply, Cores, MPEs, SCU and PL310 logic */ | ||
248 | compatible = "arm,vexpress-amp"; | ||
249 | arm,vexpress-sysreg,func = <3 1>; | ||
250 | label = "VD10_S3"; | ||
251 | }; | ||
252 | |||
253 | power@0 { | ||
254 | /* PL310, L2 cache, RAM cell supply (not PL310 logic) */ | ||
255 | compatible = "arm,vexpress-power"; | ||
256 | arm,vexpress-sysreg,func = <12 0>; | ||
257 | label = "PVD10_S2"; | ||
258 | }; | ||
259 | |||
260 | power@1 { | ||
261 | /* Cortex-A9 system supply, Cores, MPEs, SCU and PL310 logic */ | ||
262 | compatible = "arm,vexpress-power"; | ||
263 | arm,vexpress-sysreg,func = <12 1>; | ||
264 | label = "PVD10_S3"; | ||
265 | }; | ||
266 | }; | ||
267 | |||
268 | smb { | ||
269 | compatible = "simple-bus"; | ||
270 | |||
271 | #address-cells = <2>; | ||
272 | #size-cells = <1>; | ||
144 | ranges = <0 0 0x40000000 0x04000000>, | 273 | ranges = <0 0 0x40000000 0x04000000>, |
145 | <1 0 0x44000000 0x04000000>, | 274 | <1 0 0x44000000 0x04000000>, |
146 | <2 0 0x48000000 0x04000000>, | 275 | <2 0 0x48000000 0x04000000>, |
147 | <3 0 0x4c000000 0x04000000>, | 276 | <3 0 0x4c000000 0x04000000>, |
148 | <7 0 0x10000000 0x00020000>; | 277 | <7 0 0x10000000 0x00020000>; |
149 | 278 | ||
279 | #interrupt-cells = <1>; | ||
150 | interrupt-map-mask = <0 0 63>; | 280 | interrupt-map-mask = <0 0 63>; |
151 | interrupt-map = <0 0 0 &gic 0 0 4>, | 281 | interrupt-map = <0 0 0 &gic 0 0 4>, |
152 | <0 0 1 &gic 0 1 4>, | 282 | <0 0 1 &gic 0 1 4>, |
@@ -191,7 +321,7 @@ | |||
191 | <0 0 40 &gic 0 40 4>, | 321 | <0 0 40 &gic 0 40 4>, |
192 | <0 0 41 &gic 0 41 4>, | 322 | <0 0 41 &gic 0 41 4>, |
193 | <0 0 42 &gic 0 42 4>; | 323 | <0 0 42 &gic 0 42 4>; |
324 | |||
325 | /include/ "vexpress-v2m.dtsi" | ||
194 | }; | 326 | }; |
195 | }; | 327 | }; |
196 | |||
197 | /include/ "vexpress-v2m.dtsi" | ||
diff --git a/arch/arm/configs/armadillo800eva_defconfig b/arch/arm/configs/armadillo800eva_defconfig index f78d259f8d23..3d764072dd54 100644 --- a/arch/arm/configs/armadillo800eva_defconfig +++ b/arch/arm/configs/armadillo800eva_defconfig | |||
@@ -7,6 +7,7 @@ CONFIG_LOG_BUF_SHIFT=16 | |||
7 | # CONFIG_IPC_NS is not set | 7 | # CONFIG_IPC_NS is not set |
8 | # CONFIG_PID_NS is not set | 8 | # CONFIG_PID_NS is not set |
9 | CONFIG_CC_OPTIMIZE_FOR_SIZE=y | 9 | CONFIG_CC_OPTIMIZE_FOR_SIZE=y |
10 | CONFIG_PERF_EVENTS=y | ||
10 | CONFIG_SLAB=y | 11 | CONFIG_SLAB=y |
11 | CONFIG_MODULES=y | 12 | CONFIG_MODULES=y |
12 | CONFIG_MODULE_UNLOAD=y | 13 | CONFIG_MODULE_UNLOAD=y |
diff --git a/arch/arm/configs/bcm2835_defconfig b/arch/arm/configs/bcm2835_defconfig index 7aea70253c63..74e27f0ff6ad 100644 --- a/arch/arm/configs/bcm2835_defconfig +++ b/arch/arm/configs/bcm2835_defconfig | |||
@@ -66,8 +66,6 @@ CONFIG_TTY_PRINTK=y | |||
66 | # CONFIG_FILE_LOCKING is not set | 66 | # CONFIG_FILE_LOCKING is not set |
67 | # CONFIG_DNOTIFY is not set | 67 | # CONFIG_DNOTIFY is not set |
68 | # CONFIG_INOTIFY_USER is not set | 68 | # CONFIG_INOTIFY_USER is not set |
69 | # CONFIG_PROC_FS is not set | ||
70 | # CONFIG_SYSFS is not set | ||
71 | # CONFIG_MISC_FILESYSTEMS is not set | 69 | # CONFIG_MISC_FILESYSTEMS is not set |
72 | CONFIG_PRINTK_TIME=y | 70 | CONFIG_PRINTK_TIME=y |
73 | # CONFIG_ENABLE_WARN_DEPRECATED is not set | 71 | # CONFIG_ENABLE_WARN_DEPRECATED is not set |
diff --git a/arch/arm/configs/bcm_defconfig b/arch/arm/configs/bcm_defconfig new file mode 100644 index 000000000000..e3bf2d65618e --- /dev/null +++ b/arch/arm/configs/bcm_defconfig | |||
@@ -0,0 +1,114 @@ | |||
1 | CONFIG_EXPERIMENTAL=y | ||
2 | # CONFIG_LOCALVERSION_AUTO is not set | ||
3 | # CONFIG_SWAP is not set | ||
4 | CONFIG_SYSVIPC=y | ||
5 | CONFIG_NO_HZ=y | ||
6 | CONFIG_HIGH_RES_TIMERS=y | ||
7 | CONFIG_BSD_PROCESS_ACCT=y | ||
8 | CONFIG_BSD_PROCESS_ACCT_V3=y | ||
9 | CONFIG_IKCONFIG=y | ||
10 | CONFIG_IKCONFIG_PROC=y | ||
11 | CONFIG_LOG_BUF_SHIFT=19 | ||
12 | CONFIG_CGROUPS=y | ||
13 | CONFIG_CGROUP_FREEZER=y | ||
14 | CONFIG_CGROUP_DEVICE=y | ||
15 | CONFIG_CGROUP_CPUACCT=y | ||
16 | CONFIG_RESOURCE_COUNTERS=y | ||
17 | CONFIG_CGROUP_SCHED=y | ||
18 | CONFIG_BLK_CGROUP=y | ||
19 | CONFIG_NAMESPACES=y | ||
20 | CONFIG_BLK_DEV_INITRD=y | ||
21 | CONFIG_SYSCTL_SYSCALL=y | ||
22 | CONFIG_EMBEDDED=y | ||
23 | # CONFIG_COMPAT_BRK is not set | ||
24 | CONFIG_MODULES=y | ||
25 | CONFIG_MODULE_UNLOAD=y | ||
26 | # CONFIG_BLK_DEV_BSG is not set | ||
27 | CONFIG_PARTITION_ADVANCED=y | ||
28 | CONFIG_EFI_PARTITION=y | ||
29 | CONFIG_ARCH_BCM=y | ||
30 | CONFIG_ARM_THUMBEE=y | ||
31 | CONFIG_ARM_ERRATA_743622=y | ||
32 | CONFIG_PREEMPT=y | ||
33 | CONFIG_AEABI=y | ||
34 | # CONFIG_OABI_COMPAT is not set | ||
35 | # CONFIG_COMPACTION is not set | ||
36 | CONFIG_ZBOOT_ROM_TEXT=0x0 | ||
37 | CONFIG_ZBOOT_ROM_BSS=0x0 | ||
38 | CONFIG_ARM_APPENDED_DTB=y | ||
39 | CONFIG_CMDLINE="console=ttyS0,115200n8 mem=128M" | ||
40 | CONFIG_CPU_IDLE=y | ||
41 | CONFIG_VFP=y | ||
42 | CONFIG_NEON=y | ||
43 | # CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set | ||
44 | CONFIG_PM_RUNTIME=y | ||
45 | CONFIG_DEVTMPFS=y | ||
46 | CONFIG_DEVTMPFS_MOUNT=y | ||
47 | CONFIG_PROC_DEVICETREE=y | ||
48 | # CONFIG_BLK_DEV is not set | ||
49 | CONFIG_SCSI=y | ||
50 | CONFIG_BLK_DEV_SD=y | ||
51 | CONFIG_CHR_DEV_SG=y | ||
52 | CONFIG_SCSI_MULTI_LUN=y | ||
53 | CONFIG_SCSI_SCAN_ASYNC=y | ||
54 | CONFIG_INPUT_FF_MEMLESS=y | ||
55 | CONFIG_INPUT_JOYDEV=y | ||
56 | CONFIG_INPUT_EVDEV=y | ||
57 | # CONFIG_KEYBOARD_ATKBD is not set | ||
58 | # CONFIG_INPUT_MOUSE is not set | ||
59 | CONFIG_INPUT_TOUCHSCREEN=y | ||
60 | CONFIG_INPUT_MISC=y | ||
61 | CONFIG_INPUT_UINPUT=y | ||
62 | # CONFIG_SERIO is not set | ||
63 | # CONFIG_LEGACY_PTYS is not set | ||
64 | CONFIG_SERIAL_8250=y | ||
65 | CONFIG_SERIAL_8250_CONSOLE=y | ||
66 | CONFIG_SERIAL_8250_EXTENDED=y | ||
67 | CONFIG_SERIAL_8250_MANY_PORTS=y | ||
68 | CONFIG_SERIAL_8250_SHARE_IRQ=y | ||
69 | CONFIG_SERIAL_8250_RSA=y | ||
70 | CONFIG_SERIAL_8250_DW=y | ||
71 | CONFIG_HW_RANDOM=y | ||
72 | CONFIG_I2C=y | ||
73 | CONFIG_I2C_CHARDEV=y | ||
74 | # CONFIG_HWMON is not set | ||
75 | CONFIG_VIDEO_OUTPUT_CONTROL=y | ||
76 | CONFIG_FB=y | ||
77 | CONFIG_BACKLIGHT_LCD_SUPPORT=y | ||
78 | CONFIG_LCD_CLASS_DEVICE=y | ||
79 | CONFIG_BACKLIGHT_CLASS_DEVICE=y | ||
80 | # CONFIG_USB_SUPPORT is not set | ||
81 | CONFIG_NEW_LEDS=y | ||
82 | CONFIG_LEDS_CLASS=y | ||
83 | CONFIG_LEDS_TRIGGERS=y | ||
84 | CONFIG_LEDS_TRIGGER_TIMER=y | ||
85 | CONFIG_LEDS_TRIGGER_HEARTBEAT=y | ||
86 | CONFIG_LEDS_TRIGGER_DEFAULT_ON=y | ||
87 | CONFIG_EXT4_FS=y | ||
88 | CONFIG_EXT4_FS_POSIX_ACL=y | ||
89 | CONFIG_EXT4_FS_SECURITY=y | ||
90 | CONFIG_AUTOFS4_FS=y | ||
91 | CONFIG_FUSE_FS=y | ||
92 | CONFIG_MSDOS_FS=y | ||
93 | CONFIG_VFAT_FS=y | ||
94 | CONFIG_TMPFS=y | ||
95 | CONFIG_TMPFS_POSIX_ACL=y | ||
96 | CONFIG_CONFIGFS_FS=y | ||
97 | # CONFIG_MISC_FILESYSTEMS is not set | ||
98 | CONFIG_NLS_CODEPAGE_437=y | ||
99 | CONFIG_NLS_ISO8859_1=y | ||
100 | CONFIG_PRINTK_TIME=y | ||
101 | CONFIG_MAGIC_SYSRQ=y | ||
102 | CONFIG_DEBUG_FS=y | ||
103 | CONFIG_DETECT_HUNG_TASK=y | ||
104 | CONFIG_DEFAULT_HUNG_TASK_TIMEOUT=110 | ||
105 | CONFIG_BOOTPARAM_HUNG_TASK_PANIC=y | ||
106 | CONFIG_DEBUG_INFO=y | ||
107 | # CONFIG_FTRACE is not set | ||
108 | CONFIG_DEBUG_LL=y | ||
109 | CONFIG_CRC_CCITT=y | ||
110 | CONFIG_CRC_T10DIF=y | ||
111 | CONFIG_CRC_ITU_T=y | ||
112 | CONFIG_CRC7=y | ||
113 | CONFIG_XZ_DEC=y | ||
114 | CONFIG_AVERAGE=y | ||
diff --git a/arch/arm/configs/clps711x_defconfig b/arch/arm/configs/clps711x_defconfig new file mode 100644 index 000000000000..1cd94c36321f --- /dev/null +++ b/arch/arm/configs/clps711x_defconfig | |||
@@ -0,0 +1,90 @@ | |||
1 | CONFIG_KERNEL_LZMA=y | ||
2 | CONFIG_SYSVIPC=y | ||
3 | CONFIG_LOG_BUF_SHIFT=14 | ||
4 | CONFIG_BLK_DEV_INITRD=y | ||
5 | CONFIG_RD_LZMA=y | ||
6 | CONFIG_EMBEDDED=y | ||
7 | CONFIG_SLOB=y | ||
8 | CONFIG_JUMP_LABEL=y | ||
9 | # CONFIG_LBDAF is not set | ||
10 | CONFIG_PARTITION_ADVANCED=y | ||
11 | # CONFIG_IOSCHED_CFQ is not set | ||
12 | CONFIG_ARCH_CLPS711X=y | ||
13 | CONFIG_ARCH_AUTCPU12=y | ||
14 | CONFIG_ARCH_CDB89712=y | ||
15 | CONFIG_ARCH_CLEP7312=y | ||
16 | CONFIG_ARCH_EDB7211=y | ||
17 | CONFIG_ARCH_P720T=y | ||
18 | CONFIG_ARCH_FORTUNET=y | ||
19 | CONFIG_AEABI=y | ||
20 | CONFIG_ZBOOT_ROM_TEXT=0x0 | ||
21 | CONFIG_ZBOOT_ROM_BSS=0x0 | ||
22 | # CONFIG_COREDUMP is not set | ||
23 | CONFIG_NET=y | ||
24 | CONFIG_PACKET=y | ||
25 | CONFIG_UNIX=y | ||
26 | CONFIG_INET=y | ||
27 | # CONFIG_IPV6 is not set | ||
28 | CONFIG_IRDA=y | ||
29 | CONFIG_IRTTY_SIR=y | ||
30 | CONFIG_EP7211_DONGLE=y | ||
31 | # CONFIG_WIRELESS is not set | ||
32 | CONFIG_MTD=y | ||
33 | CONFIG_MTD_CMDLINE_PARTS=y | ||
34 | CONFIG_MTD_CHAR=y | ||
35 | CONFIG_MTD_BLOCK=y | ||
36 | CONFIG_MTD_CFI=y | ||
37 | CONFIG_MTD_JEDECPROBE=y | ||
38 | CONFIG_MTD_CFI_INTELEXT=y | ||
39 | CONFIG_MTD_CFI_AMDSTD=y | ||
40 | CONFIG_MTD_CFI_STAA=y | ||
41 | CONFIG_MTD_AUTCPU12=y | ||
42 | CONFIG_MTD_PLATRAM=y | ||
43 | CONFIG_MTD_NAND=y | ||
44 | CONFIG_MTD_NAND_GPIO=y | ||
45 | CONFIG_NETDEVICES=y | ||
46 | # CONFIG_NET_CADENCE is not set | ||
47 | # CONFIG_NET_VENDOR_BROADCOM is not set | ||
48 | # CONFIG_NET_VENDOR_CHELSIO is not set | ||
49 | CONFIG_CS89x0=y | ||
50 | CONFIG_CS89x0_PLATFORM=y | ||
51 | # CONFIG_NET_VENDOR_FARADAY is not set | ||
52 | # CONFIG_NET_VENDOR_INTEL is not set | ||
53 | # CONFIG_NET_VENDOR_MARVELL is not set | ||
54 | # CONFIG_NET_VENDOR_MICREL is not set | ||
55 | # CONFIG_NET_VENDOR_NATSEMI is not set | ||
56 | # CONFIG_NET_VENDOR_SEEQ is not set | ||
57 | # CONFIG_NET_VENDOR_SMSC is not set | ||
58 | # CONFIG_NET_VENDOR_STMICRO is not set | ||
59 | # CONFIG_NET_VENDOR_WIZNET is not set | ||
60 | # CONFIG_WLAN is not set | ||
61 | # CONFIG_INPUT is not set | ||
62 | # CONFIG_SERIO is not set | ||
63 | # CONFIG_VT is not set | ||
64 | CONFIG_SERIAL_CLPS711X_CONSOLE=y | ||
65 | # CONFIG_HW_RANDOM is not set | ||
66 | CONFIG_SPI=y | ||
67 | CONFIG_GPIO_GENERIC_PLATFORM=y | ||
68 | # CONFIG_HWMON is not set | ||
69 | CONFIG_FB=y | ||
70 | CONFIG_FB_CLPS711X=y | ||
71 | CONFIG_BACKLIGHT_LCD_SUPPORT=y | ||
72 | CONFIG_LCD_PLATFORM=y | ||
73 | # CONFIG_USB_SUPPORT is not set | ||
74 | CONFIG_NEW_LEDS=y | ||
75 | CONFIG_LEDS_CLASS=y | ||
76 | CONFIG_LEDS_GPIO=y | ||
77 | CONFIG_LEDS_TRIGGERS=y | ||
78 | CONFIG_LEDS_TRIGGER_HEARTBEAT=y | ||
79 | # CONFIG_IOMMU_SUPPORT is not set | ||
80 | CONFIG_EXT2_FS=y | ||
81 | CONFIG_CRAMFS=y | ||
82 | CONFIG_MINIX_FS=y | ||
83 | # CONFIG_NETWORK_FILESYSTEMS is not set | ||
84 | # CONFIG_FTRACE is not set | ||
85 | CONFIG_DEBUG_USER=y | ||
86 | CONFIG_DEBUG_LL=y | ||
87 | CONFIG_EARLY_PRINTK=y | ||
88 | # CONFIG_CRYPTO_ANSI_CPRNG is not set | ||
89 | # CONFIG_CRYPTO_HW is not set | ||
90 | # CONFIG_CRC32 is not set | ||
diff --git a/arch/arm/configs/edb7211_defconfig b/arch/arm/configs/edb7211_defconfig deleted file mode 100644 index d52ded350a12..000000000000 --- a/arch/arm/configs/edb7211_defconfig +++ /dev/null | |||
@@ -1,27 +0,0 @@ | |||
1 | CONFIG_EXPERIMENTAL=y | ||
2 | CONFIG_SYSVIPC=y | ||
3 | CONFIG_LOG_BUF_SHIFT=14 | ||
4 | CONFIG_BLK_DEV_INITRD=y | ||
5 | CONFIG_EXPERT=y | ||
6 | # CONFIG_HOTPLUG is not set | ||
7 | CONFIG_ARCH_CLPS711X=y | ||
8 | CONFIG_ARCH_EDB7211=y | ||
9 | CONFIG_ZBOOT_ROM_TEXT=0x0 | ||
10 | CONFIG_ZBOOT_ROM_BSS=0x0 | ||
11 | CONFIG_NET=y | ||
12 | CONFIG_PACKET=y | ||
13 | CONFIG_UNIX=y | ||
14 | CONFIG_INET=y | ||
15 | # CONFIG_IPV6 is not set | ||
16 | CONFIG_BLK_DEV_RAM=y | ||
17 | CONFIG_NETDEVICES=y | ||
18 | # CONFIG_INPUT is not set | ||
19 | CONFIG_SERIO_LIBPS2=y | ||
20 | # CONFIG_VT is not set | ||
21 | CONFIG_SERIAL_CLPS711X=y | ||
22 | CONFIG_SERIAL_CLPS711X_CONSOLE=y | ||
23 | CONFIG_EXT2_FS=y | ||
24 | CONFIG_MINIX_FS=y | ||
25 | CONFIG_PARTITION_ADVANCED=y | ||
26 | # CONFIG_MSDOS_PARTITION is not set | ||
27 | CONFIG_DEBUG_USER=y | ||
diff --git a/arch/arm/configs/fortunet_defconfig b/arch/arm/configs/fortunet_defconfig deleted file mode 100644 index 840fced7529f..000000000000 --- a/arch/arm/configs/fortunet_defconfig +++ /dev/null | |||
@@ -1,28 +0,0 @@ | |||
1 | CONFIG_EXPERIMENTAL=y | ||
2 | CONFIG_SYSVIPC=y | ||
3 | CONFIG_LOG_BUF_SHIFT=14 | ||
4 | CONFIG_BLK_DEV_INITRD=y | ||
5 | CONFIG_EXPERT=y | ||
6 | # CONFIG_HOTPLUG is not set | ||
7 | CONFIG_ARCH_CLPS711X=y | ||
8 | CONFIG_ARCH_FORTUNET=y | ||
9 | # CONFIG_ARM_THUMB is not set | ||
10 | CONFIG_ZBOOT_ROM_TEXT=0x0 | ||
11 | CONFIG_ZBOOT_ROM_BSS=0x0 | ||
12 | CONFIG_FPE_FASTFPE=y | ||
13 | CONFIG_BINFMT_AOUT=y | ||
14 | CONFIG_NET=y | ||
15 | CONFIG_UNIX=y | ||
16 | CONFIG_MTD=y | ||
17 | CONFIG_MTD_CHAR=y | ||
18 | CONFIG_MTD_BLOCK=y | ||
19 | CONFIG_MTD_CFI=y | ||
20 | CONFIG_MTD_CFI_INTELEXT=y | ||
21 | CONFIG_BLK_DEV_RAM=y | ||
22 | # CONFIG_INPUT is not set | ||
23 | # CONFIG_SERIO is not set | ||
24 | # CONFIG_VT is not set | ||
25 | CONFIG_SERIAL_CLPS711X=y | ||
26 | CONFIG_SERIAL_CLPS711X_CONSOLE=y | ||
27 | CONFIG_EXT2_FS=y | ||
28 | CONFIG_DEBUG_USER=y | ||
diff --git a/arch/arm/configs/marzen_defconfig b/arch/arm/configs/marzen_defconfig index 53382b6c8bb4..f79b55c512d0 100644 --- a/arch/arm/configs/marzen_defconfig +++ b/arch/arm/configs/marzen_defconfig | |||
@@ -69,6 +69,8 @@ CONFIG_SERIAL_SH_SCI=y | |||
69 | CONFIG_SERIAL_SH_SCI_NR_UARTS=6 | 69 | CONFIG_SERIAL_SH_SCI_NR_UARTS=6 |
70 | CONFIG_SERIAL_SH_SCI_CONSOLE=y | 70 | CONFIG_SERIAL_SH_SCI_CONSOLE=y |
71 | # CONFIG_HW_RANDOM is not set | 71 | # CONFIG_HW_RANDOM is not set |
72 | CONFIG_I2C=y | ||
73 | CONFIG_I2C_RCAR=y | ||
72 | CONFIG_GPIO_SYSFS=y | 74 | CONFIG_GPIO_SYSFS=y |
73 | # CONFIG_HWMON is not set | 75 | # CONFIG_HWMON is not set |
74 | CONFIG_THERMAL=y | 76 | CONFIG_THERMAL=y |
diff --git a/arch/arm/configs/tegra_defconfig b/arch/arm/configs/tegra_defconfig index e2184f6c20b3..a7827fd0616f 100644 --- a/arch/arm/configs/tegra_defconfig +++ b/arch/arm/configs/tegra_defconfig | |||
@@ -80,6 +80,10 @@ CONFIG_RFKILL_GPIO=y | |||
80 | CONFIG_DEVTMPFS=y | 80 | CONFIG_DEVTMPFS=y |
81 | CONFIG_DEVTMPFS_MOUNT=y | 81 | CONFIG_DEVTMPFS_MOUNT=y |
82 | # CONFIG_FIRMWARE_IN_KERNEL is not set | 82 | # CONFIG_FIRMWARE_IN_KERNEL is not set |
83 | CONFIG_CMA=y | ||
84 | CONFIG_MTD=y | ||
85 | CONFIG_MTD_CHAR=y | ||
86 | CONFIG_MTD_M25P80=y | ||
83 | CONFIG_PROC_DEVICETREE=y | 87 | CONFIG_PROC_DEVICETREE=y |
84 | CONFIG_BLK_DEV_LOOP=y | 88 | CONFIG_BLK_DEV_LOOP=y |
85 | CONFIG_AD525X_DPOT=y | 89 | CONFIG_AD525X_DPOT=y |
@@ -98,12 +102,12 @@ CONFIG_USB_PEGASUS=y | |||
98 | CONFIG_USB_USBNET=y | 102 | CONFIG_USB_USBNET=y |
99 | CONFIG_USB_NET_SMSC75XX=y | 103 | CONFIG_USB_NET_SMSC75XX=y |
100 | CONFIG_USB_NET_SMSC95XX=y | 104 | CONFIG_USB_NET_SMSC95XX=y |
105 | CONFIG_BRCMFMAC=m | ||
101 | CONFIG_RT2X00=y | 106 | CONFIG_RT2X00=y |
102 | CONFIG_RT2800USB=m | 107 | CONFIG_RT2800USB=m |
103 | CONFIG_INPUT_EVDEV=y | 108 | CONFIG_INPUT_EVDEV=y |
104 | CONFIG_INPUT_MISC=y | 109 | CONFIG_INPUT_MISC=y |
105 | CONFIG_INPUT_MPU3050=y | 110 | CONFIG_INPUT_MPU3050=y |
106 | # CONFIG_VT is not set | ||
107 | # CONFIG_LEGACY_PTYS is not set | 111 | # CONFIG_LEGACY_PTYS is not set |
108 | # CONFIG_DEVKMEM is not set | 112 | # CONFIG_DEVKMEM is not set |
109 | CONFIG_SERIAL_8250=y | 113 | CONFIG_SERIAL_8250=y |
@@ -116,7 +120,8 @@ CONFIG_I2C_MUX=y | |||
116 | CONFIG_I2C_MUX_PINCTRL=y | 120 | CONFIG_I2C_MUX_PINCTRL=y |
117 | CONFIG_I2C_TEGRA=y | 121 | CONFIG_I2C_TEGRA=y |
118 | CONFIG_SPI=y | 122 | CONFIG_SPI=y |
119 | CONFIG_SPI_TEGRA=y | 123 | CONFIG_SPI_TEGRA20_SFLASH=y |
124 | CONFIG_SPI_TEGRA20_SLINK=y | ||
120 | CONFIG_GPIO_PCA953X_IRQ=y | 125 | CONFIG_GPIO_PCA953X_IRQ=y |
121 | CONFIG_GPIO_TPS6586X=y | 126 | CONFIG_GPIO_TPS6586X=y |
122 | CONFIG_GPIO_TPS65910=y | 127 | CONFIG_GPIO_TPS65910=y |
@@ -138,6 +143,15 @@ CONFIG_MEDIA_SUPPORT=y | |||
138 | CONFIG_MEDIA_CAMERA_SUPPORT=y | 143 | CONFIG_MEDIA_CAMERA_SUPPORT=y |
139 | CONFIG_MEDIA_USB_SUPPORT=y | 144 | CONFIG_MEDIA_USB_SUPPORT=y |
140 | CONFIG_USB_VIDEO_CLASS=m | 145 | CONFIG_USB_VIDEO_CLASS=m |
146 | CONFIG_DRM=y | ||
147 | CONFIG_DRM_TEGRA=y | ||
148 | CONFIG_BACKLIGHT_LCD_SUPPORT=y | ||
149 | # CONFIG_LCD_CLASS_DEVICE is not set | ||
150 | CONFIG_BACKLIGHT_CLASS_DEVICE=y | ||
151 | # CONFIG_BACKLIGHT_GENERIC is not set | ||
152 | CONFIG_BACKLIGHT_PWM=y | ||
153 | CONFIG_FRAMEBUFFER_CONSOLE=y | ||
154 | CONFIG_LOGO=y | ||
141 | CONFIG_SOUND=y | 155 | CONFIG_SOUND=y |
142 | CONFIG_SND=y | 156 | CONFIG_SND=y |
143 | # CONFIG_SND_SUPPORT_OLD_API is not set | 157 | # CONFIG_SND_SUPPORT_OLD_API is not set |
@@ -205,6 +219,9 @@ CONFIG_EXT4_FS=y | |||
205 | CONFIG_VFAT_FS=y | 219 | CONFIG_VFAT_FS=y |
206 | CONFIG_TMPFS=y | 220 | CONFIG_TMPFS=y |
207 | CONFIG_TMPFS_POSIX_ACL=y | 221 | CONFIG_TMPFS_POSIX_ACL=y |
222 | CONFIG_SQUASHFS=y | ||
223 | CONFIG_SQUASHFS_LZO=y | ||
224 | CONFIG_SQUASHFS_XZ=y | ||
208 | CONFIG_NFS_FS=y | 225 | CONFIG_NFS_FS=y |
209 | CONFIG_ROOT_NFS=y | 226 | CONFIG_ROOT_NFS=y |
210 | CONFIG_NLS_CODEPAGE_437=y | 227 | CONFIG_NLS_CODEPAGE_437=y |
diff --git a/arch/arm/include/asm/hardware/sp810.h b/arch/arm/include/asm/hardware/sp810.h index afd7e916472f..6636430dd0e6 100644 --- a/arch/arm/include/asm/hardware/sp810.h +++ b/arch/arm/include/asm/hardware/sp810.h | |||
@@ -50,12 +50,6 @@ | |||
50 | #define SCPCELLID2 0xFF8 | 50 | #define SCPCELLID2 0xFF8 |
51 | #define SCPCELLID3 0xFFC | 51 | #define SCPCELLID3 0xFFC |
52 | 52 | ||
53 | #define SCCTRL_TIMEREN0SEL_REFCLK (0 << 15) | ||
54 | #define SCCTRL_TIMEREN0SEL_TIMCLK (1 << 15) | ||
55 | |||
56 | #define SCCTRL_TIMEREN1SEL_REFCLK (0 << 17) | ||
57 | #define SCCTRL_TIMEREN1SEL_TIMCLK (1 << 17) | ||
58 | |||
59 | #define SCCTRL_TIMERENnSEL_SHIFT(n) (15 + ((n) * 2)) | 53 | #define SCCTRL_TIMERENnSEL_SHIFT(n) (15 + ((n) * 2)) |
60 | 54 | ||
61 | static inline void sysctl_soft_reset(void __iomem *base) | 55 | static inline void sysctl_soft_reset(void __iomem *base) |
diff --git a/arch/arm/include/asm/mach/map.h b/arch/arm/include/asm/mach/map.h index 195ac2f9d3d3..2fe141fcc8d6 100644 --- a/arch/arm/include/asm/mach/map.h +++ b/arch/arm/include/asm/mach/map.h | |||
@@ -40,6 +40,13 @@ extern void iotable_init(struct map_desc *, int); | |||
40 | extern void vm_reserve_area_early(unsigned long addr, unsigned long size, | 40 | extern void vm_reserve_area_early(unsigned long addr, unsigned long size, |
41 | void *caller); | 41 | void *caller); |
42 | 42 | ||
43 | #ifdef CONFIG_DEBUG_LL | ||
44 | extern void debug_ll_addr(unsigned long *paddr, unsigned long *vaddr); | ||
45 | extern void debug_ll_io_init(void); | ||
46 | #else | ||
47 | static inline void debug_ll_io_init(void) {} | ||
48 | #endif | ||
49 | |||
43 | struct mem_type; | 50 | struct mem_type; |
44 | extern const struct mem_type *get_mem_type(unsigned int type); | 51 | extern const struct mem_type *get_mem_type(unsigned int type); |
45 | /* | 52 | /* |
diff --git a/arch/arm/include/debug/sunxi.S b/arch/arm/include/debug/sunxi.S new file mode 100644 index 000000000000..04eb56d5db2c --- /dev/null +++ b/arch/arm/include/debug/sunxi.S | |||
@@ -0,0 +1,27 @@ | |||
1 | /* | ||
2 | * Early serial output macro for Allwinner A1X SoCs | ||
3 | * | ||
4 | * Copyright (C) 2012 Maxime Ripard | ||
5 | * | ||
6 | * Maxime Ripard <maxime.ripard@free-electrons.com> | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License version 2 as | ||
10 | * published by the Free Software Foundation. | ||
11 | */ | ||
12 | |||
13 | #if defined(CONFIG_DEBUG_SUNXI_UART0) | ||
14 | #define SUNXI_UART_DEBUG_PHYS_BASE 0x01c28000 | ||
15 | #define SUNXI_UART_DEBUG_VIRT_BASE 0xf1c28000 | ||
16 | #elif defined(CONFIG_DEBUG_SUNXI_UART1) | ||
17 | #define SUNXI_UART_DEBUG_PHYS_BASE 0x01c28400 | ||
18 | #define SUNXI_UART_DEBUG_VIRT_BASE 0xf1c28400 | ||
19 | #endif | ||
20 | |||
21 | .macro addruart, rp, rv, tmp | ||
22 | ldr \rp, =SUNXI_UART_DEBUG_PHYS_BASE | ||
23 | ldr \rv, =SUNXI_UART_DEBUG_VIRT_BASE | ||
24 | .endm | ||
25 | |||
26 | #define UART_SHIFT 2 | ||
27 | #include <asm/hardware/debug-8250.S> | ||
diff --git a/arch/arm/kernel/debug.S b/arch/arm/kernel/debug.S index 66f711b2e0e8..6809200c31fb 100644 --- a/arch/arm/kernel/debug.S +++ b/arch/arm/kernel/debug.S | |||
@@ -100,6 +100,13 @@ ENTRY(printch) | |||
100 | b 1b | 100 | b 1b |
101 | ENDPROC(printch) | 101 | ENDPROC(printch) |
102 | 102 | ||
103 | ENTRY(debug_ll_addr) | ||
104 | addruart r2, r3, ip | ||
105 | str r2, [r0] | ||
106 | str r3, [r1] | ||
107 | mov pc, lr | ||
108 | ENDPROC(debug_ll_addr) | ||
109 | |||
103 | #else | 110 | #else |
104 | 111 | ||
105 | ENTRY(printascii) | 112 | ENTRY(printascii) |
@@ -119,4 +126,11 @@ ENTRY(printch) | |||
119 | mov pc, lr | 126 | mov pc, lr |
120 | ENDPROC(printch) | 127 | ENDPROC(printch) |
121 | 128 | ||
129 | ENTRY(debug_ll_addr) | ||
130 | mov r2, #0 | ||
131 | str r2, [r0] | ||
132 | str r2, [r1] | ||
133 | mov pc, lr | ||
134 | ENDPROC(debug_ll_addr) | ||
135 | |||
122 | #endif | 136 | #endif |
diff --git a/arch/arm/kernel/smp_twd.c b/arch/arm/kernel/smp_twd.c index ff07879ad95d..49f335d301ba 100644 --- a/arch/arm/kernel/smp_twd.c +++ b/arch/arm/kernel/smp_twd.c | |||
@@ -390,10 +390,8 @@ void __init twd_local_timer_of_register(void) | |||
390 | int err; | 390 | int err; |
391 | 391 | ||
392 | np = of_find_matching_node(NULL, twd_of_match); | 392 | np = of_find_matching_node(NULL, twd_of_match); |
393 | if (!np) { | 393 | if (!np) |
394 | err = -ENODEV; | 394 | return; |
395 | goto out; | ||
396 | } | ||
397 | 395 | ||
398 | twd_ppi = irq_of_parse_and_map(np, 0); | 396 | twd_ppi = irq_of_parse_and_map(np, 0); |
399 | if (!twd_ppi) { | 397 | if (!twd_ppi) { |
diff --git a/arch/arm/mach-bcm/Kconfig b/arch/arm/mach-bcm/Kconfig new file mode 100644 index 000000000000..48705c10a0fe --- /dev/null +++ b/arch/arm/mach-bcm/Kconfig | |||
@@ -0,0 +1,19 @@ | |||
1 | config ARCH_BCM | ||
2 | bool "Broadcom SoC" if ARCH_MULTI_V7 | ||
3 | depends on MMU | ||
4 | select ARCH_REQUIRE_GPIOLIB | ||
5 | select ARM_ERRATA_754322 | ||
6 | select ARM_ERRATA_764369 if SMP | ||
7 | select ARM_GIC | ||
8 | select CPU_V7 | ||
9 | select GENERIC_CLOCKEVENTS | ||
10 | select GENERIC_GPIO | ||
11 | select GENERIC_TIME | ||
12 | select GPIO_BCM | ||
13 | select SPARSE_IRQ | ||
14 | select TICK_ONESHOT | ||
15 | help | ||
16 | This enables support for system based on Broadcom SoCs. | ||
17 | It currently supports the 'BCM281XX' family, which includes | ||
18 | BCM11130, BCM11140, BCM11351, BCM28145 and | ||
19 | BCM28155 variants. | ||
diff --git a/arch/arm/mach-bcm/Makefile b/arch/arm/mach-bcm/Makefile new file mode 100644 index 000000000000..bbf412261e5e --- /dev/null +++ b/arch/arm/mach-bcm/Makefile | |||
@@ -0,0 +1,13 @@ | |||
1 | # | ||
2 | # Copyright (C) 2012 Broadcom Corporation | ||
3 | # | ||
4 | # This program is free software; you can redistribute it and/or | ||
5 | # modify it under the terms of the GNU General Public License as | ||
6 | # published by the Free Software Foundation version 2. | ||
7 | # | ||
8 | # This program is distributed "as is" WITHOUT ANY WARRANTY of any | ||
9 | # kind, whether express or implied; without even the implied warranty | ||
10 | # of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
11 | # GNU General Public License for more details. | ||
12 | |||
13 | obj-$(CONFIG_ARCH_BCM) := board_bcm.o | ||
diff --git a/arch/arm/mach-bcm/board_bcm.c b/arch/arm/mach-bcm/board_bcm.c new file mode 100644 index 000000000000..3a62f1b1cabc --- /dev/null +++ b/arch/arm/mach-bcm/board_bcm.c | |||
@@ -0,0 +1,57 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2012 Broadcom Corporation | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or | ||
5 | * modify it under the terms of the GNU General Public License as | ||
6 | * published by the Free Software Foundation version 2. | ||
7 | * | ||
8 | * This program is distributed "as is" WITHOUT ANY WARRANTY of any | ||
9 | * kind, whether express or implied; without even the implied warranty | ||
10 | * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
11 | * GNU General Public License for more details. | ||
12 | */ | ||
13 | |||
14 | #include <linux/of_irq.h> | ||
15 | #include <linux/of_platform.h> | ||
16 | #include <linux/init.h> | ||
17 | #include <linux/device.h> | ||
18 | #include <linux/platform_device.h> | ||
19 | |||
20 | #include <asm/mach/arch.h> | ||
21 | #include <asm/hardware/gic.h> | ||
22 | |||
23 | #include <asm/mach/time.h> | ||
24 | |||
25 | static const struct of_device_id irq_match[] = { | ||
26 | {.compatible = "arm,cortex-a9-gic", .data = gic_of_init, }, | ||
27 | {} | ||
28 | }; | ||
29 | |||
30 | static void timer_init(void) | ||
31 | { | ||
32 | } | ||
33 | |||
34 | static struct sys_timer timer = { | ||
35 | .init = timer_init, | ||
36 | }; | ||
37 | |||
38 | static void __init init_irq(void) | ||
39 | { | ||
40 | of_irq_init(irq_match); | ||
41 | } | ||
42 | |||
43 | static void __init board_init(void) | ||
44 | { | ||
45 | of_platform_populate(NULL, of_default_bus_match_table, NULL, | ||
46 | &platform_bus); | ||
47 | } | ||
48 | |||
49 | static const char * const bcm11351_dt_compat[] = { "bcm,bcm11351", NULL, }; | ||
50 | |||
51 | DT_MACHINE_START(BCM11351_DT, "Broadcom Application Processor") | ||
52 | .init_irq = init_irq, | ||
53 | .timer = &timer, | ||
54 | .init_machine = board_init, | ||
55 | .dt_compat = bcm11351_dt_compat, | ||
56 | .handle_irq = gic_handle_irq, | ||
57 | MACHINE_END | ||
diff --git a/arch/arm/mach-bcm2835/bcm2835.c b/arch/arm/mach-bcm2835/bcm2835.c index 53e3842c9330..f0d739f4b7a3 100644 --- a/arch/arm/mach-bcm2835/bcm2835.c +++ b/arch/arm/mach-bcm2835/bcm2835.c | |||
@@ -12,8 +12,10 @@ | |||
12 | * GNU General Public License for more details. | 12 | * GNU General Public License for more details. |
13 | */ | 13 | */ |
14 | 14 | ||
15 | #include <linux/delay.h> | ||
15 | #include <linux/init.h> | 16 | #include <linux/init.h> |
16 | #include <linux/irqchip/bcm2835.h> | 17 | #include <linux/irqchip/bcm2835.h> |
18 | #include <linux/of_address.h> | ||
17 | #include <linux/of_platform.h> | 19 | #include <linux/of_platform.h> |
18 | #include <linux/bcm2835_timer.h> | 20 | #include <linux/bcm2835_timer.h> |
19 | #include <linux/clk/bcm2835.h> | 21 | #include <linux/clk/bcm2835.h> |
@@ -23,6 +25,48 @@ | |||
23 | 25 | ||
24 | #include <mach/bcm2835_soc.h> | 26 | #include <mach/bcm2835_soc.h> |
25 | 27 | ||
28 | #define PM_RSTC 0x1c | ||
29 | #define PM_WDOG 0x24 | ||
30 | |||
31 | #define PM_PASSWORD 0x5a000000 | ||
32 | #define PM_RSTC_WRCFG_MASK 0x00000030 | ||
33 | #define PM_RSTC_WRCFG_FULL_RESET 0x00000020 | ||
34 | |||
35 | static void __iomem *wdt_regs; | ||
36 | |||
37 | /* | ||
38 | * The machine restart method can be called from an atomic context so we won't | ||
39 | * be able to ioremap the regs then. | ||
40 | */ | ||
41 | static void bcm2835_setup_restart(void) | ||
42 | { | ||
43 | struct device_node *np = of_find_compatible_node(NULL, NULL, | ||
44 | "brcm,bcm2835-pm-wdt"); | ||
45 | if (WARN(!np, "unable to setup watchdog restart")) | ||
46 | return; | ||
47 | |||
48 | wdt_regs = of_iomap(np, 0); | ||
49 | WARN(!wdt_regs, "failed to remap watchdog regs"); | ||
50 | } | ||
51 | |||
52 | static void bcm2835_restart(char mode, const char *cmd) | ||
53 | { | ||
54 | u32 val; | ||
55 | |||
56 | if (!wdt_regs) | ||
57 | return; | ||
58 | |||
59 | /* use a timeout of 10 ticks (~150us) */ | ||
60 | writel_relaxed(10 | PM_PASSWORD, wdt_regs + PM_WDOG); | ||
61 | val = readl_relaxed(wdt_regs + PM_RSTC); | ||
62 | val &= ~PM_RSTC_WRCFG_MASK; | ||
63 | val |= PM_PASSWORD | PM_RSTC_WRCFG_FULL_RESET; | ||
64 | writel_relaxed(val, wdt_regs + PM_RSTC); | ||
65 | |||
66 | /* No sleeping, possibly atomic. */ | ||
67 | mdelay(1); | ||
68 | } | ||
69 | |||
26 | static struct map_desc io_map __initdata = { | 70 | static struct map_desc io_map __initdata = { |
27 | .virtual = BCM2835_PERIPH_VIRT, | 71 | .virtual = BCM2835_PERIPH_VIRT, |
28 | .pfn = __phys_to_pfn(BCM2835_PERIPH_PHYS), | 72 | .pfn = __phys_to_pfn(BCM2835_PERIPH_PHYS), |
@@ -39,6 +83,7 @@ static void __init bcm2835_init(void) | |||
39 | { | 83 | { |
40 | int ret; | 84 | int ret; |
41 | 85 | ||
86 | bcm2835_setup_restart(); | ||
42 | bcm2835_init_clocks(); | 87 | bcm2835_init_clocks(); |
43 | 88 | ||
44 | ret = of_platform_populate(NULL, of_default_bus_match_table, NULL, | 89 | ret = of_platform_populate(NULL, of_default_bus_match_table, NULL, |
@@ -60,5 +105,6 @@ DT_MACHINE_START(BCM2835, "BCM2835") | |||
60 | .handle_irq = bcm2835_handle_irq, | 105 | .handle_irq = bcm2835_handle_irq, |
61 | .init_machine = bcm2835_init, | 106 | .init_machine = bcm2835_init, |
62 | .timer = &bcm2835_timer, | 107 | .timer = &bcm2835_timer, |
108 | .restart = bcm2835_restart, | ||
63 | .dt_compat = bcm2835_compat | 109 | .dt_compat = bcm2835_compat |
64 | MACHINE_END | 110 | MACHINE_END |
diff --git a/arch/arm/mach-bcm2835/include/mach/gpio.h b/arch/arm/mach-bcm2835/include/mach/gpio.h new file mode 100644 index 000000000000..40a8c178f10d --- /dev/null +++ b/arch/arm/mach-bcm2835/include/mach/gpio.h | |||
@@ -0,0 +1 @@ | |||
/* empty */ | |||
diff --git a/arch/arm/mach-clps711x/Kconfig b/arch/arm/mach-clps711x/Kconfig index 263242da2cb8..2d00165e85ec 100644 --- a/arch/arm/mach-clps711x/Kconfig +++ b/arch/arm/mach-clps711x/Kconfig | |||
@@ -10,7 +10,6 @@ config ARCH_AUTCPU12 | |||
10 | 10 | ||
11 | config ARCH_CDB89712 | 11 | config ARCH_CDB89712 |
12 | bool "CDB89712" | 12 | bool "CDB89712" |
13 | select ISA | ||
14 | help | 13 | help |
15 | This is an evaluation board from Cirrus for the CS89712 processor. | 14 | This is an evaluation board from Cirrus for the CS89712 processor. |
16 | The board includes 2 serial ports, Ethernet, IRDA, and expansion | 15 | The board includes 2 serial ports, Ethernet, IRDA, and expansion |
@@ -25,7 +24,6 @@ config ARCH_EDB7211 | |||
25 | bool "EDB7211" | 24 | bool "EDB7211" |
26 | select ARCH_SELECT_MEMORY_MODEL | 25 | select ARCH_SELECT_MEMORY_MODEL |
27 | select ARCH_SPARSEMEM_ENABLE | 26 | select ARCH_SPARSEMEM_ENABLE |
28 | select ISA | ||
29 | help | 27 | help |
30 | Say Y here if you intend to run this kernel on a Cirrus Logic EDB-7211 | 28 | Say Y here if you intend to run this kernel on a Cirrus Logic EDB-7211 |
31 | evaluation board. | 29 | evaluation board. |
diff --git a/arch/arm/mach-clps711x/Makefile b/arch/arm/mach-clps711x/Makefile index 6da6940b3656..992995af666a 100644 --- a/arch/arm/mach-clps711x/Makefile +++ b/arch/arm/mach-clps711x/Makefile | |||
@@ -9,9 +9,9 @@ obj-m := | |||
9 | obj-n := | 9 | obj-n := |
10 | obj- := | 10 | obj- := |
11 | 11 | ||
12 | obj-$(CONFIG_ARCH_AUTCPU12) += autcpu12.o | 12 | obj-$(CONFIG_ARCH_AUTCPU12) += board-autcpu12.o |
13 | obj-$(CONFIG_ARCH_CDB89712) += cdb89712.o | 13 | obj-$(CONFIG_ARCH_CDB89712) += board-cdb89712.o |
14 | obj-$(CONFIG_ARCH_CLEP7312) += clep7312.o | 14 | obj-$(CONFIG_ARCH_CLEP7312) += board-clep7312.o |
15 | obj-$(CONFIG_ARCH_EDB7211) += edb7211-arch.o edb7211-mm.o | 15 | obj-$(CONFIG_ARCH_EDB7211) += board-edb7211.o |
16 | obj-$(CONFIG_ARCH_FORTUNET) += fortunet.o | 16 | obj-$(CONFIG_ARCH_FORTUNET) += board-fortunet.o |
17 | obj-$(CONFIG_ARCH_P720T) += p720t.o | 17 | obj-$(CONFIG_ARCH_P720T) += board-p720t.o |
diff --git a/arch/arm/mach-clps711x/Makefile.boot b/arch/arm/mach-clps711x/Makefile.boot index 9398e859b5af..eba77d35a615 100644 --- a/arch/arm/mach-clps711x/Makefile.boot +++ b/arch/arm/mach-clps711x/Makefile.boot | |||
@@ -1,5 +1,4 @@ | |||
1 | # The standard locations for stuff on CLPS711x type processors | 1 | # The standard locations for stuff on CLPS711x type processors |
2 | zreladdr-y += 0xc0028000 | ||
3 | params_phys-y := 0xc0000100 | 2 | params_phys-y := 0xc0000100 |
4 | # Should probably have some agreement on these... | 3 | # Should probably have some agreement on these... |
5 | initrd_phys-$(CONFIG_ARCH_P720T) := 0xc0400000 | 4 | initrd_phys-$(CONFIG_ARCH_P720T) := 0xc0400000 |
diff --git a/arch/arm/mach-clps711x/autcpu12.c b/arch/arm/mach-clps711x/autcpu12.c deleted file mode 100644 index 32871918bb6e..000000000000 --- a/arch/arm/mach-clps711x/autcpu12.c +++ /dev/null | |||
@@ -1,92 +0,0 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/mach-clps711x/autcpu12.c | ||
3 | * | ||
4 | * (c) 2001 Thomas Gleixner, autronix automation <gleixner@autronix.de> | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License as published by | ||
8 | * the Free Software Foundation; either version 2 of the License, or | ||
9 | * (at your option) any later version. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
19 | */ | ||
20 | #include <linux/kernel.h> | ||
21 | #include <linux/init.h> | ||
22 | #include <linux/types.h> | ||
23 | #include <linux/string.h> | ||
24 | #include <linux/mm.h> | ||
25 | #include <linux/io.h> | ||
26 | #include <linux/ioport.h> | ||
27 | #include <linux/platform_device.h> | ||
28 | |||
29 | #include <mach/hardware.h> | ||
30 | #include <asm/sizes.h> | ||
31 | #include <asm/setup.h> | ||
32 | #include <asm/mach-types.h> | ||
33 | #include <asm/mach/arch.h> | ||
34 | #include <asm/pgtable.h> | ||
35 | #include <asm/page.h> | ||
36 | |||
37 | #include <asm/mach/map.h> | ||
38 | #include <mach/autcpu12.h> | ||
39 | |||
40 | #include "common.h" | ||
41 | |||
42 | /* | ||
43 | * The on-chip registers are given a size of 1MB so that a section can | ||
44 | * be used to map them; this saves a page table. This is the place to | ||
45 | * add mappings for ROM, expansion memory, PCMCIA, etc. (if static | ||
46 | * mappings are chosen for those areas). | ||
47 | * | ||
48 | */ | ||
49 | |||
50 | static struct map_desc autcpu12_io_desc[] __initdata = { | ||
51 | /* memory-mapped extra io and CS8900A Ethernet chip */ | ||
52 | /* ethernet chip */ | ||
53 | { | ||
54 | .virtual = AUTCPU12_VIRT_CS8900A, | ||
55 | .pfn = __phys_to_pfn(AUTCPU12_PHYS_CS8900A), | ||
56 | .length = SZ_1M, | ||
57 | .type = MT_DEVICE | ||
58 | } | ||
59 | }; | ||
60 | |||
61 | void __init autcpu12_map_io(void) | ||
62 | { | ||
63 | clps711x_map_io(); | ||
64 | iotable_init(autcpu12_io_desc, ARRAY_SIZE(autcpu12_io_desc)); | ||
65 | } | ||
66 | |||
67 | static struct resource autcpu12_nvram_resource[] __initdata = { | ||
68 | DEFINE_RES_MEM_NAMED(AUTCPU12_PHYS_NVRAM, SZ_128K, "SRAM"), | ||
69 | }; | ||
70 | |||
71 | static struct platform_device autcpu12_nvram_pdev __initdata = { | ||
72 | .name = "autcpu12_nvram", | ||
73 | .id = -1, | ||
74 | .resource = autcpu12_nvram_resource, | ||
75 | .num_resources = ARRAY_SIZE(autcpu12_nvram_resource), | ||
76 | }; | ||
77 | |||
78 | static void __init autcpu12_init(void) | ||
79 | { | ||
80 | platform_device_register(&autcpu12_nvram_pdev); | ||
81 | } | ||
82 | |||
83 | MACHINE_START(AUTCPU12, "autronix autcpu12") | ||
84 | /* Maintainer: Thomas Gleixner */ | ||
85 | .atag_offset = 0x20000, | ||
86 | .init_machine = autcpu12_init, | ||
87 | .map_io = autcpu12_map_io, | ||
88 | .init_irq = clps711x_init_irq, | ||
89 | .timer = &clps711x_timer, | ||
90 | .restart = clps711x_restart, | ||
91 | MACHINE_END | ||
92 | |||
diff --git a/arch/arm/mach-clps711x/board-autcpu12.c b/arch/arm/mach-clps711x/board-autcpu12.c new file mode 100644 index 000000000000..3fbf43f72589 --- /dev/null +++ b/arch/arm/mach-clps711x/board-autcpu12.c | |||
@@ -0,0 +1,179 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/mach-clps711x/autcpu12.c | ||
3 | * | ||
4 | * (c) 2001 Thomas Gleixner, autronix automation <gleixner@autronix.de> | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License as published by | ||
8 | * the Free Software Foundation; either version 2 of the License, or | ||
9 | * (at your option) any later version. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
19 | */ | ||
20 | #include <linux/kernel.h> | ||
21 | #include <linux/init.h> | ||
22 | #include <linux/types.h> | ||
23 | #include <linux/string.h> | ||
24 | #include <linux/mm.h> | ||
25 | #include <linux/io.h> | ||
26 | #include <linux/gpio.h> | ||
27 | #include <linux/ioport.h> | ||
28 | #include <linux/interrupt.h> | ||
29 | #include <linux/mtd/partitions.h> | ||
30 | #include <linux/mtd/nand-gpio.h> | ||
31 | #include <linux/platform_device.h> | ||
32 | #include <linux/basic_mmio_gpio.h> | ||
33 | |||
34 | #include <mach/hardware.h> | ||
35 | #include <asm/sizes.h> | ||
36 | #include <asm/setup.h> | ||
37 | #include <asm/mach-types.h> | ||
38 | #include <asm/mach/arch.h> | ||
39 | #include <asm/pgtable.h> | ||
40 | #include <asm/page.h> | ||
41 | |||
42 | #include <asm/mach/map.h> | ||
43 | #include <mach/autcpu12.h> | ||
44 | |||
45 | #include "common.h" | ||
46 | |||
47 | #define AUTCPU12_CS8900_BASE (CS2_PHYS_BASE + 0x300) | ||
48 | #define AUTCPU12_CS8900_IRQ (IRQ_EINT3) | ||
49 | |||
50 | #define AUTCPU12_SMC_BASE (CS1_PHYS_BASE + 0x06000000) | ||
51 | #define AUTCPU12_SMC_SEL_BASE (AUTCPU12_SMC_BASE + 0x10) | ||
52 | |||
53 | #define AUTCPU12_MMGPIO_BASE (CLPS711X_NR_GPIO) | ||
54 | #define AUTCPU12_SMC_NCE (AUTCPU12_MMGPIO_BASE + 0) /* Bit 0 */ | ||
55 | #define AUTCPU12_SMC_RDY CLPS711X_GPIO(1, 2) | ||
56 | #define AUTCPU12_SMC_ALE CLPS711X_GPIO(1, 3) | ||
57 | #define AUTCPU12_SMC_CLE CLPS711X_GPIO(1, 3) | ||
58 | |||
59 | static struct resource autcpu12_cs8900_resource[] __initdata = { | ||
60 | DEFINE_RES_MEM(AUTCPU12_CS8900_BASE, SZ_1K), | ||
61 | DEFINE_RES_IRQ(AUTCPU12_CS8900_IRQ), | ||
62 | }; | ||
63 | |||
64 | static struct resource autcpu12_nvram_resource[] __initdata = { | ||
65 | DEFINE_RES_MEM_NAMED(AUTCPU12_PHYS_NVRAM, SZ_128K, "SRAM"), | ||
66 | }; | ||
67 | |||
68 | static struct platform_device autcpu12_nvram_pdev __initdata = { | ||
69 | .name = "autcpu12_nvram", | ||
70 | .id = -1, | ||
71 | .resource = autcpu12_nvram_resource, | ||
72 | .num_resources = ARRAY_SIZE(autcpu12_nvram_resource), | ||
73 | }; | ||
74 | |||
75 | static struct resource autcpu12_nand_resource[] __initdata = { | ||
76 | DEFINE_RES_MEM(AUTCPU12_SMC_BASE, SZ_16), | ||
77 | }; | ||
78 | |||
79 | static struct mtd_partition autcpu12_nand_parts[] __initdata = { | ||
80 | { | ||
81 | .name = "Flash partition 1", | ||
82 | .offset = 0, | ||
83 | .size = SZ_8M, | ||
84 | }, | ||
85 | { | ||
86 | .name = "Flash partition 2", | ||
87 | .offset = MTDPART_OFS_APPEND, | ||
88 | .size = MTDPART_SIZ_FULL, | ||
89 | }, | ||
90 | }; | ||
91 | |||
92 | static void __init autcpu12_adjust_parts(struct gpio_nand_platdata *pdata, | ||
93 | size_t sz) | ||
94 | { | ||
95 | switch (sz) { | ||
96 | case SZ_16M: | ||
97 | case SZ_32M: | ||
98 | break; | ||
99 | case SZ_64M: | ||
100 | case SZ_128M: | ||
101 | pdata->parts[0].size = SZ_16M; | ||
102 | break; | ||
103 | default: | ||
104 | pr_warn("Unsupported SmartMedia device size %u\n", sz); | ||
105 | break; | ||
106 | } | ||
107 | } | ||
108 | |||
109 | static struct gpio_nand_platdata autcpu12_nand_pdata __initdata = { | ||
110 | .gpio_rdy = AUTCPU12_SMC_RDY, | ||
111 | .gpio_nce = AUTCPU12_SMC_NCE, | ||
112 | .gpio_ale = AUTCPU12_SMC_ALE, | ||
113 | .gpio_cle = AUTCPU12_SMC_CLE, | ||
114 | .gpio_nwp = -1, | ||
115 | .chip_delay = 20, | ||
116 | .parts = autcpu12_nand_parts, | ||
117 | .num_parts = ARRAY_SIZE(autcpu12_nand_parts), | ||
118 | .adjust_parts = autcpu12_adjust_parts, | ||
119 | }; | ||
120 | |||
121 | static struct platform_device autcpu12_nand_pdev __initdata = { | ||
122 | .name = "gpio-nand", | ||
123 | .id = -1, | ||
124 | .resource = autcpu12_nand_resource, | ||
125 | .num_resources = ARRAY_SIZE(autcpu12_nand_resource), | ||
126 | .dev = { | ||
127 | .platform_data = &autcpu12_nand_pdata, | ||
128 | }, | ||
129 | }; | ||
130 | |||
131 | static struct resource autcpu12_mmgpio_resource[] __initdata = { | ||
132 | DEFINE_RES_MEM_NAMED(AUTCPU12_SMC_SEL_BASE, SZ_1, "dat"), | ||
133 | }; | ||
134 | |||
135 | static struct bgpio_pdata autcpu12_mmgpio_pdata __initdata = { | ||
136 | .base = AUTCPU12_MMGPIO_BASE, | ||
137 | .ngpio = 8, | ||
138 | }; | ||
139 | |||
140 | static struct platform_device autcpu12_mmgpio_pdev __initdata = { | ||
141 | .name = "basic-mmio-gpio", | ||
142 | .id = -1, | ||
143 | .resource = autcpu12_mmgpio_resource, | ||
144 | .num_resources = ARRAY_SIZE(autcpu12_mmgpio_resource), | ||
145 | .dev = { | ||
146 | .platform_data = &autcpu12_mmgpio_pdata, | ||
147 | }, | ||
148 | }; | ||
149 | |||
150 | static void __init autcpu12_init(void) | ||
151 | { | ||
152 | platform_device_register_simple("video-clps711x", 0, NULL, 0); | ||
153 | platform_device_register_simple("cs89x0", 0, autcpu12_cs8900_resource, | ||
154 | ARRAY_SIZE(autcpu12_cs8900_resource)); | ||
155 | platform_device_register(&autcpu12_mmgpio_pdev); | ||
156 | platform_device_register(&autcpu12_nvram_pdev); | ||
157 | } | ||
158 | |||
159 | static void __init autcpu12_init_late(void) | ||
160 | { | ||
161 | if (IS_ENABLED(MTD_NAND_GPIO) && IS_ENABLED(GPIO_GENERIC_PLATFORM)) { | ||
162 | /* We are need both drivers to handle NAND */ | ||
163 | platform_device_register(&autcpu12_nand_pdev); | ||
164 | } | ||
165 | } | ||
166 | |||
167 | MACHINE_START(AUTCPU12, "autronix autcpu12") | ||
168 | /* Maintainer: Thomas Gleixner */ | ||
169 | .atag_offset = 0x20000, | ||
170 | .nr_irqs = CLPS711X_NR_IRQS, | ||
171 | .map_io = clps711x_map_io, | ||
172 | .init_irq = clps711x_init_irq, | ||
173 | .timer = &clps711x_timer, | ||
174 | .init_machine = autcpu12_init, | ||
175 | .init_late = autcpu12_init_late, | ||
176 | .handle_irq = clps711x_handle_irq, | ||
177 | .restart = clps711x_restart, | ||
178 | MACHINE_END | ||
179 | |||
diff --git a/arch/arm/mach-clps711x/board-cdb89712.c b/arch/arm/mach-clps711x/board-cdb89712.c new file mode 100644 index 000000000000..60900ddf97c9 --- /dev/null +++ b/arch/arm/mach-clps711x/board-cdb89712.c | |||
@@ -0,0 +1,147 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/mach-clps711x/cdb89712.c | ||
3 | * | ||
4 | * Copyright (C) 2000-2001 Deep Blue Solutions Ltd | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License as published by | ||
8 | * the Free Software Foundation; either version 2 of the License, or | ||
9 | * (at your option) any later version. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
19 | */ | ||
20 | #include <linux/kernel.h> | ||
21 | #include <linux/init.h> | ||
22 | #include <linux/types.h> | ||
23 | #include <linux/string.h> | ||
24 | #include <linux/mm.h> | ||
25 | #include <linux/io.h> | ||
26 | #include <linux/interrupt.h> | ||
27 | #include <linux/platform_device.h> | ||
28 | |||
29 | #include <linux/mtd/physmap.h> | ||
30 | #include <linux/mtd/plat-ram.h> | ||
31 | #include <linux/mtd/partitions.h> | ||
32 | |||
33 | #include <mach/hardware.h> | ||
34 | #include <asm/pgtable.h> | ||
35 | #include <asm/page.h> | ||
36 | #include <asm/setup.h> | ||
37 | #include <asm/mach-types.h> | ||
38 | #include <asm/mach/arch.h> | ||
39 | #include <asm/mach/map.h> | ||
40 | |||
41 | #include "common.h" | ||
42 | |||
43 | #define CDB89712_CS8900_BASE (CS2_PHYS_BASE + 0x300) | ||
44 | #define CDB89712_CS8900_IRQ (IRQ_EINT3) | ||
45 | |||
46 | static struct resource cdb89712_cs8900_resource[] __initdata = { | ||
47 | DEFINE_RES_MEM(CDB89712_CS8900_BASE, SZ_1K), | ||
48 | DEFINE_RES_IRQ(CDB89712_CS8900_IRQ), | ||
49 | }; | ||
50 | |||
51 | static struct mtd_partition cdb89712_flash_partitions[] __initdata = { | ||
52 | { | ||
53 | .name = "Flash", | ||
54 | .offset = 0, | ||
55 | .size = MTDPART_SIZ_FULL, | ||
56 | }, | ||
57 | }; | ||
58 | |||
59 | static struct physmap_flash_data cdb89712_flash_pdata __initdata = { | ||
60 | .width = 4, | ||
61 | .probe_type = "map_rom", | ||
62 | .parts = cdb89712_flash_partitions, | ||
63 | .nr_parts = ARRAY_SIZE(cdb89712_flash_partitions), | ||
64 | }; | ||
65 | |||
66 | static struct resource cdb89712_flash_resources[] __initdata = { | ||
67 | DEFINE_RES_MEM(CS0_PHYS_BASE, SZ_8M), | ||
68 | }; | ||
69 | |||
70 | static struct platform_device cdb89712_flash_pdev __initdata = { | ||
71 | .name = "physmap-flash", | ||
72 | .id = 0, | ||
73 | .resource = cdb89712_flash_resources, | ||
74 | .num_resources = ARRAY_SIZE(cdb89712_flash_resources), | ||
75 | .dev = { | ||
76 | .platform_data = &cdb89712_flash_pdata, | ||
77 | }, | ||
78 | }; | ||
79 | |||
80 | static struct mtd_partition cdb89712_bootrom_partitions[] __initdata = { | ||
81 | { | ||
82 | .name = "BootROM", | ||
83 | .offset = 0, | ||
84 | .size = MTDPART_SIZ_FULL, | ||
85 | }, | ||
86 | }; | ||
87 | |||
88 | static struct physmap_flash_data cdb89712_bootrom_pdata __initdata = { | ||
89 | .width = 4, | ||
90 | .probe_type = "map_rom", | ||
91 | .parts = cdb89712_bootrom_partitions, | ||
92 | .nr_parts = ARRAY_SIZE(cdb89712_bootrom_partitions), | ||
93 | }; | ||
94 | |||
95 | static struct resource cdb89712_bootrom_resources[] __initdata = { | ||
96 | DEFINE_RES_NAMED(CS7_PHYS_BASE, SZ_128, "BOOTROM", IORESOURCE_MEM | | ||
97 | IORESOURCE_CACHEABLE | IORESOURCE_READONLY), | ||
98 | }; | ||
99 | |||
100 | static struct platform_device cdb89712_bootrom_pdev __initdata = { | ||
101 | .name = "physmap-flash", | ||
102 | .id = 1, | ||
103 | .resource = cdb89712_bootrom_resources, | ||
104 | .num_resources = ARRAY_SIZE(cdb89712_bootrom_resources), | ||
105 | .dev = { | ||
106 | .platform_data = &cdb89712_bootrom_pdata, | ||
107 | }, | ||
108 | }; | ||
109 | |||
110 | static struct platdata_mtd_ram cdb89712_sram_pdata __initdata = { | ||
111 | .bankwidth = 4, | ||
112 | }; | ||
113 | |||
114 | static struct resource cdb89712_sram_resources[] __initdata = { | ||
115 | DEFINE_RES_MEM(CLPS711X_SRAM_BASE, CLPS711X_SRAM_SIZE), | ||
116 | }; | ||
117 | |||
118 | static struct platform_device cdb89712_sram_pdev __initdata = { | ||
119 | .name = "mtd-ram", | ||
120 | .id = 0, | ||
121 | .resource = cdb89712_sram_resources, | ||
122 | .num_resources = ARRAY_SIZE(cdb89712_sram_resources), | ||
123 | .dev = { | ||
124 | .platform_data = &cdb89712_sram_pdata, | ||
125 | }, | ||
126 | }; | ||
127 | |||
128 | static void __init cdb89712_init(void) | ||
129 | { | ||
130 | platform_device_register(&cdb89712_flash_pdev); | ||
131 | platform_device_register(&cdb89712_bootrom_pdev); | ||
132 | platform_device_register(&cdb89712_sram_pdev); | ||
133 | platform_device_register_simple("cs89x0", 0, cdb89712_cs8900_resource, | ||
134 | ARRAY_SIZE(cdb89712_cs8900_resource)); | ||
135 | } | ||
136 | |||
137 | MACHINE_START(CDB89712, "Cirrus-CDB89712") | ||
138 | /* Maintainer: Ray Lehtiniemi */ | ||
139 | .atag_offset = 0x100, | ||
140 | .nr_irqs = CLPS711X_NR_IRQS, | ||
141 | .map_io = clps711x_map_io, | ||
142 | .init_irq = clps711x_init_irq, | ||
143 | .timer = &clps711x_timer, | ||
144 | .init_machine = cdb89712_init, | ||
145 | .handle_irq = clps711x_handle_irq, | ||
146 | .restart = clps711x_restart, | ||
147 | MACHINE_END | ||
diff --git a/arch/arm/mach-clps711x/clep7312.c b/arch/arm/mach-clps711x/board-clep7312.c index dbc7842639dc..0b32a487183b 100644 --- a/arch/arm/mach-clps711x/clep7312.c +++ b/arch/arm/mach-clps711x/board-clep7312.c | |||
@@ -33,14 +33,14 @@ fixup_clep7312(struct tag *tags, char **cmdline, struct meminfo *mi) | |||
33 | mi->bank[0].size = 0x01000000; | 33 | mi->bank[0].size = 0x01000000; |
34 | } | 34 | } |
35 | 35 | ||
36 | |||
37 | MACHINE_START(CLEP7212, "Cirrus Logic 7212/7312") | 36 | MACHINE_START(CLEP7212, "Cirrus Logic 7212/7312") |
38 | /* Maintainer: Nobody */ | 37 | /* Maintainer: Nobody */ |
39 | .atag_offset = 0x0100, | 38 | .atag_offset = 0x0100, |
39 | .nr_irqs = CLPS711X_NR_IRQS, | ||
40 | .fixup = fixup_clep7312, | 40 | .fixup = fixup_clep7312, |
41 | .map_io = clps711x_map_io, | 41 | .map_io = clps711x_map_io, |
42 | .init_irq = clps711x_init_irq, | 42 | .init_irq = clps711x_init_irq, |
43 | .timer = &clps711x_timer, | 43 | .timer = &clps711x_timer, |
44 | .handle_irq = clps711x_handle_irq, | ||
44 | .restart = clps711x_restart, | 45 | .restart = clps711x_restart, |
45 | MACHINE_END | 46 | MACHINE_END |
46 | |||
diff --git a/arch/arm/mach-clps711x/board-edb7211.c b/arch/arm/mach-clps711x/board-edb7211.c new file mode 100644 index 000000000000..71aa5cf2c0d3 --- /dev/null +++ b/arch/arm/mach-clps711x/board-edb7211.c | |||
@@ -0,0 +1,180 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2000, 2001 Blue Mug, Inc. All Rights Reserved. | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify | ||
5 | * it under the terms of the GNU General Public License as published by | ||
6 | * the Free Software Foundation; either version 2 of the License, or | ||
7 | * (at your option) any later version. | ||
8 | */ | ||
9 | |||
10 | #include <linux/init.h> | ||
11 | #include <linux/gpio.h> | ||
12 | #include <linux/delay.h> | ||
13 | #include <linux/memblock.h> | ||
14 | #include <linux/types.h> | ||
15 | #include <linux/interrupt.h> | ||
16 | #include <linux/backlight.h> | ||
17 | #include <linux/platform_device.h> | ||
18 | |||
19 | #include <linux/mtd/physmap.h> | ||
20 | #include <linux/mtd/partitions.h> | ||
21 | |||
22 | #include <asm/setup.h> | ||
23 | #include <asm/mach/map.h> | ||
24 | #include <asm/mach/arch.h> | ||
25 | #include <asm/mach-types.h> | ||
26 | |||
27 | #include <video/platform_lcd.h> | ||
28 | |||
29 | #include <mach/hardware.h> | ||
30 | |||
31 | #include "common.h" | ||
32 | |||
33 | #define VIDEORAM_SIZE SZ_128K | ||
34 | |||
35 | #define EDB7211_LCD_DC_DC_EN CLPS711X_GPIO(3, 1) | ||
36 | #define EDB7211_LCDEN CLPS711X_GPIO(3, 2) | ||
37 | #define EDB7211_LCDBL CLPS711X_GPIO(3, 3) | ||
38 | |||
39 | #define EDB7211_FLASH0_BASE (CS0_PHYS_BASE) | ||
40 | #define EDB7211_FLASH1_BASE (CS1_PHYS_BASE) | ||
41 | #define EDB7211_CS8900_BASE (CS2_PHYS_BASE + 0x300) | ||
42 | #define EDB7211_CS8900_IRQ (IRQ_EINT3) | ||
43 | |||
44 | static struct resource edb7211_cs8900_resource[] __initdata = { | ||
45 | DEFINE_RES_MEM(EDB7211_CS8900_BASE, SZ_1K), | ||
46 | DEFINE_RES_IRQ(EDB7211_CS8900_IRQ), | ||
47 | }; | ||
48 | |||
49 | static struct mtd_partition edb7211_flash_partitions[] __initdata = { | ||
50 | { | ||
51 | .name = "Flash", | ||
52 | .offset = 0, | ||
53 | .size = MTDPART_SIZ_FULL, | ||
54 | }, | ||
55 | }; | ||
56 | |||
57 | static struct physmap_flash_data edb7211_flash_pdata __initdata = { | ||
58 | .width = 4, | ||
59 | .parts = edb7211_flash_partitions, | ||
60 | .nr_parts = ARRAY_SIZE(edb7211_flash_partitions), | ||
61 | }; | ||
62 | |||
63 | static struct resource edb7211_flash_resources[] __initdata = { | ||
64 | DEFINE_RES_MEM(EDB7211_FLASH0_BASE, SZ_8M), | ||
65 | DEFINE_RES_MEM(EDB7211_FLASH1_BASE, SZ_8M), | ||
66 | }; | ||
67 | |||
68 | static struct platform_device edb7211_flash_pdev __initdata = { | ||
69 | .name = "physmap-flash", | ||
70 | .id = 0, | ||
71 | .resource = edb7211_flash_resources, | ||
72 | .num_resources = ARRAY_SIZE(edb7211_flash_resources), | ||
73 | .dev = { | ||
74 | .platform_data = &edb7211_flash_pdata, | ||
75 | }, | ||
76 | }; | ||
77 | |||
78 | static void edb7211_lcd_power_set(struct plat_lcd_data *pd, unsigned int power) | ||
79 | { | ||
80 | if (power) { | ||
81 | gpio_set_value(EDB7211_LCDEN, 1); | ||
82 | udelay(100); | ||
83 | gpio_set_value(EDB7211_LCD_DC_DC_EN, 1); | ||
84 | } else { | ||
85 | gpio_set_value(EDB7211_LCD_DC_DC_EN, 0); | ||
86 | udelay(100); | ||
87 | gpio_set_value(EDB7211_LCDEN, 0); | ||
88 | } | ||
89 | } | ||
90 | |||
91 | static struct plat_lcd_data edb7211_lcd_power_pdata = { | ||
92 | .set_power = edb7211_lcd_power_set, | ||
93 | }; | ||
94 | |||
95 | static void edb7211_lcd_backlight_set_intensity(int intensity) | ||
96 | { | ||
97 | gpio_set_value(EDB7211_LCDBL, intensity); | ||
98 | } | ||
99 | |||
100 | static struct generic_bl_info edb7211_lcd_backlight_pdata = { | ||
101 | .name = "lcd-backlight.0", | ||
102 | .default_intensity = 0x01, | ||
103 | .max_intensity = 0x01, | ||
104 | .set_bl_intensity = edb7211_lcd_backlight_set_intensity, | ||
105 | }; | ||
106 | |||
107 | static struct gpio edb7211_gpios[] __initconst = { | ||
108 | { EDB7211_LCD_DC_DC_EN, GPIOF_OUT_INIT_LOW, "LCD DC-DC" }, | ||
109 | { EDB7211_LCDEN, GPIOF_OUT_INIT_LOW, "LCD POWER" }, | ||
110 | { EDB7211_LCDBL, GPIOF_OUT_INIT_LOW, "LCD BACKLIGHT" }, | ||
111 | }; | ||
112 | |||
113 | static struct map_desc edb7211_io_desc[] __initdata = { | ||
114 | { /* Memory-mapped extra keyboard row */ | ||
115 | .virtual = IO_ADDRESS(EP7211_PHYS_EXTKBD), | ||
116 | .pfn = __phys_to_pfn(EP7211_PHYS_EXTKBD), | ||
117 | .length = SZ_1M, | ||
118 | .type = MT_DEVICE, | ||
119 | }, | ||
120 | }; | ||
121 | |||
122 | void __init edb7211_map_io(void) | ||
123 | { | ||
124 | clps711x_map_io(); | ||
125 | iotable_init(edb7211_io_desc, ARRAY_SIZE(edb7211_io_desc)); | ||
126 | } | ||
127 | |||
128 | /* Reserve screen memory region at the start of main system memory. */ | ||
129 | static void __init edb7211_reserve(void) | ||
130 | { | ||
131 | memblock_reserve(PHYS_OFFSET, VIDEORAM_SIZE); | ||
132 | } | ||
133 | |||
134 | static void __init | ||
135 | fixup_edb7211(struct tag *tags, char **cmdline, struct meminfo *mi) | ||
136 | { | ||
137 | /* | ||
138 | * Bank start addresses are not present in the information | ||
139 | * passed in from the boot loader. We could potentially | ||
140 | * detect them, but instead we hard-code them. | ||
141 | * | ||
142 | * Banks sizes _are_ present in the param block, but we're | ||
143 | * not using that information yet. | ||
144 | */ | ||
145 | mi->bank[0].start = 0xc0000000; | ||
146 | mi->bank[0].size = SZ_8M; | ||
147 | mi->bank[1].start = 0xc1000000; | ||
148 | mi->bank[1].size = SZ_8M; | ||
149 | mi->nr_banks = 2; | ||
150 | } | ||
151 | |||
152 | static void __init edb7211_init(void) | ||
153 | { | ||
154 | gpio_request_array(edb7211_gpios, ARRAY_SIZE(edb7211_gpios)); | ||
155 | |||
156 | platform_device_register(&edb7211_flash_pdev); | ||
157 | platform_device_register_data(&platform_bus, "platform-lcd", 0, | ||
158 | &edb7211_lcd_power_pdata, | ||
159 | sizeof(edb7211_lcd_power_pdata)); | ||
160 | platform_device_register_data(&platform_bus, "generic-bl", 0, | ||
161 | &edb7211_lcd_backlight_pdata, | ||
162 | sizeof(edb7211_lcd_backlight_pdata)); | ||
163 | platform_device_register_simple("video-clps711x", 0, NULL, 0); | ||
164 | platform_device_register_simple("cs89x0", 0, edb7211_cs8900_resource, | ||
165 | ARRAY_SIZE(edb7211_cs8900_resource)); | ||
166 | } | ||
167 | |||
168 | MACHINE_START(EDB7211, "CL-EDB7211 (EP7211 eval board)") | ||
169 | /* Maintainer: Jon McClintock */ | ||
170 | .atag_offset = VIDEORAM_SIZE + 0x100, | ||
171 | .nr_irqs = CLPS711X_NR_IRQS, | ||
172 | .fixup = fixup_edb7211, | ||
173 | .reserve = edb7211_reserve, | ||
174 | .map_io = edb7211_map_io, | ||
175 | .init_irq = clps711x_init_irq, | ||
176 | .timer = &clps711x_timer, | ||
177 | .init_machine = edb7211_init, | ||
178 | .handle_irq = clps711x_handle_irq, | ||
179 | .restart = clps711x_restart, | ||
180 | MACHINE_END | ||
diff --git a/arch/arm/mach-clps711x/fortunet.c b/arch/arm/mach-clps711x/board-fortunet.c index 3a3f0b702cb4..7d0125580366 100644 --- a/arch/arm/mach-clps711x/fortunet.c +++ b/arch/arm/mach-clps711x/board-fortunet.c | |||
@@ -74,9 +74,11 @@ fortunet_fixup(struct tag *tags, char **cmdline, struct meminfo *mi) | |||
74 | 74 | ||
75 | MACHINE_START(FORTUNET, "ARM-FortuNet") | 75 | MACHINE_START(FORTUNET, "ARM-FortuNet") |
76 | /* Maintainer: FortuNet Inc. */ | 76 | /* Maintainer: FortuNet Inc. */ |
77 | .nr_irqs = CLPS711X_NR_IRQS, | ||
77 | .fixup = fortunet_fixup, | 78 | .fixup = fortunet_fixup, |
78 | .map_io = clps711x_map_io, | 79 | .map_io = clps711x_map_io, |
79 | .init_irq = clps711x_init_irq, | 80 | .init_irq = clps711x_init_irq, |
80 | .timer = &clps711x_timer, | 81 | .timer = &clps711x_timer, |
82 | .handle_irq = clps711x_handle_irq, | ||
81 | .restart = clps711x_restart, | 83 | .restart = clps711x_restart, |
82 | MACHINE_END | 84 | MACHINE_END |
diff --git a/arch/arm/mach-clps711x/board-p720t.c b/arch/arm/mach-clps711x/board-p720t.c new file mode 100644 index 000000000000..1518fc83babd --- /dev/null +++ b/arch/arm/mach-clps711x/board-p720t.c | |||
@@ -0,0 +1,232 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/mach-clps711x/p720t.c | ||
3 | * | ||
4 | * Copyright (C) 2000-2001 Deep Blue Solutions Ltd | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License as published by | ||
8 | * the Free Software Foundation; either version 2 of the License, or | ||
9 | * (at your option) any later version. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
19 | */ | ||
20 | #include <linux/kernel.h> | ||
21 | #include <linux/init.h> | ||
22 | #include <linux/types.h> | ||
23 | #include <linux/string.h> | ||
24 | #include <linux/mm.h> | ||
25 | #include <linux/io.h> | ||
26 | #include <linux/slab.h> | ||
27 | #include <linux/leds.h> | ||
28 | #include <linux/sizes.h> | ||
29 | #include <linux/backlight.h> | ||
30 | #include <linux/platform_device.h> | ||
31 | #include <linux/mtd/partitions.h> | ||
32 | #include <linux/mtd/nand-gpio.h> | ||
33 | |||
34 | #include <mach/hardware.h> | ||
35 | #include <asm/pgtable.h> | ||
36 | #include <asm/page.h> | ||
37 | #include <asm/setup.h> | ||
38 | #include <asm/mach-types.h> | ||
39 | #include <asm/mach/arch.h> | ||
40 | #include <asm/mach/map.h> | ||
41 | #include <mach/syspld.h> | ||
42 | |||
43 | #include <video/platform_lcd.h> | ||
44 | |||
45 | #include "common.h" | ||
46 | |||
47 | #define P720T_USERLED CLPS711X_GPIO(3, 0) | ||
48 | #define P720T_NAND_CLE CLPS711X_GPIO(4, 0) | ||
49 | #define P720T_NAND_ALE CLPS711X_GPIO(4, 1) | ||
50 | #define P720T_NAND_NCE CLPS711X_GPIO(4, 2) | ||
51 | |||
52 | #define P720T_NAND_BASE (CLPS711X_SDRAM1_BASE) | ||
53 | |||
54 | static struct resource p720t_nand_resource[] __initdata = { | ||
55 | DEFINE_RES_MEM(P720T_NAND_BASE, SZ_4), | ||
56 | }; | ||
57 | |||
58 | static struct mtd_partition p720t_nand_parts[] __initdata = { | ||
59 | { | ||
60 | .name = "Flash partition 1", | ||
61 | .offset = 0, | ||
62 | .size = SZ_2M, | ||
63 | }, | ||
64 | { | ||
65 | .name = "Flash partition 2", | ||
66 | .offset = MTDPART_OFS_APPEND, | ||
67 | .size = MTDPART_SIZ_FULL, | ||
68 | }, | ||
69 | }; | ||
70 | |||
71 | static struct gpio_nand_platdata p720t_nand_pdata __initdata = { | ||
72 | .gpio_rdy = -1, | ||
73 | .gpio_nce = P720T_NAND_NCE, | ||
74 | .gpio_ale = P720T_NAND_ALE, | ||
75 | .gpio_cle = P720T_NAND_CLE, | ||
76 | .gpio_nwp = -1, | ||
77 | .chip_delay = 15, | ||
78 | .parts = p720t_nand_parts, | ||
79 | .num_parts = ARRAY_SIZE(p720t_nand_parts), | ||
80 | }; | ||
81 | |||
82 | static struct platform_device p720t_nand_pdev __initdata = { | ||
83 | .name = "gpio-nand", | ||
84 | .id = -1, | ||
85 | .resource = p720t_nand_resource, | ||
86 | .num_resources = ARRAY_SIZE(p720t_nand_resource), | ||
87 | .dev = { | ||
88 | .platform_data = &p720t_nand_pdata, | ||
89 | }, | ||
90 | }; | ||
91 | |||
92 | static void p720t_lcd_power_set(struct plat_lcd_data *pd, unsigned int power) | ||
93 | { | ||
94 | if (power) { | ||
95 | PLD_LCDEN = PLD_LCDEN_EN; | ||
96 | PLD_PWR |= PLD_S4_ON | PLD_S2_ON | PLD_S1_ON; | ||
97 | } else { | ||
98 | PLD_PWR &= ~(PLD_S4_ON | PLD_S2_ON | PLD_S1_ON); | ||
99 | PLD_LCDEN = 0; | ||
100 | } | ||
101 | } | ||
102 | |||
103 | static struct plat_lcd_data p720t_lcd_power_pdata = { | ||
104 | .set_power = p720t_lcd_power_set, | ||
105 | }; | ||
106 | |||
107 | static void p720t_lcd_backlight_set_intensity(int intensity) | ||
108 | { | ||
109 | if (intensity) | ||
110 | PLD_PWR |= PLD_S3_ON; | ||
111 | else | ||
112 | PLD_PWR = 0; | ||
113 | } | ||
114 | |||
115 | static struct generic_bl_info p720t_lcd_backlight_pdata = { | ||
116 | .name = "lcd-backlight.0", | ||
117 | .default_intensity = 0x01, | ||
118 | .max_intensity = 0x01, | ||
119 | .set_bl_intensity = p720t_lcd_backlight_set_intensity, | ||
120 | }; | ||
121 | |||
122 | /* | ||
123 | * Map the P720T system PLD. It occupies two address spaces: | ||
124 | * 0x10000000 and 0x10400000. We map both regions as one. | ||
125 | */ | ||
126 | static struct map_desc p720t_io_desc[] __initdata = { | ||
127 | { | ||
128 | .virtual = SYSPLD_VIRT_BASE, | ||
129 | .pfn = __phys_to_pfn(SYSPLD_PHYS_BASE), | ||
130 | .length = SZ_8M, | ||
131 | .type = MT_DEVICE, | ||
132 | }, | ||
133 | }; | ||
134 | |||
135 | static void __init | ||
136 | fixup_p720t(struct tag *tag, char **cmdline, struct meminfo *mi) | ||
137 | { | ||
138 | /* | ||
139 | * Our bootloader doesn't setup any tags (yet). | ||
140 | */ | ||
141 | if (tag->hdr.tag != ATAG_CORE) { | ||
142 | tag->hdr.tag = ATAG_CORE; | ||
143 | tag->hdr.size = tag_size(tag_core); | ||
144 | tag->u.core.flags = 0; | ||
145 | tag->u.core.pagesize = PAGE_SIZE; | ||
146 | tag->u.core.rootdev = 0x0100; | ||
147 | |||
148 | tag = tag_next(tag); | ||
149 | tag->hdr.tag = ATAG_MEM; | ||
150 | tag->hdr.size = tag_size(tag_mem32); | ||
151 | tag->u.mem.size = 4096; | ||
152 | tag->u.mem.start = PHYS_OFFSET; | ||
153 | |||
154 | tag = tag_next(tag); | ||
155 | tag->hdr.tag = ATAG_NONE; | ||
156 | tag->hdr.size = 0; | ||
157 | } | ||
158 | } | ||
159 | |||
160 | static void __init p720t_map_io(void) | ||
161 | { | ||
162 | clps711x_map_io(); | ||
163 | iotable_init(p720t_io_desc, ARRAY_SIZE(p720t_io_desc)); | ||
164 | } | ||
165 | |||
166 | static void __init p720t_init_early(void) | ||
167 | { | ||
168 | /* | ||
169 | * Power down as much as possible in case we don't | ||
170 | * have the drivers loaded. | ||
171 | */ | ||
172 | PLD_LCDEN = 0; | ||
173 | PLD_PWR &= ~(PLD_S4_ON|PLD_S3_ON|PLD_S2_ON|PLD_S1_ON); | ||
174 | |||
175 | PLD_KBD = 0; | ||
176 | PLD_IO = 0; | ||
177 | PLD_IRDA = 0; | ||
178 | PLD_CODEC = 0; | ||
179 | PLD_TCH = 0; | ||
180 | PLD_SPI = 0; | ||
181 | if (!IS_ENABLED(CONFIG_DEBUG_LL)) { | ||
182 | PLD_COM2 = 0; | ||
183 | PLD_COM1 = 0; | ||
184 | } | ||
185 | } | ||
186 | |||
187 | static struct gpio_led p720t_gpio_leds[] = { | ||
188 | { | ||
189 | .name = "User LED", | ||
190 | .default_trigger = "heartbeat", | ||
191 | .gpio = P720T_USERLED, | ||
192 | }, | ||
193 | }; | ||
194 | |||
195 | static struct gpio_led_platform_data p720t_gpio_led_pdata __initdata = { | ||
196 | .leds = p720t_gpio_leds, | ||
197 | .num_leds = ARRAY_SIZE(p720t_gpio_leds), | ||
198 | }; | ||
199 | |||
200 | static void __init p720t_init(void) | ||
201 | { | ||
202 | platform_device_register(&p720t_nand_pdev); | ||
203 | platform_device_register_data(&platform_bus, "platform-lcd", 0, | ||
204 | &p720t_lcd_power_pdata, | ||
205 | sizeof(p720t_lcd_power_pdata)); | ||
206 | platform_device_register_data(&platform_bus, "generic-bl", 0, | ||
207 | &p720t_lcd_backlight_pdata, | ||
208 | sizeof(p720t_lcd_backlight_pdata)); | ||
209 | platform_device_register_simple("video-clps711x", 0, NULL, 0); | ||
210 | } | ||
211 | |||
212 | static void __init p720t_init_late(void) | ||
213 | { | ||
214 | platform_device_register_data(&platform_bus, "leds-gpio", 0, | ||
215 | &p720t_gpio_led_pdata, | ||
216 | sizeof(p720t_gpio_led_pdata)); | ||
217 | } | ||
218 | |||
219 | MACHINE_START(P720T, "ARM-Prospector720T") | ||
220 | /* Maintainer: ARM Ltd/Deep Blue Solutions Ltd */ | ||
221 | .atag_offset = 0x100, | ||
222 | .nr_irqs = CLPS711X_NR_IRQS, | ||
223 | .fixup = fixup_p720t, | ||
224 | .map_io = p720t_map_io, | ||
225 | .init_early = p720t_init_early, | ||
226 | .init_irq = clps711x_init_irq, | ||
227 | .timer = &clps711x_timer, | ||
228 | .init_machine = p720t_init, | ||
229 | .init_late = p720t_init_late, | ||
230 | .handle_irq = clps711x_handle_irq, | ||
231 | .restart = clps711x_restart, | ||
232 | MACHINE_END | ||
diff --git a/arch/arm/mach-clps711x/cdb89712.c b/arch/arm/mach-clps711x/cdb89712.c deleted file mode 100644 index c314f49d6ef6..000000000000 --- a/arch/arm/mach-clps711x/cdb89712.c +++ /dev/null | |||
@@ -1,63 +0,0 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/mach-clps711x/cdb89712.c | ||
3 | * | ||
4 | * Copyright (C) 2000-2001 Deep Blue Solutions Ltd | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License as published by | ||
8 | * the Free Software Foundation; either version 2 of the License, or | ||
9 | * (at your option) any later version. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
19 | */ | ||
20 | #include <linux/kernel.h> | ||
21 | #include <linux/init.h> | ||
22 | #include <linux/types.h> | ||
23 | #include <linux/string.h> | ||
24 | #include <linux/mm.h> | ||
25 | #include <linux/io.h> | ||
26 | |||
27 | #include <mach/hardware.h> | ||
28 | #include <asm/pgtable.h> | ||
29 | #include <asm/page.h> | ||
30 | #include <asm/setup.h> | ||
31 | #include <asm/mach-types.h> | ||
32 | #include <asm/mach/arch.h> | ||
33 | #include <asm/mach/map.h> | ||
34 | |||
35 | #include "common.h" | ||
36 | |||
37 | /* | ||
38 | * Map the CS89712 Ethernet port. That should be moved to the | ||
39 | * ethernet driver, perhaps. | ||
40 | */ | ||
41 | static struct map_desc cdb89712_io_desc[] __initdata = { | ||
42 | { | ||
43 | .virtual = ETHER_BASE, | ||
44 | .pfn =__phys_to_pfn(ETHER_START), | ||
45 | .length = ETHER_SIZE, | ||
46 | .type = MT_DEVICE | ||
47 | } | ||
48 | }; | ||
49 | |||
50 | static void __init cdb89712_map_io(void) | ||
51 | { | ||
52 | clps711x_map_io(); | ||
53 | iotable_init(cdb89712_io_desc, ARRAY_SIZE(cdb89712_io_desc)); | ||
54 | } | ||
55 | |||
56 | MACHINE_START(CDB89712, "Cirrus-CDB89712") | ||
57 | /* Maintainer: Ray Lehtiniemi */ | ||
58 | .atag_offset = 0x100, | ||
59 | .map_io = cdb89712_map_io, | ||
60 | .init_irq = clps711x_init_irq, | ||
61 | .timer = &clps711x_timer, | ||
62 | .restart = clps711x_restart, | ||
63 | MACHINE_END | ||
diff --git a/arch/arm/mach-clps711x/common.c b/arch/arm/mach-clps711x/common.c index 509243d89a32..e046439573ee 100644 --- a/arch/arm/mach-clps711x/common.c +++ b/arch/arm/mach-clps711x/common.c | |||
@@ -21,13 +21,16 @@ | |||
21 | */ | 21 | */ |
22 | #include <linux/io.h> | 22 | #include <linux/io.h> |
23 | #include <linux/init.h> | 23 | #include <linux/init.h> |
24 | #include <linux/sizes.h> | ||
24 | #include <linux/interrupt.h> | 25 | #include <linux/interrupt.h> |
25 | #include <linux/irq.h> | 26 | #include <linux/irq.h> |
26 | #include <linux/clk.h> | 27 | #include <linux/clk.h> |
27 | #include <linux/clkdev.h> | 28 | #include <linux/clkdev.h> |
29 | #include <linux/clockchips.h> | ||
28 | #include <linux/clk-provider.h> | 30 | #include <linux/clk-provider.h> |
29 | 31 | ||
30 | #include <asm/sizes.h> | 32 | #include <asm/exception.h> |
33 | #include <asm/mach/irq.h> | ||
31 | #include <asm/mach/map.h> | 34 | #include <asm/mach/map.h> |
32 | #include <asm/mach/time.h> | 35 | #include <asm/mach/time.h> |
33 | #include <asm/system_misc.h> | 36 | #include <asm/system_misc.h> |
@@ -36,7 +39,6 @@ | |||
36 | 39 | ||
37 | static struct clk *clk_pll, *clk_bus, *clk_uart, *clk_timerl, *clk_timerh, | 40 | static struct clk *clk_pll, *clk_bus, *clk_uart, *clk_timerl, *clk_timerh, |
38 | *clk_tint, *clk_spi; | 41 | *clk_tint, *clk_spi; |
39 | static unsigned long latch; | ||
40 | 42 | ||
41 | /* | 43 | /* |
42 | * This maps the generic CLPS711x registers | 44 | * This maps the generic CLPS711x registers |
@@ -45,7 +47,7 @@ static struct map_desc clps711x_io_desc[] __initdata = { | |||
45 | { | 47 | { |
46 | .virtual = (unsigned long)CLPS711X_VIRT_BASE, | 48 | .virtual = (unsigned long)CLPS711X_VIRT_BASE, |
47 | .pfn = __phys_to_pfn(CLPS711X_PHYS_BASE), | 49 | .pfn = __phys_to_pfn(CLPS711X_PHYS_BASE), |
48 | .length = SZ_1M, | 50 | .length = SZ_64K, |
49 | .type = MT_DEVICE | 51 | .type = MT_DEVICE |
50 | } | 52 | } |
51 | }; | 53 | }; |
@@ -64,7 +66,7 @@ static void int1_mask(struct irq_data *d) | |||
64 | clps_writel(intmr1, INTMR1); | 66 | clps_writel(intmr1, INTMR1); |
65 | } | 67 | } |
66 | 68 | ||
67 | static void int1_ack(struct irq_data *d) | 69 | static void int1_eoi(struct irq_data *d) |
68 | { | 70 | { |
69 | switch (d->irq) { | 71 | switch (d->irq) { |
70 | case IRQ_CSINT: clps_writel(0, COEOI); break; | 72 | case IRQ_CSINT: clps_writel(0, COEOI); break; |
@@ -86,7 +88,8 @@ static void int1_unmask(struct irq_data *d) | |||
86 | } | 88 | } |
87 | 89 | ||
88 | static struct irq_chip int1_chip = { | 90 | static struct irq_chip int1_chip = { |
89 | .irq_ack = int1_ack, | 91 | .name = "Interrupt Vector 1", |
92 | .irq_eoi = int1_eoi, | ||
90 | .irq_mask = int1_mask, | 93 | .irq_mask = int1_mask, |
91 | .irq_unmask = int1_unmask, | 94 | .irq_unmask = int1_unmask, |
92 | }; | 95 | }; |
@@ -100,7 +103,7 @@ static void int2_mask(struct irq_data *d) | |||
100 | clps_writel(intmr2, INTMR2); | 103 | clps_writel(intmr2, INTMR2); |
101 | } | 104 | } |
102 | 105 | ||
103 | static void int2_ack(struct irq_data *d) | 106 | static void int2_eoi(struct irq_data *d) |
104 | { | 107 | { |
105 | switch (d->irq) { | 108 | switch (d->irq) { |
106 | case IRQ_KBDINT: clps_writel(0, KBDEOI); break; | 109 | case IRQ_KBDINT: clps_writel(0, KBDEOI); break; |
@@ -117,73 +120,160 @@ static void int2_unmask(struct irq_data *d) | |||
117 | } | 120 | } |
118 | 121 | ||
119 | static struct irq_chip int2_chip = { | 122 | static struct irq_chip int2_chip = { |
120 | .irq_ack = int2_ack, | 123 | .name = "Interrupt Vector 2", |
124 | .irq_eoi = int2_eoi, | ||
121 | .irq_mask = int2_mask, | 125 | .irq_mask = int2_mask, |
122 | .irq_unmask = int2_unmask, | 126 | .irq_unmask = int2_unmask, |
123 | }; | 127 | }; |
124 | 128 | ||
129 | static void int3_mask(struct irq_data *d) | ||
130 | { | ||
131 | u32 intmr3; | ||
132 | |||
133 | intmr3 = clps_readl(INTMR3); | ||
134 | intmr3 &= ~(1 << (d->irq - 32)); | ||
135 | clps_writel(intmr3, INTMR3); | ||
136 | } | ||
137 | |||
138 | static void int3_unmask(struct irq_data *d) | ||
139 | { | ||
140 | u32 intmr3; | ||
141 | |||
142 | intmr3 = clps_readl(INTMR3); | ||
143 | intmr3 |= 1 << (d->irq - 32); | ||
144 | clps_writel(intmr3, INTMR3); | ||
145 | } | ||
146 | |||
147 | static struct irq_chip int3_chip = { | ||
148 | .name = "Interrupt Vector 3", | ||
149 | .irq_mask = int3_mask, | ||
150 | .irq_unmask = int3_unmask, | ||
151 | }; | ||
152 | |||
153 | static struct { | ||
154 | int nr; | ||
155 | struct irq_chip *chip; | ||
156 | irq_flow_handler_t handle; | ||
157 | } clps711x_irqdescs[] __initdata = { | ||
158 | { IRQ_CSINT, &int1_chip, handle_fasteoi_irq, }, | ||
159 | { IRQ_EINT1, &int1_chip, handle_level_irq, }, | ||
160 | { IRQ_EINT2, &int1_chip, handle_level_irq, }, | ||
161 | { IRQ_EINT3, &int1_chip, handle_level_irq, }, | ||
162 | { IRQ_TC1OI, &int1_chip, handle_fasteoi_irq, }, | ||
163 | { IRQ_TC2OI, &int1_chip, handle_fasteoi_irq, }, | ||
164 | { IRQ_RTCMI, &int1_chip, handle_fasteoi_irq, }, | ||
165 | { IRQ_TINT, &int1_chip, handle_fasteoi_irq, }, | ||
166 | { IRQ_UTXINT1, &int1_chip, handle_level_irq, }, | ||
167 | { IRQ_URXINT1, &int1_chip, handle_level_irq, }, | ||
168 | { IRQ_UMSINT, &int1_chip, handle_fasteoi_irq, }, | ||
169 | { IRQ_SSEOTI, &int1_chip, handle_level_irq, }, | ||
170 | { IRQ_KBDINT, &int2_chip, handle_fasteoi_irq, }, | ||
171 | { IRQ_SS2RX, &int2_chip, handle_level_irq, }, | ||
172 | { IRQ_SS2TX, &int2_chip, handle_level_irq, }, | ||
173 | { IRQ_UTXINT2, &int2_chip, handle_level_irq, }, | ||
174 | { IRQ_URXINT2, &int2_chip, handle_level_irq, }, | ||
175 | }; | ||
176 | |||
125 | void __init clps711x_init_irq(void) | 177 | void __init clps711x_init_irq(void) |
126 | { | 178 | { |
127 | unsigned int i; | 179 | unsigned int i; |
128 | 180 | ||
129 | for (i = 0; i < NR_IRQS; i++) { | 181 | /* Disable interrupts */ |
130 | if (INT1_IRQS & (1 << i)) { | ||
131 | irq_set_chip_and_handler(i, &int1_chip, | ||
132 | handle_level_irq); | ||
133 | set_irq_flags(i, IRQF_VALID | IRQF_PROBE); | ||
134 | } | ||
135 | if (INT2_IRQS & (1 << i)) { | ||
136 | irq_set_chip_and_handler(i, &int2_chip, | ||
137 | handle_level_irq); | ||
138 | set_irq_flags(i, IRQF_VALID | IRQF_PROBE); | ||
139 | } | ||
140 | } | ||
141 | |||
142 | /* | ||
143 | * Disable interrupts | ||
144 | */ | ||
145 | clps_writel(0, INTMR1); | 182 | clps_writel(0, INTMR1); |
146 | clps_writel(0, INTMR2); | 183 | clps_writel(0, INTMR2); |
184 | clps_writel(0, INTMR3); | ||
147 | 185 | ||
148 | /* | 186 | /* Clear down any pending interrupts */ |
149 | * Clear down any pending interrupts | 187 | clps_writel(0, BLEOI); |
150 | */ | 188 | clps_writel(0, MCEOI); |
151 | clps_writel(0, COEOI); | 189 | clps_writel(0, COEOI); |
152 | clps_writel(0, TC1EOI); | 190 | clps_writel(0, TC1EOI); |
153 | clps_writel(0, TC2EOI); | 191 | clps_writel(0, TC2EOI); |
154 | clps_writel(0, RTCEOI); | 192 | clps_writel(0, RTCEOI); |
155 | clps_writel(0, TEOI); | 193 | clps_writel(0, TEOI); |
156 | clps_writel(0, UMSEOI); | 194 | clps_writel(0, UMSEOI); |
157 | clps_writel(0, SYNCIO); | ||
158 | clps_writel(0, KBDEOI); | 195 | clps_writel(0, KBDEOI); |
196 | clps_writel(0, SRXEOF); | ||
197 | clps_writel(0xffffffff, DAISR); | ||
198 | |||
199 | for (i = 0; i < ARRAY_SIZE(clps711x_irqdescs); i++) { | ||
200 | irq_set_chip_and_handler(clps711x_irqdescs[i].nr, | ||
201 | clps711x_irqdescs[i].chip, | ||
202 | clps711x_irqdescs[i].handle); | ||
203 | set_irq_flags(clps711x_irqdescs[i].nr, | ||
204 | IRQF_VALID | IRQF_PROBE); | ||
205 | } | ||
206 | |||
207 | if (IS_ENABLED(CONFIG_FIQ)) { | ||
208 | init_FIQ(0); | ||
209 | irq_set_chip_and_handler(IRQ_DAIINT, &int3_chip, | ||
210 | handle_bad_irq); | ||
211 | set_irq_flags(IRQ_DAIINT, | ||
212 | IRQF_VALID | IRQF_PROBE | IRQF_NOAUTOEN); | ||
213 | } | ||
159 | } | 214 | } |
160 | 215 | ||
161 | /* | 216 | inline u32 fls16(u32 x) |
162 | * gettimeoffset() returns time since last timer tick, in usecs. | ||
163 | * | ||
164 | * 'LATCH' is hwclock ticks (see CLOCK_TICK_RATE in timex.h) per jiffy. | ||
165 | * 'tick' is usecs per jiffy. | ||
166 | */ | ||
167 | static unsigned long clps711x_gettimeoffset(void) | ||
168 | { | 217 | { |
169 | unsigned long hwticks; | 218 | u32 r = 15; |
170 | hwticks = latch - (clps_readl(TC2D) & 0xffff); | 219 | |
171 | return (hwticks * (tick_nsec / 1000)) / latch; | 220 | if (!(x & 0xff00)) { |
221 | x <<= 8; | ||
222 | r -= 8; | ||
223 | } | ||
224 | if (!(x & 0xf000)) { | ||
225 | x <<= 4; | ||
226 | r -= 4; | ||
227 | } | ||
228 | if (!(x & 0xc000)) { | ||
229 | x <<= 2; | ||
230 | r -= 2; | ||
231 | } | ||
232 | if (!(x & 0x8000)) | ||
233 | r--; | ||
234 | |||
235 | return r; | ||
172 | } | 236 | } |
173 | 237 | ||
174 | /* | 238 | asmlinkage void __exception_irq_entry clps711x_handle_irq(struct pt_regs *regs) |
175 | * IRQ handler for the timer | ||
176 | */ | ||
177 | static irqreturn_t p720t_timer_interrupt(int irq, void *dev_id) | ||
178 | { | 239 | { |
179 | timer_tick(); | 240 | u32 irqstat; |
241 | void __iomem *base = CLPS711X_VIRT_BASE; | ||
242 | |||
243 | irqstat = readl_relaxed(base + INTSR1) & readl_relaxed(base + INTMR1); | ||
244 | if (irqstat) { | ||
245 | handle_IRQ(fls16(irqstat), regs); | ||
246 | return; | ||
247 | } | ||
248 | |||
249 | irqstat = readl_relaxed(base + INTSR2) & readl_relaxed(base + INTMR2); | ||
250 | if (likely(irqstat)) | ||
251 | handle_IRQ(fls16(irqstat) + 16, regs); | ||
252 | } | ||
253 | |||
254 | static void clps711x_clockevent_set_mode(enum clock_event_mode mode, | ||
255 | struct clock_event_device *evt) | ||
256 | { | ||
257 | } | ||
258 | |||
259 | static struct clock_event_device clockevent_clps711x = { | ||
260 | .name = "CLPS711x Clockevents", | ||
261 | .rating = 300, | ||
262 | .features = CLOCK_EVT_FEAT_PERIODIC, | ||
263 | .set_mode = clps711x_clockevent_set_mode, | ||
264 | }; | ||
265 | |||
266 | static irqreturn_t clps711x_timer_interrupt(int irq, void *dev_id) | ||
267 | { | ||
268 | clockevent_clps711x.event_handler(&clockevent_clps711x); | ||
269 | |||
180 | return IRQ_HANDLED; | 270 | return IRQ_HANDLED; |
181 | } | 271 | } |
182 | 272 | ||
183 | static struct irqaction clps711x_timer_irq = { | 273 | static struct irqaction clps711x_timer_irq = { |
184 | .name = "CLPS711x Timer Tick", | 274 | .name = "CLPS711x Timer Tick", |
185 | .flags = IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL, | 275 | .flags = IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL, |
186 | .handler = p720t_timer_interrupt, | 276 | .handler = clps711x_timer_interrupt, |
187 | }; | 277 | }; |
188 | 278 | ||
189 | static void add_fixed_clk(struct clk *clk, const char *name, int rate) | 279 | static void add_fixed_clk(struct clk *clk, const char *name, int rate) |
@@ -244,20 +334,19 @@ static void __init clps711x_timer_init(void) | |||
244 | 334 | ||
245 | pr_info("CPU frequency set at %i Hz.\n", cpu); | 335 | pr_info("CPU frequency set at %i Hz.\n", cpu); |
246 | 336 | ||
247 | latch = (timh + HZ / 2) / HZ; | 337 | clps_writew(DIV_ROUND_CLOSEST(timh, HZ), TC2D); |
248 | 338 | ||
249 | tmp = clps_readl(SYSCON1); | 339 | tmp = clps_readl(SYSCON1); |
250 | tmp |= SYSCON1_TC2S | SYSCON1_TC2M; | 340 | tmp |= SYSCON1_TC2S | SYSCON1_TC2M; |
251 | clps_writel(tmp, SYSCON1); | 341 | clps_writel(tmp, SYSCON1); |
252 | 342 | ||
253 | clps_writel(latch - 1, TC2D); | 343 | clockevents_config_and_register(&clockevent_clps711x, timh, 1, 0xffff); |
254 | 344 | ||
255 | setup_irq(IRQ_TC2OI, &clps711x_timer_irq); | 345 | setup_irq(IRQ_TC2OI, &clps711x_timer_irq); |
256 | } | 346 | } |
257 | 347 | ||
258 | struct sys_timer clps711x_timer = { | 348 | struct sys_timer clps711x_timer = { |
259 | .init = clps711x_timer_init, | 349 | .init = clps711x_timer_init, |
260 | .offset = clps711x_gettimeoffset, | ||
261 | }; | 350 | }; |
262 | 351 | ||
263 | void clps711x_restart(char mode, const char *cmd) | 352 | void clps711x_restart(char mode, const char *cmd) |
diff --git a/arch/arm/mach-clps711x/common.h b/arch/arm/mach-clps711x/common.h index fc0f0650dcb5..b7c0c75c90c0 100644 --- a/arch/arm/mach-clps711x/common.h +++ b/arch/arm/mach-clps711x/common.h | |||
@@ -4,9 +4,14 @@ | |||
4 | * Common bits. | 4 | * Common bits. |
5 | */ | 5 | */ |
6 | 6 | ||
7 | #define CLPS711X_NR_IRQS (33) | ||
8 | #define CLPS711X_NR_GPIO (4 * 8 + 3) | ||
9 | #define CLPS711X_GPIO(prt, bit) ((prt) * 8 + (bit)) | ||
10 | |||
7 | struct sys_timer; | 11 | struct sys_timer; |
8 | 12 | ||
9 | extern void clps711x_map_io(void); | 13 | extern void clps711x_map_io(void); |
10 | extern void clps711x_init_irq(void); | 14 | extern void clps711x_init_irq(void); |
11 | extern struct sys_timer clps711x_timer; | 15 | extern void clps711x_handle_irq(struct pt_regs *regs); |
12 | extern void clps711x_restart(char mode, const char *cmd); | 16 | extern void clps711x_restart(char mode, const char *cmd); |
17 | extern struct sys_timer clps711x_timer; | ||
diff --git a/arch/arm/mach-clps711x/edb7211-arch.c b/arch/arm/mach-clps711x/edb7211-arch.c deleted file mode 100644 index 5fad0b4f40ad..000000000000 --- a/arch/arm/mach-clps711x/edb7211-arch.c +++ /dev/null | |||
@@ -1,66 +0,0 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/mach-clps711x/arch-edb7211.c | ||
3 | * | ||
4 | * Copyright (C) 2000, 2001 Blue Mug, Inc. All Rights Reserved. | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License as published by | ||
8 | * the Free Software Foundation; either version 2 of the License, or | ||
9 | * (at your option) any later version. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
19 | */ | ||
20 | #include <linux/init.h> | ||
21 | #include <linux/memblock.h> | ||
22 | #include <linux/types.h> | ||
23 | #include <linux/string.h> | ||
24 | |||
25 | #include <asm/setup.h> | ||
26 | #include <asm/mach-types.h> | ||
27 | #include <asm/mach/arch.h> | ||
28 | |||
29 | #include "common.h" | ||
30 | |||
31 | extern void edb7211_map_io(void); | ||
32 | |||
33 | /* Reserve screen memory region at the start of main system memory. */ | ||
34 | static void __init edb7211_reserve(void) | ||
35 | { | ||
36 | memblock_reserve(PHYS_OFFSET, 0x00020000); | ||
37 | } | ||
38 | |||
39 | static void __init | ||
40 | fixup_edb7211(struct tag *tags, char **cmdline, struct meminfo *mi) | ||
41 | { | ||
42 | /* | ||
43 | * Bank start addresses are not present in the information | ||
44 | * passed in from the boot loader. We could potentially | ||
45 | * detect them, but instead we hard-code them. | ||
46 | * | ||
47 | * Banks sizes _are_ present in the param block, but we're | ||
48 | * not using that information yet. | ||
49 | */ | ||
50 | mi->bank[0].start = 0xc0000000; | ||
51 | mi->bank[0].size = 8*1024*1024; | ||
52 | mi->bank[1].start = 0xc1000000; | ||
53 | mi->bank[1].size = 8*1024*1024; | ||
54 | mi->nr_banks = 2; | ||
55 | } | ||
56 | |||
57 | MACHINE_START(EDB7211, "CL-EDB7211 (EP7211 eval board)") | ||
58 | /* Maintainer: Jon McClintock */ | ||
59 | .atag_offset = 0x20100, /* 0xc0000000 - 0xc001ffff can be video RAM */ | ||
60 | .fixup = fixup_edb7211, | ||
61 | .map_io = edb7211_map_io, | ||
62 | .reserve = edb7211_reserve, | ||
63 | .init_irq = clps711x_init_irq, | ||
64 | .timer = &clps711x_timer, | ||
65 | .restart = clps711x_restart, | ||
66 | MACHINE_END | ||
diff --git a/arch/arm/mach-clps711x/edb7211-mm.c b/arch/arm/mach-clps711x/edb7211-mm.c deleted file mode 100644 index 4372f06c9929..000000000000 --- a/arch/arm/mach-clps711x/edb7211-mm.c +++ /dev/null | |||
@@ -1,82 +0,0 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/mach-clps711x/mm.c | ||
3 | * | ||
4 | * Extra MM routines for the EDB7211 board | ||
5 | * | ||
6 | * Copyright (C) 2000, 2001 Blue Mug, Inc. All Rights Reserved. | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License as published by | ||
10 | * the Free Software Foundation; either version 2 of the License, or | ||
11 | * (at your option) any later version. | ||
12 | * | ||
13 | * This program is distributed in the hope that it will be useful, | ||
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
16 | * GNU General Public License for more details. | ||
17 | * | ||
18 | * You should have received a copy of the GNU General Public License | ||
19 | * along with this program; if not, write to the Free Software | ||
20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
21 | */ | ||
22 | #include <linux/kernel.h> | ||
23 | #include <linux/init.h> | ||
24 | #include <linux/bug.h> | ||
25 | |||
26 | #include <mach/hardware.h> | ||
27 | #include <asm/page.h> | ||
28 | #include <asm/sizes.h> | ||
29 | |||
30 | #include <asm/mach/map.h> | ||
31 | |||
32 | extern void clps711x_map_io(void); | ||
33 | |||
34 | /* | ||
35 | * The on-chip registers are given a size of 1MB so that a section can | ||
36 | * be used to map them; this saves a page table. This is the place to | ||
37 | * add mappings for ROM, expansion memory, PCMCIA, etc. (if static | ||
38 | * mappings are chosen for those areas). | ||
39 | * | ||
40 | * Here is a physical memory map (to be fleshed out later): | ||
41 | * | ||
42 | * Physical Address Size Description | ||
43 | * ----------------- ----- --------------------------------- | ||
44 | * c0000000-c001ffff 128KB reserved for video RAM [1] | ||
45 | * c0020000-c0023fff 16KB parameters (see Documentation/arm/Setup) | ||
46 | * c0024000-c0027fff 16KB swapper_pg_dir (task 0 page directory) | ||
47 | * c0028000-... kernel image (TEXTADDR) | ||
48 | * | ||
49 | * [1] Unused pages should be given back to the VM; they are not yet. | ||
50 | * The parameter block should also be released (not sure if this | ||
51 | * happens). | ||
52 | */ | ||
53 | static struct map_desc edb7211_io_desc[] __initdata = { | ||
54 | { /* memory-mapped extra keyboard row */ | ||
55 | .virtual = EP7211_VIRT_EXTKBD, | ||
56 | .pfn = __phys_to_pfn(EP7211_PHYS_EXTKBD), | ||
57 | .length = SZ_1M, | ||
58 | .type = MT_DEVICE, | ||
59 | }, { /* and CS8900A Ethernet chip */ | ||
60 | .virtual = EP7211_VIRT_CS8900A, | ||
61 | .pfn = __phys_to_pfn(EP7211_PHYS_CS8900A), | ||
62 | .length = SZ_1M, | ||
63 | .type = MT_DEVICE, | ||
64 | }, { /* flash banks */ | ||
65 | .virtual = EP7211_VIRT_FLASH1, | ||
66 | .pfn = __phys_to_pfn(EP7211_PHYS_FLASH1), | ||
67 | .length = SZ_8M, | ||
68 | .type = MT_DEVICE, | ||
69 | }, { | ||
70 | .virtual = EP7211_VIRT_FLASH2, | ||
71 | .pfn = __phys_to_pfn(EP7211_PHYS_FLASH2), | ||
72 | .length = SZ_8M, | ||
73 | .type = MT_DEVICE, | ||
74 | } | ||
75 | }; | ||
76 | |||
77 | void __init edb7211_map_io(void) | ||
78 | { | ||
79 | clps711x_map_io(); | ||
80 | iotable_init(edb7211_io_desc, ARRAY_SIZE(edb7211_io_desc)); | ||
81 | } | ||
82 | |||
diff --git a/arch/arm/mach-clps711x/include/mach/autcpu12.h b/arch/arm/mach-clps711x/include/mach/autcpu12.h index 1588a365f610..0452f5f3f034 100644 --- a/arch/arm/mach-clps711x/include/mach/autcpu12.h +++ b/arch/arm/mach-clps711x/include/mach/autcpu12.h | |||
@@ -21,24 +21,15 @@ | |||
21 | #define __ASM_ARCH_AUTCPU12_H | 21 | #define __ASM_ARCH_AUTCPU12_H |
22 | 22 | ||
23 | /* | 23 | /* |
24 | * The CS8900A ethernet chip has its I/O registers wired to chip select 2 | ||
25 | * (nCS2). This is the mapping for it. | ||
26 | */ | ||
27 | #define AUTCPU12_PHYS_CS8900A CS2_PHYS_BASE /* physical */ | ||
28 | #define AUTCPU12_VIRT_CS8900A (0xfe000000) /* virtual */ | ||
29 | |||
30 | /* | ||
31 | * The flash bank is wired to chip select 0 | 24 | * The flash bank is wired to chip select 0 |
32 | */ | 25 | */ |
33 | #define AUTCPU12_PHYS_FLASH CS0_PHYS_BASE /* physical */ | 26 | #define AUTCPU12_PHYS_FLASH CS0_PHYS_BASE /* physical */ |
34 | 27 | ||
35 | /* offset for device specific information structure */ | 28 | /* offset for device specific information structure */ |
36 | #define AUTCPU12_LCDINFO_OFFS (0x00010000) | 29 | #define AUTCPU12_LCDINFO_OFFS (0x00010000) |
37 | /* | 30 | |
38 | * Videomemory is the internal SRAM (CS 6) | 31 | /* Videomemory in the internal SRAM (CS 6) */ |
39 | */ | ||
40 | #define AUTCPU12_PHYS_VIDEO CS6_PHYS_BASE | 32 | #define AUTCPU12_PHYS_VIDEO CS6_PHYS_BASE |
41 | #define AUTCPU12_VIRT_VIDEO (0xfd000000) | ||
42 | 33 | ||
43 | /* | 34 | /* |
44 | * All special IO's are tied to CS1 | 35 | * All special IO's are tied to CS1 |
@@ -49,8 +40,6 @@ | |||
49 | 40 | ||
50 | #define AUTCPU12_PHYS_CSAUX1 CS1_PHYS_BASE +0x04000000 /* physical */ | 41 | #define AUTCPU12_PHYS_CSAUX1 CS1_PHYS_BASE +0x04000000 /* physical */ |
51 | 42 | ||
52 | #define AUTCPU12_PHYS_SMC CS1_PHYS_BASE +0x06000000 /* physical */ | ||
53 | |||
54 | #define AUTCPU12_PHYS_CAN CS1_PHYS_BASE +0x08000000 /* physical */ | 43 | #define AUTCPU12_PHYS_CAN CS1_PHYS_BASE +0x08000000 /* physical */ |
55 | 44 | ||
56 | #define AUTCPU12_PHYS_TOUCH CS1_PHYS_BASE +0x0A000000 /* physical */ | 45 | #define AUTCPU12_PHYS_TOUCH CS1_PHYS_BASE +0x0A000000 /* physical */ |
@@ -59,14 +48,6 @@ | |||
59 | 48 | ||
60 | #define AUTCPU12_PHYS_LPT CS1_PHYS_BASE +0x0E000000 /* physical */ | 49 | #define AUTCPU12_PHYS_LPT CS1_PHYS_BASE +0x0E000000 /* physical */ |
61 | 50 | ||
62 | /* | ||
63 | * defines for smartmedia card access | ||
64 | */ | ||
65 | #define AUTCPU12_SMC_RDY (1<<2) | ||
66 | #define AUTCPU12_SMC_ALE (1<<3) | ||
67 | #define AUTCPU12_SMC_CLE (1<<4) | ||
68 | #define AUTCPU12_SMC_PORT_OFFSET PBDR | ||
69 | #define AUTCPU12_SMC_SELECT_OFFSET 0x10 | ||
70 | /* | 51 | /* |
71 | * defines for lcd contrast | 52 | * defines for lcd contrast |
72 | */ | 53 | */ |
diff --git a/arch/arm/mach-clps711x/include/mach/clps711x.h b/arch/arm/mach-clps711x/include/mach/clps711x.h index c82e21ca49c7..01d1b9559710 100644 --- a/arch/arm/mach-clps711x/include/mach/clps711x.h +++ b/arch/arm/mach-clps711x/include/mach/clps711x.h | |||
@@ -257,6 +257,9 @@ | |||
257 | #define MEMCFG_BUS_WIDTH_16 (0) | 257 | #define MEMCFG_BUS_WIDTH_16 (0) |
258 | #define MEMCFG_BUS_WIDTH_8 (3) | 258 | #define MEMCFG_BUS_WIDTH_8 (3) |
259 | 259 | ||
260 | #define MEMCFG_SQAEN (1 << 6) | ||
261 | #define MEMCFG_CLKENB (1 << 7) | ||
262 | |||
260 | #define MEMCFG_WAITSTATE_8_3 (0 << 2) | 263 | #define MEMCFG_WAITSTATE_8_3 (0 << 2) |
261 | #define MEMCFG_WAITSTATE_7_3 (1 << 2) | 264 | #define MEMCFG_WAITSTATE_7_3 (1 << 2) |
262 | #define MEMCFG_WAITSTATE_6_3 (2 << 2) | 265 | #define MEMCFG_WAITSTATE_6_3 (2 << 2) |
@@ -274,4 +277,28 @@ | |||
274 | #define MEMCFG_WAITSTATE_2_0 (14 << 2) | 277 | #define MEMCFG_WAITSTATE_2_0 (14 << 2) |
275 | #define MEMCFG_WAITSTATE_1_0 (15 << 2) | 278 | #define MEMCFG_WAITSTATE_1_0 (15 << 2) |
276 | 279 | ||
280 | /* INTSR1 Interrupts */ | ||
281 | #define IRQ_CSINT (4) | ||
282 | #define IRQ_EINT1 (5) | ||
283 | #define IRQ_EINT2 (6) | ||
284 | #define IRQ_EINT3 (7) | ||
285 | #define IRQ_TC1OI (8) | ||
286 | #define IRQ_TC2OI (9) | ||
287 | #define IRQ_RTCMI (10) | ||
288 | #define IRQ_TINT (11) | ||
289 | #define IRQ_UTXINT1 (12) | ||
290 | #define IRQ_URXINT1 (13) | ||
291 | #define IRQ_UMSINT (14) | ||
292 | #define IRQ_SSEOTI (15) | ||
293 | |||
294 | /* INTSR2 Interrupts */ | ||
295 | #define IRQ_KBDINT (16 + 0) | ||
296 | #define IRQ_SS2RX (16 + 1) | ||
297 | #define IRQ_SS2TX (16 + 2) | ||
298 | #define IRQ_UTXINT2 (16 + 12) | ||
299 | #define IRQ_URXINT2 (16 + 13) | ||
300 | |||
301 | /* INTSR3 Interrupts */ | ||
302 | #define IRQ_DAIINT (32 + 0) | ||
303 | |||
277 | #endif /* __MACH_CLPS711X_H */ | 304 | #endif /* __MACH_CLPS711X_H */ |
diff --git a/arch/arm/mach-clps711x/include/mach/entry-macro.S b/arch/arm/mach-clps711x/include/mach/entry-macro.S deleted file mode 100644 index 56e5c2c23504..000000000000 --- a/arch/arm/mach-clps711x/include/mach/entry-macro.S +++ /dev/null | |||
@@ -1,51 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-clps711x/include/mach/entry-macro.S | ||
3 | * | ||
4 | * Low-level IRQ helper macros for CLPS711X-based platforms | ||
5 | * | ||
6 | * This file is licensed under the terms of the GNU General Public | ||
7 | * License version 2. This program is licensed "as is" without any | ||
8 | * warranty of any kind, whether express or implied. | ||
9 | */ | ||
10 | #include <mach/hardware.h> | ||
11 | |||
12 | .macro get_irqnr_preamble, base, tmp | ||
13 | .endm | ||
14 | |||
15 | #if (INTSR2 - INTSR1) != (INTMR2 - INTMR1) | ||
16 | #error INTSR stride != INTMR stride | ||
17 | #endif | ||
18 | |||
19 | .macro get_irqnr_and_base, irqnr, stat, base, mask | ||
20 | mov \base, #CLPS711X_VIRT_BASE | ||
21 | ldr \stat, [\base, #INTSR1] | ||
22 | ldr \mask, [\base, #INTMR1] | ||
23 | mov \irqnr, #4 | ||
24 | mov \mask, \mask, lsl #16 | ||
25 | and \stat, \stat, \mask, lsr #16 | ||
26 | movs \stat, \stat, lsr #4 | ||
27 | bne 1001f | ||
28 | |||
29 | add \base, \base, #INTSR2 - INTSR1 | ||
30 | ldr \stat, [\base, #INTSR1] | ||
31 | ldr \mask, [\base, #INTMR1] | ||
32 | mov \irqnr, #16 | ||
33 | mov \mask, \mask, lsl #16 | ||
34 | and \stat, \stat, \mask, lsr #16 | ||
35 | |||
36 | 1001: tst \stat, #255 | ||
37 | addeq \irqnr, \irqnr, #8 | ||
38 | moveq \stat, \stat, lsr #8 | ||
39 | tst \stat, #15 | ||
40 | addeq \irqnr, \irqnr, #4 | ||
41 | moveq \stat, \stat, lsr #4 | ||
42 | tst \stat, #3 | ||
43 | addeq \irqnr, \irqnr, #2 | ||
44 | moveq \stat, \stat, lsr #2 | ||
45 | tst \stat, #1 | ||
46 | addeq \irqnr, \irqnr, #1 | ||
47 | moveq \stat, \stat, lsr #1 | ||
48 | tst \stat, #1 @ bit 0 should be set | ||
49 | .endm | ||
50 | |||
51 | |||
diff --git a/arch/arm/mach-clps711x/include/mach/hardware.h b/arch/arm/mach-clps711x/include/mach/hardware.h index 8497775d6ee5..2f23dd5d73e4 100644 --- a/arch/arm/mach-clps711x/include/mach/hardware.h +++ b/arch/arm/mach-clps711x/include/mach/hardware.h | |||
@@ -24,7 +24,10 @@ | |||
24 | 24 | ||
25 | #include <mach/clps711x.h> | 25 | #include <mach/clps711x.h> |
26 | 26 | ||
27 | #define CLPS711X_VIRT_BASE IOMEM(0xff000000) | 27 | #define IO_ADDRESS(x) (0xdc000000 + (((x) & 0x03ffffff) | \ |
28 | (((x) >> 2) & 0x3c000000))) | ||
29 | |||
30 | #define CLPS711X_VIRT_BASE IOMEM(IO_ADDRESS(CLPS711X_PHYS_BASE)) | ||
28 | 31 | ||
29 | #ifndef __ASSEMBLY__ | 32 | #ifndef __ASSEMBLY__ |
30 | #define clps_readb(off) readb(CLPS711X_VIRT_BASE + (off)) | 33 | #define clps_readb(off) readb(CLPS711X_VIRT_BASE + (off)) |
@@ -61,67 +64,17 @@ | |||
61 | #define CS7_PHYS_BASE (0x00000000) | 64 | #define CS7_PHYS_BASE (0x00000000) |
62 | #endif | 65 | #endif |
63 | 66 | ||
64 | #define SYSPLD_VIRT_BASE 0xfe000000 | 67 | #define CLPS711X_SRAM_BASE CS6_PHYS_BASE |
65 | #define SYSPLD_BASE SYSPLD_VIRT_BASE | 68 | #define CLPS711X_SRAM_SIZE (48 * 1024) |
66 | |||
67 | #if defined (CONFIG_ARCH_CDB89712) | ||
68 | |||
69 | #define ETHER_START 0x20000000 | ||
70 | #define ETHER_SIZE 0x1000 | ||
71 | #define ETHER_BASE 0xfe000000 | ||
72 | |||
73 | #endif | ||
74 | 69 | ||
70 | #define CLPS711X_SDRAM0_BASE (0xc0000000) | ||
71 | #define CLPS711X_SDRAM1_BASE (0xd0000000) | ||
75 | 72 | ||
76 | #if defined (CONFIG_ARCH_EDB7211) | 73 | #if defined (CONFIG_ARCH_EDB7211) |
77 | 74 | ||
78 | /* | 75 | /* The extra 8 lines of the keyboard matrix are wired to chip select 3 */ |
79 | * The extra 8 lines of the keyboard matrix are wired to chip select 3 (nCS3) | 76 | #define EP7211_PHYS_EXTKBD CS3_PHYS_BASE |
80 | * and repeat across it. This is the mapping for it. | ||
81 | * | ||
82 | * In jumpered boot mode, nCS3 is mapped to 0x4000000, not 0x3000000. This | ||
83 | * was cause for much consternation and headscratching. This should probably | ||
84 | * be made a compile/run time kernel option. | ||
85 | */ | ||
86 | #define EP7211_PHYS_EXTKBD CS3_PHYS_BASE /* physical */ | ||
87 | |||
88 | #define EP7211_VIRT_EXTKBD (0xfd000000) /* virtual */ | ||
89 | |||
90 | |||
91 | /* | ||
92 | * The CS8900A ethernet chip has its I/O registers wired to chip select 2 | ||
93 | * (nCS2). This is the mapping for it. | ||
94 | * | ||
95 | * In jumpered boot mode, nCS2 is mapped to 0x5000000, not 0x2000000. This | ||
96 | * was cause for much consternation and headscratching. This should probably | ||
97 | * be made a compile/run time kernel option. | ||
98 | */ | ||
99 | #define EP7211_PHYS_CS8900A CS2_PHYS_BASE /* physical */ | ||
100 | |||
101 | #define EP7211_VIRT_CS8900A (0xfc000000) /* virtual */ | ||
102 | |||
103 | |||
104 | /* | ||
105 | * The two flash banks are wired to chip selects 0 and 1. This is the mapping | ||
106 | * for them. | ||
107 | * | ||
108 | * nCS0 and nCS1 are at 0x70000000 and 0x60000000, respectively, when running | ||
109 | * in jumpered boot mode. | ||
110 | */ | ||
111 | #define EP7211_PHYS_FLASH1 CS0_PHYS_BASE /* physical */ | ||
112 | #define EP7211_PHYS_FLASH2 CS1_PHYS_BASE /* physical */ | ||
113 | |||
114 | #define EP7211_VIRT_FLASH1 (0xfa000000) /* virtual */ | ||
115 | #define EP7211_VIRT_FLASH2 (0xfb000000) /* virtual */ | ||
116 | 77 | ||
117 | #endif /* CONFIG_ARCH_EDB7211 */ | 78 | #endif /* CONFIG_ARCH_EDB7211 */ |
118 | 79 | ||
119 | /* | ||
120 | * Relevant bits in port D, which controls power to the various parts of | ||
121 | * the LCD on the EDB7211. | ||
122 | */ | ||
123 | #define EDB_PD1_LCD_DC_DC_EN (1<<1) | ||
124 | #define EDB_PD2_LCDEN (1<<2) | ||
125 | #define EDB_PD3_LCDBL (1<<3) | ||
126 | |||
127 | #endif | 80 | #endif |
diff --git a/arch/arm/mach-clps711x/include/mach/irqs.h b/arch/arm/mach-clps711x/include/mach/irqs.h deleted file mode 100644 index 14d215f8ca81..000000000000 --- a/arch/arm/mach-clps711x/include/mach/irqs.h +++ /dev/null | |||
@@ -1,50 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-clps711x/include/mach/irqs.h | ||
3 | * | ||
4 | * Copyright (C) 2000 Deep Blue Solutions Ltd. | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License as published by | ||
8 | * the Free Software Foundation; either version 2 of the License, or | ||
9 | * (at your option) any later version. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
19 | */ | ||
20 | |||
21 | /* | ||
22 | * Interrupts from INTSR1 | ||
23 | */ | ||
24 | #define IRQ_CSINT 4 | ||
25 | #define IRQ_EINT1 5 | ||
26 | #define IRQ_EINT2 6 | ||
27 | #define IRQ_EINT3 7 | ||
28 | #define IRQ_TC1OI 8 | ||
29 | #define IRQ_TC2OI 9 | ||
30 | #define IRQ_RTCMI 10 | ||
31 | #define IRQ_TINT 11 | ||
32 | #define IRQ_UTXINT1 12 | ||
33 | #define IRQ_URXINT1 13 | ||
34 | #define IRQ_UMSINT 14 | ||
35 | #define IRQ_SSEOTI 15 | ||
36 | |||
37 | #define INT1_IRQS (0x0000fff0) | ||
38 | |||
39 | /* | ||
40 | * Interrupts from INTSR2 | ||
41 | */ | ||
42 | #define IRQ_KBDINT (16+0) /* bit 0 */ | ||
43 | #define IRQ_SS2RX (16+1) /* bit 1 */ | ||
44 | #define IRQ_SS2TX (16+2) /* bit 2 */ | ||
45 | #define IRQ_UTXINT2 (16+12) /* bit 12 */ | ||
46 | #define IRQ_URXINT2 (16+13) /* bit 13 */ | ||
47 | |||
48 | #define INT2_IRQS (0x30070000) | ||
49 | |||
50 | #define NR_IRQS 30 | ||
diff --git a/arch/arm/mach-clps711x/include/mach/syspld.h b/arch/arm/mach-clps711x/include/mach/syspld.h index f7f4c1201898..9a433155bf58 100644 --- a/arch/arm/mach-clps711x/include/mach/syspld.h +++ b/arch/arm/mach-clps711x/include/mach/syspld.h | |||
@@ -23,14 +23,9 @@ | |||
23 | #define __ASM_ARCH_SYSPLD_H | 23 | #define __ASM_ARCH_SYSPLD_H |
24 | 24 | ||
25 | #define SYSPLD_PHYS_BASE (0x10000000) | 25 | #define SYSPLD_PHYS_BASE (0x10000000) |
26 | #define SYSPLD_VIRT_BASE IO_ADDRESS(SYSPLD_PHYS_BASE) | ||
26 | 27 | ||
27 | #ifndef __ASSEMBLY__ | 28 | #define SYSPLD_REG(type, off) (*(volatile type *)(SYSPLD_VIRT_BASE + (off))) |
28 | #include <asm/types.h> | ||
29 | |||
30 | #define SYSPLD_REG(type,off) (*(volatile type *)(SYSPLD_BASE + off)) | ||
31 | #else | ||
32 | #define SYSPLD_REG(type,off) (off) | ||
33 | #endif | ||
34 | 29 | ||
35 | #define PLD_INT SYSPLD_REG(u32, 0x000000) | 30 | #define PLD_INT SYSPLD_REG(u32, 0x000000) |
36 | #define PLD_INT_PENIRQ (1 << 5) | 31 | #define PLD_INT_PENIRQ (1 << 5) |
diff --git a/arch/arm/mach-clps711x/p720t.c b/arch/arm/mach-clps711x/p720t.c deleted file mode 100644 index b752b586fc2f..000000000000 --- a/arch/arm/mach-clps711x/p720t.c +++ /dev/null | |||
@@ -1,181 +0,0 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/mach-clps711x/p720t.c | ||
3 | * | ||
4 | * Copyright (C) 2000-2001 Deep Blue Solutions Ltd | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License as published by | ||
8 | * the Free Software Foundation; either version 2 of the License, or | ||
9 | * (at your option) any later version. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
19 | */ | ||
20 | #include <linux/kernel.h> | ||
21 | #include <linux/init.h> | ||
22 | #include <linux/types.h> | ||
23 | #include <linux/string.h> | ||
24 | #include <linux/mm.h> | ||
25 | #include <linux/io.h> | ||
26 | #include <linux/slab.h> | ||
27 | #include <linux/leds.h> | ||
28 | |||
29 | #include <mach/hardware.h> | ||
30 | #include <asm/pgtable.h> | ||
31 | #include <asm/page.h> | ||
32 | #include <asm/setup.h> | ||
33 | #include <asm/sizes.h> | ||
34 | #include <asm/mach-types.h> | ||
35 | #include <asm/mach/arch.h> | ||
36 | #include <asm/mach/map.h> | ||
37 | #include <mach/syspld.h> | ||
38 | |||
39 | #include <asm/hardware/clps7111.h> | ||
40 | |||
41 | #include "common.h" | ||
42 | |||
43 | /* | ||
44 | * Map the P720T system PLD. It occupies two address spaces: | ||
45 | * SYSPLD_PHYS_BASE and SYSPLD_PHYS_BASE + 0x00400000 | ||
46 | * We map both here. | ||
47 | */ | ||
48 | static struct map_desc p720t_io_desc[] __initdata = { | ||
49 | { | ||
50 | .virtual = SYSPLD_VIRT_BASE, | ||
51 | .pfn = __phys_to_pfn(SYSPLD_PHYS_BASE), | ||
52 | .length = SZ_1M, | ||
53 | .type = MT_DEVICE | ||
54 | }, { | ||
55 | .virtual = 0xfe400000, | ||
56 | .pfn = __phys_to_pfn(0x10400000), | ||
57 | .length = SZ_1M, | ||
58 | .type = MT_DEVICE | ||
59 | } | ||
60 | }; | ||
61 | |||
62 | static void __init | ||
63 | fixup_p720t(struct tag *tag, char **cmdline, struct meminfo *mi) | ||
64 | { | ||
65 | /* | ||
66 | * Our bootloader doesn't setup any tags (yet). | ||
67 | */ | ||
68 | if (tag->hdr.tag != ATAG_CORE) { | ||
69 | tag->hdr.tag = ATAG_CORE; | ||
70 | tag->hdr.size = tag_size(tag_core); | ||
71 | tag->u.core.flags = 0; | ||
72 | tag->u.core.pagesize = PAGE_SIZE; | ||
73 | tag->u.core.rootdev = 0x0100; | ||
74 | |||
75 | tag = tag_next(tag); | ||
76 | tag->hdr.tag = ATAG_MEM; | ||
77 | tag->hdr.size = tag_size(tag_mem32); | ||
78 | tag->u.mem.size = 4096; | ||
79 | tag->u.mem.start = PHYS_OFFSET; | ||
80 | |||
81 | tag = tag_next(tag); | ||
82 | tag->hdr.tag = ATAG_NONE; | ||
83 | tag->hdr.size = 0; | ||
84 | } | ||
85 | } | ||
86 | |||
87 | static void __init p720t_map_io(void) | ||
88 | { | ||
89 | clps711x_map_io(); | ||
90 | iotable_init(p720t_io_desc, ARRAY_SIZE(p720t_io_desc)); | ||
91 | } | ||
92 | |||
93 | static void __init p720t_init_early(void) | ||
94 | { | ||
95 | /* | ||
96 | * Power down as much as possible in case we don't | ||
97 | * have the drivers loaded. | ||
98 | */ | ||
99 | PLD_LCDEN = 0; | ||
100 | PLD_PWR &= ~(PLD_S4_ON|PLD_S3_ON|PLD_S2_ON|PLD_S1_ON); | ||
101 | |||
102 | PLD_KBD = 0; | ||
103 | PLD_IO = 0; | ||
104 | PLD_IRDA = 0; | ||
105 | PLD_CODEC = 0; | ||
106 | PLD_TCH = 0; | ||
107 | PLD_SPI = 0; | ||
108 | if (!IS_ENABLED(CONFIG_DEBUG_LL)) { | ||
109 | PLD_COM2 = 0; | ||
110 | PLD_COM1 = 0; | ||
111 | } | ||
112 | } | ||
113 | |||
114 | /* | ||
115 | * LED controled by CPLD | ||
116 | */ | ||
117 | #if defined(CONFIG_NEW_LEDS) && defined(CONFIG_LEDS_CLASS) | ||
118 | static void p720t_led_set(struct led_classdev *cdev, | ||
119 | enum led_brightness b) | ||
120 | { | ||
121 | u8 reg = clps_readb(PDDR); | ||
122 | |||
123 | if (b != LED_OFF) | ||
124 | reg |= 0x1; | ||
125 | else | ||
126 | reg &= ~0x1; | ||
127 | |||
128 | clps_writeb(reg, PDDR); | ||
129 | } | ||
130 | |||
131 | static enum led_brightness p720t_led_get(struct led_classdev *cdev) | ||
132 | { | ||
133 | u8 reg = clps_readb(PDDR); | ||
134 | |||
135 | return (reg & 0x1) ? LED_FULL : LED_OFF; | ||
136 | } | ||
137 | |||
138 | static int __init p720t_leds_init(void) | ||
139 | { | ||
140 | |||
141 | struct led_classdev *cdev; | ||
142 | int ret; | ||
143 | |||
144 | if (!machine_is_p720t()) | ||
145 | return -ENODEV; | ||
146 | |||
147 | cdev = kzalloc(sizeof(*cdev), GFP_KERNEL); | ||
148 | if (!cdev) | ||
149 | return -ENOMEM; | ||
150 | |||
151 | cdev->name = "p720t:0"; | ||
152 | cdev->brightness_set = p720t_led_set; | ||
153 | cdev->brightness_get = p720t_led_get; | ||
154 | cdev->default_trigger = "heartbeat"; | ||
155 | |||
156 | ret = led_classdev_register(NULL, cdev); | ||
157 | if (ret < 0) { | ||
158 | kfree(cdev); | ||
159 | return ret; | ||
160 | } | ||
161 | |||
162 | return 0; | ||
163 | } | ||
164 | |||
165 | /* | ||
166 | * Since we may have triggers on any subsystem, defer registration | ||
167 | * until after subsystem_init. | ||
168 | */ | ||
169 | fs_initcall(p720t_leds_init); | ||
170 | #endif | ||
171 | |||
172 | MACHINE_START(P720T, "ARM-Prospector720T") | ||
173 | /* Maintainer: ARM Ltd/Deep Blue Solutions Ltd */ | ||
174 | .atag_offset = 0x100, | ||
175 | .fixup = fixup_p720t, | ||
176 | .init_early = p720t_init_early, | ||
177 | .map_io = p720t_map_io, | ||
178 | .init_irq = clps711x_init_irq, | ||
179 | .timer = &clps711x_timer, | ||
180 | .restart = clps711x_restart, | ||
181 | MACHINE_END | ||
diff --git a/arch/arm/mach-davinci/board-dm355-evm.c b/arch/arm/mach-davinci/board-dm355-evm.c index 88ebea89abdf..cdf8d0746e79 100644 --- a/arch/arm/mach-davinci/board-dm355-evm.c +++ b/arch/arm/mach-davinci/board-dm355-evm.c | |||
@@ -324,7 +324,7 @@ static __init void dm355_evm_init(void) | |||
324 | if (IS_ERR(aemif)) | 324 | if (IS_ERR(aemif)) |
325 | WARN("%s: unable to get AEMIF clock\n", __func__); | 325 | WARN("%s: unable to get AEMIF clock\n", __func__); |
326 | else | 326 | else |
327 | clk_enable(aemif); | 327 | clk_prepare_enable(aemif); |
328 | 328 | ||
329 | platform_add_devices(davinci_evm_devices, | 329 | platform_add_devices(davinci_evm_devices, |
330 | ARRAY_SIZE(davinci_evm_devices)); | 330 | ARRAY_SIZE(davinci_evm_devices)); |
diff --git a/arch/arm/mach-davinci/board-dm355-leopard.c b/arch/arm/mach-davinci/board-dm355-leopard.c index 2f88103c6459..d41954507fc2 100644 --- a/arch/arm/mach-davinci/board-dm355-leopard.c +++ b/arch/arm/mach-davinci/board-dm355-leopard.c | |||
@@ -246,7 +246,7 @@ static __init void dm355_leopard_init(void) | |||
246 | if (IS_ERR(aemif)) | 246 | if (IS_ERR(aemif)) |
247 | WARN("%s: unable to get AEMIF clock\n", __func__); | 247 | WARN("%s: unable to get AEMIF clock\n", __func__); |
248 | else | 248 | else |
249 | clk_enable(aemif); | 249 | clk_prepare_enable(aemif); |
250 | 250 | ||
251 | platform_add_devices(davinci_leopard_devices, | 251 | platform_add_devices(davinci_leopard_devices, |
252 | ARRAY_SIZE(davinci_leopard_devices)); | 252 | ARRAY_SIZE(davinci_leopard_devices)); |
diff --git a/arch/arm/mach-davinci/board-dm365-evm.c b/arch/arm/mach-davinci/board-dm365-evm.c index 1b4a8adcfdc9..5d49c75388ca 100644 --- a/arch/arm/mach-davinci/board-dm365-evm.c +++ b/arch/arm/mach-davinci/board-dm365-evm.c | |||
@@ -478,7 +478,7 @@ static void __init evm_init_cpld(void) | |||
478 | aemif_clk = clk_get(NULL, "aemif"); | 478 | aemif_clk = clk_get(NULL, "aemif"); |
479 | if (IS_ERR(aemif_clk)) | 479 | if (IS_ERR(aemif_clk)) |
480 | return; | 480 | return; |
481 | clk_enable(aemif_clk); | 481 | clk_prepare_enable(aemif_clk); |
482 | 482 | ||
483 | if (request_mem_region(DM365_ASYNC_EMIF_DATA_CE1_BASE, SECTION_SIZE, | 483 | if (request_mem_region(DM365_ASYNC_EMIF_DATA_CE1_BASE, SECTION_SIZE, |
484 | "cpld") == NULL) | 484 | "cpld") == NULL) |
@@ -489,7 +489,7 @@ static void __init evm_init_cpld(void) | |||
489 | SECTION_SIZE); | 489 | SECTION_SIZE); |
490 | fail: | 490 | fail: |
491 | pr_err("ERROR: can't map CPLD\n"); | 491 | pr_err("ERROR: can't map CPLD\n"); |
492 | clk_disable(aemif_clk); | 492 | clk_disable_unprepare(aemif_clk); |
493 | return; | 493 | return; |
494 | } | 494 | } |
495 | 495 | ||
diff --git a/arch/arm/mach-davinci/board-dm644x-evm.c b/arch/arm/mach-davinci/board-dm644x-evm.c index f8a99ee6bffc..f5e018de7fa5 100644 --- a/arch/arm/mach-davinci/board-dm644x-evm.c +++ b/arch/arm/mach-davinci/board-dm644x-evm.c | |||
@@ -777,7 +777,7 @@ static __init void davinci_evm_init(void) | |||
777 | struct davinci_soc_info *soc_info = &davinci_soc_info; | 777 | struct davinci_soc_info *soc_info = &davinci_soc_info; |
778 | 778 | ||
779 | aemif_clk = clk_get(NULL, "aemif"); | 779 | aemif_clk = clk_get(NULL, "aemif"); |
780 | clk_enable(aemif_clk); | 780 | clk_prepare_enable(aemif_clk); |
781 | 781 | ||
782 | if (HAS_ATA) { | 782 | if (HAS_ATA) { |
783 | if (HAS_NAND || HAS_NOR) | 783 | if (HAS_NAND || HAS_NOR) |
diff --git a/arch/arm/mach-davinci/board-neuros-osd2.c b/arch/arm/mach-davinci/board-neuros-osd2.c index 144bf31d68dd..3e3e3afebf88 100644 --- a/arch/arm/mach-davinci/board-neuros-osd2.c +++ b/arch/arm/mach-davinci/board-neuros-osd2.c | |||
@@ -188,7 +188,7 @@ static __init void davinci_ntosd2_init(void) | |||
188 | struct davinci_soc_info *soc_info = &davinci_soc_info; | 188 | struct davinci_soc_info *soc_info = &davinci_soc_info; |
189 | 189 | ||
190 | aemif_clk = clk_get(NULL, "aemif"); | 190 | aemif_clk = clk_get(NULL, "aemif"); |
191 | clk_enable(aemif_clk); | 191 | clk_prepare_enable(aemif_clk); |
192 | 192 | ||
193 | if (HAS_ATA) { | 193 | if (HAS_ATA) { |
194 | if (HAS_NAND) | 194 | if (HAS_NAND) |
diff --git a/arch/arm/mach-davinci/da850.c b/arch/arm/mach-davinci/da850.c index b90c172d5541..68c5fe01857c 100644 --- a/arch/arm/mach-davinci/da850.c +++ b/arch/arm/mach-davinci/da850.c | |||
@@ -212,6 +212,12 @@ static struct clk tptc2_clk = { | |||
212 | .flags = ALWAYS_ENABLED, | 212 | .flags = ALWAYS_ENABLED, |
213 | }; | 213 | }; |
214 | 214 | ||
215 | static struct clk pruss_clk = { | ||
216 | .name = "pruss", | ||
217 | .parent = &pll0_sysclk2, | ||
218 | .lpsc = DA8XX_LPSC0_PRUSS, | ||
219 | }; | ||
220 | |||
215 | static struct clk uart0_clk = { | 221 | static struct clk uart0_clk = { |
216 | .name = "uart0", | 222 | .name = "uart0", |
217 | .parent = &pll0_sysclk2, | 223 | .parent = &pll0_sysclk2, |
@@ -385,6 +391,7 @@ static struct clk_lookup da850_clks[] = { | |||
385 | CLK(NULL, "tptc1", &tptc1_clk), | 391 | CLK(NULL, "tptc1", &tptc1_clk), |
386 | CLK(NULL, "tpcc1", &tpcc1_clk), | 392 | CLK(NULL, "tpcc1", &tpcc1_clk), |
387 | CLK(NULL, "tptc2", &tptc2_clk), | 393 | CLK(NULL, "tptc2", &tptc2_clk), |
394 | CLK("pruss_uio", "pruss", &pruss_clk), | ||
388 | CLK(NULL, "uart0", &uart0_clk), | 395 | CLK(NULL, "uart0", &uart0_clk), |
389 | CLK(NULL, "uart1", &uart1_clk), | 396 | CLK(NULL, "uart1", &uart1_clk), |
390 | CLK(NULL, "uart2", &uart2_clk), | 397 | CLK(NULL, "uart2", &uart2_clk), |
@@ -781,12 +788,6 @@ static struct map_desc da850_io_desc[] = { | |||
781 | .length = DA8XX_CP_INTC_SIZE, | 788 | .length = DA8XX_CP_INTC_SIZE, |
782 | .type = MT_DEVICE | 789 | .type = MT_DEVICE |
783 | }, | 790 | }, |
784 | { | ||
785 | .virtual = SRAM_VIRT, | ||
786 | .pfn = __phys_to_pfn(DA8XX_ARM_RAM_BASE), | ||
787 | .length = SZ_8K, | ||
788 | .type = MT_DEVICE | ||
789 | }, | ||
790 | }; | 791 | }; |
791 | 792 | ||
792 | static u32 da850_psc_bases[] = { DA8XX_PSC0_BASE, DA8XX_PSC1_BASE }; | 793 | static u32 da850_psc_bases[] = { DA8XX_PSC0_BASE, DA8XX_PSC1_BASE }; |
@@ -1239,8 +1240,8 @@ static struct davinci_soc_info davinci_soc_info_da850 = { | |||
1239 | .gpio_irq = IRQ_DA8XX_GPIO0, | 1240 | .gpio_irq = IRQ_DA8XX_GPIO0, |
1240 | .serial_dev = &da8xx_serial_device, | 1241 | .serial_dev = &da8xx_serial_device, |
1241 | .emac_pdata = &da8xx_emac_pdata, | 1242 | .emac_pdata = &da8xx_emac_pdata, |
1242 | .sram_dma = DA8XX_ARM_RAM_BASE, | 1243 | .sram_dma = DA8XX_SHARED_RAM_BASE, |
1243 | .sram_len = SZ_8K, | 1244 | .sram_len = SZ_128K, |
1244 | }; | 1245 | }; |
1245 | 1246 | ||
1246 | void __init da850_init(void) | 1247 | void __init da850_init(void) |
diff --git a/arch/arm/mach-davinci/devices-da8xx.c b/arch/arm/mach-davinci/devices-da8xx.c index bd2f72b414bc..46c9a0c09ae5 100644 --- a/arch/arm/mach-davinci/devices-da8xx.c +++ b/arch/arm/mach-davinci/devices-da8xx.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <mach/time.h> | 22 | #include <mach/time.h> |
23 | #include <mach/da8xx.h> | 23 | #include <mach/da8xx.h> |
24 | #include <mach/cpuidle.h> | 24 | #include <mach/cpuidle.h> |
25 | #include <mach/sram.h> | ||
25 | 26 | ||
26 | #include "clock.h" | 27 | #include "clock.h" |
27 | #include "asp.h" | 28 | #include "asp.h" |
@@ -32,6 +33,7 @@ | |||
32 | #define DA8XX_WDOG_BASE 0x01c21000 /* DA8XX_TIMER64P1_BASE */ | 33 | #define DA8XX_WDOG_BASE 0x01c21000 /* DA8XX_TIMER64P1_BASE */ |
33 | #define DA8XX_I2C0_BASE 0x01c22000 | 34 | #define DA8XX_I2C0_BASE 0x01c22000 |
34 | #define DA8XX_RTC_BASE 0x01c23000 | 35 | #define DA8XX_RTC_BASE 0x01c23000 |
36 | #define DA8XX_PRUSS_MEM_BASE 0x01c30000 | ||
35 | #define DA8XX_MMCSD0_BASE 0x01c40000 | 37 | #define DA8XX_MMCSD0_BASE 0x01c40000 |
36 | #define DA8XX_SPI0_BASE 0x01c41000 | 38 | #define DA8XX_SPI0_BASE 0x01c41000 |
37 | #define DA830_SPI1_BASE 0x01e12000 | 39 | #define DA830_SPI1_BASE 0x01e12000 |
@@ -518,6 +520,75 @@ void __init da8xx_register_mcasp(int id, struct snd_platform_data *pdata) | |||
518 | } | 520 | } |
519 | } | 521 | } |
520 | 522 | ||
523 | static struct resource da8xx_pruss_resources[] = { | ||
524 | { | ||
525 | .start = DA8XX_PRUSS_MEM_BASE, | ||
526 | .end = DA8XX_PRUSS_MEM_BASE + 0xFFFF, | ||
527 | .flags = IORESOURCE_MEM, | ||
528 | }, | ||
529 | { | ||
530 | .start = IRQ_DA8XX_EVTOUT0, | ||
531 | .end = IRQ_DA8XX_EVTOUT0, | ||
532 | .flags = IORESOURCE_IRQ, | ||
533 | }, | ||
534 | { | ||
535 | .start = IRQ_DA8XX_EVTOUT1, | ||
536 | .end = IRQ_DA8XX_EVTOUT1, | ||
537 | .flags = IORESOURCE_IRQ, | ||
538 | }, | ||
539 | { | ||
540 | .start = IRQ_DA8XX_EVTOUT2, | ||
541 | .end = IRQ_DA8XX_EVTOUT2, | ||
542 | .flags = IORESOURCE_IRQ, | ||
543 | }, | ||
544 | { | ||
545 | .start = IRQ_DA8XX_EVTOUT3, | ||
546 | .end = IRQ_DA8XX_EVTOUT3, | ||
547 | .flags = IORESOURCE_IRQ, | ||
548 | }, | ||
549 | { | ||
550 | .start = IRQ_DA8XX_EVTOUT4, | ||
551 | .end = IRQ_DA8XX_EVTOUT4, | ||
552 | .flags = IORESOURCE_IRQ, | ||
553 | }, | ||
554 | { | ||
555 | .start = IRQ_DA8XX_EVTOUT5, | ||
556 | .end = IRQ_DA8XX_EVTOUT5, | ||
557 | .flags = IORESOURCE_IRQ, | ||
558 | }, | ||
559 | { | ||
560 | .start = IRQ_DA8XX_EVTOUT6, | ||
561 | .end = IRQ_DA8XX_EVTOUT6, | ||
562 | .flags = IORESOURCE_IRQ, | ||
563 | }, | ||
564 | { | ||
565 | .start = IRQ_DA8XX_EVTOUT7, | ||
566 | .end = IRQ_DA8XX_EVTOUT7, | ||
567 | .flags = IORESOURCE_IRQ, | ||
568 | }, | ||
569 | }; | ||
570 | |||
571 | static struct uio_pruss_pdata da8xx_uio_pruss_pdata = { | ||
572 | .pintc_base = 0x4000, | ||
573 | }; | ||
574 | |||
575 | static struct platform_device da8xx_uio_pruss_dev = { | ||
576 | .name = "pruss_uio", | ||
577 | .id = -1, | ||
578 | .num_resources = ARRAY_SIZE(da8xx_pruss_resources), | ||
579 | .resource = da8xx_pruss_resources, | ||
580 | .dev = { | ||
581 | .coherent_dma_mask = DMA_BIT_MASK(32), | ||
582 | .platform_data = &da8xx_uio_pruss_pdata, | ||
583 | } | ||
584 | }; | ||
585 | |||
586 | int __init da8xx_register_uio_pruss(void) | ||
587 | { | ||
588 | da8xx_uio_pruss_pdata.sram_pool = sram_get_gen_pool(); | ||
589 | return platform_device_register(&da8xx_uio_pruss_dev); | ||
590 | } | ||
591 | |||
521 | static const struct display_panel disp_panel = { | 592 | static const struct display_panel disp_panel = { |
522 | QVGA, | 593 | QVGA, |
523 | 16, | 594 | 16, |
@@ -900,7 +971,7 @@ static int da850_sata_init(struct device *dev, void __iomem *addr) | |||
900 | if (IS_ERR(da850_sata_clk)) | 971 | if (IS_ERR(da850_sata_clk)) |
901 | return PTR_ERR(da850_sata_clk); | 972 | return PTR_ERR(da850_sata_clk); |
902 | 973 | ||
903 | ret = clk_enable(da850_sata_clk); | 974 | ret = clk_prepare_enable(da850_sata_clk); |
904 | if (ret) | 975 | if (ret) |
905 | goto err0; | 976 | goto err0; |
906 | 977 | ||
@@ -931,7 +1002,7 @@ static int da850_sata_init(struct device *dev, void __iomem *addr) | |||
931 | return 0; | 1002 | return 0; |
932 | 1003 | ||
933 | err1: | 1004 | err1: |
934 | clk_disable(da850_sata_clk); | 1005 | clk_disable_unprepare(da850_sata_clk); |
935 | err0: | 1006 | err0: |
936 | clk_put(da850_sata_clk); | 1007 | clk_put(da850_sata_clk); |
937 | return ret; | 1008 | return ret; |
@@ -939,7 +1010,7 @@ err0: | |||
939 | 1010 | ||
940 | static void da850_sata_exit(struct device *dev) | 1011 | static void da850_sata_exit(struct device *dev) |
941 | { | 1012 | { |
942 | clk_disable(da850_sata_clk); | 1013 | clk_disable_unprepare(da850_sata_clk); |
943 | clk_put(da850_sata_clk); | 1014 | clk_put(da850_sata_clk); |
944 | } | 1015 | } |
945 | 1016 | ||
diff --git a/arch/arm/mach-davinci/dm355.c b/arch/arm/mach-davinci/dm355.c index a255434908db..b49c3b77d55e 100644 --- a/arch/arm/mach-davinci/dm355.c +++ b/arch/arm/mach-davinci/dm355.c | |||
@@ -758,12 +758,6 @@ static struct map_desc dm355_io_desc[] = { | |||
758 | .length = IO_SIZE, | 758 | .length = IO_SIZE, |
759 | .type = MT_DEVICE | 759 | .type = MT_DEVICE |
760 | }, | 760 | }, |
761 | { | ||
762 | .virtual = SRAM_VIRT, | ||
763 | .pfn = __phys_to_pfn(0x00010000), | ||
764 | .length = SZ_32K, | ||
765 | .type = MT_MEMORY_NONCACHED, | ||
766 | }, | ||
767 | }; | 761 | }; |
768 | 762 | ||
769 | /* Contents of JTAG ID register used to identify exact cpu type */ | 763 | /* Contents of JTAG ID register used to identify exact cpu type */ |
diff --git a/arch/arm/mach-davinci/dm365.c b/arch/arm/mach-davinci/dm365.c index b680c832e0ba..6c3980540be0 100644 --- a/arch/arm/mach-davinci/dm365.c +++ b/arch/arm/mach-davinci/dm365.c | |||
@@ -985,12 +985,6 @@ static struct map_desc dm365_io_desc[] = { | |||
985 | .length = IO_SIZE, | 985 | .length = IO_SIZE, |
986 | .type = MT_DEVICE | 986 | .type = MT_DEVICE |
987 | }, | 987 | }, |
988 | { | ||
989 | .virtual = SRAM_VIRT, | ||
990 | .pfn = __phys_to_pfn(0x00010000), | ||
991 | .length = SZ_32K, | ||
992 | .type = MT_MEMORY_NONCACHED, | ||
993 | }, | ||
994 | }; | 988 | }; |
995 | 989 | ||
996 | static struct resource dm365_ks_resources[] = { | 990 | static struct resource dm365_ks_resources[] = { |
diff --git a/arch/arm/mach-davinci/dm644x.c b/arch/arm/mach-davinci/dm644x.c index 14e9947bad6e..11c79a3362ef 100644 --- a/arch/arm/mach-davinci/dm644x.c +++ b/arch/arm/mach-davinci/dm644x.c | |||
@@ -785,12 +785,6 @@ static struct map_desc dm644x_io_desc[] = { | |||
785 | .length = IO_SIZE, | 785 | .length = IO_SIZE, |
786 | .type = MT_DEVICE | 786 | .type = MT_DEVICE |
787 | }, | 787 | }, |
788 | { | ||
789 | .virtual = SRAM_VIRT, | ||
790 | .pfn = __phys_to_pfn(0x00008000), | ||
791 | .length = SZ_16K, | ||
792 | .type = MT_MEMORY_NONCACHED, | ||
793 | }, | ||
794 | }; | 788 | }; |
795 | 789 | ||
796 | /* Contents of JTAG ID register used to identify exact cpu type */ | 790 | /* Contents of JTAG ID register used to identify exact cpu type */ |
diff --git a/arch/arm/mach-davinci/dm646x.c b/arch/arm/mach-davinci/dm646x.c index 97c0f8e555bd..ac7b431c4c8e 100644 --- a/arch/arm/mach-davinci/dm646x.c +++ b/arch/arm/mach-davinci/dm646x.c | |||
@@ -756,12 +756,6 @@ static struct map_desc dm646x_io_desc[] = { | |||
756 | .length = IO_SIZE, | 756 | .length = IO_SIZE, |
757 | .type = MT_DEVICE | 757 | .type = MT_DEVICE |
758 | }, | 758 | }, |
759 | { | ||
760 | .virtual = SRAM_VIRT, | ||
761 | .pfn = __phys_to_pfn(0x00010000), | ||
762 | .length = SZ_32K, | ||
763 | .type = MT_MEMORY_NONCACHED, | ||
764 | }, | ||
765 | }; | 759 | }; |
766 | 760 | ||
767 | /* Contents of JTAG ID register used to identify exact cpu type */ | 761 | /* Contents of JTAG ID register used to identify exact cpu type */ |
diff --git a/arch/arm/mach-davinci/include/mach/common.h b/arch/arm/mach-davinci/include/mach/common.h index bdc4aa8e672a..046c7238a3d6 100644 --- a/arch/arm/mach-davinci/include/mach/common.h +++ b/arch/arm/mach-davinci/include/mach/common.h | |||
@@ -104,8 +104,6 @@ int davinci_pm_init(void); | |||
104 | static inline int davinci_pm_init(void) { return 0; } | 104 | static inline int davinci_pm_init(void) { return 0; } |
105 | #endif | 105 | #endif |
106 | 106 | ||
107 | /* standard place to map on-chip SRAMs; they *may* support DMA */ | ||
108 | #define SRAM_VIRT 0xfffe0000 | ||
109 | #define SRAM_SIZE SZ_128K | 107 | #define SRAM_SIZE SZ_128K |
110 | 108 | ||
111 | #endif /* __ARCH_ARM_MACH_DAVINCI_COMMON_H */ | 109 | #endif /* __ARCH_ARM_MACH_DAVINCI_COMMON_H */ |
diff --git a/arch/arm/mach-davinci/include/mach/da8xx.h b/arch/arm/mach-davinci/include/mach/da8xx.h index aaccdc4528fc..700d311c6854 100644 --- a/arch/arm/mach-davinci/include/mach/da8xx.h +++ b/arch/arm/mach-davinci/include/mach/da8xx.h | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <linux/platform_data/mmc-davinci.h> | 26 | #include <linux/platform_data/mmc-davinci.h> |
27 | #include <linux/platform_data/usb-davinci.h> | 27 | #include <linux/platform_data/usb-davinci.h> |
28 | #include <linux/platform_data/spi-davinci.h> | 28 | #include <linux/platform_data/spi-davinci.h> |
29 | #include <linux/platform_data/uio_pruss.h> | ||
29 | 30 | ||
30 | #include <media/davinci/vpif_types.h> | 31 | #include <media/davinci/vpif_types.h> |
31 | 32 | ||
@@ -72,6 +73,7 @@ extern unsigned int da850_max_speed; | |||
72 | #define DA8XX_AEMIF_CS2_BASE 0x60000000 | 73 | #define DA8XX_AEMIF_CS2_BASE 0x60000000 |
73 | #define DA8XX_AEMIF_CS3_BASE 0x62000000 | 74 | #define DA8XX_AEMIF_CS3_BASE 0x62000000 |
74 | #define DA8XX_AEMIF_CTL_BASE 0x68000000 | 75 | #define DA8XX_AEMIF_CTL_BASE 0x68000000 |
76 | #define DA8XX_SHARED_RAM_BASE 0x80000000 | ||
75 | #define DA8XX_ARM_RAM_BASE 0xffff0000 | 77 | #define DA8XX_ARM_RAM_BASE 0xffff0000 |
76 | 78 | ||
77 | void __init da830_init(void); | 79 | void __init da830_init(void); |
@@ -86,6 +88,7 @@ int da8xx_register_watchdog(void); | |||
86 | int da8xx_register_usb20(unsigned mA, unsigned potpgt); | 88 | int da8xx_register_usb20(unsigned mA, unsigned potpgt); |
87 | int da8xx_register_usb11(struct da8xx_ohci_root_hub *pdata); | 89 | int da8xx_register_usb11(struct da8xx_ohci_root_hub *pdata); |
88 | int da8xx_register_emac(void); | 90 | int da8xx_register_emac(void); |
91 | int da8xx_register_uio_pruss(void); | ||
89 | int da8xx_register_lcdc(struct da8xx_lcdc_platform_data *pdata); | 92 | int da8xx_register_lcdc(struct da8xx_lcdc_platform_data *pdata); |
90 | int da8xx_register_mmcsd0(struct davinci_mmc_config *config); | 93 | int da8xx_register_mmcsd0(struct davinci_mmc_config *config); |
91 | int da850_register_mmcsd1(struct davinci_mmc_config *config); | 94 | int da850_register_mmcsd1(struct davinci_mmc_config *config); |
diff --git a/arch/arm/mach-davinci/include/mach/serial.h b/arch/arm/mach-davinci/include/mach/serial.h index 86a01fa6d3fe..62ad300440f5 100644 --- a/arch/arm/mach-davinci/include/mach/serial.h +++ b/arch/arm/mach-davinci/include/mach/serial.h | |||
@@ -43,6 +43,7 @@ struct davinci_uart_config { | |||
43 | }; | 43 | }; |
44 | 44 | ||
45 | extern int davinci_serial_init(struct davinci_uart_config *); | 45 | extern int davinci_serial_init(struct davinci_uart_config *); |
46 | extern int davinci_serial_setup_clk(unsigned instance, unsigned int *rate); | ||
46 | #endif | 47 | #endif |
47 | 48 | ||
48 | #endif /* __ASM_ARCH_SERIAL_H */ | 49 | #endif /* __ASM_ARCH_SERIAL_H */ |
diff --git a/arch/arm/mach-davinci/include/mach/sram.h b/arch/arm/mach-davinci/include/mach/sram.h index 111f7cc71e07..4e5db56218b8 100644 --- a/arch/arm/mach-davinci/include/mach/sram.h +++ b/arch/arm/mach-davinci/include/mach/sram.h | |||
@@ -24,4 +24,7 @@ | |||
24 | extern void *sram_alloc(size_t len, dma_addr_t *dma); | 24 | extern void *sram_alloc(size_t len, dma_addr_t *dma); |
25 | extern void sram_free(void *addr, size_t len); | 25 | extern void sram_free(void *addr, size_t len); |
26 | 26 | ||
27 | /* Get the struct gen_pool * for use in platform data */ | ||
28 | extern struct gen_pool *sram_get_gen_pool(void); | ||
29 | |||
27 | #endif /* __MACH_SRAM_H */ | 30 | #endif /* __MACH_SRAM_H */ |
diff --git a/arch/arm/mach-davinci/serial.c b/arch/arm/mach-davinci/serial.c index 1875740fe27c..f2625814c3c9 100644 --- a/arch/arm/mach-davinci/serial.c +++ b/arch/arm/mach-davinci/serial.c | |||
@@ -70,11 +70,33 @@ static void __init davinci_serial_reset(struct plat_serial8250_port *p) | |||
70 | UART_DM646X_SCR_TX_WATERMARK); | 70 | UART_DM646X_SCR_TX_WATERMARK); |
71 | } | 71 | } |
72 | 72 | ||
73 | int __init davinci_serial_init(struct davinci_uart_config *info) | 73 | /* Enable UART clock and obtain its rate */ |
74 | int __init davinci_serial_setup_clk(unsigned instance, unsigned int *rate) | ||
74 | { | 75 | { |
75 | int i; | ||
76 | char name[16]; | 76 | char name[16]; |
77 | struct clk *uart_clk; | 77 | struct clk *clk; |
78 | struct davinci_soc_info *soc_info = &davinci_soc_info; | ||
79 | struct device *dev = &soc_info->serial_dev->dev; | ||
80 | |||
81 | sprintf(name, "uart%d", instance); | ||
82 | clk = clk_get(dev, name); | ||
83 | if (IS_ERR(clk)) { | ||
84 | pr_err("%s:%d: failed to get UART%d clock\n", | ||
85 | __func__, __LINE__, instance); | ||
86 | return PTR_ERR(clk); | ||
87 | } | ||
88 | |||
89 | clk_prepare_enable(clk); | ||
90 | |||
91 | if (rate) | ||
92 | *rate = clk_get_rate(clk); | ||
93 | |||
94 | return 0; | ||
95 | } | ||
96 | |||
97 | int __init davinci_serial_init(struct davinci_uart_config *info) | ||
98 | { | ||
99 | int i, ret; | ||
78 | struct davinci_soc_info *soc_info = &davinci_soc_info; | 100 | struct davinci_soc_info *soc_info = &davinci_soc_info; |
79 | struct device *dev = &soc_info->serial_dev->dev; | 101 | struct device *dev = &soc_info->serial_dev->dev; |
80 | struct plat_serial8250_port *p = dev->platform_data; | 102 | struct plat_serial8250_port *p = dev->platform_data; |
@@ -87,16 +109,9 @@ int __init davinci_serial_init(struct davinci_uart_config *info) | |||
87 | if (!(info->enabled_uarts & (1 << i))) | 109 | if (!(info->enabled_uarts & (1 << i))) |
88 | continue; | 110 | continue; |
89 | 111 | ||
90 | sprintf(name, "uart%d", i); | 112 | ret = davinci_serial_setup_clk(i, &p->uartclk); |
91 | uart_clk = clk_get(dev, name); | 113 | if (ret) |
92 | if (IS_ERR(uart_clk)) { | ||
93 | printk(KERN_ERR "%s:%d: failed to get UART%d clock\n", | ||
94 | __func__, __LINE__, i); | ||
95 | continue; | 114 | continue; |
96 | } | ||
97 | |||
98 | clk_enable(uart_clk); | ||
99 | p->uartclk = clk_get_rate(uart_clk); | ||
100 | 115 | ||
101 | if (!p->membase && p->mapbase) { | 116 | if (!p->membase && p->mapbase) { |
102 | p->membase = ioremap(p->mapbase, SZ_4K); | 117 | p->membase = ioremap(p->mapbase, SZ_4K); |
diff --git a/arch/arm/mach-davinci/sram.c b/arch/arm/mach-davinci/sram.c index db0f7787faf1..c5f7ee5cc80a 100644 --- a/arch/arm/mach-davinci/sram.c +++ b/arch/arm/mach-davinci/sram.c | |||
@@ -10,6 +10,7 @@ | |||
10 | */ | 10 | */ |
11 | #include <linux/module.h> | 11 | #include <linux/module.h> |
12 | #include <linux/init.h> | 12 | #include <linux/init.h> |
13 | #include <linux/io.h> | ||
13 | #include <linux/genalloc.h> | 14 | #include <linux/genalloc.h> |
14 | 15 | ||
15 | #include <mach/common.h> | 16 | #include <mach/common.h> |
@@ -17,6 +18,11 @@ | |||
17 | 18 | ||
18 | static struct gen_pool *sram_pool; | 19 | static struct gen_pool *sram_pool; |
19 | 20 | ||
21 | struct gen_pool *sram_get_gen_pool(void) | ||
22 | { | ||
23 | return sram_pool; | ||
24 | } | ||
25 | |||
20 | void *sram_alloc(size_t len, dma_addr_t *dma) | 26 | void *sram_alloc(size_t len, dma_addr_t *dma) |
21 | { | 27 | { |
22 | unsigned long vaddr; | 28 | unsigned long vaddr; |
@@ -32,7 +38,7 @@ void *sram_alloc(size_t len, dma_addr_t *dma) | |||
32 | return NULL; | 38 | return NULL; |
33 | 39 | ||
34 | if (dma) | 40 | if (dma) |
35 | *dma = dma_base + (vaddr - SRAM_VIRT); | 41 | *dma = gen_pool_virt_to_phys(sram_pool, vaddr); |
36 | return (void *)vaddr; | 42 | return (void *)vaddr; |
37 | 43 | ||
38 | } | 44 | } |
@@ -53,8 +59,10 @@ EXPORT_SYMBOL(sram_free); | |||
53 | */ | 59 | */ |
54 | static int __init sram_init(void) | 60 | static int __init sram_init(void) |
55 | { | 61 | { |
62 | phys_addr_t phys = davinci_soc_info.sram_dma; | ||
56 | unsigned len = davinci_soc_info.sram_len; | 63 | unsigned len = davinci_soc_info.sram_len; |
57 | int status = 0; | 64 | int status = 0; |
65 | void *addr; | ||
58 | 66 | ||
59 | if (len) { | 67 | if (len) { |
60 | len = min_t(unsigned, len, SRAM_SIZE); | 68 | len = min_t(unsigned, len, SRAM_SIZE); |
@@ -62,8 +70,17 @@ static int __init sram_init(void) | |||
62 | if (!sram_pool) | 70 | if (!sram_pool) |
63 | status = -ENOMEM; | 71 | status = -ENOMEM; |
64 | } | 72 | } |
65 | if (sram_pool) | 73 | |
66 | status = gen_pool_add(sram_pool, SRAM_VIRT, len, -1); | 74 | if (sram_pool) { |
75 | addr = ioremap(phys, len); | ||
76 | if (!addr) | ||
77 | return -ENOMEM; | ||
78 | status = gen_pool_add_virt(sram_pool, (unsigned)addr, | ||
79 | phys, len, -1); | ||
80 | if (status < 0) | ||
81 | iounmap(addr); | ||
82 | } | ||
83 | |||
67 | WARN_ON(status < 0); | 84 | WARN_ON(status < 0); |
68 | return status; | 85 | return status; |
69 | } | 86 | } |
diff --git a/arch/arm/mach-davinci/time.c b/arch/arm/mach-davinci/time.c index 75da315b6587..9847938785ca 100644 --- a/arch/arm/mach-davinci/time.c +++ b/arch/arm/mach-davinci/time.c | |||
@@ -379,7 +379,7 @@ static void __init davinci_timer_init(void) | |||
379 | 379 | ||
380 | timer_clk = clk_get(NULL, "timer0"); | 380 | timer_clk = clk_get(NULL, "timer0"); |
381 | BUG_ON(IS_ERR(timer_clk)); | 381 | BUG_ON(IS_ERR(timer_clk)); |
382 | clk_enable(timer_clk); | 382 | clk_prepare_enable(timer_clk); |
383 | 383 | ||
384 | /* init timer hw */ | 384 | /* init timer hw */ |
385 | timer_init(); | 385 | timer_init(); |
@@ -429,7 +429,7 @@ void davinci_watchdog_reset(struct platform_device *pdev) | |||
429 | wd_clk = clk_get(&pdev->dev, NULL); | 429 | wd_clk = clk_get(&pdev->dev, NULL); |
430 | if (WARN_ON(IS_ERR(wd_clk))) | 430 | if (WARN_ON(IS_ERR(wd_clk))) |
431 | return; | 431 | return; |
432 | clk_enable(wd_clk); | 432 | clk_prepare_enable(wd_clk); |
433 | 433 | ||
434 | /* disable, internal clock source */ | 434 | /* disable, internal clock source */ |
435 | __raw_writel(0, base + TCR); | 435 | __raw_writel(0, base + TCR); |
diff --git a/arch/arm/mach-exynos/Kconfig b/arch/arm/mach-exynos/Kconfig index 69d10373a410..070c7b6d3d86 100644 --- a/arch/arm/mach-exynos/Kconfig +++ b/arch/arm/mach-exynos/Kconfig | |||
@@ -67,6 +67,15 @@ config SOC_EXYNOS5250 | |||
67 | help | 67 | help |
68 | Enable EXYNOS5250 SoC support | 68 | Enable EXYNOS5250 SoC support |
69 | 69 | ||
70 | config SOC_EXYNOS5440 | ||
71 | bool "SAMSUNG EXYNOS5440" | ||
72 | default y | ||
73 | depends on ARCH_EXYNOS5 | ||
74 | select ARM_ARCH_TIMER | ||
75 | select AUTO_ZRELADDR | ||
76 | help | ||
77 | Enable EXYNOS5440 SoC support | ||
78 | |||
70 | config EXYNOS4_MCT | 79 | config EXYNOS4_MCT |
71 | bool | 80 | bool |
72 | default y | 81 | default y |
@@ -412,9 +421,9 @@ config MACH_EXYNOS4_DT | |||
412 | 421 | ||
413 | config MACH_EXYNOS5_DT | 422 | config MACH_EXYNOS5_DT |
414 | bool "SAMSUNG EXYNOS5 Machine using device tree" | 423 | bool "SAMSUNG EXYNOS5 Machine using device tree" |
424 | default y | ||
415 | depends on ARCH_EXYNOS5 | 425 | depends on ARCH_EXYNOS5 |
416 | select ARM_AMBA | 426 | select ARM_AMBA |
417 | select SOC_EXYNOS5250 | ||
418 | select USE_OF | 427 | select USE_OF |
419 | help | 428 | help |
420 | Machine support for Samsung EXYNOS5 machine with device tree enabled. | 429 | Machine support for Samsung EXYNOS5 machine with device tree enabled. |
diff --git a/arch/arm/mach-exynos/Makefile b/arch/arm/mach-exynos/Makefile index 0c74bdc6b698..66135eedf491 100644 --- a/arch/arm/mach-exynos/Makefile +++ b/arch/arm/mach-exynos/Makefile | |||
@@ -14,9 +14,9 @@ obj- := | |||
14 | 14 | ||
15 | obj-$(CONFIG_ARCH_EXYNOS) += common.o | 15 | obj-$(CONFIG_ARCH_EXYNOS) += common.o |
16 | obj-$(CONFIG_ARCH_EXYNOS4) += clock-exynos4.o | 16 | obj-$(CONFIG_ARCH_EXYNOS4) += clock-exynos4.o |
17 | obj-$(CONFIG_ARCH_EXYNOS5) += clock-exynos5.o | ||
18 | obj-$(CONFIG_CPU_EXYNOS4210) += clock-exynos4210.o | 17 | obj-$(CONFIG_CPU_EXYNOS4210) += clock-exynos4210.o |
19 | obj-$(CONFIG_SOC_EXYNOS4212) += clock-exynos4212.o | 18 | obj-$(CONFIG_SOC_EXYNOS4212) += clock-exynos4212.o |
19 | obj-$(CONFIG_SOC_EXYNOS5250) += clock-exynos5.o | ||
20 | 20 | ||
21 | obj-$(CONFIG_PM) += pm.o | 21 | obj-$(CONFIG_PM) += pm.o |
22 | obj-$(CONFIG_PM_GENERIC_DOMAINS) += pm_domains.o | 22 | obj-$(CONFIG_PM_GENERIC_DOMAINS) += pm_domains.o |
diff --git a/arch/arm/mach-exynos/common.c b/arch/arm/mach-exynos/common.c index 0dbee7fef9bd..e05f6cca2c9b 100644 --- a/arch/arm/mach-exynos/common.c +++ b/arch/arm/mach-exynos/common.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/sched.h> | 18 | #include <linux/sched.h> |
19 | #include <linux/serial_core.h> | 19 | #include <linux/serial_core.h> |
20 | #include <linux/of.h> | 20 | #include <linux/of.h> |
21 | #include <linux/of_fdt.h> | ||
21 | #include <linux/of_irq.h> | 22 | #include <linux/of_irq.h> |
22 | #include <linux/export.h> | 23 | #include <linux/export.h> |
23 | #include <linux/irqdomain.h> | 24 | #include <linux/irqdomain.h> |
@@ -58,9 +59,11 @@ static const char name_exynos4210[] = "EXYNOS4210"; | |||
58 | static const char name_exynos4212[] = "EXYNOS4212"; | 59 | static const char name_exynos4212[] = "EXYNOS4212"; |
59 | static const char name_exynos4412[] = "EXYNOS4412"; | 60 | static const char name_exynos4412[] = "EXYNOS4412"; |
60 | static const char name_exynos5250[] = "EXYNOS5250"; | 61 | static const char name_exynos5250[] = "EXYNOS5250"; |
62 | static const char name_exynos5440[] = "EXYNOS5440"; | ||
61 | 63 | ||
62 | static void exynos4_map_io(void); | 64 | static void exynos4_map_io(void); |
63 | static void exynos5_map_io(void); | 65 | static void exynos5_map_io(void); |
66 | static void exynos5440_map_io(void); | ||
64 | static void exynos4_init_clocks(int xtal); | 67 | static void exynos4_init_clocks(int xtal); |
65 | static void exynos5_init_clocks(int xtal); | 68 | static void exynos5_init_clocks(int xtal); |
66 | static void exynos4_init_uarts(struct s3c2410_uartcfg *cfg, int no); | 69 | static void exynos4_init_uarts(struct s3c2410_uartcfg *cfg, int no); |
@@ -98,6 +101,12 @@ static struct cpu_table cpu_ids[] __initdata = { | |||
98 | .init_clocks = exynos5_init_clocks, | 101 | .init_clocks = exynos5_init_clocks, |
99 | .init = exynos_init, | 102 | .init = exynos_init, |
100 | .name = name_exynos5250, | 103 | .name = name_exynos5250, |
104 | }, { | ||
105 | .idcode = EXYNOS5440_SOC_ID, | ||
106 | .idmask = EXYNOS5_SOC_MASK, | ||
107 | .map_io = exynos5440_map_io, | ||
108 | .init = exynos_init, | ||
109 | .name = name_exynos5440, | ||
101 | }, | 110 | }, |
102 | }; | 111 | }; |
103 | 112 | ||
@@ -112,6 +121,17 @@ static struct map_desc exynos_iodesc[] __initdata = { | |||
112 | }, | 121 | }, |
113 | }; | 122 | }; |
114 | 123 | ||
124 | #ifdef CONFIG_ARCH_EXYNOS5 | ||
125 | static struct map_desc exynos5440_iodesc[] __initdata = { | ||
126 | { | ||
127 | .virtual = (unsigned long)S5P_VA_CHIPID, | ||
128 | .pfn = __phys_to_pfn(EXYNOS5440_PA_CHIPID), | ||
129 | .length = SZ_4K, | ||
130 | .type = MT_DEVICE, | ||
131 | }, | ||
132 | }; | ||
133 | #endif | ||
134 | |||
115 | static struct map_desc exynos4_iodesc[] __initdata = { | 135 | static struct map_desc exynos4_iodesc[] __initdata = { |
116 | { | 136 | { |
117 | .virtual = (unsigned long)S3C_VA_SYS, | 137 | .virtual = (unsigned long)S3C_VA_SYS, |
@@ -263,6 +283,15 @@ static struct map_desc exynos5_iodesc[] __initdata = { | |||
263 | }, | 283 | }, |
264 | }; | 284 | }; |
265 | 285 | ||
286 | static struct map_desc exynos5440_iodesc0[] __initdata = { | ||
287 | { | ||
288 | .virtual = (unsigned long)S3C_VA_UART, | ||
289 | .pfn = __phys_to_pfn(EXYNOS5440_PA_UART0), | ||
290 | .length = SZ_512K, | ||
291 | .type = MT_DEVICE, | ||
292 | }, | ||
293 | }; | ||
294 | |||
266 | void exynos4_restart(char mode, const char *cmd) | 295 | void exynos4_restart(char mode, const char *cmd) |
267 | { | 296 | { |
268 | __raw_writel(0x1, S5P_SWRESET); | 297 | __raw_writel(0x1, S5P_SWRESET); |
@@ -270,11 +299,29 @@ void exynos4_restart(char mode, const char *cmd) | |||
270 | 299 | ||
271 | void exynos5_restart(char mode, const char *cmd) | 300 | void exynos5_restart(char mode, const char *cmd) |
272 | { | 301 | { |
273 | __raw_writel(0x1, EXYNOS_SWRESET); | 302 | u32 val; |
303 | void __iomem *addr; | ||
304 | |||
305 | if (of_machine_is_compatible("samsung,exynos5250")) { | ||
306 | val = 0x1; | ||
307 | addr = EXYNOS_SWRESET; | ||
308 | } else if (of_machine_is_compatible("samsung,exynos5440")) { | ||
309 | val = (0x10 << 20) | (0x1 << 16); | ||
310 | addr = EXYNOS5440_SWRESET; | ||
311 | } else { | ||
312 | pr_err("%s: cannot support non-DT\n", __func__); | ||
313 | return; | ||
314 | } | ||
315 | |||
316 | __raw_writel(val, addr); | ||
274 | } | 317 | } |
275 | 318 | ||
276 | void __init exynos_init_late(void) | 319 | void __init exynos_init_late(void) |
277 | { | 320 | { |
321 | if (of_machine_is_compatible("samsung,exynos5440")) | ||
322 | /* to be supported later */ | ||
323 | return; | ||
324 | |||
278 | exynos_pm_late_initcall(); | 325 | exynos_pm_late_initcall(); |
279 | } | 326 | } |
280 | 327 | ||
@@ -286,8 +333,20 @@ void __init exynos_init_late(void) | |||
286 | 333 | ||
287 | void __init exynos_init_io(struct map_desc *mach_desc, int size) | 334 | void __init exynos_init_io(struct map_desc *mach_desc, int size) |
288 | { | 335 | { |
336 | struct map_desc *iodesc = exynos_iodesc; | ||
337 | int iodesc_sz = ARRAY_SIZE(exynos_iodesc); | ||
338 | #if defined(CONFIG_OF) && defined(CONFIG_ARCH_EXYNOS5) | ||
339 | unsigned long root = of_get_flat_dt_root(); | ||
340 | |||
289 | /* initialize the io descriptors we need for initialization */ | 341 | /* initialize the io descriptors we need for initialization */ |
290 | iotable_init(exynos_iodesc, ARRAY_SIZE(exynos_iodesc)); | 342 | if (of_flat_dt_is_compatible(root, "samsung,exynos5440")) { |
343 | iodesc = exynos5440_iodesc; | ||
344 | iodesc_sz = ARRAY_SIZE(exynos5440_iodesc); | ||
345 | } | ||
346 | #endif | ||
347 | |||
348 | iotable_init(iodesc, iodesc_sz); | ||
349 | |||
291 | if (mach_desc) | 350 | if (mach_desc) |
292 | iotable_init(mach_desc, size); | 351 | iotable_init(mach_desc, size); |
293 | 352 | ||
@@ -356,6 +415,11 @@ static void __init exynos4_init_clocks(int xtal) | |||
356 | exynos4_setup_clocks(); | 415 | exynos4_setup_clocks(); |
357 | } | 416 | } |
358 | 417 | ||
418 | static void __init exynos5440_map_io(void) | ||
419 | { | ||
420 | iotable_init(exynos5440_iodesc0, ARRAY_SIZE(exynos5440_iodesc0)); | ||
421 | } | ||
422 | |||
359 | static void __init exynos5_init_clocks(int xtal) | 423 | static void __init exynos5_init_clocks(int xtal) |
360 | { | 424 | { |
361 | printk(KERN_DEBUG "%s: initializing clocks\n", __func__); | 425 | printk(KERN_DEBUG "%s: initializing clocks\n", __func__); |
@@ -572,8 +636,9 @@ static int __init combiner_of_init(struct device_node *np, | |||
572 | return 0; | 636 | return 0; |
573 | } | 637 | } |
574 | 638 | ||
575 | static const struct of_device_id exynos4_dt_irq_match[] = { | 639 | static const struct of_device_id exynos_dt_irq_match[] = { |
576 | { .compatible = "arm,cortex-a9-gic", .data = gic_of_init, }, | 640 | { .compatible = "arm,cortex-a9-gic", .data = gic_of_init, }, |
641 | { .compatible = "arm,cortex-a15-gic", .data = gic_of_init, }, | ||
577 | { .compatible = "samsung,exynos4210-combiner", | 642 | { .compatible = "samsung,exynos4210-combiner", |
578 | .data = combiner_of_init, }, | 643 | .data = combiner_of_init, }, |
579 | {}, | 644 | {}, |
@@ -590,7 +655,7 @@ void __init exynos4_init_irq(void) | |||
590 | gic_init_bases(0, IRQ_PPI(0), S5P_VA_GIC_DIST, S5P_VA_GIC_CPU, gic_bank_offset, NULL); | 655 | gic_init_bases(0, IRQ_PPI(0), S5P_VA_GIC_DIST, S5P_VA_GIC_CPU, gic_bank_offset, NULL); |
591 | #ifdef CONFIG_OF | 656 | #ifdef CONFIG_OF |
592 | else | 657 | else |
593 | of_irq_init(exynos4_dt_irq_match); | 658 | of_irq_init(exynos_dt_irq_match); |
594 | #endif | 659 | #endif |
595 | 660 | ||
596 | if (!of_have_populated_dt()) | 661 | if (!of_have_populated_dt()) |
@@ -607,7 +672,7 @@ void __init exynos4_init_irq(void) | |||
607 | void __init exynos5_init_irq(void) | 672 | void __init exynos5_init_irq(void) |
608 | { | 673 | { |
609 | #ifdef CONFIG_OF | 674 | #ifdef CONFIG_OF |
610 | of_irq_init(exynos4_dt_irq_match); | 675 | of_irq_init(exynos_dt_irq_match); |
611 | #endif | 676 | #endif |
612 | /* | 677 | /* |
613 | * The parameters of s5p_init_irq() are for VIC init. | 678 | * The parameters of s5p_init_irq() are for VIC init. |
@@ -637,7 +702,7 @@ static int __init exynos4_l2x0_cache_init(void) | |||
637 | { | 702 | { |
638 | int ret; | 703 | int ret; |
639 | 704 | ||
640 | if (soc_is_exynos5250()) | 705 | if (soc_is_exynos5250() || soc_is_exynos5440()) |
641 | return 0; | 706 | return 0; |
642 | 707 | ||
643 | ret = l2x0_of_init(L2_AUX_VAL, L2_AUX_MASK); | 708 | ret = l2x0_of_init(L2_AUX_VAL, L2_AUX_MASK); |
@@ -968,6 +1033,8 @@ static int __init exynos_init_irq_eint(void) | |||
968 | } | 1033 | } |
969 | } | 1034 | } |
970 | #endif | 1035 | #endif |
1036 | if (soc_is_exynos5440()) | ||
1037 | return 0; | ||
971 | 1038 | ||
972 | if (soc_is_exynos5250()) | 1039 | if (soc_is_exynos5250()) |
973 | exynos_eint_base = ioremap(EXYNOS5_PA_GPIO1, SZ_4K); | 1040 | exynos_eint_base = ioremap(EXYNOS5_PA_GPIO1, SZ_4K); |
diff --git a/arch/arm/mach-exynos/include/mach/irqs.h b/arch/arm/mach-exynos/include/mach/irqs.h index 6da31152de3a..e0f0ae3e0cf9 100644 --- a/arch/arm/mach-exynos/include/mach/irqs.h +++ b/arch/arm/mach-exynos/include/mach/irqs.h | |||
@@ -328,6 +328,11 @@ | |||
328 | #define EXYNOS5_IRQ_FIMC_LITE1 IRQ_SPI(126) | 328 | #define EXYNOS5_IRQ_FIMC_LITE1 IRQ_SPI(126) |
329 | #define EXYNOS5_IRQ_RP_TIMER IRQ_SPI(127) | 329 | #define EXYNOS5_IRQ_RP_TIMER IRQ_SPI(127) |
330 | 330 | ||
331 | /* EXYNOS5440 */ | ||
332 | |||
333 | #define EXYNOS5440_IRQ_UART0 IRQ_SPI(2) | ||
334 | #define EXYNOS5440_IRQ_UART1 IRQ_SPI(3) | ||
335 | |||
331 | #define EXYNOS5_IRQ_PMU COMBINER_IRQ(1, 2) | 336 | #define EXYNOS5_IRQ_PMU COMBINER_IRQ(1, 2) |
332 | 337 | ||
333 | #define EXYNOS5_IRQ_SYSMMU_GSC0_0 COMBINER_IRQ(2, 0) | 338 | #define EXYNOS5_IRQ_SYSMMU_GSC0_0 COMBINER_IRQ(2, 0) |
diff --git a/arch/arm/mach-exynos/include/mach/map.h b/arch/arm/mach-exynos/include/mach/map.h index 872840b2ff45..61b74e12d12b 100644 --- a/arch/arm/mach-exynos/include/mach/map.h +++ b/arch/arm/mach-exynos/include/mach/map.h | |||
@@ -53,6 +53,7 @@ | |||
53 | #define EXYNOS4_PA_ONENAND_DMA 0x0C600000 | 53 | #define EXYNOS4_PA_ONENAND_DMA 0x0C600000 |
54 | 54 | ||
55 | #define EXYNOS_PA_CHIPID 0x10000000 | 55 | #define EXYNOS_PA_CHIPID 0x10000000 |
56 | #define EXYNOS5440_PA_CHIPID 0x00160000 | ||
56 | 57 | ||
57 | #define EXYNOS4_PA_SYSCON 0x10010000 | 58 | #define EXYNOS4_PA_SYSCON 0x10010000 |
58 | #define EXYNOS5_PA_SYSCON 0x10050100 | 59 | #define EXYNOS5_PA_SYSCON 0x10050100 |
@@ -281,6 +282,10 @@ | |||
281 | #define EXYNOS5_PA_UART2 0x12C20000 | 282 | #define EXYNOS5_PA_UART2 0x12C20000 |
282 | #define EXYNOS5_PA_UART3 0x12C30000 | 283 | #define EXYNOS5_PA_UART3 0x12C30000 |
283 | 284 | ||
285 | #define EXYNOS5440_PA_UART0 0x000B0000 | ||
286 | #define EXYNOS5440_PA_UART1 0x000C0000 | ||
287 | #define EXYNOS5440_SZ_UART SZ_256 | ||
288 | |||
284 | #define S3C_VA_UARTx(x) (S3C_VA_UART + ((x) * S3C_UART_OFFSET)) | 289 | #define S3C_VA_UARTx(x) (S3C_VA_UART + ((x) * S3C_UART_OFFSET)) |
285 | 290 | ||
286 | #endif /* __ASM_ARCH_MAP_H */ | 291 | #endif /* __ASM_ARCH_MAP_H */ |
diff --git a/arch/arm/mach-exynos/include/mach/regs-pmu.h b/arch/arm/mach-exynos/include/mach/regs-pmu.h index 70b2795f5283..84428e72cf5e 100644 --- a/arch/arm/mach-exynos/include/mach/regs-pmu.h +++ b/arch/arm/mach-exynos/include/mach/regs-pmu.h | |||
@@ -31,6 +31,7 @@ | |||
31 | 31 | ||
32 | #define S5P_SWRESET S5P_PMUREG(0x0400) | 32 | #define S5P_SWRESET S5P_PMUREG(0x0400) |
33 | #define EXYNOS_SWRESET S5P_PMUREG(0x0400) | 33 | #define EXYNOS_SWRESET S5P_PMUREG(0x0400) |
34 | #define EXYNOS5440_SWRESET S5P_PMUREG(0x00C4) | ||
34 | 35 | ||
35 | #define S5P_WAKEUP_STAT S5P_PMUREG(0x0600) | 36 | #define S5P_WAKEUP_STAT S5P_PMUREG(0x0600) |
36 | #define S5P_EINT_WAKEUP_MASK S5P_PMUREG(0x0604) | 37 | #define S5P_EINT_WAKEUP_MASK S5P_PMUREG(0x0604) |
diff --git a/arch/arm/mach-exynos/mach-exynos4-dt.c b/arch/arm/mach-exynos/mach-exynos4-dt.c index eadf4b59e7d2..6df99c06419d 100644 --- a/arch/arm/mach-exynos/mach-exynos4-dt.c +++ b/arch/arm/mach-exynos/mach-exynos4-dt.c | |||
@@ -77,6 +77,7 @@ static const struct of_dev_auxdata exynos4_auxdata_lookup[] __initconst = { | |||
77 | "exynos4210-spi.2", NULL), | 77 | "exynos4210-spi.2", NULL), |
78 | OF_DEV_AUXDATA("arm,pl330", EXYNOS4_PA_PDMA0, "dma-pl330.0", NULL), | 78 | OF_DEV_AUXDATA("arm,pl330", EXYNOS4_PA_PDMA0, "dma-pl330.0", NULL), |
79 | OF_DEV_AUXDATA("arm,pl330", EXYNOS4_PA_PDMA1, "dma-pl330.1", NULL), | 79 | OF_DEV_AUXDATA("arm,pl330", EXYNOS4_PA_PDMA1, "dma-pl330.1", NULL), |
80 | OF_DEV_AUXDATA("arm,pl330", EXYNOS4_PA_MDMA1, "dma-pl330.2", NULL), | ||
80 | {}, | 81 | {}, |
81 | }; | 82 | }; |
82 | 83 | ||
diff --git a/arch/arm/mach-exynos/mach-exynos5-dt.c b/arch/arm/mach-exynos/mach-exynos5-dt.c index db1cd8eacf28..f1326be80b91 100644 --- a/arch/arm/mach-exynos/mach-exynos5-dt.c +++ b/arch/arm/mach-exynos/mach-exynos5-dt.c | |||
@@ -10,6 +10,7 @@ | |||
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/of_platform.h> | 12 | #include <linux/of_platform.h> |
13 | #include <linux/of_fdt.h> | ||
13 | #include <linux/serial_core.h> | 14 | #include <linux/serial_core.h> |
14 | 15 | ||
15 | #include <asm/mach/arch.h> | 16 | #include <asm/mach/arch.h> |
@@ -75,20 +76,35 @@ static const struct of_dev_auxdata exynos5250_auxdata_lookup[] __initconst = { | |||
75 | {}, | 76 | {}, |
76 | }; | 77 | }; |
77 | 78 | ||
78 | static void __init exynos5250_dt_map_io(void) | 79 | static const struct of_dev_auxdata exynos5440_auxdata_lookup[] __initconst = { |
80 | OF_DEV_AUXDATA("samsung,exynos4210-uart", EXYNOS5440_PA_UART0, | ||
81 | "exynos4210-uart.0", NULL), | ||
82 | {}, | ||
83 | }; | ||
84 | |||
85 | static void __init exynos5_dt_map_io(void) | ||
79 | { | 86 | { |
87 | unsigned long root = of_get_flat_dt_root(); | ||
88 | |||
80 | exynos_init_io(NULL, 0); | 89 | exynos_init_io(NULL, 0); |
81 | s3c24xx_init_clocks(24000000); | 90 | |
91 | if (of_flat_dt_is_compatible(root, "samsung,exynos5250")) | ||
92 | s3c24xx_init_clocks(24000000); | ||
82 | } | 93 | } |
83 | 94 | ||
84 | static void __init exynos5250_dt_machine_init(void) | 95 | static void __init exynos5_dt_machine_init(void) |
85 | { | 96 | { |
86 | of_platform_populate(NULL, of_default_bus_match_table, | 97 | if (of_machine_is_compatible("samsung,exynos5250")) |
87 | exynos5250_auxdata_lookup, NULL); | 98 | of_platform_populate(NULL, of_default_bus_match_table, |
99 | exynos5250_auxdata_lookup, NULL); | ||
100 | else if (of_machine_is_compatible("samsung,exynos5440")) | ||
101 | of_platform_populate(NULL, of_default_bus_match_table, | ||
102 | exynos5440_auxdata_lookup, NULL); | ||
88 | } | 103 | } |
89 | 104 | ||
90 | static char const *exynos5250_dt_compat[] __initdata = { | 105 | static char const *exynos5_dt_compat[] __initdata = { |
91 | "samsung,exynos5250", | 106 | "samsung,exynos5250", |
107 | "samsung,exynos5440", | ||
92 | NULL | 108 | NULL |
93 | }; | 109 | }; |
94 | 110 | ||
@@ -96,11 +112,11 @@ DT_MACHINE_START(EXYNOS5_DT, "SAMSUNG EXYNOS5 (Flattened Device Tree)") | |||
96 | /* Maintainer: Kukjin Kim <kgene.kim@samsung.com> */ | 112 | /* Maintainer: Kukjin Kim <kgene.kim@samsung.com> */ |
97 | .init_irq = exynos5_init_irq, | 113 | .init_irq = exynos5_init_irq, |
98 | .smp = smp_ops(exynos_smp_ops), | 114 | .smp = smp_ops(exynos_smp_ops), |
99 | .map_io = exynos5250_dt_map_io, | 115 | .map_io = exynos5_dt_map_io, |
100 | .handle_irq = gic_handle_irq, | 116 | .handle_irq = gic_handle_irq, |
101 | .init_machine = exynos5250_dt_machine_init, | 117 | .init_machine = exynos5_dt_machine_init, |
102 | .init_late = exynos_init_late, | 118 | .init_late = exynos_init_late, |
103 | .timer = &exynos4_timer, | 119 | .timer = &exynos4_timer, |
104 | .dt_compat = exynos5250_dt_compat, | 120 | .dt_compat = exynos5_dt_compat, |
105 | .restart = exynos5_restart, | 121 | .restart = exynos5_restart, |
106 | MACHINE_END | 122 | MACHINE_END |
diff --git a/arch/arm/mach-exynos/mct.c b/arch/arm/mach-exynos/mct.c index b601fb8a408b..57668eb68e75 100644 --- a/arch/arm/mach-exynos/mct.c +++ b/arch/arm/mach-exynos/mct.c | |||
@@ -19,7 +19,9 @@ | |||
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/percpu.h> | 21 | #include <linux/percpu.h> |
22 | #include <linux/of.h> | ||
22 | 23 | ||
24 | #include <asm/arch_timer.h> | ||
23 | #include <asm/hardware/gic.h> | 25 | #include <asm/hardware/gic.h> |
24 | #include <asm/localtimer.h> | 26 | #include <asm/localtimer.h> |
25 | 27 | ||
@@ -476,8 +478,13 @@ static void __init exynos4_timer_resources(void) | |||
476 | #endif /* CONFIG_LOCAL_TIMERS */ | 478 | #endif /* CONFIG_LOCAL_TIMERS */ |
477 | } | 479 | } |
478 | 480 | ||
479 | static void __init exynos4_timer_init(void) | 481 | static void __init exynos_timer_init(void) |
480 | { | 482 | { |
483 | if (soc_is_exynos5440()) { | ||
484 | arch_timer_of_register(); | ||
485 | return; | ||
486 | } | ||
487 | |||
481 | if ((soc_is_exynos4210()) || (soc_is_exynos5250())) | 488 | if ((soc_is_exynos4210()) || (soc_is_exynos5250())) |
482 | mct_int_type = MCT_INT_SPI; | 489 | mct_int_type = MCT_INT_SPI; |
483 | else | 490 | else |
@@ -489,5 +496,5 @@ static void __init exynos4_timer_init(void) | |||
489 | } | 496 | } |
490 | 497 | ||
491 | struct sys_timer exynos4_timer = { | 498 | struct sys_timer exynos4_timer = { |
492 | .init = exynos4_timer_init, | 499 | .init = exynos_timer_init, |
493 | }; | 500 | }; |
diff --git a/arch/arm/mach-exynos/platsmp.c b/arch/arm/mach-exynos/platsmp.c index f93d820ecab5..4ca8ff14a5bf 100644 --- a/arch/arm/mach-exynos/platsmp.c +++ b/arch/arm/mach-exynos/platsmp.c | |||
@@ -36,8 +36,22 @@ | |||
36 | 36 | ||
37 | extern void exynos4_secondary_startup(void); | 37 | extern void exynos4_secondary_startup(void); |
38 | 38 | ||
39 | #define CPU1_BOOT_REG (samsung_rev() == EXYNOS4210_REV_1_1 ? \ | 39 | static inline void __iomem *cpu_boot_reg_base(void) |
40 | S5P_INFORM5 : S5P_VA_SYSRAM) | 40 | { |
41 | if (soc_is_exynos4210() && samsung_rev() == EXYNOS4210_REV_1_1) | ||
42 | return S5P_INFORM5; | ||
43 | return S5P_VA_SYSRAM; | ||
44 | } | ||
45 | |||
46 | static inline void __iomem *cpu_boot_reg(int cpu) | ||
47 | { | ||
48 | void __iomem *boot_reg; | ||
49 | |||
50 | boot_reg = cpu_boot_reg_base(); | ||
51 | if (soc_is_exynos4412()) | ||
52 | boot_reg += 4*cpu; | ||
53 | return boot_reg; | ||
54 | } | ||
41 | 55 | ||
42 | /* | 56 | /* |
43 | * Write pen_release in a way that is guaranteed to be visible to all | 57 | * Write pen_release in a way that is guaranteed to be visible to all |
@@ -84,6 +98,7 @@ static void __cpuinit exynos_secondary_init(unsigned int cpu) | |||
84 | static int __cpuinit exynos_boot_secondary(unsigned int cpu, struct task_struct *idle) | 98 | static int __cpuinit exynos_boot_secondary(unsigned int cpu, struct task_struct *idle) |
85 | { | 99 | { |
86 | unsigned long timeout; | 100 | unsigned long timeout; |
101 | unsigned long phys_cpu = cpu_logical_map(cpu); | ||
87 | 102 | ||
88 | /* | 103 | /* |
89 | * Set synchronisation state between this boot processor | 104 | * Set synchronisation state between this boot processor |
@@ -99,7 +114,7 @@ static int __cpuinit exynos_boot_secondary(unsigned int cpu, struct task_struct | |||
99 | * Note that "pen_release" is the hardware CPU ID, whereas | 114 | * Note that "pen_release" is the hardware CPU ID, whereas |
100 | * "cpu" is Linux's internal ID. | 115 | * "cpu" is Linux's internal ID. |
101 | */ | 116 | */ |
102 | write_pen_release(cpu_logical_map(cpu)); | 117 | write_pen_release(phys_cpu); |
103 | 118 | ||
104 | if (!(__raw_readl(S5P_ARM_CORE1_STATUS) & S5P_CORE_LOCAL_PWR_EN)) { | 119 | if (!(__raw_readl(S5P_ARM_CORE1_STATUS) & S5P_CORE_LOCAL_PWR_EN)) { |
105 | __raw_writel(S5P_CORE_LOCAL_PWR_EN, | 120 | __raw_writel(S5P_CORE_LOCAL_PWR_EN, |
@@ -133,7 +148,7 @@ static int __cpuinit exynos_boot_secondary(unsigned int cpu, struct task_struct | |||
133 | smp_rmb(); | 148 | smp_rmb(); |
134 | 149 | ||
135 | __raw_writel(virt_to_phys(exynos4_secondary_startup), | 150 | __raw_writel(virt_to_phys(exynos4_secondary_startup), |
136 | CPU1_BOOT_REG); | 151 | cpu_boot_reg(phys_cpu)); |
137 | gic_raise_softirq(cpumask_of(cpu), 0); | 152 | gic_raise_softirq(cpumask_of(cpu), 0); |
138 | 153 | ||
139 | if (pen_release == -1) | 154 | if (pen_release == -1) |
@@ -181,6 +196,8 @@ static void __init exynos_smp_init_cpus(void) | |||
181 | 196 | ||
182 | static void __init exynos_smp_prepare_cpus(unsigned int max_cpus) | 197 | static void __init exynos_smp_prepare_cpus(unsigned int max_cpus) |
183 | { | 198 | { |
199 | int i; | ||
200 | |||
184 | if (!soc_is_exynos5250()) | 201 | if (!soc_is_exynos5250()) |
185 | scu_enable(scu_base_addr()); | 202 | scu_enable(scu_base_addr()); |
186 | 203 | ||
@@ -190,8 +207,9 @@ static void __init exynos_smp_prepare_cpus(unsigned int max_cpus) | |||
190 | * until it receives a soft interrupt, and then the | 207 | * until it receives a soft interrupt, and then the |
191 | * secondary CPU branches to this address. | 208 | * secondary CPU branches to this address. |
192 | */ | 209 | */ |
193 | __raw_writel(virt_to_phys(exynos4_secondary_startup), | 210 | for (i = 1; i < max_cpus; ++i) |
194 | CPU1_BOOT_REG); | 211 | __raw_writel(virt_to_phys(exynos4_secondary_startup), |
212 | cpu_boot_reg(cpu_logical_map(i))); | ||
195 | } | 213 | } |
196 | 214 | ||
197 | struct smp_operations exynos_smp_ops __initdata = { | 215 | struct smp_operations exynos_smp_ops __initdata = { |
diff --git a/arch/arm/mach-exynos/setup-i2c0.c b/arch/arm/mach-exynos/setup-i2c0.c index 5700f23629f7..e2d9dfbf102c 100644 --- a/arch/arm/mach-exynos/setup-i2c0.c +++ b/arch/arm/mach-exynos/setup-i2c0.c | |||
@@ -20,7 +20,7 @@ struct platform_device; /* don't need the contents */ | |||
20 | 20 | ||
21 | void s3c_i2c0_cfg_gpio(struct platform_device *dev) | 21 | void s3c_i2c0_cfg_gpio(struct platform_device *dev) |
22 | { | 22 | { |
23 | if (soc_is_exynos5250()) | 23 | if (soc_is_exynos5250() || soc_is_exynos5440()) |
24 | /* will be implemented with gpio function */ | 24 | /* will be implemented with gpio function */ |
25 | return; | 25 | return; |
26 | 26 | ||
diff --git a/arch/arm/mach-highbank/Kconfig b/arch/arm/mach-highbank/Kconfig index 0e1d0a42a3ea..551c97e87a78 100644 --- a/arch/arm/mach-highbank/Kconfig +++ b/arch/arm/mach-highbank/Kconfig | |||
@@ -1,5 +1,5 @@ | |||
1 | config ARCH_HIGHBANK | 1 | config ARCH_HIGHBANK |
2 | bool "Calxeda ECX-1000 (Highbank)" if ARCH_MULTI_V7 | 2 | bool "Calxeda ECX-1000/2000 (Highbank/Midway)" if ARCH_MULTI_V7 |
3 | select ARCH_WANT_OPTIONAL_GPIOLIB | 3 | select ARCH_WANT_OPTIONAL_GPIOLIB |
4 | select ARM_AMBA | 4 | select ARM_AMBA |
5 | select ARM_GIC | 5 | select ARM_GIC |
diff --git a/arch/arm/mach-highbank/Makefile b/arch/arm/mach-highbank/Makefile index 3ec8bdd25d09..8a1ef576d79f 100644 --- a/arch/arm/mach-highbank/Makefile +++ b/arch/arm/mach-highbank/Makefile | |||
@@ -3,7 +3,6 @@ obj-y := highbank.o system.o smc.o | |||
3 | plus_sec := $(call as-instr,.arch_extension sec,+sec) | 3 | plus_sec := $(call as-instr,.arch_extension sec,+sec) |
4 | AFLAGS_smc.o :=-Wa,-march=armv7-a$(plus_sec) | 4 | AFLAGS_smc.o :=-Wa,-march=armv7-a$(plus_sec) |
5 | 5 | ||
6 | obj-$(CONFIG_DEBUG_HIGHBANK_UART) += lluart.o | ||
7 | obj-$(CONFIG_SMP) += platsmp.o | 6 | obj-$(CONFIG_SMP) += platsmp.o |
8 | obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o | 7 | obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o |
9 | obj-$(CONFIG_PM_SLEEP) += pm.o | 8 | obj-$(CONFIG_PM_SLEEP) += pm.o |
diff --git a/arch/arm/mach-highbank/core.h b/arch/arm/mach-highbank/core.h index 286ec82a4f63..80235b46cb58 100644 --- a/arch/arm/mach-highbank/core.h +++ b/arch/arm/mach-highbank/core.h | |||
@@ -1,12 +1,10 @@ | |||
1 | #ifndef __HIGHBANK_CORE_H | ||
2 | #define __HIGHBANK_CORE_H | ||
3 | |||
1 | extern void highbank_set_cpu_jump(int cpu, void *jump_addr); | 4 | extern void highbank_set_cpu_jump(int cpu, void *jump_addr); |
2 | extern void highbank_clocks_init(void); | 5 | extern void highbank_clocks_init(void); |
3 | extern void highbank_restart(char, const char *); | 6 | extern void highbank_restart(char, const char *); |
4 | extern void __iomem *scu_base_addr; | 7 | extern void __iomem *scu_base_addr; |
5 | #ifdef CONFIG_DEBUG_HIGHBANK_UART | ||
6 | extern void highbank_lluart_map_io(void); | ||
7 | #else | ||
8 | static inline void highbank_lluart_map_io(void) {} | ||
9 | #endif | ||
10 | 8 | ||
11 | #ifdef CONFIG_PM_SLEEP | 9 | #ifdef CONFIG_PM_SLEEP |
12 | extern void highbank_pm_init(void); | 10 | extern void highbank_pm_init(void); |
@@ -18,3 +16,5 @@ extern void highbank_smc1(int fn, int arg); | |||
18 | extern void highbank_cpu_die(unsigned int cpu); | 16 | extern void highbank_cpu_die(unsigned int cpu); |
19 | 17 | ||
20 | extern struct smp_operations highbank_smp_ops; | 18 | extern struct smp_operations highbank_smp_ops; |
19 | |||
20 | #endif | ||
diff --git a/arch/arm/mach-highbank/highbank.c b/arch/arm/mach-highbank/highbank.c index 40e36a50304c..dc248167d206 100644 --- a/arch/arm/mach-highbank/highbank.c +++ b/arch/arm/mach-highbank/highbank.c | |||
@@ -26,9 +26,9 @@ | |||
26 | #include <linux/smp.h> | 26 | #include <linux/smp.h> |
27 | #include <linux/amba/bus.h> | 27 | #include <linux/amba/bus.h> |
28 | 28 | ||
29 | #include <asm/arch_timer.h> | ||
29 | #include <asm/cacheflush.h> | 30 | #include <asm/cacheflush.h> |
30 | #include <asm/smp_plat.h> | 31 | #include <asm/smp_plat.h> |
31 | #include <asm/smp_scu.h> | ||
32 | #include <asm/smp_twd.h> | 32 | #include <asm/smp_twd.h> |
33 | #include <asm/hardware/arm_timer.h> | 33 | #include <asm/hardware/arm_timer.h> |
34 | #include <asm/hardware/timer-sp.h> | 34 | #include <asm/hardware/timer-sp.h> |
@@ -42,16 +42,7 @@ | |||
42 | #include "sysregs.h" | 42 | #include "sysregs.h" |
43 | 43 | ||
44 | void __iomem *sregs_base; | 44 | void __iomem *sregs_base; |
45 | 45 | void __iomem *scu_base_addr; | |
46 | #define HB_SCU_VIRT_BASE 0xfee00000 | ||
47 | void __iomem *scu_base_addr = ((void __iomem *)(HB_SCU_VIRT_BASE)); | ||
48 | |||
49 | static struct map_desc scu_io_desc __initdata = { | ||
50 | .virtual = HB_SCU_VIRT_BASE, | ||
51 | .pfn = 0, /* run-time */ | ||
52 | .length = SZ_4K, | ||
53 | .type = MT_DEVICE, | ||
54 | }; | ||
55 | 46 | ||
56 | static void __init highbank_scu_map_io(void) | 47 | static void __init highbank_scu_map_io(void) |
57 | { | 48 | { |
@@ -60,14 +51,7 @@ static void __init highbank_scu_map_io(void) | |||
60 | /* Get SCU base */ | 51 | /* Get SCU base */ |
61 | asm("mrc p15, 4, %0, c15, c0, 0" : "=r" (base)); | 52 | asm("mrc p15, 4, %0, c15, c0, 0" : "=r" (base)); |
62 | 53 | ||
63 | scu_io_desc.pfn = __phys_to_pfn(base); | 54 | scu_base_addr = ioremap(base, SZ_4K); |
64 | iotable_init(&scu_io_desc, 1); | ||
65 | } | ||
66 | |||
67 | static void __init highbank_map_io(void) | ||
68 | { | ||
69 | highbank_scu_map_io(); | ||
70 | highbank_lluart_map_io(); | ||
71 | } | 55 | } |
72 | 56 | ||
73 | #define HB_JUMP_TABLE_PHYS(cpu) (0x40 + (0x10 * (cpu))) | 57 | #define HB_JUMP_TABLE_PHYS(cpu) (0x40 + (0x10 * (cpu))) |
@@ -83,6 +67,7 @@ void highbank_set_cpu_jump(int cpu, void *jump_addr) | |||
83 | } | 67 | } |
84 | 68 | ||
85 | const static struct of_device_id irq_match[] = { | 69 | const static struct of_device_id irq_match[] = { |
70 | { .compatible = "arm,cortex-a15-gic", .data = gic_of_init, }, | ||
86 | { .compatible = "arm,cortex-a9-gic", .data = gic_of_init, }, | 71 | { .compatible = "arm,cortex-a9-gic", .data = gic_of_init, }, |
87 | {} | 72 | {} |
88 | }; | 73 | }; |
@@ -99,6 +84,9 @@ static void __init highbank_init_irq(void) | |||
99 | { | 84 | { |
100 | of_irq_init(irq_match); | 85 | of_irq_init(irq_match); |
101 | 86 | ||
87 | if (of_find_compatible_node(NULL, NULL, "arm,cortex-a9")) | ||
88 | highbank_scu_map_io(); | ||
89 | |||
102 | #ifdef CONFIG_CACHE_L2X0 | 90 | #ifdef CONFIG_CACHE_L2X0 |
103 | /* Enable PL310 L2 Cache controller */ | 91 | /* Enable PL310 L2 Cache controller */ |
104 | highbank_smc1(0x102, 0x1); | 92 | highbank_smc1(0x102, 0x1); |
@@ -136,6 +124,9 @@ static void __init highbank_timer_init(void) | |||
136 | sp804_clockevents_init(timer_base, irq, "timer0"); | 124 | sp804_clockevents_init(timer_base, irq, "timer0"); |
137 | 125 | ||
138 | twd_local_timer_of_register(); | 126 | twd_local_timer_of_register(); |
127 | |||
128 | arch_timer_of_register(); | ||
129 | arch_timer_sched_clock_init(); | ||
139 | } | 130 | } |
140 | 131 | ||
141 | static struct sys_timer highbank_timer = { | 132 | static struct sys_timer highbank_timer = { |
@@ -145,7 +136,6 @@ static struct sys_timer highbank_timer = { | |||
145 | static void highbank_power_off(void) | 136 | static void highbank_power_off(void) |
146 | { | 137 | { |
147 | hignbank_set_pwr_shutdown(); | 138 | hignbank_set_pwr_shutdown(); |
148 | scu_power_mode(scu_base_addr, SCU_PM_POWEROFF); | ||
149 | 139 | ||
150 | while (1) | 140 | while (1) |
151 | cpu_do_idle(); | 141 | cpu_do_idle(); |
@@ -211,12 +201,13 @@ static void __init highbank_init(void) | |||
211 | 201 | ||
212 | static const char *highbank_match[] __initconst = { | 202 | static const char *highbank_match[] __initconst = { |
213 | "calxeda,highbank", | 203 | "calxeda,highbank", |
204 | "calxeda,ecx-2000", | ||
214 | NULL, | 205 | NULL, |
215 | }; | 206 | }; |
216 | 207 | ||
217 | DT_MACHINE_START(HIGHBANK, "Highbank") | 208 | DT_MACHINE_START(HIGHBANK, "Highbank") |
218 | .smp = smp_ops(highbank_smp_ops), | 209 | .smp = smp_ops(highbank_smp_ops), |
219 | .map_io = highbank_map_io, | 210 | .map_io = debug_ll_io_init, |
220 | .init_irq = highbank_init_irq, | 211 | .init_irq = highbank_init_irq, |
221 | .timer = &highbank_timer, | 212 | .timer = &highbank_timer, |
222 | .handle_irq = gic_handle_irq, | 213 | .handle_irq = gic_handle_irq, |
diff --git a/arch/arm/mach-highbank/hotplug.c b/arch/arm/mach-highbank/hotplug.c index 2c1b8c3c8e45..7b60faccd551 100644 --- a/arch/arm/mach-highbank/hotplug.c +++ b/arch/arm/mach-highbank/hotplug.c | |||
@@ -14,13 +14,11 @@ | |||
14 | * this program. If not, see <http://www.gnu.org/licenses/>. | 14 | * this program. If not, see <http://www.gnu.org/licenses/>. |
15 | */ | 15 | */ |
16 | #include <linux/kernel.h> | 16 | #include <linux/kernel.h> |
17 | #include <linux/errno.h> | ||
18 | #include <linux/smp.h> | ||
19 | 17 | ||
20 | #include <asm/smp_scu.h> | ||
21 | #include <asm/cacheflush.h> | 18 | #include <asm/cacheflush.h> |
22 | 19 | ||
23 | #include "core.h" | 20 | #include "core.h" |
21 | #include "sysregs.h" | ||
24 | 22 | ||
25 | extern void secondary_startup(void); | 23 | extern void secondary_startup(void); |
26 | 24 | ||
@@ -33,7 +31,7 @@ void __ref highbank_cpu_die(unsigned int cpu) | |||
33 | flush_cache_all(); | 31 | flush_cache_all(); |
34 | 32 | ||
35 | highbank_set_cpu_jump(cpu, secondary_startup); | 33 | highbank_set_cpu_jump(cpu, secondary_startup); |
36 | scu_power_mode(scu_base_addr, SCU_PM_POWEROFF); | 34 | highbank_set_core_pwr(); |
37 | 35 | ||
38 | cpu_do_idle(); | 36 | cpu_do_idle(); |
39 | 37 | ||
diff --git a/arch/arm/mach-highbank/lluart.c b/arch/arm/mach-highbank/lluart.c deleted file mode 100644 index 371575019f33..000000000000 --- a/arch/arm/mach-highbank/lluart.c +++ /dev/null | |||
@@ -1,34 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright 2011 Calxeda, Inc. | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify it | ||
5 | * under the terms and conditions of the GNU General Public License, | ||
6 | * version 2, as published by the Free Software Foundation. | ||
7 | * | ||
8 | * This program is distributed in the hope it will be useful, but WITHOUT | ||
9 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
10 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
11 | * more details. | ||
12 | * | ||
13 | * You should have received a copy of the GNU General Public License along with | ||
14 | * this program. If not, see <http://www.gnu.org/licenses/>. | ||
15 | */ | ||
16 | #include <linux/init.h> | ||
17 | #include <asm/page.h> | ||
18 | #include <asm/sizes.h> | ||
19 | #include <asm/mach/map.h> | ||
20 | |||
21 | #define HB_DEBUG_LL_PHYS_BASE 0xfff36000 | ||
22 | #define HB_DEBUG_LL_VIRT_BASE 0xfee36000 | ||
23 | |||
24 | static struct map_desc lluart_io_desc __initdata = { | ||
25 | .virtual = HB_DEBUG_LL_VIRT_BASE, | ||
26 | .pfn = __phys_to_pfn(HB_DEBUG_LL_PHYS_BASE), | ||
27 | .length = SZ_4K, | ||
28 | .type = MT_DEVICE, | ||
29 | }; | ||
30 | |||
31 | void __init highbank_lluart_map_io(void) | ||
32 | { | ||
33 | iotable_init(&lluart_io_desc, 1); | ||
34 | } | ||
diff --git a/arch/arm/mach-highbank/platsmp.c b/arch/arm/mach-highbank/platsmp.c index fa9560ec6e70..1129957f6c1d 100644 --- a/arch/arm/mach-highbank/platsmp.c +++ b/arch/arm/mach-highbank/platsmp.c | |||
@@ -42,9 +42,7 @@ static int __cpuinit highbank_boot_secondary(unsigned int cpu, struct task_struc | |||
42 | */ | 42 | */ |
43 | static void __init highbank_smp_init_cpus(void) | 43 | static void __init highbank_smp_init_cpus(void) |
44 | { | 44 | { |
45 | unsigned int i, ncores; | 45 | unsigned int i, ncores = 4; |
46 | |||
47 | ncores = scu_get_core_count(scu_base_addr); | ||
48 | 46 | ||
49 | /* sanity check */ | 47 | /* sanity check */ |
50 | if (ncores > NR_CPUS) { | 48 | if (ncores > NR_CPUS) { |
@@ -65,7 +63,8 @@ static void __init highbank_smp_prepare_cpus(unsigned int max_cpus) | |||
65 | { | 63 | { |
66 | int i; | 64 | int i; |
67 | 65 | ||
68 | scu_enable(scu_base_addr); | 66 | if (scu_base_addr) |
67 | scu_enable(scu_base_addr); | ||
69 | 68 | ||
70 | /* | 69 | /* |
71 | * Write the address of secondary startup into the jump table | 70 | * Write the address of secondary startup into the jump table |
diff --git a/arch/arm/mach-highbank/pm.c b/arch/arm/mach-highbank/pm.c index de866f21331f..74aa135966f0 100644 --- a/arch/arm/mach-highbank/pm.c +++ b/arch/arm/mach-highbank/pm.c | |||
@@ -19,7 +19,6 @@ | |||
19 | #include <linux/suspend.h> | 19 | #include <linux/suspend.h> |
20 | 20 | ||
21 | #include <asm/proc-fns.h> | 21 | #include <asm/proc-fns.h> |
22 | #include <asm/smp_scu.h> | ||
23 | #include <asm/suspend.h> | 22 | #include <asm/suspend.h> |
24 | 23 | ||
25 | #include "core.h" | 24 | #include "core.h" |
@@ -35,8 +34,6 @@ static int highbank_pm_enter(suspend_state_t state) | |||
35 | { | 34 | { |
36 | hignbank_set_pwr_suspend(); | 35 | hignbank_set_pwr_suspend(); |
37 | highbank_set_cpu_jump(0, cpu_resume); | 36 | highbank_set_cpu_jump(0, cpu_resume); |
38 | |||
39 | scu_power_mode(scu_base_addr, SCU_PM_POWEROFF); | ||
40 | cpu_suspend(0, highbank_suspend_finish); | 37 | cpu_suspend(0, highbank_suspend_finish); |
41 | 38 | ||
42 | return 0; | 39 | return 0; |
diff --git a/arch/arm/mach-highbank/sysregs.h b/arch/arm/mach-highbank/sysregs.h index 0e913389f445..e13e8ea7c6cb 100644 --- a/arch/arm/mach-highbank/sysregs.h +++ b/arch/arm/mach-highbank/sysregs.h | |||
@@ -17,6 +17,10 @@ | |||
17 | #define _MACH_HIGHBANK__SYSREGS_H_ | 17 | #define _MACH_HIGHBANK__SYSREGS_H_ |
18 | 18 | ||
19 | #include <linux/io.h> | 19 | #include <linux/io.h> |
20 | #include <linux/smp.h> | ||
21 | #include <asm/smp_plat.h> | ||
22 | #include <asm/smp_scu.h> | ||
23 | #include "core.h" | ||
20 | 24 | ||
21 | extern void __iomem *sregs_base; | 25 | extern void __iomem *sregs_base; |
22 | 26 | ||
@@ -29,24 +33,39 @@ extern void __iomem *sregs_base; | |||
29 | #define HB_PWR_HARD_RESET 2 | 33 | #define HB_PWR_HARD_RESET 2 |
30 | #define HB_PWR_SHUTDOWN 3 | 34 | #define HB_PWR_SHUTDOWN 3 |
31 | 35 | ||
36 | #define SREG_CPU_PWR_CTRL(c) (0x200 + ((c) * 4)) | ||
37 | |||
38 | static inline void highbank_set_core_pwr(void) | ||
39 | { | ||
40 | int cpu = cpu_logical_map(smp_processor_id()); | ||
41 | if (scu_base_addr) | ||
42 | scu_power_mode(scu_base_addr, SCU_PM_POWEROFF); | ||
43 | else | ||
44 | writel_relaxed(1, sregs_base + SREG_CPU_PWR_CTRL(cpu)); | ||
45 | } | ||
46 | |||
32 | static inline void hignbank_set_pwr_suspend(void) | 47 | static inline void hignbank_set_pwr_suspend(void) |
33 | { | 48 | { |
34 | writel(HB_PWR_SUSPEND, sregs_base + HB_SREG_A9_PWR_REQ); | 49 | writel(HB_PWR_SUSPEND, sregs_base + HB_SREG_A9_PWR_REQ); |
50 | highbank_set_core_pwr(); | ||
35 | } | 51 | } |
36 | 52 | ||
37 | static inline void hignbank_set_pwr_shutdown(void) | 53 | static inline void hignbank_set_pwr_shutdown(void) |
38 | { | 54 | { |
39 | writel(HB_PWR_SHUTDOWN, sregs_base + HB_SREG_A9_PWR_REQ); | 55 | writel(HB_PWR_SHUTDOWN, sregs_base + HB_SREG_A9_PWR_REQ); |
56 | highbank_set_core_pwr(); | ||
40 | } | 57 | } |
41 | 58 | ||
42 | static inline void hignbank_set_pwr_soft_reset(void) | 59 | static inline void hignbank_set_pwr_soft_reset(void) |
43 | { | 60 | { |
44 | writel(HB_PWR_SOFT_RESET, sregs_base + HB_SREG_A9_PWR_REQ); | 61 | writel(HB_PWR_SOFT_RESET, sregs_base + HB_SREG_A9_PWR_REQ); |
62 | highbank_set_core_pwr(); | ||
45 | } | 63 | } |
46 | 64 | ||
47 | static inline void hignbank_set_pwr_hard_reset(void) | 65 | static inline void hignbank_set_pwr_hard_reset(void) |
48 | { | 66 | { |
49 | writel(HB_PWR_HARD_RESET, sregs_base + HB_SREG_A9_PWR_REQ); | 67 | writel(HB_PWR_HARD_RESET, sregs_base + HB_SREG_A9_PWR_REQ); |
68 | highbank_set_core_pwr(); | ||
50 | } | 69 | } |
51 | 70 | ||
52 | #endif | 71 | #endif |
diff --git a/arch/arm/mach-highbank/system.c b/arch/arm/mach-highbank/system.c index 86e37cd9376c..aed96ad9bd4a 100644 --- a/arch/arm/mach-highbank/system.c +++ b/arch/arm/mach-highbank/system.c | |||
@@ -14,7 +14,6 @@ | |||
14 | * this program. If not, see <http://www.gnu.org/licenses/>. | 14 | * this program. If not, see <http://www.gnu.org/licenses/>. |
15 | */ | 15 | */ |
16 | #include <linux/io.h> | 16 | #include <linux/io.h> |
17 | #include <asm/smp_scu.h> | ||
18 | #include <asm/proc-fns.h> | 17 | #include <asm/proc-fns.h> |
19 | 18 | ||
20 | #include "core.h" | 19 | #include "core.h" |
@@ -27,7 +26,6 @@ void highbank_restart(char mode, const char *cmd) | |||
27 | else | 26 | else |
28 | hignbank_set_pwr_soft_reset(); | 27 | hignbank_set_pwr_soft_reset(); |
29 | 28 | ||
30 | scu_power_mode(scu_base_addr, SCU_PM_POWEROFF); | ||
31 | while (1) | 29 | while (1) |
32 | cpu_do_idle(); | 30 | cpu_do_idle(); |
33 | } | 31 | } |
diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig index f1bf610e2900..4e24b8c77eb4 100644 --- a/arch/arm/mach-imx/Kconfig +++ b/arch/arm/mach-imx/Kconfig | |||
@@ -394,6 +394,7 @@ config MACH_IMX27_VISSTRIM_M10 | |||
394 | select IMX_HAVE_PLATFORM_IMX_SSI | 394 | select IMX_HAVE_PLATFORM_IMX_SSI |
395 | select IMX_HAVE_PLATFORM_IMX_UART | 395 | select IMX_HAVE_PLATFORM_IMX_UART |
396 | select IMX_HAVE_PLATFORM_MX2_CAMERA | 396 | select IMX_HAVE_PLATFORM_MX2_CAMERA |
397 | select IMX_HAVE_PLATFORM_MX2_EMMA | ||
397 | select IMX_HAVE_PLATFORM_MXC_EHCI | 398 | select IMX_HAVE_PLATFORM_MXC_EHCI |
398 | select IMX_HAVE_PLATFORM_MXC_MMC | 399 | select IMX_HAVE_PLATFORM_MXC_MMC |
399 | select LEDS_GPIO_REGISTER | 400 | select LEDS_GPIO_REGISTER |
@@ -820,6 +821,7 @@ config SOC_IMX53 | |||
820 | select ARCH_MX5 | 821 | select ARCH_MX5 |
821 | select ARCH_MX53 | 822 | select ARCH_MX53 |
822 | select HAVE_CAN_FLEXCAN if CAN | 823 | select HAVE_CAN_FLEXCAN if CAN |
824 | select IMX_HAVE_PLATFORM_IMX2_WDT | ||
823 | select PINCTRL | 825 | select PINCTRL |
824 | select PINCTRL_IMX53 | 826 | select PINCTRL_IMX53 |
825 | select SOC_IMX5 | 827 | select SOC_IMX5 |
diff --git a/arch/arm/mach-imx/clk-imx27.c b/arch/arm/mach-imx/clk-imx27.c index 585ab256c58f..4c1d1e4efc74 100644 --- a/arch/arm/mach-imx/clk-imx27.c +++ b/arch/arm/mach-imx/clk-imx27.c | |||
@@ -51,8 +51,10 @@ | |||
51 | 51 | ||
52 | static const char *vpu_sel_clks[] = { "spll", "mpll_main2", }; | 52 | static const char *vpu_sel_clks[] = { "spll", "mpll_main2", }; |
53 | static const char *cpu_sel_clks[] = { "mpll_main2", "mpll", }; | 53 | static const char *cpu_sel_clks[] = { "mpll_main2", "mpll", }; |
54 | static const char *mpll_sel_clks[] = { "fpm", "mpll_osc_sel", }; | ||
55 | static const char *mpll_osc_sel_clks[] = { "ckih", "ckih_div1p5", }; | ||
54 | static const char *clko_sel_clks[] = { | 56 | static const char *clko_sel_clks[] = { |
55 | "ckil", "prem", "ckih", "ckih", | 57 | "ckil", "fpm", "ckih", "ckih", |
56 | "ckih", "mpll", "spll", "cpu_div", | 58 | "ckih", "mpll", "spll", "cpu_div", |
57 | "ahb", "ipg", "per1_div", "per2_div", | 59 | "ahb", "ipg", "per1_div", "per2_div", |
58 | "per3_div", "per4_div", "ssi1_div", "ssi2_div", | 60 | "per3_div", "per4_div", "ssi1_div", "ssi2_div", |
@@ -79,7 +81,8 @@ enum mx27_clks { | |||
79 | vpu_ahb_gate, fec_ahb_gate, emma_ahb_gate, emi_ahb_gate, dma_ahb_gate, | 81 | vpu_ahb_gate, fec_ahb_gate, emma_ahb_gate, emi_ahb_gate, dma_ahb_gate, |
80 | csi_ahb_gate, brom_ahb_gate, ata_ahb_gate, wdog_ipg_gate, usb_ipg_gate, | 82 | csi_ahb_gate, brom_ahb_gate, ata_ahb_gate, wdog_ipg_gate, usb_ipg_gate, |
81 | uart6_ipg_gate, uart5_ipg_gate, uart4_ipg_gate, uart3_ipg_gate, | 83 | uart6_ipg_gate, uart5_ipg_gate, uart4_ipg_gate, uart3_ipg_gate, |
82 | uart2_ipg_gate, uart1_ipg_gate, clk_max | 84 | uart2_ipg_gate, uart1_ipg_gate, ckih_div1p5, fpm, mpll_osc_sel, |
85 | mpll_sel, clk_max | ||
83 | }; | 86 | }; |
84 | 87 | ||
85 | static struct clk *clk[clk_max]; | 88 | static struct clk *clk[clk_max]; |
@@ -91,7 +94,15 @@ int __init mx27_clocks_init(unsigned long fref) | |||
91 | clk[dummy] = imx_clk_fixed("dummy", 0); | 94 | clk[dummy] = imx_clk_fixed("dummy", 0); |
92 | clk[ckih] = imx_clk_fixed("ckih", fref); | 95 | clk[ckih] = imx_clk_fixed("ckih", fref); |
93 | clk[ckil] = imx_clk_fixed("ckil", 32768); | 96 | clk[ckil] = imx_clk_fixed("ckil", 32768); |
94 | clk[mpll] = imx_clk_pllv1("mpll", "ckih", CCM_MPCTL0); | 97 | clk[fpm] = imx_clk_fixed_factor("fpm", "ckil", 1024, 1); |
98 | clk[ckih_div1p5] = imx_clk_fixed_factor("ckih_div1p5", "ckih", 2, 3); | ||
99 | |||
100 | clk[mpll_osc_sel] = imx_clk_mux("mpll_osc_sel", CCM_CSCR, 4, 1, | ||
101 | mpll_osc_sel_clks, | ||
102 | ARRAY_SIZE(mpll_osc_sel_clks)); | ||
103 | clk[mpll_sel] = imx_clk_mux("mpll_sel", CCM_CSCR, 16, 1, mpll_sel_clks, | ||
104 | ARRAY_SIZE(mpll_sel_clks)); | ||
105 | clk[mpll] = imx_clk_pllv1("mpll", "mpll_sel", CCM_MPCTL0); | ||
95 | clk[spll] = imx_clk_pllv1("spll", "ckih", CCM_SPCTL0); | 106 | clk[spll] = imx_clk_pllv1("spll", "ckih", CCM_SPCTL0); |
96 | clk[mpll_main2] = imx_clk_fixed_factor("mpll_main2", "mpll", 2, 3); | 107 | clk[mpll_main2] = imx_clk_fixed_factor("mpll_main2", "mpll", 2, 3); |
97 | 108 | ||
@@ -224,6 +235,7 @@ int __init mx27_clocks_init(unsigned long fref) | |||
224 | clk_register_clkdev(clk[lcdc_ipg_gate], "ipg", "imx21-fb.0"); | 235 | clk_register_clkdev(clk[lcdc_ipg_gate], "ipg", "imx21-fb.0"); |
225 | clk_register_clkdev(clk[lcdc_ahb_gate], "ahb", "imx21-fb.0"); | 236 | clk_register_clkdev(clk[lcdc_ahb_gate], "ahb", "imx21-fb.0"); |
226 | clk_register_clkdev(clk[csi_ahb_gate], "ahb", "imx27-camera.0"); | 237 | clk_register_clkdev(clk[csi_ahb_gate], "ahb", "imx27-camera.0"); |
238 | clk_register_clkdev(clk[per4_gate], "per", "imx27-camera.0"); | ||
227 | clk_register_clkdev(clk[usb_div], "per", "fsl-usb2-udc"); | 239 | clk_register_clkdev(clk[usb_div], "per", "fsl-usb2-udc"); |
228 | clk_register_clkdev(clk[usb_ipg_gate], "ipg", "fsl-usb2-udc"); | 240 | clk_register_clkdev(clk[usb_ipg_gate], "ipg", "fsl-usb2-udc"); |
229 | clk_register_clkdev(clk[usb_ahb_gate], "ahb", "fsl-usb2-udc"); | 241 | clk_register_clkdev(clk[usb_ahb_gate], "ahb", "fsl-usb2-udc"); |
diff --git a/arch/arm/mach-imx/clk-imx51-imx53.c b/arch/arm/mach-imx/clk-imx51-imx53.c index abb71f6b4d60..e8c0473c7568 100644 --- a/arch/arm/mach-imx/clk-imx51-imx53.c +++ b/arch/arm/mach-imx/clk-imx51-imx53.c | |||
@@ -87,6 +87,7 @@ enum imx5_clks { | |||
87 | }; | 87 | }; |
88 | 88 | ||
89 | static struct clk *clk[clk_max]; | 89 | static struct clk *clk[clk_max]; |
90 | static struct clk_onecell_data clk_data; | ||
90 | 91 | ||
91 | static void __init mx5_clocks_common_init(unsigned long rate_ckil, | 92 | static void __init mx5_clocks_common_init(unsigned long rate_ckil, |
92 | unsigned long rate_osc, unsigned long rate_ckih1, | 93 | unsigned long rate_osc, unsigned long rate_ckih1, |
@@ -305,6 +306,10 @@ static void __init mx5_clocks_common_init(unsigned long rate_ckil, | |||
305 | clk_prepare_enable(clk[spba]); | 306 | clk_prepare_enable(clk[spba]); |
306 | clk_prepare_enable(clk[emi_fast_gate]); /* fec */ | 307 | clk_prepare_enable(clk[emi_fast_gate]); /* fec */ |
307 | clk_prepare_enable(clk[emi_slow_gate]); /* eim */ | 308 | clk_prepare_enable(clk[emi_slow_gate]); /* eim */ |
309 | clk_prepare_enable(clk[mipi_hsc1_gate]); | ||
310 | clk_prepare_enable(clk[mipi_hsc2_gate]); | ||
311 | clk_prepare_enable(clk[mipi_esc_gate]); | ||
312 | clk_prepare_enable(clk[mipi_hsp_gate]); | ||
308 | clk_prepare_enable(clk[tmax1]); | 313 | clk_prepare_enable(clk[tmax1]); |
309 | clk_prepare_enable(clk[tmax2]); /* esdhc2, fec */ | 314 | clk_prepare_enable(clk[tmax2]); /* esdhc2, fec */ |
310 | clk_prepare_enable(clk[tmax3]); /* esdhc1, esdhc4 */ | 315 | clk_prepare_enable(clk[tmax3]); /* esdhc1, esdhc4 */ |
@@ -314,6 +319,7 @@ int __init mx51_clocks_init(unsigned long rate_ckil, unsigned long rate_osc, | |||
314 | unsigned long rate_ckih1, unsigned long rate_ckih2) | 319 | unsigned long rate_ckih1, unsigned long rate_ckih2) |
315 | { | 320 | { |
316 | int i; | 321 | int i; |
322 | struct device_node *np; | ||
317 | 323 | ||
318 | clk[pll1_sw] = imx_clk_pllv2("pll1_sw", "osc", MX51_DPLL1_BASE); | 324 | clk[pll1_sw] = imx_clk_pllv2("pll1_sw", "osc", MX51_DPLL1_BASE); |
319 | clk[pll2_sw] = imx_clk_pllv2("pll2_sw", "osc", MX51_DPLL2_BASE); | 325 | clk[pll2_sw] = imx_clk_pllv2("pll2_sw", "osc", MX51_DPLL2_BASE); |
@@ -342,16 +348,20 @@ int __init mx51_clocks_init(unsigned long rate_ckil, unsigned long rate_osc, | |||
342 | pr_err("i.MX51 clk %d: register failed with %ld\n", | 348 | pr_err("i.MX51 clk %d: register failed with %ld\n", |
343 | i, PTR_ERR(clk[i])); | 349 | i, PTR_ERR(clk[i])); |
344 | 350 | ||
351 | np = of_find_compatible_node(NULL, NULL, "fsl,imx51-ccm"); | ||
352 | clk_data.clks = clk; | ||
353 | clk_data.clk_num = ARRAY_SIZE(clk); | ||
354 | of_clk_add_provider(np, of_clk_src_onecell_get, &clk_data); | ||
355 | |||
345 | mx5_clocks_common_init(rate_ckil, rate_osc, rate_ckih1, rate_ckih2); | 356 | mx5_clocks_common_init(rate_ckil, rate_osc, rate_ckih1, rate_ckih2); |
346 | 357 | ||
347 | clk_register_clkdev(clk[hsi2c_gate], NULL, "imx21-i2c.2"); | 358 | clk_register_clkdev(clk[hsi2c_gate], NULL, "imx21-i2c.2"); |
348 | clk_register_clkdev(clk[mx51_mipi], "mipi_hsp", NULL); | 359 | clk_register_clkdev(clk[mx51_mipi], "mipi_hsp", NULL); |
349 | clk_register_clkdev(clk[vpu_gate], NULL, "imx51-vpu.0"); | 360 | clk_register_clkdev(clk[vpu_gate], NULL, "imx51-vpu.0"); |
350 | clk_register_clkdev(clk[fec_gate], NULL, "imx27-fec.0"); | 361 | clk_register_clkdev(clk[fec_gate], NULL, "imx27-fec.0"); |
351 | clk_register_clkdev(clk[ipu_gate], "bus", "imx51-ipu"); | 362 | clk_register_clkdev(clk[ipu_gate], "bus", "40000000.ipu"); |
352 | clk_register_clkdev(clk[ipu_di0_gate], "di0", "imx51-ipu"); | 363 | clk_register_clkdev(clk[ipu_di0_gate], "di0", "40000000.ipu"); |
353 | clk_register_clkdev(clk[ipu_di1_gate], "di1", "imx51-ipu"); | 364 | clk_register_clkdev(clk[ipu_di1_gate], "di1", "40000000.ipu"); |
354 | clk_register_clkdev(clk[ipu_gate], "hsp", "imx51-ipu"); | ||
355 | clk_register_clkdev(clk[usb_phy_gate], "phy", "mxc-ehci.0"); | 365 | clk_register_clkdev(clk[usb_phy_gate], "phy", "mxc-ehci.0"); |
356 | clk_register_clkdev(clk[esdhc1_ipg_gate], "ipg", "sdhci-esdhc-imx51.0"); | 366 | clk_register_clkdev(clk[esdhc1_ipg_gate], "ipg", "sdhci-esdhc-imx51.0"); |
357 | clk_register_clkdev(clk[dummy], "ahb", "sdhci-esdhc-imx51.0"); | 367 | clk_register_clkdev(clk[dummy], "ahb", "sdhci-esdhc-imx51.0"); |
@@ -365,10 +375,6 @@ int __init mx51_clocks_init(unsigned long rate_ckil, unsigned long rate_osc, | |||
365 | clk_register_clkdev(clk[esdhc4_ipg_gate], "ipg", "sdhci-esdhc-imx51.3"); | 375 | clk_register_clkdev(clk[esdhc4_ipg_gate], "ipg", "sdhci-esdhc-imx51.3"); |
366 | clk_register_clkdev(clk[dummy], "ahb", "sdhci-esdhc-imx51.3"); | 376 | clk_register_clkdev(clk[dummy], "ahb", "sdhci-esdhc-imx51.3"); |
367 | clk_register_clkdev(clk[esdhc4_per_gate], "per", "sdhci-esdhc-imx51.3"); | 377 | clk_register_clkdev(clk[esdhc4_per_gate], "per", "sdhci-esdhc-imx51.3"); |
368 | clk_register_clkdev(clk[ssi1_ipg_gate], NULL, "83fcc000.ssi"); | ||
369 | clk_register_clkdev(clk[ssi2_ipg_gate], NULL, "70014000.ssi"); | ||
370 | clk_register_clkdev(clk[ssi3_ipg_gate], NULL, "83fe8000.ssi"); | ||
371 | clk_register_clkdev(clk[nfc_gate], NULL, "83fdb000.nand"); | ||
372 | 378 | ||
373 | /* set the usboh3 parent to pll2_sw */ | 379 | /* set the usboh3 parent to pll2_sw */ |
374 | clk_set_parent(clk[usboh3_sel], clk[pll2_sw]); | 380 | clk_set_parent(clk[usboh3_sel], clk[pll2_sw]); |
@@ -392,6 +398,7 @@ int __init mx53_clocks_init(unsigned long rate_ckil, unsigned long rate_osc, | |||
392 | { | 398 | { |
393 | int i; | 399 | int i; |
394 | unsigned long r; | 400 | unsigned long r; |
401 | struct device_node *np; | ||
395 | 402 | ||
396 | clk[pll1_sw] = imx_clk_pllv2("pll1_sw", "osc", MX53_DPLL1_BASE); | 403 | clk[pll1_sw] = imx_clk_pllv2("pll1_sw", "osc", MX53_DPLL1_BASE); |
397 | clk[pll2_sw] = imx_clk_pllv2("pll2_sw", "osc", MX53_DPLL2_BASE); | 404 | clk[pll2_sw] = imx_clk_pllv2("pll2_sw", "osc", MX53_DPLL2_BASE); |
@@ -436,15 +443,20 @@ int __init mx53_clocks_init(unsigned long rate_ckil, unsigned long rate_osc, | |||
436 | pr_err("i.MX53 clk %d: register failed with %ld\n", | 443 | pr_err("i.MX53 clk %d: register failed with %ld\n", |
437 | i, PTR_ERR(clk[i])); | 444 | i, PTR_ERR(clk[i])); |
438 | 445 | ||
446 | np = of_find_compatible_node(NULL, NULL, "fsl,imx53-ccm"); | ||
447 | clk_data.clks = clk; | ||
448 | clk_data.clk_num = ARRAY_SIZE(clk); | ||
449 | of_clk_add_provider(np, of_clk_src_onecell_get, &clk_data); | ||
450 | |||
439 | mx5_clocks_common_init(rate_ckil, rate_osc, rate_ckih1, rate_ckih2); | 451 | mx5_clocks_common_init(rate_ckil, rate_osc, rate_ckih1, rate_ckih2); |
440 | 452 | ||
441 | clk_register_clkdev(clk[vpu_gate], NULL, "imx53-vpu.0"); | 453 | clk_register_clkdev(clk[vpu_gate], NULL, "imx53-vpu.0"); |
442 | clk_register_clkdev(clk[i2c3_gate], NULL, "imx21-i2c.2"); | 454 | clk_register_clkdev(clk[i2c3_gate], NULL, "imx21-i2c.2"); |
443 | clk_register_clkdev(clk[fec_gate], NULL, "imx25-fec.0"); | 455 | clk_register_clkdev(clk[fec_gate], NULL, "imx25-fec.0"); |
444 | clk_register_clkdev(clk[ipu_gate], "bus", "imx53-ipu"); | 456 | clk_register_clkdev(clk[ipu_gate], "bus", "18000000.ipu"); |
445 | clk_register_clkdev(clk[ipu_di0_gate], "di0", "imx53-ipu"); | 457 | clk_register_clkdev(clk[ipu_di0_gate], "di0", "18000000.ipu"); |
446 | clk_register_clkdev(clk[ipu_di1_gate], "di1", "imx53-ipu"); | 458 | clk_register_clkdev(clk[ipu_di1_gate], "di1", "18000000.ipu"); |
447 | clk_register_clkdev(clk[ipu_gate], "hsp", "imx53-ipu"); | 459 | clk_register_clkdev(clk[ipu_gate], "hsp", "18000000.ipu"); |
448 | clk_register_clkdev(clk[usb_phy1_gate], "usb_phy1", "mxc-ehci.0"); | 460 | clk_register_clkdev(clk[usb_phy1_gate], "usb_phy1", "mxc-ehci.0"); |
449 | clk_register_clkdev(clk[esdhc1_ipg_gate], "ipg", "sdhci-esdhc-imx53.0"); | 461 | clk_register_clkdev(clk[esdhc1_ipg_gate], "ipg", "sdhci-esdhc-imx53.0"); |
450 | clk_register_clkdev(clk[dummy], "ahb", "sdhci-esdhc-imx53.0"); | 462 | clk_register_clkdev(clk[dummy], "ahb", "sdhci-esdhc-imx53.0"); |
@@ -458,14 +470,6 @@ int __init mx53_clocks_init(unsigned long rate_ckil, unsigned long rate_osc, | |||
458 | clk_register_clkdev(clk[esdhc4_ipg_gate], "ipg", "sdhci-esdhc-imx53.3"); | 470 | clk_register_clkdev(clk[esdhc4_ipg_gate], "ipg", "sdhci-esdhc-imx53.3"); |
459 | clk_register_clkdev(clk[dummy], "ahb", "sdhci-esdhc-imx53.3"); | 471 | clk_register_clkdev(clk[dummy], "ahb", "sdhci-esdhc-imx53.3"); |
460 | clk_register_clkdev(clk[esdhc4_per_gate], "per", "sdhci-esdhc-imx53.3"); | 472 | clk_register_clkdev(clk[esdhc4_per_gate], "per", "sdhci-esdhc-imx53.3"); |
461 | clk_register_clkdev(clk[ssi1_ipg_gate], NULL, "63fcc000.ssi"); | ||
462 | clk_register_clkdev(clk[ssi2_ipg_gate], NULL, "50014000.ssi"); | ||
463 | clk_register_clkdev(clk[ssi3_ipg_gate], NULL, "63fd0000.ssi"); | ||
464 | clk_register_clkdev(clk[nfc_gate], NULL, "63fdb000.nand"); | ||
465 | clk_register_clkdev(clk[can1_ipg_gate], "ipg", "53fc8000.can"); | ||
466 | clk_register_clkdev(clk[can1_serial_gate], "per", "53fc8000.can"); | ||
467 | clk_register_clkdev(clk[can2_ipg_gate], "ipg", "53fcc000.can"); | ||
468 | clk_register_clkdev(clk[can2_serial_gate], "per", "53fcc000.can"); | ||
469 | 473 | ||
470 | /* set SDHC root clock to 200MHZ*/ | 474 | /* set SDHC root clock to 200MHZ*/ |
471 | clk_set_rate(clk[esdhc_a_podf], 200000000); | 475 | clk_set_rate(clk[esdhc_a_podf], 200000000); |
diff --git a/arch/arm/mach-imx/clk-imx6q.c b/arch/arm/mach-imx/clk-imx6q.c index e5a82bb95b52..448476958e7f 100644 --- a/arch/arm/mach-imx/clk-imx6q.c +++ b/arch/arm/mach-imx/clk-imx6q.c | |||
@@ -105,7 +105,7 @@ static const char *gpu2d_core_sels[] = { "axi", "pll3_usb_otg", "pll2_pfd0_352m" | |||
105 | static const char *gpu3d_core_sels[] = { "mmdc_ch0_axi", "pll3_usb_otg", "pll2_pfd1_594m", "pll2_pfd2_396m", }; | 105 | static const char *gpu3d_core_sels[] = { "mmdc_ch0_axi", "pll3_usb_otg", "pll2_pfd1_594m", "pll2_pfd2_396m", }; |
106 | static const char *gpu3d_shader_sels[] = { "mmdc_ch0_axi", "pll3_usb_otg", "pll2_pfd1_594m", "pll2_pfd9_720m", }; | 106 | static const char *gpu3d_shader_sels[] = { "mmdc_ch0_axi", "pll3_usb_otg", "pll2_pfd1_594m", "pll2_pfd9_720m", }; |
107 | static const char *ipu_sels[] = { "mmdc_ch0_axi", "pll2_pfd2_396m", "pll3_120m", "pll3_pfd1_540m", }; | 107 | static const char *ipu_sels[] = { "mmdc_ch0_axi", "pll2_pfd2_396m", "pll3_120m", "pll3_pfd1_540m", }; |
108 | static const char *ldb_di_sels[] = { "pll5_video", "pll2_pfd0_352m", "pll2_pfd2_396m", "pll3_pfd1_540m", }; | 108 | static const char *ldb_di_sels[] = { "pll5_video", "pll2_pfd0_352m", "pll2_pfd2_396m", "mmdc_ch1_axi", "pll3_pfd1_540m", }; |
109 | static const char *ipu_di_pre_sels[] = { "mmdc_ch0_axi", "pll3_usb_otg", "pll5_video", "pll2_pfd0_352m", "pll2_pfd2_396m", "pll3_pfd1_540m", }; | 109 | static const char *ipu_di_pre_sels[] = { "mmdc_ch0_axi", "pll3_usb_otg", "pll5_video", "pll2_pfd0_352m", "pll2_pfd2_396m", "pll3_pfd1_540m", }; |
110 | static const char *ipu1_di0_sels[] = { "ipu1_di0_pre", "dummy", "dummy", "ldb_di0", "ldb_di1", }; | 110 | static const char *ipu1_di0_sels[] = { "ipu1_di0_pre", "dummy", "dummy", "ldb_di0", "ldb_di1", }; |
111 | static const char *ipu1_di1_sels[] = { "ipu1_di1_pre", "dummy", "dummy", "ldb_di0", "ldb_di1", }; | 111 | static const char *ipu1_di1_sels[] = { "ipu1_di1_pre", "dummy", "dummy", "ldb_di0", "ldb_di1", }; |
@@ -152,8 +152,9 @@ enum mx6q_clks { | |||
152 | gpmi_bch_apb, gpmi_bch, gpmi_io, gpmi_apb, sata, sdma, spba, ssi1, | 152 | gpmi_bch_apb, gpmi_bch, gpmi_io, gpmi_apb, sata, sdma, spba, ssi1, |
153 | ssi2, ssi3, uart_ipg, uart_serial, usboh3, usdhc1, usdhc2, usdhc3, | 153 | ssi2, ssi3, uart_ipg, uart_serial, usboh3, usdhc1, usdhc2, usdhc3, |
154 | usdhc4, vdo_axi, vpu_axi, cko1, pll1_sys, pll2_bus, pll3_usb_otg, | 154 | usdhc4, vdo_axi, vpu_axi, cko1, pll1_sys, pll2_bus, pll3_usb_otg, |
155 | pll4_audio, pll5_video, pll6_mlb, pll7_usb_host, pll8_enet, ssi1_ipg, | 155 | pll4_audio, pll5_video, pll8_mlb, pll7_usb_host, pll6_enet, ssi1_ipg, |
156 | ssi2_ipg, ssi3_ipg, rom, usbphy1, usbphy2, ldb_di0_div_3_5, ldb_di1_div_3_5, | 156 | ssi2_ipg, ssi3_ipg, rom, usbphy1, usbphy2, ldb_di0_div_3_5, ldb_di1_div_3_5, |
157 | sata_ref, sata_ref_100m, pcie_ref, pcie_ref_125m, enet_ref, | ||
157 | clk_max | 158 | clk_max |
158 | }; | 159 | }; |
159 | 160 | ||
@@ -164,6 +165,13 @@ static enum mx6q_clks const clks_init_on[] __initconst = { | |||
164 | mmdc_ch0_axi, rom, | 165 | mmdc_ch0_axi, rom, |
165 | }; | 166 | }; |
166 | 167 | ||
168 | static struct clk_div_table clk_enet_ref_table[] = { | ||
169 | { .val = 0, .div = 20, }, | ||
170 | { .val = 1, .div = 10, }, | ||
171 | { .val = 2, .div = 5, }, | ||
172 | { .val = 3, .div = 4, }, | ||
173 | }; | ||
174 | |||
167 | int __init mx6q_clocks_init(void) | 175 | int __init mx6q_clocks_init(void) |
168 | { | 176 | { |
169 | struct device_node *np; | 177 | struct device_node *np; |
@@ -190,19 +198,29 @@ int __init mx6q_clocks_init(void) | |||
190 | base = of_iomap(np, 0); | 198 | base = of_iomap(np, 0); |
191 | WARN_ON(!base); | 199 | WARN_ON(!base); |
192 | 200 | ||
193 | /* type name parent_name base gate_mask div_mask */ | 201 | /* type name parent_name base div_mask */ |
194 | clk[pll1_sys] = imx_clk_pllv3(IMX_PLLV3_SYS, "pll1_sys", "osc", base, 0x2000, 0x7f); | 202 | clk[pll1_sys] = imx_clk_pllv3(IMX_PLLV3_SYS, "pll1_sys", "osc", base, 0x7f); |
195 | clk[pll2_bus] = imx_clk_pllv3(IMX_PLLV3_GENERIC, "pll2_bus", "osc", base + 0x30, 0x2000, 0x1); | 203 | clk[pll2_bus] = imx_clk_pllv3(IMX_PLLV3_GENERIC, "pll2_bus", "osc", base + 0x30, 0x1); |
196 | clk[pll3_usb_otg] = imx_clk_pllv3(IMX_PLLV3_USB, "pll3_usb_otg", "osc", base + 0x10, 0x2000, 0x3); | 204 | clk[pll3_usb_otg] = imx_clk_pllv3(IMX_PLLV3_USB, "pll3_usb_otg", "osc", base + 0x10, 0x3); |
197 | clk[pll4_audio] = imx_clk_pllv3(IMX_PLLV3_AV, "pll4_audio", "osc", base + 0x70, 0x2000, 0x7f); | 205 | clk[pll4_audio] = imx_clk_pllv3(IMX_PLLV3_AV, "pll4_audio", "osc", base + 0x70, 0x7f); |
198 | clk[pll5_video] = imx_clk_pllv3(IMX_PLLV3_AV, "pll5_video", "osc", base + 0xa0, 0x2000, 0x7f); | 206 | clk[pll5_video] = imx_clk_pllv3(IMX_PLLV3_AV, "pll5_video", "osc", base + 0xa0, 0x7f); |
199 | clk[pll6_mlb] = imx_clk_pllv3(IMX_PLLV3_MLB, "pll6_mlb", "osc", base + 0xd0, 0x2000, 0x0); | 207 | clk[pll6_enet] = imx_clk_pllv3(IMX_PLLV3_ENET, "pll6_enet", "osc", base + 0xe0, 0x3); |
200 | clk[pll7_usb_host] = imx_clk_pllv3(IMX_PLLV3_USB, "pll7_usb_host","osc", base + 0x20, 0x2000, 0x3); | 208 | clk[pll7_usb_host] = imx_clk_pllv3(IMX_PLLV3_USB, "pll7_usb_host","osc", base + 0x20, 0x3); |
201 | clk[pll8_enet] = imx_clk_pllv3(IMX_PLLV3_ENET, "pll8_enet", "osc", base + 0xe0, 0x182000, 0x3); | 209 | clk[pll8_mlb] = imx_clk_pllv3(IMX_PLLV3_MLB, "pll8_mlb", "osc", base + 0xd0, 0x0); |
202 | 210 | ||
203 | clk[usbphy1] = imx_clk_gate("usbphy1", "pll3_usb_otg", base + 0x10, 6); | 211 | clk[usbphy1] = imx_clk_gate("usbphy1", "pll3_usb_otg", base + 0x10, 6); |
204 | clk[usbphy2] = imx_clk_gate("usbphy2", "pll7_usb_host", base + 0x20, 6); | 212 | clk[usbphy2] = imx_clk_gate("usbphy2", "pll7_usb_host", base + 0x20, 6); |
205 | 213 | ||
214 | clk[sata_ref] = imx_clk_fixed_factor("sata_ref", "pll6_enet", 1, 5); | ||
215 | clk[pcie_ref] = imx_clk_fixed_factor("pcie_ref", "pll6_enet", 1, 4); | ||
216 | |||
217 | clk[sata_ref_100m] = imx_clk_gate("sata_ref_100m", "sata_ref", base + 0xe0, 20); | ||
218 | clk[pcie_ref_125m] = imx_clk_gate("pcie_ref_125m", "pcie_ref", base + 0xe0, 19); | ||
219 | |||
220 | clk[enet_ref] = clk_register_divider_table(NULL, "enet_ref", "pll6_enet", 0, | ||
221 | base + 0xe0, 0, 2, 0, clk_enet_ref_table, | ||
222 | &imx_ccm_lock); | ||
223 | |||
206 | /* name parent_name reg idx */ | 224 | /* name parent_name reg idx */ |
207 | clk[pll2_pfd0_352m] = imx_clk_pfd("pll2_pfd0_352m", "pll2_bus", base + 0x100, 0); | 225 | clk[pll2_pfd0_352m] = imx_clk_pfd("pll2_pfd0_352m", "pll2_bus", base + 0x100, 0); |
208 | clk[pll2_pfd1_594m] = imx_clk_pfd("pll2_pfd1_594m", "pll2_bus", base + 0x100, 1); | 226 | clk[pll2_pfd1_594m] = imx_clk_pfd("pll2_pfd1_594m", "pll2_bus", base + 0x100, 1); |
@@ -358,7 +376,7 @@ int __init mx6q_clocks_init(void) | |||
358 | clk[ldb_di1] = imx_clk_gate2("ldb_di1", "ldb_di1_podf", base + 0x74, 14); | 376 | clk[ldb_di1] = imx_clk_gate2("ldb_di1", "ldb_di1_podf", base + 0x74, 14); |
359 | clk[ipu2_di1] = imx_clk_gate2("ipu2_di1", "ipu2_di1_sel", base + 0x74, 10); | 377 | clk[ipu2_di1] = imx_clk_gate2("ipu2_di1", "ipu2_di1_sel", base + 0x74, 10); |
360 | clk[hsi_tx] = imx_clk_gate2("hsi_tx", "hsi_tx_podf", base + 0x74, 16); | 378 | clk[hsi_tx] = imx_clk_gate2("hsi_tx", "hsi_tx_podf", base + 0x74, 16); |
361 | clk[mlb] = imx_clk_gate2("mlb", "pll6_mlb", base + 0x74, 18); | 379 | clk[mlb] = imx_clk_gate2("mlb", "pll8_mlb", base + 0x74, 18); |
362 | clk[mmdc_ch0_axi] = imx_clk_gate2("mmdc_ch0_axi", "mmdc_ch0_axi_podf", base + 0x74, 20); | 380 | clk[mmdc_ch0_axi] = imx_clk_gate2("mmdc_ch0_axi", "mmdc_ch0_axi_podf", base + 0x74, 20); |
363 | clk[mmdc_ch1_axi] = imx_clk_gate2("mmdc_ch1_axi", "mmdc_ch1_axi_podf", base + 0x74, 22); | 381 | clk[mmdc_ch1_axi] = imx_clk_gate2("mmdc_ch1_axi", "mmdc_ch1_axi_podf", base + 0x74, 22); |
364 | clk[ocram] = imx_clk_gate2("ocram", "ahb", base + 0x74, 28); | 382 | clk[ocram] = imx_clk_gate2("ocram", "ahb", base + 0x74, 28); |
diff --git a/arch/arm/mach-imx/clk-pllv3.c b/arch/arm/mach-imx/clk-pllv3.c index 36aac947bce1..d09bc3df9a7a 100644 --- a/arch/arm/mach-imx/clk-pllv3.c +++ b/arch/arm/mach-imx/clk-pllv3.c | |||
@@ -31,7 +31,6 @@ | |||
31 | * @clk_hw: clock source | 31 | * @clk_hw: clock source |
32 | * @base: base address of PLL registers | 32 | * @base: base address of PLL registers |
33 | * @powerup_set: set POWER bit to power up the PLL | 33 | * @powerup_set: set POWER bit to power up the PLL |
34 | * @gate_mask: mask of gate bits | ||
35 | * @div_mask: mask of divider bits | 34 | * @div_mask: mask of divider bits |
36 | * | 35 | * |
37 | * IMX PLL clock version 3, found on i.MX6 series. Divider for pllv3 | 36 | * IMX PLL clock version 3, found on i.MX6 series. Divider for pllv3 |
@@ -41,7 +40,6 @@ struct clk_pllv3 { | |||
41 | struct clk_hw hw; | 40 | struct clk_hw hw; |
42 | void __iomem *base; | 41 | void __iomem *base; |
43 | bool powerup_set; | 42 | bool powerup_set; |
44 | u32 gate_mask; | ||
45 | u32 div_mask; | 43 | u32 div_mask; |
46 | }; | 44 | }; |
47 | 45 | ||
@@ -89,7 +87,7 @@ static int clk_pllv3_enable(struct clk_hw *hw) | |||
89 | u32 val; | 87 | u32 val; |
90 | 88 | ||
91 | val = readl_relaxed(pll->base); | 89 | val = readl_relaxed(pll->base); |
92 | val |= pll->gate_mask; | 90 | val |= BM_PLL_ENABLE; |
93 | writel_relaxed(val, pll->base); | 91 | writel_relaxed(val, pll->base); |
94 | 92 | ||
95 | return 0; | 93 | return 0; |
@@ -101,7 +99,7 @@ static void clk_pllv3_disable(struct clk_hw *hw) | |||
101 | u32 val; | 99 | u32 val; |
102 | 100 | ||
103 | val = readl_relaxed(pll->base); | 101 | val = readl_relaxed(pll->base); |
104 | val &= ~pll->gate_mask; | 102 | val &= ~BM_PLL_ENABLE; |
105 | writel_relaxed(val, pll->base); | 103 | writel_relaxed(val, pll->base); |
106 | } | 104 | } |
107 | 105 | ||
@@ -287,66 +285,7 @@ static const struct clk_ops clk_pllv3_av_ops = { | |||
287 | static unsigned long clk_pllv3_enet_recalc_rate(struct clk_hw *hw, | 285 | static unsigned long clk_pllv3_enet_recalc_rate(struct clk_hw *hw, |
288 | unsigned long parent_rate) | 286 | unsigned long parent_rate) |
289 | { | 287 | { |
290 | struct clk_pllv3 *pll = to_clk_pllv3(hw); | 288 | return 500000000; |
291 | u32 div = readl_relaxed(pll->base) & pll->div_mask; | ||
292 | |||
293 | switch (div) { | ||
294 | case 0: | ||
295 | return 25000000; | ||
296 | case 1: | ||
297 | return 50000000; | ||
298 | case 2: | ||
299 | return 100000000; | ||
300 | case 3: | ||
301 | return 125000000; | ||
302 | } | ||
303 | |||
304 | return 0; | ||
305 | } | ||
306 | |||
307 | static long clk_pllv3_enet_round_rate(struct clk_hw *hw, unsigned long rate, | ||
308 | unsigned long *prate) | ||
309 | { | ||
310 | if (rate >= 125000000) | ||
311 | rate = 125000000; | ||
312 | else if (rate >= 100000000) | ||
313 | rate = 100000000; | ||
314 | else if (rate >= 50000000) | ||
315 | rate = 50000000; | ||
316 | else | ||
317 | rate = 25000000; | ||
318 | return rate; | ||
319 | } | ||
320 | |||
321 | static int clk_pllv3_enet_set_rate(struct clk_hw *hw, unsigned long rate, | ||
322 | unsigned long parent_rate) | ||
323 | { | ||
324 | struct clk_pllv3 *pll = to_clk_pllv3(hw); | ||
325 | u32 val, div; | ||
326 | |||
327 | switch (rate) { | ||
328 | case 25000000: | ||
329 | div = 0; | ||
330 | break; | ||
331 | case 50000000: | ||
332 | div = 1; | ||
333 | break; | ||
334 | case 100000000: | ||
335 | div = 2; | ||
336 | break; | ||
337 | case 125000000: | ||
338 | div = 3; | ||
339 | break; | ||
340 | default: | ||
341 | return -EINVAL; | ||
342 | } | ||
343 | |||
344 | val = readl_relaxed(pll->base); | ||
345 | val &= ~pll->div_mask; | ||
346 | val |= div; | ||
347 | writel_relaxed(val, pll->base); | ||
348 | |||
349 | return 0; | ||
350 | } | 289 | } |
351 | 290 | ||
352 | static const struct clk_ops clk_pllv3_enet_ops = { | 291 | static const struct clk_ops clk_pllv3_enet_ops = { |
@@ -355,8 +294,6 @@ static const struct clk_ops clk_pllv3_enet_ops = { | |||
355 | .enable = clk_pllv3_enable, | 294 | .enable = clk_pllv3_enable, |
356 | .disable = clk_pllv3_disable, | 295 | .disable = clk_pllv3_disable, |
357 | .recalc_rate = clk_pllv3_enet_recalc_rate, | 296 | .recalc_rate = clk_pllv3_enet_recalc_rate, |
358 | .round_rate = clk_pllv3_enet_round_rate, | ||
359 | .set_rate = clk_pllv3_enet_set_rate, | ||
360 | }; | 297 | }; |
361 | 298 | ||
362 | static const struct clk_ops clk_pllv3_mlb_ops = { | 299 | static const struct clk_ops clk_pllv3_mlb_ops = { |
@@ -368,7 +305,7 @@ static const struct clk_ops clk_pllv3_mlb_ops = { | |||
368 | 305 | ||
369 | struct clk *imx_clk_pllv3(enum imx_pllv3_type type, const char *name, | 306 | struct clk *imx_clk_pllv3(enum imx_pllv3_type type, const char *name, |
370 | const char *parent_name, void __iomem *base, | 307 | const char *parent_name, void __iomem *base, |
371 | u32 gate_mask, u32 div_mask) | 308 | u32 div_mask) |
372 | { | 309 | { |
373 | struct clk_pllv3 *pll; | 310 | struct clk_pllv3 *pll; |
374 | const struct clk_ops *ops; | 311 | const struct clk_ops *ops; |
@@ -400,7 +337,6 @@ struct clk *imx_clk_pllv3(enum imx_pllv3_type type, const char *name, | |||
400 | ops = &clk_pllv3_ops; | 337 | ops = &clk_pllv3_ops; |
401 | } | 338 | } |
402 | pll->base = base; | 339 | pll->base = base; |
403 | pll->gate_mask = gate_mask; | ||
404 | pll->div_mask = div_mask; | 340 | pll->div_mask = div_mask; |
405 | 341 | ||
406 | init.name = name; | 342 | init.name = name; |
diff --git a/arch/arm/mach-imx/clk.h b/arch/arm/mach-imx/clk.h index 5f2d8acca25f..9d1f3b99d1d3 100644 --- a/arch/arm/mach-imx/clk.h +++ b/arch/arm/mach-imx/clk.h | |||
@@ -22,8 +22,7 @@ enum imx_pllv3_type { | |||
22 | }; | 22 | }; |
23 | 23 | ||
24 | struct clk *imx_clk_pllv3(enum imx_pllv3_type type, const char *name, | 24 | struct clk *imx_clk_pllv3(enum imx_pllv3_type type, const char *name, |
25 | const char *parent_name, void __iomem *base, u32 gate_mask, | 25 | const char *parent_name, void __iomem *base, u32 div_mask); |
26 | u32 div_mask); | ||
27 | 26 | ||
28 | struct clk *clk_register_gate2(struct device *dev, const char *name, | 27 | struct clk *clk_register_gate2(struct device *dev, const char *name, |
29 | const char *parent_name, unsigned long flags, | 28 | const char *parent_name, unsigned long flags, |
diff --git a/arch/arm/mach-imx/devices-imx27.h b/arch/arm/mach-imx/devices-imx27.h index 8a1ad7972d4c..130962519751 100644 --- a/arch/arm/mach-imx/devices-imx27.h +++ b/arch/arm/mach-imx/devices-imx27.h | |||
@@ -53,8 +53,10 @@ extern const struct imx_imx_uart_1irq_data imx27_imx_uart_data[]; | |||
53 | extern const struct imx_mx2_camera_data imx27_mx2_camera_data; | 53 | extern const struct imx_mx2_camera_data imx27_mx2_camera_data; |
54 | #define imx27_add_mx2_camera(pdata) \ | 54 | #define imx27_add_mx2_camera(pdata) \ |
55 | imx_add_mx2_camera(&imx27_mx2_camera_data, pdata) | 55 | imx_add_mx2_camera(&imx27_mx2_camera_data, pdata) |
56 | |||
57 | extern const struct imx_mx2_emma_data imx27_mx2_emmaprp_data; | ||
56 | #define imx27_add_mx2_emmaprp() \ | 58 | #define imx27_add_mx2_emmaprp() \ |
57 | imx_add_mx2_emmaprp(&imx27_mx2_camera_data) | 59 | imx_add_mx2_emmaprp(&imx27_mx2_emmaprp_data) |
58 | 60 | ||
59 | extern const struct imx_mxc_ehci_data imx27_mxc_ehci_otg_data; | 61 | extern const struct imx_mxc_ehci_data imx27_mxc_ehci_otg_data; |
60 | #define imx27_add_mxc_ehci_otg(pdata) \ | 62 | #define imx27_add_mxc_ehci_otg(pdata) \ |
diff --git a/arch/arm/mach-imx/devices/Kconfig b/arch/arm/mach-imx/devices/Kconfig index a35d9841f494..9a8f1ca7bcb1 100644 --- a/arch/arm/mach-imx/devices/Kconfig +++ b/arch/arm/mach-imx/devices/Kconfig | |||
@@ -56,6 +56,9 @@ config IMX_HAVE_PLATFORM_MX1_CAMERA | |||
56 | config IMX_HAVE_PLATFORM_MX2_CAMERA | 56 | config IMX_HAVE_PLATFORM_MX2_CAMERA |
57 | bool | 57 | bool |
58 | 58 | ||
59 | config IMX_HAVE_PLATFORM_MX2_EMMA | ||
60 | bool | ||
61 | |||
59 | config IMX_HAVE_PLATFORM_MXC_EHCI | 62 | config IMX_HAVE_PLATFORM_MXC_EHCI |
60 | bool | 63 | bool |
61 | 64 | ||
diff --git a/arch/arm/mach-imx/devices/Makefile b/arch/arm/mach-imx/devices/Makefile index 2abe2a5144d0..6acf37e0c119 100644 --- a/arch/arm/mach-imx/devices/Makefile +++ b/arch/arm/mach-imx/devices/Makefile | |||
@@ -30,3 +30,4 @@ obj-$(CONFIG_IMX_HAVE_PLATFORM_MXC_W1) += platform-mxc_w1.o | |||
30 | obj-$(CONFIG_IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX) += platform-sdhci-esdhc-imx.o | 30 | obj-$(CONFIG_IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX) += platform-sdhci-esdhc-imx.o |
31 | obj-$(CONFIG_IMX_HAVE_PLATFORM_SPI_IMX) += platform-spi_imx.o | 31 | obj-$(CONFIG_IMX_HAVE_PLATFORM_SPI_IMX) += platform-spi_imx.o |
32 | obj-$(CONFIG_IMX_HAVE_PLATFORM_AHCI) += platform-ahci-imx.o | 32 | obj-$(CONFIG_IMX_HAVE_PLATFORM_AHCI) += platform-ahci-imx.o |
33 | obj-$(CONFIG_IMX_HAVE_PLATFORM_MX2_EMMA) += platform-mx2-emma.o | ||
diff --git a/arch/arm/mach-imx/devices/devices-common.h b/arch/arm/mach-imx/devices/devices-common.h index e4b790b9e2aa..6277baf1b7be 100644 --- a/arch/arm/mach-imx/devices/devices-common.h +++ b/arch/arm/mach-imx/devices/devices-common.h | |||
@@ -232,8 +232,15 @@ struct imx_mx2_camera_data { | |||
232 | struct platform_device *__init imx_add_mx2_camera( | 232 | struct platform_device *__init imx_add_mx2_camera( |
233 | const struct imx_mx2_camera_data *data, | 233 | const struct imx_mx2_camera_data *data, |
234 | const struct mx2_camera_platform_data *pdata); | 234 | const struct mx2_camera_platform_data *pdata); |
235 | |||
236 | |||
237 | struct imx_mx2_emma_data { | ||
238 | resource_size_t iobase; | ||
239 | resource_size_t iosize; | ||
240 | resource_size_t irq; | ||
241 | }; | ||
235 | struct platform_device *__init imx_add_mx2_emmaprp( | 242 | struct platform_device *__init imx_add_mx2_emmaprp( |
236 | const struct imx_mx2_camera_data *data); | 243 | const struct imx_mx2_emma_data *data); |
237 | 244 | ||
238 | #include <linux/platform_data/usb-ehci-mxc.h> | 245 | #include <linux/platform_data/usb-ehci-mxc.h> |
239 | struct imx_mxc_ehci_data { | 246 | struct imx_mxc_ehci_data { |
diff --git a/arch/arm/mach-imx/devices/platform-mx2-camera.c b/arch/arm/mach-imx/devices/platform-mx2-camera.c index f4910160346b..b53e1f348f51 100644 --- a/arch/arm/mach-imx/devices/platform-mx2-camera.c +++ b/arch/arm/mach-imx/devices/platform-mx2-camera.c | |||
@@ -65,20 +65,3 @@ struct platform_device *__init imx_add_mx2_camera( | |||
65 | pdata, sizeof(*pdata), DMA_BIT_MASK(32)); | 65 | pdata, sizeof(*pdata), DMA_BIT_MASK(32)); |
66 | } | 66 | } |
67 | 67 | ||
68 | struct platform_device *__init imx_add_mx2_emmaprp( | ||
69 | const struct imx_mx2_camera_data *data) | ||
70 | { | ||
71 | struct resource res[] = { | ||
72 | { | ||
73 | .start = data->iobaseemmaprp, | ||
74 | .end = data->iobaseemmaprp + data->iosizeemmaprp - 1, | ||
75 | .flags = IORESOURCE_MEM, | ||
76 | }, { | ||
77 | .start = data->irqemmaprp, | ||
78 | .end = data->irqemmaprp, | ||
79 | .flags = IORESOURCE_IRQ, | ||
80 | }, | ||
81 | }; | ||
82 | return imx_add_platform_device_dmamask("m2m-emmaprp", 0, | ||
83 | res, 2, NULL, 0, DMA_BIT_MASK(32)); | ||
84 | } | ||
diff --git a/arch/arm/mach-imx/imx51-dt.c b/arch/arm/mach-imx/imx51-dt.c index 50742990a136..5ffa40c673f8 100644 --- a/arch/arm/mach-imx/imx51-dt.c +++ b/arch/arm/mach-imx/imx51-dt.c | |||
@@ -19,35 +19,9 @@ | |||
19 | #include "common.h" | 19 | #include "common.h" |
20 | #include "mx51.h" | 20 | #include "mx51.h" |
21 | 21 | ||
22 | /* | ||
23 | * Lookup table for attaching a specific name and platform_data pointer to | ||
24 | * devices as they get created by of_platform_populate(). Ideally this table | ||
25 | * would not exist, but the current clock implementation depends on some devices | ||
26 | * having a specific name. | ||
27 | */ | ||
28 | static const struct of_dev_auxdata imx51_auxdata_lookup[] __initconst = { | ||
29 | OF_DEV_AUXDATA("fsl,imx51-uart", MX51_UART1_BASE_ADDR, "imx21-uart.0", NULL), | ||
30 | OF_DEV_AUXDATA("fsl,imx51-uart", MX51_UART2_BASE_ADDR, "imx21-uart.1", NULL), | ||
31 | OF_DEV_AUXDATA("fsl,imx51-uart", MX51_UART3_BASE_ADDR, "imx21-uart.2", NULL), | ||
32 | OF_DEV_AUXDATA("fsl,imx51-fec", MX51_FEC_BASE_ADDR, "imx27-fec.0", NULL), | ||
33 | OF_DEV_AUXDATA("fsl,imx51-esdhc", MX51_ESDHC1_BASE_ADDR, "sdhci-esdhc-imx51.0", NULL), | ||
34 | OF_DEV_AUXDATA("fsl,imx51-esdhc", MX51_ESDHC2_BASE_ADDR, "sdhci-esdhc-imx51.1", NULL), | ||
35 | OF_DEV_AUXDATA("fsl,imx51-esdhc", MX51_ESDHC3_BASE_ADDR, "sdhci-esdhc-imx51.2", NULL), | ||
36 | OF_DEV_AUXDATA("fsl,imx51-esdhc", MX51_ESDHC4_BASE_ADDR, "sdhci-esdhc-imx51.3", NULL), | ||
37 | OF_DEV_AUXDATA("fsl,imx51-ecspi", MX51_ECSPI1_BASE_ADDR, "imx51-ecspi.0", NULL), | ||
38 | OF_DEV_AUXDATA("fsl,imx51-ecspi", MX51_ECSPI2_BASE_ADDR, "imx51-ecspi.1", NULL), | ||
39 | OF_DEV_AUXDATA("fsl,imx51-cspi", MX51_CSPI_BASE_ADDR, "imx35-cspi.0", NULL), | ||
40 | OF_DEV_AUXDATA("fsl,imx51-i2c", MX51_I2C1_BASE_ADDR, "imx21-i2c.0", NULL), | ||
41 | OF_DEV_AUXDATA("fsl,imx51-i2c", MX51_I2C2_BASE_ADDR, "imx21-i2c.1", NULL), | ||
42 | OF_DEV_AUXDATA("fsl,imx51-sdma", MX51_SDMA_BASE_ADDR, "imx35-sdma", NULL), | ||
43 | OF_DEV_AUXDATA("fsl,imx51-wdt", MX51_WDOG1_BASE_ADDR, "imx2-wdt.0", NULL), | ||
44 | { /* sentinel */ } | ||
45 | }; | ||
46 | |||
47 | static void __init imx51_dt_init(void) | 22 | static void __init imx51_dt_init(void) |
48 | { | 23 | { |
49 | of_platform_populate(NULL, of_default_bus_match_table, | 24 | of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); |
50 | imx51_auxdata_lookup, NULL); | ||
51 | } | 25 | } |
52 | 26 | ||
53 | static void __init imx51_timer_init(void) | 27 | static void __init imx51_timer_init(void) |
diff --git a/arch/arm/mach-imx/mach-imx53.c b/arch/arm/mach-imx/mach-imx53.c index e71e62610eba..860284dea0e7 100644 --- a/arch/arm/mach-imx/mach-imx53.c +++ b/arch/arm/mach-imx/mach-imx53.c | |||
@@ -23,34 +23,6 @@ | |||
23 | #include "common.h" | 23 | #include "common.h" |
24 | #include "mx53.h" | 24 | #include "mx53.h" |
25 | 25 | ||
26 | /* | ||
27 | * Lookup table for attaching a specific name and platform_data pointer to | ||
28 | * devices as they get created by of_platform_populate(). Ideally this table | ||
29 | * would not exist, but the current clock implementation depends on some devices | ||
30 | * having a specific name. | ||
31 | */ | ||
32 | static const struct of_dev_auxdata imx53_auxdata_lookup[] __initconst = { | ||
33 | OF_DEV_AUXDATA("fsl,imx53-uart", MX53_UART1_BASE_ADDR, "imx21-uart.0", NULL), | ||
34 | OF_DEV_AUXDATA("fsl,imx53-uart", MX53_UART2_BASE_ADDR, "imx21-uart.1", NULL), | ||
35 | OF_DEV_AUXDATA("fsl,imx53-uart", MX53_UART3_BASE_ADDR, "imx21-uart.2", NULL), | ||
36 | OF_DEV_AUXDATA("fsl,imx53-uart", MX53_UART4_BASE_ADDR, "imx21-uart.3", NULL), | ||
37 | OF_DEV_AUXDATA("fsl,imx53-uart", MX53_UART5_BASE_ADDR, "imx21-uart.4", NULL), | ||
38 | OF_DEV_AUXDATA("fsl,imx53-fec", MX53_FEC_BASE_ADDR, "imx25-fec.0", NULL), | ||
39 | OF_DEV_AUXDATA("fsl,imx53-esdhc", MX53_ESDHC1_BASE_ADDR, "sdhci-esdhc-imx53.0", NULL), | ||
40 | OF_DEV_AUXDATA("fsl,imx53-esdhc", MX53_ESDHC2_BASE_ADDR, "sdhci-esdhc-imx53.1", NULL), | ||
41 | OF_DEV_AUXDATA("fsl,imx53-esdhc", MX53_ESDHC3_BASE_ADDR, "sdhci-esdhc-imx53.2", NULL), | ||
42 | OF_DEV_AUXDATA("fsl,imx53-esdhc", MX53_ESDHC4_BASE_ADDR, "sdhci-esdhc-imx53.3", NULL), | ||
43 | OF_DEV_AUXDATA("fsl,imx53-ecspi", MX53_ECSPI1_BASE_ADDR, "imx51-ecspi.0", NULL), | ||
44 | OF_DEV_AUXDATA("fsl,imx53-ecspi", MX53_ECSPI2_BASE_ADDR, "imx51-ecspi.1", NULL), | ||
45 | OF_DEV_AUXDATA("fsl,imx53-cspi", MX53_CSPI_BASE_ADDR, "imx35-cspi.0", NULL), | ||
46 | OF_DEV_AUXDATA("fsl,imx53-i2c", MX53_I2C1_BASE_ADDR, "imx21-i2c.0", NULL), | ||
47 | OF_DEV_AUXDATA("fsl,imx53-i2c", MX53_I2C2_BASE_ADDR, "imx21-i2c.1", NULL), | ||
48 | OF_DEV_AUXDATA("fsl,imx53-i2c", MX53_I2C3_BASE_ADDR, "imx21-i2c.2", NULL), | ||
49 | OF_DEV_AUXDATA("fsl,imx53-sdma", MX53_SDMA_BASE_ADDR, "imx35-sdma", NULL), | ||
50 | OF_DEV_AUXDATA("fsl,imx53-wdt", MX53_WDOG1_BASE_ADDR, "imx2-wdt.0", NULL), | ||
51 | { /* sentinel */ } | ||
52 | }; | ||
53 | |||
54 | static void __init imx53_qsb_init(void) | 26 | static void __init imx53_qsb_init(void) |
55 | { | 27 | { |
56 | struct clk *clk; | 28 | struct clk *clk; |
@@ -69,8 +41,7 @@ static void __init imx53_dt_init(void) | |||
69 | if (of_machine_is_compatible("fsl,imx53-qsb")) | 41 | if (of_machine_is_compatible("fsl,imx53-qsb")) |
70 | imx53_qsb_init(); | 42 | imx53_qsb_init(); |
71 | 43 | ||
72 | of_platform_populate(NULL, of_default_bus_match_table, | 44 | of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); |
73 | imx53_auxdata_lookup, NULL); | ||
74 | } | 45 | } |
75 | 46 | ||
76 | static void __init imx53_timer_init(void) | 47 | static void __init imx53_timer_init(void) |
diff --git a/arch/arm/mach-imx/mm-imx5.c b/arch/arm/mach-imx/mm-imx5.c index f92caf1b30ba..79d71cf23a1d 100644 --- a/arch/arm/mach-imx/mm-imx5.c +++ b/arch/arm/mach-imx/mm-imx5.c | |||
@@ -81,8 +81,28 @@ void __init imx50_init_early(void) | |||
81 | mxc_arch_reset_init(MX50_IO_ADDRESS(MX50_WDOG_BASE_ADDR)); | 81 | mxc_arch_reset_init(MX50_IO_ADDRESS(MX50_WDOG_BASE_ADDR)); |
82 | } | 82 | } |
83 | 83 | ||
84 | /* | ||
85 | * The MIPI HSC unit has been removed from the i.MX51 Reference Manual by | ||
86 | * the Freescale marketing division. However this did not remove the | ||
87 | * hardware from the chip which still needs to be configured for proper | ||
88 | * IPU support. | ||
89 | */ | ||
90 | static void __init imx51_ipu_mipi_setup(void) | ||
91 | { | ||
92 | void __iomem *hsc_addr; | ||
93 | hsc_addr = MX51_IO_ADDRESS(MX51_MIPI_HSC_BASE_ADDR); | ||
94 | |||
95 | /* setup MIPI module to legacy mode */ | ||
96 | __raw_writel(0xf00, hsc_addr); | ||
97 | |||
98 | /* CSI mode: reserved; DI control mode: legacy (from Freescale BSP) */ | ||
99 | __raw_writel(__raw_readl(hsc_addr + 0x800) | 0x30ff, | ||
100 | hsc_addr + 0x800); | ||
101 | } | ||
102 | |||
84 | void __init imx51_init_early(void) | 103 | void __init imx51_init_early(void) |
85 | { | 104 | { |
105 | imx51_ipu_mipi_setup(); | ||
86 | mxc_set_cpu_type(MXC_CPU_MX51); | 106 | mxc_set_cpu_type(MXC_CPU_MX51); |
87 | mxc_iomux_v3_init(MX51_IO_ADDRESS(MX51_IOMUXC_BASE_ADDR)); | 107 | mxc_iomux_v3_init(MX51_IO_ADDRESS(MX51_IOMUXC_BASE_ADDR)); |
88 | mxc_arch_reset_init(MX51_IO_ADDRESS(MX51_WDOG1_BASE_ADDR)); | 108 | mxc_arch_reset_init(MX51_IO_ADDRESS(MX51_WDOG1_BASE_ADDR)); |
diff --git a/arch/arm/mach-integrator/include/mach/irqs.h b/arch/arm/mach-integrator/include/mach/irqs.h index 7371018455d2..eff0adad9ae3 100644 --- a/arch/arm/mach-integrator/include/mach/irqs.h +++ b/arch/arm/mach-integrator/include/mach/irqs.h | |||
@@ -19,64 +19,63 @@ | |||
19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
20 | */ | 20 | */ |
21 | 21 | ||
22 | /* | 22 | /* |
23 | * Interrupt numbers | 23 | * Interrupt numbers, all of the above are just static reservations |
24 | * used so they can be encoded into device resources. They will finally | ||
25 | * be done away with when switching to device tree. | ||
24 | */ | 26 | */ |
25 | #define IRQ_PIC_START 1 | 27 | #define IRQ_PIC_START 64 |
26 | #define IRQ_SOFTINT 1 | 28 | #define IRQ_SOFTINT (IRQ_PIC_START+0) |
27 | #define IRQ_UARTINT0 2 | 29 | #define IRQ_UARTINT0 (IRQ_PIC_START+1) |
28 | #define IRQ_UARTINT1 3 | 30 | #define IRQ_UARTINT1 (IRQ_PIC_START+2) |
29 | #define IRQ_KMIINT0 4 | 31 | #define IRQ_KMIINT0 (IRQ_PIC_START+3) |
30 | #define IRQ_KMIINT1 5 | 32 | #define IRQ_KMIINT1 (IRQ_PIC_START+4) |
31 | #define IRQ_TIMERINT0 6 | 33 | #define IRQ_TIMERINT0 (IRQ_PIC_START+5) |
32 | #define IRQ_TIMERINT1 7 | 34 | #define IRQ_TIMERINT1 (IRQ_PIC_START+6) |
33 | #define IRQ_TIMERINT2 8 | 35 | #define IRQ_TIMERINT2 (IRQ_PIC_START+7) |
34 | #define IRQ_RTCINT 9 | 36 | #define IRQ_RTCINT (IRQ_PIC_START+8) |
35 | #define IRQ_AP_EXPINT0 10 | 37 | #define IRQ_AP_EXPINT0 (IRQ_PIC_START+9) |
36 | #define IRQ_AP_EXPINT1 11 | 38 | #define IRQ_AP_EXPINT1 (IRQ_PIC_START+10) |
37 | #define IRQ_AP_EXPINT2 12 | 39 | #define IRQ_AP_EXPINT2 (IRQ_PIC_START+11) |
38 | #define IRQ_AP_EXPINT3 13 | 40 | #define IRQ_AP_EXPINT3 (IRQ_PIC_START+12) |
39 | #define IRQ_AP_PCIINT0 14 | 41 | #define IRQ_AP_PCIINT0 (IRQ_PIC_START+13) |
40 | #define IRQ_AP_PCIINT1 15 | 42 | #define IRQ_AP_PCIINT1 (IRQ_PIC_START+14) |
41 | #define IRQ_AP_PCIINT2 16 | 43 | #define IRQ_AP_PCIINT2 (IRQ_PIC_START+15) |
42 | #define IRQ_AP_PCIINT3 17 | 44 | #define IRQ_AP_PCIINT3 (IRQ_PIC_START+16) |
43 | #define IRQ_AP_V3INT 18 | 45 | #define IRQ_AP_V3INT (IRQ_PIC_START+17) |
44 | #define IRQ_AP_CPINT0 19 | 46 | #define IRQ_AP_CPINT0 (IRQ_PIC_START+18) |
45 | #define IRQ_AP_CPINT1 20 | 47 | #define IRQ_AP_CPINT1 (IRQ_PIC_START+19) |
46 | #define IRQ_AP_LBUSTIMEOUT 21 | 48 | #define IRQ_AP_LBUSTIMEOUT (IRQ_PIC_START+20) |
47 | #define IRQ_AP_APCINT 22 | 49 | #define IRQ_AP_APCINT (IRQ_PIC_START+21) |
48 | #define IRQ_CP_CLCDCINT 23 | 50 | #define IRQ_CP_CLCDCINT (IRQ_PIC_START+22) |
49 | #define IRQ_CP_MMCIINT0 24 | 51 | #define IRQ_CP_MMCIINT0 (IRQ_PIC_START+23) |
50 | #define IRQ_CP_MMCIINT1 25 | 52 | #define IRQ_CP_MMCIINT1 (IRQ_PIC_START+24) |
51 | #define IRQ_CP_AACIINT 26 | 53 | #define IRQ_CP_AACIINT (IRQ_PIC_START+25) |
52 | #define IRQ_CP_CPPLDINT 27 | 54 | #define IRQ_CP_CPPLDINT (IRQ_PIC_START+26) |
53 | #define IRQ_CP_ETHINT 28 | 55 | #define IRQ_CP_ETHINT (IRQ_PIC_START+27) |
54 | #define IRQ_CP_TSPENINT 29 | 56 | #define IRQ_CP_TSPENINT (IRQ_PIC_START+28) |
55 | #define IRQ_PIC_END 29 | 57 | #define IRQ_PIC_END (IRQ_PIC_START+28) |
56 | 58 | ||
57 | #define IRQ_CIC_START 32 | 59 | #define IRQ_CIC_START (IRQ_PIC_END+1) |
58 | #define IRQ_CM_SOFTINT 32 | 60 | #define IRQ_CM_SOFTINT (IRQ_CIC_START+0) |
59 | #define IRQ_CM_COMMRX 33 | 61 | #define IRQ_CM_COMMRX (IRQ_CIC_START+1) |
60 | #define IRQ_CM_COMMTX 34 | 62 | #define IRQ_CM_COMMTX (IRQ_CIC_START+2) |
61 | #define IRQ_CIC_END 34 | 63 | #define IRQ_CIC_END (IRQ_CIC_START+2) |
62 | 64 | ||
63 | /* | 65 | /* |
64 | * IntegratorCP only | 66 | * IntegratorCP only |
65 | */ | 67 | */ |
66 | #define IRQ_SIC_START 35 | 68 | #define IRQ_SIC_START (IRQ_CIC_END+1) |
67 | #define IRQ_SIC_CP_SOFTINT 35 | 69 | #define IRQ_SIC_CP_SOFTINT (IRQ_SIC_START+0) |
68 | #define IRQ_SIC_CP_RI0 36 | 70 | #define IRQ_SIC_CP_RI0 (IRQ_SIC_START+1) |
69 | #define IRQ_SIC_CP_RI1 37 | 71 | #define IRQ_SIC_CP_RI1 (IRQ_SIC_START+2) |
70 | #define IRQ_SIC_CP_CARDIN 38 | 72 | #define IRQ_SIC_CP_CARDIN (IRQ_SIC_START+3) |
71 | #define IRQ_SIC_CP_LMINT0 39 | 73 | #define IRQ_SIC_CP_LMINT0 (IRQ_SIC_START+4) |
72 | #define IRQ_SIC_CP_LMINT1 40 | 74 | #define IRQ_SIC_CP_LMINT1 (IRQ_SIC_START+5) |
73 | #define IRQ_SIC_CP_LMINT2 41 | 75 | #define IRQ_SIC_CP_LMINT2 (IRQ_SIC_START+6) |
74 | #define IRQ_SIC_CP_LMINT3 42 | 76 | #define IRQ_SIC_CP_LMINT3 (IRQ_SIC_START+7) |
75 | #define IRQ_SIC_CP_LMINT4 43 | 77 | #define IRQ_SIC_CP_LMINT4 (IRQ_SIC_START+8) |
76 | #define IRQ_SIC_CP_LMINT5 44 | 78 | #define IRQ_SIC_CP_LMINT5 (IRQ_SIC_START+9) |
77 | #define IRQ_SIC_CP_LMINT6 45 | 79 | #define IRQ_SIC_CP_LMINT6 (IRQ_SIC_START+10) |
78 | #define IRQ_SIC_CP_LMINT7 46 | 80 | #define IRQ_SIC_CP_LMINT7 (IRQ_SIC_START+11) |
79 | #define IRQ_SIC_END 46 | 81 | #define IRQ_SIC_END (IRQ_SIC_START+11) |
80 | |||
81 | #define NR_IRQS_INTEGRATOR_AP 34 | ||
82 | #define NR_IRQS_INTEGRATOR_CP 47 | ||
diff --git a/arch/arm/mach-integrator/integrator_ap.c b/arch/arm/mach-integrator/integrator_ap.c index a0a7cbbb7a70..11e2a4145807 100644 --- a/arch/arm/mach-integrator/integrator_ap.c +++ b/arch/arm/mach-integrator/integrator_ap.c | |||
@@ -31,6 +31,7 @@ | |||
31 | #include <linux/clockchips.h> | 31 | #include <linux/clockchips.h> |
32 | #include <linux/interrupt.h> | 32 | #include <linux/interrupt.h> |
33 | #include <linux/io.h> | 33 | #include <linux/io.h> |
34 | #include <linux/irqchip/versatile-fpga.h> | ||
34 | #include <linux/mtd/physmap.h> | 35 | #include <linux/mtd/physmap.h> |
35 | #include <linux/clk.h> | 36 | #include <linux/clk.h> |
36 | #include <linux/platform_data/clk-integrator.h> | 37 | #include <linux/platform_data/clk-integrator.h> |
@@ -59,8 +60,6 @@ | |||
59 | #include <asm/mach/pci.h> | 60 | #include <asm/mach/pci.h> |
60 | #include <asm/mach/time.h> | 61 | #include <asm/mach/time.h> |
61 | 62 | ||
62 | #include <plat/fpga-irq.h> | ||
63 | |||
64 | #include "common.h" | 63 | #include "common.h" |
65 | 64 | ||
66 | /* Base address to the AP system controller */ | 65 | /* Base address to the AP system controller */ |
@@ -584,7 +583,6 @@ static const char * ap_dt_board_compat[] = { | |||
584 | DT_MACHINE_START(INTEGRATOR_AP_DT, "ARM Integrator/AP (Device Tree)") | 583 | DT_MACHINE_START(INTEGRATOR_AP_DT, "ARM Integrator/AP (Device Tree)") |
585 | .reserve = integrator_reserve, | 584 | .reserve = integrator_reserve, |
586 | .map_io = ap_map_io, | 585 | .map_io = ap_map_io, |
587 | .nr_irqs = NR_IRQS_INTEGRATOR_AP, | ||
588 | .init_early = ap_init_early, | 586 | .init_early = ap_init_early, |
589 | .init_irq = ap_init_irq_of, | 587 | .init_irq = ap_init_irq_of, |
590 | .handle_irq = fpga_handle_irq, | 588 | .handle_irq = fpga_handle_irq, |
@@ -715,7 +713,6 @@ MACHINE_START(INTEGRATOR, "ARM-Integrator") | |||
715 | .atag_offset = 0x100, | 713 | .atag_offset = 0x100, |
716 | .reserve = integrator_reserve, | 714 | .reserve = integrator_reserve, |
717 | .map_io = ap_map_io_atag, | 715 | .map_io = ap_map_io_atag, |
718 | .nr_irqs = NR_IRQS_INTEGRATOR_AP, | ||
719 | .init_early = ap_init_early, | 716 | .init_early = ap_init_early, |
720 | .init_irq = ap_init_irq, | 717 | .init_irq = ap_init_irq, |
721 | .handle_irq = fpga_handle_irq, | 718 | .handle_irq = fpga_handle_irq, |
diff --git a/arch/arm/mach-integrator/integrator_cp.c b/arch/arm/mach-integrator/integrator_cp.c index 29df06b35d0d..7322838c0447 100644 --- a/arch/arm/mach-integrator/integrator_cp.c +++ b/arch/arm/mach-integrator/integrator_cp.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/amba/clcd.h> | 20 | #include <linux/amba/clcd.h> |
21 | #include <linux/amba/mmci.h> | 21 | #include <linux/amba/mmci.h> |
22 | #include <linux/io.h> | 22 | #include <linux/io.h> |
23 | #include <linux/irqchip/versatile-fpga.h> | ||
23 | #include <linux/gfp.h> | 24 | #include <linux/gfp.h> |
24 | #include <linux/mtd/physmap.h> | 25 | #include <linux/mtd/physmap.h> |
25 | #include <linux/platform_data/clk-integrator.h> | 26 | #include <linux/platform_data/clk-integrator.h> |
@@ -47,7 +48,6 @@ | |||
47 | #include <asm/hardware/timer-sp.h> | 48 | #include <asm/hardware/timer-sp.h> |
48 | 49 | ||
49 | #include <plat/clcd.h> | 50 | #include <plat/clcd.h> |
50 | #include <plat/fpga-irq.h> | ||
51 | #include <plat/sched_clock.h> | 51 | #include <plat/sched_clock.h> |
52 | 52 | ||
53 | #include "common.h" | 53 | #include "common.h" |
@@ -387,7 +387,6 @@ static const char * intcp_dt_board_compat[] = { | |||
387 | DT_MACHINE_START(INTEGRATOR_CP_DT, "ARM Integrator/CP (Device Tree)") | 387 | DT_MACHINE_START(INTEGRATOR_CP_DT, "ARM Integrator/CP (Device Tree)") |
388 | .reserve = integrator_reserve, | 388 | .reserve = integrator_reserve, |
389 | .map_io = intcp_map_io, | 389 | .map_io = intcp_map_io, |
390 | .nr_irqs = NR_IRQS_INTEGRATOR_CP, | ||
391 | .init_early = intcp_init_early, | 390 | .init_early = intcp_init_early, |
392 | .init_irq = intcp_init_irq_of, | 391 | .init_irq = intcp_init_irq_of, |
393 | .handle_irq = fpga_handle_irq, | 392 | .handle_irq = fpga_handle_irq, |
@@ -482,7 +481,7 @@ static void __init intcp_init_irq(void) | |||
482 | u32 pic_mask, cic_mask, sic_mask; | 481 | u32 pic_mask, cic_mask, sic_mask; |
483 | 482 | ||
484 | /* These masks are for the HW IRQ registers */ | 483 | /* These masks are for the HW IRQ registers */ |
485 | pic_mask = ~((~0u) << (11 - IRQ_PIC_START)); | 484 | pic_mask = ~((~0u) << (11 - 0)); |
486 | pic_mask |= (~((~0u) << (29 - 22))) << 22; | 485 | pic_mask |= (~((~0u) << (29 - 22))) << 22; |
487 | cic_mask = ~((~0u) << (1 + IRQ_CIC_END - IRQ_CIC_START)); | 486 | cic_mask = ~((~0u) << (1 + IRQ_CIC_END - IRQ_CIC_START)); |
488 | sic_mask = ~((~0u) << (1 + IRQ_SIC_END - IRQ_SIC_START)); | 487 | sic_mask = ~((~0u) << (1 + IRQ_SIC_END - IRQ_SIC_START)); |
@@ -563,7 +562,6 @@ MACHINE_START(CINTEGRATOR, "ARM-IntegratorCP") | |||
563 | .atag_offset = 0x100, | 562 | .atag_offset = 0x100, |
564 | .reserve = integrator_reserve, | 563 | .reserve = integrator_reserve, |
565 | .map_io = intcp_map_io_atag, | 564 | .map_io = intcp_map_io_atag, |
566 | .nr_irqs = NR_IRQS_INTEGRATOR_CP, | ||
567 | .init_early = intcp_init_early, | 565 | .init_early = intcp_init_early, |
568 | .init_irq = intcp_init_irq, | 566 | .init_irq = intcp_init_irq, |
569 | .handle_irq = fpga_handle_irq, | 567 | .handle_irq = fpga_handle_irq, |
diff --git a/arch/arm/mach-lpc32xx/clock.c b/arch/arm/mach-lpc32xx/clock.c index f48c2e961b84..dd5d6f532e8c 100644 --- a/arch/arm/mach-lpc32xx/clock.c +++ b/arch/arm/mach-lpc32xx/clock.c | |||
@@ -585,6 +585,13 @@ static struct clk clk_timer3 = { | |||
585 | .enable_mask = LPC32XX_CLKPWR_TMRPWMCLK_TIMER3_EN, | 585 | .enable_mask = LPC32XX_CLKPWR_TMRPWMCLK_TIMER3_EN, |
586 | .get_rate = local_return_parent_rate, | 586 | .get_rate = local_return_parent_rate, |
587 | }; | 587 | }; |
588 | static struct clk clk_mpwm = { | ||
589 | .parent = &clk_pclk, | ||
590 | .enable = local_onoff_enable, | ||
591 | .enable_reg = LPC32XX_CLKPWR_TIMERS_PWMS_CLK_CTRL_1, | ||
592 | .enable_mask = LPC32XX_CLKPWR_TMRPWMCLK_MPWM_EN, | ||
593 | .get_rate = local_return_parent_rate, | ||
594 | }; | ||
588 | static struct clk clk_wdt = { | 595 | static struct clk clk_wdt = { |
589 | .parent = &clk_pclk, | 596 | .parent = &clk_pclk, |
590 | .enable = local_onoff_enable, | 597 | .enable = local_onoff_enable, |
@@ -1202,6 +1209,7 @@ static struct clk_lookup lookups[] = { | |||
1202 | CLKDEV_INIT("pl08xdmac", NULL, &clk_dma), | 1209 | CLKDEV_INIT("pl08xdmac", NULL, &clk_dma), |
1203 | CLKDEV_INIT("4003c000.watchdog", NULL, &clk_wdt), | 1210 | CLKDEV_INIT("4003c000.watchdog", NULL, &clk_wdt), |
1204 | CLKDEV_INIT("4005c000.pwm", NULL, &clk_pwm), | 1211 | CLKDEV_INIT("4005c000.pwm", NULL, &clk_pwm), |
1212 | CLKDEV_INIT("400e8000.mpwm", NULL, &clk_mpwm), | ||
1205 | CLKDEV_INIT(NULL, "uart3_ck", &clk_uart3), | 1213 | CLKDEV_INIT(NULL, "uart3_ck", &clk_uart3), |
1206 | CLKDEV_INIT(NULL, "uart4_ck", &clk_uart4), | 1214 | CLKDEV_INIT(NULL, "uart4_ck", &clk_uart4), |
1207 | CLKDEV_INIT(NULL, "uart5_ck", &clk_uart5), | 1215 | CLKDEV_INIT(NULL, "uart5_ck", &clk_uart5), |
diff --git a/arch/arm/mach-lpc32xx/include/mach/platform.h b/arch/arm/mach-lpc32xx/include/mach/platform.h index acc4aabf1c7b..b5612a1d1839 100644 --- a/arch/arm/mach-lpc32xx/include/mach/platform.h +++ b/arch/arm/mach-lpc32xx/include/mach/platform.h | |||
@@ -515,6 +515,7 @@ | |||
515 | /* | 515 | /* |
516 | * clkpwr_timers_pwms_clk_ctrl_1 register definitions | 516 | * clkpwr_timers_pwms_clk_ctrl_1 register definitions |
517 | */ | 517 | */ |
518 | #define LPC32XX_CLKPWR_TMRPWMCLK_MPWM_EN 0x40 | ||
518 | #define LPC32XX_CLKPWR_TMRPWMCLK_TIMER3_EN 0x20 | 519 | #define LPC32XX_CLKPWR_TMRPWMCLK_TIMER3_EN 0x20 |
519 | #define LPC32XX_CLKPWR_TMRPWMCLK_TIMER2_EN 0x10 | 520 | #define LPC32XX_CLKPWR_TMRPWMCLK_TIMER2_EN 0x10 |
520 | #define LPC32XX_CLKPWR_TMRPWMCLK_TIMER1_EN 0x08 | 521 | #define LPC32XX_CLKPWR_TMRPWMCLK_TIMER1_EN 0x08 |
diff --git a/arch/arm/mach-lpc32xx/irq.c b/arch/arm/mach-lpc32xx/irq.c index 3c6332753358..9ecb8f9c4ef5 100644 --- a/arch/arm/mach-lpc32xx/irq.c +++ b/arch/arm/mach-lpc32xx/irq.c | |||
@@ -412,7 +412,6 @@ static const struct of_device_id mic_of_match[] __initconst = { | |||
412 | void __init lpc32xx_init_irq(void) | 412 | void __init lpc32xx_init_irq(void) |
413 | { | 413 | { |
414 | unsigned int i; | 414 | unsigned int i; |
415 | int irq_base; | ||
416 | 415 | ||
417 | /* Setup MIC */ | 416 | /* Setup MIC */ |
418 | __raw_writel(0, LPC32XX_INTC_MASK(LPC32XX_MIC_BASE)); | 417 | __raw_writel(0, LPC32XX_INTC_MASK(LPC32XX_MIC_BASE)); |
@@ -443,15 +442,6 @@ void __init lpc32xx_init_irq(void) | |||
443 | lpc32xx_set_default_mappings(SIC1_APR_DEFAULT, SIC1_ATR_DEFAULT, 32); | 442 | lpc32xx_set_default_mappings(SIC1_APR_DEFAULT, SIC1_ATR_DEFAULT, 32); |
444 | lpc32xx_set_default_mappings(SIC2_APR_DEFAULT, SIC2_ATR_DEFAULT, 64); | 443 | lpc32xx_set_default_mappings(SIC2_APR_DEFAULT, SIC2_ATR_DEFAULT, 64); |
445 | 444 | ||
446 | /* mask all interrupts except SUBIRQ */ | ||
447 | __raw_writel(0, LPC32XX_INTC_MASK(LPC32XX_MIC_BASE)); | ||
448 | __raw_writel(0, LPC32XX_INTC_MASK(LPC32XX_SIC1_BASE)); | ||
449 | __raw_writel(0, LPC32XX_INTC_MASK(LPC32XX_SIC2_BASE)); | ||
450 | |||
451 | /* MIC SUBIRQx interrupts will route handling to the chain handlers */ | ||
452 | irq_set_chained_handler(IRQ_LPC32XX_SUB1IRQ, lpc32xx_sic1_handler); | ||
453 | irq_set_chained_handler(IRQ_LPC32XX_SUB2IRQ, lpc32xx_sic2_handler); | ||
454 | |||
455 | /* Initially disable all wake events */ | 445 | /* Initially disable all wake events */ |
456 | __raw_writel(0, LPC32XX_CLKPWR_P01_ER); | 446 | __raw_writel(0, LPC32XX_CLKPWR_P01_ER); |
457 | __raw_writel(0, LPC32XX_CLKPWR_INT_ER); | 447 | __raw_writel(0, LPC32XX_CLKPWR_INT_ER); |
@@ -475,16 +465,13 @@ void __init lpc32xx_init_irq(void) | |||
475 | 465 | ||
476 | of_irq_init(mic_of_match); | 466 | of_irq_init(mic_of_match); |
477 | 467 | ||
478 | irq_base = irq_alloc_descs(-1, 0, NR_IRQS, 0); | ||
479 | if (irq_base < 0) { | ||
480 | pr_warn("Cannot allocate irq_descs, assuming pre-allocated\n"); | ||
481 | irq_base = 0; | ||
482 | } | ||
483 | |||
484 | lpc32xx_mic_domain = irq_domain_add_legacy(lpc32xx_mic_np, NR_IRQS, | 468 | lpc32xx_mic_domain = irq_domain_add_legacy(lpc32xx_mic_np, NR_IRQS, |
485 | irq_base, 0, | 469 | 0, 0, &irq_domain_simple_ops, |
486 | &irq_domain_simple_ops, | ||
487 | NULL); | 470 | NULL); |
488 | if (!lpc32xx_mic_domain) | 471 | if (!lpc32xx_mic_domain) |
489 | panic("Unable to add MIC irq domain\n"); | 472 | panic("Unable to add MIC irq domain\n"); |
473 | |||
474 | /* MIC SUBIRQx interrupts will route handling to the chain handlers */ | ||
475 | irq_set_chained_handler(IRQ_LPC32XX_SUB1IRQ, lpc32xx_sic1_handler); | ||
476 | irq_set_chained_handler(IRQ_LPC32XX_SUB2IRQ, lpc32xx_sic2_handler); | ||
490 | } | 477 | } |
diff --git a/arch/arm/mach-s3c24xx/Kconfig b/arch/arm/mach-s3c24xx/Kconfig index d7a13d1771a3..25df14a9e268 100644 --- a/arch/arm/mach-s3c24xx/Kconfig +++ b/arch/arm/mach-s3c24xx/Kconfig | |||
@@ -405,6 +405,7 @@ config MACH_MINI2440 | |||
405 | select NEW_LEDS | 405 | select NEW_LEDS |
406 | select S3C_DEV_NAND | 406 | select S3C_DEV_NAND |
407 | select S3C_DEV_USB_HOST | 407 | select S3C_DEV_USB_HOST |
408 | select S3C_SETUP_CAMIF | ||
408 | help | 409 | help |
409 | Say Y here to select support for the MINI2440. Is a 10cm x 10cm board | 410 | Say Y here to select support for the MINI2440. Is a 10cm x 10cm board |
410 | available via various sources. It can come with a 3.5" or 7" touch LCD. | 411 | available via various sources. It can come with a 3.5" or 7" touch LCD. |
diff --git a/arch/arm/mach-s3c24xx/clock-s3c2440.c b/arch/arm/mach-s3c24xx/clock-s3c2440.c index 4407b1730539..04b87ec92537 100644 --- a/arch/arm/mach-s3c24xx/clock-s3c2440.c +++ b/arch/arm/mach-s3c24xx/clock-s3c2440.c | |||
@@ -161,6 +161,7 @@ static struct clk_lookup s3c2440_clk_lookup[] = { | |||
161 | CLKDEV_INIT(NULL, "clk_uart_baud1", &s3c24xx_uclk), | 161 | CLKDEV_INIT(NULL, "clk_uart_baud1", &s3c24xx_uclk), |
162 | CLKDEV_INIT(NULL, "clk_uart_baud2", &clk_p), | 162 | CLKDEV_INIT(NULL, "clk_uart_baud2", &clk_p), |
163 | CLKDEV_INIT(NULL, "clk_uart_baud3", &s3c2440_clk_fclk_n), | 163 | CLKDEV_INIT(NULL, "clk_uart_baud3", &s3c2440_clk_fclk_n), |
164 | CLKDEV_INIT("s3c2440-camif", "camera", &s3c2440_clk_cam_upll), | ||
164 | }; | 165 | }; |
165 | 166 | ||
166 | static int __init_refok s3c2440_clk_add(struct device *dev, struct subsys_interface *sif) | 167 | static int __init_refok s3c2440_clk_add(struct device *dev, struct subsys_interface *sif) |
diff --git a/arch/arm/mach-shmobile/Kconfig b/arch/arm/mach-shmobile/Kconfig index 8ae100cc655c..546e40a9dcaf 100644 --- a/arch/arm/mach-shmobile/Kconfig +++ b/arch/arm/mach-shmobile/Kconfig | |||
@@ -2,18 +2,6 @@ if ARCH_SHMOBILE | |||
2 | 2 | ||
3 | comment "SH-Mobile System Type" | 3 | comment "SH-Mobile System Type" |
4 | 4 | ||
5 | config ARCH_SH7367 | ||
6 | bool "SH-Mobile G3 (SH7367)" | ||
7 | select ARCH_WANT_OPTIONAL_GPIOLIB | ||
8 | select CPU_V6 | ||
9 | select SH_CLK_CPG | ||
10 | |||
11 | config ARCH_SH7377 | ||
12 | bool "SH-Mobile G4 (SH7377)" | ||
13 | select ARCH_WANT_OPTIONAL_GPIOLIB | ||
14 | select CPU_V7 | ||
15 | select SH_CLK_CPG | ||
16 | |||
17 | config ARCH_SH7372 | 5 | config ARCH_SH7372 |
18 | bool "SH-Mobile AP4 (SH7372)" | 6 | bool "SH-Mobile AP4 (SH7372)" |
19 | select ARCH_WANT_OPTIONAL_GPIOLIB | 7 | select ARCH_WANT_OPTIONAL_GPIOLIB |
diff --git a/arch/arm/mach-shmobile/Makefile b/arch/arm/mach-shmobile/Makefile index fe2c97c179d1..f4fd247bde61 100644 --- a/arch/arm/mach-shmobile/Makefile +++ b/arch/arm/mach-shmobile/Makefile | |||
@@ -6,8 +6,6 @@ | |||
6 | obj-y := timer.o console.o clock.o | 6 | obj-y := timer.o console.o clock.o |
7 | 7 | ||
8 | # CPU objects | 8 | # CPU objects |
9 | obj-$(CONFIG_ARCH_SH7367) += setup-sh7367.o clock-sh7367.o intc-sh7367.o | ||
10 | obj-$(CONFIG_ARCH_SH7377) += setup-sh7377.o clock-sh7377.o intc-sh7377.o | ||
11 | obj-$(CONFIG_ARCH_SH7372) += setup-sh7372.o clock-sh7372.o intc-sh7372.o | 9 | obj-$(CONFIG_ARCH_SH7372) += setup-sh7372.o clock-sh7372.o intc-sh7372.o |
12 | obj-$(CONFIG_ARCH_SH73A0) += setup-sh73a0.o clock-sh73a0.o intc-sh73a0.o | 10 | obj-$(CONFIG_ARCH_SH73A0) += setup-sh73a0.o clock-sh73a0.o intc-sh73a0.o |
13 | obj-$(CONFIG_ARCH_R8A7740) += setup-r8a7740.o clock-r8a7740.o intc-r8a7740.o | 11 | obj-$(CONFIG_ARCH_R8A7740) += setup-r8a7740.o clock-r8a7740.o intc-r8a7740.o |
@@ -23,16 +21,12 @@ smp-$(CONFIG_ARCH_EMEV2) += smp-emev2.o | |||
23 | 21 | ||
24 | # Pinmux setup | 22 | # Pinmux setup |
25 | pfc-y := | 23 | pfc-y := |
26 | pfc-$(CONFIG_ARCH_SH7367) += pfc-sh7367.o | ||
27 | pfc-$(CONFIG_ARCH_SH7377) += pfc-sh7377.o | ||
28 | pfc-$(CONFIG_ARCH_SH7372) += pfc-sh7372.o | 24 | pfc-$(CONFIG_ARCH_SH7372) += pfc-sh7372.o |
29 | pfc-$(CONFIG_ARCH_SH73A0) += pfc-sh73a0.o | 25 | pfc-$(CONFIG_ARCH_SH73A0) += pfc-sh73a0.o |
30 | pfc-$(CONFIG_ARCH_R8A7740) += pfc-r8a7740.o | 26 | pfc-$(CONFIG_ARCH_R8A7740) += pfc-r8a7740.o |
31 | pfc-$(CONFIG_ARCH_R8A7779) += pfc-r8a7779.o | 27 | pfc-$(CONFIG_ARCH_R8A7779) += pfc-r8a7779.o |
32 | 28 | ||
33 | # IRQ objects | 29 | # IRQ objects |
34 | obj-$(CONFIG_ARCH_SH7367) += entry-intc.o | ||
35 | obj-$(CONFIG_ARCH_SH7377) += entry-intc.o | ||
36 | obj-$(CONFIG_ARCH_SH7372) += entry-intc.o | 30 | obj-$(CONFIG_ARCH_SH7372) += entry-intc.o |
37 | obj-$(CONFIG_ARCH_R8A7740) += entry-intc.o | 31 | obj-$(CONFIG_ARCH_R8A7740) += entry-intc.o |
38 | 32 | ||
diff --git a/arch/arm/mach-shmobile/board-ap4evb.c b/arch/arm/mach-shmobile/board-ap4evb.c index 790dc68c4312..cefdd030361d 100644 --- a/arch/arm/mach-shmobile/board-ap4evb.c +++ b/arch/arm/mach-shmobile/board-ap4evb.c | |||
@@ -728,7 +728,7 @@ fsia_ick_out: | |||
728 | static int fsi_hdmi_set_rate(struct device *dev, int rate, int enable) | 728 | static int fsi_hdmi_set_rate(struct device *dev, int rate, int enable) |
729 | { | 729 | { |
730 | struct clk *fsib_clk; | 730 | struct clk *fsib_clk; |
731 | struct clk *fdiv_clk = &sh7372_fsidivb_clk; | 731 | struct clk *fdiv_clk = clk_get(NULL, "fsidivb"); |
732 | long fsib_rate = 0; | 732 | long fsib_rate = 0; |
733 | long fdiv_rate = 0; | 733 | long fdiv_rate = 0; |
734 | int ackmd_bpfmd; | 734 | int ackmd_bpfmd; |
diff --git a/arch/arm/mach-shmobile/board-mackerel.c b/arch/arm/mach-shmobile/board-mackerel.c index 0c27c810cf99..c826d77ab8a6 100644 --- a/arch/arm/mach-shmobile/board-mackerel.c +++ b/arch/arm/mach-shmobile/board-mackerel.c | |||
@@ -882,7 +882,7 @@ static int __fsi_set_round_rate(struct clk *clk, long rate, int enable) | |||
882 | static int fsi_b_set_rate(struct device *dev, int rate, int enable) | 882 | static int fsi_b_set_rate(struct device *dev, int rate, int enable) |
883 | { | 883 | { |
884 | struct clk *fsib_clk; | 884 | struct clk *fsib_clk; |
885 | struct clk *fdiv_clk = &sh7372_fsidivb_clk; | 885 | struct clk *fdiv_clk = clk_get(NULL, "fsidivb"); |
886 | long fsib_rate = 0; | 886 | long fsib_rate = 0; |
887 | long fdiv_rate = 0; | 887 | long fdiv_rate = 0; |
888 | int ackmd_bpfmd; | 888 | int ackmd_bpfmd; |
diff --git a/arch/arm/mach-shmobile/clock-r8a7740.c b/arch/arm/mach-shmobile/clock-r8a7740.c index 6729e0032180..eac49d59782f 100644 --- a/arch/arm/mach-shmobile/clock-r8a7740.c +++ b/arch/arm/mach-shmobile/clock-r8a7740.c | |||
@@ -65,6 +65,9 @@ | |||
65 | #define SMSTPCR3 IOMEM(0xe615013c) | 65 | #define SMSTPCR3 IOMEM(0xe615013c) |
66 | #define SMSTPCR4 IOMEM(0xe6150140) | 66 | #define SMSTPCR4 IOMEM(0xe6150140) |
67 | 67 | ||
68 | #define FSIDIVA IOMEM(0xFE1F8000) | ||
69 | #define FSIDIVB IOMEM(0xFE1F8008) | ||
70 | |||
68 | /* Fixed 32 KHz root clock from EXTALR pin */ | 71 | /* Fixed 32 KHz root clock from EXTALR pin */ |
69 | static struct clk extalr_clk = { | 72 | static struct clk extalr_clk = { |
70 | .rate = 32768, | 73 | .rate = 32768, |
@@ -188,6 +191,22 @@ static struct clk pllc1_div2_clk = { | |||
188 | }; | 191 | }; |
189 | 192 | ||
190 | /* USB clock */ | 193 | /* USB clock */ |
194 | /* | ||
195 | * USBCKCR is controlling usb24 clock | ||
196 | * bit[7] : parent clock | ||
197 | * bit[6] : clock divide rate | ||
198 | * And this bit[7] is used as a "usb24s" from other devices. | ||
199 | * (Video clock / Sub clock / SPU clock) | ||
200 | * You can controll this clock as a below. | ||
201 | * | ||
202 | * struct clk *usb24 = clk_get(dev, "usb24"); | ||
203 | * struct clk *usb24s = clk_get(NULL, "usb24s"); | ||
204 | * struct clk *system = clk_get(NULL, "system_clk"); | ||
205 | * int rate = clk_get_rate(system); | ||
206 | * | ||
207 | * clk_set_parent(usb24s, system); // for bit[7] | ||
208 | * clk_set_rate(usb24, rate / 2); // for bit[6] | ||
209 | */ | ||
191 | static struct clk *usb24s_parents[] = { | 210 | static struct clk *usb24s_parents[] = { |
192 | [0] = &system_clk, | 211 | [0] = &system_clk, |
193 | [1] = &extal2_clk | 212 | [1] = &extal2_clk |
@@ -427,6 +446,14 @@ static struct clk *late_main_clks[] = { | |||
427 | &hdmi2_clk, | 446 | &hdmi2_clk, |
428 | }; | 447 | }; |
429 | 448 | ||
449 | /* FSI DIV */ | ||
450 | enum { FSIDIV_A, FSIDIV_B, FSIDIV_REPARENT_NR }; | ||
451 | |||
452 | static struct clk fsidivs[] = { | ||
453 | [FSIDIV_A] = SH_CLK_FSIDIV(FSIDIVA, &div6_reparent_clks[DIV6_FSIA]), | ||
454 | [FSIDIV_B] = SH_CLK_FSIDIV(FSIDIVB, &div6_reparent_clks[DIV6_FSIB]), | ||
455 | }; | ||
456 | |||
430 | /* MSTP */ | 457 | /* MSTP */ |
431 | enum { | 458 | enum { |
432 | DIV4_I, DIV4_ZG, DIV4_B, DIV4_M1, DIV4_HP, | 459 | DIV4_I, DIV4_ZG, DIV4_B, DIV4_M1, DIV4_HP, |
@@ -596,6 +623,10 @@ static struct clk_lookup lookups[] = { | |||
596 | 623 | ||
597 | CLKDEV_ICK_ID("icka", "sh_fsi2", &div6_reparent_clks[DIV6_FSIA]), | 624 | CLKDEV_ICK_ID("icka", "sh_fsi2", &div6_reparent_clks[DIV6_FSIA]), |
598 | CLKDEV_ICK_ID("ickb", "sh_fsi2", &div6_reparent_clks[DIV6_FSIB]), | 625 | CLKDEV_ICK_ID("ickb", "sh_fsi2", &div6_reparent_clks[DIV6_FSIB]), |
626 | CLKDEV_ICK_ID("diva", "sh_fsi2", &fsidivs[FSIDIV_A]), | ||
627 | CLKDEV_ICK_ID("divb", "sh_fsi2", &fsidivs[FSIDIV_B]), | ||
628 | CLKDEV_ICK_ID("xcka", "sh_fsi2", &fsiack_clk), | ||
629 | CLKDEV_ICK_ID("xckb", "sh_fsi2", &fsibck_clk), | ||
599 | }; | 630 | }; |
600 | 631 | ||
601 | void __init r8a7740_clock_init(u8 md_ck) | 632 | void __init r8a7740_clock_init(u8 md_ck) |
@@ -641,6 +672,9 @@ void __init r8a7740_clock_init(u8 md_ck) | |||
641 | for (k = 0; !ret && (k < ARRAY_SIZE(late_main_clks)); k++) | 672 | for (k = 0; !ret && (k < ARRAY_SIZE(late_main_clks)); k++) |
642 | ret = clk_register(late_main_clks[k]); | 673 | ret = clk_register(late_main_clks[k]); |
643 | 674 | ||
675 | if (!ret) | ||
676 | ret = sh_clk_fsidiv_register(fsidivs, FSIDIV_REPARENT_NR); | ||
677 | |||
644 | clkdev_add_table(lookups, ARRAY_SIZE(lookups)); | 678 | clkdev_add_table(lookups, ARRAY_SIZE(lookups)); |
645 | 679 | ||
646 | if (!ret) | 680 | if (!ret) |
diff --git a/arch/arm/mach-shmobile/clock-r8a7779.c b/arch/arm/mach-shmobile/clock-r8a7779.c index 37b2a3133b3b..c019609da660 100644 --- a/arch/arm/mach-shmobile/clock-r8a7779.c +++ b/arch/arm/mach-shmobile/clock-r8a7779.c | |||
@@ -87,8 +87,11 @@ static struct clk div4_clks[DIV4_NR] = { | |||
87 | }; | 87 | }; |
88 | 88 | ||
89 | enum { MSTP323, MSTP322, MSTP321, MSTP320, | 89 | enum { MSTP323, MSTP322, MSTP321, MSTP320, |
90 | MSTP026, MSTP025, MSTP024, MSTP023, MSTP022, MSTP021, | 90 | MSTP101, MSTP100, |
91 | MSTP030, | ||
92 | MSTP029, MSTP028, MSTP027, MSTP026, MSTP025, MSTP024, MSTP023, MSTP022, MSTP021, | ||
91 | MSTP016, MSTP015, MSTP014, | 93 | MSTP016, MSTP015, MSTP014, |
94 | MSTP007, | ||
92 | MSTP_NR }; | 95 | MSTP_NR }; |
93 | 96 | ||
94 | static struct clk mstp_clks[MSTP_NR] = { | 97 | static struct clk mstp_clks[MSTP_NR] = { |
@@ -96,6 +99,12 @@ static struct clk mstp_clks[MSTP_NR] = { | |||
96 | [MSTP322] = SH_CLK_MSTP32(&div4_clks[DIV4_P], MSTPCR3, 22, 0), /* SDHI1 */ | 99 | [MSTP322] = SH_CLK_MSTP32(&div4_clks[DIV4_P], MSTPCR3, 22, 0), /* SDHI1 */ |
97 | [MSTP321] = SH_CLK_MSTP32(&div4_clks[DIV4_P], MSTPCR3, 21, 0), /* SDHI2 */ | 100 | [MSTP321] = SH_CLK_MSTP32(&div4_clks[DIV4_P], MSTPCR3, 21, 0), /* SDHI2 */ |
98 | [MSTP320] = SH_CLK_MSTP32(&div4_clks[DIV4_P], MSTPCR3, 20, 0), /* SDHI3 */ | 101 | [MSTP320] = SH_CLK_MSTP32(&div4_clks[DIV4_P], MSTPCR3, 20, 0), /* SDHI3 */ |
102 | [MSTP101] = SH_CLK_MSTP32(&div4_clks[DIV4_P], MSTPCR1, 1, 0), /* USB2 */ | ||
103 | [MSTP100] = SH_CLK_MSTP32(&div4_clks[DIV4_P], MSTPCR1, 0, 0), /* USB0/1 */ | ||
104 | [MSTP030] = SH_CLK_MSTP32(&div4_clks[DIV4_P], MSTPCR0, 30, 0), /* I2C0 */ | ||
105 | [MSTP029] = SH_CLK_MSTP32(&div4_clks[DIV4_P], MSTPCR0, 29, 0), /* I2C1 */ | ||
106 | [MSTP028] = SH_CLK_MSTP32(&div4_clks[DIV4_P], MSTPCR0, 28, 0), /* I2C2 */ | ||
107 | [MSTP027] = SH_CLK_MSTP32(&div4_clks[DIV4_P], MSTPCR0, 27, 0), /* I2C3 */ | ||
99 | [MSTP026] = SH_CLK_MSTP32(&div4_clks[DIV4_P], MSTPCR0, 26, 0), /* SCIF0 */ | 108 | [MSTP026] = SH_CLK_MSTP32(&div4_clks[DIV4_P], MSTPCR0, 26, 0), /* SCIF0 */ |
100 | [MSTP025] = SH_CLK_MSTP32(&div4_clks[DIV4_P], MSTPCR0, 25, 0), /* SCIF1 */ | 109 | [MSTP025] = SH_CLK_MSTP32(&div4_clks[DIV4_P], MSTPCR0, 25, 0), /* SCIF1 */ |
101 | [MSTP024] = SH_CLK_MSTP32(&div4_clks[DIV4_P], MSTPCR0, 24, 0), /* SCIF2 */ | 110 | [MSTP024] = SH_CLK_MSTP32(&div4_clks[DIV4_P], MSTPCR0, 24, 0), /* SCIF2 */ |
@@ -105,6 +114,7 @@ static struct clk mstp_clks[MSTP_NR] = { | |||
105 | [MSTP016] = SH_CLK_MSTP32(&div4_clks[DIV4_P], MSTPCR0, 16, 0), /* TMU0 */ | 114 | [MSTP016] = SH_CLK_MSTP32(&div4_clks[DIV4_P], MSTPCR0, 16, 0), /* TMU0 */ |
106 | [MSTP015] = SH_CLK_MSTP32(&div4_clks[DIV4_P], MSTPCR0, 15, 0), /* TMU1 */ | 115 | [MSTP015] = SH_CLK_MSTP32(&div4_clks[DIV4_P], MSTPCR0, 15, 0), /* TMU1 */ |
107 | [MSTP014] = SH_CLK_MSTP32(&div4_clks[DIV4_P], MSTPCR0, 14, 0), /* TMU2 */ | 116 | [MSTP014] = SH_CLK_MSTP32(&div4_clks[DIV4_P], MSTPCR0, 14, 0), /* TMU2 */ |
117 | [MSTP007] = SH_CLK_MSTP32(&div4_clks[DIV4_S], MSTPCR0, 7, 0), /* HSPI */ | ||
108 | }; | 118 | }; |
109 | 119 | ||
110 | static unsigned long mul4_recalc(struct clk *clk) | 120 | static unsigned long mul4_recalc(struct clk *clk) |
@@ -146,14 +156,25 @@ static struct clk_lookup lookups[] = { | |||
146 | CLKDEV_CON_ID("peripheral_clk", &div4_clks[DIV4_P]), | 156 | CLKDEV_CON_ID("peripheral_clk", &div4_clks[DIV4_P]), |
147 | 157 | ||
148 | /* MSTP32 clocks */ | 158 | /* MSTP32 clocks */ |
159 | CLKDEV_DEV_ID("ehci-platform.1", &mstp_clks[MSTP101]), /* USB EHCI port2 */ | ||
160 | CLKDEV_DEV_ID("ohci-platform.1", &mstp_clks[MSTP101]), /* USB OHCI port2 */ | ||
161 | CLKDEV_DEV_ID("ehci-platform.0", &mstp_clks[MSTP100]), /* USB EHCI port0/1 */ | ||
162 | CLKDEV_DEV_ID("ohci-platform.0", &mstp_clks[MSTP100]), /* USB OHCI port0/1 */ | ||
149 | CLKDEV_DEV_ID("sh_tmu.0", &mstp_clks[MSTP016]), /* TMU00 */ | 163 | CLKDEV_DEV_ID("sh_tmu.0", &mstp_clks[MSTP016]), /* TMU00 */ |
150 | CLKDEV_DEV_ID("sh_tmu.1", &mstp_clks[MSTP016]), /* TMU01 */ | 164 | CLKDEV_DEV_ID("sh_tmu.1", &mstp_clks[MSTP016]), /* TMU01 */ |
165 | CLKDEV_DEV_ID("i2c-rcar.0", &mstp_clks[MSTP030]), /* I2C0 */ | ||
166 | CLKDEV_DEV_ID("i2c-rcar.1", &mstp_clks[MSTP029]), /* I2C1 */ | ||
167 | CLKDEV_DEV_ID("i2c-rcar.2", &mstp_clks[MSTP028]), /* I2C2 */ | ||
168 | CLKDEV_DEV_ID("i2c-rcar.3", &mstp_clks[MSTP027]), /* I2C3 */ | ||
151 | CLKDEV_DEV_ID("sh-sci.0", &mstp_clks[MSTP026]), /* SCIF0 */ | 169 | CLKDEV_DEV_ID("sh-sci.0", &mstp_clks[MSTP026]), /* SCIF0 */ |
152 | CLKDEV_DEV_ID("sh-sci.1", &mstp_clks[MSTP025]), /* SCIF1 */ | 170 | CLKDEV_DEV_ID("sh-sci.1", &mstp_clks[MSTP025]), /* SCIF1 */ |
153 | CLKDEV_DEV_ID("sh-sci.2", &mstp_clks[MSTP024]), /* SCIF2 */ | 171 | CLKDEV_DEV_ID("sh-sci.2", &mstp_clks[MSTP024]), /* SCIF2 */ |
154 | CLKDEV_DEV_ID("sh-sci.3", &mstp_clks[MSTP023]), /* SCIF3 */ | 172 | CLKDEV_DEV_ID("sh-sci.3", &mstp_clks[MSTP023]), /* SCIF3 */ |
155 | CLKDEV_DEV_ID("sh-sci.4", &mstp_clks[MSTP022]), /* SCIF4 */ | 173 | CLKDEV_DEV_ID("sh-sci.4", &mstp_clks[MSTP022]), /* SCIF4 */ |
156 | CLKDEV_DEV_ID("sh-sci.5", &mstp_clks[MSTP021]), /* SCIF6 */ | 174 | CLKDEV_DEV_ID("sh-sci.5", &mstp_clks[MSTP021]), /* SCIF6 */ |
175 | CLKDEV_DEV_ID("sh-hspi.0", &mstp_clks[MSTP007]), /* HSPI0 */ | ||
176 | CLKDEV_DEV_ID("sh-hspi.1", &mstp_clks[MSTP007]), /* HSPI1 */ | ||
177 | CLKDEV_DEV_ID("sh-hspi.2", &mstp_clks[MSTP007]), /* HSPI2 */ | ||
157 | CLKDEV_DEV_ID("sh_mobile_sdhi.0", &mstp_clks[MSTP323]), /* SDHI0 */ | 178 | CLKDEV_DEV_ID("sh_mobile_sdhi.0", &mstp_clks[MSTP323]), /* SDHI0 */ |
158 | CLKDEV_DEV_ID("sh_mobile_sdhi.1", &mstp_clks[MSTP322]), /* SDHI1 */ | 179 | CLKDEV_DEV_ID("sh_mobile_sdhi.1", &mstp_clks[MSTP322]), /* SDHI1 */ |
159 | CLKDEV_DEV_ID("sh_mobile_sdhi.2", &mstp_clks[MSTP321]), /* SDHI2 */ | 180 | CLKDEV_DEV_ID("sh_mobile_sdhi.2", &mstp_clks[MSTP321]), /* SDHI2 */ |
diff --git a/arch/arm/mach-shmobile/clock-sh7367.c b/arch/arm/mach-shmobile/clock-sh7367.c deleted file mode 100644 index ef0a95e592c4..000000000000 --- a/arch/arm/mach-shmobile/clock-sh7367.c +++ /dev/null | |||
@@ -1,355 +0,0 @@ | |||
1 | /* | ||
2 | * SH7367 clock framework support | ||
3 | * | ||
4 | * Copyright (C) 2010 Magnus Damm | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License as published by | ||
8 | * the Free Software Foundation; version 2 of the License. | ||
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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | ||
18 | */ | ||
19 | #include <linux/init.h> | ||
20 | #include <linux/kernel.h> | ||
21 | #include <linux/io.h> | ||
22 | #include <linux/sh_clk.h> | ||
23 | #include <linux/clkdev.h> | ||
24 | #include <mach/common.h> | ||
25 | |||
26 | /* SH7367 registers */ | ||
27 | #define RTFRQCR IOMEM(0xe6150000) | ||
28 | #define SYFRQCR IOMEM(0xe6150004) | ||
29 | #define CMFRQCR IOMEM(0xe61500E0) | ||
30 | #define VCLKCR1 IOMEM(0xe6150008) | ||
31 | #define VCLKCR2 IOMEM(0xe615000C) | ||
32 | #define VCLKCR3 IOMEM(0xe615001C) | ||
33 | #define SCLKACR IOMEM(0xe6150010) | ||
34 | #define SCLKBCR IOMEM(0xe6150014) | ||
35 | #define SUBUSBCKCR IOMEM(0xe6158080) | ||
36 | #define SPUCKCR IOMEM(0xe6150084) | ||
37 | #define MSUCKCR IOMEM(0xe6150088) | ||
38 | #define MVI3CKCR IOMEM(0xe6150090) | ||
39 | #define VOUCKCR IOMEM(0xe6150094) | ||
40 | #define MFCK1CR IOMEM(0xe6150098) | ||
41 | #define MFCK2CR IOMEM(0xe615009C) | ||
42 | #define PLLC1CR IOMEM(0xe6150028) | ||
43 | #define PLLC2CR IOMEM(0xe615002C) | ||
44 | #define RTMSTPCR0 IOMEM(0xe6158030) | ||
45 | #define RTMSTPCR2 IOMEM(0xe6158038) | ||
46 | #define SYMSTPCR0 IOMEM(0xe6158040) | ||
47 | #define SYMSTPCR2 IOMEM(0xe6158048) | ||
48 | #define CMMSTPCR0 IOMEM(0xe615804c) | ||
49 | |||
50 | /* Fixed 32 KHz root clock from EXTALR pin */ | ||
51 | static struct clk r_clk = { | ||
52 | .rate = 32768, | ||
53 | }; | ||
54 | |||
55 | /* | ||
56 | * 26MHz default rate for the EXTALB1 root input clock. | ||
57 | * If needed, reset this with clk_set_rate() from the platform code. | ||
58 | */ | ||
59 | struct clk sh7367_extalb1_clk = { | ||
60 | .rate = 26666666, | ||
61 | }; | ||
62 | |||
63 | /* | ||
64 | * 48MHz default rate for the EXTAL2 root input clock. | ||
65 | * If needed, reset this with clk_set_rate() from the platform code. | ||
66 | */ | ||
67 | struct clk sh7367_extal2_clk = { | ||
68 | .rate = 48000000, | ||
69 | }; | ||
70 | |||
71 | /* A fixed divide-by-2 block */ | ||
72 | static unsigned long div2_recalc(struct clk *clk) | ||
73 | { | ||
74 | return clk->parent->rate / 2; | ||
75 | } | ||
76 | |||
77 | static struct sh_clk_ops div2_clk_ops = { | ||
78 | .recalc = div2_recalc, | ||
79 | }; | ||
80 | |||
81 | /* Divide extalb1 by two */ | ||
82 | static struct clk extalb1_div2_clk = { | ||
83 | .ops = &div2_clk_ops, | ||
84 | .parent = &sh7367_extalb1_clk, | ||
85 | }; | ||
86 | |||
87 | /* Divide extal2 by two */ | ||
88 | static struct clk extal2_div2_clk = { | ||
89 | .ops = &div2_clk_ops, | ||
90 | .parent = &sh7367_extal2_clk, | ||
91 | }; | ||
92 | |||
93 | /* PLLC1 */ | ||
94 | static unsigned long pllc1_recalc(struct clk *clk) | ||
95 | { | ||
96 | unsigned long mult = 1; | ||
97 | |||
98 | if (__raw_readl(PLLC1CR) & (1 << 14)) | ||
99 | mult = (((__raw_readl(RTFRQCR) >> 24) & 0x3f) + 1) * 2; | ||
100 | |||
101 | return clk->parent->rate * mult; | ||
102 | } | ||
103 | |||
104 | static struct sh_clk_ops pllc1_clk_ops = { | ||
105 | .recalc = pllc1_recalc, | ||
106 | }; | ||
107 | |||
108 | static struct clk pllc1_clk = { | ||
109 | .ops = &pllc1_clk_ops, | ||
110 | .flags = CLK_ENABLE_ON_INIT, | ||
111 | .parent = &extalb1_div2_clk, | ||
112 | }; | ||
113 | |||
114 | /* Divide PLLC1 by two */ | ||
115 | static struct clk pllc1_div2_clk = { | ||
116 | .ops = &div2_clk_ops, | ||
117 | .parent = &pllc1_clk, | ||
118 | }; | ||
119 | |||
120 | /* PLLC2 */ | ||
121 | static unsigned long pllc2_recalc(struct clk *clk) | ||
122 | { | ||
123 | unsigned long mult = 1; | ||
124 | |||
125 | if (__raw_readl(PLLC2CR) & (1 << 31)) | ||
126 | mult = (((__raw_readl(PLLC2CR) >> 24) & 0x3f) + 1) * 2; | ||
127 | |||
128 | return clk->parent->rate * mult; | ||
129 | } | ||
130 | |||
131 | static struct sh_clk_ops pllc2_clk_ops = { | ||
132 | .recalc = pllc2_recalc, | ||
133 | }; | ||
134 | |||
135 | static struct clk pllc2_clk = { | ||
136 | .ops = &pllc2_clk_ops, | ||
137 | .flags = CLK_ENABLE_ON_INIT, | ||
138 | .parent = &extalb1_div2_clk, | ||
139 | }; | ||
140 | |||
141 | static struct clk *main_clks[] = { | ||
142 | &r_clk, | ||
143 | &sh7367_extalb1_clk, | ||
144 | &sh7367_extal2_clk, | ||
145 | &extalb1_div2_clk, | ||
146 | &extal2_div2_clk, | ||
147 | &pllc1_clk, | ||
148 | &pllc1_div2_clk, | ||
149 | &pllc2_clk, | ||
150 | }; | ||
151 | |||
152 | static void div4_kick(struct clk *clk) | ||
153 | { | ||
154 | unsigned long value; | ||
155 | |||
156 | /* set KICK bit in SYFRQCR to update hardware setting */ | ||
157 | value = __raw_readl(SYFRQCR); | ||
158 | value |= (1 << 31); | ||
159 | __raw_writel(value, SYFRQCR); | ||
160 | } | ||
161 | |||
162 | static int divisors[] = { 2, 3, 4, 6, 8, 12, 16, 18, | ||
163 | 24, 32, 36, 48, 0, 72, 0, 0 }; | ||
164 | |||
165 | static struct clk_div_mult_table div4_div_mult_table = { | ||
166 | .divisors = divisors, | ||
167 | .nr_divisors = ARRAY_SIZE(divisors), | ||
168 | }; | ||
169 | |||
170 | static struct clk_div4_table div4_table = { | ||
171 | .div_mult_table = &div4_div_mult_table, | ||
172 | .kick = div4_kick, | ||
173 | }; | ||
174 | |||
175 | enum { DIV4_I, DIV4_G, DIV4_S, DIV4_B, | ||
176 | DIV4_ZX, DIV4_ZT, DIV4_Z, DIV4_ZD, DIV4_HP, | ||
177 | DIV4_ZS, DIV4_ZB, DIV4_ZB3, DIV4_CP, DIV4_NR }; | ||
178 | |||
179 | #define DIV4(_reg, _bit, _mask, _flags) \ | ||
180 | SH_CLK_DIV4(&pllc1_clk, _reg, _bit, _mask, _flags) | ||
181 | |||
182 | static struct clk div4_clks[DIV4_NR] = { | ||
183 | [DIV4_I] = DIV4(RTFRQCR, 20, 0x6fff, CLK_ENABLE_ON_INIT), | ||
184 | [DIV4_G] = DIV4(RTFRQCR, 16, 0x6fff, CLK_ENABLE_ON_INIT), | ||
185 | [DIV4_S] = DIV4(RTFRQCR, 12, 0x6fff, CLK_ENABLE_ON_INIT), | ||
186 | [DIV4_B] = DIV4(RTFRQCR, 8, 0x6fff, CLK_ENABLE_ON_INIT), | ||
187 | [DIV4_ZX] = DIV4(SYFRQCR, 20, 0x6fff, 0), | ||
188 | [DIV4_ZT] = DIV4(SYFRQCR, 16, 0x6fff, 0), | ||
189 | [DIV4_Z] = DIV4(SYFRQCR, 12, 0x6fff, 0), | ||
190 | [DIV4_ZD] = DIV4(SYFRQCR, 8, 0x6fff, 0), | ||
191 | [DIV4_HP] = DIV4(SYFRQCR, 4, 0x6fff, 0), | ||
192 | [DIV4_ZS] = DIV4(CMFRQCR, 12, 0x6fff, 0), | ||
193 | [DIV4_ZB] = DIV4(CMFRQCR, 8, 0x6fff, 0), | ||
194 | [DIV4_ZB3] = DIV4(CMFRQCR, 4, 0x6fff, 0), | ||
195 | [DIV4_CP] = DIV4(CMFRQCR, 0, 0x6fff, 0), | ||
196 | }; | ||
197 | |||
198 | enum { DIV6_SUB, DIV6_SIUA, DIV6_SIUB, DIV6_MSU, DIV6_SPU, | ||
199 | DIV6_MVI3, DIV6_MF1, DIV6_MF2, | ||
200 | DIV6_VCK1, DIV6_VCK2, DIV6_VCK3, DIV6_VOU, | ||
201 | DIV6_NR }; | ||
202 | |||
203 | static struct clk div6_clks[DIV6_NR] = { | ||
204 | [DIV6_SUB] = SH_CLK_DIV6(&sh7367_extal2_clk, SUBUSBCKCR, 0), | ||
205 | [DIV6_SIUA] = SH_CLK_DIV6(&pllc1_div2_clk, SCLKACR, 0), | ||
206 | [DIV6_SIUB] = SH_CLK_DIV6(&pllc1_div2_clk, SCLKBCR, 0), | ||
207 | [DIV6_MSU] = SH_CLK_DIV6(&pllc1_div2_clk, MSUCKCR, 0), | ||
208 | [DIV6_SPU] = SH_CLK_DIV6(&pllc1_div2_clk, SPUCKCR, 0), | ||
209 | [DIV6_MVI3] = SH_CLK_DIV6(&pllc1_div2_clk, MVI3CKCR, 0), | ||
210 | [DIV6_MF1] = SH_CLK_DIV6(&pllc1_div2_clk, MFCK1CR, 0), | ||
211 | [DIV6_MF2] = SH_CLK_DIV6(&pllc1_div2_clk, MFCK2CR, 0), | ||
212 | [DIV6_VCK1] = SH_CLK_DIV6(&pllc1_div2_clk, VCLKCR1, 0), | ||
213 | [DIV6_VCK2] = SH_CLK_DIV6(&pllc1_div2_clk, VCLKCR2, 0), | ||
214 | [DIV6_VCK3] = SH_CLK_DIV6(&pllc1_div2_clk, VCLKCR3, 0), | ||
215 | [DIV6_VOU] = SH_CLK_DIV6(&pllc1_div2_clk, VOUCKCR, 0), | ||
216 | }; | ||
217 | |||
218 | enum { RTMSTP001, | ||
219 | RTMSTP231, RTMSTP230, RTMSTP229, RTMSTP228, RTMSTP226, | ||
220 | RTMSTP216, RTMSTP206, RTMSTP205, RTMSTP201, | ||
221 | SYMSTP023, SYMSTP007, SYMSTP006, SYMSTP004, | ||
222 | SYMSTP003, SYMSTP002, SYMSTP001, SYMSTP000, | ||
223 | SYMSTP231, SYMSTP229, SYMSTP225, SYMSTP223, SYMSTP222, | ||
224 | SYMSTP215, SYMSTP214, SYMSTP213, SYMSTP211, | ||
225 | CMMSTP003, | ||
226 | MSTP_NR }; | ||
227 | |||
228 | #define MSTP(_parent, _reg, _bit, _flags) \ | ||
229 | SH_CLK_MSTP32(_parent, _reg, _bit, _flags) | ||
230 | |||
231 | static struct clk mstp_clks[MSTP_NR] = { | ||
232 | [RTMSTP001] = MSTP(&div6_clks[DIV6_SUB], RTMSTPCR0, 1, 0), /* IIC2 */ | ||
233 | [RTMSTP231] = MSTP(&div4_clks[DIV4_B], RTMSTPCR2, 31, 0), /* VEU3 */ | ||
234 | [RTMSTP230] = MSTP(&div4_clks[DIV4_B], RTMSTPCR2, 30, 0), /* VEU2 */ | ||
235 | [RTMSTP229] = MSTP(&div4_clks[DIV4_B], RTMSTPCR2, 29, 0), /* VEU1 */ | ||
236 | [RTMSTP228] = MSTP(&div4_clks[DIV4_B], RTMSTPCR2, 28, 0), /* VEU0 */ | ||
237 | [RTMSTP226] = MSTP(&div4_clks[DIV4_B], RTMSTPCR2, 26, 0), /* VEU2H */ | ||
238 | [RTMSTP216] = MSTP(&div6_clks[DIV6_SUB], RTMSTPCR2, 16, 0), /* IIC0 */ | ||
239 | [RTMSTP206] = MSTP(&div4_clks[DIV4_B], RTMSTPCR2, 6, 0), /* JPU */ | ||
240 | [RTMSTP205] = MSTP(&div6_clks[DIV6_VOU], RTMSTPCR2, 5, 0), /* VOU */ | ||
241 | [RTMSTP201] = MSTP(&div4_clks[DIV4_B], RTMSTPCR2, 1, 0), /* VPU */ | ||
242 | [SYMSTP023] = MSTP(&div6_clks[DIV6_SPU], SYMSTPCR0, 23, 0), /* SPU1 */ | ||
243 | [SYMSTP007] = MSTP(&div6_clks[DIV6_SUB], SYMSTPCR0, 7, 0), /* SCIFA5 */ | ||
244 | [SYMSTP006] = MSTP(&div6_clks[DIV6_SUB], SYMSTPCR0, 6, 0), /* SCIFB */ | ||
245 | [SYMSTP004] = MSTP(&div6_clks[DIV6_SUB], SYMSTPCR0, 4, 0), /* SCIFA0 */ | ||
246 | [SYMSTP003] = MSTP(&div6_clks[DIV6_SUB], SYMSTPCR0, 3, 0), /* SCIFA1 */ | ||
247 | [SYMSTP002] = MSTP(&div6_clks[DIV6_SUB], SYMSTPCR0, 2, 0), /* SCIFA2 */ | ||
248 | [SYMSTP001] = MSTP(&div6_clks[DIV6_SUB], SYMSTPCR0, 1, 0), /* SCIFA3 */ | ||
249 | [SYMSTP000] = MSTP(&div6_clks[DIV6_SUB], SYMSTPCR0, 0, 0), /* SCIFA4 */ | ||
250 | [SYMSTP231] = MSTP(&div6_clks[DIV6_SUB], SYMSTPCR2, 31, 0), /* SIU */ | ||
251 | [SYMSTP229] = MSTP(&r_clk, SYMSTPCR2, 29, 0), /* CMT10 */ | ||
252 | [SYMSTP225] = MSTP(&div6_clks[DIV6_SUB], SYMSTPCR2, 25, 0), /* IRDA */ | ||
253 | [SYMSTP223] = MSTP(&div6_clks[DIV6_SUB], SYMSTPCR2, 23, 0), /* IIC1 */ | ||
254 | [SYMSTP222] = MSTP(&div6_clks[DIV6_SUB], SYMSTPCR2, 22, 0), /* USBHS */ | ||
255 | [SYMSTP215] = MSTP(&div4_clks[DIV4_HP], SYMSTPCR2, 15, 0), /* FLCTL */ | ||
256 | [SYMSTP214] = MSTP(&div4_clks[DIV4_HP], SYMSTPCR2, 14, 0), /* SDHI0 */ | ||
257 | [SYMSTP213] = MSTP(&div4_clks[DIV4_HP], SYMSTPCR2, 13, 0), /* SDHI1 */ | ||
258 | [SYMSTP211] = MSTP(&div4_clks[DIV4_HP], SYMSTPCR2, 11, 0), /* SDHI2 */ | ||
259 | [CMMSTP003] = MSTP(&r_clk, CMMSTPCR0, 3, 0), /* KEYSC */ | ||
260 | }; | ||
261 | |||
262 | static struct clk_lookup lookups[] = { | ||
263 | /* main clocks */ | ||
264 | CLKDEV_CON_ID("r_clk", &r_clk), | ||
265 | CLKDEV_CON_ID("extalb1", &sh7367_extalb1_clk), | ||
266 | CLKDEV_CON_ID("extal2", &sh7367_extal2_clk), | ||
267 | CLKDEV_CON_ID("extalb1_div2_clk", &extalb1_div2_clk), | ||
268 | CLKDEV_CON_ID("extal2_div2_clk", &extal2_div2_clk), | ||
269 | CLKDEV_CON_ID("pllc1_clk", &pllc1_clk), | ||
270 | CLKDEV_CON_ID("pllc1_div2_clk", &pllc1_div2_clk), | ||
271 | CLKDEV_CON_ID("pllc2_clk", &pllc2_clk), | ||
272 | |||
273 | /* DIV4 clocks */ | ||
274 | CLKDEV_CON_ID("i_clk", &div4_clks[DIV4_I]), | ||
275 | CLKDEV_CON_ID("g_clk", &div4_clks[DIV4_G]), | ||
276 | CLKDEV_CON_ID("b_clk", &div4_clks[DIV4_B]), | ||
277 | CLKDEV_CON_ID("zx_clk", &div4_clks[DIV4_ZX]), | ||
278 | CLKDEV_CON_ID("zt_clk", &div4_clks[DIV4_ZT]), | ||
279 | CLKDEV_CON_ID("z_clk", &div4_clks[DIV4_Z]), | ||
280 | CLKDEV_CON_ID("zd_clk", &div4_clks[DIV4_ZD]), | ||
281 | CLKDEV_CON_ID("hp_clk", &div4_clks[DIV4_HP]), | ||
282 | CLKDEV_CON_ID("zs_clk", &div4_clks[DIV4_ZS]), | ||
283 | CLKDEV_CON_ID("zb_clk", &div4_clks[DIV4_ZB]), | ||
284 | CLKDEV_CON_ID("zb3_clk", &div4_clks[DIV4_ZB3]), | ||
285 | CLKDEV_CON_ID("cp_clk", &div4_clks[DIV4_CP]), | ||
286 | |||
287 | /* DIV6 clocks */ | ||
288 | CLKDEV_CON_ID("sub_clk", &div6_clks[DIV6_SUB]), | ||
289 | CLKDEV_CON_ID("siua_clk", &div6_clks[DIV6_SIUA]), | ||
290 | CLKDEV_CON_ID("siub_clk", &div6_clks[DIV6_SIUB]), | ||
291 | CLKDEV_CON_ID("msu_clk", &div6_clks[DIV6_MSU]), | ||
292 | CLKDEV_CON_ID("spu_clk", &div6_clks[DIV6_SPU]), | ||
293 | CLKDEV_CON_ID("mvi3_clk", &div6_clks[DIV6_MVI3]), | ||
294 | CLKDEV_CON_ID("mf1_clk", &div6_clks[DIV6_MF1]), | ||
295 | CLKDEV_CON_ID("mf2_clk", &div6_clks[DIV6_MF2]), | ||
296 | CLKDEV_CON_ID("vck1_clk", &div6_clks[DIV6_VCK1]), | ||
297 | CLKDEV_CON_ID("vck2_clk", &div6_clks[DIV6_VCK2]), | ||
298 | CLKDEV_CON_ID("vck3_clk", &div6_clks[DIV6_VCK3]), | ||
299 | CLKDEV_CON_ID("vou_clk", &div6_clks[DIV6_VOU]), | ||
300 | |||
301 | /* MSTP32 clocks */ | ||
302 | CLKDEV_DEV_ID("i2c-sh_mobile.2", &mstp_clks[RTMSTP001]), /* IIC2 */ | ||
303 | CLKDEV_DEV_ID("uio_pdrv_genirq.4", &mstp_clks[RTMSTP231]), /* VEU3 */ | ||
304 | CLKDEV_DEV_ID("uio_pdrv_genirq.3", &mstp_clks[RTMSTP230]), /* VEU2 */ | ||
305 | CLKDEV_DEV_ID("uio_pdrv_genirq.2", &mstp_clks[RTMSTP229]), /* VEU1 */ | ||
306 | CLKDEV_DEV_ID("uio_pdrv_genirq.1", &mstp_clks[RTMSTP228]), /* VEU0 */ | ||
307 | CLKDEV_DEV_ID("uio_pdrv_genirq.5", &mstp_clks[RTMSTP226]), /* VEU2H */ | ||
308 | CLKDEV_DEV_ID("i2c-sh_mobile.0", &mstp_clks[RTMSTP216]), /* IIC0 */ | ||
309 | CLKDEV_DEV_ID("uio_pdrv_genirq.6", &mstp_clks[RTMSTP206]), /* JPU */ | ||
310 | CLKDEV_DEV_ID("sh-vou", &mstp_clks[RTMSTP205]), /* VOU */ | ||
311 | CLKDEV_DEV_ID("uio_pdrv_genirq.0", &mstp_clks[RTMSTP201]), /* VPU */ | ||
312 | CLKDEV_DEV_ID("uio_pdrv_genirq.7", &mstp_clks[SYMSTP023]), /* SPU1 */ | ||
313 | CLKDEV_DEV_ID("sh-sci.5", &mstp_clks[SYMSTP007]), /* SCIFA5 */ | ||
314 | CLKDEV_DEV_ID("sh-sci.6", &mstp_clks[SYMSTP006]), /* SCIFB */ | ||
315 | CLKDEV_DEV_ID("sh-sci.0", &mstp_clks[SYMSTP004]), /* SCIFA0 */ | ||
316 | CLKDEV_DEV_ID("sh-sci.1", &mstp_clks[SYMSTP003]), /* SCIFA1 */ | ||
317 | CLKDEV_DEV_ID("sh-sci.2", &mstp_clks[SYMSTP002]), /* SCIFA2 */ | ||
318 | CLKDEV_DEV_ID("sh-sci.3", &mstp_clks[SYMSTP001]), /* SCIFA3 */ | ||
319 | CLKDEV_DEV_ID("sh-sci.4", &mstp_clks[SYMSTP000]), /* SCIFA4 */ | ||
320 | CLKDEV_DEV_ID("sh_siu", &mstp_clks[SYMSTP231]), /* SIU */ | ||
321 | CLKDEV_DEV_ID("sh_cmt.10", &mstp_clks[SYMSTP229]), /* CMT10 */ | ||
322 | CLKDEV_DEV_ID("sh_irda", &mstp_clks[SYMSTP225]), /* IRDA */ | ||
323 | CLKDEV_DEV_ID("i2c-sh_mobile.1", &mstp_clks[SYMSTP223]), /* IIC1 */ | ||
324 | CLKDEV_DEV_ID("r8a66597_hcd.0", &mstp_clks[SYMSTP222]), /* USBHS */ | ||
325 | CLKDEV_DEV_ID("r8a66597_udc.0", &mstp_clks[SYMSTP222]), /* USBHS */ | ||
326 | CLKDEV_DEV_ID("sh_flctl", &mstp_clks[SYMSTP215]), /* FLCTL */ | ||
327 | CLKDEV_DEV_ID("sh_mobile_sdhi.0", &mstp_clks[SYMSTP214]), /* SDHI0 */ | ||
328 | CLKDEV_DEV_ID("sh_mobile_sdhi.1", &mstp_clks[SYMSTP213]), /* SDHI1 */ | ||
329 | CLKDEV_DEV_ID("sh_mobile_sdhi.2", &mstp_clks[SYMSTP211]), /* SDHI2 */ | ||
330 | CLKDEV_DEV_ID("sh_keysc.0", &mstp_clks[CMMSTP003]), /* KEYSC */ | ||
331 | }; | ||
332 | |||
333 | void __init sh7367_clock_init(void) | ||
334 | { | ||
335 | int k, ret = 0; | ||
336 | |||
337 | for (k = 0; !ret && (k < ARRAY_SIZE(main_clks)); k++) | ||
338 | ret = clk_register(main_clks[k]); | ||
339 | |||
340 | if (!ret) | ||
341 | ret = sh_clk_div4_register(div4_clks, DIV4_NR, &div4_table); | ||
342 | |||
343 | if (!ret) | ||
344 | ret = sh_clk_div6_register(div6_clks, DIV6_NR); | ||
345 | |||
346 | if (!ret) | ||
347 | ret = sh_clk_mstp_register(mstp_clks, MSTP_NR); | ||
348 | |||
349 | clkdev_add_table(lookups, ARRAY_SIZE(lookups)); | ||
350 | |||
351 | if (!ret) | ||
352 | shmobile_clk_init(); | ||
353 | else | ||
354 | panic("failed to setup sh7367 clocks\n"); | ||
355 | } | ||
diff --git a/arch/arm/mach-shmobile/clock-sh7372.c b/arch/arm/mach-shmobile/clock-sh7372.c index 430a90ffa120..4d57e342537b 100644 --- a/arch/arm/mach-shmobile/clock-sh7372.c +++ b/arch/arm/mach-shmobile/clock-sh7372.c | |||
@@ -420,87 +420,11 @@ static struct clk div6_reparent_clks[DIV6_REPARENT_NR] = { | |||
420 | }; | 420 | }; |
421 | 421 | ||
422 | /* FSI DIV */ | 422 | /* FSI DIV */ |
423 | static unsigned long fsidiv_recalc(struct clk *clk) | 423 | enum { FSIDIV_A, FSIDIV_B, FSIDIV_REPARENT_NR }; |
424 | { | ||
425 | unsigned long value; | ||
426 | |||
427 | value = __raw_readl(clk->mapping->base); | ||
428 | |||
429 | value >>= 16; | ||
430 | if (value < 2) | ||
431 | return 0; | ||
432 | |||
433 | return clk->parent->rate / value; | ||
434 | } | ||
435 | |||
436 | static long fsidiv_round_rate(struct clk *clk, unsigned long rate) | ||
437 | { | ||
438 | return clk_rate_div_range_round(clk, 2, 0xffff, rate); | ||
439 | } | ||
440 | |||
441 | static void fsidiv_disable(struct clk *clk) | ||
442 | { | ||
443 | __raw_writel(0, clk->mapping->base); | ||
444 | } | ||
445 | |||
446 | static int fsidiv_enable(struct clk *clk) | ||
447 | { | ||
448 | unsigned long value; | ||
449 | |||
450 | value = __raw_readl(clk->mapping->base) >> 16; | ||
451 | if (value < 2) | ||
452 | return -EIO; | ||
453 | |||
454 | __raw_writel((value << 16) | 0x3, clk->mapping->base); | ||
455 | |||
456 | return 0; | ||
457 | } | ||
458 | 424 | ||
459 | static int fsidiv_set_rate(struct clk *clk, unsigned long rate) | 425 | static struct clk fsidivs[] = { |
460 | { | 426 | [FSIDIV_A] = SH_CLK_FSIDIV(FSIDIVA, &div6_reparent_clks[DIV6_FSIA]), |
461 | int idx; | 427 | [FSIDIV_B] = SH_CLK_FSIDIV(FSIDIVB, &div6_reparent_clks[DIV6_FSIB]), |
462 | |||
463 | idx = (clk->parent->rate / rate) & 0xffff; | ||
464 | if (idx < 2) | ||
465 | return -EINVAL; | ||
466 | |||
467 | __raw_writel(idx << 16, clk->mapping->base); | ||
468 | return 0; | ||
469 | } | ||
470 | |||
471 | static struct sh_clk_ops fsidiv_clk_ops = { | ||
472 | .recalc = fsidiv_recalc, | ||
473 | .round_rate = fsidiv_round_rate, | ||
474 | .set_rate = fsidiv_set_rate, | ||
475 | .enable = fsidiv_enable, | ||
476 | .disable = fsidiv_disable, | ||
477 | }; | ||
478 | |||
479 | static struct clk_mapping fsidiva_clk_mapping = { | ||
480 | .phys = FSIDIVA, | ||
481 | .len = 8, | ||
482 | }; | ||
483 | |||
484 | struct clk sh7372_fsidiva_clk = { | ||
485 | .ops = &fsidiv_clk_ops, | ||
486 | .parent = &div6_reparent_clks[DIV6_FSIA], /* late install */ | ||
487 | .mapping = &fsidiva_clk_mapping, | ||
488 | }; | ||
489 | |||
490 | static struct clk_mapping fsidivb_clk_mapping = { | ||
491 | .phys = FSIDIVB, | ||
492 | .len = 8, | ||
493 | }; | ||
494 | |||
495 | struct clk sh7372_fsidivb_clk = { | ||
496 | .ops = &fsidiv_clk_ops, | ||
497 | .parent = &div6_reparent_clks[DIV6_FSIB], /* late install */ | ||
498 | .mapping = &fsidivb_clk_mapping, | ||
499 | }; | ||
500 | |||
501 | static struct clk *late_main_clks[] = { | ||
502 | &sh7372_fsidiva_clk, | ||
503 | &sh7372_fsidivb_clk, | ||
504 | }; | 428 | }; |
505 | 429 | ||
506 | enum { MSTP001, MSTP000, | 430 | enum { MSTP001, MSTP000, |
@@ -583,6 +507,8 @@ static struct clk_lookup lookups[] = { | |||
583 | CLKDEV_CON_ID("pllc1_clk", &pllc1_clk), | 507 | CLKDEV_CON_ID("pllc1_clk", &pllc1_clk), |
584 | CLKDEV_CON_ID("pllc1_div2_clk", &pllc1_div2_clk), | 508 | CLKDEV_CON_ID("pllc1_div2_clk", &pllc1_div2_clk), |
585 | CLKDEV_CON_ID("pllc2_clk", &sh7372_pllc2_clk), | 509 | CLKDEV_CON_ID("pllc2_clk", &sh7372_pllc2_clk), |
510 | CLKDEV_CON_ID("fsidiva", &fsidivs[FSIDIV_A]), | ||
511 | CLKDEV_CON_ID("fsidivb", &fsidivs[FSIDIV_B]), | ||
586 | 512 | ||
587 | /* DIV4 clocks */ | 513 | /* DIV4 clocks */ |
588 | CLKDEV_CON_ID("i_clk", &div4_clks[DIV4_I]), | 514 | CLKDEV_CON_ID("i_clk", &div4_clks[DIV4_I]), |
@@ -678,6 +604,10 @@ static struct clk_lookup lookups[] = { | |||
678 | CLKDEV_ICK_ID("icka", "sh_fsi2", &div6_reparent_clks[DIV6_FSIA]), | 604 | CLKDEV_ICK_ID("icka", "sh_fsi2", &div6_reparent_clks[DIV6_FSIA]), |
679 | CLKDEV_ICK_ID("ickb", "sh_fsi2", &div6_reparent_clks[DIV6_FSIB]), | 605 | CLKDEV_ICK_ID("ickb", "sh_fsi2", &div6_reparent_clks[DIV6_FSIB]), |
680 | CLKDEV_ICK_ID("spu2", "sh_fsi2", &mstp_clks[MSTP223]), | 606 | CLKDEV_ICK_ID("spu2", "sh_fsi2", &mstp_clks[MSTP223]), |
607 | CLKDEV_ICK_ID("diva", "sh_fsi2", &fsidivs[FSIDIV_A]), | ||
608 | CLKDEV_ICK_ID("divb", "sh_fsi2", &fsidivs[FSIDIV_B]), | ||
609 | CLKDEV_ICK_ID("xcka", "sh_fsi2", &sh7372_fsiack_clk), | ||
610 | CLKDEV_ICK_ID("xckb", "sh_fsi2", &sh7372_fsibck_clk), | ||
681 | }; | 611 | }; |
682 | 612 | ||
683 | void __init sh7372_clock_init(void) | 613 | void __init sh7372_clock_init(void) |
@@ -706,8 +636,8 @@ void __init sh7372_clock_init(void) | |||
706 | if (!ret) | 636 | if (!ret) |
707 | ret = sh_clk_mstp_register(mstp_clks, MSTP_NR); | 637 | ret = sh_clk_mstp_register(mstp_clks, MSTP_NR); |
708 | 638 | ||
709 | for (k = 0; !ret && (k < ARRAY_SIZE(late_main_clks)); k++) | 639 | if (!ret) |
710 | ret = clk_register(late_main_clks[k]); | 640 | ret = sh_clk_fsidiv_register(fsidivs, FSIDIV_REPARENT_NR); |
711 | 641 | ||
712 | clkdev_add_table(lookups, ARRAY_SIZE(lookups)); | 642 | clkdev_add_table(lookups, ARRAY_SIZE(lookups)); |
713 | 643 | ||
diff --git a/arch/arm/mach-shmobile/clock-sh7377.c b/arch/arm/mach-shmobile/clock-sh7377.c deleted file mode 100644 index b8480d19e1c8..000000000000 --- a/arch/arm/mach-shmobile/clock-sh7377.c +++ /dev/null | |||
@@ -1,366 +0,0 @@ | |||
1 | /* | ||
2 | * SH7377 clock framework support | ||
3 | * | ||
4 | * Copyright (C) 2010 Magnus Damm | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License as published by | ||
8 | * the Free Software Foundation; either version 2 of the License | ||
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 | #include <linux/init.h> | ||
20 | #include <linux/kernel.h> | ||
21 | #include <linux/io.h> | ||
22 | #include <linux/sh_clk.h> | ||
23 | #include <linux/clkdev.h> | ||
24 | #include <mach/common.h> | ||
25 | |||
26 | /* SH7377 registers */ | ||
27 | #define RTFRQCR IOMEM(0xe6150000) | ||
28 | #define SYFRQCR IOMEM(0xe6150004) | ||
29 | #define CMFRQCR IOMEM(0xe61500E0) | ||
30 | #define VCLKCR1 IOMEM(0xe6150008) | ||
31 | #define VCLKCR2 IOMEM(0xe615000C) | ||
32 | #define VCLKCR3 IOMEM(0xe615001C) | ||
33 | #define FMSICKCR IOMEM(0xe6150010) | ||
34 | #define FMSOCKCR IOMEM(0xe6150014) | ||
35 | #define FSICKCR IOMEM(0xe6150018) | ||
36 | #define PLLC1CR IOMEM(0xe6150028) | ||
37 | #define PLLC2CR IOMEM(0xe615002C) | ||
38 | #define SUBUSBCKCR IOMEM(0xe6150080) | ||
39 | #define SPUCKCR IOMEM(0xe6150084) | ||
40 | #define MSUCKCR IOMEM(0xe6150088) | ||
41 | #define MVI3CKCR IOMEM(0xe6150090) | ||
42 | #define HDMICKCR IOMEM(0xe6150094) | ||
43 | #define MFCK1CR IOMEM(0xe6150098) | ||
44 | #define MFCK2CR IOMEM(0xe615009C) | ||
45 | #define DSITCKCR IOMEM(0xe6150060) | ||
46 | #define DSIPCKCR IOMEM(0xe6150064) | ||
47 | #define SMSTPCR0 IOMEM(0xe6150130) | ||
48 | #define SMSTPCR1 IOMEM(0xe6150134) | ||
49 | #define SMSTPCR2 IOMEM(0xe6150138) | ||
50 | #define SMSTPCR3 IOMEM(0xe615013C) | ||
51 | #define SMSTPCR4 IOMEM(0xe6150140) | ||
52 | |||
53 | /* Fixed 32 KHz root clock from EXTALR pin */ | ||
54 | static struct clk r_clk = { | ||
55 | .rate = 32768, | ||
56 | }; | ||
57 | |||
58 | /* | ||
59 | * 26MHz default rate for the EXTALC1 root input clock. | ||
60 | * If needed, reset this with clk_set_rate() from the platform code. | ||
61 | */ | ||
62 | struct clk sh7377_extalc1_clk = { | ||
63 | .rate = 26666666, | ||
64 | }; | ||
65 | |||
66 | /* | ||
67 | * 48MHz default rate for the EXTAL2 root input clock. | ||
68 | * If needed, reset this with clk_set_rate() from the platform code. | ||
69 | */ | ||
70 | struct clk sh7377_extal2_clk = { | ||
71 | .rate = 48000000, | ||
72 | }; | ||
73 | |||
74 | /* A fixed divide-by-2 block */ | ||
75 | static unsigned long div2_recalc(struct clk *clk) | ||
76 | { | ||
77 | return clk->parent->rate / 2; | ||
78 | } | ||
79 | |||
80 | static struct sh_clk_ops div2_clk_ops = { | ||
81 | .recalc = div2_recalc, | ||
82 | }; | ||
83 | |||
84 | /* Divide extalc1 by two */ | ||
85 | static struct clk extalc1_div2_clk = { | ||
86 | .ops = &div2_clk_ops, | ||
87 | .parent = &sh7377_extalc1_clk, | ||
88 | }; | ||
89 | |||
90 | /* Divide extal2 by two */ | ||
91 | static struct clk extal2_div2_clk = { | ||
92 | .ops = &div2_clk_ops, | ||
93 | .parent = &sh7377_extal2_clk, | ||
94 | }; | ||
95 | |||
96 | /* Divide extal2 by four */ | ||
97 | static struct clk extal2_div4_clk = { | ||
98 | .ops = &div2_clk_ops, | ||
99 | .parent = &extal2_div2_clk, | ||
100 | }; | ||
101 | |||
102 | /* PLLC1 */ | ||
103 | static unsigned long pllc1_recalc(struct clk *clk) | ||
104 | { | ||
105 | unsigned long mult = 1; | ||
106 | |||
107 | if (__raw_readl(PLLC1CR) & (1 << 14)) | ||
108 | mult = (((__raw_readl(RTFRQCR) >> 24) & 0x3f) + 1) * 2; | ||
109 | |||
110 | return clk->parent->rate * mult; | ||
111 | } | ||
112 | |||
113 | static struct sh_clk_ops pllc1_clk_ops = { | ||
114 | .recalc = pllc1_recalc, | ||
115 | }; | ||
116 | |||
117 | static struct clk pllc1_clk = { | ||
118 | .ops = &pllc1_clk_ops, | ||
119 | .flags = CLK_ENABLE_ON_INIT, | ||
120 | .parent = &extalc1_div2_clk, | ||
121 | }; | ||
122 | |||
123 | /* Divide PLLC1 by two */ | ||
124 | static struct clk pllc1_div2_clk = { | ||
125 | .ops = &div2_clk_ops, | ||
126 | .parent = &pllc1_clk, | ||
127 | }; | ||
128 | |||
129 | /* PLLC2 */ | ||
130 | static unsigned long pllc2_recalc(struct clk *clk) | ||
131 | { | ||
132 | unsigned long mult = 1; | ||
133 | |||
134 | if (__raw_readl(PLLC2CR) & (1 << 31)) | ||
135 | mult = (((__raw_readl(PLLC2CR) >> 24) & 0x3f) + 1) * 2; | ||
136 | |||
137 | return clk->parent->rate * mult; | ||
138 | } | ||
139 | |||
140 | static struct sh_clk_ops pllc2_clk_ops = { | ||
141 | .recalc = pllc2_recalc, | ||
142 | }; | ||
143 | |||
144 | static struct clk pllc2_clk = { | ||
145 | .ops = &pllc2_clk_ops, | ||
146 | .flags = CLK_ENABLE_ON_INIT, | ||
147 | .parent = &extalc1_div2_clk, | ||
148 | }; | ||
149 | |||
150 | static struct clk *main_clks[] = { | ||
151 | &r_clk, | ||
152 | &sh7377_extalc1_clk, | ||
153 | &sh7377_extal2_clk, | ||
154 | &extalc1_div2_clk, | ||
155 | &extal2_div2_clk, | ||
156 | &extal2_div4_clk, | ||
157 | &pllc1_clk, | ||
158 | &pllc1_div2_clk, | ||
159 | &pllc2_clk, | ||
160 | }; | ||
161 | |||
162 | static void div4_kick(struct clk *clk) | ||
163 | { | ||
164 | unsigned long value; | ||
165 | |||
166 | /* set KICK bit in SYFRQCR to update hardware setting */ | ||
167 | value = __raw_readl(SYFRQCR); | ||
168 | value |= (1 << 31); | ||
169 | __raw_writel(value, SYFRQCR); | ||
170 | } | ||
171 | |||
172 | static int divisors[] = { 2, 3, 4, 6, 8, 12, 16, 18, | ||
173 | 24, 32, 36, 48, 0, 72, 96, 0 }; | ||
174 | |||
175 | static struct clk_div_mult_table div4_div_mult_table = { | ||
176 | .divisors = divisors, | ||
177 | .nr_divisors = ARRAY_SIZE(divisors), | ||
178 | }; | ||
179 | |||
180 | static struct clk_div4_table div4_table = { | ||
181 | .div_mult_table = &div4_div_mult_table, | ||
182 | .kick = div4_kick, | ||
183 | }; | ||
184 | |||
185 | enum { DIV4_I, DIV4_ZG, DIV4_B, DIV4_M1, DIV4_CSIR, | ||
186 | DIV4_ZTR, DIV4_ZT, DIV4_Z, DIV4_HP, | ||
187 | DIV4_ZS, DIV4_ZB, DIV4_ZB3, DIV4_CP, DIV4_NR }; | ||
188 | |||
189 | #define DIV4(_reg, _bit, _mask, _flags) \ | ||
190 | SH_CLK_DIV4(&pllc1_clk, _reg, _bit, _mask, _flags) | ||
191 | |||
192 | static struct clk div4_clks[DIV4_NR] = { | ||
193 | [DIV4_I] = DIV4(RTFRQCR, 20, 0x6fff, CLK_ENABLE_ON_INIT), | ||
194 | [DIV4_ZG] = DIV4(RTFRQCR, 16, 0x6fff, CLK_ENABLE_ON_INIT), | ||
195 | [DIV4_B] = DIV4(RTFRQCR, 8, 0x6fff, CLK_ENABLE_ON_INIT), | ||
196 | [DIV4_M1] = DIV4(RTFRQCR, 4, 0x6fff, CLK_ENABLE_ON_INIT), | ||
197 | [DIV4_CSIR] = DIV4(RTFRQCR, 0, 0x6fff, 0), | ||
198 | [DIV4_ZTR] = DIV4(SYFRQCR, 20, 0x6fff, 0), | ||
199 | [DIV4_ZT] = DIV4(SYFRQCR, 16, 0x6fff, 0), | ||
200 | [DIV4_Z] = DIV4(SYFRQCR, 12, 0x6fff, 0), | ||
201 | [DIV4_HP] = DIV4(SYFRQCR, 4, 0x6fff, 0), | ||
202 | [DIV4_ZS] = DIV4(CMFRQCR, 12, 0x6fff, 0), | ||
203 | [DIV4_ZB] = DIV4(CMFRQCR, 8, 0x6fff, 0), | ||
204 | [DIV4_ZB3] = DIV4(CMFRQCR, 4, 0x6fff, 0), | ||
205 | [DIV4_CP] = DIV4(CMFRQCR, 0, 0x6fff, 0), | ||
206 | }; | ||
207 | |||
208 | enum { DIV6_VCK1, DIV6_VCK2, DIV6_VCK3, DIV6_FMSI, DIV6_FMSO, | ||
209 | DIV6_FSI, DIV6_SUB, DIV6_SPU, DIV6_MSU, DIV6_MVI3, DIV6_HDMI, | ||
210 | DIV6_MF1, DIV6_MF2, DIV6_DSIT, DIV6_DSIP, | ||
211 | DIV6_NR }; | ||
212 | |||
213 | static struct clk div6_clks[] = { | ||
214 | [DIV6_VCK1] = SH_CLK_DIV6(&pllc1_div2_clk, VCLKCR1, 0), | ||
215 | [DIV6_VCK2] = SH_CLK_DIV6(&pllc1_div2_clk, VCLKCR2, 0), | ||
216 | [DIV6_VCK3] = SH_CLK_DIV6(&pllc1_div2_clk, VCLKCR3, 0), | ||
217 | [DIV6_FMSI] = SH_CLK_DIV6(&pllc1_div2_clk, FMSICKCR, 0), | ||
218 | [DIV6_FMSO] = SH_CLK_DIV6(&pllc1_div2_clk, FMSOCKCR, 0), | ||
219 | [DIV6_FSI] = SH_CLK_DIV6(&pllc1_div2_clk, FSICKCR, 0), | ||
220 | [DIV6_SUB] = SH_CLK_DIV6(&sh7377_extal2_clk, SUBUSBCKCR, 0), | ||
221 | [DIV6_SPU] = SH_CLK_DIV6(&pllc1_div2_clk, SPUCKCR, 0), | ||
222 | [DIV6_MSU] = SH_CLK_DIV6(&pllc1_div2_clk, MSUCKCR, 0), | ||
223 | [DIV6_MVI3] = SH_CLK_DIV6(&pllc1_div2_clk, MVI3CKCR, 0), | ||
224 | [DIV6_HDMI] = SH_CLK_DIV6(&pllc1_div2_clk, HDMICKCR, 0), | ||
225 | [DIV6_MF1] = SH_CLK_DIV6(&pllc1_div2_clk, MFCK1CR, 0), | ||
226 | [DIV6_MF2] = SH_CLK_DIV6(&pllc1_div2_clk, MFCK2CR, 0), | ||
227 | [DIV6_DSIT] = SH_CLK_DIV6(&pllc1_div2_clk, DSITCKCR, 0), | ||
228 | [DIV6_DSIP] = SH_CLK_DIV6(&pllc1_div2_clk, DSIPCKCR, 0), | ||
229 | }; | ||
230 | |||
231 | enum { MSTP001, | ||
232 | MSTP131, MSTP130, MSTP129, MSTP128, MSTP116, MSTP106, MSTP101, | ||
233 | MSTP223, MSTP207, MSTP206, MSTP204, MSTP203, MSTP202, MSTP201, MSTP200, | ||
234 | MSTP331, MSTP329, MSTP325, MSTP323, MSTP322, | ||
235 | MSTP315, MSTP314, MSTP313, | ||
236 | MSTP403, | ||
237 | MSTP_NR }; | ||
238 | |||
239 | #define MSTP(_parent, _reg, _bit, _flags) \ | ||
240 | SH_CLK_MSTP32(_parent, _reg, _bit, _flags) | ||
241 | |||
242 | static struct clk mstp_clks[] = { | ||
243 | [MSTP001] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR0, 1, 0), /* IIC2 */ | ||
244 | [MSTP131] = MSTP(&div4_clks[DIV4_B], SMSTPCR1, 31, 0), /* VEU3 */ | ||
245 | [MSTP130] = MSTP(&div4_clks[DIV4_B], SMSTPCR1, 30, 0), /* VEU2 */ | ||
246 | [MSTP129] = MSTP(&div4_clks[DIV4_B], SMSTPCR1, 29, 0), /* VEU1 */ | ||
247 | [MSTP128] = MSTP(&div4_clks[DIV4_B], SMSTPCR1, 28, 0), /* VEU0 */ | ||
248 | [MSTP116] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR1, 16, 0), /* IIC0 */ | ||
249 | [MSTP106] = MSTP(&div4_clks[DIV4_B], SMSTPCR1, 6, 0), /* JPU */ | ||
250 | [MSTP101] = MSTP(&div4_clks[DIV4_M1], SMSTPCR1, 1, 0), /* VPU */ | ||
251 | [MSTP223] = MSTP(&div6_clks[DIV6_SPU], SMSTPCR2, 23, 0), /* SPU2 */ | ||
252 | [MSTP207] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR2, 7, 0), /* SCIFA5 */ | ||
253 | [MSTP206] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR2, 6, 0), /* SCIFB */ | ||
254 | [MSTP204] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR2, 4, 0), /* SCIFA0 */ | ||
255 | [MSTP203] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR2, 3, 0), /* SCIFA1 */ | ||
256 | [MSTP202] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR2, 2, 0), /* SCIFA2 */ | ||
257 | [MSTP201] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR2, 1, 0), /* SCIFA3 */ | ||
258 | [MSTP200] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR2, 0, 0), /* SCIFA4 */ | ||
259 | [MSTP331] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR3, 31, 0), /* SCIFA6 */ | ||
260 | [MSTP329] = MSTP(&r_clk, SMSTPCR3, 29, 0), /* CMT10 */ | ||
261 | [MSTP325] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR3, 25, 0), /* IRDA */ | ||
262 | [MSTP323] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR3, 23, 0), /* IIC1 */ | ||
263 | [MSTP322] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR3, 22, 0), /* USB0 */ | ||
264 | [MSTP315] = MSTP(&div4_clks[DIV4_HP], SMSTPCR3, 15, 0), /* FLCTL */ | ||
265 | [MSTP314] = MSTP(&div4_clks[DIV4_HP], SMSTPCR3, 14, 0), /* SDHI0 */ | ||
266 | [MSTP313] = MSTP(&div4_clks[DIV4_HP], SMSTPCR3, 13, 0), /* SDHI1 */ | ||
267 | [MSTP403] = MSTP(&r_clk, SMSTPCR4, 3, 0), /* KEYSC */ | ||
268 | }; | ||
269 | |||
270 | static struct clk_lookup lookups[] = { | ||
271 | /* main clocks */ | ||
272 | CLKDEV_CON_ID("r_clk", &r_clk), | ||
273 | CLKDEV_CON_ID("extalc1", &sh7377_extalc1_clk), | ||
274 | CLKDEV_CON_ID("extal2", &sh7377_extal2_clk), | ||
275 | CLKDEV_CON_ID("extalc1_div2_clk", &extalc1_div2_clk), | ||
276 | CLKDEV_CON_ID("extal2_div2_clk", &extal2_div2_clk), | ||
277 | CLKDEV_CON_ID("extal2_div4_clk", &extal2_div4_clk), | ||
278 | CLKDEV_CON_ID("pllc1_clk", &pllc1_clk), | ||
279 | CLKDEV_CON_ID("pllc1_div2_clk", &pllc1_div2_clk), | ||
280 | CLKDEV_CON_ID("pllc2_clk", &pllc2_clk), | ||
281 | |||
282 | /* DIV4 clocks */ | ||
283 | CLKDEV_CON_ID("i_clk", &div4_clks[DIV4_I]), | ||
284 | CLKDEV_CON_ID("zg_clk", &div4_clks[DIV4_ZG]), | ||
285 | CLKDEV_CON_ID("b_clk", &div4_clks[DIV4_B]), | ||
286 | CLKDEV_CON_ID("m1_clk", &div4_clks[DIV4_M1]), | ||
287 | CLKDEV_CON_ID("csir_clk", &div4_clks[DIV4_CSIR]), | ||
288 | CLKDEV_CON_ID("ztr_clk", &div4_clks[DIV4_ZTR]), | ||
289 | CLKDEV_CON_ID("zt_clk", &div4_clks[DIV4_ZT]), | ||
290 | CLKDEV_CON_ID("z_clk", &div4_clks[DIV4_Z]), | ||
291 | CLKDEV_CON_ID("hp_clk", &div4_clks[DIV4_HP]), | ||
292 | CLKDEV_CON_ID("zs_clk", &div4_clks[DIV4_ZS]), | ||
293 | CLKDEV_CON_ID("zb_clk", &div4_clks[DIV4_ZB]), | ||
294 | CLKDEV_CON_ID("zb3_clk", &div4_clks[DIV4_ZB3]), | ||
295 | CLKDEV_CON_ID("cp_clk", &div4_clks[DIV4_CP]), | ||
296 | |||
297 | /* DIV6 clocks */ | ||
298 | CLKDEV_CON_ID("vck1_clk", &div6_clks[DIV6_VCK1]), | ||
299 | CLKDEV_CON_ID("vck2_clk", &div6_clks[DIV6_VCK2]), | ||
300 | CLKDEV_CON_ID("vck3_clk", &div6_clks[DIV6_VCK3]), | ||
301 | CLKDEV_CON_ID("fmsi_clk", &div6_clks[DIV6_FMSI]), | ||
302 | CLKDEV_CON_ID("fmso_clk", &div6_clks[DIV6_FMSO]), | ||
303 | CLKDEV_CON_ID("fsi_clk", &div6_clks[DIV6_FSI]), | ||
304 | CLKDEV_CON_ID("sub_clk", &div6_clks[DIV6_SUB]), | ||
305 | CLKDEV_CON_ID("spu_clk", &div6_clks[DIV6_SPU]), | ||
306 | CLKDEV_CON_ID("msu_clk", &div6_clks[DIV6_MSU]), | ||
307 | CLKDEV_CON_ID("mvi3_clk", &div6_clks[DIV6_MVI3]), | ||
308 | CLKDEV_CON_ID("hdmi_clk", &div6_clks[DIV6_HDMI]), | ||
309 | CLKDEV_CON_ID("mf1_clk", &div6_clks[DIV6_MF1]), | ||
310 | CLKDEV_CON_ID("mf2_clk", &div6_clks[DIV6_MF2]), | ||
311 | CLKDEV_CON_ID("dsit_clk", &div6_clks[DIV6_DSIT]), | ||
312 | CLKDEV_CON_ID("dsip_clk", &div6_clks[DIV6_DSIP]), | ||
313 | |||
314 | /* MSTP32 clocks */ | ||
315 | CLKDEV_DEV_ID("i2c-sh_mobile.2", &mstp_clks[MSTP001]), /* IIC2 */ | ||
316 | CLKDEV_DEV_ID("uio_pdrv_genirq.4", &mstp_clks[MSTP131]), /* VEU3 */ | ||
317 | CLKDEV_DEV_ID("uio_pdrv_genirq.3", &mstp_clks[MSTP130]), /* VEU2 */ | ||
318 | CLKDEV_DEV_ID("uio_pdrv_genirq.2", &mstp_clks[MSTP129]), /* VEU1 */ | ||
319 | CLKDEV_DEV_ID("uio_pdrv_genirq.1", &mstp_clks[MSTP128]), /* VEU0 */ | ||
320 | CLKDEV_DEV_ID("i2c-sh_mobile.0", &mstp_clks[MSTP116]), /* IIC0 */ | ||
321 | CLKDEV_DEV_ID("uio_pdrv_genirq.5", &mstp_clks[MSTP106]), /* JPU */ | ||
322 | CLKDEV_DEV_ID("uio_pdrv_genirq.0", &mstp_clks[MSTP101]), /* VPU */ | ||
323 | CLKDEV_DEV_ID("uio_pdrv_genirq.6", &mstp_clks[MSTP223]), /* SPU2DSP0 */ | ||
324 | CLKDEV_DEV_ID("uio_pdrv_genirq.7", &mstp_clks[MSTP223]), /* SPU2DSP1 */ | ||
325 | CLKDEV_DEV_ID("sh-sci.5", &mstp_clks[MSTP207]), /* SCIFA5 */ | ||
326 | CLKDEV_DEV_ID("sh-sci.7", &mstp_clks[MSTP206]), /* SCIFB */ | ||
327 | CLKDEV_DEV_ID("sh-sci.0", &mstp_clks[MSTP204]), /* SCIFA0 */ | ||
328 | CLKDEV_DEV_ID("sh-sci.1", &mstp_clks[MSTP203]), /* SCIFA1 */ | ||
329 | CLKDEV_DEV_ID("sh-sci.2", &mstp_clks[MSTP202]), /* SCIFA2 */ | ||
330 | CLKDEV_DEV_ID("sh-sci.3", &mstp_clks[MSTP201]), /* SCIFA3 */ | ||
331 | CLKDEV_DEV_ID("sh-sci.4", &mstp_clks[MSTP200]), /* SCIFA4 */ | ||
332 | CLKDEV_DEV_ID("sh-sci.6", &mstp_clks[MSTP331]), /* SCIFA6 */ | ||
333 | CLKDEV_DEV_ID("sh_cmt.10", &mstp_clks[MSTP329]), /* CMT10 */ | ||
334 | CLKDEV_DEV_ID("sh_irda", &mstp_clks[MSTP325]), /* IRDA */ | ||
335 | CLKDEV_DEV_ID("i2c-sh_mobile.1", &mstp_clks[MSTP323]), /* IIC1 */ | ||
336 | CLKDEV_DEV_ID("r8a66597_hcd.0", &mstp_clks[MSTP322]), /* USBHS */ | ||
337 | CLKDEV_DEV_ID("r8a66597_udc.0", &mstp_clks[MSTP322]), /* USBHS */ | ||
338 | CLKDEV_DEV_ID("sh_flctl", &mstp_clks[MSTP315]), /* FLCTL */ | ||
339 | CLKDEV_DEV_ID("sh_mobile_sdhi.0", &mstp_clks[MSTP314]), /* SDHI0 */ | ||
340 | CLKDEV_DEV_ID("sh_mobile_sdhi.1", &mstp_clks[MSTP313]), /* SDHI1 */ | ||
341 | CLKDEV_DEV_ID("sh_keysc.0", &mstp_clks[MSTP403]), /* KEYSC */ | ||
342 | }; | ||
343 | |||
344 | void __init sh7377_clock_init(void) | ||
345 | { | ||
346 | int k, ret = 0; | ||
347 | |||
348 | for (k = 0; !ret && (k < ARRAY_SIZE(main_clks)); k++) | ||
349 | ret = clk_register(main_clks[k]); | ||
350 | |||
351 | if (!ret) | ||
352 | ret = sh_clk_div4_register(div4_clks, DIV4_NR, &div4_table); | ||
353 | |||
354 | if (!ret) | ||
355 | ret = sh_clk_div6_register(div6_clks, DIV6_NR); | ||
356 | |||
357 | if (!ret) | ||
358 | ret = sh_clk_mstp_register(mstp_clks, MSTP_NR); | ||
359 | |||
360 | clkdev_add_table(lookups, ARRAY_SIZE(lookups)); | ||
361 | |||
362 | if (!ret) | ||
363 | shmobile_clk_init(); | ||
364 | else | ||
365 | panic("failed to setup sh7377 clocks\n"); | ||
366 | } | ||
diff --git a/arch/arm/mach-shmobile/include/mach/common.h b/arch/arm/mach-shmobile/include/mach/common.h index d47e215aca87..dfeca79e9e96 100644 --- a/arch/arm/mach-shmobile/include/mach/common.h +++ b/arch/arm/mach-shmobile/include/mach/common.h | |||
@@ -18,24 +18,6 @@ extern int shmobile_enter_wfi(struct cpuidle_device *dev, | |||
18 | struct cpuidle_driver *drv, int index); | 18 | struct cpuidle_driver *drv, int index); |
19 | extern void shmobile_cpuidle_set_driver(struct cpuidle_driver *drv); | 19 | extern void shmobile_cpuidle_set_driver(struct cpuidle_driver *drv); |
20 | 20 | ||
21 | extern void sh7367_init_irq(void); | ||
22 | extern void sh7367_map_io(void); | ||
23 | extern void sh7367_add_early_devices(void); | ||
24 | extern void sh7367_add_standard_devices(void); | ||
25 | extern void sh7367_clock_init(void); | ||
26 | extern void sh7367_pinmux_init(void); | ||
27 | extern struct clk sh7367_extalb1_clk; | ||
28 | extern struct clk sh7367_extal2_clk; | ||
29 | |||
30 | extern void sh7377_init_irq(void); | ||
31 | extern void sh7377_map_io(void); | ||
32 | extern void sh7377_add_early_devices(void); | ||
33 | extern void sh7377_add_standard_devices(void); | ||
34 | extern void sh7377_clock_init(void); | ||
35 | extern void sh7377_pinmux_init(void); | ||
36 | extern struct clk sh7377_extalc1_clk; | ||
37 | extern struct clk sh7377_extal2_clk; | ||
38 | |||
39 | extern void sh7372_init_irq(void); | 21 | extern void sh7372_init_irq(void); |
40 | extern void sh7372_map_io(void); | 22 | extern void sh7372_map_io(void); |
41 | extern void sh7372_add_early_devices(void); | 23 | extern void sh7372_add_early_devices(void); |
diff --git a/arch/arm/mach-shmobile/include/mach/r8a7779.h b/arch/arm/mach-shmobile/include/mach/r8a7779.h index 499f52d2a4a1..8ab0cd6ad6b0 100644 --- a/arch/arm/mach-shmobile/include/mach/r8a7779.h +++ b/arch/arm/mach-shmobile/include/mach/r8a7779.h | |||
@@ -71,7 +71,7 @@ enum { | |||
71 | GPIO_FN_A19, | 71 | GPIO_FN_A19, |
72 | 72 | ||
73 | /* IPSR0 */ | 73 | /* IPSR0 */ |
74 | GPIO_FN_PENC2, GPIO_FN_SCK0, GPIO_FN_PWM1, GPIO_FN_PWMFSW0, | 74 | GPIO_FN_USB_PENC2, GPIO_FN_SCK0, GPIO_FN_PWM1, GPIO_FN_PWMFSW0, |
75 | GPIO_FN_SCIF_CLK, GPIO_FN_TCLK0_C, GPIO_FN_BS, GPIO_FN_SD1_DAT2, | 75 | GPIO_FN_SCIF_CLK, GPIO_FN_TCLK0_C, GPIO_FN_BS, GPIO_FN_SD1_DAT2, |
76 | GPIO_FN_MMC0_D2, GPIO_FN_FD2, GPIO_FN_ATADIR0, GPIO_FN_SDSELF, | 76 | GPIO_FN_MMC0_D2, GPIO_FN_FD2, GPIO_FN_ATADIR0, GPIO_FN_SDSELF, |
77 | GPIO_FN_HCTS1, GPIO_FN_TX4_C, GPIO_FN_A0, GPIO_FN_SD1_DAT3, | 77 | GPIO_FN_HCTS1, GPIO_FN_TX4_C, GPIO_FN_A0, GPIO_FN_SD1_DAT3, |
diff --git a/arch/arm/mach-shmobile/include/mach/sh7367.h b/arch/arm/mach-shmobile/include/mach/sh7367.h deleted file mode 100644 index 52d0de686f68..000000000000 --- a/arch/arm/mach-shmobile/include/mach/sh7367.h +++ /dev/null | |||
@@ -1,332 +0,0 @@ | |||
1 | #ifndef __ASM_SH7367_H__ | ||
2 | #define __ASM_SH7367_H__ | ||
3 | |||
4 | /* Pin Function Controller: | ||
5 | * GPIO_FN_xx - GPIO used to select pin function | ||
6 | * GPIO_PORTxx - GPIO mapped to real I/O pin on CPU | ||
7 | */ | ||
8 | enum { | ||
9 | /* 49-1 -> 49-6 (GPIO) */ | ||
10 | GPIO_PORT0, GPIO_PORT1, GPIO_PORT2, GPIO_PORT3, GPIO_PORT4, | ||
11 | GPIO_PORT5, GPIO_PORT6, GPIO_PORT7, GPIO_PORT8, GPIO_PORT9, | ||
12 | |||
13 | GPIO_PORT10, GPIO_PORT11, GPIO_PORT12, GPIO_PORT13, GPIO_PORT14, | ||
14 | GPIO_PORT15, GPIO_PORT16, GPIO_PORT17, GPIO_PORT18, GPIO_PORT19, | ||
15 | |||
16 | GPIO_PORT20, GPIO_PORT21, GPIO_PORT22, GPIO_PORT23, GPIO_PORT24, | ||
17 | GPIO_PORT25, GPIO_PORT26, GPIO_PORT27, GPIO_PORT28, GPIO_PORT29, | ||
18 | |||
19 | GPIO_PORT30, GPIO_PORT31, GPIO_PORT32, GPIO_PORT33, GPIO_PORT34, | ||
20 | GPIO_PORT35, GPIO_PORT36, GPIO_PORT37, GPIO_PORT38, GPIO_PORT39, | ||
21 | |||
22 | GPIO_PORT40, GPIO_PORT41, GPIO_PORT42, GPIO_PORT43, GPIO_PORT44, | ||
23 | GPIO_PORT45, GPIO_PORT46, GPIO_PORT47, GPIO_PORT48, GPIO_PORT49, | ||
24 | |||
25 | GPIO_PORT50, GPIO_PORT51, GPIO_PORT52, GPIO_PORT53, GPIO_PORT54, | ||
26 | GPIO_PORT55, GPIO_PORT56, GPIO_PORT57, GPIO_PORT58, GPIO_PORT59, | ||
27 | |||
28 | GPIO_PORT60, GPIO_PORT61, GPIO_PORT62, GPIO_PORT63, GPIO_PORT64, | ||
29 | GPIO_PORT65, GPIO_PORT66, GPIO_PORT67, GPIO_PORT68, GPIO_PORT69, | ||
30 | |||
31 | GPIO_PORT70, GPIO_PORT71, GPIO_PORT72, GPIO_PORT73, GPIO_PORT74, | ||
32 | GPIO_PORT75, GPIO_PORT76, GPIO_PORT77, GPIO_PORT78, GPIO_PORT79, | ||
33 | |||
34 | GPIO_PORT80, GPIO_PORT81, GPIO_PORT82, GPIO_PORT83, GPIO_PORT84, | ||
35 | GPIO_PORT85, GPIO_PORT86, GPIO_PORT87, GPIO_PORT88, GPIO_PORT89, | ||
36 | |||
37 | GPIO_PORT90, GPIO_PORT91, GPIO_PORT92, GPIO_PORT93, GPIO_PORT94, | ||
38 | GPIO_PORT95, GPIO_PORT96, GPIO_PORT97, GPIO_PORT98, GPIO_PORT99, | ||
39 | |||
40 | GPIO_PORT100, GPIO_PORT101, GPIO_PORT102, GPIO_PORT103, GPIO_PORT104, | ||
41 | GPIO_PORT105, GPIO_PORT106, GPIO_PORT107, GPIO_PORT108, GPIO_PORT109, | ||
42 | |||
43 | GPIO_PORT110, GPIO_PORT111, GPIO_PORT112, GPIO_PORT113, GPIO_PORT114, | ||
44 | GPIO_PORT115, GPIO_PORT116, GPIO_PORT117, GPIO_PORT118, GPIO_PORT119, | ||
45 | |||
46 | GPIO_PORT120, GPIO_PORT121, GPIO_PORT122, GPIO_PORT123, GPIO_PORT124, | ||
47 | GPIO_PORT125, GPIO_PORT126, GPIO_PORT127, GPIO_PORT128, GPIO_PORT129, | ||
48 | |||
49 | GPIO_PORT130, GPIO_PORT131, GPIO_PORT132, GPIO_PORT133, GPIO_PORT134, | ||
50 | GPIO_PORT135, GPIO_PORT136, GPIO_PORT137, GPIO_PORT138, GPIO_PORT139, | ||
51 | |||
52 | GPIO_PORT140, GPIO_PORT141, GPIO_PORT142, GPIO_PORT143, GPIO_PORT144, | ||
53 | GPIO_PORT145, GPIO_PORT146, GPIO_PORT147, GPIO_PORT148, GPIO_PORT149, | ||
54 | |||
55 | GPIO_PORT150, GPIO_PORT151, GPIO_PORT152, GPIO_PORT153, GPIO_PORT154, | ||
56 | GPIO_PORT155, GPIO_PORT156, GPIO_PORT157, GPIO_PORT158, GPIO_PORT159, | ||
57 | |||
58 | GPIO_PORT160, GPIO_PORT161, GPIO_PORT162, GPIO_PORT163, GPIO_PORT164, | ||
59 | GPIO_PORT165, GPIO_PORT166, GPIO_PORT167, GPIO_PORT168, GPIO_PORT169, | ||
60 | |||
61 | GPIO_PORT170, GPIO_PORT171, GPIO_PORT172, GPIO_PORT173, GPIO_PORT174, | ||
62 | GPIO_PORT175, GPIO_PORT176, GPIO_PORT177, GPIO_PORT178, GPIO_PORT179, | ||
63 | |||
64 | GPIO_PORT180, GPIO_PORT181, GPIO_PORT182, GPIO_PORT183, GPIO_PORT184, | ||
65 | GPIO_PORT185, GPIO_PORT186, GPIO_PORT187, GPIO_PORT188, GPIO_PORT189, | ||
66 | |||
67 | GPIO_PORT190, GPIO_PORT191, GPIO_PORT192, GPIO_PORT193, GPIO_PORT194, | ||
68 | GPIO_PORT195, GPIO_PORT196, GPIO_PORT197, GPIO_PORT198, GPIO_PORT199, | ||
69 | |||
70 | GPIO_PORT200, GPIO_PORT201, GPIO_PORT202, GPIO_PORT203, GPIO_PORT204, | ||
71 | GPIO_PORT205, GPIO_PORT206, GPIO_PORT207, GPIO_PORT208, GPIO_PORT209, | ||
72 | |||
73 | GPIO_PORT210, GPIO_PORT211, GPIO_PORT212, GPIO_PORT213, GPIO_PORT214, | ||
74 | GPIO_PORT215, GPIO_PORT216, GPIO_PORT217, GPIO_PORT218, GPIO_PORT219, | ||
75 | |||
76 | GPIO_PORT220, GPIO_PORT221, GPIO_PORT222, GPIO_PORT223, GPIO_PORT224, | ||
77 | GPIO_PORT225, GPIO_PORT226, GPIO_PORT227, GPIO_PORT228, GPIO_PORT229, | ||
78 | |||
79 | GPIO_PORT230, GPIO_PORT231, GPIO_PORT232, GPIO_PORT233, GPIO_PORT234, | ||
80 | GPIO_PORT235, GPIO_PORT236, GPIO_PORT237, GPIO_PORT238, GPIO_PORT239, | ||
81 | |||
82 | GPIO_PORT240, GPIO_PORT241, GPIO_PORT242, GPIO_PORT243, GPIO_PORT244, | ||
83 | GPIO_PORT245, GPIO_PORT246, GPIO_PORT247, GPIO_PORT248, GPIO_PORT249, | ||
84 | |||
85 | GPIO_PORT250, GPIO_PORT251, GPIO_PORT252, GPIO_PORT253, GPIO_PORT254, | ||
86 | GPIO_PORT255, GPIO_PORT256, GPIO_PORT257, GPIO_PORT258, GPIO_PORT259, | ||
87 | |||
88 | GPIO_PORT260, GPIO_PORT261, GPIO_PORT262, GPIO_PORT263, GPIO_PORT264, | ||
89 | GPIO_PORT265, GPIO_PORT266, GPIO_PORT267, GPIO_PORT268, GPIO_PORT269, | ||
90 | |||
91 | GPIO_PORT270, GPIO_PORT271, GPIO_PORT272, | ||
92 | |||
93 | /* Special Pull-up / Pull-down Functions */ | ||
94 | GPIO_FN_PORT48_KEYIN0_PU, GPIO_FN_PORT49_KEYIN1_PU, | ||
95 | GPIO_FN_PORT50_KEYIN2_PU, GPIO_FN_PORT55_KEYIN3_PU, | ||
96 | GPIO_FN_PORT56_KEYIN4_PU, GPIO_FN_PORT57_KEYIN5_PU, | ||
97 | GPIO_FN_PORT58_KEYIN6_PU, | ||
98 | |||
99 | /* 49-1 (FN) */ | ||
100 | GPIO_FN_VBUS0, GPIO_FN_CPORT0, GPIO_FN_CPORT1, GPIO_FN_CPORT2, | ||
101 | GPIO_FN_CPORT3, GPIO_FN_CPORT4, GPIO_FN_CPORT5, GPIO_FN_CPORT6, | ||
102 | GPIO_FN_CPORT7, GPIO_FN_CPORT8, GPIO_FN_CPORT9, GPIO_FN_CPORT10, | ||
103 | GPIO_FN_CPORT11, GPIO_FN_SIN2, GPIO_FN_CPORT12, GPIO_FN_XCTS2, | ||
104 | GPIO_FN_CPORT13, GPIO_FN_RFSPO4, GPIO_FN_CPORT14, GPIO_FN_RFSPO5, | ||
105 | GPIO_FN_CPORT15, GPIO_FN_CPORT16, GPIO_FN_CPORT17, GPIO_FN_SOUT2, | ||
106 | GPIO_FN_CPORT18, GPIO_FN_XRTS2, GPIO_FN_CPORT19, GPIO_FN_CPORT20, | ||
107 | GPIO_FN_RFSPO6, GPIO_FN_CPORT21, GPIO_FN_STATUS0, GPIO_FN_CPORT22, | ||
108 | GPIO_FN_STATUS1, GPIO_FN_CPORT23, GPIO_FN_STATUS2, GPIO_FN_RFSPO7, | ||
109 | GPIO_FN_MPORT0, GPIO_FN_MPORT1, GPIO_FN_B_SYNLD1, GPIO_FN_B_SYNLD2, | ||
110 | GPIO_FN_XMAINPS, GPIO_FN_XDIVPS, GPIO_FN_XIDRST, GPIO_FN_IDCLK, | ||
111 | GPIO_FN_IDIO, GPIO_FN_SOUT1, GPIO_FN_SCIFA4_TXD, | ||
112 | GPIO_FN_M02_BERDAT, GPIO_FN_SIN1, GPIO_FN_SCIFA4_RXD, GPIO_FN_XWUP, | ||
113 | GPIO_FN_XRTS1, GPIO_FN_SCIFA4_RTS, GPIO_FN_M03_BERCLK, | ||
114 | GPIO_FN_XCTS1, GPIO_FN_SCIFA4_CTS, | ||
115 | |||
116 | /* 49-2 (FN) */ | ||
117 | GPIO_FN_HSU_IQ_AGC6, GPIO_FN_MFG2_IN2, GPIO_FN_MSIOF2_MCK0, | ||
118 | GPIO_FN_HSU_IQ_AGC5, GPIO_FN_MFG2_IN1, GPIO_FN_MSIOF2_MCK1, | ||
119 | GPIO_FN_HSU_IQ_AGC4, GPIO_FN_MSIOF2_RSYNC, | ||
120 | GPIO_FN_HSU_IQ_AGC3, GPIO_FN_MFG2_OUT1, GPIO_FN_MSIOF2_RSCK, | ||
121 | GPIO_FN_HSU_IQ_AGC2, GPIO_FN_PORT42_KEYOUT0, | ||
122 | GPIO_FN_HSU_IQ_AGC1, GPIO_FN_PORT43_KEYOUT1, | ||
123 | GPIO_FN_HSU_IQ_AGC0, GPIO_FN_PORT44_KEYOUT2, | ||
124 | GPIO_FN_HSU_IQ_AGC_ST, GPIO_FN_PORT45_KEYOUT3, | ||
125 | GPIO_FN_HSU_IQ_PDO, GPIO_FN_PORT46_KEYOUT4, | ||
126 | GPIO_FN_HSU_IQ_PYO, GPIO_FN_PORT47_KEYOUT5, | ||
127 | GPIO_FN_HSU_EN_TXMUX_G3MO, GPIO_FN_PORT48_KEYIN0, | ||
128 | GPIO_FN_HSU_I_TXMUX_G3MO, GPIO_FN_PORT49_KEYIN1, | ||
129 | GPIO_FN_HSU_Q_TXMUX_G3MO, GPIO_FN_PORT50_KEYIN2, | ||
130 | GPIO_FN_HSU_SYO, GPIO_FN_PORT51_MSIOF2_TSYNC, | ||
131 | GPIO_FN_HSU_SDO, GPIO_FN_PORT52_MSIOF2_TSCK, | ||
132 | GPIO_FN_HSU_TGTTI_G3MO, GPIO_FN_PORT53_MSIOF2_TXD, | ||
133 | GPIO_FN_B_TIME_STAMP, GPIO_FN_PORT54_MSIOF2_RXD, | ||
134 | GPIO_FN_HSU_SDI, GPIO_FN_PORT55_KEYIN3, | ||
135 | GPIO_FN_HSU_SCO, GPIO_FN_PORT56_KEYIN4, | ||
136 | GPIO_FN_HSU_DREQ, GPIO_FN_PORT57_KEYIN5, | ||
137 | GPIO_FN_HSU_DACK, GPIO_FN_PORT58_KEYIN6, | ||
138 | GPIO_FN_HSU_CLK61M, GPIO_FN_PORT59_MSIOF2_SS1, | ||
139 | GPIO_FN_HSU_XRST, GPIO_FN_PORT60_MSIOF2_SS2, | ||
140 | GPIO_FN_PCMCLKO, GPIO_FN_SYNC8KO, GPIO_FN_DNPCM_A, GPIO_FN_UPPCM_A, | ||
141 | GPIO_FN_XTALB1L, | ||
142 | GPIO_FN_GPS_AGC1, GPIO_FN_SCIFA0_RTS, | ||
143 | GPIO_FN_GPS_AGC2, GPIO_FN_SCIFA0_SCK, | ||
144 | GPIO_FN_GPS_AGC3, GPIO_FN_SCIFA0_TXD, | ||
145 | GPIO_FN_GPS_AGC4, GPIO_FN_SCIFA0_RXD, | ||
146 | GPIO_FN_GPS_PWRD, GPIO_FN_SCIFA0_CTS, | ||
147 | GPIO_FN_GPS_IM, GPIO_FN_GPS_IS, GPIO_FN_GPS_QM, GPIO_FN_GPS_QS, | ||
148 | GPIO_FN_SIUBOMC, GPIO_FN_TPU2TO0, | ||
149 | GPIO_FN_SIUCKB, GPIO_FN_TPU2TO1, | ||
150 | GPIO_FN_SIUBOLR, GPIO_FN_BBIF2_TSYNC, GPIO_FN_TPU2TO2, | ||
151 | GPIO_FN_SIUBOBT, GPIO_FN_BBIF2_TSCK, GPIO_FN_TPU2TO3, | ||
152 | GPIO_FN_SIUBOSLD, GPIO_FN_BBIF2_TXD, GPIO_FN_TPU3TO0, | ||
153 | GPIO_FN_SIUBILR, GPIO_FN_TPU3TO1, | ||
154 | GPIO_FN_SIUBIBT, GPIO_FN_TPU3TO2, | ||
155 | GPIO_FN_SIUBISLD, GPIO_FN_TPU3TO3, | ||
156 | GPIO_FN_NMI, GPIO_FN_TPU4TO0, | ||
157 | GPIO_FN_DNPCM_M, GPIO_FN_TPU4TO1, GPIO_FN_TPU4TO2, GPIO_FN_TPU4TO3, | ||
158 | GPIO_FN_IRQ_TMPB, | ||
159 | GPIO_FN_PWEN, GPIO_FN_MFG1_OUT1, | ||
160 | GPIO_FN_OVCN, GPIO_FN_MFG1_IN1, | ||
161 | GPIO_FN_OVCN2, GPIO_FN_MFG1_IN2, | ||
162 | |||
163 | /* 49-3 (FN) */ | ||
164 | GPIO_FN_RFSPO1, GPIO_FN_RFSPO2, GPIO_FN_RFSPO3, GPIO_FN_PORT93_VIO_CKO2, | ||
165 | GPIO_FN_USBTERM, GPIO_FN_EXTLP, GPIO_FN_IDIN, | ||
166 | GPIO_FN_SCIFA5_CTS, GPIO_FN_MFG0_IN1, | ||
167 | GPIO_FN_SCIFA5_RTS, GPIO_FN_MFG0_IN2, | ||
168 | GPIO_FN_SCIFA5_RXD, | ||
169 | GPIO_FN_SCIFA5_TXD, | ||
170 | GPIO_FN_SCIFA5_SCK, GPIO_FN_MFG0_OUT1, | ||
171 | GPIO_FN_A0_EA0, GPIO_FN_BS, | ||
172 | GPIO_FN_A14_EA14, GPIO_FN_PORT102_KEYOUT0, | ||
173 | GPIO_FN_A15_EA15, GPIO_FN_PORT103_KEYOUT1, GPIO_FN_DV_CLKOL, | ||
174 | GPIO_FN_A16_EA16, GPIO_FN_PORT104_KEYOUT2, | ||
175 | GPIO_FN_DV_VSYNCL, GPIO_FN_MSIOF0_SS1, | ||
176 | GPIO_FN_A17_EA17, GPIO_FN_PORT105_KEYOUT3, | ||
177 | GPIO_FN_DV_HSYNCL, GPIO_FN_MSIOF0_TSYNC, | ||
178 | GPIO_FN_A18_EA18, GPIO_FN_PORT106_KEYOUT4, | ||
179 | GPIO_FN_DV_DL0, GPIO_FN_MSIOF0_TSCK, | ||
180 | GPIO_FN_A19_EA19, GPIO_FN_PORT107_KEYOUT5, | ||
181 | GPIO_FN_DV_DL1, GPIO_FN_MSIOF0_TXD, | ||
182 | GPIO_FN_A20_EA20, GPIO_FN_PORT108_KEYIN0, | ||
183 | GPIO_FN_DV_DL2, GPIO_FN_MSIOF0_RSCK, | ||
184 | GPIO_FN_A21_EA21, GPIO_FN_PORT109_KEYIN1, | ||
185 | GPIO_FN_DV_DL3, GPIO_FN_MSIOF0_RSYNC, | ||
186 | GPIO_FN_A22_EA22, GPIO_FN_PORT110_KEYIN2, | ||
187 | GPIO_FN_DV_DL4, GPIO_FN_MSIOF0_MCK0, | ||
188 | GPIO_FN_A23_EA23, GPIO_FN_PORT111_KEYIN3, | ||
189 | GPIO_FN_DV_DL5, GPIO_FN_MSIOF0_MCK1, | ||
190 | GPIO_FN_A24_EA24, GPIO_FN_PORT112_KEYIN4, | ||
191 | GPIO_FN_DV_DL6, GPIO_FN_MSIOF0_RXD, | ||
192 | GPIO_FN_A25_EA25, GPIO_FN_PORT113_KEYIN5, | ||
193 | GPIO_FN_DV_DL7, GPIO_FN_MSIOF0_SS2, | ||
194 | GPIO_FN_A26, GPIO_FN_PORT113_KEYIN6, GPIO_FN_DV_CLKIL, | ||
195 | GPIO_FN_D0_ED0_NAF0, GPIO_FN_D1_ED1_NAF1, GPIO_FN_D2_ED2_NAF2, | ||
196 | GPIO_FN_D3_ED3_NAF3, GPIO_FN_D4_ED4_NAF4, GPIO_FN_D5_ED5_NAF5, | ||
197 | GPIO_FN_D6_ED6_NAF6, GPIO_FN_D7_ED7_NAF7, GPIO_FN_D8_ED8_NAF8, | ||
198 | GPIO_FN_D9_ED9_NAF9, GPIO_FN_D10_ED10_NAF10, GPIO_FN_D11_ED11_NAF11, | ||
199 | GPIO_FN_D12_ED12_NAF12, GPIO_FN_D13_ED13_NAF13, | ||
200 | GPIO_FN_D14_ED14_NAF14, GPIO_FN_D15_ED15_NAF15, | ||
201 | GPIO_FN_CS4, GPIO_FN_CS5A, GPIO_FN_CS5B, GPIO_FN_FCE1, | ||
202 | GPIO_FN_CS6B, GPIO_FN_XCS2, GPIO_FN_FCE0, GPIO_FN_CS6A, | ||
203 | GPIO_FN_DACK0, GPIO_FN_WAIT, GPIO_FN_DREQ0, GPIO_FN_RD_XRD, | ||
204 | GPIO_FN_A27, GPIO_FN_RDWR_XWE, GPIO_FN_WE0_XWR0_FWE, | ||
205 | GPIO_FN_WE1_XWR1, GPIO_FN_FRB, GPIO_FN_CKO, | ||
206 | GPIO_FN_NBRSTOUT, GPIO_FN_NBRST, | ||
207 | |||
208 | /* 49-4 (FN) */ | ||
209 | GPIO_FN_RFSPO0, GPIO_FN_PORT146_VIO_CKO2, GPIO_FN_TSTMD, | ||
210 | GPIO_FN_VIO_VD, GPIO_FN_VIO_HD, | ||
211 | GPIO_FN_VIO_D0, GPIO_FN_VIO_D1, GPIO_FN_VIO_D2, | ||
212 | GPIO_FN_VIO_D3, GPIO_FN_VIO_D4, GPIO_FN_VIO_D5, | ||
213 | GPIO_FN_VIO_D6, GPIO_FN_VIO_D7, GPIO_FN_VIO_D8, | ||
214 | GPIO_FN_VIO_D9, GPIO_FN_VIO_D10, GPIO_FN_VIO_D11, | ||
215 | GPIO_FN_VIO_D12, GPIO_FN_VIO_D13, GPIO_FN_VIO_D14, | ||
216 | GPIO_FN_VIO_D15, GPIO_FN_VIO_CLK, GPIO_FN_VIO_FIELD, | ||
217 | GPIO_FN_VIO_CKO, | ||
218 | GPIO_FN_MFG3_IN1, GPIO_FN_MFG3_IN2, | ||
219 | GPIO_FN_M9_SLCD_A01, GPIO_FN_MFG3_OUT1, GPIO_FN_TPU0TO0, | ||
220 | GPIO_FN_M10_SLCD_CK1, GPIO_FN_MFG4_IN1, GPIO_FN_TPU0TO1, | ||
221 | GPIO_FN_M11_SLCD_SO1, GPIO_FN_MFG4_IN2, GPIO_FN_TPU0TO2, | ||
222 | GPIO_FN_M12_SLCD_CE1, GPIO_FN_MFG4_OUT1, GPIO_FN_TPU0TO3, | ||
223 | GPIO_FN_LCDD0, GPIO_FN_PORT175_KEYOUT0, GPIO_FN_DV_D0, | ||
224 | GPIO_FN_SIUCKA, GPIO_FN_MFG0_OUT2, | ||
225 | GPIO_FN_LCDD1, GPIO_FN_PORT176_KEYOUT1, GPIO_FN_DV_D1, | ||
226 | GPIO_FN_SIUAOLR, GPIO_FN_BBIF2_TSYNC1, | ||
227 | GPIO_FN_LCDD2, GPIO_FN_PORT177_KEYOUT2, GPIO_FN_DV_D2, | ||
228 | GPIO_FN_SIUAOBT, GPIO_FN_BBIF2_TSCK1, | ||
229 | GPIO_FN_LCDD3, GPIO_FN_PORT178_KEYOUT3, GPIO_FN_DV_D3, | ||
230 | GPIO_FN_SIUAOSLD, GPIO_FN_BBIF2_TXD1, | ||
231 | GPIO_FN_LCDD4, GPIO_FN_PORT179_KEYOUT4, GPIO_FN_DV_D4, | ||
232 | GPIO_FN_SIUAISPD, GPIO_FN_MFG1_OUT2, | ||
233 | GPIO_FN_LCDD5, GPIO_FN_PORT180_KEYOUT5, GPIO_FN_DV_D5, | ||
234 | GPIO_FN_SIUAILR, GPIO_FN_MFG2_OUT2, | ||
235 | GPIO_FN_LCDD6, GPIO_FN_DV_D6, | ||
236 | GPIO_FN_SIUAIBT, GPIO_FN_MFG3_OUT2, GPIO_FN_XWR2, | ||
237 | GPIO_FN_LCDD7, GPIO_FN_DV_D7, | ||
238 | GPIO_FN_SIUAISLD, GPIO_FN_MFG4_OUT2, GPIO_FN_XWR3, | ||
239 | GPIO_FN_LCDD8, GPIO_FN_DV_D8, GPIO_FN_D16, GPIO_FN_ED16, | ||
240 | GPIO_FN_LCDD9, GPIO_FN_DV_D9, GPIO_FN_D17, GPIO_FN_ED17, | ||
241 | GPIO_FN_LCDD10, GPIO_FN_DV_D10, GPIO_FN_D18, GPIO_FN_ED18, | ||
242 | GPIO_FN_LCDD11, GPIO_FN_DV_D11, GPIO_FN_D19, GPIO_FN_ED19, | ||
243 | GPIO_FN_LCDD12, GPIO_FN_DV_D12, GPIO_FN_D20, GPIO_FN_ED20, | ||
244 | GPIO_FN_LCDD13, GPIO_FN_DV_D13, GPIO_FN_D21, GPIO_FN_ED21, | ||
245 | GPIO_FN_LCDD14, GPIO_FN_DV_D14, GPIO_FN_D22, GPIO_FN_ED22, | ||
246 | GPIO_FN_LCDD15, GPIO_FN_DV_D15, GPIO_FN_D23, GPIO_FN_ED23, | ||
247 | GPIO_FN_LCDD16, GPIO_FN_DV_HSYNC, GPIO_FN_D24, GPIO_FN_ED24, | ||
248 | GPIO_FN_LCDD17, GPIO_FN_DV_VSYNC, GPIO_FN_D25, GPIO_FN_ED25, | ||
249 | GPIO_FN_LCDD18, GPIO_FN_DREQ2, GPIO_FN_MSIOF0L_TSCK, | ||
250 | GPIO_FN_D26, GPIO_FN_ED26, | ||
251 | GPIO_FN_LCDD19, GPIO_FN_MSIOF0L_TSYNC, | ||
252 | GPIO_FN_D27, GPIO_FN_ED27, | ||
253 | GPIO_FN_LCDD20, GPIO_FN_TS_SPSYNC1, GPIO_FN_MSIOF0L_MCK0, | ||
254 | GPIO_FN_D28, GPIO_FN_ED28, | ||
255 | GPIO_FN_LCDD21, GPIO_FN_TS_SDAT1, GPIO_FN_MSIOF0L_MCK1, | ||
256 | GPIO_FN_D29, GPIO_FN_ED29, | ||
257 | GPIO_FN_LCDD22, GPIO_FN_TS_SDEN1, GPIO_FN_MSIOF0L_SS1, | ||
258 | GPIO_FN_D30, GPIO_FN_ED30, | ||
259 | GPIO_FN_LCDD23, GPIO_FN_TS_SCK1, GPIO_FN_MSIOF0L_SS2, | ||
260 | GPIO_FN_D31, GPIO_FN_ED31, | ||
261 | GPIO_FN_LCDDCK, GPIO_FN_LCDWR, GPIO_FN_DV_CKO, GPIO_FN_SIUAOSPD, | ||
262 | GPIO_FN_LCDRD, GPIO_FN_DACK2, GPIO_FN_MSIOF0L_RSYNC, | ||
263 | |||
264 | |||
265 | /* 49-5 (FN) */ | ||
266 | GPIO_FN_LCDHSYN, GPIO_FN_LCDCS, GPIO_FN_LCDCS2, GPIO_FN_DACK3, | ||
267 | GPIO_FN_LCDDISP, GPIO_FN_LCDRS, GPIO_FN_DREQ3, GPIO_FN_MSIOF0L_RSCK, | ||
268 | GPIO_FN_LCDCSYN, GPIO_FN_LCDCSYN2, GPIO_FN_DV_CKI, | ||
269 | GPIO_FN_LCDLCLK, GPIO_FN_DREQ1, GPIO_FN_MSIOF0L_RXD, | ||
270 | GPIO_FN_LCDDON, GPIO_FN_LCDDON2, GPIO_FN_DACK1, GPIO_FN_MSIOF0L_TXD, | ||
271 | GPIO_FN_VIO_DR0, GPIO_FN_VIO_DR1, GPIO_FN_VIO_DR2, GPIO_FN_VIO_DR3, | ||
272 | GPIO_FN_VIO_DR4, GPIO_FN_VIO_DR5, GPIO_FN_VIO_DR6, GPIO_FN_VIO_DR7, | ||
273 | GPIO_FN_VIO_VDR, GPIO_FN_VIO_HDR, | ||
274 | GPIO_FN_VIO_CLKR, GPIO_FN_VIO_CKOR, | ||
275 | GPIO_FN_SCIFA1_TXD, GPIO_FN_GPS_PGFA0, | ||
276 | GPIO_FN_SCIFA1_SCK, GPIO_FN_GPS_PGFA1, | ||
277 | GPIO_FN_SCIFA1_RTS, GPIO_FN_GPS_EPPSINMON, | ||
278 | GPIO_FN_SCIFA1_RXD, GPIO_FN_SCIFA1_CTS, | ||
279 | GPIO_FN_MSIOF1_TXD, GPIO_FN_SCIFA1_TXD2, GPIO_FN_GPS_TXD, | ||
280 | GPIO_FN_MSIOF1_TSYNC, GPIO_FN_SCIFA1_CTS2, GPIO_FN_I2C_SDA2, | ||
281 | GPIO_FN_MSIOF1_TSCK, GPIO_FN_SCIFA1_SCK2, | ||
282 | GPIO_FN_MSIOF1_RXD, GPIO_FN_SCIFA1_RXD2, GPIO_FN_GPS_RXD, | ||
283 | GPIO_FN_MSIOF1_RSCK, GPIO_FN_SCIFA1_RTS2, | ||
284 | GPIO_FN_MSIOF1_RSYNC, GPIO_FN_I2C_SCL2, | ||
285 | GPIO_FN_MSIOF1_MCK0, GPIO_FN_MSIOF1_MCK1, | ||
286 | GPIO_FN_MSIOF1_SS1, GPIO_FN_EDBGREQ3, | ||
287 | GPIO_FN_MSIOF1_SS2, | ||
288 | GPIO_FN_PORT236_IROUT, GPIO_FN_IRDA_OUT, | ||
289 | GPIO_FN_IRDA_IN, GPIO_FN_IRDA_FIRSEL, | ||
290 | GPIO_FN_TPU1TO0, GPIO_FN_TS_SPSYNC3, | ||
291 | GPIO_FN_TPU1TO1, GPIO_FN_TS_SDAT3, | ||
292 | GPIO_FN_TPU1TO2, GPIO_FN_TS_SDEN3, GPIO_FN_PORT241_MSIOF2_SS1, | ||
293 | GPIO_FN_TPU1TO3, GPIO_FN_PORT242_MSIOF2_TSCK, | ||
294 | GPIO_FN_M13_BSW, GPIO_FN_PORT243_MSIOF2_TSYNC, | ||
295 | GPIO_FN_M14_GSW, GPIO_FN_PORT244_MSIOF2_TXD, | ||
296 | GPIO_FN_PORT245_IROUT, GPIO_FN_M15_RSW, | ||
297 | GPIO_FN_SOUT3, GPIO_FN_SCIFA2_TXD1, | ||
298 | GPIO_FN_SIN3, GPIO_FN_SCIFA2_RXD1, | ||
299 | GPIO_FN_XRTS3, GPIO_FN_SCIFA2_RTS1, GPIO_FN_PORT248_MSIOF2_SS2, | ||
300 | GPIO_FN_XCTS3, GPIO_FN_SCIFA2_CTS1, GPIO_FN_PORT249_MSIOF2_RXD, | ||
301 | GPIO_FN_DINT, GPIO_FN_SCIFA2_SCK1, GPIO_FN_TS_SCK3, | ||
302 | GPIO_FN_SDHICLK0, GPIO_FN_TCK2, | ||
303 | GPIO_FN_SDHICD0, | ||
304 | GPIO_FN_SDHID0_0, GPIO_FN_TMS2, | ||
305 | GPIO_FN_SDHID0_1, GPIO_FN_TDO2, | ||
306 | GPIO_FN_SDHID0_2, GPIO_FN_TDI2, | ||
307 | GPIO_FN_SDHID0_3, GPIO_FN_RTCK2, | ||
308 | |||
309 | /* 49-6 (FN) */ | ||
310 | GPIO_FN_SDHICMD0, GPIO_FN_TRST2, | ||
311 | GPIO_FN_SDHIWP0, GPIO_FN_EDBGREQ2, | ||
312 | GPIO_FN_SDHICLK1, GPIO_FN_TCK3, | ||
313 | GPIO_FN_SDHID1_0, GPIO_FN_M11_SLCD_SO2, | ||
314 | GPIO_FN_TS_SPSYNC2, GPIO_FN_TMS3, | ||
315 | GPIO_FN_SDHID1_1, GPIO_FN_M9_SLCD_AO2, | ||
316 | GPIO_FN_TS_SDAT2, GPIO_FN_TDO3, | ||
317 | GPIO_FN_SDHID1_2, GPIO_FN_M10_SLCD_CK2, | ||
318 | GPIO_FN_TS_SDEN2, GPIO_FN_TDI3, | ||
319 | GPIO_FN_SDHID1_3, GPIO_FN_M12_SLCD_CE2, | ||
320 | GPIO_FN_TS_SCK2, GPIO_FN_RTCK3, | ||
321 | GPIO_FN_SDHICMD1, GPIO_FN_TRST3, | ||
322 | GPIO_FN_SDHICLK2, GPIO_FN_SCIFB_SCK, | ||
323 | GPIO_FN_SDHID2_0, GPIO_FN_SCIFB_TXD, | ||
324 | GPIO_FN_SDHID2_1, GPIO_FN_SCIFB_CTS, | ||
325 | GPIO_FN_SDHID2_2, GPIO_FN_SCIFB_RXD, | ||
326 | GPIO_FN_SDHID2_3, GPIO_FN_SCIFB_RTS, | ||
327 | GPIO_FN_SDHICMD2, | ||
328 | GPIO_FN_RESETOUTS, | ||
329 | GPIO_FN_DIVLOCK, | ||
330 | }; | ||
331 | |||
332 | #endif /* __ASM_SH7367_H__ */ | ||
diff --git a/arch/arm/mach-shmobile/include/mach/sh7372.h b/arch/arm/mach-shmobile/include/mach/sh7372.h index eb98b45c5089..26cd1016fad8 100644 --- a/arch/arm/mach-shmobile/include/mach/sh7372.h +++ b/arch/arm/mach-shmobile/include/mach/sh7372.h | |||
@@ -452,6 +452,10 @@ enum { | |||
452 | SHDMA_SLAVE_SCIF5_RX, | 452 | SHDMA_SLAVE_SCIF5_RX, |
453 | SHDMA_SLAVE_SCIF6_TX, | 453 | SHDMA_SLAVE_SCIF6_TX, |
454 | SHDMA_SLAVE_SCIF6_RX, | 454 | SHDMA_SLAVE_SCIF6_RX, |
455 | SHDMA_SLAVE_FLCTL0_TX, | ||
456 | SHDMA_SLAVE_FLCTL0_RX, | ||
457 | SHDMA_SLAVE_FLCTL1_TX, | ||
458 | SHDMA_SLAVE_FLCTL1_RX, | ||
455 | SHDMA_SLAVE_SDHI0_RX, | 459 | SHDMA_SLAVE_SDHI0_RX, |
456 | SHDMA_SLAVE_SDHI0_TX, | 460 | SHDMA_SLAVE_SDHI0_TX, |
457 | SHDMA_SLAVE_SDHI1_RX, | 461 | SHDMA_SLAVE_SDHI1_RX, |
@@ -475,8 +479,6 @@ extern struct clk sh7372_dv_clki_div2_clk; | |||
475 | extern struct clk sh7372_pllc2_clk; | 479 | extern struct clk sh7372_pllc2_clk; |
476 | extern struct clk sh7372_fsiack_clk; | 480 | extern struct clk sh7372_fsiack_clk; |
477 | extern struct clk sh7372_fsibck_clk; | 481 | extern struct clk sh7372_fsibck_clk; |
478 | extern struct clk sh7372_fsidiva_clk; | ||
479 | extern struct clk sh7372_fsidivb_clk; | ||
480 | 482 | ||
481 | extern void sh7372_intcs_suspend(void); | 483 | extern void sh7372_intcs_suspend(void); |
482 | extern void sh7372_intcs_resume(void); | 484 | extern void sh7372_intcs_resume(void); |
diff --git a/arch/arm/mach-shmobile/include/mach/sh7377.h b/arch/arm/mach-shmobile/include/mach/sh7377.h deleted file mode 100644 index f580e227dd1c..000000000000 --- a/arch/arm/mach-shmobile/include/mach/sh7377.h +++ /dev/null | |||
@@ -1,360 +0,0 @@ | |||
1 | #ifndef __ASM_SH7377_H__ | ||
2 | #define __ASM_SH7377_H__ | ||
3 | |||
4 | /* Pin Function Controller: | ||
5 | * GPIO_FN_xx - GPIO used to select pin function | ||
6 | * GPIO_PORTxx - GPIO mapped to real I/O pin on CPU | ||
7 | */ | ||
8 | enum { | ||
9 | /* 55-1 -> 55-5 (GPIO) */ | ||
10 | GPIO_PORT0, GPIO_PORT1, GPIO_PORT2, GPIO_PORT3, GPIO_PORT4, | ||
11 | GPIO_PORT5, GPIO_PORT6, GPIO_PORT7, GPIO_PORT8, GPIO_PORT9, | ||
12 | |||
13 | GPIO_PORT10, GPIO_PORT11, GPIO_PORT12, GPIO_PORT13, GPIO_PORT14, | ||
14 | GPIO_PORT15, GPIO_PORT16, GPIO_PORT17, GPIO_PORT18, GPIO_PORT19, | ||
15 | |||
16 | GPIO_PORT20, GPIO_PORT21, GPIO_PORT22, GPIO_PORT23, GPIO_PORT24, | ||
17 | GPIO_PORT25, GPIO_PORT26, GPIO_PORT27, GPIO_PORT28, GPIO_PORT29, | ||
18 | |||
19 | GPIO_PORT30, GPIO_PORT31, GPIO_PORT32, GPIO_PORT33, GPIO_PORT34, | ||
20 | GPIO_PORT35, GPIO_PORT36, GPIO_PORT37, GPIO_PORT38, GPIO_PORT39, | ||
21 | |||
22 | GPIO_PORT40, GPIO_PORT41, GPIO_PORT42, GPIO_PORT43, GPIO_PORT44, | ||
23 | GPIO_PORT45, GPIO_PORT46, GPIO_PORT47, GPIO_PORT48, GPIO_PORT49, | ||
24 | |||
25 | GPIO_PORT50, GPIO_PORT51, GPIO_PORT52, GPIO_PORT53, GPIO_PORT54, | ||
26 | GPIO_PORT55, GPIO_PORT56, GPIO_PORT57, GPIO_PORT58, GPIO_PORT59, | ||
27 | |||
28 | GPIO_PORT60, GPIO_PORT61, GPIO_PORT62, GPIO_PORT63, GPIO_PORT64, | ||
29 | GPIO_PORT65, GPIO_PORT66, GPIO_PORT67, GPIO_PORT68, GPIO_PORT69, | ||
30 | |||
31 | GPIO_PORT70, GPIO_PORT71, GPIO_PORT72, GPIO_PORT73, GPIO_PORT74, | ||
32 | GPIO_PORT75, GPIO_PORT76, GPIO_PORT77, GPIO_PORT78, GPIO_PORT79, | ||
33 | |||
34 | GPIO_PORT80, GPIO_PORT81, GPIO_PORT82, GPIO_PORT83, GPIO_PORT84, | ||
35 | GPIO_PORT85, GPIO_PORT86, GPIO_PORT87, GPIO_PORT88, GPIO_PORT89, | ||
36 | |||
37 | GPIO_PORT90, GPIO_PORT91, GPIO_PORT92, GPIO_PORT93, GPIO_PORT94, | ||
38 | GPIO_PORT95, GPIO_PORT96, GPIO_PORT97, GPIO_PORT98, GPIO_PORT99, | ||
39 | |||
40 | GPIO_PORT100, GPIO_PORT101, GPIO_PORT102, GPIO_PORT103, GPIO_PORT104, | ||
41 | GPIO_PORT105, GPIO_PORT106, GPIO_PORT107, GPIO_PORT108, GPIO_PORT109, | ||
42 | |||
43 | GPIO_PORT110, GPIO_PORT111, GPIO_PORT112, GPIO_PORT113, GPIO_PORT114, | ||
44 | GPIO_PORT115, GPIO_PORT116, GPIO_PORT117, GPIO_PORT118, | ||
45 | |||
46 | GPIO_PORT128, GPIO_PORT129, | ||
47 | |||
48 | GPIO_PORT130, GPIO_PORT131, GPIO_PORT132, GPIO_PORT133, GPIO_PORT134, | ||
49 | GPIO_PORT135, GPIO_PORT136, GPIO_PORT137, GPIO_PORT138, GPIO_PORT139, | ||
50 | |||
51 | GPIO_PORT140, GPIO_PORT141, GPIO_PORT142, GPIO_PORT143, GPIO_PORT144, | ||
52 | GPIO_PORT145, GPIO_PORT146, GPIO_PORT147, GPIO_PORT148, GPIO_PORT149, | ||
53 | |||
54 | GPIO_PORT150, GPIO_PORT151, GPIO_PORT152, GPIO_PORT153, GPIO_PORT154, | ||
55 | GPIO_PORT155, GPIO_PORT156, GPIO_PORT157, GPIO_PORT158, GPIO_PORT159, | ||
56 | |||
57 | GPIO_PORT160, GPIO_PORT161, GPIO_PORT162, GPIO_PORT163, GPIO_PORT164, | ||
58 | |||
59 | GPIO_PORT192, GPIO_PORT193, GPIO_PORT194, | ||
60 | GPIO_PORT195, GPIO_PORT196, GPIO_PORT197, GPIO_PORT198, GPIO_PORT199, | ||
61 | |||
62 | GPIO_PORT200, GPIO_PORT201, GPIO_PORT202, GPIO_PORT203, GPIO_PORT204, | ||
63 | GPIO_PORT205, GPIO_PORT206, GPIO_PORT207, GPIO_PORT208, GPIO_PORT209, | ||
64 | |||
65 | GPIO_PORT210, GPIO_PORT211, GPIO_PORT212, GPIO_PORT213, GPIO_PORT214, | ||
66 | GPIO_PORT215, GPIO_PORT216, GPIO_PORT217, GPIO_PORT218, GPIO_PORT219, | ||
67 | |||
68 | GPIO_PORT220, GPIO_PORT221, GPIO_PORT222, GPIO_PORT223, GPIO_PORT224, | ||
69 | GPIO_PORT225, GPIO_PORT226, GPIO_PORT227, GPIO_PORT228, GPIO_PORT229, | ||
70 | |||
71 | GPIO_PORT230, GPIO_PORT231, GPIO_PORT232, GPIO_PORT233, GPIO_PORT234, | ||
72 | GPIO_PORT235, GPIO_PORT236, GPIO_PORT237, GPIO_PORT238, GPIO_PORT239, | ||
73 | |||
74 | GPIO_PORT240, GPIO_PORT241, GPIO_PORT242, GPIO_PORT243, GPIO_PORT244, | ||
75 | GPIO_PORT245, GPIO_PORT246, GPIO_PORT247, GPIO_PORT248, GPIO_PORT249, | ||
76 | |||
77 | GPIO_PORT250, GPIO_PORT251, GPIO_PORT252, GPIO_PORT253, GPIO_PORT254, | ||
78 | GPIO_PORT255, GPIO_PORT256, GPIO_PORT257, GPIO_PORT258, GPIO_PORT259, | ||
79 | |||
80 | GPIO_PORT260, GPIO_PORT261, GPIO_PORT262, GPIO_PORT263, GPIO_PORT264, | ||
81 | |||
82 | /* Special Pull-up / Pull-down Functions */ | ||
83 | GPIO_FN_PORT66_KEYIN0_PU, GPIO_FN_PORT67_KEYIN1_PU, | ||
84 | GPIO_FN_PORT68_KEYIN2_PU, GPIO_FN_PORT69_KEYIN3_PU, | ||
85 | GPIO_FN_PORT70_KEYIN4_PU, GPIO_FN_PORT71_KEYIN5_PU, | ||
86 | GPIO_FN_PORT72_KEYIN6_PU, | ||
87 | |||
88 | /* 55-1 (FN) */ | ||
89 | GPIO_FN_VBUS_0, | ||
90 | GPIO_FN_CPORT0, | ||
91 | GPIO_FN_CPORT1, | ||
92 | GPIO_FN_CPORT2, | ||
93 | GPIO_FN_CPORT3, | ||
94 | GPIO_FN_CPORT4, | ||
95 | GPIO_FN_CPORT5, | ||
96 | GPIO_FN_CPORT6, | ||
97 | GPIO_FN_CPORT7, | ||
98 | GPIO_FN_CPORT8, | ||
99 | GPIO_FN_CPORT9, | ||
100 | GPIO_FN_CPORT10, | ||
101 | GPIO_FN_CPORT11, GPIO_FN_SIN2, | ||
102 | GPIO_FN_CPORT12, GPIO_FN_XCTS2, | ||
103 | GPIO_FN_CPORT13, GPIO_FN_RFSPO4, | ||
104 | GPIO_FN_CPORT14, GPIO_FN_RFSPO5, | ||
105 | GPIO_FN_CPORT15, GPIO_FN_SCIFA0_SCK, GPIO_FN_GPS_AGC2, | ||
106 | GPIO_FN_CPORT16, GPIO_FN_SCIFA0_TXD, GPIO_FN_GPS_AGC3, | ||
107 | GPIO_FN_CPORT17_IC_OE, GPIO_FN_SOUT2, | ||
108 | GPIO_FN_CPORT18, GPIO_FN_XRTS2, GPIO_FN_PORT19_VIO_CKO2, | ||
109 | GPIO_FN_CPORT19_MPORT1, | ||
110 | GPIO_FN_CPORT20, GPIO_FN_RFSPO6, | ||
111 | GPIO_FN_CPORT21, GPIO_FN_STATUS0, | ||
112 | GPIO_FN_CPORT22, GPIO_FN_STATUS1, | ||
113 | GPIO_FN_CPORT23, GPIO_FN_STATUS2, GPIO_FN_RFSPO7, | ||
114 | GPIO_FN_B_SYNLD1, | ||
115 | GPIO_FN_B_SYNLD2, GPIO_FN_SYSENMSK, | ||
116 | GPIO_FN_XMAINPS, | ||
117 | GPIO_FN_XDIVPS, | ||
118 | GPIO_FN_XIDRST, | ||
119 | GPIO_FN_IDCLK, GPIO_FN_IC_DP, | ||
120 | GPIO_FN_IDIO, GPIO_FN_IC_DM, | ||
121 | GPIO_FN_SOUT1, GPIO_FN_SCIFA4_TXD, GPIO_FN_M02_BERDAT, | ||
122 | GPIO_FN_SIN1, GPIO_FN_SCIFA4_RXD, GPIO_FN_XWUP, | ||
123 | GPIO_FN_XRTS1, GPIO_FN_SCIFA4_RTS, GPIO_FN_M03_BERCLK, | ||
124 | GPIO_FN_XCTS1, GPIO_FN_SCIFA4_CTS, | ||
125 | GPIO_FN_PCMCLKO, | ||
126 | GPIO_FN_SYNC8KO, | ||
127 | |||
128 | /* 55-2 (FN) */ | ||
129 | GPIO_FN_DNPCM_A, | ||
130 | GPIO_FN_UPPCM_A, | ||
131 | GPIO_FN_VACK, | ||
132 | GPIO_FN_XTALB1L, | ||
133 | GPIO_FN_GPS_AGC1, GPIO_FN_SCIFA0_RTS, | ||
134 | GPIO_FN_GPS_AGC4, GPIO_FN_SCIFA0_RXD, | ||
135 | GPIO_FN_GPS_PWRDOWN, GPIO_FN_SCIFA0_CTS, | ||
136 | GPIO_FN_GPS_IM, | ||
137 | GPIO_FN_GPS_IS, | ||
138 | GPIO_FN_GPS_QM, | ||
139 | GPIO_FN_GPS_QS, | ||
140 | GPIO_FN_FMSOCK, GPIO_FN_PORT49_IRDA_OUT, GPIO_FN_PORT49_IROUT, | ||
141 | GPIO_FN_FMSOOLR, GPIO_FN_BBIF2_TSYNC2, GPIO_FN_TPU2TO2, GPIO_FN_IPORT3, | ||
142 | GPIO_FN_FMSIOLR, | ||
143 | GPIO_FN_FMSOOBT, GPIO_FN_BBIF2_TSCK2, GPIO_FN_TPU2TO3, GPIO_FN_OPORT1, | ||
144 | GPIO_FN_FMSIOBT, | ||
145 | GPIO_FN_FMSOSLD, GPIO_FN_BBIF2_TXD2, GPIO_FN_OPORT2, | ||
146 | GPIO_FN_FMSOILR, GPIO_FN_PORT53_IRDA_IN, GPIO_FN_TPU3TO3, | ||
147 | GPIO_FN_OPORT3, GPIO_FN_FMSIILR, | ||
148 | GPIO_FN_FMSOIBT, GPIO_FN_PORT54_IRDA_FIRSEL, GPIO_FN_TPU3TO2, | ||
149 | GPIO_FN_FMSIIBT, | ||
150 | GPIO_FN_FMSISLD, GPIO_FN_MFG0_OUT1, GPIO_FN_TPU0TO0, | ||
151 | GPIO_FN_A0_EA0, GPIO_FN_BS, | ||
152 | GPIO_FN_A12_EA12, GPIO_FN_PORT58_VIO_CKOR, GPIO_FN_TPU4TO2, | ||
153 | GPIO_FN_A13_EA13, GPIO_FN_PORT59_IROUT, GPIO_FN_MFG0_OUT2, | ||
154 | GPIO_FN_TPU0TO1, | ||
155 | GPIO_FN_A14_EA14, GPIO_FN_PORT60_KEYOUT5, | ||
156 | GPIO_FN_A15_EA15, GPIO_FN_PORT61_KEYOUT4, | ||
157 | GPIO_FN_A16_EA16, GPIO_FN_PORT62_KEYOUT3, GPIO_FN_MSIOF0_SS1, | ||
158 | GPIO_FN_A17_EA17, GPIO_FN_PORT63_KEYOUT2, GPIO_FN_MSIOF0_TSYNC, | ||
159 | GPIO_FN_A18_EA18, GPIO_FN_PORT64_KEYOUT1, GPIO_FN_MSIOF0_TSCK, | ||
160 | GPIO_FN_A19_EA19, GPIO_FN_PORT65_KEYOUT0, GPIO_FN_MSIOF0_TXD, | ||
161 | GPIO_FN_A20_EA20, GPIO_FN_PORT66_KEYIN0, GPIO_FN_MSIOF0_RSCK, | ||
162 | GPIO_FN_A21_EA21, GPIO_FN_PORT67_KEYIN1, GPIO_FN_MSIOF0_RSYNC, | ||
163 | GPIO_FN_A22_EA22, GPIO_FN_PORT68_KEYIN2, GPIO_FN_MSIOF0_MCK0, | ||
164 | GPIO_FN_A23_EA23, GPIO_FN_PORT69_KEYIN3, GPIO_FN_MSIOF0_MCK1, | ||
165 | GPIO_FN_A24_EA24, GPIO_FN_PORT70_KEYIN4, GPIO_FN_MSIOF0_RXD, | ||
166 | GPIO_FN_A25_EA25, GPIO_FN_PORT71_KEYIN5, GPIO_FN_MSIOF0_SS2, | ||
167 | GPIO_FN_A26, GPIO_FN_PORT72_KEYIN6, | ||
168 | GPIO_FN_D0_ED0_NAF0, | ||
169 | GPIO_FN_D1_ED1_NAF1, | ||
170 | GPIO_FN_D2_ED2_NAF2, | ||
171 | GPIO_FN_D3_ED3_NAF3, | ||
172 | GPIO_FN_D4_ED4_NAF4, | ||
173 | GPIO_FN_D5_ED5_NAF5, | ||
174 | GPIO_FN_D6_ED6_NAF6, | ||
175 | GPIO_FN_D7_ED7_NAF7, | ||
176 | GPIO_FN_D8_ED8_NAF8, | ||
177 | GPIO_FN_D9_ED9_NAF9, | ||
178 | GPIO_FN_D10_ED10_NAF10, | ||
179 | GPIO_FN_D11_ED11_NAF11, | ||
180 | GPIO_FN_D12_ED12_NAF12, | ||
181 | GPIO_FN_D13_ED13_NAF13, | ||
182 | GPIO_FN_D14_ED14_NAF14, | ||
183 | GPIO_FN_D15_ED15_NAF15, | ||
184 | GPIO_FN_CS4, | ||
185 | GPIO_FN_CS5A, GPIO_FN_FMSICK, | ||
186 | GPIO_FN_CS5B, GPIO_FN_FCE1, | ||
187 | |||
188 | /* 55-3 (FN) */ | ||
189 | GPIO_FN_CS6B, GPIO_FN_XCS2, GPIO_FN_CS6A, GPIO_FN_DACK0, | ||
190 | GPIO_FN_FCE0, | ||
191 | GPIO_FN_WAIT, GPIO_FN_DREQ0, | ||
192 | GPIO_FN_RD_XRD, | ||
193 | GPIO_FN_WE0_XWR0_FWE, | ||
194 | GPIO_FN_WE1_XWR1, | ||
195 | GPIO_FN_FRB, | ||
196 | GPIO_FN_CKO, | ||
197 | GPIO_FN_NBRSTOUT, | ||
198 | GPIO_FN_NBRST, | ||
199 | GPIO_FN_GPS_EPPSIN, | ||
200 | GPIO_FN_LATCHPULSE, | ||
201 | GPIO_FN_LTESIGNAL, | ||
202 | GPIO_FN_LEGACYSTATE, | ||
203 | GPIO_FN_TCKON, | ||
204 | GPIO_FN_VIO_VD, GPIO_FN_PORT128_KEYOUT0, GPIO_FN_IPORT0, | ||
205 | GPIO_FN_VIO_HD, GPIO_FN_PORT129_KEYOUT1, GPIO_FN_IPORT1, | ||
206 | GPIO_FN_VIO_D0, GPIO_FN_PORT130_KEYOUT2, GPIO_FN_PORT130_MSIOF2_RXD, | ||
207 | GPIO_FN_VIO_D1, GPIO_FN_PORT131_KEYOUT3, GPIO_FN_PORT131_MSIOF2_SS1, | ||
208 | GPIO_FN_VIO_D2, GPIO_FN_PORT132_KEYOUT4, GPIO_FN_PORT132_MSIOF2_SS2, | ||
209 | GPIO_FN_VIO_D3, GPIO_FN_PORT133_KEYOUT5, GPIO_FN_PORT133_MSIOF2_TSYNC, | ||
210 | GPIO_FN_VIO_D4, GPIO_FN_PORT134_KEYIN0, GPIO_FN_PORT134_MSIOF2_TXD, | ||
211 | GPIO_FN_VIO_D5, GPIO_FN_PORT135_KEYIN1, GPIO_FN_PORT135_MSIOF2_TSCK, | ||
212 | GPIO_FN_VIO_D6, GPIO_FN_PORT136_KEYIN2, | ||
213 | GPIO_FN_VIO_D7, GPIO_FN_PORT137_KEYIN3, | ||
214 | GPIO_FN_VIO_D8, GPIO_FN_M9_SLCD_A01, GPIO_FN_PORT138_FSIAOMC, | ||
215 | GPIO_FN_VIO_D9, GPIO_FN_M10_SLCD_CK1, GPIO_FN_PORT139_FSIAOLR, | ||
216 | GPIO_FN_VIO_D10, GPIO_FN_M11_SLCD_SO1, GPIO_FN_TPU0TO2, | ||
217 | GPIO_FN_PORT140_FSIAOBT, | ||
218 | GPIO_FN_VIO_D11, GPIO_FN_M12_SLCD_CE1, GPIO_FN_TPU0TO3, | ||
219 | GPIO_FN_PORT141_FSIAOSLD, | ||
220 | GPIO_FN_VIO_D12, GPIO_FN_M13_BSW, GPIO_FN_PORT142_FSIACK, | ||
221 | GPIO_FN_VIO_D13, GPIO_FN_M14_GSW, GPIO_FN_PORT143_FSIAILR, | ||
222 | GPIO_FN_VIO_D14, GPIO_FN_M15_RSW, GPIO_FN_PORT144_FSIAIBT, | ||
223 | GPIO_FN_VIO_D15, GPIO_FN_TPU1TO3, GPIO_FN_PORT145_FSIAISLD, | ||
224 | GPIO_FN_VIO_CLK, GPIO_FN_PORT146_KEYIN4, GPIO_FN_IPORT2, | ||
225 | GPIO_FN_VIO_FIELD, GPIO_FN_PORT147_KEYIN5, | ||
226 | GPIO_FN_VIO_CKO, GPIO_FN_PORT148_KEYIN6, | ||
227 | GPIO_FN_A27, GPIO_FN_RDWR_XWE, GPIO_FN_MFG0_IN1, | ||
228 | GPIO_FN_MFG0_IN2, | ||
229 | GPIO_FN_TS_SPSYNC3, GPIO_FN_MSIOF2_RSCK, | ||
230 | GPIO_FN_TS_SDAT3, GPIO_FN_MSIOF2_RSYNC, | ||
231 | GPIO_FN_TPU1TO2, GPIO_FN_TS_SDEN3, GPIO_FN_PORT153_MSIOF2_SS1, | ||
232 | GPIO_FN_SOUT3, GPIO_FN_SCIFA2_TXD1, GPIO_FN_MSIOF2_MCK0, | ||
233 | GPIO_FN_SIN3, GPIO_FN_SCIFA2_RXD1, GPIO_FN_MSIOF2_MCK1, | ||
234 | GPIO_FN_XRTS3, GPIO_FN_SCIFA2_RTS1, GPIO_FN_PORT156_MSIOF2_SS2, | ||
235 | GPIO_FN_XCTS3, GPIO_FN_SCIFA2_CTS1, GPIO_FN_PORT157_MSIOF2_RXD, | ||
236 | |||
237 | /* 55-4 (FN) */ | ||
238 | GPIO_FN_DINT, GPIO_FN_SCIFA2_SCK1, GPIO_FN_TS_SCK3, | ||
239 | GPIO_FN_PORT159_SCIFB_SCK, GPIO_FN_PORT159_SCIFA5_SCK, GPIO_FN_NMI, | ||
240 | GPIO_FN_PORT160_SCIFB_TXD, GPIO_FN_PORT160_SCIFA5_TXD, GPIO_FN_SOUT0, | ||
241 | GPIO_FN_PORT161_SCIFB_CTS, GPIO_FN_PORT161_SCIFA5_CTS, GPIO_FN_XCTS0, | ||
242 | GPIO_FN_MFG3_IN2, | ||
243 | GPIO_FN_PORT162_SCIFB_RXD, GPIO_FN_PORT162_SCIFA5_RXD, GPIO_FN_SIN0, | ||
244 | GPIO_FN_MFG3_IN1, | ||
245 | GPIO_FN_PORT163_SCIFB_RTS, GPIO_FN_PORT163_SCIFA5_RTS, GPIO_FN_XRTS0, | ||
246 | GPIO_FN_MFG3_OUT1, | ||
247 | GPIO_FN_TPU3TO0, | ||
248 | GPIO_FN_LCDD0, GPIO_FN_PORT192_KEYOUT0, GPIO_FN_EXT_CKI, | ||
249 | GPIO_FN_LCDD1, GPIO_FN_PORT193_KEYOUT1, GPIO_FN_PORT193_SCIFA5_CTS, | ||
250 | GPIO_FN_BBIF2_TSYNC1, | ||
251 | GPIO_FN_LCDD2, GPIO_FN_PORT194_KEYOUT2, GPIO_FN_PORT194_SCIFA5_RTS, | ||
252 | GPIO_FN_BBIF2_TSCK1, | ||
253 | GPIO_FN_LCDD3, GPIO_FN_PORT195_KEYOUT3, GPIO_FN_PORT195_SCIFA5_RXD, | ||
254 | GPIO_FN_BBIF2_TXD1, | ||
255 | GPIO_FN_LCDD4, GPIO_FN_PORT196_KEYOUT4, GPIO_FN_PORT196_SCIFA5_TXD, | ||
256 | GPIO_FN_LCDD5, GPIO_FN_PORT197_KEYOUT5, GPIO_FN_PORT197_SCIFA5_SCK, | ||
257 | GPIO_FN_MFG2_OUT2, GPIO_FN_TPU2TO1, | ||
258 | GPIO_FN_LCDD6, GPIO_FN_XWR2, | ||
259 | GPIO_FN_LCDD7, GPIO_FN_TPU4TO1, GPIO_FN_MFG4_OUT2, GPIO_FN_XWR3, | ||
260 | GPIO_FN_LCDD8, GPIO_FN_PORT200_KEYIN0, GPIO_FN_VIO_DR0, GPIO_FN_D16, | ||
261 | GPIO_FN_ED16, | ||
262 | GPIO_FN_LCDD9, GPIO_FN_PORT201_KEYIN1, GPIO_FN_VIO_DR1, GPIO_FN_D17, | ||
263 | GPIO_FN_ED17, | ||
264 | GPIO_FN_LCDD10, GPIO_FN_PORT202_KEYIN2, GPIO_FN_VIO_DR2, GPIO_FN_D18, | ||
265 | GPIO_FN_ED18, | ||
266 | GPIO_FN_LCDD11, GPIO_FN_PORT203_KEYIN3, GPIO_FN_VIO_DR3, GPIO_FN_D19, | ||
267 | GPIO_FN_ED19, | ||
268 | GPIO_FN_LCDD12, GPIO_FN_PORT204_KEYIN4, GPIO_FN_VIO_DR4, GPIO_FN_D20, | ||
269 | GPIO_FN_ED20, | ||
270 | GPIO_FN_LCDD13, GPIO_FN_PORT205_KEYIN5, GPIO_FN_VIO_DR5, GPIO_FN_D21, | ||
271 | GPIO_FN_ED21, | ||
272 | GPIO_FN_LCDD14, GPIO_FN_PORT206_KEYIN6, GPIO_FN_VIO_DR6, GPIO_FN_D22, | ||
273 | GPIO_FN_ED22, | ||
274 | GPIO_FN_LCDD15, GPIO_FN_PORT207_MSIOF0L_SS1, GPIO_FN_PORT207_KEYOUT0, | ||
275 | GPIO_FN_VIO_DR7, | ||
276 | GPIO_FN_D23, GPIO_FN_ED23, | ||
277 | GPIO_FN_LCDD16, GPIO_FN_PORT208_MSIOF0L_SS2, GPIO_FN_PORT208_KEYOUT1, | ||
278 | GPIO_FN_VIO_VDR, | ||
279 | GPIO_FN_D24, GPIO_FN_ED24, | ||
280 | GPIO_FN_LCDD17, GPIO_FN_PORT209_KEYOUT2, GPIO_FN_VIO_HDR, GPIO_FN_D25, | ||
281 | GPIO_FN_ED25, | ||
282 | GPIO_FN_LCDD18, GPIO_FN_DREQ2, GPIO_FN_PORT210_MSIOF0L_SS1, GPIO_FN_D26, | ||
283 | GPIO_FN_ED26, | ||
284 | GPIO_FN_LCDD19, GPIO_FN_PORT211_MSIOF0L_SS2, GPIO_FN_D27, GPIO_FN_ED27, | ||
285 | GPIO_FN_LCDD20, GPIO_FN_TS_SPSYNC1, GPIO_FN_MSIOF0L_MCK0, GPIO_FN_D28, | ||
286 | GPIO_FN_ED28, | ||
287 | GPIO_FN_LCDD21, GPIO_FN_TS_SDAT1, GPIO_FN_MSIOF0L_MCK1, GPIO_FN_D29, | ||
288 | GPIO_FN_ED29, | ||
289 | GPIO_FN_LCDD22, GPIO_FN_TS_SDEN1, GPIO_FN_MSIOF0L_RSCK, GPIO_FN_D30, | ||
290 | GPIO_FN_ED30, | ||
291 | GPIO_FN_LCDD23, GPIO_FN_TS_SCK1, GPIO_FN_MSIOF0L_RSYNC, GPIO_FN_D31, | ||
292 | GPIO_FN_ED31, | ||
293 | GPIO_FN_LCDDCK, GPIO_FN_LCDWR, GPIO_FN_PORT216_KEYOUT3, | ||
294 | GPIO_FN_VIO_CLKR, | ||
295 | GPIO_FN_LCDRD, GPIO_FN_DACK2, GPIO_FN_MSIOF0L_TSYNC, | ||
296 | GPIO_FN_LCDHSYN, GPIO_FN_LCDCS, GPIO_FN_LCDCS2, GPIO_FN_DACK3, | ||
297 | GPIO_FN_PORT218_VIO_CKOR, GPIO_FN_PORT218_KEYOUT4, | ||
298 | GPIO_FN_LCDDISP, GPIO_FN_LCDRS, GPIO_FN_DREQ3, GPIO_FN_MSIOF0L_TSCK, | ||
299 | GPIO_FN_LCDVSYN, GPIO_FN_LCDVSYN2, GPIO_FN_PORT220_KEYOUT5, | ||
300 | GPIO_FN_LCDLCLK, GPIO_FN_DREQ1, GPIO_FN_PWEN, GPIO_FN_MSIOF0L_RXD, | ||
301 | GPIO_FN_LCDDON, GPIO_FN_LCDDON2, GPIO_FN_DACK1, GPIO_FN_OVCN, | ||
302 | GPIO_FN_MSIOF0L_TXD, | ||
303 | GPIO_FN_SCIFA1_TXD, GPIO_FN_OVCN2, | ||
304 | GPIO_FN_EXTLP, GPIO_FN_SCIFA1_SCK, GPIO_FN_USBTERM, | ||
305 | GPIO_FN_PORT226_VIO_CKO2, | ||
306 | GPIO_FN_SCIFA1_RTS, GPIO_FN_IDIN, | ||
307 | GPIO_FN_SCIFA1_RXD, | ||
308 | GPIO_FN_SCIFA1_CTS, GPIO_FN_MFG1_IN1, | ||
309 | GPIO_FN_MSIOF1_TXD, GPIO_FN_SCIFA2_TXD2, GPIO_FN_PORT230_FSIAOMC, | ||
310 | GPIO_FN_MSIOF1_TSYNC, GPIO_FN_SCIFA2_CTS2, GPIO_FN_PORT231_FSIAOLR, | ||
311 | GPIO_FN_MSIOF1_TSCK, GPIO_FN_SCIFA2_SCK2, GPIO_FN_PORT232_FSIAOBT, | ||
312 | GPIO_FN_MSIOF1_RXD, GPIO_FN_SCIFA2_RXD2, GPIO_FN_GPS_VCOTRIG, | ||
313 | GPIO_FN_PORT233_FSIACK, | ||
314 | GPIO_FN_MSIOF1_RSCK, GPIO_FN_SCIFA2_RTS2, GPIO_FN_PORT234_FSIAOSLD, | ||
315 | GPIO_FN_MSIOF1_RSYNC, GPIO_FN_OPORT0, GPIO_FN_MFG1_IN2, | ||
316 | GPIO_FN_PORT235_FSIAILR, | ||
317 | GPIO_FN_MSIOF1_MCK0, GPIO_FN_I2C_SDA2, GPIO_FN_PORT236_FSIAIBT, | ||
318 | GPIO_FN_MSIOF1_MCK1, GPIO_FN_I2C_SCL2, GPIO_FN_PORT237_FSIAISLD, | ||
319 | GPIO_FN_MSIOF1_SS1, GPIO_FN_EDBGREQ3, | ||
320 | |||
321 | /* 55-5 (FN) */ | ||
322 | GPIO_FN_MSIOF1_SS2, | ||
323 | GPIO_FN_SCIFA6_TXD, | ||
324 | GPIO_FN_PORT241_IRDA_OUT, GPIO_FN_PORT241_IROUT, GPIO_FN_MFG4_OUT1, | ||
325 | GPIO_FN_TPU4TO0, | ||
326 | GPIO_FN_PORT242_IRDA_IN, GPIO_FN_MFG4_IN2, | ||
327 | GPIO_FN_PORT243_IRDA_FIRSEL, GPIO_FN_PORT243_VIO_CKO2, | ||
328 | GPIO_FN_PORT244_SCIFA5_CTS, GPIO_FN_MFG2_IN1, GPIO_FN_PORT244_SCIFB_CTS, | ||
329 | GPIO_FN_PORT244_MSIOF2_RXD, | ||
330 | GPIO_FN_PORT245_SCIFA5_RTS, GPIO_FN_MFG2_IN2, GPIO_FN_PORT245_SCIFB_RTS, | ||
331 | GPIO_FN_PORT245_MSIOF2_TXD, | ||
332 | GPIO_FN_PORT246_SCIFA5_RXD, GPIO_FN_MFG1_OUT1, | ||
333 | GPIO_FN_PORT246_SCIFB_RXD, GPIO_FN_TPU1TO0, | ||
334 | GPIO_FN_PORT247_SCIFA5_TXD, GPIO_FN_MFG3_OUT2, | ||
335 | GPIO_FN_PORT247_SCIFB_TXD, GPIO_FN_TPU3TO1, | ||
336 | GPIO_FN_PORT248_SCIFA5_SCK, GPIO_FN_MFG2_OUT1, | ||
337 | GPIO_FN_PORT248_SCIFB_SCK, GPIO_FN_TPU2TO0, | ||
338 | GPIO_FN_PORT248_MSIOF2_TSCK, | ||
339 | GPIO_FN_PORT249_IROUT, GPIO_FN_MFG4_IN1, GPIO_FN_PORT249_MSIOF2_TSYNC, | ||
340 | GPIO_FN_SDHICLK0, GPIO_FN_TCK2_SWCLK_MC0, | ||
341 | GPIO_FN_SDHICD0, | ||
342 | GPIO_FN_SDHID0_0, GPIO_FN_TMS2_SWDIO_MC0, | ||
343 | GPIO_FN_SDHID0_1, GPIO_FN_TDO2_SWO0_MC0, | ||
344 | GPIO_FN_SDHID0_2, GPIO_FN_TDI2, | ||
345 | GPIO_FN_SDHID0_3, GPIO_FN_RTCK2_SWO1_MC0, | ||
346 | GPIO_FN_SDHICMD0, GPIO_FN_TRST2, | ||
347 | GPIO_FN_SDHIWP0, GPIO_FN_EDBGREQ2, | ||
348 | GPIO_FN_SDHICLK1, GPIO_FN_TCK3_SWCLK_MC1, | ||
349 | GPIO_FN_SDHID1_0, GPIO_FN_M11_SLCD_SO2, GPIO_FN_TS_SPSYNC2, | ||
350 | GPIO_FN_TMS3_SWDIO_MC1, | ||
351 | GPIO_FN_SDHID1_1, GPIO_FN_M9_SLCD_A02, GPIO_FN_TS_SDAT2, | ||
352 | GPIO_FN_TDO3_SWO0_MC1, | ||
353 | GPIO_FN_SDHID1_2, GPIO_FN_M10_SLCD_CK2, GPIO_FN_TS_SDEN2, GPIO_FN_TDI3, | ||
354 | GPIO_FN_SDHID1_3, GPIO_FN_M12_SLCD_CE2, GPIO_FN_TS_SCK2, | ||
355 | GPIO_FN_RTCK3_SWO1_MC1, | ||
356 | GPIO_FN_SDHICMD1, GPIO_FN_TRST3, | ||
357 | GPIO_FN_RESETOUTS, | ||
358 | }; | ||
359 | |||
360 | #endif /* __ASM_SH7377_H__ */ | ||
diff --git a/arch/arm/mach-shmobile/intc-sh7367.c b/arch/arm/mach-shmobile/intc-sh7367.c deleted file mode 100644 index 5bf776495b75..000000000000 --- a/arch/arm/mach-shmobile/intc-sh7367.c +++ /dev/null | |||
@@ -1,413 +0,0 @@ | |||
1 | /* | ||
2 | * sh7367 processor support - INTC hardware block | ||
3 | * | ||
4 | * Copyright (C) 2010 Magnus Damm | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License as published by | ||
8 | * the Free Software Foundation; version 2 of the License. | ||
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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | ||
18 | */ | ||
19 | #include <linux/kernel.h> | ||
20 | #include <linux/init.h> | ||
21 | #include <linux/interrupt.h> | ||
22 | #include <linux/irq.h> | ||
23 | #include <linux/io.h> | ||
24 | #include <linux/sh_intc.h> | ||
25 | #include <mach/intc.h> | ||
26 | #include <mach/irqs.h> | ||
27 | #include <asm/mach-types.h> | ||
28 | #include <asm/mach/arch.h> | ||
29 | |||
30 | enum { | ||
31 | UNUSED_INTCA = 0, | ||
32 | ENABLED, | ||
33 | DISABLED, | ||
34 | |||
35 | /* interrupt sources INTCA */ | ||
36 | DIRC, | ||
37 | CRYPT1_ERR, CRYPT2_STD, | ||
38 | IIC1_ALI1, IIC1_TACKI1, IIC1_WAITI1, IIC1_DTEI1, | ||
39 | ARM11_IRQPMU, ARM11_COMMTX, ARM11_COMMRX, | ||
40 | ETM11_ACQCMP, ETM11_FULL, | ||
41 | MFI_MFIM, MFI_MFIS, | ||
42 | BBIF1, BBIF2, | ||
43 | USBDMAC_USHDMI, | ||
44 | USBHS_USHI0, USBHS_USHI1, | ||
45 | CMT1_CMT10, CMT1_CMT11, CMT1_CMT12, CMT1_CMT13, CMT2, CMT3, | ||
46 | KEYSC_KEY, | ||
47 | SCIFA0, SCIFA1, SCIFA2, SCIFA3, | ||
48 | MSIOF2, MSIOF1, | ||
49 | SCIFA4, SCIFA5, SCIFB, | ||
50 | FLCTL_FLSTEI, FLCTL_FLTENDI, FLCTL_FLTREQ0I, FLCTL_FLTREQ1I, | ||
51 | SDHI0, | ||
52 | SDHI1, | ||
53 | MSU_MSU, MSU_MSU2, | ||
54 | IREM, | ||
55 | SIU, | ||
56 | SPU, | ||
57 | IRDA, | ||
58 | TPU0, TPU1, TPU2, TPU3, TPU4, | ||
59 | LCRC, | ||
60 | PINT1, PINT2, | ||
61 | TTI20, | ||
62 | MISTY, | ||
63 | DDM, | ||
64 | SDHI2, | ||
65 | RWDT0, RWDT1, | ||
66 | DMAC_1_DEI0, DMAC_1_DEI1, DMAC_1_DEI2, DMAC_1_DEI3, | ||
67 | DMAC_2_DEI4, DMAC_2_DEI5, DMAC_2_DADERR, | ||
68 | DMAC2_1_DEI0, DMAC2_1_DEI1, DMAC2_1_DEI2, DMAC2_1_DEI3, | ||
69 | DMAC2_2_DEI4, DMAC2_2_DEI5, DMAC2_2_DADERR, | ||
70 | DMAC3_1_DEI0, DMAC3_1_DEI1, DMAC3_1_DEI2, DMAC3_1_DEI3, | ||
71 | DMAC3_2_DEI4, DMAC3_2_DEI5, DMAC3_2_DADERR, | ||
72 | |||
73 | /* interrupt groups INTCA */ | ||
74 | DMAC_1, DMAC_2, DMAC2_1, DMAC2_2, DMAC3_1, DMAC3_2, | ||
75 | ETM11, ARM11, USBHS, FLCTL, IIC1 | ||
76 | }; | ||
77 | |||
78 | static struct intc_vect intca_vectors[] __initdata = { | ||
79 | INTC_VECT(DIRC, 0x0560), | ||
80 | INTC_VECT(CRYPT1_ERR, 0x05e0), | ||
81 | INTC_VECT(CRYPT2_STD, 0x0700), | ||
82 | INTC_VECT(IIC1_ALI1, 0x0780), INTC_VECT(IIC1_TACKI1, 0x07a0), | ||
83 | INTC_VECT(IIC1_WAITI1, 0x07c0), INTC_VECT(IIC1_DTEI1, 0x07e0), | ||
84 | INTC_VECT(ARM11_IRQPMU, 0x0800), INTC_VECT(ARM11_COMMTX, 0x0840), | ||
85 | INTC_VECT(ARM11_COMMRX, 0x0860), | ||
86 | INTC_VECT(ETM11_ACQCMP, 0x0880), INTC_VECT(ETM11_FULL, 0x08a0), | ||
87 | INTC_VECT(MFI_MFIM, 0x0900), INTC_VECT(MFI_MFIS, 0x0920), | ||
88 | INTC_VECT(BBIF1, 0x0940), INTC_VECT(BBIF2, 0x0960), | ||
89 | INTC_VECT(USBDMAC_USHDMI, 0x0a00), | ||
90 | INTC_VECT(USBHS_USHI0, 0x0a20), INTC_VECT(USBHS_USHI1, 0x0a40), | ||
91 | INTC_VECT(CMT1_CMT10, 0x0b00), INTC_VECT(CMT1_CMT11, 0x0b20), | ||
92 | INTC_VECT(CMT1_CMT12, 0x0b40), INTC_VECT(CMT1_CMT13, 0x0b60), | ||
93 | INTC_VECT(CMT2, 0x0b80), INTC_VECT(CMT3, 0x0ba0), | ||
94 | INTC_VECT(KEYSC_KEY, 0x0be0), | ||
95 | INTC_VECT(SCIFA0, 0x0c00), INTC_VECT(SCIFA1, 0x0c20), | ||
96 | INTC_VECT(SCIFA2, 0x0c40), INTC_VECT(SCIFA3, 0x0c60), | ||
97 | INTC_VECT(MSIOF2, 0x0c80), INTC_VECT(MSIOF1, 0x0d00), | ||
98 | INTC_VECT(SCIFA4, 0x0d20), INTC_VECT(SCIFA5, 0x0d40), | ||
99 | INTC_VECT(SCIFB, 0x0d60), | ||
100 | INTC_VECT(FLCTL_FLSTEI, 0x0d80), INTC_VECT(FLCTL_FLTENDI, 0x0da0), | ||
101 | INTC_VECT(FLCTL_FLTREQ0I, 0x0dc0), INTC_VECT(FLCTL_FLTREQ1I, 0x0de0), | ||
102 | INTC_VECT(SDHI0, 0x0e00), INTC_VECT(SDHI0, 0x0e20), | ||
103 | INTC_VECT(SDHI0, 0x0e40), INTC_VECT(SDHI0, 0x0e60), | ||
104 | INTC_VECT(SDHI1, 0x0e80), INTC_VECT(SDHI1, 0x0ea0), | ||
105 | INTC_VECT(SDHI1, 0x0ec0), INTC_VECT(SDHI1, 0x0ee0), | ||
106 | INTC_VECT(MSU_MSU, 0x0f20), INTC_VECT(MSU_MSU2, 0x0f40), | ||
107 | INTC_VECT(IREM, 0x0f60), | ||
108 | INTC_VECT(SIU, 0x0fa0), | ||
109 | INTC_VECT(SPU, 0x0fc0), | ||
110 | INTC_VECT(IRDA, 0x0480), | ||
111 | INTC_VECT(TPU0, 0x04a0), INTC_VECT(TPU1, 0x04c0), | ||
112 | INTC_VECT(TPU2, 0x04e0), INTC_VECT(TPU3, 0x0500), | ||
113 | INTC_VECT(TPU4, 0x0520), | ||
114 | INTC_VECT(LCRC, 0x0540), | ||
115 | INTC_VECT(PINT1, 0x1000), INTC_VECT(PINT2, 0x1020), | ||
116 | INTC_VECT(TTI20, 0x1100), | ||
117 | INTC_VECT(MISTY, 0x1120), | ||
118 | INTC_VECT(DDM, 0x1140), | ||
119 | INTC_VECT(SDHI2, 0x1200), INTC_VECT(SDHI2, 0x1220), | ||
120 | INTC_VECT(SDHI2, 0x1240), INTC_VECT(SDHI2, 0x1260), | ||
121 | INTC_VECT(RWDT0, 0x1280), INTC_VECT(RWDT1, 0x12a0), | ||
122 | INTC_VECT(DMAC_1_DEI0, 0x2000), INTC_VECT(DMAC_1_DEI1, 0x2020), | ||
123 | INTC_VECT(DMAC_1_DEI2, 0x2040), INTC_VECT(DMAC_1_DEI3, 0x2060), | ||
124 | INTC_VECT(DMAC_2_DEI4, 0x2080), INTC_VECT(DMAC_2_DEI5, 0x20a0), | ||
125 | INTC_VECT(DMAC_2_DADERR, 0x20c0), | ||
126 | INTC_VECT(DMAC2_1_DEI0, 0x2100), INTC_VECT(DMAC2_1_DEI1, 0x2120), | ||
127 | INTC_VECT(DMAC2_1_DEI2, 0x2140), INTC_VECT(DMAC2_1_DEI3, 0x2160), | ||
128 | INTC_VECT(DMAC2_2_DEI4, 0x2180), INTC_VECT(DMAC2_2_DEI5, 0x21a0), | ||
129 | INTC_VECT(DMAC2_2_DADERR, 0x21c0), | ||
130 | INTC_VECT(DMAC3_1_DEI0, 0x2200), INTC_VECT(DMAC3_1_DEI1, 0x2220), | ||
131 | INTC_VECT(DMAC3_1_DEI2, 0x2240), INTC_VECT(DMAC3_1_DEI3, 0x2260), | ||
132 | INTC_VECT(DMAC3_2_DEI4, 0x2280), INTC_VECT(DMAC3_2_DEI5, 0x22a0), | ||
133 | INTC_VECT(DMAC3_2_DADERR, 0x22c0), | ||
134 | }; | ||
135 | |||
136 | static struct intc_group intca_groups[] __initdata = { | ||
137 | INTC_GROUP(DMAC_1, DMAC_1_DEI0, | ||
138 | DMAC_1_DEI1, DMAC_1_DEI2, DMAC_1_DEI3), | ||
139 | INTC_GROUP(DMAC_2, DMAC_2_DEI4, | ||
140 | DMAC_2_DEI5, DMAC_2_DADERR), | ||
141 | INTC_GROUP(DMAC2_1, DMAC2_1_DEI0, | ||
142 | DMAC2_1_DEI1, DMAC2_1_DEI2, DMAC2_1_DEI3), | ||
143 | INTC_GROUP(DMAC2_2, DMAC2_2_DEI4, | ||
144 | DMAC2_2_DEI5, DMAC2_2_DADERR), | ||
145 | INTC_GROUP(DMAC3_1, DMAC3_1_DEI0, | ||
146 | DMAC3_1_DEI1, DMAC3_1_DEI2, DMAC3_1_DEI3), | ||
147 | INTC_GROUP(DMAC3_2, DMAC3_2_DEI4, | ||
148 | DMAC3_2_DEI5, DMAC3_2_DADERR), | ||
149 | INTC_GROUP(ETM11, ETM11_ACQCMP, ETM11_FULL), | ||
150 | INTC_GROUP(ARM11, ARM11_IRQPMU, ARM11_COMMTX, ARM11_COMMTX), | ||
151 | INTC_GROUP(USBHS, USBHS_USHI0, USBHS_USHI1), | ||
152 | INTC_GROUP(FLCTL, FLCTL_FLSTEI, FLCTL_FLTENDI, | ||
153 | FLCTL_FLTREQ0I, FLCTL_FLTREQ1I), | ||
154 | INTC_GROUP(IIC1, IIC1_ALI1, IIC1_TACKI1, IIC1_WAITI1, IIC1_DTEI1), | ||
155 | }; | ||
156 | |||
157 | static struct intc_mask_reg intca_mask_registers[] __initdata = { | ||
158 | { 0xe6940080, 0xe69400c0, 8, /* IMR0A / IMCR0A */ | ||
159 | { DMAC2_1_DEI3, DMAC2_1_DEI2, DMAC2_1_DEI1, DMAC2_1_DEI0, | ||
160 | ARM11_IRQPMU, 0, ARM11_COMMTX, ARM11_COMMRX } }, | ||
161 | { 0xe6940084, 0xe69400c4, 8, /* IMR1A / IMCR1A */ | ||
162 | { CRYPT1_ERR, CRYPT2_STD, DIRC, 0, | ||
163 | DMAC_1_DEI3, DMAC_1_DEI2, DMAC_1_DEI1, DMAC_1_DEI0 } }, | ||
164 | { 0xe6940088, 0xe69400c8, 8, /* IMR2A / IMCR2A */ | ||
165 | { PINT1, PINT2, 0, 0, | ||
166 | BBIF1, BBIF2, MFI_MFIS, MFI_MFIM } }, | ||
167 | { 0xe694008c, 0xe69400cc, 8, /* IMR3A / IMCR3A */ | ||
168 | { DMAC3_1_DEI3, DMAC3_1_DEI2, DMAC3_1_DEI1, DMAC3_1_DEI0, | ||
169 | DMAC3_2_DADERR, DMAC3_2_DEI5, DMAC3_2_DEI4, IRDA } }, | ||
170 | { 0xe6940090, 0xe69400d0, 8, /* IMR4A / IMCR4A */ | ||
171 | { DDM, 0, 0, 0, | ||
172 | 0, 0, ETM11_FULL, ETM11_ACQCMP } }, | ||
173 | { 0xe6940094, 0xe69400d4, 8, /* IMR5A / IMCR5A */ | ||
174 | { KEYSC_KEY, DMAC_2_DADERR, DMAC_2_DEI5, DMAC_2_DEI4, | ||
175 | SCIFA3, SCIFA2, SCIFA1, SCIFA0 } }, | ||
176 | { 0xe6940098, 0xe69400d8, 8, /* IMR6A / IMCR6A */ | ||
177 | { SCIFB, SCIFA5, SCIFA4, MSIOF1, | ||
178 | 0, 0, MSIOF2, 0 } }, | ||
179 | { 0xe694009c, 0xe69400dc, 8, /* IMR7A / IMCR7A */ | ||
180 | { DISABLED, ENABLED, ENABLED, ENABLED, | ||
181 | FLCTL_FLTREQ1I, FLCTL_FLTREQ0I, FLCTL_FLTENDI, FLCTL_FLSTEI } }, | ||
182 | { 0xe69400a0, 0xe69400e0, 8, /* IMR8A / IMCR8A */ | ||
183 | { DISABLED, ENABLED, ENABLED, ENABLED, | ||
184 | TTI20, USBDMAC_USHDMI, SPU, SIU } }, | ||
185 | { 0xe69400a4, 0xe69400e4, 8, /* IMR9A / IMCR9A */ | ||
186 | { CMT1_CMT13, CMT1_CMT12, CMT1_CMT11, CMT1_CMT10, | ||
187 | CMT2, USBHS_USHI1, USBHS_USHI0, 0 } }, | ||
188 | { 0xe69400a8, 0xe69400e8, 8, /* IMR10A / IMCR10A */ | ||
189 | { 0, DMAC2_2_DADERR, DMAC2_2_DEI5, DMAC2_2_DEI4, | ||
190 | 0, 0, 0, 0 } }, | ||
191 | { 0xe69400ac, 0xe69400ec, 8, /* IMR11A / IMCR11A */ | ||
192 | { IIC1_DTEI1, IIC1_WAITI1, IIC1_TACKI1, IIC1_ALI1, | ||
193 | LCRC, MSU_MSU2, IREM, MSU_MSU } }, | ||
194 | { 0xe69400b0, 0xe69400f0, 8, /* IMR12A / IMCR12A */ | ||
195 | { 0, 0, TPU0, TPU1, | ||
196 | TPU2, TPU3, TPU4, 0 } }, | ||
197 | { 0xe69400b4, 0xe69400f4, 8, /* IMR13A / IMCR13A */ | ||
198 | { DISABLED, ENABLED, ENABLED, ENABLED, | ||
199 | MISTY, CMT3, RWDT1, RWDT0 } }, | ||
200 | }; | ||
201 | |||
202 | static struct intc_prio_reg intca_prio_registers[] __initdata = { | ||
203 | { 0xe6940000, 0, 16, 4, /* IPRAA */ { DMAC3_1, DMAC3_2, CMT2, LCRC } }, | ||
204 | { 0xe6940004, 0, 16, 4, /* IPRBA */ { IRDA, ETM11, BBIF1, BBIF2 } }, | ||
205 | { 0xe6940008, 0, 16, 4, /* IPRCA */ { CRYPT1_ERR, CRYPT2_STD, | ||
206 | CMT1_CMT11, ARM11 } }, | ||
207 | { 0xe694000c, 0, 16, 4, /* IPRDA */ { PINT1, PINT2, | ||
208 | CMT1_CMT12, TPU4 } }, | ||
209 | { 0xe6940010, 0, 16, 4, /* IPREA */ { DMAC_1, MFI_MFIS, | ||
210 | MFI_MFIM, USBHS } }, | ||
211 | { 0xe6940014, 0, 16, 4, /* IPRFA */ { KEYSC_KEY, DMAC_2, | ||
212 | 0, CMT1_CMT10 } }, | ||
213 | { 0xe6940018, 0, 16, 4, /* IPRGA */ { SCIFA0, SCIFA1, | ||
214 | SCIFA2, SCIFA3 } }, | ||
215 | { 0xe694001c, 0, 16, 4, /* IPRGH */ { MSIOF2, USBDMAC_USHDMI, | ||
216 | FLCTL, SDHI0 } }, | ||
217 | { 0xe6940020, 0, 16, 4, /* IPRIA */ { MSIOF1, SCIFA4, MSU_MSU, IIC1 } }, | ||
218 | { 0xe6940024, 0, 16, 4, /* IPRJA */ { DMAC2_1, DMAC2_2, SIU, TTI20 } }, | ||
219 | { 0xe6940028, 0, 16, 4, /* IPRKA */ { 0, CMT1_CMT13, IREM, SDHI1 } }, | ||
220 | { 0xe694002c, 0, 16, 4, /* IPRLA */ { TPU0, TPU1, TPU2, TPU3 } }, | ||
221 | { 0xe6940030, 0, 16, 4, /* IPRMA */ { MISTY, CMT3, RWDT1, RWDT0 } }, | ||
222 | { 0xe6940034, 0, 16, 4, /* IPRNA */ { SCIFB, SCIFA5, SPU, DDM } }, | ||
223 | { 0xe6940038, 0, 16, 4, /* IPROA */ { 0, 0, DIRC, SDHI2 } }, | ||
224 | }; | ||
225 | |||
226 | static struct intc_desc intca_desc __initdata = { | ||
227 | .name = "sh7367-intca", | ||
228 | .force_enable = ENABLED, | ||
229 | .force_disable = DISABLED, | ||
230 | .hw = INTC_HW_DESC(intca_vectors, intca_groups, | ||
231 | intca_mask_registers, intca_prio_registers, | ||
232 | NULL, NULL), | ||
233 | }; | ||
234 | |||
235 | INTC_IRQ_PINS_16(intca_irq_pins, 0xe6900000, | ||
236 | INTC_VECT, "sh7367-intca-irq-pins"); | ||
237 | |||
238 | enum { | ||
239 | UNUSED_INTCS = 0, | ||
240 | |||
241 | INTCS, | ||
242 | |||
243 | /* interrupt sources INTCS */ | ||
244 | VIO2_VEU0, VIO2_VEU1, VIO2_VEU2, VIO2_VEU3, | ||
245 | VIO3_VOU, | ||
246 | RTDMAC_1_DEI0, RTDMAC_1_DEI1, RTDMAC_1_DEI2, RTDMAC_1_DEI3, | ||
247 | VIO1_CEU, VIO1_BEU0, VIO1_BEU1, VIO1_BEU2, | ||
248 | VPU, | ||
249 | SGX530, | ||
250 | _2DDMAC_2DDM0, _2DDMAC_2DDM1, _2DDMAC_2DDM2, _2DDMAC_2DDM3, | ||
251 | IIC2_ALI2, IIC2_TACKI2, IIC2_WAITI2, IIC2_DTEI2, | ||
252 | IPMMU_IPMMUB, IPMMU_IPMMUS, | ||
253 | RTDMAC_2_DEI4, RTDMAC_2_DEI5, RTDMAC_2_DADERR, | ||
254 | MSIOF, | ||
255 | IIC0_ALI0, IIC0_TACKI0, IIC0_WAITI0, IIC0_DTEI0, | ||
256 | TMU_TUNI0, TMU_TUNI1, TMU_TUNI2, | ||
257 | CMT, | ||
258 | TSIF, | ||
259 | IPMMUI, | ||
260 | MVI3, | ||
261 | ICB, | ||
262 | PEP, | ||
263 | ASA, | ||
264 | BEM, | ||
265 | VE2HO, | ||
266 | HQE, | ||
267 | JPEG, | ||
268 | LCDC, | ||
269 | |||
270 | /* interrupt groups INTCS */ | ||
271 | _2DDMAC, RTDMAC_1, RTDMAC_2, VEU, BEU, IIC0, IPMMU, IIC2, | ||
272 | }; | ||
273 | |||
274 | static struct intc_vect intcs_vectors[] = { | ||
275 | INTCS_VECT(VIO2_VEU0, 0x700), INTCS_VECT(VIO2_VEU1, 0x720), | ||
276 | INTCS_VECT(VIO2_VEU2, 0x740), INTCS_VECT(VIO2_VEU3, 0x760), | ||
277 | INTCS_VECT(VIO3_VOU, 0x780), | ||
278 | INTCS_VECT(RTDMAC_1_DEI0, 0x800), INTCS_VECT(RTDMAC_1_DEI1, 0x820), | ||
279 | INTCS_VECT(RTDMAC_1_DEI2, 0x840), INTCS_VECT(RTDMAC_1_DEI3, 0x860), | ||
280 | INTCS_VECT(VIO1_CEU, 0x880), INTCS_VECT(VIO1_BEU0, 0x8a0), | ||
281 | INTCS_VECT(VIO1_BEU1, 0x8c0), INTCS_VECT(VIO1_BEU2, 0x8e0), | ||
282 | INTCS_VECT(VPU, 0x980), | ||
283 | INTCS_VECT(SGX530, 0x9e0), | ||
284 | INTCS_VECT(_2DDMAC_2DDM0, 0xa00), INTCS_VECT(_2DDMAC_2DDM1, 0xa20), | ||
285 | INTCS_VECT(_2DDMAC_2DDM2, 0xa40), INTCS_VECT(_2DDMAC_2DDM3, 0xa60), | ||
286 | INTCS_VECT(IIC2_ALI2, 0xa80), INTCS_VECT(IIC2_TACKI2, 0xaa0), | ||
287 | INTCS_VECT(IIC2_WAITI2, 0xac0), INTCS_VECT(IIC2_DTEI2, 0xae0), | ||
288 | INTCS_VECT(IPMMU_IPMMUB, 0xb20), INTCS_VECT(IPMMU_IPMMUS, 0xb60), | ||
289 | INTCS_VECT(RTDMAC_2_DEI4, 0xb80), INTCS_VECT(RTDMAC_2_DEI5, 0xba0), | ||
290 | INTCS_VECT(RTDMAC_2_DADERR, 0xbc0), | ||
291 | INTCS_VECT(MSIOF, 0xd20), | ||
292 | INTCS_VECT(IIC0_ALI0, 0xe00), INTCS_VECT(IIC0_TACKI0, 0xe20), | ||
293 | INTCS_VECT(IIC0_WAITI0, 0xe40), INTCS_VECT(IIC0_DTEI0, 0xe60), | ||
294 | INTCS_VECT(TMU_TUNI0, 0xe80), INTCS_VECT(TMU_TUNI1, 0xea0), | ||
295 | INTCS_VECT(TMU_TUNI2, 0xec0), | ||
296 | INTCS_VECT(CMT, 0xf00), | ||
297 | INTCS_VECT(TSIF, 0xf20), | ||
298 | INTCS_VECT(IPMMUI, 0xf60), | ||
299 | INTCS_VECT(MVI3, 0x420), | ||
300 | INTCS_VECT(ICB, 0x480), | ||
301 | INTCS_VECT(PEP, 0x4a0), | ||
302 | INTCS_VECT(ASA, 0x4c0), | ||
303 | INTCS_VECT(BEM, 0x4e0), | ||
304 | INTCS_VECT(VE2HO, 0x520), | ||
305 | INTCS_VECT(HQE, 0x540), | ||
306 | INTCS_VECT(JPEG, 0x560), | ||
307 | INTCS_VECT(LCDC, 0x580), | ||
308 | |||
309 | INTC_VECT(INTCS, 0xf80), | ||
310 | }; | ||
311 | |||
312 | static struct intc_group intcs_groups[] __initdata = { | ||
313 | INTC_GROUP(_2DDMAC, _2DDMAC_2DDM0, _2DDMAC_2DDM1, | ||
314 | _2DDMAC_2DDM2, _2DDMAC_2DDM3), | ||
315 | INTC_GROUP(RTDMAC_1, RTDMAC_1_DEI0, RTDMAC_1_DEI1, | ||
316 | RTDMAC_1_DEI2, RTDMAC_1_DEI3), | ||
317 | INTC_GROUP(RTDMAC_2, RTDMAC_2_DEI4, RTDMAC_2_DEI5, RTDMAC_2_DADERR), | ||
318 | INTC_GROUP(VEU, VIO2_VEU0, VIO2_VEU1, VIO2_VEU2, VIO2_VEU3), | ||
319 | INTC_GROUP(BEU, VIO1_BEU0, VIO1_BEU1, VIO1_BEU2), | ||
320 | INTC_GROUP(IIC0, IIC0_ALI0, IIC0_TACKI0, IIC0_WAITI0, IIC0_DTEI0), | ||
321 | INTC_GROUP(IPMMU, IPMMU_IPMMUS, IPMMU_IPMMUB), | ||
322 | INTC_GROUP(IIC2, IIC2_ALI2, IIC2_TACKI2, IIC2_WAITI2, IIC2_DTEI2), | ||
323 | }; | ||
324 | |||
325 | static struct intc_mask_reg intcs_mask_registers[] = { | ||
326 | { 0xffd20184, 0xffd201c4, 8, /* IMR1SA / IMCR1SA */ | ||
327 | { VIO1_BEU2, VIO1_BEU1, VIO1_BEU0, VIO1_CEU, | ||
328 | VIO2_VEU3, VIO2_VEU2, VIO2_VEU1, VIO2_VEU0 } }, | ||
329 | { 0xffd20188, 0xffd201c8, 8, /* IMR2SA / IMCR2SA */ | ||
330 | { VIO3_VOU, 0, VE2HO, VPU, | ||
331 | 0, 0, 0, 0 } }, | ||
332 | { 0xffd2018c, 0xffd201cc, 8, /* IMR3SA / IMCR3SA */ | ||
333 | { _2DDMAC_2DDM3, _2DDMAC_2DDM2, _2DDMAC_2DDM1, _2DDMAC_2DDM0, | ||
334 | BEM, ASA, PEP, ICB } }, | ||
335 | { 0xffd20190, 0xffd201d0, 8, /* IMR4SA / IMCR4SA */ | ||
336 | { 0, 0, MVI3, 0, | ||
337 | JPEG, HQE, 0, LCDC } }, | ||
338 | { 0xffd20194, 0xffd201d4, 8, /* IMR5SA / IMCR5SA */ | ||
339 | { 0, RTDMAC_2_DADERR, RTDMAC_2_DEI5, RTDMAC_2_DEI4, | ||
340 | RTDMAC_1_DEI3, RTDMAC_1_DEI2, RTDMAC_1_DEI1, RTDMAC_1_DEI0 } }, | ||
341 | { 0xffd20198, 0xffd201d8, 8, /* IMR6SA / IMCR6SA */ | ||
342 | { 0, 0, MSIOF, 0, | ||
343 | SGX530, 0, 0, 0 } }, | ||
344 | { 0xffd2019c, 0xffd201dc, 8, /* IMR7SA / IMCR7SA */ | ||
345 | { 0, TMU_TUNI2, TMU_TUNI1, TMU_TUNI0, | ||
346 | 0, 0, 0, 0 } }, | ||
347 | { 0xffd201a4, 0xffd201e4, 8, /* IMR9SA / IMCR9SA */ | ||
348 | { 0, 0, 0, CMT, | ||
349 | IIC2_DTEI2, IIC2_WAITI2, IIC2_TACKI2, IIC2_ALI2 } }, | ||
350 | { 0xffd201a8, 0xffd201e8, 8, /* IMR10SA / IMCR10SA */ | ||
351 | { IPMMU_IPMMUS, 0, IPMMU_IPMMUB, 0, | ||
352 | 0, 0, 0, 0 } }, | ||
353 | { 0xffd201ac, 0xffd201ec, 8, /* IMR11SA / IMCR11SA */ | ||
354 | { IIC0_DTEI0, IIC0_WAITI0, IIC0_TACKI0, IIC0_ALI0, | ||
355 | 0, 0, IPMMUI, TSIF } }, | ||
356 | { 0xffd20104, 0, 16, /* INTAMASK */ | ||
357 | { 0, 0, 0, 0, 0, 0, 0, 0, | ||
358 | 0, 0, 0, 0, 0, 0, 0, INTCS } }, | ||
359 | }; | ||
360 | |||
361 | /* Priority is needed for INTCA to receive the INTCS interrupt */ | ||
362 | static struct intc_prio_reg intcs_prio_registers[] = { | ||
363 | { 0xffd20000, 0, 16, 4, /* IPRAS */ { 0, MVI3, _2DDMAC, ICB } }, | ||
364 | { 0xffd20004, 0, 16, 4, /* IPRBS */ { JPEG, LCDC, 0, 0 } }, | ||
365 | { 0xffd20008, 0, 16, 4, /* IPRCS */ { BBIF2, 0, 0, 0 } }, | ||
366 | { 0xffd20010, 0, 16, 4, /* IPRES */ { RTDMAC_1, VIO1_CEU, 0, VPU } }, | ||
367 | { 0xffd20014, 0, 16, 4, /* IPRFS */ { 0, RTDMAC_2, 0, CMT } }, | ||
368 | { 0xffd20018, 0, 16, 4, /* IPRGS */ { TMU_TUNI0, TMU_TUNI1, | ||
369 | TMU_TUNI2, 0 } }, | ||
370 | { 0xffd2001c, 0, 16, 4, /* IPRHS */ { 0, VIO3_VOU, VEU, BEU } }, | ||
371 | { 0xffd20020, 0, 16, 4, /* IPRIS */ { 0, MSIOF, TSIF, IIC0 } }, | ||
372 | { 0xffd20024, 0, 16, 4, /* IPRJS */ { 0, SGX530, 0, 0 } }, | ||
373 | { 0xffd20028, 0, 16, 4, /* IPRKS */ { BEM, ASA, IPMMUI, PEP } }, | ||
374 | { 0xffd2002c, 0, 16, 4, /* IPRLS */ { IPMMU, 0, VE2HO, HQE } }, | ||
375 | { 0xffd20030, 0, 16, 4, /* IPRMS */ { IIC2, 0, 0, 0 } }, | ||
376 | }; | ||
377 | |||
378 | static struct resource intcs_resources[] __initdata = { | ||
379 | [0] = { | ||
380 | .start = 0xffd20000, | ||
381 | .end = 0xffd2ffff, | ||
382 | .flags = IORESOURCE_MEM, | ||
383 | } | ||
384 | }; | ||
385 | |||
386 | static struct intc_desc intcs_desc __initdata = { | ||
387 | .name = "sh7367-intcs", | ||
388 | .resource = intcs_resources, | ||
389 | .num_resources = ARRAY_SIZE(intcs_resources), | ||
390 | .hw = INTC_HW_DESC(intcs_vectors, intcs_groups, intcs_mask_registers, | ||
391 | intcs_prio_registers, NULL, NULL), | ||
392 | }; | ||
393 | |||
394 | static void intcs_demux(unsigned int irq, struct irq_desc *desc) | ||
395 | { | ||
396 | void __iomem *reg = (void *)irq_get_handler_data(irq); | ||
397 | unsigned int evtcodeas = ioread32(reg); | ||
398 | |||
399 | generic_handle_irq(intcs_evt2irq(evtcodeas)); | ||
400 | } | ||
401 | |||
402 | void __init sh7367_init_irq(void) | ||
403 | { | ||
404 | void __iomem *intevtsa = ioremap_nocache(0xffd20100, PAGE_SIZE); | ||
405 | |||
406 | register_intc_controller(&intca_desc); | ||
407 | register_intc_controller(&intca_irq_pins_desc); | ||
408 | register_intc_controller(&intcs_desc); | ||
409 | |||
410 | /* demux using INTEVTSA */ | ||
411 | irq_set_handler_data(evt2irq(0xf80), (void *)intevtsa); | ||
412 | irq_set_chained_handler(evt2irq(0xf80), intcs_demux); | ||
413 | } | ||
diff --git a/arch/arm/mach-shmobile/intc-sh7377.c b/arch/arm/mach-shmobile/intc-sh7377.c deleted file mode 100644 index b84a460a3405..000000000000 --- a/arch/arm/mach-shmobile/intc-sh7377.c +++ /dev/null | |||
@@ -1,592 +0,0 @@ | |||
1 | /* | ||
2 | * sh7377 processor support - INTC hardware block | ||
3 | * | ||
4 | * Copyright (C) 2010 Magnus Damm | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License as published by | ||
8 | * the Free Software Foundation; version 2 of the License. | ||
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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | ||
18 | */ | ||
19 | #include <linux/kernel.h> | ||
20 | #include <linux/init.h> | ||
21 | #include <linux/interrupt.h> | ||
22 | #include <linux/irq.h> | ||
23 | #include <linux/io.h> | ||
24 | #include <linux/sh_intc.h> | ||
25 | #include <mach/intc.h> | ||
26 | #include <mach/irqs.h> | ||
27 | #include <asm/mach-types.h> | ||
28 | #include <asm/mach/arch.h> | ||
29 | |||
30 | enum { | ||
31 | UNUSED_INTCA = 0, | ||
32 | ENABLED, | ||
33 | DISABLED, | ||
34 | |||
35 | /* interrupt sources INTCA */ | ||
36 | DIRC, | ||
37 | _2DG, | ||
38 | CRYPT_STD, | ||
39 | IIC1_ALI1, IIC1_TACKI1, IIC1_WAITI1, IIC1_DTEI1, | ||
40 | AP_ARM_IRQPMU, AP_ARM_COMMTX, AP_ARM_COMMRX, | ||
41 | MFI_MFIM, MFI_MFIS, | ||
42 | BBIF1, BBIF2, | ||
43 | USBDMAC_USHDMI, | ||
44 | USBHS_USHI0, USBHS_USHI1, | ||
45 | _3DG_SGX540, | ||
46 | CMT1_CMT10, CMT1_CMT11, CMT1_CMT12, CMT1_CMT13, CMT2, CMT3, | ||
47 | KEYSC_KEY, | ||
48 | SCIFA0, SCIFA1, SCIFA2, SCIFA3, | ||
49 | MSIOF2, MSIOF1, | ||
50 | SCIFA4, SCIFA5, SCIFB, | ||
51 | FLCTL_FLSTEI, FLCTL_FLTENDI, FLCTL_FLTREQ0I, FLCTL_FLTREQ1I, | ||
52 | SDHI0, | ||
53 | SDHI1, | ||
54 | MSU_MSU, MSU_MSU2, | ||
55 | IRREM, | ||
56 | MSUG, | ||
57 | IRDA, | ||
58 | TPU0, TPU1, TPU2, TPU3, TPU4, | ||
59 | LCRC, | ||
60 | PINTCA_PINT1, PINTCA_PINT2, | ||
61 | TTI20, | ||
62 | MISTY, | ||
63 | DDM, | ||
64 | RWDT0, RWDT1, | ||
65 | DMAC_1_DEI0, DMAC_1_DEI1, DMAC_1_DEI2, DMAC_1_DEI3, | ||
66 | DMAC_2_DEI4, DMAC_2_DEI5, DMAC_2_DADERR, | ||
67 | DMAC2_1_DEI0, DMAC2_1_DEI1, DMAC2_1_DEI2, DMAC2_1_DEI3, | ||
68 | DMAC2_2_DEI4, DMAC2_2_DEI5, DMAC2_2_DADERR, | ||
69 | DMAC3_1_DEI0, DMAC3_1_DEI1, DMAC3_1_DEI2, DMAC3_1_DEI3, | ||
70 | DMAC3_2_DEI4, DMAC3_2_DEI5, DMAC3_2_DADERR, | ||
71 | SHWYSTAT_RT, SHWYSTAT_HS, SHWYSTAT_COM, | ||
72 | ICUSB_ICUSB0, ICUSB_ICUSB1, | ||
73 | ICUDMC_ICUDMC1, ICUDMC_ICUDMC2, | ||
74 | SPU2_SPU0, SPU2_SPU1, | ||
75 | FSI, | ||
76 | FMSI, | ||
77 | SCUV, | ||
78 | IPMMU_IPMMUB, | ||
79 | AP_ARM_CTIIRQ, AP_ARM_DMAEXTERRIRQ, AP_ARM_DMAIRQ, AP_ARM_DMASIRQ, | ||
80 | MFIS2, | ||
81 | CPORTR2S, | ||
82 | CMT14, CMT15, | ||
83 | SCIFA6, | ||
84 | |||
85 | /* interrupt groups INTCA */ | ||
86 | DMAC_1, DMAC_2, DMAC2_1, DMAC2_2, DMAC3_1, DMAC3_2, SHWYSTAT, | ||
87 | AP_ARM1, AP_ARM2, USBHS, SPU2, FLCTL, IIC1, | ||
88 | ICUSB, ICUDMC | ||
89 | }; | ||
90 | |||
91 | static struct intc_vect intca_vectors[] __initdata = { | ||
92 | INTC_VECT(DIRC, 0x0560), | ||
93 | INTC_VECT(_2DG, 0x05e0), | ||
94 | INTC_VECT(CRYPT_STD, 0x0700), | ||
95 | INTC_VECT(IIC1_ALI1, 0x0780), INTC_VECT(IIC1_TACKI1, 0x07a0), | ||
96 | INTC_VECT(IIC1_WAITI1, 0x07c0), INTC_VECT(IIC1_DTEI1, 0x07e0), | ||
97 | INTC_VECT(AP_ARM_IRQPMU, 0x0800), INTC_VECT(AP_ARM_COMMTX, 0x0840), | ||
98 | INTC_VECT(AP_ARM_COMMRX, 0x0860), | ||
99 | INTC_VECT(MFI_MFIM, 0x0900), INTC_VECT(MFI_MFIS, 0x0920), | ||
100 | INTC_VECT(BBIF1, 0x0940), INTC_VECT(BBIF2, 0x0960), | ||
101 | INTC_VECT(USBDMAC_USHDMI, 0x0a00), | ||
102 | INTC_VECT(USBHS_USHI0, 0x0a20), INTC_VECT(USBHS_USHI1, 0x0a40), | ||
103 | INTC_VECT(_3DG_SGX540, 0x0a60), | ||
104 | INTC_VECT(CMT1_CMT10, 0x0b00), INTC_VECT(CMT1_CMT11, 0x0b20), | ||
105 | INTC_VECT(CMT1_CMT12, 0x0b40), INTC_VECT(CMT1_CMT13, 0x0b60), | ||
106 | INTC_VECT(CMT2, 0x0b80), INTC_VECT(CMT3, 0x0ba0), | ||
107 | INTC_VECT(KEYSC_KEY, 0x0be0), | ||
108 | INTC_VECT(SCIFA0, 0x0c00), INTC_VECT(SCIFA1, 0x0c20), | ||
109 | INTC_VECT(SCIFA2, 0x0c40), INTC_VECT(SCIFA3, 0x0c60), | ||
110 | INTC_VECT(MSIOF2, 0x0c80), INTC_VECT(MSIOF1, 0x0d00), | ||
111 | INTC_VECT(SCIFA4, 0x0d20), INTC_VECT(SCIFA5, 0x0d40), | ||
112 | INTC_VECT(SCIFB, 0x0d60), | ||
113 | INTC_VECT(FLCTL_FLSTEI, 0x0d80), INTC_VECT(FLCTL_FLTENDI, 0x0da0), | ||
114 | INTC_VECT(FLCTL_FLTREQ0I, 0x0dc0), INTC_VECT(FLCTL_FLTREQ1I, 0x0de0), | ||
115 | INTC_VECT(SDHI0, 0x0e00), INTC_VECT(SDHI0, 0x0e20), | ||
116 | INTC_VECT(SDHI0, 0x0e40), INTC_VECT(SDHI0, 0x0e60), | ||
117 | INTC_VECT(SDHI1, 0x0e80), INTC_VECT(SDHI1, 0x0ea0), | ||
118 | INTC_VECT(SDHI1, 0x0ec0), INTC_VECT(SDHI1, 0x0ee0), | ||
119 | INTC_VECT(MSU_MSU, 0x0f20), INTC_VECT(MSU_MSU2, 0x0f40), | ||
120 | INTC_VECT(IRREM, 0x0f60), | ||
121 | INTC_VECT(MSUG, 0x0fa0), | ||
122 | INTC_VECT(IRDA, 0x0480), | ||
123 | INTC_VECT(TPU0, 0x04a0), INTC_VECT(TPU1, 0x04c0), | ||
124 | INTC_VECT(TPU2, 0x04e0), INTC_VECT(TPU3, 0x0500), | ||
125 | INTC_VECT(TPU4, 0x0520), | ||
126 | INTC_VECT(LCRC, 0x0540), | ||
127 | INTC_VECT(PINTCA_PINT1, 0x1000), INTC_VECT(PINTCA_PINT2, 0x1020), | ||
128 | INTC_VECT(TTI20, 0x1100), | ||
129 | INTC_VECT(MISTY, 0x1120), | ||
130 | INTC_VECT(DDM, 0x1140), | ||
131 | INTC_VECT(RWDT0, 0x1280), INTC_VECT(RWDT1, 0x12a0), | ||
132 | INTC_VECT(DMAC_1_DEI0, 0x2000), INTC_VECT(DMAC_1_DEI1, 0x2020), | ||
133 | INTC_VECT(DMAC_1_DEI2, 0x2040), INTC_VECT(DMAC_1_DEI3, 0x2060), | ||
134 | INTC_VECT(DMAC_2_DEI4, 0x2080), INTC_VECT(DMAC_2_DEI5, 0x20a0), | ||
135 | INTC_VECT(DMAC_2_DADERR, 0x20c0), | ||
136 | INTC_VECT(DMAC2_1_DEI0, 0x2100), INTC_VECT(DMAC2_1_DEI1, 0x2120), | ||
137 | INTC_VECT(DMAC2_1_DEI2, 0x2140), INTC_VECT(DMAC2_1_DEI3, 0x2160), | ||
138 | INTC_VECT(DMAC2_2_DEI4, 0x2180), INTC_VECT(DMAC2_2_DEI5, 0x21a0), | ||
139 | INTC_VECT(DMAC2_2_DADERR, 0x21c0), | ||
140 | INTC_VECT(DMAC3_1_DEI0, 0x2200), INTC_VECT(DMAC3_1_DEI1, 0x2220), | ||
141 | INTC_VECT(DMAC3_1_DEI2, 0x2240), INTC_VECT(DMAC3_1_DEI3, 0x2260), | ||
142 | INTC_VECT(DMAC3_2_DEI4, 0x2280), INTC_VECT(DMAC3_2_DEI5, 0x22a0), | ||
143 | INTC_VECT(DMAC3_2_DADERR, 0x22c0), | ||
144 | INTC_VECT(SHWYSTAT_RT, 0x1300), INTC_VECT(SHWYSTAT_HS, 0x1d20), | ||
145 | INTC_VECT(SHWYSTAT_COM, 0x1340), | ||
146 | INTC_VECT(ICUSB_ICUSB0, 0x1700), INTC_VECT(ICUSB_ICUSB1, 0x1720), | ||
147 | INTC_VECT(ICUDMC_ICUDMC1, 0x1780), INTC_VECT(ICUDMC_ICUDMC2, 0x17a0), | ||
148 | INTC_VECT(SPU2_SPU0, 0x1800), INTC_VECT(SPU2_SPU1, 0x1820), | ||
149 | INTC_VECT(FSI, 0x1840), | ||
150 | INTC_VECT(FMSI, 0x1860), | ||
151 | INTC_VECT(SCUV, 0x1880), | ||
152 | INTC_VECT(IPMMU_IPMMUB, 0x1900), | ||
153 | INTC_VECT(AP_ARM_CTIIRQ, 0x1980), | ||
154 | INTC_VECT(AP_ARM_DMAEXTERRIRQ, 0x19a0), | ||
155 | INTC_VECT(AP_ARM_DMAIRQ, 0x19c0), | ||
156 | INTC_VECT(AP_ARM_DMASIRQ, 0x19e0), | ||
157 | INTC_VECT(MFIS2, 0x1a00), | ||
158 | INTC_VECT(CPORTR2S, 0x1a20), | ||
159 | INTC_VECT(CMT14, 0x1a40), INTC_VECT(CMT15, 0x1a60), | ||
160 | INTC_VECT(SCIFA6, 0x1a80), | ||
161 | }; | ||
162 | |||
163 | static struct intc_group intca_groups[] __initdata = { | ||
164 | INTC_GROUP(DMAC_1, DMAC_1_DEI0, | ||
165 | DMAC_1_DEI1, DMAC_1_DEI2, DMAC_1_DEI3), | ||
166 | INTC_GROUP(DMAC_2, DMAC_2_DEI4, | ||
167 | DMAC_2_DEI5, DMAC_2_DADERR), | ||
168 | INTC_GROUP(DMAC2_1, DMAC2_1_DEI0, | ||
169 | DMAC2_1_DEI1, DMAC2_1_DEI2, DMAC2_1_DEI3), | ||
170 | INTC_GROUP(DMAC2_2, DMAC2_2_DEI4, | ||
171 | DMAC2_2_DEI5, DMAC2_2_DADERR), | ||
172 | INTC_GROUP(DMAC3_1, DMAC3_1_DEI0, | ||
173 | DMAC3_1_DEI1, DMAC3_1_DEI2, DMAC3_1_DEI3), | ||
174 | INTC_GROUP(DMAC3_2, DMAC3_2_DEI4, | ||
175 | DMAC3_2_DEI5, DMAC3_2_DADERR), | ||
176 | INTC_GROUP(AP_ARM1, AP_ARM_IRQPMU, AP_ARM_COMMTX, AP_ARM_COMMTX), | ||
177 | INTC_GROUP(USBHS, USBHS_USHI0, USBHS_USHI1), | ||
178 | INTC_GROUP(SPU2, SPU2_SPU0, SPU2_SPU1), | ||
179 | INTC_GROUP(FLCTL, FLCTL_FLSTEI, FLCTL_FLTENDI, | ||
180 | FLCTL_FLTREQ0I, FLCTL_FLTREQ1I), | ||
181 | INTC_GROUP(IIC1, IIC1_ALI1, IIC1_TACKI1, IIC1_WAITI1, IIC1_DTEI1), | ||
182 | INTC_GROUP(SHWYSTAT, SHWYSTAT_RT, SHWYSTAT_HS, SHWYSTAT_COM), | ||
183 | INTC_GROUP(ICUSB, ICUSB_ICUSB0, ICUSB_ICUSB1), | ||
184 | INTC_GROUP(ICUDMC, ICUDMC_ICUDMC1, ICUDMC_ICUDMC2), | ||
185 | }; | ||
186 | |||
187 | static struct intc_mask_reg intca_mask_registers[] __initdata = { | ||
188 | { 0xe6940080, 0xe69400c0, 8, /* IMR0A / IMCR0A */ | ||
189 | { DMAC2_1_DEI3, DMAC2_1_DEI2, DMAC2_1_DEI1, DMAC2_1_DEI0, | ||
190 | AP_ARM_IRQPMU, 0, AP_ARM_COMMTX, AP_ARM_COMMRX } }, | ||
191 | { 0xe6940084, 0xe69400c4, 8, /* IMR1A / IMCR1A */ | ||
192 | { _2DG, CRYPT_STD, DIRC, 0, | ||
193 | DMAC_1_DEI3, DMAC_1_DEI2, DMAC_1_DEI1, DMAC_1_DEI0 } }, | ||
194 | { 0xe6940088, 0xe69400c8, 8, /* IMR2A / IMCR2A */ | ||
195 | { PINTCA_PINT1, PINTCA_PINT2, 0, 0, | ||
196 | BBIF1, BBIF2, MFI_MFIS, MFI_MFIM } }, | ||
197 | { 0xe694008c, 0xe69400cc, 8, /* IMR3A / IMCR3A */ | ||
198 | { DMAC3_1_DEI3, DMAC3_1_DEI2, DMAC3_1_DEI1, DMAC3_1_DEI0, | ||
199 | DMAC3_2_DADERR, DMAC3_2_DEI5, DMAC3_2_DEI4, IRDA } }, | ||
200 | { 0xe6940090, 0xe69400d0, 8, /* IMR4A / IMCR4A */ | ||
201 | { DDM, 0, 0, 0, | ||
202 | 0, 0, 0, 0 } }, | ||
203 | { 0xe6940094, 0xe69400d4, 8, /* IMR5A / IMCR5A */ | ||
204 | { KEYSC_KEY, DMAC_2_DADERR, DMAC_2_DEI5, DMAC_2_DEI4, | ||
205 | SCIFA3, SCIFA2, SCIFA1, SCIFA0 } }, | ||
206 | { 0xe6940098, 0xe69400d8, 8, /* IMR6A / IMCR6A */ | ||
207 | { SCIFB, SCIFA5, SCIFA4, MSIOF1, | ||
208 | 0, 0, MSIOF2, 0 } }, | ||
209 | { 0xe694009c, 0xe69400dc, 8, /* IMR7A / IMCR7A */ | ||
210 | { DISABLED, ENABLED, ENABLED, ENABLED, | ||
211 | FLCTL_FLTREQ1I, FLCTL_FLTREQ0I, FLCTL_FLTENDI, FLCTL_FLSTEI } }, | ||
212 | { 0xe69400a0, 0xe69400e0, 8, /* IMR8A / IMCR8A */ | ||
213 | { DISABLED, ENABLED, ENABLED, ENABLED, | ||
214 | TTI20, USBDMAC_USHDMI, 0, MSUG } }, | ||
215 | { 0xe69400a4, 0xe69400e4, 8, /* IMR9A / IMCR9A */ | ||
216 | { CMT1_CMT13, CMT1_CMT12, CMT1_CMT11, CMT1_CMT10, | ||
217 | CMT2, USBHS_USHI1, USBHS_USHI0, _3DG_SGX540 } }, | ||
218 | { 0xe69400a8, 0xe69400e8, 8, /* IMR10A / IMCR10A */ | ||
219 | { 0, DMAC2_2_DADERR, DMAC2_2_DEI5, DMAC2_2_DEI4, | ||
220 | 0, 0, 0, 0 } }, | ||
221 | { 0xe69400ac, 0xe69400ec, 8, /* IMR11A / IMCR11A */ | ||
222 | { IIC1_DTEI1, IIC1_WAITI1, IIC1_TACKI1, IIC1_ALI1, | ||
223 | LCRC, MSU_MSU2, IRREM, MSU_MSU } }, | ||
224 | { 0xe69400b0, 0xe69400f0, 8, /* IMR12A / IMCR12A */ | ||
225 | { 0, 0, TPU0, TPU1, | ||
226 | TPU2, TPU3, TPU4, 0 } }, | ||
227 | { 0xe69400b4, 0xe69400f4, 8, /* IMR13A / IMCR13A */ | ||
228 | { 0, 0, 0, 0, | ||
229 | MISTY, CMT3, RWDT1, RWDT0 } }, | ||
230 | { 0xe6950080, 0xe69500c0, 8, /* IMR0A3 / IMCR0A3 */ | ||
231 | { SHWYSTAT_RT, SHWYSTAT_HS, SHWYSTAT_COM, 0, | ||
232 | 0, 0, 0, 0 } }, | ||
233 | { 0xe6950090, 0xe69500d0, 8, /* IMR4A3 / IMCR4A3 */ | ||
234 | { ICUSB_ICUSB0, ICUSB_ICUSB1, 0, 0, | ||
235 | ICUDMC_ICUDMC1, ICUDMC_ICUDMC2, 0, 0 } }, | ||
236 | { 0xe6950094, 0xe69500d4, 8, /* IMR5A3 / IMCR5A3 */ | ||
237 | { SPU2_SPU0, SPU2_SPU1, FSI, FMSI, | ||
238 | SCUV, 0, 0, 0 } }, | ||
239 | { 0xe6950098, 0xe69500d8, 8, /* IMR6A3 / IMCR6A3 */ | ||
240 | { IPMMU_IPMMUB, 0, 0, 0, | ||
241 | AP_ARM_CTIIRQ, AP_ARM_DMAEXTERRIRQ, | ||
242 | AP_ARM_DMAIRQ, AP_ARM_DMASIRQ } }, | ||
243 | { 0xe695009c, 0xe69500dc, 8, /* IMR7A3 / IMCR7A3 */ | ||
244 | { MFIS2, CPORTR2S, CMT14, CMT15, | ||
245 | SCIFA6, 0, 0, 0 } }, | ||
246 | }; | ||
247 | |||
248 | static struct intc_prio_reg intca_prio_registers[] __initdata = { | ||
249 | { 0xe6940000, 0, 16, 4, /* IPRAA */ { DMAC3_1, DMAC3_2, CMT2, LCRC } }, | ||
250 | { 0xe6940004, 0, 16, 4, /* IPRBA */ { IRDA, 0, BBIF1, BBIF2 } }, | ||
251 | { 0xe6940008, 0, 16, 4, /* IPRCA */ { _2DG, CRYPT_STD, | ||
252 | CMT1_CMT11, AP_ARM1 } }, | ||
253 | { 0xe694000c, 0, 16, 4, /* IPRDA */ { PINTCA_PINT1, PINTCA_PINT2, | ||
254 | CMT1_CMT12, TPU4 } }, | ||
255 | { 0xe6940010, 0, 16, 4, /* IPREA */ { DMAC_1, MFI_MFIS, | ||
256 | MFI_MFIM, USBHS } }, | ||
257 | { 0xe6940014, 0, 16, 4, /* IPRFA */ { KEYSC_KEY, DMAC_2, | ||
258 | _3DG_SGX540, CMT1_CMT10 } }, | ||
259 | { 0xe6940018, 0, 16, 4, /* IPRGA */ { SCIFA0, SCIFA1, | ||
260 | SCIFA2, SCIFA3 } }, | ||
261 | { 0xe694001c, 0, 16, 4, /* IPRGH */ { MSIOF2, USBDMAC_USHDMI, | ||
262 | FLCTL, SDHI0 } }, | ||
263 | { 0xe6940020, 0, 16, 4, /* IPRIA */ { MSIOF1, SCIFA4, MSU_MSU, IIC1 } }, | ||
264 | { 0xe6940024, 0, 16, 4, /* IPRJA */ { DMAC2_1, DMAC2_2, MSUG, TTI20 } }, | ||
265 | { 0xe6940028, 0, 16, 4, /* IPRKA */ { 0, CMT1_CMT13, IRREM, SDHI1 } }, | ||
266 | { 0xe694002c, 0, 16, 4, /* IPRLA */ { TPU0, TPU1, TPU2, TPU3 } }, | ||
267 | { 0xe6940030, 0, 16, 4, /* IPRMA */ { MISTY, CMT3, RWDT1, RWDT0 } }, | ||
268 | { 0xe6940034, 0, 16, 4, /* IPRNA */ { SCIFB, SCIFA5, 0, DDM } }, | ||
269 | { 0xe6940038, 0, 16, 4, /* IPROA */ { 0, 0, DIRC, 0 } }, | ||
270 | { 0xe6950000, 0, 16, 4, /* IPRAA3 */ { SHWYSTAT, 0, 0, 0 } }, | ||
271 | { 0xe6950020, 0, 16, 4, /* IPRIA3 */ { ICUSB, 0, 0, 0 } }, | ||
272 | { 0xe6950024, 0, 16, 4, /* IPRJA3 */ { ICUDMC, 0, 0, 0 } }, | ||
273 | { 0xe6950028, 0, 16, 4, /* IPRKA3 */ { SPU2, 0, FSI, FMSI } }, | ||
274 | { 0xe695002c, 0, 16, 4, /* IPRLA3 */ { SCUV, 0, 0, 0 } }, | ||
275 | { 0xe6950030, 0, 16, 4, /* IPRMA3 */ { IPMMU_IPMMUB, 0, 0, 0 } }, | ||
276 | { 0xe6950034, 0, 16, 4, /* IPRNA3 */ { AP_ARM2, 0, 0, 0 } }, | ||
277 | { 0xe6950038, 0, 16, 4, /* IPROA3 */ { MFIS2, CPORTR2S, | ||
278 | CMT14, CMT15 } }, | ||
279 | { 0xe694003c, 0, 16, 4, /* IPRPA3 */ { SCIFA6, 0, 0, 0 } }, | ||
280 | }; | ||
281 | |||
282 | static struct intc_desc intca_desc __initdata = { | ||
283 | .name = "sh7377-intca", | ||
284 | .force_enable = ENABLED, | ||
285 | .force_disable = DISABLED, | ||
286 | .hw = INTC_HW_DESC(intca_vectors, intca_groups, | ||
287 | intca_mask_registers, intca_prio_registers, | ||
288 | NULL, NULL), | ||
289 | }; | ||
290 | |||
291 | INTC_IRQ_PINS_32(intca_irq_pins, 0xe6900000, | ||
292 | INTC_VECT, "sh7377-intca-irq-pins"); | ||
293 | |||
294 | /* this macro ignore entry which is also in INTCA */ | ||
295 | #define __IGNORE(a...) | ||
296 | #define __IGNORE0(a...) 0 | ||
297 | |||
298 | enum { | ||
299 | UNUSED_INTCS = 0, | ||
300 | |||
301 | INTCS, | ||
302 | |||
303 | /* interrupt sources INTCS */ | ||
304 | VEU_VEU0, VEU_VEU1, VEU_VEU2, VEU_VEU3, | ||
305 | RTDMAC1_1_DEI0, RTDMAC1_1_DEI1, RTDMAC1_1_DEI2, RTDMAC1_1_DEI3, | ||
306 | CEU, | ||
307 | BEU_BEU0, BEU_BEU1, BEU_BEU2, | ||
308 | __IGNORE(MFI) | ||
309 | __IGNORE(BBIF2) | ||
310 | VPU, | ||
311 | TSIF1, | ||
312 | __IGNORE(SGX540) | ||
313 | _2DDMAC, | ||
314 | IIC2_ALI2, IIC2_TACKI2, IIC2_WAITI2, IIC2_DTEI2, | ||
315 | IPMMU_IPMMUR, IPMMU_IPMMUR2, | ||
316 | RTDMAC1_2_DEI4, RTDMAC1_2_DEI5, RTDMAC1_2_DADERR, | ||
317 | __IGNORE(KEYSC) | ||
318 | __IGNORE(TTI20) | ||
319 | __IGNORE(MSIOF) | ||
320 | IIC0_ALI0, IIC0_TACKI0, IIC0_WAITI0, IIC0_DTEI0, | ||
321 | TMU_TUNI0, TMU_TUNI1, TMU_TUNI2, | ||
322 | CMT0, | ||
323 | TSIF0, | ||
324 | __IGNORE(CMT2) | ||
325 | LMB, | ||
326 | __IGNORE(MSUG) | ||
327 | __IGNORE(MSU_MSU, MSU_MSU2) | ||
328 | __IGNORE(CTI) | ||
329 | MVI3, | ||
330 | __IGNORE(RWDT0) | ||
331 | __IGNORE(RWDT1) | ||
332 | ICB, | ||
333 | PEP, | ||
334 | ASA, | ||
335 | __IGNORE(_2DG) | ||
336 | HQE, | ||
337 | JPU, | ||
338 | LCDC0, | ||
339 | __IGNORE(LCRC) | ||
340 | RTDMAC2_1_DEI0, RTDMAC2_1_DEI1, RTDMAC2_1_DEI2, RTDMAC2_1_DEI3, | ||
341 | RTDMAC2_2_DEI4, RTDMAC2_2_DEI5, RTDMAC2_2_DADERR, | ||
342 | FRC, | ||
343 | LCDC1, | ||
344 | CSIRX, | ||
345 | DSITX_DSITX0, DSITX_DSITX1, | ||
346 | __IGNORE(SPU2_SPU0, SPU2_SPU1) | ||
347 | __IGNORE(FSI) | ||
348 | __IGNORE(FMSI) | ||
349 | __IGNORE(SCUV) | ||
350 | TMU1_TUNI10, TMU1_TUNI11, TMU1_TUNI12, | ||
351 | TSIF2, | ||
352 | CMT4, | ||
353 | __IGNORE(MFIS2) | ||
354 | CPORTS2R, | ||
355 | |||
356 | /* interrupt groups INTCS */ | ||
357 | RTDMAC1_1, RTDMAC1_2, VEU, BEU, IIC0, __IGNORE(MSU) IPMMU, | ||
358 | IIC2, RTDMAC2_1, RTDMAC2_2, DSITX, __IGNORE(SPU2) TMU1, | ||
359 | }; | ||
360 | |||
361 | #define INTCS_INTVECT 0x0F80 | ||
362 | static struct intc_vect intcs_vectors[] __initdata = { | ||
363 | INTCS_VECT(VEU_VEU0, 0x0700), INTCS_VECT(VEU_VEU1, 0x0720), | ||
364 | INTCS_VECT(VEU_VEU2, 0x0740), INTCS_VECT(VEU_VEU3, 0x0760), | ||
365 | INTCS_VECT(RTDMAC1_1_DEI0, 0x0800), INTCS_VECT(RTDMAC1_1_DEI1, 0x0820), | ||
366 | INTCS_VECT(RTDMAC1_1_DEI2, 0x0840), INTCS_VECT(RTDMAC1_1_DEI3, 0x0860), | ||
367 | INTCS_VECT(CEU, 0x0880), | ||
368 | INTCS_VECT(BEU_BEU0, 0x08A0), | ||
369 | INTCS_VECT(BEU_BEU1, 0x08C0), | ||
370 | INTCS_VECT(BEU_BEU2, 0x08E0), | ||
371 | __IGNORE(INTCS_VECT(MFI, 0x0900)) | ||
372 | __IGNORE(INTCS_VECT(BBIF2, 0x0960)) | ||
373 | INTCS_VECT(VPU, 0x0980), | ||
374 | INTCS_VECT(TSIF1, 0x09A0), | ||
375 | __IGNORE(INTCS_VECT(SGX540, 0x09E0)) | ||
376 | INTCS_VECT(_2DDMAC, 0x0A00), | ||
377 | INTCS_VECT(IIC2_ALI2, 0x0A80), INTCS_VECT(IIC2_TACKI2, 0x0AA0), | ||
378 | INTCS_VECT(IIC2_WAITI2, 0x0AC0), INTCS_VECT(IIC2_DTEI2, 0x0AE0), | ||
379 | INTCS_VECT(IPMMU_IPMMUR, 0x0B00), INTCS_VECT(IPMMU_IPMMUR2, 0x0B20), | ||
380 | INTCS_VECT(RTDMAC1_2_DEI4, 0x0B80), | ||
381 | INTCS_VECT(RTDMAC1_2_DEI5, 0x0BA0), | ||
382 | INTCS_VECT(RTDMAC1_2_DADERR, 0x0BC0), | ||
383 | __IGNORE(INTCS_VECT(KEYSC 0x0BE0)) | ||
384 | __IGNORE(INTCS_VECT(TTI20, 0x0C80)) | ||
385 | __IGNORE(INTCS_VECT(MSIOF, 0x0D20)) | ||
386 | INTCS_VECT(IIC0_ALI0, 0x0E00), INTCS_VECT(IIC0_TACKI0, 0x0E20), | ||
387 | INTCS_VECT(IIC0_WAITI0, 0x0E40), INTCS_VECT(IIC0_DTEI0, 0x0E60), | ||
388 | INTCS_VECT(TMU_TUNI0, 0x0E80), | ||
389 | INTCS_VECT(TMU_TUNI1, 0x0EA0), | ||
390 | INTCS_VECT(TMU_TUNI2, 0x0EC0), | ||
391 | INTCS_VECT(CMT0, 0x0F00), | ||
392 | INTCS_VECT(TSIF0, 0x0F20), | ||
393 | __IGNORE(INTCS_VECT(CMT2, 0x0F40)) | ||
394 | INTCS_VECT(LMB, 0x0F60), | ||
395 | __IGNORE(INTCS_VECT(MSUG, 0x0F80)) | ||
396 | __IGNORE(INTCS_VECT(MSU_MSU, 0x0FA0)) | ||
397 | __IGNORE(INTCS_VECT(MSU_MSU2, 0x0FC0)) | ||
398 | __IGNORE(INTCS_VECT(CTI, 0x0400)) | ||
399 | INTCS_VECT(MVI3, 0x0420), | ||
400 | __IGNORE(INTCS_VECT(RWDT0, 0x0440)) | ||
401 | __IGNORE(INTCS_VECT(RWDT1, 0x0460)) | ||
402 | INTCS_VECT(ICB, 0x0480), | ||
403 | INTCS_VECT(PEP, 0x04A0), | ||
404 | INTCS_VECT(ASA, 0x04C0), | ||
405 | __IGNORE(INTCS_VECT(_2DG, 0x04E0)) | ||
406 | INTCS_VECT(HQE, 0x0540), | ||
407 | INTCS_VECT(JPU, 0x0560), | ||
408 | INTCS_VECT(LCDC0, 0x0580), | ||
409 | __IGNORE(INTCS_VECT(LCRC, 0x05A0)) | ||
410 | INTCS_VECT(RTDMAC2_1_DEI0, 0x1300), INTCS_VECT(RTDMAC2_1_DEI1, 0x1320), | ||
411 | INTCS_VECT(RTDMAC2_1_DEI2, 0x1340), INTCS_VECT(RTDMAC2_1_DEI3, 0x1360), | ||
412 | INTCS_VECT(RTDMAC2_2_DEI4, 0x1380), INTCS_VECT(RTDMAC2_2_DEI5, 0x13A0), | ||
413 | INTCS_VECT(RTDMAC2_2_DADERR, 0x13C0), | ||
414 | INTCS_VECT(FRC, 0x1700), | ||
415 | INTCS_VECT(LCDC1, 0x1780), | ||
416 | INTCS_VECT(CSIRX, 0x17A0), | ||
417 | INTCS_VECT(DSITX_DSITX0, 0x17C0), INTCS_VECT(DSITX_DSITX1, 0x17E0), | ||
418 | __IGNORE(INTCS_VECT(SPU2_SPU0, 0x1800)) | ||
419 | __IGNORE(INTCS_VECT(SPU2_SPU1, 0x1820)) | ||
420 | __IGNORE(INTCS_VECT(FSI, 0x1840)) | ||
421 | __IGNORE(INTCS_VECT(FMSI, 0x1860)) | ||
422 | __IGNORE(INTCS_VECT(SCUV, 0x1880)) | ||
423 | INTCS_VECT(TMU1_TUNI10, 0x1900), INTCS_VECT(TMU1_TUNI11, 0x1920), | ||
424 | INTCS_VECT(TMU1_TUNI12, 0x1940), | ||
425 | INTCS_VECT(TSIF2, 0x1960), | ||
426 | INTCS_VECT(CMT4, 0x1980), | ||
427 | __IGNORE(INTCS_VECT(MFIS2, 0x1A00)) | ||
428 | INTCS_VECT(CPORTS2R, 0x1A20), | ||
429 | |||
430 | INTC_VECT(INTCS, INTCS_INTVECT), | ||
431 | }; | ||
432 | |||
433 | static struct intc_group intcs_groups[] __initdata = { | ||
434 | INTC_GROUP(RTDMAC1_1, | ||
435 | RTDMAC1_1_DEI0, RTDMAC1_1_DEI1, | ||
436 | RTDMAC1_1_DEI2, RTDMAC1_1_DEI3), | ||
437 | INTC_GROUP(RTDMAC1_2, | ||
438 | RTDMAC1_2_DEI4, RTDMAC1_2_DEI5, RTDMAC1_2_DADERR), | ||
439 | INTC_GROUP(VEU, VEU_VEU0, VEU_VEU1, VEU_VEU2, VEU_VEU3), | ||
440 | INTC_GROUP(BEU, BEU_BEU0, BEU_BEU1, BEU_BEU2), | ||
441 | INTC_GROUP(IIC0, IIC0_ALI0, IIC0_TACKI0, IIC0_WAITI0, IIC0_DTEI0), | ||
442 | __IGNORE(INTC_GROUP(MSU, MSU_MSU, MSU_MSU2)) | ||
443 | INTC_GROUP(IPMMU, IPMMU_IPMMUR, IPMMU_IPMMUR2), | ||
444 | INTC_GROUP(IIC2, IIC2_ALI2, IIC2_TACKI2, IIC2_WAITI2, IIC2_DTEI2), | ||
445 | INTC_GROUP(RTDMAC2_1, | ||
446 | RTDMAC2_1_DEI0, RTDMAC2_1_DEI1, | ||
447 | RTDMAC2_1_DEI2, RTDMAC2_1_DEI3), | ||
448 | INTC_GROUP(RTDMAC2_2, RTDMAC2_2_DEI4, RTDMAC2_2_DEI5, RTDMAC2_2_DADERR), | ||
449 | INTC_GROUP(DSITX, DSITX_DSITX0, DSITX_DSITX1), | ||
450 | __IGNORE(INTC_GROUP(SPU2, SPU2_SPU0, SPU2_SPU1)) | ||
451 | INTC_GROUP(TMU1, TMU1_TUNI10, TMU1_TUNI11, TMU1_TUNI12), | ||
452 | }; | ||
453 | |||
454 | static struct intc_mask_reg intcs_mask_registers[] __initdata = { | ||
455 | { 0xE6940184, 0xE69401C4, 8, /* IMR1AS / IMCR1AS */ | ||
456 | { BEU_BEU2, BEU_BEU1, BEU_BEU0, CEU, | ||
457 | VEU_VEU3, VEU_VEU2, VEU_VEU1, VEU_VEU0 } }, | ||
458 | { 0xE6940188, 0xE69401C8, 8, /* IMR2AS / IMCR2AS */ | ||
459 | { 0, 0, 0, VPU, | ||
460 | __IGNORE0(BBIF2), 0, 0, __IGNORE0(MFI) } }, | ||
461 | { 0xE694018C, 0xE69401CC, 8, /* IMR3AS / IMCR3AS */ | ||
462 | { 0, 0, 0, _2DDMAC, | ||
463 | __IGNORE0(_2DG), ASA, PEP, ICB } }, | ||
464 | { 0xE6940190, 0xE69401D0, 8, /* IMR4AS / IMCR4AS */ | ||
465 | { 0, 0, MVI3, __IGNORE0(CTI), | ||
466 | JPU, HQE, __IGNORE0(LCRC), LCDC0 } }, | ||
467 | { 0xE6940194, 0xE69401D4, 8, /* IMR5AS / IMCR5AS */ | ||
468 | { __IGNORE0(KEYSC), RTDMAC1_2_DADERR, RTDMAC1_2_DEI5, RTDMAC1_2_DEI4, | ||
469 | RTDMAC1_1_DEI3, RTDMAC1_1_DEI2, RTDMAC1_1_DEI1, RTDMAC1_1_DEI0 } }, | ||
470 | __IGNORE({ 0xE6940198, 0xE69401D8, 8, /* IMR6AS / IMCR6AS */ | ||
471 | { 0, 0, MSIOF, 0, | ||
472 | SGX540, 0, TTI20, 0 } }) | ||
473 | { 0xE694019C, 0xE69401DC, 8, /* IMR7AS / IMCR7AS */ | ||
474 | { 0, TMU_TUNI2, TMU_TUNI1, TMU_TUNI0, | ||
475 | 0, 0, 0, 0 } }, | ||
476 | __IGNORE({ 0xE69401A0, 0xE69401E0, 8, /* IMR8AS / IMCR8AS */ | ||
477 | { 0, 0, 0, 0, | ||
478 | 0, MSU_MSU, MSU_MSU2, MSUG } }) | ||
479 | { 0xE69401A4, 0xE69401E4, 8, /* IMR9AS / IMCR9AS */ | ||
480 | { __IGNORE0(RWDT1), __IGNORE0(RWDT0), __IGNORE0(CMT2), CMT0, | ||
481 | IIC2_DTEI2, IIC2_WAITI2, IIC2_TACKI2, IIC2_ALI2 } }, | ||
482 | { 0xE69401A8, 0xE69401E8, 8, /* IMR10AS / IMCR10AS */ | ||
483 | { 0, 0, IPMMU_IPMMUR, IPMMU_IPMMUR2, | ||
484 | 0, 0, 0, 0 } }, | ||
485 | { 0xE69401AC, 0xE69401EC, 8, /* IMR11AS / IMCR11AS */ | ||
486 | { IIC0_DTEI0, IIC0_WAITI0, IIC0_TACKI0, IIC0_ALI0, | ||
487 | 0, TSIF1, LMB, TSIF0 } }, | ||
488 | { 0xE6950180, 0xE69501C0, 8, /* IMR0AS3 / IMCR0AS3 */ | ||
489 | { RTDMAC2_1_DEI0, RTDMAC2_1_DEI1, RTDMAC2_1_DEI2, RTDMAC2_1_DEI3, | ||
490 | RTDMAC2_2_DEI4, RTDMAC2_2_DEI5, RTDMAC2_2_DADERR, 0 } }, | ||
491 | { 0xE6950190, 0xE69501D0, 8, /* IMR4AS3 / IMCR4AS3 */ | ||
492 | { FRC, 0, 0, 0, | ||
493 | LCDC1, CSIRX, DSITX_DSITX0, DSITX_DSITX1 } }, | ||
494 | __IGNORE({ 0xE6950194, 0xE69501D4, 8, /* IMR5AS3 / IMCR5AS3 */ | ||
495 | {SPU2_SPU0, SPU2_SPU1, FSI, FMSI, | ||
496 | SCUV, 0, 0, 0 } }) | ||
497 | { 0xE6950198, 0xE69501D8, 8, /* IMR6AS3 / IMCR6AS3 */ | ||
498 | { TMU1_TUNI10, TMU1_TUNI11, TMU1_TUNI12, TSIF2, | ||
499 | CMT4, 0, 0, 0 } }, | ||
500 | { 0xE695019C, 0xE69501DC, 8, /* IMR7AS3 / IMCR7AS3 */ | ||
501 | { __IGNORE0(MFIS2), CPORTS2R, 0, 0, | ||
502 | 0, 0, 0, 0 } }, | ||
503 | { 0xFFD20104, 0, 16, /* INTAMASK */ | ||
504 | { 0, 0, 0, 0, 0, 0, 0, 0, | ||
505 | 0, 0, 0, 0, 0, 0, 0, INTCS } } | ||
506 | }; | ||
507 | |||
508 | static struct intc_prio_reg intcs_prio_registers[] __initdata = { | ||
509 | /* IPRAS */ | ||
510 | { 0xFFD20000, 0, 16, 4, { __IGNORE0(CTI), MVI3, _2DDMAC, ICB } }, | ||
511 | /* IPRBS */ | ||
512 | { 0xFFD20004, 0, 16, 4, { JPU, LCDC0, 0, __IGNORE0(LCRC) } }, | ||
513 | /* IPRCS */ | ||
514 | __IGNORE({ 0xFFD20008, 0, 16, 4, { BBIF2, 0, 0, 0 } }) | ||
515 | /* IPRES */ | ||
516 | { 0xFFD20010, 0, 16, 4, { RTDMAC1_1, CEU, __IGNORE0(MFI), VPU } }, | ||
517 | /* IPRFS */ | ||
518 | { 0xFFD20014, 0, 16, 4, | ||
519 | { __IGNORE0(KEYSC), RTDMAC1_2, __IGNORE0(CMT2), CMT0 } }, | ||
520 | /* IPRGS */ | ||
521 | { 0xFFD20018, 0, 16, 4, { TMU_TUNI0, TMU_TUNI1, TMU_TUNI2, TSIF1 } }, | ||
522 | /* IPRHS */ | ||
523 | { 0xFFD2001C, 0, 16, 4, { __IGNORE0(TTI20), 0, VEU, BEU } }, | ||
524 | /* IPRIS */ | ||
525 | { 0xFFD20020, 0, 16, 4, { 0, __IGNORE0(MSIOF), TSIF0, IIC0 } }, | ||
526 | /* IPRJS */ | ||
527 | __IGNORE({ 0xFFD20024, 0, 16, 4, { 0, SGX540, MSUG, MSU } }) | ||
528 | /* IPRKS */ | ||
529 | { 0xFFD20028, 0, 16, 4, { __IGNORE0(_2DG), ASA, LMB, PEP } }, | ||
530 | /* IPRLS */ | ||
531 | { 0xFFD2002C, 0, 16, 4, { IPMMU, 0, 0, HQE } }, | ||
532 | /* IPRMS */ | ||
533 | { 0xFFD20030, 0, 16, 4, | ||
534 | { IIC2, 0, __IGNORE0(RWDT1), __IGNORE0(RWDT0) } }, | ||
535 | /* IPRAS3 */ | ||
536 | { 0xFFD50000, 0, 16, 4, { RTDMAC2_1, 0, 0, 0 } }, | ||
537 | /* IPRBS3 */ | ||
538 | { 0xFFD50004, 0, 16, 4, { RTDMAC2_2, 0, 0, 0 } }, | ||
539 | /* IPRIS3 */ | ||
540 | { 0xFFD50020, 0, 16, 4, { FRC, 0, 0, 0 } }, | ||
541 | /* IPRJS3 */ | ||
542 | { 0xFFD50024, 0, 16, 4, { LCDC1, CSIRX, DSITX, 0 } }, | ||
543 | /* IPRKS3 */ | ||
544 | __IGNORE({ 0xFFD50028, 0, 16, 4, { SPU2, 0, FSI, FMSI } }) | ||
545 | /* IPRLS3 */ | ||
546 | __IGNORE({ 0xFFD5002C, 0, 16, 4, { SCUV, 0, 0, 0 } }) | ||
547 | /* IPRMS3 */ | ||
548 | { 0xFFD50030, 0, 16, 4, { TMU1, 0, 0, TSIF2 } }, | ||
549 | /* IPRNS3 */ | ||
550 | { 0xFFD50034, 0, 16, 4, { CMT4, 0, 0, 0 } }, | ||
551 | /* IPROS3 */ | ||
552 | { 0xFFD50038, 0, 16, 4, { __IGNORE0(MFIS2), CPORTS2R, 0, 0 } }, | ||
553 | }; | ||
554 | |||
555 | static struct resource intcs_resources[] __initdata = { | ||
556 | [0] = { | ||
557 | .start = 0xffd20000, | ||
558 | .end = 0xffd500ff, | ||
559 | .flags = IORESOURCE_MEM, | ||
560 | } | ||
561 | }; | ||
562 | |||
563 | static struct intc_desc intcs_desc __initdata = { | ||
564 | .name = "sh7377-intcs", | ||
565 | .resource = intcs_resources, | ||
566 | .num_resources = ARRAY_SIZE(intcs_resources), | ||
567 | .hw = INTC_HW_DESC(intcs_vectors, intcs_groups, | ||
568 | intcs_mask_registers, intcs_prio_registers, | ||
569 | NULL, NULL), | ||
570 | }; | ||
571 | |||
572 | static void intcs_demux(unsigned int irq, struct irq_desc *desc) | ||
573 | { | ||
574 | void __iomem *reg = (void *)irq_get_handler_data(irq); | ||
575 | unsigned int evtcodeas = ioread32(reg); | ||
576 | |||
577 | generic_handle_irq(intcs_evt2irq(evtcodeas)); | ||
578 | } | ||
579 | |||
580 | #define INTEVTSA 0xFFD20100 | ||
581 | void __init sh7377_init_irq(void) | ||
582 | { | ||
583 | void __iomem *intevtsa = ioremap_nocache(INTEVTSA, PAGE_SIZE); | ||
584 | |||
585 | register_intc_controller(&intca_desc); | ||
586 | register_intc_controller(&intca_irq_pins_desc); | ||
587 | register_intc_controller(&intcs_desc); | ||
588 | |||
589 | /* demux using INTEVTSA */ | ||
590 | irq_set_handler_data(evt2irq(INTCS_INTVECT), (void *)intevtsa); | ||
591 | irq_set_chained_handler(evt2irq(INTCS_INTVECT), intcs_demux); | ||
592 | } | ||
diff --git a/arch/arm/mach-shmobile/pfc-r8a7779.c b/arch/arm/mach-shmobile/pfc-r8a7779.c index cbc26ba2a0a2..9513234d322b 100644 --- a/arch/arm/mach-shmobile/pfc-r8a7779.c +++ b/arch/arm/mach-shmobile/pfc-r8a7779.c | |||
@@ -140,7 +140,7 @@ enum { | |||
140 | FN_IP7_3_2, FN_IP7_6_4, FN_IP7_9_7, FN_IP7_12_10, | 140 | FN_IP7_3_2, FN_IP7_6_4, FN_IP7_9_7, FN_IP7_12_10, |
141 | FN_IP7_14_13, FN_IP2_7_4, FN_IP2_11_8, FN_IP2_15_12, | 141 | FN_IP7_14_13, FN_IP2_7_4, FN_IP2_11_8, FN_IP2_15_12, |
142 | FN_IP1_28_25, FN_IP2_3_0, FN_IP8_3_0, FN_IP8_7_4, | 142 | FN_IP1_28_25, FN_IP2_3_0, FN_IP8_3_0, FN_IP8_7_4, |
143 | FN_IP8_11_8, FN_IP8_15_12, FN_PENC0, FN_PENC1, | 143 | FN_IP8_11_8, FN_IP8_15_12, FN_USB_PENC0, FN_USB_PENC1, |
144 | FN_IP0_2_0, FN_IP8_17_16, FN_IP8_18, FN_IP8_19, | 144 | FN_IP0_2_0, FN_IP8_17_16, FN_IP8_18, FN_IP8_19, |
145 | 145 | ||
146 | /* GPSR5 */ | 146 | /* GPSR5 */ |
@@ -176,7 +176,7 @@ enum { | |||
176 | FN_A0, FN_SD1_DAT3, FN_MMC0_D3, FN_FD3, | 176 | FN_A0, FN_SD1_DAT3, FN_MMC0_D3, FN_FD3, |
177 | FN_BS, FN_SD1_DAT2, FN_MMC0_D2, FN_FD2, | 177 | FN_BS, FN_SD1_DAT2, FN_MMC0_D2, FN_FD2, |
178 | FN_ATADIR0, FN_SDSELF, FN_HCTS1, FN_TX4_C, | 178 | FN_ATADIR0, FN_SDSELF, FN_HCTS1, FN_TX4_C, |
179 | FN_PENC2, FN_SCK0, FN_PWM1, FN_PWMFSW0, | 179 | FN_USB_PENC2, FN_SCK0, FN_PWM1, FN_PWMFSW0, |
180 | FN_SCIF_CLK, FN_TCLK0_C, | 180 | FN_SCIF_CLK, FN_TCLK0_C, |
181 | 181 | ||
182 | /* IPSR1 */ | 182 | /* IPSR1 */ |
@@ -447,7 +447,7 @@ enum { | |||
447 | A0_MARK, SD1_DAT3_MARK, MMC0_D3_MARK, FD3_MARK, | 447 | A0_MARK, SD1_DAT3_MARK, MMC0_D3_MARK, FD3_MARK, |
448 | BS_MARK, SD1_DAT2_MARK, MMC0_D2_MARK, FD2_MARK, | 448 | BS_MARK, SD1_DAT2_MARK, MMC0_D2_MARK, FD2_MARK, |
449 | ATADIR0_MARK, SDSELF_MARK, HCTS1_MARK, TX4_C_MARK, | 449 | ATADIR0_MARK, SDSELF_MARK, HCTS1_MARK, TX4_C_MARK, |
450 | PENC2_MARK, SCK0_MARK, PWM1_MARK, PWMFSW0_MARK, | 450 | USB_PENC2_MARK, SCK0_MARK, PWM1_MARK, PWMFSW0_MARK, |
451 | SCIF_CLK_MARK, TCLK0_C_MARK, | 451 | SCIF_CLK_MARK, TCLK0_C_MARK, |
452 | 452 | ||
453 | EX_CS0_MARK, RX3_C_IRDA_RX_C_MARK, MMC0_D6_MARK, | 453 | EX_CS0_MARK, RX3_C_IRDA_RX_C_MARK, MMC0_D6_MARK, |
@@ -658,7 +658,7 @@ static pinmux_enum_t pinmux_data[] = { | |||
658 | PINMUX_DATA(A18_MARK, FN_A18), | 658 | PINMUX_DATA(A18_MARK, FN_A18), |
659 | PINMUX_DATA(A19_MARK, FN_A19), | 659 | PINMUX_DATA(A19_MARK, FN_A19), |
660 | 660 | ||
661 | PINMUX_IPSR_DATA(IP0_2_0, PENC2), | 661 | PINMUX_IPSR_DATA(IP0_2_0, USB_PENC2), |
662 | PINMUX_IPSR_MODSEL_DATA(IP0_2_0, SCK0, SEL_SCIF0_0), | 662 | PINMUX_IPSR_MODSEL_DATA(IP0_2_0, SCK0, SEL_SCIF0_0), |
663 | PINMUX_IPSR_DATA(IP0_2_0, PWM1), | 663 | PINMUX_IPSR_DATA(IP0_2_0, PWM1), |
664 | PINMUX_IPSR_MODSEL_DATA(IP0_2_0, PWMFSW0, SEL_PWMFSW_0), | 664 | PINMUX_IPSR_MODSEL_DATA(IP0_2_0, PWMFSW0, SEL_PWMFSW_0), |
@@ -1456,7 +1456,7 @@ static struct pinmux_gpio pinmux_gpios[] = { | |||
1456 | GPIO_FN(A19), | 1456 | GPIO_FN(A19), |
1457 | 1457 | ||
1458 | /* IPSR0 */ | 1458 | /* IPSR0 */ |
1459 | GPIO_FN(PENC2), GPIO_FN(SCK0), GPIO_FN(PWM1), GPIO_FN(PWMFSW0), | 1459 | GPIO_FN(USB_PENC2), GPIO_FN(SCK0), GPIO_FN(PWM1), GPIO_FN(PWMFSW0), |
1460 | GPIO_FN(SCIF_CLK), GPIO_FN(TCLK0_C), GPIO_FN(BS), GPIO_FN(SD1_DAT2), | 1460 | GPIO_FN(SCIF_CLK), GPIO_FN(TCLK0_C), GPIO_FN(BS), GPIO_FN(SD1_DAT2), |
1461 | GPIO_FN(MMC0_D2), GPIO_FN(FD2), GPIO_FN(ATADIR0), GPIO_FN(SDSELF), | 1461 | GPIO_FN(MMC0_D2), GPIO_FN(FD2), GPIO_FN(ATADIR0), GPIO_FN(SDSELF), |
1462 | GPIO_FN(HCTS1), GPIO_FN(TX4_C), GPIO_FN(A0), GPIO_FN(SD1_DAT3), | 1462 | GPIO_FN(HCTS1), GPIO_FN(TX4_C), GPIO_FN(A0), GPIO_FN(SD1_DAT3), |
@@ -1865,8 +1865,8 @@ static struct pinmux_cfg_reg pinmux_config_regs[] = { | |||
1865 | GP_4_30_FN, FN_IP8_18, | 1865 | GP_4_30_FN, FN_IP8_18, |
1866 | GP_4_29_FN, FN_IP8_17_16, | 1866 | GP_4_29_FN, FN_IP8_17_16, |
1867 | GP_4_28_FN, FN_IP0_2_0, | 1867 | GP_4_28_FN, FN_IP0_2_0, |
1868 | GP_4_27_FN, FN_PENC1, | 1868 | GP_4_27_FN, FN_USB_PENC1, |
1869 | GP_4_26_FN, FN_PENC0, | 1869 | GP_4_26_FN, FN_USB_PENC0, |
1870 | GP_4_25_FN, FN_IP8_15_12, | 1870 | GP_4_25_FN, FN_IP8_15_12, |
1871 | GP_4_24_FN, FN_IP8_11_8, | 1871 | GP_4_24_FN, FN_IP8_11_8, |
1872 | GP_4_23_FN, FN_IP8_7_4, | 1872 | GP_4_23_FN, FN_IP8_7_4, |
@@ -1981,7 +1981,7 @@ static struct pinmux_cfg_reg pinmux_config_regs[] = { | |||
1981 | FN_BS, FN_SD1_DAT2, FN_MMC0_D2, FN_FD2, | 1981 | FN_BS, FN_SD1_DAT2, FN_MMC0_D2, FN_FD2, |
1982 | FN_ATADIR0, FN_SDSELF, FN_HCTS1, FN_TX4_C, | 1982 | FN_ATADIR0, FN_SDSELF, FN_HCTS1, FN_TX4_C, |
1983 | /* IP0_2_0 [3] */ | 1983 | /* IP0_2_0 [3] */ |
1984 | FN_PENC2, FN_SCK0, FN_PWM1, FN_PWMFSW0, | 1984 | FN_USB_PENC2, FN_SCK0, FN_PWM1, FN_PWMFSW0, |
1985 | FN_SCIF_CLK, FN_TCLK0_C, 0, 0 } | 1985 | FN_SCIF_CLK, FN_TCLK0_C, 0, 0 } |
1986 | }, | 1986 | }, |
1987 | { PINMUX_CFG_REG_VAR("IPSR1", 0xfffc0024, 32, | 1987 | { PINMUX_CFG_REG_VAR("IPSR1", 0xfffc0024, 32, |
diff --git a/arch/arm/mach-shmobile/pfc-sh7367.c b/arch/arm/mach-shmobile/pfc-sh7367.c deleted file mode 100644 index c0c137f39052..000000000000 --- a/arch/arm/mach-shmobile/pfc-sh7367.c +++ /dev/null | |||
@@ -1,1727 +0,0 @@ | |||
1 | /* | ||
2 | * sh7367 processor support - PFC hardware block | ||
3 | * | ||
4 | * Copyright (C) 2010 Magnus Damm | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License as published by | ||
8 | * the Free Software Foundation; version 2 of the License. | ||
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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | ||
18 | */ | ||
19 | #include <linux/init.h> | ||
20 | #include <linux/kernel.h> | ||
21 | #include <linux/sh_pfc.h> | ||
22 | #include <mach/sh7367.h> | ||
23 | |||
24 | #define CPU_ALL_PORT(fn, pfx, sfx) \ | ||
25 | PORT_10(fn, pfx, sfx), PORT_90(fn, pfx, sfx), \ | ||
26 | PORT_10(fn, pfx##10, sfx), PORT_90(fn, pfx##1, sfx), \ | ||
27 | PORT_10(fn, pfx##20, sfx), PORT_10(fn, pfx##21, sfx), \ | ||
28 | PORT_10(fn, pfx##22, sfx), PORT_10(fn, pfx##23, sfx), \ | ||
29 | PORT_10(fn, pfx##24, sfx), PORT_10(fn, pfx##25, sfx), \ | ||
30 | PORT_10(fn, pfx##26, sfx), PORT_1(fn, pfx##270, sfx), \ | ||
31 | PORT_1(fn, pfx##271, sfx), PORT_1(fn, pfx##272, sfx) | ||
32 | |||
33 | enum { | ||
34 | PINMUX_RESERVED = 0, | ||
35 | |||
36 | PINMUX_DATA_BEGIN, | ||
37 | PORT_ALL(DATA), /* PORT0_DATA -> PORT272_DATA */ | ||
38 | PINMUX_DATA_END, | ||
39 | |||
40 | PINMUX_INPUT_BEGIN, | ||
41 | PORT_ALL(IN), /* PORT0_IN -> PORT272_IN */ | ||
42 | PINMUX_INPUT_END, | ||
43 | |||
44 | PINMUX_INPUT_PULLUP_BEGIN, | ||
45 | PORT_ALL(IN_PU), /* PORT0_IN_PU -> PORT272_IN_PU */ | ||
46 | PINMUX_INPUT_PULLUP_END, | ||
47 | |||
48 | PINMUX_INPUT_PULLDOWN_BEGIN, | ||
49 | PORT_ALL(IN_PD), /* PORT0_IN_PD -> PORT272_IN_PD */ | ||
50 | PINMUX_INPUT_PULLDOWN_END, | ||
51 | |||
52 | PINMUX_OUTPUT_BEGIN, | ||
53 | PORT_ALL(OUT), /* PORT0_OUT -> PORT272_OUT */ | ||
54 | PINMUX_OUTPUT_END, | ||
55 | |||
56 | PINMUX_FUNCTION_BEGIN, | ||
57 | PORT_ALL(FN_IN), /* PORT0_FN_IN -> PORT272_FN_IN */ | ||
58 | PORT_ALL(FN_OUT), /* PORT0_FN_OUT -> PORT272_FN_OUT */ | ||
59 | PORT_ALL(FN0), /* PORT0_FN0 -> PORT272_FN0 */ | ||
60 | PORT_ALL(FN1), /* PORT0_FN1 -> PORT272_FN1 */ | ||
61 | PORT_ALL(FN2), /* PORT0_FN2 -> PORT272_FN2 */ | ||
62 | PORT_ALL(FN3), /* PORT0_FN3 -> PORT272_FN3 */ | ||
63 | PORT_ALL(FN4), /* PORT0_FN4 -> PORT272_FN4 */ | ||
64 | PORT_ALL(FN5), /* PORT0_FN5 -> PORT272_FN5 */ | ||
65 | PORT_ALL(FN6), /* PORT0_FN6 -> PORT272_FN6 */ | ||
66 | PORT_ALL(FN7), /* PORT0_FN7 -> PORT272_FN7 */ | ||
67 | |||
68 | MSELBCR_MSEL2_1, MSELBCR_MSEL2_0, | ||
69 | PINMUX_FUNCTION_END, | ||
70 | |||
71 | PINMUX_MARK_BEGIN, | ||
72 | /* Special Pull-up / Pull-down Functions */ | ||
73 | PORT48_KEYIN0_PU_MARK, PORT49_KEYIN1_PU_MARK, | ||
74 | PORT50_KEYIN2_PU_MARK, PORT55_KEYIN3_PU_MARK, | ||
75 | PORT56_KEYIN4_PU_MARK, PORT57_KEYIN5_PU_MARK, | ||
76 | PORT58_KEYIN6_PU_MARK, | ||
77 | |||
78 | /* 49-1 */ | ||
79 | VBUS0_MARK, CPORT0_MARK, CPORT1_MARK, CPORT2_MARK, | ||
80 | CPORT3_MARK, CPORT4_MARK, CPORT5_MARK, CPORT6_MARK, | ||
81 | CPORT7_MARK, CPORT8_MARK, CPORT9_MARK, CPORT10_MARK, | ||
82 | CPORT11_MARK, SIN2_MARK, CPORT12_MARK, XCTS2_MARK, | ||
83 | CPORT13_MARK, RFSPO4_MARK, CPORT14_MARK, RFSPO5_MARK, | ||
84 | CPORT15_MARK, CPORT16_MARK, CPORT17_MARK, SOUT2_MARK, | ||
85 | CPORT18_MARK, XRTS2_MARK, CPORT19_MARK, CPORT20_MARK, | ||
86 | RFSPO6_MARK, CPORT21_MARK, STATUS0_MARK, CPORT22_MARK, | ||
87 | STATUS1_MARK, CPORT23_MARK, STATUS2_MARK, RFSPO7_MARK, | ||
88 | MPORT0_MARK, MPORT1_MARK, B_SYNLD1_MARK, B_SYNLD2_MARK, | ||
89 | XMAINPS_MARK, XDIVPS_MARK, XIDRST_MARK, IDCLK_MARK, | ||
90 | IDIO_MARK, SOUT1_MARK, SCIFA4_TXD_MARK, | ||
91 | M02_BERDAT_MARK, SIN1_MARK, SCIFA4_RXD_MARK, XWUP_MARK, | ||
92 | XRTS1_MARK, SCIFA4_RTS_MARK, M03_BERCLK_MARK, | ||
93 | XCTS1_MARK, SCIFA4_CTS_MARK, | ||
94 | |||
95 | /* 49-2 */ | ||
96 | HSU_IQ_AGC6_MARK, MFG2_IN2_MARK, MSIOF2_MCK0_MARK, | ||
97 | HSU_IQ_AGC5_MARK, MFG2_IN1_MARK, MSIOF2_MCK1_MARK, | ||
98 | HSU_IQ_AGC4_MARK, MSIOF2_RSYNC_MARK, | ||
99 | HSU_IQ_AGC3_MARK, MFG2_OUT1_MARK, MSIOF2_RSCK_MARK, | ||
100 | HSU_IQ_AGC2_MARK, PORT42_KEYOUT0_MARK, | ||
101 | HSU_IQ_AGC1_MARK, PORT43_KEYOUT1_MARK, | ||
102 | HSU_IQ_AGC0_MARK, PORT44_KEYOUT2_MARK, | ||
103 | HSU_IQ_AGC_ST_MARK, PORT45_KEYOUT3_MARK, | ||
104 | HSU_IQ_PDO_MARK, PORT46_KEYOUT4_MARK, | ||
105 | HSU_IQ_PYO_MARK, PORT47_KEYOUT5_MARK, | ||
106 | HSU_EN_TXMUX_G3MO_MARK, PORT48_KEYIN0_MARK, | ||
107 | HSU_I_TXMUX_G3MO_MARK, PORT49_KEYIN1_MARK, | ||
108 | HSU_Q_TXMUX_G3MO_MARK, PORT50_KEYIN2_MARK, | ||
109 | HSU_SYO_MARK, PORT51_MSIOF2_TSYNC_MARK, | ||
110 | HSU_SDO_MARK, PORT52_MSIOF2_TSCK_MARK, | ||
111 | HSU_TGTTI_G3MO_MARK, PORT53_MSIOF2_TXD_MARK, | ||
112 | B_TIME_STAMP_MARK, PORT54_MSIOF2_RXD_MARK, | ||
113 | HSU_SDI_MARK, PORT55_KEYIN3_MARK, | ||
114 | HSU_SCO_MARK, PORT56_KEYIN4_MARK, | ||
115 | HSU_DREQ_MARK, PORT57_KEYIN5_MARK, | ||
116 | HSU_DACK_MARK, PORT58_KEYIN6_MARK, | ||
117 | HSU_CLK61M_MARK, PORT59_MSIOF2_SS1_MARK, | ||
118 | HSU_XRST_MARK, PORT60_MSIOF2_SS2_MARK, | ||
119 | PCMCLKO_MARK, SYNC8KO_MARK, DNPCM_A_MARK, UPPCM_A_MARK, | ||
120 | XTALB1L_MARK, | ||
121 | GPS_AGC1_MARK, SCIFA0_RTS_MARK, | ||
122 | GPS_AGC2_MARK, SCIFA0_SCK_MARK, | ||
123 | GPS_AGC3_MARK, SCIFA0_TXD_MARK, | ||
124 | GPS_AGC4_MARK, SCIFA0_RXD_MARK, | ||
125 | GPS_PWRD_MARK, SCIFA0_CTS_MARK, | ||
126 | GPS_IM_MARK, GPS_IS_MARK, GPS_QM_MARK, GPS_QS_MARK, | ||
127 | SIUBOMC_MARK, TPU2TO0_MARK, | ||
128 | SIUCKB_MARK, TPU2TO1_MARK, | ||
129 | SIUBOLR_MARK, BBIF2_TSYNC_MARK, TPU2TO2_MARK, | ||
130 | SIUBOBT_MARK, BBIF2_TSCK_MARK, TPU2TO3_MARK, | ||
131 | SIUBOSLD_MARK, BBIF2_TXD_MARK, TPU3TO0_MARK, | ||
132 | SIUBILR_MARK, TPU3TO1_MARK, | ||
133 | SIUBIBT_MARK, TPU3TO2_MARK, | ||
134 | SIUBISLD_MARK, TPU3TO3_MARK, | ||
135 | NMI_MARK, TPU4TO0_MARK, | ||
136 | DNPCM_M_MARK, TPU4TO1_MARK, TPU4TO2_MARK, TPU4TO3_MARK, | ||
137 | IRQ_TMPB_MARK, | ||
138 | PWEN_MARK, MFG1_OUT1_MARK, | ||
139 | OVCN_MARK, MFG1_IN1_MARK, | ||
140 | OVCN2_MARK, MFG1_IN2_MARK, | ||
141 | |||
142 | /* 49-3 */ | ||
143 | RFSPO1_MARK, RFSPO2_MARK, RFSPO3_MARK, PORT93_VIO_CKO2_MARK, | ||
144 | USBTERM_MARK, EXTLP_MARK, IDIN_MARK, | ||
145 | SCIFA5_CTS_MARK, MFG0_IN1_MARK, | ||
146 | SCIFA5_RTS_MARK, MFG0_IN2_MARK, | ||
147 | SCIFA5_RXD_MARK, | ||
148 | SCIFA5_TXD_MARK, | ||
149 | SCIFA5_SCK_MARK, MFG0_OUT1_MARK, | ||
150 | A0_EA0_MARK, BS_MARK, | ||
151 | A14_EA14_MARK, PORT102_KEYOUT0_MARK, | ||
152 | A15_EA15_MARK, PORT103_KEYOUT1_MARK, DV_CLKOL_MARK, | ||
153 | A16_EA16_MARK, PORT104_KEYOUT2_MARK, | ||
154 | DV_VSYNCL_MARK, MSIOF0_SS1_MARK, | ||
155 | A17_EA17_MARK, PORT105_KEYOUT3_MARK, | ||
156 | DV_HSYNCL_MARK, MSIOF0_TSYNC_MARK, | ||
157 | A18_EA18_MARK, PORT106_KEYOUT4_MARK, | ||
158 | DV_DL0_MARK, MSIOF0_TSCK_MARK, | ||
159 | A19_EA19_MARK, PORT107_KEYOUT5_MARK, | ||
160 | DV_DL1_MARK, MSIOF0_TXD_MARK, | ||
161 | A20_EA20_MARK, PORT108_KEYIN0_MARK, | ||
162 | DV_DL2_MARK, MSIOF0_RSCK_MARK, | ||
163 | A21_EA21_MARK, PORT109_KEYIN1_MARK, | ||
164 | DV_DL3_MARK, MSIOF0_RSYNC_MARK, | ||
165 | A22_EA22_MARK, PORT110_KEYIN2_MARK, | ||
166 | DV_DL4_MARK, MSIOF0_MCK0_MARK, | ||
167 | A23_EA23_MARK, PORT111_KEYIN3_MARK, | ||
168 | DV_DL5_MARK, MSIOF0_MCK1_MARK, | ||
169 | A24_EA24_MARK, PORT112_KEYIN4_MARK, | ||
170 | DV_DL6_MARK, MSIOF0_RXD_MARK, | ||
171 | A25_EA25_MARK, PORT113_KEYIN5_MARK, | ||
172 | DV_DL7_MARK, MSIOF0_SS2_MARK, | ||
173 | A26_MARK, PORT113_KEYIN6_MARK, DV_CLKIL_MARK, | ||
174 | D0_ED0_NAF0_MARK, D1_ED1_NAF1_MARK, D2_ED2_NAF2_MARK, | ||
175 | D3_ED3_NAF3_MARK, D4_ED4_NAF4_MARK, D5_ED5_NAF5_MARK, | ||
176 | D6_ED6_NAF6_MARK, D7_ED7_NAF7_MARK, D8_ED8_NAF8_MARK, | ||
177 | D9_ED9_NAF9_MARK, D10_ED10_NAF10_MARK, D11_ED11_NAF11_MARK, | ||
178 | D12_ED12_NAF12_MARK, D13_ED13_NAF13_MARK, | ||
179 | D14_ED14_NAF14_MARK, D15_ED15_NAF15_MARK, | ||
180 | CS4_MARK, CS5A_MARK, CS5B_MARK, FCE1_MARK, | ||
181 | CS6B_MARK, XCS2_MARK, FCE0_MARK, CS6A_MARK, | ||
182 | DACK0_MARK, WAIT_MARK, DREQ0_MARK, RD_XRD_MARK, | ||
183 | A27_MARK, RDWR_XWE_MARK, WE0_XWR0_FWE_MARK, | ||
184 | WE1_XWR1_MARK, FRB_MARK, CKO_MARK, | ||
185 | NBRSTOUT_MARK, NBRST_MARK, | ||
186 | |||
187 | /* 49-4 */ | ||
188 | RFSPO0_MARK, PORT146_VIO_CKO2_MARK, TSTMD_MARK, | ||
189 | VIO_VD_MARK, VIO_HD_MARK, | ||
190 | VIO_D0_MARK, VIO_D1_MARK, VIO_D2_MARK, | ||
191 | VIO_D3_MARK, VIO_D4_MARK, VIO_D5_MARK, | ||
192 | VIO_D6_MARK, VIO_D7_MARK, VIO_D8_MARK, | ||
193 | VIO_D9_MARK, VIO_D10_MARK, VIO_D11_MARK, | ||
194 | VIO_D12_MARK, VIO_D13_MARK, VIO_D14_MARK, | ||
195 | VIO_D15_MARK, VIO_CLK_MARK, VIO_FIELD_MARK, | ||
196 | VIO_CKO_MARK, | ||
197 | MFG3_IN1_MARK, MFG3_IN2_MARK, | ||
198 | M9_SLCD_A01_MARK, MFG3_OUT1_MARK, TPU0TO0_MARK, | ||
199 | M10_SLCD_CK1_MARK, MFG4_IN1_MARK, TPU0TO1_MARK, | ||
200 | M11_SLCD_SO1_MARK, MFG4_IN2_MARK, TPU0TO2_MARK, | ||
201 | M12_SLCD_CE1_MARK, MFG4_OUT1_MARK, TPU0TO3_MARK, | ||
202 | LCDD0_MARK, PORT175_KEYOUT0_MARK, DV_D0_MARK, | ||
203 | SIUCKA_MARK, MFG0_OUT2_MARK, | ||
204 | LCDD1_MARK, PORT176_KEYOUT1_MARK, DV_D1_MARK, | ||
205 | SIUAOLR_MARK, BBIF2_TSYNC1_MARK, | ||
206 | LCDD2_MARK, PORT177_KEYOUT2_MARK, DV_D2_MARK, | ||
207 | SIUAOBT_MARK, BBIF2_TSCK1_MARK, | ||
208 | LCDD3_MARK, PORT178_KEYOUT3_MARK, DV_D3_MARK, | ||
209 | SIUAOSLD_MARK, BBIF2_TXD1_MARK, | ||
210 | LCDD4_MARK, PORT179_KEYOUT4_MARK, DV_D4_MARK, | ||
211 | SIUAISPD_MARK, MFG1_OUT2_MARK, | ||
212 | LCDD5_MARK, PORT180_KEYOUT5_MARK, DV_D5_MARK, | ||
213 | SIUAILR_MARK, MFG2_OUT2_MARK, | ||
214 | LCDD6_MARK, DV_D6_MARK, | ||
215 | SIUAIBT_MARK, MFG3_OUT2_MARK, XWR2_MARK, | ||
216 | LCDD7_MARK, DV_D7_MARK, | ||
217 | SIUAISLD_MARK, MFG4_OUT2_MARK, XWR3_MARK, | ||
218 | LCDD8_MARK, DV_D8_MARK, D16_MARK, ED16_MARK, | ||
219 | LCDD9_MARK, DV_D9_MARK, D17_MARK, ED17_MARK, | ||
220 | LCDD10_MARK, DV_D10_MARK, D18_MARK, ED18_MARK, | ||
221 | LCDD11_MARK, DV_D11_MARK, D19_MARK, ED19_MARK, | ||
222 | LCDD12_MARK, DV_D12_MARK, D20_MARK, ED20_MARK, | ||
223 | LCDD13_MARK, DV_D13_MARK, D21_MARK, ED21_MARK, | ||
224 | LCDD14_MARK, DV_D14_MARK, D22_MARK, ED22_MARK, | ||
225 | LCDD15_MARK, DV_D15_MARK, D23_MARK, ED23_MARK, | ||
226 | LCDD16_MARK, DV_HSYNC_MARK, D24_MARK, ED24_MARK, | ||
227 | LCDD17_MARK, DV_VSYNC_MARK, D25_MARK, ED25_MARK, | ||
228 | LCDD18_MARK, DREQ2_MARK, MSIOF0L_TSCK_MARK, | ||
229 | D26_MARK, ED26_MARK, | ||
230 | LCDD19_MARK, MSIOF0L_TSYNC_MARK, | ||
231 | D27_MARK, ED27_MARK, | ||
232 | LCDD20_MARK, TS_SPSYNC1_MARK, MSIOF0L_MCK0_MARK, | ||
233 | D28_MARK, ED28_MARK, | ||
234 | LCDD21_MARK, TS_SDAT1_MARK, MSIOF0L_MCK1_MARK, | ||
235 | D29_MARK, ED29_MARK, | ||
236 | LCDD22_MARK, TS_SDEN1_MARK, MSIOF0L_SS1_MARK, | ||
237 | D30_MARK, ED30_MARK, | ||
238 | LCDD23_MARK, TS_SCK1_MARK, MSIOF0L_SS2_MARK, | ||
239 | D31_MARK, ED31_MARK, | ||
240 | LCDDCK_MARK, LCDWR_MARK, DV_CKO_MARK, SIUAOSPD_MARK, | ||
241 | LCDRD_MARK, DACK2_MARK, MSIOF0L_RSYNC_MARK, | ||
242 | |||
243 | /* 49-5 */ | ||
244 | LCDHSYN_MARK, LCDCS_MARK, LCDCS2_MARK, DACK3_MARK, | ||
245 | LCDDISP_MARK, LCDRS_MARK, DREQ3_MARK, MSIOF0L_RSCK_MARK, | ||
246 | LCDCSYN_MARK, LCDCSYN2_MARK, DV_CKI_MARK, | ||
247 | LCDLCLK_MARK, DREQ1_MARK, MSIOF0L_RXD_MARK, | ||
248 | LCDDON_MARK, LCDDON2_MARK, DACK1_MARK, MSIOF0L_TXD_MARK, | ||
249 | VIO_DR0_MARK, VIO_DR1_MARK, VIO_DR2_MARK, VIO_DR3_MARK, | ||
250 | VIO_DR4_MARK, VIO_DR5_MARK, VIO_DR6_MARK, VIO_DR7_MARK, | ||
251 | VIO_VDR_MARK, VIO_HDR_MARK, | ||
252 | VIO_CLKR_MARK, VIO_CKOR_MARK, | ||
253 | SCIFA1_TXD_MARK, GPS_PGFA0_MARK, | ||
254 | SCIFA1_SCK_MARK, GPS_PGFA1_MARK, | ||
255 | SCIFA1_RTS_MARK, GPS_EPPSINMON_MARK, | ||
256 | SCIFA1_RXD_MARK, SCIFA1_CTS_MARK, | ||
257 | MSIOF1_TXD_MARK, SCIFA1_TXD2_MARK, GPS_TXD_MARK, | ||
258 | MSIOF1_TSYNC_MARK, SCIFA1_CTS2_MARK, I2C_SDA2_MARK, | ||
259 | MSIOF1_TSCK_MARK, SCIFA1_SCK2_MARK, | ||
260 | MSIOF1_RXD_MARK, SCIFA1_RXD2_MARK, GPS_RXD_MARK, | ||
261 | MSIOF1_RSCK_MARK, SCIFA1_RTS2_MARK, | ||
262 | MSIOF1_RSYNC_MARK, I2C_SCL2_MARK, | ||
263 | MSIOF1_MCK0_MARK, MSIOF1_MCK1_MARK, | ||
264 | MSIOF1_SS1_MARK, EDBGREQ3_MARK, | ||
265 | MSIOF1_SS2_MARK, | ||
266 | PORT236_IROUT_MARK, IRDA_OUT_MARK, | ||
267 | IRDA_IN_MARK, IRDA_FIRSEL_MARK, | ||
268 | TPU1TO0_MARK, TS_SPSYNC3_MARK, | ||
269 | TPU1TO1_MARK, TS_SDAT3_MARK, | ||
270 | TPU1TO2_MARK, TS_SDEN3_MARK, PORT241_MSIOF2_SS1_MARK, | ||
271 | TPU1TO3_MARK, PORT242_MSIOF2_TSCK_MARK, | ||
272 | M13_BSW_MARK, PORT243_MSIOF2_TSYNC_MARK, | ||
273 | M14_GSW_MARK, PORT244_MSIOF2_TXD_MARK, | ||
274 | PORT245_IROUT_MARK, M15_RSW_MARK, | ||
275 | SOUT3_MARK, SCIFA2_TXD1_MARK, | ||
276 | SIN3_MARK, SCIFA2_RXD1_MARK, | ||
277 | XRTS3_MARK, SCIFA2_RTS1_MARK, PORT248_MSIOF2_SS2_MARK, | ||
278 | XCTS3_MARK, SCIFA2_CTS1_MARK, PORT249_MSIOF2_RXD_MARK, | ||
279 | DINT_MARK, SCIFA2_SCK1_MARK, TS_SCK3_MARK, | ||
280 | SDHICLK0_MARK, TCK2_MARK, | ||
281 | SDHICD0_MARK, | ||
282 | SDHID0_0_MARK, TMS2_MARK, | ||
283 | SDHID0_1_MARK, TDO2_MARK, | ||
284 | SDHID0_2_MARK, TDI2_MARK, | ||
285 | SDHID0_3_MARK, RTCK2_MARK, | ||
286 | |||
287 | /* 49-6 */ | ||
288 | SDHICMD0_MARK, TRST2_MARK, | ||
289 | SDHIWP0_MARK, EDBGREQ2_MARK, | ||
290 | SDHICLK1_MARK, TCK3_MARK, | ||
291 | SDHID1_0_MARK, M11_SLCD_SO2_MARK, | ||
292 | TS_SPSYNC2_MARK, TMS3_MARK, | ||
293 | SDHID1_1_MARK, M9_SLCD_AO2_MARK, | ||
294 | TS_SDAT2_MARK, TDO3_MARK, | ||
295 | SDHID1_2_MARK, M10_SLCD_CK2_MARK, | ||
296 | TS_SDEN2_MARK, TDI3_MARK, | ||
297 | SDHID1_3_MARK, M12_SLCD_CE2_MARK, | ||
298 | TS_SCK2_MARK, RTCK3_MARK, | ||
299 | SDHICMD1_MARK, TRST3_MARK, | ||
300 | SDHICLK2_MARK, SCIFB_SCK_MARK, | ||
301 | SDHID2_0_MARK, SCIFB_TXD_MARK, | ||
302 | SDHID2_1_MARK, SCIFB_CTS_MARK, | ||
303 | SDHID2_2_MARK, SCIFB_RXD_MARK, | ||
304 | SDHID2_3_MARK, SCIFB_RTS_MARK, | ||
305 | SDHICMD2_MARK, | ||
306 | RESETOUTS_MARK, | ||
307 | DIVLOCK_MARK, | ||
308 | PINMUX_MARK_END, | ||
309 | }; | ||
310 | |||
311 | static pinmux_enum_t pinmux_data[] = { | ||
312 | |||
313 | /* specify valid pin states for each pin in GPIO mode */ | ||
314 | |||
315 | /* 49-1 (GPIO) */ | ||
316 | PORT_DATA_I_PD(0), | ||
317 | PORT_DATA_I_PU(1), PORT_DATA_I_PU(2), PORT_DATA_I_PU(3), | ||
318 | PORT_DATA_I_PU(4), PORT_DATA_I_PU(5), PORT_DATA_I_PU(6), | ||
319 | PORT_DATA_I_PU(7), PORT_DATA_I_PU(8), PORT_DATA_I_PU(9), | ||
320 | PORT_DATA_I_PU(10), PORT_DATA_I_PU(11), PORT_DATA_I_PU(12), | ||
321 | PORT_DATA_I_PU(13), | ||
322 | PORT_DATA_IO_PU_PD(14), PORT_DATA_IO_PU_PD(15), | ||
323 | PORT_DATA_O(16), PORT_DATA_O(17), PORT_DATA_O(18), PORT_DATA_O(19), | ||
324 | PORT_DATA_O(20), PORT_DATA_O(21), PORT_DATA_O(22), PORT_DATA_O(23), | ||
325 | PORT_DATA_O(24), PORT_DATA_O(25), PORT_DATA_O(26), | ||
326 | PORT_DATA_I_PD(27), PORT_DATA_I_PD(28), | ||
327 | PORT_DATA_O(29), PORT_DATA_O(30), PORT_DATA_O(31), PORT_DATA_O(32), | ||
328 | PORT_DATA_IO_PU(33), | ||
329 | PORT_DATA_O(34), | ||
330 | PORT_DATA_I_PU(35), | ||
331 | PORT_DATA_O(36), | ||
332 | PORT_DATA_I_PU_PD(37), | ||
333 | |||
334 | /* 49-2 (GPIO) */ | ||
335 | PORT_DATA_IO_PU_PD(38), | ||
336 | PORT_DATA_IO_PD(39), PORT_DATA_IO_PD(40), PORT_DATA_IO_PD(41), | ||
337 | PORT_DATA_O(42), PORT_DATA_O(43), PORT_DATA_O(44), PORT_DATA_O(45), | ||
338 | PORT_DATA_O(46), PORT_DATA_O(47), | ||
339 | PORT_DATA_I_PU_PD(48), PORT_DATA_I_PU_PD(49), PORT_DATA_I_PU_PD(50), | ||
340 | PORT_DATA_IO_PD(51), PORT_DATA_IO_PD(52), | ||
341 | PORT_DATA_O(53), | ||
342 | PORT_DATA_IO_PD(54), | ||
343 | PORT_DATA_I_PU_PD(55), | ||
344 | PORT_DATA_IO_PU_PD(56), | ||
345 | PORT_DATA_I_PU_PD(57), | ||
346 | PORT_DATA_IO_PU_PD(58), | ||
347 | PORT_DATA_O(59), PORT_DATA_O(60), PORT_DATA_O(61), PORT_DATA_O(62), | ||
348 | PORT_DATA_O(63), | ||
349 | PORT_DATA_I_PU(64), | ||
350 | PORT_DATA_O(65), PORT_DATA_O(66), PORT_DATA_O(67), PORT_DATA_O(68), | ||
351 | PORT_DATA_IO_PD(69), PORT_DATA_IO_PD(70), | ||
352 | PORT_DATA_I_PD(71), PORT_DATA_I_PD(72), PORT_DATA_I_PD(73), | ||
353 | PORT_DATA_I_PD(74), | ||
354 | PORT_DATA_IO_PU_PD(75), PORT_DATA_IO_PU_PD(76), | ||
355 | PORT_DATA_IO_PD(77), PORT_DATA_IO_PD(78), | ||
356 | PORT_DATA_O(79), | ||
357 | PORT_DATA_IO_PD(80), PORT_DATA_IO_PD(81), PORT_DATA_IO_PD(82), | ||
358 | PORT_DATA_IO_PU_PD(83), PORT_DATA_IO_PU_PD(84), | ||
359 | PORT_DATA_IO_PU_PD(85), PORT_DATA_IO_PU_PD(86), | ||
360 | PORT_DATA_I_PD(87), | ||
361 | PORT_DATA_IO_PU_PD(88), | ||
362 | PORT_DATA_I_PU_PD(89), PORT_DATA_I_PU_PD(90), | ||
363 | |||
364 | /* 49-3 (GPIO) */ | ||
365 | PORT_DATA_O(91), PORT_DATA_O(92), PORT_DATA_O(93), PORT_DATA_O(94), | ||
366 | PORT_DATA_I_PU_PD(95), | ||
367 | PORT_DATA_IO_PU_PD(96), PORT_DATA_IO_PU_PD(97), PORT_DATA_IO_PU_PD(98), | ||
368 | PORT_DATA_IO_PU_PD(99), PORT_DATA_IO_PU_PD(100), | ||
369 | PORT_DATA_IO(101), PORT_DATA_IO(102), PORT_DATA_IO(103), | ||
370 | PORT_DATA_IO_PD(104), PORT_DATA_IO_PD(105), PORT_DATA_IO_PD(106), | ||
371 | PORT_DATA_IO_PD(107), | ||
372 | PORT_DATA_IO_PU_PD(108), PORT_DATA_IO_PU_PD(109), | ||
373 | PORT_DATA_IO_PU_PD(110), PORT_DATA_IO_PU_PD(111), | ||
374 | PORT_DATA_IO_PU_PD(112), PORT_DATA_IO_PU_PD(113), | ||
375 | PORT_DATA_IO_PU_PD(114), | ||
376 | PORT_DATA_IO_PU(115), PORT_DATA_IO_PU(116), PORT_DATA_IO_PU(117), | ||
377 | PORT_DATA_IO_PU(118), PORT_DATA_IO_PU(119), PORT_DATA_IO_PU(120), | ||
378 | PORT_DATA_IO_PU(121), PORT_DATA_IO_PU(122), PORT_DATA_IO_PU(123), | ||
379 | PORT_DATA_IO_PU(124), PORT_DATA_IO_PU(125), PORT_DATA_IO_PU(126), | ||
380 | PORT_DATA_IO_PU(127), PORT_DATA_IO_PU(128), PORT_DATA_IO_PU(129), | ||
381 | PORT_DATA_IO_PU(130), | ||
382 | PORT_DATA_O(131), PORT_DATA_O(132), PORT_DATA_O(133), | ||
383 | PORT_DATA_IO_PU(134), | ||
384 | PORT_DATA_O(135), PORT_DATA_O(136), | ||
385 | PORT_DATA_I_PU_PD(137), | ||
386 | PORT_DATA_IO(138), | ||
387 | PORT_DATA_IO_PU_PD(139), | ||
388 | PORT_DATA_IO(140), PORT_DATA_IO(141), | ||
389 | PORT_DATA_I_PU(142), | ||
390 | PORT_DATA_O(143), PORT_DATA_O(144), | ||
391 | PORT_DATA_I_PU(145), | ||
392 | |||
393 | /* 49-4 (GPIO) */ | ||
394 | PORT_DATA_O(146), | ||
395 | PORT_DATA_I_PU_PD(147), | ||
396 | PORT_DATA_I_PD(148), PORT_DATA_I_PD(149), | ||
397 | PORT_DATA_IO_PD(150), PORT_DATA_IO_PD(151), PORT_DATA_IO_PD(152), | ||
398 | PORT_DATA_IO_PD(153), PORT_DATA_IO_PD(154), PORT_DATA_IO_PD(155), | ||
399 | PORT_DATA_IO_PD(156), PORT_DATA_IO_PD(157), PORT_DATA_IO_PD(158), | ||
400 | PORT_DATA_IO_PD(159), PORT_DATA_IO_PD(160), PORT_DATA_IO_PD(161), | ||
401 | PORT_DATA_IO_PD(162), PORT_DATA_IO_PD(163), PORT_DATA_IO_PD(164), | ||
402 | PORT_DATA_IO_PD(165), PORT_DATA_IO_PD(166), | ||
403 | PORT_DATA_IO_PU_PD(167), | ||
404 | PORT_DATA_O(168), | ||
405 | PORT_DATA_I_PD(169), PORT_DATA_I_PD(170), | ||
406 | PORT_DATA_O(171), | ||
407 | PORT_DATA_IO_PD(172), PORT_DATA_IO_PD(173), | ||
408 | PORT_DATA_O(174), | ||
409 | PORT_DATA_IO_PD(175), PORT_DATA_IO_PD(176), PORT_DATA_IO_PD(177), | ||
410 | PORT_DATA_IO_PD(178), PORT_DATA_IO_PD(179), PORT_DATA_IO_PD(180), | ||
411 | PORT_DATA_IO_PD(181), PORT_DATA_IO_PD(182), PORT_DATA_IO_PD(183), | ||
412 | PORT_DATA_IO_PD(184), PORT_DATA_IO_PD(185), PORT_DATA_IO_PD(186), | ||
413 | PORT_DATA_IO_PD(187), PORT_DATA_IO_PD(188), PORT_DATA_IO_PD(189), | ||
414 | PORT_DATA_IO_PD(190), PORT_DATA_IO_PD(191), PORT_DATA_IO_PD(192), | ||
415 | PORT_DATA_IO_PD(193), PORT_DATA_IO_PD(194), PORT_DATA_IO_PD(195), | ||
416 | PORT_DATA_IO_PD(196), PORT_DATA_IO_PD(197), PORT_DATA_IO_PD(198), | ||
417 | PORT_DATA_O(199), | ||
418 | PORT_DATA_IO_PD(200), | ||
419 | |||
420 | /* 49-5 (GPIO) */ | ||
421 | PORT_DATA_O(201), | ||
422 | PORT_DATA_IO_PD(202), PORT_DATA_IO_PD(203), | ||
423 | PORT_DATA_I(204), | ||
424 | PORT_DATA_O(205), | ||
425 | PORT_DATA_IO_PD(206), PORT_DATA_IO_PD(207), PORT_DATA_IO_PD(208), | ||
426 | PORT_DATA_IO_PD(209), PORT_DATA_IO_PD(210), PORT_DATA_IO_PD(211), | ||
427 | PORT_DATA_IO_PD(212), PORT_DATA_IO_PD(213), PORT_DATA_IO_PD(214), | ||
428 | PORT_DATA_IO_PD(215), PORT_DATA_IO_PD(216), | ||
429 | PORT_DATA_O(217), | ||
430 | PORT_DATA_I_PU_PD(218), PORT_DATA_I_PU_PD(219), | ||
431 | PORT_DATA_O(220), PORT_DATA_O(221), PORT_DATA_O(222), | ||
432 | PORT_DATA_I_PD(223), | ||
433 | PORT_DATA_I_PU_PD(224), | ||
434 | PORT_DATA_O(225), | ||
435 | PORT_DATA_IO_PD(226), | ||
436 | PORT_DATA_IO_PU_PD(227), | ||
437 | PORT_DATA_I_PD(228), | ||
438 | PORT_DATA_IO_PD(229), PORT_DATA_IO_PD(230), | ||
439 | PORT_DATA_I_PU_PD(231), PORT_DATA_I_PU_PD(232), | ||
440 | PORT_DATA_IO_PU_PD(233), PORT_DATA_IO_PU_PD(234), | ||
441 | PORT_DATA_I_PU_PD(235), | ||
442 | PORT_DATA_O(236), | ||
443 | PORT_DATA_I_PD(237), | ||
444 | PORT_DATA_IO_PU_PD(238), PORT_DATA_IO_PU_PD(239), | ||
445 | PORT_DATA_IO_PD(240), PORT_DATA_IO_PD(241), | ||
446 | PORT_DATA_IO_PD(242), PORT_DATA_IO_PD(243), | ||
447 | PORT_DATA_O(244), | ||
448 | PORT_DATA_IO_PU_PD(245), | ||
449 | PORT_DATA_O(246), | ||
450 | PORT_DATA_I_PD(247), | ||
451 | PORT_DATA_IO_PU_PD(248), | ||
452 | PORT_DATA_I_PU_PD(249), | ||
453 | PORT_DATA_IO_PD(250), PORT_DATA_IO_PD(251), | ||
454 | PORT_DATA_IO_PU_PD(252), PORT_DATA_IO_PU_PD(253), | ||
455 | PORT_DATA_IO_PU_PD(254), PORT_DATA_IO_PU_PD(255), | ||
456 | PORT_DATA_IO_PU_PD(256), | ||
457 | |||
458 | /* 49-6 (GPIO) */ | ||
459 | PORT_DATA_IO_PU_PD(257), PORT_DATA_IO_PU_PD(258), | ||
460 | PORT_DATA_IO_PD(259), | ||
461 | PORT_DATA_IO_PU(260), PORT_DATA_IO_PU(261), PORT_DATA_IO_PU(262), | ||
462 | PORT_DATA_IO_PU(263), PORT_DATA_IO_PU(264), | ||
463 | PORT_DATA_O(265), | ||
464 | PORT_DATA_IO_PU(266), PORT_DATA_IO_PU(267), PORT_DATA_IO_PU(268), | ||
465 | PORT_DATA_IO_PU(269), PORT_DATA_IO_PU(270), | ||
466 | PORT_DATA_O(271), | ||
467 | PORT_DATA_I_PD(272), | ||
468 | |||
469 | /* Special Pull-up / Pull-down Functions */ | ||
470 | PINMUX_DATA(PORT48_KEYIN0_PU_MARK, MSELBCR_MSEL2_1, | ||
471 | PORT48_FN2, PORT48_IN_PU), | ||
472 | PINMUX_DATA(PORT49_KEYIN1_PU_MARK, MSELBCR_MSEL2_1, | ||
473 | PORT49_FN2, PORT49_IN_PU), | ||
474 | PINMUX_DATA(PORT50_KEYIN2_PU_MARK, MSELBCR_MSEL2_1, | ||
475 | PORT50_FN2, PORT50_IN_PU), | ||
476 | PINMUX_DATA(PORT55_KEYIN3_PU_MARK, MSELBCR_MSEL2_1, | ||
477 | PORT55_FN2, PORT55_IN_PU), | ||
478 | PINMUX_DATA(PORT56_KEYIN4_PU_MARK, MSELBCR_MSEL2_1, | ||
479 | PORT56_FN2, PORT56_IN_PU), | ||
480 | PINMUX_DATA(PORT57_KEYIN5_PU_MARK, MSELBCR_MSEL2_1, | ||
481 | PORT57_FN2, PORT57_IN_PU), | ||
482 | PINMUX_DATA(PORT58_KEYIN6_PU_MARK, MSELBCR_MSEL2_1, | ||
483 | PORT58_FN2, PORT58_IN_PU), | ||
484 | |||
485 | /* 49-1 (FN) */ | ||
486 | PINMUX_DATA(VBUS0_MARK, PORT0_FN1), | ||
487 | PINMUX_DATA(CPORT0_MARK, PORT1_FN1), | ||
488 | PINMUX_DATA(CPORT1_MARK, PORT2_FN1), | ||
489 | PINMUX_DATA(CPORT2_MARK, PORT3_FN1), | ||
490 | PINMUX_DATA(CPORT3_MARK, PORT4_FN1), | ||
491 | PINMUX_DATA(CPORT4_MARK, PORT5_FN1), | ||
492 | PINMUX_DATA(CPORT5_MARK, PORT6_FN1), | ||
493 | PINMUX_DATA(CPORT6_MARK, PORT7_FN1), | ||
494 | PINMUX_DATA(CPORT7_MARK, PORT8_FN1), | ||
495 | PINMUX_DATA(CPORT8_MARK, PORT9_FN1), | ||
496 | PINMUX_DATA(CPORT9_MARK, PORT10_FN1), | ||
497 | PINMUX_DATA(CPORT10_MARK, PORT11_FN1), | ||
498 | PINMUX_DATA(CPORT11_MARK, PORT12_FN1), | ||
499 | PINMUX_DATA(SIN2_MARK, PORT12_FN2), | ||
500 | PINMUX_DATA(CPORT12_MARK, PORT13_FN1), | ||
501 | PINMUX_DATA(XCTS2_MARK, PORT13_FN2), | ||
502 | PINMUX_DATA(CPORT13_MARK, PORT14_FN1), | ||
503 | PINMUX_DATA(RFSPO4_MARK, PORT14_FN2), | ||
504 | PINMUX_DATA(CPORT14_MARK, PORT15_FN1), | ||
505 | PINMUX_DATA(RFSPO5_MARK, PORT15_FN2), | ||
506 | PINMUX_DATA(CPORT15_MARK, PORT16_FN1), | ||
507 | PINMUX_DATA(CPORT16_MARK, PORT17_FN1), | ||
508 | PINMUX_DATA(CPORT17_MARK, PORT18_FN1), | ||
509 | PINMUX_DATA(SOUT2_MARK, PORT18_FN2), | ||
510 | PINMUX_DATA(CPORT18_MARK, PORT19_FN1), | ||
511 | PINMUX_DATA(XRTS2_MARK, PORT19_FN1), | ||
512 | PINMUX_DATA(CPORT19_MARK, PORT20_FN1), | ||
513 | PINMUX_DATA(CPORT20_MARK, PORT21_FN1), | ||
514 | PINMUX_DATA(RFSPO6_MARK, PORT21_FN2), | ||
515 | PINMUX_DATA(CPORT21_MARK, PORT22_FN1), | ||
516 | PINMUX_DATA(STATUS0_MARK, PORT22_FN2), | ||
517 | PINMUX_DATA(CPORT22_MARK, PORT23_FN1), | ||
518 | PINMUX_DATA(STATUS1_MARK, PORT23_FN2), | ||
519 | PINMUX_DATA(CPORT23_MARK, PORT24_FN1), | ||
520 | PINMUX_DATA(STATUS2_MARK, PORT24_FN2), | ||
521 | PINMUX_DATA(RFSPO7_MARK, PORT24_FN3), | ||
522 | PINMUX_DATA(MPORT0_MARK, PORT25_FN1), | ||
523 | PINMUX_DATA(MPORT1_MARK, PORT26_FN1), | ||
524 | PINMUX_DATA(B_SYNLD1_MARK, PORT27_FN1), | ||
525 | PINMUX_DATA(B_SYNLD2_MARK, PORT28_FN1), | ||
526 | PINMUX_DATA(XMAINPS_MARK, PORT29_FN1), | ||
527 | PINMUX_DATA(XDIVPS_MARK, PORT30_FN1), | ||
528 | PINMUX_DATA(XIDRST_MARK, PORT31_FN1), | ||
529 | PINMUX_DATA(IDCLK_MARK, PORT32_FN1), | ||
530 | PINMUX_DATA(IDIO_MARK, PORT33_FN1), | ||
531 | PINMUX_DATA(SOUT1_MARK, PORT34_FN1), | ||
532 | PINMUX_DATA(SCIFA4_TXD_MARK, PORT34_FN2), | ||
533 | PINMUX_DATA(M02_BERDAT_MARK, PORT34_FN3), | ||
534 | PINMUX_DATA(SIN1_MARK, PORT35_FN1), | ||
535 | PINMUX_DATA(SCIFA4_RXD_MARK, PORT35_FN2), | ||
536 | PINMUX_DATA(XWUP_MARK, PORT35_FN3), | ||
537 | PINMUX_DATA(XRTS1_MARK, PORT36_FN1), | ||
538 | PINMUX_DATA(SCIFA4_RTS_MARK, PORT36_FN2), | ||
539 | PINMUX_DATA(M03_BERCLK_MARK, PORT36_FN3), | ||
540 | PINMUX_DATA(XCTS1_MARK, PORT37_FN1), | ||
541 | PINMUX_DATA(SCIFA4_CTS_MARK, PORT37_FN2), | ||
542 | |||
543 | /* 49-2 (FN) */ | ||
544 | PINMUX_DATA(HSU_IQ_AGC6_MARK, PORT38_FN1), | ||
545 | PINMUX_DATA(MFG2_IN2_MARK, PORT38_FN2), | ||
546 | PINMUX_DATA(MSIOF2_MCK0_MARK, PORT38_FN3), | ||
547 | PINMUX_DATA(HSU_IQ_AGC5_MARK, PORT39_FN1), | ||
548 | PINMUX_DATA(MFG2_IN1_MARK, PORT39_FN2), | ||
549 | PINMUX_DATA(MSIOF2_MCK1_MARK, PORT39_FN3), | ||
550 | PINMUX_DATA(HSU_IQ_AGC4_MARK, PORT40_FN1), | ||
551 | PINMUX_DATA(MSIOF2_RSYNC_MARK, PORT40_FN3), | ||
552 | PINMUX_DATA(HSU_IQ_AGC3_MARK, PORT41_FN1), | ||
553 | PINMUX_DATA(MFG2_OUT1_MARK, PORT41_FN2), | ||
554 | PINMUX_DATA(MSIOF2_RSCK_MARK, PORT41_FN3), | ||
555 | PINMUX_DATA(HSU_IQ_AGC2_MARK, PORT42_FN1), | ||
556 | PINMUX_DATA(PORT42_KEYOUT0_MARK, MSELBCR_MSEL2_1, PORT42_FN2), | ||
557 | PINMUX_DATA(HSU_IQ_AGC1_MARK, PORT43_FN1), | ||
558 | PINMUX_DATA(PORT43_KEYOUT1_MARK, MSELBCR_MSEL2_1, PORT43_FN2), | ||
559 | PINMUX_DATA(HSU_IQ_AGC0_MARK, PORT44_FN1), | ||
560 | PINMUX_DATA(PORT44_KEYOUT2_MARK, MSELBCR_MSEL2_1, PORT44_FN2), | ||
561 | PINMUX_DATA(HSU_IQ_AGC_ST_MARK, PORT45_FN1), | ||
562 | PINMUX_DATA(PORT45_KEYOUT3_MARK, MSELBCR_MSEL2_1, PORT45_FN2), | ||
563 | PINMUX_DATA(HSU_IQ_PDO_MARK, PORT46_FN1), | ||
564 | PINMUX_DATA(PORT46_KEYOUT4_MARK, MSELBCR_MSEL2_1, PORT46_FN2), | ||
565 | PINMUX_DATA(HSU_IQ_PYO_MARK, PORT47_FN1), | ||
566 | PINMUX_DATA(PORT47_KEYOUT5_MARK, MSELBCR_MSEL2_1, PORT47_FN2), | ||
567 | PINMUX_DATA(HSU_EN_TXMUX_G3MO_MARK, PORT48_FN1), | ||
568 | PINMUX_DATA(PORT48_KEYIN0_MARK, MSELBCR_MSEL2_1, PORT48_FN2), | ||
569 | PINMUX_DATA(HSU_I_TXMUX_G3MO_MARK, PORT49_FN1), | ||
570 | PINMUX_DATA(PORT49_KEYIN1_MARK, MSELBCR_MSEL2_1, PORT49_FN2), | ||
571 | PINMUX_DATA(HSU_Q_TXMUX_G3MO_MARK, PORT50_FN1), | ||
572 | PINMUX_DATA(PORT50_KEYIN2_MARK, MSELBCR_MSEL2_1, PORT50_FN2), | ||
573 | PINMUX_DATA(HSU_SYO_MARK, PORT51_FN1), | ||
574 | PINMUX_DATA(PORT51_MSIOF2_TSYNC_MARK, PORT51_FN2), | ||
575 | PINMUX_DATA(HSU_SDO_MARK, PORT52_FN1), | ||
576 | PINMUX_DATA(PORT52_MSIOF2_TSCK_MARK, PORT52_FN2), | ||
577 | PINMUX_DATA(HSU_TGTTI_G3MO_MARK, PORT53_FN1), | ||
578 | PINMUX_DATA(PORT53_MSIOF2_TXD_MARK, PORT53_FN2), | ||
579 | PINMUX_DATA(B_TIME_STAMP_MARK, PORT54_FN1), | ||
580 | PINMUX_DATA(PORT54_MSIOF2_RXD_MARK, PORT54_FN2), | ||
581 | PINMUX_DATA(HSU_SDI_MARK, PORT55_FN1), | ||
582 | PINMUX_DATA(PORT55_KEYIN3_MARK, MSELBCR_MSEL2_1, PORT55_FN2), | ||
583 | PINMUX_DATA(HSU_SCO_MARK, PORT56_FN1), | ||
584 | PINMUX_DATA(PORT56_KEYIN4_MARK, MSELBCR_MSEL2_1, PORT56_FN2), | ||
585 | PINMUX_DATA(HSU_DREQ_MARK, PORT57_FN1), | ||
586 | PINMUX_DATA(PORT57_KEYIN5_MARK, MSELBCR_MSEL2_1, PORT57_FN2), | ||
587 | PINMUX_DATA(HSU_DACK_MARK, PORT58_FN1), | ||
588 | PINMUX_DATA(PORT58_KEYIN6_MARK, MSELBCR_MSEL2_1, PORT58_FN2), | ||
589 | PINMUX_DATA(HSU_CLK61M_MARK, PORT59_FN1), | ||
590 | PINMUX_DATA(PORT59_MSIOF2_SS1_MARK, PORT59_FN2), | ||
591 | PINMUX_DATA(HSU_XRST_MARK, PORT60_FN1), | ||
592 | PINMUX_DATA(PORT60_MSIOF2_SS2_MARK, PORT60_FN2), | ||
593 | PINMUX_DATA(PCMCLKO_MARK, PORT61_FN1), | ||
594 | PINMUX_DATA(SYNC8KO_MARK, PORT62_FN1), | ||
595 | PINMUX_DATA(DNPCM_A_MARK, PORT63_FN1), | ||
596 | PINMUX_DATA(UPPCM_A_MARK, PORT64_FN1), | ||
597 | PINMUX_DATA(XTALB1L_MARK, PORT65_FN1), | ||
598 | PINMUX_DATA(GPS_AGC1_MARK, PORT66_FN1), | ||
599 | PINMUX_DATA(SCIFA0_RTS_MARK, PORT66_FN2), | ||
600 | PINMUX_DATA(GPS_AGC2_MARK, PORT67_FN1), | ||
601 | PINMUX_DATA(SCIFA0_SCK_MARK, PORT67_FN2), | ||
602 | PINMUX_DATA(GPS_AGC3_MARK, PORT68_FN1), | ||
603 | PINMUX_DATA(SCIFA0_TXD_MARK, PORT68_FN2), | ||
604 | PINMUX_DATA(GPS_AGC4_MARK, PORT69_FN1), | ||
605 | PINMUX_DATA(SCIFA0_RXD_MARK, PORT69_FN2), | ||
606 | PINMUX_DATA(GPS_PWRD_MARK, PORT70_FN1), | ||
607 | PINMUX_DATA(SCIFA0_CTS_MARK, PORT70_FN2), | ||
608 | PINMUX_DATA(GPS_IM_MARK, PORT71_FN1), | ||
609 | PINMUX_DATA(GPS_IS_MARK, PORT72_FN1), | ||
610 | PINMUX_DATA(GPS_QM_MARK, PORT73_FN1), | ||
611 | PINMUX_DATA(GPS_QS_MARK, PORT74_FN1), | ||
612 | PINMUX_DATA(SIUBOMC_MARK, PORT75_FN1), | ||
613 | PINMUX_DATA(TPU2TO0_MARK, PORT75_FN3), | ||
614 | PINMUX_DATA(SIUCKB_MARK, PORT76_FN1), | ||
615 | PINMUX_DATA(TPU2TO1_MARK, PORT76_FN3), | ||
616 | PINMUX_DATA(SIUBOLR_MARK, PORT77_FN1), | ||
617 | PINMUX_DATA(BBIF2_TSYNC_MARK, PORT77_FN2), | ||
618 | PINMUX_DATA(TPU2TO2_MARK, PORT77_FN3), | ||
619 | PINMUX_DATA(SIUBOBT_MARK, PORT78_FN1), | ||
620 | PINMUX_DATA(BBIF2_TSCK_MARK, PORT78_FN2), | ||
621 | PINMUX_DATA(TPU2TO3_MARK, PORT78_FN3), | ||
622 | PINMUX_DATA(SIUBOSLD_MARK, PORT79_FN1), | ||
623 | PINMUX_DATA(BBIF2_TXD_MARK, PORT79_FN2), | ||
624 | PINMUX_DATA(TPU3TO0_MARK, PORT79_FN3), | ||
625 | PINMUX_DATA(SIUBILR_MARK, PORT80_FN1), | ||
626 | PINMUX_DATA(TPU3TO1_MARK, PORT80_FN3), | ||
627 | PINMUX_DATA(SIUBIBT_MARK, PORT81_FN1), | ||
628 | PINMUX_DATA(TPU3TO2_MARK, PORT81_FN3), | ||
629 | PINMUX_DATA(SIUBISLD_MARK, PORT82_FN1), | ||
630 | PINMUX_DATA(TPU3TO3_MARK, PORT82_FN3), | ||
631 | PINMUX_DATA(NMI_MARK, PORT83_FN1), | ||
632 | PINMUX_DATA(TPU4TO0_MARK, PORT83_FN3), | ||
633 | PINMUX_DATA(DNPCM_M_MARK, PORT84_FN1), | ||
634 | PINMUX_DATA(TPU4TO1_MARK, PORT84_FN3), | ||
635 | PINMUX_DATA(TPU4TO2_MARK, PORT85_FN3), | ||
636 | PINMUX_DATA(TPU4TO3_MARK, PORT86_FN3), | ||
637 | PINMUX_DATA(IRQ_TMPB_MARK, PORT87_FN1), | ||
638 | PINMUX_DATA(PWEN_MARK, PORT88_FN1), | ||
639 | PINMUX_DATA(MFG1_OUT1_MARK, PORT88_FN2), | ||
640 | PINMUX_DATA(OVCN_MARK, PORT89_FN1), | ||
641 | PINMUX_DATA(MFG1_IN1_MARK, PORT89_FN2), | ||
642 | PINMUX_DATA(OVCN2_MARK, PORT90_FN1), | ||
643 | PINMUX_DATA(MFG1_IN2_MARK, PORT90_FN2), | ||
644 | |||
645 | /* 49-3 (FN) */ | ||
646 | PINMUX_DATA(RFSPO1_MARK, PORT91_FN1), | ||
647 | PINMUX_DATA(RFSPO2_MARK, PORT92_FN1), | ||
648 | PINMUX_DATA(RFSPO3_MARK, PORT93_FN1), | ||
649 | PINMUX_DATA(PORT93_VIO_CKO2_MARK, PORT93_FN2), | ||
650 | PINMUX_DATA(USBTERM_MARK, PORT94_FN1), | ||
651 | PINMUX_DATA(EXTLP_MARK, PORT94_FN2), | ||
652 | PINMUX_DATA(IDIN_MARK, PORT95_FN1), | ||
653 | PINMUX_DATA(SCIFA5_CTS_MARK, PORT96_FN1), | ||
654 | PINMUX_DATA(MFG0_IN1_MARK, PORT96_FN2), | ||
655 | PINMUX_DATA(SCIFA5_RTS_MARK, PORT97_FN1), | ||
656 | PINMUX_DATA(MFG0_IN2_MARK, PORT97_FN2), | ||
657 | PINMUX_DATA(SCIFA5_RXD_MARK, PORT98_FN1), | ||
658 | PINMUX_DATA(SCIFA5_TXD_MARK, PORT99_FN1), | ||
659 | PINMUX_DATA(SCIFA5_SCK_MARK, PORT100_FN1), | ||
660 | PINMUX_DATA(MFG0_OUT1_MARK, PORT100_FN2), | ||
661 | PINMUX_DATA(A0_EA0_MARK, PORT101_FN1), | ||
662 | PINMUX_DATA(BS_MARK, PORT101_FN2), | ||
663 | PINMUX_DATA(A14_EA14_MARK, PORT102_FN1), | ||
664 | PINMUX_DATA(PORT102_KEYOUT0_MARK, MSELBCR_MSEL2_0, PORT102_FN2), | ||
665 | PINMUX_DATA(A15_EA15_MARK, PORT103_FN1), | ||
666 | PINMUX_DATA(PORT103_KEYOUT1_MARK, MSELBCR_MSEL2_0, PORT103_FN2), | ||
667 | PINMUX_DATA(DV_CLKOL_MARK, PORT103_FN3), | ||
668 | PINMUX_DATA(A16_EA16_MARK, PORT104_FN1), | ||
669 | PINMUX_DATA(PORT104_KEYOUT2_MARK, MSELBCR_MSEL2_0, PORT104_FN2), | ||
670 | PINMUX_DATA(DV_VSYNCL_MARK, PORT104_FN3), | ||
671 | PINMUX_DATA(MSIOF0_SS1_MARK, PORT104_FN4), | ||
672 | PINMUX_DATA(A17_EA17_MARK, PORT105_FN1), | ||
673 | PINMUX_DATA(PORT105_KEYOUT3_MARK, MSELBCR_MSEL2_0, PORT105_FN2), | ||
674 | PINMUX_DATA(DV_HSYNCL_MARK, PORT105_FN3), | ||
675 | PINMUX_DATA(MSIOF0_TSYNC_MARK, PORT105_FN4), | ||
676 | PINMUX_DATA(A18_EA18_MARK, PORT106_FN1), | ||
677 | PINMUX_DATA(PORT106_KEYOUT4_MARK, MSELBCR_MSEL2_0, PORT106_FN2), | ||
678 | PINMUX_DATA(DV_DL0_MARK, PORT106_FN3), | ||
679 | PINMUX_DATA(MSIOF0_TSCK_MARK, PORT106_FN4), | ||
680 | PINMUX_DATA(A19_EA19_MARK, PORT107_FN1), | ||
681 | PINMUX_DATA(PORT107_KEYOUT5_MARK, MSELBCR_MSEL2_0, PORT107_FN2), | ||
682 | PINMUX_DATA(DV_DL1_MARK, PORT107_FN3), | ||
683 | PINMUX_DATA(MSIOF0_TXD_MARK, PORT107_FN4), | ||
684 | PINMUX_DATA(A20_EA20_MARK, PORT108_FN1), | ||
685 | PINMUX_DATA(PORT108_KEYIN0_MARK, MSELBCR_MSEL2_0, PORT108_FN2), | ||
686 | PINMUX_DATA(DV_DL2_MARK, PORT108_FN3), | ||
687 | PINMUX_DATA(MSIOF0_RSCK_MARK, PORT108_FN4), | ||
688 | PINMUX_DATA(A21_EA21_MARK, PORT109_FN1), | ||
689 | PINMUX_DATA(PORT109_KEYIN1_MARK, MSELBCR_MSEL2_0, PORT109_FN2), | ||
690 | PINMUX_DATA(DV_DL3_MARK, PORT109_FN3), | ||
691 | PINMUX_DATA(MSIOF0_RSYNC_MARK, PORT109_FN4), | ||
692 | PINMUX_DATA(A22_EA22_MARK, PORT110_FN1), | ||
693 | PINMUX_DATA(PORT110_KEYIN2_MARK, MSELBCR_MSEL2_0, PORT110_FN2), | ||
694 | PINMUX_DATA(DV_DL4_MARK, PORT110_FN3), | ||
695 | PINMUX_DATA(MSIOF0_MCK0_MARK, PORT110_FN4), | ||
696 | PINMUX_DATA(A23_EA23_MARK, PORT111_FN1), | ||
697 | PINMUX_DATA(PORT111_KEYIN3_MARK, MSELBCR_MSEL2_0, PORT111_FN2), | ||
698 | PINMUX_DATA(DV_DL5_MARK, PORT111_FN3), | ||
699 | PINMUX_DATA(MSIOF0_MCK1_MARK, PORT111_FN4), | ||
700 | PINMUX_DATA(A24_EA24_MARK, PORT112_FN1), | ||
701 | PINMUX_DATA(PORT112_KEYIN4_MARK, MSELBCR_MSEL2_0, PORT112_FN2), | ||
702 | PINMUX_DATA(DV_DL6_MARK, PORT112_FN3), | ||
703 | PINMUX_DATA(MSIOF0_RXD_MARK, PORT112_FN4), | ||
704 | PINMUX_DATA(A25_EA25_MARK, PORT113_FN1), | ||
705 | PINMUX_DATA(PORT113_KEYIN5_MARK, MSELBCR_MSEL2_0, PORT113_FN2), | ||
706 | PINMUX_DATA(DV_DL7_MARK, PORT113_FN3), | ||
707 | PINMUX_DATA(MSIOF0_SS2_MARK, PORT113_FN4), | ||
708 | PINMUX_DATA(A26_MARK, PORT114_FN1), | ||
709 | PINMUX_DATA(PORT113_KEYIN6_MARK, MSELBCR_MSEL2_0, PORT114_FN2), | ||
710 | PINMUX_DATA(DV_CLKIL_MARK, PORT114_FN3), | ||
711 | PINMUX_DATA(D0_ED0_NAF0_MARK, PORT115_FN1), | ||
712 | PINMUX_DATA(D1_ED1_NAF1_MARK, PORT116_FN1), | ||
713 | PINMUX_DATA(D2_ED2_NAF2_MARK, PORT117_FN1), | ||
714 | PINMUX_DATA(D3_ED3_NAF3_MARK, PORT118_FN1), | ||
715 | PINMUX_DATA(D4_ED4_NAF4_MARK, PORT119_FN1), | ||
716 | PINMUX_DATA(D5_ED5_NAF5_MARK, PORT120_FN1), | ||
717 | PINMUX_DATA(D6_ED6_NAF6_MARK, PORT121_FN1), | ||
718 | PINMUX_DATA(D7_ED7_NAF7_MARK, PORT122_FN1), | ||
719 | PINMUX_DATA(D8_ED8_NAF8_MARK, PORT123_FN1), | ||
720 | PINMUX_DATA(D9_ED9_NAF9_MARK, PORT124_FN1), | ||
721 | PINMUX_DATA(D10_ED10_NAF10_MARK, PORT125_FN1), | ||
722 | PINMUX_DATA(D11_ED11_NAF11_MARK, PORT126_FN1), | ||
723 | PINMUX_DATA(D12_ED12_NAF12_MARK, PORT127_FN1), | ||
724 | PINMUX_DATA(D13_ED13_NAF13_MARK, PORT128_FN1), | ||
725 | PINMUX_DATA(D14_ED14_NAF14_MARK, PORT129_FN1), | ||
726 | PINMUX_DATA(D15_ED15_NAF15_MARK, PORT130_FN1), | ||
727 | PINMUX_DATA(CS4_MARK, PORT131_FN1), | ||
728 | PINMUX_DATA(CS5A_MARK, PORT132_FN1), | ||
729 | PINMUX_DATA(CS5B_MARK, PORT133_FN1), | ||
730 | PINMUX_DATA(FCE1_MARK, PORT133_FN2), | ||
731 | PINMUX_DATA(CS6B_MARK, PORT134_FN1), | ||
732 | PINMUX_DATA(XCS2_MARK, PORT134_FN2), | ||
733 | PINMUX_DATA(FCE0_MARK, PORT135_FN1), | ||
734 | PINMUX_DATA(CS6A_MARK, PORT136_FN1), | ||
735 | PINMUX_DATA(DACK0_MARK, PORT136_FN2), | ||
736 | PINMUX_DATA(WAIT_MARK, PORT137_FN1), | ||
737 | PINMUX_DATA(DREQ0_MARK, PORT137_FN2), | ||
738 | PINMUX_DATA(RD_XRD_MARK, PORT138_FN1), | ||
739 | PINMUX_DATA(A27_MARK, PORT139_FN1), | ||
740 | PINMUX_DATA(RDWR_XWE_MARK, PORT139_FN2), | ||
741 | PINMUX_DATA(WE0_XWR0_FWE_MARK, PORT140_FN1), | ||
742 | PINMUX_DATA(WE1_XWR1_MARK, PORT141_FN1), | ||
743 | PINMUX_DATA(FRB_MARK, PORT142_FN1), | ||
744 | PINMUX_DATA(CKO_MARK, PORT143_FN1), | ||
745 | PINMUX_DATA(NBRSTOUT_MARK, PORT144_FN1), | ||
746 | PINMUX_DATA(NBRST_MARK, PORT145_FN1), | ||
747 | |||
748 | /* 49-4 (FN) */ | ||
749 | PINMUX_DATA(RFSPO0_MARK, PORT146_FN1), | ||
750 | PINMUX_DATA(PORT146_VIO_CKO2_MARK, PORT146_FN2), | ||
751 | PINMUX_DATA(TSTMD_MARK, PORT147_FN1), | ||
752 | PINMUX_DATA(VIO_VD_MARK, PORT148_FN1), | ||
753 | PINMUX_DATA(VIO_HD_MARK, PORT149_FN1), | ||
754 | PINMUX_DATA(VIO_D0_MARK, PORT150_FN1), | ||
755 | PINMUX_DATA(VIO_D1_MARK, PORT151_FN1), | ||
756 | PINMUX_DATA(VIO_D2_MARK, PORT152_FN1), | ||
757 | PINMUX_DATA(VIO_D3_MARK, PORT153_FN1), | ||
758 | PINMUX_DATA(VIO_D4_MARK, PORT154_FN1), | ||
759 | PINMUX_DATA(VIO_D5_MARK, PORT155_FN1), | ||
760 | PINMUX_DATA(VIO_D6_MARK, PORT156_FN1), | ||
761 | PINMUX_DATA(VIO_D7_MARK, PORT157_FN1), | ||
762 | PINMUX_DATA(VIO_D8_MARK, PORT158_FN1), | ||
763 | PINMUX_DATA(VIO_D9_MARK, PORT159_FN1), | ||
764 | PINMUX_DATA(VIO_D10_MARK, PORT160_FN1), | ||
765 | PINMUX_DATA(VIO_D11_MARK, PORT161_FN1), | ||
766 | PINMUX_DATA(VIO_D12_MARK, PORT162_FN1), | ||
767 | PINMUX_DATA(VIO_D13_MARK, PORT163_FN1), | ||
768 | PINMUX_DATA(VIO_D14_MARK, PORT164_FN1), | ||
769 | PINMUX_DATA(VIO_D15_MARK, PORT165_FN1), | ||
770 | PINMUX_DATA(VIO_CLK_MARK, PORT166_FN1), | ||
771 | PINMUX_DATA(VIO_FIELD_MARK, PORT167_FN1), | ||
772 | PINMUX_DATA(VIO_CKO_MARK, PORT168_FN1), | ||
773 | PINMUX_DATA(MFG3_IN1_MARK, PORT169_FN2), | ||
774 | PINMUX_DATA(MFG3_IN2_MARK, PORT170_FN2), | ||
775 | PINMUX_DATA(M9_SLCD_A01_MARK, PORT171_FN1), | ||
776 | PINMUX_DATA(MFG3_OUT1_MARK, PORT171_FN2), | ||
777 | PINMUX_DATA(TPU0TO0_MARK, PORT171_FN3), | ||
778 | PINMUX_DATA(M10_SLCD_CK1_MARK, PORT172_FN1), | ||
779 | PINMUX_DATA(MFG4_IN1_MARK, PORT172_FN2), | ||
780 | PINMUX_DATA(TPU0TO1_MARK, PORT172_FN3), | ||
781 | PINMUX_DATA(M11_SLCD_SO1_MARK, PORT173_FN1), | ||
782 | PINMUX_DATA(MFG4_IN2_MARK, PORT173_FN2), | ||
783 | PINMUX_DATA(TPU0TO2_MARK, PORT173_FN3), | ||
784 | PINMUX_DATA(M12_SLCD_CE1_MARK, PORT174_FN1), | ||
785 | PINMUX_DATA(MFG4_OUT1_MARK, PORT174_FN2), | ||
786 | PINMUX_DATA(TPU0TO3_MARK, PORT174_FN3), | ||
787 | PINMUX_DATA(LCDD0_MARK, PORT175_FN1), | ||
788 | PINMUX_DATA(PORT175_KEYOUT0_MARK, PORT175_FN2), | ||
789 | PINMUX_DATA(DV_D0_MARK, PORT175_FN3), | ||
790 | PINMUX_DATA(SIUCKA_MARK, PORT175_FN4), | ||
791 | PINMUX_DATA(MFG0_OUT2_MARK, PORT175_FN5), | ||
792 | PINMUX_DATA(LCDD1_MARK, PORT176_FN1), | ||
793 | PINMUX_DATA(PORT176_KEYOUT1_MARK, PORT176_FN2), | ||
794 | PINMUX_DATA(DV_D1_MARK, PORT176_FN3), | ||
795 | PINMUX_DATA(SIUAOLR_MARK, PORT176_FN4), | ||
796 | PINMUX_DATA(BBIF2_TSYNC1_MARK, PORT176_FN5), | ||
797 | PINMUX_DATA(LCDD2_MARK, PORT177_FN1), | ||
798 | PINMUX_DATA(PORT177_KEYOUT2_MARK, PORT177_FN2), | ||
799 | PINMUX_DATA(DV_D2_MARK, PORT177_FN3), | ||
800 | PINMUX_DATA(SIUAOBT_MARK, PORT177_FN4), | ||
801 | PINMUX_DATA(BBIF2_TSCK1_MARK, PORT177_FN5), | ||
802 | PINMUX_DATA(LCDD3_MARK, PORT178_FN1), | ||
803 | PINMUX_DATA(PORT178_KEYOUT3_MARK, PORT178_FN2), | ||
804 | PINMUX_DATA(DV_D3_MARK, PORT178_FN3), | ||
805 | PINMUX_DATA(SIUAOSLD_MARK, PORT178_FN4), | ||
806 | PINMUX_DATA(BBIF2_TXD1_MARK, PORT178_FN5), | ||
807 | PINMUX_DATA(LCDD4_MARK, PORT179_FN1), | ||
808 | PINMUX_DATA(PORT179_KEYOUT4_MARK, PORT179_FN2), | ||
809 | PINMUX_DATA(DV_D4_MARK, PORT179_FN3), | ||
810 | PINMUX_DATA(SIUAISPD_MARK, PORT179_FN4), | ||
811 | PINMUX_DATA(MFG1_OUT2_MARK, PORT179_FN5), | ||
812 | PINMUX_DATA(LCDD5_MARK, PORT180_FN1), | ||
813 | PINMUX_DATA(PORT180_KEYOUT5_MARK, PORT180_FN2), | ||
814 | PINMUX_DATA(DV_D5_MARK, PORT180_FN3), | ||
815 | PINMUX_DATA(SIUAILR_MARK, PORT180_FN4), | ||
816 | PINMUX_DATA(MFG2_OUT2_MARK, PORT180_FN5), | ||
817 | PINMUX_DATA(LCDD6_MARK, PORT181_FN1), | ||
818 | PINMUX_DATA(DV_D6_MARK, PORT181_FN3), | ||
819 | PINMUX_DATA(SIUAIBT_MARK, PORT181_FN4), | ||
820 | PINMUX_DATA(MFG3_OUT2_MARK, PORT181_FN5), | ||
821 | PINMUX_DATA(XWR2_MARK, PORT181_FN7), | ||
822 | PINMUX_DATA(LCDD7_MARK, PORT182_FN1), | ||
823 | PINMUX_DATA(DV_D7_MARK, PORT182_FN3), | ||
824 | PINMUX_DATA(SIUAISLD_MARK, PORT182_FN4), | ||
825 | PINMUX_DATA(MFG4_OUT2_MARK, PORT182_FN5), | ||
826 | PINMUX_DATA(XWR3_MARK, PORT182_FN7), | ||
827 | PINMUX_DATA(LCDD8_MARK, PORT183_FN1), | ||
828 | PINMUX_DATA(DV_D8_MARK, PORT183_FN3), | ||
829 | PINMUX_DATA(D16_MARK, PORT183_FN6), | ||
830 | PINMUX_DATA(ED16_MARK, PORT183_FN7), | ||
831 | PINMUX_DATA(LCDD9_MARK, PORT184_FN1), | ||
832 | PINMUX_DATA(DV_D9_MARK, PORT184_FN3), | ||
833 | PINMUX_DATA(D17_MARK, PORT184_FN6), | ||
834 | PINMUX_DATA(ED17_MARK, PORT184_FN7), | ||
835 | PINMUX_DATA(LCDD10_MARK, PORT185_FN1), | ||
836 | PINMUX_DATA(DV_D10_MARK, PORT185_FN3), | ||
837 | PINMUX_DATA(D18_MARK, PORT185_FN6), | ||
838 | PINMUX_DATA(ED18_MARK, PORT185_FN7), | ||
839 | PINMUX_DATA(LCDD11_MARK, PORT186_FN1), | ||
840 | PINMUX_DATA(DV_D11_MARK, PORT186_FN3), | ||
841 | PINMUX_DATA(D19_MARK, PORT186_FN6), | ||
842 | PINMUX_DATA(ED19_MARK, PORT186_FN7), | ||
843 | PINMUX_DATA(LCDD12_MARK, PORT187_FN1), | ||
844 | PINMUX_DATA(DV_D12_MARK, PORT187_FN3), | ||
845 | PINMUX_DATA(D20_MARK, PORT187_FN6), | ||
846 | PINMUX_DATA(ED20_MARK, PORT187_FN7), | ||
847 | PINMUX_DATA(LCDD13_MARK, PORT188_FN1), | ||
848 | PINMUX_DATA(DV_D13_MARK, PORT188_FN3), | ||
849 | PINMUX_DATA(D21_MARK, PORT188_FN6), | ||
850 | PINMUX_DATA(ED21_MARK, PORT188_FN7), | ||
851 | PINMUX_DATA(LCDD14_MARK, PORT189_FN1), | ||
852 | PINMUX_DATA(DV_D14_MARK, PORT189_FN3), | ||
853 | PINMUX_DATA(D22_MARK, PORT189_FN6), | ||
854 | PINMUX_DATA(ED22_MARK, PORT189_FN7), | ||
855 | PINMUX_DATA(LCDD15_MARK, PORT190_FN1), | ||
856 | PINMUX_DATA(DV_D15_MARK, PORT190_FN3), | ||
857 | PINMUX_DATA(D23_MARK, PORT190_FN6), | ||
858 | PINMUX_DATA(ED23_MARK, PORT190_FN7), | ||
859 | PINMUX_DATA(LCDD16_MARK, PORT191_FN1), | ||
860 | PINMUX_DATA(DV_HSYNC_MARK, PORT191_FN3), | ||
861 | PINMUX_DATA(D24_MARK, PORT191_FN6), | ||
862 | PINMUX_DATA(ED24_MARK, PORT191_FN7), | ||
863 | PINMUX_DATA(LCDD17_MARK, PORT192_FN1), | ||
864 | PINMUX_DATA(DV_VSYNC_MARK, PORT192_FN3), | ||
865 | PINMUX_DATA(D25_MARK, PORT192_FN6), | ||
866 | PINMUX_DATA(ED25_MARK, PORT192_FN7), | ||
867 | PINMUX_DATA(LCDD18_MARK, PORT193_FN1), | ||
868 | PINMUX_DATA(DREQ2_MARK, PORT193_FN2), | ||
869 | PINMUX_DATA(MSIOF0L_TSCK_MARK, PORT193_FN5), | ||
870 | PINMUX_DATA(D26_MARK, PORT193_FN6), | ||
871 | PINMUX_DATA(ED26_MARK, PORT193_FN7), | ||
872 | PINMUX_DATA(LCDD19_MARK, PORT194_FN1), | ||
873 | PINMUX_DATA(MSIOF0L_TSYNC_MARK, PORT194_FN5), | ||
874 | PINMUX_DATA(D27_MARK, PORT194_FN6), | ||
875 | PINMUX_DATA(ED27_MARK, PORT194_FN7), | ||
876 | PINMUX_DATA(LCDD20_MARK, PORT195_FN1), | ||
877 | PINMUX_DATA(TS_SPSYNC1_MARK, PORT195_FN2), | ||
878 | PINMUX_DATA(MSIOF0L_MCK0_MARK, PORT195_FN5), | ||
879 | PINMUX_DATA(D28_MARK, PORT195_FN6), | ||
880 | PINMUX_DATA(ED28_MARK, PORT195_FN7), | ||
881 | PINMUX_DATA(LCDD21_MARK, PORT196_FN1), | ||
882 | PINMUX_DATA(TS_SDAT1_MARK, PORT196_FN2), | ||
883 | PINMUX_DATA(MSIOF0L_MCK1_MARK, PORT196_FN5), | ||
884 | PINMUX_DATA(D29_MARK, PORT196_FN6), | ||
885 | PINMUX_DATA(ED29_MARK, PORT196_FN7), | ||
886 | PINMUX_DATA(LCDD22_MARK, PORT197_FN1), | ||
887 | PINMUX_DATA(TS_SDEN1_MARK, PORT197_FN2), | ||
888 | PINMUX_DATA(MSIOF0L_SS1_MARK, PORT197_FN5), | ||
889 | PINMUX_DATA(D30_MARK, PORT197_FN6), | ||
890 | PINMUX_DATA(ED30_MARK, PORT197_FN7), | ||
891 | PINMUX_DATA(LCDD23_MARK, PORT198_FN1), | ||
892 | PINMUX_DATA(TS_SCK1_MARK, PORT198_FN2), | ||
893 | PINMUX_DATA(MSIOF0L_SS2_MARK, PORT198_FN5), | ||
894 | PINMUX_DATA(D31_MARK, PORT198_FN6), | ||
895 | PINMUX_DATA(ED31_MARK, PORT198_FN7), | ||
896 | PINMUX_DATA(LCDDCK_MARK, PORT199_FN1), | ||
897 | PINMUX_DATA(LCDWR_MARK, PORT199_FN2), | ||
898 | PINMUX_DATA(DV_CKO_MARK, PORT199_FN3), | ||
899 | PINMUX_DATA(SIUAOSPD_MARK, PORT199_FN4), | ||
900 | PINMUX_DATA(LCDRD_MARK, PORT200_FN1), | ||
901 | PINMUX_DATA(DACK2_MARK, PORT200_FN2), | ||
902 | PINMUX_DATA(MSIOF0L_RSYNC_MARK, PORT200_FN5), | ||
903 | |||
904 | /* 49-5 (FN) */ | ||
905 | PINMUX_DATA(LCDHSYN_MARK, PORT201_FN1), | ||
906 | PINMUX_DATA(LCDCS_MARK, PORT201_FN2), | ||
907 | PINMUX_DATA(LCDCS2_MARK, PORT201_FN3), | ||
908 | PINMUX_DATA(DACK3_MARK, PORT201_FN4), | ||
909 | PINMUX_DATA(LCDDISP_MARK, PORT202_FN1), | ||
910 | PINMUX_DATA(LCDRS_MARK, PORT202_FN2), | ||
911 | PINMUX_DATA(DREQ3_MARK, PORT202_FN4), | ||
912 | PINMUX_DATA(MSIOF0L_RSCK_MARK, PORT202_FN5), | ||
913 | PINMUX_DATA(LCDCSYN_MARK, PORT203_FN1), | ||
914 | PINMUX_DATA(LCDCSYN2_MARK, PORT203_FN2), | ||
915 | PINMUX_DATA(DV_CKI_MARK, PORT203_FN3), | ||
916 | PINMUX_DATA(LCDLCLK_MARK, PORT204_FN1), | ||
917 | PINMUX_DATA(DREQ1_MARK, PORT204_FN3), | ||
918 | PINMUX_DATA(MSIOF0L_RXD_MARK, PORT204_FN5), | ||
919 | PINMUX_DATA(LCDDON_MARK, PORT205_FN1), | ||
920 | PINMUX_DATA(LCDDON2_MARK, PORT205_FN2), | ||
921 | PINMUX_DATA(DACK1_MARK, PORT205_FN3), | ||
922 | PINMUX_DATA(MSIOF0L_TXD_MARK, PORT205_FN5), | ||
923 | PINMUX_DATA(VIO_DR0_MARK, PORT206_FN1), | ||
924 | PINMUX_DATA(VIO_DR1_MARK, PORT207_FN1), | ||
925 | PINMUX_DATA(VIO_DR2_MARK, PORT208_FN1), | ||
926 | PINMUX_DATA(VIO_DR3_MARK, PORT209_FN1), | ||
927 | PINMUX_DATA(VIO_DR4_MARK, PORT210_FN1), | ||
928 | PINMUX_DATA(VIO_DR5_MARK, PORT211_FN1), | ||
929 | PINMUX_DATA(VIO_DR6_MARK, PORT212_FN1), | ||
930 | PINMUX_DATA(VIO_DR7_MARK, PORT213_FN1), | ||
931 | PINMUX_DATA(VIO_VDR_MARK, PORT214_FN1), | ||
932 | PINMUX_DATA(VIO_HDR_MARK, PORT215_FN1), | ||
933 | PINMUX_DATA(VIO_CLKR_MARK, PORT216_FN1), | ||
934 | PINMUX_DATA(VIO_CKOR_MARK, PORT217_FN1), | ||
935 | PINMUX_DATA(SCIFA1_TXD_MARK, PORT220_FN2), | ||
936 | PINMUX_DATA(GPS_PGFA0_MARK, PORT220_FN3), | ||
937 | PINMUX_DATA(SCIFA1_SCK_MARK, PORT221_FN2), | ||
938 | PINMUX_DATA(GPS_PGFA1_MARK, PORT221_FN3), | ||
939 | PINMUX_DATA(SCIFA1_RTS_MARK, PORT222_FN2), | ||
940 | PINMUX_DATA(GPS_EPPSINMON_MARK, PORT222_FN3), | ||
941 | PINMUX_DATA(SCIFA1_RXD_MARK, PORT223_FN2), | ||
942 | PINMUX_DATA(SCIFA1_CTS_MARK, PORT224_FN2), | ||
943 | PINMUX_DATA(MSIOF1_TXD_MARK, PORT225_FN1), | ||
944 | PINMUX_DATA(SCIFA1_TXD2_MARK, PORT225_FN2), | ||
945 | PINMUX_DATA(GPS_TXD_MARK, PORT225_FN3), | ||
946 | PINMUX_DATA(MSIOF1_TSYNC_MARK, PORT226_FN1), | ||
947 | PINMUX_DATA(SCIFA1_CTS2_MARK, PORT226_FN2), | ||
948 | PINMUX_DATA(I2C_SDA2_MARK, PORT226_FN3), | ||
949 | PINMUX_DATA(MSIOF1_TSCK_MARK, PORT227_FN1), | ||
950 | PINMUX_DATA(SCIFA1_SCK2_MARK, PORT227_FN2), | ||
951 | PINMUX_DATA(MSIOF1_RXD_MARK, PORT228_FN1), | ||
952 | PINMUX_DATA(SCIFA1_RXD2_MARK, PORT228_FN2), | ||
953 | PINMUX_DATA(GPS_RXD_MARK, PORT228_FN3), | ||
954 | PINMUX_DATA(MSIOF1_RSCK_MARK, PORT229_FN1), | ||
955 | PINMUX_DATA(SCIFA1_RTS2_MARK, PORT229_FN2), | ||
956 | PINMUX_DATA(MSIOF1_RSYNC_MARK, PORT230_FN1), | ||
957 | PINMUX_DATA(I2C_SCL2_MARK, PORT230_FN3), | ||
958 | PINMUX_DATA(MSIOF1_MCK0_MARK, PORT231_FN1), | ||
959 | PINMUX_DATA(MSIOF1_MCK1_MARK, PORT232_FN1), | ||
960 | PINMUX_DATA(MSIOF1_SS1_MARK, PORT233_FN1), | ||
961 | PINMUX_DATA(EDBGREQ3_MARK, PORT233_FN2), | ||
962 | PINMUX_DATA(MSIOF1_SS2_MARK, PORT234_FN1), | ||
963 | PINMUX_DATA(PORT236_IROUT_MARK, PORT236_FN1), | ||
964 | PINMUX_DATA(IRDA_OUT_MARK, PORT236_FN2), | ||
965 | PINMUX_DATA(IRDA_IN_MARK, PORT237_FN2), | ||
966 | PINMUX_DATA(IRDA_FIRSEL_MARK, PORT238_FN1), | ||
967 | PINMUX_DATA(TPU1TO0_MARK, PORT239_FN3), | ||
968 | PINMUX_DATA(TS_SPSYNC3_MARK, PORT239_FN4), | ||
969 | PINMUX_DATA(TPU1TO1_MARK, PORT240_FN3), | ||
970 | PINMUX_DATA(TS_SDAT3_MARK, PORT240_FN4), | ||
971 | PINMUX_DATA(TPU1TO2_MARK, PORT241_FN3), | ||
972 | PINMUX_DATA(TS_SDEN3_MARK, PORT241_FN4), | ||
973 | PINMUX_DATA(PORT241_MSIOF2_SS1_MARK, PORT241_FN5), | ||
974 | PINMUX_DATA(TPU1TO3_MARK, PORT242_FN3), | ||
975 | PINMUX_DATA(PORT242_MSIOF2_TSCK_MARK, PORT242_FN5), | ||
976 | PINMUX_DATA(M13_BSW_MARK, PORT243_FN2), | ||
977 | PINMUX_DATA(PORT243_MSIOF2_TSYNC_MARK, PORT243_FN5), | ||
978 | PINMUX_DATA(M14_GSW_MARK, PORT244_FN2), | ||
979 | PINMUX_DATA(PORT244_MSIOF2_TXD_MARK, PORT244_FN5), | ||
980 | PINMUX_DATA(PORT245_IROUT_MARK, PORT245_FN1), | ||
981 | PINMUX_DATA(M15_RSW_MARK, PORT245_FN2), | ||
982 | PINMUX_DATA(SOUT3_MARK, PORT246_FN1), | ||
983 | PINMUX_DATA(SCIFA2_TXD1_MARK, PORT246_FN2), | ||
984 | PINMUX_DATA(SIN3_MARK, PORT247_FN1), | ||
985 | PINMUX_DATA(SCIFA2_RXD1_MARK, PORT247_FN2), | ||
986 | PINMUX_DATA(XRTS3_MARK, PORT248_FN1), | ||
987 | PINMUX_DATA(SCIFA2_RTS1_MARK, PORT248_FN2), | ||
988 | PINMUX_DATA(PORT248_MSIOF2_SS2_MARK, PORT248_FN5), | ||
989 | PINMUX_DATA(XCTS3_MARK, PORT249_FN1), | ||
990 | PINMUX_DATA(SCIFA2_CTS1_MARK, PORT249_FN2), | ||
991 | PINMUX_DATA(PORT249_MSIOF2_RXD_MARK, PORT249_FN5), | ||
992 | PINMUX_DATA(DINT_MARK, PORT250_FN1), | ||
993 | PINMUX_DATA(SCIFA2_SCK1_MARK, PORT250_FN2), | ||
994 | PINMUX_DATA(TS_SCK3_MARK, PORT250_FN4), | ||
995 | PINMUX_DATA(SDHICLK0_MARK, PORT251_FN1), | ||
996 | PINMUX_DATA(TCK2_MARK, PORT251_FN2), | ||
997 | PINMUX_DATA(SDHICD0_MARK, PORT252_FN1), | ||
998 | PINMUX_DATA(SDHID0_0_MARK, PORT253_FN1), | ||
999 | PINMUX_DATA(TMS2_MARK, PORT253_FN2), | ||
1000 | PINMUX_DATA(SDHID0_1_MARK, PORT254_FN1), | ||
1001 | PINMUX_DATA(TDO2_MARK, PORT254_FN2), | ||
1002 | PINMUX_DATA(SDHID0_2_MARK, PORT255_FN1), | ||
1003 | PINMUX_DATA(TDI2_MARK, PORT255_FN2), | ||
1004 | PINMUX_DATA(SDHID0_3_MARK, PORT256_FN1), | ||
1005 | PINMUX_DATA(RTCK2_MARK, PORT256_FN2), | ||
1006 | |||
1007 | /* 49-6 (FN) */ | ||
1008 | PINMUX_DATA(SDHICMD0_MARK, PORT257_FN1), | ||
1009 | PINMUX_DATA(TRST2_MARK, PORT257_FN2), | ||
1010 | PINMUX_DATA(SDHIWP0_MARK, PORT258_FN1), | ||
1011 | PINMUX_DATA(EDBGREQ2_MARK, PORT258_FN2), | ||
1012 | PINMUX_DATA(SDHICLK1_MARK, PORT259_FN1), | ||
1013 | PINMUX_DATA(TCK3_MARK, PORT259_FN4), | ||
1014 | PINMUX_DATA(SDHID1_0_MARK, PORT260_FN1), | ||
1015 | PINMUX_DATA(M11_SLCD_SO2_MARK, PORT260_FN2), | ||
1016 | PINMUX_DATA(TS_SPSYNC2_MARK, PORT260_FN3), | ||
1017 | PINMUX_DATA(TMS3_MARK, PORT260_FN4), | ||
1018 | PINMUX_DATA(SDHID1_1_MARK, PORT261_FN1), | ||
1019 | PINMUX_DATA(M9_SLCD_AO2_MARK, PORT261_FN2), | ||
1020 | PINMUX_DATA(TS_SDAT2_MARK, PORT261_FN3), | ||
1021 | PINMUX_DATA(TDO3_MARK, PORT261_FN4), | ||
1022 | PINMUX_DATA(SDHID1_2_MARK, PORT262_FN1), | ||
1023 | PINMUX_DATA(M10_SLCD_CK2_MARK, PORT262_FN2), | ||
1024 | PINMUX_DATA(TS_SDEN2_MARK, PORT262_FN3), | ||
1025 | PINMUX_DATA(TDI3_MARK, PORT262_FN4), | ||
1026 | PINMUX_DATA(SDHID1_3_MARK, PORT263_FN1), | ||
1027 | PINMUX_DATA(M12_SLCD_CE2_MARK, PORT263_FN2), | ||
1028 | PINMUX_DATA(TS_SCK2_MARK, PORT263_FN3), | ||
1029 | PINMUX_DATA(RTCK3_MARK, PORT263_FN4), | ||
1030 | PINMUX_DATA(SDHICMD1_MARK, PORT264_FN1), | ||
1031 | PINMUX_DATA(TRST3_MARK, PORT264_FN4), | ||
1032 | PINMUX_DATA(SDHICLK2_MARK, PORT265_FN1), | ||
1033 | PINMUX_DATA(SCIFB_SCK_MARK, PORT265_FN2), | ||
1034 | PINMUX_DATA(SDHID2_0_MARK, PORT266_FN1), | ||
1035 | PINMUX_DATA(SCIFB_TXD_MARK, PORT266_FN2), | ||
1036 | PINMUX_DATA(SDHID2_1_MARK, PORT267_FN1), | ||
1037 | PINMUX_DATA(SCIFB_CTS_MARK, PORT267_FN2), | ||
1038 | PINMUX_DATA(SDHID2_2_MARK, PORT268_FN1), | ||
1039 | PINMUX_DATA(SCIFB_RXD_MARK, PORT268_FN2), | ||
1040 | PINMUX_DATA(SDHID2_3_MARK, PORT269_FN1), | ||
1041 | PINMUX_DATA(SCIFB_RTS_MARK, PORT269_FN2), | ||
1042 | PINMUX_DATA(SDHICMD2_MARK, PORT270_FN1), | ||
1043 | PINMUX_DATA(RESETOUTS_MARK, PORT271_FN1), | ||
1044 | PINMUX_DATA(DIVLOCK_MARK, PORT272_FN1), | ||
1045 | }; | ||
1046 | |||
1047 | static struct pinmux_gpio pinmux_gpios[] = { | ||
1048 | /* 49-1 -> 49-6 (GPIO) */ | ||
1049 | GPIO_PORT_ALL(), | ||
1050 | |||
1051 | /* Special Pull-up / Pull-down Functions */ | ||
1052 | GPIO_FN(PORT48_KEYIN0_PU), GPIO_FN(PORT49_KEYIN1_PU), | ||
1053 | GPIO_FN(PORT50_KEYIN2_PU), GPIO_FN(PORT55_KEYIN3_PU), | ||
1054 | GPIO_FN(PORT56_KEYIN4_PU), GPIO_FN(PORT57_KEYIN5_PU), | ||
1055 | GPIO_FN(PORT58_KEYIN6_PU), | ||
1056 | |||
1057 | /* 49-1 (FN) */ | ||
1058 | GPIO_FN(VBUS0), GPIO_FN(CPORT0), GPIO_FN(CPORT1), GPIO_FN(CPORT2), | ||
1059 | GPIO_FN(CPORT3), GPIO_FN(CPORT4), GPIO_FN(CPORT5), GPIO_FN(CPORT6), | ||
1060 | GPIO_FN(CPORT7), GPIO_FN(CPORT8), GPIO_FN(CPORT9), GPIO_FN(CPORT10), | ||
1061 | GPIO_FN(CPORT11), GPIO_FN(SIN2), GPIO_FN(CPORT12), GPIO_FN(XCTS2), | ||
1062 | GPIO_FN(CPORT13), GPIO_FN(RFSPO4), GPIO_FN(CPORT14), GPIO_FN(RFSPO5), | ||
1063 | GPIO_FN(CPORT15), GPIO_FN(CPORT16), GPIO_FN(CPORT17), GPIO_FN(SOUT2), | ||
1064 | GPIO_FN(CPORT18), GPIO_FN(XRTS2), GPIO_FN(CPORT19), GPIO_FN(CPORT20), | ||
1065 | GPIO_FN(RFSPO6), GPIO_FN(CPORT21), GPIO_FN(STATUS0), GPIO_FN(CPORT22), | ||
1066 | GPIO_FN(STATUS1), GPIO_FN(CPORT23), GPIO_FN(STATUS2), GPIO_FN(RFSPO7), | ||
1067 | GPIO_FN(MPORT0), GPIO_FN(MPORT1), GPIO_FN(B_SYNLD1), GPIO_FN(B_SYNLD2), | ||
1068 | GPIO_FN(XMAINPS), GPIO_FN(XDIVPS), GPIO_FN(XIDRST), GPIO_FN(IDCLK), | ||
1069 | GPIO_FN(IDIO), GPIO_FN(SOUT1), GPIO_FN(SCIFA4_TXD), | ||
1070 | GPIO_FN(M02_BERDAT), GPIO_FN(SIN1), GPIO_FN(SCIFA4_RXD), GPIO_FN(XWUP), | ||
1071 | GPIO_FN(XRTS1), GPIO_FN(SCIFA4_RTS), GPIO_FN(M03_BERCLK), | ||
1072 | GPIO_FN(XCTS1), GPIO_FN(SCIFA4_CTS), | ||
1073 | |||
1074 | /* 49-2 (FN) */ | ||
1075 | GPIO_FN(HSU_IQ_AGC6), GPIO_FN(MFG2_IN2), GPIO_FN(MSIOF2_MCK0), | ||
1076 | GPIO_FN(HSU_IQ_AGC5), GPIO_FN(MFG2_IN1), GPIO_FN(MSIOF2_MCK1), | ||
1077 | GPIO_FN(HSU_IQ_AGC4), GPIO_FN(MSIOF2_RSYNC), | ||
1078 | GPIO_FN(HSU_IQ_AGC3), GPIO_FN(MFG2_OUT1), GPIO_FN(MSIOF2_RSCK), | ||
1079 | GPIO_FN(HSU_IQ_AGC2), GPIO_FN(PORT42_KEYOUT0), | ||
1080 | GPIO_FN(HSU_IQ_AGC1), GPIO_FN(PORT43_KEYOUT1), | ||
1081 | GPIO_FN(HSU_IQ_AGC0), GPIO_FN(PORT44_KEYOUT2), | ||
1082 | GPIO_FN(HSU_IQ_AGC_ST), GPIO_FN(PORT45_KEYOUT3), | ||
1083 | GPIO_FN(HSU_IQ_PDO), GPIO_FN(PORT46_KEYOUT4), | ||
1084 | GPIO_FN(HSU_IQ_PYO), GPIO_FN(PORT47_KEYOUT5), | ||
1085 | GPIO_FN(HSU_EN_TXMUX_G3MO), GPIO_FN(PORT48_KEYIN0), | ||
1086 | GPIO_FN(HSU_I_TXMUX_G3MO), GPIO_FN(PORT49_KEYIN1), | ||
1087 | GPIO_FN(HSU_Q_TXMUX_G3MO), GPIO_FN(PORT50_KEYIN2), | ||
1088 | GPIO_FN(HSU_SYO), GPIO_FN(PORT51_MSIOF2_TSYNC), | ||
1089 | GPIO_FN(HSU_SDO), GPIO_FN(PORT52_MSIOF2_TSCK), | ||
1090 | GPIO_FN(HSU_TGTTI_G3MO), GPIO_FN(PORT53_MSIOF2_TXD), | ||
1091 | GPIO_FN(B_TIME_STAMP), GPIO_FN(PORT54_MSIOF2_RXD), | ||
1092 | GPIO_FN(HSU_SDI), GPIO_FN(PORT55_KEYIN3), | ||
1093 | GPIO_FN(HSU_SCO), GPIO_FN(PORT56_KEYIN4), | ||
1094 | GPIO_FN(HSU_DREQ), GPIO_FN(PORT57_KEYIN5), | ||
1095 | GPIO_FN(HSU_DACK), GPIO_FN(PORT58_KEYIN6), | ||
1096 | GPIO_FN(HSU_CLK61M), GPIO_FN(PORT59_MSIOF2_SS1), | ||
1097 | GPIO_FN(HSU_XRST), GPIO_FN(PORT60_MSIOF2_SS2), | ||
1098 | GPIO_FN(PCMCLKO), GPIO_FN(SYNC8KO), GPIO_FN(DNPCM_A), GPIO_FN(UPPCM_A), | ||
1099 | GPIO_FN(XTALB1L), | ||
1100 | GPIO_FN(GPS_AGC1), GPIO_FN(SCIFA0_RTS), | ||
1101 | GPIO_FN(GPS_AGC2), GPIO_FN(SCIFA0_SCK), | ||
1102 | GPIO_FN(GPS_AGC3), GPIO_FN(SCIFA0_TXD), | ||
1103 | GPIO_FN(GPS_AGC4), GPIO_FN(SCIFA0_RXD), | ||
1104 | GPIO_FN(GPS_PWRD), GPIO_FN(SCIFA0_CTS), | ||
1105 | GPIO_FN(GPS_IM), GPIO_FN(GPS_IS), GPIO_FN(GPS_QM), GPIO_FN(GPS_QS), | ||
1106 | GPIO_FN(SIUBOMC), GPIO_FN(TPU2TO0), | ||
1107 | GPIO_FN(SIUCKB), GPIO_FN(TPU2TO1), | ||
1108 | GPIO_FN(SIUBOLR), GPIO_FN(BBIF2_TSYNC), GPIO_FN(TPU2TO2), | ||
1109 | GPIO_FN(SIUBOBT), GPIO_FN(BBIF2_TSCK), GPIO_FN(TPU2TO3), | ||
1110 | GPIO_FN(SIUBOSLD), GPIO_FN(BBIF2_TXD), GPIO_FN(TPU3TO0), | ||
1111 | GPIO_FN(SIUBILR), GPIO_FN(TPU3TO1), | ||
1112 | GPIO_FN(SIUBIBT), GPIO_FN(TPU3TO2), | ||
1113 | GPIO_FN(SIUBISLD), GPIO_FN(TPU3TO3), | ||
1114 | GPIO_FN(NMI), GPIO_FN(TPU4TO0), | ||
1115 | GPIO_FN(DNPCM_M), GPIO_FN(TPU4TO1), GPIO_FN(TPU4TO2), GPIO_FN(TPU4TO3), | ||
1116 | GPIO_FN(IRQ_TMPB), | ||
1117 | GPIO_FN(PWEN), GPIO_FN(MFG1_OUT1), | ||
1118 | GPIO_FN(OVCN), GPIO_FN(MFG1_IN1), | ||
1119 | GPIO_FN(OVCN2), GPIO_FN(MFG1_IN2), | ||
1120 | |||
1121 | /* 49-3 (FN) */ | ||
1122 | GPIO_FN(RFSPO1), GPIO_FN(RFSPO2), GPIO_FN(RFSPO3), | ||
1123 | GPIO_FN(PORT93_VIO_CKO2), | ||
1124 | GPIO_FN(USBTERM), GPIO_FN(EXTLP), GPIO_FN(IDIN), | ||
1125 | GPIO_FN(SCIFA5_CTS), GPIO_FN(MFG0_IN1), | ||
1126 | GPIO_FN(SCIFA5_RTS), GPIO_FN(MFG0_IN2), | ||
1127 | GPIO_FN(SCIFA5_RXD), | ||
1128 | GPIO_FN(SCIFA5_TXD), | ||
1129 | GPIO_FN(SCIFA5_SCK), GPIO_FN(MFG0_OUT1), | ||
1130 | GPIO_FN(A0_EA0), GPIO_FN(BS), | ||
1131 | GPIO_FN(A14_EA14), GPIO_FN(PORT102_KEYOUT0), | ||
1132 | GPIO_FN(A15_EA15), GPIO_FN(PORT103_KEYOUT1), GPIO_FN(DV_CLKOL), | ||
1133 | GPIO_FN(A16_EA16), GPIO_FN(PORT104_KEYOUT2), | ||
1134 | GPIO_FN(DV_VSYNCL), GPIO_FN(MSIOF0_SS1), | ||
1135 | GPIO_FN(A17_EA17), GPIO_FN(PORT105_KEYOUT3), | ||
1136 | GPIO_FN(DV_HSYNCL), GPIO_FN(MSIOF0_TSYNC), | ||
1137 | GPIO_FN(A18_EA18), GPIO_FN(PORT106_KEYOUT4), | ||
1138 | GPIO_FN(DV_DL0), GPIO_FN(MSIOF0_TSCK), | ||
1139 | GPIO_FN(A19_EA19), GPIO_FN(PORT107_KEYOUT5), | ||
1140 | GPIO_FN(DV_DL1), GPIO_FN(MSIOF0_TXD), | ||
1141 | GPIO_FN(A20_EA20), GPIO_FN(PORT108_KEYIN0), | ||
1142 | GPIO_FN(DV_DL2), GPIO_FN(MSIOF0_RSCK), | ||
1143 | GPIO_FN(A21_EA21), GPIO_FN(PORT109_KEYIN1), | ||
1144 | GPIO_FN(DV_DL3), GPIO_FN(MSIOF0_RSYNC), | ||
1145 | GPIO_FN(A22_EA22), GPIO_FN(PORT110_KEYIN2), | ||
1146 | GPIO_FN(DV_DL4), GPIO_FN(MSIOF0_MCK0), | ||
1147 | GPIO_FN(A23_EA23), GPIO_FN(PORT111_KEYIN3), | ||
1148 | GPIO_FN(DV_DL5), GPIO_FN(MSIOF0_MCK1), | ||
1149 | GPIO_FN(A24_EA24), GPIO_FN(PORT112_KEYIN4), | ||
1150 | GPIO_FN(DV_DL6), GPIO_FN(MSIOF0_RXD), | ||
1151 | GPIO_FN(A25_EA25), GPIO_FN(PORT113_KEYIN5), | ||
1152 | GPIO_FN(DV_DL7), GPIO_FN(MSIOF0_SS2), | ||
1153 | GPIO_FN(A26), GPIO_FN(PORT113_KEYIN6), GPIO_FN(DV_CLKIL), | ||
1154 | GPIO_FN(D0_ED0_NAF0), GPIO_FN(D1_ED1_NAF1), GPIO_FN(D2_ED2_NAF2), | ||
1155 | GPIO_FN(D3_ED3_NAF3), GPIO_FN(D4_ED4_NAF4), GPIO_FN(D5_ED5_NAF5), | ||
1156 | GPIO_FN(D6_ED6_NAF6), GPIO_FN(D7_ED7_NAF7), GPIO_FN(D8_ED8_NAF8), | ||
1157 | GPIO_FN(D9_ED9_NAF9), GPIO_FN(D10_ED10_NAF10), GPIO_FN(D11_ED11_NAF11), | ||
1158 | GPIO_FN(D12_ED12_NAF12), GPIO_FN(D13_ED13_NAF13), | ||
1159 | GPIO_FN(D14_ED14_NAF14), GPIO_FN(D15_ED15_NAF15), | ||
1160 | GPIO_FN(CS4), GPIO_FN(CS5A), GPIO_FN(CS5B), GPIO_FN(FCE1), | ||
1161 | GPIO_FN(CS6B), GPIO_FN(XCS2), GPIO_FN(FCE0), GPIO_FN(CS6A), | ||
1162 | GPIO_FN(DACK0), GPIO_FN(WAIT), GPIO_FN(DREQ0), GPIO_FN(RD_XRD), | ||
1163 | GPIO_FN(A27), GPIO_FN(RDWR_XWE), GPIO_FN(WE0_XWR0_FWE), | ||
1164 | GPIO_FN(WE1_XWR1), GPIO_FN(FRB), GPIO_FN(CKO), | ||
1165 | GPIO_FN(NBRSTOUT), GPIO_FN(NBRST), | ||
1166 | |||
1167 | /* 49-4 (FN) */ | ||
1168 | GPIO_FN(RFSPO0), GPIO_FN(PORT146_VIO_CKO2), GPIO_FN(TSTMD), | ||
1169 | GPIO_FN(VIO_VD), GPIO_FN(VIO_HD), | ||
1170 | GPIO_FN(VIO_D0), GPIO_FN(VIO_D1), GPIO_FN(VIO_D2), | ||
1171 | GPIO_FN(VIO_D3), GPIO_FN(VIO_D4), GPIO_FN(VIO_D5), | ||
1172 | GPIO_FN(VIO_D6), GPIO_FN(VIO_D7), GPIO_FN(VIO_D8), | ||
1173 | GPIO_FN(VIO_D9), GPIO_FN(VIO_D10), GPIO_FN(VIO_D11), | ||
1174 | GPIO_FN(VIO_D12), GPIO_FN(VIO_D13), GPIO_FN(VIO_D14), | ||
1175 | GPIO_FN(VIO_D15), GPIO_FN(VIO_CLK), GPIO_FN(VIO_FIELD), | ||
1176 | GPIO_FN(VIO_CKO), | ||
1177 | GPIO_FN(MFG3_IN1), GPIO_FN(MFG3_IN2), | ||
1178 | GPIO_FN(M9_SLCD_A01), GPIO_FN(MFG3_OUT1), GPIO_FN(TPU0TO0), | ||
1179 | GPIO_FN(M10_SLCD_CK1), GPIO_FN(MFG4_IN1), GPIO_FN(TPU0TO1), | ||
1180 | GPIO_FN(M11_SLCD_SO1), GPIO_FN(MFG4_IN2), GPIO_FN(TPU0TO2), | ||
1181 | GPIO_FN(M12_SLCD_CE1), GPIO_FN(MFG4_OUT1), GPIO_FN(TPU0TO3), | ||
1182 | GPIO_FN(LCDD0), GPIO_FN(PORT175_KEYOUT0), GPIO_FN(DV_D0), | ||
1183 | GPIO_FN(SIUCKA), GPIO_FN(MFG0_OUT2), | ||
1184 | GPIO_FN(LCDD1), GPIO_FN(PORT176_KEYOUT1), GPIO_FN(DV_D1), | ||
1185 | GPIO_FN(SIUAOLR), GPIO_FN(BBIF2_TSYNC1), | ||
1186 | GPIO_FN(LCDD2), GPIO_FN(PORT177_KEYOUT2), GPIO_FN(DV_D2), | ||
1187 | GPIO_FN(SIUAOBT), GPIO_FN(BBIF2_TSCK1), | ||
1188 | GPIO_FN(LCDD3), GPIO_FN(PORT178_KEYOUT3), GPIO_FN(DV_D3), | ||
1189 | GPIO_FN(SIUAOSLD), GPIO_FN(BBIF2_TXD1), | ||
1190 | GPIO_FN(LCDD4), GPIO_FN(PORT179_KEYOUT4), GPIO_FN(DV_D4), | ||
1191 | GPIO_FN(SIUAISPD), GPIO_FN(MFG1_OUT2), | ||
1192 | GPIO_FN(LCDD5), GPIO_FN(PORT180_KEYOUT5), GPIO_FN(DV_D5), | ||
1193 | GPIO_FN(SIUAILR), GPIO_FN(MFG2_OUT2), | ||
1194 | GPIO_FN(LCDD6), GPIO_FN(DV_D6), | ||
1195 | GPIO_FN(SIUAIBT), GPIO_FN(MFG3_OUT2), GPIO_FN(XWR2), | ||
1196 | GPIO_FN(LCDD7), GPIO_FN(DV_D7), | ||
1197 | GPIO_FN(SIUAISLD), GPIO_FN(MFG4_OUT2), GPIO_FN(XWR3), | ||
1198 | GPIO_FN(LCDD8), GPIO_FN(DV_D8), GPIO_FN(D16), GPIO_FN(ED16), | ||
1199 | GPIO_FN(LCDD9), GPIO_FN(DV_D9), GPIO_FN(D17), GPIO_FN(ED17), | ||
1200 | GPIO_FN(LCDD10), GPIO_FN(DV_D10), GPIO_FN(D18), GPIO_FN(ED18), | ||
1201 | GPIO_FN(LCDD11), GPIO_FN(DV_D11), GPIO_FN(D19), GPIO_FN(ED19), | ||
1202 | GPIO_FN(LCDD12), GPIO_FN(DV_D12), GPIO_FN(D20), GPIO_FN(ED20), | ||
1203 | GPIO_FN(LCDD13), GPIO_FN(DV_D13), GPIO_FN(D21), GPIO_FN(ED21), | ||
1204 | GPIO_FN(LCDD14), GPIO_FN(DV_D14), GPIO_FN(D22), GPIO_FN(ED22), | ||
1205 | GPIO_FN(LCDD15), GPIO_FN(DV_D15), GPIO_FN(D23), GPIO_FN(ED23), | ||
1206 | GPIO_FN(LCDD16), GPIO_FN(DV_HSYNC), GPIO_FN(D24), GPIO_FN(ED24), | ||
1207 | GPIO_FN(LCDD17), GPIO_FN(DV_VSYNC), GPIO_FN(D25), GPIO_FN(ED25), | ||
1208 | GPIO_FN(LCDD18), GPIO_FN(DREQ2), GPIO_FN(MSIOF0L_TSCK), | ||
1209 | GPIO_FN(D26), GPIO_FN(ED26), | ||
1210 | GPIO_FN(LCDD19), GPIO_FN(MSIOF0L_TSYNC), | ||
1211 | GPIO_FN(D27), GPIO_FN(ED27), | ||
1212 | GPIO_FN(LCDD20), GPIO_FN(TS_SPSYNC1), GPIO_FN(MSIOF0L_MCK0), | ||
1213 | GPIO_FN(D28), GPIO_FN(ED28), | ||
1214 | GPIO_FN(LCDD21), GPIO_FN(TS_SDAT1), GPIO_FN(MSIOF0L_MCK1), | ||
1215 | GPIO_FN(D29), GPIO_FN(ED29), | ||
1216 | GPIO_FN(LCDD22), GPIO_FN(TS_SDEN1), GPIO_FN(MSIOF0L_SS1), | ||
1217 | GPIO_FN(D30), GPIO_FN(ED30), | ||
1218 | GPIO_FN(LCDD23), GPIO_FN(TS_SCK1), GPIO_FN(MSIOF0L_SS2), | ||
1219 | GPIO_FN(D31), GPIO_FN(ED31), | ||
1220 | GPIO_FN(LCDDCK), GPIO_FN(LCDWR), GPIO_FN(DV_CKO), GPIO_FN(SIUAOSPD), | ||
1221 | GPIO_FN(LCDRD), GPIO_FN(DACK2), GPIO_FN(MSIOF0L_RSYNC), | ||
1222 | |||
1223 | /* 49-5 (FN) */ | ||
1224 | GPIO_FN(LCDHSYN), GPIO_FN(LCDCS), GPIO_FN(LCDCS2), GPIO_FN(DACK3), | ||
1225 | GPIO_FN(LCDDISP), GPIO_FN(LCDRS), GPIO_FN(DREQ3), GPIO_FN(MSIOF0L_RSCK), | ||
1226 | GPIO_FN(LCDCSYN), GPIO_FN(LCDCSYN2), GPIO_FN(DV_CKI), | ||
1227 | GPIO_FN(LCDLCLK), GPIO_FN(DREQ1), GPIO_FN(MSIOF0L_RXD), | ||
1228 | GPIO_FN(LCDDON), GPIO_FN(LCDDON2), GPIO_FN(DACK1), GPIO_FN(MSIOF0L_TXD), | ||
1229 | GPIO_FN(VIO_DR0), GPIO_FN(VIO_DR1), GPIO_FN(VIO_DR2), GPIO_FN(VIO_DR3), | ||
1230 | GPIO_FN(VIO_DR4), GPIO_FN(VIO_DR5), GPIO_FN(VIO_DR6), GPIO_FN(VIO_DR7), | ||
1231 | GPIO_FN(VIO_VDR), GPIO_FN(VIO_HDR), | ||
1232 | GPIO_FN(VIO_CLKR), GPIO_FN(VIO_CKOR), | ||
1233 | GPIO_FN(SCIFA1_TXD), GPIO_FN(GPS_PGFA0), | ||
1234 | GPIO_FN(SCIFA1_SCK), GPIO_FN(GPS_PGFA1), | ||
1235 | GPIO_FN(SCIFA1_RTS), GPIO_FN(GPS_EPPSINMON), | ||
1236 | GPIO_FN(SCIFA1_RXD), GPIO_FN(SCIFA1_CTS), | ||
1237 | GPIO_FN(MSIOF1_TXD), GPIO_FN(SCIFA1_TXD2), GPIO_FN(GPS_TXD), | ||
1238 | GPIO_FN(MSIOF1_TSYNC), GPIO_FN(SCIFA1_CTS2), GPIO_FN(I2C_SDA2), | ||
1239 | GPIO_FN(MSIOF1_TSCK), GPIO_FN(SCIFA1_SCK2), | ||
1240 | GPIO_FN(MSIOF1_RXD), GPIO_FN(SCIFA1_RXD2), GPIO_FN(GPS_RXD), | ||
1241 | GPIO_FN(MSIOF1_RSCK), GPIO_FN(SCIFA1_RTS2), | ||
1242 | GPIO_FN(MSIOF1_RSYNC), GPIO_FN(I2C_SCL2), | ||
1243 | GPIO_FN(MSIOF1_MCK0), GPIO_FN(MSIOF1_MCK1), | ||
1244 | GPIO_FN(MSIOF1_SS1), GPIO_FN(EDBGREQ3), | ||
1245 | GPIO_FN(MSIOF1_SS2), | ||
1246 | GPIO_FN(PORT236_IROUT), GPIO_FN(IRDA_OUT), | ||
1247 | GPIO_FN(IRDA_IN), GPIO_FN(IRDA_FIRSEL), | ||
1248 | GPIO_FN(TPU1TO0), GPIO_FN(TS_SPSYNC3), | ||
1249 | GPIO_FN(TPU1TO1), GPIO_FN(TS_SDAT3), | ||
1250 | GPIO_FN(TPU1TO2), GPIO_FN(TS_SDEN3), GPIO_FN(PORT241_MSIOF2_SS1), | ||
1251 | GPIO_FN(TPU1TO3), GPIO_FN(PORT242_MSIOF2_TSCK), | ||
1252 | GPIO_FN(M13_BSW), GPIO_FN(PORT243_MSIOF2_TSYNC), | ||
1253 | GPIO_FN(M14_GSW), GPIO_FN(PORT244_MSIOF2_TXD), | ||
1254 | GPIO_FN(PORT245_IROUT), GPIO_FN(M15_RSW), | ||
1255 | GPIO_FN(SOUT3), GPIO_FN(SCIFA2_TXD1), | ||
1256 | GPIO_FN(SIN3), GPIO_FN(SCIFA2_RXD1), | ||
1257 | GPIO_FN(XRTS3), GPIO_FN(SCIFA2_RTS1), GPIO_FN(PORT248_MSIOF2_SS2), | ||
1258 | GPIO_FN(XCTS3), GPIO_FN(SCIFA2_CTS1), GPIO_FN(PORT249_MSIOF2_RXD), | ||
1259 | GPIO_FN(DINT), GPIO_FN(SCIFA2_SCK1), GPIO_FN(TS_SCK3), | ||
1260 | GPIO_FN(SDHICLK0), GPIO_FN(TCK2), | ||
1261 | GPIO_FN(SDHICD0), | ||
1262 | GPIO_FN(SDHID0_0), GPIO_FN(TMS2), | ||
1263 | GPIO_FN(SDHID0_1), GPIO_FN(TDO2), | ||
1264 | GPIO_FN(SDHID0_2), GPIO_FN(TDI2), | ||
1265 | GPIO_FN(SDHID0_3), GPIO_FN(RTCK2), | ||
1266 | |||
1267 | /* 49-6 (FN) */ | ||
1268 | GPIO_FN(SDHICMD0), GPIO_FN(TRST2), | ||
1269 | GPIO_FN(SDHIWP0), GPIO_FN(EDBGREQ2), | ||
1270 | GPIO_FN(SDHICLK1), GPIO_FN(TCK3), | ||
1271 | GPIO_FN(SDHID1_0), GPIO_FN(M11_SLCD_SO2), | ||
1272 | GPIO_FN(TS_SPSYNC2), GPIO_FN(TMS3), | ||
1273 | GPIO_FN(SDHID1_1), GPIO_FN(M9_SLCD_AO2), | ||
1274 | GPIO_FN(TS_SDAT2), GPIO_FN(TDO3), | ||
1275 | GPIO_FN(SDHID1_2), GPIO_FN(M10_SLCD_CK2), | ||
1276 | GPIO_FN(TS_SDEN2), GPIO_FN(TDI3), | ||
1277 | GPIO_FN(SDHID1_3), GPIO_FN(M12_SLCD_CE2), | ||
1278 | GPIO_FN(TS_SCK2), GPIO_FN(RTCK3), | ||
1279 | GPIO_FN(SDHICMD1), GPIO_FN(TRST3), | ||
1280 | GPIO_FN(SDHICLK2), GPIO_FN(SCIFB_SCK), | ||
1281 | GPIO_FN(SDHID2_0), GPIO_FN(SCIFB_TXD), | ||
1282 | GPIO_FN(SDHID2_1), GPIO_FN(SCIFB_CTS), | ||
1283 | GPIO_FN(SDHID2_2), GPIO_FN(SCIFB_RXD), | ||
1284 | GPIO_FN(SDHID2_3), GPIO_FN(SCIFB_RTS), | ||
1285 | GPIO_FN(SDHICMD2), | ||
1286 | GPIO_FN(RESETOUTS), | ||
1287 | GPIO_FN(DIVLOCK), | ||
1288 | }; | ||
1289 | |||
1290 | static struct pinmux_cfg_reg pinmux_config_regs[] = { | ||
1291 | PORTCR(0, 0xe6050000), /* PORT0CR */ | ||
1292 | PORTCR(1, 0xe6050001), /* PORT1CR */ | ||
1293 | PORTCR(2, 0xe6050002), /* PORT2CR */ | ||
1294 | PORTCR(3, 0xe6050003), /* PORT3CR */ | ||
1295 | PORTCR(4, 0xe6050004), /* PORT4CR */ | ||
1296 | PORTCR(5, 0xe6050005), /* PORT5CR */ | ||
1297 | PORTCR(6, 0xe6050006), /* PORT6CR */ | ||
1298 | PORTCR(7, 0xe6050007), /* PORT7CR */ | ||
1299 | PORTCR(8, 0xe6050008), /* PORT8CR */ | ||
1300 | PORTCR(9, 0xe6050009), /* PORT9CR */ | ||
1301 | |||
1302 | PORTCR(10, 0xe605000a), /* PORT10CR */ | ||
1303 | PORTCR(11, 0xe605000b), /* PORT11CR */ | ||
1304 | PORTCR(12, 0xe605000c), /* PORT12CR */ | ||
1305 | PORTCR(13, 0xe605000d), /* PORT13CR */ | ||
1306 | PORTCR(14, 0xe605000e), /* PORT14CR */ | ||
1307 | PORTCR(15, 0xe605000f), /* PORT15CR */ | ||
1308 | PORTCR(16, 0xe6050010), /* PORT16CR */ | ||
1309 | PORTCR(17, 0xe6050011), /* PORT17CR */ | ||
1310 | PORTCR(18, 0xe6050012), /* PORT18CR */ | ||
1311 | PORTCR(19, 0xe6050013), /* PORT19CR */ | ||
1312 | |||
1313 | PORTCR(20, 0xe6050014), /* PORT20CR */ | ||
1314 | PORTCR(21, 0xe6050015), /* PORT21CR */ | ||
1315 | PORTCR(22, 0xe6050016), /* PORT22CR */ | ||
1316 | PORTCR(23, 0xe6050017), /* PORT23CR */ | ||
1317 | PORTCR(24, 0xe6050018), /* PORT24CR */ | ||
1318 | PORTCR(25, 0xe6050019), /* PORT25CR */ | ||
1319 | PORTCR(26, 0xe605001a), /* PORT26CR */ | ||
1320 | PORTCR(27, 0xe605001b), /* PORT27CR */ | ||
1321 | PORTCR(28, 0xe605001c), /* PORT28CR */ | ||
1322 | PORTCR(29, 0xe605001d), /* PORT29CR */ | ||
1323 | |||
1324 | PORTCR(30, 0xe605001e), /* PORT30CR */ | ||
1325 | PORTCR(31, 0xe605001f), /* PORT31CR */ | ||
1326 | PORTCR(32, 0xe6050020), /* PORT32CR */ | ||
1327 | PORTCR(33, 0xe6050021), /* PORT33CR */ | ||
1328 | PORTCR(34, 0xe6050022), /* PORT34CR */ | ||
1329 | PORTCR(35, 0xe6050023), /* PORT35CR */ | ||
1330 | PORTCR(36, 0xe6050024), /* PORT36CR */ | ||
1331 | PORTCR(37, 0xe6050025), /* PORT37CR */ | ||
1332 | PORTCR(38, 0xe6050026), /* PORT38CR */ | ||
1333 | PORTCR(39, 0xe6050027), /* PORT39CR */ | ||
1334 | |||
1335 | PORTCR(40, 0xe6050028), /* PORT40CR */ | ||
1336 | PORTCR(41, 0xe6050029), /* PORT41CR */ | ||
1337 | PORTCR(42, 0xe605002a), /* PORT42CR */ | ||
1338 | PORTCR(43, 0xe605002b), /* PORT43CR */ | ||
1339 | PORTCR(44, 0xe605002c), /* PORT44CR */ | ||
1340 | PORTCR(45, 0xe605002d), /* PORT45CR */ | ||
1341 | PORTCR(46, 0xe605002e), /* PORT46CR */ | ||
1342 | PORTCR(47, 0xe605002f), /* PORT47CR */ | ||
1343 | PORTCR(48, 0xe6050030), /* PORT48CR */ | ||
1344 | PORTCR(49, 0xe6050031), /* PORT49CR */ | ||
1345 | |||
1346 | PORTCR(50, 0xe6050032), /* PORT50CR */ | ||
1347 | PORTCR(51, 0xe6050033), /* PORT51CR */ | ||
1348 | PORTCR(52, 0xe6050034), /* PORT52CR */ | ||
1349 | PORTCR(53, 0xe6050035), /* PORT53CR */ | ||
1350 | PORTCR(54, 0xe6050036), /* PORT54CR */ | ||
1351 | PORTCR(55, 0xe6050037), /* PORT55CR */ | ||
1352 | PORTCR(56, 0xe6050038), /* PORT56CR */ | ||
1353 | PORTCR(57, 0xe6050039), /* PORT57CR */ | ||
1354 | PORTCR(58, 0xe605003a), /* PORT58CR */ | ||
1355 | PORTCR(59, 0xe605003b), /* PORT59CR */ | ||
1356 | |||
1357 | PORTCR(60, 0xe605003c), /* PORT60CR */ | ||
1358 | PORTCR(61, 0xe605003d), /* PORT61CR */ | ||
1359 | PORTCR(62, 0xe605003e), /* PORT62CR */ | ||
1360 | PORTCR(63, 0xe605003f), /* PORT63CR */ | ||
1361 | PORTCR(64, 0xe6050040), /* PORT64CR */ | ||
1362 | PORTCR(65, 0xe6050041), /* PORT65CR */ | ||
1363 | PORTCR(66, 0xe6050042), /* PORT66CR */ | ||
1364 | PORTCR(67, 0xe6050043), /* PORT67CR */ | ||
1365 | PORTCR(68, 0xe6050044), /* PORT68CR */ | ||
1366 | PORTCR(69, 0xe6050045), /* PORT69CR */ | ||
1367 | |||
1368 | PORTCR(70, 0xe6050046), /* PORT70CR */ | ||
1369 | PORTCR(71, 0xe6050047), /* PORT71CR */ | ||
1370 | PORTCR(72, 0xe6050048), /* PORT72CR */ | ||
1371 | PORTCR(73, 0xe6050049), /* PORT73CR */ | ||
1372 | PORTCR(74, 0xe605004a), /* PORT74CR */ | ||
1373 | PORTCR(75, 0xe605004b), /* PORT75CR */ | ||
1374 | PORTCR(76, 0xe605004c), /* PORT76CR */ | ||
1375 | PORTCR(77, 0xe605004d), /* PORT77CR */ | ||
1376 | PORTCR(78, 0xe605004e), /* PORT78CR */ | ||
1377 | PORTCR(79, 0xe605004f), /* PORT79CR */ | ||
1378 | |||
1379 | PORTCR(80, 0xe6050050), /* PORT80CR */ | ||
1380 | PORTCR(81, 0xe6050051), /* PORT81CR */ | ||
1381 | PORTCR(82, 0xe6050052), /* PORT82CR */ | ||
1382 | PORTCR(83, 0xe6050053), /* PORT83CR */ | ||
1383 | PORTCR(84, 0xe6050054), /* PORT84CR */ | ||
1384 | PORTCR(85, 0xe6050055), /* PORT85CR */ | ||
1385 | PORTCR(86, 0xe6050056), /* PORT86CR */ | ||
1386 | PORTCR(87, 0xe6050057), /* PORT87CR */ | ||
1387 | PORTCR(88, 0xe6051058), /* PORT88CR */ | ||
1388 | PORTCR(89, 0xe6051059), /* PORT89CR */ | ||
1389 | |||
1390 | PORTCR(90, 0xe605105a), /* PORT90CR */ | ||
1391 | PORTCR(91, 0xe605105b), /* PORT91CR */ | ||
1392 | PORTCR(92, 0xe605105c), /* PORT92CR */ | ||
1393 | PORTCR(93, 0xe605105d), /* PORT93CR */ | ||
1394 | PORTCR(94, 0xe605105e), /* PORT94CR */ | ||
1395 | PORTCR(95, 0xe605105f), /* PORT95CR */ | ||
1396 | PORTCR(96, 0xe6051060), /* PORT96CR */ | ||
1397 | PORTCR(97, 0xe6051061), /* PORT97CR */ | ||
1398 | PORTCR(98, 0xe6051062), /* PORT98CR */ | ||
1399 | PORTCR(99, 0xe6051063), /* PORT99CR */ | ||
1400 | |||
1401 | PORTCR(100, 0xe6051064), /* PORT100CR */ | ||
1402 | PORTCR(101, 0xe6051065), /* PORT101CR */ | ||
1403 | PORTCR(102, 0xe6051066), /* PORT102CR */ | ||
1404 | PORTCR(103, 0xe6051067), /* PORT103CR */ | ||
1405 | PORTCR(104, 0xe6051068), /* PORT104CR */ | ||
1406 | PORTCR(105, 0xe6051069), /* PORT105CR */ | ||
1407 | PORTCR(106, 0xe605106a), /* PORT106CR */ | ||
1408 | PORTCR(107, 0xe605106b), /* PORT107CR */ | ||
1409 | PORTCR(108, 0xe605106c), /* PORT108CR */ | ||
1410 | PORTCR(109, 0xe605106d), /* PORT109CR */ | ||
1411 | |||
1412 | PORTCR(110, 0xe605106e), /* PORT110CR */ | ||
1413 | PORTCR(111, 0xe605106f), /* PORT111CR */ | ||
1414 | PORTCR(112, 0xe6051070), /* PORT112CR */ | ||
1415 | PORTCR(113, 0xe6051071), /* PORT113CR */ | ||
1416 | PORTCR(114, 0xe6051072), /* PORT114CR */ | ||
1417 | PORTCR(115, 0xe6051073), /* PORT115CR */ | ||
1418 | PORTCR(116, 0xe6051074), /* PORT116CR */ | ||
1419 | PORTCR(117, 0xe6051075), /* PORT117CR */ | ||
1420 | PORTCR(118, 0xe6051076), /* PORT118CR */ | ||
1421 | PORTCR(119, 0xe6051077), /* PORT119CR */ | ||
1422 | |||
1423 | PORTCR(120, 0xe6051078), /* PORT120CR */ | ||
1424 | PORTCR(121, 0xe6051079), /* PORT121CR */ | ||
1425 | PORTCR(122, 0xe605107a), /* PORT122CR */ | ||
1426 | PORTCR(123, 0xe605107b), /* PORT123CR */ | ||
1427 | PORTCR(124, 0xe605107c), /* PORT124CR */ | ||
1428 | PORTCR(125, 0xe605107d), /* PORT125CR */ | ||
1429 | PORTCR(126, 0xe605107e), /* PORT126CR */ | ||
1430 | PORTCR(127, 0xe605107f), /* PORT127CR */ | ||
1431 | PORTCR(128, 0xe6051080), /* PORT128CR */ | ||
1432 | PORTCR(129, 0xe6051081), /* PORT129CR */ | ||
1433 | |||
1434 | PORTCR(130, 0xe6051082), /* PORT130CR */ | ||
1435 | PORTCR(131, 0xe6051083), /* PORT131CR */ | ||
1436 | PORTCR(132, 0xe6051084), /* PORT132CR */ | ||
1437 | PORTCR(133, 0xe6051085), /* PORT133CR */ | ||
1438 | PORTCR(134, 0xe6051086), /* PORT134CR */ | ||
1439 | PORTCR(135, 0xe6051087), /* PORT135CR */ | ||
1440 | PORTCR(136, 0xe6051088), /* PORT136CR */ | ||
1441 | PORTCR(137, 0xe6051089), /* PORT137CR */ | ||
1442 | PORTCR(138, 0xe605108a), /* PORT138CR */ | ||
1443 | PORTCR(139, 0xe605108b), /* PORT139CR */ | ||
1444 | |||
1445 | PORTCR(140, 0xe605108c), /* PORT140CR */ | ||
1446 | PORTCR(141, 0xe605108d), /* PORT141CR */ | ||
1447 | PORTCR(142, 0xe605108e), /* PORT142CR */ | ||
1448 | PORTCR(143, 0xe605108f), /* PORT143CR */ | ||
1449 | PORTCR(144, 0xe6051090), /* PORT144CR */ | ||
1450 | PORTCR(145, 0xe6051091), /* PORT145CR */ | ||
1451 | PORTCR(146, 0xe6051092), /* PORT146CR */ | ||
1452 | PORTCR(147, 0xe6051093), /* PORT147CR */ | ||
1453 | PORTCR(148, 0xe6051094), /* PORT148CR */ | ||
1454 | PORTCR(149, 0xe6051095), /* PORT149CR */ | ||
1455 | |||
1456 | PORTCR(150, 0xe6051096), /* PORT150CR */ | ||
1457 | PORTCR(151, 0xe6051097), /* PORT151CR */ | ||
1458 | PORTCR(152, 0xe6051098), /* PORT152CR */ | ||
1459 | PORTCR(153, 0xe6051099), /* PORT153CR */ | ||
1460 | PORTCR(154, 0xe605109a), /* PORT154CR */ | ||
1461 | PORTCR(155, 0xe605109b), /* PORT155CR */ | ||
1462 | PORTCR(156, 0xe605109c), /* PORT156CR */ | ||
1463 | PORTCR(157, 0xe605109d), /* PORT157CR */ | ||
1464 | PORTCR(158, 0xe605109e), /* PORT158CR */ | ||
1465 | PORTCR(159, 0xe605109f), /* PORT159CR */ | ||
1466 | |||
1467 | PORTCR(160, 0xe60510a0), /* PORT160CR */ | ||
1468 | PORTCR(161, 0xe60510a1), /* PORT161CR */ | ||
1469 | PORTCR(162, 0xe60510a2), /* PORT162CR */ | ||
1470 | PORTCR(163, 0xe60510a3), /* PORT163CR */ | ||
1471 | PORTCR(164, 0xe60510a4), /* PORT164CR */ | ||
1472 | PORTCR(165, 0xe60510a5), /* PORT165CR */ | ||
1473 | PORTCR(166, 0xe60510a6), /* PORT166CR */ | ||
1474 | PORTCR(167, 0xe60510a7), /* PORT167CR */ | ||
1475 | PORTCR(168, 0xe60510a8), /* PORT168CR */ | ||
1476 | PORTCR(169, 0xe60510a9), /* PORT169CR */ | ||
1477 | |||
1478 | PORTCR(170, 0xe60510aa), /* PORT170CR */ | ||
1479 | PORTCR(171, 0xe60510ab), /* PORT171CR */ | ||
1480 | PORTCR(172, 0xe60510ac), /* PORT172CR */ | ||
1481 | PORTCR(173, 0xe60510ad), /* PORT173CR */ | ||
1482 | PORTCR(174, 0xe60510ae), /* PORT174CR */ | ||
1483 | PORTCR(175, 0xe60520af), /* PORT175CR */ | ||
1484 | PORTCR(176, 0xe60520b0), /* PORT176CR */ | ||
1485 | PORTCR(177, 0xe60520b1), /* PORT177CR */ | ||
1486 | PORTCR(178, 0xe60520b2), /* PORT178CR */ | ||
1487 | PORTCR(179, 0xe60520b3), /* PORT179CR */ | ||
1488 | |||
1489 | PORTCR(180, 0xe60520b4), /* PORT180CR */ | ||
1490 | PORTCR(181, 0xe60520b5), /* PORT181CR */ | ||
1491 | PORTCR(182, 0xe60520b6), /* PORT182CR */ | ||
1492 | PORTCR(183, 0xe60520b7), /* PORT183CR */ | ||
1493 | PORTCR(184, 0xe60520b8), /* PORT184CR */ | ||
1494 | PORTCR(185, 0xe60520b9), /* PORT185CR */ | ||
1495 | PORTCR(186, 0xe60520ba), /* PORT186CR */ | ||
1496 | PORTCR(187, 0xe60520bb), /* PORT187CR */ | ||
1497 | PORTCR(188, 0xe60520bc), /* PORT188CR */ | ||
1498 | PORTCR(189, 0xe60520bd), /* PORT189CR */ | ||
1499 | |||
1500 | PORTCR(190, 0xe60520be), /* PORT190CR */ | ||
1501 | PORTCR(191, 0xe60520bf), /* PORT191CR */ | ||
1502 | PORTCR(192, 0xe60520c0), /* PORT192CR */ | ||
1503 | PORTCR(193, 0xe60520c1), /* PORT193CR */ | ||
1504 | PORTCR(194, 0xe60520c2), /* PORT194CR */ | ||
1505 | PORTCR(195, 0xe60520c3), /* PORT195CR */ | ||
1506 | PORTCR(196, 0xe60520c4), /* PORT196CR */ | ||
1507 | PORTCR(197, 0xe60520c5), /* PORT197CR */ | ||
1508 | PORTCR(198, 0xe60520c6), /* PORT198CR */ | ||
1509 | PORTCR(199, 0xe60520c7), /* PORT199CR */ | ||
1510 | |||
1511 | PORTCR(200, 0xe60520c8), /* PORT200CR */ | ||
1512 | PORTCR(201, 0xe60520c9), /* PORT201CR */ | ||
1513 | PORTCR(202, 0xe60520ca), /* PORT202CR */ | ||
1514 | PORTCR(203, 0xe60520cb), /* PORT203CR */ | ||
1515 | PORTCR(204, 0xe60520cc), /* PORT204CR */ | ||
1516 | PORTCR(205, 0xe60520cd), /* PORT205CR */ | ||
1517 | PORTCR(206, 0xe60520ce), /* PORT206CR */ | ||
1518 | PORTCR(207, 0xe60520cf), /* PORT207CR */ | ||
1519 | PORTCR(208, 0xe60520d0), /* PORT208CR */ | ||
1520 | PORTCR(209, 0xe60520d1), /* PORT209CR */ | ||
1521 | |||
1522 | PORTCR(210, 0xe60520d2), /* PORT210CR */ | ||
1523 | PORTCR(211, 0xe60520d3), /* PORT211CR */ | ||
1524 | PORTCR(212, 0xe60520d4), /* PORT212CR */ | ||
1525 | PORTCR(213, 0xe60520d5), /* PORT213CR */ | ||
1526 | PORTCR(214, 0xe60520d6), /* PORT214CR */ | ||
1527 | PORTCR(215, 0xe60520d7), /* PORT215CR */ | ||
1528 | PORTCR(216, 0xe60520d8), /* PORT216CR */ | ||
1529 | PORTCR(217, 0xe60520d9), /* PORT217CR */ | ||
1530 | PORTCR(218, 0xe60520da), /* PORT218CR */ | ||
1531 | PORTCR(219, 0xe60520db), /* PORT219CR */ | ||
1532 | |||
1533 | PORTCR(220, 0xe60520dc), /* PORT220CR */ | ||
1534 | PORTCR(221, 0xe60520dd), /* PORT221CR */ | ||
1535 | PORTCR(222, 0xe60520de), /* PORT222CR */ | ||
1536 | PORTCR(223, 0xe60520df), /* PORT223CR */ | ||
1537 | PORTCR(224, 0xe60520e0), /* PORT224CR */ | ||
1538 | PORTCR(225, 0xe60520e1), /* PORT225CR */ | ||
1539 | PORTCR(226, 0xe60520e2), /* PORT226CR */ | ||
1540 | PORTCR(227, 0xe60520e3), /* PORT227CR */ | ||
1541 | PORTCR(228, 0xe60520e4), /* PORT228CR */ | ||
1542 | PORTCR(229, 0xe60520e5), /* PORT229CR */ | ||
1543 | |||
1544 | PORTCR(230, 0xe60520e6), /* PORT230CR */ | ||
1545 | PORTCR(231, 0xe60520e7), /* PORT231CR */ | ||
1546 | PORTCR(232, 0xe60520e8), /* PORT232CR */ | ||
1547 | PORTCR(233, 0xe60520e9), /* PORT233CR */ | ||
1548 | PORTCR(234, 0xe60520ea), /* PORT234CR */ | ||
1549 | PORTCR(235, 0xe60520eb), /* PORT235CR */ | ||
1550 | PORTCR(236, 0xe60530ec), /* PORT236CR */ | ||
1551 | PORTCR(237, 0xe60530ed), /* PORT237CR */ | ||
1552 | PORTCR(238, 0xe60530ee), /* PORT238CR */ | ||
1553 | PORTCR(239, 0xe60530ef), /* PORT239CR */ | ||
1554 | |||
1555 | PORTCR(240, 0xe60530f0), /* PORT240CR */ | ||
1556 | PORTCR(241, 0xe60530f1), /* PORT241CR */ | ||
1557 | PORTCR(242, 0xe60530f2), /* PORT242CR */ | ||
1558 | PORTCR(243, 0xe60530f3), /* PORT243CR */ | ||
1559 | PORTCR(244, 0xe60530f4), /* PORT244CR */ | ||
1560 | PORTCR(245, 0xe60530f5), /* PORT245CR */ | ||
1561 | PORTCR(246, 0xe60530f6), /* PORT246CR */ | ||
1562 | PORTCR(247, 0xe60530f7), /* PORT247CR */ | ||
1563 | PORTCR(248, 0xe60530f8), /* PORT248CR */ | ||
1564 | PORTCR(249, 0xe60530f9), /* PORT249CR */ | ||
1565 | |||
1566 | PORTCR(250, 0xe60530fa), /* PORT250CR */ | ||
1567 | PORTCR(251, 0xe60530fb), /* PORT251CR */ | ||
1568 | PORTCR(252, 0xe60530fc), /* PORT252CR */ | ||
1569 | PORTCR(253, 0xe60530fd), /* PORT253CR */ | ||
1570 | PORTCR(254, 0xe60530fe), /* PORT254CR */ | ||
1571 | PORTCR(255, 0xe60530ff), /* PORT255CR */ | ||
1572 | PORTCR(256, 0xe6053100), /* PORT256CR */ | ||
1573 | PORTCR(257, 0xe6053101), /* PORT257CR */ | ||
1574 | PORTCR(258, 0xe6053102), /* PORT258CR */ | ||
1575 | PORTCR(259, 0xe6053103), /* PORT259CR */ | ||
1576 | |||
1577 | PORTCR(260, 0xe6053104), /* PORT260CR */ | ||
1578 | PORTCR(261, 0xe6053105), /* PORT261CR */ | ||
1579 | PORTCR(262, 0xe6053106), /* PORT262CR */ | ||
1580 | PORTCR(263, 0xe6053107), /* PORT263CR */ | ||
1581 | PORTCR(264, 0xe6053108), /* PORT264CR */ | ||
1582 | PORTCR(265, 0xe6053109), /* PORT265CR */ | ||
1583 | PORTCR(266, 0xe605310a), /* PORT266CR */ | ||
1584 | PORTCR(267, 0xe605310b), /* PORT267CR */ | ||
1585 | PORTCR(268, 0xe605310c), /* PORT268CR */ | ||
1586 | PORTCR(269, 0xe605310d), /* PORT269CR */ | ||
1587 | |||
1588 | PORTCR(270, 0xe605310e), /* PORT270CR */ | ||
1589 | PORTCR(271, 0xe605310f), /* PORT271CR */ | ||
1590 | PORTCR(272, 0xe6053110), /* PORT272CR */ | ||
1591 | |||
1592 | { PINMUX_CFG_REG("MSELBCR", 0xe6058024, 32, 1) { | ||
1593 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | ||
1594 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | ||
1595 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | ||
1596 | 0, 0, | ||
1597 | 0, 0, | ||
1598 | 0, 0, | ||
1599 | 0, 0, | ||
1600 | 0, 0, | ||
1601 | MSELBCR_MSEL2_0, MSELBCR_MSEL2_1, | ||
1602 | 0, 0, | ||
1603 | 0, 0 } | ||
1604 | }, | ||
1605 | { }, | ||
1606 | }; | ||
1607 | |||
1608 | static struct pinmux_data_reg pinmux_data_regs[] = { | ||
1609 | { PINMUX_DATA_REG("PORTL031_000DR", 0xe6054000, 32) { | ||
1610 | PORT31_DATA, PORT30_DATA, PORT29_DATA, PORT28_DATA, | ||
1611 | PORT27_DATA, PORT26_DATA, PORT25_DATA, PORT24_DATA, | ||
1612 | PORT23_DATA, PORT22_DATA, PORT21_DATA, PORT20_DATA, | ||
1613 | PORT19_DATA, PORT18_DATA, PORT17_DATA, PORT16_DATA, | ||
1614 | PORT15_DATA, PORT14_DATA, PORT13_DATA, PORT12_DATA, | ||
1615 | PORT11_DATA, PORT10_DATA, PORT9_DATA, PORT8_DATA, | ||
1616 | PORT7_DATA, PORT6_DATA, PORT5_DATA, PORT4_DATA, | ||
1617 | PORT3_DATA, PORT2_DATA, PORT1_DATA, PORT0_DATA } | ||
1618 | }, | ||
1619 | { PINMUX_DATA_REG("PORTL063_032DR", 0xe6054004, 32) { | ||
1620 | PORT63_DATA, PORT62_DATA, PORT61_DATA, PORT60_DATA, | ||
1621 | PORT59_DATA, PORT58_DATA, PORT57_DATA, PORT56_DATA, | ||
1622 | PORT55_DATA, PORT54_DATA, PORT53_DATA, PORT52_DATA, | ||
1623 | PORT51_DATA, PORT50_DATA, PORT49_DATA, PORT48_DATA, | ||
1624 | PORT47_DATA, PORT46_DATA, PORT45_DATA, PORT44_DATA, | ||
1625 | PORT43_DATA, PORT42_DATA, PORT41_DATA, PORT40_DATA, | ||
1626 | PORT39_DATA, PORT38_DATA, PORT37_DATA, PORT36_DATA, | ||
1627 | PORT35_DATA, PORT34_DATA, PORT33_DATA, PORT32_DATA } | ||
1628 | }, | ||
1629 | { PINMUX_DATA_REG("PORTL095_064DR", 0xe6054008, 32) { | ||
1630 | PORT95_DATA, PORT94_DATA, PORT93_DATA, PORT92_DATA, | ||
1631 | PORT91_DATA, PORT90_DATA, PORT89_DATA, PORT88_DATA, | ||
1632 | PORT87_DATA, PORT86_DATA, PORT85_DATA, PORT84_DATA, | ||
1633 | PORT83_DATA, PORT82_DATA, PORT81_DATA, PORT80_DATA, | ||
1634 | PORT79_DATA, PORT78_DATA, PORT77_DATA, PORT76_DATA, | ||
1635 | PORT75_DATA, PORT74_DATA, PORT73_DATA, PORT72_DATA, | ||
1636 | PORT71_DATA, PORT70_DATA, PORT69_DATA, PORT68_DATA, | ||
1637 | PORT67_DATA, PORT66_DATA, PORT65_DATA, PORT64_DATA } | ||
1638 | }, | ||
1639 | { PINMUX_DATA_REG("PORTD127_096DR", 0xe6055004, 32) { | ||
1640 | PORT127_DATA, PORT126_DATA, PORT125_DATA, PORT124_DATA, | ||
1641 | PORT123_DATA, PORT122_DATA, PORT121_DATA, PORT120_DATA, | ||
1642 | PORT119_DATA, PORT118_DATA, PORT117_DATA, PORT116_DATA, | ||
1643 | PORT115_DATA, PORT114_DATA, PORT113_DATA, PORT112_DATA, | ||
1644 | PORT111_DATA, PORT110_DATA, PORT109_DATA, PORT108_DATA, | ||
1645 | PORT107_DATA, PORT106_DATA, PORT105_DATA, PORT104_DATA, | ||
1646 | PORT103_DATA, PORT102_DATA, PORT101_DATA, PORT100_DATA, | ||
1647 | PORT99_DATA, PORT98_DATA, PORT97_DATA, PORT96_DATA } | ||
1648 | }, | ||
1649 | { PINMUX_DATA_REG("PORTD159_128DR", 0xe6055008, 32) { | ||
1650 | PORT159_DATA, PORT158_DATA, PORT157_DATA, PORT156_DATA, | ||
1651 | PORT155_DATA, PORT154_DATA, PORT153_DATA, PORT152_DATA, | ||
1652 | PORT151_DATA, PORT150_DATA, PORT149_DATA, PORT148_DATA, | ||
1653 | PORT147_DATA, PORT146_DATA, PORT145_DATA, PORT144_DATA, | ||
1654 | PORT143_DATA, PORT142_DATA, PORT141_DATA, PORT140_DATA, | ||
1655 | PORT139_DATA, PORT138_DATA, PORT137_DATA, PORT136_DATA, | ||
1656 | PORT135_DATA, PORT134_DATA, PORT133_DATA, PORT132_DATA, | ||
1657 | PORT131_DATA, PORT130_DATA, PORT129_DATA, PORT128_DATA } | ||
1658 | }, | ||
1659 | { PINMUX_DATA_REG("PORTR191_160DR", 0xe6056000, 32) { | ||
1660 | PORT191_DATA, PORT190_DATA, PORT189_DATA, PORT188_DATA, | ||
1661 | PORT187_DATA, PORT186_DATA, PORT185_DATA, PORT184_DATA, | ||
1662 | PORT183_DATA, PORT182_DATA, PORT181_DATA, PORT180_DATA, | ||
1663 | PORT179_DATA, PORT178_DATA, PORT177_DATA, PORT176_DATA, | ||
1664 | PORT175_DATA, PORT174_DATA, PORT173_DATA, PORT172_DATA, | ||
1665 | PORT171_DATA, PORT170_DATA, PORT169_DATA, PORT168_DATA, | ||
1666 | PORT167_DATA, PORT166_DATA, PORT165_DATA, PORT164_DATA, | ||
1667 | PORT163_DATA, PORT162_DATA, PORT161_DATA, PORT160_DATA } | ||
1668 | }, | ||
1669 | { PINMUX_DATA_REG("PORTR223_192DR", 0xe6056004, 32) { | ||
1670 | PORT223_DATA, PORT222_DATA, PORT221_DATA, PORT220_DATA, | ||
1671 | PORT219_DATA, PORT218_DATA, PORT217_DATA, PORT216_DATA, | ||
1672 | PORT215_DATA, PORT214_DATA, PORT213_DATA, PORT212_DATA, | ||
1673 | PORT211_DATA, PORT210_DATA, PORT209_DATA, PORT208_DATA, | ||
1674 | PORT207_DATA, PORT206_DATA, PORT205_DATA, PORT204_DATA, | ||
1675 | PORT203_DATA, PORT202_DATA, PORT201_DATA, PORT200_DATA, | ||
1676 | PORT199_DATA, PORT198_DATA, PORT197_DATA, PORT196_DATA, | ||
1677 | PORT195_DATA, PORT194_DATA, PORT193_DATA, PORT192_DATA } | ||
1678 | }, | ||
1679 | { PINMUX_DATA_REG("PORTU255_224DR", 0xe6057000, 32) { | ||
1680 | PORT255_DATA, PORT254_DATA, PORT253_DATA, PORT252_DATA, | ||
1681 | PORT251_DATA, PORT250_DATA, PORT249_DATA, PORT248_DATA, | ||
1682 | PORT247_DATA, PORT246_DATA, PORT245_DATA, PORT244_DATA, | ||
1683 | PORT243_DATA, PORT242_DATA, PORT241_DATA, PORT240_DATA, | ||
1684 | PORT239_DATA, PORT238_DATA, PORT237_DATA, PORT236_DATA, | ||
1685 | PORT235_DATA, PORT234_DATA, PORT233_DATA, PORT232_DATA, | ||
1686 | PORT231_DATA, PORT230_DATA, PORT229_DATA, PORT228_DATA, | ||
1687 | PORT227_DATA, PORT226_DATA, PORT225_DATA, PORT224_DATA } | ||
1688 | }, | ||
1689 | { PINMUX_DATA_REG("PORTU287_256DR", 0xe6057004, 32) { | ||
1690 | 0, 0, 0, 0, | ||
1691 | 0, 0, 0, 0, | ||
1692 | 0, 0, 0, 0, | ||
1693 | 0, 0, 0, PORT272_DATA, | ||
1694 | PORT271_DATA, PORT270_DATA, PORT269_DATA, PORT268_DATA, | ||
1695 | PORT267_DATA, PORT266_DATA, PORT265_DATA, PORT264_DATA, | ||
1696 | PORT263_DATA, PORT262_DATA, PORT261_DATA, PORT260_DATA, | ||
1697 | PORT259_DATA, PORT258_DATA, PORT257_DATA, PORT256_DATA } | ||
1698 | }, | ||
1699 | { }, | ||
1700 | }; | ||
1701 | |||
1702 | static struct pinmux_info sh7367_pinmux_info = { | ||
1703 | .name = "sh7367_pfc", | ||
1704 | .reserved_id = PINMUX_RESERVED, | ||
1705 | .data = { PINMUX_DATA_BEGIN, PINMUX_DATA_END }, | ||
1706 | .input = { PINMUX_INPUT_BEGIN, PINMUX_INPUT_END }, | ||
1707 | .input_pu = { PINMUX_INPUT_PULLUP_BEGIN, PINMUX_INPUT_PULLUP_END }, | ||
1708 | .input_pd = { PINMUX_INPUT_PULLDOWN_BEGIN, PINMUX_INPUT_PULLDOWN_END }, | ||
1709 | .output = { PINMUX_OUTPUT_BEGIN, PINMUX_OUTPUT_END }, | ||
1710 | .mark = { PINMUX_MARK_BEGIN, PINMUX_MARK_END }, | ||
1711 | .function = { PINMUX_FUNCTION_BEGIN, PINMUX_FUNCTION_END }, | ||
1712 | |||
1713 | .first_gpio = GPIO_PORT0, | ||
1714 | .last_gpio = GPIO_FN_DIVLOCK, | ||
1715 | |||
1716 | .gpios = pinmux_gpios, | ||
1717 | .cfg_regs = pinmux_config_regs, | ||
1718 | .data_regs = pinmux_data_regs, | ||
1719 | |||
1720 | .gpio_data = pinmux_data, | ||
1721 | .gpio_data_size = ARRAY_SIZE(pinmux_data), | ||
1722 | }; | ||
1723 | |||
1724 | void sh7367_pinmux_init(void) | ||
1725 | { | ||
1726 | register_pinmux(&sh7367_pinmux_info); | ||
1727 | } | ||
diff --git a/arch/arm/mach-shmobile/pfc-sh7377.c b/arch/arm/mach-shmobile/pfc-sh7377.c deleted file mode 100644 index f3117f67fa25..000000000000 --- a/arch/arm/mach-shmobile/pfc-sh7377.c +++ /dev/null | |||
@@ -1,1688 +0,0 @@ | |||
1 | /* | ||
2 | * sh7377 processor support - PFC hardware block | ||
3 | * | ||
4 | * Copyright (C) 2010 NISHIMOTO Hiroki | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or | ||
7 | * modify it under the terms of the GNU General Public License as | ||
8 | * published by the Free Software Foundation; version 2 of the | ||
9 | * License. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | ||
19 | */ | ||
20 | #include <linux/init.h> | ||
21 | #include <linux/kernel.h> | ||
22 | #include <linux/sh_pfc.h> | ||
23 | #include <mach/sh7377.h> | ||
24 | |||
25 | #define CPU_ALL_PORT(fn, pfx, sfx) \ | ||
26 | PORT_10(fn, pfx, sfx), PORT_90(fn, pfx, sfx), \ | ||
27 | PORT_10(fn, pfx##10, sfx), \ | ||
28 | PORT_1(fn, pfx##110, sfx), PORT_1(fn, pfx##111, sfx), \ | ||
29 | PORT_1(fn, pfx##112, sfx), PORT_1(fn, pfx##113, sfx), \ | ||
30 | PORT_1(fn, pfx##114, sfx), PORT_1(fn, pfx##115, sfx), \ | ||
31 | PORT_1(fn, pfx##116, sfx), PORT_1(fn, pfx##117, sfx), \ | ||
32 | PORT_1(fn, pfx##118, sfx), \ | ||
33 | PORT_1(fn, pfx##128, sfx), PORT_1(fn, pfx##129, sfx), \ | ||
34 | PORT_10(fn, pfx##13, sfx), PORT_10(fn, pfx##14, sfx), \ | ||
35 | PORT_10(fn, pfx##15, sfx), \ | ||
36 | PORT_1(fn, pfx##160, sfx), PORT_1(fn, pfx##161, sfx), \ | ||
37 | PORT_1(fn, pfx##162, sfx), PORT_1(fn, pfx##163, sfx), \ | ||
38 | PORT_1(fn, pfx##164, sfx), \ | ||
39 | PORT_1(fn, pfx##192, sfx), PORT_1(fn, pfx##193, sfx), \ | ||
40 | PORT_1(fn, pfx##194, sfx), PORT_1(fn, pfx##195, sfx), \ | ||
41 | PORT_1(fn, pfx##196, sfx), PORT_1(fn, pfx##197, sfx), \ | ||
42 | PORT_1(fn, pfx##198, sfx), PORT_1(fn, pfx##199, sfx), \ | ||
43 | PORT_10(fn, pfx##20, sfx), PORT_10(fn, pfx##21, sfx), \ | ||
44 | PORT_10(fn, pfx##22, sfx), PORT_10(fn, pfx##23, sfx), \ | ||
45 | PORT_10(fn, pfx##24, sfx), PORT_10(fn, pfx##25, sfx), \ | ||
46 | PORT_1(fn, pfx##260, sfx), PORT_1(fn, pfx##261, sfx), \ | ||
47 | PORT_1(fn, pfx##262, sfx), PORT_1(fn, pfx##263, sfx), \ | ||
48 | PORT_1(fn, pfx##264, sfx) | ||
49 | |||
50 | enum { | ||
51 | PINMUX_RESERVED = 0, | ||
52 | |||
53 | PINMUX_DATA_BEGIN, | ||
54 | PORT_ALL(DATA), /* PORT0_DATA -> PORT264_DATA */ | ||
55 | PINMUX_DATA_END, | ||
56 | |||
57 | PINMUX_INPUT_BEGIN, | ||
58 | PORT_ALL(IN), /* PORT0_IN -> PORT264_IN */ | ||
59 | PINMUX_INPUT_END, | ||
60 | |||
61 | PINMUX_INPUT_PULLUP_BEGIN, | ||
62 | PORT_ALL(IN_PU), /* PORT0_IN_PU -> PORT264_IN_PU */ | ||
63 | PINMUX_INPUT_PULLUP_END, | ||
64 | |||
65 | PINMUX_INPUT_PULLDOWN_BEGIN, | ||
66 | PORT_ALL(IN_PD), /* PORT0_IN_PD -> PORT264_IN_PD */ | ||
67 | PINMUX_INPUT_PULLDOWN_END, | ||
68 | |||
69 | PINMUX_OUTPUT_BEGIN, | ||
70 | PORT_ALL(OUT), /* PORT0_OUT -> PORT264_OUT */ | ||
71 | PINMUX_OUTPUT_END, | ||
72 | |||
73 | PINMUX_FUNCTION_BEGIN, | ||
74 | PORT_ALL(FN_IN), /* PORT0_FN_IN -> PORT264_FN_IN */ | ||
75 | PORT_ALL(FN_OUT), /* PORT0_FN_OUT -> PORT264_FN_OUT */ | ||
76 | PORT_ALL(FN0), /* PORT0_FN0 -> PORT264_FN0 */ | ||
77 | PORT_ALL(FN1), /* PORT0_FN1 -> PORT264_FN1 */ | ||
78 | PORT_ALL(FN2), /* PORT0_FN2 -> PORT264_FN2 */ | ||
79 | PORT_ALL(FN3), /* PORT0_FN3 -> PORT264_FN3 */ | ||
80 | PORT_ALL(FN4), /* PORT0_FN4 -> PORT264_FN4 */ | ||
81 | PORT_ALL(FN5), /* PORT0_FN5 -> PORT264_FN5 */ | ||
82 | PORT_ALL(FN6), /* PORT0_FN6 -> PORT264_FN6 */ | ||
83 | PORT_ALL(FN7), /* PORT0_FN7 -> PORT264_FN7 */ | ||
84 | |||
85 | MSELBCR_MSEL17_1, MSELBCR_MSEL17_0, | ||
86 | MSELBCR_MSEL16_1, MSELBCR_MSEL16_0, | ||
87 | PINMUX_FUNCTION_END, | ||
88 | |||
89 | PINMUX_MARK_BEGIN, | ||
90 | /* Special Pull-up / Pull-down Functions */ | ||
91 | PORT66_KEYIN0_PU_MARK, PORT67_KEYIN1_PU_MARK, | ||
92 | PORT68_KEYIN2_PU_MARK, PORT69_KEYIN3_PU_MARK, | ||
93 | PORT70_KEYIN4_PU_MARK, PORT71_KEYIN5_PU_MARK, | ||
94 | PORT72_KEYIN6_PU_MARK, | ||
95 | |||
96 | /* 55-1 */ | ||
97 | VBUS_0_MARK, | ||
98 | CPORT0_MARK, | ||
99 | CPORT1_MARK, | ||
100 | CPORT2_MARK, | ||
101 | CPORT3_MARK, | ||
102 | CPORT4_MARK, | ||
103 | CPORT5_MARK, | ||
104 | CPORT6_MARK, | ||
105 | CPORT7_MARK, | ||
106 | CPORT8_MARK, | ||
107 | CPORT9_MARK, | ||
108 | CPORT10_MARK, | ||
109 | CPORT11_MARK, SIN2_MARK, | ||
110 | CPORT12_MARK, XCTS2_MARK, | ||
111 | CPORT13_MARK, RFSPO4_MARK, | ||
112 | CPORT14_MARK, RFSPO5_MARK, | ||
113 | CPORT15_MARK, SCIFA0_SCK_MARK, GPS_AGC2_MARK, | ||
114 | CPORT16_MARK, SCIFA0_TXD_MARK, GPS_AGC3_MARK, | ||
115 | CPORT17_IC_OE_MARK, SOUT2_MARK, | ||
116 | CPORT18_MARK, XRTS2_MARK, PORT19_VIO_CKO2_MARK, | ||
117 | CPORT19_MPORT1_MARK, | ||
118 | CPORT20_MARK, RFSPO6_MARK, | ||
119 | CPORT21_MARK, STATUS0_MARK, | ||
120 | CPORT22_MARK, STATUS1_MARK, | ||
121 | CPORT23_MARK, STATUS2_MARK, RFSPO7_MARK, | ||
122 | B_SYNLD1_MARK, | ||
123 | B_SYNLD2_MARK, SYSENMSK_MARK, | ||
124 | XMAINPS_MARK, | ||
125 | XDIVPS_MARK, | ||
126 | XIDRST_MARK, | ||
127 | IDCLK_MARK, IC_DP_MARK, | ||
128 | IDIO_MARK, IC_DM_MARK, | ||
129 | SOUT1_MARK, SCIFA4_TXD_MARK, M02_BERDAT_MARK, | ||
130 | SIN1_MARK, SCIFA4_RXD_MARK, XWUP_MARK, | ||
131 | XRTS1_MARK, SCIFA4_RTS_MARK, M03_BERCLK_MARK, | ||
132 | XCTS1_MARK, SCIFA4_CTS_MARK, | ||
133 | PCMCLKO_MARK, | ||
134 | SYNC8KO_MARK, | ||
135 | |||
136 | /* 55-2 */ | ||
137 | DNPCM_A_MARK, | ||
138 | UPPCM_A_MARK, | ||
139 | VACK_MARK, | ||
140 | XTALB1L_MARK, | ||
141 | GPS_AGC1_MARK, SCIFA0_RTS_MARK, | ||
142 | GPS_AGC4_MARK, SCIFA0_RXD_MARK, | ||
143 | GPS_PWRDOWN_MARK, SCIFA0_CTS_MARK, | ||
144 | GPS_IM_MARK, | ||
145 | GPS_IS_MARK, | ||
146 | GPS_QM_MARK, | ||
147 | GPS_QS_MARK, | ||
148 | FMSOCK_MARK, PORT49_IRDA_OUT_MARK, PORT49_IROUT_MARK, | ||
149 | FMSOOLR_MARK, BBIF2_TSYNC2_MARK, TPU2TO2_MARK, IPORT3_MARK, | ||
150 | FMSIOLR_MARK, | ||
151 | FMSOOBT_MARK, BBIF2_TSCK2_MARK, TPU2TO3_MARK, OPORT1_MARK, | ||
152 | FMSIOBT_MARK, | ||
153 | FMSOSLD_MARK, BBIF2_TXD2_MARK, OPORT2_MARK, | ||
154 | FMSOILR_MARK, PORT53_IRDA_IN_MARK, TPU3TO3_MARK, OPORT3_MARK, | ||
155 | FMSIILR_MARK, | ||
156 | FMSOIBT_MARK, PORT54_IRDA_FIRSEL_MARK, TPU3TO2_MARK, FMSIIBT_MARK, | ||
157 | FMSISLD_MARK, MFG0_OUT1_MARK, TPU0TO0_MARK, | ||
158 | A0_EA0_MARK, BS_MARK, | ||
159 | A12_EA12_MARK, PORT58_VIO_CKOR_MARK, TPU4TO2_MARK, | ||
160 | A13_EA13_MARK, PORT59_IROUT_MARK, MFG0_OUT2_MARK, TPU0TO1_MARK, | ||
161 | A14_EA14_MARK, PORT60_KEYOUT5_MARK, | ||
162 | A15_EA15_MARK, PORT61_KEYOUT4_MARK, | ||
163 | A16_EA16_MARK, PORT62_KEYOUT3_MARK, MSIOF0_SS1_MARK, | ||
164 | A17_EA17_MARK, PORT63_KEYOUT2_MARK, MSIOF0_TSYNC_MARK, | ||
165 | A18_EA18_MARK, PORT64_KEYOUT1_MARK, MSIOF0_TSCK_MARK, | ||
166 | A19_EA19_MARK, PORT65_KEYOUT0_MARK, MSIOF0_TXD_MARK, | ||
167 | A20_EA20_MARK, PORT66_KEYIN0_MARK, MSIOF0_RSCK_MARK, | ||
168 | A21_EA21_MARK, PORT67_KEYIN1_MARK, MSIOF0_RSYNC_MARK, | ||
169 | A22_EA22_MARK, PORT68_KEYIN2_MARK, MSIOF0_MCK0_MARK, | ||
170 | A23_EA23_MARK, PORT69_KEYIN3_MARK, MSIOF0_MCK1_MARK, | ||
171 | A24_EA24_MARK, PORT70_KEYIN4_MARK, MSIOF0_RXD_MARK, | ||
172 | A25_EA25_MARK, PORT71_KEYIN5_MARK, MSIOF0_SS2_MARK, | ||
173 | A26_MARK, PORT72_KEYIN6_MARK, | ||
174 | D0_ED0_NAF0_MARK, | ||
175 | D1_ED1_NAF1_MARK, | ||
176 | D2_ED2_NAF2_MARK, | ||
177 | D3_ED3_NAF3_MARK, | ||
178 | D4_ED4_NAF4_MARK, | ||
179 | D5_ED5_NAF5_MARK, | ||
180 | D6_ED6_NAF6_MARK, | ||
181 | D7_ED7_NAF7_MARK, | ||
182 | D8_ED8_NAF8_MARK, | ||
183 | D9_ED9_NAF9_MARK, | ||
184 | D10_ED10_NAF10_MARK, | ||
185 | D11_ED11_NAF11_MARK, | ||
186 | D12_ED12_NAF12_MARK, | ||
187 | D13_ED13_NAF13_MARK, | ||
188 | D14_ED14_NAF14_MARK, | ||
189 | D15_ED15_NAF15_MARK, | ||
190 | CS4_MARK, | ||
191 | CS5A_MARK, FMSICK_MARK, | ||
192 | CS5B_MARK, FCE1_MARK, | ||
193 | |||
194 | /* 55-3 */ | ||
195 | CS6B_MARK, XCS2_MARK, CS6A_MARK, DACK0_MARK, | ||
196 | FCE0_MARK, | ||
197 | WAIT_MARK, DREQ0_MARK, | ||
198 | RD_XRD_MARK, | ||
199 | WE0_XWR0_FWE_MARK, | ||
200 | WE1_XWR1_MARK, | ||
201 | FRB_MARK, | ||
202 | CKO_MARK, | ||
203 | NBRSTOUT_MARK, | ||
204 | NBRST_MARK, | ||
205 | GPS_EPPSIN_MARK, | ||
206 | LATCHPULSE_MARK, | ||
207 | LTESIGNAL_MARK, | ||
208 | LEGACYSTATE_MARK, | ||
209 | TCKON_MARK, | ||
210 | VIO_VD_MARK, PORT128_KEYOUT0_MARK, IPORT0_MARK, | ||
211 | VIO_HD_MARK, PORT129_KEYOUT1_MARK, IPORT1_MARK, | ||
212 | VIO_D0_MARK, PORT130_KEYOUT2_MARK, PORT130_MSIOF2_RXD_MARK, | ||
213 | VIO_D1_MARK, PORT131_KEYOUT3_MARK, PORT131_MSIOF2_SS1_MARK, | ||
214 | VIO_D2_MARK, PORT132_KEYOUT4_MARK, PORT132_MSIOF2_SS2_MARK, | ||
215 | VIO_D3_MARK, PORT133_KEYOUT5_MARK, PORT133_MSIOF2_TSYNC_MARK, | ||
216 | VIO_D4_MARK, PORT134_KEYIN0_MARK, PORT134_MSIOF2_TXD_MARK, | ||
217 | VIO_D5_MARK, PORT135_KEYIN1_MARK, PORT135_MSIOF2_TSCK_MARK, | ||
218 | VIO_D6_MARK, PORT136_KEYIN2_MARK, | ||
219 | VIO_D7_MARK, PORT137_KEYIN3_MARK, | ||
220 | VIO_D8_MARK, M9_SLCD_A01_MARK, PORT138_FSIAOMC_MARK, | ||
221 | VIO_D9_MARK, M10_SLCD_CK1_MARK, PORT139_FSIAOLR_MARK, | ||
222 | VIO_D10_MARK, M11_SLCD_SO1_MARK, TPU0TO2_MARK, PORT140_FSIAOBT_MARK, | ||
223 | VIO_D11_MARK, M12_SLCD_CE1_MARK, TPU0TO3_MARK, PORT141_FSIAOSLD_MARK, | ||
224 | VIO_D12_MARK, M13_BSW_MARK, PORT142_FSIACK_MARK, | ||
225 | VIO_D13_MARK, M14_GSW_MARK, PORT143_FSIAILR_MARK, | ||
226 | VIO_D14_MARK, M15_RSW_MARK, PORT144_FSIAIBT_MARK, | ||
227 | VIO_D15_MARK, TPU1TO3_MARK, PORT145_FSIAISLD_MARK, | ||
228 | VIO_CLK_MARK, PORT146_KEYIN4_MARK, IPORT2_MARK, | ||
229 | VIO_FIELD_MARK, PORT147_KEYIN5_MARK, | ||
230 | VIO_CKO_MARK, PORT148_KEYIN6_MARK, | ||
231 | A27_MARK, RDWR_XWE_MARK, MFG0_IN1_MARK, | ||
232 | MFG0_IN2_MARK, | ||
233 | TS_SPSYNC3_MARK, MSIOF2_RSCK_MARK, | ||
234 | TS_SDAT3_MARK, MSIOF2_RSYNC_MARK, | ||
235 | TPU1TO2_MARK, TS_SDEN3_MARK, PORT153_MSIOF2_SS1_MARK, | ||
236 | SOUT3_MARK, SCIFA2_TXD1_MARK, MSIOF2_MCK0_MARK, | ||
237 | SIN3_MARK, SCIFA2_RXD1_MARK, MSIOF2_MCK1_MARK, | ||
238 | XRTS3_MARK, SCIFA2_RTS1_MARK, PORT156_MSIOF2_SS2_MARK, | ||
239 | XCTS3_MARK, SCIFA2_CTS1_MARK, PORT157_MSIOF2_RXD_MARK, | ||
240 | |||
241 | /* 55-4 */ | ||
242 | DINT_MARK, SCIFA2_SCK1_MARK, TS_SCK3_MARK, | ||
243 | PORT159_SCIFB_SCK_MARK, PORT159_SCIFA5_SCK_MARK, NMI_MARK, | ||
244 | PORT160_SCIFB_TXD_MARK, PORT160_SCIFA5_TXD_MARK, SOUT0_MARK, | ||
245 | PORT161_SCIFB_CTS_MARK, PORT161_SCIFA5_CTS_MARK, XCTS0_MARK, | ||
246 | MFG3_IN2_MARK, | ||
247 | PORT162_SCIFB_RXD_MARK, PORT162_SCIFA5_RXD_MARK, SIN0_MARK, | ||
248 | MFG3_IN1_MARK, | ||
249 | PORT163_SCIFB_RTS_MARK, PORT163_SCIFA5_RTS_MARK, XRTS0_MARK, | ||
250 | MFG3_OUT1_MARK, TPU3TO0_MARK, | ||
251 | LCDD0_MARK, PORT192_KEYOUT0_MARK, EXT_CKI_MARK, | ||
252 | LCDD1_MARK, PORT193_KEYOUT1_MARK, PORT193_SCIFA5_CTS_MARK, | ||
253 | BBIF2_TSYNC1_MARK, | ||
254 | LCDD2_MARK, PORT194_KEYOUT2_MARK, PORT194_SCIFA5_RTS_MARK, | ||
255 | BBIF2_TSCK1_MARK, | ||
256 | LCDD3_MARK, PORT195_KEYOUT3_MARK, PORT195_SCIFA5_RXD_MARK, | ||
257 | BBIF2_TXD1_MARK, | ||
258 | LCDD4_MARK, PORT196_KEYOUT4_MARK, PORT196_SCIFA5_TXD_MARK, | ||
259 | LCDD5_MARK, PORT197_KEYOUT5_MARK, PORT197_SCIFA5_SCK_MARK, | ||
260 | MFG2_OUT2_MARK, | ||
261 | TPU2TO1_MARK, | ||
262 | LCDD6_MARK, XWR2_MARK, | ||
263 | LCDD7_MARK, TPU4TO1_MARK, MFG4_OUT2_MARK, XWR3_MARK, | ||
264 | LCDD8_MARK, PORT200_KEYIN0_MARK, VIO_DR0_MARK, D16_MARK, ED16_MARK, | ||
265 | LCDD9_MARK, PORT201_KEYIN1_MARK, VIO_DR1_MARK, D17_MARK, ED17_MARK, | ||
266 | LCDD10_MARK, PORT202_KEYIN2_MARK, VIO_DR2_MARK, D18_MARK, ED18_MARK, | ||
267 | LCDD11_MARK, PORT203_KEYIN3_MARK, VIO_DR3_MARK, D19_MARK, ED19_MARK, | ||
268 | LCDD12_MARK, PORT204_KEYIN4_MARK, VIO_DR4_MARK, D20_MARK, ED20_MARK, | ||
269 | LCDD13_MARK, PORT205_KEYIN5_MARK, VIO_DR5_MARK, D21_MARK, ED21_MARK, | ||
270 | LCDD14_MARK, PORT206_KEYIN6_MARK, VIO_DR6_MARK, D22_MARK, ED22_MARK, | ||
271 | LCDD15_MARK, PORT207_MSIOF0L_SS1_MARK, PORT207_KEYOUT0_MARK, | ||
272 | VIO_DR7_MARK, D23_MARK, ED23_MARK, | ||
273 | LCDD16_MARK, PORT208_MSIOF0L_SS2_MARK, PORT208_KEYOUT1_MARK, | ||
274 | VIO_VDR_MARK, D24_MARK, ED24_MARK, | ||
275 | LCDD17_MARK, PORT209_KEYOUT2_MARK, VIO_HDR_MARK, D25_MARK, ED25_MARK, | ||
276 | LCDD18_MARK, DREQ2_MARK, PORT210_MSIOF0L_SS1_MARK, D26_MARK, ED26_MARK, | ||
277 | LCDD19_MARK, PORT211_MSIOF0L_SS2_MARK, D27_MARK, ED27_MARK, | ||
278 | LCDD20_MARK, TS_SPSYNC1_MARK, MSIOF0L_MCK0_MARK, D28_MARK, ED28_MARK, | ||
279 | LCDD21_MARK, TS_SDAT1_MARK, MSIOF0L_MCK1_MARK, D29_MARK, ED29_MARK, | ||
280 | LCDD22_MARK, TS_SDEN1_MARK, MSIOF0L_RSCK_MARK, D30_MARK, ED30_MARK, | ||
281 | LCDD23_MARK, TS_SCK1_MARK, MSIOF0L_RSYNC_MARK, D31_MARK, ED31_MARK, | ||
282 | LCDDCK_MARK, LCDWR_MARK, PORT216_KEYOUT3_MARK, VIO_CLKR_MARK, | ||
283 | LCDRD_MARK, DACK2_MARK, MSIOF0L_TSYNC_MARK, | ||
284 | LCDHSYN_MARK, LCDCS_MARK, LCDCS2_MARK, DACK3_MARK, | ||
285 | PORT218_VIO_CKOR_MARK, PORT218_KEYOUT4_MARK, | ||
286 | LCDDISP_MARK, LCDRS_MARK, DREQ3_MARK, MSIOF0L_TSCK_MARK, | ||
287 | LCDVSYN_MARK, LCDVSYN2_MARK, PORT220_KEYOUT5_MARK, | ||
288 | LCDLCLK_MARK, DREQ1_MARK, PWEN_MARK, MSIOF0L_RXD_MARK, | ||
289 | LCDDON_MARK, LCDDON2_MARK, DACK1_MARK, OVCN_MARK, MSIOF0L_TXD_MARK, | ||
290 | SCIFA1_TXD_MARK, OVCN2_MARK, | ||
291 | EXTLP_MARK, SCIFA1_SCK_MARK, USBTERM_MARK, PORT226_VIO_CKO2_MARK, | ||
292 | SCIFA1_RTS_MARK, IDIN_MARK, | ||
293 | SCIFA1_RXD_MARK, | ||
294 | SCIFA1_CTS_MARK, MFG1_IN1_MARK, | ||
295 | MSIOF1_TXD_MARK, SCIFA2_TXD2_MARK, PORT230_FSIAOMC_MARK, | ||
296 | MSIOF1_TSYNC_MARK, SCIFA2_CTS2_MARK, PORT231_FSIAOLR_MARK, | ||
297 | MSIOF1_TSCK_MARK, SCIFA2_SCK2_MARK, PORT232_FSIAOBT_MARK, | ||
298 | MSIOF1_RXD_MARK, SCIFA2_RXD2_MARK, GPS_VCOTRIG_MARK, | ||
299 | PORT233_FSIACK_MARK, | ||
300 | MSIOF1_RSCK_MARK, SCIFA2_RTS2_MARK, PORT234_FSIAOSLD_MARK, | ||
301 | MSIOF1_RSYNC_MARK, OPORT0_MARK, MFG1_IN2_MARK, PORT235_FSIAILR_MARK, | ||
302 | MSIOF1_MCK0_MARK, I2C_SDA2_MARK, PORT236_FSIAIBT_MARK, | ||
303 | MSIOF1_MCK1_MARK, I2C_SCL2_MARK, PORT237_FSIAISLD_MARK, | ||
304 | MSIOF1_SS1_MARK, EDBGREQ3_MARK, | ||
305 | |||
306 | /* 55-5 */ | ||
307 | MSIOF1_SS2_MARK, | ||
308 | SCIFA6_TXD_MARK, | ||
309 | PORT241_IRDA_OUT_MARK, PORT241_IROUT_MARK, MFG4_OUT1_MARK, | ||
310 | TPU4TO0_MARK, | ||
311 | PORT242_IRDA_IN_MARK, MFG4_IN2_MARK, | ||
312 | PORT243_IRDA_FIRSEL_MARK, PORT243_VIO_CKO2_MARK, | ||
313 | PORT244_SCIFA5_CTS_MARK, MFG2_IN1_MARK, PORT244_SCIFB_CTS_MARK, | ||
314 | PORT244_MSIOF2_RXD_MARK, | ||
315 | PORT245_SCIFA5_RTS_MARK, MFG2_IN2_MARK, PORT245_SCIFB_RTS_MARK, | ||
316 | PORT245_MSIOF2_TXD_MARK, | ||
317 | PORT246_SCIFA5_RXD_MARK, MFG1_OUT1_MARK, PORT246_SCIFB_RXD_MARK, | ||
318 | TPU1TO0_MARK, | ||
319 | PORT247_SCIFA5_TXD_MARK, MFG3_OUT2_MARK, PORT247_SCIFB_TXD_MARK, | ||
320 | TPU3TO1_MARK, | ||
321 | PORT248_SCIFA5_SCK_MARK, MFG2_OUT1_MARK, PORT248_SCIFB_SCK_MARK, | ||
322 | TPU2TO0_MARK, | ||
323 | PORT248_MSIOF2_TSCK_MARK, | ||
324 | PORT249_IROUT_MARK, MFG4_IN1_MARK, PORT249_MSIOF2_TSYNC_MARK, | ||
325 | SDHICLK0_MARK, TCK2_SWCLK_MC0_MARK, | ||
326 | SDHICD0_MARK, | ||
327 | SDHID0_0_MARK, TMS2_SWDIO_MC0_MARK, | ||
328 | SDHID0_1_MARK, TDO2_SWO0_MC0_MARK, | ||
329 | SDHID0_2_MARK, TDI2_MARK, | ||
330 | SDHID0_3_MARK, RTCK2_SWO1_MC0_MARK, | ||
331 | SDHICMD0_MARK, TRST2_MARK, | ||
332 | SDHIWP0_MARK, EDBGREQ2_MARK, | ||
333 | SDHICLK1_MARK, TCK3_SWCLK_MC1_MARK, | ||
334 | SDHID1_0_MARK, M11_SLCD_SO2_MARK, TS_SPSYNC2_MARK, | ||
335 | TMS3_SWDIO_MC1_MARK, | ||
336 | SDHID1_1_MARK, M9_SLCD_A02_MARK, TS_SDAT2_MARK, TDO3_SWO0_MC1_MARK, | ||
337 | SDHID1_2_MARK, M10_SLCD_CK2_MARK, TS_SDEN2_MARK, TDI3_MARK, | ||
338 | SDHID1_3_MARK, M12_SLCD_CE2_MARK, TS_SCK2_MARK, RTCK3_SWO1_MC1_MARK, | ||
339 | SDHICMD1_MARK, TRST3_MARK, | ||
340 | RESETOUTS_MARK, | ||
341 | PINMUX_MARK_END, | ||
342 | }; | ||
343 | |||
344 | static pinmux_enum_t pinmux_data[] = { | ||
345 | /* specify valid pin states for each pin in GPIO mode */ | ||
346 | /* 55-1 (GPIO) */ | ||
347 | PORT_DATA_I_PD(0), PORT_DATA_I_PU(1), | ||
348 | PORT_DATA_I_PU(2), PORT_DATA_I_PU(3), | ||
349 | PORT_DATA_I_PU(4), PORT_DATA_I_PU(5), | ||
350 | PORT_DATA_I_PU(6), PORT_DATA_I_PU(7), | ||
351 | PORT_DATA_I_PU(8), PORT_DATA_I_PU(9), | ||
352 | PORT_DATA_I_PU(10), PORT_DATA_I_PU(11), | ||
353 | PORT_DATA_IO_PU(12), PORT_DATA_IO_PU(13), | ||
354 | PORT_DATA_IO_PU_PD(14), PORT_DATA_IO_PU_PD(15), | ||
355 | PORT_DATA_O(16), PORT_DATA_IO(17), | ||
356 | PORT_DATA_O(18), PORT_DATA_O(19), | ||
357 | PORT_DATA_O(20), PORT_DATA_O(21), | ||
358 | PORT_DATA_O(22), PORT_DATA_O(23), | ||
359 | PORT_DATA_O(24), PORT_DATA_I_PD(25), | ||
360 | PORT_DATA_I_PD(26), PORT_DATA_O(27), | ||
361 | PORT_DATA_O(28), PORT_DATA_O(29), | ||
362 | PORT_DATA_IO(30), PORT_DATA_IO_PU(31), | ||
363 | PORT_DATA_IO_PD(32), PORT_DATA_I_PU(33), | ||
364 | PORT_DATA_IO_PD(34), PORT_DATA_I_PU_PD(35), | ||
365 | PORT_DATA_O(36), PORT_DATA_IO(37), | ||
366 | |||
367 | /* 55-2 (GPIO) */ | ||
368 | PORT_DATA_O(38), PORT_DATA_I_PU(39), | ||
369 | PORT_DATA_I_PU_PD(40), PORT_DATA_O(41), | ||
370 | PORT_DATA_IO_PD(42), PORT_DATA_IO_PD(43), | ||
371 | PORT_DATA_IO_PD(44), PORT_DATA_I_PD(45), | ||
372 | PORT_DATA_I_PD(46), PORT_DATA_I_PD(47), | ||
373 | PORT_DATA_I_PD(48), PORT_DATA_IO_PU_PD(49), | ||
374 | PORT_DATA_IO_PD(50), PORT_DATA_IO_PD(51), | ||
375 | PORT_DATA_O(52), PORT_DATA_IO_PU_PD(53), | ||
376 | PORT_DATA_IO_PU_PD(54), PORT_DATA_IO_PD(55), | ||
377 | PORT_DATA_I_PU_PD(56), PORT_DATA_IO(57), | ||
378 | PORT_DATA_IO(58), PORT_DATA_IO(59), | ||
379 | PORT_DATA_IO(60), PORT_DATA_IO(61), | ||
380 | PORT_DATA_IO_PD(62), PORT_DATA_IO_PD(63), | ||
381 | PORT_DATA_IO_PD(64), PORT_DATA_IO_PD(65), | ||
382 | PORT_DATA_IO_PU_PD(66), PORT_DATA_IO_PU_PD(67), | ||
383 | PORT_DATA_IO_PU_PD(68), PORT_DATA_IO_PU_PD(69), | ||
384 | PORT_DATA_IO_PU_PD(70), PORT_DATA_IO_PU_PD(71), | ||
385 | PORT_DATA_IO_PU_PD(72), PORT_DATA_I_PU_PD(73), | ||
386 | PORT_DATA_IO_PU(74), PORT_DATA_IO_PU(75), | ||
387 | PORT_DATA_IO_PU(76), PORT_DATA_IO_PU(77), | ||
388 | PORT_DATA_IO_PU(78), PORT_DATA_IO_PU(79), | ||
389 | PORT_DATA_IO_PU(80), PORT_DATA_IO_PU(81), | ||
390 | PORT_DATA_IO_PU(82), PORT_DATA_IO_PU(83), | ||
391 | PORT_DATA_IO_PU(84), PORT_DATA_IO_PU(85), | ||
392 | PORT_DATA_IO_PU(86), PORT_DATA_IO_PU(87), | ||
393 | PORT_DATA_IO_PU(88), PORT_DATA_IO_PU(89), | ||
394 | PORT_DATA_O(90), PORT_DATA_IO_PU(91), | ||
395 | PORT_DATA_O(92), | ||
396 | |||
397 | /* 55-3 (GPIO) */ | ||
398 | PORT_DATA_IO_PU(93), | ||
399 | PORT_DATA_O(94), | ||
400 | PORT_DATA_I_PU_PD(95), | ||
401 | PORT_DATA_IO(96), PORT_DATA_IO(97), | ||
402 | PORT_DATA_IO(98), PORT_DATA_I_PU(99), | ||
403 | PORT_DATA_O(100), PORT_DATA_O(101), | ||
404 | PORT_DATA_I_PU(102), PORT_DATA_IO_PD(103), | ||
405 | PORT_DATA_I_PD(104), PORT_DATA_I_PD(105), | ||
406 | PORT_DATA_I_PD(106), PORT_DATA_I_PD(107), | ||
407 | PORT_DATA_I_PD(108), PORT_DATA_IO_PD(109), | ||
408 | PORT_DATA_IO_PD(110), PORT_DATA_I_PD(111), | ||
409 | PORT_DATA_IO_PD(112), PORT_DATA_IO_PD(113), | ||
410 | PORT_DATA_IO_PD(114), PORT_DATA_I_PD(115), | ||
411 | PORT_DATA_I_PD(116), PORT_DATA_IO_PD(117), | ||
412 | PORT_DATA_I_PD(118), PORT_DATA_IO_PD(128), | ||
413 | PORT_DATA_IO_PD(129), PORT_DATA_IO_PD(130), | ||
414 | PORT_DATA_IO_PD(131), PORT_DATA_IO_PD(132), | ||
415 | PORT_DATA_IO_PD(133), PORT_DATA_IO_PU_PD(134), | ||
416 | PORT_DATA_IO_PU_PD(135), PORT_DATA_IO_PU_PD(136), | ||
417 | PORT_DATA_IO_PU_PD(137), PORT_DATA_IO_PD(138), | ||
418 | PORT_DATA_IO_PD(139), PORT_DATA_IO_PD(140), | ||
419 | PORT_DATA_IO_PD(141), PORT_DATA_IO_PD(142), | ||
420 | PORT_DATA_IO_PD(143), PORT_DATA_IO_PU_PD(144), | ||
421 | PORT_DATA_IO_PD(145), PORT_DATA_IO_PU_PD(146), | ||
422 | PORT_DATA_IO_PU_PD(147), PORT_DATA_IO_PU_PD(148), | ||
423 | PORT_DATA_IO_PU_PD(149), PORT_DATA_I_PD(150), | ||
424 | PORT_DATA_IO_PU_PD(151), PORT_DATA_IO_PD(152), | ||
425 | PORT_DATA_IO_PD(153), PORT_DATA_IO_PD(154), | ||
426 | PORT_DATA_I_PD(155), PORT_DATA_IO_PU_PD(156), | ||
427 | PORT_DATA_I_PD(157), PORT_DATA_IO_PD(158), | ||
428 | |||
429 | /* 55-4 (GPIO) */ | ||
430 | PORT_DATA_IO_PU_PD(159), PORT_DATA_IO_PU_PD(160), | ||
431 | PORT_DATA_I_PU_PD(161), PORT_DATA_I_PU_PD(162), | ||
432 | PORT_DATA_IO_PU_PD(163), PORT_DATA_I_PU_PD(164), | ||
433 | PORT_DATA_IO_PD(192), PORT_DATA_IO_PD(193), | ||
434 | PORT_DATA_IO_PD(194), PORT_DATA_IO_PD(195), | ||
435 | PORT_DATA_IO_PD(196), PORT_DATA_IO_PD(197), | ||
436 | PORT_DATA_IO_PD(198), PORT_DATA_IO_PD(199), | ||
437 | PORT_DATA_IO_PU_PD(200), PORT_DATA_IO_PU_PD(201), | ||
438 | PORT_DATA_IO_PU_PD(202), PORT_DATA_IO_PU_PD(203), | ||
439 | PORT_DATA_IO_PU_PD(204), PORT_DATA_IO_PU_PD(205), | ||
440 | PORT_DATA_IO_PU_PD(206), PORT_DATA_IO_PD(207), | ||
441 | PORT_DATA_IO_PD(208), PORT_DATA_IO_PD(209), | ||
442 | PORT_DATA_IO_PD(210), PORT_DATA_IO_PD(211), | ||
443 | PORT_DATA_IO_PD(212), PORT_DATA_IO_PD(213), | ||
444 | PORT_DATA_IO_PD(214), PORT_DATA_IO_PD(215), | ||
445 | PORT_DATA_IO_PD(216), PORT_DATA_IO_PD(217), | ||
446 | PORT_DATA_O(218), PORT_DATA_IO_PD(219), | ||
447 | PORT_DATA_IO_PD(220), PORT_DATA_IO_PD(221), | ||
448 | PORT_DATA_IO_PU_PD(222), | ||
449 | PORT_DATA_I_PU_PD(223), PORT_DATA_I_PU_PD(224), | ||
450 | PORT_DATA_IO_PU_PD(225), PORT_DATA_O(226), | ||
451 | PORT_DATA_IO_PU_PD(227), PORT_DATA_I_PD(228), | ||
452 | PORT_DATA_I_PD(229), PORT_DATA_IO(230), | ||
453 | PORT_DATA_IO_PD(231), PORT_DATA_IO_PU_PD(232), | ||
454 | PORT_DATA_I_PD(233), PORT_DATA_IO_PU_PD(234), | ||
455 | PORT_DATA_IO_PU_PD(235), PORT_DATA_IO_PU_PD(236), | ||
456 | PORT_DATA_IO_PD(237), PORT_DATA_IO_PU_PD(238), | ||
457 | |||
458 | /* 55-5 (GPIO) */ | ||
459 | PORT_DATA_IO_PU_PD(239), PORT_DATA_IO_PU_PD(240), | ||
460 | PORT_DATA_O(241), PORT_DATA_I_PD(242), | ||
461 | PORT_DATA_IO_PU_PD(243), PORT_DATA_IO_PU_PD(244), | ||
462 | PORT_DATA_IO_PU_PD(245), PORT_DATA_IO_PU_PD(246), | ||
463 | PORT_DATA_IO_PU_PD(247), PORT_DATA_IO_PU_PD(248), | ||
464 | PORT_DATA_IO_PU_PD(249), PORT_DATA_IO_PD(250), | ||
465 | PORT_DATA_IO_PU_PD(251), PORT_DATA_IO_PU_PD(252), | ||
466 | PORT_DATA_IO_PU_PD(253), PORT_DATA_IO_PU_PD(254), | ||
467 | PORT_DATA_IO_PU_PD(255), PORT_DATA_IO_PU_PD(256), | ||
468 | PORT_DATA_IO_PU_PD(257), PORT_DATA_IO_PD(258), | ||
469 | PORT_DATA_IO_PU_PD(259), PORT_DATA_IO_PU_PD(260), | ||
470 | PORT_DATA_IO_PU_PD(261), PORT_DATA_IO_PU_PD(262), | ||
471 | PORT_DATA_IO_PU_PD(263), | ||
472 | |||
473 | /* Special Pull-up / Pull-down Functions */ | ||
474 | PINMUX_DATA(PORT66_KEYIN0_PU_MARK, MSELBCR_MSEL17_0, MSELBCR_MSEL16_0, | ||
475 | PORT66_FN2, PORT66_IN_PU), | ||
476 | PINMUX_DATA(PORT67_KEYIN1_PU_MARK, MSELBCR_MSEL17_0, MSELBCR_MSEL16_0, | ||
477 | PORT67_FN2, PORT67_IN_PU), | ||
478 | PINMUX_DATA(PORT68_KEYIN2_PU_MARK, MSELBCR_MSEL17_0, MSELBCR_MSEL16_0, | ||
479 | PORT68_FN2, PORT68_IN_PU), | ||
480 | PINMUX_DATA(PORT69_KEYIN3_PU_MARK, MSELBCR_MSEL17_0, MSELBCR_MSEL16_0, | ||
481 | PORT69_FN2, PORT69_IN_PU), | ||
482 | PINMUX_DATA(PORT70_KEYIN4_PU_MARK, MSELBCR_MSEL17_0, MSELBCR_MSEL16_0, | ||
483 | PORT70_FN2, PORT70_IN_PU), | ||
484 | PINMUX_DATA(PORT71_KEYIN5_PU_MARK, MSELBCR_MSEL17_0, MSELBCR_MSEL16_0, | ||
485 | PORT71_FN2, PORT71_IN_PU), | ||
486 | PINMUX_DATA(PORT72_KEYIN6_PU_MARK, MSELBCR_MSEL17_0, MSELBCR_MSEL16_0, | ||
487 | PORT72_FN2, PORT72_IN_PU), | ||
488 | |||
489 | |||
490 | /* 55-1 (FN) */ | ||
491 | PINMUX_DATA(VBUS_0_MARK, PORT0_FN1), | ||
492 | PINMUX_DATA(CPORT0_MARK, PORT1_FN1), | ||
493 | PINMUX_DATA(CPORT1_MARK, PORT2_FN1), | ||
494 | PINMUX_DATA(CPORT2_MARK, PORT3_FN1), | ||
495 | PINMUX_DATA(CPORT3_MARK, PORT4_FN1), | ||
496 | PINMUX_DATA(CPORT4_MARK, PORT5_FN1), | ||
497 | PINMUX_DATA(CPORT5_MARK, PORT6_FN1), | ||
498 | PINMUX_DATA(CPORT6_MARK, PORT7_FN1), | ||
499 | PINMUX_DATA(CPORT7_MARK, PORT8_FN1), | ||
500 | PINMUX_DATA(CPORT8_MARK, PORT9_FN1), | ||
501 | PINMUX_DATA(CPORT9_MARK, PORT10_FN1), | ||
502 | PINMUX_DATA(CPORT10_MARK, PORT11_FN1), | ||
503 | PINMUX_DATA(CPORT11_MARK, PORT12_FN1), | ||
504 | PINMUX_DATA(SIN2_MARK, PORT12_FN2), | ||
505 | PINMUX_DATA(CPORT12_MARK, PORT13_FN1), | ||
506 | PINMUX_DATA(XCTS2_MARK, PORT13_FN2), | ||
507 | PINMUX_DATA(CPORT13_MARK, PORT14_FN1), | ||
508 | PINMUX_DATA(RFSPO4_MARK, PORT14_FN2), | ||
509 | PINMUX_DATA(CPORT14_MARK, PORT15_FN1), | ||
510 | PINMUX_DATA(RFSPO5_MARK, PORT15_FN2), | ||
511 | PINMUX_DATA(CPORT15_MARK, PORT16_FN1), | ||
512 | PINMUX_DATA(SCIFA0_SCK_MARK, PORT16_FN2), | ||
513 | PINMUX_DATA(GPS_AGC2_MARK, PORT16_FN3), | ||
514 | PINMUX_DATA(CPORT16_MARK, PORT17_FN1), | ||
515 | PINMUX_DATA(SCIFA0_TXD_MARK, PORT17_FN2), | ||
516 | PINMUX_DATA(GPS_AGC3_MARK, PORT17_FN3), | ||
517 | PINMUX_DATA(CPORT17_IC_OE_MARK, PORT18_FN1), | ||
518 | PINMUX_DATA(SOUT2_MARK, PORT18_FN2), | ||
519 | PINMUX_DATA(CPORT18_MARK, PORT19_FN1), | ||
520 | PINMUX_DATA(XRTS2_MARK, PORT19_FN2), | ||
521 | PINMUX_DATA(PORT19_VIO_CKO2_MARK, PORT19_FN3), | ||
522 | PINMUX_DATA(CPORT19_MPORT1_MARK, PORT20_FN1), | ||
523 | PINMUX_DATA(CPORT20_MARK, PORT21_FN1), | ||
524 | PINMUX_DATA(RFSPO6_MARK, PORT21_FN2), | ||
525 | PINMUX_DATA(CPORT21_MARK, PORT22_FN1), | ||
526 | PINMUX_DATA(STATUS0_MARK, PORT22_FN2), | ||
527 | PINMUX_DATA(CPORT22_MARK, PORT23_FN1), | ||
528 | PINMUX_DATA(STATUS1_MARK, PORT23_FN2), | ||
529 | PINMUX_DATA(CPORT23_MARK, PORT24_FN1), | ||
530 | PINMUX_DATA(STATUS2_MARK, PORT24_FN2), | ||
531 | PINMUX_DATA(RFSPO7_MARK, PORT24_FN3), | ||
532 | PINMUX_DATA(B_SYNLD1_MARK, PORT25_FN1), | ||
533 | PINMUX_DATA(B_SYNLD2_MARK, PORT26_FN1), | ||
534 | PINMUX_DATA(SYSENMSK_MARK, PORT26_FN2), | ||
535 | PINMUX_DATA(XMAINPS_MARK, PORT27_FN1), | ||
536 | PINMUX_DATA(XDIVPS_MARK, PORT28_FN1), | ||
537 | PINMUX_DATA(XIDRST_MARK, PORT29_FN1), | ||
538 | PINMUX_DATA(IDCLK_MARK, PORT30_FN1), | ||
539 | PINMUX_DATA(IC_DP_MARK, PORT30_FN2), | ||
540 | PINMUX_DATA(IDIO_MARK, PORT31_FN1), | ||
541 | PINMUX_DATA(IC_DM_MARK, PORT31_FN2), | ||
542 | PINMUX_DATA(SOUT1_MARK, PORT32_FN1), | ||
543 | PINMUX_DATA(SCIFA4_TXD_MARK, PORT32_FN2), | ||
544 | PINMUX_DATA(M02_BERDAT_MARK, PORT32_FN3), | ||
545 | PINMUX_DATA(SIN1_MARK, PORT33_FN1), | ||
546 | PINMUX_DATA(SCIFA4_RXD_MARK, PORT33_FN2), | ||
547 | PINMUX_DATA(XWUP_MARK, PORT33_FN3), | ||
548 | PINMUX_DATA(XRTS1_MARK, PORT34_FN1), | ||
549 | PINMUX_DATA(SCIFA4_RTS_MARK, PORT34_FN2), | ||
550 | PINMUX_DATA(M03_BERCLK_MARK, PORT34_FN3), | ||
551 | PINMUX_DATA(XCTS1_MARK, PORT35_FN1), | ||
552 | PINMUX_DATA(SCIFA4_CTS_MARK, PORT35_FN2), | ||
553 | PINMUX_DATA(PCMCLKO_MARK, PORT36_FN1), | ||
554 | PINMUX_DATA(SYNC8KO_MARK, PORT37_FN1), | ||
555 | |||
556 | /* 55-2 (FN) */ | ||
557 | PINMUX_DATA(DNPCM_A_MARK, PORT38_FN1), | ||
558 | PINMUX_DATA(UPPCM_A_MARK, PORT39_FN1), | ||
559 | PINMUX_DATA(VACK_MARK, PORT40_FN1), | ||
560 | PINMUX_DATA(XTALB1L_MARK, PORT41_FN1), | ||
561 | PINMUX_DATA(GPS_AGC1_MARK, PORT42_FN1), | ||
562 | PINMUX_DATA(SCIFA0_RTS_MARK, PORT42_FN2), | ||
563 | PINMUX_DATA(GPS_AGC4_MARK, PORT43_FN1), | ||
564 | PINMUX_DATA(SCIFA0_RXD_MARK, PORT43_FN2), | ||
565 | PINMUX_DATA(GPS_PWRDOWN_MARK, PORT44_FN1), | ||
566 | PINMUX_DATA(SCIFA0_CTS_MARK, PORT44_FN2), | ||
567 | PINMUX_DATA(GPS_IM_MARK, PORT45_FN1), | ||
568 | PINMUX_DATA(GPS_IS_MARK, PORT46_FN1), | ||
569 | PINMUX_DATA(GPS_QM_MARK, PORT47_FN1), | ||
570 | PINMUX_DATA(GPS_QS_MARK, PORT48_FN1), | ||
571 | PINMUX_DATA(FMSOCK_MARK, PORT49_FN1), | ||
572 | PINMUX_DATA(PORT49_IRDA_OUT_MARK, PORT49_FN2), | ||
573 | PINMUX_DATA(PORT49_IROUT_MARK, PORT49_FN3), | ||
574 | PINMUX_DATA(FMSOOLR_MARK, PORT50_FN1), | ||
575 | PINMUX_DATA(BBIF2_TSYNC2_MARK, PORT50_FN2), | ||
576 | PINMUX_DATA(TPU2TO2_MARK, PORT50_FN3), | ||
577 | PINMUX_DATA(IPORT3_MARK, PORT50_FN4), | ||
578 | PINMUX_DATA(FMSIOLR_MARK, PORT50_FN5), | ||
579 | PINMUX_DATA(FMSOOBT_MARK, PORT51_FN1), | ||
580 | PINMUX_DATA(BBIF2_TSCK2_MARK, PORT51_FN2), | ||
581 | PINMUX_DATA(TPU2TO3_MARK, PORT51_FN3), | ||
582 | PINMUX_DATA(OPORT1_MARK, PORT51_FN4), | ||
583 | PINMUX_DATA(FMSIOBT_MARK, PORT51_FN5), | ||
584 | PINMUX_DATA(FMSOSLD_MARK, PORT52_FN1), | ||
585 | PINMUX_DATA(BBIF2_TXD2_MARK, PORT52_FN2), | ||
586 | PINMUX_DATA(OPORT2_MARK, PORT52_FN3), | ||
587 | PINMUX_DATA(FMSOILR_MARK, PORT53_FN1), | ||
588 | PINMUX_DATA(PORT53_IRDA_IN_MARK, PORT53_FN2), | ||
589 | PINMUX_DATA(TPU3TO3_MARK, PORT53_FN3), | ||
590 | PINMUX_DATA(OPORT3_MARK, PORT53_FN4), | ||
591 | PINMUX_DATA(FMSIILR_MARK, PORT53_FN5), | ||
592 | PINMUX_DATA(FMSOIBT_MARK, PORT54_FN1), | ||
593 | PINMUX_DATA(PORT54_IRDA_FIRSEL_MARK, PORT54_FN2), | ||
594 | PINMUX_DATA(TPU3TO2_MARK, PORT54_FN3), | ||
595 | PINMUX_DATA(FMSIIBT_MARK, PORT54_FN4), | ||
596 | PINMUX_DATA(FMSISLD_MARK, PORT55_FN1), | ||
597 | PINMUX_DATA(MFG0_OUT1_MARK, PORT55_FN2), | ||
598 | PINMUX_DATA(TPU0TO0_MARK, PORT55_FN3), | ||
599 | PINMUX_DATA(A0_EA0_MARK, PORT57_FN1), | ||
600 | PINMUX_DATA(BS_MARK, PORT57_FN2), | ||
601 | PINMUX_DATA(A12_EA12_MARK, PORT58_FN1), | ||
602 | PINMUX_DATA(PORT58_VIO_CKOR_MARK, PORT58_FN2), | ||
603 | PINMUX_DATA(TPU4TO2_MARK, PORT58_FN3), | ||
604 | PINMUX_DATA(A13_EA13_MARK, PORT59_FN1), | ||
605 | PINMUX_DATA(PORT59_IROUT_MARK, PORT59_FN2), | ||
606 | PINMUX_DATA(MFG0_OUT2_MARK, PORT59_FN3), | ||
607 | PINMUX_DATA(TPU0TO1_MARK, PORT59_FN4), | ||
608 | PINMUX_DATA(A14_EA14_MARK, PORT60_FN1), | ||
609 | PINMUX_DATA(PORT60_KEYOUT5_MARK, PORT60_FN2), | ||
610 | PINMUX_DATA(A15_EA15_MARK, PORT61_FN1), | ||
611 | PINMUX_DATA(PORT61_KEYOUT4_MARK, PORT61_FN2), | ||
612 | PINMUX_DATA(A16_EA16_MARK, PORT62_FN1), | ||
613 | PINMUX_DATA(PORT62_KEYOUT3_MARK, PORT62_FN2), | ||
614 | PINMUX_DATA(MSIOF0_SS1_MARK, PORT62_FN3), | ||
615 | PINMUX_DATA(A17_EA17_MARK, PORT63_FN1), | ||
616 | PINMUX_DATA(PORT63_KEYOUT2_MARK, PORT63_FN2), | ||
617 | PINMUX_DATA(MSIOF0_TSYNC_MARK, PORT63_FN3), | ||
618 | PINMUX_DATA(A18_EA18_MARK, PORT64_FN1), | ||
619 | PINMUX_DATA(PORT64_KEYOUT1_MARK, PORT64_FN2), | ||
620 | PINMUX_DATA(MSIOF0_TSCK_MARK, PORT64_FN3), | ||
621 | PINMUX_DATA(A19_EA19_MARK, PORT65_FN1), | ||
622 | PINMUX_DATA(PORT65_KEYOUT0_MARK, PORT65_FN2), | ||
623 | PINMUX_DATA(MSIOF0_TXD_MARK, PORT65_FN3), | ||
624 | PINMUX_DATA(A20_EA20_MARK, PORT66_FN1), | ||
625 | PINMUX_DATA(PORT66_KEYIN0_MARK, PORT66_FN2), | ||
626 | PINMUX_DATA(MSIOF0_RSCK_MARK, PORT66_FN3), | ||
627 | PINMUX_DATA(A21_EA21_MARK, PORT67_FN1), | ||
628 | PINMUX_DATA(PORT67_KEYIN1_MARK, PORT67_FN2), | ||
629 | PINMUX_DATA(MSIOF0_RSYNC_MARK, PORT67_FN3), | ||
630 | PINMUX_DATA(A22_EA22_MARK, PORT68_FN1), | ||
631 | PINMUX_DATA(PORT68_KEYIN2_MARK, PORT68_FN2), | ||
632 | PINMUX_DATA(MSIOF0_MCK0_MARK, PORT68_FN3), | ||
633 | PINMUX_DATA(A23_EA23_MARK, PORT69_FN1), | ||
634 | PINMUX_DATA(PORT69_KEYIN3_MARK, PORT69_FN2), | ||
635 | PINMUX_DATA(MSIOF0_MCK1_MARK, PORT69_FN3), | ||
636 | PINMUX_DATA(A24_EA24_MARK, PORT70_FN1), | ||
637 | PINMUX_DATA(PORT70_KEYIN4_MARK, PORT70_FN2), | ||
638 | PINMUX_DATA(MSIOF0_RXD_MARK, PORT70_FN3), | ||
639 | PINMUX_DATA(A25_EA25_MARK, PORT71_FN1), | ||
640 | PINMUX_DATA(PORT71_KEYIN5_MARK, PORT71_FN2), | ||
641 | PINMUX_DATA(MSIOF0_SS2_MARK, PORT71_FN3), | ||
642 | PINMUX_DATA(A26_MARK, PORT72_FN1), | ||
643 | PINMUX_DATA(PORT72_KEYIN6_MARK, PORT72_FN2), | ||
644 | PINMUX_DATA(D0_ED0_NAF0_MARK, PORT74_FN1), | ||
645 | PINMUX_DATA(D1_ED1_NAF1_MARK, PORT75_FN1), | ||
646 | PINMUX_DATA(D2_ED2_NAF2_MARK, PORT76_FN1), | ||
647 | PINMUX_DATA(D3_ED3_NAF3_MARK, PORT77_FN1), | ||
648 | PINMUX_DATA(D4_ED4_NAF4_MARK, PORT78_FN1), | ||
649 | PINMUX_DATA(D5_ED5_NAF5_MARK, PORT79_FN1), | ||
650 | PINMUX_DATA(D6_ED6_NAF6_MARK, PORT80_FN1), | ||
651 | PINMUX_DATA(D7_ED7_NAF7_MARK, PORT81_FN1), | ||
652 | PINMUX_DATA(D8_ED8_NAF8_MARK, PORT82_FN1), | ||
653 | PINMUX_DATA(D9_ED9_NAF9_MARK, PORT83_FN1), | ||
654 | PINMUX_DATA(D10_ED10_NAF10_MARK, PORT84_FN1), | ||
655 | PINMUX_DATA(D11_ED11_NAF11_MARK, PORT85_FN1), | ||
656 | PINMUX_DATA(D12_ED12_NAF12_MARK, PORT86_FN1), | ||
657 | PINMUX_DATA(D13_ED13_NAF13_MARK, PORT87_FN1), | ||
658 | PINMUX_DATA(D14_ED14_NAF14_MARK, PORT88_FN1), | ||
659 | PINMUX_DATA(D15_ED15_NAF15_MARK, PORT89_FN1), | ||
660 | PINMUX_DATA(CS4_MARK, PORT90_FN1), | ||
661 | PINMUX_DATA(CS5A_MARK, PORT91_FN1), | ||
662 | PINMUX_DATA(FMSICK_MARK, PORT91_FN2), | ||
663 | PINMUX_DATA(CS5B_MARK, PORT92_FN1), | ||
664 | PINMUX_DATA(FCE1_MARK, PORT92_FN2), | ||
665 | |||
666 | /* 55-3 (FN) */ | ||
667 | PINMUX_DATA(CS6B_MARK, PORT93_FN1), | ||
668 | PINMUX_DATA(XCS2_MARK, PORT93_FN2), | ||
669 | PINMUX_DATA(CS6A_MARK, PORT93_FN3), | ||
670 | PINMUX_DATA(DACK0_MARK, PORT93_FN4), | ||
671 | PINMUX_DATA(FCE0_MARK, PORT94_FN1), | ||
672 | PINMUX_DATA(WAIT_MARK, PORT95_FN1), | ||
673 | PINMUX_DATA(DREQ0_MARK, PORT95_FN2), | ||
674 | PINMUX_DATA(RD_XRD_MARK, PORT96_FN1), | ||
675 | PINMUX_DATA(WE0_XWR0_FWE_MARK, PORT97_FN1), | ||
676 | PINMUX_DATA(WE1_XWR1_MARK, PORT98_FN1), | ||
677 | PINMUX_DATA(FRB_MARK, PORT99_FN1), | ||
678 | PINMUX_DATA(CKO_MARK, PORT100_FN1), | ||
679 | PINMUX_DATA(NBRSTOUT_MARK, PORT101_FN1), | ||
680 | PINMUX_DATA(NBRST_MARK, PORT102_FN1), | ||
681 | PINMUX_DATA(GPS_EPPSIN_MARK, PORT106_FN1), | ||
682 | PINMUX_DATA(LATCHPULSE_MARK, PORT110_FN1), | ||
683 | PINMUX_DATA(LTESIGNAL_MARK, PORT111_FN1), | ||
684 | PINMUX_DATA(LEGACYSTATE_MARK, PORT112_FN1), | ||
685 | PINMUX_DATA(TCKON_MARK, PORT118_FN1), | ||
686 | PINMUX_DATA(VIO_VD_MARK, PORT128_FN1), | ||
687 | PINMUX_DATA(PORT128_KEYOUT0_MARK, PORT128_FN2), | ||
688 | PINMUX_DATA(IPORT0_MARK, PORT128_FN3), | ||
689 | PINMUX_DATA(VIO_HD_MARK, PORT129_FN1), | ||
690 | PINMUX_DATA(PORT129_KEYOUT1_MARK, PORT129_FN2), | ||
691 | PINMUX_DATA(IPORT1_MARK, PORT129_FN3), | ||
692 | PINMUX_DATA(VIO_D0_MARK, PORT130_FN1), | ||
693 | PINMUX_DATA(PORT130_KEYOUT2_MARK, PORT130_FN2), | ||
694 | PINMUX_DATA(PORT130_MSIOF2_RXD_MARK, PORT130_FN3), | ||
695 | PINMUX_DATA(VIO_D1_MARK, PORT131_FN1), | ||
696 | PINMUX_DATA(PORT131_KEYOUT3_MARK, PORT131_FN2), | ||
697 | PINMUX_DATA(PORT131_MSIOF2_SS1_MARK, PORT131_FN3), | ||
698 | PINMUX_DATA(VIO_D2_MARK, PORT132_FN1), | ||
699 | PINMUX_DATA(PORT132_KEYOUT4_MARK, PORT132_FN2), | ||
700 | PINMUX_DATA(PORT132_MSIOF2_SS2_MARK, PORT132_FN3), | ||
701 | PINMUX_DATA(VIO_D3_MARK, PORT133_FN1), | ||
702 | PINMUX_DATA(PORT133_KEYOUT5_MARK, PORT133_FN2), | ||
703 | PINMUX_DATA(PORT133_MSIOF2_TSYNC_MARK, PORT133_FN3), | ||
704 | PINMUX_DATA(VIO_D4_MARK, PORT134_FN1), | ||
705 | PINMUX_DATA(PORT134_KEYIN0_MARK, PORT134_FN2), | ||
706 | PINMUX_DATA(PORT134_MSIOF2_TXD_MARK, PORT134_FN3), | ||
707 | PINMUX_DATA(VIO_D5_MARK, PORT135_FN1), | ||
708 | PINMUX_DATA(PORT135_KEYIN1_MARK, PORT135_FN2), | ||
709 | PINMUX_DATA(PORT135_MSIOF2_TSCK_MARK, PORT135_FN3), | ||
710 | PINMUX_DATA(VIO_D6_MARK, PORT136_FN1), | ||
711 | PINMUX_DATA(PORT136_KEYIN2_MARK, PORT136_FN2), | ||
712 | PINMUX_DATA(VIO_D7_MARK, PORT137_FN1), | ||
713 | PINMUX_DATA(PORT137_KEYIN3_MARK, PORT137_FN2), | ||
714 | PINMUX_DATA(VIO_D8_MARK, PORT138_FN1), | ||
715 | PINMUX_DATA(M9_SLCD_A01_MARK, PORT138_FN2), | ||
716 | PINMUX_DATA(PORT138_FSIAOMC_MARK, PORT138_FN3), | ||
717 | PINMUX_DATA(VIO_D9_MARK, PORT139_FN1), | ||
718 | PINMUX_DATA(M10_SLCD_CK1_MARK, PORT139_FN2), | ||
719 | PINMUX_DATA(PORT139_FSIAOLR_MARK, PORT139_FN3), | ||
720 | PINMUX_DATA(VIO_D10_MARK, PORT140_FN1), | ||
721 | PINMUX_DATA(M11_SLCD_SO1_MARK, PORT140_FN2), | ||
722 | PINMUX_DATA(TPU0TO2_MARK, PORT140_FN3), | ||
723 | PINMUX_DATA(PORT140_FSIAOBT_MARK, PORT140_FN4), | ||
724 | PINMUX_DATA(VIO_D11_MARK, PORT141_FN1), | ||
725 | PINMUX_DATA(M12_SLCD_CE1_MARK, PORT141_FN2), | ||
726 | PINMUX_DATA(TPU0TO3_MARK, PORT141_FN3), | ||
727 | PINMUX_DATA(PORT141_FSIAOSLD_MARK, PORT141_FN4), | ||
728 | PINMUX_DATA(VIO_D12_MARK, PORT142_FN1), | ||
729 | PINMUX_DATA(M13_BSW_MARK, PORT142_FN2), | ||
730 | PINMUX_DATA(PORT142_FSIACK_MARK, PORT142_FN3), | ||
731 | PINMUX_DATA(VIO_D13_MARK, PORT143_FN1), | ||
732 | PINMUX_DATA(M14_GSW_MARK, PORT143_FN2), | ||
733 | PINMUX_DATA(PORT143_FSIAILR_MARK, PORT143_FN3), | ||
734 | PINMUX_DATA(VIO_D14_MARK, PORT144_FN1), | ||
735 | PINMUX_DATA(M15_RSW_MARK, PORT144_FN2), | ||
736 | PINMUX_DATA(PORT144_FSIAIBT_MARK, PORT144_FN3), | ||
737 | PINMUX_DATA(VIO_D15_MARK, PORT145_FN1), | ||
738 | PINMUX_DATA(TPU1TO3_MARK, PORT145_FN2), | ||
739 | PINMUX_DATA(PORT145_FSIAISLD_MARK, PORT145_FN3), | ||
740 | PINMUX_DATA(VIO_CLK_MARK, PORT146_FN1), | ||
741 | PINMUX_DATA(PORT146_KEYIN4_MARK, PORT146_FN2), | ||
742 | PINMUX_DATA(IPORT2_MARK, PORT146_FN3), | ||
743 | PINMUX_DATA(VIO_FIELD_MARK, PORT147_FN1), | ||
744 | PINMUX_DATA(PORT147_KEYIN5_MARK, PORT147_FN2), | ||
745 | PINMUX_DATA(VIO_CKO_MARK, PORT148_FN1), | ||
746 | PINMUX_DATA(PORT148_KEYIN6_MARK, PORT148_FN2), | ||
747 | PINMUX_DATA(A27_MARK, PORT149_FN1), | ||
748 | PINMUX_DATA(RDWR_XWE_MARK, PORT149_FN2), | ||
749 | PINMUX_DATA(MFG0_IN1_MARK, PORT149_FN3), | ||
750 | PINMUX_DATA(MFG0_IN2_MARK, PORT150_FN1), | ||
751 | PINMUX_DATA(TS_SPSYNC3_MARK, PORT151_FN1), | ||
752 | PINMUX_DATA(MSIOF2_RSCK_MARK, PORT151_FN2), | ||
753 | PINMUX_DATA(TS_SDAT3_MARK, PORT152_FN1), | ||
754 | PINMUX_DATA(MSIOF2_RSYNC_MARK, PORT152_FN2), | ||
755 | PINMUX_DATA(TPU1TO2_MARK, PORT153_FN1), | ||
756 | PINMUX_DATA(TS_SDEN3_MARK, PORT153_FN2), | ||
757 | PINMUX_DATA(PORT153_MSIOF2_SS1_MARK, PORT153_FN3), | ||
758 | PINMUX_DATA(SOUT3_MARK, PORT154_FN1), | ||
759 | PINMUX_DATA(SCIFA2_TXD1_MARK, PORT154_FN2), | ||
760 | PINMUX_DATA(MSIOF2_MCK0_MARK, PORT154_FN3), | ||
761 | PINMUX_DATA(SIN3_MARK, PORT155_FN1), | ||
762 | PINMUX_DATA(SCIFA2_RXD1_MARK, PORT155_FN2), | ||
763 | PINMUX_DATA(MSIOF2_MCK1_MARK, PORT155_FN3), | ||
764 | PINMUX_DATA(XRTS3_MARK, PORT156_FN1), | ||
765 | PINMUX_DATA(SCIFA2_RTS1_MARK, PORT156_FN2), | ||
766 | PINMUX_DATA(PORT156_MSIOF2_SS2_MARK, PORT156_FN3), | ||
767 | PINMUX_DATA(XCTS3_MARK, PORT157_FN1), | ||
768 | PINMUX_DATA(SCIFA2_CTS1_MARK, PORT157_FN2), | ||
769 | PINMUX_DATA(PORT157_MSIOF2_RXD_MARK, PORT157_FN3), | ||
770 | |||
771 | /* 55-4 (FN) */ | ||
772 | PINMUX_DATA(DINT_MARK, PORT158_FN1), | ||
773 | PINMUX_DATA(SCIFA2_SCK1_MARK, PORT158_FN2), | ||
774 | PINMUX_DATA(TS_SCK3_MARK, PORT158_FN3), | ||
775 | PINMUX_DATA(PORT159_SCIFB_SCK_MARK, PORT159_FN1), | ||
776 | PINMUX_DATA(PORT159_SCIFA5_SCK_MARK, PORT159_FN2), | ||
777 | PINMUX_DATA(NMI_MARK, PORT159_FN3), | ||
778 | PINMUX_DATA(PORT160_SCIFB_TXD_MARK, PORT160_FN1), | ||
779 | PINMUX_DATA(PORT160_SCIFA5_TXD_MARK, PORT160_FN2), | ||
780 | PINMUX_DATA(SOUT0_MARK, PORT160_FN3), | ||
781 | PINMUX_DATA(PORT161_SCIFB_CTS_MARK, PORT161_FN1), | ||
782 | PINMUX_DATA(PORT161_SCIFA5_CTS_MARK, PORT161_FN2), | ||
783 | PINMUX_DATA(XCTS0_MARK, PORT161_FN3), | ||
784 | PINMUX_DATA(MFG3_IN2_MARK, PORT161_FN4), | ||
785 | PINMUX_DATA(PORT162_SCIFB_RXD_MARK, PORT162_FN1), | ||
786 | PINMUX_DATA(PORT162_SCIFA5_RXD_MARK, PORT162_FN2), | ||
787 | PINMUX_DATA(SIN0_MARK, PORT162_FN3), | ||
788 | PINMUX_DATA(MFG3_IN1_MARK, PORT162_FN4), | ||
789 | PINMUX_DATA(PORT163_SCIFB_RTS_MARK, PORT163_FN1), | ||
790 | PINMUX_DATA(PORT163_SCIFA5_RTS_MARK, PORT163_FN2), | ||
791 | PINMUX_DATA(XRTS0_MARK, PORT163_FN3), | ||
792 | PINMUX_DATA(MFG3_OUT1_MARK, PORT163_FN4), | ||
793 | PINMUX_DATA(TPU3TO0_MARK, PORT163_FN5), | ||
794 | PINMUX_DATA(LCDD0_MARK, PORT192_FN1), | ||
795 | PINMUX_DATA(PORT192_KEYOUT0_MARK, PORT192_FN2), | ||
796 | PINMUX_DATA(EXT_CKI_MARK, PORT192_FN3), | ||
797 | PINMUX_DATA(LCDD1_MARK, PORT193_FN1), | ||
798 | PINMUX_DATA(PORT193_KEYOUT1_MARK, PORT193_FN2), | ||
799 | PINMUX_DATA(PORT193_SCIFA5_CTS_MARK, PORT193_FN3), | ||
800 | PINMUX_DATA(BBIF2_TSYNC1_MARK, PORT193_FN4), | ||
801 | PINMUX_DATA(LCDD2_MARK, PORT194_FN1), | ||
802 | PINMUX_DATA(PORT194_KEYOUT2_MARK, PORT194_FN2), | ||
803 | PINMUX_DATA(PORT194_SCIFA5_RTS_MARK, PORT194_FN3), | ||
804 | PINMUX_DATA(BBIF2_TSCK1_MARK, PORT194_FN4), | ||
805 | PINMUX_DATA(LCDD3_MARK, PORT195_FN1), | ||
806 | PINMUX_DATA(PORT195_KEYOUT3_MARK, PORT195_FN2), | ||
807 | PINMUX_DATA(PORT195_SCIFA5_RXD_MARK, PORT195_FN3), | ||
808 | PINMUX_DATA(BBIF2_TXD1_MARK, PORT195_FN4), | ||
809 | PINMUX_DATA(LCDD4_MARK, PORT196_FN1), | ||
810 | PINMUX_DATA(PORT196_KEYOUT4_MARK, PORT196_FN2), | ||
811 | PINMUX_DATA(PORT196_SCIFA5_TXD_MARK, PORT196_FN3), | ||
812 | PINMUX_DATA(LCDD5_MARK, PORT197_FN1), | ||
813 | PINMUX_DATA(PORT197_KEYOUT5_MARK, PORT197_FN2), | ||
814 | PINMUX_DATA(PORT197_SCIFA5_SCK_MARK, PORT197_FN3), | ||
815 | PINMUX_DATA(MFG2_OUT2_MARK, PORT197_FN4), | ||
816 | PINMUX_DATA(LCDD6_MARK, PORT198_FN1), | ||
817 | PINMUX_DATA(LCDD7_MARK, PORT199_FN1), | ||
818 | PINMUX_DATA(TPU4TO1_MARK, PORT199_FN2), | ||
819 | PINMUX_DATA(MFG4_OUT2_MARK, PORT199_FN3), | ||
820 | PINMUX_DATA(LCDD8_MARK, PORT200_FN1), | ||
821 | PINMUX_DATA(PORT200_KEYIN0_MARK, PORT200_FN2), | ||
822 | PINMUX_DATA(VIO_DR0_MARK, PORT200_FN3), | ||
823 | PINMUX_DATA(D16_MARK, PORT200_FN4), | ||
824 | PINMUX_DATA(LCDD9_MARK, PORT201_FN1), | ||
825 | PINMUX_DATA(PORT201_KEYIN1_MARK, PORT201_FN2), | ||
826 | PINMUX_DATA(VIO_DR1_MARK, PORT201_FN3), | ||
827 | PINMUX_DATA(D17_MARK, PORT201_FN4), | ||
828 | PINMUX_DATA(LCDD10_MARK, PORT202_FN1), | ||
829 | PINMUX_DATA(PORT202_KEYIN2_MARK, PORT202_FN2), | ||
830 | PINMUX_DATA(VIO_DR2_MARK, PORT202_FN3), | ||
831 | PINMUX_DATA(D18_MARK, PORT202_FN4), | ||
832 | PINMUX_DATA(LCDD11_MARK, PORT203_FN1), | ||
833 | PINMUX_DATA(PORT203_KEYIN3_MARK, PORT203_FN2), | ||
834 | PINMUX_DATA(VIO_DR3_MARK, PORT203_FN3), | ||
835 | PINMUX_DATA(D19_MARK, PORT203_FN4), | ||
836 | PINMUX_DATA(LCDD12_MARK, PORT204_FN1), | ||
837 | PINMUX_DATA(PORT204_KEYIN4_MARK, PORT204_FN2), | ||
838 | PINMUX_DATA(VIO_DR4_MARK, PORT204_FN3), | ||
839 | PINMUX_DATA(D20_MARK, PORT204_FN4), | ||
840 | PINMUX_DATA(LCDD13_MARK, PORT205_FN1), | ||
841 | PINMUX_DATA(PORT205_KEYIN5_MARK, PORT205_FN2), | ||
842 | PINMUX_DATA(VIO_DR5_MARK, PORT205_FN3), | ||
843 | PINMUX_DATA(D21_MARK, PORT205_FN4), | ||
844 | PINMUX_DATA(LCDD14_MARK, PORT206_FN1), | ||
845 | PINMUX_DATA(PORT206_KEYIN6_MARK, PORT206_FN2), | ||
846 | PINMUX_DATA(VIO_DR6_MARK, PORT206_FN3), | ||
847 | PINMUX_DATA(D22_MARK, PORT206_FN4), | ||
848 | PINMUX_DATA(LCDD15_MARK, PORT207_FN1), | ||
849 | PINMUX_DATA(PORT207_MSIOF0L_SS1_MARK, PORT207_FN2), | ||
850 | PINMUX_DATA(PORT207_KEYOUT0_MARK, PORT207_FN3), | ||
851 | PINMUX_DATA(VIO_DR7_MARK, PORT207_FN4), | ||
852 | PINMUX_DATA(D23_MARK, PORT207_FN5), | ||
853 | PINMUX_DATA(LCDD16_MARK, PORT208_FN1), | ||
854 | PINMUX_DATA(PORT208_MSIOF0L_SS2_MARK, PORT208_FN2), | ||
855 | PINMUX_DATA(PORT208_KEYOUT1_MARK, PORT208_FN3), | ||
856 | PINMUX_DATA(VIO_VDR_MARK, PORT208_FN4), | ||
857 | PINMUX_DATA(D24_MARK, PORT208_FN5), | ||
858 | PINMUX_DATA(LCDD17_MARK, PORT209_FN1), | ||
859 | PINMUX_DATA(PORT209_KEYOUT2_MARK, PORT209_FN2), | ||
860 | PINMUX_DATA(VIO_HDR_MARK, PORT209_FN3), | ||
861 | PINMUX_DATA(D25_MARK, PORT209_FN4), | ||
862 | PINMUX_DATA(LCDD18_MARK, PORT210_FN1), | ||
863 | PINMUX_DATA(DREQ2_MARK, PORT210_FN2), | ||
864 | PINMUX_DATA(PORT210_MSIOF0L_SS1_MARK, PORT210_FN3), | ||
865 | PINMUX_DATA(D26_MARK, PORT210_FN4), | ||
866 | PINMUX_DATA(LCDD19_MARK, PORT211_FN1), | ||
867 | PINMUX_DATA(PORT211_MSIOF0L_SS2_MARK, PORT211_FN2), | ||
868 | PINMUX_DATA(D27_MARK, PORT211_FN3), | ||
869 | PINMUX_DATA(LCDD20_MARK, PORT212_FN1), | ||
870 | PINMUX_DATA(TS_SPSYNC1_MARK, PORT212_FN2), | ||
871 | PINMUX_DATA(MSIOF0L_MCK0_MARK, PORT212_FN3), | ||
872 | PINMUX_DATA(D28_MARK, PORT212_FN4), | ||
873 | PINMUX_DATA(LCDD21_MARK, PORT213_FN1), | ||
874 | PINMUX_DATA(TS_SDAT1_MARK, PORT213_FN2), | ||
875 | PINMUX_DATA(MSIOF0L_MCK1_MARK, PORT213_FN3), | ||
876 | PINMUX_DATA(D29_MARK, PORT213_FN4), | ||
877 | PINMUX_DATA(LCDD22_MARK, PORT214_FN1), | ||
878 | PINMUX_DATA(TS_SDEN1_MARK, PORT214_FN2), | ||
879 | PINMUX_DATA(MSIOF0L_RSCK_MARK, PORT214_FN3), | ||
880 | PINMUX_DATA(D30_MARK, PORT214_FN4), | ||
881 | PINMUX_DATA(LCDD23_MARK, PORT215_FN1), | ||
882 | PINMUX_DATA(TS_SCK1_MARK, PORT215_FN2), | ||
883 | PINMUX_DATA(MSIOF0L_RSYNC_MARK, PORT215_FN3), | ||
884 | PINMUX_DATA(D31_MARK, PORT215_FN4), | ||
885 | PINMUX_DATA(LCDDCK_MARK, PORT216_FN1), | ||
886 | PINMUX_DATA(LCDWR_MARK, PORT216_FN2), | ||
887 | PINMUX_DATA(PORT216_KEYOUT3_MARK, PORT216_FN3), | ||
888 | PINMUX_DATA(VIO_CLKR_MARK, PORT216_FN4), | ||
889 | PINMUX_DATA(LCDRD_MARK, PORT217_FN1), | ||
890 | PINMUX_DATA(DACK2_MARK, PORT217_FN2), | ||
891 | PINMUX_DATA(MSIOF0L_TSYNC_MARK, PORT217_FN3), | ||
892 | PINMUX_DATA(LCDHSYN_MARK, PORT218_FN1), | ||
893 | PINMUX_DATA(LCDCS_MARK, PORT218_FN2), | ||
894 | PINMUX_DATA(LCDCS2_MARK, PORT218_FN3), | ||
895 | PINMUX_DATA(DACK3_MARK, PORT218_FN4), | ||
896 | PINMUX_DATA(PORT218_VIO_CKOR_MARK, PORT218_FN5), | ||
897 | PINMUX_DATA(PORT218_KEYOUT4_MARK, PORT218_FN6), | ||
898 | PINMUX_DATA(LCDDISP_MARK, PORT219_FN1), | ||
899 | PINMUX_DATA(LCDRS_MARK, PORT219_FN2), | ||
900 | PINMUX_DATA(DREQ3_MARK, PORT219_FN3), | ||
901 | PINMUX_DATA(MSIOF0L_TSCK_MARK, PORT219_FN4), | ||
902 | PINMUX_DATA(LCDVSYN_MARK, PORT220_FN1), | ||
903 | PINMUX_DATA(LCDVSYN2_MARK, PORT220_FN2), | ||
904 | PINMUX_DATA(PORT220_KEYOUT5_MARK, PORT220_FN3), | ||
905 | PINMUX_DATA(LCDLCLK_MARK, PORT221_FN1), | ||
906 | PINMUX_DATA(DREQ1_MARK, PORT221_FN2), | ||
907 | PINMUX_DATA(PWEN_MARK, PORT221_FN3), | ||
908 | PINMUX_DATA(MSIOF0L_RXD_MARK, PORT221_FN4), | ||
909 | PINMUX_DATA(LCDDON_MARK, PORT222_FN1), | ||
910 | PINMUX_DATA(LCDDON2_MARK, PORT222_FN2), | ||
911 | PINMUX_DATA(DACK1_MARK, PORT222_FN3), | ||
912 | PINMUX_DATA(OVCN_MARK, PORT222_FN4), | ||
913 | PINMUX_DATA(MSIOF0L_TXD_MARK, PORT222_FN5), | ||
914 | PINMUX_DATA(SCIFA1_TXD_MARK, PORT225_FN1), | ||
915 | PINMUX_DATA(OVCN2_MARK, PORT225_FN2), | ||
916 | PINMUX_DATA(EXTLP_MARK, PORT226_FN1), | ||
917 | PINMUX_DATA(SCIFA1_SCK_MARK, PORT226_FN2), | ||
918 | PINMUX_DATA(USBTERM_MARK, PORT226_FN3), | ||
919 | PINMUX_DATA(PORT226_VIO_CKO2_MARK, PORT226_FN4), | ||
920 | PINMUX_DATA(SCIFA1_RTS_MARK, PORT227_FN1), | ||
921 | PINMUX_DATA(IDIN_MARK, PORT227_FN2), | ||
922 | PINMUX_DATA(SCIFA1_RXD_MARK, PORT228_FN1), | ||
923 | PINMUX_DATA(SCIFA1_CTS_MARK, PORT229_FN1), | ||
924 | PINMUX_DATA(MFG1_IN1_MARK, PORT229_FN2), | ||
925 | PINMUX_DATA(MSIOF1_TXD_MARK, PORT230_FN1), | ||
926 | PINMUX_DATA(SCIFA2_TXD2_MARK, PORT230_FN2), | ||
927 | PINMUX_DATA(PORT230_FSIAOMC_MARK, PORT230_FN3), | ||
928 | PINMUX_DATA(MSIOF1_TSYNC_MARK, PORT231_FN1), | ||
929 | PINMUX_DATA(SCIFA2_CTS2_MARK, PORT231_FN2), | ||
930 | PINMUX_DATA(PORT231_FSIAOLR_MARK, PORT231_FN3), | ||
931 | PINMUX_DATA(MSIOF1_TSCK_MARK, PORT232_FN1), | ||
932 | PINMUX_DATA(SCIFA2_SCK2_MARK, PORT232_FN2), | ||
933 | PINMUX_DATA(PORT232_FSIAOBT_MARK, PORT232_FN3), | ||
934 | PINMUX_DATA(MSIOF1_RXD_MARK, PORT233_FN1), | ||
935 | PINMUX_DATA(SCIFA2_RXD2_MARK, PORT233_FN2), | ||
936 | PINMUX_DATA(GPS_VCOTRIG_MARK, PORT233_FN3), | ||
937 | PINMUX_DATA(PORT233_FSIACK_MARK, PORT233_FN4), | ||
938 | PINMUX_DATA(MSIOF1_RSCK_MARK, PORT234_FN1), | ||
939 | PINMUX_DATA(SCIFA2_RTS2_MARK, PORT234_FN2), | ||
940 | PINMUX_DATA(PORT234_FSIAOSLD_MARK, PORT234_FN3), | ||
941 | PINMUX_DATA(MSIOF1_RSYNC_MARK, PORT235_FN1), | ||
942 | PINMUX_DATA(OPORT0_MARK, PORT235_FN2), | ||
943 | PINMUX_DATA(MFG1_IN2_MARK, PORT235_FN3), | ||
944 | PINMUX_DATA(PORT235_FSIAILR_MARK, PORT235_FN4), | ||
945 | PINMUX_DATA(MSIOF1_MCK0_MARK, PORT236_FN1), | ||
946 | PINMUX_DATA(I2C_SDA2_MARK, PORT236_FN2), | ||
947 | PINMUX_DATA(PORT236_FSIAIBT_MARK, PORT236_FN3), | ||
948 | PINMUX_DATA(MSIOF1_MCK1_MARK, PORT237_FN1), | ||
949 | PINMUX_DATA(I2C_SCL2_MARK, PORT237_FN2), | ||
950 | PINMUX_DATA(PORT237_FSIAISLD_MARK, PORT237_FN3), | ||
951 | PINMUX_DATA(MSIOF1_SS1_MARK, PORT238_FN1), | ||
952 | PINMUX_DATA(EDBGREQ3_MARK, PORT238_FN2), | ||
953 | |||
954 | /* 55-5 (FN) */ | ||
955 | PINMUX_DATA(MSIOF1_SS2_MARK, PORT239_FN1), | ||
956 | PINMUX_DATA(SCIFA6_TXD_MARK, PORT240_FN1), | ||
957 | PINMUX_DATA(PORT241_IRDA_OUT_MARK, PORT241_FN1), | ||
958 | PINMUX_DATA(PORT241_IROUT_MARK, PORT241_FN2), | ||
959 | PINMUX_DATA(MFG4_OUT1_MARK, PORT241_FN3), | ||
960 | PINMUX_DATA(TPU4TO0_MARK, PORT241_FN4), | ||
961 | PINMUX_DATA(PORT242_IRDA_IN_MARK, PORT242_FN1), | ||
962 | PINMUX_DATA(MFG4_IN2_MARK, PORT242_FN2), | ||
963 | PINMUX_DATA(PORT243_IRDA_FIRSEL_MARK, PORT243_FN1), | ||
964 | PINMUX_DATA(PORT243_VIO_CKO2_MARK, PORT243_FN2), | ||
965 | PINMUX_DATA(PORT244_SCIFA5_CTS_MARK, PORT244_FN1), | ||
966 | PINMUX_DATA(MFG2_IN1_MARK, PORT244_FN2), | ||
967 | PINMUX_DATA(PORT244_SCIFB_CTS_MARK, PORT244_FN3), | ||
968 | PINMUX_DATA(PORT245_SCIFA5_RTS_MARK, PORT245_FN1), | ||
969 | PINMUX_DATA(MFG2_IN2_MARK, PORT245_FN2), | ||
970 | PINMUX_DATA(PORT245_SCIFB_RTS_MARK, PORT245_FN3), | ||
971 | PINMUX_DATA(PORT246_SCIFA5_RXD_MARK, PORT246_FN1), | ||
972 | PINMUX_DATA(MFG1_OUT1_MARK, PORT246_FN2), | ||
973 | PINMUX_DATA(PORT246_SCIFB_RXD_MARK, PORT246_FN3), | ||
974 | PINMUX_DATA(TPU1TO0_MARK, PORT246_FN4), | ||
975 | PINMUX_DATA(PORT247_SCIFA5_TXD_MARK, PORT247_FN1), | ||
976 | PINMUX_DATA(MFG3_OUT2_MARK, PORT247_FN2), | ||
977 | PINMUX_DATA(PORT247_SCIFB_TXD_MARK, PORT247_FN3), | ||
978 | PINMUX_DATA(TPU3TO1_MARK, PORT247_FN4), | ||
979 | PINMUX_DATA(PORT248_SCIFA5_SCK_MARK, PORT248_FN1), | ||
980 | PINMUX_DATA(MFG2_OUT1_MARK, PORT248_FN2), | ||
981 | PINMUX_DATA(PORT248_SCIFB_SCK_MARK, PORT248_FN3), | ||
982 | PINMUX_DATA(TPU2TO0_MARK, PORT248_FN4), | ||
983 | PINMUX_DATA(PORT249_IROUT_MARK, PORT249_FN1), | ||
984 | PINMUX_DATA(MFG4_IN1_MARK, PORT249_FN2), | ||
985 | PINMUX_DATA(SDHICLK0_MARK, PORT250_FN1), | ||
986 | PINMUX_DATA(TCK2_SWCLK_MC0_MARK, PORT250_FN2), | ||
987 | PINMUX_DATA(SDHICD0_MARK, PORT251_FN1), | ||
988 | PINMUX_DATA(SDHID0_0_MARK, PORT252_FN1), | ||
989 | PINMUX_DATA(TMS2_SWDIO_MC0_MARK, PORT252_FN2), | ||
990 | PINMUX_DATA(SDHID0_1_MARK, PORT253_FN1), | ||
991 | PINMUX_DATA(TDO2_SWO0_MC0_MARK, PORT253_FN2), | ||
992 | PINMUX_DATA(SDHID0_2_MARK, PORT254_FN1), | ||
993 | PINMUX_DATA(TDI2_MARK, PORT254_FN2), | ||
994 | PINMUX_DATA(SDHID0_3_MARK, PORT255_FN1), | ||
995 | PINMUX_DATA(RTCK2_SWO1_MC0_MARK, PORT255_FN2), | ||
996 | PINMUX_DATA(SDHICMD0_MARK, PORT256_FN1), | ||
997 | PINMUX_DATA(TRST2_MARK, PORT256_FN2), | ||
998 | PINMUX_DATA(SDHIWP0_MARK, PORT257_FN1), | ||
999 | PINMUX_DATA(EDBGREQ2_MARK, PORT257_FN2), | ||
1000 | PINMUX_DATA(SDHICLK1_MARK, PORT258_FN1), | ||
1001 | PINMUX_DATA(TCK3_SWCLK_MC1_MARK, PORT258_FN2), | ||
1002 | PINMUX_DATA(SDHID1_0_MARK, PORT259_FN1), | ||
1003 | PINMUX_DATA(M11_SLCD_SO2_MARK, PORT259_FN2), | ||
1004 | PINMUX_DATA(TS_SPSYNC2_MARK, PORT259_FN3), | ||
1005 | PINMUX_DATA(TMS3_SWDIO_MC1_MARK, PORT259_FN4), | ||
1006 | PINMUX_DATA(SDHID1_1_MARK, PORT260_FN1), | ||
1007 | PINMUX_DATA(M9_SLCD_A02_MARK, PORT260_FN2), | ||
1008 | PINMUX_DATA(TS_SDAT2_MARK, PORT260_FN3), | ||
1009 | PINMUX_DATA(TDO3_SWO0_MC1_MARK, PORT260_FN4), | ||
1010 | PINMUX_DATA(SDHID1_2_MARK, PORT261_FN1), | ||
1011 | PINMUX_DATA(M10_SLCD_CK2_MARK, PORT261_FN2), | ||
1012 | PINMUX_DATA(TS_SDEN2_MARK, PORT261_FN3), | ||
1013 | PINMUX_DATA(TDI3_MARK, PORT261_FN4), | ||
1014 | PINMUX_DATA(SDHID1_3_MARK, PORT262_FN1), | ||
1015 | PINMUX_DATA(M12_SLCD_CE2_MARK, PORT262_FN2), | ||
1016 | PINMUX_DATA(TS_SCK2_MARK, PORT262_FN3), | ||
1017 | PINMUX_DATA(RTCK3_SWO1_MC1_MARK, PORT262_FN4), | ||
1018 | PINMUX_DATA(SDHICMD1_MARK, PORT263_FN1), | ||
1019 | PINMUX_DATA(TRST3_MARK, PORT263_FN2), | ||
1020 | PINMUX_DATA(RESETOUTS_MARK, PORT264_FN1), | ||
1021 | }; | ||
1022 | |||
1023 | static struct pinmux_gpio pinmux_gpios[] = { | ||
1024 | /* 55-1 -> 55-5 (GPIO) */ | ||
1025 | GPIO_PORT_ALL(), | ||
1026 | |||
1027 | /* Special Pull-up / Pull-down Functions */ | ||
1028 | GPIO_FN(PORT66_KEYIN0_PU), GPIO_FN(PORT67_KEYIN1_PU), | ||
1029 | GPIO_FN(PORT68_KEYIN2_PU), GPIO_FN(PORT69_KEYIN3_PU), | ||
1030 | GPIO_FN(PORT70_KEYIN4_PU), GPIO_FN(PORT71_KEYIN5_PU), | ||
1031 | GPIO_FN(PORT72_KEYIN6_PU), | ||
1032 | |||
1033 | /* 55-1 (FN) */ | ||
1034 | GPIO_FN(VBUS_0), | ||
1035 | GPIO_FN(CPORT0), | ||
1036 | GPIO_FN(CPORT1), | ||
1037 | GPIO_FN(CPORT2), | ||
1038 | GPIO_FN(CPORT3), | ||
1039 | GPIO_FN(CPORT4), | ||
1040 | GPIO_FN(CPORT5), | ||
1041 | GPIO_FN(CPORT6), | ||
1042 | GPIO_FN(CPORT7), | ||
1043 | GPIO_FN(CPORT8), | ||
1044 | GPIO_FN(CPORT9), | ||
1045 | GPIO_FN(CPORT10), | ||
1046 | GPIO_FN(CPORT11), GPIO_FN(SIN2), | ||
1047 | GPIO_FN(CPORT12), GPIO_FN(XCTS2), | ||
1048 | GPIO_FN(CPORT13), GPIO_FN(RFSPO4), | ||
1049 | GPIO_FN(CPORT14), GPIO_FN(RFSPO5), | ||
1050 | GPIO_FN(CPORT15), GPIO_FN(SCIFA0_SCK), GPIO_FN(GPS_AGC2), | ||
1051 | GPIO_FN(CPORT16), GPIO_FN(SCIFA0_TXD), GPIO_FN(GPS_AGC3), | ||
1052 | GPIO_FN(CPORT17_IC_OE), GPIO_FN(SOUT2), | ||
1053 | GPIO_FN(CPORT18), GPIO_FN(XRTS2), GPIO_FN(PORT19_VIO_CKO2), | ||
1054 | GPIO_FN(CPORT19_MPORT1), | ||
1055 | GPIO_FN(CPORT20), GPIO_FN(RFSPO6), | ||
1056 | GPIO_FN(CPORT21), GPIO_FN(STATUS0), | ||
1057 | GPIO_FN(CPORT22), GPIO_FN(STATUS1), | ||
1058 | GPIO_FN(CPORT23), GPIO_FN(STATUS2), GPIO_FN(RFSPO7), | ||
1059 | GPIO_FN(B_SYNLD1), | ||
1060 | GPIO_FN(B_SYNLD2), GPIO_FN(SYSENMSK), | ||
1061 | GPIO_FN(XMAINPS), | ||
1062 | GPIO_FN(XDIVPS), | ||
1063 | GPIO_FN(XIDRST), | ||
1064 | GPIO_FN(IDCLK), GPIO_FN(IC_DP), | ||
1065 | GPIO_FN(IDIO), GPIO_FN(IC_DM), | ||
1066 | GPIO_FN(SOUT1), GPIO_FN(SCIFA4_TXD), GPIO_FN(M02_BERDAT), | ||
1067 | GPIO_FN(SIN1), GPIO_FN(SCIFA4_RXD), GPIO_FN(XWUP), | ||
1068 | GPIO_FN(XRTS1), GPIO_FN(SCIFA4_RTS), GPIO_FN(M03_BERCLK), | ||
1069 | GPIO_FN(XCTS1), GPIO_FN(SCIFA4_CTS), | ||
1070 | GPIO_FN(PCMCLKO), | ||
1071 | GPIO_FN(SYNC8KO), | ||
1072 | |||
1073 | /* 55-2 (FN) */ | ||
1074 | GPIO_FN(DNPCM_A), | ||
1075 | GPIO_FN(UPPCM_A), | ||
1076 | GPIO_FN(VACK), | ||
1077 | GPIO_FN(XTALB1L), | ||
1078 | GPIO_FN(GPS_AGC1), GPIO_FN(SCIFA0_RTS), | ||
1079 | GPIO_FN(GPS_AGC4), GPIO_FN(SCIFA0_RXD), | ||
1080 | GPIO_FN(GPS_PWRDOWN), GPIO_FN(SCIFA0_CTS), | ||
1081 | GPIO_FN(GPS_IM), | ||
1082 | GPIO_FN(GPS_IS), | ||
1083 | GPIO_FN(GPS_QM), | ||
1084 | GPIO_FN(GPS_QS), | ||
1085 | GPIO_FN(FMSOCK), GPIO_FN(PORT49_IRDA_OUT), GPIO_FN(PORT49_IROUT), | ||
1086 | GPIO_FN(FMSOOLR), GPIO_FN(BBIF2_TSYNC2), GPIO_FN(TPU2TO2), | ||
1087 | GPIO_FN(IPORT3), GPIO_FN(FMSIOLR), | ||
1088 | GPIO_FN(FMSOOBT), GPIO_FN(BBIF2_TSCK2), GPIO_FN(TPU2TO3), | ||
1089 | GPIO_FN(OPORT1), GPIO_FN(FMSIOBT), | ||
1090 | GPIO_FN(FMSOSLD), GPIO_FN(BBIF2_TXD2), GPIO_FN(OPORT2), | ||
1091 | GPIO_FN(FMSOILR), GPIO_FN(PORT53_IRDA_IN), GPIO_FN(TPU3TO3), | ||
1092 | GPIO_FN(OPORT3), GPIO_FN(FMSIILR), | ||
1093 | GPIO_FN(FMSOIBT), GPIO_FN(PORT54_IRDA_FIRSEL), GPIO_FN(TPU3TO2), | ||
1094 | GPIO_FN(FMSIIBT), | ||
1095 | GPIO_FN(FMSISLD), GPIO_FN(MFG0_OUT1), GPIO_FN(TPU0TO0), | ||
1096 | GPIO_FN(A0_EA0), GPIO_FN(BS), | ||
1097 | GPIO_FN(A12_EA12), GPIO_FN(PORT58_VIO_CKOR), GPIO_FN(TPU4TO2), | ||
1098 | GPIO_FN(A13_EA13), GPIO_FN(PORT59_IROUT), GPIO_FN(MFG0_OUT2), | ||
1099 | GPIO_FN(TPU0TO1), | ||
1100 | GPIO_FN(A14_EA14), GPIO_FN(PORT60_KEYOUT5), | ||
1101 | GPIO_FN(A15_EA15), GPIO_FN(PORT61_KEYOUT4), | ||
1102 | GPIO_FN(A16_EA16), GPIO_FN(PORT62_KEYOUT3), GPIO_FN(MSIOF0_SS1), | ||
1103 | GPIO_FN(A17_EA17), GPIO_FN(PORT63_KEYOUT2), GPIO_FN(MSIOF0_TSYNC), | ||
1104 | GPIO_FN(A18_EA18), GPIO_FN(PORT64_KEYOUT1), GPIO_FN(MSIOF0_TSCK), | ||
1105 | GPIO_FN(A19_EA19), GPIO_FN(PORT65_KEYOUT0), GPIO_FN(MSIOF0_TXD), | ||
1106 | GPIO_FN(A20_EA20), GPIO_FN(PORT66_KEYIN0), GPIO_FN(MSIOF0_RSCK), | ||
1107 | GPIO_FN(A21_EA21), GPIO_FN(PORT67_KEYIN1), GPIO_FN(MSIOF0_RSYNC), | ||
1108 | GPIO_FN(A22_EA22), GPIO_FN(PORT68_KEYIN2), GPIO_FN(MSIOF0_MCK0), | ||
1109 | GPIO_FN(A23_EA23), GPIO_FN(PORT69_KEYIN3), GPIO_FN(MSIOF0_MCK1), | ||
1110 | GPIO_FN(A24_EA24), GPIO_FN(PORT70_KEYIN4), GPIO_FN(MSIOF0_RXD), | ||
1111 | GPIO_FN(A25_EA25), GPIO_FN(PORT71_KEYIN5), GPIO_FN(MSIOF0_SS2), | ||
1112 | GPIO_FN(A26), GPIO_FN(PORT72_KEYIN6), | ||
1113 | GPIO_FN(D0_ED0_NAF0), | ||
1114 | GPIO_FN(D1_ED1_NAF1), | ||
1115 | GPIO_FN(D2_ED2_NAF2), | ||
1116 | GPIO_FN(D3_ED3_NAF3), | ||
1117 | GPIO_FN(D4_ED4_NAF4), | ||
1118 | GPIO_FN(D5_ED5_NAF5), | ||
1119 | GPIO_FN(D6_ED6_NAF6), | ||
1120 | GPIO_FN(D7_ED7_NAF7), | ||
1121 | GPIO_FN(D8_ED8_NAF8), | ||
1122 | GPIO_FN(D9_ED9_NAF9), | ||
1123 | GPIO_FN(D10_ED10_NAF10), | ||
1124 | GPIO_FN(D11_ED11_NAF11), | ||
1125 | GPIO_FN(D12_ED12_NAF12), | ||
1126 | GPIO_FN(D13_ED13_NAF13), | ||
1127 | GPIO_FN(D14_ED14_NAF14), | ||
1128 | GPIO_FN(D15_ED15_NAF15), | ||
1129 | GPIO_FN(CS4), | ||
1130 | GPIO_FN(CS5A), GPIO_FN(FMSICK), | ||
1131 | |||
1132 | /* 55-3 (FN) */ | ||
1133 | GPIO_FN(CS5B), GPIO_FN(FCE1), | ||
1134 | GPIO_FN(CS6B), GPIO_FN(XCS2), GPIO_FN(CS6A), GPIO_FN(DACK0), | ||
1135 | GPIO_FN(FCE0), | ||
1136 | GPIO_FN(WAIT), GPIO_FN(DREQ0), | ||
1137 | GPIO_FN(RD_XRD), | ||
1138 | GPIO_FN(WE0_XWR0_FWE), | ||
1139 | GPIO_FN(WE1_XWR1), | ||
1140 | GPIO_FN(FRB), | ||
1141 | GPIO_FN(CKO), | ||
1142 | GPIO_FN(NBRSTOUT), | ||
1143 | GPIO_FN(NBRST), | ||
1144 | GPIO_FN(GPS_EPPSIN), | ||
1145 | GPIO_FN(LATCHPULSE), | ||
1146 | GPIO_FN(LTESIGNAL), | ||
1147 | GPIO_FN(LEGACYSTATE), | ||
1148 | GPIO_FN(TCKON), | ||
1149 | GPIO_FN(VIO_VD), GPIO_FN(PORT128_KEYOUT0), GPIO_FN(IPORT0), | ||
1150 | GPIO_FN(VIO_HD), GPIO_FN(PORT129_KEYOUT1), GPIO_FN(IPORT1), | ||
1151 | GPIO_FN(VIO_D0), GPIO_FN(PORT130_KEYOUT2), GPIO_FN(PORT130_MSIOF2_RXD), | ||
1152 | GPIO_FN(VIO_D1), GPIO_FN(PORT131_KEYOUT3), GPIO_FN(PORT131_MSIOF2_SS1), | ||
1153 | GPIO_FN(VIO_D2), GPIO_FN(PORT132_KEYOUT4), GPIO_FN(PORT132_MSIOF2_SS2), | ||
1154 | GPIO_FN(VIO_D3), GPIO_FN(PORT133_KEYOUT5), | ||
1155 | GPIO_FN(PORT133_MSIOF2_TSYNC), | ||
1156 | GPIO_FN(VIO_D4), GPIO_FN(PORT134_KEYIN0), GPIO_FN(PORT134_MSIOF2_TXD), | ||
1157 | GPIO_FN(VIO_D5), GPIO_FN(PORT135_KEYIN1), GPIO_FN(PORT135_MSIOF2_TSCK), | ||
1158 | GPIO_FN(VIO_D6), GPIO_FN(PORT136_KEYIN2), | ||
1159 | GPIO_FN(VIO_D7), GPIO_FN(PORT137_KEYIN3), | ||
1160 | GPIO_FN(VIO_D8), GPIO_FN(M9_SLCD_A01), GPIO_FN(PORT138_FSIAOMC), | ||
1161 | GPIO_FN(VIO_D9), GPIO_FN(M10_SLCD_CK1), GPIO_FN(PORT139_FSIAOLR), | ||
1162 | GPIO_FN(VIO_D10), GPIO_FN(M11_SLCD_SO1), GPIO_FN(TPU0TO2), | ||
1163 | GPIO_FN(PORT140_FSIAOBT), | ||
1164 | GPIO_FN(VIO_D11), GPIO_FN(M12_SLCD_CE1), GPIO_FN(TPU0TO3), | ||
1165 | GPIO_FN(PORT141_FSIAOSLD), | ||
1166 | GPIO_FN(VIO_D12), GPIO_FN(M13_BSW), GPIO_FN(PORT142_FSIACK), | ||
1167 | GPIO_FN(VIO_D13), GPIO_FN(M14_GSW), GPIO_FN(PORT143_FSIAILR), | ||
1168 | GPIO_FN(VIO_D14), GPIO_FN(M15_RSW), GPIO_FN(PORT144_FSIAIBT), | ||
1169 | GPIO_FN(VIO_D15), GPIO_FN(TPU1TO3), GPIO_FN(PORT145_FSIAISLD), | ||
1170 | GPIO_FN(VIO_CLK), GPIO_FN(PORT146_KEYIN4), GPIO_FN(IPORT2), | ||
1171 | GPIO_FN(VIO_FIELD), GPIO_FN(PORT147_KEYIN5), | ||
1172 | GPIO_FN(VIO_CKO), GPIO_FN(PORT148_KEYIN6), | ||
1173 | GPIO_FN(A27), GPIO_FN(RDWR_XWE), GPIO_FN(MFG0_IN1), | ||
1174 | GPIO_FN(MFG0_IN2), | ||
1175 | GPIO_FN(TS_SPSYNC3), GPIO_FN(MSIOF2_RSCK), | ||
1176 | GPIO_FN(TS_SDAT3), GPIO_FN(MSIOF2_RSYNC), | ||
1177 | GPIO_FN(TPU1TO2), GPIO_FN(TS_SDEN3), GPIO_FN(PORT153_MSIOF2_SS1), | ||
1178 | GPIO_FN(SOUT3), GPIO_FN(SCIFA2_TXD1), GPIO_FN(MSIOF2_MCK0), | ||
1179 | GPIO_FN(SIN3), GPIO_FN(SCIFA2_RXD1), GPIO_FN(MSIOF2_MCK1), | ||
1180 | GPIO_FN(XRTS3), GPIO_FN(SCIFA2_RTS1), GPIO_FN(PORT156_MSIOF2_SS2), | ||
1181 | GPIO_FN(XCTS3), GPIO_FN(SCIFA2_CTS1), GPIO_FN(PORT157_MSIOF2_RXD), | ||
1182 | |||
1183 | /* 55-4 (FN) */ | ||
1184 | GPIO_FN(DINT), GPIO_FN(SCIFA2_SCK1), GPIO_FN(TS_SCK3), | ||
1185 | GPIO_FN(PORT159_SCIFB_SCK), GPIO_FN(PORT159_SCIFA5_SCK), GPIO_FN(NMI), | ||
1186 | GPIO_FN(PORT160_SCIFB_TXD), GPIO_FN(PORT160_SCIFA5_TXD), GPIO_FN(SOUT0), | ||
1187 | GPIO_FN(PORT161_SCIFB_CTS), GPIO_FN(PORT161_SCIFA5_CTS), GPIO_FN(XCTS0), | ||
1188 | GPIO_FN(MFG3_IN2), | ||
1189 | GPIO_FN(PORT162_SCIFB_RXD), GPIO_FN(PORT162_SCIFA5_RXD), GPIO_FN(SIN0), | ||
1190 | GPIO_FN(MFG3_IN1), | ||
1191 | GPIO_FN(PORT163_SCIFB_RTS), GPIO_FN(PORT163_SCIFA5_RTS), GPIO_FN(XRTS0), | ||
1192 | GPIO_FN(MFG3_OUT1), GPIO_FN(TPU3TO0), | ||
1193 | GPIO_FN(LCDD0), GPIO_FN(PORT192_KEYOUT0), GPIO_FN(EXT_CKI), | ||
1194 | GPIO_FN(LCDD1), GPIO_FN(PORT193_KEYOUT1), GPIO_FN(PORT193_SCIFA5_CTS), | ||
1195 | GPIO_FN(BBIF2_TSYNC1), | ||
1196 | GPIO_FN(LCDD2), GPIO_FN(PORT194_KEYOUT2), GPIO_FN(PORT194_SCIFA5_RTS), | ||
1197 | GPIO_FN(BBIF2_TSCK1), | ||
1198 | GPIO_FN(LCDD3), GPIO_FN(PORT195_KEYOUT3), GPIO_FN(PORT195_SCIFA5_RXD), | ||
1199 | GPIO_FN(BBIF2_TXD1), | ||
1200 | GPIO_FN(LCDD4), GPIO_FN(PORT196_KEYOUT4), GPIO_FN(PORT196_SCIFA5_TXD), | ||
1201 | GPIO_FN(LCDD5), GPIO_FN(PORT197_KEYOUT5), GPIO_FN(PORT197_SCIFA5_SCK), | ||
1202 | GPIO_FN(MFG2_OUT2), | ||
1203 | GPIO_FN(LCDD6), | ||
1204 | GPIO_FN(LCDD7), GPIO_FN(TPU4TO1), GPIO_FN(MFG4_OUT2), | ||
1205 | GPIO_FN(LCDD8), GPIO_FN(PORT200_KEYIN0), GPIO_FN(VIO_DR0), | ||
1206 | GPIO_FN(D16), | ||
1207 | GPIO_FN(LCDD9), GPIO_FN(PORT201_KEYIN1), GPIO_FN(VIO_DR1), | ||
1208 | GPIO_FN(D17), | ||
1209 | GPIO_FN(LCDD10), GPIO_FN(PORT202_KEYIN2), GPIO_FN(VIO_DR2), | ||
1210 | GPIO_FN(D18), | ||
1211 | GPIO_FN(LCDD11), GPIO_FN(PORT203_KEYIN3), GPIO_FN(VIO_DR3), | ||
1212 | GPIO_FN(D19), | ||
1213 | GPIO_FN(LCDD12), GPIO_FN(PORT204_KEYIN4), GPIO_FN(VIO_DR4), | ||
1214 | GPIO_FN(D20), | ||
1215 | GPIO_FN(LCDD13), GPIO_FN(PORT205_KEYIN5), GPIO_FN(VIO_DR5), | ||
1216 | GPIO_FN(D21), | ||
1217 | GPIO_FN(LCDD14), GPIO_FN(PORT206_KEYIN6), GPIO_FN(VIO_DR6), | ||
1218 | GPIO_FN(D22), | ||
1219 | GPIO_FN(LCDD15), GPIO_FN(PORT207_MSIOF0L_SS1), GPIO_FN(PORT207_KEYOUT0), | ||
1220 | GPIO_FN(VIO_DR7), GPIO_FN(D23), | ||
1221 | GPIO_FN(LCDD16), GPIO_FN(PORT208_MSIOF0L_SS2), GPIO_FN(PORT208_KEYOUT1), | ||
1222 | GPIO_FN(VIO_VDR), GPIO_FN(D24), | ||
1223 | GPIO_FN(LCDD17), GPIO_FN(PORT209_KEYOUT2), GPIO_FN(VIO_HDR), | ||
1224 | GPIO_FN(D25), | ||
1225 | GPIO_FN(LCDD18), GPIO_FN(DREQ2), GPIO_FN(PORT210_MSIOF0L_SS1), | ||
1226 | GPIO_FN(D26), | ||
1227 | GPIO_FN(LCDD19), GPIO_FN(PORT211_MSIOF0L_SS2), GPIO_FN(D27), | ||
1228 | GPIO_FN(LCDD20), GPIO_FN(TS_SPSYNC1), GPIO_FN(MSIOF0L_MCK0), | ||
1229 | GPIO_FN(D28), | ||
1230 | GPIO_FN(LCDD21), GPIO_FN(TS_SDAT1), GPIO_FN(MSIOF0L_MCK1), | ||
1231 | GPIO_FN(D29), | ||
1232 | GPIO_FN(LCDD22), GPIO_FN(TS_SDEN1), GPIO_FN(MSIOF0L_RSCK), | ||
1233 | GPIO_FN(D30), | ||
1234 | GPIO_FN(LCDD23), GPIO_FN(TS_SCK1), GPIO_FN(MSIOF0L_RSYNC), | ||
1235 | GPIO_FN(D31), | ||
1236 | GPIO_FN(LCDDCK), GPIO_FN(LCDWR), GPIO_FN(PORT216_KEYOUT3), | ||
1237 | GPIO_FN(VIO_CLKR), | ||
1238 | GPIO_FN(LCDRD), GPIO_FN(DACK2), GPIO_FN(MSIOF0L_TSYNC), | ||
1239 | GPIO_FN(LCDHSYN), GPIO_FN(LCDCS), GPIO_FN(LCDCS2), GPIO_FN(DACK3), | ||
1240 | GPIO_FN(PORT218_VIO_CKOR), GPIO_FN(PORT218_KEYOUT4), | ||
1241 | GPIO_FN(LCDDISP), GPIO_FN(LCDRS), GPIO_FN(DREQ3), GPIO_FN(MSIOF0L_TSCK), | ||
1242 | GPIO_FN(LCDVSYN), GPIO_FN(LCDVSYN2), GPIO_FN(PORT220_KEYOUT5), | ||
1243 | GPIO_FN(LCDLCLK), GPIO_FN(DREQ1), GPIO_FN(PWEN), GPIO_FN(MSIOF0L_RXD), | ||
1244 | GPIO_FN(LCDDON), GPIO_FN(LCDDON2), GPIO_FN(DACK1), GPIO_FN(OVCN), | ||
1245 | GPIO_FN(MSIOF0L_TXD), | ||
1246 | GPIO_FN(SCIFA1_TXD), GPIO_FN(OVCN2), | ||
1247 | GPIO_FN(EXTLP), GPIO_FN(SCIFA1_SCK), GPIO_FN(USBTERM), | ||
1248 | GPIO_FN(PORT226_VIO_CKO2), | ||
1249 | GPIO_FN(SCIFA1_RTS), GPIO_FN(IDIN), | ||
1250 | GPIO_FN(SCIFA1_RXD), | ||
1251 | GPIO_FN(SCIFA1_CTS), GPIO_FN(MFG1_IN1), | ||
1252 | GPIO_FN(MSIOF1_TXD), GPIO_FN(SCIFA2_TXD2), GPIO_FN(PORT230_FSIAOMC), | ||
1253 | GPIO_FN(MSIOF1_TSYNC), GPIO_FN(SCIFA2_CTS2), GPIO_FN(PORT231_FSIAOLR), | ||
1254 | GPIO_FN(MSIOF1_TSCK), GPIO_FN(SCIFA2_SCK2), GPIO_FN(PORT232_FSIAOBT), | ||
1255 | GPIO_FN(MSIOF1_RXD), GPIO_FN(SCIFA2_RXD2), GPIO_FN(GPS_VCOTRIG), | ||
1256 | GPIO_FN(PORT233_FSIACK), | ||
1257 | GPIO_FN(MSIOF1_RSCK), GPIO_FN(SCIFA2_RTS2), GPIO_FN(PORT234_FSIAOSLD), | ||
1258 | GPIO_FN(MSIOF1_RSYNC), GPIO_FN(OPORT0), GPIO_FN(MFG1_IN2), | ||
1259 | GPIO_FN(PORT235_FSIAILR), | ||
1260 | GPIO_FN(MSIOF1_MCK0), GPIO_FN(I2C_SDA2), GPIO_FN(PORT236_FSIAIBT), | ||
1261 | GPIO_FN(MSIOF1_MCK1), GPIO_FN(I2C_SCL2), GPIO_FN(PORT237_FSIAISLD), | ||
1262 | GPIO_FN(MSIOF1_SS1), GPIO_FN(EDBGREQ3), | ||
1263 | |||
1264 | /* 55-5 (FN) */ | ||
1265 | GPIO_FN(MSIOF1_SS2), | ||
1266 | GPIO_FN(SCIFA6_TXD), | ||
1267 | GPIO_FN(PORT241_IRDA_OUT), GPIO_FN(PORT241_IROUT), GPIO_FN(MFG4_OUT1), | ||
1268 | GPIO_FN(TPU4TO0), | ||
1269 | GPIO_FN(PORT242_IRDA_IN), GPIO_FN(MFG4_IN2), | ||
1270 | GPIO_FN(PORT243_IRDA_FIRSEL), GPIO_FN(PORT243_VIO_CKO2), | ||
1271 | GPIO_FN(PORT244_SCIFA5_CTS), GPIO_FN(MFG2_IN1), | ||
1272 | GPIO_FN(PORT244_SCIFB_CTS), | ||
1273 | GPIO_FN(PORT245_SCIFA5_RTS), GPIO_FN(MFG2_IN2), | ||
1274 | GPIO_FN(PORT245_SCIFB_RTS), | ||
1275 | GPIO_FN(PORT246_SCIFA5_RXD), GPIO_FN(MFG1_OUT1), | ||
1276 | GPIO_FN(PORT246_SCIFB_RXD), GPIO_FN(TPU1TO0), | ||
1277 | GPIO_FN(PORT247_SCIFA5_TXD), GPIO_FN(MFG3_OUT2), | ||
1278 | GPIO_FN(PORT247_SCIFB_TXD), GPIO_FN(TPU3TO1), | ||
1279 | GPIO_FN(PORT248_SCIFA5_SCK), GPIO_FN(MFG2_OUT1), | ||
1280 | GPIO_FN(PORT248_SCIFB_SCK), GPIO_FN(TPU2TO0), | ||
1281 | GPIO_FN(PORT249_IROUT), GPIO_FN(MFG4_IN1), | ||
1282 | GPIO_FN(SDHICLK0), GPIO_FN(TCK2_SWCLK_MC0), | ||
1283 | GPIO_FN(SDHICD0), | ||
1284 | GPIO_FN(SDHID0_0), GPIO_FN(TMS2_SWDIO_MC0), | ||
1285 | GPIO_FN(SDHID0_1), GPIO_FN(TDO2_SWO0_MC0), | ||
1286 | GPIO_FN(SDHID0_2), GPIO_FN(TDI2), | ||
1287 | GPIO_FN(SDHID0_3), GPIO_FN(RTCK2_SWO1_MC0), | ||
1288 | GPIO_FN(SDHICMD0), GPIO_FN(TRST2), | ||
1289 | GPIO_FN(SDHIWP0), GPIO_FN(EDBGREQ2), | ||
1290 | GPIO_FN(SDHICLK1), GPIO_FN(TCK3_SWCLK_MC1), | ||
1291 | GPIO_FN(SDHID1_0), GPIO_FN(M11_SLCD_SO2), GPIO_FN(TS_SPSYNC2), | ||
1292 | GPIO_FN(TMS3_SWDIO_MC1), | ||
1293 | GPIO_FN(SDHID1_1), GPIO_FN(M9_SLCD_A02), GPIO_FN(TS_SDAT2), | ||
1294 | GPIO_FN(TDO3_SWO0_MC1), | ||
1295 | GPIO_FN(SDHID1_2), GPIO_FN(M10_SLCD_CK2), GPIO_FN(TS_SDEN2), | ||
1296 | GPIO_FN(TDI3), | ||
1297 | GPIO_FN(SDHID1_3), GPIO_FN(M12_SLCD_CE2), GPIO_FN(TS_SCK2), | ||
1298 | GPIO_FN(RTCK3_SWO1_MC1), | ||
1299 | GPIO_FN(SDHICMD1), GPIO_FN(TRST3), | ||
1300 | GPIO_FN(RESETOUTS), | ||
1301 | }; | ||
1302 | |||
1303 | static struct pinmux_cfg_reg pinmux_config_regs[] = { | ||
1304 | PORTCR(0, 0xe6050000), /* PORT0CR */ | ||
1305 | PORTCR(1, 0xe6050001), /* PORT1CR */ | ||
1306 | PORTCR(2, 0xe6050002), /* PORT2CR */ | ||
1307 | PORTCR(3, 0xe6050003), /* PORT3CR */ | ||
1308 | PORTCR(4, 0xe6050004), /* PORT4CR */ | ||
1309 | PORTCR(5, 0xe6050005), /* PORT5CR */ | ||
1310 | PORTCR(6, 0xe6050006), /* PORT6CR */ | ||
1311 | PORTCR(7, 0xe6050007), /* PORT7CR */ | ||
1312 | PORTCR(8, 0xe6050008), /* PORT8CR */ | ||
1313 | PORTCR(9, 0xe6050009), /* PORT9CR */ | ||
1314 | |||
1315 | PORTCR(10, 0xe605000a), /* PORT10CR */ | ||
1316 | PORTCR(11, 0xe605000b), /* PORT11CR */ | ||
1317 | PORTCR(12, 0xe605000c), /* PORT12CR */ | ||
1318 | PORTCR(13, 0xe605000d), /* PORT13CR */ | ||
1319 | PORTCR(14, 0xe605000e), /* PORT14CR */ | ||
1320 | PORTCR(15, 0xe605000f), /* PORT15CR */ | ||
1321 | PORTCR(16, 0xe6050010), /* PORT16CR */ | ||
1322 | PORTCR(17, 0xe6050011), /* PORT17CR */ | ||
1323 | PORTCR(18, 0xe6050012), /* PORT18CR */ | ||
1324 | PORTCR(19, 0xe6050013), /* PORT19CR */ | ||
1325 | |||
1326 | PORTCR(20, 0xe6050014), /* PORT20CR */ | ||
1327 | PORTCR(21, 0xe6050015), /* PORT21CR */ | ||
1328 | PORTCR(22, 0xe6050016), /* PORT22CR */ | ||
1329 | PORTCR(23, 0xe6050017), /* PORT23CR */ | ||
1330 | PORTCR(24, 0xe6050018), /* PORT24CR */ | ||
1331 | PORTCR(25, 0xe6050019), /* PORT25CR */ | ||
1332 | PORTCR(26, 0xe605001a), /* PORT26CR */ | ||
1333 | PORTCR(27, 0xe605001b), /* PORT27CR */ | ||
1334 | PORTCR(28, 0xe605001c), /* PORT28CR */ | ||
1335 | PORTCR(29, 0xe605001d), /* PORT29CR */ | ||
1336 | |||
1337 | PORTCR(30, 0xe605001e), /* PORT30CR */ | ||
1338 | PORTCR(31, 0xe605001f), /* PORT31CR */ | ||
1339 | PORTCR(32, 0xe6050020), /* PORT32CR */ | ||
1340 | PORTCR(33, 0xe6050021), /* PORT33CR */ | ||
1341 | PORTCR(34, 0xe6050022), /* PORT34CR */ | ||
1342 | PORTCR(35, 0xe6050023), /* PORT35CR */ | ||
1343 | PORTCR(36, 0xe6050024), /* PORT36CR */ | ||
1344 | PORTCR(37, 0xe6050025), /* PORT37CR */ | ||
1345 | PORTCR(38, 0xe6050026), /* PORT38CR */ | ||
1346 | PORTCR(39, 0xe6050027), /* PORT39CR */ | ||
1347 | |||
1348 | PORTCR(40, 0xe6050028), /* PORT40CR */ | ||
1349 | PORTCR(41, 0xe6050029), /* PORT41CR */ | ||
1350 | PORTCR(42, 0xe605002a), /* PORT42CR */ | ||
1351 | PORTCR(43, 0xe605002b), /* PORT43CR */ | ||
1352 | PORTCR(44, 0xe605002c), /* PORT44CR */ | ||
1353 | PORTCR(45, 0xe605002d), /* PORT45CR */ | ||
1354 | PORTCR(46, 0xe605002e), /* PORT46CR */ | ||
1355 | PORTCR(47, 0xe605002f), /* PORT47CR */ | ||
1356 | PORTCR(48, 0xe6050030), /* PORT48CR */ | ||
1357 | PORTCR(49, 0xe6050031), /* PORT49CR */ | ||
1358 | |||
1359 | PORTCR(50, 0xe6050032), /* PORT50CR */ | ||
1360 | PORTCR(51, 0xe6050033), /* PORT51CR */ | ||
1361 | PORTCR(52, 0xe6050034), /* PORT52CR */ | ||
1362 | PORTCR(53, 0xe6050035), /* PORT53CR */ | ||
1363 | PORTCR(54, 0xe6050036), /* PORT54CR */ | ||
1364 | PORTCR(55, 0xe6050037), /* PORT55CR */ | ||
1365 | PORTCR(56, 0xe6050038), /* PORT56CR */ | ||
1366 | PORTCR(57, 0xe6050039), /* PORT57CR */ | ||
1367 | PORTCR(58, 0xe605003a), /* PORT58CR */ | ||
1368 | PORTCR(59, 0xe605003b), /* PORT59CR */ | ||
1369 | |||
1370 | PORTCR(60, 0xe605003c), /* PORT60CR */ | ||
1371 | PORTCR(61, 0xe605003d), /* PORT61CR */ | ||
1372 | PORTCR(62, 0xe605003e), /* PORT62CR */ | ||
1373 | PORTCR(63, 0xe605003f), /* PORT63CR */ | ||
1374 | PORTCR(64, 0xe6050040), /* PORT64CR */ | ||
1375 | PORTCR(65, 0xe6050041), /* PORT65CR */ | ||
1376 | PORTCR(66, 0xe6050042), /* PORT66CR */ | ||
1377 | PORTCR(67, 0xe6050043), /* PORT67CR */ | ||
1378 | PORTCR(68, 0xe6050044), /* PORT68CR */ | ||
1379 | PORTCR(69, 0xe6050045), /* PORT69CR */ | ||
1380 | |||
1381 | PORTCR(70, 0xe6050046), /* PORT70CR */ | ||
1382 | PORTCR(71, 0xe6050047), /* PORT71CR */ | ||
1383 | PORTCR(72, 0xe6050048), /* PORT72CR */ | ||
1384 | PORTCR(73, 0xe6050049), /* PORT73CR */ | ||
1385 | PORTCR(74, 0xe605004a), /* PORT74CR */ | ||
1386 | PORTCR(75, 0xe605004b), /* PORT75CR */ | ||
1387 | PORTCR(76, 0xe605004c), /* PORT76CR */ | ||
1388 | PORTCR(77, 0xe605004d), /* PORT77CR */ | ||
1389 | PORTCR(78, 0xe605004e), /* PORT78CR */ | ||
1390 | PORTCR(79, 0xe605004f), /* PORT79CR */ | ||
1391 | |||
1392 | PORTCR(80, 0xe6050050), /* PORT80CR */ | ||
1393 | PORTCR(81, 0xe6050051), /* PORT81CR */ | ||
1394 | PORTCR(82, 0xe6050052), /* PORT82CR */ | ||
1395 | PORTCR(83, 0xe6050053), /* PORT83CR */ | ||
1396 | PORTCR(84, 0xe6050054), /* PORT84CR */ | ||
1397 | PORTCR(85, 0xe6050055), /* PORT85CR */ | ||
1398 | PORTCR(86, 0xe6050056), /* PORT86CR */ | ||
1399 | PORTCR(87, 0xe6050057), /* PORT87CR */ | ||
1400 | PORTCR(88, 0xe6050058), /* PORT88CR */ | ||
1401 | PORTCR(89, 0xe6050059), /* PORT89CR */ | ||
1402 | |||
1403 | PORTCR(90, 0xe605005a), /* PORT90CR */ | ||
1404 | PORTCR(91, 0xe605005b), /* PORT91CR */ | ||
1405 | PORTCR(92, 0xe605005c), /* PORT92CR */ | ||
1406 | PORTCR(93, 0xe605005d), /* PORT93CR */ | ||
1407 | PORTCR(94, 0xe605005e), /* PORT94CR */ | ||
1408 | PORTCR(95, 0xe605005f), /* PORT95CR */ | ||
1409 | PORTCR(96, 0xe6050060), /* PORT96CR */ | ||
1410 | PORTCR(97, 0xe6050061), /* PORT97CR */ | ||
1411 | PORTCR(98, 0xe6050062), /* PORT98CR */ | ||
1412 | PORTCR(99, 0xe6050063), /* PORT99CR */ | ||
1413 | |||
1414 | PORTCR(100, 0xe6050064), /* PORT100CR */ | ||
1415 | PORTCR(101, 0xe6050065), /* PORT101CR */ | ||
1416 | PORTCR(102, 0xe6050066), /* PORT102CR */ | ||
1417 | PORTCR(103, 0xe6050067), /* PORT103CR */ | ||
1418 | PORTCR(104, 0xe6050068), /* PORT104CR */ | ||
1419 | PORTCR(105, 0xe6050069), /* PORT105CR */ | ||
1420 | PORTCR(106, 0xe605006a), /* PORT106CR */ | ||
1421 | PORTCR(107, 0xe605006b), /* PORT107CR */ | ||
1422 | PORTCR(108, 0xe605006c), /* PORT108CR */ | ||
1423 | PORTCR(109, 0xe605006d), /* PORT109CR */ | ||
1424 | |||
1425 | PORTCR(110, 0xe605006e), /* PORT110CR */ | ||
1426 | PORTCR(111, 0xe605006f), /* PORT111CR */ | ||
1427 | PORTCR(112, 0xe6050070), /* PORT112CR */ | ||
1428 | PORTCR(113, 0xe6050071), /* PORT113CR */ | ||
1429 | PORTCR(114, 0xe6050072), /* PORT114CR */ | ||
1430 | PORTCR(115, 0xe6050073), /* PORT115CR */ | ||
1431 | PORTCR(116, 0xe6050074), /* PORT116CR */ | ||
1432 | PORTCR(117, 0xe6050075), /* PORT117CR */ | ||
1433 | PORTCR(118, 0xe6050076), /* PORT118CR */ | ||
1434 | |||
1435 | PORTCR(128, 0xe6051080), /* PORT128CR */ | ||
1436 | PORTCR(129, 0xe6051081), /* PORT129CR */ | ||
1437 | |||
1438 | PORTCR(130, 0xe6051082), /* PORT130CR */ | ||
1439 | PORTCR(131, 0xe6051083), /* PORT131CR */ | ||
1440 | PORTCR(132, 0xe6051084), /* PORT132CR */ | ||
1441 | PORTCR(133, 0xe6051085), /* PORT133CR */ | ||
1442 | PORTCR(134, 0xe6051086), /* PORT134CR */ | ||
1443 | PORTCR(135, 0xe6051087), /* PORT135CR */ | ||
1444 | PORTCR(136, 0xe6051088), /* PORT136CR */ | ||
1445 | PORTCR(137, 0xe6051089), /* PORT137CR */ | ||
1446 | PORTCR(138, 0xe605108a), /* PORT138CR */ | ||
1447 | PORTCR(139, 0xe605108b), /* PORT139CR */ | ||
1448 | |||
1449 | PORTCR(140, 0xe605108c), /* PORT140CR */ | ||
1450 | PORTCR(141, 0xe605108d), /* PORT141CR */ | ||
1451 | PORTCR(142, 0xe605108e), /* PORT142CR */ | ||
1452 | PORTCR(143, 0xe605108f), /* PORT143CR */ | ||
1453 | PORTCR(144, 0xe6051090), /* PORT144CR */ | ||
1454 | PORTCR(145, 0xe6051091), /* PORT145CR */ | ||
1455 | PORTCR(146, 0xe6051092), /* PORT146CR */ | ||
1456 | PORTCR(147, 0xe6051093), /* PORT147CR */ | ||
1457 | PORTCR(148, 0xe6051094), /* PORT148CR */ | ||
1458 | PORTCR(149, 0xe6051095), /* PORT149CR */ | ||
1459 | |||
1460 | PORTCR(150, 0xe6051096), /* PORT150CR */ | ||
1461 | PORTCR(151, 0xe6051097), /* PORT151CR */ | ||
1462 | PORTCR(152, 0xe6051098), /* PORT152CR */ | ||
1463 | PORTCR(153, 0xe6051099), /* PORT153CR */ | ||
1464 | PORTCR(154, 0xe605109a), /* PORT154CR */ | ||
1465 | PORTCR(155, 0xe605109b), /* PORT155CR */ | ||
1466 | PORTCR(156, 0xe605109c), /* PORT156CR */ | ||
1467 | PORTCR(157, 0xe605109d), /* PORT157CR */ | ||
1468 | PORTCR(158, 0xe605109e), /* PORT158CR */ | ||
1469 | PORTCR(159, 0xe605109f), /* PORT159CR */ | ||
1470 | |||
1471 | PORTCR(160, 0xe60510a0), /* PORT160CR */ | ||
1472 | PORTCR(161, 0xe60510a1), /* PORT161CR */ | ||
1473 | PORTCR(162, 0xe60510a2), /* PORT162CR */ | ||
1474 | PORTCR(163, 0xe60510a3), /* PORT163CR */ | ||
1475 | PORTCR(164, 0xe60510a4), /* PORT164CR */ | ||
1476 | |||
1477 | PORTCR(192, 0xe60520c0), /* PORT192CR */ | ||
1478 | PORTCR(193, 0xe60520c1), /* PORT193CR */ | ||
1479 | PORTCR(194, 0xe60520c2), /* PORT194CR */ | ||
1480 | PORTCR(195, 0xe60520c3), /* PORT195CR */ | ||
1481 | PORTCR(196, 0xe60520c4), /* PORT196CR */ | ||
1482 | PORTCR(197, 0xe60520c5), /* PORT197CR */ | ||
1483 | PORTCR(198, 0xe60520c6), /* PORT198CR */ | ||
1484 | PORTCR(199, 0xe60520c7), /* PORT199CR */ | ||
1485 | |||
1486 | PORTCR(200, 0xe60520c8), /* PORT200CR */ | ||
1487 | PORTCR(201, 0xe60520c9), /* PORT201CR */ | ||
1488 | PORTCR(202, 0xe60520ca), /* PORT202CR */ | ||
1489 | PORTCR(203, 0xe60520cb), /* PORT203CR */ | ||
1490 | PORTCR(204, 0xe60520cc), /* PORT204CR */ | ||
1491 | PORTCR(205, 0xe60520cd), /* PORT205CR */ | ||
1492 | PORTCR(206, 0xe60520ce), /* PORT206CR */ | ||
1493 | PORTCR(207, 0xe60520cf), /* PORT207CR */ | ||
1494 | PORTCR(208, 0xe60520d0), /* PORT208CR */ | ||
1495 | PORTCR(209, 0xe60520d1), /* PORT209CR */ | ||
1496 | |||
1497 | PORTCR(210, 0xe60520d2), /* PORT210CR */ | ||
1498 | PORTCR(211, 0xe60520d3), /* PORT211CR */ | ||
1499 | PORTCR(212, 0xe60520d4), /* PORT212CR */ | ||
1500 | PORTCR(213, 0xe60520d5), /* PORT213CR */ | ||
1501 | PORTCR(214, 0xe60520d6), /* PORT214CR */ | ||
1502 | PORTCR(215, 0xe60520d7), /* PORT215CR */ | ||
1503 | PORTCR(216, 0xe60520d8), /* PORT216CR */ | ||
1504 | PORTCR(217, 0xe60520d9), /* PORT217CR */ | ||
1505 | PORTCR(218, 0xe60520da), /* PORT218CR */ | ||
1506 | PORTCR(219, 0xe60520db), /* PORT219CR */ | ||
1507 | |||
1508 | PORTCR(220, 0xe60520dc), /* PORT220CR */ | ||
1509 | PORTCR(221, 0xe60520dd), /* PORT221CR */ | ||
1510 | PORTCR(222, 0xe60520de), /* PORT222CR */ | ||
1511 | PORTCR(223, 0xe60520df), /* PORT223CR */ | ||
1512 | PORTCR(224, 0xe60520e0), /* PORT224CR */ | ||
1513 | PORTCR(225, 0xe60520e1), /* PORT225CR */ | ||
1514 | PORTCR(226, 0xe60520e2), /* PORT226CR */ | ||
1515 | PORTCR(227, 0xe60520e3), /* PORT227CR */ | ||
1516 | PORTCR(228, 0xe60520e4), /* PORT228CR */ | ||
1517 | PORTCR(229, 0xe60520e5), /* PORT229CR */ | ||
1518 | |||
1519 | PORTCR(230, 0xe60520e6), /* PORT230CR */ | ||
1520 | PORTCR(231, 0xe60520e7), /* PORT231CR */ | ||
1521 | PORTCR(232, 0xe60520e8), /* PORT232CR */ | ||
1522 | PORTCR(233, 0xe60520e9), /* PORT233CR */ | ||
1523 | PORTCR(234, 0xe60520ea), /* PORT234CR */ | ||
1524 | PORTCR(235, 0xe60520eb), /* PORT235CR */ | ||
1525 | PORTCR(236, 0xe60520ec), /* PORT236CR */ | ||
1526 | PORTCR(237, 0xe60520ed), /* PORT237CR */ | ||
1527 | PORTCR(238, 0xe60520ee), /* PORT238CR */ | ||
1528 | PORTCR(239, 0xe60520ef), /* PORT239CR */ | ||
1529 | |||
1530 | PORTCR(240, 0xe60520f0), /* PORT240CR */ | ||
1531 | PORTCR(241, 0xe60520f1), /* PORT241CR */ | ||
1532 | PORTCR(242, 0xe60520f2), /* PORT242CR */ | ||
1533 | PORTCR(243, 0xe60520f3), /* PORT243CR */ | ||
1534 | PORTCR(244, 0xe60520f4), /* PORT244CR */ | ||
1535 | PORTCR(245, 0xe60520f5), /* PORT245CR */ | ||
1536 | PORTCR(246, 0xe60520f6), /* PORT246CR */ | ||
1537 | PORTCR(247, 0xe60520f7), /* PORT247CR */ | ||
1538 | PORTCR(248, 0xe60520f8), /* PORT248CR */ | ||
1539 | PORTCR(249, 0xe60520f9), /* PORT249CR */ | ||
1540 | |||
1541 | PORTCR(250, 0xe60520fa), /* PORT250CR */ | ||
1542 | PORTCR(251, 0xe60520fb), /* PORT251CR */ | ||
1543 | PORTCR(252, 0xe60520fc), /* PORT252CR */ | ||
1544 | PORTCR(253, 0xe60520fd), /* PORT253CR */ | ||
1545 | PORTCR(254, 0xe60520fe), /* PORT254CR */ | ||
1546 | PORTCR(255, 0xe60520ff), /* PORT255CR */ | ||
1547 | PORTCR(256, 0xe6052100), /* PORT256CR */ | ||
1548 | PORTCR(257, 0xe6052101), /* PORT257CR */ | ||
1549 | PORTCR(258, 0xe6052102), /* PORT258CR */ | ||
1550 | PORTCR(259, 0xe6052103), /* PORT259CR */ | ||
1551 | |||
1552 | PORTCR(260, 0xe6052104), /* PORT260CR */ | ||
1553 | PORTCR(261, 0xe6052105), /* PORT261CR */ | ||
1554 | PORTCR(262, 0xe6052106), /* PORT262CR */ | ||
1555 | PORTCR(263, 0xe6052107), /* PORT263CR */ | ||
1556 | PORTCR(264, 0xe6052108), /* PORT264CR */ | ||
1557 | |||
1558 | { PINMUX_CFG_REG("MSELBCR", 0xe6058024, 32, 1) { | ||
1559 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | ||
1560 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | ||
1561 | MSELBCR_MSEL17_0, MSELBCR_MSEL17_1, | ||
1562 | MSELBCR_MSEL16_0, MSELBCR_MSEL16_1, | ||
1563 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | ||
1564 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } | ||
1565 | }, | ||
1566 | { }, | ||
1567 | }; | ||
1568 | |||
1569 | static struct pinmux_data_reg pinmux_data_regs[] = { | ||
1570 | { PINMUX_DATA_REG("PORTL031_000DR", 0xe6054000, 32) { | ||
1571 | PORT31_DATA, PORT30_DATA, PORT29_DATA, PORT28_DATA, | ||
1572 | PORT27_DATA, PORT26_DATA, PORT25_DATA, PORT24_DATA, | ||
1573 | PORT23_DATA, PORT22_DATA, PORT21_DATA, PORT20_DATA, | ||
1574 | PORT19_DATA, PORT18_DATA, PORT17_DATA, PORT16_DATA, | ||
1575 | PORT15_DATA, PORT14_DATA, PORT13_DATA, PORT12_DATA, | ||
1576 | PORT11_DATA, PORT10_DATA, PORT9_DATA, PORT8_DATA, | ||
1577 | PORT7_DATA, PORT6_DATA, PORT5_DATA, PORT4_DATA, | ||
1578 | PORT3_DATA, PORT2_DATA, PORT1_DATA, PORT0_DATA } | ||
1579 | }, | ||
1580 | { PINMUX_DATA_REG("PORTL063_032DR", 0xe6054004, 32) { | ||
1581 | PORT63_DATA, PORT62_DATA, PORT61_DATA, PORT60_DATA, | ||
1582 | PORT59_DATA, PORT58_DATA, PORT57_DATA, PORT56_DATA, | ||
1583 | PORT55_DATA, PORT54_DATA, PORT53_DATA, PORT52_DATA, | ||
1584 | PORT51_DATA, PORT50_DATA, PORT49_DATA, PORT48_DATA, | ||
1585 | PORT47_DATA, PORT46_DATA, PORT45_DATA, PORT44_DATA, | ||
1586 | PORT43_DATA, PORT42_DATA, PORT41_DATA, PORT40_DATA, | ||
1587 | PORT39_DATA, PORT38_DATA, PORT37_DATA, PORT36_DATA, | ||
1588 | PORT35_DATA, PORT34_DATA, PORT33_DATA, PORT32_DATA } | ||
1589 | }, | ||
1590 | { PINMUX_DATA_REG("PORTL095_064DR", 0xe6054008, 32) { | ||
1591 | PORT95_DATA, PORT94_DATA, PORT93_DATA, PORT92_DATA, | ||
1592 | PORT91_DATA, PORT90_DATA, PORT89_DATA, PORT88_DATA, | ||
1593 | PORT87_DATA, PORT86_DATA, PORT85_DATA, PORT84_DATA, | ||
1594 | PORT83_DATA, PORT82_DATA, PORT81_DATA, PORT80_DATA, | ||
1595 | PORT79_DATA, PORT78_DATA, PORT77_DATA, PORT76_DATA, | ||
1596 | PORT75_DATA, PORT74_DATA, PORT73_DATA, PORT72_DATA, | ||
1597 | PORT71_DATA, PORT70_DATA, PORT69_DATA, PORT68_DATA, | ||
1598 | PORT67_DATA, PORT66_DATA, PORT65_DATA, PORT64_DATA } | ||
1599 | }, | ||
1600 | { PINMUX_DATA_REG("PORTD127_096DR", 0xe605400C, 32) { | ||
1601 | 0, 0, 0, 0, | ||
1602 | 0, 0, 0, 0, | ||
1603 | 0, PORT118_DATA, PORT117_DATA, PORT116_DATA, | ||
1604 | PORT115_DATA, PORT114_DATA, PORT113_DATA, PORT112_DATA, | ||
1605 | PORT111_DATA, PORT110_DATA, PORT109_DATA, PORT108_DATA, | ||
1606 | PORT107_DATA, PORT106_DATA, PORT105_DATA, PORT104_DATA, | ||
1607 | PORT103_DATA, PORT102_DATA, PORT101_DATA, PORT100_DATA, | ||
1608 | PORT99_DATA, PORT98_DATA, PORT97_DATA, PORT96_DATA } | ||
1609 | }, | ||
1610 | { PINMUX_DATA_REG("PORTD159_128DR", 0xe6055000, 32) { | ||
1611 | PORT159_DATA, PORT158_DATA, PORT157_DATA, PORT156_DATA, | ||
1612 | PORT155_DATA, PORT154_DATA, PORT153_DATA, PORT152_DATA, | ||
1613 | PORT151_DATA, PORT150_DATA, PORT149_DATA, PORT148_DATA, | ||
1614 | PORT147_DATA, PORT146_DATA, PORT145_DATA, PORT144_DATA, | ||
1615 | PORT143_DATA, PORT142_DATA, PORT141_DATA, PORT140_DATA, | ||
1616 | PORT139_DATA, PORT138_DATA, PORT137_DATA, PORT136_DATA, | ||
1617 | PORT135_DATA, PORT134_DATA, PORT133_DATA, PORT132_DATA, | ||
1618 | PORT131_DATA, PORT130_DATA, PORT129_DATA, PORT128_DATA } | ||
1619 | }, | ||
1620 | { PINMUX_DATA_REG("PORTR191_160DR", 0xe6055004, 32) { | ||
1621 | 0, 0, 0, 0, | ||
1622 | 0, 0, 0, 0, | ||
1623 | 0, 0, 0, 0, | ||
1624 | 0, 0, 0, 0, | ||
1625 | 0, 0, 0, 0, | ||
1626 | 0, 0, 0, 0, | ||
1627 | 0, 0, 0, PORT164_DATA, | ||
1628 | PORT163_DATA, PORT162_DATA, PORT161_DATA, PORT160_DATA } | ||
1629 | }, | ||
1630 | { PINMUX_DATA_REG("PORTR223_192DR", 0xe6056000, 32) { | ||
1631 | PORT223_DATA, PORT222_DATA, PORT221_DATA, PORT220_DATA, | ||
1632 | PORT219_DATA, PORT218_DATA, PORT217_DATA, PORT216_DATA, | ||
1633 | PORT215_DATA, PORT214_DATA, PORT213_DATA, PORT212_DATA, | ||
1634 | PORT211_DATA, PORT210_DATA, PORT209_DATA, PORT208_DATA, | ||
1635 | PORT207_DATA, PORT206_DATA, PORT205_DATA, PORT204_DATA, | ||
1636 | PORT203_DATA, PORT202_DATA, PORT201_DATA, PORT200_DATA, | ||
1637 | PORT199_DATA, PORT198_DATA, PORT197_DATA, PORT196_DATA, | ||
1638 | PORT195_DATA, PORT194_DATA, PORT193_DATA, PORT192_DATA } | ||
1639 | }, | ||
1640 | { PINMUX_DATA_REG("PORTU255_224DR", 0xe6056004, 32) { | ||
1641 | PORT255_DATA, PORT254_DATA, PORT253_DATA, PORT252_DATA, | ||
1642 | PORT251_DATA, PORT250_DATA, PORT249_DATA, PORT248_DATA, | ||
1643 | PORT247_DATA, PORT246_DATA, PORT245_DATA, PORT244_DATA, | ||
1644 | PORT243_DATA, PORT242_DATA, PORT241_DATA, PORT240_DATA, | ||
1645 | PORT239_DATA, PORT238_DATA, PORT237_DATA, PORT236_DATA, | ||
1646 | PORT235_DATA, PORT234_DATA, PORT233_DATA, PORT232_DATA, | ||
1647 | PORT231_DATA, PORT230_DATA, PORT229_DATA, PORT228_DATA, | ||
1648 | PORT227_DATA, PORT226_DATA, PORT225_DATA, PORT224_DATA } | ||
1649 | }, | ||
1650 | { PINMUX_DATA_REG("PORTU287_256DR", 0xe6056008, 32) { | ||
1651 | 0, 0, 0, 0, | ||
1652 | 0, 0, 0, 0, | ||
1653 | 0, 0, 0, 0, | ||
1654 | 0, 0, 0, 0, | ||
1655 | 0, 0, 0, 0, | ||
1656 | 0, 0, 0, PORT264_DATA, | ||
1657 | PORT263_DATA, PORT262_DATA, PORT261_DATA, PORT260_DATA, | ||
1658 | PORT259_DATA, PORT258_DATA, PORT257_DATA, PORT256_DATA } | ||
1659 | }, | ||
1660 | { }, | ||
1661 | }; | ||
1662 | |||
1663 | static struct pinmux_info sh7377_pinmux_info = { | ||
1664 | .name = "sh7377_pfc", | ||
1665 | .reserved_id = PINMUX_RESERVED, | ||
1666 | .data = { PINMUX_DATA_BEGIN, PINMUX_DATA_END }, | ||
1667 | .input = { PINMUX_INPUT_BEGIN, PINMUX_INPUT_END }, | ||
1668 | .input_pu = { PINMUX_INPUT_PULLUP_BEGIN, PINMUX_INPUT_PULLUP_END }, | ||
1669 | .input_pd = { PINMUX_INPUT_PULLDOWN_BEGIN, PINMUX_INPUT_PULLDOWN_END }, | ||
1670 | .output = { PINMUX_OUTPUT_BEGIN, PINMUX_OUTPUT_END }, | ||
1671 | .mark = { PINMUX_MARK_BEGIN, PINMUX_MARK_END }, | ||
1672 | .function = { PINMUX_FUNCTION_BEGIN, PINMUX_FUNCTION_END }, | ||
1673 | |||
1674 | .first_gpio = GPIO_PORT0, | ||
1675 | .last_gpio = GPIO_FN_RESETOUTS, | ||
1676 | |||
1677 | .gpios = pinmux_gpios, | ||
1678 | .cfg_regs = pinmux_config_regs, | ||
1679 | .data_regs = pinmux_data_regs, | ||
1680 | |||
1681 | .gpio_data = pinmux_data, | ||
1682 | .gpio_data_size = ARRAY_SIZE(pinmux_data), | ||
1683 | }; | ||
1684 | |||
1685 | void sh7377_pinmux_init(void) | ||
1686 | { | ||
1687 | register_pinmux(&sh7377_pinmux_info); | ||
1688 | } | ||
diff --git a/arch/arm/mach-shmobile/setup-r8a7740.c b/arch/arm/mach-shmobile/setup-r8a7740.c index 96f11394c7c0..095222469d03 100644 --- a/arch/arm/mach-shmobile/setup-r8a7740.c +++ b/arch/arm/mach-shmobile/setup-r8a7740.c | |||
@@ -584,6 +584,21 @@ static struct platform_device i2c1_device = { | |||
584 | .num_resources = ARRAY_SIZE(i2c1_resources), | 584 | .num_resources = ARRAY_SIZE(i2c1_resources), |
585 | }; | 585 | }; |
586 | 586 | ||
587 | static struct resource pmu_resources[] = { | ||
588 | [0] = { | ||
589 | .start = evt2irq(0x19a0), | ||
590 | .end = evt2irq(0x19a0), | ||
591 | .flags = IORESOURCE_IRQ, | ||
592 | }, | ||
593 | }; | ||
594 | |||
595 | static struct platform_device pmu_device = { | ||
596 | .name = "arm-pmu", | ||
597 | .id = -1, | ||
598 | .num_resources = ARRAY_SIZE(pmu_resources), | ||
599 | .resource = pmu_resources, | ||
600 | }; | ||
601 | |||
587 | static struct platform_device *r8a7740_late_devices[] __initdata = { | 602 | static struct platform_device *r8a7740_late_devices[] __initdata = { |
588 | &i2c0_device, | 603 | &i2c0_device, |
589 | &i2c1_device, | 604 | &i2c1_device, |
@@ -591,6 +606,7 @@ static struct platform_device *r8a7740_late_devices[] __initdata = { | |||
591 | &dma1_device, | 606 | &dma1_device, |
592 | &dma2_device, | 607 | &dma2_device, |
593 | &usb_dma_device, | 608 | &usb_dma_device, |
609 | &pmu_device, | ||
594 | }; | 610 | }; |
595 | 611 | ||
596 | /* | 612 | /* |
@@ -741,7 +757,7 @@ static const char *r8a7740_boards_compat_dt[] __initdata = { | |||
741 | NULL, | 757 | NULL, |
742 | }; | 758 | }; |
743 | 759 | ||
744 | DT_MACHINE_START(SH7372_DT, "Generic R8A7740 (Flattened Device Tree)") | 760 | DT_MACHINE_START(R8A7740_DT, "Generic R8A7740 (Flattened Device Tree)") |
745 | .map_io = r8a7740_map_io, | 761 | .map_io = r8a7740_map_io, |
746 | .init_early = r8a7740_add_early_devices_dt, | 762 | .init_early = r8a7740_add_early_devices_dt, |
747 | .init_irq = r8a7740_init_irq, | 763 | .init_irq = r8a7740_init_irq, |
diff --git a/arch/arm/mach-shmobile/setup-r8a7779.c b/arch/arm/mach-shmobile/setup-r8a7779.c index ebbffc25f24f..7a1ad4f38539 100644 --- a/arch/arm/mach-shmobile/setup-r8a7779.c +++ b/arch/arm/mach-shmobile/setup-r8a7779.c | |||
@@ -229,6 +229,79 @@ static struct platform_device tmu01_device = { | |||
229 | .num_resources = ARRAY_SIZE(tmu01_resources), | 229 | .num_resources = ARRAY_SIZE(tmu01_resources), |
230 | }; | 230 | }; |
231 | 231 | ||
232 | /* I2C */ | ||
233 | static struct resource rcar_i2c0_res[] = { | ||
234 | { | ||
235 | .start = 0xffc70000, | ||
236 | .end = 0xffc70fff, | ||
237 | .flags = IORESOURCE_MEM, | ||
238 | }, { | ||
239 | .start = gic_spi(79), | ||
240 | .flags = IORESOURCE_IRQ, | ||
241 | }, | ||
242 | }; | ||
243 | |||
244 | static struct platform_device i2c0_device = { | ||
245 | .name = "i2c-rcar", | ||
246 | .id = 0, | ||
247 | .resource = rcar_i2c0_res, | ||
248 | .num_resources = ARRAY_SIZE(rcar_i2c0_res), | ||
249 | }; | ||
250 | |||
251 | static struct resource rcar_i2c1_res[] = { | ||
252 | { | ||
253 | .start = 0xffc71000, | ||
254 | .end = 0xffc71fff, | ||
255 | .flags = IORESOURCE_MEM, | ||
256 | }, { | ||
257 | .start = gic_spi(82), | ||
258 | .flags = IORESOURCE_IRQ, | ||
259 | }, | ||
260 | }; | ||
261 | |||
262 | static struct platform_device i2c1_device = { | ||
263 | .name = "i2c-rcar", | ||
264 | .id = 1, | ||
265 | .resource = rcar_i2c1_res, | ||
266 | .num_resources = ARRAY_SIZE(rcar_i2c1_res), | ||
267 | }; | ||
268 | |||
269 | static struct resource rcar_i2c2_res[] = { | ||
270 | { | ||
271 | .start = 0xffc72000, | ||
272 | .end = 0xffc72fff, | ||
273 | .flags = IORESOURCE_MEM, | ||
274 | }, { | ||
275 | .start = gic_spi(80), | ||
276 | .flags = IORESOURCE_IRQ, | ||
277 | }, | ||
278 | }; | ||
279 | |||
280 | static struct platform_device i2c2_device = { | ||
281 | .name = "i2c-rcar", | ||
282 | .id = 2, | ||
283 | .resource = rcar_i2c2_res, | ||
284 | .num_resources = ARRAY_SIZE(rcar_i2c2_res), | ||
285 | }; | ||
286 | |||
287 | static struct resource rcar_i2c3_res[] = { | ||
288 | { | ||
289 | .start = 0xffc73000, | ||
290 | .end = 0xffc73fff, | ||
291 | .flags = IORESOURCE_MEM, | ||
292 | }, { | ||
293 | .start = gic_spi(81), | ||
294 | .flags = IORESOURCE_IRQ, | ||
295 | }, | ||
296 | }; | ||
297 | |||
298 | static struct platform_device i2c3_device = { | ||
299 | .name = "i2c-rcar", | ||
300 | .id = 3, | ||
301 | .resource = rcar_i2c3_res, | ||
302 | .num_resources = ARRAY_SIZE(rcar_i2c3_res), | ||
303 | }; | ||
304 | |||
232 | static struct platform_device *r8a7779_early_devices[] __initdata = { | 305 | static struct platform_device *r8a7779_early_devices[] __initdata = { |
233 | &scif0_device, | 306 | &scif0_device, |
234 | &scif1_device, | 307 | &scif1_device, |
@@ -238,6 +311,10 @@ static struct platform_device *r8a7779_early_devices[] __initdata = { | |||
238 | &scif5_device, | 311 | &scif5_device, |
239 | &tmu00_device, | 312 | &tmu00_device, |
240 | &tmu01_device, | 313 | &tmu01_device, |
314 | &i2c0_device, | ||
315 | &i2c1_device, | ||
316 | &i2c2_device, | ||
317 | &i2c3_device, | ||
241 | }; | 318 | }; |
242 | 319 | ||
243 | static struct platform_device *r8a7779_late_devices[] __initdata = { | 320 | static struct platform_device *r8a7779_late_devices[] __initdata = { |
diff --git a/arch/arm/mach-shmobile/setup-sh7367.c b/arch/arm/mach-shmobile/setup-sh7367.c deleted file mode 100644 index e647f5410879..000000000000 --- a/arch/arm/mach-shmobile/setup-sh7367.c +++ /dev/null | |||
@@ -1,481 +0,0 @@ | |||
1 | /* | ||
2 | * sh7367 processor support | ||
3 | * | ||
4 | * Copyright (C) 2010 Magnus Damm | ||
5 | * Copyright (C) 2008 Yoshihiro Shimoda | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License as published by | ||
9 | * the Free Software Foundation; version 2 of the License. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | ||
19 | */ | ||
20 | #include <linux/kernel.h> | ||
21 | #include <linux/init.h> | ||
22 | #include <linux/interrupt.h> | ||
23 | #include <linux/irq.h> | ||
24 | #include <linux/platform_device.h> | ||
25 | #include <linux/uio_driver.h> | ||
26 | #include <linux/delay.h> | ||
27 | #include <linux/input.h> | ||
28 | #include <linux/io.h> | ||
29 | #include <linux/serial_sci.h> | ||
30 | #include <linux/sh_timer.h> | ||
31 | #include <mach/hardware.h> | ||
32 | #include <mach/common.h> | ||
33 | #include <mach/irqs.h> | ||
34 | #include <asm/mach-types.h> | ||
35 | #include <asm/mach/arch.h> | ||
36 | #include <asm/mach/map.h> | ||
37 | #include <asm/mach/time.h> | ||
38 | |||
39 | static struct map_desc sh7367_io_desc[] __initdata = { | ||
40 | /* create a 1:1 entity map for 0xe6xxxxxx | ||
41 | * used by CPGA, INTC and PFC. | ||
42 | */ | ||
43 | { | ||
44 | .virtual = 0xe6000000, | ||
45 | .pfn = __phys_to_pfn(0xe6000000), | ||
46 | .length = 256 << 20, | ||
47 | .type = MT_DEVICE_NONSHARED | ||
48 | }, | ||
49 | }; | ||
50 | |||
51 | void __init sh7367_map_io(void) | ||
52 | { | ||
53 | iotable_init(sh7367_io_desc, ARRAY_SIZE(sh7367_io_desc)); | ||
54 | } | ||
55 | |||
56 | /* SCIFA0 */ | ||
57 | static struct plat_sci_port scif0_platform_data = { | ||
58 | .mapbase = 0xe6c40000, | ||
59 | .flags = UPF_BOOT_AUTOCONF, | ||
60 | .scscr = SCSCR_RE | SCSCR_TE, | ||
61 | .scbrr_algo_id = SCBRR_ALGO_4, | ||
62 | .type = PORT_SCIFA, | ||
63 | .irqs = { evt2irq(0xc00), evt2irq(0xc00), | ||
64 | evt2irq(0xc00), evt2irq(0xc00) }, | ||
65 | }; | ||
66 | |||
67 | static struct platform_device scif0_device = { | ||
68 | .name = "sh-sci", | ||
69 | .id = 0, | ||
70 | .dev = { | ||
71 | .platform_data = &scif0_platform_data, | ||
72 | }, | ||
73 | }; | ||
74 | |||
75 | /* SCIFA1 */ | ||
76 | static struct plat_sci_port scif1_platform_data = { | ||
77 | .mapbase = 0xe6c50000, | ||
78 | .flags = UPF_BOOT_AUTOCONF, | ||
79 | .scscr = SCSCR_RE | SCSCR_TE, | ||
80 | .scbrr_algo_id = SCBRR_ALGO_4, | ||
81 | .type = PORT_SCIFA, | ||
82 | .irqs = { evt2irq(0xc20), evt2irq(0xc20), | ||
83 | evt2irq(0xc20), evt2irq(0xc20) }, | ||
84 | }; | ||
85 | |||
86 | static struct platform_device scif1_device = { | ||
87 | .name = "sh-sci", | ||
88 | .id = 1, | ||
89 | .dev = { | ||
90 | .platform_data = &scif1_platform_data, | ||
91 | }, | ||
92 | }; | ||
93 | |||
94 | /* SCIFA2 */ | ||
95 | static struct plat_sci_port scif2_platform_data = { | ||
96 | .mapbase = 0xe6c60000, | ||
97 | .flags = UPF_BOOT_AUTOCONF, | ||
98 | .scscr = SCSCR_RE | SCSCR_TE, | ||
99 | .scbrr_algo_id = SCBRR_ALGO_4, | ||
100 | .type = PORT_SCIFA, | ||
101 | .irqs = { evt2irq(0xc40), evt2irq(0xc40), | ||
102 | evt2irq(0xc40), evt2irq(0xc40) }, | ||
103 | }; | ||
104 | |||
105 | static struct platform_device scif2_device = { | ||
106 | .name = "sh-sci", | ||
107 | .id = 2, | ||
108 | .dev = { | ||
109 | .platform_data = &scif2_platform_data, | ||
110 | }, | ||
111 | }; | ||
112 | |||
113 | /* SCIFA3 */ | ||
114 | static struct plat_sci_port scif3_platform_data = { | ||
115 | .mapbase = 0xe6c70000, | ||
116 | .flags = UPF_BOOT_AUTOCONF, | ||
117 | .scscr = SCSCR_RE | SCSCR_TE, | ||
118 | .scbrr_algo_id = SCBRR_ALGO_4, | ||
119 | .type = PORT_SCIFA, | ||
120 | .irqs = { evt2irq(0xc60), evt2irq(0xc60), | ||
121 | evt2irq(0xc60), evt2irq(0xc60) }, | ||
122 | }; | ||
123 | |||
124 | static struct platform_device scif3_device = { | ||
125 | .name = "sh-sci", | ||
126 | .id = 3, | ||
127 | .dev = { | ||
128 | .platform_data = &scif3_platform_data, | ||
129 | }, | ||
130 | }; | ||
131 | |||
132 | /* SCIFA4 */ | ||
133 | static struct plat_sci_port scif4_platform_data = { | ||
134 | .mapbase = 0xe6c80000, | ||
135 | .flags = UPF_BOOT_AUTOCONF, | ||
136 | .scscr = SCSCR_RE | SCSCR_TE, | ||
137 | .scbrr_algo_id = SCBRR_ALGO_4, | ||
138 | .type = PORT_SCIFA, | ||
139 | .irqs = { evt2irq(0xd20), evt2irq(0xd20), | ||
140 | evt2irq(0xd20), evt2irq(0xd20) }, | ||
141 | }; | ||
142 | |||
143 | static struct platform_device scif4_device = { | ||
144 | .name = "sh-sci", | ||
145 | .id = 4, | ||
146 | .dev = { | ||
147 | .platform_data = &scif4_platform_data, | ||
148 | }, | ||
149 | }; | ||
150 | |||
151 | /* SCIFA5 */ | ||
152 | static struct plat_sci_port scif5_platform_data = { | ||
153 | .mapbase = 0xe6cb0000, | ||
154 | .flags = UPF_BOOT_AUTOCONF, | ||
155 | .scscr = SCSCR_RE | SCSCR_TE, | ||
156 | .scbrr_algo_id = SCBRR_ALGO_4, | ||
157 | .type = PORT_SCIFA, | ||
158 | .irqs = { evt2irq(0xd40), evt2irq(0xd40), | ||
159 | evt2irq(0xd40), evt2irq(0xd40) }, | ||
160 | }; | ||
161 | |||
162 | static struct platform_device scif5_device = { | ||
163 | .name = "sh-sci", | ||
164 | .id = 5, | ||
165 | .dev = { | ||
166 | .platform_data = &scif5_platform_data, | ||
167 | }, | ||
168 | }; | ||
169 | |||
170 | /* SCIFB */ | ||
171 | static struct plat_sci_port scif6_platform_data = { | ||
172 | .mapbase = 0xe6c30000, | ||
173 | .flags = UPF_BOOT_AUTOCONF, | ||
174 | .scscr = SCSCR_RE | SCSCR_TE, | ||
175 | .scbrr_algo_id = SCBRR_ALGO_4, | ||
176 | .type = PORT_SCIFB, | ||
177 | .irqs = { evt2irq(0xd60), evt2irq(0xd60), | ||
178 | evt2irq(0xd60), evt2irq(0xd60) }, | ||
179 | }; | ||
180 | |||
181 | static struct platform_device scif6_device = { | ||
182 | .name = "sh-sci", | ||
183 | .id = 6, | ||
184 | .dev = { | ||
185 | .platform_data = &scif6_platform_data, | ||
186 | }, | ||
187 | }; | ||
188 | |||
189 | static struct sh_timer_config cmt10_platform_data = { | ||
190 | .name = "CMT10", | ||
191 | .channel_offset = 0x10, | ||
192 | .timer_bit = 0, | ||
193 | .clockevent_rating = 125, | ||
194 | .clocksource_rating = 125, | ||
195 | }; | ||
196 | |||
197 | static struct resource cmt10_resources[] = { | ||
198 | [0] = { | ||
199 | .name = "CMT10", | ||
200 | .start = 0xe6138010, | ||
201 | .end = 0xe613801b, | ||
202 | .flags = IORESOURCE_MEM, | ||
203 | }, | ||
204 | [1] = { | ||
205 | .start = evt2irq(0xb00), /* CMT1_CMT10 */ | ||
206 | .flags = IORESOURCE_IRQ, | ||
207 | }, | ||
208 | }; | ||
209 | |||
210 | static struct platform_device cmt10_device = { | ||
211 | .name = "sh_cmt", | ||
212 | .id = 10, | ||
213 | .dev = { | ||
214 | .platform_data = &cmt10_platform_data, | ||
215 | }, | ||
216 | .resource = cmt10_resources, | ||
217 | .num_resources = ARRAY_SIZE(cmt10_resources), | ||
218 | }; | ||
219 | |||
220 | /* VPU */ | ||
221 | static struct uio_info vpu_platform_data = { | ||
222 | .name = "VPU5", | ||
223 | .version = "0", | ||
224 | .irq = intcs_evt2irq(0x980), | ||
225 | }; | ||
226 | |||
227 | static struct resource vpu_resources[] = { | ||
228 | [0] = { | ||
229 | .name = "VPU", | ||
230 | .start = 0xfe900000, | ||
231 | .end = 0xfe902807, | ||
232 | .flags = IORESOURCE_MEM, | ||
233 | }, | ||
234 | }; | ||
235 | |||
236 | static struct platform_device vpu_device = { | ||
237 | .name = "uio_pdrv_genirq", | ||
238 | .id = 0, | ||
239 | .dev = { | ||
240 | .platform_data = &vpu_platform_data, | ||
241 | }, | ||
242 | .resource = vpu_resources, | ||
243 | .num_resources = ARRAY_SIZE(vpu_resources), | ||
244 | }; | ||
245 | |||
246 | /* VEU0 */ | ||
247 | static struct uio_info veu0_platform_data = { | ||
248 | .name = "VEU0", | ||
249 | .version = "0", | ||
250 | .irq = intcs_evt2irq(0x700), | ||
251 | }; | ||
252 | |||
253 | static struct resource veu0_resources[] = { | ||
254 | [0] = { | ||
255 | .name = "VEU0", | ||
256 | .start = 0xfe920000, | ||
257 | .end = 0xfe9200b7, | ||
258 | .flags = IORESOURCE_MEM, | ||
259 | }, | ||
260 | }; | ||
261 | |||
262 | static struct platform_device veu0_device = { | ||
263 | .name = "uio_pdrv_genirq", | ||
264 | .id = 1, | ||
265 | .dev = { | ||
266 | .platform_data = &veu0_platform_data, | ||
267 | }, | ||
268 | .resource = veu0_resources, | ||
269 | .num_resources = ARRAY_SIZE(veu0_resources), | ||
270 | }; | ||
271 | |||
272 | /* VEU1 */ | ||
273 | static struct uio_info veu1_platform_data = { | ||
274 | .name = "VEU1", | ||
275 | .version = "0", | ||
276 | .irq = intcs_evt2irq(0x720), | ||
277 | }; | ||
278 | |||
279 | static struct resource veu1_resources[] = { | ||
280 | [0] = { | ||
281 | .name = "VEU1", | ||
282 | .start = 0xfe924000, | ||
283 | .end = 0xfe9240b7, | ||
284 | .flags = IORESOURCE_MEM, | ||
285 | }, | ||
286 | }; | ||
287 | |||
288 | static struct platform_device veu1_device = { | ||
289 | .name = "uio_pdrv_genirq", | ||
290 | .id = 2, | ||
291 | .dev = { | ||
292 | .platform_data = &veu1_platform_data, | ||
293 | }, | ||
294 | .resource = veu1_resources, | ||
295 | .num_resources = ARRAY_SIZE(veu1_resources), | ||
296 | }; | ||
297 | |||
298 | /* VEU2 */ | ||
299 | static struct uio_info veu2_platform_data = { | ||
300 | .name = "VEU2", | ||
301 | .version = "0", | ||
302 | .irq = intcs_evt2irq(0x740), | ||
303 | }; | ||
304 | |||
305 | static struct resource veu2_resources[] = { | ||
306 | [0] = { | ||
307 | .name = "VEU2", | ||
308 | .start = 0xfe928000, | ||
309 | .end = 0xfe9280b7, | ||
310 | .flags = IORESOURCE_MEM, | ||
311 | }, | ||
312 | }; | ||
313 | |||
314 | static struct platform_device veu2_device = { | ||
315 | .name = "uio_pdrv_genirq", | ||
316 | .id = 3, | ||
317 | .dev = { | ||
318 | .platform_data = &veu2_platform_data, | ||
319 | }, | ||
320 | .resource = veu2_resources, | ||
321 | .num_resources = ARRAY_SIZE(veu2_resources), | ||
322 | }; | ||
323 | |||
324 | /* VEU3 */ | ||
325 | static struct uio_info veu3_platform_data = { | ||
326 | .name = "VEU3", | ||
327 | .version = "0", | ||
328 | .irq = intcs_evt2irq(0x760), | ||
329 | }; | ||
330 | |||
331 | static struct resource veu3_resources[] = { | ||
332 | [0] = { | ||
333 | .name = "VEU3", | ||
334 | .start = 0xfe92c000, | ||
335 | .end = 0xfe92c0b7, | ||
336 | .flags = IORESOURCE_MEM, | ||
337 | }, | ||
338 | }; | ||
339 | |||
340 | static struct platform_device veu3_device = { | ||
341 | .name = "uio_pdrv_genirq", | ||
342 | .id = 4, | ||
343 | .dev = { | ||
344 | .platform_data = &veu3_platform_data, | ||
345 | }, | ||
346 | .resource = veu3_resources, | ||
347 | .num_resources = ARRAY_SIZE(veu3_resources), | ||
348 | }; | ||
349 | |||
350 | /* VEU2H */ | ||
351 | static struct uio_info veu2h_platform_data = { | ||
352 | .name = "VEU2H", | ||
353 | .version = "0", | ||
354 | .irq = intcs_evt2irq(0x520), | ||
355 | }; | ||
356 | |||
357 | static struct resource veu2h_resources[] = { | ||
358 | [0] = { | ||
359 | .name = "VEU2H", | ||
360 | .start = 0xfe93c000, | ||
361 | .end = 0xfe93c27b, | ||
362 | .flags = IORESOURCE_MEM, | ||
363 | }, | ||
364 | }; | ||
365 | |||
366 | static struct platform_device veu2h_device = { | ||
367 | .name = "uio_pdrv_genirq", | ||
368 | .id = 5, | ||
369 | .dev = { | ||
370 | .platform_data = &veu2h_platform_data, | ||
371 | }, | ||
372 | .resource = veu2h_resources, | ||
373 | .num_resources = ARRAY_SIZE(veu2h_resources), | ||
374 | }; | ||
375 | |||
376 | /* JPU */ | ||
377 | static struct uio_info jpu_platform_data = { | ||
378 | .name = "JPU", | ||
379 | .version = "0", | ||
380 | .irq = intcs_evt2irq(0x560), | ||
381 | }; | ||
382 | |||
383 | static struct resource jpu_resources[] = { | ||
384 | [0] = { | ||
385 | .name = "JPU", | ||
386 | .start = 0xfe980000, | ||
387 | .end = 0xfe9902d3, | ||
388 | .flags = IORESOURCE_MEM, | ||
389 | }, | ||
390 | }; | ||
391 | |||
392 | static struct platform_device jpu_device = { | ||
393 | .name = "uio_pdrv_genirq", | ||
394 | .id = 6, | ||
395 | .dev = { | ||
396 | .platform_data = &jpu_platform_data, | ||
397 | }, | ||
398 | .resource = jpu_resources, | ||
399 | .num_resources = ARRAY_SIZE(jpu_resources), | ||
400 | }; | ||
401 | |||
402 | /* SPU1 */ | ||
403 | static struct uio_info spu1_platform_data = { | ||
404 | .name = "SPU1", | ||
405 | .version = "0", | ||
406 | .irq = evt2irq(0xfc0), | ||
407 | }; | ||
408 | |||
409 | static struct resource spu1_resources[] = { | ||
410 | [0] = { | ||
411 | .name = "SPU1", | ||
412 | .start = 0xfe300000, | ||
413 | .end = 0xfe3fffff, | ||
414 | .flags = IORESOURCE_MEM, | ||
415 | }, | ||
416 | }; | ||
417 | |||
418 | static struct platform_device spu1_device = { | ||
419 | .name = "uio_pdrv_genirq", | ||
420 | .id = 7, | ||
421 | .dev = { | ||
422 | .platform_data = &spu1_platform_data, | ||
423 | }, | ||
424 | .resource = spu1_resources, | ||
425 | .num_resources = ARRAY_SIZE(spu1_resources), | ||
426 | }; | ||
427 | |||
428 | static struct platform_device *sh7367_early_devices[] __initdata = { | ||
429 | &scif0_device, | ||
430 | &scif1_device, | ||
431 | &scif2_device, | ||
432 | &scif3_device, | ||
433 | &scif4_device, | ||
434 | &scif5_device, | ||
435 | &scif6_device, | ||
436 | &cmt10_device, | ||
437 | }; | ||
438 | |||
439 | static struct platform_device *sh7367_devices[] __initdata = { | ||
440 | &vpu_device, | ||
441 | &veu0_device, | ||
442 | &veu1_device, | ||
443 | &veu2_device, | ||
444 | &veu3_device, | ||
445 | &veu2h_device, | ||
446 | &jpu_device, | ||
447 | &spu1_device, | ||
448 | }; | ||
449 | |||
450 | void __init sh7367_add_standard_devices(void) | ||
451 | { | ||
452 | platform_add_devices(sh7367_early_devices, | ||
453 | ARRAY_SIZE(sh7367_early_devices)); | ||
454 | |||
455 | platform_add_devices(sh7367_devices, | ||
456 | ARRAY_SIZE(sh7367_devices)); | ||
457 | } | ||
458 | |||
459 | static void __init sh7367_earlytimer_init(void) | ||
460 | { | ||
461 | sh7367_clock_init(); | ||
462 | shmobile_earlytimer_init(); | ||
463 | } | ||
464 | |||
465 | #define SYMSTPCR2 IOMEM(0xe6158048) | ||
466 | #define SYMSTPCR2_CMT1 (1 << 29) | ||
467 | |||
468 | void __init sh7367_add_early_devices(void) | ||
469 | { | ||
470 | /* enable clock to CMT1 */ | ||
471 | __raw_writel(__raw_readl(SYMSTPCR2) & ~SYMSTPCR2_CMT1, SYMSTPCR2); | ||
472 | |||
473 | early_platform_add_devices(sh7367_early_devices, | ||
474 | ARRAY_SIZE(sh7367_early_devices)); | ||
475 | |||
476 | /* setup early console here as well */ | ||
477 | shmobile_setup_console(); | ||
478 | |||
479 | /* override timer setup with soc-specific code */ | ||
480 | shmobile_timer.init = sh7367_earlytimer_init; | ||
481 | } | ||
diff --git a/arch/arm/mach-shmobile/setup-sh7372.c b/arch/arm/mach-shmobile/setup-sh7372.c index be6f746c97fa..c917882424a7 100644 --- a/arch/arm/mach-shmobile/setup-sh7372.c +++ b/arch/arm/mach-shmobile/setup-sh7372.c | |||
@@ -402,6 +402,26 @@ static const struct sh_dmae_slave_config sh7372_dmae_slaves[] = { | |||
402 | .chcr = CHCR_RX(XMIT_SZ_8BIT), | 402 | .chcr = CHCR_RX(XMIT_SZ_8BIT), |
403 | .mid_rid = 0x3e, | 403 | .mid_rid = 0x3e, |
404 | }, { | 404 | }, { |
405 | .slave_id = SHDMA_SLAVE_FLCTL0_TX, | ||
406 | .addr = 0xe6a30050, | ||
407 | .chcr = CHCR_TX(XMIT_SZ_32BIT), | ||
408 | .mid_rid = 0x83, | ||
409 | }, { | ||
410 | .slave_id = SHDMA_SLAVE_FLCTL0_RX, | ||
411 | .addr = 0xe6a30050, | ||
412 | .chcr = CHCR_RX(XMIT_SZ_32BIT), | ||
413 | .mid_rid = 0x83, | ||
414 | }, { | ||
415 | .slave_id = SHDMA_SLAVE_FLCTL1_TX, | ||
416 | .addr = 0xe6a30060, | ||
417 | .chcr = CHCR_TX(XMIT_SZ_32BIT), | ||
418 | .mid_rid = 0x87, | ||
419 | }, { | ||
420 | .slave_id = SHDMA_SLAVE_FLCTL1_RX, | ||
421 | .addr = 0xe6a30060, | ||
422 | .chcr = CHCR_RX(XMIT_SZ_32BIT), | ||
423 | .mid_rid = 0x87, | ||
424 | }, { | ||
405 | .slave_id = SHDMA_SLAVE_SDHI0_TX, | 425 | .slave_id = SHDMA_SLAVE_SDHI0_TX, |
406 | .addr = 0xe6850030, | 426 | .addr = 0xe6850030, |
407 | .chcr = CHCR_TX(XMIT_SZ_16BIT), | 427 | .chcr = CHCR_TX(XMIT_SZ_16BIT), |
diff --git a/arch/arm/mach-shmobile/setup-sh7377.c b/arch/arm/mach-shmobile/setup-sh7377.c deleted file mode 100644 index edcf98bb7012..000000000000 --- a/arch/arm/mach-shmobile/setup-sh7377.c +++ /dev/null | |||
@@ -1,549 +0,0 @@ | |||
1 | /* | ||
2 | * sh7377 processor support | ||
3 | * | ||
4 | * Copyright (C) 2010 Magnus Damm | ||
5 | * Copyright (C) 2008 Yoshihiro Shimoda | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License as published by | ||
9 | * the Free Software Foundation; version 2 of the License. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | ||
19 | */ | ||
20 | #include <linux/kernel.h> | ||
21 | #include <linux/init.h> | ||
22 | #include <linux/interrupt.h> | ||
23 | #include <linux/irq.h> | ||
24 | #include <linux/platform_device.h> | ||
25 | #include <linux/of_platform.h> | ||
26 | #include <linux/uio_driver.h> | ||
27 | #include <linux/delay.h> | ||
28 | #include <linux/input.h> | ||
29 | #include <linux/io.h> | ||
30 | #include <linux/serial_sci.h> | ||
31 | #include <linux/sh_intc.h> | ||
32 | #include <linux/sh_timer.h> | ||
33 | #include <mach/hardware.h> | ||
34 | #include <mach/common.h> | ||
35 | #include <asm/mach/map.h> | ||
36 | #include <mach/irqs.h> | ||
37 | #include <asm/mach-types.h> | ||
38 | #include <asm/mach/arch.h> | ||
39 | #include <asm/mach/time.h> | ||
40 | |||
41 | static struct map_desc sh7377_io_desc[] __initdata = { | ||
42 | /* create a 1:1 entity map for 0xe6xxxxxx | ||
43 | * used by CPGA, INTC and PFC. | ||
44 | */ | ||
45 | { | ||
46 | .virtual = 0xe6000000, | ||
47 | .pfn = __phys_to_pfn(0xe6000000), | ||
48 | .length = 256 << 20, | ||
49 | .type = MT_DEVICE_NONSHARED | ||
50 | }, | ||
51 | }; | ||
52 | |||
53 | void __init sh7377_map_io(void) | ||
54 | { | ||
55 | iotable_init(sh7377_io_desc, ARRAY_SIZE(sh7377_io_desc)); | ||
56 | } | ||
57 | |||
58 | /* SCIFA0 */ | ||
59 | static struct plat_sci_port scif0_platform_data = { | ||
60 | .mapbase = 0xe6c40000, | ||
61 | .flags = UPF_BOOT_AUTOCONF, | ||
62 | .scscr = SCSCR_RE | SCSCR_TE, | ||
63 | .scbrr_algo_id = SCBRR_ALGO_4, | ||
64 | .type = PORT_SCIFA, | ||
65 | .irqs = { evt2irq(0xc00), evt2irq(0xc00), | ||
66 | evt2irq(0xc00), evt2irq(0xc00) }, | ||
67 | }; | ||
68 | |||
69 | static struct platform_device scif0_device = { | ||
70 | .name = "sh-sci", | ||
71 | .id = 0, | ||
72 | .dev = { | ||
73 | .platform_data = &scif0_platform_data, | ||
74 | }, | ||
75 | }; | ||
76 | |||
77 | /* SCIFA1 */ | ||
78 | static struct plat_sci_port scif1_platform_data = { | ||
79 | .mapbase = 0xe6c50000, | ||
80 | .flags = UPF_BOOT_AUTOCONF, | ||
81 | .scscr = SCSCR_RE | SCSCR_TE, | ||
82 | .scbrr_algo_id = SCBRR_ALGO_4, | ||
83 | .type = PORT_SCIFA, | ||
84 | .irqs = { evt2irq(0xc20), evt2irq(0xc20), | ||
85 | evt2irq(0xc20), evt2irq(0xc20) }, | ||
86 | }; | ||
87 | |||
88 | static struct platform_device scif1_device = { | ||
89 | .name = "sh-sci", | ||
90 | .id = 1, | ||
91 | .dev = { | ||
92 | .platform_data = &scif1_platform_data, | ||
93 | }, | ||
94 | }; | ||
95 | |||
96 | /* SCIFA2 */ | ||
97 | static struct plat_sci_port scif2_platform_data = { | ||
98 | .mapbase = 0xe6c60000, | ||
99 | .flags = UPF_BOOT_AUTOCONF, | ||
100 | .scscr = SCSCR_RE | SCSCR_TE, | ||
101 | .scbrr_algo_id = SCBRR_ALGO_4, | ||
102 | .type = PORT_SCIFA, | ||
103 | .irqs = { evt2irq(0xc40), evt2irq(0xc40), | ||
104 | evt2irq(0xc40), evt2irq(0xc40) }, | ||
105 | }; | ||
106 | |||
107 | static struct platform_device scif2_device = { | ||
108 | .name = "sh-sci", | ||
109 | .id = 2, | ||
110 | .dev = { | ||
111 | .platform_data = &scif2_platform_data, | ||
112 | }, | ||
113 | }; | ||
114 | |||
115 | /* SCIFA3 */ | ||
116 | static struct plat_sci_port scif3_platform_data = { | ||
117 | .mapbase = 0xe6c70000, | ||
118 | .flags = UPF_BOOT_AUTOCONF, | ||
119 | .scscr = SCSCR_RE | SCSCR_TE, | ||
120 | .scbrr_algo_id = SCBRR_ALGO_4, | ||
121 | .type = PORT_SCIFA, | ||
122 | .irqs = { evt2irq(0xc60), evt2irq(0xc60), | ||
123 | evt2irq(0xc60), evt2irq(0xc60) }, | ||
124 | }; | ||
125 | |||
126 | static struct platform_device scif3_device = { | ||
127 | .name = "sh-sci", | ||
128 | .id = 3, | ||
129 | .dev = { | ||
130 | .platform_data = &scif3_platform_data, | ||
131 | }, | ||
132 | }; | ||
133 | |||
134 | /* SCIFA4 */ | ||
135 | static struct plat_sci_port scif4_platform_data = { | ||
136 | .mapbase = 0xe6c80000, | ||
137 | .flags = UPF_BOOT_AUTOCONF, | ||
138 | .scscr = SCSCR_RE | SCSCR_TE, | ||
139 | .scbrr_algo_id = SCBRR_ALGO_4, | ||
140 | .type = PORT_SCIFA, | ||
141 | .irqs = { evt2irq(0xd20), evt2irq(0xd20), | ||
142 | evt2irq(0xd20), evt2irq(0xd20) }, | ||
143 | }; | ||
144 | |||
145 | static struct platform_device scif4_device = { | ||
146 | .name = "sh-sci", | ||
147 | .id = 4, | ||
148 | .dev = { | ||
149 | .platform_data = &scif4_platform_data, | ||
150 | }, | ||
151 | }; | ||
152 | |||
153 | /* SCIFA5 */ | ||
154 | static struct plat_sci_port scif5_platform_data = { | ||
155 | .mapbase = 0xe6cb0000, | ||
156 | .flags = UPF_BOOT_AUTOCONF, | ||
157 | .scscr = SCSCR_RE | SCSCR_TE, | ||
158 | .scbrr_algo_id = SCBRR_ALGO_4, | ||
159 | .type = PORT_SCIFA, | ||
160 | .irqs = { evt2irq(0xd40), evt2irq(0xd40), | ||
161 | evt2irq(0xd40), evt2irq(0xd40) }, | ||
162 | }; | ||
163 | |||
164 | static struct platform_device scif5_device = { | ||
165 | .name = "sh-sci", | ||
166 | .id = 5, | ||
167 | .dev = { | ||
168 | .platform_data = &scif5_platform_data, | ||
169 | }, | ||
170 | }; | ||
171 | |||
172 | /* SCIFA6 */ | ||
173 | static struct plat_sci_port scif6_platform_data = { | ||
174 | .mapbase = 0xe6cc0000, | ||
175 | .flags = UPF_BOOT_AUTOCONF, | ||
176 | .scscr = SCSCR_RE | SCSCR_TE, | ||
177 | .scbrr_algo_id = SCBRR_ALGO_4, | ||
178 | .type = PORT_SCIFA, | ||
179 | .irqs = { intcs_evt2irq(0x1a80), intcs_evt2irq(0x1a80), | ||
180 | intcs_evt2irq(0x1a80), intcs_evt2irq(0x1a80) }, | ||
181 | }; | ||
182 | |||
183 | static struct platform_device scif6_device = { | ||
184 | .name = "sh-sci", | ||
185 | .id = 6, | ||
186 | .dev = { | ||
187 | .platform_data = &scif6_platform_data, | ||
188 | }, | ||
189 | }; | ||
190 | |||
191 | /* SCIFB */ | ||
192 | static struct plat_sci_port scif7_platform_data = { | ||
193 | .mapbase = 0xe6c30000, | ||
194 | .flags = UPF_BOOT_AUTOCONF, | ||
195 | .scscr = SCSCR_RE | SCSCR_TE, | ||
196 | .scbrr_algo_id = SCBRR_ALGO_4, | ||
197 | .type = PORT_SCIFB, | ||
198 | .irqs = { evt2irq(0xd60), evt2irq(0xd60), | ||
199 | evt2irq(0xd60), evt2irq(0xd60) }, | ||
200 | }; | ||
201 | |||
202 | static struct platform_device scif7_device = { | ||
203 | .name = "sh-sci", | ||
204 | .id = 7, | ||
205 | .dev = { | ||
206 | .platform_data = &scif7_platform_data, | ||
207 | }, | ||
208 | }; | ||
209 | |||
210 | static struct sh_timer_config cmt10_platform_data = { | ||
211 | .name = "CMT10", | ||
212 | .channel_offset = 0x10, | ||
213 | .timer_bit = 0, | ||
214 | .clockevent_rating = 125, | ||
215 | .clocksource_rating = 125, | ||
216 | }; | ||
217 | |||
218 | static struct resource cmt10_resources[] = { | ||
219 | [0] = { | ||
220 | .name = "CMT10", | ||
221 | .start = 0xe6138010, | ||
222 | .end = 0xe613801b, | ||
223 | .flags = IORESOURCE_MEM, | ||
224 | }, | ||
225 | [1] = { | ||
226 | .start = evt2irq(0xb00), /* CMT1_CMT10 */ | ||
227 | .flags = IORESOURCE_IRQ, | ||
228 | }, | ||
229 | }; | ||
230 | |||
231 | static struct platform_device cmt10_device = { | ||
232 | .name = "sh_cmt", | ||
233 | .id = 10, | ||
234 | .dev = { | ||
235 | .platform_data = &cmt10_platform_data, | ||
236 | }, | ||
237 | .resource = cmt10_resources, | ||
238 | .num_resources = ARRAY_SIZE(cmt10_resources), | ||
239 | }; | ||
240 | |||
241 | /* VPU */ | ||
242 | static struct uio_info vpu_platform_data = { | ||
243 | .name = "VPU5HG", | ||
244 | .version = "0", | ||
245 | .irq = intcs_evt2irq(0x980), | ||
246 | }; | ||
247 | |||
248 | static struct resource vpu_resources[] = { | ||
249 | [0] = { | ||
250 | .name = "VPU", | ||
251 | .start = 0xfe900000, | ||
252 | .end = 0xfe900157, | ||
253 | .flags = IORESOURCE_MEM, | ||
254 | }, | ||
255 | }; | ||
256 | |||
257 | static struct platform_device vpu_device = { | ||
258 | .name = "uio_pdrv_genirq", | ||
259 | .id = 0, | ||
260 | .dev = { | ||
261 | .platform_data = &vpu_platform_data, | ||
262 | }, | ||
263 | .resource = vpu_resources, | ||
264 | .num_resources = ARRAY_SIZE(vpu_resources), | ||
265 | }; | ||
266 | |||
267 | /* VEU0 */ | ||
268 | static struct uio_info veu0_platform_data = { | ||
269 | .name = "VEU0", | ||
270 | .version = "0", | ||
271 | .irq = intcs_evt2irq(0x700), | ||
272 | }; | ||
273 | |||
274 | static struct resource veu0_resources[] = { | ||
275 | [0] = { | ||
276 | .name = "VEU0", | ||
277 | .start = 0xfe920000, | ||
278 | .end = 0xfe9200cb, | ||
279 | .flags = IORESOURCE_MEM, | ||
280 | }, | ||
281 | }; | ||
282 | |||
283 | static struct platform_device veu0_device = { | ||
284 | .name = "uio_pdrv_genirq", | ||
285 | .id = 1, | ||
286 | .dev = { | ||
287 | .platform_data = &veu0_platform_data, | ||
288 | }, | ||
289 | .resource = veu0_resources, | ||
290 | .num_resources = ARRAY_SIZE(veu0_resources), | ||
291 | }; | ||
292 | |||
293 | /* VEU1 */ | ||
294 | static struct uio_info veu1_platform_data = { | ||
295 | .name = "VEU1", | ||
296 | .version = "0", | ||
297 | .irq = intcs_evt2irq(0x720), | ||
298 | }; | ||
299 | |||
300 | static struct resource veu1_resources[] = { | ||
301 | [0] = { | ||
302 | .name = "VEU1", | ||
303 | .start = 0xfe924000, | ||
304 | .end = 0xfe9240cb, | ||
305 | .flags = IORESOURCE_MEM, | ||
306 | }, | ||
307 | }; | ||
308 | |||
309 | static struct platform_device veu1_device = { | ||
310 | .name = "uio_pdrv_genirq", | ||
311 | .id = 2, | ||
312 | .dev = { | ||
313 | .platform_data = &veu1_platform_data, | ||
314 | }, | ||
315 | .resource = veu1_resources, | ||
316 | .num_resources = ARRAY_SIZE(veu1_resources), | ||
317 | }; | ||
318 | |||
319 | /* VEU2 */ | ||
320 | static struct uio_info veu2_platform_data = { | ||
321 | .name = "VEU2", | ||
322 | .version = "0", | ||
323 | .irq = intcs_evt2irq(0x740), | ||
324 | }; | ||
325 | |||
326 | static struct resource veu2_resources[] = { | ||
327 | [0] = { | ||
328 | .name = "VEU2", | ||
329 | .start = 0xfe928000, | ||
330 | .end = 0xfe928307, | ||
331 | .flags = IORESOURCE_MEM, | ||
332 | }, | ||
333 | }; | ||
334 | |||
335 | static struct platform_device veu2_device = { | ||
336 | .name = "uio_pdrv_genirq", | ||
337 | .id = 3, | ||
338 | .dev = { | ||
339 | .platform_data = &veu2_platform_data, | ||
340 | }, | ||
341 | .resource = veu2_resources, | ||
342 | .num_resources = ARRAY_SIZE(veu2_resources), | ||
343 | }; | ||
344 | |||
345 | /* VEU3 */ | ||
346 | static struct uio_info veu3_platform_data = { | ||
347 | .name = "VEU3", | ||
348 | .version = "0", | ||
349 | .irq = intcs_evt2irq(0x760), | ||
350 | }; | ||
351 | |||
352 | static struct resource veu3_resources[] = { | ||
353 | [0] = { | ||
354 | .name = "VEU3", | ||
355 | .start = 0xfe92c000, | ||
356 | .end = 0xfe92c307, | ||
357 | .flags = IORESOURCE_MEM, | ||
358 | }, | ||
359 | }; | ||
360 | |||
361 | static struct platform_device veu3_device = { | ||
362 | .name = "uio_pdrv_genirq", | ||
363 | .id = 4, | ||
364 | .dev = { | ||
365 | .platform_data = &veu3_platform_data, | ||
366 | }, | ||
367 | .resource = veu3_resources, | ||
368 | .num_resources = ARRAY_SIZE(veu3_resources), | ||
369 | }; | ||
370 | |||
371 | /* JPU */ | ||
372 | static struct uio_info jpu_platform_data = { | ||
373 | .name = "JPU", | ||
374 | .version = "0", | ||
375 | .irq = intcs_evt2irq(0x560), | ||
376 | }; | ||
377 | |||
378 | static struct resource jpu_resources[] = { | ||
379 | [0] = { | ||
380 | .name = "JPU", | ||
381 | .start = 0xfe980000, | ||
382 | .end = 0xfe9902d3, | ||
383 | .flags = IORESOURCE_MEM, | ||
384 | }, | ||
385 | }; | ||
386 | |||
387 | static struct platform_device jpu_device = { | ||
388 | .name = "uio_pdrv_genirq", | ||
389 | .id = 5, | ||
390 | .dev = { | ||
391 | .platform_data = &jpu_platform_data, | ||
392 | }, | ||
393 | .resource = jpu_resources, | ||
394 | .num_resources = ARRAY_SIZE(jpu_resources), | ||
395 | }; | ||
396 | |||
397 | /* SPU2DSP0 */ | ||
398 | static struct uio_info spu0_platform_data = { | ||
399 | .name = "SPU2DSP0", | ||
400 | .version = "0", | ||
401 | .irq = evt2irq(0x1800), | ||
402 | }; | ||
403 | |||
404 | static struct resource spu0_resources[] = { | ||
405 | [0] = { | ||
406 | .name = "SPU2DSP0", | ||
407 | .start = 0xfe200000, | ||
408 | .end = 0xfe2fffff, | ||
409 | .flags = IORESOURCE_MEM, | ||
410 | }, | ||
411 | }; | ||
412 | |||
413 | static struct platform_device spu0_device = { | ||
414 | .name = "uio_pdrv_genirq", | ||
415 | .id = 6, | ||
416 | .dev = { | ||
417 | .platform_data = &spu0_platform_data, | ||
418 | }, | ||
419 | .resource = spu0_resources, | ||
420 | .num_resources = ARRAY_SIZE(spu0_resources), | ||
421 | }; | ||
422 | |||
423 | /* SPU2DSP1 */ | ||
424 | static struct uio_info spu1_platform_data = { | ||
425 | .name = "SPU2DSP1", | ||
426 | .version = "0", | ||
427 | .irq = evt2irq(0x1820), | ||
428 | }; | ||
429 | |||
430 | static struct resource spu1_resources[] = { | ||
431 | [0] = { | ||
432 | .name = "SPU2DSP1", | ||
433 | .start = 0xfe300000, | ||
434 | .end = 0xfe3fffff, | ||
435 | .flags = IORESOURCE_MEM, | ||
436 | }, | ||
437 | }; | ||
438 | |||
439 | static struct platform_device spu1_device = { | ||
440 | .name = "uio_pdrv_genirq", | ||
441 | .id = 7, | ||
442 | .dev = { | ||
443 | .platform_data = &spu1_platform_data, | ||
444 | }, | ||
445 | .resource = spu1_resources, | ||
446 | .num_resources = ARRAY_SIZE(spu1_resources), | ||
447 | }; | ||
448 | |||
449 | static struct platform_device *sh7377_early_devices[] __initdata = { | ||
450 | &scif0_device, | ||
451 | &scif1_device, | ||
452 | &scif2_device, | ||
453 | &scif3_device, | ||
454 | &scif4_device, | ||
455 | &scif5_device, | ||
456 | &scif6_device, | ||
457 | &scif7_device, | ||
458 | &cmt10_device, | ||
459 | }; | ||
460 | |||
461 | static struct platform_device *sh7377_devices[] __initdata = { | ||
462 | &vpu_device, | ||
463 | &veu0_device, | ||
464 | &veu1_device, | ||
465 | &veu2_device, | ||
466 | &veu3_device, | ||
467 | &jpu_device, | ||
468 | &spu0_device, | ||
469 | &spu1_device, | ||
470 | }; | ||
471 | |||
472 | void __init sh7377_add_standard_devices(void) | ||
473 | { | ||
474 | platform_add_devices(sh7377_early_devices, | ||
475 | ARRAY_SIZE(sh7377_early_devices)); | ||
476 | |||
477 | platform_add_devices(sh7377_devices, | ||
478 | ARRAY_SIZE(sh7377_devices)); | ||
479 | } | ||
480 | |||
481 | static void __init sh7377_earlytimer_init(void) | ||
482 | { | ||
483 | sh7377_clock_init(); | ||
484 | shmobile_earlytimer_init(); | ||
485 | } | ||
486 | |||
487 | #define SMSTPCR3 IOMEM(0xe615013c) | ||
488 | #define SMSTPCR3_CMT1 (1 << 29) | ||
489 | |||
490 | void __init sh7377_add_early_devices(void) | ||
491 | { | ||
492 | /* enable clock to CMT1 */ | ||
493 | __raw_writel(__raw_readl(SMSTPCR3) & ~SMSTPCR3_CMT1, SMSTPCR3); | ||
494 | |||
495 | early_platform_add_devices(sh7377_early_devices, | ||
496 | ARRAY_SIZE(sh7377_early_devices)); | ||
497 | |||
498 | /* setup early console here as well */ | ||
499 | shmobile_setup_console(); | ||
500 | |||
501 | /* override timer setup with soc-specific code */ | ||
502 | shmobile_timer.init = sh7377_earlytimer_init; | ||
503 | } | ||
504 | |||
505 | #ifdef CONFIG_USE_OF | ||
506 | |||
507 | void __init sh7377_add_early_devices_dt(void) | ||
508 | { | ||
509 | shmobile_setup_delay(600, 1, 3); /* Cortex-A8 @ 600MHz */ | ||
510 | |||
511 | early_platform_add_devices(sh7377_early_devices, | ||
512 | ARRAY_SIZE(sh7377_early_devices)); | ||
513 | |||
514 | /* setup early console here as well */ | ||
515 | shmobile_setup_console(); | ||
516 | } | ||
517 | |||
518 | static const struct of_dev_auxdata sh7377_auxdata_lookup[] __initconst = { | ||
519 | { } | ||
520 | }; | ||
521 | |||
522 | void __init sh7377_add_standard_devices_dt(void) | ||
523 | { | ||
524 | /* clocks are setup late during boot in the case of DT */ | ||
525 | sh7377_clock_init(); | ||
526 | |||
527 | platform_add_devices(sh7377_early_devices, | ||
528 | ARRAY_SIZE(sh7377_early_devices)); | ||
529 | |||
530 | of_platform_populate(NULL, of_default_bus_match_table, | ||
531 | sh7377_auxdata_lookup, NULL); | ||
532 | } | ||
533 | |||
534 | static const char *sh7377_boards_compat_dt[] __initdata = { | ||
535 | "renesas,sh7377", | ||
536 | NULL, | ||
537 | }; | ||
538 | |||
539 | DT_MACHINE_START(SH7377_DT, "Generic SH7377 (Flattened Device Tree)") | ||
540 | .map_io = sh7377_map_io, | ||
541 | .init_early = sh7377_add_early_devices_dt, | ||
542 | .init_irq = sh7377_init_irq, | ||
543 | .handle_irq = shmobile_handle_irq_intc, | ||
544 | .init_machine = sh7377_add_standard_devices_dt, | ||
545 | .timer = &shmobile_timer, | ||
546 | .dt_compat = sh7377_boards_compat_dt, | ||
547 | MACHINE_END | ||
548 | |||
549 | #endif /* CONFIG_USE_OF */ | ||
diff --git a/arch/arm/mach-shmobile/smp-emev2.c b/arch/arm/mach-shmobile/smp-emev2.c index f67456286280..535426c306bd 100644 --- a/arch/arm/mach-shmobile/smp-emev2.c +++ b/arch/arm/mach-shmobile/smp-emev2.c | |||
@@ -32,24 +32,8 @@ | |||
32 | 32 | ||
33 | #define EMEV2_SCU_BASE 0x1e000000 | 33 | #define EMEV2_SCU_BASE 0x1e000000 |
34 | 34 | ||
35 | static DEFINE_SPINLOCK(scu_lock); | ||
36 | static void __iomem *scu_base; | 35 | static void __iomem *scu_base; |
37 | 36 | ||
38 | static void modify_scu_cpu_psr(unsigned long set, unsigned long clr) | ||
39 | { | ||
40 | unsigned long tmp; | ||
41 | |||
42 | /* we assume this code is running on a different cpu | ||
43 | * than the one that is changing coherency setting */ | ||
44 | spin_lock(&scu_lock); | ||
45 | tmp = readl(scu_base + 8); | ||
46 | tmp &= ~clr; | ||
47 | tmp |= set; | ||
48 | writel(tmp, scu_base + 8); | ||
49 | spin_unlock(&scu_lock); | ||
50 | |||
51 | } | ||
52 | |||
53 | static unsigned int __init emev2_get_core_count(void) | 37 | static unsigned int __init emev2_get_core_count(void) |
54 | { | 38 | { |
55 | if (!scu_base) { | 39 | if (!scu_base) { |
@@ -95,7 +79,7 @@ static int __cpuinit emev2_boot_secondary(unsigned int cpu, struct task_struct * | |||
95 | cpu = cpu_logical_map(cpu); | 79 | cpu = cpu_logical_map(cpu); |
96 | 80 | ||
97 | /* enable cache coherency */ | 81 | /* enable cache coherency */ |
98 | modify_scu_cpu_psr(0, 3 << (cpu * 8)); | 82 | scu_power_mode(scu_base, 0); |
99 | 83 | ||
100 | /* Tell ROM loader about our vector (in headsmp.S) */ | 84 | /* Tell ROM loader about our vector (in headsmp.S) */ |
101 | emev2_set_boot_vector(__pa(shmobile_secondary_vector)); | 85 | emev2_set_boot_vector(__pa(shmobile_secondary_vector)); |
@@ -106,12 +90,10 @@ static int __cpuinit emev2_boot_secondary(unsigned int cpu, struct task_struct * | |||
106 | 90 | ||
107 | static void __init emev2_smp_prepare_cpus(unsigned int max_cpus) | 91 | static void __init emev2_smp_prepare_cpus(unsigned int max_cpus) |
108 | { | 92 | { |
109 | int cpu = cpu_logical_map(0); | ||
110 | |||
111 | scu_enable(scu_base); | 93 | scu_enable(scu_base); |
112 | 94 | ||
113 | /* enable cache coherency on CPU0 */ | 95 | /* enable cache coherency on CPU0 */ |
114 | modify_scu_cpu_psr(0, 3 << (cpu * 8)); | 96 | scu_power_mode(scu_base, 0); |
115 | } | 97 | } |
116 | 98 | ||
117 | static void __init emev2_smp_init_cpus(void) | 99 | static void __init emev2_smp_init_cpus(void) |
diff --git a/arch/arm/mach-shmobile/smp-r8a7779.c b/arch/arm/mach-shmobile/smp-r8a7779.c index 2ce6af9a6a37..9def0f22bf22 100644 --- a/arch/arm/mach-shmobile/smp-r8a7779.c +++ b/arch/arm/mach-shmobile/smp-r8a7779.c | |||
@@ -61,9 +61,6 @@ static void __iomem *scu_base_addr(void) | |||
61 | return (void __iomem *)0xf0000000; | 61 | return (void __iomem *)0xf0000000; |
62 | } | 62 | } |
63 | 63 | ||
64 | static DEFINE_SPINLOCK(scu_lock); | ||
65 | static unsigned long tmp; | ||
66 | |||
67 | #ifdef CONFIG_HAVE_ARM_TWD | 64 | #ifdef CONFIG_HAVE_ARM_TWD |
68 | static DEFINE_TWD_LOCAL_TIMER(twd_local_timer, 0xf0000600, 29); | 65 | static DEFINE_TWD_LOCAL_TIMER(twd_local_timer, 0xf0000600, 29); |
69 | 66 | ||
@@ -73,20 +70,6 @@ void __init r8a7779_register_twd(void) | |||
73 | } | 70 | } |
74 | #endif | 71 | #endif |
75 | 72 | ||
76 | static void modify_scu_cpu_psr(unsigned long set, unsigned long clr) | ||
77 | { | ||
78 | void __iomem *scu_base = scu_base_addr(); | ||
79 | |||
80 | spin_lock(&scu_lock); | ||
81 | tmp = __raw_readl(scu_base + 8); | ||
82 | tmp &= ~clr; | ||
83 | tmp |= set; | ||
84 | spin_unlock(&scu_lock); | ||
85 | |||
86 | /* disable cache coherency after releasing the lock */ | ||
87 | __raw_writel(tmp, scu_base + 8); | ||
88 | } | ||
89 | |||
90 | static unsigned int __init r8a7779_get_core_count(void) | 73 | static unsigned int __init r8a7779_get_core_count(void) |
91 | { | 74 | { |
92 | void __iomem *scu_base = scu_base_addr(); | 75 | void __iomem *scu_base = scu_base_addr(); |
@@ -102,7 +85,7 @@ static int r8a7779_platform_cpu_kill(unsigned int cpu) | |||
102 | cpu = cpu_logical_map(cpu); | 85 | cpu = cpu_logical_map(cpu); |
103 | 86 | ||
104 | /* disable cache coherency */ | 87 | /* disable cache coherency */ |
105 | modify_scu_cpu_psr(3 << (cpu * 8), 0); | 88 | scu_power_mode(scu_base_addr(), 3); |
106 | 89 | ||
107 | if (cpu < ARRAY_SIZE(r8a7779_ch_cpu)) | 90 | if (cpu < ARRAY_SIZE(r8a7779_ch_cpu)) |
108 | ch = r8a7779_ch_cpu[cpu]; | 91 | ch = r8a7779_ch_cpu[cpu]; |
@@ -145,7 +128,7 @@ static int __cpuinit r8a7779_boot_secondary(unsigned int cpu, struct task_struct | |||
145 | cpu = cpu_logical_map(cpu); | 128 | cpu = cpu_logical_map(cpu); |
146 | 129 | ||
147 | /* enable cache coherency */ | 130 | /* enable cache coherency */ |
148 | modify_scu_cpu_psr(0, 3 << (cpu * 8)); | 131 | scu_power_mode(scu_base_addr(), 0); |
149 | 132 | ||
150 | if (cpu < ARRAY_SIZE(r8a7779_ch_cpu)) | 133 | if (cpu < ARRAY_SIZE(r8a7779_ch_cpu)) |
151 | ch = r8a7779_ch_cpu[cpu]; | 134 | ch = r8a7779_ch_cpu[cpu]; |
@@ -158,15 +141,13 @@ static int __cpuinit r8a7779_boot_secondary(unsigned int cpu, struct task_struct | |||
158 | 141 | ||
159 | static void __init r8a7779_smp_prepare_cpus(unsigned int max_cpus) | 142 | static void __init r8a7779_smp_prepare_cpus(unsigned int max_cpus) |
160 | { | 143 | { |
161 | int cpu = cpu_logical_map(0); | ||
162 | |||
163 | scu_enable(scu_base_addr()); | 144 | scu_enable(scu_base_addr()); |
164 | 145 | ||
165 | /* Map the reset vector (in headsmp.S) */ | 146 | /* Map the reset vector (in headsmp.S) */ |
166 | __raw_writel(__pa(shmobile_secondary_vector), AVECR); | 147 | __raw_writel(__pa(shmobile_secondary_vector), AVECR); |
167 | 148 | ||
168 | /* enable cache coherency on CPU0 */ | 149 | /* enable cache coherency on CPU0 */ |
169 | modify_scu_cpu_psr(0, 3 << (cpu * 8)); | 150 | scu_power_mode(scu_base_addr(), 0); |
170 | 151 | ||
171 | r8a7779_pm_init(); | 152 | r8a7779_pm_init(); |
172 | 153 | ||
diff --git a/arch/arm/mach-shmobile/smp-sh73a0.c b/arch/arm/mach-shmobile/smp-sh73a0.c index 624f00f70abf..96ddb97babbe 100644 --- a/arch/arm/mach-shmobile/smp-sh73a0.c +++ b/arch/arm/mach-shmobile/smp-sh73a0.c | |||
@@ -41,9 +41,6 @@ static void __iomem *scu_base_addr(void) | |||
41 | return (void __iomem *)0xf0000000; | 41 | return (void __iomem *)0xf0000000; |
42 | } | 42 | } |
43 | 43 | ||
44 | static DEFINE_SPINLOCK(scu_lock); | ||
45 | static unsigned long tmp; | ||
46 | |||
47 | #ifdef CONFIG_HAVE_ARM_TWD | 44 | #ifdef CONFIG_HAVE_ARM_TWD |
48 | static DEFINE_TWD_LOCAL_TIMER(twd_local_timer, 0xf0000600, 29); | 45 | static DEFINE_TWD_LOCAL_TIMER(twd_local_timer, 0xf0000600, 29); |
49 | void __init sh73a0_register_twd(void) | 46 | void __init sh73a0_register_twd(void) |
@@ -52,20 +49,6 @@ void __init sh73a0_register_twd(void) | |||
52 | } | 49 | } |
53 | #endif | 50 | #endif |
54 | 51 | ||
55 | static void modify_scu_cpu_psr(unsigned long set, unsigned long clr) | ||
56 | { | ||
57 | void __iomem *scu_base = scu_base_addr(); | ||
58 | |||
59 | spin_lock(&scu_lock); | ||
60 | tmp = __raw_readl(scu_base + 8); | ||
61 | tmp &= ~clr; | ||
62 | tmp |= set; | ||
63 | spin_unlock(&scu_lock); | ||
64 | |||
65 | /* disable cache coherency after releasing the lock */ | ||
66 | __raw_writel(tmp, scu_base + 8); | ||
67 | } | ||
68 | |||
69 | static unsigned int __init sh73a0_get_core_count(void) | 52 | static unsigned int __init sh73a0_get_core_count(void) |
70 | { | 53 | { |
71 | void __iomem *scu_base = scu_base_addr(); | 54 | void __iomem *scu_base = scu_base_addr(); |
@@ -83,7 +66,7 @@ static int __cpuinit sh73a0_boot_secondary(unsigned int cpu, struct task_struct | |||
83 | cpu = cpu_logical_map(cpu); | 66 | cpu = cpu_logical_map(cpu); |
84 | 67 | ||
85 | /* enable cache coherency */ | 68 | /* enable cache coherency */ |
86 | modify_scu_cpu_psr(0, 3 << (cpu * 8)); | 69 | scu_power_mode(scu_base_addr(), 0); |
87 | 70 | ||
88 | if (((__raw_readl(PSTR) >> (4 * cpu)) & 3) == 3) | 71 | if (((__raw_readl(PSTR) >> (4 * cpu)) & 3) == 3) |
89 | __raw_writel(1 << cpu, WUPCR); /* wake up */ | 72 | __raw_writel(1 << cpu, WUPCR); /* wake up */ |
@@ -95,8 +78,6 @@ static int __cpuinit sh73a0_boot_secondary(unsigned int cpu, struct task_struct | |||
95 | 78 | ||
96 | static void __init sh73a0_smp_prepare_cpus(unsigned int max_cpus) | 79 | static void __init sh73a0_smp_prepare_cpus(unsigned int max_cpus) |
97 | { | 80 | { |
98 | int cpu = cpu_logical_map(0); | ||
99 | |||
100 | scu_enable(scu_base_addr()); | 81 | scu_enable(scu_base_addr()); |
101 | 82 | ||
102 | /* Map the reset vector (in headsmp.S) */ | 83 | /* Map the reset vector (in headsmp.S) */ |
@@ -104,7 +85,7 @@ static void __init sh73a0_smp_prepare_cpus(unsigned int max_cpus) | |||
104 | __raw_writel(__pa(shmobile_secondary_vector), SBAR); | 85 | __raw_writel(__pa(shmobile_secondary_vector), SBAR); |
105 | 86 | ||
106 | /* enable cache coherency on CPU0 */ | 87 | /* enable cache coherency on CPU0 */ |
107 | modify_scu_cpu_psr(0, 3 << (cpu * 8)); | 88 | scu_power_mode(scu_base_addr(), 0); |
108 | } | 89 | } |
109 | 90 | ||
110 | static void __init sh73a0_smp_init_cpus(void) | 91 | static void __init sh73a0_smp_init_cpus(void) |
diff --git a/arch/arm/mach-sunxi/Kconfig b/arch/arm/mach-sunxi/Kconfig new file mode 100644 index 000000000000..3fdd0085e306 --- /dev/null +++ b/arch/arm/mach-sunxi/Kconfig | |||
@@ -0,0 +1,9 @@ | |||
1 | config ARCH_SUNXI | ||
2 | bool "Allwinner A1X SOCs" if ARCH_MULTI_V7 | ||
3 | select CLKSRC_MMIO | ||
4 | select COMMON_CLK | ||
5 | select GENERIC_CLOCKEVENTS | ||
6 | select GENERIC_IRQ_CHIP | ||
7 | select PINCTRL | ||
8 | select SPARSE_IRQ | ||
9 | select SUNXI_TIMER | ||
diff --git a/arch/arm/mach-sunxi/Makefile b/arch/arm/mach-sunxi/Makefile new file mode 100644 index 000000000000..93bebfc3ff9f --- /dev/null +++ b/arch/arm/mach-sunxi/Makefile | |||
@@ -0,0 +1 @@ | |||
obj-$(CONFIG_ARCH_SUNXI) += sunxi.o | |||
diff --git a/arch/arm/mach-sunxi/Makefile.boot b/arch/arm/mach-sunxi/Makefile.boot new file mode 100644 index 000000000000..46d4cf0841c0 --- /dev/null +++ b/arch/arm/mach-sunxi/Makefile.boot | |||
@@ -0,0 +1 @@ | |||
zreladdr-$(CONFIG_ARCH_SUNXI) += 0x40008000 | |||
diff --git a/arch/arm/mach-sunxi/sunxi.c b/arch/arm/mach-sunxi/sunxi.c new file mode 100644 index 000000000000..9be910f7920b --- /dev/null +++ b/arch/arm/mach-sunxi/sunxi.c | |||
@@ -0,0 +1,96 @@ | |||
1 | /* | ||
2 | * Device Tree support for Allwinner A1X SoCs | ||
3 | * | ||
4 | * Copyright (C) 2012 Maxime Ripard | ||
5 | * | ||
6 | * Maxime Ripard <maxime.ripard@free-electrons.com> | ||
7 | * | ||
8 | * This file is licensed under the terms of the GNU General Public | ||
9 | * License version 2. This program is licensed "as is" without any | ||
10 | * warranty of any kind, whether express or implied. | ||
11 | */ | ||
12 | |||
13 | #include <linux/delay.h> | ||
14 | #include <linux/kernel.h> | ||
15 | #include <linux/init.h> | ||
16 | #include <linux/of_address.h> | ||
17 | #include <linux/of_irq.h> | ||
18 | #include <linux/of_platform.h> | ||
19 | #include <linux/io.h> | ||
20 | #include <linux/sunxi_timer.h> | ||
21 | |||
22 | #include <linux/irqchip/sunxi.h> | ||
23 | |||
24 | #include <asm/hardware/vic.h> | ||
25 | |||
26 | #include <asm/mach/arch.h> | ||
27 | #include <asm/mach/map.h> | ||
28 | |||
29 | #include "sunxi.h" | ||
30 | |||
31 | #define WATCHDOG_CTRL_REG 0x00 | ||
32 | #define WATCHDOG_MODE_REG 0x04 | ||
33 | |||
34 | static void __iomem *wdt_base; | ||
35 | |||
36 | static void sunxi_setup_restart(void) | ||
37 | { | ||
38 | struct device_node *np = of_find_compatible_node(NULL, NULL, | ||
39 | "allwinner,sunxi-wdt"); | ||
40 | if (WARN(!np, "unable to setup watchdog restart")) | ||
41 | return; | ||
42 | |||
43 | wdt_base = of_iomap(np, 0); | ||
44 | WARN(!wdt_base, "failed to map watchdog base address"); | ||
45 | } | ||
46 | |||
47 | static void sunxi_restart(char mode, const char *cmd) | ||
48 | { | ||
49 | if (!wdt_base) | ||
50 | return; | ||
51 | |||
52 | /* Enable timer and set reset bit in the watchdog */ | ||
53 | writel(3, wdt_base + WATCHDOG_MODE_REG); | ||
54 | writel(0xa57 << 1 | 1, wdt_base + WATCHDOG_CTRL_REG); | ||
55 | while(1) { | ||
56 | mdelay(5); | ||
57 | writel(3, wdt_base + WATCHDOG_MODE_REG); | ||
58 | } | ||
59 | } | ||
60 | |||
61 | static struct map_desc sunxi_io_desc[] __initdata = { | ||
62 | { | ||
63 | .virtual = (unsigned long) SUNXI_REGS_VIRT_BASE, | ||
64 | .pfn = __phys_to_pfn(SUNXI_REGS_PHYS_BASE), | ||
65 | .length = SUNXI_REGS_SIZE, | ||
66 | .type = MT_DEVICE, | ||
67 | }, | ||
68 | }; | ||
69 | |||
70 | void __init sunxi_map_io(void) | ||
71 | { | ||
72 | iotable_init(sunxi_io_desc, ARRAY_SIZE(sunxi_io_desc)); | ||
73 | } | ||
74 | |||
75 | static void __init sunxi_dt_init(void) | ||
76 | { | ||
77 | sunxi_setup_restart(); | ||
78 | |||
79 | of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); | ||
80 | } | ||
81 | |||
82 | static const char * const sunxi_board_dt_compat[] = { | ||
83 | "allwinner,sun4i", | ||
84 | "allwinner,sun5i", | ||
85 | NULL, | ||
86 | }; | ||
87 | |||
88 | DT_MACHINE_START(SUNXI_DT, "Allwinner A1X (Device Tree)") | ||
89 | .init_machine = sunxi_dt_init, | ||
90 | .map_io = sunxi_map_io, | ||
91 | .init_irq = sunxi_init_irq, | ||
92 | .handle_irq = sunxi_handle_irq, | ||
93 | .restart = sunxi_restart, | ||
94 | .timer = &sunxi_timer, | ||
95 | .dt_compat = sunxi_board_dt_compat, | ||
96 | MACHINE_END | ||
diff --git a/arch/arm/mach-sunxi/sunxi.h b/arch/arm/mach-sunxi/sunxi.h new file mode 100644 index 000000000000..33b58712adea --- /dev/null +++ b/arch/arm/mach-sunxi/sunxi.h | |||
@@ -0,0 +1,20 @@ | |||
1 | /* | ||
2 | * Generic definitions for Allwinner SunXi SoCs | ||
3 | * | ||
4 | * Copyright (C) 2012 Maxime Ripard | ||
5 | * | ||
6 | * Maxime Ripard <maxime.ripard@free-electrons.com> | ||
7 | * | ||
8 | * This file is licensed under the terms of the GNU General Public | ||
9 | * License version 2. This program is licensed "as is" without any | ||
10 | * warranty of any kind, whether express or implied. | ||
11 | */ | ||
12 | |||
13 | #ifndef __MACH_SUNXI_H | ||
14 | #define __MACH_SUNXI_H | ||
15 | |||
16 | #define SUNXI_REGS_PHYS_BASE 0x01c00000 | ||
17 | #define SUNXI_REGS_VIRT_BASE IOMEM(0xf1c00000) | ||
18 | #define SUNXI_REGS_SIZE (SZ_2M + SZ_1M) | ||
19 | |||
20 | #endif /* __MACH_SUNXI_H */ | ||
diff --git a/arch/arm/mach-tegra/Makefile b/arch/arm/mach-tegra/Makefile index 9aa653b3eb32..0979e8bba78a 100644 --- a/arch/arm/mach-tegra/Makefile +++ b/arch/arm/mach-tegra/Makefile | |||
@@ -8,15 +8,24 @@ obj-y += pmc.o | |||
8 | obj-y += flowctrl.o | 8 | obj-y += flowctrl.o |
9 | obj-y += powergate.o | 9 | obj-y += powergate.o |
10 | obj-y += apbio.o | 10 | obj-y += apbio.o |
11 | obj-y += pm.o | ||
11 | obj-$(CONFIG_CPU_IDLE) += cpuidle.o | 12 | obj-$(CONFIG_CPU_IDLE) += cpuidle.o |
12 | obj-$(CONFIG_CPU_IDLE) += sleep.o | 13 | obj-$(CONFIG_CPU_IDLE) += sleep.o |
13 | obj-$(CONFIG_ARCH_TEGRA_2x_SOC) += tegra20_clocks.o | 14 | obj-$(CONFIG_ARCH_TEGRA_2x_SOC) += tegra20_clocks.o |
14 | obj-$(CONFIG_ARCH_TEGRA_2x_SOC) += tegra20_clocks_data.o | 15 | obj-$(CONFIG_ARCH_TEGRA_2x_SOC) += tegra20_clocks_data.o |
16 | obj-$(CONFIG_ARCH_TEGRA_2x_SOC) += tegra20_speedo.o | ||
15 | obj-$(CONFIG_ARCH_TEGRA_2x_SOC) += tegra2_emc.o | 17 | obj-$(CONFIG_ARCH_TEGRA_2x_SOC) += tegra2_emc.o |
16 | obj-$(CONFIG_ARCH_TEGRA_2x_SOC) += sleep-t20.o | 18 | obj-$(CONFIG_ARCH_TEGRA_2x_SOC) += sleep-tegra20.o |
19 | ifeq ($(CONFIG_CPU_IDLE),y) | ||
20 | obj-$(CONFIG_ARCH_TEGRA_2x_SOC) += cpuidle-tegra20.o | ||
21 | endif | ||
17 | obj-$(CONFIG_ARCH_TEGRA_3x_SOC) += tegra30_clocks.o | 22 | obj-$(CONFIG_ARCH_TEGRA_3x_SOC) += tegra30_clocks.o |
18 | obj-$(CONFIG_ARCH_TEGRA_3x_SOC) += tegra30_clocks_data.o | 23 | obj-$(CONFIG_ARCH_TEGRA_3x_SOC) += tegra30_clocks_data.o |
19 | obj-$(CONFIG_ARCH_TEGRA_3x_SOC) += sleep-t30.o | 24 | obj-$(CONFIG_ARCH_TEGRA_3x_SOC) += tegra30_speedo.o |
25 | obj-$(CONFIG_ARCH_TEGRA_3x_SOC) += sleep-tegra30.o | ||
26 | ifeq ($(CONFIG_CPU_IDLE),y) | ||
27 | obj-$(CONFIG_ARCH_TEGRA_3x_SOC) += cpuidle-tegra30.o | ||
28 | endif | ||
20 | obj-$(CONFIG_SMP) += platsmp.o headsmp.o | 29 | obj-$(CONFIG_SMP) += platsmp.o headsmp.o |
21 | obj-$(CONFIG_SMP) += reset.o | 30 | obj-$(CONFIG_SMP) += reset.o |
22 | obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o | 31 | obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o |
diff --git a/arch/arm/mach-tegra/board-dt-tegra20.c b/arch/arm/mach-tegra/board-dt-tegra20.c index 71569c01afd2..734d9cc87f2e 100644 --- a/arch/arm/mach-tegra/board-dt-tegra20.c +++ b/arch/arm/mach-tegra/board-dt-tegra20.c | |||
@@ -89,6 +89,17 @@ struct of_dev_auxdata tegra20_auxdata_lookup[] __initdata = { | |||
89 | &tegra_ehci3_pdata), | 89 | &tegra_ehci3_pdata), |
90 | OF_DEV_AUXDATA("nvidia,tegra20-apbdma", TEGRA_APB_DMA_BASE, "tegra-apbdma", NULL), | 90 | OF_DEV_AUXDATA("nvidia,tegra20-apbdma", TEGRA_APB_DMA_BASE, "tegra-apbdma", NULL), |
91 | OF_DEV_AUXDATA("nvidia,tegra20-pwm", TEGRA_PWFM_BASE, "tegra-pwm", NULL), | 91 | OF_DEV_AUXDATA("nvidia,tegra20-pwm", TEGRA_PWFM_BASE, "tegra-pwm", NULL), |
92 | OF_DEV_AUXDATA("nvidia,tegra20-sflash", 0x7000c380, "spi", NULL), | ||
93 | OF_DEV_AUXDATA("nvidia,tegra20-slink", 0x7000D400, "spi_tegra.0", NULL), | ||
94 | OF_DEV_AUXDATA("nvidia,tegra20-slink", 0x7000D600, "spi_tegra.1", NULL), | ||
95 | OF_DEV_AUXDATA("nvidia,tegra20-slink", 0x7000D800, "spi_tegra.2", NULL), | ||
96 | OF_DEV_AUXDATA("nvidia,tegra20-slink", 0x7000DA00, "spi_tegra.3", NULL), | ||
97 | OF_DEV_AUXDATA("nvidia,tegra20-host1x", 0x50000000, "host1x", NULL), | ||
98 | OF_DEV_AUXDATA("nvidia,tegra20-dc", 0x54200000, "tegradc.0", NULL), | ||
99 | OF_DEV_AUXDATA("nvidia,tegra20-dc", 0x54240000, "tegradc.1", NULL), | ||
100 | OF_DEV_AUXDATA("nvidia,tegra20-hdmi", 0x54280000, "hdmi", NULL), | ||
101 | OF_DEV_AUXDATA("nvidia,tegra20-dsi", 0x54300000, "dsi", NULL), | ||
102 | OF_DEV_AUXDATA("nvidia,tegra20-tvo", 0x542c0000, "tvo", NULL), | ||
92 | {} | 103 | {} |
93 | }; | 104 | }; |
94 | 105 | ||
@@ -102,8 +113,20 @@ static __initdata struct tegra_clk_init_table tegra_dt_clk_init_table[] = { | |||
102 | { "pll_a", "pll_p_out1", 56448000, true }, | 113 | { "pll_a", "pll_p_out1", 56448000, true }, |
103 | { "pll_a_out0", "pll_a", 11289600, true }, | 114 | { "pll_a_out0", "pll_a", 11289600, true }, |
104 | { "cdev1", NULL, 0, true }, | 115 | { "cdev1", NULL, 0, true }, |
116 | { "blink", "clk_32k", 32768, true }, | ||
105 | { "i2s1", "pll_a_out0", 11289600, false}, | 117 | { "i2s1", "pll_a_out0", 11289600, false}, |
106 | { "i2s2", "pll_a_out0", 11289600, false}, | 118 | { "i2s2", "pll_a_out0", 11289600, false}, |
119 | { "sdmmc1", "pll_p", 48000000, false}, | ||
120 | { "sdmmc3", "pll_p", 48000000, false}, | ||
121 | { "sdmmc4", "pll_p", 48000000, false}, | ||
122 | { "spi", "pll_p", 20000000, false }, | ||
123 | { "sbc1", "pll_p", 100000000, false }, | ||
124 | { "sbc2", "pll_p", 100000000, false }, | ||
125 | { "sbc3", "pll_p", 100000000, false }, | ||
126 | { "sbc4", "pll_p", 100000000, false }, | ||
127 | { "host1x", "pll_c", 150000000, false }, | ||
128 | { "disp1", "pll_p", 600000000, false }, | ||
129 | { "disp2", "pll_p", 600000000, false }, | ||
107 | { NULL, NULL, 0, 0}, | 130 | { NULL, NULL, 0, 0}, |
108 | }; | 131 | }; |
109 | 132 | ||
diff --git a/arch/arm/mach-tegra/board-dt-tegra30.c b/arch/arm/mach-tegra/board-dt-tegra30.c index e56170393a5b..6497d1236b08 100644 --- a/arch/arm/mach-tegra/board-dt-tegra30.c +++ b/arch/arm/mach-tegra/board-dt-tegra30.c | |||
@@ -51,6 +51,18 @@ struct of_dev_auxdata tegra30_auxdata_lookup[] __initdata = { | |||
51 | OF_DEV_AUXDATA("nvidia,tegra30-ahub", 0x70080000, "tegra30-ahub", NULL), | 51 | OF_DEV_AUXDATA("nvidia,tegra30-ahub", 0x70080000, "tegra30-ahub", NULL), |
52 | OF_DEV_AUXDATA("nvidia,tegra30-apbdma", 0x6000a000, "tegra-apbdma", NULL), | 52 | OF_DEV_AUXDATA("nvidia,tegra30-apbdma", 0x6000a000, "tegra-apbdma", NULL), |
53 | OF_DEV_AUXDATA("nvidia,tegra30-pwm", TEGRA_PWFM_BASE, "tegra-pwm", NULL), | 53 | OF_DEV_AUXDATA("nvidia,tegra30-pwm", TEGRA_PWFM_BASE, "tegra-pwm", NULL), |
54 | OF_DEV_AUXDATA("nvidia,tegra30-slink", 0x7000D400, "spi_tegra.0", NULL), | ||
55 | OF_DEV_AUXDATA("nvidia,tegra30-slink", 0x7000D600, "spi_tegra.1", NULL), | ||
56 | OF_DEV_AUXDATA("nvidia,tegra30-slink", 0x7000D800, "spi_tegra.2", NULL), | ||
57 | OF_DEV_AUXDATA("nvidia,tegra30-slink", 0x7000DA00, "spi_tegra.3", NULL), | ||
58 | OF_DEV_AUXDATA("nvidia,tegra30-slink", 0x7000DC00, "spi_tegra.4", NULL), | ||
59 | OF_DEV_AUXDATA("nvidia,tegra30-slink", 0x7000DE00, "spi_tegra.5", NULL), | ||
60 | OF_DEV_AUXDATA("nvidia,tegra30-host1x", 0x50000000, "host1x", NULL), | ||
61 | OF_DEV_AUXDATA("nvidia,tegra30-dc", 0x54200000, "tegradc.0", NULL), | ||
62 | OF_DEV_AUXDATA("nvidia,tegra30-dc", 0x54240000, "tegradc.1", NULL), | ||
63 | OF_DEV_AUXDATA("nvidia,tegra30-hdmi", 0x54280000, "hdmi", NULL), | ||
64 | OF_DEV_AUXDATA("nvidia,tegra30-dsi", 0x54300000, "dsi", NULL), | ||
65 | OF_DEV_AUXDATA("nvidia,tegra30-tvo", 0x542c0000, "tvo", NULL), | ||
54 | {} | 66 | {} |
55 | }; | 67 | }; |
56 | 68 | ||
@@ -61,11 +73,24 @@ static __initdata struct tegra_clk_init_table tegra_dt_clk_init_table[] = { | |||
61 | { "pll_a_out0", "pll_a", 11289600, true }, | 73 | { "pll_a_out0", "pll_a", 11289600, true }, |
62 | { "extern1", "pll_a_out0", 0, true }, | 74 | { "extern1", "pll_a_out0", 0, true }, |
63 | { "clk_out_1", "extern1", 0, true }, | 75 | { "clk_out_1", "extern1", 0, true }, |
76 | { "blink", "clk_32k", 32768, true }, | ||
64 | { "i2s0", "pll_a_out0", 11289600, false}, | 77 | { "i2s0", "pll_a_out0", 11289600, false}, |
65 | { "i2s1", "pll_a_out0", 11289600, false}, | 78 | { "i2s1", "pll_a_out0", 11289600, false}, |
66 | { "i2s2", "pll_a_out0", 11289600, false}, | 79 | { "i2s2", "pll_a_out0", 11289600, false}, |
67 | { "i2s3", "pll_a_out0", 11289600, false}, | 80 | { "i2s3", "pll_a_out0", 11289600, false}, |
68 | { "i2s4", "pll_a_out0", 11289600, false}, | 81 | { "i2s4", "pll_a_out0", 11289600, false}, |
82 | { "sdmmc1", "pll_p", 48000000, false}, | ||
83 | { "sdmmc3", "pll_p", 48000000, false}, | ||
84 | { "sdmmc4", "pll_p", 48000000, false}, | ||
85 | { "sbc1", "pll_p", 100000000, false}, | ||
86 | { "sbc2", "pll_p", 100000000, false}, | ||
87 | { "sbc3", "pll_p", 100000000, false}, | ||
88 | { "sbc4", "pll_p", 100000000, false}, | ||
89 | { "sbc5", "pll_p", 100000000, false}, | ||
90 | { "sbc6", "pll_p", 100000000, false}, | ||
91 | { "host1x", "pll_c", 150000000, false}, | ||
92 | { "disp1", "pll_p", 600000000, false}, | ||
93 | { "disp2", "pll_p", 600000000, false}, | ||
69 | { NULL, NULL, 0, 0}, | 94 | { NULL, NULL, 0, 0}, |
70 | }; | 95 | }; |
71 | 96 | ||
diff --git a/arch/arm/mach-tegra/common.c b/arch/arm/mach-tegra/common.c index f688daa74978..11a74db51e5d 100644 --- a/arch/arm/mach-tegra/common.c +++ b/arch/arm/mach-tegra/common.c | |||
@@ -36,6 +36,7 @@ | |||
36 | #include "pmc.h" | 36 | #include "pmc.h" |
37 | #include "apbio.h" | 37 | #include "apbio.h" |
38 | #include "sleep.h" | 38 | #include "sleep.h" |
39 | #include "pm.h" | ||
39 | 40 | ||
40 | /* | 41 | /* |
41 | * Storage for debug-macro.S's state. | 42 | * Storage for debug-macro.S's state. |
@@ -104,25 +105,30 @@ static __initdata struct tegra_clk_init_table tegra30_clk_init_table[] = { | |||
104 | { "clk_m", NULL, 0, true }, | 105 | { "clk_m", NULL, 0, true }, |
105 | { "pll_p", "clk_m", 408000000, true }, | 106 | { "pll_p", "clk_m", 408000000, true }, |
106 | { "pll_p_out1", "pll_p", 9600000, true }, | 107 | { "pll_p_out1", "pll_p", 9600000, true }, |
108 | { "pll_p_out4", "pll_p", 102000000, true }, | ||
109 | { "sclk", "pll_p_out4", 102000000, true }, | ||
110 | { "hclk", "sclk", 102000000, true }, | ||
111 | { "pclk", "hclk", 51000000, true }, | ||
112 | { "csite", NULL, 0, true }, | ||
107 | { NULL, NULL, 0, 0}, | 113 | { NULL, NULL, 0, 0}, |
108 | }; | 114 | }; |
109 | #endif | 115 | #endif |
110 | 116 | ||
111 | 117 | ||
112 | static void __init tegra_init_cache(u32 tag_latency, u32 data_latency) | 118 | static void __init tegra_init_cache(void) |
113 | { | 119 | { |
114 | #ifdef CONFIG_CACHE_L2X0 | 120 | #ifdef CONFIG_CACHE_L2X0 |
121 | int ret; | ||
115 | void __iomem *p = IO_ADDRESS(TEGRA_ARM_PERIF_BASE) + 0x3000; | 122 | void __iomem *p = IO_ADDRESS(TEGRA_ARM_PERIF_BASE) + 0x3000; |
116 | u32 aux_ctrl, cache_type; | 123 | u32 aux_ctrl, cache_type; |
117 | 124 | ||
118 | writel_relaxed(tag_latency, p + L2X0_TAG_LATENCY_CTRL); | ||
119 | writel_relaxed(data_latency, p + L2X0_DATA_LATENCY_CTRL); | ||
120 | |||
121 | cache_type = readl(p + L2X0_CACHE_TYPE); | 125 | cache_type = readl(p + L2X0_CACHE_TYPE); |
122 | aux_ctrl = (cache_type & 0x700) << (17-8); | 126 | aux_ctrl = (cache_type & 0x700) << (17-8); |
123 | aux_ctrl |= 0x6C000001; | 127 | aux_ctrl |= 0x7C400001; |
124 | 128 | ||
125 | l2x0_init(p, aux_ctrl, 0x8200c3fe); | 129 | ret = l2x0_of_init(aux_ctrl, 0x8200c3fe); |
130 | if (!ret) | ||
131 | l2x0_saved_regs_addr = virt_to_phys(&l2x0_saved_regs); | ||
126 | #endif | 132 | #endif |
127 | 133 | ||
128 | } | 134 | } |
@@ -134,7 +140,7 @@ void __init tegra20_init_early(void) | |||
134 | tegra_init_fuse(); | 140 | tegra_init_fuse(); |
135 | tegra2_init_clocks(); | 141 | tegra2_init_clocks(); |
136 | tegra_clk_init_from_table(tegra20_clk_init_table); | 142 | tegra_clk_init_from_table(tegra20_clk_init_table); |
137 | tegra_init_cache(0x331, 0x441); | 143 | tegra_init_cache(); |
138 | tegra_pmc_init(); | 144 | tegra_pmc_init(); |
139 | tegra_powergate_init(); | 145 | tegra_powergate_init(); |
140 | tegra20_hotplug_init(); | 146 | tegra20_hotplug_init(); |
@@ -147,7 +153,7 @@ void __init tegra30_init_early(void) | |||
147 | tegra_init_fuse(); | 153 | tegra_init_fuse(); |
148 | tegra30_init_clocks(); | 154 | tegra30_init_clocks(); |
149 | tegra_clk_init_from_table(tegra30_clk_init_table); | 155 | tegra_clk_init_from_table(tegra30_clk_init_table); |
150 | tegra_init_cache(0x441, 0x551); | 156 | tegra_init_cache(); |
151 | tegra_pmc_init(); | 157 | tegra_pmc_init(); |
152 | tegra_powergate_init(); | 158 | tegra_powergate_init(); |
153 | tegra30_hotplug_init(); | 159 | tegra30_hotplug_init(); |
diff --git a/arch/arm/mach-tegra/cpuidle-tegra20.c b/arch/arm/mach-tegra/cpuidle-tegra20.c new file mode 100644 index 000000000000..d32e8b0dbd4f --- /dev/null +++ b/arch/arm/mach-tegra/cpuidle-tegra20.c | |||
@@ -0,0 +1,66 @@ | |||
1 | /* | ||
2 | * CPU idle driver for Tegra CPUs | ||
3 | * | ||
4 | * Copyright (c) 2010-2012, NVIDIA Corporation. | ||
5 | * Copyright (c) 2011 Google, Inc. | ||
6 | * Author: Colin Cross <ccross@android.com> | ||
7 | * Gary King <gking@nvidia.com> | ||
8 | * | ||
9 | * Rework for 3.3 by Peter De Schrijver <pdeschrijver@nvidia.com> | ||
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 as published by | ||
13 | * the Free Software Foundation; either version 2 of the License, or | ||
14 | * (at your option) any later version. | ||
15 | * | ||
16 | * This program is distributed in the hope that it will be useful, but WITHOUT | ||
17 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
18 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
19 | * more details. | ||
20 | */ | ||
21 | |||
22 | #include <linux/kernel.h> | ||
23 | #include <linux/module.h> | ||
24 | #include <linux/cpuidle.h> | ||
25 | |||
26 | #include <asm/cpuidle.h> | ||
27 | |||
28 | static struct cpuidle_driver tegra_idle_driver = { | ||
29 | .name = "tegra_idle", | ||
30 | .owner = THIS_MODULE, | ||
31 | .en_core_tk_irqen = 1, | ||
32 | .state_count = 1, | ||
33 | .states = { | ||
34 | [0] = ARM_CPUIDLE_WFI_STATE_PWR(600), | ||
35 | }, | ||
36 | }; | ||
37 | |||
38 | static DEFINE_PER_CPU(struct cpuidle_device, tegra_idle_device); | ||
39 | |||
40 | int __init tegra20_cpuidle_init(void) | ||
41 | { | ||
42 | int ret; | ||
43 | unsigned int cpu; | ||
44 | struct cpuidle_device *dev; | ||
45 | struct cpuidle_driver *drv = &tegra_idle_driver; | ||
46 | |||
47 | ret = cpuidle_register_driver(&tegra_idle_driver); | ||
48 | if (ret) { | ||
49 | pr_err("CPUidle driver registration failed\n"); | ||
50 | return ret; | ||
51 | } | ||
52 | |||
53 | for_each_possible_cpu(cpu) { | ||
54 | dev = &per_cpu(tegra_idle_device, cpu); | ||
55 | dev->cpu = cpu; | ||
56 | |||
57 | dev->state_count = drv->state_count; | ||
58 | ret = cpuidle_register_device(dev); | ||
59 | if (ret) { | ||
60 | pr_err("CPU%u: CPUidle device registration failed\n", | ||
61 | cpu); | ||
62 | return ret; | ||
63 | } | ||
64 | } | ||
65 | return 0; | ||
66 | } | ||
diff --git a/arch/arm/mach-tegra/cpuidle-tegra30.c b/arch/arm/mach-tegra/cpuidle-tegra30.c new file mode 100644 index 000000000000..5e8cbf5b799f --- /dev/null +++ b/arch/arm/mach-tegra/cpuidle-tegra30.c | |||
@@ -0,0 +1,188 @@ | |||
1 | /* | ||
2 | * CPU idle driver for Tegra CPUs | ||
3 | * | ||
4 | * Copyright (c) 2010-2012, NVIDIA Corporation. | ||
5 | * Copyright (c) 2011 Google, Inc. | ||
6 | * Author: Colin Cross <ccross@android.com> | ||
7 | * Gary King <gking@nvidia.com> | ||
8 | * | ||
9 | * Rework for 3.3 by Peter De Schrijver <pdeschrijver@nvidia.com> | ||
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 as published by | ||
13 | * the Free Software Foundation; either version 2 of the License, or | ||
14 | * (at your option) any later version. | ||
15 | * | ||
16 | * This program is distributed in the hope that it will be useful, but WITHOUT | ||
17 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
18 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
19 | * more details. | ||
20 | */ | ||
21 | |||
22 | #include <linux/kernel.h> | ||
23 | #include <linux/module.h> | ||
24 | #include <linux/cpuidle.h> | ||
25 | #include <linux/cpu_pm.h> | ||
26 | #include <linux/clockchips.h> | ||
27 | |||
28 | #include <asm/cpuidle.h> | ||
29 | #include <asm/proc-fns.h> | ||
30 | #include <asm/suspend.h> | ||
31 | #include <asm/smp_plat.h> | ||
32 | |||
33 | #include "pm.h" | ||
34 | #include "sleep.h" | ||
35 | #include "tegra_cpu_car.h" | ||
36 | |||
37 | #ifdef CONFIG_PM_SLEEP | ||
38 | static int tegra30_idle_lp2(struct cpuidle_device *dev, | ||
39 | struct cpuidle_driver *drv, | ||
40 | int index); | ||
41 | #endif | ||
42 | |||
43 | static struct cpuidle_driver tegra_idle_driver = { | ||
44 | .name = "tegra_idle", | ||
45 | .owner = THIS_MODULE, | ||
46 | .en_core_tk_irqen = 1, | ||
47 | #ifdef CONFIG_PM_SLEEP | ||
48 | .state_count = 2, | ||
49 | #else | ||
50 | .state_count = 1, | ||
51 | #endif | ||
52 | .states = { | ||
53 | [0] = ARM_CPUIDLE_WFI_STATE_PWR(600), | ||
54 | #ifdef CONFIG_PM_SLEEP | ||
55 | [1] = { | ||
56 | .enter = tegra30_idle_lp2, | ||
57 | .exit_latency = 2000, | ||
58 | .target_residency = 2200, | ||
59 | .power_usage = 0, | ||
60 | .flags = CPUIDLE_FLAG_TIME_VALID, | ||
61 | .name = "powered-down", | ||
62 | .desc = "CPU power gated", | ||
63 | }, | ||
64 | #endif | ||
65 | }, | ||
66 | }; | ||
67 | |||
68 | static DEFINE_PER_CPU(struct cpuidle_device, tegra_idle_device); | ||
69 | |||
70 | #ifdef CONFIG_PM_SLEEP | ||
71 | static bool tegra30_cpu_cluster_power_down(struct cpuidle_device *dev, | ||
72 | struct cpuidle_driver *drv, | ||
73 | int index) | ||
74 | { | ||
75 | struct cpuidle_state *state = &drv->states[index]; | ||
76 | u32 cpu_on_time = state->exit_latency; | ||
77 | u32 cpu_off_time = state->target_residency - state->exit_latency; | ||
78 | |||
79 | /* All CPUs entering LP2 is not working. | ||
80 | * Don't let CPU0 enter LP2 when any secondary CPU is online. | ||
81 | */ | ||
82 | if (num_online_cpus() > 1 || !tegra_cpu_rail_off_ready()) { | ||
83 | cpu_do_idle(); | ||
84 | return false; | ||
85 | } | ||
86 | |||
87 | clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_ENTER, &dev->cpu); | ||
88 | |||
89 | tegra_idle_lp2_last(cpu_on_time, cpu_off_time); | ||
90 | |||
91 | clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_EXIT, &dev->cpu); | ||
92 | |||
93 | return true; | ||
94 | } | ||
95 | |||
96 | #ifdef CONFIG_SMP | ||
97 | static bool tegra30_cpu_core_power_down(struct cpuidle_device *dev, | ||
98 | struct cpuidle_driver *drv, | ||
99 | int index) | ||
100 | { | ||
101 | clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_ENTER, &dev->cpu); | ||
102 | |||
103 | smp_wmb(); | ||
104 | |||
105 | save_cpu_arch_register(); | ||
106 | |||
107 | cpu_suspend(0, tegra30_sleep_cpu_secondary_finish); | ||
108 | |||
109 | restore_cpu_arch_register(); | ||
110 | |||
111 | clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_EXIT, &dev->cpu); | ||
112 | |||
113 | return true; | ||
114 | } | ||
115 | #else | ||
116 | static inline bool tegra30_cpu_core_power_down(struct cpuidle_device *dev, | ||
117 | struct cpuidle_driver *drv, | ||
118 | int index) | ||
119 | { | ||
120 | return true; | ||
121 | } | ||
122 | #endif | ||
123 | |||
124 | static int __cpuinit tegra30_idle_lp2(struct cpuidle_device *dev, | ||
125 | struct cpuidle_driver *drv, | ||
126 | int index) | ||
127 | { | ||
128 | u32 cpu = is_smp() ? cpu_logical_map(dev->cpu) : dev->cpu; | ||
129 | bool entered_lp2 = false; | ||
130 | bool last_cpu; | ||
131 | |||
132 | local_fiq_disable(); | ||
133 | |||
134 | last_cpu = tegra_set_cpu_in_lp2(cpu); | ||
135 | cpu_pm_enter(); | ||
136 | |||
137 | if (cpu == 0) { | ||
138 | if (last_cpu) | ||
139 | entered_lp2 = tegra30_cpu_cluster_power_down(dev, drv, | ||
140 | index); | ||
141 | else | ||
142 | cpu_do_idle(); | ||
143 | } else { | ||
144 | entered_lp2 = tegra30_cpu_core_power_down(dev, drv, index); | ||
145 | } | ||
146 | |||
147 | cpu_pm_exit(); | ||
148 | tegra_clear_cpu_in_lp2(cpu); | ||
149 | |||
150 | local_fiq_enable(); | ||
151 | |||
152 | smp_rmb(); | ||
153 | |||
154 | return (entered_lp2) ? index : 0; | ||
155 | } | ||
156 | #endif | ||
157 | |||
158 | int __init tegra30_cpuidle_init(void) | ||
159 | { | ||
160 | int ret; | ||
161 | unsigned int cpu; | ||
162 | struct cpuidle_device *dev; | ||
163 | struct cpuidle_driver *drv = &tegra_idle_driver; | ||
164 | |||
165 | #ifdef CONFIG_PM_SLEEP | ||
166 | tegra_tear_down_cpu = tegra30_tear_down_cpu; | ||
167 | #endif | ||
168 | |||
169 | ret = cpuidle_register_driver(&tegra_idle_driver); | ||
170 | if (ret) { | ||
171 | pr_err("CPUidle driver registration failed\n"); | ||
172 | return ret; | ||
173 | } | ||
174 | |||
175 | for_each_possible_cpu(cpu) { | ||
176 | dev = &per_cpu(tegra_idle_device, cpu); | ||
177 | dev->cpu = cpu; | ||
178 | |||
179 | dev->state_count = drv->state_count; | ||
180 | ret = cpuidle_register_device(dev); | ||
181 | if (ret) { | ||
182 | pr_err("CPU%u: CPUidle device registration failed\n", | ||
183 | cpu); | ||
184 | return ret; | ||
185 | } | ||
186 | } | ||
187 | return 0; | ||
188 | } | ||
diff --git a/arch/arm/mach-tegra/cpuidle.c b/arch/arm/mach-tegra/cpuidle.c index 9a6f051b382e..d0651397aec7 100644 --- a/arch/arm/mach-tegra/cpuidle.c +++ b/arch/arm/mach-tegra/cpuidle.c | |||
@@ -23,83 +23,26 @@ | |||
23 | 23 | ||
24 | #include <linux/kernel.h> | 24 | #include <linux/kernel.h> |
25 | #include <linux/module.h> | 25 | #include <linux/module.h> |
26 | #include <linux/cpu.h> | ||
27 | #include <linux/cpuidle.h> | ||
28 | #include <linux/hrtimer.h> | ||
29 | 26 | ||
30 | #include <asm/proc-fns.h> | 27 | #include "fuse.h" |
31 | 28 | #include "cpuidle.h" | |
32 | static int tegra_idle_enter_lp3(struct cpuidle_device *dev, | ||
33 | struct cpuidle_driver *drv, int index); | ||
34 | |||
35 | struct cpuidle_driver tegra_idle_driver = { | ||
36 | .name = "tegra_idle", | ||
37 | .owner = THIS_MODULE, | ||
38 | .state_count = 1, | ||
39 | .states = { | ||
40 | [0] = { | ||
41 | .enter = tegra_idle_enter_lp3, | ||
42 | .exit_latency = 10, | ||
43 | .target_residency = 10, | ||
44 | .power_usage = 600, | ||
45 | .flags = CPUIDLE_FLAG_TIME_VALID, | ||
46 | .name = "LP3", | ||
47 | .desc = "CPU flow-controlled", | ||
48 | }, | ||
49 | }, | ||
50 | }; | ||
51 | |||
52 | static DEFINE_PER_CPU(struct cpuidle_device, tegra_idle_device); | ||
53 | |||
54 | static int tegra_idle_enter_lp3(struct cpuidle_device *dev, | ||
55 | struct cpuidle_driver *drv, int index) | ||
56 | { | ||
57 | ktime_t enter, exit; | ||
58 | s64 us; | ||
59 | |||
60 | local_irq_disable(); | ||
61 | local_fiq_disable(); | ||
62 | |||
63 | enter = ktime_get(); | ||
64 | |||
65 | cpu_do_idle(); | ||
66 | |||
67 | exit = ktime_sub(ktime_get(), enter); | ||
68 | us = ktime_to_us(exit); | ||
69 | |||
70 | local_fiq_enable(); | ||
71 | local_irq_enable(); | ||
72 | |||
73 | dev->last_residency = us; | ||
74 | |||
75 | return index; | ||
76 | } | ||
77 | 29 | ||
78 | static int __init tegra_cpuidle_init(void) | 30 | static int __init tegra_cpuidle_init(void) |
79 | { | 31 | { |
80 | int ret; | 32 | int ret; |
81 | unsigned int cpu; | ||
82 | struct cpuidle_device *dev; | ||
83 | struct cpuidle_driver *drv = &tegra_idle_driver; | ||
84 | 33 | ||
85 | ret = cpuidle_register_driver(&tegra_idle_driver); | 34 | switch (tegra_chip_id) { |
86 | if (ret) { | 35 | case TEGRA20: |
87 | pr_err("CPUidle driver registration failed\n"); | 36 | ret = tegra20_cpuidle_init(); |
88 | return ret; | 37 | break; |
38 | case TEGRA30: | ||
39 | ret = tegra30_cpuidle_init(); | ||
40 | break; | ||
41 | default: | ||
42 | ret = -ENODEV; | ||
43 | break; | ||
89 | } | 44 | } |
90 | 45 | ||
91 | for_each_possible_cpu(cpu) { | 46 | return ret; |
92 | dev = &per_cpu(tegra_idle_device, cpu); | ||
93 | dev->cpu = cpu; | ||
94 | |||
95 | dev->state_count = drv->state_count; | ||
96 | ret = cpuidle_register_device(dev); | ||
97 | if (ret) { | ||
98 | pr_err("CPU%u: CPUidle device registration failed\n", | ||
99 | cpu); | ||
100 | return ret; | ||
101 | } | ||
102 | } | ||
103 | return 0; | ||
104 | } | 47 | } |
105 | device_initcall(tegra_cpuidle_init); | 48 | device_initcall(tegra_cpuidle_init); |
diff --git a/arch/arm/mach-tegra/cpuidle.h b/arch/arm/mach-tegra/cpuidle.h new file mode 100644 index 000000000000..496204d34e55 --- /dev/null +++ b/arch/arm/mach-tegra/cpuidle.h | |||
@@ -0,0 +1,32 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2012, NVIDIA Corporation. All rights reserved. | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify it | ||
5 | * under the terms and conditions of the GNU General Public License, | ||
6 | * version 2, as published by the Free Software Foundation. | ||
7 | * | ||
8 | * This program is distributed in the hope it will be useful, but WITHOUT | ||
9 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
10 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
11 | * more details. | ||
12 | * | ||
13 | * You should have received a copy of the GNU General Public License | ||
14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
15 | */ | ||
16 | |||
17 | #ifndef __MACH_TEGRA_CPUIDLE_H | ||
18 | #define __MACH_TEGRA_CPUIDLE_H | ||
19 | |||
20 | #ifdef CONFIG_ARCH_TEGRA_2x_SOC | ||
21 | int tegra20_cpuidle_init(void); | ||
22 | #else | ||
23 | static inline int tegra20_cpuidle_init(void) { return -ENODEV; } | ||
24 | #endif | ||
25 | |||
26 | #ifdef CONFIG_ARCH_TEGRA_3x_SOC | ||
27 | int tegra30_cpuidle_init(void); | ||
28 | #else | ||
29 | static inline int tegra30_cpuidle_init(void) { return -ENODEV; } | ||
30 | #endif | ||
31 | |||
32 | #endif | ||
diff --git a/arch/arm/mach-tegra/flowctrl.c b/arch/arm/mach-tegra/flowctrl.c index ffaa286a71e1..a2250ddae797 100644 --- a/arch/arm/mach-tegra/flowctrl.c +++ b/arch/arm/mach-tegra/flowctrl.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/init.h> | 21 | #include <linux/init.h> |
22 | #include <linux/kernel.h> | 22 | #include <linux/kernel.h> |
23 | #include <linux/io.h> | 23 | #include <linux/io.h> |
24 | #include <linux/cpumask.h> | ||
24 | 25 | ||
25 | #include "flowctrl.h" | 26 | #include "flowctrl.h" |
26 | #include "iomap.h" | 27 | #include "iomap.h" |
@@ -50,6 +51,14 @@ static void flowctrl_update(u8 offset, u32 value) | |||
50 | readl_relaxed(addr); | 51 | readl_relaxed(addr); |
51 | } | 52 | } |
52 | 53 | ||
54 | u32 flowctrl_read_cpu_csr(unsigned int cpuid) | ||
55 | { | ||
56 | u8 offset = flowctrl_offset_cpu_csr[cpuid]; | ||
57 | void __iomem *addr = IO_ADDRESS(TEGRA_FLOW_CTRL_BASE) + offset; | ||
58 | |||
59 | return readl(addr); | ||
60 | } | ||
61 | |||
53 | void flowctrl_write_cpu_csr(unsigned int cpuid, u32 value) | 62 | void flowctrl_write_cpu_csr(unsigned int cpuid, u32 value) |
54 | { | 63 | { |
55 | return flowctrl_update(flowctrl_offset_cpu_csr[cpuid], value); | 64 | return flowctrl_update(flowctrl_offset_cpu_csr[cpuid], value); |
@@ -59,3 +68,41 @@ void flowctrl_write_cpu_halt(unsigned int cpuid, u32 value) | |||
59 | { | 68 | { |
60 | return flowctrl_update(flowctrl_offset_halt_cpu[cpuid], value); | 69 | return flowctrl_update(flowctrl_offset_halt_cpu[cpuid], value); |
61 | } | 70 | } |
71 | |||
72 | void flowctrl_cpu_suspend_enter(unsigned int cpuid) | ||
73 | { | ||
74 | unsigned int reg; | ||
75 | int i; | ||
76 | |||
77 | reg = flowctrl_read_cpu_csr(cpuid); | ||
78 | reg &= ~TEGRA30_FLOW_CTRL_CSR_WFE_BITMAP; /* clear wfe bitmap */ | ||
79 | reg &= ~TEGRA30_FLOW_CTRL_CSR_WFI_BITMAP; /* clear wfi bitmap */ | ||
80 | reg |= FLOW_CTRL_CSR_INTR_FLAG; /* clear intr flag */ | ||
81 | reg |= FLOW_CTRL_CSR_EVENT_FLAG; /* clear event flag */ | ||
82 | reg |= TEGRA30_FLOW_CTRL_CSR_WFI_CPU0 << cpuid; /* pwr gating on wfi */ | ||
83 | reg |= FLOW_CTRL_CSR_ENABLE; /* pwr gating */ | ||
84 | flowctrl_write_cpu_csr(cpuid, reg); | ||
85 | |||
86 | for (i = 0; i < num_possible_cpus(); i++) { | ||
87 | if (i == cpuid) | ||
88 | continue; | ||
89 | reg = flowctrl_read_cpu_csr(i); | ||
90 | reg |= FLOW_CTRL_CSR_EVENT_FLAG; | ||
91 | reg |= FLOW_CTRL_CSR_INTR_FLAG; | ||
92 | flowctrl_write_cpu_csr(i, reg); | ||
93 | } | ||
94 | } | ||
95 | |||
96 | void flowctrl_cpu_suspend_exit(unsigned int cpuid) | ||
97 | { | ||
98 | unsigned int reg; | ||
99 | |||
100 | /* Disable powergating via flow controller for CPU0 */ | ||
101 | reg = flowctrl_read_cpu_csr(cpuid); | ||
102 | reg &= ~TEGRA30_FLOW_CTRL_CSR_WFE_BITMAP; /* clear wfe bitmap */ | ||
103 | reg &= ~TEGRA30_FLOW_CTRL_CSR_WFI_BITMAP; /* clear wfi bitmap */ | ||
104 | reg &= ~FLOW_CTRL_CSR_ENABLE; /* clear enable */ | ||
105 | reg |= FLOW_CTRL_CSR_INTR_FLAG; /* clear intr */ | ||
106 | reg |= FLOW_CTRL_CSR_EVENT_FLAG; /* clear event */ | ||
107 | flowctrl_write_cpu_csr(cpuid, reg); | ||
108 | } | ||
diff --git a/arch/arm/mach-tegra/flowctrl.h b/arch/arm/mach-tegra/flowctrl.h index 19428173855e..0798dec1832d 100644 --- a/arch/arm/mach-tegra/flowctrl.h +++ b/arch/arm/mach-tegra/flowctrl.h | |||
@@ -34,9 +34,17 @@ | |||
34 | #define FLOW_CTRL_HALT_CPU1_EVENTS 0x14 | 34 | #define FLOW_CTRL_HALT_CPU1_EVENTS 0x14 |
35 | #define FLOW_CTRL_CPU1_CSR 0x18 | 35 | #define FLOW_CTRL_CPU1_CSR 0x18 |
36 | 36 | ||
37 | #define TEGRA30_FLOW_CTRL_CSR_WFI_CPU0 (1 << 8) | ||
38 | #define TEGRA30_FLOW_CTRL_CSR_WFE_BITMAP (0xF << 4) | ||
39 | #define TEGRA30_FLOW_CTRL_CSR_WFI_BITMAP (0xF << 8) | ||
40 | |||
37 | #ifndef __ASSEMBLY__ | 41 | #ifndef __ASSEMBLY__ |
42 | u32 flowctrl_read_cpu_csr(unsigned int cpuid); | ||
38 | void flowctrl_write_cpu_csr(unsigned int cpuid, u32 value); | 43 | void flowctrl_write_cpu_csr(unsigned int cpuid, u32 value); |
39 | void flowctrl_write_cpu_halt(unsigned int cpuid, u32 value); | 44 | void flowctrl_write_cpu_halt(unsigned int cpuid, u32 value); |
45 | |||
46 | void flowctrl_cpu_suspend_enter(unsigned int cpuid); | ||
47 | void flowctrl_cpu_suspend_exit(unsigned int cpuid); | ||
40 | #endif | 48 | #endif |
41 | 49 | ||
42 | #endif | 50 | #endif |
diff --git a/arch/arm/mach-tegra/fuse.c b/arch/arm/mach-tegra/fuse.c index 6c752e8f1f06..8121742711fe 100644 --- a/arch/arm/mach-tegra/fuse.c +++ b/arch/arm/mach-tegra/fuse.c | |||
@@ -28,14 +28,21 @@ | |||
28 | #define FUSE_UID_LOW 0x108 | 28 | #define FUSE_UID_LOW 0x108 |
29 | #define FUSE_UID_HIGH 0x10c | 29 | #define FUSE_UID_HIGH 0x10c |
30 | #define FUSE_SKU_INFO 0x110 | 30 | #define FUSE_SKU_INFO 0x110 |
31 | #define FUSE_SPARE_BIT 0x200 | 31 | |
32 | #define TEGRA20_FUSE_SPARE_BIT 0x200 | ||
33 | #define TEGRA30_FUSE_SPARE_BIT 0x244 | ||
32 | 34 | ||
33 | int tegra_sku_id; | 35 | int tegra_sku_id; |
34 | int tegra_cpu_process_id; | 36 | int tegra_cpu_process_id; |
35 | int tegra_core_process_id; | 37 | int tegra_core_process_id; |
36 | int tegra_chip_id; | 38 | int tegra_chip_id; |
39 | int tegra_cpu_speedo_id; /* only exist in Tegra30 and later */ | ||
40 | int tegra_soc_speedo_id; | ||
37 | enum tegra_revision tegra_revision; | 41 | enum tegra_revision tegra_revision; |
38 | 42 | ||
43 | static int tegra_fuse_spare_bit; | ||
44 | static void (*tegra_init_speedo_data)(void); | ||
45 | |||
39 | /* The BCT to use at boot is specified by board straps that can be read | 46 | /* The BCT to use at boot is specified by board straps that can be read |
40 | * through a APB misc register and decoded. 2 bits, i.e. 4 possible BCTs. | 47 | * through a APB misc register and decoded. 2 bits, i.e. 4 possible BCTs. |
41 | */ | 48 | */ |
@@ -56,14 +63,14 @@ static const char *tegra_revision_name[TEGRA_REVISION_MAX] = { | |||
56 | [TEGRA_REVISION_A04] = "A04", | 63 | [TEGRA_REVISION_A04] = "A04", |
57 | }; | 64 | }; |
58 | 65 | ||
59 | static inline u32 tegra_fuse_readl(unsigned long offset) | 66 | u32 tegra_fuse_readl(unsigned long offset) |
60 | { | 67 | { |
61 | return tegra_apb_readl(TEGRA_FUSE_BASE + offset); | 68 | return tegra_apb_readl(TEGRA_FUSE_BASE + offset); |
62 | } | 69 | } |
63 | 70 | ||
64 | static inline bool get_spare_fuse(int bit) | 71 | bool tegra_spare_fuse(int bit) |
65 | { | 72 | { |
66 | return tegra_fuse_readl(FUSE_SPARE_BIT + bit * 4); | 73 | return tegra_fuse_readl(tegra_fuse_spare_bit + bit * 4); |
67 | } | 74 | } |
68 | 75 | ||
69 | static enum tegra_revision tegra_get_revision(u32 id) | 76 | static enum tegra_revision tegra_get_revision(u32 id) |
@@ -77,7 +84,7 @@ static enum tegra_revision tegra_get_revision(u32 id) | |||
77 | return TEGRA_REVISION_A02; | 84 | return TEGRA_REVISION_A02; |
78 | case 3: | 85 | case 3: |
79 | if (tegra_chip_id == TEGRA20 && | 86 | if (tegra_chip_id == TEGRA20 && |
80 | (get_spare_fuse(18) || get_spare_fuse(19))) | 87 | (tegra_spare_fuse(18) || tegra_spare_fuse(19))) |
81 | return TEGRA_REVISION_A03p; | 88 | return TEGRA_REVISION_A03p; |
82 | else | 89 | else |
83 | return TEGRA_REVISION_A03; | 90 | return TEGRA_REVISION_A03; |
@@ -88,6 +95,16 @@ static enum tegra_revision tegra_get_revision(u32 id) | |||
88 | } | 95 | } |
89 | } | 96 | } |
90 | 97 | ||
98 | static void tegra_get_process_id(void) | ||
99 | { | ||
100 | u32 reg; | ||
101 | |||
102 | reg = tegra_fuse_readl(tegra_fuse_spare_bit); | ||
103 | tegra_cpu_process_id = (reg >> 6) & 3; | ||
104 | reg = tegra_fuse_readl(tegra_fuse_spare_bit); | ||
105 | tegra_core_process_id = (reg >> 12) & 3; | ||
106 | } | ||
107 | |||
91 | void tegra_init_fuse(void) | 108 | void tegra_init_fuse(void) |
92 | { | 109 | { |
93 | u32 id; | 110 | u32 id; |
@@ -99,19 +116,29 @@ void tegra_init_fuse(void) | |||
99 | reg = tegra_fuse_readl(FUSE_SKU_INFO); | 116 | reg = tegra_fuse_readl(FUSE_SKU_INFO); |
100 | tegra_sku_id = reg & 0xFF; | 117 | tegra_sku_id = reg & 0xFF; |
101 | 118 | ||
102 | reg = tegra_fuse_readl(FUSE_SPARE_BIT); | ||
103 | tegra_cpu_process_id = (reg >> 6) & 3; | ||
104 | |||
105 | reg = tegra_fuse_readl(FUSE_SPARE_BIT); | ||
106 | tegra_core_process_id = (reg >> 12) & 3; | ||
107 | |||
108 | reg = tegra_apb_readl(TEGRA_APB_MISC_BASE + STRAP_OPT); | 119 | reg = tegra_apb_readl(TEGRA_APB_MISC_BASE + STRAP_OPT); |
109 | tegra_bct_strapping = (reg & RAM_ID_MASK) >> RAM_CODE_SHIFT; | 120 | tegra_bct_strapping = (reg & RAM_ID_MASK) >> RAM_CODE_SHIFT; |
110 | 121 | ||
111 | id = readl_relaxed(IO_ADDRESS(TEGRA_APB_MISC_BASE) + 0x804); | 122 | id = readl_relaxed(IO_ADDRESS(TEGRA_APB_MISC_BASE) + 0x804); |
112 | tegra_chip_id = (id >> 8) & 0xff; | 123 | tegra_chip_id = (id >> 8) & 0xff; |
113 | 124 | ||
125 | switch (tegra_chip_id) { | ||
126 | case TEGRA20: | ||
127 | tegra_fuse_spare_bit = TEGRA20_FUSE_SPARE_BIT; | ||
128 | tegra_init_speedo_data = &tegra20_init_speedo_data; | ||
129 | break; | ||
130 | case TEGRA30: | ||
131 | tegra_fuse_spare_bit = TEGRA30_FUSE_SPARE_BIT; | ||
132 | tegra_init_speedo_data = &tegra30_init_speedo_data; | ||
133 | break; | ||
134 | default: | ||
135 | pr_warn("Tegra: unknown chip id %d\n", tegra_chip_id); | ||
136 | tegra_fuse_spare_bit = TEGRA20_FUSE_SPARE_BIT; | ||
137 | tegra_init_speedo_data = &tegra_get_process_id; | ||
138 | } | ||
139 | |||
114 | tegra_revision = tegra_get_revision(id); | 140 | tegra_revision = tegra_get_revision(id); |
141 | tegra_init_speedo_data(); | ||
115 | 142 | ||
116 | pr_info("Tegra Revision: %s SKU: %d CPU Process: %d Core Process: %d\n", | 143 | pr_info("Tegra Revision: %s SKU: %d CPU Process: %d Core Process: %d\n", |
117 | tegra_revision_name[tegra_revision], | 144 | tegra_revision_name[tegra_revision], |
diff --git a/arch/arm/mach-tegra/fuse.h b/arch/arm/mach-tegra/fuse.h index d2107b2cb85a..ff1383dd61a7 100644 --- a/arch/arm/mach-tegra/fuse.h +++ b/arch/arm/mach-tegra/fuse.h | |||
@@ -42,11 +42,27 @@ extern int tegra_sku_id; | |||
42 | extern int tegra_cpu_process_id; | 42 | extern int tegra_cpu_process_id; |
43 | extern int tegra_core_process_id; | 43 | extern int tegra_core_process_id; |
44 | extern int tegra_chip_id; | 44 | extern int tegra_chip_id; |
45 | extern int tegra_cpu_speedo_id; /* only exist in Tegra30 and later */ | ||
46 | extern int tegra_soc_speedo_id; | ||
45 | extern enum tegra_revision tegra_revision; | 47 | extern enum tegra_revision tegra_revision; |
46 | 48 | ||
47 | extern int tegra_bct_strapping; | 49 | extern int tegra_bct_strapping; |
48 | 50 | ||
49 | unsigned long long tegra_chip_uid(void); | 51 | unsigned long long tegra_chip_uid(void); |
50 | void tegra_init_fuse(void); | 52 | void tegra_init_fuse(void); |
53 | bool tegra_spare_fuse(int bit); | ||
54 | u32 tegra_fuse_readl(unsigned long offset); | ||
55 | |||
56 | #ifdef CONFIG_ARCH_TEGRA_2x_SOC | ||
57 | void tegra20_init_speedo_data(void); | ||
58 | #else | ||
59 | static inline void tegra20_init_speedo_data(void) {} | ||
60 | #endif | ||
61 | |||
62 | #ifdef CONFIG_ARCH_TEGRA_3x_SOC | ||
63 | void tegra30_init_speedo_data(void); | ||
64 | #else | ||
65 | static inline void tegra30_init_speedo_data(void) {} | ||
66 | #endif | ||
51 | 67 | ||
52 | #endif | 68 | #endif |
diff --git a/arch/arm/mach-tegra/headsmp.S b/arch/arm/mach-tegra/headsmp.S index 93f0370cc95b..4a317fae6860 100644 --- a/arch/arm/mach-tegra/headsmp.S +++ b/arch/arm/mach-tegra/headsmp.S | |||
@@ -2,6 +2,8 @@ | |||
2 | #include <linux/init.h> | 2 | #include <linux/init.h> |
3 | 3 | ||
4 | #include <asm/cache.h> | 4 | #include <asm/cache.h> |
5 | #include <asm/asm-offsets.h> | ||
6 | #include <asm/hardware/cache-l2x0.h> | ||
5 | 7 | ||
6 | #include "flowctrl.h" | 8 | #include "flowctrl.h" |
7 | #include "iomap.h" | 9 | #include "iomap.h" |
@@ -68,6 +70,64 @@ ENTRY(tegra_secondary_startup) | |||
68 | b secondary_startup | 70 | b secondary_startup |
69 | ENDPROC(tegra_secondary_startup) | 71 | ENDPROC(tegra_secondary_startup) |
70 | 72 | ||
73 | #ifdef CONFIG_PM_SLEEP | ||
74 | /* | ||
75 | * tegra_resume | ||
76 | * | ||
77 | * CPU boot vector when restarting the a CPU following | ||
78 | * an LP2 transition. Also branched to by LP0 and LP1 resume after | ||
79 | * re-enabling sdram. | ||
80 | */ | ||
81 | ENTRY(tegra_resume) | ||
82 | bl v7_invalidate_l1 | ||
83 | /* Enable coresight */ | ||
84 | mov32 r0, 0xC5ACCE55 | ||
85 | mcr p14, 0, r0, c7, c12, 6 | ||
86 | |||
87 | cpu_id r0 | ||
88 | cmp r0, #0 @ CPU0? | ||
89 | bne cpu_resume @ no | ||
90 | |||
91 | #ifdef CONFIG_ARCH_TEGRA_3x_SOC | ||
92 | /* Are we on Tegra20? */ | ||
93 | mov32 r6, TEGRA_APB_MISC_BASE | ||
94 | ldr r0, [r6, #APB_MISC_GP_HIDREV] | ||
95 | and r0, r0, #0xff00 | ||
96 | cmp r0, #(0x20 << 8) | ||
97 | beq 1f @ Yes | ||
98 | /* Clear the flow controller flags for this CPU. */ | ||
99 | mov32 r2, TEGRA_FLOW_CTRL_BASE + FLOW_CTRL_CPU0_CSR @ CPU0 CSR | ||
100 | ldr r1, [r2] | ||
101 | /* Clear event & intr flag */ | ||
102 | orr r1, r1, \ | ||
103 | #FLOW_CTRL_CSR_INTR_FLAG | FLOW_CTRL_CSR_EVENT_FLAG | ||
104 | movw r0, #0x0FFD @ enable, cluster_switch, immed, & bitmaps | ||
105 | bic r1, r1, r0 | ||
106 | str r1, [r2] | ||
107 | 1: | ||
108 | #endif | ||
109 | |||
110 | #ifdef CONFIG_HAVE_ARM_SCU | ||
111 | /* enable SCU */ | ||
112 | mov32 r0, TEGRA_ARM_PERIF_BASE | ||
113 | ldr r1, [r0] | ||
114 | orr r1, r1, #1 | ||
115 | str r1, [r0] | ||
116 | #endif | ||
117 | |||
118 | /* L2 cache resume & re-enable */ | ||
119 | l2_cache_resume r0, r1, r2, l2x0_saved_regs_addr | ||
120 | |||
121 | b cpu_resume | ||
122 | ENDPROC(tegra_resume) | ||
123 | #endif | ||
124 | |||
125 | #ifdef CONFIG_CACHE_L2X0 | ||
126 | .globl l2x0_saved_regs_addr | ||
127 | l2x0_saved_regs_addr: | ||
128 | .long 0 | ||
129 | #endif | ||
130 | |||
71 | .align L1_CACHE_SHIFT | 131 | .align L1_CACHE_SHIFT |
72 | ENTRY(__tegra_cpu_reset_handler_start) | 132 | ENTRY(__tegra_cpu_reset_handler_start) |
73 | 133 | ||
@@ -121,6 +181,17 @@ ENTRY(__tegra_cpu_reset_handler) | |||
121 | 1: | 181 | 1: |
122 | #endif | 182 | #endif |
123 | 183 | ||
184 | /* Waking up from LP2? */ | ||
185 | ldr r9, [r12, #RESET_DATA(MASK_LP2)] | ||
186 | tst r9, r11 @ if in_lp2 | ||
187 | beq __is_not_lp2 | ||
188 | ldr lr, [r12, #RESET_DATA(STARTUP_LP2)] | ||
189 | cmp lr, #0 | ||
190 | bleq __die @ no LP2 startup handler | ||
191 | bx lr | ||
192 | |||
193 | __is_not_lp2: | ||
194 | |||
124 | #ifdef CONFIG_SMP | 195 | #ifdef CONFIG_SMP |
125 | /* | 196 | /* |
126 | * Can only be secondary boot (initial or hotplug) but CPU 0 | 197 | * Can only be secondary boot (initial or hotplug) but CPU 0 |
diff --git a/arch/arm/mach-tegra/pm.c b/arch/arm/mach-tegra/pm.c new file mode 100644 index 000000000000..1b11707eaca0 --- /dev/null +++ b/arch/arm/mach-tegra/pm.c | |||
@@ -0,0 +1,216 @@ | |||
1 | /* | ||
2 | * CPU complex suspend & resume functions for Tegra SoCs | ||
3 | * | ||
4 | * Copyright (c) 2009-2012, NVIDIA Corporation. All rights reserved. | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify it | ||
7 | * under the terms and conditions of the GNU General Public License, | ||
8 | * version 2, as published by the Free Software Foundation. | ||
9 | * | ||
10 | * This program is distributed in the hope it will be useful, but WITHOUT | ||
11 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
12 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
13 | * more details. | ||
14 | * | ||
15 | * You should have received a copy of the GNU General Public License | ||
16 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
17 | */ | ||
18 | |||
19 | #include <linux/kernel.h> | ||
20 | #include <linux/spinlock.h> | ||
21 | #include <linux/io.h> | ||
22 | #include <linux/cpumask.h> | ||
23 | #include <linux/delay.h> | ||
24 | #include <linux/cpu_pm.h> | ||
25 | #include <linux/clk.h> | ||
26 | #include <linux/err.h> | ||
27 | |||
28 | #include <asm/smp_plat.h> | ||
29 | #include <asm/cacheflush.h> | ||
30 | #include <asm/suspend.h> | ||
31 | #include <asm/idmap.h> | ||
32 | #include <asm/proc-fns.h> | ||
33 | #include <asm/tlbflush.h> | ||
34 | |||
35 | #include "iomap.h" | ||
36 | #include "reset.h" | ||
37 | #include "flowctrl.h" | ||
38 | #include "sleep.h" | ||
39 | #include "tegra_cpu_car.h" | ||
40 | |||
41 | #define TEGRA_POWER_CPU_PWRREQ_OE (1 << 16) /* CPU pwr req enable */ | ||
42 | |||
43 | #define PMC_CTRL 0x0 | ||
44 | #define PMC_CPUPWRGOOD_TIMER 0xc8 | ||
45 | #define PMC_CPUPWROFF_TIMER 0xcc | ||
46 | |||
47 | #ifdef CONFIG_PM_SLEEP | ||
48 | static unsigned int g_diag_reg; | ||
49 | static DEFINE_SPINLOCK(tegra_lp2_lock); | ||
50 | static void __iomem *pmc = IO_ADDRESS(TEGRA_PMC_BASE); | ||
51 | static struct clk *tegra_pclk; | ||
52 | void (*tegra_tear_down_cpu)(void); | ||
53 | |||
54 | void save_cpu_arch_register(void) | ||
55 | { | ||
56 | /* read diagnostic register */ | ||
57 | asm("mrc p15, 0, %0, c15, c0, 1" : "=r"(g_diag_reg) : : "cc"); | ||
58 | return; | ||
59 | } | ||
60 | |||
61 | void restore_cpu_arch_register(void) | ||
62 | { | ||
63 | /* write diagnostic register */ | ||
64 | asm("mcr p15, 0, %0, c15, c0, 1" : : "r"(g_diag_reg) : "cc"); | ||
65 | return; | ||
66 | } | ||
67 | |||
68 | static void set_power_timers(unsigned long us_on, unsigned long us_off) | ||
69 | { | ||
70 | unsigned long long ticks; | ||
71 | unsigned long long pclk; | ||
72 | unsigned long rate; | ||
73 | static unsigned long tegra_last_pclk; | ||
74 | |||
75 | if (tegra_pclk == NULL) { | ||
76 | tegra_pclk = clk_get_sys(NULL, "pclk"); | ||
77 | WARN_ON(IS_ERR(tegra_pclk)); | ||
78 | } | ||
79 | |||
80 | rate = clk_get_rate(tegra_pclk); | ||
81 | |||
82 | if (WARN_ON_ONCE(rate <= 0)) | ||
83 | pclk = 100000000; | ||
84 | else | ||
85 | pclk = rate; | ||
86 | |||
87 | if ((rate != tegra_last_pclk)) { | ||
88 | ticks = (us_on * pclk) + 999999ull; | ||
89 | do_div(ticks, 1000000); | ||
90 | writel((unsigned long)ticks, pmc + PMC_CPUPWRGOOD_TIMER); | ||
91 | |||
92 | ticks = (us_off * pclk) + 999999ull; | ||
93 | do_div(ticks, 1000000); | ||
94 | writel((unsigned long)ticks, pmc + PMC_CPUPWROFF_TIMER); | ||
95 | wmb(); | ||
96 | } | ||
97 | tegra_last_pclk = pclk; | ||
98 | } | ||
99 | |||
100 | /* | ||
101 | * restore_cpu_complex | ||
102 | * | ||
103 | * restores cpu clock setting, clears flow controller | ||
104 | * | ||
105 | * Always called on CPU 0. | ||
106 | */ | ||
107 | static void restore_cpu_complex(void) | ||
108 | { | ||
109 | int cpu = smp_processor_id(); | ||
110 | |||
111 | BUG_ON(cpu != 0); | ||
112 | |||
113 | #ifdef CONFIG_SMP | ||
114 | cpu = cpu_logical_map(cpu); | ||
115 | #endif | ||
116 | |||
117 | /* Restore the CPU clock settings */ | ||
118 | tegra_cpu_clock_resume(); | ||
119 | |||
120 | flowctrl_cpu_suspend_exit(cpu); | ||
121 | |||
122 | restore_cpu_arch_register(); | ||
123 | } | ||
124 | |||
125 | /* | ||
126 | * suspend_cpu_complex | ||
127 | * | ||
128 | * saves pll state for use by restart_plls, prepares flow controller for | ||
129 | * transition to suspend state | ||
130 | * | ||
131 | * Must always be called on cpu 0. | ||
132 | */ | ||
133 | static void suspend_cpu_complex(void) | ||
134 | { | ||
135 | int cpu = smp_processor_id(); | ||
136 | |||
137 | BUG_ON(cpu != 0); | ||
138 | |||
139 | #ifdef CONFIG_SMP | ||
140 | cpu = cpu_logical_map(cpu); | ||
141 | #endif | ||
142 | |||
143 | /* Save the CPU clock settings */ | ||
144 | tegra_cpu_clock_suspend(); | ||
145 | |||
146 | flowctrl_cpu_suspend_enter(cpu); | ||
147 | |||
148 | save_cpu_arch_register(); | ||
149 | } | ||
150 | |||
151 | void __cpuinit tegra_clear_cpu_in_lp2(int phy_cpu_id) | ||
152 | { | ||
153 | u32 *cpu_in_lp2 = tegra_cpu_lp2_mask; | ||
154 | |||
155 | spin_lock(&tegra_lp2_lock); | ||
156 | |||
157 | BUG_ON(!(*cpu_in_lp2 & BIT(phy_cpu_id))); | ||
158 | *cpu_in_lp2 &= ~BIT(phy_cpu_id); | ||
159 | |||
160 | spin_unlock(&tegra_lp2_lock); | ||
161 | } | ||
162 | |||
163 | bool __cpuinit tegra_set_cpu_in_lp2(int phy_cpu_id) | ||
164 | { | ||
165 | bool last_cpu = false; | ||
166 | cpumask_t *cpu_lp2_mask = tegra_cpu_lp2_mask; | ||
167 | u32 *cpu_in_lp2 = tegra_cpu_lp2_mask; | ||
168 | |||
169 | spin_lock(&tegra_lp2_lock); | ||
170 | |||
171 | BUG_ON((*cpu_in_lp2 & BIT(phy_cpu_id))); | ||
172 | *cpu_in_lp2 |= BIT(phy_cpu_id); | ||
173 | |||
174 | if ((phy_cpu_id == 0) && cpumask_equal(cpu_lp2_mask, cpu_online_mask)) | ||
175 | last_cpu = true; | ||
176 | |||
177 | spin_unlock(&tegra_lp2_lock); | ||
178 | return last_cpu; | ||
179 | } | ||
180 | |||
181 | static int tegra_sleep_cpu(unsigned long v2p) | ||
182 | { | ||
183 | /* Switch to the identity mapping. */ | ||
184 | cpu_switch_mm(idmap_pgd, &init_mm); | ||
185 | |||
186 | /* Flush the TLB. */ | ||
187 | local_flush_tlb_all(); | ||
188 | |||
189 | tegra_sleep_cpu_finish(v2p); | ||
190 | |||
191 | /* should never here */ | ||
192 | BUG(); | ||
193 | |||
194 | return 0; | ||
195 | } | ||
196 | |||
197 | void tegra_idle_lp2_last(u32 cpu_on_time, u32 cpu_off_time) | ||
198 | { | ||
199 | u32 mode; | ||
200 | |||
201 | /* Only the last cpu down does the final suspend steps */ | ||
202 | mode = readl(pmc + PMC_CTRL); | ||
203 | mode |= TEGRA_POWER_CPU_PWRREQ_OE; | ||
204 | writel(mode, pmc + PMC_CTRL); | ||
205 | |||
206 | set_power_timers(cpu_on_time, cpu_off_time); | ||
207 | |||
208 | cpu_cluster_pm_enter(); | ||
209 | suspend_cpu_complex(); | ||
210 | |||
211 | cpu_suspend(PHYS_OFFSET - PAGE_OFFSET, &tegra_sleep_cpu); | ||
212 | |||
213 | restore_cpu_complex(); | ||
214 | cpu_cluster_pm_exit(); | ||
215 | } | ||
216 | #endif | ||
diff --git a/arch/arm/mach-tegra/pm.h b/arch/arm/mach-tegra/pm.h new file mode 100644 index 000000000000..787335cc964c --- /dev/null +++ b/arch/arm/mach-tegra/pm.h | |||
@@ -0,0 +1,35 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2010 Google, Inc. | ||
3 | * Copyright (c) 2010-2012 NVIDIA Corporation. All rights reserved. | ||
4 | * | ||
5 | * Author: | ||
6 | * Colin Cross <ccross@google.com> | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify it | ||
9 | * under the terms and conditions of the GNU General Public License, | ||
10 | * version 2, as published by the Free Software Foundation. | ||
11 | * | ||
12 | * This program is distributed in the hope it will be useful, but WITHOUT | ||
13 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
14 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
15 | * more details. | ||
16 | * | ||
17 | * You should have received a copy of the GNU General Public License | ||
18 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
19 | */ | ||
20 | |||
21 | #ifndef _MACH_TEGRA_PM_H_ | ||
22 | #define _MACH_TEGRA_PM_H_ | ||
23 | |||
24 | extern unsigned long l2x0_saved_regs_addr; | ||
25 | |||
26 | void save_cpu_arch_register(void); | ||
27 | void restore_cpu_arch_register(void); | ||
28 | |||
29 | void tegra_clear_cpu_in_lp2(int phy_cpu_id); | ||
30 | bool tegra_set_cpu_in_lp2(int phy_cpu_id); | ||
31 | |||
32 | void tegra_idle_lp2_last(u32 cpu_on_time, u32 cpu_off_time); | ||
33 | extern void (*tegra_tear_down_cpu)(void); | ||
34 | |||
35 | #endif /* _MACH_TEGRA_PM_H_ */ | ||
diff --git a/arch/arm/mach-tegra/reset.c b/arch/arm/mach-tegra/reset.c index e05da7d10c3b..3fd89ecd158e 100644 --- a/arch/arm/mach-tegra/reset.c +++ b/arch/arm/mach-tegra/reset.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include "iomap.h" | 25 | #include "iomap.h" |
26 | #include "irammap.h" | 26 | #include "irammap.h" |
27 | #include "reset.h" | 27 | #include "reset.h" |
28 | #include "sleep.h" | ||
28 | #include "fuse.h" | 29 | #include "fuse.h" |
29 | 30 | ||
30 | #define TEGRA_IRAM_RESET_BASE (TEGRA_IRAM_BASE + \ | 31 | #define TEGRA_IRAM_RESET_BASE (TEGRA_IRAM_BASE + \ |
@@ -79,5 +80,10 @@ void __init tegra_cpu_reset_handler_init(void) | |||
79 | virt_to_phys((void *)tegra_secondary_startup); | 80 | virt_to_phys((void *)tegra_secondary_startup); |
80 | #endif | 81 | #endif |
81 | 82 | ||
83 | #ifdef CONFIG_PM_SLEEP | ||
84 | __tegra_cpu_reset_handler_data[TEGRA_RESET_STARTUP_LP2] = | ||
85 | virt_to_phys((void *)tegra_resume); | ||
86 | #endif | ||
87 | |||
82 | tegra_cpu_reset_handler_enable(); | 88 | tegra_cpu_reset_handler_enable(); |
83 | } | 89 | } |
diff --git a/arch/arm/mach-tegra/reset.h b/arch/arm/mach-tegra/reset.h index de88bf851dd3..c90d8e9c4ad2 100644 --- a/arch/arm/mach-tegra/reset.h +++ b/arch/arm/mach-tegra/reset.h | |||
@@ -29,6 +29,8 @@ | |||
29 | 29 | ||
30 | #ifndef __ASSEMBLY__ | 30 | #ifndef __ASSEMBLY__ |
31 | 31 | ||
32 | #include "irammap.h" | ||
33 | |||
32 | extern unsigned long __tegra_cpu_reset_handler_data[TEGRA_RESET_DATA_SIZE]; | 34 | extern unsigned long __tegra_cpu_reset_handler_data[TEGRA_RESET_DATA_SIZE]; |
33 | 35 | ||
34 | void __tegra_cpu_reset_handler_start(void); | 36 | void __tegra_cpu_reset_handler_start(void); |
@@ -36,6 +38,13 @@ void __tegra_cpu_reset_handler(void); | |||
36 | void __tegra_cpu_reset_handler_end(void); | 38 | void __tegra_cpu_reset_handler_end(void); |
37 | void tegra_secondary_startup(void); | 39 | void tegra_secondary_startup(void); |
38 | 40 | ||
41 | #ifdef CONFIG_PM_SLEEP | ||
42 | #define tegra_cpu_lp2_mask \ | ||
43 | (IO_ADDRESS(TEGRA_IRAM_BASE + TEGRA_IRAM_RESET_HANDLER_OFFSET + \ | ||
44 | ((u32)&__tegra_cpu_reset_handler_data[TEGRA_RESET_MASK_LP2] - \ | ||
45 | (u32)__tegra_cpu_reset_handler_start))) | ||
46 | #endif | ||
47 | |||
39 | #define tegra_cpu_reset_handler_offset \ | 48 | #define tegra_cpu_reset_handler_offset \ |
40 | ((u32)__tegra_cpu_reset_handler - \ | 49 | ((u32)__tegra_cpu_reset_handler - \ |
41 | (u32)__tegra_cpu_reset_handler_start) | 50 | (u32)__tegra_cpu_reset_handler_start) |
diff --git a/arch/arm/mach-tegra/sleep-t20.S b/arch/arm/mach-tegra/sleep-tegra20.S index 72ce709799da..72ce709799da 100644 --- a/arch/arm/mach-tegra/sleep-t20.S +++ b/arch/arm/mach-tegra/sleep-tegra20.S | |||
diff --git a/arch/arm/mach-tegra/sleep-t30.S b/arch/arm/mach-tegra/sleep-tegra30.S index be7614b7c5cb..562a8e7e413d 100644 --- a/arch/arm/mach-tegra/sleep-t30.S +++ b/arch/arm/mach-tegra/sleep-tegra30.S | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/linkage.h> | 17 | #include <linux/linkage.h> |
18 | 18 | ||
19 | #include <asm/assembler.h> | 19 | #include <asm/assembler.h> |
20 | #include <asm/asm-offsets.h> | ||
20 | 21 | ||
21 | #include "sleep.h" | 22 | #include "sleep.h" |
22 | #include "flowctrl.h" | 23 | #include "flowctrl.h" |
@@ -80,6 +81,7 @@ delay_1: | |||
80 | ldr r3, [r1] @ read CSR | 81 | ldr r3, [r1] @ read CSR |
81 | str r3, [r1] @ clear CSR | 82 | str r3, [r1] @ clear CSR |
82 | tst r0, #TEGRA30_POWER_HOTPLUG_SHUTDOWN | 83 | tst r0, #TEGRA30_POWER_HOTPLUG_SHUTDOWN |
84 | moveq r3, #FLOW_CTRL_WAIT_FOR_INTERRUPT @ For LP2 | ||
83 | movne r3, #FLOW_CTRL_WAITEVENT @ For hotplug | 85 | movne r3, #FLOW_CTRL_WAITEVENT @ For hotplug |
84 | str r3, [r2] | 86 | str r3, [r2] |
85 | ldr r0, [r2] | 87 | ldr r0, [r2] |
@@ -103,3 +105,67 @@ wfe_war: | |||
103 | 105 | ||
104 | ENDPROC(tegra30_cpu_shutdown) | 106 | ENDPROC(tegra30_cpu_shutdown) |
105 | #endif | 107 | #endif |
108 | |||
109 | #ifdef CONFIG_PM_SLEEP | ||
110 | /* | ||
111 | * tegra30_sleep_cpu_secondary_finish(unsigned long v2p) | ||
112 | * | ||
113 | * Enters LP2 on secondary CPU by exiting coherency and powergating the CPU. | ||
114 | */ | ||
115 | ENTRY(tegra30_sleep_cpu_secondary_finish) | ||
116 | mov r7, lr | ||
117 | |||
118 | /* Flush and disable the L1 data cache */ | ||
119 | bl tegra_disable_clean_inv_dcache | ||
120 | |||
121 | /* Powergate this CPU. */ | ||
122 | mov r0, #0 @ power mode flags (!hotplug) | ||
123 | bl tegra30_cpu_shutdown | ||
124 | mov r0, #1 @ never return here | ||
125 | mov pc, r7 | ||
126 | ENDPROC(tegra30_sleep_cpu_secondary_finish) | ||
127 | |||
128 | /* | ||
129 | * tegra30_tear_down_cpu | ||
130 | * | ||
131 | * Switches the CPU to enter sleep. | ||
132 | */ | ||
133 | ENTRY(tegra30_tear_down_cpu) | ||
134 | mov32 r6, TEGRA_FLOW_CTRL_BASE | ||
135 | |||
136 | b tegra30_enter_sleep | ||
137 | ENDPROC(tegra30_tear_down_cpu) | ||
138 | |||
139 | /* | ||
140 | * tegra30_enter_sleep | ||
141 | * | ||
142 | * uses flow controller to enter sleep state | ||
143 | * executes from IRAM with SDRAM in selfrefresh when target state is LP0 or LP1 | ||
144 | * executes from SDRAM with target state is LP2 | ||
145 | * r6 = TEGRA_FLOW_CTRL_BASE | ||
146 | */ | ||
147 | tegra30_enter_sleep: | ||
148 | cpu_id r1 | ||
149 | |||
150 | cpu_to_csr_reg r2, r1 | ||
151 | ldr r0, [r6, r2] | ||
152 | orr r0, r0, #FLOW_CTRL_CSR_INTR_FLAG | FLOW_CTRL_CSR_EVENT_FLAG | ||
153 | orr r0, r0, #FLOW_CTRL_CSR_ENABLE | ||
154 | str r0, [r6, r2] | ||
155 | |||
156 | mov r0, #FLOW_CTRL_WAIT_FOR_INTERRUPT | ||
157 | orr r0, r0, #FLOW_CTRL_HALT_CPU_IRQ | FLOW_CTRL_HALT_CPU_FIQ | ||
158 | cpu_to_halt_reg r2, r1 | ||
159 | str r0, [r6, r2] | ||
160 | dsb | ||
161 | ldr r0, [r6, r2] /* memory barrier */ | ||
162 | |||
163 | halted: | ||
164 | isb | ||
165 | dsb | ||
166 | wfi /* CPU should be power gated here */ | ||
167 | |||
168 | /* !!!FIXME!!! Implement halt failure handler */ | ||
169 | b halted | ||
170 | |||
171 | #endif | ||
diff --git a/arch/arm/mach-tegra/sleep.S b/arch/arm/mach-tegra/sleep.S index 08e9481c049e..26afa7cbed11 100644 --- a/arch/arm/mach-tegra/sleep.S +++ b/arch/arm/mach-tegra/sleep.S | |||
@@ -25,9 +25,87 @@ | |||
25 | #include <linux/linkage.h> | 25 | #include <linux/linkage.h> |
26 | 26 | ||
27 | #include <asm/assembler.h> | 27 | #include <asm/assembler.h> |
28 | #include <asm/cache.h> | ||
29 | #include <asm/cp15.h> | ||
30 | #include <asm/hardware/cache-l2x0.h> | ||
28 | 31 | ||
29 | #include "iomap.h" | 32 | #include "iomap.h" |
30 | 33 | ||
31 | #include "flowctrl.h" | 34 | #include "flowctrl.h" |
32 | #include "sleep.h" | 35 | #include "sleep.h" |
33 | 36 | ||
37 | #ifdef CONFIG_PM_SLEEP | ||
38 | /* | ||
39 | * tegra_disable_clean_inv_dcache | ||
40 | * | ||
41 | * disable, clean & invalidate the D-cache | ||
42 | * | ||
43 | * Corrupted registers: r1-r3, r6, r8, r9-r11 | ||
44 | */ | ||
45 | ENTRY(tegra_disable_clean_inv_dcache) | ||
46 | stmfd sp!, {r0, r4-r5, r7, r9-r11, lr} | ||
47 | dmb @ ensure ordering | ||
48 | |||
49 | /* Disable the D-cache */ | ||
50 | mrc p15, 0, r2, c1, c0, 0 | ||
51 | bic r2, r2, #CR_C | ||
52 | mcr p15, 0, r2, c1, c0, 0 | ||
53 | isb | ||
54 | |||
55 | /* Flush the D-cache */ | ||
56 | bl v7_flush_dcache_louis | ||
57 | |||
58 | /* Trun off coherency */ | ||
59 | exit_smp r4, r5 | ||
60 | |||
61 | ldmfd sp!, {r0, r4-r5, r7, r9-r11, pc} | ||
62 | ENDPROC(tegra_disable_clean_inv_dcache) | ||
63 | |||
64 | /* | ||
65 | * tegra_sleep_cpu_finish(unsigned long v2p) | ||
66 | * | ||
67 | * enters suspend in LP2 by turning off the mmu and jumping to | ||
68 | * tegra?_tear_down_cpu | ||
69 | */ | ||
70 | ENTRY(tegra_sleep_cpu_finish) | ||
71 | /* Flush and disable the L1 data cache */ | ||
72 | bl tegra_disable_clean_inv_dcache | ||
73 | |||
74 | mov32 r6, tegra_tear_down_cpu | ||
75 | ldr r1, [r6] | ||
76 | add r1, r1, r0 | ||
77 | |||
78 | mov32 r3, tegra_shut_off_mmu | ||
79 | add r3, r3, r0 | ||
80 | mov r0, r1 | ||
81 | |||
82 | mov pc, r3 | ||
83 | ENDPROC(tegra_sleep_cpu_finish) | ||
84 | |||
85 | /* | ||
86 | * tegra_shut_off_mmu | ||
87 | * | ||
88 | * r0 = physical address to jump to with mmu off | ||
89 | * | ||
90 | * called with VA=PA mapping | ||
91 | * turns off MMU, icache, dcache and branch prediction | ||
92 | */ | ||
93 | .align L1_CACHE_SHIFT | ||
94 | .pushsection .idmap.text, "ax" | ||
95 | ENTRY(tegra_shut_off_mmu) | ||
96 | mrc p15, 0, r3, c1, c0, 0 | ||
97 | movw r2, #CR_I | CR_Z | CR_C | CR_M | ||
98 | bic r3, r3, r2 | ||
99 | dsb | ||
100 | mcr p15, 0, r3, c1, c0, 0 | ||
101 | isb | ||
102 | #ifdef CONFIG_CACHE_L2X0 | ||
103 | /* Disable L2 cache */ | ||
104 | mov32 r4, TEGRA_ARM_PERIF_BASE + 0x3000 | ||
105 | mov r5, #0 | ||
106 | str r5, [r4, #L2X0_CTRL] | ||
107 | #endif | ||
108 | mov pc, r0 | ||
109 | ENDPROC(tegra_shut_off_mmu) | ||
110 | .popsection | ||
111 | #endif | ||
diff --git a/arch/arm/mach-tegra/sleep.h b/arch/arm/mach-tegra/sleep.h index 4889b281c5f9..9821ee725420 100644 --- a/arch/arm/mach-tegra/sleep.h +++ b/arch/arm/mach-tegra/sleep.h | |||
@@ -71,7 +71,41 @@ | |||
71 | str \tmp2, [\tmp1] @ invalidate SCU tags for CPU | 71 | str \tmp2, [\tmp1] @ invalidate SCU tags for CPU |
72 | dsb | 72 | dsb |
73 | .endm | 73 | .endm |
74 | |||
75 | /* Macro to resume & re-enable L2 cache */ | ||
76 | #ifndef L2X0_CTRL_EN | ||
77 | #define L2X0_CTRL_EN 1 | ||
78 | #endif | ||
79 | |||
80 | #ifdef CONFIG_CACHE_L2X0 | ||
81 | .macro l2_cache_resume, tmp1, tmp2, tmp3, phys_l2x0_saved_regs | ||
82 | adr \tmp1, \phys_l2x0_saved_regs | ||
83 | ldr \tmp1, [\tmp1] | ||
84 | ldr \tmp2, [\tmp1, #L2X0_R_PHY_BASE] | ||
85 | ldr \tmp3, [\tmp2, #L2X0_CTRL] | ||
86 | tst \tmp3, #L2X0_CTRL_EN | ||
87 | bne exit_l2_resume | ||
88 | ldr \tmp3, [\tmp1, #L2X0_R_TAG_LATENCY] | ||
89 | str \tmp3, [\tmp2, #L2X0_TAG_LATENCY_CTRL] | ||
90 | ldr \tmp3, [\tmp1, #L2X0_R_DATA_LATENCY] | ||
91 | str \tmp3, [\tmp2, #L2X0_DATA_LATENCY_CTRL] | ||
92 | ldr \tmp3, [\tmp1, #L2X0_R_PREFETCH_CTRL] | ||
93 | str \tmp3, [\tmp2, #L2X0_PREFETCH_CTRL] | ||
94 | ldr \tmp3, [\tmp1, #L2X0_R_PWR_CTRL] | ||
95 | str \tmp3, [\tmp2, #L2X0_POWER_CTRL] | ||
96 | ldr \tmp3, [\tmp1, #L2X0_R_AUX_CTRL] | ||
97 | str \tmp3, [\tmp2, #L2X0_AUX_CTRL] | ||
98 | mov \tmp3, #L2X0_CTRL_EN | ||
99 | str \tmp3, [\tmp2, #L2X0_CTRL] | ||
100 | exit_l2_resume: | ||
101 | .endm | ||
102 | #else /* CONFIG_CACHE_L2X0 */ | ||
103 | .macro l2_cache_resume, tmp1, tmp2, tmp3, phys_l2x0_saved_regs | ||
104 | .endm | ||
105 | #endif /* CONFIG_CACHE_L2X0 */ | ||
74 | #else | 106 | #else |
107 | void tegra_resume(void); | ||
108 | int tegra_sleep_cpu_finish(unsigned long); | ||
75 | 109 | ||
76 | #ifdef CONFIG_HOTPLUG_CPU | 110 | #ifdef CONFIG_HOTPLUG_CPU |
77 | void tegra20_hotplug_init(void); | 111 | void tegra20_hotplug_init(void); |
@@ -81,5 +115,8 @@ static inline void tegra20_hotplug_init(void) {} | |||
81 | static inline void tegra30_hotplug_init(void) {} | 115 | static inline void tegra30_hotplug_init(void) {} |
82 | #endif | 116 | #endif |
83 | 117 | ||
118 | int tegra30_sleep_cpu_secondary_finish(unsigned long); | ||
119 | void tegra30_tear_down_cpu(void); | ||
120 | |||
84 | #endif | 121 | #endif |
85 | #endif | 122 | #endif |
diff --git a/arch/arm/mach-tegra/tegra20_clocks_data.c b/arch/arm/mach-tegra/tegra20_clocks_data.c index 9615ee39c353..a23a0734e352 100644 --- a/arch/arm/mach-tegra/tegra20_clocks_data.c +++ b/arch/arm/mach-tegra/tegra20_clocks_data.c | |||
@@ -246,11 +246,16 @@ static struct clk_pll_freq_table tegra_pll_d_freq_table[] = { | |||
246 | { 19200000, 216000000, 135, 12, 1, 3}, | 246 | { 19200000, 216000000, 135, 12, 1, 3}, |
247 | { 26000000, 216000000, 216, 26, 1, 4}, | 247 | { 26000000, 216000000, 216, 26, 1, 4}, |
248 | 248 | ||
249 | { 12000000, 297000000, 99, 4, 1, 4 }, | ||
250 | { 12000000, 339000000, 113, 4, 1, 4 }, | ||
251 | |||
249 | { 12000000, 594000000, 594, 12, 1, 8}, | 252 | { 12000000, 594000000, 594, 12, 1, 8}, |
250 | { 13000000, 594000000, 594, 13, 1, 8}, | 253 | { 13000000, 594000000, 594, 13, 1, 8}, |
251 | { 19200000, 594000000, 495, 16, 1, 8}, | 254 | { 19200000, 594000000, 495, 16, 1, 8}, |
252 | { 26000000, 594000000, 594, 26, 1, 8}, | 255 | { 26000000, 594000000, 594, 26, 1, 8}, |
253 | 256 | ||
257 | { 12000000, 616000000, 616, 12, 1, 8}, | ||
258 | |||
254 | { 12000000, 1000000000, 1000, 12, 1, 12}, | 259 | { 12000000, 1000000000, 1000, 12, 1, 12}, |
255 | { 13000000, 1000000000, 1000, 13, 1, 12}, | 260 | { 13000000, 1000000000, 1000, 13, 1, 12}, |
256 | { 19200000, 1000000000, 625, 12, 1, 8}, | 261 | { 19200000, 1000000000, 625, 12, 1, 8}, |
@@ -1036,9 +1041,6 @@ static struct clk_duplicate tegra_clk_duplicates[] = { | |||
1036 | CLK_DUPLICATE("usbd", "utmip-pad", NULL), | 1041 | CLK_DUPLICATE("usbd", "utmip-pad", NULL), |
1037 | CLK_DUPLICATE("usbd", "tegra-ehci.0", NULL), | 1042 | CLK_DUPLICATE("usbd", "tegra-ehci.0", NULL), |
1038 | CLK_DUPLICATE("usbd", "tegra-otg", NULL), | 1043 | CLK_DUPLICATE("usbd", "tegra-otg", NULL), |
1039 | CLK_DUPLICATE("hdmi", "tegradc.0", "hdmi"), | ||
1040 | CLK_DUPLICATE("hdmi", "tegradc.1", "hdmi"), | ||
1041 | CLK_DUPLICATE("host1x", "tegra_grhost", "host1x"), | ||
1042 | CLK_DUPLICATE("2d", "tegra_grhost", "gr2d"), | 1044 | CLK_DUPLICATE("2d", "tegra_grhost", "gr2d"), |
1043 | CLK_DUPLICATE("3d", "tegra_grhost", "gr3d"), | 1045 | CLK_DUPLICATE("3d", "tegra_grhost", "gr3d"), |
1044 | CLK_DUPLICATE("epp", "tegra_grhost", "epp"), | 1046 | CLK_DUPLICATE("epp", "tegra_grhost", "epp"), |
@@ -1051,6 +1053,9 @@ static struct clk_duplicate tegra_clk_duplicates[] = { | |||
1051 | CLK_DUPLICATE("pll_p_out3", "tegra-i2c.1", "fast-clk"), | 1053 | CLK_DUPLICATE("pll_p_out3", "tegra-i2c.1", "fast-clk"), |
1052 | CLK_DUPLICATE("pll_p_out3", "tegra-i2c.2", "fast-clk"), | 1054 | CLK_DUPLICATE("pll_p_out3", "tegra-i2c.2", "fast-clk"), |
1053 | CLK_DUPLICATE("pll_p_out3", "tegra-i2c.3", "fast-clk"), | 1055 | CLK_DUPLICATE("pll_p_out3", "tegra-i2c.3", "fast-clk"), |
1056 | CLK_DUPLICATE("pll_p", "tegradc.0", "parent"), | ||
1057 | CLK_DUPLICATE("pll_p", "tegradc.1", "parent"), | ||
1058 | CLK_DUPLICATE("pll_d_out0", "hdmi", "parent"), | ||
1054 | }; | 1059 | }; |
1055 | 1060 | ||
1056 | #define CLK(dev, con, ck) \ | 1061 | #define CLK(dev, con, ck) \ |
diff --git a/arch/arm/mach-tegra/tegra20_speedo.c b/arch/arm/mach-tegra/tegra20_speedo.c new file mode 100644 index 000000000000..fa6eb570623f --- /dev/null +++ b/arch/arm/mach-tegra/tegra20_speedo.c | |||
@@ -0,0 +1,109 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2012, NVIDIA CORPORATION. All rights reserved. | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify it | ||
5 | * under the terms and conditions of the GNU General Public License, | ||
6 | * version 2, as published by the Free Software Foundation. | ||
7 | * | ||
8 | * This program is distributed in the hope it will be useful, but WITHOUT | ||
9 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
10 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
11 | * more details. | ||
12 | * | ||
13 | * You should have received a copy of the GNU General Public License | ||
14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
15 | */ | ||
16 | |||
17 | #include <linux/kernel.h> | ||
18 | #include <linux/bug.h> | ||
19 | |||
20 | #include "fuse.h" | ||
21 | |||
22 | #define CPU_SPEEDO_LSBIT 20 | ||
23 | #define CPU_SPEEDO_MSBIT 29 | ||
24 | #define CPU_SPEEDO_REDUND_LSBIT 30 | ||
25 | #define CPU_SPEEDO_REDUND_MSBIT 39 | ||
26 | #define CPU_SPEEDO_REDUND_OFFS (CPU_SPEEDO_REDUND_MSBIT - CPU_SPEEDO_MSBIT) | ||
27 | |||
28 | #define CORE_SPEEDO_LSBIT 40 | ||
29 | #define CORE_SPEEDO_MSBIT 47 | ||
30 | #define CORE_SPEEDO_REDUND_LSBIT 48 | ||
31 | #define CORE_SPEEDO_REDUND_MSBIT 55 | ||
32 | #define CORE_SPEEDO_REDUND_OFFS (CORE_SPEEDO_REDUND_MSBIT - CORE_SPEEDO_MSBIT) | ||
33 | |||
34 | #define SPEEDO_MULT 4 | ||
35 | |||
36 | #define PROCESS_CORNERS_NUM 4 | ||
37 | |||
38 | #define SPEEDO_ID_SELECT_0(rev) ((rev) <= 2) | ||
39 | #define SPEEDO_ID_SELECT_1(sku) \ | ||
40 | (((sku) != 20) && ((sku) != 23) && ((sku) != 24) && \ | ||
41 | ((sku) != 27) && ((sku) != 28)) | ||
42 | |||
43 | enum { | ||
44 | SPEEDO_ID_0, | ||
45 | SPEEDO_ID_1, | ||
46 | SPEEDO_ID_2, | ||
47 | SPEEDO_ID_COUNT, | ||
48 | }; | ||
49 | |||
50 | static const u32 cpu_process_speedos[][PROCESS_CORNERS_NUM] = { | ||
51 | {315, 366, 420, UINT_MAX}, | ||
52 | {303, 368, 419, UINT_MAX}, | ||
53 | {316, 331, 383, UINT_MAX}, | ||
54 | }; | ||
55 | |||
56 | static const u32 core_process_speedos[][PROCESS_CORNERS_NUM] = { | ||
57 | {165, 195, 224, UINT_MAX}, | ||
58 | {165, 195, 224, UINT_MAX}, | ||
59 | {165, 195, 224, UINT_MAX}, | ||
60 | }; | ||
61 | |||
62 | void tegra20_init_speedo_data(void) | ||
63 | { | ||
64 | u32 reg; | ||
65 | u32 val; | ||
66 | int i; | ||
67 | |||
68 | BUILD_BUG_ON(ARRAY_SIZE(cpu_process_speedos) != SPEEDO_ID_COUNT); | ||
69 | BUILD_BUG_ON(ARRAY_SIZE(core_process_speedos) != SPEEDO_ID_COUNT); | ||
70 | |||
71 | if (SPEEDO_ID_SELECT_0(tegra_revision)) | ||
72 | tegra_soc_speedo_id = SPEEDO_ID_0; | ||
73 | else if (SPEEDO_ID_SELECT_1(tegra_sku_id)) | ||
74 | tegra_soc_speedo_id = SPEEDO_ID_1; | ||
75 | else | ||
76 | tegra_soc_speedo_id = SPEEDO_ID_2; | ||
77 | |||
78 | val = 0; | ||
79 | for (i = CPU_SPEEDO_MSBIT; i >= CPU_SPEEDO_LSBIT; i--) { | ||
80 | reg = tegra_spare_fuse(i) | | ||
81 | tegra_spare_fuse(i + CPU_SPEEDO_REDUND_OFFS); | ||
82 | val = (val << 1) | (reg & 0x1); | ||
83 | } | ||
84 | val = val * SPEEDO_MULT; | ||
85 | pr_debug("%s CPU speedo value %u\n", __func__, val); | ||
86 | |||
87 | for (i = 0; i < (PROCESS_CORNERS_NUM - 1); i++) { | ||
88 | if (val <= cpu_process_speedos[tegra_soc_speedo_id][i]) | ||
89 | break; | ||
90 | } | ||
91 | tegra_cpu_process_id = i; | ||
92 | |||
93 | val = 0; | ||
94 | for (i = CORE_SPEEDO_MSBIT; i >= CORE_SPEEDO_LSBIT; i--) { | ||
95 | reg = tegra_spare_fuse(i) | | ||
96 | tegra_spare_fuse(i + CORE_SPEEDO_REDUND_OFFS); | ||
97 | val = (val << 1) | (reg & 0x1); | ||
98 | } | ||
99 | val = val * SPEEDO_MULT; | ||
100 | pr_debug("%s Core speedo value %u\n", __func__, val); | ||
101 | |||
102 | for (i = 0; i < (PROCESS_CORNERS_NUM - 1); i++) { | ||
103 | if (val <= core_process_speedos[tegra_soc_speedo_id][i]) | ||
104 | break; | ||
105 | } | ||
106 | tegra_core_process_id = i; | ||
107 | |||
108 | pr_info("Tegra20 Soc Speedo ID %d", tegra_soc_speedo_id); | ||
109 | } | ||
diff --git a/arch/arm/mach-tegra/tegra30_clocks.c b/arch/arm/mach-tegra/tegra30_clocks.c index 000239d68393..efc000e32e1c 100644 --- a/arch/arm/mach-tegra/tegra30_clocks.c +++ b/arch/arm/mach-tegra/tegra30_clocks.c | |||
@@ -31,6 +31,8 @@ | |||
31 | 31 | ||
32 | #include <asm/clkdev.h> | 32 | #include <asm/clkdev.h> |
33 | 33 | ||
34 | #include <mach/powergate.h> | ||
35 | |||
34 | #include "clock.h" | 36 | #include "clock.h" |
35 | #include "fuse.h" | 37 | #include "fuse.h" |
36 | #include "iomap.h" | 38 | #include "iomap.h" |
@@ -309,6 +311,31 @@ | |||
309 | #define CPU_CLOCK(cpu) (0x1 << (8 + cpu)) | 311 | #define CPU_CLOCK(cpu) (0x1 << (8 + cpu)) |
310 | #define CPU_RESET(cpu) (0x1111ul << (cpu)) | 312 | #define CPU_RESET(cpu) (0x1111ul << (cpu)) |
311 | 313 | ||
314 | #define CLK_RESET_CCLK_BURST 0x20 | ||
315 | #define CLK_RESET_CCLK_DIVIDER 0x24 | ||
316 | #define CLK_RESET_PLLX_BASE 0xe0 | ||
317 | #define CLK_RESET_PLLX_MISC 0xe4 | ||
318 | |||
319 | #define CLK_RESET_SOURCE_CSITE 0x1d4 | ||
320 | |||
321 | #define CLK_RESET_CCLK_BURST_POLICY_SHIFT 28 | ||
322 | #define CLK_RESET_CCLK_RUN_POLICY_SHIFT 4 | ||
323 | #define CLK_RESET_CCLK_IDLE_POLICY_SHIFT 0 | ||
324 | #define CLK_RESET_CCLK_IDLE_POLICY 1 | ||
325 | #define CLK_RESET_CCLK_RUN_POLICY 2 | ||
326 | #define CLK_RESET_CCLK_BURST_POLICY_PLLX 8 | ||
327 | |||
328 | #ifdef CONFIG_PM_SLEEP | ||
329 | static struct cpu_clk_suspend_context { | ||
330 | u32 pllx_misc; | ||
331 | u32 pllx_base; | ||
332 | |||
333 | u32 cpu_burst; | ||
334 | u32 clk_csite_src; | ||
335 | u32 cclk_divider; | ||
336 | } tegra30_cpu_clk_sctx; | ||
337 | #endif | ||
338 | |||
312 | /** | 339 | /** |
313 | * Structure defining the fields for USB UTMI clocks Parameters. | 340 | * Structure defining the fields for USB UTMI clocks Parameters. |
314 | */ | 341 | */ |
@@ -791,6 +818,112 @@ struct clk_ops tegra30_twd_ops = { | |||
791 | .recalc_rate = tegra30_twd_clk_recalc_rate, | 818 | .recalc_rate = tegra30_twd_clk_recalc_rate, |
792 | }; | 819 | }; |
793 | 820 | ||
821 | /* bus clock functions */ | ||
822 | static int tegra30_bus_clk_is_enabled(struct clk_hw *hw) | ||
823 | { | ||
824 | struct clk_tegra *c = to_clk_tegra(hw); | ||
825 | u32 val = clk_readl(c->reg); | ||
826 | |||
827 | c->state = ((val >> c->reg_shift) & BUS_CLK_DISABLE) ? OFF : ON; | ||
828 | return c->state; | ||
829 | } | ||
830 | |||
831 | static int tegra30_bus_clk_enable(struct clk_hw *hw) | ||
832 | { | ||
833 | struct clk_tegra *c = to_clk_tegra(hw); | ||
834 | u32 val; | ||
835 | |||
836 | val = clk_readl(c->reg); | ||
837 | val &= ~(BUS_CLK_DISABLE << c->reg_shift); | ||
838 | clk_writel(val, c->reg); | ||
839 | |||
840 | return 0; | ||
841 | } | ||
842 | |||
843 | static void tegra30_bus_clk_disable(struct clk_hw *hw) | ||
844 | { | ||
845 | struct clk_tegra *c = to_clk_tegra(hw); | ||
846 | u32 val; | ||
847 | |||
848 | val = clk_readl(c->reg); | ||
849 | val |= BUS_CLK_DISABLE << c->reg_shift; | ||
850 | clk_writel(val, c->reg); | ||
851 | } | ||
852 | |||
853 | static unsigned long tegra30_bus_clk_recalc_rate(struct clk_hw *hw, | ||
854 | unsigned long prate) | ||
855 | { | ||
856 | struct clk_tegra *c = to_clk_tegra(hw); | ||
857 | u32 val = clk_readl(c->reg); | ||
858 | u64 rate = prate; | ||
859 | |||
860 | c->div = ((val >> c->reg_shift) & BUS_CLK_DIV_MASK) + 1; | ||
861 | c->mul = 1; | ||
862 | |||
863 | if (c->mul != 0 && c->div != 0) { | ||
864 | rate *= c->mul; | ||
865 | rate += c->div - 1; /* round up */ | ||
866 | do_div(rate, c->div); | ||
867 | } | ||
868 | return rate; | ||
869 | } | ||
870 | |||
871 | static int tegra30_bus_clk_set_rate(struct clk_hw *hw, unsigned long rate, | ||
872 | unsigned long parent_rate) | ||
873 | { | ||
874 | struct clk_tegra *c = to_clk_tegra(hw); | ||
875 | int ret = -EINVAL; | ||
876 | u32 val; | ||
877 | int i; | ||
878 | |||
879 | val = clk_readl(c->reg); | ||
880 | for (i = 1; i <= 4; i++) { | ||
881 | if (rate == parent_rate / i) { | ||
882 | val &= ~(BUS_CLK_DIV_MASK << c->reg_shift); | ||
883 | val |= (i - 1) << c->reg_shift; | ||
884 | clk_writel(val, c->reg); | ||
885 | c->div = i; | ||
886 | c->mul = 1; | ||
887 | ret = 0; | ||
888 | break; | ||
889 | } | ||
890 | } | ||
891 | |||
892 | return ret; | ||
893 | } | ||
894 | |||
895 | static long tegra30_bus_clk_round_rate(struct clk_hw *hw, unsigned long rate, | ||
896 | unsigned long *prate) | ||
897 | { | ||
898 | unsigned long parent_rate = *prate; | ||
899 | s64 divider; | ||
900 | |||
901 | if (rate >= parent_rate) | ||
902 | return parent_rate; | ||
903 | |||
904 | divider = parent_rate; | ||
905 | divider += rate - 1; | ||
906 | do_div(divider, rate); | ||
907 | |||
908 | if (divider < 0) | ||
909 | return divider; | ||
910 | |||
911 | if (divider > 4) | ||
912 | divider = 4; | ||
913 | do_div(parent_rate, divider); | ||
914 | |||
915 | return parent_rate; | ||
916 | } | ||
917 | |||
918 | struct clk_ops tegra30_bus_ops = { | ||
919 | .is_enabled = tegra30_bus_clk_is_enabled, | ||
920 | .enable = tegra30_bus_clk_enable, | ||
921 | .disable = tegra30_bus_clk_disable, | ||
922 | .set_rate = tegra30_bus_clk_set_rate, | ||
923 | .round_rate = tegra30_bus_clk_round_rate, | ||
924 | .recalc_rate = tegra30_bus_clk_recalc_rate, | ||
925 | }; | ||
926 | |||
794 | /* Blink output functions */ | 927 | /* Blink output functions */ |
795 | static int tegra30_blink_clk_is_enabled(struct clk_hw *hw) | 928 | static int tegra30_blink_clk_is_enabled(struct clk_hw *hw) |
796 | { | 929 | { |
@@ -2280,12 +2413,93 @@ static void tegra30_disable_cpu_clock(u32 cpu) | |||
2280 | reg_clk_base + TEGRA_CLK_RST_CONTROLLER_CLK_CPU_CMPLX); | 2413 | reg_clk_base + TEGRA_CLK_RST_CONTROLLER_CLK_CPU_CMPLX); |
2281 | } | 2414 | } |
2282 | 2415 | ||
2416 | #ifdef CONFIG_PM_SLEEP | ||
2417 | static bool tegra30_cpu_rail_off_ready(void) | ||
2418 | { | ||
2419 | unsigned int cpu_rst_status; | ||
2420 | int cpu_pwr_status; | ||
2421 | |||
2422 | cpu_rst_status = readl(reg_clk_base + | ||
2423 | TEGRA30_CLK_RST_CONTROLLER_CPU_CMPLX_STATUS); | ||
2424 | cpu_pwr_status = tegra_powergate_is_powered(TEGRA_POWERGATE_CPU1) || | ||
2425 | tegra_powergate_is_powered(TEGRA_POWERGATE_CPU2) || | ||
2426 | tegra_powergate_is_powered(TEGRA_POWERGATE_CPU3); | ||
2427 | |||
2428 | if (((cpu_rst_status & 0xE) != 0xE) || cpu_pwr_status) | ||
2429 | return false; | ||
2430 | |||
2431 | return true; | ||
2432 | } | ||
2433 | |||
2434 | static void tegra30_cpu_clock_suspend(void) | ||
2435 | { | ||
2436 | /* switch coresite to clk_m, save off original source */ | ||
2437 | tegra30_cpu_clk_sctx.clk_csite_src = | ||
2438 | readl(reg_clk_base + CLK_RESET_SOURCE_CSITE); | ||
2439 | writel(3<<30, reg_clk_base + CLK_RESET_SOURCE_CSITE); | ||
2440 | |||
2441 | tegra30_cpu_clk_sctx.cpu_burst = | ||
2442 | readl(reg_clk_base + CLK_RESET_CCLK_BURST); | ||
2443 | tegra30_cpu_clk_sctx.pllx_base = | ||
2444 | readl(reg_clk_base + CLK_RESET_PLLX_BASE); | ||
2445 | tegra30_cpu_clk_sctx.pllx_misc = | ||
2446 | readl(reg_clk_base + CLK_RESET_PLLX_MISC); | ||
2447 | tegra30_cpu_clk_sctx.cclk_divider = | ||
2448 | readl(reg_clk_base + CLK_RESET_CCLK_DIVIDER); | ||
2449 | } | ||
2450 | |||
2451 | static void tegra30_cpu_clock_resume(void) | ||
2452 | { | ||
2453 | unsigned int reg, policy; | ||
2454 | |||
2455 | /* Is CPU complex already running on PLLX? */ | ||
2456 | reg = readl(reg_clk_base + CLK_RESET_CCLK_BURST); | ||
2457 | policy = (reg >> CLK_RESET_CCLK_BURST_POLICY_SHIFT) & 0xF; | ||
2458 | |||
2459 | if (policy == CLK_RESET_CCLK_IDLE_POLICY) | ||
2460 | reg = (reg >> CLK_RESET_CCLK_IDLE_POLICY_SHIFT) & 0xF; | ||
2461 | else if (policy == CLK_RESET_CCLK_RUN_POLICY) | ||
2462 | reg = (reg >> CLK_RESET_CCLK_RUN_POLICY_SHIFT) & 0xF; | ||
2463 | else | ||
2464 | BUG(); | ||
2465 | |||
2466 | if (reg != CLK_RESET_CCLK_BURST_POLICY_PLLX) { | ||
2467 | /* restore PLLX settings if CPU is on different PLL */ | ||
2468 | writel(tegra30_cpu_clk_sctx.pllx_misc, | ||
2469 | reg_clk_base + CLK_RESET_PLLX_MISC); | ||
2470 | writel(tegra30_cpu_clk_sctx.pllx_base, | ||
2471 | reg_clk_base + CLK_RESET_PLLX_BASE); | ||
2472 | |||
2473 | /* wait for PLL stabilization if PLLX was enabled */ | ||
2474 | if (tegra30_cpu_clk_sctx.pllx_base & (1 << 30)) | ||
2475 | udelay(300); | ||
2476 | } | ||
2477 | |||
2478 | /* | ||
2479 | * Restore original burst policy setting for calls resulting from CPU | ||
2480 | * LP2 in idle or system suspend. | ||
2481 | */ | ||
2482 | writel(tegra30_cpu_clk_sctx.cclk_divider, | ||
2483 | reg_clk_base + CLK_RESET_CCLK_DIVIDER); | ||
2484 | writel(tegra30_cpu_clk_sctx.cpu_burst, | ||
2485 | reg_clk_base + CLK_RESET_CCLK_BURST); | ||
2486 | |||
2487 | writel(tegra30_cpu_clk_sctx.clk_csite_src, | ||
2488 | reg_clk_base + CLK_RESET_SOURCE_CSITE); | ||
2489 | } | ||
2490 | #endif | ||
2491 | |||
2283 | static struct tegra_cpu_car_ops tegra30_cpu_car_ops = { | 2492 | static struct tegra_cpu_car_ops tegra30_cpu_car_ops = { |
2284 | .wait_for_reset = tegra30_wait_cpu_in_reset, | 2493 | .wait_for_reset = tegra30_wait_cpu_in_reset, |
2285 | .put_in_reset = tegra30_put_cpu_in_reset, | 2494 | .put_in_reset = tegra30_put_cpu_in_reset, |
2286 | .out_of_reset = tegra30_cpu_out_of_reset, | 2495 | .out_of_reset = tegra30_cpu_out_of_reset, |
2287 | .enable_clock = tegra30_enable_cpu_clock, | 2496 | .enable_clock = tegra30_enable_cpu_clock, |
2288 | .disable_clock = tegra30_disable_cpu_clock, | 2497 | .disable_clock = tegra30_disable_cpu_clock, |
2498 | #ifdef CONFIG_PM_SLEEP | ||
2499 | .rail_off_ready = tegra30_cpu_rail_off_ready, | ||
2500 | .suspend = tegra30_cpu_clock_suspend, | ||
2501 | .resume = tegra30_cpu_clock_resume, | ||
2502 | #endif | ||
2289 | }; | 2503 | }; |
2290 | 2504 | ||
2291 | void __init tegra30_cpu_car_ops_init(void) | 2505 | void __init tegra30_cpu_car_ops_init(void) |
diff --git a/arch/arm/mach-tegra/tegra30_clocks.h b/arch/arm/mach-tegra/tegra30_clocks.h index f2f88fef6b8b..7a34adb2f72d 100644 --- a/arch/arm/mach-tegra/tegra30_clocks.h +++ b/arch/arm/mach-tegra/tegra30_clocks.h | |||
@@ -34,6 +34,7 @@ extern struct clk_ops tegra_clk_out_ops; | |||
34 | extern struct clk_ops tegra30_super_ops; | 34 | extern struct clk_ops tegra30_super_ops; |
35 | extern struct clk_ops tegra30_blink_clk_ops; | 35 | extern struct clk_ops tegra30_blink_clk_ops; |
36 | extern struct clk_ops tegra30_twd_ops; | 36 | extern struct clk_ops tegra30_twd_ops; |
37 | extern struct clk_ops tegra30_bus_ops; | ||
37 | extern struct clk_ops tegra30_periph_clk_ops; | 38 | extern struct clk_ops tegra30_periph_clk_ops; |
38 | extern struct clk_ops tegra30_dsib_clk_ops; | 39 | extern struct clk_ops tegra30_dsib_clk_ops; |
39 | extern struct clk_ops tegra_nand_clk_ops; | 40 | extern struct clk_ops tegra_nand_clk_ops; |
diff --git a/arch/arm/mach-tegra/tegra30_clocks_data.c b/arch/arm/mach-tegra/tegra30_clocks_data.c index 3d2e5532a9ea..6942c7add3bb 100644 --- a/arch/arm/mach-tegra/tegra30_clocks_data.c +++ b/arch/arm/mach-tegra/tegra30_clocks_data.c | |||
@@ -711,6 +711,50 @@ static struct clk tegra_clk_sclk = { | |||
711 | .num_parents = ARRAY_SIZE(mux_sclk), | 711 | .num_parents = ARRAY_SIZE(mux_sclk), |
712 | }; | 712 | }; |
713 | 713 | ||
714 | static const char *tegra_hclk_parent_names[] = { | ||
715 | "tegra_sclk", | ||
716 | }; | ||
717 | |||
718 | static struct clk *tegra_hclk_parents[] = { | ||
719 | &tegra_clk_sclk, | ||
720 | }; | ||
721 | |||
722 | static struct clk tegra_hclk; | ||
723 | static struct clk_tegra tegra_hclk_hw = { | ||
724 | .hw = { | ||
725 | .clk = &tegra_hclk, | ||
726 | }, | ||
727 | .flags = DIV_BUS, | ||
728 | .reg = 0x30, | ||
729 | .reg_shift = 4, | ||
730 | .max_rate = 378000000, | ||
731 | .min_rate = 12000000, | ||
732 | }; | ||
733 | DEFINE_CLK_TEGRA(hclk, 0, &tegra30_bus_ops, 0, tegra_hclk_parent_names, | ||
734 | tegra_hclk_parents, &tegra_clk_sclk); | ||
735 | |||
736 | static const char *tegra_pclk_parent_names[] = { | ||
737 | "tegra_hclk", | ||
738 | }; | ||
739 | |||
740 | static struct clk *tegra_pclk_parents[] = { | ||
741 | &tegra_hclk, | ||
742 | }; | ||
743 | |||
744 | static struct clk tegra_pclk; | ||
745 | static struct clk_tegra tegra_pclk_hw = { | ||
746 | .hw = { | ||
747 | .clk = &tegra_pclk, | ||
748 | }, | ||
749 | .flags = DIV_BUS, | ||
750 | .reg = 0x30, | ||
751 | .reg_shift = 0, | ||
752 | .max_rate = 167000000, | ||
753 | .min_rate = 12000000, | ||
754 | }; | ||
755 | DEFINE_CLK_TEGRA(pclk, 0, &tegra30_bus_ops, 0, tegra_pclk_parent_names, | ||
756 | tegra_pclk_parents, &tegra_hclk); | ||
757 | |||
714 | static const char *mux_blink[] = { | 758 | static const char *mux_blink[] = { |
715 | "clk_32k", | 759 | "clk_32k", |
716 | }; | 760 | }; |
@@ -1254,8 +1298,6 @@ struct clk_duplicate tegra_clk_duplicates[] = { | |||
1254 | CLK_DUPLICATE("usbd", "utmip-pad", NULL), | 1298 | CLK_DUPLICATE("usbd", "utmip-pad", NULL), |
1255 | CLK_DUPLICATE("usbd", "tegra-ehci.0", NULL), | 1299 | CLK_DUPLICATE("usbd", "tegra-ehci.0", NULL), |
1256 | CLK_DUPLICATE("usbd", "tegra-otg", NULL), | 1300 | CLK_DUPLICATE("usbd", "tegra-otg", NULL), |
1257 | CLK_DUPLICATE("hdmi", "tegradc.0", "hdmi"), | ||
1258 | CLK_DUPLICATE("hdmi", "tegradc.1", "hdmi"), | ||
1259 | CLK_DUPLICATE("dsib", "tegradc.0", "dsib"), | 1301 | CLK_DUPLICATE("dsib", "tegradc.0", "dsib"), |
1260 | CLK_DUPLICATE("dsia", "tegradc.1", "dsia"), | 1302 | CLK_DUPLICATE("dsia", "tegradc.1", "dsia"), |
1261 | CLK_DUPLICATE("bsev", "tegra-avp", "bsev"), | 1303 | CLK_DUPLICATE("bsev", "tegra-avp", "bsev"), |
@@ -1293,6 +1335,9 @@ struct clk_duplicate tegra_clk_duplicates[] = { | |||
1293 | CLK_DUPLICATE("pll_p_out3", "tegra-i2c.2", "fast-clk"), | 1335 | CLK_DUPLICATE("pll_p_out3", "tegra-i2c.2", "fast-clk"), |
1294 | CLK_DUPLICATE("pll_p_out3", "tegra-i2c.3", "fast-clk"), | 1336 | CLK_DUPLICATE("pll_p_out3", "tegra-i2c.3", "fast-clk"), |
1295 | CLK_DUPLICATE("pll_p_out3", "tegra-i2c.4", "fast-clk"), | 1337 | CLK_DUPLICATE("pll_p_out3", "tegra-i2c.4", "fast-clk"), |
1338 | CLK_DUPLICATE("pll_p", "tegradc.0", "parent"), | ||
1339 | CLK_DUPLICATE("pll_p", "tegradc.1", "parent"), | ||
1340 | CLK_DUPLICATE("pll_d2_out0", "hdmi", "parent"), | ||
1296 | }; | 1341 | }; |
1297 | 1342 | ||
1298 | struct clk *tegra_ptr_clks[] = { | 1343 | struct clk *tegra_ptr_clks[] = { |
@@ -1325,6 +1370,8 @@ struct clk *tegra_ptr_clks[] = { | |||
1325 | &tegra_cml1, | 1370 | &tegra_cml1, |
1326 | &tegra_pciex, | 1371 | &tegra_pciex, |
1327 | &tegra_clk_sclk, | 1372 | &tegra_clk_sclk, |
1373 | &tegra_hclk, | ||
1374 | &tegra_pclk, | ||
1328 | &tegra_clk_blink, | 1375 | &tegra_clk_blink, |
1329 | &tegra30_clk_twd, | 1376 | &tegra30_clk_twd, |
1330 | }; | 1377 | }; |
diff --git a/arch/arm/mach-tegra/tegra30_speedo.c b/arch/arm/mach-tegra/tegra30_speedo.c new file mode 100644 index 000000000000..125cb16424a6 --- /dev/null +++ b/arch/arm/mach-tegra/tegra30_speedo.c | |||
@@ -0,0 +1,292 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2012, NVIDIA CORPORATION. All rights reserved. | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify it | ||
5 | * under the terms and conditions of the GNU General Public License, | ||
6 | * version 2, as published by the Free Software Foundation. | ||
7 | * | ||
8 | * This program is distributed in the hope it will be useful, but WITHOUT | ||
9 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
10 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
11 | * more details. | ||
12 | * | ||
13 | * You should have received a copy of the GNU General Public License | ||
14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
15 | */ | ||
16 | |||
17 | #include <linux/kernel.h> | ||
18 | #include <linux/bug.h> | ||
19 | |||
20 | #include "fuse.h" | ||
21 | |||
22 | #define CORE_PROCESS_CORNERS_NUM 1 | ||
23 | #define CPU_PROCESS_CORNERS_NUM 6 | ||
24 | |||
25 | #define FUSE_SPEEDO_CALIB_0 0x114 | ||
26 | #define FUSE_PACKAGE_INFO 0X1FC | ||
27 | #define FUSE_TEST_PROG_VER 0X128 | ||
28 | |||
29 | #define G_SPEEDO_BIT_MINUS1 58 | ||
30 | #define G_SPEEDO_BIT_MINUS1_R 59 | ||
31 | #define G_SPEEDO_BIT_MINUS2 60 | ||
32 | #define G_SPEEDO_BIT_MINUS2_R 61 | ||
33 | #define LP_SPEEDO_BIT_MINUS1 62 | ||
34 | #define LP_SPEEDO_BIT_MINUS1_R 63 | ||
35 | #define LP_SPEEDO_BIT_MINUS2 64 | ||
36 | #define LP_SPEEDO_BIT_MINUS2_R 65 | ||
37 | |||
38 | enum { | ||
39 | THRESHOLD_INDEX_0, | ||
40 | THRESHOLD_INDEX_1, | ||
41 | THRESHOLD_INDEX_2, | ||
42 | THRESHOLD_INDEX_3, | ||
43 | THRESHOLD_INDEX_4, | ||
44 | THRESHOLD_INDEX_5, | ||
45 | THRESHOLD_INDEX_6, | ||
46 | THRESHOLD_INDEX_7, | ||
47 | THRESHOLD_INDEX_8, | ||
48 | THRESHOLD_INDEX_9, | ||
49 | THRESHOLD_INDEX_10, | ||
50 | THRESHOLD_INDEX_11, | ||
51 | THRESHOLD_INDEX_COUNT, | ||
52 | }; | ||
53 | |||
54 | static const u32 core_process_speedos[][CORE_PROCESS_CORNERS_NUM] = { | ||
55 | {180}, | ||
56 | {170}, | ||
57 | {195}, | ||
58 | {180}, | ||
59 | {168}, | ||
60 | {192}, | ||
61 | {180}, | ||
62 | {170}, | ||
63 | {195}, | ||
64 | {180}, | ||
65 | {180}, | ||
66 | {180}, | ||
67 | }; | ||
68 | |||
69 | static const u32 cpu_process_speedos[][CPU_PROCESS_CORNERS_NUM] = { | ||
70 | {306, 338, 360, 376, UINT_MAX}, | ||
71 | {295, 336, 358, 375, UINT_MAX}, | ||
72 | {325, 325, 358, 375, UINT_MAX}, | ||
73 | {325, 325, 358, 375, UINT_MAX}, | ||
74 | {292, 324, 348, 364, UINT_MAX}, | ||
75 | {324, 324, 348, 364, UINT_MAX}, | ||
76 | {324, 324, 348, 364, UINT_MAX}, | ||
77 | {295, 336, 358, 375, UINT_MAX}, | ||
78 | {358, 358, 358, 358, 397, UINT_MAX}, | ||
79 | {364, 364, 364, 364, 397, UINT_MAX}, | ||
80 | {295, 336, 358, 375, 391, UINT_MAX}, | ||
81 | {295, 336, 358, 375, 391, UINT_MAX}, | ||
82 | }; | ||
83 | |||
84 | static int threshold_index; | ||
85 | static int package_id; | ||
86 | |||
87 | static void fuse_speedo_calib(u32 *speedo_g, u32 *speedo_lp) | ||
88 | { | ||
89 | u32 reg; | ||
90 | int ate_ver; | ||
91 | int bit_minus1; | ||
92 | int bit_minus2; | ||
93 | |||
94 | reg = tegra_fuse_readl(FUSE_SPEEDO_CALIB_0); | ||
95 | |||
96 | *speedo_lp = (reg & 0xFFFF) * 4; | ||
97 | *speedo_g = ((reg >> 16) & 0xFFFF) * 4; | ||
98 | |||
99 | ate_ver = tegra_fuse_readl(FUSE_TEST_PROG_VER); | ||
100 | pr_info("%s: ATE prog ver %d.%d\n", __func__, ate_ver/10, ate_ver%10); | ||
101 | |||
102 | if (ate_ver >= 26) { | ||
103 | bit_minus1 = tegra_spare_fuse(LP_SPEEDO_BIT_MINUS1); | ||
104 | bit_minus1 |= tegra_spare_fuse(LP_SPEEDO_BIT_MINUS1_R); | ||
105 | bit_minus2 = tegra_spare_fuse(LP_SPEEDO_BIT_MINUS2); | ||
106 | bit_minus2 |= tegra_spare_fuse(LP_SPEEDO_BIT_MINUS2_R); | ||
107 | *speedo_lp |= (bit_minus1 << 1) | bit_minus2; | ||
108 | |||
109 | bit_minus1 = tegra_spare_fuse(G_SPEEDO_BIT_MINUS1); | ||
110 | bit_minus1 |= tegra_spare_fuse(G_SPEEDO_BIT_MINUS1_R); | ||
111 | bit_minus2 = tegra_spare_fuse(G_SPEEDO_BIT_MINUS2); | ||
112 | bit_minus2 |= tegra_spare_fuse(G_SPEEDO_BIT_MINUS2_R); | ||
113 | *speedo_g |= (bit_minus1 << 1) | bit_minus2; | ||
114 | } else { | ||
115 | *speedo_lp |= 0x3; | ||
116 | *speedo_g |= 0x3; | ||
117 | } | ||
118 | } | ||
119 | |||
120 | static void rev_sku_to_speedo_ids(int rev, int sku) | ||
121 | { | ||
122 | switch (rev) { | ||
123 | case TEGRA_REVISION_A01: | ||
124 | tegra_cpu_speedo_id = 0; | ||
125 | tegra_soc_speedo_id = 0; | ||
126 | threshold_index = THRESHOLD_INDEX_0; | ||
127 | break; | ||
128 | case TEGRA_REVISION_A02: | ||
129 | case TEGRA_REVISION_A03: | ||
130 | switch (sku) { | ||
131 | case 0x87: | ||
132 | case 0x82: | ||
133 | tegra_cpu_speedo_id = 1; | ||
134 | tegra_soc_speedo_id = 1; | ||
135 | threshold_index = THRESHOLD_INDEX_1; | ||
136 | break; | ||
137 | case 0x81: | ||
138 | switch (package_id) { | ||
139 | case 1: | ||
140 | tegra_cpu_speedo_id = 2; | ||
141 | tegra_soc_speedo_id = 2; | ||
142 | threshold_index = THRESHOLD_INDEX_2; | ||
143 | break; | ||
144 | case 2: | ||
145 | tegra_cpu_speedo_id = 4; | ||
146 | tegra_soc_speedo_id = 1; | ||
147 | threshold_index = THRESHOLD_INDEX_7; | ||
148 | break; | ||
149 | default: | ||
150 | pr_err("Tegra30: Unknown pkg %d\n", package_id); | ||
151 | BUG(); | ||
152 | break; | ||
153 | } | ||
154 | break; | ||
155 | case 0x80: | ||
156 | switch (package_id) { | ||
157 | case 1: | ||
158 | tegra_cpu_speedo_id = 5; | ||
159 | tegra_soc_speedo_id = 2; | ||
160 | threshold_index = THRESHOLD_INDEX_8; | ||
161 | break; | ||
162 | case 2: | ||
163 | tegra_cpu_speedo_id = 6; | ||
164 | tegra_soc_speedo_id = 2; | ||
165 | threshold_index = THRESHOLD_INDEX_9; | ||
166 | break; | ||
167 | default: | ||
168 | pr_err("Tegra30: Unknown pkg %d\n", package_id); | ||
169 | BUG(); | ||
170 | break; | ||
171 | } | ||
172 | break; | ||
173 | case 0x83: | ||
174 | switch (package_id) { | ||
175 | case 1: | ||
176 | tegra_cpu_speedo_id = 7; | ||
177 | tegra_soc_speedo_id = 1; | ||
178 | threshold_index = THRESHOLD_INDEX_10; | ||
179 | break; | ||
180 | case 2: | ||
181 | tegra_cpu_speedo_id = 3; | ||
182 | tegra_soc_speedo_id = 2; | ||
183 | threshold_index = THRESHOLD_INDEX_3; | ||
184 | break; | ||
185 | default: | ||
186 | pr_err("Tegra30: Unknown pkg %d\n", package_id); | ||
187 | BUG(); | ||
188 | break; | ||
189 | } | ||
190 | break; | ||
191 | case 0x8F: | ||
192 | tegra_cpu_speedo_id = 8; | ||
193 | tegra_soc_speedo_id = 1; | ||
194 | threshold_index = THRESHOLD_INDEX_11; | ||
195 | break; | ||
196 | case 0x08: | ||
197 | tegra_cpu_speedo_id = 1; | ||
198 | tegra_soc_speedo_id = 1; | ||
199 | threshold_index = THRESHOLD_INDEX_4; | ||
200 | break; | ||
201 | case 0x02: | ||
202 | tegra_cpu_speedo_id = 2; | ||
203 | tegra_soc_speedo_id = 2; | ||
204 | threshold_index = THRESHOLD_INDEX_5; | ||
205 | break; | ||
206 | case 0x04: | ||
207 | tegra_cpu_speedo_id = 3; | ||
208 | tegra_soc_speedo_id = 2; | ||
209 | threshold_index = THRESHOLD_INDEX_6; | ||
210 | break; | ||
211 | case 0: | ||
212 | switch (package_id) { | ||
213 | case 1: | ||
214 | tegra_cpu_speedo_id = 2; | ||
215 | tegra_soc_speedo_id = 2; | ||
216 | threshold_index = THRESHOLD_INDEX_2; | ||
217 | break; | ||
218 | case 2: | ||
219 | tegra_cpu_speedo_id = 3; | ||
220 | tegra_soc_speedo_id = 2; | ||
221 | threshold_index = THRESHOLD_INDEX_3; | ||
222 | break; | ||
223 | default: | ||
224 | pr_err("Tegra30: Unknown pkg %d\n", package_id); | ||
225 | BUG(); | ||
226 | break; | ||
227 | } | ||
228 | break; | ||
229 | default: | ||
230 | pr_warn("Tegra30: Unknown SKU %d\n", sku); | ||
231 | tegra_cpu_speedo_id = 0; | ||
232 | tegra_soc_speedo_id = 0; | ||
233 | threshold_index = THRESHOLD_INDEX_0; | ||
234 | break; | ||
235 | } | ||
236 | break; | ||
237 | default: | ||
238 | pr_warn("Tegra30: Unknown chip rev %d\n", rev); | ||
239 | tegra_cpu_speedo_id = 0; | ||
240 | tegra_soc_speedo_id = 0; | ||
241 | threshold_index = THRESHOLD_INDEX_0; | ||
242 | break; | ||
243 | } | ||
244 | } | ||
245 | |||
246 | void tegra30_init_speedo_data(void) | ||
247 | { | ||
248 | u32 cpu_speedo_val; | ||
249 | u32 core_speedo_val; | ||
250 | int i; | ||
251 | |||
252 | BUILD_BUG_ON(ARRAY_SIZE(cpu_process_speedos) != | ||
253 | THRESHOLD_INDEX_COUNT); | ||
254 | BUILD_BUG_ON(ARRAY_SIZE(core_process_speedos) != | ||
255 | THRESHOLD_INDEX_COUNT); | ||
256 | |||
257 | package_id = tegra_fuse_readl(FUSE_PACKAGE_INFO) & 0x0F; | ||
258 | |||
259 | rev_sku_to_speedo_ids(tegra_revision, tegra_sku_id); | ||
260 | fuse_speedo_calib(&cpu_speedo_val, &core_speedo_val); | ||
261 | pr_debug("%s CPU speedo value %u\n", __func__, cpu_speedo_val); | ||
262 | pr_debug("%s Core speedo value %u\n", __func__, core_speedo_val); | ||
263 | |||
264 | for (i = 0; i < CPU_PROCESS_CORNERS_NUM; i++) { | ||
265 | if (cpu_speedo_val < cpu_process_speedos[threshold_index][i]) | ||
266 | break; | ||
267 | } | ||
268 | tegra_cpu_process_id = i - 1; | ||
269 | |||
270 | if (tegra_cpu_process_id == -1) { | ||
271 | pr_warn("Tegra30: CPU speedo value %3d out of range", | ||
272 | cpu_speedo_val); | ||
273 | tegra_cpu_process_id = 0; | ||
274 | tegra_cpu_speedo_id = 1; | ||
275 | } | ||
276 | |||
277 | for (i = 0; i < CORE_PROCESS_CORNERS_NUM; i++) { | ||
278 | if (core_speedo_val < core_process_speedos[threshold_index][i]) | ||
279 | break; | ||
280 | } | ||
281 | tegra_core_process_id = i - 1; | ||
282 | |||
283 | if (tegra_core_process_id == -1) { | ||
284 | pr_warn("Tegra30: CORE speedo value %3d out of range", | ||
285 | core_speedo_val); | ||
286 | tegra_core_process_id = 0; | ||
287 | tegra_soc_speedo_id = 1; | ||
288 | } | ||
289 | |||
290 | pr_info("Tegra30: CPU Speedo ID %d, Soc Speedo ID %d", | ||
291 | tegra_cpu_speedo_id, tegra_soc_speedo_id); | ||
292 | } | ||
diff --git a/arch/arm/mach-tegra/tegra_cpu_car.h b/arch/arm/mach-tegra/tegra_cpu_car.h index 30d063ad2bef..9764d31032b7 100644 --- a/arch/arm/mach-tegra/tegra_cpu_car.h +++ b/arch/arm/mach-tegra/tegra_cpu_car.h | |||
@@ -30,6 +30,12 @@ | |||
30 | * CPU clock un-gate | 30 | * CPU clock un-gate |
31 | * disable_clock: | 31 | * disable_clock: |
32 | * CPU clock gate | 32 | * CPU clock gate |
33 | * rail_off_ready: | ||
34 | * CPU is ready for rail off | ||
35 | * suspend: | ||
36 | * save the clock settings when CPU go into low-power state | ||
37 | * resume: | ||
38 | * restore the clock settings when CPU exit low-power state | ||
33 | */ | 39 | */ |
34 | struct tegra_cpu_car_ops { | 40 | struct tegra_cpu_car_ops { |
35 | void (*wait_for_reset)(u32 cpu); | 41 | void (*wait_for_reset)(u32 cpu); |
@@ -37,6 +43,11 @@ struct tegra_cpu_car_ops { | |||
37 | void (*out_of_reset)(u32 cpu); | 43 | void (*out_of_reset)(u32 cpu); |
38 | void (*enable_clock)(u32 cpu); | 44 | void (*enable_clock)(u32 cpu); |
39 | void (*disable_clock)(u32 cpu); | 45 | void (*disable_clock)(u32 cpu); |
46 | #ifdef CONFIG_PM_SLEEP | ||
47 | bool (*rail_off_ready)(void); | ||
48 | void (*suspend)(void); | ||
49 | void (*resume)(void); | ||
50 | #endif | ||
40 | }; | 51 | }; |
41 | 52 | ||
42 | extern struct tegra_cpu_car_ops *tegra_cpu_car_ops; | 53 | extern struct tegra_cpu_car_ops *tegra_cpu_car_ops; |
@@ -81,6 +92,32 @@ static inline void tegra_disable_cpu_clock(u32 cpu) | |||
81 | tegra_cpu_car_ops->disable_clock(cpu); | 92 | tegra_cpu_car_ops->disable_clock(cpu); |
82 | } | 93 | } |
83 | 94 | ||
95 | #ifdef CONFIG_PM_SLEEP | ||
96 | static inline bool tegra_cpu_rail_off_ready(void) | ||
97 | { | ||
98 | if (WARN_ON(!tegra_cpu_car_ops->rail_off_ready)) | ||
99 | return false; | ||
100 | |||
101 | return tegra_cpu_car_ops->rail_off_ready(); | ||
102 | } | ||
103 | |||
104 | static inline void tegra_cpu_clock_suspend(void) | ||
105 | { | ||
106 | if (WARN_ON(!tegra_cpu_car_ops->suspend)) | ||
107 | return; | ||
108 | |||
109 | tegra_cpu_car_ops->suspend(); | ||
110 | } | ||
111 | |||
112 | static inline void tegra_cpu_clock_resume(void) | ||
113 | { | ||
114 | if (WARN_ON(!tegra_cpu_car_ops->resume)) | ||
115 | return; | ||
116 | |||
117 | tegra_cpu_car_ops->resume(); | ||
118 | } | ||
119 | #endif | ||
120 | |||
84 | void tegra20_cpu_car_ops_init(void); | 121 | void tegra20_cpu_car_ops_init(void); |
85 | void tegra30_cpu_car_ops_init(void); | 122 | void tegra30_cpu_car_ops_init(void); |
86 | 123 | ||
diff --git a/arch/arm/mach-ux500/board-mop500.c b/arch/arm/mach-ux500/board-mop500.c index 2d16b1dd5fec..e6ad161449da 100644 --- a/arch/arm/mach-ux500/board-mop500.c +++ b/arch/arm/mach-ux500/board-mop500.c | |||
@@ -1,6 +1,5 @@ | |||
1 | |||
2 | /* | 1 | /* |
3 | * Copyright (C) 2008-2009 ST-Ericsson | 2 | * Copyright (C) 2008-2012 ST-Ericsson |
4 | * | 3 | * |
5 | * Author: Srinidhi KASAGAR <srinidhi.kasagar@stericsson.com> | 4 | * Author: Srinidhi KASAGAR <srinidhi.kasagar@stericsson.com> |
6 | * | 5 | * |
@@ -765,6 +764,16 @@ MACHINE_START(U8500, "ST-Ericsson MOP500 platform") | |||
765 | .init_late = ux500_init_late, | 764 | .init_late = ux500_init_late, |
766 | MACHINE_END | 765 | MACHINE_END |
767 | 766 | ||
767 | MACHINE_START(U8520, "ST-Ericsson U8520 Platform HREFP520") | ||
768 | .atag_offset = 0x100, | ||
769 | .map_io = u8500_map_io, | ||
770 | .init_irq = ux500_init_irq, | ||
771 | .timer = &ux500_timer, | ||
772 | .handle_irq = gic_handle_irq, | ||
773 | .init_machine = mop500_init_machine, | ||
774 | .init_late = ux500_init_late, | ||
775 | MACHINE_END | ||
776 | |||
768 | MACHINE_START(HREFV60, "ST-Ericsson U8500 Platform HREFv60+") | 777 | MACHINE_START(HREFV60, "ST-Ericsson U8500 Platform HREFv60+") |
769 | .atag_offset = 0x100, | 778 | .atag_offset = 0x100, |
770 | .smp = smp_ops(ux500_smp_ops), | 779 | .smp = smp_ops(ux500_smp_ops), |
diff --git a/arch/arm/mach-ux500/cpu-db8500.c b/arch/arm/mach-ux500/cpu-db8500.c index 91f028c1264a..5c5ad70e48be 100644 --- a/arch/arm/mach-ux500/cpu-db8500.c +++ b/arch/arm/mach-ux500/cpu-db8500.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/mfd/abx500/ab8500.h> | 19 | #include <linux/mfd/abx500/ab8500.h> |
20 | #include <linux/platform_data/usb-musb-ux500.h> | 20 | #include <linux/platform_data/usb-musb-ux500.h> |
21 | #include <linux/platform_data/pinctrl-nomadik.h> | 21 | #include <linux/platform_data/pinctrl-nomadik.h> |
22 | #include <linux/random.h> | ||
22 | 23 | ||
23 | #include <asm/pmu.h> | 24 | #include <asm/pmu.h> |
24 | #include <asm/mach/map.h> | 25 | #include <asm/mach/map.h> |
@@ -187,6 +188,8 @@ static const char *db8500_read_soc_id(void) | |||
187 | { | 188 | { |
188 | void __iomem *uid = __io_address(U8500_BB_UID_BASE); | 189 | void __iomem *uid = __io_address(U8500_BB_UID_BASE); |
189 | 190 | ||
191 | /* Throw these device-specific numbers into the entropy pool */ | ||
192 | add_device_randomness(uid, 0x14); | ||
190 | return kasprintf(GFP_KERNEL, "%08x%08x%08x%08x%08x", | 193 | return kasprintf(GFP_KERNEL, "%08x%08x%08x%08x%08x", |
191 | readl((u32 *)uid+1), | 194 | readl((u32 *)uid+1), |
192 | readl((u32 *)uid+1), readl((u32 *)uid+2), | 195 | readl((u32 *)uid+1), readl((u32 *)uid+2), |
diff --git a/arch/arm/mach-versatile/core.c b/arch/arm/mach-versatile/core.c index 5b5c1eeb5b5c..5d5929450366 100644 --- a/arch/arm/mach-versatile/core.c +++ b/arch/arm/mach-versatile/core.c | |||
@@ -32,6 +32,7 @@ | |||
32 | #include <linux/amba/mmci.h> | 32 | #include <linux/amba/mmci.h> |
33 | #include <linux/amba/pl022.h> | 33 | #include <linux/amba/pl022.h> |
34 | #include <linux/io.h> | 34 | #include <linux/io.h> |
35 | #include <linux/irqchip/versatile-fpga.h> | ||
35 | #include <linux/gfp.h> | 36 | #include <linux/gfp.h> |
36 | #include <linux/clkdev.h> | 37 | #include <linux/clkdev.h> |
37 | #include <linux/mtd/physmap.h> | 38 | #include <linux/mtd/physmap.h> |
@@ -51,7 +52,6 @@ | |||
51 | #include <asm/hardware/timer-sp.h> | 52 | #include <asm/hardware/timer-sp.h> |
52 | 53 | ||
53 | #include <plat/clcd.h> | 54 | #include <plat/clcd.h> |
54 | #include <plat/fpga-irq.h> | ||
55 | #include <plat/sched_clock.h> | 55 | #include <plat/sched_clock.h> |
56 | 56 | ||
57 | #include "core.h" | 57 | #include "core.h" |
diff --git a/arch/arm/mach-vexpress/Kconfig b/arch/arm/mach-vexpress/Kconfig index c95296066203..99e63f5f99d1 100644 --- a/arch/arm/mach-vexpress/Kconfig +++ b/arch/arm/mach-vexpress/Kconfig | |||
@@ -1,11 +1,12 @@ | |||
1 | config ARCH_VEXPRESS | 1 | config ARCH_VEXPRESS |
2 | bool "ARM Ltd. Versatile Express family" if ARCH_MULTI_V7 | 2 | bool "ARM Ltd. Versatile Express family" if ARCH_MULTI_V7 |
3 | select ARCH_WANT_OPTIONAL_GPIOLIB | 3 | select ARCH_REQUIRE_GPIOLIB |
4 | select ARM_AMBA | 4 | select ARM_AMBA |
5 | select ARM_GIC | 5 | select ARM_GIC |
6 | select ARM_TIMER_SP804 | 6 | select ARM_TIMER_SP804 |
7 | select CLKDEV_LOOKUP | 7 | select CLKDEV_LOOKUP |
8 | select COMMON_CLK | 8 | select COMMON_CLK |
9 | select COMMON_CLK_VERSATILE | ||
9 | select CPU_V7 | 10 | select CPU_V7 |
10 | select GENERIC_CLOCKEVENTS | 11 | select GENERIC_CLOCKEVENTS |
11 | select HAVE_CLK | 12 | select HAVE_CLK |
@@ -17,6 +18,7 @@ config ARCH_VEXPRESS | |||
17 | select PLAT_VERSATILE | 18 | select PLAT_VERSATILE |
18 | select PLAT_VERSATILE_CLCD | 19 | select PLAT_VERSATILE_CLCD |
19 | select REGULATOR_FIXED_VOLTAGE if REGULATOR | 20 | select REGULATOR_FIXED_VOLTAGE if REGULATOR |
21 | select VEXPRESS_CONFIG | ||
20 | help | 22 | help |
21 | This option enables support for systems using Cortex processor based | 23 | This option enables support for systems using Cortex processor based |
22 | ARM core and logic (FPGA) tiles on the Versatile Express motherboard, | 24 | ARM core and logic (FPGA) tiles on the Versatile Express motherboard, |
diff --git a/arch/arm/mach-vexpress/Makefile b/arch/arm/mach-vexpress/Makefile index 42703e8b4d3b..80b64971fbdd 100644 --- a/arch/arm/mach-vexpress/Makefile +++ b/arch/arm/mach-vexpress/Makefile | |||
@@ -4,7 +4,7 @@ | |||
4 | ccflags-$(CONFIG_ARCH_MULTIPLATFORM) := -I$(srctree)/$(src)/include \ | 4 | ccflags-$(CONFIG_ARCH_MULTIPLATFORM) := -I$(srctree)/$(src)/include \ |
5 | -I$(srctree)/arch/arm/plat-versatile/include | 5 | -I$(srctree)/arch/arm/plat-versatile/include |
6 | 6 | ||
7 | obj-y := v2m.o | 7 | obj-y := v2m.o reset.o |
8 | obj-$(CONFIG_ARCH_VEXPRESS_CA9X4) += ct-ca9x4.o | 8 | obj-$(CONFIG_ARCH_VEXPRESS_CA9X4) += ct-ca9x4.o |
9 | obj-$(CONFIG_SMP) += platsmp.o | 9 | obj-$(CONFIG_SMP) += platsmp.o |
10 | obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o | 10 | obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o |
diff --git a/arch/arm/mach-vexpress/ct-ca9x4.c b/arch/arm/mach-vexpress/ct-ca9x4.c index 4f471fa3e3c5..60838ddb8564 100644 --- a/arch/arm/mach-vexpress/ct-ca9x4.c +++ b/arch/arm/mach-vexpress/ct-ca9x4.c | |||
@@ -9,6 +9,7 @@ | |||
9 | #include <linux/amba/bus.h> | 9 | #include <linux/amba/bus.h> |
10 | #include <linux/amba/clcd.h> | 10 | #include <linux/amba/clcd.h> |
11 | #include <linux/clkdev.h> | 11 | #include <linux/clkdev.h> |
12 | #include <linux/vexpress.h> | ||
12 | 13 | ||
13 | #include <asm/hardware/arm_timer.h> | 14 | #include <asm/hardware/arm_timer.h> |
14 | #include <asm/hardware/cache-l2x0.h> | 15 | #include <asm/hardware/cache-l2x0.h> |
@@ -64,19 +65,6 @@ static void __init ct_ca9x4_init_irq(void) | |||
64 | ca9x4_twd_init(); | 65 | ca9x4_twd_init(); |
65 | } | 66 | } |
66 | 67 | ||
67 | static void ct_ca9x4_clcd_enable(struct clcd_fb *fb) | ||
68 | { | ||
69 | u32 site = v2m_get_master_site(); | ||
70 | |||
71 | /* | ||
72 | * Old firmware was using the "site" component of the command | ||
73 | * to control the DVI muxer (while it should be always 0 ie. MB). | ||
74 | * Newer firmware uses the data register. Keep both for compatibility. | ||
75 | */ | ||
76 | v2m_cfg_write(SYS_CFG_MUXFPGA | SYS_CFG_SITE(site), site); | ||
77 | v2m_cfg_write(SYS_CFG_DVIMODE | SYS_CFG_SITE(SYS_CFG_SITE_MB), 2); | ||
78 | } | ||
79 | |||
80 | static int ct_ca9x4_clcd_setup(struct clcd_fb *fb) | 68 | static int ct_ca9x4_clcd_setup(struct clcd_fb *fb) |
81 | { | 69 | { |
82 | unsigned long framesize = 1024 * 768 * 2; | 70 | unsigned long framesize = 1024 * 768 * 2; |
@@ -93,7 +81,6 @@ static struct clcd_board ct_ca9x4_clcd_data = { | |||
93 | .caps = CLCD_CAP_5551 | CLCD_CAP_565, | 81 | .caps = CLCD_CAP_5551 | CLCD_CAP_565, |
94 | .check = clcdfb_check, | 82 | .check = clcdfb_check, |
95 | .decode = clcdfb_decode, | 83 | .decode = clcdfb_decode, |
96 | .enable = ct_ca9x4_clcd_enable, | ||
97 | .setup = ct_ca9x4_clcd_setup, | 84 | .setup = ct_ca9x4_clcd_setup, |
98 | .mmap = versatile_clcd_mmap_dma, | 85 | .mmap = versatile_clcd_mmap_dma, |
99 | .remove = versatile_clcd_remove_dma, | 86 | .remove = versatile_clcd_remove_dma, |
@@ -111,14 +98,6 @@ static struct amba_device *ct_ca9x4_amba_devs[] __initdata = { | |||
111 | &gpio_device, | 98 | &gpio_device, |
112 | }; | 99 | }; |
113 | 100 | ||
114 | |||
115 | static struct v2m_osc ct_osc1 = { | ||
116 | .osc = 1, | ||
117 | .rate_min = 10000000, | ||
118 | .rate_max = 80000000, | ||
119 | .rate_default = 23750000, | ||
120 | }; | ||
121 | |||
122 | static struct resource pmu_resources[] = { | 101 | static struct resource pmu_resources[] = { |
123 | [0] = { | 102 | [0] = { |
124 | .start = IRQ_CT_CA9X4_PMU_CPU0, | 103 | .start = IRQ_CT_CA9X4_PMU_CPU0, |
@@ -149,10 +128,18 @@ static struct platform_device pmu_device = { | |||
149 | .resource = pmu_resources, | 128 | .resource = pmu_resources, |
150 | }; | 129 | }; |
151 | 130 | ||
131 | static struct platform_device osc1_device = { | ||
132 | .name = "vexpress-osc", | ||
133 | .id = 1, | ||
134 | .num_resources = 1, | ||
135 | .resource = (struct resource []) { | ||
136 | VEXPRESS_RES_FUNC(0xf, 1), | ||
137 | }, | ||
138 | }; | ||
139 | |||
152 | static void __init ct_ca9x4_init(void) | 140 | static void __init ct_ca9x4_init(void) |
153 | { | 141 | { |
154 | int i; | 142 | int i; |
155 | struct clk *clk; | ||
156 | 143 | ||
157 | #ifdef CONFIG_CACHE_L2X0 | 144 | #ifdef CONFIG_CACHE_L2X0 |
158 | void __iomem *l2x0_base = ioremap(CT_CA9X4_L2CC, SZ_4K); | 145 | void __iomem *l2x0_base = ioremap(CT_CA9X4_L2CC, SZ_4K); |
@@ -164,14 +151,14 @@ static void __init ct_ca9x4_init(void) | |||
164 | l2x0_init(l2x0_base, 0x00400000, 0xfe0fffff); | 151 | l2x0_init(l2x0_base, 0x00400000, 0xfe0fffff); |
165 | #endif | 152 | #endif |
166 | 153 | ||
167 | ct_osc1.site = v2m_get_master_site(); | ||
168 | clk = v2m_osc_register("ct:osc1", &ct_osc1); | ||
169 | clk_register_clkdev(clk, NULL, "ct:clcd"); | ||
170 | |||
171 | for (i = 0; i < ARRAY_SIZE(ct_ca9x4_amba_devs); i++) | 154 | for (i = 0; i < ARRAY_SIZE(ct_ca9x4_amba_devs); i++) |
172 | amba_device_register(ct_ca9x4_amba_devs[i], &iomem_resource); | 155 | amba_device_register(ct_ca9x4_amba_devs[i], &iomem_resource); |
173 | 156 | ||
174 | platform_device_register(&pmu_device); | 157 | platform_device_register(&pmu_device); |
158 | platform_device_register(&osc1_device); | ||
159 | |||
160 | WARN_ON(clk_register_clkdev(vexpress_osc_setup(&osc1_device.dev), | ||
161 | NULL, "ct:clcd")); | ||
175 | } | 162 | } |
176 | 163 | ||
177 | #ifdef CONFIG_SMP | 164 | #ifdef CONFIG_SMP |
diff --git a/arch/arm/mach-vexpress/include/mach/motherboard.h b/arch/arm/mach-vexpress/include/mach/motherboard.h index 1e388c7bf4d7..68abc8b72781 100644 --- a/arch/arm/mach-vexpress/include/mach/motherboard.h +++ b/arch/arm/mach-vexpress/include/mach/motherboard.h | |||
@@ -1,8 +1,6 @@ | |||
1 | #ifndef __MACH_MOTHERBOARD_H | 1 | #ifndef __MACH_MOTHERBOARD_H |
2 | #define __MACH_MOTHERBOARD_H | 2 | #define __MACH_MOTHERBOARD_H |
3 | 3 | ||
4 | #include <linux/clk-provider.h> | ||
5 | |||
6 | /* | 4 | /* |
7 | * Physical addresses, offset from V2M_PA_CS0-3 | 5 | * Physical addresses, offset from V2M_PA_CS0-3 |
8 | */ | 6 | */ |
@@ -41,31 +39,6 @@ | |||
41 | #define V2M_CF (V2M_PA_CS7 + 0x0001a000) | 39 | #define V2M_CF (V2M_PA_CS7 + 0x0001a000) |
42 | #define V2M_CLCD (V2M_PA_CS7 + 0x0001f000) | 40 | #define V2M_CLCD (V2M_PA_CS7 + 0x0001f000) |
43 | 41 | ||
44 | /* | ||
45 | * Offsets from SYSREGS base | ||
46 | */ | ||
47 | #define V2M_SYS_ID 0x000 | ||
48 | #define V2M_SYS_SW 0x004 | ||
49 | #define V2M_SYS_LED 0x008 | ||
50 | #define V2M_SYS_100HZ 0x024 | ||
51 | #define V2M_SYS_FLAGS 0x030 | ||
52 | #define V2M_SYS_FLAGSSET 0x030 | ||
53 | #define V2M_SYS_FLAGSCLR 0x034 | ||
54 | #define V2M_SYS_NVFLAGS 0x038 | ||
55 | #define V2M_SYS_NVFLAGSSET 0x038 | ||
56 | #define V2M_SYS_NVFLAGSCLR 0x03c | ||
57 | #define V2M_SYS_MCI 0x048 | ||
58 | #define V2M_SYS_FLASH 0x03c | ||
59 | #define V2M_SYS_CFGSW 0x058 | ||
60 | #define V2M_SYS_24MHZ 0x05c | ||
61 | #define V2M_SYS_MISC 0x060 | ||
62 | #define V2M_SYS_DMA 0x064 | ||
63 | #define V2M_SYS_PROCID0 0x084 | ||
64 | #define V2M_SYS_PROCID1 0x088 | ||
65 | #define V2M_SYS_CFGDATA 0x0a0 | ||
66 | #define V2M_SYS_CFGCTRL 0x0a4 | ||
67 | #define V2M_SYS_CFGSTAT 0x0a8 | ||
68 | |||
69 | 42 | ||
70 | /* | 43 | /* |
71 | * Interrupts. Those in {} are for AMBA devices | 44 | * Interrupts. Those in {} are for AMBA devices |
@@ -91,43 +64,6 @@ | |||
91 | 64 | ||
92 | 65 | ||
93 | /* | 66 | /* |
94 | * Configuration | ||
95 | */ | ||
96 | #define SYS_CFG_START (1 << 31) | ||
97 | #define SYS_CFG_WRITE (1 << 30) | ||
98 | #define SYS_CFG_OSC (1 << 20) | ||
99 | #define SYS_CFG_VOLT (2 << 20) | ||
100 | #define SYS_CFG_AMP (3 << 20) | ||
101 | #define SYS_CFG_TEMP (4 << 20) | ||
102 | #define SYS_CFG_RESET (5 << 20) | ||
103 | #define SYS_CFG_SCC (6 << 20) | ||
104 | #define SYS_CFG_MUXFPGA (7 << 20) | ||
105 | #define SYS_CFG_SHUTDOWN (8 << 20) | ||
106 | #define SYS_CFG_REBOOT (9 << 20) | ||
107 | #define SYS_CFG_DVIMODE (11 << 20) | ||
108 | #define SYS_CFG_POWER (12 << 20) | ||
109 | #define SYS_CFG_SITE(n) ((n) << 16) | ||
110 | #define SYS_CFG_SITE_MB 0 | ||
111 | #define SYS_CFG_SITE_DB1 1 | ||
112 | #define SYS_CFG_SITE_DB2 2 | ||
113 | #define SYS_CFG_STACK(n) ((n) << 12) | ||
114 | |||
115 | #define SYS_CFG_ERR (1 << 1) | ||
116 | #define SYS_CFG_COMPLETE (1 << 0) | ||
117 | |||
118 | int v2m_cfg_write(u32 devfn, u32 data); | ||
119 | int v2m_cfg_read(u32 devfn, u32 *data); | ||
120 | void v2m_flags_set(u32 data); | ||
121 | |||
122 | /* | ||
123 | * Miscellaneous | ||
124 | */ | ||
125 | #define SYS_MISC_MASTERSITE (1 << 14) | ||
126 | #define SYS_PROCIDx_HBI_MASK 0xfff | ||
127 | |||
128 | int v2m_get_master_site(void); | ||
129 | |||
130 | /* | ||
131 | * Core tile IDs | 67 | * Core tile IDs |
132 | */ | 68 | */ |
133 | #define V2M_CT_ID_CA9 0x0c000191 | 69 | #define V2M_CT_ID_CA9 0x0c000191 |
@@ -149,21 +85,4 @@ struct ct_desc { | |||
149 | 85 | ||
150 | extern struct ct_desc *ct_desc; | 86 | extern struct ct_desc *ct_desc; |
151 | 87 | ||
152 | /* | ||
153 | * OSC clock provider | ||
154 | */ | ||
155 | struct v2m_osc { | ||
156 | struct clk_hw hw; | ||
157 | u8 site; /* 0 = motherboard, 1 = site 1, 2 = site 2 */ | ||
158 | u8 stack; /* board stack position */ | ||
159 | u16 osc; | ||
160 | unsigned long rate_min; | ||
161 | unsigned long rate_max; | ||
162 | unsigned long rate_default; | ||
163 | }; | ||
164 | |||
165 | #define to_v2m_osc(osc) container_of(osc, struct v2m_osc, hw) | ||
166 | |||
167 | struct clk *v2m_osc_register(const char *name, struct v2m_osc *osc); | ||
168 | |||
169 | #endif | 88 | #endif |
diff --git a/arch/arm/mach-vexpress/platsmp.c b/arch/arm/mach-vexpress/platsmp.c index 7db27c8c05cc..c5d70de9bb4e 100644 --- a/arch/arm/mach-vexpress/platsmp.c +++ b/arch/arm/mach-vexpress/platsmp.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <linux/smp.h> | 13 | #include <linux/smp.h> |
14 | #include <linux/io.h> | 14 | #include <linux/io.h> |
15 | #include <linux/of_fdt.h> | 15 | #include <linux/of_fdt.h> |
16 | #include <linux/vexpress.h> | ||
16 | 17 | ||
17 | #include <asm/smp_scu.h> | 18 | #include <asm/smp_scu.h> |
18 | #include <asm/hardware/gic.h> | 19 | #include <asm/hardware/gic.h> |
@@ -193,7 +194,7 @@ static void __init vexpress_smp_prepare_cpus(unsigned int max_cpus) | |||
193 | * until it receives a soft interrupt, and then the | 194 | * until it receives a soft interrupt, and then the |
194 | * secondary CPU branches to this address. | 195 | * secondary CPU branches to this address. |
195 | */ | 196 | */ |
196 | v2m_flags_set(virt_to_phys(versatile_secondary_startup)); | 197 | vexpress_flags_set(virt_to_phys(versatile_secondary_startup)); |
197 | } | 198 | } |
198 | 199 | ||
199 | struct smp_operations __initdata vexpress_smp_ops = { | 200 | struct smp_operations __initdata vexpress_smp_ops = { |
diff --git a/arch/arm/mach-vexpress/v2m.c b/arch/arm/mach-vexpress/v2m.c index 359f782c747d..011661a6c5cb 100644 --- a/arch/arm/mach-vexpress/v2m.c +++ b/arch/arm/mach-vexpress/v2m.c | |||
@@ -16,11 +16,10 @@ | |||
16 | #include <linux/smsc911x.h> | 16 | #include <linux/smsc911x.h> |
17 | #include <linux/spinlock.h> | 17 | #include <linux/spinlock.h> |
18 | #include <linux/usb/isp1760.h> | 18 | #include <linux/usb/isp1760.h> |
19 | #include <linux/clkdev.h> | ||
20 | #include <linux/clk-provider.h> | ||
21 | #include <linux/mtd/physmap.h> | 19 | #include <linux/mtd/physmap.h> |
22 | #include <linux/regulator/fixed.h> | 20 | #include <linux/regulator/fixed.h> |
23 | #include <linux/regulator/machine.h> | 21 | #include <linux/regulator/machine.h> |
22 | #include <linux/vexpress.h> | ||
24 | 23 | ||
25 | #include <asm/arch_timer.h> | 24 | #include <asm/arch_timer.h> |
26 | #include <asm/mach-types.h> | 25 | #include <asm/mach-types.h> |
@@ -33,7 +32,6 @@ | |||
33 | #include <asm/hardware/cache-l2x0.h> | 32 | #include <asm/hardware/cache-l2x0.h> |
34 | #include <asm/hardware/gic.h> | 33 | #include <asm/hardware/gic.h> |
35 | #include <asm/hardware/timer-sp.h> | 34 | #include <asm/hardware/timer-sp.h> |
36 | #include <asm/hardware/sp810.h> | ||
37 | 35 | ||
38 | #include <mach/ct-ca9x4.h> | 36 | #include <mach/ct-ca9x4.h> |
39 | #include <mach/motherboard.h> | 37 | #include <mach/motherboard.h> |
@@ -58,22 +56,6 @@ static struct map_desc v2m_io_desc[] __initdata = { | |||
58 | }, | 56 | }, |
59 | }; | 57 | }; |
60 | 58 | ||
61 | static void __iomem *v2m_sysreg_base; | ||
62 | |||
63 | static void __init v2m_sysctl_init(void __iomem *base) | ||
64 | { | ||
65 | u32 scctrl; | ||
66 | |||
67 | if (WARN_ON(!base)) | ||
68 | return; | ||
69 | |||
70 | /* Select 1MHz TIMCLK as the reference clock for SP804 timers */ | ||
71 | scctrl = readl(base + SCCTRL); | ||
72 | scctrl |= SCCTRL_TIMEREN0SEL_TIMCLK; | ||
73 | scctrl |= SCCTRL_TIMEREN1SEL_TIMCLK; | ||
74 | writel(scctrl, base + SCCTRL); | ||
75 | } | ||
76 | |||
77 | static void __init v2m_sp804_init(void __iomem *base, unsigned int irq) | 59 | static void __init v2m_sp804_init(void __iomem *base, unsigned int irq) |
78 | { | 60 | { |
79 | if (WARN_ON(!base || irq == NO_IRQ)) | 61 | if (WARN_ON(!base || irq == NO_IRQ)) |
@@ -87,69 +69,6 @@ static void __init v2m_sp804_init(void __iomem *base, unsigned int irq) | |||
87 | } | 69 | } |
88 | 70 | ||
89 | 71 | ||
90 | static DEFINE_SPINLOCK(v2m_cfg_lock); | ||
91 | |||
92 | int v2m_cfg_write(u32 devfn, u32 data) | ||
93 | { | ||
94 | /* Configuration interface broken? */ | ||
95 | u32 val; | ||
96 | |||
97 | printk("%s: writing %08x to %08x\n", __func__, data, devfn); | ||
98 | |||
99 | devfn |= SYS_CFG_START | SYS_CFG_WRITE; | ||
100 | |||
101 | spin_lock(&v2m_cfg_lock); | ||
102 | val = readl(v2m_sysreg_base + V2M_SYS_CFGSTAT); | ||
103 | writel(val & ~SYS_CFG_COMPLETE, v2m_sysreg_base + V2M_SYS_CFGSTAT); | ||
104 | |||
105 | writel(data, v2m_sysreg_base + V2M_SYS_CFGDATA); | ||
106 | writel(devfn, v2m_sysreg_base + V2M_SYS_CFGCTRL); | ||
107 | |||
108 | do { | ||
109 | val = readl(v2m_sysreg_base + V2M_SYS_CFGSTAT); | ||
110 | } while (val == 0); | ||
111 | spin_unlock(&v2m_cfg_lock); | ||
112 | |||
113 | return !!(val & SYS_CFG_ERR); | ||
114 | } | ||
115 | |||
116 | int v2m_cfg_read(u32 devfn, u32 *data) | ||
117 | { | ||
118 | u32 val; | ||
119 | |||
120 | devfn |= SYS_CFG_START; | ||
121 | |||
122 | spin_lock(&v2m_cfg_lock); | ||
123 | writel(0, v2m_sysreg_base + V2M_SYS_CFGSTAT); | ||
124 | writel(devfn, v2m_sysreg_base + V2M_SYS_CFGCTRL); | ||
125 | |||
126 | mb(); | ||
127 | |||
128 | do { | ||
129 | cpu_relax(); | ||
130 | val = readl(v2m_sysreg_base + V2M_SYS_CFGSTAT); | ||
131 | } while (val == 0); | ||
132 | |||
133 | *data = readl(v2m_sysreg_base + V2M_SYS_CFGDATA); | ||
134 | spin_unlock(&v2m_cfg_lock); | ||
135 | |||
136 | return !!(val & SYS_CFG_ERR); | ||
137 | } | ||
138 | |||
139 | void __init v2m_flags_set(u32 data) | ||
140 | { | ||
141 | writel(~0, v2m_sysreg_base + V2M_SYS_FLAGSCLR); | ||
142 | writel(data, v2m_sysreg_base + V2M_SYS_FLAGSSET); | ||
143 | } | ||
144 | |||
145 | int v2m_get_master_site(void) | ||
146 | { | ||
147 | u32 misc = readl(v2m_sysreg_base + V2M_SYS_MISC); | ||
148 | |||
149 | return misc & SYS_MISC_MASTERSITE ? SYS_CFG_SITE_DB2 : SYS_CFG_SITE_DB1; | ||
150 | } | ||
151 | |||
152 | |||
153 | static struct resource v2m_pcie_i2c_resource = { | 72 | static struct resource v2m_pcie_i2c_resource = { |
154 | .start = V2M_SERIAL_BUS_PCI, | 73 | .start = V2M_SERIAL_BUS_PCI, |
155 | .end = V2M_SERIAL_BUS_PCI + SZ_4K - 1, | 74 | .end = V2M_SERIAL_BUS_PCI + SZ_4K - 1, |
@@ -237,14 +156,8 @@ static struct platform_device v2m_usb_device = { | |||
237 | .dev.platform_data = &v2m_usb_config, | 156 | .dev.platform_data = &v2m_usb_config, |
238 | }; | 157 | }; |
239 | 158 | ||
240 | static void v2m_flash_set_vpp(struct platform_device *pdev, int on) | ||
241 | { | ||
242 | writel(on != 0, v2m_sysreg_base + V2M_SYS_FLASH); | ||
243 | } | ||
244 | |||
245 | static struct physmap_flash_data v2m_flash_data = { | 159 | static struct physmap_flash_data v2m_flash_data = { |
246 | .width = 4, | 160 | .width = 4, |
247 | .set_vpp = v2m_flash_set_vpp, | ||
248 | }; | 161 | }; |
249 | 162 | ||
250 | static struct resource v2m_flash_resources[] = { | 163 | static struct resource v2m_flash_resources[] = { |
@@ -291,14 +204,61 @@ static struct platform_device v2m_cf_device = { | |||
291 | .dev.platform_data = &v2m_pata_data, | 204 | .dev.platform_data = &v2m_pata_data, |
292 | }; | 205 | }; |
293 | 206 | ||
294 | static unsigned int v2m_mmci_status(struct device *dev) | ||
295 | { | ||
296 | return readl(v2m_sysreg_base + V2M_SYS_MCI) & (1 << 0); | ||
297 | } | ||
298 | |||
299 | static struct mmci_platform_data v2m_mmci_data = { | 207 | static struct mmci_platform_data v2m_mmci_data = { |
300 | .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34, | 208 | .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34, |
301 | .status = v2m_mmci_status, | 209 | .gpio_wp = VEXPRESS_GPIO_MMC_WPROT, |
210 | .gpio_cd = VEXPRESS_GPIO_MMC_CARDIN, | ||
211 | }; | ||
212 | |||
213 | static struct resource v2m_sysreg_resources[] = { | ||
214 | { | ||
215 | .start = V2M_SYSREGS, | ||
216 | .end = V2M_SYSREGS + 0xfff, | ||
217 | .flags = IORESOURCE_MEM, | ||
218 | }, | ||
219 | }; | ||
220 | |||
221 | static struct platform_device v2m_sysreg_device = { | ||
222 | .name = "vexpress-sysreg", | ||
223 | .id = -1, | ||
224 | .resource = v2m_sysreg_resources, | ||
225 | .num_resources = ARRAY_SIZE(v2m_sysreg_resources), | ||
226 | }; | ||
227 | |||
228 | static struct platform_device v2m_muxfpga_device = { | ||
229 | .name = "vexpress-muxfpga", | ||
230 | .id = 0, | ||
231 | .num_resources = 1, | ||
232 | .resource = (struct resource []) { | ||
233 | VEXPRESS_RES_FUNC(0, 7), | ||
234 | } | ||
235 | }; | ||
236 | |||
237 | static struct platform_device v2m_shutdown_device = { | ||
238 | .name = "vexpress-shutdown", | ||
239 | .id = 0, | ||
240 | .num_resources = 1, | ||
241 | .resource = (struct resource []) { | ||
242 | VEXPRESS_RES_FUNC(0, 8), | ||
243 | } | ||
244 | }; | ||
245 | |||
246 | static struct platform_device v2m_reboot_device = { | ||
247 | .name = "vexpress-reboot", | ||
248 | .id = 0, | ||
249 | .num_resources = 1, | ||
250 | .resource = (struct resource []) { | ||
251 | VEXPRESS_RES_FUNC(0, 9), | ||
252 | } | ||
253 | }; | ||
254 | |||
255 | static struct platform_device v2m_dvimode_device = { | ||
256 | .name = "vexpress-dvimode", | ||
257 | .id = 0, | ||
258 | .num_resources = 1, | ||
259 | .resource = (struct resource []) { | ||
260 | VEXPRESS_RES_FUNC(0, 11), | ||
261 | } | ||
302 | }; | 262 | }; |
303 | 263 | ||
304 | static AMBA_APB_DEVICE(aaci, "mb:aaci", 0, V2M_AACI, IRQ_V2M_AACI, NULL); | 264 | static AMBA_APB_DEVICE(aaci, "mb:aaci", 0, V2M_AACI, IRQ_V2M_AACI, NULL); |
@@ -325,123 +285,9 @@ static struct amba_device *v2m_amba_devs[] __initdata = { | |||
325 | &rtc_device, | 285 | &rtc_device, |
326 | }; | 286 | }; |
327 | 287 | ||
328 | |||
329 | static unsigned long v2m_osc_recalc_rate(struct clk_hw *hw, | ||
330 | unsigned long parent_rate) | ||
331 | { | ||
332 | struct v2m_osc *osc = to_v2m_osc(hw); | ||
333 | |||
334 | return !parent_rate ? osc->rate_default : parent_rate; | ||
335 | } | ||
336 | |||
337 | static long v2m_osc_round_rate(struct clk_hw *hw, unsigned long rate, | ||
338 | unsigned long *parent_rate) | ||
339 | { | ||
340 | struct v2m_osc *osc = to_v2m_osc(hw); | ||
341 | |||
342 | if (WARN_ON(rate < osc->rate_min)) | ||
343 | rate = osc->rate_min; | ||
344 | |||
345 | if (WARN_ON(rate > osc->rate_max)) | ||
346 | rate = osc->rate_max; | ||
347 | |||
348 | return rate; | ||
349 | } | ||
350 | |||
351 | static int v2m_osc_set_rate(struct clk_hw *hw, unsigned long rate, | ||
352 | unsigned long parent_rate) | ||
353 | { | ||
354 | struct v2m_osc *osc = to_v2m_osc(hw); | ||
355 | |||
356 | v2m_cfg_write(SYS_CFG_OSC | SYS_CFG_SITE(osc->site) | | ||
357 | SYS_CFG_STACK(osc->stack) | osc->osc, rate); | ||
358 | |||
359 | return 0; | ||
360 | } | ||
361 | |||
362 | static struct clk_ops v2m_osc_ops = { | ||
363 | .recalc_rate = v2m_osc_recalc_rate, | ||
364 | .round_rate = v2m_osc_round_rate, | ||
365 | .set_rate = v2m_osc_set_rate, | ||
366 | }; | ||
367 | |||
368 | struct clk * __init v2m_osc_register(const char *name, struct v2m_osc *osc) | ||
369 | { | ||
370 | struct clk_init_data init; | ||
371 | |||
372 | WARN_ON(osc->site > 2); | ||
373 | WARN_ON(osc->stack > 15); | ||
374 | WARN_ON(osc->osc > 4095); | ||
375 | |||
376 | init.name = name; | ||
377 | init.ops = &v2m_osc_ops; | ||
378 | init.flags = CLK_IS_ROOT; | ||
379 | init.num_parents = 0; | ||
380 | |||
381 | osc->hw.init = &init; | ||
382 | |||
383 | return clk_register(NULL, &osc->hw); | ||
384 | } | ||
385 | |||
386 | static struct v2m_osc v2m_mb_osc1 = { | ||
387 | .site = SYS_CFG_SITE_MB, | ||
388 | .osc = 1, | ||
389 | .rate_min = 23750000, | ||
390 | .rate_max = 63500000, | ||
391 | .rate_default = 23750000, | ||
392 | }; | ||
393 | |||
394 | static const char *v2m_ref_clk_periphs[] __initconst = { | ||
395 | "mb:wdt", "1000f000.wdt", "1c0f0000.wdt", /* SP805 WDT */ | ||
396 | }; | ||
397 | |||
398 | static const char *v2m_osc1_periphs[] __initconst = { | ||
399 | "mb:clcd", "1001f000.clcd", "1c1f0000.clcd", /* PL111 CLCD */ | ||
400 | }; | ||
401 | |||
402 | static const char *v2m_osc2_periphs[] __initconst = { | ||
403 | "mb:mmci", "10005000.mmci", "1c050000.mmci", /* PL180 MMCI */ | ||
404 | "mb:kmi0", "10006000.kmi", "1c060000.kmi", /* PL050 KMI0 */ | ||
405 | "mb:kmi1", "10007000.kmi", "1c070000.kmi", /* PL050 KMI1 */ | ||
406 | "mb:uart0", "10009000.uart", "1c090000.uart", /* PL011 UART0 */ | ||
407 | "mb:uart1", "1000a000.uart", "1c0a0000.uart", /* PL011 UART1 */ | ||
408 | "mb:uart2", "1000b000.uart", "1c0b0000.uart", /* PL011 UART2 */ | ||
409 | "mb:uart3", "1000c000.uart", "1c0c0000.uart", /* PL011 UART3 */ | ||
410 | }; | ||
411 | |||
412 | static void __init v2m_clk_init(void) | ||
413 | { | ||
414 | struct clk *clk; | ||
415 | int i; | ||
416 | |||
417 | clk = clk_register_fixed_rate(NULL, "dummy_apb_pclk", NULL, | ||
418 | CLK_IS_ROOT, 0); | ||
419 | WARN_ON(clk_register_clkdev(clk, "apb_pclk", NULL)); | ||
420 | |||
421 | clk = clk_register_fixed_rate(NULL, "mb:ref_clk", NULL, | ||
422 | CLK_IS_ROOT, 32768); | ||
423 | for (i = 0; i < ARRAY_SIZE(v2m_ref_clk_periphs); i++) | ||
424 | WARN_ON(clk_register_clkdev(clk, NULL, v2m_ref_clk_periphs[i])); | ||
425 | |||
426 | clk = clk_register_fixed_rate(NULL, "mb:sp804_clk", NULL, | ||
427 | CLK_IS_ROOT, 1000000); | ||
428 | WARN_ON(clk_register_clkdev(clk, "v2m-timer0", "sp804")); | ||
429 | WARN_ON(clk_register_clkdev(clk, "v2m-timer1", "sp804")); | ||
430 | |||
431 | clk = v2m_osc_register("mb:osc1", &v2m_mb_osc1); | ||
432 | for (i = 0; i < ARRAY_SIZE(v2m_osc1_periphs); i++) | ||
433 | WARN_ON(clk_register_clkdev(clk, NULL, v2m_osc1_periphs[i])); | ||
434 | |||
435 | clk = clk_register_fixed_rate(NULL, "mb:osc2", NULL, | ||
436 | CLK_IS_ROOT, 24000000); | ||
437 | for (i = 0; i < ARRAY_SIZE(v2m_osc2_periphs); i++) | ||
438 | WARN_ON(clk_register_clkdev(clk, NULL, v2m_osc2_periphs[i])); | ||
439 | } | ||
440 | |||
441 | static void __init v2m_timer_init(void) | 288 | static void __init v2m_timer_init(void) |
442 | { | 289 | { |
443 | v2m_sysctl_init(ioremap(V2M_SYSCTL, SZ_4K)); | 290 | vexpress_clk_init(ioremap(V2M_SYSCTL, SZ_4K)); |
444 | v2m_clk_init(); | ||
445 | v2m_sp804_init(ioremap(V2M_TIMER01, SZ_4K), IRQ_V2M_TIMER0); | 291 | v2m_sp804_init(ioremap(V2M_TIMER01, SZ_4K), IRQ_V2M_TIMER0); |
446 | } | 292 | } |
447 | 293 | ||
@@ -453,19 +299,7 @@ static void __init v2m_init_early(void) | |||
453 | { | 299 | { |
454 | if (ct_desc->init_early) | 300 | if (ct_desc->init_early) |
455 | ct_desc->init_early(); | 301 | ct_desc->init_early(); |
456 | versatile_sched_clock_init(v2m_sysreg_base + V2M_SYS_24MHZ, 24000000); | 302 | versatile_sched_clock_init(vexpress_get_24mhz_clock_base(), 24000000); |
457 | } | ||
458 | |||
459 | static void v2m_power_off(void) | ||
460 | { | ||
461 | if (v2m_cfg_write(SYS_CFG_SHUTDOWN | SYS_CFG_SITE(SYS_CFG_SITE_MB), 0)) | ||
462 | printk(KERN_EMERG "Unable to shutdown\n"); | ||
463 | } | ||
464 | |||
465 | static void v2m_restart(char str, const char *cmd) | ||
466 | { | ||
467 | if (v2m_cfg_write(SYS_CFG_REBOOT | SYS_CFG_SITE(SYS_CFG_SITE_MB), 0)) | ||
468 | printk(KERN_EMERG "Unable to reboot\n"); | ||
469 | } | 303 | } |
470 | 304 | ||
471 | struct ct_desc *ct_desc; | 305 | struct ct_desc *ct_desc; |
@@ -482,7 +316,7 @@ static void __init v2m_populate_ct_desc(void) | |||
482 | u32 current_tile_id; | 316 | u32 current_tile_id; |
483 | 317 | ||
484 | ct_desc = NULL; | 318 | ct_desc = NULL; |
485 | current_tile_id = readl(v2m_sysreg_base + V2M_SYS_PROCID0) | 319 | current_tile_id = vexpress_get_procid(VEXPRESS_SITE_MASTER) |
486 | & V2M_CT_ID_MASK; | 320 | & V2M_CT_ID_MASK; |
487 | 321 | ||
488 | for (i = 0; i < ARRAY_SIZE(ct_descs) && !ct_desc; ++i) | 322 | for (i = 0; i < ARRAY_SIZE(ct_descs) && !ct_desc; ++i) |
@@ -498,7 +332,7 @@ static void __init v2m_populate_ct_desc(void) | |||
498 | static void __init v2m_map_io(void) | 332 | static void __init v2m_map_io(void) |
499 | { | 333 | { |
500 | iotable_init(v2m_io_desc, ARRAY_SIZE(v2m_io_desc)); | 334 | iotable_init(v2m_io_desc, ARRAY_SIZE(v2m_io_desc)); |
501 | v2m_sysreg_base = ioremap(V2M_SYSREGS, SZ_4K); | 335 | vexpress_sysreg_early_init(ioremap(V2M_SYSREGS, SZ_4K)); |
502 | v2m_populate_ct_desc(); | 336 | v2m_populate_ct_desc(); |
503 | ct_desc->map_io(); | 337 | ct_desc->map_io(); |
504 | } | 338 | } |
@@ -515,6 +349,12 @@ static void __init v2m_init(void) | |||
515 | regulator_register_fixed(0, v2m_eth_supplies, | 349 | regulator_register_fixed(0, v2m_eth_supplies, |
516 | ARRAY_SIZE(v2m_eth_supplies)); | 350 | ARRAY_SIZE(v2m_eth_supplies)); |
517 | 351 | ||
352 | platform_device_register(&v2m_muxfpga_device); | ||
353 | platform_device_register(&v2m_shutdown_device); | ||
354 | platform_device_register(&v2m_reboot_device); | ||
355 | platform_device_register(&v2m_dvimode_device); | ||
356 | |||
357 | platform_device_register(&v2m_sysreg_device); | ||
518 | platform_device_register(&v2m_pcie_i2c_device); | 358 | platform_device_register(&v2m_pcie_i2c_device); |
519 | platform_device_register(&v2m_ddc_i2c_device); | 359 | platform_device_register(&v2m_ddc_i2c_device); |
520 | platform_device_register(&v2m_flash_device); | 360 | platform_device_register(&v2m_flash_device); |
@@ -525,7 +365,7 @@ static void __init v2m_init(void) | |||
525 | for (i = 0; i < ARRAY_SIZE(v2m_amba_devs); i++) | 365 | for (i = 0; i < ARRAY_SIZE(v2m_amba_devs); i++) |
526 | amba_device_register(v2m_amba_devs[i], &iomem_resource); | 366 | amba_device_register(v2m_amba_devs[i], &iomem_resource); |
527 | 367 | ||
528 | pm_power_off = v2m_power_off; | 368 | pm_power_off = vexpress_power_off; |
529 | 369 | ||
530 | ct_desc->init_tile(); | 370 | ct_desc->init_tile(); |
531 | } | 371 | } |
@@ -539,7 +379,7 @@ MACHINE_START(VEXPRESS, "ARM-Versatile Express") | |||
539 | .timer = &v2m_timer, | 379 | .timer = &v2m_timer, |
540 | .handle_irq = gic_handle_irq, | 380 | .handle_irq = gic_handle_irq, |
541 | .init_machine = v2m_init, | 381 | .init_machine = v2m_init, |
542 | .restart = v2m_restart, | 382 | .restart = vexpress_restart, |
543 | MACHINE_END | 383 | MACHINE_END |
544 | 384 | ||
545 | static struct map_desc v2m_rs1_io_desc __initdata = { | 385 | static struct map_desc v2m_rs1_io_desc __initdata = { |
@@ -580,20 +420,13 @@ void __init v2m_dt_map_io(void) | |||
580 | 420 | ||
581 | void __init v2m_dt_init_early(void) | 421 | void __init v2m_dt_init_early(void) |
582 | { | 422 | { |
583 | struct device_node *node; | ||
584 | u32 dt_hbi; | 423 | u32 dt_hbi; |
585 | 424 | ||
586 | node = of_find_compatible_node(NULL, NULL, "arm,vexpress-sysreg"); | 425 | vexpress_sysreg_of_early_init(); |
587 | v2m_sysreg_base = of_iomap(node, 0); | ||
588 | if (WARN_ON(!v2m_sysreg_base)) | ||
589 | return; | ||
590 | 426 | ||
591 | /* Confirm board type against DT property, if available */ | 427 | /* Confirm board type against DT property, if available */ |
592 | if (of_property_read_u32(of_allnodes, "arm,hbi", &dt_hbi) == 0) { | 428 | if (of_property_read_u32(of_allnodes, "arm,hbi", &dt_hbi) == 0) { |
593 | int site = v2m_get_master_site(); | 429 | u32 hbi = vexpress_get_hbi(VEXPRESS_SITE_MASTER); |
594 | u32 id = readl(v2m_sysreg_base + (site == SYS_CFG_SITE_DB2 ? | ||
595 | V2M_SYS_PROCID1 : V2M_SYS_PROCID0)); | ||
596 | u32 hbi = id & SYS_PROCIDx_HBI_MASK; | ||
597 | 430 | ||
598 | if (WARN_ON(dt_hbi != hbi)) | 431 | if (WARN_ON(dt_hbi != hbi)) |
599 | pr_warning("vexpress: DT HBI (%x) is not matching " | 432 | pr_warning("vexpress: DT HBI (%x) is not matching " |
@@ -613,51 +446,47 @@ static void __init v2m_dt_init_irq(void) | |||
613 | 446 | ||
614 | static void __init v2m_dt_timer_init(void) | 447 | static void __init v2m_dt_timer_init(void) |
615 | { | 448 | { |
616 | struct device_node *node; | 449 | struct device_node *node = NULL; |
617 | const char *path; | ||
618 | int err; | ||
619 | 450 | ||
620 | node = of_find_compatible_node(NULL, NULL, "arm,sp810"); | 451 | vexpress_clk_of_init(); |
621 | v2m_sysctl_init(of_iomap(node, 0)); | ||
622 | 452 | ||
623 | v2m_clk_init(); | 453 | do { |
454 | node = of_find_compatible_node(node, NULL, "arm,sp804"); | ||
455 | } while (node && vexpress_get_site_by_node(node) != VEXPRESS_SITE_MB); | ||
456 | if (node) { | ||
457 | pr_info("Using SP804 '%s' as a clock & events source\n", | ||
458 | node->full_name); | ||
459 | v2m_sp804_init(of_iomap(node, 0), | ||
460 | irq_of_parse_and_map(node, 0)); | ||
461 | } | ||
624 | 462 | ||
625 | err = of_property_read_string(of_aliases, "arm,v2m_timer", &path); | ||
626 | if (WARN_ON(err)) | ||
627 | return; | ||
628 | node = of_find_node_by_path(path); | ||
629 | v2m_sp804_init(of_iomap(node, 0), irq_of_parse_and_map(node, 0)); | ||
630 | if (arch_timer_of_register() != 0) | 463 | if (arch_timer_of_register() != 0) |
631 | twd_local_timer_of_register(); | 464 | twd_local_timer_of_register(); |
632 | 465 | ||
633 | if (arch_timer_sched_clock_init() != 0) | 466 | if (arch_timer_sched_clock_init() != 0) |
634 | versatile_sched_clock_init(v2m_sysreg_base + V2M_SYS_24MHZ, 24000000); | 467 | versatile_sched_clock_init(vexpress_get_24mhz_clock_base(), |
468 | 24000000); | ||
635 | } | 469 | } |
636 | 470 | ||
637 | static struct sys_timer v2m_dt_timer = { | 471 | static struct sys_timer v2m_dt_timer = { |
638 | .init = v2m_dt_timer_init, | 472 | .init = v2m_dt_timer_init, |
639 | }; | 473 | }; |
640 | 474 | ||
641 | static struct of_dev_auxdata v2m_dt_auxdata_lookup[] __initdata = { | 475 | static const struct of_device_id v2m_dt_bus_match[] __initconst = { |
642 | OF_DEV_AUXDATA("arm,vexpress-flash", V2M_NOR0, "physmap-flash", | 476 | { .compatible = "simple-bus", }, |
643 | &v2m_flash_data), | 477 | { .compatible = "arm,amba-bus", }, |
644 | OF_DEV_AUXDATA("arm,primecell", V2M_MMCI, "mb:mmci", &v2m_mmci_data), | 478 | { .compatible = "arm,vexpress,config-bus", }, |
645 | /* RS1 memory map */ | ||
646 | OF_DEV_AUXDATA("arm,vexpress-flash", 0x08000000, "physmap-flash", | ||
647 | &v2m_flash_data), | ||
648 | OF_DEV_AUXDATA("arm,primecell", 0x1c050000, "mb:mmci", &v2m_mmci_data), | ||
649 | {} | 479 | {} |
650 | }; | 480 | }; |
651 | 481 | ||
652 | static void __init v2m_dt_init(void) | 482 | static void __init v2m_dt_init(void) |
653 | { | 483 | { |
654 | l2x0_of_init(0x00400000, 0xfe0fffff); | 484 | l2x0_of_init(0x00400000, 0xfe0fffff); |
655 | of_platform_populate(NULL, of_default_bus_match_table, | 485 | of_platform_populate(NULL, v2m_dt_bus_match, NULL, NULL); |
656 | v2m_dt_auxdata_lookup, NULL); | 486 | pm_power_off = vexpress_power_off; |
657 | pm_power_off = v2m_power_off; | ||
658 | } | 487 | } |
659 | 488 | ||
660 | const static char *v2m_dt_match[] __initconst = { | 489 | static const char * const v2m_dt_match[] __initconst = { |
661 | "arm,vexpress", | 490 | "arm,vexpress", |
662 | "xen,xenvm", | 491 | "xen,xenvm", |
663 | NULL, | 492 | NULL, |
@@ -672,5 +501,5 @@ DT_MACHINE_START(VEXPRESS_DT, "ARM-Versatile Express") | |||
672 | .timer = &v2m_dt_timer, | 501 | .timer = &v2m_dt_timer, |
673 | .init_machine = v2m_dt_init, | 502 | .init_machine = v2m_dt_init, |
674 | .handle_irq = gic_handle_irq, | 503 | .handle_irq = gic_handle_irq, |
675 | .restart = v2m_restart, | 504 | .restart = vexpress_restart, |
676 | MACHINE_END | 505 | MACHINE_END |
diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c index 99b47b950efc..9f0610243bd6 100644 --- a/arch/arm/mm/mmu.c +++ b/arch/arm/mm/mmu.c | |||
@@ -876,6 +876,22 @@ static void __init pci_reserve_io(void) | |||
876 | #define pci_reserve_io() do { } while (0) | 876 | #define pci_reserve_io() do { } while (0) |
877 | #endif | 877 | #endif |
878 | 878 | ||
879 | #ifdef CONFIG_DEBUG_LL | ||
880 | void __init debug_ll_io_init(void) | ||
881 | { | ||
882 | struct map_desc map; | ||
883 | |||
884 | debug_ll_addr(&map.pfn, &map.virtual); | ||
885 | if (!map.pfn || !map.virtual) | ||
886 | return; | ||
887 | map.pfn = __phys_to_pfn(map.pfn); | ||
888 | map.virtual &= PAGE_MASK; | ||
889 | map.length = PAGE_SIZE; | ||
890 | map.type = MT_DEVICE; | ||
891 | create_mapping(&map); | ||
892 | } | ||
893 | #endif | ||
894 | |||
879 | static void * __initdata vmalloc_min = | 895 | static void * __initdata vmalloc_min = |
880 | (void *)(VMALLOC_END - (240 << 20) - VMALLOC_OFFSET); | 896 | (void *)(VMALLOC_END - (240 << 20) - VMALLOC_OFFSET); |
881 | 897 | ||
diff --git a/arch/arm/plat-mxc/devices/platform-mx2-emma.c b/arch/arm/plat-mxc/devices/platform-mx2-emma.c new file mode 100644 index 000000000000..508404ddd4ea --- /dev/null +++ b/arch/arm/plat-mxc/devices/platform-mx2-emma.c | |||
@@ -0,0 +1,40 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2010 Pengutronix | ||
3 | * Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de> | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify it under | ||
6 | * the terms of the GNU General Public License version 2 as published by the | ||
7 | * Free Software Foundation. | ||
8 | */ | ||
9 | #include <mach/hardware.h> | ||
10 | #include <mach/devices-common.h> | ||
11 | |||
12 | #define imx_mx2_emmaprp_data_entry_single(soc) \ | ||
13 | { \ | ||
14 | .iobase = soc ## _EMMAPRP_BASE_ADDR, \ | ||
15 | .iosize = SZ_32, \ | ||
16 | .irq = soc ## _INT_EMMAPRP, \ | ||
17 | } | ||
18 | |||
19 | #ifdef CONFIG_SOC_IMX27 | ||
20 | const struct imx_mx2_emma_data imx27_mx2_emmaprp_data __initconst = | ||
21 | imx_mx2_emmaprp_data_entry_single(MX27); | ||
22 | #endif /* ifdef CONFIG_SOC_IMX27 */ | ||
23 | |||
24 | struct platform_device *__init imx_add_mx2_emmaprp( | ||
25 | const struct imx_mx2_emma_data *data) | ||
26 | { | ||
27 | struct resource res[] = { | ||
28 | { | ||
29 | .start = data->iobase, | ||
30 | .end = data->iobase + data->iosize - 1, | ||
31 | .flags = IORESOURCE_MEM, | ||
32 | }, { | ||
33 | .start = data->irq, | ||
34 | .end = data->irq, | ||
35 | .flags = IORESOURCE_IRQ, | ||
36 | }, | ||
37 | }; | ||
38 | return imx_add_platform_device_dmamask("m2m-emmaprp", 0, | ||
39 | res, 2, NULL, 0, DMA_BIT_MASK(32)); | ||
40 | } | ||
diff --git a/arch/arm/plat-samsung/Kconfig b/arch/arm/plat-samsung/Kconfig index 59401e1cc530..a9d52167e16e 100644 --- a/arch/arm/plat-samsung/Kconfig +++ b/arch/arm/plat-samsung/Kconfig | |||
@@ -414,6 +414,11 @@ config S5P_SETUP_MIPIPHY | |||
414 | help | 414 | help |
415 | Compile in common setup code for MIPI-CSIS and MIPI-DSIM devices | 415 | Compile in common setup code for MIPI-CSIS and MIPI-DSIM devices |
416 | 416 | ||
417 | config S3C_SETUP_CAMIF | ||
418 | bool | ||
419 | help | ||
420 | Compile in common setup code for S3C CAMIF devices | ||
421 | |||
417 | # DMA | 422 | # DMA |
418 | 423 | ||
419 | config S3C_DMA | 424 | config S3C_DMA |
@@ -502,5 +507,6 @@ config DEBUG_S3C_UART | |||
502 | default "0" if DEBUG_S3C_UART0 | 507 | default "0" if DEBUG_S3C_UART0 |
503 | default "1" if DEBUG_S3C_UART1 | 508 | default "1" if DEBUG_S3C_UART1 |
504 | default "2" if DEBUG_S3C_UART2 | 509 | default "2" if DEBUG_S3C_UART2 |
510 | default "3" if DEBUG_S3C_UART3 | ||
505 | 511 | ||
506 | endif | 512 | endif |
diff --git a/arch/arm/plat-samsung/Makefile b/arch/arm/plat-samsung/Makefile index 9e40e8d00740..3a7c64d1814a 100644 --- a/arch/arm/plat-samsung/Makefile +++ b/arch/arm/plat-samsung/Makefile | |||
@@ -41,6 +41,7 @@ obj-$(CONFIG_S5P_DEV_UART) += s5p-dev-uart.o | |||
41 | 41 | ||
42 | obj-$(CONFIG_SAMSUNG_DEV_BACKLIGHT) += dev-backlight.o | 42 | obj-$(CONFIG_SAMSUNG_DEV_BACKLIGHT) += dev-backlight.o |
43 | 43 | ||
44 | obj-$(CONFIG_S3C_SETUP_CAMIF) += setup-camif.o | ||
44 | obj-$(CONFIG_S5P_SETUP_MIPIPHY) += setup-mipiphy.o | 45 | obj-$(CONFIG_S5P_SETUP_MIPIPHY) += setup-mipiphy.o |
45 | 46 | ||
46 | # DMA support | 47 | # DMA support |
diff --git a/arch/arm/plat-samsung/include/plat/cpu.h b/arch/arm/plat-samsung/include/plat/cpu.h index ace4451b7651..e0072ce8d6e9 100644 --- a/arch/arm/plat-samsung/include/plat/cpu.h +++ b/arch/arm/plat-samsung/include/plat/cpu.h | |||
@@ -43,6 +43,7 @@ extern unsigned long samsung_cpu_id; | |||
43 | #define EXYNOS4_CPU_MASK 0xFFFE0000 | 43 | #define EXYNOS4_CPU_MASK 0xFFFE0000 |
44 | 44 | ||
45 | #define EXYNOS5250_SOC_ID 0x43520000 | 45 | #define EXYNOS5250_SOC_ID 0x43520000 |
46 | #define EXYNOS5440_SOC_ID 0x54400000 | ||
46 | #define EXYNOS5_SOC_MASK 0xFFFFF000 | 47 | #define EXYNOS5_SOC_MASK 0xFFFFF000 |
47 | 48 | ||
48 | #define IS_SAMSUNG_CPU(name, id, mask) \ | 49 | #define IS_SAMSUNG_CPU(name, id, mask) \ |
@@ -62,6 +63,7 @@ IS_SAMSUNG_CPU(exynos4210, EXYNOS4210_CPU_ID, EXYNOS4_CPU_MASK) | |||
62 | IS_SAMSUNG_CPU(exynos4212, EXYNOS4212_CPU_ID, EXYNOS4_CPU_MASK) | 63 | IS_SAMSUNG_CPU(exynos4212, EXYNOS4212_CPU_ID, EXYNOS4_CPU_MASK) |
63 | IS_SAMSUNG_CPU(exynos4412, EXYNOS4412_CPU_ID, EXYNOS4_CPU_MASK) | 64 | IS_SAMSUNG_CPU(exynos4412, EXYNOS4412_CPU_ID, EXYNOS4_CPU_MASK) |
64 | IS_SAMSUNG_CPU(exynos5250, EXYNOS5250_SOC_ID, EXYNOS5_SOC_MASK) | 65 | IS_SAMSUNG_CPU(exynos5250, EXYNOS5250_SOC_ID, EXYNOS5_SOC_MASK) |
66 | IS_SAMSUNG_CPU(exynos5440, EXYNOS5440_SOC_ID, EXYNOS5_SOC_MASK) | ||
65 | 67 | ||
66 | #if defined(CONFIG_CPU_S3C2410) || defined(CONFIG_CPU_S3C2412) || \ | 68 | #if defined(CONFIG_CPU_S3C2410) || defined(CONFIG_CPU_S3C2412) || \ |
67 | defined(CONFIG_CPU_S3C2416) || defined(CONFIG_CPU_S3C2440) || \ | 69 | defined(CONFIG_CPU_S3C2416) || defined(CONFIG_CPU_S3C2440) || \ |
@@ -130,6 +132,12 @@ IS_SAMSUNG_CPU(exynos5250, EXYNOS5250_SOC_ID, EXYNOS5_SOC_MASK) | |||
130 | # define soc_is_exynos5250() 0 | 132 | # define soc_is_exynos5250() 0 |
131 | #endif | 133 | #endif |
132 | 134 | ||
135 | #if defined(CONFIG_SOC_EXYNOS5440) | ||
136 | # define soc_is_exynos5440() is_samsung_exynos5440() | ||
137 | #else | ||
138 | # define soc_is_exynos5440() 0 | ||
139 | #endif | ||
140 | |||
133 | #define IODESC_ENT(x) { (unsigned long)S3C24XX_VA_##x, __phys_to_pfn(S3C24XX_PA_##x), S3C24XX_SZ_##x, MT_DEVICE } | 141 | #define IODESC_ENT(x) { (unsigned long)S3C24XX_VA_##x, __phys_to_pfn(S3C24XX_PA_##x), S3C24XX_SZ_##x, MT_DEVICE } |
134 | 142 | ||
135 | #ifndef KHZ | 143 | #ifndef KHZ |
diff --git a/arch/arm/plat-samsung/setup-camif.c b/arch/arm/plat-samsung/setup-camif.c new file mode 100644 index 000000000000..e01bf760af2c --- /dev/null +++ b/arch/arm/plat-samsung/setup-camif.c | |||
@@ -0,0 +1,70 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2012 Sylwester Nawrocki <sylvester.nawrocki@gmail.com> | ||
3 | * | ||
4 | * Helper functions for S3C24XX/S3C64XX SoC series CAMIF driver | ||
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 | #include <linux/gpio.h> | ||
12 | #include <plat/gpio-cfg.h> | ||
13 | |||
14 | /* Number of camera port pins, without FIELD */ | ||
15 | #define S3C_CAMIF_NUM_GPIOS 13 | ||
16 | |||
17 | /* Default camera port configuration helpers. */ | ||
18 | |||
19 | static void camif_get_gpios(int *gpio_start, int *gpio_reset) | ||
20 | { | ||
21 | #ifdef CONFIG_ARCH_S3C24XX | ||
22 | *gpio_start = S3C2410_GPJ(0); | ||
23 | *gpio_reset = S3C2410_GPJ(12); | ||
24 | #else | ||
25 | /* s3c64xx */ | ||
26 | *gpio_start = S3C64XX_GPF(0); | ||
27 | *gpio_reset = S3C64XX_GPF(3); | ||
28 | #endif | ||
29 | } | ||
30 | |||
31 | int s3c_camif_gpio_get(void) | ||
32 | { | ||
33 | int gpio_start, gpio_reset; | ||
34 | int ret, i; | ||
35 | |||
36 | camif_get_gpios(&gpio_start, &gpio_reset); | ||
37 | |||
38 | for (i = 0; i < S3C_CAMIF_NUM_GPIOS; i++) { | ||
39 | int gpio = gpio_start + i; | ||
40 | |||
41 | if (gpio == gpio_reset) | ||
42 | continue; | ||
43 | |||
44 | ret = gpio_request(gpio, "camif"); | ||
45 | if (!ret) | ||
46 | ret = s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(2)); | ||
47 | if (ret) { | ||
48 | pr_err("failed to configure GPIO %d\n", gpio); | ||
49 | for (--i; i >= 0; i--) | ||
50 | gpio_free(gpio--); | ||
51 | return ret; | ||
52 | } | ||
53 | s3c_gpio_setpull(gpio, S3C_GPIO_PULL_NONE); | ||
54 | } | ||
55 | |||
56 | return 0; | ||
57 | } | ||
58 | |||
59 | void s3c_camif_gpio_put(void) | ||
60 | { | ||
61 | int i, gpio_start, gpio_reset; | ||
62 | |||
63 | camif_get_gpios(&gpio_start, &gpio_reset); | ||
64 | |||
65 | for (i = 0; i < S3C_CAMIF_NUM_GPIOS; i++) { | ||
66 | int gpio = gpio_start + i; | ||
67 | if (gpio != gpio_reset) | ||
68 | gpio_free(gpio); | ||
69 | } | ||
70 | } | ||
diff --git a/arch/arm/plat-versatile/Kconfig b/arch/arm/plat-versatile/Kconfig index eb50231c4efd..2c4332b9f948 100644 --- a/arch/arm/plat-versatile/Kconfig +++ b/arch/arm/plat-versatile/Kconfig | |||
@@ -6,15 +6,6 @@ config PLAT_VERSATILE_CLOCK | |||
6 | config PLAT_VERSATILE_CLCD | 6 | config PLAT_VERSATILE_CLCD |
7 | bool | 7 | bool |
8 | 8 | ||
9 | config PLAT_VERSATILE_FPGA_IRQ | ||
10 | bool | ||
11 | select IRQ_DOMAIN | ||
12 | |||
13 | config PLAT_VERSATILE_FPGA_IRQ_NR | ||
14 | int | ||
15 | default 4 | ||
16 | depends on PLAT_VERSATILE_FPGA_IRQ | ||
17 | |||
18 | config PLAT_VERSATILE_LEDS | 9 | config PLAT_VERSATILE_LEDS |
19 | def_bool y if NEW_LEDS | 10 | def_bool y if NEW_LEDS |
20 | depends on ARCH_REALVIEW || ARCH_VERSATILE | 11 | depends on ARCH_REALVIEW || ARCH_VERSATILE |
diff --git a/arch/arm/plat-versatile/Makefile b/arch/arm/plat-versatile/Makefile index 74cfd94cbf80..f88d448b629c 100644 --- a/arch/arm/plat-versatile/Makefile +++ b/arch/arm/plat-versatile/Makefile | |||
@@ -2,7 +2,6 @@ ccflags-$(CONFIG_ARCH_MULTIPLATFORM) := -I$(srctree)/$(src)/include | |||
2 | 2 | ||
3 | obj-$(CONFIG_PLAT_VERSATILE_CLOCK) += clock.o | 3 | obj-$(CONFIG_PLAT_VERSATILE_CLOCK) += clock.o |
4 | obj-$(CONFIG_PLAT_VERSATILE_CLCD) += clcd.o | 4 | obj-$(CONFIG_PLAT_VERSATILE_CLCD) += clcd.o |
5 | obj-$(CONFIG_PLAT_VERSATILE_FPGA_IRQ) += fpga-irq.o | ||
6 | obj-$(CONFIG_PLAT_VERSATILE_LEDS) += leds.o | 5 | obj-$(CONFIG_PLAT_VERSATILE_LEDS) += leds.o |
7 | obj-$(CONFIG_PLAT_VERSATILE_SCHED_CLOCK) += sched-clock.o | 6 | obj-$(CONFIG_PLAT_VERSATILE_SCHED_CLOCK) += sched-clock.o |
8 | obj-$(CONFIG_SMP) += headsmp.o platsmp.o | 7 | obj-$(CONFIG_SMP) += headsmp.o platsmp.o |
diff --git a/arch/arm/plat-versatile/fpga-irq.c b/arch/arm/plat-versatile/fpga-irq.c deleted file mode 100644 index 091ae1030045..000000000000 --- a/arch/arm/plat-versatile/fpga-irq.c +++ /dev/null | |||
@@ -1,210 +0,0 @@ | |||
1 | /* | ||
2 | * Support for Versatile FPGA-based IRQ controllers | ||
3 | */ | ||
4 | #include <linux/irq.h> | ||
5 | #include <linux/io.h> | ||
6 | #include <linux/irqdomain.h> | ||
7 | #include <linux/module.h> | ||
8 | #include <linux/of.h> | ||
9 | #include <linux/of_address.h> | ||
10 | |||
11 | #include <asm/exception.h> | ||
12 | #include <asm/mach/irq.h> | ||
13 | #include <plat/fpga-irq.h> | ||
14 | |||
15 | #define IRQ_STATUS 0x00 | ||
16 | #define IRQ_RAW_STATUS 0x04 | ||
17 | #define IRQ_ENABLE_SET 0x08 | ||
18 | #define IRQ_ENABLE_CLEAR 0x0c | ||
19 | #define INT_SOFT_SET 0x10 | ||
20 | #define INT_SOFT_CLEAR 0x14 | ||
21 | #define FIQ_STATUS 0x20 | ||
22 | #define FIQ_RAW_STATUS 0x24 | ||
23 | #define FIQ_ENABLE 0x28 | ||
24 | #define FIQ_ENABLE_SET 0x28 | ||
25 | #define FIQ_ENABLE_CLEAR 0x2C | ||
26 | |||
27 | /** | ||
28 | * struct fpga_irq_data - irq data container for the FPGA IRQ controller | ||
29 | * @base: memory offset in virtual memory | ||
30 | * @chip: chip container for this instance | ||
31 | * @domain: IRQ domain for this instance | ||
32 | * @valid: mask for valid IRQs on this controller | ||
33 | * @used_irqs: number of active IRQs on this controller | ||
34 | */ | ||
35 | struct fpga_irq_data { | ||
36 | void __iomem *base; | ||
37 | struct irq_chip chip; | ||
38 | u32 valid; | ||
39 | struct irq_domain *domain; | ||
40 | u8 used_irqs; | ||
41 | }; | ||
42 | |||
43 | /* we cannot allocate memory when the controllers are initially registered */ | ||
44 | static struct fpga_irq_data fpga_irq_devices[CONFIG_PLAT_VERSATILE_FPGA_IRQ_NR]; | ||
45 | static int fpga_irq_id; | ||
46 | |||
47 | static void fpga_irq_mask(struct irq_data *d) | ||
48 | { | ||
49 | struct fpga_irq_data *f = irq_data_get_irq_chip_data(d); | ||
50 | u32 mask = 1 << d->hwirq; | ||
51 | |||
52 | writel(mask, f->base + IRQ_ENABLE_CLEAR); | ||
53 | } | ||
54 | |||
55 | static void fpga_irq_unmask(struct irq_data *d) | ||
56 | { | ||
57 | struct fpga_irq_data *f = irq_data_get_irq_chip_data(d); | ||
58 | u32 mask = 1 << d->hwirq; | ||
59 | |||
60 | writel(mask, f->base + IRQ_ENABLE_SET); | ||
61 | } | ||
62 | |||
63 | static void fpga_irq_handle(unsigned int irq, struct irq_desc *desc) | ||
64 | { | ||
65 | struct fpga_irq_data *f = irq_desc_get_handler_data(desc); | ||
66 | u32 status = readl(f->base + IRQ_STATUS); | ||
67 | |||
68 | if (status == 0) { | ||
69 | do_bad_IRQ(irq, desc); | ||
70 | return; | ||
71 | } | ||
72 | |||
73 | do { | ||
74 | irq = ffs(status) - 1; | ||
75 | status &= ~(1 << irq); | ||
76 | generic_handle_irq(irq_find_mapping(f->domain, irq)); | ||
77 | } while (status); | ||
78 | } | ||
79 | |||
80 | /* | ||
81 | * Handle each interrupt in a single FPGA IRQ controller. Returns non-zero | ||
82 | * if we've handled at least one interrupt. This does a single read of the | ||
83 | * status register and handles all interrupts in order from LSB first. | ||
84 | */ | ||
85 | static int handle_one_fpga(struct fpga_irq_data *f, struct pt_regs *regs) | ||
86 | { | ||
87 | int handled = 0; | ||
88 | int irq; | ||
89 | u32 status; | ||
90 | |||
91 | while ((status = readl(f->base + IRQ_STATUS))) { | ||
92 | irq = ffs(status) - 1; | ||
93 | handle_IRQ(irq_find_mapping(f->domain, irq), regs); | ||
94 | handled = 1; | ||
95 | } | ||
96 | |||
97 | return handled; | ||
98 | } | ||
99 | |||
100 | /* | ||
101 | * Keep iterating over all registered FPGA IRQ controllers until there are | ||
102 | * no pending interrupts. | ||
103 | */ | ||
104 | asmlinkage void __exception_irq_entry fpga_handle_irq(struct pt_regs *regs) | ||
105 | { | ||
106 | int i, handled; | ||
107 | |||
108 | do { | ||
109 | for (i = 0, handled = 0; i < fpga_irq_id; ++i) | ||
110 | handled |= handle_one_fpga(&fpga_irq_devices[i], regs); | ||
111 | } while (handled); | ||
112 | } | ||
113 | |||
114 | static int fpga_irqdomain_map(struct irq_domain *d, unsigned int irq, | ||
115 | irq_hw_number_t hwirq) | ||
116 | { | ||
117 | struct fpga_irq_data *f = d->host_data; | ||
118 | |||
119 | /* Skip invalid IRQs, only register handlers for the real ones */ | ||
120 | if (!(f->valid & (1 << hwirq))) | ||
121 | return -ENOTSUPP; | ||
122 | irq_set_chip_data(irq, f); | ||
123 | irq_set_chip_and_handler(irq, &f->chip, | ||
124 | handle_level_irq); | ||
125 | set_irq_flags(irq, IRQF_VALID | IRQF_PROBE); | ||
126 | f->used_irqs++; | ||
127 | return 0; | ||
128 | } | ||
129 | |||
130 | static struct irq_domain_ops fpga_irqdomain_ops = { | ||
131 | .map = fpga_irqdomain_map, | ||
132 | .xlate = irq_domain_xlate_onetwocell, | ||
133 | }; | ||
134 | |||
135 | static __init struct fpga_irq_data * | ||
136 | fpga_irq_prep_struct(void __iomem *base, const char *name, u32 valid) { | ||
137 | struct fpga_irq_data *f; | ||
138 | |||
139 | if (fpga_irq_id >= ARRAY_SIZE(fpga_irq_devices)) { | ||
140 | printk(KERN_ERR "%s: too few FPGA IRQ controllers, increase CONFIG_PLAT_VERSATILE_FPGA_IRQ_NR\n", __func__); | ||
141 | return NULL; | ||
142 | } | ||
143 | f = &fpga_irq_devices[fpga_irq_id]; | ||
144 | f->base = base; | ||
145 | f->chip.name = name; | ||
146 | f->chip.irq_ack = fpga_irq_mask; | ||
147 | f->chip.irq_mask = fpga_irq_mask; | ||
148 | f->chip.irq_unmask = fpga_irq_unmask; | ||
149 | f->valid = valid; | ||
150 | fpga_irq_id++; | ||
151 | |||
152 | return f; | ||
153 | } | ||
154 | |||
155 | void __init fpga_irq_init(void __iomem *base, const char *name, int irq_start, | ||
156 | int parent_irq, u32 valid, struct device_node *node) | ||
157 | { | ||
158 | struct fpga_irq_data *f; | ||
159 | |||
160 | f = fpga_irq_prep_struct(base, name, valid); | ||
161 | if (!f) | ||
162 | return; | ||
163 | |||
164 | if (parent_irq != -1) { | ||
165 | irq_set_handler_data(parent_irq, f); | ||
166 | irq_set_chained_handler(parent_irq, fpga_irq_handle); | ||
167 | } | ||
168 | |||
169 | f->domain = irq_domain_add_legacy(node, fls(valid), irq_start, 0, | ||
170 | &fpga_irqdomain_ops, f); | ||
171 | pr_info("FPGA IRQ chip %d \"%s\" @ %p, %u irqs\n", | ||
172 | fpga_irq_id, name, base, f->used_irqs); | ||
173 | } | ||
174 | |||
175 | #ifdef CONFIG_OF | ||
176 | int __init fpga_irq_of_init(struct device_node *node, | ||
177 | struct device_node *parent) | ||
178 | { | ||
179 | struct fpga_irq_data *f; | ||
180 | void __iomem *base; | ||
181 | u32 clear_mask; | ||
182 | u32 valid_mask; | ||
183 | |||
184 | if (WARN_ON(!node)) | ||
185 | return -ENODEV; | ||
186 | |||
187 | base = of_iomap(node, 0); | ||
188 | WARN(!base, "unable to map fpga irq registers\n"); | ||
189 | |||
190 | if (of_property_read_u32(node, "clear-mask", &clear_mask)) | ||
191 | clear_mask = 0; | ||
192 | |||
193 | if (of_property_read_u32(node, "valid-mask", &valid_mask)) | ||
194 | valid_mask = 0; | ||
195 | |||
196 | f = fpga_irq_prep_struct(base, node->name, valid_mask); | ||
197 | if (!f) | ||
198 | return -ENOMEM; | ||
199 | |||
200 | writel(clear_mask, base + IRQ_ENABLE_CLEAR); | ||
201 | writel(clear_mask, base + FIQ_ENABLE_CLEAR); | ||
202 | |||
203 | f->domain = irq_domain_add_linear(node, fls(valid_mask), &fpga_irqdomain_ops, f); | ||
204 | f->used_irqs = hweight32(valid_mask); | ||
205 | |||
206 | pr_info("FPGA IRQ chip %d \"%s\" @ %p, %u irqs\n", | ||
207 | fpga_irq_id, node->name, base, f->used_irqs); | ||
208 | return 0; | ||
209 | } | ||
210 | #endif | ||
diff --git a/arch/arm/plat-versatile/include/plat/fpga-irq.h b/arch/arm/plat-versatile/include/plat/fpga-irq.h deleted file mode 100644 index 1fac9651d3ca..000000000000 --- a/arch/arm/plat-versatile/include/plat/fpga-irq.h +++ /dev/null | |||
@@ -1,13 +0,0 @@ | |||
1 | #ifndef PLAT_FPGA_IRQ_H | ||
2 | #define PLAT_FPGA_IRQ_H | ||
3 | |||
4 | struct device_node; | ||
5 | struct pt_regs; | ||
6 | |||
7 | void fpga_handle_irq(struct pt_regs *regs); | ||
8 | void fpga_irq_init(void __iomem *, const char *, int, int, u32, | ||
9 | struct device_node *node); | ||
10 | int fpga_irq_of_init(struct device_node *node, | ||
11 | struct device_node *parent); | ||
12 | |||
13 | #endif | ||