aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-sa1100
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2006-09-28 17:40:39 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-09-28 17:40:39 -0400
commitebdea46fecae40c4d7effcd33f40918a37a1df4b (patch)
treee4312bf7f1f3d184738963a0ec300aa9fdfd55c1 /arch/arm/mach-sa1100
parentfecf3404f4aba6d0edeba31eeb018cbb6326dff2 (diff)
parent250d375d1da45a5e08ab8baf5eaa7eb258afd82b (diff)
Merge branch 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm
* 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm: (130 commits) [ARM] 3856/1: Add clocksource for Intel IXP4xx platforms [ARM] 3855/1: Add generic time support [ARM] 3873/1: S3C24XX: Add irq_chip names [ARM] 3872/1: S3C24XX: Apply consistant tabbing to irq_chips [ARM] 3871/1: S3C24XX: Fix ordering of EINT4..23 [ARM] nommu: confirms the CR_V bit in nommu mode [ARM] nommu: abort handler fixup for !CPU_CP15_MMU cores. [ARM] 3870/1: AT91: Start removing static memory mappings [ARM] 3869/1: AT91: NAND support for DK and KB9202 boards [ARM] 3868/1: AT91 hardware header update [ARM] 3867/1: AT91 GPIO update [ARM] 3866/1: AT91 clock update [ARM] 3865/1: AT91RM9200 header updates [ARM] 3862/2: S3C2410 - add basic power management support for AML M5900 series [ARM] kthread: switch arch/arm/kernel/apm.c [ARM] Off-by-one in arch/arm/common/icst* [ARM] 3864/1: Refactore sharpsl_pm [ARM] 3863/1: Add Locomo SPI Device [ARM] 3847/2: Convert LOMOMO to use struct device for GPIOs [ARM] Use CPU_CACHE_* where possible in asm/cacheflush.h ...
Diffstat (limited to 'arch/arm/mach-sa1100')
-rw-r--r--arch/arm/mach-sa1100/collie.c23
1 files changed, 10 insertions, 13 deletions
diff --git a/arch/arm/mach-sa1100/collie.c b/arch/arm/mach-sa1100/collie.c
index a0dfa390e34b..6496eb645cee 100644
--- a/arch/arm/mach-sa1100/collie.c
+++ b/arch/arm/mach-sa1100/collie.c
@@ -91,30 +91,29 @@ static struct mcp_plat_data collie_mcp_data = {
91/* 91/*
92 * low-level UART features. 92 * low-level UART features.
93 */ 93 */
94static struct locomo_dev *uart_dev = NULL; 94struct platform_device collie_locomo_device;
95 95
96static void collie_uart_set_mctrl(struct uart_port *port, u_int mctrl) 96static void collie_uart_set_mctrl(struct uart_port *port, u_int mctrl)
97{ 97{
98 if (!uart_dev) return;
99
100 if (mctrl & TIOCM_RTS) 98 if (mctrl & TIOCM_RTS)
101 locomo_gpio_write(uart_dev, LOCOMO_GPIO_RTS, 0); 99 locomo_gpio_write(&collie_locomo_device.dev, LOCOMO_GPIO_RTS, 0);
102 else 100 else
103 locomo_gpio_write(uart_dev, LOCOMO_GPIO_RTS, 1); 101 locomo_gpio_write(&collie_locomo_device.dev, LOCOMO_GPIO_RTS, 1);
104 102
105 if (mctrl & TIOCM_DTR) 103 if (mctrl & TIOCM_DTR)
106 locomo_gpio_write(uart_dev, LOCOMO_GPIO_DTR, 0); 104 locomo_gpio_write(&collie_locomo_device.dev, LOCOMO_GPIO_DTR, 0);
107 else 105 else
108 locomo_gpio_write(uart_dev, LOCOMO_GPIO_DTR, 1); 106 locomo_gpio_write(&collie_locomo_device.dev, LOCOMO_GPIO_DTR, 1);
109} 107}
110 108
111static u_int collie_uart_get_mctrl(struct uart_port *port) 109static u_int collie_uart_get_mctrl(struct uart_port *port)
112{ 110{
113 int ret = TIOCM_CD; 111 int ret = TIOCM_CD;
114 unsigned int r; 112 unsigned int r;
115 if (!uart_dev) return ret;
116 113
117 r = locomo_gpio_read_output(uart_dev, LOCOMO_GPIO_CTS & LOCOMO_GPIO_DSR); 114 r = locomo_gpio_read_output(&collie_locomo_device.dev, LOCOMO_GPIO_CTS & LOCOMO_GPIO_DSR);
115 if (r == -ENODEV)
116 return ret;
118 if (r & LOCOMO_GPIO_CTS) 117 if (r & LOCOMO_GPIO_CTS)
119 ret |= TIOCM_CTS; 118 ret |= TIOCM_CTS;
120 if (r & LOCOMO_GPIO_DSR) 119 if (r & LOCOMO_GPIO_DSR)
@@ -130,13 +129,11 @@ static struct sa1100_port_fns collie_port_fns __initdata = {
130 129
131static int collie_uart_probe(struct locomo_dev *dev) 130static int collie_uart_probe(struct locomo_dev *dev)
132{ 131{
133 uart_dev = dev;
134 return 0; 132 return 0;
135} 133}
136 134
137static int collie_uart_remove(struct locomo_dev *dev) 135static int collie_uart_remove(struct locomo_dev *dev)
138{ 136{
139 uart_dev = NULL;
140 return 0; 137 return 0;
141} 138}
142 139
@@ -170,7 +167,7 @@ static struct resource locomo_resources[] = {
170 }, 167 },
171}; 168};
172 169
173static struct platform_device locomo_device = { 170struct platform_device collie_locomo_device = {
174 .name = "locomo", 171 .name = "locomo",
175 .id = 0, 172 .id = 0,
176 .num_resources = ARRAY_SIZE(locomo_resources), 173 .num_resources = ARRAY_SIZE(locomo_resources),
@@ -178,7 +175,7 @@ static struct platform_device locomo_device = {
178}; 175};
179 176
180static struct platform_device *devices[] __initdata = { 177static struct platform_device *devices[] __initdata = {
181 &locomo_device, 178 &collie_locomo_device,
182 &colliescoop_device, 179 &colliescoop_device,
183}; 180};
184 181