aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIan Molton <spyro@f2s.com>2008-08-19 08:34:56 -0400
committerIan Molton <spyro@f2s.com>2008-08-19 08:44:07 -0400
commitebcce7b13be837616a3f9d996f637cf3241e3948 (patch)
treebd4de28ee16e2af9dd94ef5bc3794f0877c31f7a
parent0ec3cf69304d2e35ad29da3aa9ab43c3dd97677c (diff)
[ARM] eseries: move UDC defs to machine files
This patchset moves the UDC definitons for e7xx compatible eseries machines to a common location and moves the 'oddball' e800 definition to its machine file. Signed-off-by: Ian Molton <spyro@f2s.com>
-rw-r--r--arch/arm/mach-pxa/Makefile2
-rw-r--r--arch/arm/mach-pxa/e330.c7
-rw-r--r--arch/arm/mach-pxa/e350.c7
-rw-r--r--arch/arm/mach-pxa/e400.c2
-rw-r--r--arch/arm/mach-pxa/e740.c2
-rw-r--r--arch/arm/mach-pxa/e750.c2
-rw-r--r--arch/arm/mach-pxa/e800.c11
-rw-r--r--arch/arm/mach-pxa/eseries.c8
-rw-r--r--arch/arm/mach-pxa/eseries.h1
-rw-r--r--arch/arm/mach-pxa/eseries_udc.c57
10 files changed, 41 insertions, 58 deletions
diff --git a/arch/arm/mach-pxa/Makefile b/arch/arm/mach-pxa/Makefile
index b536a50c150e..5ca73a22439b 100644
--- a/arch/arm/mach-pxa/Makefile
+++ b/arch/arm/mach-pxa/Makefile
@@ -37,7 +37,7 @@ obj-$(CONFIG_MACH_PCM990_BASEBOARD) += pcm990-baseboard.o
37obj-$(CONFIG_MACH_TOSA) += tosa.o 37obj-$(CONFIG_MACH_TOSA) += tosa.o
38obj-$(CONFIG_MACH_EM_X270) += em-x270.o 38obj-$(CONFIG_MACH_EM_X270) += em-x270.o
39obj-$(CONFIG_MACH_MAGICIAN) += magician.o 39obj-$(CONFIG_MACH_MAGICIAN) += magician.o
40obj-$(CONFIG_ARCH_PXA_ESERIES) += eseries.o eseries_udc.o 40obj-$(CONFIG_ARCH_PXA_ESERIES) += eseries.o
41obj-$(CONFIG_MACH_E330) += e330.o 41obj-$(CONFIG_MACH_E330) += e330.o
42obj-$(CONFIG_MACH_E350) += e350.o 42obj-$(CONFIG_MACH_E350) += e350.o
43obj-$(CONFIG_MACH_E740) += e740.o 43obj-$(CONFIG_MACH_E740) += e740.o
diff --git a/arch/arm/mach-pxa/e330.c b/arch/arm/mach-pxa/e330.c
index 2f4555e2fb91..d488eded2058 100644
--- a/arch/arm/mach-pxa/e330.c
+++ b/arch/arm/mach-pxa/e330.c
@@ -19,10 +19,16 @@
19 19
20#include <mach/mfp-pxa25x.h> 20#include <mach/mfp-pxa25x.h>
21#include <mach/hardware.h> 21#include <mach/hardware.h>
22#include <mach/udc.h>
22 23
23#include "generic.h" 24#include "generic.h"
24#include "eseries.h" 25#include "eseries.h"
25 26
27static void __init e330_init(void)
28{
29 pxa_set_udc_info(&e7xx_udc_mach_info);
30}
31
26MACHINE_START(E330, "Toshiba e330") 32MACHINE_START(E330, "Toshiba e330")
27 /* Maintainer: Ian Molton (spyro@f2s.com) */ 33 /* Maintainer: Ian Molton (spyro@f2s.com) */
28 .phys_io = 0x40000000, 34 .phys_io = 0x40000000,
@@ -31,6 +37,7 @@ MACHINE_START(E330, "Toshiba e330")
31 .map_io = pxa_map_io, 37 .map_io = pxa_map_io,
32 .init_irq = pxa25x_init_irq, 38 .init_irq = pxa25x_init_irq,
33 .fixup = eseries_fixup, 39 .fixup = eseries_fixup,
40 .init_machine = e330_init,
34 .timer = &pxa_timer, 41 .timer = &pxa_timer,
35MACHINE_END 42MACHINE_END
36 43
diff --git a/arch/arm/mach-pxa/e350.c b/arch/arm/mach-pxa/e350.c
index 5d58deb7eff8..8ecbc5479828 100644
--- a/arch/arm/mach-pxa/e350.c
+++ b/arch/arm/mach-pxa/e350.c
@@ -19,10 +19,16 @@
19 19
20#include <mach/mfp-pxa25x.h> 20#include <mach/mfp-pxa25x.h>
21#include <mach/hardware.h> 21#include <mach/hardware.h>
22#include <mach/udc.h>
22 23
23#include "generic.h" 24#include "generic.h"
24#include "eseries.h" 25#include "eseries.h"
25 26
27static void __init e350_init(void)
28{
29 pxa_set_udc_info(&e7xx_udc_mach_info);
30}
31
26MACHINE_START(E350, "Toshiba e350") 32MACHINE_START(E350, "Toshiba e350")
27 /* Maintainer: Ian Molton (spyro@f2s.com) */ 33 /* Maintainer: Ian Molton (spyro@f2s.com) */
28 .phys_io = 0x40000000, 34 .phys_io = 0x40000000,
@@ -31,6 +37,7 @@ MACHINE_START(E350, "Toshiba e350")
31 .map_io = pxa_map_io, 37 .map_io = pxa_map_io,
32 .init_irq = pxa25x_init_irq, 38 .init_irq = pxa25x_init_irq,
33 .fixup = eseries_fixup, 39 .fixup = eseries_fixup,
40 .init_machine = e350_init,
34 .timer = &pxa_timer, 41 .timer = &pxa_timer,
35MACHINE_END 42MACHINE_END
36 43
diff --git a/arch/arm/mach-pxa/e400.c b/arch/arm/mach-pxa/e400.c
index 0bcf9ece3d33..544bbaa20621 100644
--- a/arch/arm/mach-pxa/e400.c
+++ b/arch/arm/mach-pxa/e400.c
@@ -22,6 +22,7 @@
22#include <mach/hardware.h> 22#include <mach/hardware.h>
23 23
24#include <mach/pxafb.h> 24#include <mach/pxafb.h>
25#include <mach/udc.h>
25 26
26#include "generic.h" 27#include "generic.h"
27#include "eseries.h" 28#include "eseries.h"
@@ -76,6 +77,7 @@ static void __init e400_init(void)
76{ 77{
77 pxa2xx_mfp_config(ARRAY_AND_SIZE(e400_pin_config)); 78 pxa2xx_mfp_config(ARRAY_AND_SIZE(e400_pin_config));
78 set_pxa_fb_info(&e400_pxafb_mach_info); 79 set_pxa_fb_info(&e400_pxafb_mach_info);
80 pxa_set_udc_info(&e7xx_udc_mach_info);
79} 81}
80 82
81MACHINE_START(E400, "Toshiba e400") 83MACHINE_START(E400, "Toshiba e400")
diff --git a/arch/arm/mach-pxa/e740.c b/arch/arm/mach-pxa/e740.c
index ef0c3c80e791..c57a15b37f0d 100644
--- a/arch/arm/mach-pxa/e740.c
+++ b/arch/arm/mach-pxa/e740.c
@@ -24,6 +24,7 @@
24 24
25#include <mach/mfp-pxa25x.h> 25#include <mach/mfp-pxa25x.h>
26#include <mach/hardware.h> 26#include <mach/hardware.h>
27#include <mach/udc.h>
27 28
28#include "generic.h" 29#include "generic.h"
29#include "eseries.h" 30#include "eseries.h"
@@ -151,6 +152,7 @@ static void __init e740_init(void)
151{ 152{
152 pxa2xx_mfp_config(ARRAY_AND_SIZE(e740_pin_config)); 153 pxa2xx_mfp_config(ARRAY_AND_SIZE(e740_pin_config));
153 platform_add_devices(devices, ARRAY_SIZE(devices)); 154 platform_add_devices(devices, ARRAY_SIZE(devices));
155 pxa_set_udc_info(&e7xx_udc_mach_info);
154} 156}
155 157
156MACHINE_START(E740, "Toshiba e740") 158MACHINE_START(E740, "Toshiba e740")
diff --git a/arch/arm/mach-pxa/e750.c b/arch/arm/mach-pxa/e750.c
index 7e9a21dddd4d..640e738b85df 100644
--- a/arch/arm/mach-pxa/e750.c
+++ b/arch/arm/mach-pxa/e750.c
@@ -24,6 +24,7 @@
24 24
25#include <mach/mfp-pxa25x.h> 25#include <mach/mfp-pxa25x.h>
26#include <mach/hardware.h> 26#include <mach/hardware.h>
27#include <mach/udc.h>
27 28
28#include "generic.h" 29#include "generic.h"
29#include "eseries.h" 30#include "eseries.h"
@@ -108,6 +109,7 @@ static struct platform_device *devices[] __initdata = {
108static void __init e750_init(void) 109static void __init e750_init(void)
109{ 110{
110 platform_add_devices(devices, ARRAY_SIZE(devices)); 111 platform_add_devices(devices, ARRAY_SIZE(devices));
112 pxa_set_udc_info(&e7xx_udc_mach_info);
111} 113}
112 114
113MACHINE_START(E750, "Toshiba e750") 115MACHINE_START(E750, "Toshiba e750")
diff --git a/arch/arm/mach-pxa/e800.c b/arch/arm/mach-pxa/e800.c
index 2f5e9061954b..a293e09bfe25 100644
--- a/arch/arm/mach-pxa/e800.c
+++ b/arch/arm/mach-pxa/e800.c
@@ -24,6 +24,8 @@
24 24
25#include <mach/mfp-pxa25x.h> 25#include <mach/mfp-pxa25x.h>
26#include <mach/hardware.h> 26#include <mach/hardware.h>
27#include <mach/eseries-gpio.h>
28#include <mach/udc.h>
27 29
28#include "generic.h" 30#include "generic.h"
29#include "eseries.h" 31#include "eseries.h"
@@ -150,6 +152,14 @@ static struct platform_device e800_fb_device = {
150 .resource = e800_fb_resources, 152 .resource = e800_fb_resources,
151}; 153};
152 154
155/* --------------------------- UDC definitions --------------------------- */
156
157static struct pxa2xx_udc_mach_info e800_udc_mach_info = {
158 .gpio_vbus = GPIO_E800_USB_DISC,
159 .gpio_pullup = GPIO_E800_USB_PULLUP,
160 .gpio_pullup_inverted = 1
161};
162
153/* ----------------------------------------------------------------------- */ 163/* ----------------------------------------------------------------------- */
154 164
155static struct platform_device *devices[] __initdata = { 165static struct platform_device *devices[] __initdata = {
@@ -159,6 +169,7 @@ static struct platform_device *devices[] __initdata = {
159static void __init e800_init(void) 169static void __init e800_init(void)
160{ 170{
161 platform_add_devices(devices, ARRAY_SIZE(devices)); 171 platform_add_devices(devices, ARRAY_SIZE(devices));
172 pxa_set_udc_info(&e800_udc_mach_info);
162} 173}
163 174
164MACHINE_START(E800, "Toshiba e800") 175MACHINE_START(E800, "Toshiba e800")
diff --git a/arch/arm/mach-pxa/eseries.c b/arch/arm/mach-pxa/eseries.c
index 1872faa11a27..d28849b50a14 100644
--- a/arch/arm/mach-pxa/eseries.c
+++ b/arch/arm/mach-pxa/eseries.c
@@ -19,6 +19,8 @@
19 19
20#include <mach/mfp-pxa25x.h> 20#include <mach/mfp-pxa25x.h>
21#include <mach/hardware.h> 21#include <mach/hardware.h>
22#include <mach/eseries-gpio.h>
23#include <mach/udc.h>
22 24
23#include "generic.h" 25#include "generic.h"
24 26
@@ -35,3 +37,9 @@ void __init eseries_fixup(struct machine_desc *desc,
35 mi->bank[0].size = (64*1024*1024); 37 mi->bank[0].size = (64*1024*1024);
36} 38}
37 39
40struct pxa2xx_udc_mach_info e7xx_udc_mach_info = {
41 .gpio_vbus = GPIO_E7XX_USB_DISC,
42 .gpio_pullup = GPIO_E7XX_USB_PULLUP,
43 .gpio_pullup_inverted = 1
44};
45
diff --git a/arch/arm/mach-pxa/eseries.h b/arch/arm/mach-pxa/eseries.h
index bc74e21d054a..a83f88d4b6ad 100644
--- a/arch/arm/mach-pxa/eseries.h
+++ b/arch/arm/mach-pxa/eseries.h
@@ -1,3 +1,4 @@
1void __init eseries_fixup(struct machine_desc *desc, 1void __init eseries_fixup(struct machine_desc *desc,
2 struct tag *tags, char **cmdline, struct meminfo *mi); 2 struct tag *tags, char **cmdline, struct meminfo *mi);
3 3
4extern struct pxa2xx_udc_mach_info e7xx_udc_mach_info;
diff --git a/arch/arm/mach-pxa/eseries_udc.c b/arch/arm/mach-pxa/eseries_udc.c
deleted file mode 100644
index d622c04c0d44..000000000000
--- a/arch/arm/mach-pxa/eseries_udc.c
+++ /dev/null
@@ -1,57 +0,0 @@
1/*
2 * UDC functions for the Toshiba e-series PDAs
3 *
4 * Copyright (c) Ian Molton 2003
5 *
6 * This file is licensed under
7 * the terms of the GNU General Public License version 2. This program
8 * is licensed "as is" without any warranty of any kind, whether express
9 * or implied.
10 *
11 */
12
13#include <linux/kernel.h>
14#include <linux/init.h>
15#include <linux/device.h>
16
17#include <mach/udc.h>
18#include <mach/eseries-gpio.h>
19#include <mach/hardware.h>
20#include <mach/pxa-regs.h>
21#include <asm/mach/arch.h>
22#include <asm/mach-types.h>
23#include <asm/mach/map.h>
24#include <asm/domain.h>
25
26/* local PXA generic code */
27#include "generic.h"
28
29static struct pxa2xx_udc_mach_info e7xx_udc_mach_info = {
30 .gpio_vbus = GPIO_E7XX_USB_DISC,
31 .gpio_pullup = GPIO_E7XX_USB_PULLUP,
32 .gpio_pullup_inverted = 1
33};
34
35static struct pxa2xx_udc_mach_info e800_udc_mach_info = {
36 .gpio_vbus = GPIO_E800_USB_DISC,
37 .gpio_pullup = GPIO_E800_USB_PULLUP,
38 .gpio_pullup_inverted = 1
39};
40
41static int __init eseries_udc_init(void)
42{
43 if (machine_is_e330() || machine_is_e350() ||
44 machine_is_e740() || machine_is_e750() ||
45 machine_is_e400())
46 pxa_set_udc_info(&e7xx_udc_mach_info);
47 else if (machine_is_e800())
48 pxa_set_udc_info(&e800_udc_mach_info);
49
50 return 0;
51}
52
53module_init(eseries_udc_init);
54
55MODULE_AUTHOR("Ian Molton <spyro@f2s.com>");
56MODULE_DESCRIPTION("eseries UDC support");
57MODULE_LICENSE("GPLv2");