From mboxrd@z Thu Jan 1 00:00:00 1970 From: robinpv Date: Mon, 12 Jun 2006 10:37:20 +0900 Subject: [U-Boot-Users] u-boot porting problem (Execution after code relocated to sdram) Message-ID: <448CC550.6040602@aiware.co.jp> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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