kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
* LPC bus access howto
@ 2011-11-21 16:01 Andre Haupt
  2011-11-21 16:53 ` Guillaume Knispel
  0 siblings, 1 reply; 3+ messages in thread
From: Andre Haupt @ 2011-11-21 16:01 UTC (permalink / raw)
  To: kernelnewbies

Hi all,

We have a FPGA which will be connected to the LPC bus. This FPGA will
provide some GPIO functionality, a rotary encoder, etc.

Now i want to write a kernel driver to talk to this FPGA.
I am unsure how to get access to the LPC bus in the first place.
What kernel APIs should i use? How to get the memory mapping right, etc?

I would appreciate any pointers to documentation or examples.


cheers,

Andre

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

* LPC bus access howto
  2011-11-21 16:01 LPC bus access howto Andre Haupt
@ 2011-11-21 16:53 ` Guillaume Knispel
  2011-11-22 10:01   ` Andre Haupt
  0 siblings, 1 reply; 3+ messages in thread
From: Guillaume Knispel @ 2011-11-21 16:53 UTC (permalink / raw)
  To: kernelnewbies

On Mon, 21 Nov 2011 17:01:29 +0100
Andre Haupt <andre@bitwigglers.org> wrote:

> Hi all,
> 
> We have a FPGA which will be connected to the LPC bus. This FPGA will
> provide some GPIO functionality, a rotary encoder, etc.
> 
> Now i want to write a kernel driver to talk to this FPGA.
> I am unsure how to get access to the LPC bus in the first place.
> What kernel APIs should i use? How to get the memory mapping right, etc?

The LPC is typically automatically mapped by the hardware (southbridge)
for some fixed ranges, various configurable ranges and might also use
PCI substractive decoding. 

LPC is indeed an ISA bus with the physical layer replaced by something
with fewer signals, but from the point of view of the software there is
almost no difference, so look for how to program ISA drivers and you
will probably have your answer.

-- 
Guillaume Knispel
Avencall - 10 bis, rue Lucien Voilin - 92800 Puteaux
Tel. : (+33) 141 389 960

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

* LPC bus access howto
  2011-11-21 16:53 ` Guillaume Knispel
@ 2011-11-22 10:01   ` Andre Haupt
  0 siblings, 0 replies; 3+ messages in thread
From: Andre Haupt @ 2011-11-22 10:01 UTC (permalink / raw)
  To: kernelnewbies

On Mon, Nov 21, 2011 at 05:53:30PM +0100, Guillaume Knispel wrote:
> On Mon, 21 Nov 2011 17:01:29 +0100
> Andre Haupt <andre@bitwigglers.org> wrote:
> 
> > Hi all,
> > 
> > We have a FPGA which will be connected to the LPC bus. This FPGA will
> > provide some GPIO functionality, a rotary encoder, etc.
> > 
> > Now i want to write a kernel driver to talk to this FPGA.
> > I am unsure how to get access to the LPC bus in the first place.
> > What kernel APIs should i use? How to get the memory mapping right, etc?
> 
> The LPC is typically automatically mapped by the hardware (southbridge)
> for some fixed ranges, various configurable ranges and might also use
> PCI substractive decoding. 
> 
> LPC is indeed an ISA bus with the physical layer replaced by something
> with fewer signals, but from the point of view of the software there is
> almost no difference, so look for how to program ISA drivers and you
> will probably have your answer.

So request_mem_region(), ioremap(), ioread*() and iowrite*() are my
friends here right?

Still unsure how to obtain the LPC base address. Is this mapped to
0xA0000-0xFFFFF as with ISA?

cheers,

Andre

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

end of thread, other threads:[~2011-11-22 10:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-21 16:01 LPC bus access howto Andre Haupt
2011-11-21 16:53 ` Guillaume Knispel
2011-11-22 10:01   ` Andre Haupt

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).