3 * Heiko Schocher, DENX Software Engineering, <hs@denx.de>.
6 * Juergen Beisert, EuroDesign embedded technologies, info@eurodsn.de
7 * Derived from walnut.c
10 * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
12 * See file CREDITS for list of people who contributed to this
15 * This program is free software; you can redistribute it and/or
16 * modify it under the terms of the GNU General Public License as
17 * published by the Free Software Foundation; either version 2 of
18 * the License, or (at your option) any later version.
20 * This program is distributed in the hope that it will be useful,
21 * but WITHOUT ANY WARRANTY; without even the implied warranty of
22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 * GNU General Public License for more details.
25 * You should have received a copy of the GNU General Public License
26 * along with this program; if not, write to the Free Software
27 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
34 #include <asm/processor.h>
43 #define writeb(b,addr) ((*(volatile u8 *) (addr)) = (b))
44 #define writel(b,addr) ((*(volatile u32 *) (addr)) = (b))
46 /* write only register to configure things in our CPLD */
47 #define CPLD_CONTROL_1 0x79000102
48 #define CPLD_VERSION 0x79000103
50 #define IS_CAMERON ((*(unsigned char *)(CPLD_VERSION)== 0x32) ? 1 : 0)
52 static struct pci_controller hose
={0,};
54 /************************************************************
56 ************************************************************/
58 /* CPC0_CR0 Function ISA bus
60 - GPIO1 -> Output: NAND-Command Latch Enable
61 - GPIO2 -> Output: NAND Address Latch Enable
62 - GPIO3 -> IRQ input ISA-IRQ #5 (through CPLD)
63 - GPIO4 -> Output: NAND-Chip Enable
64 - GPIO5 -> IRQ input ISA-IRQ#7 (through CPLD)
65 - GPIO6 -> IRQ input ISA-IRQ#9 (through CPLD)
66 - GPIO7 -> IRQ input ISA-IRQ#10 (through CPLD)
67 - GPIO8 -> IRQ input ISA-IRQ#11 (through CPLD)
68 - GPIO9 -> IRQ input ISA-IRQ#12 (through CPLD)
69 - GPIO10/CS1# -> CS1# NAND ISA-CS#0
70 - GPIO11/CS2# -> CS2# ISA emulation ISA-CS#1
71 - GPIO12/CS3# -> CS3# 2nd Flash-Bank ISA-CS#2 or ISA-CS#7
72 - GPIO13/CS4# -> CS4# USB HC or ISA emulation ISA-CS#3
73 - GPIO14/CS5# -> CS5# Boosted IDE access ISA-CS#4
74 - GPIO15/CS6# -> CS6# ISA emulation ISA-CS#5
75 - GPIO16/CS7# -> CS7# ISA emulation ISA-CS#6
76 - GPIO17/IRQ0 -> GPIO, in, NAND-Ready/Busy# line ISA-IRQ#3
77 - GPIO18/IRQ1 -> IRQ input ISA-IRQ#14
78 - GPIO19/IRQ2 -> IRQ input or USB ISA-IRQ#4
79 - GPIO20/IRQ3 -> IRQ input PCI-IRQ#D
80 - GPIO21/IRQ4 -> IRQ input PCI-IRQ#C
81 - GPIO22/IRQ5 -> IRQ input PCI-IRQ#B
82 - GPIO23/IRQ6 -> IRQ input PCI-IRQ#A
83 - GPIO24 -> if GPIO output: 0=JTAG CPLD activ, 1=JTAG CPLD inactiv
86 | CPLD register: io-space at offset 0x102 (write only)
89 | 2 0=CS#4 USB CS#, 1=ISA or GP bus
93 | 6 1=enable faster IDE access
96 #define USB_CHIP_ENABLE 0x04
97 #define IDE_BOOSTING 0x40
99 /* --------------- USB stuff ------------------------------------- */
100 #ifdef CONFIG_ISP1161_PRESENT
102 * initUsbHost- Initialize the Philips isp1161 HC part if present
103 * @cpldConfig: Pointer to value in write only CPLD register
105 * Initialize the USB host controller if present and fills the
106 * scratch register to inform the driver about used resources
109 static void initUsbHost (unsigned char *cpldConfig
)
112 unsigned long usbBase
;
114 * Read back where init.S has located the USB chip
117 usbBase
= mfdcr (0x013);
118 if (!(usbBase
& 0x18000)) /* enabled? */
120 usbBase
&= 0xFFF00000;
123 * to test for the USB controller enable using of CS#4 and DMA 3 for USB access
125 writeb (*cpldConfig
| USB_CHIP_ENABLE
,CPLD_CONTROL_1
);
128 * first check: is the controller assembled?
130 hcWriteWord (usbBase
, 0x5555, HcScratch
);
131 if (hcReadWord (usbBase
, HcScratch
) == 0x5555) {
132 hcWriteWord (usbBase
, 0xAAAA, HcScratch
);
133 if (hcReadWord (usbBase
, HcScratch
) == 0xAAAA) {
134 if ((hcReadWord (usbBase
, HcChipID
) & 0xFF00) != 0x6100)
135 return; /* this is not our controller */
137 * try a software reset. This needs up to 10 seconds (see datasheet)
139 hcWriteDWord (usbBase
, 0x00000001, HcCommandStatus
);
140 for (i
= 1000; i
> 0; i
--) { /* loop up to 10 seconds */
142 if (!(hcReadDWord (usbBase
, HcCommandStatus
) & 0x01))
147 return; /* the controller doesn't responding. Broken? */
149 * OK. USB controller is ready. Initialize it in such way the later driver
150 * can us it (without any knowing about specific implementation)
152 hcWriteDWord (usbBase
, 0x00000000, HcControl
);
154 * disable all interrupt sources. Because we
155 * don't know where we come from (hard reset, cold start, soft reset...)
157 hcWriteDWord (usbBase
, 0x8000007D, HcInterruptDisable
);
159 * our current setup hardware configuration
160 * - every port power supply can switched indepently
161 * - every port can signal overcurrent
162 * - every port is "outside" and the devices are removeable
164 hcWriteDWord (usbBase
, 0x32000902, HcRhDescriptorA
);
165 hcWriteDWord (usbBase
, 0x00060000, HcRhDescriptorB
);
167 * don't forget to switch off power supply of each port
168 * The later running driver can reenable them to find and use
169 * the (maybe) connected devices.
172 hcWriteDWord (usbBase
, 0x00000200, HcRhPortStatus1
);
173 hcWriteDWord (usbBase
, 0x00000200, HcRhPortStatus2
);
174 hcWriteWord (usbBase
, 0x0428, HcHardwareConfiguration
);
175 hcWriteWord (usbBase
, 0x0040, HcDMAConfiguration
);
176 hcWriteWord (usbBase
, 0x0000, HcuPInterruptEnable
);
177 hcWriteWord (usbBase
, 0xA000 | (0x03 << 8) | 27, HcScratch
);
179 * controller is present and usable
181 *cpldConfig
|= USB_CHIP_ENABLE
;
187 #if defined(CONFIG_START_IDE)
188 int board_start_ide(void)
191 puts ("no IDE on cameron board.\n");
198 static int sc3_cameron_init (void)
200 /* Set up the Memory Controller for the CAMERON version */
201 mtebc (pb4ap
, 0x01805940);
202 mtebc (pb4cr
, 0x7401a000);
203 mtebc (pb5ap
, 0x01805940);
204 mtebc (pb5cr
, 0x7401a000);
212 void sc3_read_eeprom (void)
214 uchar i2c_buffer
[18];
216 i2c_read (0x50, 0x03, 1, i2c_buffer
, 9);
218 setenv ("serial#", (char *)i2c_buffer
);
220 /* read mac-address from eeprom */
221 i2c_read (0x50, 0x11, 1, i2c_buffer
, 15);
223 i2c_buffer
[16] = i2c_buffer
[14];
224 i2c_buffer
[15] = i2c_buffer
[13];
225 i2c_buffer
[14] = ':';
226 i2c_buffer
[13] = i2c_buffer
[12];
227 i2c_buffer
[12] = i2c_buffer
[11];
228 i2c_buffer
[11] = ':';
232 setenv ("ethaddr", (char *)i2c_buffer
);
235 int board_early_init_f (void)
237 /* write only register to configure things in our CPLD */
238 unsigned char cpldConfig_1
=0x00;
240 /*-------------------------------------------------------------------------+
241 | Interrupt controller setup for the SolidCard III CPU card (plus Evaluation board).
243 | Note: IRQ 0 UART 0, active high; level sensitive
244 | IRQ 1 UART 1, active high; level sensitive
245 | IRQ 2 IIC, active high; level sensitive
246 | IRQ 3 Ext. master, rising edge, edge sensitive
247 | IRQ 4 PCI, active high; level sensitive
248 | IRQ 5 DMA Channel 0, active high; level sensitive
249 | IRQ 6 DMA Channel 1, active high; level sensitive
250 | IRQ 7 DMA Channel 2, active high; level sensitive
251 | IRQ 8 DMA Channel 3, active high; level sensitive
252 | IRQ 9 Ethernet Wakeup, active high; level sensitive
253 | IRQ 10 MAL System Error (SERR), active high; level sensitive
254 | IRQ 11 MAL Tx End of Buffer, active high; level sensitive
255 | IRQ 12 MAL Rx End of Buffer, active high; level sensitive
256 | IRQ 13 MAL Tx Descriptor Error, active high; level sensitive
257 | IRQ 14 MAL Rx Descriptor Error, active high; level sensitive
258 | IRQ 15 Ethernet, active high; level sensitive
259 | IRQ 16 External PCI SERR, active high; level sensitive
260 | IRQ 17 ECC Correctable Error, active high; level sensitive
261 | IRQ 18 PCI Power Management, active high; level sensitive
263 | IRQ 19 (EXT IRQ7 405GPr only)
264 | IRQ 20 (EXT IRQ8 405GPr only)
265 | IRQ 21 (EXT IRQ9 405GPr only)
266 | IRQ 22 (EXT IRQ10 405GPr only)
267 | IRQ 23 (EXT IRQ11 405GPr only)
268 | IRQ 24 (EXT IRQ12 405GPr only)
270 | IRQ 25 (EXT IRQ 0) NAND-Flash R/B# (raising edge means flash is ready)
271 | IRQ 26 (EXT IRQ 1) IDE0 interrupt (x86 = IRQ14). Active high (edge sensitive)
272 | IRQ 27 (EXT IRQ 2) USB controller
273 | IRQ 28 (EXT IRQ 3) INT D, VGA; active low; level sensitive
274 | IRQ 29 (EXT IRQ 4) INT C, Ethernet; active low; level sensitive
275 | IRQ 30 (EXT IRQ 5) INT B, PC104+ SLOT; active low; level sensitive
276 | IRQ 31 (EXT IRQ 6) INT A, PC104+ SLOT; active low; level sensitive
278 | Direct Memory Access Controller Signal Polarities
279 | DRQ0 active high (like ISA)
280 | ACK0 active low (like ISA)
281 | EOT0 active high (like ISA)
282 | DRQ1 active high (like ISA)
283 | ACK1 active low (like ISA)
284 | EOT1 active high (like ISA)
285 | DRQ2 active high (like ISA)
286 | ACK2 active low (like ISA)
287 | EOT2 active high (like ISA)
288 | DRQ3 active high (like ISA)
289 | ACK3 active low (like ISA)
290 | EOT3 active high (like ISA)
292 +-------------------------------------------------------------------------*/
294 writeb (cpldConfig_1
, CPLD_CONTROL_1
); /* disable everything in CPLD */
296 mtdcr (uicsr
, 0xFFFFFFFF); /* clear all ints */
297 mtdcr (uicer
, 0x00000000); /* disable all ints */
298 mtdcr (uiccr
, 0x00000000); /* set all to be non-critical */
302 mtdcr (0x0B6, 0x18000000);
303 mtdcr (uicpr
, 0xFFFFFFF0);
304 mtdcr (uictr
, 0x10001030);
306 mtdcr (0x0B6, 0x0000000);
307 mtdcr (uicpr
, 0xFFFFFFE0);
308 mtdcr (uictr
, 0x10000020);
310 mtdcr (uicvcr
, 0x00000001); /* set vect base=0,INT0 highest priority */
311 mtdcr (uicsr
, 0xFFFFFFFF); /* clear all ints */
313 /* setup other implementation specific details */
314 mtdcr (ecr
, 0x60606000);
316 mtdcr (cntrl1
, 0x000042C0);
319 mtdcr (cntrl0
, 0x01380000);
320 /* Setup the GPIOs */
321 writel (0x08008000, 0xEF600700); /* Output states */
322 writel (0x00000000, 0xEF600718); /* Open Drain control */
323 writel (0x68098000, 0xEF600704); /* Output control */
325 mtdcr (cntrl0
,0x00080000);
326 /* Setup the GPIOs */
327 writel (0x08000000, 0xEF600700); /* Output states */
328 writel (0x14000000, 0xEF600718); /* Open Drain control */
329 writel (0x7C000000, 0xEF600704); /* Output control */
332 /* Code decompression disabled */
336 /* CPC0_ER: enable sleep mode of (currently) unused components */
337 /* CPC0_FR: force unused components into sleep mode */
338 mtdcr (cpmer
, 0x3F800000);
339 mtdcr (cpmfr
, 0x14000000);
341 /* set PLB priority */
342 mtdcr (0x87, 0x08000000);
344 /* --------------- DMA stuff ------------------------------------- */
345 mtdcr (0x126, 0x49200000);
347 #ifndef IDE_USES_ISA_EMULATION
348 cpldConfig_1
|= IDE_BOOSTING
; /* enable faster IDE */
349 /* cpldConfig |= 0x01; */ /* enable 8.33MHz output, if *not* present on your baseboard */
350 writeb (cpldConfig_1
, CPLD_CONTROL_1
);
353 #ifdef CONFIG_ISP1161_PRESENT
354 initUsbHost (&cpldConfig_1
);
355 writeb (cpldConfig_1
, CPLD_CONTROL_1
);
357 /* FIXME: for what must we do this */
358 *(unsigned long *)0x79000080 = 0x0001;
362 int misc_init_r (void)
366 volatile char *xilinx_adr
;
367 xilinx_adr
= (char *)0x79000102;
371 /* customer settings ***************************************** */
373 s1 = getenv ("function");
375 if (!strcmp (s1, "Rosho")) {
376 printf ("function 'Rosho' activated\n");
380 printf (">>>>>>>>>> function %s not recognized\n",s1);
385 /* individual settings ***************************************** */
386 if ((s1
= getenv ("xilinx"))) {
389 while (i
< 3 && s1
[i
]) {
390 if (s1
[i
] >= '0' && s1
[i
] <= '9')
391 xilinx_val
= (xilinx_val
<< 4) + s1
[i
] - '0';
393 if (s1
[i
] >= 'A' && s1
[i
] <= 'F')
394 xilinx_val
= (xilinx_val
<< 4) + s1
[i
] - 'A' + 10;
396 if (s1
[i
] >= 'a' && s1
[i
] <= 'f')
397 xilinx_val
= (xilinx_val
<< 4) + s1
[i
] - 'a' + 10;
404 if (xilinx_val
>= 0 && xilinx_val
<=255 && i
< 3) {
405 printf ("Xilinx: set to %s\n", s1
);
406 *xilinx_adr
= (unsigned char) xilinx_val
;
408 printf ("Xilinx: rejected value %s\n", s1
);
413 /* -------------------------------------------------------------------------
416 * Print some informations about chips select configurations
417 * Only used while debugging.
426 ------------------------------------------------------------------------- */
429 static void printCSConfig(int reg
,unsigned long ap
,unsigned long cr
)
431 const char *bsize
[4] = {"8","16","32","?"};
432 const unsigned char banks
[8] = {1, 2, 4, 8, 16, 32, 64, 128};
433 const char *bankaccess
[4] = {"disabled", "RO", "WO", "RW"};
435 #define CYCLE 30 /* time of one clock (based on 33MHz) */
437 printf("\nCS#%d",reg
);
438 if (!(cr
& 0x00018000))
441 if (((cr
&0xFFF00000U
) & ((banks
[(cr
& 0x000E0000) >> 17]-1) << 20)))
442 puts(" Address is not multiple of bank size!");
444 printf("\n -%s bit device",
445 bsize
[(cr
& 0x00006000) >> 13]);
446 printf(" at 0x%08lX", cr
& 0xFFF00000U
);
447 printf(" size: %u MB", banks
[(cr
& 0x000E0000) >> 17]);
448 printf(" rights: %s", bankaccess
[(cr
& 0x00018000) >> 15]);
449 if (ap
& 0x80000000) {
450 printf("\n -Burst device (%luns/%luns)",
451 (((ap
& 0x7C000000) >> 26) + 1) * CYCLE
,
452 (((ap
& 0x03800000) >> 23) + 1) * CYCLE
);
454 printf("\n -Non burst device, active cycle %luns",
455 (((ap
& 0x7F800000) >> 23) + 1) * CYCLE
);
456 printf("\n -Address setup %luns",
457 ((ap
& 0xC0000) >> 18) * CYCLE
);
458 printf("\n -CS active to RD %luns/WR %luns",
459 ((ap
& 0x30000) >> 16) * CYCLE
,
460 ((ap
& 0xC000) >> 14) * CYCLE
);
461 printf("\n -WR to CS inactive %luns",
462 ((ap
& 0x3000) >> 12) * CYCLE
);
463 printf("\n -Hold after access %luns",
464 ((ap
& 0xE00) >> 9) * CYCLE
);
465 printf("\n -Ready is %sabled",
466 ap
& 0x100 ? "en" : "dis");
474 static unsigned int ap
[] = {pb0ap
, pb1ap
, pb2ap
, pb3ap
, pb4ap
,
475 pb5ap
, pb6ap
, pb7ap
};
476 static unsigned int cr
[] = {pb0cr
, pb1cr
, pb2cr
, pb3cr
, pb4cr
,
477 pb5cr
, pb6cr
, pb7cr
};
479 static int show_reg (int nr
)
481 unsigned long ul1
, ul2
;
483 mtdcr (ebccfga
, ap
[nr
]);
484 ul1
= mfdcr (ebccfgd
);
485 mtdcr (ebccfga
, cr
[nr
]);
486 ul2
= mfdcr(ebccfgd
);
487 printCSConfig(nr
, ul1
, ul2
);
492 int checkboard (void)
498 for (i
= 0; i
< 8; i
++) {
502 mtdcr (ebccfga
, epcr
);
503 ul1
= mfdcr (ebccfgd
);
505 puts ("\nGeneral configuration:\n");
507 if (ul1
& 0x80000000)
508 printf(" -External Bus is always driven\n");
511 printf(" -CS signals are always driven\n");
514 printf(" -PowerDown after %lu clocks\n",
515 (ul1
& 0x1F000) >> 7);
517 switch (ul1
& 0xC0000)
520 printf(" -No external master present\n");
523 printf(" -8 bit external master present\n");
526 printf(" -16 bit external master present\n");
529 printf(" -32 bit external master present\n");
533 switch (ul1
& 0x300000)
536 printf(" -Prefetch: Illegal setting!\n");
539 printf(" -1 doubleword prefetch\n");
542 printf(" -2 doublewords prefetch\n");
545 printf(" -4 doublewords prefetch\n");
550 printf("Board: SolidCard III %s %s version.\n",
551 (IS_CAMERON
? "Cameron" : "Eurodesign"), CONFIG_SC3_VERSION
);
555 static int printSDRAMConfig(char reg
, unsigned long cr
)
557 const int bisize
[8]={4, 8, 16, 32, 64, 128, 256, 0};
559 const char *basize
[8]=
560 {"4", "8", "16", "32", "64", "128", "256", "Reserved"};
562 printf("SDRAM bank %d",reg
);
567 printf(" at 0x%08lX, size %s MB",cr
& 0xFFC00000,basize
[(cr
&0xE0000)>>17]);
568 printf(" mode %lu\n",((cr
& 0xE000)>>13)+1);
573 return(bisize
[(cr
& 0xE0000) >> 17]);
579 static unsigned int mbcf
[] = {mem_mb0cf
, mem_mb1cf
, mem_mb2cf
, mem_mb3cf
};
582 long int initdram (int board_type
)
591 puts("\nSDRAM configuration:\n");
593 mtdcr (memcfga
, mem_mcopt1
);
594 ul1
= mfdcr(memcfgd
);
596 if (!(ul1
& 0x80000000)) {
597 puts(" Controller disabled\n");
600 for (i
= 0; i
< 4; i
++) {
601 mtdcr (memcfga
, mbcf
[i
]);
602 ul1
= mfdcr (memcfgd
);
603 mems
+= printSDRAMConfig (i
, ul1
);
606 mtdcr (memcfga
, mem_sdtr1
);
607 ul1
= mfdcr(memcfgd
);
609 printf ("Timing:\n -CAS latency %lu\n", ((ul1
& 0x1800000) >> 23)+1);
610 printf (" -Precharge %lu (PTA) \n", ((ul1
& 0xC0000) >> 18) + 1);
611 printf (" -R/W to Precharge %lu (CTP)\n", ((ul1
& 0x30000) >> 16) + 1);
612 printf (" -Leadoff %lu\n", ((ul1
& 0xC000) >> 14) + 1);
613 printf (" -CAS to RAS %lu\n", ((ul1
& 0x1C) >> 2) + 4);
614 printf (" -RAS to CAS %lu\n", ((ul1
& 0x3) + 1));
616 mtdcr (memcfga
, mem_rtr
);
617 ul1
= mfdcr(memcfgd
);
618 printf (" -Refresh rate: %luns\n", (ul1
>> 16) * 7);
620 mtdcr(memcfga
,mem_pmit
);
623 mtdcr(memcfga
,mem_mcopt1
);
626 if (ul1
& 0x20000000)
627 printf(" -Power Down after: %luns\n",
628 ((ul2
& 0xFFC00000) >> 22) * 7);
630 puts(" -Power Down disabled\n");
632 if (ul1
& 0x40000000)
633 printf(" -Self refresh feature active\n");
635 puts(" -Self refresh disabled\n");
637 if (ul1
& 0x10000000)
638 puts(" -ECC enabled\n");
640 puts(" -ECC disabled\n");
643 puts(" -Using registered SDRAM\n");
645 if (!(ul1
& 0x6000000))
646 puts(" -Using 32 bit data width\n");
648 puts(" -Illegal data width!\n");
651 puts(" -ECC drivers inactive\n");
653 puts(" -ECC drivers active\n");
656 puts(" -Memory lines always active outputs\n");
658 puts(" -Memory lines only at write cycles active outputs\n");
660 mtdcr (memcfga
, mem_status
);
661 ul1
= mfdcr (memcfgd
);
662 if (ul1
& 0x80000000)
663 puts(" -SDRAM Controller ready\n");
665 puts(" -SDRAM Controller not ready\n");
668 puts(" -SDRAM in self refresh mode!\n");
670 return (mems
* 1024 * 1024);
672 mtdcr (memcfga
, mem_mb0cf
);
673 ul1
= mfdcr (memcfgd
);
674 mems
= printSDRAMConfig (0, ul1
);
676 mtdcr (memcfga
, mem_mb1cf
);
677 ul1
= mfdcr (memcfgd
);
678 mems
+= printSDRAMConfig (1, ul1
);
680 mtdcr (memcfga
, mem_mb2cf
);
681 ul1
= mfdcr(memcfgd
);
682 mems
+= printSDRAMConfig (2, ul1
);
684 mtdcr (memcfga
, mem_mb3cf
);
685 ul1
= mfdcr(memcfgd
);
686 mems
+= printSDRAMConfig (3, ul1
);
688 return (mems
* 1024 * 1024);
692 static void pci_solidcard3_fixup_irq (struct pci_controller
*hose
, pci_dev_t dev
)
694 /*-------------------------------------------------------------------------+
695 | ,-. ,-. ,-. ,-. ,-.
696 | INTD# ----|B|-----|P|-. ,-|P|-. ,-| |-. ,-|G|
697 | |R| |C| \ / |C| \ / |E| \ / |r|
698 | INTC# ----|I|-----|1|-. `/---|1|-. `/---|t|-. `/---|a|
699 | |D| |0| \/ |0| \/ |h| \/ |f|
700 | INTB# ----|G|-----|4|-./`----|4|-./`----|e|-./`----|i|
701 | |E| |+| /\ |+| /\ |r| /\ |k|
702 | INTA# ----| |-----| |- `----| |- `----| |- `----| |
703 | `-' `-' `-' `-' `-'
707 +-------------------------------------------------------------------------*/
708 unsigned char int_line
= 0xff;
710 switch (PCI_DEV(dev
)) {
712 int_line
= 31; /* INT A */
717 int_line
= 30; /* INT B */
722 int_line
= 29; /* INT C */
727 int_line
= 28; /* INT D */
731 pci_hose_write_config_byte(hose
, dev
, PCI_INTERRUPT_LINE
, int_line
);
734 extern void pci_405gp_init(struct pci_controller
*hose
);
735 extern void pci_405gp_fixup_irq(struct pci_controller
*hose
, pci_dev_t dev
);
736 extern void pci_405gp_setup_bridge(struct pci_controller
*hose
, pci_dev_t dev
,struct pci_config_table
*entry
);
738 * The following table is used when there is a special need to setup a PCI device.
739 * For every PCI device found in this table is called the given init function with given
740 * parameters. So never let all IDs at PCI_ANY_ID. In this case any found device gets the same
744 static struct pci_config_table pci_solidcard3_config_table
[] =
746 /* Host to PCI Bridge device (405GP) */
750 class: PCI_CLASS_BRIDGE_HOST
,
754 config_device
: pci_405gp_setup_bridge
759 /*-------------------------------------------------------------------------+
760 | pci_init_board (Called from pci_init() in drivers/pci/pci.c)
762 | Init the PCI part of the SolidCard III
765 * - Pointer to current PCI hose
770 +-------------------------------------------------------------------------*/
772 void pci_init_board(void)
776 * we want the ptrs to RAM not flash (ie don't use init list)
778 hose
.fixup_irq
= pci_solidcard3_fixup_irq
;
779 hose
.config_table
= pci_solidcard3_config_table
;
780 pci_405gp_init(&hose
);