Embedded 版 (精华区)
发信人: he (无情的雨), 信区: Embedded_system
标 题: linux for ppc chapter 11
发信站: 哈工大紫丁香 (2001年06月04日11:05:32 星期一), 站内信件
----------------------------------------------------------------------------
----
11. Device Drivers
The kernel already includes device drivers for the on-chip serial and ethern
et ports.
11.1 Examples
For helpful MPC8xx-specific device driver examples, see: http://lists.linuxp
pc.org/listarcs/linuxppc-embedded/200001/msg00221.html
ftp://ftp.denx.de/pub/LinuxPPC/usr/src/drivers.tar.gz
11.2 Flash memory
Flash Device Driver
ftp://ftp.denx.de/pub/LinuxPPC/usr/src/CDK.tar.gz
A flash driver will give you access to /dev/flash devices, which are useful
during development, for field upgrades and are ideal for storing fixed size
persistent configuration data like your board's Ethernet MAC address. Includ
es drivers supporting a number of vendor's devices.
The flash driver does auto-erase when the length of data written per write()
is exactly the corresponding erase block size. So usually you just need to
do:
open (/dev/flash???)
lseek(specific erase region)
write(data, region size)
QSLinux Flash Driver
http://qslinux.org/ ftp://qslinux.org/
QSLinux contains a fully functioning FLASH driver, and an interface to the E
xt2FS filesystem, with compression.
Memory Technology Device Subsystem
http://www.linux-mtd.infradead.org/
The MTD subsystem offers a more general solution which allows you to treat t
he flash as a regular block device on which you can mount a filesystem. It's
ideal for large amounts of variable sized data or applications requiring a
traditional writable filesystem, provided by the Journaling Flash Filesystem
.
However, some work is required to get the MTP to run on PowerPC, as it doesn
't yet support big endian.
M-Systems Disk-On-Chip
http://www.linux-mtd.infradead.org/doc2000.html
This is supported via the Memory Technology Device Subsystem.
11.3 PCMCIA Cards
For a PCMCIA driver, see: http://lists.linuxppc.org/listarcs/linuxppc-embedd
For a PCMCIA driver, see: http://lists.linuxppc.org/listarcs/linuxppc-embedd
ed/200002/msg00093.html
There are also some fairly detailed notes available at: ftp://ftp.absoval.co
m/pub/rpxlite/ and http://lists.linuxppc.org/listarcs/linuxppc-embedded/2000
05/msg00227.html
For generic Linux PCMCIA info, see: http://pcmcia.sourceforge.org/ftp/doc/PC
MCIA-PROG.html
11.4 IDE/ATA Disk Drives
There are lots of options for connecting IDE drives. You need to at least co
nfigure CONFIG_BLK_DEV_IDE and CONFIG_BLK_DEV_IDEDISK. Search for IDE.
Also, see: http://www.bluebutton.com/proj/mbxlinux/.
11.5 PCI Bridge
Search for QSPAN or PowerSpan.
11.6 Watchdog
Using the on-chip watchdog to provide the basic "write kicked" /dev/watchdog
interface described in Documentation/watchdog.txt is problematic, because t
he SYPCR register controlling it can only be written once after reset to bot
h set the timeout and enable the watchdog. Once enabled, the boot loader and
kernel must keep it from expiring up until the point where the user applica
tion opens /dev/watchdog. Littering the generic kernel decompress and startu
p code with watchdog kicks to do this isn't acceptable to other Linux users.
Hence, hardware watchdog support hasn't been implemented yet.
The general plan to solve this problem is described in: http://lists.linuxpp
c.org/listarcs/linuxppc-embedded/199910/msg00026.html
You can probably use Linux's software watchdog in the mean time.
11.7 USB for MPC850/823
http://www.honeywell.se/inu/usb/ and http://lists.suse.com/archives/linux-us
b/2000-Mar/0234.html
These devices can be made to operate as a USB host or slave. Search for USB.
Also see the Programming Guide for Linux USB Device Drivers at http://usb.in
.tum.de/usbdoc/
11.8 A/D and D/A
Use something that "frames" the data and the SI/TDM interface works really s
weet. Take a look at the CS4218 audio codec driver for the Embedded Planet b
oards. It's floating around in the 2.2.13 kernels on the MontaVista site.
11.9 VME
Numerous VME board vendors offer Linux support through software partners suc
h as Denx.
Some older patches and tarballs to use Linux on VME boards and simplify the
access to the VME bus are available at: ftp://vlab1.iram.es/pub/linux-vme/
11.10 HDLC/PPP
http://qslinux.org/docs/snmc/hdlc/index.html
Provides support for the HDLC protocol, running the PPP layer in order to tr
ansport IP packets across a synchronous serial link.
layer in order to tr
ansport IP packets across a synchronous serial link.
11.11 SPI
ftp://216.118.31.75/pub/
This driver is an interface for the SPI controller in MPC8xx. The driver is
written to work with the microcode patches to correct the parameter ram prob
lems. The driver supports basic init,open,close,read and write functions.
11.12 Linux STREAMS (LiS)
http://www.gcom.com/home/linux/lis/
LiS is a software package that comprises an implementation of SVR4 compatibl
e STREAMS for Linux in the form of a loadable kernel module.
A patch to port it to MPC8xx based Embedded PowerPC systems is available at:
ftp://ftp.denx.de/pub/LinuxPPC/usr/src/LiS/
----------------------------------------------------------------------------
----
--
※ 来源:·哈工大紫丁香 bbs.hit.edu.cn·[FROM: 202.118.235.250]
Powered by KBS BBS 2.0 (http://dev.kcn.cn)
页面执行时间:3.829毫秒