mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-11 08:18:47 +00:00
Merge ARM fixes
This commit is contained in:
commit
5a84d15906
96
.mailmap
Normal file
96
.mailmap
Normal file
@ -0,0 +1,96 @@
|
||||
#
|
||||
# This list is used by git-shortlog to fix a few botched name translations
|
||||
# in the git archive, either because the author's full name was messed up
|
||||
# and/or not always written the same way, making contributions from the
|
||||
# same person appearing not to be so or badly displayed.
|
||||
#
|
||||
# repo-abbrev: /pub/scm/linux/kernel/git/
|
||||
#
|
||||
|
||||
Aaron Durbin <adurbin@google.com>
|
||||
Adam Oldham <oldhamca@gmail.com>
|
||||
Adam Radford <aradford@gmail.com>
|
||||
Adrian Bunk <bunk@stusta.de>
|
||||
Alan Cox <alan@lxorguk.ukuu.org.uk>
|
||||
Alan Cox <root@hraefn.swansea.linux.org.uk>
|
||||
Aleksey Gorelov <aleksey_gorelov@phoenix.com>
|
||||
Al Viro <viro@ftp.linux.org.uk>
|
||||
Al Viro <viro@zenIV.linux.org.uk>
|
||||
Andreas Herrmann <aherrman@de.ibm.com>
|
||||
Andrew Morton <akpm@osdl.org>
|
||||
Andrew Vasquez <andrew.vasquez@qlogic.com>
|
||||
Andy Adamson <andros@citi.umich.edu>
|
||||
Arnaud Patard <arnaud.patard@rtp-net.org>
|
||||
Arnd Bergmann <arnd@arndb.de>
|
||||
Axel Dyks <xl@xlsigned.net>
|
||||
Ben Gardner <bgardner@wabtec.com>
|
||||
Ben M Cahill <ben.m.cahill@intel.com>
|
||||
Björn Steinbrink <B.Steinbrink@gmx.de>
|
||||
Brian Avery <b.avery@hp.com>
|
||||
Brian King <brking@us.ibm.com>
|
||||
Christoph Hellwig <hch@lst.de>
|
||||
Corey Minyard <minyard@acm.org>
|
||||
David Brownell <david-b@pacbell.net>
|
||||
David Woodhouse <dwmw2@shinybook.infradead.org>
|
||||
Domen Puncer <domen@coderock.org>
|
||||
Douglas Gilbert <dougg@torque.net>
|
||||
Ed L. Cashin <ecashin@coraid.com>
|
||||
Evgeniy Polyakov <johnpol@2ka.mipt.ru>
|
||||
Felipe W Damasio <felipewd@terra.com.br>
|
||||
Felix Kuhling <fxkuehl@gmx.de>
|
||||
Felix Moeller <felix@derklecks.de>
|
||||
Filipe Lautert <filipe@icewall.org>
|
||||
Franck Bui-Huu <vagabon.xyz@gmail.com>
|
||||
Frank Zago <fzago@systemfabricworks.com>
|
||||
Greg Kroah-Hartman <greg@echidna.(none)>
|
||||
Greg Kroah-Hartman <gregkh@suse.de>
|
||||
Greg Kroah-Hartman <greg@kroah.com>
|
||||
Henk Vergonet <Henk.Vergonet@gmail.com>
|
||||
Henrik Kretzschmar <henne@nachtwindheim.de>
|
||||
Herbert Xu <herbert@gondor.apana.org.au>
|
||||
Jacob Shin <Jacob.Shin@amd.com>
|
||||
James Bottomley <jejb@mulgrave.(none)>
|
||||
James Bottomley <jejb@titanic.il.steeleye.com>
|
||||
James E Wilson <wilson@specifix.com>
|
||||
James Ketrenos <jketreno@io.(none)>
|
||||
Jean Tourrilhes <jt@hpl.hp.com>
|
||||
Jeff Garzik <jgarzik@pretzel.yyz.us>
|
||||
Jens Axboe <axboe@suse.de>
|
||||
Jens Osterkamp <Jens.Osterkamp@de.ibm.com>
|
||||
John Stultz <johnstul@us.ibm.com>
|
||||
Juha Yrjola <at solidboot.com>
|
||||
Juha Yrjola <juha.yrjola@nokia.com>
|
||||
Juha Yrjola <juha.yrjola@solidboot.com>
|
||||
Kay Sievers <kay.sievers@vrfy.org>
|
||||
Kenneth W Chen <kenneth.w.chen@intel.com>
|
||||
Koushik <raghavendra.koushik@neterion.com>
|
||||
Leonid I Ananiev <leonid.i.ananiev@intel.com>
|
||||
Linas Vepstas <linas@austin.ibm.com>
|
||||
Matthieu CASTET <castet.matthieu@free.fr>
|
||||
Michel Dänzer <michel@tungstengraphics.com>
|
||||
Mitesh shah <mshah@teja.com>
|
||||
Morten Welinder <terra@gnome.org>
|
||||
Morten Welinder <welinder@anemone.rentec.com>
|
||||
Morten Welinder <welinder@darter.rentec.com>
|
||||
Morten Welinder <welinder@troll.com>
|
||||
Nguyen Anh Quynh <aquynh@gmail.com>
|
||||
Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
|
||||
Patrick Mochel <mochel@digitalimplant.org>
|
||||
Peter A Jonsson <pj@ludd.ltu.se>
|
||||
Praveen BP <praveenbp@ti.com>
|
||||
Rajesh Shah <rajesh.shah@intel.com>
|
||||
Ralf Baechle <ralf@linux-mips.org>
|
||||
Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
|
||||
Rémi Denis-Courmont <rdenis@simphalempin.com>
|
||||
Rudolf Marek <R.Marek@sh.cvut.cz>
|
||||
Rui Saraiva <rmps@joel.ist.utl.pt>
|
||||
Sachin P Sant <ssant@in.ibm.com>
|
||||
Sam Ravnborg <sam@mars.ravnborg.org>
|
||||
Simon Kelley <simon@thekelleys.org.uk>
|
||||
Stéphane Witzmann <stephane.witzmann@ubpmes.univ-bpclermont.fr>
|
||||
Stephen Hemminger <shemminger@osdl.org>
|
||||
Tejun Heo <htejun@gmail.com>
|
||||
Thomas Graf <tgraf@suug.ch>
|
||||
Tony Luck <tony.luck@intel.com>
|
||||
Tsuneo Yoshioka <Tsuneo.Yoshioka@f-secure.com>
|
||||
Valdis Kletnieks <Valdis.Kletnieks@vt.edu>
|
10
CREDITS
10
CREDITS
@ -2571,6 +2571,16 @@ S: Subiaco, 6008
|
||||
S: Perth, Western Australia
|
||||
S: Australia
|
||||
|
||||
N: Miguel Ojeda Sandonis
|
||||
E: maxextreme@gmail.com
|
||||
D: Author: Auxiliary LCD Controller driver (ks0108)
|
||||
D: Author: Auxiliary LCD driver (cfag12864b)
|
||||
D: Author: Auxiliary LCD framebuffer driver (cfag12864bfb)
|
||||
D: Maintainer: Auxiliary display drivers tree (drivers/auxdisplay/*)
|
||||
S: C/ Mieses 20, 9-B
|
||||
S: Valladolid 47009
|
||||
S: Spain
|
||||
|
||||
N: Greg Page
|
||||
E: gpage@sovereign.org
|
||||
D: IPX development and support
|
||||
|
@ -1,6 +1,6 @@
|
||||
What: /debug/pktcdvd/pktcdvd[0-7]
|
||||
Date: Oct. 2006
|
||||
KernelVersion: 2.6.19
|
||||
KernelVersion: 2.6.20
|
||||
Contact: Thomas Maier <balagi@justmail.de>
|
||||
Description:
|
||||
|
||||
@ -11,8 +11,7 @@ The pktcdvd module (packet writing driver) creates
|
||||
these files in debugfs:
|
||||
|
||||
/debug/pktcdvd/pktcdvd[0-7]/
|
||||
info (0444) Lots of human readable driver
|
||||
statistics and infos. Multiple lines!
|
||||
info (0444) Lots of driver statistics and infos.
|
||||
|
||||
Example:
|
||||
-------
|
||||
|
@ -1,6 +1,6 @@
|
||||
What: /sys/class/pktcdvd/
|
||||
Date: Oct. 2006
|
||||
KernelVersion: 2.6.19
|
||||
KernelVersion: 2.6.20
|
||||
Contact: Thomas Maier <balagi@justmail.de>
|
||||
Description:
|
||||
|
||||
|
@ -482,13 +482,13 @@ slightly.
|
||||
<para>Gadget drivers
|
||||
rely on common USB structures and constants
|
||||
defined in the
|
||||
<filename><linux/usb_ch9.h></filename>
|
||||
<filename><linux/usb/ch9.h></filename>
|
||||
header file, which is standard in Linux 2.6 kernels.
|
||||
These are the same types and constants used by host
|
||||
side drivers (and usbcore).
|
||||
</para>
|
||||
|
||||
!Iinclude/linux/usb_ch9.h
|
||||
!Iinclude/linux/usb/ch9.h
|
||||
</sect1>
|
||||
|
||||
<sect1 id="core"><title>Core Objects and Methods</title>
|
||||
|
@ -316,6 +316,9 @@ X!Earch/i386/kernel/mca.c
|
||||
<sect1><title>DMI Interfaces</title>
|
||||
!Edrivers/firmware/dmi_scan.c
|
||||
</sect1>
|
||||
<sect1><title>EDD Interfaces</title>
|
||||
!Idrivers/firmware/edd.c
|
||||
</sect1>
|
||||
</chapter>
|
||||
|
||||
<chapter id="security">
|
||||
|
@ -4,4 +4,5 @@
|
||||
<param name="funcsynopsis.style">ansi</param>
|
||||
<param name="funcsynopsis.tabular.threshold">80</param>
|
||||
<!-- <param name="paper.type">A4</param> -->
|
||||
<param name="generate.section.toc.level">2</param>
|
||||
</stylesheet>
|
||||
|
@ -187,13 +187,13 @@
|
||||
|
||||
<chapter><title>USB-Standard Types</title>
|
||||
|
||||
<para>In <filename><linux/usb_ch9.h></filename> you will find
|
||||
<para>In <filename><linux/usb/ch9.h></filename> you will find
|
||||
the USB data types defined in chapter 9 of the USB specification.
|
||||
These data types are used throughout USB, and in APIs including
|
||||
this host side API, gadget APIs, and usbfs.
|
||||
</para>
|
||||
|
||||
!Iinclude/linux/usb_ch9.h
|
||||
!Iinclude/linux/usb/ch9.h
|
||||
|
||||
</chapter>
|
||||
|
||||
@ -574,7 +574,7 @@ for (;;) {
|
||||
#include <asm/byteorder.h></programlisting>
|
||||
The standard USB device model requests, from "Chapter 9" of
|
||||
the USB 2.0 specification, are automatically included from
|
||||
the <filename><linux/usb_ch9.h></filename> header.
|
||||
the <filename><linux/usb/ch9.h></filename> header.
|
||||
</para>
|
||||
|
||||
<para>Unless noted otherwise, the ioctl requests
|
||||
|
@ -30,6 +30,7 @@ are not a good substitute for a solid C education and/or years of
|
||||
experience, the following books are good for, if anything, reference:
|
||||
- "The C Programming Language" by Kernighan and Ritchie [Prentice Hall]
|
||||
- "Practical C Programming" by Steve Oualline [O'Reilly]
|
||||
- "C: A Reference Manual" by Harbison and Steele [Prentice Hall]
|
||||
|
||||
The kernel is written using GNU C and the GNU toolchain. While it
|
||||
adheres to the ISO C89 standard, it uses a number of extensions that are
|
||||
|
@ -1,38 +0,0 @@
|
||||
driver/acpi/hotkey.c implement:
|
||||
1. /proc/acpi/hotkey/event_config
|
||||
(event based hotkey or event config interface):
|
||||
a. add a event based hotkey(event) :
|
||||
echo "0:bus::action:method:num:num" > event_config
|
||||
|
||||
b. delete a event based hotkey(event):
|
||||
echo "1:::::num:num" > event_config
|
||||
|
||||
c. modify a event based hotkey(event):
|
||||
echo "2:bus::action:method:num:num" > event_config
|
||||
|
||||
2. /proc/acpi/hotkey/poll_config
|
||||
(polling based hotkey or event config interface):
|
||||
a.add a polling based hotkey(event) :
|
||||
echo "0:bus:method:action:method:num" > poll_config
|
||||
this adding command will create a proc file
|
||||
/proc/acpi/hotkey/method, which is used to get
|
||||
result of polling.
|
||||
|
||||
b.delete a polling based hotkey(event):
|
||||
echo "1:::::num" > event_config
|
||||
|
||||
c.modify a polling based hotkey(event):
|
||||
echo "2:bus:method:action:method:num" > poll_config
|
||||
|
||||
3./proc/acpi/hotkey/action
|
||||
(interface to call aml method associated with a
|
||||
specific hotkey(event))
|
||||
echo "event_num:event_type:event_argument" >
|
||||
/proc/acpi/hotkey/action.
|
||||
The result of the execution of this aml method is
|
||||
attached to /proc/acpi/hotkey/poll_method, which is dynamically
|
||||
created. Please use command "cat /proc/acpi/hotkey/polling_method"
|
||||
to retrieve it.
|
||||
|
||||
Note: Use cmdline "acpi_generic_hotkey" to over-ride
|
||||
platform-specific with generic driver.
|
105
Documentation/auxdisplay/cfag12864b
Normal file
105
Documentation/auxdisplay/cfag12864b
Normal file
@ -0,0 +1,105 @@
|
||||
===================================
|
||||
cfag12864b LCD Driver Documentation
|
||||
===================================
|
||||
|
||||
License: GPLv2
|
||||
Author & Maintainer: Miguel Ojeda Sandonis <maxextreme@gmail.com>
|
||||
Date: 2006-10-27
|
||||
|
||||
|
||||
|
||||
--------
|
||||
0. INDEX
|
||||
--------
|
||||
|
||||
1. DRIVER INFORMATION
|
||||
2. DEVICE INFORMATION
|
||||
3. WIRING
|
||||
4. USERSPACE PROGRAMMING
|
||||
|
||||
|
||||
---------------------
|
||||
1. DRIVER INFORMATION
|
||||
---------------------
|
||||
|
||||
This driver support one cfag12864b display at time.
|
||||
|
||||
|
||||
---------------------
|
||||
2. DEVICE INFORMATION
|
||||
---------------------
|
||||
|
||||
Manufacturer: Crystalfontz
|
||||
Device Name: Crystalfontz 12864b LCD Series
|
||||
Device Code: cfag12864b
|
||||
Webpage: http://www.crystalfontz.com
|
||||
Device Webpage: http://www.crystalfontz.com/products/12864b/
|
||||
Type: LCD (Liquid Crystal Display)
|
||||
Width: 128
|
||||
Height: 64
|
||||
Colors: 2 (B/N)
|
||||
Controller: ks0108
|
||||
Controllers: 2
|
||||
Pages: 8 each controller
|
||||
Addresses: 64 each page
|
||||
Data size: 1 byte each address
|
||||
Memory size: 2 * 8 * 64 * 1 = 1024 bytes = 1 Kbyte
|
||||
|
||||
|
||||
---------
|
||||
3. WIRING
|
||||
---------
|
||||
|
||||
The cfag12864b LCD Series don't have official wiring.
|
||||
|
||||
The common wiring is done to the parallel port as shown:
|
||||
|
||||
Parallel Port cfag12864b
|
||||
|
||||
Name Pin# Pin# Name
|
||||
|
||||
Strobe ( 1)------------------------------(17) Enable
|
||||
Data 0 ( 2)------------------------------( 4) Data 0
|
||||
Data 1 ( 3)------------------------------( 5) Data 1
|
||||
Data 2 ( 4)------------------------------( 6) Data 2
|
||||
Data 3 ( 5)------------------------------( 7) Data 3
|
||||
Data 4 ( 6)------------------------------( 8) Data 4
|
||||
Data 5 ( 7)------------------------------( 9) Data 5
|
||||
Data 6 ( 8)------------------------------(10) Data 6
|
||||
Data 7 ( 9)------------------------------(11) Data 7
|
||||
(10) [+5v]---( 1) Vdd
|
||||
(11) [GND]---( 2) Ground
|
||||
(12) [+5v]---(14) Reset
|
||||
(13) [GND]---(15) Read / Write
|
||||
Line (14)------------------------------(13) Controller Select 1
|
||||
(15)
|
||||
Init (16)------------------------------(12) Controller Select 2
|
||||
Select (17)------------------------------(16) Data / Instruction
|
||||
Ground (18)---[GND] [+5v]---(19) LED +
|
||||
Ground (19)---[GND]
|
||||
Ground (20)---[GND] E A Values:
|
||||
Ground (21)---[GND] [GND]---[P1]---(18) Vee · R = Resistor = 22 ohm
|
||||
Ground (22)---[GND] | · P1 = Preset = 10 Kohm
|
||||
Ground (23)---[GND] ---- S ------( 3) V0 · P2 = Preset = 1 Kohm
|
||||
Ground (24)---[GND] | |
|
||||
Ground (25)---[GND] [GND]---[P2]---[R]---(20) LED -
|
||||
|
||||
|
||||
------------------------
|
||||
4. USERSPACE PROGRAMMING
|
||||
------------------------
|
||||
|
||||
The cfag12864bfb describes a framebuffer device (/dev/fbX).
|
||||
|
||||
It has a size of 1024 bytes = 1 Kbyte.
|
||||
Each bit represents one pixel. If the bit is high, the pixel will
|
||||
turn on. If the pixel is low, the pixel will turn off.
|
||||
|
||||
You can use the framebuffer as a file: fopen, fwrite, fclose...
|
||||
Although the LCD won't get updated until the next refresh time arrives.
|
||||
|
||||
Also, you can mmap the framebuffer: open & mmap, munmap & close...
|
||||
which is the best option for most uses.
|
||||
|
||||
Check Documentation/auxdisplay/cfag12864b-example.c
|
||||
for a real working userspace complete program with usage examples.
|
282
Documentation/auxdisplay/cfag12864b-example.c
Normal file
282
Documentation/auxdisplay/cfag12864b-example.c
Normal file
@ -0,0 +1,282 @@
|
||||
/*
|
||||
* Filename: cfag12864b-example.c
|
||||
* Version: 0.1.0
|
||||
* Description: cfag12864b LCD userspace example program
|
||||
* License: GPLv2
|
||||
*
|
||||
* Author: Copyright (C) Miguel Ojeda Sandonis <maxextreme@gmail.com>
|
||||
* Date: 2006-10-31
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* ------------------------
|
||||
* start of cfag12864b code
|
||||
* ------------------------
|
||||
*/
|
||||
|
||||
#include <string.h>
|
||||
#include <fcntl.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/mman.h>
|
||||
|
||||
#define CFAG12864B_WIDTH (128)
|
||||
#define CFAG12864B_HEIGHT (64)
|
||||
#define CFAG12864B_SIZE (128 * 64 / 8)
|
||||
#define CFAG12864B_BPB (8)
|
||||
#define CFAG12864B_ADDRESS(x, y) ((y) * CFAG12864B_WIDTH / \
|
||||
CFAG12864B_BPB + (x) / CFAG12864B_BPB)
|
||||
#define CFAG12864B_BIT(n) (((unsigned char) 1) << (n))
|
||||
|
||||
#undef CFAG12864B_DOCHECK
|
||||
#ifdef CFAG12864B_DOCHECK
|
||||
#define CFAG12864B_CHECK(x, y) ((x) < CFAG12864B_WIDTH && \
|
||||
(y) < CFAG12864B_HEIGHT)
|
||||
#else
|
||||
#define CFAG12864B_CHECK(x, y) (1)
|
||||
#endif
|
||||
|
||||
int cfag12864b_fd;
|
||||
unsigned char * cfag12864b_mem;
|
||||
unsigned char cfag12864b_buffer[CFAG12864B_SIZE];
|
||||
|
||||
/*
|
||||
* init a cfag12864b framebuffer device
|
||||
*
|
||||
* No error: return = 0
|
||||
* Unable to open: return = -1
|
||||
* Unable to mmap: return = -2
|
||||
*/
|
||||
int cfag12864b_init(char *path)
|
||||
{
|
||||
cfag12864b_fd = open(path, O_RDWR);
|
||||
if (cfag12864b_fd == -1)
|
||||
return -1;
|
||||
|
||||
cfag12864b_mem = mmap(0, CFAG12864B_SIZE, PROT_READ | PROT_WRITE,
|
||||
MAP_SHARED, cfag12864b_fd, 0);
|
||||
if (cfag12864b_mem == MAP_FAILED) {
|
||||
close(cfag12864b_fd);
|
||||
return -2;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* exit a cfag12864b framebuffer device
|
||||
*/
|
||||
void cfag12864b_exit(void)
|
||||
{
|
||||
munmap(cfag12864b_mem, CFAG12864B_SIZE);
|
||||
close(cfag12864b_fd);
|
||||
}
|
||||
|
||||
/*
|
||||
* set (x, y) pixel
|
||||
*/
|
||||
void cfag12864b_set(unsigned char x, unsigned char y)
|
||||
{
|
||||
if (CFAG12864B_CHECK(x, y))
|
||||
cfag12864b_buffer[CFAG12864B_ADDRESS(x, y)] |=
|
||||
CFAG12864B_BIT(x % CFAG12864B_BPB);
|
||||
}
|
||||
|
||||
/*
|
||||
* unset (x, y) pixel
|
||||
*/
|
||||
void cfag12864b_unset(unsigned char x, unsigned char y)
|
||||
{
|
||||
if (CFAG12864B_CHECK(x, y))
|
||||
cfag12864b_buffer[CFAG12864B_ADDRESS(x, y)] &=
|
||||
~CFAG12864B_BIT(x % CFAG12864B_BPB);
|
||||
}
|
||||
|
||||
/*
|
||||
* is set (x, y) pixel?
|
||||
*
|
||||
* Pixel off: return = 0
|
||||
* Pixel on: return = 1
|
||||
*/
|
||||
unsigned char cfag12864b_isset(unsigned char x, unsigned char y)
|
||||
{
|
||||
if (CFAG12864B_CHECK(x, y))
|
||||
if (cfag12864b_buffer[CFAG12864B_ADDRESS(x, y)] &
|
||||
CFAG12864B_BIT(x % CFAG12864B_BPB))
|
||||
return 1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* not (x, y) pixel
|
||||
*/
|
||||
void cfag12864b_not(unsigned char x, unsigned char y)
|
||||
{
|
||||
if (cfag12864b_isset(x, y))
|
||||
cfag12864b_unset(x, y);
|
||||
else
|
||||
cfag12864b_set(x, y);
|
||||
}
|
||||
|
||||
/*
|
||||
* fill (set all pixels)
|
||||
*/
|
||||
void cfag12864b_fill(void)
|
||||
{
|
||||
unsigned short i;
|
||||
|
||||
for (i = 0; i < CFAG12864B_SIZE; i++)
|
||||
cfag12864b_buffer[i] = 0xFF;
|
||||
}
|
||||
|
||||
/*
|
||||
* clear (unset all pixels)
|
||||
*/
|
||||
void cfag12864b_clear(void)
|
||||
{
|
||||
unsigned short i;
|
||||
|
||||
for (i = 0; i < CFAG12864B_SIZE; i++)
|
||||
cfag12864b_buffer[i] = 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* format a [128*64] matrix
|
||||
*
|
||||
* Pixel off: src[i] = 0
|
||||
* Pixel on: src[i] > 0
|
||||
*/
|
||||
void cfag12864b_format(unsigned char * matrix)
|
||||
{
|
||||
unsigned char i, j, n;
|
||||
|
||||
for (i = 0; i < CFAG12864B_HEIGHT; i++)
|
||||
for (j = 0; j < CFAG12864B_WIDTH / CFAG12864B_BPB; j++) {
|
||||
cfag12864b_buffer[i * CFAG12864B_WIDTH / CFAG12864B_BPB +
|
||||
j] = 0;
|
||||
for (n = 0; n < CFAG12864B_BPB; n++)
|
||||
if (matrix[i * CFAG12864B_WIDTH +
|
||||
j * CFAG12864B_BPB + n])
|
||||
cfag12864b_buffer[i * CFAG12864B_WIDTH /
|
||||
CFAG12864B_BPB + j] |=
|
||||
CFAG12864B_BIT(n);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* blit buffer to lcd
|
||||
*/
|
||||
void cfag12864b_blit(void)
|
||||
{
|
||||
memcpy(cfag12864b_mem, cfag12864b_buffer, CFAG12864B_SIZE);
|
||||
}
|
||||
|
||||
/*
|
||||
* ----------------------
|
||||
* end of cfag12864b code
|
||||
* ----------------------
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#define EXAMPLES 6
|
||||
|
||||
void example(unsigned char n)
|
||||
{
|
||||
unsigned short i, j;
|
||||
unsigned char matrix[CFAG12864B_WIDTH * CFAG12864B_HEIGHT];
|
||||
|
||||
if (n > EXAMPLES)
|
||||
return;
|
||||
|
||||
printf("Example %i/%i - ", n, EXAMPLES);
|
||||
|
||||
switch (n) {
|
||||
case 1:
|
||||
printf("Draw points setting bits");
|
||||
cfag12864b_clear();
|
||||
for (i = 0; i < CFAG12864B_WIDTH; i += 2)
|
||||
for (j = 0; j < CFAG12864B_HEIGHT; j += 2)
|
||||
cfag12864b_set(i, j);
|
||||
break;
|
||||
|
||||
case 2:
|
||||
printf("Clear the LCD");
|
||||
cfag12864b_clear();
|
||||
break;
|
||||
|
||||
case 3:
|
||||
printf("Draw rows formatting a [128*64] matrix");
|
||||
memset(matrix, 0, CFAG12864B_WIDTH * CFAG12864B_HEIGHT);
|
||||
for (i = 0; i < CFAG12864B_WIDTH; i++)
|
||||
for (j = 0; j < CFAG12864B_HEIGHT; j += 2)
|
||||
matrix[j * CFAG12864B_WIDTH + i] = 1;
|
||||
cfag12864b_format(matrix);
|
||||
break;
|
||||
|
||||
case 4:
|
||||
printf("Fill the lcd");
|
||||
cfag12864b_fill();
|
||||
break;
|
||||
|
||||
case 5:
|
||||
printf("Draw columns unsetting bits");
|
||||
for (i = 0; i < CFAG12864B_WIDTH; i += 2)
|
||||
for (j = 0; j < CFAG12864B_HEIGHT; j++)
|
||||
cfag12864b_unset(i, j);
|
||||
break;
|
||||
|
||||
case 6:
|
||||
printf("Do negative not-ing all bits");
|
||||
for (i = 0; i < CFAG12864B_WIDTH; i++)
|
||||
for (j = 0; j < CFAG12864B_HEIGHT; j ++)
|
||||
cfag12864b_not(i, j);
|
||||
break;
|
||||
}
|
||||
|
||||
puts(" - [Press Enter]");
|
||||
}
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
unsigned char n;
|
||||
|
||||
if (argc != 2) {
|
||||
printf(
|
||||
"Sintax: %s fbdev\n"
|
||||
"Usually: /dev/fb0, /dev/fb1...\n", argv[0]);
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (cfag12864b_init(argv[1])) {
|
||||
printf("Can't init %s fbdev\n", argv[1]);
|
||||
return -2;
|
||||
}
|
||||
|
||||
for (n = 1; n <= EXAMPLES; n++) {
|
||||
example(n);
|
||||
cfag12864b_blit();
|
||||
while (getchar() != '\n');
|
||||
}
|
||||
|
||||
cfag12864b_exit();
|
||||
|
||||
return 0;
|
||||
}
|
55
Documentation/auxdisplay/ks0108
Normal file
55
Documentation/auxdisplay/ks0108
Normal file
@ -0,0 +1,55 @@
|
||||
==========================================
|
||||
ks0108 LCD Controller Driver Documentation
|
||||
==========================================
|
||||
|
||||
License: GPLv2
|
||||
Author & Maintainer: Miguel Ojeda Sandonis <maxextreme@gmail.com>
|
||||
Date: 2006-10-27
|
||||
|
||||
|
||||
|
||||
--------
|
||||
0. INDEX
|
||||
--------
|
||||
|
||||
1. DRIVER INFORMATION
|
||||
2. DEVICE INFORMATION
|
||||
3. WIRING
|
||||
|
||||
|
||||
---------------------
|
||||
1. DRIVER INFORMATION
|
||||
---------------------
|
||||
|
||||
This driver support the ks0108 LCD controller.
|
||||
|
||||
|
||||
---------------------
|
||||
2. DEVICE INFORMATION
|
||||
---------------------
|
||||
|
||||
Manufacturer: Samsung
|
||||
Device Name: KS0108 LCD Controller
|
||||
Device Code: ks0108
|
||||
Webpage: -
|
||||
Device Webpage: -
|
||||
Type: LCD Controller (Liquid Crystal Display Controller)
|
||||
Width: 64
|
||||
Height: 64
|
||||
Colors: 2 (B/N)
|
||||
Pages: 8
|
||||
Addresses: 64 each page
|
||||
Data size: 1 byte each address
|
||||
Memory size: 8 * 64 * 1 = 512 bytes
|
||||
|
||||
|
||||
---------
|
||||
3. WIRING
|
||||
---------
|
||||
|
||||
The driver supports data parallel port wiring.
|
||||
|
||||
If you aren't building LCD related hardware, you should check
|
||||
your LCD specific wiring information in the same folder.
|
||||
|
||||
For example, check Documentation/auxdisplay/cfag12864b.
|
@ -93,7 +93,7 @@ Notes
|
||||
Using the pktcdvd sysfs interface
|
||||
---------------------------------
|
||||
|
||||
Since Linux 2.6.19, the pktcdvd module has a sysfs interface
|
||||
Since Linux 2.6.20, the pktcdvd module has a sysfs interface
|
||||
and can be controlled by it. For example the "pktcdvd" tool uses
|
||||
this interface. (see http://people.freenet.de/BalaGi#pktcdvd )
|
||||
|
||||
|
@ -193,6 +193,7 @@ Original developers of the crypto algorithms:
|
||||
Kartikey Mahendra Bhatt (CAST6)
|
||||
Jon Oberheide (ARC4)
|
||||
Jouni Malinen (Michael MIC)
|
||||
NTT(Nippon Telegraph and Telephone Corporation) (Camellia)
|
||||
|
||||
SHA1 algorithm contributors:
|
||||
Jean-Francois Dive
|
||||
@ -246,6 +247,9 @@ Tiger algorithm contributors:
|
||||
VIA PadLock contributors:
|
||||
Michal Ludvig
|
||||
|
||||
Camellia algorithm contributors:
|
||||
NTT(Nippon Telegraph and Telephone Corporation) (Camellia)
|
||||
|
||||
Generic scatterwalk code by Adam J. Richter <adam@yggdrasil.com>
|
||||
|
||||
Please send any credits updates or corrections to:
|
||||
|
268
Documentation/driver-model/devres.txt
Normal file
268
Documentation/driver-model/devres.txt
Normal file
@ -0,0 +1,268 @@
|
||||
Devres - Managed Device Resource
|
||||
================================
|
||||
|
||||
Tejun Heo <teheo@suse.de>
|
||||
|
||||
First draft 10 January 2007
|
||||
|
||||
|
||||
1. Intro : Huh? Devres?
|
||||
2. Devres : Devres in a nutshell
|
||||
3. Devres Group : Group devres'es and release them together
|
||||
4. Details : Life time rules, calling context, ...
|
||||
5. Overhead : How much do we have to pay for this?
|
||||
6. List of managed interfaces : Currently implemented managed interfaces
|
||||
|
||||
|
||||
1. Intro
|
||||
--------
|
||||
|
||||
devres came up while trying to convert libata to use iomap. Each
|
||||
iomapped address should be kept and unmapped on driver detach. For
|
||||
example, a plain SFF ATA controller (that is, good old PCI IDE) in
|
||||
native mode makes use of 5 PCI BARs and all of them should be
|
||||
maintained.
|
||||
|
||||
As with many other device drivers, libata low level drivers have
|
||||
sufficient bugs in ->remove and ->probe failure path. Well, yes,
|
||||
that's probably because libata low level driver developers are lazy
|
||||
bunch, but aren't all low level driver developers? After spending a
|
||||
day fiddling with braindamaged hardware with no document or
|
||||
braindamaged document, if it's finally working, well, it's working.
|
||||
|
||||
For one reason or another, low level drivers don't receive as much
|
||||
attention or testing as core code, and bugs on driver detach or
|
||||
initilaization failure doesn't happen often enough to be noticeable.
|
||||
Init failure path is worse because it's much less travelled while
|
||||
needs to handle multiple entry points.
|
||||
|
||||
So, many low level drivers end up leaking resources on driver detach
|
||||
and having half broken failure path implementation in ->probe() which
|
||||
would leak resources or even cause oops when failure occurs. iomap
|
||||
adds more to this mix. So do msi and msix.
|
||||
|
||||
|
||||
2. Devres
|
||||
---------
|
||||
|
||||
devres is basically linked list of arbitrarily sized memory areas
|
||||
associated with a struct device. Each devres entry is associated with
|
||||
a release function. A devres can be released in several ways. No
|
||||
matter what, all devres entries are released on driver detach. On
|
||||
release, the associated release function is invoked and then the
|
||||
devres entry is freed.
|
||||
|
||||
Managed interface is created for resources commonly used by device
|
||||
drivers using devres. For example, coherent DMA memory is acquired
|
||||
using dma_alloc_coherent(). The managed version is called
|
||||
dmam_alloc_coherent(). It is identical to dma_alloc_coherent() except
|
||||
for the DMA memory allocated using it is managed and will be
|
||||
automatically released on driver detach. Implementation looks like
|
||||
the following.
|
||||
|
||||
struct dma_devres {
|
||||
size_t size;
|
||||
void *vaddr;
|
||||
dma_addr_t dma_handle;
|
||||
};
|
||||
|
||||
static void dmam_coherent_release(struct device *dev, void *res)
|
||||
{
|
||||
struct dma_devres *this = res;
|
||||
|
||||
dma_free_coherent(dev, this->size, this->vaddr, this->dma_handle);
|
||||
}
|
||||
|
||||
dmam_alloc_coherent(dev, size, dma_handle, gfp)
|
||||
{
|
||||
struct dma_devres *dr;
|
||||
void *vaddr;
|
||||
|
||||
dr = devres_alloc(dmam_coherent_release, sizeof(*dr), gfp);
|
||||
...
|
||||
|
||||
/* alloc DMA memory as usual */
|
||||
vaddr = dma_alloc_coherent(...);
|
||||
...
|
||||
|
||||
/* record size, vaddr, dma_handle in dr */
|
||||
dr->vaddr = vaddr;
|
||||
...
|
||||
|
||||
devres_add(dev, dr);
|
||||
|
||||
return vaddr;
|
||||
}
|
||||
|
||||
If a driver uses dmam_alloc_coherent(), the area is guaranteed to be
|
||||
freed whether initialization fails half-way or the device gets
|
||||
detached. If most resources are acquired using managed interface, a
|
||||
driver can have much simpler init and exit code. Init path basically
|
||||
looks like the following.
|
||||
|
||||
my_init_one()
|
||||
{
|
||||
struct mydev *d;
|
||||
|
||||
d = devm_kzalloc(dev, sizeof(*d), GFP_KERNEL);
|
||||
if (!d)
|
||||
return -ENOMEM;
|
||||
|
||||
d->ring = dmam_alloc_coherent(...);
|
||||
if (!d->ring)
|
||||
return -ENOMEM;
|
||||
|
||||
if (check something)
|
||||
return -EINVAL;
|
||||
...
|
||||
|
||||
return register_to_upper_layer(d);
|
||||
}
|
||||
|
||||
And exit path,
|
||||
|
||||
my_remove_one()
|
||||
{
|
||||
unregister_from_upper_layer(d);
|
||||
shutdown_my_hardware();
|
||||
}
|
||||
|
||||
As shown above, low level drivers can be simplified a lot by using
|
||||
devres. Complexity is shifted from less maintained low level drivers
|
||||
to better maintained higher layer. Also, as init failure path is
|
||||
shared with exit path, both can get more testing.
|
||||
|
||||
|
||||
3. Devres group
|
||||
---------------
|
||||
|
||||
Devres entries can be grouped using devres group. When a group is
|
||||
released, all contained normal devres entries and properly nested
|
||||
groups are released. One usage is to rollback series of acquired
|
||||
resources on failure. For example,
|
||||
|
||||
if (!devres_open_group(dev, NULL, GFP_KERNEL))
|
||||
return -ENOMEM;
|
||||
|
||||
acquire A;
|
||||
if (failed)
|
||||
goto err;
|
||||
|
||||
acquire B;
|
||||
if (failed)
|
||||
goto err;
|
||||
...
|
||||
|
||||
devres_remove_group(dev, NULL);
|
||||
return 0;
|
||||
|
||||
err:
|
||||
devres_release_group(dev, NULL);
|
||||
return err_code;
|
||||
|
||||
As resource acquision failure usually means probe failure, constructs
|
||||
like above are usually useful in midlayer driver (e.g. libata core
|
||||
layer) where interface function shouldn't have side effect on failure.
|
||||
For LLDs, just returning error code suffices in most cases.
|
||||
|
||||
Each group is identified by void *id. It can either be explicitly
|
||||
specified by @id argument to devres_open_group() or automatically
|
||||
created by passing NULL as @id as in the above example. In both
|
||||
cases, devres_open_group() returns the group's id. The returned id
|
||||
can be passed to other devres functions to select the target group.
|
||||
If NULL is given to those functions, the latest open group is
|
||||
selected.
|
||||
|
||||
For example, you can do something like the following.
|
||||
|
||||
int my_midlayer_create_something()
|
||||
{
|
||||
if (!devres_open_group(dev, my_midlayer_create_something, GFP_KERNEL))
|
||||
return -ENOMEM;
|
||||
|
||||
...
|
||||
|
||||
devres_close_group(dev, my_midlayer_something);
|
||||
return 0;
|
||||
}
|
||||
|
||||
void my_midlayer_destroy_something()
|
||||
{
|
||||
devres_release_group(dev, my_midlayer_create_soemthing);
|
||||
}
|
||||
|
||||
|
||||
4. Details
|
||||
----------
|
||||
|
||||
Lifetime of a devres entry begins on devres allocation and finishes
|
||||
when it is released or destroyed (removed and freed) - no reference
|
||||
counting.
|
||||
|
||||
devres core guarantees atomicity to all basic devres operations and
|
||||
has support for single-instance devres types (atomic
|
||||
lookup-and-add-if-not-found). Other than that, synchronizing
|
||||
concurrent accesses to allocated devres data is caller's
|
||||
responsibility. This is usually non-issue because bus ops and
|
||||
resource allocations already do the job.
|
||||
|
||||
For an example of single-instance devres type, read pcim_iomap_table()
|
||||
in lib/iomap.c.
|
||||
|
||||
All devres interface functions can be called without context if the
|
||||
right gfp mask is given.
|
||||
|
||||
|
||||
5. Overhead
|
||||
-----------
|
||||
|
||||
Each devres bookkeeping info is allocated together with requested data
|
||||
area. With debug option turned off, bookkeeping info occupies 16
|
||||
bytes on 32bit machines and 24 bytes on 64bit (three pointers rounded
|
||||
up to ull alignment). If singly linked list is used, it can be
|
||||
reduced to two pointers (8 bytes on 32bit, 16 bytes on 64bit).
|
||||
|
||||
Each devres group occupies 8 pointers. It can be reduced to 6 if
|
||||
singly linked list is used.
|
||||
|
||||
Memory space overhead on ahci controller with two ports is between 300
|
||||
and 400 bytes on 32bit machine after naive conversion (we can
|
||||
certainly invest a bit more effort into libata core layer).
|
||||
|
||||
|
||||
6. List of managed interfaces
|
||||
-----------------------------
|
||||
|
||||
IO region
|
||||
devm_request_region()
|
||||
devm_request_mem_region()
|
||||
devm_release_region()
|
||||
devm_release_mem_region()
|
||||
|
||||
IRQ
|
||||
devm_request_irq()
|
||||
devm_free_irq()
|
||||
|
||||
DMA
|
||||
dmam_alloc_coherent()
|
||||
dmam_free_coherent()
|
||||
dmam_alloc_noncoherent()
|
||||
dmam_free_noncoherent()
|
||||
dmam_declare_coherent_memory()
|
||||
dmam_pool_create()
|
||||
dmam_pool_destroy()
|
||||
|
||||
PCI
|
||||
pcim_enable_device() : after success, all PCI ops become managed
|
||||
pcim_pin_device() : keep PCI device enabled after release
|
||||
|
||||
IOMAP
|
||||
devm_ioport_map()
|
||||
devm_ioport_unmap()
|
||||
devm_ioremap()
|
||||
devm_ioremap_nocache()
|
||||
devm_iounmap()
|
||||
pcim_iomap()
|
||||
pcim_iounmap()
|
||||
pcim_iomap_table() : array of mapped addresses indexed by BAR
|
||||
pcim_iomap_regions() : do request_region() and iomap() on multiple BARs
|
@ -66,7 +66,7 @@ runtime memory footprint:
|
||||
|
||||
Device Enumeration
|
||||
~~~~~~~~~~~~~~~~~~
|
||||
As a rule, platform specific (and often board-specific) setup code wil
|
||||
As a rule, platform specific (and often board-specific) setup code will
|
||||
register platform devices:
|
||||
|
||||
int platform_device_register(struct platform_device *pdev);
|
||||
@ -106,7 +106,7 @@ It's built from two components:
|
||||
* platform_device.id ... the device instance number, or else "-1"
|
||||
to indicate there's only one.
|
||||
|
||||
These are catenated, so name/id "serial"/0 indicates bus_id "serial.0", and
|
||||
These are concatenated, so name/id "serial"/0 indicates bus_id "serial.0", and
|
||||
"serial/3" indicates bus_id "serial.3"; both would use the platform_driver
|
||||
named "serial". While "my_rtc"/-1 would be bus_id "my_rtc" (no instance id)
|
||||
and use the platform_driver called "my_rtc".
|
||||
|
@ -339,7 +339,21 @@ Device Symlink:
|
||||
|
||||
'device'
|
||||
|
||||
Symlink to the memory controller device
|
||||
Symlink to the memory controller device.
|
||||
|
||||
Sdram memory scrubbing rate:
|
||||
|
||||
'sdram_scrub_rate'
|
||||
|
||||
Read/Write attribute file that controls memory scrubbing. The scrubbing
|
||||
rate is set by writing a minimum bandwith in bytes/sec to the attribute
|
||||
file. The rate will be translated to an internal value that gives at
|
||||
least the specified rate.
|
||||
|
||||
Reading the file will return the actual scrubbing rate employed.
|
||||
|
||||
If configuration fails or memory scrubbing is not implemented, the value
|
||||
of the attribute file will be -1.
|
||||
|
||||
|
||||
|
||||
|
78
Documentation/fb/s3fb.txt
Normal file
78
Documentation/fb/s3fb.txt
Normal file
@ -0,0 +1,78 @@
|
||||
|
||||
s3fb - fbdev driver for S3 Trio/Virge chips
|
||||
===========================================
|
||||
|
||||
|
||||
Supported Hardware
|
||||
==================
|
||||
|
||||
S3 Trio32
|
||||
S3 Trio64 (and variants V+, UV+, V2/DX, V2/GX)
|
||||
S3 Virge (and variants VX, DX, GX and GX2+)
|
||||
S3 Plato/PX (completely untested)
|
||||
S3 Aurora64V+ (completely untested)
|
||||
|
||||
- only PCI bus supported
|
||||
- only BIOS initialized VGA devices supported
|
||||
- probably not working on big endian
|
||||
|
||||
I tested s3fb on Trio64 (plain, V+ and V2/DX) and Virge (plain, VX, DX),
|
||||
all on i386.
|
||||
|
||||
|
||||
Supported Features
|
||||
==================
|
||||
|
||||
* 4 bpp pseudocolor modes (with 18bit palette, two variants)
|
||||
* 8 bpp pseudocolor mode (with 18bit palette)
|
||||
* 16 bpp truecolor modes (RGB 555 and RGB 565)
|
||||
* 24 bpp truecolor mode (RGB 888) on (only on Virge VX)
|
||||
* 32 bpp truecolor mode (RGB 888) on (not on Virge VX)
|
||||
* text mode (activated by bpp = 0)
|
||||
* interlaced mode variant (not available in text mode)
|
||||
* doublescan mode variant (not available in text mode)
|
||||
* panning in both directions
|
||||
* suspend/resume support
|
||||
* DPMS support
|
||||
|
||||
Text mode is supported even in higher resolutions, but there is limitation
|
||||
to lower pixclocks (maximum between 50-60 MHz, depending on specific hardware).
|
||||
This limitation is not enforced by driver. Text mode supports 8bit wide fonts
|
||||
only (hardware limitation) and 16bit tall fonts (driver limitation).
|
||||
|
||||
There are two 4 bpp modes. First mode (selected if nonstd == 0) is mode with
|
||||
packed pixels, high nibble first. Second mode (selected if nonstd == 1) is mode
|
||||
with interleaved planes (1 byte interleave), MSB first. Both modes support
|
||||
8bit wide fonts only (driver limitation).
|
||||
|
||||
Suspend/resume works on systems that initialize video card during resume and
|
||||
if device is active (for example used by fbcon).
|
||||
|
||||
|
||||
Missing Features
|
||||
================
|
||||
(alias TODO list)
|
||||
|
||||
* secondary (not initialized by BIOS) device support
|
||||
* big endian support
|
||||
* Zorro bus support
|
||||
* MMIO support
|
||||
* 24 bpp mode support on more cards
|
||||
* support for fontwidths != 8 in 4 bpp modes
|
||||
* support for fontheight != 16 in text mode
|
||||
* composite and external sync (is anyone able to test this?)
|
||||
* hardware cursor
|
||||
* video overlay support
|
||||
* vsync synchronization
|
||||
* feature connector support
|
||||
* acceleration support (8514-like 2D, Virge 3D, busmaster transfers)
|
||||
* better values for some magic registers (performance issues)
|
||||
|
||||
|
||||
Known bugs
|
||||
==========
|
||||
|
||||
* cursor disable in text mode doesn't work
|
||||
|
||||
--
|
||||
Ondrej Zajicek <santiago@crfreenet.org>
|
@ -50,22 +50,6 @@ Who: Dan Dennedy <dan@dennedy.org>, Stefan Richter <stefanr@s5r6.in-berlin.de>
|
||||
|
||||
---------------------------
|
||||
|
||||
What: ieee1394 core's unused exports (CONFIG_IEEE1394_EXPORT_FULL_API)
|
||||
When: January 2007
|
||||
Why: There are no projects known to use these exported symbols, except
|
||||
dfg1394 (uses one symbol whose functionality is core-internal now).
|
||||
Who: Stefan Richter <stefanr@s5r6.in-berlin.de>
|
||||
|
||||
---------------------------
|
||||
|
||||
What: ieee1394's *_oui sysfs attributes (CONFIG_IEEE1394_OUI_DB)
|
||||
When: January 2007
|
||||
Files: drivers/ieee1394/: oui.db, oui2c.sh
|
||||
Why: big size, little value
|
||||
Who: Stefan Richter <stefanr@s5r6.in-berlin.de>
|
||||
|
||||
---------------------------
|
||||
|
||||
What: Video4Linux API 1 ioctls and video_decoder.h from Video devices.
|
||||
When: December 2006
|
||||
Why: V4L1 AP1 was replaced by V4L2 API. during migration from 2.4 to 2.6
|
||||
@ -186,18 +170,6 @@ Who: Greg Kroah-Hartman <gregkh@suse.de>
|
||||
|
||||
---------------------------
|
||||
|
||||
What: find_trylock_page
|
||||
When: January 2007
|
||||
Why: The interface no longer has any callers left in the kernel. It
|
||||
is an odd interface (compared with other find_*_page functions), in
|
||||
that it does not take a refcount to the page, only the page lock.
|
||||
It should be replaced with find_get_page or find_lock_page if possible.
|
||||
This feature removal can be reevaluated if users of the interface
|
||||
cannot cleanly use something else.
|
||||
Who: Nick Piggin <npiggin@suse.de>
|
||||
|
||||
---------------------------
|
||||
|
||||
What: Interrupt only SA_* flags
|
||||
When: Januar 2007
|
||||
Why: The interrupt related SA_* flags are replaced by IRQF_* to move them
|
||||
@ -243,6 +215,13 @@ Who: Jean Delvare <khali@linux-fr.org>,
|
||||
|
||||
---------------------------
|
||||
|
||||
What: drivers depending on OBSOLETE_OSS
|
||||
When: options in 2.6.22, code in 2.6.24
|
||||
Why: OSS drivers with ALSA replacements
|
||||
Who: Adrian Bunk <bunk@stusta.de>
|
||||
|
||||
---------------------------
|
||||
|
||||
What: IPv4 only connection tracking/NAT/helpers
|
||||
When: 2.6.22
|
||||
Why: The new layer 3 independant connection tracking replaces the old
|
||||
@ -274,28 +253,6 @@ Who: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
|
||||
|
||||
---------------------------
|
||||
|
||||
What: ACPI hotkey driver (CONFIG_ACPI_HOTKEY)
|
||||
When: 2.6.21
|
||||
Why: hotkey.c was an attempt to consolidate multiple drivers that use
|
||||
ACPI to implement hotkeys. However, hotkeys are not documented
|
||||
in the ACPI specification, so the drivers used undocumented
|
||||
vendor-specific hooks and turned out to be more different than
|
||||
the same.
|
||||
|
||||
Further, the keys and the features supplied by each platform
|
||||
are different, so there will always be a need for
|
||||
platform-specific drivers.
|
||||
|
||||
So the new plan is to delete hotkey.c and instead, work on the
|
||||
platform specific drivers to try to make them look the same
|
||||
to the user when they supply the same features.
|
||||
|
||||
hotkey.c has always depended on CONFIG_EXPERIMENTAL
|
||||
|
||||
Who: Len Brown <len.brown@intel.com>
|
||||
|
||||
---------------------------
|
||||
|
||||
What: /sys/firmware/acpi/namespace
|
||||
When: 2.6.21
|
||||
Why: The ACPI namespace is effectively the symbol list for
|
||||
@ -306,11 +263,18 @@ Why: The ACPI namespace is effectively the symbol list for
|
||||
the BIOS can be extracted and disassembled with acpidump
|
||||
and iasl as documented in the pmtools package here:
|
||||
http://ftp.kernel.org/pub/linux/kernel/people/lenb/acpi/utils
|
||||
|
||||
Who: Len Brown <len.brown@intel.com>
|
||||
|
||||
---------------------------
|
||||
|
||||
What: ACPI procfs interface
|
||||
When: July 2007
|
||||
Why: After ACPI sysfs conversion, ACPI attributes will be duplicated
|
||||
in sysfs and the ACPI procfs interface should be removed.
|
||||
Who: Zhang Rui <rui.zhang@intel.com>
|
||||
|
||||
---------------------------
|
||||
|
||||
What: /proc/acpi/button
|
||||
When: August 2007
|
||||
Why: /proc/acpi/button has been replaced by events to the input layer
|
||||
@ -319,9 +283,24 @@ Who: Len Brown <len.brown@intel.com>
|
||||
|
||||
---------------------------
|
||||
|
||||
What: JFFS (version 1)
|
||||
When: 2.6.21
|
||||
Why: Unmaintained for years, superceded by JFFS2 for years.
|
||||
Who: Jeff Garzik <jeff@garzik.org>
|
||||
What: sk98lin network driver
|
||||
When: July 2007
|
||||
Why: In kernel tree version of driver is unmaintained. Sk98lin driver
|
||||
replaced by the skge driver.
|
||||
Who: Stephen Hemminger <shemminger@osdl.org>
|
||||
|
||||
---------------------------
|
||||
|
||||
What: Compaq touchscreen device emulation
|
||||
When: Oct 2007
|
||||
Files: drivers/input/tsdev.c
|
||||
Why: The code says it was obsolete when it was written in 2001.
|
||||
tslib is a userspace library which does anything tsdev can do and
|
||||
much more besides in userspace where this code belongs. There is no
|
||||
longer any need for tsdev and applications should have converted to
|
||||
use tslib by now.
|
||||
The name "tsdev" is also extremely confusing and lots of people have
|
||||
it loaded when they don't need/use it.
|
||||
Who: Richard Purdie <rpurdie@rpsys.net>
|
||||
|
||||
---------------------------
|
||||
|
@ -4,6 +4,8 @@ Exporting
|
||||
- explanation of how to make filesystems exportable.
|
||||
Locking
|
||||
- info on locking rules as they pertain to Linux VFS.
|
||||
9p.txt
|
||||
- 9p (v9fs) is an implementation of the Plan 9 remote fs protocol.
|
||||
adfs.txt
|
||||
- info and mount options for the Acorn Advanced Disc Filing System.
|
||||
afs.txt
|
||||
@ -82,8 +84,6 @@ udf.txt
|
||||
- info and mount options for the UDF filesystem.
|
||||
ufs.txt
|
||||
- info on the ufs filesystem.
|
||||
v9fs.txt
|
||||
- v9fs is a Unix implementation of the Plan 9 9p remote fs protocol.
|
||||
vfat.txt
|
||||
- info on using the VFAT filesystem used in Windows NT and Windows 95
|
||||
vfs.txt
|
||||
|
@ -40,6 +40,10 @@ OPTIONS
|
||||
aname=name aname specifies the file tree to access when the server is
|
||||
offering several exported file systems.
|
||||
|
||||
cache=mode specifies a cacheing policy. By default, no caches are used.
|
||||
loose = no attempts are made at consistency,
|
||||
intended for exclusive, read-only mounts
|
||||
|
||||
debug=n specifies debug level. The debug level is a bitmask.
|
||||
0x01 = display verbose error messages
|
||||
0x02 = developer debug (DEBUG_CURRENT)
|
||||
|
@ -157,7 +157,7 @@ TBD(curr. line MT:/API/)
|
||||
channel management functions:
|
||||
|
||||
relay_open(base_filename, parent, subbuf_size, n_subbufs,
|
||||
callbacks)
|
||||
callbacks, private_data)
|
||||
relay_close(chan)
|
||||
relay_flush(chan)
|
||||
relay_reset(chan)
|
||||
@ -251,7 +251,7 @@ static struct rchan_callbacks relay_callbacks =
|
||||
|
||||
And an example relay_open() invocation using them:
|
||||
|
||||
chan = relay_open("cpu", NULL, SUBBUF_SIZE, N_SUBBUFS, &relay_callbacks);
|
||||
chan = relay_open("cpu", NULL, SUBBUF_SIZE, N_SUBBUFS, &relay_callbacks, NULL);
|
||||
|
||||
If the create_buf_file() callback fails, or isn't defined, channel
|
||||
creation and thus relay_open() will fail.
|
||||
@ -289,6 +289,11 @@ they use the proper locking for such a buffer, either by wrapping
|
||||
writes in a spinlock, or by copying a write function from relay.h and
|
||||
creating a local version that internally does the proper locking.
|
||||
|
||||
The private_data passed into relay_open() allows clients to associate
|
||||
user-defined data with a channel, and is immediately available
|
||||
(including in create_buf_file()) via chan->private_data or
|
||||
buf->chan->private_data.
|
||||
|
||||
Channel 'modes'
|
||||
---------------
|
||||
|
||||
|
@ -65,7 +65,7 @@ Accessing legacy resources through sysfs
|
||||
----------------------------------------
|
||||
|
||||
Legacy I/O port and ISA memory resources are also provided in sysfs if the
|
||||
underlying platform supports them. They're located in the PCI class heirarchy,
|
||||
underlying platform supports them. They're located in the PCI class hierarchy,
|
||||
e.g.
|
||||
|
||||
/sys/class/pci_bus/0000:17/
|
||||
|
@ -21,7 +21,7 @@ ufstype=type_of_ufs
|
||||
supported as read-write
|
||||
|
||||
ufs2 used in FreeBSD 5.x
|
||||
supported as read-only
|
||||
supported as read-write
|
||||
|
||||
5xbsd synonym for ufs2
|
||||
|
||||
@ -50,12 +50,11 @@ ufstype=type_of_ufs
|
||||
POSSIBLE PROBLEMS
|
||||
=================
|
||||
|
||||
There is still bug in reallocation of fragment, in file fs/ufs/balloc.c,
|
||||
line 364. But it seems working on current buffer cache configuration.
|
||||
See next section, if you have any.
|
||||
|
||||
|
||||
BUG REPORTS
|
||||
===========
|
||||
|
||||
Any ufs bug report you can send to daniel.pirkl@email.cz (do not send
|
||||
partition tables bug reports.)
|
||||
Any ufs bug report you can send to daniel.pirkl@email.cz or
|
||||
to dushistov@mail.ru (do not send partition tables bug reports).
|
||||
|
274
Documentation/gpio.txt
Normal file
274
Documentation/gpio.txt
Normal file
@ -0,0 +1,274 @@
|
||||
GPIO Interfaces
|
||||
|
||||
This provides an overview of GPIO access conventions on Linux.
|
||||
|
||||
|
||||
What is a GPIO?
|
||||
===============
|
||||
A "General Purpose Input/Output" (GPIO) is a flexible software-controlled
|
||||
digital signal. They are provided from many kinds of chip, and are familiar
|
||||
to Linux developers working with embedded and custom hardware. Each GPIO
|
||||
represents a bit connected to a particular pin, or "ball" on Ball Grid Array
|
||||
(BGA) packages. Board schematics show which external hardware connects to
|
||||
which GPIOs. Drivers can be written generically, so that board setup code
|
||||
passes such pin configuration data to drivers.
|
||||
|
||||
System-on-Chip (SOC) processors heavily rely on GPIOs. In some cases, every
|
||||
non-dedicated pin can be configured as a GPIO; and most chips have at least
|
||||
several dozen of them. Programmable logic devices (like FPGAs) can easily
|
||||
provide GPIOs; multifunction chips like power managers, and audio codecs
|
||||
often have a few such pins to help with pin scarcity on SOCs; and there are
|
||||
also "GPIO Expander" chips that connect using the I2C or SPI serial busses.
|
||||
Most PC southbridges have a few dozen GPIO-capable pins (with only the BIOS
|
||||
firmware knowing how they're used).
|
||||
|
||||
The exact capabilities of GPIOs vary between systems. Common options:
|
||||
|
||||
- Output values are writable (high=1, low=0). Some chips also have
|
||||
options about how that value is driven, so that for example only one
|
||||
value might be driven ... supporting "wire-OR" and similar schemes
|
||||
for the other value.
|
||||
|
||||
- Input values are likewise readable (1, 0). Some chips support readback
|
||||
of pins configured as "output", which is very useful in such "wire-OR"
|
||||
cases (to support bidirectional signaling). GPIO controllers may have
|
||||
input de-glitch logic, sometimes with software controls.
|
||||
|
||||
- Inputs can often be used as IRQ signals, often edge triggered but
|
||||
sometimes level triggered. Such IRQs may be configurable as system
|
||||
wakeup events, to wake the system from a low power state.
|
||||
|
||||
- Usually a GPIO will be configurable as either input or output, as needed
|
||||
by different product boards; single direction ones exist too.
|
||||
|
||||
- Most GPIOs can be accessed while holding spinlocks, but those accessed
|
||||
through a serial bus normally can't. Some systems support both types.
|
||||
|
||||
On a given board each GPIO is used for one specific purpose like monitoring
|
||||
MMC/SD card insertion/removal, detecting card writeprotect status, driving
|
||||
a LED, configuring a transceiver, bitbanging a serial bus, poking a hardware
|
||||
watchdog, sensing a switch, and so on.
|
||||
|
||||
|
||||
GPIO conventions
|
||||
================
|
||||
Note that this is called a "convention" because you don't need to do it this
|
||||
way, and it's no crime if you don't. There **are** cases where portability
|
||||
is not the main issue; GPIOs are often used for the kind of board-specific
|
||||
glue logic that may even change between board revisions, and can't ever be
|
||||
used on a board that's wired differently. Only least-common-denominator
|
||||
functionality can be very portable. Other features are platform-specific,
|
||||
and that can be critical for glue logic.
|
||||
|
||||
Plus, this doesn't define an implementation framework, just an interface.
|
||||
One platform might implement it as simple inline functions accessing chip
|
||||
registers; another might implement it by delegating through abstractions
|
||||
used for several very different kinds of GPIO controller.
|
||||
|
||||
That said, if the convention is supported on their platform, drivers should
|
||||
use it when possible:
|
||||
|
||||
#include <asm/gpio.h>
|
||||
|
||||
If you stick to this convention then it'll be easier for other developers to
|
||||
see what your code is doing, and help maintain it.
|
||||
|
||||
|
||||
Identifying GPIOs
|
||||
-----------------
|
||||
GPIOs are identified by unsigned integers in the range 0..MAX_INT. That
|
||||
reserves "negative" numbers for other purposes like marking signals as
|
||||
"not available on this board", or indicating faults. Code that doesn't
|
||||
touch the underlying hardware treats these integers as opaque cookies.
|
||||
|
||||
Platforms define how they use those integers, and usually #define symbols
|
||||
for the GPIO lines so that board-specific setup code directly corresponds
|
||||
to the relevant schematics. In contrast, drivers should only use GPIO
|
||||
numbers passed to them from that setup code, using platform_data to hold
|
||||
board-specific pin configuration data (along with other board specific
|
||||
data they need). That avoids portability problems.
|
||||
|
||||
So for example one platform uses numbers 32-159 for GPIOs; while another
|
||||
uses numbers 0..63 with one set of GPIO controllers, 64-79 with another
|
||||
type of GPIO controller, and on one particular board 80-95 with an FPGA.
|
||||
The numbers need not be contiguous; either of those platforms could also
|
||||
use numbers 2000-2063 to identify GPIOs in a bank of I2C GPIO expanders.
|
||||
|
||||
Whether a platform supports multiple GPIO controllers is currently a
|
||||
platform-specific implementation issue.
|
||||
|
||||
|
||||
Using GPIOs
|
||||
-----------
|
||||
One of the first things to do with a GPIO, often in board setup code when
|
||||
setting up a platform_device using the GPIO, is mark its direction:
|
||||
|
||||
/* set as input or output, returning 0 or negative errno */
|
||||
int gpio_direction_input(unsigned gpio);
|
||||
int gpio_direction_output(unsigned gpio);
|
||||
|
||||
The return value is zero for success, else a negative errno. It should
|
||||
be checked, since the get/set calls don't have error returns and since
|
||||
misconfiguration is possible. (These calls could sleep.)
|
||||
|
||||
Setting the direction can fail if the GPIO number is invalid, or when
|
||||
that particular GPIO can't be used in that mode. It's generally a bad
|
||||
idea to rely on boot firmware to have set the direction correctly, since
|
||||
it probably wasn't validated to do more than boot Linux. (Similarly,
|
||||
that board setup code probably needs to multiplex that pin as a GPIO,
|
||||
and configure pullups/pulldowns appropriately.)
|
||||
|
||||
|
||||
Spinlock-Safe GPIO access
|
||||
-------------------------
|
||||
Most GPIO controllers can be accessed with memory read/write instructions.
|
||||
That doesn't need to sleep, and can safely be done from inside IRQ handlers.
|
||||
|
||||
Use these calls to access such GPIOs:
|
||||
|
||||
/* GPIO INPUT: return zero or nonzero */
|
||||
int gpio_get_value(unsigned gpio);
|
||||
|
||||
/* GPIO OUTPUT */
|
||||
void gpio_set_value(unsigned gpio, int value);
|
||||
|
||||
The values are boolean, zero for low, nonzero for high. When reading the
|
||||
value of an output pin, the value returned should be what's seen on the
|
||||
pin ... that won't always match the specified output value, because of
|
||||
issues including wire-OR and output latencies.
|
||||
|
||||
The get/set calls have no error returns because "invalid GPIO" should have
|
||||
been reported earlier in gpio_set_direction(). However, note that not all
|
||||
platforms can read the value of output pins; those that can't should always
|
||||
return zero. Also, using these calls for GPIOs that can't safely be accessed
|
||||
without sleeping (see below) is an error.
|
||||
|
||||
Platform-specific implementations are encouraged to optimize the two
|
||||
calls to access the GPIO value in cases where the GPIO number (and for
|
||||
output, value) are constant. It's normal for them to need only a couple
|
||||
of instructions in such cases (reading or writing a hardware register),
|
||||
and not to need spinlocks. Such optimized calls can make bitbanging
|
||||
applications a lot more efficient (in both space and time) than spending
|
||||
dozens of instructions on subroutine calls.
|
||||
|
||||
|
||||
GPIO access that may sleep
|
||||
--------------------------
|
||||
Some GPIO controllers must be accessed using message based busses like I2C
|
||||
or SPI. Commands to read or write those GPIO values require waiting to
|
||||
get to the head of a queue to transmit a command and get its response.
|
||||
This requires sleeping, which can't be done from inside IRQ handlers.
|
||||
|
||||
Platforms that support this type of GPIO distinguish them from other GPIOs
|
||||
by returning nonzero from this call:
|
||||
|
||||
int gpio_cansleep(unsigned gpio);
|
||||
|
||||
To access such GPIOs, a different set of accessors is defined:
|
||||
|
||||
/* GPIO INPUT: return zero or nonzero, might sleep */
|
||||
int gpio_get_value_cansleep(unsigned gpio);
|
||||
|
||||
/* GPIO OUTPUT, might sleep */
|
||||
void gpio_set_value_cansleep(unsigned gpio, int value);
|
||||
|
||||
Other than the fact that these calls might sleep, and will not be ignored
|
||||
for GPIOs that can't be accessed from IRQ handlers, these calls act the
|
||||
same as the spinlock-safe calls.
|
||||
|
||||
|
||||
Claiming and Releasing GPIOs (OPTIONAL)
|
||||
---------------------------------------
|
||||
To help catch system configuration errors, two calls are defined.
|
||||
However, many platforms don't currently support this mechanism.
|
||||
|
||||
/* request GPIO, returning 0 or negative errno.
|
||||
* non-null labels may be useful for diagnostics.
|
||||
*/
|
||||
int gpio_request(unsigned gpio, const char *label);
|
||||
|
||||
/* release previously-claimed GPIO */
|
||||
void gpio_free(unsigned gpio);
|
||||
|
||||
Passing invalid GPIO numbers to gpio_request() will fail, as will requesting
|
||||
GPIOs that have already been claimed with that call. The return value of
|
||||
gpio_request() must be checked. (These calls could sleep.)
|
||||
|
||||
These calls serve two basic purposes. One is marking the signals which
|
||||
are actually in use as GPIOs, for better diagnostics; systems may have
|
||||
several hundred potential GPIOs, but often only a dozen are used on any
|
||||
given board. Another is to catch conflicts between drivers, reporting
|
||||
errors when drivers wrongly think they have exclusive use of that signal.
|
||||
|
||||
These two calls are optional because not not all current Linux platforms
|
||||
offer such functionality in their GPIO support; a valid implementation
|
||||
could return success for all gpio_request() calls. Unlike the other calls,
|
||||
the state they represent doesn't normally match anything from a hardware
|
||||
register; it's just a software bitmap which clearly is not necessary for
|
||||
correct operation of hardware or (bug free) drivers.
|
||||
|
||||
Note that requesting a GPIO does NOT cause it to be configured in any
|
||||
way; it just marks that GPIO as in use. Separate code must handle any
|
||||
pin setup (e.g. controlling which pin the GPIO uses, pullup/pulldown).
|
||||
|
||||
|
||||
GPIOs mapped to IRQs
|
||||
--------------------
|
||||
GPIO numbers are unsigned integers; so are IRQ numbers. These make up
|
||||
two logically distinct namespaces (GPIO 0 need not use IRQ 0). You can
|
||||
map between them using calls like:
|
||||
|
||||
/* map GPIO numbers to IRQ numbers */
|
||||
int gpio_to_irq(unsigned gpio);
|
||||
|
||||
/* map IRQ numbers to GPIO numbers */
|
||||
int irq_to_gpio(unsigned irq);
|
||||
|
||||
Those return either the corresponding number in the other namespace, or
|
||||
else a negative errno code if the mapping can't be done. (For example,
|
||||
some GPIOs can't used as IRQs.) It is an unchecked error to use a GPIO
|
||||
number that hasn't been marked as an input using gpio_set_direction(), or
|
||||
to use an IRQ number that didn't originally come from gpio_to_irq().
|
||||
|
||||
These two mapping calls are expected to cost on the order of a single
|
||||
addition or subtraction. They're not allowed to sleep.
|
||||
|
||||
Non-error values returned from gpio_to_irq() can be passed to request_irq()
|
||||
or free_irq(). They will often be stored into IRQ resources for platform
|
||||
devices, by the board-specific initialization code. Note that IRQ trigger
|
||||
options are part of the IRQ interface, e.g. IRQF_TRIGGER_FALLING, as are
|
||||
system wakeup capabilities.
|
||||
|
||||
Non-error values returned from irq_to_gpio() would most commonly be used
|
||||
with gpio_get_value(), for example to initialize or update driver state
|
||||
when the IRQ is edge-triggered.
|
||||
|
||||
|
||||
|
||||
What do these conventions omit?
|
||||
===============================
|
||||
One of the biggest things these conventions omit is pin multiplexing, since
|
||||
this is highly chip-specific and nonportable. One platform might not need
|
||||
explicit multiplexing; another might have just two options for use of any
|
||||
given pin; another might have eight options per pin; another might be able
|
||||
to route a given GPIO to any one of several pins. (Yes, those examples all
|
||||
come from systems that run Linux today.)
|
||||
|
||||
Related to multiplexing is configuration and enabling of the pullups or
|
||||
pulldowns integrated on some platforms. Not all platforms support them,
|
||||
or support them in the same way; and any given board might use external
|
||||
pullups (or pulldowns) so that the on-chip ones should not be used.
|
||||
|
||||
There are other system-specific mechanisms that are not specified here,
|
||||
like the aforementioned options for input de-glitching and wire-OR output.
|
||||
Hardware may support reading or writing GPIOs in gangs, but that's usually
|
||||
configuration dependent: for GPIOs sharing the same bank. (GPIOs are
|
||||
commonly grouped in banks of 16 or 32, with a given SOC having several such
|
||||
banks.) Some systems can trigger IRQs from output GPIOs. Code relying on
|
||||
such mechanisms will necessarily be nonportable.
|
||||
|
||||
Dynamic definition of GPIOs is not currently supported; for example, as
|
||||
a side effect of configuring an add-on board with some GPIO expanders.
|
||||
|
||||
These calls are purely for kernel space, but a userspace API could be built
|
||||
on top of it.
|
68
Documentation/hrtimer/timer_stats.txt
Normal file
68
Documentation/hrtimer/timer_stats.txt
Normal file
@ -0,0 +1,68 @@
|
||||
timer_stats - timer usage statistics
|
||||
------------------------------------
|
||||
|
||||
timer_stats is a debugging facility to make the timer (ab)usage in a Linux
|
||||
system visible to kernel and userspace developers. It is not intended for
|
||||
production usage as it adds significant overhead to the (hr)timer code and the
|
||||
(hr)timer data structures.
|
||||
|
||||
timer_stats should be used by kernel and userspace developers to verify that
|
||||
their code does not make unduly use of timers. This helps to avoid unnecessary
|
||||
wakeups, which should be avoided to optimize power consumption.
|
||||
|
||||
It can be enabled by CONFIG_TIMER_STATS in the "Kernel hacking" configuration
|
||||
section.
|
||||
|
||||
timer_stats collects information about the timer events which are fired in a
|
||||
Linux system over a sample period:
|
||||
|
||||
- the pid of the task(process) which initialized the timer
|
||||
- the name of the process which initialized the timer
|
||||
- the function where the timer was intialized
|
||||
- the callback function which is associated to the timer
|
||||
- the number of events (callbacks)
|
||||
|
||||
timer_stats adds an entry to /proc: /proc/timer_stats
|
||||
|
||||
This entry is used to control the statistics functionality and to read out the
|
||||
sampled information.
|
||||
|
||||
The timer_stats functionality is inactive on bootup.
|
||||
|
||||
To activate a sample period issue:
|
||||
# echo 1 >/proc/timer_stats
|
||||
|
||||
To stop a sample period issue:
|
||||
# echo 0 >/proc/timer_stats
|
||||
|
||||
The statistics can be retrieved by:
|
||||
# cat /proc/timer_stats
|
||||
|
||||
The readout of /proc/timer_stats automatically disables sampling. The sampled
|
||||
information is kept until a new sample period is started. This allows multiple
|
||||
readouts.
|
||||
|
||||
Sample output of /proc/timer_stats:
|
||||
|
||||
Timerstats sample period: 3.888770 s
|
||||
12, 0 swapper hrtimer_stop_sched_tick (hrtimer_sched_tick)
|
||||
15, 1 swapper hcd_submit_urb (rh_timer_func)
|
||||
4, 959 kedac schedule_timeout (process_timeout)
|
||||
1, 0 swapper page_writeback_init (wb_timer_fn)
|
||||
28, 0 swapper hrtimer_stop_sched_tick (hrtimer_sched_tick)
|
||||
22, 2948 IRQ 4 tty_flip_buffer_push (delayed_work_timer_fn)
|
||||
3, 3100 bash schedule_timeout (process_timeout)
|
||||
1, 1 swapper queue_delayed_work_on (delayed_work_timer_fn)
|
||||
1, 1 swapper queue_delayed_work_on (delayed_work_timer_fn)
|
||||
1, 1 swapper neigh_table_init_no_netlink (neigh_periodic_timer)
|
||||
1, 2292 ip __netdev_watchdog_up (dev_watchdog)
|
||||
1, 23 events/1 do_cache_clean (delayed_work_timer_fn)
|
||||
90 total events, 30.0 events/sec
|
||||
|
||||
The first column is the number of events, the second column the pid, the third
|
||||
column is the name of the process. The forth column shows the function which
|
||||
initialized the timer and in parantheses the callback function which was
|
||||
executed on expiry.
|
||||
|
||||
Thomas, Ingo
|
||||
|
249
Documentation/hrtimers/highres.txt
Normal file
249
Documentation/hrtimers/highres.txt
Normal file
@ -0,0 +1,249 @@
|
||||
High resolution timers and dynamic ticks design notes
|
||||
-----------------------------------------------------
|
||||
|
||||
Further information can be found in the paper of the OLS 2006 talk "hrtimers
|
||||
and beyond". The paper is part of the OLS 2006 Proceedings Volume 1, which can
|
||||
be found on the OLS website:
|
||||
http://www.linuxsymposium.org/2006/linuxsymposium_procv1.pdf
|
||||
|
||||
The slides to this talk are available from:
|
||||
http://tglx.de/projects/hrtimers/ols2006-hrtimers.pdf
|
||||
|
||||
The slides contain five figures (pages 2, 15, 18, 20, 22), which illustrate the
|
||||
changes in the time(r) related Linux subsystems. Figure #1 (p. 2) shows the
|
||||
design of the Linux time(r) system before hrtimers and other building blocks
|
||||
got merged into mainline.
|
||||
|
||||
Note: the paper and the slides are talking about "clock event source", while we
|
||||
switched to the name "clock event devices" in meantime.
|
||||
|
||||
The design contains the following basic building blocks:
|
||||
|
||||
- hrtimer base infrastructure
|
||||
- timeofday and clock source management
|
||||
- clock event management
|
||||
- high resolution timer functionality
|
||||
- dynamic ticks
|
||||
|
||||
|
||||
hrtimer base infrastructure
|
||||
---------------------------
|
||||
|
||||
The hrtimer base infrastructure was merged into the 2.6.16 kernel. Details of
|
||||
the base implementation are covered in Documentation/hrtimers/hrtimer.txt. See
|
||||
also figure #2 (OLS slides p. 15)
|
||||
|
||||
The main differences to the timer wheel, which holds the armed timer_list type
|
||||
timers are:
|
||||
- time ordered enqueueing into a rb-tree
|
||||
- independent of ticks (the processing is based on nanoseconds)
|
||||
|
||||
|
||||
timeofday and clock source management
|
||||
-------------------------------------
|
||||
|
||||
John Stultz's Generic Time Of Day (GTOD) framework moves a large portion of
|
||||
code out of the architecture-specific areas into a generic management
|
||||
framework, as illustrated in figure #3 (OLS slides p. 18). The architecture
|
||||
specific portion is reduced to the low level hardware details of the clock
|
||||
sources, which are registered in the framework and selected on a quality based
|
||||
decision. The low level code provides hardware setup and readout routines and
|
||||
initializes data structures, which are used by the generic time keeping code to
|
||||
convert the clock ticks to nanosecond based time values. All other time keeping
|
||||
related functionality is moved into the generic code. The GTOD base patch got
|
||||
merged into the 2.6.18 kernel.
|
||||
|
||||
Further information about the Generic Time Of Day framework is available in the
|
||||
OLS 2005 Proceedings Volume 1:
|
||||
http://www.linuxsymposium.org/2005/linuxsymposium_procv1.pdf
|
||||
|
||||
The paper "We Are Not Getting Any Younger: A New Approach to Time and
|
||||
Timers" was written by J. Stultz, D.V. Hart, & N. Aravamudan.
|
||||
|
||||
Figure #3 (OLS slides p.18) illustrates the transformation.
|
||||
|
||||
|
||||
clock event management
|
||||
----------------------
|
||||
|
||||
While clock sources provide read access to the monotonically increasing time
|
||||
value, clock event devices are used to schedule the next event
|
||||
interrupt(s). The next event is currently defined to be periodic, with its
|
||||
period defined at compile time. The setup and selection of the event device
|
||||
for various event driven functionalities is hardwired into the architecture
|
||||
dependent code. This results in duplicated code across all architectures and
|
||||
makes it extremely difficult to change the configuration of the system to use
|
||||
event interrupt devices other than those already built into the
|
||||
architecture. Another implication of the current design is that it is necessary
|
||||
to touch all the architecture-specific implementations in order to provide new
|
||||
functionality like high resolution timers or dynamic ticks.
|
||||
|
||||
The clock events subsystem tries to address this problem by providing a generic
|
||||
solution to manage clock event devices and their usage for the various clock
|
||||
event driven kernel functionalities. The goal of the clock event subsystem is
|
||||
to minimize the clock event related architecture dependent code to the pure
|
||||
hardware related handling and to allow easy addition and utilization of new
|
||||
clock event devices. It also minimizes the duplicated code across the
|
||||
architectures as it provides generic functionality down to the interrupt
|
||||
service handler, which is almost inherently hardware dependent.
|
||||
|
||||
Clock event devices are registered either by the architecture dependent boot
|
||||
code or at module insertion time. Each clock event device fills a data
|
||||
structure with clock-specific property parameters and callback functions. The
|
||||
clock event management decides, by using the specified property parameters, the
|
||||
set of system functions a clock event device will be used to support. This
|
||||
includes the distinction of per-CPU and per-system global event devices.
|
||||
|
||||
System-level global event devices are used for the Linux periodic tick. Per-CPU
|
||||
event devices are used to provide local CPU functionality such as process
|
||||
accounting, profiling, and high resolution timers.
|
||||
|
||||
The management layer assignes one or more of the folliwing functions to a clock
|
||||
event device:
|
||||
- system global periodic tick (jiffies update)
|
||||
- cpu local update_process_times
|
||||
- cpu local profiling
|
||||
- cpu local next event interrupt (non periodic mode)
|
||||
|
||||
The clock event device delegates the selection of those timer interrupt related
|
||||
functions completely to the management layer. The clock management layer stores
|
||||
a function pointer in the device description structure, which has to be called
|
||||
from the hardware level handler. This removes a lot of duplicated code from the
|
||||
architecture specific timer interrupt handlers and hands the control over the
|
||||
clock event devices and the assignment of timer interrupt related functionality
|
||||
to the core code.
|
||||
|
||||
The clock event layer API is rather small. Aside from the clock event device
|
||||
registration interface it provides functions to schedule the next event
|
||||
interrupt, clock event device notification service and support for suspend and
|
||||
resume.
|
||||
|
||||
The framework adds about 700 lines of code which results in a 2KB increase of
|
||||
the kernel binary size. The conversion of i386 removes about 100 lines of
|
||||
code. The binary size decrease is in the range of 400 byte. We believe that the
|
||||
increase of flexibility and the avoidance of duplicated code across
|
||||
architectures justifies the slight increase of the binary size.
|
||||
|
||||
The conversion of an architecture has no functional impact, but allows to
|
||||
utilize the high resolution and dynamic tick functionalites without any change
|
||||
to the clock event device and timer interrupt code. After the conversion the
|
||||
enabling of high resolution timers and dynamic ticks is simply provided by
|
||||
adding the kernel/time/Kconfig file to the architecture specific Kconfig and
|
||||
adding the dynamic tick specific calls to the idle routine (a total of 3 lines
|
||||
added to the idle function and the Kconfig file)
|
||||
|
||||
Figure #4 (OLS slides p.20) illustrates the transformation.
|
||||
|
||||
|
||||
high resolution timer functionality
|
||||
-----------------------------------
|
||||
|
||||
During system boot it is not possible to use the high resolution timer
|
||||
functionality, while making it possible would be difficult and would serve no
|
||||
useful function. The initialization of the clock event device framework, the
|
||||
clock source framework (GTOD) and hrtimers itself has to be done and
|
||||
appropriate clock sources and clock event devices have to be registered before
|
||||
the high resolution functionality can work. Up to the point where hrtimers are
|
||||
initialized, the system works in the usual low resolution periodic mode. The
|
||||
clock source and the clock event device layers provide notification functions
|
||||
which inform hrtimers about availability of new hardware. hrtimers validates
|
||||
the usability of the registered clock sources and clock event devices before
|
||||
switching to high resolution mode. This ensures also that a kernel which is
|
||||
configured for high resolution timers can run on a system which lacks the
|
||||
necessary hardware support.
|
||||
|
||||
The high resolution timer code does not support SMP machines which have only
|
||||
global clock event devices. The support of such hardware would involve IPI
|
||||
calls when an interrupt happens. The overhead would be much larger than the
|
||||
benefit. This is the reason why we currently disable high resolution and
|
||||
dynamic ticks on i386 SMP systems which stop the local APIC in C3 power
|
||||
state. A workaround is available as an idea, but the problem has not been
|
||||
tackled yet.
|
||||
|
||||
The time ordered insertion of timers provides all the infrastructure to decide
|
||||
whether the event device has to be reprogrammed when a timer is added. The
|
||||
decision is made per timer base and synchronized across per-cpu timer bases in
|
||||
a support function. The design allows the system to utilize separate per-CPU
|
||||
clock event devices for the per-CPU timer bases, but currently only one
|
||||
reprogrammable clock event device per-CPU is utilized.
|
||||
|
||||
When the timer interrupt happens, the next event interrupt handler is called
|
||||
from the clock event distribution code and moves expired timers from the
|
||||
red-black tree to a separate double linked list and invokes the softirq
|
||||
handler. An additional mode field in the hrtimer structure allows the system to
|
||||
execute callback functions directly from the next event interrupt handler. This
|
||||
is restricted to code which can safely be executed in the hard interrupt
|
||||
context. This applies, for example, to the common case of a wakeup function as
|
||||
used by nanosleep. The advantage of executing the handler in the interrupt
|
||||
context is the avoidance of up to two context switches - from the interrupted
|
||||
context to the softirq and to the task which is woken up by the expired
|
||||
timer.
|
||||
|
||||
Once a system has switched to high resolution mode, the periodic tick is
|
||||
switched off. This disables the per system global periodic clock event device -
|
||||
e.g. the PIT on i386 SMP systems.
|
||||
|
||||
The periodic tick functionality is provided by an per-cpu hrtimer. The callback
|
||||
function is executed in the next event interrupt context and updates jiffies
|
||||
and calls update_process_times and profiling. The implementation of the hrtimer
|
||||
based periodic tick is designed to be extended with dynamic tick functionality.
|
||||
This allows to use a single clock event device to schedule high resolution
|
||||
timer and periodic events (jiffies tick, profiling, process accounting) on UP
|
||||
systems. This has been proved to work with the PIT on i386 and the Incrementer
|
||||
on PPC.
|
||||
|
||||
The softirq for running the hrtimer queues and executing the callbacks has been
|
||||
separated from the tick bound timer softirq to allow accurate delivery of high
|
||||
resolution timer signals which are used by itimer and POSIX interval
|
||||
timers. The execution of this softirq can still be delayed by other softirqs,
|
||||
but the overall latencies have been significantly improved by this separation.
|
||||
|
||||
Figure #5 (OLS slides p.22) illustrates the transformation.
|
||||
|
||||
|
||||
dynamic ticks
|
||||
-------------
|
||||
|
||||
Dynamic ticks are the logical consequence of the hrtimer based periodic tick
|
||||
replacement (sched_tick). The functionality of the sched_tick hrtimer is
|
||||
extended by three functions:
|
||||
|
||||
- hrtimer_stop_sched_tick
|
||||
- hrtimer_restart_sched_tick
|
||||
- hrtimer_update_jiffies
|
||||
|
||||
hrtimer_stop_sched_tick() is called when a CPU goes into idle state. The code
|
||||
evaluates the next scheduled timer event (from both hrtimers and the timer
|
||||
wheel) and in case that the next event is further away than the next tick it
|
||||
reprograms the sched_tick to this future event, to allow longer idle sleeps
|
||||
without worthless interruption by the periodic tick. The function is also
|
||||
called when an interrupt happens during the idle period, which does not cause a
|
||||
reschedule. The call is necessary as the interrupt handler might have armed a
|
||||
new timer whose expiry time is before the time which was identified as the
|
||||
nearest event in the previous call to hrtimer_stop_sched_tick.
|
||||
|
||||
hrtimer_restart_sched_tick() is called when the CPU leaves the idle state before
|
||||
it calls schedule(). hrtimer_restart_sched_tick() resumes the periodic tick,
|
||||
which is kept active until the next call to hrtimer_stop_sched_tick().
|
||||
|
||||
hrtimer_update_jiffies() is called from irq_enter() when an interrupt happens
|
||||
in the idle period to make sure that jiffies are up to date and the interrupt
|
||||
handler has not to deal with an eventually stale jiffy value.
|
||||
|
||||
The dynamic tick feature provides statistical values which are exported to
|
||||
userspace via /proc/stats and can be made available for enhanced power
|
||||
management control.
|
||||
|
||||
The implementation leaves room for further development like full tickless
|
||||
systems, where the time slice is controlled by the scheduler, variable
|
||||
frequency profiling, and a complete removal of jiffies in the future.
|
||||
|
||||
|
||||
Aside the current initial submission of i386 support, the patchset has been
|
||||
extended to x86_64 and ARM already. Initial (work in progress) support is also
|
||||
available for MIPS and PowerPC.
|
||||
|
||||
Thomas, Ingo
|
||||
|
||||
|
||||
|
@ -135,6 +135,16 @@ Give 0 for unused sensor. Any other value is invalid. To configure this at
|
||||
startup, consult lm_sensors's /etc/sensors.conf. (2 = thermistor;
|
||||
3 = thermal diode)
|
||||
|
||||
|
||||
Fan speed control
|
||||
-----------------
|
||||
|
||||
The fan speed control features are limited to manual PWM mode. Automatic
|
||||
"Smart Guardian" mode control handling is not implemented. However
|
||||
if you want to go for "manual mode" just write 1 to pwmN_enable.
|
||||
|
||||
If you are only able to control the fan speed with very small PWM values,
|
||||
try lowering the PWM base frequency (pwm1_freq). Depending on the fan,
|
||||
it may give you a somewhat greater control range. The same frequency is
|
||||
used to drive all fan outputs, which is why pwm2_freq and pwm3_freq are
|
||||
read-only.
|
||||
|
@ -166,16 +166,21 @@ pwm[1-*] Pulse width modulation fan control.
|
||||
|
||||
pwm[1-*]_enable
|
||||
Switch PWM on and off.
|
||||
Not always present even if fan*_pwm is.
|
||||
Not always present even if pwmN is.
|
||||
0: turn off
|
||||
1: turn on in manual mode
|
||||
2+: turn on in automatic mode
|
||||
Check individual chip documentation files for automatic mode details.
|
||||
Check individual chip documentation files for automatic mode
|
||||
details.
|
||||
RW
|
||||
|
||||
pwm[1-*]_mode
|
||||
0: DC mode
|
||||
1: PWM mode
|
||||
pwm[1-*]_mode 0: DC mode (direct current)
|
||||
1: PWM mode (pulse-width modulation)
|
||||
RW
|
||||
|
||||
pwm[1-*]_freq Base PWM frequency in Hz.
|
||||
Only possibly available when pwmN_mode is PWM, but not always
|
||||
present even then.
|
||||
RW
|
||||
|
||||
pwm[1-*]_auto_channels_temp
|
||||
|
@ -2,26 +2,29 @@ Kernel driver w83627ehf
|
||||
=======================
|
||||
|
||||
Supported chips:
|
||||
* Winbond W83627EHF/EHG (ISA access ONLY)
|
||||
* Winbond W83627EHF/EHG/DHG (ISA access ONLY)
|
||||
Prefix: 'w83627ehf'
|
||||
Addresses scanned: ISA address retrieved from Super I/O registers
|
||||
Datasheet: http://www.winbond-usa.com/products/winbond_products/pdfs/PCIC/W83627EHF_%20W83627EHGb.pdf
|
||||
Datasheet:
|
||||
http://www.winbond-usa.com/products/winbond_products/pdfs/PCIC/W83627EHF_%20W83627EHGb.pdf
|
||||
DHG datasheet confidential.
|
||||
|
||||
Authors:
|
||||
Jean Delvare <khali@linux-fr.org>
|
||||
Yuan Mu (Winbond)
|
||||
Rudolf Marek <r.marek@assembler.cz>
|
||||
David Hubbard <david.c.hubbard@gmail.com>
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
This driver implements support for the Winbond W83627EHF and W83627EHG
|
||||
super I/O chips. We will refer to them collectively as Winbond chips.
|
||||
This driver implements support for the Winbond W83627EHF, W83627EHG, and
|
||||
W83627DHG super I/O chips. We will refer to them collectively as Winbond chips.
|
||||
|
||||
The chips implement three temperature sensors, five fan rotation
|
||||
speed sensors, ten analog voltage sensors, alarms with beep warnings (control
|
||||
unimplemented), and some automatic fan regulation strategies (plus manual
|
||||
fan control mode).
|
||||
speed sensors, ten analog voltage sensors (only nine for the 627DHG), alarms
|
||||
with beep warnings (control unimplemented), and some automatic fan regulation
|
||||
strategies (plus manual fan control mode).
|
||||
|
||||
Temperatures are measured in degrees Celsius and measurement resolution is 1
|
||||
degC for temp1 and 0.5 degC for temp2 and temp3. An alarm is triggered when
|
||||
@ -55,6 +58,9 @@ prog -> pwm4 (the programmable setting is not supported by the driver)
|
||||
/sys files
|
||||
----------
|
||||
|
||||
name - this is a standard hwmon device entry. For the W83627EHF and W83627EHG,
|
||||
it is set to "w83627ehf" and for the W83627DHG it is set to "w83627dhg"
|
||||
|
||||
pwm[1-4] - this file stores PWM duty cycle or DC value (fan speed) in range:
|
||||
0 (stop) to 255 (full)
|
||||
|
||||
@ -83,3 +89,37 @@ pwm[1-4]_stop_time - how many milliseconds [ms] must elapse to switch
|
||||
|
||||
Note: last two functions are influenced by other control bits, not yet exported
|
||||
by the driver, so a change might not have any effect.
|
||||
|
||||
Implementation Details
|
||||
----------------------
|
||||
|
||||
Future driver development should bear in mind that the following registers have
|
||||
different functions on the 627EHF and the 627DHG. Some registers also have
|
||||
different power-on default values, but BIOS should already be loading
|
||||
appropriate defaults. Note that bank selection must be performed as is currently
|
||||
done in the driver for all register addresses.
|
||||
|
||||
0x49: only on DHG, selects temperature source for AUX fan, CPU fan0
|
||||
0x4a: not completely documented for the EHF and the DHG documentation assigns
|
||||
different behavior to bits 7 and 6, including extending the temperature
|
||||
input selection to SmartFan I, not just SmartFan III. Testing on the EHF
|
||||
will reveal whether they are compatible or not.
|
||||
|
||||
0x58: Chip ID: 0xa1=EHF 0xc1=DHG
|
||||
0x5e: only on DHG, has bits to enable "current mode" temperature detection and
|
||||
critical temperature protection
|
||||
0x45b: only on EHF, bit 3, vin4 alarm (EHF supports 10 inputs, only 9 on DHG)
|
||||
0x552: only on EHF, vin4
|
||||
0x558: only on EHF, vin4 high limit
|
||||
0x559: only on EHF, vin4 low limit
|
||||
0x6b: only on DHG, SYS fan critical temperature
|
||||
0x6c: only on DHG, CPU fan0 critical temperature
|
||||
0x6d: only on DHG, AUX fan critical temperature
|
||||
0x6e: only on DHG, CPU fan1 critical temperature
|
||||
|
||||
0x50-0x55 and 0x650-0x657 are marked "Test Register" for the EHF, but "Reserved
|
||||
Register" for the DHG
|
||||
|
||||
The DHG also supports PECI, where the DHG queries Intel CPU temperatures, and
|
||||
the ICH8 southbridge gets that data via PECI from the DHG, so that the
|
||||
southbridge drives the fans. And the DHG supports SST, a one-wire serial bus.
|
||||
|
@ -48,14 +48,9 @@ following:
|
||||
The SMBus controller is function 3 in device 1f. Class 0c05 is SMBus Serial
|
||||
Controller.
|
||||
|
||||
If you do NOT see the 24x3 device at function 3, and you can't figure out
|
||||
any way in the BIOS to enable it,
|
||||
|
||||
The ICH chips are quite similar to Intel's PIIX4 chip, at least in the
|
||||
SMBus controller.
|
||||
|
||||
See the file i2c-piix4 for some additional information.
|
||||
|
||||
|
||||
Process Call Support
|
||||
--------------------
|
||||
@ -74,6 +69,61 @@ SMBus 2.0 Support
|
||||
|
||||
The 82801DB (ICH4) and later chips support several SMBus 2.0 features.
|
||||
|
||||
|
||||
Hidden ICH SMBus
|
||||
----------------
|
||||
|
||||
If your system has an Intel ICH south bridge, but you do NOT see the
|
||||
SMBus device at 00:1f.3 in lspci, and you can't figure out any way in the
|
||||
BIOS to enable it, it means it has been hidden by the BIOS code. Asus is
|
||||
well known for first doing this on their P4B motherboard, and many other
|
||||
boards after that. Some vendor machines are affected as well.
|
||||
|
||||
The first thing to try is the "i2c_ec" ACPI driver. It could be that the
|
||||
SMBus was hidden on purpose because it'll be driven by ACPI. If the
|
||||
i2c_ec driver works for you, just forget about the i2c-i801 driver and
|
||||
don't try to unhide the ICH SMBus. Even if i2c_ec doesn't work, you
|
||||
better make sure that the SMBus isn't used by the ACPI code. Try loading
|
||||
the "fan" and "thermal" drivers, and check in /proc/acpi/fan and
|
||||
/proc/acpi/thermal_zone. If you find anything there, it's likely that
|
||||
the ACPI is accessing the SMBus and it's safer not to unhide it. Only
|
||||
once you are certain that ACPI isn't using the SMBus, you can attempt
|
||||
to unhide it.
|
||||
|
||||
In order to unhide the SMBus, we need to change the value of a PCI
|
||||
register before the kernel enumerates the PCI devices. This is done in
|
||||
drivers/pci/quirks.c, where all affected boards must be listed (see
|
||||
function asus_hides_smbus_hostbridge.) If the SMBus device is missing,
|
||||
and you think there's something interesting on the SMBus (e.g. a
|
||||
hardware monitoring chip), you need to add your board to the list.
|
||||
|
||||
The motherboard is identified using the subvendor and subdevice IDs of the
|
||||
host bridge PCI device. Get yours with "lspci -n -v -s 00:00.0":
|
||||
|
||||
00:00.0 Class 0600: 8086:2570 (rev 02)
|
||||
Subsystem: 1043:80f2
|
||||
Flags: bus master, fast devsel, latency 0
|
||||
Memory at fc000000 (32-bit, prefetchable) [size=32M]
|
||||
Capabilities: [e4] #09 [2106]
|
||||
Capabilities: [a0] AGP version 3.0
|
||||
|
||||
Here the host bridge ID is 2570 (82865G/PE/P), the subvendor ID is 1043
|
||||
(Asus) and the subdevice ID is 80f2 (P4P800-X). You can find the symbolic
|
||||
names for the bridge ID and the subvendor ID in include/linux/pci_ids.h,
|
||||
and then add a case for your subdevice ID at the right place in
|
||||
drivers/pci/quirks.c. Then please give it very good testing, to make sure
|
||||
that the unhidden SMBus doesn't conflict with e.g. ACPI.
|
||||
|
||||
If it works, proves useful (i.e. there are usable chips on the SMBus)
|
||||
and seems safe, please submit a patch for inclusion into the kernel.
|
||||
|
||||
Note: There's a useful script in lm_sensors 2.10.2 and later, named
|
||||
unhide_ICH_SMBus (in prog/hotplug), which uses the fakephp driver to
|
||||
temporarily unhide the SMBus without having to patch and recompile your
|
||||
kernel. It's very convenient if you just want to check if there's
|
||||
anything interesting on your hidden ICH SMBus.
|
||||
|
||||
|
||||
**********************
|
||||
The lm_sensors project gratefully acknowledges the support of Texas
|
||||
Instruments in the initial development of this driver.
|
||||
|
@ -19,6 +19,7 @@ It currently supports the following devices:
|
||||
* (type=4) Analog Devices ADM1032 evaluation board
|
||||
* (type=5) Analog Devices evaluation boards: ADM1025, ADM1030, ADM1031
|
||||
* (type=6) Barco LPT->DVI (K5800236) adapter
|
||||
* (type=7) One For All JP1 parallel port adapter
|
||||
|
||||
These devices use different pinout configurations, so you have to tell
|
||||
the driver what you have, using the type module parameter. There is no
|
||||
@ -157,3 +158,17 @@ many more, using /dev/velleman.
|
||||
http://home.wanadoo.nl/hihihi/libk8005.htm
|
||||
http://struyve.mine.nu:8080/index.php?block=k8000
|
||||
http://sourceforge.net/projects/libk8005/
|
||||
|
||||
|
||||
One For All JP1 parallel port adapter
|
||||
-------------------------------------
|
||||
|
||||
The JP1 project revolves around a set of remote controls which expose
|
||||
the I2C bus their internal configuration EEPROM lives on via a 6 pin
|
||||
jumper in the battery compartment. More details can be found at:
|
||||
|
||||
http://www.hifi-remote.com/jp1/
|
||||
|
||||
Details of the simple parallel port hardware can be found at:
|
||||
|
||||
http://www.hifi-remote.com/jp1/hardware.shtml
|
||||
|
@ -6,7 +6,7 @@ Supported adapters:
|
||||
Datasheet: Publicly available at the Intel website
|
||||
* ServerWorks OSB4, CSB5, CSB6 and HT-1000 southbridges
|
||||
Datasheet: Only available via NDA from ServerWorks
|
||||
* ATI IXP southbridges IXP200, IXP300, IXP400
|
||||
* ATI IXP200, IXP300, IXP400 and SB600 southbridges
|
||||
Datasheet: Not publicly available
|
||||
* Standard Microsystems (SMSC) SLC90E66 (Victory66) southbridge
|
||||
Datasheet: Publicly available at the SMSC website http://www.smsc.com
|
||||
|
@ -13,6 +13,9 @@ Supported adapters:
|
||||
* VIA Technologies, Inc. VT8235, VT8237R, VT8237A, VT8251
|
||||
Datasheet: available on request and under NDA from VIA
|
||||
|
||||
* VIA Technologies, Inc. CX700
|
||||
Datasheet: available on request and under NDA from VIA
|
||||
|
||||
Authors:
|
||||
Kyösti Mälkki <kmalkki@cc.hut.fi>,
|
||||
Mark D. Studebaker <mdsxyz123@yahoo.com>,
|
||||
@ -44,6 +47,7 @@ Your lspci -n listing must show one of these :
|
||||
device 1106:3227 (VT8237R)
|
||||
device 1106:3337 (VT8237A)
|
||||
device 1106:3287 (VT8251)
|
||||
device 1106:8324 (CX700)
|
||||
|
||||
If none of these show up, you should look in the BIOS for settings like
|
||||
enable ACPI / SMBus or even USB.
|
||||
@ -51,3 +55,6 @@ enable ACPI / SMBus or even USB.
|
||||
Except for the oldest chips (VT82C596A/B, VT82C686A and most probably
|
||||
VT8231), this driver supports I2C block transactions. Such transactions
|
||||
are mainly useful to read from and write to EEPROMs.
|
||||
|
||||
The CX700 additionally appears to support SMBus PEC, although this driver
|
||||
doesn't implement it yet.
|
||||
|
@ -129,6 +129,12 @@ Technical changes:
|
||||
structure, those name member should be initialized to a driver name
|
||||
string. i2c_driver itself has no name member anymore.
|
||||
|
||||
* [Driver model] Instead of shutdown or reboot notifiers, provide a
|
||||
shutdown() method in your driver.
|
||||
|
||||
* [Power management] Use the driver model suspend() and resume()
|
||||
callbacks instead of the obsolete pm_register() calls.
|
||||
|
||||
Coding policy:
|
||||
|
||||
* [Copyright] Use (C), not (c), for copyright.
|
||||
|
@ -97,7 +97,7 @@ SMBus Write Word Data
|
||||
=====================
|
||||
|
||||
This is the opposite operation of the Read Word Data command. 16 bits
|
||||
of data is read from a device, from a designated register that is
|
||||
of data is written to a device, to the designated register that is
|
||||
specified through the Comm byte.
|
||||
|
||||
S Addr Wr [A] Comm [A] DataLow [A] DataHigh [A] P
|
||||
|
@ -21,20 +21,26 @@ The driver structure
|
||||
|
||||
Usually, you will implement a single driver structure, and instantiate
|
||||
all clients from it. Remember, a driver structure contains general access
|
||||
routines, a client structure specific information like the actual I2C
|
||||
address.
|
||||
routines, and should be zero-initialized except for fields with data you
|
||||
provide. A client structure holds device-specific information like the
|
||||
driver model device node, and its I2C address.
|
||||
|
||||
static struct i2c_driver foo_driver = {
|
||||
.driver = {
|
||||
.name = "foo",
|
||||
},
|
||||
.attach_adapter = &foo_attach_adapter,
|
||||
.detach_client = &foo_detach_client,
|
||||
.command = &foo_command /* may be NULL */
|
||||
.attach_adapter = foo_attach_adapter,
|
||||
.detach_client = foo_detach_client,
|
||||
.shutdown = foo_shutdown, /* optional */
|
||||
.suspend = foo_suspend, /* optional */
|
||||
.resume = foo_resume, /* optional */
|
||||
.command = foo_command, /* optional */
|
||||
}
|
||||
|
||||
The name field must match the driver name, including the case. It must not
|
||||
contain spaces, and may be up to 31 characters long.
|
||||
The name field is the driver name, and must not contain spaces. It
|
||||
should match the module name (if the driver can be compiled as a module),
|
||||
although you can use MODULE_ALIAS (passing "foo" in this example) to add
|
||||
another name for the module.
|
||||
|
||||
All other fields are for call-back functions which will be explained
|
||||
below.
|
||||
@ -43,11 +49,18 @@ below.
|
||||
Extra client data
|
||||
=================
|
||||
|
||||
The client structure has a special `data' field that can point to any
|
||||
structure at all. You can use this to keep client-specific data. You
|
||||
Each client structure has a special `data' field that can point to any
|
||||
structure at all. You should use this to keep device-specific data,
|
||||
especially in drivers that handle multiple I2C or SMBUS devices. You
|
||||
do not always need this, but especially for `sensors' drivers, it can
|
||||
be very useful.
|
||||
|
||||
/* store the value */
|
||||
void i2c_set_clientdata(struct i2c_client *client, void *data);
|
||||
|
||||
/* retrieve the value */
|
||||
void *i2c_get_clientdata(struct i2c_client *client);
|
||||
|
||||
An example structure is below.
|
||||
|
||||
struct foo_data {
|
||||
@ -493,6 +506,33 @@ by `__init_data'. Hose functions and structures can be removed after
|
||||
kernel booting (or module loading) is completed.
|
||||
|
||||
|
||||
Power Management
|
||||
================
|
||||
|
||||
If your I2C device needs special handling when entering a system low
|
||||
power state -- like putting a transceiver into a low power mode, or
|
||||
activating a system wakeup mechanism -- do that in the suspend() method.
|
||||
The resume() method should reverse what the suspend() method does.
|
||||
|
||||
These are standard driver model calls, and they work just like they
|
||||
would for any other driver stack. The calls can sleep, and can use
|
||||
I2C messaging to the device being suspended or resumed (since their
|
||||
parent I2C adapter is active when these calls are issued, and IRQs
|
||||
are still enabled).
|
||||
|
||||
|
||||
System Shutdown
|
||||
===============
|
||||
|
||||
If your I2C device needs special handling when the system shuts down
|
||||
or reboots (including kexec) -- like turning something off -- use a
|
||||
shutdown() method.
|
||||
|
||||
Again, this is a standard driver model call, working just like it
|
||||
would for any other driver stack: the calls can sleep, and can use
|
||||
I2C messaging.
|
||||
|
||||
|
||||
Command function
|
||||
================
|
||||
|
||||
|
@ -94,8 +94,7 @@ Code Seq# Include File Comments
|
||||
'L' 00-1F linux/loop.h
|
||||
'L' E0-FF linux/ppdd.h encrypted disk device driver
|
||||
<http://linux01.gwdg.de/~alatham/ppdd.html>
|
||||
'M' all linux/soundcard.h conflict!
|
||||
'M' 00-1F linux/isicom.h conflict!
|
||||
'M' all linux/soundcard.h
|
||||
'N' 00-1F drivers/usb/scanner.h
|
||||
'P' all linux/soundcard.h
|
||||
'Q' all linux/soundcard.h
|
||||
|
@ -8,29 +8,33 @@ GigaSet 307x Device Driver
|
||||
This release supports the connection of the Gigaset 307x/417x family of
|
||||
ISDN DECT bases via Gigaset M101 Data, Gigaset M105 Data or direct USB
|
||||
connection. The following devices are reported to be compatible:
|
||||
307x/417x:
|
||||
Gigaset SX255isdn
|
||||
Gigaset SX353isdn
|
||||
Sinus 45 [AB] isdn (Deutsche Telekom)
|
||||
Sinus 721X/XA
|
||||
|
||||
Bases:
|
||||
Siemens Gigaset 3070/3075 isdn
|
||||
Siemens Gigaset 4170/4175 isdn
|
||||
Siemens Gigaset SX205/255
|
||||
Siemens Gigaset SX353
|
||||
T-Com Sinus 45 [AB] isdn
|
||||
T-Com Sinus 721X[A] [SE]
|
||||
Vox Chicago 390 ISDN (KPN Telecom)
|
||||
M101:
|
||||
Sinus 45 Data 1 (Telekom)
|
||||
M105:
|
||||
Gigaset USB Adapter DECT
|
||||
Sinus 45 Data 2 (Telekom)
|
||||
Sinus 721 data
|
||||
|
||||
RS232 data boxes:
|
||||
Siemens Gigaset M101 Data
|
||||
T-Com Sinus 45 Data 1
|
||||
|
||||
USB data boxes:
|
||||
Siemens Gigaset M105 Data
|
||||
Siemens Gigaset USB Adapter DECT
|
||||
T-Com Sinus 45 Data 2
|
||||
T-Com Sinus 721 data
|
||||
Chicago 390 USB (KPN)
|
||||
|
||||
See also http://www.erbze.info/sinus_gigaset.htm and
|
||||
http://gigaset307x.sourceforge.net/
|
||||
|
||||
We had also reports from users of Gigaset M105 who could use the drivers
|
||||
with SX 100 and CX 100 ISDN bases (only in unimodem mode, see section 2.4.)
|
||||
If you have another device that works with our driver, please let us know.
|
||||
For example, Gigaset SX205isdn/Sinus 721 X SE and Gigaset SX303isdn bases
|
||||
are just versions without answering machine of models known to work, so
|
||||
they should work just as well; but so far we are lacking positive reports
|
||||
on these.
|
||||
|
||||
Chances of getting an USB device to work are good if the output of
|
||||
lsusb
|
||||
@ -60,14 +64,28 @@ GigaSet 307x Device Driver
|
||||
To get the device working, you have to load the proper kernel module. You
|
||||
can do this using
|
||||
modprobe modulename
|
||||
where modulename is usb_gigaset (M105) or bas_gigaset (direct USB
|
||||
connection to the base).
|
||||
where modulename is ser_gigaset (M101), usb_gigaset (M105), or
|
||||
bas_gigaset (direct USB connection to the base).
|
||||
|
||||
The module ser_gigaset provides a serial line discipline N_GIGASET_M101
|
||||
which drives the device through the regular serial line driver. To use it,
|
||||
run the Gigaset M101 daemon "gigasetm101d" (also available from
|
||||
http://sourceforge.net/projects/gigaset307x/) with the device file of the
|
||||
RS232 port to the M101 as an argument, for example:
|
||||
gigasetm101d /dev/ttyS1
|
||||
This will open the device file, set its line discipline to N_GIGASET_M101,
|
||||
and then sleep in the background, keeping the device open so that the
|
||||
line discipline remains active. To deactivate it, kill the daemon, for
|
||||
example with
|
||||
killall gigasetm101d
|
||||
before disconnecting the device.
|
||||
|
||||
2.2. Device nodes for user space programs
|
||||
------------------------------------
|
||||
The device can be accessed from user space (eg. by the user space tools
|
||||
mentioned in 1.2.) through the device nodes:
|
||||
|
||||
- /dev/ttyGS0 for M101 (RS232 data boxes)
|
||||
- /dev/ttyGU0 for M105 (USB data boxes)
|
||||
- /dev/ttyGB0 for the base driver (direct USB connection)
|
||||
|
||||
@ -168,6 +186,19 @@ GigaSet 307x Device Driver
|
||||
You can also use /sys/class/tty/ttyGxy/cidmode for changing the CID mode
|
||||
setting (ttyGxy is ttyGU0 or ttyGB0).
|
||||
|
||||
2.6. M105 Undocumented USB Requests
|
||||
------------------------------
|
||||
|
||||
The Gigaset M105 USB data box understands a couple of useful, but
|
||||
undocumented USB commands. These requests are not used in normal
|
||||
operation (for wireless access to the base), but are needed for access
|
||||
to the M105's own configuration mode (registration to the base, baudrate
|
||||
and line format settings, device status queries) via the gigacontr
|
||||
utility. Their use is disabled in the driver by default for safety
|
||||
reasons but can be enabled by setting the kernel configuration option
|
||||
"Support for undocumented USB requests" (GIGASET_UNDOCREQ) to "Y" and
|
||||
recompiling.
|
||||
|
||||
|
||||
3. Troubleshooting
|
||||
---------------
|
||||
|
@ -34,7 +34,7 @@ This document describes the Linux kernel Makefiles.
|
||||
--- 6.1 Set variables to tweak the build to the architecture
|
||||
--- 6.2 Add prerequisites to archprepare:
|
||||
--- 6.3 List directories to visit when descending
|
||||
--- 6.4 Architecture specific boot images
|
||||
--- 6.4 Architecture-specific boot images
|
||||
--- 6.5 Building non-kbuild targets
|
||||
--- 6.6 Commands useful for building a boot image
|
||||
--- 6.7 Custom kbuild commands
|
||||
@ -124,7 +124,7 @@ more details, with real examples.
|
||||
Example:
|
||||
obj-y += foo.o
|
||||
|
||||
This tell kbuild that there is one object in that directory, named
|
||||
This tells kbuild that there is one object in that directory, named
|
||||
foo.o. foo.o will be built from foo.c or foo.S.
|
||||
|
||||
If foo.o shall be built as a module, the variable obj-m is used.
|
||||
@ -353,7 +353,7 @@ more details, with real examples.
|
||||
Special rules are used when the kbuild infrastructure does
|
||||
not provide the required support. A typical example is
|
||||
header files generated during the build process.
|
||||
Another example are the architecture specific Makefiles which
|
||||
Another example are the architecture-specific Makefiles which
|
||||
need special rules to prepare boot images etc.
|
||||
|
||||
Special rules are written as normal Make rules.
|
||||
@ -416,7 +416,7 @@ more details, with real examples.
|
||||
#arch/i386/kernel/Makefile
|
||||
vsyscall-flags += $(call ld-option, -Wl$(comma)--hash-style=sysv)
|
||||
|
||||
In the above example vsyscall-flags will be assigned the option
|
||||
In the above example, vsyscall-flags will be assigned the option
|
||||
-Wl$(comma)--hash-style=sysv if it is supported by $(CC).
|
||||
The second argument is optional, and if supplied will be used
|
||||
if first argument is not supported.
|
||||
@ -434,7 +434,7 @@ more details, with real examples.
|
||||
#arch/i386/Makefile
|
||||
cflags-y += $(call cc-option,-march=pentium-mmx,-march=i586)
|
||||
|
||||
In the above example cflags-y will be assigned the option
|
||||
In the above example, cflags-y will be assigned the option
|
||||
-march=pentium-mmx if supported by $(CC), otherwise -march=i586.
|
||||
The second argument to cc-option is optional, and if omitted,
|
||||
cflags-y will be assigned no value if first option is not supported.
|
||||
@ -750,10 +750,10 @@ When kbuild executes, the following steps are followed (roughly):
|
||||
located at the root of the obj tree.
|
||||
The very first objects linked are listed in head-y, assigned by
|
||||
arch/$(ARCH)/Makefile.
|
||||
7) Finally, the architecture specific part does any required post processing
|
||||
7) Finally, the architecture-specific part does any required post processing
|
||||
and builds the final bootimage.
|
||||
- This includes building boot records
|
||||
- Preparing initrd images and thelike
|
||||
- Preparing initrd images and the like
|
||||
|
||||
|
||||
--- 6.1 Set variables to tweak the build to the architecture
|
||||
@ -880,7 +880,7 @@ When kbuild executes, the following steps are followed (roughly):
|
||||
|
||||
$(head-y) lists objects to be linked first in vmlinux.
|
||||
$(libs-y) lists directories where a lib.a archive can be located.
|
||||
The rest lists directories where a built-in.o object file can be
|
||||
The rest list directories where a built-in.o object file can be
|
||||
located.
|
||||
|
||||
$(init-y) objects will be located after $(head-y).
|
||||
@ -888,7 +888,7 @@ When kbuild executes, the following steps are followed (roughly):
|
||||
$(core-y), $(libs-y), $(drivers-y) and $(net-y).
|
||||
|
||||
The top level Makefile defines values for all generic directories,
|
||||
and arch/$(ARCH)/Makefile only adds architecture specific directories.
|
||||
and arch/$(ARCH)/Makefile only adds architecture-specific directories.
|
||||
|
||||
Example:
|
||||
#arch/sparc64/Makefile
|
||||
@ -897,7 +897,7 @@ When kbuild executes, the following steps are followed (roughly):
|
||||
drivers-$(CONFIG_OPROFILE) += arch/sparc64/oprofile/
|
||||
|
||||
|
||||
--- 6.4 Architecture specific boot images
|
||||
--- 6.4 Architecture-specific boot images
|
||||
|
||||
An arch Makefile specifies goals that take the vmlinux file, compress
|
||||
it, wrap it in bootstrapping code, and copy the resulting files
|
||||
@ -924,7 +924,7 @@ When kbuild executes, the following steps are followed (roughly):
|
||||
"$(Q)$(MAKE) $(build)=<dir>" is the recommended way to invoke
|
||||
make in a subdirectory.
|
||||
|
||||
There are no rules for naming architecture specific targets,
|
||||
There are no rules for naming architecture-specific targets,
|
||||
but executing "make help" will list all relevant targets.
|
||||
To support this, $(archhelp) must be defined.
|
||||
|
||||
@ -982,7 +982,7 @@ When kbuild executes, the following steps are followed (roughly):
|
||||
$(call if_changed,ld/objcopy/gzip)
|
||||
|
||||
When the rule is evaluated, it is checked to see if any files
|
||||
needs an update, or the command line has changed since the last
|
||||
need an update, or the command line has changed since the last
|
||||
invocation. The latter will force a rebuild if any options
|
||||
to the executable have changed.
|
||||
Any target that utilises if_changed must be listed in $(targets),
|
||||
@ -1089,7 +1089,7 @@ When kbuild executes, the following steps are followed (roughly):
|
||||
assignment.
|
||||
|
||||
The kbuild infrastructure for *lds file are used in several
|
||||
architecture specific files.
|
||||
architecture-specific files.
|
||||
|
||||
|
||||
=== 7 Kbuild Variables
|
||||
@ -1133,7 +1133,7 @@ The top Makefile exports the following variables:
|
||||
|
||||
This variable defines a place for the arch Makefiles to install
|
||||
the resident kernel image and System.map file.
|
||||
Use this for architecture specific install targets.
|
||||
Use this for architecture-specific install targets.
|
||||
|
||||
INSTALL_MOD_PATH, MODLIB
|
||||
|
||||
|
@ -311,10 +311,10 @@ Following are the arch specific command line options to be used while
|
||||
loading dump-capture kernel.
|
||||
|
||||
For i386, x86_64 and ia64:
|
||||
"init 1 irqpoll maxcpus=1"
|
||||
"1 irqpoll maxcpus=1"
|
||||
|
||||
For ppc64:
|
||||
"init 1 maxcpus=1 noirqdistrib"
|
||||
"1 maxcpus=1 noirqdistrib"
|
||||
|
||||
|
||||
Notes on loading the dump-capture kernel:
|
||||
@ -332,8 +332,8 @@ Notes on loading the dump-capture kernel:
|
||||
* You must specify <root-dev> in the format corresponding to the root
|
||||
device name in the output of mount command.
|
||||
|
||||
* "init 1" boots the dump-capture kernel into single-user mode without
|
||||
networking. If you want networking, use "init 3."
|
||||
* Boot parameter "1" boots the dump-capture kernel into single-user
|
||||
mode without networking. If you want networking, use "3".
|
||||
|
||||
* We generally don' have to bring up a SMP kernel just to capture the
|
||||
dump. Hence generally it is useful either to build a UP dump-capture
|
||||
|
@ -101,16 +101,20 @@ The format of the block comment is like this:
|
||||
|
||||
/**
|
||||
* function_name(:)? (- short description)?
|
||||
(* @parameterx: (description of parameter x)?)*
|
||||
(* @parameterx(space)*: (description of parameter x)?)*
|
||||
(* a blank line)?
|
||||
* (Description:)? (Description of function)?
|
||||
* (section header: (section description)? )*
|
||||
(*)?*/
|
||||
|
||||
The short function description cannot be multiline, but the other
|
||||
descriptions can be (and they can contain blank lines). Avoid putting a
|
||||
spurious blank line after the function name, or else the description will
|
||||
be repeated!
|
||||
The short function description ***cannot be multiline***, but the other
|
||||
descriptions can be (and they can contain blank lines). If you continue
|
||||
that initial short description onto a second line, that second line will
|
||||
appear further down at the beginning of the description section, which is
|
||||
almost certainly not what you had in mind.
|
||||
|
||||
Avoid putting a spurious blank line after the function name, or else the
|
||||
description will be repeated!
|
||||
|
||||
All descriptive text is further processed, scanning for the following special
|
||||
patterns, which are highlighted appropriately.
|
||||
@ -121,6 +125,31 @@ patterns, which are highlighted appropriately.
|
||||
'@parameter' - name of a parameter
|
||||
'%CONST' - name of a constant.
|
||||
|
||||
NOTE 1: The multi-line descriptive text you provide does *not* recognize
|
||||
line breaks, so if you try to format some text nicely, as in:
|
||||
|
||||
Return codes
|
||||
0 - cool
|
||||
1 - invalid arg
|
||||
2 - out of memory
|
||||
|
||||
this will all run together and produce:
|
||||
|
||||
Return codes 0 - cool 1 - invalid arg 2 - out of memory
|
||||
|
||||
NOTE 2: If the descriptive text you provide has lines that begin with
|
||||
some phrase followed by a colon, each of those phrases will be taken as
|
||||
a new section heading, which means you should similarly try to avoid text
|
||||
like:
|
||||
|
||||
Return codes:
|
||||
0: cool
|
||||
1: invalid arg
|
||||
2: out of memory
|
||||
|
||||
every line of which would start a new section. Again, probably not
|
||||
what you were after.
|
||||
|
||||
Take a look around the source tree for examples.
|
||||
|
||||
|
||||
|
@ -1,10 +1,10 @@
|
||||
|
||||
Index of Documentation for People Interested in Writing and/or
|
||||
|
||||
Understanding the Linux Kernel.
|
||||
|
||||
Juan-Mariano de Goyeneche <jmseyas@dit.upm.es>
|
||||
|
||||
Index of Documentation for People Interested in Writing and/or
|
||||
|
||||
Understanding the Linux Kernel.
|
||||
|
||||
Juan-Mariano de Goyeneche <jmseyas@dit.upm.es>
|
||||
|
||||
/*
|
||||
* The latest version of this document may be found at:
|
||||
* http://www.dit.upm.es/~jmseyas/linux/kernel/hackers-docs.html
|
||||
@ -61,18 +61,18 @@
|
||||
13.-The Linux Kernel Sources, A.-Linux Data Structures, B.-The
|
||||
Alpha AXP Processor, C.-Useful Web and FTP Sites, D.-The GNU
|
||||
General Public License, Glossary". In short: a must have.
|
||||
|
||||
* Title: "The Linux Kernel Hackers' Guide"
|
||||
Author: Michael K.Johnson and others.
|
||||
URL: http://www.tldp.org/LDP/khg/HyperNews/get/khg.html
|
||||
Keywords: everything!
|
||||
Description: No more Postscript book-like version. Only HTML now.
|
||||
Many people have contributed. The interface is similar to web
|
||||
available mailing lists archives. You can find some articles and
|
||||
then some mails asking questions about them and/or complementing
|
||||
previous contributions. A little bit anarchic in this aspect, but
|
||||
with some valuable information in some cases.
|
||||
|
||||
|
||||
* Title: "Linux Device Drivers, 2nd Edition"
|
||||
Author: Alessandro Rubini and Jonathan Corbet.
|
||||
URL: http://www.xml.com/ldd/chapter/book/index.html
|
||||
Keywords: device drivers, modules, debugging, memory, hardware,
|
||||
interrupt handling, char drivers, block drivers, kmod, mmap, DMA,
|
||||
buses.
|
||||
Description: O'Reilly's popular book, now also on-line under the
|
||||
GNU Free Documentation License.
|
||||
Notes: You can also buy it in paper-form from O'Reilly. See below
|
||||
under BOOKS (Not on-line).
|
||||
|
||||
* Title: "Conceptual Architecture of the Linux Kernel"
|
||||
Author: Ivan T. Bowman.
|
||||
URL: http://plg.uwaterloo.ca/~itbowman/papers/CS746G-a1.html
|
||||
@ -81,17 +81,17 @@
|
||||
Description: Conceptual software arquitecture of the Linux kernel,
|
||||
automatically extracted from the source code. Very detailed. Good
|
||||
figures. Gives good overall kernel understanding.
|
||||
|
||||
|
||||
* Title: "Concrete Architecture of the Linux Kernel"
|
||||
Author: Ivan T. Bowman, Saheem Siddiqi, and Meyer C. Tanuan.
|
||||
URL: http://plg.uwaterloo.ca/~itbowman/papers/CS746G-a2.html
|
||||
Keywords: concrete arquitecture, extracted design, reverse
|
||||
Keywords: concrete architecture, extracted design, reverse
|
||||
engineering, system structure, dependencies.
|
||||
Description: Concrete arquitecture of the Linux kernel,
|
||||
Description: Concrete architecture of the Linux kernel,
|
||||
automatically extracted from the source code. Very detailed. Good
|
||||
figures. Gives good overall kernel understanding. This papers
|
||||
focus on lower details than its predecessor (files, variables...).
|
||||
|
||||
|
||||
* Title: "Linux as a Case Study: Its Extracted Software
|
||||
Architecture"
|
||||
Author: Ivan T. Bowman, Richard C. Holt and Neil V. Brewster.
|
||||
@ -101,7 +101,7 @@
|
||||
Description: Paper appeared at ICSE'99, Los Angeles, May 16-22,
|
||||
1999. A mixture of the previous two documents from the same
|
||||
author.
|
||||
|
||||
|
||||
* Title: "Overview of the Virtual File System"
|
||||
Author: Richard Gooch.
|
||||
URL: http://www.atnf.csiro.au/~rgooch/linux/vfs.txt
|
||||
@ -111,20 +111,20 @@
|
||||
What is it, how it works, operations taken when opening a file or
|
||||
mounting a file system and description of important data
|
||||
structures explaining the purpose of each of their entries.
|
||||
|
||||
|
||||
* Title: "The Linux RAID-1, 4, 5 Code"
|
||||
Author: Ingo Molnar, Gadi Oxman and Miguel de Icaza.
|
||||
URL: http://www2.linuxjournal.com/lj-issues/issue44/2391.html
|
||||
URL: http://www.linuxjournal.com/article.php?sid=2391
|
||||
Keywords: RAID, MD driver.
|
||||
Description: Linux Journal Kernel Korner article. Here is it's
|
||||
abstract: "A description of the implementation of the RAID-1,
|
||||
RAID-4 and RAID-5 personalities of the MD device driver in the
|
||||
Linux kernel, providing users with high performance and reliable,
|
||||
secondary-storage capability using software".
|
||||
|
||||
|
||||
* Title: "Dynamic Kernels: Modularized Device Drivers"
|
||||
Author: Alessandro Rubini.
|
||||
URL: http://www2.linuxjournal.com/lj-issues/issue23/1219.html
|
||||
URL: http://www.linuxjournal.com/article.php?sid=1219
|
||||
Keywords: device driver, module, loading/unloading modules,
|
||||
allocating resources.
|
||||
Description: Linux Journal Kernel Korner article. Here is it's
|
||||
@ -134,10 +134,10 @@
|
||||
loadable modules. This installment presents an introduction to the
|
||||
topic, preparing the reader to understand next month's
|
||||
installment".
|
||||
|
||||
|
||||
* Title: "Dynamic Kernels: Discovery"
|
||||
Author: Alessandro Rubini.
|
||||
URL: http://www2.linuxjournal.com/lj-issues/issue24/1220.html
|
||||
URL: http://www.linuxjournal.com/article.php?sid=1220
|
||||
Keywords: character driver, init_module, clean_up module,
|
||||
autodetection, mayor number, minor number, file operations,
|
||||
open(), close().
|
||||
@ -146,20 +146,20 @@
|
||||
the actual code to create custom module implementing a character
|
||||
device driver. It describes the code for module initialization and
|
||||
cleanup, as well as the open() and close() system calls".
|
||||
|
||||
|
||||
* Title: "The Devil's in the Details"
|
||||
Author: Georg v. Zezschwitz and Alessandro Rubini.
|
||||
URL: http://www2.linuxjournal.com/lj-issues/issue25/1221.html
|
||||
URL: http://www.linuxjournal.com/article.php?sid=1221
|
||||
Keywords: read(), write(), select(), ioctl(), blocking/non
|
||||
blocking mode, interrupt handler.
|
||||
Description: Linux Journal Kernel Korner article. Here is it's
|
||||
abstract: "This article, the third of four on writing character
|
||||
device drivers, introduces concepts of reading, writing, and using
|
||||
ioctl-calls".
|
||||
|
||||
|
||||
* Title: "Dissecting Interrupts and Browsing DMA"
|
||||
Author: Alessandro Rubini and Georg v. Zezschwitz.
|
||||
URL: http://www2.linuxjournal.com/lj-issues/issue26/1222.html
|
||||
URL: http://www.linuxjournal.com/article.php?sid=1222
|
||||
Keywords: interrupts, irqs, DMA, bottom halves, task queues.
|
||||
Description: Linux Journal Kernel Korner article. Here is it's
|
||||
abstract: "This is the fourth in a series of articles about
|
||||
@ -170,10 +170,10 @@
|
||||
writing, and several different facilities have been provided for
|
||||
different situations. We also investigate the complex topic of
|
||||
DMA".
|
||||
|
||||
|
||||
* Title: "Device Drivers Concluded"
|
||||
Author: Georg v. Zezschwitz.
|
||||
URL: http://www2.linuxjournal.com/lj-issues/issue28/1287.html
|
||||
URL: http://www.linuxjournal.com/article.php?sid=1287
|
||||
Keywords: address spaces, pages, pagination, page management,
|
||||
demand loading, swapping, memory protection, memory mapping, mmap,
|
||||
virtual memory areas (VMAs), vremap, PCI.
|
||||
@ -182,10 +182,10 @@
|
||||
five articles about character device drivers. In this final
|
||||
section, Georg deals with memory mapping devices, beginning with
|
||||
an overall description of the Linux memory management concepts".
|
||||
|
||||
|
||||
* Title: "Network Buffers And Memory Management"
|
||||
Author: Alan Cox.
|
||||
URL: http://www2.linuxjournal.com/lj-issues/issue30/1312.html
|
||||
URL: http://www.linuxjournal.com/article.php?sid=1312
|
||||
Keywords: sk_buffs, network devices, protocol/link layer
|
||||
variables, network devices flags, transmit, receive,
|
||||
configuration, multicast.
|
||||
@ -214,28 +214,26 @@
|
||||
of the Coda filesystem. This version document is meant to describe
|
||||
the current interface (version 1.0) as well as improvements we
|
||||
envisage".
|
||||
|
||||
|
||||
* Title: "Programming PCI-Devices under Linux"
|
||||
Author: Claus Schroeter.
|
||||
URL:
|
||||
ftp://ftp.llp.fu-berlin.de/pub/linux/LINUX-LAB/whitepapers/pcip.ps
|
||||
.gz
|
||||
ftp://ftp.llp.fu-berlin.de/pub/linux/LINUX-LAB/whitepapers/pcip.ps.gz
|
||||
Keywords: PCI, device, busmastering.
|
||||
Description: 6 pages tutorial on PCI programming under Linux.
|
||||
Gives the basic concepts on the architecture of the PCI subsystem,
|
||||
as long as basic functions and macros to read/write the devices
|
||||
and perform busmastering.
|
||||
|
||||
|
||||
* Title: "Writing Character Device Driver for Linux"
|
||||
Author: R. Baruch and C. Schroeter.
|
||||
URL:
|
||||
ftp://ftp.llp.fu-berlin.de/pub/linux/LINUX-LAB/whitepapers/drivers
|
||||
.ps.gz
|
||||
ftp://ftp.llp.fu-berlin.de/pub/linux/LINUX-LAB/whitepapers/drivers.ps.gz
|
||||
Keywords: character device drivers, I/O, signals, DMA, accessing
|
||||
ports in user space, kernel environment.
|
||||
Description: 68 pages paper on writing character drivers. A little
|
||||
bit old (1.993, 1.994) although still useful.
|
||||
|
||||
|
||||
* Title: "Design and Implementation of the Second Extended
|
||||
Filesystem"
|
||||
Author: Rémy Card, Theodore Ts'o, Stephen Tweedie.
|
||||
@ -249,14 +247,14 @@
|
||||
e2fsck's passes description... A must read!
|
||||
Notes: This paper was first published in the Proceedings of the
|
||||
First Dutch International Symposium on Linux, ISBN 90-367-0385-9.
|
||||
|
||||
|
||||
* Title: "Analysis of the Ext2fs structure"
|
||||
Author: Louis-Dominique Dubeau.
|
||||
URL: http://step.polymtl.ca/~ldd/ext2fs/ext2fs_toc.html
|
||||
URL: http://www.nondot.org/sabre/os/files/FileSystems/ext2fs/
|
||||
Keywords: ext2, filesystem, ext2fs.
|
||||
Description: Description of ext2's blocks, directories, inodes,
|
||||
bitmaps, invariants...
|
||||
|
||||
|
||||
* Title: "Journaling the Linux ext2fs Filesystem"
|
||||
Author: Stephen C. Tweedie.
|
||||
URL:
|
||||
@ -265,7 +263,7 @@
|
||||
Description: Excellent 8-pages paper explaining the journaling
|
||||
capabilities added to ext2 by the author, showing different
|
||||
problems faced and the alternatives chosen.
|
||||
|
||||
|
||||
* Title: "Kernel API changes from 2.0 to 2.2"
|
||||
Author: Richard Gooch.
|
||||
URL:
|
||||
@ -273,7 +271,7 @@
|
||||
Keywords: 2.2, changes.
|
||||
Description: Kernel functions/structures/variables which changed
|
||||
from 2.0.x to 2.2.x.
|
||||
|
||||
|
||||
* Title: "Kernel API changes from 2.2 to 2.4"
|
||||
Author: Richard Gooch.
|
||||
URL:
|
||||
@ -345,17 +343,7 @@
|
||||
Notes: Beware: the main page states: "This document may not be
|
||||
published, printed or used in excerpts without explicit permission
|
||||
of the author". Fortunately, it may still be read...
|
||||
|
||||
* Title: "Tour Of the Linux Kernel Source"
|
||||
Author: Vijo Cherian.
|
||||
URL: http://www.geocities.com/vijoc/tolks/tolks.html
|
||||
Keywords: .
|
||||
Description: A classic of this page! Was lost for a while and is
|
||||
back again. Thanks Vijo! TOLKS: the name says it all. A tour of
|
||||
the sources, describing directories, files, variables, data
|
||||
structures... It covers general stuff, device drivers,
|
||||
filesystems, IPC and Networking Code.
|
||||
|
||||
|
||||
* Title: "Linux Kernel Mailing List Glossary"
|
||||
Author: various
|
||||
URL: http://kernelnewbies.org/glossary/
|
||||
@ -377,7 +365,17 @@
|
||||
kernels, but most of it applies to 2.2 too; 2.0 is slightly
|
||||
different". Freely redistributable under the conditions of the GNU
|
||||
General Public License.
|
||||
|
||||
|
||||
* Title: "Global spinlock list and usage"
|
||||
Author: Rick Lindsley.
|
||||
URL: http://lse.sourceforge.net/lockhier/global-spin-lock
|
||||
Keywords: spinlock.
|
||||
Description: This is an attempt to document both the existence and
|
||||
usage of the spinlocks in the Linux 2.4.5 kernel. Comprehensive
|
||||
list of spinlocks showing when they are used, which functions
|
||||
access them, how each lock is acquired, under what conditions it
|
||||
is held, whether interrupts can occur or not while it is held...
|
||||
|
||||
* Title: "Porting Linux 2.0 Drivers To Linux 2.2: Changes and New
|
||||
Features "
|
||||
Author: Alan Cox.
|
||||
@ -385,70 +383,70 @@
|
||||
Keywords: ports, porting.
|
||||
Description: Article from Linux Magazine on porting from 2.0 to
|
||||
2.2 kernels.
|
||||
|
||||
|
||||
* Title: "Porting Device Drivers To Linux 2.2: part II"
|
||||
Author: Alan Cox.
|
||||
URL: http://www.linux-mag.com/1999-06/gear_01.html
|
||||
Keywords: ports, porting.
|
||||
Description: Second part on porting from 2.0 to 2.2 kernels.
|
||||
|
||||
|
||||
* Title: "How To Make Sure Your Driver Will Work On The Power
|
||||
Macintosh"
|
||||
Author: Paul Mackerras.
|
||||
URL: http://www.linux-mag.com/1999-07/gear_01.html
|
||||
Keywords: Mac, Power Macintosh, porting, drivers, compatibility.
|
||||
Description: The title says it all.
|
||||
|
||||
|
||||
* Title: "An Introduction to SCSI Drivers"
|
||||
Author: Alan Cox.
|
||||
URL: http://www.linux-mag.com/1999-08/gear_01.html
|
||||
Keywords: SCSI, device, driver.
|
||||
Description: The title says it all.
|
||||
|
||||
|
||||
* Title: "Advanced SCSI Drivers And Other Tales"
|
||||
Author: Alan Cox.
|
||||
URL: http://www.linux-mag.com/1999-09/gear_01.html
|
||||
Keywords: SCSI, device, driver, advanced.
|
||||
Description: The title says it all.
|
||||
|
||||
|
||||
* Title: "Writing Linux Mouse Drivers"
|
||||
Author: Alan Cox.
|
||||
URL: http://www.linux-mag.com/1999-10/gear_01.html
|
||||
Keywords: mouse, driver, gpm.
|
||||
Description: The title says it all.
|
||||
|
||||
|
||||
* Title: "More on Mouse Drivers"
|
||||
Author: Alan Cox.
|
||||
URL: http://www.linux-mag.com/1999-11/gear_01.html
|
||||
Keywords: mouse, driver, gpm, races, asynchronous I/O.
|
||||
Description: The title still says it all.
|
||||
|
||||
|
||||
* Title: "Writing Video4linux Radio Driver"
|
||||
Author: Alan Cox.
|
||||
URL: http://www.linux-mag.com/1999-12/gear_01.html
|
||||
Keywords: video4linux, driver, radio, radio devices.
|
||||
Description: The title says it all.
|
||||
|
||||
|
||||
* Title: "Video4linux Drivers, Part 1: Video-Capture Device"
|
||||
Author: Alan Cox.
|
||||
URL: http://www.linux-mag.com/2000-01/gear_01.html
|
||||
Keywords: video4linux, driver, video capture, capture devices,
|
||||
camera driver.
|
||||
Description: The title says it all.
|
||||
|
||||
|
||||
* Title: "Video4linux Drivers, Part 2: Video-capture Devices"
|
||||
Author: Alan Cox.
|
||||
URL: http://www.linux-mag.com/2000-02/gear_01.html
|
||||
Keywords: video4linux, driver, video capture, capture devices,
|
||||
camera driver, control, query capabilities, capability, facility.
|
||||
Description: The title says it all.
|
||||
|
||||
|
||||
* Title: "PCI Management in Linux 2.2"
|
||||
Author: Alan Cox.
|
||||
URL: http://www.linux-mag.com/2000-03/gear_01.html
|
||||
Keywords: PCI, bus, bus-mastering.
|
||||
Description: The title says it all.
|
||||
|
||||
|
||||
* Title: "Linux 2.4 Kernel Internals"
|
||||
Author: Tigran Aivazian and Christoph Hellwig.
|
||||
URL: http://www.moses.uklinux.net/patches/lki.html
|
||||
@ -456,13 +454,11 @@
|
||||
Description: A little book used for a short training course.
|
||||
Covers building the kernel image, booting (including SMP bootup),
|
||||
process management, VFS and more.
|
||||
|
||||
|
||||
* Title: "Linux IP Networking. A Guide to the Implementation and
|
||||
Modification of the Linux Protocol Stack."
|
||||
Author: Glenn Herrin.
|
||||
URL:
|
||||
http://kernelnewbies.org/documents/ipnetworking/linuxipnetworking.
|
||||
html
|
||||
URL: http://www.cs.unh.edu/cnrg/gherrin
|
||||
Keywords: network, networking, protocol, IP, UDP, TCP, connection,
|
||||
socket, receiving, transmitting, forwarding, routing, packets,
|
||||
modules, /proc, sk_buff, FIB, tags.
|
||||
@ -495,7 +491,7 @@
|
||||
drivers for the Linux PCMCIA Card Services interface. It also
|
||||
describes how to write user-mode utilities for communicating with
|
||||
Card Services.
|
||||
|
||||
|
||||
* Title: "The Linux Kernel NFSD Implementation"
|
||||
Author: Neil Brown.
|
||||
URL:
|
||||
@ -591,47 +587,22 @@
|
||||
Pages: 520.
|
||||
ISBN: 2-212-08932-5
|
||||
Notes: French.
|
||||
|
||||
* Title: "The Linux Kernel Book"
|
||||
Author: Remy Card, Eric Dumas, Franck Mevel.
|
||||
Publisher: John Wiley & Sons.
|
||||
Date: 1998.
|
||||
ISBN: 0-471-98141-9
|
||||
Notes: English translation.
|
||||
|
||||
* Title: "Linux 2.0"
|
||||
Author: Remy Card, Eric Dumas, Franck Mevel.
|
||||
Publisher: Gestión 2000.
|
||||
Date: 1997.
|
||||
Pages: 501.
|
||||
ISBN: 8-480-88208-5
|
||||
Notes: Spanish translation.
|
||||
|
||||
|
||||
* Title: "Unix internals -- the new frontiers"
|
||||
Author: Uresh Vahalia.
|
||||
Publisher: Prentice Hall.
|
||||
Date: 1996.
|
||||
Pages: 600.
|
||||
ISBN: 0-13-101908-2
|
||||
|
||||
* Title: "Linux Core Kernel Commentary. Guide to Insider's Knowledge
|
||||
on the Core Kernel of the Linux Code"
|
||||
Author: Scott Maxwell.
|
||||
Publisher: Coriolis.
|
||||
Date: 1999.
|
||||
Pages: 592.
|
||||
ISBN: 1-57610-469-9
|
||||
Notes: CD-ROM included. Line by line commentary of the kernel
|
||||
code.
|
||||
|
||||
* Title: "Linux IP Stacks Commentary"
|
||||
Author: Stephen Satchell and HBJ Clifford.
|
||||
Publisher: Coriolis.
|
||||
Date: 2000.
|
||||
Pages: ???.
|
||||
ISBN: 1-57610-470-2
|
||||
Notes: Line by line source code commentary book.
|
||||
|
||||
|
||||
* Title: "The Design and Implementation of the 4.4 BSD UNIX
|
||||
Operating System"
|
||||
Author: Marshall Kirk McKusick, Keith Bostic, Michael J. Karels,
|
||||
John S. Quarterman.
|
||||
Publisher: Addison-Wesley.
|
||||
Date: 1996.
|
||||
ISBN: 0-201-54979-4
|
||||
|
||||
* Title: "Programming for the real world - POSIX.4"
|
||||
Author: Bill O. Gallmeister.
|
||||
Publisher: O'Reilly & Associates, Inc..
|
||||
@ -640,18 +611,32 @@
|
||||
ISBN: I-56592-074-0
|
||||
Notes: Though not being directly about Linux, Linux aims to be
|
||||
POSIX. Good reference.
|
||||
|
||||
* Title: "Understanding the Linux Kernel"
|
||||
Author: Daniel P. Bovet and Marco Cesati.
|
||||
Publisher: O'Reilly & Associates, Inc..
|
||||
Date: 2000.
|
||||
Pages: 702.
|
||||
ISBN: 0-596-00002-2
|
||||
Notes: Further information in
|
||||
http://www.oreilly.com/catalog/linuxkernel/
|
||||
|
||||
|
||||
* Title: "UNIX Systems for Modern Architectures: Symmetric
|
||||
Multiprocesssing and Caching for Kernel Programmers"
|
||||
Author: Curt Schimmel.
|
||||
Publisher: Addison Wesley.
|
||||
Date: June, 1994.
|
||||
Pages: 432.
|
||||
ISBN: 0-201-63338-8
|
||||
|
||||
* Title: "The Design and Implementation of the 4.3 BSD UNIX
|
||||
Operating System"
|
||||
Author: Samuel J. Leffler, Marshall Kirk McKusick, Michael J.
|
||||
Karels, John S. Quarterman.
|
||||
Publisher: Addison-Wesley.
|
||||
Date: 1989 (reprinted with corrections on October, 1990).
|
||||
ISBN: 0-201-06196-1
|
||||
|
||||
* Title: "The Design of the UNIX Operating System"
|
||||
Author: Maurice J. Bach.
|
||||
Publisher: Prentice Hall.
|
||||
Date: 1986.
|
||||
Pages: 471.
|
||||
ISBN: 0-13-201757-1
|
||||
|
||||
MISCELLANEOUS:
|
||||
|
||||
|
||||
* Name: linux/Documentation
|
||||
Author: Many.
|
||||
URL: Just look inside your kernel sources.
|
||||
@ -660,7 +645,7 @@
|
||||
inside the Documentation directory. Some pages from this document
|
||||
(including this document itself) have been moved there, and might
|
||||
be more up to date than the web version.
|
||||
|
||||
|
||||
* Name: "Linux Source Driver"
|
||||
URL: http://lsd.linux.cz
|
||||
Keywords: Browsing source code.
|
||||
@ -671,7 +656,7 @@
|
||||
you can search Linux kernel (fulltext, macros, types, functions
|
||||
and variables) and LSD can generate patches for you on the fly
|
||||
(files, directories or kernel)".
|
||||
|
||||
|
||||
* Name: "Linux Kernel Source Reference"
|
||||
Author: Thomas Graichen.
|
||||
URL: http://innominate.org/~graichen/projects/lksr/
|
||||
@ -681,27 +666,27 @@
|
||||
sources of any version starting from 1.0 up to the (daily updated)
|
||||
current version available. Also you can check the differences
|
||||
between two versions of a file".
|
||||
|
||||
|
||||
* Name: "Cross-Referencing Linux"
|
||||
URL: http://lxr.linux.no/source/
|
||||
Keywords: Browsing source code.
|
||||
Description: Another web-based Linux kernel source code browser.
|
||||
Lots of cross references to variables and functions. You can see
|
||||
where they are defined and where they are used.
|
||||
|
||||
|
||||
* Name: "Linux Weekly News"
|
||||
URL: http://lwn.net
|
||||
Keywords: latest kernel news.
|
||||
Description: The title says it all. There's a fixed kernel section
|
||||
summarizing developers' work, bug fixes, new features and versions
|
||||
produced during the week. Published every Thursday.
|
||||
|
||||
|
||||
* Name: "Kernel Traffic"
|
||||
URL: http://www.kerneltraffic.org/kernel-traffic/
|
||||
URL: http://kt.zork.net/kernel-traffic/
|
||||
Keywords: linux-kernel mailing list, weekly kernel news.
|
||||
Description: Weekly newsletter covering the most relevant
|
||||
discussions of the linux-kernel mailing list.
|
||||
|
||||
|
||||
* Name: "CuTTiNG.eDGe.LiNuX"
|
||||
URL: http://edge.kernelnotes.org
|
||||
Keywords: changelist.
|
||||
@ -709,7 +694,7 @@
|
||||
release. What's new, what's better, what's changed. Myrdraal reads
|
||||
the patches and describes them. Pointers to the patches are there,
|
||||
too.
|
||||
|
||||
|
||||
* Name: "New linux-kernel Mailing List FAQ"
|
||||
URL: http://www.tux.org/lkml/
|
||||
Keywords: linux-kernel mailing list FAQ.
|
||||
@ -719,7 +704,7 @@
|
||||
it. Read it to see how to join the mailing list. Dozens of
|
||||
interesting questions regarding the list, Linux, developers (who
|
||||
is ...?), terms (what is...?) are answered here too. Just read it.
|
||||
|
||||
|
||||
* Name: "Linux Virtual File System"
|
||||
Author: Peter J. Braam.
|
||||
URL: http://www.coda.cs.cmu.edu/doc/talks/linuxvfs/
|
||||
@ -727,10 +712,10 @@
|
||||
Description: Set of slides, presumably from a presentation on the
|
||||
Linux VFS layer. Covers version 2.1.x, with dentries and the
|
||||
dcache.
|
||||
|
||||
|
||||
* Name: "Gary's Encyclopedia - The Linux Kernel"
|
||||
Author: Gary (I suppose...).
|
||||
URL: http://members.aa.net/~swear/pedia/kernel.html
|
||||
URL: http://www.lisoleg.net/cgi-bin/lisoleg.pl?view=kernel.htm
|
||||
Keywords: links, not found here?.
|
||||
Description: Gary's Encyclopedia exists to allow the rapid finding
|
||||
of documentation and other information of interest to GNU/Linux
|
||||
@ -738,7 +723,7 @@
|
||||
categories. This link is for kernel-specific links, documents,
|
||||
sites... Look there if you could not find here what you were
|
||||
looking for.
|
||||
|
||||
|
||||
* Name: "The home page of Linux-MM"
|
||||
Author: The Linux-MM team.
|
||||
URL: http://linux-mm.org/
|
||||
@ -747,7 +732,7 @@
|
||||
Description: Site devoted to Linux Memory Management development.
|
||||
Memory related patches, HOWTOs, links, mm developers... Don't miss
|
||||
it if you are interested in memory management development!
|
||||
|
||||
|
||||
* Name: "Kernel Newbies IRC Channel"
|
||||
URL: http://www.kernelnewbies.org
|
||||
Keywords: IRC, newbies, channel, asking doubts.
|
||||
|
@ -48,6 +48,7 @@ parameter is applicable:
|
||||
ISAPNP ISA PnP code is enabled.
|
||||
ISDN Appropriate ISDN support is enabled.
|
||||
JOY Appropriate joystick support is enabled.
|
||||
LIBATA Libata driver is enabled
|
||||
LP Printer support is enabled.
|
||||
LOOP Loopback device support is enabled.
|
||||
M68k M68k architecture is enabled.
|
||||
@ -104,6 +105,9 @@ loader, and have no meaning to the kernel directly.
|
||||
Do not modify the syntax of boot loader parameters without extreme
|
||||
need or coordination with <Documentation/i386/boot.txt>.
|
||||
|
||||
There are also arch-specific kernel-parameters not documented here.
|
||||
See for example <Documentation/x86_64/boot-options.txt>.
|
||||
|
||||
Note that ALL kernel parameters listed below are CASE SENSITIVE, and that
|
||||
a trailing = on the name of any parameter states that that parameter will
|
||||
be entered as an environment variable, whereas its absence indicates that
|
||||
@ -361,6 +365,11 @@ and is between 256 and 4096 characters. It is defined in the file
|
||||
clocksource is not available, it defaults to PIT.
|
||||
Format: { pit | tsc | cyclone | pmtmr }
|
||||
|
||||
code_bytes [IA32] How many bytes of object code to print in an
|
||||
oops report.
|
||||
Range: 0 - 8192
|
||||
Default: 64
|
||||
|
||||
disable_8254_timer
|
||||
enable_8254_timer
|
||||
[IA32/X86_64] Disable/Enable interrupt 0 timer routing
|
||||
@ -601,6 +610,10 @@ and is between 256 and 4096 characters. It is defined in the file
|
||||
highmem otherwise. This also works to reduce highmem
|
||||
size on bigger boxes.
|
||||
|
||||
highres= [KNL] Enable/disable high resolution timer mode.
|
||||
Valid parameters: "on", "off"
|
||||
Default: "on"
|
||||
|
||||
hisax= [HW,ISDN]
|
||||
See Documentation/isdn/README.HiSax.
|
||||
|
||||
@ -851,7 +864,14 @@ and is between 256 and 4096 characters. It is defined in the file
|
||||
Format: <1-256>
|
||||
|
||||
maxcpus= [SMP] Maximum number of processors that an SMP kernel
|
||||
should make use of
|
||||
should make use of.
|
||||
Using "nosmp" or "maxcpus=0" will disable SMP
|
||||
entirely (the MPS table probe still happens, though).
|
||||
A command-line option of "maxcpus=<NUM>", where <NUM>
|
||||
is an integer greater than 0, limits the maximum number
|
||||
of CPUs activated in SMP mode to <NUM>.
|
||||
Using "maxcpus=1" on an SMP kernel is the trivial
|
||||
case of an SMP kernel with only one CPU.
|
||||
|
||||
max_addr=[KMG] [KNL,BOOT,ia64] All physical memory greater than or
|
||||
equal to this physical address is ignored.
|
||||
@ -1026,6 +1046,10 @@ and is between 256 and 4096 characters. It is defined in the file
|
||||
emulation library even if a 387 maths coprocessor
|
||||
is present.
|
||||
|
||||
noacpi [LIBATA] Disables use of ACPI in libata suspend/resume
|
||||
when set.
|
||||
Format: <int>
|
||||
|
||||
noaliencache [MM, NUMA] Disables the allcoation of alien caches in
|
||||
the slab allocator. Saves per-node memory, but will
|
||||
impact performance on real NUMA hardware.
|
||||
@ -1070,6 +1094,10 @@ and is between 256 and 4096 characters. It is defined in the file
|
||||
in certain environments such as networked servers or
|
||||
real-time systems.
|
||||
|
||||
nohz= [KNL] Boottime enable/disable dynamic ticks
|
||||
Valid arguments: on, off
|
||||
Default: on
|
||||
|
||||
noirqbalance [IA-32,SMP,KNL] Disable kernel irq balancing
|
||||
|
||||
noirqdebug [IA-32] Disables the code which attempts to detect and
|
||||
@ -1259,6 +1287,12 @@ and is between 256 and 4096 characters. It is defined in the file
|
||||
This sorting is done to get a device
|
||||
order compatible with older (<= 2.4) kernels.
|
||||
nobfsort Don't sort PCI devices into breadth-first order.
|
||||
cbiosize=nn[KMG] The fixed amount of bus space which is
|
||||
reserved for the CardBus bridge's IO window.
|
||||
The default value is 256 bytes.
|
||||
cbmemsize=nn[KMG] The fixed amount of bus space which is
|
||||
reserved for the CardBus bridge's memory
|
||||
window. The default value is 64 megabytes.
|
||||
|
||||
pcmv= [HW,PCMCIA] BadgePAD 4
|
||||
|
||||
@ -1396,6 +1430,8 @@ and is between 256 and 4096 characters. It is defined in the file
|
||||
in <PAGE_SIZE> units (needed only for swap files).
|
||||
See Documentation/power/swsusp-and-swap-files.txt
|
||||
|
||||
retain_initrd [RAM] Keep initrd memory after extraction
|
||||
|
||||
rhash_entries= [KNL,NET]
|
||||
Set number of hash buckets for route cache
|
||||
|
||||
|
163
Documentation/local_ops.txt
Normal file
163
Documentation/local_ops.txt
Normal file
@ -0,0 +1,163 @@
|
||||
Semantics and Behavior of Local Atomic Operations
|
||||
|
||||
Mathieu Desnoyers
|
||||
|
||||
|
||||
This document explains the purpose of the local atomic operations, how
|
||||
to implement them for any given architecture and shows how they can be used
|
||||
properly. It also stresses on the precautions that must be taken when reading
|
||||
those local variables across CPUs when the order of memory writes matters.
|
||||
|
||||
|
||||
|
||||
* Purpose of local atomic operations
|
||||
|
||||
Local atomic operations are meant to provide fast and highly reentrant per CPU
|
||||
counters. They minimize the performance cost of standard atomic operations by
|
||||
removing the LOCK prefix and memory barriers normally required to synchronize
|
||||
across CPUs.
|
||||
|
||||
Having fast per CPU atomic counters is interesting in many cases : it does not
|
||||
require disabling interrupts to protect from interrupt handlers and it permits
|
||||
coherent counters in NMI handlers. It is especially useful for tracing purposes
|
||||
and for various performance monitoring counters.
|
||||
|
||||
Local atomic operations only guarantee variable modification atomicity wrt the
|
||||
CPU which owns the data. Therefore, care must taken to make sure that only one
|
||||
CPU writes to the local_t data. This is done by using per cpu data and making
|
||||
sure that we modify it from within a preemption safe context. It is however
|
||||
permitted to read local_t data from any CPU : it will then appear to be written
|
||||
out of order wrt other memory writes on the owner CPU.
|
||||
|
||||
|
||||
* Implementation for a given architecture
|
||||
|
||||
It can be done by slightly modifying the standard atomic operations : only
|
||||
their UP variant must be kept. It typically means removing LOCK prefix (on
|
||||
i386 and x86_64) and any SMP sychronization barrier. If the architecture does
|
||||
not have a different behavior between SMP and UP, including asm-generic/local.h
|
||||
in your archtecture's local.h is sufficient.
|
||||
|
||||
The local_t type is defined as an opaque signed long by embedding an
|
||||
atomic_long_t inside a structure. This is made so a cast from this type to a
|
||||
long fails. The definition looks like :
|
||||
|
||||
typedef struct { atomic_long_t a; } local_t;
|
||||
|
||||
|
||||
* How to use local atomic operations
|
||||
|
||||
#include <linux/percpu.h>
|
||||
#include <asm/local.h>
|
||||
|
||||
static DEFINE_PER_CPU(local_t, counters) = LOCAL_INIT(0);
|
||||
|
||||
|
||||
* Counting
|
||||
|
||||
Counting is done on all the bits of a signed long.
|
||||
|
||||
In preemptible context, use get_cpu_var() and put_cpu_var() around local atomic
|
||||
operations : it makes sure that preemption is disabled around write access to
|
||||
the per cpu variable. For instance :
|
||||
|
||||
local_inc(&get_cpu_var(counters));
|
||||
put_cpu_var(counters);
|
||||
|
||||
If you are already in a preemption-safe context, you can directly use
|
||||
__get_cpu_var() instead.
|
||||
|
||||
local_inc(&__get_cpu_var(counters));
|
||||
|
||||
|
||||
|
||||
* Reading the counters
|
||||
|
||||
Those local counters can be read from foreign CPUs to sum the count. Note that
|
||||
the data seen by local_read across CPUs must be considered to be out of order
|
||||
relatively to other memory writes happening on the CPU that owns the data.
|
||||
|
||||
long sum = 0;
|
||||
for_each_online_cpu(cpu)
|
||||
sum += local_read(&per_cpu(counters, cpu));
|
||||
|
||||
If you want to use a remote local_read to synchronize access to a resource
|
||||
between CPUs, explicit smp_wmb() and smp_rmb() memory barriers must be used
|
||||
respectively on the writer and the reader CPUs. It would be the case if you use
|
||||
the local_t variable as a counter of bytes written in a buffer : there should
|
||||
be a smp_wmb() between the buffer write and the counter increment and also a
|
||||
smp_rmb() between the counter read and the buffer read.
|
||||
|
||||
|
||||
Here is a sample module which implements a basic per cpu counter using local.h.
|
||||
|
||||
--- BEGIN ---
|
||||
/* test-local.c
|
||||
*
|
||||
* Sample module for local.h usage.
|
||||
*/
|
||||
|
||||
|
||||
#include <asm/local.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/timer.h>
|
||||
|
||||
static DEFINE_PER_CPU(local_t, counters) = LOCAL_INIT(0);
|
||||
|
||||
static struct timer_list test_timer;
|
||||
|
||||
/* IPI called on each CPU. */
|
||||
static void test_each(void *info)
|
||||
{
|
||||
/* Increment the counter from a non preemptible context */
|
||||
printk("Increment on cpu %d\n", smp_processor_id());
|
||||
local_inc(&__get_cpu_var(counters));
|
||||
|
||||
/* This is what incrementing the variable would look like within a
|
||||
* preemptible context (it disables preemption) :
|
||||
*
|
||||
* local_inc(&get_cpu_var(counters));
|
||||
* put_cpu_var(counters);
|
||||
*/
|
||||
}
|
||||
|
||||
static void do_test_timer(unsigned long data)
|
||||
{
|
||||
int cpu;
|
||||
|
||||
/* Increment the counters */
|
||||
on_each_cpu(test_each, NULL, 0, 1);
|
||||
/* Read all the counters */
|
||||
printk("Counters read from CPU %d\n", smp_processor_id());
|
||||
for_each_online_cpu(cpu) {
|
||||
printk("Read : CPU %d, count %ld\n", cpu,
|
||||
local_read(&per_cpu(counters, cpu)));
|
||||
}
|
||||
del_timer(&test_timer);
|
||||
test_timer.expires = jiffies + 1000;
|
||||
add_timer(&test_timer);
|
||||
}
|
||||
|
||||
static int __init test_init(void)
|
||||
{
|
||||
/* initialize the timer that will increment the counter */
|
||||
init_timer(&test_timer);
|
||||
test_timer.function = do_test_timer;
|
||||
test_timer.expires = jiffies + 1;
|
||||
add_timer(&test_timer);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void __exit test_exit(void)
|
||||
{
|
||||
del_timer_sync(&test_timer);
|
||||
}
|
||||
|
||||
module_init(test_init);
|
||||
module_exit(test_exit);
|
||||
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_AUTHOR("Mathieu Desnoyers");
|
||||
MODULE_DESCRIPTION("Local Atomic Ops");
|
||||
--- END ---
|
@ -67,8 +67,8 @@ nfsroot=[<server-ip>:]<root-dir>[,<nfs-options>]
|
||||
<nfs-options> Standard NFS options. All options are separated by commas.
|
||||
The following defaults are used:
|
||||
port = as given by server portmap daemon
|
||||
rsize = 1024
|
||||
wsize = 1024
|
||||
rsize = 4096
|
||||
wsize = 4096
|
||||
timeo = 7
|
||||
retrans = 3
|
||||
acregmin = 3
|
||||
|
@ -205,8 +205,8 @@ Tips on when/where to use the above attributes:
|
||||
exclusively called by the probe() routine, can be marked __devinit.
|
||||
Ditto for remove() and __devexit.
|
||||
|
||||
o If mydriver_probe() is marked with __devinit(), then all address
|
||||
references to mydriver_probe must use __devexit_p(mydriver_probe)
|
||||
o If mydriver_remove() is marked with __devexit(), then all address
|
||||
references to mydriver_remove must use __devexit_p(mydriver_remove)
|
||||
(in the struct pci_driver declaration for example).
|
||||
__devexit_p() will generate the function name _or_ NULL if the
|
||||
function will be discarded. For an example, see drivers/net/tg3.c.
|
||||
|
@ -497,7 +497,7 @@ looks like in practice.
|
||||
| |- device_type = "cpu"
|
||||
| |- reg = <0>
|
||||
| |- clock-frequency = <5f5e1000>
|
||||
| |- linux,boot-cpu
|
||||
| |- 64-bit
|
||||
| |- linux,phandle = <2>
|
||||
|
|
||||
o memory@0
|
||||
@ -509,7 +509,6 @@ looks like in practice.
|
||||
o chosen
|
||||
|- name = "chosen"
|
||||
|- bootargs = "root=/dev/sda2"
|
||||
|- linux,platform = <00000600>
|
||||
|- linux,phandle = <4>
|
||||
|
||||
This tree is almost a minimal tree. It pretty much contains the
|
||||
@ -519,7 +518,7 @@ physical memory layout. It also includes misc information passed
|
||||
through /chosen, like in this example, the platform type (mandatory)
|
||||
and the kernel command line arguments (optional).
|
||||
|
||||
The /cpus/PowerPC,970@0/linux,boot-cpu property is an example of a
|
||||
The /cpus/PowerPC,970@0/64-bit property is an example of a
|
||||
property without a value. All other properties have a value. The
|
||||
significance of the #address-cells and #size-cells properties will be
|
||||
explained in chapter IV which defines precisely the required nodes and
|
||||
@ -733,8 +732,7 @@ address which can extend beyond that limit.
|
||||
that typically get driven by the same platform code in the
|
||||
kernel, you would use a different "model" property but put a
|
||||
value in "compatible". The kernel doesn't directly use that
|
||||
value (see /chosen/linux,platform for how the kernel chooses a
|
||||
platform type) but it is generally useful.
|
||||
value but it is generally useful.
|
||||
|
||||
The root node is also generally where you add additional properties
|
||||
specific to your board like the serial number if any, that sort of
|
||||
@ -778,7 +776,6 @@ address which can extend beyond that limit.
|
||||
bytes
|
||||
- d-cache-size : one cell, size of L1 data cache in bytes
|
||||
- i-cache-size : one cell, size of L1 instruction cache in bytes
|
||||
- linux, boot-cpu : Should be defined if this cpu is the boot cpu.
|
||||
|
||||
Recommended properties:
|
||||
|
||||
@ -843,11 +840,6 @@ address which can extend beyond that limit.
|
||||
the prom_init() trampoline when booting with an OF client interface,
|
||||
but that you have to provide yourself when using the flattened format.
|
||||
|
||||
Required properties:
|
||||
|
||||
- linux,platform : This is your platform number as assigned by the
|
||||
architecture maintainers
|
||||
|
||||
Recommended properties:
|
||||
|
||||
- bootargs : This zero-terminated string is passed as the kernel
|
||||
@ -1334,6 +1326,9 @@ platforms are moved over to use the flattened-device-tree model.
|
||||
fsl-usb2-mph compatible controllers. Either this property or
|
||||
"port0" (or both) must be defined for "fsl-usb2-mph" compatible
|
||||
controllers.
|
||||
- dr_mode : indicates the working mode for "fsl-usb2-dr" compatible
|
||||
controllers. Can be "host", "peripheral", or "otg". Default to
|
||||
"host" if not defined for backward compatibility.
|
||||
|
||||
Recommended properties :
|
||||
- interrupts : <a b> where a is the interrupt number and b is a
|
||||
@ -1367,6 +1362,7 @@ platforms are moved over to use the flattened-device-tree model.
|
||||
#size-cells = <0>;
|
||||
interrupt-parent = <700>;
|
||||
interrupts = <26 1>;
|
||||
dr_mode = "otg";
|
||||
phy = "ulpi";
|
||||
};
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
MPC52xx Device Tree Bindings
|
||||
MPC5200 Device Tree Bindings
|
||||
----------------------------
|
||||
|
||||
(c) 2006 Secret Lab Technologies Ltd
|
||||
(c) 2006-2007 Secret Lab Technologies Ltd
|
||||
Grant Likely <grant.likely at secretlab.ca>
|
||||
|
||||
********** DRAFT ***********
|
||||
@ -20,11 +20,11 @@ described in Documentation/powerpc/booting-without-of.txt), or passed
|
||||
by Open Firmare (IEEE 1275) compatible firmware using an OF compatible
|
||||
client interface API.
|
||||
|
||||
This document specifies the requirements on the device-tree for mpc52xx
|
||||
This document specifies the requirements on the device-tree for mpc5200
|
||||
based boards. These requirements are above and beyond the details
|
||||
specified in either the OpenFirmware spec or booting-without-of.txt
|
||||
|
||||
All new mpc52xx-based boards are expected to match this document. In
|
||||
All new mpc5200-based boards are expected to match this document. In
|
||||
cases where this document is not sufficient to support a new board port,
|
||||
this document should be updated as part of adding the new board support.
|
||||
|
||||
@ -32,26 +32,26 @@ II - Philosophy
|
||||
===============
|
||||
The core of this document is naming convention. The whole point of
|
||||
defining this convention is to reduce or eliminate the number of
|
||||
special cases required to support a 52xx board. If all 52xx boards
|
||||
follow the same convention, then generic 52xx support code will work
|
||||
special cases required to support a 5200 board. If all 5200 boards
|
||||
follow the same convention, then generic 5200 support code will work
|
||||
rather than coding special cases for each new board.
|
||||
|
||||
This section tries to capture the thought process behind why the naming
|
||||
convention is what it is.
|
||||
|
||||
1. Node names
|
||||
-------------
|
||||
1. names
|
||||
---------
|
||||
There is strong convention/requirements already established for children
|
||||
of the root node. 'cpus' describes the processor cores, 'memory'
|
||||
describes memory, and 'chosen' provides boot configuration. Other nodes
|
||||
are added to describe devices attached to the processor local bus.
|
||||
Following convention already established with other system-on-chip
|
||||
processors, MPC52xx boards must have an 'soc5200' node as a child of the
|
||||
root node.
|
||||
|
||||
The soc5200 node holds child nodes for all on chip devices. Child nodes
|
||||
are typically named after the configured function. ie. the FEC node is
|
||||
named 'ethernet', and a PSC in uart mode is named 'serial'.
|
||||
Following convention already established with other system-on-chip
|
||||
processors, 5200 device trees should use the name 'soc5200' for the
|
||||
parent node of on chip devices, and the root node should be its parent.
|
||||
|
||||
Child nodes are typically named after the configured function. ie.
|
||||
the FEC node is named 'ethernet', and a PSC in uart mode is named 'serial'.
|
||||
|
||||
2. device_type property
|
||||
-----------------------
|
||||
@ -66,28 +66,47 @@ exactly.
|
||||
Since device_type isn't enough to match devices to drivers, there also
|
||||
needs to be a naming convention for the compatible property. Compatible
|
||||
is an list of device descriptions sorted from specific to generic. For
|
||||
the mpc52xx, the required format for each compatible value is
|
||||
<chip>-<device>[-<mode>]. At the minimum, the list shall contain two
|
||||
items; the first specifying the exact chip, and the second specifying
|
||||
mpc52xx for the chip.
|
||||
the mpc5200, the required format for each compatible value is
|
||||
<chip>-<device>[-<mode>]. The OS should be able to match a device driver
|
||||
to the device based solely on the compatible value. If two drivers
|
||||
match on the compatible list; the 'most compatible' driver should be
|
||||
selected.
|
||||
|
||||
ie. ethernet on mpc5200b: compatible = "mpc5200b-ethernet\0mpc52xx-ethernet"
|
||||
The split between the MPC5200 and the MPC5200B leaves a bit of a
|
||||
connundrum. How should the compatible property be set up to provide
|
||||
maximum compatability information; but still acurately describe the
|
||||
chip? For the MPC5200; the answer is easy. Most of the SoC devices
|
||||
originally appeared on the MPC5200. Since they didn't exist anywhere
|
||||
else; the 5200 compatible properties will contain only one item;
|
||||
"mpc5200-<device>".
|
||||
|
||||
The idea here is that most drivers will match to the most generic field
|
||||
in the compatible list (mpc52xx-*), but can also test the more specific
|
||||
field for enabling bug fixes or extra features.
|
||||
The 5200B is almost the same as the 5200, but not quite. It fixes
|
||||
silicon bugs and it adds a small number of enhancements. Most of the
|
||||
devices either provide exactly the same interface as on the 5200. A few
|
||||
devices have extra functions but still have a backwards compatible mode.
|
||||
To express this infomation as completely as possible, 5200B device trees
|
||||
should have two items in the compatible list;
|
||||
"mpc5200b-<device>\0mpc5200-<device>". It is *strongly* recommended
|
||||
that 5200B device trees follow this convention (instead of only listing
|
||||
the base mpc5200 item).
|
||||
|
||||
If another chip appear on the market with one of the mpc5200 SoC
|
||||
devices, then the compatible list should include mpc5200-<device>.
|
||||
|
||||
ie. ethernet on mpc5200: compatible = "mpc5200-ethernet"
|
||||
ethernet on mpc5200b: compatible = "mpc5200b-ethernet\0mpc5200-ethernet"
|
||||
|
||||
Modal devices, like PSCs, also append the configured function to the
|
||||
end of the compatible field. ie. A PSC in i2s mode would specify
|
||||
"mpc52xx-psc-i2s", not "mpc52xx-i2s". This convention is chosen to
|
||||
"mpc5200-psc-i2s", not "mpc5200-i2s". This convention is chosen to
|
||||
avoid naming conflicts with non-psc devices providing the same
|
||||
function. For example, "mpc52xx-spi" and "mpc52xx-psc-spi" describe
|
||||
function. For example, "mpc5200-spi" and "mpc5200-psc-spi" describe
|
||||
the mpc5200 simple spi device and a PSC spi mode respectively.
|
||||
|
||||
If the soc device is more generic and present on other SOCs, the
|
||||
compatible property can specify the more generic device type also.
|
||||
|
||||
ie. mscan: compatible = "mpc5200-mscan\0mpc52xx-mscan\0fsl,mscan";
|
||||
ie. mscan: compatible = "mpc5200-mscan\0fsl,mscan";
|
||||
|
||||
At the time of writing, exact chip may be either 'mpc5200' or
|
||||
'mpc5200b'.
|
||||
@ -96,7 +115,7 @@ Device drivers should always try to match as generically as possible.
|
||||
|
||||
III - Structure
|
||||
===============
|
||||
The device tree for an mpc52xx board follows the structure defined in
|
||||
The device tree for an mpc5200 board follows the structure defined in
|
||||
booting-without-of.txt with the following additional notes:
|
||||
|
||||
0) the root node
|
||||
@ -115,7 +134,7 @@ Typical memory description node; see booting-without-of.
|
||||
|
||||
3) The soc5200 node
|
||||
-------------------
|
||||
This node describes the on chip SOC peripherals. Every mpc52xx based
|
||||
This node describes the on chip SOC peripherals. Every mpc5200 based
|
||||
board will have this node, and as such there is a common naming
|
||||
convention for SOC devices.
|
||||
|
||||
@ -125,71 +144,111 @@ name type description
|
||||
device_type string must be "soc"
|
||||
ranges int should be <0 baseaddr baseaddr+10000>
|
||||
reg int must be <baseaddr 10000>
|
||||
compatible string mpc5200: "mpc5200-soc"
|
||||
mpc5200b: "mpc5200b-soc\0mpc5200-soc"
|
||||
system-frequency int Fsystem frequency; source of all
|
||||
other clocks.
|
||||
bus-frequency int IPB bus frequency in HZ. Clock rate
|
||||
used by most of the soc devices.
|
||||
#interrupt-cells int must be <3>.
|
||||
|
||||
Recommended properties:
|
||||
name type description
|
||||
---- ---- -----------
|
||||
compatible string should be "<chip>-soc\0mpc52xx-soc"
|
||||
ie. "mpc5200b-soc\0mpc52xx-soc"
|
||||
#interrupt-cells int must be <3>. If it is not defined
|
||||
here then it must be defined in every
|
||||
soc device node.
|
||||
bus-frequency int IPB bus frequency in HZ. Clock rate
|
||||
used by most of the soc devices.
|
||||
Defining it here avoids needing it
|
||||
added to every device node.
|
||||
model string Exact model of the chip;
|
||||
ie: model="fsl,mpc5200"
|
||||
revision string Silicon revision of chip
|
||||
ie: revision="M08A"
|
||||
|
||||
The 'model' and 'revision' properties are *strongly* recommended. Having
|
||||
them presence acts as a bit of a safety net for working around as yet
|
||||
undiscovered bugs on one version of silicon. For example, device drivers
|
||||
can use the model and revision properties to decide if a bug fix should
|
||||
be turned on.
|
||||
|
||||
4) soc5200 child nodes
|
||||
----------------------
|
||||
Any on chip SOC devices available to Linux must appear as soc5200 child nodes.
|
||||
|
||||
Note: in the tables below, '*' matches all <chip> values. ie.
|
||||
*-pic would translate to "mpc5200-pic\0mpc52xx-pic"
|
||||
Note: The tables below show the value for the mpc5200. A mpc5200b device
|
||||
tree should use the "mpc5200b-<device>\0mpc5200-<device> form.
|
||||
|
||||
Required soc5200 child nodes:
|
||||
name device_type compatible Description
|
||||
---- ----------- ---------- -----------
|
||||
cdm@<addr> cdm *-cmd Clock Distribution
|
||||
pic@<addr> interrupt-controller *-pic need an interrupt
|
||||
cdm@<addr> cdm mpc5200-cmd Clock Distribution
|
||||
pic@<addr> interrupt-controller mpc5200-pic need an interrupt
|
||||
controller to boot
|
||||
bestcomm@<addr> dma-controller *-bestcomm 52xx pic also requires
|
||||
the bestcomm device
|
||||
bestcomm@<addr> dma-controller mpc5200-bestcomm 5200 pic also requires
|
||||
the bestcomm device
|
||||
|
||||
Recommended soc5200 child nodes; populate as needed for your board
|
||||
name device_type compatible Description
|
||||
---- ----------- ---------- -----------
|
||||
gpt@<addr> gpt *-gpt General purpose timers
|
||||
rtc@<addr> rtc *-rtc Real time clock
|
||||
mscan@<addr> mscan *-mscan CAN bus controller
|
||||
pci@<addr> pci *-pci PCI bridge
|
||||
serial@<addr> serial *-psc-uart PSC in serial mode
|
||||
i2s@<addr> sound *-psc-i2s PSC in i2s mode
|
||||
ac97@<addr> sound *-psc-ac97 PSC in ac97 mode
|
||||
spi@<addr> spi *-psc-spi PSC in spi mode
|
||||
irda@<addr> irda *-psc-irda PSC in IrDA mode
|
||||
spi@<addr> spi *-spi MPC52xx spi device
|
||||
ethernet@<addr> network *-fec MPC52xx ethernet device
|
||||
ata@<addr> ata *-ata IDE ATA interface
|
||||
i2c@<addr> i2c *-i2c I2C controller
|
||||
usb@<addr> usb-ohci-be *-ohci,ohci-be USB controller
|
||||
xlb@<addr> xlb *-xlb XLB arbritrator
|
||||
name device_type compatible Description
|
||||
---- ----------- ---------- -----------
|
||||
gpt@<addr> gpt mpc5200-gpt General purpose timers
|
||||
rtc@<addr> rtc mpc5200-rtc Real time clock
|
||||
mscan@<addr> mscan mpc5200-mscan CAN bus controller
|
||||
pci@<addr> pci mpc5200-pci PCI bridge
|
||||
serial@<addr> serial mpc5200-psc-uart PSC in serial mode
|
||||
i2s@<addr> sound mpc5200-psc-i2s PSC in i2s mode
|
||||
ac97@<addr> sound mpc5200-psc-ac97 PSC in ac97 mode
|
||||
spi@<addr> spi mpc5200-psc-spi PSC in spi mode
|
||||
irda@<addr> irda mpc5200-psc-irda PSC in IrDA mode
|
||||
spi@<addr> spi mpc5200-spi MPC5200 spi device
|
||||
ethernet@<addr> network mpc5200-fec MPC5200 ethernet device
|
||||
ata@<addr> ata mpc5200-ata IDE ATA interface
|
||||
i2c@<addr> i2c mpc5200-i2c I2C controller
|
||||
usb@<addr> usb-ohci-be mpc5200-ohci,ohci-be USB controller
|
||||
xlb@<addr> xlb mpc5200-xlb XLB arbritrator
|
||||
|
||||
Important child node properties
|
||||
name type description
|
||||
---- ---- -----------
|
||||
cell-index int When multiple devices are present, is the
|
||||
index of the device in the hardware (ie. There
|
||||
are 6 PSC on the 5200 numbered PSC1 to PSC6)
|
||||
PSC1 has 'cell-index = <0>'
|
||||
PSC4 has 'cell-index = <3>'
|
||||
|
||||
5) General Purpose Timer nodes (child of soc5200 node)
|
||||
On the mpc5200 and 5200b, GPT0 has a watchdog timer function. If the board
|
||||
design supports the internal wdt, then the device node for GPT0 should
|
||||
include the empty property 'has-wdt'.
|
||||
|
||||
6) PSC nodes (child of soc5200 node)
|
||||
PSC nodes can define the optional 'port-number' property to force assignment
|
||||
order of serial ports. For example, PSC5 might be physically connected to
|
||||
the port labeled 'COM1' and PSC1 wired to 'COM1'. In this case, PSC5 would
|
||||
have a "port-number = <0>" property, and PSC1 would have "port-number = <1>".
|
||||
|
||||
PSC in i2s mode: The mpc5200 and mpc5200b PSCs are not compatible when in
|
||||
i2s mode. An 'mpc5200b-psc-i2s' node cannot include 'mpc5200-psc-i2s' in the
|
||||
compatible field.
|
||||
|
||||
IV - Extra Notes
|
||||
================
|
||||
|
||||
1. Interrupt mapping
|
||||
--------------------
|
||||
The mpc52xx pic driver splits hardware IRQ numbers into two levels. The
|
||||
The mpc5200 pic driver splits hardware IRQ numbers into two levels. The
|
||||
split reflects the layout of the PIC hardware itself, which groups
|
||||
interrupts into one of three groups; CRIT, MAIN or PERP. Also, the
|
||||
Bestcomm dma engine has it's own set of interrupt sources which are
|
||||
cascaded off of peripheral interrupt 0, which the driver interprets as a
|
||||
fourth group, SDMA.
|
||||
|
||||
The interrupts property for device nodes using the mpc52xx pic consists
|
||||
The interrupts property for device nodes using the mpc5200 pic consists
|
||||
of three cells; <L1 L2 level>
|
||||
|
||||
L1 := [CRIT=0, MAIN=1, PERP=2, SDMA=3]
|
||||
L2 := interrupt number; directly mapped from the value in the
|
||||
"ICTL PerStat, MainStat, CritStat Encoded Register"
|
||||
level := [LEVEL_HIGH=0, EDGE_RISING=1, EDGE_FALLING=2, LEVEL_LOW=3]
|
||||
|
||||
2. Shared registers
|
||||
-------------------
|
||||
Some SoC devices share registers between them. ie. the i2c devices use
|
||||
a single clock control register, and almost all device are affected by
|
||||
the port_config register. Devices which need to manipulate shared regs
|
||||
should look to the parent SoC node. The soc node is responsible
|
||||
for arbitrating all shared register access.
|
||||
|
192
Documentation/rbtree.txt
Normal file
192
Documentation/rbtree.txt
Normal file
@ -0,0 +1,192 @@
|
||||
Red-black Trees (rbtree) in Linux
|
||||
January 18, 2007
|
||||
Rob Landley <rob@landley.net>
|
||||
=============================
|
||||
|
||||
What are red-black trees, and what are they for?
|
||||
------------------------------------------------
|
||||
|
||||
Red-black trees are a type of self-balancing binary search tree, used for
|
||||
storing sortable key/value data pairs. This differs from radix trees (which
|
||||
are used to efficiently store sparse arrays and thus use long integer indexes
|
||||
to insert/access/delete nodes) and hash tables (which are not kept sorted to
|
||||
be easily traversed in order, and must be tuned for a specific size and
|
||||
hash function where rbtrees scale gracefully storing arbitrary keys).
|
||||
|
||||
Red-black trees are similar to AVL trees, but provide faster real-time bounded
|
||||
worst case performance for insertion and deletion (at most two rotations and
|
||||
three rotations, respectively, to balance the tree), with slightly slower
|
||||
(but still O(log n)) lookup time.
|
||||
|
||||
To quote Linux Weekly News:
|
||||
|
||||
There are a number of red-black trees in use in the kernel.
|
||||
The anticipatory, deadline, and CFQ I/O schedulers all employ
|
||||
rbtrees to track requests; the packet CD/DVD driver does the same.
|
||||
The high-resolution timer code uses an rbtree to organize outstanding
|
||||
timer requests. The ext3 filesystem tracks directory entries in a
|
||||
red-black tree. Virtual memory areas (VMAs) are tracked with red-black
|
||||
trees, as are epoll file descriptors, cryptographic keys, and network
|
||||
packets in the "hierarchical token bucket" scheduler.
|
||||
|
||||
This document covers use of the Linux rbtree implementation. For more
|
||||
information on the nature and implementation of Red Black Trees, see:
|
||||
|
||||
Linux Weekly News article on red-black trees
|
||||
http://lwn.net/Articles/184495/
|
||||
|
||||
Wikipedia entry on red-black trees
|
||||
http://en.wikipedia.org/wiki/Red-black_tree
|
||||
|
||||
Linux implementation of red-black trees
|
||||
---------------------------------------
|
||||
|
||||
Linux's rbtree implementation lives in the file "lib/rbtree.c". To use it,
|
||||
"#include <linux/rbtree.h>".
|
||||
|
||||
The Linux rbtree implementation is optimized for speed, and thus has one
|
||||
less layer of indirection (and better cache locality) than more traditional
|
||||
tree implementations. Instead of using pointers to separate rb_node and data
|
||||
structures, each instance of struct rb_node is embedded in the data structure
|
||||
it organizes. And instead of using a comparison callback function pointer,
|
||||
users are expected to write their own tree search and insert functions
|
||||
which call the provided rbtree functions. Locking is also left up to the
|
||||
user of the rbtree code.
|
||||
|
||||
Creating a new rbtree
|
||||
---------------------
|
||||
|
||||
Data nodes in an rbtree tree are structures containing a struct rb_node member:
|
||||
|
||||
struct mytype {
|
||||
struct rb_node node;
|
||||
char *keystring;
|
||||
};
|
||||
|
||||
When dealing with a pointer to the embedded struct rb_node, the containing data
|
||||
structure may be accessed with the standard container_of() macro. In addition,
|
||||
individual members may be accessed directly via rb_entry(node, type, member).
|
||||
|
||||
At the root of each rbtree is an rb_root structure, which is initialized to be
|
||||
empty via:
|
||||
|
||||
struct rb_root mytree = RB_ROOT;
|
||||
|
||||
Searching for a value in an rbtree
|
||||
----------------------------------
|
||||
|
||||
Writing a search function for your tree is fairly straightforward: start at the
|
||||
root, compare each value, and follow the left or right branch as necessary.
|
||||
|
||||
Example:
|
||||
|
||||
struct mytype *my_search(struct rb_root *root, char *string)
|
||||
{
|
||||
struct rb_node *node = root->rb_node;
|
||||
|
||||
while (node) {
|
||||
struct mytype *data = container_of(node, struct mytype, node);
|
||||
int result;
|
||||
|
||||
result = strcmp(string, data->keystring);
|
||||
|
||||
if (result < 0)
|
||||
node = node->rb_left;
|
||||
else if (result > 0)
|
||||
node = node->rb_right;
|
||||
else
|
||||
return data;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
Inserting data into an rbtree
|
||||
-----------------------------
|
||||
|
||||
Inserting data in the tree involves first searching for the place to insert the
|
||||
new node, then inserting the node and rebalancing ("recoloring") the tree.
|
||||
|
||||
The search for insertion differs from the previous search by finding the
|
||||
location of the pointer on which to graft the new node. The new node also
|
||||
needs a link to its parent node for rebalancing purposes.
|
||||
|
||||
Example:
|
||||
|
||||
int my_insert(struct rb_root *root, struct mytype *data)
|
||||
{
|
||||
struct rb_node **new = &(root->rb_node), *parent = NULL;
|
||||
|
||||
/* Figure out where to put new node */
|
||||
while (*new) {
|
||||
struct mytype *this = container_of(*new, struct mytype, node);
|
||||
int result = strcmp(data->keystring, this->keystring);
|
||||
|
||||
parent = *new;
|
||||
if (result < 0)
|
||||
new = &((*new)->rb_left);
|
||||
else if (result > 0)
|
||||
new = &((*new)->rb_right);
|
||||
else
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/* Add new node and rebalance tree. */
|
||||
rb_link_node(data->node, parent, new);
|
||||
rb_insert_color(data->node, root);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
Removing or replacing existing data in an rbtree
|
||||
------------------------------------------------
|
||||
|
||||
To remove an existing node from a tree, call:
|
||||
|
||||
void rb_erase(struct rb_node *victim, struct rb_root *tree);
|
||||
|
||||
Example:
|
||||
|
||||
struct mytype *data = mysearch(mytree, "walrus");
|
||||
|
||||
if (data) {
|
||||
rb_erase(data->node, mytree);
|
||||
myfree(data);
|
||||
}
|
||||
|
||||
To replace an existing node in a tree with a new one with the same key, call:
|
||||
|
||||
void rb_replace_node(struct rb_node *old, struct rb_node *new,
|
||||
struct rb_root *tree);
|
||||
|
||||
Replacing a node this way does not re-sort the tree: If the new node doesn't
|
||||
have the same key as the old node, the rbtree will probably become corrupted.
|
||||
|
||||
Iterating through the elements stored in an rbtree (in sort order)
|
||||
------------------------------------------------------------------
|
||||
|
||||
Four functions are provided for iterating through an rbtree's contents in
|
||||
sorted order. These work on arbitrary trees, and should not need to be
|
||||
modified or wrapped (except for locking purposes):
|
||||
|
||||
struct rb_node *rb_first(struct rb_root *tree);
|
||||
struct rb_node *rb_last(struct rb_root *tree);
|
||||
struct rb_node *rb_next(struct rb_node *node);
|
||||
struct rb_node *rb_prev(struct rb_node *node);
|
||||
|
||||
To start iterating, call rb_first() or rb_last() with a pointer to the root
|
||||
of the tree, which will return a pointer to the node structure contained in
|
||||
the first or last element in the tree. To continue, fetch the next or previous
|
||||
node by calling rb_next() or rb_prev() on the current node. This will return
|
||||
NULL when there are no more nodes left.
|
||||
|
||||
The iterator functions return a pointer to the embedded struct rb_node, from
|
||||
which the containing data structure may be accessed with the container_of()
|
||||
macro, and individual members may be accessed directly via
|
||||
rb_entry(node, type, member).
|
||||
|
||||
Example:
|
||||
|
||||
struct rb_node *node;
|
||||
for (node = rb_first(&mytree); node; node = rb_next(node))
|
||||
printk("key=%s\n", rb_entry(node, int, keystring));
|
||||
|
@ -149,7 +149,7 @@ RTC class framework, but can't be supported by the older driver.
|
||||
is connected to an IRQ line, it can often issue an alarm IRQ up to
|
||||
24 hours in the future.
|
||||
|
||||
* RTC_WKALM_SET, RTC_WKALM_READ ... RTCs that can issue alarms beyond
|
||||
* RTC_WKALM_SET, RTC_WKALM_RD ... RTCs that can issue alarms beyond
|
||||
the next 24 hours use a slightly more powerful API, which supports
|
||||
setting the longer alarm time and enabling its IRQ using a single
|
||||
request (using the same model as EFI firmware).
|
||||
@ -167,6 +167,28 @@ Linux out of a low power sleep state (or hibernation) back to a fully
|
||||
operational state. For example, a system could enter a deep power saving
|
||||
state until it's time to execute some scheduled tasks.
|
||||
|
||||
Note that many of these ioctls need not actually be implemented by your
|
||||
driver. The common rtc-dev interface handles many of these nicely if your
|
||||
driver returns ENOIOCTLCMD. Some common examples:
|
||||
|
||||
* RTC_RD_TIME, RTC_SET_TIME: the read_time/set_time functions will be
|
||||
called with appropriate values.
|
||||
|
||||
* RTC_ALM_SET, RTC_ALM_READ, RTC_WKALM_SET, RTC_WKALM_RD: the
|
||||
set_alarm/read_alarm functions will be called. To differentiate
|
||||
between the ALM and WKALM, check the larger fields of the rtc_wkalrm
|
||||
struct (like tm_year). These will be set to -1 when using ALM and
|
||||
will be set to proper values when using WKALM.
|
||||
|
||||
* RTC_IRQP_SET, RTC_IRQP_READ: the irq_set_freq function will be called
|
||||
to set the frequency while the framework will handle the read for you
|
||||
since the frequency is stored in the irq_freq member of the rtc_device
|
||||
structure. Also make sure you set the max_user_freq member in your
|
||||
initialization routines so the framework can sanity check the user
|
||||
input for you.
|
||||
|
||||
If all else fails, check out the rtc-test.c driver!
|
||||
|
||||
|
||||
-------------------- 8< ---------------- 8< -----------------------------
|
||||
|
||||
@ -237,7 +259,7 @@ int main(int argc, char **argv)
|
||||
"\n...Update IRQs not supported.\n");
|
||||
goto test_READ;
|
||||
}
|
||||
perror("ioctl");
|
||||
perror("RTC_UIE_ON ioctl");
|
||||
exit(errno);
|
||||
}
|
||||
|
||||
@ -284,7 +306,7 @@ int main(int argc, char **argv)
|
||||
/* Turn off update interrupts */
|
||||
retval = ioctl(fd, RTC_UIE_OFF, 0);
|
||||
if (retval == -1) {
|
||||
perror("ioctl");
|
||||
perror("RTC_UIE_OFF ioctl");
|
||||
exit(errno);
|
||||
}
|
||||
|
||||
@ -292,7 +314,7 @@ test_READ:
|
||||
/* Read the RTC time/date */
|
||||
retval = ioctl(fd, RTC_RD_TIME, &rtc_tm);
|
||||
if (retval == -1) {
|
||||
perror("ioctl");
|
||||
perror("RTC_RD_TIME ioctl");
|
||||
exit(errno);
|
||||
}
|
||||
|
||||
@ -320,14 +342,14 @@ test_READ:
|
||||
"\n...Alarm IRQs not supported.\n");
|
||||
goto test_PIE;
|
||||
}
|
||||
perror("ioctl");
|
||||
perror("RTC_ALM_SET ioctl");
|
||||
exit(errno);
|
||||
}
|
||||
|
||||
/* Read the current alarm settings */
|
||||
retval = ioctl(fd, RTC_ALM_READ, &rtc_tm);
|
||||
if (retval == -1) {
|
||||
perror("ioctl");
|
||||
perror("RTC_ALM_READ ioctl");
|
||||
exit(errno);
|
||||
}
|
||||
|
||||
@ -337,7 +359,7 @@ test_READ:
|
||||
/* Enable alarm interrupts */
|
||||
retval = ioctl(fd, RTC_AIE_ON, 0);
|
||||
if (retval == -1) {
|
||||
perror("ioctl");
|
||||
perror("RTC_AIE_ON ioctl");
|
||||
exit(errno);
|
||||
}
|
||||
|
||||
@ -355,7 +377,7 @@ test_READ:
|
||||
/* Disable alarm interrupts */
|
||||
retval = ioctl(fd, RTC_AIE_OFF, 0);
|
||||
if (retval == -1) {
|
||||
perror("ioctl");
|
||||
perror("RTC_AIE_OFF ioctl");
|
||||
exit(errno);
|
||||
}
|
||||
|
||||
@ -368,7 +390,7 @@ test_PIE:
|
||||
fprintf(stderr, "\nNo periodic IRQ support\n");
|
||||
return 0;
|
||||
}
|
||||
perror("ioctl");
|
||||
perror("RTC_IRQP_READ ioctl");
|
||||
exit(errno);
|
||||
}
|
||||
fprintf(stderr, "\nPeriodic IRQ rate is %ldHz.\n", tmp);
|
||||
@ -387,7 +409,7 @@ test_PIE:
|
||||
"\n...Periodic IRQ rate is fixed\n");
|
||||
goto done;
|
||||
}
|
||||
perror("ioctl");
|
||||
perror("RTC_IRQP_SET ioctl");
|
||||
exit(errno);
|
||||
}
|
||||
|
||||
@ -397,7 +419,7 @@ test_PIE:
|
||||
/* Enable periodic interrupts */
|
||||
retval = ioctl(fd, RTC_PIE_ON, 0);
|
||||
if (retval == -1) {
|
||||
perror("ioctl");
|
||||
perror("RTC_PIE_ON ioctl");
|
||||
exit(errno);
|
||||
}
|
||||
|
||||
@ -416,7 +438,7 @@ test_PIE:
|
||||
/* Disable periodic interrupts */
|
||||
retval = ioctl(fd, RTC_PIE_OFF, 0);
|
||||
if (retval == -1) {
|
||||
perror("ioctl");
|
||||
perror("RTC_PIE_OFF ioctl");
|
||||
exit(errno);
|
||||
}
|
||||
}
|
||||
|
@ -480,7 +480,7 @@ r2 argument 0 / return value 0 call-clobbered
|
||||
r3 argument 1 / return value 1 (if long long) call-clobbered
|
||||
r4 argument 2 call-clobbered
|
||||
r5 argument 3 call-clobbered
|
||||
r6 argument 5 saved
|
||||
r6 argument 4 saved
|
||||
r7 pointer-to arguments 5 to ... saved
|
||||
r8 this & that saved
|
||||
r9 this & that saved
|
||||
|
@ -1,3 +1,19 @@
|
||||
Release Date : Thu Nov 16 15:32:35 EST 2006 -
|
||||
Sumant Patro <sumant.patro@lsi.com>
|
||||
Current Version : 2.20.5.1 (scsi module), 2.20.2.6 (cmm module)
|
||||
Older Version : 2.20.4.9 (scsi module), 2.20.2.6 (cmm module)
|
||||
|
||||
1. Changes in Initialization to fix kdump failure.
|
||||
Send SYNC command on loading.
|
||||
This command clears the pending commands in the adapter
|
||||
and re-initialize its internal RAID structure.
|
||||
Without this change, megaraid driver either panics or fails to
|
||||
initialize the adapter during kdump's second kernel boot
|
||||
if there are pending commands or interrupts from other devices
|
||||
sharing the same IRQ.
|
||||
2. Authors email-id domain name changed from lsil.com to lsi.com.
|
||||
Also modified the MODULE_AUTHOR to megaraidlinux@lsi.com
|
||||
|
||||
Release Date : Fri May 19 09:31:45 EST 2006 - Seokmann Ju <sju@lsil.com>
|
||||
Current Version : 2.20.4.9 (scsi module), 2.20.2.6 (cmm module)
|
||||
Older Version : 2.20.4.8 (scsi module), 2.20.2.6 (cmm module)
|
||||
|
@ -17,7 +17,7 @@ of the board-specific code (with the exception of stboards) ended up
|
||||
in arch/sh/kernel/ directly, with board-specific headers ending up in
|
||||
include/asm-sh/. For the new kernel, things are broken out by board type,
|
||||
companion chip type, and CPU type. Looking at a tree view of this directory
|
||||
heirarchy looks like the following:
|
||||
hierarchy looks like the following:
|
||||
|
||||
Board-specific code:
|
||||
|
||||
@ -108,7 +108,7 @@ overloading), and you can feel free to name the directory after the family
|
||||
member itself.
|
||||
|
||||
There are a few things that each board is required to have, both in the
|
||||
arch/sh/boards and the include/asm-sh/ heirarchy. In order to better
|
||||
arch/sh/boards and the include/asm-sh/ hierarchy. In order to better
|
||||
explain this, we use some examples for adding an imaginary board. For
|
||||
setup code, we're required at the very least to provide definitions for
|
||||
get_system_type() and platform_setup(). For our imaginary board, this
|
||||
|
106
Documentation/sony-laptop.txt
Normal file
106
Documentation/sony-laptop.txt
Normal file
@ -0,0 +1,106 @@
|
||||
Sony Notebook Control Driver (SNC) Readme
|
||||
-----------------------------------------
|
||||
Copyright (C) 2004- 2005 Stelian Pop <stelian@popies.net>
|
||||
Copyright (C) 2007 Mattia Dongili <malattia@linux.it>
|
||||
|
||||
This mini-driver drives the SNC device present in the ACPI BIOS of
|
||||
the Sony Vaio laptops.
|
||||
|
||||
It gives access to some extra laptop functionalities. In its current
|
||||
form, this driver let the user set or query the screen brightness
|
||||
through the backlight subsystem and remove/apply power to some devices.
|
||||
|
||||
Backlight control:
|
||||
------------------
|
||||
If your laptop model supports it, you will find sysfs files in the
|
||||
/sys/class/backlight/sony/
|
||||
directory. You will be able to query and set the current screen
|
||||
brightness:
|
||||
brightness get/set screen brightness (an iteger
|
||||
between 0 and 7)
|
||||
actual_brightness reading from this file will query the HW
|
||||
to get real brightness value
|
||||
max_brightness the maximum brightness value
|
||||
|
||||
|
||||
Platform specific:
|
||||
------------------
|
||||
Loading the sony-laptop module will create a
|
||||
/sys/devices/platform/sony-laptop/
|
||||
directory populated with some files.
|
||||
|
||||
You then read/write integer values from/to those files by using
|
||||
standard UNIX tools.
|
||||
|
||||
The files are:
|
||||
brightness_default screen brightness which will be set
|
||||
when the laptop will be rebooted
|
||||
cdpower power on/off the internal CD drive
|
||||
audiopower power on/off the internal sound card
|
||||
lanpower power on/off the internal ethernet card
|
||||
(only in debug mode)
|
||||
|
||||
Note that some files may be missing if they are not supported
|
||||
by your particular laptop model.
|
||||
|
||||
Example usage:
|
||||
# echo "1" > /sys/devices/platform/sony-laptop/brightness_default
|
||||
sets the lowest screen brightness for the next and later reboots,
|
||||
# echo "8" > /sys/devices/platform/sony-laptop/brightness_default
|
||||
sets the highest screen brightness for the next and later reboots,
|
||||
# cat /sys/devices/platform/sony-laptop/brightness_default
|
||||
retrieves the value.
|
||||
|
||||
# echo "0" > /sys/devices/platform/sony-laptop/audiopower
|
||||
powers off the sound card,
|
||||
# echo "1" > /sys/devices/platform/sony-laptop/audiopower
|
||||
powers on the sound card.
|
||||
|
||||
Development:
|
||||
------------
|
||||
|
||||
If you want to help with the development of this driver (and
|
||||
you are not afraid of any side effects doing strange things with
|
||||
your ACPI BIOS could have on your laptop), load the driver and
|
||||
pass the option 'debug=1'.
|
||||
|
||||
REPEAT: DON'T DO THIS IF YOU DON'T LIKE RISKY BUSINESS.
|
||||
|
||||
In your kernel logs you will find the list of all ACPI methods
|
||||
the SNC device has on your laptop. You can see the GCDP/GCDP methods
|
||||
used to pwer on/off the CD drive, but there are others.
|
||||
|
||||
I HAVE NO IDEA WHAT THOSE METHODS DO.
|
||||
|
||||
The sony-laptop driver creates, for some of those methods (the most
|
||||
current ones found on several Vaio models), an entry under
|
||||
/sys/devices/platform/sony-laptop, just like the 'cdpower' one.
|
||||
You can create other entries corresponding to your own laptop methods by
|
||||
further editing the source (see the 'sony_acpi_values' table, and add a new
|
||||
entry to this table with your get/set method names using the
|
||||
HANDLE_NAMES macro).
|
||||
|
||||
Your mission, should you accept it, is to try finding out what
|
||||
those entries are for, by reading/writing random values from/to those
|
||||
files and find out what is the impact on your laptop.
|
||||
|
||||
Should you find anything interesting, please report it back to me,
|
||||
I will not disavow all knowledge of your actions :)
|
||||
|
||||
Bugs/Limitations:
|
||||
-----------------
|
||||
|
||||
* This driver is not based on official documentation from Sony
|
||||
(because there is none), so there is no guarantee this driver
|
||||
will work at all, or do the right thing. Although this hasn't
|
||||
happened to me, this driver could do very bad things to your
|
||||
laptop, including permanent damage.
|
||||
|
||||
* The sony-laptop and sonypi drivers do not interact at all. In the
|
||||
future, sonypi could use sony-laptop to do (part of) its business.
|
||||
|
||||
* spicctrl, which is the userspace tool used to communicate with the
|
||||
sonypi driver (through /dev/sonypi) does not try to use the
|
||||
sony-laptop driver. In the future, spicctrl could try sonypi first,
|
||||
and if it isn't present, try sony-laptop instead.
|
||||
|
@ -242,6 +242,12 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
|
||||
ac97_clock - AC'97 clock (default = 48000)
|
||||
ac97_quirk - AC'97 workaround for strange hardware
|
||||
See "AC97 Quirk Option" section below.
|
||||
ac97_codec - Workaround to specify which AC'97 codec
|
||||
instead of probing. If this works for you
|
||||
file a bug with your `lspci -vn` output.
|
||||
-2 -- Force probing.
|
||||
-1 -- Default behavior.
|
||||
0-2 -- Use the specified codec.
|
||||
spdif_aclink - S/PDIF transfer over AC-link (default = 1)
|
||||
|
||||
This module supports one card and autoprobe.
|
||||
@ -779,6 +785,7 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
|
||||
asus-dig ASUS with SPDIF out
|
||||
asus-dig2 ASUS with SPDIF out (using GPIO2)
|
||||
uniwill 3-jack
|
||||
fujitsu Fujitsu Laptops (Pi1536)
|
||||
F1734 2-jack
|
||||
lg LG laptop (m1 express dual)
|
||||
lg-lw LG LW20/LW25 laptop
|
||||
@ -800,14 +807,18 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
|
||||
ALC262
|
||||
fujitsu Fujitsu Laptop
|
||||
hp-bpc HP xw4400/6400/8400/9400 laptops
|
||||
hp-bpc-d7000 HP BPC D7000
|
||||
benq Benq ED8
|
||||
hippo Hippo (ATI) with jack detection, Sony UX-90s
|
||||
hippo_1 Hippo (Benq) with jack detection
|
||||
basic fixed pin assignment w/o SPDIF
|
||||
auto auto-config reading BIOS (default)
|
||||
|
||||
ALC882/885
|
||||
3stack-dig 3-jack with SPDIF I/O
|
||||
6stck-dig 6-jack digital with SPDIF I/O
|
||||
6stack-dig 6-jack digital with SPDIF I/O
|
||||
arima Arima W820Di1
|
||||
macpro MacPro support
|
||||
auto auto-config reading BIOS (default)
|
||||
|
||||
ALC883/888
|
||||
@ -817,6 +828,10 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
|
||||
3stack-6ch-dig 3-jack 6-channel with SPDIF I/O
|
||||
6stack-dig-demo 6-jack digital for Intel demo board
|
||||
acer Acer laptops (Travelmate 3012WTMi, Aspire 5600, etc)
|
||||
medion Medion Laptops
|
||||
targa-dig Targa/MSI
|
||||
targa-2ch-dig Targs/MSI with 2-channel
|
||||
laptop-eapd 3-jack with SPDIF I/O and EAPD (Clevo M540JE, M550JE)
|
||||
auto auto-config reading BIOS (default)
|
||||
|
||||
ALC861/660
|
||||
@ -825,6 +840,16 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
|
||||
6stack-dig 6-jack with SPDIF I/O
|
||||
3stack-660 3-jack (for ALC660)
|
||||
uniwill-m31 Uniwill M31 laptop
|
||||
toshiba Toshiba laptop support
|
||||
asus Asus laptop support
|
||||
asus-laptop ASUS F2/F3 laptops
|
||||
auto auto-config reading BIOS (default)
|
||||
|
||||
ALC861VD/660VD
|
||||
3stack 3-jack
|
||||
3stack-dig 3-jack with SPDIF OUT
|
||||
6stack-dig 6-jack with SPDIF OUT
|
||||
3stack-660 3-jack (for ALC660VD)
|
||||
auto auto-config reading BIOS (default)
|
||||
|
||||
CMI9880
|
||||
@ -845,6 +870,7 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
|
||||
3stack 3-stack, shared surrounds
|
||||
laptop 2-channel only (FSC V2060, Samsung M50)
|
||||
laptop-eapd 2-channel with EAPD (Samsung R65, ASUS A6J)
|
||||
ultra 2-channel with EAPD (Samsung Ultra tablet PC)
|
||||
|
||||
AD1988
|
||||
6stack 6-jack
|
||||
@ -854,12 +880,31 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
|
||||
laptop 3-jack with hp-jack automute
|
||||
laptop-dig ditto with SPDIF
|
||||
auto auto-config reading BIOS (default)
|
||||
|
||||
Conexant 5045
|
||||
laptop Laptop config
|
||||
test for testing/debugging purpose, almost all controls
|
||||
can be adjusted. Appearing only when compiled with
|
||||
$CONFIG_SND_DEBUG=y
|
||||
|
||||
Conexant 5047
|
||||
laptop Basic Laptop config
|
||||
laptop-hp Laptop config for some HP models (subdevice 30A5)
|
||||
laptop-eapd Laptop config with EAPD support
|
||||
test for testing/debugging purpose, almost all controls
|
||||
can be adjusted. Appearing only when compiled with
|
||||
$CONFIG_SND_DEBUG=y
|
||||
|
||||
STAC9200/9205/9220/9221/9254
|
||||
ref Reference board
|
||||
3stack D945 3stack
|
||||
5stack D945 5stack + SPDIF
|
||||
|
||||
STAC9202/9250/9251
|
||||
ref Reference board, base config
|
||||
m2-2 Some Gateway MX series laptops
|
||||
m6 Some Gateway NX series laptops
|
||||
|
||||
STAC9227/9228/9229/927x
|
||||
ref Reference board
|
||||
3stack D965 3stack
|
||||
@ -974,6 +1019,7 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
|
||||
Module for Envy24HT (VT/ICE1724), Envy24PT (VT1720) based PCI sound cards.
|
||||
* MidiMan M Audio Revolution 5.1
|
||||
* MidiMan M Audio Revolution 7.1
|
||||
* MidiMan M Audio Audiophile 192
|
||||
* AMP Ltd AUDIO2000
|
||||
* TerraTec Aureon 5.1 Sky
|
||||
* TerraTec Aureon 7.1 Space
|
||||
@ -993,7 +1039,7 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
|
||||
|
||||
model - Use the given board model, one of the following:
|
||||
revo51, revo71, amp2000, prodigy71, prodigy71lt,
|
||||
prodigy192, aureon51, aureon71, universe,
|
||||
prodigy192, aureon51, aureon71, universe, ap192,
|
||||
k8x800, phase22, phase28, ms300, av710
|
||||
|
||||
This module supports multiple cards and autoprobe.
|
||||
@ -1049,6 +1095,9 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
|
||||
buggy_semaphore - Enable workaround for hardwares with buggy
|
||||
semaphores (e.g. on some ASUS laptops)
|
||||
(default off)
|
||||
spdif_aclink - Use S/PDIF over AC-link instead of direct connection
|
||||
from the controller chip
|
||||
(0 = off, 1 = on, -1 = default)
|
||||
|
||||
This module supports one chip and autoprobe.
|
||||
|
||||
@ -1371,6 +1420,13 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
|
||||
|
||||
This module supports multiple cards.
|
||||
|
||||
Module snd-portman2x4
|
||||
---------------------
|
||||
|
||||
Module for Midiman Portman 2x4 parallel port MIDI interface
|
||||
|
||||
This module supports multiple cards.
|
||||
|
||||
Module snd-powermac (on ppc only)
|
||||
---------------------------------
|
||||
|
||||
|
@ -36,7 +36,7 @@
|
||||
</bookinfo>
|
||||
|
||||
<chapter><title>Management of Cards and Devices</title>
|
||||
<sect1><title>Card Managment</title>
|
||||
<sect1><title>Card Management</title>
|
||||
!Esound/core/init.c
|
||||
</sect1>
|
||||
<sect1><title>Device Components</title>
|
||||
@ -59,7 +59,7 @@
|
||||
<sect1><title>PCM Format Helpers</title>
|
||||
!Esound/core/pcm_misc.c
|
||||
</sect1>
|
||||
<sect1><title>PCM Memory Managment</title>
|
||||
<sect1><title>PCM Memory Management</title>
|
||||
!Esound/core/pcm_memory.c
|
||||
</sect1>
|
||||
</chapter>
|
||||
|
@ -1360,8 +1360,7 @@
|
||||
<informalexample>
|
||||
<programlisting>
|
||||
<![CDATA[
|
||||
static irqreturn_t snd_mychip_interrupt(int irq, void *dev_id,
|
||||
struct pt_regs *regs)
|
||||
static irqreturn_t snd_mychip_interrupt(int irq, void *dev_id)
|
||||
{
|
||||
struct mychip *chip = dev_id;
|
||||
....
|
||||
@ -2127,7 +2126,7 @@
|
||||
accessible via <constant>substream->runtime</constant>.
|
||||
This runtime pointer holds the various information; it holds
|
||||
the copy of hw_params and sw_params configurations, the buffer
|
||||
pointers, mmap records, spinlocks, etc. Almost everyhing you
|
||||
pointers, mmap records, spinlocks, etc. Almost everything you
|
||||
need for controlling the PCM can be found there.
|
||||
</para>
|
||||
|
||||
@ -2340,7 +2339,7 @@ struct _snd_pcm_runtime {
|
||||
|
||||
<para>
|
||||
When the PCM substreams can be synchronized (typically,
|
||||
synchorinized start/stop of a playback and a capture streams),
|
||||
synchronized start/stop of a playback and a capture streams),
|
||||
you can give <constant>SNDRV_PCM_INFO_SYNC_START</constant>,
|
||||
too. In this case, you'll need to check the linked-list of
|
||||
PCM substreams in the trigger callback. This will be
|
||||
@ -3062,8 +3061,7 @@ struct _snd_pcm_runtime {
|
||||
<title>Interrupt Handler Case #1</title>
|
||||
<programlisting>
|
||||
<![CDATA[
|
||||
static irqreturn_t snd_mychip_interrupt(int irq, void *dev_id,
|
||||
struct pt_regs *regs)
|
||||
static irqreturn_t snd_mychip_interrupt(int irq, void *dev_id)
|
||||
{
|
||||
struct mychip *chip = dev_id;
|
||||
spin_lock(&chip->lock);
|
||||
@ -3106,8 +3104,7 @@ struct _snd_pcm_runtime {
|
||||
<title>Interrupt Handler Case #2</title>
|
||||
<programlisting>
|
||||
<![CDATA[
|
||||
static irqreturn_t snd_mychip_interrupt(int irq, void *dev_id,
|
||||
struct pt_regs *regs)
|
||||
static irqreturn_t snd_mychip_interrupt(int irq, void *dev_id)
|
||||
{
|
||||
struct mychip *chip = dev_id;
|
||||
spin_lock(&chip->lock);
|
||||
@ -3247,7 +3244,7 @@ struct _snd_pcm_runtime {
|
||||
You can even define your own constraint rules.
|
||||
For example, let's suppose my_chip can manage a substream of 1 channel
|
||||
if and only if the format is S16_LE, otherwise it supports any format
|
||||
specified in the <structname>snd_pcm_hardware</structname> stucture (or in any
|
||||
specified in the <structname>snd_pcm_hardware</structname> structure (or in any
|
||||
other constraint_list). You can build a rule like this:
|
||||
|
||||
<example>
|
||||
@ -3690,16 +3687,6 @@ struct _snd_pcm_runtime {
|
||||
</example>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Here, the chip instance is retrieved via
|
||||
<function>snd_kcontrol_chip()</function> macro. This macro
|
||||
just accesses to kcontrol->private_data. The
|
||||
kcontrol->private_data field is
|
||||
given as the argument of <function>snd_ctl_new()</function>
|
||||
(see the later subsection
|
||||
<link linkend="control-interface-constructor"><citetitle>Constructor</citetitle></link>).
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The <structfield>value</structfield> field is depending on
|
||||
the type of control as well as on info callback. For example,
|
||||
@ -3780,7 +3767,7 @@ struct _snd_pcm_runtime {
|
||||
<para>
|
||||
Like <structfield>get</structfield> callback,
|
||||
when the control has more than one elements,
|
||||
all elemehts must be evaluated in this callback, too.
|
||||
all elements must be evaluated in this callback, too.
|
||||
</para>
|
||||
</section>
|
||||
|
||||
@ -5541,12 +5528,12 @@ struct _snd_pcm_runtime {
|
||||
#ifdef CONFIG_PM
|
||||
static int snd_my_suspend(struct pci_dev *pci, pm_message_t state)
|
||||
{
|
||||
.... /* do things for suspsend */
|
||||
.... /* do things for suspend */
|
||||
return 0;
|
||||
}
|
||||
static int snd_my_resume(struct pci_dev *pci)
|
||||
{
|
||||
.... /* do things for suspsend */
|
||||
.... /* do things for suspend */
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
@ -6111,7 +6098,7 @@ struct _snd_pcm_runtime {
|
||||
<!-- ****************************************************** -->
|
||||
<!-- Acknowledgments -->
|
||||
<!-- ****************************************************** -->
|
||||
<chapter id="acknowledments">
|
||||
<chapter id="acknowledgments">
|
||||
<title>Acknowledgments</title>
|
||||
<para>
|
||||
I would like to thank Phil Kerr for his help for improvement and
|
||||
|
@ -277,11 +277,11 @@ Helper Functions
|
||||
snd_hda_get_codec_name() stores the codec name on the given string.
|
||||
|
||||
snd_hda_check_board_config() can be used to obtain the configuration
|
||||
information matching with the device. Define the table with struct
|
||||
hda_board_config entries (zero-terminated), and pass it to the
|
||||
function. The function checks the modelname given as a module
|
||||
parameter, and PCI subsystem IDs. If the matching entry is found, it
|
||||
returns the config field value.
|
||||
information matching with the device. Define the model string table
|
||||
and the table with struct snd_pci_quirk entries (zero-terminated),
|
||||
and pass it to the function. The function checks the modelname given
|
||||
as a module parameter, and PCI subsystem IDs. If the matching entry
|
||||
is found, it returns the config field value.
|
||||
|
||||
snd_hda_add_new_ctls() can be used to create and add control entries.
|
||||
Pass the zero-terminated array of struct snd_kcontrol_new. The same array
|
||||
|
56
Documentation/sound/alsa/soc/DAI.txt
Normal file
56
Documentation/sound/alsa/soc/DAI.txt
Normal file
@ -0,0 +1,56 @@
|
||||
ASoC currently supports the three main Digital Audio Interfaces (DAI) found on
|
||||
SoC controllers and portable audio CODECS today, namely AC97, I2S and PCM.
|
||||
|
||||
|
||||
AC97
|
||||
====
|
||||
|
||||
AC97 is a five wire interface commonly found on many PC sound cards. It is
|
||||
now also popular in many portable devices. This DAI has a reset line and time
|
||||
multiplexes its data on its SDATA_OUT (playback) and SDATA_IN (capture) lines.
|
||||
The bit clock (BCLK) is always driven by the CODEC (usually 12.288MHz) and the
|
||||
frame (FRAME) (usually 48kHz) is always driven by the controller. Each AC97
|
||||
frame is 21uS long and is divided into 13 time slots.
|
||||
|
||||
The AC97 specification can be found at :-
|
||||
http://www.intel.com/design/chipsets/audio/ac97_r23.pdf
|
||||
|
||||
|
||||
I2S
|
||||
===
|
||||
|
||||
I2S is a common 4 wire DAI used in HiFi, STB and portable devices. The Tx and
|
||||
Rx lines are used for audio transmision, whilst the bit clock (BCLK) and
|
||||
left/right clock (LRC) synchronise the link. I2S is flexible in that either the
|
||||
controller or CODEC can drive (master) the BCLK and LRC clock lines. Bit clock
|
||||
usually varies depending on the sample rate and the master system clock
|
||||
(SYSCLK). LRCLK is the same as the sample rate. A few devices support separate
|
||||
ADC and DAC LRCLK's, this allows for similtanious capture and playback at
|
||||
different sample rates.
|
||||
|
||||
I2S has several different operating modes:-
|
||||
|
||||
o I2S - MSB is transmitted on the falling edge of the first BCLK after LRC
|
||||
transition.
|
||||
|
||||
o Left Justified - MSB is transmitted on transition of LRC.
|
||||
|
||||
o Right Justified - MSB is transmitted sample size BCLK's before LRC
|
||||
transition.
|
||||
|
||||
PCM
|
||||
===
|
||||
|
||||
PCM is another 4 wire interface, very similar to I2S, that can support a more
|
||||
flexible protocol. It has bit clock (BCLK) and sync (SYNC) lines that are used
|
||||
to synchronise the link whilst the Tx and Rx lines are used to transmit and
|
||||
receive the audio data. Bit clock usually varies depending on sample rate
|
||||
whilst sync runs at the sample rate. PCM also supports Time Division
|
||||
Multiplexing (TDM) in that several devices can use the bus similtaniuosly (This
|
||||
is sometimes referred to as network mode).
|
||||
|
||||
Common PCM operating modes:-
|
||||
|
||||
o Mode A - MSB is transmitted on falling edge of first BCLK after FRAME/SYNC.
|
||||
|
||||
o Mode B - MSB is transmitted on rising edge of FRAME/SYNC.
|
51
Documentation/sound/alsa/soc/clocking.txt
Normal file
51
Documentation/sound/alsa/soc/clocking.txt
Normal file
@ -0,0 +1,51 @@
|
||||
Audio Clocking
|
||||
==============
|
||||
|
||||
This text describes the audio clocking terms in ASoC and digital audio in
|
||||
general. Note: Audio clocking can be complex !
|
||||
|
||||
|
||||
Master Clock
|
||||
------------
|
||||
|
||||
Every audio subsystem is driven by a master clock (sometimes refered to as MCLK
|
||||
or SYSCLK). This audio master clock can be derived from a number of sources
|
||||
(e.g. crystal, PLL, CPU clock) and is responsible for producing the correct
|
||||
audio playback and capture sample rates.
|
||||
|
||||
Some master clocks (e.g. PLL's and CPU based clocks) are configuarble in that
|
||||
their speed can be altered by software (depending on the system use and to save
|
||||
power). Other master clocks are fixed at at set frequency (i.e. crystals).
|
||||
|
||||
|
||||
DAI Clocks
|
||||
----------
|
||||
The Digital Audio Interface is usually driven by a Bit Clock (often referred to
|
||||
as BCLK). This clock is used to drive the digital audio data across the link
|
||||
between the codec and CPU.
|
||||
|
||||
The DAI also has a frame clock to signal the start of each audio frame. This
|
||||
clock is sometimes referred to as LRC (left right clock) or FRAME. This clock
|
||||
runs at exactly the sample rate (LRC = Rate).
|
||||
|
||||
Bit Clock can be generated as follows:-
|
||||
|
||||
BCLK = MCLK / x
|
||||
|
||||
or
|
||||
|
||||
BCLK = LRC * x
|
||||
|
||||
or
|
||||
|
||||
BCLK = LRC * Channels * Word Size
|
||||
|
||||
This relationship depends on the codec or SoC CPU in particular. In general
|
||||
it's best to configure BCLK to the lowest possible speed (depending on your
|
||||
rate, number of channels and wordsize) to save on power.
|
||||
|
||||
It's also desireable to use the codec (if possible) to drive (or master) the
|
||||
audio clocks as it's usually gives more accurate sample rates than the CPU.
|
||||
|
||||
|
||||
|
197
Documentation/sound/alsa/soc/codec.txt
Normal file
197
Documentation/sound/alsa/soc/codec.txt
Normal file
@ -0,0 +1,197 @@
|
||||
ASoC Codec Driver
|
||||
=================
|
||||
|
||||
The codec driver is generic and hardware independent code that configures the
|
||||
codec to provide audio capture and playback. It should contain no code that is
|
||||
specific to the target platform or machine. All platform and machine specific
|
||||
code should be added to the platform and machine drivers respectively.
|
||||
|
||||
Each codec driver *must* provide the following features:-
|
||||
|
||||
1) Codec DAI and PCM configuration
|
||||
2) Codec control IO - using I2C, 3 Wire(SPI) or both API's
|
||||
3) Mixers and audio controls
|
||||
4) Codec audio operations
|
||||
|
||||
Optionally, codec drivers can also provide:-
|
||||
|
||||
5) DAPM description.
|
||||
6) DAPM event handler.
|
||||
7) DAC Digital mute control.
|
||||
|
||||
It's probably best to use this guide in conjuction with the existing codec
|
||||
driver code in sound/soc/codecs/
|
||||
|
||||
ASoC Codec driver breakdown
|
||||
===========================
|
||||
|
||||
1 - Codec DAI and PCM configuration
|
||||
-----------------------------------
|
||||
Each codec driver must have a struct snd_soc_codec_dai to define it's DAI and
|
||||
PCM's capablities and operations. This struct is exported so that it can be
|
||||
registered with the core by your machine driver.
|
||||
|
||||
e.g.
|
||||
|
||||
struct snd_soc_codec_dai wm8731_dai = {
|
||||
.name = "WM8731",
|
||||
/* playback capabilities */
|
||||
.playback = {
|
||||
.stream_name = "Playback",
|
||||
.channels_min = 1,
|
||||
.channels_max = 2,
|
||||
.rates = WM8731_RATES,
|
||||
.formats = WM8731_FORMATS,},
|
||||
/* capture capabilities */
|
||||
.capture = {
|
||||
.stream_name = "Capture",
|
||||
.channels_min = 1,
|
||||
.channels_max = 2,
|
||||
.rates = WM8731_RATES,
|
||||
.formats = WM8731_FORMATS,},
|
||||
/* pcm operations - see section 4 below */
|
||||
.ops = {
|
||||
.prepare = wm8731_pcm_prepare,
|
||||
.hw_params = wm8731_hw_params,
|
||||
.shutdown = wm8731_shutdown,
|
||||
},
|
||||
/* DAI operations - see DAI.txt */
|
||||
.dai_ops = {
|
||||
.digital_mute = wm8731_mute,
|
||||
.set_sysclk = wm8731_set_dai_sysclk,
|
||||
.set_fmt = wm8731_set_dai_fmt,
|
||||
}
|
||||
};
|
||||
EXPORT_SYMBOL_GPL(wm8731_dai);
|
||||
|
||||
|
||||
2 - Codec control IO
|
||||
--------------------
|
||||
The codec can ususally be controlled via an I2C or SPI style interface (AC97
|
||||
combines control with data in the DAI). The codec drivers will have to provide
|
||||
functions to read and write the codec registers along with supplying a register
|
||||
cache:-
|
||||
|
||||
/* IO control data and register cache */
|
||||
void *control_data; /* codec control (i2c/3wire) data */
|
||||
void *reg_cache;
|
||||
|
||||
Codec read/write should do any data formatting and call the hardware read write
|
||||
below to perform the IO. These functions are called by the core and alsa when
|
||||
performing DAPM or changing the mixer:-
|
||||
|
||||
unsigned int (*read)(struct snd_soc_codec *, unsigned int);
|
||||
int (*write)(struct snd_soc_codec *, unsigned int, unsigned int);
|
||||
|
||||
Codec hardware IO functions - usually points to either the I2C, SPI or AC97
|
||||
read/write:-
|
||||
|
||||
hw_write_t hw_write;
|
||||
hw_read_t hw_read;
|
||||
|
||||
|
||||
3 - Mixers and audio controls
|
||||
-----------------------------
|
||||
All the codec mixers and audio controls can be defined using the convenience
|
||||
macros defined in soc.h.
|
||||
|
||||
#define SOC_SINGLE(xname, reg, shift, mask, invert)
|
||||
|
||||
Defines a single control as follows:-
|
||||
|
||||
xname = Control name e.g. "Playback Volume"
|
||||
reg = codec register
|
||||
shift = control bit(s) offset in register
|
||||
mask = control bit size(s) e.g. mask of 7 = 3 bits
|
||||
invert = the control is inverted
|
||||
|
||||
Other macros include:-
|
||||
|
||||
#define SOC_DOUBLE(xname, reg, shift_left, shift_right, mask, invert)
|
||||
|
||||
A stereo control
|
||||
|
||||
#define SOC_DOUBLE_R(xname, reg_left, reg_right, shift, mask, invert)
|
||||
|
||||
A stereo control spanning 2 registers
|
||||
|
||||
#define SOC_ENUM_SINGLE(xreg, xshift, xmask, xtexts)
|
||||
|
||||
Defines an single enumerated control as follows:-
|
||||
|
||||
xreg = register
|
||||
xshift = control bit(s) offset in register
|
||||
xmask = control bit(s) size
|
||||
xtexts = pointer to array of strings that describe each setting
|
||||
|
||||
#define SOC_ENUM_DOUBLE(xreg, xshift_l, xshift_r, xmask, xtexts)
|
||||
|
||||
Defines a stereo enumerated control
|
||||
|
||||
|
||||
4 - Codec Audio Operations
|
||||
--------------------------
|
||||
The codec driver also supports the following alsa operations:-
|
||||
|
||||
/* SoC audio ops */
|
||||
struct snd_soc_ops {
|
||||
int (*startup)(struct snd_pcm_substream *);
|
||||
void (*shutdown)(struct snd_pcm_substream *);
|
||||
int (*hw_params)(struct snd_pcm_substream *, struct snd_pcm_hw_params *);
|
||||
int (*hw_free)(struct snd_pcm_substream *);
|
||||
int (*prepare)(struct snd_pcm_substream *);
|
||||
};
|
||||
|
||||
Please refer to the alsa driver PCM documentation for details.
|
||||
http://www.alsa-project.org/~iwai/writing-an-alsa-driver/c436.htm
|
||||
|
||||
|
||||
5 - DAPM description.
|
||||
---------------------
|
||||
The Dynamic Audio Power Management description describes the codec's power
|
||||
components, their relationships and registers to the ASoC core. Please read
|
||||
dapm.txt for details of building the description.
|
||||
|
||||
Please also see the examples in other codec drivers.
|
||||
|
||||
|
||||
6 - DAPM event handler
|
||||
----------------------
|
||||
This function is a callback that handles codec domain PM calls and system
|
||||
domain PM calls (e.g. suspend and resume). It's used to put the codec to sleep
|
||||
when not in use.
|
||||
|
||||
Power states:-
|
||||
|
||||
SNDRV_CTL_POWER_D0: /* full On */
|
||||
/* vref/mid, clk and osc on, active */
|
||||
|
||||
SNDRV_CTL_POWER_D1: /* partial On */
|
||||
SNDRV_CTL_POWER_D2: /* partial On */
|
||||
|
||||
SNDRV_CTL_POWER_D3hot: /* Off, with power */
|
||||
/* everything off except vref/vmid, inactive */
|
||||
|
||||
SNDRV_CTL_POWER_D3cold: /* Everything Off, without power */
|
||||
|
||||
|
||||
7 - Codec DAC digital mute control.
|
||||
------------------------------------
|
||||
Most codecs have a digital mute before the DAC's that can be used to minimise
|
||||
any system noise. The mute stops any digital data from entering the DAC.
|
||||
|
||||
A callback can be created that is called by the core for each codec DAI when the
|
||||
mute is applied or freed.
|
||||
|
||||
i.e.
|
||||
|
||||
static int wm8974_mute(struct snd_soc_codec *codec,
|
||||
struct snd_soc_codec_dai *dai, int mute)
|
||||
{
|
||||
u16 mute_reg = wm8974_read_reg_cache(codec, WM8974_DAC) & 0xffbf;
|
||||
if(mute)
|
||||
wm8974_write(codec, WM8974_DAC, mute_reg | 0x40);
|
||||
else
|
||||
wm8974_write(codec, WM8974_DAC, mute_reg);
|
||||
return 0;
|
||||
}
|
297
Documentation/sound/alsa/soc/dapm.txt
Normal file
297
Documentation/sound/alsa/soc/dapm.txt
Normal file
@ -0,0 +1,297 @@
|
||||
Dynamic Audio Power Management for Portable Devices
|
||||
===================================================
|
||||
|
||||
1. Description
|
||||
==============
|
||||
|
||||
Dynamic Audio Power Management (DAPM) is designed to allow portable Linux devices
|
||||
to use the minimum amount of power within the audio subsystem at all times. It
|
||||
is independent of other kernel PM and as such, can easily co-exist with the
|
||||
other PM systems.
|
||||
|
||||
DAPM is also completely transparent to all user space applications as all power
|
||||
switching is done within the ASoC core. No code changes or recompiling are
|
||||
required for user space applications. DAPM makes power switching descisions based
|
||||
upon any audio stream (capture/playback) activity and audio mixer settings
|
||||
within the device.
|
||||
|
||||
DAPM spans the whole machine. It covers power control within the entire audio
|
||||
subsystem, this includes internal codec power blocks and machine level power
|
||||
systems.
|
||||
|
||||
There are 4 power domains within DAPM
|
||||
|
||||
1. Codec domain - VREF, VMID (core codec and audio power)
|
||||
Usually controlled at codec probe/remove and suspend/resume, although
|
||||
can be set at stream time if power is not needed for sidetone, etc.
|
||||
|
||||
2. Platform/Machine domain - physically connected inputs and outputs
|
||||
Is platform/machine and user action specific, is configured by the
|
||||
machine driver and responds to asynchronous events e.g when HP
|
||||
are inserted
|
||||
|
||||
3. Path domain - audio susbsystem signal paths
|
||||
Automatically set when mixer and mux settings are changed by the user.
|
||||
e.g. alsamixer, amixer.
|
||||
|
||||
4. Stream domain - DAC's and ADC's.
|
||||
Enabled and disabled when stream playback/capture is started and
|
||||
stopped respectively. e.g. aplay, arecord.
|
||||
|
||||
All DAPM power switching descisons are made automatically by consulting an audio
|
||||
routing map of the whole machine. This map is specific to each machine and
|
||||
consists of the interconnections between every audio component (including
|
||||
internal codec components). All audio components that effect power are called
|
||||
widgets hereafter.
|
||||
|
||||
|
||||
2. DAPM Widgets
|
||||
===============
|
||||
|
||||
Audio DAPM widgets fall into a number of types:-
|
||||
|
||||
o Mixer - Mixes several analog signals into a single analog signal.
|
||||
o Mux - An analog switch that outputs only 1 of it's inputs.
|
||||
o PGA - A programmable gain amplifier or attenuation widget.
|
||||
o ADC - Analog to Digital Converter
|
||||
o DAC - Digital to Analog Converter
|
||||
o Switch - An analog switch
|
||||
o Input - A codec input pin
|
||||
o Output - A codec output pin
|
||||
o Headphone - Headphone (and optional Jack)
|
||||
o Mic - Mic (and optional Jack)
|
||||
o Line - Line Input/Output (and optional Jack)
|
||||
o Speaker - Speaker
|
||||
o Pre - Special PRE widget (exec before all others)
|
||||
o Post - Special POST widget (exec after all others)
|
||||
|
||||
(Widgets are defined in include/sound/soc-dapm.h)
|
||||
|
||||
Widgets are usually added in the codec driver and the machine driver. There are
|
||||
convience macros defined in soc-dapm.h that can be used to quickly build a
|
||||
list of widgets of the codecs and machines DAPM widgets.
|
||||
|
||||
Most widgets have a name, register, shift and invert. Some widgets have extra
|
||||
parameters for stream name and kcontrols.
|
||||
|
||||
|
||||
2.1 Stream Domain Widgets
|
||||
-------------------------
|
||||
|
||||
Stream Widgets relate to the stream power domain and only consist of ADC's
|
||||
(analog to digital converters) and DAC's (digital to analog converters).
|
||||
|
||||
Stream widgets have the following format:-
|
||||
|
||||
SND_SOC_DAPM_DAC(name, stream name, reg, shift, invert),
|
||||
|
||||
NOTE: the stream name must match the corresponding stream name in your codecs
|
||||
snd_soc_codec_dai.
|
||||
|
||||
e.g. stream widgets for HiFi playback and capture
|
||||
|
||||
SND_SOC_DAPM_DAC("HiFi DAC", "HiFi Playback", REG, 3, 1),
|
||||
SND_SOC_DAPM_ADC("HiFi ADC", "HiFi Capture", REG, 2, 1),
|
||||
|
||||
|
||||
2.2 Path Domain Widgets
|
||||
-----------------------
|
||||
|
||||
Path domain widgets have a ability to control or effect the audio signal or
|
||||
audio paths within the audio subsystem. They have the following form:-
|
||||
|
||||
SND_SOC_DAPM_PGA(name, reg, shift, invert, controls, num_controls)
|
||||
|
||||
Any widget kcontrols can be set using the controls and num_controls members.
|
||||
|
||||
e.g. Mixer widget (the kcontrols are declared first)
|
||||
|
||||
/* Output Mixer */
|
||||
static const snd_kcontrol_new_t wm8731_output_mixer_controls[] = {
|
||||
SOC_DAPM_SINGLE("Line Bypass Switch", WM8731_APANA, 3, 1, 0),
|
||||
SOC_DAPM_SINGLE("Mic Sidetone Switch", WM8731_APANA, 5, 1, 0),
|
||||
SOC_DAPM_SINGLE("HiFi Playback Switch", WM8731_APANA, 4, 1, 0),
|
||||
};
|
||||
|
||||
SND_SOC_DAPM_MIXER("Output Mixer", WM8731_PWR, 4, 1, wm8731_output_mixer_controls,
|
||||
ARRAY_SIZE(wm8731_output_mixer_controls)),
|
||||
|
||||
|
||||
2.3 Platform/Machine domain Widgets
|
||||
-----------------------------------
|
||||
|
||||
Machine widgets are different from codec widgets in that they don't have a
|
||||
codec register bit associated with them. A machine widget is assigned to each
|
||||
machine audio component (non codec) that can be independently powered. e.g.
|
||||
|
||||
o Speaker Amp
|
||||
o Microphone Bias
|
||||
o Jack connectors
|
||||
|
||||
A machine widget can have an optional call back.
|
||||
|
||||
e.g. Jack connector widget for an external Mic that enables Mic Bias
|
||||
when the Mic is inserted:-
|
||||
|
||||
static int spitz_mic_bias(struct snd_soc_dapm_widget* w, int event)
|
||||
{
|
||||
if(SND_SOC_DAPM_EVENT_ON(event))
|
||||
set_scoop_gpio(&spitzscoop2_device.dev, SPITZ_SCP2_MIC_BIAS);
|
||||
else
|
||||
reset_scoop_gpio(&spitzscoop2_device.dev, SPITZ_SCP2_MIC_BIAS);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
SND_SOC_DAPM_MIC("Mic Jack", spitz_mic_bias),
|
||||
|
||||
|
||||
2.4 Codec Domain
|
||||
----------------
|
||||
|
||||
The Codec power domain has no widgets and is handled by the codecs DAPM event
|
||||
handler. This handler is called when the codec powerstate is changed wrt to any
|
||||
stream event or by kernel PM events.
|
||||
|
||||
|
||||
2.5 Virtual Widgets
|
||||
-------------------
|
||||
|
||||
Sometimes widgets exist in the codec or machine audio map that don't have any
|
||||
corresponding register bit for power control. In this case it's necessary to
|
||||
create a virtual widget - a widget with no control bits e.g.
|
||||
|
||||
SND_SOC_DAPM_MIXER("AC97 Mixer", SND_SOC_DAPM_NOPM, 0, 0, NULL, 0),
|
||||
|
||||
This can be used to merge to signal paths together in software.
|
||||
|
||||
After all the widgets have been defined, they can then be added to the DAPM
|
||||
subsystem individually with a call to snd_soc_dapm_new_control().
|
||||
|
||||
|
||||
3. Codec Widget Interconnections
|
||||
================================
|
||||
|
||||
Widgets are connected to each other within the codec and machine by audio
|
||||
paths (called interconnections). Each interconnection must be defined in order
|
||||
to create a map of all audio paths between widgets.
|
||||
This is easiest with a diagram of the codec (and schematic of the machine audio
|
||||
system), as it requires joining widgets together via their audio signal paths.
|
||||
|
||||
i.e. from the WM8731 codec's output mixer (wm8731.c)
|
||||
|
||||
The WM8731 output mixer has 3 inputs (sources)
|
||||
|
||||
1. Line Bypass Input
|
||||
2. DAC (HiFi playback)
|
||||
3. Mic Sidetone Input
|
||||
|
||||
Each input in this example has a kcontrol associated with it (defined in example
|
||||
above) and is connected to the output mixer via it's kcontrol name. We can now
|
||||
connect the destination widget (wrt audio signal) with it's source widgets.
|
||||
|
||||
/* output mixer */
|
||||
{"Output Mixer", "Line Bypass Switch", "Line Input"},
|
||||
{"Output Mixer", "HiFi Playback Switch", "DAC"},
|
||||
{"Output Mixer", "Mic Sidetone Switch", "Mic Bias"},
|
||||
|
||||
So we have :-
|
||||
|
||||
Destination Widget <=== Path Name <=== Source Widget
|
||||
|
||||
Or:-
|
||||
|
||||
Sink, Path, Source
|
||||
|
||||
Or :-
|
||||
|
||||
"Output Mixer" is connected to the "DAC" via the "HiFi Playback Switch".
|
||||
|
||||
When there is no path name connecting widgets (e.g. a direct connection) we
|
||||
pass NULL for the path name.
|
||||
|
||||
Interconnections are created with a call to:-
|
||||
|
||||
snd_soc_dapm_connect_input(codec, sink, path, source);
|
||||
|
||||
Finally, snd_soc_dapm_new_widgets(codec) must be called after all widgets and
|
||||
interconnections have been registered with the core. This causes the core to
|
||||
scan the codec and machine so that the internal DAPM state matches the
|
||||
physical state of the machine.
|
||||
|
||||
|
||||
3.1 Machine Widget Interconnections
|
||||
-----------------------------------
|
||||
Machine widget interconnections are created in the same way as codec ones and
|
||||
directly connect the codec pins to machine level widgets.
|
||||
|
||||
e.g. connects the speaker out codec pins to the internal speaker.
|
||||
|
||||
/* ext speaker connected to codec pins LOUT2, ROUT2 */
|
||||
{"Ext Spk", NULL , "ROUT2"},
|
||||
{"Ext Spk", NULL , "LOUT2"},
|
||||
|
||||
This allows the DAPM to power on and off pins that are connected (and in use)
|
||||
and pins that are NC respectively.
|
||||
|
||||
|
||||
4 Endpoint Widgets
|
||||
===================
|
||||
An endpoint is a start or end point (widget) of an audio signal within the
|
||||
machine and includes the codec. e.g.
|
||||
|
||||
o Headphone Jack
|
||||
o Internal Speaker
|
||||
o Internal Mic
|
||||
o Mic Jack
|
||||
o Codec Pins
|
||||
|
||||
When a codec pin is NC it can be marked as not used with a call to
|
||||
|
||||
snd_soc_dapm_set_endpoint(codec, "Widget Name", 0);
|
||||
|
||||
The last argument is 0 for inactive and 1 for active. This way the pin and its
|
||||
input widget will never be powered up and consume power.
|
||||
|
||||
This also applies to machine widgets. e.g. if a headphone is connected to a
|
||||
jack then the jack can be marked active. If the headphone is removed, then
|
||||
the headphone jack can be marked inactive.
|
||||
|
||||
|
||||
5 DAPM Widget Events
|
||||
====================
|
||||
|
||||
Some widgets can register their interest with the DAPM core in PM events.
|
||||
e.g. A Speaker with an amplifier registers a widget so the amplifier can be
|
||||
powered only when the spk is in use.
|
||||
|
||||
/* turn speaker amplifier on/off depending on use */
|
||||
static int corgi_amp_event(struct snd_soc_dapm_widget *w, int event)
|
||||
{
|
||||
if (SND_SOC_DAPM_EVENT_ON(event))
|
||||
set_scoop_gpio(&corgiscoop_device.dev, CORGI_SCP_APM_ON);
|
||||
else
|
||||
reset_scoop_gpio(&corgiscoop_device.dev, CORGI_SCP_APM_ON);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* corgi machine dapm widgets */
|
||||
static const struct snd_soc_dapm_widget wm8731_dapm_widgets =
|
||||
SND_SOC_DAPM_SPK("Ext Spk", corgi_amp_event);
|
||||
|
||||
Please see soc-dapm.h for all other widgets that support events.
|
||||
|
||||
|
||||
5.1 Event types
|
||||
---------------
|
||||
|
||||
The following event types are supported by event widgets.
|
||||
|
||||
/* dapm event types */
|
||||
#define SND_SOC_DAPM_PRE_PMU 0x1 /* before widget power up */
|
||||
#define SND_SOC_DAPM_POST_PMU 0x2 /* after widget power up */
|
||||
#define SND_SOC_DAPM_PRE_PMD 0x4 /* before widget power down */
|
||||
#define SND_SOC_DAPM_POST_PMD 0x8 /* after widget power down */
|
||||
#define SND_SOC_DAPM_PRE_REG 0x10 /* before audio path setup */
|
||||
#define SND_SOC_DAPM_POST_REG 0x20 /* after audio path setup */
|
113
Documentation/sound/alsa/soc/machine.txt
Normal file
113
Documentation/sound/alsa/soc/machine.txt
Normal file
@ -0,0 +1,113 @@
|
||||
ASoC Machine Driver
|
||||
===================
|
||||
|
||||
The ASoC machine (or board) driver is the code that glues together the platform
|
||||
and codec drivers.
|
||||
|
||||
The machine driver can contain codec and platform specific code. It registers
|
||||
the audio subsystem with the kernel as a platform device and is represented by
|
||||
the following struct:-
|
||||
|
||||
/* SoC machine */
|
||||
struct snd_soc_machine {
|
||||
char *name;
|
||||
|
||||
int (*probe)(struct platform_device *pdev);
|
||||
int (*remove)(struct platform_device *pdev);
|
||||
|
||||
/* the pre and post PM functions are used to do any PM work before and
|
||||
* after the codec and DAI's do any PM work. */
|
||||
int (*suspend_pre)(struct platform_device *pdev, pm_message_t state);
|
||||
int (*suspend_post)(struct platform_device *pdev, pm_message_t state);
|
||||
int (*resume_pre)(struct platform_device *pdev);
|
||||
int (*resume_post)(struct platform_device *pdev);
|
||||
|
||||
/* machine stream operations */
|
||||
struct snd_soc_ops *ops;
|
||||
|
||||
/* CPU <--> Codec DAI links */
|
||||
struct snd_soc_dai_link *dai_link;
|
||||
int num_links;
|
||||
};
|
||||
|
||||
probe()/remove()
|
||||
----------------
|
||||
probe/remove are optional. Do any machine specific probe here.
|
||||
|
||||
|
||||
suspend()/resume()
|
||||
------------------
|
||||
The machine driver has pre and post versions of suspend and resume to take care
|
||||
of any machine audio tasks that have to be done before or after the codec, DAI's
|
||||
and DMA is suspended and resumed. Optional.
|
||||
|
||||
|
||||
Machine operations
|
||||
------------------
|
||||
The machine specific audio operations can be set here. Again this is optional.
|
||||
|
||||
|
||||
Machine DAI Configuration
|
||||
-------------------------
|
||||
The machine DAI configuration glues all the codec and CPU DAI's together. It can
|
||||
also be used to set up the DAI system clock and for any machine related DAI
|
||||
initialisation e.g. the machine audio map can be connected to the codec audio
|
||||
map, unconnnected codec pins can be set as such. Please see corgi.c, spitz.c
|
||||
for examples.
|
||||
|
||||
struct snd_soc_dai_link is used to set up each DAI in your machine. e.g.
|
||||
|
||||
/* corgi digital audio interface glue - connects codec <--> CPU */
|
||||
static struct snd_soc_dai_link corgi_dai = {
|
||||
.name = "WM8731",
|
||||
.stream_name = "WM8731",
|
||||
.cpu_dai = &pxa_i2s_dai,
|
||||
.codec_dai = &wm8731_dai,
|
||||
.init = corgi_wm8731_init,
|
||||
.ops = &corgi_ops,
|
||||
};
|
||||
|
||||
struct snd_soc_machine then sets up the machine with it's DAI's. e.g.
|
||||
|
||||
/* corgi audio machine driver */
|
||||
static struct snd_soc_machine snd_soc_machine_corgi = {
|
||||
.name = "Corgi",
|
||||
.dai_link = &corgi_dai,
|
||||
.num_links = 1,
|
||||
};
|
||||
|
||||
|
||||
Machine Audio Subsystem
|
||||
-----------------------
|
||||
|
||||
The machine soc device glues the platform, machine and codec driver together.
|
||||
Private data can also be set here. e.g.
|
||||
|
||||
/* corgi audio private data */
|
||||
static struct wm8731_setup_data corgi_wm8731_setup = {
|
||||
.i2c_address = 0x1b,
|
||||
};
|
||||
|
||||
/* corgi audio subsystem */
|
||||
static struct snd_soc_device corgi_snd_devdata = {
|
||||
.machine = &snd_soc_machine_corgi,
|
||||
.platform = &pxa2xx_soc_platform,
|
||||
.codec_dev = &soc_codec_dev_wm8731,
|
||||
.codec_data = &corgi_wm8731_setup,
|
||||
};
|
||||
|
||||
|
||||
Machine Power Map
|
||||
-----------------
|
||||
|
||||
The machine driver can optionally extend the codec power map and to become an
|
||||
audio power map of the audio subsystem. This allows for automatic power up/down
|
||||
of speaker/HP amplifiers, etc. Codec pins can be connected to the machines jack
|
||||
sockets in the machine init function. See soc/pxa/spitz.c and dapm.txt for
|
||||
details.
|
||||
|
||||
|
||||
Machine Controls
|
||||
----------------
|
||||
|
||||
Machine specific audio mixer controls can be added in the dai init function.
|
83
Documentation/sound/alsa/soc/overview.txt
Normal file
83
Documentation/sound/alsa/soc/overview.txt
Normal file
@ -0,0 +1,83 @@
|
||||
ALSA SoC Layer
|
||||
==============
|
||||
|
||||
The overall project goal of the ALSA System on Chip (ASoC) layer is to provide
|
||||
better ALSA support for embedded system on chip procesors (e.g. pxa2xx, au1x00,
|
||||
iMX, etc) and portable audio codecs. Currently there is some support in the
|
||||
kernel for SoC audio, however it has some limitations:-
|
||||
|
||||
* Currently, codec drivers are often tightly coupled to the underlying SoC
|
||||
cpu. This is not ideal and leads to code duplication i.e. Linux now has 4
|
||||
different wm8731 drivers for 4 different SoC platforms.
|
||||
|
||||
* There is no standard method to signal user initiated audio events.
|
||||
e.g. Headphone/Mic insertion, Headphone/Mic detection after an insertion
|
||||
event. These are quite common events on portable devices and ofter require
|
||||
machine specific code to re route audio, enable amps etc after such an event.
|
||||
|
||||
* Current drivers tend to power up the entire codec when playing
|
||||
(or recording) audio. This is fine for a PC, but tends to waste a lot of
|
||||
power on portable devices. There is also no support for saving power via
|
||||
changing codec oversampling rates, bias currents, etc.
|
||||
|
||||
|
||||
ASoC Design
|
||||
===========
|
||||
|
||||
The ASoC layer is designed to address these issues and provide the following
|
||||
features :-
|
||||
|
||||
* Codec independence. Allows reuse of codec drivers on other platforms
|
||||
and machines.
|
||||
|
||||
* Easy I2S/PCM audio interface setup between codec and SoC. Each SoC interface
|
||||
and codec registers it's audio interface capabilities with the core and are
|
||||
subsequently matched and configured when the application hw params are known.
|
||||
|
||||
* Dynamic Audio Power Management (DAPM). DAPM automatically sets the codec to
|
||||
it's minimum power state at all times. This includes powering up/down
|
||||
internal power blocks depending on the internal codec audio routing and any
|
||||
active streams.
|
||||
|
||||
* Pop and click reduction. Pops and clicks can be reduced by powering the
|
||||
codec up/down in the correct sequence (including using digital mute). ASoC
|
||||
signals the codec when to change power states.
|
||||
|
||||
* Machine specific controls: Allow machines to add controls to the sound card
|
||||
e.g. volume control for speaker amp.
|
||||
|
||||
To achieve all this, ASoC basically splits an embedded audio system into 3
|
||||
components :-
|
||||
|
||||
* Codec driver: The codec driver is platform independent and contains audio
|
||||
controls, audio interface capabilities, codec dapm definition and codec IO
|
||||
functions.
|
||||
|
||||
* Platform driver: The platform driver contains the audio dma engine and audio
|
||||
interface drivers (e.g. I2S, AC97, PCM) for that platform.
|
||||
|
||||
* Machine driver: The machine driver handles any machine specific controls and
|
||||
audio events. i.e. turing on an amp at start of playback.
|
||||
|
||||
|
||||
Documentation
|
||||
=============
|
||||
|
||||
The documentation is spilt into the following sections:-
|
||||
|
||||
overview.txt: This file.
|
||||
|
||||
codec.txt: Codec driver internals.
|
||||
|
||||
DAI.txt: Description of Digital Audio Interface standards and how to configure
|
||||
a DAI within your codec and CPU DAI drivers.
|
||||
|
||||
dapm.txt: Dynamic Audio Power Management
|
||||
|
||||
platform.txt: Platform audio DMA and DAI.
|
||||
|
||||
machine.txt: Machine driver internals.
|
||||
|
||||
pop_clicks.txt: How to minimise audio artifacts.
|
||||
|
||||
clocking.txt: ASoC clocking for best power performance.
|
58
Documentation/sound/alsa/soc/platform.txt
Normal file
58
Documentation/sound/alsa/soc/platform.txt
Normal file
@ -0,0 +1,58 @@
|
||||
ASoC Platform Driver
|
||||
====================
|
||||
|
||||
An ASoC platform driver can be divided into audio DMA and SoC DAI configuration
|
||||
and control. The platform drivers only target the SoC CPU and must have no board
|
||||
specific code.
|
||||
|
||||
Audio DMA
|
||||
=========
|
||||
|
||||
The platform DMA driver optionally supports the following alsa operations:-
|
||||
|
||||
/* SoC audio ops */
|
||||
struct snd_soc_ops {
|
||||
int (*startup)(struct snd_pcm_substream *);
|
||||
void (*shutdown)(struct snd_pcm_substream *);
|
||||
int (*hw_params)(struct snd_pcm_substream *, struct snd_pcm_hw_params *);
|
||||
int (*hw_free)(struct snd_pcm_substream *);
|
||||
int (*prepare)(struct snd_pcm_substream *);
|
||||
int (*trigger)(struct snd_pcm_substream *, int);
|
||||
};
|
||||
|
||||
The platform driver exports it's DMA functionailty via struct snd_soc_platform:-
|
||||
|
||||
struct snd_soc_platform {
|
||||
char *name;
|
||||
|
||||
int (*probe)(struct platform_device *pdev);
|
||||
int (*remove)(struct platform_device *pdev);
|
||||
int (*suspend)(struct platform_device *pdev, struct snd_soc_cpu_dai *cpu_dai);
|
||||
int (*resume)(struct platform_device *pdev, struct snd_soc_cpu_dai *cpu_dai);
|
||||
|
||||
/* pcm creation and destruction */
|
||||
int (*pcm_new)(struct snd_card *, struct snd_soc_codec_dai *, struct snd_pcm *);
|
||||
void (*pcm_free)(struct snd_pcm *);
|
||||
|
||||
/* platform stream ops */
|
||||
struct snd_pcm_ops *pcm_ops;
|
||||
};
|
||||
|
||||
Please refer to the alsa driver documentation for details of audio DMA.
|
||||
http://www.alsa-project.org/~iwai/writing-an-alsa-driver/c436.htm
|
||||
|
||||
An example DMA driver is soc/pxa/pxa2xx-pcm.c
|
||||
|
||||
|
||||
SoC DAI Drivers
|
||||
===============
|
||||
|
||||
Each SoC DAI driver must provide the following features:-
|
||||
|
||||
1) Digital audio interface (DAI) description
|
||||
2) Digital audio interface configuration
|
||||
3) PCM's description
|
||||
4) Sysclk configuration
|
||||
5) Suspend and resume (optional)
|
||||
|
||||
Please see codec.txt for a description of items 1 - 4.
|
52
Documentation/sound/alsa/soc/pops_clicks.txt
Normal file
52
Documentation/sound/alsa/soc/pops_clicks.txt
Normal file
@ -0,0 +1,52 @@
|
||||
Audio Pops and Clicks
|
||||
=====================
|
||||
|
||||
Pops and clicks are unwanted audio artifacts caused by the powering up and down
|
||||
of components within the audio subsystem. This is noticable on PC's when an
|
||||
audio module is either loaded or unloaded (at module load time the sound card is
|
||||
powered up and causes a popping noise on the speakers).
|
||||
|
||||
Pops and clicks can be more frequent on portable systems with DAPM. This is
|
||||
because the components within the subsystem are being dynamically powered
|
||||
depending on the audio usage and this can subsequently cause a small pop or
|
||||
click every time a component power state is changed.
|
||||
|
||||
|
||||
Minimising Playback Pops and Clicks
|
||||
===================================
|
||||
|
||||
Playback pops in portable audio subsystems cannot be completely eliminated atm,
|
||||
however future audio codec hardware will have better pop and click supression.
|
||||
Pops can be reduced within playback by powering the audio components in a
|
||||
specific order. This order is different for startup and shutdown and follows
|
||||
some basic rules:-
|
||||
|
||||
Startup Order :- DAC --> Mixers --> Output PGA --> Digital Unmute
|
||||
|
||||
Shutdown Order :- Digital Mute --> Output PGA --> Mixers --> DAC
|
||||
|
||||
This assumes that the codec PCM output path from the DAC is via a mixer and then
|
||||
a PGA (programmable gain amplifier) before being output to the speakers.
|
||||
|
||||
|
||||
Minimising Capture Pops and Clicks
|
||||
==================================
|
||||
|
||||
Capture artifacts are somewhat easier to get rid as we can delay activating the
|
||||
ADC until all the pops have occured. This follows similar power rules to
|
||||
playback in that components are powered in a sequence depending upon stream
|
||||
startup or shutdown.
|
||||
|
||||
Startup Order - Input PGA --> Mixers --> ADC
|
||||
|
||||
Shutdown Order - ADC --> Mixers --> Input PGA
|
||||
|
||||
|
||||
Zipper Noise
|
||||
============
|
||||
An unwanted zipper noise can occur within the audio playback or capture stream
|
||||
when a volume control is changed near its maximum gain value. The zipper noise
|
||||
is heard when the gain increase or decrease changes the mean audio signal
|
||||
amplitude too quickly. It can be minimised by enabling the zero cross setting
|
||||
for each volume control. The ZC forces the gain change to occur when the signal
|
||||
crosses the zero amplitude line.
|
@ -284,7 +284,6 @@ SPI protocol drivers somewhat resemble platform device drivers:
|
||||
static struct spi_driver CHIP_driver = {
|
||||
.driver = {
|
||||
.name = "CHIP",
|
||||
.bus = &spi_bus_type,
|
||||
.owner = THIS_MODULE,
|
||||
},
|
||||
|
||||
@ -312,7 +311,7 @@ might look like this unless you're creating a class_device:
|
||||
chip = kzalloc(sizeof *chip, GFP_KERNEL);
|
||||
if (!chip)
|
||||
return -ENOMEM;
|
||||
dev_set_drvdata(&spi->dev, chip);
|
||||
spi_set_drvdata(spi, chip);
|
||||
|
||||
... etc
|
||||
return 0;
|
||||
|
@ -64,11 +64,6 @@ On all - write a character to /proc/sysrq-trigger. e.g.:
|
||||
|
||||
* What are the 'command' keys?
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
'r' - Turns off keyboard raw mode and sets it to XLATE.
|
||||
|
||||
'k' - Secure Access Key (SAK) Kills all programs on the current virtual
|
||||
console. NOTE: See important comments below in SAK section.
|
||||
|
||||
'b' - Will immediately reboot the system without syncing or unmounting
|
||||
your disks.
|
||||
|
||||
@ -76,21 +71,37 @@ On all - write a character to /proc/sysrq-trigger. e.g.:
|
||||
|
||||
'd' - Shows all locks that are held.
|
||||
|
||||
'o' - Will shut your system off (if configured and supported).
|
||||
'e' - Send a SIGTERM to all processes, except for init.
|
||||
|
||||
's' - Will attempt to sync all mounted filesystems.
|
||||
'f' - Will call oom_kill to kill a memory hog process.
|
||||
|
||||
'u' - Will attempt to remount all mounted filesystems read-only.
|
||||
'g' - Used by kgdb on ppc platforms.
|
||||
|
||||
'p' - Will dump the current registers and flags to your console.
|
||||
'h' - Will display help (actually any other key than those listed
|
||||
above will display help. but 'h' is easy to remember :-)
|
||||
|
||||
't' - Will dump a list of current tasks and their information to your
|
||||
console.
|
||||
'i' - Send a SIGKILL to all processes, except for init.
|
||||
|
||||
'k' - Secure Access Key (SAK) Kills all programs on the current virtual
|
||||
console. NOTE: See important comments below in SAK section.
|
||||
|
||||
'm' - Will dump current memory info to your console.
|
||||
|
||||
'n' - Used to make RT tasks nice-able
|
||||
|
||||
'o' - Will shut your system off (if configured and supported).
|
||||
|
||||
'p' - Will dump the current registers and flags to your console.
|
||||
|
||||
'r' - Turns off keyboard raw mode and sets it to XLATE.
|
||||
|
||||
's' - Will attempt to sync all mounted filesystems.
|
||||
|
||||
't' - Will dump a list of current tasks and their information to your
|
||||
console.
|
||||
|
||||
'u' - Will attempt to remount all mounted filesystems read-only.
|
||||
|
||||
'v' - Dumps Voyager SMP processor info to your console.
|
||||
|
||||
'w' - Dumps tasks that are in uninterruptable (blocked) state.
|
||||
@ -102,17 +113,6 @@ On all - write a character to /proc/sysrq-trigger. e.g.:
|
||||
it so that only emergency messages like PANICs or OOPSes would
|
||||
make it to your console.)
|
||||
|
||||
'f' - Will call oom_kill to kill a memory hog process.
|
||||
|
||||
'e' - Send a SIGTERM to all processes, except for init.
|
||||
|
||||
'g' - Used by kgdb on ppc platforms.
|
||||
|
||||
'i' - Send a SIGKILL to all processes, except for init.
|
||||
|
||||
'h' - Will display help (actually any other key than those listed
|
||||
above will display help. but 'h' is easy to remember :-)
|
||||
|
||||
* Okay, so what can I use them for?
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Well, un'R'aw is very handy when your X server or a svgalib program crashes.
|
||||
|
@ -213,15 +213,16 @@ C:* #Ifs=dd Cfg#=dd Atr=xx MPwr=dddmA
|
||||
|
||||
Interface descriptor info (can be multiple per Config):
|
||||
|
||||
I: If#=dd Alt=dd #EPs=dd Cls=xx(sssss) Sub=xx Prot=xx Driver=ssss
|
||||
| | | | | | | |__Driver name
|
||||
| | | | | | | or "(none)"
|
||||
| | | | | | |__InterfaceProtocol
|
||||
| | | | | |__InterfaceSubClass
|
||||
| | | | |__InterfaceClass
|
||||
| | | |__NumberOfEndpoints
|
||||
| | |__AlternateSettingNumber
|
||||
| |__InterfaceNumber
|
||||
I:* If#=dd Alt=dd #EPs=dd Cls=xx(sssss) Sub=xx Prot=xx Driver=ssss
|
||||
| | | | | | | | |__Driver name
|
||||
| | | | | | | | or "(none)"
|
||||
| | | | | | | |__InterfaceProtocol
|
||||
| | | | | | |__InterfaceSubClass
|
||||
| | | | | |__InterfaceClass
|
||||
| | | | |__NumberOfEndpoints
|
||||
| | | |__AlternateSettingNumber
|
||||
| | |__InterfaceNumber
|
||||
| |__ "*" indicates the active altsetting (others are " ")
|
||||
|__Interface info tag
|
||||
|
||||
A given interface may have one or more "alternate" settings.
|
||||
@ -277,7 +278,7 @@ of the USB devices on a system's root hub. (See more below
|
||||
on how to do this.)
|
||||
|
||||
The Interface lines can be used to determine what driver is
|
||||
being used for each device.
|
||||
being used for each device, and which altsetting it activated.
|
||||
|
||||
The Configuration lines could be used to list maximum power
|
||||
(in milliamps) that a system's USB devices are using.
|
||||
|
@ -77,7 +77,7 @@ that the file size is not excessive for your favourite editor.
|
||||
|
||||
The '1t' type data consists of a stream of events, such as URB submission,
|
||||
URB callback, submission error. Every event is a text line, which consists
|
||||
of whitespace separated words. The number of position of words may depend
|
||||
of whitespace separated words. The number or position of words may depend
|
||||
on the event type, but there is a set of words, common for all types.
|
||||
|
||||
Here is the list of words, from left to right:
|
||||
@ -170,4 +170,152 @@ dd65f0e8 4128379808 C Bo:005:02 0 31 >
|
||||
|
||||
* Raw binary format and API
|
||||
|
||||
TBD
|
||||
The overall architecture of the API is about the same as the one above,
|
||||
only the events are delivered in binary format. Each event is sent in
|
||||
the following structure (its name is made up, so that we can refer to it):
|
||||
|
||||
struct usbmon_packet {
|
||||
u64 id; /* 0: URB ID - from submission to callback */
|
||||
unsigned char type; /* 8: Same as text; extensible. */
|
||||
unsigned char xfer_type; /* ISO (0), Intr, Control, Bulk (3) */
|
||||
unsigned char epnum; /* Endpoint number and transfer direction */
|
||||
unsigned char devnum; /* Device address */
|
||||
u16 busnum; /* 12: Bus number */
|
||||
char flag_setup; /* 14: Same as text */
|
||||
char flag_data; /* 15: Same as text; Binary zero is OK. */
|
||||
s64 ts_sec; /* 16: gettimeofday */
|
||||
s32 ts_usec; /* 24: gettimeofday */
|
||||
int status; /* 28: */
|
||||
unsigned int length; /* 32: Length of data (submitted or actual) */
|
||||
unsigned int len_cap; /* 36: Delivered length */
|
||||
unsigned char setup[8]; /* 40: Only for Control 'S' */
|
||||
}; /* 48 bytes total */
|
||||
|
||||
These events can be received from a character device by reading with read(2),
|
||||
with an ioctl(2), or by accessing the buffer with mmap.
|
||||
|
||||
The character device is usually called /dev/usbmonN, where N is the USB bus
|
||||
number. Number zero (/dev/usbmon0) is special and means "all buses".
|
||||
However, this feature is not implemented yet. Note that specific naming
|
||||
policy is set by your Linux distribution.
|
||||
|
||||
If you create /dev/usbmon0 by hand, make sure that it is owned by root
|
||||
and has mode 0600. Otherwise, unpriviledged users will be able to snoop
|
||||
keyboard traffic.
|
||||
|
||||
The following ioctl calls are available, with MON_IOC_MAGIC 0x92:
|
||||
|
||||
MON_IOCQ_URB_LEN, defined as _IO(MON_IOC_MAGIC, 1)
|
||||
|
||||
This call returns the length of data in the next event. Note that majority of
|
||||
events contain no data, so if this call returns zero, it does not mean that
|
||||
no events are available.
|
||||
|
||||
MON_IOCG_STATS, defined as _IOR(MON_IOC_MAGIC, 3, struct mon_bin_stats)
|
||||
|
||||
The argument is a pointer to the following structure:
|
||||
|
||||
struct mon_bin_stats {
|
||||
u32 queued;
|
||||
u32 dropped;
|
||||
};
|
||||
|
||||
The member "queued" refers to the number of events currently queued in the
|
||||
buffer (and not to the number of events processed since the last reset).
|
||||
|
||||
The member "dropped" is the number of events lost since the last call
|
||||
to MON_IOCG_STATS.
|
||||
|
||||
MON_IOCT_RING_SIZE, defined as _IO(MON_IOC_MAGIC, 4)
|
||||
|
||||
This call sets the buffer size. The argument is the size in bytes.
|
||||
The size may be rounded down to the next chunk (or page). If the requested
|
||||
size is out of [unspecified] bounds for this kernel, the call fails with
|
||||
-EINVAL.
|
||||
|
||||
MON_IOCQ_RING_SIZE, defined as _IO(MON_IOC_MAGIC, 5)
|
||||
|
||||
This call returns the current size of the buffer in bytes.
|
||||
|
||||
MON_IOCX_GET, defined as _IOW(MON_IOC_MAGIC, 6, struct mon_get_arg)
|
||||
|
||||
This call waits for events to arrive if none were in the kernel buffer,
|
||||
then returns the first event. Its argument is a pointer to the following
|
||||
structure:
|
||||
|
||||
struct mon_get_arg {
|
||||
struct usbmon_packet *hdr;
|
||||
void *data;
|
||||
size_t alloc; /* Length of data (can be zero) */
|
||||
};
|
||||
|
||||
Before the call, hdr, data, and alloc should be filled. Upon return, the area
|
||||
pointed by hdr contains the next event structure, and the data buffer contains
|
||||
the data, if any. The event is removed from the kernel buffer.
|
||||
|
||||
MON_IOCX_MFETCH, defined as _IOWR(MON_IOC_MAGIC, 7, struct mon_mfetch_arg)
|
||||
|
||||
This ioctl is primarily used when the application accesses the buffer
|
||||
with mmap(2). Its argument is a pointer to the following structure:
|
||||
|
||||
struct mon_mfetch_arg {
|
||||
uint32_t *offvec; /* Vector of events fetched */
|
||||
uint32_t nfetch; /* Number of events to fetch (out: fetched) */
|
||||
uint32_t nflush; /* Number of events to flush */
|
||||
};
|
||||
|
||||
The ioctl operates in 3 stages.
|
||||
|
||||
First, it removes and discards up to nflush events from the kernel buffer.
|
||||
The actual number of events discarded is returned in nflush.
|
||||
|
||||
Second, it waits for an event to be present in the buffer, unless the pseudo-
|
||||
device is open with O_NONBLOCK.
|
||||
|
||||
Third, it extracts up to nfetch offsets into the mmap buffer, and stores
|
||||
them into the offvec. The actual number of event offsets is stored into
|
||||
the nfetch.
|
||||
|
||||
MON_IOCH_MFLUSH, defined as _IO(MON_IOC_MAGIC, 8)
|
||||
|
||||
This call removes a number of events from the kernel buffer. Its argument
|
||||
is the number of events to remove. If the buffer contains fewer events
|
||||
than requested, all events present are removed, and no error is reported.
|
||||
This works when no events are available too.
|
||||
|
||||
FIONBIO
|
||||
|
||||
The ioctl FIONBIO may be implemented in the future, if there's a need.
|
||||
|
||||
In addition to ioctl(2) and read(2), the special file of binary API can
|
||||
be polled with select(2) and poll(2). But lseek(2) does not work.
|
||||
|
||||
* Memory-mapped access of the kernel buffer for the binary API
|
||||
|
||||
The basic idea is simple:
|
||||
|
||||
To prepare, map the buffer by getting the current size, then using mmap(2).
|
||||
Then, execute a loop similar to the one written in pseudo-code below:
|
||||
|
||||
struct mon_mfetch_arg fetch;
|
||||
struct usbmon_packet *hdr;
|
||||
int nflush = 0;
|
||||
for (;;) {
|
||||
fetch.offvec = vec; // Has N 32-bit words
|
||||
fetch.nfetch = N; // Or less than N
|
||||
fetch.nflush = nflush;
|
||||
ioctl(fd, MON_IOCX_MFETCH, &fetch); // Process errors, too
|
||||
nflush = fetch.nfetch; // This many packets to flush when done
|
||||
for (i = 0; i < nflush; i++) {
|
||||
hdr = (struct ubsmon_packet *) &mmap_area[vec[i]];
|
||||
if (hdr->type == '@') // Filler packet
|
||||
continue;
|
||||
caddr_t data = &mmap_area[vec[i]] + 64;
|
||||
process_packet(hdr, data);
|
||||
}
|
||||
}
|
||||
|
||||
Thus, the main idea is to execute only one ioctl per N events.
|
||||
|
||||
Although the buffer is circular, the returned headers and data do not cross
|
||||
the end of the buffer, so the above pseudo-code does not need any gathering.
|
||||
|
34
Documentation/video-output.txt
Normal file
34
Documentation/video-output.txt
Normal file
@ -0,0 +1,34 @@
|
||||
|
||||
Video Output Switcher Control
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
2006 luming.yu@intel.com
|
||||
|
||||
The output sysfs class driver provides an abstract video output layer that
|
||||
can be used to hook platform specific methods to enable/disable video output
|
||||
device through common sysfs interface. For example, on my IBM ThinkPad T42
|
||||
laptop, The ACPI video driver registered its output devices and read/write
|
||||
method for 'state' with output sysfs class. The user interface under sysfs is:
|
||||
|
||||
linux:/sys/class/video_output # tree .
|
||||
.
|
||||
|-- CRT0
|
||||
| |-- device -> ../../../devices/pci0000:00/0000:00:01.0
|
||||
| |-- state
|
||||
| |-- subsystem -> ../../../class/video_output
|
||||
| `-- uevent
|
||||
|-- DVI0
|
||||
| |-- device -> ../../../devices/pci0000:00/0000:00:01.0
|
||||
| |-- state
|
||||
| |-- subsystem -> ../../../class/video_output
|
||||
| `-- uevent
|
||||
|-- LCD0
|
||||
| |-- device -> ../../../devices/pci0000:00/0000:00:01.0
|
||||
| |-- state
|
||||
| |-- subsystem -> ../../../class/video_output
|
||||
| `-- uevent
|
||||
`-- TV0
|
||||
|-- device -> ../../../devices/pci0000:00/0000:00:01.0
|
||||
|-- state
|
||||
|-- subsystem -> ../../../class/video_output
|
||||
`-- uevent
|
||||
|
@ -57,7 +57,7 @@ bttv.o
|
||||
i2c_udelay= Allow reduce I2C speed. Default is 5 usecs
|
||||
(meaning 66,67 Kbps). The default is the
|
||||
maximum supported speed by kernel bitbang
|
||||
algoritm. You may use lower numbers, if I2C
|
||||
algorithm. You may use lower numbers, if I2C
|
||||
messages are lost (16 is known to work on
|
||||
all supported cards).
|
||||
|
||||
|
@ -180,40 +180,81 @@ PCI
|
||||
pci=lastbus=NUMBER Scan upto NUMBER busses, no matter what the mptable says.
|
||||
pci=noacpi Don't use ACPI to set up PCI interrupt routing.
|
||||
|
||||
IOMMU
|
||||
IOMMU (input/output memory management unit)
|
||||
|
||||
iommu=[size][,noagp][,off][,force][,noforce][,leak][,memaper[=order]][,merge]
|
||||
[,forcesac][,fullflush][,nomerge][,noaperture][,calgary]
|
||||
size set size of iommu (in bytes)
|
||||
noagp don't initialize the AGP driver and use full aperture.
|
||||
off don't use the IOMMU
|
||||
leak turn on simple iommu leak tracing (only when CONFIG_IOMMU_LEAK is on)
|
||||
memaper[=order] allocate an own aperture over RAM with size 32MB^order.
|
||||
noforce don't force IOMMU usage. Default.
|
||||
force Force IOMMU.
|
||||
merge Do SG merging. Implies force (experimental)
|
||||
nomerge Don't do SG merging.
|
||||
forcesac For SAC mode for masks <40bits (experimental)
|
||||
fullflush Flush IOMMU on each allocation (default)
|
||||
nofullflush Don't use IOMMU fullflush
|
||||
allowed overwrite iommu off workarounds for specific chipsets.
|
||||
soft Use software bounce buffering (default for Intel machines)
|
||||
noaperture Don't touch the aperture for AGP.
|
||||
allowdac Allow DMA >4GB
|
||||
When off all DMA over >4GB is forced through an IOMMU or bounce
|
||||
buffering.
|
||||
nodac Forbid DMA >4GB
|
||||
panic Always panic when IOMMU overflows
|
||||
calgary Use the Calgary IOMMU if it is available
|
||||
Currently four x86-64 PCI-DMA mapping implementations exist:
|
||||
|
||||
swiotlb=pages[,force]
|
||||
1. <arch/x86_64/kernel/pci-nommu.c>: use no hardware/software IOMMU at all
|
||||
(e.g. because you have < 3 GB memory).
|
||||
Kernel boot message: "PCI-DMA: Disabling IOMMU"
|
||||
|
||||
pages Prereserve that many 128K pages for the software IO bounce buffering.
|
||||
force Force all IO through the software TLB.
|
||||
2. <arch/x86_64/kernel/pci-gart.c>: AMD GART based hardware IOMMU.
|
||||
Kernel boot message: "PCI-DMA: using GART IOMMU"
|
||||
|
||||
calgary=[64k,128k,256k,512k,1M,2M,4M,8M]
|
||||
calgary=[translate_empty_slots]
|
||||
calgary=[disable=<PCI bus number>]
|
||||
3. <arch/x86_64/kernel/pci-swiotlb.c> : Software IOMMU implementation. Used
|
||||
e.g. if there is no hardware IOMMU in the system and it is need because
|
||||
you have >3GB memory or told the kernel to us it (iommu=soft))
|
||||
Kernel boot message: "PCI-DMA: Using software bounce buffering
|
||||
for IO (SWIOTLB)"
|
||||
|
||||
4. <arch/x86_64/pci-calgary.c> : IBM Calgary hardware IOMMU. Used in IBM
|
||||
pSeries and xSeries servers. This hardware IOMMU supports DMA address
|
||||
mapping with memory protection, etc.
|
||||
Kernel boot message: "PCI-DMA: Using Calgary IOMMU"
|
||||
|
||||
iommu=[<size>][,noagp][,off][,force][,noforce][,leak[=<nr_of_leak_pages>]
|
||||
[,memaper[=<order>]][,merge][,forcesac][,fullflush][,nomerge]
|
||||
[,noaperture][,calgary]
|
||||
|
||||
General iommu options:
|
||||
off Don't initialize and use any kind of IOMMU.
|
||||
noforce Don't force hardware IOMMU usage when it is not needed.
|
||||
(default).
|
||||
force Force the use of the hardware IOMMU even when it is
|
||||
not actually needed (e.g. because < 3 GB memory).
|
||||
soft Use software bounce buffering (SWIOTLB) (default for
|
||||
Intel machines). This can be used to prevent the usage
|
||||
of an available hardware IOMMU.
|
||||
|
||||
iommu options only relevant to the AMD GART hardware IOMMU:
|
||||
<size> Set the size of the remapping area in bytes.
|
||||
allowed Overwrite iommu off workarounds for specific chipsets.
|
||||
fullflush Flush IOMMU on each allocation (default).
|
||||
nofullflush Don't use IOMMU fullflush.
|
||||
leak Turn on simple iommu leak tracing (only when
|
||||
CONFIG_IOMMU_LEAK is on). Default number of leak pages
|
||||
is 20.
|
||||
memaper[=<order>] Allocate an own aperture over RAM with size 32MB<<order.
|
||||
(default: order=1, i.e. 64MB)
|
||||
merge Do scatter-gather (SG) merging. Implies "force"
|
||||
(experimental).
|
||||
nomerge Don't do scatter-gather (SG) merging.
|
||||
noaperture Ask the IOMMU not to touch the aperture for AGP.
|
||||
forcesac Force single-address cycle (SAC) mode for masks <40bits
|
||||
(experimental).
|
||||
noagp Don't initialize the AGP driver and use full aperture.
|
||||
allowdac Allow double-address cycle (DAC) mode, i.e. DMA >4GB.
|
||||
DAC is used with 32-bit PCI to push a 64-bit address in
|
||||
two cycles. When off all DMA over >4GB is forced through
|
||||
an IOMMU or software bounce buffering.
|
||||
nodac Forbid DAC mode, i.e. DMA >4GB.
|
||||
panic Always panic when IOMMU overflows.
|
||||
calgary Use the Calgary IOMMU if it is available
|
||||
|
||||
iommu options only relevant to the software bounce buffering (SWIOTLB) IOMMU
|
||||
implementation:
|
||||
swiotlb=<pages>[,force]
|
||||
<pages> Prereserve that many 128K pages for the software IO
|
||||
bounce buffering.
|
||||
force Force all IO through the software TLB.
|
||||
|
||||
Settings for the IBM Calgary hardware IOMMU currently found in IBM
|
||||
pSeries and xSeries machines:
|
||||
|
||||
calgary=[64k,128k,256k,512k,1M,2M,4M,8M]
|
||||
calgary=[translate_empty_slots]
|
||||
calgary=[disable=<PCI bus number>]
|
||||
panic Always panic when IOMMU overflows
|
||||
|
||||
64k,...,8M - Set the size of each PCI slot's translation table
|
||||
when using the Calgary IOMMU. This is the size of the translation
|
||||
@ -234,14 +275,14 @@ IOMMU
|
||||
|
||||
Debugging
|
||||
|
||||
oops=panic Always panic on oopses. Default is to just kill the process,
|
||||
but there is a small probability of deadlocking the machine.
|
||||
This will also cause panics on machine check exceptions.
|
||||
Useful together with panic=30 to trigger a reboot.
|
||||
oops=panic Always panic on oopses. Default is to just kill the process,
|
||||
but there is a small probability of deadlocking the machine.
|
||||
This will also cause panics on machine check exceptions.
|
||||
Useful together with panic=30 to trigger a reboot.
|
||||
|
||||
kstack=N Print that many words from the kernel stack in oops dumps.
|
||||
kstack=N Print N words from the kernel stack in oops dumps.
|
||||
|
||||
pagefaulttrace Dump all page faults. Only useful for extreme debugging
|
||||
pagefaulttrace Dump all page faults. Only useful for extreme debugging
|
||||
and will create a lot of output.
|
||||
|
||||
call_trace=[old|both|newfallback|new]
|
||||
@ -251,15 +292,8 @@ Debugging
|
||||
newfallback: use new unwinder but fall back to old if it gets
|
||||
stuck (default)
|
||||
|
||||
call_trace=[old|both|newfallback|new]
|
||||
old: use old inexact backtracer
|
||||
new: use new exact dwarf2 unwinder
|
||||
both: print entries from both
|
||||
newfallback: use new unwinder but fall back to old if it gets
|
||||
stuck (default)
|
||||
|
||||
Misc
|
||||
Miscellaneous
|
||||
|
||||
noreplacement Don't replace instructions with more appropriate ones
|
||||
for the CPU. This may be useful on asymmetric MP systems
|
||||
where some CPU have less capabilities than the others.
|
||||
where some CPUs have less capabilities than others.
|
||||
|
@ -2,7 +2,7 @@ Firmware support for CPU hotplug under Linux/x86-64
|
||||
---------------------------------------------------
|
||||
|
||||
Linux/x86-64 supports CPU hotplug now. For various reasons Linux wants to
|
||||
know in advance boot time the maximum number of CPUs that could be plugged
|
||||
know in advance of boot time the maximum number of CPUs that could be plugged
|
||||
into the system. ACPI 3.0 currently has no official way to supply
|
||||
this information from the firmware to the operating system.
|
||||
|
||||
|
@ -9,9 +9,9 @@ zombie. While the thread is in user space the kernel stack is empty
|
||||
except for the thread_info structure at the bottom.
|
||||
|
||||
In addition to the per thread stacks, there are specialized stacks
|
||||
associated with each cpu. These stacks are only used while the kernel
|
||||
is in control on that cpu, when a cpu returns to user space the
|
||||
specialized stacks contain no useful data. The main cpu stacks is
|
||||
associated with each CPU. These stacks are only used while the kernel
|
||||
is in control on that CPU; when a CPU returns to user space the
|
||||
specialized stacks contain no useful data. The main CPU stacks are:
|
||||
|
||||
* Interrupt stack. IRQSTACKSIZE
|
||||
|
||||
@ -32,17 +32,17 @@ x86_64 also has a feature which is not available on i386, the ability
|
||||
to automatically switch to a new stack for designated events such as
|
||||
double fault or NMI, which makes it easier to handle these unusual
|
||||
events on x86_64. This feature is called the Interrupt Stack Table
|
||||
(IST). There can be up to 7 IST entries per cpu. The IST code is an
|
||||
index into the Task State Segment (TSS), the IST entries in the TSS
|
||||
point to dedicated stacks, each stack can be a different size.
|
||||
(IST). There can be up to 7 IST entries per CPU. The IST code is an
|
||||
index into the Task State Segment (TSS). The IST entries in the TSS
|
||||
point to dedicated stacks; each stack can be a different size.
|
||||
|
||||
An IST is selected by an non-zero value in the IST field of an
|
||||
An IST is selected by a non-zero value in the IST field of an
|
||||
interrupt-gate descriptor. When an interrupt occurs and the hardware
|
||||
loads such a descriptor, the hardware automatically sets the new stack
|
||||
pointer based on the IST value, then invokes the interrupt handler. If
|
||||
software wants to allow nested IST interrupts then the handler must
|
||||
adjust the IST values on entry to and exit from the interrupt handler.
|
||||
(this is occasionally done, e.g. for debug exceptions)
|
||||
(This is occasionally done, e.g. for debug exceptions.)
|
||||
|
||||
Events with different IST codes (i.e. with different stacks) can be
|
||||
nested. For example, a debug interrupt can safely be interrupted by an
|
||||
@ -58,17 +58,17 @@ The currently assigned IST stacks are :-
|
||||
|
||||
Used for interrupt 12 - Stack Fault Exception (#SS).
|
||||
|
||||
This allows to recover from invalid stack segments. Rarely
|
||||
This allows the CPU to recover from invalid stack segments. Rarely
|
||||
happens.
|
||||
|
||||
* DOUBLEFAULT_STACK. EXCEPTION_STKSZ (PAGE_SIZE).
|
||||
|
||||
Used for interrupt 8 - Double Fault Exception (#DF).
|
||||
|
||||
Invoked when handling a exception causes another exception. Happens
|
||||
when the kernel is very confused (e.g. kernel stack pointer corrupt)
|
||||
Using a separate stack allows to recover from it well enough in many
|
||||
cases to still output an oops.
|
||||
Invoked when handling one exception causes another exception. Happens
|
||||
when the kernel is very confused (e.g. kernel stack pointer corrupt).
|
||||
Using a separate stack allows the kernel to recover from it well enough
|
||||
in many cases to still output an oops.
|
||||
|
||||
* NMI_STACK. EXCEPTION_STKSZ (PAGE_SIZE).
|
||||
|
||||
|
70
Documentation/x86_64/machinecheck
Normal file
70
Documentation/x86_64/machinecheck
Normal file
@ -0,0 +1,70 @@
|
||||
|
||||
Configurable sysfs parameters for the x86-64 machine check code.
|
||||
|
||||
Machine checks report internal hardware error conditions detected
|
||||
by the CPU. Uncorrected errors typically cause a machine check
|
||||
(often with panic), corrected ones cause a machine check log entry.
|
||||
|
||||
Machine checks are organized in banks (normally associated with
|
||||
a hardware subsystem) and subevents in a bank. The exact meaning
|
||||
of the banks and subevent is CPU specific.
|
||||
|
||||
mcelog knows how to decode them.
|
||||
|
||||
When you see the "Machine check errors logged" message in the system
|
||||
log then mcelog should run to collect and decode machine check entries
|
||||
from /dev/mcelog. Normally mcelog should be run regularly from a cronjob.
|
||||
|
||||
Each CPU has a directory in /sys/devices/system/machinecheck/machinecheckN
|
||||
(N = CPU number)
|
||||
|
||||
The directory contains some configurable entries:
|
||||
|
||||
Entries:
|
||||
|
||||
bankNctl
|
||||
(N bank number)
|
||||
64bit Hex bitmask enabling/disabling specific subevents for bank N
|
||||
When a bit in the bitmask is zero then the respective
|
||||
subevent will not be reported.
|
||||
By default all events are enabled.
|
||||
Note that BIOS maintain another mask to disable specific events
|
||||
per bank. This is not visible here
|
||||
|
||||
The following entries appear for each CPU, but they are truly shared
|
||||
between all CPUs.
|
||||
|
||||
check_interval
|
||||
How often to poll for corrected machine check errors, in seconds
|
||||
(Note output is hexademical). Default 5 minutes.
|
||||
|
||||
tolerant
|
||||
Tolerance level. When a machine check exception occurs for a non
|
||||
corrected machine check the kernel can take different actions.
|
||||
Since machine check exceptions can happen any time it is sometimes
|
||||
risky for the kernel to kill a process because it defies
|
||||
normal kernel locking rules. The tolerance level configures
|
||||
how hard the kernel tries to recover even at some risk of deadlock.
|
||||
|
||||
0: always panic,
|
||||
1: panic if deadlock possible,
|
||||
2: try to avoid panic,
|
||||
3: never panic or exit (for testing only)
|
||||
|
||||
Default: 1
|
||||
|
||||
Note this only makes a difference if the CPU allows recovery
|
||||
from a machine check exception. Current x86 CPUs generally do not.
|
||||
|
||||
trigger
|
||||
Program to run when a machine check event is detected.
|
||||
This is an alternative to running mcelog regularly from cron
|
||||
and allows to detect events faster.
|
||||
|
||||
TBD document entries for AMD threshold interrupt configuration
|
||||
|
||||
For more details about the x86 machine check architecture
|
||||
see the Intel and AMD architecture manuals from their developer websites.
|
||||
|
||||
For more details about the architecture see
|
||||
see http://one.firstfloor.org/~andi/mce.pdf
|
@ -3,26 +3,26 @@
|
||||
|
||||
Virtual memory map with 4 level page tables:
|
||||
|
||||
0000000000000000 - 00007fffffffffff (=47bits) user space, different per mm
|
||||
0000000000000000 - 00007fffffffffff (=47 bits) user space, different per mm
|
||||
hole caused by [48:63] sign extension
|
||||
ffff800000000000 - ffff80ffffffffff (=40bits) guard hole
|
||||
ffff810000000000 - ffffc0ffffffffff (=46bits) direct mapping of all phys. memory
|
||||
ffffc10000000000 - ffffc1ffffffffff (=40bits) hole
|
||||
ffffc20000000000 - ffffe1ffffffffff (=45bits) vmalloc/ioremap space
|
||||
ffff800000000000 - ffff80ffffffffff (=40 bits) guard hole
|
||||
ffff810000000000 - ffffc0ffffffffff (=46 bits) direct mapping of all phys. memory
|
||||
ffffc10000000000 - ffffc1ffffffffff (=40 bits) hole
|
||||
ffffc20000000000 - ffffe1ffffffffff (=45 bits) vmalloc/ioremap space
|
||||
... unused hole ...
|
||||
ffffffff80000000 - ffffffff82800000 (=40MB) kernel text mapping, from phys 0
|
||||
ffffffff80000000 - ffffffff82800000 (=40 MB) kernel text mapping, from phys 0
|
||||
... unused hole ...
|
||||
ffffffff88000000 - fffffffffff00000 (=1919MB) module mapping space
|
||||
ffffffff88000000 - fffffffffff00000 (=1919 MB) module mapping space
|
||||
|
||||
The direct mapping covers all memory in the system upto the highest
|
||||
The direct mapping covers all memory in the system up to the highest
|
||||
memory address (this means in some cases it can also include PCI memory
|
||||
holes)
|
||||
holes).
|
||||
|
||||
vmalloc space is lazily synchronized into the different PML4 pages of
|
||||
the processes using the page fault handler, with init_level4_pgt as
|
||||
reference.
|
||||
|
||||
Current X86-64 implementations only support 40 bit of address space,
|
||||
but we support upto 46bits. This expands into MBZ space in the page tables.
|
||||
Current X86-64 implementations only support 40 bits of address space,
|
||||
but we support up to 46 bits. This expands into MBZ space in the page tables.
|
||||
|
||||
-Andi Kleen, Jul 2004
|
||||
|
110
MAINTAINERS
110
MAINTAINERS
@ -247,6 +247,13 @@ L: linux-acpi@vger.kernel.org
|
||||
W: http://acpi.sourceforge.net/
|
||||
S: Supported
|
||||
|
||||
ACPI VIDEO DRIVER
|
||||
P: Luming Yu
|
||||
M: luming.yu@intel.com
|
||||
L: linux-acpi@vger.kernel.org
|
||||
W: http://acpi.sourceforge.net/
|
||||
S: Supported
|
||||
|
||||
AD1816 SOUND DRIVER
|
||||
P: Thorsten Knabe
|
||||
M: Thorsten Knabe <linux@thorsten-knabe.de>
|
||||
@ -268,6 +275,12 @@ M: khali@linux-fr.org
|
||||
L: lm-sensors@lm-sensors.org
|
||||
S: Maintained
|
||||
|
||||
ADM1029 HARDWARE MONITOR DRIVER
|
||||
P: Corentin Labbe
|
||||
M: corentin.labbe@geomatys.fr
|
||||
L: lm-sensors@lm-sensors.org
|
||||
S: Maintained
|
||||
|
||||
ADT746X FAN DRIVER
|
||||
P: Colin Leroy
|
||||
M: colin@colino.net
|
||||
@ -584,12 +597,30 @@ W: http://sourceforge.net/projects/acpi4asus
|
||||
W: http://xf.iksaif.net/acpi4asus
|
||||
S: Maintained
|
||||
|
||||
ASUS LAPTOP EXTRAS DRIVER
|
||||
P: Corentin Chary
|
||||
M: corentincj@iksaif.net
|
||||
L: acpi4asus-user@lists.sourceforge.net
|
||||
W: http://sourceforge.net/projects/acpi4asus
|
||||
W: http://xf.iksaif.net/acpi4asus
|
||||
S: Maintained
|
||||
|
||||
ATA OVER ETHERNET DRIVER
|
||||
P: Ed L. Cashin
|
||||
M: ecashin@coraid.com
|
||||
W: http://www.coraid.com/support/linux
|
||||
S: Supported
|
||||
|
||||
ATL1 ETHERNET DRIVER
|
||||
P: Jay Cliburn
|
||||
M: jcliburn@gmail.com
|
||||
P: Chris Snook
|
||||
M: csnook@redhat.com
|
||||
L: atl1-devel@lists.sourceforge.net
|
||||
W: http://sourceforge.net/projects/atl1
|
||||
W: http://atl1.sourceforge.net
|
||||
S: Maintained
|
||||
|
||||
ATM
|
||||
P: Chas Williams
|
||||
M: chas@cmf.nrl.navy.mil
|
||||
@ -602,6 +633,11 @@ P: Haavard Skinnemoen
|
||||
M: hskinnemoen@atmel.com
|
||||
S: Supported
|
||||
|
||||
ATMEL SPI DRIVER
|
||||
P: Haavard Skinnemoen
|
||||
M: hskinnemoen@atmel.com
|
||||
S: Supported
|
||||
|
||||
ATMEL WIRELESS DRIVER
|
||||
P: Simon Kelley
|
||||
M: simon@thekelleys.org.uk
|
||||
@ -617,6 +653,12 @@ W: http://people.redhat.com/sgrubb/audit/
|
||||
T: git kernel.org:/pub/scm/linux/kernel/git/dwmw2/audit-2.6.git
|
||||
S: Maintained
|
||||
|
||||
AUXILIARY DISPLAY DRIVERS
|
||||
P: Miguel Ojeda Sandonis
|
||||
M: maxextreme@gmail.com
|
||||
L: linux-kernel@vger.kernel.org
|
||||
S: Maintained
|
||||
|
||||
AVR32 ARCHITECTURE
|
||||
P: Haavard Skinnemoen
|
||||
M: hskinnemoen@atmel.com
|
||||
@ -818,6 +860,18 @@ L: linux-kernel@vger.kernel.org
|
||||
L: discuss@x86-64.org
|
||||
S: Maintained
|
||||
|
||||
CFAG12864B LCD DRIVER
|
||||
P: Miguel Ojeda Sandonis
|
||||
M: maxextreme@gmail.com
|
||||
L: linux-kernel@vger.kernel.org
|
||||
S: Maintained
|
||||
|
||||
CFAG12864BFB LCD FRAMEBUFFER DRIVER
|
||||
P: Miguel Ojeda Sandonis
|
||||
M: maxextreme@gmail.com
|
||||
L: linux-kernel@vger.kernel.org
|
||||
S: Maintained
|
||||
|
||||
COMMON INTERNET FILE SYSTEM (CIFS)
|
||||
P: Steve French
|
||||
M: sfrench@samba.org
|
||||
@ -966,14 +1020,12 @@ L: cycsyn-devel@bazar.conectiva.com.br
|
||||
S: Maintained
|
||||
|
||||
CYCLADES ASYNC MUX DRIVER
|
||||
M: async@cyclades.com
|
||||
W: http://www.cyclades.com/
|
||||
S: Supported
|
||||
S: Orphan
|
||||
|
||||
CYCLADES PC300 DRIVER
|
||||
M: pc300@cyclades.com
|
||||
W: http://www.cyclades.com/
|
||||
S: Supported
|
||||
S: Orphan
|
||||
|
||||
DAMA SLAVE for AX.25
|
||||
P: Joerg Reuter
|
||||
@ -1096,7 +1148,7 @@ S: Supported
|
||||
DAVICOM FAST ETHERNET (DMFE) NETWORK DRIVER
|
||||
P: Tobias Ringstrom
|
||||
M: tori@unhappy.mine.nu
|
||||
L: linux-kernel@vger.kernel.org
|
||||
L: netdev@vger.kernel.org
|
||||
S: Maintained
|
||||
|
||||
DOCBOOK FOR DOCUMENTATION
|
||||
@ -1953,6 +2005,12 @@ M: davem@davemloft.net
|
||||
L: linux-kernel@vger.kernel.org
|
||||
S: Maintained
|
||||
|
||||
KS0108 LCD CONTROLLER DRIVER
|
||||
P: Miguel Ojeda Sandonis
|
||||
M: maxextreme@gmail.com
|
||||
L: linux-kernel@vger.kernel.org
|
||||
S: Maintained
|
||||
|
||||
LAPB module
|
||||
L: linux-x25@vger.kernel.org
|
||||
S: Orphan
|
||||
@ -2343,7 +2401,7 @@ S: Maintained
|
||||
NETWORKING [WIRELESS]
|
||||
P: John W. Linville
|
||||
M: linville@tuxdriver.com
|
||||
L: netdev@vger.kernel.org
|
||||
L: linux-wireless@vger.kernel.org
|
||||
T: git kernel.org:/pub/scm/linux/kernel/git/linville/wireless-2.6.git
|
||||
S: Maintained
|
||||
|
||||
@ -2477,6 +2535,18 @@ L: orinoco-devel@lists.sourceforge.net
|
||||
W: http://www.nongnu.org/orinoco/
|
||||
S: Maintained
|
||||
|
||||
PA SEMI ETHERNET DRIVER
|
||||
P: Olof Johansson
|
||||
M: olof@lixom.net
|
||||
L: netdev@vger.kernel.org
|
||||
S: Maintained
|
||||
|
||||
PA SEMI SMBUS DRIVER
|
||||
P: Olof Johansson
|
||||
M: olof@lixom.net
|
||||
L: i2c@lm-sensors.org
|
||||
S: Maintained
|
||||
|
||||
PARALLEL PORT SUPPORT
|
||||
P: Phil Blundell
|
||||
M: philb@gnu.org
|
||||
@ -2566,8 +2636,8 @@ T: git kernel.org:/pub/scm/linux/kernel/git/brodo/pcmcia-2.6.git
|
||||
S: Maintained
|
||||
|
||||
PCNET32 NETWORK DRIVER
|
||||
P: Thomas Bogendörfer
|
||||
M: tsbogend@alpha.franken.de
|
||||
P: Don Fry
|
||||
M: pcnet32@verizon.net
|
||||
L: netdev@vger.kernel.org
|
||||
S: Maintained
|
||||
|
||||
@ -2646,7 +2716,7 @@ S: Supported
|
||||
|
||||
PRISM54 WIRELESS DRIVER
|
||||
P: Prism54 Development Team
|
||||
M: prism54-private@prism54.org
|
||||
M: developers@islsm.org
|
||||
L: netdev@vger.kernel.org
|
||||
W: http://prism54.org
|
||||
S: Maintained
|
||||
@ -2791,7 +2861,7 @@ M: schwidefsky@de.ibm.com
|
||||
P: Heiko Carstens
|
||||
M: heiko.carstens@de.ibm.com
|
||||
M: linux390@de.ibm.com
|
||||
L: linux-390@vm.marist.edu
|
||||
L: linux-s390@vger.kernel.org
|
||||
W: http://www.ibm.com/developerworks/linux/linux390/
|
||||
S: Supported
|
||||
|
||||
@ -2799,7 +2869,7 @@ S390 NETWORK DRIVERS
|
||||
P: Frank Pavlic
|
||||
M: fpavlic@de.ibm.com
|
||||
M: linux390@de.ibm.com
|
||||
L: linux-390@vm.marist.edu
|
||||
L: linux-s390@vger.kernel.org
|
||||
W: http://www.ibm.com/developerworks/linux/linux390/
|
||||
S: Supported
|
||||
|
||||
@ -2807,7 +2877,7 @@ S390 ZFCP DRIVER
|
||||
P: Swen Schillig
|
||||
M: swen@vnet.ibm.com
|
||||
M: linux390@de.ibm.com
|
||||
L: linux-390@vm.marist.edu
|
||||
L: linux-s390@vger.kernel.org
|
||||
W: http://www.ibm.com/developerworks/linux/linux390/
|
||||
S: Supported
|
||||
|
||||
@ -3004,6 +3074,8 @@ S: Maintained
|
||||
SONY VAIO CONTROL DEVICE DRIVER
|
||||
P: Stelian Pop
|
||||
M: stelian@popies.net
|
||||
P: Mattia Dongili
|
||||
M: malattia@linux.it
|
||||
W: http://popies.net/sonypi/
|
||||
S: Maintained
|
||||
|
||||
@ -3013,6 +3085,12 @@ M: perex@suse.cz
|
||||
L: alsa-devel@alsa-project.org
|
||||
S: Maintained
|
||||
|
||||
SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEMENT
|
||||
P: Liam Girdwood
|
||||
M: liam.girdwood@wolfsonmicro.com
|
||||
L: alsa-devel@alsa-project.org
|
||||
S: Supported
|
||||
|
||||
SPI SUBSYSTEM
|
||||
P: David Brownell
|
||||
M: dbrownell@users.sourceforge.net
|
||||
@ -3263,6 +3341,11 @@ L: vtun@office.satix.net
|
||||
W: http://vtun.sourceforge.net/tun
|
||||
S: Maintained
|
||||
|
||||
TURBOCHANNEL SUBSYSTEM
|
||||
P: Maciej W. Rozycki
|
||||
M: macro@linux-mips.org
|
||||
S: Maintained
|
||||
|
||||
U14-34F SCSI DRIVER
|
||||
P: Dario Ballabio
|
||||
M: ballabio_dario@emc.com
|
||||
@ -3647,7 +3730,7 @@ S: Maintained
|
||||
W83L51xD SD/MMC CARD INTERFACE DRIVER
|
||||
P: Pierre Ossman
|
||||
M: drzeus-wbsd@drzeus.cx
|
||||
L: wbsd-devel@list.drzeus.cx
|
||||
L: linux-kernel@vger.kernel.org
|
||||
W: http://projects.drzeus.cx/wbsd
|
||||
S: Maintained
|
||||
|
||||
@ -3711,6 +3794,7 @@ P: Andi Kleen
|
||||
M: ak@suse.de
|
||||
L: discuss@x86-64.org
|
||||
W: http://www.x86-64.org
|
||||
T: quilt ftp://ftp.firstfloor.org/pub/ak/x86_64/quilt-current
|
||||
S: Maintained
|
||||
|
||||
YAM DRIVER FOR AX.25
|
||||
|
28
Makefile
28
Makefile
@ -776,7 +776,7 @@ $(vmlinux-dirs): prepare scripts
|
||||
# $(EXTRAVERSION) eg, -rc6
|
||||
# $(localver-full)
|
||||
# $(localver)
|
||||
# localversion* (all localversion* files)
|
||||
# localversion* (files without backups, containing '~')
|
||||
# $(CONFIG_LOCALVERSION) (from kernel config setting)
|
||||
# $(localver-auto) (only if CONFIG_LOCALVERSION_AUTO is set)
|
||||
# ./scripts/setlocalversion (SCM tag, if one exists)
|
||||
@ -787,17 +787,12 @@ $(vmlinux-dirs): prepare scripts
|
||||
# moment, only git is supported but other SCMs can edit the script
|
||||
# scripts/setlocalversion and add the appropriate checks as needed.
|
||||
|
||||
nullstring :=
|
||||
space := $(nullstring) # end of line
|
||||
pattern = ".*/localversion[^~]*"
|
||||
string = $(shell cat /dev/null \
|
||||
`find $(objtree) $(srctree) -maxdepth 1 -regex $(pattern) | sort -u`)
|
||||
|
||||
___localver = $(objtree)/localversion* $(srctree)/localversion*
|
||||
__localver = $(sort $(wildcard $(___localver)))
|
||||
# skip backup files (containing '~')
|
||||
_localver = $(foreach f, $(__localver), $(if $(findstring ~, $(f)),,$(f)))
|
||||
|
||||
localver = $(subst $(space),, \
|
||||
$(shell cat /dev/null $(_localver)) \
|
||||
$(patsubst "%",%,$(CONFIG_LOCALVERSION)))
|
||||
localver = $(subst $(space),, $(string) \
|
||||
$(patsubst "%",%,$(CONFIG_LOCALVERSION)))
|
||||
|
||||
# If CONFIG_LOCALVERSION_AUTO is set scripts/setlocalversion is called
|
||||
# and if the SCM is know a tag from the SCM is appended.
|
||||
@ -830,9 +825,6 @@ include/config/kernel.release: include/config/auto.conf FORCE
|
||||
# Listed in dependency order
|
||||
PHONY += prepare archprepare prepare0 prepare1 prepare2 prepare3
|
||||
|
||||
# prepare-all is deprecated, use prepare as valid replacement
|
||||
PHONY += prepare-all
|
||||
|
||||
# prepare3 is used to check if we are building in a separate output directory,
|
||||
# and if so do:
|
||||
# 1) Check that make has not been executed in the kernel src $(srctree)
|
||||
@ -865,7 +857,7 @@ prepare0: archprepare FORCE
|
||||
$(Q)$(MAKE) $(build)=.
|
||||
|
||||
# All the preparing..
|
||||
prepare prepare-all: prepare0
|
||||
prepare: prepare0
|
||||
|
||||
# Leave this as default for preprocessing vmlinux.lds.S, which is now
|
||||
# done in arch/$(ARCH)/kernel/Makefile
|
||||
@ -936,6 +928,12 @@ headers_install: include/linux/version.h scripts_basic FORCE
|
||||
$(Q)$(MAKE) $(build)=scripts scripts/unifdef
|
||||
$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.headersinst obj=include
|
||||
|
||||
PHONY += headers_check_all
|
||||
headers_check_all: headers_install_all
|
||||
$(Q)for arch in $(HDRARCHES); do \
|
||||
$(MAKE) ARCH=$$arch -f $(srctree)/scripts/Makefile.headersinst obj=include BIASMDIR=-bi-$$arch HDRCHECK=1 ;\
|
||||
done
|
||||
|
||||
PHONY += headers_check
|
||||
headers_check: headers_install
|
||||
$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.headersinst obj=include HDRCHECK=1
|
||||
|
2
README
2
README
@ -24,7 +24,7 @@ ON WHAT HARDWARE DOES IT RUN?
|
||||
today Linux also runs on (at least) the Compaq Alpha AXP, Sun SPARC and
|
||||
UltraSPARC, Motorola 68000, PowerPC, PowerPC64, ARM, Hitachi SuperH, Cell,
|
||||
IBM S/390, MIPS, HP PA-RISC, Intel IA-64, DEC VAX, AMD x86-64, AXIS CRIS,
|
||||
Cris, Xtensa, AVR32 and Renesas M32R architectures.
|
||||
Xtensa, AVR32 and Renesas M32R architectures.
|
||||
|
||||
Linux is easily portable to most general-purpose 32- or 64-bit architectures
|
||||
as long as they have a paged memory management unit (PMMU) and a port of the
|
||||
|
@ -41,6 +41,10 @@ config GENERIC_CALIBRATE_DELAY
|
||||
bool
|
||||
default y
|
||||
|
||||
config ZONE_DMA
|
||||
bool
|
||||
default y
|
||||
|
||||
config GENERIC_ISA_DMA
|
||||
bool
|
||||
default y
|
||||
|
@ -575,3 +575,7 @@ void pci_iounmap(struct pci_dev *dev, void __iomem * addr)
|
||||
|
||||
EXPORT_SYMBOL(pci_iomap);
|
||||
EXPORT_SYMBOL(pci_iounmap);
|
||||
|
||||
/* FIXME: Some boxes have multiple ISA bridges! */
|
||||
struct pci_dev *isa_bridge;
|
||||
EXPORT_SYMBOL(isa_bridge);
|
||||
|
@ -122,7 +122,7 @@ static void get_sysnames(unsigned long, unsigned long, unsigned long,
|
||||
char **, char **);
|
||||
static void determine_cpu_caches (unsigned int);
|
||||
|
||||
static char command_line[COMMAND_LINE_SIZE];
|
||||
static char __initdata command_line[COMMAND_LINE_SIZE];
|
||||
|
||||
/*
|
||||
* The format of "screen_info" is strange, and due to early
|
||||
@ -547,7 +547,7 @@ setup_arch(char **cmdline_p)
|
||||
} else {
|
||||
strlcpy(command_line, COMMAND_LINE, sizeof command_line);
|
||||
}
|
||||
strcpy(saved_command_line, command_line);
|
||||
strcpy(boot_command_line, command_line);
|
||||
*cmdline_p = command_line;
|
||||
|
||||
/*
|
||||
@ -589,7 +589,7 @@ setup_arch(char **cmdline_p)
|
||||
}
|
||||
|
||||
/* Replace the command line, now that we've killed it with strsep. */
|
||||
strcpy(command_line, saved_command_line);
|
||||
strcpy(command_line, boot_command_line);
|
||||
|
||||
/* If we want SRM console printk echoing early, do it now. */
|
||||
if (alpha_using_srm && srmcons_output) {
|
||||
|
@ -90,17 +90,6 @@ static inline __u32 rpcc(void)
|
||||
return result;
|
||||
}
|
||||
|
||||
/*
|
||||
* Scheduler clock - returns current time in nanosec units.
|
||||
*
|
||||
* Copied from ARM code for expediency... ;-}
|
||||
*/
|
||||
unsigned long long sched_clock(void)
|
||||
{
|
||||
return (unsigned long long)jiffies * (1000000000 / HZ);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* timer_interrupt() needs to keep up the real-time clock,
|
||||
* as well as call the "do_timer()" routine every clocktick
|
||||
|
@ -52,10 +52,12 @@ SECTIONS
|
||||
}
|
||||
__initcall_end = .;
|
||||
|
||||
#ifdef CONFIG_BLK_DEV_INITRD
|
||||
. = ALIGN(8192);
|
||||
__initramfs_start = .;
|
||||
.init.ramfs : { *(.init.ramfs) }
|
||||
__initramfs_end = .;
|
||||
#endif
|
||||
|
||||
. = ALIGN(8);
|
||||
.con_initcall.init : {
|
||||
|
@ -9,6 +9,7 @@ config ARM
|
||||
bool
|
||||
default y
|
||||
select RTC_LIB
|
||||
select SYS_SUPPORTS_APM_EMULATION
|
||||
help
|
||||
The ARM series is a line of low-power-consumption RISC chip designs
|
||||
licensed by ARM Ltd and targeted at embedded applications and
|
||||
@ -17,6 +18,9 @@ config ARM
|
||||
Europe. There is an ARM Linux project with a web page at
|
||||
<http://www.arm.linux.org.uk/>.
|
||||
|
||||
config SYS_SUPPORTS_APM_EMULATION
|
||||
bool
|
||||
|
||||
config GENERIC_TIME
|
||||
bool
|
||||
default n
|
||||
@ -25,6 +29,10 @@ config MMU
|
||||
bool
|
||||
default y
|
||||
|
||||
config NO_IOPORT
|
||||
bool
|
||||
default n
|
||||
|
||||
config EISA
|
||||
bool
|
||||
---help---
|
||||
@ -96,6 +104,10 @@ config GENERIC_BUST_SPINLOCK
|
||||
config ARCH_MAY_HAVE_PC_FDC
|
||||
bool
|
||||
|
||||
config ZONE_DMA
|
||||
bool
|
||||
default y
|
||||
|
||||
config GENERIC_ISA_DMA
|
||||
bool
|
||||
|
||||
@ -301,6 +313,7 @@ config ARCH_RPC
|
||||
select TIMER_ACORN
|
||||
select ARCH_MAY_HAVE_PC_FDC
|
||||
select ISA_DMA_API
|
||||
select NO_IOPORT
|
||||
help
|
||||
On the Acorn Risc-PC, Linux can support the internal IDE disk and
|
||||
CD-ROM interface, serial and parallel port, and the floppy drive.
|
||||
@ -414,7 +427,7 @@ source arch/arm/mm/Kconfig
|
||||
|
||||
config IWMMXT
|
||||
bool "Enable iWMMXt support"
|
||||
depends CPU_XSCALE || CPU_XSC3
|
||||
depends on CPU_XSCALE || CPU_XSC3
|
||||
default y if PXA27x
|
||||
help
|
||||
Enable support for iWMMXt context switching at run time if
|
||||
@ -892,31 +905,6 @@ menu "Power management options"
|
||||
|
||||
source "kernel/power/Kconfig"
|
||||
|
||||
config APM
|
||||
tristate "Advanced Power Management Emulation"
|
||||
---help---
|
||||
APM is a BIOS specification for saving power using several different
|
||||
techniques. This is mostly useful for battery powered laptops with
|
||||
APM compliant BIOSes. If you say Y here, the system time will be
|
||||
reset after a RESUME operation, the /proc/apm device will provide
|
||||
battery status information, and user-space programs will receive
|
||||
notification of APM "events" (e.g. battery status change).
|
||||
|
||||
In order to use APM, you will need supporting software. For location
|
||||
and more information, read <file:Documentation/pm.txt> and the
|
||||
Battery Powered Linux mini-HOWTO, available from
|
||||
<http://www.tldp.org/docs.html#howto>.
|
||||
|
||||
This driver does not spin down disk drives (see the hdparm(8)
|
||||
manpage ("man 8 hdparm") for that), and it doesn't turn off
|
||||
VESA-compliant "green" monitors.
|
||||
|
||||
Generally, if you don't have a battery in your machine, there isn't
|
||||
much point in using this driver and you should say N. If you get
|
||||
random kernel OOPSes or reboots that don't seem to be related to
|
||||
anything, try disabling/enabling this option (or disabling/enabling
|
||||
APM in your BIOS).
|
||||
|
||||
endmenu
|
||||
|
||||
source "net/Kconfig"
|
||||
|
@ -124,7 +124,7 @@ endif
|
||||
machine-$(CONFIG_ARCH_H720X) := h720x
|
||||
machine-$(CONFIG_ARCH_AAEC2000) := aaec2000
|
||||
machine-$(CONFIG_ARCH_REALVIEW) := realview
|
||||
machine-$(CONFIG_ARCH_AT91) := at91rm9200
|
||||
machine-$(CONFIG_ARCH_AT91) := at91
|
||||
machine-$(CONFIG_ARCH_EP93XX) := ep93xx
|
||||
machine-$(CONFIG_ARCH_PNX4008) := pnx4008
|
||||
machine-$(CONFIG_ARCH_NETX) := netx
|
||||
|
@ -329,7 +329,7 @@ static int rtc_fasync(int fd, struct file *file, int on)
|
||||
return fasync_helper(fd, file, on, &rtc_async_queue);
|
||||
}
|
||||
|
||||
static struct file_operations rtc_fops = {
|
||||
static const struct file_operations rtc_fops = {
|
||||
.owner = THIS_MODULE,
|
||||
.llseek = no_llseek,
|
||||
.read = rtc_read,
|
||||
|
@ -23,11 +23,11 @@
|
||||
#include <linux/interrupt.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/leds.h>
|
||||
#include <linux/apm-emulation.h>
|
||||
|
||||
#include <asm/hardware.h>
|
||||
#include <asm/mach-types.h>
|
||||
#include <asm/irq.h>
|
||||
#include <asm/apm.h>
|
||||
#include <asm/arch/pm.h>
|
||||
#include <asm/arch/pxa-regs.h>
|
||||
#include <asm/arch/sharpsl.h>
|
||||
|
@ -10,7 +10,6 @@ obj-y := compat.o entry-armv.o entry-common.o irq.o \
|
||||
process.o ptrace.o semaphore.o setup.o signal.o sys_arm.o \
|
||||
time.o traps.o
|
||||
|
||||
obj-$(CONFIG_APM) += apm.o
|
||||
obj-$(CONFIG_ISA_DMA_API) += dma.o
|
||||
obj-$(CONFIG_ARCH_ACORN) += ecard.o
|
||||
obj-$(CONFIG_FIQ) += fiq.o
|
||||
|
@ -159,8 +159,7 @@ void __init init_IRQ(void)
|
||||
int irq;
|
||||
|
||||
for (irq = 0; irq < NR_IRQS; irq++)
|
||||
irq_desc[irq].status |= IRQ_NOREQUEST | IRQ_DELAYED_DISABLE |
|
||||
IRQ_NOPROBE;
|
||||
irq_desc[irq].status |= IRQ_NOREQUEST | IRQ_NOPROBE;
|
||||
|
||||
#ifdef CONFIG_SMP
|
||||
bad_irq_desc.affinity = CPU_MASK_ALL;
|
||||
|
@ -70,5 +70,5 @@ register_isa_ports(unsigned int membase, unsigned int portbase, unsigned int por
|
||||
isa_membase = membase;
|
||||
isa_portbase = portbase;
|
||||
isa_portshift = portshift;
|
||||
isa_sysctl_header = register_sysctl_table(ctl_bus, 0);
|
||||
isa_sysctl_header = register_sysctl_table(ctl_bus);
|
||||
}
|
||||
|
@ -109,7 +109,7 @@ unsigned long phys_initrd_size __initdata = 0;
|
||||
static struct meminfo meminfo __initdata = { 0, };
|
||||
static const char *cpu_name;
|
||||
static const char *machine_name;
|
||||
static char command_line[COMMAND_LINE_SIZE];
|
||||
static char __initdata command_line[COMMAND_LINE_SIZE];
|
||||
|
||||
static char default_command_line[COMMAND_LINE_SIZE] __initdata = CONFIG_CMDLINE;
|
||||
static union { char c[4]; unsigned long l; } endian_test __initdata = { { 'l', '?', '?', 'b' } };
|
||||
@ -806,8 +806,8 @@ void __init setup_arch(char **cmdline_p)
|
||||
init_mm.end_data = (unsigned long) &_edata;
|
||||
init_mm.brk = (unsigned long) &_end;
|
||||
|
||||
memcpy(saved_command_line, from, COMMAND_LINE_SIZE);
|
||||
saved_command_line[COMMAND_LINE_SIZE-1] = '\0';
|
||||
memcpy(boot_command_line, from, COMMAND_LINE_SIZE);
|
||||
boot_command_line[COMMAND_LINE_SIZE-1] = '\0';
|
||||
parse_cmdline(cmdline_p, from);
|
||||
paging_init(&meminfo, mdesc);
|
||||
request_standard_resources(&meminfo, mdesc);
|
||||
|
@ -79,16 +79,6 @@ static unsigned long dummy_gettimeoffset(void)
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Scheduler clock - returns current time in nanosec units.
|
||||
* This is the default implementation. Sub-architecture
|
||||
* implementations can override this.
|
||||
*/
|
||||
unsigned long long __attribute__((weak)) sched_clock(void)
|
||||
{
|
||||
return (unsigned long long)jiffies * (1000000000 / HZ);
|
||||
}
|
||||
|
||||
/*
|
||||
* An implementation of printk_clock() independent from
|
||||
* sched_clock(). This avoids non-bootable kernels when
|
||||
|
@ -53,10 +53,12 @@ SECTIONS
|
||||
__security_initcall_start = .;
|
||||
*(.security_initcall.init)
|
||||
__security_initcall_end = .;
|
||||
#ifdef CONFIG_BLK_DEV_INITRD
|
||||
. = ALIGN(32);
|
||||
__initramfs_start = .;
|
||||
usr/built-in.o(.init.ramfs)
|
||||
__initramfs_end = .;
|
||||
#endif
|
||||
. = ALIGN(64);
|
||||
__per_cpu_start = .;
|
||||
*(.data.percpu)
|
||||
|
@ -407,7 +407,7 @@ static int at91_clk_open(struct inode *inode, struct file *file)
|
||||
return single_open(file, at91_clk_show, NULL);
|
||||
}
|
||||
|
||||
static struct file_operations at91_clk_operations = {
|
||||
static const struct file_operations at91_clk_operations = {
|
||||
.open = at91_clk_open,
|
||||
.read = seq_read,
|
||||
.llseek = seq_lseek,
|
||||
|
@ -64,6 +64,24 @@ static inline unsigned pin_to_mask(unsigned pin)
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
* mux the pin to the "GPIO" peripheral role.
|
||||
*/
|
||||
int __init_or_module at91_set_GPIO_periph(unsigned pin, int use_pullup)
|
||||
{
|
||||
void __iomem *pio = pin_to_controller(pin);
|
||||
unsigned mask = pin_to_mask(pin);
|
||||
|
||||
if (!pio)
|
||||
return -EINVAL;
|
||||
__raw_writel(mask, pio + PIO_IDR);
|
||||
__raw_writel(mask, pio + (use_pullup ? PIO_PUER : PIO_PUDR));
|
||||
__raw_writel(mask, pio + PIO_PER);
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL(at91_set_GPIO_periph);
|
||||
|
||||
|
||||
/*
|
||||
* mux the pin to the "A" internal peripheral role.
|
||||
*/
|
||||
@ -181,6 +199,36 @@ EXPORT_SYMBOL(at91_set_multi_drive);
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
/* new-style GPIO calls; these expect at91_set_GPIO_periph to have been
|
||||
* called, and maybe at91_set_multi_drive() for putout pins.
|
||||
*/
|
||||
|
||||
int gpio_direction_input(unsigned pin)
|
||||
{
|
||||
void __iomem *pio = pin_to_controller(pin);
|
||||
unsigned mask = pin_to_mask(pin);
|
||||
|
||||
if (!pio || !(__raw_readl(pio + PIO_PSR) & mask))
|
||||
return -EINVAL;
|
||||
__raw_writel(mask, pio + PIO_OER);
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL(gpio_direction_input);
|
||||
|
||||
int gpio_direction_output(unsigned pin)
|
||||
{
|
||||
void __iomem *pio = pin_to_controller(pin);
|
||||
unsigned mask = pin_to_mask(pin);
|
||||
|
||||
if (!pio || !(__raw_readl(pio + PIO_PSR) & mask))
|
||||
return -EINVAL;
|
||||
__raw_writel(mask, pio + PIO_OER);
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL(gpio_direction_output);
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
/*
|
||||
* assuming the pin is muxed as a gpio output, set its value.
|
||||
*/
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user