All of lore.kernel.org
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Sven Luther <sven.luther@wanadoo.fr>
Cc: linuxppc-dev list <linuxppc-dev@lists.linuxppc.org>,
	Rob Baxter <robb@synergymicro.com>
Subject: Re: multiple separate pci bridges ...
Date: Tue, 06 Jan 2004 09:12:06 +1100	[thread overview]
Message-ID: <1073340725.9497.105.camel@gaston> (raw)
In-Reply-To: <20040105214239.GA20252@iliana>


> Mmm, will look into this. Actually, linux should not write to those, but
> read access should be ok.

If the BARs contain address ranges that will confuse linux resource
management (like RAM location), then you have to hide them completely.

> Well, i tried ioremapping 0x10000, but without much success
> (cfg_addr/data is at cf8/cfc, and this magic stuff is at f118/f11c). I
> just got a sig 11 OOPS, so ...

I don't fully understand... If you are doing IO cycles, there's no
ioremapping needed at all at this point, just use the one that is done
once for the bridge IO space. neither cf8/cfc not f118 look like
addresses that can be ioremap'ed anyway...

> > just ioremap that in a global once... I do that for a few things in
> > pmac_feature.c, like the northbridge registers.
>
> Yeah, i have seen.
>
> > > Also, i had to manually set hose->bus_offset = 0x10, since that didn't
> > > seem to be set automatically. I don't know why though.
> >
> > Why do you need hose->bus_offset ? For indirect_pci ? Well... that's
>
> Nope, i checked, and it was trying to read the bus 0x10, while the bus
> is in reallity 0. That said, if i understood stuff correctly, it should
> be ok, since type 0 config ignores bus and device, right ?

Yes. And for type 1, just issue a cycle to (bus - hose->first_busno)

> > a kludge, you should rather fix indirect_pci to use first_busno
> > instead... I don't know where this bus_offset comes from in the first
> > place, it's defined in pci_controller but not used at all in 2.6...
>
> Yeah, nor in 2.4, if my grep is correct. I can't use indirect_pci for
> the second bus though.
>
> > (BTW. You should really work on 2.6, not 2.4...)
>
> Ah, yes, but 2.4 means suppoprt for debian-installer. Once that works, i
> will work on 2.6.x. Also, 2.4 provides me a known working base.

I still don't like the idea of new dev. beeing done on 2.4...

> This is which bewilders me, the bridge spec speak about type 0 and type
> 1, and using the last 2 bits for this.

Yes. Usually, you don't put the last 2 bits of the offsets in cfg_addr,
you crop that value to the closest 32 bits boundary (or 64 bits in some
chips), and then you "offset" the cfg_data access.

For example, for a 8 bits access at an offset of 7, you would use 4
as the offset in cfg_addr, and then do a 8 bits access at cfg_data + 3


> The Marvell Discovery II has (one, two or three) gigabit ethernets
> included, these do not appear on the pci bus, but need to be programmed
> directly with the NB registers. On the other hand, the sk98 driver
> provides driver for various Marvell gigabit ethernet.

Argh ????? They don't appear on PCI ? What piece of SHIT is this bridge ?

Really totally insane.

I strongly suggest you still match them as PCI devices, eventually using
the bridge device itself as the match for the driver.... The DMA mapping
ops are designed to work with PCI anyway.

Ben.


** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

  reply	other threads:[~2004-01-05 22:12 UTC|newest]

Thread overview: 77+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-01-01 18:11 multiple separate pci bridges Sven Luther
2004-01-02  4:03 ` Benjamin Herrenschmidt
2004-01-02  7:40   ` Sven Luther
2004-01-02  7:49     ` Benjamin Herrenschmidt
2004-01-04 21:03       ` Sven Luther
2004-01-04 21:45         ` Benjamin Herrenschmidt
2004-01-04 22:06           ` Sven Luther
2004-01-05 16:40             ` Sven Luther
2004-01-05 21:28               ` Benjamin Herrenschmidt
2004-01-05 21:42                 ` Sven Luther
2004-01-05 22:12                   ` Benjamin Herrenschmidt [this message]
2004-01-06  7:39                     ` Sven Luther
2004-01-06  8:00                       ` Benjamin Herrenschmidt
2004-01-06  8:11                         ` Sven Luther
2004-01-06 14:40                           ` Geert Uytterhoeven
2004-01-06 14:45                             ` Sven Luther
2004-01-06 15:33                               ` Rob Baxter
2004-01-06 17:44                                 ` Sven Luther
2004-01-06 21:37                                 ` Benjamin Herrenschmidt
2004-01-06 22:10                                   ` Marcus Barrow
2004-01-06 22:17                                   ` Rob Baxter
2004-01-06 22:31                                     ` Benjamin Herrenschmidt
2004-01-07  2:35                                   ` Sven Luther
2004-01-07  2:36                                     ` Benjamin Herrenschmidt
2004-01-07  2:40                                       ` Sven Luther
2004-01-07  9:02                                   ` Michael Schmitz
2004-01-07  9:23                                     ` Benjamin Herrenschmidt
2004-01-07  9:56                                       ` Sven Luther
2004-01-07 10:27                                       ` Michael Schmitz
2004-01-13  9:56                                   ` Sven Luther
2004-01-13 10:26                                     ` Sven Luther
2004-01-18 12:15                             ` Sven Luther
2004-01-18 13:00                               ` Michel Dänzer
2004-01-18 13:14                                 ` Sven Luther
2004-01-19  9:12                                   ` Benjamin Herrenschmidt
2004-01-18 22:27                                     ` Sven Luther
2004-01-18 22:59                                       ` Benjamin Herrenschmidt
2004-01-19  9:21                                         ` Sven Luther
2004-01-18 23:24                               ` Benjamin Herrenschmidt
2004-01-05 21:38               ` Marcus Barrow
2004-01-06  7:14                 ` Sven Luther
2004-01-06  7:56                   ` Benjamin Herrenschmidt
2004-01-06  8:20                     ` Sven Luther
2004-01-02 18:34     ` Geert Uytterhoeven
2004-01-02 15:18 ` Rob Baxter
2004-01-02 23:56   ` Benjamin Herrenschmidt
2004-01-03  0:27     ` Rob Baxter
2004-01-03  1:12       ` Benjamin Herrenschmidt
2004-01-05  0:52         ` Rob Baxter
2004-01-05  2:13           ` Benjamin Herrenschmidt
2004-01-06 20:53 Marcus Barrow
2004-01-06 21:09 Marcus Barrow
2004-01-06 22:59 ` Benjamin Herrenschmidt
2004-01-06 23:00 ` Benjamin Herrenschmidt
2004-01-18 14:44 Sven Luther
2004-01-18 16:33 ` Michel Dänzer
2004-01-18 17:28   ` Sven Luther
2004-01-18 18:24     ` Michel Dänzer
2004-01-18 22:20       ` Sven Luther
2004-01-18 23:33         ` Michel Dänzer
2004-01-19  9:55           ` Sven Luther
2004-01-19 13:48   ` Sven Luther
2004-01-19 13:54     ` Geert Uytterhoeven
2004-01-19 14:00       ` Sven Luther
2004-01-19 14:02     ` Michel Dänzer
2004-01-19 14:16       ` Sven Luther
2004-01-19 14:31         ` Michel Dänzer
2004-01-19  9:11 ` Benjamin Herrenschmidt
2004-01-18 22:33   ` Sven Luther
2004-01-18 23:23   ` Michel Dänzer
2004-01-18 23:42     ` Benjamin Herrenschmidt
2004-01-19  0:03       ` Michel Dänzer
2004-01-19 10:08   ` Geert Uytterhoeven
2004-01-19 11:41     ` Benjamin Herrenschmidt
2004-01-19 12:03       ` Sven Luther
2004-01-19 21:35         ` Benjamin Herrenschmidt
2004-01-19 22:08           ` Sven Luther

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=1073340725.9497.105.camel@gaston \
    --to=benh@kernel.crashing.org \
    --cc=linuxppc-dev@lists.linuxppc.org \
    --cc=robb@synergymicro.com \
    --cc=sven.luther@wanadoo.fr \
    /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 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.