From: Andrew E. Mileski <andrewm@isoar.ca>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] PCI Interrupt
Date: Wed, 19 Jan 2005 09:56:28 -0500 [thread overview]
Message-ID: <41EE751C.5060908@isoar.ca> (raw)
In-Reply-To: <200501190712.49778.Schramel.Linux@go.bartec.de>
Marco Schramel wrote:
> Hi,
>
> Our custom board is designed with a mpc8270. U-Boot is running on it.
> The pci-bridge on the 8270 seems to be initialized. The pci command works and shows me the bridge.
> On the pci-bus is a pci target connect. Its interrupt is routed to IRQ2.
> How i can tell U-Boot that my pci interrupt is IRQ2 ??
Are refering to the interrupt value displayed by the scan done by
pci_hose_scan_bus() in drivers/pci.c? If not, ignore this message :)
If so, it's probably only relevant if the OS booted doesn't configure
the PCI devices. I've booted Linux without sane values, as I modded it
to do the config for my board.
If it bugs you in u-boot ...
Initialize the PCI device's PCI_INTERRUPT_LINE config register. I do
this through a board specific pci_fixup_irq() routine that is registered
with the hose.
I'm using a custom 440GX board, but your's may be similar. Here's an
excerpt from the board specific init file (not saying it's "right" just
that it seems to work):
/* Called if CFG_PCI_PRE_INIT defined in board config */
int pci_pre_init(struct pci_controller *hose)
{
/* Install the configuration call-back table */
hose->config_table = custom_config_table;
/* Install interrupt map */
hose->fixup_irq = pci_fixup_irq;
return 1;
}
static void pci_fixup_irq(struct pci_controller *hose, pci_dev_t dev)
{
u16 vendor_id, device_id;
pci_hose_read_config_word(hose, dev, PCI_VENDOR_ID, &vendor_id);
pci_hose_read_config_word(hose, dev, PCI_DEVICE_ID, &device_id);
if (vendor_id == PCI_VENDOR_ID_XILINX) {
if (device_id == PCI_DEVICE_ID_XILINX_V2PRO) {
/* Xilinx V2Pro - IRQ29 */
pci_hose_write_config_byte(hose, dev,
PCI_INTERRUPT_LINE, 29);
return;
}
}
}
--
Andrew E. Mileski
prev parent reply other threads:[~2005-01-19 14:56 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-01-19 6:12 [U-Boot-Users] PCI Interrupt Marco Schramel
2005-01-19 8:15 ` Wolfgang Denk
2005-01-19 14:56 ` Andrew E. Mileski [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=41EE751C.5060908@isoar.ca \
--to=andrewm@isoar.ca \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox