This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Re: Reset a PCI device?


Scott Wilkinson wrote:
Jifl,

This is with respect to the relatively new port to the MIPS IDT79S334A
eval board.  I suspect you are correct, that this could/should go into
the HAL_PCI_INIT code.

This problem should only come about when downloading the redboot_RAM
image through the IDT bootloader. In this case the device appears to be
CYG_PCI_CFG_COMMAND_ACTIVE (even though eCos has not yet configured it)
and so eCos skips some configuration, or uses the existing settings. This is bad.


I'm not sure we'll have a need, but if I put together a more appropriate
patch I will happily pass it along.

That will be good, thanks. I think the normal way to configure this (so the old behaviour would continue to work for those not using the IDT bootloader) would be to allow multiple values of CYGSEM_HAL_USE_ROM_MONITOR, rather than just a boolean; and require developers to set that accordingly.


For example right now the IDT board allows the setting of that option to "Generic", "CygMon", and "GDB_stubs", as well as disabling entirely (it's flavor booldata, not just data). But the IDT port right now should only have GDB_stubs or disabled - I didn't notice that when reviewing Tim's patch. The proposed change to HAL_PCI_INIT would mean a new "IDT" option, and thus the code would be conditional on CYGSEM_HAL_USE_ROM_MONITOR_IDT.

HTH,

Jifl

On Fri, 2003-04-25 at 12:40, Jonathan Larmour wrote:

Scott Wilkinson wrote:

Indeed my problem was that the device was already initialized.  I solved
it by forcing COMMAND_ACTIVE to be false by clearing the PCI Command
register before calling cyg_pci_get_device_info().  Probably there is a
cleaner way to do this, and I welcome suggestions.

I'd guess since it's a platform specific problem the cleaner approach is to do it in your HAL_PCI_INIT code in plf_io.h. If this is a public board we'd love a patch :-).


Jifl


--
eCosCentric    http://www.eCosCentric.com/    The eCos and RedBoot experts
--[ "You can complain because roses have thorns, or you ]--
--[  can rejoice because thorns have roses." -Lincoln   ]-- Opinions==mine


-- Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos and search the list archive: http://sources.redhat.com/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]