[U-Boot-Users] u-boot porting problem (Execution after code relocated to sdram)

robinpv robinpv at aiware.co.jp
Mon Jun 12 03:37:20 CEST 2006


Hi ,
  In u-boot porting, i am facing a problem.
  Here after the relocation of the code to the sdram, the code is 
executed from sdram,
  at some point we have to do the pci initialization. so we are storing 
the configuration
  function in a structure based on the device we want to configure. I am 
able to detect
  the device.  After dectecting device, when the configuration function 
if  being called,
  the flash address is loaded and control is jumping it to flash address.
  At that flash address there is no valid code, but "uboot.dis"  
disassemble file shows the
  valid code at that address.
  Shouldn't the control jump to relocated sdram address of the 
configuration function ?
--------------------------------------------------------------
  File: drivers/pci.c
  In pci_hose_scan_bus()
if (cfg) {
              cfg->config_device(hose, dev, cfg);
#ifdef CONFIG_PCI_PNP
              } else {
               int n = pciauto_config_device(hose, dev);
               sub_bus = max(sub_bus, n);
#endif
--------------------------------------------------------------
In my board related file:

 static struct pci_config_table pci_tb0286_config_table[] = {
   { 0x126F, 0x0501, PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID,PCI_ANY_ID,
     pci_cfgfunc_config_device, { PCI_ENET0_IOADDR,
                                  PCI_ENET0_MEMADDR,
                                  PCI_COMMAND_MEMORY | 
PCI_COMMAND_MASTER }},
   { }
};
---------------------------------------------------------------

Please provide your feedback on this.

Thanks & Regards
Robin




More information about the U-Boot mailing list