blob: 4cbdc1fe04b1cff7e0f9315b1367f6a0d24b396d [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001/*
2 * arch/arm/mach-imx/mx1ads.c
3 *
4 * Initially based on:
5 * linux-2.6.7-imx/arch/arm/mach-imx/scb9328.c
6 * Copyright (c) 2004 Sascha Hauer <sascha@saschahauer.de>
7 *
8 * 2004 (c) MontaVista Software, Inc.
9 *
10 * This file is licensed under the terms of the GNU General Public
11 * License version 2. This program is licensed "as is" without any
12 * warranty of any kind, whether express or implied.
13 */
14
15#include <linux/device.h>
16#include <linux/init.h>
17#include <asm/system.h>
18#include <asm/hardware.h>
19#include <asm/irq.h>
20#include <asm/pgtable.h>
21#include <asm/page.h>
22
23#include <asm/mach/map.h>
24#include <asm/mach-types.h>
25
26#include <asm/mach/arch.h>
27#include <linux/interrupt.h>
28#include "generic.h"
29#include <asm/serial.h>
30
31static struct resource mx1ads_resources[] = {
32 [0] = {
33 .start = IMX_CS4_VIRT,
34 .end = IMX_CS4_VIRT + 16,
35 .flags = IORESOURCE_MEM,
36 },
37 [1] = {
38 .start = 13,
39 .end = 13,
40 .flags = IORESOURCE_IRQ,
41 },
42};
43
44static struct platform_device mx1ads_device = {
45 .name = "mx1ads",
46 .num_resources = ARRAY_SIZE(mx1ads_resources),
47 .resource = mx1ads_resources,
48};
49
50static struct platform_device *devices[] __initdata = {
51 &mx1ads_device,
52};
53
54static void __init
55mx1ads_init(void)
56{
57#ifdef CONFIG_LEDS
Sascha Hauer0a5b0aa2005-10-04 23:17:52 +010058 imx_gpio_mode(GPIO_PORTA | GPIO_OUT | 2);
Linus Torvalds1da177e2005-04-16 15:20:36 -070059#endif
60 platform_add_devices(devices, ARRAY_SIZE(devices));
61}
62
63static struct map_desc mx1ads_io_desc[] __initdata = {
Deepak Saxenaadecef72005-10-28 15:19:10 +010064 {
65 .virtual = IMX_CS0_VIRT,
66 .pfn = __phys_to_pfn(IMX_CS0_PHYS),
67 .length = IMX_CS0_SIZE,
68 .type = MT_DEVICE
69 }, {
70 .virtual = IMX_CS1_VIRT,
71 .pfn = __phys_to_pfn(IMX_CS1_PHYS),
72 .length = IMX_CS1_SIZE,
73 .type = MT_DEVICE
74 }, {
75 .virtual = IMX_CS2_VIRT,
76 .pfn = __phys_to_pfn(IMX_CS2_PHYS),
77 .length = IMX_CS2_SIZE,
78 .type = MT_DEVICE
79 }, {
80 .virtual = IMX_CS3_VIRT,
81 .pfn = __phys_to_pfn(IMX_CS3_PHYS),
82 .length = IMX_CS3_SIZE,
83 .type = MT_DEVICE
84 }, {
85 .virtual = IMX_CS4_VIRT,
86 .pfn = __phys_to_pfn(IMX_CS4_PHYS),
87 .length = IMX_CS4_SIZE,
88 .type = MT_DEVICE
89 }, {
90 .virtual = IMX_CS5_VIRT,
91 .pfn = __phys_to_pfn(IMX_CS5_PHYS),
92 .length = IMX_CS5_SIZE,
93 .type = MT_DEVICE
94 }
Linus Torvalds1da177e2005-04-16 15:20:36 -070095};
96
97static void __init
98mx1ads_map_io(void)
99{
100 imx_map_io();
101 iotable_init(mx1ads_io_desc, ARRAY_SIZE(mx1ads_io_desc));
102}
103
104MACHINE_START(MX1ADS, "Motorola MX1ADS")
Russell Kinge9dea0c2005-07-03 17:38:58 +0100105 /* Maintainer: Sascha Hauer, Pengutronix */
106 .phys_ram = 0x08000000,
107 .phys_io = 0x00200000,
108 .io_pg_offst = ((0xe0200000) >> 18) & 0xfffc,
109 .boot_params = 0x08000100,
110 .map_io = mx1ads_map_io,
111 .init_irq = imx_init_irq,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700112 .timer = &imx_timer,
Russell Kinge9dea0c2005-07-03 17:38:58 +0100113 .init_machine = mx1ads_init,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700114MACHINE_END