Skip to contentSkip to conversation

Sample driver

DISCUSSION Silwer star 3 participants 3 messages Feb 20, 2008

lore
Share & tools
lore
#0 lore raw

Does anyone have sample drivers in Linux for the EBC interface for PPC405Ex? I would be thankful if someone could put in a sample code here.

Signature · 2 lines
View this message in context: http://www.nabble.com/Sample-driver-tp15582059p15582059.html
Sent from the linuxppc-embedded mailing list archive at Nabble.com.
#1 lore raw
Quoted 3 lines · On Tue, 19 Feb 2008 20:13:24 -0800 (PST) Silwer star <[email protected]> wrote:

Does anyone have sample drivers in Linux for the EBC interface for PPC405Ex? I would be thankful if someone could put in a sample code here.

Linux typically doesn't touch the EBC itself. That is normally set up by firmware such as U-Boot and Linux uses it as-is.

josh

#2 lore raw
Quoted 6 lines · Josh Boyer
Quoted 2 lines

Does anyone have sample drivers in Linux for the EBC interface for PPC405Ex? I would be thankful if someone could put in a sample code here.

Linux typically doesn't touch the EBC itself. That is normally set up by firmware such as U-Boot and Linux uses it as-is.

True, but there's always a lot of ways to do it. Here's an example that might help you get started configuring the EBC from Linux. Here's a device driver directory from a recent 440GX project:

http://www.mock.com/wsvn/listing.php?repname=mock.pdev&path=%2Ftrunk%2Fsw%2Fdriver%2F#_trunk_sw_driver_

You might look at pdev-gxctl.c. It is a simple module that sets up the EBC address space for two sets of address ranges with 16-bit data paths.
These are for simple register read/writes to control some FPGAs.
Pdev-gxctl provides an mmap() interface to /dev/xxx so user code can easily access the FPGA registers mapped onto the EBC. The difference for the 405Ex should be pretty small.

jeff