aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoy Zang <tie-fei.zang@freescale.com>2007-07-13 06:05:08 -0400
committerKumar Gala <galak@kernel.crashing.org>2007-07-23 23:30:02 -0400
commitf16dab981aa9d423bdfe096e3422acd33d905c1e (patch)
treeaafb0d944784f4a3dd53058d0d111eaa34b48893
parent2e56ff206b7c6c28b847ccdbe46ad69b3263ac32 (diff)
[POWERPC] Add basic PCI/PCI Express support for 8544DS board
Add basic support for the PCIe PHB and enable the ULI bridge. Signed-off-by: York Sun <yorksun@freescale.com> Signed-off-by: Roy Zang <tie-fei.zang@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
-rw-r--r--arch/powerpc/boot/dts/mpc8544ds.dts211
-rw-r--r--arch/powerpc/configs/mpc8544_ds_defconfig333
-rw-r--r--arch/powerpc/platforms/85xx/Kconfig1
-rw-r--r--arch/powerpc/platforms/85xx/mpc8544_ds.c241
-rw-r--r--arch/powerpc/sysdev/fsl_pci.c2
5 files changed, 662 insertions, 126 deletions
diff --git a/arch/powerpc/boot/dts/mpc8544ds.dts b/arch/powerpc/boot/dts/mpc8544ds.dts
index 828592592460..4a900c6df762 100644
--- a/arch/powerpc/boot/dts/mpc8544ds.dts
+++ b/arch/powerpc/boot/dts/mpc8544ds.dts
@@ -137,6 +137,217 @@
137 interrupt-parent = <&mpic>; 137 interrupt-parent = <&mpic>;
138 }; 138 };
139 139
140 pci@8000 {
141 compatible = "fsl,mpc8540-pci";
142 device_type = "pci";
143 interrupt-map-mask = <f800 0 0 7>;
144 interrupt-map = <
145
146 /* IDSEL 0x11 J17 Slot 1 */
147 8800 0 0 1 &mpic 2 1
148 8800 0 0 2 &mpic 3 1
149 8800 0 0 3 &mpic 4 1
150 8800 0 0 4 &mpic 1 1
151
152 /* IDSEL 0x12 J16 Slot 2 */
153
154 9000 0 0 1 &mpic 3 1
155 9000 0 0 2 &mpic 4 1
156 9000 0 0 3 &mpic 2 1
157 9000 0 0 4 &mpic 1 1>;
158
159 interrupt-parent = <&mpic>;
160 interrupts = <18 2>;
161 bus-range = <0 ff>;
162 ranges = <02000000 0 80000000 80000000 0 10000000
163 01000000 0 00000000 e2000000 0 00800000>;
164 clock-frequency = <3f940aa>;
165 #interrupt-cells = <1>;
166 #size-cells = <2>;
167 #address-cells = <3>;
168 reg = <8000 1000>;
169 };
170
171 pcie@9000 {
172 compatible = "fsl,mpc8548-pcie";
173 device_type = "pci";
174 #interrupt-cells = <1>;
175 #size-cells = <2>;
176 #address-cells = <3>;
177 reg = <9000 1000>;
178 bus-range = <0 ff>;
179 ranges = <02000000 0 90000000 90000000 0 10000000
180 01000000 0 00000000 e3000000 0 00800000>;
181 clock-frequency = <1fca055>;
182 interrupt-parent = <&mpic>;
183 interrupts = <1a 2>;
184 interrupt-map-mask = <f800 0 0 7>;
185 interrupt-map = <
186 /* IDSEL 0x0 */
187 0000 0 0 1 &mpic 4 1
188 0000 0 0 2 &mpic 5 1
189 0000 0 0 3 &mpic 6 1
190 0000 0 0 4 &mpic 7 1
191 >;
192 };
193
194 pcie@a000 {
195 compatible = "fsl,mpc8548-pcie";
196 device_type = "pci";
197 #interrupt-cells = <1>;
198 #size-cells = <2>;
199 #address-cells = <3>;
200 reg = <a000 1000>;
201 bus-range = <0 ff>;
202 ranges = <02000000 0 a0000000 a0000000 0 10000000
203 01000000 0 00000000 e2800000 0 00800000>;
204 clock-frequency = <1fca055>;
205 interrupt-parent = <&mpic>;
206 interrupts = <19 2>;
207 interrupt-map-mask = <f800 0 0 7>;
208 interrupt-map = <
209 /* IDSEL 0x0 */
210 0000 0 0 1 &mpic 0 1
211 0000 0 0 2 &mpic 1 1
212 0000 0 0 3 &mpic 2 1
213 0000 0 0 4 &mpic 3 1
214 >;
215 };
216
217 pcie@b000 {
218 compatible = "fsl,mpc8548-pcie";
219 device_type = "pci";
220 #interrupt-cells = <1>;
221 #size-cells = <2>;
222 #address-cells = <3>;
223 reg = <b000 1000>;
224 bus-range = <0 ff>;
225 ranges = <02000000 0 b0000000 b0000000 0 10000000
226 01000000 0 00000000 e3800000 0 00800000>;
227 clock-frequency = <1fca055>;
228 interrupt-parent = <&mpic>;
229 interrupts = <1b 2>;
230 interrupt-map-mask = <f800 0 0 7>;
231 interrupt-map = <
232
233 // IDSEL 0x1a
234 d000 0 0 1 &i8259 6 2
235 d000 0 0 2 &i8259 3 2
236 d000 0 0 3 &i8259 4 2
237 d000 0 0 4 &i8259 5 2
238
239 // IDSEL 0x1b
240 d800 0 0 1 &i8259 5 2
241 d800 0 0 2 &i8259 0 0
242 d800 0 0 3 &i8259 0 0
243 d800 0 0 4 &i8259 0 0
244
245 // IDSEL 0x1c USB
246 e000 0 0 1 &i8259 9 2
247 e000 0 0 2 &i8259 a 2
248 e000 0 0 3 &i8259 c 2
249 e000 0 0 4 &i8259 7 2
250
251 // IDSEL 0x1d Audio
252 e800 0 0 1 &i8259 9 2
253 e800 0 0 2 &i8259 a 2
254 e800 0 0 3 &i8259 b 2
255 e800 0 0 4 &i8259 0 0
256
257 // IDSEL 0x1e Legacy
258 f000 0 0 1 &i8259 c 2
259 f000 0 0 2 &i8259 0 0
260 f000 0 0 3 &i8259 0 0
261 f000 0 0 4 &i8259 0 0
262
263 // IDSEL 0x1f IDE/SATA
264 f800 0 0 1 &i8259 6 2
265 f800 0 0 2 &i8259 0 0
266 f800 0 0 3 &i8259 0 0
267 f800 0 0 4 &i8259 0 0
268 >;
269 uli1575@0 {
270 reg = <0 0 0 0 0>;
271 #size-cells = <2>;
272 #address-cells = <3>;
273 ranges = <02000000 0 b0000000
274 02000000 0 b0000000
275 0 10000000
276 01000000 0 00000000
277 01000000 0 00000000
278 0 00080000>;
279
280 pci_bridge@0 {
281 reg = <0 0 0 0 0>;
282 #size-cells = <2>;
283 #address-cells = <3>;
284 ranges = <02000000 0 b0000000
285 02000000 0 b0000000
286 0 20000000
287 01000000 0 00000000
288 01000000 0 00000000
289 0 00100000>;
290
291 isa@1e {
292 device_type = "isa";
293 #interrupt-cells = <2>;
294 #size-cells = <1>;
295 #address-cells = <2>;
296 reg = <f000 0 0 0 0>;
297 ranges = <1 0 01000000 0 0
298 00001000>;
299 interrupt-parent = <&i8259>;
300
301 i8259: interrupt-controller@20 {
302 reg = <1 20 2
303 1 a0 2
304 1 4d0 2>;
305 clock-frequency = <0>;
306 interrupt-controller;
307 device_type = "interrupt-controller";
308 #address-cells = <0>;
309 #interrupt-cells = <2>;
310 built-in;
311 compatible = "chrp,iic";
312 interrupts = <9 2>;
313 interrupt-parent =
314 <&mpic>;
315 };
316
317 i8042@60 {
318 #size-cells = <0>;
319 #address-cells = <1>;
320 reg = <1 60 1 1 64 1>;
321 interrupts = <1 3 c 3>;
322 interrupt-parent =
323 <&i8259>;
324
325 keyboard@0 {
326 reg = <0>;
327 compatible = "pnpPNP,303";
328 };
329
330 mouse@1 {
331 reg = <1>;
332 compatible = "pnpPNP,f03";
333 };
334 };
335
336 rtc@70 {
337 compatible =
338 "pnpPNP,b00";
339 reg = <1 70 2>;
340 };
341
342 gpio@400 {
343 reg = <1 400 80>;
344 };
345 };
346 };
347 };
348
349 };
350
140 mpic: pic@40000 { 351 mpic: pic@40000 {
141 clock-frequency = <0>; 352 clock-frequency = <0>;
142 interrupt-controller; 353 interrupt-controller;
diff --git a/arch/powerpc/configs/mpc8544_ds_defconfig b/arch/powerpc/configs/mpc8544_ds_defconfig
index c40a25a79cbb..7995231def26 100644
--- a/arch/powerpc/configs/mpc8544_ds_defconfig
+++ b/arch/powerpc/configs/mpc8544_ds_defconfig
@@ -1,9 +1,26 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.22-rc7 3# Linux kernel version: 2.6.22
4# Sun Jul 1 23:56:58 2007 4# Fri Jul 20 14:09:13 2007
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7
8#
9# Processor support
10#
11# CONFIG_6xx is not set
12CONFIG_PPC_85xx=y
13# CONFIG_PPC_8xx is not set
14# CONFIG_40x is not set
15# CONFIG_44x is not set
16# CONFIG_E200 is not set
17CONFIG_85xx=y
18CONFIG_E500=y
19CONFIG_BOOKE=y
20CONFIG_FSL_BOOKE=y
21# CONFIG_PHYS_64BIT is not set
22# CONFIG_SPE is not set
23# CONFIG_PPC_MM_SLICES is not set
7CONFIG_PPC32=y 24CONFIG_PPC32=y
8CONFIG_PPC_MERGE=y 25CONFIG_PPC_MERGE=y
9CONFIG_MMU=y 26CONFIG_MMU=y
@@ -14,6 +31,7 @@ CONFIG_ARCH_HAS_ILOG2_U32=y
14CONFIG_GENERIC_HWEIGHT=y 31CONFIG_GENERIC_HWEIGHT=y
15CONFIG_GENERIC_CALIBRATE_DELAY=y 32CONFIG_GENERIC_CALIBRATE_DELAY=y
16CONFIG_GENERIC_FIND_NEXT_BIT=y 33CONFIG_GENERIC_FIND_NEXT_BIT=y
34# CONFIG_ARCH_NO_VIRT_TO_BUS is not set
17CONFIG_PPC=y 35CONFIG_PPC=y
18CONFIG_EARLY_PRINTK=y 36CONFIG_EARLY_PRINTK=y
19CONFIG_GENERIC_NVRAM=y 37CONFIG_GENERIC_NVRAM=y
@@ -25,28 +43,8 @@ CONFIG_PPC_UDBG_16550=y
25CONFIG_AUDIT_ARCH=y 43CONFIG_AUDIT_ARCH=y
26CONFIG_GENERIC_BUG=y 44CONFIG_GENERIC_BUG=y
27CONFIG_DEFAULT_UIMAGE=y 45CONFIG_DEFAULT_UIMAGE=y
28
29#
30# Processor support
31#
32# CONFIG_CLASSIC32 is not set
33# CONFIG_PPC_82xx is not set
34# CONFIG_PPC_83xx is not set
35CONFIG_PPC_85xx=y
36# CONFIG_PPC_86xx is not set
37# CONFIG_PPC_8xx is not set
38# CONFIG_40x is not set
39# CONFIG_44x is not set
40# CONFIG_E200 is not set
41CONFIG_85xx=y
42CONFIG_E500=y
43# CONFIG_PPC_DCR_NATIVE is not set 46# CONFIG_PPC_DCR_NATIVE is not set
44# CONFIG_PPC_DCR_MMIO is not set 47# CONFIG_PPC_DCR_MMIO is not set
45CONFIG_BOOKE=y
46CONFIG_FSL_BOOKE=y
47# CONFIG_PHYS_64BIT is not set
48# CONFIG_SPE is not set
49# CONFIG_PPC_MM_SLICES is not set
50CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 48CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
51 49
52# 50#
@@ -63,13 +61,12 @@ CONFIG_LOCALVERSION=""
63CONFIG_LOCALVERSION_AUTO=y 61CONFIG_LOCALVERSION_AUTO=y
64CONFIG_SWAP=y 62CONFIG_SWAP=y
65CONFIG_SYSVIPC=y 63CONFIG_SYSVIPC=y
66CONFIG_IPC_NS=y
67CONFIG_SYSVIPC_SYSCTL=y 64CONFIG_SYSVIPC_SYSCTL=y
68CONFIG_POSIX_MQUEUE=y 65CONFIG_POSIX_MQUEUE=y
69CONFIG_BSD_PROCESS_ACCT=y 66CONFIG_BSD_PROCESS_ACCT=y
70# CONFIG_BSD_PROCESS_ACCT_V3 is not set 67# CONFIG_BSD_PROCESS_ACCT_V3 is not set
71# CONFIG_TASKSTATS is not set 68# CONFIG_TASKSTATS is not set
72# CONFIG_UTS_NS is not set 69# CONFIG_USER_NS is not set
73CONFIG_AUDIT=y 70CONFIG_AUDIT=y
74# CONFIG_AUDITSYSCALL is not set 71# CONFIG_AUDITSYSCALL is not set
75CONFIG_IKCONFIG=y 72CONFIG_IKCONFIG=y
@@ -86,7 +83,7 @@ CONFIG_SYSCTL_SYSCALL=y
86CONFIG_KALLSYMS=y 83CONFIG_KALLSYMS=y
87CONFIG_KALLSYMS_ALL=y 84CONFIG_KALLSYMS_ALL=y
88# CONFIG_KALLSYMS_EXTRA_PASS is not set 85# CONFIG_KALLSYMS_EXTRA_PASS is not set
89# CONFIG_HOTPLUG is not set 86CONFIG_HOTPLUG=y
90CONFIG_PRINTK=y 87CONFIG_PRINTK=y
91CONFIG_BUG=y 88CONFIG_BUG=y
92CONFIG_ELF_CORE=y 89CONFIG_ELF_CORE=y
@@ -105,24 +102,17 @@ CONFIG_SLAB=y
105CONFIG_RT_MUTEXES=y 102CONFIG_RT_MUTEXES=y
106# CONFIG_TINY_SHMEM is not set 103# CONFIG_TINY_SHMEM is not set
107CONFIG_BASE_SMALL=0 104CONFIG_BASE_SMALL=0
108
109#
110# Loadable module support
111#
112CONFIG_MODULES=y 105CONFIG_MODULES=y
113CONFIG_MODULE_UNLOAD=y 106CONFIG_MODULE_UNLOAD=y
114CONFIG_MODULE_FORCE_UNLOAD=y 107CONFIG_MODULE_FORCE_UNLOAD=y
115CONFIG_MODVERSIONS=y 108CONFIG_MODVERSIONS=y
116# CONFIG_MODULE_SRCVERSION_ALL is not set 109# CONFIG_MODULE_SRCVERSION_ALL is not set
117CONFIG_KMOD=y 110CONFIG_KMOD=y
118
119#
120# Block layer
121#
122CONFIG_BLOCK=y 111CONFIG_BLOCK=y
123CONFIG_LBD=y 112CONFIG_LBD=y
124# CONFIG_BLK_DEV_IO_TRACE is not set 113# CONFIG_BLK_DEV_IO_TRACE is not set
125# CONFIG_LSF is not set 114# CONFIG_LSF is not set
115# CONFIG_BLK_DEV_BSG is not set
126 116
127# 117#
128# IO Schedulers 118# IO Schedulers
@@ -153,7 +143,7 @@ CONFIG_MPC8544_DS=y
153CONFIG_MPC85xx=y 143CONFIG_MPC85xx=y
154CONFIG_MPIC=y 144CONFIG_MPIC=y
155# CONFIG_MPIC_WEIRD is not set 145# CONFIG_MPIC_WEIRD is not set
156# CONFIG_PPC_I8259 is not set 146CONFIG_PPC_I8259=y
157# CONFIG_PPC_RTAS is not set 147# CONFIG_PPC_RTAS is not set
158# CONFIG_MMIO_NVRAM is not set 148# CONFIG_MMIO_NVRAM is not set
159# CONFIG_PPC_MPC106 is not set 149# CONFIG_PPC_MPC106 is not set
@@ -191,6 +181,8 @@ CONFIG_FLAT_NODE_MEM_MAP=y
191CONFIG_SPLIT_PTLOCK_CPUS=4 181CONFIG_SPLIT_PTLOCK_CPUS=4
192# CONFIG_RESOURCES_64BIT is not set 182# CONFIG_RESOURCES_64BIT is not set
193CONFIG_ZONE_DMA_FLAG=1 183CONFIG_ZONE_DMA_FLAG=1
184CONFIG_BOUNCE=y
185CONFIG_VIRT_TO_BUS=y
194CONFIG_PROC_DEVICETREE=y 186CONFIG_PROC_DEVICETREE=y
195CONFIG_CMDLINE_BOOL=y 187CONFIG_CMDLINE_BOOL=y
196CONFIG_CMDLINE="root=/dev/sda3 rw console=ttyS0,115200" 188CONFIG_CMDLINE="root=/dev/sda3 rw console=ttyS0,115200"
@@ -205,15 +197,21 @@ CONFIG_ISA_DMA_API=y
205# 197#
206CONFIG_ZONE_DMA=y 198CONFIG_ZONE_DMA=y
207CONFIG_PPC_INDIRECT_PCI=y 199CONFIG_PPC_INDIRECT_PCI=y
208CONFIG_PPC_INDIRECT_PCI_BE=y
209CONFIG_FSL_SOC=y 200CONFIG_FSL_SOC=y
210# CONFIG_PCI is not set 201CONFIG_FSL_PCI=y
211# CONFIG_PCI_DOMAINS is not set 202CONFIG_PCI=y
212# CONFIG_ARCH_SUPPORTS_MSI is not set 203CONFIG_PCI_DOMAINS=y
204CONFIG_PCI_SYSCALL=y
205# CONFIG_PCIEPORTBUS is not set
206CONFIG_ARCH_SUPPORTS_MSI=y
207# CONFIG_PCI_MSI is not set
208# CONFIG_PCI_DEBUG is not set
213 209
214# 210#
215# PCCARD (PCMCIA/CardBus) support 211# PCCARD (PCMCIA/CardBus) support
216# 212#
213# CONFIG_PCCARD is not set
214# CONFIG_HOTPLUG_PCI is not set
217 215
218# 216#
219# Advanced setup 217# Advanced setup
@@ -254,7 +252,6 @@ CONFIG_ASK_IP_FIB_HASH=y
254CONFIG_IP_FIB_HASH=y 252CONFIG_IP_FIB_HASH=y
255CONFIG_IP_MULTIPLE_TABLES=y 253CONFIG_IP_MULTIPLE_TABLES=y
256CONFIG_IP_ROUTE_MULTIPATH=y 254CONFIG_IP_ROUTE_MULTIPATH=y
257# CONFIG_IP_ROUTE_MULTIPATH_CACHED is not set
258CONFIG_IP_ROUTE_VERBOSE=y 255CONFIG_IP_ROUTE_VERBOSE=y
259CONFIG_IP_PNP=y 256CONFIG_IP_PNP=y
260CONFIG_IP_PNP_DHCP=y 257CONFIG_IP_PNP_DHCP=y
@@ -330,6 +327,7 @@ CONFIG_FIB_RULES=y
330# CONFIG_MAC80211 is not set 327# CONFIG_MAC80211 is not set
331# CONFIG_IEEE80211 is not set 328# CONFIG_IEEE80211 is not set
332# CONFIG_RFKILL is not set 329# CONFIG_RFKILL is not set
330# CONFIG_NET_9P is not set
333 331
334# 332#
335# Device Drivers 333# Device Drivers
@@ -340,45 +338,35 @@ CONFIG_FIB_RULES=y
340# 338#
341CONFIG_STANDALONE=y 339CONFIG_STANDALONE=y
342CONFIG_PREVENT_FIRMWARE_BUILD=y 340CONFIG_PREVENT_FIRMWARE_BUILD=y
341# CONFIG_FW_LOADER is not set
343# CONFIG_DEBUG_DRIVER is not set 342# CONFIG_DEBUG_DRIVER is not set
344# CONFIG_DEBUG_DEVRES is not set 343# CONFIG_DEBUG_DEVRES is not set
345# CONFIG_SYS_HYPERVISOR is not set 344# CONFIG_SYS_HYPERVISOR is not set
346
347#
348# Connector - unified userspace <-> kernelspace linker
349#
350# CONFIG_CONNECTOR is not set 345# CONFIG_CONNECTOR is not set
351# CONFIG_MTD is not set 346# CONFIG_MTD is not set
352
353#
354# Parallel port support
355#
356# CONFIG_PARPORT is not set 347# CONFIG_PARPORT is not set
357 348CONFIG_BLK_DEV=y
358#
359# Plug and Play support
360#
361# CONFIG_PNPACPI is not set
362
363#
364# Block devices
365#
366# CONFIG_BLK_DEV_FD is not set 349# CONFIG_BLK_DEV_FD is not set
350# CONFIG_BLK_CPQ_DA is not set
351# CONFIG_BLK_CPQ_CISS_DA is not set
352# CONFIG_BLK_DEV_DAC960 is not set
353# CONFIG_BLK_DEV_UMEM is not set
367# CONFIG_BLK_DEV_COW_COMMON is not set 354# CONFIG_BLK_DEV_COW_COMMON is not set
368CONFIG_BLK_DEV_LOOP=y 355CONFIG_BLK_DEV_LOOP=y
369# CONFIG_BLK_DEV_CRYPTOLOOP is not set 356# CONFIG_BLK_DEV_CRYPTOLOOP is not set
370CONFIG_BLK_DEV_NBD=y 357CONFIG_BLK_DEV_NBD=y
358# CONFIG_BLK_DEV_SX8 is not set
371CONFIG_BLK_DEV_RAM=y 359CONFIG_BLK_DEV_RAM=y
372CONFIG_BLK_DEV_RAM_COUNT=2 360CONFIG_BLK_DEV_RAM_COUNT=2
373CONFIG_BLK_DEV_RAM_SIZE=16384 361CONFIG_BLK_DEV_RAM_SIZE=16384
374CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 362CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
375# CONFIG_CDROM_PKTCDVD is not set 363# CONFIG_CDROM_PKTCDVD is not set
376# CONFIG_ATA_OVER_ETH is not set 364# CONFIG_ATA_OVER_ETH is not set
377 365CONFIG_MISC_DEVICES=y
378# 366# CONFIG_PHANTOM is not set
379# Misc devices 367# CONFIG_EEPROM_93CX6 is not set
380# 368# CONFIG_SGI_IOC4 is not set
381# CONFIG_BLINK is not set 369# CONFIG_TIFM_CORE is not set
382# CONFIG_IDE is not set 370# CONFIG_IDE is not set
383 371
384# 372#
@@ -386,6 +374,7 @@ CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
386# 374#
387# CONFIG_RAID_ATTRS is not set 375# CONFIG_RAID_ATTRS is not set
388CONFIG_SCSI=y 376CONFIG_SCSI=y
377CONFIG_SCSI_DMA=y
389# CONFIG_SCSI_TGT is not set 378# CONFIG_SCSI_TGT is not set
390# CONFIG_SCSI_NETLINK is not set 379# CONFIG_SCSI_NETLINK is not set
391CONFIG_SCSI_PROC_FS=y 380CONFIG_SCSI_PROC_FS=y
@@ -422,25 +411,120 @@ CONFIG_SCSI_WAIT_SCAN=m
422# SCSI low-level drivers 411# SCSI low-level drivers
423# 412#
424# CONFIG_ISCSI_TCP is not set 413# CONFIG_ISCSI_TCP is not set
414# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
415# CONFIG_SCSI_3W_9XXX is not set
416# CONFIG_SCSI_ACARD is not set
417# CONFIG_SCSI_AACRAID is not set
418# CONFIG_SCSI_AIC7XXX is not set
419# CONFIG_SCSI_AIC7XXX_OLD is not set
420# CONFIG_SCSI_AIC79XX is not set
421# CONFIG_SCSI_AIC94XX is not set
422# CONFIG_SCSI_DPT_I2O is not set
423# CONFIG_SCSI_ARCMSR is not set
424# CONFIG_MEGARAID_NEWGEN is not set
425# CONFIG_MEGARAID_LEGACY is not set
426# CONFIG_MEGARAID_SAS is not set
427# CONFIG_SCSI_HPTIOP is not set
428# CONFIG_SCSI_BUSLOGIC is not set
429# CONFIG_SCSI_DMX3191D is not set
430# CONFIG_SCSI_EATA is not set
431# CONFIG_SCSI_FUTURE_DOMAIN is not set
432# CONFIG_SCSI_GDTH is not set
433# CONFIG_SCSI_IPS is not set
434# CONFIG_SCSI_INITIO is not set
435# CONFIG_SCSI_INIA100 is not set
436# CONFIG_SCSI_STEX is not set
437# CONFIG_SCSI_SYM53C8XX_2 is not set
438# CONFIG_SCSI_IPR is not set
439# CONFIG_SCSI_QLOGIC_1280 is not set
440# CONFIG_SCSI_QLA_FC is not set
441# CONFIG_SCSI_QLA_ISCSI is not set
442# CONFIG_SCSI_LPFC is not set
443# CONFIG_SCSI_DC395x is not set
444# CONFIG_SCSI_DC390T is not set
445# CONFIG_SCSI_NSP32 is not set
425# CONFIG_SCSI_DEBUG is not set 446# CONFIG_SCSI_DEBUG is not set
447# CONFIG_SCSI_SRP is not set
426CONFIG_ATA=y 448CONFIG_ATA=y
427# CONFIG_ATA_NONSTANDARD is not set 449# CONFIG_ATA_NONSTANDARD is not set
450# CONFIG_SATA_AHCI is not set
451# CONFIG_SATA_SVW is not set
452# CONFIG_ATA_PIIX is not set
453# CONFIG_SATA_MV is not set
454# CONFIG_SATA_NV is not set
455# CONFIG_PDC_ADMA is not set
456# CONFIG_SATA_QSTOR is not set
457# CONFIG_SATA_PROMISE is not set
458# CONFIG_SATA_SX4 is not set
459# CONFIG_SATA_SIL is not set
460# CONFIG_SATA_SIL24 is not set
461# CONFIG_SATA_SIS is not set
462# CONFIG_SATA_ULI is not set
463# CONFIG_SATA_VIA is not set
464# CONFIG_SATA_VITESSE is not set
465# CONFIG_SATA_INIC162X is not set
466# CONFIG_PATA_ALI is not set
467# CONFIG_PATA_AMD is not set
468# CONFIG_PATA_ARTOP is not set
469# CONFIG_PATA_ATIIXP is not set
470# CONFIG_PATA_CMD640_PCI is not set
471# CONFIG_PATA_CMD64X is not set
472# CONFIG_PATA_CS5520 is not set
473# CONFIG_PATA_CS5530 is not set
474# CONFIG_PATA_CYPRESS is not set
475# CONFIG_PATA_EFAR is not set
476# CONFIG_ATA_GENERIC is not set
477# CONFIG_PATA_HPT366 is not set
478# CONFIG_PATA_HPT37X is not set
479# CONFIG_PATA_HPT3X2N is not set
480# CONFIG_PATA_HPT3X3 is not set
481# CONFIG_PATA_IT821X is not set
482# CONFIG_PATA_IT8213 is not set
483# CONFIG_PATA_JMICRON is not set
484# CONFIG_PATA_TRIFLEX is not set
485# CONFIG_PATA_MARVELL is not set
486# CONFIG_PATA_MPIIX is not set
487# CONFIG_PATA_OLDPIIX is not set
488# CONFIG_PATA_NETCELL is not set
489# CONFIG_PATA_NS87410 is not set
490# CONFIG_PATA_OPTI is not set
491# CONFIG_PATA_OPTIDMA is not set
492# CONFIG_PATA_PDC_OLD is not set
493# CONFIG_PATA_RADISYS is not set
494# CONFIG_PATA_RZ1000 is not set
495# CONFIG_PATA_SC1200 is not set
496# CONFIG_PATA_SERVERWORKS is not set
497# CONFIG_PATA_PDC2027X is not set
498# CONFIG_PATA_SIL680 is not set
499# CONFIG_PATA_SIS is not set
500# CONFIG_PATA_VIA is not set
501# CONFIG_PATA_WINBOND is not set
428# CONFIG_PATA_PLATFORM is not set 502# CONFIG_PATA_PLATFORM is not set
503# CONFIG_MD is not set
429 504
430# 505#
431# Multi-device support (RAID and LVM) 506# Fusion MPT device support
432# 507#
433# CONFIG_MD is not set 508# CONFIG_FUSION is not set
434# CONFIG_MACINTOSH_DRIVERS is not set 509# CONFIG_FUSION_SPI is not set
510# CONFIG_FUSION_FC is not set
511# CONFIG_FUSION_SAS is not set
435 512
436# 513#
437# Network device support 514# IEEE 1394 (FireWire) support
438# 515#
516# CONFIG_FIREWIRE is not set
517# CONFIG_IEEE1394 is not set
518# CONFIG_I2O is not set
519# CONFIG_MACINTOSH_DRIVERS is not set
439CONFIG_NETDEVICES=y 520CONFIG_NETDEVICES=y
521# CONFIG_NETDEVICES_MULTIQUEUE is not set
440# CONFIG_DUMMY is not set 522# CONFIG_DUMMY is not set
441# CONFIG_BONDING is not set 523# CONFIG_BONDING is not set
524# CONFIG_MACVLAN is not set
442# CONFIG_EQUALIZER is not set 525# CONFIG_EQUALIZER is not set
443# CONFIG_TUN is not set 526# CONFIG_TUN is not set
527# CONFIG_ARCNET is not set
444CONFIG_PHYLIB=y 528CONFIG_PHYLIB=y
445 529
446# 530#
@@ -454,17 +538,44 @@ CONFIG_PHYLIB=y
454CONFIG_VITESSE_PHY=y 538CONFIG_VITESSE_PHY=y
455# CONFIG_SMSC_PHY is not set 539# CONFIG_SMSC_PHY is not set
456# CONFIG_BROADCOM_PHY is not set 540# CONFIG_BROADCOM_PHY is not set
541# CONFIG_ICPLUS_PHY is not set
457# CONFIG_FIXED_PHY is not set 542# CONFIG_FIXED_PHY is not set
458
459#
460# Ethernet (10 or 100Mbit)
461#
462CONFIG_NET_ETHERNET=y 543CONFIG_NET_ETHERNET=y
463CONFIG_MII=y 544CONFIG_MII=y
545# CONFIG_HAPPYMEAL is not set
546# CONFIG_SUNGEM is not set
547# CONFIG_CASSINI is not set
548# CONFIG_NET_VENDOR_3COM is not set
549# CONFIG_NET_TULIP is not set
550# CONFIG_HP100 is not set
551# CONFIG_NET_PCI is not set
464CONFIG_NETDEV_1000=y 552CONFIG_NETDEV_1000=y
553# CONFIG_ACENIC is not set
554# CONFIG_DL2K is not set
555# CONFIG_E1000 is not set
556# CONFIG_NS83820 is not set
557# CONFIG_HAMACHI is not set
558# CONFIG_YELLOWFIN is not set
559# CONFIG_R8169 is not set
560# CONFIG_SIS190 is not set
561# CONFIG_SKGE is not set
562# CONFIG_SKY2 is not set
563# CONFIG_VIA_VELOCITY is not set
564# CONFIG_TIGON3 is not set
565# CONFIG_BNX2 is not set
465CONFIG_GIANFAR=y 566CONFIG_GIANFAR=y
466CONFIG_GFAR_NAPI=y 567CONFIG_GFAR_NAPI=y
568# CONFIG_QLA3XXX is not set
569# CONFIG_ATL1 is not set
467CONFIG_NETDEV_10000=y 570CONFIG_NETDEV_10000=y
571# CONFIG_CHELSIO_T1 is not set
572# CONFIG_CHELSIO_T3 is not set
573# CONFIG_IXGB is not set
574# CONFIG_S2IO is not set
575# CONFIG_MYRI10GE is not set
576# CONFIG_NETXEN_NIC is not set
577# CONFIG_MLX4_CORE is not set
578# CONFIG_TR is not set
468 579
469# 580#
470# Wireless LAN 581# Wireless LAN
@@ -472,21 +583,16 @@ CONFIG_NETDEV_10000=y
472# CONFIG_WLAN_PRE80211 is not set 583# CONFIG_WLAN_PRE80211 is not set
473# CONFIG_WLAN_80211 is not set 584# CONFIG_WLAN_80211 is not set
474# CONFIG_WAN is not set 585# CONFIG_WAN is not set
586# CONFIG_FDDI is not set
587# CONFIG_HIPPI is not set
475# CONFIG_PPP is not set 588# CONFIG_PPP is not set
476# CONFIG_SLIP is not set 589# CONFIG_SLIP is not set
590# CONFIG_NET_FC is not set
477# CONFIG_SHAPER is not set 591# CONFIG_SHAPER is not set
478# CONFIG_NETCONSOLE is not set 592# CONFIG_NETCONSOLE is not set
479# CONFIG_NETPOLL is not set 593# CONFIG_NETPOLL is not set
480# CONFIG_NET_POLL_CONTROLLER is not set 594# CONFIG_NET_POLL_CONTROLLER is not set
481
482#
483# ISDN subsystem
484#
485# CONFIG_ISDN is not set 595# CONFIG_ISDN is not set
486
487#
488# Telephony Support
489#
490# CONFIG_PHONE is not set 596# CONFIG_PHONE is not set
491 597
492# 598#
@@ -521,6 +627,7 @@ CONFIG_INPUT=y
521CONFIG_SERIO=y 627CONFIG_SERIO=y
522CONFIG_SERIO_I8042=y 628CONFIG_SERIO_I8042=y
523CONFIG_SERIO_SERPORT=y 629CONFIG_SERIO_SERPORT=y
630# CONFIG_SERIO_PCIPS2 is not set
524CONFIG_SERIO_LIBPS2=y 631CONFIG_SERIO_LIBPS2=y
525# CONFIG_SERIO_RAW is not set 632# CONFIG_SERIO_RAW is not set
526# CONFIG_GAMEPORT is not set 633# CONFIG_GAMEPORT is not set
@@ -539,6 +646,7 @@ CONFIG_HW_CONSOLE=y
539# 646#
540CONFIG_SERIAL_8250=y 647CONFIG_SERIAL_8250=y
541CONFIG_SERIAL_8250_CONSOLE=y 648CONFIG_SERIAL_8250_CONSOLE=y
649CONFIG_SERIAL_8250_PCI=y
542CONFIG_SERIAL_8250_NR_UARTS=4 650CONFIG_SERIAL_8250_NR_UARTS=4
543CONFIG_SERIAL_8250_RUNTIME_UARTS=4 651CONFIG_SERIAL_8250_RUNTIME_UARTS=4
544# CONFIG_SERIAL_8250_EXTENDED is not set 652# CONFIG_SERIAL_8250_EXTENDED is not set
@@ -550,14 +658,11 @@ CONFIG_SERIAL_8250_SHARE_IRQ=y
550# CONFIG_SERIAL_UARTLITE is not set 658# CONFIG_SERIAL_UARTLITE is not set
551CONFIG_SERIAL_CORE=y 659CONFIG_SERIAL_CORE=y
552CONFIG_SERIAL_CORE_CONSOLE=y 660CONFIG_SERIAL_CORE_CONSOLE=y
661# CONFIG_SERIAL_JSM is not set
553# CONFIG_SERIAL_OF_PLATFORM is not set 662# CONFIG_SERIAL_OF_PLATFORM is not set
554CONFIG_UNIX98_PTYS=y 663CONFIG_UNIX98_PTYS=y
555CONFIG_LEGACY_PTYS=y 664CONFIG_LEGACY_PTYS=y
556CONFIG_LEGACY_PTY_COUNT=256 665CONFIG_LEGACY_PTY_COUNT=256
557
558#
559# IPMI
560#
561# CONFIG_IPMI_HANDLER is not set 666# CONFIG_IPMI_HANDLER is not set
562# CONFIG_WATCHDOG is not set 667# CONFIG_WATCHDOG is not set
563# CONFIG_HW_RANDOM is not set 668# CONFIG_HW_RANDOM is not set
@@ -565,12 +670,12 @@ CONFIG_NVRAM=y
565CONFIG_GEN_RTC=y 670CONFIG_GEN_RTC=y
566CONFIG_GEN_RTC_X=y 671CONFIG_GEN_RTC_X=y
567# CONFIG_R3964 is not set 672# CONFIG_R3964 is not set
673# CONFIG_APPLICOM is not set
674# CONFIG_AGP is not set
675# CONFIG_DRM is not set
568# CONFIG_RAW_DRIVER is not set 676# CONFIG_RAW_DRIVER is not set
569
570#
571# TPM devices
572#
573# CONFIG_TCG_TPM is not set 677# CONFIG_TCG_TPM is not set
678CONFIG_DEVPORT=y
574# CONFIG_I2C is not set 679# CONFIG_I2C is not set
575 680
576# 681#
@@ -578,11 +683,8 @@ CONFIG_GEN_RTC_X=y
578# 683#
579# CONFIG_SPI is not set 684# CONFIG_SPI is not set
580# CONFIG_SPI_MASTER is not set 685# CONFIG_SPI_MASTER is not set
581
582#
583# Dallas's 1-wire bus
584#
585# CONFIG_W1 is not set 686# CONFIG_W1 is not set
687# CONFIG_POWER_SUPPLY is not set
586# CONFIG_HWMON is not set 688# CONFIG_HWMON is not set
587 689
588# 690#
@@ -655,19 +757,14 @@ CONFIG_DUMMY_CONSOLE=y
655# Sound 757# Sound
656# 758#
657# CONFIG_SOUND is not set 759# CONFIG_SOUND is not set
658 760CONFIG_HID_SUPPORT=y
659#
660# HID Devices
661#
662CONFIG_HID=y 761CONFIG_HID=y
663# CONFIG_HID_DEBUG is not set 762# CONFIG_HID_DEBUG is not set
664 763CONFIG_USB_SUPPORT=y
665# 764CONFIG_USB_ARCH_HAS_HCD=y
666# USB support 765CONFIG_USB_ARCH_HAS_OHCI=y
667# 766CONFIG_USB_ARCH_HAS_EHCI=y
668# CONFIG_USB_ARCH_HAS_HCD is not set 767# CONFIG_USB is not set
669# CONFIG_USB_ARCH_HAS_OHCI is not set
670# CONFIG_USB_ARCH_HAS_EHCI is not set
671 768
672# 769#
673# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' 770# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
@@ -691,14 +788,7 @@ CONFIG_HID=y
691# 788#
692# LED Triggers 789# LED Triggers
693# 790#
694 791# CONFIG_INFINIBAND is not set
695#
696# InfiniBand support
697#
698
699#
700# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
701#
702 792
703# 793#
704# Real Time Clock 794# Real Time Clock
@@ -719,19 +809,13 @@ CONFIG_RTC_INTF_DEV=y
719# CONFIG_RTC_DRV_TEST is not set 809# CONFIG_RTC_DRV_TEST is not set
720 810
721# 811#
722# I2C RTC drivers
723#
724
725#
726# SPI RTC drivers
727#
728
729#
730# Platform RTC drivers 812# Platform RTC drivers
731# 813#
814# CONFIG_RTC_DRV_CMOS is not set
732# CONFIG_RTC_DRV_DS1553 is not set 815# CONFIG_RTC_DRV_DS1553 is not set
733# CONFIG_RTC_DRV_DS1742 is not set 816# CONFIG_RTC_DRV_DS1742 is not set
734# CONFIG_RTC_DRV_M48T86 is not set 817# CONFIG_RTC_DRV_M48T86 is not set
818# CONFIG_RTC_DRV_M48T59 is not set
735# CONFIG_RTC_DRV_V3020 is not set 819# CONFIG_RTC_DRV_V3020 is not set
736 820
737# 821#
@@ -752,6 +836,11 @@ CONFIG_RTC_INTF_DEV=y
752# 836#
753 837
754# 838#
839# Userspace I/O
840#
841# CONFIG_UIO is not set
842
843#
755# File systems 844# File systems
756# 845#
757CONFIG_EXT2_FS=y 846CONFIG_EXT2_FS=y
@@ -859,7 +948,6 @@ CONFIG_RPCSEC_GSS_KRB5=y
859# CONFIG_NCP_FS is not set 948# CONFIG_NCP_FS is not set
860# CONFIG_CODA_FS is not set 949# CONFIG_CODA_FS is not set
861# CONFIG_AFS_FS is not set 950# CONFIG_AFS_FS is not set
862# CONFIG_9P_FS is not set
863 951
864# 952#
865# Partition Types 953# Partition Types
@@ -941,6 +1029,7 @@ CONFIG_BITREVERSE=y
941# CONFIG_CRC16 is not set 1029# CONFIG_CRC16 is not set
942# CONFIG_CRC_ITU_T is not set 1030# CONFIG_CRC_ITU_T is not set
943CONFIG_CRC32=y 1031CONFIG_CRC32=y
1032# CONFIG_CRC7 is not set
944CONFIG_LIBCRC32C=m 1033CONFIG_LIBCRC32C=m
945CONFIG_ZLIB_INFLATE=y 1034CONFIG_ZLIB_INFLATE=y
946CONFIG_PLIST=y 1035CONFIG_PLIST=y
@@ -965,6 +1054,7 @@ CONFIG_ENABLE_MUST_CHECK=y
965CONFIG_DEBUG_KERNEL=y 1054CONFIG_DEBUG_KERNEL=y
966# CONFIG_DEBUG_SHIRQ is not set 1055# CONFIG_DEBUG_SHIRQ is not set
967CONFIG_DETECT_SOFTLOCKUP=y 1056CONFIG_DETECT_SOFTLOCKUP=y
1057CONFIG_SCHED_DEBUG=y
968# CONFIG_SCHEDSTATS is not set 1058# CONFIG_SCHEDSTATS is not set
969# CONFIG_TIMER_STATS is not set 1059# CONFIG_TIMER_STATS is not set
970# CONFIG_DEBUG_SLAB is not set 1060# CONFIG_DEBUG_SLAB is not set
@@ -996,10 +1086,6 @@ CONFIG_FORCED_INLINING=y
996# 1086#
997# CONFIG_KEYS is not set 1087# CONFIG_KEYS is not set
998# CONFIG_SECURITY is not set 1088# CONFIG_SECURITY is not set
999
1000#
1001# Cryptographic options
1002#
1003CONFIG_CRYPTO=y 1089CONFIG_CRYPTO=y
1004CONFIG_CRYPTO_ALGAPI=y 1090CONFIG_CRYPTO_ALGAPI=y
1005CONFIG_CRYPTO_BLKCIPHER=y 1091CONFIG_CRYPTO_BLKCIPHER=y
@@ -1038,7 +1124,4 @@ CONFIG_CRYPTO_DES=y
1038# CONFIG_CRYPTO_CRC32C is not set 1124# CONFIG_CRYPTO_CRC32C is not set
1039# CONFIG_CRYPTO_CAMELLIA is not set 1125# CONFIG_CRYPTO_CAMELLIA is not set
1040# CONFIG_CRYPTO_TEST is not set 1126# CONFIG_CRYPTO_TEST is not set
1041 1127CONFIG_CRYPTO_HW=y
1042#
1043# Hardware crypto devices
1044#
diff --git a/arch/powerpc/platforms/85xx/Kconfig b/arch/powerpc/platforms/85xx/Kconfig
index 4661fccdaa5a..99bb74da0760 100644
--- a/arch/powerpc/platforms/85xx/Kconfig
+++ b/arch/powerpc/platforms/85xx/Kconfig
@@ -30,6 +30,7 @@ config MPC85xx_MDS
30 30
31config MPC8544_DS 31config MPC8544_DS
32 bool "Freescale MPC8544 DS" 32 bool "Freescale MPC8544 DS"
33 select PPC_I8259
33 select DEFAULT_UIMAGE 34 select DEFAULT_UIMAGE
34 help 35 help
35 This option enables support for the MPC8544 DS board 36 This option enables support for the MPC8544 DS board
diff --git a/arch/powerpc/platforms/85xx/mpc8544_ds.c b/arch/powerpc/platforms/85xx/mpc8544_ds.c
index 6fb90aab879f..4905f6f8903b 100644
--- a/arch/powerpc/platforms/85xx/mpc8544_ds.c
+++ b/arch/powerpc/platforms/85xx/mpc8544_ds.c
@@ -2,6 +2,8 @@
2 * MPC8544 DS Board Setup 2 * MPC8544 DS Board Setup
3 * 3 *
4 * Author Xianghua Xiao (x.xiao@freescale.com) 4 * Author Xianghua Xiao (x.xiao@freescale.com)
5 * Roy Zang <tie-fei.zang@freescale.com>
6 * - Add PCI/PCI Exprees support
5 * Copyright 2007 Freescale Semiconductor Inc. 7 * Copyright 2007 Freescale Semiconductor Inc.
6 * 8 *
7 * This program is free software; you can redistribute it and/or modify it 9 * This program is free software; you can redistribute it and/or modify it
@@ -12,13 +14,16 @@
12 14
13#include <linux/stddef.h> 15#include <linux/stddef.h>
14#include <linux/kernel.h> 16#include <linux/kernel.h>
17#include <linux/pci.h>
15#include <linux/kdev_t.h> 18#include <linux/kdev_t.h>
16#include <linux/delay.h> 19#include <linux/delay.h>
17#include <linux/seq_file.h> 20#include <linux/seq_file.h>
21#include <linux/interrupt.h>
18 22
19#include <asm/system.h> 23#include <asm/system.h>
20#include <asm/time.h> 24#include <asm/time.h>
21#include <asm/machdep.h> 25#include <asm/machdep.h>
26#include <asm/pci-bridge.h>
22#include <asm/mpc85xx.h> 27#include <asm/mpc85xx.h>
23#include <mm/mmu_decl.h> 28#include <mm/mmu_decl.h>
24#include <asm/prom.h> 29#include <asm/prom.h>
@@ -27,6 +32,7 @@
27#include <asm/i8259.h> 32#include <asm/i8259.h>
28 33
29#include <sysdev/fsl_soc.h> 34#include <sysdev/fsl_soc.h>
35#include <sysdev/fsl_pci.h>
30#include "mpc85xx.h" 36#include "mpc85xx.h"
31 37
32#undef DEBUG 38#undef DEBUG
@@ -37,6 +43,17 @@
37#define DBG(fmt, args...) 43#define DBG(fmt, args...)
38#endif 44#endif
39 45
46#ifdef CONFIG_PPC_I8259
47static void mpc8544_8259_cascade(unsigned int irq, struct irq_desc *desc)
48{
49 unsigned int cascade_irq = i8259_irq();
50
51 if (cascade_irq != NO_IRQ) {
52 generic_handle_irq(cascade_irq);
53 }
54 desc->chip->eoi(irq);
55}
56#endif /* CONFIG_PPC_I8259 */
40 57
41void __init mpc8544_ds_pic_init(void) 58void __init mpc8544_ds_pic_init(void)
42{ 59{
@@ -96,19 +113,240 @@ void __init mpc8544_ds_pic_init(void)
96#endif /* CONFIG_PPC_I8259 */ 113#endif /* CONFIG_PPC_I8259 */
97} 114}
98 115
116#ifdef CONFIG_PCI
117enum pirq { PIRQA = 8, PIRQB, PIRQC, PIRQD, PIRQE, PIRQF, PIRQG, PIRQH };
118
119/*
120 * Value in table -- IRQ number
121 */
122const unsigned char uli1575_irq_route_table[16] = {
123 0, /* 0: Reserved */
124 0x8,
125 0, /* 2: Reserved */
126 0x2,
127 0x4,
128 0x5,
129 0x7,
130 0x6,
131 0, /* 8: Reserved */
132 0x1,
133 0x3,
134 0x9,
135 0xb,
136 0, /* 13: Reserved */
137 0xd,
138 0xf,
139};
140
141static int __devinit
142get_pci_irq_from_of(struct pci_controller *hose, int slot, int pin)
143{
144 struct of_irq oirq;
145 u32 laddr[3];
146 struct device_node *hosenode = hose ? hose->arch_data : NULL;
147
148 if (!hosenode)
149 return -EINVAL;
150
151 laddr[0] = (hose->first_busno << 16) | (PCI_DEVFN(slot, 0) << 8);
152 laddr[1] = laddr[2] = 0;
153 of_irq_map_raw(hosenode, &pin, 1, laddr, &oirq);
154 DBG("mpc8544_ds: pci irq addr %x, slot %d, pin %d, irq %d\n",
155 laddr[0], slot, pin, oirq.specifier[0]);
156 return oirq.specifier[0];
157}
158
159/*8259*/
160static void __devinit quirk_uli1575(struct pci_dev *dev)
161{
162 unsigned short temp;
163 struct pci_controller *hose = pci_bus_to_host(dev->bus);
164 unsigned char irq2pin[16];
165 unsigned long pirq_map_word = 0;
166 u32 irq;
167 int i;
168
169 /*
170 * ULI1575 interrupts route setup
171 */
172 memset(irq2pin, 0, 16); /* Initialize default value 0 */
173
174 irq2pin[6]=PIRQA+3; /* enabled mapping for IRQ6 to PIRQD, used by SATA */
175
176 /*
177 * PIRQE -> PIRQF mapping set manually
178 *
179 * IRQ pin IRQ#
180 * PIRQE ---- 9
181 * PIRQF ---- 10
182 * PIRQG ---- 11
183 * PIRQH ---- 12
184 */
185 for (i = 0; i < 4; i++)
186 irq2pin[i + 9] = PIRQE + i;
187
188 /* Set IRQ-PIRQ Mapping to ULI1575 */
189 for (i = 0; i < 16; i++)
190 if (irq2pin[i])
191 pirq_map_word |= (uli1575_irq_route_table[i] & 0xf)
192 << ((irq2pin[i] - PIRQA) * 4);
193
194 pirq_map_word |= 1<<26; /* disable INTx in EP mode*/
195
196 /* ULI1575 IRQ mapping conf register default value is 0xb9317542 */
197 DBG("Setup ULI1575 IRQ mapping configuration register value = 0x%x\n",
198 (int)pirq_map_word);
199 pci_write_config_dword(dev, 0x48, pirq_map_word);
200
201#define ULI1575_SET_DEV_IRQ(slot, pin, reg) \
202 do { \
203 int irq; \
204 irq = get_pci_irq_from_of(hose, slot, pin); \
205 if (irq > 0 && irq < 16) \
206 pci_write_config_byte(dev, reg, irq2pin[irq]); \
207 else \
208 printk(KERN_WARNING "ULI1575 device" \
209 "(slot %d, pin %d) irq %d is invalid.\n", \
210 slot, pin, irq); \
211 } while(0)
212
213 /* USB 1.1 OHCI controller 1, slot 28, pin 1 */
214 ULI1575_SET_DEV_IRQ(28, 1, 0x86);
215
216 /* USB 1.1 OHCI controller 2, slot 28, pin 2 */
217 ULI1575_SET_DEV_IRQ(28, 2, 0x87);
218
219 /* USB 1.1 OHCI controller 3, slot 28, pin 3 */
220 ULI1575_SET_DEV_IRQ(28, 3, 0x88);
221
222 /* USB 2.0 controller, slot 28, pin 4 */
223 irq = get_pci_irq_from_of(hose, 28, 4);
224 if (irq >= 0 && irq <= 15)
225 pci_write_config_dword(dev, 0x74, uli1575_irq_route_table[irq]);
226
227 /* Audio controller, slot 29, pin 1 */
228 ULI1575_SET_DEV_IRQ(29, 1, 0x8a);
229
230 /* Modem controller, slot 29, pin 2 */
231 ULI1575_SET_DEV_IRQ(29, 2, 0x8b);
232
233 /* HD audio controller, slot 29, pin 3 */
234 ULI1575_SET_DEV_IRQ(29, 3, 0x8c);
235
236 /* SMB interrupt: slot 30, pin 1 */
237 ULI1575_SET_DEV_IRQ(30, 1, 0x8e);
238
239 /* PMU ACPI SCI interrupt: slot 30, pin 2 */
240 ULI1575_SET_DEV_IRQ(30, 2, 0x8f);
241
242 /* Serial ATA interrupt: slot 31, pin 1 */
243 ULI1575_SET_DEV_IRQ(31, 1, 0x8d);
244
245 /* Primary PATA IDE IRQ: 14
246 * Secondary PATA IDE IRQ: 15
247 */
248 pci_write_config_byte(dev, 0x44, 0x30 | uli1575_irq_route_table[14]);
249 pci_write_config_byte(dev, 0x75, uli1575_irq_route_table[15]);
250
251 /* Set IRQ14 and IRQ15 to legacy IRQs */
252 pci_read_config_word(dev, 0x46, &temp);
253 temp |= 0xc000;
254 pci_write_config_word(dev, 0x46, temp);
255
256 /* Set i8259 interrupt trigger
257 * IRQ 3: Level
258 * IRQ 4: Level
259 * IRQ 5: Level
260 * IRQ 6: Level
261 * IRQ 7: Level
262 * IRQ 9: Level
263 * IRQ 10: Level
264 * IRQ 11: Level
265 * IRQ 12: Level
266 * IRQ 14: Edge
267 * IRQ 15: Edge
268 */
269 outb(0xfa, 0x4d0);
270 outb(0x1e, 0x4d1);
271
272#undef ULI1575_SET_DEV_IRQ
273}
274
275/* SATA */
276static void __devinit quirk_uli5288(struct pci_dev *dev)
277{
278 unsigned char c;
279
280 pci_read_config_byte(dev, 0x83, &c);
281 c |= 0x80; /* read/write lock */
282 pci_write_config_byte(dev, 0x83, c);
283
284 pci_write_config_byte(dev, 0x09, 0x01); /* Base class code: storage */
285 pci_write_config_byte(dev, 0x0a, 0x06); /* IDE disk */
286
287 pci_read_config_byte(dev, 0x83, &c);
288 c &= 0x7f;
289 pci_write_config_byte(dev, 0x83, c);
290
291 pci_read_config_byte(dev, 0x84, &c);
292 c |= 0x01; /* emulated PATA mode enabled */
293 pci_write_config_byte(dev, 0x84, c);
294}
295
296/* PATA */
297static void __devinit quirk_uli5229(struct pci_dev *dev)
298{
299 unsigned short temp;
300 pci_write_config_word(dev, 0x04, 0x0405); /* MEM IO MSI */
301 pci_read_config_word(dev, 0x4a, &temp);
302 temp |= 0x1000; /* Enable Native IRQ 14/15 */
303 pci_write_config_word(dev, 0x4a, temp);
304}
305
306/*Bridge*/
307static void __devinit early_uli5249(struct pci_dev *dev)
308{
309 unsigned char temp;
310 pci_write_config_word(dev, 0x04, 0x0007); /* mem access */
311 pci_read_config_byte(dev, 0x7c, &temp);
312 pci_write_config_byte(dev, 0x7c, 0x80); /* R/W lock control */
313 pci_write_config_byte(dev, 0x09, 0x01); /* set as pci-pci bridge */
314 pci_write_config_byte(dev, 0x7c, temp); /* restore pci bus debug control */
315 dev->class |= 0x1;
316}
317
318DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AL, 0x1575, quirk_uli1575);
319DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AL, 0x5288, quirk_uli5288);
320DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AL, 0x5229, quirk_uli5229);
321DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_AL, 0x5249, early_uli5249);
322#endif /* CONFIG_PCI */
99 323
100/* 324/*
101 * Setup the architecture 325 * Setup the architecture
102 */ 326 */
103static void __init mpc8544_ds_setup_arch(void) 327static void __init mpc8544_ds_setup_arch(void)
104{ 328{
329#ifdef CONFIG_PCI
330 struct device_node *np;
331#endif
332
105 if (ppc_md.progress) 333 if (ppc_md.progress)
106 ppc_md.progress("mpc8544_ds_setup_arch()", 0); 334 ppc_md.progress("mpc8544_ds_setup_arch()", 0);
107 335
336#ifdef CONFIG_PCI
337 for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;) {
338 struct resource rsrc;
339 of_address_to_resource(np, 0, &rsrc);
340 if ((rsrc.start & 0xfffff) == 0xb000)
341 fsl_add_bridge(np, 1);
342 else
343 fsl_add_bridge(np, 0);
344 }
345#endif
346
108 printk("MPC8544 DS board from Freescale Semiconductor\n"); 347 printk("MPC8544 DS board from Freescale Semiconductor\n");
109} 348}
110 349
111
112/* 350/*
113 * Called very early, device-tree isn't unflattened 351 * Called very early, device-tree isn't unflattened
114 */ 352 */
@@ -124,6 +362,7 @@ define_machine(mpc8544_ds) {
124 .probe = mpc8544_ds_probe, 362 .probe = mpc8544_ds_probe,
125 .setup_arch = mpc8544_ds_setup_arch, 363 .setup_arch = mpc8544_ds_setup_arch,
126 .init_IRQ = mpc8544_ds_pic_init, 364 .init_IRQ = mpc8544_ds_pic_init,
365 .pcibios_fixup_bus = fsl_pcibios_fixup_bus,
127 .get_irq = mpic_get_irq, 366 .get_irq = mpic_get_irq,
128 .restart = mpc85xx_restart, 367 .restart = mpc85xx_restart,
129 .calibrate_decr = generic_calibrate_decr, 368 .calibrate_decr = generic_calibrate_decr,
diff --git a/arch/powerpc/sysdev/fsl_pci.c b/arch/powerpc/sysdev/fsl_pci.c
index d7747e05d1da..dcd0ca86bdf6 100644
--- a/arch/powerpc/sysdev/fsl_pci.c
+++ b/arch/powerpc/sysdev/fsl_pci.c
@@ -226,5 +226,7 @@ DECLARE_PCI_FIXUP_EARLY(0x1957, 0x0020, quirk_fsl_pcie_transparent);
226DECLARE_PCI_FIXUP_EARLY(0x1957, 0x0021, quirk_fsl_pcie_transparent); 226DECLARE_PCI_FIXUP_EARLY(0x1957, 0x0021, quirk_fsl_pcie_transparent);
227DECLARE_PCI_FIXUP_EARLY(0x1957, 0x0024, quirk_fsl_pcie_transparent); 227DECLARE_PCI_FIXUP_EARLY(0x1957, 0x0024, quirk_fsl_pcie_transparent);
228DECLARE_PCI_FIXUP_EARLY(0x1957, 0x0025, quirk_fsl_pcie_transparent); 228DECLARE_PCI_FIXUP_EARLY(0x1957, 0x0025, quirk_fsl_pcie_transparent);
229DECLARE_PCI_FIXUP_EARLY(0x1957, 0x0030, quirk_fsl_pcie_transparent);
230DECLARE_PCI_FIXUP_EARLY(0x1957, 0x0031, quirk_fsl_pcie_transparent);
229DECLARE_PCI_FIXUP_EARLY(0x1957, 0x7010, quirk_fsl_pcie_transparent); 231DECLARE_PCI_FIXUP_EARLY(0x1957, 0x7010, quirk_fsl_pcie_transparent);
230DECLARE_PCI_FIXUP_EARLY(0x1957, 0x7011, quirk_fsl_pcie_transparent); 232DECLARE_PCI_FIXUP_EARLY(0x1957, 0x7011, quirk_fsl_pcie_transparent);