linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* writing device driver for memory mapped device
@ 2003-06-12  0:28 Brian S. Park
  2003-06-12  0:53 ` Chris Zimman
  0 siblings, 1 reply; 2+ messages in thread
From: Brian S. Park @ 2003-06-12  0:28 UTC (permalink / raw)
  To: linuxppc-embedded


Hello all,
I have successfully booted Linux and u-Boot on our custom target (based on
IBM Walnut demo board) and I'm ready to start writing device driver for
Linux so that I can access my hardware on the board.

Our custom board has FPGA connected to EBC bus of PPC405gp and is memory
mapped. So, I only need a device driver which will allow me to map the
memory to the user space application and handle some interrupts. Can any
one recommend a good starting point?

Also, what are we required to do to stay compliant with GPL? Is posting
tarball of modified Linux/u-boot source on the web enough?

Any help will be appreciated.

Thank you.


===============================================================
Brian S. Park  brian@corelis.com  (562) 926-6727 x143
---------------------------------------------------------------
Everything we do helps our customers get to market
FASTER with HIGHER quality and LOWER cost
===============================================================


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

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

* Re: writing device driver for memory mapped device
  2003-06-12  0:28 writing device driver for memory mapped device Brian S. Park
@ 2003-06-12  0:53 ` Chris Zimman
  0 siblings, 0 replies; 2+ messages in thread
From: Chris Zimman @ 2003-06-12  0:53 UTC (permalink / raw)
  To: Brian S. Park; +Cc: linuxppc-embedded


On Wed, Jun 11, 2003 at 05:28:02PM -0700, Brian S. Park wrote:
> Our custom board has FPGA connected to EBC bus of PPC405gp and is memory
> mapped. So, I only need a device driver which will allow me to map the
> memory to the user space application and handle some interrupts. Can any
> one recommend a good starting point?

This is pretty straight forward.  I assume you've setup the chip select
for the device ahead of time (eg. in PPCBoot) and configured the bus
width, memory location, etc.  If that's the case, you can use ioremap()
in your device driver and map the device into the kernel address space.

As far as the interrupts go, it depends on how you set them up on the
board.  If you used one of the IRQ0-6 interrupt pins (aka GPIO17-23)
pins, you can just add an interrupt handler and register the apprpriate
interrupt.  You may have to adjust the interrupt routing in the platform
setup.

If you get stuck, I can send you an example driver that may help you
out.  It maps in a memory mapped device on the peripheral bus.

> Also, what are we required to do to stay compliant with GPL? Is posting
> tarball of modified Linux/u-boot source on the web enough?

Just put a copy of the GPL in the tarball and mark the files as such.
Making it available for download is good practice.

--Chris

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

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

end of thread, other threads:[~2003-06-12  0:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-06-12  0:28 writing device driver for memory mapped device Brian S. Park
2003-06-12  0:53 ` Chris Zimman

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