[U-Boot] [PATCH] IXP425: Fixing PCI access Part 1/1

Stefan Althoefer stefan.althoefer at web.de
Thu Dec 18 00:52:03 CET 2008


Hi Wolfgang Denk,

> 
>> @@ -304,9 +355,7 @@ void pci_ixp_init (struct pci_controller
>>  	pci_write_config_word (0, PCI_CFG_COMMAND, INITIAL_PCI_CMD);
>>  	REG_WRITE (PCI_CSR_BASE, PCI_ISR_OFFSET, PCI_ISR_PSE
>>  		   | PCI_ISR_PFE | PCI_ISR_PPE | PCI_ISR_AHBE);
>> -#ifdef CONFIG_PCI_SCAN_SHOW
>> -	printf ("Device  bus  dev  func  deviceID  vendorID \n");
>> -#endif
>> +
>>  	pci_bus_scan ();
> 
> Why do you remove the message?
> 
>> -#ifdef CONFIG_PCI_SCAN_SHOW
>> -		printf ("%06d    %03d %03d %04d  %08d      %08x\n", nDevices,
>> -			devices[nDevices].vendor_id);
>> -#endif
> 
> ???
> 

I found the following initialization sequence for the IXP425:
     cpu_init() -> pci_init() -> pci_init_board() ->
	        pci_ixp_init() -> pci_bus_scan()
and later:
     serial_init()

If printf()->...->serial_putc() is called in pci_bus_scan()
before serial_init() it hung up the IXP425.

Assuming that there is good reason to call pci_init() so early,
CONFIG_PCI_SCAN_SHOW cannot be used.

Therefore I removed the dead code.

I think I noticed this in the revised version of the patch.
I'm working on a beautified version.

-- Stefan



More information about the U-Boot mailing list