ARM: i.MX1 clk: Add devicetree support
Subsystems (8)
PATCH v2 1/1 ARM: i.MX1 clk: Add devicetree support
This patch adds devicetree support CCM module for i.MX1 (MC9328MX1) CPUs.
--- .../devicetree/bindings/clock/imx1-clock.txt | 26 ++++ arch/arm/mach-imx/clk-imx1.c | 153 +++++++++++---------- include/dt-bindings/clock/imx1-clock.h | 40 ++++++ 3 files changed, 148 insertions(+), 71 deletions(-) create mode 100644 Documentation/devicetree/bindings/clock/imx1-clock.txt create mode 100644 include/dt-bindings/clock/imx1-clock.h
Documentation/devicetree/bindings/clock/imx1-clock.txt new file +26 -0
@@ -0,0 +1,26 @@ +* Clock bindings for Freescale i.MX1 CPUs + +Required properties: +- compatible: Should be "fsl,imx1-ccm". +- reg: Address and length of the register set. +- #clock-cells: Should be <1>. + +The clock consumer should specify the desired clock by having the clock +ID in its "clocks" phandle cell. See include/dt-bindings/clock/imx1-clock.h +for the full list of i.MX1 clock IDs. + +Examples: + clks: ccm at 0021b000 { + #clock-cells = <1>; + compatible = "fsl,imx1-ccm"; + reg = <0x0021b000 0x1000>; + }; + + pwm: pwm at 00208000 { + #pwm-cells = <2>; + compatible = "fsl,imx1-pwm"; + reg = <0x00208000 0x1000>; + interrupts = <34>; + clocks = <&clks IMX1_CLK_DUMMY>, <&clks IMX1_CLK_PER1>; + clock-names = "ipg", "per"; + };
arch/arm/mach-imx/clk-imx1.c +82 -71
182 lines not on this page · raw message
include/dt-bindings/clock/imx1-clock.h new file +40 -0
@@ -0,0 +1,40 @@ +/* +* Copyright (C) 2014 Alexander Shiyan <[email protected]> +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License version 2 as +* published by the Free Software Foundation. +* +*/ + +#ifndef __DT_BINDINGS_CLOCK_IMX1_H +#define __DT_BINDINGS_CLOCK_IMX1_H + +#define IMX1_CLK_DUMMY 0 +#define IMX1_CLK_CLK32 1 +#define IMX1_CLK_CLK16M_EXT 2 +#define IMX1_CLK_CLK16M 3 +#define IMX1_CLK_CLK32_PREMULT 4 +#define IMX1_CLK_PREM 5 +#define IMX1_CLK_MPLL 6 +#define IMX1_CLK_MPLL_GATE 7 +#define IMX1_CLK_SPLL 8 +#define IMX1_CLK_SPLL_GATE 9 +#define IMX1_CLK_MCU 10 +#define IMX1_CLK_FCLK 11 +#define IMX1_CLK_HCLK 12 +#define IMX1_CLK_CLK48M 13 +#define IMX1_CLK_PER1 14 +#define IMX1_CLK_PER2 15 +#define IMX1_CLK_PER3 16 +#define IMX1_CLK_CLKO 17 +#define IMX1_CLK_UART3_GATE 18 +#define IMX1_CLK_SSI2_GATE 19 +#define IMX1_CLK_BROM_GATE 20 +#define IMX1_CLK_DMA_GATE 21 +#define IMX1_CLK_CSI_GATE 22 +#define IMX1_CLK_MMA_GATE 23 +#define IMX1_CLK_USBD_GATE 24 +#define IMX1_CLK_MAX 25 + +#endif
Signature · 1 line
1.8.5.5
PATCH 1/1 ARM: i.MX: Compile FIQ code for AVIC & TZIC only
There are no reason to compile FIQ specific code for GIC IRQ controller (i.MX6). This patch restrict compilation for FIQ specific code for AVIC and TZIC only.
--- arch/arm/mach-imx/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
arch/arm/mach-imx/Makefile +3 -3
@@ -1,4 +1,4 @@ -obj-y := time.o cpu.o system.o irq-common.o +obj-y := time.o cpu.o system.o obj-$(CONFIG_SOC_IMX1) += clk-imx1.o mm-imx1.o obj-$(CONFIG_SOC_IMX21) += clk-imx21.o mm-imx21.o
@@ -21,8 +21,8 @@ obj-$(CONFIG_COMMON_CLK) += clk-pllv1.o clk-pllv2.o clk-pllv3.o clk-gate2.o \ obj-$(CONFIG_IMX_HAVE_IOMUX_V1) += iomux-v1.o obj-$(CONFIG_ARCH_MXC_IOMUX_V3) += iomux-v3.o -obj-$(CONFIG_MXC_TZIC) += tzic.o -obj-$(CONFIG_MXC_AVIC) += avic.o +obj-$(CONFIG_MXC_TZIC) += tzic.o irq-common.o +obj-$(CONFIG_MXC_AVIC) += avic.o irq-common.o obj-$(CONFIG_MXC_USE_EPIT) += epit.o obj-$(CONFIG_MXC_DEBUG_BOARD) += 3ds_debugboard.o
Signature · 1 line
1.8.5.5
Re: [PATCH] ARM: i.MX: Compile FIQ code for AVIC & TZIC only
Hi,
Quoted 21 lines · Alexander Shiyan
There are no reason to compile FIQ specific code for GIC IRQ controller (i.MX6). This patch restrict compilation for FIQ specific code for AVIC and TZIC only.
Signed-off-by Alexander Shiyan <[email protected]>--- arch/arm/mach-imx/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)arch/arm/mach-imx/Makefile +1
-1@@ -1,4 +1,4 @@ -obj-y := time.o cpu.o system.o irq-common.o +obj-y := time.o cpu.o system.o obj-$(CONFIG_SOC_IMX1) += clk-imx1.o mm-imx1.o obj-$(CONFIG_SOC_IMX21) += clk-imx21.o mm-imx21.o
arch/arm/mach-imx/Makefile obj-$(CONFIG_COMMON_CLK) += clk-pllv1.o clk-pllv2.o clk-pllv3.o clk-gate2.o \ · line 28
Quoted 10 lines
arch/arm/mach-imx/Makefile +2
-2@@ -21,8 +21,8 @@ obj-$(CONFIG_COMMON_CLK) += clk-pllv1.o clk-pllv2.o clk-pllv3.o clk-gate2.o \ obj-$(CONFIG_IMX_HAVE_IOMUX_V1) += iomux-v1.o obj-$(CONFIG_ARCH_MXC_IOMUX_V3) += iomux-v3.o -obj-$(CONFIG_MXC_TZIC) += tzic.o -obj-$(CONFIG_MXC_AVIC) += avic.o +obj-$(CONFIG_MXC_TZIC) += tzic.o irq-common.o +obj-$(CONFIG_MXC_AVIC) += avic.o irq-common.o obj-$(CONFIG_MXC_USE_EPIT) += epit.o obj-$(CONFIG_MXC_DEBUG_BOARD) += 3ds_debugboard.o
This patch introduces a build error in sound/soc/fsl/imx-pcm-fiq.c:sound/built-in.o: In function `imx_pcm_fiq_free':
last.c:(.text+0x2aca8): undefined reference to mxc_set_irq_fiq' sound/built-in.o: In function imx_pcm_fiq_init':
last.c:(.text+0x2b1a4): undefined reference to mxc_set_irq_fiq' last.c:(.text+0x2b200): undefined reference to mxc_set_irq_fiq' make[1]: *** [vmlinux] Error 1
make: *** [sub-make] Error 2
This could be fixed with the following patch:
sound/soc/fsl/Kconfig 2014-06-02 11:25:38.411960595 +0200 renamed from sound/soc/fsl/Kconfig 2014-06-02 11:25:38.315960451 +0200 +0 -0
@@ -15,7 +15,7 @@ config SND_SOC_FSL_SSI
tristate "Synchronous Serial Interface module support" select SND_SOC_IMX_PCM_DMA if SND_IMX_SOC != n
- select SND_SOC_IMX_PCM_FIQ if SND_IMX_SOC != n && ARCH_MXC
+ select SND_SOC_IMX_PCM_FIQ if SND_IMX_SOC != n && (MXC_AVIC || MXC_TZIC)
help
Say Y if you want to add Synchronous Serial Interface (SSI) support for the Freescale CPUs.
Lothar Waßmann
Signature · 14 lines
___________________________________________________________ Ka-Ro electronics GmbH | Pascalstraße 22 | D - 52076 Aachen Phone: +49 2408 1402-0 | Fax: +49 2408 1402-10 Geschäftsführer: Matthias Kaussen Handelsregistereintrag: Amtsgericht Aachen, HRB 4996 www.karo-electronics.de | [email protected] ___________________________________________________________ _______________________________________________ linux-arm-kernel mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Re: [PATCH] ARM: i.MX: Compile FIQ code for AVIC & TZIC only
Mon, 2 Jun 2014 11:33:27 +0200 ?? Lothar Wa?mann <[email protected]>:
Quoted 47 lines
Hi,
Quoted 21 lines · Alexander Shiyan
There are no reason to compile FIQ specific code for GIC IRQ controller (i.MX6). This patch restrict compilation for FIQ specific code for AVIC and TZIC only.
Signed-off-by Alexander Shiyan <[email protected]>--- arch/arm/mach-imx/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)arch/arm/mach-imx/Makefile +1
-1@@ -1,4 +1,4 @@ -obj-y := time.o cpu.o system.o irq-common.o +obj-y := time.o cpu.o system.o obj-$(CONFIG_SOC_IMX1) += clk-imx1.o mm-imx1.o obj-$(CONFIG_SOC_IMX21) += clk-imx21.o mm-imx21.oarch/arm/mach-imx/Makefile obj-$(CONFIG_COMMON_CLK) += clk-pllv1.o clk-pllv2.o clk-pllv3.o clk-gate2.o \ · line 28
Quoted 10 lines
arch/arm/mach-imx/Makefile +2
-2@@ -21,8 +21,8 @@ obj-$(CONFIG_COMMON_CLK) += clk-pllv1.o clk-pllv2.o clk-pllv3.o clk-gate2.o \ obj-$(CONFIG_IMX_HAVE_IOMUX_V1) += iomux-v1.o obj-$(CONFIG_ARCH_MXC_IOMUX_V3) += iomux-v3.o -obj-$(CONFIG_MXC_TZIC) += tzic.o -obj-$(CONFIG_MXC_AVIC) += avic.o +obj-$(CONFIG_MXC_TZIC) += tzic.o irq-common.o +obj-$(CONFIG_MXC_AVIC) += avic.o irq-common.o obj-$(CONFIG_MXC_USE_EPIT) += epit.o obj-$(CONFIG_MXC_DEBUG_BOARD) += 3ds_debugboard.oThis patch introduces a build error in
sound/soc/fsl/imx-pcm-fiq.c:sound/built-in.o: In function `imx_pcm_fiq_free':
last.c:(.text+0x2aca8): undefined reference tomxc_set_irq_fiq' sound/built-in.o: In functionimx_pcm_fiq_init':
last.c:(.text+0x2b1a4): undefined reference tomxc_set_irq_fiq' last.c:(.text+0x2b200): undefined reference tomxc_set_irq_fiq' make[1]: *** [vmlinux] Error 1
make: *** [sub-make] Error 2This could be fixed with the following patch:
sound/soc/fsl/Kconfig 2014-06-02 11:25:38.411960595 +0200 line 18
Quoted 5 lines
sound/soc/fsl/Kconfig 2014-06-02 11:25:38.411960595 +0200 renamed from sound/soc/fsl/Kconfig 2014-06-02 11:25:38.315960451 +0200 +1
-1@@ -15,7 +15,7 @@ config SND_SOC_FSL_SSI tristate "Synchronous Serial Interface module support" select SND_SOC_IMX_PCM_DMA if SND_IMX_SOC != n - select SND_SOC_IMX_PCM_FIQ if SND_IMX_SOC != n && ARCH_MXC + select SND_SOC_IMX_PCM_FIQ if SND_IMX_SOC != n && (MXC_AVIC || MXC_TZIC)
...
No. This will break building fsl-ssi for PPC and i.MX6, so let's just drop original patch for a while.
---
Re: [PATCH] ARM: i.MX: Compile FIQ code for AVIC & TZIC only
Hi,
Quoted 55 lines · Alexander Shiyan
Mon, 2 Jun 2014 11:33:27 +0200 ?? Lothar Wa?mann <[email protected]>:
Quoted 52 lines
Hi,
Quoted 21 lines · Alexander Shiyan
There are no reason to compile FIQ specific code for GIC IRQ controller (i.MX6). This patch restrict compilation for FIQ specific code for AVIC and TZIC only.
Signed-off-by Alexander Shiyan <[email protected]>--- arch/arm/mach-imx/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)arch/arm/mach-imx/Makefile +1
-1@@ -1,4 +1,4 @@ -obj-y := time.o cpu.o system.o irq-common.o +obj-y := time.o cpu.o system.o obj-$(CONFIG_SOC_IMX1) += clk-imx1.o mm-imx1.o obj-$(CONFIG_SOC_IMX21) += clk-imx21.o mm-imx21.oarch/arm/mach-imx/Makefile obj-$(CONFIG_COMMON_CLK) += clk-pllv1.o clk-pllv2.o clk-pllv3.o clk-gate2.o \ · line 28
Quoted 10 lines
arch/arm/mach-imx/Makefile +2
-2@@ -21,8 +21,8 @@ obj-$(CONFIG_COMMON_CLK) += clk-pllv1.o clk-pllv2.o clk-pllv3.o clk-gate2.o \ obj-$(CONFIG_IMX_HAVE_IOMUX_V1) += iomux-v1.o obj-$(CONFIG_ARCH_MXC_IOMUX_V3) += iomux-v3.o -obj-$(CONFIG_MXC_TZIC) += tzic.o -obj-$(CONFIG_MXC_AVIC) += avic.o +obj-$(CONFIG_MXC_TZIC) += tzic.o irq-common.o +obj-$(CONFIG_MXC_AVIC) += avic.o irq-common.o obj-$(CONFIG_MXC_USE_EPIT) += epit.o obj-$(CONFIG_MXC_DEBUG_BOARD) += 3ds_debugboard.oThis patch introduces a build error in
sound/soc/fsl/imx-pcm-fiq.c:sound/built-in.o: In function `imx_pcm_fiq_free':
last.c:(.text+0x2aca8): undefined reference tomxc_set_irq_fiq' sound/built-in.o: In functionimx_pcm_fiq_init':
last.c:(.text+0x2b1a4): undefined reference tomxc_set_irq_fiq' last.c:(.text+0x2b200): undefined reference tomxc_set_irq_fiq' make[1]: *** [vmlinux] Error 1
make: *** [sub-make] Error 2This could be fixed with the following patch:
sound/soc/fsl/Kconfig 2014-06-02 11:25:38.411960595 +0200 renamed from sound/soc/fsl/Kconfig 2014-06-02 11:25:38.315960451 +0200 +1
-1@@ -15,7 +15,7 @@ config SND_SOC_FSL_SSI tristate "Synchronous Serial Interface module support" select SND_SOC_IMX_PCM_DMA if SND_IMX_SOC != n - select SND_SOC_IMX_PCM_FIQ if SND_IMX_SOC != n && ARCH_MXC + select SND_SOC_IMX_PCM_FIQ if SND_IMX_SOC != n && (MXC_AVIC || MXC_TZIC)...
Quoted 2 lines
No. This will break building fsl-ssi for PPC and i.MX6, so let's just drop original patch for a while.
Why and how?MXC_AVIC or MXC_TZIC are just more specific than ARCH_MXC and will be set only on ARCH_MXC when there is either a TZIC or AVIC controller selected.
The PPC driver won't have ARCH_MXC defined anyway. Thus there will be no change for that one
I've successfully build the driver on i.MX6.
Lothar Wa?mann
Signature · 9 lines
___________________________________________________________ Ka-Ro electronics GmbH | Pascalstra?e 22 | D - 52076 Aachen Phone: +49 2408 1402-0 | Fax: +49 2408 1402-10 Gesch?ftsf?hrer: Matthias Kaussen Handelsregistereintrag: Amtsgericht Aachen, HRB 4996 www.karo-electronics.de | info at karo-electronics.de ___________________________________________________________
Re: [PATCH] ARM: i.MX: Compile FIQ code for AVIC & TZIC only
In reply to Alexander ShiyanQuoted 55 lines · Alexander Shiyan
Mon, 2 Jun 2014 11:33:27 +0200 ?? Lothar Wa?mann <[email protected]>:
Quoted 52 lines
Hi,
Quoted 21 lines · Alexander Shiyan
There are no reason to compile FIQ specific code for GIC IRQ controller (i.MX6). This patch restrict compilation for FIQ specific code for AVIC and TZIC only.
Signed-off-by Alexander Shiyan <[email protected]>--- arch/arm/mach-imx/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)arch/arm/mach-imx/Makefile +1
-1@@ -1,4 +1,4 @@ -obj-y := time.o cpu.o system.o irq-common.o +obj-y := time.o cpu.o system.o obj-$(CONFIG_SOC_IMX1) += clk-imx1.o mm-imx1.o obj-$(CONFIG_SOC_IMX21) += clk-imx21.o mm-imx21.oarch/arm/mach-imx/Makefile obj-$(CONFIG_COMMON_CLK) += clk-pllv1.o clk-pllv2.o clk-pllv3.o clk-gate2.o \ · line 28
Quoted 10 lines
arch/arm/mach-imx/Makefile +2
-2@@ -21,8 +21,8 @@ obj-$(CONFIG_COMMON_CLK) += clk-pllv1.o clk-pllv2.o clk-pllv3.o clk-gate2.o \ obj-$(CONFIG_IMX_HAVE_IOMUX_V1) += iomux-v1.o obj-$(CONFIG_ARCH_MXC_IOMUX_V3) += iomux-v3.o -obj-$(CONFIG_MXC_TZIC) += tzic.o -obj-$(CONFIG_MXC_AVIC) += avic.o +obj-$(CONFIG_MXC_TZIC) += tzic.o irq-common.o +obj-$(CONFIG_MXC_AVIC) += avic.o irq-common.o obj-$(CONFIG_MXC_USE_EPIT) += epit.o obj-$(CONFIG_MXC_DEBUG_BOARD) += 3ds_debugboard.oThis patch introduces a build error in
sound/soc/fsl/imx-pcm-fiq.c:sound/built-in.o: In function `imx_pcm_fiq_free':
last.c:(.text+0x2aca8): undefined reference tomxc_set_irq_fiq' sound/built-in.o: In functionimx_pcm_fiq_init':
last.c:(.text+0x2b1a4): undefined reference tomxc_set_irq_fiq' last.c:(.text+0x2b200): undefined reference tomxc_set_irq_fiq' make[1]: *** [vmlinux] Error 1
make: *** [sub-make] Error 2This could be fixed with the following patch:
sound/soc/fsl/Kconfig 2014-06-02 11:25:38.411960595 +0200 renamed from sound/soc/fsl/Kconfig 2014-06-02 11:25:38.315960451 +0200 +1
-1@@ -15,7 +15,7 @@ config SND_SOC_FSL_SSI tristate "Synchronous Serial Interface module support" select SND_SOC_IMX_PCM_DMA if SND_IMX_SOC != n - select SND_SOC_IMX_PCM_FIQ if SND_IMX_SOC != n && ARCH_MXC + select SND_SOC_IMX_PCM_FIQ if SND_IMX_SOC != n && (MXC_AVIC || MXC_TZIC)...
Quoted 1 line
No. This will break building fsl-ssi for PPC and i.MX6, so let's just drop original patch for a while.
Ok, patch dropped for now.
Shawn
PATCH 1/1 ARM: i.MX: Remove registration helper for i.MX1 USB UDC
In reply to Alexander Shiyanimx_udc driver was removed from the kernel of about 10 months ago. This patch removes a registration helper for this driver and orphaned driver header.
--- arch/arm/mach-imx/devices/Kconfig | 3 -- arch/arm/mach-imx/devices/Makefile | 1 - arch/arm/mach-imx/devices/devices-common.h | 16 ------ arch/arm/mach-imx/devices/platform-imx_udc.c | 75 ---------------------------- include/linux/platform_data/usb-imx_udc.h | 23 --------- 5 files changed, 118 deletions(-) delete mode 100644 arch/arm/mach-imx/devices/platform-imx_udc.c delete mode 100644 include/linux/platform_data/usb-imx_udc.h
arch/arm/mach-imx/devices/Kconfig +0 -3
@@ -43,9 +43,6 @@ config IMX_HAVE_PLATFORM_IMX_SSI config IMX_HAVE_PLATFORM_IMX_UART bool -config IMX_HAVE_PLATFORM_IMX_UDC - bool - config IMX_HAVE_PLATFORM_IPU_CORE bool
arch/arm/mach-imx/devices/Makefile +0 -1
@@ -16,7 +16,6 @@ obj-$(CONFIG_IMX_HAVE_PLATFORM_IMX_KEYPAD) += platform-imx-keypad.o obj-$(CONFIG_IMX_HAVE_PLATFORM_PATA_IMX) += platform-pata_imx.o obj-$(CONFIG_IMX_HAVE_PLATFORM_IMX_SSI) += platform-imx-ssi.o obj-$(CONFIG_IMX_HAVE_PLATFORM_IMX_UART) += platform-imx-uart.o -obj-$(CONFIG_IMX_HAVE_PLATFORM_IMX_UDC) += platform-imx_udc.o obj-$(CONFIG_IMX_HAVE_PLATFORM_IPU_CORE) += platform-ipu-core.o obj-$(CONFIG_IMX_HAVE_PLATFORM_MX1_CAMERA) += platform-mx1-camera.o obj-$(CONFIG_IMX_HAVE_PLATFORM_MX2_CAMERA) += platform-mx2-camera.o
arch/arm/mach-imx/devices/devices-common.h +0 -16
@@ -176,22 +176,6 @@ struct platform_device *__init imx_add_imx_uart_1irq(const struct imx_imx_uart_1irq_data *data, const struct imxuart_platform_data *pdata); -#include <linux/platform_data/usb-imx_udc.h> -struct imx_imx_udc_data { -resource_size_t iobase; -resource_size_t iosize; -resource_size_t irq0; -resource_size_t irq1; -resource_size_t irq2; -resource_size_t irq3; -resource_size_t irq4; -resource_size_t irq5; -resource_size_t irq6; -}; -struct platform_device *__init imx_add_imx_udc ( -const struct imx_imx_udc_data *data, -const struct imxusb_platform_data *pdata); -#include <linux/platform_data/video-mx3fb.h> #include <linux/platform_data/camera-mx3.h> struct imx_ipu_core_data {
arch/arm/mach-imx/devices/platform-imx_udc.c deleted +0 -75
75 lines not on this page · raw message
include/linux/platform_data/usb-imx_udc.h deleted +0 -23
@@ -1,23 +0,0 @@ -/* -* Copyright (C) 2008 Darius Augulis <[email protected]> -* -* This program is free software; you can redistribute it and/or modify -* it under the terms of the GNU General Public License as published by -* the Free Software Foundation; either version 2 of the License, or -* (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -*/ - -#ifndef __ASM_ARCH_MXC_USB -#define __ASM_ARCH_MXC_USB - -struct imxusb_platform_data { -int (*init)(struct device *); -void (*exit)(struct device *); -}; - -#endif /* __ASM_ARCH_MXC_USB */
Signature · 1 line
1.8.5.5
Shawn Guo
AppliedPATCH v2 1/1 ARM: i.MX1 clk: Add devicetree support
In reply to Alexander ShiyanQuoted 3 lines · Alexander Shiyan
This patch adds devicetree support CCM module for i.MX1 (MC9328MX1) CPUs.
Signed-off-by Alexander Shiyan <[email protected]>
Applied all 3, thanks.