aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-u300
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@linaro.org>2012-08-13 05:35:55 -0400
committerLinus Walleij <linus.walleij@linaro.org>2012-08-13 07:53:06 -0400
commit234323ba4f226d9d3d90d5c30f7883362a810a20 (patch)
treeb27dd85e6a1730ac1bc7157fa3a63af8df43e19f /arch/arm/mach-u300
parent651728507140246e9cf4e809f1877cb2eddbc84e (diff)
ARM: u300: merge u300.c into core.c and rid headers
This gets rid of the separate u300.c file in mach-u300 since it can just as well live right in core.c, then we also get rid of the broadcasted <mach/platform.h> file that is not helping anyone. Put the interface to the system timer into a separate header. Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'arch/arm/mach-u300')
-rw-r--r--arch/arm/mach-u300/Makefile1
-rw-r--r--arch/arm/mach-u300/core.c22
-rw-r--r--arch/arm/mach-u300/include/mach/platform.h20
-rw-r--r--arch/arm/mach-u300/timer.c2
-rw-r--r--arch/arm/mach-u300/timer.h1
-rw-r--r--arch/arm/mach-u300/u300.c41
6 files changed, 21 insertions, 66 deletions
diff --git a/arch/arm/mach-u300/Makefile b/arch/arm/mach-u300/Makefile
index 7e47d37aeb0e..5a86c58da396 100644
--- a/arch/arm/mach-u300/Makefile
+++ b/arch/arm/mach-u300/Makefile
@@ -7,7 +7,6 @@ obj-m :=
7obj-n := 7obj-n :=
8obj- := 8obj- :=
9 9
10obj-$(CONFIG_ARCH_U300) += u300.o
11obj-$(CONFIG_SPI_PL022) += spi.o 10obj-$(CONFIG_SPI_PL022) += spi.o
12obj-$(CONFIG_MACH_U300_SPIDUMMY) += dummyspichip.o 11obj-$(CONFIG_MACH_U300_SPIDUMMY) += dummyspichip.o
13obj-$(CONFIG_I2C_STU300) += i2c.o 12obj-$(CONFIG_I2C_STU300) += i2c.o
diff --git a/arch/arm/mach-u300/core.c b/arch/arm/mach-u300/core.c
index 0158189a4dab..bc2339192fd9 100644
--- a/arch/arm/mach-u300/core.c
+++ b/arch/arm/mach-u300/core.c
@@ -39,12 +39,15 @@
39#include <asm/hardware/vic.h> 39#include <asm/hardware/vic.h>
40#include <asm/mach/map.h> 40#include <asm/mach/map.h>
41#include <asm/mach/irq.h> 41#include <asm/mach/irq.h>
42#include <asm/mach-types.h>
43#include <asm/mach/arch.h>
42 44
43#include <mach/coh901318.h> 45#include <mach/coh901318.h>
44#include <mach/hardware.h> 46#include <mach/hardware.h>
45#include <mach/syscon.h> 47#include <mach/syscon.h>
46#include <mach/dma_channels.h> 48#include <mach/dma_channels.h>
47 49
50#include "timer.h"
48#include "spi.h" 51#include "spi.h"
49#include "i2c.h" 52#include "i2c.h"
50#include "u300-gpio.h" 53#include "u300-gpio.h"
@@ -76,7 +79,7 @@ static struct map_desc u300_io_desc[] __initdata = {
76 }, 79 },
77}; 80};
78 81
79void __init u300_map_io(void) 82static void __init u300_map_io(void)
80{ 83{
81 iotable_init(u300_io_desc, ARRAY_SIZE(u300_io_desc)); 84 iotable_init(u300_io_desc, ARRAY_SIZE(u300_io_desc));
82 /* We enable a real big DMA buffer if need be. */ 85 /* We enable a real big DMA buffer if need be. */
@@ -1600,7 +1603,7 @@ static struct platform_device *platform_devs[] __initdata = {
1600 * together so some interrupts are connected to the first one and some 1603 * together so some interrupts are connected to the first one and some
1601 * to the second one. 1604 * to the second one.
1602 */ 1605 */
1603void __init u300_init_irq(void) 1606static void __init u300_init_irq(void)
1604{ 1607{
1605 u32 mask[2] = {0, 0}; 1608 u32 mask[2] = {0, 0};
1606 struct clk *clk; 1609 struct clk *clk;
@@ -1742,7 +1745,7 @@ static void __init u300_assign_physmem(void)
1742 } 1745 }
1743} 1746}
1744 1747
1745void __init u300_init_devices(void) 1748static void __init u300_init_machine(void)
1746{ 1749{
1747 int i; 1750 int i;
1748 u16 val; 1751 u16 val;
@@ -1783,7 +1786,7 @@ void __init u300_init_devices(void)
1783/* Forward declare this function from the watchdog */ 1786/* Forward declare this function from the watchdog */
1784void coh901327_watchdog_reset(void); 1787void coh901327_watchdog_reset(void);
1785 1788
1786void u300_restart(char mode, const char *cmd) 1789static void u300_restart(char mode, const char *cmd)
1787{ 1790{
1788 switch (mode) { 1791 switch (mode) {
1789 case 's': 1792 case 's':
@@ -1799,3 +1802,14 @@ void u300_restart(char mode, const char *cmd)
1799 /* Wait for system do die/reset. */ 1802 /* Wait for system do die/reset. */
1800 while (1); 1803 while (1);
1801} 1804}
1805
1806MACHINE_START(U300, "Ericsson AB U335 S335/B335 Prototype Board")
1807 /* Maintainer: Linus Walleij <linus.walleij@stericsson.com> */
1808 .atag_offset = 0x100,
1809 .map_io = u300_map_io,
1810 .init_irq = u300_init_irq,
1811 .handle_irq = vic_handle_irq,
1812 .timer = &u300_timer,
1813 .init_machine = u300_init_machine,
1814 .restart = u300_restart,
1815MACHINE_END
diff --git a/arch/arm/mach-u300/include/mach/platform.h b/arch/arm/mach-u300/include/mach/platform.h
deleted file mode 100644
index 096333f32fc3..000000000000
--- a/arch/arm/mach-u300/include/mach/platform.h
+++ /dev/null
@@ -1,20 +0,0 @@
1/*
2 *
3 * arch/arm/mach-u300/include/mach/platform.h
4 *
5 *
6 * Copyright (C) 2006-2009 ST-Ericsson AB
7 * License terms: GNU General Public License (GPL) version 2
8 * Basic platform init and mapping functions.
9 * Author: Linus Walleij <linus.walleij@stericsson.com>
10 */
11
12#ifndef __ASSEMBLY__
13
14void u300_map_io(void);
15void u300_init_irq(void);
16void u300_init_devices(void);
17void u300_restart(char, const char *);
18extern struct sys_timer u300_timer;
19
20#endif
diff --git a/arch/arm/mach-u300/timer.c b/arch/arm/mach-u300/timer.c
index 56ac06d38ec1..146e81531da3 100644
--- a/arch/arm/mach-u300/timer.c
+++ b/arch/arm/mach-u300/timer.c
@@ -26,6 +26,8 @@
26#include <asm/mach/time.h> 26#include <asm/mach/time.h>
27#include <asm/mach/irq.h> 27#include <asm/mach/irq.h>
28 28
29#include "timer.h"
30
29/* 31/*
30 * APP side special timer registers 32 * APP side special timer registers
31 * This timer contains four timers which can fire an interrupt each. 33 * This timer contains four timers which can fire an interrupt each.
diff --git a/arch/arm/mach-u300/timer.h b/arch/arm/mach-u300/timer.h
new file mode 100644
index 000000000000..b5e9791762e0
--- /dev/null
+++ b/arch/arm/mach-u300/timer.h
@@ -0,0 +1 @@
extern struct sys_timer u300_timer;
diff --git a/arch/arm/mach-u300/u300.c b/arch/arm/mach-u300/u300.c
deleted file mode 100644
index 4e56e8c093fc..000000000000
--- a/arch/arm/mach-u300/u300.c
+++ /dev/null
@@ -1,41 +0,0 @@
1/*
2 *
3 * arch/arm/mach-u300/u300.c
4 *
5 *
6 * Copyright (C) 2006-2009 ST-Ericsson AB
7 * License terms: GNU General Public License (GPL) version 2
8 * Platform machine definition.
9 * Author: Linus Walleij <linus.walleij@stericsson.com>
10 */
11#include <linux/kernel.h>
12#include <linux/init.h>
13#include <linux/mm.h>
14#include <linux/sched.h>
15#include <linux/interrupt.h>
16#include <linux/ioport.h>
17#include <linux/memblock.h>
18#include <linux/platform_device.h>
19#include <linux/io.h>
20#include <mach/hardware.h>
21#include <mach/platform.h>
22#include <asm/hardware/vic.h>
23#include <asm/mach-types.h>
24#include <asm/mach/arch.h>
25#include <asm/memory.h>
26
27static void __init u300_init_machine(void)
28{
29 u300_init_devices();
30}
31
32MACHINE_START(U300, "Ericsson AB U335 S335/B335 Prototype Board")
33 /* Maintainer: Linus Walleij <linus.walleij@stericsson.com> */
34 .atag_offset = 0x100,
35 .map_io = u300_map_io,
36 .init_irq = u300_init_irq,
37 .handle_irq = vic_handle_irq,
38 .timer = &u300_timer,
39 .init_machine = u300_init_machine,
40 .restart = u300_restart,
41MACHINE_END