Linux Support Package (LSP) V2.3 for Spear
Total Page:16
File Type:pdf, Size:1020Kb
UM0851 User manual Linux support package (LSP) v2.3 for SPEAr Introduction SPEAr is a family of highly customizable ARM-based embedded MPUs suitable for use in many different kinds of application. SPEAr Linux Support Package consists of a collection of all the Linux drivers that control the specific hardware controllers embedded in SPEAr as well as the set of bootloaders for performing the low level hardware configuration and loading of the Linux OS. LSPv2.3 handles, in a single source tree, the following SPEAr devices: SPEAr600, SPEAr300, SPEAr310 and SPEAr320. LSPv2.3 is integrated into the STLinux 2.3 distribution, which is a full featured distro consisting of more than 500 RPM packages. Please refer to http://www.stlinux.com for more details. May 2010 Doc ID 16604 Rev 2 1/245 www.st.com Contents UM0851 Contents 1 Boot loader overview . 13 1.1 XLoader . 13 1.1.1 Building XLoader . 14 1.2 U-Boot . 14 1.2.1 U-Boot overview . 15 1.2.2 Features . 15 1.2.3 Building U-Boot . 15 1.2.4 U-Boot commands . 16 1.2.5 Booting Linux with U-Boot . 21 2 Linux OS and device driver general information . 23 3 Platform section . 25 3.1 General purpose timer (GPT) driver . 25 3.1.1 Hardware overview . 26 3.1.2 Software overview . 26 3.1.3 GPT driver usage . 29 3.2 Vector interrupt controller (VIC) driver . 31 3.2.1 Hardware overview . 32 3.2.2 Software overview . 33 3.2.3 VIC API : high level IRQ flow handlers in SPEAR . 36 3.2.4 The internals of interrupt handling in ARM . 36 3.2.5 VIC usage . 37 3.3 Real time clock (RTC) driver . 38 3.3.1 Hardware overview . 38 3.3.2 Software overview . 39 3.3.3 RTC driver usage . 42 3.3.4 References . 42 4 Communication device drivers . 43 4.1 GMAC Ethernet driver . 43 4.1.1 Hardware overview . 43 4.1.2 Software overview . 44 4.1.3 GMAC API . 45 2/245 Doc ID 16604 Rev 2 UM0851 Contents 4.1.4 Concept of socket buffers . 49 4.1.5 GMAC driver usage . 50 4.1.6 GMAC driver performance . 52 4.2 MACB (MAC block) driver . 55 4.2.1 Hardware overview . 55 4.2.2 Software overview . 57 4.2.3 MACB driver interface . 57 4.2.4 Socket buffer management . 59 4.2.5 Cache coherency . 59 4.2.6 Packet reception . 60 4.2.7 Packet transmission . 60 4.2.8 MACB driver usage . 60 4.2.9 Kernel configuration options . 60 4.3 USB Host . 61 4.3.1 Hardware overview . 61 4.3.2 USB host API . 62 4.3.3 USB host usage . 62 4.3.4 USB Host performance . 66 4.3.5 Kernel configuration options . 67 4.4 USB Device . 69 4.4.1 Hardware overview . 69 4.4.2 Software overview . 70 4.4.3 USBD driver interface with Linux gadget layer . 71 4.4.4 Composite device interface . 72 4.4.5 USBD driver performance . 76 4.4.6 Configuration options . 77 4.4.7 References . 78 4.5 I2C driver . 78 4.5.1 Hardware overview . 78 4.5.2 Software overview . 79 4.5.3 I2C framework in linux . 80 4.5.4 Adding a new I2C client driver . 81 4.5.5 I2C driver performance . 84 4.5.6 Known issues or limitations . 85 4.5.7 Configuration options . 86 4.5.8 References . 86 Doc ID 16604 Rev 2 3/245 Contents UM0851 4.6 SPI driver . 86 4.6.1 Hardware overview . 86 4.6.2 Software overview . 87 4.6.3 SPI framework in Linux . 88 4.6.4 Un-registering the driver . 92 4.6.5 Known issues or limitations . 92 4.6.6 SPI device driver performance . 92 4.6.7 Configuration options . 92 4.6.8 References . 92 4.7 SDIO driver . 93 4.7.1 Hardware overview . 93 4.7.2 Software overview . ..