2 * linux/arch/arm/mach-pxa/capc7117.c
4 * Support for the Embedian CAPC-7117 Evaluation Kit
5 * based on the Embedian MXM-8x10 Computer on Module
7 * Copyright (C) 2009 Embedian Inc.
8 * Copyright (C) 2009 TMT Services & Supplies (Pty) Ltd.
10 * 2007-09-04: eric miao <eric.y.miao@gmail.com>
11 * rewrite to align with latest kernel
13 * 2010-01-09: Edwin Peer <epeer@tmtservices.co.za>
14 * Hennie van der Merwe <hvdmerwe@tmtservices.co.za>
15 * rework for upstream merge
17 * This program is free software; you can redistribute it and/or modify
18 * it under the terms of the GNU General Public License version 2 as
19 * published by the Free Software Foundation.
22 #include <linux/irq.h>
23 #include <linux/platform_device.h>
24 #include <linux/ata_platform.h>
25 #include <linux/serial_8250.h>
26 #include <linux/gpio.h>
28 #include <asm/mach-types.h>
29 #include <asm/mach/arch.h>
31 #include <mach/pxa320.h>
32 #include <mach/mxm8x10.h>
36 /* IDE (PATA) Support */
37 static struct pata_platform_info pata_platform_data
= {
41 static struct resource capc7117_ide_resources
[] = {
45 .flags
= IORESOURCE_MEM
50 .flags
= IORESOURCE_MEM
53 .start
= PXA_GPIO_TO_IRQ(mfp_to_gpio(MFP_PIN_GPIO76
)),
54 .end
= PXA_GPIO_TO_IRQ(mfp_to_gpio(MFP_PIN_GPIO76
)),
55 .flags
= IORESOURCE_IRQ
| IRQF_TRIGGER_RISING
59 static struct platform_device capc7117_ide_device
= {
60 .name
= "pata_platform",
61 .num_resources
= ARRAY_SIZE(capc7117_ide_resources
),
62 .resource
= capc7117_ide_resources
,
64 .platform_data
= &pata_platform_data
,
65 .coherent_dma_mask
= ~0 /* grumble */
69 static void __init
capc7117_ide_init(void)
71 platform_device_register(&capc7117_ide_device
);
74 /* TI16C752 UART support */
75 #define TI16C752_FLAGS (UPF_BOOT_AUTOCONF | \
79 #define TI16C752_UARTCLK (22118400)
80 static struct plat_serial8250_port ti16c752_platform_data
[] = {
82 .mapbase
= 0x14000000,
83 .irq
= PXA_GPIO_TO_IRQ(mfp_to_gpio(MFP_PIN_GPIO78
)),
84 .irqflags
= IRQF_TRIGGER_RISING
,
85 .flags
= TI16C752_FLAGS
,
88 .uartclk
= TI16C752_UARTCLK
91 .mapbase
= 0x14000040,
92 .irq
= PXA_GPIO_TO_IRQ(mfp_to_gpio(MFP_PIN_GPIO79
)),
93 .irqflags
= IRQF_TRIGGER_RISING
,
94 .flags
= TI16C752_FLAGS
,
97 .uartclk
= TI16C752_UARTCLK
100 .mapbase
= 0x14000080,
101 .irq
= PXA_GPIO_TO_IRQ(mfp_to_gpio(MFP_PIN_GPIO80
)),
102 .irqflags
= IRQF_TRIGGER_RISING
,
103 .flags
= TI16C752_FLAGS
,
106 .uartclk
= TI16C752_UARTCLK
109 .mapbase
= 0x140000c0,
110 .irq
= PXA_GPIO_TO_IRQ(mfp_to_gpio(MFP_PIN_GPIO81
)),
111 .irqflags
= IRQF_TRIGGER_RISING
,
112 .flags
= TI16C752_FLAGS
,
115 .uartclk
= TI16C752_UARTCLK
122 static struct platform_device ti16c752_device
= {
123 .name
= "serial8250",
124 .id
= PLAT8250_DEV_PLATFORM
,
126 .platform_data
= ti16c752_platform_data
130 static void __init
capc7117_uarts_init(void)
132 platform_device_register(&ti16c752_device
);
135 static void __init
capc7117_init(void)
138 mxm_8x10_barebones_init();
140 /* Init evaluation board peripherals */
141 mxm_8x10_ac97_init();
142 mxm_8x10_usb_host_init();
145 capc7117_uarts_init();
149 MACHINE_START(CAPC7117
,
150 "Embedian CAPC-7117 evaluation kit based on the MXM-8x10 CoM")
151 .atag_offset
= 0x100,
152 .map_io
= pxa3xx_map_io
,
153 .init_irq
= pxa3xx_init_irq
,
154 .handle_irq
= pxa3xx_handle_irq
,
156 .init_machine
= capc7117_init
,
157 .restart
= pxa_restart
,