Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge tag 'soc-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc

Pull ARM SoC platform changes from Olof Johansson:
"New core SoC-specific changes.

New platforms:
* Introduction of a vendor, Hisilicon, and one of their SoCs with
some random numerical product name.
* Introduction of EFM32, embedded platform from Silicon Labs (ARMv7m,
i.e. !MMU).
* Marvell Berlin series of SoCs, which include the one in Chromecast.
* MOXA platform support, ARM9-based platform used mostly in
industrial products
* Support for Freescale's i.MX50 SoC.

Other work:
* Renesas work for new platforms and drivers, and conversion over to
more multiplatform-friendly device registration schemes.
* SMP support for Allwinner sunxi platforms.
* ... plus a bunch of other stuff across various platforms"

* tag 'soc-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (201 commits)
ARM: tegra: fix tegra_powergate_sequence_power_up() inline
ARM: msm_defconfig: Update for multi-platform
ARM: msm: Move MSM's DT based hardware to multi-platform support
ARM: msm: Only build timer.c if required
ARM: msm: Only build clock.c on proc_comm based platforms
ARM: ux500: Enable system suspend with WFI support
ARM: ux500: turn on PRINTK_TIME in u8500_defconfig
ARM: shmobile: r8a7790: Fix I2C controller names
ARM: msm: Simplify ARCH_MSM_DT config
ARM: msm: Add support for MSM8974 SoC
ARM: sunxi: select ARM_PSCI
MAINTAINERS: Update Allwinner sunXi maintainer files
ARM: sunxi: Select RESET_CONTROLLER
ARM: imx: improve the comment of CCM lpm SW workaround
ARM: imx: improve status check of clock gate
ARM: imx: add necessary interface for pfd
ARM: imx_v6_v7_defconfig: Select CONFIG_REGULATOR_PFUZE100
ARM: imx_v6_v7_defconfig: Select MX35 and MX50 device tree support
ARM: imx: Add cpu frequency scaling support
ARM i.MX35: Add devicetree support.
...

+6135 -1875
+24
Documentation/arm/Marvell/README
··· 211 211 Linux kernel mach directory: arch/arm/mach-mmp 212 212 Linux kernel plat directory: arch/arm/plat-pxa 213 213 214 + Berlin family (Digital Entertainment) 215 + ------------------------------------- 216 + 217 + Flavors: 218 + 88DE3005, Armada 1500-mini 219 + Design name: BG2CD 220 + Core: ARM Cortex-A9, PL310 L2CC 221 + Homepage: http://www.marvell.com/digital-entertainment/armada-1500-mini/ 222 + 88DE3100, Armada 1500 223 + Design name: BG2 224 + Core: Marvell PJ4B (ARMv7), Tauros3 L2CC 225 + Homepage: http://www.marvell.com/digital-entertainment/armada-1500/ 226 + Product Brief: http://www.marvell.com/digital-entertainment/armada-1500/assets/Marvell-ARMADA-1500-Product-Brief.pdf 227 + 88DE???? 228 + Design name: BG3 229 + Core: ARM Cortex-A15, CA15 integrated L2CC 230 + 231 + Homepage: http://www.marvell.com/digital-entertainment/ 232 + Directory: arch/arm/mach-berlin 233 + 234 + Comments: 235 + * This line of SoCs is based on Marvell Sheeva or ARM Cortex CPUs 236 + with Synopsys DesignWare (IRQ, GPIO, Timers, ...) and PXA IP (SDHCI, USB, ETH, ...). 237 + 214 238 Long-term plans 215 239 --------------- 216 240
+32
Documentation/devicetree/bindings/arm/hisilicon/hisilicon.txt
··· 1 + Hisilicon Platforms Device Tree Bindings 2 + ---------------------------------------------------- 3 + 4 + Hi4511 Board 5 + Required root node properties: 6 + - compatible = "hisilicon,hi3620-hi4511"; 7 + 8 + Hisilicon system controller 9 + 10 + Required properties: 11 + - compatible : "hisilicon,sysctrl" 12 + - reg : Register address and size 13 + 14 + Optional properties: 15 + - smp-offset : offset in sysctrl for notifying slave cpu booting 16 + cpu 1, reg; 17 + cpu 2, reg + 0x4; 18 + cpu 3, reg + 0x8; 19 + If reg value is not zero, cpun exit wfi and go 20 + - resume-offset : offset in sysctrl for notifying cpu0 when resume 21 + - reboot-offset : offset in sysctrl for system reboot 22 + 23 + Example: 24 + 25 + /* for Hi3620 */ 26 + sysctrl: system-controller@fc802000 { 27 + compatible = "hisilicon,sysctrl"; 28 + reg = <0xfc802000 0x1000>; 29 + smp-offset = <0x31c>; 30 + resume-offset = <0x308>; 31 + reboot-offset = <0x4>; 32 + };
+24
Documentation/devicetree/bindings/arm/marvell,berlin.txt
··· 1 + Marvell Berlin SoC Family Device Tree Bindings 2 + --------------------------------------------------------------- 3 + 4 + Boards with a SoC of the Marvell Berlin family, e.g. Armada 1500 5 + shall have the following properties: 6 + 7 + * Required root node properties: 8 + compatible: must contain "marvell,berlin" 9 + 10 + In addition, the above compatible shall be extended with the specific 11 + SoC and board used. Currently known SoC compatibles are: 12 + "marvell,berlin2" for Marvell Armada 1500 (BG2, 88DE3100), 13 + "marvell,berlin2cd" for Marvell Armada 1500-mini (BG2CD, 88DE3005) 14 + "marvell,berlin2ct" for Marvell Armada ? (BG2CT, 88DE????) 15 + "marvell,berlin3" for Marvell Armada ? (BG3, 88DE????) 16 + 17 + * Example: 18 + 19 + / { 20 + model = "Sony NSZ-GS7"; 21 + compatible = "sony,nsz-gs7", "marvell,berlin2", "marvell,berlin"; 22 + 23 + ... 24 + }
+113
Documentation/devicetree/bindings/clock/imx35-clock.txt
··· 1 + * Clock bindings for Freescale i.MX35 2 + 3 + Required properties: 4 + - compatible: Should be "fsl,imx35-ccm" 5 + - reg: Address and length of the register set 6 + - interrupts: Should contain CCM interrupt 7 + - #clock-cells: Should be <1> 8 + 9 + The clock consumer should specify the desired clock by having the clock 10 + ID in its "clocks" phandle cell. The following is a full list of i.MX35 11 + clocks and IDs. 12 + 13 + Clock ID 14 + --------------------------- 15 + ckih 0 16 + mpll 1 17 + ppll 2 18 + mpll_075 3 19 + arm 4 20 + hsp 5 21 + hsp_div 6 22 + hsp_sel 7 23 + ahb 8 24 + ipg 9 25 + arm_per_div 10 26 + ahb_per_div 11 27 + ipg_per 12 28 + uart_sel 13 29 + uart_div 14 30 + esdhc_sel 15 31 + esdhc1_div 16 32 + esdhc2_div 17 33 + esdhc3_div 18 34 + spdif_sel 19 35 + spdif_div_pre 20 36 + spdif_div_post 21 37 + ssi_sel 22 38 + ssi1_div_pre 23 39 + ssi1_div_post 24 40 + ssi2_div_pre 25 41 + ssi2_div_post 26 42 + usb_sel 27 43 + usb_div 28 44 + nfc_div 29 45 + asrc_gate 30 46 + pata_gate 31 47 + audmux_gate 32 48 + can1_gate 33 49 + can2_gate 34 50 + cspi1_gate 35 51 + cspi2_gate 36 52 + ect_gate 37 53 + edio_gate 38 54 + emi_gate 39 55 + epit1_gate 40 56 + epit2_gate 41 57 + esai_gate 42 58 + esdhc1_gate 43 59 + esdhc2_gate 44 60 + esdhc3_gate 45 61 + fec_gate 46 62 + gpio1_gate 47 63 + gpio2_gate 48 64 + gpio3_gate 49 65 + gpt_gate 50 66 + i2c1_gate 51 67 + i2c2_gate 52 68 + i2c3_gate 53 69 + iomuxc_gate 54 70 + ipu_gate 55 71 + kpp_gate 56 72 + mlb_gate 57 73 + mshc_gate 58 74 + owire_gate 59 75 + pwm_gate 60 76 + rngc_gate 61 77 + rtc_gate 62 78 + rtic_gate 63 79 + scc_gate 64 80 + sdma_gate 65 81 + spba_gate 66 82 + spdif_gate 67 83 + ssi1_gate 68 84 + ssi2_gate 69 85 + uart1_gate 70 86 + uart2_gate 71 87 + uart3_gate 72 88 + usbotg_gate 73 89 + wdog_gate 74 90 + max_gate 75 91 + admux_gate 76 92 + csi_gate 77 93 + csi_div 78 94 + csi_sel 79 95 + iim_gate 80 96 + gpu2d_gate 81 97 + 98 + Examples: 99 + 100 + clks: ccm@53f80000 { 101 + compatible = "fsl,imx35-ccm"; 102 + reg = <0x53f80000 0x4000>; 103 + interrupts = <31>; 104 + #clock-cells = <1>; 105 + }; 106 + 107 + esdhc1: esdhc@53fb4000 { 108 + compatible = "fsl,imx35-esdhc"; 109 + reg = <0x53fb4000 0x4000>; 110 + interrupts = <7>; 111 + clocks = <&clks 9>, <&clks 8>, <&clks 43>; 112 + clock-names = "ipg", "ahb", "per"; 113 + };
+3 -192
Documentation/devicetree/bindings/clock/imx5-clock.txt
··· 7 7 - #clock-cells: Should be <1> 8 8 9 9 The clock consumer should specify the desired clock by having the clock 10 - ID in its "clocks" phandle cell. The following is a full list of i.MX5 11 - clocks and IDs. 12 - 13 - Clock ID 14 - --------------------------- 15 - dummy 0 16 - ckil 1 17 - osc 2 18 - ckih1 3 19 - ckih2 4 20 - ahb 5 21 - ipg 6 22 - axi_a 7 23 - axi_b 8 24 - uart_pred 9 25 - uart_root 10 26 - esdhc_a_pred 11 27 - esdhc_b_pred 12 28 - esdhc_c_s 13 29 - esdhc_d_s 14 30 - emi_sel 15 31 - emi_slow_podf 16 32 - nfc_podf 17 33 - ecspi_pred 18 34 - ecspi_podf 19 35 - usboh3_pred 20 36 - usboh3_podf 21 37 - usb_phy_pred 22 38 - usb_phy_podf 23 39 - cpu_podf 24 40 - di_pred 25 41 - tve_s 27 42 - uart1_ipg_gate 28 43 - uart1_per_gate 29 44 - uart2_ipg_gate 30 45 - uart2_per_gate 31 46 - uart3_ipg_gate 32 47 - uart3_per_gate 33 48 - i2c1_gate 34 49 - i2c2_gate 35 50 - gpt_ipg_gate 36 51 - pwm1_ipg_gate 37 52 - pwm1_hf_gate 38 53 - pwm2_ipg_gate 39 54 - pwm2_hf_gate 40 55 - gpt_hf_gate 41 56 - fec_gate 42 57 - usboh3_per_gate 43 58 - esdhc1_ipg_gate 44 59 - esdhc2_ipg_gate 45 60 - esdhc3_ipg_gate 46 61 - esdhc4_ipg_gate 47 62 - ssi1_ipg_gate 48 63 - ssi2_ipg_gate 49 64 - ssi3_ipg_gate 50 65 - ecspi1_ipg_gate 51 66 - ecspi1_per_gate 52 67 - ecspi2_ipg_gate 53 68 - ecspi2_per_gate 54 69 - cspi_ipg_gate 55 70 - sdma_gate 56 71 - emi_slow_gate 57 72 - ipu_s 58 73 - ipu_gate 59 74 - nfc_gate 60 75 - ipu_di1_gate 61 76 - vpu_s 62 77 - vpu_gate 63 78 - vpu_reference_gate 64 79 - uart4_ipg_gate 65 80 - uart4_per_gate 66 81 - uart5_ipg_gate 67 82 - uart5_per_gate 68 83 - tve_gate 69 84 - tve_pred 70 85 - esdhc1_per_gate 71 86 - esdhc2_per_gate 72 87 - esdhc3_per_gate 73 88 - esdhc4_per_gate 74 89 - usb_phy_gate 75 90 - hsi2c_gate 76 91 - mipi_hsc1_gate 77 92 - mipi_hsc2_gate 78 93 - mipi_esc_gate 79 94 - mipi_hsp_gate 80 95 - ldb_di1_div_3_5 81 96 - ldb_di1_div 82 97 - ldb_di0_div_3_5 83 98 - ldb_di0_div 84 99 - ldb_di1_gate 85 100 - can2_serial_gate 86 101 - can2_ipg_gate 87 102 - i2c3_gate 88 103 - lp_apm 89 104 - periph_apm 90 105 - main_bus 91 106 - ahb_max 92 107 - aips_tz1 93 108 - aips_tz2 94 109 - tmax1 95 110 - tmax2 96 111 - tmax3 97 112 - spba 98 113 - uart_sel 99 114 - esdhc_a_sel 100 115 - esdhc_b_sel 101 116 - esdhc_a_podf 102 117 - esdhc_b_podf 103 118 - ecspi_sel 104 119 - usboh3_sel 105 120 - usb_phy_sel 106 121 - iim_gate 107 122 - usboh3_gate 108 123 - emi_fast_gate 109 124 - ipu_di0_gate 110 125 - gpc_dvfs 111 126 - pll1_sw 112 127 - pll2_sw 113 128 - pll3_sw 114 129 - ipu_di0_sel 115 130 - ipu_di1_sel 116 131 - tve_ext_sel 117 132 - mx51_mipi 118 133 - pll4_sw 119 134 - ldb_di1_sel 120 135 - di_pll4_podf 121 136 - ldb_di0_sel 122 137 - ldb_di0_gate 123 138 - usb_phy1_gate 124 139 - usb_phy2_gate 125 140 - per_lp_apm 126 141 - per_pred1 127 142 - per_pred2 128 143 - per_podf 129 144 - per_root 130 145 - ssi_apm 131 146 - ssi1_root_sel 132 147 - ssi2_root_sel 133 148 - ssi3_root_sel 134 149 - ssi_ext1_sel 135 150 - ssi_ext2_sel 136 151 - ssi_ext1_com_sel 137 152 - ssi_ext2_com_sel 138 153 - ssi1_root_pred 139 154 - ssi1_root_podf 140 155 - ssi2_root_pred 141 156 - ssi2_root_podf 142 157 - ssi_ext1_pred 143 158 - ssi_ext1_podf 144 159 - ssi_ext2_pred 145 160 - ssi_ext2_podf 146 161 - ssi1_root_gate 147 162 - ssi2_root_gate 148 163 - ssi3_root_gate 149 164 - ssi_ext1_gate 150 165 - ssi_ext2_gate 151 166 - epit1_ipg_gate 152 167 - epit1_hf_gate 153 168 - epit2_ipg_gate 154 169 - epit2_hf_gate 155 170 - can_sel 156 171 - can1_serial_gate 157 172 - can1_ipg_gate 158 173 - owire_gate 159 174 - gpu3d_s 160 175 - gpu2d_s 161 176 - gpu3d_gate 162 177 - gpu2d_gate 163 178 - garb_gate 164 179 - cko1_sel 165 180 - cko1_podf 166 181 - cko1 167 182 - cko2_sel 168 183 - cko2_podf 169 184 - cko2 170 185 - srtc_gate 171 186 - pata_gate 172 187 - sata_gate 173 188 - spdif_xtal_sel 174 189 - spdif0_sel 175 190 - spdif1_sel 176 191 - spdif0_pred 177 192 - spdif0_podf 178 193 - spdif1_pred 179 194 - spdif1_podf 180 195 - spdif0_com_sel 181 196 - spdif1_com_sel 182 197 - spdif0_gate 183 198 - spdif1_gate 184 199 - spdif_ipg_gate 185 200 - ocram 186 10 + ID in its "clocks" phandle cell. See include/dt-bindings/clock/imx5-clock.h 11 + for the full list of i.MX5 clock IDs. 201 12 202 13 Examples (for mx53): 203 14 ··· 23 212 compatible = "fsl,imx53-flexcan", "fsl,p1010-flexcan"; 24 213 reg = <0x53fc8000 0x4000>; 25 214 interrupts = <82>; 26 - clocks = <&clks 158>, <&clks 157>; 215 + clocks = <&clks IMX5_CLK_CAN1_IPG_GATE>, <&clks IMX5_CLK_CAN1_SERIAL_GATE>; 27 216 clock-names = "ipg", "per"; 28 217 status = "disabled"; 29 218 };
+1 -1
Documentation/devicetree/bindings/interrupt-controller/allwinner,sun4i-ic.txt
··· 14 14 compatible = "allwinner,sun4i-ic"; 15 15 reg = <0x01c20400 0x400>; 16 16 interrupt-controller; 17 - #interrupt-cells = <2>; 17 + #interrupt-cells = <1>; 18 18 };
+32
Documentation/devicetree/bindings/interrupt-controller/snps,dw-apb-ictl.txt
··· 1 + Synopsys DesignWare APB interrupt controller (dw_apb_ictl) 2 + 3 + Synopsys DesignWare provides interrupt controller IP for APB known as 4 + dw_apb_ictl. The IP is used as secondary interrupt controller in some SoCs with 5 + APB bus, e.g. Marvell Armada 1500. 6 + 7 + Required properties: 8 + - compatible: shall be "snps,dw-apb-ictl" 9 + - reg: physical base address of the controller and length of memory mapped 10 + region starting with ENABLE_LOW register 11 + - interrupt-controller: identifies the node as an interrupt controller 12 + - #interrupt-cells: number of cells to encode an interrupt-specifier, shall be 1 13 + - interrupts: interrupt reference to primary interrupt controller 14 + - interrupt-parent: (optional) reference specific primary interrupt controller 15 + 16 + The interrupt sources map to the corresponding bits in the interrupt 17 + registers, i.e. 18 + - 0 maps to bit 0 of low interrupts, 19 + - 1 maps to bit 1 of low interrupts, 20 + - 32 maps to bit 0 of high interrupts, 21 + - 33 maps to bit 1 of high interrupts, 22 + - (optional) fast interrupts start at 64. 23 + 24 + Example: 25 + aic: interrupt-controller@3000 { 26 + compatible = "snps,dw-apb-ictl"; 27 + reg = <0x3000 0xc00>; 28 + interrupt-controller; 29 + #interrupt-cells = <1>; 30 + interrupt-parent = <&gic>; 31 + interrupts = <GIC_SPI 3 IRQ_TYPE_LEVEL_HIGH>; 32 + };
+18 -1
MAINTAINERS
··· 772 772 M: Maxime Ripard <maxime.ripard@free-electrons.com> 773 773 L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) 774 774 S: Maintained 775 - F: arch/arm/mach-sunxi/ 775 + N: sun[x4567]i 776 + 777 + ARM/Allwinner SoC Clock Support 778 + M: Emilio López <emilio@elopez.com.ar> 779 + S: Maintained 780 + F: drivers/clk/sunxi/ 776 781 777 782 ARM/ATMEL AT91RM9200 AND AT91SAM ARM ARCHITECTURES 778 783 M: Andrew Victor <linux@maxim.org.za> ··· 877 872 S: Maintained 878 873 F: arch/arm/mach-ebsa110/ 879 874 F: drivers/net/ethernet/amd/am79c961a.* 875 + 876 + ARM/ENERGY MICRO (SILICON LABS) EFM32 SUPPORT 877 + M: Uwe Kleine-König <kernel@pengutronix.de> 878 + L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) 879 + S: Maintained 880 + N: efm32 880 881 881 882 ARM/EZX SMARTPHONES (A780, A910, A1200, E680, ROKR E2 and ROKR E6) 882 883 M: Daniel Ribeiro <drwyrm@gmail.com> ··· 1045 1034 L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) 1046 1035 S: Maintained 1047 1036 F: arch/arm/mach-mvebu/ 1037 + 1038 + ARM/Marvell Berlin SoC support 1039 + M: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> 1040 + L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) 1041 + S: Maintained 1042 + F: arch/arm/mach-berlin/ 1048 1043 1049 1044 ARM/Marvell Dove/Kirkwood/MV78xx0/Orion SOC support 1050 1045 M: Jason Cooper <jason@lakedaemon.net>
+38 -10
arch/arm/Kconfig
··· 414 414 Ethernet interface, two PCMCIA sockets, two serial ports and a 415 415 parallel port. 416 416 417 + config ARCH_EFM32 418 + bool "Energy Micro efm32" 419 + depends on !MMU 420 + select ARCH_REQUIRE_GPIOLIB 421 + select ARM_NVIC 422 + # CLKSRC_MMIO is wrong here, but needed until a proper fix is merged, 423 + # i.e. CLKSRC_EFM32 selecting CLKSRC_MMIO 424 + select CLKSRC_MMIO 425 + select CLKSRC_OF 426 + select COMMON_CLK 427 + select CPU_V7M 428 + select GENERIC_CLOCKEVENTS 429 + select NO_DMA 430 + select NO_IOPORT 431 + select SPARSE_IRQ 432 + select USE_OF 433 + help 434 + Support for Energy Micro's (now Silicon Labs) efm32 Giant Gecko 435 + processors. 436 + 417 437 config ARCH_EP93XX 418 438 bool "EP93xx-based" 419 439 select ARCH_HAS_HOLES_MEMORYMODEL ··· 655 635 help 656 636 Support for Intel/Marvell's PXA2xx/PXA3xx processor line. 657 637 658 - config ARCH_MSM 638 + config ARCH_MSM_NODT 659 639 bool "Qualcomm MSM" 640 + select ARCH_MSM 660 641 select ARCH_REQUIRE_GPIOLIB 661 - select CLKSRC_OF if OF 662 642 select COMMON_CLK 663 643 select GENERIC_CLOCKEVENTS 664 644 help ··· 668 648 stack and controls some vital subsystems 669 649 (clock and power control, etc). 670 650 671 - config ARCH_SHMOBILE 672 - bool "Renesas SH-Mobile / R-Mobile" 651 + config ARCH_SHMOBILE_LEGACY 652 + bool "Renesas SH-Mobile / R-Mobile (non-multiplatform)" 653 + select ARCH_SHMOBILE 673 654 select ARM_PATCH_PHYS_VIRT 674 655 select CLKDEV_LOOKUP 675 656 select GENERIC_CLOCKEVENTS ··· 685 664 select PM_GENERIC_DOMAINS if PM 686 665 select SPARSE_IRQ 687 666 help 688 - Support for Renesas's SH-Mobile and R-Mobile ARM platforms. 667 + Support for Renesas's SH-Mobile and R-Mobile ARM platforms using 668 + a non-multiplatform kernel. 689 669 690 670 config ARCH_RPC 691 671 bool "RiscPC" ··· 753 731 select CLKDEV_LOOKUP 754 732 select CLKSRC_SAMSUNG_PWM 755 733 select COMMON_CLK 756 - select CPU_V6 734 + select CPU_V6K 757 735 select GENERIC_CLOCKEVENTS 758 736 select GPIO_SAMSUNG 759 737 select HAVE_S3C2410_I2C if I2C ··· 935 913 936 914 source "arch/arm/mach-bcm2835/Kconfig" 937 915 916 + source "arch/arm/mach-berlin/Kconfig" 917 + 938 918 source "arch/arm/mach-clps711x/Kconfig" 939 919 940 920 source "arch/arm/mach-cns3xxx/Kconfig" ··· 952 928 source "arch/arm/mach-gemini/Kconfig" 953 929 954 930 source "arch/arm/mach-highbank/Kconfig" 931 + 932 + source "arch/arm/mach-hisi/Kconfig" 955 933 956 934 source "arch/arm/mach-integrator/Kconfig" 957 935 ··· 972 946 source "arch/arm/mach-ks8695/Kconfig" 973 947 974 948 source "arch/arm/mach-msm/Kconfig" 949 + 950 + source "arch/arm/mach-moxart/Kconfig" 975 951 976 952 source "arch/arm/mach-mv78xx0/Kconfig" 977 953 ··· 1641 1613 default 200 if ARCH_EBSA110 || ARCH_S3C24XX || ARCH_S5P64X0 || \ 1642 1614 ARCH_S5PV210 || ARCH_EXYNOS4 1643 1615 default AT91_TIMER_HZ if ARCH_AT91 1644 - default SHMOBILE_TIMER_HZ if ARCH_SHMOBILE 1616 + default SHMOBILE_TIMER_HZ if ARCH_SHMOBILE_LEGACY 1645 1617 default 0 1646 1618 1647 1619 choice ··· 1823 1795 source "mm/Kconfig" 1824 1796 1825 1797 config FORCE_MAX_ZONEORDER 1826 - int "Maximum zone order" if ARCH_SHMOBILE 1827 - range 11 64 if ARCH_SHMOBILE 1798 + int "Maximum zone order" if ARCH_SHMOBILE_LEGACY 1799 + range 11 64 if ARCH_SHMOBILE_LEGACY 1828 1800 default "12" if SOC_AM33XX 1829 - default "9" if SA1111 1801 + default "9" if SA1111 || ARCH_EFM32 1830 1802 default "11" 1831 1803 help 1832 1804 The kernel memory allocator divides physically contiguous memory
+19
arch/arm/Kconfig.debug
··· 117 117 mobile SoCs in the Kona family of chips (e.g. bcm28155, 118 118 bcm11351, etc...) 119 119 120 + config DEBUG_BERLIN_UART 121 + bool "Marvell Berlin SoC Debug UART" 122 + depends on ARCH_BERLIN 123 + select DEBUG_UART_8250 124 + help 125 + Say Y here if you want kernel low-level debugging support 126 + on Marvell Berlin SoC based platforms. 127 + 120 128 config DEBUG_CLPS711X_UART1 121 129 bool "Kernel low-level debugging messages via UART1" 122 130 depends on ARCH_CLPS711X ··· 285 277 help 286 278 Say Y here if you want kernel low-level debugging support 287 279 on i.MX35. 280 + 281 + config DEBUG_IMX50_UART 282 + bool "i.MX50 Debug UART" 283 + depends on SOC_IMX50 284 + help 285 + Say Y here if you want kernel low-level debugging support 286 + on i.MX50. 288 287 289 288 config DEBUG_IMX51_UART 290 289 bool "i.MX51 Debug UART" ··· 935 920 DEBUG_IMX21_IMX27_UART || \ 936 921 DEBUG_IMX31_UART || \ 937 922 DEBUG_IMX35_UART || \ 923 + DEBUG_IMX50_UART || \ 938 924 DEBUG_IMX51_UART || \ 939 925 DEBUG_IMX53_UART || \ 940 926 DEBUG_IMX6Q_UART || \ ··· 970 954 DEBUG_IMX21_IMX27_UART || \ 971 955 DEBUG_IMX31_UART || \ 972 956 DEBUG_IMX35_UART || \ 957 + DEBUG_IMX50_UART || \ 973 958 DEBUG_IMX51_UART || \ 974 959 DEBUG_IMX53_UART ||\ 975 960 DEBUG_IMX6Q_UART || \ ··· 1052 1035 default 0xf1012000 if DEBUG_MVEBU_UART_ALTERNATE 1053 1036 default 0xf1012000 if ARCH_DOVE || ARCH_KIRKWOOD || ARCH_MV78XX0 || \ 1054 1037 ARCH_ORION5X 1038 + default 0xf7fc9000 if DEBUG_BERLIN_UART 1055 1039 default 0xf8b00000 if DEBUG_HI3716_UART 1056 1040 default 0xfcb00000 if DEBUG_HI3620_UART 1057 1041 default 0xfe800000 if ARCH_IOP32X ··· 1078 1060 default 0xf2100000 if DEBUG_PXA_UART1 1079 1061 default 0xf4090000 if ARCH_LPC32XX 1080 1062 default 0xf4200000 if ARCH_GEMINI 1063 + default 0xf7fc9000 if DEBUG_BERLIN_UART 1081 1064 default 0xf8009000 if DEBUG_VEXPRESS_UART0_CA9 1082 1065 default 0xf8090000 if DEBUG_VEXPRESS_UART0_RS1 1083 1066 default 0xfb009000 if DEBUG_REALVIEW_STD_PORT
+4 -1
arch/arm/Makefile
··· 144 144 machine-$(CONFIG_ARCH_AT91) += at91 145 145 machine-$(CONFIG_ARCH_BCM) += bcm 146 146 machine-$(CONFIG_ARCH_BCM2835) += bcm2835 147 + machine-$(CONFIG_ARCH_BERLIN) += berlin 147 148 machine-$(CONFIG_ARCH_CLPS711X) += clps711x 148 149 machine-$(CONFIG_ARCH_CNS3XXX) += cns3xxx 149 150 machine-$(CONFIG_ARCH_DAVINCI) += davinci 150 151 machine-$(CONFIG_ARCH_DOVE) += dove 151 152 machine-$(CONFIG_ARCH_EBSA110) += ebsa110 153 + machine-$(CONFIG_ARCH_EFM32) += efm32 152 154 machine-$(CONFIG_ARCH_EP93XX) += ep93xx 153 155 machine-$(CONFIG_ARCH_EXYNOS) += exynos 154 156 machine-$(CONFIG_ARCH_GEMINI) += gemini 155 157 machine-$(CONFIG_ARCH_HIGHBANK) += highbank 158 + machine-$(CONFIG_ARCH_HI3xxx) += hisi 156 159 machine-$(CONFIG_ARCH_INTEGRATOR) += integrator 157 160 machine-$(CONFIG_ARCH_IOP13XX) += iop13xx 158 161 machine-$(CONFIG_ARCH_IOP32X) += iop32x ··· 166 163 machine-$(CONFIG_ARCH_KS8695) += ks8695 167 164 machine-$(CONFIG_ARCH_LPC32XX) += lpc32xx 168 165 machine-$(CONFIG_ARCH_MMP) += mmp 166 + machine-$(CONFIG_ARCH_MOXART) += moxart 169 167 machine-$(CONFIG_ARCH_MSM) += msm 170 168 machine-$(CONFIG_ARCH_MV78XX0) += mv78xx0 171 169 machine-$(CONFIG_ARCH_MVEBU) += mvebu ··· 190 186 machine-$(CONFIG_ARCH_S5PV210) += s5pv210 191 187 machine-$(CONFIG_ARCH_SA1100) += sa1100 192 188 machine-$(CONFIG_ARCH_SHMOBILE) += shmobile 193 - machine-$(CONFIG_ARCH_SHMOBILE_MULTI) += shmobile 194 189 machine-$(CONFIG_ARCH_SIRF) += prima2 195 190 machine-$(CONFIG_ARCH_SOCFPGA) += socfpga 196 191 machine-$(CONFIG_ARCH_STI) += sti
+1 -1
arch/arm/boot/compressed/Makefile
··· 64 64 endif 65 65 endif 66 66 67 - ifeq ($(CONFIG_ARCH_SHMOBILE),y) 67 + ifeq ($(CONFIG_ARCH_SHMOBILE_LEGACY),y) 68 68 OBJS += head-shmobile.o 69 69 endif 70 70
+6 -1
arch/arm/boot/dts/Makefile
··· 46 46 dtb-$(CONFIG_ARCH_BCM_MOBILE) += bcm11351-brt.dtb \ 47 47 bcm28155-ap.dtb 48 48 dtb-$(CONFIG_ARCH_BCM2835) += bcm2835-rpi-b.dtb 49 + dtb-$(CONFIG_ARCH_BERLIN) += \ 50 + berlin2-sony-nsz-gs7.dtb \ 51 + berlin2cd-google-chromecast.dtb 49 52 dtb-$(CONFIG_ARCH_DAVINCI) += da850-enbw-cmc.dtb \ 50 53 da850-evm.dtb 51 54 dtb-$(CONFIG_ARCH_DOVE) += dove-cm-a510.dtb \ ··· 56 53 dove-d2plug.dtb \ 57 54 dove-d3plug.dtb \ 58 55 dove-dove-db.dtb 56 + dtb-$(CONFIG_ARCH_EFM32) += efm32gg-dk3750.dtb 59 57 dtb-$(CONFIG_ARCH_EXYNOS) += exynos4210-origen.dtb \ 60 58 exynos4210-smdkv310.dtb \ 61 59 exynos4210-trats.dtb \ ··· 71 67 exynos5420-smdk5420.dtb \ 72 68 exynos5440-sd5v1.dtb \ 73 69 exynos5440-ssdk5440.dtb 70 + dtb-$(CONFIG_ARCH_HI3xxx) += hi3620-hi4511.dtb 74 71 dtb-$(CONFIG_ARCH_HIGHBANK) += highbank.dtb \ 75 72 ecx-2000.dtb 76 73 dtb-$(CONFIG_ARCH_INTEGRATOR) += integratorap.dtb \ ··· 222 217 dtb-$(CONFIG_ARCH_S3C24XX) += s3c2416-smdk2416.dtb 223 218 dtb-$(CONFIG_ARCH_S3C64XX) += s3c6410-mini6410.dtb \ 224 219 s3c6410-smdk6410.dtb 225 - dtb-$(CONFIG_ARCH_SHMOBILE) += emev2-kzm9d.dtb \ 220 + dtb-$(CONFIG_ARCH_SHMOBILE_LEGACY) += emev2-kzm9d.dtb \ 226 221 r7s72100-genmai.dtb \ 227 222 r8a7740-armadillo800eva.dtb \ 228 223 r8a7778-bockw.dtb \
+18
arch/arm/boot/dts/armv7-m.dtsi
··· 1 + #include "skeleton.dtsi" 2 + 3 + / { 4 + nvic: nv-interrupt-controller { 5 + compatible = "arm,armv7m-nvic"; 6 + interrupt-controller; 7 + #interrupt-cells = <1>; 8 + reg = <0xe000e100 0xc00>; 9 + }; 10 + 11 + soc { 12 + #address-cells = <1>; 13 + #size-cells = <1>; 14 + compatible = "simple-bus"; 15 + interrupt-parent = <&nvic>; 16 + ranges; 17 + }; 18 + };
+29
arch/arm/boot/dts/berlin2-sony-nsz-gs7.dts
··· 1 + /* 2 + * Device Tree file for Sony NSZ-GS7 3 + * 4 + * Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> 5 + * 6 + * This file is licensed under the terms of the GNU General Public 7 + * License version 2. This program is licensed "as is" without any 8 + * warranty of any kind, whether express or implied. 9 + */ 10 + 11 + /dts-v1/; 12 + 13 + #include "berlin2.dtsi" 14 + 15 + / { 16 + model = "Sony NSZ-GS7"; 17 + compatible = "sony,nsz-gs7", "marvell,berlin2", "marvell,berlin"; 18 + 19 + chosen { 20 + bootargs = "console=ttyS0,115200 earlyprintk"; 21 + }; 22 + 23 + memory { 24 + device_type = "memory"; 25 + reg = <0x00000000 0x40000000>; /* 1 GB */ 26 + }; 27 + }; 28 + 29 + &uart0 { status = "okay"; };
+227
arch/arm/boot/dts/berlin2.dtsi
··· 1 + /* 2 + * Device Tree Include file for Marvell Armada 1500 (Berlin BG2) SoC 3 + * 4 + * Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> 5 + * 6 + * based on GPL'ed 2.6 kernel sources 7 + * (c) Marvell International Ltd. 8 + * 9 + * This file is licensed under the terms of the GNU General Public 10 + * License version 2. This program is licensed "as is" without any 11 + * warranty of any kind, whether express or implied. 12 + */ 13 + 14 + #include "skeleton.dtsi" 15 + #include <dt-bindings/interrupt-controller/arm-gic.h> 16 + 17 + / { 18 + model = "Marvell Armada 1500 (BG2) SoC"; 19 + compatible = "marvell,berlin2", "marvell,berlin"; 20 + 21 + cpus { 22 + #address-cells = <1>; 23 + #size-cells = <0>; 24 + 25 + cpu@0 { 26 + compatible = "marvell,pj4b"; 27 + device_type = "cpu"; 28 + next-level-cache = <&l2>; 29 + reg = <0>; 30 + }; 31 + 32 + cpu@1 { 33 + compatible = "marvell,pj4b"; 34 + device_type = "cpu"; 35 + next-level-cache = <&l2>; 36 + reg = <1>; 37 + }; 38 + }; 39 + 40 + clocks { 41 + smclk: sysmgr-clock { 42 + compatible = "fixed-clock"; 43 + #clock-cells = <0>; 44 + clock-frequency = <25000000>; 45 + }; 46 + 47 + cfgclk: cfg-clock { 48 + compatible = "fixed-clock"; 49 + #clock-cells = <0>; 50 + clock-frequency = <100000000>; 51 + }; 52 + 53 + sysclk: system-clock { 54 + compatible = "fixed-clock"; 55 + #clock-cells = <0>; 56 + clock-frequency = <400000000>; 57 + }; 58 + }; 59 + 60 + soc { 61 + compatible = "simple-bus"; 62 + #address-cells = <1>; 63 + #size-cells = <1>; 64 + interrupt-parent = <&gic>; 65 + 66 + ranges = <0 0xf7000000 0x1000000>; 67 + 68 + l2: l2-cache-controller@ac0000 { 69 + compatible = "marvell,tauros3-cache", "arm,pl310-cache"; 70 + reg = <0xac0000 0x1000>; 71 + cache-unified; 72 + cache-level = <2>; 73 + }; 74 + 75 + gic: interrupt-controller@ad1000 { 76 + compatible = "arm,cortex-a9-gic"; 77 + reg = <0xad1000 0x1000>, <0xad0100 0x0100>; 78 + interrupt-controller; 79 + #interrupt-cells = <3>; 80 + }; 81 + 82 + local-timer@ad0600 { 83 + compatible = "arm,cortex-a9-twd-timer"; 84 + reg = <0xad0600 0x20>; 85 + interrupts = <GIC_PPI 13 IRQ_TYPE_LEVEL_HIGH>; 86 + clocks = <&sysclk>; 87 + }; 88 + 89 + apb@e80000 { 90 + compatible = "simple-bus"; 91 + #address-cells = <1>; 92 + #size-cells = <1>; 93 + 94 + ranges = <0 0xe80000 0x10000>; 95 + interrupt-parent = <&aic>; 96 + 97 + timer0: timer@2c00 { 98 + compatible = "snps,dw-apb-timer"; 99 + reg = <0x2c00 0x14>; 100 + interrupts = <8>; 101 + clocks = <&cfgclk>; 102 + clock-names = "timer"; 103 + status = "okay"; 104 + }; 105 + 106 + timer1: timer@2c14 { 107 + compatible = "snps,dw-apb-timer"; 108 + reg = <0x2c14 0x14>; 109 + interrupts = <9>; 110 + clocks = <&cfgclk>; 111 + clock-names = "timer"; 112 + status = "okay"; 113 + }; 114 + 115 + timer2: timer@2c28 { 116 + compatible = "snps,dw-apb-timer"; 117 + reg = <0x2c28 0x14>; 118 + interrupts = <10>; 119 + clocks = <&cfgclk>; 120 + clock-names = "timer"; 121 + status = "disabled"; 122 + }; 123 + 124 + timer3: timer@2c3c { 125 + compatible = "snps,dw-apb-timer"; 126 + reg = <0x2c3c 0x14>; 127 + interrupts = <11>; 128 + clocks = <&cfgclk>; 129 + clock-names = "timer"; 130 + status = "disabled"; 131 + }; 132 + 133 + timer4: timer@2c50 { 134 + compatible = "snps,dw-apb-timer"; 135 + reg = <0x2c50 0x14>; 136 + interrupts = <12>; 137 + clocks = <&cfgclk>; 138 + clock-names = "timer"; 139 + status = "disabled"; 140 + }; 141 + 142 + timer5: timer@2c64 { 143 + compatible = "snps,dw-apb-timer"; 144 + reg = <0x2c64 0x14>; 145 + interrupts = <13>; 146 + clocks = <&cfgclk>; 147 + clock-names = "timer"; 148 + status = "disabled"; 149 + }; 150 + 151 + timer6: timer@2c78 { 152 + compatible = "snps,dw-apb-timer"; 153 + reg = <0x2c78 0x14>; 154 + interrupts = <14>; 155 + clocks = <&cfgclk>; 156 + clock-names = "timer"; 157 + status = "disabled"; 158 + }; 159 + 160 + timer7: timer@2c8c { 161 + compatible = "snps,dw-apb-timer"; 162 + reg = <0x2c8c 0x14>; 163 + interrupts = <15>; 164 + clocks = <&cfgclk>; 165 + clock-names = "timer"; 166 + status = "disabled"; 167 + }; 168 + 169 + aic: interrupt-controller@3000 { 170 + compatible = "snps,dw-apb-ictl"; 171 + reg = <0x3000 0xc00>; 172 + interrupt-controller; 173 + #interrupt-cells = <1>; 174 + interrupt-parent = <&gic>; 175 + interrupts = <GIC_SPI 3 IRQ_TYPE_LEVEL_HIGH>; 176 + }; 177 + }; 178 + 179 + apb@fc0000 { 180 + compatible = "simple-bus"; 181 + #address-cells = <1>; 182 + #size-cells = <1>; 183 + 184 + ranges = <0 0xfc0000 0x10000>; 185 + interrupt-parent = <&sic>; 186 + 187 + uart0: serial@9000 { 188 + compatible = "snps,dw-apb-uart"; 189 + reg = <0x9000 0x100>; 190 + reg-shift = <2>; 191 + reg-io-width = <1>; 192 + interrupts = <8>; 193 + clocks = <&smclk>; 194 + status = "disabled"; 195 + }; 196 + 197 + uart1: serial@a000 { 198 + compatible = "snps,dw-apb-uart"; 199 + reg = <0xa000 0x100>; 200 + reg-shift = <2>; 201 + reg-io-width = <1>; 202 + interrupts = <9>; 203 + clocks = <&smclk>; 204 + status = "disabled"; 205 + }; 206 + 207 + uart2: serial@b000 { 208 + compatible = "snps,dw-apb-uart"; 209 + reg = <0xb000 0x100>; 210 + reg-shift = <2>; 211 + reg-io-width = <1>; 212 + interrupts = <10>; 213 + clocks = <&smclk>; 214 + status = "disabled"; 215 + }; 216 + 217 + sic: interrupt-controller@e000 { 218 + compatible = "snps,dw-apb-ictl"; 219 + reg = <0xe000 0x400>; 220 + interrupt-controller; 221 + #interrupt-cells = <1>; 222 + interrupt-parent = <&gic>; 223 + interrupts = <GIC_SPI 15 IRQ_TYPE_LEVEL_HIGH>; 224 + }; 225 + }; 226 + }; 227 + };
+29
arch/arm/boot/dts/berlin2cd-google-chromecast.dts
··· 1 + /* 2 + * Device Tree file for Google Chromecast 3 + * 4 + * Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> 5 + * 6 + * This file is licensed under the terms of the GNU General Public 7 + * License version 2. This program is licensed "as is" without any 8 + * warranty of any kind, whether express or implied. 9 + */ 10 + 11 + /dts-v1/; 12 + 13 + #include "berlin2cd.dtsi" 14 + 15 + / { 16 + model = "Google Chromecast"; 17 + compatible = "google,chromecast", "marvell,berlin2cd", "marvell,berlin"; 18 + 19 + chosen { 20 + bootargs = "console=ttyS0,115200 earlyprintk"; 21 + }; 22 + 23 + memory { 24 + device_type = "memory"; 25 + reg = <0x00000000 0x20000000>; /* 512 MB */ 26 + }; 27 + }; 28 + 29 + &uart0 { status = "okay"; };
+210
arch/arm/boot/dts/berlin2cd.dtsi
··· 1 + /* 2 + * Device Tree Include file for Marvell Armada 1500-mini (Berlin BG2CD) SoC 3 + * 4 + * Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> 5 + * 6 + * based on GPL'ed 2.6 kernel sources 7 + * (c) Marvell International Ltd. 8 + * 9 + * This file is licensed under the terms of the GNU General Public 10 + * License version 2. This program is licensed "as is" without any 11 + * warranty of any kind, whether express or implied. 12 + */ 13 + 14 + #include "skeleton.dtsi" 15 + #include <dt-bindings/interrupt-controller/arm-gic.h> 16 + 17 + / { 18 + model = "Marvell Armada 1500-mini (BG2CD) SoC"; 19 + compatible = "marvell,berlin2cd", "marvell,berlin"; 20 + 21 + cpus { 22 + #address-cells = <1>; 23 + #size-cells = <0>; 24 + 25 + cpu@0 { 26 + compatible = "arm,cortex-a9"; 27 + device_type = "cpu"; 28 + next-level-cache = <&l2>; 29 + reg = <0>; 30 + }; 31 + }; 32 + 33 + clocks { 34 + smclk: sysmgr-clock { 35 + compatible = "fixed-clock"; 36 + #clock-cells = <0>; 37 + clock-frequency = <25000000>; 38 + }; 39 + 40 + cfgclk: cfg-clock { 41 + compatible = "fixed-clock"; 42 + #clock-cells = <0>; 43 + clock-frequency = <75000000>; 44 + }; 45 + 46 + sysclk: system-clock { 47 + compatible = "fixed-clock"; 48 + #clock-cells = <0>; 49 + clock-frequency = <300000000>; 50 + }; 51 + }; 52 + 53 + soc { 54 + compatible = "simple-bus"; 55 + #address-cells = <1>; 56 + #size-cells = <1>; 57 + interrupt-parent = <&gic>; 58 + 59 + ranges = <0 0xf7000000 0x1000000>; 60 + 61 + l2: l2-cache-controller@ac0000 { 62 + compatible = "arm,pl310-cache"; 63 + reg = <0xac0000 0x1000>; 64 + cache-unified; 65 + cache-level = <2>; 66 + }; 67 + 68 + gic: interrupt-controller@ad1000 { 69 + compatible = "arm,cortex-a9-gic"; 70 + reg = <0xad1000 0x1000>, <0xad0100 0x0100>; 71 + interrupt-controller; 72 + #interrupt-cells = <3>; 73 + }; 74 + 75 + local-timer@ad0600 { 76 + compatible = "arm,cortex-a9-twd-timer"; 77 + reg = <0xad0600 0x20>; 78 + interrupts = <GIC_PPI 13 IRQ_TYPE_LEVEL_HIGH>; 79 + clocks = <&sysclk>; 80 + }; 81 + 82 + apb@e80000 { 83 + compatible = "simple-bus"; 84 + #address-cells = <1>; 85 + #size-cells = <1>; 86 + 87 + ranges = <0 0xe80000 0x10000>; 88 + interrupt-parent = <&aic>; 89 + 90 + timer0: timer@2c00 { 91 + compatible = "snps,dw-apb-timer"; 92 + reg = <0x2c00 0x14>; 93 + interrupts = <8>; 94 + clocks = <&cfgclk>; 95 + clock-names = "timer"; 96 + status = "okay"; 97 + }; 98 + 99 + timer1: timer@2c14 { 100 + compatible = "snps,dw-apb-timer"; 101 + reg = <0x2c14 0x14>; 102 + interrupts = <9>; 103 + clocks = <&cfgclk>; 104 + clock-names = "timer"; 105 + status = "okay"; 106 + }; 107 + 108 + timer2: timer@2c28 { 109 + compatible = "snps,dw-apb-timer"; 110 + reg = <0x2c28 0x14>; 111 + interrupts = <10>; 112 + clocks = <&cfgclk>; 113 + clock-names = "timer"; 114 + status = "disabled"; 115 + }; 116 + 117 + timer3: timer@2c3c { 118 + compatible = "snps,dw-apb-timer"; 119 + reg = <0x2c3c 0x14>; 120 + interrupts = <11>; 121 + clocks = <&cfgclk>; 122 + clock-names = "timer"; 123 + status = "disabled"; 124 + }; 125 + 126 + timer4: timer@2c50 { 127 + compatible = "snps,dw-apb-timer"; 128 + reg = <0x2c50 0x14>; 129 + interrupts = <12>; 130 + clocks = <&cfgclk>; 131 + clock-names = "timer"; 132 + status = "disabled"; 133 + }; 134 + 135 + timer5: timer@2c64 { 136 + compatible = "snps,dw-apb-timer"; 137 + reg = <0x2c64 0x14>; 138 + interrupts = <13>; 139 + clocks = <&cfgclk>; 140 + clock-names = "timer"; 141 + status = "disabled"; 142 + }; 143 + 144 + timer6: timer@2c78 { 145 + compatible = "snps,dw-apb-timer"; 146 + reg = <0x2c78 0x14>; 147 + interrupts = <14>; 148 + clocks = <&cfgclk>; 149 + clock-names = "timer"; 150 + status = "disabled"; 151 + }; 152 + 153 + timer7: timer@2c8c { 154 + compatible = "snps,dw-apb-timer"; 155 + reg = <0x2c8c 0x14>; 156 + interrupts = <15>; 157 + clocks = <&cfgclk>; 158 + clock-names = "timer"; 159 + status = "disabled"; 160 + }; 161 + 162 + aic: interrupt-controller@3000 { 163 + compatible = "snps,dw-apb-ictl"; 164 + reg = <0x3000 0xc00>; 165 + interrupt-controller; 166 + #interrupt-cells = <1>; 167 + interrupt-parent = <&gic>; 168 + interrupts = <GIC_SPI 3 IRQ_TYPE_LEVEL_HIGH>; 169 + }; 170 + }; 171 + 172 + apb@fc0000 { 173 + compatible = "simple-bus"; 174 + #address-cells = <1>; 175 + #size-cells = <1>; 176 + 177 + ranges = <0 0xfc0000 0x10000>; 178 + interrupt-parent = <&sic>; 179 + 180 + uart0: serial@9000 { 181 + compatible = "snps,dw-apb-uart"; 182 + reg = <0x9000 0x100>; 183 + reg-shift = <2>; 184 + reg-io-width = <1>; 185 + interrupts = <8>; 186 + clocks = <&smclk>; 187 + status = "disabled"; 188 + }; 189 + 190 + uart1: serial@a000 { 191 + compatible = "snps,dw-apb-uart"; 192 + reg = <0xa000 0x100>; 193 + reg-shift = <2>; 194 + reg-io-width = <1>; 195 + interrupts = <9>; 196 + clocks = <&smclk>; 197 + status = "disabled"; 198 + }; 199 + 200 + sic: interrupt-controller@e000 { 201 + compatible = "snps,dw-apb-ictl"; 202 + reg = <0xe000 0x400>; 203 + interrupt-controller; 204 + #interrupt-cells = <1>; 205 + interrupt-parent = <&gic>; 206 + interrupts = <GIC_SPI 15 IRQ_TYPE_LEVEL_HIGH>; 207 + }; 208 + }; 209 + }; 210 + };
+86
arch/arm/boot/dts/efm32gg-dk3750.dts
··· 1 + /* 2 + * Device tree for EFM32GG-DK3750 development board. 3 + * 4 + * Documentation available from 5 + * http://www.silabs.com/Support%20Documents/TechnicalDocs/efm32gg-dk3750-ug.pdf 6 + */ 7 + 8 + /dts-v1/; 9 + #include "efm32gg.dtsi" 10 + 11 + / { 12 + model = "Energy Micro Giant Gecko Development Kit"; 13 + compatible = "efm32,dk3750"; 14 + 15 + chosen { 16 + bootargs = "console=ttyefm4,115200 init=/linuxrc ignore_loglevel ihash_entries=64 dhash_entries=64 earlyprintk uclinux.physaddr=0x8c400000 root=/dev/mtdblock0"; 17 + }; 18 + 19 + memory { 20 + reg = <0x88000000 0x400000>; 21 + }; 22 + 23 + soc { 24 + adc@40002000 { 25 + status = "ok"; 26 + }; 27 + 28 + i2c@4000a000 { 29 + location = <3>; 30 + status = "ok"; 31 + 32 + temp@48 { 33 + compatible = "st,stds75"; 34 + reg = <0x48>; 35 + }; 36 + 37 + eeprom@50 { 38 + compatible = "microchip,24c02"; 39 + reg = <0x50>; 40 + pagesize = <16>; 41 + }; 42 + }; 43 + 44 + spi0: spi@4000c000 { /* USART0 */ 45 + cs-gpios = <&gpio 68 1>; // E4 46 + location = <1>; 47 + status = "ok"; 48 + 49 + microsd@0 { 50 + compatible = "mmc-spi-slot"; 51 + spi-max-frequency = <100000>; 52 + voltage-ranges = <3200 3400>; 53 + broken-cd; 54 + reg = <0>; 55 + }; 56 + }; 57 + 58 + spi1: spi@4000c400 { /* USART1 */ 59 + cs-gpios = <&gpio 51 1>; // D3 60 + location = <1>; 61 + status = "ok"; 62 + 63 + ks8851@0 { 64 + compatible = "ks8851"; 65 + spi-max-frequency = <6000000>; 66 + reg = <0>; 67 + interrupt-parent = <&boardfpga>; 68 + interrupts = <4>; 69 + }; 70 + }; 71 + 72 + uart4: uart@4000e400 { /* UART1 */ 73 + location = <2>; 74 + status = "ok"; 75 + }; 76 + 77 + boardfpga: boardfpga { 78 + compatible = "efm32board"; 79 + reg = <0x80000000 0x400>; 80 + irq-gpios = <&gpio 64 1>; 81 + interrupt-controller; 82 + #interrupt-cells = <1>; 83 + status = "ok"; 84 + }; 85 + }; 86 + };
+172
arch/arm/boot/dts/efm32gg.dtsi
··· 1 + /* 2 + * Device tree for Energy Micro EFM32 Giant Gecko SoC. 3 + * 4 + * Documentation available from 5 + * http://www.silabs.com/Support%20Documents/TechnicalDocs/EFM32GG-RM.pdf 6 + */ 7 + #include "armv7-m.dtsi" 8 + #include "dt-bindings/clock/efm32-cmu.h" 9 + 10 + / { 11 + aliases { 12 + i2c0 = &i2c0; 13 + i2c1 = &i2c1; 14 + serial0 = &uart0; 15 + serial1 = &uart1; 16 + serial2 = &uart2; 17 + serial3 = &uart3; 18 + serial4 = &uart4; 19 + spi0 = &spi0; 20 + spi1 = &spi1; 21 + spi2 = &spi2; 22 + }; 23 + 24 + soc { 25 + adc: adc@40002000 { 26 + compatible = "efm32,adc"; 27 + reg = <0x40002000 0x400>; 28 + interrupts = <7>; 29 + clocks = <&cmu clk_HFPERCLKADC0>; 30 + status = "disabled"; 31 + }; 32 + 33 + gpio: gpio@40006000 { 34 + compatible = "efm32,gpio"; 35 + reg = <0x40006000 0x1000>; 36 + interrupts = <1 11>; 37 + gpio-controller; 38 + #gpio-cells = <2>; 39 + interrupt-controller; 40 + #interrupt-cells = <1>; 41 + clocks = <&cmu clk_HFPERCLKGPIO>; 42 + status = "ok"; 43 + }; 44 + 45 + i2c0: i2c@4000a000 { 46 + #address-cells = <1>; 47 + #size-cells = <0>; 48 + compatible = "efm32,i2c"; 49 + reg = <0x4000a000 0x400>; 50 + interrupts = <9>; 51 + clocks = <&cmu clk_HFPERCLKI2C0>; 52 + clock-frequency = <100000>; 53 + status = "disabled"; 54 + }; 55 + 56 + i2c1: i2c@4000a400 { 57 + #address-cells = <1>; 58 + #size-cells = <0>; 59 + compatible = "efm32,i2c"; 60 + reg = <0x4000a400 0x400>; 61 + interrupts = <10>; 62 + clocks = <&cmu clk_HFPERCLKI2C1>; 63 + clock-frequency = <100000>; 64 + status = "disabled"; 65 + }; 66 + 67 + spi0: spi@4000c000 { /* USART0 */ 68 + #address-cells = <1>; 69 + #size-cells = <0>; 70 + compatible = "efm32,spi"; 71 + reg = <0x4000c000 0x400>; 72 + interrupts = <3 4>; 73 + clocks = <&cmu clk_HFPERCLKUSART0>; 74 + status = "disabled"; 75 + }; 76 + 77 + spi1: spi@4000c400 { /* USART1 */ 78 + #address-cells = <1>; 79 + #size-cells = <0>; 80 + compatible = "efm32,spi"; 81 + reg = <0x4000c400 0x400>; 82 + interrupts = <15 16>; 83 + clocks = <&cmu clk_HFPERCLKUSART1>; 84 + status = "disabled"; 85 + }; 86 + 87 + spi2: spi@40x4000c800 { /* USART2 */ 88 + #address-cells = <1>; 89 + #size-cells = <0>; 90 + compatible = "efm32,spi"; 91 + reg = <0x4000c800 0x400>; 92 + interrupts = <18 19>; 93 + clocks = <&cmu clk_HFPERCLKUSART2>; 94 + status = "disabled"; 95 + }; 96 + 97 + uart0: uart@4000c000 { /* USART0 */ 98 + compatible = "efm32,uart"; 99 + reg = <0x4000c000 0x400>; 100 + interrupts = <3 4>; 101 + clocks = <&cmu clk_HFPERCLKUSART0>; 102 + status = "disabled"; 103 + }; 104 + 105 + uart1: uart@4000c400 { /* USART1 */ 106 + compatible = "efm32,uart"; 107 + reg = <0x4000c400 0x400>; 108 + interrupts = <15 16>; 109 + clocks = <&cmu clk_HFPERCLKUSART1>; 110 + status = "disabled"; 111 + }; 112 + 113 + uart2: uart@40x4000c800 { /* USART2 */ 114 + compatible = "efm32,uart"; 115 + reg = <0x4000c800 0x400>; 116 + interrupts = <18 19>; 117 + clocks = <&cmu clk_HFPERCLKUSART2>; 118 + status = "disabled"; 119 + }; 120 + 121 + uart3: uart@4000e000 { /* UART0 */ 122 + compatible = "efm32,uart"; 123 + reg = <0x4000e000 0x400>; 124 + interrupts = <20 21>; 125 + clocks = <&cmu clk_HFPERCLKUART0>; 126 + status = "disabled"; 127 + }; 128 + 129 + uart4: uart@4000e400 { /* UART1 */ 130 + compatible = "efm32,uart"; 131 + reg = <0x4000e400 0x400>; 132 + interrupts = <22 23>; 133 + clocks = <&cmu clk_HFPERCLKUART1>; 134 + status = "disabled"; 135 + }; 136 + 137 + timer0: timer@40010000 { 138 + compatible = "efm32,timer"; 139 + reg = <0x40010000 0x400>; 140 + interrupts = <2>; 141 + clocks = <&cmu clk_HFPERCLKTIMER0>; 142 + }; 143 + 144 + timer1: timer@40010400 { 145 + compatible = "efm32,timer"; 146 + reg = <0x40010400 0x400>; 147 + interrupts = <12>; 148 + clocks = <&cmu clk_HFPERCLKTIMER1>; 149 + }; 150 + 151 + timer2: timer@40010800 { 152 + compatible = "efm32,timer"; 153 + reg = <0x40010800 0x400>; 154 + interrupts = <13>; 155 + clocks = <&cmu clk_HFPERCLKTIMER2>; 156 + }; 157 + 158 + timer3: timer@40010c00 { 159 + compatible = "efm32,timer"; 160 + reg = <0x40010c00 0x400>; 161 + interrupts = <14>; 162 + clocks = <&cmu clk_HFPERCLKTIMER3>; 163 + }; 164 + 165 + cmu: cmu@400c8000 { 166 + compatible = "efm32gg,cmu"; 167 + reg = <0x400c8000 0x400>; 168 + interrupts = <32>; 169 + #clock-cells = <1>; 170 + }; 171 + }; 172 + };
+649
arch/arm/boot/dts/hi3620-hi4511.dts
··· 1 + /* 2 + * Copyright (C) 2012-2013 Linaro Ltd. 3 + * Author: Haojian Zhuang <haojian.zhuang@linaro.org> 4 + * 5 + * This program is free software; you can redistribute it and/or modify 6 + * it under the terms of the GNU General Public License version 2 as 7 + * publishhed by the Free Software Foundation. 8 + */ 9 + 10 + /dts-v1/; 11 + 12 + #include "hi3620.dtsi" 13 + 14 + / { 15 + model = "Hisilicon Hi4511 Development Board"; 16 + compatible = "hisilicon,hi3620-hi4511"; 17 + 18 + chosen { 19 + bootargs = "console=ttyAMA0,115200 root=/dev/ram0 earlyprintk"; 20 + }; 21 + 22 + memory { 23 + device_type = "memory"; 24 + reg = <0x40000000 0x20000000>; 25 + }; 26 + 27 + amba { 28 + dual_timer0: dual_timer@800000 { 29 + status = "ok"; 30 + }; 31 + 32 + uart0: uart@b00000 { /* console */ 33 + pinctrl-names = "default", "idle"; 34 + pinctrl-0 = <&uart0_pmx_func &uart0_cfg_func>; 35 + pinctrl-1 = <&uart0_pmx_idle &uart0_cfg_idle>; 36 + status = "ok"; 37 + }; 38 + 39 + uart1: uart@b01000 { /* modem */ 40 + pinctrl-names = "default", "idle"; 41 + pinctrl-0 = <&uart1_pmx_func &uart1_cfg_func>; 42 + pinctrl-1 = <&uart1_pmx_idle &uart1_cfg_idle>; 43 + status = "ok"; 44 + }; 45 + 46 + uart2: uart@b02000 { /* audience */ 47 + pinctrl-names = "default", "idle"; 48 + pinctrl-0 = <&uart2_pmx_func &uart2_cfg_func>; 49 + pinctrl-1 = <&uart2_pmx_idle &uart2_cfg_idle>; 50 + status = "ok"; 51 + }; 52 + 53 + uart3: uart@b03000 { 54 + pinctrl-names = "default", "idle"; 55 + pinctrl-0 = <&uart3_pmx_func &uart3_cfg_func>; 56 + pinctrl-1 = <&uart3_pmx_idle &uart3_cfg_idle>; 57 + status = "ok"; 58 + }; 59 + 60 + uart4: uart@b04000 { 61 + pinctrl-names = "default", "idle"; 62 + pinctrl-0 = <&uart4_pmx_func &uart4_cfg_func>; 63 + pinctrl-1 = <&uart4_pmx_idle &uart4_cfg_func>; 64 + status = "ok"; 65 + }; 66 + 67 + pmx0: pinmux@803000 { 68 + pinctrl-names = "default"; 69 + pinctrl-0 = <&board_pmx_pins>; 70 + 71 + board_pmx_pins: board_pmx_pins { 72 + pinctrl-single,pins = < 73 + 0x008 0x0 /* GPIO -- eFUSE_DOUT */ 74 + 0x100 0x0 /* USIM_CLK & USIM_DATA (IOMG63) */ 75 + >; 76 + }; 77 + uart0_pmx_func: uart0_pmx_func { 78 + pinctrl-single,pins = < 79 + 0x0f0 0x0 80 + 0x0f4 0x0 /* UART0_RX & UART0_TX */ 81 + >; 82 + }; 83 + uart0_pmx_idle: uart0_pmx_idle { 84 + pinctrl-single,pins = < 85 + /*0x0f0 0x1*/ /* UART0_CTS & UART0_RTS */ 86 + 0x0f4 0x1 /* UART0_RX & UART0_TX */ 87 + >; 88 + }; 89 + uart1_pmx_func: uart1_pmx_func { 90 + pinctrl-single,pins = < 91 + 0x0f8 0x0 /* UART1_CTS & UART1_RTS (IOMG61) */ 92 + 0x0fc 0x0 /* UART1_RX & UART1_TX (IOMG62) */ 93 + >; 94 + }; 95 + uart1_pmx_idle: uart1_pmx_idle { 96 + pinctrl-single,pins = < 97 + 0x0f8 0x1 /* GPIO (IOMG61) */ 98 + 0x0fc 0x1 /* GPIO (IOMG62) */ 99 + >; 100 + }; 101 + uart2_pmx_func: uart2_pmx_func { 102 + pinctrl-single,pins = < 103 + 0x104 0x2 /* UART2_RXD (IOMG96) */ 104 + 0x108 0x2 /* UART2_TXD (IOMG64) */ 105 + >; 106 + }; 107 + uart2_pmx_idle: uart2_pmx_idle { 108 + pinctrl-single,pins = < 109 + 0x104 0x1 /* GPIO (IOMG96) */ 110 + 0x108 0x1 /* GPIO (IOMG64) */ 111 + >; 112 + }; 113 + uart3_pmx_func: uart3_pmx_func { 114 + pinctrl-single,pins = < 115 + 0x160 0x2 /* UART3_CTS & UART3_RTS (IOMG85) */ 116 + 0x164 0x2 /* UART3_RXD & UART3_TXD (IOMG86) */ 117 + >; 118 + }; 119 + uart3_pmx_idle: uart3_pmx_idle { 120 + pinctrl-single,pins = < 121 + 0x160 0x1 /* GPIO (IOMG85) */ 122 + 0x164 0x1 /* GPIO (IOMG86) */ 123 + >; 124 + }; 125 + uart4_pmx_func: uart4_pmx_func { 126 + pinctrl-single,pins = < 127 + 0x168 0x0 /* UART4_CTS & UART4_RTS (IOMG87) */ 128 + 0x16c 0x0 /* UART4_RXD (IOMG88) */ 129 + 0x170 0x0 /* UART4_TXD (IOMG93) */ 130 + >; 131 + }; 132 + uart4_pmx_idle: uart4_pmx_idle { 133 + pinctrl-single,pins = < 134 + 0x168 0x1 /* GPIO (IOMG87) */ 135 + 0x16c 0x1 /* GPIO (IOMG88) */ 136 + 0x170 0x1 /* GPIO (IOMG93) */ 137 + >; 138 + }; 139 + i2c0_pmx_func: i2c0_pmx_func { 140 + pinctrl-single,pins = < 141 + 0x0b4 0x0 /* I2C0_SCL & I2C0_SDA (IOMG45) */ 142 + >; 143 + }; 144 + i2c0_pmx_idle: i2c0_pmx_idle { 145 + pinctrl-single,pins = < 146 + 0x0b4 0x1 /* GPIO (IOMG45) */ 147 + >; 148 + }; 149 + i2c1_pmx_func: i2c1_pmx_func { 150 + pinctrl-single,pins = < 151 + 0x0b8 0x0 /* I2C1_SCL & I2C1_SDA (IOMG46) */ 152 + >; 153 + }; 154 + i2c1_pmx_idle: i2c1_pmx_idle { 155 + pinctrl-single,pins = < 156 + 0x0b8 0x1 /* GPIO (IOMG46) */ 157 + >; 158 + }; 159 + i2c2_pmx_func: i2c2_pmx_func { 160 + pinctrl-single,pins = < 161 + 0x068 0x0 /* I2C2_SCL (IOMG26) */ 162 + 0x06c 0x0 /* I2C2_SDA (IOMG27) */ 163 + >; 164 + }; 165 + i2c2_pmx_idle: i2c2_pmx_idle { 166 + pinctrl-single,pins = < 167 + 0x068 0x1 /* GPIO (IOMG26) */ 168 + 0x06c 0x1 /* GPIO (IOMG27) */ 169 + >; 170 + }; 171 + i2c3_pmx_func: i2c3_pmx_func { 172 + pinctrl-single,pins = < 173 + 0x050 0x2 /* I2C3_SCL (IOMG20) */ 174 + 0x054 0x2 /* I2C3_SDA (IOMG21) */ 175 + >; 176 + }; 177 + i2c3_pmx_idle: i2c3_pmx_idle { 178 + pinctrl-single,pins = < 179 + 0x050 0x1 /* GPIO (IOMG20) */ 180 + 0x054 0x1 /* GPIO (IOMG21) */ 181 + >; 182 + }; 183 + spi0_pmx_func: spi0_pmx_func { 184 + pinctrl-single,pins = < 185 + 0x0d4 0x0 /* SPI0_CLK/SPI0_DI/SPI0_DO (IOMG53) */ 186 + 0x0d8 0x0 /* SPI0_CS0 (IOMG54) */ 187 + 0x0dc 0x0 /* SPI0_CS1 (IOMG55) */ 188 + 0x0e0 0x0 /* SPI0_CS2 (IOMG56) */ 189 + 0x0e4 0x0 /* SPI0_CS3 (IOMG57) */ 190 + >; 191 + }; 192 + spi0_pmx_idle: spi0_pmx_idle { 193 + pinctrl-single,pins = < 194 + 0x0d4 0x1 /* GPIO (IOMG53) */ 195 + 0x0d8 0x1 /* GPIO (IOMG54) */ 196 + 0x0dc 0x1 /* GPIO (IOMG55) */ 197 + 0x0e0 0x1 /* GPIO (IOMG56) */ 198 + 0x0e4 0x1 /* GPIO (IOMG57) */ 199 + >; 200 + }; 201 + spi1_pmx_func: spi1_pmx_func { 202 + pinctrl-single,pins = < 203 + 0x184 0x0 /* SPI1_CLK/SPI1_DI (IOMG98) */ 204 + 0x0e8 0x0 /* SPI1_DO (IOMG58) */ 205 + 0x0ec 0x0 /* SPI1_CS (IOMG95) */ 206 + >; 207 + }; 208 + spi1_pmx_idle: spi1_pmx_idle { 209 + pinctrl-single,pins = < 210 + 0x184 0x1 /* GPIO (IOMG98) */ 211 + 0x0e8 0x1 /* GPIO (IOMG58) */ 212 + 0x0ec 0x1 /* GPIO (IOMG95) */ 213 + >; 214 + }; 215 + kpc_pmx_func: kpc_pmx_func { 216 + pinctrl-single,pins = < 217 + 0x12c 0x0 /* KEY_IN0 (IOMG73) */ 218 + 0x130 0x0 /* KEY_IN1 (IOMG74) */ 219 + 0x134 0x0 /* KEY_IN2 (IOMG75) */ 220 + 0x10c 0x0 /* KEY_OUT0 (IOMG65) */ 221 + 0x110 0x0 /* KEY_OUT1 (IOMG66) */ 222 + 0x114 0x0 /* KEY_OUT2 (IOMG67) */ 223 + >; 224 + }; 225 + kpc_pmx_idle: kpc_pmx_idle { 226 + pinctrl-single,pins = < 227 + 0x12c 0x1 /* GPIO (IOMG73) */ 228 + 0x130 0x1 /* GPIO (IOMG74) */ 229 + 0x134 0x1 /* GPIO (IOMG75) */ 230 + 0x10c 0x1 /* GPIO (IOMG65) */ 231 + 0x110 0x1 /* GPIO (IOMG66) */ 232 + 0x114 0x1 /* GPIO (IOMG67) */ 233 + >; 234 + }; 235 + gpio_key_func: gpio_key_func { 236 + pinctrl-single,pins = < 237 + 0x10c 0x1 /* KEY_OUT0/GPIO (IOMG65) */ 238 + 0x130 0x1 /* KEY_IN1/GPIO (IOMG74) */ 239 + >; 240 + }; 241 + emmc_pmx_func: emmc_pmx_func { 242 + pinctrl-single,pins = < 243 + 0x030 0x2 /* eMMC_CMD/eMMC_CLK (IOMG12) */ 244 + 0x018 0x0 /* NAND_CS3_N (IOMG6) */ 245 + 0x024 0x0 /* NAND_BUSY2_N (IOMG8) */ 246 + 0x028 0x0 /* NAND_BUSY3_N (IOMG9) */ 247 + 0x02c 0x2 /* eMMC_DATA[0:7] (IOMG10) */ 248 + >; 249 + }; 250 + emmc_pmx_idle: emmc_pmx_idle { 251 + pinctrl-single,pins = < 252 + 0x030 0x0 /* GPIO (IOMG12) */ 253 + 0x018 0x1 /* GPIO (IOMG6) */ 254 + 0x024 0x1 /* GPIO (IOMG8) */ 255 + 0x028 0x1 /* GPIO (IOMG9) */ 256 + 0x02c 0x1 /* GPIO (IOMG10) */ 257 + >; 258 + }; 259 + sd_pmx_func: sd_pmx_func { 260 + pinctrl-single,pins = < 261 + 0x0bc 0x0 /* SD_CLK/SD_CMD/SD_DATA0/SD_DATA1/SD_DATA2 (IOMG47) */ 262 + 0x0c0 0x0 /* SD_DATA3 (IOMG48) */ 263 + >; 264 + }; 265 + sd_pmx_idle: sd_pmx_idle { 266 + pinctrl-single,pins = < 267 + 0x0bc 0x1 /* GPIO (IOMG47) */ 268 + 0x0c0 0x1 /* GPIO (IOMG48) */ 269 + >; 270 + }; 271 + nand_pmx_func: nand_pmx_func { 272 + pinctrl-single,pins = < 273 + 0x00c 0x0 /* NAND_ALE/NAND_CLE/.../NAND_DATA[0:7] (IOMG3) */ 274 + 0x010 0x0 /* NAND_CS1_N (IOMG4) */ 275 + 0x014 0x0 /* NAND_CS2_N (IOMG5) */ 276 + 0x018 0x0 /* NAND_CS3_N (IOMG6) */ 277 + 0x01c 0x0 /* NAND_BUSY0_N (IOMG94) */ 278 + 0x020 0x0 /* NAND_BUSY1_N (IOMG7) */ 279 + 0x024 0x0 /* NAND_BUSY2_N (IOMG8) */ 280 + 0x028 0x0 /* NAND_BUSY3_N (IOMG9) */ 281 + 0x02c 0x0 /* NAND_DATA[8:15] (IOMG10) */ 282 + >; 283 + }; 284 + nand_pmx_idle: nand_pmx_idle { 285 + pinctrl-single,pins = < 286 + 0x00c 0x1 /* GPIO (IOMG3) */ 287 + 0x010 0x1 /* GPIO (IOMG4) */ 288 + 0x014 0x1 /* GPIO (IOMG5) */ 289 + 0x018 0x1 /* GPIO (IOMG6) */ 290 + 0x01c 0x1 /* GPIO (IOMG94) */ 291 + 0x020 0x1 /* GPIO (IOMG7) */ 292 + 0x024 0x1 /* GPIO (IOMG8) */ 293 + 0x028 0x1 /* GPIO (IOMG9) */ 294 + 0x02c 0x1 /* GPIO (IOMG10) */ 295 + >; 296 + }; 297 + sdio_pmx_func: sdio_pmx_func { 298 + pinctrl-single,pins = < 299 + 0x0c4 0x0 /* SDIO_CLK/SDIO_CMD/SDIO_DATA[0:3] (IOMG49) */ 300 + >; 301 + }; 302 + sdio_pmx_idle: sdio_pmx_idle { 303 + pinctrl-single,pins = < 304 + 0x0c4 0x1 /* GPIO (IOMG49) */ 305 + >; 306 + }; 307 + audio_out_pmx_func: audio_out_pmx_func { 308 + pinctrl-single,pins = < 309 + 0x0f0 0x1 /* GPIO (IOMG59), audio spk & earphone */ 310 + >; 311 + }; 312 + }; 313 + 314 + pmx1: pinmux@803800 { 315 + pinctrl-names = "default"; 316 + pinctrl-0 = < &board_pu_pins &board_pd_pins &board_pd_ps_pins 317 + &board_np_pins &board_ps_pins &kpc_cfg_func 318 + &audio_out_cfg_func>; 319 + board_pu_pins: board_pu_pins { 320 + pinctrl-single,pins = < 321 + 0x014 0 /* GPIO_158 (IOCFG2) */ 322 + 0x018 0 /* GPIO_159 (IOCFG3) */ 323 + 0x01c 0 /* BOOT_MODE0 (IOCFG4) */ 324 + 0x020 0 /* BOOT_MODE1 (IOCFG5) */ 325 + >; 326 + pinctrl-single,bias-pulldown = <0 2 0 2>; 327 + pinctrl-single,bias-pullup = <1 1 0 1>; 328 + }; 329 + board_pd_pins: board_pd_pins { 330 + pinctrl-single,pins = < 331 + 0x038 0 /* eFUSE_DOUT (IOCFG11) */ 332 + 0x150 0 /* ISP_GPIO8 (IOCFG93) */ 333 + 0x154 0 /* ISP_GPIO9 (IOCFG94) */ 334 + >; 335 + pinctrl-single,bias-pulldown = <2 2 0 2>; 336 + pinctrl-single,bias-pullup = <0 1 0 1>; 337 + }; 338 + board_pd_ps_pins: board_pd_ps_pins { 339 + pinctrl-single,pins = < 340 + 0x2d8 0 /* CLK_OUT0 (IOCFG190) */ 341 + 0x004 0 /* PMU_SPI_DATA (IOCFG192) */ 342 + >; 343 + pinctrl-single,bias-pulldown = <2 2 0 2>; 344 + pinctrl-single,bias-pullup = <0 1 0 1>; 345 + pinctrl-single,drive-strength = <0x30 0xf0>; 346 + }; 347 + board_np_pins: board_np_pins { 348 + pinctrl-single,pins = < 349 + 0x24c 0 /* KEYPAD_OUT7 (IOCFG155) */ 350 + >; 351 + pinctrl-single,bias-pulldown = <0 2 0 2>; 352 + pinctrl-single,bias-pullup = <0 1 0 1>; 353 + }; 354 + board_ps_pins: board_ps_pins { 355 + pinctrl-single,pins = < 356 + 0x000 0 /* PMU_SPI_CLK (IOCFG191) */ 357 + 0x008 0 /* PMU_SPI_CS_N (IOCFG193) */ 358 + >; 359 + pinctrl-single,drive-strength = <0x30 0xf0>; 360 + }; 361 + uart0_cfg_func: uart0_cfg_func { 362 + pinctrl-single,pins = < 363 + 0x208 0 /* UART0_RXD (IOCFG138) */ 364 + 0x20c 0 /* UART0_TXD (IOCFG139) */ 365 + >; 366 + pinctrl-single,bias-pulldown = <0 2 0 2>; 367 + pinctrl-single,bias-pullup = <0 1 0 1>; 368 + }; 369 + uart0_cfg_idle: uart0_cfg_idle { 370 + pinctrl-single,pins = < 371 + 0x208 0 /* UART0_RXD (IOCFG138) */ 372 + 0x20c 0 /* UART0_TXD (IOCFG139) */ 373 + >; 374 + pinctrl-single,bias-pulldown = <2 2 0 2>; 375 + pinctrl-single,bias-pullup = <0 1 0 1>; 376 + }; 377 + uart1_cfg_func: uart1_cfg_func { 378 + pinctrl-single,pins = < 379 + 0x210 0 /* UART1_CTS (IOCFG140) */ 380 + 0x214 0 /* UART1_RTS (IOCFG141) */ 381 + 0x218 0 /* UART1_RXD (IOCFG142) */ 382 + 0x21c 0 /* UART1_TXD (IOCFG143) */ 383 + >; 384 + pinctrl-single,bias-pulldown = <0 2 0 2>; 385 + pinctrl-single,bias-pullup = <0 1 0 1>; 386 + }; 387 + uart1_cfg_idle: uart1_cfg_idle { 388 + pinctrl-single,pins = < 389 + 0x210 0 /* UART1_CTS (IOCFG140) */ 390 + 0x214 0 /* UART1_RTS (IOCFG141) */ 391 + 0x218 0 /* UART1_RXD (IOCFG142) */ 392 + 0x21c 0 /* UART1_TXD (IOCFG143) */ 393 + >; 394 + pinctrl-single,bias-pulldown = <2 2 0 2>; 395 + pinctrl-single,bias-pullup = <0 1 0 1>; 396 + }; 397 + uart2_cfg_func: uart2_cfg_func { 398 + pinctrl-single,pins = < 399 + 0x220 0 /* UART2_CTS (IOCFG144) */ 400 + 0x224 0 /* UART2_RTS (IOCFG145) */ 401 + 0x228 0 /* UART2_RXD (IOCFG146) */ 402 + 0x22c 0 /* UART2_TXD (IOCFG147) */ 403 + >; 404 + pinctrl-single,bias-pulldown = <0 2 0 2>; 405 + pinctrl-single,bias-pullup = <0 1 0 1>; 406 + }; 407 + uart2_cfg_idle: uart2_cfg_idle { 408 + pinctrl-single,pins = < 409 + 0x220 0 /* GPIO (IOCFG144) */ 410 + 0x224 0 /* GPIO (IOCFG145) */ 411 + 0x228 0 /* GPIO (IOCFG146) */ 412 + 0x22c 0 /* GPIO (IOCFG147) */ 413 + >; 414 + pinctrl-single,bias-pulldown = <2 2 0 2>; 415 + pinctrl-single,bias-pullup = <0 1 0 1>; 416 + }; 417 + uart3_cfg_func: uart3_cfg_func { 418 + pinctrl-single,pins = < 419 + 0x294 0 /* UART3_CTS (IOCFG173) */ 420 + 0x298 0 /* UART3_RTS (IOCFG174) */ 421 + 0x29c 0 /* UART3_RXD (IOCFG175) */ 422 + 0x2a0 0 /* UART3_TXD (IOCFG176) */ 423 + >; 424 + pinctrl-single,bias-pulldown = <0 2 0 2>; 425 + pinctrl-single,bias-pullup = <0 1 0 1>; 426 + }; 427 + uart3_cfg_idle: uart3_cfg_idle { 428 + pinctrl-single,pins = < 429 + 0x294 0 /* UART3_CTS (IOCFG173) */ 430 + 0x298 0 /* UART3_RTS (IOCFG174) */ 431 + 0x29c 0 /* UART3_RXD (IOCFG175) */ 432 + 0x2a0 0 /* UART3_TXD (IOCFG176) */ 433 + >; 434 + pinctrl-single,bias-pulldown = <2 2 0 2>; 435 + pinctrl-single,bias-pullup = <0 1 0 1>; 436 + }; 437 + uart4_cfg_func: uart4_cfg_func { 438 + pinctrl-single,pins = < 439 + 0x2a4 0 /* UART4_CTS (IOCFG177) */ 440 + 0x2a8 0 /* UART4_RTS (IOCFG178) */ 441 + 0x2ac 0 /* UART4_RXD (IOCFG179) */ 442 + 0x2b0 0 /* UART4_TXD (IOCFG180) */ 443 + >; 444 + pinctrl-single,bias-pulldown = <0 2 0 2>; 445 + pinctrl-single,bias-pullup = <0 1 0 1>; 446 + }; 447 + i2c0_cfg_func: i2c0_cfg_func { 448 + pinctrl-single,pins = < 449 + 0x17c 0 /* I2C0_SCL (IOCFG103) */ 450 + 0x180 0 /* I2C0_SDA (IOCFG104) */ 451 + >; 452 + pinctrl-single,bias-pulldown = <0 2 0 2>; 453 + pinctrl-single,bias-pullup = <0 1 0 1>; 454 + pinctrl-single,drive-strength = <0x30 0xf0>; 455 + }; 456 + i2c1_cfg_func: i2c1_cfg_func { 457 + pinctrl-single,pins = < 458 + 0x184 0 /* I2C1_SCL (IOCFG105) */ 459 + 0x188 0 /* I2C1_SDA (IOCFG106) */ 460 + >; 461 + pinctrl-single,bias-pulldown = <0 2 0 2>; 462 + pinctrl-single,bias-pullup = <0 1 0 1>; 463 + pinctrl-single,drive-strength = <0x30 0xf0>; 464 + }; 465 + i2c2_cfg_func: i2c2_cfg_func { 466 + pinctrl-single,pins = < 467 + 0x118 0 /* I2C2_SCL (IOCFG79) */ 468 + 0x11c 0 /* I2C2_SDA (IOCFG80) */ 469 + >; 470 + pinctrl-single,bias-pulldown = <0 2 0 2>; 471 + pinctrl-single,bias-pullup = <0 1 0 1>; 472 + pinctrl-single,drive-strength = <0x30 0xf0>; 473 + }; 474 + i2c3_cfg_func: i2c3_cfg_func { 475 + pinctrl-single,pins = < 476 + 0x100 0 /* I2C3_SCL (IOCFG73) */ 477 + 0x104 0 /* I2C3_SDA (IOCFG74) */ 478 + >; 479 + pinctrl-single,bias-pulldown = <0 2 0 2>; 480 + pinctrl-single,bias-pullup = <0 1 0 1>; 481 + pinctrl-single,drive-strength = <0x30 0xf0>; 482 + }; 483 + spi0_cfg_func1: spi0_cfg_func1 { 484 + pinctrl-single,pins = < 485 + 0x1d4 0 /* SPI0_CLK (IOCFG125) */ 486 + 0x1d8 0 /* SPI0_DI (IOCFG126) */ 487 + 0x1dc 0 /* SPI0_DO (IOCFG127) */ 488 + >; 489 + pinctrl-single,bias-pulldown = <2 2 0 2>; 490 + pinctrl-single,bias-pullup = <0 1 0 1>; 491 + pinctrl-single,drive-strength = <0x30 0xf0>; 492 + }; 493 + spi0_cfg_func2: spi0_cfg_func2 { 494 + pinctrl-single,pins = < 495 + 0x1e0 0 /* SPI0_CS0 (IOCFG128) */ 496 + 0x1e4 0 /* SPI0_CS1 (IOCFG129) */ 497 + 0x1e8 0 /* SPI0_CS2 (IOCFG130 */ 498 + 0x1ec 0 /* SPI0_CS3 (IOCFG131) */ 499 + >; 500 + pinctrl-single,bias-pulldown = <0 2 0 2>; 501 + pinctrl-single,bias-pullup = <1 1 0 1>; 502 + pinctrl-single,drive-strength = <0x30 0xf0>; 503 + }; 504 + spi1_cfg_func1: spi1_cfg_func1 { 505 + pinctrl-single,pins = < 506 + 0x1f0 0 /* SPI1_CLK (IOCFG132) */ 507 + 0x1f4 0 /* SPI1_DI (IOCFG133) */ 508 + 0x1f8 0 /* SPI1_DO (IOCFG134) */ 509 + >; 510 + pinctrl-single,bias-pulldown = <2 2 0 2>; 511 + pinctrl-single,bias-pullup = <0 1 0 1>; 512 + pinctrl-single,drive-strength = <0x30 0xf0>; 513 + }; 514 + spi1_cfg_func2: spi1_cfg_func2 { 515 + pinctrl-single,pins = < 516 + 0x1fc 0 /* SPI1_CS (IOCFG135) */ 517 + >; 518 + pinctrl-single,bias-pulldown = <0 2 0 2>; 519 + pinctrl-single,bias-pullup = <1 1 0 1>; 520 + pinctrl-single,drive-strength = <0x30 0xf0>; 521 + }; 522 + kpc_cfg_func: kpc_cfg_func { 523 + pinctrl-single,pins = < 524 + 0x250 0 /* KEY_IN0 (IOCFG156) */ 525 + 0x254 0 /* KEY_IN1 (IOCFG157) */ 526 + 0x258 0 /* KEY_IN2 (IOCFG158) */ 527 + 0x230 0 /* KEY_OUT0 (IOCFG148) */ 528 + 0x234 0 /* KEY_OUT1 (IOCFG149) */ 529 + 0x238 0 /* KEY_OUT2 (IOCFG150) */ 530 + >; 531 + pinctrl-single,bias-pulldown = <2 2 0 2>; 532 + pinctrl-single,bias-pullup = <0 1 0 1>; 533 + }; 534 + emmc_cfg_func: emmc_cfg_func { 535 + pinctrl-single,pins = < 536 + 0x0ac 0 /* eMMC_CMD (IOCFG40) */ 537 + 0x0b0 0 /* eMMC_CLK (IOCFG41) */ 538 + 0x058 0 /* NAND_CS3_N (IOCFG19) */ 539 + 0x064 0 /* NAND_BUSY2_N (IOCFG22) */ 540 + 0x068 0 /* NAND_BUSY3_N (IOCFG23) */ 541 + 0x08c 0 /* NAND_DATA8 (IOCFG32) */ 542 + 0x090 0 /* NAND_DATA9 (IOCFG33) */ 543 + 0x094 0 /* NAND_DATA10 (IOCFG34) */ 544 + 0x098 0 /* NAND_DATA11 (IOCFG35) */ 545 + 0x09c 0 /* NAND_DATA12 (IOCFG36) */ 546 + 0x0a0 0 /* NAND_DATA13 (IOCFG37) */ 547 + 0x0a4 0 /* NAND_DATA14 (IOCFG38) */ 548 + 0x0a8 0 /* NAND_DATA15 (IOCFG39) */ 549 + >; 550 + pinctrl-single,bias-pulldown = <0 2 0 2>; 551 + pinctrl-single,bias-pullup = <1 1 0 1>; 552 + pinctrl-single,drive-strength = <0x30 0xf0>; 553 + }; 554 + sd_cfg_func1: sd_cfg_func1 { 555 + pinctrl-single,pins = < 556 + 0x18c 0 /* SD_CLK (IOCFG107) */ 557 + 0x190 0 /* SD_CMD (IOCFG108) */ 558 + >; 559 + pinctrl-single,bias-pulldown = <2 2 0 2>; 560 + pinctrl-single,bias-pullup = <0 1 0 1>; 561 + pinctrl-single,drive-strength = <0x30 0xf0>; 562 + }; 563 + sd_cfg_func2: sd_cfg_func2 { 564 + pinctrl-single,pins = < 565 + 0x194 0 /* SD_DATA0 (IOCFG109) */ 566 + 0x198 0 /* SD_DATA1 (IOCFG110) */ 567 + 0x19c 0 /* SD_DATA2 (IOCFG111) */ 568 + 0x1a0 0 /* SD_DATA3 (IOCFG112) */ 569 + >; 570 + pinctrl-single,bias-pulldown = <2 2 0 2>; 571 + pinctrl-single,bias-pullup = <0 1 0 1>; 572 + pinctrl-single,drive-strength = <0x70 0xf0>; 573 + }; 574 + nand_cfg_func1: nand_cfg_func1 { 575 + pinctrl-single,pins = < 576 + 0x03c 0 /* NAND_ALE (IOCFG12) */ 577 + 0x040 0 /* NAND_CLE (IOCFG13) */ 578 + 0x06c 0 /* NAND_DATA0 (IOCFG24) */ 579 + 0x070 0 /* NAND_DATA1 (IOCFG25) */ 580 + 0x074 0 /* NAND_DATA2 (IOCFG26) */ 581 + 0x078 0 /* NAND_DATA3 (IOCFG27) */ 582 + 0x07c 0 /* NAND_DATA4 (IOCFG28) */ 583 + 0x080 0 /* NAND_DATA5 (IOCFG29) */ 584 + 0x084 0 /* NAND_DATA6 (IOCFG30) */ 585 + 0x088 0 /* NAND_DATA7 (IOCFG31) */ 586 + 0x08c 0 /* NAND_DATA8 (IOCFG32) */ 587 + 0x090 0 /* NAND_DATA9 (IOCFG33) */ 588 + 0x094 0 /* NAND_DATA10 (IOCFG34) */ 589 + 0x098 0 /* NAND_DATA11 (IOCFG35) */ 590 + 0x09c 0 /* NAND_DATA12 (IOCFG36) */ 591 + 0x0a0 0 /* NAND_DATA13 (IOCFG37) */ 592 + 0x0a4 0 /* NAND_DATA14 (IOCFG38) */ 593 + 0x0a8 0 /* NAND_DATA15 (IOCFG39) */ 594 + >; 595 + pinctrl-single,bias-pulldown = <2 2 0 2>; 596 + pinctrl-single,bias-pullup = <0 1 0 1>; 597 + pinctrl-single,drive-strength = <0x30 0xf0>; 598 + }; 599 + nand_cfg_func2: nand_cfg_func2 { 600 + pinctrl-single,pins = < 601 + 0x044 0 /* NAND_RE_N (IOCFG14) */ 602 + 0x048 0 /* NAND_WE_N (IOCFG15) */ 603 + 0x04c 0 /* NAND_CS0_N (IOCFG16) */ 604 + 0x050 0 /* NAND_CS1_N (IOCFG17) */ 605 + 0x054 0 /* NAND_CS2_N (IOCFG18) */ 606 + 0x058 0 /* NAND_CS3_N (IOCFG19) */ 607 + 0x05c 0 /* NAND_BUSY0_N (IOCFG20) */ 608 + 0x060 0 /* NAND_BUSY1_N (IOCFG21) */ 609 + 0x064 0 /* NAND_BUSY2_N (IOCFG22) */ 610 + 0x068 0 /* NAND_BUSY3_N (IOCFG23) */ 611 + >; 612 + pinctrl-single,bias-pulldown = <0 2 0 2>; 613 + pinctrl-single,bias-pullup = <1 1 0 1>; 614 + pinctrl-single,drive-strength = <0x30 0xf0>; 615 + }; 616 + sdio_cfg_func: sdio_cfg_func { 617 + pinctrl-single,pins = < 618 + 0x1a4 0 /* SDIO0_CLK (IOCG113) */ 619 + 0x1a8 0 /* SDIO0_CMD (IOCG114) */ 620 + 0x1ac 0 /* SDIO0_DATA0 (IOCG115) */ 621 + 0x1b0 0 /* SDIO0_DATA1 (IOCG116) */ 622 + 0x1b4 0 /* SDIO0_DATA2 (IOCG117) */ 623 + 0x1b8 0 /* SDIO0_DATA3 (IOCG118) */ 624 + >; 625 + pinctrl-single,bias-pulldown = <2 2 0 2>; 626 + pinctrl-single,bias-pullup = <0 1 0 1>; 627 + pinctrl-single,drive-strength = <0x30 0xf0>; 628 + }; 629 + audio_out_cfg_func: audio_out_cfg_func { 630 + pinctrl-single,pins = < 631 + 0x200 0 /* GPIO (IOCFG136) */ 632 + 0x204 0 /* GPIO (IOCFG137) */ 633 + >; 634 + pinctrl-single,bias-pulldown = <2 2 0 2>; 635 + pinctrl-single,bias-pullup = <0 1 0 1>; 636 + }; 637 + }; 638 + }; 639 + 640 + gpio-keys { 641 + compatible = "gpio-keys"; 642 + 643 + call { 644 + label = "call"; 645 + gpios = <&gpio17 2 0>; 646 + linux,code = <169>; /* KEY_PHONE */ 647 + }; 648 + }; 649 + };
+565
arch/arm/boot/dts/hi3620.dtsi
··· 1 + /* 2 + * Hisilicon Ltd. Hi3620 SoC 3 + * 4 + * Copyright (C) 2012-2013 Hisilicon Ltd. 5 + * Copyright (C) 2012-2013 Linaro Ltd. 6 + * 7 + * Author: Haojian Zhuang <haojian.zhuang@linaro.org> 8 + * 9 + * This program is free software; you can redistribute it and/or modify 10 + * it under the terms of the GNU General Public License version 2 as 11 + * publishhed by the Free Software Foundation. 12 + */ 13 + 14 + #include "skeleton.dtsi" 15 + #include <dt-bindings/clock/hi3620-clock.h> 16 + 17 + / { 18 + aliases { 19 + serial0 = &uart0; 20 + serial1 = &uart1; 21 + serial2 = &uart2; 22 + serial3 = &uart3; 23 + serial4 = &uart4; 24 + }; 25 + 26 + pclk: clk { 27 + compatible = "fixed-clock"; 28 + #clock-cells = <0>; 29 + clock-frequency = <26000000>; 30 + clock-output-names = "apb_pclk"; 31 + }; 32 + 33 + cpus { 34 + #address-cells = <1>; 35 + #size-cells = <0>; 36 + 37 + cpu@0 { 38 + device_type = "cpu"; 39 + compatible = "arm,cortex-a9"; 40 + reg = <0x0>; 41 + next-level-cache = <&L2>; 42 + }; 43 + 44 + cpu@1 { 45 + compatible = "arm,cortex-a9"; 46 + device_type = "cpu"; 47 + reg = <1>; 48 + next-level-cache = <&L2>; 49 + }; 50 + 51 + cpu@2 { 52 + compatible = "arm,cortex-a9"; 53 + device_type = "cpu"; 54 + reg = <2>; 55 + next-level-cache = <&L2>; 56 + }; 57 + 58 + cpu@3 { 59 + compatible = "arm,cortex-a9"; 60 + device_type = "cpu"; 61 + reg = <3>; 62 + next-level-cache = <&L2>; 63 + }; 64 + }; 65 + 66 + amba { 67 + 68 + #address-cells = <1>; 69 + #size-cells = <1>; 70 + compatible = "arm,amba-bus"; 71 + interrupt-parent = <&gic>; 72 + ranges = <0 0xfc000000 0x2000000>; 73 + 74 + L2: l2-cache { 75 + compatible = "arm,pl310-cache"; 76 + reg = <0xfc10000 0x100000>; 77 + interrupts = <0 15 4>; 78 + cache-unified; 79 + cache-level = <2>; 80 + }; 81 + 82 + gic: interrupt-controller@1000 { 83 + compatible = "arm,cortex-a9-gic"; 84 + #interrupt-cells = <3>; 85 + #address-cells = <0>; 86 + interrupt-controller; 87 + /* gic dist base, gic cpu base */ 88 + reg = <0x1000 0x1000>, <0x100 0x100>; 89 + }; 90 + 91 + sysctrl: system-controller@802000 { 92 + compatible = "hisilicon,sysctrl"; 93 + #address-cells = <1>; 94 + #size-cells = <1>; 95 + ranges = <0 0x802000 0x1000>; 96 + reg = <0x802000 0x1000>; 97 + 98 + smp-offset = <0x31c>; 99 + resume-offset = <0x308>; 100 + reboot-offset = <0x4>; 101 + 102 + clock: clock@0 { 103 + compatible = "hisilicon,hi3620-clock"; 104 + reg = <0 0x10000>; 105 + #clock-cells = <1>; 106 + }; 107 + }; 108 + 109 + dual_timer0: dual_timer@800000 { 110 + compatible = "arm,sp804", "arm,primecell"; 111 + reg = <0x800000 0x1000>; 112 + /* timer00 & timer01 */ 113 + interrupts = <0 0 4>, <0 1 4>; 114 + clocks = <&clock HI3620_TIMER0_MUX>, <&clock HI3620_TIMER1_MUX>; 115 + clock-names = "apb_pclk"; 116 + status = "disabled"; 117 + }; 118 + 119 + dual_timer1: dual_timer@801000 { 120 + compatible = "arm,sp804", "arm,primecell"; 121 + reg = <0x801000 0x1000>; 122 + /* timer10 & timer11 */ 123 + interrupts = <0 2 4>, <0 3 4>; 124 + clocks = <&clock HI3620_TIMER2_MUX>, <&clock HI3620_TIMER3_MUX>; 125 + clock-names = "apb_pclk"; 126 + status = "disabled"; 127 + }; 128 + 129 + dual_timer2: dual_timer@a01000 { 130 + compatible = "arm,sp804", "arm,primecell"; 131 + reg = <0xa01000 0x1000>; 132 + /* timer20 & timer21 */ 133 + interrupts = <0 4 4>, <0 5 4>; 134 + clocks = <&clock HI3620_TIMER4_MUX>, <&clock HI3620_TIMER5_MUX>; 135 + clock-names = "apb_pclk"; 136 + status = "disabled"; 137 + }; 138 + 139 + dual_timer3: dual_timer@a02000 { 140 + compatible = "arm,sp804", "arm,primecell"; 141 + reg = <0xa02000 0x1000>; 142 + /* timer30 & timer31 */ 143 + interrupts = <0 6 4>, <0 7 4>; 144 + clocks = <&clock HI3620_TIMER6_MUX>, <&clock HI3620_TIMER7_MUX>; 145 + clock-names = "apb_pclk"; 146 + status = "disabled"; 147 + }; 148 + 149 + dual_timer4: dual_timer@a03000 { 150 + compatible = "arm,sp804", "arm,primecell"; 151 + reg = <0xa03000 0x1000>; 152 + /* timer40 & timer41 */ 153 + interrupts = <0 96 4>, <0 97 4>; 154 + clocks = <&clock HI3620_TIMER8_MUX>, <&clock HI3620_TIMER9_MUX>; 155 + clock-names = "apb_pclk"; 156 + status = "disabled"; 157 + }; 158 + 159 + timer5: timer@600 { 160 + compatible = "arm,cortex-a9-twd-timer"; 161 + reg = <0x600 0x20>; 162 + interrupts = <1 13 0xf01>; 163 + }; 164 + 165 + uart0: uart@b00000 { 166 + compatible = "arm,pl011", "arm,primecell"; 167 + reg = <0xb00000 0x1000>; 168 + interrupts = <0 20 4>; 169 + clocks = <&clock HI3620_UARTCLK0>; 170 + clock-names = "apb_pclk"; 171 + status = "disabled"; 172 + }; 173 + 174 + uart1: uart@b01000 { 175 + compatible = "arm,pl011", "arm,primecell"; 176 + reg = <0xb01000 0x1000>; 177 + interrupts = <0 21 4>; 178 + clocks = <&clock HI3620_UARTCLK1>; 179 + clock-names = "apb_pclk"; 180 + status = "disabled"; 181 + }; 182 + 183 + uart2: uart@b02000 { 184 + compatible = "arm,pl011", "arm,primecell"; 185 + reg = <0xb02000 0x1000>; 186 + interrupts = <0 22 4>; 187 + clocks = <&clock HI3620_UARTCLK2>; 188 + clock-names = "apb_pclk"; 189 + status = "disabled"; 190 + }; 191 + 192 + uart3: uart@b03000 { 193 + compatible = "arm,pl011", "arm,primecell"; 194 + reg = <0xb03000 0x1000>; 195 + interrupts = <0 23 4>; 196 + clocks = <&clock HI3620_UARTCLK3>; 197 + clock-names = "apb_pclk"; 198 + status = "disabled"; 199 + }; 200 + 201 + uart4: uart@b04000 { 202 + compatible = "arm,pl011", "arm,primecell"; 203 + reg = <0xb04000 0x1000>; 204 + interrupts = <0 24 4>; 205 + clocks = <&clock HI3620_UARTCLK4>; 206 + clock-names = "apb_pclk"; 207 + status = "disabled"; 208 + }; 209 + 210 + gpio0: gpio@806000 { 211 + compatible = "arm,pl061", "arm,primecell"; 212 + reg = <0x806000 0x1000>; 213 + interrupts = <0 64 0x4>; 214 + gpio-controller; 215 + #gpio-cells = <2>; 216 + gpio-ranges = < &pmx0 2 0 1 &pmx0 3 0 1 &pmx0 4 0 1 217 + &pmx0 5 0 1 &pmx0 6 1 1 &pmx0 7 2 1>; 218 + interrupt-controller; 219 + #interrupt-cells = <2>; 220 + clocks = <&clock HI3620_GPIOCLK0>; 221 + clock-names = "apb_pclk"; 222 + }; 223 + 224 + gpio1: gpio@807000 { 225 + compatible = "arm,pl061", "arm,primecell"; 226 + reg = <0x807000 0x1000>; 227 + interrupts = <0 65 0x4>; 228 + gpio-controller; 229 + #gpio-cells = <2>; 230 + gpio-ranges = < &pmx0 0 3 1 &pmx0 1 3 1 &pmx0 2 3 1 231 + &pmx0 3 3 1 &pmx0 4 3 1 &pmx0 5 4 1 232 + &pmx0 6 5 1 &pmx0 7 6 1>; 233 + interrupt-controller; 234 + #interrupt-cells = <2>; 235 + clocks = <&clock HI3620_GPIOCLK1>; 236 + clock-names = "apb_pclk"; 237 + }; 238 + 239 + gpio2: gpio@808000 { 240 + compatible = "arm,pl061", "arm,primecell"; 241 + reg = <0x808000 0x1000>; 242 + interrupts = <0 66 0x4>; 243 + gpio-controller; 244 + #gpio-cells = <2>; 245 + gpio-ranges = < &pmx0 0 7 1 &pmx0 1 8 1 &pmx0 2 9 1 246 + &pmx0 3 10 1 &pmx0 4 3 1 &pmx0 5 3 1 247 + &pmx0 6 3 1 &pmx0 7 3 1>; 248 + interrupt-controller; 249 + #interrupt-cells = <2>; 250 + clocks = <&clock HI3620_GPIOCLK2>; 251 + clock-names = "apb_pclk"; 252 + }; 253 + 254 + gpio3: gpio@809000 { 255 + compatible = "arm,pl061", "arm,primecell"; 256 + reg = <0x809000 0x1000>; 257 + interrupts = <0 67 0x4>; 258 + gpio-controller; 259 + #gpio-cells = <2>; 260 + gpio-ranges = < &pmx0 0 3 1 &pmx0 1 3 1 &pmx0 2 3 1 261 + &pmx0 3 3 1 &pmx0 4 11 1 &pmx0 5 11 1 262 + &pmx0 6 11 1 &pmx0 7 11 1>; 263 + interrupt-controller; 264 + #interrupt-cells = <2>; 265 + clocks = <&clock HI3620_GPIOCLK3>; 266 + clock-names = "apb_pclk"; 267 + }; 268 + 269 + gpio4: gpio@80a000 { 270 + compatible = "arm,pl061", "arm,primecell"; 271 + reg = <0x80a000 0x1000>; 272 + interrupts = <0 68 0x4>; 273 + gpio-controller; 274 + #gpio-cells = <2>; 275 + gpio-ranges = < &pmx0 0 11 1 &pmx0 1 11 1 &pmx0 2 11 1 276 + &pmx0 3 11 1 &pmx0 4 12 1 &pmx0 5 12 1 277 + &pmx0 6 13 1 &pmx0 7 13 1>; 278 + interrupt-controller; 279 + #interrupt-cells = <2>; 280 + clocks = <&clock HI3620_GPIOCLK4>; 281 + clock-names = "apb_pclk"; 282 + }; 283 + 284 + gpio5: gpio@80b000 { 285 + compatible = "arm,pl061", "arm,primecell"; 286 + reg = <0x80b000 0x1000>; 287 + interrupts = <0 69 0x4>; 288 + gpio-controller; 289 + #gpio-cells = <2>; 290 + gpio-ranges = < &pmx0 0 14 1 &pmx0 1 15 1 &pmx0 2 16 1 291 + &pmx0 3 16 1 &pmx0 4 16 1 &pmx0 5 16 1 292 + &pmx0 6 16 1 &pmx0 7 16 1>; 293 + interrupt-controller; 294 + #interrupt-cells = <2>; 295 + clocks = <&clock HI3620_GPIOCLK5>; 296 + clock-names = "apb_pclk"; 297 + }; 298 + 299 + gpio6: gpio@80c000 { 300 + compatible = "arm,pl061", "arm,primecell"; 301 + reg = <0x80c000 0x1000>; 302 + interrupts = <0 70 0x4>; 303 + gpio-controller; 304 + #gpio-cells = <2>; 305 + gpio-ranges = < &pmx0 0 16 1 &pmx0 1 16 1 &pmx0 2 17 1 306 + &pmx0 3 17 1 &pmx0 4 18 1 &pmx0 5 18 1 307 + &pmx0 6 18 1 &pmx0 7 19 1>; 308 + interrupt-controller; 309 + #interrupt-cells = <2>; 310 + clocks = <&clock HI3620_GPIOCLK6>; 311 + clock-names = "apb_pclk"; 312 + }; 313 + 314 + gpio7: gpio@80d000 { 315 + compatible = "arm,pl061", "arm,primecell"; 316 + reg = <0x80d000 0x1000>; 317 + interrupts = <0 71 0x4>; 318 + gpio-controller; 319 + #gpio-cells = <2>; 320 + gpio-ranges = < &pmx0 0 19 1 &pmx0 1 20 1 &pmx0 2 21 1 321 + &pmx0 3 22 1 &pmx0 4 23 1 &pmx0 5 24 1 322 + &pmx0 6 25 1 &pmx0 7 26 1>; 323 + interrupt-controller; 324 + #interrupt-cells = <2>; 325 + clocks = <&clock HI3620_GPIOCLK7>; 326 + clock-names = "apb_pclk"; 327 + }; 328 + 329 + gpio8: gpio@80e000 { 330 + compatible = "arm,pl061", "arm,primecell"; 331 + reg = <0x80e000 0x1000>; 332 + interrupts = <0 72 0x4>; 333 + gpio-controller; 334 + #gpio-cells = <2>; 335 + gpio-ranges = < &pmx0 0 27 1 &pmx0 1 28 1 &pmx0 2 29 1 336 + &pmx0 3 30 1 &pmx0 4 31 1 &pmx0 5 32 1 337 + &pmx0 6 33 1 &pmx0 7 34 1>; 338 + interrupt-controller; 339 + #interrupt-cells = <2>; 340 + clocks = <&clock HI3620_GPIOCLK8>; 341 + clock-names = "apb_pclk"; 342 + }; 343 + 344 + gpio9: gpio@80f000 { 345 + compatible = "arm,pl061", "arm,primecell"; 346 + reg = <0x80f000 0x1000>; 347 + interrupts = <0 73 0x4>; 348 + gpio-controller; 349 + #gpio-cells = <2>; 350 + gpio-ranges = < &pmx0 0 35 1 &pmx0 1 36 1 &pmx0 2 37 1 351 + &pmx0 3 38 1 &pmx0 4 39 1 &pmx0 5 40 1 352 + &pmx0 6 41 1>; 353 + interrupt-controller; 354 + #interrupt-cells = <2>; 355 + clocks = <&clock HI3620_GPIOCLK9>; 356 + clock-names = "apb_pclk"; 357 + }; 358 + 359 + gpio10: gpio@810000 { 360 + compatible = "arm,pl061", "arm,primecell"; 361 + reg = <0x810000 0x1000>; 362 + interrupts = <0 74 0x4>; 363 + gpio-controller; 364 + #gpio-cells = <2>; 365 + gpio-ranges = < &pmx0 2 43 1 &pmx0 3 44 1 &pmx0 4 45 1 366 + &pmx0 5 45 1 &pmx0 6 46 1 &pmx0 7 46 1>; 367 + interrupt-controller; 368 + #interrupt-cells = <2>; 369 + clocks = <&clock HI3620_GPIOCLK10>; 370 + clock-names = "apb_pclk"; 371 + }; 372 + 373 + gpio11: gpio@811000 { 374 + compatible = "arm,pl061", "arm,primecell"; 375 + reg = <0x811000 0x1000>; 376 + interrupts = <0 75 0x4>; 377 + gpio-controller; 378 + #gpio-cells = <2>; 379 + gpio-ranges = < &pmx0 0 47 1 &pmx0 1 47 1 &pmx0 2 47 1 380 + &pmx0 3 47 1 &pmx0 4 47 1 &pmx0 5 48 1 381 + &pmx0 6 49 1 &pmx0 7 49 1>; 382 + interrupt-controller; 383 + #interrupt-cells = <2>; 384 + clocks = <&clock HI3620_GPIOCLK11>; 385 + clock-names = "apb_pclk"; 386 + }; 387 + 388 + gpio12: gpio@812000 { 389 + compatible = "arm,pl061", "arm,primecell"; 390 + reg = <0x812000 0x1000>; 391 + interrupts = <0 76 0x4>; 392 + gpio-controller; 393 + #gpio-cells = <2>; 394 + gpio-ranges = < &pmx0 0 49 1 &pmx0 1 50 1 &pmx0 2 49 1 395 + &pmx0 3 49 1 &pmx0 4 51 1 &pmx0 5 51 1 396 + &pmx0 6 51 1 &pmx0 7 52 1>; 397 + interrupt-controller; 398 + #interrupt-cells = <2>; 399 + clocks = <&clock HI3620_GPIOCLK12>; 400 + clock-names = "apb_pclk"; 401 + }; 402 + 403 + gpio13: gpio@813000 { 404 + compatible = "arm,pl061", "arm,primecell"; 405 + reg = <0x813000 0x1000>; 406 + interrupts = <0 77 0x4>; 407 + gpio-controller; 408 + #gpio-cells = <2>; 409 + gpio-ranges = < &pmx0 0 51 1 &pmx0 1 51 1 &pmx0 2 53 1 410 + &pmx0 3 53 1 &pmx0 4 53 1 &pmx0 5 54 1 411 + &pmx0 6 55 1 &pmx0 7 56 1>; 412 + interrupt-controller; 413 + #interrupt-cells = <2>; 414 + clocks = <&clock HI3620_GPIOCLK13>; 415 + clock-names = "apb_pclk"; 416 + }; 417 + 418 + gpio14: gpio@814000 { 419 + compatible = "arm,pl061", "arm,primecell"; 420 + reg = <0x814000 0x1000>; 421 + interrupts = <0 78 0x4>; 422 + gpio-controller; 423 + #gpio-cells = <2>; 424 + gpio-ranges = < &pmx0 0 57 1 &pmx0 1 97 1 &pmx0 2 97 1 425 + &pmx0 3 58 1 &pmx0 4 59 1 &pmx0 5 60 1 426 + &pmx0 6 60 1 &pmx0 7 61 1>; 427 + interrupt-controller; 428 + #interrupt-cells = <2>; 429 + clocks = <&clock HI3620_GPIOCLK14>; 430 + clock-names = "apb_pclk"; 431 + }; 432 + 433 + gpio15: gpio@815000 { 434 + compatible = "arm,pl061", "arm,primecell"; 435 + reg = <0x815000 0x1000>; 436 + interrupts = <0 79 0x4>; 437 + gpio-controller; 438 + #gpio-cells = <2>; 439 + gpio-ranges = < &pmx0 0 61 1 &pmx0 1 62 1 &pmx0 2 62 1 440 + &pmx0 3 63 1 &pmx0 4 63 1 &pmx0 5 64 1 441 + &pmx0 6 64 1 &pmx0 7 65 1>; 442 + interrupt-controller; 443 + #interrupt-cells = <2>; 444 + clocks = <&clock HI3620_GPIOCLK15>; 445 + clock-names = "apb_pclk"; 446 + }; 447 + 448 + gpio16: gpio@816000 { 449 + compatible = "arm,pl061", "arm,primecell"; 450 + reg = <0x816000 0x1000>; 451 + interrupts = <0 80 0x4>; 452 + gpio-controller; 453 + #gpio-cells = <2>; 454 + gpio-ranges = < &pmx0 0 66 1 &pmx0 1 67 1 &pmx0 2 68 1 455 + &pmx0 3 69 1 &pmx0 4 70 1 &pmx0 5 71 1 456 + &pmx0 6 72 1 &pmx0 7 73 1>; 457 + interrupt-controller; 458 + #interrupt-cells = <2>; 459 + clocks = <&clock HI3620_GPIOCLK16>; 460 + clock-names = "apb_pclk"; 461 + }; 462 + 463 + gpio17: gpio@817000 { 464 + compatible = "arm,pl061", "arm,primecell"; 465 + reg = <0x817000 0x1000>; 466 + interrupts = <0 81 0x4>; 467 + gpio-controller; 468 + #gpio-cells = <2>; 469 + gpio-ranges = < &pmx0 0 74 1 &pmx0 1 75 1 &pmx0 2 76 1 470 + &pmx0 3 77 1 &pmx0 4 78 1 &pmx0 5 79 1 471 + &pmx0 6 80 1 &pmx0 7 81 1>; 472 + interrupt-controller; 473 + #interrupt-cells = <2>; 474 + clocks = <&clock HI3620_GPIOCLK17>; 475 + clock-names = "apb_pclk"; 476 + }; 477 + 478 + gpio18: gpio@818000 { 479 + compatible = "arm,pl061", "arm,primecell"; 480 + reg = <0x818000 0x1000>; 481 + interrupts = <0 82 0x4>; 482 + gpio-controller; 483 + #gpio-cells = <2>; 484 + gpio-ranges = < &pmx0 0 82 1 &pmx0 1 83 1 &pmx0 2 83 1 485 + &pmx0 3 84 1 &pmx0 4 84 1 &pmx0 5 85 1 486 + &pmx0 6 86 1 &pmx0 7 87 1>; 487 + interrupt-controller; 488 + #interrupt-cells = <2>; 489 + clocks = <&clock HI3620_GPIOCLK18>; 490 + clock-names = "apb_pclk"; 491 + }; 492 + 493 + gpio19: gpio@819000 { 494 + compatible = "arm,pl061", "arm,primecell"; 495 + reg = <0x819000 0x1000>; 496 + interrupts = <0 83 0x4>; 497 + gpio-controller; 498 + #gpio-cells = <2>; 499 + gpio-ranges = < &pmx0 0 87 1 &pmx0 1 87 1 &pmx0 2 88 1 500 + &pmx0 3 88 1>; 501 + interrupt-controller; 502 + #interrupt-cells = <2>; 503 + clocks = <&clock HI3620_GPIOCLK19>; 504 + clock-names = "apb_pclk"; 505 + }; 506 + 507 + gpio20: gpio@81a000 { 508 + compatible = "arm,pl061", "arm,primecell"; 509 + reg = <0x81a000 0x1000>; 510 + interrupts = <0 84 0x4>; 511 + gpio-controller; 512 + #gpio-cells = <2>; 513 + gpio-ranges = < &pmx0 0 89 1 &pmx0 1 89 1 &pmx0 2 90 1 514 + &pmx0 3 90 1 &pmx0 4 91 1 &pmx0 5 92 1>; 515 + interrupt-controller; 516 + #interrupt-cells = <2>; 517 + clocks = <&clock HI3620_GPIOCLK20>; 518 + clock-names = "apb_pclk"; 519 + }; 520 + 521 + gpio21: gpio@81b000 { 522 + compatible = "arm,pl061", "arm,primecell"; 523 + reg = <0x81b000 0x1000>; 524 + interrupts = <0 85 0x4>; 525 + gpio-controller; 526 + #gpio-cells = <2>; 527 + gpio-ranges = < &pmx0 3 94 1 &pmx0 7 96 1>; 528 + interrupt-controller; 529 + #interrupt-cells = <2>; 530 + clocks = <&clock HI3620_GPIOCLK21>; 531 + clock-names = "apb_pclk"; 532 + }; 533 + 534 + pmx0: pinmux@803000 { 535 + compatible = "pinctrl-single"; 536 + reg = <0x803000 0x188>; 537 + #address-cells = <1>; 538 + #size-cells = <1>; 539 + #gpio-range-cells = <3>; 540 + ranges; 541 + 542 + pinctrl-single,register-width = <32>; 543 + pinctrl-single,function-mask = <7>; 544 + /* pin base, nr pins & gpio function */ 545 + pinctrl-single,gpio-range = <&range 0 3 0 &range 3 9 1 546 + &range 12 1 0 &range 13 29 1 547 + &range 43 1 0 &range 44 49 1 548 + &range 94 1 1 &range 96 2 1>; 549 + 550 + range: gpio-range { 551 + #pinctrl-single,gpio-range-cells = <3>; 552 + }; 553 + }; 554 + 555 + pmx1: pinmux@803800 { 556 + compatible = "pinconf-single"; 557 + reg = <0x803800 0x2dc>; 558 + #address-cells = <1>; 559 + #size-cells = <1>; 560 + ranges; 561 + 562 + pinctrl-single,register-width = <32>; 563 + }; 564 + }; 565 + };
+33
arch/arm/boot/dts/qcom-msm8974.dtsi
··· 1 + /dts-v1/; 2 + 3 + #include "skeleton.dtsi" 4 + 5 + / { 6 + model = "Qualcomm MSM8974"; 7 + compatible = "qcom,msm8974"; 8 + interrupt-parent = <&intc>; 9 + 10 + soc: soc { 11 + #address-cells = <1>; 12 + #size-cells = <1>; 13 + ranges; 14 + compatible = "simple-bus"; 15 + 16 + intc: interrupt-controller@f9000000 { 17 + compatible = "qcom,msm-qgic2"; 18 + interrupt-controller; 19 + #interrupt-cells = <3>; 20 + reg = <0xf9000000 0x1000>, 21 + <0xf9002000 0x1000>; 22 + }; 23 + 24 + timer { 25 + compatible = "arm,armv7-timer"; 26 + interrupts = <1 2 0xf08>, 27 + <1 3 0xf08>, 28 + <1 4 0xf08>, 29 + <1 1 0xf08>; 30 + clock-frequency = <19200000>; 31 + }; 32 + }; 33 + };
+2 -2
arch/arm/common/timer-sp.c
··· 66 66 67 67 static void __iomem *sched_clock_base; 68 68 69 - static u32 sp804_read(void) 69 + static u64 notrace sp804_read(void) 70 70 { 71 71 return ~readl_relaxed(sched_clock_base + TIMER_VALUE); 72 72 } ··· 104 104 105 105 if (use_sched_clock) { 106 106 sched_clock_base = base; 107 - setup_sched_clock(sp804_read, 32, rate); 107 + sched_clock_register(sp804_read, 32, rate); 108 108 } 109 109 } 110 110
+1 -1
arch/arm/configs/ape6evm_defconfig
··· 13 13 CONFIG_PERF_EVENTS=y 14 14 CONFIG_SLAB=y 15 15 # CONFIG_BLOCK is not set 16 - CONFIG_ARCH_SHMOBILE=y 16 + CONFIG_ARCH_SHMOBILE_LEGACY=y 17 17 CONFIG_ARCH_R8A73A4=y 18 18 CONFIG_MACH_APE6EVM=y 19 19 # CONFIG_ARM_THUMB is not set
+1 -1
arch/arm/configs/armadillo800eva_defconfig
··· 15 15 # CONFIG_BLK_DEV_BSG is not set 16 16 # CONFIG_IOSCHED_DEADLINE is not set 17 17 # CONFIG_IOSCHED_CFQ is not set 18 - CONFIG_ARCH_SHMOBILE=y 18 + CONFIG_ARCH_SHMOBILE_LEGACY=y 19 19 CONFIG_ARCH_R8A7740=y 20 20 CONFIG_MACH_ARMADILLO800EVA=y 21 21 # CONFIG_SH_TIMER_TMU is not set
+1 -2
arch/arm/configs/bcm_defconfig
··· 29 29 CONFIG_ARM_THUMBEE=y 30 30 CONFIG_PREEMPT=y 31 31 CONFIG_AEABI=y 32 - # CONFIG_OABI_COMPAT is not set 33 32 # CONFIG_COMPACTION is not set 34 33 CONFIG_ZBOOT_ROM_TEXT=0x0 35 34 CONFIG_ZBOOT_ROM_BSS=0x0 36 - CONFIG_ARM_APPENDED_DTB=y 37 35 CONFIG_CMDLINE="console=ttyS0,115200n8 mem=128M" 38 36 CONFIG_CPU_IDLE=y 39 37 CONFIG_VFP=y ··· 118 120 CONFIG_DEFAULT_HUNG_TASK_TIMEOUT=110 119 121 CONFIG_BOOTPARAM_HUNG_TASK_PANIC=y 120 122 # CONFIG_FTRACE is not set 123 + # CONFIG_CRYPTO_ANSI_CPRNG is not set 121 124 CONFIG_CRC_CCITT=y 122 125 CONFIG_CRC_T10DIF=y 123 126 CONFIG_CRC_ITU_T=y
+1 -1
arch/arm/configs/bockw_defconfig
··· 8 8 CONFIG_EMBEDDED=y 9 9 CONFIG_SLAB=y 10 10 # CONFIG_IOSCHED_CFQ is not set 11 - CONFIG_ARCH_SHMOBILE=y 11 + CONFIG_ARCH_SHMOBILE_LEGACY=y 12 12 CONFIG_ARCH_R8A7778=y 13 13 CONFIG_MACH_BOCKW=y 14 14 CONFIG_MEMORY_START=0x60000000
+102
arch/arm/configs/efm32_defconfig
··· 1 + CONFIG_HIGH_RES_TIMERS=y 2 + CONFIG_LOG_BUF_SHIFT=12 3 + CONFIG_CC_OPTIMIZE_FOR_SIZE=y 4 + # CONFIG_UID16 is not set 5 + # CONFIG_BASE_FULL is not set 6 + # CONFIG_FUTEX is not set 7 + # CONFIG_EPOLL is not set 8 + # CONFIG_SIGNALFD is not set 9 + # CONFIG_EVENTFD is not set 10 + # CONFIG_AIO is not set 11 + CONFIG_EMBEDDED=y 12 + # CONFIG_VM_EVENT_COUNTERS is not set 13 + # CONFIG_SLUB_DEBUG is not set 14 + # CONFIG_LBDAF is not set 15 + # CONFIG_BLK_DEV_BSG is not set 16 + # CONFIG_IOSCHED_DEADLINE is not set 17 + # CONFIG_IOSCHED_CFQ is not set 18 + # CONFIG_MMU is not set 19 + CONFIG_ARCH_EFM32=y 20 + # CONFIG_KUSER_HELPERS is not set 21 + CONFIG_SET_MEM_PARAM=y 22 + CONFIG_DRAM_BASE=0x88000000 23 + CONFIG_DRAM_SIZE=0x00400000 24 + CONFIG_FLASH_MEM_BASE=0x8c000000 25 + CONFIG_FLASH_SIZE=0x01000000 26 + CONFIG_PREEMPT=y 27 + CONFIG_ZBOOT_ROM_TEXT=0x0 28 + CONFIG_ZBOOT_ROM_BSS=0x0 29 + CONFIG_XIP_KERNEL=y 30 + CONFIG_XIP_PHYS_ADDR=0x8c000000 31 + CONFIG_BINFMT_FLAT=y 32 + CONFIG_BINFMT_SHARED_FLAT=y 33 + # CONFIG_COREDUMP is not set 34 + CONFIG_NET=y 35 + CONFIG_PACKET=y 36 + CONFIG_UNIX=y 37 + CONFIG_INET=y 38 + # CONFIG_INET_XFRM_MODE_TRANSPORT is not set 39 + # CONFIG_INET_XFRM_MODE_TUNNEL is not set 40 + # CONFIG_INET_XFRM_MODE_BEET is not set 41 + # CONFIG_INET_LRO is not set 42 + # CONFIG_INET_DIAG is not set 43 + # CONFIG_IPV6 is not set 44 + # CONFIG_WIRELESS is not set 45 + CONFIG_DEVTMPFS=y 46 + CONFIG_DEVTMPFS_MOUNT=y 47 + # CONFIG_FW_LOADER is not set 48 + CONFIG_MTD=y 49 + CONFIG_MTD_BLOCK_RO=y 50 + CONFIG_MTD_ROM=y 51 + CONFIG_MTD_UCLINUX=y 52 + CONFIG_PROC_DEVICETREE=y 53 + # CONFIG_BLK_DEV is not set 54 + CONFIG_NETDEVICES=y 55 + # CONFIG_NET_VENDOR_ARC is not set 56 + # CONFIG_NET_CADENCE is not set 57 + # CONFIG_NET_VENDOR_BROADCOM is not set 58 + # CONFIG_NET_VENDOR_CIRRUS is not set 59 + # CONFIG_NET_VENDOR_FARADAY is not set 60 + # CONFIG_NET_VENDOR_INTEL is not set 61 + # CONFIG_NET_VENDOR_MARVELL is not set 62 + CONFIG_KS8851=y 63 + # CONFIG_NET_VENDOR_MICROCHIP is not set 64 + # CONFIG_NET_VENDOR_NATSEMI is not set 65 + # CONFIG_NET_VENDOR_SEEQ is not set 66 + # CONFIG_NET_VENDOR_SMSC is not set 67 + # CONFIG_NET_VENDOR_STMICRO is not set 68 + # CONFIG_NET_VENDOR_VIA is not set 69 + # CONFIG_NET_VENDOR_WIZNET is not set 70 + # CONFIG_WLAN is not set 71 + # CONFIG_INPUT is not set 72 + # CONFIG_SERIO is not set 73 + # CONFIG_VT is not set 74 + # CONFIG_UNIX98_PTYS is not set 75 + # CONFIG_LEGACY_PTYS is not set 76 + CONFIG_SERIAL_NONSTANDARD=y 77 + # CONFIG_DEVKMEM is not set 78 + CONFIG_SERIAL_EFM32_UART=y 79 + CONFIG_SERIAL_EFM32_UART_CONSOLE=y 80 + # CONFIG_HW_RANDOM is not set 81 + CONFIG_SPI=y 82 + CONFIG_SPI_EFM32=y 83 + CONFIG_GPIO_SYSFS=y 84 + # CONFIG_USB_SUPPORT is not set 85 + CONFIG_MMC=y 86 + CONFIG_MMC_SPI=y 87 + # CONFIG_IOMMU_SUPPORT is not set 88 + CONFIG_EXT2_FS=y 89 + # CONFIG_FILE_LOCKING is not set 90 + # CONFIG_DNOTIFY is not set 91 + # CONFIG_INOTIFY_USER is not set 92 + CONFIG_ROMFS_FS=y 93 + CONFIG_ROMFS_BACKED_BY_MTD=y 94 + # CONFIG_NETWORK_FILESYSTEMS is not set 95 + CONFIG_PRINTK_TIME=y 96 + CONFIG_DEBUG_INFO=y 97 + # CONFIG_ENABLE_WARN_DEPRECATED is not set 98 + # CONFIG_ENABLE_MUST_CHECK is not set 99 + CONFIG_MAGIC_SYSRQ=y 100 + # CONFIG_SCHED_DEBUG is not set 101 + # CONFIG_DEBUG_BUGVERBOSE is not set 102 + # CONFIG_FTRACE is not set
+56
arch/arm/configs/hi3xxx_defconfig
··· 1 + CONFIG_IRQ_DOMAIN_DEBUG=y 2 + CONFIG_NO_HZ=y 3 + CONFIG_HIGH_RES_TIMERS=y 4 + CONFIG_BLK_DEV_INITRD=y 5 + CONFIG_RD_LZMA=y 6 + CONFIG_ARCH_HI3xxx=y 7 + CONFIG_SMP=y 8 + CONFIG_PREEMPT=y 9 + CONFIG_AEABI=y 10 + CONFIG_ARM_APPENDED_DTB=y 11 + CONFIG_NET=y 12 + CONFIG_UNIX=y 13 + CONFIG_INET=y 14 + CONFIG_IP_PNP=y 15 + CONFIG_IP_PNP_DHCP=y 16 + CONFIG_DEVTMPFS=y 17 + CONFIG_DEVTMPFS_MOUNT=y 18 + CONFIG_BLK_DEV_SD=y 19 + CONFIG_ATA=y 20 + CONFIG_SATA_AHCI_PLATFORM=y 21 + CONFIG_NETDEVICES=y 22 + CONFIG_SERIAL_AMBA_PL011=y 23 + CONFIG_SERIAL_AMBA_PL011_CONSOLE=y 24 + CONFIG_SERIAL_OF_PLATFORM=y 25 + CONFIG_I2C_DESIGNWARE_PLATFORM=y 26 + CONFIG_SPI=y 27 + CONFIG_SPI_PL022=y 28 + CONFIG_PINCTRL_SINGLE=y 29 + CONFIG_GPIO_GENERIC_PLATFORM=y 30 + CONFIG_REGULATOR_GPIO=y 31 + CONFIG_DRM=y 32 + CONFIG_FB_SIMPLE=y 33 + CONFIG_USB=y 34 + CONFIG_USB_XHCI_HCD=y 35 + CONFIG_USB_EHCI_HCD=y 36 + CONFIG_USB_EHCI_MXC=y 37 + CONFIG_USB_EHCI_HCD_PLATFORM=y 38 + CONFIG_USB_STORAGE=y 39 + CONFIG_NOP_USB_XCEIV=y 40 + CONFIG_MMC=y 41 + CONFIG_RTC_CLASS=y 42 + CONFIG_RTC_DRV_PL031=y 43 + CONFIG_DMADEVICES=y 44 + CONFIG_DW_DMAC=y 45 + CONFIG_PL330_DMA=y 46 + CONFIG_PWM=y 47 + CONFIG_EXT4_FS=y 48 + CONFIG_TMPFS=y 49 + CONFIG_NFS_FS=y 50 + CONFIG_NFS_V3_ACL=y 51 + CONFIG_NFS_V4=y 52 + CONFIG_ROOT_NFS=y 53 + CONFIG_PRINTK_TIME=y 54 + CONFIG_DEBUG_FS=y 55 + CONFIG_DEBUG_KERNEL=y 56 + CONFIG_LOCKUP_DETECTOR=y
+2
arch/arm/configs/imx_v4_v5_defconfig
··· 91 91 CONFIG_SMSC_PHY=y 92 92 # CONFIG_INPUT_MOUSEDEV is not set 93 93 CONFIG_INPUT_EVDEV=y 94 + CONFIG_KEYBOARD_GPIO=y 94 95 CONFIG_KEYBOARD_IMX=y 95 96 # CONFIG_INPUT_MOUSE is not set 96 97 CONFIG_INPUT_TOUCHSCREEN=y ··· 119 118 CONFIG_MFD_MC13XXX_SPI=y 120 119 CONFIG_REGULATOR=y 121 120 CONFIG_REGULATOR_FIXED_VOLTAGE=y 121 + CONFIG_REGULATOR_GPIO=y 122 122 CONFIG_REGULATOR_MC13783=y 123 123 CONFIG_REGULATOR_MC13892=y 124 124 CONFIG_MEDIA_SUPPORT=y
+11 -2
arch/arm/configs/imx_v6_v7_defconfig
··· 28 28 CONFIG_MACH_ARMADILLO5X0=y 29 29 CONFIG_MACH_KZM_ARM11_01=y 30 30 CONFIG_MACH_IMX31_DT=y 31 + CONFIG_MACH_IMX35_DT=y 31 32 CONFIG_MACH_PCM043=y 32 33 CONFIG_MACH_MX35_3DS=y 33 34 CONFIG_MACH_VPR200=y 34 35 CONFIG_MACH_IMX51_DT=y 35 36 CONFIG_MACH_EUKREA_CPUIMX51SD=y 37 + CONFIG_SOC_IMX50=y 36 38 CONFIG_SOC_IMX53=y 37 39 CONFIG_SOC_IMX6Q=y 38 40 CONFIG_SOC_IMX6SL=y ··· 43 41 CONFIG_VMSPLIT_2G=y 44 42 CONFIG_PREEMPT_VOLUNTARY=y 45 43 CONFIG_AEABI=y 46 - # CONFIG_OABI_COMPAT is not set 44 + CONFIG_HIGHMEM=y 47 45 CONFIG_CMDLINE="noinitrd console=ttymxc0,115200" 48 46 CONFIG_VFP=y 49 47 CONFIG_NEON=y ··· 91 89 CONFIG_BLK_DEV_LOOP=y 92 90 CONFIG_BLK_DEV_RAM=y 93 91 CONFIG_BLK_DEV_RAM_SIZE=65536 94 - CONFIG_SRAM=y 95 92 CONFIG_EEPROM_AT24=y 96 93 CONFIG_EEPROM_AT25=y 97 94 # CONFIG_SCSI_PROC_FS is not set ··· 119 118 CONFIG_SMC911X=y 120 119 CONFIG_SMSC911X=y 121 120 # CONFIG_NET_VENDOR_STMICRO is not set 121 + CONFIG_AT803X_PHY=y 122 122 CONFIG_BRCMFMAC=m 123 123 # CONFIG_INPUT_MOUSEDEV_PSAUX is not set 124 124 CONFIG_INPUT_EVDEV=y ··· 131 129 CONFIG_INPUT_TOUCHSCREEN=y 132 130 CONFIG_TOUCHSCREEN_EGALAX=y 133 131 CONFIG_TOUCHSCREEN_MC13783=y 132 + CONFIG_TOUCHSCREEN_TSC2007=y 133 + CONFIG_TOUCHSCREEN_STMPE=y 134 134 CONFIG_INPUT_MISC=y 135 135 CONFIG_INPUT_MMA8450=y 136 136 CONFIG_SERIO_SERPORT=m ··· 160 156 CONFIG_MFD_DA9052_I2C=y 161 157 CONFIG_MFD_MC13XXX_SPI=y 162 158 CONFIG_MFD_MC13XXX_I2C=y 159 + CONFIG_MFD_STMPE=y 163 160 CONFIG_REGULATOR=y 164 161 CONFIG_REGULATOR_FIXED_VOLTAGE=y 165 162 CONFIG_REGULATOR_ANATOP=y 166 163 CONFIG_REGULATOR_DA9052=y 167 164 CONFIG_REGULATOR_MC13783=y 168 165 CONFIG_REGULATOR_MC13892=y 166 + CONFIG_REGULATOR_PFUZE100=y 169 167 CONFIG_MEDIA_SUPPORT=y 170 168 CONFIG_MEDIA_CAMERA_SUPPORT=y 169 + CONFIG_MEDIA_RC_SUPPORT=y 170 + CONFIG_RC_DEVICES=y 171 + CONFIG_IR_GPIO_CIR=y 171 172 CONFIG_V4L_PLATFORM_DRIVERS=y 172 173 CONFIG_SOC_CAMERA=y 173 174 CONFIG_VIDEO_MX3=y
+19 -1
arch/arm/configs/keystone_defconfig
··· 115 115 CONFIG_PROC_DEVICETREE=y 116 116 CONFIG_BLK_DEV_LOOP=y 117 117 CONFIG_EEPROM_AT24=y 118 + CONFIG_SCSI=y 119 + CONFIG_BLK_DEV_SD=y 118 120 CONFIG_NETDEVICES=y 119 121 CONFIG_SERIAL_8250=y 120 122 CONFIG_SERIAL_8250_CONSOLE=y ··· 131 129 CONFIG_SPI_SPIDEV=y 132 130 # CONFIG_HWMON is not set 133 131 CONFIG_WATCHDOG=y 134 - # CONFIG_USB_SUPPORT is not set 132 + CONFIG_USB=y 133 + CONFIG_USB_DEBUG=y 134 + CONFIG_USB_ANNOUNCE_NEW_DEVICES=y 135 + CONFIG_USB_MON=y 136 + CONFIG_USB_XHCI_HCD=y 137 + CONFIG_USB_STORAGE=y 138 + CONFIG_USB_DWC3=y 139 + CONFIG_USB_DWC3_DEBUG=y 140 + CONFIG_USB_DWC3_VERBOSE=y 141 + CONFIG_KEYSTONE_USB_PHY=y 135 142 CONFIG_DMADEVICES=y 136 143 CONFIG_COMMON_CLK_DEBUG=y 137 144 CONFIG_MEMORY=y 145 + CONFIG_EXT4_FS=y 146 + CONFIG_EXT4_FS_POSIX_ACL=y 147 + CONFIG_MSDOS_FS=y 148 + CONFIG_VFAT_FS=y 149 + CONFIG_NTFS_FS=y 138 150 CONFIG_TMPFS=y 139 151 CONFIG_JFFS2_FS=y 140 152 CONFIG_JFFS2_FS_WBUF_VERIFY=y ··· 160 144 CONFIG_NFSD=y 161 145 CONFIG_NFSD_V3=y 162 146 CONFIG_NFSD_V3_ACL=y 147 + CONFIG_NLS_CODEPAGE_437=y 148 + CONFIG_NLS_ISO8859_1=y 163 149 CONFIG_PRINTK_TIME=y 164 150 CONFIG_DEBUG_SHIRQ=y 165 151 CONFIG_DEBUG_INFO=y
+1 -1
arch/arm/configs/koelsch_defconfig
··· 9 9 CONFIG_PERF_EVENTS=y 10 10 CONFIG_SLAB=y 11 11 # CONFIG_BLOCK is not set 12 - CONFIG_ARCH_SHMOBILE=y 12 + CONFIG_ARCH_SHMOBILE_LEGACY=y 13 13 CONFIG_ARCH_R8A7791=y 14 14 CONFIG_MACH_KOELSCH=y 15 15 # CONFIG_SWP_EMULATE is not set
+1 -1
arch/arm/configs/kzm9d_defconfig
··· 13 13 # CONFIG_BLK_DEV_BSG is not set 14 14 # CONFIG_IOSCHED_DEADLINE is not set 15 15 # CONFIG_IOSCHED_CFQ is not set 16 - CONFIG_ARCH_SHMOBILE=y 16 + CONFIG_ARCH_SHMOBILE_LEGACY=y 17 17 CONFIG_ARCH_EMEV2=y 18 18 CONFIG_MACH_KZM9D=y 19 19 CONFIG_MEMORY_START=0x40000000
+1 -1
arch/arm/configs/kzm9g_defconfig
··· 22 22 # CONFIG_BLK_DEV_BSG is not set 23 23 # CONFIG_IOSCHED_DEADLINE is not set 24 24 # CONFIG_IOSCHED_CFQ is not set 25 - CONFIG_ARCH_SHMOBILE=y 25 + CONFIG_ARCH_SHMOBILE_LEGACY=y 26 26 CONFIG_ARCH_SH73A0=y 27 27 CONFIG_MACH_KZM9G=y 28 28 CONFIG_MEMORY_START=0x41000000
+1 -1
arch/arm/configs/lager_defconfig
··· 12 12 # CONFIG_BLK_DEV_BSG is not set 13 13 # CONFIG_IOSCHED_DEADLINE is not set 14 14 # CONFIG_IOSCHED_CFQ is not set 15 - CONFIG_ARCH_SHMOBILE=y 15 + CONFIG_ARCH_SHMOBILE_LEGACY=y 16 16 CONFIG_ARCH_R8A7790=y 17 17 CONFIG_MACH_LAGER=y 18 18 # CONFIG_SH_TIMER_TMU is not set
+1 -1
arch/arm/configs/mackerel_defconfig
··· 14 14 # CONFIG_BLK_DEV_BSG is not set 15 15 # CONFIG_IOSCHED_DEADLINE is not set 16 16 # CONFIG_IOSCHED_CFQ is not set 17 - CONFIG_ARCH_SHMOBILE=y 17 + CONFIG_ARCH_SHMOBILE_LEGACY=y 18 18 CONFIG_ARCH_SH7372=y 19 19 CONFIG_MACH_MACKEREL=y 20 20 CONFIG_MEMORY_SIZE=0x10000000
+1 -1
arch/arm/configs/marzen_defconfig
··· 9 9 CONFIG_EMBEDDED=y 10 10 CONFIG_SLAB=y 11 11 # CONFIG_IOSCHED_CFQ is not set 12 - CONFIG_ARCH_SHMOBILE=y 12 + CONFIG_ARCH_SHMOBILE_LEGACY=y 13 13 CONFIG_ARCH_R8A7779=y 14 14 CONFIG_MACH_MARZEN=y 15 15 CONFIG_MEMORY_START=0x60000000
+149
arch/arm/configs/moxart_defconfig
··· 1 + # CONFIG_LOCALVERSION_AUTO is not set 2 + # CONFIG_SWAP is not set 3 + CONFIG_SYSVIPC=y 4 + CONFIG_NO_HZ=y 5 + CONFIG_IKCONFIG=y 6 + CONFIG_IKCONFIG_PROC=y 7 + CONFIG_SYSCTL_SYSCALL=y 8 + # CONFIG_ELF_CORE is not set 9 + # CONFIG_BASE_FULL is not set 10 + # CONFIG_SIGNALFD is not set 11 + # CONFIG_TIMERFD is not set 12 + # CONFIG_EVENTFD is not set 13 + # CONFIG_AIO is not set 14 + CONFIG_EMBEDDED=y 15 + # CONFIG_VM_EVENT_COUNTERS is not set 16 + # CONFIG_SLUB_DEBUG is not set 17 + # CONFIG_COMPAT_BRK is not set 18 + # CONFIG_LBDAF is not set 19 + # CONFIG_BLK_DEV_BSG is not set 20 + # CONFIG_IOSCHED_DEADLINE is not set 21 + CONFIG_ARCH_MULTI_V4T=y 22 + # CONFIG_ARCH_MULTI_V7 is not set 23 + CONFIG_KEYBOARD_GPIO_POLLED=y 24 + CONFIG_ARCH_MOXART=y 25 + CONFIG_MACH_UC7112LX=y 26 + CONFIG_PREEMPT=y 27 + CONFIG_AEABI=y 28 + # CONFIG_ATAGS is not set 29 + CONFIG_ARM_APPENDED_DTB=y 30 + CONFIG_NET=y 31 + CONFIG_PACKET=y 32 + CONFIG_UNIX=y 33 + CONFIG_INET=y 34 + CONFIG_IP_MULTICAST=y 35 + CONFIG_IP_PNP=y 36 + CONFIG_IP_PNP_DHCP=y 37 + # CONFIG_INET_XFRM_MODE_TRANSPORT is not set 38 + # CONFIG_INET_XFRM_MODE_TUNNEL is not set 39 + # CONFIG_INET_XFRM_MODE_BEET is not set 40 + # CONFIG_INET_LRO is not set 41 + # CONFIG_INET_DIAG is not set 42 + # CONFIG_IPV6 is not set 43 + # CONFIG_WIRELESS is not set 44 + CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" 45 + CONFIG_DEVTMPFS=y 46 + CONFIG_DEVTMPFS_MOUNT=y 47 + # CONFIG_PREVENT_FIRMWARE_BUILD is not set 48 + # CONFIG_FW_LOADER is not set 49 + CONFIG_MTD=y 50 + CONFIG_MTD_BLOCK=y 51 + CONFIG_MTD_CFI=y 52 + CONFIG_MTD_CFI_ADV_OPTIONS=y 53 + CONFIG_MTD_CFI_GEOMETRY=y 54 + CONFIG_MTD_CFI_INTELEXT=y 55 + CONFIG_MTD_COMPLEX_MAPPINGS=y 56 + CONFIG_MTD_PHYSMAP=y 57 + CONFIG_MTD_PHYSMAP_OF=y 58 + CONFIG_PROC_DEVICETREE=y 59 + CONFIG_NETDEVICES=y 60 + CONFIG_NETCONSOLE=y 61 + CONFIG_NETCONSOLE_DYNAMIC=y 62 + # CONFIG_NET_VENDOR_ARC is not set 63 + # CONFIG_NET_CADENCE is not set 64 + # CONFIG_NET_VENDOR_BROADCOM is not set 65 + # CONFIG_NET_VENDOR_CIRRUS is not set 66 + # CONFIG_NET_VENDOR_FARADAY is not set 67 + # CONFIG_NET_VENDOR_INTEL is not set 68 + # CONFIG_NET_VENDOR_MARVELL is not set 69 + # CONFIG_NET_VENDOR_MICREL is not set 70 + CONFIG_ARM_MOXART_ETHER=y 71 + # CONFIG_NET_VENDOR_NATSEMI is not set 72 + # CONFIG_NET_VENDOR_SEEQ is not set 73 + # CONFIG_NET_VENDOR_SMSC is not set 74 + # CONFIG_NET_VENDOR_STMICRO is not set 75 + # CONFIG_NET_VENDOR_VIA is not set 76 + # CONFIG_NET_VENDOR_WIZNET is not set 77 + CONFIG_REALTEK_PHY=y 78 + CONFIG_MDIO_MOXART=y 79 + # CONFIG_WLAN is not set 80 + # CONFIG_INPUT_MOUSEDEV is not set 81 + CONFIG_INPUT_EVDEV=y 82 + CONFIG_INPUT_EVBUG=y 83 + # CONFIG_KEYBOARD_ATKBD is not set 84 + # CONFIG_INPUT_MOUSE is not set 85 + # CONFIG_SERIO is not set 86 + # CONFIG_VT is not set 87 + # CONFIG_LEGACY_PTYS is not set 88 + # CONFIG_DEVKMEM is not set 89 + CONFIG_SERIAL_8250=y 90 + CONFIG_SERIAL_8250_CONSOLE=y 91 + CONFIG_SERIAL_8250_NR_UARTS=1 92 + CONFIG_SERIAL_8250_RUNTIME_UARTS=1 93 + CONFIG_SERIAL_8250_EXTENDED=y 94 + CONFIG_SERIAL_8250_SHARE_IRQ=y 95 + CONFIG_SERIAL_OF_PLATFORM=y 96 + # CONFIG_HW_RANDOM is not set 97 + CONFIG_DEBUG_GPIO=y 98 + CONFIG_GPIO_SYSFS=y 99 + CONFIG_GPIO_MOXART=y 100 + CONFIG_POWER_SUPPLY=y 101 + CONFIG_POWER_RESET=y 102 + CONFIG_POWER_RESET_GPIO=y 103 + # CONFIG_HWMON is not set 104 + CONFIG_WATCHDOG=y 105 + CONFIG_WATCHDOG_CORE=y 106 + CONFIG_WATCHDOG_NOWAYOUT=y 107 + CONFIG_MOXART_WDT=y 108 + # CONFIG_USB_SUPPORT is not set 109 + CONFIG_MMC=y 110 + CONFIG_MMC_SDHCI_MOXART=y 111 + CONFIG_NEW_LEDS=y 112 + CONFIG_LEDS_CLASS=y 113 + CONFIG_LEDS_GPIO=y 114 + CONFIG_LEDS_TRIGGER_TIMER=y 115 + CONFIG_LEDS_TRIGGER_ONESHOT=y 116 + CONFIG_LEDS_TRIGGER_HEARTBEAT=y 117 + CONFIG_LEDS_TRIGGER_DEFAULT_ON=y 118 + CONFIG_RTC_CLASS=y 119 + CONFIG_RTC_DRV_MOXART=y 120 + CONFIG_DMADEVICES=y 121 + CONFIG_MOXART_DMA=y 122 + # CONFIG_IOMMU_SUPPORT is not set 123 + CONFIG_EXT3_FS=y 124 + CONFIG_TMPFS=y 125 + CONFIG_CONFIGFS_FS=y 126 + CONFIG_JFFS2_FS=y 127 + CONFIG_PRINTK_TIME=y 128 + CONFIG_DEBUG_INFO=y 129 + # CONFIG_ENABLE_WARN_DEPRECATED is not set 130 + # CONFIG_ENABLE_MUST_CHECK is not set 131 + CONFIG_DEBUG_PAGEALLOC=y 132 + CONFIG_DEBUG_OBJECTS=y 133 + CONFIG_DEBUG_KMEMLEAK=y 134 + CONFIG_DEBUG_STACK_USAGE=y 135 + CONFIG_DEBUG_MEMORY_INIT=y 136 + CONFIG_DEBUG_SHIRQ=y 137 + CONFIG_DETECT_HUNG_TASK=y 138 + # CONFIG_SCHED_DEBUG is not set 139 + # CONFIG_DEBUG_PREEMPT is not set 140 + CONFIG_PROVE_LOCKING=y 141 + CONFIG_DMA_API_DEBUG=y 142 + CONFIG_KGDB=y 143 + CONFIG_DEBUG_LL=y 144 + CONFIG_DEBUG_LL_UART_8250=y 145 + CONFIG_DEBUG_UART_PHYS=0x98200000 146 + CONFIG_DEBUG_UART_VIRT=0xf9820000 147 + CONFIG_EARLY_PRINTK=y 148 + CONFIG_KEYS=y 149 + CONFIG_CRC32_BIT=y
+4 -7
arch/arm/configs/msm_defconfig
··· 17 17 CONFIG_MODULE_FORCE_UNLOAD=y 18 18 CONFIG_MODVERSIONS=y 19 19 CONFIG_PARTITION_ADVANCED=y 20 - CONFIG_ARCH_MSM=y 20 + CONFIG_ARCH_MSM_DT=y 21 21 CONFIG_ARCH_MSM8X60=y 22 22 CONFIG_ARCH_MSM8960=y 23 23 CONFIG_SMP=y ··· 29 29 CONFIG_CC_STACKPROTECTOR=y 30 30 CONFIG_ARM_APPENDED_DTB=y 31 31 CONFIG_ARM_ATAG_DTB_COMPAT=y 32 - CONFIG_AUTO_ZRELADDR=y 33 32 CONFIG_VFP=y 34 33 CONFIG_NEON=y 35 34 # CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set ··· 61 62 CONFIG_SCSI_SCAN_ASYNC=y 62 63 CONFIG_NETDEVICES=y 63 64 CONFIG_DUMMY=y 64 - CONFIG_PHYLIB=y 65 65 CONFIG_SLIP=y 66 66 CONFIG_SLIP_COMPRESSED=y 67 67 CONFIG_SLIP_MODE_SLIP6=y ··· 79 81 CONFIG_SERIAL_MSM=y 80 82 CONFIG_SERIAL_MSM_CONSOLE=y 81 83 CONFIG_HW_RANDOM=y 84 + CONFIG_HW_RANDOM_MSM=y 82 85 CONFIG_I2C=y 83 86 CONFIG_I2C_CHARDEV=y 84 87 CONFIG_SPI=y 85 - CONFIG_SSBI=y 86 88 CONFIG_DEBUG_GPIO=y 87 89 CONFIG_GPIO_SYSFS=y 88 90 CONFIG_POWER_SUPPLY=y ··· 99 101 CONFIG_SND_SOC=y 100 102 CONFIG_HID_BATTERY_STRENGTH=y 101 103 CONFIG_USB=y 102 - CONFIG_USB_PHY=y 103 104 CONFIG_USB_ANNOUNCE_NEW_DEVICES=y 104 105 CONFIG_USB_MON=y 105 106 CONFIG_USB_EHCI_HCD=y ··· 125 128 CONFIG_NFS_V4=y 126 129 CONFIG_CIFS=y 127 130 CONFIG_PRINTK_TIME=y 131 + CONFIG_DYNAMIC_DEBUG=y 132 + CONFIG_DEBUG_INFO=y 128 133 CONFIG_MAGIC_SYSRQ=y 129 134 CONFIG_LOCKUP_DETECTOR=y 130 135 # CONFIG_DETECT_HUNG_TASK is not set 131 136 # CONFIG_SCHED_DEBUG is not set 132 137 CONFIG_TIMER_STATS=y 133 - CONFIG_DEBUG_INFO=y 134 - CONFIG_DYNAMIC_DEBUG=y
+4
arch/arm/configs/multi_v7_defconfig
··· 7 7 CONFIG_MACH_ARMADA_XP=y 8 8 CONFIG_ARCH_BCM=y 9 9 CONFIG_ARCH_BCM_MOBILE=y 10 + CONFIG_ARCH_BERLIN=y 11 + CONFIG_MACH_BERLIN_BG2=y 12 + CONFIG_MACH_BERLIN_BG2CD=y 10 13 CONFIG_GPIO_PCA953X=y 11 14 CONFIG_ARCH_HIGHBANK=y 15 + CONFIG_ARCH_HI3xxx=y 12 16 CONFIG_ARCH_KEYSTONE=y 13 17 CONFIG_ARCH_MXC=y 14 18 CONFIG_MACH_IMX51_DT=y
+1
arch/arm/configs/u8500_defconfig
··· 119 119 CONFIG_ROOT_NFS=y 120 120 CONFIG_NLS_CODEPAGE_437=y 121 121 CONFIG_NLS_ISO8859_1=y 122 + CONFIG_PRINTK_TIME=y 122 123 CONFIG_DEBUG_INFO=y 123 124 CONFIG_DEBUG_FS=y 124 125 CONFIG_MAGIC_SYSRQ=y
+12 -14
arch/arm/configs/versatile_defconfig
··· 1 - CONFIG_ARCH_VERSATILE=y 2 - CONFIG_EXPERIMENTAL=y 3 1 # CONFIG_LOCALVERSION_AUTO is not set 4 2 CONFIG_SYSVIPC=y 5 3 CONFIG_LOG_BUF_SHIFT=14 ··· 5 7 CONFIG_SLAB=y 6 8 CONFIG_MODULES=y 7 9 CONFIG_MODULE_UNLOAD=y 10 + CONFIG_PARTITION_ADVANCED=y 11 + CONFIG_ARCH_VERSATILE=y 8 12 CONFIG_MACH_VERSATILE_AB=y 9 - CONFIG_LEDS=y 10 - CONFIG_LEDS_CPU=y 13 + CONFIG_AEABI=y 14 + CONFIG_OABI_COMPAT=y 11 15 CONFIG_ZBOOT_ROM_TEXT=0x0 12 16 CONFIG_ZBOOT_ROM_BSS=0x0 13 17 CONFIG_CMDLINE="root=1f03 mem=32M" 14 18 CONFIG_FPE_NWFPE=y 15 19 CONFIG_VFP=y 16 - CONFIG_PM=y 17 20 CONFIG_NET=y 18 21 CONFIG_PACKET=y 19 22 CONFIG_UNIX=y ··· 25 26 # CONFIG_INET_DIAG is not set 26 27 # CONFIG_IPV6 is not set 27 28 CONFIG_MTD=y 28 - CONFIG_MTD_PARTITIONS=y 29 29 CONFIG_MTD_CMDLINE_PARTS=y 30 - CONFIG_MTD_CHAR=y 31 30 CONFIG_MTD_BLOCK=y 32 31 CONFIG_MTD_CFI=y 33 32 CONFIG_MTD_CFI_ADV_OPTIONS=y ··· 34 37 CONFIG_BLK_DEV_RAM=y 35 38 CONFIG_EEPROM_LEGACY=m 36 39 CONFIG_NETDEVICES=y 37 - CONFIG_NET_ETHERNET=y 38 40 CONFIG_SMC91X=y 39 41 # CONFIG_SERIO_SERPORT is not set 40 42 CONFIG_SERIO_AMBAKMI=y 43 + CONFIG_LEGACY_PTY_COUNT=16 41 44 CONFIG_SERIAL_8250=m 42 45 CONFIG_SERIAL_8250_EXTENDED=y 43 46 CONFIG_SERIAL_8250_MANY_PORTS=y ··· 45 48 CONFIG_SERIAL_8250_RSA=y 46 49 CONFIG_SERIAL_AMBA_PL011=y 47 50 CONFIG_SERIAL_AMBA_PL011_CONSOLE=y 48 - CONFIG_LEGACY_PTY_COUNT=16 49 51 CONFIG_I2C=y 50 52 CONFIG_I2C_CHARDEV=m 53 + CONFIG_GPIOLIB=y 54 + CONFIG_GPIO_PL061=y 51 55 # CONFIG_HWMON is not set 52 56 CONFIG_FB=y 53 57 CONFIG_FB_ARMCLCD=y 54 58 CONFIG_FRAMEBUFFER_CONSOLE=y 55 - CONFIG_FONTS=y 56 - CONFIG_FONT_ACORN_8x8=y 57 59 CONFIG_SOUND=y 58 60 CONFIG_SND=m 59 61 CONFIG_SND_MIXER_OSS=m ··· 60 64 CONFIG_SND_ARMAACI=m 61 65 CONFIG_MMC=y 62 66 CONFIG_MMC_ARMMMCI=m 67 + CONFIG_NEW_LEDS=y 68 + CONFIG_LEDS_TRIGGER_HEARTBEAT=y 69 + CONFIG_LEDS_TRIGGER_CPU=y 63 70 CONFIG_EXT2_FS=y 64 71 CONFIG_VFAT_FS=m 65 72 CONFIG_JFFS2_FS=y ··· 70 71 CONFIG_MINIX_FS=y 71 72 CONFIG_ROMFS_FS=y 72 73 CONFIG_NFS_FS=y 73 - CONFIG_NFS_V3=y 74 74 CONFIG_ROOT_NFS=y 75 75 CONFIG_NFSD=y 76 76 CONFIG_NFSD_V3=y 77 - CONFIG_PARTITION_ADVANCED=y 78 77 CONFIG_NLS_CODEPAGE_850=m 79 78 CONFIG_NLS_ISO8859_1=m 80 79 CONFIG_MAGIC_SYSRQ=y 81 80 CONFIG_DEBUG_KERNEL=y 82 81 CONFIG_DEBUG_USER=y 83 - CONFIG_DEBUG_ERRORS=y 84 82 CONFIG_DEBUG_LL=y 83 + CONFIG_FONTS=y 84 + CONFIG_FONT_ACORN_8x8=y
+10
arch/arm/include/debug/imx-uart.h
··· 43 43 #define IMX35_UART_BASE_ADDR(n) IMX35_UART##n##_BASE_ADDR 44 44 #define IMX35_UART_BASE(n) IMX35_UART_BASE_ADDR(n) 45 45 46 + #define IMX50_UART1_BASE_ADDR 0x53fbc000 47 + #define IMX50_UART2_BASE_ADDR 0x53fc0000 48 + #define IMX50_UART3_BASE_ADDR 0x5000c000 49 + #define IMX50_UART4_BASE_ADDR 0x53ff0000 50 + #define IMX50_UART5_BASE_ADDR 0x63f90000 51 + #define IMX50_UART_BASE_ADDR(n) IMX50_UART##n##_BASE_ADDR 52 + #define IMX50_UART_BASE(n) IMX50_UART_BASE_ADDR(n) 53 + 46 54 #define IMX51_UART1_BASE_ADDR 0x73fbc000 47 55 #define IMX51_UART2_BASE_ADDR 0x73fc0000 48 56 #define IMX51_UART3_BASE_ADDR 0x7000c000 ··· 93 85 #define UART_PADDR IMX_DEBUG_UART_BASE(IMX31) 94 86 #elif defined(CONFIG_DEBUG_IMX35_UART) 95 87 #define UART_PADDR IMX_DEBUG_UART_BASE(IMX35) 88 + #elif defined(CONFIG_DEBUG_IMX50_UART) 89 + #define UART_PADDR IMX_DEBUG_UART_BASE(IMX50) 96 90 #elif defined(CONFIG_DEBUG_IMX51_UART) 97 91 #define UART_PADDR IMX_DEBUG_UART_BASE(IMX51) 98 92 #elif defined(CONFIG_DEBUG_IMX53_UART)
+5 -29
arch/arm/include/debug/tegra.S
··· 46 46 #define TEGRA_APB_MISC_GP_HIDREV (TEGRA_APB_MISC_BASE + 0x804) 47 47 48 48 /* 49 - * Must be 1MB-aligned since a 1MB mapping is used early on. 49 + * Must be section-aligned since a section mapping is used early on. 50 50 * Must not overlap with regions in mach-tegra/io.c:tegra_io_desc[]. 51 51 */ 52 - #define UART_VIRTUAL_BASE 0xfe100000 52 + #define UART_VIRTUAL_BASE 0xfe800000 53 53 54 54 #define checkuart(rp, rv, lhu, bit, uart) \ 55 55 /* Load address of CLK_RST register */ \ ··· 156 156 92: and \rv, \rp, #0xffffff @ offset within 1MB section 157 157 add \rv, \rv, #UART_VIRTUAL_BASE 158 158 str \rv, [\tmp, #8] @ Store in tegra_uart_virt 159 - movw \rv, #TEGRA_APB_MISC_GP_HIDREV & 0xffff 160 - movt \rv, #TEGRA_APB_MISC_GP_HIDREV >> 16 161 - ldr \rv, [\rv, #0] @ Load HIDREV 162 - ubfx \rv, \rv, #8, #8 @ 15:8 are SoC version 163 - cmp \rv, #0x20 @ Tegra20? 164 - moveq \rv, #0x75 @ Tegra20 divisor 165 - movne \rv, #0xdd @ Tegra30 divisor 166 - str \rv, [\tmp, #12] @ Save divisor to scratch 167 - /* uart[UART_LCR] = UART_LCR_WLEN8 | UART_LCR_DLAB; */ 168 - mov \rv, #UART_LCR_WLEN8 | UART_LCR_DLAB 169 - str \rv, [\rp, #UART_LCR << UART_SHIFT] 170 - /* uart[UART_DLL] = div & 0xff; */ 171 - ldr \rv, [\tmp, #12] 172 - and \rv, \rv, #0xff 173 - str \rv, [\rp, #UART_DLL << UART_SHIFT] 174 - /* uart[UART_DLM] = div >> 8; */ 175 - ldr \rv, [\tmp, #12] 176 - lsr \rv, \rv, #8 177 - str \rv, [\rp, #UART_DLM << UART_SHIFT] 178 - /* uart[UART_LCR] = UART_LCR_WLEN8; */ 179 - mov \rv, #UART_LCR_WLEN8 180 - str \rv, [\rp, #UART_LCR << UART_SHIFT] 181 159 b 100f 182 160 183 161 .align ··· 183 205 cmp \rx, #0 184 206 beq 1002f 185 207 1001: ldrb \rd, [\rx, #UART_LSR << UART_SHIFT] 186 - and \rd, \rd, #UART_LSR_TEMT | UART_LSR_THRE 187 - teq \rd, #UART_LSR_TEMT | UART_LSR_THRE 208 + and \rd, \rd, #UART_LSR_THRE 209 + teq \rd, #UART_LSR_THRE 188 210 bne 1001b 189 211 1002: 190 212 .endm ··· 203 225 /* 204 226 * Storage for the state maintained by the macros above. 205 227 * 206 - * In the kernel proper, this data is located in arch/arm/mach-tegra/common.c. 228 + * In the kernel proper, this data is located in arch/arm/mach-tegra/tegra.c. 207 229 * That's because this header is included from multiple files, and we only 208 230 * want a single copy of the data. In particular, the UART probing code above 209 231 * assumes it's running using physical addresses. This is true when this file ··· 224 246 /* Debug UART physical address */ 225 247 .word 0 226 248 /* Debug UART virtual address */ 227 - .word 0 228 - /* Scratch space for debug macro */ 229 249 .word 0 230 250 #endif
+1 -1
arch/arm/mach-at91/Kconfig
··· 90 90 select HAVE_AT91_USB_CLK 91 91 help 92 92 Select this if you are using one of Atmel's SAMA5D3 family SoC. 93 - This support covers SAMA5D31, SAMA5D33, SAMA5D34, SAMA5D35. 93 + This support covers SAMA5D31, SAMA5D33, SAMA5D34, SAMA5D35, SAMA5D36. 94 94 endif 95 95 96 96 if SOC_SAM_V4_V5
+2 -1
arch/arm/mach-at91/include/mach/cpu.h
··· 53 53 #define ARCH_EXID_SAMA5D33 0x00414300 54 54 #define ARCH_EXID_SAMA5D34 0x00414301 55 55 #define ARCH_EXID_SAMA5D35 0x00584300 56 + #define ARCH_EXID_SAMA5D36 0x00004301 56 57 57 58 #define ARCH_FAMILY_AT91X92 0x09200000 58 59 #define ARCH_FAMILY_AT91SAM9 0x01900000 ··· 106 105 107 106 /* SAMA5D3 */ 108 107 AT91_SOC_SAMA5D31, AT91_SOC_SAMA5D33, AT91_SOC_SAMA5D34, 109 - AT91_SOC_SAMA5D35, 108 + AT91_SOC_SAMA5D35, AT91_SOC_SAMA5D36, 110 109 111 110 /* No subtype for this SoC */ 112 111 AT91_SOC_SUBTYPE_NONE,
+4
arch/arm/mach-at91/setup.c
··· 233 233 case ARCH_EXID_SAMA5D35: 234 234 at91_soc_initdata.subtype = AT91_SOC_SAMA5D35; 235 235 break; 236 + case ARCH_EXID_SAMA5D36: 237 + at91_soc_initdata.subtype = AT91_SOC_SAMA5D36; 238 + break; 236 239 } 237 240 } 238 241 } ··· 278 275 [AT91_SOC_SAMA5D33] = "sama5d33", 279 276 [AT91_SOC_SAMA5D34] = "sama5d34", 280 277 [AT91_SOC_SAMA5D35] = "sama5d35", 278 + [AT91_SOC_SAMA5D36] = "sama5d36", 281 279 [AT91_SOC_SUBTYPE_NONE] = "None", 282 280 [AT91_SOC_SUBTYPE_UNKNOWN] = "Unknown", 283 281 };
+29
arch/arm/mach-berlin/Kconfig
··· 1 + config ARCH_BERLIN 2 + bool "Marvell Berlin SoCs" if ARCH_MULTI_V7 3 + select ARM_GIC 4 + select GENERIC_CLOCKEVENTS 5 + select GENERIC_IRQ_CHIP 6 + select COMMON_CLK 7 + select DW_APB_ICTL 8 + select DW_APB_TIMER_OF 9 + 10 + if ARCH_BERLIN 11 + 12 + menu "Marvell Berlin SoC variants" 13 + 14 + config MACH_BERLIN_BG2 15 + bool "Marvell Armada 1500 (BG2)" 16 + select CACHE_L2X0 17 + select CPU_PJ4B 18 + select HAVE_ARM_TWD if SMP 19 + select HAVE_SMP 20 + 21 + config MACH_BERLIN_BG2CD 22 + bool "Marvell Armada 1500-mini (BG2CD)" 23 + select CACHE_L2X0 24 + select CPU_V7 25 + select HAVE_ARM_TWD if SMP 26 + 27 + endmenu 28 + 29 + endif
+1
arch/arm/mach-berlin/Makefile
··· 1 + obj-y += berlin.o
+39
arch/arm/mach-berlin/berlin.c
··· 1 + /* 2 + * Device Tree support for Marvell Berlin SoCs. 3 + * 4 + * Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> 5 + * 6 + * based on GPL'ed 2.6 kernel sources 7 + * (c) Marvell International Ltd. 8 + * 9 + * This file is licensed under the terms of the GNU General Public 10 + * License version 2. This program is licensed "as is" without any 11 + * warranty of any kind, whether express or implied. 12 + */ 13 + 14 + #include <linux/init.h> 15 + #include <linux/io.h> 16 + #include <linux/kernel.h> 17 + #include <linux/of_platform.h> 18 + #include <asm/hardware/cache-l2x0.h> 19 + #include <asm/mach/arch.h> 20 + 21 + static void __init berlin_init_machine(void) 22 + { 23 + /* 24 + * with DT probing for L2CCs, berlin_init_machine can be removed. 25 + * Note: 88DE3005 (Armada 1500-mini) uses pl310 l2cc 26 + */ 27 + l2x0_of_init(0x70c00000, 0xfeffffff); 28 + of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); 29 + } 30 + 31 + static const char * const berlin_dt_compat[] = { 32 + "marvell,berlin", 33 + NULL, 34 + }; 35 + 36 + DT_MACHINE_START(BERLIN_DT, "Marvell Berlin") 37 + .dt_compat = berlin_dt_compat, 38 + .init_machine = berlin_init_machine, 39 + MACHINE_END
+2 -2
arch/arm/mach-clps711x/common.c
··· 259 259 } while (1); 260 260 } 261 261 262 - static u32 notrace clps711x_sched_clock_read(void) 262 + static u64 notrace clps711x_sched_clock_read(void) 263 263 { 264 264 return ~readw_relaxed(CLPS711X_VIRT_BASE + TC1D); 265 265 } ··· 366 366 tmp = clps_readl(SYSCON1) & ~(SYSCON1_TC1S | SYSCON1_TC1M); 367 367 clps_writel(tmp, SYSCON1); 368 368 369 - setup_sched_clock(clps711x_sched_clock_read, 16, timl); 369 + sched_clock_register(clps711x_sched_clock_read, 16, timl); 370 370 371 371 clocksource_mmio_init(CLPS711X_VIRT_BASE + TC1D, 372 372 "clps711x_clocksource", timl, 300, 16,
+1 -1
arch/arm/mach-davinci/clock.c
··· 133 133 long clk_round_rate(struct clk *clk, unsigned long rate) 134 134 { 135 135 if (clk == NULL || IS_ERR(clk)) 136 - return -EINVAL; 136 + return 0; 137 137 138 138 if (clk->round_rate) 139 139 return clk->round_rate(clk, rate);
+2 -2
arch/arm/mach-davinci/time.c
··· 285 285 /* 286 286 * Overwrite weak default sched_clock with something more precise 287 287 */ 288 - static u32 notrace davinci_read_sched_clock(void) 288 + static u64 notrace davinci_read_sched_clock(void) 289 289 { 290 290 return timer32_read(&timers[TID_CLOCKSOURCE]); 291 291 } ··· 391 391 davinci_clock_tick_rate)) 392 392 printk(err, clocksource_davinci.name); 393 393 394 - setup_sched_clock(davinci_read_sched_clock, 32, 394 + sched_clock_register(davinci_read_sched_clock, 32, 395 395 davinci_clock_tick_rate); 396 396 397 397 /* setup clockevent */
+1
arch/arm/mach-efm32/Makefile
··· 1 + obj-y += dtmachine.o
+3
arch/arm/mach-efm32/Makefile.boot
··· 1 + # Empty file waiting for deletion once Makefile.boot isn't needed any more. 2 + # Patch waits for application at 3 + # http://www.arm.linux.org.uk/developer/patches/viewpatch.php?id=7889/1 .
+15
arch/arm/mach-efm32/dtmachine.c
··· 1 + #include <linux/kernel.h> 2 + 3 + #include <asm/v7m.h> 4 + 5 + #include <asm/mach/arch.h> 6 + 7 + static const char *const efm32gg_compat[] __initconst = { 8 + "efm32,dk3750", 9 + NULL 10 + }; 11 + 12 + DT_MACHINE_START(EFM32DT, "EFM32 (Device Tree Support)") 13 + .dt_compat = efm32gg_compat, 14 + .restart = armv7m_restart, 15 + MACHINE_END
+4
arch/arm/mach-efm32/include/mach/entry-macro.S
··· 1 + /* 2 + * Empty file waiting for deletion once <mach/entry-macro.S> isn't needed any 3 + * more. Patch "ARM: v7-M: drop using mach/entry-macro.S" sitting in next. 4 + */
+3
arch/arm/mach-efm32/include/mach/timex.h
··· 1 + /* 2 + * Empty file waiting for deletion once <mach/timex.h> isn't needed any more. 3 + */
+1
arch/arm/mach-ep93xx/Kconfig
··· 5 5 config EP93XX_SOC_COMMON 6 6 bool 7 7 default y 8 + select SOC_BUS 8 9 select LEDS_GPIO_REGISTER 9 10 10 11 config CRUNCH
+108 -2
arch/arm/mach-ep93xx/core.c
··· 21 21 #include <linux/platform_device.h> 22 22 #include <linux/interrupt.h> 23 23 #include <linux/dma-mapping.h> 24 + #include <linux/sys_soc.h> 24 25 #include <linux/timex.h> 25 26 #include <linux/irq.h> 26 27 #include <linux/io.h> ··· 45 44 #include <linux/platform_data/spi-ep93xx.h> 46 45 #include <mach/gpio-ep93xx.h> 47 46 47 + #include <asm/mach/arch.h> 48 48 #include <asm/mach/map.h> 49 49 #include <asm/mach/time.h> 50 50 ··· 139 137 140 138 static struct irqaction ep93xx_timer_irq = { 141 139 .name = "ep93xx timer", 142 - .flags = IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL, 140 + .flags = IRQF_TIMER | IRQF_IRQPOLL, 143 141 .handler = ep93xx_timer_interrupt, 144 142 }; 145 143 ··· 927 925 } 928 926 EXPORT_SYMBOL(ep93xx_ide_release_gpio); 929 927 930 - void __init ep93xx_init_devices(void) 928 + /************************************************************************* 929 + * EP93xx Security peripheral 930 + *************************************************************************/ 931 + 932 + /* 933 + * The Maverick Key is 256 bits of micro fuses blown at the factory during 934 + * manufacturing to uniquely identify a part. 935 + * 936 + * See: http://arm.cirrus.com/forum/viewtopic.php?t=486&highlight=maverick+key 937 + */ 938 + #define EP93XX_SECURITY_REG(x) (EP93XX_SECURITY_BASE + (x)) 939 + #define EP93XX_SECURITY_SECFLG EP93XX_SECURITY_REG(0x2400) 940 + #define EP93XX_SECURITY_FUSEFLG EP93XX_SECURITY_REG(0x2410) 941 + #define EP93XX_SECURITY_UNIQID EP93XX_SECURITY_REG(0x2440) 942 + #define EP93XX_SECURITY_UNIQCHK EP93XX_SECURITY_REG(0x2450) 943 + #define EP93XX_SECURITY_UNIQVAL EP93XX_SECURITY_REG(0x2460) 944 + #define EP93XX_SECURITY_SECID1 EP93XX_SECURITY_REG(0x2500) 945 + #define EP93XX_SECURITY_SECID2 EP93XX_SECURITY_REG(0x2504) 946 + #define EP93XX_SECURITY_SECCHK1 EP93XX_SECURITY_REG(0x2520) 947 + #define EP93XX_SECURITY_SECCHK2 EP93XX_SECURITY_REG(0x2524) 948 + #define EP93XX_SECURITY_UNIQID2 EP93XX_SECURITY_REG(0x2700) 949 + #define EP93XX_SECURITY_UNIQID3 EP93XX_SECURITY_REG(0x2704) 950 + #define EP93XX_SECURITY_UNIQID4 EP93XX_SECURITY_REG(0x2708) 951 + #define EP93XX_SECURITY_UNIQID5 EP93XX_SECURITY_REG(0x270c) 952 + 953 + static char ep93xx_soc_id[33]; 954 + 955 + static const char __init *ep93xx_get_soc_id(void) 931 956 { 957 + unsigned int id, id2, id3, id4, id5; 958 + 959 + if (__raw_readl(EP93XX_SECURITY_UNIQVAL) != 1) 960 + return "bad Hamming code"; 961 + 962 + id = __raw_readl(EP93XX_SECURITY_UNIQID); 963 + id2 = __raw_readl(EP93XX_SECURITY_UNIQID2); 964 + id3 = __raw_readl(EP93XX_SECURITY_UNIQID3); 965 + id4 = __raw_readl(EP93XX_SECURITY_UNIQID4); 966 + id5 = __raw_readl(EP93XX_SECURITY_UNIQID5); 967 + 968 + if (id != id2) 969 + return "invalid"; 970 + 971 + snprintf(ep93xx_soc_id, sizeof(ep93xx_soc_id), 972 + "%08x%08x%08x%08x", id2, id3, id4, id5); 973 + 974 + return ep93xx_soc_id; 975 + } 976 + 977 + static const char __init *ep93xx_get_soc_rev(void) 978 + { 979 + int rev = ep93xx_chip_revision(); 980 + 981 + switch (rev) { 982 + case EP93XX_CHIP_REV_D0: 983 + return "D0"; 984 + case EP93XX_CHIP_REV_D1: 985 + return "D1"; 986 + case EP93XX_CHIP_REV_E0: 987 + return "E0"; 988 + case EP93XX_CHIP_REV_E1: 989 + return "E1"; 990 + case EP93XX_CHIP_REV_E2: 991 + return "E2"; 992 + default: 993 + return "unknown"; 994 + } 995 + } 996 + 997 + static const char __init *ep93xx_get_machine_name(void) 998 + { 999 + return kasprintf(GFP_KERNEL,"%s", machine_desc->name); 1000 + } 1001 + 1002 + static struct device __init *ep93xx_init_soc(void) 1003 + { 1004 + struct soc_device_attribute *soc_dev_attr; 1005 + struct soc_device *soc_dev; 1006 + 1007 + soc_dev_attr = kzalloc(sizeof(*soc_dev_attr), GFP_KERNEL); 1008 + if (!soc_dev_attr) 1009 + return NULL; 1010 + 1011 + soc_dev_attr->machine = ep93xx_get_machine_name(); 1012 + soc_dev_attr->family = "Cirrus Logic EP93xx"; 1013 + soc_dev_attr->revision = ep93xx_get_soc_rev(); 1014 + soc_dev_attr->soc_id = ep93xx_get_soc_id(); 1015 + 1016 + soc_dev = soc_device_register(soc_dev_attr); 1017 + if (IS_ERR(soc_dev)) { 1018 + kfree(soc_dev_attr->machine); 1019 + kfree(soc_dev_attr); 1020 + return NULL; 1021 + } 1022 + 1023 + return soc_device_to_device(soc_dev); 1024 + } 1025 + 1026 + struct device __init *ep93xx_init_devices(void) 1027 + { 1028 + struct device *parent; 1029 + 932 1030 /* Disallow access to MaverickCrunch initially */ 933 1031 ep93xx_devcfg_clear_bits(EP93XX_SYSCON_DEVCFG_CPENA); 934 1032 ··· 1038 936 EP93XX_SYSCON_DEVCFG_EONIDE | 1039 937 EP93XX_SYSCON_DEVCFG_GONIDE | 1040 938 EP93XX_SYSCON_DEVCFG_HONIDE); 939 + 940 + parent = ep93xx_init_soc(); 1041 941 1042 942 /* Get the GPIO working early, other devices need it */ 1043 943 platform_device_register(&ep93xx_gpio_device); ··· 1053 949 platform_device_register(&ep93xx_wdt_device); 1054 950 1055 951 gpio_led_register_device(-1, &ep93xx_led_data); 952 + 953 + return parent; 1056 954 } 1057 955 1058 956 void ep93xx_restart(enum reboot_mode mode, const char *cmd)
+2 -1
arch/arm/mach-ep93xx/include/mach/platform.h
··· 6 6 7 7 #include <linux/reboot.h> 8 8 9 + struct device; 9 10 struct i2c_gpio_platform_data; 10 11 struct i2c_board_info; 11 12 struct spi_board_info; ··· 55 54 int ep93xx_ide_acquire_gpio(struct platform_device *pdev); 56 55 void ep93xx_ide_release_gpio(struct platform_device *pdev); 57 56 58 - void ep93xx_init_devices(void); 57 + struct device *ep93xx_init_devices(void); 59 58 extern void ep93xx_timer_init(void); 60 59 61 60 void ep93xx_restart(enum reboot_mode, const char *);
+17
arch/arm/mach-hisi/Kconfig
··· 1 + config ARCH_HI3xxx 2 + bool "Hisilicon Hi36xx/Hi37xx family" if ARCH_MULTI_V7 3 + select ARM_AMBA 4 + select ARM_GIC 5 + select ARM_TIMER_SP804 6 + select ARCH_WANT_OPTIONAL_GPIOLIB 7 + select CACHE_L2X0 8 + select CLKSRC_OF 9 + select GENERIC_CLOCKEVENTS 10 + select HAVE_ARM_SCU 11 + select HAVE_ARM_TWD 12 + select HAVE_SMP 13 + select PINCTRL 14 + select PINCTRL_SINGLE 15 + select SMP 16 + help 17 + Support for Hisilicon Hi36xx/Hi37xx processor family
+7
arch/arm/mach-hisi/Makefile
··· 1 + # 2 + # Makefile for Hisilicon processors family 3 + # 4 + 5 + obj-y += hisilicon.o 6 + obj-$(CONFIG_SMP) += platsmp.o 7 + obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o
+15
arch/arm/mach-hisi/core.h
··· 1 + #ifndef __HISILICON_CORE_H 2 + #define __HISILICON_CORE_H 3 + 4 + #include <linux/reboot.h> 5 + 6 + extern void hi3xxx_set_cpu_jump(int cpu, void *jump_addr); 7 + extern int hi3xxx_get_cpu_jump(int cpu); 8 + extern void secondary_startup(void); 9 + extern struct smp_operations hi3xxx_smp_ops; 10 + 11 + extern void hi3xxx_cpu_die(unsigned int cpu); 12 + extern int hi3xxx_cpu_kill(unsigned int cpu); 13 + extern void hi3xxx_set_cpu(int cpu, bool enable); 14 + 15 + #endif
+90
arch/arm/mach-hisi/hisilicon.c
··· 1 + /* 2 + * (Hisilicon's SoC based) flattened device tree enabled machine 3 + * 4 + * Copyright (c) 2012-2013 Hisilicon Ltd. 5 + * Copyright (c) 2012-2013 Linaro Ltd. 6 + * 7 + * Author: Haojian Zhuang <haojian.zhuang@linaro.org> 8 + * 9 + * This program is free software; you can redistribute it and/or modify 10 + * it under the terms of the GNU General Public License version 2 as 11 + * published by the Free Software Foundation. 12 + */ 13 + 14 + #include <linux/clk-provider.h> 15 + #include <linux/clocksource.h> 16 + #include <linux/irqchip.h> 17 + #include <linux/of_address.h> 18 + #include <linux/of_platform.h> 19 + 20 + #include <asm/proc-fns.h> 21 + 22 + #include <asm/mach/arch.h> 23 + #include <asm/mach/map.h> 24 + 25 + #include "core.h" 26 + 27 + #define HI3620_SYSCTRL_PHYS_BASE 0xfc802000 28 + #define HI3620_SYSCTRL_VIRT_BASE 0xfe802000 29 + 30 + /* 31 + * This table is only for optimization. Since ioremap() could always share 32 + * the same mapping if it's defined as static IO mapping. 33 + * 34 + * Without this table, system could also work. The cost is some virtual address 35 + * spaces wasted since ioremap() may be called multi times for the same 36 + * IO space. 37 + */ 38 + static struct map_desc hi3620_io_desc[] __initdata = { 39 + { 40 + /* sysctrl */ 41 + .pfn = __phys_to_pfn(HI3620_SYSCTRL_PHYS_BASE), 42 + .virtual = HI3620_SYSCTRL_VIRT_BASE, 43 + .length = 0x1000, 44 + .type = MT_DEVICE, 45 + }, 46 + }; 47 + 48 + static void __init hi3620_map_io(void) 49 + { 50 + debug_ll_io_init(); 51 + iotable_init(hi3620_io_desc, ARRAY_SIZE(hi3620_io_desc)); 52 + } 53 + 54 + static void hi3xxx_restart(enum reboot_mode mode, const char *cmd) 55 + { 56 + struct device_node *np; 57 + void __iomem *base; 58 + int offset; 59 + 60 + np = of_find_compatible_node(NULL, NULL, "hisilicon,sysctrl"); 61 + if (!np) { 62 + pr_err("failed to find hisilicon,sysctrl node\n"); 63 + return; 64 + } 65 + base = of_iomap(np, 0); 66 + if (!base) { 67 + pr_err("failed to map address in hisilicon,sysctrl node\n"); 68 + return; 69 + } 70 + if (of_property_read_u32(np, "reboot-offset", &offset) < 0) { 71 + pr_err("failed to find reboot-offset property\n"); 72 + return; 73 + } 74 + writel_relaxed(0xdeadbeef, base + offset); 75 + 76 + while (1) 77 + cpu_do_idle(); 78 + } 79 + 80 + static const char *hi3xxx_compat[] __initconst = { 81 + "hisilicon,hi3620-hi4511", 82 + NULL, 83 + }; 84 + 85 + DT_MACHINE_START(HI3620, "Hisilicon Hi3620 (Flattened Device Tree)") 86 + .map_io = hi3620_map_io, 87 + .dt_compat = hi3xxx_compat, 88 + .smp = smp_ops(hi3xxx_smp_ops), 89 + .restart = hi3xxx_restart, 90 + MACHINE_END
+200
arch/arm/mach-hisi/hotplug.c
··· 1 + /* 2 + * Copyright (c) 2013 Linaro Ltd. 3 + * Copyright (c) 2013 Hisilicon Limited. 4 + * 5 + * This program is free software; you can redistribute it and/or modify it 6 + * under the terms and conditions of the GNU General Public License, 7 + * version 2, as published by the Free Software Foundation. 8 + */ 9 + 10 + #include <linux/cpu.h> 11 + #include <linux/delay.h> 12 + #include <linux/io.h> 13 + #include <linux/of_address.h> 14 + #include <linux/of_platform.h> 15 + #include <asm/cacheflush.h> 16 + #include <asm/smp_plat.h> 17 + #include "core.h" 18 + 19 + /* Sysctrl registers in Hi3620 SoC */ 20 + #define SCISOEN 0xc0 21 + #define SCISODIS 0xc4 22 + #define SCPERPWREN 0xd0 23 + #define SCPERPWRDIS 0xd4 24 + #define SCCPUCOREEN 0xf4 25 + #define SCCPUCOREDIS 0xf8 26 + #define SCPERCTRL0 0x200 27 + #define SCCPURSTEN 0x410 28 + #define SCCPURSTDIS 0x414 29 + 30 + /* 31 + * bit definition in SCISOEN/SCPERPWREN/... 32 + * 33 + * CPU2_ISO_CTRL (1 << 5) 34 + * CPU3_ISO_CTRL (1 << 6) 35 + * ... 36 + */ 37 + #define CPU2_ISO_CTRL (1 << 5) 38 + 39 + /* 40 + * bit definition in SCPERCTRL0 41 + * 42 + * CPU0_WFI_MASK_CFG (1 << 28) 43 + * CPU1_WFI_MASK_CFG (1 << 29) 44 + * ... 45 + */ 46 + #define CPU0_WFI_MASK_CFG (1 << 28) 47 + 48 + /* 49 + * bit definition in SCCPURSTEN/... 50 + * 51 + * CPU0_SRST_REQ_EN (1 << 0) 52 + * CPU1_SRST_REQ_EN (1 << 1) 53 + * ... 54 + */ 55 + #define CPU0_HPM_SRST_REQ_EN (1 << 22) 56 + #define CPU0_DBG_SRST_REQ_EN (1 << 12) 57 + #define CPU0_NEON_SRST_REQ_EN (1 << 4) 58 + #define CPU0_SRST_REQ_EN (1 << 0) 59 + 60 + enum { 61 + HI3620_CTRL, 62 + ERROR_CTRL, 63 + }; 64 + 65 + static void __iomem *ctrl_base; 66 + static int id; 67 + 68 + static void set_cpu_hi3620(int cpu, bool enable) 69 + { 70 + u32 val = 0; 71 + 72 + if (enable) { 73 + /* MTCMOS set */ 74 + if ((cpu == 2) || (cpu == 3)) 75 + writel_relaxed(CPU2_ISO_CTRL << (cpu - 2), 76 + ctrl_base + SCPERPWREN); 77 + udelay(100); 78 + 79 + /* Enable core */ 80 + writel_relaxed(0x01 << cpu, ctrl_base + SCCPUCOREEN); 81 + 82 + /* unreset */ 83 + val = CPU0_DBG_SRST_REQ_EN | CPU0_NEON_SRST_REQ_EN 84 + | CPU0_SRST_REQ_EN; 85 + writel_relaxed(val << cpu, ctrl_base + SCCPURSTDIS); 86 + /* reset */ 87 + val |= CPU0_HPM_SRST_REQ_EN; 88 + writel_relaxed(val << cpu, ctrl_base + SCCPURSTEN); 89 + 90 + /* ISO disable */ 91 + if ((cpu == 2) || (cpu == 3)) 92 + writel_relaxed(CPU2_ISO_CTRL << (cpu - 2), 93 + ctrl_base + SCISODIS); 94 + udelay(1); 95 + 96 + /* WFI Mask */ 97 + val = readl_relaxed(ctrl_base + SCPERCTRL0); 98 + val &= ~(CPU0_WFI_MASK_CFG << cpu); 99 + writel_relaxed(val, ctrl_base + SCPERCTRL0); 100 + 101 + /* Unreset */ 102 + val = CPU0_DBG_SRST_REQ_EN | CPU0_NEON_SRST_REQ_EN 103 + | CPU0_SRST_REQ_EN | CPU0_HPM_SRST_REQ_EN; 104 + writel_relaxed(val << cpu, ctrl_base + SCCPURSTDIS); 105 + } else { 106 + /* wfi mask */ 107 + val = readl_relaxed(ctrl_base + SCPERCTRL0); 108 + val |= (CPU0_WFI_MASK_CFG << cpu); 109 + writel_relaxed(val, ctrl_base + SCPERCTRL0); 110 + 111 + /* disable core*/ 112 + writel_relaxed(0x01 << cpu, ctrl_base + SCCPUCOREDIS); 113 + 114 + if ((cpu == 2) || (cpu == 3)) { 115 + /* iso enable */ 116 + writel_relaxed(CPU2_ISO_CTRL << (cpu - 2), 117 + ctrl_base + SCISOEN); 118 + udelay(1); 119 + } 120 + 121 + /* reset */ 122 + val = CPU0_DBG_SRST_REQ_EN | CPU0_NEON_SRST_REQ_EN 123 + | CPU0_SRST_REQ_EN | CPU0_HPM_SRST_REQ_EN; 124 + writel_relaxed(val << cpu, ctrl_base + SCCPURSTEN); 125 + 126 + if ((cpu == 2) || (cpu == 3)) { 127 + /* MTCMOS unset */ 128 + writel_relaxed(CPU2_ISO_CTRL << (cpu - 2), 129 + ctrl_base + SCPERPWRDIS); 130 + udelay(100); 131 + } 132 + } 133 + } 134 + 135 + static int hi3xxx_hotplug_init(void) 136 + { 137 + struct device_node *node; 138 + 139 + node = of_find_compatible_node(NULL, NULL, "hisilicon,sysctrl"); 140 + if (node) { 141 + ctrl_base = of_iomap(node, 0); 142 + id = HI3620_CTRL; 143 + return 0; 144 + } 145 + id = ERROR_CTRL; 146 + return -ENOENT; 147 + } 148 + 149 + void hi3xxx_set_cpu(int cpu, bool enable) 150 + { 151 + if (!ctrl_base) { 152 + if (hi3xxx_hotplug_init() < 0) 153 + return; 154 + } 155 + 156 + if (id == HI3620_CTRL) 157 + set_cpu_hi3620(cpu, enable); 158 + } 159 + 160 + static inline void cpu_enter_lowpower(void) 161 + { 162 + unsigned int v; 163 + 164 + flush_cache_all(); 165 + 166 + /* 167 + * Turn off coherency and L1 D-cache 168 + */ 169 + asm volatile( 170 + " mrc p15, 0, %0, c1, c0, 1\n" 171 + " bic %0, %0, #0x40\n" 172 + " mcr p15, 0, %0, c1, c0, 1\n" 173 + " mrc p15, 0, %0, c1, c0, 0\n" 174 + " bic %0, %0, #0x04\n" 175 + " mcr p15, 0, %0, c1, c0, 0\n" 176 + : "=&r" (v) 177 + : "r" (0) 178 + : "cc"); 179 + } 180 + 181 + void hi3xxx_cpu_die(unsigned int cpu) 182 + { 183 + cpu_enter_lowpower(); 184 + hi3xxx_set_cpu_jump(cpu, phys_to_virt(0)); 185 + cpu_do_idle(); 186 + 187 + /* We should have never returned from idle */ 188 + panic("cpu %d unexpectedly exit from shutdown\n", cpu); 189 + } 190 + 191 + int hi3xxx_cpu_kill(unsigned int cpu) 192 + { 193 + unsigned long timeout = jiffies + msecs_to_jiffies(50); 194 + 195 + while (hi3xxx_get_cpu_jump(cpu)) 196 + if (time_after(jiffies, timeout)) 197 + return 0; 198 + hi3xxx_set_cpu(cpu, false); 199 + return 1; 200 + }
+89
arch/arm/mach-hisi/platsmp.c
··· 1 + /* 2 + * Copyright (c) 2013 Linaro Ltd. 3 + * Copyright (c) 2013 Hisilicon Limited. 4 + * Based on arch/arm/mach-vexpress/platsmp.c, Copyright (C) 2002 ARM Ltd. 5 + * 6 + * This program is free software; you can redistribute it and/or modify it 7 + * under the terms and conditions of the GNU General Public License, 8 + * version 2, as published by the Free Software Foundation. 9 + */ 10 + #include <linux/smp.h> 11 + #include <linux/io.h> 12 + #include <linux/of_address.h> 13 + 14 + #include <asm/cacheflush.h> 15 + #include <asm/smp_plat.h> 16 + #include <asm/smp_scu.h> 17 + 18 + #include "core.h" 19 + 20 + static void __iomem *ctrl_base; 21 + 22 + void hi3xxx_set_cpu_jump(int cpu, void *jump_addr) 23 + { 24 + cpu = cpu_logical_map(cpu); 25 + if (!cpu || !ctrl_base) 26 + return; 27 + writel_relaxed(virt_to_phys(jump_addr), ctrl_base + ((cpu - 1) << 2)); 28 + } 29 + 30 + int hi3xxx_get_cpu_jump(int cpu) 31 + { 32 + cpu = cpu_logical_map(cpu); 33 + if (!cpu || !ctrl_base) 34 + return 0; 35 + return readl_relaxed(ctrl_base + ((cpu - 1) << 2)); 36 + } 37 + 38 + static void __init hi3xxx_smp_prepare_cpus(unsigned int max_cpus) 39 + { 40 + struct device_node *np = NULL; 41 + unsigned long base = 0; 42 + u32 offset = 0; 43 + void __iomem *scu_base = NULL; 44 + 45 + if (scu_a9_has_base()) { 46 + base = scu_a9_get_base(); 47 + scu_base = ioremap(base, SZ_4K); 48 + if (!scu_base) { 49 + pr_err("ioremap(scu_base) failed\n"); 50 + return; 51 + } 52 + scu_enable(scu_base); 53 + iounmap(scu_base); 54 + } 55 + if (!ctrl_base) { 56 + np = of_find_compatible_node(NULL, NULL, "hisilicon,sysctrl"); 57 + if (!np) { 58 + pr_err("failed to find hisilicon,sysctrl node\n"); 59 + return; 60 + } 61 + ctrl_base = of_iomap(np, 0); 62 + if (!ctrl_base) { 63 + pr_err("failed to map address\n"); 64 + return; 65 + } 66 + if (of_property_read_u32(np, "smp-offset", &offset) < 0) { 67 + pr_err("failed to find smp-offset property\n"); 68 + return; 69 + } 70 + ctrl_base += offset; 71 + } 72 + } 73 + 74 + static int hi3xxx_boot_secondary(unsigned int cpu, struct task_struct *idle) 75 + { 76 + hi3xxx_set_cpu(cpu, true); 77 + hi3xxx_set_cpu_jump(cpu, secondary_startup); 78 + arch_send_wakeup_ipi_mask(cpumask_of(cpu)); 79 + return 0; 80 + } 81 + 82 + struct smp_operations hi3xxx_smp_ops __initdata = { 83 + .smp_prepare_cpus = hi3xxx_smp_prepare_cpus, 84 + .smp_boot_secondary = hi3xxx_boot_secondary, 85 + #ifdef CONFIG_HOTPLUG_CPU 86 + .cpu_die = hi3xxx_cpu_die, 87 + .cpu_kill = hi3xxx_cpu_kill, 88 + #endif 89 + };
+20 -15
arch/arm/mach-imx/Kconfig
··· 10 10 select GENERIC_IRQ_CHIP 11 11 select MIGHT_HAVE_CACHE_L2X0 if ARCH_MULTI_V6_V7 12 12 select MULTI_IRQ_HANDLER 13 + select PINCTRL 13 14 select SOC_BUS 14 15 select SPARSE_IRQ 15 16 select USE_OF ··· 19 18 20 19 menu "Freescale i.MX support" 21 20 depends on ARCH_MXC 22 - 23 - config MXC_IRQ_PRIOR 24 - bool "Use IRQ priority" 25 - help 26 - Select this if you want to use prioritized IRQ handling. 27 - This feature prevents higher priority ISR to be interrupted 28 - by lower priority IRQ. 29 - This may be useful in embedded applications, where are strong 30 - requirements for timing. 31 - Say N here, unless you have a specialized requirement. 32 21 33 22 config MXC_TZIC 34 23 bool ··· 99 108 select ARCH_MXC_IOMUX_V3 100 109 select CPU_ARM926T 101 110 select MXC_AVIC 111 + select PINCTRL_IMX25 102 112 103 113 config SOC_IMX27 104 114 bool ··· 109 117 select IMX_HAVE_IOMUX_V1 110 118 select MACH_MX27 111 119 select MXC_AVIC 120 + select PINCTRL_IMX27 112 121 113 122 config SOC_IMX31 114 123 bool ··· 125 132 select HAVE_EPIT 126 133 select MXC_AVIC 127 134 select SMP_ON_UP if SMP 135 + select PINCTRL 128 136 129 137 config SOC_IMX5 130 138 bool ··· 138 144 config SOC_IMX51 139 145 bool 140 146 select HAVE_IMX_SRC 141 - select PINCTRL 142 147 select PINCTRL_IMX51 143 148 select SOC_IMX5 144 149 ··· 611 618 612 619 comment "MX35 platforms:" 613 620 621 + config MACH_IMX35_DT 622 + bool "Support i.MX35 platforms from device tree" 623 + select SOC_IMX35 624 + help 625 + Include support for Freescale i.MX35 based platforms 626 + using the device tree for discovery. 627 + 614 628 config MACH_PCM043 615 629 bool "Support Phytec pcm043 (i.MX35) platforms" 616 630 select IMX_HAVE_PLATFORM_FLEXCAN ··· 765 765 766 766 comment "Device tree only" 767 767 768 + config SOC_IMX50 769 + bool "i.MX50 support" 770 + select HAVE_IMX_SRC 771 + select PINCTRL_IMX50 772 + select SOC_IMX5 773 + 774 + help 775 + This enables support for Freescale i.MX50 processor. 776 + 768 777 config SOC_IMX53 769 778 bool "i.MX53 support" 770 779 select HAVE_IMX_SRC 771 780 select IMX_HAVE_PLATFORM_IMX2_WDT 772 - select PINCTRL 773 781 select PINCTRL_IMX53 774 782 select SOC_IMX5 775 783 ··· 803 795 select MFD_SYSCON 804 796 select MIGHT_HAVE_PCI 805 797 select PCI_DOMAINS if PCI 806 - select PINCTRL 807 798 select PINCTRL_IMX6Q 808 799 select PL310_ERRATA_588369 if CACHE_PL310 809 800 select PL310_ERRATA_727915 if CACHE_PL310 ··· 823 816 select HAVE_IMX_MMDC 824 817 select HAVE_IMX_SRC 825 818 select MFD_SYSCON 826 - select PINCTRL 827 819 select PINCTRL_IMX6SL 828 820 select PL310_ERRATA_588369 if CACHE_PL310 829 821 select PL310_ERRATA_727915 if CACHE_PL310 ··· 836 830 select CPU_V7 837 831 select ARM_GIC 838 832 select CLKSRC_OF 839 - select PINCTRL 840 833 select PINCTRL_VF610 841 834 select VF_PIT_TIMER 842 835 select PL310_ERRATA_588369 if CACHE_PL310
+2
arch/arm/mach-imx/Makefile
··· 89 89 obj-$(CONFIG_MACH_EUKREA_CPUIMX35SD) += mach-cpuimx35.o 90 90 obj-$(CONFIG_MACH_EUKREA_MBIMXSD35_BASEBOARD) += eukrea_mbimxsd35-baseboard.o 91 91 obj-$(CONFIG_MACH_VPR200) += mach-vpr200.o 92 + obj-$(CONFIG_MACH_IMX35_DT) += imx35-dt.o 92 93 93 94 obj-$(CONFIG_HAVE_IMX_ANATOP) += anatop.o 94 95 obj-$(CONFIG_HAVE_IMX_GPC) += gpc.o ··· 113 112 obj-$(CONFIG_MACH_EUKREA_MBIMXSD51_BASEBOARD) += eukrea_mbimxsd51-baseboard.o 114 113 115 114 obj-$(CONFIG_MACH_IMX51_DT) += imx51-dt.o 115 + obj-$(CONFIG_SOC_IMX50) += mach-imx50.o 116 116 obj-$(CONFIG_SOC_IMX53) += mach-imx53.o 117 117 118 118 obj-$(CONFIG_SOC_VF610) += clk-vf610.o mach-vf610.o
-25
arch/arm/mach-imx/avic.c
··· 54 54 static void __iomem *avic_base; 55 55 static struct irq_domain *domain; 56 56 57 - #ifdef CONFIG_MXC_IRQ_PRIOR 58 - static int avic_irq_set_priority(unsigned char irq, unsigned char prio) 59 - { 60 - struct irq_data *d = irq_get_irq_data(irq); 61 - unsigned int temp; 62 - unsigned int mask = 0x0F << irq % 8 * 4; 63 - 64 - irq = d->hwirq; 65 - 66 - if (irq >= AVIC_NUM_IRQS) 67 - return -EINVAL; 68 - 69 - temp = __raw_readl(avic_base + AVIC_NIPRIORITY(irq / 8)); 70 - temp &= ~mask; 71 - temp |= prio & mask; 72 - 73 - __raw_writel(temp, avic_base + AVIC_NIPRIORITY(irq / 8)); 74 - 75 - return 0; 76 - } 77 - #endif 78 - 79 57 #ifdef CONFIG_FIQ 80 58 static int avic_set_irq_fiq(unsigned int irq, unsigned int type) 81 59 { ··· 80 102 81 103 82 104 static struct mxc_extra_irq avic_extra_irq = { 83 - #ifdef CONFIG_MXC_IRQ_PRIOR 84 - .set_priority = avic_irq_set_priority, 85 - #endif 86 105 #ifdef CONFIG_FIQ 87 106 .set_irq_fiq = avic_set_irq_fiq, 88 107 #endif
+1 -1
arch/arm/mach-imx/clk-gate2.c
··· 72 72 73 73 reg = readl(gate->reg); 74 74 75 - if (((reg >> gate->bit_idx) & 3) == 3) 75 + if (((reg >> gate->bit_idx) & 1) == 1) 76 76 return 1; 77 77 78 78 return 0;
+14
arch/arm/mach-imx/clk-imx35.c
··· 45 45 static char hsp_div_532[] = { 4, 8, 3, 0 }; 46 46 static char hsp_div_400[] = { 3, 6, 3, 0 }; 47 47 48 + static struct clk_onecell_data clk_data; 49 + 48 50 static const char *std_sel[] = {"ppll", "arm"}; 49 51 static const char *ipg_per_sel[] = {"ahb_per_div", "arm_per_div"}; 50 52 ··· 288 286 289 287 return 0; 290 288 } 289 + 290 + static int __init mx35_clocks_init_dt(struct device_node *ccm_node) 291 + { 292 + clk_data.clks = clk; 293 + clk_data.clk_num = ARRAY_SIZE(clk); 294 + of_clk_add_provider(ccm_node, of_clk_src_onecell_get, &clk_data); 295 + 296 + mx35_clocks_init(); 297 + 298 + return 0; 299 + } 300 + CLK_OF_DECLARE(imx35, "fsl,imx35-ccm", mx35_clocks_init_dt);
+406 -382
arch/arm/mach-imx/clk-imx51-imx53.c
··· 12 12 #include <linux/io.h> 13 13 #include <linux/clkdev.h> 14 14 #include <linux/clk-provider.h> 15 - #include <linux/of.h> 16 15 #include <linux/err.h> 17 16 #include <linux/of.h> 18 17 #include <linux/of_address.h> 19 18 #include <linux/of_irq.h> 19 + #include <dt-bindings/clock/imx5-clock.h> 20 20 21 21 #include "crm-regs-imx5.h" 22 22 #include "clk.h" ··· 83 83 static const char *spdif0_com_sel[] = { "spdif0_podf", "ssi1_root_gate", }; 84 84 static const char *mx51_spdif1_com_sel[] = { "spdif1_podf", "ssi2_root_gate", }; 85 85 86 - 87 - enum imx5_clks { 88 - dummy, ckil, osc, ckih1, ckih2, ahb, ipg, axi_a, axi_b, uart_pred, 89 - uart_root, esdhc_a_pred, esdhc_b_pred, esdhc_c_s, esdhc_d_s, 90 - emi_sel, emi_slow_podf, nfc_podf, ecspi_pred, ecspi_podf, usboh3_pred, 91 - usboh3_podf, usb_phy_pred, usb_phy_podf, cpu_podf, di_pred, tve_di_unused, 92 - tve_s, uart1_ipg_gate, uart1_per_gate, uart2_ipg_gate, 93 - uart2_per_gate, uart3_ipg_gate, uart3_per_gate, i2c1_gate, i2c2_gate, 94 - gpt_ipg_gate, pwm1_ipg_gate, pwm1_hf_gate, pwm2_ipg_gate, pwm2_hf_gate, 95 - gpt_hf_gate, fec_gate, usboh3_per_gate, esdhc1_ipg_gate, esdhc2_ipg_gate, 96 - esdhc3_ipg_gate, esdhc4_ipg_gate, ssi1_ipg_gate, ssi2_ipg_gate, 97 - ssi3_ipg_gate, ecspi1_ipg_gate, ecspi1_per_gate, ecspi2_ipg_gate, 98 - ecspi2_per_gate, cspi_ipg_gate, sdma_gate, emi_slow_gate, ipu_s, 99 - ipu_gate, nfc_gate, ipu_di1_gate, vpu_s, vpu_gate, 100 - vpu_reference_gate, uart4_ipg_gate, uart4_per_gate, uart5_ipg_gate, 101 - uart5_per_gate, tve_gate, tve_pred, esdhc1_per_gate, esdhc2_per_gate, 102 - esdhc3_per_gate, esdhc4_per_gate, usb_phy_gate, hsi2c_gate, 103 - mipi_hsc1_gate, mipi_hsc2_gate, mipi_esc_gate, mipi_hsp_gate, 104 - ldb_di1_div_3_5, ldb_di1_div, ldb_di0_div_3_5, ldb_di0_div, 105 - ldb_di1_gate, can2_serial_gate, can2_ipg_gate, i2c3_gate, lp_apm, 106 - periph_apm, main_bus, ahb_max, aips_tz1, aips_tz2, tmax1, tmax2, 107 - tmax3, spba, uart_sel, esdhc_a_sel, esdhc_b_sel, esdhc_a_podf, 108 - esdhc_b_podf, ecspi_sel, usboh3_sel, usb_phy_sel, iim_gate, 109 - usboh3_gate, emi_fast_gate, ipu_di0_gate,gpc_dvfs, pll1_sw, pll2_sw, 110 - pll3_sw, ipu_di0_sel, ipu_di1_sel, tve_ext_sel, mx51_mipi, pll4_sw, 111 - ldb_di1_sel, di_pll4_podf, ldb_di0_sel, ldb_di0_gate, usb_phy1_gate, 112 - usb_phy2_gate, per_lp_apm, per_pred1, per_pred2, per_podf, per_root, 113 - ssi_apm, ssi1_root_sel, ssi2_root_sel, ssi3_root_sel, ssi_ext1_sel, 114 - ssi_ext2_sel, ssi_ext1_com_sel, ssi_ext2_com_sel, ssi1_root_pred, 115 - ssi1_root_podf, ssi2_root_pred, ssi2_root_podf, ssi_ext1_pred, 116 - ssi_ext1_podf, ssi_ext2_pred, ssi_ext2_podf, ssi1_root_gate, 117 - ssi2_root_gate, ssi3_root_gate, ssi_ext1_gate, ssi_ext2_gate, 118 - epit1_ipg_gate, epit1_hf_gate, epit2_ipg_gate, epit2_hf_gate, 119 - can_sel, can1_serial_gate, can1_ipg_gate, 120 - owire_gate, gpu3d_s, gpu2d_s, gpu3d_gate, gpu2d_gate, garb_gate, 121 - cko1_sel, cko1_podf, cko1, 122 - cko2_sel, cko2_podf, cko2, 123 - srtc_gate, pata_gate, sata_gate, spdif_xtal_sel, spdif0_sel, 124 - spdif1_sel, spdif0_pred, spdif0_podf, spdif1_pred, spdif1_podf, 125 - spdif0_com_s, spdif1_com_sel, spdif0_gate, spdif1_gate, spdif_ipg_gate, 126 - ocram, clk_max 127 - }; 128 - 129 - static struct clk *clk[clk_max]; 86 + static struct clk *clk[IMX5_CLK_END]; 130 87 static struct clk_onecell_data clk_data; 131 88 132 89 static void __init mx5_clocks_common_init(unsigned long rate_ckil, ··· 92 135 { 93 136 int i; 94 137 95 - clk[dummy] = imx_clk_fixed("dummy", 0); 96 - clk[ckil] = imx_obtain_fixed_clock("ckil", rate_ckil); 97 - clk[osc] = imx_obtain_fixed_clock("osc", rate_osc); 98 - clk[ckih1] = imx_obtain_fixed_clock("ckih1", rate_ckih1); 99 - clk[ckih2] = imx_obtain_fixed_clock("ckih2", rate_ckih2); 138 + clk[IMX5_CLK_DUMMY] = imx_clk_fixed("dummy", 0); 139 + clk[IMX5_CLK_CKIL] = imx_obtain_fixed_clock("ckil", rate_ckil); 140 + clk[IMX5_CLK_OSC] = imx_obtain_fixed_clock("osc", rate_osc); 141 + clk[IMX5_CLK_CKIH1] = imx_obtain_fixed_clock("ckih1", rate_ckih1); 142 + clk[IMX5_CLK_CKIH2] = imx_obtain_fixed_clock("ckih2", rate_ckih2); 100 143 101 - clk[lp_apm] = imx_clk_mux("lp_apm", MXC_CCM_CCSR, 9, 1, 102 - lp_apm_sel, ARRAY_SIZE(lp_apm_sel)); 103 - clk[periph_apm] = imx_clk_mux("periph_apm", MXC_CCM_CBCMR, 12, 2, 104 - periph_apm_sel, ARRAY_SIZE(periph_apm_sel)); 105 - clk[main_bus] = imx_clk_mux("main_bus", MXC_CCM_CBCDR, 25, 1, 106 - main_bus_sel, ARRAY_SIZE(main_bus_sel)); 107 - clk[per_lp_apm] = imx_clk_mux("per_lp_apm", MXC_CCM_CBCMR, 1, 1, 108 - per_lp_apm_sel, ARRAY_SIZE(per_lp_apm_sel)); 109 - clk[per_pred1] = imx_clk_divider("per_pred1", "per_lp_apm", MXC_CCM_CBCDR, 6, 2); 110 - clk[per_pred2] = imx_clk_divider("per_pred2", "per_pred1", MXC_CCM_CBCDR, 3, 3); 111 - clk[per_podf] = imx_clk_divider("per_podf", "per_pred2", MXC_CCM_CBCDR, 0, 3); 112 - clk[per_root] = imx_clk_mux("per_root", MXC_CCM_CBCMR, 0, 1, 113 - per_root_sel, ARRAY_SIZE(per_root_sel)); 114 - clk[ahb] = imx_clk_divider("ahb", "main_bus", MXC_CCM_CBCDR, 10, 3); 115 - clk[ahb_max] = imx_clk_gate2("ahb_max", "ahb", MXC_CCM_CCGR0, 28); 116 - clk[aips_tz1] = imx_clk_gate2("aips_tz1", "ahb", MXC_CCM_CCGR0, 24); 117 - clk[aips_tz2] = imx_clk_gate2("aips_tz2", "ahb", MXC_CCM_CCGR0, 26); 118 - clk[tmax1] = imx_clk_gate2("tmax1", "ahb", MXC_CCM_CCGR1, 0); 119 - clk[tmax2] = imx_clk_gate2("tmax2", "ahb", MXC_CCM_CCGR1, 2); 120 - clk[tmax3] = imx_clk_gate2("tmax3", "ahb", MXC_CCM_CCGR1, 4); 121 - clk[spba] = imx_clk_gate2("spba", "ipg", MXC_CCM_CCGR5, 0); 122 - clk[ipg] = imx_clk_divider("ipg", "ahb", MXC_CCM_CBCDR, 8, 2); 123 - clk[axi_a] = imx_clk_divider("axi_a", "main_bus", MXC_CCM_CBCDR, 16, 3); 124 - clk[axi_b] = imx_clk_divider("axi_b", "main_bus", MXC_CCM_CBCDR, 19, 3); 125 - clk[uart_sel] = imx_clk_mux("uart_sel", MXC_CCM_CSCMR1, 24, 2, 126 - standard_pll_sel, ARRAY_SIZE(standard_pll_sel)); 127 - clk[uart_pred] = imx_clk_divider("uart_pred", "uart_sel", MXC_CCM_CSCDR1, 3, 3); 128 - clk[uart_root] = imx_clk_divider("uart_root", "uart_pred", MXC_CCM_CSCDR1, 0, 3); 144 + clk[IMX5_CLK_PERIPH_APM] = imx_clk_mux("periph_apm", MXC_CCM_CBCMR, 12, 2, 145 + periph_apm_sel, ARRAY_SIZE(periph_apm_sel)); 146 + clk[IMX5_CLK_MAIN_BUS] = imx_clk_mux("main_bus", MXC_CCM_CBCDR, 25, 1, 147 + main_bus_sel, ARRAY_SIZE(main_bus_sel)); 148 + clk[IMX5_CLK_PER_LP_APM] = imx_clk_mux("per_lp_apm", MXC_CCM_CBCMR, 1, 1, 149 + per_lp_apm_sel, ARRAY_SIZE(per_lp_apm_sel)); 150 + clk[IMX5_CLK_PER_PRED1] = imx_clk_divider("per_pred1", "per_lp_apm", MXC_CCM_CBCDR, 6, 2); 151 + clk[IMX5_CLK_PER_PRED2] = imx_clk_divider("per_pred2", "per_pred1", MXC_CCM_CBCDR, 3, 3); 152 + clk[IMX5_CLK_PER_PODF] = imx_clk_divider("per_podf", "per_pred2", MXC_CCM_CBCDR, 0, 3); 153 + clk[IMX5_CLK_PER_ROOT] = imx_clk_mux("per_root", MXC_CCM_CBCMR, 0, 1, 154 + per_root_sel, ARRAY_SIZE(per_root_sel)); 155 + clk[IMX5_CLK_AHB] = imx_clk_divider("ahb", "main_bus", MXC_CCM_CBCDR, 10, 3); 156 + clk[IMX5_CLK_AHB_MAX] = imx_clk_gate2("ahb_max", "ahb", MXC_CCM_CCGR0, 28); 157 + clk[IMX5_CLK_AIPS_TZ1] = imx_clk_gate2("aips_tz1", "ahb", MXC_CCM_CCGR0, 24); 158 + clk[IMX5_CLK_AIPS_TZ2] = imx_clk_gate2("aips_tz2", "ahb", MXC_CCM_CCGR0, 26); 159 + clk[IMX5_CLK_TMAX1] = imx_clk_gate2("tmax1", "ahb", MXC_CCM_CCGR1, 0); 160 + clk[IMX5_CLK_TMAX2] = imx_clk_gate2("tmax2", "ahb", MXC_CCM_CCGR1, 2); 161 + clk[IMX5_CLK_TMAX3] = imx_clk_gate2("tmax3", "ahb", MXC_CCM_CCGR1, 4); 162 + clk[IMX5_CLK_SPBA] = imx_clk_gate2("spba", "ipg", MXC_CCM_CCGR5, 0); 163 + clk[IMX5_CLK_IPG] = imx_clk_divider("ipg", "ahb", MXC_CCM_CBCDR, 8, 2); 164 + clk[IMX5_CLK_AXI_A] = imx_clk_divider("axi_a", "main_bus", MXC_CCM_CBCDR, 16, 3); 165 + clk[IMX5_CLK_AXI_B] = imx_clk_divider("axi_b", "main_bus", MXC_CCM_CBCDR, 19, 3); 166 + clk[IMX5_CLK_UART_SEL] = imx_clk_mux("uart_sel", MXC_CCM_CSCMR1, 24, 2, 167 + standard_pll_sel, ARRAY_SIZE(standard_pll_sel)); 168 + clk[IMX5_CLK_UART_PRED] = imx_clk_divider("uart_pred", "uart_sel", MXC_CCM_CSCDR1, 3, 3); 169 + clk[IMX5_CLK_UART_ROOT] = imx_clk_divider("uart_root", "uart_pred", MXC_CCM_CSCDR1, 0, 3); 129 170 130 - clk[esdhc_a_sel] = imx_clk_mux("esdhc_a_sel", MXC_CCM_CSCMR1, 20, 2, 131 - standard_pll_sel, ARRAY_SIZE(standard_pll_sel)); 132 - clk[esdhc_b_sel] = imx_clk_mux("esdhc_b_sel", MXC_CCM_CSCMR1, 16, 2, 133 - standard_pll_sel, ARRAY_SIZE(standard_pll_sel)); 134 - clk[esdhc_a_pred] = imx_clk_divider("esdhc_a_pred", "esdhc_a_sel", MXC_CCM_CSCDR1, 16, 3); 135 - clk[esdhc_a_podf] = imx_clk_divider("esdhc_a_podf", "esdhc_a_pred", MXC_CCM_CSCDR1, 11, 3); 136 - clk[esdhc_b_pred] = imx_clk_divider("esdhc_b_pred", "esdhc_b_sel", MXC_CCM_CSCDR1, 22, 3); 137 - clk[esdhc_b_podf] = imx_clk_divider("esdhc_b_podf", "esdhc_b_pred", MXC_CCM_CSCDR1, 19, 3); 138 - clk[esdhc_c_s] = imx_clk_mux("esdhc_c_sel", MXC_CCM_CSCMR1, 19, 1, esdhc_c_sel, ARRAY_SIZE(esdhc_c_sel)); 139 - clk[esdhc_d_s] = imx_clk_mux("esdhc_d_sel", MXC_CCM_CSCMR1, 18, 1, esdhc_d_sel, ARRAY_SIZE(esdhc_d_sel)); 171 + clk[IMX5_CLK_ESDHC_A_SEL] = imx_clk_mux("esdhc_a_sel", MXC_CCM_CSCMR1, 20, 2, 172 + standard_pll_sel, ARRAY_SIZE(standard_pll_sel)); 173 + clk[IMX5_CLK_ESDHC_B_SEL] = imx_clk_mux("esdhc_b_sel", MXC_CCM_CSCMR1, 16, 2, 174 + standard_pll_sel, ARRAY_SIZE(standard_pll_sel)); 175 + clk[IMX5_CLK_ESDHC_A_PRED] = imx_clk_divider("esdhc_a_pred", "esdhc_a_sel", MXC_CCM_CSCDR1, 16, 3); 176 + clk[IMX5_CLK_ESDHC_A_PODF] = imx_clk_divider("esdhc_a_podf", "esdhc_a_pred", MXC_CCM_CSCDR1, 11, 3); 177 + clk[IMX5_CLK_ESDHC_B_PRED] = imx_clk_divider("esdhc_b_pred", "esdhc_b_sel", MXC_CCM_CSCDR1, 22, 3); 178 + clk[IMX5_CLK_ESDHC_B_PODF] = imx_clk_divider("esdhc_b_podf", "esdhc_b_pred", MXC_CCM_CSCDR1, 19, 3); 179 + clk[IMX5_CLK_ESDHC_C_SEL] = imx_clk_mux("esdhc_c_sel", MXC_CCM_CSCMR1, 19, 1, esdhc_c_sel, ARRAY_SIZE(esdhc_c_sel)); 180 + clk[IMX5_CLK_ESDHC_D_SEL] = imx_clk_mux("esdhc_d_sel", MXC_CCM_CSCMR1, 18, 1, esdhc_d_sel, ARRAY_SIZE(esdhc_d_sel)); 140 181 141 - clk[emi_sel] = imx_clk_mux("emi_sel", MXC_CCM_CBCDR, 26, 1, 142 - emi_slow_sel, ARRAY_SIZE(emi_slow_sel)); 143 - clk[emi_slow_podf] = imx_clk_divider("emi_slow_podf", "emi_sel", MXC_CCM_CBCDR, 22, 3); 144 - clk[nfc_podf] = imx_clk_divider("nfc_podf", "emi_slow_podf", MXC_CCM_CBCDR, 13, 3); 145 - clk[ecspi_sel] = imx_clk_mux("ecspi_sel", MXC_CCM_CSCMR1, 4, 2, 146 - standard_pll_sel, ARRAY_SIZE(standard_pll_sel)); 147 - clk[ecspi_pred] = imx_clk_divider("ecspi_pred", "ecspi_sel", MXC_CCM_CSCDR2, 25, 3); 148 - clk[ecspi_podf] = imx_clk_divider("ecspi_podf", "ecspi_pred", MXC_CCM_CSCDR2, 19, 6); 149 - clk[usboh3_sel] = imx_clk_mux("usboh3_sel", MXC_CCM_CSCMR1, 22, 2, 150 - standard_pll_sel, ARRAY_SIZE(standard_pll_sel)); 151 - clk[usboh3_pred] = imx_clk_divider("usboh3_pred", "usboh3_sel", MXC_CCM_CSCDR1, 8, 3); 152 - clk[usboh3_podf] = imx_clk_divider("usboh3_podf", "usboh3_pred", MXC_CCM_CSCDR1, 6, 2); 153 - clk[usb_phy_pred] = imx_clk_divider("usb_phy_pred", "pll3_sw", MXC_CCM_CDCDR, 3, 3); 154 - clk[usb_phy_podf] = imx_clk_divider("usb_phy_podf", "usb_phy_pred", MXC_CCM_CDCDR, 0, 3); 155 - clk[usb_phy_sel] = imx_clk_mux("usb_phy_sel", MXC_CCM_CSCMR1, 26, 1, 156 - usb_phy_sel_str, ARRAY_SIZE(usb_phy_sel_str)); 157 - clk[cpu_podf] = imx_clk_divider("cpu_podf", "pll1_sw", MXC_CCM_CACRR, 0, 3); 158 - clk[di_pred] = imx_clk_divider("di_pred", "pll3_sw", MXC_CCM_CDCDR, 6, 3); 159 - clk[iim_gate] = imx_clk_gate2("iim_gate", "ipg", MXC_CCM_CCGR0, 30); 160 - clk[uart1_ipg_gate] = imx_clk_gate2("uart1_ipg_gate", "ipg", MXC_CCM_CCGR1, 6); 161 - clk[uart1_per_gate] = imx_clk_gate2("uart1_per_gate", "uart_root", MXC_CCM_CCGR1, 8); 162 - clk[uart2_ipg_gate] = imx_clk_gate2("uart2_ipg_gate", "ipg", MXC_CCM_CCGR1, 10); 163 - clk[uart2_per_gate] = imx_clk_gate2("uart2_per_gate", "uart_root", MXC_CCM_CCGR1, 12); 164 - clk[uart3_ipg_gate] = imx_clk_gate2("uart3_ipg_gate", "ipg", MXC_CCM_CCGR1, 14); 165 - clk[uart3_per_gate] = imx_clk_gate2("uart3_per_gate", "uart_root", MXC_CCM_CCGR1, 16); 166 - clk[i2c1_gate] = imx_clk_gate2("i2c1_gate", "per_root", MXC_CCM_CCGR1, 18); 167 - clk[i2c2_gate] = imx_clk_gate2("i2c2_gate", "per_root", MXC_CCM_CCGR1, 20); 168 - clk[pwm1_ipg_gate] = imx_clk_gate2("pwm1_ipg_gate", "ipg", MXC_CCM_CCGR2, 10); 169 - clk[pwm1_hf_gate] = imx_clk_gate2("pwm1_hf_gate", "per_root", MXC_CCM_CCGR2, 12); 170 - clk[pwm2_ipg_gate] = imx_clk_gate2("pwm2_ipg_gate", "ipg", MXC_CCM_CCGR2, 14); 171 - clk[pwm2_hf_gate] = imx_clk_gate2("pwm2_hf_gate", "per_root", MXC_CCM_CCGR2, 16); 172 - clk[gpt_ipg_gate] = imx_clk_gate2("gpt_ipg_gate", "ipg", MXC_CCM_CCGR2, 18); 173 - clk[gpt_hf_gate] = imx_clk_gate2("gpt_hf_gate", "per_root", MXC_CCM_CCGR2, 20); 174 - clk[fec_gate] = imx_clk_gate2("fec_gate", "ipg", MXC_CCM_CCGR2, 24); 175 - clk[usboh3_gate] = imx_clk_gate2("usboh3_gate", "ipg", MXC_CCM_CCGR2, 26); 176 - clk[usboh3_per_gate] = imx_clk_gate2("usboh3_per_gate", "usboh3_podf", MXC_CCM_CCGR2, 28); 177 - clk[esdhc1_ipg_gate] = imx_clk_gate2("esdhc1_ipg_gate", "ipg", MXC_CCM_CCGR3, 0); 178 - clk[esdhc2_ipg_gate] = imx_clk_gate2("esdhc2_ipg_gate", "ipg", MXC_CCM_CCGR3, 4); 179 - clk[esdhc3_ipg_gate] = imx_clk_gate2("esdhc3_ipg_gate", "ipg", MXC_CCM_CCGR3, 8); 180 - clk[esdhc4_ipg_gate] = imx_clk_gate2("esdhc4_ipg_gate", "ipg", MXC_CCM_CCGR3, 12); 181 - clk[ssi1_ipg_gate] = imx_clk_gate2("ssi1_ipg_gate", "ipg", MXC_CCM_CCGR3, 16); 182 - clk[ssi2_ipg_gate] = imx_clk_gate2("ssi2_ipg_gate", "ipg", MXC_CCM_CCGR3, 20); 183 - clk[ssi3_ipg_gate] = imx_clk_gate2("ssi3_ipg_gate", "ipg", MXC_CCM_CCGR3, 24); 184 - clk[ecspi1_ipg_gate] = imx_clk_gate2("ecspi1_ipg_gate", "ipg", MXC_CCM_CCGR4, 18); 185 - clk[ecspi1_per_gate] = imx_clk_gate2("ecspi1_per_gate", "ecspi_podf", MXC_CCM_CCGR4, 20); 186 - clk[ecspi2_ipg_gate] = imx_clk_gate2("ecspi2_ipg_gate", "ipg", MXC_CCM_CCGR4, 22); 187 - clk[ecspi2_per_gate] = imx_clk_gate2("ecspi2_per_gate", "ecspi_podf", MXC_CCM_CCGR4, 24); 188 - clk[cspi_ipg_gate] = imx_clk_gate2("cspi_ipg_gate", "ipg", MXC_CCM_CCGR4, 26); 189 - clk[sdma_gate] = imx_clk_gate2("sdma_gate", "ipg", MXC_CCM_CCGR4, 30); 190 - clk[emi_fast_gate] = imx_clk_gate2("emi_fast_gate", "dummy", MXC_CCM_CCGR5, 14); 191 - clk[emi_slow_gate] = imx_clk_gate2("emi_slow_gate", "emi_slow_podf", MXC_CCM_CCGR5, 16); 192 - clk[ipu_s] = imx_clk_mux("ipu_sel", MXC_CCM_CBCMR, 6, 2, ipu_sel, ARRAY_SIZE(ipu_sel)); 193 - clk[ipu_gate] = imx_clk_gate2("ipu_gate", "ipu_sel", MXC_CCM_CCGR5, 10); 194 - clk[nfc_gate] = imx_clk_gate2("nfc_gate", "nfc_podf", MXC_CCM_CCGR5, 20); 195 - clk[ipu_di0_gate] = imx_clk_gate2("ipu_di0_gate", "ipu_di0_sel", MXC_CCM_CCGR6, 10); 196 - clk[ipu_di1_gate] = imx_clk_gate2("ipu_di1_gate", "ipu_di1_sel", MXC_CCM_CCGR6, 12); 197 - clk[gpu3d_s] = imx_clk_mux("gpu3d_sel", MXC_CCM_CBCMR, 4, 2, gpu3d_sel, ARRAY_SIZE(gpu3d_sel)); 198 - clk[gpu2d_s] = imx_clk_mux("gpu2d_sel", MXC_CCM_CBCMR, 16, 2, gpu2d_sel, ARRAY_SIZE(gpu2d_sel)); 199 - clk[gpu3d_gate] = imx_clk_gate2("gpu3d_gate", "gpu3d_sel", MXC_CCM_CCGR5, 2); 200 - clk[garb_gate] = imx_clk_gate2("garb_gate", "axi_a", MXC_CCM_CCGR5, 4); 201 - clk[gpu2d_gate] = imx_clk_gate2("gpu2d_gate", "gpu2d_sel", MXC_CCM_CCGR6, 14); 202 - clk[vpu_s] = imx_clk_mux("vpu_sel", MXC_CCM_CBCMR, 14, 2, vpu_sel, ARRAY_SIZE(vpu_sel)); 203 - clk[vpu_gate] = imx_clk_gate2("vpu_gate", "vpu_sel", MXC_CCM_CCGR5, 6); 204 - clk[vpu_reference_gate] = imx_clk_gate2("vpu_reference_gate", "osc", MXC_CCM_CCGR5, 8); 205 - clk[uart4_ipg_gate] = imx_clk_gate2("uart4_ipg_gate", "ipg", MXC_CCM_CCGR7, 8); 206 - clk[uart4_per_gate] = imx_clk_gate2("uart4_per_gate", "uart_root", MXC_CCM_CCGR7, 10); 207 - clk[uart5_ipg_gate] = imx_clk_gate2("uart5_ipg_gate", "ipg", MXC_CCM_CCGR7, 12); 208 - clk[uart5_per_gate] = imx_clk_gate2("uart5_per_gate", "uart_root", MXC_CCM_CCGR7, 14); 209 - clk[gpc_dvfs] = imx_clk_gate2("gpc_dvfs", "dummy", MXC_CCM_CCGR5, 24); 182 + clk[IMX5_CLK_EMI_SEL] = imx_clk_mux("emi_sel", MXC_CCM_CBCDR, 26, 1, 183 + emi_slow_sel, ARRAY_SIZE(emi_slow_sel)); 184 + clk[IMX5_CLK_EMI_SLOW_PODF] = imx_clk_divider("emi_slow_podf", "emi_sel", MXC_CCM_CBCDR, 22, 3); 185 + clk[IMX5_CLK_NFC_PODF] = imx_clk_divider("nfc_podf", "emi_slow_podf", MXC_CCM_CBCDR, 13, 3); 186 + clk[IMX5_CLK_ECSPI_SEL] = imx_clk_mux("ecspi_sel", MXC_CCM_CSCMR1, 4, 2, 187 + standard_pll_sel, ARRAY_SIZE(standard_pll_sel)); 188 + clk[IMX5_CLK_ECSPI_PRED] = imx_clk_divider("ecspi_pred", "ecspi_sel", MXC_CCM_CSCDR2, 25, 3); 189 + clk[IMX5_CLK_ECSPI_PODF] = imx_clk_divider("ecspi_podf", "ecspi_pred", MXC_CCM_CSCDR2, 19, 6); 190 + clk[IMX5_CLK_USBOH3_SEL] = imx_clk_mux("usboh3_sel", MXC_CCM_CSCMR1, 22, 2, 191 + standard_pll_sel, ARRAY_SIZE(standard_pll_sel)); 192 + clk[IMX5_CLK_USBOH3_PRED] = imx_clk_divider("usboh3_pred", "usboh3_sel", MXC_CCM_CSCDR1, 8, 3); 193 + clk[IMX5_CLK_USBOH3_PODF] = imx_clk_divider("usboh3_podf", "usboh3_pred", MXC_CCM_CSCDR1, 6, 2); 194 + clk[IMX5_CLK_USB_PHY_PRED] = imx_clk_divider("usb_phy_pred", "pll3_sw", MXC_CCM_CDCDR, 3, 3); 195 + clk[IMX5_CLK_USB_PHY_PODF] = imx_clk_divider("usb_phy_podf", "usb_phy_pred", MXC_CCM_CDCDR, 0, 3); 196 + clk[IMX5_CLK_USB_PHY_SEL] = imx_clk_mux("usb_phy_sel", MXC_CCM_CSCMR1, 26, 1, 197 + usb_phy_sel_str, ARRAY_SIZE(usb_phy_sel_str)); 198 + clk[IMX5_CLK_CPU_PODF] = imx_clk_divider("cpu_podf", "pll1_sw", MXC_CCM_CACRR, 0, 3); 199 + clk[IMX5_CLK_DI_PRED] = imx_clk_divider("di_pred", "pll3_sw", MXC_CCM_CDCDR, 6, 3); 200 + clk[IMX5_CLK_IIM_GATE] = imx_clk_gate2("iim_gate", "ipg", MXC_CCM_CCGR0, 30); 201 + clk[IMX5_CLK_UART1_IPG_GATE] = imx_clk_gate2("uart1_ipg_gate", "ipg", MXC_CCM_CCGR1, 6); 202 + clk[IMX5_CLK_UART1_PER_GATE] = imx_clk_gate2("uart1_per_gate", "uart_root", MXC_CCM_CCGR1, 8); 203 + clk[IMX5_CLK_UART2_IPG_GATE] = imx_clk_gate2("uart2_ipg_gate", "ipg", MXC_CCM_CCGR1, 10); 204 + clk[IMX5_CLK_UART2_PER_GATE] = imx_clk_gate2("uart2_per_gate", "uart_root", MXC_CCM_CCGR1, 12); 205 + clk[IMX5_CLK_UART3_IPG_GATE] = imx_clk_gate2("uart3_ipg_gate", "ipg", MXC_CCM_CCGR1, 14); 206 + clk[IMX5_CLK_UART3_PER_GATE] = imx_clk_gate2("uart3_per_gate", "uart_root", MXC_CCM_CCGR1, 16); 207 + clk[IMX5_CLK_I2C1_GATE] = imx_clk_gate2("i2c1_gate", "per_root", MXC_CCM_CCGR1, 18); 208 + clk[IMX5_CLK_I2C2_GATE] = imx_clk_gate2("i2c2_gate", "per_root", MXC_CCM_CCGR1, 20); 209 + clk[IMX5_CLK_PWM1_IPG_GATE] = imx_clk_gate2("pwm1_ipg_gate", "ipg", MXC_CCM_CCGR2, 10); 210 + clk[IMX5_CLK_PWM1_HF_GATE] = imx_clk_gate2("pwm1_hf_gate", "per_root", MXC_CCM_CCGR2, 12); 211 + clk[IMX5_CLK_PWM2_IPG_GATE] = imx_clk_gate2("pwm2_ipg_gate", "ipg", MXC_CCM_CCGR2, 14); 212 + clk[IMX5_CLK_PWM2_HF_GATE] = imx_clk_gate2("pwm2_hf_gate", "per_root", MXC_CCM_CCGR2, 16); 213 + clk[IMX5_CLK_GPT_IPG_GATE] = imx_clk_gate2("gpt_ipg_gate", "ipg", MXC_CCM_CCGR2, 18); 214 + clk[IMX5_CLK_GPT_HF_GATE] = imx_clk_gate2("gpt_hf_gate", "per_root", MXC_CCM_CCGR2, 20); 215 + clk[IMX5_CLK_FEC_GATE] = imx_clk_gate2("fec_gate", "ipg", MXC_CCM_CCGR2, 24); 216 + clk[IMX5_CLK_USBOH3_GATE] = imx_clk_gate2("usboh3_gate", "ipg", MXC_CCM_CCGR2, 26); 217 + clk[IMX5_CLK_USBOH3_PER_GATE] = imx_clk_gate2("usboh3_per_gate", "usboh3_podf", MXC_CCM_CCGR2, 28); 218 + clk[IMX5_CLK_ESDHC1_IPG_GATE] = imx_clk_gate2("esdhc1_ipg_gate", "ipg", MXC_CCM_CCGR3, 0); 219 + clk[IMX5_CLK_ESDHC2_IPG_GATE] = imx_clk_gate2("esdhc2_ipg_gate", "ipg", MXC_CCM_CCGR3, 4); 220 + clk[IMX5_CLK_ESDHC3_IPG_GATE] = imx_clk_gate2("esdhc3_ipg_gate", "ipg", MXC_CCM_CCGR3, 8); 221 + clk[IMX5_CLK_ESDHC4_IPG_GATE] = imx_clk_gate2("esdhc4_ipg_gate", "ipg", MXC_CCM_CCGR3, 12); 222 + clk[IMX5_CLK_SSI1_IPG_GATE] = imx_clk_gate2("ssi1_ipg_gate", "ipg", MXC_CCM_CCGR3, 16); 223 + clk[IMX5_CLK_SSI2_IPG_GATE] = imx_clk_gate2("ssi2_ipg_gate", "ipg", MXC_CCM_CCGR3, 20); 224 + clk[IMX5_CLK_SSI3_IPG_GATE] = imx_clk_gate2("ssi3_ipg_gate", "ipg", MXC_CCM_CCGR3, 24); 225 + clk[IMX5_CLK_ECSPI1_IPG_GATE] = imx_clk_gate2("ecspi1_ipg_gate", "ipg", MXC_CCM_CCGR4, 18); 226 + clk[IMX5_CLK_ECSPI1_PER_GATE] = imx_clk_gate2("ecspi1_per_gate", "ecspi_podf", MXC_CCM_CCGR4, 20); 227 + clk[IMX5_CLK_ECSPI2_IPG_GATE] = imx_clk_gate2("ecspi2_ipg_gate", "ipg", MXC_CCM_CCGR4, 22); 228 + clk[IMX5_CLK_ECSPI2_PER_GATE] = imx_clk_gate2("ecspi2_per_gate", "ecspi_podf", MXC_CCM_CCGR4, 24); 229 + clk[IMX5_CLK_CSPI_IPG_GATE] = imx_clk_gate2("cspi_ipg_gate", "ipg", MXC_CCM_CCGR4, 26); 230 + clk[IMX5_CLK_SDMA_GATE] = imx_clk_gate2("sdma_gate", "ipg", MXC_CCM_CCGR4, 30); 231 + clk[IMX5_CLK_EMI_FAST_GATE] = imx_clk_gate2("emi_fast_gate", "dummy", MXC_CCM_CCGR5, 14); 232 + clk[IMX5_CLK_EMI_SLOW_GATE] = imx_clk_gate2("emi_slow_gate", "emi_slow_podf", MXC_CCM_CCGR5, 16); 233 + clk[IMX5_CLK_IPU_SEL] = imx_clk_mux("ipu_sel", MXC_CCM_CBCMR, 6, 2, ipu_sel, ARRAY_SIZE(ipu_sel)); 234 + clk[IMX5_CLK_IPU_GATE] = imx_clk_gate2("ipu_gate", "ipu_sel", MXC_CCM_CCGR5, 10); 235 + clk[IMX5_CLK_NFC_GATE] = imx_clk_gate2("nfc_gate", "nfc_podf", MXC_CCM_CCGR5, 20); 236 + clk[IMX5_CLK_IPU_DI0_GATE] = imx_clk_gate2("ipu_di0_gate", "ipu_di0_sel", MXC_CCM_CCGR6, 10); 237 + clk[IMX5_CLK_IPU_DI1_GATE] = imx_clk_gate2("ipu_di1_gate", "ipu_di1_sel", MXC_CCM_CCGR6, 12); 238 + clk[IMX5_CLK_GPU3D_SEL] = imx_clk_mux("gpu3d_sel", MXC_CCM_CBCMR, 4, 2, gpu3d_sel, ARRAY_SIZE(gpu3d_sel)); 239 + clk[IMX5_CLK_GPU2D_SEL] = imx_clk_mux("gpu2d_sel", MXC_CCM_CBCMR, 16, 2, gpu2d_sel, ARRAY_SIZE(gpu2d_sel)); 240 + clk[IMX5_CLK_GPU3D_GATE] = imx_clk_gate2("gpu3d_gate", "gpu3d_sel", MXC_CCM_CCGR5, 2); 241 + clk[IMX5_CLK_GARB_GATE] = imx_clk_gate2("garb_gate", "axi_a", MXC_CCM_CCGR5, 4); 242 + clk[IMX5_CLK_GPU2D_GATE] = imx_clk_gate2("gpu2d_gate", "gpu2d_sel", MXC_CCM_CCGR6, 14); 243 + clk[IMX5_CLK_VPU_SEL] = imx_clk_mux("vpu_sel", MXC_CCM_CBCMR, 14, 2, vpu_sel, ARRAY_SIZE(vpu_sel)); 244 + clk[IMX5_CLK_VPU_GATE] = imx_clk_gate2("vpu_gate", "vpu_sel", MXC_CCM_CCGR5, 6); 245 + clk[IMX5_CLK_VPU_REFERENCE_GATE] = imx_clk_gate2("vpu_reference_gate", "osc", MXC_CCM_CCGR5, 8); 246 + clk[IMX5_CLK_UART4_IPG_GATE] = imx_clk_gate2("uart4_ipg_gate", "ipg", MXC_CCM_CCGR7, 8); 247 + clk[IMX5_CLK_UART4_PER_GATE] = imx_clk_gate2("uart4_per_gate", "uart_root", MXC_CCM_CCGR7, 10); 248 + clk[IMX5_CLK_UART5_IPG_GATE] = imx_clk_gate2("uart5_ipg_gate", "ipg", MXC_CCM_CCGR7, 12); 249 + clk[IMX5_CLK_UART5_PER_GATE] = imx_clk_gate2("uart5_per_gate", "uart_root", MXC_CCM_CCGR7, 14); 250 + clk[IMX5_CLK_GPC_DVFS] = imx_clk_gate2("gpc_dvfs", "dummy", MXC_CCM_CCGR5, 24); 210 251 211 - clk[ssi_apm] = imx_clk_mux("ssi_apm", MXC_CCM_CSCMR1, 8, 2, ssi_apm_sels, ARRAY_SIZE(ssi_apm_sels)); 212 - clk[ssi1_root_sel] = imx_clk_mux("ssi1_root_sel", MXC_CCM_CSCMR1, 14, 2, ssi_clk_sels, ARRAY_SIZE(ssi_clk_sels)); 213 - clk[ssi2_root_sel] = imx_clk_mux("ssi2_root_sel", MXC_CCM_CSCMR1, 12, 2, ssi_clk_sels, ARRAY_SIZE(ssi_clk_sels)); 214 - clk[ssi3_root_sel] = imx_clk_mux("ssi3_root_sel", MXC_CCM_CSCMR1, 11, 1, ssi3_clk_sels, ARRAY_SIZE(ssi3_clk_sels)); 215 - clk[ssi_ext1_sel] = imx_clk_mux("ssi_ext1_sel", MXC_CCM_CSCMR1, 28, 2, ssi_clk_sels, ARRAY_SIZE(ssi_clk_sels)); 216 - clk[ssi_ext2_sel] = imx_clk_mux("ssi_ext2_sel", MXC_CCM_CSCMR1, 30, 2, ssi_clk_sels, ARRAY_SIZE(ssi_clk_sels)); 217 - clk[ssi_ext1_com_sel] = imx_clk_mux("ssi_ext1_com_sel", MXC_CCM_CSCMR1, 0, 1, ssi_ext1_com_sels, ARRAY_SIZE(ssi_ext1_com_sels)); 218 - clk[ssi_ext2_com_sel] = imx_clk_mux("ssi_ext2_com_sel", MXC_CCM_CSCMR1, 1, 1, ssi_ext2_com_sels, ARRAY_SIZE(ssi_ext2_com_sels)); 219 - clk[ssi1_root_pred] = imx_clk_divider("ssi1_root_pred", "ssi1_root_sel", MXC_CCM_CS1CDR, 6, 3); 220 - clk[ssi1_root_podf] = imx_clk_divider("ssi1_root_podf", "ssi1_root_pred", MXC_CCM_CS1CDR, 0, 6); 221 - clk[ssi2_root_pred] = imx_clk_divider("ssi2_root_pred", "ssi2_root_sel", MXC_CCM_CS2CDR, 6, 3); 222 - clk[ssi2_root_podf] = imx_clk_divider("ssi2_root_podf", "ssi2_root_pred", MXC_CCM_CS2CDR, 0, 6); 223 - clk[ssi_ext1_pred] = imx_clk_divider("ssi_ext1_pred", "ssi_ext1_sel", MXC_CCM_CS1CDR, 22, 3); 224 - clk[ssi_ext1_podf] = imx_clk_divider("ssi_ext1_podf", "ssi_ext1_pred", MXC_CCM_CS1CDR, 16, 6); 225 - clk[ssi_ext2_pred] = imx_clk_divider("ssi_ext2_pred", "ssi_ext2_sel", MXC_CCM_CS2CDR, 22, 3); 226 - clk[ssi_ext2_podf] = imx_clk_divider("ssi_ext2_podf", "ssi_ext2_pred", MXC_CCM_CS2CDR, 16, 6); 227 - clk[ssi1_root_gate] = imx_clk_gate2("ssi1_root_gate", "ssi1_root_podf", MXC_CCM_CCGR3, 18); 228 - clk[ssi2_root_gate] = imx_clk_gate2("ssi2_root_gate", "ssi2_root_podf", MXC_CCM_CCGR3, 22); 229 - clk[ssi3_root_gate] = imx_clk_gate2("ssi3_root_gate", "ssi3_root_sel", MXC_CCM_CCGR3, 26); 230 - clk[ssi_ext1_gate] = imx_clk_gate2("ssi_ext1_gate", "ssi_ext1_com_sel", MXC_CCM_CCGR3, 28); 231 - clk[ssi_ext2_gate] = imx_clk_gate2("ssi_ext2_gate", "ssi_ext2_com_sel", MXC_CCM_CCGR3, 30); 232 - clk[epit1_ipg_gate] = imx_clk_gate2("epit1_ipg_gate", "ipg", MXC_CCM_CCGR2, 2); 233 - clk[epit1_hf_gate] = imx_clk_gate2("epit1_hf_gate", "per_root", MXC_CCM_CCGR2, 4); 234 - clk[epit2_ipg_gate] = imx_clk_gate2("epit2_ipg_gate", "ipg", MXC_CCM_CCGR2, 6); 235 - clk[epit2_hf_gate] = imx_clk_gate2("epit2_hf_gate", "per_root", MXC_CCM_CCGR2, 8); 236 - clk[owire_gate] = imx_clk_gate2("owire_gate", "per_root", MXC_CCM_CCGR2, 22); 237 - clk[srtc_gate] = imx_clk_gate2("srtc_gate", "per_root", MXC_CCM_CCGR4, 28); 238 - clk[pata_gate] = imx_clk_gate2("pata_gate", "ipg", MXC_CCM_CCGR4, 0); 239 - clk[spdif0_sel] = imx_clk_mux("spdif0_sel", MXC_CCM_CSCMR2, 0, 2, spdif_sel, ARRAY_SIZE(spdif_sel)); 240 - clk[spdif0_pred] = imx_clk_divider("spdif0_pred", "spdif0_sel", MXC_CCM_CDCDR, 25, 3); 241 - clk[spdif0_podf] = imx_clk_divider("spdif0_podf", "spdif0_pred", MXC_CCM_CDCDR, 19, 6); 242 - clk[spdif0_com_s] = imx_clk_mux_flags("spdif0_com_sel", MXC_CCM_CSCMR2, 4, 1, 243 - spdif0_com_sel, ARRAY_SIZE(spdif0_com_sel), CLK_SET_RATE_PARENT); 244 - clk[spdif0_gate] = imx_clk_gate2("spdif0_gate", "spdif0_com_sel", MXC_CCM_CCGR5, 26); 245 - clk[spdif_ipg_gate] = imx_clk_gate2("spdif_ipg_gate", "ipg", MXC_CCM_CCGR5, 30); 252 + clk[IMX5_CLK_SSI_APM] = imx_clk_mux("ssi_apm", MXC_CCM_CSCMR1, 8, 2, ssi_apm_sels, ARRAY_SIZE(ssi_apm_sels)); 253 + clk[IMX5_CLK_SSI1_ROOT_SEL] = imx_clk_mux("ssi1_root_sel", MXC_CCM_CSCMR1, 14, 2, ssi_clk_sels, ARRAY_SIZE(ssi_clk_sels)); 254 + clk[IMX5_CLK_SSI2_ROOT_SEL] = imx_clk_mux("ssi2_root_sel", MXC_CCM_CSCMR1, 12, 2, ssi_clk_sels, ARRAY_SIZE(ssi_clk_sels)); 255 + clk[IMX5_CLK_SSI3_ROOT_SEL] = imx_clk_mux("ssi3_root_sel", MXC_CCM_CSCMR1, 11, 1, ssi3_clk_sels, ARRAY_SIZE(ssi3_clk_sels)); 256 + clk[IMX5_CLK_SSI_EXT1_SEL] = imx_clk_mux("ssi_ext1_sel", MXC_CCM_CSCMR1, 28, 2, ssi_clk_sels, ARRAY_SIZE(ssi_clk_sels)); 257 + clk[IMX5_CLK_SSI_EXT2_SEL] = imx_clk_mux("ssi_ext2_sel", MXC_CCM_CSCMR1, 30, 2, ssi_clk_sels, ARRAY_SIZE(ssi_clk_sels)); 258 + clk[IMX5_CLK_SSI_EXT1_COM_SEL] = imx_clk_mux("ssi_ext1_com_sel", MXC_CCM_CSCMR1, 0, 1, ssi_ext1_com_sels, ARRAY_SIZE(ssi_ext1_com_sels)); 259 + clk[IMX5_CLK_SSI_EXT2_COM_SEL] = imx_clk_mux("ssi_ext2_com_sel", MXC_CCM_CSCMR1, 1, 1, ssi_ext2_com_sels, ARRAY_SIZE(ssi_ext2_com_sels)); 260 + clk[IMX5_CLK_SSI1_ROOT_PRED] = imx_clk_divider("ssi1_root_pred", "ssi1_root_sel", MXC_CCM_CS1CDR, 6, 3); 261 + clk[IMX5_CLK_SSI1_ROOT_PODF] = imx_clk_divider("ssi1_root_podf", "ssi1_root_pred", MXC_CCM_CS1CDR, 0, 6); 262 + clk[IMX5_CLK_SSI2_ROOT_PRED] = imx_clk_divider("ssi2_root_pred", "ssi2_root_sel", MXC_CCM_CS2CDR, 6, 3); 263 + clk[IMX5_CLK_SSI2_ROOT_PODF] = imx_clk_divider("ssi2_root_podf", "ssi2_root_pred", MXC_CCM_CS2CDR, 0, 6); 264 + clk[IMX5_CLK_SSI_EXT1_PRED] = imx_clk_divider("ssi_ext1_pred", "ssi_ext1_sel", MXC_CCM_CS1CDR, 22, 3); 265 + clk[IMX5_CLK_SSI_EXT1_PODF] = imx_clk_divider("ssi_ext1_podf", "ssi_ext1_pred", MXC_CCM_CS1CDR, 16, 6); 266 + clk[IMX5_CLK_SSI_EXT2_PRED] = imx_clk_divider("ssi_ext2_pred", "ssi_ext2_sel", MXC_CCM_CS2CDR, 22, 3); 267 + clk[IMX5_CLK_SSI_EXT2_PODF] = imx_clk_divider("ssi_ext2_podf", "ssi_ext2_pred", MXC_CCM_CS2CDR, 16, 6); 268 + clk[IMX5_CLK_SSI1_ROOT_GATE] = imx_clk_gate2("ssi1_root_gate", "ssi1_root_podf", MXC_CCM_CCGR3, 18); 269 + clk[IMX5_CLK_SSI2_ROOT_GATE] = imx_clk_gate2("ssi2_root_gate", "ssi2_root_podf", MXC_CCM_CCGR3, 22); 270 + clk[IMX5_CLK_SSI3_ROOT_GATE] = imx_clk_gate2("ssi3_root_gate", "ssi3_root_sel", MXC_CCM_CCGR3, 26); 271 + clk[IMX5_CLK_SSI_EXT1_GATE] = imx_clk_gate2("ssi_ext1_gate", "ssi_ext1_com_sel", MXC_CCM_CCGR3, 28); 272 + clk[IMX5_CLK_SSI_EXT2_GATE] = imx_clk_gate2("ssi_ext2_gate", "ssi_ext2_com_sel", MXC_CCM_CCGR3, 30); 273 + clk[IMX5_CLK_EPIT1_IPG_GATE] = imx_clk_gate2("epit1_ipg_gate", "ipg", MXC_CCM_CCGR2, 2); 274 + clk[IMX5_CLK_EPIT1_HF_GATE] = imx_clk_gate2("epit1_hf_gate", "per_root", MXC_CCM_CCGR2, 4); 275 + clk[IMX5_CLK_EPIT2_IPG_GATE] = imx_clk_gate2("epit2_ipg_gate", "ipg", MXC_CCM_CCGR2, 6); 276 + clk[IMX5_CLK_EPIT2_HF_GATE] = imx_clk_gate2("epit2_hf_gate", "per_root", MXC_CCM_CCGR2, 8); 277 + clk[IMX5_CLK_OWIRE_GATE] = imx_clk_gate2("owire_gate", "per_root", MXC_CCM_CCGR2, 22); 278 + clk[IMX5_CLK_SRTC_GATE] = imx_clk_gate2("srtc_gate", "per_root", MXC_CCM_CCGR4, 28); 279 + clk[IMX5_CLK_PATA_GATE] = imx_clk_gate2("pata_gate", "ipg", MXC_CCM_CCGR4, 0); 280 + clk[IMX5_CLK_SPDIF0_SEL] = imx_clk_mux("spdif0_sel", MXC_CCM_CSCMR2, 0, 2, spdif_sel, ARRAY_SIZE(spdif_sel)); 281 + clk[IMX5_CLK_SPDIF0_PRED] = imx_clk_divider("spdif0_pred", "spdif0_sel", MXC_CCM_CDCDR, 25, 3); 282 + clk[IMX5_CLK_SPDIF0_PODF] = imx_clk_divider("spdif0_podf", "spdif0_pred", MXC_CCM_CDCDR, 19, 6); 283 + clk[IMX5_CLK_SPDIF0_COM_SEL] = imx_clk_mux_flags("spdif0_com_sel", MXC_CCM_CSCMR2, 4, 1, 284 + spdif0_com_sel, ARRAY_SIZE(spdif0_com_sel), CLK_SET_RATE_PARENT); 285 + clk[IMX5_CLK_SPDIF0_GATE] = imx_clk_gate2("spdif0_gate", "spdif0_com_sel", MXC_CCM_CCGR5, 26); 286 + clk[IMX5_CLK_SPDIF_IPG_GATE] = imx_clk_gate2("spdif_ipg_gate", "ipg", MXC_CCM_CCGR5, 30); 287 + clk[IMX5_CLK_SAHARA_IPG_GATE] = imx_clk_gate2("sahara_ipg_gate", "ipg", MXC_CCM_CCGR4, 14); 288 + clk[IMX5_CLK_SATA_REF] = imx_clk_fixed_factor("sata_ref", "usb_phy1_gate", 1, 1); 246 289 247 290 for (i = 0; i < ARRAY_SIZE(clk); i++) 248 291 if (IS_ERR(clk[i])) 249 292 pr_err("i.MX5 clk %d: register failed with %ld\n", 250 293 i, PTR_ERR(clk[i])); 251 294 252 - clk_register_clkdev(clk[gpt_hf_gate], "per", "imx-gpt.0"); 253 - clk_register_clkdev(clk[gpt_ipg_gate], "ipg", "imx-gpt.0"); 254 - clk_register_clkdev(clk[uart1_per_gate], "per", "imx21-uart.0"); 255 - clk_register_clkdev(clk[uart1_ipg_gate], "ipg", "imx21-uart.0"); 256 - clk_register_clkdev(clk[uart2_per_gate], "per", "imx21-uart.1"); 257 - clk_register_clkdev(clk[uart2_ipg_gate], "ipg", "imx21-uart.1"); 258 - clk_register_clkdev(clk[uart3_per_gate], "per", "imx21-uart.2"); 259 - clk_register_clkdev(clk[uart3_ipg_gate], "ipg", "imx21-uart.2"); 260 - clk_register_clkdev(clk[uart4_per_gate], "per", "imx21-uart.3"); 261 - clk_register_clkdev(clk[uart4_ipg_gate], "ipg", "imx21-uart.3"); 262 - clk_register_clkdev(clk[uart5_per_gate], "per", "imx21-uart.4"); 263 - clk_register_clkdev(clk[uart5_ipg_gate], "ipg", "imx21-uart.4"); 264 - clk_register_clkdev(clk[ecspi1_per_gate], "per", "imx51-ecspi.0"); 265 - clk_register_clkdev(clk[ecspi1_ipg_gate], "ipg", "imx51-ecspi.0"); 266 - clk_register_clkdev(clk[ecspi2_per_gate], "per", "imx51-ecspi.1"); 267 - clk_register_clkdev(clk[ecspi2_ipg_gate], "ipg", "imx51-ecspi.1"); 268 - clk_register_clkdev(clk[cspi_ipg_gate], NULL, "imx35-cspi.2"); 269 - clk_register_clkdev(clk[pwm1_ipg_gate], "pwm", "mxc_pwm.0"); 270 - clk_register_clkdev(clk[pwm2_ipg_gate], "pwm", "mxc_pwm.1"); 271 - clk_register_clkdev(clk[i2c1_gate], NULL, "imx21-i2c.0"); 272 - clk_register_clkdev(clk[i2c2_gate], NULL, "imx21-i2c.1"); 273 - clk_register_clkdev(clk[usboh3_per_gate], "per", "mxc-ehci.0"); 274 - clk_register_clkdev(clk[usboh3_gate], "ipg", "mxc-ehci.0"); 275 - clk_register_clkdev(clk[usboh3_gate], "ahb", "mxc-ehci.0"); 276 - clk_register_clkdev(clk[usboh3_per_gate], "per", "mxc-ehci.1"); 277 - clk_register_clkdev(clk[usboh3_gate], "ipg", "mxc-ehci.1"); 278 - clk_register_clkdev(clk[usboh3_gate], "ahb", "mxc-ehci.1"); 279 - clk_register_clkdev(clk[usboh3_per_gate], "per", "mxc-ehci.2"); 280 - clk_register_clkdev(clk[usboh3_gate], "ipg", "mxc-ehci.2"); 281 - clk_register_clkdev(clk[usboh3_gate], "ahb", "mxc-ehci.2"); 282 - clk_register_clkdev(clk[usboh3_per_gate], "per", "imx-udc-mx51"); 283 - clk_register_clkdev(clk[usboh3_gate], "ipg", "imx-udc-mx51"); 284 - clk_register_clkdev(clk[usboh3_gate], "ahb", "imx-udc-mx51"); 285 - clk_register_clkdev(clk[nfc_gate], NULL, "imx51-nand"); 286 - clk_register_clkdev(clk[ssi1_ipg_gate], NULL, "imx-ssi.0"); 287 - clk_register_clkdev(clk[ssi2_ipg_gate], NULL, "imx-ssi.1"); 288 - clk_register_clkdev(clk[ssi3_ipg_gate], NULL, "imx-ssi.2"); 289 - clk_register_clkdev(clk[sdma_gate], NULL, "imx35-sdma"); 290 - clk_register_clkdev(clk[cpu_podf], NULL, "cpu0"); 291 - clk_register_clkdev(clk[iim_gate], "iim", NULL); 292 - clk_register_clkdev(clk[dummy], NULL, "imx2-wdt.0"); 293 - clk_register_clkdev(clk[dummy], NULL, "imx2-wdt.1"); 294 - clk_register_clkdev(clk[dummy], NULL, "imx-keypad"); 295 - clk_register_clkdev(clk[ipu_di1_gate], "di1", "imx-tve.0"); 296 - clk_register_clkdev(clk[gpc_dvfs], "gpc_dvfs", NULL); 297 - clk_register_clkdev(clk[epit1_ipg_gate], "ipg", "imx-epit.0"); 298 - clk_register_clkdev(clk[epit1_hf_gate], "per", "imx-epit.0"); 299 - clk_register_clkdev(clk[epit2_ipg_gate], "ipg", "imx-epit.1"); 300 - clk_register_clkdev(clk[epit2_hf_gate], "per", "imx-epit.1"); 295 + clk_register_clkdev(clk[IMX5_CLK_GPT_HF_GATE], "per", "imx-gpt.0"); 296 + clk_register_clkdev(clk[IMX5_CLK_GPT_IPG_GATE], "ipg", "imx-gpt.0"); 297 + clk_register_clkdev(clk[IMX5_CLK_UART1_PER_GATE], "per", "imx21-uart.0"); 298 + clk_register_clkdev(clk[IMX5_CLK_UART1_IPG_GATE], "ipg", "imx21-uart.0"); 299 + clk_register_clkdev(clk[IMX5_CLK_UART2_PER_GATE], "per", "imx21-uart.1"); 300 + clk_register_clkdev(clk[IMX5_CLK_UART2_IPG_GATE], "ipg", "imx21-uart.1"); 301 + clk_register_clkdev(clk[IMX5_CLK_UART3_PER_GATE], "per", "imx21-uart.2"); 302 + clk_register_clkdev(clk[IMX5_CLK_UART3_IPG_GATE], "ipg", "imx21-uart.2"); 303 + clk_register_clkdev(clk[IMX5_CLK_UART4_PER_GATE], "per", "imx21-uart.3"); 304 + clk_register_clkdev(clk[IMX5_CLK_UART4_IPG_GATE], "ipg", "imx21-uart.3"); 305 + clk_register_clkdev(clk[IMX5_CLK_UART5_PER_GATE], "per", "imx21-uart.4"); 306 + clk_register_clkdev(clk[IMX5_CLK_UART5_IPG_GATE], "ipg", "imx21-uart.4"); 307 + clk_register_clkdev(clk[IMX5_CLK_ECSPI1_PER_GATE], "per", "imx51-ecspi.0"); 308 + clk_register_clkdev(clk[IMX5_CLK_ECSPI1_IPG_GATE], "ipg", "imx51-ecspi.0"); 309 + clk_register_clkdev(clk[IMX5_CLK_ECSPI2_PER_GATE], "per", "imx51-ecspi.1"); 310 + clk_register_clkdev(clk[IMX5_CLK_ECSPI2_IPG_GATE], "ipg", "imx51-ecspi.1"); 311 + clk_register_clkdev(clk[IMX5_CLK_CSPI_IPG_GATE], NULL, "imx35-cspi.2"); 312 + clk_register_clkdev(clk[IMX5_CLK_PWM1_IPG_GATE], "pwm", "mxc_pwm.0"); 313 + clk_register_clkdev(clk[IMX5_CLK_PWM2_IPG_GATE], "pwm", "mxc_pwm.1"); 314 + clk_register_clkdev(clk[IMX5_CLK_I2C1_GATE], NULL, "imx21-i2c.0"); 315 + clk_register_clkdev(clk[IMX5_CLK_I2C2_GATE], NULL, "imx21-i2c.1"); 316 + clk_register_clkdev(clk[IMX5_CLK_USBOH3_PER_GATE], "per", "mxc-ehci.0"); 317 + clk_register_clkdev(clk[IMX5_CLK_USBOH3_GATE], "ipg", "mxc-ehci.0"); 318 + clk_register_clkdev(clk[IMX5_CLK_USBOH3_GATE], "ahb", "mxc-ehci.0"); 319 + clk_register_clkdev(clk[IMX5_CLK_USBOH3_PER_GATE], "per", "mxc-ehci.1"); 320 + clk_register_clkdev(clk[IMX5_CLK_USBOH3_GATE], "ipg", "mxc-ehci.1"); 321 + clk_register_clkdev(clk[IMX5_CLK_USBOH3_GATE], "ahb", "mxc-ehci.1"); 322 + clk_register_clkdev(clk[IMX5_CLK_USBOH3_PER_GATE], "per", "mxc-ehci.2"); 323 + clk_register_clkdev(clk[IMX5_CLK_USBOH3_GATE], "ipg", "mxc-ehci.2"); 324 + clk_register_clkdev(clk[IMX5_CLK_USBOH3_GATE], "ahb", "mxc-ehci.2"); 325 + clk_register_clkdev(clk[IMX5_CLK_USBOH3_PER_GATE], "per", "imx-udc-mx51"); 326 + clk_register_clkdev(clk[IMX5_CLK_USBOH3_GATE], "ipg", "imx-udc-mx51"); 327 + clk_register_clkdev(clk[IMX5_CLK_USBOH3_GATE], "ahb", "imx-udc-mx51"); 328 + clk_register_clkdev(clk[IMX5_CLK_NFC_GATE], NULL, "imx51-nand"); 329 + clk_register_clkdev(clk[IMX5_CLK_SSI1_IPG_GATE], NULL, "imx-ssi.0"); 330 + clk_register_clkdev(clk[IMX5_CLK_SSI2_IPG_GATE], NULL, "imx-ssi.1"); 331 + clk_register_clkdev(clk[IMX5_CLK_SSI3_IPG_GATE], NULL, "imx-ssi.2"); 332 + clk_register_clkdev(clk[IMX5_CLK_SDMA_GATE], NULL, "imx35-sdma"); 333 + clk_register_clkdev(clk[IMX5_CLK_CPU_PODF], NULL, "cpu0"); 334 + clk_register_clkdev(clk[IMX5_CLK_IIM_GATE], "iim", NULL); 335 + clk_register_clkdev(clk[IMX5_CLK_DUMMY], NULL, "imx2-wdt.0"); 336 + clk_register_clkdev(clk[IMX5_CLK_DUMMY], NULL, "imx2-wdt.1"); 337 + clk_register_clkdev(clk[IMX5_CLK_DUMMY], NULL, "imx-keypad"); 338 + clk_register_clkdev(clk[IMX5_CLK_IPU_DI1_GATE], "di1", "imx-tve.0"); 339 + clk_register_clkdev(clk[IMX5_CLK_GPC_DVFS], "gpc_dvfs", NULL); 340 + clk_register_clkdev(clk[IMX5_CLK_EPIT1_IPG_GATE], "ipg", "imx-epit.0"); 341 + clk_register_clkdev(clk[IMX5_CLK_EPIT1_HF_GATE], "per", "imx-epit.0"); 342 + clk_register_clkdev(clk[IMX5_CLK_EPIT2_IPG_GATE], "ipg", "imx-epit.1"); 343 + clk_register_clkdev(clk[IMX5_CLK_EPIT2_HF_GATE], "per", "imx-epit.1"); 301 344 302 345 /* Set SDHC parents to be PLL2 */ 303 - clk_set_parent(clk[esdhc_a_sel], clk[pll2_sw]); 304 - clk_set_parent(clk[esdhc_b_sel], clk[pll2_sw]); 346 + clk_set_parent(clk[IMX5_CLK_ESDHC_A_SEL], clk[IMX5_CLK_PLL2_SW]); 347 + clk_set_parent(clk[IMX5_CLK_ESDHC_B_SEL], clk[IMX5_CLK_PLL2_SW]); 305 348 306 349 /* move usb phy clk to 24MHz */ 307 - clk_set_parent(clk[usb_phy_sel], clk[osc]); 350 + clk_set_parent(clk[IMX5_CLK_USB_PHY_SEL], clk[IMX5_CLK_OSC]); 308 351 309 - clk_prepare_enable(clk[gpc_dvfs]); 310 - clk_prepare_enable(clk[ahb_max]); /* esdhc3 */ 311 - clk_prepare_enable(clk[aips_tz1]); 312 - clk_prepare_enable(clk[aips_tz2]); /* fec */ 313 - clk_prepare_enable(clk[spba]); 314 - clk_prepare_enable(clk[emi_fast_gate]); /* fec */ 315 - clk_prepare_enable(clk[emi_slow_gate]); /* eim */ 316 - clk_prepare_enable(clk[mipi_hsc1_gate]); 317 - clk_prepare_enable(clk[mipi_hsc2_gate]); 318 - clk_prepare_enable(clk[mipi_esc_gate]); 319 - clk_prepare_enable(clk[mipi_hsp_gate]); 320 - clk_prepare_enable(clk[tmax1]); 321 - clk_prepare_enable(clk[tmax2]); /* esdhc2, fec */ 322 - clk_prepare_enable(clk[tmax3]); /* esdhc1, esdhc4 */ 352 + clk_prepare_enable(clk[IMX5_CLK_GPC_DVFS]); 353 + clk_prepare_enable(clk[IMX5_CLK_AHB_MAX]); /* esdhc3 */ 354 + clk_prepare_enable(clk[IMX5_CLK_AIPS_TZ1]); 355 + clk_prepare_enable(clk[IMX5_CLK_AIPS_TZ2]); /* fec */ 356 + clk_prepare_enable(clk[IMX5_CLK_SPBA]); 357 + clk_prepare_enable(clk[IMX5_CLK_EMI_FAST_GATE]); /* fec */ 358 + clk_prepare_enable(clk[IMX5_CLK_EMI_SLOW_GATE]); /* eim */ 359 + clk_prepare_enable(clk[IMX5_CLK_MIPI_HSC1_GATE]); 360 + clk_prepare_enable(clk[IMX5_CLK_MIPI_HSC2_GATE]); 361 + clk_prepare_enable(clk[IMX5_CLK_MIPI_ESC_GATE]); 362 + clk_prepare_enable(clk[IMX5_CLK_MIPI_HSP_GATE]); 363 + clk_prepare_enable(clk[IMX5_CLK_TMAX1]); 364 + clk_prepare_enable(clk[IMX5_CLK_TMAX2]); /* esdhc2, fec */ 365 + clk_prepare_enable(clk[IMX5_CLK_TMAX3]); /* esdhc1, esdhc4 */ 323 366 } 367 + 368 + static void __init mx50_clocks_init(struct device_node *np) 369 + { 370 + void __iomem *base; 371 + unsigned long r; 372 + int i, irq; 373 + 374 + clk[IMX5_CLK_PLL1_SW] = imx_clk_pllv2("pll1_sw", "osc", MX53_DPLL1_BASE); 375 + clk[IMX5_CLK_PLL2_SW] = imx_clk_pllv2("pll2_sw", "osc", MX53_DPLL2_BASE); 376 + clk[IMX5_CLK_PLL3_SW] = imx_clk_pllv2("pll3_sw", "osc", MX53_DPLL3_BASE); 377 + 378 + clk[IMX5_CLK_LP_APM] = imx_clk_mux("lp_apm", MXC_CCM_CCSR, 10, 1, 379 + lp_apm_sel, ARRAY_SIZE(lp_apm_sel)); 380 + clk[IMX5_CLK_ESDHC1_PER_GATE] = imx_clk_gate2("esdhc1_per_gate", "esdhc_a_podf", MXC_CCM_CCGR3, 2); 381 + clk[IMX5_CLK_ESDHC2_PER_GATE] = imx_clk_gate2("esdhc2_per_gate", "esdhc_c_sel", MXC_CCM_CCGR3, 6); 382 + clk[IMX5_CLK_ESDHC3_PER_GATE] = imx_clk_gate2("esdhc3_per_gate", "esdhc_b_podf", MXC_CCM_CCGR3, 10); 383 + clk[IMX5_CLK_ESDHC4_PER_GATE] = imx_clk_gate2("esdhc4_per_gate", "esdhc_d_sel", MXC_CCM_CCGR3, 14); 384 + clk[IMX5_CLK_USB_PHY1_GATE] = imx_clk_gate2("usb_phy1_gate", "usb_phy_sel", MXC_CCM_CCGR4, 10); 385 + clk[IMX5_CLK_USB_PHY2_GATE] = imx_clk_gate2("usb_phy2_gate", "usb_phy_sel", MXC_CCM_CCGR4, 12); 386 + clk[IMX5_CLK_I2C3_GATE] = imx_clk_gate2("i2c3_gate", "per_root", MXC_CCM_CCGR1, 22); 387 + 388 + clk[IMX5_CLK_CKO1_SEL] = imx_clk_mux("cko1_sel", MXC_CCM_CCOSR, 0, 4, 389 + mx53_cko1_sel, ARRAY_SIZE(mx53_cko1_sel)); 390 + clk[IMX5_CLK_CKO1_PODF] = imx_clk_divider("cko1_podf", "cko1_sel", MXC_CCM_CCOSR, 4, 3); 391 + clk[IMX5_CLK_CKO1] = imx_clk_gate2("cko1", "cko1_podf", MXC_CCM_CCOSR, 7); 392 + 393 + clk[IMX5_CLK_CKO2_SEL] = imx_clk_mux("cko2_sel", MXC_CCM_CCOSR, 16, 5, 394 + mx53_cko2_sel, ARRAY_SIZE(mx53_cko2_sel)); 395 + clk[IMX5_CLK_CKO2_PODF] = imx_clk_divider("cko2_podf", "cko2_sel", MXC_CCM_CCOSR, 21, 3); 396 + clk[IMX5_CLK_CKO2] = imx_clk_gate2("cko2", "cko2_podf", MXC_CCM_CCOSR, 24); 397 + 398 + for (i = 0; i < ARRAY_SIZE(clk); i++) 399 + if (IS_ERR(clk[i])) 400 + pr_err("i.MX50 clk %d: register failed with %ld\n", 401 + i, PTR_ERR(clk[i])); 402 + 403 + clk_data.clks = clk; 404 + clk_data.clk_num = ARRAY_SIZE(clk); 405 + of_clk_add_provider(np, of_clk_src_onecell_get, &clk_data); 406 + 407 + mx5_clocks_common_init(0, 0, 0, 0); 408 + 409 + /* set SDHC root clock to 200MHZ*/ 410 + clk_set_rate(clk[IMX5_CLK_ESDHC_A_PODF], 200000000); 411 + clk_set_rate(clk[IMX5_CLK_ESDHC_B_PODF], 200000000); 412 + 413 + clk_prepare_enable(clk[IMX5_CLK_IIM_GATE]); 414 + imx_print_silicon_rev("i.MX50", IMX_CHIP_REVISION_1_1); 415 + clk_disable_unprepare(clk[IMX5_CLK_IIM_GATE]); 416 + 417 + r = clk_round_rate(clk[IMX5_CLK_USBOH3_PER_GATE], 54000000); 418 + clk_set_rate(clk[IMX5_CLK_USBOH3_PER_GATE], r); 419 + 420 + np = of_find_compatible_node(NULL, NULL, "fsl,imx50-gpt"); 421 + base = of_iomap(np, 0); 422 + WARN_ON(!base); 423 + irq = irq_of_parse_and_map(np, 0); 424 + mxc_timer_init(base, irq); 425 + } 426 + CLK_OF_DECLARE(imx50_ccm, "fsl,imx50-ccm", mx50_clocks_init); 324 427 325 428 int __init mx51_clocks_init(unsigned long rate_ckil, unsigned long rate_osc, 326 429 unsigned long rate_ckih1, unsigned long rate_ckih2) ··· 389 372 u32 val; 390 373 struct device_node *np; 391 374 392 - clk[pll1_sw] = imx_clk_pllv2("pll1_sw", "osc", MX51_DPLL1_BASE); 393 - clk[pll2_sw] = imx_clk_pllv2("pll2_sw", "osc", MX51_DPLL2_BASE); 394 - clk[pll3_sw] = imx_clk_pllv2("pll3_sw", "osc", MX51_DPLL3_BASE); 395 - clk[ipu_di0_sel] = imx_clk_mux("ipu_di0_sel", MXC_CCM_CSCMR2, 26, 3, 396 - mx51_ipu_di0_sel, ARRAY_SIZE(mx51_ipu_di0_sel)); 397 - clk[ipu_di1_sel] = imx_clk_mux("ipu_di1_sel", MXC_CCM_CSCMR2, 29, 3, 398 - mx51_ipu_di1_sel, ARRAY_SIZE(mx51_ipu_di1_sel)); 399 - clk[tve_ext_sel] = imx_clk_mux_flags("tve_ext_sel", MXC_CCM_CSCMR1, 6, 1, 400 - mx51_tve_ext_sel, ARRAY_SIZE(mx51_tve_ext_sel), CLK_SET_RATE_PARENT); 401 - clk[tve_s] = imx_clk_mux("tve_sel", MXC_CCM_CSCMR1, 7, 1, 402 - mx51_tve_sel, ARRAY_SIZE(mx51_tve_sel)); 403 - clk[tve_gate] = imx_clk_gate2("tve_gate", "tve_sel", MXC_CCM_CCGR2, 30); 404 - clk[tve_pred] = imx_clk_divider("tve_pred", "pll3_sw", MXC_CCM_CDCDR, 28, 3); 405 - clk[esdhc1_per_gate] = imx_clk_gate2("esdhc1_per_gate", "esdhc_a_podf", MXC_CCM_CCGR3, 2); 406 - clk[esdhc2_per_gate] = imx_clk_gate2("esdhc2_per_gate", "esdhc_b_podf", MXC_CCM_CCGR3, 6); 407 - clk[esdhc3_per_gate] = imx_clk_gate2("esdhc3_per_gate", "esdhc_c_sel", MXC_CCM_CCGR3, 10); 408 - clk[esdhc4_per_gate] = imx_clk_gate2("esdhc4_per_gate", "esdhc_d_sel", MXC_CCM_CCGR3, 14); 409 - clk[usb_phy_gate] = imx_clk_gate2("usb_phy_gate", "usb_phy_sel", MXC_CCM_CCGR2, 0); 410 - clk[hsi2c_gate] = imx_clk_gate2("hsi2c_gate", "ipg", MXC_CCM_CCGR1, 22); 411 - clk[mipi_hsc1_gate] = imx_clk_gate2("mipi_hsc1_gate", "ipg", MXC_CCM_CCGR4, 6); 412 - clk[mipi_hsc2_gate] = imx_clk_gate2("mipi_hsc2_gate", "ipg", MXC_CCM_CCGR4, 8); 413 - clk[mipi_esc_gate] = imx_clk_gate2("mipi_esc_gate", "ipg", MXC_CCM_CCGR4, 10); 414 - clk[mipi_hsp_gate] = imx_clk_gate2("mipi_hsp_gate", "ipg", MXC_CCM_CCGR4, 12); 415 - clk[spdif_xtal_sel] = imx_clk_mux("spdif_xtal_sel", MXC_CCM_CSCMR1, 2, 2, 416 - mx51_spdif_xtal_sel, ARRAY_SIZE(mx51_spdif_xtal_sel)); 417 - clk[spdif1_sel] = imx_clk_mux("spdif1_sel", MXC_CCM_CSCMR2, 2, 2, 418 - spdif_sel, ARRAY_SIZE(spdif_sel)); 419 - clk[spdif1_pred] = imx_clk_divider("spdif1_pred", "spdif1_sel", MXC_CCM_CDCDR, 16, 3); 420 - clk[spdif1_podf] = imx_clk_divider("spdif1_podf", "spdif1_pred", MXC_CCM_CDCDR, 9, 6); 421 - clk[spdif1_com_sel] = imx_clk_mux("spdif1_com_sel", MXC_CCM_CSCMR2, 5, 1, 422 - mx51_spdif1_com_sel, ARRAY_SIZE(mx51_spdif1_com_sel)); 423 - clk[spdif1_gate] = imx_clk_gate2("spdif1_gate", "spdif1_com_sel", MXC_CCM_CCGR5, 28); 375 + clk[IMX5_CLK_PLL1_SW] = imx_clk_pllv2("pll1_sw", "osc", MX51_DPLL1_BASE); 376 + clk[IMX5_CLK_PLL2_SW] = imx_clk_pllv2("pll2_sw", "osc", MX51_DPLL2_BASE); 377 + clk[IMX5_CLK_PLL3_SW] = imx_clk_pllv2("pll3_sw", "osc", MX51_DPLL3_BASE); 378 + clk[IMX5_CLK_LP_APM] = imx_clk_mux("lp_apm", MXC_CCM_CCSR, 9, 1, 379 + lp_apm_sel, ARRAY_SIZE(lp_apm_sel)); 380 + clk[IMX5_CLK_IPU_DI0_SEL] = imx_clk_mux("ipu_di0_sel", MXC_CCM_CSCMR2, 26, 3, 381 + mx51_ipu_di0_sel, ARRAY_SIZE(mx51_ipu_di0_sel)); 382 + clk[IMX5_CLK_IPU_DI1_SEL] = imx_clk_mux("ipu_di1_sel", MXC_CCM_CSCMR2, 29, 3, 383 + mx51_ipu_di1_sel, ARRAY_SIZE(mx51_ipu_di1_sel)); 384 + clk[IMX5_CLK_TVE_EXT_SEL] = imx_clk_mux_flags("tve_ext_sel", MXC_CCM_CSCMR1, 6, 1, 385 + mx51_tve_ext_sel, ARRAY_SIZE(mx51_tve_ext_sel), CLK_SET_RATE_PARENT); 386 + clk[IMX5_CLK_TVE_SEL] = imx_clk_mux("tve_sel", MXC_CCM_CSCMR1, 7, 1, 387 + mx51_tve_sel, ARRAY_SIZE(mx51_tve_sel)); 388 + clk[IMX5_CLK_TVE_GATE] = imx_clk_gate2("tve_gate", "tve_sel", MXC_CCM_CCGR2, 30); 389 + clk[IMX5_CLK_TVE_PRED] = imx_clk_divider("tve_pred", "pll3_sw", MXC_CCM_CDCDR, 28, 3); 390 + clk[IMX5_CLK_ESDHC1_PER_GATE] = imx_clk_gate2("esdhc1_per_gate", "esdhc_a_podf", MXC_CCM_CCGR3, 2); 391 + clk[IMX5_CLK_ESDHC2_PER_GATE] = imx_clk_gate2("esdhc2_per_gate", "esdhc_b_podf", MXC_CCM_CCGR3, 6); 392 + clk[IMX5_CLK_ESDHC3_PER_GATE] = imx_clk_gate2("esdhc3_per_gate", "esdhc_c_sel", MXC_CCM_CCGR3, 10); 393 + clk[IMX5_CLK_ESDHC4_PER_GATE] = imx_clk_gate2("esdhc4_per_gate", "esdhc_d_sel", MXC_CCM_CCGR3, 14); 394 + clk[IMX5_CLK_USB_PHY_GATE] = imx_clk_gate2("usb_phy_gate", "usb_phy_sel", MXC_CCM_CCGR2, 0); 395 + clk[IMX5_CLK_HSI2C_GATE] = imx_clk_gate2("hsi2c_gate", "ipg", MXC_CCM_CCGR1, 22); 396 + clk[IMX5_CLK_MIPI_HSC1_GATE] = imx_clk_gate2("mipi_hsc1_gate", "ipg", MXC_CCM_CCGR4, 6); 397 + clk[IMX5_CLK_MIPI_HSC2_GATE] = imx_clk_gate2("mipi_hsc2_gate", "ipg", MXC_CCM_CCGR4, 8); 398 + clk[IMX5_CLK_MIPI_ESC_GATE] = imx_clk_gate2("mipi_esc_gate", "ipg", MXC_CCM_CCGR4, 10); 399 + clk[IMX5_CLK_MIPI_HSP_GATE] = imx_clk_gate2("mipi_hsp_gate", "ipg", MXC_CCM_CCGR4, 12); 400 + clk[IMX5_CLK_SPDIF_XTAL_SEL] = imx_clk_mux("spdif_xtal_sel", MXC_CCM_CSCMR1, 2, 2, 401 + mx51_spdif_xtal_sel, ARRAY_SIZE(mx51_spdif_xtal_sel)); 402 + clk[IMX5_CLK_SPDIF1_SEL] = imx_clk_mux("spdif1_sel", MXC_CCM_CSCMR2, 2, 2, 403 + spdif_sel, ARRAY_SIZE(spdif_sel)); 404 + clk[IMX5_CLK_SPDIF1_PRED] = imx_clk_divider("spdif1_pred", "spdif1_sel", MXC_CCM_CDCDR, 16, 3); 405 + clk[IMX5_CLK_SPDIF1_PODF] = imx_clk_divider("spdif1_podf", "spdif1_pred", MXC_CCM_CDCDR, 9, 6); 406 + clk[IMX5_CLK_SPDIF1_COM_SEL] = imx_clk_mux("spdif1_com_sel", MXC_CCM_CSCMR2, 5, 1, 407 + mx51_spdif1_com_sel, ARRAY_SIZE(mx51_spdif1_com_sel)); 408 + clk[IMX5_CLK_SPDIF1_GATE] = imx_clk_gate2("spdif1_gate", "spdif1_com_sel", MXC_CCM_CCGR5, 28); 424 409 425 410 for (i = 0; i < ARRAY_SIZE(clk); i++) 426 411 if (IS_ERR(clk[i])) ··· 436 417 437 418 mx5_clocks_common_init(rate_ckil, rate_osc, rate_ckih1, rate_ckih2); 438 419 439 - clk_register_clkdev(clk[hsi2c_gate], NULL, "imx21-i2c.2"); 440 - clk_register_clkdev(clk[mx51_mipi], "mipi_hsp", NULL); 441 - clk_register_clkdev(clk[vpu_gate], NULL, "imx51-vpu.0"); 442 - clk_register_clkdev(clk[fec_gate], NULL, "imx27-fec.0"); 443 - clk_register_clkdev(clk[usb_phy_gate], "phy", "mxc-ehci.0"); 444 - clk_register_clkdev(clk[esdhc1_ipg_gate], "ipg", "sdhci-esdhc-imx51.0"); 445 - clk_register_clkdev(clk[dummy], "ahb", "sdhci-esdhc-imx51.0"); 446 - clk_register_clkdev(clk[esdhc1_per_gate], "per", "sdhci-esdhc-imx51.0"); 447 - clk_register_clkdev(clk[esdhc2_ipg_gate], "ipg", "sdhci-esdhc-imx51.1"); 448 - clk_register_clkdev(clk[dummy], "ahb", "sdhci-esdhc-imx51.1"); 449 - clk_register_clkdev(clk[esdhc2_per_gate], "per", "sdhci-esdhc-imx51.1"); 450 - clk_register_clkdev(clk[esdhc3_ipg_gate], "ipg", "sdhci-esdhc-imx51.2"); 451 - clk_register_clkdev(clk[dummy], "ahb", "sdhci-esdhc-imx51.2"); 452 - clk_register_clkdev(clk[esdhc3_per_gate], "per", "sdhci-esdhc-imx51.2"); 453 - clk_register_clkdev(clk[esdhc4_ipg_gate], "ipg", "sdhci-esdhc-imx51.3"); 454 - clk_register_clkdev(clk[dummy], "ahb", "sdhci-esdhc-imx51.3"); 455 - clk_register_clkdev(clk[esdhc4_per_gate], "per", "sdhci-esdhc-imx51.3"); 420 + clk_register_clkdev(clk[IMX5_CLK_HSI2C_GATE], NULL, "imx21-i2c.2"); 421 + clk_register_clkdev(clk[IMX5_CLK_MX51_MIPI], "mipi_hsp", NULL); 422 + clk_register_clkdev(clk[IMX5_CLK_VPU_GATE], NULL, "imx51-vpu.0"); 423 + clk_register_clkdev(clk[IMX5_CLK_FEC_GATE], NULL, "imx27-fec.0"); 424 + clk_register_clkdev(clk[IMX5_CLK_USB_PHY_GATE], "phy", "mxc-ehci.0"); 425 + clk_register_clkdev(clk[IMX5_CLK_ESDHC1_IPG_GATE], "ipg", "sdhci-esdhc-imx51.0"); 426 + clk_register_clkdev(clk[IMX5_CLK_DUMMY], "ahb", "sdhci-esdhc-imx51.0"); 427 + clk_register_clkdev(clk[IMX5_CLK_ESDHC1_PER_GATE], "per", "sdhci-esdhc-imx51.0"); 428 + clk_register_clkdev(clk[IMX5_CLK_ESDHC2_IPG_GATE], "ipg", "sdhci-esdhc-imx51.1"); 429 + clk_register_clkdev(clk[IMX5_CLK_DUMMY], "ahb", "sdhci-esdhc-imx51.1"); 430 + clk_register_clkdev(clk[IMX5_CLK_ESDHC2_PER_GATE], "per", "sdhci-esdhc-imx51.1"); 431 + clk_register_clkdev(clk[IMX5_CLK_ESDHC3_IPG_GATE], "ipg", "sdhci-esdhc-imx51.2"); 432 + clk_register_clkdev(clk[IMX5_CLK_DUMMY], "ahb", "sdhci-esdhc-imx51.2"); 433 + clk_register_clkdev(clk[IMX5_CLK_ESDHC3_PER_GATE], "per", "sdhci-esdhc-imx51.2"); 434 + clk_register_clkdev(clk[IMX5_CLK_ESDHC4_IPG_GATE], "ipg", "sdhci-esdhc-imx51.3"); 435 + clk_register_clkdev(clk[IMX5_CLK_DUMMY], "ahb", "sdhci-esdhc-imx51.3"); 436 + clk_register_clkdev(clk[IMX5_CLK_ESDHC4_PER_GATE], "per", "sdhci-esdhc-imx51.3"); 456 437 457 438 /* set the usboh3 parent to pll2_sw */ 458 - clk_set_parent(clk[usboh3_sel], clk[pll2_sw]); 439 + clk_set_parent(clk[IMX5_CLK_USBOH3_SEL], clk[IMX5_CLK_PLL2_SW]); 459 440 460 441 /* set SDHC root clock to 166.25MHZ*/ 461 - clk_set_rate(clk[esdhc_a_podf], 166250000); 462 - clk_set_rate(clk[esdhc_b_podf], 166250000); 442 + clk_set_rate(clk[IMX5_CLK_ESDHC_A_PODF], 166250000); 443 + clk_set_rate(clk[IMX5_CLK_ESDHC_B_PODF], 166250000); 463 444 464 445 /* System timer */ 465 446 mxc_timer_init(MX51_IO_ADDRESS(MX51_GPT1_BASE_ADDR), MX51_INT_GPT); 466 447 467 - clk_prepare_enable(clk[iim_gate]); 448 + clk_prepare_enable(clk[IMX5_CLK_IIM_GATE]); 468 449 imx_print_silicon_rev("i.MX51", mx51_revision()); 469 - clk_disable_unprepare(clk[iim_gate]); 450 + clk_disable_unprepare(clk[IMX5_CLK_IIM_GATE]); 470 451 471 452 /* 472 453 * Reference Manual says: Functionality of CCDR[18] and CLPCR[23] is no ··· 498 479 unsigned long r; 499 480 void __iomem *base; 500 481 501 - clk[pll1_sw] = imx_clk_pllv2("pll1_sw", "osc", MX53_DPLL1_BASE); 502 - clk[pll2_sw] = imx_clk_pllv2("pll2_sw", "osc", MX53_DPLL2_BASE); 503 - clk[pll3_sw] = imx_clk_pllv2("pll3_sw", "osc", MX53_DPLL3_BASE); 504 - clk[pll4_sw] = imx_clk_pllv2("pll4_sw", "osc", MX53_DPLL4_BASE); 482 + clk[IMX5_CLK_PLL1_SW] = imx_clk_pllv2("pll1_sw", "osc", MX53_DPLL1_BASE); 483 + clk[IMX5_CLK_PLL2_SW] = imx_clk_pllv2("pll2_sw", "osc", MX53_DPLL2_BASE); 484 + clk[IMX5_CLK_PLL3_SW] = imx_clk_pllv2("pll3_sw", "osc", MX53_DPLL3_BASE); 485 + clk[IMX5_CLK_PLL4_SW] = imx_clk_pllv2("pll4_sw", "osc", MX53_DPLL4_BASE); 505 486 506 - clk[ldb_di1_div_3_5] = imx_clk_fixed_factor("ldb_di1_div_3_5", "ldb_di1_sel", 2, 7); 507 - clk[ldb_di1_div] = imx_clk_divider_flags("ldb_di1_div", "ldb_di1_div_3_5", MXC_CCM_CSCMR2, 11, 1, 0); 508 - clk[ldb_di1_sel] = imx_clk_mux_flags("ldb_di1_sel", MXC_CCM_CSCMR2, 9, 1, 509 - mx53_ldb_di1_sel, ARRAY_SIZE(mx53_ldb_di1_sel), CLK_SET_RATE_PARENT); 510 - clk[di_pll4_podf] = imx_clk_divider("di_pll4_podf", "pll4_sw", MXC_CCM_CDCDR, 16, 3); 511 - clk[ldb_di0_div_3_5] = imx_clk_fixed_factor("ldb_di0_div_3_5", "ldb_di0_sel", 2, 7); 512 - clk[ldb_di0_div] = imx_clk_divider_flags("ldb_di0_div", "ldb_di0_div_3_5", MXC_CCM_CSCMR2, 10, 1, 0); 513 - clk[ldb_di0_sel] = imx_clk_mux_flags("ldb_di0_sel", MXC_CCM_CSCMR2, 8, 1, 514 - mx53_ldb_di0_sel, ARRAY_SIZE(mx53_ldb_di0_sel), CLK_SET_RATE_PARENT); 515 - clk[ldb_di0_gate] = imx_clk_gate2("ldb_di0_gate", "ldb_di0_div", MXC_CCM_CCGR6, 28); 516 - clk[ldb_di1_gate] = imx_clk_gate2("ldb_di1_gate", "ldb_di1_div", MXC_CCM_CCGR6, 30); 517 - clk[ipu_di0_sel] = imx_clk_mux("ipu_di0_sel", MXC_CCM_CSCMR2, 26, 3, 518 - mx53_ipu_di0_sel, ARRAY_SIZE(mx53_ipu_di0_sel)); 519 - clk[ipu_di1_sel] = imx_clk_mux("ipu_di1_sel", MXC_CCM_CSCMR2, 29, 3, 520 - mx53_ipu_di1_sel, ARRAY_SIZE(mx53_ipu_di1_sel)); 521 - clk[tve_ext_sel] = imx_clk_mux_flags("tve_ext_sel", MXC_CCM_CSCMR1, 6, 1, 522 - mx53_tve_ext_sel, ARRAY_SIZE(mx53_tve_ext_sel), CLK_SET_RATE_PARENT); 523 - clk[tve_gate] = imx_clk_gate2("tve_gate", "tve_pred", MXC_CCM_CCGR2, 30); 524 - clk[tve_pred] = imx_clk_divider("tve_pred", "tve_ext_sel", MXC_CCM_CDCDR, 28, 3); 525 - clk[esdhc1_per_gate] = imx_clk_gate2("esdhc1_per_gate", "esdhc_a_podf", MXC_CCM_CCGR3, 2); 526 - clk[esdhc2_per_gate] = imx_clk_gate2("esdhc2_per_gate", "esdhc_c_sel", MXC_CCM_CCGR3, 6); 527 - clk[esdhc3_per_gate] = imx_clk_gate2("esdhc3_per_gate", "esdhc_b_podf", MXC_CCM_CCGR3, 10); 528 - clk[esdhc4_per_gate] = imx_clk_gate2("esdhc4_per_gate", "esdhc_d_sel", MXC_CCM_CCGR3, 14); 529 - clk[usb_phy1_gate] = imx_clk_gate2("usb_phy1_gate", "usb_phy_sel", MXC_CCM_CCGR4, 10); 530 - clk[usb_phy2_gate] = imx_clk_gate2("usb_phy2_gate", "usb_phy_sel", MXC_CCM_CCGR4, 12); 531 - clk[can_sel] = imx_clk_mux("can_sel", MXC_CCM_CSCMR2, 6, 2, 532 - mx53_can_sel, ARRAY_SIZE(mx53_can_sel)); 533 - clk[can1_serial_gate] = imx_clk_gate2("can1_serial_gate", "can_sel", MXC_CCM_CCGR6, 22); 534 - clk[can1_ipg_gate] = imx_clk_gate2("can1_ipg_gate", "ipg", MXC_CCM_CCGR6, 20); 535 - clk[ocram] = imx_clk_gate2("ocram", "ahb", MXC_CCM_CCGR6, 2); 536 - clk[can2_serial_gate] = imx_clk_gate2("can2_serial_gate", "can_sel", MXC_CCM_CCGR4, 8); 537 - clk[can2_ipg_gate] = imx_clk_gate2("can2_ipg_gate", "ipg", MXC_CCM_CCGR4, 6); 538 - clk[i2c3_gate] = imx_clk_gate2("i2c3_gate", "per_root", MXC_CCM_CCGR1, 22); 539 - clk[sata_gate] = imx_clk_gate2("sata_gate", "ipg", MXC_CCM_CCGR4, 2); 487 + clk[IMX5_CLK_LP_APM] = imx_clk_mux("lp_apm", MXC_CCM_CCSR, 10, 1, 488 + lp_apm_sel, ARRAY_SIZE(lp_apm_sel)); 489 + clk[IMX5_CLK_LDB_DI1_DIV_3_5] = imx_clk_fixed_factor("ldb_di1_div_3_5", "ldb_di1_sel", 2, 7); 490 + clk[IMX5_CLK_LDB_DI1_DIV] = imx_clk_divider_flags("ldb_di1_div", "ldb_di1_div_3_5", MXC_CCM_CSCMR2, 11, 1, 0); 491 + clk[IMX5_CLK_LDB_DI1_SEL] = imx_clk_mux_flags("ldb_di1_sel", MXC_CCM_CSCMR2, 9, 1, 492 + mx53_ldb_di1_sel, ARRAY_SIZE(mx53_ldb_di1_sel), CLK_SET_RATE_PARENT); 493 + clk[IMX5_CLK_DI_PLL4_PODF] = imx_clk_divider("di_pll4_podf", "pll4_sw", MXC_CCM_CDCDR, 16, 3); 494 + clk[IMX5_CLK_LDB_DI0_DIV_3_5] = imx_clk_fixed_factor("ldb_di0_div_3_5", "ldb_di0_sel", 2, 7); 495 + clk[IMX5_CLK_LDB_DI0_DIV] = imx_clk_divider_flags("ldb_di0_div", "ldb_di0_div_3_5", MXC_CCM_CSCMR2, 10, 1, 0); 496 + clk[IMX5_CLK_LDB_DI0_SEL] = imx_clk_mux_flags("ldb_di0_sel", MXC_CCM_CSCMR2, 8, 1, 497 + mx53_ldb_di0_sel, ARRAY_SIZE(mx53_ldb_di0_sel), CLK_SET_RATE_PARENT); 498 + clk[IMX5_CLK_LDB_DI0_GATE] = imx_clk_gate2("ldb_di0_gate", "ldb_di0_div", MXC_CCM_CCGR6, 28); 499 + clk[IMX5_CLK_LDB_DI1_GATE] = imx_clk_gate2("ldb_di1_gate", "ldb_di1_div", MXC_CCM_CCGR6, 30); 500 + clk[IMX5_CLK_IPU_DI0_SEL] = imx_clk_mux("ipu_di0_sel", MXC_CCM_CSCMR2, 26, 3, 501 + mx53_ipu_di0_sel, ARRAY_SIZE(mx53_ipu_di0_sel)); 502 + clk[IMX5_CLK_IPU_DI1_SEL] = imx_clk_mux("ipu_di1_sel", MXC_CCM_CSCMR2, 29, 3, 503 + mx53_ipu_di1_sel, ARRAY_SIZE(mx53_ipu_di1_sel)); 504 + clk[IMX5_CLK_TVE_EXT_SEL] = imx_clk_mux_flags("tve_ext_sel", MXC_CCM_CSCMR1, 6, 1, 505 + mx53_tve_ext_sel, ARRAY_SIZE(mx53_tve_ext_sel), CLK_SET_RATE_PARENT); 506 + clk[IMX5_CLK_TVE_GATE] = imx_clk_gate2("tve_gate", "tve_pred", MXC_CCM_CCGR2, 30); 507 + clk[IMX5_CLK_TVE_PRED] = imx_clk_divider("tve_pred", "tve_ext_sel", MXC_CCM_CDCDR, 28, 3); 508 + clk[IMX5_CLK_ESDHC1_PER_GATE] = imx_clk_gate2("esdhc1_per_gate", "esdhc_a_podf", MXC_CCM_CCGR3, 2); 509 + clk[IMX5_CLK_ESDHC2_PER_GATE] = imx_clk_gate2("esdhc2_per_gate", "esdhc_c_sel", MXC_CCM_CCGR3, 6); 510 + clk[IMX5_CLK_ESDHC3_PER_GATE] = imx_clk_gate2("esdhc3_per_gate", "esdhc_b_podf", MXC_CCM_CCGR3, 10); 511 + clk[IMX5_CLK_ESDHC4_PER_GATE] = imx_clk_gate2("esdhc4_per_gate", "esdhc_d_sel", MXC_CCM_CCGR3, 14); 512 + clk[IMX5_CLK_USB_PHY1_GATE] = imx_clk_gate2("usb_phy1_gate", "usb_phy_sel", MXC_CCM_CCGR4, 10); 513 + clk[IMX5_CLK_USB_PHY2_GATE] = imx_clk_gate2("usb_phy2_gate", "usb_phy_sel", MXC_CCM_CCGR4, 12); 514 + clk[IMX5_CLK_CAN_SEL] = imx_clk_mux("can_sel", MXC_CCM_CSCMR2, 6, 2, 515 + mx53_can_sel, ARRAY_SIZE(mx53_can_sel)); 516 + clk[IMX5_CLK_CAN1_SERIAL_GATE] = imx_clk_gate2("can1_serial_gate", "can_sel", MXC_CCM_CCGR6, 22); 517 + clk[IMX5_CLK_CAN1_IPG_GATE] = imx_clk_gate2("can1_ipg_gate", "ipg", MXC_CCM_CCGR6, 20); 518 + clk[IMX5_CLK_OCRAM] = imx_clk_gate2("ocram", "ahb", MXC_CCM_CCGR6, 2); 519 + clk[IMX5_CLK_CAN2_SERIAL_GATE] = imx_clk_gate2("can2_serial_gate", "can_sel", MXC_CCM_CCGR4, 8); 520 + clk[IMX5_CLK_CAN2_IPG_GATE] = imx_clk_gate2("can2_ipg_gate", "ipg", MXC_CCM_CCGR4, 6); 521 + clk[IMX5_CLK_I2C3_GATE] = imx_clk_gate2("i2c3_gate", "per_root", MXC_CCM_CCGR1, 22); 522 + clk[IMX5_CLK_SATA_GATE] = imx_clk_gate2("sata_gate", "ipg", MXC_CCM_CCGR4, 2); 540 523 541 - clk[cko1_sel] = imx_clk_mux("cko1_sel", MXC_CCM_CCOSR, 0, 4, 542 - mx53_cko1_sel, ARRAY_SIZE(mx53_cko1_sel)); 543 - clk[cko1_podf] = imx_clk_divider("cko1_podf", "cko1_sel", MXC_CCM_CCOSR, 4, 3); 544 - clk[cko1] = imx_clk_gate2("cko1", "cko1_podf", MXC_CCM_CCOSR, 7); 524 + clk[IMX5_CLK_CKO1_SEL] = imx_clk_mux("cko1_sel", MXC_CCM_CCOSR, 0, 4, 525 + mx53_cko1_sel, ARRAY_SIZE(mx53_cko1_sel)); 526 + clk[IMX5_CLK_CKO1_PODF] = imx_clk_divider("cko1_podf", "cko1_sel", MXC_CCM_CCOSR, 4, 3); 527 + clk[IMX5_CLK_CKO1] = imx_clk_gate2("cko1", "cko1_podf", MXC_CCM_CCOSR, 7); 545 528 546 - clk[cko2_sel] = imx_clk_mux("cko2_sel", MXC_CCM_CCOSR, 16, 5, 547 - mx53_cko2_sel, ARRAY_SIZE(mx53_cko2_sel)); 548 - clk[cko2_podf] = imx_clk_divider("cko2_podf", "cko2_sel", MXC_CCM_CCOSR, 21, 3); 549 - clk[cko2] = imx_clk_gate2("cko2", "cko2_podf", MXC_CCM_CCOSR, 24); 550 - clk[spdif_xtal_sel] = imx_clk_mux("spdif_xtal_sel", MXC_CCM_CSCMR1, 2, 2, 551 - mx53_spdif_xtal_sel, ARRAY_SIZE(mx53_spdif_xtal_sel)); 529 + clk[IMX5_CLK_CKO2_SEL] = imx_clk_mux("cko2_sel", MXC_CCM_CCOSR, 16, 5, 530 + mx53_cko2_sel, ARRAY_SIZE(mx53_cko2_sel)); 531 + clk[IMX5_CLK_CKO2_PODF] = imx_clk_divider("cko2_podf", "cko2_sel", MXC_CCM_CCOSR, 21, 3); 532 + clk[IMX5_CLK_CKO2] = imx_clk_gate2("cko2", "cko2_podf", MXC_CCM_CCOSR, 24); 533 + clk[IMX5_CLK_SPDIF_XTAL_SEL] = imx_clk_mux("spdif_xtal_sel", MXC_CCM_CSCMR1, 2, 2, 534 + mx53_spdif_xtal_sel, ARRAY_SIZE(mx53_spdif_xtal_sel)); 552 535 553 536 for (i = 0; i < ARRAY_SIZE(clk); i++) 554 537 if (IS_ERR(clk[i])) ··· 563 542 564 543 mx5_clocks_common_init(0, 0, 0, 0); 565 544 566 - clk_register_clkdev(clk[vpu_gate], NULL, "imx53-vpu.0"); 567 - clk_register_clkdev(clk[i2c3_gate], NULL, "imx21-i2c.2"); 568 - clk_register_clkdev(clk[fec_gate], NULL, "imx25-fec.0"); 569 - clk_register_clkdev(clk[usb_phy1_gate], "usb_phy1", "mxc-ehci.0"); 570 - clk_register_clkdev(clk[esdhc1_ipg_gate], "ipg", "sdhci-esdhc-imx53.0"); 571 - clk_register_clkdev(clk[dummy], "ahb", "sdhci-esdhc-imx53.0"); 572 - clk_register_clkdev(clk[esdhc1_per_gate], "per", "sdhci-esdhc-imx53.0"); 573 - clk_register_clkdev(clk[esdhc2_ipg_gate], "ipg", "sdhci-esdhc-imx53.1"); 574 - clk_register_clkdev(clk[dummy], "ahb", "sdhci-esdhc-imx53.1"); 575 - clk_register_clkdev(clk[esdhc2_per_gate], "per", "sdhci-esdhc-imx53.1"); 576 - clk_register_clkdev(clk[esdhc3_ipg_gate], "ipg", "sdhci-esdhc-imx53.2"); 577 - clk_register_clkdev(clk[dummy], "ahb", "sdhci-esdhc-imx53.2"); 578 - clk_register_clkdev(clk[esdhc3_per_gate], "per", "sdhci-esdhc-imx53.2"); 579 - clk_register_clkdev(clk[esdhc4_ipg_gate], "ipg", "sdhci-esdhc-imx53.3"); 580 - clk_register_clkdev(clk[dummy], "ahb", "sdhci-esdhc-imx53.3"); 581 - clk_register_clkdev(clk[esdhc4_per_gate], "per", "sdhci-esdhc-imx53.3"); 545 + clk_register_clkdev(clk[IMX5_CLK_VPU_GATE], NULL, "imx53-vpu.0"); 546 + clk_register_clkdev(clk[IMX5_CLK_I2C3_GATE], NULL, "imx21-i2c.2"); 547 + clk_register_clkdev(clk[IMX5_CLK_FEC_GATE], NULL, "imx25-fec.0"); 548 + clk_register_clkdev(clk[IMX5_CLK_USB_PHY1_GATE], "usb_phy1", "mxc-ehci.0"); 549 + clk_register_clkdev(clk[IMX5_CLK_ESDHC1_IPG_GATE], "ipg", "sdhci-esdhc-imx53.0"); 550 + clk_register_clkdev(clk[IMX5_CLK_DUMMY], "ahb", "sdhci-esdhc-imx53.0"); 551 + clk_register_clkdev(clk[IMX5_CLK_ESDHC1_PER_GATE], "per", "sdhci-esdhc-imx53.0"); 552 + clk_register_clkdev(clk[IMX5_CLK_ESDHC2_IPG_GATE], "ipg", "sdhci-esdhc-imx53.1"); 553 + clk_register_clkdev(clk[IMX5_CLK_DUMMY], "ahb", "sdhci-esdhc-imx53.1"); 554 + clk_register_clkdev(clk[IMX5_CLK_ESDHC2_PER_GATE], "per", "sdhci-esdhc-imx53.1"); 555 + clk_register_clkdev(clk[IMX5_CLK_ESDHC3_IPG_GATE], "ipg", "sdhci-esdhc-imx53.2"); 556 + clk_register_clkdev(clk[IMX5_CLK_DUMMY], "ahb", "sdhci-esdhc-imx53.2"); 557 + clk_register_clkdev(clk[IMX5_CLK_ESDHC3_PER_GATE], "per", "sdhci-esdhc-imx53.2"); 558 + clk_register_clkdev(clk[IMX5_CLK_ESDHC4_IPG_GATE], "ipg", "sdhci-esdhc-imx53.3"); 559 + clk_register_clkdev(clk[IMX5_CLK_DUMMY], "ahb", "sdhci-esdhc-imx53.3"); 560 + clk_register_clkdev(clk[IMX5_CLK_ESDHC4_PER_GATE], "per", "sdhci-esdhc-imx53.3"); 582 561 583 562 /* set SDHC root clock to 200MHZ*/ 584 - clk_set_rate(clk[esdhc_a_podf], 200000000); 585 - clk_set_rate(clk[esdhc_b_podf], 200000000); 563 + clk_set_rate(clk[IMX5_CLK_ESDHC_A_PODF], 200000000); 564 + clk_set_rate(clk[IMX5_CLK_ESDHC_B_PODF], 200000000); 586 565 587 - clk_prepare_enable(clk[iim_gate]); 566 + /* move can bus clk to 24MHz */ 567 + clk_set_parent(clk[IMX5_CLK_CAN_SEL], clk[IMX5_CLK_LP_APM]); 568 + 569 + clk_prepare_enable(clk[IMX5_CLK_IIM_GATE]); 588 570 imx_print_silicon_rev("i.MX53", mx53_revision()); 589 - clk_disable_unprepare(clk[iim_gate]); 571 + clk_disable_unprepare(clk[IMX5_CLK_IIM_GATE]); 590 572 591 - r = clk_round_rate(clk[usboh3_per_gate], 54000000); 592 - clk_set_rate(clk[usboh3_per_gate], r); 573 + r = clk_round_rate(clk[IMX5_CLK_USBOH3_PER_GATE], 54000000); 574 + clk_set_rate(clk[IMX5_CLK_USBOH3_PER_GATE], r); 593 575 594 576 np = of_find_compatible_node(NULL, NULL, "fsl,imx53-gpt"); 595 577 base = of_iomap(np, 0);
+4 -1
arch/arm/mach-imx/clk-imx6q.c
··· 114 114 static struct clk_onecell_data clk_data; 115 115 116 116 static enum mx6q_clks const clks_init_on[] __initconst = { 117 - mmdc_ch0_axi, rom, pll1_sys, 117 + mmdc_ch0_axi, rom, arm, 118 118 }; 119 119 120 120 static struct clk_div_table clk_enet_ref_table[] = { ··· 474 474 ret = clk_set_parent(clk[cko], clk[cko2]); 475 475 if (ret) 476 476 pr_warn("failed to set up CLKO: %d\n", ret); 477 + 478 + /* Audio-related clocks configuration */ 479 + clk_set_parent(clk[spdif_sel], clk[pll3_pfd3_454m]); 477 480 478 481 /* All existing boards with PCIe use LVDS1 */ 479 482 if (IS_ENABLED(CONFIG_PCI_IMX6))
+8 -3
arch/arm/mach-imx/clk-imx6sl.c
··· 29 29 static const char const *periph2_sels[] = { "pre_periph2_sel", "periph2_clk2_podf", }; 30 30 static const char const *csi_lcdif_sels[] = { "mmdc", "pll2_pfd2", "pll3_120m", "pll3_pfd1", }; 31 31 static const char const *usdhc_sels[] = { "pll2_pfd2", "pll2_pfd0", }; 32 - static const char const *ssi_sels[] = { "pll3_pfd2", "pll3_pfd3", "pll4_post_div", "dummy", }; 32 + static const char const *ssi_sels[] = { "pll3_pfd2", "pll3_pfd3", "pll4_audio_div", "dummy", }; 33 33 static const char const *perclk_sels[] = { "ipg", "osc", }; 34 34 static const char const *epdc_pxp_sels[] = { "mmdc", "pll3_usb_otg", "pll5_video_div", "pll2_pfd0", "pll2_pfd2", "pll3_pfd1", }; 35 35 static const char const *gpu2d_ovg_sels[] = { "pll3_pfd1", "pll3_usb_otg", "pll2_bus", "pll2_pfd2", }; 36 36 static const char const *gpu2d_sels[] = { "pll2_pfd2", "pll3_usb_otg", "pll3_pfd1", "pll2_bus", }; 37 37 static const char const *lcdif_pix_sels[] = { "pll2_bus", "pll3_usb_otg", "pll5_video_div", "pll2_pfd0", "pll3_pfd0", "pll3_pfd1", }; 38 38 static const char const *epdc_pix_sels[] = { "pll2_bus", "pll3_usb_otg", "pll5_video_div", "pll2_pfd0", "pll2_pfd1", "pll3_pfd1", }; 39 - static const char const *audio_sels[] = { "pll4_post_div", "pll3_pfd2", "pll3_pfd3", "pll3_usb_otg", }; 39 + static const char const *audio_sels[] = { "pll4_audio_div", "pll3_pfd2", "pll3_pfd3", "pll3_usb_otg", }; 40 40 static const char const *ecspi_sels[] = { "pll3_60m", "osc", }; 41 41 static const char const *uart_sels[] = { "pll3_80m", "osc", }; 42 42 ··· 63 63 { } 64 64 }; 65 65 66 - static struct clk *clks[IMX6SL_CLK_CLK_END]; 66 + static struct clk *clks[IMX6SL_CLK_END]; 67 67 static struct clk_onecell_data clk_data; 68 68 69 69 static void __init imx6sl_clocks_init(struct device_node *ccm_node) ··· 104 104 105 105 /* dev name parent_name flags reg shift width div: flags, div_table lock */ 106 106 clks[IMX6SL_CLK_PLL4_POST_DIV] = clk_register_divider_table(NULL, "pll4_post_div", "pll4_audio", CLK_SET_RATE_PARENT, base + 0x70, 19, 2, 0, post_div_table, &imx_ccm_lock); 107 + clks[IMX6SL_CLK_PLL4_AUDIO_DIV] = clk_register_divider(NULL, "pll4_audio_div", "pll4_post_div", CLK_SET_RATE_PARENT, base + 0x170, 15, 1, 0, &imx_ccm_lock); 107 108 clks[IMX6SL_CLK_PLL5_POST_DIV] = clk_register_divider_table(NULL, "pll5_post_div", "pll5_video", CLK_SET_RATE_PARENT, base + 0xa0, 19, 2, 0, post_div_table, &imx_ccm_lock); 108 109 clks[IMX6SL_CLK_PLL5_VIDEO_DIV] = clk_register_divider_table(NULL, "pll5_video_div", "pll5_post_div", CLK_SET_RATE_PARENT, base + 0x170, 30, 2, 0, video_div_table, &imx_ccm_lock); 109 110 clks[IMX6SL_CLK_ENET_REF] = clk_register_divider_table(NULL, "enet_ref", "pll6_enet", 0, base + 0xe0, 0, 2, 0, clk_enet_ref_table, &imx_ccm_lock); ··· 233 232 clks[IMX6SL_CLK_PWM3] = imx_clk_gate2("pwm3", "perclk", base + 0x78, 20); 234 233 clks[IMX6SL_CLK_PWM4] = imx_clk_gate2("pwm4", "perclk", base + 0x78, 22); 235 234 clks[IMX6SL_CLK_SDMA] = imx_clk_gate2("sdma", "ipg", base + 0x7c, 6); 235 + clks[IMX6SL_CLK_SPBA] = imx_clk_gate2("spba", "ipg", base + 0x7c, 12); 236 236 clks[IMX6SL_CLK_SPDIF] = imx_clk_gate2("spdif", "spdif0_podf", base + 0x7c, 14); 237 237 clks[IMX6SL_CLK_SSI1] = imx_clk_gate2("ssi1", "ssi1_podf", base + 0x7c, 18); 238 238 clks[IMX6SL_CLK_SSI2] = imx_clk_gate2("ssi2", "ssi2_podf", base + 0x7c, 20); ··· 262 260 clk_prepare_enable(clks[IMX6SL_CLK_USBPHY1_GATE]); 263 261 clk_prepare_enable(clks[IMX6SL_CLK_USBPHY2_GATE]); 264 262 } 263 + 264 + /* Audio-related clocks configuration */ 265 + clk_set_parent(clks[IMX6SL_CLK_SPDIF0_SEL], clks[IMX6SL_CLK_PLL3_PFD3]); 265 266 266 267 np = of_find_compatible_node(NULL, NULL, "fsl,imx6sl-gpt"); 267 268 base = of_iomap(np, 0);
+11
arch/arm/mach-imx/clk-pfd.c
··· 109 109 return 0; 110 110 } 111 111 112 + static int clk_pfd_is_enabled(struct clk_hw *hw) 113 + { 114 + struct clk_pfd *pfd = to_clk_pfd(hw); 115 + 116 + if (readl_relaxed(pfd->reg) & (1 << ((pfd->idx + 1) * 8 - 1))) 117 + return 0; 118 + 119 + return 1; 120 + } 121 + 112 122 static const struct clk_ops clk_pfd_ops = { 113 123 .enable = clk_pfd_enable, 114 124 .disable = clk_pfd_disable, 115 125 .recalc_rate = clk_pfd_recalc_rate, 116 126 .round_rate = clk_pfd_round_rate, 117 127 .set_rate = clk_pfd_set_rate, 128 + .is_enabled = clk_pfd_is_enabled, 118 129 }; 119 130 120 131 struct clk *imx_clk_pfd(const char *name, const char *parent_name,
+19 -4
arch/arm/mach-imx/clk-pllv1.c
··· 18 18 * 19 19 * PLL clock version 1, found on i.MX1/21/25/27/31/35 20 20 */ 21 + 22 + #define MFN_BITS (10) 23 + #define MFN_SIGN (BIT(MFN_BITS - 1)) 24 + #define MFN_MASK (MFN_SIGN - 1) 25 + 21 26 struct clk_pllv1 { 22 27 struct clk_hw hw; 23 28 void __iomem *base; 24 29 }; 25 30 26 31 #define to_clk_pllv1(clk) (container_of(clk, struct clk_pllv1, clk)) 32 + 33 + static inline bool mfn_is_negative(unsigned int mfn) 34 + { 35 + return !cpu_is_mx1() && !cpu_is_mx21() && (mfn & MFN_SIGN); 36 + } 27 37 28 38 static unsigned long clk_pllv1_recalc_rate(struct clk_hw *hw, 29 39 unsigned long parent_rate) ··· 68 58 69 59 /* 70 60 * On all i.MXs except i.MX1 and i.MX21 mfn is a 10bit 71 - * 2's complements number 61 + * 2's complements number. 62 + * On i.MX27 the bit 9 is the sign bit. 72 63 */ 73 - if (!cpu_is_mx1() && !cpu_is_mx21() && mfn >= 0x200) 74 - mfn_abs = 0x400 - mfn; 64 + if (mfn_is_negative(mfn)) { 65 + if (cpu_is_mx27()) 66 + mfn_abs = mfn & MFN_MASK; 67 + else 68 + mfn_abs = BIT(MFN_BITS) - mfn; 69 + } 75 70 76 71 rate = parent_rate * 2; 77 72 rate /= pd + 1; ··· 85 70 86 71 do_div(ll, mfd + 1); 87 72 88 - if (!cpu_is_mx1() && !cpu_is_mx21() && mfn >= 0x200) 73 + if (mfn_is_negative(mfn)) 89 74 ll = -ll; 90 75 91 76 ll = (rate * mfi) + ll;
+5
arch/arm/mach-imx/clk-vf610.c
··· 298 298 clk[VF610_CLK_FLEXCAN0] = imx_clk_gate2("flexcan0", "ipg_bus", CCM_CCGR0, CCM_CCGRx_CGn(0)); 299 299 clk[VF610_CLK_FLEXCAN1] = imx_clk_gate2("flexcan1", "ipg_bus", CCM_CCGR9, CCM_CCGRx_CGn(4)); 300 300 301 + clk[VF610_CLK_DMAMUX0] = imx_clk_gate2("dmamux0", "platform_bus", CCM_CCGR0, CCM_CCGRx_CGn(4)); 302 + clk[VF610_CLK_DMAMUX1] = imx_clk_gate2("dmamux1", "platform_bus", CCM_CCGR0, CCM_CCGRx_CGn(5)); 303 + clk[VF610_CLK_DMAMUX2] = imx_clk_gate2("dmamux2", "platform_bus", CCM_CCGR6, CCM_CCGRx_CGn(1)); 304 + clk[VF610_CLK_DMAMUX3] = imx_clk_gate2("dmamux3", "platform_bus", CCM_CCGR6, CCM_CCGRx_CGn(2)); 305 + 301 306 clk_set_parent(clk[VF610_CLK_QSPI0_SEL], clk[VF610_CLK_PLL1_PFD4]); 302 307 clk_set_rate(clk[VF610_CLK_QSPI0_X4_DIV], clk_get_rate(clk[VF610_CLK_QSPI0_SEL]) / 2); 303 308 clk_set_rate(clk[VF610_CLK_QSPI0_X2_DIV], clk_get_rate(clk[VF610_CLK_QSPI0_X4_DIV]) / 2);
+1
arch/arm/mach-imx/common.h
··· 108 108 #define imx27_handle_irq avic_handle_irq 109 109 #define imx31_handle_irq avic_handle_irq 110 110 #define imx35_handle_irq avic_handle_irq 111 + #define imx50_handle_irq tzic_handle_irq 111 112 #define imx51_handle_irq tzic_handle_irq 112 113 #define imx53_handle_irq tzic_handle_irq 113 114
+1 -1
arch/arm/mach-imx/imx31-dt.c
··· 25 25 of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); 26 26 } 27 27 28 - static const char *imx31_dt_board_compat[] __initdata = { 28 + static const char *imx31_dt_board_compat[] __initconst = { 29 29 "fsl,imx31", 30 30 NULL 31 31 };
+50
arch/arm/mach-imx/imx35-dt.c
··· 1 + /* 2 + * Copyright 2012 Steffen Trumtrar, Pengutronix 3 + * 4 + * based on imx27-dt.c 5 + * 6 + * This program is free software; you can redistribute it and/or modify it under 7 + * the terms of the GNU General Public License version 2 as published by the 8 + * Free Software Foundation. 9 + */ 10 + 11 + #include <linux/irq.h> 12 + #include <linux/irqdomain.h> 13 + #include <linux/of_irq.h> 14 + #include <linux/of_platform.h> 15 + #include <linux/clk-provider.h> 16 + #include <linux/clocksource.h> 17 + #include <asm/mach/arch.h> 18 + #include <asm/mach/time.h> 19 + #include <asm/hardware/cache-l2x0.h> 20 + #include "common.h" 21 + #include "mx35.h" 22 + 23 + static void __init imx35_dt_init(void) 24 + { 25 + mxc_arch_reset_init_dt(); 26 + 27 + of_platform_populate(NULL, of_default_bus_match_table, 28 + NULL, NULL); 29 + } 30 + 31 + static void __init imx35_irq_init(void) 32 + { 33 + imx_init_l2cache(); 34 + mx35_init_irq(); 35 + } 36 + 37 + static const char *imx35_dt_board_compat[] __initconst = { 38 + "fsl,imx35", 39 + NULL 40 + }; 41 + 42 + DT_MACHINE_START(IMX35_DT, "Freescale i.MX35 (Device Tree Support)") 43 + .map_io = mx35_map_io, 44 + .init_early = imx35_init_early, 45 + .init_irq = imx35_irq_init, 46 + .handle_irq = imx35_handle_irq, 47 + .init_machine = imx35_dt_init, 48 + .dt_compat = imx35_dt_board_compat, 49 + .restart = mxc_restart, 50 + MACHINE_END
+1 -1
arch/arm/mach-imx/imx51-dt.c
··· 29 29 platform_device_register_full(&devinfo); 30 30 } 31 31 32 - static const char *imx51_dt_board_compat[] __initdata = { 32 + static const char *imx51_dt_board_compat[] __initconst = { 33 33 "fsl,imx51", 34 34 NULL 35 35 };
-1
arch/arm/mach-imx/irq-common.h
··· 24 24 25 25 struct mxc_extra_irq 26 26 { 27 - int (*set_priority)(unsigned char irq, unsigned char prio); 28 27 int (*set_irq_fiq)(unsigned int irq, unsigned int type); 29 28 }; 30 29
+38
arch/arm/mach-imx/mach-imx50.c
··· 1 + /* 2 + * Copyright 2013 Greg Ungerer <gerg@uclinux.org> 3 + * Copyright 2011 Freescale Semiconductor, Inc. All Rights Reserved. 4 + * Copyright 2011 Linaro Ltd. 5 + * 6 + * The code contained herein is licensed under the GNU General Public 7 + * License. You may obtain a copy of the GNU General Public License 8 + * Version 2 or later at the following locations: 9 + * 10 + * http://www.opensource.org/licenses/gpl-license.html 11 + * http://www.gnu.org/copyleft/gpl.html 12 + */ 13 + 14 + #include <linux/of_platform.h> 15 + #include <asm/mach/arch.h> 16 + 17 + #include "common.h" 18 + 19 + static void __init imx50_dt_init(void) 20 + { 21 + mxc_arch_reset_init_dt(); 22 + 23 + of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); 24 + } 25 + 26 + static const char *imx50_dt_board_compat[] __initconst = { 27 + "fsl,imx50", 28 + NULL 29 + }; 30 + 31 + DT_MACHINE_START(IMX50_DT, "Freescale i.MX50 (Device Tree Support)") 32 + .map_io = mx53_map_io, 33 + .init_irq = mx53_init_irq, 34 + .handle_irq = imx50_handle_irq, 35 + .init_machine = imx50_dt_init, 36 + .dt_compat = imx50_dt_board_compat, 37 + .restart = mxc_restart, 38 + MACHINE_END
+1 -1
arch/arm/mach-imx/mach-imx53.c
··· 31 31 of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); 32 32 } 33 33 34 - static const char *imx53_dt_board_compat[] __initdata = { 34 + static const char *imx53_dt_board_compat[] __initconst = { 35 35 "fsl,imx53", 36 36 NULL 37 37 };
+31 -1
arch/arm/mach-imx/mach-imx6q.c
··· 13 13 #include <linux/clk.h> 14 14 #include <linux/clkdev.h> 15 15 #include <linux/cpu.h> 16 + #include <linux/delay.h> 16 17 #include <linux/export.h> 17 18 #include <linux/init.h> 18 19 #include <linux/io.h> ··· 24 23 #include <linux/of_irq.h> 25 24 #include <linux/of_platform.h> 26 25 #include <linux/pm_opp.h> 26 + #include <linux/pci.h> 27 27 #include <linux/phy.h> 28 28 #include <linux/reboot.h> 29 29 #include <linux/regmap.h> ··· 79 77 80 78 return 0; 81 79 } 80 + 81 + /* 82 + * fixup for PLX PEX8909 bridge to configure GPIO1-7 as output High 83 + * as they are used for slots1-7 PERST# 84 + */ 85 + static void ventana_pciesw_early_fixup(struct pci_dev *dev) 86 + { 87 + u32 dw; 88 + 89 + if (!of_machine_is_compatible("gw,ventana")) 90 + return; 91 + 92 + if (dev->devfn != 0) 93 + return; 94 + 95 + pci_read_config_dword(dev, 0x62c, &dw); 96 + dw |= 0xaaa8; // GPIO1-7 outputs 97 + pci_write_config_dword(dev, 0x62c, dw); 98 + 99 + pci_read_config_dword(dev, 0x644, &dw); 100 + dw |= 0xfe; // GPIO1-7 output high 101 + pci_write_config_dword(dev, 0x644, dw); 102 + 103 + msleep(100); 104 + } 105 + DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_PLX, 0x8609, ventana_pciesw_early_fixup); 106 + DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_PLX, 0x8606, ventana_pciesw_early_fixup); 107 + DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_PLX, 0x8604, ventana_pciesw_early_fixup); 82 108 83 109 static int ar8031_phy_fixup(struct phy_device *dev) 84 110 { ··· 273 243 irqchip_init(); 274 244 } 275 245 276 - static const char *imx6q_dt_compat[] __initdata = { 246 + static const char *imx6q_dt_compat[] __initconst = { 277 247 "fsl,imx6dl", 278 248 "fsl,imx6q", 279 249 NULL,
+9 -1
arch/arm/mach-imx/mach-imx6sl.c
··· 34 34 } 35 35 } 36 36 37 + static void __init imx6sl_init_late(void) 38 + { 39 + /* imx6sl reuses imx6q cpufreq driver */ 40 + if (IS_ENABLED(CONFIG_ARM_IMX6Q_CPUFREQ)) 41 + platform_device_register_simple("imx6q-cpufreq", -1, NULL, 0); 42 + } 43 + 37 44 static void __init imx6sl_init_machine(void) 38 45 { 39 46 struct device *parent; ··· 68 61 irqchip_init(); 69 62 } 70 63 71 - static const char *imx6sl_dt_compat[] __initdata = { 64 + static const char *imx6sl_dt_compat[] __initconst = { 72 65 "fsl,imx6sl", 73 66 NULL, 74 67 }; ··· 77 70 .map_io = debug_ll_io_init, 78 71 .init_irq = imx6sl_init_irq, 79 72 .init_machine = imx6sl_init_machine, 73 + .init_late = imx6sl_init_late, 80 74 .dt_compat = imx6sl_dt_compat, 81 75 .restart = mxc_restart, 82 76 MACHINE_END
+1 -1
arch/arm/mach-imx/mach-vf610.c
··· 26 26 irqchip_init(); 27 27 } 28 28 29 - static const char *vf610_dt_compat[] __initdata = { 29 + static const char *vf610_dt_compat[] __initconst = { 30 30 "fsl,vf610", 31 31 NULL, 32 32 };
-8
arch/arm/mach-imx/mm-imx5.c
··· 89 89 90 90 void __init imx53_init_early(void) 91 91 { 92 - struct device_node *np; 93 - void __iomem *base; 94 - 95 92 mxc_set_cpu_type(MXC_CPU_MX53); 96 - 97 - np = of_find_compatible_node(NULL, NULL, "fsl,imx53-iomuxc"); 98 - base = of_iomap(np, 0); 99 - WARN_ON(!base); 100 - mxc_iomux_v3_init(base); 101 93 imx_src_init(); 102 94 } 103 95
+12 -4
arch/arm/mach-imx/pm-imx6q.c
··· 156 156 } 157 157 158 158 /* 159 - * Unmask the always pending IOMUXC interrupt #32 as wakeup source to 160 - * deassert dsm_request signal, so that we can ensure dsm_request 161 - * is not asserted when we're going to write CLPCR register to set LPM. 162 - * After setting up LPM bits, we need to mask this wakeup source. 159 + * ERR007265: CCM: When improper low-power sequence is used, 160 + * the SoC enters low power mode before the ARM core executes WFI. 161 + * 162 + * Software workaround: 163 + * 1) Software should trigger IRQ #32 (IOMUX) to be always pending 164 + * by setting IOMUX_GPR1_GINT. 165 + * 2) Software should then unmask IRQ #32 in GPC before setting CCM 166 + * Low-Power mode. 167 + * 3) Software should mask IRQ #32 right after CCM Low-Power mode 168 + * is set (set bits 0-1 of CCM_CLPCR). 163 169 */ 164 170 iomuxc_irq_desc = irq_to_desc(32); 165 171 imx_gpc_irq_unmask(&iomuxc_irq_desc->irq_data); ··· 225 219 WARN_ON(!ccm_base); 226 220 227 221 /* 222 + * This is for SW workaround step #1 of ERR007265, see comments 223 + * in imx6q_set_lpm for details of this errata. 228 224 * Force IOMUXC irq pending, so that the interrupt to GPC can be 229 225 * used to deassert dsm_request signal when the signal gets 230 226 * asserted unexpectedly.
+2 -2
arch/arm/mach-imx/time.c
··· 111 111 112 112 static void __iomem *sched_clock_reg; 113 113 114 - static u32 notrace mxc_read_sched_clock(void) 114 + static u64 notrace mxc_read_sched_clock(void) 115 115 { 116 116 return sched_clock_reg ? __raw_readl(sched_clock_reg) : 0; 117 117 } ··· 123 123 124 124 sched_clock_reg = reg; 125 125 126 - setup_sched_clock(mxc_read_sched_clock, 32, c); 126 + sched_clock_register(mxc_read_sched_clock, 32, c); 127 127 return clocksource_mmio_init(reg, "mxc_timer1", c, 200, 32, 128 128 clocksource_mmio_readl_up); 129 129 }
+2 -2
arch/arm/mach-integrator/integrator_ap.c
··· 277 277 278 278 static unsigned long timer_reload; 279 279 280 - static u32 notrace integrator_read_sched_clock(void) 280 + static u64 notrace integrator_read_sched_clock(void) 281 281 { 282 282 return -readl((void __iomem *) TIMER2_VA_BASE + TIMER_VALUE); 283 283 } ··· 298 298 299 299 clocksource_mmio_init(base + TIMER_VALUE, "timer2", 300 300 rate, 200, 16, clocksource_mmio_readl_down); 301 - setup_sched_clock(integrator_read_sched_clock, 16, rate); 301 + sched_clock_register(integrator_read_sched_clock, 16, rate); 302 302 } 303 303 304 304 static void __iomem * clkevt_base;
+2 -2
arch/arm/mach-ixp4xx/common.c
··· 475 475 /* 476 476 * sched_clock() 477 477 */ 478 - static u32 notrace ixp4xx_read_sched_clock(void) 478 + static u64 notrace ixp4xx_read_sched_clock(void) 479 479 { 480 480 return *IXP4XX_OSTS; 481 481 } ··· 493 493 EXPORT_SYMBOL(ixp4xx_timer_freq); 494 494 static void __init ixp4xx_clocksource_init(void) 495 495 { 496 - setup_sched_clock(ixp4xx_read_sched_clock, 32, ixp4xx_timer_freq); 496 + sched_clock_register(ixp4xx_read_sched_clock, 32, ixp4xx_timer_freq); 497 497 498 498 clocksource_mmio_init(NULL, "OSTS", ixp4xx_timer_freq, 200, 32, 499 499 ixp4xx_clocksource_read);
+2
arch/arm/mach-keystone/Kconfig
··· 11 11 select ARM_ERRATA_798181 if SMP 12 12 select COMMON_CLK_KEYSTONE 13 13 select TI_EDMA 14 + select ARCH_SUPPORTS_BIG_ENDIAN 15 + select ZONE_DMA if ARM_LPAE 14 16 help 15 17 Support for boards based on the Texas Instruments Keystone family of 16 18 SoCs.
+4
arch/arm/mach-keystone/keystone.c
··· 41 41 if (WARN_ON(!keystone_rstctrl)) 42 42 pr_warn("ti,keystone-reset iomap error\n"); 43 43 44 + keystone_pm_runtime_init(); 44 45 of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); 45 46 } 46 47 ··· 69 68 } 70 69 71 70 DT_MACHINE_START(KEYSTONE, "Keystone") 71 + #if defined(CONFIG_ZONE_DMA) && defined(CONFIG_ARM_LPAE) 72 + .dma_zone_size = SZ_2G, 73 + #endif 72 74 .smp = smp_ops(keystone_smp_ops), 73 75 .init_machine = keystone_init, 74 76 .dt_compat = keystone_match,
+1
arch/arm/mach-keystone/keystone.h
··· 18 18 extern struct smp_operations keystone_smp_ops; 19 19 extern void secondary_startup(void); 20 20 extern u32 keystone_cpu_smc(u32 command, u32 cpu, u32 addr); 21 + extern int keystone_pm_runtime_init(void); 21 22 22 23 #endif /* __ASSEMBLER__ */ 23 24 #endif /* __KEYSTONE_H__ */
-2
arch/arm/mach-keystone/pm_domain.c
··· 74 74 if (!np) 75 75 return 0; 76 76 77 - of_clk_init(NULL); 78 77 pm_clk_add_notifier(&platform_bus_type, &platform_domain_notifier); 79 78 80 79 return 0; 81 80 } 82 - subsys_initcall(keystone_pm_runtime_init);
+2 -2
arch/arm/mach-mmp/time.c
··· 61 61 return __raw_readl(mmp_timer_base + TMR_CVWR(1)); 62 62 } 63 63 64 - static u32 notrace mmp_read_sched_clock(void) 64 + static u64 notrace mmp_read_sched_clock(void) 65 65 { 66 66 return timer_read(); 67 67 } ··· 195 195 { 196 196 timer_config(); 197 197 198 - setup_sched_clock(mmp_read_sched_clock, 32, CLOCK_TICK_RATE); 198 + sched_clock_register(mmp_read_sched_clock, 32, CLOCK_TICK_RATE); 199 199 200 200 ckevt.cpumask = cpumask_of(0); 201 201
+31
arch/arm/mach-moxart/Kconfig
··· 1 + config ARCH_MOXART 2 + bool "MOXA ART SoC" if ARCH_MULTI_V4T 3 + select CPU_FA526 4 + select ARM_DMA_MEM_BUFFERABLE 5 + select DMA_OF 6 + select USE_OF 7 + select CLKSRC_OF 8 + select CLKSRC_MMIO 9 + select HAVE_CLK 10 + select COMMON_CLK 11 + select GENERIC_IRQ_CHIP 12 + select ARCH_REQUIRE_GPIOLIB 13 + select GENERIC_CLOCKEVENTS 14 + select PHYLIB if NETDEVICES 15 + help 16 + Say Y here if you want to run your kernel on hardware with a 17 + MOXA ART SoC. 18 + The MOXA ART SoC is based on a Faraday FA526 ARMv4 32-bit 19 + 192 MHz CPU with MMU and 16KB/8KB D/I-cache (UC-7112-LX). 20 + Used on models UC-7101, UC-7112/UC-7110, IA240/IA241, IA3341. 21 + 22 + if ARCH_MOXART 23 + 24 + config MACH_UC7112LX 25 + bool "MOXA UC-7112-LX" 26 + depends on ARCH_MOXART 27 + help 28 + Say Y here if you intend to run this kernel on a MOXA 29 + UC-7112-LX embedded computer. 30 + 31 + endif
+3
arch/arm/mach-moxart/Makefile
··· 1 + # Object file lists. 2 + 3 + obj-$(CONFIG_MACH_UC7112LX) += moxart.o
+15
arch/arm/mach-moxart/moxart.c
··· 1 + /* 2 + * arch/arm/mach-moxart/moxart.c 3 + * 4 + * (C) Copyright 2013, Jonas Jensen <jonas.jensen@gmail.com> 5 + * 6 + * This program is free software; you can redistribute it and/or modify 7 + * it under the terms of the GNU General Public License as published by 8 + * the Free Software Foundation; either version 2 of the License, or 9 + * (at your option) any later version. 10 + * 11 + * This program is distributed in the hope that it will be useful, 12 + * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 + * GNU General Public License for more details. 15 + */
+48 -26
arch/arm/mach-msm/Kconfig
··· 1 + config ARCH_MSM 2 + bool 3 + 4 + config ARCH_MSM_DT 5 + bool "Qualcomm MSM DT Support" if ARCH_MULTI_V7 6 + select ARCH_MSM 7 + select ARCH_REQUIRE_GPIOLIB 8 + select CLKSRC_OF 9 + select GENERIC_CLOCKEVENTS 10 + help 11 + Support for Qualcomm's devicetree based MSM systems. 12 + 1 13 if ARCH_MSM 2 14 3 - comment "Qualcomm MSM SoC Type" 15 + menu "Qualcomm MSM SoC Selection" 4 16 depends on ARCH_MSM_DT 17 + 18 + config ARCH_MSM8X60 19 + bool "Enable support for MSM8X60" 20 + select ARM_GIC 21 + select CPU_V7 22 + select HAVE_SMP 23 + select MSM_SCM if SMP 24 + select MSM_TIMER 25 + 26 + config ARCH_MSM8960 27 + bool "Enable support for MSM8960" 28 + select ARM_GIC 29 + select CPU_V7 30 + select HAVE_SMP 31 + select MSM_SCM if SMP 32 + select MSM_TIMER 33 + 34 + config ARCH_MSM8974 35 + bool "Enable support for MSM8974" 36 + select ARM_GIC 37 + select CPU_V7 38 + select HAVE_ARM_ARCH_TIMER 39 + select HAVE_SMP 40 + select MSM_SCM if SMP 41 + 42 + endmenu 5 43 6 44 choice 7 45 prompt "Qualcomm MSM SoC Type" 8 46 default ARCH_MSM7X00A 9 - depends on !ARCH_MSM_DT 47 + depends on ARCH_MSM_NODT 10 48 11 49 config ARCH_MSM7X00A 12 50 bool "MSM7x00A / MSM7x01A" ··· 54 16 select MACH_TROUT if !MACH_HALIBUT 55 17 select MSM_PROC_COMM 56 18 select MSM_SMD 19 + select MSM_TIMER 57 20 select MSM_SMD_PKG3 58 21 59 22 config ARCH_MSM7X30 ··· 66 27 select MSM_GPIOMUX 67 28 select MSM_PROC_COMM 68 29 select MSM_SMD 30 + select MSM_TIMER 69 31 select MSM_VIC 70 32 71 33 config ARCH_QSD8X50 ··· 78 38 select MSM_GPIOMUX 79 39 select MSM_PROC_COMM 80 40 select MSM_SMD 41 + select MSM_TIMER 81 42 select MSM_VIC 82 43 83 44 endchoice 84 - 85 - config ARCH_MSM8X60 86 - bool "MSM8X60" 87 - select ARM_GIC 88 - select CPU_V7 89 - select GPIO_MSM_V2 90 - select HAVE_SMP 91 - select MSM_SCM if SMP 92 - 93 - config ARCH_MSM8960 94 - bool "MSM8960" 95 - select ARM_GIC 96 - select CPU_V7 97 - select HAVE_SMP 98 - select GPIO_MSM_V2 99 - select MSM_SCM if SMP 100 - 101 - config ARCH_MSM_DT 102 - def_bool y 103 - depends on (ARCH_MSM8X60 || ARCH_MSM8960) 104 - select SPARSE_IRQ 105 - select USE_OF 106 45 107 46 config MSM_HAS_DEBUG_UART_HS 108 47 bool ··· 99 80 bool 100 81 101 82 menu "Qualcomm MSM Board Type" 102 - depends on !ARCH_MSM_DT 83 + depends on ARCH_MSM_NODT 103 84 104 85 config MACH_HALIBUT 105 86 depends on ARCH_MSM ··· 147 128 148 129 config MSM_GPIOMUX 149 130 bool 150 - depends on !ARCH_MSM_DT 151 131 help 152 132 Support for MSM V1 TLMM GPIOMUX architecture. 153 133 154 134 config MSM_SCM 155 135 bool 136 + 137 + config MSM_TIMER 138 + bool 139 + 156 140 endif
+2 -2
arch/arm/mach-msm/Makefile
··· 1 - obj-y += timer.o 2 - obj-y += clock.o 1 + obj-$(CONFIG_MSM_TIMER) += timer.o 2 + obj-$(CONFIG_MSM_PROC_COMM) += clock.o 3 3 4 4 obj-$(CONFIG_MSM_VIC) += irq-vic.o 5 5
+2 -2
arch/arm/mach-msm/timer.c
··· 187 187 .notifier_call = msm_timer_cpu_notify, 188 188 }; 189 189 190 - static notrace u32 msm_sched_clock_read(void) 190 + static u64 notrace msm_sched_clock_read(void) 191 191 { 192 192 return msm_clocksource.read(&msm_clocksource); 193 193 } ··· 229 229 res = clocksource_register_hz(cs, dgt_hz); 230 230 if (res) 231 231 pr_err("clocksource_register failed\n"); 232 - setup_sched_clock(msm_sched_clock_read, sched_bits, dgt_hz); 232 + sched_clock_register(msm_sched_clock_read, sched_bits, dgt_hz); 233 233 } 234 234 235 235 #ifdef CONFIG_OF
+2 -2
arch/arm/mach-omap1/time.c
··· 181 181 * --------------------------------------------------------------------------- 182 182 */ 183 183 184 - static u32 notrace omap_mpu_read_sched_clock(void) 184 + static u64 notrace omap_mpu_read_sched_clock(void) 185 185 { 186 186 return ~omap_mpu_timer_read(1); 187 187 } ··· 193 193 "%s: can't register clocksource!\n"; 194 194 195 195 omap_mpu_timer_start(1, ~0, 1); 196 - setup_sched_clock(omap_mpu_read_sched_clock, 32, rate); 196 + sched_clock_register(omap_mpu_read_sched_clock, 32, rate); 197 197 198 198 if (clocksource_mmio_init(&timer->read_tim, "mpu_timer2", rate, 199 199 300, 32, clocksource_mmio_readl_down))
+2 -2
arch/arm/mach-omap2/timer.c
··· 379 379 .flags = CLOCK_SOURCE_IS_CONTINUOUS, 380 380 }; 381 381 382 - static u32 notrace dmtimer_read_sched_clock(void) 382 + static u64 notrace dmtimer_read_sched_clock(void) 383 383 { 384 384 if (clksrc.reserved) 385 385 return __omap_dm_timer_read_counter(&clksrc, ··· 471 471 __omap_dm_timer_load_start(&clksrc, 472 472 OMAP_TIMER_CTRL_ST | OMAP_TIMER_CTRL_AR, 0, 473 473 OMAP_TIMER_NONPOSTED); 474 - setup_sched_clock(dmtimer_read_sched_clock, 32, clksrc.rate); 474 + sched_clock_register(dmtimer_read_sched_clock, 32, clksrc.rate); 475 475 476 476 if (clocksource_register_hz(&clocksource_gpt, clksrc.rate)) 477 477 pr_err("Could not register clocksource %s\n",
+2 -2
arch/arm/mach-pxa/time.c
··· 33 33 * calls to sched_clock() which should always be the case in practice. 34 34 */ 35 35 36 - static u32 notrace pxa_read_sched_clock(void) 36 + static u64 notrace pxa_read_sched_clock(void) 37 37 { 38 38 return readl_relaxed(OSCR); 39 39 } ··· 149 149 writel_relaxed(0, OIER); 150 150 writel_relaxed(OSSR_M0 | OSSR_M1 | OSSR_M2 | OSSR_M3, OSSR); 151 151 152 - setup_sched_clock(pxa_read_sched_clock, 32, clock_tick_rate); 152 + sched_clock_register(pxa_read_sched_clock, 32, clock_tick_rate); 153 153 154 154 ckevt_pxa_osmr0.cpumask = cpumask_of(0); 155 155
+2 -2
arch/arm/mach-sa1100/time.c
··· 20 20 #include <mach/hardware.h> 21 21 #include <mach/irqs.h> 22 22 23 - static u32 notrace sa1100_read_sched_clock(void) 23 + static u64 notrace sa1100_read_sched_clock(void) 24 24 { 25 25 return readl_relaxed(OSCR); 26 26 } ··· 122 122 writel_relaxed(0, OIER); 123 123 writel_relaxed(OSSR_M0 | OSSR_M1 | OSSR_M2 | OSSR_M3, OSSR); 124 124 125 - setup_sched_clock(sa1100_read_sched_clock, 32, 3686400); 125 + sched_clock_register(sa1100_read_sched_clock, 32, 3686400); 126 126 127 127 ckevt_sa1100_osmr0.cpumask = cpumask_of(0); 128 128
+16 -8
arch/arm/mach-shmobile/Kconfig
··· 1 + config ARCH_SHMOBILE 2 + bool 3 + 1 4 config ARCH_SHMOBILE_MULTI 2 5 bool "SH-Mobile Series" if ARCH_MULTI_V7 3 6 depends on MMU 7 + select ARCH_SHMOBILE 4 8 select CPU_V7 5 9 select GENERIC_CLOCKEVENTS 6 10 select HAVE_ARM_SCU if SMP ··· 12 8 select HAVE_SMP 13 9 select ARM_GIC 14 10 select MIGHT_HAVE_CACHE_L2X0 11 + select MIGHT_HAVE_PCI 15 12 select NO_IOPORT 16 13 select PINCTRL 17 14 select ARCH_REQUIRE_GPIOLIB ··· 35 30 comment "SH-Mobile System Configuration" 36 31 endif 37 32 38 - if ARCH_SHMOBILE 33 + if ARCH_SHMOBILE_LEGACY 39 34 40 35 comment "SH-Mobile System Type" 41 36 ··· 97 92 select ARCH_WANT_OPTIONAL_GPIOLIB 98 93 select ARM_GIC 99 94 select CPU_V7 95 + select MIGHT_HAVE_PCI 100 96 select SH_CLK_CPG 101 97 select RENESAS_IRQC 102 98 103 99 config ARCH_R8A7791 104 100 bool "R-Car M2 (R8A77910)" 101 + select ARCH_WANT_OPTIONAL_GPIOLIB 105 102 select ARM_GIC 106 103 select CPU_V7 104 + select MIGHT_HAVE_PCI 107 105 select SH_CLK_CPG 106 + select RENESAS_IRQC 108 107 109 108 config ARCH_EMEV2 110 109 bool "Emma Mobile EV2" 111 110 select ARCH_WANT_OPTIONAL_GPIOLIB 112 111 select ARM_GIC 113 112 select CPU_V7 113 + select MIGHT_HAVE_PCI 114 + select USE_OF 115 + select AUTO_ZRELADDR 114 116 115 117 config ARCH_R7S72100 116 118 bool "RZ/A1H (R7S72100)" 119 + select ARCH_WANT_OPTIONAL_GPIOLIB 117 120 select ARM_GIC 118 121 select CPU_V7 119 122 select SH_CLK_CPG ··· 243 230 bool "Koelsch board" 244 231 depends on ARCH_R8A7791 245 232 select USE_OF 246 - 247 - config MACH_KZM9D 248 - bool "KZM9D board" 249 - depends on ARCH_EMEV2 250 - select REGULATOR_FIXED_VOLTAGE if REGULATOR 251 - select USE_OF 233 + select MICREL_PHY if SH_ETH 252 234 253 235 config MACH_KZM9G 254 236 bool "KZM-A9-GT board" ··· 282 274 283 275 endif 284 276 285 - if ARCH_SHMOBILE || ARCH_SHMOBILE_MULTI 277 + if ARCH_SHMOBILE 286 278 287 279 menu "Timer and clock configuration" 288 280
-1
arch/arm/mach-shmobile/Makefile
··· 71 71 obj-$(CONFIG_MACH_ARMADILLO800EVA) += board-armadillo800eva.o 72 72 obj-$(CONFIG_MACH_ARMADILLO800EVA_REFERENCE) += board-armadillo800eva-reference.o 73 73 obj-$(CONFIG_MACH_KOELSCH) += board-koelsch.o 74 - obj-$(CONFIG_MACH_KZM9D) += board-kzm9d.o 75 74 obj-$(CONFIG_MACH_KZM9G) += board-kzm9g.o 76 75 obj-$(CONFIG_MACH_KZM9G_REFERENCE) += board-kzm9g-reference.o 77 76 endif
-1
arch/arm/mach-shmobile/Makefile.boot
··· 8 8 loadaddr-$(CONFIG_MACH_BOCKW_REFERENCE) += 0x60008000 9 9 loadaddr-$(CONFIG_MACH_GENMAI) += 0x8008000 10 10 loadaddr-$(CONFIG_MACH_KOELSCH) += 0x40008000 11 - loadaddr-$(CONFIG_MACH_KZM9D) += 0x40008000 12 11 loadaddr-$(CONFIG_MACH_KZM9G) += 0x41008000 13 12 loadaddr-$(CONFIG_MACH_KZM9G_REFERENCE) += 0x41008000 14 13 loadaddr-$(CONFIG_MACH_LAGER) += 0x40008000
+1
arch/arm/mach-shmobile/board-bockw.c
··· 25 25 #include <linux/mmc/sh_mmcif.h> 26 26 #include <linux/mtd/partitions.h> 27 27 #include <linux/pinctrl/machine.h> 28 + #include <linux/platform_data/camera-rcar.h> 28 29 #include <linux/platform_data/usb-rcar-phy.h> 29 30 #include <linux/platform_device.h> 30 31 #include <linux/regulator/fixed.h>
-92
arch/arm/mach-shmobile/board-kzm9d.c
··· 1 - /* 2 - * kzm9d board support 3 - * 4 - * Copyright (C) 2012 Renesas Solutions Corp. 5 - * Copyright (C) 2012 Magnus Damm 6 - * 7 - * This program is free software; you can redistribute it and/or modify 8 - * it under the terms of the GNU General Public License as published by 9 - * the Free Software Foundation; version 2 of the License. 10 - * 11 - * This program is distributed in the hope that it will be useful, 12 - * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 - * GNU General Public License for more details. 15 - * 16 - * You should have received a copy of the GNU General Public License 17 - * along with this program; if not, write to the Free Software 18 - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 19 - */ 20 - 21 - #include <linux/kernel.h> 22 - #include <linux/interrupt.h> 23 - #include <linux/platform_device.h> 24 - #include <linux/regulator/fixed.h> 25 - #include <linux/regulator/machine.h> 26 - #include <linux/smsc911x.h> 27 - #include <mach/common.h> 28 - #include <mach/emev2.h> 29 - #include <asm/mach-types.h> 30 - #include <asm/mach/arch.h> 31 - 32 - /* Dummy supplies, where voltage doesn't matter */ 33 - static struct regulator_consumer_supply dummy_supplies[] = { 34 - REGULATOR_SUPPLY("vddvario", "smsc911x"), 35 - REGULATOR_SUPPLY("vdd33a", "smsc911x"), 36 - }; 37 - 38 - /* Ether */ 39 - static struct resource smsc911x_resources[] = { 40 - [0] = { 41 - .start = 0x20000000, 42 - .end = 0x2000ffff, 43 - .flags = IORESOURCE_MEM, 44 - }, 45 - [1] = { 46 - .start = EMEV2_GPIO_IRQ(1), 47 - .flags = IORESOURCE_IRQ | IRQF_TRIGGER_HIGH, 48 - }, 49 - }; 50 - 51 - static struct smsc911x_platform_config smsc911x_platdata = { 52 - .flags = SMSC911X_USE_32BIT, 53 - .irq_type = SMSC911X_IRQ_TYPE_PUSH_PULL, 54 - .irq_polarity = SMSC911X_IRQ_POLARITY_ACTIVE_HIGH, 55 - }; 56 - 57 - static struct platform_device smsc91x_device = { 58 - .name = "smsc911x", 59 - .id = -1, 60 - .dev = { 61 - .platform_data = &smsc911x_platdata, 62 - }, 63 - .num_resources = ARRAY_SIZE(smsc911x_resources), 64 - .resource = smsc911x_resources, 65 - }; 66 - 67 - static struct platform_device *kzm9d_devices[] __initdata = { 68 - &smsc91x_device, 69 - }; 70 - 71 - void __init kzm9d_add_standard_devices(void) 72 - { 73 - regulator_register_fixed(0, dummy_supplies, ARRAY_SIZE(dummy_supplies)); 74 - 75 - emev2_add_standard_devices(); 76 - 77 - platform_add_devices(kzm9d_devices, ARRAY_SIZE(kzm9d_devices)); 78 - } 79 - 80 - static const char *kzm9d_boards_compat_dt[] __initdata = { 81 - "renesas,kzm9d", 82 - NULL, 83 - }; 84 - 85 - DT_MACHINE_START(KZM9D_DT, "kzm9d") 86 - .smp = smp_ops(emev2_smp_ops), 87 - .map_io = emev2_map_io, 88 - .init_early = emev2_init_delay, 89 - .init_machine = kzm9d_add_standard_devices, 90 - .init_late = shmobile_init_late, 91 - .dt_compat = kzm9d_boards_compat_dt, 92 - MACHINE_END
+7 -1
arch/arm/mach-shmobile/clock-r7s72100.c
··· 27 27 #define FRQCR2 0xfcfe0014 28 28 #define STBCR3 0xfcfe0420 29 29 #define STBCR4 0xfcfe0424 30 + #define STBCR9 0xfcfe0438 30 31 31 32 #define PLL_RATE 30 32 33 ··· 145 144 | CLK_ENABLE_ON_INIT), 146 145 }; 147 146 148 - enum { MSTP47, MSTP46, MSTP45, MSTP44, MSTP43, MSTP42, MSTP41, MSTP40, 147 + enum { MSTP97, MSTP96, MSTP95, MSTP94, 148 + MSTP47, MSTP46, MSTP45, MSTP44, MSTP43, MSTP42, MSTP41, MSTP40, 149 149 MSTP33, MSTP_NR }; 150 150 151 151 static struct clk mstp_clks[MSTP_NR] = { 152 + [MSTP97] = SH_CLK_MSTP8(&peripheral0_clk, STBCR9, 7, 0), /* RIIC0 */ 153 + [MSTP96] = SH_CLK_MSTP8(&peripheral0_clk, STBCR9, 6, 0), /* RIIC1 */ 154 + [MSTP95] = SH_CLK_MSTP8(&peripheral0_clk, STBCR9, 5, 0), /* RIIC2 */ 155 + [MSTP94] = SH_CLK_MSTP8(&peripheral0_clk, STBCR9, 4, 0), /* RIIC3 */ 152 156 [MSTP47] = SH_CLK_MSTP8(&peripheral1_clk, STBCR4, 7, 0), /* SCIF0 */ 153 157 [MSTP46] = SH_CLK_MSTP8(&peripheral1_clk, STBCR4, 6, 0), /* SCIF1 */ 154 158 [MSTP45] = SH_CLK_MSTP8(&peripheral1_clk, STBCR4, 5, 0), /* SCIF2 */
+1
arch/arm/mach-shmobile/clock-r8a7740.c
··· 585 585 586 586 CLKDEV_DEV_ID("sh_cmt.10", &mstp_clks[MSTP329]), 587 587 CLKDEV_DEV_ID("sh_fsi2", &mstp_clks[MSTP328]), 588 + CLKDEV_DEV_ID("fe1f0000.sound", &mstp_clks[MSTP328]), 588 589 CLKDEV_DEV_ID("i2c-sh_mobile.1", &mstp_clks[MSTP323]), 589 590 CLKDEV_DEV_ID("e6c20000.i2c", &mstp_clks[MSTP323]), 590 591 CLKDEV_DEV_ID("renesas_usbhs", &mstp_clks[MSTP320]),
+31
arch/arm/mach-shmobile/clock-r8a7778.c
··· 115 115 }; 116 116 117 117 enum { 118 + MSTP531, MSTP530, 119 + MSTP529, MSTP528, MSTP527, MSTP526, MSTP525, MSTP524, MSTP523, 118 120 MSTP331, 119 121 MSTP323, MSTP322, MSTP321, 120 122 MSTP311, MSTP310, ··· 131 129 MSTP_NR }; 132 130 133 131 static struct clk mstp_clks[MSTP_NR] = { 132 + [MSTP531] = SH_CLK_MSTP32(&p_clk, MSTPCR5, 31, 0), /* SCU0 */ 133 + [MSTP530] = SH_CLK_MSTP32(&p_clk, MSTPCR5, 30, 0), /* SCU1 */ 134 + [MSTP529] = SH_CLK_MSTP32(&p_clk, MSTPCR5, 29, 0), /* SCU2 */ 135 + [MSTP528] = SH_CLK_MSTP32(&p_clk, MSTPCR5, 28, 0), /* SCU3 */ 136 + [MSTP527] = SH_CLK_MSTP32(&p_clk, MSTPCR5, 27, 0), /* SCU4 */ 137 + [MSTP526] = SH_CLK_MSTP32(&p_clk, MSTPCR5, 26, 0), /* SCU5 */ 138 + [MSTP525] = SH_CLK_MSTP32(&p_clk, MSTPCR5, 25, 0), /* SCU6 */ 139 + [MSTP524] = SH_CLK_MSTP32(&p_clk, MSTPCR5, 24, 0), /* SCU7 */ 140 + [MSTP523] = SH_CLK_MSTP32(&p_clk, MSTPCR5, 23, 0), /* SCU8 */ 134 141 [MSTP331] = SH_CLK_MSTP32(&s4_clk, MSTPCR3, 31, 0), /* MMC */ 135 142 [MSTP323] = SH_CLK_MSTP32(&p_clk, MSTPCR3, 23, 0), /* SDHI0 */ 136 143 [MSTP322] = SH_CLK_MSTP32(&p_clk, MSTPCR3, 22, 0), /* SDHI1 */ ··· 184 173 185 174 /* MSTP32 clocks */ 186 175 CLKDEV_DEV_ID("sh_mmcif", &mstp_clks[MSTP331]), /* MMC */ 176 + CLKDEV_DEV_ID("ffe4e000.mmcif", &mstp_clks[MSTP331]), /* MMC */ 187 177 CLKDEV_DEV_ID("sh_mobile_sdhi.0", &mstp_clks[MSTP323]), /* SDHI0 */ 178 + CLKDEV_DEV_ID("ffe4c000.sdhi", &mstp_clks[MSTP323]), /* SDHI0 */ 188 179 CLKDEV_DEV_ID("sh_mobile_sdhi.1", &mstp_clks[MSTP322]), /* SDHI1 */ 180 + CLKDEV_DEV_ID("ffe4d000.sdhi", &mstp_clks[MSTP322]), /* SDHI1 */ 189 181 CLKDEV_DEV_ID("sh_mobile_sdhi.2", &mstp_clks[MSTP321]), /* SDHI2 */ 182 + CLKDEV_DEV_ID("ffe4f000.sdhi", &mstp_clks[MSTP321]), /* SDHI2 */ 190 183 CLKDEV_DEV_ID("r8a777x-ether", &mstp_clks[MSTP114]), /* Ether */ 191 184 CLKDEV_DEV_ID("r8a7778-vin.0", &mstp_clks[MSTP110]), /* VIN0 */ 192 185 CLKDEV_DEV_ID("r8a7778-vin.1", &mstp_clks[MSTP109]), /* VIN1 */ ··· 198 183 CLKDEV_DEV_ID("ohci-platform", &mstp_clks[MSTP100]), /* USB OHCI port0/1 */ 199 184 CLKDEV_DEV_ID("renesas_usbhs", &mstp_clks[MSTP100]), /* USB FUNC */ 200 185 CLKDEV_DEV_ID("i2c-rcar.0", &mstp_clks[MSTP030]), /* I2C0 */ 186 + CLKDEV_DEV_ID("ffc70000.i2c", &mstp_clks[MSTP030]), /* I2C0 */ 201 187 CLKDEV_DEV_ID("i2c-rcar.1", &mstp_clks[MSTP029]), /* I2C1 */ 188 + CLKDEV_DEV_ID("ffc71000.i2c", &mstp_clks[MSTP029]), /* I2C1 */ 202 189 CLKDEV_DEV_ID("i2c-rcar.2", &mstp_clks[MSTP028]), /* I2C2 */ 190 + CLKDEV_DEV_ID("ffc72000.i2c", &mstp_clks[MSTP028]), /* I2C2 */ 203 191 CLKDEV_DEV_ID("i2c-rcar.3", &mstp_clks[MSTP027]), /* I2C3 */ 192 + CLKDEV_DEV_ID("ffc73000.i2c", &mstp_clks[MSTP027]), /* I2C3 */ 204 193 CLKDEV_DEV_ID("sh-sci.0", &mstp_clks[MSTP026]), /* SCIF0 */ 205 194 CLKDEV_DEV_ID("sh-sci.1", &mstp_clks[MSTP025]), /* SCIF1 */ 206 195 CLKDEV_DEV_ID("sh-sci.2", &mstp_clks[MSTP024]), /* SCIF2 */ ··· 214 195 CLKDEV_DEV_ID("sh_tmu.0", &mstp_clks[MSTP016]), /* TMU00 */ 215 196 CLKDEV_DEV_ID("sh_tmu.1", &mstp_clks[MSTP015]), /* TMU01 */ 216 197 CLKDEV_DEV_ID("sh-hspi.0", &mstp_clks[MSTP007]), /* HSPI0 */ 198 + CLKDEV_DEV_ID("fffc7000.spi", &mstp_clks[MSTP007]), /* HSPI0 */ 217 199 CLKDEV_DEV_ID("sh-hspi.1", &mstp_clks[MSTP007]), /* HSPI1 */ 200 + CLKDEV_DEV_ID("fffc8000.spi", &mstp_clks[MSTP007]), /* HSPI1 */ 218 201 CLKDEV_DEV_ID("sh-hspi.2", &mstp_clks[MSTP007]), /* HSPI2 */ 202 + CLKDEV_DEV_ID("fffc6000.spi", &mstp_clks[MSTP007]), /* HSPI2 */ 219 203 CLKDEV_DEV_ID("rcar_sound", &mstp_clks[MSTP008]), /* SRU */ 220 204 221 205 CLKDEV_ICK_ID("ssi.0", "rcar_sound", &mstp_clks[MSTP012]), ··· 230 208 CLKDEV_ICK_ID("ssi.6", "rcar_sound", &mstp_clks[MSTP309]), 231 209 CLKDEV_ICK_ID("ssi.7", "rcar_sound", &mstp_clks[MSTP308]), 232 210 CLKDEV_ICK_ID("ssi.8", "rcar_sound", &mstp_clks[MSTP307]), 211 + CLKDEV_ICK_ID("scu.0", "rcar_sound", &mstp_clks[MSTP531]), 212 + CLKDEV_ICK_ID("scu.1", "rcar_sound", &mstp_clks[MSTP530]), 213 + CLKDEV_ICK_ID("scu.2", "rcar_sound", &mstp_clks[MSTP529]), 214 + CLKDEV_ICK_ID("scu.3", "rcar_sound", &mstp_clks[MSTP528]), 215 + CLKDEV_ICK_ID("scu.4", "rcar_sound", &mstp_clks[MSTP527]), 216 + CLKDEV_ICK_ID("scu.5", "rcar_sound", &mstp_clks[MSTP526]), 217 + CLKDEV_ICK_ID("scu.6", "rcar_sound", &mstp_clks[MSTP525]), 218 + CLKDEV_ICK_ID("scu.7", "rcar_sound", &mstp_clks[MSTP524]), 219 + CLKDEV_ICK_ID("scu.8", "rcar_sound", &mstp_clks[MSTP523]), 233 220 }; 234 221 235 222 void __init r8a7778_clock_init(void)
+11
arch/arm/mach-shmobile/clock-r8a7779.c
··· 184 184 CLKDEV_DEV_ID("sh_tmu.1", &mstp_clks[MSTP016]), /* TMU01 */ 185 185 CLKDEV_DEV_ID("sh_tmu.2", &mstp_clks[MSTP016]), /* TMU02 */ 186 186 CLKDEV_DEV_ID("i2c-rcar.0", &mstp_clks[MSTP030]), /* I2C0 */ 187 + CLKDEV_DEV_ID("ffc70000.i2c", &mstp_clks[MSTP030]), /* I2C0 */ 187 188 CLKDEV_DEV_ID("i2c-rcar.1", &mstp_clks[MSTP029]), /* I2C1 */ 189 + CLKDEV_DEV_ID("ffc71000.i2c", &mstp_clks[MSTP029]), /* I2C1 */ 188 190 CLKDEV_DEV_ID("i2c-rcar.2", &mstp_clks[MSTP028]), /* I2C2 */ 191 + CLKDEV_DEV_ID("ffc72000.i2c", &mstp_clks[MSTP028]), /* I2C2 */ 189 192 CLKDEV_DEV_ID("i2c-rcar.3", &mstp_clks[MSTP027]), /* I2C3 */ 193 + CLKDEV_DEV_ID("ffc73000.i2c", &mstp_clks[MSTP027]), /* I2C3 */ 190 194 CLKDEV_DEV_ID("sh-sci.0", &mstp_clks[MSTP026]), /* SCIF0 */ 191 195 CLKDEV_DEV_ID("sh-sci.1", &mstp_clks[MSTP025]), /* SCIF1 */ 192 196 CLKDEV_DEV_ID("sh-sci.2", &mstp_clks[MSTP024]), /* SCIF2 */ ··· 198 194 CLKDEV_DEV_ID("sh-sci.4", &mstp_clks[MSTP022]), /* SCIF4 */ 199 195 CLKDEV_DEV_ID("sh-sci.5", &mstp_clks[MSTP021]), /* SCIF6 */ 200 196 CLKDEV_DEV_ID("sh-hspi.0", &mstp_clks[MSTP007]), /* HSPI0 */ 197 + CLKDEV_DEV_ID("fffc7000.spi", &mstp_clks[MSTP007]), /* HSPI0 */ 201 198 CLKDEV_DEV_ID("sh-hspi.1", &mstp_clks[MSTP007]), /* HSPI1 */ 199 + CLKDEV_DEV_ID("fffc8000.spi", &mstp_clks[MSTP007]), /* HSPI1 */ 202 200 CLKDEV_DEV_ID("sh-hspi.2", &mstp_clks[MSTP007]), /* HSPI2 */ 201 + CLKDEV_DEV_ID("fffc6000.spi", &mstp_clks[MSTP007]), /* HSPI2 */ 203 202 CLKDEV_DEV_ID("sh_mobile_sdhi.0", &mstp_clks[MSTP323]), /* SDHI0 */ 203 + CLKDEV_DEV_ID("ffe4c000.sdhi", &mstp_clks[MSTP323]), /* SDHI0 */ 204 204 CLKDEV_DEV_ID("sh_mobile_sdhi.1", &mstp_clks[MSTP322]), /* SDHI1 */ 205 + CLKDEV_DEV_ID("ffe4d000.sdhi", &mstp_clks[MSTP322]), /* SDHI1 */ 205 206 CLKDEV_DEV_ID("sh_mobile_sdhi.2", &mstp_clks[MSTP321]), /* SDHI2 */ 207 + CLKDEV_DEV_ID("ffe4e000.sdhi", &mstp_clks[MSTP321]), /* SDHI2 */ 206 208 CLKDEV_DEV_ID("sh_mobile_sdhi.3", &mstp_clks[MSTP320]), /* SDHI3 */ 209 + CLKDEV_DEV_ID("ffe4f000.sdhi", &mstp_clks[MSTP320]), /* SDHI3 */ 207 210 CLKDEV_DEV_ID("rcar-du-r8a7779", &mstp_clks[MSTP103]), /* DU */ 208 211 }; 209 212
+51 -11
arch/arm/mach-shmobile/clock-r8a7790.c
··· 53 53 #define SMSTPCR7 0xe615014c 54 54 #define SMSTPCR8 0xe6150990 55 55 #define SMSTPCR9 0xe6150994 56 + #define SMSTPCR10 0xe6150998 56 57 57 58 #define SDCKCR 0xE6150074 58 59 #define SD2CKCR 0xE6150078 ··· 183 182 184 183 /* MSTP */ 185 184 enum { 185 + MSTP1015, MSTP1014, MSTP1013, MSTP1012, MSTP1011, MSTP1010, 186 + MSTP1009, MSTP1008, MSTP1007, MSTP1006, MSTP1005, 186 187 MSTP931, MSTP930, MSTP929, MSTP928, 188 + MSTP917, 187 189 MSTP813, 188 190 MSTP726, MSTP725, MSTP724, MSTP723, MSTP722, MSTP721, MSTP720, 189 191 MSTP717, MSTP716, 192 + MSTP704, 190 193 MSTP522, 191 194 MSTP315, MSTP314, MSTP313, MSTP312, MSTP311, MSTP305, MSTP304, 192 195 MSTP216, MSTP207, MSTP206, MSTP204, MSTP203, MSTP202, ··· 199 194 }; 200 195 201 196 static struct clk mstp_clks[MSTP_NR] = { 202 - [MSTP931] = SH_CLK_MSTP32(&hp_clk, SMSTPCR9, 31, 0), /* I2C0 */ 203 - [MSTP930] = SH_CLK_MSTP32(&hp_clk, SMSTPCR9, 30, 0), /* I2C1 */ 204 - [MSTP929] = SH_CLK_MSTP32(&hp_clk, SMSTPCR9, 29, 0), /* I2C2 */ 205 - [MSTP928] = SH_CLK_MSTP32(&hp_clk, SMSTPCR9, 28, 0), /* I2C3 */ 197 + [MSTP1015] = SH_CLK_MSTP32(&p_clk, SMSTPCR10, 15, 0), /* SSI0 */ 198 + [MSTP1014] = SH_CLK_MSTP32(&p_clk, SMSTPCR10, 14, 0), /* SSI1 */ 199 + [MSTP1013] = SH_CLK_MSTP32(&p_clk, SMSTPCR10, 13, 0), /* SSI2 */ 200 + [MSTP1012] = SH_CLK_MSTP32(&p_clk, SMSTPCR10, 12, 0), /* SSI3 */ 201 + [MSTP1011] = SH_CLK_MSTP32(&p_clk, SMSTPCR10, 11, 0), /* SSI4 */ 202 + [MSTP1010] = SH_CLK_MSTP32(&p_clk, SMSTPCR10, 10, 0), /* SSI5 */ 203 + [MSTP1009] = SH_CLK_MSTP32(&p_clk, SMSTPCR10, 9, 0), /* SSI6 */ 204 + [MSTP1008] = SH_CLK_MSTP32(&p_clk, SMSTPCR10, 8, 0), /* SSI7 */ 205 + [MSTP1007] = SH_CLK_MSTP32(&p_clk, SMSTPCR10, 7, 0), /* SSI8 */ 206 + [MSTP1006] = SH_CLK_MSTP32(&p_clk, SMSTPCR10, 6, 0), /* SSI9 */ 207 + [MSTP1005] = SH_CLK_MSTP32(&p_clk, SMSTPCR10, 5, 0), /* SSI ALL */ 208 + [MSTP931] = SH_CLK_MSTP32(&p_clk, SMSTPCR9, 31, 0), /* I2C0 */ 209 + [MSTP930] = SH_CLK_MSTP32(&p_clk, SMSTPCR9, 30, 0), /* I2C1 */ 210 + [MSTP929] = SH_CLK_MSTP32(&p_clk, SMSTPCR9, 29, 0), /* I2C2 */ 211 + [MSTP928] = SH_CLK_MSTP32(&p_clk, SMSTPCR9, 28, 0), /* I2C3 */ 212 + [MSTP917] = SH_CLK_MSTP32(&qspi_clk, SMSTPCR9, 17, 0), /* QSPI */ 206 213 [MSTP813] = SH_CLK_MSTP32(&p_clk, SMSTPCR8, 13, 0), /* Ether */ 207 214 [MSTP726] = SH_CLK_MSTP32(&zx_clk, SMSTPCR7, 26, 0), /* LVDS0 */ 208 215 [MSTP725] = SH_CLK_MSTP32(&zx_clk, SMSTPCR7, 25, 0), /* LVDS1 */ ··· 225 208 [MSTP720] = SH_CLK_MSTP32(&p_clk, SMSTPCR7, 20, 0), /* SCIF1 */ 226 209 [MSTP717] = SH_CLK_MSTP32(&zs_clk, SMSTPCR7, 17, 0), /* HSCIF0 */ 227 210 [MSTP716] = SH_CLK_MSTP32(&zs_clk, SMSTPCR7, 16, 0), /* HSCIF1 */ 211 + [MSTP704] = SH_CLK_MSTP32(&mp_clk, SMSTPCR7, 4, 0), /* HSUSB */ 228 212 [MSTP522] = SH_CLK_MSTP32(&extal_clk, SMSTPCR5, 22, 0), /* Thermal */ 229 213 [MSTP315] = SH_CLK_MSTP32(&div6_clks[DIV6_MMC0], SMSTPCR3, 15, 0), /* MMC0 */ 230 214 [MSTP314] = SH_CLK_MSTP32(&div4_clks[DIV4_SD0], SMSTPCR3, 14, 0), /* SDHI0 */ ··· 280 262 CLKDEV_CON_ID("ssprs", &div6_clks[DIV6_SSPRS]), 281 263 282 264 /* MSTP */ 283 - CLKDEV_ICK_ID("lvds.0", "rcar-du-r8a7790", &mstp_clks[MSTP726]), 284 - CLKDEV_ICK_ID("lvds.1", "rcar-du-r8a7790", &mstp_clks[MSTP725]), 285 - CLKDEV_ICK_ID("du.0", "rcar-du-r8a7790", &mstp_clks[MSTP724]), 286 - CLKDEV_ICK_ID("du.1", "rcar-du-r8a7790", &mstp_clks[MSTP723]), 287 - CLKDEV_ICK_ID("du.2", "rcar-du-r8a7790", &mstp_clks[MSTP722]), 265 + CLKDEV_DEV_ID("rcar_sound", &mstp_clks[MSTP1005]), 288 266 CLKDEV_DEV_ID("sh-sci.0", &mstp_clks[MSTP204]), 289 267 CLKDEV_DEV_ID("sh-sci.1", &mstp_clks[MSTP203]), 290 268 CLKDEV_DEV_ID("sh-sci.2", &mstp_clks[MSTP206]), ··· 292 278 CLKDEV_DEV_ID("sh-sci.8", &mstp_clks[MSTP717]), 293 279 CLKDEV_DEV_ID("sh-sci.9", &mstp_clks[MSTP716]), 294 280 CLKDEV_DEV_ID("e6508000.i2c", &mstp_clks[MSTP931]), 281 + CLKDEV_DEV_ID("i2c-rcar_gen2.0", &mstp_clks[MSTP931]), 295 282 CLKDEV_DEV_ID("e6518000.i2c", &mstp_clks[MSTP930]), 283 + CLKDEV_DEV_ID("i2c-rcar_gen2.1", &mstp_clks[MSTP930]), 296 284 CLKDEV_DEV_ID("e6530000.i2c", &mstp_clks[MSTP929]), 285 + CLKDEV_DEV_ID("i2c-rcar_gen2.2", &mstp_clks[MSTP929]), 297 286 CLKDEV_DEV_ID("e6540000.i2c", &mstp_clks[MSTP928]), 287 + CLKDEV_DEV_ID("i2c-rcar_gen2.3", &mstp_clks[MSTP928]), 298 288 CLKDEV_DEV_ID("r8a7790-ether", &mstp_clks[MSTP813]), 289 + CLKDEV_DEV_ID("e61f0000.thermal", &mstp_clks[MSTP522]), 299 290 CLKDEV_DEV_ID("rcar_thermal", &mstp_clks[MSTP522]), 300 291 CLKDEV_DEV_ID("ee200000.mmcif", &mstp_clks[MSTP315]), 301 292 CLKDEV_DEV_ID("sh_mmcif.0", &mstp_clks[MSTP315]), ··· 315 296 CLKDEV_DEV_ID("ee220000.mmcif", &mstp_clks[MSTP305]), 316 297 CLKDEV_DEV_ID("sh_mmcif.1", &mstp_clks[MSTP305]), 317 298 CLKDEV_DEV_ID("sh_cmt.0", &mstp_clks[MSTP124]), 299 + CLKDEV_DEV_ID("qspi.0", &mstp_clks[MSTP917]), 300 + CLKDEV_DEV_ID("renesas_usbhs", &mstp_clks[MSTP704]), 301 + 302 + /* ICK */ 303 + CLKDEV_ICK_ID("usbhs", "usb_phy_rcar_gen2", &mstp_clks[MSTP704]), 304 + CLKDEV_ICK_ID("lvds.0", "rcar-du-r8a7790", &mstp_clks[MSTP726]), 305 + CLKDEV_ICK_ID("lvds.1", "rcar-du-r8a7790", &mstp_clks[MSTP725]), 306 + CLKDEV_ICK_ID("du.0", "rcar-du-r8a7790", &mstp_clks[MSTP724]), 307 + CLKDEV_ICK_ID("du.1", "rcar-du-r8a7790", &mstp_clks[MSTP723]), 308 + CLKDEV_ICK_ID("du.2", "rcar-du-r8a7790", &mstp_clks[MSTP722]), 309 + CLKDEV_ICK_ID("ssi.0", "rcar_sound", &mstp_clks[MSTP1015]), 310 + CLKDEV_ICK_ID("ssi.1", "rcar_sound", &mstp_clks[MSTP1014]), 311 + CLKDEV_ICK_ID("ssi.2", "rcar_sound", &mstp_clks[MSTP1013]), 312 + CLKDEV_ICK_ID("ssi.3", "rcar_sound", &mstp_clks[MSTP1012]), 313 + CLKDEV_ICK_ID("ssi.4", "rcar_sound", &mstp_clks[MSTP1011]), 314 + CLKDEV_ICK_ID("ssi.5", "rcar_sound", &mstp_clks[MSTP1010]), 315 + CLKDEV_ICK_ID("ssi.6", "rcar_sound", &mstp_clks[MSTP1009]), 316 + CLKDEV_ICK_ID("ssi.7", "rcar_sound", &mstp_clks[MSTP1008]), 317 + CLKDEV_ICK_ID("ssi.8", "rcar_sound", &mstp_clks[MSTP1007]), 318 + CLKDEV_ICK_ID("ssi.9", "rcar_sound", &mstp_clks[MSTP1006]), 319 + 318 320 }; 319 321 320 322 #define R8A7790_CLOCK_ROOT(e, m, p0, p1, p30, p31) \ ··· 361 321 R8A7790_CLOCK_ROOT(20, &extal_clk, 130, 156, 80, 66); 362 322 break; 363 323 case MD(14): 364 - R8A7790_CLOCK_ROOT(26, &extal_div2_clk, 200, 240, 122, 102); 324 + R8A7790_CLOCK_ROOT(26 / 2, &extal_div2_clk, 200, 240, 122, 102); 365 325 break; 366 326 case MD(13) | MD(14): 367 - R8A7790_CLOCK_ROOT(30, &extal_div2_clk, 172, 208, 106, 88); 327 + R8A7790_CLOCK_ROOT(30 / 2, &extal_div2_clk, 172, 208, 106, 88); 368 328 break; 369 329 } 370 330
+16 -1
arch/arm/mach-shmobile/clock-r8a7791.c
··· 103 103 SH_FIXED_RATIO_CLK_SET(p_clk, pll1_clk, 1, 24); 104 104 SH_FIXED_RATIO_CLK_SET(rclk_clk, pll1_clk, 1, (48 * 1024)); 105 105 SH_FIXED_RATIO_CLK_SET(mp_clk, pll1_div2_clk, 1, 15); 106 + SH_FIXED_RATIO_CLK_SET(zx_clk, pll1_clk, 1, 3); 106 107 107 108 static struct clk *main_clks[] = { 108 109 &extal_clk, ··· 117 116 &rclk_clk, 118 117 &mp_clk, 119 118 &cp_clk, 119 + &zx_clk, 120 120 }; 121 121 122 122 /* MSTP */ 123 123 enum { 124 - MSTP721, MSTP720, 124 + MSTP813, 125 + MSTP726, MSTP724, MSTP723, MSTP721, MSTP720, 125 126 MSTP719, MSTP718, MSTP715, MSTP714, 127 + MSTP522, 126 128 MSTP216, MSTP207, MSTP206, 127 129 MSTP204, MSTP203, MSTP202, MSTP1105, MSTP1106, MSTP1107, 128 130 MSTP124, ··· 133 129 }; 134 130 135 131 static struct clk mstp_clks[MSTP_NR] = { 132 + [MSTP813] = SH_CLK_MSTP32(&p_clk, SMSTPCR8, 13, 0), /* Ether */ 133 + [MSTP726] = SH_CLK_MSTP32(&zx_clk, SMSTPCR7, 26, 0), /* LVDS0 */ 134 + [MSTP724] = SH_CLK_MSTP32(&zx_clk, SMSTPCR7, 24, 0), /* DU0 */ 135 + [MSTP723] = SH_CLK_MSTP32(&zx_clk, SMSTPCR7, 23, 0), /* DU1 */ 136 136 [MSTP721] = SH_CLK_MSTP32(&p_clk, SMSTPCR7, 21, 0), /* SCIF0 */ 137 137 [MSTP720] = SH_CLK_MSTP32(&p_clk, SMSTPCR7, 20, 0), /* SCIF1 */ 138 138 [MSTP719] = SH_CLK_MSTP32(&p_clk, SMSTPCR7, 19, 0), /* SCIF2 */ 139 139 [MSTP718] = SH_CLK_MSTP32(&p_clk, SMSTPCR7, 18, 0), /* SCIF3 */ 140 140 [MSTP715] = SH_CLK_MSTP32(&p_clk, SMSTPCR7, 15, 0), /* SCIF4 */ 141 141 [MSTP714] = SH_CLK_MSTP32(&p_clk, SMSTPCR7, 14, 0), /* SCIF5 */ 142 + [MSTP522] = SH_CLK_MSTP32(&extal_clk, SMSTPCR5, 22, 0), /* Thermal */ 142 143 [MSTP216] = SH_CLK_MSTP32(&mp_clk, SMSTPCR2, 16, 0), /* SCIFB2 */ 143 144 [MSTP207] = SH_CLK_MSTP32(&mp_clk, SMSTPCR2, 7, 0), /* SCIFB1 */ 144 145 [MSTP206] = SH_CLK_MSTP32(&mp_clk, SMSTPCR2, 6, 0), /* SCIFB0 */ ··· 173 164 CLKDEV_CON_ID("peripheral_clk", &hp_clk), 174 165 175 166 /* MSTP */ 167 + CLKDEV_ICK_ID("lvds.0", "rcar-du-r8a7791", &mstp_clks[MSTP726]), 168 + CLKDEV_ICK_ID("du.0", "rcar-du-r8a7791", &mstp_clks[MSTP724]), 169 + CLKDEV_ICK_ID("du.1", "rcar-du-r8a7791", &mstp_clks[MSTP723]), 176 170 CLKDEV_DEV_ID("sh-sci.0", &mstp_clks[MSTP204]), /* SCIFA0 */ 177 171 CLKDEV_DEV_ID("sh-sci.1", &mstp_clks[MSTP203]), /* SCIFA1 */ 178 172 CLKDEV_DEV_ID("sh-sci.2", &mstp_clks[MSTP206]), /* SCIFB0 */ ··· 192 180 CLKDEV_DEV_ID("sh-sci.13", &mstp_clks[MSTP1106]), /* SCIFA4 */ 193 181 CLKDEV_DEV_ID("sh-sci.14", &mstp_clks[MSTP1107]), /* SCIFA5 */ 194 182 CLKDEV_DEV_ID("sh_cmt.0", &mstp_clks[MSTP124]), 183 + CLKDEV_DEV_ID("e61f0000.thermal", &mstp_clks[MSTP522]), 184 + CLKDEV_DEV_ID("rcar_thermal", &mstp_clks[MSTP522]), 185 + CLKDEV_DEV_ID("r8a7791-ether", &mstp_clks[MSTP813]), /* Ether */ 195 186 }; 196 187 197 188 #define R8A7791_CLOCK_ROOT(e, m, p0, p1, p30, p31) \
+1
arch/arm/mach-shmobile/clock-sh73a0.c
··· 652 652 CLKDEV_DEV_ID("sh-sci.6", &mstp_clks[MSTP331]), /* SCIFA6 */ 653 653 CLKDEV_DEV_ID("sh_cmt.10", &mstp_clks[MSTP329]), /* CMT10 */ 654 654 CLKDEV_DEV_ID("sh_fsi2", &mstp_clks[MSTP328]), /* FSI */ 655 + CLKDEV_DEV_ID("ec230000.sound", &mstp_clks[MSTP328]), /* FSI */ 655 656 CLKDEV_DEV_ID("sh_irda.0", &mstp_clks[MSTP325]), /* IrDA */ 656 657 CLKDEV_DEV_ID("i2c-sh_mobile.1", &mstp_clks[MSTP323]), /* I2C1 */ 657 658 CLKDEV_DEV_ID("e6822000.i2c", &mstp_clks[MSTP323]), /* I2C1 */
-5
arch/arm/mach-shmobile/include/mach/emev2.h
··· 3 3 4 4 extern void emev2_map_io(void); 5 5 extern void emev2_init_delay(void); 6 - extern void emev2_add_standard_devices(void); 7 6 extern void emev2_clock_init(void); 8 - 9 - #define EMEV2_GPIO_BASE 200 10 - #define EMEV2_GPIO_IRQ(n) (EMEV2_GPIO_BASE + (n)) 11 - 12 7 extern struct smp_operations emev2_smp_ops; 13 8 14 9 #endif /* __ASM_EMEV2_H__ */
+38 -1
arch/arm/mach-shmobile/include/mach/r8a7778.h
··· 20 20 #define __ASM_R8A7778_H__ 21 21 22 22 #include <linux/sh_eth.h> 23 - #include <linux/platform_data/camera-rcar.h> 24 23 25 24 /* HPB-DMA slave IDs */ 26 25 enum { 27 26 HPBDMA_SLAVE_DUMMY, 28 27 HPBDMA_SLAVE_SDHI0_TX, 29 28 HPBDMA_SLAVE_SDHI0_RX, 29 + HPBDMA_SLAVE_SSI0_TX, 30 + HPBDMA_SLAVE_SSI0_RX, 31 + HPBDMA_SLAVE_SSI1_TX, 32 + HPBDMA_SLAVE_SSI1_RX, 33 + HPBDMA_SLAVE_SSI2_TX, 34 + HPBDMA_SLAVE_SSI2_RX, 35 + HPBDMA_SLAVE_SSI3_TX, 36 + HPBDMA_SLAVE_SSI3_RX, 37 + HPBDMA_SLAVE_SSI4_TX, 38 + HPBDMA_SLAVE_SSI4_RX, 39 + HPBDMA_SLAVE_SSI5_TX, 40 + HPBDMA_SLAVE_SSI5_RX, 41 + HPBDMA_SLAVE_SSI6_TX, 42 + HPBDMA_SLAVE_SSI6_RX, 43 + HPBDMA_SLAVE_SSI7_TX, 44 + HPBDMA_SLAVE_SSI7_RX, 45 + HPBDMA_SLAVE_SSI8_TX, 46 + HPBDMA_SLAVE_SSI8_RX, 47 + HPBDMA_SLAVE_HPBIF0_TX, 48 + HPBDMA_SLAVE_HPBIF0_RX, 49 + HPBDMA_SLAVE_HPBIF1_TX, 50 + HPBDMA_SLAVE_HPBIF1_RX, 51 + HPBDMA_SLAVE_HPBIF2_TX, 52 + HPBDMA_SLAVE_HPBIF2_RX, 53 + HPBDMA_SLAVE_HPBIF3_TX, 54 + HPBDMA_SLAVE_HPBIF3_RX, 55 + HPBDMA_SLAVE_HPBIF4_TX, 56 + HPBDMA_SLAVE_HPBIF4_RX, 57 + HPBDMA_SLAVE_HPBIF5_TX, 58 + HPBDMA_SLAVE_HPBIF5_RX, 59 + HPBDMA_SLAVE_HPBIF6_TX, 60 + HPBDMA_SLAVE_HPBIF6_RX, 61 + HPBDMA_SLAVE_HPBIF7_TX, 62 + HPBDMA_SLAVE_HPBIF7_RX, 63 + HPBDMA_SLAVE_HPBIF8_TX, 64 + HPBDMA_SLAVE_HPBIF8_RX, 65 + HPBDMA_SLAVE_USBFUNC_TX, 66 + HPBDMA_SLAVE_USBFUNC_RX, 30 67 }; 31 68 32 69 extern void r8a7778_add_standard_devices(void);
+1
arch/arm/mach-shmobile/include/mach/r8a7791.h
··· 4 4 void r8a7791_add_standard_devices(void); 5 5 void r8a7791_add_dt_devices(void); 6 6 void r8a7791_clock_init(void); 7 + void r8a7791_pinmux_init(void); 7 8 void r8a7791_init_early(void); 8 9 extern struct smp_operations r8a7791_smp_ops; 9 10
+12 -151
arch/arm/mach-shmobile/setup-emev2.c
··· 16 16 * along with this program; if not, write to the Free Software 17 17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 18 18 */ 19 + #include <linux/clk-provider.h> 19 20 #include <linux/kernel.h> 20 21 #include <linux/init.h> 21 - #include <linux/interrupt.h> 22 - #include <linux/irq.h> 23 - #include <linux/platform_device.h> 24 - #include <linux/platform_data/gpio-em.h> 25 22 #include <linux/of_platform.h> 26 - #include <linux/delay.h> 27 - #include <linux/input.h> 28 - #include <linux/io.h> 29 - #include <linux/irqchip/arm-gic.h> 30 23 #include <mach/common.h> 31 24 #include <mach/emev2.h> 32 - #include <mach/irqs.h> 33 25 #include <asm/mach-types.h> 34 26 #include <asm/mach/arch.h> 35 27 #include <asm/mach/map.h> 36 - #include <asm/mach/time.h> 37 28 38 29 static struct map_desc emev2_io_desc[] __initdata = { 39 30 #ifdef CONFIG_SMP ··· 43 52 iotable_init(emev2_io_desc, ARRAY_SIZE(emev2_io_desc)); 44 53 } 45 54 46 - /* UART */ 47 - static struct resource uart0_resources[] = { 48 - DEFINE_RES_MEM(0xe1020000, 0x38), 49 - DEFINE_RES_IRQ(40), 50 - }; 51 - 52 - static struct resource uart1_resources[] = { 53 - DEFINE_RES_MEM(0xe1030000, 0x38), 54 - DEFINE_RES_IRQ(41), 55 - }; 56 - 57 - static struct resource uart2_resources[] = { 58 - DEFINE_RES_MEM(0xe1040000, 0x38), 59 - DEFINE_RES_IRQ(42), 60 - }; 61 - 62 - static struct resource uart3_resources[] = { 63 - DEFINE_RES_MEM(0xe1050000, 0x38), 64 - DEFINE_RES_IRQ(43), 65 - }; 66 - 67 - #define emev2_register_uart(idx) \ 68 - platform_device_register_simple("serial8250-em", idx, \ 69 - uart##idx##_resources, \ 70 - ARRAY_SIZE(uart##idx##_resources)) 71 - 72 - /* STI */ 73 - static struct resource sti_resources[] = { 74 - DEFINE_RES_MEM(0xe0180000, 0x54), 75 - DEFINE_RES_IRQ(157), 76 - }; 77 - 78 - #define emev2_register_sti() \ 79 - platform_device_register_simple("em_sti", 0, \ 80 - sti_resources, \ 81 - ARRAY_SIZE(sti_resources)) 82 - 83 - /* GIO */ 84 - static struct gpio_em_config gio0_config = { 85 - .gpio_base = 0, 86 - .irq_base = EMEV2_GPIO_IRQ(0), 87 - .number_of_pins = 32, 88 - }; 89 - 90 - static struct resource gio0_resources[] = { 91 - DEFINE_RES_MEM(0xe0050000, 0x2c), 92 - DEFINE_RES_MEM(0xe0050040, 0x20), 93 - DEFINE_RES_IRQ(99), 94 - DEFINE_RES_IRQ(100), 95 - }; 96 - 97 - static struct gpio_em_config gio1_config = { 98 - .gpio_base = 32, 99 - .irq_base = EMEV2_GPIO_IRQ(32), 100 - .number_of_pins = 32, 101 - }; 102 - 103 - static struct resource gio1_resources[] = { 104 - DEFINE_RES_MEM(0xe0050080, 0x2c), 105 - DEFINE_RES_MEM(0xe00500c0, 0x20), 106 - DEFINE_RES_IRQ(101), 107 - DEFINE_RES_IRQ(102), 108 - }; 109 - 110 - static struct gpio_em_config gio2_config = { 111 - .gpio_base = 64, 112 - .irq_base = EMEV2_GPIO_IRQ(64), 113 - .number_of_pins = 32, 114 - }; 115 - 116 - static struct resource gio2_resources[] = { 117 - DEFINE_RES_MEM(0xe0050100, 0x2c), 118 - DEFINE_RES_MEM(0xe0050140, 0x20), 119 - DEFINE_RES_IRQ(103), 120 - DEFINE_RES_IRQ(104), 121 - }; 122 - 123 - static struct gpio_em_config gio3_config = { 124 - .gpio_base = 96, 125 - .irq_base = EMEV2_GPIO_IRQ(96), 126 - .number_of_pins = 32, 127 - }; 128 - 129 - static struct resource gio3_resources[] = { 130 - DEFINE_RES_MEM(0xe0050180, 0x2c), 131 - DEFINE_RES_MEM(0xe00501c0, 0x20), 132 - DEFINE_RES_IRQ(105), 133 - DEFINE_RES_IRQ(106), 134 - }; 135 - 136 - static struct gpio_em_config gio4_config = { 137 - .gpio_base = 128, 138 - .irq_base = EMEV2_GPIO_IRQ(128), 139 - .number_of_pins = 31, 140 - }; 141 - 142 - static struct resource gio4_resources[] = { 143 - DEFINE_RES_MEM(0xe0050200, 0x2c), 144 - DEFINE_RES_MEM(0xe0050240, 0x20), 145 - DEFINE_RES_IRQ(107), 146 - DEFINE_RES_IRQ(108), 147 - }; 148 - 149 - #define emev2_register_gio(idx) \ 150 - platform_device_register_resndata(&platform_bus, "em_gio", \ 151 - idx, gio##idx##_resources, \ 152 - ARRAY_SIZE(gio##idx##_resources), \ 153 - &gio##idx##_config, \ 154 - sizeof(struct gpio_em_config)) 155 - 156 - static struct resource pmu_resources[] = { 157 - DEFINE_RES_IRQ(152), 158 - DEFINE_RES_IRQ(153), 159 - }; 160 - 161 - #define emev2_register_pmu() \ 162 - platform_device_register_simple("arm-pmu", -1, \ 163 - pmu_resources, \ 164 - ARRAY_SIZE(pmu_resources)) 165 - 166 - void __init emev2_add_standard_devices(void) 167 - { 168 - if (!IS_ENABLED(CONFIG_COMMON_CLK)) 169 - emev2_clock_init(); 170 - 171 - emev2_register_uart(0); 172 - emev2_register_uart(1); 173 - emev2_register_uart(2); 174 - emev2_register_uart(3); 175 - emev2_register_sti(); 176 - emev2_register_gio(0); 177 - emev2_register_gio(1); 178 - emev2_register_gio(2); 179 - emev2_register_gio(3); 180 - emev2_register_gio(4); 181 - emev2_register_pmu(); 182 - } 183 - 184 55 void __init emev2_init_delay(void) 185 56 { 186 57 shmobile_setup_delay(533, 1, 3); /* Cortex-A9 @ 533MHz */ 187 58 } 188 59 189 - #ifdef CONFIG_USE_OF 60 + static void __init emev2_add_standard_devices_dt(void) 61 + { 62 + #ifdef CONFIG_COMMON_CLK 63 + of_clk_init(NULL); 64 + #else 65 + emev2_clock_init(); 66 + #endif 67 + of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); 68 + } 190 69 191 70 static const char *emev2_boards_compat_dt[] __initdata = { 192 71 "renesas,emev2", ··· 67 206 .smp = smp_ops(emev2_smp_ops), 68 207 .map_io = emev2_map_io, 69 208 .init_early = emev2_init_delay, 209 + .init_machine = emev2_add_standard_devices_dt, 210 + .init_late = shmobile_init_late, 70 211 .dt_compat = emev2_boards_compat_dt, 71 212 MACHINE_END 72 - 73 - #endif /* CONFIG_USE_OF */
+53 -29
arch/arm/mach-shmobile/setup-r7s72100.c
··· 22 22 #include <linux/kernel.h> 23 23 #include <linux/of_platform.h> 24 24 #include <linux/serial_sci.h> 25 + #include <linux/sh_timer.h> 25 26 #include <mach/common.h> 26 27 #include <mach/irqs.h> 27 28 #include <mach/r7s72100.h> 28 29 #include <asm/mach/arch.h> 29 30 30 - #define SCIF_DATA(index, baseaddr, irq) \ 31 - [index] = { \ 31 + #define R7S72100_SCIF(index, baseaddr, irq) \ 32 + static const struct plat_sci_port scif##index##_platform_data = { \ 32 33 .type = PORT_SCIF, \ 33 34 .regtype = SCIx_SH2_SCIF_FIFODATA_REGTYPE, \ 34 35 .flags = UPF_BOOT_AUTOCONF | UPF_IOREMAP, \ 35 - .scbrr_algo_id = SCBRR_ALGO_2, \ 36 36 .scscr = SCSCR_RIE | SCSCR_TIE | SCSCR_RE | SCSCR_TE | \ 37 37 SCSCR_REIE, \ 38 - .mapbase = baseaddr, \ 39 - .irqs = { irq + 1, irq + 2, irq + 3, irq }, \ 40 - } 38 + }; \ 39 + \ 40 + static struct resource scif##index##_resources[] = { \ 41 + DEFINE_RES_MEM(baseaddr, 0x100), \ 42 + DEFINE_RES_IRQ(irq + 1), \ 43 + DEFINE_RES_IRQ(irq + 2), \ 44 + DEFINE_RES_IRQ(irq + 3), \ 45 + DEFINE_RES_IRQ(irq), \ 46 + } \ 41 47 42 - enum { SCIF0, SCIF1, SCIF2, SCIF3, SCIF4, SCIF5, SCIF6, SCIF7 }; 48 + R7S72100_SCIF(0, 0xe8007000, gic_iid(221)); 49 + R7S72100_SCIF(1, 0xe8007800, gic_iid(225)); 50 + R7S72100_SCIF(2, 0xe8008000, gic_iid(229)); 51 + R7S72100_SCIF(3, 0xe8008800, gic_iid(233)); 52 + R7S72100_SCIF(4, 0xe8009000, gic_iid(237)); 53 + R7S72100_SCIF(5, 0xe8009800, gic_iid(241)); 54 + R7S72100_SCIF(6, 0xe800a000, gic_iid(245)); 55 + R7S72100_SCIF(7, 0xe800a800, gic_iid(249)); 43 56 44 - static const struct plat_sci_port scif[] __initconst = { 45 - SCIF_DATA(SCIF0, 0xe8007000, gic_iid(221)), /* SCIF0 */ 46 - SCIF_DATA(SCIF1, 0xe8007800, gic_iid(225)), /* SCIF1 */ 47 - SCIF_DATA(SCIF2, 0xe8008000, gic_iid(229)), /* SCIF2 */ 48 - SCIF_DATA(SCIF3, 0xe8008800, gic_iid(233)), /* SCIF3 */ 49 - SCIF_DATA(SCIF4, 0xe8009000, gic_iid(237)), /* SCIF4 */ 50 - SCIF_DATA(SCIF5, 0xe8009800, gic_iid(241)), /* SCIF5 */ 51 - SCIF_DATA(SCIF6, 0xe800a000, gic_iid(245)), /* SCIF6 */ 52 - SCIF_DATA(SCIF7, 0xe800a800, gic_iid(249)), /* SCIF7 */ 57 + #define r7s72100_register_scif(index) \ 58 + platform_device_register_resndata(&platform_bus, "sh-sci", index, \ 59 + scif##index##_resources, \ 60 + ARRAY_SIZE(scif##index##_resources), \ 61 + &scif##index##_platform_data, \ 62 + sizeof(scif##index##_platform_data)) 63 + 64 + 65 + static struct sh_timer_config mtu2_0_platform_data __initdata = { 66 + .name = "MTU2_0", 67 + .timer_bit = 0, 68 + .channel_offset = -0x80, 69 + .clockevent_rating = 200, 53 70 }; 54 71 55 - static inline void r7s72100_register_scif(int idx) 56 - { 57 - platform_device_register_data(&platform_bus, "sh-sci", idx, &scif[idx], 58 - sizeof(struct plat_sci_port)); 59 - } 72 + static struct resource mtu2_0_resources[] __initdata = { 73 + DEFINE_RES_MEM(0xfcff0300, 0x27), 74 + DEFINE_RES_IRQ(gic_iid(139)), /* MTU2 TGI0A */ 75 + }; 76 + 77 + #define r7s72100_register_mtu2(idx) \ 78 + platform_device_register_resndata(&platform_bus, "sh_mtu2", \ 79 + idx, mtu2_##idx##_resources, \ 80 + ARRAY_SIZE(mtu2_##idx##_resources), \ 81 + &mtu2_##idx##_platform_data, \ 82 + sizeof(struct sh_timer_config)) 60 83 61 84 void __init r7s72100_add_dt_devices(void) 62 85 { 63 - r7s72100_register_scif(SCIF0); 64 - r7s72100_register_scif(SCIF1); 65 - r7s72100_register_scif(SCIF2); 66 - r7s72100_register_scif(SCIF3); 67 - r7s72100_register_scif(SCIF4); 68 - r7s72100_register_scif(SCIF5); 69 - r7s72100_register_scif(SCIF6); 70 - r7s72100_register_scif(SCIF7); 86 + r7s72100_register_scif(0); 87 + r7s72100_register_scif(1); 88 + r7s72100_register_scif(2); 89 + r7s72100_register_scif(3); 90 + r7s72100_register_scif(4); 91 + r7s72100_register_scif(5); 92 + r7s72100_register_scif(6); 93 + r7s72100_register_scif(7); 94 + r7s72100_register_mtu2(0); 71 95 } 72 96 73 97 void __init r7s72100_init_early(void)
+33 -35
arch/arm/mach-shmobile/setup-r8a73a4.c
··· 40 40 ARRAY_SIZE(pfc_resources)); 41 41 } 42 42 43 - #define SCIF_COMMON(scif_type, baseaddr, irq) \ 43 + #define R8A73A4_SCIF(scif_type, _scscr, index, baseaddr, irq) \ 44 + static struct plat_sci_port scif##index##_platform_data = { \ 44 45 .type = scif_type, \ 45 - .mapbase = baseaddr, \ 46 46 .flags = UPF_BOOT_AUTOCONF | UPF_IOREMAP, \ 47 - .scbrr_algo_id = SCBRR_ALGO_4, \ 48 - .irqs = SCIx_IRQ_MUXED(irq) 49 - 50 - #define SCIFA_DATA(index, baseaddr, irq) \ 51 - [index] = { \ 52 - SCIF_COMMON(PORT_SCIFA, baseaddr, irq), \ 53 - .scscr = SCSCR_RE | SCSCR_TE | SCSCR_CKE0, \ 47 + .scscr = _scscr, \ 48 + }; \ 49 + \ 50 + static struct resource scif##index##_resources[] = { \ 51 + DEFINE_RES_MEM(baseaddr, 0x100), \ 52 + DEFINE_RES_IRQ(irq), \ 54 53 } 55 54 56 - #define SCIFB_DATA(index, baseaddr, irq) \ 57 - [index] = { \ 58 - SCIF_COMMON(PORT_SCIFB, baseaddr, irq), \ 59 - .scscr = SCSCR_RE | SCSCR_TE, \ 60 - } 55 + #define R8A73A4_SCIFA(index, baseaddr, irq) \ 56 + R8A73A4_SCIF(PORT_SCIFA, SCSCR_RE | SCSCR_TE | SCSCR_CKE0, \ 57 + index, baseaddr, irq) 61 58 62 - enum { SCIFA0, SCIFA1, SCIFB0, SCIFB1, SCIFB2, SCIFB3 }; 59 + #define R8A73A4_SCIFB(index, baseaddr, irq) \ 60 + R8A73A4_SCIF(PORT_SCIFB, SCSCR_RE | SCSCR_TE, \ 61 + index, baseaddr, irq) 63 62 64 - static const struct plat_sci_port scif[] = { 65 - SCIFA_DATA(SCIFA0, 0xe6c40000, gic_spi(144)), /* SCIFA0 */ 66 - SCIFA_DATA(SCIFA1, 0xe6c50000, gic_spi(145)), /* SCIFA1 */ 67 - SCIFB_DATA(SCIFB0, 0xe6c20000, gic_spi(148)), /* SCIFB0 */ 68 - SCIFB_DATA(SCIFB1, 0xe6c30000, gic_spi(149)), /* SCIFB1 */ 69 - SCIFB_DATA(SCIFB2, 0xe6ce0000, gic_spi(150)), /* SCIFB2 */ 70 - SCIFB_DATA(SCIFB3, 0xe6cf0000, gic_spi(151)), /* SCIFB3 */ 71 - }; 63 + R8A73A4_SCIFA(0, 0xe6c40000, gic_spi(144)); /* SCIFA0 */ 64 + R8A73A4_SCIFA(1, 0xe6c50000, gic_spi(145)); /* SCIFA1 */ 65 + R8A73A4_SCIFB(2, 0xe6c20000, gic_spi(148)); /* SCIFB0 */ 66 + R8A73A4_SCIFB(3, 0xe6c30000, gic_spi(149)); /* SCIFB1 */ 67 + R8A73A4_SCIFB(4, 0xe6ce0000, gic_spi(150)); /* SCIFB2 */ 68 + R8A73A4_SCIFB(5, 0xe6cf0000, gic_spi(151)); /* SCIFB3 */ 72 69 73 - static inline void r8a73a4_register_scif(int idx) 74 - { 75 - platform_device_register_data(&platform_bus, "sh-sci", idx, &scif[idx], 76 - sizeof(struct plat_sci_port)); 77 - } 70 + #define r8a73a4_register_scif(index) \ 71 + platform_device_register_resndata(&platform_bus, "sh-sci", index, \ 72 + scif##index##_resources, \ 73 + ARRAY_SIZE(scif##index##_resources), \ 74 + &scif##index##_platform_data, \ 75 + sizeof(scif##index##_platform_data)) 78 76 79 77 static const struct renesas_irqc_config irqc0_data = { 80 78 .irq_base = irq_pin(0), /* IRQ0 -> IRQ31 */ ··· 190 192 191 193 void __init r8a73a4_add_dt_devices(void) 192 194 { 193 - r8a73a4_register_scif(SCIFA0); 194 - r8a73a4_register_scif(SCIFA1); 195 - r8a73a4_register_scif(SCIFB0); 196 - r8a73a4_register_scif(SCIFB1); 197 - r8a73a4_register_scif(SCIFB2); 198 - r8a73a4_register_scif(SCIFB3); 195 + r8a73a4_register_scif(0); 196 + r8a73a4_register_scif(1); 197 + r8a73a4_register_scif(2); 198 + r8a73a4_register_scif(3); 199 + r8a73a4_register_scif(4); 200 + r8a73a4_register_scif(5); 199 201 r8a7790_register_cmt(10); 200 202 } 201 203 ··· 273 275 274 276 static struct resource dma_resources[] = { 275 277 DEFINE_RES_MEM(0xe6700020, 0x89e0), 276 - DEFINE_RES_IRQ_NAMED(gic_spi(220), "error_irq"), 278 + DEFINE_RES_IRQ(gic_spi(220)), 277 279 { 278 280 /* IRQ for channels 0-19 */ 279 281 .start = gic_spi(200),
+33 -162
arch/arm/mach-shmobile/setup-r8a7740.c
··· 203 203 }, 204 204 }; 205 205 206 - /* SCIFA0 */ 207 - static struct plat_sci_port scif0_platform_data = { 208 - .mapbase = 0xe6c40000, 209 - .flags = UPF_BOOT_AUTOCONF, 210 - .scscr = SCSCR_RE | SCSCR_TE, 211 - .scbrr_algo_id = SCBRR_ALGO_4, 212 - .type = PORT_SCIFA, 213 - .irqs = SCIx_IRQ_MUXED(gic_spi(100)), 214 - }; 206 + /* SCIF */ 207 + #define R8A7740_SCIF(scif_type, index, baseaddr, irq) \ 208 + static struct plat_sci_port scif##index##_platform_data = { \ 209 + .type = scif_type, \ 210 + .flags = UPF_BOOT_AUTOCONF, \ 211 + .scscr = SCSCR_RE | SCSCR_TE, \ 212 + }; \ 213 + \ 214 + static struct resource scif##index##_resources[] = { \ 215 + DEFINE_RES_MEM(baseaddr, 0x100), \ 216 + DEFINE_RES_IRQ(irq), \ 217 + }; \ 218 + \ 219 + static struct platform_device scif##index##_device = { \ 220 + .name = "sh-sci", \ 221 + .id = index, \ 222 + .resource = scif##index##_resources, \ 223 + .num_resources = ARRAY_SIZE(scif##index##_resources), \ 224 + .dev = { \ 225 + .platform_data = &scif##index##_platform_data, \ 226 + }, \ 227 + } 215 228 216 - static struct platform_device scif0_device = { 217 - .name = "sh-sci", 218 - .id = 0, 219 - .dev = { 220 - .platform_data = &scif0_platform_data, 221 - }, 222 - }; 223 - 224 - /* SCIFA1 */ 225 - static struct plat_sci_port scif1_platform_data = { 226 - .mapbase = 0xe6c50000, 227 - .flags = UPF_BOOT_AUTOCONF, 228 - .scscr = SCSCR_RE | SCSCR_TE, 229 - .scbrr_algo_id = SCBRR_ALGO_4, 230 - .type = PORT_SCIFA, 231 - .irqs = SCIx_IRQ_MUXED(gic_spi(101)), 232 - }; 233 - 234 - static struct platform_device scif1_device = { 235 - .name = "sh-sci", 236 - .id = 1, 237 - .dev = { 238 - .platform_data = &scif1_platform_data, 239 - }, 240 - }; 241 - 242 - /* SCIFA2 */ 243 - static struct plat_sci_port scif2_platform_data = { 244 - .mapbase = 0xe6c60000, 245 - .flags = UPF_BOOT_AUTOCONF, 246 - .scscr = SCSCR_RE | SCSCR_TE, 247 - .scbrr_algo_id = SCBRR_ALGO_4, 248 - .type = PORT_SCIFA, 249 - .irqs = SCIx_IRQ_MUXED(gic_spi(102)), 250 - }; 251 - 252 - static struct platform_device scif2_device = { 253 - .name = "sh-sci", 254 - .id = 2, 255 - .dev = { 256 - .platform_data = &scif2_platform_data, 257 - }, 258 - }; 259 - 260 - /* SCIFA3 */ 261 - static struct plat_sci_port scif3_platform_data = { 262 - .mapbase = 0xe6c70000, 263 - .flags = UPF_BOOT_AUTOCONF, 264 - .scscr = SCSCR_RE | SCSCR_TE, 265 - .scbrr_algo_id = SCBRR_ALGO_4, 266 - .type = PORT_SCIFA, 267 - .irqs = SCIx_IRQ_MUXED(gic_spi(103)), 268 - }; 269 - 270 - static struct platform_device scif3_device = { 271 - .name = "sh-sci", 272 - .id = 3, 273 - .dev = { 274 - .platform_data = &scif3_platform_data, 275 - }, 276 - }; 277 - 278 - /* SCIFA4 */ 279 - static struct plat_sci_port scif4_platform_data = { 280 - .mapbase = 0xe6c80000, 281 - .flags = UPF_BOOT_AUTOCONF, 282 - .scscr = SCSCR_RE | SCSCR_TE, 283 - .scbrr_algo_id = SCBRR_ALGO_4, 284 - .type = PORT_SCIFA, 285 - .irqs = SCIx_IRQ_MUXED(gic_spi(104)), 286 - }; 287 - 288 - static struct platform_device scif4_device = { 289 - .name = "sh-sci", 290 - .id = 4, 291 - .dev = { 292 - .platform_data = &scif4_platform_data, 293 - }, 294 - }; 295 - 296 - /* SCIFA5 */ 297 - static struct plat_sci_port scif5_platform_data = { 298 - .mapbase = 0xe6cb0000, 299 - .flags = UPF_BOOT_AUTOCONF, 300 - .scscr = SCSCR_RE | SCSCR_TE, 301 - .scbrr_algo_id = SCBRR_ALGO_4, 302 - .type = PORT_SCIFA, 303 - .irqs = SCIx_IRQ_MUXED(gic_spi(105)), 304 - }; 305 - 306 - static struct platform_device scif5_device = { 307 - .name = "sh-sci", 308 - .id = 5, 309 - .dev = { 310 - .platform_data = &scif5_platform_data, 311 - }, 312 - }; 313 - 314 - /* SCIFA6 */ 315 - static struct plat_sci_port scif6_platform_data = { 316 - .mapbase = 0xe6cc0000, 317 - .flags = UPF_BOOT_AUTOCONF, 318 - .scscr = SCSCR_RE | SCSCR_TE, 319 - .scbrr_algo_id = SCBRR_ALGO_4, 320 - .type = PORT_SCIFA, 321 - .irqs = SCIx_IRQ_MUXED(gic_spi(106)), 322 - }; 323 - 324 - static struct platform_device scif6_device = { 325 - .name = "sh-sci", 326 - .id = 6, 327 - .dev = { 328 - .platform_data = &scif6_platform_data, 329 - }, 330 - }; 331 - 332 - /* SCIFA7 */ 333 - static struct plat_sci_port scif7_platform_data = { 334 - .mapbase = 0xe6cd0000, 335 - .flags = UPF_BOOT_AUTOCONF, 336 - .scscr = SCSCR_RE | SCSCR_TE, 337 - .scbrr_algo_id = SCBRR_ALGO_4, 338 - .type = PORT_SCIFA, 339 - .irqs = SCIx_IRQ_MUXED(gic_spi(107)), 340 - }; 341 - 342 - static struct platform_device scif7_device = { 343 - .name = "sh-sci", 344 - .id = 7, 345 - .dev = { 346 - .platform_data = &scif7_platform_data, 347 - }, 348 - }; 349 - 350 - /* SCIFB */ 351 - static struct plat_sci_port scifb_platform_data = { 352 - .mapbase = 0xe6c30000, 353 - .flags = UPF_BOOT_AUTOCONF, 354 - .scscr = SCSCR_RE | SCSCR_TE, 355 - .scbrr_algo_id = SCBRR_ALGO_4, 356 - .type = PORT_SCIFB, 357 - .irqs = SCIx_IRQ_MUXED(gic_spi(108)), 358 - }; 359 - 360 - static struct platform_device scifb_device = { 361 - .name = "sh-sci", 362 - .id = 8, 363 - .dev = { 364 - .platform_data = &scifb_platform_data, 365 - }, 366 - }; 229 + R8A7740_SCIF(PORT_SCIFA, 0, 0xe6c40000, gic_spi(100)); 230 + R8A7740_SCIF(PORT_SCIFA, 1, 0xe6c50000, gic_spi(101)); 231 + R8A7740_SCIF(PORT_SCIFA, 2, 0xe6c60000, gic_spi(102)); 232 + R8A7740_SCIF(PORT_SCIFA, 3, 0xe6c70000, gic_spi(103)); 233 + R8A7740_SCIF(PORT_SCIFA, 4, 0xe6c80000, gic_spi(104)); 234 + R8A7740_SCIF(PORT_SCIFA, 5, 0xe6cb0000, gic_spi(105)); 235 + R8A7740_SCIF(PORT_SCIFA, 6, 0xe6cc0000, gic_spi(106)); 236 + R8A7740_SCIF(PORT_SCIFA, 7, 0xe6cd0000, gic_spi(107)); 237 + R8A7740_SCIF(PORT_SCIFB, 8, 0xe6c30000, gic_spi(108)); 367 238 368 239 /* CMT */ 369 240 static struct sh_timer_config cmt10_platform_data = { ··· 399 528 &scif5_device, 400 529 &scif6_device, 401 530 &scif7_device, 402 - &scifb_device, 531 + &scif8_device, 403 532 &cmt10_device, 404 533 }; 405 534 ··· 852 981 rmobile_add_device_to_domain("A3SP", &scif5_device); 853 982 rmobile_add_device_to_domain("A3SP", &scif6_device); 854 983 rmobile_add_device_to_domain("A3SP", &scif7_device); 855 - rmobile_add_device_to_domain("A3SP", &scifb_device); 984 + rmobile_add_device_to_domain("A3SP", &scif8_device); 856 985 rmobile_add_device_to_domain("A3SP", &i2c1_device); 857 986 } 858 987
+146 -20
arch/arm/mach-shmobile/setup-r8a7778.c
··· 44 44 #include <asm/hardware/cache-l2x0.h> 45 45 46 46 /* SCIF */ 47 - #define SCIF_INFO(baseaddr, irq) \ 48 - { \ 49 - .mapbase = baseaddr, \ 47 + #define R8A7778_SCIF(index, baseaddr, irq) \ 48 + static struct plat_sci_port scif##index##_platform_data = { \ 50 49 .flags = UPF_BOOT_AUTOCONF | UPF_IOREMAP, \ 51 50 .scscr = SCSCR_RE | SCSCR_TE | SCSCR_CKE1, \ 52 - .scbrr_algo_id = SCBRR_ALGO_2, \ 53 51 .type = PORT_SCIF, \ 54 - .irqs = SCIx_IRQ_MUXED(irq), \ 52 + }; \ 53 + \ 54 + static struct resource scif##index##_resources[] = { \ 55 + DEFINE_RES_MEM(baseaddr, 0x100), \ 56 + DEFINE_RES_IRQ(irq), \ 55 57 } 56 58 57 - static struct plat_sci_port scif_platform_data[] __initdata = { 58 - SCIF_INFO(0xffe40000, gic_iid(0x66)), 59 - SCIF_INFO(0xffe41000, gic_iid(0x67)), 60 - SCIF_INFO(0xffe42000, gic_iid(0x68)), 61 - SCIF_INFO(0xffe43000, gic_iid(0x69)), 62 - SCIF_INFO(0xffe44000, gic_iid(0x6a)), 63 - SCIF_INFO(0xffe45000, gic_iid(0x6b)), 64 - }; 59 + R8A7778_SCIF(0, 0xffe40000, gic_iid(0x66)); 60 + R8A7778_SCIF(1, 0xffe41000, gic_iid(0x67)); 61 + R8A7778_SCIF(2, 0xffe42000, gic_iid(0x68)); 62 + R8A7778_SCIF(3, 0xffe43000, gic_iid(0x69)); 63 + R8A7778_SCIF(4, 0xffe44000, gic_iid(0x6a)); 64 + R8A7778_SCIF(5, 0xffe45000, gic_iid(0x6b)); 65 + 66 + #define r8a7778_register_scif(index) \ 67 + platform_device_register_resndata(&platform_bus, "sh-sci", index, \ 68 + scif##index##_resources, \ 69 + ARRAY_SIZE(scif##index##_resources), \ 70 + &scif##index##_platform_data, \ 71 + sizeof(scif##index##_platform_data)) 65 72 66 73 /* TMU */ 67 74 static struct resource sh_tmu0_resources[] __initdata = { ··· 294 287 295 288 void __init r8a7778_add_dt_devices(void) 296 289 { 297 - int i; 298 - 299 290 #ifdef CONFIG_CACHE_L2X0 300 291 void __iomem *base = ioremap_nocache(0xf0100000, 0x1000); 301 292 if (base) { ··· 305 300 } 306 301 #endif 307 302 308 - for (i = 0; i < ARRAY_SIZE(scif_platform_data); i++) 309 - platform_device_register_data(&platform_bus, "sh-sci", i, 310 - &scif_platform_data[i], 311 - sizeof(struct plat_sci_port)); 312 - 303 + r8a7778_register_scif(0); 304 + r8a7778_register_scif(1); 305 + r8a7778_register_scif(2); 306 + r8a7778_register_scif(3); 307 + r8a7778_register_scif(4); 308 + r8a7778_register_scif(5); 313 309 r8a7778_register_tmu(0); 314 310 r8a7778_register_tmu(1); 315 311 } ··· 324 318 #define HPB_DMAE_ASYNCMDR_ASMD21_MASK BIT(1) /* SDHI0 */ 325 319 #define HPB_DMAE_ASYNCMDR_ASMD21_SINGLE BIT(1) /* SDHI0 */ 326 320 #define HPB_DMAE_ASYNCMDR_ASMD21_MULTI 0 /* SDHI0 */ 321 + 322 + #define HPBDMA_SSI(_id) \ 323 + { \ 324 + .id = HPBDMA_SLAVE_SSI## _id ##_TX, \ 325 + .addr = 0xffd91008 + (_id * 0x40), \ 326 + .dcr = HPB_DMAE_DCR_CT | \ 327 + HPB_DMAE_DCR_DIP | \ 328 + HPB_DMAE_DCR_SPDS_32BIT | \ 329 + HPB_DMAE_DCR_DMDL | \ 330 + HPB_DMAE_DCR_DPDS_32BIT, \ 331 + .port = _id + (_id << 8), \ 332 + .dma_ch = (28 + _id), \ 333 + }, { \ 334 + .id = HPBDMA_SLAVE_SSI## _id ##_RX, \ 335 + .addr = 0xffd9100c + (_id * 0x40), \ 336 + .dcr = HPB_DMAE_DCR_CT | \ 337 + HPB_DMAE_DCR_DIP | \ 338 + HPB_DMAE_DCR_SMDL | \ 339 + HPB_DMAE_DCR_SPDS_32BIT | \ 340 + HPB_DMAE_DCR_DPDS_32BIT, \ 341 + .port = _id + (_id << 8), \ 342 + .dma_ch = (28 + _id), \ 343 + } 344 + 345 + #define HPBDMA_HPBIF(_id) \ 346 + { \ 347 + .id = HPBDMA_SLAVE_HPBIF## _id ##_TX, \ 348 + .addr = 0xffda0000 + (_id * 0x1000), \ 349 + .dcr = HPB_DMAE_DCR_CT | \ 350 + HPB_DMAE_DCR_DIP | \ 351 + HPB_DMAE_DCR_SPDS_32BIT | \ 352 + HPB_DMAE_DCR_DMDL | \ 353 + HPB_DMAE_DCR_DPDS_32BIT, \ 354 + .port = 0x1111, \ 355 + .dma_ch = (28 + _id), \ 356 + }, { \ 357 + .id = HPBDMA_SLAVE_HPBIF## _id ##_RX, \ 358 + .addr = 0xffda0000 + (_id * 0x1000), \ 359 + .dcr = HPB_DMAE_DCR_CT | \ 360 + HPB_DMAE_DCR_DIP | \ 361 + HPB_DMAE_DCR_SMDL | \ 362 + HPB_DMAE_DCR_SPDS_32BIT | \ 363 + HPB_DMAE_DCR_DPDS_32BIT, \ 364 + .port = 0x1111, \ 365 + .dma_ch = (28 + _id), \ 366 + } 327 367 328 368 static const struct hpb_dmae_slave_config hpb_dmae_slaves[] = { 329 369 { ··· 400 348 .port = 0x0D0C, 401 349 .flags = HPB_DMAE_SET_ASYNC_RESET | HPB_DMAE_SET_ASYNC_MODE, 402 350 .dma_ch = 22, 351 + }, { 352 + .id = HPBDMA_SLAVE_USBFUNC_TX, /* for D0 */ 353 + .addr = 0xffe60018, 354 + .dcr = HPB_DMAE_DCR_SPDS_32BIT | 355 + HPB_DMAE_DCR_DMDL | 356 + HPB_DMAE_DCR_DPDS_32BIT, 357 + .port = 0x0000, 358 + .dma_ch = 14, 359 + }, { 360 + .id = HPBDMA_SLAVE_USBFUNC_RX, /* for D1 */ 361 + .addr = 0xffe6001c, 362 + .dcr = HPB_DMAE_DCR_SMDL | 363 + HPB_DMAE_DCR_SPDS_32BIT | 364 + HPB_DMAE_DCR_DPDS_32BIT, 365 + .port = 0x0101, 366 + .dma_ch = 15, 403 367 }, 368 + 369 + HPBDMA_SSI(0), 370 + HPBDMA_SSI(1), 371 + HPBDMA_SSI(2), 372 + HPBDMA_SSI(3), 373 + HPBDMA_SSI(4), 374 + HPBDMA_SSI(5), 375 + HPBDMA_SSI(6), 376 + HPBDMA_SSI(7), 377 + HPBDMA_SSI(8), 378 + 379 + HPBDMA_HPBIF(0), 380 + HPBDMA_HPBIF(1), 381 + HPBDMA_HPBIF(2), 382 + HPBDMA_HPBIF(3), 383 + HPBDMA_HPBIF(4), 384 + HPBDMA_HPBIF(5), 385 + HPBDMA_HPBIF(6), 386 + HPBDMA_HPBIF(7), 387 + HPBDMA_HPBIF(8), 404 388 }; 405 389 406 390 static const struct hpb_dmae_channel hpb_dmae_channels[] = { 391 + HPB_DMAE_CHANNEL(0x7c, HPBDMA_SLAVE_USBFUNC_TX), /* ch. 14 */ 392 + HPB_DMAE_CHANNEL(0x7c, HPBDMA_SLAVE_USBFUNC_RX), /* ch. 15 */ 407 393 HPB_DMAE_CHANNEL(0x7e, HPBDMA_SLAVE_SDHI0_TX), /* ch. 21 */ 408 394 HPB_DMAE_CHANNEL(0x7e, HPBDMA_SLAVE_SDHI0_RX), /* ch. 22 */ 395 + HPB_DMAE_CHANNEL(0x7f, HPBDMA_SLAVE_SSI0_TX), /* ch. 28 */ 396 + HPB_DMAE_CHANNEL(0x7f, HPBDMA_SLAVE_SSI0_RX), /* ch. 28 */ 397 + HPB_DMAE_CHANNEL(0x7f, HPBDMA_SLAVE_HPBIF0_TX), /* ch. 28 */ 398 + HPB_DMAE_CHANNEL(0x7f, HPBDMA_SLAVE_HPBIF0_RX), /* ch. 28 */ 399 + HPB_DMAE_CHANNEL(0x7f, HPBDMA_SLAVE_SSI1_TX), /* ch. 29 */ 400 + HPB_DMAE_CHANNEL(0x7f, HPBDMA_SLAVE_SSI1_RX), /* ch. 29 */ 401 + HPB_DMAE_CHANNEL(0x7f, HPBDMA_SLAVE_HPBIF1_TX), /* ch. 29 */ 402 + HPB_DMAE_CHANNEL(0x7f, HPBDMA_SLAVE_HPBIF1_RX), /* ch. 29 */ 403 + HPB_DMAE_CHANNEL(0x7f, HPBDMA_SLAVE_SSI2_TX), /* ch. 30 */ 404 + HPB_DMAE_CHANNEL(0x7f, HPBDMA_SLAVE_SSI2_RX), /* ch. 30 */ 405 + HPB_DMAE_CHANNEL(0x7f, HPBDMA_SLAVE_HPBIF2_TX), /* ch. 30 */ 406 + HPB_DMAE_CHANNEL(0x7f, HPBDMA_SLAVE_HPBIF2_RX), /* ch. 30 */ 407 + HPB_DMAE_CHANNEL(0x7f, HPBDMA_SLAVE_SSI3_TX), /* ch. 31 */ 408 + HPB_DMAE_CHANNEL(0x7f, HPBDMA_SLAVE_SSI3_RX), /* ch. 31 */ 409 + HPB_DMAE_CHANNEL(0x7f, HPBDMA_SLAVE_HPBIF3_TX), /* ch. 31 */ 410 + HPB_DMAE_CHANNEL(0x7f, HPBDMA_SLAVE_HPBIF3_RX), /* ch. 31 */ 411 + HPB_DMAE_CHANNEL(0x7f, HPBDMA_SLAVE_SSI4_TX), /* ch. 32 */ 412 + HPB_DMAE_CHANNEL(0x7f, HPBDMA_SLAVE_SSI4_RX), /* ch. 32 */ 413 + HPB_DMAE_CHANNEL(0x7f, HPBDMA_SLAVE_HPBIF4_TX), /* ch. 32 */ 414 + HPB_DMAE_CHANNEL(0x7f, HPBDMA_SLAVE_HPBIF4_RX), /* ch. 32 */ 415 + HPB_DMAE_CHANNEL(0x7f, HPBDMA_SLAVE_SSI5_TX), /* ch. 33 */ 416 + HPB_DMAE_CHANNEL(0x7f, HPBDMA_SLAVE_SSI5_RX), /* ch. 33 */ 417 + HPB_DMAE_CHANNEL(0x7f, HPBDMA_SLAVE_HPBIF5_TX), /* ch. 33 */ 418 + HPB_DMAE_CHANNEL(0x7f, HPBDMA_SLAVE_HPBIF5_RX), /* ch. 33 */ 419 + HPB_DMAE_CHANNEL(0x7f, HPBDMA_SLAVE_SSI6_TX), /* ch. 34 */ 420 + HPB_DMAE_CHANNEL(0x7f, HPBDMA_SLAVE_SSI6_RX), /* ch. 34 */ 421 + HPB_DMAE_CHANNEL(0x7f, HPBDMA_SLAVE_HPBIF6_TX), /* ch. 34 */ 422 + HPB_DMAE_CHANNEL(0x7f, HPBDMA_SLAVE_HPBIF6_RX), /* ch. 34 */ 423 + HPB_DMAE_CHANNEL(0x7f, HPBDMA_SLAVE_SSI7_TX), /* ch. 35 */ 424 + HPB_DMAE_CHANNEL(0x7f, HPBDMA_SLAVE_SSI7_RX), /* ch. 35 */ 425 + HPB_DMAE_CHANNEL(0x7f, HPBDMA_SLAVE_HPBIF7_TX), /* ch. 35 */ 426 + HPB_DMAE_CHANNEL(0x7f, HPBDMA_SLAVE_HPBIF7_RX), /* ch. 35 */ 427 + HPB_DMAE_CHANNEL(0x7f, HPBDMA_SLAVE_SSI8_TX), /* ch. 36 */ 428 + HPB_DMAE_CHANNEL(0x7f, HPBDMA_SLAVE_SSI8_RX), /* ch. 36 */ 429 + HPB_DMAE_CHANNEL(0x7f, HPBDMA_SLAVE_HPBIF8_TX), /* ch. 36 */ 430 + HPB_DMAE_CHANNEL(0x7f, HPBDMA_SLAVE_HPBIF8_RX), /* ch. 36 */ 409 431 }; 410 432 411 433 static struct hpb_dmae_pdata dma_platform_data __initdata = {
+28 -100
arch/arm/mach-shmobile/setup-r8a7779.c
··· 188 188 ARRAY_SIZE(r8a7779_pinctrl_devices)); 189 189 } 190 190 191 - static struct plat_sci_port scif0_platform_data = { 192 - .mapbase = 0xffe40000, 193 - .flags = UPF_BOOT_AUTOCONF | UPF_IOREMAP, 194 - .scscr = SCSCR_RE | SCSCR_TE | SCSCR_CKE1, 195 - .scbrr_algo_id = SCBRR_ALGO_2, 196 - .type = PORT_SCIF, 197 - .irqs = SCIx_IRQ_MUXED(gic_iid(0x78)), 198 - }; 191 + /* SCIF */ 192 + #define R8A7779_SCIF(index, baseaddr, irq) \ 193 + static struct plat_sci_port scif##index##_platform_data = { \ 194 + .type = PORT_SCIF, \ 195 + .flags = UPF_BOOT_AUTOCONF | UPF_IOREMAP, \ 196 + .scscr = SCSCR_RE | SCSCR_TE | SCSCR_CKE1, \ 197 + }; \ 198 + \ 199 + static struct resource scif##index##_resources[] = { \ 200 + DEFINE_RES_MEM(baseaddr, 0x100), \ 201 + DEFINE_RES_IRQ(irq), \ 202 + }; \ 203 + \ 204 + static struct platform_device scif##index##_device = { \ 205 + .name = "sh-sci", \ 206 + .id = index, \ 207 + .resource = scif##index##_resources, \ 208 + .num_resources = ARRAY_SIZE(scif##index##_resources), \ 209 + .dev = { \ 210 + .platform_data = &scif##index##_platform_data, \ 211 + }, \ 212 + } 199 213 200 - static struct platform_device scif0_device = { 201 - .name = "sh-sci", 202 - .id = 0, 203 - .dev = { 204 - .platform_data = &scif0_platform_data, 205 - }, 206 - }; 207 - 208 - static struct plat_sci_port scif1_platform_data = { 209 - .mapbase = 0xffe41000, 210 - .flags = UPF_BOOT_AUTOCONF | UPF_IOREMAP, 211 - .scscr = SCSCR_RE | SCSCR_TE | SCSCR_CKE1, 212 - .scbrr_algo_id = SCBRR_ALGO_2, 213 - .type = PORT_SCIF, 214 - .irqs = SCIx_IRQ_MUXED(gic_iid(0x79)), 215 - }; 216 - 217 - static struct platform_device scif1_device = { 218 - .name = "sh-sci", 219 - .id = 1, 220 - .dev = { 221 - .platform_data = &scif1_platform_data, 222 - }, 223 - }; 224 - 225 - static struct plat_sci_port scif2_platform_data = { 226 - .mapbase = 0xffe42000, 227 - .flags = UPF_BOOT_AUTOCONF | UPF_IOREMAP, 228 - .scscr = SCSCR_RE | SCSCR_TE | SCSCR_CKE1, 229 - .scbrr_algo_id = SCBRR_ALGO_2, 230 - .type = PORT_SCIF, 231 - .irqs = SCIx_IRQ_MUXED(gic_iid(0x7a)), 232 - }; 233 - 234 - static struct platform_device scif2_device = { 235 - .name = "sh-sci", 236 - .id = 2, 237 - .dev = { 238 - .platform_data = &scif2_platform_data, 239 - }, 240 - }; 241 - 242 - static struct plat_sci_port scif3_platform_data = { 243 - .mapbase = 0xffe43000, 244 - .flags = UPF_BOOT_AUTOCONF | UPF_IOREMAP, 245 - .scscr = SCSCR_RE | SCSCR_TE | SCSCR_CKE1, 246 - .scbrr_algo_id = SCBRR_ALGO_2, 247 - .type = PORT_SCIF, 248 - .irqs = SCIx_IRQ_MUXED(gic_iid(0x7b)), 249 - }; 250 - 251 - static struct platform_device scif3_device = { 252 - .name = "sh-sci", 253 - .id = 3, 254 - .dev = { 255 - .platform_data = &scif3_platform_data, 256 - }, 257 - }; 258 - 259 - static struct plat_sci_port scif4_platform_data = { 260 - .mapbase = 0xffe44000, 261 - .flags = UPF_BOOT_AUTOCONF | UPF_IOREMAP, 262 - .scscr = SCSCR_RE | SCSCR_TE | SCSCR_CKE1, 263 - .scbrr_algo_id = SCBRR_ALGO_2, 264 - .type = PORT_SCIF, 265 - .irqs = SCIx_IRQ_MUXED(gic_iid(0x7c)), 266 - }; 267 - 268 - static struct platform_device scif4_device = { 269 - .name = "sh-sci", 270 - .id = 4, 271 - .dev = { 272 - .platform_data = &scif4_platform_data, 273 - }, 274 - }; 275 - 276 - static struct plat_sci_port scif5_platform_data = { 277 - .mapbase = 0xffe45000, 278 - .flags = UPF_BOOT_AUTOCONF | UPF_IOREMAP, 279 - .scscr = SCSCR_RE | SCSCR_TE | SCSCR_CKE1, 280 - .scbrr_algo_id = SCBRR_ALGO_2, 281 - .type = PORT_SCIF, 282 - .irqs = SCIx_IRQ_MUXED(gic_iid(0x7d)), 283 - }; 284 - 285 - static struct platform_device scif5_device = { 286 - .name = "sh-sci", 287 - .id = 5, 288 - .dev = { 289 - .platform_data = &scif5_platform_data, 290 - }, 291 - }; 214 + R8A7779_SCIF(0, 0xffe40000, gic_iid(0x78)); 215 + R8A7779_SCIF(1, 0xffe41000, gic_iid(0x79)); 216 + R8A7779_SCIF(2, 0xffe42000, gic_iid(0x7a)); 217 + R8A7779_SCIF(3, 0xffe43000, gic_iid(0x7b)); 218 + R8A7779_SCIF(4, 0xffe44000, gic_iid(0x7c)); 219 + R8A7779_SCIF(5, 0xffe45000, gic_iid(0x7d)); 292 220 293 221 /* TMU */ 294 222 static struct sh_timer_config tmu00_platform_data = {
+73 -58
arch/arm/mach-shmobile/setup-r8a7790.c
··· 67 67 &r8a7790_gpio##idx##_platform_data, \ 68 68 sizeof(r8a7790_gpio##idx##_platform_data)) 69 69 70 + static struct resource i2c_resources[] __initdata = { 71 + /* I2C0 */ 72 + DEFINE_RES_MEM(0xE6508000, 0x40), 73 + DEFINE_RES_IRQ(gic_spi(287)), 74 + /* I2C1 */ 75 + DEFINE_RES_MEM(0xE6518000, 0x40), 76 + DEFINE_RES_IRQ(gic_spi(288)), 77 + /* I2C2 */ 78 + DEFINE_RES_MEM(0xE6530000, 0x40), 79 + DEFINE_RES_IRQ(gic_spi(286)), 80 + /* I2C3 */ 81 + DEFINE_RES_MEM(0xE6540000, 0x40), 82 + DEFINE_RES_IRQ(gic_spi(290)), 83 + 84 + }; 85 + 86 + #define r8a7790_register_i2c(idx) \ 87 + platform_device_register_simple( \ 88 + "i2c-rcar_gen2", idx, \ 89 + i2c_resources + (2 * idx), 2); \ 90 + 70 91 void __init r8a7790_pinmux_init(void) 71 92 { 72 93 r8a7790_register_pfc(); ··· 97 76 r8a7790_register_gpio(3); 98 77 r8a7790_register_gpio(4); 99 78 r8a7790_register_gpio(5); 79 + r8a7790_register_i2c(0); 80 + r8a7790_register_i2c(1); 81 + r8a7790_register_i2c(2); 82 + r8a7790_register_i2c(3); 100 83 } 101 84 102 - #define SCIF_COMMON(scif_type, baseaddr, irq) \ 103 - .type = scif_type, \ 104 - .mapbase = baseaddr, \ 105 - .flags = UPF_BOOT_AUTOCONF | UPF_IOREMAP, \ 106 - .irqs = SCIx_IRQ_MUXED(irq) 107 - 108 - #define SCIFA_DATA(index, baseaddr, irq) \ 109 - [index] = { \ 110 - SCIF_COMMON(PORT_SCIFA, baseaddr, irq), \ 111 - .scbrr_algo_id = SCBRR_ALGO_4, \ 112 - .scscr = SCSCR_RE | SCSCR_TE | SCSCR_CKE0, \ 85 + #define __R8A7790_SCIF(scif_type, _scscr, index, baseaddr, irq) \ 86 + static struct plat_sci_port scif##index##_platform_data = { \ 87 + .type = scif_type, \ 88 + .flags = UPF_BOOT_AUTOCONF | UPF_IOREMAP, \ 89 + .scscr = _scscr, \ 90 + }; \ 91 + \ 92 + static struct resource scif##index##_resources[] = { \ 93 + DEFINE_RES_MEM(baseaddr, 0x100), \ 94 + DEFINE_RES_IRQ(irq), \ 113 95 } 114 96 115 - #define SCIFB_DATA(index, baseaddr, irq) \ 116 - [index] = { \ 117 - SCIF_COMMON(PORT_SCIFB, baseaddr, irq), \ 118 - .scbrr_algo_id = SCBRR_ALGO_4, \ 119 - .scscr = SCSCR_RE | SCSCR_TE, \ 120 - } 97 + #define R8A7790_SCIF(index, baseaddr, irq) \ 98 + __R8A7790_SCIF(PORT_SCIF, SCSCR_RE | SCSCR_TE, \ 99 + index, baseaddr, irq) 121 100 122 - #define SCIF_DATA(index, baseaddr, irq) \ 123 - [index] = { \ 124 - SCIF_COMMON(PORT_SCIF, baseaddr, irq), \ 125 - .scbrr_algo_id = SCBRR_ALGO_2, \ 126 - .scscr = SCSCR_RE | SCSCR_TE, \ 127 - } 101 + #define R8A7790_SCIFA(index, baseaddr, irq) \ 102 + __R8A7790_SCIF(PORT_SCIFA, SCSCR_RE | SCSCR_TE | SCSCR_CKE0, \ 103 + index, baseaddr, irq) 128 104 129 - #define HSCIF_DATA(index, baseaddr, irq) \ 130 - [index] = { \ 131 - SCIF_COMMON(PORT_HSCIF, baseaddr, irq), \ 132 - .scbrr_algo_id = SCBRR_ALGO_6, \ 133 - .scscr = SCSCR_RE | SCSCR_TE, \ 134 - } 105 + #define R8A7790_SCIFB(index, baseaddr, irq) \ 106 + __R8A7790_SCIF(PORT_SCIFB, SCSCR_RE | SCSCR_TE, \ 107 + index, baseaddr, irq) 135 108 136 - enum { SCIFA0, SCIFA1, SCIFB0, SCIFB1, SCIFB2, SCIFA2, SCIF0, SCIF1, 137 - HSCIF0, HSCIF1 }; 109 + #define R8A7790_HSCIF(index, baseaddr, irq) \ 110 + __R8A7790_SCIF(PORT_HSCIF, SCSCR_RE | SCSCR_TE, \ 111 + index, baseaddr, irq) 138 112 139 - static const struct plat_sci_port scif[] __initconst = { 140 - SCIFA_DATA(SCIFA0, 0xe6c40000, gic_spi(144)), /* SCIFA0 */ 141 - SCIFA_DATA(SCIFA1, 0xe6c50000, gic_spi(145)), /* SCIFA1 */ 142 - SCIFB_DATA(SCIFB0, 0xe6c20000, gic_spi(148)), /* SCIFB0 */ 143 - SCIFB_DATA(SCIFB1, 0xe6c30000, gic_spi(149)), /* SCIFB1 */ 144 - SCIFB_DATA(SCIFB2, 0xe6ce0000, gic_spi(150)), /* SCIFB2 */ 145 - SCIFA_DATA(SCIFA2, 0xe6c60000, gic_spi(151)), /* SCIFA2 */ 146 - SCIF_DATA(SCIF0, 0xe6e60000, gic_spi(152)), /* SCIF0 */ 147 - SCIF_DATA(SCIF1, 0xe6e68000, gic_spi(153)), /* SCIF1 */ 148 - HSCIF_DATA(HSCIF0, 0xe62c0000, gic_spi(154)), /* HSCIF0 */ 149 - HSCIF_DATA(HSCIF1, 0xe62c8000, gic_spi(155)), /* HSCIF1 */ 150 - }; 113 + R8A7790_SCIFA(0, 0xe6c40000, gic_spi(144)); /* SCIFA0 */ 114 + R8A7790_SCIFA(1, 0xe6c50000, gic_spi(145)); /* SCIFA1 */ 115 + R8A7790_SCIFB(2, 0xe6c20000, gic_spi(148)); /* SCIFB0 */ 116 + R8A7790_SCIFB(3, 0xe6c30000, gic_spi(149)); /* SCIFB1 */ 117 + R8A7790_SCIFB(4, 0xe6ce0000, gic_spi(150)); /* SCIFB2 */ 118 + R8A7790_SCIFA(5, 0xe6c60000, gic_spi(151)); /* SCIFA2 */ 119 + R8A7790_SCIF(6, 0xe6e60000, gic_spi(152)); /* SCIF0 */ 120 + R8A7790_SCIF(7, 0xe6e68000, gic_spi(153)); /* SCIF1 */ 121 + R8A7790_HSCIF(8, 0xe62c0000, gic_spi(154)); /* HSCIF0 */ 122 + R8A7790_HSCIF(9, 0xe62c8000, gic_spi(155)); /* HSCIF1 */ 151 123 152 - static inline void r8a7790_register_scif(int idx) 153 - { 154 - platform_device_register_data(&platform_bus, "sh-sci", idx, &scif[idx], 155 - sizeof(struct plat_sci_port)); 156 - } 124 + #define r8a7790_register_scif(index) \ 125 + platform_device_register_resndata(&platform_bus, "sh-sci", index, \ 126 + scif##index##_resources, \ 127 + ARRAY_SIZE(scif##index##_resources), \ 128 + &scif##index##_platform_data, \ 129 + sizeof(scif##index##_platform_data)) 157 130 158 131 static const struct renesas_irqc_config irqc0_data __initconst = { 159 132 .irq_base = irq_pin(0), /* IRQ0 -> IRQ3 */ ··· 200 185 201 186 void __init r8a7790_add_dt_devices(void) 202 187 { 203 - r8a7790_register_scif(SCIFA0); 204 - r8a7790_register_scif(SCIFA1); 205 - r8a7790_register_scif(SCIFB0); 206 - r8a7790_register_scif(SCIFB1); 207 - r8a7790_register_scif(SCIFB2); 208 - r8a7790_register_scif(SCIFA2); 209 - r8a7790_register_scif(SCIF0); 210 - r8a7790_register_scif(SCIF1); 211 - r8a7790_register_scif(HSCIF0); 212 - r8a7790_register_scif(HSCIF1); 188 + r8a7790_register_scif(0); 189 + r8a7790_register_scif(1); 190 + r8a7790_register_scif(2); 191 + r8a7790_register_scif(3); 192 + r8a7790_register_scif(4); 193 + r8a7790_register_scif(5); 194 + r8a7790_register_scif(6); 195 + r8a7790_register_scif(7); 196 + r8a7790_register_scif(8); 197 + r8a7790_register_scif(9); 213 198 r8a7790_register_cmt(00); 214 199 } 215 200
+119 -71
arch/arm/mach-shmobile/setup-r8a7791.c
··· 22 22 #include <linux/irq.h> 23 23 #include <linux/kernel.h> 24 24 #include <linux/of_platform.h> 25 + #include <linux/platform_data/gpio-rcar.h> 25 26 #include <linux/platform_data/irq-renesas-irqc.h> 26 27 #include <linux/serial_sci.h> 27 28 #include <linux/sh_timer.h> ··· 32 31 #include <mach/rcar-gen2.h> 33 32 #include <asm/mach/arch.h> 34 33 35 - #define SCIF_COMMON(scif_type, baseaddr, irq) \ 36 - .type = scif_type, \ 37 - .mapbase = baseaddr, \ 38 - .flags = UPF_BOOT_AUTOCONF | UPF_IOREMAP, \ 39 - .irqs = SCIx_IRQ_MUXED(irq) 40 - 41 - #define SCIFA_DATA(index, baseaddr, irq) \ 42 - [index] = { \ 43 - SCIF_COMMON(PORT_SCIFA, baseaddr, irq), \ 44 - .scbrr_algo_id = SCBRR_ALGO_4, \ 45 - .scscr = SCSCR_RE | SCSCR_TE, \ 46 - } 47 - 48 - #define SCIFB_DATA(index, baseaddr, irq) \ 49 - [index] = { \ 50 - SCIF_COMMON(PORT_SCIFB, baseaddr, irq), \ 51 - .scbrr_algo_id = SCBRR_ALGO_4, \ 52 - .scscr = SCSCR_RE | SCSCR_TE, \ 53 - } 54 - 55 - #define SCIF_DATA(index, baseaddr, irq) \ 56 - [index] = { \ 57 - SCIF_COMMON(PORT_SCIF, baseaddr, irq), \ 58 - .scbrr_algo_id = SCBRR_ALGO_2, \ 59 - .scscr = SCSCR_RE | SCSCR_TE, \ 60 - } 61 - 62 - #define HSCIF_DATA(index, baseaddr, irq) \ 63 - [index] = { \ 64 - SCIF_COMMON(PORT_HSCIF, baseaddr, irq), \ 65 - .scbrr_algo_id = SCBRR_ALGO_6, \ 66 - .scscr = SCSCR_RE | SCSCR_TE, \ 67 - } 68 - 69 - enum { SCIFA0, SCIFA1, SCIFB0, SCIFB1, SCIFB2, SCIFA2, SCIF0, SCIF1, 70 - SCIF2, SCIF3, SCIF4, SCIF5, SCIFA3, SCIFA4, SCIFA5 }; 71 - 72 - static const struct plat_sci_port scif[] __initconst = { 73 - SCIFA_DATA(SCIFA0, 0xe6c40000, gic_spi(144)), /* SCIFA0 */ 74 - SCIFA_DATA(SCIFA1, 0xe6c50000, gic_spi(145)), /* SCIFA1 */ 75 - SCIFB_DATA(SCIFB0, 0xe6c20000, gic_spi(148)), /* SCIFB0 */ 76 - SCIFB_DATA(SCIFB1, 0xe6c30000, gic_spi(149)), /* SCIFB1 */ 77 - SCIFB_DATA(SCIFB2, 0xe6ce0000, gic_spi(150)), /* SCIFB2 */ 78 - SCIFA_DATA(SCIFA2, 0xe6c60000, gic_spi(151)), /* SCIFA2 */ 79 - SCIF_DATA(SCIF0, 0xe6e60000, gic_spi(152)), /* SCIF0 */ 80 - SCIF_DATA(SCIF1, 0xe6e68000, gic_spi(153)), /* SCIF1 */ 81 - SCIF_DATA(SCIF2, 0xe6e58000, gic_spi(22)), /* SCIF2 */ 82 - SCIF_DATA(SCIF3, 0xe6ea8000, gic_spi(23)), /* SCIF3 */ 83 - SCIF_DATA(SCIF4, 0xe6ee0000, gic_spi(24)), /* SCIF4 */ 84 - SCIF_DATA(SCIF5, 0xe6ee8000, gic_spi(25)), /* SCIF5 */ 85 - SCIFA_DATA(SCIFA3, 0xe6c70000, gic_spi(29)), /* SCIFA3 */ 86 - SCIFA_DATA(SCIFA4, 0xe6c78000, gic_spi(30)), /* SCIFA4 */ 87 - SCIFA_DATA(SCIFA5, 0xe6c80000, gic_spi(31)), /* SCIFA5 */ 34 + static const struct resource pfc_resources[] __initconst = { 35 + DEFINE_RES_MEM(0xe6060000, 0x250), 88 36 }; 89 37 90 - static inline void r8a7791_register_scif(int idx) 38 + #define r8a7791_register_pfc() \ 39 + platform_device_register_simple("pfc-r8a7791", -1, pfc_resources, \ 40 + ARRAY_SIZE(pfc_resources)) 41 + 42 + #define R8A7791_GPIO(idx, base, nr) \ 43 + static const struct resource r8a7791_gpio##idx##_resources[] __initconst = { \ 44 + DEFINE_RES_MEM((base), 0x50), \ 45 + DEFINE_RES_IRQ(gic_spi(4 + (idx))), \ 46 + }; \ 47 + \ 48 + static const struct gpio_rcar_config \ 49 + r8a7791_gpio##idx##_platform_data __initconst = { \ 50 + .gpio_base = 32 * (idx), \ 51 + .irq_base = 0, \ 52 + .number_of_pins = (nr), \ 53 + .pctl_name = "pfc-r8a7791", \ 54 + .has_both_edge_trigger = 1, \ 55 + }; \ 56 + 57 + R8A7791_GPIO(0, 0xe6050000, 32); 58 + R8A7791_GPIO(1, 0xe6051000, 32); 59 + R8A7791_GPIO(2, 0xe6052000, 32); 60 + R8A7791_GPIO(3, 0xe6053000, 32); 61 + R8A7791_GPIO(4, 0xe6054000, 32); 62 + R8A7791_GPIO(5, 0xe6055000, 32); 63 + R8A7791_GPIO(6, 0xe6055400, 32); 64 + R8A7791_GPIO(7, 0xe6055800, 26); 65 + 66 + #define r8a7791_register_gpio(idx) \ 67 + platform_device_register_resndata(&platform_bus, "gpio_rcar", idx, \ 68 + r8a7791_gpio##idx##_resources, \ 69 + ARRAY_SIZE(r8a7791_gpio##idx##_resources), \ 70 + &r8a7791_gpio##idx##_platform_data, \ 71 + sizeof(r8a7791_gpio##idx##_platform_data)) 72 + 73 + void __init r8a7791_pinmux_init(void) 91 74 { 92 - platform_device_register_data(&platform_bus, "sh-sci", idx, &scif[idx], 93 - sizeof(struct plat_sci_port)); 75 + r8a7791_register_pfc(); 76 + r8a7791_register_gpio(0); 77 + r8a7791_register_gpio(1); 78 + r8a7791_register_gpio(2); 79 + r8a7791_register_gpio(3); 80 + r8a7791_register_gpio(4); 81 + r8a7791_register_gpio(5); 82 + r8a7791_register_gpio(6); 83 + r8a7791_register_gpio(7); 94 84 } 85 + 86 + #define __R8A7791_SCIF(scif_type, index, baseaddr, irq) \ 87 + static struct plat_sci_port scif##index##_platform_data = { \ 88 + .type = scif_type, \ 89 + .flags = UPF_BOOT_AUTOCONF | UPF_IOREMAP, \ 90 + .scscr = SCSCR_RE | SCSCR_TE, \ 91 + }; \ 92 + \ 93 + static struct resource scif##index##_resources[] = { \ 94 + DEFINE_RES_MEM(baseaddr, 0x100), \ 95 + DEFINE_RES_IRQ(irq), \ 96 + } 97 + 98 + #define R8A7791_SCIF(index, baseaddr, irq) \ 99 + __R8A7791_SCIF(PORT_SCIF, index, baseaddr, irq) 100 + 101 + #define R8A7791_SCIFA(index, baseaddr, irq) \ 102 + __R8A7791_SCIF(PORT_SCIFA, index, baseaddr, irq) 103 + 104 + #define R8A7791_SCIFB(index, baseaddr, irq) \ 105 + __R8A7791_SCIF(PORT_SCIFB, index, baseaddr, irq) 106 + 107 + R8A7791_SCIFA(0, 0xe6c40000, gic_spi(144)); /* SCIFA0 */ 108 + R8A7791_SCIFA(1, 0xe6c50000, gic_spi(145)); /* SCIFA1 */ 109 + R8A7791_SCIFB(2, 0xe6c20000, gic_spi(148)); /* SCIFB0 */ 110 + R8A7791_SCIFB(3, 0xe6c30000, gic_spi(149)); /* SCIFB1 */ 111 + R8A7791_SCIFB(4, 0xe6ce0000, gic_spi(150)); /* SCIFB2 */ 112 + R8A7791_SCIFA(5, 0xe6c60000, gic_spi(151)); /* SCIFA2 */ 113 + R8A7791_SCIF(6, 0xe6e60000, gic_spi(152)); /* SCIF0 */ 114 + R8A7791_SCIF(7, 0xe6e68000, gic_spi(153)); /* SCIF1 */ 115 + R8A7791_SCIF(8, 0xe6e58000, gic_spi(22)); /* SCIF2 */ 116 + R8A7791_SCIF(9, 0xe6ea8000, gic_spi(23)); /* SCIF3 */ 117 + R8A7791_SCIF(10, 0xe6ee0000, gic_spi(24)); /* SCIF4 */ 118 + R8A7791_SCIF(11, 0xe6ee8000, gic_spi(25)); /* SCIF5 */ 119 + R8A7791_SCIFA(12, 0xe6c70000, gic_spi(29)); /* SCIFA3 */ 120 + R8A7791_SCIFA(13, 0xe6c78000, gic_spi(30)); /* SCIFA4 */ 121 + R8A7791_SCIFA(14, 0xe6c80000, gic_spi(31)); /* SCIFA5 */ 122 + 123 + #define r8a7791_register_scif(index) \ 124 + platform_device_register_resndata(&platform_bus, "sh-sci", index, \ 125 + scif##index##_resources, \ 126 + ARRAY_SIZE(scif##index##_resources), \ 127 + &scif##index##_platform_data, \ 128 + sizeof(scif##index##_platform_data)) 95 129 96 130 static const struct sh_timer_config cmt00_platform_data __initconst = { 97 131 .name = "CMT00", ··· 172 136 &irqc##idx##_data, \ 173 137 sizeof(struct renesas_irqc_config)) 174 138 139 + static const struct resource thermal_resources[] __initconst = { 140 + DEFINE_RES_MEM(0xe61f0000, 0x14), 141 + DEFINE_RES_MEM(0xe61f0100, 0x38), 142 + DEFINE_RES_IRQ(gic_spi(69)), 143 + }; 144 + 145 + #define r8a7791_register_thermal() \ 146 + platform_device_register_simple("rcar_thermal", -1, \ 147 + thermal_resources, \ 148 + ARRAY_SIZE(thermal_resources)) 149 + 175 150 void __init r8a7791_add_dt_devices(void) 176 151 { 177 - r8a7791_register_scif(SCIFA0); 178 - r8a7791_register_scif(SCIFA1); 179 - r8a7791_register_scif(SCIFB0); 180 - r8a7791_register_scif(SCIFB1); 181 - r8a7791_register_scif(SCIFB2); 182 - r8a7791_register_scif(SCIFA2); 183 - r8a7791_register_scif(SCIF0); 184 - r8a7791_register_scif(SCIF1); 185 - r8a7791_register_scif(SCIF2); 186 - r8a7791_register_scif(SCIF3); 187 - r8a7791_register_scif(SCIF4); 188 - r8a7791_register_scif(SCIF5); 189 - r8a7791_register_scif(SCIFA3); 190 - r8a7791_register_scif(SCIFA4); 191 - r8a7791_register_scif(SCIFA5); 152 + r8a7791_register_scif(0); 153 + r8a7791_register_scif(1); 154 + r8a7791_register_scif(2); 155 + r8a7791_register_scif(3); 156 + r8a7791_register_scif(4); 157 + r8a7791_register_scif(5); 158 + r8a7791_register_scif(6); 159 + r8a7791_register_scif(7); 160 + r8a7791_register_scif(8); 161 + r8a7791_register_scif(9); 162 + r8a7791_register_scif(10); 163 + r8a7791_register_scif(11); 164 + r8a7791_register_scif(12); 165 + r8a7791_register_scif(13); 166 + r8a7791_register_scif(14); 192 167 r8a7791_register_cmt(00); 193 168 } 194 169 ··· 207 160 { 208 161 r8a7791_add_dt_devices(); 209 162 r8a7791_register_irqc(0); 163 + r8a7791_register_thermal(); 210 164 } 211 165 212 166 void __init r8a7791_init_early(void)
+23 -6
arch/arm/mach-shmobile/setup-rcar-gen2.c
··· 18 18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 19 19 */ 20 20 21 + #include <linux/clk/shmobile.h> 21 22 #include <linux/clocksource.h> 22 23 #include <linux/io.h> 23 24 #include <linux/kernel.h> ··· 45 44 46 45 void __init rcar_gen2_timer_init(void) 47 46 { 48 - #ifdef CONFIG_ARM_ARCH_TIMER 47 + #if defined(CONFIG_ARM_ARCH_TIMER) || defined(CONFIG_COMMON_CLK) 49 48 u32 mode = rcar_gen2_read_mode_pins(); 49 + #endif 50 + #ifdef CONFIG_ARM_ARCH_TIMER 50 51 void __iomem *base; 51 52 int extal_mhz = 0; 52 53 u32 freq; ··· 81 78 /* Remap "armgcnt address map" space */ 82 79 base = ioremap(0xe6080000, PAGE_SIZE); 83 80 84 - /* Update registers with correct frequency */ 85 - iowrite32(freq, base + CNTFID0); 86 - asm volatile("mcr p15, 0, %0, c14, c0, 0" : : "r" (freq)); 81 + /* 82 + * Update the timer if it is either not running, or is not at the 83 + * right frequency. The timer is only configurable in secure mode 84 + * so this avoids an abort if the loader started the timer and 85 + * entered the kernel in non-secure mode. 86 + */ 87 87 88 - /* make sure arch timer is started by setting bit 0 of CNTCR */ 89 - iowrite32(1, base + CNTCR); 88 + if ((ioread32(base + CNTCR) & 1) == 0 || 89 + ioread32(base + CNTFID0) != freq) { 90 + /* Update registers with correct frequency */ 91 + iowrite32(freq, base + CNTFID0); 92 + asm volatile("mcr p15, 0, %0, c14, c0, 0" : : "r" (freq)); 93 + 94 + /* make sure arch timer is started by setting bit 0 of CNTCR */ 95 + iowrite32(1, base + CNTCR); 96 + } 97 + 90 98 iounmap(base); 91 99 #endif /* CONFIG_ARM_ARCH_TIMER */ 92 100 101 + #ifdef CONFIG_COMMON_CLK 102 + rcar_gen2_clocks_init(mode); 103 + #endif 93 104 clocksource_of_init(); 94 105 }
+29 -131
arch/arm/mach-shmobile/setup-sh7372.c
··· 86 86 platform_device_register(&sh7372_pfc_device); 87 87 } 88 88 89 - /* SCIFA0 */ 90 - static struct plat_sci_port scif0_platform_data = { 91 - .mapbase = 0xe6c40000, 92 - .flags = UPF_BOOT_AUTOCONF, 93 - .scscr = SCSCR_RE | SCSCR_TE, 94 - .scbrr_algo_id = SCBRR_ALGO_4, 95 - .type = PORT_SCIFA, 96 - .irqs = { evt2irq(0x0c00), evt2irq(0x0c00), 97 - evt2irq(0x0c00), evt2irq(0x0c00) }, 98 - }; 89 + /* SCIF */ 90 + #define SH7372_SCIF(scif_type, index, baseaddr, irq) \ 91 + static struct plat_sci_port scif##index##_platform_data = { \ 92 + .type = scif_type, \ 93 + .flags = UPF_BOOT_AUTOCONF, \ 94 + .scscr = SCSCR_RE | SCSCR_TE, \ 95 + }; \ 96 + \ 97 + static struct resource scif##index##_resources[] = { \ 98 + DEFINE_RES_MEM(baseaddr, 0x100), \ 99 + DEFINE_RES_IRQ(irq), \ 100 + }; \ 101 + \ 102 + static struct platform_device scif##index##_device = { \ 103 + .name = "sh-sci", \ 104 + .id = index, \ 105 + .resource = scif##index##_resources, \ 106 + .num_resources = ARRAY_SIZE(scif##index##_resources), \ 107 + .dev = { \ 108 + .platform_data = &scif##index##_platform_data, \ 109 + }, \ 110 + } 99 111 100 - static struct platform_device scif0_device = { 101 - .name = "sh-sci", 102 - .id = 0, 103 - .dev = { 104 - .platform_data = &scif0_platform_data, 105 - }, 106 - }; 107 - 108 - /* SCIFA1 */ 109 - static struct plat_sci_port scif1_platform_data = { 110 - .mapbase = 0xe6c50000, 111 - .flags = UPF_BOOT_AUTOCONF, 112 - .scscr = SCSCR_RE | SCSCR_TE, 113 - .scbrr_algo_id = SCBRR_ALGO_4, 114 - .type = PORT_SCIFA, 115 - .irqs = { evt2irq(0x0c20), evt2irq(0x0c20), 116 - evt2irq(0x0c20), evt2irq(0x0c20) }, 117 - }; 118 - 119 - static struct platform_device scif1_device = { 120 - .name = "sh-sci", 121 - .id = 1, 122 - .dev = { 123 - .platform_data = &scif1_platform_data, 124 - }, 125 - }; 126 - 127 - /* SCIFA2 */ 128 - static struct plat_sci_port scif2_platform_data = { 129 - .mapbase = 0xe6c60000, 130 - .flags = UPF_BOOT_AUTOCONF, 131 - .scscr = SCSCR_RE | SCSCR_TE, 132 - .scbrr_algo_id = SCBRR_ALGO_4, 133 - .type = PORT_SCIFA, 134 - .irqs = { evt2irq(0x0c40), evt2irq(0x0c40), 135 - evt2irq(0x0c40), evt2irq(0x0c40) }, 136 - }; 137 - 138 - static struct platform_device scif2_device = { 139 - .name = "sh-sci", 140 - .id = 2, 141 - .dev = { 142 - .platform_data = &scif2_platform_data, 143 - }, 144 - }; 145 - 146 - /* SCIFA3 */ 147 - static struct plat_sci_port scif3_platform_data = { 148 - .mapbase = 0xe6c70000, 149 - .flags = UPF_BOOT_AUTOCONF, 150 - .scscr = SCSCR_RE | SCSCR_TE, 151 - .scbrr_algo_id = SCBRR_ALGO_4, 152 - .type = PORT_SCIFA, 153 - .irqs = { evt2irq(0x0c60), evt2irq(0x0c60), 154 - evt2irq(0x0c60), evt2irq(0x0c60) }, 155 - }; 156 - 157 - static struct platform_device scif3_device = { 158 - .name = "sh-sci", 159 - .id = 3, 160 - .dev = { 161 - .platform_data = &scif3_platform_data, 162 - }, 163 - }; 164 - 165 - /* SCIFA4 */ 166 - static struct plat_sci_port scif4_platform_data = { 167 - .mapbase = 0xe6c80000, 168 - .flags = UPF_BOOT_AUTOCONF, 169 - .scscr = SCSCR_RE | SCSCR_TE, 170 - .scbrr_algo_id = SCBRR_ALGO_4, 171 - .type = PORT_SCIFA, 172 - .irqs = { evt2irq(0x0d20), evt2irq(0x0d20), 173 - evt2irq(0x0d20), evt2irq(0x0d20) }, 174 - }; 175 - 176 - static struct platform_device scif4_device = { 177 - .name = "sh-sci", 178 - .id = 4, 179 - .dev = { 180 - .platform_data = &scif4_platform_data, 181 - }, 182 - }; 183 - 184 - /* SCIFA5 */ 185 - static struct plat_sci_port scif5_platform_data = { 186 - .mapbase = 0xe6cb0000, 187 - .flags = UPF_BOOT_AUTOCONF, 188 - .scscr = SCSCR_RE | SCSCR_TE, 189 - .scbrr_algo_id = SCBRR_ALGO_4, 190 - .type = PORT_SCIFA, 191 - .irqs = { evt2irq(0x0d40), evt2irq(0x0d40), 192 - evt2irq(0x0d40), evt2irq(0x0d40) }, 193 - }; 194 - 195 - static struct platform_device scif5_device = { 196 - .name = "sh-sci", 197 - .id = 5, 198 - .dev = { 199 - .platform_data = &scif5_platform_data, 200 - }, 201 - }; 202 - 203 - /* SCIFB */ 204 - static struct plat_sci_port scif6_platform_data = { 205 - .mapbase = 0xe6c30000, 206 - .flags = UPF_BOOT_AUTOCONF, 207 - .scscr = SCSCR_RE | SCSCR_TE, 208 - .scbrr_algo_id = SCBRR_ALGO_4, 209 - .type = PORT_SCIFB, 210 - .irqs = { evt2irq(0x0d60), evt2irq(0x0d60), 211 - evt2irq(0x0d60), evt2irq(0x0d60) }, 212 - }; 213 - 214 - static struct platform_device scif6_device = { 215 - .name = "sh-sci", 216 - .id = 6, 217 - .dev = { 218 - .platform_data = &scif6_platform_data, 219 - }, 220 - }; 112 + SH7372_SCIF(PORT_SCIFA, 0, 0xe6c40000, evt2irq(0x0c00)); 113 + SH7372_SCIF(PORT_SCIFA, 1, 0xe6c50000, evt2irq(0x0c20)); 114 + SH7372_SCIF(PORT_SCIFA, 2, 0xe6c60000, evt2irq(0x0c40)); 115 + SH7372_SCIF(PORT_SCIFA, 3, 0xe6c70000, evt2irq(0x0c60)); 116 + SH7372_SCIF(PORT_SCIFA, 4, 0xe6c80000, evt2irq(0x0d20)); 117 + SH7372_SCIF(PORT_SCIFA, 5, 0xe6cb0000, evt2irq(0x0d40)); 118 + SH7372_SCIF(PORT_SCIFB, 6, 0xe6c30000, evt2irq(0x0d60)); 221 119 222 120 /* CMT */ 223 121 static struct sh_timer_config cmt2_platform_data = {
+31 -160
arch/arm/mach-shmobile/setup-sh73a0.c
··· 71 71 ARRAY_SIZE(pfc_resources)); 72 72 } 73 73 74 - static struct plat_sci_port scif0_platform_data = { 75 - .mapbase = 0xe6c40000, 76 - .flags = UPF_BOOT_AUTOCONF, 77 - .scscr = SCSCR_RE | SCSCR_TE, 78 - .scbrr_algo_id = SCBRR_ALGO_4, 79 - .type = PORT_SCIFA, 80 - .irqs = { gic_spi(72), gic_spi(72), 81 - gic_spi(72), gic_spi(72) }, 82 - }; 74 + /* SCIF */ 75 + #define SH73A0_SCIF(scif_type, index, baseaddr, irq) \ 76 + static struct plat_sci_port scif##index##_platform_data = { \ 77 + .type = scif_type, \ 78 + .flags = UPF_BOOT_AUTOCONF, \ 79 + .scscr = SCSCR_RE | SCSCR_TE, \ 80 + }; \ 81 + \ 82 + static struct resource scif##index##_resources[] = { \ 83 + DEFINE_RES_MEM(baseaddr, 0x100), \ 84 + DEFINE_RES_IRQ(irq), \ 85 + }; \ 86 + \ 87 + static struct platform_device scif##index##_device = { \ 88 + .name = "sh-sci", \ 89 + .id = index, \ 90 + .resource = scif##index##_resources, \ 91 + .num_resources = ARRAY_SIZE(scif##index##_resources), \ 92 + .dev = { \ 93 + .platform_data = &scif##index##_platform_data, \ 94 + }, \ 95 + } 83 96 84 - static struct platform_device scif0_device = { 85 - .name = "sh-sci", 86 - .id = 0, 87 - .dev = { 88 - .platform_data = &scif0_platform_data, 89 - }, 90 - }; 91 - 92 - static struct plat_sci_port scif1_platform_data = { 93 - .mapbase = 0xe6c50000, 94 - .flags = UPF_BOOT_AUTOCONF, 95 - .scscr = SCSCR_RE | SCSCR_TE, 96 - .scbrr_algo_id = SCBRR_ALGO_4, 97 - .type = PORT_SCIFA, 98 - .irqs = { gic_spi(73), gic_spi(73), 99 - gic_spi(73), gic_spi(73) }, 100 - }; 101 - 102 - static struct platform_device scif1_device = { 103 - .name = "sh-sci", 104 - .id = 1, 105 - .dev = { 106 - .platform_data = &scif1_platform_data, 107 - }, 108 - }; 109 - 110 - static struct plat_sci_port scif2_platform_data = { 111 - .mapbase = 0xe6c60000, 112 - .flags = UPF_BOOT_AUTOCONF, 113 - .scscr = SCSCR_RE | SCSCR_TE, 114 - .scbrr_algo_id = SCBRR_ALGO_4, 115 - .type = PORT_SCIFA, 116 - .irqs = { gic_spi(74), gic_spi(74), 117 - gic_spi(74), gic_spi(74) }, 118 - }; 119 - 120 - static struct platform_device scif2_device = { 121 - .name = "sh-sci", 122 - .id = 2, 123 - .dev = { 124 - .platform_data = &scif2_platform_data, 125 - }, 126 - }; 127 - 128 - static struct plat_sci_port scif3_platform_data = { 129 - .mapbase = 0xe6c70000, 130 - .flags = UPF_BOOT_AUTOCONF, 131 - .scscr = SCSCR_RE | SCSCR_TE, 132 - .scbrr_algo_id = SCBRR_ALGO_4, 133 - .type = PORT_SCIFA, 134 - .irqs = { gic_spi(75), gic_spi(75), 135 - gic_spi(75), gic_spi(75) }, 136 - }; 137 - 138 - static struct platform_device scif3_device = { 139 - .name = "sh-sci", 140 - .id = 3, 141 - .dev = { 142 - .platform_data = &scif3_platform_data, 143 - }, 144 - }; 145 - 146 - static struct plat_sci_port scif4_platform_data = { 147 - .mapbase = 0xe6c80000, 148 - .flags = UPF_BOOT_AUTOCONF, 149 - .scscr = SCSCR_RE | SCSCR_TE, 150 - .scbrr_algo_id = SCBRR_ALGO_4, 151 - .type = PORT_SCIFA, 152 - .irqs = { gic_spi(78), gic_spi(78), 153 - gic_spi(78), gic_spi(78) }, 154 - }; 155 - 156 - static struct platform_device scif4_device = { 157 - .name = "sh-sci", 158 - .id = 4, 159 - .dev = { 160 - .platform_data = &scif4_platform_data, 161 - }, 162 - }; 163 - 164 - static struct plat_sci_port scif5_platform_data = { 165 - .mapbase = 0xe6cb0000, 166 - .flags = UPF_BOOT_AUTOCONF, 167 - .scscr = SCSCR_RE | SCSCR_TE, 168 - .scbrr_algo_id = SCBRR_ALGO_4, 169 - .type = PORT_SCIFA, 170 - .irqs = { gic_spi(79), gic_spi(79), 171 - gic_spi(79), gic_spi(79) }, 172 - }; 173 - 174 - static struct platform_device scif5_device = { 175 - .name = "sh-sci", 176 - .id = 5, 177 - .dev = { 178 - .platform_data = &scif5_platform_data, 179 - }, 180 - }; 181 - 182 - static struct plat_sci_port scif6_platform_data = { 183 - .mapbase = 0xe6cc0000, 184 - .flags = UPF_BOOT_AUTOCONF, 185 - .scscr = SCSCR_RE | SCSCR_TE, 186 - .scbrr_algo_id = SCBRR_ALGO_4, 187 - .type = PORT_SCIFA, 188 - .irqs = { gic_spi(156), gic_spi(156), 189 - gic_spi(156), gic_spi(156) }, 190 - }; 191 - 192 - static struct platform_device scif6_device = { 193 - .name = "sh-sci", 194 - .id = 6, 195 - .dev = { 196 - .platform_data = &scif6_platform_data, 197 - }, 198 - }; 199 - 200 - static struct plat_sci_port scif7_platform_data = { 201 - .mapbase = 0xe6cd0000, 202 - .flags = UPF_BOOT_AUTOCONF, 203 - .scscr = SCSCR_RE | SCSCR_TE, 204 - .scbrr_algo_id = SCBRR_ALGO_4, 205 - .type = PORT_SCIFA, 206 - .irqs = { gic_spi(143), gic_spi(143), 207 - gic_spi(143), gic_spi(143) }, 208 - }; 209 - 210 - static struct platform_device scif7_device = { 211 - .name = "sh-sci", 212 - .id = 7, 213 - .dev = { 214 - .platform_data = &scif7_platform_data, 215 - }, 216 - }; 217 - 218 - static struct plat_sci_port scif8_platform_data = { 219 - .mapbase = 0xe6c30000, 220 - .flags = UPF_BOOT_AUTOCONF, 221 - .scscr = SCSCR_RE | SCSCR_TE, 222 - .scbrr_algo_id = SCBRR_ALGO_4, 223 - .type = PORT_SCIFB, 224 - .irqs = { gic_spi(80), gic_spi(80), 225 - gic_spi(80), gic_spi(80) }, 226 - }; 227 - 228 - static struct platform_device scif8_device = { 229 - .name = "sh-sci", 230 - .id = 8, 231 - .dev = { 232 - .platform_data = &scif8_platform_data, 233 - }, 234 - }; 97 + SH73A0_SCIF(PORT_SCIFA, 0, 0xe6c40000, gic_spi(72)); 98 + SH73A0_SCIF(PORT_SCIFA, 1, 0xe6c50000, gic_spi(73)); 99 + SH73A0_SCIF(PORT_SCIFA, 2, 0xe6c60000, gic_spi(74)); 100 + SH73A0_SCIF(PORT_SCIFA, 3, 0xe6c70000, gic_spi(75)); 101 + SH73A0_SCIF(PORT_SCIFA, 4, 0xe6c80000, gic_spi(78)); 102 + SH73A0_SCIF(PORT_SCIFA, 5, 0xe6cb0000, gic_spi(79)); 103 + SH73A0_SCIF(PORT_SCIFA, 6, 0xe6cc0000, gic_spi(156)); 104 + SH73A0_SCIF(PORT_SCIFA, 7, 0xe6cd0000, gic_spi(143)); 105 + SH73A0_SCIF(PORT_SCIFB, 8, 0xe6c30000, gic_spi(80)); 235 106 236 107 static struct sh_timer_config cmt10_platform_data = { 237 108 .name = "CMT10",
+3
arch/arm/mach-sunxi/Kconfig
··· 1 1 config ARCH_SUNXI 2 2 bool "Allwinner A1X SOCs" if ARCH_MULTI_V7 3 + select ARCH_HAS_RESET_CONTROLLER 3 4 select ARCH_REQUIRE_GPIOLIB 4 5 select ARM_GIC 6 + select ARM_PSCI 5 7 select CLKSRC_MMIO 6 8 select CLKSRC_OF 7 9 select COMMON_CLK ··· 12 10 select HAVE_SMP 13 11 select PINCTRL 14 12 select PINCTRL_SUNXI 13 + select RESET_CONTROLLER 15 14 select SPARSE_IRQ 16 15 select SUN4I_TIMER 17 16 select SUN5I_HSTIMER
+1
arch/arm/mach-sunxi/Makefile
··· 1 1 obj-$(CONFIG_ARCH_SUNXI) += sunxi.o 2 + obj-$(CONFIG_SMP) += platsmp.o headsmp.o
+19
arch/arm/mach-sunxi/common.h
··· 1 + /* 2 + * Core functions for Allwinner SoCs 3 + * 4 + * Copyright (C) 2013 Maxime Ripard 5 + * 6 + * Maxime Ripard <maxime.ripard@free-electrons.com> 7 + * 8 + * This file is licensed under the terms of the GNU General Public 9 + * License version 2. This program is licensed "as is" without any 10 + * warranty of any kind, whether express or implied. 11 + */ 12 + 13 + #ifndef __ARCH_SUNXI_COMMON_H_ 14 + #define __ARCH_SUNXI_COMMON_H_ 15 + 16 + void sun6i_secondary_startup(void); 17 + extern struct smp_operations sun6i_smp_ops; 18 + 19 + #endif /* __ARCH_SUNXI_COMMON_H_ */
+9
arch/arm/mach-sunxi/headsmp.S
··· 1 + #include <linux/linkage.h> 2 + #include <linux/init.h> 3 + 4 + .section ".text.head", "ax" 5 + 6 + ENTRY(sun6i_secondary_startup) 7 + msr cpsr_fsxc, #0xd3 8 + b secondary_startup 9 + ENDPROC(sun6i_secondary_startup)
+124
arch/arm/mach-sunxi/platsmp.c
··· 1 + /* 2 + * SMP support for Allwinner SoCs 3 + * 4 + * Copyright (C) 2013 Maxime Ripard 5 + * 6 + * Maxime Ripard <maxime.ripard@free-electrons.com> 7 + * 8 + * Based on code 9 + * Copyright (C) 2012-2013 Allwinner Ltd. 10 + * 11 + * This file is licensed under the terms of the GNU General Public 12 + * License version 2. This program is licensed "as is" without any 13 + * warranty of any kind, whether express or implied. 14 + */ 15 + 16 + #include <linux/delay.h> 17 + #include <linux/init.h> 18 + #include <linux/io.h> 19 + #include <linux/memory.h> 20 + #include <linux/of.h> 21 + #include <linux/of_address.h> 22 + #include <linux/smp.h> 23 + 24 + #include "common.h" 25 + 26 + #define CPUCFG_CPU_PWR_CLAMP_STATUS_REG(cpu) ((cpu) * 0x40 + 0x64) 27 + #define CPUCFG_CPU_RST_CTRL_REG(cpu) (((cpu) + 1) * 0x40) 28 + #define CPUCFG_CPU_CTRL_REG(cpu) (((cpu) + 1) * 0x40 + 0x04) 29 + #define CPUCFG_CPU_STATUS_REG(cpu) (((cpu) + 1) * 0x40 + 0x08) 30 + #define CPUCFG_GEN_CTRL_REG 0x184 31 + #define CPUCFG_PRIVATE0_REG 0x1a4 32 + #define CPUCFG_PRIVATE1_REG 0x1a8 33 + #define CPUCFG_DBG_CTL0_REG 0x1e0 34 + #define CPUCFG_DBG_CTL1_REG 0x1e4 35 + 36 + #define PRCM_CPU_PWROFF_REG 0x100 37 + #define PRCM_CPU_PWR_CLAMP_REG(cpu) (((cpu) * 4) + 0x140) 38 + 39 + static void __iomem *cpucfg_membase; 40 + static void __iomem *prcm_membase; 41 + 42 + static DEFINE_SPINLOCK(cpu_lock); 43 + 44 + static void __init sun6i_smp_prepare_cpus(unsigned int max_cpus) 45 + { 46 + struct device_node *node; 47 + 48 + node = of_find_compatible_node(NULL, NULL, "allwinner,sun6i-a31-prcm"); 49 + if (!node) { 50 + pr_err("Missing A31 PRCM node in the device tree\n"); 51 + return; 52 + } 53 + 54 + prcm_membase = of_iomap(node, 0); 55 + if (!prcm_membase) { 56 + pr_err("Couldn't map A31 PRCM registers\n"); 57 + return; 58 + } 59 + 60 + node = of_find_compatible_node(NULL, NULL, 61 + "allwinner,sun6i-a31-cpuconfig"); 62 + if (!node) { 63 + pr_err("Missing A31 CPU config node in the device tree\n"); 64 + return; 65 + } 66 + 67 + cpucfg_membase = of_iomap(node, 0); 68 + if (!cpucfg_membase) 69 + pr_err("Couldn't map A31 CPU config registers\n"); 70 + 71 + } 72 + 73 + static int sun6i_smp_boot_secondary(unsigned int cpu, 74 + struct task_struct *idle) 75 + { 76 + u32 reg; 77 + int i; 78 + 79 + if (!(prcm_membase && cpucfg_membase)) 80 + return -EFAULT; 81 + 82 + spin_lock(&cpu_lock); 83 + 84 + /* Set CPU boot address */ 85 + writel(virt_to_phys(sun6i_secondary_startup), 86 + cpucfg_membase + CPUCFG_PRIVATE0_REG); 87 + 88 + /* Assert the CPU core in reset */ 89 + writel(0, cpucfg_membase + CPUCFG_CPU_RST_CTRL_REG(cpu)); 90 + 91 + /* Assert the L1 cache in reset */ 92 + reg = readl(cpucfg_membase + CPUCFG_GEN_CTRL_REG); 93 + writel(reg & ~BIT(cpu), cpucfg_membase + CPUCFG_GEN_CTRL_REG); 94 + 95 + /* Disable external debug access */ 96 + reg = readl(cpucfg_membase + CPUCFG_DBG_CTL1_REG); 97 + writel(reg & ~BIT(cpu), cpucfg_membase + CPUCFG_DBG_CTL1_REG); 98 + 99 + /* Power up the CPU */ 100 + for (i = 0; i <= 8; i++) 101 + writel(0xff >> i, prcm_membase + PRCM_CPU_PWR_CLAMP_REG(cpu)); 102 + mdelay(10); 103 + 104 + /* Clear CPU power-off gating */ 105 + reg = readl(prcm_membase + PRCM_CPU_PWROFF_REG); 106 + writel(reg & ~BIT(cpu), prcm_membase + PRCM_CPU_PWROFF_REG); 107 + mdelay(1); 108 + 109 + /* Deassert the CPU core reset */ 110 + writel(3, cpucfg_membase + CPUCFG_CPU_RST_CTRL_REG(cpu)); 111 + 112 + /* Enable back the external debug accesses */ 113 + reg = readl(cpucfg_membase + CPUCFG_DBG_CTL1_REG); 114 + writel(reg | BIT(cpu), cpucfg_membase + CPUCFG_DBG_CTL1_REG); 115 + 116 + spin_unlock(&cpu_lock); 117 + 118 + return 0; 119 + } 120 + 121 + struct smp_operations sun6i_smp_ops __initdata = { 122 + .smp_prepare_cpus = sun6i_smp_prepare_cpus, 123 + .smp_boot_secondary = sun6i_smp_boot_secondary, 124 + };
+14
arch/arm/mach-sunxi/sunxi.c
··· 10 10 * warranty of any kind, whether express or implied. 11 11 */ 12 12 13 + #include <linux/clk-provider.h> 14 + #include <linux/clocksource.h> 13 15 #include <linux/delay.h> 14 16 #include <linux/kernel.h> 15 17 #include <linux/init.h> ··· 24 22 #include <asm/mach/arch.h> 25 23 #include <asm/mach/map.h> 26 24 #include <asm/system_misc.h> 25 + 26 + #include "common.h" 27 27 28 28 #define SUN4I_WATCHDOG_CTRL_REG 0x00 29 29 #define SUN4I_WATCHDOG_CTRL_RESTART BIT(0) ··· 136 132 NULL, 137 133 }; 138 134 135 + extern void __init sun6i_reset_init(void); 136 + static void __init sun6i_timer_init(void) 137 + { 138 + of_clk_init(NULL); 139 + sun6i_reset_init(); 140 + clocksource_of_init(); 141 + } 142 + 139 143 DT_MACHINE_START(SUN6I_DT, "Allwinner sun6i (A31) Family") 140 144 .init_machine = sunxi_dt_init, 145 + .init_time = sun6i_timer_init, 141 146 .dt_compat = sun6i_board_dt_compat, 142 147 .restart = sun6i_restart, 148 + .smp = smp_ops(sun6i_smp_ops), 143 149 MACHINE_END 144 150 145 151 static const char * const sun7i_board_dt_compat[] = {
+1
arch/arm/mach-tegra/Kconfig
··· 65 65 bool "Enable support for Tegra124 family" 66 66 select ARM_L1_CACHE_SHIFT_6 67 67 select HAVE_ARM_ARCH_TIMER 68 + select PINCTRL_TEGRA124 68 69 help 69 70 Support for NVIDIA Tegra T124 processor family, based on the 70 71 ARM CortexA15MP CPU
+40 -1
arch/arm/mach-tegra/fuse.c
··· 22 22 #include <linux/io.h> 23 23 #include <linux/export.h> 24 24 #include <linux/random.h> 25 + #include <linux/clk.h> 25 26 #include <linux/tegra-soc.h> 26 27 27 28 #include "fuse.h" ··· 55 54 int tegra_soc_speedo_id; 56 55 enum tegra_revision tegra_revision; 57 56 57 + static struct clk *fuse_clk; 58 58 static int tegra_fuse_spare_bit; 59 59 static void (*tegra_init_speedo_data)(void); 60 60 ··· 79 77 [TEGRA_REVISION_A04] = "A04", 80 78 }; 81 79 80 + static void tegra_fuse_enable_clk(void) 81 + { 82 + if (IS_ERR(fuse_clk)) 83 + fuse_clk = clk_get_sys(NULL, "fuse"); 84 + if (IS_ERR(fuse_clk)) 85 + return; 86 + clk_prepare_enable(fuse_clk); 87 + } 88 + 89 + static void tegra_fuse_disable_clk(void) 90 + { 91 + if (IS_ERR(fuse_clk)) 92 + return; 93 + clk_disable_unprepare(fuse_clk); 94 + } 95 + 82 96 u32 tegra_fuse_readl(unsigned long offset) 83 97 { 84 98 return tegra_apb_readl(TEGRA_FUSE_BASE + offset); ··· 102 84 103 85 bool tegra_spare_fuse(int bit) 104 86 { 105 - return tegra_fuse_readl(tegra_fuse_spare_bit + bit * 4); 87 + bool ret; 88 + 89 + tegra_fuse_enable_clk(); 90 + 91 + ret = tegra_fuse_readl(tegra_fuse_spare_bit + bit * 4); 92 + 93 + tegra_fuse_disable_clk(); 94 + 95 + return ret; 106 96 } 107 97 108 98 static enum tegra_revision tegra_get_revision(u32 id) ··· 139 113 { 140 114 u32 reg; 141 115 116 + tegra_fuse_enable_clk(); 117 + 142 118 reg = tegra_fuse_readl(tegra_fuse_spare_bit); 143 119 tegra_cpu_process_id = (reg >> 6) & 3; 144 120 reg = tegra_fuse_readl(tegra_fuse_spare_bit); 145 121 tegra_core_process_id = (reg >> 12) & 3; 122 + 123 + tegra_fuse_disable_clk(); 146 124 } 147 125 148 126 u32 tegra_read_chipid(void) ··· 188 158 u32 reg = readl(IO_ADDRESS(TEGRA_CLK_RESET_BASE + 0x48)); 189 159 reg |= 1 << 28; 190 160 writel(reg, IO_ADDRESS(TEGRA_CLK_RESET_BASE + 0x48)); 161 + 162 + /* 163 + * Enable FUSE clock. This needs to be hardcoded because the clock 164 + * subsystem is not active during early boot. 165 + */ 166 + reg = readl(IO_ADDRESS(TEGRA_CLK_RESET_BASE + 0x14)); 167 + reg |= 1 << 7; 168 + writel(reg, IO_ADDRESS(TEGRA_CLK_RESET_BASE + 0x14)); 169 + fuse_clk = ERR_PTR(-EINVAL); 191 170 192 171 reg = tegra_fuse_readl(FUSE_SKU_INFO); 193 172 randomness[0] = reg;
+7 -7
arch/arm/mach-tegra/iomap.h
··· 19 19 #ifndef __MACH_TEGRA_IOMAP_H 20 20 #define __MACH_TEGRA_IOMAP_H 21 21 22 + #include <asm/pgtable.h> 22 23 #include <asm/sizes.h> 23 24 24 25 #define TEGRA_IRAM_BASE 0x40000000 ··· 116 115 * two 256MB io windows (that actually only use about 64KB 117 116 * at the start of each). 118 117 * 119 - * We will just map the first 1MB of each window (to minimize 118 + * We will just map the first MMU section of each window (to minimize 120 119 * pt entries needed) and provide a macro to transform physical 121 120 * io addresses to an appropriate void __iomem *. 122 - * 123 121 */ 124 122 125 123 #define IO_IRAM_PHYS 0x40000000 126 124 #define IO_IRAM_VIRT IOMEM(0xFE400000) 127 125 #define IO_IRAM_SIZE SZ_256K 128 126 129 - #define IO_CPU_PHYS 0x50040000 130 - #define IO_CPU_VIRT IOMEM(0xFE000000) 127 + #define IO_CPU_PHYS 0x50040000 128 + #define IO_CPU_VIRT IOMEM(0xFE440000) 131 129 #define IO_CPU_SIZE SZ_16K 132 130 133 131 #define IO_PPSB_PHYS 0x60000000 134 132 #define IO_PPSB_VIRT IOMEM(0xFE200000) 135 - #define IO_PPSB_SIZE SZ_1M 133 + #define IO_PPSB_SIZE SECTION_SIZE 136 134 137 135 #define IO_APB_PHYS 0x70000000 138 - #define IO_APB_VIRT IOMEM(0xFE300000) 139 - #define IO_APB_SIZE SZ_1M 136 + #define IO_APB_VIRT IOMEM(0xFE000000) 137 + #define IO_APB_SIZE SECTION_SIZE 140 138 141 139 #define IO_TO_VIRT_BETWEEN(p, st, sz) ((p) >= (st) && (p) < ((st) + (sz))) 142 140 #define IO_TO_VIRT_XLATE(p, pst, vst) (((p) - (pst) + (vst)))
+192 -3
arch/arm/mach-tegra/powergate.c
··· 34 34 #include "fuse.h" 35 35 #include "iomap.h" 36 36 37 + #define DPD_SAMPLE 0x020 38 + #define DPD_SAMPLE_ENABLE (1 << 0) 39 + #define DPD_SAMPLE_DISABLE (0 << 0) 40 + 37 41 #define PWRGATE_TOGGLE 0x30 38 42 #define PWRGATE_TOGGLE_START (1 << 8) 39 43 40 44 #define REMOVE_CLAMPING 0x34 41 45 42 46 #define PWRGATE_STATUS 0x38 47 + 48 + #define IO_DPD_REQ 0x1b8 49 + #define IO_DPD_REQ_CODE_IDLE (0 << 30) 50 + #define IO_DPD_REQ_CODE_OFF (1 << 30) 51 + #define IO_DPD_REQ_CODE_ON (2 << 30) 52 + #define IO_DPD_REQ_CODE_MASK (3 << 30) 53 + 54 + #define IO_DPD_STATUS 0x1bc 55 + #define IO_DPD2_REQ 0x1c0 56 + #define IO_DPD2_STATUS 0x1c4 57 + #define SEL_DPD_TIM 0x1c8 58 + 59 + #define GPU_RG_CNTRL 0x2d4 43 60 44 61 static int tegra_num_powerdomains; 45 62 static int tegra_num_cpu_domains; ··· 70 53 }; 71 54 72 55 static const u8 tegra114_cpu_domains[] = { 56 + TEGRA_POWERGATE_CPU0, 57 + TEGRA_POWERGATE_CPU1, 58 + TEGRA_POWERGATE_CPU2, 59 + TEGRA_POWERGATE_CPU3, 60 + }; 61 + 62 + static const u8 tegra124_cpu_domains[] = { 73 63 TEGRA_POWERGATE_CPU0, 74 64 TEGRA_POWERGATE_CPU1, 75 65 TEGRA_POWERGATE_CPU2, ··· 133 109 134 110 return tegra_powergate_set(id, false); 135 111 } 112 + EXPORT_SYMBOL(tegra_powergate_power_off); 136 113 137 114 int tegra_powergate_is_powered(int id) 138 115 { ··· 154 129 return -EINVAL; 155 130 156 131 /* 132 + * The Tegra124 GPU has a separate register (with different semantics) 133 + * to remove clamps. 134 + */ 135 + if (tegra_chip_id == TEGRA124) { 136 + if (id == TEGRA_POWERGATE_3D) { 137 + pmc_write(0, GPU_RG_CNTRL); 138 + return 0; 139 + } 140 + } 141 + 142 + /* 157 143 * Tegra 2 has a bug where PCIE and VDE clamping masks are 158 144 * swapped relatively to the partition ids 159 145 */ 160 - if (id == TEGRA_POWERGATE_VDEC) 146 + if (id == TEGRA_POWERGATE_VDEC) 161 147 mask = (1 << TEGRA_POWERGATE_PCIE); 162 - else if (id == TEGRA_POWERGATE_PCIE) 148 + else if (id == TEGRA_POWERGATE_PCIE) 163 149 mask = (1 << TEGRA_POWERGATE_VDEC); 164 150 else 165 151 mask = (1 << id); ··· 179 143 180 144 return 0; 181 145 } 146 + EXPORT_SYMBOL(tegra_powergate_remove_clamping); 182 147 183 148 /* Must be called with clk disabled, and returns with clk enabled */ 184 149 int tegra_powergate_sequence_power_up(int id, struct clk *clk, ··· 241 204 tegra_num_cpu_domains = 4; 242 205 tegra_cpu_domains = tegra114_cpu_domains; 243 206 break; 207 + case TEGRA124: 208 + tegra_num_powerdomains = 25; 209 + tegra_num_cpu_domains = 4; 210 + tegra_cpu_domains = tegra124_cpu_domains; 211 + break; 244 212 default: 245 213 /* Unknown Tegra variant. Disable powergating */ 246 214 tegra_num_powerdomains = 0; ··· 287 245 }; 288 246 289 247 static const char * const powergate_name_t114[] = { 290 - [TEGRA_POWERGATE_CPU] = "cpu0", 248 + [TEGRA_POWERGATE_CPU] = "crail", 291 249 [TEGRA_POWERGATE_3D] = "3d", 292 250 [TEGRA_POWERGATE_VENC] = "venc", 293 251 [TEGRA_POWERGATE_VDEC] = "vdec", ··· 305 263 [TEGRA_POWERGATE_XUSBA] = "xusba", 306 264 [TEGRA_POWERGATE_XUSBB] = "xusbb", 307 265 [TEGRA_POWERGATE_XUSBC] = "xusbc", 266 + }; 267 + 268 + static const char * const powergate_name_t124[] = { 269 + [TEGRA_POWERGATE_CPU] = "crail", 270 + [TEGRA_POWERGATE_3D] = "3d", 271 + [TEGRA_POWERGATE_VENC] = "venc", 272 + [TEGRA_POWERGATE_PCIE] = "pcie", 273 + [TEGRA_POWERGATE_VDEC] = "vdec", 274 + [TEGRA_POWERGATE_L2] = "l2", 275 + [TEGRA_POWERGATE_MPE] = "mpe", 276 + [TEGRA_POWERGATE_HEG] = "heg", 277 + [TEGRA_POWERGATE_SATA] = "sata", 278 + [TEGRA_POWERGATE_CPU1] = "cpu1", 279 + [TEGRA_POWERGATE_CPU2] = "cpu2", 280 + [TEGRA_POWERGATE_CPU3] = "cpu3", 281 + [TEGRA_POWERGATE_CELP] = "celp", 282 + [TEGRA_POWERGATE_CPU0] = "cpu0", 283 + [TEGRA_POWERGATE_C0NC] = "c0nc", 284 + [TEGRA_POWERGATE_C1NC] = "c1nc", 285 + [TEGRA_POWERGATE_SOR] = "sor", 286 + [TEGRA_POWERGATE_DIS] = "dis", 287 + [TEGRA_POWERGATE_DISB] = "disb", 288 + [TEGRA_POWERGATE_XUSBA] = "xusba", 289 + [TEGRA_POWERGATE_XUSBB] = "xusbb", 290 + [TEGRA_POWERGATE_XUSBC] = "xusbc", 291 + [TEGRA_POWERGATE_VIC] = "vic", 292 + [TEGRA_POWERGATE_IRAM] = "iram", 308 293 }; 309 294 310 295 static int powergate_show(struct seq_file *s, void *data) ··· 378 309 case TEGRA114: 379 310 powergate_name = powergate_name_t114; 380 311 break; 312 + case TEGRA124: 313 + powergate_name = powergate_name_t124; 314 + break; 381 315 } 382 316 383 317 if (powergate_name) { ··· 394 322 } 395 323 396 324 #endif 325 + 326 + static int tegra_io_rail_prepare(int id, unsigned long *request, 327 + unsigned long *status, unsigned int *bit) 328 + { 329 + unsigned long rate, value; 330 + struct clk *clk; 331 + 332 + *bit = id % 32; 333 + 334 + /* 335 + * There are two sets of 30 bits to select IO rails, but bits 30 and 336 + * 31 are control bits rather than IO rail selection bits. 337 + */ 338 + if (id > 63 || *bit == 30 || *bit == 31) 339 + return -EINVAL; 340 + 341 + if (id < 32) { 342 + *status = IO_DPD_STATUS; 343 + *request = IO_DPD_REQ; 344 + } else { 345 + *status = IO_DPD2_STATUS; 346 + *request = IO_DPD2_REQ; 347 + } 348 + 349 + clk = clk_get_sys(NULL, "pclk"); 350 + if (IS_ERR(clk)) 351 + return PTR_ERR(clk); 352 + 353 + rate = clk_get_rate(clk); 354 + clk_put(clk); 355 + 356 + pmc_write(DPD_SAMPLE_ENABLE, DPD_SAMPLE); 357 + 358 + /* must be at least 200 ns, in APB (PCLK) clock cycles */ 359 + value = DIV_ROUND_UP(1000000000, rate); 360 + value = DIV_ROUND_UP(200, value); 361 + pmc_write(value, SEL_DPD_TIM); 362 + 363 + return 0; 364 + } 365 + 366 + static int tegra_io_rail_poll(unsigned long offset, unsigned long mask, 367 + unsigned long val, unsigned long timeout) 368 + { 369 + unsigned long value; 370 + 371 + timeout = jiffies + msecs_to_jiffies(timeout); 372 + 373 + while (time_after(timeout, jiffies)) { 374 + value = pmc_read(offset); 375 + if ((value & mask) == val) 376 + return 0; 377 + 378 + usleep_range(250, 1000); 379 + } 380 + 381 + return -ETIMEDOUT; 382 + } 383 + 384 + static void tegra_io_rail_unprepare(void) 385 + { 386 + pmc_write(DPD_SAMPLE_DISABLE, DPD_SAMPLE); 387 + } 388 + 389 + int tegra_io_rail_power_on(int id) 390 + { 391 + unsigned long request, status, value; 392 + unsigned int bit, mask; 393 + int err; 394 + 395 + err = tegra_io_rail_prepare(id, &request, &status, &bit); 396 + if (err < 0) 397 + return err; 398 + 399 + mask = 1 << bit; 400 + 401 + value = pmc_read(request); 402 + value |= mask; 403 + value &= ~IO_DPD_REQ_CODE_MASK; 404 + value |= IO_DPD_REQ_CODE_OFF; 405 + pmc_write(value, request); 406 + 407 + err = tegra_io_rail_poll(status, mask, 0, 250); 408 + if (err < 0) 409 + return err; 410 + 411 + tegra_io_rail_unprepare(); 412 + 413 + return 0; 414 + } 415 + 416 + int tegra_io_rail_power_off(int id) 417 + { 418 + unsigned long request, status, value; 419 + unsigned int bit, mask; 420 + int err; 421 + 422 + err = tegra_io_rail_prepare(id, &request, &status, &bit); 423 + if (err < 0) 424 + return err; 425 + 426 + mask = 1 << bit; 427 + 428 + value = pmc_read(request); 429 + value |= mask; 430 + value &= ~IO_DPD_REQ_CODE_MASK; 431 + value |= IO_DPD_REQ_CODE_ON; 432 + pmc_write(value, request); 433 + 434 + err = tegra_io_rail_poll(status, mask, mask, 250); 435 + if (err < 0) 436 + return err; 437 + 438 + tegra_io_rail_unprepare(); 439 + 440 + return 0; 441 + }
+1 -3
arch/arm/mach-tegra/tegra.c
··· 60 60 * kernel is loaded. The data is declared here rather than debug-macro.S so 61 61 * that multiple inclusions of debug-macro.S point at the same data. 62 62 */ 63 - u32 tegra_uart_config[4] = { 63 + u32 tegra_uart_config[3] = { 64 64 /* Debug UART initialization required */ 65 65 1, 66 66 /* Debug UART physical address */ 67 67 0, 68 68 /* Debug UART virtual address */ 69 - 0, 70 - /* Scratch space for debug macro */ 71 69 0, 72 70 }; 73 71
+2 -2
arch/arm/mach-u300/timer.c
··· 349 349 * stamp. (Inspired by OMAP implementation.) 350 350 */ 351 351 352 - static u32 notrace u300_read_sched_clock(void) 352 + static u64 notrace u300_read_sched_clock(void) 353 353 { 354 354 return readl(u300_timer_base + U300_TIMER_APP_GPT2CC); 355 355 } ··· 389 389 390 390 u300_clockevent_data.ticks_per_jiffy = DIV_ROUND_CLOSEST(rate, HZ); 391 391 392 - setup_sched_clock(u300_read_sched_clock, 32, rate); 392 + sched_clock_register(u300_read_sched_clock, 32, rate); 393 393 394 394 u300_delay_timer.read_current_timer = &u300_read_current_timer; 395 395 u300_delay_timer.freq = rate;
+27
arch/arm/mach-ux500/pm.c
··· 3 3 * Author: Rickard Andersson <rickard.andersson@stericsson.com> for 4 4 * ST-Ericsson. 5 5 * Author: Daniel Lezcano <daniel.lezcano@linaro.org> for Linaro. 6 + * Author: Ulf Hansson <ulf.hansson@linaro.org> for Linaro. 7 + * 6 8 * License terms: GNU General Public License (GPL) version 2 7 9 * 8 10 */ ··· 13 11 #include <linux/irqchip/arm-gic.h> 14 12 #include <linux/delay.h> 15 13 #include <linux/io.h> 14 + #include <linux/suspend.h> 16 15 #include <linux/platform_data/arm-ux500-pm.h> 17 16 18 17 #include "db8500-regs.h" ··· 155 152 return 0; 156 153 } 157 154 155 + #ifdef CONFIG_SUSPEND 156 + static int ux500_suspend_enter(suspend_state_t state) 157 + { 158 + cpu_do_idle(); 159 + return 0; 160 + } 161 + 162 + static int ux500_suspend_valid(suspend_state_t state) 163 + { 164 + return state == PM_SUSPEND_MEM || state == PM_SUSPEND_STANDBY; 165 + } 166 + 167 + static const struct platform_suspend_ops ux500_suspend_ops = { 168 + .enter = ux500_suspend_enter, 169 + .valid = ux500_suspend_valid, 170 + }; 171 + #define UX500_SUSPEND_OPS (&ux500_suspend_ops) 172 + #else 173 + #define UX500_SUSPEND_OPS NULL 174 + #endif 175 + 158 176 void __init ux500_pm_init(u32 phy_base, u32 size) 159 177 { 160 178 prcmu_base = ioremap(phy_base, size); ··· 188 164 * This will make sure that the GIC is correctly configured. 189 165 */ 190 166 prcmu_gic_recouple(); 167 + 168 + /* Set up ux500 suspend callbacks. */ 169 + suspend_set_ops(UX500_SUSPEND_OPS); 191 170 }
+16
arch/arm/mach-versatile/core.c
··· 570 570 .irq_base = IRQ_GPIO1_START, 571 571 }; 572 572 573 + static struct pl061_platform_data gpio2_plat_data = { 574 + .gpio_base = 16, 575 + .irq_base = IRQ_GPIO2_START, 576 + }; 577 + 578 + static struct pl061_platform_data gpio3_plat_data = { 579 + .gpio_base = 24, 580 + .irq_base = IRQ_GPIO3_START, 581 + }; 582 + 573 583 static struct pl022_ssp_controller ssp0_plat_data = { 574 584 .bus_id = 0, 575 585 .enable_dma = 0, ··· 606 596 #define WATCHDOG_IRQ { IRQ_WDOGINT } 607 597 #define GPIO0_IRQ { IRQ_GPIOINT0 } 608 598 #define GPIO1_IRQ { IRQ_GPIOINT1 } 599 + #define GPIO2_IRQ { IRQ_GPIOINT2 } 600 + #define GPIO3_IRQ { IRQ_GPIOINT3 } 609 601 #define RTC_IRQ { IRQ_RTCINT } 610 602 611 603 /* ··· 634 622 APB_DEVICE(wdog, "dev:e1", WATCHDOG, NULL); 635 623 APB_DEVICE(gpio0, "dev:e4", GPIO0, &gpio0_plat_data); 636 624 APB_DEVICE(gpio1, "dev:e5", GPIO1, &gpio1_plat_data); 625 + APB_DEVICE(gpio2, "dev:e6", GPIO2, &gpio2_plat_data); 626 + APB_DEVICE(gpio3, "dev:e7", GPIO3, &gpio3_plat_data); 637 627 APB_DEVICE(rtc, "dev:e8", RTC, NULL); 638 628 APB_DEVICE(sci0, "dev:f0", SCI, NULL); 639 629 APB_DEVICE(uart0, "dev:f1", UART0, NULL); ··· 655 641 &wdog_device, 656 642 &gpio0_device, 657 643 &gpio1_device, 644 + &gpio2_device, 645 + &gpio3_device, 658 646 &rtc_device, 659 647 &sci0_device, 660 648 &ssp0_device,
-21
arch/arm/mach-versatile/versatile_pb.c
··· 47 47 .gpio_cd = -1, 48 48 }; 49 49 50 - static struct pl061_platform_data gpio2_plat_data = { 51 - .gpio_base = 16, 52 - .irq_base = IRQ_GPIO2_START, 53 - }; 54 - 55 - static struct pl061_platform_data gpio3_plat_data = { 56 - .gpio_base = 24, 57 - .irq_base = IRQ_GPIO3_START, 58 - }; 59 - 60 50 #define UART3_IRQ { IRQ_SIC_UART3 } 61 51 #define SCI1_IRQ { IRQ_SIC_SCI3 } 62 52 #define MMCI1_IRQ { IRQ_MMCI1A, IRQ_SIC_MMCI1B } 63 - 64 - /* 65 - * These devices are connected via the core APB bridge 66 - */ 67 - #define GPIO2_IRQ { IRQ_GPIOINT2 } 68 - #define GPIO3_IRQ { IRQ_GPIOINT3 } 69 53 70 54 /* 71 55 * These devices are connected via the DMA APB bridge ··· 60 76 APB_DEVICE(sci1, "fpga:0a", SCI1, NULL); 61 77 APB_DEVICE(mmc1, "fpga:0b", MMCI1, &mmc1_plat_data); 62 78 63 - /* DevChip Primecells */ 64 - APB_DEVICE(gpio2, "dev:e6", GPIO2, &gpio2_plat_data); 65 - APB_DEVICE(gpio3, "dev:e7", GPIO3, &gpio3_plat_data); 66 79 67 80 static struct amba_device *amba_devs[] __initdata = { 68 81 &uart3_device, 69 - &gpio2_device, 70 - &gpio3_device, 71 82 &sci1_device, 72 83 &mmc1_device, 73 84 };
+2 -2
arch/arm/plat-iop/time.c
··· 54 54 /* 55 55 * IOP sched_clock() implementation via its clocksource. 56 56 */ 57 - static u32 notrace iop_read_sched_clock(void) 57 + static u64 notrace iop_read_sched_clock(void) 58 58 { 59 59 return 0xffffffffu - read_tcr1(); 60 60 } ··· 142 142 { 143 143 u32 timer_ctl; 144 144 145 - setup_sched_clock(iop_read_sched_clock, 32, tick_rate); 145 + sched_clock_register(iop_read_sched_clock, 32, tick_rate); 146 146 147 147 ticks_per_jiffy = DIV_ROUND_CLOSEST(tick_rate, HZ); 148 148 iop_tick_rate = tick_rate;
+2 -2
arch/arm/plat-omap/counter_32k.c
··· 38 38 */ 39 39 static void __iomem *sync32k_cnt_reg; 40 40 41 - static u32 notrace omap_32k_read_sched_clock(void) 41 + static u64 notrace omap_32k_read_sched_clock(void) 42 42 { 43 43 return sync32k_cnt_reg ? __raw_readl(sync32k_cnt_reg) : 0; 44 44 } ··· 115 115 return ret; 116 116 } 117 117 118 - setup_sched_clock(omap_32k_read_sched_clock, 32, 32768); 118 + sched_clock_register(omap_32k_read_sched_clock, 32, 32768); 119 119 register_persistent_clock(NULL, omap_read_persistent_clock); 120 120 pr_info("OMAP clocksource: 32k_counter at 32768 Hz\n"); 121 121
+2 -2
arch/arm/plat-orion/time.c
··· 61 61 * at least 7.5ns (133MHz TCLK). 62 62 */ 63 63 64 - static u32 notrace orion_read_sched_clock(void) 64 + static u64 notrace orion_read_sched_clock(void) 65 65 { 66 66 return ~readl(timer_base + TIMER0_VAL_OFF); 67 67 } ··· 202 202 /* 203 203 * Set scale and timer for sched_clock. 204 204 */ 205 - setup_sched_clock(orion_read_sched_clock, 32, tclk); 205 + sched_clock_register(orion_read_sched_clock, 32, tclk); 206 206 207 207 /* 208 208 * Setup free-running clocksource timer (interrupts
+4
arch/arm/plat-samsung/s5p-irq-eint.c
··· 16 16 #include <linux/device.h> 17 17 #include <linux/gpio.h> 18 18 #include <linux/irqchip/arm-vic.h> 19 + #include <linux/of.h> 19 20 20 21 #include <plat/regs-irqtype.h> 21 22 ··· 202 201 static int __init s5p_init_irq_eint(void) 203 202 { 204 203 int irq; 204 + 205 + if (of_have_populated_dt()) 206 + return -ENODEV; 205 207 206 208 for (irq = IRQ_EINT(0); irq <= IRQ_EINT(15); irq++) 207 209 irq_set_chip(irq, &s5p_irq_vic_eint);
+2 -2
arch/arm/plat-versatile/sched-clock.c
··· 26 26 27 27 static void __iomem *ctr; 28 28 29 - static u32 notrace versatile_read_sched_clock(void) 29 + static u64 notrace versatile_read_sched_clock(void) 30 30 { 31 31 if (ctr) 32 32 return readl(ctr); ··· 37 37 void __init versatile_sched_clock_init(void __iomem *reg, unsigned long rate) 38 38 { 39 39 ctr = reg; 40 - setup_sched_clock(versatile_read_sched_clock, 32, rate); 40 + sched_clock_register(versatile_read_sched_clock, 32, rate); 41 41 }
+1 -1
drivers/Makefile
··· 118 118 obj-y += firmware/ 119 119 obj-$(CONFIG_CRYPTO) += crypto/ 120 120 obj-$(CONFIG_SUPERH) += sh/ 121 - obj-$(CONFIG_ARCH_SHMOBILE) += sh/ 121 + obj-$(CONFIG_ARCH_SHMOBILE_LEGACY) += sh/ 122 122 ifndef CONFIG_ARCH_USES_GETTIMEOFFSET 123 123 obj-y += clocksource/ 124 124 endif
+1 -1
drivers/clocksource/Makefile
··· 26 26 obj-$(CONFIG_ARCH_TEGRA) += tegra20_timer.o 27 27 obj-$(CONFIG_VT8500_TIMER) += vt8500_timer.o 28 28 obj-$(CONFIG_ARCH_NSPIRE) += zevio-timer.o 29 - obj-$(CONFIG_ARCH_BCM) += bcm_kona_timer.o 29 + obj-$(CONFIG_ARCH_BCM_MOBILE) += bcm_kona_timer.o 30 30 obj-$(CONFIG_CADENCE_TTC_TIMER) += cadence_ttc_timer.o 31 31 obj-$(CONFIG_CLKSRC_EFM32) += time-efm32.o 32 32 obj-$(CONFIG_CLKSRC_EXYNOS_MCT) += exynos_mct.o
+4
drivers/irqchip/Kconfig
··· 30 30 The maximum number of VICs available in the system, for 31 31 power management. 32 32 33 + config DW_APB_ICTL 34 + bool 35 + select IRQ_DOMAIN 36 + 33 37 config IMGPDC_IRQ 34 38 bool 35 39 select GENERIC_IRQ_CHIP
+1
drivers/irqchip/Makefile
··· 6 6 obj-$(CONFIG_ARCH_MVEBU) += irq-armada-370-xp.o 7 7 obj-$(CONFIG_ARCH_MXS) += irq-mxs.o 8 8 obj-$(CONFIG_ARCH_S3C24XX) += irq-s3c24xx.o 9 + obj-$(CONFIG_DW_APB_ICTL) += irq-dw-apb-ictl.o 9 10 obj-$(CONFIG_METAG) += irq-metag-ext.o 10 11 obj-$(CONFIG_METAG_PERFCOUNTER_IRQS) += irq-metag.o 11 12 obj-$(CONFIG_ARCH_MOXART) += irq-moxart.o
+150
drivers/irqchip/irq-dw-apb-ictl.c
··· 1 + /* 2 + * Synopsys DW APB ICTL irqchip driver. 3 + * 4 + * Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> 5 + * 6 + * based on GPL'ed 2.6 kernel sources 7 + * (c) Marvell International Ltd. 8 + * 9 + * This file is licensed under the terms of the GNU General Public 10 + * License version 2. This program is licensed "as is" without any 11 + * warranty of any kind, whether express or implied. 12 + */ 13 + 14 + #include <linux/io.h> 15 + #include <linux/irq.h> 16 + #include <linux/irqchip/chained_irq.h> 17 + #include <linux/of_address.h> 18 + #include <linux/of_irq.h> 19 + 20 + #include "irqchip.h" 21 + 22 + #define APB_INT_ENABLE_L 0x00 23 + #define APB_INT_ENABLE_H 0x04 24 + #define APB_INT_MASK_L 0x08 25 + #define APB_INT_MASK_H 0x0c 26 + #define APB_INT_FINALSTATUS_L 0x30 27 + #define APB_INT_FINALSTATUS_H 0x34 28 + 29 + static void dw_apb_ictl_handler(unsigned int irq, struct irq_desc *desc) 30 + { 31 + struct irq_chip *chip = irq_get_chip(irq); 32 + struct irq_chip_generic *gc = irq_get_handler_data(irq); 33 + struct irq_domain *d = gc->private; 34 + u32 stat; 35 + int n; 36 + 37 + chained_irq_enter(chip, desc); 38 + 39 + for (n = 0; n < gc->num_ct; n++) { 40 + stat = readl_relaxed(gc->reg_base + 41 + APB_INT_FINALSTATUS_L + 4 * n); 42 + while (stat) { 43 + u32 hwirq = ffs(stat) - 1; 44 + generic_handle_irq(irq_find_mapping(d, 45 + gc->irq_base + hwirq + 32 * n)); 46 + stat &= ~(1 << hwirq); 47 + } 48 + } 49 + 50 + chained_irq_exit(chip, desc); 51 + } 52 + 53 + static int __init dw_apb_ictl_init(struct device_node *np, 54 + struct device_node *parent) 55 + { 56 + unsigned int clr = IRQ_NOREQUEST | IRQ_NOPROBE | IRQ_NOAUTOEN; 57 + struct resource r; 58 + struct irq_domain *domain; 59 + struct irq_chip_generic *gc; 60 + void __iomem *iobase; 61 + int ret, nrirqs, irq; 62 + u32 reg; 63 + 64 + /* Map the parent interrupt for the chained handler */ 65 + irq = irq_of_parse_and_map(np, 0); 66 + if (irq <= 0) { 67 + pr_err("%s: unable to parse irq\n", np->full_name); 68 + return -EINVAL; 69 + } 70 + 71 + ret = of_address_to_resource(np, 0, &r); 72 + if (ret) { 73 + pr_err("%s: unable to get resource\n", np->full_name); 74 + return ret; 75 + } 76 + 77 + if (!request_mem_region(r.start, resource_size(&r), np->full_name)) { 78 + pr_err("%s: unable to request mem region\n", np->full_name); 79 + return -ENOMEM; 80 + } 81 + 82 + iobase = ioremap(r.start, resource_size(&r)); 83 + if (!iobase) { 84 + pr_err("%s: unable to map resource\n", np->full_name); 85 + ret = -ENOMEM; 86 + goto err_release; 87 + } 88 + 89 + /* 90 + * DW IP can be configured to allow 2-64 irqs. We can determine 91 + * the number of irqs supported by writing into enable register 92 + * and look for bits not set, as corresponding flip-flops will 93 + * have been removed by sythesis tool. 94 + */ 95 + 96 + /* mask and enable all interrupts */ 97 + writel(~0, iobase + APB_INT_MASK_L); 98 + writel(~0, iobase + APB_INT_MASK_H); 99 + writel(~0, iobase + APB_INT_ENABLE_L); 100 + writel(~0, iobase + APB_INT_ENABLE_H); 101 + 102 + reg = readl(iobase + APB_INT_ENABLE_H); 103 + if (reg) 104 + nrirqs = 32 + fls(reg); 105 + else 106 + nrirqs = fls(readl(iobase + APB_INT_ENABLE_L)); 107 + 108 + domain = irq_domain_add_linear(np, nrirqs, 109 + &irq_generic_chip_ops, NULL); 110 + if (!domain) { 111 + pr_err("%s: unable to add irq domain\n", np->full_name); 112 + ret = -ENOMEM; 113 + goto err_unmap; 114 + } 115 + 116 + ret = irq_alloc_domain_generic_chips(domain, 32, (nrirqs > 32) ? 2 : 1, 117 + np->name, handle_level_irq, clr, 0, 118 + IRQ_GC_INIT_MASK_CACHE); 119 + if (ret) { 120 + pr_err("%s: unable to alloc irq domain gc\n", np->full_name); 121 + goto err_unmap; 122 + } 123 + 124 + gc = irq_get_domain_generic_chip(domain, 0); 125 + gc->private = domain; 126 + gc->reg_base = iobase; 127 + 128 + gc->chip_types[0].regs.mask = APB_INT_MASK_L; 129 + gc->chip_types[0].chip.irq_mask = irq_gc_mask_set_bit; 130 + gc->chip_types[0].chip.irq_unmask = irq_gc_mask_clr_bit; 131 + 132 + if (nrirqs > 32) { 133 + gc->chip_types[1].regs.mask = APB_INT_MASK_H; 134 + gc->chip_types[1].chip.irq_mask = irq_gc_mask_set_bit; 135 + gc->chip_types[1].chip.irq_unmask = irq_gc_mask_clr_bit; 136 + } 137 + 138 + irq_set_handler_data(irq, gc); 139 + irq_set_chained_handler(irq, dw_apb_ictl_handler); 140 + 141 + return 0; 142 + 143 + err_unmap: 144 + iounmap(iobase); 145 + err_release: 146 + release_mem_region(r.start, resource_size(&r)); 147 + return ret; 148 + } 149 + IRQCHIP_DECLARE(dw_apb_ictl, 150 + "snps,dw-apb-ictl", dw_apb_ictl_init);
+1
drivers/reset/Makefile
··· 1 1 obj-$(CONFIG_RESET_CONTROLLER) += core.o 2 + obj-$(CONFIG_ARCH_SUNXI) += reset-sunxi.o
+175
drivers/reset/reset-sunxi.c
··· 1 + /* 2 + * Allwinner SoCs Reset Controller driver 3 + * 4 + * Copyright 2013 Maxime Ripard 5 + * 6 + * Maxime Ripard <maxime.ripard@free-electrons.com> 7 + * 8 + * This program is free software; you can redistribute it and/or modify 9 + * it under the terms of the GNU General Public License as published by 10 + * the Free Software Foundation; either version 2 of the License, or 11 + * (at your option) any later version. 12 + */ 13 + 14 + #include <linux/err.h> 15 + #include <linux/io.h> 16 + #include <linux/module.h> 17 + #include <linux/of.h> 18 + #include <linux/of_address.h> 19 + #include <linux/platform_device.h> 20 + #include <linux/reset-controller.h> 21 + #include <linux/slab.h> 22 + #include <linux/spinlock.h> 23 + #include <linux/types.h> 24 + 25 + struct sunxi_reset_data { 26 + spinlock_t lock; 27 + void __iomem *membase; 28 + struct reset_controller_dev rcdev; 29 + }; 30 + 31 + static int sunxi_reset_assert(struct reset_controller_dev *rcdev, 32 + unsigned long id) 33 + { 34 + struct sunxi_reset_data *data = container_of(rcdev, 35 + struct sunxi_reset_data, 36 + rcdev); 37 + int bank = id / BITS_PER_LONG; 38 + int offset = id % BITS_PER_LONG; 39 + unsigned long flags; 40 + u32 reg; 41 + 42 + spin_lock_irqsave(&data->lock, flags); 43 + 44 + reg = readl(data->membase + (bank * 4)); 45 + writel(reg & ~BIT(offset), data->membase + (bank * 4)); 46 + 47 + spin_unlock_irqrestore(&data->lock, flags); 48 + 49 + return 0; 50 + } 51 + 52 + static int sunxi_reset_deassert(struct reset_controller_dev *rcdev, 53 + unsigned long id) 54 + { 55 + struct sunxi_reset_data *data = container_of(rcdev, 56 + struct sunxi_reset_data, 57 + rcdev); 58 + int bank = id / BITS_PER_LONG; 59 + int offset = id % BITS_PER_LONG; 60 + unsigned long flags; 61 + u32 reg; 62 + 63 + spin_lock_irqsave(&data->lock, flags); 64 + 65 + reg = readl(data->membase + (bank * 4)); 66 + writel(reg | BIT(offset), data->membase + (bank * 4)); 67 + 68 + spin_unlock_irqrestore(&data->lock, flags); 69 + 70 + return 0; 71 + } 72 + 73 + static struct reset_control_ops sunxi_reset_ops = { 74 + .assert = sunxi_reset_assert, 75 + .deassert = sunxi_reset_deassert, 76 + }; 77 + 78 + static int sunxi_reset_init(struct device_node *np) 79 + { 80 + struct sunxi_reset_data *data; 81 + struct resource res; 82 + resource_size_t size; 83 + int ret; 84 + 85 + data = kzalloc(sizeof(*data), GFP_KERNEL); 86 + if (!data) 87 + return -ENOMEM; 88 + 89 + ret = of_address_to_resource(np, 0, &res); 90 + if (ret) 91 + goto err_alloc; 92 + 93 + size = resource_size(&res); 94 + if (!request_mem_region(res.start, size, np->name)) { 95 + ret = -EBUSY; 96 + goto err_alloc; 97 + } 98 + 99 + data->membase = ioremap(res.start, size); 100 + if (!data->membase) { 101 + ret = -ENOMEM; 102 + goto err_alloc; 103 + } 104 + 105 + data->rcdev.owner = THIS_MODULE; 106 + data->rcdev.nr_resets = size * 32; 107 + data->rcdev.ops = &sunxi_reset_ops; 108 + data->rcdev.of_node = np; 109 + reset_controller_register(&data->rcdev); 110 + 111 + return 0; 112 + 113 + err_alloc: 114 + kfree(data); 115 + return ret; 116 + }; 117 + 118 + /* 119 + * These are the reset controller we need to initialize early on in 120 + * our system, before we can even think of using a regular device 121 + * driver for it. 122 + */ 123 + static const struct of_device_id sunxi_early_reset_dt_ids[] __initdata = { 124 + { .compatible = "allwinner,sun6i-a31-ahb1-reset", }, 125 + { /* sentinel */ }, 126 + }; 127 + 128 + void __init sun6i_reset_init(void) 129 + { 130 + struct device_node *np; 131 + 132 + for_each_matching_node(np, sunxi_early_reset_dt_ids) 133 + sunxi_reset_init(np); 134 + } 135 + 136 + /* 137 + * And these are the controllers we can register through the regular 138 + * device model. 139 + */ 140 + static const struct of_device_id sunxi_reset_dt_ids[] = { 141 + { .compatible = "allwinner,sun6i-a31-clock-reset", }, 142 + { /* sentinel */ }, 143 + }; 144 + MODULE_DEVICE_TABLE(of, sunxi_reset_dt_ids); 145 + 146 + static int sunxi_reset_probe(struct platform_device *pdev) 147 + { 148 + return sunxi_reset_init(pdev->dev.of_node); 149 + } 150 + 151 + static int sunxi_reset_remove(struct platform_device *pdev) 152 + { 153 + struct sunxi_reset_data *data = platform_get_drvdata(pdev); 154 + 155 + reset_controller_unregister(&data->rcdev); 156 + iounmap(data->membase); 157 + kfree(data); 158 + 159 + return 0; 160 + } 161 + 162 + static struct platform_driver sunxi_reset_driver = { 163 + .probe = sunxi_reset_probe, 164 + .remove = sunxi_reset_remove, 165 + .driver = { 166 + .name = "sunxi-reset", 167 + .owner = THIS_MODULE, 168 + .of_match_table = sunxi_reset_dt_ids, 169 + }, 170 + }; 171 + module_platform_driver(sunxi_reset_driver); 172 + 173 + MODULE_AUTHOR("Maxime Ripard <maxime.ripard@free-electrons.com"); 174 + MODULE_DESCRIPTION("Allwinner SoCs Reset Controller Driver"); 175 + MODULE_LICENSE("GPL");
+203
include/dt-bindings/clock/imx5-clock.h
··· 1 + /* 2 + * Copyright 2013 Lucas Stach, Pengutronix <l.stach@pengutronix.de> 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 version 2 as 6 + * published by the Free Software Foundation. 7 + * 8 + */ 9 + 10 + #ifndef __DT_BINDINGS_CLOCK_IMX5_H 11 + #define __DT_BINDINGS_CLOCK_IMX5_H 12 + 13 + #define IMX5_CLK_DUMMY 0 14 + #define IMX5_CLK_CKIL 1 15 + #define IMX5_CLK_OSC 2 16 + #define IMX5_CLK_CKIH1 3 17 + #define IMX5_CLK_CKIH2 4 18 + #define IMX5_CLK_AHB 5 19 + #define IMX5_CLK_IPG 6 20 + #define IMX5_CLK_AXI_A 7 21 + #define IMX5_CLK_AXI_B 8 22 + #define IMX5_CLK_UART_PRED 9 23 + #define IMX5_CLK_UART_ROOT 10 24 + #define IMX5_CLK_ESDHC_A_PRED 11 25 + #define IMX5_CLK_ESDHC_B_PRED 12 26 + #define IMX5_CLK_ESDHC_C_SEL 13 27 + #define IMX5_CLK_ESDHC_D_SEL 14 28 + #define IMX5_CLK_EMI_SEL 15 29 + #define IMX5_CLK_EMI_SLOW_PODF 16 30 + #define IMX5_CLK_NFC_PODF 17 31 + #define IMX5_CLK_ECSPI_PRED 18 32 + #define IMX5_CLK_ECSPI_PODF 19 33 + #define IMX5_CLK_USBOH3_PRED 20 34 + #define IMX5_CLK_USBOH3_PODF 21 35 + #define IMX5_CLK_USB_PHY_PRED 22 36 + #define IMX5_CLK_USB_PHY_PODF 23 37 + #define IMX5_CLK_CPU_PODF 24 38 + #define IMX5_CLK_DI_PRED 25 39 + #define IMX5_CLK_TVE_SEL 27 40 + #define IMX5_CLK_UART1_IPG_GATE 28 41 + #define IMX5_CLK_UART1_PER_GATE 29 42 + #define IMX5_CLK_UART2_IPG_GATE 30 43 + #define IMX5_CLK_UART2_PER_GATE 31 44 + #define IMX5_CLK_UART3_IPG_GATE 32 45 + #define IMX5_CLK_UART3_PER_GATE 33 46 + #define IMX5_CLK_I2C1_GATE 34 47 + #define IMX5_CLK_I2C2_GATE 35 48 + #define IMX5_CLK_GPT_IPG_GATE 36 49 + #define IMX5_CLK_PWM1_IPG_GATE 37 50 + #define IMX5_CLK_PWM1_HF_GATE 38 51 + #define IMX5_CLK_PWM2_IPG_GATE 39 52 + #define IMX5_CLK_PWM2_HF_GATE 40 53 + #define IMX5_CLK_GPT_HF_GATE 41 54 + #define IMX5_CLK_FEC_GATE 42 55 + #define IMX5_CLK_USBOH3_PER_GATE 43 56 + #define IMX5_CLK_ESDHC1_IPG_GATE 44 57 + #define IMX5_CLK_ESDHC2_IPG_GATE 45 58 + #define IMX5_CLK_ESDHC3_IPG_GATE 46 59 + #define IMX5_CLK_ESDHC4_IPG_GATE 47 60 + #define IMX5_CLK_SSI1_IPG_GATE 48 61 + #define IMX5_CLK_SSI2_IPG_GATE 49 62 + #define IMX5_CLK_SSI3_IPG_GATE 50 63 + #define IMX5_CLK_ECSPI1_IPG_GATE 51 64 + #define IMX5_CLK_ECSPI1_PER_GATE 52 65 + #define IMX5_CLK_ECSPI2_IPG_GATE 53 66 + #define IMX5_CLK_ECSPI2_PER_GATE 54 67 + #define IMX5_CLK_CSPI_IPG_GATE 55 68 + #define IMX5_CLK_SDMA_GATE 56 69 + #define IMX5_CLK_EMI_SLOW_GATE 57 70 + #define IMX5_CLK_IPU_SEL 58 71 + #define IMX5_CLK_IPU_GATE 59 72 + #define IMX5_CLK_NFC_GATE 60 73 + #define IMX5_CLK_IPU_DI1_GATE 61 74 + #define IMX5_CLK_VPU_SEL 62 75 + #define IMX5_CLK_VPU_GATE 63 76 + #define IMX5_CLK_VPU_REFERENCE_GATE 64 77 + #define IMX5_CLK_UART4_IPG_GATE 65 78 + #define IMX5_CLK_UART4_PER_GATE 66 79 + #define IMX5_CLK_UART5_IPG_GATE 67 80 + #define IMX5_CLK_UART5_PER_GATE 68 81 + #define IMX5_CLK_TVE_GATE 69 82 + #define IMX5_CLK_TVE_PRED 70 83 + #define IMX5_CLK_ESDHC1_PER_GATE 71 84 + #define IMX5_CLK_ESDHC2_PER_GATE 72 85 + #define IMX5_CLK_ESDHC3_PER_GATE 73 86 + #define IMX5_CLK_ESDHC4_PER_GATE 74 87 + #define IMX5_CLK_USB_PHY_GATE 75 88 + #define IMX5_CLK_HSI2C_GATE 76 89 + #define IMX5_CLK_MIPI_HSC1_GATE 77 90 + #define IMX5_CLK_MIPI_HSC2_GATE 78 91 + #define IMX5_CLK_MIPI_ESC_GATE 79 92 + #define IMX5_CLK_MIPI_HSP_GATE 80 93 + #define IMX5_CLK_LDB_DI1_DIV_3_5 81 94 + #define IMX5_CLK_LDB_DI1_DIV 82 95 + #define IMX5_CLK_LDB_DI0_DIV_3_5 83 96 + #define IMX5_CLK_LDB_DI0_DIV 84 97 + #define IMX5_CLK_LDB_DI1_GATE 85 98 + #define IMX5_CLK_CAN2_SERIAL_GATE 86 99 + #define IMX5_CLK_CAN2_IPG_GATE 87 100 + #define IMX5_CLK_I2C3_GATE 88 101 + #define IMX5_CLK_LP_APM 89 102 + #define IMX5_CLK_PERIPH_APM 90 103 + #define IMX5_CLK_MAIN_BUS 91 104 + #define IMX5_CLK_AHB_MAX 92 105 + #define IMX5_CLK_AIPS_TZ1 93 106 + #define IMX5_CLK_AIPS_TZ2 94 107 + #define IMX5_CLK_TMAX1 95 108 + #define IMX5_CLK_TMAX2 96 109 + #define IMX5_CLK_TMAX3 97 110 + #define IMX5_CLK_SPBA 98 111 + #define IMX5_CLK_UART_SEL 99 112 + #define IMX5_CLK_ESDHC_A_SEL 100 113 + #define IMX5_CLK_ESDHC_B_SEL 101 114 + #define IMX5_CLK_ESDHC_A_PODF 102 115 + #define IMX5_CLK_ESDHC_B_PODF 103 116 + #define IMX5_CLK_ECSPI_SEL 104 117 + #define IMX5_CLK_USBOH3_SEL 105 118 + #define IMX5_CLK_USB_PHY_SEL 106 119 + #define IMX5_CLK_IIM_GATE 107 120 + #define IMX5_CLK_USBOH3_GATE 108 121 + #define IMX5_CLK_EMI_FAST_GATE 109 122 + #define IMX5_CLK_IPU_DI0_GATE 110 123 + #define IMX5_CLK_GPC_DVFS 111 124 + #define IMX5_CLK_PLL1_SW 112 125 + #define IMX5_CLK_PLL2_SW 113 126 + #define IMX5_CLK_PLL3_SW 114 127 + #define IMX5_CLK_IPU_DI0_SEL 115 128 + #define IMX5_CLK_IPU_DI1_SEL 116 129 + #define IMX5_CLK_TVE_EXT_SEL 117 130 + #define IMX5_CLK_MX51_MIPI 118 131 + #define IMX5_CLK_PLL4_SW 119 132 + #define IMX5_CLK_LDB_DI1_SEL 120 133 + #define IMX5_CLK_DI_PLL4_PODF 121 134 + #define IMX5_CLK_LDB_DI0_SEL 122 135 + #define IMX5_CLK_LDB_DI0_GATE 123 136 + #define IMX5_CLK_USB_PHY1_GATE 124 137 + #define IMX5_CLK_USB_PHY2_GATE 125 138 + #define IMX5_CLK_PER_LP_APM 126 139 + #define IMX5_CLK_PER_PRED1 127 140 + #define IMX5_CLK_PER_PRED2 128 141 + #define IMX5_CLK_PER_PODF 129 142 + #define IMX5_CLK_PER_ROOT 130 143 + #define IMX5_CLK_SSI_APM 131 144 + #define IMX5_CLK_SSI1_ROOT_SEL 132 145 + #define IMX5_CLK_SSI2_ROOT_SEL 133 146 + #define IMX5_CLK_SSI3_ROOT_SEL 134 147 + #define IMX5_CLK_SSI_EXT1_SEL 135 148 + #define IMX5_CLK_SSI_EXT2_SEL 136 149 + #define IMX5_CLK_SSI_EXT1_COM_SEL 137 150 + #define IMX5_CLK_SSI_EXT2_COM_SEL 138 151 + #define IMX5_CLK_SSI1_ROOT_PRED 139 152 + #define IMX5_CLK_SSI1_ROOT_PODF 140 153 + #define IMX5_CLK_SSI2_ROOT_PRED 141 154 + #define IMX5_CLK_SSI2_ROOT_PODF 142 155 + #define IMX5_CLK_SSI_EXT1_PRED 143 156 + #define IMX5_CLK_SSI_EXT1_PODF 144 157 + #define IMX5_CLK_SSI_EXT2_PRED 145 158 + #define IMX5_CLK_SSI_EXT2_PODF 146 159 + #define IMX5_CLK_SSI1_ROOT_GATE 147 160 + #define IMX5_CLK_SSI2_ROOT_GATE 148 161 + #define IMX5_CLK_SSI3_ROOT_GATE 149 162 + #define IMX5_CLK_SSI_EXT1_GATE 150 163 + #define IMX5_CLK_SSI_EXT2_GATE 151 164 + #define IMX5_CLK_EPIT1_IPG_GATE 152 165 + #define IMX5_CLK_EPIT1_HF_GATE 153 166 + #define IMX5_CLK_EPIT2_IPG_GATE 154 167 + #define IMX5_CLK_EPIT2_HF_GATE 155 168 + #define IMX5_CLK_CAN_SEL 156 169 + #define IMX5_CLK_CAN1_SERIAL_GATE 157 170 + #define IMX5_CLK_CAN1_IPG_GATE 158 171 + #define IMX5_CLK_OWIRE_GATE 159 172 + #define IMX5_CLK_GPU3D_SEL 160 173 + #define IMX5_CLK_GPU2D_SEL 161 174 + #define IMX5_CLK_GPU3D_GATE 162 175 + #define IMX5_CLK_GPU2D_GATE 163 176 + #define IMX5_CLK_GARB_GATE 164 177 + #define IMX5_CLK_CKO1_SEL 165 178 + #define IMX5_CLK_CKO1_PODF 166 179 + #define IMX5_CLK_CKO1 167 180 + #define IMX5_CLK_CKO2_SEL 168 181 + #define IMX5_CLK_CKO2_PODF 169 182 + #define IMX5_CLK_CKO2 170 183 + #define IMX5_CLK_SRTC_GATE 171 184 + #define IMX5_CLK_PATA_GATE 172 185 + #define IMX5_CLK_SATA_GATE 173 186 + #define IMX5_CLK_SPDIF_XTAL_SEL 174 187 + #define IMX5_CLK_SPDIF0_SEL 175 188 + #define IMX5_CLK_SPDIF1_SEL 176 189 + #define IMX5_CLK_SPDIF0_PRED 177 190 + #define IMX5_CLK_SPDIF0_PODF 178 191 + #define IMX5_CLK_SPDIF1_PRED 179 192 + #define IMX5_CLK_SPDIF1_PODF 180 193 + #define IMX5_CLK_SPDIF0_COM_SEL 181 194 + #define IMX5_CLK_SPDIF1_COM_SEL 182 195 + #define IMX5_CLK_SPDIF0_GATE 183 196 + #define IMX5_CLK_SPDIF1_GATE 184 197 + #define IMX5_CLK_SPDIF_IPG_GATE 185 198 + #define IMX5_CLK_OCRAM 186 199 + #define IMX5_CLK_SAHARA_IPG_GATE 187 200 + #define IMX5_CLK_SATA_REF 188 201 + #define IMX5_CLK_END 189 202 + 203 + #endif /* __DT_BINDINGS_CLOCK_IMX5_H */
+3 -1
include/dt-bindings/clock/imx6sl-clock.h
··· 143 143 #define IMX6SL_CLK_USDHC2 130 144 144 #define IMX6SL_CLK_USDHC3 131 145 145 #define IMX6SL_CLK_USDHC4 132 146 - #define IMX6SL_CLK_CLK_END 133 146 + #define IMX6SL_CLK_PLL4_AUDIO_DIV 133 147 + #define IMX6SL_CLK_SPBA 134 148 + #define IMX6SL_CLK_END 135 147 149 148 150 #endif /* __DT_BINDINGS_CLOCK_IMX6SL_H */
+100
include/dt-bindings/clock/r8a7790-clock.h
··· 1 + /* 2 + * Copyright 2013 Ideas On Board SPRL 3 + * 4 + * This program is free software; you can redistribute it and/or modify 5 + * it under the terms of the GNU General Public License as published by 6 + * the Free Software Foundation; either version 2 of the License, or 7 + * (at your option) any later version. 8 + */ 9 + 10 + #ifndef __DT_BINDINGS_CLOCK_R8A7790_H__ 11 + #define __DT_BINDINGS_CLOCK_R8A7790_H__ 12 + 13 + /* CPG */ 14 + #define R8A7790_CLK_MAIN 0 15 + #define R8A7790_CLK_PLL0 1 16 + #define R8A7790_CLK_PLL1 2 17 + #define R8A7790_CLK_PLL3 3 18 + #define R8A7790_CLK_LB 4 19 + #define R8A7790_CLK_QSPI 5 20 + #define R8A7790_CLK_SDH 6 21 + #define R8A7790_CLK_SD0 7 22 + #define R8A7790_CLK_SD1 8 23 + #define R8A7790_CLK_Z 9 24 + 25 + /* MSTP1 */ 26 + #define R8A7790_CLK_TMU1 11 27 + #define R8A7790_CLK_TMU3 21 28 + #define R8A7790_CLK_TMU2 22 29 + #define R8A7790_CLK_CMT0 24 30 + #define R8A7790_CLK_TMU0 25 31 + #define R8A7790_CLK_VSP1_DU1 27 32 + #define R8A7790_CLK_VSP1_DU0 28 33 + #define R8A7790_CLK_VSP1_RT 30 34 + #define R8A7790_CLK_VSP1_SY 31 35 + 36 + /* MSTP2 */ 37 + #define R8A7790_CLK_SCIFA2 2 38 + #define R8A7790_CLK_SCIFA1 3 39 + #define R8A7790_CLK_SCIFA0 4 40 + #define R8A7790_CLK_SCIFB0 6 41 + #define R8A7790_CLK_SCIFB1 7 42 + #define R8A7790_CLK_SCIFB2 16 43 + #define R8A7790_CLK_SYS_DMAC0 18 44 + #define R8A7790_CLK_SYS_DMAC1 19 45 + 46 + /* MSTP3 */ 47 + #define R8A7790_CLK_TPU0 4 48 + #define R8A7790_CLK_MMCIF1 5 49 + #define R8A7790_CLK_SDHI3 11 50 + #define R8A7790_CLK_SDHI2 12 51 + #define R8A7790_CLK_SDHI1 13 52 + #define R8A7790_CLK_SDHI0 14 53 + #define R8A7790_CLK_MMCIF0 15 54 + #define R8A7790_CLK_SSUSB 28 55 + #define R8A7790_CLK_CMT1 29 56 + #define R8A7790_CLK_USBDMAC0 30 57 + #define R8A7790_CLK_USBDMAC1 31 58 + 59 + /* MSTP5 */ 60 + #define R8A7790_CLK_THERMAL 22 61 + #define R8A7790_CLK_PWM 23 62 + 63 + /* MSTP7 */ 64 + #define R8A7790_CLK_EHCI 3 65 + #define R8A7790_CLK_HSUSB 4 66 + #define R8A7790_CLK_HSCIF1 16 67 + #define R8A7790_CLK_HSCIF0 17 68 + #define R8A7790_CLK_SCIF1 20 69 + #define R8A7790_CLK_SCIF0 21 70 + #define R8A7790_CLK_DU2 22 71 + #define R8A7790_CLK_DU1 23 72 + #define R8A7790_CLK_DU0 24 73 + #define R8A7790_CLK_LVDS1 25 74 + #define R8A7790_CLK_LVDS0 26 75 + 76 + /* MSTP8 */ 77 + #define R8A7790_CLK_VIN3 8 78 + #define R8A7790_CLK_VIN2 9 79 + #define R8A7790_CLK_VIN1 10 80 + #define R8A7790_CLK_VIN0 11 81 + #define R8A7790_CLK_ETHER 13 82 + #define R8A7790_CLK_SATA1 14 83 + #define R8A7790_CLK_SATA0 15 84 + 85 + /* MSTP9 */ 86 + #define R8A7790_CLK_GPIO5 7 87 + #define R8A7790_CLK_GPIO4 8 88 + #define R8A7790_CLK_GPIO3 9 89 + #define R8A7790_CLK_GPIO2 10 90 + #define R8A7790_CLK_GPIO1 11 91 + #define R8A7790_CLK_GPIO0 12 92 + #define R8A7790_CLK_RCAN1 15 93 + #define R8A7790_CLK_RCAN0 16 94 + #define R8A7790_CLK_IICDVFS 26 95 + #define R8A7790_CLK_I2C3 28 96 + #define R8A7790_CLK_I2C2 29 97 + #define R8A7790_CLK_I2C1 30 98 + #define R8A7790_CLK_I2C0 31 99 + 100 + #endif /* __DT_BINDINGS_CLOCK_R8A7790_H__ */
+105
include/dt-bindings/clock/r8a7791-clock.h
··· 1 + /* 2 + * Copyright 2013 Ideas On Board SPRL 3 + * 4 + * This program is free software; you can redistribute it and/or modify 5 + * it under the terms of the GNU General Public License as published by 6 + * the Free Software Foundation; either version 2 of the License, or 7 + * (at your option) any later version. 8 + */ 9 + 10 + #ifndef __DT_BINDINGS_CLOCK_R8A7791_H__ 11 + #define __DT_BINDINGS_CLOCK_R8A7791_H__ 12 + 13 + /* CPG */ 14 + #define R8A7791_CLK_MAIN 0 15 + #define R8A7791_CLK_PLL0 1 16 + #define R8A7791_CLK_PLL1 2 17 + #define R8A7791_CLK_PLL3 3 18 + #define R8A7791_CLK_LB 4 19 + #define R8A7791_CLK_QSPI 5 20 + #define R8A7791_CLK_SDH 6 21 + #define R8A7791_CLK_SD0 7 22 + #define R8A7791_CLK_Z 8 23 + 24 + /* MSTP1 */ 25 + #define R8A7791_CLK_TMU1 11 26 + #define R8A7791_CLK_TMU3 21 27 + #define R8A7791_CLK_TMU2 22 28 + #define R8A7791_CLK_CMT0 24 29 + #define R8A7791_CLK_TMU0 25 30 + #define R8A7791_CLK_VSP1_DU1 27 31 + #define R8A7791_CLK_VSP1_DU0 28 32 + #define R8A7791_CLK_VSP1_SY 31 33 + 34 + /* MSTP2 */ 35 + #define R8A7791_CLK_SCIFA2 2 36 + #define R8A7791_CLK_SCIFA1 3 37 + #define R8A7791_CLK_SCIFA0 4 38 + #define R8A7791_CLK_SCIFB0 6 39 + #define R8A7791_CLK_SCIFB1 7 40 + #define R8A7791_CLK_SCIFB2 16 41 + #define R8A7791_CLK_DMAC 18 42 + 43 + /* MSTP3 */ 44 + #define R8A7791_CLK_TPU0 4 45 + #define R8A7791_CLK_SDHI2 11 46 + #define R8A7791_CLK_SDHI1 12 47 + #define R8A7791_CLK_SDHI0 14 48 + #define R8A7791_CLK_MMCIF0 15 49 + #define R8A7791_CLK_SSUSB 28 50 + #define R8A7791_CLK_CMT1 29 51 + #define R8A7791_CLK_USBDMAC0 30 52 + #define R8A7791_CLK_USBDMAC1 31 53 + 54 + /* MSTP5 */ 55 + #define R8A7791_CLK_THERMAL 22 56 + #define R8A7791_CLK_PWM 23 57 + 58 + /* MSTP7 */ 59 + #define R8A7791_CLK_HSUSB 4 60 + #define R8A7791_CLK_HSCIF2 13 61 + #define R8A7791_CLK_SCIF5 14 62 + #define R8A7791_CLK_SCIF4 15 63 + #define R8A7791_CLK_HSCIF1 16 64 + #define R8A7791_CLK_HSCIF0 17 65 + #define R8A7791_CLK_SCIF3 18 66 + #define R8A7791_CLK_SCIF2 19 67 + #define R8A7791_CLK_SCIF1 20 68 + #define R8A7791_CLK_SCIF0 21 69 + #define R8A7791_CLK_DU1 23 70 + #define R8A7791_CLK_DU0 24 71 + #define R8A7791_CLK_LVDS0 26 72 + 73 + /* MSTP8 */ 74 + #define R8A7791_CLK_VIN2 9 75 + #define R8A7791_CLK_VIN1 10 76 + #define R8A7791_CLK_VIN0 11 77 + #define R8A7791_CLK_ETHER 13 78 + #define R8A7791_CLK_SATA1 14 79 + #define R8A7791_CLK_SATA0 15 80 + 81 + /* MSTP9 */ 82 + #define R8A7791_CLK_GPIO7 4 83 + #define R8A7791_CLK_GPIO6 5 84 + #define R8A7791_CLK_GPIO5 7 85 + #define R8A7791_CLK_GPIO4 8 86 + #define R8A7791_CLK_GPIO3 9 87 + #define R8A7791_CLK_GPIO2 10 88 + #define R8A7791_CLK_GPIO1 11 89 + #define R8A7791_CLK_GPIO0 12 90 + #define R8A7791_CLK_RCAN1 15 91 + #define R8A7791_CLK_RCAN0 16 92 + #define R8A7791_CLK_I2C5 25 93 + #define R8A7791_CLK_IICDVFS 26 94 + #define R8A7791_CLK_I2C4 27 95 + #define R8A7791_CLK_I2C3 28 96 + #define R8A7791_CLK_I2C2 29 97 + #define R8A7791_CLK_I2C1 30 98 + #define R8A7791_CLK_I2C0 31 99 + 100 + /* MSTP11 */ 101 + #define R8A7791_CLK_SCIFA3 6 102 + #define R8A7791_CLK_SCIFA4 7 103 + #define R8A7791_CLK_SCIFA5 8 104 + 105 + #endif /* __DT_BINDINGS_CLOCK_R8A7791_H__ */
+5 -1
include/dt-bindings/clock/vf610-clock.h
··· 160 160 #define VF610_CLK_GPU2D 147 161 161 #define VF610_CLK_ENET0 148 162 162 #define VF610_CLK_ENET1 149 163 - #define VF610_CLK_END 150 163 + #define VF610_CLK_DMAMUX0 150 164 + #define VF610_CLK_DMAMUX1 151 165 + #define VF610_CLK_DMAMUX2 152 166 + #define VF610_CLK_DMAMUX3 153 167 + #define VF610_CLK_END 154 164 168 165 169 #endif /* __DT_BINDINGS_CLOCK_VF610_H */
+49 -1
include/linux/tegra-powergate.h
··· 38 38 #define TEGRA_POWERGATE_CPU0 14 39 39 #define TEGRA_POWERGATE_C0NC 15 40 40 #define TEGRA_POWERGATE_C1NC 16 41 + #define TEGRA_POWERGATE_SOR 17 41 42 #define TEGRA_POWERGATE_DIS 18 42 43 #define TEGRA_POWERGATE_DISB 19 43 44 #define TEGRA_POWERGATE_XUSBA 20 44 45 #define TEGRA_POWERGATE_XUSBB 21 45 46 #define TEGRA_POWERGATE_XUSBC 22 47 + #define TEGRA_POWERGATE_VIC 23 48 + #define TEGRA_POWERGATE_IRAM 24 46 49 47 50 #define TEGRA_POWERGATE_3D0 TEGRA_POWERGATE_3D 51 + 52 + #define TEGRA_IO_RAIL_CSIA 0 53 + #define TEGRA_IO_RAIL_CSIB 1 54 + #define TEGRA_IO_RAIL_DSI 2 55 + #define TEGRA_IO_RAIL_MIPI_BIAS 3 56 + #define TEGRA_IO_RAIL_PEX_BIAS 4 57 + #define TEGRA_IO_RAIL_PEX_CLK1 5 58 + #define TEGRA_IO_RAIL_PEX_CLK2 6 59 + #define TEGRA_IO_RAIL_USB0 9 60 + #define TEGRA_IO_RAIL_USB1 10 61 + #define TEGRA_IO_RAIL_USB2 11 62 + #define TEGRA_IO_RAIL_USB_BIAS 12 63 + #define TEGRA_IO_RAIL_NAND 13 64 + #define TEGRA_IO_RAIL_UART 14 65 + #define TEGRA_IO_RAIL_BB 15 66 + #define TEGRA_IO_RAIL_AUDIO 17 67 + #define TEGRA_IO_RAIL_HSIC 19 68 + #define TEGRA_IO_RAIL_COMP 22 69 + #define TEGRA_IO_RAIL_HDMI 28 70 + #define TEGRA_IO_RAIL_PEX_CNTRL 32 71 + #define TEGRA_IO_RAIL_SDMMC1 33 72 + #define TEGRA_IO_RAIL_SDMMC3 34 73 + #define TEGRA_IO_RAIL_SDMMC4 35 74 + #define TEGRA_IO_RAIL_CAM 36 75 + #define TEGRA_IO_RAIL_RES 37 76 + #define TEGRA_IO_RAIL_HV 38 77 + #define TEGRA_IO_RAIL_DSIB 39 78 + #define TEGRA_IO_RAIL_DSIC 40 79 + #define TEGRA_IO_RAIL_DSID 41 80 + #define TEGRA_IO_RAIL_CSIE 44 81 + #define TEGRA_IO_RAIL_LVDS 57 82 + #define TEGRA_IO_RAIL_SYS_DDC 58 48 83 49 84 #ifdef CONFIG_ARCH_TEGRA 50 85 int tegra_powergate_is_powered(int id); ··· 90 55 /* Must be called with clk disabled, and returns with clk enabled */ 91 56 int tegra_powergate_sequence_power_up(int id, struct clk *clk, 92 57 struct reset_control *rst); 58 + 59 + int tegra_io_rail_power_on(int id); 60 + int tegra_io_rail_power_off(int id); 93 61 #else 94 62 static inline int tegra_powergate_is_powered(int id) 95 63 { ··· 115 77 } 116 78 117 79 static inline int tegra_powergate_sequence_power_up(int id, struct clk *clk, 118 - struct reset_control *rst); 80 + struct reset_control *rst) 81 + { 82 + return -ENOSYS; 83 + } 84 + 85 + static inline int tegra_io_rail_power_on(int id) 86 + { 87 + return -ENOSYS; 88 + } 89 + 90 + static inline int tegra_io_rail_power_off(int id) 119 91 { 120 92 return -ENOSYS; 121 93 }