forked from Minki/linux
Merge branch 'linus' into tracing/urgent
This commit is contained in:
commit
28afe961a1
3
CREDITS
3
CREDITS
@ -3344,8 +3344,7 @@ S: Spain
|
||||
N: Linus Torvalds
|
||||
E: torvalds@linux-foundation.org
|
||||
D: Original kernel hacker
|
||||
S: 12725 SW Millikan Way, Suite 400
|
||||
S: Beaverton, Oregon 97005
|
||||
S: Portland, Oregon 97005
|
||||
S: USA
|
||||
|
||||
N: Marcelo Tosatti
|
||||
|
20
Documentation/ABI/testing/sysfs-dev
Normal file
20
Documentation/ABI/testing/sysfs-dev
Normal file
@ -0,0 +1,20 @@
|
||||
What: /sys/dev
|
||||
Date: April 2008
|
||||
KernelVersion: 2.6.26
|
||||
Contact: Dan Williams <dan.j.williams@intel.com>
|
||||
Description: The /sys/dev tree provides a method to look up the sysfs
|
||||
path for a device using the information returned from
|
||||
stat(2). There are two directories, 'block' and 'char',
|
||||
beneath /sys/dev containing symbolic links with names of
|
||||
the form "<major>:<minor>". These links point to the
|
||||
corresponding sysfs path for the given device.
|
||||
|
||||
Example:
|
||||
$ readlink /sys/dev/block/8:32
|
||||
../../block/sdc
|
||||
|
||||
Entries in /sys/dev/char and /sys/dev/block will be
|
||||
dynamically created and destroyed as devices enter and
|
||||
leave the system.
|
||||
|
||||
Users: mdadm <linux-raid@vger.kernel.org>
|
@ -22,3 +22,12 @@ ready and available in memory. The DMA of the "completion indication"
|
||||
could race with data DMA. Mapping the memory used for completion
|
||||
indications with DMA_ATTR_WRITE_BARRIER would prevent the race.
|
||||
|
||||
DMA_ATTR_WEAK_ORDERING
|
||||
----------------------
|
||||
|
||||
DMA_ATTR_WEAK_ORDERING specifies that reads and writes to the mapping
|
||||
may be weakly ordered, that is that reads and writes may pass each other.
|
||||
|
||||
Since it is optional for platforms to implement DMA_ATTR_WEAK_ORDERING,
|
||||
those that do not will simply ignore the attribute and exhibit default
|
||||
behavior.
|
||||
|
@ -524,6 +524,44 @@ These utilities include endpoint autoconfiguration.
|
||||
<!-- !Edrivers/usb/gadget/epautoconf.c -->
|
||||
</sect1>
|
||||
|
||||
<sect1 id="composite"><title>Composite Device Framework</title>
|
||||
|
||||
<para>The core API is sufficient for writing drivers for composite
|
||||
USB devices (with more than one function in a given configuration),
|
||||
and also multi-configuration devices (also more than one function,
|
||||
but not necessarily sharing a given configuration).
|
||||
There is however an optional framework which makes it easier to
|
||||
reuse and combine functions.
|
||||
</para>
|
||||
|
||||
<para>Devices using this framework provide a <emphasis>struct
|
||||
usb_composite_driver</emphasis>, which in turn provides one or
|
||||
more <emphasis>struct usb_configuration</emphasis> instances.
|
||||
Each such configuration includes at least one
|
||||
<emphasis>struct usb_function</emphasis>, which packages a user
|
||||
visible role such as "network link" or "mass storage device".
|
||||
Management functions may also exist, such as "Device Firmware
|
||||
Upgrade".
|
||||
</para>
|
||||
|
||||
!Iinclude/linux/usb/composite.h
|
||||
!Edrivers/usb/gadget/composite.c
|
||||
|
||||
</sect1>
|
||||
|
||||
<sect1 id="functions"><title>Composite Device Functions</title>
|
||||
|
||||
<para>At this writing, a few of the current gadget drivers have
|
||||
been converted to this framework.
|
||||
Near-term plans include converting all of them, except for "gadgetfs".
|
||||
</para>
|
||||
|
||||
!Edrivers/usb/gadget/f_acm.c
|
||||
!Edrivers/usb/gadget/f_serial.c
|
||||
|
||||
</sect1>
|
||||
|
||||
|
||||
</chapter>
|
||||
|
||||
<chapter id="controllers"><title>Peripheral Controller Drivers</title>
|
||||
|
@ -21,6 +21,18 @@
|
||||
</affiliation>
|
||||
</author>
|
||||
|
||||
<copyright>
|
||||
<year>2006-2008</year>
|
||||
<holder>Hans-Jürgen Koch.</holder>
|
||||
</copyright>
|
||||
|
||||
<legalnotice>
|
||||
<para>
|
||||
This documentation is Free Software licensed under the terms of the
|
||||
GPL version 2.
|
||||
</para>
|
||||
</legalnotice>
|
||||
|
||||
<pubdate>2006-12-11</pubdate>
|
||||
|
||||
<abstract>
|
||||
@ -29,6 +41,12 @@
|
||||
</abstract>
|
||||
|
||||
<revhistory>
|
||||
<revision>
|
||||
<revnumber>0.5</revnumber>
|
||||
<date>2008-05-22</date>
|
||||
<authorinitials>hjk</authorinitials>
|
||||
<revremark>Added description of write() function.</revremark>
|
||||
</revision>
|
||||
<revision>
|
||||
<revnumber>0.4</revnumber>
|
||||
<date>2007-11-26</date>
|
||||
@ -57,20 +75,9 @@
|
||||
</bookinfo>
|
||||
|
||||
<chapter id="aboutthisdoc">
|
||||
<?dbhtml filename="about.html"?>
|
||||
<?dbhtml filename="aboutthis.html"?>
|
||||
<title>About this document</title>
|
||||
|
||||
<sect1 id="copyright">
|
||||
<?dbhtml filename="copyright.html"?>
|
||||
<title>Copyright and License</title>
|
||||
<para>
|
||||
Copyright (c) 2006 by Hans-Jürgen Koch.</para>
|
||||
<para>
|
||||
This documentation is Free Software licensed under the terms of the
|
||||
GPL version 2.
|
||||
</para>
|
||||
</sect1>
|
||||
|
||||
<sect1 id="translations">
|
||||
<?dbhtml filename="translations.html"?>
|
||||
<title>Translations</title>
|
||||
@ -189,6 +196,30 @@ interested in translating it, please email me
|
||||
represents the total interrupt count. You can use this number
|
||||
to figure out if you missed some interrupts.
|
||||
</para>
|
||||
<para>
|
||||
For some hardware that has more than one interrupt source internally,
|
||||
but not separate IRQ mask and status registers, there might be
|
||||
situations where userspace cannot determine what the interrupt source
|
||||
was if the kernel handler disables them by writing to the chip's IRQ
|
||||
register. In such a case, the kernel has to disable the IRQ completely
|
||||
to leave the chip's register untouched. Now the userspace part can
|
||||
determine the cause of the interrupt, but it cannot re-enable
|
||||
interrupts. Another cornercase is chips where re-enabling interrupts
|
||||
is a read-modify-write operation to a combined IRQ status/acknowledge
|
||||
register. This would be racy if a new interrupt occurred
|
||||
simultaneously.
|
||||
</para>
|
||||
<para>
|
||||
To address these problems, UIO also implements a write() function. It
|
||||
is normally not used and can be ignored for hardware that has only a
|
||||
single interrupt source or has separate IRQ mask and status registers.
|
||||
If you need it, however, a write to <filename>/dev/uioX</filename>
|
||||
will call the <function>irqcontrol()</function> function implemented
|
||||
by the driver. You have to write a 32-bit value that is usually either
|
||||
0 or 1 to disable or enable interrupts. If a driver does not implement
|
||||
<function>irqcontrol()</function>, <function>write()</function> will
|
||||
return with <varname>-ENOSYS</varname>.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
To handle interrupts properly, your custom kernel module can
|
||||
@ -362,6 +393,14 @@ device is actually used.
|
||||
<function>open()</function>, you will probably also want a custom
|
||||
<function>release()</function> function.
|
||||
</para></listitem>
|
||||
|
||||
<listitem><para>
|
||||
<varname>int (*irqcontrol)(struct uio_info *info, s32 irq_on)
|
||||
</varname>: Optional. If you need to be able to enable or disable
|
||||
interrupts from userspace by writing to <filename>/dev/uioX</filename>,
|
||||
you can implement this function. The parameter <varname>irq_on</varname>
|
||||
will be 0 to disable interrupts and 1 to enable them.
|
||||
</para></listitem>
|
||||
</itemizedlist>
|
||||
|
||||
<para>
|
||||
|
@ -358,7 +358,7 @@ Here is a list of some of the different kernel trees available:
|
||||
- pcmcia, Dominik Brodowski <linux@dominikbrodowski.net>
|
||||
git.kernel.org:/pub/scm/linux/kernel/git/brodo/pcmcia-2.6.git
|
||||
|
||||
- SCSI, James Bottomley <James.Bottomley@SteelEye.com>
|
||||
- SCSI, James Bottomley <James.Bottomley@hansenpartnership.com>
|
||||
git.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6.git
|
||||
|
||||
- x86, Ingo Molnar <mingo@elte.hu>
|
||||
|
@ -308,9 +308,41 @@ Who: Matthew Wilcox <willy@linux.intel.com>
|
||||
|
||||
---------------------------
|
||||
|
||||
What: SCTP_GET_PEER_ADDRS_NUM_OLD, SCTP_GET_PEER_ADDRS_OLD,
|
||||
SCTP_GET_LOCAL_ADDRS_NUM_OLD, SCTP_GET_LOCAL_ADDRS_OLD
|
||||
When: June 2009
|
||||
Why: A newer version of the options have been introduced in 2005 that
|
||||
removes the limitions of the old API. The sctp library has been
|
||||
converted to use these new options at the same time. Any user
|
||||
space app that directly uses the old options should convert to using
|
||||
the new options.
|
||||
Who: Vlad Yasevich <vladislav.yasevich@hp.com>
|
||||
|
||||
---------------------------
|
||||
|
||||
What: CONFIG_THERMAL_HWMON
|
||||
When: January 2009
|
||||
Why: This option was introduced just to allow older lm-sensors userspace
|
||||
to keep working over the upgrade to 2.6.26. At the scheduled time of
|
||||
removal fixed lm-sensors (2.x or 3.x) should be readily available.
|
||||
Who: Rene Herman <rene.herman@gmail.com>
|
||||
|
||||
---------------------------
|
||||
|
||||
What: Code that is now under CONFIG_WIRELESS_EXT_SYSFS
|
||||
(in net/core/net-sysfs.c)
|
||||
When: After the only user (hal) has seen a release with the patches
|
||||
for enough time, probably some time in 2010.
|
||||
Why: Over 1K .text/.data size reduction, data is available in other
|
||||
ways (ioctls)
|
||||
Who: Johannes Berg <johannes@sipsolutions.net>
|
||||
|
||||
---------------------------
|
||||
|
||||
What: CONFIG_NF_CT_ACCT
|
||||
When: 2.6.29
|
||||
Why: Accounting can now be enabled/disabled without kernel recompilation.
|
||||
Currently used only to set a default value for a feature that is also
|
||||
controlled by a kernel/module/sysfs/sysctl parameter.
|
||||
Who: Krzysztof Piotr Oledzki <ole@ans.pl>
|
||||
|
||||
|
@ -26,11 +26,11 @@ You can simplify mounting by just typing:
|
||||
|
||||
this will allocate the first available loopback device (and load loop.o
|
||||
kernel module if necessary) automatically. If the loopback driver is not
|
||||
loaded automatically, make sure that your kernel is compiled with kmod
|
||||
support (CONFIG_KMOD) enabled. Beware that umount will not
|
||||
deallocate /dev/loopN device if /etc/mtab file on your system is a
|
||||
symbolic link to /proc/mounts. You will need to do it manually using
|
||||
"-d" switch of losetup(8). Read losetup(8) manpage for more info.
|
||||
loaded automatically, make sure that you have compiled the module and
|
||||
that modprobe is functioning. Beware that umount will not deallocate
|
||||
/dev/loopN device if /etc/mtab file on your system is a symbolic link to
|
||||
/proc/mounts. You will need to do it manually using "-d" switch of
|
||||
losetup(8). Read losetup(8) manpage for more info.
|
||||
|
||||
To create the BFS image under UnixWare you need to find out first which
|
||||
slice contains it. The command prtvtoc(1M) is your friend:
|
||||
|
@ -233,12 +233,10 @@ accomplished via the group operations specified on the group's
|
||||
config_item_type.
|
||||
|
||||
struct configfs_group_operations {
|
||||
int (*make_item)(struct config_group *group,
|
||||
const char *name,
|
||||
struct config_item **new_item);
|
||||
int (*make_group)(struct config_group *group,
|
||||
const char *name,
|
||||
struct config_group **new_group);
|
||||
struct config_item *(*make_item)(struct config_group *group,
|
||||
const char *name);
|
||||
struct config_group *(*make_group)(struct config_group *group,
|
||||
const char *name);
|
||||
int (*commit_item)(struct config_item *item);
|
||||
void (*disconnect_notify)(struct config_group *group,
|
||||
struct config_item *item);
|
||||
|
@ -273,13 +273,13 @@ static inline struct simple_children *to_simple_children(struct config_item *ite
|
||||
return item ? container_of(to_config_group(item), struct simple_children, group) : NULL;
|
||||
}
|
||||
|
||||
static int simple_children_make_item(struct config_group *group, const char *name, struct config_item **new_item)
|
||||
static struct config_item *simple_children_make_item(struct config_group *group, const char *name)
|
||||
{
|
||||
struct simple_child *simple_child;
|
||||
|
||||
simple_child = kzalloc(sizeof(struct simple_child), GFP_KERNEL);
|
||||
if (!simple_child)
|
||||
return -ENOMEM;
|
||||
return ERR_PTR(-ENOMEM);
|
||||
|
||||
|
||||
config_item_init_type_name(&simple_child->item, name,
|
||||
@ -287,8 +287,7 @@ static int simple_children_make_item(struct config_group *group, const char *nam
|
||||
|
||||
simple_child->storeme = 0;
|
||||
|
||||
*new_item = &simple_child->item;
|
||||
return 0;
|
||||
return &simple_child->item;
|
||||
}
|
||||
|
||||
static struct configfs_attribute simple_children_attr_description = {
|
||||
@ -360,21 +359,20 @@ static struct configfs_subsystem simple_children_subsys = {
|
||||
* children of its own.
|
||||
*/
|
||||
|
||||
static int group_children_make_group(struct config_group *group, const char *name, struct config_group **new_group)
|
||||
static struct config_group *group_children_make_group(struct config_group *group, const char *name)
|
||||
{
|
||||
struct simple_children *simple_children;
|
||||
|
||||
simple_children = kzalloc(sizeof(struct simple_children),
|
||||
GFP_KERNEL);
|
||||
if (!simple_children)
|
||||
return -ENOMEM;
|
||||
return ERR_PTR(-ENOMEM);
|
||||
|
||||
|
||||
config_group_init_type_name(&simple_children->group, name,
|
||||
&simple_children_type);
|
||||
|
||||
*new_group = &simple_children->group;
|
||||
return 0;
|
||||
return &simple_children->group;
|
||||
}
|
||||
|
||||
static struct configfs_attribute group_children_attr_description = {
|
||||
|
@ -5,7 +5,7 @@
|
||||
################################################################################
|
||||
|
||||
Author: NetApp and Open Grid Computing
|
||||
Date: April 15, 2008
|
||||
Date: May 29, 2008
|
||||
|
||||
Table of Contents
|
||||
~~~~~~~~~~~~~~~~~
|
||||
@ -60,16 +60,18 @@ Installation
|
||||
The procedures described in this document have been tested with
|
||||
distributions from Red Hat's Fedora Project (http://fedora.redhat.com/).
|
||||
|
||||
- Install nfs-utils-1.1.1 or greater on the client
|
||||
- Install nfs-utils-1.1.2 or greater on the client
|
||||
|
||||
An NFS/RDMA mount point can only be obtained by using the mount.nfs
|
||||
command in nfs-utils-1.1.1 or greater. To see which version of mount.nfs
|
||||
you are using, type:
|
||||
An NFS/RDMA mount point can be obtained by using the mount.nfs command in
|
||||
nfs-utils-1.1.2 or greater (nfs-utils-1.1.1 was the first nfs-utils
|
||||
version with support for NFS/RDMA mounts, but for various reasons we
|
||||
recommend using nfs-utils-1.1.2 or greater). To see which version of
|
||||
mount.nfs you are using, type:
|
||||
|
||||
> /sbin/mount.nfs -V
|
||||
$ /sbin/mount.nfs -V
|
||||
|
||||
If the version is less than 1.1.1 or the command does not exist,
|
||||
then you will need to install the latest version of nfs-utils.
|
||||
If the version is less than 1.1.2 or the command does not exist,
|
||||
you should install the latest version of nfs-utils.
|
||||
|
||||
Download the latest package from:
|
||||
|
||||
@ -77,22 +79,33 @@ Installation
|
||||
|
||||
Uncompress the package and follow the installation instructions.
|
||||
|
||||
If you will not be using GSS and NFSv4, the installation process
|
||||
can be simplified by disabling these features when running configure:
|
||||
If you will not need the idmapper and gssd executables (you do not need
|
||||
these to create an NFS/RDMA enabled mount command), the installation
|
||||
process can be simplified by disabling these features when running
|
||||
configure:
|
||||
|
||||
> ./configure --disable-gss --disable-nfsv4
|
||||
$ ./configure --disable-gss --disable-nfsv4
|
||||
|
||||
For more information on this see the package's README and INSTALL files.
|
||||
To build nfs-utils you will need the tcp_wrappers package installed. For
|
||||
more information on this see the package's README and INSTALL files.
|
||||
|
||||
After building the nfs-utils package, there will be a mount.nfs binary in
|
||||
the utils/mount directory. This binary can be used to initiate NFS v2, v3,
|
||||
or v4 mounts. To initiate a v4 mount, the binary must be called mount.nfs4.
|
||||
The standard technique is to create a symlink called mount.nfs4 to mount.nfs.
|
||||
or v4 mounts. To initiate a v4 mount, the binary must be called
|
||||
mount.nfs4. The standard technique is to create a symlink called
|
||||
mount.nfs4 to mount.nfs.
|
||||
|
||||
NOTE: mount.nfs and therefore nfs-utils-1.1.1 or greater is only needed
|
||||
This mount.nfs binary should be installed at /sbin/mount.nfs as follows:
|
||||
|
||||
$ sudo cp utils/mount/mount.nfs /sbin/mount.nfs
|
||||
|
||||
In this location, mount.nfs will be invoked automatically for NFS mounts
|
||||
by the system mount commmand.
|
||||
|
||||
NOTE: mount.nfs and therefore nfs-utils-1.1.2 or greater is only needed
|
||||
on the NFS client machine. You do not need this specific version of
|
||||
nfs-utils on the server. Furthermore, only the mount.nfs command from
|
||||
nfs-utils-1.1.1 is needed on the client.
|
||||
nfs-utils-1.1.2 is needed on the client.
|
||||
|
||||
- Install a Linux kernel with NFS/RDMA
|
||||
|
||||
@ -156,8 +169,8 @@ Check RDMA and NFS Setup
|
||||
this time. For example, if you are using a Mellanox Tavor/Sinai/Arbel
|
||||
card:
|
||||
|
||||
> modprobe ib_mthca
|
||||
> modprobe ib_ipoib
|
||||
$ modprobe ib_mthca
|
||||
$ modprobe ib_ipoib
|
||||
|
||||
If you are using InfiniBand, make sure there is a Subnet Manager (SM)
|
||||
running on the network. If your IB switch has an embedded SM, you can
|
||||
@ -166,7 +179,7 @@ Check RDMA and NFS Setup
|
||||
|
||||
If an SM is running on your network, you should see the following:
|
||||
|
||||
> cat /sys/class/infiniband/driverX/ports/1/state
|
||||
$ cat /sys/class/infiniband/driverX/ports/1/state
|
||||
4: ACTIVE
|
||||
|
||||
where driverX is mthca0, ipath5, ehca3, etc.
|
||||
@ -174,10 +187,10 @@ Check RDMA and NFS Setup
|
||||
To further test the InfiniBand software stack, use IPoIB (this
|
||||
assumes you have two IB hosts named host1 and host2):
|
||||
|
||||
host1> ifconfig ib0 a.b.c.x
|
||||
host2> ifconfig ib0 a.b.c.y
|
||||
host1> ping a.b.c.y
|
||||
host2> ping a.b.c.x
|
||||
host1$ ifconfig ib0 a.b.c.x
|
||||
host2$ ifconfig ib0 a.b.c.y
|
||||
host1$ ping a.b.c.y
|
||||
host2$ ping a.b.c.x
|
||||
|
||||
For other device types, follow the appropriate procedures.
|
||||
|
||||
@ -202,11 +215,11 @@ NFS/RDMA Setup
|
||||
/vol0 192.168.0.47(fsid=0,rw,async,insecure,no_root_squash)
|
||||
/vol0 192.168.0.0/255.255.255.0(fsid=0,rw,async,insecure,no_root_squash)
|
||||
|
||||
The IP address(es) is(are) the client's IPoIB address for an InfiniBand HCA or the
|
||||
cleint's iWARP address(es) for an RNIC.
|
||||
The IP address(es) is(are) the client's IPoIB address for an InfiniBand
|
||||
HCA or the cleint's iWARP address(es) for an RNIC.
|
||||
|
||||
NOTE: The "insecure" option must be used because the NFS/RDMA client does not
|
||||
use a reserved port.
|
||||
NOTE: The "insecure" option must be used because the NFS/RDMA client does
|
||||
not use a reserved port.
|
||||
|
||||
Each time a machine boots:
|
||||
|
||||
@ -214,43 +227,45 @@ NFS/RDMA Setup
|
||||
|
||||
For InfiniBand using a Mellanox adapter:
|
||||
|
||||
> modprobe ib_mthca
|
||||
> modprobe ib_ipoib
|
||||
> ifconfig ib0 a.b.c.d
|
||||
$ modprobe ib_mthca
|
||||
$ modprobe ib_ipoib
|
||||
$ ifconfig ib0 a.b.c.d
|
||||
|
||||
NOTE: use unique addresses for the client and server
|
||||
|
||||
- Start the NFS server
|
||||
|
||||
If the NFS/RDMA server was built as a module (CONFIG_SUNRPC_XPRT_RDMA=m in kernel config),
|
||||
load the RDMA transport module:
|
||||
If the NFS/RDMA server was built as a module (CONFIG_SUNRPC_XPRT_RDMA=m in
|
||||
kernel config), load the RDMA transport module:
|
||||
|
||||
> modprobe svcrdma
|
||||
$ modprobe svcrdma
|
||||
|
||||
Regardless of how the server was built (module or built-in), start the server:
|
||||
Regardless of how the server was built (module or built-in), start the
|
||||
server:
|
||||
|
||||
> /etc/init.d/nfs start
|
||||
$ /etc/init.d/nfs start
|
||||
|
||||
or
|
||||
|
||||
> service nfs start
|
||||
$ service nfs start
|
||||
|
||||
Instruct the server to listen on the RDMA transport:
|
||||
|
||||
> echo rdma 2050 > /proc/fs/nfsd/portlist
|
||||
$ echo rdma 2050 > /proc/fs/nfsd/portlist
|
||||
|
||||
- On the client system
|
||||
|
||||
If the NFS/RDMA client was built as a module (CONFIG_SUNRPC_XPRT_RDMA=m in kernel config),
|
||||
load the RDMA client module:
|
||||
If the NFS/RDMA client was built as a module (CONFIG_SUNRPC_XPRT_RDMA=m in
|
||||
kernel config), load the RDMA client module:
|
||||
|
||||
> modprobe xprtrdma.ko
|
||||
$ modprobe xprtrdma.ko
|
||||
|
||||
Regardless of how the client was built (module or built-in), issue the mount.nfs command:
|
||||
Regardless of how the client was built (module or built-in), use this
|
||||
command to mount the NFS/RDMA server:
|
||||
|
||||
> /path/to/your/mount.nfs <IPoIB-server-name-or-address>:/<export> /mnt -i -o rdma,port=2050
|
||||
$ mount -o rdma,port=2050 <IPoIB-server-name-or-address>:/<export> /mnt
|
||||
|
||||
To verify that the mount is using RDMA, run "cat /proc/mounts" and check the
|
||||
"proto" field for the given mount.
|
||||
To verify that the mount is using RDMA, run "cat /proc/mounts" and check
|
||||
the "proto" field for the given mount.
|
||||
|
||||
Congratulations! You're using NFS/RDMA!
|
||||
|
@ -248,6 +248,7 @@ The top level sysfs directory looks like:
|
||||
block/
|
||||
bus/
|
||||
class/
|
||||
dev/
|
||||
devices/
|
||||
firmware/
|
||||
net/
|
||||
@ -274,6 +275,11 @@ fs/ contains a directory for some filesystems. Currently each
|
||||
filesystem wanting to export attributes must create its own hierarchy
|
||||
below fs/ (see ./fuse.txt for an example).
|
||||
|
||||
dev/ contains two directories char/ and block/. Inside these two
|
||||
directories there are symlinks named <major>:<minor>. These symlinks
|
||||
point to the sysfs directory for the given device. /sys/dev provides a
|
||||
quick way to lookup the sysfs interface for a device from the result of
|
||||
a stat(2) operation.
|
||||
|
||||
More information can driver-model specific features can be found in
|
||||
Documentation/driver-model/.
|
||||
|
137
Documentation/ia64/paravirt_ops.txt
Normal file
137
Documentation/ia64/paravirt_ops.txt
Normal file
@ -0,0 +1,137 @@
|
||||
Paravirt_ops on IA64
|
||||
====================
|
||||
21 May 2008, Isaku Yamahata <yamahata@valinux.co.jp>
|
||||
|
||||
|
||||
Introduction
|
||||
------------
|
||||
The aim of this documentation is to help with maintainability and/or to
|
||||
encourage people to use paravirt_ops/IA64.
|
||||
|
||||
paravirt_ops (pv_ops in short) is a way for virtualization support of
|
||||
Linux kernel on x86. Several ways for virtualization support were
|
||||
proposed, paravirt_ops is the winner.
|
||||
On the other hand, now there are also several IA64 virtualization
|
||||
technologies like kvm/IA64, xen/IA64 and many other academic IA64
|
||||
hypervisors so that it is good to add generic virtualization
|
||||
infrastructure on Linux/IA64.
|
||||
|
||||
|
||||
What is paravirt_ops?
|
||||
---------------------
|
||||
It has been developed on x86 as virtualization support via API, not ABI.
|
||||
It allows each hypervisor to override operations which are important for
|
||||
hypervisors at API level. And it allows a single kernel binary to run on
|
||||
all supported execution environments including native machine.
|
||||
Essentially paravirt_ops is a set of function pointers which represent
|
||||
operations corresponding to low level sensitive instructions and high
|
||||
level functionalities in various area. But one significant difference
|
||||
from usual function pointer table is that it allows optimization with
|
||||
binary patch. It is because some of these operations are very
|
||||
performance sensitive and indirect call overhead is not negligible.
|
||||
With binary patch, indirect C function call can be transformed into
|
||||
direct C function call or in-place execution to eliminate the overhead.
|
||||
|
||||
Thus, operations of paravirt_ops are classified into three categories.
|
||||
- simple indirect call
|
||||
These operations correspond to high level functionality so that the
|
||||
overhead of indirect call isn't very important.
|
||||
|
||||
- indirect call which allows optimization with binary patch
|
||||
Usually these operations correspond to low level instructions. They
|
||||
are called frequently and performance critical. So the overhead is
|
||||
very important.
|
||||
|
||||
- a set of macros for hand written assembly code
|
||||
Hand written assembly codes (.S files) also need paravirtualization
|
||||
because they include sensitive instructions or some of code paths in
|
||||
them are very performance critical.
|
||||
|
||||
|
||||
The relation to the IA64 machine vector
|
||||
---------------------------------------
|
||||
Linux/IA64 has the IA64 machine vector functionality which allows the
|
||||
kernel to switch implementations (e.g. initialization, ipi, dma api...)
|
||||
depending on executing platform.
|
||||
We can replace some implementations very easily defining a new machine
|
||||
vector. Thus another approach for virtualization support would be
|
||||
enhancing the machine vector functionality.
|
||||
But paravirt_ops approach was taken because
|
||||
- virtualization support needs wider support than machine vector does.
|
||||
e.g. low level instruction paravirtualization. It must be
|
||||
initialized very early before platform detection.
|
||||
|
||||
- virtualization support needs more functionality like binary patch.
|
||||
Probably the calling overhead might not be very large compared to the
|
||||
emulation overhead of virtualization. However in the native case, the
|
||||
overhead should be eliminated completely.
|
||||
A single kernel binary should run on each environment including native,
|
||||
and the overhead of paravirt_ops on native environment should be as
|
||||
small as possible.
|
||||
|
||||
- for full virtualization technology, e.g. KVM/IA64 or
|
||||
Xen/IA64 HVM domain, the result would be
|
||||
(the emulated platform machine vector. probably dig) + (pv_ops).
|
||||
This means that the virtualization support layer should be under
|
||||
the machine vector layer.
|
||||
|
||||
Possibly it might be better to move some function pointers from
|
||||
paravirt_ops to machine vector. In fact, Xen domU case utilizes both
|
||||
pv_ops and machine vector.
|
||||
|
||||
|
||||
IA64 paravirt_ops
|
||||
-----------------
|
||||
In this section, the concrete paravirt_ops will be discussed.
|
||||
Because of the architecture difference between ia64 and x86, the
|
||||
resulting set of functions is very different from x86 pv_ops.
|
||||
|
||||
- C function pointer tables
|
||||
They are not very performance critical so that simple C indirect
|
||||
function call is acceptable. The following structures are defined at
|
||||
this moment. For details see linux/include/asm-ia64/paravirt.h
|
||||
- struct pv_info
|
||||
This structure describes the execution environment.
|
||||
- struct pv_init_ops
|
||||
This structure describes the various initialization hooks.
|
||||
- struct pv_iosapic_ops
|
||||
This structure describes hooks to iosapic operations.
|
||||
- struct pv_irq_ops
|
||||
This structure describes hooks to irq related operations
|
||||
- struct pv_time_op
|
||||
This structure describes hooks to steal time accounting.
|
||||
|
||||
- a set of indirect calls which need optimization
|
||||
Currently this class of functions correspond to a subset of IA64
|
||||
intrinsics. At this moment the optimization with binary patch isn't
|
||||
implemented yet.
|
||||
struct pv_cpu_op is defined. For details see
|
||||
linux/include/asm-ia64/paravirt_privop.h
|
||||
Mostly they correspond to ia64 intrinsics 1-to-1.
|
||||
Caveat: Now they are defined as C indirect function pointers, but in
|
||||
order to support binary patch optimization, they will be changed
|
||||
using GCC extended inline assembly code.
|
||||
|
||||
- a set of macros for hand written assembly code (.S files)
|
||||
For maintenance purpose, the taken approach for .S files is single
|
||||
source code and compile multiple times with different macros definitions.
|
||||
Each pv_ops instance must define those macros to compile.
|
||||
The important thing here is that sensitive, but non-privileged
|
||||
instructions must be paravirtualized and that some privileged
|
||||
instructions also need paravirtualization for reasonable performance.
|
||||
Developers who modify .S files must be aware of that. At this moment
|
||||
an easy checker is implemented to detect paravirtualization breakage.
|
||||
But it doesn't cover all the cases.
|
||||
|
||||
Sometimes this set of macros is called pv_cpu_asm_op. But there is no
|
||||
corresponding structure in the source code.
|
||||
Those macros mostly 1:1 correspond to a subset of privileged
|
||||
instructions. See linux/include/asm-ia64/native/inst.h.
|
||||
And some functions written in assembly also need to be overrided so
|
||||
that each pv_ops instance have to define some macros. Again see
|
||||
linux/include/asm-ia64/native/inst.h.
|
||||
|
||||
|
||||
Those structures must be initialized very early before start_kernel.
|
||||
Probably initialized in head.S using multi entry point or some other trick.
|
||||
For native case implementation see linux/arch/ia64/kernel/paravirt.c.
|
@ -1,5 +1,3 @@
|
||||
$Id: gameport-programming.txt,v 1.3 2001/04/24 13:51:37 vojtech Exp $
|
||||
|
||||
Programming gameport drivers
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
|
@ -1,7 +1,6 @@
|
||||
Linux Input drivers v1.0
|
||||
(c) 1999-2001 Vojtech Pavlik <vojtech@ucw.cz>
|
||||
Sponsored by SuSE
|
||||
$Id: input.txt,v 1.8 2002/05/29 03:15:01 bradleym Exp $
|
||||
----------------------------------------------------------------------------
|
||||
|
||||
0. Disclaimer
|
||||
|
@ -5,8 +5,6 @@
|
||||
|
||||
7 Aug 1998
|
||||
|
||||
$Id: joystick-api.txt,v 1.2 2001/05/08 21:21:23 vojtech Exp $
|
||||
|
||||
1. Initialization
|
||||
~~~~~~~~~~~~~~~~~
|
||||
|
||||
|
@ -2,7 +2,6 @@
|
||||
(c) 1998-2000 Vojtech Pavlik <vojtech@ucw.cz>
|
||||
(c) 1998 Andree Borrmann <a.borrmann@tu-bs.de>
|
||||
Sponsored by SuSE
|
||||
$Id: joystick-parport.txt,v 1.6 2001/09/25 09:31:32 vojtech Exp $
|
||||
----------------------------------------------------------------------------
|
||||
|
||||
0. Disclaimer
|
||||
|
@ -1,7 +1,6 @@
|
||||
Linux Joystick driver v2.0.0
|
||||
(c) 1996-2000 Vojtech Pavlik <vojtech@ucw.cz>
|
||||
Sponsored by SuSE
|
||||
$Id: joystick.txt,v 1.12 2002/03/03 12:13:07 jdeneux Exp $
|
||||
----------------------------------------------------------------------------
|
||||
|
||||
0. Disclaimer
|
||||
|
@ -1206,7 +1206,7 @@ and is between 256 and 4096 characters. It is defined in the file
|
||||
or
|
||||
memmap=0x10000$0x18690000
|
||||
|
||||
memtest= [KNL,X86_64] Enable memtest
|
||||
memtest= [KNL,X86] Enable memtest
|
||||
Format: <integer>
|
||||
range: 0,4 : pattern number
|
||||
default : 0 <disable>
|
||||
@ -1279,6 +1279,13 @@ and is between 256 and 4096 characters. It is defined in the file
|
||||
This usage is only documented in each driver source
|
||||
file if at all.
|
||||
|
||||
nf_conntrack.acct=
|
||||
[NETFILTER] Enable connection tracking flow accounting
|
||||
0 to disable accounting
|
||||
1 to enable accounting
|
||||
Default value depends on CONFIG_NF_CT_ACCT that is
|
||||
going to be removed in 2.6.29.
|
||||
|
||||
nfsaddrs= [NFS]
|
||||
See Documentation/filesystems/nfsroot.txt.
|
||||
|
||||
@ -2027,6 +2034,9 @@ and is between 256 and 4096 characters. It is defined in the file
|
||||
|
||||
snd-ymfpci= [HW,ALSA]
|
||||
|
||||
softlockup_panic=
|
||||
[KNL] Should the soft-lockup detector generate panics.
|
||||
|
||||
sonypi.*= [HW] Sony Programmable I/O Control Device driver
|
||||
See Documentation/sonypi.txt
|
||||
|
||||
@ -2158,6 +2168,10 @@ and is between 256 and 4096 characters. It is defined in the file
|
||||
Note that genuine overcurrent events won't be
|
||||
reported either.
|
||||
|
||||
unknown_nmi_panic
|
||||
[X86-32,X86-64]
|
||||
Set unknown_nmi_panic=1 early on boot.
|
||||
|
||||
usbcore.autosuspend=
|
||||
[USB] The autosuspend time delay (in seconds) used
|
||||
for newly-detected USB devices (default 2). This
|
||||
|
@ -236,6 +236,11 @@ All md devices contain:
|
||||
writing the word for the desired state, however some states
|
||||
cannot be explicitly set, and some transitions are not allowed.
|
||||
|
||||
Select/poll works on this file. All changes except between
|
||||
active_idle and active (which can be frequent and are not
|
||||
very interesting) are notified. active->active_idle is
|
||||
reported if the metadata is externally managed.
|
||||
|
||||
clear
|
||||
No devices, no size, no level
|
||||
Writing is equivalent to STOP_ARRAY ioctl
|
||||
@ -292,6 +297,10 @@ Each directory contains:
|
||||
writemostly - device will only be subject to read
|
||||
requests if there are no other options.
|
||||
This applies only to raid1 arrays.
|
||||
blocked - device has failed, metadata is "external",
|
||||
and the failure hasn't been acknowledged yet.
|
||||
Writes that would write to this device if
|
||||
it were not faulty are blocked.
|
||||
spare - device is working, but not a full member.
|
||||
This includes spares that are in the process
|
||||
of being recovered to
|
||||
@ -301,6 +310,12 @@ Each directory contains:
|
||||
Writing "remove" removes the device from the array.
|
||||
Writing "writemostly" sets the writemostly flag.
|
||||
Writing "-writemostly" clears the writemostly flag.
|
||||
Writing "blocked" sets the "blocked" flag.
|
||||
Writing "-blocked" clear the "blocked" flag and allows writes
|
||||
to complete.
|
||||
|
||||
This file responds to select/poll. Any change to 'faulty'
|
||||
or 'blocked' causes an event.
|
||||
|
||||
errors
|
||||
An approximate count of read errors that have been detected on
|
||||
@ -332,7 +347,7 @@ Each directory contains:
|
||||
for storage of data. This will normally be the same as the
|
||||
component_size. This can be written while assembling an
|
||||
array. If a value less than the current component_size is
|
||||
written, component_size will be reduced to this value.
|
||||
written, it will be rejected.
|
||||
|
||||
|
||||
An active md device will also contain and entry for each active device
|
||||
@ -381,6 +396,19 @@ also have
|
||||
'check' and 'repair' will start the appropriate process
|
||||
providing the current state is 'idle'.
|
||||
|
||||
This file responds to select/poll. Any important change in the value
|
||||
triggers a poll event. Sometimes the value will briefly be
|
||||
"recover" if a recovery seems to be needed, but cannot be
|
||||
achieved. In that case, the transition to "recover" isn't
|
||||
notified, but the transition away is.
|
||||
|
||||
degraded
|
||||
This contains a count of the number of devices by which the
|
||||
arrays is degraded. So an optimal array with show '0'. A
|
||||
single failed/missing drive will show '1', etc.
|
||||
This file responds to select/poll, any increase or decrease
|
||||
in the count of missing devices will trigger an event.
|
||||
|
||||
mismatch_count
|
||||
When performing 'check' and 'repair', and possibly when
|
||||
performing 'resync', md will count the number of errors that are
|
||||
|
@ -289,35 +289,73 @@ downdelay
|
||||
fail_over_mac
|
||||
|
||||
Specifies whether active-backup mode should set all slaves to
|
||||
the same MAC address (the traditional behavior), or, when
|
||||
enabled, change the bond's MAC address when changing the
|
||||
active interface (i.e., fail over the MAC address itself).
|
||||
the same MAC address at enslavement (the traditional
|
||||
behavior), or, when enabled, perform special handling of the
|
||||
bond's MAC address in accordance with the selected policy.
|
||||
|
||||
Fail over MAC is useful for devices that cannot ever alter
|
||||
their MAC address, or for devices that refuse incoming
|
||||
broadcasts with their own source MAC (which interferes with
|
||||
the ARP monitor).
|
||||
Possible values are:
|
||||
|
||||
The down side of fail over MAC is that every device on the
|
||||
network must be updated via gratuitous ARP, vs. just updating
|
||||
a switch or set of switches (which often takes place for any
|
||||
traffic, not just ARP traffic, if the switch snoops incoming
|
||||
traffic to update its tables) for the traditional method. If
|
||||
the gratuitous ARP is lost, communication may be disrupted.
|
||||
none or 0
|
||||
|
||||
When fail over MAC is used in conjuction with the mii monitor,
|
||||
devices which assert link up prior to being able to actually
|
||||
transmit and receive are particularly susecptible to loss of
|
||||
the gratuitous ARP, and an appropriate updelay setting may be
|
||||
required.
|
||||
This setting disables fail_over_mac, and causes
|
||||
bonding to set all slaves of an active-backup bond to
|
||||
the same MAC address at enslavement time. This is the
|
||||
default.
|
||||
|
||||
A value of 0 disables fail over MAC, and is the default. A
|
||||
value of 1 enables fail over MAC. This option is enabled
|
||||
automatically if the first slave added cannot change its MAC
|
||||
address. This option may be modified via sysfs only when no
|
||||
slaves are present in the bond.
|
||||
active or 1
|
||||
|
||||
This option was added in bonding version 3.2.0.
|
||||
The "active" fail_over_mac policy indicates that the
|
||||
MAC address of the bond should always be the MAC
|
||||
address of the currently active slave. The MAC
|
||||
address of the slaves is not changed; instead, the MAC
|
||||
address of the bond changes during a failover.
|
||||
|
||||
This policy is useful for devices that cannot ever
|
||||
alter their MAC address, or for devices that refuse
|
||||
incoming broadcasts with their own source MAC (which
|
||||
interferes with the ARP monitor).
|
||||
|
||||
The down side of this policy is that every device on
|
||||
the network must be updated via gratuitous ARP,
|
||||
vs. just updating a switch or set of switches (which
|
||||
often takes place for any traffic, not just ARP
|
||||
traffic, if the switch snoops incoming traffic to
|
||||
update its tables) for the traditional method. If the
|
||||
gratuitous ARP is lost, communication may be
|
||||
disrupted.
|
||||
|
||||
When this policy is used in conjuction with the mii
|
||||
monitor, devices which assert link up prior to being
|
||||
able to actually transmit and receive are particularly
|
||||
susecptible to loss of the gratuitous ARP, and an
|
||||
appropriate updelay setting may be required.
|
||||
|
||||
follow or 2
|
||||
|
||||
The "follow" fail_over_mac policy causes the MAC
|
||||
address of the bond to be selected normally (normally
|
||||
the MAC address of the first slave added to the bond).
|
||||
However, the second and subsequent slaves are not set
|
||||
to this MAC address while they are in a backup role; a
|
||||
slave is programmed with the bond's MAC address at
|
||||
failover time (and the formerly active slave receives
|
||||
the newly active slave's MAC address).
|
||||
|
||||
This policy is useful for multiport devices that
|
||||
either become confused or incur a performance penalty
|
||||
when multiple ports are programmed with the same MAC
|
||||
address.
|
||||
|
||||
|
||||
The default policy is none, unless the first slave cannot
|
||||
change its MAC address, in which case the active policy is
|
||||
selected by default.
|
||||
|
||||
This option may be modified via sysfs only when no slaves are
|
||||
present in the bond.
|
||||
|
||||
This option was added in bonding version 3.2.0. The "follow"
|
||||
policy was added in bonding version 3.3.0.
|
||||
|
||||
lacp_rate
|
||||
|
||||
@ -338,7 +376,8 @@ max_bonds
|
||||
Specifies the number of bonding devices to create for this
|
||||
instance of the bonding driver. E.g., if max_bonds is 3, and
|
||||
the bonding driver is not already loaded, then bond0, bond1
|
||||
and bond2 will be created. The default value is 1.
|
||||
and bond2 will be created. The default value is 1. Specifying
|
||||
a value of 0 will load bonding, but will not create any devices.
|
||||
|
||||
miimon
|
||||
|
||||
@ -501,6 +540,17 @@ mode
|
||||
swapped with the new curr_active_slave that was
|
||||
chosen.
|
||||
|
||||
num_grat_arp
|
||||
|
||||
Specifies the number of gratuitous ARPs to be issued after a
|
||||
failover event. One gratuitous ARP is issued immediately after
|
||||
the failover, subsequent ARPs are sent at a rate of one per link
|
||||
monitor interval (arp_interval or miimon, whichever is active).
|
||||
|
||||
The valid range is 0 - 255; the default value is 1. This option
|
||||
affects only the active-backup mode. This option was added for
|
||||
bonding version 3.3.0.
|
||||
|
||||
primary
|
||||
|
||||
A string (eth0, eth2, etc) specifying which slave is the
|
||||
|
167
Documentation/networking/dm9000.txt
Normal file
167
Documentation/networking/dm9000.txt
Normal file
@ -0,0 +1,167 @@
|
||||
DM9000 Network driver
|
||||
=====================
|
||||
|
||||
Copyright 2008 Simtec Electronics,
|
||||
Ben Dooks <ben@simtec.co.uk> <ben-linux@fluff.org>
|
||||
|
||||
|
||||
Introduction
|
||||
------------
|
||||
|
||||
This file describes how to use the DM9000 platform-device based network driver
|
||||
that is contained in the files drivers/net/dm9000.c and drivers/net/dm9000.h.
|
||||
|
||||
The driver supports three DM9000 variants, the DM9000E which is the first chip
|
||||
supported as well as the newer DM9000A and DM9000B devices. It is currently
|
||||
maintained and tested by Ben Dooks, who should be CC: to any patches for this
|
||||
driver.
|
||||
|
||||
|
||||
Defining the platform device
|
||||
----------------------------
|
||||
|
||||
The minimum set of resources attached to the platform device are as follows:
|
||||
|
||||
1) The physical address of the address register
|
||||
2) The physical address of the data register
|
||||
3) The IRQ line the device's interrupt pin is connected to.
|
||||
|
||||
These resources should be specified in that order, as the ordering of the
|
||||
two address regions is important (the driver expects these to be address
|
||||
and then data).
|
||||
|
||||
An example from arch/arm/mach-s3c2410/mach-bast.c is:
|
||||
|
||||
static struct resource bast_dm9k_resource[] = {
|
||||
[0] = {
|
||||
.start = S3C2410_CS5 + BAST_PA_DM9000,
|
||||
.end = S3C2410_CS5 + BAST_PA_DM9000 + 3,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
[1] = {
|
||||
.start = S3C2410_CS5 + BAST_PA_DM9000 + 0x40,
|
||||
.end = S3C2410_CS5 + BAST_PA_DM9000 + 0x40 + 0x3f,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
[2] = {
|
||||
.start = IRQ_DM9000,
|
||||
.end = IRQ_DM9000,
|
||||
.flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
|
||||
}
|
||||
};
|
||||
|
||||
static struct platform_device bast_device_dm9k = {
|
||||
.name = "dm9000",
|
||||
.id = 0,
|
||||
.num_resources = ARRAY_SIZE(bast_dm9k_resource),
|
||||
.resource = bast_dm9k_resource,
|
||||
};
|
||||
|
||||
Note the setting of the IRQ trigger flag in bast_dm9k_resource[2].flags,
|
||||
as this will generate a warning if it is not present. The trigger from
|
||||
the flags field will be passed to request_irq() when registering the IRQ
|
||||
handler to ensure that the IRQ is setup correctly.
|
||||
|
||||
This shows a typical platform device, without the optional configuration
|
||||
platform data supplied. The next example uses the same resources, but adds
|
||||
the optional platform data to pass extra configuration data:
|
||||
|
||||
static struct dm9000_plat_data bast_dm9k_platdata = {
|
||||
.flags = DM9000_PLATF_16BITONLY,
|
||||
};
|
||||
|
||||
static struct platform_device bast_device_dm9k = {
|
||||
.name = "dm9000",
|
||||
.id = 0,
|
||||
.num_resources = ARRAY_SIZE(bast_dm9k_resource),
|
||||
.resource = bast_dm9k_resource,
|
||||
.dev = {
|
||||
.platform_data = &bast_dm9k_platdata,
|
||||
}
|
||||
};
|
||||
|
||||
The platform data is defined in include/linux/dm9000.h and described below.
|
||||
|
||||
|
||||
Platform data
|
||||
-------------
|
||||
|
||||
Extra platform data for the DM9000 can describe the IO bus width to the
|
||||
device, whether or not an external PHY is attached to the device and
|
||||
the availability of an external configuration EEPROM.
|
||||
|
||||
The flags for the platform data .flags field are as follows:
|
||||
|
||||
DM9000_PLATF_8BITONLY
|
||||
|
||||
The IO should be done with 8bit operations.
|
||||
|
||||
DM9000_PLATF_16BITONLY
|
||||
|
||||
The IO should be done with 16bit operations.
|
||||
|
||||
DM9000_PLATF_32BITONLY
|
||||
|
||||
The IO should be done with 32bit operations.
|
||||
|
||||
DM9000_PLATF_EXT_PHY
|
||||
|
||||
The chip is connected to an external PHY.
|
||||
|
||||
DM9000_PLATF_NO_EEPROM
|
||||
|
||||
This can be used to signify that the board does not have an
|
||||
EEPROM, or that the EEPROM should be hidden from the user.
|
||||
|
||||
DM9000_PLATF_SIMPLE_PHY
|
||||
|
||||
Switch to using the simpler PHY polling method which does not
|
||||
try and read the MII PHY state regularly. This is only available
|
||||
when using the internal PHY. See the section on link state polling
|
||||
for more information.
|
||||
|
||||
The config symbol DM9000_FORCE_SIMPLE_PHY_POLL, Kconfig entry
|
||||
"Force simple NSR based PHY polling" allows this flag to be
|
||||
forced on at build time.
|
||||
|
||||
|
||||
PHY Link state polling
|
||||
----------------------
|
||||
|
||||
The driver keeps track of the link state and informs the network core
|
||||
about link (carrier) availablilty. This is managed by several methods
|
||||
depending on the version of the chip and on which PHY is being used.
|
||||
|
||||
For the internal PHY, the original (and currently default) method is
|
||||
to read the MII state, either when the status changes if we have the
|
||||
necessary interrupt support in the chip or every two seconds via a
|
||||
periodic timer.
|
||||
|
||||
To reduce the overhead for the internal PHY, there is now the option
|
||||
of using the DM9000_FORCE_SIMPLE_PHY_POLL config, or DM9000_PLATF_SIMPLE_PHY
|
||||
platform data option to read the summary information without the
|
||||
expensive MII accesses. This method is faster, but does not print
|
||||
as much information.
|
||||
|
||||
When using an external PHY, the driver currently has to poll the MII
|
||||
link status as there is no method for getting an interrupt on link change.
|
||||
|
||||
|
||||
DM9000A / DM9000B
|
||||
-----------------
|
||||
|
||||
These chips are functionally similar to the DM9000E and are supported easily
|
||||
by the same driver. The features are:
|
||||
|
||||
1) Interrupt on internal PHY state change. This means that the periodic
|
||||
polling of the PHY status may be disabled on these devices when using
|
||||
the internal PHY.
|
||||
|
||||
2) TCP/UDP checksum offloading, which the driver does not currently support.
|
||||
|
||||
|
||||
ethtool
|
||||
-------
|
||||
|
||||
The driver supports the ethtool interface for access to the driver
|
||||
state information, the PHY state and the EEPROM.
|
@ -513,21 +513,11 @@ Additional Configurations
|
||||
Intel(R) PRO/1000 PT Dual Port Server Connection
|
||||
Intel(R) PRO/1000 PT Dual Port Server Adapter
|
||||
Intel(R) PRO/1000 PF Dual Port Server Adapter
|
||||
Intel(R) PRO/1000 PT Quad Port Server Adapter
|
||||
Intel(R) PRO/1000 PT Quad Port Server Adapter
|
||||
|
||||
NAPI
|
||||
----
|
||||
NAPI (Rx polling mode) is supported in the e1000 driver. NAPI is enabled
|
||||
or disabled based on the configuration of the kernel. To override
|
||||
the default, use the following compile-time flags.
|
||||
|
||||
To enable NAPI, compile the driver module, passing in a configuration option:
|
||||
|
||||
make CFLAGS_EXTRA=-DE1000_NAPI install
|
||||
|
||||
To disable NAPI, compile the driver module, passing in a configuration option:
|
||||
|
||||
make CFLAGS_EXTRA=-DE1000_NO_NAPI install
|
||||
NAPI (Rx polling mode) is enabled in the e1000 driver.
|
||||
|
||||
See www.cyberus.ca/~hadi/usenix-paper.tgz for more information on NAPI.
|
||||
|
||||
|
@ -551,8 +551,9 @@ icmp_echo_ignore_broadcasts - BOOLEAN
|
||||
icmp_ratelimit - INTEGER
|
||||
Limit the maximal rates for sending ICMP packets whose type matches
|
||||
icmp_ratemask (see below) to specific targets.
|
||||
0 to disable any limiting, otherwise the maximal rate in jiffies(1)
|
||||
Default: 100
|
||||
0 to disable any limiting,
|
||||
otherwise the minimal space between responses in milliseconds.
|
||||
Default: 1000
|
||||
|
||||
icmp_ratemask - INTEGER
|
||||
Mask made of ICMP types for which rates are being limited.
|
||||
@ -1023,11 +1024,23 @@ max_addresses - INTEGER
|
||||
autoconfigured addresses.
|
||||
Default: 16
|
||||
|
||||
disable_ipv6 - BOOLEAN
|
||||
Disable IPv6 operation.
|
||||
Default: FALSE (enable IPv6 operation)
|
||||
|
||||
accept_dad - INTEGER
|
||||
Whether to accept DAD (Duplicate Address Detection).
|
||||
0: Disable DAD
|
||||
1: Enable DAD (default)
|
||||
2: Enable DAD, and disable IPv6 operation if MAC-based duplicate
|
||||
link-local address has been found.
|
||||
|
||||
icmp/*:
|
||||
ratelimit - INTEGER
|
||||
Limit the maximal rates for sending ICMPv6 packets.
|
||||
0 to disable any limiting, otherwise the maximal rate in jiffies(1)
|
||||
Default: 100
|
||||
0 to disable any limiting,
|
||||
otherwise the minimal space between responses in milliseconds.
|
||||
Default: 1000
|
||||
|
||||
|
||||
IPv6 Update by:
|
||||
|
@ -1,7 +1,7 @@
|
||||
Linux* Base Driver for the Intel(R) PRO/10GbE Family of Adapters
|
||||
================================================================
|
||||
Linux Base Driver for 10 Gigabit Intel(R) Network Connection
|
||||
=============================================================
|
||||
|
||||
November 17, 2004
|
||||
October 9, 2007
|
||||
|
||||
|
||||
Contents
|
||||
@ -9,94 +9,151 @@ Contents
|
||||
|
||||
- In This Release
|
||||
- Identifying Your Adapter
|
||||
- Building and Installation
|
||||
- Command Line Parameters
|
||||
- Improving Performance
|
||||
- Additional Configurations
|
||||
- Known Issues/Troubleshooting
|
||||
- Support
|
||||
|
||||
|
||||
|
||||
In This Release
|
||||
===============
|
||||
|
||||
This file describes the Linux* Base Driver for the Intel(R) PRO/10GbE Family
|
||||
of Adapters, version 1.0.x.
|
||||
This file describes the ixgb Linux Base Driver for the 10 Gigabit Intel(R)
|
||||
Network Connection. This driver includes support for Itanium(R)2-based
|
||||
systems.
|
||||
|
||||
For questions related to hardware requirements, refer to the documentation
|
||||
supplied with your 10 Gigabit adapter. All hardware requirements listed apply
|
||||
to use with Linux.
|
||||
|
||||
The following features are available in this kernel:
|
||||
- Native VLANs
|
||||
- Channel Bonding (teaming)
|
||||
- SNMP
|
||||
|
||||
Channel Bonding documentation can be found in the Linux kernel source:
|
||||
/Documentation/networking/bonding.txt
|
||||
|
||||
The driver information previously displayed in the /proc filesystem is not
|
||||
supported in this release. Alternatively, you can use ethtool (version 1.6
|
||||
or later), lspci, and ifconfig to obtain the same information.
|
||||
|
||||
Instructions on updating ethtool can be found in the section "Additional
|
||||
Configurations" later in this document.
|
||||
|
||||
For questions related to hardware requirements, refer to the documentation
|
||||
supplied with your Intel PRO/10GbE adapter. All hardware requirements listed
|
||||
apply to use with Linux.
|
||||
|
||||
Identifying Your Adapter
|
||||
========================
|
||||
|
||||
To verify your Intel adapter is supported, find the board ID number on the
|
||||
adapter. Look for a label that has a barcode and a number in the format
|
||||
A12345-001.
|
||||
The following Intel network adapters are compatible with the drivers in this
|
||||
release:
|
||||
|
||||
Use the above information and the Adapter & Driver ID Guide at:
|
||||
Controller Adapter Name Physical Layer
|
||||
---------- ------------ --------------
|
||||
82597EX Intel(R) PRO/10GbE LR/SR/CX4 10G Base-LR (1310 nm optical fiber)
|
||||
Server Adapters 10G Base-SR (850 nm optical fiber)
|
||||
10G Base-CX4(twin-axial copper cabling)
|
||||
|
||||
http://support.intel.com/support/network/adapter/pro100/21397.htm
|
||||
For more information on how to identify your adapter, go to the Adapter &
|
||||
Driver ID Guide at:
|
||||
|
||||
For the latest Intel network drivers for Linux, go to:
|
||||
http://support.intel.com/support/network/sb/CS-012904.htm
|
||||
|
||||
|
||||
Building and Installation
|
||||
=========================
|
||||
|
||||
select m for "Intel(R) PRO/10GbE support" located at:
|
||||
Location:
|
||||
-> Device Drivers
|
||||
-> Network device support (NETDEVICES [=y])
|
||||
-> Ethernet (10000 Mbit) (NETDEV_10000 [=y])
|
||||
1. make modules && make modules_install
|
||||
|
||||
2. Load the module:
|
||||
|
||||
modprobe ixgb <parameter>=<value>
|
||||
|
||||
The insmod command can be used if the full
|
||||
path to the driver module is specified. For example:
|
||||
|
||||
insmod /lib/modules/<KERNEL VERSION>/kernel/drivers/net/ixgb/ixgb.ko
|
||||
|
||||
With 2.6 based kernels also make sure that older ixgb drivers are
|
||||
removed from the kernel, before loading the new module:
|
||||
|
||||
rmmod ixgb; modprobe ixgb
|
||||
|
||||
3. Assign an IP address to the interface by entering the following, where
|
||||
x is the interface number:
|
||||
|
||||
ifconfig ethx <IP_address>
|
||||
|
||||
4. Verify that the interface works. Enter the following, where <IP_address>
|
||||
is the IP address for another machine on the same subnet as the interface
|
||||
that is being tested:
|
||||
|
||||
ping <IP_address>
|
||||
|
||||
http://downloadfinder.intel.com/scripts-df/support_intel.asp
|
||||
|
||||
Command Line Parameters
|
||||
=======================
|
||||
|
||||
If the driver is built as a module, the following optional parameters are
|
||||
used by entering them on the command line with the modprobe or insmod command
|
||||
using this syntax:
|
||||
If the driver is built as a module, the following optional parameters are
|
||||
used by entering them on the command line with the modprobe command using
|
||||
this syntax:
|
||||
|
||||
modprobe ixgb [<option>=<VAL1>,<VAL2>,...]
|
||||
|
||||
insmod ixgb [<option>=<VAL1>,<VAL2>,...]
|
||||
For example, with two 10GbE PCI adapters, entering:
|
||||
|
||||
For example, with two PRO/10GbE PCI adapters, entering:
|
||||
modprobe ixgb TxDescriptors=80,128
|
||||
|
||||
insmod ixgb TxDescriptors=80,128
|
||||
|
||||
loads the ixgb driver with 80 TX resources for the first adapter and 128 TX
|
||||
loads the ixgb driver with 80 TX resources for the first adapter and 128 TX
|
||||
resources for the second adapter.
|
||||
|
||||
The default value for each parameter is generally the recommended setting,
|
||||
unless otherwise noted. Also, if the driver is statically built into the
|
||||
kernel, the driver is loaded with the default values for all the parameters.
|
||||
Ethtool can be used to change some of the parameters at runtime.
|
||||
unless otherwise noted.
|
||||
|
||||
FlowControl
|
||||
Valid Range: 0-3 (0=none, 1=Rx only, 2=Tx only, 3=Rx&Tx)
|
||||
Default: Read from the EEPROM
|
||||
If EEPROM is not detected, default is 3
|
||||
This parameter controls the automatic generation(Tx) and response(Rx) to
|
||||
Ethernet PAUSE frames.
|
||||
If EEPROM is not detected, default is 1
|
||||
This parameter controls the automatic generation(Tx) and response(Rx) to
|
||||
Ethernet PAUSE frames. There are hardware bugs associated with enabling
|
||||
Tx flow control so beware.
|
||||
|
||||
RxDescriptors
|
||||
Valid Range: 64-512
|
||||
Default Value: 512
|
||||
This value is the number of receive descriptors allocated by the driver.
|
||||
Increasing this value allows the driver to buffer more incoming packets.
|
||||
Each descriptor is 16 bytes. A receive buffer is also allocated for
|
||||
each descriptor and can be either 2048, 4056, 8192, or 16384 bytes,
|
||||
depending on the MTU setting. When the MTU size is 1500 or less, the
|
||||
This value is the number of receive descriptors allocated by the driver.
|
||||
Increasing this value allows the driver to buffer more incoming packets.
|
||||
Each descriptor is 16 bytes. A receive buffer is also allocated for
|
||||
each descriptor and can be either 2048, 4056, 8192, or 16384 bytes,
|
||||
depending on the MTU setting. When the MTU size is 1500 or less, the
|
||||
receive buffer size is 2048 bytes. When the MTU is greater than 1500 the
|
||||
receive buffer size will be either 4056, 8192, or 16384 bytes. The
|
||||
receive buffer size will be either 4056, 8192, or 16384 bytes. The
|
||||
maximum MTU size is 16114.
|
||||
|
||||
RxIntDelay
|
||||
Valid Range: 0-65535 (0=off)
|
||||
Default Value: 6
|
||||
This value delays the generation of receive interrupts in units of
|
||||
0.8192 microseconds. Receive interrupt reduction can improve CPU
|
||||
efficiency if properly tuned for specific network traffic. Increasing
|
||||
this value adds extra latency to frame reception and can end up
|
||||
decreasing the throughput of TCP traffic. If the system is reporting
|
||||
dropped receives, this value may be set too high, causing the driver to
|
||||
Default Value: 72
|
||||
This value delays the generation of receive interrupts in units of
|
||||
0.8192 microseconds. Receive interrupt reduction can improve CPU
|
||||
efficiency if properly tuned for specific network traffic. Increasing
|
||||
this value adds extra latency to frame reception and can end up
|
||||
decreasing the throughput of TCP traffic. If the system is reporting
|
||||
dropped receives, this value may be set too high, causing the driver to
|
||||
run out of available receive descriptors.
|
||||
|
||||
TxDescriptors
|
||||
Valid Range: 64-4096
|
||||
Default Value: 256
|
||||
This value is the number of transmit descriptors allocated by the driver.
|
||||
Increasing this value allows the driver to queue more transmits. Each
|
||||
Increasing this value allows the driver to queue more transmits. Each
|
||||
descriptor is 16 bytes.
|
||||
|
||||
XsumRX
|
||||
@ -105,51 +162,49 @@ Default Value: 1
|
||||
A value of '1' indicates that the driver should enable IP checksum
|
||||
offload for received packets (both UDP and TCP) to the adapter hardware.
|
||||
|
||||
XsumTX
|
||||
Valid Range: 0-1
|
||||
Default Value: 1
|
||||
A value of '1' indicates that the driver should enable IP checksum
|
||||
offload for transmitted packets (both UDP and TCP) to the adapter
|
||||
hardware.
|
||||
|
||||
Improving Performance
|
||||
=====================
|
||||
|
||||
With the Intel PRO/10 GbE adapter, the default Linux configuration will very
|
||||
likely limit the total available throughput artificially. There is a set of
|
||||
things that when applied together increase the ability of Linux to transmit
|
||||
and receive data. The following enhancements were originally acquired from
|
||||
settings published at http://www.spec.org/web99 for various submitted results
|
||||
using Linux.
|
||||
With the 10 Gigabit server adapters, the default Linux configuration will
|
||||
very likely limit the total available throughput artificially. There is a set
|
||||
of configuration changes that, when applied together, will increase the ability
|
||||
of Linux to transmit and receive data. The following enhancements were
|
||||
originally acquired from settings published at http://www.spec.org/web99/ for
|
||||
various submitted results using Linux.
|
||||
|
||||
NOTE: These changes are only suggestions, and serve as a starting point for
|
||||
tuning your network performance.
|
||||
NOTE: These changes are only suggestions, and serve as a starting point for
|
||||
tuning your network performance.
|
||||
|
||||
The changes are made in three major ways, listed in order of greatest effect:
|
||||
- Use ifconfig to modify the mtu (maximum transmission unit) and the txqueuelen
|
||||
- Use ifconfig to modify the mtu (maximum transmission unit) and the txqueuelen
|
||||
parameter.
|
||||
- Use sysctl to modify /proc parameters (essentially kernel tuning)
|
||||
- Use setpci to modify the MMRBC field in PCI-X configuration space to increase
|
||||
- Use setpci to modify the MMRBC field in PCI-X configuration space to increase
|
||||
transmit burst lengths on the bus.
|
||||
|
||||
NOTE: setpci modifies the adapter's configuration registers to allow it to read
|
||||
up to 4k bytes at a time (for transmits). However, for some systems the
|
||||
behavior after modifying this register may be undefined (possibly errors of some
|
||||
kind). A power-cycle, hard reset or explicitly setting the e6 register back to
|
||||
22 (setpci -d 8086:1048 e6.b=22) may be required to get back to a stable
|
||||
configuration.
|
||||
NOTE: setpci modifies the adapter's configuration registers to allow it to read
|
||||
up to 4k bytes at a time (for transmits). However, for some systems the
|
||||
behavior after modifying this register may be undefined (possibly errors of
|
||||
some kind). A power-cycle, hard reset or explicitly setting the e6 register
|
||||
back to 22 (setpci -d 8086:1a48 e6.b=22) may be required to get back to a
|
||||
stable configuration.
|
||||
|
||||
- COPY these lines and paste them into ixgb_perf.sh:
|
||||
#!/bin/bash
|
||||
echo "configuring network performance , edit this file to change the interface"
|
||||
echo "configuring network performance , edit this file to change the interface
|
||||
or device ID of 10GbE card"
|
||||
# set mmrbc to 4k reads, modify only Intel 10GbE device IDs
|
||||
setpci -d 8086:1048 e6.b=2e
|
||||
# set the MTU (max transmission unit) - it requires your switch and clients to change too!
|
||||
# replace 1a48 with appropriate 10GbE device's ID installed on the system,
|
||||
# if needed.
|
||||
setpci -d 8086:1a48 e6.b=2e
|
||||
# set the MTU (max transmission unit) - it requires your switch and clients
|
||||
# to change as well.
|
||||
# set the txqueuelen
|
||||
# your ixgb adapter should be loaded as eth1 for this to work, change if needed
|
||||
ifconfig eth1 mtu 9000 txqueuelen 1000 up
|
||||
# call the sysctl utility to modify /proc/sys entries
|
||||
sysctl -p ./sysctl_ixgb.conf
|
||||
# call the sysctl utility to modify /proc/sys entries
|
||||
sysctl -p ./sysctl_ixgb.conf
|
||||
- END ixgb_perf.sh
|
||||
|
||||
- COPY these lines and paste them into sysctl_ixgb.conf:
|
||||
@ -159,54 +214,220 @@ sysctl -p ./sysctl_ixgb.conf
|
||||
# several network benchmark tests, your mileage may vary
|
||||
|
||||
### IPV4 specific settings
|
||||
net.ipv4.tcp_timestamps = 0 # turns TCP timestamp support off, default 1, reduces CPU use
|
||||
net.ipv4.tcp_sack = 0 # turn SACK support off, default on
|
||||
# on systems with a VERY fast bus -> memory interface this is the big gainer
|
||||
net.ipv4.tcp_rmem = 10000000 10000000 10000000 # sets min/default/max TCP read buffer, default 4096 87380 174760
|
||||
net.ipv4.tcp_wmem = 10000000 10000000 10000000 # sets min/pressure/max TCP write buffer, default 4096 16384 131072
|
||||
net.ipv4.tcp_mem = 10000000 10000000 10000000 # sets min/pressure/max TCP buffer space, default 31744 32256 32768
|
||||
# turn TCP timestamp support off, default 1, reduces CPU use
|
||||
net.ipv4.tcp_timestamps = 0
|
||||
# turn SACK support off, default on
|
||||
# on systems with a VERY fast bus -> memory interface this is the big gainer
|
||||
net.ipv4.tcp_sack = 0
|
||||
# set min/default/max TCP read buffer, default 4096 87380 174760
|
||||
net.ipv4.tcp_rmem = 10000000 10000000 10000000
|
||||
# set min/pressure/max TCP write buffer, default 4096 16384 131072
|
||||
net.ipv4.tcp_wmem = 10000000 10000000 10000000
|
||||
# set min/pressure/max TCP buffer space, default 31744 32256 32768
|
||||
net.ipv4.tcp_mem = 10000000 10000000 10000000
|
||||
|
||||
### CORE settings (mostly for socket and UDP effect)
|
||||
net.core.rmem_max = 524287 # maximum receive socket buffer size, default 131071
|
||||
net.core.wmem_max = 524287 # maximum send socket buffer size, default 131071
|
||||
net.core.rmem_default = 524287 # default receive socket buffer size, default 65535
|
||||
net.core.wmem_default = 524287 # default send socket buffer size, default 65535
|
||||
net.core.optmem_max = 524287 # maximum amount of option memory buffers, default 10240
|
||||
net.core.netdev_max_backlog = 300000 # number of unprocessed input packets before kernel starts dropping them, default 300
|
||||
# set maximum receive socket buffer size, default 131071
|
||||
net.core.rmem_max = 524287
|
||||
# set maximum send socket buffer size, default 131071
|
||||
net.core.wmem_max = 524287
|
||||
# set default receive socket buffer size, default 65535
|
||||
net.core.rmem_default = 524287
|
||||
# set default send socket buffer size, default 65535
|
||||
net.core.wmem_default = 524287
|
||||
# set maximum amount of option memory buffers, default 10240
|
||||
net.core.optmem_max = 524287
|
||||
# set number of unprocessed input packets before kernel starts dropping them; default 300
|
||||
net.core.netdev_max_backlog = 300000
|
||||
- END sysctl_ixgb.conf
|
||||
|
||||
Edit the ixgb_perf.sh script if necessary to change eth1 to whatever interface
|
||||
your ixgb driver is using.
|
||||
Edit the ixgb_perf.sh script if necessary to change eth1 to whatever interface
|
||||
your ixgb driver is using and/or replace '1a48' with appropriate 10GbE device's
|
||||
ID installed on the system.
|
||||
|
||||
NOTE: Unless these scripts are added to the boot process, these changes will
|
||||
only last only until the next system reboot.
|
||||
NOTE: Unless these scripts are added to the boot process, these changes will
|
||||
only last only until the next system reboot.
|
||||
|
||||
|
||||
Resolving Slow UDP Traffic
|
||||
--------------------------
|
||||
If your server does not seem to be able to receive UDP traffic as fast as it
|
||||
can receive TCP traffic, it could be because Linux, by default, does not set
|
||||
the network stack buffers as large as they need to be to support high UDP
|
||||
transfer rates. One way to alleviate this problem is to allow more memory to
|
||||
be used by the IP stack to store incoming data.
|
||||
|
||||
If your server does not seem to be able to receive UDP traffic as fast as it
|
||||
can receive TCP traffic, it could be because Linux, by default, does not set
|
||||
the network stack buffers as large as they need to be to support high UDP
|
||||
transfer rates. One way to alleviate this problem is to allow more memory to
|
||||
be used by the IP stack to store incoming data.
|
||||
|
||||
For instance, use the commands:
|
||||
For instance, use the commands:
|
||||
sysctl -w net.core.rmem_max=262143
|
||||
and
|
||||
sysctl -w net.core.rmem_default=262143
|
||||
to increase the read buffer memory max and default to 262143 (256k - 1) from
|
||||
defaults of max=131071 (128k - 1) and default=65535 (64k - 1). These variables
|
||||
will increase the amount of memory used by the network stack for receives, and
|
||||
to increase the read buffer memory max and default to 262143 (256k - 1) from
|
||||
defaults of max=131071 (128k - 1) and default=65535 (64k - 1). These variables
|
||||
will increase the amount of memory used by the network stack for receives, and
|
||||
can be increased significantly more if necessary for your application.
|
||||
|
||||
|
||||
Additional Configurations
|
||||
=========================
|
||||
|
||||
Configuring the Driver on Different Distributions
|
||||
-------------------------------------------------
|
||||
Configuring a network driver to load properly when the system is started is
|
||||
distribution dependent. Typically, the configuration process involves adding
|
||||
an alias line to /etc/modprobe.conf as well as editing other system startup
|
||||
scripts and/or configuration files. Many popular Linux distributions ship
|
||||
with tools to make these changes for you. To learn the proper way to
|
||||
configure a network device for your system, refer to your distribution
|
||||
documentation. If during this process you are asked for the driver or module
|
||||
name, the name for the Linux Base Driver for the Intel 10GbE Family of
|
||||
Adapters is ixgb.
|
||||
|
||||
Viewing Link Messages
|
||||
---------------------
|
||||
Link messages will not be displayed to the console if the distribution is
|
||||
restricting system messages. In order to see network driver link messages on
|
||||
your console, set dmesg to eight by entering the following:
|
||||
|
||||
dmesg -n 8
|
||||
|
||||
NOTE: This setting is not saved across reboots.
|
||||
|
||||
|
||||
Jumbo Frames
|
||||
------------
|
||||
The driver supports Jumbo Frames for all adapters. Jumbo Frames support is
|
||||
enabled by changing the MTU to a value larger than the default of 1500.
|
||||
The maximum value for the MTU is 16114. Use the ifconfig command to
|
||||
increase the MTU size. For example:
|
||||
|
||||
ifconfig ethx mtu 9000 up
|
||||
|
||||
The maximum MTU setting for Jumbo Frames is 16114. This value coincides
|
||||
with the maximum Jumbo Frames size of 16128.
|
||||
|
||||
|
||||
Ethtool
|
||||
-------
|
||||
The driver utilizes the ethtool interface for driver configuration and
|
||||
diagnostics, as well as displaying statistical information. Ethtool
|
||||
version 1.6 or later is required for this functionality.
|
||||
|
||||
The latest release of ethtool can be found from
|
||||
http://sourceforge.net/projects/gkernel
|
||||
|
||||
NOTE: Ethtool 1.6 only supports a limited set of ethtool options. Support
|
||||
for a more complete ethtool feature set can be enabled by upgrading
|
||||
to the latest version.
|
||||
|
||||
|
||||
NAPI
|
||||
----
|
||||
|
||||
NAPI (Rx polling mode) is supported in the ixgb driver. NAPI is enabled
|
||||
or disabled based on the configuration of the kernel. see CONFIG_IXGB_NAPI
|
||||
|
||||
See www.cyberus.ca/~hadi/usenix-paper.tgz for more information on NAPI.
|
||||
|
||||
|
||||
Known Issues/Troubleshooting
|
||||
============================
|
||||
|
||||
NOTE: After installing the driver, if your Intel Network Connection is not
|
||||
working, verify in the "In This Release" section of the readme that you have
|
||||
installed the correct driver.
|
||||
|
||||
Intel(R) PRO/10GbE CX4 Server Adapter Cable Interoperability Issue with
|
||||
Fujitsu XENPAK Module in SmartBits Chassis
|
||||
---------------------------------------------------------------------
|
||||
Excessive CRC errors may be observed if the Intel(R) PRO/10GbE CX4
|
||||
Server adapter is connected to a Fujitsu XENPAK CX4 module in a SmartBits
|
||||
chassis using 15 m/24AWG cable assemblies manufactured by Fujitsu or Leoni.
|
||||
The CRC errors may be received either by the Intel(R) PRO/10GbE CX4
|
||||
Server adapter or the SmartBits. If this situation occurs using a different
|
||||
cable assembly may resolve the issue.
|
||||
|
||||
CX4 Server Adapter Cable Interoperability Issues with HP Procurve 3400cl
|
||||
Switch Port
|
||||
------------------------------------------------------------------------
|
||||
Excessive CRC errors may be observed if the Intel(R) PRO/10GbE CX4 Server
|
||||
adapter is connected to an HP Procurve 3400cl switch port using short cables
|
||||
(1 m or shorter). If this situation occurs, using a longer cable may resolve
|
||||
the issue.
|
||||
|
||||
Excessive CRC errors may be observed using Fujitsu 24AWG cable assemblies that
|
||||
Are 10 m or longer or where using a Leoni 15 m/24AWG cable assembly. The CRC
|
||||
errors may be received either by the CX4 Server adapter or at the switch. If
|
||||
this situation occurs, using a different cable assembly may resolve the issue.
|
||||
|
||||
|
||||
Jumbo Frames System Requirement
|
||||
-------------------------------
|
||||
Memory allocation failures have been observed on Linux systems with 64 MB
|
||||
of RAM or less that are running Jumbo Frames. If you are using Jumbo
|
||||
Frames, your system may require more than the advertised minimum
|
||||
requirement of 64 MB of system memory.
|
||||
|
||||
|
||||
Performance Degradation with Jumbo Frames
|
||||
-----------------------------------------
|
||||
Degradation in throughput performance may be observed in some Jumbo frames
|
||||
environments. If this is observed, increasing the application's socket buffer
|
||||
size and/or increasing the /proc/sys/net/ipv4/tcp_*mem entry values may help.
|
||||
See the specific application manual and /usr/src/linux*/Documentation/
|
||||
networking/ip-sysctl.txt for more details.
|
||||
|
||||
|
||||
Allocating Rx Buffers when Using Jumbo Frames
|
||||
---------------------------------------------
|
||||
Allocating Rx buffers when using Jumbo Frames on 2.6.x kernels may fail if
|
||||
the available memory is heavily fragmented. This issue may be seen with PCI-X
|
||||
adapters or with packet split disabled. This can be reduced or eliminated
|
||||
by changing the amount of available memory for receive buffer allocation, by
|
||||
increasing /proc/sys/vm/min_free_kbytes.
|
||||
|
||||
|
||||
Multiple Interfaces on Same Ethernet Broadcast Network
|
||||
------------------------------------------------------
|
||||
Due to the default ARP behavior on Linux, it is not possible to have
|
||||
one system on two IP networks in the same Ethernet broadcast domain
|
||||
(non-partitioned switch) behave as expected. All Ethernet interfaces
|
||||
will respond to IP traffic for any IP address assigned to the system.
|
||||
This results in unbalanced receive traffic.
|
||||
|
||||
If you have multiple interfaces in a server, do either of the following:
|
||||
|
||||
- Turn on ARP filtering by entering:
|
||||
echo 1 > /proc/sys/net/ipv4/conf/all/arp_filter
|
||||
|
||||
- Install the interfaces in separate broadcast domains - either in
|
||||
different switches or in a switch partitioned to VLANs.
|
||||
|
||||
|
||||
UDP Stress Test Dropped Packet Issue
|
||||
--------------------------------------
|
||||
Under small packets UDP stress test with 10GbE driver, the Linux system
|
||||
may drop UDP packets due to the fullness of socket buffers. You may want
|
||||
to change the driver's Flow Control variables to the minimum value for
|
||||
controlling packet reception.
|
||||
|
||||
|
||||
Tx Hangs Possible Under Stress
|
||||
------------------------------
|
||||
Under stress conditions, if TX hangs occur, turning off TSO
|
||||
"ethtool -K eth0 tso off" may resolve the problem.
|
||||
|
||||
|
||||
Support
|
||||
=======
|
||||
|
||||
For general information and support, go to the Intel support website at:
|
||||
For general information, go to the Intel support website at:
|
||||
|
||||
http://support.intel.com
|
||||
|
||||
or the Intel Wired Networking project hosted by Sourceforge at:
|
||||
|
||||
http://sourceforge.net/projects/e1000
|
||||
|
||||
If an issue is identified with the released source code on the supported
|
||||
kernel with a supported adapter, email the specific information related to
|
||||
the issue to linux.nics@intel.com.
|
||||
kernel with a supported adapter, email the specific information related
|
||||
to the issue to e1000-devel@lists.sf.net
|
||||
|
67
Documentation/networking/mac80211_hwsim/README
Normal file
67
Documentation/networking/mac80211_hwsim/README
Normal file
@ -0,0 +1,67 @@
|
||||
mac80211_hwsim - software simulator of 802.11 radio(s) for mac80211
|
||||
Copyright (c) 2008, Jouni Malinen <j@w1.fi>
|
||||
|
||||
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.
|
||||
|
||||
|
||||
Introduction
|
||||
|
||||
mac80211_hwsim is a Linux kernel module that can be used to simulate
|
||||
arbitrary number of IEEE 802.11 radios for mac80211. It can be used to
|
||||
test most of the mac80211 functionality and user space tools (e.g.,
|
||||
hostapd and wpa_supplicant) in a way that matches very closely with
|
||||
the normal case of using real WLAN hardware. From the mac80211 view
|
||||
point, mac80211_hwsim is yet another hardware driver, i.e., no changes
|
||||
to mac80211 are needed to use this testing tool.
|
||||
|
||||
The main goal for mac80211_hwsim is to make it easier for developers
|
||||
to test their code and work with new features to mac80211, hostapd,
|
||||
and wpa_supplicant. The simulated radios do not have the limitations
|
||||
of real hardware, so it is easy to generate an arbitrary test setup
|
||||
and always reproduce the same setup for future tests. In addition,
|
||||
since all radio operation is simulated, any channel can be used in
|
||||
tests regardless of regulatory rules.
|
||||
|
||||
mac80211_hwsim kernel module has a parameter 'radios' that can be used
|
||||
to select how many radios are simulated (default 2). This allows
|
||||
configuration of both very simply setups (e.g., just a single access
|
||||
point and a station) or large scale tests (multiple access points with
|
||||
hundreds of stations).
|
||||
|
||||
mac80211_hwsim works by tracking the current channel of each virtual
|
||||
radio and copying all transmitted frames to all other radios that are
|
||||
currently enabled and on the same channel as the transmitting
|
||||
radio. Software encryption in mac80211 is used so that the frames are
|
||||
actually encrypted over the virtual air interface to allow more
|
||||
complete testing of encryption.
|
||||
|
||||
A global monitoring netdev, hwsim#, is created independent of
|
||||
mac80211. This interface can be used to monitor all transmitted frames
|
||||
regardless of channel.
|
||||
|
||||
|
||||
Simple example
|
||||
|
||||
This example shows how to use mac80211_hwsim to simulate two radios:
|
||||
one to act as an access point and the other as a station that
|
||||
associates with the AP. hostapd and wpa_supplicant are used to take
|
||||
care of WPA2-PSK authentication. In addition, hostapd is also
|
||||
processing access point side of association.
|
||||
|
||||
Please note that the current Linux kernel does not enable AP mode, so a
|
||||
simple patch is needed to enable AP mode selection:
|
||||
http://johannes.sipsolutions.net/patches/kernel/all/LATEST/006-allow-ap-vlan-modes.patch
|
||||
|
||||
|
||||
# Build mac80211_hwsim as part of kernel configuration
|
||||
|
||||
# Load the module
|
||||
modprobe mac80211_hwsim
|
||||
|
||||
# Run hostapd (AP) for wlan0
|
||||
hostapd hostapd.conf
|
||||
|
||||
# Run wpa_supplicant (station) for wlan1
|
||||
wpa_supplicant -Dwext -iwlan1 -c wpa_supplicant.conf
|
11
Documentation/networking/mac80211_hwsim/hostapd.conf
Normal file
11
Documentation/networking/mac80211_hwsim/hostapd.conf
Normal file
@ -0,0 +1,11 @@
|
||||
interface=wlan0
|
||||
driver=nl80211
|
||||
|
||||
hw_mode=g
|
||||
channel=1
|
||||
ssid=mac80211 test
|
||||
|
||||
wpa=2
|
||||
wpa_key_mgmt=WPA-PSK
|
||||
wpa_pairwise=CCMP
|
||||
wpa_passphrase=12345678
|
10
Documentation/networking/mac80211_hwsim/wpa_supplicant.conf
Normal file
10
Documentation/networking/mac80211_hwsim/wpa_supplicant.conf
Normal file
@ -0,0 +1,10 @@
|
||||
ctrl_interface=/var/run/wpa_supplicant
|
||||
|
||||
network={
|
||||
ssid="mac80211 test"
|
||||
psk="12345678"
|
||||
key_mgmt=WPA-PSK
|
||||
proto=WPA2
|
||||
pairwise=CCMP
|
||||
group=CCMP
|
||||
}
|
@ -3,19 +3,11 @@
|
||||
===========================================
|
||||
|
||||
Section 1: Base driver requirements for implementing multiqueue support
|
||||
Section 2: Qdisc support for multiqueue devices
|
||||
Section 3: Brief howto using PRIO or RR for multiqueue devices
|
||||
|
||||
|
||||
Intro: Kernel support for multiqueue devices
|
||||
---------------------------------------------------------
|
||||
|
||||
Kernel support for multiqueue devices is only an API that is presented to the
|
||||
netdevice layer for base drivers to implement. This feature is part of the
|
||||
core networking stack, and all network devices will be running on the
|
||||
multiqueue-aware stack. If a base driver only has one queue, then these
|
||||
changes are transparent to that driver.
|
||||
|
||||
Kernel support for multiqueue devices is always present.
|
||||
|
||||
Section 1: Base driver requirements for implementing multiqueue support
|
||||
-----------------------------------------------------------------------
|
||||
@ -32,84 +24,4 @@ netif_{start|stop|wake}_subqueue() functions to manage each queue while the
|
||||
device is still operational. netdev->queue_lock is still used when the device
|
||||
comes online or when it's completely shut down (unregister_netdev(), etc.).
|
||||
|
||||
Finally, the base driver should indicate that it is a multiqueue device. The
|
||||
feature flag NETIF_F_MULTI_QUEUE should be added to the netdev->features
|
||||
bitmap on device initialization. Below is an example from e1000:
|
||||
|
||||
#ifdef CONFIG_E1000_MQ
|
||||
if ( (adapter->hw.mac.type == e1000_82571) ||
|
||||
(adapter->hw.mac.type == e1000_82572) ||
|
||||
(adapter->hw.mac.type == e1000_80003es2lan))
|
||||
netdev->features |= NETIF_F_MULTI_QUEUE;
|
||||
#endif
|
||||
|
||||
|
||||
Section 2: Qdisc support for multiqueue devices
|
||||
-----------------------------------------------
|
||||
|
||||
Currently two qdiscs support multiqueue devices. A new round-robin qdisc,
|
||||
sch_rr, and sch_prio. The qdisc is responsible for classifying the skb's to
|
||||
bands and queues, and will store the queue mapping into skb->queue_mapping.
|
||||
Use this field in the base driver to determine which queue to send the skb
|
||||
to.
|
||||
|
||||
sch_rr has been added for hardware that doesn't want scheduling policies from
|
||||
software, so it's a straight round-robin qdisc. It uses the same syntax and
|
||||
classification priomap that sch_prio uses, so it should be intuitive to
|
||||
configure for people who've used sch_prio.
|
||||
|
||||
In order to utilitize the multiqueue features of the qdiscs, the network
|
||||
device layer needs to enable multiple queue support. This can be done by
|
||||
selecting NETDEVICES_MULTIQUEUE under Drivers.
|
||||
|
||||
The PRIO qdisc naturally plugs into a multiqueue device. If
|
||||
NETDEVICES_MULTIQUEUE is selected, then on qdisc load, the number of
|
||||
bands requested is compared to the number of queues on the hardware. If they
|
||||
are equal, it sets a one-to-one mapping up between the queues and bands. If
|
||||
they're not equal, it will not load the qdisc. This is the same behavior
|
||||
for RR. Once the association is made, any skb that is classified will have
|
||||
skb->queue_mapping set, which will allow the driver to properly queue skb's
|
||||
to multiple queues.
|
||||
|
||||
|
||||
Section 3: Brief howto using PRIO and RR for multiqueue devices
|
||||
---------------------------------------------------------------
|
||||
|
||||
The userspace command 'tc,' part of the iproute2 package, is used to configure
|
||||
qdiscs. To add the PRIO qdisc to your network device, assuming the device is
|
||||
called eth0, run the following command:
|
||||
|
||||
# tc qdisc add dev eth0 root handle 1: prio bands 4 multiqueue
|
||||
|
||||
This will create 4 bands, 0 being highest priority, and associate those bands
|
||||
to the queues on your NIC. Assuming eth0 has 4 Tx queues, the band mapping
|
||||
would look like:
|
||||
|
||||
band 0 => queue 0
|
||||
band 1 => queue 1
|
||||
band 2 => queue 2
|
||||
band 3 => queue 3
|
||||
|
||||
Traffic will begin flowing through each queue if your TOS values are assigning
|
||||
traffic across the various bands. For example, ssh traffic will always try to
|
||||
go out band 0 based on TOS -> Linux priority conversion (realtime traffic),
|
||||
so it will be sent out queue 0. ICMP traffic (pings) fall into the "normal"
|
||||
traffic classification, which is band 1. Therefore pings will be send out
|
||||
queue 1 on the NIC.
|
||||
|
||||
Note the use of the multiqueue keyword. This is only in versions of iproute2
|
||||
that support multiqueue networking devices; if this is omitted when loading
|
||||
a qdisc onto a multiqueue device, the qdisc will load and operate the same
|
||||
if it were loaded onto a single-queue device (i.e. - sends all traffic to
|
||||
queue 0).
|
||||
|
||||
Another alternative to multiqueue band allocation can be done by using the
|
||||
multiqueue option and specify 0 bands. If this is the case, the qdisc will
|
||||
allocate the number of bands to equal the number of queues that the device
|
||||
reports, and bring the qdisc online.
|
||||
|
||||
The behavior of tc filters remains the same, where it will override TOS priority
|
||||
classification.
|
||||
|
||||
|
||||
Author: Peter P. Waskiewicz Jr. <peter.p.waskiewicz.jr@intel.com>
|
||||
|
@ -52,13 +52,10 @@ d. MSI/MSI-X. Can be enabled on platforms which support this feature
|
||||
(IA64, Xeon) resulting in noticeable performance improvement(upto 7%
|
||||
on certain platforms).
|
||||
|
||||
e. NAPI. Compile-time option(CONFIG_S2IO_NAPI) for better Rx interrupt
|
||||
moderation.
|
||||
|
||||
f. Statistics. Comprehensive MAC-level and software statistics displayed
|
||||
e. Statistics. Comprehensive MAC-level and software statistics displayed
|
||||
using "ethtool -S" option.
|
||||
|
||||
g. Multi-FIFO/Ring. Supports up to 8 transmit queues and receive rings,
|
||||
f. Multi-FIFO/Ring. Supports up to 8 transmit queues and receive rings,
|
||||
with multiple steering options.
|
||||
|
||||
4. Command line parameters
|
||||
|
@ -148,7 +148,7 @@
|
||||
getsockopt(sockfd, SOL_SOCKET, SO_NO_CHECK, &value, ...);
|
||||
|
||||
is meaningless (as in TCP). Packets with a zero checksum field are
|
||||
illegal (cf. RFC 3828, sec. 3.1) will be silently discarded.
|
||||
illegal (cf. RFC 3828, sec. 3.1) and will be silently discarded.
|
||||
|
||||
4) Fragmentation
|
||||
|
||||
|
@ -41,12 +41,24 @@ Table of Contents
|
||||
VI - System-on-a-chip devices and nodes
|
||||
1) Defining child nodes of an SOC
|
||||
2) Representing devices without a current OF specification
|
||||
a) PHY nodes
|
||||
b) Interrupt controllers
|
||||
c) CFI or JEDEC memory-mapped NOR flash
|
||||
d) 4xx/Axon EMAC ethernet nodes
|
||||
e) Xilinx IP cores
|
||||
f) USB EHCI controllers
|
||||
a) MDIO IO device
|
||||
b) Gianfar-compatible ethernet nodes
|
||||
c) PHY nodes
|
||||
d) Interrupt controllers
|
||||
e) I2C
|
||||
f) Freescale SOC USB controllers
|
||||
g) Freescale SOC SEC Security Engines
|
||||
h) Board Control and Status (BCSR)
|
||||
i) Freescale QUICC Engine module (QE)
|
||||
j) CFI or JEDEC memory-mapped NOR flash
|
||||
k) Global Utilities Block
|
||||
l) Freescale Communications Processor Module
|
||||
m) Chipselect/Local Bus
|
||||
n) 4xx/Axon EMAC ethernet nodes
|
||||
o) Xilinx IP cores
|
||||
p) Freescale Synchronous Serial Interface
|
||||
q) USB EHCI controllers
|
||||
r) MDIO on GPIOs
|
||||
|
||||
VII - Marvell Discovery mv64[345]6x System Controller chips
|
||||
1) The /system-controller node
|
||||
@ -77,10 +89,12 @@ Table of Contents
|
||||
3) OpenPIC Interrupt Controllers
|
||||
4) ISA Interrupt Controllers
|
||||
|
||||
VIII - Specifying GPIO information for devices
|
||||
IX - Specifying GPIO information for devices
|
||||
1) gpios property
|
||||
2) gpio-controller nodes
|
||||
|
||||
X - Specifying device power management information (sleep property)
|
||||
|
||||
Appendix A - Sample SOC node for MPC8540
|
||||
|
||||
|
||||
@ -1815,6 +1829,60 @@ platforms are moved over to use the flattened-device-tree model.
|
||||
big-endian;
|
||||
};
|
||||
|
||||
r) Freescale Display Interface Unit
|
||||
|
||||
The Freescale DIU is a LCD controller, with proper hardware, it can also
|
||||
drive DVI monitors.
|
||||
|
||||
Required properties:
|
||||
- compatible : should be "fsl-diu".
|
||||
- reg : should contain at least address and length of the DIU register
|
||||
set.
|
||||
- Interrupts : one DIU interrupt should be describe here.
|
||||
|
||||
Example (MPC8610HPCD)
|
||||
display@2c000 {
|
||||
compatible = "fsl,diu";
|
||||
reg = <0x2c000 100>;
|
||||
interrupts = <72 2>;
|
||||
interrupt-parent = <&mpic>;
|
||||
};
|
||||
|
||||
s) Freescale on board FPGA
|
||||
|
||||
This is the memory-mapped registers for on board FPGA.
|
||||
|
||||
Required properities:
|
||||
- compatible : should be "fsl,fpga-pixis".
|
||||
- reg : should contain the address and the lenght of the FPPGA register
|
||||
set.
|
||||
|
||||
Example (MPC8610HPCD)
|
||||
board-control@e8000000 {
|
||||
compatible = "fsl,fpga-pixis";
|
||||
reg = <0xe8000000 32>;
|
||||
};
|
||||
|
||||
r) MDIO on GPIOs
|
||||
|
||||
Currently defined compatibles:
|
||||
- virtual,gpio-mdio
|
||||
|
||||
MDC and MDIO lines connected to GPIO controllers are listed in the
|
||||
gpios property as described in section VIII.1 in the following order:
|
||||
|
||||
MDC, MDIO.
|
||||
|
||||
Example:
|
||||
|
||||
mdio {
|
||||
compatible = "virtual,mdio-gpio";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
gpios = <&qe_pio_a 11
|
||||
&qe_pio_c 6>;
|
||||
};
|
||||
|
||||
VII - Marvell Discovery mv64[345]6x System Controller chips
|
||||
===========================================================
|
||||
|
||||
@ -2422,8 +2490,8 @@ encodings listed below:
|
||||
2 = high to low edge sensitive type enabled
|
||||
3 = low to high edge sensitive type enabled
|
||||
|
||||
VIII - Specifying GPIO information for devices
|
||||
==============================================
|
||||
IX - Specifying GPIO information for devices
|
||||
============================================
|
||||
|
||||
1) gpios property
|
||||
-----------------
|
||||
@ -2471,116 +2539,151 @@ Example of two SOC GPIO banks defined as gpio-controller nodes:
|
||||
gpio-controller;
|
||||
};
|
||||
|
||||
X - Specifying Device Power Management Information (sleep property)
|
||||
===================================================================
|
||||
|
||||
Devices on SOCs often have mechanisms for placing devices into low-power
|
||||
states that are decoupled from the devices' own register blocks. Sometimes,
|
||||
this information is more complicated than a cell-index property can
|
||||
reasonably describe. Thus, each device controlled in such a manner
|
||||
may contain a "sleep" property which describes these connections.
|
||||
|
||||
The sleep property consists of one or more sleep resources, each of
|
||||
which consists of a phandle to a sleep controller, followed by a
|
||||
controller-specific sleep specifier of zero or more cells.
|
||||
|
||||
The semantics of what type of low power modes are possible are defined
|
||||
by the sleep controller. Some examples of the types of low power modes
|
||||
that may be supported are:
|
||||
|
||||
- Dynamic: The device may be disabled or enabled at any time.
|
||||
- System Suspend: The device may request to be disabled or remain
|
||||
awake during system suspend, but will not be disabled until then.
|
||||
- Permanent: The device is disabled permanently (until the next hard
|
||||
reset).
|
||||
|
||||
Some devices may share a clock domain with each other, such that they should
|
||||
only be suspended when none of the devices are in use. Where reasonable,
|
||||
such nodes should be placed on a virtual bus, where the bus has the sleep
|
||||
property. If the clock domain is shared among devices that cannot be
|
||||
reasonably grouped in this manner, then create a virtual sleep controller
|
||||
(similar to an interrupt nexus, except that defining a standardized
|
||||
sleep-map should wait until its necessity is demonstrated).
|
||||
|
||||
Appendix A - Sample SOC node for MPC8540
|
||||
========================================
|
||||
|
||||
Note that the #address-cells and #size-cells for the SoC node
|
||||
in this example have been explicitly listed; these are likely
|
||||
not necessary as they are usually the same as the root node.
|
||||
|
||||
soc8540@e0000000 {
|
||||
soc@e0000000 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
#interrupt-cells = <2>;
|
||||
compatible = "fsl,mpc8540-ccsr", "simple-bus";
|
||||
device_type = "soc";
|
||||
ranges = <00000000 e0000000 00100000>
|
||||
reg = <e0000000 00003000>;
|
||||
ranges = <0x00000000 0xe0000000 0x00100000>
|
||||
bus-frequency = <0>;
|
||||
|
||||
mdio@24520 {
|
||||
reg = <24520 20>;
|
||||
device_type = "mdio";
|
||||
compatible = "gianfar";
|
||||
|
||||
ethernet-phy@0 {
|
||||
linux,phandle = <2452000>
|
||||
interrupt-parent = <40000>;
|
||||
interrupts = <35 1>;
|
||||
reg = <0>;
|
||||
device_type = "ethernet-phy";
|
||||
};
|
||||
|
||||
ethernet-phy@1 {
|
||||
linux,phandle = <2452001>
|
||||
interrupt-parent = <40000>;
|
||||
interrupts = <35 1>;
|
||||
reg = <1>;
|
||||
device_type = "ethernet-phy";
|
||||
};
|
||||
|
||||
ethernet-phy@3 {
|
||||
linux,phandle = <2452002>
|
||||
interrupt-parent = <40000>;
|
||||
interrupts = <35 1>;
|
||||
reg = <3>;
|
||||
device_type = "ethernet-phy";
|
||||
};
|
||||
|
||||
};
|
||||
interrupt-parent = <&pic>;
|
||||
|
||||
ethernet@24000 {
|
||||
#size-cells = <0>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
device_type = "network";
|
||||
model = "TSEC";
|
||||
compatible = "gianfar";
|
||||
reg = <24000 1000>;
|
||||
mac-address = [ 00 E0 0C 00 73 00 ];
|
||||
interrupts = <d 3 e 3 12 3>;
|
||||
interrupt-parent = <40000>;
|
||||
phy-handle = <2452000>;
|
||||
compatible = "gianfar", "simple-bus";
|
||||
reg = <0x24000 0x1000>;
|
||||
local-mac-address = [ 00 E0 0C 00 73 00 ];
|
||||
interrupts = <29 2 30 2 34 2>;
|
||||
phy-handle = <&phy0>;
|
||||
sleep = <&pmc 00000080>;
|
||||
ranges;
|
||||
|
||||
mdio@24520 {
|
||||
reg = <0x24520 0x20>;
|
||||
compatible = "fsl,gianfar-mdio";
|
||||
|
||||
phy0: ethernet-phy@0 {
|
||||
interrupts = <5 1>;
|
||||
reg = <0>;
|
||||
device_type = "ethernet-phy";
|
||||
};
|
||||
|
||||
phy1: ethernet-phy@1 {
|
||||
interrupts = <5 1>;
|
||||
reg = <1>;
|
||||
device_type = "ethernet-phy";
|
||||
};
|
||||
|
||||
phy3: ethernet-phy@3 {
|
||||
interrupts = <7 1>;
|
||||
reg = <3>;
|
||||
device_type = "ethernet-phy";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
ethernet@25000 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
device_type = "network";
|
||||
model = "TSEC";
|
||||
compatible = "gianfar";
|
||||
reg = <25000 1000>;
|
||||
mac-address = [ 00 E0 0C 00 73 01 ];
|
||||
interrupts = <13 3 14 3 18 3>;
|
||||
interrupt-parent = <40000>;
|
||||
phy-handle = <2452001>;
|
||||
reg = <0x25000 0x1000>;
|
||||
local-mac-address = [ 00 E0 0C 00 73 01 ];
|
||||
interrupts = <13 2 14 2 18 2>;
|
||||
phy-handle = <&phy1>;
|
||||
sleep = <&pmc 00000040>;
|
||||
};
|
||||
|
||||
ethernet@26000 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
device_type = "network";
|
||||
model = "FEC";
|
||||
compatible = "gianfar";
|
||||
reg = <26000 1000>;
|
||||
mac-address = [ 00 E0 0C 00 73 02 ];
|
||||
interrupts = <19 3>;
|
||||
interrupt-parent = <40000>;
|
||||
phy-handle = <2452002>;
|
||||
reg = <0x26000 0x1000>;
|
||||
local-mac-address = [ 00 E0 0C 00 73 02 ];
|
||||
interrupts = <41 2>;
|
||||
phy-handle = <&phy3>;
|
||||
sleep = <&pmc 00000020>;
|
||||
};
|
||||
|
||||
serial@4500 {
|
||||
device_type = "serial";
|
||||
compatible = "ns16550";
|
||||
reg = <4500 100>;
|
||||
clock-frequency = <0>;
|
||||
interrupts = <1a 3>;
|
||||
interrupt-parent = <40000>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
compatible = "fsl,mpc8540-duart", "simple-bus";
|
||||
sleep = <&pmc 00000002>;
|
||||
ranges;
|
||||
|
||||
serial@4500 {
|
||||
device_type = "serial";
|
||||
compatible = "ns16550";
|
||||
reg = <0x4500 0x100>;
|
||||
clock-frequency = <0>;
|
||||
interrupts = <42 2>;
|
||||
};
|
||||
|
||||
serial@4600 {
|
||||
device_type = "serial";
|
||||
compatible = "ns16550";
|
||||
reg = <0x4600 0x100>;
|
||||
clock-frequency = <0>;
|
||||
interrupts = <42 2>;
|
||||
};
|
||||
};
|
||||
|
||||
pic@40000 {
|
||||
linux,phandle = <40000>;
|
||||
pic: pic@40000 {
|
||||
interrupt-controller;
|
||||
#address-cells = <0>;
|
||||
reg = <40000 40000>;
|
||||
#interrupt-cells = <2>;
|
||||
reg = <0x40000 0x40000>;
|
||||
compatible = "chrp,open-pic";
|
||||
device_type = "open-pic";
|
||||
};
|
||||
|
||||
i2c@3000 {
|
||||
interrupt-parent = <40000>;
|
||||
interrupts = <1b 3>;
|
||||
reg = <3000 18>;
|
||||
device_type = "i2c";
|
||||
interrupts = <43 2>;
|
||||
reg = <0x3000 0x100>;
|
||||
compatible = "fsl-i2c";
|
||||
dfsrr;
|
||||
sleep = <&pmc 00000004>;
|
||||
};
|
||||
|
||||
pmc: power@e0070 {
|
||||
compatible = "fsl,mpc8540-pmc", "fsl,mpc8548-pmc";
|
||||
reg = <0xe0070 0x20>;
|
||||
};
|
||||
};
|
||||
|
38
Documentation/powerpc/dts-bindings/fsl/cpm_qe/gpio.txt
Normal file
38
Documentation/powerpc/dts-bindings/fsl/cpm_qe/gpio.txt
Normal file
@ -0,0 +1,38 @@
|
||||
Every GPIO controller node must have #gpio-cells property defined,
|
||||
this information will be used to translate gpio-specifiers.
|
||||
|
||||
On CPM1 devices, all ports are using slightly different register layouts.
|
||||
Ports A, C and D are 16bit ports and Ports B and E are 32bit ports.
|
||||
|
||||
On CPM2 devices, all ports are 32bit ports and use a common register layout.
|
||||
|
||||
Required properties:
|
||||
- compatible : "fsl,cpm1-pario-bank-a", "fsl,cpm1-pario-bank-b",
|
||||
"fsl,cpm1-pario-bank-c", "fsl,cpm1-pario-bank-d",
|
||||
"fsl,cpm1-pario-bank-e", "fsl,cpm2-pario-bank"
|
||||
- #gpio-cells : Should be two. The first cell is the pin number and the
|
||||
second cell is used to specify optional paramters (currently unused).
|
||||
- gpio-controller : Marks the port as GPIO controller.
|
||||
|
||||
Example of three SOC GPIO banks defined as gpio-controller nodes:
|
||||
|
||||
CPM1_PIO_A: gpio-controller@950 {
|
||||
#gpio-cells = <2>;
|
||||
compatible = "fsl,cpm1-pario-bank-a";
|
||||
reg = <0x950 0x10>;
|
||||
gpio-controller;
|
||||
};
|
||||
|
||||
CPM1_PIO_B: gpio-controller@ab8 {
|
||||
#gpio-cells = <2>;
|
||||
compatible = "fsl,cpm1-pario-bank-b";
|
||||
reg = <0xab8 0x10>;
|
||||
gpio-controller;
|
||||
};
|
||||
|
||||
CPM1_PIO_E: gpio-controller@ac8 {
|
||||
#gpio-cells = <2>;
|
||||
compatible = "fsl,cpm1-pario-bank-e";
|
||||
reg = <0xac8 0x18>;
|
||||
gpio-controller;
|
||||
};
|
@ -1,22 +1,37 @@
|
||||
* USB (Universal Serial Bus Controller)
|
||||
Freescale QUICC Engine USB Controller
|
||||
|
||||
Required properties:
|
||||
- compatible : could be "qe_udc" or "fhci-hcd".
|
||||
- mode : the could be "host" or "slave".
|
||||
- reg : Offset and length of the register set for the device
|
||||
- interrupts : <a b> where a is the interrupt number and b is a
|
||||
field that represents an encoding of the sense and level
|
||||
information for the interrupt. This should be encoded based on
|
||||
the information in section 2) depending on the type of interrupt
|
||||
controller you have.
|
||||
- interrupt-parent : the phandle for the interrupt controller that
|
||||
services interrupts for this device.
|
||||
- compatible : should be "fsl,<chip>-qe-usb", "fsl,mpc8323-qe-usb".
|
||||
- reg : the first two cells should contain usb registers location and
|
||||
length, the next two two cells should contain PRAM location and
|
||||
length.
|
||||
- interrupts : should contain USB interrupt.
|
||||
- interrupt-parent : interrupt source phandle.
|
||||
- fsl,fullspeed-clock : specifies the full speed USB clock source:
|
||||
"none": clock source is disabled
|
||||
"brg1" through "brg16": clock source is BRG1-BRG16, respectively
|
||||
"clk1" through "clk24": clock source is CLK1-CLK24, respectively
|
||||
- fsl,lowspeed-clock : specifies the low speed USB clock source:
|
||||
"none": clock source is disabled
|
||||
"brg1" through "brg16": clock source is BRG1-BRG16, respectively
|
||||
"clk1" through "clk24": clock source is CLK1-CLK24, respectively
|
||||
- hub-power-budget : USB power budget for the root hub, in mA.
|
||||
- gpios : should specify GPIOs in this order: USBOE, USBTP, USBTN, USBRP,
|
||||
USBRN, SPEED (optional), and POWER (optional).
|
||||
|
||||
Example(slave):
|
||||
usb@6c0 {
|
||||
compatible = "qe_udc";
|
||||
reg = <6c0 40>;
|
||||
interrupts = <8b 0>;
|
||||
interrupt-parent = <700>;
|
||||
mode = "slave";
|
||||
};
|
||||
Example:
|
||||
|
||||
usb@6c0 {
|
||||
compatible = "fsl,mpc8360-qe-usb", "fsl,mpc8323-qe-usb";
|
||||
reg = <0x6c0 0x40 0x8b00 0x100>;
|
||||
interrupts = <11>;
|
||||
interrupt-parent = <&qeic>;
|
||||
fsl,fullspeed-clock = "clk21";
|
||||
gpios = <&qe_pio_b 2 0 /* USBOE */
|
||||
&qe_pio_b 3 0 /* USBTP */
|
||||
&qe_pio_b 8 0 /* USBTN */
|
||||
&qe_pio_b 9 0 /* USBRP */
|
||||
&qe_pio_b 11 0 /* USBRN */
|
||||
&qe_pio_e 20 0 /* SPEED */
|
||||
&qe_pio_e 21 0 /* POWER */>;
|
||||
};
|
||||
|
17
Documentation/powerpc/dts-bindings/fsl/mcu-mpc8349emitx.txt
Normal file
17
Documentation/powerpc/dts-bindings/fsl/mcu-mpc8349emitx.txt
Normal file
@ -0,0 +1,17 @@
|
||||
Freescale MPC8349E-mITX-compatible Power Management Micro Controller Unit (MCU)
|
||||
|
||||
Required properties:
|
||||
- compatible : "fsl,<mcu-chip>-<board>", "fsl,mcu-mpc8349emitx".
|
||||
- reg : should specify I2C address (0x0a).
|
||||
- #gpio-cells : should be 2.
|
||||
- gpio-controller : should be present.
|
||||
|
||||
Example:
|
||||
|
||||
mcu@0a {
|
||||
#gpio-cells = <2>;
|
||||
compatible = "fsl,mc9s08qg8-mpc8349emitx",
|
||||
"fsl,mcu-mpc8349emitx";
|
||||
reg = <0x0a>;
|
||||
gpio-controller;
|
||||
};
|
63
Documentation/powerpc/dts-bindings/fsl/pmc.txt
Normal file
63
Documentation/powerpc/dts-bindings/fsl/pmc.txt
Normal file
@ -0,0 +1,63 @@
|
||||
* Power Management Controller
|
||||
|
||||
Properties:
|
||||
- compatible: "fsl,<chip>-pmc".
|
||||
|
||||
"fsl,mpc8349-pmc" should be listed for any chip whose PMC is
|
||||
compatible. "fsl,mpc8313-pmc" should also be listed for any chip
|
||||
whose PMC is compatible, and implies deep-sleep capability.
|
||||
|
||||
"fsl,mpc8548-pmc" should be listed for any chip whose PMC is
|
||||
compatible. "fsl,mpc8536-pmc" should also be listed for any chip
|
||||
whose PMC is compatible, and implies deep-sleep capability.
|
||||
|
||||
"fsl,mpc8641d-pmc" should be listed for any chip whose PMC is
|
||||
compatible; all statements below that apply to "fsl,mpc8548-pmc" also
|
||||
apply to "fsl,mpc8641d-pmc".
|
||||
|
||||
Compatibility does not include bit assigments in SCCR/PMCDR/DEVDISR; these
|
||||
bit assigments are indicated via the sleep specifier in each device's
|
||||
sleep property.
|
||||
|
||||
- reg: For devices compatible with "fsl,mpc8349-pmc", the first resource
|
||||
is the PMC block, and the second resource is the Clock Configuration
|
||||
block.
|
||||
|
||||
For devices compatible with "fsl,mpc8548-pmc", the first resource
|
||||
is a 32-byte block beginning with DEVDISR.
|
||||
|
||||
- interrupts: For "fsl,mpc8349-pmc"-compatible devices, the first
|
||||
resource is the PMC block interrupt.
|
||||
|
||||
- fsl,mpc8313-wakeup-timer: For "fsl,mpc8313-pmc"-compatible devices,
|
||||
this is a phandle to an "fsl,gtm" node on which timer 4 can be used as
|
||||
a wakeup source from deep sleep.
|
||||
|
||||
Sleep specifiers:
|
||||
|
||||
fsl,mpc8349-pmc: Sleep specifiers consist of one cell. For each bit
|
||||
that is set in the cell, the corresponding bit in SCCR will be saved
|
||||
and cleared on suspend, and restored on resume. This sleep controller
|
||||
supports disabling and resuming devices at any time.
|
||||
|
||||
fsl,mpc8536-pmc: Sleep specifiers consist of three cells, the third of
|
||||
which will be ORed into PMCDR upon suspend, and cleared from PMCDR
|
||||
upon resume. The first two cells are as described for fsl,mpc8578-pmc.
|
||||
This sleep controller only supports disabling devices during system
|
||||
sleep, or permanently.
|
||||
|
||||
fsl,mpc8548-pmc: Sleep specifiers consist of one or two cells, the
|
||||
first of which will be ORed into DEVDISR (and the second into
|
||||
DEVDISR2, if present -- this cell should be zero or absent if the
|
||||
hardware does not have DEVDISR2) upon a request for permanent device
|
||||
disabling. This sleep controller does not support configuring devices
|
||||
to disable during system sleep (unless supported by another compatible
|
||||
match), or dynamically.
|
||||
|
||||
Example:
|
||||
|
||||
power@b00 {
|
||||
compatible = "fsl,mpc8313-pmc", "fsl,mpc8349-pmc";
|
||||
reg = <0xb00 0x100 0xa00 0x100>;
|
||||
interrupts = <80 8>;
|
||||
};
|
@ -24,46 +24,39 @@ Example:
|
||||
|
||||
* Gianfar-compatible ethernet nodes
|
||||
|
||||
Required properties:
|
||||
Properties:
|
||||
|
||||
- device_type : Should be "network"
|
||||
- model : Model of the device. Can be "TSEC", "eTSEC", or "FEC"
|
||||
- compatible : Should be "gianfar"
|
||||
- reg : Offset and length of the register set for the device
|
||||
- mac-address : List of bytes representing the ethernet address of
|
||||
- local-mac-address : List of bytes representing the ethernet address of
|
||||
this controller
|
||||
- interrupts : <a b> where a is the interrupt number and b is a
|
||||
field that represents an encoding of the sense and level
|
||||
information for the interrupt. This should be encoded based on
|
||||
the information in section 2) depending on the type of interrupt
|
||||
controller you have.
|
||||
- interrupt-parent : the phandle for the interrupt controller that
|
||||
services interrupts for this device.
|
||||
- interrupts : For FEC devices, the first interrupt is the device's
|
||||
interrupt. For TSEC and eTSEC devices, the first interrupt is
|
||||
transmit, the second is receive, and the third is error.
|
||||
- phy-handle : The phandle for the PHY connected to this ethernet
|
||||
controller.
|
||||
- fixed-link : <a b c d e> where a is emulated phy id - choose any,
|
||||
but unique to the all specified fixed-links, b is duplex - 0 half,
|
||||
1 full, c is link speed - d#10/d#100/d#1000, d is pause - 0 no
|
||||
pause, 1 pause, e is asym_pause - 0 no asym_pause, 1 asym_pause.
|
||||
|
||||
Recommended properties:
|
||||
|
||||
- phy-connection-type : a string naming the controller/PHY interface type,
|
||||
i.e., "mii" (default), "rmii", "gmii", "rgmii", "rgmii-id", "sgmii",
|
||||
"tbi", or "rtbi". This property is only really needed if the connection
|
||||
is of type "rgmii-id", as all other connection types are detected by
|
||||
hardware.
|
||||
|
||||
- fsl,magic-packet : If present, indicates that the hardware supports
|
||||
waking up via magic packet.
|
||||
|
||||
Example:
|
||||
ethernet@24000 {
|
||||
#size-cells = <0>;
|
||||
device_type = "network";
|
||||
model = "TSEC";
|
||||
compatible = "gianfar";
|
||||
reg = <24000 1000>;
|
||||
mac-address = [ 00 E0 0C 00 73 00 ];
|
||||
interrupts = <d 3 e 3 12 3>;
|
||||
interrupt-parent = <40000>;
|
||||
phy-handle = <2452000>
|
||||
reg = <0x24000 0x1000>;
|
||||
local-mac-address = [ 00 E0 0C 00 73 00 ];
|
||||
interrupts = <29 2 30 2 34 2>;
|
||||
interrupt-parent = <&mpic>;
|
||||
phy-handle = <&phy0>
|
||||
};
|
||||
|
28
Documentation/powerpc/dts-bindings/fsl/upm-nand.txt
Normal file
28
Documentation/powerpc/dts-bindings/fsl/upm-nand.txt
Normal file
@ -0,0 +1,28 @@
|
||||
Freescale Localbus UPM programmed to work with NAND flash
|
||||
|
||||
Required properties:
|
||||
- compatible : "fsl,upm-nand".
|
||||
- reg : should specify localbus chip select and size used for the chip.
|
||||
- fsl,upm-addr-offset : UPM pattern offset for the address latch.
|
||||
- fsl,upm-cmd-offset : UPM pattern offset for the command latch.
|
||||
- gpios : may specify optional GPIO connected to the Ready-Not-Busy pin.
|
||||
|
||||
Example:
|
||||
|
||||
upm@1,0 {
|
||||
compatible = "fsl,upm-nand";
|
||||
reg = <1 0 1>;
|
||||
fsl,upm-addr-offset = <16>;
|
||||
fsl,upm-cmd-offset = <8>;
|
||||
gpios = <&qe_pio_e 18 0>;
|
||||
|
||||
flash {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
compatible = "...";
|
||||
|
||||
partition@0 {
|
||||
...
|
||||
};
|
||||
};
|
||||
};
|
15
Documentation/powerpc/dts-bindings/gpio/led.txt
Normal file
15
Documentation/powerpc/dts-bindings/gpio/led.txt
Normal file
@ -0,0 +1,15 @@
|
||||
LED connected to GPIO
|
||||
|
||||
Required properties:
|
||||
- compatible : should be "gpio-led".
|
||||
- label : (optional) the label for this LED. If omitted, the label is
|
||||
taken from the node name (excluding the unit address).
|
||||
- gpios : should specify LED GPIO.
|
||||
|
||||
Example:
|
||||
|
||||
led@0 {
|
||||
compatible = "gpio-led";
|
||||
label = "hdd";
|
||||
gpios = <&mcu_pio 0 1>;
|
||||
};
|
@ -1,89 +1,528 @@
|
||||
rfkill - RF switch subsystem support
|
||||
====================================
|
||||
|
||||
1 Implementation details
|
||||
2 Driver support
|
||||
3 Userspace support
|
||||
1 Introduction
|
||||
2 Implementation details
|
||||
3 Kernel driver guidelines
|
||||
3.1 wireless device drivers
|
||||
3.2 platform/switch drivers
|
||||
3.3 input device drivers
|
||||
4 Kernel API
|
||||
5 Userspace support
|
||||
|
||||
|
||||
1. Introduction:
|
||||
|
||||
The rfkill switch subsystem exists to add a generic interface to circuitry that
|
||||
can enable or disable the signal output of a wireless *transmitter* of any
|
||||
type. By far, the most common use is to disable radio-frequency transmitters.
|
||||
|
||||
Note that disabling the signal output means that the the transmitter is to be
|
||||
made to not emit any energy when "blocked". rfkill is not about blocking data
|
||||
transmissions, it is about blocking energy emission.
|
||||
|
||||
The rfkill subsystem offers support for keys and switches often found on
|
||||
laptops to enable wireless devices like WiFi and Bluetooth, so that these keys
|
||||
and switches actually perform an action in all wireless devices of a given type
|
||||
attached to the system.
|
||||
|
||||
The buttons to enable and disable the wireless transmitters are important in
|
||||
situations where the user is for example using his laptop on a location where
|
||||
radio-frequency transmitters _must_ be disabled (e.g. airplanes).
|
||||
|
||||
Because of this requirement, userspace support for the keys should not be made
|
||||
mandatory. Because userspace might want to perform some additional smarter
|
||||
tasks when the key is pressed, rfkill provides userspace the possibility to
|
||||
take over the task to handle the key events.
|
||||
|
||||
===============================================================================
|
||||
1: Implementation details
|
||||
2: Implementation details
|
||||
|
||||
The rfkill switch subsystem offers support for keys often found on laptops
|
||||
to enable wireless devices like WiFi and Bluetooth.
|
||||
The rfkill subsystem is composed of various components: the rfkill class, the
|
||||
rfkill-input module (an input layer handler), and some specific input layer
|
||||
events.
|
||||
|
||||
This is done by providing the user 3 possibilities:
|
||||
1 - The rfkill system handles all events; userspace is not aware of events.
|
||||
2 - The rfkill system handles all events; userspace is informed about the events.
|
||||
3 - The rfkill system does not handle events; userspace handles all events.
|
||||
The rfkill class provides kernel drivers with an interface that allows them to
|
||||
know when they should enable or disable a wireless network device transmitter.
|
||||
This is enabled by the CONFIG_RFKILL Kconfig option.
|
||||
|
||||
The buttons to enable and disable the wireless radios are important in
|
||||
situations where the user is for example using his laptop on a location where
|
||||
wireless radios _must_ be disabled (e.g. airplanes).
|
||||
Because of this requirement, userspace support for the keys should not be
|
||||
made mandatory. Because userspace might want to perform some additional smarter
|
||||
tasks when the key is pressed, rfkill still provides userspace the possibility
|
||||
to take over the task to handle the key events.
|
||||
The rfkill class support makes sure userspace will be notified of all state
|
||||
changes on rfkill devices through uevents. It provides a notification chain
|
||||
for interested parties in the kernel to also get notified of rfkill state
|
||||
changes in other drivers. It creates several sysfs entries which can be used
|
||||
by userspace. See section "Userspace support".
|
||||
|
||||
The system inside the kernel has been split into 2 separate sections:
|
||||
1 - RFKILL
|
||||
2 - RFKILL_INPUT
|
||||
The rfkill-input module provides the kernel with the ability to implement a
|
||||
basic response when the user presses a key or button (or toggles a switch)
|
||||
related to rfkill functionality. It is an in-kernel implementation of default
|
||||
policy of reacting to rfkill-related input events and neither mandatory nor
|
||||
required for wireless drivers to operate. It is enabled by the
|
||||
CONFIG_RFKILL_INPUT Kconfig option.
|
||||
|
||||
The first option enables rfkill support and will make sure userspace will
|
||||
be notified of any events through the input device. It also creates several
|
||||
sysfs entries which can be used by userspace. See section "Userspace support".
|
||||
rfkill-input is a rfkill-related events input layer handler. This handler will
|
||||
listen to all rfkill key events and will change the rfkill state of the
|
||||
wireless devices accordingly. With this option enabled userspace could either
|
||||
do nothing or simply perform monitoring tasks.
|
||||
|
||||
The second option provides an rfkill input handler. This handler will
|
||||
listen to all rfkill key events and will toggle the radio accordingly.
|
||||
With this option enabled userspace could either do nothing or simply
|
||||
perform monitoring tasks.
|
||||
The rfkill-input module also provides EPO (emergency power-off) functionality
|
||||
for all wireless transmitters. This function cannot be overridden, and it is
|
||||
always active. rfkill EPO is related to *_RFKILL_ALL input layer events.
|
||||
|
||||
|
||||
Important terms for the rfkill subsystem:
|
||||
|
||||
In order to avoid confusion, we avoid the term "switch" in rfkill when it is
|
||||
referring to an electronic control circuit that enables or disables a
|
||||
transmitter. We reserve it for the physical device a human manipulates
|
||||
(which is an input device, by the way):
|
||||
|
||||
rfkill switch:
|
||||
|
||||
A physical device a human manipulates. Its state can be perceived by
|
||||
the kernel either directly (through a GPIO pin, ACPI GPE) or by its
|
||||
effect on a rfkill line of a wireless device.
|
||||
|
||||
rfkill controller:
|
||||
|
||||
A hardware circuit that controls the state of a rfkill line, which a
|
||||
kernel driver can interact with *to modify* that state (i.e. it has
|
||||
either write-only or read/write access).
|
||||
|
||||
rfkill line:
|
||||
|
||||
An input channel (hardware or software) of a wireless device, which
|
||||
causes a wireless transmitter to stop emitting energy (BLOCK) when it
|
||||
is active. Point of view is extremely important here: rfkill lines are
|
||||
always seen from the PoV of a wireless device (and its driver).
|
||||
|
||||
soft rfkill line/software rfkill line:
|
||||
|
||||
A rfkill line the wireless device driver can directly change the state
|
||||
of. Related to rfkill_state RFKILL_STATE_SOFT_BLOCKED.
|
||||
|
||||
hard rfkill line/hardware rfkill line:
|
||||
|
||||
A rfkill line that works fully in hardware or firmware, and that cannot
|
||||
be overridden by the kernel driver. The hardware device or the
|
||||
firmware just exports its status to the driver, but it is read-only.
|
||||
Related to rfkill_state RFKILL_STATE_HARD_BLOCKED.
|
||||
|
||||
The enum rfkill_state describes the rfkill state of a transmitter:
|
||||
|
||||
When a rfkill line or rfkill controller is in the RFKILL_STATE_UNBLOCKED state,
|
||||
the wireless transmitter (radio TX circuit for example) is *enabled*. When the
|
||||
it is in the RFKILL_STATE_SOFT_BLOCKED or RFKILL_STATE_HARD_BLOCKED, the
|
||||
wireless transmitter is to be *blocked* from operating.
|
||||
|
||||
RFKILL_STATE_SOFT_BLOCKED indicates that a call to toggle_radio() can change
|
||||
that state. RFKILL_STATE_HARD_BLOCKED indicates that a call to toggle_radio()
|
||||
will not be able to change the state and will return with a suitable error if
|
||||
attempts are made to set the state to RFKILL_STATE_UNBLOCKED.
|
||||
|
||||
RFKILL_STATE_HARD_BLOCKED is used by drivers to signal that the device is
|
||||
locked in the BLOCKED state by a hardwire rfkill line (typically an input pin
|
||||
that, when active, forces the transmitter to be disabled) which the driver
|
||||
CANNOT override.
|
||||
|
||||
Full rfkill functionality requires two different subsystems to cooperate: the
|
||||
input layer and the rfkill class. The input layer issues *commands* to the
|
||||
entire system requesting that devices registered to the rfkill class change
|
||||
state. The way this interaction happens is not complex, but it is not obvious
|
||||
either:
|
||||
|
||||
Kernel Input layer:
|
||||
|
||||
* Generates KEY_WWAN, KEY_WLAN, KEY_BLUETOOTH, SW_RFKILL_ALL, and
|
||||
other such events when the user presses certain keys, buttons, or
|
||||
toggles certain physical switches.
|
||||
|
||||
THE INPUT LAYER IS NEVER USED TO PROPAGATE STATUS, NOTIFICATIONS OR THE
|
||||
KIND OF STUFF AN ON-SCREEN-DISPLAY APPLICATION WOULD REPORT. It is
|
||||
used to issue *commands* for the system to change behaviour, and these
|
||||
commands may or may not be carried out by some kernel driver or
|
||||
userspace application. It follows that doing user feedback based only
|
||||
on input events is broken, as there is no guarantee that an input event
|
||||
will be acted upon.
|
||||
|
||||
Most wireless communication device drivers implementing rfkill
|
||||
functionality MUST NOT generate these events, and have no reason to
|
||||
register themselves with the input layer. Doing otherwise is a common
|
||||
misconception. There is an API to propagate rfkill status change
|
||||
information, and it is NOT the input layer.
|
||||
|
||||
rfkill class:
|
||||
|
||||
* Calls a hook in a driver to effectively change the wireless
|
||||
transmitter state;
|
||||
* Keeps track of the wireless transmitter state (with help from
|
||||
the driver);
|
||||
* Generates userspace notifications (uevents) and a call to a
|
||||
notification chain (kernel) when there is a wireless transmitter
|
||||
state change;
|
||||
* Connects a wireless communications driver with the common rfkill
|
||||
control system, which, for example, allows actions such as
|
||||
"switch all bluetooth devices offline" to be carried out by
|
||||
userspace or by rfkill-input.
|
||||
|
||||
THE RFKILL CLASS NEVER ISSUES INPUT EVENTS. THE RFKILL CLASS DOES
|
||||
NOT LISTEN TO INPUT EVENTS. NO DRIVER USING THE RFKILL CLASS SHALL
|
||||
EVER LISTEN TO, OR ACT ON RFKILL INPUT EVENTS. Doing otherwise is
|
||||
a layering violation.
|
||||
|
||||
Most wireless data communication drivers in the kernel have just to
|
||||
implement the rfkill class API to work properly. Interfacing to the
|
||||
input layer is not often required (and is very often a *bug*) on
|
||||
wireless drivers.
|
||||
|
||||
Platform drivers often have to attach to the input layer to *issue*
|
||||
(but never to listen to) rfkill events for rfkill switches, and also to
|
||||
the rfkill class to export a control interface for the platform rfkill
|
||||
controllers to the rfkill subsystem. This does NOT mean the rfkill
|
||||
switch is attached to a rfkill class (doing so is almost always wrong).
|
||||
It just means the same kernel module is the driver for different
|
||||
devices (rfkill switches and rfkill controllers).
|
||||
|
||||
|
||||
Userspace input handlers (uevents) or kernel input handlers (rfkill-input):
|
||||
|
||||
* Implements the policy of what should happen when one of the input
|
||||
layer events related to rfkill operation is received.
|
||||
* Uses the sysfs interface (userspace) or private rfkill API calls
|
||||
to tell the devices registered with the rfkill class to change
|
||||
their state (i.e. translates the input layer event into real
|
||||
action).
|
||||
* rfkill-input implements EPO by handling EV_SW SW_RFKILL_ALL 0
|
||||
(power off all transmitters) in a special way: it ignores any
|
||||
overrides and local state cache and forces all transmitters to the
|
||||
RFKILL_STATE_SOFT_BLOCKED state (including those which are already
|
||||
supposed to be BLOCKED). Note that the opposite event (power on all
|
||||
transmitters) is handled normally.
|
||||
|
||||
Userspace uevent handler or kernel platform-specific drivers hooked to the
|
||||
rfkill notifier chain:
|
||||
|
||||
* Taps into the rfkill notifier chain or to KOBJ_CHANGE uevents,
|
||||
in order to know when a device that is registered with the rfkill
|
||||
class changes state;
|
||||
* Issues feedback notifications to the user;
|
||||
* In the rare platforms where this is required, synthesizes an input
|
||||
event to command all *OTHER* rfkill devices to also change their
|
||||
statues when a specific rfkill device changes state.
|
||||
|
||||
|
||||
===============================================================================
|
||||
3: Kernel driver guidelines
|
||||
|
||||
Remember: point-of-view is everything for a driver that connects to the rfkill
|
||||
subsystem. All the details below must be measured/perceived from the point of
|
||||
view of the specific driver being modified.
|
||||
|
||||
The first thing one needs to know is whether his driver should be talking to
|
||||
the rfkill class or to the input layer. In rare cases (platform drivers), it
|
||||
could happen that you need to do both, as platform drivers often handle a
|
||||
variety of devices in the same driver.
|
||||
|
||||
Do not mistake input devices for rfkill controllers. The only type of "rfkill
|
||||
switch" device that is to be registered with the rfkill class are those
|
||||
directly controlling the circuits that cause a wireless transmitter to stop
|
||||
working (or the software equivalent of them), i.e. what we call a rfkill
|
||||
controller. Every other kind of "rfkill switch" is just an input device and
|
||||
MUST NOT be registered with the rfkill class.
|
||||
|
||||
A driver should register a device with the rfkill class when ALL of the
|
||||
following conditions are met (they define a rfkill controller):
|
||||
|
||||
1. The device is/controls a data communications wireless transmitter;
|
||||
|
||||
2. The kernel can interact with the hardware/firmware to CHANGE the wireless
|
||||
transmitter state (block/unblock TX operation);
|
||||
|
||||
3. The transmitter can be made to not emit any energy when "blocked":
|
||||
rfkill is not about blocking data transmissions, it is about blocking
|
||||
energy emission;
|
||||
|
||||
A driver should register a device with the input subsystem to issue
|
||||
rfkill-related events (KEY_WLAN, KEY_BLUETOOTH, KEY_WWAN, KEY_WIMAX,
|
||||
SW_RFKILL_ALL, etc) when ALL of the folowing conditions are met:
|
||||
|
||||
1. It is directly related to some physical device the user interacts with, to
|
||||
command the O.S./firmware/hardware to enable/disable a data communications
|
||||
wireless transmitter.
|
||||
|
||||
Examples of the physical device are: buttons, keys and switches the user
|
||||
will press/touch/slide/switch to enable or disable the wireless
|
||||
communication device.
|
||||
|
||||
2. It is NOT slaved to another device, i.e. there is no other device that
|
||||
issues rfkill-related input events in preference to this one.
|
||||
|
||||
Please refer to the corner cases and examples section for more details.
|
||||
|
||||
When in doubt, do not issue input events. For drivers that should generate
|
||||
input events in some platforms, but not in others (e.g. b43), the best solution
|
||||
is to NEVER generate input events in the first place. That work should be
|
||||
deferred to a platform-specific kernel module (which will know when to generate
|
||||
events through the rfkill notifier chain) or to userspace. This avoids the
|
||||
usual maintenance problems with DMI whitelisting.
|
||||
|
||||
|
||||
Corner cases and examples:
|
||||
====================================
|
||||
2: Driver support
|
||||
|
||||
To build a driver with rfkill subsystem support, the driver should
|
||||
depend on the Kconfig symbol RFKILL; it should _not_ depend on
|
||||
RKFILL_INPUT.
|
||||
1. If the device is an input device that, because of hardware or firmware,
|
||||
causes wireless transmitters to be blocked regardless of the kernel's will, it
|
||||
is still just an input device, and NOT to be registered with the rfkill class.
|
||||
|
||||
Unless key events trigger an interrupt to which the driver listens, polling
|
||||
will be required to determine the key state changes. For this the input
|
||||
layer providers the input-polldev handler.
|
||||
2. If the wireless transmitter switch control is read-only, it is an input
|
||||
device and not to be registered with the rfkill class (and maybe not to be made
|
||||
an input layer event source either, see below).
|
||||
|
||||
A driver should implement a few steps to correctly make use of the
|
||||
rfkill subsystem. First for non-polling drivers:
|
||||
3. If there is some other device driver *closer* to the actual hardware the
|
||||
user interacted with (the button/switch/key) to issue an input event, THAT is
|
||||
the device driver that should be issuing input events.
|
||||
|
||||
- rfkill_allocate()
|
||||
- input_allocate_device()
|
||||
- rfkill_register()
|
||||
- input_register_device()
|
||||
E.g:
|
||||
[RFKILL slider switch] -- [GPIO hardware] -- [WLAN card rf-kill input]
|
||||
(platform driver) (wireless card driver)
|
||||
|
||||
For polling drivers:
|
||||
The user is closer to the RFKILL slide switch plaform driver, so the driver
|
||||
which must issue input events is the platform driver looking at the GPIO
|
||||
hardware, and NEVER the wireless card driver (which is just a slave). It is
|
||||
very likely that there are other leaves than just the WLAN card rf-kill input
|
||||
(e.g. a bluetooth card, etc)...
|
||||
|
||||
- rfkill_allocate()
|
||||
- input_allocate_polled_device()
|
||||
- rfkill_register()
|
||||
- input_register_polled_device()
|
||||
On the other hand, some embedded devices do this:
|
||||
|
||||
When a key event has been detected, the correct event should be
|
||||
sent over the input device which has been registered by the driver.
|
||||
[RFKILL slider switch] -- [WLAN card rf-kill input]
|
||||
(wireless card driver)
|
||||
|
||||
In this situation, the wireless card driver *could* register itself as an input
|
||||
device and issue rf-kill related input events... but in order to AVOID the need
|
||||
for DMI whitelisting, the wireless card driver does NOT do it. Userspace (HAL)
|
||||
or a platform driver (that exists only on these embedded devices) will do the
|
||||
dirty job of issuing the input events.
|
||||
|
||||
|
||||
COMMON MISTAKES in kernel drivers, related to rfkill:
|
||||
====================================
|
||||
3: Userspace support
|
||||
|
||||
For each key an input device will be created which will send out the correct
|
||||
key event when the rfkill key has been pressed.
|
||||
1. NEVER confuse input device keys and buttons with input device switches.
|
||||
|
||||
1a. Switches are always set or reset. They report the current state
|
||||
(on position or off position).
|
||||
|
||||
1b. Keys and buttons are either in the pressed or not-pressed state, and
|
||||
that's it. A "button" that latches down when you press it, and
|
||||
unlatches when you press it again is in fact a switch as far as input
|
||||
devices go.
|
||||
|
||||
Add the SW_* events you need for switches, do NOT try to emulate a button using
|
||||
KEY_* events just because there is no such SW_* event yet. Do NOT try to use,
|
||||
for example, KEY_BLUETOOTH when you should be using SW_BLUETOOTH instead.
|
||||
|
||||
2. Input device switches (sources of EV_SW events) DO store their current state
|
||||
(so you *must* initialize it by issuing a gratuitous input layer event on
|
||||
driver start-up and also when resuming from sleep), and that state CAN be
|
||||
queried from userspace through IOCTLs. There is no sysfs interface for this,
|
||||
but that doesn't mean you should break things trying to hook it to the rfkill
|
||||
class to get a sysfs interface :-)
|
||||
|
||||
3. Do not issue *_RFKILL_ALL events by default, unless you are sure it is the
|
||||
correct event for your switch/button. These events are emergency power-off
|
||||
events when they are trying to turn the transmitters off. An example of an
|
||||
input device which SHOULD generate *_RFKILL_ALL events is the wireless-kill
|
||||
switch in a laptop which is NOT a hotkey, but a real switch that kills radios
|
||||
in hardware, even if the O.S. has gone to lunch. An example of an input device
|
||||
which SHOULD NOT generate *_RFKILL_ALL events by default, is any sort of hot
|
||||
key that does nothing by itself, as well as any hot key that is type-specific
|
||||
(e.g. the one for WLAN).
|
||||
|
||||
|
||||
3.1 Guidelines for wireless device drivers
|
||||
------------------------------------------
|
||||
|
||||
1. Each independent transmitter in a wireless device (usually there is only one
|
||||
transmitter per device) should have a SINGLE rfkill class attached to it.
|
||||
|
||||
2. If the device does not have any sort of hardware assistance to allow the
|
||||
driver to rfkill the device, the driver should emulate it by taking all actions
|
||||
required to silence the transmitter.
|
||||
|
||||
3. If it is impossible to silence the transmitter (i.e. it still emits energy,
|
||||
even if it is just in brief pulses, when there is no data to transmit and there
|
||||
is no hardware support to turn it off) do NOT lie to the users. Do not attach
|
||||
it to a rfkill class. The rfkill subsystem does not deal with data
|
||||
transmission, it deals with energy emission. If the transmitter is emitting
|
||||
energy, it is not blocked in rfkill terms.
|
||||
|
||||
4. It doesn't matter if the device has multiple rfkill input lines affecting
|
||||
the same transmitter, their combined state is to be exported as a single state
|
||||
per transmitter (see rule 1).
|
||||
|
||||
This rule exists because users of the rfkill subsystem expect to get (and set,
|
||||
when possible) the overall transmitter rfkill state, not of a particular rfkill
|
||||
line.
|
||||
|
||||
Example of a WLAN wireless driver connected to the rfkill subsystem:
|
||||
--------------------------------------------------------------------
|
||||
|
||||
A certain WLAN card has one input pin that causes it to block the transmitter
|
||||
and makes the status of that input pin available (only for reading!) to the
|
||||
kernel driver. This is a hard rfkill input line (it cannot be overridden by
|
||||
the kernel driver).
|
||||
|
||||
The card also has one PCI register that, if manipulated by the driver, causes
|
||||
it to block the transmitter. This is a soft rfkill input line.
|
||||
|
||||
It has also a thermal protection circuitry that shuts down its transmitter if
|
||||
the card overheats, and makes the status of that protection available (only for
|
||||
reading!) to the kernel driver. This is also a hard rfkill input line.
|
||||
|
||||
If either one of these rfkill lines are active, the transmitter is blocked by
|
||||
the hardware and forced offline.
|
||||
|
||||
The driver should allocate and attach to its struct device *ONE* instance of
|
||||
the rfkill class (there is only one transmitter).
|
||||
|
||||
It can implement the get_state() hook, and return RFKILL_STATE_HARD_BLOCKED if
|
||||
either one of its two hard rfkill input lines are active. If the two hard
|
||||
rfkill lines are inactive, it must return RFKILL_STATE_SOFT_BLOCKED if its soft
|
||||
rfkill input line is active. Only if none of the rfkill input lines are
|
||||
active, will it return RFKILL_STATE_UNBLOCKED.
|
||||
|
||||
If it doesn't implement the get_state() hook, it must make sure that its calls
|
||||
to rfkill_force_state() are enough to keep the status always up-to-date, and it
|
||||
must do a rfkill_force_state() on resume from sleep.
|
||||
|
||||
Every time the driver gets a notification from the card that one of its rfkill
|
||||
lines changed state (polling might be needed on badly designed cards that don't
|
||||
generate interrupts for such events), it recomputes the rfkill state as per
|
||||
above, and calls rfkill_force_state() to update it.
|
||||
|
||||
The driver should implement the toggle_radio() hook, that:
|
||||
|
||||
1. Returns an error if one of the hardware rfkill lines are active, and the
|
||||
caller asked for RFKILL_STATE_UNBLOCKED.
|
||||
|
||||
2. Activates the soft rfkill line if the caller asked for state
|
||||
RFKILL_STATE_SOFT_BLOCKED. It should do this even if one of the hard rfkill
|
||||
lines are active, effectively double-blocking the transmitter.
|
||||
|
||||
3. Deactivates the soft rfkill line if none of the hardware rfkill lines are
|
||||
active and the caller asked for RFKILL_STATE_UNBLOCKED.
|
||||
|
||||
===============================================================================
|
||||
4: Kernel API
|
||||
|
||||
To build a driver with rfkill subsystem support, the driver should depend on
|
||||
(or select) the Kconfig symbol RFKILL; it should _not_ depend on RKFILL_INPUT.
|
||||
|
||||
The hardware the driver talks to may be write-only (where the current state
|
||||
of the hardware is unknown), or read-write (where the hardware can be queried
|
||||
about its current state).
|
||||
|
||||
The rfkill class will call the get_state hook of a device every time it needs
|
||||
to know the *real* current state of the hardware. This can happen often.
|
||||
|
||||
Some hardware provides events when its status changes. In these cases, it is
|
||||
best for the driver to not provide a get_state hook, and instead register the
|
||||
rfkill class *already* with the correct status, and keep it updated using
|
||||
rfkill_force_state() when it gets an event from the hardware.
|
||||
|
||||
There is no provision for a statically-allocated rfkill struct. You must
|
||||
use rfkill_allocate() to allocate one.
|
||||
|
||||
You should:
|
||||
- rfkill_allocate()
|
||||
- modify rfkill fields (flags, name)
|
||||
- modify state to the current hardware state (THIS IS THE ONLY TIME
|
||||
YOU CAN ACCESS state DIRECTLY)
|
||||
- rfkill_register()
|
||||
|
||||
The only way to set a device to the RFKILL_STATE_HARD_BLOCKED state is through
|
||||
a suitable return of get_state() or through rfkill_force_state().
|
||||
|
||||
When a device is in the RFKILL_STATE_HARD_BLOCKED state, the only way to switch
|
||||
it to a different state is through a suitable return of get_state() or through
|
||||
rfkill_force_state().
|
||||
|
||||
If toggle_radio() is called to set a device to state RFKILL_STATE_SOFT_BLOCKED
|
||||
when that device is already at the RFKILL_STATE_HARD_BLOCKED state, it should
|
||||
not return an error. Instead, it should try to double-block the transmitter,
|
||||
so that its state will change from RFKILL_STATE_HARD_BLOCKED to
|
||||
RFKILL_STATE_SOFT_BLOCKED should the hardware blocking cease.
|
||||
|
||||
Please refer to the source for more documentation.
|
||||
|
||||
===============================================================================
|
||||
5: Userspace support
|
||||
|
||||
rfkill devices issue uevents (with an action of "change"), with the following
|
||||
environment variables set:
|
||||
|
||||
RFKILL_NAME
|
||||
RFKILL_STATE
|
||||
RFKILL_TYPE
|
||||
|
||||
The ABI for these variables is defined by the sysfs attributes. It is best
|
||||
to take a quick look at the source to make sure of the possible values.
|
||||
|
||||
It is expected that HAL will trap those, and bridge them to DBUS, etc. These
|
||||
events CAN and SHOULD be used to give feedback to the user about the rfkill
|
||||
status of the system.
|
||||
|
||||
Input devices may issue events that are related to rfkill. These are the
|
||||
various KEY_* events and SW_* events supported by rfkill-input.c.
|
||||
|
||||
******IMPORTANT******
|
||||
When rfkill-input is ACTIVE, userspace is NOT TO CHANGE THE STATE OF AN RFKILL
|
||||
SWITCH IN RESPONSE TO AN INPUT EVENT also handled by rfkill-input, unless it
|
||||
has set to true the user_claim attribute for that particular switch. This rule
|
||||
is *absolute*; do NOT violate it.
|
||||
******IMPORTANT******
|
||||
|
||||
Userspace must not assume it is the only source of control for rfkill switches.
|
||||
Their state CAN and WILL change due to firmware actions, direct user actions,
|
||||
and the rfkill-input EPO override for *_RFKILL_ALL.
|
||||
|
||||
When rfkill-input is not active, userspace must initiate a rfkill status
|
||||
change by writing to the "state" attribute in order for anything to happen.
|
||||
|
||||
Take particular care to implement EV_SW SW_RFKILL_ALL properly. When that
|
||||
switch is set to OFF, *every* rfkill device *MUST* be immediately put into the
|
||||
RFKILL_STATE_SOFT_BLOCKED state, no questions asked.
|
||||
|
||||
The following sysfs entries will be created:
|
||||
|
||||
name: Name assigned by driver to this key (interface or driver name).
|
||||
type: Name of the key type ("wlan", "bluetooth", etc).
|
||||
state: Current state of the key. 1: On, 0: Off.
|
||||
state: Current state of the transmitter
|
||||
0: RFKILL_STATE_SOFT_BLOCKED
|
||||
transmitter is forced off, but one can override it
|
||||
by a write to the state attribute;
|
||||
1: RFKILL_STATE_UNBLOCKED
|
||||
transmiter is NOT forced off, and may operate if
|
||||
all other conditions for such operation are met
|
||||
(such as interface is up and configured, etc);
|
||||
2: RFKILL_STATE_HARD_BLOCKED
|
||||
transmitter is forced off by something outside of
|
||||
the driver's control. One cannot set a device to
|
||||
this state through writes to the state attribute;
|
||||
claim: 1: Userspace handles events, 0: Kernel handles events
|
||||
|
||||
Both the "state" and "claim" entries are also writable. For the "state" entry
|
||||
this means that when 1 or 0 is written all radios, not yet in the requested
|
||||
state, will be will be toggled accordingly.
|
||||
this means that when 1 or 0 is written, the device rfkill state (if not yet in
|
||||
the requested state), will be will be toggled accordingly.
|
||||
|
||||
For the "claim" entry writing 1 to it means that the kernel no longer handles
|
||||
key events even though RFKILL_INPUT input was enabled. When "claim" has been
|
||||
set to 0, userspace should make sure that it listens for the input events or
|
||||
check the sysfs "state" entry regularly to correctly perform the required
|
||||
tasks when the rkfill key is pressed.
|
||||
check the sysfs "state" entry regularly to correctly perform the required tasks
|
||||
when the rkfill key is pressed.
|
||||
|
||||
A note about input devices and EV_SW events:
|
||||
|
||||
In order to know the current state of an input device switch (like
|
||||
SW_RFKILL_ALL), you will need to use an IOCTL. That information is not
|
||||
available through sysfs in a generic way at this time, and it is not available
|
||||
through the rfkill class AT ALL.
|
||||
|
@ -186,6 +186,17 @@ hardware.
|
||||
Locking: port_sem taken.
|
||||
Interrupts: caller dependent.
|
||||
|
||||
flush_buffer(port)
|
||||
Flush any write buffers, reset any DMA state and stop any
|
||||
ongoing DMA transfers.
|
||||
|
||||
This will be called whenever the port->info->xmit circular
|
||||
buffer is cleared.
|
||||
|
||||
Locking: port->lock taken.
|
||||
Interrupts: locally disabled.
|
||||
This call must not sleep
|
||||
|
||||
set_termios(port,termios,oldtermios)
|
||||
Change the port parameters, including word length, parity, stop
|
||||
bits. Update read_status_mask and ignore_status_mask to indicate
|
||||
|
@ -42,7 +42,7 @@
|
||||
<sect1><title>Device Components</title>
|
||||
!Esound/core/device.c
|
||||
</sect1>
|
||||
<sect1><title>KMOD and Device File Entries</title>
|
||||
<sect1><title>Module requests and Device File Entries</title>
|
||||
!Esound/core/sound.c
|
||||
</sect1>
|
||||
<sect1><title>Memory Management Helpers</title>
|
||||
|
@ -270,8 +270,8 @@ The pinout of the connectors on the IO8+ is:
|
||||
Hardware handshaking issues.
|
||||
============================
|
||||
|
||||
The driver can be compiled in two different ways. The default
|
||||
("Specialix DTR/RTS pin is RTS" is off) the pin behaves as DTR when
|
||||
The driver can be told to operate in two different ways. The default
|
||||
behaviour is specialix.sx_rtscts = 0 where the pin behaves as DTR when
|
||||
hardware handshaking is off. It behaves as the RTS hardware
|
||||
handshaking signal when hardware handshaking is selected.
|
||||
|
||||
@ -280,7 +280,7 @@ cable will either be compatible with hardware handshaking or with
|
||||
software handshaking. So switching on the fly is not really an
|
||||
option.
|
||||
|
||||
I actually prefer to use the "Specialix DTR/RTS pin is RTS" option.
|
||||
I actually prefer to use the "specialix.sx_rtscts=1" option.
|
||||
This makes the DTR/RTS pin always an RTS pin, and ioctls to
|
||||
change DTR are always ignored. I have a cable that is configured
|
||||
for this.
|
||||
@ -379,7 +379,5 @@ it doesn't fit in your computer, bring back the card.
|
||||
You have to WRITE to the address register to even
|
||||
read-probe a CD186x register. Disable autodetection?
|
||||
-- Specialix: any suggestions?
|
||||
- Arbitrary baud rates are not implemented yet.
|
||||
If you need this, bug me about it.
|
||||
|
||||
|
||||
|
@ -3,9 +3,8 @@ Rules on how to access information in the Linux kernel sysfs
|
||||
The kernel-exported sysfs exports internal kernel implementation details
|
||||
and depends on internal kernel structures and layout. It is agreed upon
|
||||
by the kernel developers that the Linux kernel does not provide a stable
|
||||
internal API. As sysfs is a direct export of kernel internal
|
||||
structures, the sysfs interface cannot provide a stable interface either;
|
||||
it may always change along with internal kernel changes.
|
||||
internal API. Therefore, there are aspects of the sysfs interface that
|
||||
may not be stable across kernel releases.
|
||||
|
||||
To minimize the risk of breaking users of sysfs, which are in most cases
|
||||
low-level userspace applications, with a new kernel release, the users
|
||||
|
@ -305,21 +305,14 @@ driver, like this:
|
||||
|
||||
which will result in the needed drivers getting loaded automatically.
|
||||
|
||||
g. if you are planning on using kerneld to automatically load the
|
||||
module for you, then you need to edit /etc/conf.modules and add the
|
||||
g. if you are planning on having the kernel automatically request
|
||||
the module for you, then you need to edit /etc/conf.modules and add the
|
||||
following lines:
|
||||
|
||||
options ixj dspio=0x340 xio=0x330 ixjdebug=0
|
||||
|
||||
If you do this, then when you execute an application that uses the
|
||||
module kerneld will load the module for you. Note that to do this,
|
||||
you need to have your kernel set to support kerneld. You can check
|
||||
for this by looking at /usr/src/linux/.config and you should see this:
|
||||
|
||||
# Loadable module support
|
||||
#
|
||||
<snip>
|
||||
CONFIG_KMOD=y
|
||||
module the kernel will request that it is loaded.
|
||||
|
||||
h. if you want non-root users to be able to read and write to the
|
||||
ixj devices (this is a good idea!) you should do the following:
|
||||
|
@ -1,6 +1,7 @@
|
||||
|
||||
Linux Gadget Serial Driver v2.0
|
||||
11/20/2004
|
||||
(updated 8-May-2008 for v2.3)
|
||||
|
||||
|
||||
License and Disclaimer
|
||||
@ -31,7 +32,7 @@ Prerequisites
|
||||
-------------
|
||||
Versions of the gadget serial driver are available for the
|
||||
2.4 Linux kernels, but this document assumes you are using
|
||||
version 2.0 or later of the gadget serial driver in a 2.6
|
||||
version 2.3 or later of the gadget serial driver in a 2.6
|
||||
Linux kernel.
|
||||
|
||||
This document assumes that you are familiar with Linux and
|
||||
@ -40,6 +41,12 @@ standard utilities, use minicom and HyperTerminal, and work with
|
||||
USB and serial devices. It also assumes you configure the Linux
|
||||
gadget and usb drivers as modules.
|
||||
|
||||
With version 2.3 of the driver, major and minor device nodes are
|
||||
no longer statically defined. Your Linux based system should mount
|
||||
sysfs in /sys, and use "mdev" (in Busybox) or "udev" to make the
|
||||
/dev nodes matching the sysfs /sys/class/tty files.
|
||||
|
||||
|
||||
|
||||
Overview
|
||||
--------
|
||||
@ -104,15 +111,8 @@ driver. All this are listed under "USB Gadget Support" when
|
||||
configuring the kernel. Then rebuild and install the kernel or
|
||||
modules.
|
||||
|
||||
The gadget serial driver uses major number 127, for now. So you
|
||||
will need to create a device node for it, like this:
|
||||
|
||||
mknod /dev/ttygserial c 127 0
|
||||
|
||||
You only need to do this once.
|
||||
|
||||
Then you must load the gadget serial driver. To load it as an
|
||||
ACM device, do this:
|
||||
ACM device (recommended for interoperability), do this:
|
||||
|
||||
modprobe g_serial use_acm=1
|
||||
|
||||
@ -125,6 +125,23 @@ controller driver. This must be done each time you reboot the gadget
|
||||
side Linux system. You can add this to the start up scripts, if
|
||||
desired.
|
||||
|
||||
Your system should use mdev (from busybox) or udev to make the
|
||||
device nodes. After this gadget driver has been set up you should
|
||||
then see a /dev/ttyGS0 node:
|
||||
|
||||
# ls -l /dev/ttyGS0 | cat
|
||||
crw-rw---- 1 root root 253, 0 May 8 14:10 /dev/ttyGS0
|
||||
#
|
||||
|
||||
Note that the major number (253, above) is system-specific. If
|
||||
you need to create /dev nodes by hand, the right numbers to use
|
||||
will be in the /sys/class/tty/ttyGS0/dev file.
|
||||
|
||||
When you link this gadget driver early, perhaps even statically,
|
||||
you may want to set up an /etc/inittab entry to run "getty" on it.
|
||||
The /dev/ttyGS0 line should work like most any other serial port.
|
||||
|
||||
|
||||
If gadget serial is loaded as an ACM device you will want to use
|
||||
either the Windows or Linux ACM driver on the host side. If gadget
|
||||
serial is loaded as a bulk in/out device, you will want to use the
|
||||
|
@ -81,8 +81,11 @@ re-enumeration shows that the device now attached to that port has the
|
||||
same descriptors as before, including the Vendor and Product IDs, then
|
||||
the kernel continues to use the same device structure. In effect, the
|
||||
kernel treats the device as though it had merely been reset instead of
|
||||
unplugged. The same thing happens if the host controller is in the
|
||||
expected state but a USB device was unplugged and then replugged.
|
||||
unplugged.
|
||||
|
||||
The same thing happens if the host controller is in the expected state
|
||||
but a USB device was unplugged and then replugged, or if a USB device
|
||||
fails to carry out a normal resume.
|
||||
|
||||
If no device is now attached to the port, or if the descriptors are
|
||||
different from what the kernel remembers, then the treatment is what
|
||||
|
@ -1,165 +0,0 @@
|
||||
Specification and Internals for the New UHCI Driver (Whitepaper...)
|
||||
|
||||
brought to you by
|
||||
|
||||
Georg Acher, acher@in.tum.de (executive slave) (base guitar)
|
||||
Deti Fliegl, deti@fliegl.de (executive slave) (lead voice)
|
||||
Thomas Sailer, sailer@ife.ee.ethz.ch (chief consultant) (cheer leader)
|
||||
|
||||
$Id: README.uhci,v 1.1 1999/12/14 14:03:02 fliegl Exp $
|
||||
|
||||
This document and the new uhci sources can be found on
|
||||
http://hotswap.in.tum.de/usb
|
||||
|
||||
1. General issues
|
||||
|
||||
1.1 Why a new UHCI driver, we already have one?!?
|
||||
|
||||
Correct, but its internal structure got more and more mixed up by the (still
|
||||
ongoing) efforts to get isochronous transfers (ISO) to work.
|
||||
Since there is an increasing need for reliable ISO-transfers (especially
|
||||
for USB-audio needed by TS and for a DAB-USB-Receiver build by GA and DF),
|
||||
this state was a bit unsatisfying in our opinion, so we've decided (based
|
||||
on knowledge and experiences with the old UHCI driver) to start
|
||||
from scratch with a new approach, much simpler but at the same time more
|
||||
powerful.
|
||||
It is inspired by the way Win98/Win2000 handles USB requests via URBs,
|
||||
but it's definitely 100% free of MS-code and doesn't crash while
|
||||
unplugging an used ISO-device like Win98 ;-)
|
||||
Some code for HW setup and root hub management was taken from the
|
||||
original UHCI driver, but heavily modified to fit into the new code.
|
||||
The invention of the basic concept, and major coding were completed in two
|
||||
days (and nights) on the 16th and 17th of October 1999, now known as the
|
||||
great USB-October-Revolution started by GA, DF, and TS ;-)
|
||||
|
||||
Since the concept is in no way UHCI dependent, we hope that it will also be
|
||||
transferred to the OHCI-driver, so both drivers share a common API.
|
||||
|
||||
1.2. Advantages and disadvantages
|
||||
|
||||
+ All USB transfer types work now!
|
||||
+ Asynchronous operation
|
||||
+ Simple, but powerful interface (only two calls for start and cancel)
|
||||
+ Easy migration to the new API, simplified by a compatibility API
|
||||
+ Simple usage of ISO transfers
|
||||
+ Automatic linking of requests
|
||||
+ ISO transfers allow variable length for each frame and striping
|
||||
+ No CPU dependent and non-portable atomic memory access, no asm()-inlines
|
||||
+ Tested on x86 and Alpha
|
||||
|
||||
- Rewriting for ISO transfers needed
|
||||
|
||||
1.3. Is there some compatibility to the old API?
|
||||
|
||||
Yes, but only for control, bulk and interrupt transfers. We've implemented
|
||||
some wrapper calls for these transfer types. The usbcore works fine with
|
||||
these wrappers. For ISO there's no compatibility, because the old ISO-API
|
||||
and its semantics were unnecessary complicated in our opinion.
|
||||
|
||||
1.4. What's really working?
|
||||
|
||||
As said above, CTRL and BULK already work fine even with the wrappers,
|
||||
so legacy code wouldn't notice the change.
|
||||
Regarding to Thomas, ISO transfers now run stable with USB audio.
|
||||
INT transfers (e.g. mouse driver) work fine, too.
|
||||
|
||||
1.5. Are there any bugs?
|
||||
|
||||
No ;-)
|
||||
Hm...
|
||||
Well, of course this implementation needs extensive testing on all available
|
||||
hardware, but we believe that any fixes shouldn't harm the overall concept.
|
||||
|
||||
1.6. What should be done next?
|
||||
|
||||
A large part of the request handling seems to be identical for UHCI and
|
||||
OHCI, so it would be a good idea to extract the common parts and have only
|
||||
the HW specific stuff in uhci.c. Furthermore, all other USB device drivers
|
||||
should need URBification, if they use isochronous or interrupt transfers.
|
||||
One thing missing in the current implementation (and the old UHCI driver)
|
||||
is fair queueing for BULK transfers. Since this would need (in principle)
|
||||
the alteration of already constructed TD chains (to switch from depth to
|
||||
breadth execution), another way has to be found. Maybe some simple
|
||||
heuristics work with the same effect.
|
||||
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
2. Internal structure and mechanisms
|
||||
|
||||
To get quickly familiar with the internal structures, here's a short
|
||||
description how the new UHCI driver works. However, the ultimate source of
|
||||
truth is only uhci.c!
|
||||
|
||||
2.1. Descriptor structure (QHs and TDs)
|
||||
|
||||
During initialization, the following skeleton is allocated in init_skel:
|
||||
|
||||
framespecific | common chain
|
||||
|
||||
framelist[]
|
||||
[ 0 ]-----> TD --> TD -------\
|
||||
[ 1 ]-----> TD --> TD --------> TD ----> QH -------> QH -------> QH ---> NULL
|
||||
... TD --> TD -------/
|
||||
[1023]-----> TD --> TD ------/
|
||||
|
||||
^^ ^^ ^^ ^^ ^^ ^^
|
||||
1024 TDs for 7 TDs for 1 TD for Start of Start of End Chain
|
||||
ISO INT (2-128ms) 1ms-INT CTRL Chain BULK Chain
|
||||
|
||||
For each CTRL or BULK transfer a new QH is allocated and the containing data
|
||||
transfers are appended as (vertical) TDs. After building the whole QH with its
|
||||
dangling TDs, the QH is inserted before the BULK Chain QH (for CTRL) or
|
||||
before the End Chain QH (for BULK). Since only the QH->next pointers are
|
||||
affected, no atomic memory operation is required. The three QHs in the
|
||||
common chain are never equipped with TDs!
|
||||
|
||||
For ISO or INT, the TD for each frame is simply inserted into the appropriate
|
||||
ISO/INT-TD-chain for the desired frame. The 7 skeleton INT-TDs are scattered
|
||||
among the 1024 frames similar to the old UHCI driver.
|
||||
|
||||
For CTRL/BULK/ISO, the last TD in the transfer has the IOC-bit set. For INT,
|
||||
every TD (there is only one...) has the IOC-bit set.
|
||||
|
||||
Besides the data for the UHCI controller (2 or 4 32bit words), the descriptors
|
||||
are double-linked through the .vertical and .horizontal elements in the
|
||||
SW data of the descriptor (using the double-linked list structures and
|
||||
operations), but SW-linking occurs only in closed domains, i.e. for each of
|
||||
the 1024 ISO-chains and the 8 INT-chains there is a closed cycle. This
|
||||
simplifies all insertions and unlinking operations and avoids costly
|
||||
bus_to_virt()-calls.
|
||||
|
||||
2.2. URB structure and linking to QH/TDs
|
||||
|
||||
During assembly of the QH and TDs of the requested action, these descriptors
|
||||
are stored in urb->urb_list, so the allocated QH/TD descriptors are bound to
|
||||
this URB.
|
||||
If the assembly was successful and the descriptors were added to the HW chain,
|
||||
the corresponding URB is inserted into a global URB list for this controller.
|
||||
This list stores all pending URBs.
|
||||
|
||||
2.3. Interrupt processing
|
||||
|
||||
Since UHCI provides no means to directly detect completed transactions, the
|
||||
following is done in each UHCI interrupt (uhci_interrupt()):
|
||||
|
||||
For each URB in the pending queue (process_urb()), the ACTIVE-flag of the
|
||||
associated TDs are processed (depending on the transfer type
|
||||
process_{transfer|interrupt|iso}()). If the TDs are not active anymore,
|
||||
they indicate the completion of the transaction and the status is calculated.
|
||||
Inactive QH/TDs are removed from the HW chain (since the host controller
|
||||
already removed the TDs from the QH, no atomic access is needed) and
|
||||
eventually the URB is marked as completed (OK or errors) and removed from the
|
||||
pending queue. Then the next linked URB is submitted. After (or immediately
|
||||
before) that, the completion handler is called.
|
||||
|
||||
2.4. Unlinking URBs
|
||||
|
||||
First, all QH/TDs stored in the URB are unlinked from the HW chain.
|
||||
To ensure that the host controller really left a vertical TD chain, we
|
||||
wait for one frame. After that, the TDs are physically destroyed.
|
||||
|
||||
2.5. URB linking and the consequences
|
||||
|
||||
Since URBs can be linked and the corresponding submit_urb is called in
|
||||
the UHCI-interrupt, all work associated with URB/QH/TD assembly has to be
|
||||
interrupt save. This forces kmalloc to use GFP_ATOMIC in the interrupt.
|
@ -8,3 +8,4 @@
|
||||
7 -> Hauppauge WinTV-HVR1200 [0070:71d1,0070:71d3]
|
||||
8 -> Hauppauge WinTV-HVR1700 [0070:8101]
|
||||
9 -> Hauppauge WinTV-HVR1400 [0070:8010]
|
||||
10 -> DViCO FusionHDTV7 Dual Express [18ac:d618]
|
||||
|
@ -8,10 +8,13 @@
|
||||
7 -> Leadtek Winfast USB II (em2800)
|
||||
8 -> Kworld USB2800 (em2800)
|
||||
9 -> Pinnacle Dazzle DVC 90/DVC 100 (em2820/em2840) [2304:0207,2304:021a]
|
||||
10 -> Hauppauge WinTV HVR 900 (em2880) [2040:6500,2040:6502]
|
||||
10 -> Hauppauge WinTV HVR 900 (em2880) [2040:6500]
|
||||
11 -> Terratec Hybrid XS (em2880) [0ccd:0042]
|
||||
12 -> Kworld PVR TV 2800 RF (em2820/em2840)
|
||||
13 -> Terratec Prodigy XS (em2880) [0ccd:0047]
|
||||
14 -> Pixelview Prolink PlayTV USB 2.0 (em2820/em2840)
|
||||
15 -> V-Gear PocketTV (em2800)
|
||||
16 -> Hauppauge WinTV HVR 950 (em2880) [2040:6513,2040:6517,2040:651b,2040:651f]
|
||||
17 -> Pinnacle PCTV HD Pro Stick (em2880) [2304:0227]
|
||||
18 -> Hauppauge WinTV HVR 900 (R2) (em2880) [2040:6502]
|
||||
19 -> PointNix Intra-Oral Camera (em2860)
|
||||
|
@ -37,7 +37,7 @@
|
||||
36 -> UPMOST PURPLE TV [12ab:0800]
|
||||
37 -> Items MuchTV Plus / IT-005
|
||||
38 -> Terratec Cinergy 200 TV [153b:1152]
|
||||
39 -> LifeView FlyTV Platinum Mini [5168:0212,4e42:0212]
|
||||
39 -> LifeView FlyTV Platinum Mini [5168:0212,4e42:0212,5169:1502]
|
||||
40 -> Compro VideoMate TV PVR/FM [185b:c100]
|
||||
41 -> Compro VideoMate TV Gold+ [185b:c100]
|
||||
42 -> Sabrent SBT-TVFM (saa7130)
|
||||
@ -128,7 +128,7 @@
|
||||
127 -> Beholder BeholdTV 507 FM/RDS / BeholdTV 509 FM [0000:5071,0000:507B,5ace:5070,5ace:5090]
|
||||
128 -> Beholder BeholdTV Columbus TVFM [0000:5201]
|
||||
129 -> Beholder BeholdTV 607 / BeholdTV 609 [5ace:6070,5ace:6071,5ace:6072,5ace:6073,5ace:6090,5ace:6091,5ace:6092,5ace:6093]
|
||||
130 -> Beholder BeholdTV M6 / BeholdTV M6 Extra [5ace:6190,5ace:6193,5ace:6191]
|
||||
130 -> Beholder BeholdTV M6 [5ace:6190]
|
||||
131 -> Twinhan Hybrid DTV-DVB 3056 PCI [1822:0022]
|
||||
132 -> Genius TVGO AM11MCE
|
||||
133 -> NXP Snake DVB-S reference design
|
||||
@ -141,3 +141,7 @@
|
||||
140 -> Avermedia DVB-S Pro A700 [1461:a7a1]
|
||||
141 -> Avermedia DVB-S Hybrid+FM A700 [1461:a7a2]
|
||||
142 -> Beholder BeholdTV H6 [5ace:6290]
|
||||
143 -> Beholder BeholdTV M63 [5ace:6191]
|
||||
144 -> Beholder BeholdTV M6 Extra [5ace:6193]
|
||||
145 -> AVerMedia MiniPCI DVB-T Hybrid M103 [1461:f636]
|
||||
146 -> ASUSTeK P7131 Analog
|
||||
|
@ -1,36 +1,30 @@
|
||||
Some notes regarding the cx18 driver for the Conexant CX23418 MPEG
|
||||
encoder chip:
|
||||
|
||||
1) The only hardware currently supported is the Hauppauge HVR-1600
|
||||
card and the Compro VideoMate H900 (note that this card only
|
||||
supports analog input, it has no digital tuner!).
|
||||
1) Currently supported are:
|
||||
|
||||
2) Some people have problems getting the i2c bus to work. Cause unknown.
|
||||
- Hauppauge HVR-1600
|
||||
- Compro VideoMate H900
|
||||
- Yuan MPC718
|
||||
- Conexant Raptor PAL/SECAM devkit
|
||||
|
||||
2) Some people have problems getting the i2c bus to work.
|
||||
The symptom is that the eeprom cannot be read and the card is
|
||||
unusable.
|
||||
unusable. This is probably fixed, but if you have problems
|
||||
then post to the video4linux or ivtv-users mailinglist.
|
||||
|
||||
3) The audio from the analog tuner is mono only. Probably caused by
|
||||
incorrect audio register information in the datasheet. We are
|
||||
waiting for updated information from Conexant.
|
||||
3) VBI (raw or sliced) has not yet been implemented.
|
||||
|
||||
4) VBI (raw or sliced) has not yet been implemented.
|
||||
4) MPEG indexing is not yet implemented.
|
||||
|
||||
5) MPEG indexing is not yet implemented.
|
||||
|
||||
6) The driver is still a bit rough around the edges, this should
|
||||
5) The driver is still a bit rough around the edges, this should
|
||||
improve over time.
|
||||
|
||||
|
||||
Firmware:
|
||||
|
||||
The firmware needs to be extracted from the Windows Hauppauge HVR-1600
|
||||
driver, available here:
|
||||
You can obtain the firmware files here:
|
||||
|
||||
http://hauppauge.lightpath.net/software/install_cd/hauppauge_cd_3.4d1.zip
|
||||
http://dl.ivtvdriver.org/ivtv/firmware/cx18-firmware.tar.gz
|
||||
|
||||
Unzip, then copy the following files to the firmware directory
|
||||
and rename them as follows:
|
||||
|
||||
Drivers/Driver18/hcw18apu.rom -> v4l-cx23418-apu.fw
|
||||
Drivers/Driver18/hcw18enc.rom -> v4l-cx23418-cpu.fw
|
||||
Drivers/Driver18/hcw18mlC.rom -> v4l-cx23418-dig.fw
|
||||
Untar and copy the .fw files to your firmware directory.
|
||||
|
243
Documentation/video4linux/gspca.txt
Normal file
243
Documentation/video4linux/gspca.txt
Normal file
@ -0,0 +1,243 @@
|
||||
List of the webcams know by gspca.
|
||||
|
||||
The modules are:
|
||||
gspca_main main driver
|
||||
gspca_xxxx subdriver module with xxxx as follows
|
||||
|
||||
xxxx vend:prod
|
||||
----
|
||||
spca501 0000:0000 MystFromOri Unknow Camera
|
||||
spca501 040a:0002 Kodak DVC-325
|
||||
spca500 040a:0300 Kodak EZ200
|
||||
zc3xx 041e:041e Creative WebCam Live!
|
||||
spca500 041e:400a Creative PC-CAM 300
|
||||
sunplus 041e:400b Creative PC-CAM 600
|
||||
sunplus 041e:4012 PC-Cam350
|
||||
sunplus 041e:4013 Creative Pccam750
|
||||
zc3xx 041e:4017 Creative Webcam Mobile PD1090
|
||||
spca508 041e:4018 Creative Webcam Vista (PD1100)
|
||||
spca561 041e:401a Creative Webcam Vista (PD1100)
|
||||
zc3xx 041e:401c Creative NX
|
||||
spca505 041e:401d Creative Webcam NX ULTRA
|
||||
zc3xx 041e:401e Creative Nx Pro
|
||||
zc3xx 041e:401f Creative Webcam Notebook PD1171
|
||||
pac207 041e:4028 Creative Webcam Vista Plus
|
||||
zc3xx 041e:4029 Creative WebCam Vista Pro
|
||||
zc3xx 041e:4034 Creative Instant P0620
|
||||
zc3xx 041e:4035 Creative Instant P0620D
|
||||
zc3xx 041e:4036 Creative Live !
|
||||
zc3xx 041e:403a Creative Nx Pro 2
|
||||
spca561 041e:403b Creative Webcam Vista (VF0010)
|
||||
zc3xx 041e:4051 Creative Live!Cam Notebook Pro (VF0250)
|
||||
ov519 041e:4052 Creative Live! VISTA IM
|
||||
zc3xx 041e:4053 Creative Live!Cam Video IM
|
||||
ov519 041e:405f Creative Live! VISTA VF0330
|
||||
ov519 041e:4060 Creative Live! VISTA VF0350
|
||||
ov519 041e:4061 Creative Live! VISTA VF0400
|
||||
ov519 041e:4064 Creative Live! VISTA VF0420
|
||||
ov519 041e:4068 Creative Live! VISTA VF0470
|
||||
spca561 0458:7004 Genius VideoCAM Express V2
|
||||
sunplus 0458:7006 Genius Dsc 1.3 Smart
|
||||
zc3xx 0458:7007 Genius VideoCam V2
|
||||
zc3xx 0458:700c Genius VideoCam V3
|
||||
zc3xx 0458:700f Genius VideoCam Web V2
|
||||
sonixj 0458:7025 Genius Eye 311Q
|
||||
sonixj 045e:00f5 MicroSoft VX3000
|
||||
sonixj 045e:00f7 MicroSoft VX1000
|
||||
ov519 045e:028c Micro$oft xbox cam
|
||||
spca508 0461:0815 Micro Innovation IC200
|
||||
sunplus 0461:0821 Fujifilm MV-1
|
||||
zc3xx 0461:0a00 MicroInnovation WebCam320
|
||||
spca500 046d:0890 Logitech QuickCam traveler
|
||||
vc032x 046d:0892 Logitech Orbicam
|
||||
vc032x 046d:0896 Logitech Orbicam
|
||||
zc3xx 046d:08a0 Logitech QC IM
|
||||
zc3xx 046d:08a1 Logitech QC IM 0x08A1 +sound
|
||||
zc3xx 046d:08a2 Labtec Webcam Pro
|
||||
zc3xx 046d:08a3 Logitech QC Chat
|
||||
zc3xx 046d:08a6 Logitech QCim
|
||||
zc3xx 046d:08a7 Logitech QuickCam Image
|
||||
zc3xx 046d:08a9 Logitech Notebook Deluxe
|
||||
zc3xx 046d:08aa Labtec Webcam Notebook
|
||||
zc3xx 046d:08ac Logitech QuickCam Cool
|
||||
zc3xx 046d:08ad Logitech QCCommunicate STX
|
||||
zc3xx 046d:08ae Logitech QuickCam for Notebooks
|
||||
zc3xx 046d:08af Logitech QuickCam Cool
|
||||
zc3xx 046d:08b9 Logitech QC IM ???
|
||||
zc3xx 046d:08d7 Logitech QCam STX
|
||||
zc3xx 046d:08d9 Logitech QuickCam IM/Connect
|
||||
zc3xx 046d:08d8 Logitech Notebook Deluxe
|
||||
zc3xx 046d:08da Logitech QuickCam Messenger
|
||||
zc3xx 046d:08dd Logitech QuickCam for Notebooks
|
||||
spca500 046d:0900 Logitech Inc. ClickSmart 310
|
||||
spca500 046d:0901 Logitech Inc. ClickSmart 510
|
||||
sunplus 046d:0905 Logitech ClickSmart 820
|
||||
tv8532 046d:0920 QC Express
|
||||
tv8532 046d:0921 Labtec Webcam
|
||||
spca561 046d:0928 Logitech QC Express Etch2
|
||||
spca561 046d:0929 Labtec Webcam Elch2
|
||||
spca561 046d:092a Logitech QC for Notebook
|
||||
spca561 046d:092b Labtec Webcam Plus
|
||||
spca561 046d:092c Logitech QC chat Elch2
|
||||
spca561 046d:092d Logitech QC Elch2
|
||||
spca561 046d:092e Logitech QC Elch2
|
||||
spca561 046d:092f Logitech QC Elch2
|
||||
sunplus 046d:0960 Logitech ClickSmart 420
|
||||
sunplus 0471:0322 Philips DMVC1300K
|
||||
zc3xx 0471:0325 Philips SPC 200 NC
|
||||
zc3xx 0471:0326 Philips SPC 300 NC
|
||||
sonixj 0471:0327 Philips SPC 600 NC
|
||||
sonixj 0471:0328 Philips SPC 700 NC
|
||||
zc3xx 0471:032d Philips spc210nc
|
||||
zc3xx 0471:032e Philips spc315nc
|
||||
sonixj 0471:0330 Philips SPC 710NC
|
||||
spca501 0497:c001 Smile International
|
||||
sunplus 04a5:3003 Benq DC 1300
|
||||
sunplus 04a5:3008 Benq DC 1500
|
||||
sunplus 04a5:300a Benq DC3410
|
||||
spca500 04a5:300c Benq DC1016
|
||||
sunplus 04f1:1001 JVC GC A50
|
||||
spca561 04fc:0561 Flexcam 100
|
||||
sunplus 04fc:500c Sunplus CA500C
|
||||
sunplus 04fc:504a Aiptek Mini PenCam 1.3
|
||||
sunplus 04fc:504b Maxell MaxPocket LE 1.3
|
||||
sunplus 04fc:5330 Digitrex 2110
|
||||
sunplus 04fc:5360 Sunplus Generic
|
||||
spca500 04fc:7333 PalmPixDC85
|
||||
sunplus 04fc:ffff Pure DigitalDakota
|
||||
spca501 0506:00df 3Com HomeConnect Lite
|
||||
sunplus 052b:1513 Megapix V4
|
||||
tv8532 0545:808b Veo Stingray
|
||||
tv8532 0545:8333 Veo Stingray
|
||||
sunplus 0546:3155 Polaroid PDC3070
|
||||
sunplus 0546:3191 Polaroid Ion 80
|
||||
sunplus 0546:3273 Polaroid PDC2030
|
||||
ov519 054c:0154 Sonny toy4
|
||||
ov519 054c:0155 Sonny toy5
|
||||
zc3xx 055f:c005 Mustek Wcam300A
|
||||
spca500 055f:c200 Mustek Gsmart 300
|
||||
sunplus 055f:c211 Kowa Bs888e Microcamera
|
||||
spca500 055f:c220 Gsmart Mini
|
||||
sunplus 055f:c230 Mustek Digicam 330K
|
||||
sunplus 055f:c232 Mustek MDC3500
|
||||
sunplus 055f:c360 Mustek DV4000 Mpeg4
|
||||
sunplus 055f:c420 Mustek gSmart Mini 2
|
||||
sunplus 055f:c430 Mustek Gsmart LCD 2
|
||||
sunplus 055f:c440 Mustek DV 3000
|
||||
sunplus 055f:c520 Mustek gSmart Mini 3
|
||||
sunplus 055f:c530 Mustek Gsmart LCD 3
|
||||
sunplus 055f:c540 Gsmart D30
|
||||
sunplus 055f:c630 Mustek MDC4000
|
||||
sunplus 055f:c650 Mustek MDC5500Z
|
||||
zc3xx 055f:d003 Mustek WCam300A
|
||||
zc3xx 055f:d004 Mustek WCam300 AN
|
||||
conex 0572:0041 Creative Notebook cx11646
|
||||
ov519 05a9:0519 OmniVision
|
||||
ov519 05a9:0530 OmniVision
|
||||
ov519 05a9:4519 OmniVision
|
||||
ov519 05a9:8519 OmniVision
|
||||
sunplus 05da:1018 Digital Dream Enigma 1.3
|
||||
stk014 05e1:0893 Syntek DV4000
|
||||
spca561 060b:a001 Maxell Compact Pc PM3
|
||||
zc3xx 0698:2003 CTX M730V built in
|
||||
spca500 06bd:0404 Agfa CL20
|
||||
spca500 06be:0800 Optimedia
|
||||
sunplus 06d6:0031 Trust 610 LCD PowerC@m Zoom
|
||||
spca506 06e1:a190 ADS Instant VCD
|
||||
spca508 0733:0110 ViewQuest VQ110
|
||||
spca508 0130:0130 Clone Digital Webcam 11043
|
||||
spca501 0733:0401 Intel Create and Share
|
||||
spca501 0733:0402 ViewQuest M318B
|
||||
spca505 0733:0430 Intel PC Camera Pro
|
||||
sunplus 0733:1311 Digital Dream Epsilon 1.3
|
||||
sunplus 0733:1314 Mercury 2.1MEG Deluxe Classic Cam
|
||||
sunplus 0733:2211 Jenoptik jdc 21 LCD
|
||||
sunplus 0733:2221 Mercury Digital Pro 3.1p
|
||||
sunplus 0733:3261 Concord 3045 spca536a
|
||||
sunplus 0733:3281 Cyberpix S550V
|
||||
spca506 0734:043b 3DeMon USB Capture aka
|
||||
spca500 084d:0003 D-Link DSC-350
|
||||
spca500 08ca:0103 Aiptek PocketDV
|
||||
sunplus 08ca:0104 Aiptek PocketDVII 1.3
|
||||
sunplus 08ca:0106 Aiptek Pocket DV3100+
|
||||
sunplus 08ca:2008 Aiptek Mini PenCam 2 M
|
||||
sunplus 08ca:2010 Aiptek PocketCam 3M
|
||||
sunplus 08ca:2016 Aiptek PocketCam 2 Mega
|
||||
sunplus 08ca:2018 Aiptek Pencam SD 2M
|
||||
sunplus 08ca:2020 Aiptek Slim 3000F
|
||||
sunplus 08ca:2022 Aiptek Slim 3200
|
||||
sunplus 08ca:2024 Aiptek DV3500 Mpeg4
|
||||
sunplus 08ca:2028 Aiptek PocketCam4M
|
||||
sunplus 08ca:2040 Aiptek PocketDV4100M
|
||||
sunplus 08ca:2042 Aiptek PocketDV5100
|
||||
sunplus 08ca:2050 Medion MD 41437
|
||||
sunplus 08ca:2060 Aiptek PocketDV5300
|
||||
tv8532 0923:010f ICM532 cams
|
||||
mars 093a:050f Mars-Semi Pc-Camera
|
||||
pac207 093a:2460 PAC207 Qtec Webcam 100
|
||||
pac207 093a:2463 Philips spc200nc pac207
|
||||
pac207 093a:2464 Labtec Webcam 1200
|
||||
pac207 093a:2468 PAC207
|
||||
pac207 093a:2470 Genius GF112
|
||||
pac207 093a:2471 PAC207 Genius VideoCam ge111
|
||||
pac207 093a:2472 PAC207 Genius VideoCam ge110
|
||||
pac7311 093a:2600 PAC7311 Typhoon
|
||||
pac7311 093a:2601 PAC7311 Phillips SPC610NC
|
||||
pac7311 093a:2603 PAC7312
|
||||
pac7311 093a:2608 PAC7311 Trust WB-3300p
|
||||
pac7311 093a:260e PAC7311 Gigaware VGA PC Camera, Trust WB-3350p, SIGMA cam 2350
|
||||
pac7311 093a:260f PAC7311 SnakeCam
|
||||
pac7311 093a:2621 PAC731x
|
||||
zc3xx 0ac8:0302 Z-star Vimicro zc0302
|
||||
vc032x 0ac8:0321 Vimicro generic vc0321
|
||||
vc032x 0ac8:0323 Vimicro Vc0323
|
||||
vc032x 0ac8:0328 A4Tech PK-130MG
|
||||
zc3xx 0ac8:301b Z-Star zc301b
|
||||
zc3xx 0ac8:303b Vimicro 0x303b
|
||||
zc3xx 0ac8:305b Z-star Vimicro zc0305b
|
||||
zc3xx 0ac8:307b Ldlc VC302+Ov7620
|
||||
vc032x 0ac8:c001 Sony embedded vimicro
|
||||
vc032x 0ac8:c002 Sony embedded vimicro
|
||||
spca508 0af9:0010 Hama USB Sightcam 100
|
||||
spca508 0af9:0011 Hama USB Sightcam 100
|
||||
sonixb 0c45:6001 Genius VideoCAM NB
|
||||
sonixb 0c45:6005 Microdia Sweex Mini Webcam
|
||||
sonixb 0c45:6007 Sonix sn9c101 + Tas5110D
|
||||
sonixb 0c45:6009 spcaCam@120
|
||||
sonixb 0c45:600d spcaCam@120
|
||||
sonixb 0c45:6011 Microdia PC Camera (SN9C102)
|
||||
sonixb 0c45:6019 Generic Sonix OV7630
|
||||
sonixb 0c45:6024 Generic Sonix Tas5130c
|
||||
sonixb 0c45:6025 Xcam Shanga
|
||||
sonixb 0c45:6028 Sonix Btc Pc380
|
||||
sonixb 0c45:6029 spcaCam@150
|
||||
sonixb 0c45:602c Generic Sonix OV7630
|
||||
sonixb 0c45:602d LIC-200 LG
|
||||
sonixb 0c45:602e Genius VideoCam Messenger
|
||||
sonixj 0c45:6040 Speed NVC 350K
|
||||
sonixj 0c45:607c Sonix sn9c102p Hv7131R
|
||||
sonixj 0c45:60c0 Sangha Sn535
|
||||
sonixj 0c45:60ec SN9C105+MO4000
|
||||
sonixj 0c45:60fb Surfer NoName
|
||||
sonixj 0c45:60fc LG-LIC300
|
||||
sonixj 0c45:612a Avant Camera
|
||||
sonixj 0c45:612c Typhoon Rasy Cam 1.3MPix
|
||||
sonixj 0c45:6130 Sonix Pccam
|
||||
sonixj 0c45:6138 Sn9c120 Mo4000
|
||||
sonixj 0c45:613b Surfer SN-206
|
||||
sonixj 0c45:613c Sonix Pccam168
|
||||
sunplus 0d64:0303 Sunplus FashionCam DXG
|
||||
etoms 102c:6151 Qcam Sangha CIF
|
||||
etoms 102c:6251 Qcam xxxxxx VGA
|
||||
zc3xx 10fd:0128 Typhoon Webshot II USB 300k 0x0128
|
||||
spca561 10fd:7e50 FlyCam Usb 100
|
||||
zc3xx 10fd:8050 Typhoon Webshot II USB 300k
|
||||
spca501 1776:501c Arowana 300K CMOS Camera
|
||||
t613 17a1:0128 T613/TAS5130A
|
||||
vc032x 17ef:4802 Lenovo Vc0323+MI1310_SOC
|
||||
pac207 2001:f115 D-Link DSB-C120
|
||||
spca500 2899:012c Toptro Industrial
|
||||
spca508 8086:0110 Intel Easy PC Camera
|
||||
spca500 8086:0630 Intel Pocket PC Camera
|
||||
spca506 99fa:8988 Grandtec V.cap
|
||||
spca561 abcd:cdee Petcam
|
@ -193,9 +193,6 @@ Description: Automatic 'ovcamchip' module loading: 0 disabled, 1 enabled.
|
||||
loads that module automatically. This action is performed as
|
||||
once soon as the 'w9968cf' module is loaded into memory.
|
||||
Default: 1
|
||||
Note: The kernel must be compiled with the CONFIG_KMOD option
|
||||
enabled for the 'ovcamchip' module to be loaded and for
|
||||
this parameter to be present.
|
||||
-------------------------------------------------------------------------------
|
||||
Name: simcams
|
||||
Type: int
|
||||
|
65
MAINTAINERS
65
MAINTAINERS
@ -441,10 +441,7 @@ M: spyro@f2s.com
|
||||
S: Maintained
|
||||
|
||||
ARM PRIMECELL MMCI PL180/1 DRIVER
|
||||
P: Russell King
|
||||
M: rmk@arm.linux.org.uk
|
||||
L: linux-arm-kernel@lists.arm.linux.org.uk (subscribers-only)
|
||||
S: Maintained
|
||||
S: Orphan
|
||||
|
||||
ARM/ADI ROADRUNNER MACHINE SUPPORT
|
||||
P: Lennert Buytenhek
|
||||
@ -483,11 +480,28 @@ M: kernel@wantstofly.org
|
||||
L: linux-arm-kernel@lists.arm.linux.org.uk (subscribers-only)
|
||||
S: Maintained
|
||||
|
||||
ARM/COMPULAB CM-X270/EM-X270 MACHINE SUPPORT
|
||||
P: Mike Rapoport
|
||||
M: mike@compulab.co.il
|
||||
L: linux-arm-kernel@lists.arm.linux.org.uk (subscribers-only)
|
||||
S: Maintained
|
||||
|
||||
ARM/CORGI MACHINE SUPPORT
|
||||
P: Richard Purdie
|
||||
M: rpurdie@rpsys.net
|
||||
S: Maintained
|
||||
|
||||
ARM/EZX SMARTPHONES (A780, A910, A1200, E680, ROKR E2 and ROKR E6)
|
||||
P: Daniel Ribeiro
|
||||
M: drwyrm@gmail.com
|
||||
P: Stefan Schmidt
|
||||
M: stefan@openezx.org
|
||||
P: Harald Welte
|
||||
M: laforge@openezx.org
|
||||
L: openezx-devel@lists.openezx.org (subscribers-only)
|
||||
W: http://www.openezx.org/
|
||||
S: Maintained
|
||||
|
||||
ARM/GLOMATION GESBC9312SX MACHINE SUPPORT
|
||||
P: Lennert Buytenhek
|
||||
M: kernel@wantstofly.org
|
||||
@ -575,10 +589,18 @@ L: linux-arm-kernel@lists.arm.linux.org.uk (subscribers-only)
|
||||
S: Maintained
|
||||
|
||||
ARM/TOSA MACHINE SUPPORT
|
||||
P: Dmitry Baryshkov
|
||||
M: dbaryshkov@gmail.com
|
||||
P: Dirk Opfer
|
||||
M: dirk@opfer-online.de
|
||||
S: Maintained
|
||||
|
||||
ARM/PALMTX SUPPORT
|
||||
P: Marek Vasut
|
||||
M: marek.vasut@gmail.com
|
||||
W: http://hackndev.com
|
||||
S: Maintained
|
||||
|
||||
ARM/PLEB SUPPORT
|
||||
P: Peter Chubb
|
||||
M: pleb@gelato.unsw.edu.au
|
||||
@ -1988,6 +2010,12 @@ M: mikulas@artax.karlin.mff.cuni.cz
|
||||
W: http://artax.karlin.mff.cuni.cz/~mikulas/vyplody/hpfs/index-e.cgi
|
||||
S: Maintained
|
||||
|
||||
HTCPEN TOUCHSCREEN DRIVER
|
||||
P: Pau Oliva Fora
|
||||
M: pof@eslack.org
|
||||
L: linux-input@vger.kernel.org
|
||||
S: Maintained
|
||||
|
||||
HUGETLB FILESYSTEM
|
||||
P: William Irwin
|
||||
M: wli@holomorphy.com
|
||||
@ -2189,6 +2217,8 @@ P: Jesse Brandeburg
|
||||
M: jesse.brandeburg@intel.com
|
||||
P: Bruce Allan
|
||||
M: bruce.w.allan@intel.com
|
||||
P: PJ Waskiewicz
|
||||
M: peter.p.waskiewicz.jr@intel.com
|
||||
P: John Ronciak
|
||||
M: john.ronciak@intel.com
|
||||
L: e1000-devel@lists.sourceforge.net
|
||||
@ -2725,12 +2755,10 @@ L: libertas-dev@lists.infradead.org
|
||||
S: Maintained
|
||||
|
||||
MARVELL MV643XX ETHERNET DRIVER
|
||||
P: Dale Farnsworth
|
||||
M: dale@farnsworth.org
|
||||
P: Manish Lachwani
|
||||
M: mlachwani@mvista.com
|
||||
P: Lennert Buytenhek
|
||||
M: buytenh@marvell.com
|
||||
L: netdev@vger.kernel.org
|
||||
S: Odd Fixes for 2.4; Maintained for 2.6.
|
||||
S: Supported
|
||||
|
||||
MATROX FRAMEBUFFER DRIVER
|
||||
P: Petr Vandrovec
|
||||
@ -3274,14 +3302,6 @@ L: linux-kernel@vger.kernel.org
|
||||
T: git git.infradead.org/battery-2.6.git
|
||||
S: Maintained
|
||||
|
||||
POWERPC 4xx EMAC DRIVER
|
||||
P: Eugene Surovegin
|
||||
M: ebs@ebshome.net
|
||||
W: http://kernel.ebshome.net/emac/
|
||||
L: linuxppc-dev@ozlabs.org
|
||||
L: netdev@vger.kernel.org
|
||||
S: Maintained
|
||||
|
||||
PNP SUPPORT
|
||||
P: Adam Belay
|
||||
M: ambx1@neo.rr.com
|
||||
@ -3535,7 +3555,7 @@ S: Supported
|
||||
|
||||
S390 NETWORK DRIVERS
|
||||
P: Ursula Braun
|
||||
M: ubraun@linux.vnet.ibm.com
|
||||
M: ursula.braun@de.ibm.com
|
||||
P: Frank Blaschka
|
||||
M: blaschka@linux.vnet.ibm.com
|
||||
M: linux390@de.ibm.com
|
||||
@ -3555,7 +3575,7 @@ S: Supported
|
||||
|
||||
S390 IUCV NETWORK LAYER
|
||||
P: Ursula Braun
|
||||
M: ubraun@linux.vnet.ibm.com
|
||||
M: ursula.braun@de.ibm.com
|
||||
M: linux390@de.ibm.com
|
||||
L: linux-s390@vger.kernel.org
|
||||
W: http://www.ibm.com/developerworks/linux/linux390/
|
||||
@ -4049,9 +4069,10 @@ W: http://www.buzzard.org.uk/toshiba/
|
||||
S: Maintained
|
||||
|
||||
TPM DEVICE DRIVER
|
||||
P: Debora Velarde
|
||||
P: Rajiv Andrade
|
||||
M: tpmdd-devel@lists.sourceforge.net
|
||||
P: Debora Velarde
|
||||
M: debora@linux.vnet.ibm.com
|
||||
P: Rajiv Andrade
|
||||
M: srajiv@linux.vnet.ibm.com
|
||||
W: http://tpmdd.sourceforge.net
|
||||
P: Marcel Selhorst
|
||||
M: tpm@selhorst.net
|
||||
|
3
Makefile
3
Makefile
@ -1148,7 +1148,8 @@ clean: archclean $(clean-dirs)
|
||||
@find . $(RCS_FIND_IGNORE) \
|
||||
\( -name '*.[oas]' -o -name '*.ko' -o -name '.*.cmd' \
|
||||
-o -name '.*.d' -o -name '.*.tmp' -o -name '*.mod.c' \
|
||||
-o -name '*.symtypes' -o -name 'modules.order' \) \
|
||||
-o -name '*.symtypes' -o -name 'modules.order' \
|
||||
-o -name 'Module.markers' \) \
|
||||
-type f -print | xargs rm -f
|
||||
|
||||
# mrproper - Delete all generated files, including .config
|
||||
|
@ -12,6 +12,7 @@ config ARM
|
||||
select RTC_LIB
|
||||
select SYS_SUPPORTS_APM_EMULATION
|
||||
select HAVE_OPROFILE
|
||||
select HAVE_ARCH_KGDB
|
||||
select HAVE_KPROBES if (!XIP_KERNEL)
|
||||
select HAVE_KRETPROBES if (HAVE_KPROBES)
|
||||
select HAVE_FTRACE if (!XIP_KERNEL)
|
||||
|
@ -554,9 +554,8 @@ dmabounce_register_dev(struct device *dev, unsigned long small_buffer_size,
|
||||
|
||||
device_info = kmalloc(sizeof(struct dmabounce_device_info), GFP_ATOMIC);
|
||||
if (!device_info) {
|
||||
printk(KERN_ERR
|
||||
"Could not allocated dmabounce_device_info for %s",
|
||||
dev->bus_id);
|
||||
dev_err(dev,
|
||||
"Could not allocated dmabounce_device_info\n");
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
@ -594,8 +593,7 @@ dmabounce_register_dev(struct device *dev, unsigned long small_buffer_size,
|
||||
|
||||
dev->archdata.dmabounce = device_info;
|
||||
|
||||
printk(KERN_INFO "dmabounce: registered device %s on %s bus\n",
|
||||
dev->bus_id, dev->bus->name);
|
||||
dev_info(dev, "dmabounce: registered device\n");
|
||||
|
||||
return 0;
|
||||
|
||||
@ -614,16 +612,15 @@ dmabounce_unregister_dev(struct device *dev)
|
||||
dev->archdata.dmabounce = NULL;
|
||||
|
||||
if (!device_info) {
|
||||
printk(KERN_WARNING
|
||||
"%s: Never registered with dmabounce but attempting" \
|
||||
"to unregister!\n", dev->bus_id);
|
||||
dev_warn(dev,
|
||||
"Never registered with dmabounce but attempting"
|
||||
"to unregister!\n");
|
||||
return;
|
||||
}
|
||||
|
||||
if (!list_empty(&device_info->safe_buffers)) {
|
||||
printk(KERN_ERR
|
||||
"%s: Removing from dmabounce with pending buffers!\n",
|
||||
dev->bus_id);
|
||||
dev_err(dev,
|
||||
"Removing from dmabounce with pending buffers!\n");
|
||||
BUG();
|
||||
}
|
||||
|
||||
@ -639,8 +636,7 @@ dmabounce_unregister_dev(struct device *dev)
|
||||
|
||||
kfree(device_info);
|
||||
|
||||
printk(KERN_INFO "dmabounce: device %s on %s bus unregistered\n",
|
||||
dev->bus_id, dev->bus->name);
|
||||
dev_info(dev, "dmabounce: device unregistered\n");
|
||||
}
|
||||
|
||||
|
||||
|
@ -543,7 +543,6 @@ locomo_init_one_child(struct locomo *lchip, struct locomo_dev_info *info)
|
||||
goto out;
|
||||
}
|
||||
|
||||
strncpy(dev->dev.bus_id, info->name, sizeof(dev->dev.bus_id));
|
||||
/*
|
||||
* If the parent device has a DMA mask associated with it,
|
||||
* propagate it down to the children.
|
||||
@ -553,6 +552,7 @@ locomo_init_one_child(struct locomo *lchip, struct locomo_dev_info *info)
|
||||
dev->dev.dma_mask = &dev->dma_mask;
|
||||
}
|
||||
|
||||
dev_set_name(&dev->dev, "%s", info->name);
|
||||
dev->devid = info->devid;
|
||||
dev->dev.parent = lchip->dev;
|
||||
dev->dev.bus = &locomo_bus_type;
|
||||
|
@ -550,9 +550,7 @@ sa1111_init_one_child(struct sa1111 *sachip, struct resource *parent,
|
||||
goto out;
|
||||
}
|
||||
|
||||
snprintf(dev->dev.bus_id, sizeof(dev->dev.bus_id),
|
||||
"%4.4lx", info->offset);
|
||||
|
||||
dev_set_name(&dev->dev, "%4.4lx", info->offset);
|
||||
dev->devid = info->devid;
|
||||
dev->dev.parent = sachip->dev;
|
||||
dev->dev.bus = &sa1111_bus_type;
|
||||
@ -560,7 +558,7 @@ sa1111_init_one_child(struct sa1111 *sachip, struct resource *parent,
|
||||
dev->dev.coherent_dma_mask = sachip->dev->coherent_dma_mask;
|
||||
dev->res.start = sachip->phys + info->offset;
|
||||
dev->res.end = dev->res.start + 511;
|
||||
dev->res.name = dev->dev.bus_id;
|
||||
dev->res.name = dev_name(&dev->dev);
|
||||
dev->res.flags = IORESOURCE_MEM;
|
||||
dev->mapbase = sachip->base + info->offset;
|
||||
dev->skpcr_mask = info->skpcr_mask;
|
||||
@ -570,6 +568,7 @@ sa1111_init_one_child(struct sa1111 *sachip, struct resource *parent,
|
||||
if (ret) {
|
||||
printk("SA1111: failed to allocate resource for %s\n",
|
||||
dev->res.name);
|
||||
dev_set_name(&dev->dev, NULL);
|
||||
kfree(dev);
|
||||
goto out;
|
||||
}
|
||||
@ -593,7 +592,8 @@ sa1111_init_one_child(struct sa1111 *sachip, struct resource *parent,
|
||||
if (dev->dma_mask != 0xffffffffUL) {
|
||||
ret = dmabounce_register_dev(&dev->dev, 1024, 4096);
|
||||
if (ret) {
|
||||
printk("SA1111: Failed to register %s with dmabounce", dev->dev.bus_id);
|
||||
dev_err(&dev->dev, "SA1111: Failed to register"
|
||||
" with dmabounce\n");
|
||||
device_unregister(&dev->dev);
|
||||
}
|
||||
}
|
||||
@ -627,7 +627,7 @@ __sa1111_probe(struct device *me, struct resource *mem, int irq)
|
||||
if (!sachip)
|
||||
return -ENOMEM;
|
||||
|
||||
sachip->clk = clk_get(me, "GPIO27_CLK");
|
||||
sachip->clk = clk_get(me, "SA1111_CLK");
|
||||
if (!sachip->clk) {
|
||||
ret = PTR_ERR(sachip->clk);
|
||||
goto err_free;
|
||||
|
@ -247,7 +247,7 @@ static int __devinit scoop_probe(struct platform_device *pdev)
|
||||
devptr->gpio.base = -1;
|
||||
|
||||
if (inf->gpio_base != 0) {
|
||||
devptr->gpio.label = pdev->dev.bus_id;
|
||||
devptr->gpio.label = dev_name(&pdev->dev);
|
||||
devptr->gpio.base = inf->gpio_base;
|
||||
devptr->gpio.ngpio = 12; /* PA11 = 0, PA12 = 1, etc. up to PA22 = 11 */
|
||||
devptr->gpio.set = scoop_gpio_set;
|
||||
|
1614
arch/arm/configs/ezx_defconfig
Normal file
1614
arch/arm/configs/ezx_defconfig
Normal file
File diff suppressed because it is too large
Load Diff
@ -28,6 +28,7 @@ obj-$(CONFIG_KPROBES) += kprobes.o kprobes-decode.o
|
||||
obj-$(CONFIG_ATAGS_PROC) += atags.o
|
||||
obj-$(CONFIG_OABI_COMPAT) += sys_oabi-compat.o
|
||||
obj-$(CONFIG_ARM_THUMBEE) += thumbee.o
|
||||
obj-$(CONFIG_KGDB) += kgdb.o
|
||||
|
||||
obj-$(CONFIG_CRUNCH) += crunch.o crunch-bits.o
|
||||
AFLAGS_crunch-bits.o := -Wa,-mcpu=ep9312
|
||||
|
@ -783,7 +783,7 @@ static void ecard_proc_init(void)
|
||||
|
||||
#define ec_set_resource(ec,nr,st,sz) \
|
||||
do { \
|
||||
(ec)->resource[nr].name = ec->dev.bus_id; \
|
||||
(ec)->resource[nr].name = dev_name(&ec->dev); \
|
||||
(ec)->resource[nr].start = st; \
|
||||
(ec)->resource[nr].end = (st) + (sz) - 1; \
|
||||
(ec)->resource[nr].flags = IORESOURCE_MEM; \
|
||||
@ -853,8 +853,7 @@ static struct expansion_card *__init ecard_alloc_card(int type, int slot)
|
||||
for (i = 0; i < ECARD_NUM_RESOURCES; i++) {
|
||||
if (ec->resource[i].flags &&
|
||||
request_resource(&iomem_resource, &ec->resource[i])) {
|
||||
printk(KERN_ERR "%s: resource(s) not available\n",
|
||||
ec->dev.bus_id);
|
||||
dev_err(&ec->dev, "resource(s) not available\n");
|
||||
ec->resource[i].end -= ec->resource[i].start;
|
||||
ec->resource[i].start = 0;
|
||||
ec->resource[i].flags = 0;
|
||||
|
201
arch/arm/kernel/kgdb.c
Normal file
201
arch/arm/kernel/kgdb.c
Normal file
@ -0,0 +1,201 @@
|
||||
/*
|
||||
* arch/arm/kernel/kgdb.c
|
||||
*
|
||||
* ARM KGDB support
|
||||
*
|
||||
* Copyright (c) 2002-2004 MontaVista Software, Inc
|
||||
* Copyright (c) 2008 Wind River Systems, Inc.
|
||||
*
|
||||
* Authors: George Davis <davis_g@mvista.com>
|
||||
* Deepak Saxena <dsaxena@plexity.net>
|
||||
*/
|
||||
#include <linux/kgdb.h>
|
||||
#include <asm/traps.h>
|
||||
|
||||
/* Make a local copy of the registers passed into the handler (bletch) */
|
||||
void pt_regs_to_gdb_regs(unsigned long *gdb_regs, struct pt_regs *kernel_regs)
|
||||
{
|
||||
int regno;
|
||||
|
||||
/* Initialize all to zero. */
|
||||
for (regno = 0; regno < GDB_MAX_REGS; regno++)
|
||||
gdb_regs[regno] = 0;
|
||||
|
||||
gdb_regs[_R0] = kernel_regs->ARM_r0;
|
||||
gdb_regs[_R1] = kernel_regs->ARM_r1;
|
||||
gdb_regs[_R2] = kernel_regs->ARM_r2;
|
||||
gdb_regs[_R3] = kernel_regs->ARM_r3;
|
||||
gdb_regs[_R4] = kernel_regs->ARM_r4;
|
||||
gdb_regs[_R5] = kernel_regs->ARM_r5;
|
||||
gdb_regs[_R6] = kernel_regs->ARM_r6;
|
||||
gdb_regs[_R7] = kernel_regs->ARM_r7;
|
||||
gdb_regs[_R8] = kernel_regs->ARM_r8;
|
||||
gdb_regs[_R9] = kernel_regs->ARM_r9;
|
||||
gdb_regs[_R10] = kernel_regs->ARM_r10;
|
||||
gdb_regs[_FP] = kernel_regs->ARM_fp;
|
||||
gdb_regs[_IP] = kernel_regs->ARM_ip;
|
||||
gdb_regs[_SPT] = kernel_regs->ARM_sp;
|
||||
gdb_regs[_LR] = kernel_regs->ARM_lr;
|
||||
gdb_regs[_PC] = kernel_regs->ARM_pc;
|
||||
gdb_regs[_CPSR] = kernel_regs->ARM_cpsr;
|
||||
}
|
||||
|
||||
/* Copy local gdb registers back to kgdb regs, for later copy to kernel */
|
||||
void gdb_regs_to_pt_regs(unsigned long *gdb_regs, struct pt_regs *kernel_regs)
|
||||
{
|
||||
kernel_regs->ARM_r0 = gdb_regs[_R0];
|
||||
kernel_regs->ARM_r1 = gdb_regs[_R1];
|
||||
kernel_regs->ARM_r2 = gdb_regs[_R2];
|
||||
kernel_regs->ARM_r3 = gdb_regs[_R3];
|
||||
kernel_regs->ARM_r4 = gdb_regs[_R4];
|
||||
kernel_regs->ARM_r5 = gdb_regs[_R5];
|
||||
kernel_regs->ARM_r6 = gdb_regs[_R6];
|
||||
kernel_regs->ARM_r7 = gdb_regs[_R7];
|
||||
kernel_regs->ARM_r8 = gdb_regs[_R8];
|
||||
kernel_regs->ARM_r9 = gdb_regs[_R9];
|
||||
kernel_regs->ARM_r10 = gdb_regs[_R10];
|
||||
kernel_regs->ARM_fp = gdb_regs[_FP];
|
||||
kernel_regs->ARM_ip = gdb_regs[_IP];
|
||||
kernel_regs->ARM_sp = gdb_regs[_SPT];
|
||||
kernel_regs->ARM_lr = gdb_regs[_LR];
|
||||
kernel_regs->ARM_pc = gdb_regs[_PC];
|
||||
kernel_regs->ARM_cpsr = gdb_regs[_CPSR];
|
||||
}
|
||||
|
||||
void
|
||||
sleeping_thread_to_gdb_regs(unsigned long *gdb_regs, struct task_struct *task)
|
||||
{
|
||||
struct pt_regs *thread_regs;
|
||||
int regno;
|
||||
|
||||
/* Just making sure... */
|
||||
if (task == NULL)
|
||||
return;
|
||||
|
||||
/* Initialize to zero */
|
||||
for (regno = 0; regno < GDB_MAX_REGS; regno++)
|
||||
gdb_regs[regno] = 0;
|
||||
|
||||
/* Otherwise, we have only some registers from switch_to() */
|
||||
thread_regs = task_pt_regs(task);
|
||||
gdb_regs[_R0] = thread_regs->ARM_r0;
|
||||
gdb_regs[_R1] = thread_regs->ARM_r1;
|
||||
gdb_regs[_R2] = thread_regs->ARM_r2;
|
||||
gdb_regs[_R3] = thread_regs->ARM_r3;
|
||||
gdb_regs[_R4] = thread_regs->ARM_r4;
|
||||
gdb_regs[_R5] = thread_regs->ARM_r5;
|
||||
gdb_regs[_R6] = thread_regs->ARM_r6;
|
||||
gdb_regs[_R7] = thread_regs->ARM_r7;
|
||||
gdb_regs[_R8] = thread_regs->ARM_r8;
|
||||
gdb_regs[_R9] = thread_regs->ARM_r9;
|
||||
gdb_regs[_R10] = thread_regs->ARM_r10;
|
||||
gdb_regs[_FP] = thread_regs->ARM_fp;
|
||||
gdb_regs[_IP] = thread_regs->ARM_ip;
|
||||
gdb_regs[_SPT] = thread_regs->ARM_sp;
|
||||
gdb_regs[_LR] = thread_regs->ARM_lr;
|
||||
gdb_regs[_PC] = thread_regs->ARM_pc;
|
||||
gdb_regs[_CPSR] = thread_regs->ARM_cpsr;
|
||||
}
|
||||
|
||||
static int compiled_break;
|
||||
|
||||
int kgdb_arch_handle_exception(int exception_vector, int signo,
|
||||
int err_code, char *remcom_in_buffer,
|
||||
char *remcom_out_buffer,
|
||||
struct pt_regs *linux_regs)
|
||||
{
|
||||
unsigned long addr;
|
||||
char *ptr;
|
||||
|
||||
switch (remcom_in_buffer[0]) {
|
||||
case 'D':
|
||||
case 'k':
|
||||
case 'c':
|
||||
kgdb_contthread = NULL;
|
||||
|
||||
/*
|
||||
* Try to read optional parameter, pc unchanged if no parm.
|
||||
* If this was a compiled breakpoint, we need to move
|
||||
* to the next instruction or we will just breakpoint
|
||||
* over and over again.
|
||||
*/
|
||||
ptr = &remcom_in_buffer[1];
|
||||
if (kgdb_hex2long(&ptr, &addr))
|
||||
linux_regs->ARM_pc = addr;
|
||||
else if (compiled_break == 1)
|
||||
linux_regs->ARM_pc += 4;
|
||||
|
||||
compiled_break = 0;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
static int kgdb_brk_fn(struct pt_regs *regs, unsigned int instr)
|
||||
{
|
||||
kgdb_handle_exception(1, SIGTRAP, 0, regs);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int kgdb_compiled_brk_fn(struct pt_regs *regs, unsigned int instr)
|
||||
{
|
||||
compiled_break = 1;
|
||||
kgdb_handle_exception(1, SIGTRAP, 0, regs);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct undef_hook kgdb_brkpt_hook = {
|
||||
.instr_mask = 0xffffffff,
|
||||
.instr_val = KGDB_BREAKINST,
|
||||
.fn = kgdb_brk_fn
|
||||
};
|
||||
|
||||
static struct undef_hook kgdb_compiled_brkpt_hook = {
|
||||
.instr_mask = 0xffffffff,
|
||||
.instr_val = KGDB_COMPILED_BREAK,
|
||||
.fn = kgdb_compiled_brk_fn
|
||||
};
|
||||
|
||||
/**
|
||||
* kgdb_arch_init - Perform any architecture specific initalization.
|
||||
*
|
||||
* This function will handle the initalization of any architecture
|
||||
* specific callbacks.
|
||||
*/
|
||||
int kgdb_arch_init(void)
|
||||
{
|
||||
register_undef_hook(&kgdb_brkpt_hook);
|
||||
register_undef_hook(&kgdb_compiled_brkpt_hook);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* kgdb_arch_exit - Perform any architecture specific uninitalization.
|
||||
*
|
||||
* This function will handle the uninitalization of any architecture
|
||||
* specific callbacks, for dynamic registration and unregistration.
|
||||
*/
|
||||
void kgdb_arch_exit(void)
|
||||
{
|
||||
unregister_undef_hook(&kgdb_brkpt_hook);
|
||||
unregister_undef_hook(&kgdb_compiled_brkpt_hook);
|
||||
}
|
||||
|
||||
/*
|
||||
* Register our undef instruction hooks with ARM undef core.
|
||||
* We regsiter a hook specifically looking for the KGB break inst
|
||||
* and we handle the normal undef case within the do_undefinstr
|
||||
* handler.
|
||||
*/
|
||||
struct kgdb_arch arch_kgdb_ops = {
|
||||
#ifndef __ARMEB__
|
||||
.gdb_bpt_instr = {0xfe, 0xde, 0xff, 0xe7}
|
||||
#else /* ! __ARMEB__ */
|
||||
.gdb_bpt_instr = {0xe7, 0xff, 0xde, 0xfe}
|
||||
#endif
|
||||
};
|
@ -36,6 +36,7 @@
|
||||
#include <asm/mach/arch.h>
|
||||
#include <asm/mach/irq.h>
|
||||
#include <asm/mach/time.h>
|
||||
#include <asm/traps.h>
|
||||
|
||||
#include "compat.h"
|
||||
#include "atags.h"
|
||||
@ -853,6 +854,7 @@ void __init setup_arch(char **cmdline_p)
|
||||
conswitchp = &dummy_con;
|
||||
#endif
|
||||
#endif
|
||||
early_trap_init();
|
||||
}
|
||||
|
||||
|
||||
|
@ -130,7 +130,9 @@ static const struct leds_evt_name evt_names[] = {
|
||||
{ "red", led_red_on, led_red_off },
|
||||
};
|
||||
|
||||
static ssize_t leds_store(struct sys_device *dev, const char *buf, size_t size)
|
||||
static ssize_t leds_store(struct sys_device *dev,
|
||||
struct sysdev_attribute *attr,
|
||||
const char *buf, size_t size)
|
||||
{
|
||||
int ret = -EINVAL, len = strcspn(buf, " ");
|
||||
|
||||
|
@ -707,6 +707,11 @@ void abort(void)
|
||||
EXPORT_SYMBOL(abort);
|
||||
|
||||
void __init trap_init(void)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
void __init early_trap_init(void)
|
||||
{
|
||||
unsigned long vectors = CONFIG_VECTORS_BASE;
|
||||
extern char __stubs_start[], __stubs_end[];
|
||||
|
@ -393,9 +393,7 @@ static int impd1_probe(struct lm_device *dev)
|
||||
if (!d)
|
||||
continue;
|
||||
|
||||
snprintf(d->dev.bus_id, sizeof(d->dev.bus_id),
|
||||
"lm%x:%5.5lx", dev->id, idev->offset >> 12);
|
||||
|
||||
dev_set_name(&d->dev, "lm%x:%5.5lx", dev->id, idev->offset >> 12);
|
||||
d->dev.parent = &dev->dev;
|
||||
d->res.start = dev->resource.start + idev->offset;
|
||||
d->res.end = d->res.start + SZ_4K - 1;
|
||||
@ -407,8 +405,7 @@ static int impd1_probe(struct lm_device *dev)
|
||||
|
||||
ret = amba_device_register(d, &dev->resource);
|
||||
if (ret) {
|
||||
printk("unable to register device %s: %d\n",
|
||||
d->dev.bus_id, ret);
|
||||
dev_err(&d->dev, "unable to register device: %d\n");
|
||||
kfree(d);
|
||||
}
|
||||
}
|
||||
|
@ -81,8 +81,10 @@ int lm_device_register(struct lm_device *dev)
|
||||
dev->dev.release = lm_device_release;
|
||||
dev->dev.bus = &lm_bustype;
|
||||
|
||||
snprintf(dev->dev.bus_id, sizeof(dev->dev.bus_id), "lm%d", dev->id);
|
||||
dev->resource.name = dev->dev.bus_id;
|
||||
ret = dev_set_name(&dev->dev, "lm%d", dev->id);
|
||||
if (ret)
|
||||
return ret;
|
||||
dev->resource.name = dev_name(&dev->dev);
|
||||
|
||||
ret = request_resource(&iomem_resource, &dev->resource);
|
||||
if (ret == 0) {
|
||||
|
@ -16,18 +16,24 @@ config CPU_PXA310
|
||||
config CPU_PXA320
|
||||
bool "PXA320 (codename Monahans-P)"
|
||||
|
||||
config CPU_PXA930
|
||||
bool "PXA930 (codename Tavor-P)"
|
||||
|
||||
endmenu
|
||||
|
||||
endif
|
||||
|
||||
menu "Select target boards"
|
||||
|
||||
config ARCH_GUMSTIX
|
||||
bool "Gumstix XScale boards"
|
||||
help
|
||||
Say Y here if you intend to run this kernel on a
|
||||
Gumstix Full Function Minature Computer.
|
||||
|
||||
config MACH_GUMSTIX_F
|
||||
bool "Basix, Connex, ws-200ax, ws-400ax systems"
|
||||
depends on ARCH_GUMSTIX
|
||||
select PXA25x
|
||||
|
||||
config ARCH_LUBBOCK
|
||||
bool "Intel DBPXA250 Development Platform"
|
||||
select PXA25x
|
||||
@ -58,146 +64,6 @@ config PXA_SHARPSL
|
||||
SL-C3000 (Spitz), SL-C3100 (Borzoi) or SL-C6000x (Tosa)
|
||||
handheld computer.
|
||||
|
||||
config ARCH_PXA_ESERIES
|
||||
bool "PXA based Toshiba e-series PDAs"
|
||||
select PXA25x
|
||||
|
||||
config MACH_E330
|
||||
bool "Toshiba e330"
|
||||
default y
|
||||
depends on ARCH_PXA_ESERIES
|
||||
help
|
||||
Say Y here if you intend to run this kernel on a Toshiba
|
||||
e330 family PDA.
|
||||
|
||||
config MACH_E740
|
||||
bool "Toshiba e740"
|
||||
default y
|
||||
depends on ARCH_PXA_ESERIES
|
||||
help
|
||||
Say Y here if you intend to run this kernel on a Toshiba
|
||||
e740 family PDA.
|
||||
|
||||
config MACH_E750
|
||||
bool "Toshiba e750"
|
||||
default y
|
||||
depends on ARCH_PXA_ESERIES
|
||||
help
|
||||
Say Y here if you intend to run this kernel on a Toshiba
|
||||
e750 family PDA.
|
||||
|
||||
config MACH_E400
|
||||
bool "Toshiba e400"
|
||||
default y
|
||||
depends on ARCH_PXA_ESERIES
|
||||
help
|
||||
Say Y here if you intend to run this kernel on a Toshiba
|
||||
e400 family PDA.
|
||||
|
||||
config MACH_E800
|
||||
bool "Toshiba e800"
|
||||
default y
|
||||
depends on ARCH_PXA_ESERIES
|
||||
help
|
||||
Say Y here if you intend to run this kernel on a Toshiba
|
||||
e800 family PDA.
|
||||
|
||||
config MACH_TRIZEPS4
|
||||
bool "Keith und Koep Trizeps4 DIMM-Module"
|
||||
select PXA27x
|
||||
|
||||
config MACH_EM_X270
|
||||
bool "CompuLab EM-x270 platform"
|
||||
select PXA27x
|
||||
|
||||
config MACH_COLIBRI
|
||||
bool "Toradex Colibri PX27x"
|
||||
select PXA27x
|
||||
|
||||
config MACH_ZYLONITE
|
||||
bool "PXA3xx Development Platform"
|
||||
select PXA3xx
|
||||
select HAVE_PWM
|
||||
|
||||
config MACH_LITTLETON
|
||||
bool "PXA3xx Form Factor Platform (aka Littleton)"
|
||||
select PXA3xx
|
||||
select PXA_SSP
|
||||
|
||||
config MACH_ARMCORE
|
||||
bool "CompuLab CM-X270 modules"
|
||||
select PXA27x
|
||||
select IWMMXT
|
||||
|
||||
config MACH_MAGICIAN
|
||||
bool "Enable HTC Magician Support"
|
||||
depends on ARCH_PXA
|
||||
select PXA27x
|
||||
select IWMMXT
|
||||
|
||||
config MACH_PCM027
|
||||
bool "Phytec phyCORE-PXA270 CPU module (PCM-027)"
|
||||
select PXA27x
|
||||
select IWMMXT
|
||||
|
||||
endmenu
|
||||
|
||||
choice
|
||||
prompt "Used baseboard"
|
||||
depends on MACH_PCM027
|
||||
|
||||
config MACH_PCM990_BASEBOARD
|
||||
bool "PHYTEC PCM-990 development board"
|
||||
select HAVE_PWM
|
||||
|
||||
endchoice
|
||||
|
||||
choice
|
||||
prompt "display on pcm990"
|
||||
depends on MACH_PCM990_BASEBOARD
|
||||
|
||||
config PCM990_DISPLAY_SHARP
|
||||
bool "sharp lq084v1dg21 stn display"
|
||||
|
||||
config PCM990_DISPLAY_NEC
|
||||
bool "nec nl6448bc20_18d tft display"
|
||||
|
||||
config PCM990_DISPLAY_NONE
|
||||
bool "no display"
|
||||
|
||||
endchoice
|
||||
|
||||
if ARCH_GUMSTIX
|
||||
|
||||
choice
|
||||
prompt "Select target Gumstix board"
|
||||
|
||||
config MACH_GUMSTIX_F
|
||||
bool "Basix, Connex, ws-200ax, ws-400ax systems"
|
||||
select PXA25x
|
||||
|
||||
endchoice
|
||||
|
||||
endif
|
||||
|
||||
|
||||
if MACH_TRIZEPS4
|
||||
|
||||
choice
|
||||
prompt "Select base board for Trizeps 4 module"
|
||||
|
||||
config MACH_TRIZEPS4_CONXS
|
||||
bool "ConXS Eval Board"
|
||||
|
||||
config MACH_TRIZEPS4_ANY
|
||||
bool "another Board"
|
||||
|
||||
endchoice
|
||||
|
||||
endif
|
||||
|
||||
endmenu
|
||||
|
||||
config MACH_POODLE
|
||||
bool "Enable Sharp SL-5600 (Poodle) Support"
|
||||
depends on PXA_SHARPSL
|
||||
@ -249,6 +115,186 @@ config MACH_TOSA
|
||||
depends on PXA_SHARPSL
|
||||
select PXA25x
|
||||
|
||||
config ARCH_PXA_ESERIES
|
||||
bool "PXA based Toshiba e-series PDAs"
|
||||
select PXA25x
|
||||
|
||||
config MACH_E330
|
||||
bool "Toshiba e330"
|
||||
default y
|
||||
depends on ARCH_PXA_ESERIES
|
||||
help
|
||||
Say Y here if you intend to run this kernel on a Toshiba
|
||||
e330 family PDA.
|
||||
|
||||
config MACH_E350
|
||||
bool "Toshiba e350"
|
||||
default y
|
||||
depends on ARCH_PXA_ESERIES
|
||||
help
|
||||
Say Y here if you intend to run this kernel on a Toshiba
|
||||
e350 family PDA.
|
||||
|
||||
config MACH_E740
|
||||
bool "Toshiba e740"
|
||||
default y
|
||||
depends on ARCH_PXA_ESERIES
|
||||
select FB_W100
|
||||
help
|
||||
Say Y here if you intend to run this kernel on a Toshiba
|
||||
e740 family PDA.
|
||||
|
||||
config MACH_E750
|
||||
bool "Toshiba e750"
|
||||
default y
|
||||
depends on ARCH_PXA_ESERIES
|
||||
select FB_W100
|
||||
help
|
||||
Say Y here if you intend to run this kernel on a Toshiba
|
||||
e750 family PDA.
|
||||
|
||||
config MACH_E400
|
||||
bool "Toshiba e400"
|
||||
default y
|
||||
depends on ARCH_PXA_ESERIES
|
||||
help
|
||||
Say Y here if you intend to run this kernel on a Toshiba
|
||||
e400 family PDA.
|
||||
|
||||
config MACH_E800
|
||||
bool "Toshiba e800"
|
||||
default y
|
||||
depends on ARCH_PXA_ESERIES
|
||||
select FB_W100
|
||||
help
|
||||
Say Y here if you intend to run this kernel on a Toshiba
|
||||
e800 family PDA.
|
||||
|
||||
config MACH_TRIZEPS4
|
||||
bool "Keith und Koep Trizeps4 DIMM-Module"
|
||||
select PXA27x
|
||||
|
||||
config MACH_TRIZEPS4_CONXS
|
||||
bool "ConXS Eval Board"
|
||||
depends on MACH_TRIZEPS4
|
||||
|
||||
config MACH_EM_X270
|
||||
bool "CompuLab EM-x270 platform"
|
||||
select PXA27x
|
||||
|
||||
config MACH_COLIBRI
|
||||
bool "Toradex Colibri PX27x"
|
||||
select PXA27x
|
||||
|
||||
config MACH_ZYLONITE
|
||||
bool "PXA3xx Development Platform (aka Zylonite)"
|
||||
select PXA3xx
|
||||
select HAVE_PWM
|
||||
|
||||
config MACH_LITTLETON
|
||||
bool "PXA3xx Form Factor Platform (aka Littleton)"
|
||||
select PXA3xx
|
||||
select PXA_SSP
|
||||
|
||||
config MACH_TAVOREVB
|
||||
bool "PXA930 Evaluation Board (aka TavorEVB)"
|
||||
select PXA3xx
|
||||
select PXA930
|
||||
|
||||
config MACH_SAAR
|
||||
bool "PXA930 Handheld Platform (aka SAAR)"
|
||||
select PXA3xx
|
||||
select PXA930
|
||||
|
||||
config MACH_ARMCORE
|
||||
bool "CompuLab CM-X270 modules"
|
||||
select PXA27x
|
||||
select IWMMXT
|
||||
|
||||
config MACH_MAGICIAN
|
||||
bool "Enable HTC Magician Support"
|
||||
select PXA27x
|
||||
select IWMMXT
|
||||
|
||||
config MACH_PCM027
|
||||
bool "Phytec phyCORE-PXA270 CPU module (PCM-027)"
|
||||
select PXA27x
|
||||
select IWMMXT
|
||||
select PXA_SSP
|
||||
|
||||
config ARCH_PXA_PALM
|
||||
bool "PXA based Palm PDAs"
|
||||
select HAVE_PWM
|
||||
|
||||
config MACH_PALMTX
|
||||
bool "Palm T|X"
|
||||
default y
|
||||
depends on ARCH_PXA_PALM
|
||||
select PXA27x
|
||||
select IWMMXT
|
||||
help
|
||||
Say Y here if you intend to run this kernel on a Palm T|X
|
||||
handheld computer.
|
||||
|
||||
config MACH_PCM990_BASEBOARD
|
||||
bool "PHYTEC PCM-990 development board"
|
||||
select HAVE_PWM
|
||||
depends on MACH_PCM027
|
||||
|
||||
choice
|
||||
prompt "display on pcm990"
|
||||
depends on MACH_PCM990_BASEBOARD
|
||||
|
||||
config PCM990_DISPLAY_SHARP
|
||||
bool "sharp lq084v1dg21 stn display"
|
||||
|
||||
config PCM990_DISPLAY_NEC
|
||||
bool "nec nl6448bc20_18d tft display"
|
||||
|
||||
config PCM990_DISPLAY_NONE
|
||||
bool "no display"
|
||||
|
||||
endchoice
|
||||
|
||||
|
||||
config PXA_EZX
|
||||
bool "Motorola EZX Platform"
|
||||
select PXA27x
|
||||
select IWMMXT
|
||||
select HAVE_PWM
|
||||
|
||||
config MACH_EZX_A780
|
||||
bool "Motorola EZX A780"
|
||||
default y
|
||||
depends on PXA_EZX
|
||||
|
||||
config MACH_EZX_E680
|
||||
bool "Motorola EZX E680"
|
||||
default y
|
||||
depends on PXA_EZX
|
||||
|
||||
config MACH_EZX_A1200
|
||||
bool "Motorola EZX A1200"
|
||||
default y
|
||||
depends on PXA_EZX
|
||||
|
||||
config MACH_EZX_A910
|
||||
bool "Motorola EZX A910"
|
||||
default y
|
||||
depends on PXA_EZX
|
||||
|
||||
config MACH_EZX_E6
|
||||
bool "Motorola EZX E6"
|
||||
default y
|
||||
depends on PXA_EZX
|
||||
|
||||
config MACH_EZX_E2
|
||||
bool "Motorola EZX E2"
|
||||
default y
|
||||
depends on PXA_EZX
|
||||
|
||||
endmenu
|
||||
|
||||
config PXA25x
|
||||
bool
|
||||
help
|
||||
@ -288,4 +334,13 @@ config PXA_PWM
|
||||
default BACKLIGHT_PWM
|
||||
help
|
||||
Enable support for PXA2xx/PXA3xx PWM controllers
|
||||
|
||||
config TOSA_BT
|
||||
tristate "Control the state of built-in bluetooth chip on Sharp SL-6000"
|
||||
depends on MACH_TOSA
|
||||
select RFKILL
|
||||
help
|
||||
This is a simple driver that is able to control
|
||||
the state of built in bluetooth chip on tosa.
|
||||
|
||||
endif
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
# Common support (must be linked before board specific support)
|
||||
obj-y += clock.o devices.o generic.o irq.o dma.o \
|
||||
time.o gpio.o
|
||||
time.o gpio.o reset.o
|
||||
obj-$(CONFIG_PM) += pm.o sleep.o standby.o
|
||||
obj-$(CONFIG_CPU_FREQ) += cpu-pxa.o
|
||||
|
||||
@ -18,6 +18,7 @@ obj-$(CONFIG_PXA27x) += mfp-pxa2xx.o pxa2xx.o pxa27x.o
|
||||
obj-$(CONFIG_PXA3xx) += mfp-pxa3xx.o pxa3xx.o smemc.o
|
||||
obj-$(CONFIG_CPU_PXA300) += pxa300.o
|
||||
obj-$(CONFIG_CPU_PXA320) += pxa320.o
|
||||
obj-$(CONFIG_CPU_PXA930) += pxa930.o
|
||||
|
||||
# Specific board support
|
||||
obj-$(CONFIG_ARCH_GUMSTIX) += gumstix.o
|
||||
@ -36,7 +37,12 @@ obj-$(CONFIG_MACH_PCM990_BASEBOARD) += pcm990-baseboard.o
|
||||
obj-$(CONFIG_MACH_TOSA) += tosa.o
|
||||
obj-$(CONFIG_MACH_EM_X270) += em-x270.o
|
||||
obj-$(CONFIG_MACH_MAGICIAN) += magician.o
|
||||
obj-$(CONFIG_ARCH_PXA_ESERIES) += eseries.o
|
||||
obj-$(CONFIG_ARCH_PXA_ESERIES) += eseries.o eseries_udc.o
|
||||
obj-$(CONFIG_MACH_E740) += e740_lcd.o
|
||||
obj-$(CONFIG_MACH_E750) += e750_lcd.o
|
||||
obj-$(CONFIG_MACH_E400) += e400_lcd.o
|
||||
obj-$(CONFIG_MACH_E800) += e800_lcd.o
|
||||
obj-$(CONFIG_MACH_PALMTX) += palmtx.o
|
||||
|
||||
ifeq ($(CONFIG_MACH_ZYLONITE),y)
|
||||
obj-y += zylonite.o
|
||||
@ -44,8 +50,11 @@ ifeq ($(CONFIG_MACH_ZYLONITE),y)
|
||||
obj-$(CONFIG_CPU_PXA320) += zylonite_pxa320.o
|
||||
endif
|
||||
obj-$(CONFIG_MACH_LITTLETON) += littleton.o
|
||||
obj-$(CONFIG_MACH_TAVOREVB) += tavorevb.o
|
||||
obj-$(CONFIG_MACH_SAAR) += saar.o
|
||||
|
||||
obj-$(CONFIG_MACH_ARMCORE) += cm-x270.o
|
||||
obj-$(CONFIG_PXA_EZX) += ezx.o
|
||||
|
||||
# Support for blinky lights
|
||||
led-y := leds.o
|
||||
@ -59,3 +68,5 @@ obj-$(CONFIG_LEDS) += $(led-y)
|
||||
ifeq ($(CONFIG_PCI),y)
|
||||
obj-$(CONFIG_MACH_ARMCORE) += cm-x270-pci.o
|
||||
endif
|
||||
|
||||
obj-$(CONFIG_TOSA_BT) += tosa-bt.o
|
||||
|
@ -101,21 +101,6 @@ unsigned long clk_get_rate(struct clk *clk)
|
||||
EXPORT_SYMBOL(clk_get_rate);
|
||||
|
||||
|
||||
static void clk_gpio27_enable(struct clk *clk)
|
||||
{
|
||||
pxa_gpio_mode(GPIO11_3_6MHz_MD);
|
||||
}
|
||||
|
||||
static void clk_gpio27_disable(struct clk *clk)
|
||||
{
|
||||
}
|
||||
|
||||
static const struct clkops clk_gpio27_ops = {
|
||||
.enable = clk_gpio27_enable,
|
||||
.disable = clk_gpio27_disable,
|
||||
};
|
||||
|
||||
|
||||
void clk_cken_enable(struct clk *clk)
|
||||
{
|
||||
CKEN |= 1 << clk->cken;
|
||||
@ -131,14 +116,6 @@ const struct clkops clk_cken_ops = {
|
||||
.disable = clk_cken_disable,
|
||||
};
|
||||
|
||||
static struct clk common_clks[] = {
|
||||
{
|
||||
.name = "GPIO27_CLK",
|
||||
.ops = &clk_gpio27_ops,
|
||||
.rate = 3686400,
|
||||
},
|
||||
};
|
||||
|
||||
void clks_register(struct clk *clks, size_t num)
|
||||
{
|
||||
int i;
|
||||
@ -148,10 +125,3 @@ void clks_register(struct clk *clks, size_t num)
|
||||
list_add(&clks[i].node, &clocks);
|
||||
mutex_unlock(&clocks_mutex);
|
||||
}
|
||||
|
||||
static int __init clk_init(void)
|
||||
{
|
||||
clks_register(common_clks, ARRAY_SIZE(common_clks));
|
||||
return 0;
|
||||
}
|
||||
arch_initcall(clk_init);
|
||||
|
@ -47,9 +47,42 @@ struct clk {
|
||||
.other = _other, \
|
||||
}
|
||||
|
||||
#define INIT_CLK(_name, _ops, _rate, _delay, _dev) \
|
||||
{ \
|
||||
.name = _name, \
|
||||
.dev = _dev, \
|
||||
.ops = _ops, \
|
||||
.rate = _rate, \
|
||||
.delay = _delay, \
|
||||
}
|
||||
|
||||
extern const struct clkops clk_cken_ops;
|
||||
|
||||
void clk_cken_enable(struct clk *clk);
|
||||
void clk_cken_disable(struct clk *clk);
|
||||
|
||||
#ifdef CONFIG_PXA3xx
|
||||
#define PXA3xx_CKEN(_name, _cken, _rate, _delay, _dev) \
|
||||
{ \
|
||||
.name = _name, \
|
||||
.dev = _dev, \
|
||||
.ops = &clk_pxa3xx_cken_ops, \
|
||||
.rate = _rate, \
|
||||
.cken = CKEN_##_cken, \
|
||||
.delay = _delay, \
|
||||
}
|
||||
|
||||
#define PXA3xx_CK(_name, _cken, _ops, _dev) \
|
||||
{ \
|
||||
.name = _name, \
|
||||
.dev = _dev, \
|
||||
.ops = _ops, \
|
||||
.cken = CKEN_##_cken, \
|
||||
}
|
||||
|
||||
extern const struct clkops clk_pxa3xx_cken_ops;
|
||||
extern void clk_pxa3xx_cken_enable(struct clk *);
|
||||
extern void clk_pxa3xx_cken_disable(struct clk *);
|
||||
#endif
|
||||
|
||||
void clks_register(struct clk *clks, size_t num);
|
||||
|
@ -5,7 +5,7 @@
|
||||
*
|
||||
* Bits taken from various places.
|
||||
*
|
||||
* Copyright (C) 2007 Compulab, Ltd.
|
||||
* Copyright (C) 2007, 2008 Compulab, Ltd.
|
||||
* Mike Rapoport <mike@compulab.co.il>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@ -19,16 +19,16 @@
|
||||
#include <linux/device.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/irq.h>
|
||||
#include <linux/gpio.h>
|
||||
|
||||
#include <asm/mach/pci.h>
|
||||
#include <asm/arch/cm-x270.h>
|
||||
#include <asm/arch/pxa-regs.h>
|
||||
#include <asm/arch/pxa2xx-gpio.h>
|
||||
#include <asm/mach-types.h>
|
||||
|
||||
#include <asm/hardware/it8152.h>
|
||||
|
||||
unsigned long it8152_base_address = CMX270_IT8152_VIRT;
|
||||
unsigned long it8152_base_address;
|
||||
static int cmx270_it8152_irq_gpio;
|
||||
|
||||
/*
|
||||
* Only first 64MB of memory can be accessed via PCI.
|
||||
@ -42,7 +42,7 @@ void __init cmx270_pci_adjust_zones(int node, unsigned long *zone_size,
|
||||
unsigned int sz = SZ_64M >> PAGE_SHIFT;
|
||||
|
||||
if (machine_is_armcore()) {
|
||||
pr_info("Adjusting zones for CM-x270\n");
|
||||
pr_info("Adjusting zones for CM-X270\n");
|
||||
|
||||
/*
|
||||
* Only adjust if > 64M on current system
|
||||
@ -60,19 +60,20 @@ void __init cmx270_pci_adjust_zones(int node, unsigned long *zone_size,
|
||||
static void cmx270_it8152_irq_demux(unsigned int irq, struct irq_desc *desc)
|
||||
{
|
||||
/* clear our parent irq */
|
||||
GEDR(GPIO_IT8152_IRQ) = GPIO_bit(GPIO_IT8152_IRQ);
|
||||
GEDR(cmx270_it8152_irq_gpio) = GPIO_bit(cmx270_it8152_irq_gpio);
|
||||
|
||||
it8152_irq_demux(irq, desc);
|
||||
}
|
||||
|
||||
void __cmx270_pci_init_irq(void)
|
||||
void __cmx270_pci_init_irq(int irq_gpio)
|
||||
{
|
||||
it8152_init_irq();
|
||||
pxa_gpio_mode(IRQ_TO_GPIO(GPIO_IT8152_IRQ));
|
||||
set_irq_type(IRQ_GPIO(GPIO_IT8152_IRQ), IRQT_RISING);
|
||||
|
||||
set_irq_chained_handler(IRQ_GPIO(GPIO_IT8152_IRQ),
|
||||
cmx270_it8152_irq_demux);
|
||||
cmx270_it8152_irq_gpio = irq_gpio;
|
||||
|
||||
set_irq_type(gpio_to_irq(irq_gpio), IRQT_RISING);
|
||||
|
||||
set_irq_chained_handler(gpio_to_irq(irq_gpio), cmx270_it8152_irq_demux);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PM
|
||||
@ -115,8 +116,8 @@ static int __init cmx270_pci_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
|
||||
|
||||
/*
|
||||
Here comes the ugly part. The routing is baseboard specific,
|
||||
but defining a platform for each possible base of CM-x270 is
|
||||
unrealistic. Here we keep mapping for ATXBase and SB-x270.
|
||||
but defining a platform for each possible base of CM-X270 is
|
||||
unrealistic. Here we keep mapping for ATXBase and SB-X270.
|
||||
*/
|
||||
/* ATXBASE PCI slot */
|
||||
if (slot == 7)
|
||||
|
@ -1,13 +1,13 @@
|
||||
extern void __cmx270_pci_init_irq(void);
|
||||
extern void __cmx270_pci_init_irq(int irq_gpio);
|
||||
extern void __cmx270_pci_suspend(void);
|
||||
extern void __cmx270_pci_resume(void);
|
||||
|
||||
#ifdef CONFIG_PCI
|
||||
#define cmx270_pci_init_irq __cmx270_pci_init_irq
|
||||
#define cmx270_pci_suspend __cmx270_pci_suspend
|
||||
#define cmx270_pci_resume __cmx270_pci_resume
|
||||
#define cmx270_pci_init_irq(x) __cmx270_pci_init_irq(x)
|
||||
#define cmx270_pci_suspend(x) __cmx270_pci_suspend(x)
|
||||
#define cmx270_pci_resume(x) __cmx270_pci_resume(x)
|
||||
#else
|
||||
#define cmx270_pci_init_irq() do {} while (0)
|
||||
#define cmx270_pci_suspend() do {} while (0)
|
||||
#define cmx270_pci_resume() do {} while (0)
|
||||
#define cmx270_pci_init_irq(x) do {} while (0)
|
||||
#define cmx270_pci_suspend(x) do {} while (0)
|
||||
#define cmx270_pci_resume(x) do {} while (0)
|
||||
#endif
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* linux/arch/arm/mach-pxa/cm-x270.c
|
||||
*
|
||||
* Copyright (C) 2007 CompuLab, Ltd.
|
||||
* Copyright (C) 2007, 2008 CompuLab, Ltd.
|
||||
* Mike Rapoport <mike@compulab.co.il>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@ -9,44 +9,156 @@
|
||||
* published by the Free Software Foundation.
|
||||
*/
|
||||
|
||||
#include <linux/types.h>
|
||||
#include <linux/pm.h>
|
||||
#include <linux/fb.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/irq.h>
|
||||
#include <linux/sysdev.h>
|
||||
#include <linux/io.h>
|
||||
#include <linux/delay.h>
|
||||
#include <linux/irq.h>
|
||||
#include <linux/gpio.h>
|
||||
|
||||
#include <linux/dm9000.h>
|
||||
#include <linux/rtc-v3020.h>
|
||||
#include <linux/serial_8250.h>
|
||||
|
||||
#include <video/mbxfb.h>
|
||||
#include <linux/leds.h>
|
||||
|
||||
#include <asm/mach/arch.h>
|
||||
#include <asm/mach-types.h>
|
||||
#include <asm/mach/map.h>
|
||||
|
||||
#include <asm/arch/pxa-regs.h>
|
||||
#include <asm/arch/pxa2xx-regs.h>
|
||||
#include <asm/arch/pxa2xx-gpio.h>
|
||||
#include <asm/arch/mfp-pxa27x.h>
|
||||
#include <asm/arch/pxa-regs.h>
|
||||
#include <asm/arch/audio.h>
|
||||
#include <asm/arch/pxafb.h>
|
||||
#include <asm/arch/ohci.h>
|
||||
#include <asm/arch/mmc.h>
|
||||
#include <asm/arch/bitfield.h>
|
||||
#include <asm/arch/cm-x270.h>
|
||||
|
||||
#include <asm/hardware/it8152.h>
|
||||
|
||||
#include "generic.h"
|
||||
#include "cm-x270-pci.h"
|
||||
|
||||
/* virtual addresses for statically mapped regions */
|
||||
#define CMX270_VIRT_BASE (0xe8000000)
|
||||
#define CMX270_IT8152_VIRT (CMX270_VIRT_BASE)
|
||||
|
||||
#define RTC_PHYS_BASE (PXA_CS1_PHYS + (5 << 22))
|
||||
#define DM9000_PHYS_BASE (PXA_CS1_PHYS + (6 << 22))
|
||||
|
||||
static struct resource cmx270_dm9k_resource[] = {
|
||||
/* GPIO IRQ usage */
|
||||
#define GPIO10_ETHIRQ (10)
|
||||
#define GPIO22_IT8152_IRQ (22)
|
||||
#define GPIO83_MMC_IRQ (83)
|
||||
#define GPIO95_GFXIRQ (95)
|
||||
|
||||
#define CMX270_ETHIRQ IRQ_GPIO(GPIO10_ETHIRQ)
|
||||
#define CMX270_IT8152_IRQ IRQ_GPIO(GPIO22_IT8152_IRQ)
|
||||
#define CMX270_MMC_IRQ IRQ_GPIO(GPIO83_MMC_IRQ)
|
||||
#define CMX270_GFXIRQ IRQ_GPIO(GPIO95_GFXIRQ)
|
||||
|
||||
/* MMC power enable */
|
||||
#define GPIO105_MMC_POWER (105)
|
||||
|
||||
static unsigned long cmx270_pin_config[] = {
|
||||
/* AC'97 */
|
||||
GPIO28_AC97_BITCLK,
|
||||
GPIO29_AC97_SDATA_IN_0,
|
||||
GPIO30_AC97_SDATA_OUT,
|
||||
GPIO31_AC97_SYNC,
|
||||
GPIO98_AC97_SYSCLK,
|
||||
GPIO113_AC97_nRESET,
|
||||
|
||||
/* BTUART */
|
||||
GPIO42_BTUART_RXD,
|
||||
GPIO43_BTUART_TXD,
|
||||
GPIO44_BTUART_CTS,
|
||||
GPIO45_BTUART_RTS,
|
||||
|
||||
/* STUART */
|
||||
GPIO46_STUART_RXD,
|
||||
GPIO47_STUART_TXD,
|
||||
|
||||
/* MCI controller */
|
||||
GPIO32_MMC_CLK,
|
||||
GPIO112_MMC_CMD,
|
||||
GPIO92_MMC_DAT_0,
|
||||
GPIO109_MMC_DAT_1,
|
||||
GPIO110_MMC_DAT_2,
|
||||
GPIO111_MMC_DAT_3,
|
||||
|
||||
/* LCD */
|
||||
GPIO58_LCD_LDD_0,
|
||||
GPIO59_LCD_LDD_1,
|
||||
GPIO60_LCD_LDD_2,
|
||||
GPIO61_LCD_LDD_3,
|
||||
GPIO62_LCD_LDD_4,
|
||||
GPIO63_LCD_LDD_5,
|
||||
GPIO64_LCD_LDD_6,
|
||||
GPIO65_LCD_LDD_7,
|
||||
GPIO66_LCD_LDD_8,
|
||||
GPIO67_LCD_LDD_9,
|
||||
GPIO68_LCD_LDD_10,
|
||||
GPIO69_LCD_LDD_11,
|
||||
GPIO70_LCD_LDD_12,
|
||||
GPIO71_LCD_LDD_13,
|
||||
GPIO72_LCD_LDD_14,
|
||||
GPIO73_LCD_LDD_15,
|
||||
GPIO74_LCD_FCLK,
|
||||
GPIO75_LCD_LCLK,
|
||||
GPIO76_LCD_PCLK,
|
||||
GPIO77_LCD_BIAS,
|
||||
|
||||
/* I2C */
|
||||
GPIO117_I2C_SCL,
|
||||
GPIO118_I2C_SDA,
|
||||
|
||||
/* SSP1 */
|
||||
GPIO23_SSP1_SCLK,
|
||||
GPIO24_SSP1_SFRM,
|
||||
GPIO25_SSP1_TXD,
|
||||
GPIO26_SSP1_RXD,
|
||||
|
||||
/* SSP2 */
|
||||
GPIO19_SSP2_SCLK,
|
||||
GPIO14_SSP2_SFRM,
|
||||
GPIO87_SSP2_TXD,
|
||||
GPIO88_SSP2_RXD,
|
||||
|
||||
/* PC Card */
|
||||
GPIO48_nPOE,
|
||||
GPIO49_nPWE,
|
||||
GPIO50_nPIOR,
|
||||
GPIO51_nPIOW,
|
||||
GPIO85_nPCE_1,
|
||||
GPIO54_nPCE_2,
|
||||
GPIO55_nPREG,
|
||||
GPIO56_nPWAIT,
|
||||
GPIO57_nIOIS16,
|
||||
|
||||
/* SDRAM and local bus */
|
||||
GPIO15_nCS_1,
|
||||
GPIO78_nCS_2,
|
||||
GPIO79_nCS_3,
|
||||
GPIO80_nCS_4,
|
||||
GPIO33_nCS_5,
|
||||
GPIO49_nPWE,
|
||||
GPIO18_RDY,
|
||||
|
||||
/* GPIO */
|
||||
GPIO0_GPIO | WAKEUP_ON_EDGE_BOTH,
|
||||
GPIO105_GPIO | MFP_LPM_DRIVE_HIGH, /* MMC/SD power */
|
||||
GPIO53_GPIO, /* PC card reset */
|
||||
|
||||
/* NAND controls */
|
||||
GPIO11_GPIO | MFP_LPM_DRIVE_HIGH, /* NAND CE# */
|
||||
GPIO89_GPIO, /* NAND Ready/Busy */
|
||||
|
||||
/* interrupts */
|
||||
GPIO10_GPIO, /* DM9000 interrupt */
|
||||
GPIO83_GPIO, /* MMC card detect */
|
||||
};
|
||||
|
||||
#if defined(CONFIG_DM9000) || defined(CONFIG_DM9000_MODULE)
|
||||
static struct resource cmx270_dm9000_resource[] = {
|
||||
[0] = {
|
||||
.start = DM9000_PHYS_BASE,
|
||||
.end = DM9000_PHYS_BASE + 4,
|
||||
@ -64,31 +176,45 @@ static struct resource cmx270_dm9k_resource[] = {
|
||||
}
|
||||
};
|
||||
|
||||
/* for the moment we limit ourselves to 32bit IO until some
|
||||
* better IO routines can be written and tested
|
||||
*/
|
||||
static struct dm9000_plat_data cmx270_dm9k_platdata = {
|
||||
static struct dm9000_plat_data cmx270_dm9000_platdata = {
|
||||
.flags = DM9000_PLATF_32BITONLY,
|
||||
};
|
||||
|
||||
/* Ethernet device */
|
||||
static struct platform_device cmx270_device_dm9k = {
|
||||
static struct platform_device cmx270_dm9000_device = {
|
||||
.name = "dm9000",
|
||||
.id = 0,
|
||||
.num_resources = ARRAY_SIZE(cmx270_dm9k_resource),
|
||||
.resource = cmx270_dm9k_resource,
|
||||
.num_resources = ARRAY_SIZE(cmx270_dm9000_resource),
|
||||
.resource = cmx270_dm9000_resource,
|
||||
.dev = {
|
||||
.platform_data = &cmx270_dm9k_platdata,
|
||||
.platform_data = &cmx270_dm9000_platdata,
|
||||
}
|
||||
};
|
||||
|
||||
/* touchscreen controller */
|
||||
static void __init cmx270_init_dm9000(void)
|
||||
{
|
||||
platform_device_register(&cmx270_dm9000_device);
|
||||
}
|
||||
#else
|
||||
static inline void cmx270_init_dm9000(void) {}
|
||||
#endif
|
||||
|
||||
/* UCB1400 touchscreen controller */
|
||||
#if defined(CONFIG_TOUCHSCREEN_UCB1400) || defined(CONFIG_TOUCHSCREEN_UCB1400_MODULE)
|
||||
static struct platform_device cmx270_ts_device = {
|
||||
.name = "ucb1400_ts",
|
||||
.id = -1,
|
||||
};
|
||||
|
||||
/* RTC */
|
||||
static void __init cmx270_init_touchscreen(void)
|
||||
{
|
||||
platform_device_register(&cmx270_ts_device);
|
||||
}
|
||||
#else
|
||||
static inline void cmx270_init_touchscreen(void) {}
|
||||
#endif
|
||||
|
||||
/* V3020 RTC */
|
||||
#if defined(CONFIG_RTC_DRV_V3020) || defined(CONFIG_RTC_DRV_V3020_MODULE)
|
||||
static struct resource cmx270_v3020_resource[] = {
|
||||
[0] = {
|
||||
.start = RTC_PHYS_BASE,
|
||||
@ -111,28 +237,67 @@ static struct platform_device cmx270_rtc_device = {
|
||||
}
|
||||
};
|
||||
|
||||
/*
|
||||
* CM-X270 LEDs
|
||||
*/
|
||||
static struct platform_device cmx270_led_device = {
|
||||
.name = "cm-x270-led",
|
||||
.id = -1,
|
||||
static void __init cmx270_init_rtc(void)
|
||||
{
|
||||
platform_device_register(&cmx270_rtc_device);
|
||||
}
|
||||
#else
|
||||
static inline void cmx270_init_rtc(void) {}
|
||||
#endif
|
||||
|
||||
/* CM-X270 LEDs */
|
||||
#if defined(CONFIG_LEDS_GPIO) || defined(CONFIG_LEDS_GPIO_MODULE)
|
||||
static struct gpio_led cmx270_leds[] = {
|
||||
[0] = {
|
||||
.name = "cm-x270:red",
|
||||
.default_trigger = "nand-disk",
|
||||
.gpio = 93,
|
||||
.active_low = 1,
|
||||
},
|
||||
[1] = {
|
||||
.name = "cm-x270:green",
|
||||
.default_trigger = "heartbeat",
|
||||
.gpio = 94,
|
||||
.active_low = 1,
|
||||
},
|
||||
};
|
||||
|
||||
static struct gpio_led_platform_data cmx270_gpio_led_pdata = {
|
||||
.num_leds = ARRAY_SIZE(cmx270_leds),
|
||||
.leds = cmx270_leds,
|
||||
};
|
||||
|
||||
static struct platform_device cmx270_led_device = {
|
||||
.name = "leds-gpio",
|
||||
.id = -1,
|
||||
.dev = {
|
||||
.platform_data = &cmx270_gpio_led_pdata,
|
||||
},
|
||||
};
|
||||
|
||||
static void __init cmx270_init_leds(void)
|
||||
{
|
||||
platform_device_register(&cmx270_led_device);
|
||||
}
|
||||
#else
|
||||
static inline void cmx270_init_leds(void) {}
|
||||
#endif
|
||||
|
||||
/* 2700G graphics */
|
||||
#if defined(CONFIG_FB_MBX) || defined(CONFIG_FB_MBX_MODULE)
|
||||
static u64 fb_dma_mask = ~(u64)0;
|
||||
|
||||
static struct resource cmx270_2700G_resource[] = {
|
||||
/* frame buffer memory including ODFB and External SDRAM */
|
||||
[0] = {
|
||||
.start = MARATHON_PHYS,
|
||||
.end = MARATHON_PHYS + 0x02000000,
|
||||
.start = PXA_CS2_PHYS,
|
||||
.end = PXA_CS2_PHYS + 0x01ffffff,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
/* Marathon registers */
|
||||
[1] = {
|
||||
.start = MARATHON_PHYS + 0x03fe0000,
|
||||
.end = MARATHON_PHYS + 0x03ffffff,
|
||||
.start = PXA_CS2_PHYS + 0x03fe0000,
|
||||
.end = PXA_CS2_PHYS + 0x03ffffff,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
};
|
||||
@ -200,43 +365,15 @@ static struct platform_device cmx270_2700G = {
|
||||
.id = -1,
|
||||
};
|
||||
|
||||
static u64 ata_dma_mask = ~(u64)0;
|
||||
|
||||
static struct platform_device cmx270_ata = {
|
||||
.name = "pata_cm_x270",
|
||||
.id = -1,
|
||||
.dev = {
|
||||
.dma_mask = &ata_dma_mask,
|
||||
.coherent_dma_mask = 0xffffffff,
|
||||
},
|
||||
};
|
||||
|
||||
/* platform devices */
|
||||
static struct platform_device *platform_devices[] __initdata = {
|
||||
&cmx270_device_dm9k,
|
||||
&cmx270_rtc_device,
|
||||
&cmx270_2700G,
|
||||
&cmx270_led_device,
|
||||
&cmx270_ts_device,
|
||||
&cmx270_ata,
|
||||
};
|
||||
|
||||
/* Map PCI companion and IDE/General Purpose CS statically */
|
||||
static struct map_desc cmx270_io_desc[] __initdata = {
|
||||
[0] = { /* IDE/general purpose space */
|
||||
.virtual = CMX270_IDE104_VIRT,
|
||||
.pfn = __phys_to_pfn(CMX270_IDE104_PHYS),
|
||||
.length = SZ_64M - SZ_8M,
|
||||
.type = MT_DEVICE
|
||||
},
|
||||
[1] = { /* PCI bridge */
|
||||
.virtual = CMX270_IT8152_VIRT,
|
||||
.pfn = __phys_to_pfn(CMX270_IT8152_PHYS),
|
||||
.length = SZ_64M,
|
||||
.type = MT_DEVICE
|
||||
},
|
||||
};
|
||||
static void __init cmx270_init_2700G(void)
|
||||
{
|
||||
platform_device_register(&cmx270_2700G);
|
||||
}
|
||||
#else
|
||||
static inline void cmx270_init_2700G(void) {}
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_FB_PXA) || defined(CONFIG_FB_PXA_MODULE)
|
||||
/*
|
||||
Display definitions
|
||||
keep these for backwards compatibility, although symbolic names (as
|
||||
@ -446,7 +583,16 @@ static int __init cmx270_set_display(char *str)
|
||||
*/
|
||||
__setup("monitor=", cmx270_set_display);
|
||||
|
||||
static void __init cmx270_init_display(void)
|
||||
{
|
||||
set_pxa_fb_info(cmx270_display);
|
||||
}
|
||||
#else
|
||||
static inline void cmx270_init_display(void) {}
|
||||
#endif
|
||||
|
||||
/* PXA27x OHCI controller setup */
|
||||
#if defined(CONFIG_USB_OHCI_HCD) || defined(CONFIG_USB_OHCI_HCD_MODULE)
|
||||
static int cmx270_ohci_init(struct device *dev)
|
||||
{
|
||||
/* Set the Power Control Polarity Low */
|
||||
@ -461,35 +607,37 @@ static struct pxaohci_platform_data cmx270_ohci_platform_data = {
|
||||
.init = cmx270_ohci_init,
|
||||
};
|
||||
|
||||
static void __init cmx270_init_ohci(void)
|
||||
{
|
||||
pxa_set_ohci_info(&cmx270_ohci_platform_data);
|
||||
}
|
||||
#else
|
||||
static inline void cmx270_init_ohci(void) {}
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_MMC) || defined(CONFIG_MMC_MODULE)
|
||||
static int cmx270_mci_init(struct device *dev,
|
||||
irq_handler_t cmx270_detect_int,
|
||||
void *data)
|
||||
{
|
||||
int err;
|
||||
|
||||
/*
|
||||
* setup GPIO for PXA27x MMC controller
|
||||
*/
|
||||
pxa_gpio_mode(GPIO32_MMCCLK_MD);
|
||||
pxa_gpio_mode(GPIO112_MMCCMD_MD);
|
||||
pxa_gpio_mode(GPIO92_MMCDAT0_MD);
|
||||
pxa_gpio_mode(GPIO109_MMCDAT1_MD);
|
||||
pxa_gpio_mode(GPIO110_MMCDAT2_MD);
|
||||
pxa_gpio_mode(GPIO111_MMCDAT3_MD);
|
||||
err = gpio_request(GPIO105_MMC_POWER, "MMC/SD power");
|
||||
if (err) {
|
||||
dev_warn(dev, "power gpio unavailable\n");
|
||||
return err;
|
||||
}
|
||||
|
||||
/* SB-X270 uses GPIO105 as SD power enable */
|
||||
pxa_gpio_mode(105 | GPIO_OUT);
|
||||
|
||||
/* card detect IRQ on GPIO 83 */
|
||||
pxa_gpio_mode(IRQ_TO_GPIO(CMX270_MMC_IRQ));
|
||||
gpio_direction_output(GPIO105_MMC_POWER, 0);
|
||||
|
||||
err = request_irq(CMX270_MMC_IRQ, cmx270_detect_int,
|
||||
IRQF_DISABLED | IRQF_TRIGGER_FALLING,
|
||||
"MMC card detect", data);
|
||||
if (err)
|
||||
printk(KERN_ERR "cmx270_mci_init: MMC/SD: can't"
|
||||
" request MMC card detect IRQ\n");
|
||||
if (err) {
|
||||
gpio_free(GPIO105_MMC_POWER);
|
||||
dev_err(dev, "cmx270_mci_init: MMC/SD: can't"
|
||||
" request MMC card detect IRQ\n");
|
||||
}
|
||||
|
||||
return err;
|
||||
}
|
||||
@ -499,17 +647,18 @@ static void cmx270_mci_setpower(struct device *dev, unsigned int vdd)
|
||||
struct pxamci_platform_data *p_d = dev->platform_data;
|
||||
|
||||
if ((1 << vdd) & p_d->ocr_mask) {
|
||||
printk(KERN_DEBUG "%s: on\n", __func__);
|
||||
GPCR(105) = GPIO_bit(105);
|
||||
dev_dbg(dev, "power on\n");
|
||||
gpio_set_value(GPIO105_MMC_POWER, 0);
|
||||
} else {
|
||||
GPSR(105) = GPIO_bit(105);
|
||||
printk(KERN_DEBUG "%s: off\n", __func__);
|
||||
gpio_set_value(GPIO105_MMC_POWER, 1);
|
||||
dev_dbg(dev, "power off\n");
|
||||
}
|
||||
}
|
||||
|
||||
static void cmx270_mci_exit(struct device *dev, void *data)
|
||||
{
|
||||
free_irq(CMX270_MMC_IRQ, data);
|
||||
gpio_free(GPIO105_MMC_POWER);
|
||||
}
|
||||
|
||||
static struct pxamci_platform_data cmx270_mci_platform_data = {
|
||||
@ -519,6 +668,14 @@ static struct pxamci_platform_data cmx270_mci_platform_data = {
|
||||
.exit = cmx270_mci_exit,
|
||||
};
|
||||
|
||||
static void __init cmx270_init_mmc(void)
|
||||
{
|
||||
pxa_set_mci_info(&cmx270_mci_platform_data);
|
||||
}
|
||||
#else
|
||||
static inline void cmx270_init_mmc(void) {}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_PM
|
||||
static unsigned long sleep_save_msc[10];
|
||||
|
||||
@ -580,53 +737,63 @@ static int __init cmx270_pm_init(void)
|
||||
static int __init cmx270_pm_init(void) { return 0; }
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_SND_PXA2XX_AC97) || defined(CONFIG_SND_PXA2XX_AC97_MODULE)
|
||||
static void __init cmx270_init_ac97(void)
|
||||
{
|
||||
pxa_set_ac97_info(NULL);
|
||||
}
|
||||
#else
|
||||
static inline void cmx270_init_ac97(void) {}
|
||||
#endif
|
||||
|
||||
static void __init cmx270_init(void)
|
||||
{
|
||||
cmx270_pm_init();
|
||||
|
||||
set_pxa_fb_info(cmx270_display);
|
||||
pxa2xx_mfp_config(ARRAY_AND_SIZE(cmx270_pin_config));
|
||||
|
||||
/* register CM-X270 platform devices */
|
||||
platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices));
|
||||
pxa_set_ac97_info(NULL);
|
||||
|
||||
/* set MCI and OHCI platform parameters */
|
||||
pxa_set_mci_info(&cmx270_mci_platform_data);
|
||||
pxa_set_ohci_info(&cmx270_ohci_platform_data);
|
||||
|
||||
/* This enables the STUART */
|
||||
pxa_gpio_mode(GPIO46_STRXD_MD);
|
||||
pxa_gpio_mode(GPIO47_STTXD_MD);
|
||||
|
||||
/* This enables the BTUART */
|
||||
pxa_gpio_mode(GPIO42_BTRXD_MD);
|
||||
pxa_gpio_mode(GPIO43_BTTXD_MD);
|
||||
pxa_gpio_mode(GPIO44_BTCTS_MD);
|
||||
pxa_gpio_mode(GPIO45_BTRTS_MD);
|
||||
cmx270_init_dm9000();
|
||||
cmx270_init_rtc();
|
||||
cmx270_init_display();
|
||||
cmx270_init_mmc();
|
||||
cmx270_init_ohci();
|
||||
cmx270_init_ac97();
|
||||
cmx270_init_touchscreen();
|
||||
cmx270_init_leds();
|
||||
cmx270_init_2700G();
|
||||
}
|
||||
|
||||
static void __init cmx270_init_irq(void)
|
||||
{
|
||||
pxa27x_init_irq();
|
||||
|
||||
|
||||
cmx270_pci_init_irq();
|
||||
|
||||
/* Setup interrupt for dm9000 */
|
||||
pxa_gpio_mode(IRQ_TO_GPIO(CMX270_ETHIRQ));
|
||||
set_irq_type(CMX270_ETHIRQ, IRQT_RISING);
|
||||
|
||||
/* Setup interrupt for 2700G */
|
||||
pxa_gpio_mode(IRQ_TO_GPIO(CMX270_GFXIRQ));
|
||||
set_irq_type(CMX270_GFXIRQ, IRQT_FALLING);
|
||||
cmx270_pci_init_irq(GPIO22_IT8152_IRQ);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PCI
|
||||
/* Map PCI companion statically */
|
||||
static struct map_desc cmx270_io_desc[] __initdata = {
|
||||
[0] = { /* PCI bridge */
|
||||
.virtual = CMX270_IT8152_VIRT,
|
||||
.pfn = __phys_to_pfn(PXA_CS4_PHYS),
|
||||
.length = SZ_64M,
|
||||
.type = MT_DEVICE
|
||||
},
|
||||
};
|
||||
|
||||
static void __init cmx270_map_io(void)
|
||||
{
|
||||
pxa_map_io();
|
||||
iotable_init(cmx270_io_desc, ARRAY_SIZE(cmx270_io_desc));
|
||||
}
|
||||
|
||||
it8152_base_address = CMX270_IT8152_VIRT;
|
||||
}
|
||||
#else
|
||||
static void __init cmx270_map_io(void)
|
||||
{
|
||||
pxa_map_io();
|
||||
}
|
||||
#endif
|
||||
|
||||
MACHINE_START(ARMCORE, "Compulab CM-x270")
|
||||
.boot_params = 0xa0000100,
|
||||
|
@ -465,6 +465,7 @@ static void corgi_irda_transceiver_mode(struct device *dev, int mode)
|
||||
GPSR(CORGI_GPIO_IR_ON) = GPIO_bit(CORGI_GPIO_IR_ON);
|
||||
else
|
||||
GPCR(CORGI_GPIO_IR_ON) = GPIO_bit(CORGI_GPIO_IR_ON);
|
||||
pxa2xx_transceiver_mode(dev, mode);
|
||||
}
|
||||
|
||||
static struct pxaficp_platform_data corgi_ficp_platform_data = {
|
||||
|
@ -13,8 +13,10 @@
|
||||
#include <asm/arch/mfp-pxa27x.h>
|
||||
#include <asm/arch/ohci.h>
|
||||
#include <asm/arch/pxa27x_keypad.h>
|
||||
#include <asm/arch/pxa2xx_spi.h>
|
||||
#include <asm/arch/camera.h>
|
||||
#include <asm/arch/audio.h>
|
||||
#include <asm/arch/pxa3xx_nand.h>
|
||||
|
||||
#include "devices.h"
|
||||
#include "generic.h"
|
||||
@ -830,4 +832,63 @@ void __init pxa3xx_set_mci3_info(struct pxamci_platform_data *info)
|
||||
pxa_register_device(&pxa3xx_device_mci3, info);
|
||||
}
|
||||
|
||||
static struct resource pxa3xx_resources_nand[] = {
|
||||
[0] = {
|
||||
.start = 0x43100000,
|
||||
.end = 0x43100053,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
[1] = {
|
||||
.start = IRQ_NAND,
|
||||
.end = IRQ_NAND,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
[2] = {
|
||||
/* DRCMR for Data DMA */
|
||||
.start = 97,
|
||||
.end = 97,
|
||||
.flags = IORESOURCE_DMA,
|
||||
},
|
||||
[3] = {
|
||||
/* DRCMR for Command DMA */
|
||||
.start = 99,
|
||||
.end = 99,
|
||||
.flags = IORESOURCE_DMA,
|
||||
},
|
||||
};
|
||||
|
||||
static u64 pxa3xx_nand_dma_mask = DMA_BIT_MASK(32);
|
||||
|
||||
struct platform_device pxa3xx_device_nand = {
|
||||
.name = "pxa3xx-nand",
|
||||
.id = -1,
|
||||
.dev = {
|
||||
.dma_mask = &pxa3xx_nand_dma_mask,
|
||||
.coherent_dma_mask = DMA_BIT_MASK(32),
|
||||
},
|
||||
.num_resources = ARRAY_SIZE(pxa3xx_resources_nand),
|
||||
.resource = pxa3xx_resources_nand,
|
||||
};
|
||||
|
||||
void __init pxa3xx_set_nand_info(struct pxa3xx_nand_platform_data *info)
|
||||
{
|
||||
pxa_register_device(&pxa3xx_device_nand, info);
|
||||
}
|
||||
#endif /* CONFIG_PXA3xx */
|
||||
|
||||
/* pxa2xx-spi platform-device ID equals respective SSP platform-device ID + 1.
|
||||
* See comment in arch/arm/mach-pxa/ssp.c::ssp_probe() */
|
||||
void __init pxa2xx_set_spi_info(unsigned id, struct pxa2xx_spi_master *info)
|
||||
{
|
||||
struct platform_device *pd;
|
||||
|
||||
pd = platform_device_alloc("pxa2xx-spi", id);
|
||||
if (pd == NULL) {
|
||||
printk(KERN_ERR "pxa2xx-spi: failed to allocate device id %d\n",
|
||||
id);
|
||||
return;
|
||||
}
|
||||
|
||||
pd->dev.platform_data = info;
|
||||
platform_device_add(pd);
|
||||
}
|
||||
|
@ -31,4 +31,6 @@ extern struct platform_device pxa25x_device_pwm1;
|
||||
extern struct platform_device pxa27x_device_pwm0;
|
||||
extern struct platform_device pxa27x_device_pwm1;
|
||||
|
||||
extern struct platform_device pxa3xx_device_nand;
|
||||
|
||||
void __init pxa_register_device(struct platform_device *dev, void *data);
|
||||
|
56
arch/arm/mach-pxa/e400_lcd.c
Normal file
56
arch/arm/mach-pxa/e400_lcd.c
Normal file
@ -0,0 +1,56 @@
|
||||
/*
|
||||
* e400_lcd.c
|
||||
*
|
||||
* (c) 2005 Ian Molton <spyro@f2s.com>
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
*/
|
||||
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/module.h>
|
||||
|
||||
#include <asm/mach-types.h>
|
||||
#include <asm/arch/pxa-regs.h>
|
||||
#include <asm/arch/pxafb.h>
|
||||
|
||||
static struct pxafb_mode_info e400_pxafb_mode_info = {
|
||||
.pixclock = 140703,
|
||||
.xres = 240,
|
||||
.yres = 320,
|
||||
.bpp = 16,
|
||||
.hsync_len = 4,
|
||||
.left_margin = 28,
|
||||
.right_margin = 8,
|
||||
.vsync_len = 3,
|
||||
.upper_margin = 5,
|
||||
.lower_margin = 6,
|
||||
.sync = 0,
|
||||
};
|
||||
|
||||
static struct pxafb_mach_info e400_pxafb_mach_info = {
|
||||
.modes = &e400_pxafb_mode_info,
|
||||
.num_modes = 1,
|
||||
.lccr0 = LCCR0_Color | LCCR0_Sngl | LCCR0_Act,
|
||||
.lccr3 = 0,
|
||||
.pxafb_backlight_power = NULL,
|
||||
};
|
||||
|
||||
static int __init e400_lcd_init(void)
|
||||
{
|
||||
if (!machine_is_e400())
|
||||
return -ENODEV;
|
||||
|
||||
set_pxa_fb_info(&e400_pxafb_mach_info);
|
||||
return 0;
|
||||
}
|
||||
|
||||
module_init(e400_lcd_init);
|
||||
|
||||
MODULE_AUTHOR("Ian Molton <spyro@f2s.com>");
|
||||
MODULE_DESCRIPTION("e400 lcd driver");
|
||||
MODULE_LICENSE("GPLv2");
|
||||
|
123
arch/arm/mach-pxa/e740_lcd.c
Normal file
123
arch/arm/mach-pxa/e740_lcd.c
Normal file
@ -0,0 +1,123 @@
|
||||
/* e740_lcd.c
|
||||
*
|
||||
* This file contains the definitions for the LCD timings and functions
|
||||
* to control the LCD power / frontlighting via the w100fb driver.
|
||||
*
|
||||
* (c) 2005 Ian Molton <spyro@f2s.com>
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
*/
|
||||
|
||||
#include <linux/module.h>
|
||||
#include <linux/device.h>
|
||||
#include <linux/fb.h>
|
||||
#include <linux/err.h>
|
||||
#include <linux/platform_device.h>
|
||||
|
||||
#include <asm/mach-types.h>
|
||||
|
||||
#include <video/w100fb.h>
|
||||
|
||||
/*
|
||||
**potential** shutdown routine - to be investigated
|
||||
devmem2 0x0c010528 w 0xff3fff00
|
||||
devmem2 0x0c010190 w 0x7FFF8000
|
||||
devmem2 0x0c0101b0 w 0x00FF0000
|
||||
devmem2 0x0c01008c w 0x00000000
|
||||
devmem2 0x0c010080 w 0x000000bf
|
||||
devmem2 0x0c010098 w 0x00000015
|
||||
devmem2 0x0c010088 w 0x4b000204
|
||||
devmem2 0x0c010098 w 0x0000001d
|
||||
*/
|
||||
|
||||
static struct w100_gen_regs e740_lcd_regs = {
|
||||
.lcd_format = 0x00008023,
|
||||
.lcdd_cntl1 = 0x0f000000,
|
||||
.lcdd_cntl2 = 0x0003ffff,
|
||||
.genlcd_cntl1 = 0x00ffff03,
|
||||
.genlcd_cntl2 = 0x003c0f03,
|
||||
.genlcd_cntl3 = 0x000143aa,
|
||||
};
|
||||
|
||||
static struct w100_mode e740_lcd_mode = {
|
||||
.xres = 240,
|
||||
.yres = 320,
|
||||
.left_margin = 20,
|
||||
.right_margin = 28,
|
||||
.upper_margin = 9,
|
||||
.lower_margin = 8,
|
||||
.crtc_ss = 0x80140013,
|
||||
.crtc_ls = 0x81150110,
|
||||
.crtc_gs = 0x80050005,
|
||||
.crtc_vpos_gs = 0x000a0009,
|
||||
.crtc_rev = 0x0040010a,
|
||||
.crtc_dclk = 0xa906000a,
|
||||
.crtc_gclk = 0x80050108,
|
||||
.crtc_goe = 0x80050108,
|
||||
.pll_freq = 57,
|
||||
.pixclk_divider = 4,
|
||||
.pixclk_divider_rotated = 4,
|
||||
.pixclk_src = CLK_SRC_XTAL,
|
||||
.sysclk_divider = 1,
|
||||
.sysclk_src = CLK_SRC_PLL,
|
||||
.crtc_ps1_active = 0x41060010,
|
||||
};
|
||||
|
||||
|
||||
static struct w100_gpio_regs e740_w100_gpio_info = {
|
||||
.init_data1 = 0x21002103,
|
||||
.gpio_dir1 = 0xffffdeff,
|
||||
.gpio_oe1 = 0x03c00643,
|
||||
.init_data2 = 0x003f003f,
|
||||
.gpio_dir2 = 0xffffffff,
|
||||
.gpio_oe2 = 0x000000ff,
|
||||
};
|
||||
|
||||
static struct w100fb_mach_info e740_fb_info = {
|
||||
.modelist = &e740_lcd_mode,
|
||||
.num_modes = 1,
|
||||
.regs = &e740_lcd_regs,
|
||||
.gpio = &e740_w100_gpio_info,
|
||||
.xtal_freq = 14318000,
|
||||
.xtal_dbl = 1,
|
||||
};
|
||||
|
||||
static struct resource e740_fb_resources[] = {
|
||||
[0] = {
|
||||
.start = 0x0c000000,
|
||||
.end = 0x0cffffff,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
};
|
||||
|
||||
/* ----------------------- device declarations -------------------------- */
|
||||
|
||||
|
||||
static struct platform_device e740_fb_device = {
|
||||
.name = "w100fb",
|
||||
.id = -1,
|
||||
.dev = {
|
||||
.platform_data = &e740_fb_info,
|
||||
},
|
||||
.num_resources = ARRAY_SIZE(e740_fb_resources),
|
||||
.resource = e740_fb_resources,
|
||||
};
|
||||
|
||||
static int e740_lcd_init(void)
|
||||
{
|
||||
int ret;
|
||||
|
||||
if (!machine_is_e740())
|
||||
return -ENODEV;
|
||||
|
||||
return platform_device_register(&e740_fb_device);
|
||||
}
|
||||
|
||||
module_init(e740_lcd_init);
|
||||
|
||||
MODULE_AUTHOR("Ian Molton <spyro@f2s.com>");
|
||||
MODULE_DESCRIPTION("e740 lcd driver");
|
||||
MODULE_LICENSE("GPLv2");
|
109
arch/arm/mach-pxa/e750_lcd.c
Normal file
109
arch/arm/mach-pxa/e750_lcd.c
Normal file
@ -0,0 +1,109 @@
|
||||
/* e750_lcd.c
|
||||
*
|
||||
* This file contains the definitions for the LCD timings and functions
|
||||
* to control the LCD power / frontlighting via the w100fb driver.
|
||||
*
|
||||
* (c) 2005 Ian Molton <spyro@f2s.com>
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
*/
|
||||
|
||||
#include <linux/module.h>
|
||||
#include <linux/device.h>
|
||||
#include <linux/fb.h>
|
||||
#include <linux/err.h>
|
||||
#include <linux/platform_device.h>
|
||||
|
||||
#include <asm/mach-types.h>
|
||||
|
||||
#include <video/w100fb.h>
|
||||
|
||||
static struct w100_gen_regs e750_lcd_regs = {
|
||||
.lcd_format = 0x00008003,
|
||||
.lcdd_cntl1 = 0x00000000,
|
||||
.lcdd_cntl2 = 0x0003ffff,
|
||||
.genlcd_cntl1 = 0x00fff003,
|
||||
.genlcd_cntl2 = 0x003c0f03,
|
||||
.genlcd_cntl3 = 0x000143aa,
|
||||
};
|
||||
|
||||
static struct w100_mode e750_lcd_mode = {
|
||||
.xres = 240,
|
||||
.yres = 320,
|
||||
.left_margin = 21,
|
||||
.right_margin = 22,
|
||||
.upper_margin = 5,
|
||||
.lower_margin = 4,
|
||||
.crtc_ss = 0x80150014,
|
||||
.crtc_ls = 0x8014000d,
|
||||
.crtc_gs = 0xc1000005,
|
||||
.crtc_vpos_gs = 0x00020147,
|
||||
.crtc_rev = 0x0040010a,
|
||||
.crtc_dclk = 0xa1700030,
|
||||
.crtc_gclk = 0x80cc0015,
|
||||
.crtc_goe = 0x80cc0015,
|
||||
.crtc_ps1_active = 0x61060017,
|
||||
.pll_freq = 57,
|
||||
.pixclk_divider = 4,
|
||||
.pixclk_divider_rotated = 4,
|
||||
.pixclk_src = CLK_SRC_XTAL,
|
||||
.sysclk_divider = 1,
|
||||
.sysclk_src = CLK_SRC_PLL,
|
||||
};
|
||||
|
||||
|
||||
static struct w100_gpio_regs e750_w100_gpio_info = {
|
||||
.init_data1 = 0x01192f1b,
|
||||
.gpio_dir1 = 0xd5ffdeff,
|
||||
.gpio_oe1 = 0x000020bf,
|
||||
.init_data2 = 0x010f010f,
|
||||
.gpio_dir2 = 0xffffffff,
|
||||
.gpio_oe2 = 0x000001cf,
|
||||
};
|
||||
|
||||
static struct w100fb_mach_info e750_fb_info = {
|
||||
.modelist = &e750_lcd_mode,
|
||||
.num_modes = 1,
|
||||
.regs = &e750_lcd_regs,
|
||||
.gpio = &e750_w100_gpio_info,
|
||||
.xtal_freq = 14318000,
|
||||
.xtal_dbl = 1,
|
||||
};
|
||||
|
||||
static struct resource e750_fb_resources[] = {
|
||||
[0] = {
|
||||
.start = 0x0c000000,
|
||||
.end = 0x0cffffff,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
};
|
||||
|
||||
/* ----------------------- device declarations -------------------------- */
|
||||
|
||||
|
||||
static struct platform_device e750_fb_device = {
|
||||
.name = "w100fb",
|
||||
.id = -1,
|
||||
.dev = {
|
||||
.platform_data = &e750_fb_info,
|
||||
},
|
||||
.num_resources = ARRAY_SIZE(e750_fb_resources),
|
||||
.resource = e750_fb_resources,
|
||||
};
|
||||
|
||||
static int e750_lcd_init(void)
|
||||
{
|
||||
if (!machine_is_e750())
|
||||
return -ENODEV;
|
||||
|
||||
return platform_device_register(&e750_fb_device);
|
||||
}
|
||||
|
||||
module_init(e750_lcd_init);
|
||||
|
||||
MODULE_AUTHOR("Ian Molton <spyro@f2s.com>");
|
||||
MODULE_DESCRIPTION("e750 lcd driver");
|
||||
MODULE_LICENSE("GPLv2");
|
159
arch/arm/mach-pxa/e800_lcd.c
Normal file
159
arch/arm/mach-pxa/e800_lcd.c
Normal file
@ -0,0 +1,159 @@
|
||||
/* e800_lcd.c
|
||||
*
|
||||
* This file contains the definitions for the LCD timings and functions
|
||||
* to control the LCD power / frontlighting via the w100fb driver.
|
||||
*
|
||||
* (c) 2005 Ian Molton <spyro@f2s.com>
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
*/
|
||||
|
||||
#include <linux/module.h>
|
||||
#include <linux/device.h>
|
||||
#include <linux/fb.h>
|
||||
#include <linux/err.h>
|
||||
#include <linux/platform_device.h>
|
||||
|
||||
#include <asm/mach-types.h>
|
||||
|
||||
#include <video/w100fb.h>
|
||||
|
||||
static struct w100_gen_regs e800_lcd_regs = {
|
||||
.lcd_format = 0x00008003,
|
||||
.lcdd_cntl1 = 0x02a00000,
|
||||
.lcdd_cntl2 = 0x0003ffff,
|
||||
.genlcd_cntl1 = 0x000ff2a3,
|
||||
.genlcd_cntl2 = 0x000002a3,
|
||||
.genlcd_cntl3 = 0x000102aa,
|
||||
};
|
||||
|
||||
static struct w100_mode e800_lcd_mode[2] = {
|
||||
[0] = {
|
||||
.xres = 480,
|
||||
.yres = 640,
|
||||
.left_margin = 52,
|
||||
.right_margin = 148,
|
||||
.upper_margin = 2,
|
||||
.lower_margin = 6,
|
||||
.crtc_ss = 0x80350034,
|
||||
.crtc_ls = 0x802b0026,
|
||||
.crtc_gs = 0x80160016,
|
||||
.crtc_vpos_gs = 0x00020003,
|
||||
.crtc_rev = 0x0040001d,
|
||||
.crtc_dclk = 0xe0000000,
|
||||
.crtc_gclk = 0x82a50049,
|
||||
.crtc_goe = 0x80ee001c,
|
||||
.crtc_ps1_active = 0x00000000,
|
||||
.pll_freq = 128,
|
||||
.pixclk_divider = 4,
|
||||
.pixclk_divider_rotated = 6,
|
||||
.pixclk_src = CLK_SRC_PLL,
|
||||
.sysclk_divider = 0,
|
||||
.sysclk_src = CLK_SRC_PLL,
|
||||
},
|
||||
[1] = {
|
||||
.xres = 240,
|
||||
.yres = 320,
|
||||
.left_margin = 15,
|
||||
.right_margin = 88,
|
||||
.upper_margin = 0,
|
||||
.lower_margin = 7,
|
||||
.crtc_ss = 0xd010000f,
|
||||
.crtc_ls = 0x80070003,
|
||||
.crtc_gs = 0x80000000,
|
||||
.crtc_vpos_gs = 0x01460147,
|
||||
.crtc_rev = 0x00400003,
|
||||
.crtc_dclk = 0xa1700030,
|
||||
.crtc_gclk = 0x814b0008,
|
||||
.crtc_goe = 0x80cc0015,
|
||||
.crtc_ps1_active = 0x00000000,
|
||||
.pll_freq = 100,
|
||||
.pixclk_divider = 6, /* Wince uses 14 which gives a 7MHz pclk. */
|
||||
.pixclk_divider_rotated = 6, /* we want a 14MHz one (much nicer to look at) */
|
||||
.pixclk_src = CLK_SRC_PLL,
|
||||
.sysclk_divider = 0,
|
||||
.sysclk_src = CLK_SRC_PLL,
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
static struct w100_gpio_regs e800_w100_gpio_info = {
|
||||
.init_data1 = 0xc13fc019,
|
||||
.gpio_dir1 = 0x3e40df7f,
|
||||
.gpio_oe1 = 0x003c3000,
|
||||
.init_data2 = 0x00000000,
|
||||
.gpio_dir2 = 0x00000000,
|
||||
.gpio_oe2 = 0x00000000,
|
||||
};
|
||||
|
||||
static struct w100_mem_info e800_w100_mem_info = {
|
||||
.ext_cntl = 0x09640011,
|
||||
.sdram_mode_reg = 0x00600021,
|
||||
.ext_timing_cntl = 0x10001545,
|
||||
.io_cntl = 0x7ddd7333,
|
||||
.size = 0x1fffff,
|
||||
};
|
||||
|
||||
static void e800_tg_change(struct w100fb_par *par)
|
||||
{
|
||||
unsigned long tmp;
|
||||
|
||||
tmp = w100fb_gpio_read(W100_GPIO_PORT_A);
|
||||
if (par->mode->xres == 480)
|
||||
tmp |= 0x100;
|
||||
else
|
||||
tmp &= ~0x100;
|
||||
w100fb_gpio_write(W100_GPIO_PORT_A, tmp);
|
||||
}
|
||||
|
||||
static struct w100_tg_info e800_tg_info = {
|
||||
.change = e800_tg_change,
|
||||
};
|
||||
|
||||
static struct w100fb_mach_info e800_fb_info = {
|
||||
.modelist = e800_lcd_mode,
|
||||
.num_modes = 2,
|
||||
.regs = &e800_lcd_regs,
|
||||
.gpio = &e800_w100_gpio_info,
|
||||
.mem = &e800_w100_mem_info,
|
||||
.tg = &e800_tg_info,
|
||||
.xtal_freq = 16000000,
|
||||
};
|
||||
|
||||
static struct resource e800_fb_resources[] = {
|
||||
[0] = {
|
||||
.start = 0x0c000000,
|
||||
.end = 0x0cffffff,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
};
|
||||
|
||||
/* ----------------------- device declarations -------------------------- */
|
||||
|
||||
|
||||
static struct platform_device e800_fb_device = {
|
||||
.name = "w100fb",
|
||||
.id = -1,
|
||||
.dev = {
|
||||
.platform_data = &e800_fb_info,
|
||||
},
|
||||
.num_resources = ARRAY_SIZE(e800_fb_resources),
|
||||
.resource = e800_fb_resources,
|
||||
};
|
||||
|
||||
static int e800_lcd_init(void)
|
||||
{
|
||||
if (!machine_is_e800())
|
||||
return -ENODEV;
|
||||
|
||||
return platform_device_register(&e800_fb_device);
|
||||
}
|
||||
|
||||
module_init(e800_lcd_init);
|
||||
|
||||
MODULE_AUTHOR("Ian Molton <spyro@f2s.com>");
|
||||
MODULE_DESCRIPTION("e800 lcd driver");
|
||||
MODULE_LICENSE("GPLv2");
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* Support for CompuLab EM-x270 platform
|
||||
* Support for CompuLab EM-X270 platform
|
||||
*
|
||||
* Copyright (C) 2007 CompuLab, Ltd.
|
||||
* Copyright (C) 2007, 2008 CompuLab, Ltd.
|
||||
* Author: Mike Rapoport <mike@compulab.co.il>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@ -14,31 +14,159 @@
|
||||
|
||||
#include <linux/dm9000.h>
|
||||
#include <linux/rtc-v3020.h>
|
||||
|
||||
#include <linux/mtd/nand.h>
|
||||
#include <linux/mtd/partitions.h>
|
||||
#include <linux/input.h>
|
||||
#include <linux/gpio_keys.h>
|
||||
#include <linux/gpio.h>
|
||||
|
||||
#include <asm/mach-types.h>
|
||||
|
||||
#include <asm/mach/arch.h>
|
||||
|
||||
#include <asm/arch/mfp-pxa27x.h>
|
||||
#include <asm/arch/pxa-regs.h>
|
||||
#include <asm/arch/pxa2xx-gpio.h>
|
||||
#include <asm/arch/pxa27x-udc.h>
|
||||
#include <asm/arch/audio.h>
|
||||
#include <asm/arch/pxafb.h>
|
||||
#include <asm/arch/ohci.h>
|
||||
#include <asm/arch/mmc.h>
|
||||
#include <asm/arch/bitfield.h>
|
||||
#include <asm/arch/pxa27x_keypad.h>
|
||||
|
||||
#include "generic.h"
|
||||
|
||||
/* GPIO IRQ usage */
|
||||
#define EM_X270_MMC_PD (105)
|
||||
#define EM_X270_ETHIRQ IRQ_GPIO(41)
|
||||
#define EM_X270_MMC_IRQ IRQ_GPIO(13)
|
||||
#define GPIO41_ETHIRQ (41)
|
||||
#define GPIO13_MMC_CD (13)
|
||||
#define EM_X270_ETHIRQ IRQ_GPIO(GPIO41_ETHIRQ)
|
||||
#define EM_X270_MMC_CD IRQ_GPIO(GPIO13_MMC_CD)
|
||||
|
||||
static struct resource em_x270_dm9k_resource[] = {
|
||||
/* NAND control GPIOs */
|
||||
#define GPIO11_NAND_CS (11)
|
||||
#define GPIO56_NAND_RB (56)
|
||||
|
||||
static unsigned long em_x270_pin_config[] = {
|
||||
/* AC'97 */
|
||||
GPIO28_AC97_BITCLK,
|
||||
GPIO29_AC97_SDATA_IN_0,
|
||||
GPIO30_AC97_SDATA_OUT,
|
||||
GPIO31_AC97_SYNC,
|
||||
GPIO98_AC97_SYSCLK,
|
||||
GPIO113_AC97_nRESET,
|
||||
|
||||
/* BTUART */
|
||||
GPIO42_BTUART_RXD,
|
||||
GPIO43_BTUART_TXD,
|
||||
GPIO44_BTUART_CTS,
|
||||
GPIO45_BTUART_RTS,
|
||||
|
||||
/* STUART */
|
||||
GPIO46_STUART_RXD,
|
||||
GPIO47_STUART_TXD,
|
||||
|
||||
/* MCI controller */
|
||||
GPIO32_MMC_CLK,
|
||||
GPIO112_MMC_CMD,
|
||||
GPIO92_MMC_DAT_0,
|
||||
GPIO109_MMC_DAT_1,
|
||||
GPIO110_MMC_DAT_2,
|
||||
GPIO111_MMC_DAT_3,
|
||||
|
||||
/* LCD */
|
||||
GPIO58_LCD_LDD_0,
|
||||
GPIO59_LCD_LDD_1,
|
||||
GPIO60_LCD_LDD_2,
|
||||
GPIO61_LCD_LDD_3,
|
||||
GPIO62_LCD_LDD_4,
|
||||
GPIO63_LCD_LDD_5,
|
||||
GPIO64_LCD_LDD_6,
|
||||
GPIO65_LCD_LDD_7,
|
||||
GPIO66_LCD_LDD_8,
|
||||
GPIO67_LCD_LDD_9,
|
||||
GPIO68_LCD_LDD_10,
|
||||
GPIO69_LCD_LDD_11,
|
||||
GPIO70_LCD_LDD_12,
|
||||
GPIO71_LCD_LDD_13,
|
||||
GPIO72_LCD_LDD_14,
|
||||
GPIO73_LCD_LDD_15,
|
||||
GPIO74_LCD_FCLK,
|
||||
GPIO75_LCD_LCLK,
|
||||
GPIO76_LCD_PCLK,
|
||||
GPIO77_LCD_BIAS,
|
||||
|
||||
/* QCI */
|
||||
GPIO84_CIF_FV,
|
||||
GPIO25_CIF_LV,
|
||||
GPIO53_CIF_MCLK,
|
||||
GPIO54_CIF_PCLK,
|
||||
GPIO81_CIF_DD_0,
|
||||
GPIO55_CIF_DD_1,
|
||||
GPIO51_CIF_DD_2,
|
||||
GPIO50_CIF_DD_3,
|
||||
GPIO52_CIF_DD_4,
|
||||
GPIO48_CIF_DD_5,
|
||||
GPIO17_CIF_DD_6,
|
||||
GPIO12_CIF_DD_7,
|
||||
|
||||
/* I2C */
|
||||
GPIO117_I2C_SCL,
|
||||
GPIO118_I2C_SDA,
|
||||
|
||||
/* Keypad */
|
||||
GPIO100_KP_MKIN_0 | WAKEUP_ON_LEVEL_HIGH,
|
||||
GPIO101_KP_MKIN_1 | WAKEUP_ON_LEVEL_HIGH,
|
||||
GPIO102_KP_MKIN_2 | WAKEUP_ON_LEVEL_HIGH,
|
||||
GPIO34_KP_MKIN_3 | WAKEUP_ON_LEVEL_HIGH,
|
||||
GPIO39_KP_MKIN_4 | WAKEUP_ON_LEVEL_HIGH,
|
||||
GPIO99_KP_MKIN_5 | WAKEUP_ON_LEVEL_HIGH,
|
||||
GPIO91_KP_MKIN_6 | WAKEUP_ON_LEVEL_HIGH,
|
||||
GPIO36_KP_MKIN_7 | WAKEUP_ON_LEVEL_HIGH,
|
||||
GPIO103_KP_MKOUT_0,
|
||||
GPIO104_KP_MKOUT_1,
|
||||
GPIO105_KP_MKOUT_2,
|
||||
GPIO106_KP_MKOUT_3,
|
||||
GPIO107_KP_MKOUT_4,
|
||||
GPIO108_KP_MKOUT_5,
|
||||
GPIO96_KP_MKOUT_6,
|
||||
GPIO22_KP_MKOUT_7,
|
||||
|
||||
/* SSP1 */
|
||||
GPIO26_SSP1_RXD,
|
||||
GPIO23_SSP1_SCLK,
|
||||
GPIO24_SSP1_SFRM,
|
||||
GPIO57_SSP1_TXD,
|
||||
|
||||
/* SSP2 */
|
||||
GPIO19_SSP2_SCLK,
|
||||
GPIO14_SSP2_SFRM,
|
||||
GPIO89_SSP2_TXD,
|
||||
GPIO88_SSP2_RXD,
|
||||
|
||||
/* SDRAM and local bus */
|
||||
GPIO15_nCS_1,
|
||||
GPIO78_nCS_2,
|
||||
GPIO79_nCS_3,
|
||||
GPIO80_nCS_4,
|
||||
GPIO49_nPWE,
|
||||
GPIO18_RDY,
|
||||
|
||||
/* GPIO */
|
||||
GPIO1_GPIO | WAKEUP_ON_EDGE_BOTH,
|
||||
|
||||
/* power controls */
|
||||
GPIO20_GPIO | MFP_LPM_DRIVE_LOW, /* GPRS_PWEN */
|
||||
GPIO115_GPIO | MFP_LPM_DRIVE_LOW, /* WLAN_PWEN */
|
||||
|
||||
/* NAND controls */
|
||||
GPIO11_GPIO | MFP_LPM_DRIVE_HIGH, /* NAND CE# */
|
||||
GPIO56_GPIO, /* NAND Ready/Busy */
|
||||
|
||||
/* interrupts */
|
||||
GPIO13_GPIO, /* MMC card detect */
|
||||
GPIO41_GPIO, /* DM9000 interrupt */
|
||||
};
|
||||
|
||||
#if defined(CONFIG_DM9000) || defined(CONFIG_DM9000_MODULE)
|
||||
static struct resource em_x270_dm9000_resource[] = {
|
||||
[0] = {
|
||||
.start = PXA_CS2_PHYS,
|
||||
.end = PXA_CS2_PHYS + 3,
|
||||
@ -56,32 +184,30 @@ static struct resource em_x270_dm9k_resource[] = {
|
||||
}
|
||||
};
|
||||
|
||||
/* for the moment we limit ourselves to 32bit IO until some
|
||||
* better IO routines can be written and tested
|
||||
*/
|
||||
static struct dm9000_plat_data em_x270_dm9k_platdata = {
|
||||
static struct dm9000_plat_data em_x270_dm9000_platdata = {
|
||||
.flags = DM9000_PLATF_32BITONLY,
|
||||
};
|
||||
|
||||
/* Ethernet device */
|
||||
static struct platform_device em_x270_dm9k = {
|
||||
static struct platform_device em_x270_dm9000 = {
|
||||
.name = "dm9000",
|
||||
.id = 0,
|
||||
.num_resources = ARRAY_SIZE(em_x270_dm9k_resource),
|
||||
.resource = em_x270_dm9k_resource,
|
||||
.num_resources = ARRAY_SIZE(em_x270_dm9000_resource),
|
||||
.resource = em_x270_dm9000_resource,
|
||||
.dev = {
|
||||
.platform_data = &em_x270_dm9k_platdata,
|
||||
.platform_data = &em_x270_dm9000_platdata,
|
||||
}
|
||||
};
|
||||
|
||||
/* WM9712 touchscreen controller. Hopefully the driver will make it to
|
||||
* the mainstream sometime */
|
||||
static struct platform_device em_x270_ts = {
|
||||
.name = "wm97xx-ts",
|
||||
.id = -1,
|
||||
};
|
||||
static void __init em_x270_init_dm9000(void)
|
||||
{
|
||||
platform_device_register(&em_x270_dm9000);
|
||||
}
|
||||
#else
|
||||
static inline void em_x270_init_dm9000(void) {}
|
||||
#endif
|
||||
|
||||
/* RTC */
|
||||
/* V3020 RTC */
|
||||
#if defined(CONFIG_RTC_DRV_V3020) || defined(CONFIG_RTC_DRV_V3020_MODULE)
|
||||
static struct resource em_x270_v3020_resource[] = {
|
||||
[0] = {
|
||||
.start = PXA_CS4_PHYS,
|
||||
@ -104,20 +230,26 @@ static struct platform_device em_x270_rtc = {
|
||||
}
|
||||
};
|
||||
|
||||
/* NAND flash */
|
||||
#define GPIO_NAND_CS (11)
|
||||
#define GPIO_NAND_RB (56)
|
||||
static void __init em_x270_init_rtc(void)
|
||||
{
|
||||
platform_device_register(&em_x270_rtc);
|
||||
}
|
||||
#else
|
||||
static inline void em_x270_init_rtc(void) {}
|
||||
#endif
|
||||
|
||||
/* NAND flash */
|
||||
#if defined(CONFIG_MTD_NAND_PLATFORM) || defined(CONFIG_MTD_NAND_PLATFORM_MODULE)
|
||||
static inline void nand_cs_on(void)
|
||||
{
|
||||
GPCR(GPIO_NAND_CS) = GPIO_bit(GPIO_NAND_CS);
|
||||
gpio_set_value(GPIO11_NAND_CS, 0);
|
||||
}
|
||||
|
||||
static void nand_cs_off(void)
|
||||
{
|
||||
dsb();
|
||||
|
||||
GPSR(GPIO_NAND_CS) = GPIO_bit(GPIO_NAND_CS);
|
||||
gpio_set_value(GPIO11_NAND_CS, 1);
|
||||
}
|
||||
|
||||
/* hardware specific access to control-lines */
|
||||
@ -157,7 +289,7 @@ static int em_x270_nand_device_ready(struct mtd_info *mtd)
|
||||
{
|
||||
dsb();
|
||||
|
||||
return GPLR(GPIO_NAND_RB) & GPIO_bit(GPIO_NAND_RB);
|
||||
return gpio_get_value(GPIO56_NAND_RB);
|
||||
}
|
||||
|
||||
static struct mtd_partition em_x270_partition_info[] = {
|
||||
@ -210,16 +342,35 @@ static struct platform_device em_x270_nand = {
|
||||
}
|
||||
};
|
||||
|
||||
/* platform devices */
|
||||
static struct platform_device *platform_devices[] __initdata = {
|
||||
&em_x270_dm9k,
|
||||
&em_x270_ts,
|
||||
&em_x270_rtc,
|
||||
&em_x270_nand,
|
||||
};
|
||||
static void __init em_x270_init_nand(void)
|
||||
{
|
||||
int err;
|
||||
|
||||
err = gpio_request(GPIO11_NAND_CS, "NAND CS");
|
||||
if (err) {
|
||||
pr_warning("EM-X270: failed to request NAND CS gpio\n");
|
||||
return;
|
||||
}
|
||||
|
||||
gpio_direction_output(GPIO11_NAND_CS, 1);
|
||||
|
||||
err = gpio_request(GPIO56_NAND_RB, "NAND R/B");
|
||||
if (err) {
|
||||
pr_warning("EM-X270: failed to request NAND R/B gpio\n");
|
||||
gpio_free(GPIO11_NAND_CS);
|
||||
return;
|
||||
}
|
||||
|
||||
gpio_direction_input(GPIO56_NAND_RB);
|
||||
|
||||
platform_device_register(&em_x270_nand);
|
||||
}
|
||||
#else
|
||||
static inline void em_x270_init_nand(void) {}
|
||||
#endif
|
||||
|
||||
/* PXA27x OHCI controller setup */
|
||||
#if defined(CONFIG_USB_OHCI_HCD) || defined(CONFIG_USB_OHCI_HCD_MODULE)
|
||||
static int em_x270_ohci_init(struct device *dev)
|
||||
{
|
||||
/* Set the Power Control Polarity Low */
|
||||
@ -237,27 +388,23 @@ static struct pxaohci_platform_data em_x270_ohci_platform_data = {
|
||||
.init = em_x270_ohci_init,
|
||||
};
|
||||
|
||||
static void __init em_x270_init_ohci(void)
|
||||
{
|
||||
pxa_set_ohci_info(&em_x270_ohci_platform_data);
|
||||
}
|
||||
#else
|
||||
static inline void em_x270_init_ohci(void) {}
|
||||
#endif
|
||||
|
||||
/* MCI controller setup */
|
||||
#if defined(CONFIG_MMC) || defined(CONFIG_MMC_MODULE)
|
||||
static int em_x270_mci_init(struct device *dev,
|
||||
irq_handler_t em_x270_detect_int,
|
||||
void *data)
|
||||
{
|
||||
int err;
|
||||
|
||||
/* setup GPIO for PXA27x MMC controller */
|
||||
pxa_gpio_mode(GPIO32_MMCCLK_MD);
|
||||
pxa_gpio_mode(GPIO112_MMCCMD_MD);
|
||||
pxa_gpio_mode(GPIO92_MMCDAT0_MD);
|
||||
pxa_gpio_mode(GPIO109_MMCDAT1_MD);
|
||||
pxa_gpio_mode(GPIO110_MMCDAT2_MD);
|
||||
pxa_gpio_mode(GPIO111_MMCDAT3_MD);
|
||||
|
||||
/* EM-X270 uses GPIO13 as SD power enable */
|
||||
pxa_gpio_mode(EM_X270_MMC_PD | GPIO_OUT);
|
||||
|
||||
err = request_irq(EM_X270_MMC_IRQ, em_x270_detect_int,
|
||||
IRQF_DISABLED | IRQF_TRIGGER_FALLING,
|
||||
"MMC card detect", data);
|
||||
int err = request_irq(EM_X270_MMC_CD, em_x270_detect_int,
|
||||
IRQF_DISABLED | IRQF_TRIGGER_FALLING,
|
||||
"MMC card detect", data);
|
||||
if (err) {
|
||||
printk(KERN_ERR "%s: can't request MMC card detect IRQ: %d\n",
|
||||
__func__, err);
|
||||
@ -279,7 +426,8 @@ static void em_x270_mci_setpower(struct device *dev, unsigned int vdd)
|
||||
|
||||
static void em_x270_mci_exit(struct device *dev, void *data)
|
||||
{
|
||||
free_irq(EM_X270_MMC_IRQ, data);
|
||||
int irq = gpio_to_irq(GPIO13_MMC_CD);
|
||||
free_irq(irq, data);
|
||||
}
|
||||
|
||||
static struct pxamci_platform_data em_x270_mci_platform_data = {
|
||||
@ -289,7 +437,16 @@ static struct pxamci_platform_data em_x270_mci_platform_data = {
|
||||
.exit = em_x270_mci_exit,
|
||||
};
|
||||
|
||||
static void __init em_x270_init_mmc(void)
|
||||
{
|
||||
pxa_set_mci_info(&em_x270_mci_platform_data);
|
||||
}
|
||||
#else
|
||||
static inline void em_x270_init_mmc(void) {}
|
||||
#endif
|
||||
|
||||
/* LCD 480x640 */
|
||||
#if defined(CONFIG_FB_PXA) || defined(CONFIG_FB_PXA_MODULE)
|
||||
static struct pxafb_mode_info em_x270_lcd_mode = {
|
||||
.pixclock = 50000,
|
||||
.bpp = 16,
|
||||
@ -307,40 +464,96 @@ static struct pxafb_mode_info em_x270_lcd_mode = {
|
||||
static struct pxafb_mach_info em_x270_lcd = {
|
||||
.modes = &em_x270_lcd_mode,
|
||||
.num_modes = 1,
|
||||
.cmap_inverse = 0,
|
||||
.cmap_static = 0,
|
||||
.lccr0 = LCCR0_PAS,
|
||||
.lccr3 = LCCR3_PixClkDiv(0x01) | LCCR3_Acb(0xff),
|
||||
.lcd_conn = LCD_COLOR_TFT_16BPP,
|
||||
};
|
||||
static void __init em_x270_init_lcd(void)
|
||||
{
|
||||
set_pxa_fb_info(&em_x270_lcd);
|
||||
}
|
||||
#else
|
||||
static inline void em_x270_init_lcd(void) {}
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_SND_PXA2XX_AC97) || defined(CONFIG_SND_PXA2XX_AC97_MODULE)
|
||||
static void __init em_x270_init_ac97(void)
|
||||
{
|
||||
pxa_set_ac97_info(NULL);
|
||||
}
|
||||
#else
|
||||
static inline void em_x270_init_ac97(void) {}
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_KEYBOARD_PXA27x) || defined(CONFIG_KEYBOARD_PXA27x_MODULE)
|
||||
static unsigned int em_x270_matrix_keys[] = {
|
||||
KEY(0, 0, KEY_A), KEY(1, 0, KEY_UP), KEY(2, 1, KEY_B),
|
||||
KEY(0, 2, KEY_LEFT), KEY(1, 1, KEY_ENTER), KEY(2, 0, KEY_RIGHT),
|
||||
KEY(0, 1, KEY_C), KEY(1, 2, KEY_DOWN), KEY(2, 2, KEY_D),
|
||||
};
|
||||
|
||||
struct pxa27x_keypad_platform_data em_x270_keypad_info = {
|
||||
/* code map for the matrix keys */
|
||||
.matrix_key_rows = 3,
|
||||
.matrix_key_cols = 3,
|
||||
.matrix_key_map = em_x270_matrix_keys,
|
||||
.matrix_key_map_size = ARRAY_SIZE(em_x270_matrix_keys),
|
||||
};
|
||||
|
||||
static void __init em_x270_init_keypad(void)
|
||||
{
|
||||
pxa_set_keypad_info(&em_x270_keypad_info);
|
||||
}
|
||||
#else
|
||||
static inline void em_x270_init_keypad(void) {}
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE)
|
||||
static struct gpio_keys_button gpio_keys_button[] = {
|
||||
[0] = {
|
||||
.desc = "sleep/wakeup",
|
||||
.code = KEY_SUSPEND,
|
||||
.type = EV_PWR,
|
||||
.gpio = 1,
|
||||
.wakeup = 1,
|
||||
},
|
||||
};
|
||||
|
||||
static struct gpio_keys_platform_data em_x270_gpio_keys_data = {
|
||||
.buttons = gpio_keys_button,
|
||||
.nbuttons = 1,
|
||||
};
|
||||
|
||||
static struct platform_device em_x270_gpio_keys = {
|
||||
.name = "gpio-keys",
|
||||
.id = -1,
|
||||
.dev = {
|
||||
.platform_data = &em_x270_gpio_keys_data,
|
||||
},
|
||||
};
|
||||
|
||||
static void __init em_x270_init_gpio_keys(void)
|
||||
{
|
||||
platform_device_register(&em_x270_gpio_keys);
|
||||
}
|
||||
#else
|
||||
static inline void em_x270_init_gpio_keys(void) {}
|
||||
#endif
|
||||
|
||||
static void __init em_x270_init(void)
|
||||
{
|
||||
/* setup LCD */
|
||||
set_pxa_fb_info(&em_x270_lcd);
|
||||
pxa2xx_mfp_config(ARRAY_AND_SIZE(em_x270_pin_config));
|
||||
|
||||
/* register EM-X270 platform devices */
|
||||
platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices));
|
||||
pxa_set_ac97_info(NULL);
|
||||
|
||||
/* set MCI and OHCI platform parameters */
|
||||
pxa_set_mci_info(&em_x270_mci_platform_data);
|
||||
pxa_set_ohci_info(&em_x270_ohci_platform_data);
|
||||
|
||||
/* setup STUART GPIOs */
|
||||
pxa_gpio_mode(GPIO46_STRXD_MD);
|
||||
pxa_gpio_mode(GPIO47_STTXD_MD);
|
||||
|
||||
/* setup BTUART GPIOs */
|
||||
pxa_gpio_mode(GPIO42_BTRXD_MD);
|
||||
pxa_gpio_mode(GPIO43_BTTXD_MD);
|
||||
pxa_gpio_mode(GPIO44_BTCTS_MD);
|
||||
pxa_gpio_mode(GPIO45_BTRTS_MD);
|
||||
|
||||
/* Setup interrupt for dm9000 */
|
||||
set_irq_type(EM_X270_ETHIRQ, IRQT_RISING);
|
||||
em_x270_init_dm9000();
|
||||
em_x270_init_rtc();
|
||||
em_x270_init_nand();
|
||||
em_x270_init_lcd();
|
||||
em_x270_init_mmc();
|
||||
em_x270_init_ohci();
|
||||
em_x270_init_keypad();
|
||||
em_x270_init_gpio_keys();
|
||||
em_x270_init_ac97();
|
||||
}
|
||||
|
||||
MACHINE_START(EM_X270, "Compulab EM-x270")
|
||||
MACHINE_START(EM_X270, "Compulab EM-X270")
|
||||
.boot_params = 0xa0000100,
|
||||
.phys_io = 0x40000000,
|
||||
.io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc,
|
||||
|
@ -17,7 +17,7 @@
|
||||
#include <asm/arch/hardware.h>
|
||||
#include <asm/mach-types.h>
|
||||
|
||||
#include <generic.h>
|
||||
#include "generic.h"
|
||||
|
||||
/* Only e800 has 128MB RAM */
|
||||
static void __init eseries_fixup(struct machine_desc *desc,
|
||||
@ -47,6 +47,19 @@ MACHINE_START(E330, "Toshiba e330")
|
||||
MACHINE_END
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_MACH_E350
|
||||
MACHINE_START(E350, "Toshiba e350")
|
||||
/* Maintainer: Ian Molton (spyro@f2s.com) */
|
||||
.phys_io = 0x40000000,
|
||||
.io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc,
|
||||
.boot_params = 0xa0000100,
|
||||
.map_io = pxa_map_io,
|
||||
.init_irq = pxa25x_init_irq,
|
||||
.fixup = eseries_fixup,
|
||||
.timer = &pxa_timer,
|
||||
MACHINE_END
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_MACH_E740
|
||||
MACHINE_START(E740, "Toshiba e740")
|
||||
/* Maintainer: Ian Molton (spyro@f2s.com) */
|
||||
|
57
arch/arm/mach-pxa/eseries_udc.c
Normal file
57
arch/arm/mach-pxa/eseries_udc.c
Normal file
@ -0,0 +1,57 @@
|
||||
/*
|
||||
* UDC functions for the Toshiba e-series PDAs
|
||||
*
|
||||
* Copyright (c) Ian Molton 2003
|
||||
*
|
||||
* This file is licensed under
|
||||
* the terms of the GNU General Public License version 2. This program
|
||||
* is licensed "as is" without any warranty of any kind, whether express
|
||||
* or implied.
|
||||
*
|
||||
*/
|
||||
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/device.h>
|
||||
|
||||
#include <asm/arch/udc.h>
|
||||
#include <asm/arch/eseries-gpio.h>
|
||||
#include <asm/arch/hardware.h>
|
||||
#include <asm/arch/pxa-regs.h>
|
||||
#include <asm/mach/arch.h>
|
||||
#include <asm/mach-types.h>
|
||||
#include <asm/mach/map.h>
|
||||
#include <asm/domain.h>
|
||||
|
||||
/* local PXA generic code */
|
||||
#include "generic.h"
|
||||
|
||||
static struct pxa2xx_udc_mach_info e7xx_udc_mach_info = {
|
||||
.gpio_vbus = GPIO_E7XX_USB_DISC,
|
||||
.gpio_pullup = GPIO_E7XX_USB_PULLUP,
|
||||
.gpio_pullup_inverted = 1
|
||||
};
|
||||
|
||||
static struct pxa2xx_udc_mach_info e800_udc_mach_info = {
|
||||
.gpio_vbus = GPIO_E800_USB_DISC,
|
||||
.gpio_pullup = GPIO_E800_USB_PULLUP,
|
||||
.gpio_pullup_inverted = 1
|
||||
};
|
||||
|
||||
static int __init eseries_udc_init(void)
|
||||
{
|
||||
if (machine_is_e330() || machine_is_e350() ||
|
||||
machine_is_e740() || machine_is_e750() ||
|
||||
machine_is_e400())
|
||||
pxa_set_udc_info(&e7xx_udc_mach_info);
|
||||
else if (machine_is_e800())
|
||||
pxa_set_udc_info(&e800_udc_mach_info);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
module_init(eseries_udc_init);
|
||||
|
||||
MODULE_AUTHOR("Ian Molton <spyro@f2s.com>");
|
||||
MODULE_DESCRIPTION("eseries UDC support");
|
||||
MODULE_LICENSE("GPLv2");
|
220
arch/arm/mach-pxa/ezx.c
Normal file
220
arch/arm/mach-pxa/ezx.c
Normal file
@ -0,0 +1,220 @@
|
||||
/*
|
||||
* ezx.c - Common code for the EZX platform.
|
||||
*
|
||||
* Copyright (C) 2005-2006 Harald Welte <laforge@openezx.org>,
|
||||
* 2007-2008 Daniel Ribeiro <drwyrm@gmail.com>,
|
||||
* 2007-2008 Stefan Schmidt <stefan@datenfreihafen.org>
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
*/
|
||||
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/delay.h>
|
||||
#include <linux/pwm_backlight.h>
|
||||
|
||||
#include <asm/setup.h>
|
||||
#include <asm/arch/pxafb.h>
|
||||
#include <asm/arch/ohci.h>
|
||||
#include <asm/arch/i2c.h>
|
||||
|
||||
#include <asm/arch/mfp-pxa27x.h>
|
||||
#include <asm/arch/pxa-regs.h>
|
||||
#include <asm/arch/pxa2xx-regs.h>
|
||||
#include <asm/mach-types.h>
|
||||
#include <asm/mach/arch.h>
|
||||
|
||||
#include "devices.h"
|
||||
#include "generic.h"
|
||||
|
||||
static struct platform_pwm_backlight_data ezx_backlight_data = {
|
||||
.pwm_id = 0,
|
||||
.max_brightness = 1023,
|
||||
.dft_brightness = 1023,
|
||||
.pwm_period_ns = 78770,
|
||||
};
|
||||
|
||||
static struct platform_device ezx_backlight_device = {
|
||||
.name = "pwm-backlight",
|
||||
.dev = {
|
||||
.parent = &pxa27x_device_pwm0.dev,
|
||||
.platform_data = &ezx_backlight_data,
|
||||
},
|
||||
};
|
||||
|
||||
static struct pxafb_mode_info mode_ezx_old = {
|
||||
.pixclock = 150000,
|
||||
.xres = 240,
|
||||
.yres = 320,
|
||||
.bpp = 16,
|
||||
.hsync_len = 10,
|
||||
.left_margin = 20,
|
||||
.right_margin = 10,
|
||||
.vsync_len = 2,
|
||||
.upper_margin = 3,
|
||||
.lower_margin = 2,
|
||||
.sync = 0,
|
||||
};
|
||||
|
||||
static struct pxafb_mach_info ezx_fb_info_1 = {
|
||||
.modes = &mode_ezx_old,
|
||||
.num_modes = 1,
|
||||
.lcd_conn = LCD_COLOR_TFT_16BPP,
|
||||
};
|
||||
|
||||
static struct pxafb_mode_info mode_72r89803y01 = {
|
||||
.pixclock = 192308,
|
||||
.xres = 240,
|
||||
.yres = 320,
|
||||
.bpp = 32,
|
||||
.depth = 18,
|
||||
.hsync_len = 10,
|
||||
.left_margin = 20,
|
||||
.right_margin = 10,
|
||||
.vsync_len = 2,
|
||||
.upper_margin = 3,
|
||||
.lower_margin = 2,
|
||||
.sync = 0,
|
||||
};
|
||||
|
||||
static struct pxafb_mach_info ezx_fb_info_2 = {
|
||||
.modes = &mode_72r89803y01,
|
||||
.num_modes = 1,
|
||||
.lcd_conn = LCD_COLOR_TFT_18BPP,
|
||||
};
|
||||
|
||||
static struct platform_device *devices[] __initdata = {
|
||||
&ezx_backlight_device,
|
||||
};
|
||||
|
||||
static unsigned long ezx_pin_config[] __initdata = {
|
||||
/* PWM backlight */
|
||||
GPIO16_PWM0_OUT,
|
||||
|
||||
/* BTUART */
|
||||
GPIO42_BTUART_RXD,
|
||||
GPIO43_BTUART_TXD,
|
||||
GPIO44_BTUART_CTS,
|
||||
GPIO45_BTUART_RTS,
|
||||
|
||||
/* STUART */
|
||||
GPIO46_STUART_RXD,
|
||||
GPIO47_STUART_TXD,
|
||||
|
||||
/* For A780 support (connected with Neptune GSM chip) */
|
||||
GPIO30_USB_P3_2, /* ICL_TXENB */
|
||||
GPIO31_USB_P3_6, /* ICL_VPOUT */
|
||||
GPIO90_USB_P3_5, /* ICL_VPIN */
|
||||
GPIO91_USB_P3_1, /* ICL_XRXD */
|
||||
GPIO56_USB_P3_4, /* ICL_VMOUT */
|
||||
GPIO113_USB_P3_3, /* /ICL_VMIN */
|
||||
};
|
||||
|
||||
static void __init ezx_init(void)
|
||||
{
|
||||
pxa2xx_mfp_config(ARRAY_AND_SIZE(ezx_pin_config));
|
||||
pxa_set_i2c_info(NULL);
|
||||
if (machine_is_ezx_a780() || machine_is_ezx_e680())
|
||||
set_pxa_fb_info(&ezx_fb_info_1);
|
||||
else
|
||||
set_pxa_fb_info(&ezx_fb_info_2);
|
||||
|
||||
platform_add_devices(devices, ARRAY_SIZE(devices));
|
||||
}
|
||||
|
||||
static void __init ezx_fixup(struct machine_desc *desc, struct tag *tags,
|
||||
char **cmdline, struct meminfo *mi)
|
||||
{
|
||||
/* We have two ram chips. First one with 32MB at 0xA0000000 and a second
|
||||
* 16MB one at 0xAC000000
|
||||
*/
|
||||
mi->nr_banks = 2;
|
||||
mi->bank[0].start = 0xa0000000;
|
||||
mi->bank[0].node = 0;
|
||||
mi->bank[0].size = (32*1024*1024);
|
||||
mi->bank[1].start = 0xac000000;
|
||||
mi->bank[1].node = 1;
|
||||
mi->bank[1].size = (16*1024*1024);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_MACH_EZX_A780
|
||||
MACHINE_START(EZX_A780, "Motorola EZX A780")
|
||||
.phys_io = 0x40000000,
|
||||
.io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc,
|
||||
.fixup = ezx_fixup,
|
||||
.boot_params = 0xa0000100,
|
||||
.map_io = pxa_map_io,
|
||||
.init_irq = pxa27x_init_irq,
|
||||
.timer = &pxa_timer,
|
||||
.init_machine = &ezx_init,
|
||||
MACHINE_END
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_MACH_EZX_E680
|
||||
MACHINE_START(EZX_E680, "Motorola EZX E680")
|
||||
.phys_io = 0x40000000,
|
||||
.io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc,
|
||||
.fixup = ezx_fixup,
|
||||
.boot_params = 0xa0000100,
|
||||
.map_io = pxa_map_io,
|
||||
.init_irq = pxa27x_init_irq,
|
||||
.timer = &pxa_timer,
|
||||
.init_machine = &ezx_init,
|
||||
MACHINE_END
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_MACH_EZX_A1200
|
||||
MACHINE_START(EZX_A1200, "Motorola EZX A1200")
|
||||
.phys_io = 0x40000000,
|
||||
.io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc,
|
||||
.fixup = ezx_fixup,
|
||||
.boot_params = 0xa0000100,
|
||||
.map_io = pxa_map_io,
|
||||
.init_irq = pxa27x_init_irq,
|
||||
.timer = &pxa_timer,
|
||||
.init_machine = &ezx_init,
|
||||
MACHINE_END
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_MACH_EZX_A910
|
||||
MACHINE_START(EZX_A910, "Motorola EZX A910")
|
||||
.phys_io = 0x40000000,
|
||||
.io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc,
|
||||
.fixup = ezx_fixup,
|
||||
.boot_params = 0xa0000100,
|
||||
.map_io = pxa_map_io,
|
||||
.init_irq = pxa27x_init_irq,
|
||||
.timer = &pxa_timer,
|
||||
.init_machine = &ezx_init,
|
||||
MACHINE_END
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_MACH_EZX_E6
|
||||
MACHINE_START(EZX_E6, "Motorola EZX E6")
|
||||
.phys_io = 0x40000000,
|
||||
.io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc,
|
||||
.fixup = ezx_fixup,
|
||||
.boot_params = 0xa0000100,
|
||||
.map_io = pxa_map_io,
|
||||
.init_irq = pxa27x_init_irq,
|
||||
.timer = &pxa_timer,
|
||||
.init_machine = &ezx_init,
|
||||
MACHINE_END
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_MACH_EZX_E2
|
||||
MACHINE_START(EZX_E2, "Motorola EZX E2")
|
||||
.phys_io = 0x40000000,
|
||||
.io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc,
|
||||
.fixup = ezx_fixup,
|
||||
.boot_params = 0xa0000100,
|
||||
.map_io = pxa_map_io,
|
||||
.init_irq = pxa27x_init_irq,
|
||||
.timer = &pxa_timer,
|
||||
.init_machine = &ezx_init,
|
||||
MACHINE_END
|
||||
#endif
|
@ -20,6 +20,7 @@
|
||||
#include <linux/delay.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/clk.h>
|
||||
#include <linux/smc91x.h>
|
||||
|
||||
#include <asm/types.h>
|
||||
#include <asm/setup.h>
|
||||
@ -38,6 +39,7 @@
|
||||
#include <asm/arch/pxafb.h>
|
||||
#include <asm/arch/ssp.h>
|
||||
#include <asm/arch/pxa27x_keypad.h>
|
||||
#include <asm/arch/pxa3xx_nand.h>
|
||||
#include <asm/arch/littleton.h>
|
||||
|
||||
#include "generic.h"
|
||||
@ -101,18 +103,26 @@ static struct resource smc91x_resources[] = {
|
||||
[1] = {
|
||||
.start = IRQ_GPIO(mfp_to_gpio(MFP_PIN_GPIO90)),
|
||||
.end = IRQ_GPIO(mfp_to_gpio(MFP_PIN_GPIO90)),
|
||||
.flags = IORESOURCE_IRQ | IRQF_TRIGGER_FALLING,
|
||||
.flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWEDGE,
|
||||
}
|
||||
};
|
||||
|
||||
static struct smc91x_platdata littleton_smc91x_info = {
|
||||
.flags = SMC91X_USE_8BIT | SMC91X_USE_16BIT |
|
||||
SMC91X_NOWAIT | SMC91X_USE_DMA,
|
||||
};
|
||||
|
||||
static struct platform_device smc91x_device = {
|
||||
.name = "smc91x",
|
||||
.id = 0,
|
||||
.num_resources = ARRAY_SIZE(smc91x_resources),
|
||||
.resource = smc91x_resources,
|
||||
.dev = {
|
||||
.platform_data = &littleton_smc91x_info,
|
||||
},
|
||||
};
|
||||
|
||||
#if defined(CONFIG_FB_PXA) || defined(CONFIG_FB_PXA_MODULES)
|
||||
#if defined(CONFIG_FB_PXA) || defined(CONFIG_FB_PXA_MODULE)
|
||||
/* use bit 30, 31 as the indicator of command parameter number */
|
||||
#define CMD0(x) ((0x00000000) | ((x) << 9))
|
||||
#define CMD1(x, x1) ((0x40000000) | ((x) << 9) | 0x100 | (x1))
|
||||
@ -311,9 +321,9 @@ static void littleton_init_lcd(void)
|
||||
}
|
||||
#else
|
||||
static inline void littleton_init_lcd(void) {};
|
||||
#endif /* CONFIG_FB_PXA || CONFIG_FB_PXA_MODULES */
|
||||
#endif /* CONFIG_FB_PXA || CONFIG_FB_PXA_MODULE */
|
||||
|
||||
#if defined(CONFIG_KEYBOARD_PXA27x) || defined(CONFIG_KEYBOARD_PXA27x_MODULES)
|
||||
#if defined(CONFIG_KEYBOARD_PXA27x) || defined(CONFIG_KEYBOARD_PXA27x_MODULE)
|
||||
static unsigned int littleton_matrix_key_map[] = {
|
||||
/* KEY(row, col, key_code) */
|
||||
KEY(1, 3, KEY_0), KEY(0, 0, KEY_1), KEY(1, 0, KEY_2), KEY(2, 0, KEY_3),
|
||||
@ -361,6 +371,57 @@ static void __init littleton_init_keypad(void)
|
||||
static inline void littleton_init_keypad(void) {}
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_MTD_NAND_PXA3xx) || defined(CONFIG_MTD_NAND_PXA3xx_MODULE)
|
||||
static struct mtd_partition littleton_nand_partitions[] = {
|
||||
[0] = {
|
||||
.name = "Bootloader",
|
||||
.offset = 0,
|
||||
.size = 0x060000,
|
||||
.mask_flags = MTD_WRITEABLE, /* force read-only */
|
||||
},
|
||||
[1] = {
|
||||
.name = "Kernel",
|
||||
.offset = 0x060000,
|
||||
.size = 0x200000,
|
||||
.mask_flags = MTD_WRITEABLE, /* force read-only */
|
||||
},
|
||||
[2] = {
|
||||
.name = "Filesystem",
|
||||
.offset = 0x0260000,
|
||||
.size = 0x3000000, /* 48M - rootfs */
|
||||
},
|
||||
[3] = {
|
||||
.name = "MassStorage",
|
||||
.offset = 0x3260000,
|
||||
.size = 0x3d40000,
|
||||
},
|
||||
[4] = {
|
||||
.name = "BBT",
|
||||
.offset = 0x6FA0000,
|
||||
.size = 0x80000,
|
||||
.mask_flags = MTD_WRITEABLE, /* force read-only */
|
||||
},
|
||||
/* NOTE: we reserve some blocks at the end of the NAND flash for
|
||||
* bad block management, and the max number of relocation blocks
|
||||
* differs on different platforms. Please take care with it when
|
||||
* defining the partition table.
|
||||
*/
|
||||
};
|
||||
|
||||
static struct pxa3xx_nand_platform_data littleton_nand_info = {
|
||||
.enable_arbiter = 1,
|
||||
.parts = littleton_nand_partitions,
|
||||
.nr_parts = ARRAY_SIZE(littleton_nand_partitions),
|
||||
};
|
||||
|
||||
static void __init littleton_init_nand(void)
|
||||
{
|
||||
pxa3xx_set_nand_info(&littleton_nand_info);
|
||||
}
|
||||
#else
|
||||
static inline void littleton_init_nand(void) {}
|
||||
#endif /* CONFIG_MTD_NAND_PXA3xx || CONFIG_MTD_NAND_PXA3xx_MODULE */
|
||||
|
||||
static void __init littleton_init(void)
|
||||
{
|
||||
/* initialize MFP configurations */
|
||||
@ -374,6 +435,7 @@ static void __init littleton_init(void)
|
||||
|
||||
littleton_init_lcd();
|
||||
littleton_init_keypad();
|
||||
littleton_init_nand();
|
||||
}
|
||||
|
||||
MACHINE_START(LITTLETON, "Marvell Form Factor Development Platform (aka Littleton)")
|
||||
|
@ -21,6 +21,7 @@
|
||||
#include <linux/interrupt.h>
|
||||
#include <linux/mtd/mtd.h>
|
||||
#include <linux/mtd/partitions.h>
|
||||
#include <linux/smc91x.h>
|
||||
|
||||
#include <linux/spi/spi.h>
|
||||
#include <linux/spi/ads7846.h>
|
||||
@ -226,14 +227,6 @@ static struct pxa2xx_spi_master pxa_ssp_master_info = {
|
||||
.num_chipselect = 0,
|
||||
};
|
||||
|
||||
static struct platform_device pxa_ssp = {
|
||||
.name = "pxa2xx-spi",
|
||||
.id = 1,
|
||||
.dev = {
|
||||
.platform_data = &pxa_ssp_master_info,
|
||||
},
|
||||
};
|
||||
|
||||
static int lubbock_ads7846_pendown_state(void)
|
||||
{
|
||||
/* TS_BUSY is bit 8 in LUB_MISC_RD, but pendown is irq-only */
|
||||
@ -292,11 +285,18 @@ static struct resource smc91x_resources[] = {
|
||||
},
|
||||
};
|
||||
|
||||
static struct smc91x_platdata lubbock_smc91x_info = {
|
||||
.flags = SMC91X_USE_16BIT | SMC91X_NOWAIT | SMC91X_IO_SHIFT_2,
|
||||
};
|
||||
|
||||
static struct platform_device smc91x_device = {
|
||||
.name = "smc91x",
|
||||
.id = -1,
|
||||
.num_resources = ARRAY_SIZE(smc91x_resources),
|
||||
.resource = smc91x_resources,
|
||||
.dev = {
|
||||
.platform_data = &lubbock_smc91x_info,
|
||||
},
|
||||
};
|
||||
|
||||
static struct resource flash_resources[] = {
|
||||
@ -367,7 +367,6 @@ static struct platform_device *devices[] __initdata = {
|
||||
&smc91x_device,
|
||||
&lubbock_flash_device[0],
|
||||
&lubbock_flash_device[1],
|
||||
&pxa_ssp,
|
||||
};
|
||||
|
||||
static struct pxafb_mode_info sharp_lm8v31_mode = {
|
||||
@ -471,6 +470,7 @@ static void lubbock_irda_transceiver_mode(struct device *dev, int mode)
|
||||
} else if (mode & IR_FIRMODE) {
|
||||
LUB_MISC_WR |= 1 << 4;
|
||||
}
|
||||
pxa2xx_transceiver_mode(dev, mode);
|
||||
local_irq_restore(flags);
|
||||
}
|
||||
|
||||
@ -501,6 +501,7 @@ static void __init lubbock_init(void)
|
||||
lubbock_flash_data[flashboot].name = "boot-rom";
|
||||
(void) platform_add_devices(devices, ARRAY_SIZE(devices));
|
||||
|
||||
pxa2xx_set_spi_info(1, &pxa_ssp_master_info);
|
||||
spi_register_board_info(spi_board_info, ARRAY_SIZE(spi_board_info));
|
||||
}
|
||||
|
||||
|
@ -17,17 +17,15 @@
|
||||
#include <linux/init.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/delay.h>
|
||||
#include <linux/gpio.h>
|
||||
#include <linux/gpio_keys.h>
|
||||
#include <linux/input.h>
|
||||
#include <linux/mfd/htc-egpio.h>
|
||||
#include <linux/mfd/htc-pasic3.h>
|
||||
#include <linux/mtd/mtd.h>
|
||||
#include <linux/mtd/map.h>
|
||||
#include <linux/mtd/physmap.h>
|
||||
#include <linux/pda_power.h>
|
||||
#include <linux/pwm_backlight.h>
|
||||
|
||||
#include <asm/gpio.h>
|
||||
#include <asm/hardware.h>
|
||||
#include <asm/mach-types.h>
|
||||
#include <asm/mach/arch.h>
|
||||
@ -44,7 +42,7 @@
|
||||
#include "devices.h"
|
||||
#include "generic.h"
|
||||
|
||||
static unsigned long magician_pin_config[] = {
|
||||
static unsigned long magician_pin_config[] __initdata = {
|
||||
|
||||
/* SDRAM and Static Memory I/O Signals */
|
||||
GPIO20_nSDCS_2,
|
||||
@ -134,6 +132,7 @@ static unsigned long magician_pin_config[] = {
|
||||
static void magician_irda_transceiver_mode(struct device *dev, int mode)
|
||||
{
|
||||
gpio_set_value(GPIO83_MAGICIAN_nIR_EN, mode & IR_OFF);
|
||||
pxa2xx_transceiver_mode(dev, mode);
|
||||
}
|
||||
|
||||
static struct pxaficp_platform_data magician_ficp_info = {
|
||||
@ -399,6 +398,7 @@ static struct platform_pwm_backlight_data backlight_data = {
|
||||
|
||||
static struct platform_device backlight = {
|
||||
.name = "pwm-backlight",
|
||||
.id = -1,
|
||||
.dev = {
|
||||
.parent = &pxa27x_device_pwm0.dev,
|
||||
.platform_data = &backlight_data,
|
||||
@ -511,6 +511,37 @@ static struct platform_device pasic3 = {
|
||||
* External power
|
||||
*/
|
||||
|
||||
static int power_supply_init(struct device *dev)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = gpio_request(EGPIO_MAGICIAN_CABLE_STATE_AC, "CABLE_STATE_AC");
|
||||
if (ret)
|
||||
goto err_cs_ac;
|
||||
ret = gpio_request(EGPIO_MAGICIAN_CABLE_STATE_USB, "CABLE_STATE_USB");
|
||||
if (ret)
|
||||
goto err_cs_usb;
|
||||
ret = gpio_request(EGPIO_MAGICIAN_CHARGE_EN, "CHARGE_EN");
|
||||
if (ret)
|
||||
goto err_chg_en;
|
||||
ret = gpio_request(GPIO30_MAGICIAN_nCHARGE_EN, "nCHARGE_EN");
|
||||
if (!ret)
|
||||
ret = gpio_direction_output(GPIO30_MAGICIAN_nCHARGE_EN, 0);
|
||||
if (ret)
|
||||
goto err_nchg_en;
|
||||
|
||||
return 0;
|
||||
|
||||
err_nchg_en:
|
||||
gpio_free(EGPIO_MAGICIAN_CHARGE_EN);
|
||||
err_chg_en:
|
||||
gpio_free(EGPIO_MAGICIAN_CABLE_STATE_USB);
|
||||
err_cs_usb:
|
||||
gpio_free(EGPIO_MAGICIAN_CABLE_STATE_AC);
|
||||
err_cs_ac:
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int magician_is_ac_online(void)
|
||||
{
|
||||
return gpio_get_value(EGPIO_MAGICIAN_CABLE_STATE_AC);
|
||||
@ -527,14 +558,24 @@ static void magician_set_charge(int flags)
|
||||
gpio_set_value(EGPIO_MAGICIAN_CHARGE_EN, flags);
|
||||
}
|
||||
|
||||
static void power_supply_exit(struct device *dev)
|
||||
{
|
||||
gpio_free(GPIO30_MAGICIAN_nCHARGE_EN);
|
||||
gpio_free(EGPIO_MAGICIAN_CHARGE_EN);
|
||||
gpio_free(EGPIO_MAGICIAN_CABLE_STATE_USB);
|
||||
gpio_free(EGPIO_MAGICIAN_CABLE_STATE_AC);
|
||||
}
|
||||
|
||||
static char *magician_supplicants[] = {
|
||||
"ds2760-battery.0", "backup-battery"
|
||||
};
|
||||
|
||||
static struct pda_power_pdata power_supply_info = {
|
||||
.init = power_supply_init,
|
||||
.is_ac_online = magician_is_ac_online,
|
||||
.is_usb_online = magician_is_usb_online,
|
||||
.set_charge = magician_set_charge,
|
||||
.exit = power_supply_exit,
|
||||
.supplied_to = magician_supplicants,
|
||||
.num_supplicants = ARRAY_SIZE(magician_supplicants),
|
||||
};
|
||||
|
@ -26,6 +26,7 @@
|
||||
#include <linux/input.h>
|
||||
#include <linux/gpio_keys.h>
|
||||
#include <linux/pwm_backlight.h>
|
||||
#include <linux/smc91x.h>
|
||||
|
||||
#include <asm/types.h>
|
||||
#include <asm/setup.h>
|
||||
@ -110,9 +111,9 @@ static unsigned long mainstone_pin_config[] = {
|
||||
GPIO45_AC97_SYSCLK,
|
||||
|
||||
/* Keypad */
|
||||
GPIO93_KP_DKIN_0 | WAKEUP_ON_LEVEL_HIGH,
|
||||
GPIO94_KP_DKIN_1 | WAKEUP_ON_LEVEL_HIGH,
|
||||
GPIO95_KP_DKIN_2 | WAKEUP_ON_LEVEL_HIGH,
|
||||
GPIO93_KP_DKIN_0,
|
||||
GPIO94_KP_DKIN_1,
|
||||
GPIO95_KP_DKIN_2,
|
||||
GPIO100_KP_MKIN_0 | WAKEUP_ON_LEVEL_HIGH,
|
||||
GPIO101_KP_MKIN_1 | WAKEUP_ON_LEVEL_HIGH,
|
||||
GPIO102_KP_MKIN_2 | WAKEUP_ON_LEVEL_HIGH,
|
||||
@ -240,11 +241,19 @@ static struct resource smc91x_resources[] = {
|
||||
}
|
||||
};
|
||||
|
||||
static struct smc91x_platdata mainstone_smc91x_info = {
|
||||
.flags = SMC91X_USE_8BIT | SMC91X_USE_16BIT | SMC91X_USE_32BIT |
|
||||
SMC91X_NOWAIT | SMC91X_USE_DMA,
|
||||
};
|
||||
|
||||
static struct platform_device smc91x_device = {
|
||||
.name = "smc91x",
|
||||
.id = 0,
|
||||
.num_resources = ARRAY_SIZE(smc91x_resources),
|
||||
.resource = smc91x_resources,
|
||||
.dev = {
|
||||
.platform_data = &mainstone_smc91x_info,
|
||||
},
|
||||
};
|
||||
|
||||
static int mst_audio_startup(struct snd_pcm_substream *substream, void *priv)
|
||||
@ -455,6 +464,7 @@ static void mainstone_irda_transceiver_mode(struct device *dev, int mode)
|
||||
} else if (mode & IR_FIRMODE) {
|
||||
MST_MSCWR1 |= MST_MSCWR1_IRDA_FIR;
|
||||
}
|
||||
pxa2xx_transceiver_mode(dev, mode);
|
||||
if (mode & IR_OFF) {
|
||||
MST_MSCWR1 = (MST_MSCWR1 & ~MST_MSCWR1_IRDA_MASK) | MST_MSCWR1_IRDA_OFF;
|
||||
} else {
|
||||
@ -513,7 +523,7 @@ static struct pxaohci_platform_data mainstone_ohci_platform_data = {
|
||||
.init = mainstone_ohci_init,
|
||||
};
|
||||
|
||||
#if defined(CONFIG_KEYBOARD_PXA27x) || defined(CONFIG_KEYBOARD_PXA27x_MODULES)
|
||||
#if defined(CONFIG_KEYBOARD_PXA27x) || defined(CONFIG_KEYBOARD_PXA27x_MODULE)
|
||||
static unsigned int mainstone_matrix_keys[] = {
|
||||
KEY(0, 0, KEY_A), KEY(1, 0, KEY_B), KEY(2, 0, KEY_C),
|
||||
KEY(3, 0, KEY_D), KEY(4, 0, KEY_E), KEY(5, 0, KEY_F),
|
||||
|
@ -39,6 +39,28 @@ struct gpio_desc {
|
||||
|
||||
static struct gpio_desc gpio_desc[MFP_PIN_GPIO127 + 1];
|
||||
|
||||
static int __mfp_config_lpm(unsigned gpio, unsigned long lpm)
|
||||
{
|
||||
unsigned mask = GPIO_bit(gpio);
|
||||
|
||||
/* low power state */
|
||||
switch (lpm) {
|
||||
case MFP_LPM_DRIVE_HIGH:
|
||||
PGSR(gpio) |= mask;
|
||||
break;
|
||||
case MFP_LPM_DRIVE_LOW:
|
||||
PGSR(gpio) &= ~mask;
|
||||
break;
|
||||
case MFP_LPM_INPUT:
|
||||
break;
|
||||
default:
|
||||
pr_warning("%s: invalid low power state for GPIO%d\n",
|
||||
__func__, gpio);
|
||||
return -EINVAL;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int __mfp_config_gpio(unsigned gpio, unsigned long c)
|
||||
{
|
||||
unsigned long gafr, mask = GPIO_bit(gpio);
|
||||
@ -57,21 +79,8 @@ static int __mfp_config_gpio(unsigned gpio, unsigned long c)
|
||||
else
|
||||
GPDR(gpio) &= ~mask;
|
||||
|
||||
/* low power state */
|
||||
switch (c & MFP_LPM_STATE_MASK) {
|
||||
case MFP_LPM_DRIVE_HIGH:
|
||||
PGSR(gpio) |= mask;
|
||||
break;
|
||||
case MFP_LPM_DRIVE_LOW:
|
||||
PGSR(gpio) &= ~mask;
|
||||
break;
|
||||
case MFP_LPM_INPUT:
|
||||
break;
|
||||
default:
|
||||
pr_warning("%s: invalid low power state for GPIO%d\n",
|
||||
__func__, gpio);
|
||||
if (__mfp_config_lpm(gpio, c & MFP_LPM_STATE_MASK))
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
/* give early warning if MFP_LPM_CAN_WAKEUP is set on the
|
||||
* configurations of those pins not able to wakeup
|
||||
@ -91,6 +100,18 @@ static int __mfp_config_gpio(unsigned gpio, unsigned long c)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline int __mfp_validate(int mfp)
|
||||
{
|
||||
int gpio = mfp_to_gpio(mfp);
|
||||
|
||||
if ((mfp > MFP_PIN_GPIO127) || !gpio_desc[gpio].valid) {
|
||||
pr_warning("%s: GPIO%d is invalid pin\n", __func__, gpio);
|
||||
return -1;
|
||||
}
|
||||
|
||||
return gpio;
|
||||
}
|
||||
|
||||
void pxa2xx_mfp_config(unsigned long *mfp_cfgs, int num)
|
||||
{
|
||||
unsigned long flags;
|
||||
@ -99,13 +120,9 @@ void pxa2xx_mfp_config(unsigned long *mfp_cfgs, int num)
|
||||
|
||||
for (i = 0, c = mfp_cfgs; i < num; i++, c++) {
|
||||
|
||||
gpio = mfp_to_gpio(MFP_PIN(*c));
|
||||
|
||||
if (!gpio_desc[gpio].valid) {
|
||||
pr_warning("%s: GPIO%d is invalid pin\n",
|
||||
__func__, gpio);
|
||||
gpio = __mfp_validate(MFP_PIN(*c));
|
||||
if (gpio < 0)
|
||||
continue;
|
||||
}
|
||||
|
||||
local_irq_save(flags);
|
||||
|
||||
@ -116,6 +133,20 @@ void pxa2xx_mfp_config(unsigned long *mfp_cfgs, int num)
|
||||
}
|
||||
}
|
||||
|
||||
void pxa2xx_mfp_set_lpm(int mfp, unsigned long lpm)
|
||||
{
|
||||
unsigned long flags;
|
||||
int gpio;
|
||||
|
||||
gpio = __mfp_validate(mfp);
|
||||
if (gpio < 0)
|
||||
return;
|
||||
|
||||
local_irq_save(flags);
|
||||
__mfp_config_lpm(gpio, lpm);
|
||||
local_irq_restore(flags);
|
||||
}
|
||||
|
||||
int gpio_set_wake(unsigned int gpio, unsigned int on)
|
||||
{
|
||||
struct gpio_desc *d;
|
||||
|
416
arch/arm/mach-pxa/palmtx.c
Normal file
416
arch/arm/mach-pxa/palmtx.c
Normal file
@ -0,0 +1,416 @@
|
||||
/*
|
||||
* Hardware definitions for PalmTX
|
||||
*
|
||||
* Author: Marek Vasut <marek.vasut@gmail.com>
|
||||
*
|
||||
* Based on work of:
|
||||
* Alex Osborne <ato@meshy.org>
|
||||
* Cristiano P. <cristianop@users.sourceforge.net>
|
||||
* Jan Herman <2hp@seznam.cz>
|
||||
* Michal Hrusecky
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* (find more info at www.hackndev.com)
|
||||
*
|
||||
*/
|
||||
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/delay.h>
|
||||
#include <linux/irq.h>
|
||||
#include <linux/gpio_keys.h>
|
||||
#include <linux/input.h>
|
||||
#include <linux/pda_power.h>
|
||||
#include <linux/pwm_backlight.h>
|
||||
#include <linux/gpio.h>
|
||||
|
||||
#include <asm/mach-types.h>
|
||||
#include <asm/mach/arch.h>
|
||||
#include <asm/mach/map.h>
|
||||
|
||||
#include <asm/arch/audio.h>
|
||||
#include <asm/arch/palmtx.h>
|
||||
#include <asm/arch/mmc.h>
|
||||
#include <asm/arch/pxafb.h>
|
||||
#include <asm/arch/pxa-regs.h>
|
||||
#include <asm/arch/mfp-pxa27x.h>
|
||||
#include <asm/arch/irda.h>
|
||||
#include <asm/arch/pxa27x_keypad.h>
|
||||
#include <asm/arch/udc.h>
|
||||
|
||||
#include "generic.h"
|
||||
#include "devices.h"
|
||||
|
||||
/******************************************************************************
|
||||
* Pin configuration
|
||||
******************************************************************************/
|
||||
static unsigned long palmtx_pin_config[] __initdata = {
|
||||
/* MMC */
|
||||
GPIO32_MMC_CLK,
|
||||
GPIO92_MMC_DAT_0,
|
||||
GPIO109_MMC_DAT_1,
|
||||
GPIO110_MMC_DAT_2,
|
||||
GPIO111_MMC_DAT_3,
|
||||
GPIO112_MMC_CMD,
|
||||
|
||||
/* AC97 */
|
||||
GPIO28_AC97_BITCLK,
|
||||
GPIO29_AC97_SDATA_IN_0,
|
||||
GPIO30_AC97_SDATA_OUT,
|
||||
GPIO31_AC97_SYNC,
|
||||
|
||||
/* IrDA */
|
||||
GPIO46_FICP_RXD,
|
||||
GPIO47_FICP_TXD,
|
||||
|
||||
/* PWM */
|
||||
GPIO16_PWM0_OUT,
|
||||
|
||||
/* USB */
|
||||
GPIO13_GPIO,
|
||||
|
||||
/* PCMCIA */
|
||||
GPIO48_nPOE,
|
||||
GPIO49_nPWE,
|
||||
GPIO50_nPIOR,
|
||||
GPIO51_nPIOW,
|
||||
GPIO85_nPCE_1,
|
||||
GPIO54_nPCE_2,
|
||||
GPIO79_PSKTSEL,
|
||||
GPIO55_nPREG,
|
||||
GPIO56_nPWAIT,
|
||||
GPIO57_nIOIS16,
|
||||
};
|
||||
|
||||
/******************************************************************************
|
||||
* SD/MMC card controller
|
||||
******************************************************************************/
|
||||
static int palmtx_mci_init(struct device *dev, irq_handler_t palmtx_detect_int,
|
||||
void *data)
|
||||
{
|
||||
int err = 0;
|
||||
|
||||
/* Setup an interrupt for detecting card insert/remove events */
|
||||
err = request_irq(IRQ_GPIO_PALMTX_SD_DETECT_N, palmtx_detect_int,
|
||||
IRQF_DISABLED | IRQF_SAMPLE_RANDOM |
|
||||
IRQF_TRIGGER_FALLING | IRQF_TRIGGER_RISING,
|
||||
"SD/MMC card detect", data);
|
||||
if (err) {
|
||||
printk(KERN_ERR "%s: cannot request SD/MMC card detect IRQ\n",
|
||||
__func__);
|
||||
return err;
|
||||
}
|
||||
|
||||
err = gpio_request(GPIO_NR_PALMTX_SD_POWER, "SD_POWER");
|
||||
if (err)
|
||||
goto pwr_err;
|
||||
|
||||
err = gpio_request(GPIO_NR_PALMTX_SD_READONLY, "SD_READONLY");
|
||||
if (err)
|
||||
goto ro_err;
|
||||
|
||||
printk(KERN_DEBUG "%s: irq registered\n", __func__);
|
||||
|
||||
return 0;
|
||||
|
||||
ro_err:
|
||||
gpio_free(GPIO_NR_PALMTX_SD_POWER);
|
||||
pwr_err:
|
||||
free_irq(IRQ_GPIO_PALMTX_SD_DETECT_N, data);
|
||||
return err;
|
||||
}
|
||||
|
||||
static void palmtx_mci_exit(struct device *dev, void *data)
|
||||
{
|
||||
gpio_free(GPIO_NR_PALMTX_SD_READONLY);
|
||||
gpio_free(GPIO_NR_PALMTX_SD_POWER);
|
||||
free_irq(IRQ_GPIO_PALMTX_SD_DETECT_N, data);
|
||||
}
|
||||
|
||||
static void palmtx_mci_power(struct device *dev, unsigned int vdd)
|
||||
{
|
||||
struct pxamci_platform_data *p_d = dev->platform_data;
|
||||
gpio_set_value(GPIO_NR_PALMTX_SD_POWER, p_d->ocr_mask & (1 << vdd));
|
||||
}
|
||||
|
||||
static int palmtx_mci_get_ro(struct device *dev)
|
||||
{
|
||||
return gpio_get_value(GPIO_NR_PALMTX_SD_READONLY);
|
||||
}
|
||||
|
||||
static struct pxamci_platform_data palmtx_mci_platform_data = {
|
||||
.ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34,
|
||||
.setpower = palmtx_mci_power,
|
||||
.get_ro = palmtx_mci_get_ro,
|
||||
.init = palmtx_mci_init,
|
||||
.exit = palmtx_mci_exit,
|
||||
};
|
||||
|
||||
/******************************************************************************
|
||||
* GPIO keyboard
|
||||
******************************************************************************/
|
||||
static unsigned int palmtx_matrix_keys[] = {
|
||||
KEY(0, 0, KEY_POWER),
|
||||
KEY(0, 1, KEY_F1),
|
||||
KEY(0, 2, KEY_ENTER),
|
||||
|
||||
KEY(1, 0, KEY_F2),
|
||||
KEY(1, 1, KEY_F3),
|
||||
KEY(1, 2, KEY_F4),
|
||||
|
||||
KEY(2, 0, KEY_UP),
|
||||
KEY(2, 2, KEY_DOWN),
|
||||
|
||||
KEY(3, 0, KEY_RIGHT),
|
||||
KEY(3, 2, KEY_LEFT),
|
||||
|
||||
};
|
||||
|
||||
static struct pxa27x_keypad_platform_data palmtx_keypad_platform_data = {
|
||||
.matrix_key_rows = 4,
|
||||
.matrix_key_cols = 3,
|
||||
.matrix_key_map = palmtx_matrix_keys,
|
||||
.matrix_key_map_size = ARRAY_SIZE(palmtx_matrix_keys),
|
||||
|
||||
.debounce_interval = 30,
|
||||
};
|
||||
|
||||
/******************************************************************************
|
||||
* GPIO keys
|
||||
******************************************************************************/
|
||||
static struct gpio_keys_button palmtx_pxa_buttons[] = {
|
||||
{KEY_F8, GPIO_NR_PALMTX_HOTSYNC_BUTTON_N, 1, "HotSync Button" },
|
||||
};
|
||||
|
||||
static struct gpio_keys_platform_data palmtx_pxa_keys_data = {
|
||||
.buttons = palmtx_pxa_buttons,
|
||||
.nbuttons = ARRAY_SIZE(palmtx_pxa_buttons),
|
||||
};
|
||||
|
||||
static struct platform_device palmtx_pxa_keys = {
|
||||
.name = "gpio-keys",
|
||||
.id = -1,
|
||||
.dev = {
|
||||
.platform_data = &palmtx_pxa_keys_data,
|
||||
},
|
||||
};
|
||||
|
||||
/******************************************************************************
|
||||
* Backlight
|
||||
******************************************************************************/
|
||||
static int palmtx_backlight_init(struct device *dev)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = gpio_request(GPIO_NR_PALMTX_BL_POWER, "BL POWER");
|
||||
if (ret)
|
||||
goto err;
|
||||
ret = gpio_request(GPIO_NR_PALMTX_LCD_POWER, "LCD POWER");
|
||||
if (ret)
|
||||
goto err2;
|
||||
|
||||
return 0;
|
||||
err2:
|
||||
gpio_free(GPIO_NR_PALMTX_BL_POWER);
|
||||
err:
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int palmtx_backlight_notify(int brightness)
|
||||
{
|
||||
gpio_set_value(GPIO_NR_PALMTX_BL_POWER, brightness);
|
||||
gpio_set_value(GPIO_NR_PALMTX_LCD_POWER, brightness);
|
||||
return brightness;
|
||||
}
|
||||
|
||||
static void palmtx_backlight_exit(struct device *dev)
|
||||
{
|
||||
gpio_free(GPIO_NR_PALMTX_BL_POWER);
|
||||
gpio_free(GPIO_NR_PALMTX_LCD_POWER);
|
||||
}
|
||||
|
||||
static struct platform_pwm_backlight_data palmtx_backlight_data = {
|
||||
.pwm_id = 0,
|
||||
.max_brightness = PALMTX_MAX_INTENSITY,
|
||||
.dft_brightness = PALMTX_MAX_INTENSITY,
|
||||
.pwm_period_ns = PALMTX_PERIOD_NS,
|
||||
.init = palmtx_backlight_init,
|
||||
.notify = palmtx_backlight_notify,
|
||||
.exit = palmtx_backlight_exit,
|
||||
};
|
||||
|
||||
static struct platform_device palmtx_backlight = {
|
||||
.name = "pwm-backlight",
|
||||
.dev = {
|
||||
.parent = &pxa27x_device_pwm0.dev,
|
||||
.platform_data = &palmtx_backlight_data,
|
||||
},
|
||||
};
|
||||
|
||||
/******************************************************************************
|
||||
* IrDA
|
||||
******************************************************************************/
|
||||
static void palmtx_irda_transceiver_mode(struct device *dev, int mode)
|
||||
{
|
||||
gpio_set_value(GPIO_NR_PALMTX_IR_DISABLE, mode & IR_OFF);
|
||||
pxa2xx_transceiver_mode(dev, mode);
|
||||
}
|
||||
|
||||
static struct pxaficp_platform_data palmtx_ficp_platform_data = {
|
||||
.transceiver_cap = IR_SIRMODE | IR_FIRMODE | IR_OFF,
|
||||
.transceiver_mode = palmtx_irda_transceiver_mode,
|
||||
};
|
||||
|
||||
/******************************************************************************
|
||||
* UDC
|
||||
******************************************************************************/
|
||||
static void palmtx_udc_command(int cmd)
|
||||
{
|
||||
gpio_set_value(GPIO_NR_PALMTX_USB_POWER, !cmd);
|
||||
udelay(50);
|
||||
gpio_set_value(GPIO_NR_PALMTX_USB_PULLUP, !cmd);
|
||||
}
|
||||
|
||||
static struct pxa2xx_udc_mach_info palmtx_udc_info __initdata = {
|
||||
.gpio_vbus = GPIO_NR_PALMTX_USB_DETECT_N,
|
||||
.gpio_vbus_inverted = 1,
|
||||
.udc_command = palmtx_udc_command,
|
||||
};
|
||||
|
||||
/******************************************************************************
|
||||
* Power supply
|
||||
******************************************************************************/
|
||||
static int power_supply_init(struct device *dev)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = gpio_request(GPIO_NR_PALMTX_POWER_DETECT, "CABLE_STATE_AC");
|
||||
if (ret)
|
||||
goto err_cs_ac;
|
||||
|
||||
ret = gpio_request(GPIO_NR_PALMTX_USB_DETECT_N, "CABLE_STATE_USB");
|
||||
if (ret)
|
||||
goto err_cs_usb;
|
||||
|
||||
return 0;
|
||||
|
||||
err_cs_usb:
|
||||
gpio_free(GPIO_NR_PALMTX_POWER_DETECT);
|
||||
err_cs_ac:
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int palmtx_is_ac_online(void)
|
||||
{
|
||||
return gpio_get_value(GPIO_NR_PALMTX_POWER_DETECT);
|
||||
}
|
||||
|
||||
static int palmtx_is_usb_online(void)
|
||||
{
|
||||
return !gpio_get_value(GPIO_NR_PALMTX_USB_DETECT_N);
|
||||
}
|
||||
|
||||
static void power_supply_exit(struct device *dev)
|
||||
{
|
||||
gpio_free(GPIO_NR_PALMTX_USB_DETECT_N);
|
||||
gpio_free(GPIO_NR_PALMTX_POWER_DETECT);
|
||||
}
|
||||
|
||||
static char *palmtx_supplicants[] = {
|
||||
"main-battery",
|
||||
};
|
||||
|
||||
static struct pda_power_pdata power_supply_info = {
|
||||
.init = power_supply_init,
|
||||
.is_ac_online = palmtx_is_ac_online,
|
||||
.is_usb_online = palmtx_is_usb_online,
|
||||
.exit = power_supply_exit,
|
||||
.supplied_to = palmtx_supplicants,
|
||||
.num_supplicants = ARRAY_SIZE(palmtx_supplicants),
|
||||
};
|
||||
|
||||
static struct platform_device power_supply = {
|
||||
.name = "pda-power",
|
||||
.id = -1,
|
||||
.dev = {
|
||||
.platform_data = &power_supply_info,
|
||||
},
|
||||
};
|
||||
|
||||
/******************************************************************************
|
||||
* Framebuffer
|
||||
******************************************************************************/
|
||||
static struct pxafb_mode_info palmtx_lcd_modes[] = {
|
||||
{
|
||||
.pixclock = 57692,
|
||||
.xres = 320,
|
||||
.yres = 480,
|
||||
.bpp = 16,
|
||||
|
||||
.left_margin = 32,
|
||||
.right_margin = 1,
|
||||
.upper_margin = 7,
|
||||
.lower_margin = 1,
|
||||
|
||||
.hsync_len = 4,
|
||||
.vsync_len = 1,
|
||||
},
|
||||
};
|
||||
|
||||
static struct pxafb_mach_info palmtx_lcd_screen = {
|
||||
.modes = palmtx_lcd_modes,
|
||||
.num_modes = ARRAY_SIZE(palmtx_lcd_modes),
|
||||
.lcd_conn = LCD_COLOR_TFT_16BPP | LCD_PCLK_EDGE_FALL,
|
||||
};
|
||||
|
||||
/******************************************************************************
|
||||
* Machine init
|
||||
******************************************************************************/
|
||||
static struct platform_device *devices[] __initdata = {
|
||||
#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE)
|
||||
&palmtx_pxa_keys,
|
||||
#endif
|
||||
&palmtx_backlight,
|
||||
&power_supply,
|
||||
};
|
||||
|
||||
static struct map_desc palmtx_io_desc[] __initdata = {
|
||||
{
|
||||
.virtual = PALMTX_PCMCIA_VIRT,
|
||||
.pfn = __phys_to_pfn(PALMTX_PCMCIA_PHYS),
|
||||
.length = PALMTX_PCMCIA_SIZE,
|
||||
.type = MT_DEVICE
|
||||
},
|
||||
};
|
||||
|
||||
static void __init palmtx_map_io(void)
|
||||
{
|
||||
pxa_map_io();
|
||||
iotable_init(palmtx_io_desc, ARRAY_SIZE(palmtx_io_desc));
|
||||
}
|
||||
|
||||
static void __init palmtx_init(void)
|
||||
{
|
||||
pxa2xx_mfp_config(ARRAY_AND_SIZE(palmtx_pin_config));
|
||||
|
||||
set_pxa_fb_info(&palmtx_lcd_screen);
|
||||
pxa_set_mci_info(&palmtx_mci_platform_data);
|
||||
pxa_set_udc_info(&palmtx_udc_info);
|
||||
pxa_set_ac97_info(NULL);
|
||||
pxa_set_ficp_info(&palmtx_ficp_platform_data);
|
||||
pxa_set_keypad_info(&palmtx_keypad_platform_data);
|
||||
|
||||
platform_add_devices(devices, ARRAY_SIZE(devices));
|
||||
}
|
||||
|
||||
MACHINE_START(PALMTX, "Palm T|X")
|
||||
.phys_io = PALMTX_PHYS_IO_START,
|
||||
.io_pg_offst = io_p2v(0x40000000),
|
||||
.boot_params = 0xa0000100,
|
||||
.map_io = palmtx_map_io,
|
||||
.init_irq = pxa27x_init_irq,
|
||||
.timer = &pxa_timer,
|
||||
.init_machine = palmtx_init
|
||||
MACHINE_END
|
@ -24,7 +24,9 @@
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/mtd/physmap.h>
|
||||
#include <linux/spi/spi.h>
|
||||
#include <linux/spi/max7301.h>
|
||||
#include <linux/leds.h>
|
||||
|
||||
#include <asm/mach-types.h>
|
||||
#include <asm/mach/arch.h>
|
||||
#include <asm/arch/hardware.h>
|
||||
@ -108,6 +110,32 @@ static struct platform_device smc91x_device = {
|
||||
.resource = smc91x_resources,
|
||||
};
|
||||
|
||||
/*
|
||||
* SPI host and devices
|
||||
*/
|
||||
static struct pxa2xx_spi_master pxa_ssp_master_info = {
|
||||
.num_chipselect = 1,
|
||||
};
|
||||
|
||||
static struct max7301_platform_data max7301_info = {
|
||||
.base = -1,
|
||||
};
|
||||
|
||||
/* bus_num must match id in pxa2xx_set_spi_info() call */
|
||||
static struct spi_board_info spi_board_info[] __initdata = {
|
||||
{
|
||||
.modalias = "max7301",
|
||||
.platform_data = &max7301_info,
|
||||
.max_speed_hz = 13000000,
|
||||
.bus_num = 1,
|
||||
.chip_select = 0,
|
||||
.mode = SPI_MODE_0,
|
||||
},
|
||||
};
|
||||
|
||||
/*
|
||||
* NOR flash
|
||||
*/
|
||||
static struct physmap_flash_data pcm027_flash_data = {
|
||||
.width = 4,
|
||||
};
|
||||
@ -190,6 +218,9 @@ static void __init pcm027_init(void)
|
||||
#ifdef CONFIG_MACH_PCM990_BASEBOARD
|
||||
pcm990_baseboard_init();
|
||||
#endif
|
||||
|
||||
pxa2xx_set_spi_info(1, &pxa_ssp_master_info);
|
||||
spi_register_board_info(spi_board_info, ARRAY_SIZE(spi_board_info));
|
||||
}
|
||||
|
||||
static void __init pcm027_map_io(void)
|
||||
|
@ -33,14 +33,30 @@
|
||||
#include <asm/arch/camera.h>
|
||||
#include <asm/mach/map.h>
|
||||
#include <asm/arch/pxa-regs.h>
|
||||
#include <asm/arch/pxa2xx-gpio.h>
|
||||
#include <asm/arch/audio.h>
|
||||
#include <asm/arch/mmc.h>
|
||||
#include <asm/arch/ohci.h>
|
||||
#include <asm/arch/pcm990_baseboard.h>
|
||||
#include <asm/arch/pxafb.h>
|
||||
#include <asm/arch/mfp-pxa27x.h>
|
||||
|
||||
#include "devices.h"
|
||||
#include "generic.h"
|
||||
|
||||
static unsigned long pcm990_pin_config[] __initdata = {
|
||||
/* MMC */
|
||||
GPIO32_MMC_CLK,
|
||||
GPIO112_MMC_CMD,
|
||||
GPIO92_MMC_DAT_0,
|
||||
GPIO109_MMC_DAT_1,
|
||||
GPIO110_MMC_DAT_2,
|
||||
GPIO111_MMC_DAT_3,
|
||||
/* USB */
|
||||
GPIO88_USBH1_PWR,
|
||||
GPIO89_USBH1_PEN,
|
||||
/* PWM0 */
|
||||
GPIO16_PWM0_OUT,
|
||||
};
|
||||
|
||||
/*
|
||||
* pcm990_lcd_power - control power supply to the LCD
|
||||
@ -277,16 +293,6 @@ static int pcm990_mci_init(struct device *dev, irq_handler_t mci_detect_int,
|
||||
{
|
||||
int err;
|
||||
|
||||
/*
|
||||
* enable GPIO for PXA27x MMC controller
|
||||
*/
|
||||
pxa_gpio_mode(GPIO32_MMCCLK_MD);
|
||||
pxa_gpio_mode(GPIO112_MMCCMD_MD);
|
||||
pxa_gpio_mode(GPIO92_MMCDAT0_MD);
|
||||
pxa_gpio_mode(GPIO109_MMCDAT1_MD);
|
||||
pxa_gpio_mode(GPIO110_MMCDAT2_MD);
|
||||
pxa_gpio_mode(GPIO111_MMCDAT3_MD);
|
||||
|
||||
err = request_irq(PCM027_MMCDET_IRQ, mci_detect_int, IRQF_DISABLED,
|
||||
"MMC card detect", data);
|
||||
if (err)
|
||||
@ -333,8 +339,6 @@ static struct pxamci_platform_data pcm990_mci_platform_data = {
|
||||
*/
|
||||
static int pcm990_ohci_init(struct device *dev)
|
||||
{
|
||||
pxa_gpio_mode(PCM990_USB_OVERCURRENT);
|
||||
pxa_gpio_mode(PCM990_USB_PWR_EN);
|
||||
/*
|
||||
* disable USB port 2 and 3
|
||||
* power sense is active low
|
||||
@ -361,23 +365,27 @@ static struct pxaohci_platform_data pcm990_ohci_platform_data = {
|
||||
* PXA27x Camera specific stuff
|
||||
*/
|
||||
#if defined(CONFIG_VIDEO_PXA27x) || defined(CONFIG_VIDEO_PXA27x_MODULE)
|
||||
static unsigned long pcm990_camera_pin_config[] = {
|
||||
/* CIF */
|
||||
GPIO98_CIF_DD_0,
|
||||
GPIO105_CIF_DD_1,
|
||||
GPIO104_CIF_DD_2,
|
||||
GPIO103_CIF_DD_3,
|
||||
GPIO95_CIF_DD_4,
|
||||
GPIO94_CIF_DD_5,
|
||||
GPIO93_CIF_DD_6,
|
||||
GPIO108_CIF_DD_7,
|
||||
GPIO107_CIF_DD_8,
|
||||
GPIO106_CIF_DD_9,
|
||||
GPIO42_CIF_MCLK,
|
||||
GPIO45_CIF_PCLK,
|
||||
GPIO43_CIF_FV,
|
||||
GPIO44_CIF_LV,
|
||||
};
|
||||
|
||||
static int pcm990_pxacamera_init(struct device *dev)
|
||||
{
|
||||
pxa_gpio_mode(GPIO98_CIF_DD_0_MD);
|
||||
pxa_gpio_mode(GPIO105_CIF_DD_1_MD);
|
||||
pxa_gpio_mode(GPIO104_CIF_DD_2_MD);
|
||||
pxa_gpio_mode(GPIO103_CIF_DD_3_MD);
|
||||
pxa_gpio_mode(GPIO95_CIF_DD_4_MD);
|
||||
pxa_gpio_mode(GPIO94_CIF_DD_5_MD);
|
||||
pxa_gpio_mode(GPIO93_CIF_DD_6_MD);
|
||||
pxa_gpio_mode(GPIO108_CIF_DD_7_MD);
|
||||
pxa_gpio_mode(GPIO107_CIF_DD_8_MD);
|
||||
pxa_gpio_mode(GPIO106_CIF_DD_9_MD);
|
||||
pxa_gpio_mode(GPIO42_CIF_MCLK_MD);
|
||||
pxa_gpio_mode(GPIO45_CIF_PCLK_MD);
|
||||
pxa_gpio_mode(GPIO43_CIF_FV_MD);
|
||||
pxa_gpio_mode(GPIO44_CIF_LV_MD);
|
||||
|
||||
pxa2xx_mfp_config(ARRAY_AND_SIZE(pcm990_camera_pin_config));
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -449,8 +457,10 @@ static struct map_desc pcm990_io_desc[] __initdata = {
|
||||
*/
|
||||
void __init pcm990_baseboard_init(void)
|
||||
{
|
||||
pxa2xx_mfp_config(ARRAY_AND_SIZE(pcm990_pin_config));
|
||||
|
||||
/* register CPLD access */
|
||||
iotable_init(pcm990_io_desc, ARRAY_SIZE(pcm990_io_desc));
|
||||
iotable_init(ARRAY_AND_SIZE(pcm990_io_desc));
|
||||
|
||||
/* register CPLD's IRQ controller */
|
||||
pcm990_init_irq();
|
||||
@ -458,7 +468,6 @@ void __init pcm990_baseboard_init(void)
|
||||
#ifndef CONFIG_PCM990_DISPLAY_NONE
|
||||
set_pxa_fb_info(&pcm990_fbinfo);
|
||||
#endif
|
||||
pxa_gpio_mode(GPIO16_PWM0_MD);
|
||||
platform_device_register(&pcm990_backlight_device);
|
||||
|
||||
/* MMC */
|
||||
@ -473,9 +482,8 @@ void __init pcm990_baseboard_init(void)
|
||||
#if defined(CONFIG_VIDEO_PXA27x) || defined(CONFIG_VIDEO_PXA27x_MODULE)
|
||||
pxa_set_camera_info(&pcm990_pxacamera_platform_data);
|
||||
|
||||
i2c_register_board_info(0, pcm990_i2c_devices,
|
||||
ARRAY_SIZE(pcm990_i2c_devices));
|
||||
i2c_register_board_info(0, ARRAY_AND_SIZE(pcm990_i2c_devices));
|
||||
#endif
|
||||
|
||||
printk(KERN_INFO"PCM-990 Evaluation baseboard initialized\n");
|
||||
printk(KERN_INFO "PCM-990 Evaluation baseboard initialized\n");
|
||||
}
|
||||
|
@ -267,6 +267,7 @@ static void poodle_irda_transceiver_mode(struct device *dev, int mode)
|
||||
} else {
|
||||
GPCR(POODLE_GPIO_IR_ON) = GPIO_bit(POODLE_GPIO_IR_ON);
|
||||
}
|
||||
pxa2xx_transceiver_mode(dev, mode);
|
||||
}
|
||||
|
||||
static struct pxaficp_platform_data poodle_ficp_platform_data = {
|
||||
|
@ -109,6 +109,52 @@ static const struct clkops clk_pxa25x_lcd_ops = {
|
||||
.getrate = clk_pxa25x_lcd_getrate,
|
||||
};
|
||||
|
||||
static unsigned long gpio12_config_32k[] = {
|
||||
GPIO12_32KHz,
|
||||
};
|
||||
|
||||
static unsigned long gpio12_config_gpio[] = {
|
||||
GPIO12_GPIO,
|
||||
};
|
||||
|
||||
static void clk_gpio12_enable(struct clk *clk)
|
||||
{
|
||||
pxa2xx_mfp_config(gpio12_config_32k, 1);
|
||||
}
|
||||
|
||||
static void clk_gpio12_disable(struct clk *clk)
|
||||
{
|
||||
pxa2xx_mfp_config(gpio12_config_gpio, 1);
|
||||
}
|
||||
|
||||
static const struct clkops clk_pxa25x_gpio12_ops = {
|
||||
.enable = clk_gpio12_enable,
|
||||
.disable = clk_gpio12_disable,
|
||||
};
|
||||
|
||||
static unsigned long gpio11_config_3m6[] = {
|
||||
GPIO11_3_6MHz,
|
||||
};
|
||||
|
||||
static unsigned long gpio11_config_gpio[] = {
|
||||
GPIO11_GPIO,
|
||||
};
|
||||
|
||||
static void clk_gpio11_enable(struct clk *clk)
|
||||
{
|
||||
pxa2xx_mfp_config(gpio11_config_3m6, 1);
|
||||
}
|
||||
|
||||
static void clk_gpio11_disable(struct clk *clk)
|
||||
{
|
||||
pxa2xx_mfp_config(gpio11_config_gpio, 1);
|
||||
}
|
||||
|
||||
static const struct clkops clk_pxa25x_gpio11_ops = {
|
||||
.enable = clk_gpio11_enable,
|
||||
.disable = clk_gpio11_disable,
|
||||
};
|
||||
|
||||
/*
|
||||
* 3.6864MHz -> OST, GPIO, SSP, PWM, PLLs (95.842MHz, 147.456MHz)
|
||||
* 95.842MHz -> MMC 19.169MHz, I2C 31.949MHz, FICP 47.923MHz, USB 47.923MHz
|
||||
@ -128,6 +174,8 @@ static struct clk pxa25x_clks[] = {
|
||||
INIT_CKEN("UARTCLK", BTUART, 14745600, 1, &pxa_device_btuart.dev),
|
||||
INIT_CKEN("UARTCLK", STUART, 14745600, 1, NULL),
|
||||
INIT_CKEN("UDCCLK", USB, 47923000, 5, &pxa25x_device_udc.dev),
|
||||
INIT_CLK("GPIO11_CLK", &clk_pxa25x_gpio11_ops, 3686400, 0, NULL),
|
||||
INIT_CLK("GPIO12_CLK", &clk_pxa25x_gpio12_ops, 32768, 0, NULL),
|
||||
INIT_CKEN("MMCCLK", MMC, 19169000, 0, &pxa_device_mci.dev),
|
||||
INIT_CKEN("I2CCLK", I2C, 31949000, 0, &pxa_device_i2c.dev),
|
||||
|
||||
@ -145,7 +193,10 @@ static struct clk pxa25x_clks[] = {
|
||||
INIT_CKEN("FICPCLK", FICP, 47923000, 0, NULL),
|
||||
};
|
||||
|
||||
static struct clk gpio7_clk = INIT_CKOTHER("GPIO7_CK", &pxa25x_clks[4], NULL);
|
||||
static struct clk pxa2xx_clk_aliases[] = {
|
||||
INIT_CKOTHER("GPIO7_CLK", &pxa25x_clks[4], NULL),
|
||||
INIT_CKOTHER("SA1111_CLK", &pxa25x_clks[5], NULL),
|
||||
};
|
||||
|
||||
#ifdef CONFIG_PM
|
||||
|
||||
@ -293,7 +344,7 @@ static int __init pxa25x_init(void)
|
||||
int i, ret = 0;
|
||||
|
||||
/* Only add HWUART for PXA255/26x; PXA210/250/27x do not have it. */
|
||||
if (cpu_is_pxa25x())
|
||||
if (cpu_is_pxa255())
|
||||
clks_register(&pxa25x_hwuart_clk, 1);
|
||||
|
||||
if (cpu_is_pxa21x() || cpu_is_pxa25x()) {
|
||||
@ -317,10 +368,10 @@ static int __init pxa25x_init(void)
|
||||
}
|
||||
|
||||
/* Only add HWUART for PXA255/26x; PXA210/250/27x do not have it. */
|
||||
if (cpu_is_pxa25x())
|
||||
if (cpu_is_pxa255())
|
||||
ret = platform_device_register(&pxa_device_hwuart);
|
||||
|
||||
clks_register(&gpio7_clk, 1);
|
||||
clks_register(pxa2xx_clk_aliases, ARRAY_SIZE(pxa2xx_clk_aliases));
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
@ -15,10 +15,16 @@
|
||||
|
||||
#include <linux/module.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/platform_device.h>
|
||||
|
||||
#include <asm/hardware.h>
|
||||
#include <asm/arch/pxa3xx-regs.h>
|
||||
#include <asm/arch/mfp-pxa300.h>
|
||||
|
||||
#include "generic.h"
|
||||
#include "devices.h"
|
||||
#include "clock.h"
|
||||
|
||||
static struct pxa3xx_mfp_addr_map pxa300_mfp_addr_map[] __initdata = {
|
||||
|
||||
MFP_ADDR_X(GPIO0, GPIO2, 0x00b4),
|
||||
@ -79,15 +85,26 @@ static struct pxa3xx_mfp_addr_map pxa310_mfp_addr_map[] __initdata = {
|
||||
MFP_ADDR_END,
|
||||
};
|
||||
|
||||
static struct clk common_clks[] = {
|
||||
PXA3xx_CKEN("NANDCLK", NAND, 156000000, 0, &pxa3xx_device_nand.dev),
|
||||
};
|
||||
|
||||
static struct clk pxa310_clks[] = {
|
||||
PXA3xx_CKEN("MMCCLK", MMC3, 19500000, 0, &pxa3xx_device_mci3.dev),
|
||||
};
|
||||
|
||||
static int __init pxa300_init(void)
|
||||
{
|
||||
if (cpu_is_pxa300() || cpu_is_pxa310()) {
|
||||
pxa3xx_init_mfp();
|
||||
pxa3xx_mfp_init_addr(pxa300_mfp_addr_map);
|
||||
clks_register(ARRAY_AND_SIZE(common_clks));
|
||||
}
|
||||
|
||||
if (cpu_is_pxa310())
|
||||
if (cpu_is_pxa310()) {
|
||||
pxa3xx_mfp_init_addr(pxa310_mfp_addr_map);
|
||||
clks_register(ARRAY_AND_SIZE(pxa310_clks));
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -15,11 +15,17 @@
|
||||
|
||||
#include <linux/module.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/platform_device.h>
|
||||
|
||||
#include <asm/hardware.h>
|
||||
#include <asm/arch/mfp.h>
|
||||
#include <asm/arch/pxa3xx-regs.h>
|
||||
#include <asm/arch/mfp-pxa320.h>
|
||||
|
||||
#include "generic.h"
|
||||
#include "devices.h"
|
||||
#include "clock.h"
|
||||
|
||||
static struct pxa3xx_mfp_addr_map pxa320_mfp_addr_map[] __initdata = {
|
||||
|
||||
MFP_ADDR_X(GPIO0, GPIO4, 0x0124),
|
||||
@ -74,16 +80,17 @@ static struct pxa3xx_mfp_addr_map pxa320_mfp_addr_map[] __initdata = {
|
||||
MFP_ADDR_END,
|
||||
};
|
||||
|
||||
static void __init pxa320_init_mfp(void)
|
||||
{
|
||||
pxa3xx_init_mfp();
|
||||
pxa3xx_mfp_init_addr(pxa320_mfp_addr_map);
|
||||
}
|
||||
static struct clk pxa320_clks[] = {
|
||||
PXA3xx_CKEN("NANDCLK", NAND, 104000000, 0, &pxa3xx_device_nand.dev),
|
||||
};
|
||||
|
||||
static int __init pxa320_init(void)
|
||||
{
|
||||
if (cpu_is_pxa320())
|
||||
pxa320_init_mfp();
|
||||
if (cpu_is_pxa320()) {
|
||||
pxa3xx_init_mfp();
|
||||
pxa3xx_mfp_init_addr(pxa320_mfp_addr_map);
|
||||
clks_register(ARRAY_AND_SIZE(pxa320_clks));
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user