[lkml]   [2000]   [Sep]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: In Search of "Michel Lanners" (Re:(PowerPC Linux PCI HELL))
I'm here ;-)

On 13 Sep, this message from Andre Hedrick echoed through cyberspace:
> Bogus Patch :-(

Not my patch :-))

> This is what I did also but more brut force with verification of IO's and
> it still craps out..

I have added device enabling in PPC PCI fixup code for PowerMacs. But
Martin and Geert tought me that that's not the 'right way' to do it.
Anyway, see below...

> On Wed, 13 Sep 2000, Daniel Jacobowitz wrote:
>> > My new PPC G3 (7600/132) toy is not allowing IO's on PCI cards to come
>> > alive.

Hehe. Exactly my machine ;-)

>> > Basically I can not get the IO's active, regardless of BIOS on the card.

The explanation is that PowerMac firmware (OpenFirmware, that is) will
not enable any PCI device it doesn't know. Resources get assigned ok,
but that's it.

>> I'm going to bet you need to look at Michel Lanners' (did I spell that
>> right this time?) PCI patches.

Yes, spelled right. Thanks ;-)

>> diff -ur merging-bk/drivers/block/ide-pci.c work-bk/drivers/block/ide-pci.c
>> --- merging-bk/drivers/block/ide-pci.c Tue Apr 4 22:19:16 2000
>> +++ work-bk/drivers/block/ide-pci.c Thu Mar 9 15:33:25 2000
>> @@ -468,6 +468,15 @@
>> printk("%s: error accessing PCI regs\n", d->name);
>> return;
>> }
>> +#ifdef __powerpc__
>> + if (!(pcicmd & PCI_COMMAND_IO)) { /* is device disabled? */
>> + pci_write_config_word(dev, PCI_COMMAND, pcicmd | PCI_COMMAND_IO);
>> + if (pci_read_config_word(dev, PCI_COMMAND, &pcicmd)) {
>> + printk("%s: error accessing PCI regs\n", d->name);
>> + return;
>> + }
>> + }
>> +#endif

This patch should basically be correct. In essence, that's what's done
elsewhere as well, be it in my patches or with pci_enable_device().

Oh, wait... you've got problems accessing _IO_ space? That's a different
matter altogether. Let me explain: On PowerPC, there's no such thing as
an IO space, or dedicated IO instructions. The memory model is flat.
Now, in order to support IO space on the PCI bus, that IO space is
simply mapped to a memory region by the bus bridge, which also takes
care of generating IO cycles on the bus.

This mapping of IO space to the regular memory space is not transparent,
i.e. adresses are translated. That's what the _IO_BASE is for. Now, I
don't remember exactly, but in order to get the Promise going in my box,
I got rid of _IO_BASE, and rather fixed the struct pci_dev of the
Promise to point its IO regions at the translated space. Again, I'm not
sure what the exact problem was when not doing that, or whether with
recent 2.4 PPC kernels, that's still necessary.

Anyway, either look for yourself in the direction of IO space
remappings, or have a look at the PCI patches on my site, which include
the IO space stuff:

Have fun!


Michel Lanners | " Read Philosophy. Study Art.
23, Rue Paul Henkes | Ask Questions. Make Mistakes.
L-1710 Luxembourg |
email | | Learn Always. "

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
Please read the FAQ at

 \ /
  Last update: 2005-03-22 12:38    [W:0.041 / U:1.544 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site