diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-06-14 16:42:43 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-06-14 16:42:43 -0400 |
commit | 2cf4d4514d5b43c1f3b64bd0ec8b9853bde8f1dc (patch) | |
tree | e35a625496acc6ac852846d40b8851186b9d1ac4 /arch/arm/mach-stmp37xx/stmp37xx_devb.c | |
parent | 44b7532b8b464f606053562400719c9c21276037 (diff) | |
parent | ce53895a5d24e0ee19fb92f56c17323fb4c9ab27 (diff) |
Merge branch 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm
* 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm: (417 commits)
MAINTAINERS: EB110ATX is not ebsa110
MAINTAINERS: update Eric Miao's email address and status
fb: add support of LCD display controller on pxa168/910 (base layer)
[ARM] 5552/1: ep93xx get_uart_rate(): use EP93XX_SYSCON_PWRCNT and EP93XX_SYSCON_PWRCN
[ARM] pxa/sharpsl_pm: zaurus needs generic pxa suspend/resume routines
[ARM] 5544/1: Trust PrimeCell resource sizes
[ARM] pxa/sharpsl_pm: cleanup of gpio-related code.
[ARM] pxa/sharpsl_pm: drop set_irq_type calls
[ARM] pxa/sharpsl_pm: merge pxa-specific code into generic one
[ARM] pxa/sharpsl_pm: merge the two sharpsl_pm.c since it's now pxa specific
[ARM] sa1100: remove unused collie_pm.c
[ARM] pxa: fix the conflicting non-static declarations of global_gpios[]
[ARM] 5550/1: Add default configure file for w90p910 platform
[ARM] 5549/1: Add clock api for w90p910 platform.
[ARM] 5548/1: Add gpio api for w90p910 platform
[ARM] 5551/1: Add multi-function pin api for w90p910 platform.
[ARM] Make ARM_VIC_NR depend on ARM_VIC
[ARM] 5546/1: ARM PL022 SSP/SPI driver v3
ARM: OMAP4: SMP: Update defconfig for OMAP4430
ARM: OMAP4: SMP: Enable SMP support for OMAP4430
...
Diffstat (limited to 'arch/arm/mach-stmp37xx/stmp37xx_devb.c')
-rw-r--r-- | arch/arm/mach-stmp37xx/stmp37xx_devb.c | 101 |
1 files changed, 101 insertions, 0 deletions
diff --git a/arch/arm/mach-stmp37xx/stmp37xx_devb.c b/arch/arm/mach-stmp37xx/stmp37xx_devb.c new file mode 100644 index 000000000000..394f21ab59e6 --- /dev/null +++ b/arch/arm/mach-stmp37xx/stmp37xx_devb.c | |||
@@ -0,0 +1,101 @@ | |||
1 | /* | ||
2 | * Freescale STMP37XX development board support | ||
3 | * | ||
4 | * Embedded Alley Solutions, Inc <source@embeddedalley.com> | ||
5 | * | ||
6 | * Copyright 2008 Freescale Semiconductor, Inc. All Rights Reserved. | ||
7 | * Copyright 2008 Embedded Alley Solutions, Inc All Rights Reserved. | ||
8 | */ | ||
9 | |||
10 | /* | ||
11 | * The code contained herein is licensed under the GNU General Public | ||
12 | * License. You may obtain a copy of the GNU General Public License | ||
13 | * Version 2 or later at the following locations: | ||
14 | * | ||
15 | * http://www.opensource.org/licenses/gpl-license.html | ||
16 | * http://www.gnu.org/copyleft/gpl.html | ||
17 | */ | ||
18 | #include <linux/kernel.h> | ||
19 | #include <linux/init.h> | ||
20 | #include <linux/device.h> | ||
21 | #include <linux/platform_device.h> | ||
22 | #include <asm/setup.h> | ||
23 | #include <asm/mach-types.h> | ||
24 | #include <asm/mach/arch.h> | ||
25 | |||
26 | #include <mach/stmp3xxx.h> | ||
27 | #include <mach/pins.h> | ||
28 | #include <mach/pinmux.h> | ||
29 | #include "stmp37xx.h" | ||
30 | |||
31 | /* | ||
32 | * List of STMP37xx development board specific devices | ||
33 | */ | ||
34 | static struct platform_device *stmp37xx_devb_devices[] = { | ||
35 | &stmp3xxx_dbguart, | ||
36 | &stmp3xxx_appuart, | ||
37 | }; | ||
38 | |||
39 | static struct pin_desc dbguart_pins_0[] = { | ||
40 | { PINID_PWM0, PIN_FUN3, }, | ||
41 | { PINID_PWM1, PIN_FUN3, }, | ||
42 | }; | ||
43 | |||
44 | struct pin_desc appuart_pins_0[] = { | ||
45 | { PINID_UART2_CTS, PIN_FUN1, PIN_4MA, PIN_1_8V, 0, }, | ||
46 | { PINID_UART2_RTS, PIN_FUN1, PIN_4MA, PIN_1_8V, 0, }, | ||
47 | { PINID_UART2_RX, PIN_FUN1, PIN_4MA, PIN_1_8V, 0, }, | ||
48 | { PINID_UART2_TX, PIN_FUN1, PIN_4MA, PIN_1_8V, 0, }, | ||
49 | }; | ||
50 | |||
51 | static struct pin_group appuart_pins[] = { | ||
52 | [0] = { | ||
53 | .pins = appuart_pins_0, | ||
54 | .nr_pins = ARRAY_SIZE(appuart_pins_0), | ||
55 | }, | ||
56 | /* 37xx has the only app uart */ | ||
57 | }; | ||
58 | |||
59 | static struct pin_group dbguart_pins[] = { | ||
60 | [0] = { | ||
61 | .pins = dbguart_pins_0, | ||
62 | .nr_pins = ARRAY_SIZE(dbguart_pins_0), | ||
63 | }, | ||
64 | }; | ||
65 | |||
66 | static int dbguart_pins_control(int id, int request) | ||
67 | { | ||
68 | int r = 0; | ||
69 | |||
70 | if (request) | ||
71 | r = stmp3xxx_request_pin_group(&dbguart_pins[id], "debug uart"); | ||
72 | else | ||
73 | stmp3xxx_release_pin_group(&dbguart_pins[id], "debug uart"); | ||
74 | return r; | ||
75 | } | ||
76 | |||
77 | |||
78 | static void __init stmp37xx_devb_init(void) | ||
79 | { | ||
80 | stmp3xxx_pinmux_init(NR_REAL_IRQS); | ||
81 | |||
82 | /* Init STMP3xxx platform */ | ||
83 | stmp3xxx_init(); | ||
84 | |||
85 | stmp3xxx_dbguart.dev.platform_data = dbguart_pins_control; | ||
86 | stmp3xxx_appuart.dev.platform_data = appuart_pins; | ||
87 | |||
88 | /* Add STMP37xx development board devices */ | ||
89 | platform_add_devices(stmp37xx_devb_devices, | ||
90 | ARRAY_SIZE(stmp37xx_devb_devices)); | ||
91 | } | ||
92 | |||
93 | MACHINE_START(STMP37XX, "STMP37XX") | ||
94 | .phys_io = 0x80000000, | ||
95 | .io_pg_offst = ((0xf0000000) >> 18) & 0xfffc, | ||
96 | .boot_params = 0x40000100, | ||
97 | .map_io = stmp37xx_map_io, | ||
98 | .init_irq = stmp37xx_init_irq, | ||
99 | .timer = &stmp3xxx_timer, | ||
100 | .init_machine = stmp37xx_devb_init, | ||
101 | MACHINE_END | ||