linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* forcing pci device start address ?
@ 2002-03-30 17:14 Neil Wilson
  2002-03-30 23:24 ` Matt Porter
  0 siblings, 1 reply; 6+ messages in thread
From: Neil Wilson @ 2002-03-30 17:14 UTC (permalink / raw)
  To: linuxppc-embedded


Hi,

We have a new 7450/107 board that I have got to boot and run 2.4.17.  The
hardware designer has got some non-standard pci devices ie, a large fpga
 that lives in pci space but does not have a configuration register and also
 some standard pci devices like the AMD79C973 ethernet controller.

 Is it possible to force the start address for the devices to be at specific
 addresses as determined by the hardware map using the existing pci
 controller code ?  An example is the ethernet controller which is at
 0xe0000000 in the hardware map yet when it it is detected during the pci
 probing the pcnet32 driver has its ioaddr set to somewhere like 0xfbeffxxx.


I am looking through the other setups in the platforms directory and trying
 to search the archives but this pci is all a bit of a mystery to me a the
 momment.

 Thanks for any help/comments.

 Neil


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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: forcing pci device start address ?
  2002-03-30 17:14 Neil Wilson
@ 2002-03-30 23:24 ` Matt Porter
  0 siblings, 0 replies; 6+ messages in thread
From: Matt Porter @ 2002-03-30 23:24 UTC (permalink / raw)
  To: Neil Wilson; +Cc: linuxppc-embedded


On Sat, Mar 30, 2002 at 05:14:24PM -0000, Neil Wilson wrote:
>
> Hi,
>
> We have a new 7450/107 board that I have got to boot and run 2.4.17.  The
> hardware designer has got some non-standard pci devices ie, a large fpga
>  that lives in pci space but does not have a configuration register and also
>  some standard pci devices like the AMD79C973 ethernet controller.

I don't understand.  It doesn't have "a configuration register".  Do
you mean that it does have any configuration space registers or that
it does not have BAR registers?  If it has BAR registers in config
space, do they respond to config cycles in the convential manner or
are they in a fixed position?  Please clarify so we can help you.

>  Is it possible to force the start address for the devices to be at specific
>  addresses as determined by the hardware map using the existing pci
>  controller code ?  An example is the ethernet controller which is at
>  0xe0000000 in the hardware map yet when it it is detected during the pci
>  probing the pcnet32 driver has its ioaddr set to somewhere like 0xfbeffxxx.
>
>
> I am looking through the other setups in the platforms directory and trying
>  to search the archives but this pci is all a bit of a mystery to me a the
>  momment.

We can help as well as the info you give us. :)

--
Matt Porter
MontaVista Software, Inc.
mporter@mvista.com

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: forcing pci device start address ?
@ 2002-03-31 20:02 Neil Wilson
  2002-04-01  4:04 ` Matt Porter
  0 siblings, 1 reply; 6+ messages in thread
From: Neil Wilson @ 2002-03-31 20:02 UTC (permalink / raw)
  To: mporter; +Cc: linuxppc-embedded


>On Sat, Mar 30, 2002 at 05:14:24PM -0000, Neil Wilson wrote:
>
> Hi,
>
> We have a new 7450/107 board that I have got to boot and run 2.4.17.  The
> hardware designer has got some non-standard pci devices ie, a large fpga
>  that lives in pci space but does not have a configuration register and
also
>  some standard pci devices like the AMD79C973 ethernet controller.

>I don't understand.  It doesn't have "a configuration register".  Do
>you mean that it does have any configuration space registers or that
>it does not have BAR registers?  If it has BAR registers in config
>space, do they respond to config cycles in the convential manner or
>are they in a fixed position?  Please clarify so we can help you.

Sorry for any lack of clarity, mainly it's due to me not understanding
enough about pci to know what to ask for help on.

Reading/decoding the hardware design spec section for the fpga says that it
does not support pci plug & play and the pci interface in the fpga code does
not have a configuration register set, it just details what IDSEL line is
allocated and the fact that it is interfaced to the MPC107 pci bus both as a
slave & master. There are no mention of BAR registers.

Is it possible to set up a linuxppc pci interface to the fpga pci interface
and other peripherals that do have configuration register sets (a tdm
controller & an ethernet controller), to be at specific addresses in pci
space, i.e. fpga at 0xc0000000, tdm at 0xd0000000 and ethernet at 0xe0000000
rather than have the interfaces probed during initialisation and the ioaddr
etc handed out to the relevant drivers ?  I know that we need to write a
couple of drivers anyway but the ethernet is a pcnet32 controller.

There, I have again probably unclarified what I am trying to find out !

>  Is it possible to force the start address for the devices to be at
specific
>  addresses as determined by the hardware map using the existing pci
>  controller code ?  An example is the ethernet controller which is at
>  0xe0000000 in the hardware map yet when it it is detected during the pci
>  probing the pcnet32 driver has its ioaddr set to somewhere like
0xfbeffxxx.
>
>
> I am looking through the other setups in the platforms directory and
trying
>  to search the archives but this pci is all a bit of a mystery to me a the
>  momment.

>We can help as well as the info you give us. :)

Thanks.


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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: forcing pci device start address ?
  2002-03-31 20:02 forcing pci device start address ? Neil Wilson
@ 2002-04-01  4:04 ` Matt Porter
  0 siblings, 0 replies; 6+ messages in thread
From: Matt Porter @ 2002-04-01  4:04 UTC (permalink / raw)
  To: Neil Wilson; +Cc: mporter, linuxppc-embedded


On Sun, Mar 31, 2002 at 09:02:49PM +0100, Neil Wilson wrote:
> >On Sat, Mar 30, 2002 at 05:14:24PM -0000, Neil Wilson wrote:
> >
> > Hi,
> >
> > We have a new 7450/107 board that I have got to boot and run 2.4.17.  The
> > hardware designer has got some non-standard pci devices ie, a large fpga
> >  that lives in pci space but does not have a configuration register and
> also
> >  some standard pci devices like the AMD79C973 ethernet controller.
>
> >I don't understand.  It doesn't have "a configuration register".  Do
> >you mean that it does have any configuration space registers or that
> >it does not have BAR registers?  If it has BAR registers in config
> >space, do they respond to config cycles in the convential manner or
> >are they in a fixed position?  Please clarify so we can help you.
>
> Sorry for any lack of clarity, mainly it's due to me not understanding
> enough about pci to know what to ask for help on.
>
> Reading/decoding the hardware design spec section for the fpga says that it
> does not support pci plug & play and the pci interface in the fpga code does
> not have a configuration register set, it just details what IDSEL line is
> allocated and the fact that it is interfaced to the MPC107 pci bus both as a
> slave & master. There are no mention of BAR registers.
>
> Is it possible to set up a linuxppc pci interface to the fpga pci interface
> and other peripherals that do have configuration register sets (a tdm
> controller & an ethernet controller), to be at specific addresses in pci
> space, i.e. fpga at 0xc0000000, tdm at 0xd0000000 and ethernet at 0xe0000000
> rather than have the interfaces probed during initialisation and the ioaddr
> etc handed out to the relevant drivers ?  I know that we need to write a
> couple of drivers anyway but the ethernet is a pcnet32 controller.
>
> There, I have again probably unclarified what I am trying to find out !

Ok, I see the horrible mess they put you in.  Those !@$!# hardware
guys. :-/

Here's the basic layout:  you can use pci_auto like the other 7xx/74xx
embedded ports and constrain the I/O and Mem range so as to not conflict
with the PCI-wannabe devices your hardware guys spit out.  You are
writing custom drivers so you just depart from the Linux standard of
ioremaping or in*/out*ing resources and use your hardcoded addresses.

You could complicate things by manually adding the devices to the
PCI global list and creating resources but there is no value in that
for a custom design like this...you could boast about it to your
fellow engineers if you like though. :)

Regards,
--
Matt Porter
MontaVista Software, Inc.
mporter@mvista.com

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: forcing pci device start address ?
@ 2002-04-01 20:21 Neil Wilson
  2002-04-01 20:35 ` Matt Porter
  0 siblings, 1 reply; 6+ messages in thread
From: Neil Wilson @ 2002-04-01 20:21 UTC (permalink / raw)
  To: mporter; +Cc: linuxppc-embedded


>Ok, I see the horrible mess they put you in.  Those !@$!# hardware
>guys. :-/

>Here's the basic layout:  you can use pci_auto like the other 7xx/74xx
>embedded ports and constrain the I/O and Mem range so as to not conflict
>with the PCI-wannabe devices your hardware guys spit out.  You are
>writing custom drivers so you just depart from the Linux standard of
>ioremaping or in*/out*ing resources and use your hardcoded addresses.

>You could complicate things by manually adding the devices to the
>PCI global list and creating resources but there is no value in that
>for a custom design like this...you could boast about it to your
>fellow engineers if you like though. :)


Thanks for your help, I will start looking at this when I get in tomorrow.

Do you happen to know of a driver example in one of the kernel trees or
elsewhere that implements this hardcoded address business that I can learn
from ?

Thanks.

Neil


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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: forcing pci device start address ?
  2002-04-01 20:21 Neil Wilson
@ 2002-04-01 20:35 ` Matt Porter
  0 siblings, 0 replies; 6+ messages in thread
From: Matt Porter @ 2002-04-01 20:35 UTC (permalink / raw)
  To: Neil Wilson; +Cc: linuxppc-embedded


On Mon, Apr 01, 2002 at 09:21:08PM +0100, Neil Wilson wrote:
> >Ok, I see the horrible mess they put you in.  Those !@$!# hardware
> >guys. :-/
>
> >Here's the basic layout:  you can use pci_auto like the other 7xx/74xx
> >embedded ports and constrain the I/O and Mem range so as to not conflict
> >with the PCI-wannabe devices your hardware guys spit out.  You are
> >writing custom drivers so you just depart from the Linux standard of
> >ioremaping or in*/out*ing resources and use your hardcoded addresses.
>
> >You could complicate things by manually adding the devices to the
> >PCI global list and creating resources but there is no value in that
> >for a custom design like this...you could boast about it to your
> >fellow engineers if you like though. :)
>
>
> Thanks for your help, I will start looking at this when I get in tomorrow.
>
> Do you happen to know of a driver example in one of the kernel trees or
> elsewhere that implements this hardcoded address business that I can learn
> from ?

All you need to do is
ioremap(<hardcoded_base_address_in_physical_space>),<region_size>)
rather than ioremapping the PCI resource like a normal 2.3/2.4 PCI
device.

--
Matt Porter
MontaVista Software, Inc.
mporter@mvista.com

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2002-04-01 20:35 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-03-31 20:02 forcing pci device start address ? Neil Wilson
2002-04-01  4:04 ` Matt Porter
  -- strict thread matches above, loose matches on Subject: below --
2002-04-01 20:21 Neil Wilson
2002-04-01 20:35 ` Matt Porter
2002-03-30 17:14 Neil Wilson
2002-03-30 23:24 ` Matt Porter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).