From: Ralf Baechle <ralf@linux-mips.org>
To: wlacey <wlacey@goldenhindresearch.com>
Cc: linux-mips@linux-mips.org
Subject: Re: No PCI_AUTO in 2.6...
Date: Wed, 15 Dec 2004 14:56:56 +0100 [thread overview]
Message-ID: <20041215135656.GA28665@linux-mips.org> (raw)
In-Reply-To: <20041211134305.22769.qmail@server212.com>
On Sat, Dec 11, 2004 at 01:43:05PM +0000, wlacey wrote:
> Might someone be willing to share a bit knowledge with me?
>
> I've transitioned to the 2.6.10 kernel and I'm having a difficult time understanding what things I must do different to get my pci slots probed as before in 2.4. At this point I'm well aware the 2.6 is not a drop in replacement for 2.4 but what is the a general approach to getting something like PCI_AUTO capability in 2.6 what steps must I take and is there document describing them.
PCI_AUTO was really, really broken code. It only works for some subset
of systems, won't handle hot plugging (Cardbus!), PCI-PCI bridges and many
other cases. The world became a better place on the day when it got
removed.
> I call register_pci_controller() but the bus is never scanned becasue pcibios_init() fails out with...
> "Skipping PCI bus scan due to resource conflict"
The new PCI code by default will fully configure a PCI bus hierarchy. For
this to work it needs to know which memory address range and which I/O
port address range are available for assignment. This information is
passed in the struct pci_controller argument of register_pci_controller().
Here's a simplified example from arch/mips/sni/setup.c:
static struct resource sni_io_resource = {
"PCIMT IO MEM", 0x00001000UL, 0x03bfffffUL, IORESOURCE_IO,
};
static struct resource sni_mem_resource = {
"PCIMT PCI MEM", 0x10000000UL, 0xffffffffUL, IORESOURCE_MEM
};
extern struct pci_ops sni_pci_ops;
static struct pci_controller sni_controller = {
.pci_ops = &sni_pci_ops,
.mem_resource = &sni_mem_resource,
.mem_offset = 0x10000000UL,
.io_resource = &sni_io_resource,
.io_offset = 0x00000000UL
};
That is PCI memory is in the address range of 0x10000000UL - 0xffffffffUL
and I/O ports in the range 0x00001000UL - 0x03bfffffUL. The io_offset
rsp. mem_offset values say how much needs to be added rsp. subtracted
when converting a PCI bus address into a physical address. Often these
values are either the same a the resource's start address or zero.
I hope that explains things a little ...
Ralf
next prev parent reply other threads:[~2004-12-15 13:57 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-12-11 13:43 No PCI_AUTO in 2.6 wlacey
2004-12-15 13:56 ` Ralf Baechle [this message]
2004-12-15 15:25 ` Maciej W. Rozycki
2004-12-15 16:40 ` Ralf Baechle
2004-12-15 17:17 ` Maciej W. Rozycki
2004-12-15 18:42 ` Ralf Baechle
2004-12-15 19:29 ` Maciej W. Rozycki
2004-12-16 2:17 ` Atsushi Nemoto
2004-12-16 12:56 ` Ralf Baechle
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=20041215135656.GA28665@linux-mips.org \
--to=ralf@linux-mips.org \
--cc=linux-mips@linux-mips.org \
--cc=wlacey@goldenhindresearch.com \
/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