blob: 44269b162d4918e468542ab58a3627cda43c014d [file] [log] [blame]
Catalin Marinas8ad68bb2005-10-31 14:25:02 +00001/*
2 * linux/arch/arm/mach-realview/core.h
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
22#ifndef __ASM_ARCH_REALVIEW_H
23#define __ASM_ARCH_REALVIEW_H
24
Russell Kinga62c80e2006-01-07 13:52:45 +000025#include <linux/amba/bus.h>
Russell Kingfced80c2008-09-06 12:10:45 +010026#include <linux/io.h>
Russell Kinga62c80e2006-01-07 13:52:45 +000027
Russell King01bbaf02005-11-07 10:30:16 +000028#include <asm/leds.h>
Catalin Marinas8ad68bb2005-10-31 14:25:02 +000029
Catalin Marinas8ad68bb2005-10-31 14:25:02 +000030#define AMBA_DEVICE(name,busid,base,plat) \
31static struct amba_device name##_device = { \
32 .dev = { \
33 .coherent_dma_mask = ~0, \
Kay Sievers1d559e22009-01-06 10:44:43 -080034 .init_name = busid, \
Catalin Marinas8ad68bb2005-10-31 14:25:02 +000035 .platform_data = plat, \
36 }, \
37 .res = { \
38 .start = REALVIEW_##base##_BASE, \
Catalin Marinas0fc2a162008-02-04 17:36:59 +010039 .end = (REALVIEW_##base##_BASE) + SZ_4K - 1, \
Catalin Marinas8ad68bb2005-10-31 14:25:02 +000040 .flags = IORESOURCE_MEM, \
41 }, \
42 .dma_mask = ~0, \
43 .irq = base##_IRQ, \
44 /* .dma = base##_DMA,*/ \
45}
46
Catalin Marinas8ad68bb2005-10-31 14:25:02 +000047extern struct platform_device realview_flash_device;
Russell King6b65cd72006-12-10 21:21:32 +010048extern struct platform_device realview_i2c_device;
Catalin Marinas8ad68bb2005-10-31 14:25:02 +000049extern struct mmc_platform_data realview_mmc0_plat_data;
50extern struct mmc_platform_data realview_mmc1_plat_data;
Catalin Marinas8ad68bb2005-10-31 14:25:02 +000051extern struct clcd_board clcd_plat_data;
Catalin Marinasc4057f52008-02-04 17:41:01 +010052extern void __iomem *gic_cpu_base_addr;
Catalin Marinas39e823e2008-02-04 17:45:03 +010053#ifdef CONFIG_LOCAL_TIMERS
Catalin Marinasebac6542008-12-01 14:54:57 +000054extern void __iomem *twd_base;
Catalin Marinas39e823e2008-02-04 17:45:03 +010055#endif
Catalin Marinas80192732008-04-18 22:43:11 +010056extern void __iomem *timer0_va_base;
57extern void __iomem *timer1_va_base;
58extern void __iomem *timer2_va_base;
59extern void __iomem *timer3_va_base;
Catalin Marinas8ad68bb2005-10-31 14:25:02 +000060
61extern void realview_leds_event(led_event_t ledevt);
Catalin Marinas8cc4c542008-02-04 17:43:02 +010062extern void realview_timer_init(unsigned int timer_irq);
Catalin Marinasa44ddfd2008-04-18 22:43:10 +010063extern int realview_flash_register(struct resource *res, u32 num);
Catalin Marinas0a381332008-12-01 14:54:58 +000064extern int realview_eth_register(const char *name, struct resource *res);
Catalin Marinas8ad68bb2005-10-31 14:25:02 +000065
66#endif