[U-Boot-Users] a problem about PCI initialization

Lucas Jin lucasjin at gmail.com
Wed Oct 3 17:06:11 CEST 2007


Hi

I am debugging a board based on Sandpoint8245.

sandpoint8245.h has these defination:

(
#define PCI_ENET0_IOADDR	0x80000000
#define PCI_ENET0_MEMADDR	0x80000000
#define	PCI_ENET1_IOADDR	0x81000000
#define	PCI_ENET1_MEMADDR	0x81000000
#define	PCI_ENET2_IOADDR	0x00000000
#define	PCI_ENET2_MEMADDR	0x82000000
)

sandpoint.c has this defination:

static struct pci_config_table pci_sandpoint_config_table[] = {
	{ PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, 0x0f, PCI_ANY_ID,
	  pci_cfgfunc_config_device, { PCI_ENET0_IOADDR,
				       PCI_ENET0_MEMADDR,
				       PCI_COMMAND_MEMORY | PCI_COMMAND_MASTER }},
	{ PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, 0x10, PCI_ANY_ID,
	  pci_cfgfunc_config_device, { PCI_ENET1_IOADDR,
				       PCI_ENET1_MEMADDR,
				       PCI_COMMAND_MEMORY | PCI_COMMAND_MASTER }},
	{ PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, 0x18, PCI_ANY_ID,
	  pci_cfgfunc_config_device, { PCI_ENET2_IOADDR,
						PCI_ENET2_MEMADDR, 
				       PCI_COMMAND_MEMORY | PCI_COMMAND_MASTER }},
	{ }
};

After calling pci_init() I output a value to address 0x80000000 and  then CPU goes wront. I am so confused. 
If any of you can give me some hint, I will appreciate that very much!

Best Wishes
Jinlu






More information about the U-Boot mailing list