Re: Sample driver
From: Jeff Mock <hidden>
Date: 2008-02-20 15:40:09
Josh Boyer wrote:
quoted
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