blob: 958cd6af93842566308a33d11f1799dd78f332d9 [file] [log] [blame]
Russell Kinga09e64f2008-08-05 16:14:15 +01001/*
2 * arch/arm/mach-pxa/include/mach/lubbock.h
3 *
4 * Author: Nicolas Pitre
5 * Created: Jun 15, 2001
6 * Copyright: MontaVista Software Inc.
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11 */
12
Linus Walleij99284222013-12-11 09:48:58 +010013#include <mach/irqs.h>
14
Russell Kinga09e64f2008-08-05 16:14:15 +010015#define LUBBOCK_ETH_PHYS PXA_CS3_PHYS
16
17#define LUBBOCK_FPGA_PHYS PXA_CS2_PHYS
18#define LUBBOCK_FPGA_VIRT (0xf0000000)
19#define LUB_P2V(x) ((x) - LUBBOCK_FPGA_PHYS + LUBBOCK_FPGA_VIRT)
20#define LUB_V2P(x) ((x) - LUBBOCK_FPGA_VIRT + LUBBOCK_FPGA_PHYS)
21
22#ifndef __ASSEMBLY__
23# define __LUB_REG(x) (*((volatile unsigned long *)LUB_P2V(x)))
24#else
25# define __LUB_REG(x) LUB_P2V(x)
26#endif
27
28/* FPGA register virtual addresses */
29#define LUB_WHOAMI __LUB_REG(LUBBOCK_FPGA_PHYS + 0x000)
Russell Kinga09e64f2008-08-05 16:14:15 +010030#define LUB_DISC_BLNK_LED __LUB_REG(LUBBOCK_FPGA_PHYS + 0x040)
31#define LUB_CONF_SWITCHES __LUB_REG(LUBBOCK_FPGA_PHYS + 0x050)
32#define LUB_USER_SWITCHES __LUB_REG(LUBBOCK_FPGA_PHYS + 0x060)
33#define LUB_MISC_WR __LUB_REG(LUBBOCK_FPGA_PHYS + 0x080)
34#define LUB_MISC_RD __LUB_REG(LUBBOCK_FPGA_PHYS + 0x090)
35#define LUB_IRQ_MASK_EN __LUB_REG(LUBBOCK_FPGA_PHYS + 0x0c0)
36#define LUB_IRQ_SET_CLR __LUB_REG(LUBBOCK_FPGA_PHYS + 0x0d0)
37#define LUB_GP __LUB_REG(LUBBOCK_FPGA_PHYS + 0x100)
38
Eric Miao0dc726b2009-12-27 23:01:25 +080039/* Board specific IRQs */
40#define LUBBOCK_IRQ(x) (IRQ_BOARD_START + (x))
41#define LUBBOCK_SD_IRQ LUBBOCK_IRQ(0)
42#define LUBBOCK_SA1111_IRQ LUBBOCK_IRQ(1)
43#define LUBBOCK_USB_IRQ LUBBOCK_IRQ(2) /* usb connect */
44#define LUBBOCK_ETH_IRQ LUBBOCK_IRQ(3)
45#define LUBBOCK_UCB1400_IRQ LUBBOCK_IRQ(4)
46#define LUBBOCK_BB_IRQ LUBBOCK_IRQ(5)
47#define LUBBOCK_USB_DISC_IRQ LUBBOCK_IRQ(6) /* usb disconnect */
48#define LUBBOCK_LAST_IRQ LUBBOCK_IRQ(6)
49
Haojian Zhuang6ac6b812010-08-20 15:23:59 +080050#define LUBBOCK_SA1111_IRQ_BASE (IRQ_BOARD_START + 16)
51#define LUBBOCK_NR_IRQS (IRQ_BOARD_START + 16 + 55)
52
Russell Kinga09e64f2008-08-05 16:14:15 +010053#ifndef __ASSEMBLY__
54extern void lubbock_set_misc_wr(unsigned int mask, unsigned int set);
55#endif