Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
[deliverable/linux.git] / arch / arm / mach-versatile / versatile_pb.c
CommitLineData
1da177e4
LT
1/*
2 * linux/arch/arm/mach-versatile/versatile_pb.c
3 *
4 * Copyright (C) 2004 ARM Limited
5 * Copyright (C) 2000 Deep Blue Solutions Ltd
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 */
21
1da177e4
LT
22#include <linux/init.h>
23#include <linux/device.h>
a62c80e5 24#include <linux/amba/bus.h>
bbeddc43 25#include <linux/amba/pl061.h>
6ef297f8 26#include <linux/amba/mmci.h>
fced80c7 27#include <linux/io.h>
1da177e4 28
a09e64fb 29#include <mach/hardware.h>
1da177e4
LT
30#include <asm/irq.h>
31#include <asm/mach-types.h>
1da177e4
LT
32
33#include <asm/mach/arch.h>
1da177e4
LT
34
35#include "core.h"
36
37#if 1
38#define IRQ_MMCI1A IRQ_VICSOURCE23
39#else
40#define IRQ_MMCI1A IRQ_SIC_MMCI1A
41#endif
42
6ef297f8 43static struct mmci_platform_data mmc1_plat_data = {
1da177e4
LT
44 .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34,
45 .status = mmc_status,
7fb2bbf4
RK
46 .gpio_wp = -1,
47 .gpio_cd = -1,
1da177e4
LT
48};
49
bbeddc43
RK
50static struct pl061_platform_data gpio2_plat_data = {
51 .gpio_base = 16,
52 .irq_base = IRQ_GPIO2_START,
53};
54
55static struct pl061_platform_data gpio3_plat_data = {
56 .gpio_base = 24,
57 .irq_base = IRQ_GPIO3_START,
58};
59
0dada61a
RK
60#define UART3_IRQ { IRQ_SIC_UART3 }
61#define SCI1_IRQ { IRQ_SIC_SCI3 }
1da177e4 62#define MMCI1_IRQ { IRQ_MMCI1A, IRQ_SIC_MMCI1B }
1da177e4
LT
63
64/*
65 * These devices are connected via the core APB bridge
66 */
0dada61a
RK
67#define GPIO2_IRQ { IRQ_GPIOINT2 }
68#define GPIO3_IRQ { IRQ_GPIOINT3 }
1da177e4
LT
69
70/*
71 * These devices are connected via the DMA APB bridge
72 */
73
74/* FPGA Primecells */
8f5088b6
RK
75APB_DEVICE(uart3, "fpga:09", UART3, NULL);
76APB_DEVICE(sci1, "fpga:0a", SCI1, NULL);
77APB_DEVICE(mmc1, "fpga:0b", MMCI1, &mmc1_plat_data);
1da177e4
LT
78
79/* DevChip Primecells */
8f5088b6
RK
80APB_DEVICE(gpio2, "dev:e6", GPIO2, &gpio2_plat_data);
81APB_DEVICE(gpio3, "dev:e7", GPIO3, &gpio3_plat_data);
1da177e4
LT
82
83static struct amba_device *amba_devs[] __initdata = {
84 &uart3_device,
85 &gpio2_device,
86 &gpio3_device,
87 &sci1_device,
88 &mmc1_device,
89};
90
4e4e520f 91static void __init versatile_pb_init(void)
1da177e4
LT
92{
93 int i;
94
4e4e520f 95 versatile_init();
1da177e4 96
4e4e520f
RK
97 for (i = 0; i < ARRAY_SIZE(amba_devs); i++) {
98 struct amba_device *d = amba_devs[i];
99 amba_device_register(d, &iomem_resource);
100 }
1da177e4
LT
101}
102
1da177e4 103MACHINE_START(VERSATILE_PB, "ARM-Versatile PB")
e9dea0c6 104 /* Maintainer: ARM Ltd/Deep Blue Solutions Ltd */
171fa8a7 105 .atag_offset = 0x100,
e9dea0c6 106 .map_io = versatile_map_io,
ad3bb19c 107 .init_early = versatile_init_early,
e9dea0c6 108 .init_irq = versatile_init_irq,
6bb27d73 109 .init_time = versatile_timer_init,
4e4e520f 110 .init_machine = versatile_pb_init,
b56a7c6b 111 .restart = versatile_restart,
1da177e4 112MACHINE_END
This page took 0.930515 seconds and 5 git commands to generate.