Merge git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client
[pandora-kernel.git] / arch / unicore32 / include / mach / PKUnity.h
1 /*
2  * linux/arch/unicore32/include/mach/PKUnity.h
3  *
4  * Code specific to PKUnity SoC and UniCore ISA
5  *
6  * Copyright (C) 2001-2010 GUAN Xue-tao
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
13 /* Be sure that virtual mapping is defined right */
14 #ifndef __MACH_PUV3_HARDWARE_H__
15 #error You must include hardware.h not PKUnity.h
16 #endif
17
18 #include "bitfield.h"
19
20 /*
21  * Memory Definitions
22  */
23 #define PKUNITY_SDRAM_BASE              0x00000000 /* 0x00000000 - 0x7FFFFFFF 2GB */
24 #define PKUNITY_MMIO_BASE               0x80000000 /* 0x80000000 - 0xFFFFFFFF 2GB */
25
26 /*
27  * PKUNITY Memory Map Addresses: 0x0D000000 - 0x0EFFFFFF (32MB)
28  *      0x0D000000 - 0x0DFFFFFF 16MB: for UVC
29  *      0x0E000000 - 0x0EFFFFFF 16MB: for UNIGFX
30  */
31 #define PKUNITY_UVC_MMAP_BASE           0x0D000000
32 #define PKUNITY_UVC_MMAP_SIZE           0x01000000 /* 16MB */
33 #define PKUNITY_UNIGFX_MMAP_BASE        0x0E000000
34 #define PKUNITY_UNIGFX_MMAP_SIZE        0x01000000 /* 16MB */
35
36 /*
37  * PKUNITY System Bus Addresses (PCI): 0x80000000 - 0xBFFFFFFF (1GB)
38  * 0x80000000 - 0x8000000B 12B    PCI Configuration regs
39  * 0x80010000 - 0x80010250 592B   PCI Bridge Base
40  * 0x80030000 - 0x8003FFFF 64KB   PCI Legacy IO
41  * 0x90000000 - 0x97FFFFFF 128MB  PCI AHB-PCI MEM-mapping
42  * 0x98000000 - 0x9FFFFFFF 128MB  PCI PCI-AHB MEM-mapping
43  */
44 #define PKUNITY_PCI_BASE                io_p2v(0x80000000) /* 0x80000000 - 0xBFFFFFFF 1GB */
45 #include "regs-pci.h"
46
47 #define PKUNITY_PCICFG_BASE             (PKUNITY_PCI_BASE + 0x0)
48 #define PKUNITY_PCIBRI_BASE             (PKUNITY_PCI_BASE + 0x00010000)
49 #define PKUNITY_PCILIO_BASE             (PKUNITY_PCI_BASE + 0x00030000)
50 #define PKUNITY_PCIMEM_BASE             (PKUNITY_PCI_BASE + 0x10000000)
51 #define PKUNITY_PCIAHB_BASE             (PKUNITY_PCI_BASE + 0x18000000)
52
53 /*
54  * PKUNITY System Bus Addresses (AHB): 0xC0000000 - 0xEDFFFFFF (640MB)
55  */
56 #define PKUNITY_AHB_BASE                io_p2v(0xC0000000)
57
58 /* AHB-0 is DDR2 SDRAM */
59 /* AHB-1 is PCI Space */
60 #define PKUNITY_ARBITER_BASE            (PKUNITY_AHB_BASE + 0x000000) /* AHB-2 */
61 #define PKUNITY_DDR2CTRL_BASE           (PKUNITY_AHB_BASE + 0x100000) /* AHB-3 */
62 #define PKUNITY_DMAC_BASE               (PKUNITY_AHB_BASE + 0x200000) /* AHB-4 */
63 #include "regs-dmac.h"
64 #define PKUNITY_UMAL_BASE               (PKUNITY_AHB_BASE + 0x300000) /* AHB-5 */
65 #include "regs-umal.h"
66 #define PKUNITY_USB_BASE                (PKUNITY_AHB_BASE + 0x400000) /* AHB-6 */
67 #define PKUNITY_SATA_BASE               (PKUNITY_AHB_BASE + 0x500000) /* AHB-7 */
68 #define PKUNITY_SMC_BASE                (PKUNITY_AHB_BASE + 0x600000) /* AHB-8 */
69 /* AHB-9 is for APB bridge */
70 #define PKUNITY_MME_BASE                (PKUNITY_AHB_BASE + 0x700000) /* AHB-10 */
71 #define PKUNITY_UNIGFX_BASE             (PKUNITY_AHB_BASE + 0x800000) /* AHB-11 */
72 #include "regs-unigfx.h"
73 #define PKUNITY_NAND_BASE               (PKUNITY_AHB_BASE + 0x900000) /* AHB-12 */
74 #include "regs-nand.h"
75 #define PKUNITY_H264D_BASE              (PKUNITY_AHB_BASE + 0xA00000) /* AHB-13 */
76 #define PKUNITY_H264E_BASE              (PKUNITY_AHB_BASE + 0xB00000) /* AHB-14 */
77
78 /*
79  * PKUNITY Peripheral Bus Addresses (APB): 0xEE000000 - 0xEFFFFFFF (128MB)
80  */
81 #define PKUNITY_APB_BASE                io_p2v(0xEE000000)
82
83 #define PKUNITY_UART0_BASE              (PKUNITY_APB_BASE + 0x000000) /* APB-0 */
84 #define PKUNITY_UART1_BASE              (PKUNITY_APB_BASE + 0x100000) /* APB-1 */
85 #include "regs-uart.h"
86 #define PKUNITY_I2C_BASE                (PKUNITY_APB_BASE + 0x200000) /* APB-2 */
87 #include "regs-i2c.h"
88 #define PKUNITY_SPI_BASE                (PKUNITY_APB_BASE + 0x300000) /* APB-3 */
89 #include "regs-spi.h"
90 #define PKUNITY_AC97_BASE               (PKUNITY_APB_BASE + 0x400000) /* APB-4 */
91 #include "regs-ac97.h"
92 #define PKUNITY_GPIO_BASE               (PKUNITY_APB_BASE + 0x500000) /* APB-5 */
93 #include "regs-gpio.h"
94 #define PKUNITY_INTC_BASE               (PKUNITY_APB_BASE + 0x600000) /* APB-6 */
95 #include "regs-intc.h"
96 #define PKUNITY_RTC_BASE                (PKUNITY_APB_BASE + 0x700000) /* APB-7 */
97 #include "regs-rtc.h"
98 #define PKUNITY_OST_BASE                (PKUNITY_APB_BASE + 0x800000) /* APB-8 */
99 #include "regs-ost.h"
100 #define PKUNITY_RESETC_BASE             (PKUNITY_APB_BASE + 0x900000) /* APB-9 */
101 #include "regs-resetc.h"
102 #define PKUNITY_PM_BASE                 (PKUNITY_APB_BASE + 0xA00000) /* APB-10 */
103 #include "regs-pm.h"
104 #define PKUNITY_PS2_BASE                (PKUNITY_APB_BASE + 0xB00000) /* APB-11 */
105 #include "regs-ps2.h"
106 #define PKUNITY_SDC_BASE                (PKUNITY_APB_BASE + 0xC00000) /* APB-12 */
107 #include "regs-sdc.h"
108