* [U-Boot-Users] u-boot porting problem (Execution after code relocated to sdram)
@ 2006-06-12 1:37 robinpv
2006-06-12 7:11 ` Wolfgang Denk
0 siblings, 1 reply; 2+ messages in thread
From: robinpv @ 2006-06-12 1:37 UTC (permalink / raw)
To: u-boot
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
^ permalink raw reply [flat|nested] 2+ messages in thread* [U-Boot-Users] u-boot porting problem (Execution after code relocated to sdram)
2006-06-12 1:37 [U-Boot-Users] u-boot porting problem (Execution after code relocated to sdram) robinpv
@ 2006-06-12 7:11 ` Wolfgang Denk
0 siblings, 0 replies; 2+ messages in thread
From: Wolfgang Denk @ 2006-06-12 7:11 UTC (permalink / raw)
To: u-boot
In message <448CC550.6040602@aiware.co.jp> you wrote:
>
...
> 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
...
So you have static function pointers.
> Shouldn't the control jump to relocated sdram address of the
> configuration function ?
Yes, it should. but thus relocation has to be done manually. See for
example the code to relocate the command table in board_init_r().
Best regards,
Wolfgang Denk
--
Software Engineering: Embedded and Realtime Systems, Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"The great question... which I have not been able to answer... is,
`What does woman want?'" - Sigmund Freud
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-06-12 7:11 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-06-12 1:37 [U-Boot-Users] u-boot porting problem (Execution after code relocated to sdram) robinpv
2006-06-12 7:11 ` Wolfgang Denk
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.