blob: f47002a60edf59dd293906233df56fc386c67679 [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001/*
2 * include/asm-ppc/mpc85xx.h
3 *
4 * MPC85xx definitions
5 *
Kumar Gala4c8d3d92005-11-13 16:06:30 -08006 * Maintainer: Kumar Gala <galak@kernel.crashing.org>
Linus Torvalds1da177e2005-04-16 15:20:36 -07007 *
8 * Copyright 2004 Freescale Semiconductor, Inc
9 *
10 * This program is free software; you can redistribute it and/or modify it
11 * under the terms of the GNU General Public License as published by the
12 * Free Software Foundation; either version 2 of the License, or (at your
13 * option) any later version.
14 */
15
16#ifdef __KERNEL__
17#ifndef __ASM_MPC85xx_H__
18#define __ASM_MPC85xx_H__
19
20#include <linux/config.h>
21#include <asm/mmu.h>
22
23#ifdef CONFIG_85xx
24
25#ifdef CONFIG_MPC8540_ADS
26#include <platforms/85xx/mpc8540_ads.h>
27#endif
Kumar Galac91999b2005-06-21 17:15:19 -070028#if defined(CONFIG_MPC8555_CDS) || defined(CONFIG_MPC8548_CDS)
Linus Torvalds1da177e2005-04-16 15:20:36 -070029#include <platforms/85xx/mpc8555_cds.h>
30#endif
31#ifdef CONFIG_MPC8560_ADS
32#include <platforms/85xx/mpc8560_ads.h>
33#endif
34#ifdef CONFIG_SBC8560
35#include <platforms/85xx/sbc8560.h>
36#endif
37#ifdef CONFIG_STX_GP3
38#include <platforms/85xx/stx_gp3.h>
39#endif
Kumar Galaa819f8b2005-12-09 11:57:44 -060040#if defined(CONFIG_TQM8540) || defined(CONFIG_TQM8541) || \
41 defined(CONFIG_TQM8555) || defined(CONFIG_TQM8560)
42#include <platforms/85xx/tqm85xx.h>
43#endif
Linus Torvalds1da177e2005-04-16 15:20:36 -070044
45#define _IO_BASE isa_io_base
46#define _ISA_MEM_BASE isa_mem_base
47#ifdef CONFIG_PCI
48#define PCI_DRAM_OFFSET pci_dram_offset
49#else
50#define PCI_DRAM_OFFSET 0
51#endif
52
53/*
54 * The "residual" board information structure the boot loader passes
55 * into the kernel.
56 */
57extern unsigned char __res[];
58
59/* Offset from CCSRBAR */
60#define MPC85xx_CPM_OFFSET (0x80000)
61#define MPC85xx_CPM_SIZE (0x40000)
62#define MPC85xx_DMA_OFFSET (0x21000)
63#define MPC85xx_DMA_SIZE (0x01000)
64#define MPC85xx_DMA0_OFFSET (0x21100)
65#define MPC85xx_DMA0_SIZE (0x00080)
66#define MPC85xx_DMA1_OFFSET (0x21180)
67#define MPC85xx_DMA1_SIZE (0x00080)
68#define MPC85xx_DMA2_OFFSET (0x21200)
69#define MPC85xx_DMA2_SIZE (0x00080)
70#define MPC85xx_DMA3_OFFSET (0x21280)
71#define MPC85xx_DMA3_SIZE (0x00080)
72#define MPC85xx_ENET1_OFFSET (0x24000)
73#define MPC85xx_ENET1_SIZE (0x01000)
Andy Flemingb37665e2005-10-28 17:46:27 -070074#define MPC85xx_MIIM_OFFSET (0x24520)
75#define MPC85xx_MIIM_SIZE (0x00018)
Linus Torvalds1da177e2005-04-16 15:20:36 -070076#define MPC85xx_ENET2_OFFSET (0x25000)
77#define MPC85xx_ENET2_SIZE (0x01000)
78#define MPC85xx_ENET3_OFFSET (0x26000)
79#define MPC85xx_ENET3_SIZE (0x01000)
80#define MPC85xx_GUTS_OFFSET (0xe0000)
81#define MPC85xx_GUTS_SIZE (0x01000)
82#define MPC85xx_IIC1_OFFSET (0x03000)
Kumar Gala5b37b702005-06-21 17:15:18 -070083#define MPC85xx_IIC1_SIZE (0x00100)
Linus Torvalds1da177e2005-04-16 15:20:36 -070084#define MPC85xx_OPENPIC_OFFSET (0x40000)
85#define MPC85xx_OPENPIC_SIZE (0x40000)
86#define MPC85xx_PCI1_OFFSET (0x08000)
87#define MPC85xx_PCI1_SIZE (0x01000)
88#define MPC85xx_PCI2_OFFSET (0x09000)
89#define MPC85xx_PCI2_SIZE (0x01000)
90#define MPC85xx_PERFMON_OFFSET (0xe1000)
91#define MPC85xx_PERFMON_SIZE (0x01000)
92#define MPC85xx_SEC2_OFFSET (0x30000)
93#define MPC85xx_SEC2_SIZE (0x10000)
94#define MPC85xx_UART0_OFFSET (0x04500)
95#define MPC85xx_UART0_SIZE (0x00100)
96#define MPC85xx_UART1_OFFSET (0x04600)
97#define MPC85xx_UART1_SIZE (0x00100)
98
99#define MPC85xx_CCSRBAR_SIZE (1024*1024)
100
101/* Let modules/drivers get at CCSRBAR */
102extern phys_addr_t get_ccsrbar(void);
103
104#ifdef MODULE
105#define CCSRBAR get_ccsrbar()
106#else
107#define CCSRBAR BOARD_CCSRBAR
108#endif
109
110enum ppc_sys_devices {
111 MPC85xx_TSEC1,
112 MPC85xx_TSEC2,
113 MPC85xx_FEC,
114 MPC85xx_IIC1,
115 MPC85xx_DMA0,
116 MPC85xx_DMA1,
117 MPC85xx_DMA2,
118 MPC85xx_DMA3,
119 MPC85xx_DUART,
120 MPC85xx_PERFMON,
121 MPC85xx_SEC2,
122 MPC85xx_CPM_SPI,
123 MPC85xx_CPM_I2C,
124 MPC85xx_CPM_USB,
125 MPC85xx_CPM_SCC1,
126 MPC85xx_CPM_SCC2,
127 MPC85xx_CPM_SCC3,
128 MPC85xx_CPM_SCC4,
129 MPC85xx_CPM_FCC1,
130 MPC85xx_CPM_FCC2,
131 MPC85xx_CPM_FCC3,
132 MPC85xx_CPM_MCC1,
133 MPC85xx_CPM_MCC2,
134 MPC85xx_CPM_SMC1,
135 MPC85xx_CPM_SMC2,
Kumar Gala5b37b702005-06-21 17:15:18 -0700136 MPC85xx_eTSEC1,
137 MPC85xx_eTSEC2,
138 MPC85xx_eTSEC3,
139 MPC85xx_eTSEC4,
140 MPC85xx_IIC2,
Andy Flemingb37665e2005-10-28 17:46:27 -0700141 MPC85xx_MDIO,
Vitaly Bordug75288c72006-01-20 22:22:34 +0300142 NUM_PPC_SYS_DEVS,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700143};
144
Kumar Gala65145e02005-06-21 17:15:25 -0700145/* Internal interrupts are all Level Sensitive, and Positive Polarity */
146#define MPC85XX_INTERNAL_IRQ_SENSES \
147 (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 0 */ \
148 (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 1 */ \
149 (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 2 */ \
150 (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 3 */ \
151 (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 4 */ \
152 (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 5 */ \
153 (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 6 */ \
154 (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 7 */ \
155 (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 8 */ \
156 (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 9 */ \
157 (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 10 */ \
158 (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 11 */ \
159 (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 12 */ \
160 (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 13 */ \
161 (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 14 */ \
162 (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 15 */ \
163 (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 16 */ \
164 (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 17 */ \
165 (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 18 */ \
166 (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 19 */ \
167 (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 20 */ \
168 (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 21 */ \
169 (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 22 */ \
170 (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 23 */ \
171 (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 24 */ \
172 (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 25 */ \
173 (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 26 */ \
174 (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 27 */ \
175 (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 28 */ \
176 (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 29 */ \
177 (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 30 */ \
178 (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 31 */ \
179 (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 32 */ \
180 (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 33 */ \
181 (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 34 */ \
182 (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 35 */ \
183 (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 36 */ \
184 (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 37 */ \
185 (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 38 */ \
186 (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 39 */ \
187 (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 40 */ \
188 (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 41 */ \
189 (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 42 */ \
190 (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 43 */ \
191 (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 44 */ \
192 (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 45 */ \
193 (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 46 */ \
194 (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE) /* Internal 47 */
195
Linus Torvalds1da177e2005-04-16 15:20:36 -0700196#endif /* CONFIG_85xx */
197#endif /* __ASM_MPC85xx_H__ */
198#endif /* __KERNEL__ */