* [PATCH 1/3] ARM: mach-imx: clk-imx51-imx53: Retrieve base address and irq from dt
@ 2013-10-01 3:21 Fabio Estevam
2013-10-01 3:21 ` [PATCH 2/3] ARM: mach-imx: mm-imx5: Retrieve tzic base address " Fabio Estevam
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Fabio Estevam @ 2013-10-01 3:21 UTC (permalink / raw)
To: linux-arm-kernel
From: Fabio Estevam <fabio.estevam@freescale.com>
As mx53 is a dt-only SoC, we should retrieve the gpt base address and irq
from the device tree, instead of using the old MX53_IO_ADDRESS method.
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
arch/arm/mach-imx/clk-imx51-imx53.c | 15 +++++++++++----
1 file changed, 11 insertions(+), 4 deletions(-)
diff --git a/arch/arm/mach-imx/clk-imx51-imx53.c b/arch/arm/mach-imx/clk-imx51-imx53.c
index 7c0dc45..03ca2e3 100644
--- a/arch/arm/mach-imx/clk-imx51-imx53.c
+++ b/arch/arm/mach-imx/clk-imx51-imx53.c
@@ -13,6 +13,9 @@
#include <linux/clkdev.h>
#include <linux/of.h>
#include <linux/err.h>
+#include <linux/of.h>
+#include <linux/of_address.h>
+#include <linux/of_irq.h>
#include "crm-regs-imx5.h"
#include "clk.h"
@@ -468,9 +471,10 @@ int __init mx51_clocks_init(unsigned long rate_ckil, unsigned long rate_osc,
int __init mx53_clocks_init(unsigned long rate_ckil, unsigned long rate_osc,
unsigned long rate_ckih1, unsigned long rate_ckih2)
{
- int i;
+ int i, irq;
unsigned long r;
struct device_node *np;
+ void __iomem *base;
clk[pll1_sw] = imx_clk_pllv2("pll1_sw", "osc", MX53_DPLL1_BASE);
clk[pll2_sw] = imx_clk_pllv2("pll2_sw", "osc", MX53_DPLL2_BASE);
@@ -557,9 +561,6 @@ int __init mx53_clocks_init(unsigned long rate_ckil, unsigned long rate_osc,
clk_set_rate(clk[esdhc_a_podf], 200000000);
clk_set_rate(clk[esdhc_b_podf], 200000000);
- /* System timer */
- mxc_timer_init(MX53_IO_ADDRESS(MX53_GPT1_BASE_ADDR), MX53_INT_GPT);
-
clk_prepare_enable(clk[iim_gate]);
imx_print_silicon_rev("i.MX53", mx53_revision());
clk_disable_unprepare(clk[iim_gate]);
@@ -567,6 +568,12 @@ int __init mx53_clocks_init(unsigned long rate_ckil, unsigned long rate_osc,
r = clk_round_rate(clk[usboh3_per_gate], 54000000);
clk_set_rate(clk[usboh3_per_gate], r);
+ np = of_find_compatible_node(NULL, NULL, "fsl,imx53-gpt");
+ base = of_iomap(np, 0);
+ WARN_ON(!base);
+ irq = irq_of_parse_and_map(np, 0);
+ mxc_timer_init(base, irq);
+
return 0;
}
--
1.8.1.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/3] ARM: mach-imx: mm-imx5: Retrieve tzic base address from dt
2013-10-01 3:21 [PATCH 1/3] ARM: mach-imx: clk-imx51-imx53: Retrieve base address and irq from dt Fabio Estevam
@ 2013-10-01 3:21 ` Fabio Estevam
2013-10-01 3:21 ` [PATCH 3/3] ARM: mach-imx: mm-imx5: Retrieve iomuxc " Fabio Estevam
2013-10-05 6:52 ` [PATCH 1/3] ARM: mach-imx: clk-imx51-imx53: Retrieve base address and irq " Shawn Guo
2 siblings, 0 replies; 4+ messages in thread
From: Fabio Estevam @ 2013-10-01 3:21 UTC (permalink / raw)
To: linux-arm-kernel
From: Fabio Estevam <fabio.estevam@freescale.com>
As mx53 is a dt-only SoC, we should retrieve the tzic base address from the
device tree, instead of using the old MX53_IO_ADDRESS method.
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
arch/arm/mach-imx/mm-imx5.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/arch/arm/mach-imx/mm-imx5.c b/arch/arm/mach-imx/mm-imx5.c
index eb3cce3..2cafcf0 100644
--- a/arch/arm/mach-imx/mm-imx5.c
+++ b/arch/arm/mach-imx/mm-imx5.c
@@ -15,6 +15,7 @@
#include <linux/init.h>
#include <linux/clk.h>
#include <linux/pinctrl/machine.h>
+#include <linux/of_address.h>
#include <asm/mach/map.h>
@@ -100,7 +101,14 @@ void __init mx51_init_irq(void)
void __init mx53_init_irq(void)
{
- tzic_init_irq(MX53_IO_ADDRESS(MX53_TZIC_BASE_ADDR));
+ struct device_node *np;
+ void __iomem *base;
+
+ np = of_find_compatible_node(NULL, NULL, "fsl,imx53-tzic");
+ base = of_iomap(np, 0);
+ WARN_ON(!base);
+
+ tzic_init_irq(base);
}
static struct sdma_platform_data imx51_sdma_pdata __initdata = {
--
1.8.1.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 3/3] ARM: mach-imx: mm-imx5: Retrieve iomuxc base address from dt
2013-10-01 3:21 [PATCH 1/3] ARM: mach-imx: clk-imx51-imx53: Retrieve base address and irq from dt Fabio Estevam
2013-10-01 3:21 ` [PATCH 2/3] ARM: mach-imx: mm-imx5: Retrieve tzic base address " Fabio Estevam
@ 2013-10-01 3:21 ` Fabio Estevam
2013-10-05 6:52 ` [PATCH 1/3] ARM: mach-imx: clk-imx51-imx53: Retrieve base address and irq " Shawn Guo
2 siblings, 0 replies; 4+ messages in thread
From: Fabio Estevam @ 2013-10-01 3:21 UTC (permalink / raw)
To: linux-arm-kernel
From: Fabio Estevam <fabio.estevam@freescale.com>
As mx53 is a dt-only SoC, we should retrieve the iomuxc base address from the
device tree, instead of using the old MX53_IO_ADDRESS method.
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
arch/arm/mach-imx/mm-imx5.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/arch/arm/mach-imx/mm-imx5.c b/arch/arm/mach-imx/mm-imx5.c
index 2cafcf0..d1d5260 100644
--- a/arch/arm/mach-imx/mm-imx5.c
+++ b/arch/arm/mach-imx/mm-imx5.c
@@ -89,8 +89,15 @@ void __init imx51_init_early(void)
void __init imx53_init_early(void)
{
+ struct device_node *np;
+ void __iomem *base;
+
mxc_set_cpu_type(MXC_CPU_MX53);
- mxc_iomux_v3_init(MX53_IO_ADDRESS(MX53_IOMUXC_BASE_ADDR));
+
+ np = of_find_compatible_node(NULL, NULL, "fsl,imx53-iomuxc");
+ base = of_iomap(np, 0);
+ WARN_ON(!base);
+ mxc_iomux_v3_init(base);
imx_src_init();
}
--
1.8.1.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 1/3] ARM: mach-imx: clk-imx51-imx53: Retrieve base address and irq from dt
2013-10-01 3:21 [PATCH 1/3] ARM: mach-imx: clk-imx51-imx53: Retrieve base address and irq from dt Fabio Estevam
2013-10-01 3:21 ` [PATCH 2/3] ARM: mach-imx: mm-imx5: Retrieve tzic base address " Fabio Estevam
2013-10-01 3:21 ` [PATCH 3/3] ARM: mach-imx: mm-imx5: Retrieve iomuxc " Fabio Estevam
@ 2013-10-05 6:52 ` Shawn Guo
2 siblings, 0 replies; 4+ messages in thread
From: Shawn Guo @ 2013-10-05 6:52 UTC (permalink / raw)
To: linux-arm-kernel
On Tue, Oct 01, 2013 at 12:21:12AM -0300, Fabio Estevam wrote:
> From: Fabio Estevam <fabio.estevam@freescale.com>
>
> As mx53 is a dt-only SoC, we should retrieve the gpt base address and irq
> from the device tree, instead of using the old MX53_IO_ADDRESS method.
>
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Applied all 3, thanks.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-10-05 6:52 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-01 3:21 [PATCH 1/3] ARM: mach-imx: clk-imx51-imx53: Retrieve base address and irq from dt Fabio Estevam
2013-10-01 3:21 ` [PATCH 2/3] ARM: mach-imx: mm-imx5: Retrieve tzic base address " Fabio Estevam
2013-10-01 3:21 ` [PATCH 3/3] ARM: mach-imx: mm-imx5: Retrieve iomuxc " Fabio Estevam
2013-10-05 6:52 ` [PATCH 1/3] ARM: mach-imx: clk-imx51-imx53: Retrieve base address and irq " Shawn Guo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).