Skip to content

Commit eff443d

Browse files
jkrzyszttmlind
authored andcommitted
OMAP1: AMS_DELTA: add modem support
This patch adds support for modem device found on Amstrad E3 (Delta) board. Based on earlier patch by Jonathan McDowell, available at http://the.earth.li/pub/e3/2.6.19/ams-delta-modem.patch. Modified after Ladislav Michl's arch/arm/mach-omap1/board-voiceblue.c. This patch is dependent on 8250 driver changes getting accepted upstream: http://git.kernel.org/?p=linux/kernel/git/sfr/linux-next.git;a=commit;h=7053133124d5cdf207c1168c7a0c582a18e12ea7 Signed-off-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl> Signed-off-by: Tony Lindgren <tony@atomide.com>
1 parent 82dbb9d commit eff443d

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

arch/arm/mach-omap1/board-ams-delta.c

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,11 @@
1515
#include <linux/kernel.h>
1616
#include <linux/init.h>
1717
#include <linux/input.h>
18+
#include <linux/interrupt.h>
1819
#include <linux/platform_device.h>
20+
#include <linux/serial_8250.h>
1921

22+
#include <asm/serial.h>
2023
#include <mach/hardware.h>
2124
#include <asm/mach-types.h>
2225
#include <asm/mach/arch.h>
@@ -230,6 +233,41 @@ static void __init ams_delta_init(void)
230233
platform_add_devices(ams_delta_devices, ARRAY_SIZE(ams_delta_devices));
231234
}
232235

236+
static struct plat_serial8250_port ams_delta_modem_ports[] = {
237+
{
238+
.membase = (void *) AMS_DELTA_MODEM_VIRT,
239+
.mapbase = AMS_DELTA_MODEM_PHYS,
240+
.irq = -EINVAL, /* changed later */
241+
.flags = UPF_BOOT_AUTOCONF,
242+
.irqflags = IRQF_TRIGGER_RISING,
243+
.iotype = UPIO_MEM,
244+
.regshift = 1,
245+
.uartclk = BASE_BAUD * 16,
246+
},
247+
{ },
248+
};
249+
250+
static struct platform_device ams_delta_modem_device = {
251+
.name = "serial8250",
252+
.id = PLAT8250_DEV_PLATFORM1,
253+
.dev = {
254+
.platform_data = ams_delta_modem_ports,
255+
},
256+
};
257+
258+
static int __init ams_delta_modem_init(void)
259+
{
260+
omap_cfg_reg(M14_1510_GPIO2);
261+
ams_delta_modem_ports[0].irq = gpio_to_irq(2);
262+
263+
ams_delta_latch2_write(
264+
AMS_DELTA_LATCH2_MODEM_NRESET | AMS_DELTA_LATCH2_MODEM_CODEC,
265+
AMS_DELTA_LATCH2_MODEM_NRESET | AMS_DELTA_LATCH2_MODEM_CODEC);
266+
267+
return platform_device_register(&ams_delta_modem_device);
268+
}
269+
arch_initcall(ams_delta_modem_init);
270+
233271
static void __init ams_delta_map_io(void)
234272
{
235273
omap1_map_common_io();

0 commit comments

Comments
 (0)