Merge git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc
[linux-2.6] / arch / ppc / syslib / mpc85xx_sys.c
1 /*
2  * MPC85xx System descriptions
3  *
4  * Maintainer: Kumar Gala <galak@kernel.crashing.org>
5  *
6  * Copyright 2005 Freescale Semiconductor Inc.
7  *
8  * This program is free software; you can redistribute  it and/or modify it
9  * under  the terms of  the GNU General  Public License as published by the
10  * Free Software Foundation;  either version 2 of the  License, or (at your
11  * option) any later version.
12  */
13
14 #include <linux/init.h>
15 #include <linux/module.h>
16 #include <linux/device.h>
17 #include <asm/ppc_sys.h>
18
19 struct ppc_sys_spec *cur_ppc_sys_spec;
20 struct ppc_sys_spec ppc_sys_specs[] = {
21         {
22                 .ppc_sys_name   = "8540",
23                 .mask           = 0xFFFF0000,
24                 .value          = 0x80300000,
25                 .num_devices    = 11,
26                 .device_list    = (enum ppc_sys_devices[])
27                 {
28                         MPC85xx_TSEC1, MPC85xx_TSEC2, MPC85xx_FEC, MPC85xx_IIC1,
29                         MPC85xx_DMA0, MPC85xx_DMA1, MPC85xx_DMA2, MPC85xx_DMA3,
30                         MPC85xx_PERFMON, MPC85xx_DUART, MPC85xx_MDIO,
31                 },
32         },
33         {
34                 .ppc_sys_name   = "8560",
35                 .mask           = 0xFFFF0000,
36                 .value          = 0x80700000,
37                 .num_devices    = 20,
38                 .device_list    = (enum ppc_sys_devices[])
39                 {
40                         MPC85xx_TSEC1, MPC85xx_TSEC2, MPC85xx_IIC1,
41                         MPC85xx_DMA0, MPC85xx_DMA1, MPC85xx_DMA2, MPC85xx_DMA3,
42                         MPC85xx_PERFMON,
43                         MPC85xx_CPM_SPI, MPC85xx_CPM_I2C, MPC85xx_CPM_SCC1,
44                         MPC85xx_CPM_SCC2, MPC85xx_CPM_SCC3, MPC85xx_CPM_SCC4,
45                         MPC85xx_CPM_FCC1, MPC85xx_CPM_FCC2, MPC85xx_CPM_FCC3,
46                         MPC85xx_CPM_MCC1, MPC85xx_CPM_MCC2, MPC85xx_MDIO,
47                 },
48         },
49         {
50                 .ppc_sys_name   = "8541",
51                 .mask           = 0xFFFF0000,
52                 .value          = 0x80720000,
53                 .num_devices    = 14,
54                 .device_list    = (enum ppc_sys_devices[])
55                 {
56                         MPC85xx_TSEC1, MPC85xx_TSEC2, MPC85xx_IIC1,
57                         MPC85xx_DMA0, MPC85xx_DMA1, MPC85xx_DMA2, MPC85xx_DMA3,
58                         MPC85xx_PERFMON, MPC85xx_DUART,
59                         MPC85xx_CPM_SPI, MPC85xx_CPM_I2C,
60                         MPC85xx_CPM_FCC1, MPC85xx_CPM_FCC2,
61                         MPC85xx_MDIO,
62                 },
63         },
64         {
65                 .ppc_sys_name   = "8541E",
66                 .mask           = 0xFFFF0000,
67                 .value          = 0x807A0000,
68                 .num_devices    = 15,
69                 .device_list    = (enum ppc_sys_devices[])
70                 {
71                         MPC85xx_TSEC1, MPC85xx_TSEC2, MPC85xx_IIC1,
72                         MPC85xx_DMA0, MPC85xx_DMA1, MPC85xx_DMA2, MPC85xx_DMA3,
73                         MPC85xx_PERFMON, MPC85xx_DUART, MPC85xx_SEC2,
74                         MPC85xx_CPM_SPI, MPC85xx_CPM_I2C,
75                         MPC85xx_CPM_FCC1, MPC85xx_CPM_FCC2,
76                         MPC85xx_MDIO,
77                 },
78         },
79         {
80                 .ppc_sys_name   = "8555",
81                 .mask           = 0xFFFF0000,
82                 .value          = 0x80710000,
83                 .num_devices    = 20,
84                 .device_list    = (enum ppc_sys_devices[])
85                 {
86                         MPC85xx_TSEC1, MPC85xx_TSEC2, MPC85xx_IIC1,
87                         MPC85xx_DMA0, MPC85xx_DMA1, MPC85xx_DMA2, MPC85xx_DMA3,
88                         MPC85xx_PERFMON, MPC85xx_DUART,
89                         MPC85xx_CPM_SPI, MPC85xx_CPM_I2C, MPC85xx_CPM_SCC1,
90                         MPC85xx_CPM_SCC2, MPC85xx_CPM_SCC3,
91                         MPC85xx_CPM_FCC1, MPC85xx_CPM_FCC2,
92                         MPC85xx_CPM_SMC1, MPC85xx_CPM_SMC2,
93                         MPC85xx_CPM_USB,
94                         MPC85xx_MDIO,
95                 },
96         },
97         {
98                 .ppc_sys_name   = "8555E",
99                 .mask           = 0xFFFF0000,
100                 .value          = 0x80790000,
101                 .num_devices    = 21,
102                 .device_list    = (enum ppc_sys_devices[])
103                 {
104                         MPC85xx_TSEC1, MPC85xx_TSEC2, MPC85xx_IIC1,
105                         MPC85xx_DMA0, MPC85xx_DMA1, MPC85xx_DMA2, MPC85xx_DMA3,
106                         MPC85xx_PERFMON, MPC85xx_DUART, MPC85xx_SEC2,
107                         MPC85xx_CPM_SPI, MPC85xx_CPM_I2C, MPC85xx_CPM_SCC1,
108                         MPC85xx_CPM_SCC2, MPC85xx_CPM_SCC3,
109                         MPC85xx_CPM_FCC1, MPC85xx_CPM_FCC2,
110                         MPC85xx_CPM_SMC1, MPC85xx_CPM_SMC2,
111                         MPC85xx_CPM_USB,
112                         MPC85xx_MDIO,
113                 },
114         },
115         /* SVRs on 8548 rev1.0 matches for 8548/8547/8545 */
116         {
117                 .ppc_sys_name   = "8548E",
118                 .mask           = 0xFFFF00F0,
119                 .value          = 0x80390010,
120                 .num_devices    = 14,
121                 .device_list    = (enum ppc_sys_devices[])
122                 {
123                         MPC85xx_eTSEC1, MPC85xx_eTSEC2, MPC85xx_eTSEC3,
124                         MPC85xx_eTSEC4, MPC85xx_IIC1, MPC85xx_IIC2,
125                         MPC85xx_DMA0, MPC85xx_DMA1, MPC85xx_DMA2, MPC85xx_DMA3,
126                         MPC85xx_PERFMON, MPC85xx_DUART, MPC85xx_SEC2,
127                         MPC85xx_MDIO,
128                 },
129         },
130         {
131                 .ppc_sys_name   = "8548",
132                 .mask           = 0xFFFF00F0,
133                 .value          = 0x80310010,
134                 .num_devices    = 13,
135                 .device_list    = (enum ppc_sys_devices[])
136                 {
137                         MPC85xx_eTSEC1, MPC85xx_eTSEC2, MPC85xx_eTSEC3,
138                         MPC85xx_eTSEC4, MPC85xx_IIC1, MPC85xx_IIC2,
139                         MPC85xx_DMA0, MPC85xx_DMA1, MPC85xx_DMA2, MPC85xx_DMA3,
140                         MPC85xx_PERFMON, MPC85xx_DUART,
141                         MPC85xx_MDIO,
142                 },
143         },
144         {
145                 .ppc_sys_name   = "8547E",
146                 .mask           = 0xFFFF00F0,
147                 .value          = 0x80390010,
148                 .num_devices    = 14,
149                 .device_list    = (enum ppc_sys_devices[])
150                 {
151                         MPC85xx_eTSEC1, MPC85xx_eTSEC2, MPC85xx_eTSEC3,
152                         MPC85xx_eTSEC4, MPC85xx_IIC1, MPC85xx_IIC2,
153                         MPC85xx_DMA0, MPC85xx_DMA1, MPC85xx_DMA2, MPC85xx_DMA3,
154                         MPC85xx_PERFMON, MPC85xx_DUART, MPC85xx_SEC2,
155                         MPC85xx_MDIO,
156                 },
157         },
158         {
159                 .ppc_sys_name   = "8547",
160                 .mask           = 0xFFFF00F0,
161                 .value          = 0x80310010,
162                 .num_devices    = 13,
163                 .device_list    = (enum ppc_sys_devices[])
164                 {
165                         MPC85xx_eTSEC1, MPC85xx_eTSEC2, MPC85xx_eTSEC3,
166                         MPC85xx_eTSEC4, MPC85xx_IIC1, MPC85xx_IIC2,
167                         MPC85xx_DMA0, MPC85xx_DMA1, MPC85xx_DMA2, MPC85xx_DMA3,
168                         MPC85xx_PERFMON, MPC85xx_DUART,
169                         MPC85xx_MDIO,
170                 },
171         },
172         {
173                 .ppc_sys_name   = "8545E",
174                 .mask           = 0xFFFF00F0,
175                 .value          = 0x80390010,
176                 .num_devices    = 12,
177                 .device_list    = (enum ppc_sys_devices[])
178                 {
179                         MPC85xx_eTSEC1, MPC85xx_eTSEC2,
180                         MPC85xx_IIC1, MPC85xx_IIC2,
181                         MPC85xx_DMA0, MPC85xx_DMA1, MPC85xx_DMA2, MPC85xx_DMA3,
182                         MPC85xx_PERFMON, MPC85xx_DUART, MPC85xx_SEC2,
183                         MPC85xx_MDIO,
184                 },
185         },
186         {
187                 .ppc_sys_name   = "8545",
188                 .mask           = 0xFFFF00F0,
189                 .value          = 0x80310010,
190                 .num_devices    = 11,
191                 .device_list    = (enum ppc_sys_devices[])
192                 {
193                         MPC85xx_eTSEC1, MPC85xx_eTSEC2,
194                         MPC85xx_IIC1, MPC85xx_IIC2,
195                         MPC85xx_DMA0, MPC85xx_DMA1, MPC85xx_DMA2, MPC85xx_DMA3,
196                         MPC85xx_PERFMON, MPC85xx_DUART,
197                         MPC85xx_MDIO,
198                 },
199         },
200         {
201                 .ppc_sys_name   = "8543E",
202                 .mask           = 0xFFFF00F0,
203                 .value          = 0x803A0010,
204                 .num_devices    = 12,
205                 .device_list    = (enum ppc_sys_devices[])
206                 {
207                         MPC85xx_eTSEC1, MPC85xx_eTSEC2,
208                         MPC85xx_IIC1, MPC85xx_IIC2,
209                         MPC85xx_DMA0, MPC85xx_DMA1, MPC85xx_DMA2, MPC85xx_DMA3,
210                         MPC85xx_PERFMON, MPC85xx_DUART, MPC85xx_SEC2,
211                         MPC85xx_MDIO,
212                 },
213         },
214         {
215                 .ppc_sys_name   = "8543",
216                 .mask           = 0xFFFF00F0,
217                 .value          = 0x80320010,
218                 .num_devices    = 11,
219                 .device_list    = (enum ppc_sys_devices[])
220                 {
221                         MPC85xx_eTSEC1, MPC85xx_eTSEC2,
222                         MPC85xx_IIC1, MPC85xx_IIC2,
223                         MPC85xx_DMA0, MPC85xx_DMA1, MPC85xx_DMA2, MPC85xx_DMA3,
224                         MPC85xx_PERFMON, MPC85xx_DUART,
225                         MPC85xx_MDIO,
226                 },
227         },
228         {       /* default match */
229                 .ppc_sys_name   = "",
230                 .mask           = 0x00000000,
231                 .value          = 0x00000000,
232         },
233 };