All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: linux-arm-kernel@lists.infradead.org
Cc: linux-kernel@vger.kernel.org, Kukjin Kim <kgene.kim@samsung.com>,
	linux-samsung-soc@vger.kernel.org, Arnd Bergmann <arnd@arndb.de>,
	Thomas Gleixner <tglx@linutronix.de>,
	John Stultz <john.stultz@linaro.org>
Subject: [PATCH 24/30] clocksource: exynos_mct: remove platform header dependency
Date: Thu, 11 Apr 2013 02:05:06 +0200	[thread overview]
Message-ID: <1365638712-1028578-25-git-send-email-arnd@arndb.de> (raw)
In-Reply-To: <1365638712-1028578-1-git-send-email-arnd@arndb.de>

For the non-DT case, the mct_init() function requires access
to a couple of platform specific constants, but cannot include
the header files in case we are building for multiplatform.

This changes the interface to the platform so we pass all
the necessary data as arguments to mct_init.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: John Stultz <john.stultz@linaro.org>
---
 arch/arm/mach-exynos/common.c    |  2 +-
 arch/arm/mach-exynos/common.h    |  2 +-
 drivers/clocksource/exynos_mct.c | 21 ++++++---------------
 3 files changed, 8 insertions(+), 17 deletions(-)

diff --git a/arch/arm/mach-exynos/common.c b/arch/arm/mach-exynos/common.c
index 87b2e06..8e85d6c 100644
--- a/arch/arm/mach-exynos/common.c
+++ b/arch/arm/mach-exynos/common.c
@@ -448,7 +448,7 @@ void __init exynos_init_time(void)
 		exynos4_clk_init(NULL, !soc_is_exynos4210(), S5P_VA_CMU, readl(S5P_VA_CHIPID + 8) & 1);
 		exynos4_clk_register_fixed_ext(xxti_f, xusbxti_f);
 #endif
-		mct_init();
+		mct_init(S5P_VA_SYSTIMER, EXYNOS4_IRQ_MCT_G0, EXYNOS4_IRQ_MCT_L0, EXYNOS4_IRQ_MCT_L1);
 	}
 }
 
diff --git a/arch/arm/mach-exynos/common.h b/arch/arm/mach-exynos/common.h
index 9832e03..f426a5b 100644
--- a/arch/arm/mach-exynos/common.h
+++ b/arch/arm/mach-exynos/common.h
@@ -14,7 +14,7 @@
 
 #include <linux/of.h>
 
-extern void mct_init(void);
+void mct_init(void __iomem *base, int irq_g0, int irq_l0, int irq_l1);
 void exynos_init_time(void);
 extern unsigned long xxti_f, xusbxti_f;
 
diff --git a/drivers/clocksource/exynos_mct.c b/drivers/clocksource/exynos_mct.c
index 020ba55..88ff404 100644
--- a/drivers/clocksource/exynos_mct.c
+++ b/drivers/clocksource/exynos_mct.c
@@ -26,11 +26,6 @@
 
 #include <asm/arch_timer.h>
 #include <asm/localtimer.h>
-
-#include <plat/cpu.h>
-
-#include <mach/map.h>
-#include <mach/irqs.h>
 #include <asm/mach/time.h>
 
 #define EXYNOS4_MCTREG(x)		(x)
@@ -511,18 +506,14 @@ static void __init exynos4_timer_resources(struct device_node *np, void __iomem
 #endif /* CONFIG_LOCAL_TIMERS */
 }
 
-void __init mct_init(void)
+void __init mct_init(void __iomem *base, int irq_g0, int irq_l0, int irq_l1)
 {
-	if (soc_is_exynos4210()) {
-		mct_irqs[MCT_G0_IRQ] = EXYNOS4_IRQ_MCT_G0;
-		mct_irqs[MCT_L0_IRQ] = EXYNOS4_IRQ_MCT_L0;
-		mct_irqs[MCT_L1_IRQ] = EXYNOS4_IRQ_MCT_L1;
-		mct_int_type = MCT_INT_SPI;
-	} else {
-		panic("unable to determine mct controller type\n");
-	}
+	mct_irqs[MCT_G0_IRQ] = irq_g0;
+	mct_irqs[MCT_L0_IRQ] = irq_l0;
+	mct_irqs[MCT_L1_IRQ] = irq_l1;
+	mct_int_type = MCT_INT_SPI;
 
-	exynos4_timer_resources(NULL, S5P_VA_SYSTIMER);
+	exynos4_timer_resources(NULL, base);
 	exynos4_clocksource_init();
 	exynos4_clockevent_init();
 }
-- 
1.8.1.2


WARNING: multiple messages have this Message-ID (diff)
From: arnd@arndb.de (Arnd Bergmann)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 24/30] clocksource: exynos_mct: remove platform header dependency
Date: Thu, 11 Apr 2013 02:05:06 +0200	[thread overview]
Message-ID: <1365638712-1028578-25-git-send-email-arnd@arndb.de> (raw)
In-Reply-To: <1365638712-1028578-1-git-send-email-arnd@arndb.de>

For the non-DT case, the mct_init() function requires access
to a couple of platform specific constants, but cannot include
the header files in case we are building for multiplatform.

This changes the interface to the platform so we pass all
the necessary data as arguments to mct_init.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: John Stultz <john.stultz@linaro.org>
---
 arch/arm/mach-exynos/common.c    |  2 +-
 arch/arm/mach-exynos/common.h    |  2 +-
 drivers/clocksource/exynos_mct.c | 21 ++++++---------------
 3 files changed, 8 insertions(+), 17 deletions(-)

diff --git a/arch/arm/mach-exynos/common.c b/arch/arm/mach-exynos/common.c
index 87b2e06..8e85d6c 100644
--- a/arch/arm/mach-exynos/common.c
+++ b/arch/arm/mach-exynos/common.c
@@ -448,7 +448,7 @@ void __init exynos_init_time(void)
 		exynos4_clk_init(NULL, !soc_is_exynos4210(), S5P_VA_CMU, readl(S5P_VA_CHIPID + 8) & 1);
 		exynos4_clk_register_fixed_ext(xxti_f, xusbxti_f);
 #endif
-		mct_init();
+		mct_init(S5P_VA_SYSTIMER, EXYNOS4_IRQ_MCT_G0, EXYNOS4_IRQ_MCT_L0, EXYNOS4_IRQ_MCT_L1);
 	}
 }
 
diff --git a/arch/arm/mach-exynos/common.h b/arch/arm/mach-exynos/common.h
index 9832e03..f426a5b 100644
--- a/arch/arm/mach-exynos/common.h
+++ b/arch/arm/mach-exynos/common.h
@@ -14,7 +14,7 @@
 
 #include <linux/of.h>
 
-extern void mct_init(void);
+void mct_init(void __iomem *base, int irq_g0, int irq_l0, int irq_l1);
 void exynos_init_time(void);
 extern unsigned long xxti_f, xusbxti_f;
 
diff --git a/drivers/clocksource/exynos_mct.c b/drivers/clocksource/exynos_mct.c
index 020ba55..88ff404 100644
--- a/drivers/clocksource/exynos_mct.c
+++ b/drivers/clocksource/exynos_mct.c
@@ -26,11 +26,6 @@
 
 #include <asm/arch_timer.h>
 #include <asm/localtimer.h>
-
-#include <plat/cpu.h>
-
-#include <mach/map.h>
-#include <mach/irqs.h>
 #include <asm/mach/time.h>
 
 #define EXYNOS4_MCTREG(x)		(x)
@@ -511,18 +506,14 @@ static void __init exynos4_timer_resources(struct device_node *np, void __iomem
 #endif /* CONFIG_LOCAL_TIMERS */
 }
 
-void __init mct_init(void)
+void __init mct_init(void __iomem *base, int irq_g0, int irq_l0, int irq_l1)
 {
-	if (soc_is_exynos4210()) {
-		mct_irqs[MCT_G0_IRQ] = EXYNOS4_IRQ_MCT_G0;
-		mct_irqs[MCT_L0_IRQ] = EXYNOS4_IRQ_MCT_L0;
-		mct_irqs[MCT_L1_IRQ] = EXYNOS4_IRQ_MCT_L1;
-		mct_int_type = MCT_INT_SPI;
-	} else {
-		panic("unable to determine mct controller type\n");
-	}
+	mct_irqs[MCT_G0_IRQ] = irq_g0;
+	mct_irqs[MCT_L0_IRQ] = irq_l0;
+	mct_irqs[MCT_L1_IRQ] = irq_l1;
+	mct_int_type = MCT_INT_SPI;
 
-	exynos4_timer_resources(NULL, S5P_VA_SYSTIMER);
+	exynos4_timer_resources(NULL, base);
 	exynos4_clocksource_init();
 	exynos4_clockevent_init();
 }
-- 
1.8.1.2

  parent reply	other threads:[~2013-04-11  0:12 UTC|newest]

Thread overview: 167+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-11  0:04 [PATCH 00/30] ARM: exynos multiplatform support Arnd Bergmann
2013-04-11  0:04 ` Arnd Bergmann
2013-04-11  0:04 ` Arnd Bergmann
2013-04-11  0:04 ` Arnd Bergmann
2013-04-11  0:04 ` [PATCH 01/30] ARM: exynos: introduce EXYNOS_ATAGS symbol Arnd Bergmann
2013-04-11  0:04   ` Arnd Bergmann
2013-04-11  0:04 ` [PATCH 02/30] ARM: exynos: prepare for sparse IRQ Arnd Bergmann
2013-04-11  0:04   ` Arnd Bergmann
2013-04-11  0:04   ` Arnd Bergmann
2013-04-11  0:17   ` Kyungmin Park
2013-04-11  0:17     ` Kyungmin Park
2013-04-11  0:04 ` [PATCH 03/30] ARM: exynos: move debug-macro.S to include/debug/ Arnd Bergmann
2013-04-11  0:04   ` Arnd Bergmann
2013-04-11  0:04 ` [PATCH 04/30] ARM: samsung: move mfc device definition to s5p-dev-mfc.c Arnd Bergmann
2013-04-11  0:04   ` Arnd Bergmann
2013-04-11  0:04   ` Arnd Bergmann
2013-04-11  0:04 ` [PATCH 05/30] tty: serial/samsung: prepare for common clock API Arnd Bergmann
2013-04-11  0:04   ` Arnd Bergmann
2013-04-11  0:04 ` [PATCH 06/30] tty: serial/samsung: make register definitions global Arnd Bergmann
2013-04-11  0:04   ` Arnd Bergmann
2013-04-11  0:04 ` [PATCH 07/30] tty: serial/samsung: fix modular build Arnd Bergmann
2013-04-11  0:04   ` Arnd Bergmann
2013-04-11  0:04   ` Arnd Bergmann
2013-04-11  0:04 ` [PATCH 08/30] i2c: s3c2410: make header file local Arnd Bergmann
2013-04-11  0:04   ` Arnd Bergmann
2013-04-11  0:04   ` Arnd Bergmann
2013-04-14 12:20   ` Wolfram Sang
2013-04-14 12:20     ` Wolfram Sang
2013-04-14 12:20     ` Wolfram Sang
2013-04-14 17:01     ` Heiko Stübner
2013-04-14 17:01       ` Heiko Stübner
2013-04-11  0:04 ` [PATCH 09/30] mmc: sdhci-s3c: remove platform dependencies Arnd Bergmann
2013-04-11  0:04   ` Arnd Bergmann
2013-04-11  1:06   ` Chris Ball
2013-04-11  1:06     ` Chris Ball
2013-04-11  0:04 ` [PATCH 10/30] usb: exynos: do not include plat/usb-phy.h Arnd Bergmann
2013-04-11  0:04   ` Arnd Bergmann
2013-04-11 20:25   ` Greg Kroah-Hartman
2013-04-11 20:25     ` Greg Kroah-Hartman
2013-04-11 20:49     ` [PATCH v3] " Arnd Bergmann
2013-04-11 20:49       ` Arnd Bergmann
2013-04-11 20:49       ` Arnd Bergmann
2013-04-11  0:04 ` [PATCH 11/30] [media] exynos: remove unnecessary header inclusions Arnd Bergmann
2013-04-11  0:04   ` Arnd Bergmann
2013-04-11  0:04   ` Arnd Bergmann
2013-04-11  0:13   ` Mauro Carvalho Chehab
2013-04-11  0:13     ` Mauro Carvalho Chehab
2013-04-11  9:07     ` Sylwester Nawrocki
2013-04-11  9:07       ` Sylwester Nawrocki
2013-04-11 10:52       ` Arnd Bergmann
2013-04-11 10:52         ` Arnd Bergmann
2013-04-11  0:04 ` [PATCH 12/30] video/exynos: " Arnd Bergmann
2013-04-11  0:04   ` Arnd Bergmann
2013-04-11  0:04   ` Arnd Bergmann
2013-04-11  5:07   ` Jingoo Han
2013-04-11  5:07     ` Jingoo Han
2013-04-11  5:07     ` Jingoo Han
2013-04-11 11:51   ` Tomi Valkeinen
2013-04-11 11:51     ` Tomi Valkeinen
2013-04-11 11:51     ` Tomi Valkeinen
2013-04-11 11:51     ` Tomi Valkeinen
2013-04-11 12:08     ` Arnd Bergmann
2013-04-11 12:08       ` Arnd Bergmann
2013-04-11 12:08       ` Arnd Bergmann
2013-04-11  0:04 ` [PATCH 13/30] video/s3c: move platform_data out of arch/arm Arnd Bergmann
2013-04-11  0:04   ` Arnd Bergmann
2013-04-11  0:04   ` Arnd Bergmann
2013-04-11  4:34   ` Jingoo Han
2013-04-11  4:34     ` Jingoo Han
2013-04-11  4:34     ` Jingoo Han
2013-04-11  5:12   ` Jingoo Han
2013-04-11  5:12     ` Jingoo Han
2013-04-11  5:12     ` Jingoo Han
2013-04-11  0:04 ` [PATCH 14/30] thermal/exynos: remove unnecessary header inclusions Arnd Bergmann
2013-04-11  0:04   ` Arnd Bergmann
2013-04-11  1:19   ` Eduardo Valentin
2013-04-11  1:19     ` Eduardo Valentin
2013-04-11  1:19     ` Eduardo Valentin
2013-04-11 23:26     ` Zhang Rui
2013-04-11 23:26       ` Zhang Rui
2013-04-11  0:04 ` [PATCH 15/30] mtd: onenand/samsung: make regs-onenand.h file local Arnd Bergmann
2013-04-11  0:04   ` Arnd Bergmann
2013-04-11  0:04   ` Arnd Bergmann
2013-04-11  0:04   ` Arnd Bergmann
2013-04-11  0:18   ` Kyungmin Park
2013-04-11  0:18     ` Kyungmin Park
2013-04-11  0:18     ` Kyungmin Park
2013-04-11  0:04 ` [PATCH 16/30] rtc: s3c: make header " Arnd Bergmann
2013-04-11  0:04   ` Arnd Bergmann
2013-04-11  0:04 ` [PATCH 17/30] pwm: samsung: repair the worst MMIO abuses Arnd Bergmann
2013-04-11  0:04   ` Arnd Bergmann
2013-04-12  7:06   ` Thierry Reding
2013-04-12  7:06     ` Thierry Reding
2013-04-12  7:46     ` Tomasz Figa
2013-04-12  7:46       ` Tomasz Figa
2013-04-11  0:05 ` [PATCH 18/30] ASoC: samsung: move plat/ headers to local directory Arnd Bergmann
2013-04-11  0:05   ` Arnd Bergmann
2013-04-11  0:05   ` Arnd Bergmann
2013-04-11 16:47   ` Mark Brown
2013-04-11 16:47     ` Mark Brown
2013-04-11 17:08     ` Arnd Bergmann
2013-04-11 17:08       ` Arnd Bergmann
2013-04-11 17:19       ` Mark Brown
2013-04-11 17:19         ` Mark Brown
2013-04-11 19:02         ` [PATCH] ASoC: samsung: fix neo1973-wm8753 compilation Heiko Stübner
2013-04-11 19:02           ` Heiko Stübner
2013-04-12 12:13           ` Mark Brown
2013-04-12 12:13             ` Mark Brown
2013-04-12 11:04         ` [alsa-devel] [PATCH 18/30] ASoC: samsung: move plat/ headers to local directory Lars-Peter Clausen
2013-04-12 11:04           ` Lars-Peter Clausen
2013-04-12 11:26           ` Mark Brown
2013-04-12 11:26             ` Mark Brown
2013-04-11  0:05 ` [PATCH 19/30] ASoC: samsung: use irq resource for idma Arnd Bergmann
2013-04-11  0:05   ` Arnd Bergmann
2013-04-11 16:48   ` Mark Brown
2013-04-11 16:48     ` Mark Brown
2013-04-11  0:05 ` [PATCH 20/30] ASoC: samsung: convert to dmaengine API Arnd Bergmann
2013-04-11  0:05   ` Arnd Bergmann
2013-04-11  0:05   ` Arnd Bergmann
2013-04-11 14:27   ` Mark Brown
2013-04-11 14:27     ` Mark Brown
2013-04-11 14:47     ` Arnd Bergmann
2013-04-11 14:47       ` Arnd Bergmann
2013-04-11 15:42       ` Mark Brown
2013-04-11 15:42         ` Mark Brown
2013-04-12 19:27       ` [alsa-devel] " Lars-Peter Clausen
2013-04-12 19:27         ` Lars-Peter Clausen
2013-04-15 11:04         ` Mark Brown
2013-04-15 11:04           ` Mark Brown
2013-04-11  0:05 ` [PATCH 21/30] ASoC: samsung/i2s: fix module_device_table Arnd Bergmann
2013-04-11  0:05   ` Arnd Bergmann
2013-04-11 16:48   ` Mark Brown
2013-04-11 16:48     ` Mark Brown
2013-04-11  0:05 ` [PATCH 22/30] ASoC: samsung/idma: export idma_reg_addr_init Arnd Bergmann
2013-04-11  0:05   ` Arnd Bergmann
2013-04-11  0:05   ` Arnd Bergmann
2013-04-11 16:48   ` Mark Brown
2013-04-11 16:48     ` Mark Brown
2013-04-11  0:05 ` [PATCH 23/30] clk: exynos: prepare for multiplatform Arnd Bergmann
2013-04-11  0:05   ` Arnd Bergmann
2013-04-11  0:05 ` Arnd Bergmann [this message]
2013-04-11  0:05   ` [PATCH 24/30] clocksource: exynos_mct: remove platform header dependency Arnd Bergmann
2013-04-11  0:05 ` [PATCH 25/30] irqchip: exynos: pass max combiner number to combiner_init Arnd Bergmann
2013-04-11  0:05   ` Arnd Bergmann
2013-04-11  0:05 ` [PATCH 26/30] irqchip: exynos: allocate combiner_data dynamically Arnd Bergmann
2013-04-11  0:05   ` Arnd Bergmann
2013-04-11  0:05 ` [PATCH 27/30] irqchip: exynos: localize irq lookup for ATAGS Arnd Bergmann
2013-04-11  0:05   ` Arnd Bergmann
2013-04-11  0:05 ` [PATCH 28/30] irqchip: exynos: pass irq_base from platform Arnd Bergmann
2013-04-11  0:05   ` Arnd Bergmann
2013-04-11  0:05 ` [PATCH 29/30] spi: s3c64xx: move to generic dmaengine API Arnd Bergmann
2013-04-11  0:05   ` Arnd Bergmann
2013-04-11 16:55   ` Mark Brown
2013-04-11 16:55     ` Mark Brown
2013-04-11 20:42     ` [PATCH v2] " Arnd Bergmann
2013-04-11 20:42       ` Arnd Bergmann
2013-04-11 20:42       ` Arnd Bergmann
2013-04-12 12:55       ` Mark Brown
2013-04-12 12:55         ` Mark Brown
2013-04-17 14:46       ` Mark Brown
2013-04-17 14:46         ` Mark Brown
2013-04-17 20:05   ` [PATCH 29/30] " Arnd Bergmann
2013-04-17 20:05     ` Arnd Bergmann
2013-04-18 16:46     ` Mark Brown
2013-04-18 16:46       ` Mark Brown
2013-04-11  0:05 ` [PATCH 30/30] ARM: exynos: enable multiplatform support Arnd Bergmann
2013-04-11  0:05   ` Arnd Bergmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1365638712-1028578-25-git-send-email-arnd@arndb.de \
    --to=arnd@arndb.de \
    --cc=john.stultz@linaro.org \
    --cc=kgene.kim@samsung.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.