public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot-Users] Help debugging a PCI scanning problem
@ 2005-07-11 17:02 Richard Danter
  2005-07-11 19:41 ` Richard Danter
  0 siblings, 1 reply; 2+ messages in thread
From: Richard Danter @ 2005-07-11 17:02 UTC (permalink / raw)
  To: u-boot

Hi all,

I have almost completed the porting of U-Boot to my 7400/107 board. I am
now able to boot from flash, tftpload the hello_world example and run
it.  :)

However, there is a hack which I don't like and hope maybe someone can
suggest why I need it and what the _correct_ solution is.

When eepro100_initialize() is called it loops scanning the PCI bus for
cards. I have such a card and it is found with no problems. The card is
initialised correctly which is how I am able to tftpload the example.
The problem comes after it has initialised the card. It looks for a
second card and this seems to crash the system.

For the moment I have added the following to the end of the
eepro100_initialize() function:

		read_hw_addr (dev, bis);
		
#ifdef CONFIG_PPMC7xx
		/* RAD
		 * FixMe: This prevents a crash but means only
		 *        one network card can be installed
		 */
		break;		
#endif
	}

	return card_number;
}

which works.

I can scan the bus with the "pci" command and get the following results.
Obviously the network controller Dev number changes depending on which
slot it is inserted into:

=> pci
Scanning PCI devices on bus 0
BusDevFun  VendorId   DeviceId   Device Class       Sub-Class
_____________________________________________________________
00.00.00   0x1057     0x0004     Bridge device           0x00
00.11.00   0x8086     0x1030     Network controller      0x00
00.12.00   0x1011     0x0026     Bridge device           0x04
=>

There are only 2 slots on this board. The ethernet card works in either
of them. The crash seems to happen within the pci_find_devices()
function. Any suggestions how I can debug this?

Many thanks
Rich

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [U-Boot-Users] Help debugging a PCI scanning problem
  2005-07-11 17:02 [U-Boot-Users] Help debugging a PCI scanning problem Richard Danter
@ 2005-07-11 19:41 ` Richard Danter
  0 siblings, 0 replies; 2+ messages in thread
From: Richard Danter @ 2005-07-11 19:41 UTC (permalink / raw)
  To: u-boot

Richard Danter wrote:
> Hi all,
> 
> I have almost completed the porting of U-Boot to my 7400/107 board. I am
> now able to boot from flash, tftpload the hello_world example and run
> it.  :)
> 
> However, there is a hack which I don't like and hope maybe someone can
> suggest why I need it and what the _correct_ solution is.
> 
> When eepro100_initialize() is called it loops scanning the PCI bus for
> cards. I have such a card and it is found with no problems. The card is
> initialised correctly which is how I am able to tftpload the example.
> The problem comes after it has initialised the card. It looks for a
> second card and this seems to crash the system.
> 
> For the moment I have added the following to the end of the
> eepro100_initialize() function:
> 
>         read_hw_addr (dev, bis);
>        
> #ifdef CONFIG_PPMC7xx
>         /* RAD
>          * FixMe: This prevents a crash but means only
>          *        one network card can be installed
>          */
>         break;       
> #endif
>     }
> 
>     return card_number;
> }
> 
> which works.

A better workaround is to change the code in drivers/pci.c 
pci_find_devices() to loop through the devices and functions up to max-1 
as the ELPPC does.

So whatever the problem, it has been seen before. This new solution 
works for 0, 1 or 2 cards plugged in! I would still like to understand 
why this is required though.


> 
> I can scan the bus with the "pci" command and get the following results.
> Obviously the network controller Dev number changes depending on which
> slot it is inserted into:
> 
> => pci
> Scanning PCI devices on bus 0
> BusDevFun  VendorId   DeviceId   Device Class       Sub-Class
> _____________________________________________________________
> 00.00.00   0x1057     0x0004     Bridge device           0x00
> 00.11.00   0x8086     0x1030     Network controller      0x00
> 00.12.00   0x1011     0x0026     Bridge device           0x04
> =>
> 
> There are only 2 slots on this board. The ethernet card works in either
> of them. The crash seems to happen within the pci_find_devices()
> function. Any suggestions how I can debug this?
> 
> Many thanks
> Rich
> 
> 
> -------------------------------------------------------
> This SF.Net email is sponsored by the 'Do More With Dual!' webinar 
> happening
> July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual
> core and dual graphics technology at this free one hour event hosted by HP,
> AMD, and NVIDIA.  To register visit http://www.hp.com/go/dualwebinar
> _______________________________________________
> U-Boot-Users mailing list
> U-Boot-Users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/u-boot-users
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-07-11 19:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-07-11 17:02 [U-Boot-Users] Help debugging a PCI scanning problem Richard Danter
2005-07-11 19:41 ` Richard Danter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox