aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2017-09-11 00:07:39 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2017-09-11 00:07:39 -0400
commit64414e5f9896805c2e80583345e9b1745be73aa9 (patch)
treeee11362c144c7028f1271cf6be8bdf1065f1781e
parente90937e756938f03d37d4cae7c82316a3a425944 (diff)
parent8a1943492bd629b7eae64535a96fcb959a01bbd0 (diff)
Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu
Pull m68knommu updates from Greg Ungerer: "Only two changes. One removes unused code, the other makes local clock code arguments consistent with generic clock code" * 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu: m68knommu: remove dead code m68k: allow NULL clock for clk_get_rate
-rw-r--r--arch/m68k/coldfire/clk.c3
-rw-r--r--arch/m68k/coldfire/m5441x.c37
2 files changed, 3 insertions, 37 deletions
diff --git a/arch/m68k/coldfire/clk.c b/arch/m68k/coldfire/clk.c
index 1e3c7e9193d1..856069a3196d 100644
--- a/arch/m68k/coldfire/clk.c
+++ b/arch/m68k/coldfire/clk.c
@@ -121,6 +121,9 @@ EXPORT_SYMBOL(clk_put);
121 121
122unsigned long clk_get_rate(struct clk *clk) 122unsigned long clk_get_rate(struct clk *clk)
123{ 123{
124 if (!clk)
125 return 0;
126
124 return clk->rate; 127 return clk->rate;
125} 128}
126EXPORT_SYMBOL(clk_get_rate); 129EXPORT_SYMBOL(clk_get_rate);
diff --git a/arch/m68k/coldfire/m5441x.c b/arch/m68k/coldfire/m5441x.c
index dc589b039b62..04fd7fde9fb3 100644
--- a/arch/m68k/coldfire/m5441x.c
+++ b/arch/m68k/coldfire/m5441x.c
@@ -222,40 +222,3 @@ void __init config_BSP(char *commandp, int size)
222 m5441x_uarts_init(); 222 m5441x_uarts_init();
223 m5441x_fec_init(); 223 m5441x_fec_init();
224} 224}
225
226
227#if IS_ENABLED(CONFIG_RTC_DRV_M5441x)
228static struct resource m5441x_rtc_resources[] = {
229 {
230 .start = MCFRTC_BASE,
231 .end = MCFRTC_BASE + MCFRTC_SIZE - 1,
232 .flags = IORESOURCE_MEM,
233 },
234 {
235 .start = MCF_IRQ_RTC,
236 .end = MCF_IRQ_RTC,
237 .flags = IORESOURCE_IRQ,
238 },
239};
240
241static struct platform_device m5441x_rtc = {
242 .name = "mcfrtc",
243 .id = 0,
244 .resource = m5441x_rtc_resources,
245 .num_resources = ARRAY_SIZE(m5441x_rtc_resources),
246};
247#endif
248
249static struct platform_device *m5441x_devices[] __initdata = {
250#if IS_ENABLED(CONFIG_RTC_DRV_M5441x)
251 &m5441x_rtc,
252#endif
253};
254
255static int __init init_BSP(void)
256{
257 platform_add_devices(m5441x_devices, ARRAY_SIZE(m5441x_devices));
258 return 0;
259}
260
261arch_initcall(init_BSP);