Skip to contentSkip to conversation

ARM: imx: Further cleanups due to dt-only conversion

PATCH Superseded Fabio Estevam 3 participants 23 messages Sep 16, 2020 – Sep 30, 2020

Subsystems (6)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Fabio Estevam

author reviewer
#0 lore raw

cover ARM: imx: Further cleanups due to dt-only conversion

Now that i.MX has been converted to a devicetree-only platform, do one more round of cleanups that consists mainly in using devicetree to get the peripherals base addresses and get rid of unused clock driver code.

Fabio Estevam (13):
ARM: dts: imx27: Fix the register range for CCM
ARM: dts: imx27: Add the SYSCTRL description
ARM: imx27: Retrieve the SYSCTRL base address from devicetree
ARM: imx27: Retrieve the CCM base address from devicetree
ARM: imx31: Retrieve the IIM base address from devicetree
ARM: imx3: Retrieve the CCM base address from devicetree
ARM: imx3: Retrieve the AVIC base address from devicetree
ARM: imx35: Retrieve the IIM base address from devicetree
ARM: imx: Remove unused IO_ADDRESS() macros
clk: imx: imx27: Remove mx27_clocks_init()
clk: imx: imx31: Remove mx31_clocks_init()
clk: imx: imx35: Remove mx35_clocks_init()
clk: imx: imx21: Remove clock driver

 arch/arm/boot/dts/imx27.dtsi  |   7 +-
 arch/arm/mach-imx/cpu-imx27.c |   9 +-
 arch/arm/mach-imx/cpu-imx31.c |  10 +-
 arch/arm/mach-imx/cpu-imx35.c |   9 +-
 arch/arm/mach-imx/mm-imx3.c   |  31 +++++-
 arch/arm/mach-imx/mx27.h      |   1 -
 arch/arm/mach-imx/mx31.h      |   1 -
 arch/arm/mach-imx/mx35.h      |   1 -
 arch/arm/mach-imx/pm-imx27.c  |  12 ++-
 drivers/clk/imx/Kconfig       |   4 -
 drivers/clk/imx/Makefile      |   1 -
 drivers/clk/imx/clk-imx21.c   | 171 ----------------------------------
 drivers/clk/imx/clk-imx27.c   |  73 ---------------
 drivers/clk/imx/clk-imx31.c   |  71 --------------
 drivers/clk/imx/clk-imx35.c   |  68 --------------
 15 files changed, 68 insertions(+), 401 deletions(-)
 delete mode 100644 drivers/clk/imx/clk-imx21.c
Signature · 7 lines
2.17.1


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
author reviewer
#1 lore raw

PATCH 1/13 ARM: dts: imx27: Fix the register range for CCM

According to the i.MX27 Reference Manual, the range for the CCM registers has a size of 0x800.

Using 0x1000 will overlap with the SYSCTRL region, so fix it accordingly.

---
 arch/arm/boot/dts/imx27.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/imx27.dtsi +1 -1
index 7bc132737a37..9fbc6cb7fbef 100644
@@ -536,7 +536,7 @@
 
 			clks: ccm@10027000{
 				compatible = "fsl,imx27-ccm";
-				reg = <0x10027000 0x1000>;
+				reg = <0x10027000 0x800>;
 				#clock-cells = <1>;
 			};
 
Signature · 7 lines
2.17.1


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
author reviewer
#2 lore raw

PATCH 2/13 ARM: dts: imx27: Add the SYSCTRL description

In reply to Fabio Estevam

Add the SYSCTRL register range description.

This is useful for accessing the chip ID register.

---
 arch/arm/boot/dts/imx27.dtsi | 5 +++++
 1 file changed, 5 insertions(+)
arch/arm/boot/dts/imx27.dtsi +5 -0
index 9fbc6cb7fbef..d54736524786 100644
@@ -540,6 +540,11 @@
 				#clock-cells = <1>;
 			};
 
+			sysctrl: system-control@10027800 {
+				compatible = "fsl,imx27-sysctrl";
+				reg = <0x10027800 0x800>;
+			};
+
 			iim: efuse@10028000 {
 				compatible = "fsl,imx27-iim";
 				reg = <0x10028000 0x1000>;
Signature · 7 lines
2.17.1


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
author reviewer
#3 lore raw

PATCH 3/13 ARM: imx27: Retrieve the SYSCTRL base address from devicetree

In reply to Fabio Estevam

Now that imx27 has been converted to a devicetree-only platform, retrieve the SYSCTRL base address from devicetree.

---
 arch/arm/mach-imx/cpu-imx27.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
arch/arm/mach-imx/cpu-imx27.c +8 -1
index a969aa71b60f..2c8430f34556 100644
@@ -9,6 +9,7 @@
  */
 
 #include <linux/io.h>
+#include <linux/of_address.h>
 #include <linux/module.h>
 
 #include "hardware.h"
@@ -20,13 +21,19 @@ static int mx27_cpu_partnumber;
 
 static int mx27_read_cpu_rev(void)
 {
+	void __iomem *sysctrl_base;
+	struct device_node *np;
 	u32 val;
+
+	np = of_find_compatible_node(NULL, NULL, "fsl,imx27-sysctrl");
+	sysctrl_base = of_iomap(np, 0);
+	BUG_ON(!sysctrl_base);
 	/*
 	 * now we have access to the IO registers. As we need
 	 * the silicon revision very early we read it here to
 	 * avoid any further hooks
 	*/
-	val = imx_readl(MX27_IO_ADDRESS(MX27_SYSCTRL_BASE_ADDR + SYS_CHIP_ID));
+	val = imx_readl(sysctrl_base + SYS_CHIP_ID);
 
 	mx27_cpu_partnumber = (int)((val >> 12) & 0xFFFF);
 
Signature · 7 lines
2.17.1


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
#4 lore raw

Re: [PATCH 03/13] ARM: imx27: Retrieve the SYSCTRL base address from devicetree

Quoted 5 lines · Fabio Estevam

Now that imx27 has been converted to a devicetree-only platform, retrieve the SYSCTRL base address from devicetree.

While this is nicer in theory, I don't like the way it breaks compatibility with old dtb files that are lacking the device node.

What is the status of dtb stability otherwise on imx? My impression was that it is actually quite good about not breaking this way.

Arnd

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

author reviewer
#5 lore raw

Re: [PATCH 03/13] ARM: imx27: Retrieve the SYSCTRL base address from devicetree

Hi Arnd,

Quoted 2 lines · Arnd Bergmann

While this is nicer in theory, I don't like the way it breaks compatibility with old dtb files that are lacking the device node.

Good point. Let me access this SYSCTRL region via the CCM register space then.

In the current devicetree CCM region already overlaps with the SYSCTRL region.

This way we don't break dt compatibility.

Quoted 2 lines

What is the status of dtb stability otherwise on imx? My impression was that it is actually quite good about not breaking this way.

Yes, we try to keep dt compatibility as much as possible.

Thanks

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

author reviewer
#6 lore raw

PATCH 4/13 ARM: imx27: Retrieve the CCM base address from devicetree

In reply to Fabio Estevam

Now that imx27 has been converted to a devicetree-only platform, retrieve the CCM base address from devicetree.

---
 arch/arm/mach-imx/pm-imx27.c | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)
arch/arm/mach-imx/pm-imx27.c +10 -2
index d943535566c8..020e6deb67c8 100644
@@ -7,6 +7,7 @@
  * modify it under the terms of the GNU General Public License.
  */
 
+#include <linux/of_address.h>
 #include <linux/kernel.h>
 #include <linux/suspend.h>
 #include <linux/io.h>
@@ -15,13 +16,20 @@
 
 static int mx27_suspend_enter(suspend_state_t state)
 {
+	void __iomem *ccm_base;
+	struct device_node *np;
 	u32 cscr;
+
+	np = of_find_compatible_node(NULL, NULL, "fsl,imx27-ccm");
+	ccm_base = of_iomap(np, 0);
+	BUG_ON(!ccm_base);
+
 	switch (state) {
 	case PM_SUSPEND_MEM:
 		/* Clear MPEN and SPEN to disable MPLL/SPLL */
-		cscr = imx_readl(MX27_IO_ADDRESS(MX27_CCM_BASE_ADDR));
+		cscr = imx_readl(ccm_base);
 		cscr &= 0xFFFFFFFC;
-		imx_writel(cscr, MX27_IO_ADDRESS(MX27_CCM_BASE_ADDR));
+		imx_writel(cscr, ccm_base);
 		/* Executes WFI */
 		cpu_do_idle();
 		break;
Signature · 7 lines
2.17.1


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
author reviewer
#7 lore raw

PATCH 5/13 ARM: imx31: Retrieve the IIM base address from devicetree

In reply to Fabio Estevam

Now that imx31 has been converted to a devicetree-only platform, retrieve the IIM base address from devicetree.

---
 arch/arm/mach-imx/cpu-imx31.c | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)
arch/arm/mach-imx/cpu-imx31.c +9 -1
index 3ee684b71006..47677da05cff 100644
@@ -6,6 +6,7 @@
  */
 
 #include <linux/module.h>
+#include <linux/of_address.h>
 #include <linux/io.h>
 
 #include "common.h"
@@ -32,10 +33,17 @@ static struct {
 
 static int mx31_read_cpu_rev(void)
 {
+	void __iomem *iim_base;
+	struct device_node *np;
 	u32 i, srev;
 
+	np = of_find_compatible_node(NULL, NULL, "fsl,imx31-iim");
+	iim_base = of_iomap(np, 0);
+	BUG_ON(!iim_base);
+
+
 	/* read SREV register from IIM module */
-	srev = imx_readl(MX31_IO_ADDRESS(MX31_IIM_BASE_ADDR + MXC_IIMSREV));
+	srev = imx_readl(iim_base + MXC_IIMSREV);
 	srev &= 0xff;
 
 	for (i = 0; i < ARRAY_SIZE(mx31_cpu_type); i++)
Signature · 7 lines
2.17.1


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
author reviewer
#8 lore raw

PATCH 6/13 ARM: imx3: Retrieve the CCM base address from devicetree

In reply to Fabio Estevam

Now that imx31 and imx35 has been converted to a devicetree-only platform, retrieve the CCM base address from devicetree.

---
 arch/arm/mach-imx/mm-imx3.c | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)
arch/arm/mach-imx/mm-imx3.c +11 -2
index 4df7edc7ae7c..b7c5e15bb972 100644
@@ -11,6 +11,7 @@
 #include <linux/init.h>
 #include <linux/err.h>
 #include <linux/io.h>
+#include <linux/of_address.h>
 #include <linux/pinctrl/machine.h>
 
 #include <asm/system_misc.h>
@@ -99,10 +100,14 @@ static void imx31_idle(void)
 
 void __init imx31_init_early(void)
 {
+	struct device_node *np;
+
 	mxc_set_cpu_type(MXC_CPU_MX31);
 	arch_ioremap_caller = imx3_ioremap_caller;
 	arm_pm_idle = imx31_idle;
-	mx3_ccm_base = MX31_IO_ADDRESS(MX31_CCM_BASE_ADDR);
+	np = of_find_compatible_node(NULL, NULL, "fsl,imx31-ccm");
+	mx3_ccm_base = of_iomap(np, 0);
+	BUG_ON(!mx3_ccm_base);
 }
 
 void __init mx31_init_irq(void)
@@ -137,10 +142,14 @@ static void imx35_idle(void)
 
 void __init imx35_init_early(void)
 {
+	struct device_node *np;
+
 	mxc_set_cpu_type(MXC_CPU_MX35);
 	arm_pm_idle = imx35_idle;
 	arch_ioremap_caller = imx3_ioremap_caller;
-	mx3_ccm_base = MX35_IO_ADDRESS(MX35_CCM_BASE_ADDR);
+	np = of_find_compatible_node(NULL, NULL, "fsl,imx35-ccm");
+	mx3_ccm_base = of_iomap(np, 0);
+	BUG_ON(!mx3_ccm_base);
 }
 
 void __init mx35_init_irq(void)
Signature · 7 lines
2.17.1


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
author reviewer
#9 lore raw

PATCH 7/13 ARM: imx3: Retrieve the AVIC base address from devicetree

In reply to Fabio Estevam

Now that imx31 and imx35 has been converted to a devicetree-only platform, retrieve the AVIC base address from devicetree.

---
 arch/arm/mach-imx/mm-imx3.c | 18 ++++++++++++++++--
 1 file changed, 16 insertions(+), 2 deletions(-)
arch/arm/mach-imx/mm-imx3.c +16 -2
index b7c5e15bb972..5056438e5b42 100644
@@ -112,7 +112,14 @@ void __init imx31_init_early(void)
 
 void __init mx31_init_irq(void)
 {
-	mxc_init_irq(MX31_IO_ADDRESS(MX31_AVIC_BASE_ADDR));
+	void __iomem *avic_base;
+	struct device_node *np;
+
+	np = of_find_compatible_node(NULL, NULL, "fsl,imx31-avic");
+	avic_base = of_iomap(np, 0);
+	BUG_ON(!avic_base);
+
+	mxc_init_irq(avic_base);
 }
 #endif /* ifdef CONFIG_SOC_IMX31 */
 
@@ -154,6 +161,13 @@ void __init imx35_init_early(void)
 
 void __init mx35_init_irq(void)
 {
-	mxc_init_irq(MX35_IO_ADDRESS(MX35_AVIC_BASE_ADDR));
+	void __iomem *avic_base;
+	struct device_node *np;
+
+	np = of_find_compatible_node(NULL, NULL, "fsl,imx35-avic");
+	avic_base = of_iomap(np, 0);
+	BUG_ON(!avic_base);
+
+	mxc_init_irq(avic_base);
 }
 #endif /* ifdef CONFIG_SOC_IMX35 */
Signature · 7 lines
2.17.1


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
author reviewer
#10 lore raw

PATCH 8/13 ARM: imx35: Retrieve the IIM base address from devicetree

In reply to Fabio Estevam

Now that imx35 has been converted to a devicetree-only platform, retrieve the IIM base address from devicetree.

---
 arch/arm/mach-imx/cpu-imx35.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
arch/arm/mach-imx/cpu-imx35.c +8 -1
index ebb3cdabd506..80e7d8ab9f1b 100644
@@ -5,6 +5,7 @@
  * Copyright (c) 2009 Daniel Mack <[email protected]>
  */
 #include <linux/module.h>
+#include <linux/of_address.h>
 #include <linux/io.h>
 
 #include "hardware.h"
@@ -14,9 +15,15 @@ static int mx35_cpu_rev = -1;
 
 static int mx35_read_cpu_rev(void)
 {
+	void __iomem *iim_base;
+	struct device_node *np;
 	u32 rev;
 
-	rev = imx_readl(MX35_IO_ADDRESS(MX35_IIM_BASE_ADDR + MXC_IIMSREV));
+	np = of_find_compatible_node(NULL, NULL, "fsl,imx35-iim");
+	iim_base = of_iomap(np, 0);
+	BUG_ON(!iim_base);
+
+	rev = imx_readl(iim_base + MXC_IIMSREV);
 	switch (rev) {
 	case 0x00:
 		return IMX_CHIP_REVISION_1_0;
Signature · 7 lines
2.17.1


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
author reviewer
#11 lore raw

PATCH 9/13 ARM: imx: Remove unused IO_ADDRESS() macros

In reply to Fabio Estevam

The IO_ADDRESS() macros were used to retrieve the peripherals base address for board related code.

Now that i.MX is a devicetree-only platforms, all base addresses are retrieved from devicetree and these macros are unused.

Remove the unused IO_ADDRESS() macros.

---
 arch/arm/mach-imx/mx27.h | 1 -
 arch/arm/mach-imx/mx31.h | 1 -
 arch/arm/mach-imx/mx35.h | 1 -
 3 files changed, 3 deletions(-)
arch/arm/mach-imx/mx27.h +0 -1
index c6f7aae02b67..d6dae9fa8610 100644
@@ -112,7 +112,6 @@
 #define MX27_IRAM_BASE_ADDR		0xffff4c00	/* internal ram */
 
 #define MX27_IO_P2V(x)			IMX_IO_P2V(x)
-#define MX27_IO_ADDRESS(x)		IOMEM(MX27_IO_P2V(x))
 
 /* fixed interrupt numbers */
 #include <asm/irq.h>
arch/arm/mach-imx/mx31.h +0 -1
index d9574671ca5c..192499dcc792 100644
@@ -117,7 +117,6 @@
 #define MX31_PCMCIA_MEM_BASE_ADDR	0xbc000000
 
 #define MX31_IO_P2V(x)			IMX_IO_P2V(x)
-#define MX31_IO_ADDRESS(x)		IOMEM(MX31_IO_P2V(x))
 
 /*
  * Interrupt numbers
arch/arm/mach-imx/mx35.h +0 -1
index 760de6a0af7e..4f0b939c6e03 100644
@@ -116,7 +116,6 @@
 #define MX35_PCMCIA_MEM_BASE_ADDR	0xbc000000
 
 #define MX35_IO_P2V(x)			IMX_IO_P2V(x)
-#define MX35_IO_ADDRESS(x)		IOMEM(MX35_IO_P2V(x))
 
 /*
  * Interrupt numbers
Signature · 7 lines
2.17.1


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
#12 lore raw

Re: [PATCH 09/13] ARM: imx: Remove unused IO_ADDRESS() macros

Quoted 21 lines · Fabio Estevam

The IO_ADDRESS() macros were used to retrieve the peripherals base address for board related code.

Now that i.MX is a devicetree-only platforms, all base addresses are retrieved from devicetree and these macros are unused.

Remove the unused IO_ADDRESS() macros.

---
 arch/arm/mach-imx/mx27.h | 1 -
 arch/arm/mach-imx/mx31.h | 1 -
 arch/arm/mach-imx/mx35.h | 1 -
 3 files changed, 3 deletions(-)
arch/arm/mach-imx/mx27.h +0 -0
index c6f7aae02b67..d6dae9fa8610 100644

arch/arm/mach-imx/mx27.h line 115

Quoted 4 lines
arch/arm/mach-imx/mx27.h +0 -1
@@ -112,7 +112,6 @@
 #define MX27_IRAM_BASE_ADDR            0xffff4c00      /* internal ram */
 
 #define MX27_IO_P2V(x)                 IMX_IO_P2V(x)
-#define MX27_IO_ADDRESS(x)             IOMEM(MX27_IO_P2V(x))

As far as I can tell, the MX27_IO_P2V() macro should be removed here as well if MX27_IO_ADDRESS() gets removed.

What about the other constants in these files? Are there any remaining references to the MX*_BASE_ADDRESS, MX*_INT_*, and MX*_DMA_REQ_* constants after the series?

Arnd

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

author reviewer
#13 lore raw

Re: [PATCH 09/13] ARM: imx: Remove unused IO_ADDRESS() macros

Hi Arnd,

Quoted 2 lines · Arnd Bergmann

As far as I can tell, the MX27_IO_P2V() macro should be removed here as well if MX27_IO_ADDRESS() gets removed.

The MX27_IO_P2V() macro is still used. Here is the error when I try to remove it:

In file included from arch/arm/mach-imx/mach-imx27.c:17:0:
arch/arm/mach-imx/mach-imx27.c:30:16: error: implicit declaration of function ‘MX27_IO_P2V’; did you mean ‘MX35_IO_P2V’? [-Werror=implicit-function-declaration]
imx_map_entry(MX27, AIPI, MT_DEVICE),

                ^
arch/arm/mach-imx/hardware.h:103:13: note: in definition of macro
‘imx_map_entry’
  .virtual = soc ## _IO_P2V(soc ## _ ## name ## _BASE_ADDR), \
             ^~~

arch/arm/mach-imx/mach-imx27.c:30:16: error: initializer element is not constant
imx_map_entry(MX27, AIPI, MT_DEVICE),

Quoted 3 lines

What about the other constants in these files? Are there any remaining references to the MX*_BASE_ADDRESS, MX*_INT_*, and MX*_DMA_REQ_* constants after the series?

Some of these can go away. I will remove what is possible in v2.

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

#14 lore raw

Re: [PATCH 09/13] ARM: imx: Remove unused IO_ADDRESS() macros

Quoted 13 lines · Fabio Estevam
Quoted 2 lines · Arnd Bergmann

As far as I can tell, the MX27_IO_P2V() macro should be removed here as well if MX27_IO_ADDRESS() gets removed.

The MX27_IO_P2V() macro is still used. Here is the error when I try to remove it:

In file included from arch/arm/mach-imx/mach-imx27.c:17:0:
arch/arm/mach-imx/mach-imx27.c:30:16: error: implicit declaration of function ‘MX27_IO_P2V’; did you mean ‘MX35_IO_P2V’? [-Werror=implicit-function-declaration]
imx_map_entry(MX27, AIPI, MT_DEVICE),

Quoted 4 lines
                ^

arch/arm/mach-imx/hardware.h:103:13: note: in definition of macro ‘imx_map_entry’
.virtual = soc ## _IO_P2V(soc ## _ ## name ## _BASE_ADDR), \

Ah, right. My grep did not catch the static mappings:

arch/arm/mach-imx/mm-imx21.c-/* MX21 memory map definition */ arch/arm/mach-imx/mm-imx21.c-static struct map_desc imx21_io_desc[] __initdata = {

arch/arm/mach-imx/mm-imx21.c:   imx_map_entry(MX21, AIPI, MT_DEVICE),
arch/arm/mach-imx/mm-imx21.c:   imx_map_entry(MX21, SAHB1, MT_DEVICE),
arch/arm/mach-imx/mm-imx21.c:   imx_map_entry(MX21, X_MEMC, MT_DEVICE),

arch/arm/mach-imx/mm-imx21.c-};
--
arch/arm/mach-imx/mm-imx27.c-/* MX27 memory map definition */ arch/arm/mach-imx/mm-imx27.c-static struct map_desc imx27_io_desc[] __initdata = {

arch/arm/mach-imx/mm-imx27.c:   imx_map_entry(MX27, AIPI, MT_DEVICE),
arch/arm/mach-imx/mm-imx27.c:   imx_map_entry(MX27, SAHB1, MT_DEVICE),
arch/arm/mach-imx/mm-imx27.c:   imx_map_entry(MX27, X_MEMC, MT_DEVICE),
arch/arm/mach-imx/mm-imx27.c-};
--
arch/arm/mach-imx/mm-imx3.c-static struct map_desc mx31_io_desc[] __initdata = {
arch/arm/mach-imx/mm-imx3.c:    imx_map_entry(MX31, X_MEMC, MT_DEVICE),
arch/arm/mach-imx/mm-imx3.c:    imx_map_entry(MX31, AVIC, MT_DEVICE_NONSHARED),
arch/arm/mach-imx/mm-imx3.c:    imx_map_entry(MX31, AIPS1, MT_DEVICE_NONSHARED),
arch/arm/mach-imx/mm-imx3.c:    imx_map_entry(MX31, AIPS2, MT_DEVICE_NONSHARED),
arch/arm/mach-imx/mm-imx3.c:    imx_map_entry(MX31, SPBA0, MT_DEVICE_NONSHARED),

arch/arm/mach-imx/mm-imx3.c-};
--
arch/arm/mach-imx/mm-imx3.c-#ifdef CONFIG_SOC_IMX35 arch/arm/mach-imx/mm-imx3.c-static struct map_desc mx35_io_desc[] __initdata = {

arch/arm/mach-imx/mm-imx3.c:    imx_map_entry(MX35, X_MEMC, MT_DEVICE),
arch/arm/mach-imx/mm-imx3.c:    imx_map_entry(MX35, AVIC, MT_DEVICE_NONSHARED),
arch/arm/mach-imx/mm-imx3.c:    imx_map_entry(MX35, AIPS1, MT_DEVICE_NONSHARED),
arch/arm/mach-imx/mm-imx3.c:    imx_map_entry(MX35, AIPS2, MT_DEVICE_NONSHARED),
arch/arm/mach-imx/mm-imx3.c:    imx_map_entry(MX35, SPBA0, MT_DEVICE_NONSHARED),

arch/arm/mach-imx/mm-imx3.c-};

If all of the devices in here are now also mapped using of_iomap() or ioremap(), then the iotables are not strictly needed any more, but most of them are 1MB section sized, which helps slightly reduce TLB usage compared to non-section ioremap() mappings, so we might want to keep them anyway, possibly with the constants moved from the header into the mm-imx??.c files.

Adding Linus to Cc for further thoughts, as he was looking at the early io mappings recently.

Arnd

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

author reviewer
#15 lore raw

Re: [PATCH 09/13] ARM: imx: Remove unused IO_ADDRESS() macros

Hi Arnd,

Quoted 6 lines · Arnd Bergmann

If all of the devices in here are now also mapped using of_iomap() or ioremap(), then the iotables are not strictly needed any more, but most of them are 1MB section sized, which helps slightly reduce TLB usage compared to non-section ioremap() mappings, so we might want to keep them anyway, possibly with the constants moved from the header into the mm-imx??.c files.

Yes, I can move the definitions to the mm-imx files as a follow-up patch after this series gets applied.

Thanks,

Fabio Estevam

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

#16 lore raw

Re: [PATCH 09/13] ARM: imx: Remove unused IO_ADDRESS() macros

In reply to Arnd Bergmann
Quoted 9 lines · Arnd Bergmann

If all of the devices in here are now also mapped using of_iomap() or ioremap(), then the iotables are not strictly needed any more, but most of them are 1MB section sized, which helps slightly reduce TLB usage compared to non-section ioremap() mappings, so we might want to keep them anyway, possibly with the constants moved from the header into the mm-imx??.c files.

Adding Linus to Cc for further thoughts, as he was looking at the early io mappings recently.

There is early fixmap which I think should replace the iotables completely if we can, since it is generic kernel code. I was meaning to look into this "at some point".

The early fixmap seems to be page (0x1000) based so the iotables might be more efficient if using 1MB sections but I doubt that it is worth it.

The fixmaps are converted to proper ioremaps (at the exact same virtual address) later during boot.

At least that is how it looks to me :D

Yours,
Linus Walleij

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

#17 lore raw

Re: [PATCH 09/13] ARM: imx: Remove unused IO_ADDRESS() macros

Quoted 12 lines · Linus Walleij
Quoted 9 lines · Arnd Bergmann

If all of the devices in here are now also mapped using of_iomap() or ioremap(), then the iotables are not strictly needed any more, but most of them are 1MB section sized, which helps slightly reduce TLB usage compared to non-section ioremap() mappings, so we might want to keep them anyway, possibly with the constants moved from the header into the mm-imx??.c files.

Adding Linus to Cc for further thoughts, as he was looking at the early io mappings recently.

Quoted 7 lines

There is early fixmap which I think should replace the iotables completely if we can, since it is generic kernel code. I was meaning to look into this "at some point".

The early fixmap seems to be page (0x1000) based so the iotables might be more efficient if using 1MB sections but I doubt that it is worth it.

As far as I can tell, the 1MB section maps are the only reason this exists, as all of them are actually ioremap()ed later on before use.

I don't know if it makes a difference to real-world performance. Note that there are only 64 TLB entries on ARM926, or 128 on ARM1136, so avoiding the lookup/eviction at least theoretically should be measurably faster.

Arnd

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

#18 lore raw

Re: [PATCH 09/13] ARM: imx: Remove unused IO_ADDRESS() macros

Quoted 21 lines · Arnd Bergmann
Quoted 12 lines · Linus Walleij
Quoted 9 lines · Arnd Bergmann

If all of the devices in here are now also mapped using of_iomap() or ioremap(), then the iotables are not strictly needed any more, but most of them are 1MB section sized, which helps slightly reduce TLB usage compared to non-section ioremap() mappings, so we might want to keep them anyway, possibly with the constants moved from the header into the mm-imx??.c files.

Adding Linus to Cc for further thoughts, as he was looking at the early io mappings recently.

Quoted 7 lines

There is early fixmap which I think should replace the iotables completely if we can, since it is generic kernel code. I was meaning to look into this "at some point".

The early fixmap seems to be page (0x1000) based so the iotables might be more efficient if using 1MB sections but I doubt that it is worth it.

Quoted 8 lines

As far as I can tell, the 1MB section maps are the only reason this exists, as all of them are actually ioremap()ed later on before use.

I don't know if it makes a difference to real-world performance. Note that there are only 64 TLB entries on ARM926, or 128 on ARM1136, so avoiding the lookup/eviction at least theoretically should be measurably faster.

Hm someone should benchmark this. If this is the case we are kind of "punishing" all the all-out device tree platforms. It would make sense to then support an optional 1MB section mapping and make some of the crucial remaps (of_iomap_hot_io or something), such as for the timer and
interrupt controllers, use this by default since they are on the very-hot path.

Yours,
Linus Walleij

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

author reviewer
#19 lore raw

PATCH 10/13 clk: imx: imx27: Remove mx27_clocks_init()

In reply to Fabio Estevam

mx27_clocks_init() has been used to register clocks on i.MX27 non-devicetree platforms.

Now that i.MX is a devicetree-only platform, it is safe to remove mx27_clocks_init() as there are no more users.

---
 drivers/clk/imx/clk-imx27.c | 73 -------------------------------------
 1 file changed, 73 deletions(-)
drivers/clk/imx/clk-imx27.c +0 -73
index a3753067fc12..5585ded8b8c6 100644
@@ -181,79 +181,6 @@ static void __init _mx27_clocks_init(unsigned long fref)
 	imx_print_silicon_rev("i.MX27", mx27_revision());
 }
 
-int __init mx27_clocks_init(unsigned long fref)
-{
-	ccm = ioremap(MX27_CCM_BASE_ADDR, SZ_4K);
-
-	_mx27_clocks_init(fref);
-
-	clk_register_clkdev(clk[IMX27_CLK_UART1_IPG_GATE], "ipg", "imx21-uart.0");
-	clk_register_clkdev(clk[IMX27_CLK_PER1_GATE], "per", "imx21-uart.0");
-	clk_register_clkdev(clk[IMX27_CLK_UART2_IPG_GATE], "ipg", "imx21-uart.1");
-	clk_register_clkdev(clk[IMX27_CLK_PER1_GATE], "per", "imx21-uart.1");
-	clk_register_clkdev(clk[IMX27_CLK_UART3_IPG_GATE], "ipg", "imx21-uart.2");
-	clk_register_clkdev(clk[IMX27_CLK_PER1_GATE], "per", "imx21-uart.2");
-	clk_register_clkdev(clk[IMX27_CLK_UART4_IPG_GATE], "ipg", "imx21-uart.3");
-	clk_register_clkdev(clk[IMX27_CLK_PER1_GATE], "per", "imx21-uart.3");
-	clk_register_clkdev(clk[IMX27_CLK_UART5_IPG_GATE], "ipg", "imx21-uart.4");
-	clk_register_clkdev(clk[IMX27_CLK_PER1_GATE], "per", "imx21-uart.4");
-	clk_register_clkdev(clk[IMX27_CLK_UART6_IPG_GATE], "ipg", "imx21-uart.5");
-	clk_register_clkdev(clk[IMX27_CLK_PER1_GATE], "per", "imx21-uart.5");
-	clk_register_clkdev(clk[IMX27_CLK_GPT1_IPG_GATE], "ipg", "imx-gpt.0");
-	clk_register_clkdev(clk[IMX27_CLK_PER1_GATE], "per", "imx-gpt.0");
-	clk_register_clkdev(clk[IMX27_CLK_PER2_GATE], "per", "imx21-mmc.0");
-	clk_register_clkdev(clk[IMX27_CLK_SDHC1_IPG_GATE], "ipg", "imx21-mmc.0");
-	clk_register_clkdev(clk[IMX27_CLK_PER2_GATE], "per", "imx21-mmc.1");
-	clk_register_clkdev(clk[IMX27_CLK_SDHC2_IPG_GATE], "ipg", "imx21-mmc.1");
-	clk_register_clkdev(clk[IMX27_CLK_PER2_GATE], "per", "imx21-mmc.2");
-	clk_register_clkdev(clk[IMX27_CLK_SDHC2_IPG_GATE], "ipg", "imx21-mmc.2");
-	clk_register_clkdev(clk[IMX27_CLK_PER2_GATE], "per", "imx27-cspi.0");
-	clk_register_clkdev(clk[IMX27_CLK_CSPI1_IPG_GATE], "ipg", "imx27-cspi.0");
-	clk_register_clkdev(clk[IMX27_CLK_PER2_GATE], "per", "imx27-cspi.1");
-	clk_register_clkdev(clk[IMX27_CLK_CSPI2_IPG_GATE], "ipg", "imx27-cspi.1");
-	clk_register_clkdev(clk[IMX27_CLK_PER2_GATE], "per", "imx27-cspi.2");
-	clk_register_clkdev(clk[IMX27_CLK_CSPI3_IPG_GATE], "ipg", "imx27-cspi.2");
-	clk_register_clkdev(clk[IMX27_CLK_PER3_GATE], "per", "imx21-fb.0");
-	clk_register_clkdev(clk[IMX27_CLK_LCDC_IPG_GATE], "ipg", "imx21-fb.0");
-	clk_register_clkdev(clk[IMX27_CLK_LCDC_AHB_GATE], "ahb", "imx21-fb.0");
-	clk_register_clkdev(clk[IMX27_CLK_CSI_AHB_GATE], "ahb", "imx27-camera.0");
-	clk_register_clkdev(clk[IMX27_CLK_PER4_GATE], "per", "imx27-camera.0");
-	clk_register_clkdev(clk[IMX27_CLK_USB_DIV], "per", "imx-udc-mx27");
-	clk_register_clkdev(clk[IMX27_CLK_USB_IPG_GATE], "ipg", "imx-udc-mx27");
-	clk_register_clkdev(clk[IMX27_CLK_USB_AHB_GATE], "ahb", "imx-udc-mx27");
-	clk_register_clkdev(clk[IMX27_CLK_USB_DIV], "per", "mxc-ehci.0");
-	clk_register_clkdev(clk[IMX27_CLK_USB_IPG_GATE], "ipg", "mxc-ehci.0");
-	clk_register_clkdev(clk[IMX27_CLK_USB_AHB_GATE], "ahb", "mxc-ehci.0");
-	clk_register_clkdev(clk[IMX27_CLK_USB_DIV], "per", "mxc-ehci.1");
-	clk_register_clkdev(clk[IMX27_CLK_USB_IPG_GATE], "ipg", "mxc-ehci.1");
-	clk_register_clkdev(clk[IMX27_CLK_USB_AHB_GATE], "ahb", "mxc-ehci.1");
-	clk_register_clkdev(clk[IMX27_CLK_USB_DIV], "per", "mxc-ehci.2");
-	clk_register_clkdev(clk[IMX27_CLK_USB_IPG_GATE], "ipg", "mxc-ehci.2");
-	clk_register_clkdev(clk[IMX27_CLK_USB_AHB_GATE], "ahb", "mxc-ehci.2");
-	clk_register_clkdev(clk[IMX27_CLK_SSI1_IPG_GATE], NULL, "imx-ssi.0");
-	clk_register_clkdev(clk[IMX27_CLK_SSI2_IPG_GATE], NULL, "imx-ssi.1");
-	clk_register_clkdev(clk[IMX27_CLK_NFC_BAUD_GATE], NULL, "imx27-nand.0");
-	clk_register_clkdev(clk[IMX27_CLK_VPU_BAUD_GATE], "per", "coda-imx27.0");
-	clk_register_clkdev(clk[IMX27_CLK_VPU_AHB_GATE], "ahb", "coda-imx27.0");
-	clk_register_clkdev(clk[IMX27_CLK_DMA_AHB_GATE], "ahb", "imx27-dma");
-	clk_register_clkdev(clk[IMX27_CLK_DMA_IPG_GATE], "ipg", "imx27-dma");
-	clk_register_clkdev(clk[IMX27_CLK_FEC_IPG_GATE], "ipg", "imx27-fec.0");
-	clk_register_clkdev(clk[IMX27_CLK_FEC_AHB_GATE], "ahb", "imx27-fec.0");
-	clk_register_clkdev(clk[IMX27_CLK_WDOG_IPG_GATE], NULL, "imx2-wdt.0");
-	clk_register_clkdev(clk[IMX27_CLK_I2C1_IPG_GATE], NULL, "imx21-i2c.0");
-	clk_register_clkdev(clk[IMX27_CLK_I2C2_IPG_GATE], NULL, "imx21-i2c.1");
-	clk_register_clkdev(clk[IMX27_CLK_OWIRE_IPG_GATE], NULL, "mxc_w1.0");
-	clk_register_clkdev(clk[IMX27_CLK_KPP_IPG_GATE], NULL, "imx-keypad");
-	clk_register_clkdev(clk[IMX27_CLK_EMMA_AHB_GATE], "emma-ahb", "imx27-camera.0");
-	clk_register_clkdev(clk[IMX27_CLK_EMMA_IPG_GATE], "emma-ipg", "imx27-camera.0");
-	clk_register_clkdev(clk[IMX27_CLK_EMMA_AHB_GATE], "ahb", "m2m-emmaprp.0");
-	clk_register_clkdev(clk[IMX27_CLK_EMMA_IPG_GATE], "ipg", "m2m-emmaprp.0");
-
-	mxc_timer_init(MX27_GPT1_BASE_ADDR, MX27_INT_GPT1, GPT_TYPE_IMX21);
-
-	return 0;
-}
-
 static void __init mx27_clocks_init_dt(struct device_node *np)
 {
 	struct device_node *refnp;
Signature · 7 lines
2.17.1


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
author reviewer
#20 lore raw

PATCH 11/13 clk: imx: imx31: Remove mx31_clocks_init()

In reply to Fabio Estevam

mx31_clocks_init() has been used to register clocks on i.MX31 non-devicetree platforms.

Now that i.MX is a devicetree-only platform, it is safe to remove mx31_clocks_init() as there are no more users.

---
 drivers/clk/imx/clk-imx31.c | 71 -------------------------------------
 1 file changed, 71 deletions(-)
drivers/clk/imx/clk-imx31.c +0 -71
index 4bb05e440cdd..7b13fb57d842 100644
@@ -132,77 +132,6 @@ static void __init _mx31_clocks_init(void __iomem *base, unsigned long fref)
 	clk_disable_unprepare(clk[iim_gate]);
 }
 
-int __init mx31_clocks_init(unsigned long fref)
-{
-	void __iomem *base;
-
-	base = ioremap(MX31_CCM_BASE_ADDR, SZ_4K);
-	if (!base)
-		panic("%s: failed to map registers\n", __func__);
-
-	_mx31_clocks_init(base, fref);
-
-	clk_register_clkdev(clk[gpt_gate], "per", "imx-gpt.0");
-	clk_register_clkdev(clk[ipg], "ipg", "imx-gpt.0");
-	clk_register_clkdev(clk[cspi1_gate], NULL, "imx31-cspi.0");
-	clk_register_clkdev(clk[cspi2_gate], NULL, "imx31-cspi.1");
-	clk_register_clkdev(clk[cspi3_gate], NULL, "imx31-cspi.2");
-	clk_register_clkdev(clk[pwm_gate], "pwm", NULL);
-	clk_register_clkdev(clk[wdog_gate], NULL, "imx2-wdt.0");
-	clk_register_clkdev(clk[ckil], "ref", "imx21-rtc");
-	clk_register_clkdev(clk[rtc_gate], "ipg", "imx21-rtc");
-	clk_register_clkdev(clk[epit1_gate], "epit", NULL);
-	clk_register_clkdev(clk[epit2_gate], "epit", NULL);
-	clk_register_clkdev(clk[nfc], NULL, "imx27-nand.0");
-	clk_register_clkdev(clk[ipu_gate], NULL, "ipu-core");
-	clk_register_clkdev(clk[ipu_gate], NULL, "mx3_sdc_fb");
-	clk_register_clkdev(clk[kpp_gate], NULL, "imx-keypad");
-	clk_register_clkdev(clk[usb_div_post], "per", "mxc-ehci.0");
-	clk_register_clkdev(clk[usb_gate], "ahb", "mxc-ehci.0");
-	clk_register_clkdev(clk[ipg], "ipg", "mxc-ehci.0");
-	clk_register_clkdev(clk[usb_div_post], "per", "mxc-ehci.1");
-	clk_register_clkdev(clk[usb_gate], "ahb", "mxc-ehci.1");
-	clk_register_clkdev(clk[ipg], "ipg", "mxc-ehci.1");
-	clk_register_clkdev(clk[usb_div_post], "per", "mxc-ehci.2");
-	clk_register_clkdev(clk[usb_gate], "ahb", "mxc-ehci.2");
-	clk_register_clkdev(clk[ipg], "ipg", "mxc-ehci.2");
-	clk_register_clkdev(clk[usb_div_post], "per", "imx-udc-mx27");
-	clk_register_clkdev(clk[usb_gate], "ahb", "imx-udc-mx27");
-	clk_register_clkdev(clk[ipg], "ipg", "imx-udc-mx27");
-	clk_register_clkdev(clk[csi_gate], NULL, "mx3-camera.0");
-	/* i.mx31 has the i.mx21 type uart */
-	clk_register_clkdev(clk[uart1_gate], "per", "imx21-uart.0");
-	clk_register_clkdev(clk[ipg], "ipg", "imx21-uart.0");
-	clk_register_clkdev(clk[uart2_gate], "per", "imx21-uart.1");
-	clk_register_clkdev(clk[ipg], "ipg", "imx21-uart.1");
-	clk_register_clkdev(clk[uart3_gate], "per", "imx21-uart.2");
-	clk_register_clkdev(clk[ipg], "ipg", "imx21-uart.2");
-	clk_register_clkdev(clk[uart4_gate], "per", "imx21-uart.3");
-	clk_register_clkdev(clk[ipg], "ipg", "imx21-uart.3");
-	clk_register_clkdev(clk[uart5_gate], "per", "imx21-uart.4");
-	clk_register_clkdev(clk[ipg], "ipg", "imx21-uart.4");
-	clk_register_clkdev(clk[i2c1_gate], NULL, "imx21-i2c.0");
-	clk_register_clkdev(clk[i2c2_gate], NULL, "imx21-i2c.1");
-	clk_register_clkdev(clk[i2c3_gate], NULL, "imx21-i2c.2");
-	clk_register_clkdev(clk[owire_gate], NULL, "mxc_w1.0");
-	clk_register_clkdev(clk[sdhc1_gate], NULL, "imx31-mmc.0");
-	clk_register_clkdev(clk[sdhc2_gate], NULL, "imx31-mmc.1");
-	clk_register_clkdev(clk[ssi1_gate], NULL, "imx-ssi.0");
-	clk_register_clkdev(clk[ssi2_gate], NULL, "imx-ssi.1");
-	clk_register_clkdev(clk[firi_gate], "firi", NULL);
-	clk_register_clkdev(clk[ata_gate], NULL, "pata_imx");
-	clk_register_clkdev(clk[rtic_gate], "rtic", NULL);
-	clk_register_clkdev(clk[rng_gate], NULL, "mxc_rnga");
-	clk_register_clkdev(clk[sdma_gate], NULL, "imx31-sdma");
-	clk_register_clkdev(clk[iim_gate], "iim", NULL);
-
-
-	imx_register_uart_clocks(uart_clks);
-	mxc_timer_init(MX31_GPT1_BASE_ADDR, MX31_INT_GPT, GPT_TYPE_IMX31);
-
-	return 0;
-}
-
 static void __init mx31_clocks_init_dt(struct device_node *np)
 {
 	struct device_node *osc_np;
Signature · 7 lines
2.17.1


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
author reviewer
#21 lore raw

PATCH 12/13 clk: imx: imx35: Remove mx35_clocks_init()

In reply to Fabio Estevam

mx35_clocks_init() has been used to register clocks on i.MX35 non-devicetree platforms.

Now that i.MX is a devicetree-only platform, it is safe to remove mx35_clocks_init() as there are no more users.

---
 drivers/clk/imx/clk-imx35.c | 68 -------------------------------------
 1 file changed, 68 deletions(-)
drivers/clk/imx/clk-imx35.c +0 -68
index e595f559907f..c1df03665c09 100644
@@ -248,74 +248,6 @@ static void __init _mx35_clocks_init(void)
 	imx_print_silicon_rev("i.MX35", mx35_revision());
 }
 
-int __init mx35_clocks_init(void)
-{
-	_mx35_clocks_init();
-
-	clk_register_clkdev(clk[pata_gate], NULL, "pata_imx");
-	clk_register_clkdev(clk[can1_gate], NULL, "flexcan.0");
-	clk_register_clkdev(clk[can2_gate], NULL, "flexcan.1");
-	clk_register_clkdev(clk[cspi1_gate], "per", "imx35-cspi.0");
-	clk_register_clkdev(clk[cspi1_gate], "ipg", "imx35-cspi.0");
-	clk_register_clkdev(clk[cspi2_gate], "per", "imx35-cspi.1");
-	clk_register_clkdev(clk[cspi2_gate], "ipg", "imx35-cspi.1");
-	clk_register_clkdev(clk[epit1_gate], NULL, "imx-epit.0");
-	clk_register_clkdev(clk[epit2_gate], NULL, "imx-epit.1");
-	clk_register_clkdev(clk[esdhc1_gate], "per", "sdhci-esdhc-imx35.0");
-	clk_register_clkdev(clk[ipg], "ipg", "sdhci-esdhc-imx35.0");
-	clk_register_clkdev(clk[ahb], "ahb", "sdhci-esdhc-imx35.0");
-	clk_register_clkdev(clk[esdhc2_gate], "per", "sdhci-esdhc-imx35.1");
-	clk_register_clkdev(clk[ipg], "ipg", "sdhci-esdhc-imx35.1");
-	clk_register_clkdev(clk[ahb], "ahb", "sdhci-esdhc-imx35.1");
-	clk_register_clkdev(clk[esdhc3_gate], "per", "sdhci-esdhc-imx35.2");
-	clk_register_clkdev(clk[ipg], "ipg", "sdhci-esdhc-imx35.2");
-	clk_register_clkdev(clk[ahb], "ahb", "sdhci-esdhc-imx35.2");
-	/* i.mx35 has the i.mx27 type fec */
-	clk_register_clkdev(clk[fec_gate], NULL, "imx27-fec.0");
-	clk_register_clkdev(clk[gpt_gate], "per", "imx-gpt.0");
-	clk_register_clkdev(clk[ipg], "ipg", "imx-gpt.0");
-	clk_register_clkdev(clk[i2c1_gate], NULL, "imx21-i2c.0");
-	clk_register_clkdev(clk[i2c2_gate], NULL, "imx21-i2c.1");
-	clk_register_clkdev(clk[i2c3_gate], NULL, "imx21-i2c.2");
-	clk_register_clkdev(clk[ipu_gate], NULL, "ipu-core");
-	clk_register_clkdev(clk[ipu_gate], NULL, "mx3_sdc_fb");
-	clk_register_clkdev(clk[kpp_gate], NULL, "imx-keypad");
-	clk_register_clkdev(clk[owire_gate], NULL, "mxc_w1");
-	clk_register_clkdev(clk[sdma_gate], NULL, "imx35-sdma");
-	clk_register_clkdev(clk[ssi1_gate], NULL, "imx-ssi.0");
-	clk_register_clkdev(clk[ssi2_gate], NULL, "imx-ssi.1");
-	/* i.mx35 has the i.mx21 type uart */
-	clk_register_clkdev(clk[uart1_gate], "per", "imx21-uart.0");
-	clk_register_clkdev(clk[ipg], "ipg", "imx21-uart.0");
-	clk_register_clkdev(clk[uart2_gate], "per", "imx21-uart.1");
-	clk_register_clkdev(clk[ipg], "ipg", "imx21-uart.1");
-	clk_register_clkdev(clk[uart3_gate], "per", "imx21-uart.2");
-	clk_register_clkdev(clk[ipg], "ipg", "imx21-uart.2");
-	/* i.mx35 has the i.mx21 type rtc */
-	clk_register_clkdev(clk[ckil], "ref", "imx21-rtc");
-	clk_register_clkdev(clk[rtc_gate], "ipg", "imx21-rtc");
-	clk_register_clkdev(clk[usb_div], "per", "mxc-ehci.0");
-	clk_register_clkdev(clk[ipg], "ipg", "mxc-ehci.0");
-	clk_register_clkdev(clk[usbotg_gate], "ahb", "mxc-ehci.0");
-	clk_register_clkdev(clk[usb_div], "per", "mxc-ehci.1");
-	clk_register_clkdev(clk[ipg], "ipg", "mxc-ehci.1");
-	clk_register_clkdev(clk[usbotg_gate], "ahb", "mxc-ehci.1");
-	clk_register_clkdev(clk[usb_div], "per", "mxc-ehci.2");
-	clk_register_clkdev(clk[ipg], "ipg", "mxc-ehci.2");
-	clk_register_clkdev(clk[usbotg_gate], "ahb", "mxc-ehci.2");
-	clk_register_clkdev(clk[usb_div], "per", "imx-udc-mx27");
-	clk_register_clkdev(clk[ipg], "ipg", "imx-udc-mx27");
-	clk_register_clkdev(clk[usbotg_gate], "ahb", "imx-udc-mx27");
-	clk_register_clkdev(clk[wdog_gate], NULL, "imx2-wdt.0");
-	clk_register_clkdev(clk[nfc_div], NULL, "imx25-nand.0");
-	clk_register_clkdev(clk[csi_gate], NULL, "mx3-camera.0");
-	clk_register_clkdev(clk[admux_gate], "audmux", NULL);
-
-	mxc_timer_init(MX35_GPT1_BASE_ADDR, MX35_INT_GPT, GPT_TYPE_IMX31);
-
-	return 0;
-}
-
 static void __init mx35_clocks_init_dt(struct device_node *ccm_node)
 {
 	_mx35_clocks_init();
Signature · 7 lines
2.17.1


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
author reviewer
#22 lore raw

PATCH 13/13 clk: imx: imx21: Remove clock driver

In reply to Fabio Estevam

As i.MX21 support has been removed, get rid of its clock driver too.

---
 drivers/clk/imx/Kconfig     |   4 -
 drivers/clk/imx/Makefile    |   1 -
 drivers/clk/imx/clk-imx21.c | 171 ------------------------------------
 3 files changed, 176 deletions(-)
 delete mode 100644 drivers/clk/imx/clk-imx21.c
drivers/clk/imx/Kconfig +0 -4
index e7defbac0936..3b393cb07295 100644
@@ -13,10 +13,6 @@ config CLK_IMX1
 	def_bool SOC_IMX1
 	select MXC_CLK
 
-config CLK_IMX21
-	def_bool SOC_IMX21
-	select MXC_CLK
-
 config CLK_IMX25
 	def_bool SOC_IMX25
 	select MXC_CLK
drivers/clk/imx/Makefile +0 -1
index 79e53f2257c1..dd6a737d060b 100644
@@ -31,7 +31,6 @@ clk-imx-scu-$(CONFIG_CLK_IMX8QXP) += clk-scu.o clk-imx8qxp.o
 clk-imx-lpcg-scu-$(CONFIG_CLK_IMX8QXP) += clk-lpcg-scu.o clk-imx8qxp-lpcg.o
 
 obj-$(CONFIG_CLK_IMX1)   += clk-imx1.o
-obj-$(CONFIG_CLK_IMX21)  += clk-imx21.o
 obj-$(CONFIG_CLK_IMX25)  += clk-imx25.o
 obj-$(CONFIG_CLK_IMX27)  += clk-imx27.o
 obj-$(CONFIG_CLK_IMX31)  += clk-imx31.o
drivers/clk/imx/clk-imx21.c deleted +0 -171

171 lines not on this page · raw message

Signature · 7 lines
2.17.1


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel