diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2016-10-08 00:18:42 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-10-08 00:18:42 -0400 |
| commit | 66f2c6d9525baa7534640f09f406cd2987e0f287 (patch) | |
| tree | c4874177b3dd0e2d0913cb0f898f74412f2801c1 | |
| parent | a771151a8323a5ca81f443a9a439851b8a872c85 (diff) | |
| parent | e40454d3f444ba7f8cc78dd985a1414a5945757c (diff) | |
Merge tag 'armsoc-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
Pull ARM SoC platform updates from Arnd Bergmann:
"These are updates for platform specific code on 32-bit ARM machines,
essentially anything that can not (yet) be expressed using DT files.
Noteworthy changes include:
- We get support for running in big-endian mode on two platforms:
sunxi (Allwinner) and s3c24xx (old Samsung).
- The recently added Uniphier platform now uses standard PSCI methods
for SMP booting and we remove support for old bootloader versions
that did not support it yet.
- In sunxi, we gain support for the "Nextthing GR8" SoC, which is a
close relative of the Allwinner A13 and R8 chips.
- PXA completes its move over to the generic dmaengine framework and
removes its old private API
- mach-bcm gains support for BCM47189/BCM53573, their first ARM SoC
with integrated 802.11ac wireless networking"
* tag 'armsoc-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (54 commits)
ARM: imx legacy: pca100: move peripheral initialization to .init_late
ARM: imx legacy: mx27ads: move peripheral initialization to .init_late
ARM: imx legacy: mx21ads: move peripheral initialization to .init_late
ARM: imx legacy: pcm043: move peripheral initialization to .init_late
ARM: imx legacy: mx35-3ds: move peripheral initialization to .init_late
ARM: imx legacy: mx27-3ds: move peripheral initialization to .init_late
ARM: imx legacy: imx27-visstrim-m10: move peripheral initialization to .init_late
ARM: imx legacy: vpr200: move peripheral initialization to .init_late
ARM: imx legacy: mx31moboard: move peripheral initialization to .init_late
ARM: imx legacy: armadillo5x0: move peripheral initialization to .init_late
ARM: imx legacy: qong: move peripheral initialization to .init_late
ARM: imx legacy: mx31-3ds: move peripheral initialization to .init_late
ARM: imx legacy: pcm037: move peripheral initialization to .init_late
ARM: imx legacy: mx31lilly: move peripheral initialization to .init_late
ARM: imx legacy: mx31ads: move peripheral initialization to .init_late
ARM: imx legacy: mx31lite: move peripheral initialization to .init_late
ARM: imx legacy: kzm: move peripheral initialization to .init_late
MAINTAINERS: update list of Oxnas maintainers
ARM: orion5x: remove extraneous NO_IRQ
ARM: orion: simplify orion_ge00_switch_init
...
86 files changed, 696 insertions, 1285 deletions
diff --git a/Documentation/arm/sunxi/README b/Documentation/arm/sunxi/README index c7a0554523da..cd0243302bc1 100644 --- a/Documentation/arm/sunxi/README +++ b/Documentation/arm/sunxi/README | |||
| @@ -31,6 +31,8 @@ SunXi family | |||
| 31 | + User Manual | 31 | + User Manual |
| 32 | http://dl.linux-sunxi.org/A13/A13%20User%20Manual%20-%20v1.2%20%282013-01-08%29.pdf | 32 | http://dl.linux-sunxi.org/A13/A13%20User%20Manual%20-%20v1.2%20%282013-01-08%29.pdf |
| 33 | 33 | ||
| 34 | - Next Thing Co GR8 (sun5i) | ||
| 35 | |||
| 34 | * Dual ARM Cortex-A7 based SoCs | 36 | * Dual ARM Cortex-A7 based SoCs |
| 35 | - Allwinner A20 (sun7i) | 37 | - Allwinner A20 (sun7i) |
| 36 | + User Manual | 38 | + User Manual |
diff --git a/Documentation/devicetree/bindings/arm/sunxi.txt b/Documentation/devicetree/bindings/arm/sunxi.txt index 7e79fcc36b0d..3975d0a0e4c2 100644 --- a/Documentation/devicetree/bindings/arm/sunxi.txt +++ b/Documentation/devicetree/bindings/arm/sunxi.txt | |||
| @@ -14,3 +14,4 @@ using one of the following compatible strings: | |||
| 14 | allwinner,sun8i-a83t | 14 | allwinner,sun8i-a83t |
| 15 | allwinner,sun8i-h3 | 15 | allwinner,sun8i-h3 |
| 16 | allwinner,sun9i-a80 | 16 | allwinner,sun9i-a80 |
| 17 | nextthing,gr8 | ||
diff --git a/MAINTAINERS b/MAINTAINERS index 269bce8a4838..ca045832471a 100644 --- a/MAINTAINERS +++ b/MAINTAINERS | |||
| @@ -1003,6 +1003,7 @@ M: Chen-Yu Tsai <wens@csie.org> | |||
| 1003 | L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) | 1003 | L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) |
| 1004 | S: Maintained | 1004 | S: Maintained |
| 1005 | N: sun[x456789]i | 1005 | N: sun[x456789]i |
| 1006 | F: arch/arm/boot/dts/ntc-gr8* | ||
| 1006 | 1007 | ||
| 1007 | ARM/Allwinner SoC Clock Support | 1008 | ARM/Allwinner SoC Clock Support |
| 1008 | M: Emilio López <emilio@elopez.com.ar> | 1009 | M: Emilio López <emilio@elopez.com.ar> |
| @@ -1459,6 +1460,7 @@ F: arch/arm/mach-orion5x/ts78xx-* | |||
| 1459 | ARM/OXNAS platform support | 1460 | ARM/OXNAS platform support |
| 1460 | M: Neil Armstrong <narmstrong@baylibre.com> | 1461 | M: Neil Armstrong <narmstrong@baylibre.com> |
| 1461 | L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) | 1462 | L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) |
| 1463 | L: linux-oxnas@lists.tuxfamily.org (moderated for non-subscribers) | ||
| 1462 | S: Maintained | 1464 | S: Maintained |
| 1463 | F: arch/arm/mach-oxnas/ | 1465 | F: arch/arm/mach-oxnas/ |
| 1464 | F: arch/arm/boot/dts/oxnas* | 1466 | F: arch/arm/boot/dts/oxnas* |
| @@ -2596,6 +2598,13 @@ F: arch/arm/mach-bcm/bcm_5301x.c | |||
| 2596 | F: arch/arm/boot/dts/bcm5301x*.dtsi | 2598 | F: arch/arm/boot/dts/bcm5301x*.dtsi |
| 2597 | F: arch/arm/boot/dts/bcm470* | 2599 | F: arch/arm/boot/dts/bcm470* |
| 2598 | 2600 | ||
| 2601 | BROADCOM BCM53573 ARM ARCHITECTURE | ||
| 2602 | M: Rafał Miłecki <rafal@milecki.pl> | ||
| 2603 | L: linux-arm-kernel@lists.infradead.org | ||
| 2604 | S: Maintained | ||
| 2605 | F: arch/arm/boot/dts/bcm53573* | ||
| 2606 | F: arch/arm/boot/dts/bcm47189* | ||
| 2607 | |||
| 2599 | BROADCOM BCM63XX ARM ARCHITECTURE | 2608 | BROADCOM BCM63XX ARM ARCHITECTURE |
| 2600 | M: Florian Fainelli <f.fainelli@gmail.com> | 2609 | M: Florian Fainelli <f.fainelli@gmail.com> |
| 2601 | M: bcm-kernel-feedback-list@broadcom.com | 2610 | M: bcm-kernel-feedback-list@broadcom.com |
diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug index a9693b6987a6..d83f7c369e51 100644 --- a/arch/arm/Kconfig.debug +++ b/arch/arm/Kconfig.debug | |||
| @@ -186,10 +186,11 @@ choice | |||
| 186 | config DEBUG_BRCMSTB_UART | 186 | config DEBUG_BRCMSTB_UART |
| 187 | bool "Use BRCMSTB UART for low-level debug" | 187 | bool "Use BRCMSTB UART for low-level debug" |
| 188 | depends on ARCH_BRCMSTB | 188 | depends on ARCH_BRCMSTB |
| 189 | select DEBUG_UART_8250 | ||
| 190 | help | 189 | help |
| 191 | Say Y here if you want the debug print routines to direct | 190 | Say Y here if you want the debug print routines to direct |
| 192 | their output to the first serial port on these devices. | 191 | their output to the first serial port on these devices. The |
| 192 | UART physical and virtual address is automatically provided | ||
| 193 | based on the chip identification register value. | ||
| 193 | 194 | ||
| 194 | If you have a Broadcom STB chip and would like early print | 195 | If you have a Broadcom STB chip and would like early print |
| 195 | messages to appear over the UART, select this option. | 196 | messages to appear over the UART, select this option. |
| @@ -861,12 +862,12 @@ choice | |||
| 861 | via SCIF2 on Renesas R-Car H1 (R8A7779). | 862 | via SCIF2 on Renesas R-Car H1 (R8A7779). |
| 862 | 863 | ||
| 863 | config DEBUG_RCAR_GEN2_SCIF0 | 864 | config DEBUG_RCAR_GEN2_SCIF0 |
| 864 | bool "Kernel low-level debugging messages via SCIF0 on R8A7790/R8A7791/R8A7793" | 865 | bool "Kernel low-level debugging messages via SCIF0 on R8A7790/R8A7791/R8A7792/R8A7793" |
| 865 | depends on ARCH_R8A7790 || ARCH_R8A7791 || ARCH_R8A7793 | 866 | depends on ARCH_R8A7790 || ARCH_R8A7791 || ARCH_R8A7792 || ARCH_R8A7793 |
| 866 | help | 867 | help |
| 867 | Say Y here if you want kernel low-level debugging support | 868 | Say Y here if you want kernel low-level debugging support |
| 868 | via SCIF0 on Renesas R-Car H2 (R8A7790), M2-W (R8A7791), or | 869 | via SCIF0 on Renesas R-Car H2 (R8A7790), M2-W (R8A7791), V2H |
| 869 | M2-N (R8A7793). | 870 | (R8A7792), or M2-N (R8A7793). |
| 870 | 871 | ||
| 871 | config DEBUG_RCAR_GEN2_SCIF2 | 872 | config DEBUG_RCAR_GEN2_SCIF2 |
| 872 | bool "Kernel low-level debugging messages via SCIF2 on R8A7794" | 873 | bool "Kernel low-level debugging messages via SCIF2 on R8A7794" |
| @@ -1430,6 +1431,7 @@ config DEBUG_LL_INCLUDE | |||
| 1430 | default "debug/zynq.S" if DEBUG_ZYNQ_UART0 || DEBUG_ZYNQ_UART1 | 1431 | default "debug/zynq.S" if DEBUG_ZYNQ_UART0 || DEBUG_ZYNQ_UART1 |
| 1431 | default "debug/bcm63xx.S" if DEBUG_BCM63XX_UART | 1432 | default "debug/bcm63xx.S" if DEBUG_BCM63XX_UART |
| 1432 | default "debug/digicolor.S" if DEBUG_DIGICOLOR_UA0 | 1433 | default "debug/digicolor.S" if DEBUG_DIGICOLOR_UA0 |
| 1434 | default "debug/brcmstb.S" if DEBUG_BRCMSTB_UART | ||
| 1433 | default "mach/debug-macro.S" | 1435 | default "mach/debug-macro.S" |
| 1434 | 1436 | ||
| 1435 | # Compatibility options for PL01x | 1437 | # Compatibility options for PL01x |
| @@ -1520,7 +1522,6 @@ config DEBUG_UART_PHYS | |||
| 1520 | default 0xe6e60000 if DEBUG_RCAR_GEN2_SCIF0 | 1522 | default 0xe6e60000 if DEBUG_RCAR_GEN2_SCIF0 |
| 1521 | default 0xe8008000 if DEBUG_R7S72100_SCIF2 | 1523 | default 0xe8008000 if DEBUG_R7S72100_SCIF2 |
| 1522 | default 0xf0000be0 if ARCH_EBSA110 | 1524 | default 0xf0000be0 if ARCH_EBSA110 |
| 1523 | default 0xf040ab00 if DEBUG_BRCMSTB_UART | ||
| 1524 | default 0xf1012000 if DEBUG_MVEBU_UART0_ALTERNATE | 1525 | default 0xf1012000 if DEBUG_MVEBU_UART0_ALTERNATE |
| 1525 | default 0xf1012100 if DEBUG_MVEBU_UART1_ALTERNATE | 1526 | default 0xf1012100 if DEBUG_MVEBU_UART1_ALTERNATE |
| 1526 | default 0xf7fc9000 if DEBUG_BERLIN_UART | 1527 | default 0xf7fc9000 if DEBUG_BERLIN_UART |
| @@ -1604,7 +1605,6 @@ config DEBUG_UART_VIRT | |||
| 1604 | default 0xfb009000 if DEBUG_REALVIEW_STD_PORT | 1605 | default 0xfb009000 if DEBUG_REALVIEW_STD_PORT |
| 1605 | default 0xfb00c000 if DEBUG_AT91_SAMA5D4_USART3 | 1606 | default 0xfb00c000 if DEBUG_AT91_SAMA5D4_USART3 |
| 1606 | default 0xfb10c000 if DEBUG_REALVIEW_PB1176_PORT | 1607 | default 0xfb10c000 if DEBUG_REALVIEW_PB1176_PORT |
| 1607 | default 0xfc40ab00 if DEBUG_BRCMSTB_UART | ||
| 1608 | default 0xfc705000 if DEBUG_ZTE_ZX | 1608 | default 0xfc705000 if DEBUG_ZTE_ZX |
| 1609 | default 0xfcfe8600 if DEBUG_BCM63XX_UART | 1609 | default 0xfcfe8600 if DEBUG_BCM63XX_UART |
| 1610 | default 0xfd000000 if DEBUG_SPEAR3XX || DEBUG_SPEAR13XX | 1610 | default 0xfd000000 if DEBUG_SPEAR3XX || DEBUG_SPEAR13XX |
| @@ -1677,8 +1677,7 @@ config DEBUG_UART_8250_WORD | |||
| 1677 | DEBUG_ALPINE_UART0 || \ | 1677 | DEBUG_ALPINE_UART0 || \ |
| 1678 | DEBUG_DAVINCI_DMx_UART0 || DEBUG_DAVINCI_DA8XX_UART1 || \ | 1678 | DEBUG_DAVINCI_DMx_UART0 || DEBUG_DAVINCI_DA8XX_UART1 || \ |
| 1679 | DEBUG_DAVINCI_DA8XX_UART2 || \ | 1679 | DEBUG_DAVINCI_DA8XX_UART2 || \ |
| 1680 | DEBUG_BCM_KONA_UART || DEBUG_RK32_UART2 || \ | 1680 | DEBUG_BCM_KONA_UART || DEBUG_RK32_UART2 |
| 1681 | DEBUG_BRCMSTB_UART | ||
| 1682 | 1681 | ||
| 1683 | config DEBUG_UART_8250_PALMCHIP | 1682 | config DEBUG_UART_8250_PALMCHIP |
| 1684 | bool "8250 UART is Palmchip BK-310x" | 1683 | bool "8250 UART is Palmchip BK-310x" |
| @@ -1697,7 +1696,8 @@ config DEBUG_UNCOMPRESS | |||
| 1697 | bool | 1696 | bool |
| 1698 | depends on ARCH_MULTIPLATFORM || PLAT_SAMSUNG || ARM_SINGLE_ARMV7M | 1697 | depends on ARCH_MULTIPLATFORM || PLAT_SAMSUNG || ARM_SINGLE_ARMV7M |
| 1699 | default y if DEBUG_LL && !DEBUG_OMAP2PLUS_UART && \ | 1698 | default y if DEBUG_LL && !DEBUG_OMAP2PLUS_UART && \ |
| 1700 | (!DEBUG_TEGRA_UART || !ZBOOT_ROM) | 1699 | (!DEBUG_TEGRA_UART || !ZBOOT_ROM) && \ |
| 1700 | !DEBUG_BRCMSTB_UART | ||
| 1701 | help | 1701 | help |
| 1702 | This option influences the normal decompressor output for | 1702 | This option influences the normal decompressor output for |
| 1703 | multiplatform kernels. Normally, multiplatform kernels disable | 1703 | multiplatform kernels. Normally, multiplatform kernels disable |
diff --git a/arch/arm/configs/colibri_pxa270_defconfig b/arch/arm/configs/colibri_pxa270_defconfig index 0b9211b2b73b..3146ad055716 100644 --- a/arch/arm/configs/colibri_pxa270_defconfig +++ b/arch/arm/configs/colibri_pxa270_defconfig | |||
| @@ -83,7 +83,6 @@ CONFIG_BLK_DEV_CRYPTOLOOP=m | |||
| 83 | CONFIG_BLK_DEV_NBD=y | 83 | CONFIG_BLK_DEV_NBD=y |
| 84 | CONFIG_BLK_DEV_RAM=y | 84 | CONFIG_BLK_DEV_RAM=y |
| 85 | CONFIG_BLK_DEV_RAM_COUNT=8 | 85 | CONFIG_BLK_DEV_RAM_COUNT=8 |
| 86 | CONFIG_IDE=y | ||
| 87 | CONFIG_NETDEVICES=y | 86 | CONFIG_NETDEVICES=y |
| 88 | CONFIG_PHYLIB=y | 87 | CONFIG_PHYLIB=y |
| 89 | CONFIG_NET_ETHERNET=y | 88 | CONFIG_NET_ETHERNET=y |
diff --git a/arch/arm/configs/lpd270_defconfig b/arch/arm/configs/lpd270_defconfig index 1c8c9ee71d31..a9dd1e93b556 100644 --- a/arch/arm/configs/lpd270_defconfig +++ b/arch/arm/configs/lpd270_defconfig | |||
| @@ -31,7 +31,6 @@ CONFIG_MTD_CFI_GEOMETRY=y | |||
| 31 | # CONFIG_MTD_CFI_I1 is not set | 31 | # CONFIG_MTD_CFI_I1 is not set |
| 32 | CONFIG_MTD_CFI_INTELEXT=y | 32 | CONFIG_MTD_CFI_INTELEXT=y |
| 33 | CONFIG_BLK_DEV_NBD=y | 33 | CONFIG_BLK_DEV_NBD=y |
| 34 | CONFIG_IDE=y | ||
| 35 | CONFIG_NETDEVICES=y | 34 | CONFIG_NETDEVICES=y |
| 36 | CONFIG_NET_ETHERNET=y | 35 | CONFIG_NET_ETHERNET=y |
| 37 | CONFIG_SMC91X=y | 36 | CONFIG_SMC91X=y |
diff --git a/arch/arm/configs/pxa255-idp_defconfig b/arch/arm/configs/pxa255-idp_defconfig index 917a070b4bb9..088627ad875f 100644 --- a/arch/arm/configs/pxa255-idp_defconfig +++ b/arch/arm/configs/pxa255-idp_defconfig | |||
| @@ -28,7 +28,6 @@ CONFIG_MTD_CFI_GEOMETRY=y | |||
| 28 | # CONFIG_MTD_MAP_BANK_WIDTH_2 is not set | 28 | # CONFIG_MTD_MAP_BANK_WIDTH_2 is not set |
| 29 | # CONFIG_MTD_CFI_I1 is not set | 29 | # CONFIG_MTD_CFI_I1 is not set |
| 30 | CONFIG_MTD_CFI_INTELEXT=y | 30 | CONFIG_MTD_CFI_INTELEXT=y |
| 31 | CONFIG_IDE=y | ||
| 32 | CONFIG_NETDEVICES=y | 31 | CONFIG_NETDEVICES=y |
| 33 | CONFIG_NET_ETHERNET=y | 32 | CONFIG_NET_ETHERNET=y |
| 34 | CONFIG_SMC91X=y | 33 | CONFIG_SMC91X=y |
diff --git a/arch/arm/configs/pxa_defconfig b/arch/arm/configs/pxa_defconfig index dc5517eaf09f..a016ecc0084b 100644 --- a/arch/arm/configs/pxa_defconfig +++ b/arch/arm/configs/pxa_defconfig | |||
| @@ -26,8 +26,6 @@ CONFIG_PARTITION_ADVANCED=y | |||
| 26 | CONFIG_LDM_PARTITION=y | 26 | CONFIG_LDM_PARTITION=y |
| 27 | CONFIG_CMDLINE_PARTITION=y | 27 | CONFIG_CMDLINE_PARTITION=y |
| 28 | CONFIG_ARCH_PXA=y | 28 | CONFIG_ARCH_PXA=y |
| 29 | CONFIG_MACH_PXA27X_DT=y | ||
| 30 | CONFIG_MACH_PXA3XX_DT=y | ||
| 31 | CONFIG_ARCH_LUBBOCK=y | 29 | CONFIG_ARCH_LUBBOCK=y |
| 32 | CONFIG_MACH_MAINSTONE=y | 30 | CONFIG_MACH_MAINSTONE=y |
| 33 | CONFIG_MACH_ZYLONITE300=y | 31 | CONFIG_MACH_ZYLONITE300=y |
diff --git a/arch/arm/configs/trizeps4_defconfig b/arch/arm/configs/trizeps4_defconfig index 0ada29d568ec..492f7f3eb4ac 100644 --- a/arch/arm/configs/trizeps4_defconfig +++ b/arch/arm/configs/trizeps4_defconfig | |||
| @@ -94,8 +94,6 @@ CONFIG_BLK_DEV_CRYPTOLOOP=m | |||
| 94 | CONFIG_BLK_DEV_NBD=y | 94 | CONFIG_BLK_DEV_NBD=y |
| 95 | CONFIG_BLK_DEV_RAM=y | 95 | CONFIG_BLK_DEV_RAM=y |
| 96 | CONFIG_BLK_DEV_RAM_COUNT=8 | 96 | CONFIG_BLK_DEV_RAM_COUNT=8 |
| 97 | CONFIG_IDE=y | ||
| 98 | CONFIG_BLK_DEV_IDECS=m | ||
| 99 | CONFIG_SCSI=y | 97 | CONFIG_SCSI=y |
| 100 | CONFIG_BLK_DEV_SD=y | 98 | CONFIG_BLK_DEV_SD=y |
| 101 | CONFIG_CHR_DEV_SG=y | 99 | CONFIG_CHR_DEV_SG=y |
diff --git a/arch/arm/include/asm/hardware/cache-uniphier.h b/arch/arm/include/asm/hardware/cache-uniphier.h index 102e3fbe1e10..eaa60da7dac3 100644 --- a/arch/arm/include/asm/hardware/cache-uniphier.h +++ b/arch/arm/include/asm/hardware/cache-uniphier.h | |||
| @@ -1,5 +1,6 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * Copyright (C) 2015 Masahiro Yamada <yamada.masahiro@socionext.com> | 2 | * Copyright (C) 2015-2016 Socionext Inc. |
| 3 | * Author: Masahiro Yamada <yamada.masahiro@socionext.com> | ||
| 3 | * | 4 | * |
| 4 | * This program is free software; you can redistribute it and/or modify | 5 | * 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 | * it under the terms of the GNU General Public License as published by |
| @@ -19,28 +20,11 @@ | |||
| 19 | 20 | ||
| 20 | #ifdef CONFIG_CACHE_UNIPHIER | 21 | #ifdef CONFIG_CACHE_UNIPHIER |
| 21 | int uniphier_cache_init(void); | 22 | int uniphier_cache_init(void); |
| 22 | int uniphier_cache_l2_is_enabled(void); | ||
| 23 | void uniphier_cache_l2_touch_range(unsigned long start, unsigned long end); | ||
| 24 | void uniphier_cache_l2_set_locked_ways(u32 way_mask); | ||
| 25 | #else | 23 | #else |
| 26 | static inline int uniphier_cache_init(void) | 24 | static inline int uniphier_cache_init(void) |
| 27 | { | 25 | { |
| 28 | return -ENODEV; | 26 | return -ENODEV; |
| 29 | } | 27 | } |
| 30 | |||
| 31 | static inline int uniphier_cache_l2_is_enabled(void) | ||
| 32 | { | ||
| 33 | return 0; | ||
| 34 | } | ||
| 35 | |||
| 36 | static inline void uniphier_cache_l2_touch_range(unsigned long start, | ||
| 37 | unsigned long end) | ||
| 38 | { | ||
| 39 | } | ||
| 40 | |||
| 41 | static inline void uniphier_cache_l2_set_locked_ways(u32 way_mask) | ||
| 42 | { | ||
| 43 | } | ||
| 44 | #endif | 28 | #endif |
| 45 | 29 | ||
| 46 | #endif /* __CACHE_UNIPHIER_H */ | 30 | #endif /* __CACHE_UNIPHIER_H */ |
diff --git a/arch/arm/include/debug/brcmstb.S b/arch/arm/include/debug/brcmstb.S new file mode 100644 index 000000000000..9113d7b33ae0 --- /dev/null +++ b/arch/arm/include/debug/brcmstb.S | |||
| @@ -0,0 +1,145 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2016 Broadcom | ||
| 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 | #include <linux/serial_reg.h> | ||
| 14 | |||
| 15 | /* Physical register offset and virtual register offset */ | ||
| 16 | #define REG_PHYS_BASE 0xf0000000 | ||
| 17 | #define REG_VIRT_BASE 0xfc000000 | ||
| 18 | #define REG_PHYS_ADDR(x) ((x) + REG_PHYS_BASE) | ||
| 19 | |||
| 20 | /* Product id can be read from here */ | ||
| 21 | #define SUN_TOP_CTRL_BASE REG_PHYS_ADDR(0x404000) | ||
| 22 | |||
| 23 | #define UARTA_3390 REG_PHYS_ADDR(0x40a900) | ||
| 24 | #define UARTA_7250 REG_PHYS_ADDR(0x40b400) | ||
| 25 | #define UARTA_7268 REG_PHYS_ADDR(0x40c000) | ||
| 26 | #define UARTA_7271 UARTA_7268 | ||
| 27 | #define UARTA_7364 REG_PHYS_ADDR(0x40b000) | ||
| 28 | #define UARTA_7366 UARTA_7364 | ||
| 29 | #define UARTA_74371 REG_PHYS_ADDR(0x406b00) | ||
| 30 | #define UARTA_7439 REG_PHYS_ADDR(0x40a900) | ||
| 31 | #define UARTA_7445 REG_PHYS_ADDR(0x40ab00) | ||
| 32 | |||
| 33 | #define UART_SHIFT 2 | ||
| 34 | |||
| 35 | #define checkuart(rp, rv, family_id, family) \ | ||
| 36 | /* Load family id */ \ | ||
| 37 | ldr rp, =family_id ; \ | ||
| 38 | /* Compare SUN_TOP_CTRL value against it */ \ | ||
| 39 | cmp rp, rv ; \ | ||
| 40 | /* Passed test, load address */ \ | ||
| 41 | ldreq rp, =UARTA_##family ; \ | ||
| 42 | /* Jump to save UART address */ \ | ||
| 43 | beq 91f | ||
| 44 | |||
| 45 | .macro addruart, rp, rv, tmp | ||
| 46 | adr \rp, 99f @ actual addr of 99f | ||
| 47 | ldr \rv, [\rp] @ linked addr is stored there | ||
| 48 | sub \rv, \rv, \rp @ offset between the two | ||
| 49 | ldr \rp, [\rp, #4] @ linked brcmstb_uart_config | ||
| 50 | sub \tmp, \rp, \rv @ actual brcmstb_uart_config | ||
| 51 | ldr \rp, [\tmp] @ Load brcmstb_uart_config | ||
| 52 | cmp \rp, #1 @ needs initialization? | ||
| 53 | bne 100f @ no; go load the addresses | ||
| 54 | mov \rv, #0 @ yes; record init is done | ||
| 55 | str \rv, [\tmp] | ||
| 56 | |||
| 57 | /* Check SUN_TOP_CTRL base */ | ||
| 58 | ldr \rp, =SUN_TOP_CTRL_BASE @ load SUN_TOP_CTRL PA | ||
| 59 | ldr \rv, [\rp, #0] @ get register contents | ||
| 60 | and \rv, \rv, #0xffffff00 @ strip revision bits [7:0] | ||
| 61 | |||
| 62 | /* Chip specific detection starts here */ | ||
| 63 | 20: checkuart(\rp, \rv, 0x33900000, 3390) | ||
| 64 | 21: checkuart(\rp, \rv, 0x72500000, 7250) | ||
| 65 | 22: checkuart(\rp, \rv, 0x72680000, 7268) | ||
| 66 | 23: checkuart(\rp, \rv, 0x72710000, 7271) | ||
| 67 | 24: checkuart(\rp, \rv, 0x73640000, 7364) | ||
| 68 | 25: checkuart(\rp, \rv, 0x73660000, 7366) | ||
| 69 | 26: checkuart(\rp, \rv, 0x07437100, 74371) | ||
| 70 | 27: checkuart(\rp, \rv, 0x74390000, 7439) | ||
| 71 | 28: checkuart(\rp, \rv, 0x74450000, 7445) | ||
| 72 | |||
| 73 | /* No valid UART found */ | ||
| 74 | 90: mov \rp, #0 | ||
| 75 | /* fall through */ | ||
| 76 | |||
| 77 | /* Record whichever UART we chose */ | ||
| 78 | 91: str \rp, [\tmp, #4] @ Store in brcmstb_uart_phys | ||
| 79 | cmp \rp, #0 @ Valid UART address? | ||
| 80 | bne 92f @ Yes, go process it | ||
| 81 | str \rp, [\tmp, #8] @ Store 0 in brcmstb_uart_virt | ||
| 82 | b 100f @ Done | ||
| 83 | 92: and \rv, \rp, #0xffffff @ offset within 16MB section | ||
| 84 | add \rv, \rv, #REG_VIRT_BASE | ||
| 85 | str \rv, [\tmp, #8] @ Store in brcmstb_uart_virt | ||
| 86 | b 100f | ||
| 87 | |||
| 88 | .align | ||
| 89 | 99: .word . | ||
| 90 | .word brcmstb_uart_config | ||
| 91 | .ltorg | ||
| 92 | |||
| 93 | /* Load previously selected UART address */ | ||
| 94 | 100: ldr \rp, [\tmp, #4] @ Load brcmstb_uart_phys | ||
| 95 | ldr \rv, [\tmp, #8] @ Load brcmstb_uart_virt | ||
| 96 | .endm | ||
| 97 | |||
| 98 | .macro store, rd, rx:vararg | ||
| 99 | str \rd, \rx | ||
| 100 | .endm | ||
| 101 | |||
| 102 | .macro load, rd, rx:vararg | ||
| 103 | ldr \rd, \rx | ||
| 104 | .endm | ||
| 105 | |||
| 106 | .macro senduart,rd,rx | ||
| 107 | store \rd, [\rx, #UART_TX << UART_SHIFT] | ||
| 108 | .endm | ||
| 109 | |||
| 110 | .macro busyuart,rd,rx | ||
| 111 | 1002: load \rd, [\rx, #UART_LSR << UART_SHIFT] | ||
| 112 | and \rd, \rd, #UART_LSR_TEMT | UART_LSR_THRE | ||
| 113 | teq \rd, #UART_LSR_TEMT | UART_LSR_THRE | ||
| 114 | bne 1002b | ||
| 115 | .endm | ||
| 116 | |||
| 117 | .macro waituart,rd,rx | ||
| 118 | .endm | ||
| 119 | |||
| 120 | /* | ||
| 121 | * Storage for the state maintained by the macros above. | ||
| 122 | * | ||
| 123 | * In the kernel proper, this data is located in arch/arm/mach-bcm/brcmstb.c. | ||
| 124 | * That's because this header is included from multiple files, and we only | ||
| 125 | * want a single copy of the data. In particular, the UART probing code above | ||
| 126 | * assumes it's running using physical addresses. This is true when this file | ||
| 127 | * is included from head.o, but not when included from debug.o. So we need | ||
| 128 | * to share the probe results between the two copies, rather than having | ||
| 129 | * to re-run the probing again later. | ||
| 130 | * | ||
| 131 | * In the decompressor, we put the symbol/storage right here, since common.c | ||
| 132 | * isn't included in the decompressor build. This symbol gets put in .text | ||
| 133 | * even though it's really data, since .data is discarded from the | ||
| 134 | * decompressor. Luckily, .text is writeable in the decompressor, unless | ||
| 135 | * CONFIG_ZBOOT_ROM. That dependency is handled in arch/arm/Kconfig.debug. | ||
| 136 | */ | ||
| 137 | #if defined(ZIMAGE) | ||
| 138 | brcmstb_uart_config: | ||
| 139 | /* Debug UART initialization required */ | ||
| 140 | .word 1 | ||
| 141 | /* Debug UART physical address */ | ||
| 142 | .word 0 | ||
| 143 | /* Debug UART virtual address */ | ||
| 144 | .word 0 | ||
| 145 | #endif | ||
diff --git a/arch/arm/mach-bcm/Kconfig b/arch/arm/mach-bcm/Kconfig index 7bf3ae76f782..a0e66d8200c5 100644 --- a/arch/arm/mach-bcm/Kconfig +++ b/arch/arm/mach-bcm/Kconfig | |||
| @@ -158,6 +158,20 @@ config ARCH_BCM2835 | |||
| 158 | This enables support for the Broadcom BCM2835 and BCM2836 SoCs. | 158 | This enables support for the Broadcom BCM2835 and BCM2836 SoCs. |
| 159 | This SoC is used in the Raspberry Pi and Roku 2 devices. | 159 | This SoC is used in the Raspberry Pi and Roku 2 devices. |
| 160 | 160 | ||
| 161 | config ARCH_BCM_53573 | ||
| 162 | bool "Broadcom BCM53573 SoC series support" | ||
| 163 | depends on ARCH_MULTI_V7 | ||
| 164 | select ARCH_BCM_IPROC | ||
| 165 | select HAVE_ARM_ARCH_TIMER | ||
| 166 | help | ||
| 167 | BCM53573 series is set of SoCs using ARM Cortex-A7 CPUs with wireless | ||
| 168 | embedded in the chipset. | ||
| 169 | This SoC line is mostly used in home routers and is some cheaper | ||
| 170 | alternative for Northstar family. | ||
| 171 | |||
| 172 | The base chip is BCM53573 and there are some packaging modifications | ||
| 173 | like BCM47189 and BCM47452. | ||
| 174 | |||
| 161 | config ARCH_BCM_63XX | 175 | config ARCH_BCM_63XX |
| 162 | bool "Broadcom BCM63xx DSL SoC" | 176 | bool "Broadcom BCM63xx DSL SoC" |
| 163 | depends on ARCH_MULTI_V7 | 177 | depends on ARCH_MULTI_V7 |
diff --git a/arch/arm/mach-bcm/brcmstb.c b/arch/arm/mach-bcm/brcmstb.c index 99a67cfb7c0d..07e3a86c6466 100644 --- a/arch/arm/mach-bcm/brcmstb.c +++ b/arch/arm/mach-bcm/brcmstb.c | |||
| @@ -19,6 +19,22 @@ | |||
| 19 | #include <asm/mach-types.h> | 19 | #include <asm/mach-types.h> |
| 20 | #include <asm/mach/arch.h> | 20 | #include <asm/mach/arch.h> |
| 21 | 21 | ||
| 22 | /* | ||
| 23 | * Storage for debug-macro.S's state. | ||
| 24 | * | ||
| 25 | * This must be in .data not .bss so that it gets initialized each time the | ||
| 26 | * kernel is loaded. The data is declared here rather than debug-macro.S so | ||
| 27 | * that multiple inclusions of debug-macro.S point at the same data. | ||
| 28 | */ | ||
| 29 | u32 brcmstb_uart_config[3] = { | ||
| 30 | /* Debug UART initialization required */ | ||
| 31 | 1, | ||
| 32 | /* Debug UART physical address */ | ||
| 33 | 0, | ||
| 34 | /* Debug UART virtual address */ | ||
| 35 | 0, | ||
| 36 | }; | ||
| 37 | |||
| 22 | static void __init brcmstb_init_irq(void) | 38 | static void __init brcmstb_init_irq(void) |
| 23 | { | 39 | { |
| 24 | irqchip_init(); | 40 | irqchip_init(); |
diff --git a/arch/arm/mach-davinci/da850.c b/arch/arm/mach-davinci/da850.c index 0d046accb35b..ed3d0e9f72ac 100644 --- a/arch/arm/mach-davinci/da850.c +++ b/arch/arm/mach-davinci/da850.c | |||
| @@ -501,6 +501,7 @@ static struct clk_lookup da850_clks[] = { | |||
| 501 | CLK("da8xx_lcdc.0", "fck", &lcdc_clk), | 501 | CLK("da8xx_lcdc.0", "fck", &lcdc_clk), |
| 502 | CLK("da830-mmc.0", NULL, &mmcsd0_clk), | 502 | CLK("da830-mmc.0", NULL, &mmcsd0_clk), |
| 503 | CLK("da830-mmc.1", NULL, &mmcsd1_clk), | 503 | CLK("da830-mmc.1", NULL, &mmcsd1_clk), |
| 504 | CLK("ti-aemif", NULL, &aemif_clk), | ||
| 504 | CLK(NULL, "aemif", &aemif_clk), | 505 | CLK(NULL, "aemif", &aemif_clk), |
| 505 | CLK(NULL, "usb11", &usb11_clk), | 506 | CLK(NULL, "usb11", &usb11_clk), |
| 506 | CLK(NULL, "usb20", &usb20_clk), | 507 | CLK(NULL, "usb20", &usb20_clk), |
diff --git a/arch/arm/mach-davinci/da8xx-dt.c b/arch/arm/mach-davinci/da8xx-dt.c index 754f478110b4..35c0d65fe7f1 100644 --- a/arch/arm/mach-davinci/da8xx-dt.c +++ b/arch/arm/mach-davinci/da8xx-dt.c | |||
| @@ -37,6 +37,7 @@ static struct of_dev_auxdata da850_auxdata_lookup[] __initdata = { | |||
| 37 | OF_DEV_AUXDATA("ti,davinci-dm6467-emac", 0x01e20000, "davinci_emac.1", | 37 | OF_DEV_AUXDATA("ti,davinci-dm6467-emac", 0x01e20000, "davinci_emac.1", |
| 38 | NULL), | 38 | NULL), |
| 39 | OF_DEV_AUXDATA("ti,da830-mcasp-audio", 0x01d00000, "davinci-mcasp.0", NULL), | 39 | OF_DEV_AUXDATA("ti,da830-mcasp-audio", 0x01d00000, "davinci-mcasp.0", NULL), |
| 40 | OF_DEV_AUXDATA("ti,da850-aemif", 0x68000000, "ti-aemif", NULL), | ||
| 40 | {} | 41 | {} |
| 41 | }; | 42 | }; |
| 42 | 43 | ||
diff --git a/arch/arm/mach-exynos/Kconfig b/arch/arm/mach-exynos/Kconfig index 18f0c856f290..0bb63b8d21e7 100644 --- a/arch/arm/mach-exynos/Kconfig +++ b/arch/arm/mach-exynos/Kconfig | |||
| @@ -12,6 +12,7 @@ menuconfig ARCH_EXYNOS | |||
| 12 | depends on ARCH_MULTI_V7 | 12 | depends on ARCH_MULTI_V7 |
| 13 | select ARCH_HAS_BANDGAP | 13 | select ARCH_HAS_BANDGAP |
| 14 | select ARCH_HAS_HOLES_MEMORYMODEL | 14 | select ARCH_HAS_HOLES_MEMORYMODEL |
| 15 | select ARCH_SUPPORTS_BIG_ENDIAN | ||
| 15 | select ARM_AMBA | 16 | select ARM_AMBA |
| 16 | select ARM_GIC | 17 | select ARM_GIC |
| 17 | select COMMON_CLK_SAMSUNG | 18 | select COMMON_CLK_SAMSUNG |
diff --git a/arch/arm/mach-exynos/exynos.c b/arch/arm/mach-exynos/exynos.c index acabf0bffc5d..757fc11de30d 100644 --- a/arch/arm/mach-exynos/exynos.c +++ b/arch/arm/mach-exynos/exynos.c | |||
| @@ -30,25 +30,10 @@ | |||
| 30 | 30 | ||
| 31 | static struct map_desc exynos4_iodesc[] __initdata = { | 31 | static struct map_desc exynos4_iodesc[] __initdata = { |
| 32 | { | 32 | { |
| 33 | .virtual = (unsigned long)S5P_VA_CMU, | ||
| 34 | .pfn = __phys_to_pfn(EXYNOS4_PA_CMU), | ||
| 35 | .length = SZ_128K, | ||
| 36 | .type = MT_DEVICE, | ||
| 37 | }, { | ||
| 38 | .virtual = (unsigned long)S5P_VA_COREPERI_BASE, | 33 | .virtual = (unsigned long)S5P_VA_COREPERI_BASE, |
| 39 | .pfn = __phys_to_pfn(EXYNOS4_PA_COREPERI), | 34 | .pfn = __phys_to_pfn(EXYNOS4_PA_COREPERI), |
| 40 | .length = SZ_8K, | 35 | .length = SZ_8K, |
| 41 | .type = MT_DEVICE, | 36 | .type = MT_DEVICE, |
| 42 | }, { | ||
| 43 | .virtual = (unsigned long)S5P_VA_DMC0, | ||
| 44 | .pfn = __phys_to_pfn(EXYNOS4_PA_DMC0), | ||
| 45 | .length = SZ_64K, | ||
| 46 | .type = MT_DEVICE, | ||
| 47 | }, { | ||
| 48 | .virtual = (unsigned long)S5P_VA_DMC1, | ||
| 49 | .pfn = __phys_to_pfn(EXYNOS4_PA_DMC1), | ||
| 50 | .length = SZ_64K, | ||
| 51 | .type = MT_DEVICE, | ||
| 52 | }, | 37 | }, |
| 53 | }; | 38 | }; |
| 54 | 39 | ||
diff --git a/arch/arm/mach-exynos/include/mach/map.h b/arch/arm/mach-exynos/include/mach/map.h index c48ba4fbdfd2..5fb0040cc6d3 100644 --- a/arch/arm/mach-exynos/include/mach/map.h +++ b/arch/arm/mach-exynos/include/mach/map.h | |||
| @@ -18,11 +18,6 @@ | |||
| 18 | 18 | ||
| 19 | #define EXYNOS_PA_CHIPID 0x10000000 | 19 | #define EXYNOS_PA_CHIPID 0x10000000 |
| 20 | 20 | ||
| 21 | #define EXYNOS4_PA_CMU 0x10030000 | ||
| 22 | |||
| 23 | #define EXYNOS4_PA_DMC0 0x10400000 | ||
| 24 | #define EXYNOS4_PA_DMC1 0x10410000 | ||
| 25 | |||
| 26 | #define EXYNOS4_PA_COREPERI 0x10500000 | 21 | #define EXYNOS4_PA_COREPERI 0x10500000 |
| 27 | 22 | ||
| 28 | #endif /* __ASM_ARCH_MAP_H */ | 23 | #endif /* __ASM_ARCH_MAP_H */ |
diff --git a/arch/arm/mach-imx/Makefile b/arch/arm/mach-imx/Makefile index 2636adfcb999..cab128913e72 100644 --- a/arch/arm/mach-imx/Makefile +++ b/arch/arm/mach-imx/Makefile | |||
| @@ -27,6 +27,7 @@ obj-$(CONFIG_SOC_IMX5) += cpuidle-imx5.o | |||
| 27 | obj-$(CONFIG_SOC_IMX6Q) += cpuidle-imx6q.o | 27 | obj-$(CONFIG_SOC_IMX6Q) += cpuidle-imx6q.o |
| 28 | obj-$(CONFIG_SOC_IMX6SL) += cpuidle-imx6sl.o | 28 | obj-$(CONFIG_SOC_IMX6SL) += cpuidle-imx6sl.o |
| 29 | obj-$(CONFIG_SOC_IMX6SX) += cpuidle-imx6sx.o | 29 | obj-$(CONFIG_SOC_IMX6SX) += cpuidle-imx6sx.o |
| 30 | obj-$(CONFIG_SOC_IMX6UL) += cpuidle-imx6sx.o | ||
| 30 | endif | 31 | endif |
| 31 | 32 | ||
| 32 | ifdef CONFIG_SND_IMX_SOC | 33 | ifdef CONFIG_SND_IMX_SOC |
diff --git a/arch/arm/mach-imx/common.h b/arch/arm/mach-imx/common.h index bcca48138933..c4436d9c52ff 100644 --- a/arch/arm/mach-imx/common.h +++ b/arch/arm/mach-imx/common.h | |||
| @@ -104,7 +104,7 @@ void imx_anatop_init(void); | |||
| 104 | void imx_anatop_pre_suspend(void); | 104 | void imx_anatop_pre_suspend(void); |
| 105 | void imx_anatop_post_resume(void); | 105 | void imx_anatop_post_resume(void); |
| 106 | int imx6_set_lpm(enum mxc_cpu_pwr_mode mode); | 106 | int imx6_set_lpm(enum mxc_cpu_pwr_mode mode); |
| 107 | void imx6q_set_int_mem_clk_lpm(bool enable); | 107 | void imx6_set_int_mem_clk_lpm(bool enable); |
| 108 | void imx6sl_set_wait_clk(bool enter); | 108 | void imx6sl_set_wait_clk(bool enter); |
| 109 | int imx_mmdc_get_ddr_type(void); | 109 | int imx_mmdc_get_ddr_type(void); |
| 110 | 110 | ||
diff --git a/arch/arm/mach-imx/cpuidle-imx6q.c b/arch/arm/mach-imx/cpuidle-imx6q.c index db0f48c4b17e..bfeb25aaf9a2 100644 --- a/arch/arm/mach-imx/cpuidle-imx6q.c +++ b/arch/arm/mach-imx/cpuidle-imx6q.c | |||
| @@ -85,7 +85,7 @@ EXPORT_SYMBOL_GPL(imx6q_cpuidle_fec_irqs_unused); | |||
| 85 | int __init imx6q_cpuidle_init(void) | 85 | int __init imx6q_cpuidle_init(void) |
| 86 | { | 86 | { |
| 87 | /* Set INT_MEM_CLK_LPM bit to get a reliable WAIT mode support */ | 87 | /* Set INT_MEM_CLK_LPM bit to get a reliable WAIT mode support */ |
| 88 | imx6q_set_int_mem_clk_lpm(true); | 88 | imx6_set_int_mem_clk_lpm(true); |
| 89 | 89 | ||
| 90 | return cpuidle_register(&imx6q_cpuidle_driver, NULL); | 90 | return cpuidle_register(&imx6q_cpuidle_driver, NULL); |
| 91 | } | 91 | } |
diff --git a/arch/arm/mach-imx/cpuidle-imx6sx.c b/arch/arm/mach-imx/cpuidle-imx6sx.c index 3c6672b3796b..c5a5c3a70ab1 100644 --- a/arch/arm/mach-imx/cpuidle-imx6sx.c +++ b/arch/arm/mach-imx/cpuidle-imx6sx.c | |||
| @@ -9,6 +9,7 @@ | |||
| 9 | #include <linux/cpuidle.h> | 9 | #include <linux/cpuidle.h> |
| 10 | #include <linux/cpu_pm.h> | 10 | #include <linux/cpu_pm.h> |
| 11 | #include <linux/module.h> | 11 | #include <linux/module.h> |
| 12 | #include <asm/cacheflush.h> | ||
| 12 | #include <asm/cpuidle.h> | 13 | #include <asm/cpuidle.h> |
| 13 | #include <asm/suspend.h> | 14 | #include <asm/suspend.h> |
| 14 | 15 | ||
| @@ -17,6 +18,15 @@ | |||
| 17 | 18 | ||
| 18 | static int imx6sx_idle_finish(unsigned long val) | 19 | static int imx6sx_idle_finish(unsigned long val) |
| 19 | { | 20 | { |
| 21 | /* | ||
| 22 | * for Cortex-A7 which has an internal L2 | ||
| 23 | * cache, need to flush it before powering | ||
| 24 | * down ARM platform, since flushing L1 cache | ||
| 25 | * here again has very small overhead, compared | ||
| 26 | * to adding conditional code for L2 cache type, | ||
| 27 | * just call flush_cache_all() is fine. | ||
| 28 | */ | ||
| 29 | flush_cache_all(); | ||
| 20 | cpu_do_idle(); | 30 | cpu_do_idle(); |
| 21 | 31 | ||
| 22 | return 0; | 32 | return 0; |
| @@ -90,6 +100,7 @@ static struct cpuidle_driver imx6sx_cpuidle_driver = { | |||
| 90 | 100 | ||
| 91 | int __init imx6sx_cpuidle_init(void) | 101 | int __init imx6sx_cpuidle_init(void) |
| 92 | { | 102 | { |
| 103 | imx6_set_int_mem_clk_lpm(true); | ||
| 93 | imx6_enable_rbc(false); | 104 | imx6_enable_rbc(false); |
| 94 | /* | 105 | /* |
| 95 | * set ARM power up/down timing to the fastest, | 106 | * set ARM power up/down timing to the fastest, |
diff --git a/arch/arm/mach-imx/mach-armadillo5x0.c b/arch/arm/mach-imx/mach-armadillo5x0.c index eaee47a2fcc0..17a97ba2cecf 100644 --- a/arch/arm/mach-imx/mach-armadillo5x0.c +++ b/arch/arm/mach-imx/mach-armadillo5x0.c | |||
| @@ -493,24 +493,12 @@ static void __init armadillo5x0_init(void) | |||
| 493 | 493 | ||
| 494 | regulator_register_fixed(0, dummy_supplies, ARRAY_SIZE(dummy_supplies)); | 494 | regulator_register_fixed(0, dummy_supplies, ARRAY_SIZE(dummy_supplies)); |
| 495 | 495 | ||
| 496 | armadillo5x0_smc911x_resources[1].start = | ||
| 497 | gpio_to_irq(IOMUX_TO_GPIO(MX31_PIN_GPIO1_0)); | ||
| 498 | armadillo5x0_smc911x_resources[1].end = | ||
| 499 | gpio_to_irq(IOMUX_TO_GPIO(MX31_PIN_GPIO1_0)); | ||
| 500 | platform_add_devices(devices, ARRAY_SIZE(devices)); | ||
| 501 | imx_add_gpio_keys(&armadillo5x0_button_data); | ||
| 502 | imx31_add_imx_i2c1(NULL); | 496 | imx31_add_imx_i2c1(NULL); |
| 503 | 497 | ||
| 504 | /* Register UART */ | 498 | /* Register UART */ |
| 505 | imx31_add_imx_uart0(&uart_pdata); | 499 | imx31_add_imx_uart0(&uart_pdata); |
| 506 | imx31_add_imx_uart1(&uart_pdata); | 500 | imx31_add_imx_uart1(&uart_pdata); |
| 507 | 501 | ||
| 508 | /* SMSC9118 IRQ pin */ | ||
| 509 | gpio_direction_input(MX31_PIN_GPIO1_0); | ||
| 510 | |||
| 511 | /* Register SDHC */ | ||
| 512 | imx31_add_mxc_mmc(0, &sdhc_pdata); | ||
| 513 | |||
| 514 | /* Register FB */ | 502 | /* Register FB */ |
| 515 | imx31_add_ipu_core(); | 503 | imx31_add_ipu_core(); |
| 516 | imx31_add_mx3_sdc_fb(&mx3fb_pdata); | 504 | imx31_add_mx3_sdc_fb(&mx3fb_pdata); |
| @@ -527,21 +515,39 @@ static void __init armadillo5x0_init(void) | |||
| 527 | /* set NAND page size to 2k if not configured via boot mode pins */ | 515 | /* set NAND page size to 2k if not configured via boot mode pins */ |
| 528 | imx_writel(imx_readl(mx3_ccm_base + MXC_CCM_RCSR) | (1 << 30), | 516 | imx_writel(imx_readl(mx3_ccm_base + MXC_CCM_RCSR) | (1 << 30), |
| 529 | mx3_ccm_base + MXC_CCM_RCSR); | 517 | mx3_ccm_base + MXC_CCM_RCSR); |
| 518 | } | ||
| 519 | |||
| 520 | static void __init armadillo5x0_late(void) | ||
| 521 | { | ||
| 522 | armadillo5x0_smc911x_resources[1].start = | ||
| 523 | gpio_to_irq(IOMUX_TO_GPIO(MX31_PIN_GPIO1_0)); | ||
| 524 | armadillo5x0_smc911x_resources[1].end = | ||
| 525 | gpio_to_irq(IOMUX_TO_GPIO(MX31_PIN_GPIO1_0)); | ||
| 526 | platform_add_devices(devices, ARRAY_SIZE(devices)); | ||
| 527 | |||
| 528 | imx_add_gpio_keys(&armadillo5x0_button_data); | ||
| 529 | |||
| 530 | /* SMSC9118 IRQ pin */ | ||
| 531 | gpio_direction_input(MX31_PIN_GPIO1_0); | ||
| 532 | |||
| 533 | /* Register SDHC */ | ||
| 534 | imx31_add_mxc_mmc(0, &sdhc_pdata); | ||
| 530 | 535 | ||
| 531 | /* RTC */ | 536 | /* RTC */ |
| 532 | /* Get RTC IRQ and register the chip */ | 537 | /* Get RTC IRQ and register the chip */ |
| 533 | if (gpio_request(ARMADILLO5X0_RTC_GPIO, "rtc") == 0) { | 538 | if (!gpio_request(ARMADILLO5X0_RTC_GPIO, "rtc")) { |
| 534 | if (gpio_direction_input(ARMADILLO5X0_RTC_GPIO) == 0) | 539 | if (!gpio_direction_input(ARMADILLO5X0_RTC_GPIO)) |
| 535 | armadillo5x0_i2c_rtc.irq = gpio_to_irq(ARMADILLO5X0_RTC_GPIO); | 540 | armadillo5x0_i2c_rtc.irq = |
| 541 | gpio_to_irq(ARMADILLO5X0_RTC_GPIO); | ||
| 536 | else | 542 | else |
| 537 | gpio_free(ARMADILLO5X0_RTC_GPIO); | 543 | gpio_free(ARMADILLO5X0_RTC_GPIO); |
| 538 | } | 544 | } |
| 545 | |||
| 539 | if (armadillo5x0_i2c_rtc.irq == 0) | 546 | if (armadillo5x0_i2c_rtc.irq == 0) |
| 540 | pr_warn("armadillo5x0_init: failed to get RTC IRQ\n"); | 547 | pr_warn("armadillo5x0_init: failed to get RTC IRQ\n"); |
| 541 | i2c_register_board_info(1, &armadillo5x0_i2c_rtc, 1); | 548 | i2c_register_board_info(1, &armadillo5x0_i2c_rtc, 1); |
| 542 | 549 | ||
| 543 | /* USB */ | 550 | /* USB */ |
| 544 | |||
| 545 | usbotg_pdata.otg = imx_otg_ulpi_create(ULPI_OTG_DRVVBUS | | 551 | usbotg_pdata.otg = imx_otg_ulpi_create(ULPI_OTG_DRVVBUS | |
| 546 | ULPI_OTG_DRVVBUS_EXT); | 552 | ULPI_OTG_DRVVBUS_EXT); |
| 547 | if (usbotg_pdata.otg) | 553 | if (usbotg_pdata.otg) |
| @@ -565,5 +571,6 @@ MACHINE_START(ARMADILLO5X0, "Armadillo-500") | |||
| 565 | .init_irq = mx31_init_irq, | 571 | .init_irq = mx31_init_irq, |
| 566 | .init_time = armadillo5x0_timer_init, | 572 | .init_time = armadillo5x0_timer_init, |
| 567 | .init_machine = armadillo5x0_init, | 573 | .init_machine = armadillo5x0_init, |
| 574 | .init_late = armadillo5x0_late, | ||
| 568 | .restart = mxc_restart, | 575 | .restart = mxc_restart, |
| 569 | MACHINE_END | 576 | MACHINE_END |
diff --git a/arch/arm/mach-imx/mach-imx27_visstrim_m10.c b/arch/arm/mach-imx/mach-imx27_visstrim_m10.c index ede2bdbb5dd5..dd75a4756761 100644 --- a/arch/arm/mach-imx/mach-imx27_visstrim_m10.c +++ b/arch/arm/mach-imx/mach-imx27_visstrim_m10.c | |||
| @@ -540,7 +540,6 @@ static void __init visstrim_m10_revision(void) | |||
| 540 | static void __init visstrim_m10_board_init(void) | 540 | static void __init visstrim_m10_board_init(void) |
| 541 | { | 541 | { |
| 542 | int ret; | 542 | int ret; |
| 543 | int mo_version; | ||
| 544 | 543 | ||
| 545 | imx27_soc_init(); | 544 | imx27_soc_init(); |
| 546 | visstrim_m10_revision(); | 545 | visstrim_m10_revision(); |
| @@ -550,11 +549,6 @@ static void __init visstrim_m10_board_init(void) | |||
| 550 | if (ret) | 549 | if (ret) |
| 551 | pr_err("Failed to setup pins (%d)\n", ret); | 550 | pr_err("Failed to setup pins (%d)\n", ret); |
| 552 | 551 | ||
| 553 | ret = gpio_request_array(visstrim_m10_gpios, | ||
| 554 | ARRAY_SIZE(visstrim_m10_gpios)); | ||
| 555 | if (ret) | ||
| 556 | pr_err("Failed to request gpios (%d)\n", ret); | ||
| 557 | |||
| 558 | imx27_add_imx_ssi(0, &visstrim_m10_ssi_pdata); | 552 | imx27_add_imx_ssi(0, &visstrim_m10_ssi_pdata); |
| 559 | imx27_add_imx_uart0(&uart_pdata); | 553 | imx27_add_imx_uart0(&uart_pdata); |
| 560 | 554 | ||
| @@ -566,12 +560,26 @@ static void __init visstrim_m10_board_init(void) | |||
| 566 | imx27_add_mxc_mmc(0, &visstrim_m10_sdhc_pdata); | 560 | imx27_add_mxc_mmc(0, &visstrim_m10_sdhc_pdata); |
| 567 | imx27_add_mxc_ehci_otg(&visstrim_m10_usbotg_pdata); | 561 | imx27_add_mxc_ehci_otg(&visstrim_m10_usbotg_pdata); |
| 568 | imx27_add_fec(NULL); | 562 | imx27_add_fec(NULL); |
| 569 | imx_add_gpio_keys(&visstrim_gpio_keys_platform_data); | 563 | |
| 570 | platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); | 564 | platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); |
| 565 | } | ||
| 566 | |||
| 567 | static void __init visstrim_m10_late_init(void) | ||
| 568 | { | ||
| 569 | int mo_version, ret; | ||
| 570 | |||
| 571 | ret = gpio_request_array(visstrim_m10_gpios, | ||
| 572 | ARRAY_SIZE(visstrim_m10_gpios)); | ||
| 573 | if (ret) | ||
| 574 | pr_err("Failed to request gpios (%d)\n", ret); | ||
| 575 | |||
| 576 | imx_add_gpio_keys(&visstrim_gpio_keys_platform_data); | ||
| 577 | |||
| 571 | imx_add_platform_device("mx27vis", 0, NULL, 0, &snd_mx27vis_pdata, | 578 | imx_add_platform_device("mx27vis", 0, NULL, 0, &snd_mx27vis_pdata, |
| 572 | sizeof(snd_mx27vis_pdata)); | 579 | sizeof(snd_mx27vis_pdata)); |
| 573 | platform_device_register_resndata(NULL, "soc-camera-pdrv", 0, NULL, 0, | 580 | platform_device_register_resndata(NULL, "soc-camera-pdrv", 0, NULL, 0, |
| 574 | &iclink_tvp5150, sizeof(iclink_tvp5150)); | 581 | &iclink_tvp5150, sizeof(iclink_tvp5150)); |
| 582 | |||
| 575 | gpio_led_register_device(0, &visstrim_m10_led_data); | 583 | gpio_led_register_device(0, &visstrim_m10_led_data); |
| 576 | 584 | ||
| 577 | /* Use mother board version to decide what video devices we shall use */ | 585 | /* Use mother board version to decide what video devices we shall use */ |
| @@ -591,6 +599,7 @@ static void __init visstrim_m10_board_init(void) | |||
| 591 | visstrim_deinterlace_init(); | 599 | visstrim_deinterlace_init(); |
| 592 | visstrim_analog_camera_init(); | 600 | visstrim_analog_camera_init(); |
| 593 | } | 601 | } |
| 602 | |||
| 594 | visstrim_coda_init(); | 603 | visstrim_coda_init(); |
| 595 | } | 604 | } |
| 596 | 605 | ||
| @@ -607,5 +616,6 @@ MACHINE_START(IMX27_VISSTRIM_M10, "Vista Silicon Visstrim_M10") | |||
| 607 | .init_irq = mx27_init_irq, | 616 | .init_irq = mx27_init_irq, |
| 608 | .init_time = visstrim_m10_timer_init, | 617 | .init_time = visstrim_m10_timer_init, |
| 609 | .init_machine = visstrim_m10_board_init, | 618 | .init_machine = visstrim_m10_board_init, |
| 619 | .init_late = visstrim_m10_late_init, | ||
| 610 | .restart = mxc_restart, | 620 | .restart = mxc_restart, |
| 611 | MACHINE_END | 621 | MACHINE_END |
diff --git a/arch/arm/mach-imx/mach-imx6ul.c b/arch/arm/mach-imx/mach-imx6ul.c index 6bb7d9cf1e38..58a2b88233e6 100644 --- a/arch/arm/mach-imx/mach-imx6ul.c +++ b/arch/arm/mach-imx/mach-imx6ul.c | |||
| @@ -16,6 +16,7 @@ | |||
| 16 | #include <asm/mach/map.h> | 16 | #include <asm/mach/map.h> |
| 17 | 17 | ||
| 18 | #include "common.h" | 18 | #include "common.h" |
| 19 | #include "cpuidle.h" | ||
| 19 | 20 | ||
| 20 | static void __init imx6ul_enet_clk_init(void) | 21 | static void __init imx6ul_enet_clk_init(void) |
| 21 | { | 22 | { |
| @@ -80,6 +81,8 @@ static void __init imx6ul_init_irq(void) | |||
| 80 | 81 | ||
| 81 | static void __init imx6ul_init_late(void) | 82 | static void __init imx6ul_init_late(void) |
| 82 | { | 83 | { |
| 84 | imx6sx_cpuidle_init(); | ||
| 85 | |||
| 83 | if (IS_ENABLED(CONFIG_ARM_IMX6Q_CPUFREQ)) | 86 | if (IS_ENABLED(CONFIG_ARM_IMX6Q_CPUFREQ)) |
| 84 | platform_device_register_simple("imx6q-cpufreq", -1, NULL, 0); | 87 | platform_device_register_simple("imx6q-cpufreq", -1, NULL, 0); |
| 85 | } | 88 | } |
diff --git a/arch/arm/mach-imx/mach-kzm_arm11_01.c b/arch/arm/mach-imx/mach-kzm_arm11_01.c index e277d9c230e5..ab847e2c822a 100644 --- a/arch/arm/mach-imx/mach-kzm_arm11_01.c +++ b/arch/arm/mach-imx/mach-kzm_arm11_01.c | |||
| @@ -245,13 +245,17 @@ static void __init kzm_board_init(void) | |||
| 245 | 245 | ||
| 246 | mxc_iomux_setup_multiple_pins(kzm_pins, | 246 | mxc_iomux_setup_multiple_pins(kzm_pins, |
| 247 | ARRAY_SIZE(kzm_pins), "kzm"); | 247 | ARRAY_SIZE(kzm_pins), "kzm"); |
| 248 | kzm_init_ext_uart(); | ||
| 249 | kzm_init_smsc9118(); | ||
| 250 | kzm_init_imx_uart(); | 248 | kzm_init_imx_uart(); |
| 251 | 249 | ||
| 252 | pr_info("Clock input source is 26MHz\n"); | 250 | pr_info("Clock input source is 26MHz\n"); |
| 253 | } | 251 | } |
| 254 | 252 | ||
| 253 | static void __init kzm_late_init(void) | ||
| 254 | { | ||
| 255 | kzm_init_ext_uart(); | ||
| 256 | kzm_init_smsc9118(); | ||
| 257 | } | ||
| 258 | |||
| 255 | /* | 259 | /* |
| 256 | * This structure defines static mappings for the kzm-arm11-01 board. | 260 | * This structure defines static mappings for the kzm-arm11-01 board. |
| 257 | */ | 261 | */ |
| @@ -291,5 +295,6 @@ MACHINE_START(KZM_ARM11_01, "Kyoto Microcomputer Co., Ltd. KZM-ARM11-01") | |||
| 291 | .init_irq = mx31_init_irq, | 295 | .init_irq = mx31_init_irq, |
| 292 | .init_time = kzm_timer_init, | 296 | .init_time = kzm_timer_init, |
| 293 | .init_machine = kzm_board_init, | 297 | .init_machine = kzm_board_init, |
| 298 | .init_late = kzm_late_init, | ||
| 294 | .restart = mxc_restart, | 299 | .restart = mxc_restart, |
| 295 | MACHINE_END | 300 | MACHINE_END |
diff --git a/arch/arm/mach-imx/mach-mx21ads.c b/arch/arm/mach-imx/mach-mx21ads.c index 9986f9a697c8..5e366824814f 100644 --- a/arch/arm/mach-imx/mach-mx21ads.c +++ b/arch/arm/mach-imx/mach-mx21ads.c | |||
| @@ -302,12 +302,16 @@ static void __init mx21ads_board_init(void) | |||
| 302 | imx21_add_imx_uart0(&uart_pdata_rts); | 302 | imx21_add_imx_uart0(&uart_pdata_rts); |
| 303 | imx21_add_imx_uart2(&uart_pdata_norts); | 303 | imx21_add_imx_uart2(&uart_pdata_norts); |
| 304 | imx21_add_imx_uart3(&uart_pdata_rts); | 304 | imx21_add_imx_uart3(&uart_pdata_rts); |
| 305 | imx21_add_mxc_mmc(0, &mx21ads_sdhc_pdata); | ||
| 306 | imx21_add_mxc_nand(&mx21ads_nand_board_info); | 305 | imx21_add_mxc_nand(&mx21ads_nand_board_info); |
| 307 | 306 | ||
| 308 | platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); | ||
| 309 | |||
| 310 | imx21_add_imx_fb(&mx21ads_fb_data); | 307 | imx21_add_imx_fb(&mx21ads_fb_data); |
| 308 | } | ||
| 309 | |||
| 310 | static void __init mx21ads_late_init(void) | ||
| 311 | { | ||
| 312 | imx21_add_mxc_mmc(0, &mx21ads_sdhc_pdata); | ||
| 313 | |||
| 314 | platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); | ||
| 311 | 315 | ||
| 312 | mx21ads_cs8900_resources[1].start = | 316 | mx21ads_cs8900_resources[1].start = |
| 313 | gpio_to_irq(MX21ADS_CS8900A_IRQ_GPIO); | 317 | gpio_to_irq(MX21ADS_CS8900A_IRQ_GPIO); |
| @@ -328,6 +332,7 @@ MACHINE_START(MX21ADS, "Freescale i.MX21ADS") | |||
| 328 | .init_early = imx21_init_early, | 332 | .init_early = imx21_init_early, |
| 329 | .init_irq = mx21_init_irq, | 333 | .init_irq = mx21_init_irq, |
| 330 | .init_time = mx21ads_timer_init, | 334 | .init_time = mx21ads_timer_init, |
| 331 | .init_machine = mx21ads_board_init, | 335 | .init_machine = mx21ads_board_init, |
| 336 | .init_late = mx21ads_late_init, | ||
| 332 | .restart = mxc_restart, | 337 | .restart = mxc_restart, |
| 333 | MACHINE_END | 338 | MACHINE_END |
diff --git a/arch/arm/mach-imx/mach-mx27_3ds.c b/arch/arm/mach-imx/mach-mx27_3ds.c index 9ef4640f3660..7ba651a9b5b8 100644 --- a/arch/arm/mach-imx/mach-mx27_3ds.c +++ b/arch/arm/mach-imx/mach-mx27_3ds.c | |||
| @@ -485,17 +485,32 @@ static const struct imxi2c_platform_data mx27_3ds_i2c0_data __initconst = { | |||
| 485 | 485 | ||
| 486 | static void __init mx27pdk_init(void) | 486 | static void __init mx27pdk_init(void) |
| 487 | { | 487 | { |
| 488 | int ret; | ||
| 489 | imx27_soc_init(); | 488 | imx27_soc_init(); |
| 490 | 489 | ||
| 491 | mxc_gpio_setup_multiple_pins(mx27pdk_pins, ARRAY_SIZE(mx27pdk_pins), | 490 | mxc_gpio_setup_multiple_pins(mx27pdk_pins, ARRAY_SIZE(mx27pdk_pins), |
| 492 | "mx27pdk"); | 491 | "mx27pdk"); |
| 493 | mx27_3ds_sdhc1_enable_level_translator(); | ||
| 494 | imx27_add_imx_uart0(&uart_pdata); | 492 | imx27_add_imx_uart0(&uart_pdata); |
| 495 | imx27_add_fec(NULL); | 493 | imx27_add_fec(NULL); |
| 496 | imx27_add_imx_keypad(&mx27_3ds_keymap_data); | 494 | imx27_add_imx_keypad(&mx27_3ds_keymap_data); |
| 497 | imx27_add_mxc_mmc(0, &sdhc1_pdata); | ||
| 498 | imx27_add_imx2_wdt(); | 495 | imx27_add_imx2_wdt(); |
| 496 | |||
| 497 | imx27_add_spi_imx1(&spi2_pdata); | ||
| 498 | imx27_add_spi_imx0(&spi1_pdata); | ||
| 499 | |||
| 500 | imx27_add_imx_i2c(0, &mx27_3ds_i2c0_data); | ||
| 501 | platform_add_devices(devices, ARRAY_SIZE(devices)); | ||
| 502 | imx27_add_imx_fb(&mx27_3ds_fb_data); | ||
| 503 | |||
| 504 | imx27_add_imx_ssi(0, &mx27_3ds_ssi_pdata); | ||
| 505 | } | ||
| 506 | |||
| 507 | static void __init mx27pdk_late_init(void) | ||
| 508 | { | ||
| 509 | int ret; | ||
| 510 | |||
| 511 | mx27_3ds_sdhc1_enable_level_translator(); | ||
| 512 | imx27_add_mxc_mmc(0, &sdhc1_pdata); | ||
| 513 | |||
| 499 | otg_phy_init(); | 514 | otg_phy_init(); |
| 500 | 515 | ||
| 501 | if (otg_mode_host) { | 516 | if (otg_mode_host) { |
| @@ -509,17 +524,12 @@ static void __init mx27pdk_init(void) | |||
| 509 | if (!otg_mode_host) | 524 | if (!otg_mode_host) |
| 510 | imx27_add_fsl_usb2_udc(&otg_device_pdata); | 525 | imx27_add_fsl_usb2_udc(&otg_device_pdata); |
| 511 | 526 | ||
| 512 | imx27_add_spi_imx1(&spi2_pdata); | ||
| 513 | imx27_add_spi_imx0(&spi1_pdata); | ||
| 514 | mx27_3ds_spi_devs[0].irq = gpio_to_irq(PMIC_INT); | 527 | mx27_3ds_spi_devs[0].irq = gpio_to_irq(PMIC_INT); |
| 515 | spi_register_board_info(mx27_3ds_spi_devs, | 528 | spi_register_board_info(mx27_3ds_spi_devs, |
| 516 | ARRAY_SIZE(mx27_3ds_spi_devs)); | 529 | ARRAY_SIZE(mx27_3ds_spi_devs)); |
| 517 | 530 | ||
| 518 | if (mxc_expio_init(MX27_CS5_BASE_ADDR, IMX_GPIO_NR(3, 28))) | 531 | if (mxc_expio_init(MX27_CS5_BASE_ADDR, IMX_GPIO_NR(3, 28))) |
| 519 | pr_warn("Init of the debugboard failed, all devices on the debugboard are unusable.\n"); | 532 | pr_warn("Init of the debugboard failed, all devices on the debugboard are unusable.\n"); |
| 520 | imx27_add_imx_i2c(0, &mx27_3ds_i2c0_data); | ||
| 521 | platform_add_devices(devices, ARRAY_SIZE(devices)); | ||
| 522 | imx27_add_imx_fb(&mx27_3ds_fb_data); | ||
| 523 | 533 | ||
| 524 | ret = gpio_request_array(mx27_3ds_camera_gpios, | 534 | ret = gpio_request_array(mx27_3ds_camera_gpios, |
| 525 | ARRAY_SIZE(mx27_3ds_camera_gpios)); | 535 | ARRAY_SIZE(mx27_3ds_camera_gpios)); |
| @@ -529,7 +539,6 @@ static void __init mx27pdk_init(void) | |||
| 529 | } | 539 | } |
| 530 | 540 | ||
| 531 | imx27_add_mx2_camera(&mx27_3ds_cam_pdata); | 541 | imx27_add_mx2_camera(&mx27_3ds_cam_pdata); |
| 532 | imx27_add_imx_ssi(0, &mx27_3ds_ssi_pdata); | ||
| 533 | 542 | ||
| 534 | imx_add_platform_device("imx_mc13783", 0, NULL, 0, NULL, 0); | 543 | imx_add_platform_device("imx_mc13783", 0, NULL, 0, NULL, 0); |
| 535 | } | 544 | } |
| @@ -547,5 +556,6 @@ MACHINE_START(MX27_3DS, "Freescale MX27PDK") | |||
| 547 | .init_irq = mx27_init_irq, | 556 | .init_irq = mx27_init_irq, |
| 548 | .init_time = mx27pdk_timer_init, | 557 | .init_time = mx27pdk_timer_init, |
| 549 | .init_machine = mx27pdk_init, | 558 | .init_machine = mx27pdk_init, |
| 559 | .init_late = mx27pdk_late_init, | ||
| 550 | .restart = mxc_restart, | 560 | .restart = mxc_restart, |
| 551 | MACHINE_END | 561 | MACHINE_END |
diff --git a/arch/arm/mach-imx/mach-mx27ads.c b/arch/arm/mach-imx/mach-mx27ads.c index a4c389eae31a..a04bb094ded1 100644 --- a/arch/arm/mach-imx/mach-mx27ads.c +++ b/arch/arm/mach-imx/mach-mx27ads.c | |||
| @@ -352,14 +352,20 @@ static void __init mx27ads_board_init(void) | |||
| 352 | i2c_register_board_info(1, mx27ads_i2c_devices, | 352 | i2c_register_board_info(1, mx27ads_i2c_devices, |
| 353 | ARRAY_SIZE(mx27ads_i2c_devices)); | 353 | ARRAY_SIZE(mx27ads_i2c_devices)); |
| 354 | imx27_add_imx_i2c(1, &mx27ads_i2c1_data); | 354 | imx27_add_imx_i2c(1, &mx27ads_i2c1_data); |
| 355 | mx27ads_regulator_init(); | ||
| 356 | imx27_add_imx_fb(&mx27ads_fb_data); | 355 | imx27_add_imx_fb(&mx27ads_fb_data); |
| 356 | |||
| 357 | imx27_add_fec(NULL); | ||
| 358 | imx27_add_mxc_w1(); | ||
| 359 | } | ||
| 360 | |||
| 361 | static void __init mx27ads_late_init(void) | ||
| 362 | { | ||
| 363 | mx27ads_regulator_init(); | ||
| 364 | |||
| 357 | imx27_add_mxc_mmc(0, &sdhc1_pdata); | 365 | imx27_add_mxc_mmc(0, &sdhc1_pdata); |
| 358 | imx27_add_mxc_mmc(1, &sdhc2_pdata); | 366 | imx27_add_mxc_mmc(1, &sdhc2_pdata); |
| 359 | 367 | ||
| 360 | imx27_add_fec(NULL); | ||
| 361 | platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); | 368 | platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); |
| 362 | imx27_add_mxc_w1(); | ||
| 363 | } | 369 | } |
| 364 | 370 | ||
| 365 | static void __init mx27ads_timer_init(void) | 371 | static void __init mx27ads_timer_init(void) |
| @@ -395,5 +401,6 @@ MACHINE_START(MX27ADS, "Freescale i.MX27ADS") | |||
| 395 | .init_irq = mx27_init_irq, | 401 | .init_irq = mx27_init_irq, |
| 396 | .init_time = mx27ads_timer_init, | 402 | .init_time = mx27ads_timer_init, |
| 397 | .init_machine = mx27ads_board_init, | 403 | .init_machine = mx27ads_board_init, |
| 404 | .init_late = mx27ads_late_init, | ||
| 398 | .restart = mxc_restart, | 405 | .restart = mxc_restart, |
| 399 | MACHINE_END | 406 | MACHINE_END |
diff --git a/arch/arm/mach-imx/mach-mx31_3ds.c b/arch/arm/mach-imx/mach-mx31_3ds.c index 65a0dc06a97c..12b8a52c9cb4 100644 --- a/arch/arm/mach-imx/mach-mx31_3ds.c +++ b/arch/arm/mach-imx/mach-mx31_3ds.c | |||
| @@ -694,8 +694,6 @@ static struct platform_device *devices[] __initdata = { | |||
| 694 | 694 | ||
| 695 | static void __init mx31_3ds_init(void) | 695 | static void __init mx31_3ds_init(void) |
| 696 | { | 696 | { |
| 697 | int ret; | ||
| 698 | |||
| 699 | imx31_soc_init(); | 697 | imx31_soc_init(); |
| 700 | 698 | ||
| 701 | /* Configure SPI1 IOMUX */ | 699 | /* Configure SPI1 IOMUX */ |
| @@ -708,14 +706,31 @@ static void __init mx31_3ds_init(void) | |||
| 708 | imx31_add_mxc_nand(&mx31_3ds_nand_board_info); | 706 | imx31_add_mxc_nand(&mx31_3ds_nand_board_info); |
| 709 | 707 | ||
| 710 | imx31_add_spi_imx1(&spi1_pdata); | 708 | imx31_add_spi_imx1(&spi1_pdata); |
| 709 | |||
| 710 | imx31_add_imx_keypad(&mx31_3ds_keymap_data); | ||
| 711 | |||
| 712 | imx31_add_imx2_wdt(); | ||
| 713 | imx31_add_imx_i2c0(&mx31_3ds_i2c0_data); | ||
| 714 | |||
| 715 | imx31_add_spi_imx0(&spi0_pdata); | ||
| 716 | imx31_add_ipu_core(); | ||
| 717 | imx31_add_mx3_sdc_fb(&mx3fb_pdata); | ||
| 718 | |||
| 719 | imx31_add_imx_ssi(0, &mx31_3ds_ssi_pdata); | ||
| 720 | |||
| 721 | imx_add_platform_device("imx_mc13783", 0, NULL, 0, NULL, 0); | ||
| 722 | } | ||
| 723 | |||
| 724 | static void __init mx31_3ds_late(void) | ||
| 725 | { | ||
| 726 | int ret; | ||
| 727 | |||
| 711 | mx31_3ds_spi_devs[0].irq = gpio_to_irq(IOMUX_TO_GPIO(MX31_PIN_GPIO1_3)); | 728 | mx31_3ds_spi_devs[0].irq = gpio_to_irq(IOMUX_TO_GPIO(MX31_PIN_GPIO1_3)); |
| 712 | spi_register_board_info(mx31_3ds_spi_devs, | 729 | spi_register_board_info(mx31_3ds_spi_devs, |
| 713 | ARRAY_SIZE(mx31_3ds_spi_devs)); | 730 | ARRAY_SIZE(mx31_3ds_spi_devs)); |
| 714 | 731 | ||
| 715 | platform_add_devices(devices, ARRAY_SIZE(devices)); | 732 | platform_add_devices(devices, ARRAY_SIZE(devices)); |
| 716 | 733 | ||
| 717 | imx31_add_imx_keypad(&mx31_3ds_keymap_data); | ||
| 718 | |||
| 719 | mx31_3ds_usbotg_init(); | 734 | mx31_3ds_usbotg_init(); |
| 720 | if (otg_mode_host) { | 735 | if (otg_mode_host) { |
| 721 | otg_pdata.otg = imx_otg_ulpi_create(ULPI_OTG_DRVVBUS | | 736 | otg_pdata.otg = imx_otg_ulpi_create(ULPI_OTG_DRVVBUS | |
| @@ -733,14 +748,9 @@ static void __init mx31_3ds_init(void) | |||
| 733 | 748 | ||
| 734 | if (mxc_expio_init(MX31_CS5_BASE_ADDR, IOMUX_TO_GPIO(MX31_PIN_GPIO1_1))) | 749 | if (mxc_expio_init(MX31_CS5_BASE_ADDR, IOMUX_TO_GPIO(MX31_PIN_GPIO1_1))) |
| 735 | printk(KERN_WARNING "Init of the debug board failed, all " | 750 | printk(KERN_WARNING "Init of the debug board failed, all " |
| 736 | "devices on the debug board are unusable.\n"); | 751 | "devices on the debug board are unusable.\n"); |
| 737 | imx31_add_imx2_wdt(); | ||
| 738 | imx31_add_imx_i2c0(&mx31_3ds_i2c0_data); | ||
| 739 | imx31_add_mxc_mmc(0, &sdhc1_pdata); | ||
| 740 | 752 | ||
| 741 | imx31_add_spi_imx0(&spi0_pdata); | 753 | imx31_add_mxc_mmc(0, &sdhc1_pdata); |
| 742 | imx31_add_ipu_core(); | ||
| 743 | imx31_add_mx3_sdc_fb(&mx3fb_pdata); | ||
| 744 | 754 | ||
| 745 | /* CSI */ | 755 | /* CSI */ |
| 746 | /* Camera power: default - off */ | 756 | /* Camera power: default - off */ |
| @@ -752,10 +762,6 @@ static void __init mx31_3ds_init(void) | |||
| 752 | } | 762 | } |
| 753 | 763 | ||
| 754 | mx31_3ds_init_camera(); | 764 | mx31_3ds_init_camera(); |
| 755 | |||
| 756 | imx31_add_imx_ssi(0, &mx31_3ds_ssi_pdata); | ||
| 757 | |||
| 758 | imx_add_platform_device("imx_mc13783", 0, NULL, 0, NULL, 0); | ||
| 759 | } | 765 | } |
| 760 | 766 | ||
| 761 | static void __init mx31_3ds_timer_init(void) | 767 | static void __init mx31_3ds_timer_init(void) |
| @@ -778,6 +784,7 @@ MACHINE_START(MX31_3DS, "Freescale MX31PDK (3DS)") | |||
| 778 | .init_irq = mx31_init_irq, | 784 | .init_irq = mx31_init_irq, |
| 779 | .init_time = mx31_3ds_timer_init, | 785 | .init_time = mx31_3ds_timer_init, |
| 780 | .init_machine = mx31_3ds_init, | 786 | .init_machine = mx31_3ds_init, |
| 787 | .init_late = mx31_3ds_late, | ||
| 781 | .reserve = mx31_3ds_reserve, | 788 | .reserve = mx31_3ds_reserve, |
| 782 | .restart = mxc_restart, | 789 | .restart = mxc_restart, |
| 783 | MACHINE_END | 790 | MACHINE_END |
diff --git a/arch/arm/mach-imx/mach-mx31ads.c b/arch/arm/mach-imx/mach-mx31ads.c index 4f2c56d44ba1..766b8b93fb97 100644 --- a/arch/arm/mach-imx/mach-mx31ads.c +++ b/arch/arm/mach-imx/mach-mx31ads.c | |||
| @@ -554,20 +554,19 @@ static void __init mx31ads_map_io(void) | |||
| 554 | iotable_init(mx31ads_io_desc, ARRAY_SIZE(mx31ads_io_desc)); | 554 | iotable_init(mx31ads_io_desc, ARRAY_SIZE(mx31ads_io_desc)); |
| 555 | } | 555 | } |
| 556 | 556 | ||
| 557 | static void __init mx31ads_init_irq(void) | ||
| 558 | { | ||
| 559 | mx31_init_irq(); | ||
| 560 | mx31ads_init_expio(); | ||
| 561 | } | ||
| 562 | |||
| 563 | static void __init mx31ads_init(void) | 557 | static void __init mx31ads_init(void) |
| 564 | { | 558 | { |
| 565 | imx31_soc_init(); | 559 | imx31_soc_init(); |
| 566 | 560 | ||
| 567 | mxc_init_extuart(); | ||
| 568 | mxc_init_imx_uart(); | 561 | mxc_init_imx_uart(); |
| 569 | mxc_init_i2c(); | ||
| 570 | mxc_init_audio(); | 562 | mxc_init_audio(); |
| 563 | } | ||
| 564 | |||
| 565 | static void __init mx31ads_late(void) | ||
| 566 | { | ||
| 567 | mx31ads_init_expio(); | ||
| 568 | mxc_init_extuart(); | ||
| 569 | mxc_init_i2c(); | ||
| 571 | mxc_init_ext_ethernet(); | 570 | mxc_init_ext_ethernet(); |
| 572 | } | 571 | } |
| 573 | 572 | ||
| @@ -581,8 +580,9 @@ MACHINE_START(MX31ADS, "Freescale MX31ADS") | |||
| 581 | .atag_offset = 0x100, | 580 | .atag_offset = 0x100, |
| 582 | .map_io = mx31ads_map_io, | 581 | .map_io = mx31ads_map_io, |
| 583 | .init_early = imx31_init_early, | 582 | .init_early = imx31_init_early, |
| 584 | .init_irq = mx31ads_init_irq, | 583 | .init_irq = mx31_init_irq, |
| 585 | .init_time = mx31ads_timer_init, | 584 | .init_time = mx31ads_timer_init, |
| 586 | .init_machine = mx31ads_init, | 585 | .init_machine = mx31ads_init, |
| 586 | .init_late = mx31ads_late, | ||
| 587 | .restart = mxc_restart, | 587 | .restart = mxc_restart, |
| 588 | MACHINE_END | 588 | MACHINE_END |
diff --git a/arch/arm/mach-imx/mach-mx31lilly.c b/arch/arm/mach-imx/mach-mx31lilly.c index e9549a3c0223..6fd463642954 100644 --- a/arch/arm/mach-imx/mach-mx31lilly.c +++ b/arch/arm/mach-imx/mach-mx31lilly.c | |||
| @@ -56,6 +56,26 @@ | |||
| 56 | * appropriate baseboard support code. | 56 | * appropriate baseboard support code. |
| 57 | */ | 57 | */ |
| 58 | 58 | ||
| 59 | static unsigned int mx31lilly_pins[] __initdata = { | ||
| 60 | MX31_PIN_CTS1__CTS1, | ||
| 61 | MX31_PIN_RTS1__RTS1, | ||
| 62 | MX31_PIN_TXD1__TXD1, | ||
| 63 | MX31_PIN_RXD1__RXD1, | ||
| 64 | MX31_PIN_CTS2__CTS2, | ||
| 65 | MX31_PIN_RTS2__RTS2, | ||
| 66 | MX31_PIN_TXD2__TXD2, | ||
| 67 | MX31_PIN_RXD2__RXD2, | ||
| 68 | MX31_PIN_CSPI3_MOSI__RXD3, | ||
| 69 | MX31_PIN_CSPI3_MISO__TXD3, | ||
| 70 | MX31_PIN_CSPI3_SCLK__RTS3, | ||
| 71 | MX31_PIN_CSPI3_SPI_RDY__CTS3, | ||
| 72 | }; | ||
| 73 | |||
| 74 | /* UART */ | ||
| 75 | static const struct imxuart_platform_data uart_pdata __initconst = { | ||
| 76 | .flags = IMXUART_HAVE_RTSCTS, | ||
| 77 | }; | ||
| 78 | |||
| 59 | /* SMSC ethernet support */ | 79 | /* SMSC ethernet support */ |
| 60 | 80 | ||
| 61 | static struct resource smsc91x_resources[] = { | 81 | static struct resource smsc91x_resources[] = { |
| @@ -252,16 +272,12 @@ static void __init mx31lilly_board_init(void) | |||
| 252 | { | 272 | { |
| 253 | imx31_soc_init(); | 273 | imx31_soc_init(); |
| 254 | 274 | ||
| 255 | switch (mx31lilly_baseboard) { | 275 | mxc_iomux_setup_multiple_pins(mx31lilly_pins, |
| 256 | case MX31LILLY_NOBOARD: | 276 | ARRAY_SIZE(mx31lilly_pins), "mx31lily"); |
| 257 | break; | 277 | |
| 258 | case MX31LILLY_DB: | 278 | imx31_add_imx_uart0(&uart_pdata); |
| 259 | mx31lilly_db_init(); | 279 | imx31_add_imx_uart1(&uart_pdata); |
| 260 | break; | 280 | imx31_add_imx_uart2(&uart_pdata); |
| 261 | default: | ||
| 262 | printk(KERN_ERR "Illegal mx31lilly_baseboard type %d\n", | ||
| 263 | mx31lilly_baseboard); | ||
| 264 | } | ||
| 265 | 281 | ||
| 266 | mxc_iomux_alloc_pin(MX31_PIN_CS4__CS4, "Ethernet CS"); | 282 | mxc_iomux_alloc_pin(MX31_PIN_CS4__CS4, "Ethernet CS"); |
| 267 | 283 | ||
| @@ -284,10 +300,17 @@ static void __init mx31lilly_board_init(void) | |||
| 284 | 300 | ||
| 285 | imx31_add_spi_imx0(&spi0_pdata); | 301 | imx31_add_spi_imx0(&spi0_pdata); |
| 286 | imx31_add_spi_imx1(&spi1_pdata); | 302 | imx31_add_spi_imx1(&spi1_pdata); |
| 287 | mc13783_dev.irq = gpio_to_irq(IOMUX_TO_GPIO(MX31_PIN_GPIO1_3)); | ||
| 288 | spi_register_board_info(&mc13783_dev, 1); | ||
| 289 | 303 | ||
| 290 | regulator_register_fixed(0, dummy_supplies, ARRAY_SIZE(dummy_supplies)); | 304 | regulator_register_fixed(0, dummy_supplies, ARRAY_SIZE(dummy_supplies)); |
| 305 | } | ||
| 306 | |||
| 307 | static void __init mx31lilly_late_init(void) | ||
| 308 | { | ||
| 309 | if (mx31lilly_baseboard == MX31LILLY_DB) | ||
| 310 | mx31lilly_db_init(); | ||
| 311 | |||
| 312 | mc13783_dev.irq = gpio_to_irq(IOMUX_TO_GPIO(MX31_PIN_GPIO1_3)); | ||
| 313 | spi_register_board_info(&mc13783_dev, 1); | ||
| 291 | 314 | ||
| 292 | smsc91x_resources[1].start = | 315 | smsc91x_resources[1].start = |
| 293 | gpio_to_irq(IOMUX_TO_GPIO(MX31_PIN_GPIO1_0)); | 316 | gpio_to_irq(IOMUX_TO_GPIO(MX31_PIN_GPIO1_0)); |
| @@ -310,6 +333,7 @@ MACHINE_START(LILLY1131, "INCO startec LILLY-1131") | |||
| 310 | .init_early = imx31_init_early, | 333 | .init_early = imx31_init_early, |
| 311 | .init_irq = mx31_init_irq, | 334 | .init_irq = mx31_init_irq, |
| 312 | .init_time = mx31lilly_timer_init, | 335 | .init_time = mx31lilly_timer_init, |
| 313 | .init_machine = mx31lilly_board_init, | 336 | .init_machine = mx31lilly_board_init, |
| 337 | .init_late = mx31lilly_late_init, | ||
| 314 | .restart = mxc_restart, | 338 | .restart = mxc_restart, |
| 315 | MACHINE_END | 339 | MACHINE_END |
diff --git a/arch/arm/mach-imx/mach-mx31lite.c b/arch/arm/mach-imx/mach-mx31lite.c index 4822a1738de4..f033a57d5694 100644 --- a/arch/arm/mach-imx/mach-mx31lite.c +++ b/arch/arm/mach-imx/mach-mx31lite.c | |||
| @@ -52,6 +52,19 @@ | |||
| 52 | */ | 52 | */ |
| 53 | 53 | ||
| 54 | static unsigned int mx31lite_pins[] = { | 54 | static unsigned int mx31lite_pins[] = { |
| 55 | /* UART1 */ | ||
| 56 | MX31_PIN_CTS1__CTS1, | ||
| 57 | MX31_PIN_RTS1__RTS1, | ||
| 58 | MX31_PIN_TXD1__TXD1, | ||
| 59 | MX31_PIN_RXD1__RXD1, | ||
| 60 | /* SPI 0 */ | ||
| 61 | MX31_PIN_CSPI1_SCLK__SCLK, | ||
| 62 | MX31_PIN_CSPI1_MOSI__MOSI, | ||
| 63 | MX31_PIN_CSPI1_MISO__MISO, | ||
| 64 | MX31_PIN_CSPI1_SPI_RDY__SPI_RDY, | ||
| 65 | MX31_PIN_CSPI1_SS0__SS0, | ||
| 66 | MX31_PIN_CSPI1_SS1__SS1, | ||
| 67 | MX31_PIN_CSPI1_SS2__SS2, | ||
| 55 | /* LAN9117 IRQ pin */ | 68 | /* LAN9117 IRQ pin */ |
| 56 | IOMUX_MODE(MX31_PIN_SFS6, IOMUX_CONFIG_GPIO), | 69 | IOMUX_MODE(MX31_PIN_SFS6, IOMUX_CONFIG_GPIO), |
| 57 | /* SPI 1 */ | 70 | /* SPI 1 */ |
| @@ -64,6 +77,23 @@ static unsigned int mx31lite_pins[] = { | |||
| 64 | MX31_PIN_CSPI2_SS2__SS2, | 77 | MX31_PIN_CSPI2_SS2__SS2, |
| 65 | }; | 78 | }; |
| 66 | 79 | ||
| 80 | /* UART */ | ||
| 81 | static const struct imxuart_platform_data uart_pdata __initconst = { | ||
| 82 | .flags = IMXUART_HAVE_RTSCTS, | ||
| 83 | }; | ||
| 84 | |||
| 85 | /* SPI */ | ||
| 86 | static int spi0_internal_chipselect[] = { | ||
| 87 | MXC_SPI_CS(0), | ||
| 88 | MXC_SPI_CS(1), | ||
| 89 | MXC_SPI_CS(2), | ||
| 90 | }; | ||
| 91 | |||
| 92 | static const struct spi_imx_master spi0_pdata __initconst = { | ||
| 93 | .chipselect = spi0_internal_chipselect, | ||
| 94 | .num_chipselect = ARRAY_SIZE(spi0_internal_chipselect), | ||
| 95 | }; | ||
| 96 | |||
| 67 | static const struct mxc_nand_platform_data | 97 | static const struct mxc_nand_platform_data |
| 68 | mx31lite_nand_board_info __initconst = { | 98 | mx31lite_nand_board_info __initconst = { |
| 69 | .width = 1, | 99 | .width = 1, |
| @@ -103,13 +133,13 @@ static struct platform_device smsc911x_device = { | |||
| 103 | * The MC13783 is the only hard-wired SPI device on the module. | 133 | * The MC13783 is the only hard-wired SPI device on the module. |
| 104 | */ | 134 | */ |
| 105 | 135 | ||
| 106 | static int spi_internal_chipselect[] = { | 136 | static int spi1_internal_chipselect[] = { |
| 107 | MXC_SPI_CS(0), | 137 | MXC_SPI_CS(0), |
| 108 | }; | 138 | }; |
| 109 | 139 | ||
| 110 | static const struct spi_imx_master spi1_pdata __initconst = { | 140 | static const struct spi_imx_master spi1_pdata __initconst = { |
| 111 | .chipselect = spi_internal_chipselect, | 141 | .chipselect = spi1_internal_chipselect, |
| 112 | .num_chipselect = ARRAY_SIZE(spi_internal_chipselect), | 142 | .num_chipselect = ARRAY_SIZE(spi1_internal_chipselect), |
| 113 | }; | 143 | }; |
| 114 | 144 | ||
| 115 | static struct mc13xxx_platform_data mc13783_pdata __initdata = { | 145 | static struct mc13xxx_platform_data mc13783_pdata __initdata = { |
| @@ -200,8 +230,6 @@ static struct platform_device physmap_flash_device = { | |||
| 200 | .num_resources = 1, | 230 | .num_resources = 1, |
| 201 | }; | 231 | }; |
| 202 | 232 | ||
| 203 | |||
| 204 | |||
| 205 | /* | 233 | /* |
| 206 | * This structure defines the MX31 memory map. | 234 | * This structure defines the MX31 memory map. |
| 207 | */ | 235 | */ |
| @@ -233,29 +261,30 @@ static struct regulator_consumer_supply dummy_supplies[] = { | |||
| 233 | 261 | ||
| 234 | static void __init mx31lite_init(void) | 262 | static void __init mx31lite_init(void) |
| 235 | { | 263 | { |
| 236 | int ret; | ||
| 237 | |||
| 238 | imx31_soc_init(); | 264 | imx31_soc_init(); |
| 239 | 265 | ||
| 240 | switch (mx31lite_baseboard) { | ||
| 241 | case MX31LITE_NOBOARD: | ||
| 242 | break; | ||
| 243 | case MX31LITE_DB: | ||
| 244 | mx31lite_db_init(); | ||
| 245 | break; | ||
| 246 | default: | ||
| 247 | printk(KERN_ERR "Illegal mx31lite_baseboard type %d\n", | ||
| 248 | mx31lite_baseboard); | ||
| 249 | } | ||
| 250 | |||
| 251 | mxc_iomux_setup_multiple_pins(mx31lite_pins, ARRAY_SIZE(mx31lite_pins), | 266 | mxc_iomux_setup_multiple_pins(mx31lite_pins, ARRAY_SIZE(mx31lite_pins), |
| 252 | "mx31lite"); | 267 | "mx31lite"); |
| 253 | 268 | ||
| 269 | imx31_add_imx_uart0(&uart_pdata); | ||
| 270 | imx31_add_spi_imx0(&spi0_pdata); | ||
| 271 | |||
| 254 | /* NOR and NAND flash */ | 272 | /* NOR and NAND flash */ |
| 255 | platform_device_register(&physmap_flash_device); | 273 | platform_device_register(&physmap_flash_device); |
| 256 | imx31_add_mxc_nand(&mx31lite_nand_board_info); | 274 | imx31_add_mxc_nand(&mx31lite_nand_board_info); |
| 257 | 275 | ||
| 258 | imx31_add_spi_imx1(&spi1_pdata); | 276 | imx31_add_spi_imx1(&spi1_pdata); |
| 277 | |||
| 278 | regulator_register_fixed(0, dummy_supplies, ARRAY_SIZE(dummy_supplies)); | ||
| 279 | } | ||
| 280 | |||
| 281 | static void __init mx31lite_late(void) | ||
| 282 | { | ||
| 283 | int ret; | ||
| 284 | |||
| 285 | if (mx31lite_baseboard == MX31LITE_DB) | ||
| 286 | mx31lite_db_init(); | ||
| 287 | |||
| 259 | mc13783_spi_dev.irq = gpio_to_irq(IOMUX_TO_GPIO(MX31_PIN_GPIO1_3)); | 288 | mc13783_spi_dev.irq = gpio_to_irq(IOMUX_TO_GPIO(MX31_PIN_GPIO1_3)); |
| 260 | spi_register_board_info(&mc13783_spi_dev, 1); | 289 | spi_register_board_info(&mc13783_spi_dev, 1); |
| 261 | 290 | ||
| @@ -265,8 +294,6 @@ static void __init mx31lite_init(void) | |||
| 265 | if (usbh2_pdata.otg) | 294 | if (usbh2_pdata.otg) |
| 266 | imx31_add_mxc_ehci_hs(2, &usbh2_pdata); | 295 | imx31_add_mxc_ehci_hs(2, &usbh2_pdata); |
| 267 | 296 | ||
| 268 | regulator_register_fixed(0, dummy_supplies, ARRAY_SIZE(dummy_supplies)); | ||
| 269 | |||
| 270 | /* SMSC9117 IRQ pin */ | 297 | /* SMSC9117 IRQ pin */ |
| 271 | ret = gpio_request(IOMUX_TO_GPIO(MX31_PIN_SFS6), "sms9117-irq"); | 298 | ret = gpio_request(IOMUX_TO_GPIO(MX31_PIN_SFS6), "sms9117-irq"); |
| 272 | if (ret) | 299 | if (ret) |
| @@ -294,5 +321,6 @@ MACHINE_START(MX31LITE, "LogicPD i.MX31 SOM") | |||
| 294 | .init_irq = mx31_init_irq, | 321 | .init_irq = mx31_init_irq, |
| 295 | .init_time = mx31lite_timer_init, | 322 | .init_time = mx31lite_timer_init, |
| 296 | .init_machine = mx31lite_init, | 323 | .init_machine = mx31lite_init, |
| 324 | .init_late = mx31lite_late, | ||
| 297 | .restart = mxc_restart, | 325 | .restart = mxc_restart, |
| 298 | MACHINE_END | 326 | MACHINE_END |
diff --git a/arch/arm/mach-imx/mach-mx31moboard.c b/arch/arm/mach-imx/mach-mx31moboard.c index 4f2d99888afd..cc867682520e 100644 --- a/arch/arm/mach-imx/mach-mx31moboard.c +++ b/arch/arm/mach-imx/mach-mx31moboard.c | |||
| @@ -526,11 +526,9 @@ static void __init mx31moboard_init(void) | |||
| 526 | "moboard"); | 526 | "moboard"); |
| 527 | 527 | ||
| 528 | platform_add_devices(devices, ARRAY_SIZE(devices)); | 528 | platform_add_devices(devices, ARRAY_SIZE(devices)); |
| 529 | gpio_led_register_device(-1, &mx31moboard_led_pdata); | ||
| 530 | 529 | ||
| 531 | imx31_add_imx2_wdt(); | 530 | imx31_add_imx2_wdt(); |
| 532 | 531 | ||
| 533 | moboard_uart0_init(); | ||
| 534 | imx31_add_imx_uart0(&uart0_pdata); | 532 | imx31_add_imx_uart0(&uart0_pdata); |
| 535 | imx31_add_imx_uart4(&uart4_pdata); | 533 | imx31_add_imx_uart4(&uart4_pdata); |
| 536 | 534 | ||
| @@ -540,6 +538,19 @@ static void __init mx31moboard_init(void) | |||
| 540 | imx31_add_spi_imx1(&moboard_spi1_pdata); | 538 | imx31_add_spi_imx1(&moboard_spi1_pdata); |
| 541 | imx31_add_spi_imx2(&moboard_spi2_pdata); | 539 | imx31_add_spi_imx2(&moboard_spi2_pdata); |
| 542 | 540 | ||
| 541 | mx31moboard_init_cam(); | ||
| 542 | |||
| 543 | imx31_add_imx_ssi(0, &moboard_ssi_pdata); | ||
| 544 | |||
| 545 | pm_power_off = mx31moboard_poweroff; | ||
| 546 | } | ||
| 547 | |||
| 548 | static void __init mx31moboard_late(void) | ||
| 549 | { | ||
| 550 | gpio_led_register_device(-1, &mx31moboard_led_pdata); | ||
| 551 | |||
| 552 | moboard_uart0_init(); | ||
| 553 | |||
| 543 | gpio_request(IOMUX_TO_GPIO(MX31_PIN_GPIO1_3), "pmic-irq"); | 554 | gpio_request(IOMUX_TO_GPIO(MX31_PIN_GPIO1_3), "pmic-irq"); |
| 544 | gpio_direction_input(IOMUX_TO_GPIO(MX31_PIN_GPIO1_3)); | 555 | gpio_direction_input(IOMUX_TO_GPIO(MX31_PIN_GPIO1_3)); |
| 545 | moboard_spi_board_info[0].irq = | 556 | moboard_spi_board_info[0].irq = |
| @@ -549,18 +560,11 @@ static void __init mx31moboard_init(void) | |||
| 549 | 560 | ||
| 550 | imx31_add_mxc_mmc(0, &sdhc1_pdata); | 561 | imx31_add_mxc_mmc(0, &sdhc1_pdata); |
| 551 | 562 | ||
| 552 | mx31moboard_init_cam(); | ||
| 553 | |||
| 554 | usb_xcvr_reset(); | 563 | usb_xcvr_reset(); |
| 555 | |||
| 556 | moboard_usbh2_init(); | 564 | moboard_usbh2_init(); |
| 557 | 565 | ||
| 558 | imx31_add_imx_ssi(0, &moboard_ssi_pdata); | ||
| 559 | |||
| 560 | imx_add_platform_device("imx_mc13783", 0, NULL, 0, NULL, 0); | 566 | imx_add_platform_device("imx_mc13783", 0, NULL, 0, NULL, 0); |
| 561 | 567 | ||
| 562 | pm_power_off = mx31moboard_poweroff; | ||
| 563 | |||
| 564 | switch (mx31moboard_baseboard) { | 568 | switch (mx31moboard_baseboard) { |
| 565 | case MX31NOBOARD: | 569 | case MX31NOBOARD: |
| 566 | break; | 570 | break; |
| @@ -601,5 +605,6 @@ MACHINE_START(MX31MOBOARD, "EPFL Mobots mx31moboard") | |||
| 601 | .init_irq = mx31_init_irq, | 605 | .init_irq = mx31_init_irq, |
| 602 | .init_time = mx31moboard_timer_init, | 606 | .init_time = mx31moboard_timer_init, |
| 603 | .init_machine = mx31moboard_init, | 607 | .init_machine = mx31moboard_init, |
| 608 | .init_late = mx31moboard_late, | ||
| 604 | .restart = mxc_restart, | 609 | .restart = mxc_restart, |
| 605 | MACHINE_END | 610 | MACHINE_END |
diff --git a/arch/arm/mach-imx/mach-mx35_3ds.c b/arch/arm/mach-imx/mach-mx35_3ds.c index 7e315f00648d..c8c2e0956048 100644 --- a/arch/arm/mach-imx/mach-mx35_3ds.c +++ b/arch/arm/mach-imx/mach-mx35_3ds.c | |||
| @@ -555,8 +555,6 @@ static const struct imxi2c_platform_data mx35_3ds_i2c0_data __initconst = { | |||
| 555 | */ | 555 | */ |
| 556 | static void __init mx35_3ds_init(void) | 556 | static void __init mx35_3ds_init(void) |
| 557 | { | 557 | { |
| 558 | struct platform_device *imx35_fb_pdev; | ||
| 559 | |||
| 560 | imx35_soc_init(); | 558 | imx35_soc_init(); |
| 561 | 559 | ||
| 562 | mxc_iomux_v3_setup_multiple_pads(mx35pdk_pads, ARRAY_SIZE(mx35pdk_pads)); | 560 | mxc_iomux_v3_setup_multiple_pads(mx35pdk_pads, ARRAY_SIZE(mx35pdk_pads)); |
| @@ -579,9 +577,6 @@ static void __init mx35_3ds_init(void) | |||
| 579 | imx35_add_mxc_nand(&mx35pdk_nand_board_info); | 577 | imx35_add_mxc_nand(&mx35pdk_nand_board_info); |
| 580 | imx35_add_sdhci_esdhc_imx(0, NULL); | 578 | imx35_add_sdhci_esdhc_imx(0, NULL); |
| 581 | 579 | ||
| 582 | if (mxc_expio_init(MX35_CS5_BASE_ADDR, IMX_GPIO_NR(1, 1))) | ||
| 583 | pr_warn("Init of the debugboard failed, all " | ||
| 584 | "devices on the debugboard are unusable.\n"); | ||
| 585 | imx35_add_imx_i2c0(&mx35_3ds_i2c0_data); | 580 | imx35_add_imx_i2c0(&mx35_3ds_i2c0_data); |
| 586 | 581 | ||
| 587 | i2c_register_board_info( | 582 | i2c_register_board_info( |
| @@ -590,6 +585,15 @@ static void __init mx35_3ds_init(void) | |||
| 590 | imx35_add_ipu_core(); | 585 | imx35_add_ipu_core(); |
| 591 | platform_device_register(&mx35_3ds_ov2640); | 586 | platform_device_register(&mx35_3ds_ov2640); |
| 592 | imx35_3ds_init_camera(); | 587 | imx35_3ds_init_camera(); |
| 588 | } | ||
| 589 | |||
| 590 | static void __init mx35_3ds_late_init(void) | ||
| 591 | { | ||
| 592 | struct platform_device *imx35_fb_pdev; | ||
| 593 | |||
| 594 | if (mxc_expio_init(MX35_CS5_BASE_ADDR, IMX_GPIO_NR(1, 1))) | ||
| 595 | pr_warn("Init of the debugboard failed, all " | ||
| 596 | "devices on the debugboard are unusable.\n"); | ||
| 593 | 597 | ||
| 594 | imx35_fb_pdev = imx35_add_mx3_sdc_fb(&mx3fb_pdata); | 598 | imx35_fb_pdev = imx35_add_mx3_sdc_fb(&mx3fb_pdata); |
| 595 | mx35_3ds_lcd.dev.parent = &imx35_fb_pdev->dev; | 599 | mx35_3ds_lcd.dev.parent = &imx35_fb_pdev->dev; |
| @@ -618,6 +622,7 @@ MACHINE_START(MX35_3DS, "Freescale MX35PDK") | |||
| 618 | .init_irq = mx35_init_irq, | 622 | .init_irq = mx35_init_irq, |
| 619 | .init_time = mx35pdk_timer_init, | 623 | .init_time = mx35pdk_timer_init, |
| 620 | .init_machine = mx35_3ds_init, | 624 | .init_machine = mx35_3ds_init, |
| 625 | .init_late = mx35_3ds_late_init, | ||
| 621 | .reserve = mx35_3ds_reserve, | 626 | .reserve = mx35_3ds_reserve, |
| 622 | .restart = mxc_restart, | 627 | .restart = mxc_restart, |
| 623 | MACHINE_END | 628 | MACHINE_END |
diff --git a/arch/arm/mach-imx/mach-pca100.c b/arch/arm/mach-imx/mach-pca100.c index 2d1c50bd8bdf..ed675863655b 100644 --- a/arch/arm/mach-imx/mach-pca100.c +++ b/arch/arm/mach-imx/mach-pca100.c | |||
| @@ -362,12 +362,8 @@ static void __init pca100_init(void) | |||
| 362 | if (ret) | 362 | if (ret) |
| 363 | printk(KERN_ERR "pca100: Failed to setup pins (%d)\n", ret); | 363 | printk(KERN_ERR "pca100: Failed to setup pins (%d)\n", ret); |
| 364 | 364 | ||
| 365 | imx27_add_imx_ssi(0, &pca100_ssi_pdata); | ||
| 366 | |||
| 367 | imx27_add_imx_uart0(&uart_pdata); | 365 | imx27_add_imx_uart0(&uart_pdata); |
| 368 | 366 | ||
| 369 | imx27_add_mxc_mmc(1, &sdhc_pdata); | ||
| 370 | |||
| 371 | imx27_add_mxc_nand(&pca100_nand_board_info); | 367 | imx27_add_mxc_nand(&pca100_nand_board_info); |
| 372 | 368 | ||
| 373 | /* only the i2c master 1 is used on this CPU card */ | 369 | /* only the i2c master 1 is used on this CPU card */ |
| @@ -382,6 +378,19 @@ static void __init pca100_init(void) | |||
| 382 | ARRAY_SIZE(pca100_spi_board_info)); | 378 | ARRAY_SIZE(pca100_spi_board_info)); |
| 383 | imx27_add_spi_imx0(&pca100_spi0_data); | 379 | imx27_add_spi_imx0(&pca100_spi0_data); |
| 384 | 380 | ||
| 381 | imx27_add_imx_fb(&pca100_fb_data); | ||
| 382 | |||
| 383 | imx27_add_fec(NULL); | ||
| 384 | imx27_add_imx2_wdt(); | ||
| 385 | imx27_add_mxc_w1(); | ||
| 386 | } | ||
| 387 | |||
| 388 | static void __init pca100_late_init(void) | ||
| 389 | { | ||
| 390 | imx27_add_imx_ssi(0, &pca100_ssi_pdata); | ||
| 391 | |||
| 392 | imx27_add_mxc_mmc(1, &sdhc_pdata); | ||
| 393 | |||
| 385 | gpio_request(OTG_PHY_CS_GPIO, "usb-otg-cs"); | 394 | gpio_request(OTG_PHY_CS_GPIO, "usb-otg-cs"); |
| 386 | gpio_direction_output(OTG_PHY_CS_GPIO, 1); | 395 | gpio_direction_output(OTG_PHY_CS_GPIO, 1); |
| 387 | gpio_request(USBH2_PHY_CS_GPIO, "usb-host2-cs"); | 396 | gpio_request(USBH2_PHY_CS_GPIO, "usb-host2-cs"); |
| @@ -403,12 +412,6 @@ static void __init pca100_init(void) | |||
| 403 | 412 | ||
| 404 | if (usbh2_pdata.otg) | 413 | if (usbh2_pdata.otg) |
| 405 | imx27_add_mxc_ehci_hs(2, &usbh2_pdata); | 414 | imx27_add_mxc_ehci_hs(2, &usbh2_pdata); |
| 406 | |||
| 407 | imx27_add_imx_fb(&pca100_fb_data); | ||
| 408 | |||
| 409 | imx27_add_fec(NULL); | ||
| 410 | imx27_add_imx2_wdt(); | ||
| 411 | imx27_add_mxc_w1(); | ||
| 412 | } | 415 | } |
| 413 | 416 | ||
| 414 | static void __init pca100_timer_init(void) | 417 | static void __init pca100_timer_init(void) |
| @@ -421,7 +424,8 @@ MACHINE_START(PCA100, "phyCARD-i.MX27") | |||
| 421 | .map_io = mx27_map_io, | 424 | .map_io = mx27_map_io, |
| 422 | .init_early = imx27_init_early, | 425 | .init_early = imx27_init_early, |
| 423 | .init_irq = mx27_init_irq, | 426 | .init_irq = mx27_init_irq, |
| 424 | .init_machine = pca100_init, | 427 | .init_machine = pca100_init, |
| 428 | .init_late = pca100_late_init, | ||
| 425 | .init_time = pca100_timer_init, | 429 | .init_time = pca100_timer_init, |
| 426 | .restart = mxc_restart, | 430 | .restart = mxc_restart, |
| 427 | MACHINE_END | 431 | MACHINE_END |
diff --git a/arch/arm/mach-imx/mach-pcm037.c b/arch/arm/mach-imx/mach-pcm037.c index a159a7739993..9f0f55b0422c 100644 --- a/arch/arm/mach-imx/mach-pcm037.c +++ b/arch/arm/mach-imx/mach-pcm037.c | |||
| @@ -576,8 +576,6 @@ static struct regulator_consumer_supply dummy_supplies[] = { | |||
| 576 | */ | 576 | */ |
| 577 | static void __init pcm037_init(void) | 577 | static void __init pcm037_init(void) |
| 578 | { | 578 | { |
| 579 | int ret; | ||
| 580 | |||
| 581 | imx31_soc_init(); | 579 | imx31_soc_init(); |
| 582 | 580 | ||
| 583 | regulator_register_fixed(0, dummy_supplies, ARRAY_SIZE(dummy_supplies)); | 581 | regulator_register_fixed(0, dummy_supplies, ARRAY_SIZE(dummy_supplies)); |
| @@ -621,20 +619,6 @@ static void __init pcm037_init(void) | |||
| 621 | 619 | ||
| 622 | imx31_add_mxc_w1(); | 620 | imx31_add_mxc_w1(); |
| 623 | 621 | ||
| 624 | /* LAN9217 IRQ pin */ | ||
| 625 | ret = gpio_request(IOMUX_TO_GPIO(MX31_PIN_GPIO3_1), "lan9217-irq"); | ||
| 626 | if (ret) | ||
| 627 | pr_warn("could not get LAN irq gpio\n"); | ||
| 628 | else { | ||
| 629 | gpio_direction_input(IOMUX_TO_GPIO(MX31_PIN_GPIO3_1)); | ||
| 630 | smsc911x_resources[1].start = | ||
| 631 | gpio_to_irq(IOMUX_TO_GPIO(MX31_PIN_GPIO3_1)); | ||
| 632 | smsc911x_resources[1].end = | ||
| 633 | gpio_to_irq(IOMUX_TO_GPIO(MX31_PIN_GPIO3_1)); | ||
| 634 | platform_device_register(&pcm037_eth); | ||
| 635 | } | ||
| 636 | |||
| 637 | |||
| 638 | /* I2C adapters and devices */ | 622 | /* I2C adapters and devices */ |
| 639 | i2c_register_board_info(1, pcm037_i2c_devices, | 623 | i2c_register_board_info(1, pcm037_i2c_devices, |
| 640 | ARRAY_SIZE(pcm037_i2c_devices)); | 624 | ARRAY_SIZE(pcm037_i2c_devices)); |
| @@ -643,26 +627,9 @@ static void __init pcm037_init(void) | |||
| 643 | imx31_add_imx_i2c2(&pcm037_i2c2_data); | 627 | imx31_add_imx_i2c2(&pcm037_i2c2_data); |
| 644 | 628 | ||
| 645 | imx31_add_mxc_nand(&pcm037_nand_board_info); | 629 | imx31_add_mxc_nand(&pcm037_nand_board_info); |
| 646 | imx31_add_mxc_mmc(0, &sdhc_pdata); | ||
| 647 | imx31_add_ipu_core(); | 630 | imx31_add_ipu_core(); |
| 648 | imx31_add_mx3_sdc_fb(&mx3fb_pdata); | 631 | imx31_add_mx3_sdc_fb(&mx3fb_pdata); |
| 649 | 632 | ||
| 650 | /* CSI */ | ||
| 651 | /* Camera power: default - off */ | ||
| 652 | ret = gpio_request(IOMUX_TO_GPIO(MX31_PIN_CSI_D5), "mt9t031-power"); | ||
| 653 | if (!ret) | ||
| 654 | gpio_direction_output(IOMUX_TO_GPIO(MX31_PIN_CSI_D5), 1); | ||
| 655 | else | ||
| 656 | iclink_mt9t031.power = NULL; | ||
| 657 | |||
| 658 | pcm037_init_camera(); | ||
| 659 | |||
| 660 | pcm970_sja1000_resources[1].start = | ||
| 661 | gpio_to_irq(IOMUX_TO_GPIO(IOMUX_PIN(48, 105))); | ||
| 662 | pcm970_sja1000_resources[1].end = | ||
| 663 | gpio_to_irq(IOMUX_TO_GPIO(IOMUX_PIN(48, 105))); | ||
| 664 | platform_device_register(&pcm970_sja1000); | ||
| 665 | |||
| 666 | if (otg_mode_host) { | 633 | if (otg_mode_host) { |
| 667 | otg_pdata.otg = imx_otg_ulpi_create(ULPI_OTG_DRVVBUS | | 634 | otg_pdata.otg = imx_otg_ulpi_create(ULPI_OTG_DRVVBUS | |
| 668 | ULPI_OTG_DRVVBUS_EXT); | 635 | ULPI_OTG_DRVVBUS_EXT); |
| @@ -677,7 +644,6 @@ static void __init pcm037_init(void) | |||
| 677 | 644 | ||
| 678 | if (!otg_mode_host) | 645 | if (!otg_mode_host) |
| 679 | imx31_add_fsl_usb2_udc(&otg_device_pdata); | 646 | imx31_add_fsl_usb2_udc(&otg_device_pdata); |
| 680 | |||
| 681 | } | 647 | } |
| 682 | 648 | ||
| 683 | static void __init pcm037_timer_init(void) | 649 | static void __init pcm037_timer_init(void) |
| @@ -694,6 +660,39 @@ static void __init pcm037_reserve(void) | |||
| 694 | 660 | ||
| 695 | static void __init pcm037_init_late(void) | 661 | static void __init pcm037_init_late(void) |
| 696 | { | 662 | { |
| 663 | int ret; | ||
| 664 | |||
| 665 | /* LAN9217 IRQ pin */ | ||
| 666 | ret = gpio_request(IOMUX_TO_GPIO(MX31_PIN_GPIO3_1), "lan9217-irq"); | ||
| 667 | if (!ret) { | ||
| 668 | gpio_direction_input(IOMUX_TO_GPIO(MX31_PIN_GPIO3_1)); | ||
| 669 | smsc911x_resources[1].start = | ||
| 670 | gpio_to_irq(IOMUX_TO_GPIO(MX31_PIN_GPIO3_1)); | ||
| 671 | smsc911x_resources[1].end = | ||
| 672 | gpio_to_irq(IOMUX_TO_GPIO(MX31_PIN_GPIO3_1)); | ||
| 673 | platform_device_register(&pcm037_eth); | ||
| 674 | } else { | ||
| 675 | pr_warn("could not get LAN irq gpio\n"); | ||
| 676 | } | ||
| 677 | |||
| 678 | imx31_add_mxc_mmc(0, &sdhc_pdata); | ||
| 679 | |||
| 680 | /* CSI */ | ||
| 681 | /* Camera power: default - off */ | ||
| 682 | ret = gpio_request(IOMUX_TO_GPIO(MX31_PIN_CSI_D5), "mt9t031-power"); | ||
| 683 | if (!ret) | ||
| 684 | gpio_direction_output(IOMUX_TO_GPIO(MX31_PIN_CSI_D5), 1); | ||
| 685 | else | ||
| 686 | iclink_mt9t031.power = NULL; | ||
| 687 | |||
| 688 | pcm037_init_camera(); | ||
| 689 | |||
| 690 | pcm970_sja1000_resources[1].start = | ||
| 691 | gpio_to_irq(IOMUX_TO_GPIO(IOMUX_PIN(48, 105))); | ||
| 692 | pcm970_sja1000_resources[1].end = | ||
| 693 | gpio_to_irq(IOMUX_TO_GPIO(IOMUX_PIN(48, 105))); | ||
| 694 | platform_device_register(&pcm970_sja1000); | ||
| 695 | |||
| 697 | pcm037_eet_init_devices(); | 696 | pcm037_eet_init_devices(); |
| 698 | } | 697 | } |
| 699 | 698 | ||
diff --git a/arch/arm/mach-imx/mach-pcm043.c b/arch/arm/mach-imx/mach-pcm043.c index e447e59c0604..78e2bf8dcd96 100644 --- a/arch/arm/mach-imx/mach-pcm043.c +++ b/arch/arm/mach-imx/mach-pcm043.c | |||
| @@ -363,7 +363,6 @@ static void __init pcm043_init(void) | |||
| 363 | 363 | ||
| 364 | imx35_add_imx_uart0(&uart_pdata); | 364 | imx35_add_imx_uart0(&uart_pdata); |
| 365 | imx35_add_mxc_nand(&pcm037_nand_board_info); | 365 | imx35_add_mxc_nand(&pcm037_nand_board_info); |
| 366 | imx35_add_imx_ssi(0, &pcm043_ssi_pdata); | ||
| 367 | 366 | ||
| 368 | imx35_add_imx_uart1(&uart_pdata); | 367 | imx35_add_imx_uart1(&uart_pdata); |
| 369 | 368 | ||
| @@ -387,6 +386,12 @@ static void __init pcm043_init(void) | |||
| 387 | imx35_add_fsl_usb2_udc(&otg_device_pdata); | 386 | imx35_add_fsl_usb2_udc(&otg_device_pdata); |
| 388 | 387 | ||
| 389 | imx35_add_flexcan1(); | 388 | imx35_add_flexcan1(); |
| 389 | } | ||
| 390 | |||
| 391 | static void __init pcm043_late_init(void) | ||
| 392 | { | ||
| 393 | imx35_add_imx_ssi(0, &pcm043_ssi_pdata); | ||
| 394 | |||
| 390 | imx35_add_sdhci_esdhc_imx(0, &sd1_pdata); | 395 | imx35_add_sdhci_esdhc_imx(0, &sd1_pdata); |
| 391 | } | 396 | } |
| 392 | 397 | ||
| @@ -402,6 +407,7 @@ MACHINE_START(PCM043, "Phytec Phycore pcm043") | |||
| 402 | .init_early = imx35_init_early, | 407 | .init_early = imx35_init_early, |
| 403 | .init_irq = mx35_init_irq, | 408 | .init_irq = mx35_init_irq, |
| 404 | .init_time = pcm043_timer_init, | 409 | .init_time = pcm043_timer_init, |
| 405 | .init_machine = pcm043_init, | 410 | .init_machine = pcm043_init, |
| 411 | .init_late = pcm043_late_init, | ||
| 406 | .restart = mxc_restart, | 412 | .restart = mxc_restart, |
| 407 | MACHINE_END | 413 | MACHINE_END |
diff --git a/arch/arm/mach-imx/mach-qong.c b/arch/arm/mach-imx/mach-qong.c index 34df64f133ed..8c2cbd693d21 100644 --- a/arch/arm/mach-imx/mach-qong.c +++ b/arch/arm/mach-imx/mach-qong.c | |||
| @@ -251,7 +251,6 @@ static void __init qong_init(void) | |||
| 251 | 251 | ||
| 252 | mxc_init_imx_uart(); | 252 | mxc_init_imx_uart(); |
| 253 | qong_init_nor_mtd(); | 253 | qong_init_nor_mtd(); |
| 254 | qong_init_fpga(); | ||
| 255 | imx31_add_imx2_wdt(); | 254 | imx31_add_imx2_wdt(); |
| 256 | } | 255 | } |
| 257 | 256 | ||
| @@ -268,5 +267,6 @@ MACHINE_START(QONG, "Dave/DENX QongEVB-LITE") | |||
| 268 | .init_irq = mx31_init_irq, | 267 | .init_irq = mx31_init_irq, |
| 269 | .init_time = qong_timer_init, | 268 | .init_time = qong_timer_init, |
| 270 | .init_machine = qong_init, | 269 | .init_machine = qong_init, |
| 270 | .init_late = qong_init_fpga, | ||
| 271 | .restart = mxc_restart, | 271 | .restart = mxc_restart, |
| 272 | MACHINE_END | 272 | MACHINE_END |
diff --git a/arch/arm/mach-imx/mach-vpr200.c b/arch/arm/mach-imx/mach-vpr200.c index 27a8f7e3ec08..5ff154c9a086 100644 --- a/arch/arm/mach-imx/mach-vpr200.c +++ b/arch/arm/mach-imx/mach-vpr200.c | |||
| @@ -268,6 +268,22 @@ static void __init vpr200_board_init(void) | |||
| 268 | 268 | ||
| 269 | imx35_add_fec(NULL); | 269 | imx35_add_fec(NULL); |
| 270 | imx35_add_imx2_wdt(); | 270 | imx35_add_imx2_wdt(); |
| 271 | |||
| 272 | imx35_add_imx_uart0(NULL); | ||
| 273 | imx35_add_imx_uart2(NULL); | ||
| 274 | |||
| 275 | imx35_add_ipu_core(); | ||
| 276 | imx35_add_mx3_sdc_fb(&mx3fb_pdata); | ||
| 277 | |||
| 278 | imx35_add_fsl_usb2_udc(&otg_device_pdata); | ||
| 279 | imx35_add_mxc_ehci_hs(&usb_host_pdata); | ||
| 280 | |||
| 281 | imx35_add_mxc_nand(&vpr200_nand_board_info); | ||
| 282 | imx35_add_sdhci_esdhc_imx(0, NULL); | ||
| 283 | } | ||
| 284 | |||
| 285 | static void __init vpr200_late_init(void) | ||
| 286 | { | ||
| 271 | imx_add_gpio_keys(&vpr200_gpio_keys_data); | 287 | imx_add_gpio_keys(&vpr200_gpio_keys_data); |
| 272 | 288 | ||
| 273 | platform_add_devices(devices, ARRAY_SIZE(devices)); | 289 | platform_add_devices(devices, ARRAY_SIZE(devices)); |
| @@ -282,18 +298,6 @@ static void __init vpr200_board_init(void) | |||
| 282 | else | 298 | else |
| 283 | gpio_direction_input(GPIO_PMIC_INT); | 299 | gpio_direction_input(GPIO_PMIC_INT); |
| 284 | 300 | ||
| 285 | imx35_add_imx_uart0(NULL); | ||
| 286 | imx35_add_imx_uart2(NULL); | ||
| 287 | |||
| 288 | imx35_add_ipu_core(); | ||
| 289 | imx35_add_mx3_sdc_fb(&mx3fb_pdata); | ||
| 290 | |||
| 291 | imx35_add_fsl_usb2_udc(&otg_device_pdata); | ||
| 292 | imx35_add_mxc_ehci_hs(&usb_host_pdata); | ||
| 293 | |||
| 294 | imx35_add_mxc_nand(&vpr200_nand_board_info); | ||
| 295 | imx35_add_sdhci_esdhc_imx(0, NULL); | ||
| 296 | |||
| 297 | vpr200_i2c_devices[1].irq = gpio_to_irq(GPIO_PMIC_INT); | 301 | vpr200_i2c_devices[1].irq = gpio_to_irq(GPIO_PMIC_INT); |
| 298 | i2c_register_board_info(0, vpr200_i2c_devices, | 302 | i2c_register_board_info(0, vpr200_i2c_devices, |
| 299 | ARRAY_SIZE(vpr200_i2c_devices)); | 303 | ARRAY_SIZE(vpr200_i2c_devices)); |
| @@ -313,5 +317,6 @@ MACHINE_START(VPR200, "VPR200") | |||
| 313 | .init_irq = mx35_init_irq, | 317 | .init_irq = mx35_init_irq, |
| 314 | .init_time = vpr200_timer_init, | 318 | .init_time = vpr200_timer_init, |
| 315 | .init_machine = vpr200_board_init, | 319 | .init_machine = vpr200_board_init, |
| 320 | .init_late = vpr200_late_init, | ||
| 316 | .restart = mxc_restart, | 321 | .restart = mxc_restart, |
| 317 | MACHINE_END | 322 | MACHINE_END |
diff --git a/arch/arm/mach-imx/mx31lilly-db.c b/arch/arm/mach-imx/mx31lilly-db.c index 649fe49ce85e..231f900a1de7 100644 --- a/arch/arm/mach-imx/mx31lilly-db.c +++ b/arch/arm/mach-imx/mx31lilly-db.c | |||
| @@ -43,18 +43,6 @@ | |||
| 43 | */ | 43 | */ |
| 44 | 44 | ||
| 45 | static unsigned int lilly_db_board_pins[] __initdata = { | 45 | static unsigned int lilly_db_board_pins[] __initdata = { |
| 46 | MX31_PIN_CTS1__CTS1, | ||
| 47 | MX31_PIN_RTS1__RTS1, | ||
| 48 | MX31_PIN_TXD1__TXD1, | ||
| 49 | MX31_PIN_RXD1__RXD1, | ||
| 50 | MX31_PIN_CTS2__CTS2, | ||
| 51 | MX31_PIN_RTS2__RTS2, | ||
| 52 | MX31_PIN_TXD2__TXD2, | ||
| 53 | MX31_PIN_RXD2__RXD2, | ||
| 54 | MX31_PIN_CSPI3_MOSI__RXD3, | ||
| 55 | MX31_PIN_CSPI3_MISO__TXD3, | ||
| 56 | MX31_PIN_CSPI3_SCLK__RTS3, | ||
| 57 | MX31_PIN_CSPI3_SPI_RDY__CTS3, | ||
| 58 | MX31_PIN_SD1_DATA3__SD1_DATA3, | 46 | MX31_PIN_SD1_DATA3__SD1_DATA3, |
| 59 | MX31_PIN_SD1_DATA2__SD1_DATA2, | 47 | MX31_PIN_SD1_DATA2__SD1_DATA2, |
| 60 | MX31_PIN_SD1_DATA1__SD1_DATA1, | 48 | MX31_PIN_SD1_DATA1__SD1_DATA1, |
| @@ -86,11 +74,6 @@ static unsigned int lilly_db_board_pins[] __initdata = { | |||
| 86 | MX31_PIN_CONTRAST__CONTRAST, | 74 | MX31_PIN_CONTRAST__CONTRAST, |
| 87 | }; | 75 | }; |
| 88 | 76 | ||
| 89 | /* UART */ | ||
| 90 | static const struct imxuart_platform_data uart_pdata __initconst = { | ||
| 91 | .flags = IMXUART_HAVE_RTSCTS, | ||
| 92 | }; | ||
| 93 | |||
| 94 | /* MMC support */ | 77 | /* MMC support */ |
| 95 | 78 | ||
| 96 | static int mxc_mmc1_get_ro(struct device *dev) | 79 | static int mxc_mmc1_get_ro(struct device *dev) |
| @@ -203,9 +186,6 @@ void __init mx31lilly_db_init(void) | |||
| 203 | mxc_iomux_setup_multiple_pins(lilly_db_board_pins, | 186 | mxc_iomux_setup_multiple_pins(lilly_db_board_pins, |
| 204 | ARRAY_SIZE(lilly_db_board_pins), | 187 | ARRAY_SIZE(lilly_db_board_pins), |
| 205 | "development board pins"); | 188 | "development board pins"); |
| 206 | imx31_add_imx_uart0(&uart_pdata); | ||
| 207 | imx31_add_imx_uart1(&uart_pdata); | ||
| 208 | imx31_add_imx_uart2(&uart_pdata); | ||
| 209 | imx31_add_mxc_mmc(0, &mmc_pdata); | 189 | imx31_add_mxc_mmc(0, &mmc_pdata); |
| 210 | mx31lilly_init_fb(); | 190 | mx31lilly_init_fb(); |
| 211 | } | 191 | } |
diff --git a/arch/arm/mach-imx/mx31lite-db.c b/arch/arm/mach-imx/mx31lite-db.c index 5a160b7e4fce..c66a006bf2fd 100644 --- a/arch/arm/mach-imx/mx31lite-db.c +++ b/arch/arm/mach-imx/mx31lite-db.c | |||
| @@ -45,19 +45,6 @@ | |||
| 45 | */ | 45 | */ |
| 46 | 46 | ||
| 47 | static unsigned int litekit_db_board_pins[] __initdata = { | 47 | static unsigned int litekit_db_board_pins[] __initdata = { |
| 48 | /* UART1 */ | ||
| 49 | MX31_PIN_CTS1__CTS1, | ||
| 50 | MX31_PIN_RTS1__RTS1, | ||
| 51 | MX31_PIN_TXD1__TXD1, | ||
| 52 | MX31_PIN_RXD1__RXD1, | ||
| 53 | /* SPI 0 */ | ||
| 54 | MX31_PIN_CSPI1_SCLK__SCLK, | ||
| 55 | MX31_PIN_CSPI1_MOSI__MOSI, | ||
| 56 | MX31_PIN_CSPI1_MISO__MISO, | ||
| 57 | MX31_PIN_CSPI1_SPI_RDY__SPI_RDY, | ||
| 58 | MX31_PIN_CSPI1_SS0__SS0, | ||
| 59 | MX31_PIN_CSPI1_SS1__SS1, | ||
| 60 | MX31_PIN_CSPI1_SS2__SS2, | ||
| 61 | /* SDHC1 */ | 48 | /* SDHC1 */ |
| 62 | MX31_PIN_SD1_DATA0__SD1_DATA0, | 49 | MX31_PIN_SD1_DATA0__SD1_DATA0, |
| 63 | MX31_PIN_SD1_DATA1__SD1_DATA1, | 50 | MX31_PIN_SD1_DATA1__SD1_DATA1, |
| @@ -67,11 +54,6 @@ static unsigned int litekit_db_board_pins[] __initdata = { | |||
| 67 | MX31_PIN_SD1_CMD__SD1_CMD, | 54 | MX31_PIN_SD1_CMD__SD1_CMD, |
| 68 | }; | 55 | }; |
| 69 | 56 | ||
| 70 | /* UART */ | ||
| 71 | static const struct imxuart_platform_data uart_pdata __initconst = { | ||
| 72 | .flags = IMXUART_HAVE_RTSCTS, | ||
| 73 | }; | ||
| 74 | |||
| 75 | /* MMC */ | 57 | /* MMC */ |
| 76 | 58 | ||
| 77 | static int gpio_det, gpio_wp; | 59 | static int gpio_det, gpio_wp; |
| @@ -146,19 +128,6 @@ static const struct imxmmc_platform_data mmc_pdata __initconst = { | |||
| 146 | .exit = mxc_mmc1_exit, | 128 | .exit = mxc_mmc1_exit, |
| 147 | }; | 129 | }; |
| 148 | 130 | ||
| 149 | /* SPI */ | ||
| 150 | |||
| 151 | static int spi_internal_chipselect[] = { | ||
| 152 | MXC_SPI_CS(0), | ||
| 153 | MXC_SPI_CS(1), | ||
| 154 | MXC_SPI_CS(2), | ||
| 155 | }; | ||
| 156 | |||
| 157 | static const struct spi_imx_master spi0_pdata __initconst = { | ||
| 158 | .chipselect = spi_internal_chipselect, | ||
| 159 | .num_chipselect = ARRAY_SIZE(spi_internal_chipselect), | ||
| 160 | }; | ||
| 161 | |||
| 162 | /* GPIO LEDs */ | 131 | /* GPIO LEDs */ |
| 163 | 132 | ||
| 164 | static const struct gpio_led litekit_leds[] __initconst = { | 133 | static const struct gpio_led litekit_leds[] __initconst = { |
| @@ -187,9 +156,7 @@ void __init mx31lite_db_init(void) | |||
| 187 | mxc_iomux_setup_multiple_pins(litekit_db_board_pins, | 156 | mxc_iomux_setup_multiple_pins(litekit_db_board_pins, |
| 188 | ARRAY_SIZE(litekit_db_board_pins), | 157 | ARRAY_SIZE(litekit_db_board_pins), |
| 189 | "development board pins"); | 158 | "development board pins"); |
| 190 | imx31_add_imx_uart0(&uart_pdata); | ||
| 191 | imx31_add_mxc_mmc(0, &mmc_pdata); | 159 | imx31_add_mxc_mmc(0, &mmc_pdata); |
| 192 | imx31_add_spi_imx0(&spi0_pdata); | ||
| 193 | gpio_led_register_device(-1, &litekit_led_platform_data); | 160 | gpio_led_register_device(-1, &litekit_led_platform_data); |
| 194 | imx31_add_imx2_wdt(); | 161 | imx31_add_imx2_wdt(); |
| 195 | imx31_add_mxc_rtc(); | 162 | imx31_add_mxc_rtc(); |
diff --git a/arch/arm/mach-imx/pm-imx6.c b/arch/arm/mach-imx/pm-imx6.c index fe708e26d021..1515e498d348 100644 --- a/arch/arm/mach-imx/pm-imx6.c +++ b/arch/arm/mach-imx/pm-imx6.c | |||
| @@ -217,7 +217,7 @@ struct imx6_cpu_pm_info { | |||
| 217 | u32 mmdc_io_val[MX6_MAX_MMDC_IO_NUM][2]; /* To save offset and value */ | 217 | u32 mmdc_io_val[MX6_MAX_MMDC_IO_NUM][2]; /* To save offset and value */ |
| 218 | } __aligned(8); | 218 | } __aligned(8); |
| 219 | 219 | ||
| 220 | void imx6q_set_int_mem_clk_lpm(bool enable) | 220 | void imx6_set_int_mem_clk_lpm(bool enable) |
| 221 | { | 221 | { |
| 222 | u32 val = readl_relaxed(ccm_base + CGPR); | 222 | u32 val = readl_relaxed(ccm_base + CGPR); |
| 223 | 223 | ||
| @@ -367,7 +367,7 @@ static int imx6q_pm_enter(suspend_state_t state) | |||
| 367 | switch (state) { | 367 | switch (state) { |
| 368 | case PM_SUSPEND_STANDBY: | 368 | case PM_SUSPEND_STANDBY: |
| 369 | imx6_set_lpm(STOP_POWER_ON); | 369 | imx6_set_lpm(STOP_POWER_ON); |
| 370 | imx6q_set_int_mem_clk_lpm(true); | 370 | imx6_set_int_mem_clk_lpm(true); |
| 371 | imx_gpc_pre_suspend(false); | 371 | imx_gpc_pre_suspend(false); |
| 372 | if (cpu_is_imx6sl()) | 372 | if (cpu_is_imx6sl()) |
| 373 | imx6sl_set_wait_clk(true); | 373 | imx6sl_set_wait_clk(true); |
| @@ -380,7 +380,7 @@ static int imx6q_pm_enter(suspend_state_t state) | |||
| 380 | break; | 380 | break; |
| 381 | case PM_SUSPEND_MEM: | 381 | case PM_SUSPEND_MEM: |
| 382 | imx6_set_lpm(STOP_POWER_OFF); | 382 | imx6_set_lpm(STOP_POWER_OFF); |
| 383 | imx6q_set_int_mem_clk_lpm(false); | 383 | imx6_set_int_mem_clk_lpm(false); |
| 384 | imx6q_enable_wb(true); | 384 | imx6q_enable_wb(true); |
| 385 | /* | 385 | /* |
| 386 | * For suspend into ocram, asm code already take care of | 386 | * For suspend into ocram, asm code already take care of |
| @@ -398,7 +398,7 @@ static int imx6q_pm_enter(suspend_state_t state) | |||
| 398 | imx_gpc_post_resume(); | 398 | imx_gpc_post_resume(); |
| 399 | imx6_enable_rbc(false); | 399 | imx6_enable_rbc(false); |
| 400 | imx6q_enable_wb(false); | 400 | imx6q_enable_wb(false); |
| 401 | imx6q_set_int_mem_clk_lpm(true); | 401 | imx6_set_int_mem_clk_lpm(true); |
| 402 | imx6_set_lpm(WAIT_CLOCKED); | 402 | imx6_set_lpm(WAIT_CLOCKED); |
| 403 | break; | 403 | break; |
| 404 | default: | 404 | default: |
diff --git a/arch/arm/mach-mv78xx0/common.c b/arch/arm/mach-mv78xx0/common.c index 6af5430d0d97..f72e1e9f5fc5 100644 --- a/arch/arm/mach-mv78xx0/common.c +++ b/arch/arm/mach-mv78xx0/common.c | |||
| @@ -219,7 +219,6 @@ void __init mv78xx0_ge01_init(struct mv643xx_eth_platform_data *eth_data) | |||
| 219 | { | 219 | { |
| 220 | orion_ge01_init(eth_data, | 220 | orion_ge01_init(eth_data, |
| 221 | GE01_PHYS_BASE, IRQ_MV78XX0_GE01_SUM, | 221 | GE01_PHYS_BASE, IRQ_MV78XX0_GE01_SUM, |
| 222 | NO_IRQ, | ||
| 223 | MV643XX_TX_CSUM_DEFAULT_LIMIT); | 222 | MV643XX_TX_CSUM_DEFAULT_LIMIT); |
| 224 | } | 223 | } |
| 225 | 224 | ||
| @@ -242,9 +241,7 @@ void __init mv78xx0_ge10_init(struct mv643xx_eth_platform_data *eth_data) | |||
| 242 | eth_data->duplex = DUPLEX_FULL; | 241 | eth_data->duplex = DUPLEX_FULL; |
| 243 | } | 242 | } |
| 244 | 243 | ||
| 245 | orion_ge10_init(eth_data, | 244 | orion_ge10_init(eth_data, GE10_PHYS_BASE, IRQ_MV78XX0_GE10_SUM); |
| 246 | GE10_PHYS_BASE, IRQ_MV78XX0_GE10_SUM, | ||
| 247 | NO_IRQ); | ||
| 248 | } | 245 | } |
| 249 | 246 | ||
| 250 | 247 | ||
| @@ -266,9 +263,7 @@ void __init mv78xx0_ge11_init(struct mv643xx_eth_platform_data *eth_data) | |||
| 266 | eth_data->duplex = DUPLEX_FULL; | 263 | eth_data->duplex = DUPLEX_FULL; |
| 267 | } | 264 | } |
| 268 | 265 | ||
| 269 | orion_ge11_init(eth_data, | 266 | orion_ge11_init(eth_data, GE11_PHYS_BASE, IRQ_MV78XX0_GE11_SUM); |
| 270 | GE11_PHYS_BASE, IRQ_MV78XX0_GE11_SUM, | ||
| 271 | NO_IRQ); | ||
| 272 | } | 267 | } |
| 273 | 268 | ||
| 274 | /***************************************************************************** | 269 | /***************************************************************************** |
diff --git a/arch/arm/mach-orion5x/common.c b/arch/arm/mach-orion5x/common.c index 058994e99570..04910764c385 100644 --- a/arch/arm/mach-orion5x/common.c +++ b/arch/arm/mach-orion5x/common.c | |||
| @@ -105,9 +105,9 @@ void __init orion5x_eth_init(struct mv643xx_eth_platform_data *eth_data) | |||
| 105 | /***************************************************************************** | 105 | /***************************************************************************** |
| 106 | * Ethernet switch | 106 | * Ethernet switch |
| 107 | ****************************************************************************/ | 107 | ****************************************************************************/ |
| 108 | void __init orion5x_eth_switch_init(struct dsa_platform_data *d, int irq) | 108 | void __init orion5x_eth_switch_init(struct dsa_platform_data *d) |
| 109 | { | 109 | { |
| 110 | orion_ge00_switch_init(d, irq); | 110 | orion_ge00_switch_init(d); |
| 111 | } | 111 | } |
| 112 | 112 | ||
| 113 | 113 | ||
diff --git a/arch/arm/mach-orion5x/common.h b/arch/arm/mach-orion5x/common.h index cd0389c6e822..8a4115bd441d 100644 --- a/arch/arm/mach-orion5x/common.h +++ b/arch/arm/mach-orion5x/common.h | |||
| @@ -41,7 +41,7 @@ void orion5x_setup_wins(void); | |||
| 41 | void orion5x_ehci0_init(void); | 41 | void orion5x_ehci0_init(void); |
| 42 | void orion5x_ehci1_init(void); | 42 | void orion5x_ehci1_init(void); |
| 43 | void orion5x_eth_init(struct mv643xx_eth_platform_data *eth_data); | 43 | void orion5x_eth_init(struct mv643xx_eth_platform_data *eth_data); |
| 44 | void orion5x_eth_switch_init(struct dsa_platform_data *d, int irq); | 44 | void orion5x_eth_switch_init(struct dsa_platform_data *d); |
| 45 | void orion5x_i2c_init(void); | 45 | void orion5x_i2c_init(void); |
| 46 | void orion5x_sata_init(struct mv_sata_platform_data *sata_data); | 46 | void orion5x_sata_init(struct mv_sata_platform_data *sata_data); |
| 47 | void orion5x_spi_init(void); | 47 | void orion5x_spi_init(void); |
diff --git a/arch/arm/mach-orion5x/rd88f5181l-fxo-setup.c b/arch/arm/mach-orion5x/rd88f5181l-fxo-setup.c index c742e7b40b0d..dccadf68ea2b 100644 --- a/arch/arm/mach-orion5x/rd88f5181l-fxo-setup.c +++ b/arch/arm/mach-orion5x/rd88f5181l-fxo-setup.c | |||
| @@ -101,7 +101,7 @@ static struct dsa_chip_data rd88f5181l_fxo_switch_chip_data = { | |||
| 101 | .port_names[7] = "lan3", | 101 | .port_names[7] = "lan3", |
| 102 | }; | 102 | }; |
| 103 | 103 | ||
| 104 | static struct dsa_platform_data rd88f5181l_fxo_switch_plat_data = { | 104 | static struct dsa_platform_data __initdata rd88f5181l_fxo_switch_plat_data = { |
| 105 | .nr_chips = 1, | 105 | .nr_chips = 1, |
| 106 | .chip = &rd88f5181l_fxo_switch_chip_data, | 106 | .chip = &rd88f5181l_fxo_switch_chip_data, |
| 107 | }; | 107 | }; |
| @@ -120,7 +120,7 @@ static void __init rd88f5181l_fxo_init(void) | |||
| 120 | */ | 120 | */ |
| 121 | orion5x_ehci0_init(); | 121 | orion5x_ehci0_init(); |
| 122 | orion5x_eth_init(&rd88f5181l_fxo_eth_data); | 122 | orion5x_eth_init(&rd88f5181l_fxo_eth_data); |
| 123 | orion5x_eth_switch_init(&rd88f5181l_fxo_switch_plat_data, NO_IRQ); | 123 | orion5x_eth_switch_init(&rd88f5181l_fxo_switch_plat_data); |
| 124 | orion5x_uart0_init(); | 124 | orion5x_uart0_init(); |
| 125 | 125 | ||
| 126 | mvebu_mbus_add_window_by_id(ORION_MBUS_DEVBUS_BOOT_TARGET, | 126 | mvebu_mbus_add_window_by_id(ORION_MBUS_DEVBUS_BOOT_TARGET, |
diff --git a/arch/arm/mach-orion5x/rd88f5181l-ge-setup.c b/arch/arm/mach-orion5x/rd88f5181l-ge-setup.c index 7e977b794b0c..affe5ec825de 100644 --- a/arch/arm/mach-orion5x/rd88f5181l-ge-setup.c +++ b/arch/arm/mach-orion5x/rd88f5181l-ge-setup.c | |||
| @@ -102,7 +102,7 @@ static struct dsa_chip_data rd88f5181l_ge_switch_chip_data = { | |||
| 102 | .port_names[7] = "lan3", | 102 | .port_names[7] = "lan3", |
| 103 | }; | 103 | }; |
| 104 | 104 | ||
| 105 | static struct dsa_platform_data rd88f5181l_ge_switch_plat_data = { | 105 | static struct dsa_platform_data __initdata rd88f5181l_ge_switch_plat_data = { |
| 106 | .nr_chips = 1, | 106 | .nr_chips = 1, |
| 107 | .chip = &rd88f5181l_ge_switch_chip_data, | 107 | .chip = &rd88f5181l_ge_switch_chip_data, |
| 108 | }; | 108 | }; |
| @@ -125,8 +125,7 @@ static void __init rd88f5181l_ge_init(void) | |||
| 125 | */ | 125 | */ |
| 126 | orion5x_ehci0_init(); | 126 | orion5x_ehci0_init(); |
| 127 | orion5x_eth_init(&rd88f5181l_ge_eth_data); | 127 | orion5x_eth_init(&rd88f5181l_ge_eth_data); |
| 128 | orion5x_eth_switch_init(&rd88f5181l_ge_switch_plat_data, | 128 | orion5x_eth_switch_init(&rd88f5181l_ge_switch_plat_data); |
| 129 | gpio_to_irq(8)); | ||
| 130 | orion5x_i2c_init(); | 129 | orion5x_i2c_init(); |
| 131 | orion5x_uart0_init(); | 130 | orion5x_uart0_init(); |
| 132 | 131 | ||
diff --git a/arch/arm/mach-orion5x/rd88f6183ap-ge-setup.c b/arch/arm/mach-orion5x/rd88f6183ap-ge-setup.c index 4bf80dd5478c..67ee8571b03c 100644 --- a/arch/arm/mach-orion5x/rd88f6183ap-ge-setup.c +++ b/arch/arm/mach-orion5x/rd88f6183ap-ge-setup.c | |||
| @@ -40,7 +40,7 @@ static struct dsa_chip_data rd88f6183ap_ge_switch_chip_data = { | |||
| 40 | .port_names[5] = "cpu", | 40 | .port_names[5] = "cpu", |
| 41 | }; | 41 | }; |
| 42 | 42 | ||
| 43 | static struct dsa_platform_data rd88f6183ap_ge_switch_plat_data = { | 43 | static struct dsa_platform_data __initdata rd88f6183ap_ge_switch_plat_data = { |
| 44 | .nr_chips = 1, | 44 | .nr_chips = 1, |
| 45 | .chip = &rd88f6183ap_ge_switch_chip_data, | 45 | .chip = &rd88f6183ap_ge_switch_chip_data, |
| 46 | }; | 46 | }; |
| @@ -71,7 +71,6 @@ static struct spi_board_info __initdata rd88f6183ap_ge_spi_slave_info[] = { | |||
| 71 | { | 71 | { |
| 72 | .modalias = "m25p80", | 72 | .modalias = "m25p80", |
| 73 | .platform_data = &rd88f6183ap_ge_spi_slave_data, | 73 | .platform_data = &rd88f6183ap_ge_spi_slave_data, |
| 74 | .irq = NO_IRQ, | ||
| 75 | .max_speed_hz = 20000000, | 74 | .max_speed_hz = 20000000, |
| 76 | .bus_num = 0, | 75 | .bus_num = 0, |
| 77 | .chip_select = 0, | 76 | .chip_select = 0, |
| @@ -90,8 +89,7 @@ static void __init rd88f6183ap_ge_init(void) | |||
| 90 | */ | 89 | */ |
| 91 | orion5x_ehci0_init(); | 90 | orion5x_ehci0_init(); |
| 92 | orion5x_eth_init(&rd88f6183ap_ge_eth_data); | 91 | orion5x_eth_init(&rd88f6183ap_ge_eth_data); |
| 93 | orion5x_eth_switch_init(&rd88f6183ap_ge_switch_plat_data, | 92 | orion5x_eth_switch_init(&rd88f6183ap_ge_switch_plat_data); |
| 94 | gpio_to_irq(3)); | ||
| 95 | spi_register_board_info(rd88f6183ap_ge_spi_slave_info, | 93 | spi_register_board_info(rd88f6183ap_ge_spi_slave_info, |
| 96 | ARRAY_SIZE(rd88f6183ap_ge_spi_slave_info)); | 94 | ARRAY_SIZE(rd88f6183ap_ge_spi_slave_info)); |
| 97 | orion5x_spi_init(); | 95 | orion5x_spi_init(); |
diff --git a/arch/arm/mach-orion5x/wnr854t-setup.c b/arch/arm/mach-orion5x/wnr854t-setup.c index 4e1e5c8f6111..4dbcdbe1de7c 100644 --- a/arch/arm/mach-orion5x/wnr854t-setup.c +++ b/arch/arm/mach-orion5x/wnr854t-setup.c | |||
| @@ -106,7 +106,7 @@ static struct dsa_chip_data wnr854t_switch_chip_data = { | |||
| 106 | .port_names[7] = "lan2", | 106 | .port_names[7] = "lan2", |
| 107 | }; | 107 | }; |
| 108 | 108 | ||
| 109 | static struct dsa_platform_data wnr854t_switch_plat_data = { | 109 | static struct dsa_platform_data __initdata wnr854t_switch_plat_data = { |
| 110 | .nr_chips = 1, | 110 | .nr_chips = 1, |
| 111 | .chip = &wnr854t_switch_chip_data, | 111 | .chip = &wnr854t_switch_chip_data, |
| 112 | }; | 112 | }; |
| @@ -124,7 +124,7 @@ static void __init wnr854t_init(void) | |||
| 124 | * Configure peripherals. | 124 | * Configure peripherals. |
| 125 | */ | 125 | */ |
| 126 | orion5x_eth_init(&wnr854t_eth_data); | 126 | orion5x_eth_init(&wnr854t_eth_data); |
| 127 | orion5x_eth_switch_init(&wnr854t_switch_plat_data, NO_IRQ); | 127 | orion5x_eth_switch_init(&wnr854t_switch_plat_data); |
| 128 | orion5x_uart0_init(); | 128 | orion5x_uart0_init(); |
| 129 | 129 | ||
| 130 | mvebu_mbus_add_window_by_id(ORION_MBUS_DEVBUS_BOOT_TARGET, | 130 | mvebu_mbus_add_window_by_id(ORION_MBUS_DEVBUS_BOOT_TARGET, |
diff --git a/arch/arm/mach-orion5x/wrt350n-v2-setup.c b/arch/arm/mach-orion5x/wrt350n-v2-setup.c index 61e9027ef224..a6a8c4648d74 100644 --- a/arch/arm/mach-orion5x/wrt350n-v2-setup.c +++ b/arch/arm/mach-orion5x/wrt350n-v2-setup.c | |||
| @@ -191,7 +191,7 @@ static struct dsa_chip_data wrt350n_v2_switch_chip_data = { | |||
| 191 | .port_names[7] = "lan4", | 191 | .port_names[7] = "lan4", |
| 192 | }; | 192 | }; |
| 193 | 193 | ||
| 194 | static struct dsa_platform_data wrt350n_v2_switch_plat_data = { | 194 | static struct dsa_platform_data __initdata wrt350n_v2_switch_plat_data = { |
| 195 | .nr_chips = 1, | 195 | .nr_chips = 1, |
| 196 | .chip = &wrt350n_v2_switch_chip_data, | 196 | .chip = &wrt350n_v2_switch_chip_data, |
| 197 | }; | 197 | }; |
| @@ -210,7 +210,7 @@ static void __init wrt350n_v2_init(void) | |||
| 210 | */ | 210 | */ |
| 211 | orion5x_ehci0_init(); | 211 | orion5x_ehci0_init(); |
| 212 | orion5x_eth_init(&wrt350n_v2_eth_data); | 212 | orion5x_eth_init(&wrt350n_v2_eth_data); |
| 213 | orion5x_eth_switch_init(&wrt350n_v2_switch_plat_data, NO_IRQ); | 213 | orion5x_eth_switch_init(&wrt350n_v2_switch_plat_data); |
| 214 | orion5x_uart0_init(); | 214 | orion5x_uart0_init(); |
| 215 | 215 | ||
| 216 | mvebu_mbus_add_window_by_id(ORION_MBUS_DEVBUS_BOOT_TARGET, | 216 | mvebu_mbus_add_window_by_id(ORION_MBUS_DEVBUS_BOOT_TARGET, |
diff --git a/arch/arm/mach-pxa/Kconfig b/arch/arm/mach-pxa/Kconfig index cd894d69e766..76fbc115ec33 100644 --- a/arch/arm/mach-pxa/Kconfig +++ b/arch/arm/mach-pxa/Kconfig | |||
| @@ -4,6 +4,17 @@ menu "Intel PXA2xx/PXA3xx Implementations" | |||
| 4 | 4 | ||
| 5 | comment "Intel/Marvell Dev Platforms (sorted by hardware release time)" | 5 | comment "Intel/Marvell Dev Platforms (sorted by hardware release time)" |
| 6 | 6 | ||
| 7 | config MACH_PXA25X_DT | ||
| 8 | bool "Support PXA25x platforms from device tree" | ||
| 9 | select PINCTRL | ||
| 10 | select POWER_SUPPLY | ||
| 11 | select PXA25x | ||
| 12 | select USE_OF | ||
| 13 | help | ||
| 14 | Include support for Marvell PXA25x based platforms using | ||
| 15 | the device tree. Needn't select any other machine while | ||
| 16 | MACH_PXA25x_DT is enabled. | ||
| 17 | |||
| 7 | config MACH_PXA27X_DT | 18 | config MACH_PXA27X_DT |
| 8 | bool "Support PXA27x platforms from device tree" | 19 | bool "Support PXA27x platforms from device tree" |
| 9 | select PINCTRL | 20 | select PINCTRL |
diff --git a/arch/arm/mach-pxa/Makefile b/arch/arm/mach-pxa/Makefile index 2ceed407eda9..ef25dc597f30 100644 --- a/arch/arm/mach-pxa/Makefile +++ b/arch/arm/mach-pxa/Makefile | |||
| @@ -19,8 +19,9 @@ obj-$(CONFIG_CPU_PXA930) += pxa930.o | |||
| 19 | # NOTE: keep the order of boards in accordance to their order in Kconfig | 19 | # NOTE: keep the order of boards in accordance to their order in Kconfig |
| 20 | 20 | ||
| 21 | # Device Tree support | 21 | # Device Tree support |
| 22 | obj-$(CONFIG_MACH_PXA3XX_DT) += pxa-dt.o | 22 | obj-$(CONFIG_MACH_PXA25X_DT) += pxa-dt.o |
| 23 | obj-$(CONFIG_MACH_PXA27X_DT) += pxa-dt.o | 23 | obj-$(CONFIG_MACH_PXA27X_DT) += pxa-dt.o |
| 24 | obj-$(CONFIG_MACH_PXA3XX_DT) += pxa-dt.o | ||
| 24 | 25 | ||
| 25 | # Intel/Marvell Dev Platforms | 26 | # Intel/Marvell Dev Platforms |
| 26 | obj-$(CONFIG_ARCH_LUBBOCK) += lubbock.o | 27 | obj-$(CONFIG_ARCH_LUBBOCK) += lubbock.o |
diff --git a/arch/arm/mach-pxa/corgi_pm.c b/arch/arm/mach-pxa/corgi_pm.c index d9206811be9b..c71c483f410e 100644 --- a/arch/arm/mach-pxa/corgi_pm.c +++ b/arch/arm/mach-pxa/corgi_pm.c | |||
| @@ -131,16 +131,11 @@ static int corgi_should_wakeup(unsigned int resume_on_alarm) | |||
| 131 | return is_resume; | 131 | return is_resume; |
| 132 | } | 132 | } |
| 133 | 133 | ||
| 134 | static unsigned long corgi_charger_wakeup(void) | 134 | static bool corgi_charger_wakeup(void) |
| 135 | { | 135 | { |
| 136 | unsigned long ret; | 136 | return !gpio_get_value(CORGI_GPIO_AC_IN) || |
| 137 | 137 | !gpio_get_value(CORGI_GPIO_KEY_INT) || | |
| 138 | ret = (!gpio_get_value(CORGI_GPIO_AC_IN) << GPIO_bit(CORGI_GPIO_AC_IN)) | 138 | !gpio_get_value(CORGI_GPIO_WAKEUP); |
| 139 | | (!gpio_get_value(CORGI_GPIO_KEY_INT) | ||
| 140 | << GPIO_bit(CORGI_GPIO_KEY_INT)) | ||
| 141 | | (!gpio_get_value(CORGI_GPIO_WAKEUP) | ||
| 142 | << GPIO_bit(CORGI_GPIO_WAKEUP)); | ||
| 143 | return ret; | ||
| 144 | } | 139 | } |
| 145 | 140 | ||
| 146 | unsigned long corgipm_read_devdata(int type) | 141 | unsigned long corgipm_read_devdata(int type) |
diff --git a/arch/arm/mach-pxa/devices.h b/arch/arm/mach-pxa/devices.h index 4a13c32fb705..04580c407276 100644 --- a/arch/arm/mach-pxa/devices.h +++ b/arch/arm/mach-pxa/devices.h | |||
| @@ -54,3 +54,4 @@ extern struct platform_device pxa3xx_device_gpio; | |||
| 54 | extern struct platform_device pxa93x_device_gpio; | 54 | extern struct platform_device pxa93x_device_gpio; |
| 55 | 55 | ||
| 56 | void __init pxa_register_device(struct platform_device *dev, void *data); | 56 | void __init pxa_register_device(struct platform_device *dev, void *data); |
| 57 | void __init pxa2xx_set_dmac_info(int nb_channels, int nb_requestors); | ||
diff --git a/arch/arm/mach-pxa/generic.h b/arch/arm/mach-pxa/generic.h index 0b1dbb54871a..75e3f611e5d8 100644 --- a/arch/arm/mach-pxa/generic.h +++ b/arch/arm/mach-pxa/generic.h | |||
| @@ -33,14 +33,12 @@ extern void __init pxa26x_init_irq(void); | |||
| 33 | 33 | ||
| 34 | #define pxa27x_handle_irq ichp_handle_irq | 34 | #define pxa27x_handle_irq ichp_handle_irq |
| 35 | extern int __init pxa27x_clocks_init(void); | 35 | extern int __init pxa27x_clocks_init(void); |
| 36 | extern void __init pxa27x_dt_init_irq(void); | ||
| 37 | extern unsigned pxa27x_get_clk_frequency_khz(int); | 36 | extern unsigned pxa27x_get_clk_frequency_khz(int); |
| 38 | extern void __init pxa27x_init_irq(void); | 37 | extern void __init pxa27x_init_irq(void); |
| 39 | extern void __init pxa27x_map_io(void); | 38 | extern void __init pxa27x_map_io(void); |
| 40 | 39 | ||
| 41 | #define pxa3xx_handle_irq ichp_handle_irq | 40 | #define pxa3xx_handle_irq ichp_handle_irq |
| 42 | extern int __init pxa3xx_clocks_init(void); | 41 | extern int __init pxa3xx_clocks_init(void); |
| 43 | extern void __init pxa3xx_dt_init_irq(void); | ||
| 44 | extern void __init pxa3xx_init_irq(void); | 42 | extern void __init pxa3xx_init_irq(void); |
| 45 | extern void __init pxa3xx_map_io(void); | 43 | extern void __init pxa3xx_map_io(void); |
| 46 | 44 | ||
diff --git a/arch/arm/mach-pxa/include/mach/dma.h b/arch/arm/mach-pxa/include/mach/dma.h index 5bd55894a48d..20026bdc6b24 100644 --- a/arch/arm/mach-pxa/include/mach/dma.h +++ b/arch/arm/mach-pxa/include/mach/dma.h | |||
| @@ -17,5 +17,4 @@ | |||
| 17 | /* DMA Controller Registers Definitions */ | 17 | /* DMA Controller Registers Definitions */ |
| 18 | #define DMAC_REGS_VIRT io_p2v(0x40000000) | 18 | #define DMAC_REGS_VIRT io_p2v(0x40000000) |
| 19 | 19 | ||
| 20 | #include <plat/dma.h> | ||
| 21 | #endif /* _ASM_ARCH_DMA_H */ | 20 | #endif /* _ASM_ARCH_DMA_H */ |
diff --git a/arch/arm/mach-pxa/magician.c b/arch/arm/mach-pxa/magician.c index 265f48be32c1..b413e36506af 100644 --- a/arch/arm/mach-pxa/magician.c +++ b/arch/arm/mach-pxa/magician.c | |||
| @@ -121,10 +121,6 @@ static unsigned long magician_pin_config[] __initdata = { | |||
| 121 | GPIO107_GPIO, /* DS1WM_IRQ */ | 121 | GPIO107_GPIO, /* DS1WM_IRQ */ |
| 122 | GPIO108_GPIO, /* GSM_READY */ | 122 | GPIO108_GPIO, /* GSM_READY */ |
| 123 | GPIO115_GPIO, /* nPEN_IRQ */ | 123 | GPIO115_GPIO, /* nPEN_IRQ */ |
| 124 | |||
| 125 | /* I2C */ | ||
| 126 | GPIO117_I2C_SCL, | ||
| 127 | GPIO118_I2C_SDA, | ||
| 128 | }; | 124 | }; |
| 129 | 125 | ||
| 130 | /* | 126 | /* |
diff --git a/arch/arm/mach-pxa/pm.c b/arch/arm/mach-pxa/pm.c index 388463b99090..e7450fb49d24 100644 --- a/arch/arm/mach-pxa/pm.c +++ b/arch/arm/mach-pxa/pm.c | |||
| @@ -104,8 +104,9 @@ static int __init pxa_pm_init(void) | |||
| 104 | return -EINVAL; | 104 | return -EINVAL; |
| 105 | } | 105 | } |
| 106 | 106 | ||
| 107 | sleep_save = kmalloc(pxa_cpu_pm_fns->save_count * sizeof(unsigned long), | 107 | sleep_save = kmalloc_array(pxa_cpu_pm_fns->save_count, |
| 108 | GFP_KERNEL); | 108 | sizeof(*sleep_save), |
| 109 | GFP_KERNEL); | ||
| 109 | if (!sleep_save) { | 110 | if (!sleep_save) { |
| 110 | printk(KERN_ERR "failed to alloc memory for pm save\n"); | 111 | printk(KERN_ERR "failed to alloc memory for pm save\n"); |
| 111 | return -ENOMEM; | 112 | return -ENOMEM; |
diff --git a/arch/arm/mach-pxa/pxa-dt.c b/arch/arm/mach-pxa/pxa-dt.c index f128133a8f30..aa9b255f5570 100644 --- a/arch/arm/mach-pxa/pxa-dt.c +++ b/arch/arm/mach-pxa/pxa-dt.c | |||
| @@ -18,20 +18,16 @@ | |||
| 18 | 18 | ||
| 19 | #include "generic.h" | 19 | #include "generic.h" |
| 20 | 20 | ||
| 21 | #ifdef CONFIG_PXA3xx | 21 | #ifdef CONFIG_PXA25x |
| 22 | static const char *const pxa3xx_dt_board_compat[] __initconst = { | 22 | static const char * const pxa25x_dt_board_compat[] __initconst = { |
| 23 | "marvell,pxa300", | 23 | "marvell,pxa250", |
| 24 | "marvell,pxa310", | ||
| 25 | "marvell,pxa320", | ||
| 26 | NULL, | 24 | NULL, |
| 27 | }; | 25 | }; |
| 28 | 26 | ||
| 29 | DT_MACHINE_START(PXA_DT, "Marvell PXA3xx (Device Tree Support)") | 27 | DT_MACHINE_START(PXA25X_DT, "Marvell PXA25x (Device Tree Support)") |
| 30 | .map_io = pxa3xx_map_io, | 28 | .map_io = pxa25x_map_io, |
| 31 | .init_irq = pxa3xx_dt_init_irq, | ||
| 32 | .handle_irq = pxa3xx_handle_irq, | ||
| 33 | .restart = pxa_restart, | 29 | .restart = pxa_restart, |
| 34 | .dt_compat = pxa3xx_dt_board_compat, | 30 | .dt_compat = pxa25x_dt_board_compat, |
| 35 | MACHINE_END | 31 | MACHINE_END |
| 36 | #endif | 32 | #endif |
| 37 | 33 | ||
| @@ -41,11 +37,24 @@ static const char * const pxa27x_dt_board_compat[] __initconst = { | |||
| 41 | NULL, | 37 | NULL, |
| 42 | }; | 38 | }; |
| 43 | 39 | ||
| 44 | DT_MACHINE_START(PXA27X_DT, "Marvell PXA2xx (Device Tree Support)") | 40 | DT_MACHINE_START(PXA27X_DT, "Marvell PXA27x (Device Tree Support)") |
| 45 | .map_io = pxa27x_map_io, | 41 | .map_io = pxa27x_map_io, |
| 46 | .init_irq = pxa27x_dt_init_irq, | ||
| 47 | .handle_irq = pxa27x_handle_irq, | ||
| 48 | .restart = pxa_restart, | 42 | .restart = pxa_restart, |
| 49 | .dt_compat = pxa27x_dt_board_compat, | 43 | .dt_compat = pxa27x_dt_board_compat, |
| 50 | MACHINE_END | 44 | MACHINE_END |
| 51 | #endif | 45 | #endif |
| 46 | |||
| 47 | #ifdef CONFIG_PXA3xx | ||
| 48 | static const char *const pxa3xx_dt_board_compat[] __initconst = { | ||
| 49 | "marvell,pxa300", | ||
| 50 | "marvell,pxa310", | ||
| 51 | "marvell,pxa320", | ||
| 52 | NULL, | ||
| 53 | }; | ||
| 54 | |||
| 55 | DT_MACHINE_START(PXA_DT, "Marvell PXA3xx (Device Tree Support)") | ||
| 56 | .map_io = pxa3xx_map_io, | ||
| 57 | .restart = pxa_restart, | ||
| 58 | .dt_compat = pxa3xx_dt_board_compat, | ||
| 59 | MACHINE_END | ||
| 60 | #endif | ||
diff --git a/arch/arm/mach-pxa/pxa25x.c b/arch/arm/mach-pxa/pxa25x.c index 823504f48f80..12b94357fbc1 100644 --- a/arch/arm/mach-pxa/pxa25x.c +++ b/arch/arm/mach-pxa/pxa25x.c | |||
| @@ -25,6 +25,7 @@ | |||
| 25 | #include <linux/suspend.h> | 25 | #include <linux/suspend.h> |
| 26 | #include <linux/syscore_ops.h> | 26 | #include <linux/syscore_ops.h> |
| 27 | #include <linux/irq.h> | 27 | #include <linux/irq.h> |
| 28 | #include <linux/irqchip.h> | ||
| 28 | 29 | ||
| 29 | #include <asm/mach/map.h> | 30 | #include <asm/mach/map.h> |
| 30 | #include <asm/suspend.h> | 31 | #include <asm/suspend.h> |
| @@ -151,6 +152,16 @@ void __init pxa26x_init_irq(void) | |||
| 151 | } | 152 | } |
| 152 | #endif | 153 | #endif |
| 153 | 154 | ||
| 155 | static int __init __init | ||
| 156 | pxa25x_dt_init_irq(struct device_node *node, struct device_node *parent) | ||
| 157 | { | ||
| 158 | pxa_dt_irq_init(pxa25x_set_wake); | ||
| 159 | set_handle_irq(ichp_handle_irq); | ||
| 160 | |||
| 161 | return 0; | ||
| 162 | } | ||
| 163 | IRQCHIP_DECLARE(pxa25x_intc, "marvell,pxa-intc", pxa25x_dt_init_irq); | ||
| 164 | |||
| 154 | static struct map_desc pxa25x_io_desc[] __initdata = { | 165 | static struct map_desc pxa25x_io_desc[] __initdata = { |
| 155 | { /* Mem Ctl */ | 166 | { /* Mem Ctl */ |
| 156 | .virtual = (unsigned long)SMEMC_VIRT, | 167 | .virtual = (unsigned long)SMEMC_VIRT, |
| @@ -198,20 +209,17 @@ static int __init pxa25x_init(void) | |||
| 198 | 209 | ||
| 199 | reset_status = RCSR; | 210 | reset_status = RCSR; |
| 200 | 211 | ||
| 201 | if ((ret = pxa_init_dma(IRQ_DMA, 16))) | ||
| 202 | return ret; | ||
| 203 | |||
| 204 | pxa25x_init_pm(); | 212 | pxa25x_init_pm(); |
| 205 | 213 | ||
| 206 | register_syscore_ops(&pxa_irq_syscore_ops); | 214 | register_syscore_ops(&pxa_irq_syscore_ops); |
| 207 | register_syscore_ops(&pxa2xx_mfp_syscore_ops); | 215 | register_syscore_ops(&pxa2xx_mfp_syscore_ops); |
| 208 | 216 | ||
| 209 | pxa2xx_set_dmac_info(16, 40); | 217 | if (!of_have_populated_dt()) { |
| 210 | pxa_register_device(&pxa25x_device_gpio, &pxa25x_gpio_info); | 218 | pxa2xx_set_dmac_info(16, 40); |
| 211 | ret = platform_add_devices(pxa25x_devices, | 219 | pxa_register_device(&pxa25x_device_gpio, &pxa25x_gpio_info); |
| 212 | ARRAY_SIZE(pxa25x_devices)); | 220 | ret = platform_add_devices(pxa25x_devices, |
| 213 | if (ret) | 221 | ARRAY_SIZE(pxa25x_devices)); |
| 214 | return ret; | 222 | } |
| 215 | } | 223 | } |
| 216 | 224 | ||
| 217 | return ret; | 225 | return ret; |
diff --git a/arch/arm/mach-pxa/pxa27x.c b/arch/arm/mach-pxa/pxa27x.c index 2eaa341dd3f8..c0185c5c5a08 100644 --- a/arch/arm/mach-pxa/pxa27x.c +++ b/arch/arm/mach-pxa/pxa27x.c | |||
| @@ -16,6 +16,7 @@ | |||
| 16 | #include <linux/module.h> | 16 | #include <linux/module.h> |
| 17 | #include <linux/kernel.h> | 17 | #include <linux/kernel.h> |
| 18 | #include <linux/init.h> | 18 | #include <linux/init.h> |
| 19 | #include <linux/irqchip.h> | ||
| 19 | #include <linux/suspend.h> | 20 | #include <linux/suspend.h> |
| 20 | #include <linux/platform_device.h> | 21 | #include <linux/platform_device.h> |
| 21 | #include <linux/syscore_ops.h> | 22 | #include <linux/syscore_ops.h> |
| @@ -233,11 +234,15 @@ void __init pxa27x_init_irq(void) | |||
| 233 | pxa_init_irq(34, pxa27x_set_wake); | 234 | pxa_init_irq(34, pxa27x_set_wake); |
| 234 | } | 235 | } |
| 235 | 236 | ||
| 236 | void __init pxa27x_dt_init_irq(void) | 237 | static int __init |
| 238 | pxa27x_dt_init_irq(struct device_node *node, struct device_node *parent) | ||
| 237 | { | 239 | { |
| 238 | if (IS_ENABLED(CONFIG_OF)) | 240 | pxa_dt_irq_init(pxa27x_set_wake); |
| 239 | pxa_dt_irq_init(pxa27x_set_wake); | 241 | set_handle_irq(ichp_handle_irq); |
| 242 | |||
| 243 | return 0; | ||
| 240 | } | 244 | } |
| 245 | IRQCHIP_DECLARE(pxa27x_intc, "marvell,pxa-intc", pxa27x_dt_init_irq); | ||
| 241 | 246 | ||
| 242 | static struct map_desc pxa27x_io_desc[] __initdata = { | 247 | static struct map_desc pxa27x_io_desc[] __initdata = { |
| 243 | { /* Mem Ctl */ | 248 | { /* Mem Ctl */ |
| @@ -300,9 +305,6 @@ static int __init pxa27x_init(void) | |||
| 300 | 305 | ||
| 301 | reset_status = RCSR; | 306 | reset_status = RCSR; |
| 302 | 307 | ||
| 303 | if ((ret = pxa_init_dma(IRQ_DMA, 32))) | ||
| 304 | return ret; | ||
| 305 | |||
| 306 | pxa27x_init_pm(); | 308 | pxa27x_init_pm(); |
| 307 | 309 | ||
| 308 | register_syscore_ops(&pxa_irq_syscore_ops); | 310 | register_syscore_ops(&pxa_irq_syscore_ops); |
diff --git a/arch/arm/mach-pxa/pxa3xx.c b/arch/arm/mach-pxa/pxa3xx.c index 3c9184d1d6b9..87acc96388c7 100644 --- a/arch/arm/mach-pxa/pxa3xx.c +++ b/arch/arm/mach-pxa/pxa3xx.c | |||
| @@ -19,6 +19,7 @@ | |||
| 19 | #include <linux/pm.h> | 19 | #include <linux/pm.h> |
| 20 | #include <linux/platform_device.h> | 20 | #include <linux/platform_device.h> |
| 21 | #include <linux/irq.h> | 21 | #include <linux/irq.h> |
| 22 | #include <linux/irqchip.h> | ||
| 22 | #include <linux/io.h> | 23 | #include <linux/io.h> |
| 23 | #include <linux/of.h> | 24 | #include <linux/of.h> |
| 24 | #include <linux/syscore_ops.h> | 25 | #include <linux/syscore_ops.h> |
| @@ -356,11 +357,16 @@ void __init pxa3xx_init_irq(void) | |||
| 356 | } | 357 | } |
| 357 | 358 | ||
| 358 | #ifdef CONFIG_OF | 359 | #ifdef CONFIG_OF |
| 359 | void __init pxa3xx_dt_init_irq(void) | 360 | static int __init __init |
| 361 | pxa3xx_dt_init_irq(struct device_node *node, struct device_node *parent) | ||
| 360 | { | 362 | { |
| 361 | __pxa3xx_init_irq(); | 363 | __pxa3xx_init_irq(); |
| 362 | pxa_dt_irq_init(pxa3xx_set_wake); | 364 | pxa_dt_irq_init(pxa3xx_set_wake); |
| 365 | set_handle_irq(ichp_handle_irq); | ||
| 366 | |||
| 367 | return 0; | ||
| 363 | } | 368 | } |
| 369 | IRQCHIP_DECLARE(pxa3xx_intc, "marvell,pxa-intc", pxa3xx_dt_init_irq); | ||
| 364 | #endif /* CONFIG_OF */ | 370 | #endif /* CONFIG_OF */ |
| 365 | 371 | ||
| 366 | static struct map_desc pxa3xx_io_desc[] __initdata = { | 372 | static struct map_desc pxa3xx_io_desc[] __initdata = { |
| @@ -438,9 +444,6 @@ static int __init pxa3xx_init(void) | |||
| 438 | */ | 444 | */ |
| 439 | NDCR = (NDCR & ~NDCR_ND_ARB_EN) | NDCR_ND_ARB_CNTL; | 445 | NDCR = (NDCR & ~NDCR_ND_ARB_EN) | NDCR_ND_ARB_CNTL; |
| 440 | 446 | ||
| 441 | if ((ret = pxa_init_dma(IRQ_DMA, 32))) | ||
| 442 | return ret; | ||
| 443 | |||
| 444 | pxa3xx_init_pm(); | 447 | pxa3xx_init_pm(); |
| 445 | 448 | ||
| 446 | register_syscore_ops(&pxa_irq_syscore_ops); | 449 | register_syscore_ops(&pxa_irq_syscore_ops); |
diff --git a/arch/arm/mach-pxa/pxa_cplds_irqs.c b/arch/arm/mach-pxa/pxa_cplds_irqs.c index 2385052b0ce1..e362f865fcd2 100644 --- a/arch/arm/mach-pxa/pxa_cplds_irqs.c +++ b/arch/arm/mach-pxa/pxa_cplds_irqs.c | |||
| @@ -41,30 +41,35 @@ static irqreturn_t cplds_irq_handler(int in_irq, void *d) | |||
| 41 | unsigned long pending; | 41 | unsigned long pending; |
| 42 | unsigned int bit; | 42 | unsigned int bit; |
| 43 | 43 | ||
| 44 | pending = readl(fpga->base + FPGA_IRQ_SET_CLR) & fpga->irq_mask; | 44 | do { |
| 45 | for_each_set_bit(bit, &pending, CPLDS_NB_IRQ) | 45 | pending = readl(fpga->base + FPGA_IRQ_SET_CLR) & fpga->irq_mask; |
| 46 | generic_handle_irq(irq_find_mapping(fpga->irqdomain, bit)); | 46 | for_each_set_bit(bit, &pending, CPLDS_NB_IRQ) { |
| 47 | generic_handle_irq(irq_find_mapping(fpga->irqdomain, | ||
| 48 | bit)); | ||
| 49 | } | ||
| 50 | } while (pending); | ||
| 47 | 51 | ||
| 48 | return IRQ_HANDLED; | 52 | return IRQ_HANDLED; |
| 49 | } | 53 | } |
| 50 | 54 | ||
| 51 | static void cplds_irq_mask_ack(struct irq_data *d) | 55 | static void cplds_irq_mask(struct irq_data *d) |
| 52 | { | 56 | { |
| 53 | struct cplds *fpga = irq_data_get_irq_chip_data(d); | 57 | struct cplds *fpga = irq_data_get_irq_chip_data(d); |
| 54 | unsigned int cplds_irq = irqd_to_hwirq(d); | 58 | unsigned int cplds_irq = irqd_to_hwirq(d); |
| 55 | unsigned int set, bit = BIT(cplds_irq); | 59 | unsigned int bit = BIT(cplds_irq); |
| 56 | 60 | ||
| 57 | fpga->irq_mask &= ~bit; | 61 | fpga->irq_mask &= ~bit; |
| 58 | writel(fpga->irq_mask, fpga->base + FPGA_IRQ_MASK_EN); | 62 | writel(fpga->irq_mask, fpga->base + FPGA_IRQ_MASK_EN); |
| 59 | set = readl(fpga->base + FPGA_IRQ_SET_CLR); | ||
| 60 | writel(set & ~bit, fpga->base + FPGA_IRQ_SET_CLR); | ||
| 61 | } | 63 | } |
| 62 | 64 | ||
| 63 | static void cplds_irq_unmask(struct irq_data *d) | 65 | static void cplds_irq_unmask(struct irq_data *d) |
| 64 | { | 66 | { |
| 65 | struct cplds *fpga = irq_data_get_irq_chip_data(d); | 67 | struct cplds *fpga = irq_data_get_irq_chip_data(d); |
| 66 | unsigned int cplds_irq = irqd_to_hwirq(d); | 68 | unsigned int cplds_irq = irqd_to_hwirq(d); |
| 67 | unsigned int bit = BIT(cplds_irq); | 69 | unsigned int set, bit = BIT(cplds_irq); |
| 70 | |||
| 71 | set = readl(fpga->base + FPGA_IRQ_SET_CLR); | ||
| 72 | writel(set & ~bit, fpga->base + FPGA_IRQ_SET_CLR); | ||
| 68 | 73 | ||
| 69 | fpga->irq_mask |= bit; | 74 | fpga->irq_mask |= bit; |
| 70 | writel(fpga->irq_mask, fpga->base + FPGA_IRQ_MASK_EN); | 75 | writel(fpga->irq_mask, fpga->base + FPGA_IRQ_MASK_EN); |
| @@ -72,7 +77,8 @@ static void cplds_irq_unmask(struct irq_data *d) | |||
| 72 | 77 | ||
| 73 | static struct irq_chip cplds_irq_chip = { | 78 | static struct irq_chip cplds_irq_chip = { |
| 74 | .name = "pxa_cplds", | 79 | .name = "pxa_cplds", |
| 75 | .irq_mask_ack = cplds_irq_mask_ack, | 80 | .irq_ack = cplds_irq_mask, |
| 81 | .irq_mask = cplds_irq_mask, | ||
| 76 | .irq_unmask = cplds_irq_unmask, | 82 | .irq_unmask = cplds_irq_unmask, |
| 77 | .flags = IRQCHIP_MASK_ON_SUSPEND | IRQCHIP_SKIP_SET_WAKE, | 83 | .flags = IRQCHIP_MASK_ON_SUSPEND | IRQCHIP_SKIP_SET_WAKE, |
| 78 | }; | 84 | }; |
diff --git a/arch/arm/mach-pxa/sharpsl_pm.c b/arch/arm/mach-pxa/sharpsl_pm.c index b80eab9993c5..249b7bd5fbc4 100644 --- a/arch/arm/mach-pxa/sharpsl_pm.c +++ b/arch/arm/mach-pxa/sharpsl_pm.c | |||
| @@ -744,7 +744,7 @@ static int sharpsl_off_charge_battery(void) | |||
| 744 | time = RCNR; | 744 | time = RCNR; |
| 745 | while (1) { | 745 | while (1) { |
| 746 | /* Check if any wakeup event had occurred */ | 746 | /* Check if any wakeup event had occurred */ |
| 747 | if (sharpsl_pm.machinfo->charger_wakeup() != 0) | 747 | if (sharpsl_pm.machinfo->charger_wakeup()) |
| 748 | return 0; | 748 | return 0; |
| 749 | /* Check for timeout */ | 749 | /* Check for timeout */ |
| 750 | if ((RCNR - time) > SHARPSL_WAIT_CO_TIME) | 750 | if ((RCNR - time) > SHARPSL_WAIT_CO_TIME) |
diff --git a/arch/arm/mach-pxa/sharpsl_pm.h b/arch/arm/mach-pxa/sharpsl_pm.h index 905be6755f04..fa75b6df8134 100644 --- a/arch/arm/mach-pxa/sharpsl_pm.h +++ b/arch/arm/mach-pxa/sharpsl_pm.h | |||
| @@ -34,7 +34,7 @@ struct sharpsl_charger_machinfo { | |||
| 34 | #define SHARPSL_STATUS_LOCK 5 | 34 | #define SHARPSL_STATUS_LOCK 5 |
| 35 | #define SHARPSL_STATUS_CHRGFULL 6 | 35 | #define SHARPSL_STATUS_CHRGFULL 6 |
| 36 | #define SHARPSL_STATUS_FATAL 7 | 36 | #define SHARPSL_STATUS_FATAL 7 |
| 37 | unsigned long (*charger_wakeup)(void); | 37 | bool (*charger_wakeup)(void); |
| 38 | int (*should_wakeup)(unsigned int resume_on_alarm); | 38 | int (*should_wakeup)(unsigned int resume_on_alarm); |
| 39 | void (*backlight_limit)(int); | 39 | void (*backlight_limit)(int); |
| 40 | int (*backlight_get_status) (void); | 40 | int (*backlight_get_status) (void); |
diff --git a/arch/arm/mach-pxa/spitz_pm.c b/arch/arm/mach-pxa/spitz_pm.c index ea9f9034cb54..4e64a140252e 100644 --- a/arch/arm/mach-pxa/spitz_pm.c +++ b/arch/arm/mach-pxa/spitz_pm.c | |||
| @@ -165,13 +165,10 @@ static int spitz_should_wakeup(unsigned int resume_on_alarm) | |||
| 165 | return is_resume; | 165 | return is_resume; |
| 166 | } | 166 | } |
| 167 | 167 | ||
| 168 | static unsigned long spitz_charger_wakeup(void) | 168 | static bool spitz_charger_wakeup(void) |
| 169 | { | 169 | { |
| 170 | unsigned long ret; | 170 | return !gpio_get_value(SPITZ_GPIO_KEY_INT) || |
| 171 | ret = ((!gpio_get_value(SPITZ_GPIO_KEY_INT) | 171 | gpio_get_value(SPITZ_GPIO_SYNC); |
| 172 | << GPIO_bit(SPITZ_GPIO_KEY_INT)) | ||
| 173 | | gpio_get_value(SPITZ_GPIO_SYNC)); | ||
| 174 | return ret; | ||
| 175 | } | 172 | } |
| 176 | 173 | ||
| 177 | unsigned long spitzpm_read_devdata(int type) | 174 | unsigned long spitzpm_read_devdata(int type) |
diff --git a/arch/arm/mach-qcom/Makefile b/arch/arm/mach-qcom/Makefile index e324375fa919..12878e9a2c0c 100644 --- a/arch/arm/mach-qcom/Makefile +++ b/arch/arm/mach-qcom/Makefile | |||
| @@ -1,2 +1 @@ | |||
| 1 | obj-y := board.o | ||
| 2 | obj-$(CONFIG_SMP) += platsmp.o | obj-$(CONFIG_SMP) += platsmp.o | |
diff --git a/arch/arm/mach-qcom/board.c b/arch/arm/mach-qcom/board.c deleted file mode 100644 index d8060dfd1a21..000000000000 --- a/arch/arm/mach-qcom/board.c +++ /dev/null | |||
| @@ -1,31 +0,0 @@ | |||
| 1 | /* Copyright (c) 2010-2014 The Linux Foundation. All rights reserved. | ||
| 2 | * | ||
| 3 | * This program is free software; you can redistribute it and/or modify | ||
| 4 | * it under the terms of the GNU General Public License version 2 and | ||
| 5 | * only version 2 as published by the Free Software Foundation. | ||
| 6 | * | ||
| 7 | * This program is distributed in the hope that it will be useful, | ||
| 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 10 | * GNU General Public License for more details. | ||
| 11 | */ | ||
| 12 | |||
| 13 | #include <linux/init.h> | ||
| 14 | |||
| 15 | #include <asm/mach/arch.h> | ||
| 16 | |||
| 17 | static const char * const qcom_dt_match[] __initconst = { | ||
| 18 | "qcom,apq8064", | ||
| 19 | "qcom,apq8074-dragonboard", | ||
| 20 | "qcom,apq8084", | ||
| 21 | "qcom,ipq8062", | ||
| 22 | "qcom,ipq8064", | ||
| 23 | "qcom,msm8660-surf", | ||
| 24 | "qcom,msm8960-cdp", | ||
| 25 | "qcom,mdm9615", | ||
| 26 | NULL | ||
| 27 | }; | ||
| 28 | |||
| 29 | DT_MACHINE_START(QCOM_DT, "Qualcomm (Flattened Device Tree)") | ||
| 30 | .dt_compat = qcom_dt_match, | ||
| 31 | MACHINE_END | ||
diff --git a/arch/arm/mach-s3c24xx/common.c b/arch/arm/mach-s3c24xx/common.c index ba0ceebdd73d..f6c3f151d0d4 100644 --- a/arch/arm/mach-s3c24xx/common.c +++ b/arch/arm/mach-s3c24xx/common.c | |||
| @@ -21,7 +21,7 @@ | |||
| 21 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 21 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
| 22 | */ | 22 | */ |
| 23 | 23 | ||
| 24 | 24 | #include <linux/dma-mapping.h> | |
| 25 | #include <linux/init.h> | 25 | #include <linux/init.h> |
| 26 | #include <linux/module.h> | 26 | #include <linux/module.h> |
| 27 | #include <linux/interrupt.h> | 27 | #include <linux/interrupt.h> |
| @@ -305,6 +305,8 @@ struct s3c24xx_uart_resources s3c2410_uart_resources[] __initdata = { | |||
| 305 | }, | 305 | }, |
| 306 | }; | 306 | }; |
| 307 | 307 | ||
| 308 | #define s3c24xx_device_dma_mask (*((u64[]) { DMA_BIT_MASK(32) })) | ||
| 309 | |||
| 308 | #if defined(CONFIG_CPU_S3C2410) || defined(CONFIG_CPU_S3C2412) || \ | 310 | #if defined(CONFIG_CPU_S3C2410) || defined(CONFIG_CPU_S3C2412) || \ |
| 309 | defined(CONFIG_CPU_S3C2440) || defined(CONFIG_CPU_S3C2442) | 311 | defined(CONFIG_CPU_S3C2440) || defined(CONFIG_CPU_S3C2442) |
| 310 | static struct resource s3c2410_dma_resource[] = { | 312 | static struct resource s3c2410_dma_resource[] = { |
| @@ -355,7 +357,9 @@ struct platform_device s3c2410_device_dma = { | |||
| 355 | .num_resources = ARRAY_SIZE(s3c2410_dma_resource), | 357 | .num_resources = ARRAY_SIZE(s3c2410_dma_resource), |
| 356 | .resource = s3c2410_dma_resource, | 358 | .resource = s3c2410_dma_resource, |
| 357 | .dev = { | 359 | .dev = { |
| 358 | .platform_data = &s3c2410_dma_platdata, | 360 | .dma_mask = &s3c24xx_device_dma_mask, |
| 361 | .coherent_dma_mask = DMA_BIT_MASK(32), | ||
| 362 | .platform_data = &s3c2410_dma_platdata, | ||
| 359 | }, | 363 | }, |
| 360 | }; | 364 | }; |
| 361 | #endif | 365 | #endif |
| @@ -396,7 +400,9 @@ struct platform_device s3c2412_device_dma = { | |||
| 396 | .num_resources = ARRAY_SIZE(s3c2410_dma_resource), | 400 | .num_resources = ARRAY_SIZE(s3c2410_dma_resource), |
| 397 | .resource = s3c2410_dma_resource, | 401 | .resource = s3c2410_dma_resource, |
| 398 | .dev = { | 402 | .dev = { |
| 399 | .platform_data = &s3c2412_dma_platdata, | 403 | .dma_mask = &s3c24xx_device_dma_mask, |
| 404 | .coherent_dma_mask = DMA_BIT_MASK(32), | ||
| 405 | .platform_data = &s3c2412_dma_platdata, | ||
| 400 | }, | 406 | }, |
| 401 | }; | 407 | }; |
| 402 | #endif | 408 | #endif |
| @@ -486,7 +492,9 @@ struct platform_device s3c2440_device_dma = { | |||
| 486 | .num_resources = ARRAY_SIZE(s3c2410_dma_resource), | 492 | .num_resources = ARRAY_SIZE(s3c2410_dma_resource), |
| 487 | .resource = s3c2410_dma_resource, | 493 | .resource = s3c2410_dma_resource, |
| 488 | .dev = { | 494 | .dev = { |
| 489 | .platform_data = &s3c2440_dma_platdata, | 495 | .dma_mask = &s3c24xx_device_dma_mask, |
| 496 | .coherent_dma_mask = DMA_BIT_MASK(32), | ||
| 497 | .platform_data = &s3c2440_dma_platdata, | ||
| 490 | }, | 498 | }, |
| 491 | }; | 499 | }; |
| 492 | #endif | 500 | #endif |
| @@ -538,7 +546,9 @@ struct platform_device s3c2443_device_dma = { | |||
| 538 | .num_resources = ARRAY_SIZE(s3c2443_dma_resource), | 546 | .num_resources = ARRAY_SIZE(s3c2443_dma_resource), |
| 539 | .resource = s3c2443_dma_resource, | 547 | .resource = s3c2443_dma_resource, |
| 540 | .dev = { | 548 | .dev = { |
| 541 | .platform_data = &s3c2443_dma_platdata, | 549 | .dma_mask = &s3c24xx_device_dma_mask, |
| 550 | .coherent_dma_mask = DMA_BIT_MASK(32), | ||
| 551 | .platform_data = &s3c2443_dma_platdata, | ||
| 542 | }, | 552 | }, |
| 543 | }; | 553 | }; |
| 544 | #endif | 554 | #endif |
diff --git a/arch/arm/mach-s3c24xx/mach-mini2440.c b/arch/arm/mach-s3c24xx/mach-mini2440.c index 13999c1c46cf..ec60bd4a1646 100644 --- a/arch/arm/mach-s3c24xx/mach-mini2440.c +++ b/arch/arm/mach-s3c24xx/mach-mini2440.c | |||
| @@ -535,6 +535,7 @@ static struct platform_device *mini2440_devices[] __initdata = { | |||
| 535 | &mini2440_button_device, | 535 | &mini2440_button_device, |
| 536 | &s3c_device_nand, | 536 | &s3c_device_nand, |
| 537 | &s3c_device_sdi, | 537 | &s3c_device_sdi, |
| 538 | &s3c2440_device_dma, | ||
| 538 | &s3c_device_iis, | 539 | &s3c_device_iis, |
| 539 | &uda1340_codec, | 540 | &uda1340_codec, |
| 540 | &mini2440_audio, | 541 | &mini2440_audio, |
diff --git a/arch/arm/mach-s3c64xx/mach-crag6410-module.c b/arch/arm/mach-s3c64xx/mach-crag6410-module.c index 571f95cc5a53..ccc3ab8d58e7 100644 --- a/arch/arm/mach-s3c64xx/mach-crag6410-module.c +++ b/arch/arm/mach-s3c64xx/mach-crag6410-module.c | |||
| @@ -393,8 +393,7 @@ static const struct i2c_device_id wlf_gf_module_id[] = { | |||
| 393 | 393 | ||
| 394 | static struct i2c_driver wlf_gf_module_driver = { | 394 | static struct i2c_driver wlf_gf_module_driver = { |
| 395 | .driver = { | 395 | .driver = { |
| 396 | .name = "wlf-gf-module", | 396 | .name = "wlf-gf-module" |
| 397 | .owner = THIS_MODULE, | ||
| 398 | }, | 397 | }, |
| 399 | .probe = wlf_gf_module_probe, | 398 | .probe = wlf_gf_module_probe, |
| 400 | .id_table = wlf_gf_module_id, | 399 | .id_table = wlf_gf_module_id, |
diff --git a/arch/arm/mach-shmobile/setup-r8a7790.c b/arch/arm/mach-shmobile/setup-r8a7790.c index 3506327e0bed..78d3e859bd64 100644 --- a/arch/arm/mach-shmobile/setup-r8a7790.c +++ b/arch/arm/mach-shmobile/setup-r8a7790.c | |||
| @@ -28,7 +28,7 @@ static const char * const r8a7790_boards_compat_dt[] __initconst = { | |||
| 28 | }; | 28 | }; |
| 29 | 29 | ||
| 30 | DT_MACHINE_START(R8A7790_DT, "Generic R8A7790 (Flattened Device Tree)") | 30 | DT_MACHINE_START(R8A7790_DT, "Generic R8A7790 (Flattened Device Tree)") |
| 31 | .smp_init = shmobile_smp_init_fallback_ops, | 31 | .smp_init = smp_init_ops(shmobile_smp_init_fallback_ops), |
| 32 | .smp = smp_ops(r8a7790_smp_ops), | 32 | .smp = smp_ops(r8a7790_smp_ops), |
| 33 | .init_early = shmobile_init_delay, | 33 | .init_early = shmobile_init_delay, |
| 34 | .init_time = rcar_gen2_timer_init, | 34 | .init_time = rcar_gen2_timer_init, |
diff --git a/arch/arm/mach-shmobile/setup-r8a7791.c b/arch/arm/mach-shmobile/setup-r8a7791.c index 110e8b588e56..26e2d181a190 100644 --- a/arch/arm/mach-shmobile/setup-r8a7791.c +++ b/arch/arm/mach-shmobile/setup-r8a7791.c | |||
| @@ -29,7 +29,7 @@ static const char *const r8a7791_boards_compat_dt[] __initconst = { | |||
| 29 | }; | 29 | }; |
| 30 | 30 | ||
| 31 | DT_MACHINE_START(R8A7791_DT, "Generic R8A7791 (Flattened Device Tree)") | 31 | DT_MACHINE_START(R8A7791_DT, "Generic R8A7791 (Flattened Device Tree)") |
| 32 | .smp_init = shmobile_smp_init_fallback_ops, | 32 | .smp_init = smp_init_ops(shmobile_smp_init_fallback_ops), |
| 33 | .smp = smp_ops(r8a7791_smp_ops), | 33 | .smp = smp_ops(r8a7791_smp_ops), |
| 34 | .init_early = shmobile_init_delay, | 34 | .init_early = shmobile_init_delay, |
| 35 | .init_time = rcar_gen2_timer_init, | 35 | .init_time = rcar_gen2_timer_init, |
diff --git a/arch/arm/mach-sunxi/Kconfig b/arch/arm/mach-sunxi/Kconfig index 096ed216c6d5..b9863f9a35fa 100644 --- a/arch/arm/mach-sunxi/Kconfig +++ b/arch/arm/mach-sunxi/Kconfig | |||
| @@ -32,6 +32,7 @@ config MACH_SUN7I | |||
| 32 | default ARCH_SUNXI | 32 | default ARCH_SUNXI |
| 33 | select ARM_GIC | 33 | select ARM_GIC |
| 34 | select ARM_PSCI | 34 | select ARM_PSCI |
| 35 | select ARCH_SUPPORTS_BIG_ENDIAN | ||
| 35 | select HAVE_ARM_ARCH_TIMER | 36 | select HAVE_ARM_ARCH_TIMER |
| 36 | select SUN5I_HSTIMER | 37 | select SUN5I_HSTIMER |
| 37 | 38 | ||
diff --git a/arch/arm/mach-sunxi/sunxi.c b/arch/arm/mach-sunxi/sunxi.c index 95dca8c2c9ed..2e2bde271205 100644 --- a/arch/arm/mach-sunxi/sunxi.c +++ b/arch/arm/mach-sunxi/sunxi.c | |||
| @@ -22,6 +22,7 @@ static const char * const sunxi_board_dt_compat[] = { | |||
| 22 | "allwinner,sun5i-a10s", | 22 | "allwinner,sun5i-a10s", |
| 23 | "allwinner,sun5i-a13", | 23 | "allwinner,sun5i-a13", |
| 24 | "allwinner,sun5i-r8", | 24 | "allwinner,sun5i-r8", |
| 25 | "nextthing,gr8", | ||
| 25 | NULL, | 26 | NULL, |
| 26 | }; | 27 | }; |
| 27 | 28 | ||
diff --git a/arch/arm/mach-uniphier/Makefile b/arch/arm/mach-uniphier/Makefile index 396afe109e67..6bea3d3a2dd7 100644 --- a/arch/arm/mach-uniphier/Makefile +++ b/arch/arm/mach-uniphier/Makefile | |||
| @@ -1 +1 @@ | |||
| obj-$(CONFIG_SMP) += platsmp.o headsmp.o | obj- += dummy.o | ||
diff --git a/arch/arm/mach-uniphier/headsmp.S b/arch/arm/mach-uniphier/headsmp.S deleted file mode 100644 index c819dff84546..000000000000 --- a/arch/arm/mach-uniphier/headsmp.S +++ /dev/null | |||
| @@ -1,43 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2015 Masahiro Yamada <yamada.masahiro@socionext.com> | ||
| 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 | * This program is distributed in the hope that it will be useful, | ||
| 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 12 | * GNU General Public License for more details. | ||
| 13 | */ | ||
| 14 | |||
| 15 | #include <linux/linkage.h> | ||
| 16 | #include <asm/assembler.h> | ||
| 17 | #include <asm/cp15.h> | ||
| 18 | |||
| 19 | ENTRY(uniphier_smp_trampoline) | ||
| 20 | ARM_BE8(setend be) @ ensure we are in BE8 mode | ||
| 21 | mrc p15, 0, r0, c0, c0, 5 @ MPIDR (Multiprocessor Affinity Reg) | ||
| 22 | and r2, r0, #0x3 @ CPU ID | ||
| 23 | ldr r1, uniphier_smp_trampoline_jump | ||
| 24 | ldr r3, uniphier_smp_trampoline_poll_addr | ||
| 25 | mrc p15, 0, r0, c1, c0, 0 @ SCTLR (System Control Register) | ||
| 26 | orr r0, r0, #CR_I @ Enable ICache | ||
| 27 | bic r0, r0, #(CR_C | CR_M) @ Disable MMU and Dcache | ||
| 28 | mcr p15, 0, r0, c1, c0, 0 | ||
| 29 | b 1f @ cache the following 5 instructions | ||
| 30 | 0: wfe | ||
| 31 | 1: ldr r0, [r3] | ||
| 32 | cmp r0, r2 | ||
| 33 | bxeq r1 @ branch to secondary_startup | ||
| 34 | b 0b | ||
| 35 | .globl uniphier_smp_trampoline_jump | ||
| 36 | uniphier_smp_trampoline_jump: | ||
| 37 | .word 0 @ set virt_to_phys(secondary_startup) | ||
| 38 | .globl uniphier_smp_trampoline_poll_addr | ||
| 39 | uniphier_smp_trampoline_poll_addr: | ||
| 40 | .word 0 @ set CPU ID to be kicked to this reg | ||
| 41 | .globl uniphier_smp_trampoline_end | ||
| 42 | uniphier_smp_trampoline_end: | ||
| 43 | ENDPROC(uniphier_smp_trampoline) | ||
diff --git a/arch/arm/mach-uniphier/platsmp.c b/arch/arm/mach-uniphier/platsmp.c deleted file mode 100644 index 9978c41128f6..000000000000 --- a/arch/arm/mach-uniphier/platsmp.c +++ /dev/null | |||
| @@ -1,209 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2015 Masahiro Yamada <yamada.masahiro@socionext.com> | ||
| 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 | * This program is distributed in the hope that it will be useful, | ||
| 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 12 | * GNU General Public License for more details. | ||
| 13 | */ | ||
| 14 | |||
| 15 | #define pr_fmt(fmt) "uniphier: " fmt | ||
| 16 | |||
| 17 | #include <linux/init.h> | ||
| 18 | #include <linux/io.h> | ||
| 19 | #include <linux/ioport.h> | ||
| 20 | #include <linux/of.h> | ||
| 21 | #include <linux/of_address.h> | ||
| 22 | #include <linux/sizes.h> | ||
| 23 | #include <asm/cacheflush.h> | ||
| 24 | #include <asm/hardware/cache-uniphier.h> | ||
| 25 | #include <asm/pgtable.h> | ||
| 26 | #include <asm/smp.h> | ||
| 27 | #include <asm/smp_scu.h> | ||
| 28 | |||
| 29 | /* | ||
| 30 | * The secondary CPUs check this register from the boot ROM for the jump | ||
| 31 | * destination. After that, it can be reused as a scratch register. | ||
| 32 | */ | ||
| 33 | #define UNIPHIER_SMPCTRL_ROM_RSV2 0x208 | ||
| 34 | |||
| 35 | static void __iomem *uniphier_smp_rom_boot_rsv2; | ||
| 36 | static unsigned int uniphier_smp_max_cpus; | ||
| 37 | |||
| 38 | extern char uniphier_smp_trampoline; | ||
| 39 | extern char uniphier_smp_trampoline_jump; | ||
| 40 | extern char uniphier_smp_trampoline_poll_addr; | ||
| 41 | extern char uniphier_smp_trampoline_end; | ||
| 42 | |||
| 43 | /* | ||
| 44 | * Copy trampoline code to the tail of the 1st section of the page table used | ||
| 45 | * in the boot ROM. This area is directly accessible by the secondary CPUs | ||
| 46 | * for all the UniPhier SoCs. | ||
| 47 | */ | ||
| 48 | static const phys_addr_t uniphier_smp_trampoline_dest_end = SECTION_SIZE; | ||
| 49 | static phys_addr_t uniphier_smp_trampoline_dest; | ||
| 50 | |||
| 51 | static int __init uniphier_smp_copy_trampoline(phys_addr_t poll_addr) | ||
| 52 | { | ||
| 53 | size_t trmp_size; | ||
| 54 | static void __iomem *trmp_base; | ||
| 55 | |||
| 56 | if (!uniphier_cache_l2_is_enabled()) { | ||
| 57 | pr_warn("outer cache is needed for SMP, but not enabled\n"); | ||
| 58 | return -ENODEV; | ||
| 59 | } | ||
| 60 | |||
| 61 | uniphier_cache_l2_set_locked_ways(1); | ||
| 62 | |||
| 63 | outer_flush_all(); | ||
| 64 | |||
| 65 | trmp_size = &uniphier_smp_trampoline_end - &uniphier_smp_trampoline; | ||
| 66 | uniphier_smp_trampoline_dest = uniphier_smp_trampoline_dest_end - | ||
| 67 | trmp_size; | ||
| 68 | |||
| 69 | uniphier_cache_l2_touch_range(uniphier_smp_trampoline_dest, | ||
| 70 | uniphier_smp_trampoline_dest_end); | ||
| 71 | |||
| 72 | trmp_base = ioremap_cache(uniphier_smp_trampoline_dest, trmp_size); | ||
| 73 | if (!trmp_base) { | ||
| 74 | pr_err("failed to map trampoline destination area\n"); | ||
| 75 | return -ENOMEM; | ||
| 76 | } | ||
| 77 | |||
| 78 | memcpy(trmp_base, &uniphier_smp_trampoline, trmp_size); | ||
| 79 | |||
| 80 | writel(virt_to_phys(secondary_startup), | ||
| 81 | trmp_base + (&uniphier_smp_trampoline_jump - | ||
| 82 | &uniphier_smp_trampoline)); | ||
| 83 | |||
| 84 | writel(poll_addr, trmp_base + (&uniphier_smp_trampoline_poll_addr - | ||
| 85 | &uniphier_smp_trampoline)); | ||
| 86 | |||
| 87 | flush_cache_all(); /* flush out trampoline code to outer cache */ | ||
| 88 | |||
| 89 | iounmap(trmp_base); | ||
| 90 | |||
| 91 | return 0; | ||
| 92 | } | ||
| 93 | |||
| 94 | static int __init uniphier_smp_prepare_trampoline(unsigned int max_cpus) | ||
| 95 | { | ||
| 96 | struct device_node *np; | ||
| 97 | struct resource res; | ||
| 98 | phys_addr_t rom_rsv2_phys; | ||
| 99 | int ret; | ||
| 100 | |||
| 101 | np = of_find_compatible_node(NULL, NULL, "socionext,uniphier-smpctrl"); | ||
| 102 | ret = of_address_to_resource(np, 0, &res); | ||
| 103 | of_node_put(np); | ||
| 104 | if (ret) { | ||
| 105 | pr_err("failed to get resource of SMP control\n"); | ||
| 106 | return ret; | ||
| 107 | } | ||
| 108 | |||
| 109 | rom_rsv2_phys = res.start + UNIPHIER_SMPCTRL_ROM_RSV2; | ||
| 110 | |||
| 111 | ret = uniphier_smp_copy_trampoline(rom_rsv2_phys); | ||
| 112 | if (ret) | ||
| 113 | return ret; | ||
| 114 | |||
| 115 | uniphier_smp_rom_boot_rsv2 = ioremap(rom_rsv2_phys, SZ_4); | ||
| 116 | if (!uniphier_smp_rom_boot_rsv2) { | ||
| 117 | pr_err("failed to map ROM_BOOT_RSV2 register\n"); | ||
| 118 | return -ENOMEM; | ||
| 119 | } | ||
| 120 | |||
| 121 | writel(uniphier_smp_trampoline_dest, uniphier_smp_rom_boot_rsv2); | ||
| 122 | asm("sev"); /* Bring up all secondary CPUs to the trampoline code */ | ||
| 123 | |||
| 124 | uniphier_smp_max_cpus = max_cpus; /* save for later use */ | ||
| 125 | |||
| 126 | return 0; | ||
| 127 | } | ||
| 128 | |||
| 129 | static void __init uniphier_smp_unprepare_trampoline(void) | ||
| 130 | { | ||
| 131 | iounmap(uniphier_smp_rom_boot_rsv2); | ||
| 132 | |||
| 133 | if (uniphier_smp_trampoline_dest) | ||
| 134 | outer_inv_range(uniphier_smp_trampoline_dest, | ||
| 135 | uniphier_smp_trampoline_dest_end); | ||
| 136 | |||
| 137 | uniphier_cache_l2_set_locked_ways(0); | ||
| 138 | } | ||
| 139 | |||
| 140 | static int __init uniphier_smp_enable_scu(void) | ||
| 141 | { | ||
| 142 | unsigned long scu_base_phys = 0; | ||
| 143 | void __iomem *scu_base; | ||
| 144 | |||
| 145 | if (scu_a9_has_base()) | ||
| 146 | scu_base_phys = scu_a9_get_base(); | ||
| 147 | |||
| 148 | if (!scu_base_phys) { | ||
| 149 | pr_err("failed to get scu base\n"); | ||
| 150 | return -ENODEV; | ||
| 151 | } | ||
| 152 | |||
| 153 | scu_base = ioremap(scu_base_phys, SZ_128); | ||
| 154 | if (!scu_base) { | ||
| 155 | pr_err("failed to map scu base\n"); | ||
| 156 | return -ENOMEM; | ||
| 157 | } | ||
| 158 | |||
| 159 | scu_enable(scu_base); | ||
| 160 | iounmap(scu_base); | ||
| 161 | |||
| 162 | return 0; | ||
| 163 | } | ||
| 164 | |||
| 165 | static void __init uniphier_smp_prepare_cpus(unsigned int max_cpus) | ||
| 166 | { | ||
| 167 | static cpumask_t only_cpu_0 = { CPU_BITS_CPU0 }; | ||
| 168 | int ret; | ||
| 169 | |||
| 170 | ret = uniphier_smp_prepare_trampoline(max_cpus); | ||
| 171 | if (ret) | ||
| 172 | goto err; | ||
| 173 | |||
| 174 | ret = uniphier_smp_enable_scu(); | ||
| 175 | if (ret) | ||
| 176 | goto err; | ||
| 177 | |||
| 178 | return; | ||
| 179 | err: | ||
| 180 | pr_warn("disabling SMP\n"); | ||
| 181 | init_cpu_present(&only_cpu_0); | ||
| 182 | uniphier_smp_unprepare_trampoline(); | ||
| 183 | } | ||
| 184 | |||
| 185 | static int __init uniphier_smp_boot_secondary(unsigned int cpu, | ||
| 186 | struct task_struct *idle) | ||
| 187 | { | ||
| 188 | if (WARN_ON_ONCE(!uniphier_smp_rom_boot_rsv2)) | ||
| 189 | return -EFAULT; | ||
| 190 | |||
| 191 | writel(cpu, uniphier_smp_rom_boot_rsv2); | ||
| 192 | readl(uniphier_smp_rom_boot_rsv2); /* relax */ | ||
| 193 | |||
| 194 | asm("sev"); /* wake up secondary CPUs sleeping in the trampoline */ | ||
| 195 | |||
| 196 | if (cpu == uniphier_smp_max_cpus - 1) { | ||
| 197 | /* clean up resources if this is the last CPU */ | ||
| 198 | uniphier_smp_unprepare_trampoline(); | ||
| 199 | } | ||
| 200 | |||
| 201 | return 0; | ||
| 202 | } | ||
| 203 | |||
| 204 | static const struct smp_operations uniphier_smp_ops __initconst = { | ||
| 205 | .smp_prepare_cpus = uniphier_smp_prepare_cpus, | ||
| 206 | .smp_boot_secondary = uniphier_smp_boot_secondary, | ||
| 207 | }; | ||
| 208 | CPU_METHOD_OF_DECLARE(uniphier_smp, "socionext,uniphier-smp", | ||
| 209 | &uniphier_smp_ops); | ||
diff --git a/arch/arm/mm/cache-uniphier.c b/arch/arm/mm/cache-uniphier.c index c8e2f4947223..dfe97b409916 100644 --- a/arch/arm/mm/cache-uniphier.c +++ b/arch/arm/mm/cache-uniphier.c | |||
| @@ -1,5 +1,6 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * Copyright (C) 2015 Masahiro Yamada <yamada.masahiro@socionext.com> | 2 | * Copyright (C) 2015-2016 Socionext Inc. |
| 3 | * Author: Masahiro Yamada <yamada.masahiro@socionext.com> | ||
| 3 | * | 4 | * |
| 4 | * This program is free software; you can redistribute it and/or modify | 5 | * 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 | * it under the terms of the GNU General Public License as published by |
| @@ -43,27 +44,15 @@ | |||
| 43 | #define UNIPHIER_SSCOPE_CM_SYNC 0x8 /* sync (drain bufs) */ | 44 | #define UNIPHIER_SSCOPE_CM_SYNC 0x8 /* sync (drain bufs) */ |
| 44 | #define UNIPHIER_SSCOPE_CM_FLUSH_PREFETCH 0x9 /* flush p-fetch buf */ | 45 | #define UNIPHIER_SSCOPE_CM_FLUSH_PREFETCH 0x9 /* flush p-fetch buf */ |
| 45 | #define UNIPHIER_SSCOQM 0x248 /* Cache Operation Queue Mode */ | 46 | #define UNIPHIER_SSCOQM 0x248 /* Cache Operation Queue Mode */ |
| 46 | #define UNIPHIER_SSCOQM_TID_MASK (0x3 << 21) | ||
| 47 | #define UNIPHIER_SSCOQM_TID_LRU_DATA (0x0 << 21) | ||
| 48 | #define UNIPHIER_SSCOQM_TID_LRU_INST (0x1 << 21) | ||
| 49 | #define UNIPHIER_SSCOQM_TID_WAY (0x2 << 21) | ||
| 50 | #define UNIPHIER_SSCOQM_S_MASK (0x3 << 17) | 47 | #define UNIPHIER_SSCOQM_S_MASK (0x3 << 17) |
| 51 | #define UNIPHIER_SSCOQM_S_RANGE (0x0 << 17) | 48 | #define UNIPHIER_SSCOQM_S_RANGE (0x0 << 17) |
| 52 | #define UNIPHIER_SSCOQM_S_ALL (0x1 << 17) | 49 | #define UNIPHIER_SSCOQM_S_ALL (0x1 << 17) |
| 53 | #define UNIPHIER_SSCOQM_S_WAY (0x2 << 17) | ||
| 54 | #define UNIPHIER_SSCOQM_CE BIT(15) /* notify completion */ | 50 | #define UNIPHIER_SSCOQM_CE BIT(15) /* notify completion */ |
| 55 | #define UNIPHIER_SSCOQM_CM_INV 0x0 /* invalidate */ | 51 | #define UNIPHIER_SSCOQM_CM_INV 0x0 /* invalidate */ |
| 56 | #define UNIPHIER_SSCOQM_CM_CLEAN 0x1 /* clean */ | 52 | #define UNIPHIER_SSCOQM_CM_CLEAN 0x1 /* clean */ |
| 57 | #define UNIPHIER_SSCOQM_CM_FLUSH 0x2 /* flush */ | 53 | #define UNIPHIER_SSCOQM_CM_FLUSH 0x2 /* flush */ |
| 58 | #define UNIPHIER_SSCOQM_CM_PREFETCH 0x3 /* prefetch to cache */ | ||
| 59 | #define UNIPHIER_SSCOQM_CM_PREFETCH_BUF 0x4 /* prefetch to pf-buf */ | ||
| 60 | #define UNIPHIER_SSCOQM_CM_TOUCH 0x5 /* touch */ | ||
| 61 | #define UNIPHIER_SSCOQM_CM_TOUCH_ZERO 0x6 /* touch to zero */ | ||
| 62 | #define UNIPHIER_SSCOQM_CM_TOUCH_DIRTY 0x7 /* touch with dirty */ | ||
| 63 | #define UNIPHIER_SSCOQAD 0x24c /* Cache Operation Queue Address */ | 54 | #define UNIPHIER_SSCOQAD 0x24c /* Cache Operation Queue Address */ |
| 64 | #define UNIPHIER_SSCOQSZ 0x250 /* Cache Operation Queue Size */ | 55 | #define UNIPHIER_SSCOQSZ 0x250 /* Cache Operation Queue Size */ |
| 65 | #define UNIPHIER_SSCOQMASK 0x254 /* Cache Operation Queue Address Mask */ | ||
| 66 | #define UNIPHIER_SSCOQWN 0x258 /* Cache Operation Queue Way Number */ | ||
| 67 | #define UNIPHIER_SSCOPPQSEF 0x25c /* Cache Operation Queue Set Complete*/ | 56 | #define UNIPHIER_SSCOPPQSEF 0x25c /* Cache Operation Queue Set Complete*/ |
| 68 | #define UNIPHIER_SSCOPPQSEF_FE BIT(1) | 57 | #define UNIPHIER_SSCOPPQSEF_FE BIT(1) |
| 69 | #define UNIPHIER_SSCOPPQSEF_OE BIT(0) | 58 | #define UNIPHIER_SSCOPPQSEF_OE BIT(0) |
| @@ -72,9 +61,6 @@ | |||
| 72 | #define UNIPHIER_SSCOLPQS_EST BIT(1) | 61 | #define UNIPHIER_SSCOLPQS_EST BIT(1) |
| 73 | #define UNIPHIER_SSCOLPQS_QST BIT(0) | 62 | #define UNIPHIER_SSCOLPQS_QST BIT(0) |
| 74 | 63 | ||
| 75 | /* Is the touch/pre-fetch destination specified by ways? */ | ||
| 76 | #define UNIPHIER_SSCOQM_TID_IS_WAY(op) \ | ||
| 77 | ((op & UNIPHIER_SSCOQM_TID_MASK) == UNIPHIER_SSCOQM_TID_WAY) | ||
| 78 | /* Is the operation region specified by address range? */ | 64 | /* Is the operation region specified by address range? */ |
| 79 | #define UNIPHIER_SSCOQM_S_IS_RANGE(op) \ | 65 | #define UNIPHIER_SSCOQM_S_IS_RANGE(op) \ |
| 80 | ((op & UNIPHIER_SSCOQM_S_MASK) == UNIPHIER_SSCOQM_S_RANGE) | 66 | ((op & UNIPHIER_SSCOQM_S_MASK) == UNIPHIER_SSCOQM_S_RANGE) |
| @@ -178,11 +164,6 @@ static void __uniphier_cache_maint_common(struct uniphier_cache_data *data, | |||
| 178 | writel_relaxed(start, data->op_base + UNIPHIER_SSCOQAD); | 164 | writel_relaxed(start, data->op_base + UNIPHIER_SSCOQAD); |
| 179 | writel_relaxed(size, data->op_base + UNIPHIER_SSCOQSZ); | 165 | writel_relaxed(size, data->op_base + UNIPHIER_SSCOQSZ); |
| 180 | } | 166 | } |
| 181 | |||
| 182 | /* set target ways if needed */ | ||
| 183 | if (unlikely(UNIPHIER_SSCOQM_TID_IS_WAY(operation))) | ||
| 184 | writel_relaxed(data->way_locked_mask, | ||
| 185 | data->op_base + UNIPHIER_SSCOQWN); | ||
| 186 | } while (unlikely(readl_relaxed(data->op_base + UNIPHIER_SSCOPPQSEF) & | 167 | } while (unlikely(readl_relaxed(data->op_base + UNIPHIER_SSCOPPQSEF) & |
| 187 | (UNIPHIER_SSCOPPQSEF_FE | UNIPHIER_SSCOPPQSEF_OE))); | 168 | (UNIPHIER_SSCOPPQSEF_FE | UNIPHIER_SSCOPPQSEF_OE))); |
| 188 | 169 | ||
| @@ -338,46 +319,8 @@ static void uniphier_cache_sync(void) | |||
| 338 | __uniphier_cache_sync(data); | 319 | __uniphier_cache_sync(data); |
| 339 | } | 320 | } |
| 340 | 321 | ||
| 341 | int __init uniphier_cache_l2_is_enabled(void) | ||
| 342 | { | ||
| 343 | struct uniphier_cache_data *data; | ||
| 344 | |||
| 345 | data = list_first_entry_or_null(&uniphier_cache_list, | ||
| 346 | struct uniphier_cache_data, list); | ||
| 347 | if (!data) | ||
| 348 | return 0; | ||
| 349 | |||
| 350 | return !!(readl_relaxed(data->ctrl_base + UNIPHIER_SSCC) & | ||
| 351 | UNIPHIER_SSCC_ON); | ||
| 352 | } | ||
| 353 | |||
| 354 | void __init uniphier_cache_l2_touch_range(unsigned long start, | ||
| 355 | unsigned long end) | ||
| 356 | { | ||
| 357 | struct uniphier_cache_data *data; | ||
| 358 | |||
| 359 | data = list_first_entry_or_null(&uniphier_cache_list, | ||
| 360 | struct uniphier_cache_data, list); | ||
| 361 | if (data) | ||
| 362 | __uniphier_cache_maint_range(data, start, end, | ||
| 363 | UNIPHIER_SSCOQM_TID_WAY | | ||
| 364 | UNIPHIER_SSCOQM_CM_TOUCH); | ||
| 365 | } | ||
| 366 | |||
| 367 | void __init uniphier_cache_l2_set_locked_ways(u32 way_mask) | ||
| 368 | { | ||
| 369 | struct uniphier_cache_data *data; | ||
| 370 | |||
| 371 | data = list_first_entry_or_null(&uniphier_cache_list, | ||
| 372 | struct uniphier_cache_data, list); | ||
| 373 | if (data) | ||
| 374 | __uniphier_cache_set_locked_ways(data, way_mask); | ||
| 375 | } | ||
| 376 | |||
| 377 | static const struct of_device_id uniphier_cache_match[] __initconst = { | 322 | static const struct of_device_id uniphier_cache_match[] __initconst = { |
| 378 | { | 323 | { .compatible = "socionext,uniphier-system-cache" }, |
| 379 | .compatible = "socionext,uniphier-system-cache", | ||
| 380 | }, | ||
| 381 | { /* sentinel */ } | 324 | { /* sentinel */ } |
| 382 | }; | 325 | }; |
| 383 | 326 | ||
diff --git a/arch/arm/plat-orion/common.c b/arch/arm/plat-orion/common.c index 78c8bf4043c0..272f49b2c68f 100644 --- a/arch/arm/plat-orion/common.c +++ b/arch/arm/plat-orion/common.c | |||
| @@ -52,21 +52,27 @@ void __init orion_clkdev_init(struct clk *tclk) | |||
| 52 | static void fill_resources(struct platform_device *device, | 52 | static void fill_resources(struct platform_device *device, |
| 53 | struct resource *resources, | 53 | struct resource *resources, |
| 54 | resource_size_t mapbase, | 54 | resource_size_t mapbase, |
| 55 | resource_size_t size, | 55 | resource_size_t size) |
| 56 | unsigned int irq) | ||
| 57 | { | 56 | { |
| 58 | device->resource = resources; | 57 | device->resource = resources; |
| 59 | device->num_resources = 1; | 58 | device->num_resources = 1; |
| 60 | resources[0].flags = IORESOURCE_MEM; | 59 | resources[0].flags = IORESOURCE_MEM; |
| 61 | resources[0].start = mapbase; | 60 | resources[0].start = mapbase; |
| 62 | resources[0].end = mapbase + size; | 61 | resources[0].end = mapbase + size; |
| 62 | } | ||
| 63 | 63 | ||
| 64 | if (irq != NO_IRQ) { | 64 | static void fill_resources_irq(struct platform_device *device, |
| 65 | device->num_resources++; | 65 | struct resource *resources, |
| 66 | resources[1].flags = IORESOURCE_IRQ; | 66 | resource_size_t mapbase, |
| 67 | resources[1].start = irq; | 67 | resource_size_t size, |
| 68 | resources[1].end = irq; | 68 | unsigned int irq) |
| 69 | } | 69 | { |
| 70 | fill_resources(device, resources, mapbase, size); | ||
| 71 | |||
| 72 | device->num_resources++; | ||
| 73 | resources[1].flags = IORESOURCE_IRQ; | ||
| 74 | resources[1].start = irq; | ||
| 75 | resources[1].end = irq; | ||
| 70 | } | 76 | } |
| 71 | 77 | ||
| 72 | /***************************************************************************** | 78 | /***************************************************************************** |
| @@ -93,7 +99,7 @@ static void __init uart_complete( | |||
| 93 | data->uartclk = uart_get_clk_rate(clk); | 99 | data->uartclk = uart_get_clk_rate(clk); |
| 94 | orion_uart->dev.platform_data = data; | 100 | orion_uart->dev.platform_data = data; |
| 95 | 101 | ||
| 96 | fill_resources(orion_uart, resources, mapbase, 0xff, irq); | 102 | fill_resources_irq(orion_uart, resources, mapbase, 0xff, irq); |
| 97 | platform_device_register(orion_uart); | 103 | platform_device_register(orion_uart); |
| 98 | } | 104 | } |
| 99 | 105 | ||
| @@ -305,8 +311,8 @@ void __init orion_ge00_init(struct mv643xx_eth_platform_data *eth_data, | |||
| 305 | unsigned int tx_csum_limit) | 311 | unsigned int tx_csum_limit) |
| 306 | { | 312 | { |
| 307 | fill_resources(&orion_ge00_shared, orion_ge00_shared_resources, | 313 | fill_resources(&orion_ge00_shared, orion_ge00_shared_resources, |
| 308 | mapbase + 0x2000, SZ_16K - 1, NO_IRQ); | 314 | mapbase + 0x2000, SZ_16K - 1); |
| 309 | fill_resources(&orion_ge_mvmdio, orion_ge_mvmdio_resources, | 315 | fill_resources_irq(&orion_ge_mvmdio, orion_ge_mvmdio_resources, |
| 310 | mapbase + 0x2004, 0x84 - 1, irq_err); | 316 | mapbase + 0x2004, 0x84 - 1, irq_err); |
| 311 | orion_ge00_shared_data.tx_csum_limit = tx_csum_limit; | 317 | orion_ge00_shared_data.tx_csum_limit = tx_csum_limit; |
| 312 | ge_complete(&orion_ge00_shared_data, | 318 | ge_complete(&orion_ge00_shared_data, |
| @@ -354,11 +360,10 @@ static struct platform_device orion_ge01 = { | |||
| 354 | void __init orion_ge01_init(struct mv643xx_eth_platform_data *eth_data, | 360 | void __init orion_ge01_init(struct mv643xx_eth_platform_data *eth_data, |
| 355 | unsigned long mapbase, | 361 | unsigned long mapbase, |
| 356 | unsigned long irq, | 362 | unsigned long irq, |
| 357 | unsigned long irq_err, | ||
| 358 | unsigned int tx_csum_limit) | 363 | unsigned int tx_csum_limit) |
| 359 | { | 364 | { |
| 360 | fill_resources(&orion_ge01_shared, orion_ge01_shared_resources, | 365 | fill_resources(&orion_ge01_shared, orion_ge01_shared_resources, |
| 361 | mapbase + 0x2000, SZ_16K - 1, NO_IRQ); | 366 | mapbase + 0x2000, SZ_16K - 1); |
| 362 | orion_ge01_shared_data.tx_csum_limit = tx_csum_limit; | 367 | orion_ge01_shared_data.tx_csum_limit = tx_csum_limit; |
| 363 | ge_complete(&orion_ge01_shared_data, | 368 | ge_complete(&orion_ge01_shared_data, |
| 364 | orion_ge01_resources, irq, &orion_ge01_shared, | 369 | orion_ge01_resources, irq, &orion_ge01_shared, |
| @@ -404,11 +409,10 @@ static struct platform_device orion_ge10 = { | |||
| 404 | 409 | ||
| 405 | void __init orion_ge10_init(struct mv643xx_eth_platform_data *eth_data, | 410 | void __init orion_ge10_init(struct mv643xx_eth_platform_data *eth_data, |
| 406 | unsigned long mapbase, | 411 | unsigned long mapbase, |
| 407 | unsigned long irq, | 412 | unsigned long irq) |
| 408 | unsigned long irq_err) | ||
| 409 | { | 413 | { |
| 410 | fill_resources(&orion_ge10_shared, orion_ge10_shared_resources, | 414 | fill_resources(&orion_ge10_shared, orion_ge10_shared_resources, |
| 411 | mapbase + 0x2000, SZ_16K - 1, NO_IRQ); | 415 | mapbase + 0x2000, SZ_16K - 1); |
| 412 | ge_complete(&orion_ge10_shared_data, | 416 | ge_complete(&orion_ge10_shared_data, |
| 413 | orion_ge10_resources, irq, &orion_ge10_shared, | 417 | orion_ge10_resources, irq, &orion_ge10_shared, |
| 414 | NULL, | 418 | NULL, |
| @@ -453,11 +457,10 @@ static struct platform_device orion_ge11 = { | |||
| 453 | 457 | ||
| 454 | void __init orion_ge11_init(struct mv643xx_eth_platform_data *eth_data, | 458 | void __init orion_ge11_init(struct mv643xx_eth_platform_data *eth_data, |
| 455 | unsigned long mapbase, | 459 | unsigned long mapbase, |
| 456 | unsigned long irq, | 460 | unsigned long irq) |
| 457 | unsigned long irq_err) | ||
| 458 | { | 461 | { |
| 459 | fill_resources(&orion_ge11_shared, orion_ge11_shared_resources, | 462 | fill_resources(&orion_ge11_shared, orion_ge11_shared_resources, |
| 460 | mapbase + 0x2000, SZ_16K - 1, NO_IRQ); | 463 | mapbase + 0x2000, SZ_16K - 1); |
| 461 | ge_complete(&orion_ge11_shared_data, | 464 | ge_complete(&orion_ge11_shared_data, |
| 462 | orion_ge11_resources, irq, &orion_ge11_shared, | 465 | orion_ge11_resources, irq, &orion_ge11_shared, |
| 463 | NULL, | 466 | NULL, |
| @@ -467,37 +470,15 @@ void __init orion_ge11_init(struct mv643xx_eth_platform_data *eth_data, | |||
| 467 | /***************************************************************************** | 470 | /***************************************************************************** |
| 468 | * Ethernet switch | 471 | * Ethernet switch |
| 469 | ****************************************************************************/ | 472 | ****************************************************************************/ |
| 470 | static struct resource orion_switch_resources[] = { | 473 | void __init orion_ge00_switch_init(struct dsa_platform_data *d) |
| 471 | { | ||
| 472 | .start = 0, | ||
| 473 | .end = 0, | ||
| 474 | .flags = IORESOURCE_IRQ, | ||
| 475 | }, | ||
| 476 | }; | ||
| 477 | |||
| 478 | static struct platform_device orion_switch_device = { | ||
| 479 | .name = "dsa", | ||
| 480 | .id = 0, | ||
| 481 | .num_resources = 0, | ||
| 482 | .resource = orion_switch_resources, | ||
| 483 | }; | ||
| 484 | |||
| 485 | void __init orion_ge00_switch_init(struct dsa_platform_data *d, int irq) | ||
| 486 | { | 474 | { |
| 487 | int i; | 475 | int i; |
| 488 | 476 | ||
| 489 | if (irq != NO_IRQ) { | ||
| 490 | orion_switch_resources[0].start = irq; | ||
| 491 | orion_switch_resources[0].end = irq; | ||
| 492 | orion_switch_device.num_resources = 1; | ||
| 493 | } | ||
| 494 | |||
| 495 | d->netdev = &orion_ge00.dev; | 477 | d->netdev = &orion_ge00.dev; |
| 496 | for (i = 0; i < d->nr_chips; i++) | 478 | for (i = 0; i < d->nr_chips; i++) |
| 497 | d->chip[i].host_dev = &orion_ge_mvmdio.dev; | 479 | d->chip[i].host_dev = &orion_ge_mvmdio.dev; |
| 498 | orion_switch_device.dev.platform_data = d; | ||
| 499 | 480 | ||
| 500 | platform_device_register(&orion_switch_device); | 481 | platform_device_register_data(NULL, "dsa", 0, d, sizeof(d)); |
| 501 | } | 482 | } |
| 502 | 483 | ||
| 503 | /***************************************************************************** | 484 | /***************************************************************************** |
| @@ -538,7 +519,7 @@ void __init orion_i2c_init(unsigned long mapbase, | |||
| 538 | unsigned long freq_m) | 519 | unsigned long freq_m) |
| 539 | { | 520 | { |
| 540 | orion_i2c_pdata.freq_m = freq_m; | 521 | orion_i2c_pdata.freq_m = freq_m; |
| 541 | fill_resources(&orion_i2c, orion_i2c_resources, mapbase, | 522 | fill_resources_irq(&orion_i2c, orion_i2c_resources, mapbase, |
| 542 | SZ_32 - 1, irq); | 523 | SZ_32 - 1, irq); |
| 543 | platform_device_register(&orion_i2c); | 524 | platform_device_register(&orion_i2c); |
| 544 | } | 525 | } |
| @@ -548,7 +529,7 @@ void __init orion_i2c_1_init(unsigned long mapbase, | |||
| 548 | unsigned long freq_m) | 529 | unsigned long freq_m) |
| 549 | { | 530 | { |
| 550 | orion_i2c_1_pdata.freq_m = freq_m; | 531 | orion_i2c_1_pdata.freq_m = freq_m; |
| 551 | fill_resources(&orion_i2c_1, orion_i2c_1_resources, mapbase, | 532 | fill_resources_irq(&orion_i2c_1, orion_i2c_1_resources, mapbase, |
| 552 | SZ_32 - 1, irq); | 533 | SZ_32 - 1, irq); |
| 553 | platform_device_register(&orion_i2c_1); | 534 | platform_device_register(&orion_i2c_1); |
| 554 | } | 535 | } |
| @@ -576,14 +557,14 @@ static struct platform_device orion_spi_1 = { | |||
| 576 | void __init orion_spi_init(unsigned long mapbase) | 557 | void __init orion_spi_init(unsigned long mapbase) |
| 577 | { | 558 | { |
| 578 | fill_resources(&orion_spi, &orion_spi_resources, | 559 | fill_resources(&orion_spi, &orion_spi_resources, |
| 579 | mapbase, SZ_512 - 1, NO_IRQ); | 560 | mapbase, SZ_512 - 1); |
| 580 | platform_device_register(&orion_spi); | 561 | platform_device_register(&orion_spi); |
| 581 | } | 562 | } |
| 582 | 563 | ||
| 583 | void __init orion_spi_1_init(unsigned long mapbase) | 564 | void __init orion_spi_1_init(unsigned long mapbase) |
| 584 | { | 565 | { |
| 585 | fill_resources(&orion_spi_1, &orion_spi_1_resources, | 566 | fill_resources(&orion_spi_1, &orion_spi_1_resources, |
| 586 | mapbase, SZ_512 - 1, NO_IRQ); | 567 | mapbase, SZ_512 - 1); |
| 587 | platform_device_register(&orion_spi_1); | 568 | platform_device_register(&orion_spi_1); |
| 588 | } | 569 | } |
| 589 | 570 | ||
| @@ -741,7 +722,7 @@ void __init orion_ehci_init(unsigned long mapbase, | |||
| 741 | enum orion_ehci_phy_ver phy_version) | 722 | enum orion_ehci_phy_ver phy_version) |
| 742 | { | 723 | { |
| 743 | orion_ehci_data.phy_version = phy_version; | 724 | orion_ehci_data.phy_version = phy_version; |
| 744 | fill_resources(&orion_ehci, orion_ehci_resources, mapbase, SZ_4K - 1, | 725 | fill_resources_irq(&orion_ehci, orion_ehci_resources, mapbase, SZ_4K - 1, |
| 745 | irq); | 726 | irq); |
| 746 | 727 | ||
| 747 | platform_device_register(&orion_ehci); | 728 | platform_device_register(&orion_ehci); |
| @@ -765,7 +746,7 @@ static struct platform_device orion_ehci_1 = { | |||
| 765 | void __init orion_ehci_1_init(unsigned long mapbase, | 746 | void __init orion_ehci_1_init(unsigned long mapbase, |
| 766 | unsigned long irq) | 747 | unsigned long irq) |
| 767 | { | 748 | { |
| 768 | fill_resources(&orion_ehci_1, orion_ehci_1_resources, | 749 | fill_resources_irq(&orion_ehci_1, orion_ehci_1_resources, |
| 769 | mapbase, SZ_4K - 1, irq); | 750 | mapbase, SZ_4K - 1, irq); |
| 770 | 751 | ||
| 771 | platform_device_register(&orion_ehci_1); | 752 | platform_device_register(&orion_ehci_1); |
| @@ -789,7 +770,7 @@ static struct platform_device orion_ehci_2 = { | |||
| 789 | void __init orion_ehci_2_init(unsigned long mapbase, | 770 | void __init orion_ehci_2_init(unsigned long mapbase, |
| 790 | unsigned long irq) | 771 | unsigned long irq) |
| 791 | { | 772 | { |
| 792 | fill_resources(&orion_ehci_2, orion_ehci_2_resources, | 773 | fill_resources_irq(&orion_ehci_2, orion_ehci_2_resources, |
| 793 | mapbase, SZ_4K - 1, irq); | 774 | mapbase, SZ_4K - 1, irq); |
| 794 | 775 | ||
| 795 | platform_device_register(&orion_ehci_2); | 776 | platform_device_register(&orion_ehci_2); |
| @@ -819,7 +800,7 @@ void __init orion_sata_init(struct mv_sata_platform_data *sata_data, | |||
| 819 | unsigned long irq) | 800 | unsigned long irq) |
| 820 | { | 801 | { |
| 821 | orion_sata.dev.platform_data = sata_data; | 802 | orion_sata.dev.platform_data = sata_data; |
| 822 | fill_resources(&orion_sata, orion_sata_resources, | 803 | fill_resources_irq(&orion_sata, orion_sata_resources, |
| 823 | mapbase, 0x5000 - 1, irq); | 804 | mapbase, 0x5000 - 1, irq); |
| 824 | 805 | ||
| 825 | platform_device_register(&orion_sata); | 806 | platform_device_register(&orion_sata); |
| @@ -849,7 +830,7 @@ void __init orion_crypto_init(unsigned long mapbase, | |||
| 849 | unsigned long sram_size, | 830 | unsigned long sram_size, |
| 850 | unsigned long irq) | 831 | unsigned long irq) |
| 851 | { | 832 | { |
| 852 | fill_resources(&orion_crypto, orion_crypto_resources, | 833 | fill_resources_irq(&orion_crypto, orion_crypto_resources, |
| 853 | mapbase, 0xffff, irq); | 834 | mapbase, 0xffff, irq); |
| 854 | orion_crypto.num_resources = 3; | 835 | orion_crypto.num_resources = 3; |
| 855 | orion_crypto_resources[2].start = srambase; | 836 | orion_crypto_resources[2].start = srambase; |
diff --git a/arch/arm/plat-orion/include/plat/common.h b/arch/arm/plat-orion/include/plat/common.h index 9e6d76ad48a9..9347f3c58a6d 100644 --- a/arch/arm/plat-orion/include/plat/common.h +++ b/arch/arm/plat-orion/include/plat/common.h | |||
| @@ -47,21 +47,17 @@ void __init orion_ge00_init(struct mv643xx_eth_platform_data *eth_data, | |||
| 47 | void __init orion_ge01_init(struct mv643xx_eth_platform_data *eth_data, | 47 | void __init orion_ge01_init(struct mv643xx_eth_platform_data *eth_data, |
| 48 | unsigned long mapbase, | 48 | unsigned long mapbase, |
| 49 | unsigned long irq, | 49 | unsigned long irq, |
| 50 | unsigned long irq_err, | ||
| 51 | unsigned int tx_csum_limit); | 50 | unsigned int tx_csum_limit); |
| 52 | 51 | ||
| 53 | void __init orion_ge10_init(struct mv643xx_eth_platform_data *eth_data, | 52 | void __init orion_ge10_init(struct mv643xx_eth_platform_data *eth_data, |
| 54 | unsigned long mapbase, | 53 | unsigned long mapbase, |
| 55 | unsigned long irq, | 54 | unsigned long irq); |
| 56 | unsigned long irq_err); | ||
| 57 | 55 | ||
| 58 | void __init orion_ge11_init(struct mv643xx_eth_platform_data *eth_data, | 56 | void __init orion_ge11_init(struct mv643xx_eth_platform_data *eth_data, |
| 59 | unsigned long mapbase, | 57 | unsigned long mapbase, |
| 60 | unsigned long irq, | 58 | unsigned long irq); |
| 61 | unsigned long irq_err); | ||
| 62 | 59 | ||
| 63 | void __init orion_ge00_switch_init(struct dsa_platform_data *d, | 60 | void __init orion_ge00_switch_init(struct dsa_platform_data *d); |
| 64 | int irq); | ||
| 65 | 61 | ||
| 66 | void __init orion_i2c_init(unsigned long mapbase, | 62 | void __init orion_i2c_init(unsigned long mapbase, |
| 67 | unsigned long irq, | 63 | unsigned long irq, |
diff --git a/arch/arm/plat-pxa/Makefile b/arch/arm/plat-pxa/Makefile index 557b134db772..2f06a2e8b1dd 100644 --- a/arch/arm/plat-pxa/Makefile +++ b/arch/arm/plat-pxa/Makefile | |||
| @@ -3,8 +3,6 @@ | |||
| 3 | # | 3 | # |
| 4 | ccflags-$(CONFIG_ARCH_MMP) := -I$(srctree)/$(src)/include | 4 | ccflags-$(CONFIG_ARCH_MMP) := -I$(srctree)/$(src)/include |
| 5 | 5 | ||
| 6 | obj-$(CONFIG_ARCH_PXA) := dma.o | ||
| 7 | |||
| 8 | obj-$(CONFIG_PXA3xx) += mfp.o | 6 | obj-$(CONFIG_PXA3xx) += mfp.o |
| 9 | obj-$(CONFIG_ARCH_MMP) += mfp.o | 7 | obj-$(CONFIG_ARCH_MMP) += mfp.o |
| 10 | 8 | ||
diff --git a/arch/arm/plat-pxa/dma.c b/arch/arm/plat-pxa/dma.c deleted file mode 100644 index de2b061889ec..000000000000 --- a/arch/arm/plat-pxa/dma.c +++ /dev/null | |||
| @@ -1,386 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * linux/arch/arm/plat-pxa/dma.c | ||
| 3 | * | ||
| 4 | * PXA DMA registration and IRQ dispatching | ||
| 5 | * | ||
| 6 | * Author: Nicolas Pitre | ||
| 7 | * Created: Nov 15, 2001 | ||
| 8 | * Copyright: MontaVista Software Inc. | ||
| 9 | * | ||
| 10 | * This program is free software; you can redistribute it and/or modify | ||
| 11 | * it under the terms of the GNU General Public License version 2 as | ||
| 12 | * published by the Free Software Foundation. | ||
| 13 | */ | ||
| 14 | |||
| 15 | #include <linux/module.h> | ||
| 16 | #include <linux/init.h> | ||
| 17 | #include <linux/slab.h> | ||
| 18 | #include <linux/kernel.h> | ||
| 19 | #include <linux/interrupt.h> | ||
| 20 | #include <linux/errno.h> | ||
| 21 | #include <linux/dma-mapping.h> | ||
| 22 | |||
| 23 | #include <asm/irq.h> | ||
| 24 | #include <asm/memory.h> | ||
| 25 | #include <mach/hardware.h> | ||
| 26 | #include <mach/dma.h> | ||
| 27 | |||
| 28 | #define DMA_DEBUG_NAME "pxa_dma" | ||
| 29 | #define DMA_MAX_REQUESTERS 64 | ||
| 30 | |||
| 31 | struct dma_channel { | ||
| 32 | char *name; | ||
| 33 | pxa_dma_prio prio; | ||
| 34 | void (*irq_handler)(int, void *); | ||
| 35 | void *data; | ||
| 36 | spinlock_t lock; | ||
| 37 | }; | ||
| 38 | |||
| 39 | static struct dma_channel *dma_channels; | ||
| 40 | static int num_dma_channels; | ||
| 41 | |||
| 42 | /* | ||
| 43 | * Debug fs | ||
| 44 | */ | ||
| 45 | #ifdef CONFIG_DEBUG_FS | ||
| 46 | #include <linux/debugfs.h> | ||
| 47 | #include <linux/uaccess.h> | ||
| 48 | #include <linux/seq_file.h> | ||
| 49 | |||
| 50 | static struct dentry *dbgfs_root, *dbgfs_state, **dbgfs_chan; | ||
| 51 | |||
| 52 | static int dbg_show_requester_chan(struct seq_file *s, void *p) | ||
| 53 | { | ||
| 54 | int chan = (int)s->private; | ||
| 55 | int i; | ||
| 56 | u32 drcmr; | ||
| 57 | |||
| 58 | seq_printf(s, "DMA channel %d requesters list :\n", chan); | ||
| 59 | for (i = 0; i < DMA_MAX_REQUESTERS; i++) { | ||
| 60 | drcmr = DRCMR(i); | ||
| 61 | if ((drcmr & DRCMR_CHLNUM) == chan) | ||
| 62 | seq_printf(s, "\tRequester %d (MAPVLD=%d)\n", | ||
| 63 | i, !!(drcmr & DRCMR_MAPVLD)); | ||
| 64 | } | ||
| 65 | |||
| 66 | return 0; | ||
| 67 | } | ||
| 68 | |||
| 69 | static inline int dbg_burst_from_dcmd(u32 dcmd) | ||
| 70 | { | ||
| 71 | int burst = (dcmd >> 16) & 0x3; | ||
| 72 | |||
| 73 | return burst ? 4 << burst : 0; | ||
| 74 | } | ||
| 75 | |||
| 76 | static int is_phys_valid(unsigned long addr) | ||
| 77 | { | ||
| 78 | return pfn_valid(__phys_to_pfn(addr)); | ||
| 79 | } | ||
| 80 | |||
| 81 | #define DCSR_STR(flag) (dcsr & DCSR_##flag ? #flag" " : "") | ||
| 82 | #define DCMD_STR(flag) (dcmd & DCMD_##flag ? #flag" " : "") | ||
| 83 | |||
| 84 | static int dbg_show_descriptors(struct seq_file *s, void *p) | ||
| 85 | { | ||
| 86 | int chan = (int)s->private; | ||
| 87 | int i, max_show = 20, burst, width; | ||
| 88 | u32 dcmd; | ||
| 89 | unsigned long phys_desc; | ||
| 90 | struct pxa_dma_desc *desc; | ||
| 91 | unsigned long flags; | ||
| 92 | |||
| 93 | spin_lock_irqsave(&dma_channels[chan].lock, flags); | ||
| 94 | phys_desc = DDADR(chan); | ||
| 95 | |||
| 96 | seq_printf(s, "DMA channel %d descriptors :\n", chan); | ||
| 97 | seq_printf(s, "[%03d] First descriptor unknown\n", 0); | ||
| 98 | for (i = 1; i < max_show && is_phys_valid(phys_desc); i++) { | ||
| 99 | desc = phys_to_virt(phys_desc); | ||
| 100 | dcmd = desc->dcmd; | ||
| 101 | burst = dbg_burst_from_dcmd(dcmd); | ||
| 102 | width = (1 << ((dcmd >> 14) & 0x3)) >> 1; | ||
| 103 | |||
| 104 | seq_printf(s, "[%03d] Desc at %08lx(virt %p)\n", | ||
| 105 | i, phys_desc, desc); | ||
| 106 | seq_printf(s, "\tDDADR = %08x\n", desc->ddadr); | ||
| 107 | seq_printf(s, "\tDSADR = %08x\n", desc->dsadr); | ||
| 108 | seq_printf(s, "\tDTADR = %08x\n", desc->dtadr); | ||
| 109 | seq_printf(s, "\tDCMD = %08x (%s%s%s%s%s%s%sburst=%d width=%d len=%d)\n", | ||
| 110 | dcmd, | ||
| 111 | DCMD_STR(INCSRCADDR), DCMD_STR(INCTRGADDR), | ||
| 112 | DCMD_STR(FLOWSRC), DCMD_STR(FLOWTRG), | ||
| 113 | DCMD_STR(STARTIRQEN), DCMD_STR(ENDIRQEN), | ||
| 114 | DCMD_STR(ENDIAN), burst, width, | ||
| 115 | dcmd & DCMD_LENGTH); | ||
| 116 | phys_desc = desc->ddadr; | ||
| 117 | } | ||
| 118 | if (i == max_show) | ||
| 119 | seq_printf(s, "[%03d] Desc at %08lx ... max display reached\n", | ||
| 120 | i, phys_desc); | ||
| 121 | else | ||
| 122 | seq_printf(s, "[%03d] Desc at %08lx is %s\n", | ||
| 123 | i, phys_desc, phys_desc == DDADR_STOP ? | ||
| 124 | "DDADR_STOP" : "invalid"); | ||
| 125 | |||
| 126 | spin_unlock_irqrestore(&dma_channels[chan].lock, flags); | ||
| 127 | |||
| 128 | return 0; | ||
| 129 | } | ||
| 130 | |||
| 131 | static int dbg_show_chan_state(struct seq_file *s, void *p) | ||
| 132 | { | ||
| 133 | int chan = (int)s->private; | ||
| 134 | u32 dcsr, dcmd; | ||
| 135 | int burst, width; | ||
| 136 | static char *str_prio[] = { "high", "normal", "low" }; | ||
| 137 | |||
| 138 | dcsr = DCSR(chan); | ||
| 139 | dcmd = DCMD(chan); | ||
| 140 | burst = dbg_burst_from_dcmd(dcmd); | ||
| 141 | width = (1 << ((dcmd >> 14) & 0x3)) >> 1; | ||
| 142 | |||
| 143 | seq_printf(s, "DMA channel %d\n", chan); | ||
| 144 | seq_printf(s, "\tPriority : %s\n", str_prio[dma_channels[chan].prio]); | ||
| 145 | seq_printf(s, "\tUnaligned transfer bit: %s\n", | ||
| 146 | DALGN & (1 << chan) ? "yes" : "no"); | ||
| 147 | seq_printf(s, "\tDCSR = %08x (%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s)\n", | ||
| 148 | dcsr, DCSR_STR(RUN), DCSR_STR(NODESC), | ||
| 149 | DCSR_STR(STOPIRQEN), DCSR_STR(EORIRQEN), | ||
| 150 | DCSR_STR(EORJMPEN), DCSR_STR(EORSTOPEN), | ||
| 151 | DCSR_STR(SETCMPST), DCSR_STR(CLRCMPST), | ||
| 152 | DCSR_STR(CMPST), DCSR_STR(EORINTR), DCSR_STR(REQPEND), | ||
| 153 | DCSR_STR(STOPSTATE), DCSR_STR(ENDINTR), | ||
| 154 | DCSR_STR(STARTINTR), DCSR_STR(BUSERR)); | ||
| 155 | |||
| 156 | seq_printf(s, "\tDCMD = %08x (%s%s%s%s%s%s%sburst=%d width=%d len=%d)\n", | ||
| 157 | dcmd, | ||
| 158 | DCMD_STR(INCSRCADDR), DCMD_STR(INCTRGADDR), | ||
| 159 | DCMD_STR(FLOWSRC), DCMD_STR(FLOWTRG), | ||
| 160 | DCMD_STR(STARTIRQEN), DCMD_STR(ENDIRQEN), | ||
| 161 | DCMD_STR(ENDIAN), burst, width, dcmd & DCMD_LENGTH); | ||
| 162 | seq_printf(s, "\tDSADR = %08x\n", DSADR(chan)); | ||
| 163 | seq_printf(s, "\tDTADR = %08x\n", DTADR(chan)); | ||
| 164 | seq_printf(s, "\tDDADR = %08x\n", DDADR(chan)); | ||
| 165 | |||
| 166 | return 0; | ||
| 167 | } | ||
| 168 | |||
| 169 | static int dbg_show_state(struct seq_file *s, void *p) | ||
| 170 | { | ||
| 171 | /* basic device status */ | ||
| 172 | seq_puts(s, "DMA engine status\n"); | ||
| 173 | seq_printf(s, "\tChannel number: %d\n", num_dma_channels); | ||
| 174 | |||
| 175 | return 0; | ||
| 176 | } | ||
| 177 | |||
| 178 | #define DBGFS_FUNC_DECL(name) \ | ||
| 179 | static int dbg_open_##name(struct inode *inode, struct file *file) \ | ||
| 180 | { \ | ||
| 181 | return single_open(file, dbg_show_##name, inode->i_private); \ | ||
| 182 | } \ | ||
| 183 | static const struct file_operations dbg_fops_##name = { \ | ||
| 184 | .owner = THIS_MODULE, \ | ||
| 185 | .open = dbg_open_##name, \ | ||
| 186 | .llseek = seq_lseek, \ | ||
| 187 | .read = seq_read, \ | ||
| 188 | .release = single_release, \ | ||
| 189 | } | ||
| 190 | |||
| 191 | DBGFS_FUNC_DECL(state); | ||
| 192 | DBGFS_FUNC_DECL(chan_state); | ||
| 193 | DBGFS_FUNC_DECL(descriptors); | ||
| 194 | DBGFS_FUNC_DECL(requester_chan); | ||
| 195 | |||
| 196 | static struct dentry *pxa_dma_dbg_alloc_chan(int ch, struct dentry *chandir) | ||
| 197 | { | ||
| 198 | char chan_name[11]; | ||
| 199 | struct dentry *chan, *chan_state = NULL, *chan_descr = NULL; | ||
| 200 | struct dentry *chan_reqs = NULL; | ||
| 201 | void *dt; | ||
| 202 | |||
| 203 | scnprintf(chan_name, sizeof(chan_name), "%d", ch); | ||
| 204 | chan = debugfs_create_dir(chan_name, chandir); | ||
| 205 | dt = (void *)ch; | ||
| 206 | |||
| 207 | if (chan) | ||
| 208 | chan_state = debugfs_create_file("state", 0400, chan, dt, | ||
| 209 | &dbg_fops_chan_state); | ||
| 210 | if (chan_state) | ||
| 211 | chan_descr = debugfs_create_file("descriptors", 0400, chan, dt, | ||
| 212 | &dbg_fops_descriptors); | ||
| 213 | if (chan_descr) | ||
| 214 | chan_reqs = debugfs_create_file("requesters", 0400, chan, dt, | ||
| 215 | &dbg_fops_requester_chan); | ||
| 216 | if (!chan_reqs) | ||
| 217 | goto err_state; | ||
| 218 | |||
| 219 | return chan; | ||
| 220 | |||
| 221 | err_state: | ||
| 222 | debugfs_remove_recursive(chan); | ||
| 223 | return NULL; | ||
| 224 | } | ||
| 225 | |||
| 226 | static void pxa_dma_init_debugfs(void) | ||
| 227 | { | ||
| 228 | int i; | ||
| 229 | struct dentry *chandir; | ||
| 230 | |||
| 231 | dbgfs_root = debugfs_create_dir(DMA_DEBUG_NAME, NULL); | ||
| 232 | if (IS_ERR(dbgfs_root) || !dbgfs_root) | ||
| 233 | goto err_root; | ||
| 234 | |||
| 235 | dbgfs_state = debugfs_create_file("state", 0400, dbgfs_root, NULL, | ||
| 236 | &dbg_fops_state); | ||
| 237 | if (!dbgfs_state) | ||
| 238 | goto err_state; | ||
| 239 | |||
| 240 | dbgfs_chan = kmalloc(sizeof(*dbgfs_state) * num_dma_channels, | ||
| 241 | GFP_KERNEL); | ||
| 242 | if (!dbgfs_chan) | ||
| 243 | goto err_alloc; | ||
| 244 | |||
| 245 | chandir = debugfs_create_dir("channels", dbgfs_root); | ||
| 246 | if (!chandir) | ||
| 247 | goto err_chandir; | ||
| 248 | |||
| 249 | for (i = 0; i < num_dma_channels; i++) { | ||
| 250 | dbgfs_chan[i] = pxa_dma_dbg_alloc_chan(i, chandir); | ||
| 251 | if (!dbgfs_chan[i]) | ||
| 252 | goto err_chans; | ||
| 253 | } | ||
| 254 | |||
| 255 | return; | ||
| 256 | err_chans: | ||
| 257 | err_chandir: | ||
| 258 | kfree(dbgfs_chan); | ||
| 259 | err_alloc: | ||
| 260 | err_state: | ||
| 261 | debugfs_remove_recursive(dbgfs_root); | ||
| 262 | err_root: | ||
| 263 | pr_err("pxa_dma: debugfs is not available\n"); | ||
| 264 | } | ||
| 265 | |||
| 266 | static void __exit pxa_dma_cleanup_debugfs(void) | ||
| 267 | { | ||
| 268 | debugfs_remove_recursive(dbgfs_root); | ||
| 269 | } | ||
| 270 | #else | ||
| 271 | static inline void pxa_dma_init_debugfs(void) {} | ||
| 272 | static inline void pxa_dma_cleanup_debugfs(void) {} | ||
| 273 | #endif | ||
| 274 | |||
| 275 | int pxa_request_dma (char *name, pxa_dma_prio prio, | ||
| 276 | void (*irq_handler)(int, void *), | ||
| 277 | void *data) | ||
| 278 | { | ||
| 279 | unsigned long flags; | ||
| 280 | int i, found = 0; | ||
| 281 | |||
| 282 | /* basic sanity checks */ | ||
| 283 | if (!name || !irq_handler) | ||
| 284 | return -EINVAL; | ||
| 285 | |||
| 286 | local_irq_save(flags); | ||
| 287 | |||
| 288 | do { | ||
| 289 | /* try grabbing a DMA channel with the requested priority */ | ||
| 290 | for (i = 0; i < num_dma_channels; i++) { | ||
| 291 | if ((dma_channels[i].prio == prio) && | ||
| 292 | !dma_channels[i].name && | ||
| 293 | !pxad_toggle_reserved_channel(i)) { | ||
| 294 | found = 1; | ||
| 295 | break; | ||
| 296 | } | ||
| 297 | } | ||
| 298 | /* if requested prio group is full, try a hier priority */ | ||
| 299 | } while (!found && prio--); | ||
| 300 | |||
| 301 | if (found) { | ||
| 302 | DCSR(i) = DCSR_STARTINTR|DCSR_ENDINTR|DCSR_BUSERR; | ||
| 303 | dma_channels[i].name = name; | ||
| 304 | dma_channels[i].irq_handler = irq_handler; | ||
| 305 | dma_channels[i].data = data; | ||
| 306 | } else { | ||
| 307 | printk (KERN_WARNING "No more available DMA channels for %s\n", name); | ||
| 308 | i = -ENODEV; | ||
| 309 | } | ||
| 310 | |||
| 311 | local_irq_restore(flags); | ||
| 312 | return i; | ||
| 313 | } | ||
| 314 | EXPORT_SYMBOL(pxa_request_dma); | ||
| 315 | |||
| 316 | void pxa_free_dma (int dma_ch) | ||
| 317 | { | ||
| 318 | unsigned long flags; | ||
| 319 | |||
| 320 | if (!dma_channels[dma_ch].name) { | ||
| 321 | printk (KERN_CRIT | ||
| 322 | "%s: trying to free channel %d which is already freed\n", | ||
| 323 | __func__, dma_ch); | ||
| 324 | return; | ||
| 325 | } | ||
| 326 | |||
| 327 | local_irq_save(flags); | ||
| 328 | DCSR(dma_ch) = DCSR_STARTINTR|DCSR_ENDINTR|DCSR_BUSERR; | ||
| 329 | dma_channels[dma_ch].name = NULL; | ||
| 330 | pxad_toggle_reserved_channel(dma_ch); | ||
| 331 | local_irq_restore(flags); | ||
| 332 | } | ||
| 333 | EXPORT_SYMBOL(pxa_free_dma); | ||
| 334 | |||
| 335 | static irqreturn_t dma_irq_handler(int irq, void *dev_id) | ||
| 336 | { | ||
| 337 | int i, dint = DINT, done = 0; | ||
| 338 | struct dma_channel *channel; | ||
| 339 | |||
| 340 | while (dint) { | ||
| 341 | i = __ffs(dint); | ||
| 342 | dint &= (dint - 1); | ||
| 343 | channel = &dma_channels[i]; | ||
| 344 | if (channel->name && channel->irq_handler) { | ||
| 345 | channel->irq_handler(i, channel->data); | ||
| 346 | done++; | ||
| 347 | } | ||
| 348 | } | ||
| 349 | if (done) | ||
| 350 | return IRQ_HANDLED; | ||
| 351 | else | ||
| 352 | return IRQ_NONE; | ||
| 353 | } | ||
| 354 | |||
| 355 | int __init pxa_init_dma(int irq, int num_ch) | ||
| 356 | { | ||
| 357 | int i, ret; | ||
| 358 | |||
| 359 | dma_channels = kzalloc(sizeof(struct dma_channel) * num_ch, GFP_KERNEL); | ||
| 360 | if (dma_channels == NULL) | ||
| 361 | return -ENOMEM; | ||
| 362 | |||
| 363 | /* dma channel priorities on pxa2xx processors: | ||
| 364 | * ch 0 - 3, 16 - 19 <--> (0) DMA_PRIO_HIGH | ||
| 365 | * ch 4 - 7, 20 - 23 <--> (1) DMA_PRIO_MEDIUM | ||
| 366 | * ch 8 - 15, 24 - 31 <--> (2) DMA_PRIO_LOW | ||
| 367 | */ | ||
| 368 | for (i = 0; i < num_ch; i++) { | ||
| 369 | DCSR(i) = 0; | ||
| 370 | dma_channels[i].prio = min((i & 0xf) >> 2, DMA_PRIO_LOW); | ||
| 371 | spin_lock_init(&dma_channels[i].lock); | ||
| 372 | } | ||
| 373 | |||
| 374 | ret = request_irq(irq, dma_irq_handler, IRQF_SHARED, "DMA", | ||
| 375 | dma_channels); | ||
| 376 | if (ret) { | ||
| 377 | printk (KERN_CRIT "Wow! Can't register IRQ for DMA\n"); | ||
| 378 | kfree(dma_channels); | ||
| 379 | return ret; | ||
| 380 | } | ||
| 381 | num_dma_channels = num_ch; | ||
| 382 | |||
| 383 | pxa_dma_init_debugfs(); | ||
| 384 | |||
| 385 | return 0; | ||
| 386 | } | ||
diff --git a/arch/arm/plat-pxa/include/plat/dma.h b/arch/arm/plat-pxa/include/plat/dma.h deleted file mode 100644 index ceba3e4184fc..000000000000 --- a/arch/arm/plat-pxa/include/plat/dma.h +++ /dev/null | |||
| @@ -1,100 +0,0 @@ | |||
| 1 | #ifndef __PLAT_DMA_H | ||
| 2 | #define __PLAT_DMA_H | ||
| 3 | |||
| 4 | #define DMAC_REG(x) (*((volatile u32 *)(DMAC_REGS_VIRT + (x)))) | ||
| 5 | |||
| 6 | #define DCSR(n) DMAC_REG((n) << 2) | ||
| 7 | #define DALGN DMAC_REG(0x00a0) /* DMA Alignment Register */ | ||
| 8 | #define DINT DMAC_REG(0x00f0) /* DMA Interrupt Register */ | ||
| 9 | #define DDADR(n) DMAC_REG(0x0200 + ((n) << 4)) | ||
| 10 | #define DSADR(n) DMAC_REG(0x0204 + ((n) << 4)) | ||
| 11 | #define DTADR(n) DMAC_REG(0x0208 + ((n) << 4)) | ||
| 12 | #define DCMD(n) DMAC_REG(0x020c + ((n) << 4)) | ||
| 13 | #define DRCMR(n) DMAC_REG((((n) < 64) ? 0x0100 : 0x1100) + \ | ||
| 14 | (((n) & 0x3f) << 2)) | ||
| 15 | |||
| 16 | #define DCSR_RUN (1 << 31) /* Run Bit (read / write) */ | ||
| 17 | #define DCSR_NODESC (1 << 30) /* No-Descriptor Fetch (read / write) */ | ||
| 18 | #define DCSR_STOPIRQEN (1 << 29) /* Stop Interrupt Enable (read / write) */ | ||
| 19 | #define DCSR_REQPEND (1 << 8) /* Request Pending (read-only) */ | ||
| 20 | #define DCSR_STOPSTATE (1 << 3) /* Stop State (read-only) */ | ||
| 21 | #define DCSR_ENDINTR (1 << 2) /* End Interrupt (read / write) */ | ||
| 22 | #define DCSR_STARTINTR (1 << 1) /* Start Interrupt (read / write) */ | ||
| 23 | #define DCSR_BUSERR (1 << 0) /* Bus Error Interrupt (read / write) */ | ||
| 24 | |||
| 25 | #define DCSR_EORIRQEN (1 << 28) /* End of Receive Interrupt Enable (R/W) */ | ||
| 26 | #define DCSR_EORJMPEN (1 << 27) /* Jump to next descriptor on EOR */ | ||
| 27 | #define DCSR_EORSTOPEN (1 << 26) /* STOP on an EOR */ | ||
| 28 | #define DCSR_SETCMPST (1 << 25) /* Set Descriptor Compare Status */ | ||
| 29 | #define DCSR_CLRCMPST (1 << 24) /* Clear Descriptor Compare Status */ | ||
| 30 | #define DCSR_CMPST (1 << 10) /* The Descriptor Compare Status */ | ||
| 31 | #define DCSR_EORINTR (1 << 9) /* The end of Receive */ | ||
| 32 | |||
| 33 | #define DRCMR_MAPVLD (1 << 7) /* Map Valid (read / write) */ | ||
| 34 | #define DRCMR_CHLNUM 0x1f /* mask for Channel Number (read / write) */ | ||
| 35 | |||
| 36 | #define DDADR_DESCADDR 0xfffffff0 /* Address of next descriptor (mask) */ | ||
| 37 | #define DDADR_STOP (1 << 0) /* Stop (read / write) */ | ||
| 38 | |||
| 39 | #define DCMD_INCSRCADDR (1 << 31) /* Source Address Increment Setting. */ | ||
| 40 | #define DCMD_INCTRGADDR (1 << 30) /* Target Address Increment Setting. */ | ||
| 41 | #define DCMD_FLOWSRC (1 << 29) /* Flow Control by the source. */ | ||
| 42 | #define DCMD_FLOWTRG (1 << 28) /* Flow Control by the target. */ | ||
| 43 | #define DCMD_STARTIRQEN (1 << 22) /* Start Interrupt Enable */ | ||
| 44 | #define DCMD_ENDIRQEN (1 << 21) /* End Interrupt Enable */ | ||
| 45 | #define DCMD_ENDIAN (1 << 18) /* Device Endian-ness. */ | ||
| 46 | #define DCMD_BURST8 (1 << 16) /* 8 byte burst */ | ||
| 47 | #define DCMD_BURST16 (2 << 16) /* 16 byte burst */ | ||
| 48 | #define DCMD_BURST32 (3 << 16) /* 32 byte burst */ | ||
| 49 | #define DCMD_WIDTH1 (1 << 14) /* 1 byte width */ | ||
| 50 | #define DCMD_WIDTH2 (2 << 14) /* 2 byte width (HalfWord) */ | ||
| 51 | #define DCMD_WIDTH4 (3 << 14) /* 4 byte width (Word) */ | ||
| 52 | #define DCMD_LENGTH 0x01fff /* length mask (max = 8K - 1) */ | ||
| 53 | |||
| 54 | /* | ||
| 55 | * Descriptor structure for PXA's DMA engine | ||
| 56 | * Note: this structure must always be aligned to a 16-byte boundary. | ||
| 57 | */ | ||
| 58 | |||
| 59 | typedef struct pxa_dma_desc { | ||
| 60 | volatile u32 ddadr; /* Points to the next descriptor + flags */ | ||
| 61 | volatile u32 dsadr; /* DSADR value for the current transfer */ | ||
| 62 | volatile u32 dtadr; /* DTADR value for the current transfer */ | ||
| 63 | volatile u32 dcmd; /* DCMD value for the current transfer */ | ||
| 64 | } pxa_dma_desc; | ||
| 65 | |||
| 66 | typedef enum { | ||
| 67 | DMA_PRIO_HIGH = 0, | ||
| 68 | DMA_PRIO_MEDIUM = 1, | ||
| 69 | DMA_PRIO_LOW = 2 | ||
| 70 | } pxa_dma_prio; | ||
| 71 | |||
| 72 | /* | ||
| 73 | * DMA registration | ||
| 74 | */ | ||
| 75 | |||
| 76 | int __init pxa_init_dma(int irq, int num_ch); | ||
| 77 | |||
| 78 | int pxa_request_dma (char *name, | ||
| 79 | pxa_dma_prio prio, | ||
| 80 | void (*irq_handler)(int, void *), | ||
| 81 | void *data); | ||
| 82 | |||
| 83 | void pxa_free_dma (int dma_ch); | ||
| 84 | |||
| 85 | /* | ||
| 86 | * Cooperation with pxa_dma + dmaengine while there remains at least one pxa | ||
| 87 | * driver not converted to dmaengine. | ||
| 88 | */ | ||
| 89 | #if defined(CONFIG_PXA_DMA) | ||
| 90 | extern int pxad_toggle_reserved_channel(int legacy_channel); | ||
| 91 | #else | ||
| 92 | static inline int pxad_toggle_reserved_channel(int legacy_channel) | ||
| 93 | { | ||
| 94 | return 0; | ||
| 95 | } | ||
| 96 | #endif | ||
| 97 | |||
| 98 | extern void __init pxa2xx_set_dmac_info(int nb_channels, int nb_requestors); | ||
| 99 | |||
| 100 | #endif /* __PLAT_DMA_H */ | ||
diff --git a/arch/arm/plat-samsung/include/plat/map-s5p.h b/arch/arm/plat-samsung/include/plat/map-s5p.h index b63aeebb93f3..0fe2828f9354 100644 --- a/arch/arm/plat-samsung/include/plat/map-s5p.h +++ b/arch/arm/plat-samsung/include/plat/map-s5p.h | |||
| @@ -14,10 +14,6 @@ | |||
| 14 | #define __ASM_PLAT_MAP_S5P_H __FILE__ | 14 | #define __ASM_PLAT_MAP_S5P_H __FILE__ |
| 15 | 15 | ||
| 16 | #define S5P_VA_CHIPID S3C_ADDR(0x02000000) | 16 | #define S5P_VA_CHIPID S3C_ADDR(0x02000000) |
| 17 | #define S5P_VA_CMU S3C_ADDR(0x02100000) | ||
| 18 | |||
| 19 | #define S5P_VA_DMC0 S3C_ADDR(0x02440000) | ||
| 20 | #define S5P_VA_DMC1 S3C_ADDR(0x02480000) | ||
| 21 | 17 | ||
| 22 | #define S5P_VA_COREPERI_BASE S3C_ADDR(0x02800000) | 18 | #define S5P_VA_COREPERI_BASE S3C_ADDR(0x02800000) |
| 23 | #define S5P_VA_COREPERI(x) (S5P_VA_COREPERI_BASE + (x)) | 19 | #define S5P_VA_COREPERI(x) (S5P_VA_COREPERI_BASE + (x)) |
