mirror of
https://github.com/FEX-Emu/linux.git
synced 2024-12-21 17:00:01 +00:00
Merge branch 'master'
This commit is contained in:
commit
e532c37858
6
CREDITS
6
CREDITS
@ -3642,11 +3642,9 @@ S: Beaverton, OR 97005
|
||||
S: USA
|
||||
|
||||
N: Michal Wronski
|
||||
E: wrona@mat.uni.torun.pl
|
||||
W: http://www.mat.uni.torun.pl/~wrona
|
||||
E: Michal.Wronski@motorola.com
|
||||
D: POSIX message queues fs (with K. Benedyczak)
|
||||
S: ul. Teczowa 23/12
|
||||
S: 80-680 Gdansk-Sobieszewo
|
||||
S: Krakow
|
||||
S: Poland
|
||||
|
||||
N: Frank Xia
|
||||
|
@ -139,9 +139,14 @@ You'll probably want to upgrade.
|
||||
Ksymoops
|
||||
--------
|
||||
|
||||
If the unthinkable happens and your kernel oopses, you'll need a 2.4
|
||||
version of ksymoops to decode the report; see REPORTING-BUGS in the
|
||||
root of the Linux source for more information.
|
||||
If the unthinkable happens and your kernel oopses, you may need the
|
||||
ksymoops tool to decode it, but in most cases you don't.
|
||||
In the 2.6 kernel it is generally preferred to build the kernel with
|
||||
CONFIG_KALLSYMS so that it produces readable dumps that can be used as-is
|
||||
(this also produces better output than ksymoops).
|
||||
If for some reason your kernel is not build with CONFIG_KALLSYMS and
|
||||
you have no way to rebuild and reproduce the Oops with that option, then
|
||||
you can still decode that Oops with ksymoops.
|
||||
|
||||
Module-Init-Tools
|
||||
-----------------
|
||||
|
@ -10,7 +10,7 @@ DOCBOOKS := wanbook.xml z8530book.xml mcabook.xml videobook.xml \
|
||||
kernel-hacking.xml kernel-locking.xml deviceiobook.xml \
|
||||
procfs-guide.xml writing_usb_driver.xml \
|
||||
sis900.xml kernel-api.xml journal-api.xml lsm.xml usb.xml \
|
||||
gadget.xml libata.xml mtdnand.xml librs.xml
|
||||
gadget.xml libata.xml mtdnand.xml librs.xml rapidio.xml
|
||||
|
||||
###
|
||||
# The build process is as follows (targets):
|
||||
|
@ -306,7 +306,7 @@ an example.
|
||||
</para>
|
||||
<sect1><title>Journal Level</title>
|
||||
!Efs/jbd/journal.c
|
||||
!Efs/jbd/recovery.c
|
||||
!Ifs/jbd/recovery.c
|
||||
</sect1>
|
||||
<sect1><title>Transasction Level</title>
|
||||
!Efs/jbd/transaction.c
|
||||
|
@ -118,7 +118,7 @@ X!Ilib/string.c
|
||||
</sect1>
|
||||
<sect1><title>User Space Memory Access</title>
|
||||
!Iinclude/asm-i386/uaccess.h
|
||||
!Iarch/i386/lib/usercopy.c
|
||||
!Earch/i386/lib/usercopy.c
|
||||
</sect1>
|
||||
<sect1><title>More Memory Management Functions</title>
|
||||
!Iinclude/linux/rmap.h
|
||||
@ -174,7 +174,6 @@ X!Ilib/string.c
|
||||
<title>The Linux VFS</title>
|
||||
<sect1><title>The Filesystem types</title>
|
||||
!Iinclude/linux/fs.h
|
||||
!Einclude/linux/fs.h
|
||||
</sect1>
|
||||
<sect1><title>The Directory Cache</title>
|
||||
!Efs/dcache.c
|
||||
@ -266,7 +265,7 @@ X!Ekernel/module.c
|
||||
<chapter id="hardware">
|
||||
<title>Hardware Interfaces</title>
|
||||
<sect1><title>Interrupt Handling</title>
|
||||
!Ikernel/irq/manage.c
|
||||
!Ekernel/irq/manage.c
|
||||
</sect1>
|
||||
|
||||
<sect1><title>Resources Management</title>
|
||||
@ -501,7 +500,7 @@ KAO -->
|
||||
!Edrivers/video/modedb.c
|
||||
</sect1>
|
||||
<sect1><title>Frame Buffer Macintosh Video Mode Database</title>
|
||||
!Idrivers/video/macmodes.c
|
||||
!Edrivers/video/macmodes.c
|
||||
</sect1>
|
||||
<sect1><title>Frame Buffer Fonts</title>
|
||||
<para>
|
||||
|
160
Documentation/DocBook/rapidio.tmpl
Normal file
160
Documentation/DocBook/rapidio.tmpl
Normal file
@ -0,0 +1,160 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [
|
||||
<!ENTITY rapidio SYSTEM "rapidio.xml">
|
||||
]>
|
||||
|
||||
<book id="RapidIO-Guide">
|
||||
<bookinfo>
|
||||
<title>RapidIO Subsystem Guide</title>
|
||||
|
||||
<authorgroup>
|
||||
<author>
|
||||
<firstname>Matt</firstname>
|
||||
<surname>Porter</surname>
|
||||
<affiliation>
|
||||
<address>
|
||||
<email>mporter@kernel.crashing.org</email>
|
||||
<email>mporter@mvista.com</email>
|
||||
</address>
|
||||
</affiliation>
|
||||
</author>
|
||||
</authorgroup>
|
||||
|
||||
<copyright>
|
||||
<year>2005</year>
|
||||
<holder>MontaVista Software, Inc.</holder>
|
||||
</copyright>
|
||||
|
||||
<legalnotice>
|
||||
<para>
|
||||
This documentation 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.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
This program is distributed in the hope that it will be
|
||||
useful, but WITHOUT ANY WARRANTY; without even the implied
|
||||
warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
See the GNU General Public License for more details.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
You should have received a copy of the GNU General Public
|
||||
License along with this program; if not, write to the Free
|
||||
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
||||
MA 02111-1307 USA
|
||||
</para>
|
||||
|
||||
<para>
|
||||
For more details see the file COPYING in the source
|
||||
distribution of Linux.
|
||||
</para>
|
||||
</legalnotice>
|
||||
</bookinfo>
|
||||
|
||||
<toc></toc>
|
||||
|
||||
<chapter id="intro">
|
||||
<title>Introduction</title>
|
||||
<para>
|
||||
RapidIO is a high speed switched fabric interconnect with
|
||||
features aimed at the embedded market. RapidIO provides
|
||||
support for memory-mapped I/O as well as message-based
|
||||
transactions over the switched fabric network. RapidIO has
|
||||
a standardized discovery mechanism not unlike the PCI bus
|
||||
standard that allows simple detection of devices in a
|
||||
network.
|
||||
</para>
|
||||
<para>
|
||||
This documentation is provided for developers intending
|
||||
to support RapidIO on new architectures, write new drivers,
|
||||
or to understand the subsystem internals.
|
||||
</para>
|
||||
</chapter>
|
||||
|
||||
<chapter id="bugs">
|
||||
<title>Known Bugs and Limitations</title>
|
||||
|
||||
<sect1>
|
||||
<title>Bugs</title>
|
||||
<para>None. ;)</para>
|
||||
</sect1>
|
||||
<sect1>
|
||||
<title>Limitations</title>
|
||||
<para>
|
||||
<orderedlist>
|
||||
<listitem><para>Access/management of RapidIO memory regions is not supported</para></listitem>
|
||||
<listitem><para>Multiple host enumeration is not supported</para></listitem>
|
||||
</orderedlist>
|
||||
</para>
|
||||
</sect1>
|
||||
</chapter>
|
||||
|
||||
<chapter id="drivers">
|
||||
<title>RapidIO driver interface</title>
|
||||
<para>
|
||||
Drivers are provided a set of calls in order
|
||||
to interface with the subsystem to gather info
|
||||
on devices, request/map memory region resources,
|
||||
and manage mailboxes/doorbells.
|
||||
</para>
|
||||
<sect1>
|
||||
<title>Functions</title>
|
||||
!Iinclude/linux/rio_drv.h
|
||||
!Edrivers/rapidio/rio-driver.c
|
||||
!Edrivers/rapidio/rio.c
|
||||
</sect1>
|
||||
</chapter>
|
||||
|
||||
<chapter id="internals">
|
||||
<title>Internals</title>
|
||||
|
||||
<para>
|
||||
This chapter contains the autogenerated documentation of the RapidIO
|
||||
subsystem.
|
||||
</para>
|
||||
|
||||
<sect1><title>Structures</title>
|
||||
!Iinclude/linux/rio.h
|
||||
</sect1>
|
||||
<sect1><title>Enumeration and Discovery</title>
|
||||
!Idrivers/rapidio/rio-scan.c
|
||||
</sect1>
|
||||
<sect1><title>Driver functionality</title>
|
||||
!Idrivers/rapidio/rio.c
|
||||
!Idrivers/rapidio/rio-access.c
|
||||
</sect1>
|
||||
<sect1><title>Device model support</title>
|
||||
!Idrivers/rapidio/rio-driver.c
|
||||
</sect1>
|
||||
<sect1><title>Sysfs support</title>
|
||||
!Idrivers/rapidio/rio-sysfs.c
|
||||
</sect1>
|
||||
<sect1><title>PPC32 support</title>
|
||||
!Iarch/ppc/kernel/rio.c
|
||||
!Earch/ppc/syslib/ppc85xx_rio.c
|
||||
!Iarch/ppc/syslib/ppc85xx_rio.c
|
||||
</sect1>
|
||||
</chapter>
|
||||
|
||||
<chapter id="credits">
|
||||
<title>Credits</title>
|
||||
<para>
|
||||
The following people have contributed to the RapidIO
|
||||
subsystem directly or indirectly:
|
||||
<orderedlist>
|
||||
<listitem><para>Matt Porter<email>mporter@kernel.crashing.org</email></para></listitem>
|
||||
<listitem><para>Randy Vinson<email>rvinson@mvista.com</email></para></listitem>
|
||||
<listitem><para>Dan Malek<email>dan@embeddedalley.com</email></para></listitem>
|
||||
</orderedlist>
|
||||
</para>
|
||||
<para>
|
||||
The following people have contributed to this document:
|
||||
<orderedlist>
|
||||
<listitem><para>Matt Porter<email>mporter@kernel.crashing.org</email></para></listitem>
|
||||
</orderedlist>
|
||||
</para>
|
||||
</chapter>
|
||||
</book>
|
@ -10,14 +10,22 @@
|
||||
This guide describes the basics of Message Signaled Interrupts (MSI),
|
||||
the advantages of using MSI over traditional interrupt mechanisms,
|
||||
and how to enable your driver to use MSI or MSI-X. Also included is
|
||||
a Frequently Asked Questions.
|
||||
a Frequently Asked Questions (FAQ) section.
|
||||
|
||||
1.1 Terminology
|
||||
|
||||
PCI devices can be single-function or multi-function. In either case,
|
||||
when this text talks about enabling or disabling MSI on a "device
|
||||
function," it is referring to one specific PCI device and function and
|
||||
not to all functions on a PCI device (unless the PCI device has only
|
||||
one function).
|
||||
|
||||
2. Copyright 2003 Intel Corporation
|
||||
|
||||
3. What is MSI/MSI-X?
|
||||
|
||||
Message Signaled Interrupt (MSI), as described in the PCI Local Bus
|
||||
Specification Revision 2.3 or latest, is an optional feature, and a
|
||||
Specification Revision 2.3 or later, is an optional feature, and a
|
||||
required feature for PCI Express devices. MSI enables a device function
|
||||
to request service by sending an Inbound Memory Write on its PCI bus to
|
||||
the FSB as a Message Signal Interrupt transaction. Because MSI is
|
||||
@ -27,7 +35,7 @@ supported.
|
||||
|
||||
A PCI device that supports MSI must also support pin IRQ assertion
|
||||
interrupt mechanism to provide backward compatibility for systems that
|
||||
do not support MSI. In Systems, which support MSI, the bus driver is
|
||||
do not support MSI. In systems which support MSI, the bus driver is
|
||||
responsible for initializing the message address and message data of
|
||||
the device function's MSI/MSI-X capability structure during device
|
||||
initial configuration.
|
||||
@ -61,17 +69,17 @@ over the MSI capability structure as described below.
|
||||
|
||||
- MSI and MSI-X both support per-vector masking. Per-vector
|
||||
masking is an optional extension of MSI but a required
|
||||
feature for MSI-X. Per-vector masking provides the kernel
|
||||
the ability to mask/unmask MSI when servicing its software
|
||||
interrupt service routing handler. If per-vector masking is
|
||||
feature for MSI-X. Per-vector masking provides the kernel the
|
||||
ability to mask/unmask a single MSI while running its
|
||||
interrupt service routine. If per-vector masking is
|
||||
not supported, then the device driver should provide the
|
||||
hardware/software synchronization to ensure that the device
|
||||
generates MSI when the driver wants it to do so.
|
||||
|
||||
4. Why use MSI?
|
||||
|
||||
As a benefit the simplification of board design, MSI allows board
|
||||
designers to remove out of band interrupt routing. MSI is another
|
||||
As a benefit to the simplification of board design, MSI allows board
|
||||
designers to remove out-of-band interrupt routing. MSI is another
|
||||
step towards a legacy-free environment.
|
||||
|
||||
Due to increasing pressure on chipset and processor packages to
|
||||
@ -87,7 +95,7 @@ support. As a result, the PCI Express technology requires MSI
|
||||
support for better interrupt performance.
|
||||
|
||||
Using MSI enables the device functions to support two or more
|
||||
vectors, which can be configured to target different CPU's to
|
||||
vectors, which can be configured to target different CPUs to
|
||||
increase scalability.
|
||||
|
||||
5. Configuring a driver to use MSI/MSI-X
|
||||
@ -119,13 +127,13 @@ pci_enable_msi() explicitly.
|
||||
|
||||
int pci_enable_msi(struct pci_dev *dev)
|
||||
|
||||
With this new API, any existing device driver, which like to have
|
||||
MSI enabled on its device function, must call this API to enable MSI
|
||||
With this new API, a device driver that wants to have MSI
|
||||
enabled on its device function must call this API to enable MSI.
|
||||
A successful call will initialize the MSI capability structure
|
||||
with ONE vector, regardless of whether a device function is
|
||||
capable of supporting multiple messages. This vector replaces the
|
||||
pre-assigned dev->irq with a new MSI vector. To avoid the conflict
|
||||
of new assigned vector with existing pre-assigned vector requires
|
||||
pre-assigned dev->irq with a new MSI vector. To avoid a conflict
|
||||
of the new assigned vector with existing pre-assigned vector requires
|
||||
a device driver to call this API before calling request_irq().
|
||||
|
||||
5.2.2 API pci_disable_msi
|
||||
@ -137,14 +145,14 @@ when a device driver is unloading. This API restores dev->irq with
|
||||
the pre-assigned IOAPIC vector and switches a device's interrupt
|
||||
mode to PCI pin-irq assertion/INTx emulation mode.
|
||||
|
||||
Note that a device driver should always call free_irq() on MSI vector
|
||||
it has done request_irq() on before calling this API. Failure to do
|
||||
so results a BUG_ON() and a device will be left with MSI enabled and
|
||||
Note that a device driver should always call free_irq() on the MSI vector
|
||||
that it has done request_irq() on before calling this API. Failure to do
|
||||
so results in a BUG_ON() and a device will be left with MSI enabled and
|
||||
leaks its vector.
|
||||
|
||||
5.2.3 MSI mode vs. legacy mode diagram
|
||||
|
||||
The below diagram shows the events, which switches the interrupt
|
||||
The below diagram shows the events which switch the interrupt
|
||||
mode on the MSI-capable device function between MSI mode and
|
||||
PIN-IRQ assertion mode.
|
||||
|
||||
@ -155,9 +163,9 @@ PIN-IRQ assertion mode.
|
||||
------------ pci_disable_msi ------------------------
|
||||
|
||||
|
||||
Figure 1.0 MSI Mode vs. Legacy Mode
|
||||
Figure 1. MSI Mode vs. Legacy Mode
|
||||
|
||||
In Figure 1.0, a device operates by default in legacy mode. Legacy
|
||||
In Figure 1, a device operates by default in legacy mode. Legacy
|
||||
in this context means PCI pin-irq assertion or PCI-Express INTx
|
||||
emulation. A successful MSI request (using pci_enable_msi()) switches
|
||||
a device's interrupt mode to MSI mode. A pre-assigned IOAPIC vector
|
||||
@ -166,11 +174,11 @@ assigned MSI vector will replace dev->irq.
|
||||
|
||||
To return back to its default mode, a device driver should always call
|
||||
pci_disable_msi() to undo the effect of pci_enable_msi(). Note that a
|
||||
device driver should always call free_irq() on MSI vector it has done
|
||||
request_irq() on before calling pci_disable_msi(). Failure to do so
|
||||
results a BUG_ON() and a device will be left with MSI enabled and
|
||||
device driver should always call free_irq() on the MSI vector it has
|
||||
done request_irq() on before calling pci_disable_msi(). Failure to do
|
||||
so results in a BUG_ON() and a device will be left with MSI enabled and
|
||||
leaks its vector. Otherwise, the PCI subsystem restores a device's
|
||||
dev->irq with a pre-assigned IOAPIC vector and marks released
|
||||
dev->irq with a pre-assigned IOAPIC vector and marks the released
|
||||
MSI vector as unused.
|
||||
|
||||
Once being marked as unused, there is no guarantee that the PCI
|
||||
@ -178,8 +186,8 @@ subsystem will reserve this MSI vector for a device. Depending on
|
||||
the availability of current PCI vector resources and the number of
|
||||
MSI/MSI-X requests from other drivers, this MSI may be re-assigned.
|
||||
|
||||
For the case where the PCI subsystem re-assigned this MSI vector
|
||||
another driver, a request to switching back to MSI mode may result
|
||||
For the case where the PCI subsystem re-assigns this MSI vector to
|
||||
another driver, a request to switch back to MSI mode may result
|
||||
in being assigned a different MSI vector or a failure if no more
|
||||
vectors are available.
|
||||
|
||||
@ -208,12 +216,12 @@ Unlike the function pci_enable_msi(), the function pci_enable_msix()
|
||||
does not replace the pre-assigned IOAPIC dev->irq with a new MSI
|
||||
vector because the PCI subsystem writes the 1:1 vector-to-entry mapping
|
||||
into the field vector of each element contained in a second argument.
|
||||
Note that the pre-assigned IO-APIC dev->irq is valid only if the device
|
||||
operates in PIN-IRQ assertion mode. In MSI-X mode, any attempt of
|
||||
Note that the pre-assigned IOAPIC dev->irq is valid only if the device
|
||||
operates in PIN-IRQ assertion mode. In MSI-X mode, any attempt at
|
||||
using dev->irq by the device driver to request for interrupt service
|
||||
may result unpredictabe behavior.
|
||||
|
||||
For each MSI-X vector granted, a device driver is responsible to call
|
||||
For each MSI-X vector granted, a device driver is responsible for calling
|
||||
other functions like request_irq(), enable_irq(), etc. to enable
|
||||
this vector with its corresponding interrupt service handler. It is
|
||||
a device driver's choice to assign all vectors with the same
|
||||
@ -224,13 +232,13 @@ service handler.
|
||||
|
||||
The PCI 3.0 specification has implementation notes that MMIO address
|
||||
space for a device's MSI-X structure should be isolated so that the
|
||||
software system can set different page for controlling accesses to
|
||||
the MSI-X structure. The implementation of MSI patch requires the PCI
|
||||
software system can set different pages for controlling accesses to the
|
||||
MSI-X structure. The implementation of MSI support requires the PCI
|
||||
subsystem, not a device driver, to maintain full control of the MSI-X
|
||||
table/MSI-X PBA and MMIO address space of the MSI-X table/MSI-X PBA.
|
||||
A device driver is prohibited from requesting the MMIO address space
|
||||
of the MSI-X table/MSI-X PBA. Otherwise, the PCI subsystem will fail
|
||||
enabling MSI-X on its hardware device when it calls the function
|
||||
table/MSI-X PBA (Pending Bit Array) and MMIO address space of the MSI-X
|
||||
table/MSI-X PBA. A device driver is prohibited from requesting the MMIO
|
||||
address space of the MSI-X table/MSI-X PBA. Otherwise, the PCI subsystem
|
||||
will fail enabling MSI-X on its hardware device when it calls the function
|
||||
pci_enable_msix().
|
||||
|
||||
5.3.2 Handling MSI-X allocation
|
||||
@ -274,9 +282,9 @@ For the case where fewer MSI-X vectors are allocated to a function
|
||||
than requested, the function pci_enable_msix() will return the
|
||||
maximum number of MSI-X vectors available to the caller. A device
|
||||
driver may re-send its request with fewer or equal vectors indicated
|
||||
in a return. For example, if a device driver requests 5 vectors, but
|
||||
the number of available vectors is 3 vectors, a value of 3 will be a
|
||||
return as a result of pci_enable_msix() call. A function could be
|
||||
in the return. For example, if a device driver requests 5 vectors, but
|
||||
the number of available vectors is 3 vectors, a value of 3 will be
|
||||
returned as a result of pci_enable_msix() call. A function could be
|
||||
designed for its driver to use only 3 MSI-X table entries as
|
||||
different combinations as ABC--, A-B-C, A--CB, etc. Note that this
|
||||
patch does not support multiple entries with the same vector. Such
|
||||
@ -285,49 +293,46 @@ as ABBCC, AABCC, BCCBA, etc will result as a failure by the function
|
||||
pci_enable_msix(). Below are the reasons why supporting multiple
|
||||
entries with the same vector is an undesirable solution.
|
||||
|
||||
- The PCI subsystem can not determine which entry, which
|
||||
generated the message, to mask/unmask MSI while handling
|
||||
- The PCI subsystem cannot determine the entry that
|
||||
generated the message to mask/unmask MSI while handling
|
||||
software driver ISR. Attempting to walk through all MSI-X
|
||||
table entries (2048 max) to mask/unmask any match vector
|
||||
is an undesirable solution.
|
||||
|
||||
- Walk through all MSI-X table entries (2048 max) to handle
|
||||
- Walking through all MSI-X table entries (2048 max) to handle
|
||||
SMP affinity of any match vector is an undesirable solution.
|
||||
|
||||
5.3.4 API pci_enable_msix
|
||||
|
||||
int pci_enable_msix(struct pci_dev *dev, u32 *entries, int nvec)
|
||||
int pci_enable_msix(struct pci_dev *dev, struct msix_entry *entries, int nvec)
|
||||
|
||||
This API enables a device driver to request the PCI subsystem
|
||||
for enabling MSI-X messages on its hardware device. Depending on
|
||||
to enable MSI-X messages on its hardware device. Depending on
|
||||
the availability of PCI vectors resources, the PCI subsystem enables
|
||||
either all or nothing.
|
||||
either all or none of the requested vectors.
|
||||
|
||||
Argument dev points to the device (pci_dev) structure.
|
||||
Argument 'dev' points to the device (pci_dev) structure.
|
||||
|
||||
Argument entries is a pointer of unsigned integer type. The number of
|
||||
elements is indicated in argument nvec. The content of each element
|
||||
will be mapped to the following struct defined in /driver/pci/msi.h.
|
||||
Argument 'entries' is a pointer to an array of msix_entry structs.
|
||||
The number of entries is indicated in argument 'nvec'.
|
||||
struct msix_entry is defined in /driver/pci/msi.h:
|
||||
|
||||
struct msix_entry {
|
||||
u16 vector; /* kernel uses to write alloc vector */
|
||||
u16 entry; /* driver uses to specify entry */
|
||||
};
|
||||
|
||||
A device driver is responsible for initializing the field entry of
|
||||
each element with unique entry supported by MSI-X table. Otherwise,
|
||||
A device driver is responsible for initializing the field 'entry' of
|
||||
each element with a unique entry supported by MSI-X table. Otherwise,
|
||||
-EINVAL will be returned as a result. A successful return of zero
|
||||
indicates the PCI subsystem completes initializing each of requested
|
||||
indicates the PCI subsystem completed initializing each of the requested
|
||||
entries of the MSI-X table with message address and message data.
|
||||
Last but not least, the PCI subsystem will write the 1:1
|
||||
vector-to-entry mapping into the field vector of each element. A
|
||||
device driver is responsible of keeping track of allocated MSI-X
|
||||
vector-to-entry mapping into the field 'vector' of each element. A
|
||||
device driver is responsible for keeping track of allocated MSI-X
|
||||
vectors in its internal data structure.
|
||||
|
||||
Argument nvec is an integer indicating the number of messages
|
||||
requested.
|
||||
|
||||
A return of zero indicates that the number of MSI-X vectors is
|
||||
A return of zero indicates that the number of MSI-X vectors was
|
||||
successfully allocated. A return of greater than zero indicates
|
||||
MSI-X vector shortage. Or a return of less than zero indicates
|
||||
a failure. This failure may be a result of duplicate entries
|
||||
@ -341,12 +346,12 @@ void pci_disable_msix(struct pci_dev *dev)
|
||||
This API should always be used to undo the effect of pci_enable_msix()
|
||||
when a device driver is unloading. Note that a device driver should
|
||||
always call free_irq() on all MSI-X vectors it has done request_irq()
|
||||
on before calling this API. Failure to do so results a BUG_ON() and
|
||||
on before calling this API. Failure to do so results in a BUG_ON() and
|
||||
a device will be left with MSI-X enabled and leaks its vectors.
|
||||
|
||||
5.3.6 MSI-X mode vs. legacy mode diagram
|
||||
|
||||
The below diagram shows the events, which switches the interrupt
|
||||
The below diagram shows the events which switch the interrupt
|
||||
mode on the MSI-X capable device function between MSI-X mode and
|
||||
PIN-IRQ assertion mode (legacy).
|
||||
|
||||
@ -356,22 +361,22 @@ PIN-IRQ assertion mode (legacy).
|
||||
| | ===============> | |
|
||||
------------ pci_disable_msix ------------------------
|
||||
|
||||
Figure 2.0 MSI-X Mode vs. Legacy Mode
|
||||
Figure 2. MSI-X Mode vs. Legacy Mode
|
||||
|
||||
In Figure 2.0, a device operates by default in legacy mode. A
|
||||
In Figure 2, a device operates by default in legacy mode. A
|
||||
successful MSI-X request (using pci_enable_msix()) switches a
|
||||
device's interrupt mode to MSI-X mode. A pre-assigned IOAPIC vector
|
||||
stored in dev->irq will be saved by the PCI subsystem; however,
|
||||
unlike MSI mode, the PCI subsystem will not replace dev->irq with
|
||||
assigned MSI-X vector because the PCI subsystem already writes the 1:1
|
||||
vector-to-entry mapping into the field vector of each element
|
||||
vector-to-entry mapping into the field 'vector' of each element
|
||||
specified in second argument.
|
||||
|
||||
To return back to its default mode, a device driver should always call
|
||||
pci_disable_msix() to undo the effect of pci_enable_msix(). Note that
|
||||
a device driver should always call free_irq() on all MSI-X vectors it
|
||||
has done request_irq() on before calling pci_disable_msix(). Failure
|
||||
to do so results a BUG_ON() and a device will be left with MSI-X
|
||||
to do so results in a BUG_ON() and a device will be left with MSI-X
|
||||
enabled and leaks its vectors. Otherwise, the PCI subsystem switches a
|
||||
device function's interrupt mode from MSI-X mode to legacy mode and
|
||||
marks all allocated MSI-X vectors as unused.
|
||||
@ -383,53 +388,56 @@ MSI/MSI-X requests from other drivers, these MSI-X vectors may be
|
||||
re-assigned.
|
||||
|
||||
For the case where the PCI subsystem re-assigned these MSI-X vectors
|
||||
to other driver, a request to switching back to MSI-X mode may result
|
||||
to other drivers, a request to switch back to MSI-X mode may result
|
||||
being assigned with another set of MSI-X vectors or a failure if no
|
||||
more vectors are available.
|
||||
|
||||
5.4 Handling function implementng both MSI and MSI-X capabilities
|
||||
5.4 Handling function implementing both MSI and MSI-X capabilities
|
||||
|
||||
For the case where a function implements both MSI and MSI-X
|
||||
capabilities, the PCI subsystem enables a device to run either in MSI
|
||||
mode or MSI-X mode but not both. A device driver determines whether it
|
||||
wants MSI or MSI-X enabled on its hardware device. Once a device
|
||||
driver requests for MSI, for example, it is prohibited to request for
|
||||
driver requests for MSI, for example, it is prohibited from requesting
|
||||
MSI-X; in other words, a device driver is not permitted to ping-pong
|
||||
between MSI mod MSI-X mode during a run-time.
|
||||
|
||||
5.5 Hardware requirements for MSI/MSI-X support
|
||||
|
||||
MSI/MSI-X support requires support from both system hardware and
|
||||
individual hardware device functions.
|
||||
|
||||
5.5.1 System hardware support
|
||||
|
||||
Since the target of MSI address is the local APIC CPU, enabling
|
||||
MSI/MSI-X support in Linux kernel is dependent on whether existing
|
||||
system hardware supports local APIC. Users should verify their
|
||||
system whether it runs when CONFIG_X86_LOCAL_APIC=y.
|
||||
MSI/MSI-X support in the Linux kernel is dependent on whether existing
|
||||
system hardware supports local APIC. Users should verify that their
|
||||
system supports local APIC operation by testing that it runs when
|
||||
CONFIG_X86_LOCAL_APIC=y.
|
||||
|
||||
In SMP environment, CONFIG_X86_LOCAL_APIC is automatically set;
|
||||
however, in UP environment, users must manually set
|
||||
CONFIG_X86_LOCAL_APIC. Once CONFIG_X86_LOCAL_APIC=y, setting
|
||||
CONFIG_PCI_MSI enables the VECTOR based scheme and
|
||||
the option for MSI-capable device drivers to selectively enable
|
||||
MSI/MSI-X.
|
||||
CONFIG_PCI_MSI enables the VECTOR based scheme and the option for
|
||||
MSI-capable device drivers to selectively enable MSI/MSI-X.
|
||||
|
||||
Note that CONFIG_X86_IO_APIC setting is irrelevant because MSI/MSI-X
|
||||
vector is allocated new during runtime and MSI/MSI-X support does not
|
||||
depend on BIOS support. This key independency enables MSI/MSI-X
|
||||
support on future IOxAPIC free platform.
|
||||
support on future IOxAPIC free platforms.
|
||||
|
||||
5.5.2 Device hardware support
|
||||
|
||||
The hardware device function supports MSI by indicating the
|
||||
MSI/MSI-X capability structure on its PCI capability list. By
|
||||
default, this capability structure will not be initialized by
|
||||
the kernel to enable MSI during the system boot. In other words,
|
||||
the device function is running on its default pin assertion mode.
|
||||
Note that in many cases the hardware supporting MSI have bugs,
|
||||
which may result in system hang. The software driver of specific
|
||||
MSI-capable hardware is responsible for whether calling
|
||||
which may result in system hangs. The software driver of specific
|
||||
MSI-capable hardware is responsible for deciding whether to call
|
||||
pci_enable_msi or not. A return of zero indicates the kernel
|
||||
successfully initializes the MSI/MSI-X capability structure of the
|
||||
successfully initialized the MSI/MSI-X capability structure of the
|
||||
device function. The device function is now running on MSI/MSI-X mode.
|
||||
|
||||
5.6 How to tell whether MSI/MSI-X is enabled on device function
|
||||
@ -439,10 +447,10 @@ pci_enable_msi()/pci_enable_msix() indicates to a device driver that
|
||||
its device function is initialized successfully and ready to run in
|
||||
MSI/MSI-X mode.
|
||||
|
||||
At the user level, users can use command 'cat /proc/interrupts'
|
||||
to display the vector allocated for a device and its interrupt
|
||||
MSI/MSI-X mode ("PCI MSI"/"PCI MSIX"). Below shows below MSI mode is
|
||||
enabled on a SCSI Adaptec 39320D Ultra320.
|
||||
At the user level, users can use the command 'cat /proc/interrupts'
|
||||
to display the vectors allocated for devices and their interrupt
|
||||
MSI/MSI-X modes ("PCI-MSI"/"PCI-MSI-X"). Below shows MSI mode is
|
||||
enabled on a SCSI Adaptec 39320D Ultra320 controller.
|
||||
|
||||
CPU0 CPU1
|
||||
0: 324639 0 IO-APIC-edge timer
|
||||
@ -453,8 +461,8 @@ enabled on a SCSI Adaptec 39320D Ultra320.
|
||||
15: 1 0 IO-APIC-edge ide1
|
||||
169: 0 0 IO-APIC-level uhci-hcd
|
||||
185: 0 0 IO-APIC-level uhci-hcd
|
||||
193: 138 10 PCI MSI aic79xx
|
||||
201: 30 0 PCI MSI aic79xx
|
||||
193: 138 10 PCI-MSI aic79xx
|
||||
201: 30 0 PCI-MSI aic79xx
|
||||
225: 30 0 IO-APIC-level aic7xxx
|
||||
233: 30 0 IO-APIC-level aic7xxx
|
||||
NMI: 0 0
|
||||
@ -490,8 +498,8 @@ target address set as 0xfeexxxxx, as conformed to PCI
|
||||
specification 2.3 or latest, then it should work.
|
||||
|
||||
Q4. From the driver point of view, if the MSI is lost because
|
||||
of the errors occur during inbound memory write, then it may
|
||||
wait for ever. Is there a mechanism for it to recover?
|
||||
of errors occurring during inbound memory write, then it may
|
||||
wait forever. Is there a mechanism for it to recover?
|
||||
|
||||
A4. Since the target of the transaction is an inbound memory
|
||||
write, all transaction termination conditions (Retry,
|
||||
|
@ -772,8 +772,6 @@ RCU pointer/list traversal:
|
||||
list_for_each_entry_rcu
|
||||
list_for_each_continue_rcu (to be deprecated in favor of new
|
||||
list_for_each_entry_continue_rcu)
|
||||
hlist_for_each_rcu (to be deprecated in favor of
|
||||
hlist_for_each_entry_rcu)
|
||||
hlist_for_each_entry_rcu
|
||||
|
||||
RCU pointer update:
|
||||
|
@ -8,10 +8,9 @@ Compilation of kernel
|
||||
---------------------
|
||||
|
||||
In order to compile ARM Linux, you will need a compiler capable of
|
||||
generating ARM ELF code with GNU extensions. GCC 2.95.1, EGCS
|
||||
1.1.2, and GCC 3.3 are known to be good compilers. Fortunately, you
|
||||
needn't guess. The kernel will report an error if your compiler is
|
||||
a recognized offender.
|
||||
generating ARM ELF code with GNU extensions. GCC 3.3 is known to be
|
||||
a good compiler. Fortunately, you needn't guess. The kernel will report
|
||||
an error if your compiler is a recognized offender.
|
||||
|
||||
To build ARM Linux natively, you shouldn't have to alter the ARCH = line
|
||||
in the top level Makefile. However, if you don't have the ARM Linux ELF
|
||||
|
@ -25,7 +25,7 @@
|
||||
#include <linux/skbuff.h>
|
||||
#include <linux/timer.h>
|
||||
|
||||
#include "connector.h"
|
||||
#include <linux/connector.h>
|
||||
|
||||
static struct cb_id cn_test_id = { 0x123, 0x456 };
|
||||
static char cn_test_name[] = "cn_test";
|
||||
@ -104,7 +104,7 @@ static int cn_test_want_notify(void)
|
||||
req->first = cn_test_id.val + 20;
|
||||
req->range = 10;
|
||||
|
||||
NETLINK_CB(skb).dst_groups = ctl->group;
|
||||
NETLINK_CB(skb).dst_group = ctl->group;
|
||||
//netlink_broadcast(nls, skb, 0, ctl->group, GFP_ATOMIC);
|
||||
netlink_unicast(nls, skb, 0, 0);
|
||||
|
||||
|
@ -19,7 +19,6 @@ There are two dm targets available: snapshot and snapshot-origin.
|
||||
*) snapshot-origin <origin>
|
||||
|
||||
which will normally have one or more snapshots based on it.
|
||||
You must create the snapshot-origin device before you can create snapshots.
|
||||
Reads will be mapped directly to the backing device. For each write, the
|
||||
original data will be saved in the <COW device> of each snapshot to keep
|
||||
its visible content unchanged, at least until the <COW device> fills up.
|
||||
@ -27,7 +26,7 @@ its visible content unchanged, at least until the <COW device> fills up.
|
||||
|
||||
*) snapshot <origin> <COW device> <persistent?> <chunksize>
|
||||
|
||||
A snapshot is created of the <origin> block device. Changed chunks of
|
||||
A snapshot of the <origin> block device is created. Changed chunks of
|
||||
<chunksize> sectors will be stored on the <COW device>. Writes will
|
||||
only go to the <COW device>. Reads will come from the <COW device> or
|
||||
from <origin> for unchanged data. <COW device> will often be
|
||||
@ -37,6 +36,8 @@ the amount of free space and expand the <COW device> before it fills up.
|
||||
|
||||
<persistent?> is P (Persistent) or N (Not persistent - will not survive
|
||||
after reboot).
|
||||
The difference is that for transient snapshots less metadata must be
|
||||
saved on disk - they can be kept in memory by the kernel.
|
||||
|
||||
|
||||
How this is used by LVM2
|
||||
|
@ -1,5 +1,5 @@
|
||||
How to get the Nebula, PCTV and Twinhan DST cards working
|
||||
=========================================================
|
||||
How to get the Nebula, PCTV, FusionHDTV Lite and Twinhan DST cards working
|
||||
==========================================================================
|
||||
|
||||
This class of cards has a bt878a as the PCI interface, and
|
||||
require the bttv driver.
|
||||
@ -26,27 +26,31 @@ Furthermore you need to enable
|
||||
|
||||
In general you need to load the bttv driver, which will handle the gpio and
|
||||
i2c communication for us, plus the common dvb-bt8xx device driver.
|
||||
The frontends for Nebula (nxt6000), Pinnacle PCTV (cx24110) and
|
||||
TwinHan (dst) are loaded automatically by the dvb-bt8xx device driver.
|
||||
The frontends for Nebula (nxt6000), Pinnacle PCTV (cx24110), TwinHan (dst),
|
||||
FusionHDTV DVB-T Lite (mt352) and FusionHDTV5 Lite (lgdt330x) are loaded
|
||||
automatically by the dvb-bt8xx device driver.
|
||||
|
||||
3a) Nebula / Pinnacle PCTV
|
||||
--------------------------
|
||||
3a) Nebula / Pinnacle PCTV / FusionHDTV Lite
|
||||
---------------------------------------------
|
||||
|
||||
$ modprobe bttv (normally bttv is being loaded automatically by kmod)
|
||||
$ modprobe dvb-bt8xx (or just place dvb-bt8xx in /etc/modules for automatic loading)
|
||||
$ modprobe dvb-bt8xx
|
||||
|
||||
(or just place dvb-bt8xx in /etc/modules for automatic loading)
|
||||
|
||||
|
||||
3b) TwinHan and Clones
|
||||
--------------------------
|
||||
|
||||
$ modprobe bttv i2c_hw=1 card=0x71
|
||||
$ modprobe bttv card=0x71
|
||||
$ modprobe dvb-bt8xx
|
||||
$ modprobe dst
|
||||
|
||||
The value 0x71 will override the PCI type detection for dvb-bt8xx,
|
||||
which is necessary for TwinHan cards.
|
||||
which is necessary for TwinHan cards. Omission of this parameter might result
|
||||
in a system lockup.
|
||||
|
||||
If you're having an older card (blue color circuit) and card=0x71 locks
|
||||
If you're having an older card (blue color PCB) and card=0x71 locks up
|
||||
your machine, try using 0x68, too. If that does not work, ask on the
|
||||
mailing list.
|
||||
|
||||
@ -64,11 +68,47 @@ verbose=0 means complete disabling of messages
|
||||
dst_addons takes values 0 and 0x20. A value of 0 means it is a FTA card.
|
||||
0x20 means it has a Conditional Access slot.
|
||||
|
||||
The autodected values are determined bythe cards 'response
|
||||
string' which you can see in your logs e.g.
|
||||
The autodetected values are determined by the cards 'response string'
|
||||
which you can see in your logs e.g.
|
||||
|
||||
dst_get_device_id: Recognise [DSTMCI]
|
||||
|
||||
If you need to sent in bug reports on the dst, please do send in a complete
|
||||
log with the verbose=4 module parameter. For general usage, the default setting
|
||||
of verbose=1 is ideal.
|
||||
|
||||
|
||||
4) Multiple cards
|
||||
--------------------------
|
||||
|
||||
If you happen to be running multiple cards, it would be advisable to load
|
||||
the bttv module with the card id. This would help to solve any module loading
|
||||
problems that you might face.
|
||||
|
||||
For example, if you have a Twinhan and Clones card along with a FusionHDTV5 Lite
|
||||
|
||||
$ modprobe bttv card=0x71 card=0x87
|
||||
|
||||
Here the order of the card id is important and should be the same as that of the
|
||||
physical order of the cards. Here card=0x71 represents the Twinhan and clones
|
||||
and card=0x87 represents Fusion HDTV5 Lite. These arguments can also be
|
||||
specified in decimal, rather than hex:
|
||||
|
||||
$ modprobe bttv card=113 card=135
|
||||
|
||||
Some examples of card-id's
|
||||
|
||||
Pinnacle Sat 0x5e (94)
|
||||
Nebula Digi TV 0x68 (104)
|
||||
PC HDTV 0x70 (112)
|
||||
Twinhan 0x71 (113)
|
||||
FusionHDTV DVB-T Lite 0x80 (128)
|
||||
FusionHDTV5 Lite 0x87 (135)
|
||||
|
||||
For a full list of card-id's, see the V4L Documentation within the kernel
|
||||
source: linux/Documentation/video4linux/CARDLIST.bttv
|
||||
|
||||
If you have problems with this please do ask on the mailing list.
|
||||
|
||||
--
|
||||
Authors: Richard Walker, Jamie Honan, Michael Hunold, Manu Abraham
|
||||
|
@ -41,6 +41,12 @@ o Frontends drivers:
|
||||
- dib3000mb : DiBcom 3000-MB demodulator
|
||||
DVB-S/C/T:
|
||||
- dst : TwinHan DST Frontend
|
||||
ATSC:
|
||||
- nxt200x : Nxtwave NXT2002 & NXT2004
|
||||
- or51211 : or51211 based (pcHDTV HD2000 card)
|
||||
- or51132 : or51132 based (pcHDTV HD3000 card)
|
||||
- bcm3510 : Broadcom BCM3510
|
||||
- lgdt330x : LG Electronics DT3302 & DT3303
|
||||
|
||||
|
||||
o Cards based on the Phillips saa7146 multimedia PCI bridge chip:
|
||||
@ -62,6 +68,10 @@ o Cards based on the Conexant Bt8xx PCI bridge:
|
||||
- Nebula Electronics DigiTV
|
||||
- TwinHan DST
|
||||
- Avermedia DVB-T
|
||||
- ChainTech digitop DST-1000 DVB-S
|
||||
- pcHDTV HD-2000 TV
|
||||
- DViCO FusionHDTV DVB-T Lite
|
||||
- DViCO FusionHDTV5 Lite
|
||||
|
||||
o Technotrend / Hauppauge DVB USB devices:
|
||||
- Nova USB
|
||||
@ -83,3 +93,30 @@ o DiBcom DVB-T USB based devices:
|
||||
- DiBcom USB2.0 DVB-T reference device (non-public)
|
||||
|
||||
o Experimental support for the analog module of the Siemens DVB-C PCI card
|
||||
|
||||
o Cards based on the Conexant cx2388x PCI bridge:
|
||||
- ADS Tech Instant TV DVB-T PCI
|
||||
- ATI HDTV Wonder
|
||||
- digitalnow DNTV Live! DVB-T
|
||||
- DViCO FusionHDTV DVB-T1
|
||||
- DViCO FusionHDTV DVB-T Plus
|
||||
- DViCO FusionHDTV3 Gold-Q
|
||||
- DViCO FusionHDTV3 Gold-T
|
||||
- DViCO FusionHDTV5 Gold
|
||||
- Hauppauge Nova-T DVB-T
|
||||
- KWorld/VStream XPert DVB-T
|
||||
- pcHDTV HD3000 HDTV
|
||||
- TerraTec Cinergy 1400 DVB-T
|
||||
- WinFast DTV1000-T
|
||||
|
||||
o Cards based on the Phillips saa7134 PCI bridge:
|
||||
- Medion 7134
|
||||
- Pinnacle PCTV 300i DVB-T + PAL
|
||||
- LifeView FlyDVB-T DUO
|
||||
- Typhoon DVB-T Duo Digital/Analog Cardbus
|
||||
- Philips TOUGH DVB-T reference design
|
||||
- Philips EUROPA V3 reference design
|
||||
- Compro Videomate DVB-T300
|
||||
- Compro Videomate DVB-T200
|
||||
- AVerMedia AVerTVHD MCE A180
|
||||
|
||||
|
@ -75,5 +75,22 @@ Ernst Peinlich <e.peinlich@inode.at>
|
||||
Peter Beutner <p.beutner@gmx.net>
|
||||
for the IR code for the ttusb-dec driver
|
||||
|
||||
Wilson Michaels <wilsonmichaels@earthlink.net>
|
||||
for the lgdt330x frontend driver, and various bugfixes
|
||||
|
||||
Michael Krufky <mkrufky@m1k.net>
|
||||
for maintaining v4l/dvb inter-tree dependencies
|
||||
|
||||
Taylor Jacob <rtjacob@earthlink.net>
|
||||
for the nxt2002 frontend driver
|
||||
|
||||
Jean-Francois Thibert <jeanfrancois@sagetv.com>
|
||||
for the nxt2004 frontend driver
|
||||
|
||||
Kirk Lapray <kirk.lapray@gmail.com>
|
||||
for the or51211 and or51132 frontend drivers, and
|
||||
for merging the nxt2002 and nxt2004 modules into a
|
||||
single nxt200x frontend driver.
|
||||
|
||||
(If you think you should be in this list, but you are not, drop a
|
||||
line to the DVB mailing list)
|
||||
|
@ -22,7 +22,7 @@ use File::Temp qw/ tempdir /;
|
||||
use IO::Handle;
|
||||
|
||||
@components = ( "sp8870", "sp887x", "tda10045", "tda10046", "av7110", "dec2000t",
|
||||
"dec2540t", "dec3000s", "vp7041", "dibusb", "nxt2002",
|
||||
"dec2540t", "dec3000s", "vp7041", "dibusb", "nxt2002", "nxt2004",
|
||||
"or51211", "or51132_qam", "or51132_vsb");
|
||||
|
||||
# Check args
|
||||
@ -252,6 +252,23 @@ sub nxt2002 {
|
||||
$outfile;
|
||||
}
|
||||
|
||||
sub nxt2004 {
|
||||
my $sourcefile = "AVerTVHD_MCE_A180_Drv_v1.2.2.16.zip";
|
||||
my $url = "http://www.aver.com/support/Drivers/$sourcefile";
|
||||
my $hash = "111cb885b1e009188346d72acfed024c";
|
||||
my $outfile = "dvb-fe-nxt2004.fw";
|
||||
my $tmpdir = tempdir(DIR => "/tmp", CLEANUP => 1);
|
||||
|
||||
checkstandard();
|
||||
|
||||
wgetfile($sourcefile, $url);
|
||||
unzip($sourcefile, $tmpdir);
|
||||
verify("$tmpdir/3xHybrid.sys", $hash);
|
||||
extract("$tmpdir/3xHybrid.sys", 465304, 9584, $outfile);
|
||||
|
||||
$outfile;
|
||||
}
|
||||
|
||||
sub or51211 {
|
||||
my $fwfile = "dvb-fe-or51211.fw";
|
||||
my $url = "http://linuxtv.org/downloads/firmware/$fwfile";
|
||||
|
152
Documentation/fb/fbcon.txt
Normal file
152
Documentation/fb/fbcon.txt
Normal file
@ -0,0 +1,152 @@
|
||||
The Framebuffer Console
|
||||
=======================
|
||||
|
||||
The framebuffer console (fbcon), as its name implies, is a text
|
||||
console running on top of the framebuffer device. It has the functionality of
|
||||
any standard text console driver, such as the VGA console, with the added
|
||||
features that can be attributed to the graphical nature of the framebuffer.
|
||||
|
||||
In the x86 architecture, the framebuffer console is optional, and
|
||||
some even treat it as a toy. For other architectures, it is the only available
|
||||
display device, text or graphical.
|
||||
|
||||
What are the features of fbcon? The framebuffer console supports
|
||||
high resolutions, varying font types, display rotation, primitive multihead,
|
||||
etc. Theoretically, multi-colored fonts, blending, aliasing, and any feature
|
||||
made available by the underlying graphics card are also possible.
|
||||
|
||||
A. Configuration
|
||||
|
||||
The framebuffer console can be enabled by using your favorite kernel
|
||||
configuration tool. It is under Device Drivers->Graphics Support->Support for
|
||||
framebuffer devices->Framebuffer Console Support. Select 'y' to compile
|
||||
support statically, or 'm' for module support. The module will be fbcon.
|
||||
|
||||
In order for fbcon to activate, at least one framebuffer driver is
|
||||
required, so choose from any of the numerous drivers available. For x86
|
||||
systems, they almost universally have VGA cards, so vga16fb and vesafb will
|
||||
always be available. However, using a chipset-specific driver will give you
|
||||
more speed and features, such as the ability to change the video mode
|
||||
dynamically.
|
||||
|
||||
To display the penguin logo, choose any logo available in Logo
|
||||
Configuration->Boot up logo.
|
||||
|
||||
Also, you will need to select at least one compiled-in fonts, but if
|
||||
you don't do anything, the kernel configuration tool will select one for you,
|
||||
usually an 8x16 font.
|
||||
|
||||
GOTCHA: A common bug report is enabling the framebuffer without enabling the
|
||||
framebuffer console. Depending on the driver, you may get a blanked or
|
||||
garbled display, but the system still boots to completion. If you are
|
||||
fortunate to have a driver that does not alter the graphics chip, then you
|
||||
will still get a VGA console.
|
||||
|
||||
B. Loading
|
||||
|
||||
Possible scenarios:
|
||||
|
||||
1. Driver and fbcon are compiled statically
|
||||
|
||||
Usually, fbcon will automatically take over your console. The notable
|
||||
exception is vesafb. It needs to be explicitly activated with the
|
||||
vga= boot option parameter.
|
||||
|
||||
2. Driver is compiled statically, fbcon is compiled as a module
|
||||
|
||||
Depending on the driver, you either get a standard console, or a
|
||||
garbled display, as mentioned above. To get a framebuffer console,
|
||||
do a 'modprobe fbcon'.
|
||||
|
||||
3. Driver is compiled as a module, fbcon is compiled statically
|
||||
|
||||
You get your standard console. Once the driver is loaded with
|
||||
'modprobe xxxfb', fbcon automatically takes over the console with
|
||||
the possible exception of using the fbcon=map:n option. See below.
|
||||
|
||||
4. Driver and fbcon are compiled as a module.
|
||||
|
||||
You can load them in any order. Once both are loaded, fbcon will take
|
||||
over the console.
|
||||
|
||||
C. Boot options
|
||||
|
||||
The framebuffer console has several, largely unknown, boot options
|
||||
that can change its behavior.
|
||||
|
||||
1. fbcon=font:<name>
|
||||
|
||||
Select the initial font to use. The value 'name' can be any of the
|
||||
compiled-in fonts: VGA8x16, 7x14, 10x18, VGA8x8, MINI4x6, RomanLarge,
|
||||
SUN8x16, SUN12x22, ProFont6x11, Acorn8x8, PEARL8x8.
|
||||
|
||||
Note, not all drivers can handle font with widths not divisible by 8,
|
||||
such as vga16fb.
|
||||
|
||||
2. fbcon=scrollback:<value>[k]
|
||||
|
||||
The scrollback buffer is memory that is used to preserve display
|
||||
contents that has already scrolled past your view. This is accessed
|
||||
by using the Shift-PageUp key combination. The value 'value' is any
|
||||
integer. It defaults to 32KB. The 'k' suffix is optional, and will
|
||||
multiply the 'value' by 1024.
|
||||
|
||||
3. fbcon=map:<0123>
|
||||
|
||||
This is an interesting option. It tells which driver gets mapped to
|
||||
which console. The value '0123' is a sequence that gets repeated until
|
||||
the total length is 64 which is the number of consoles available. In
|
||||
the above example, it is expanded to 012301230123... and the mapping
|
||||
will be:
|
||||
|
||||
tty | 1 2 3 4 5 6 7 8 9 ...
|
||||
fb | 0 1 2 3 0 1 2 3 0 ...
|
||||
|
||||
('cat /proc/fb' should tell you what the fb numbers are)
|
||||
|
||||
One side effect that may be useful is using a map value that exceeds
|
||||
the number of loaded fb drivers. For example, if only one driver is
|
||||
available, fb0, adding fbcon=map:1 tells fbcon not to take over the
|
||||
console.
|
||||
|
||||
Later on, when you want to map the console the to the framebuffer
|
||||
device, you can use the con2fbmap utility.
|
||||
|
||||
4. fbcon=vc:<n1>-<n2>
|
||||
|
||||
This option tells fbcon to take over only a range of consoles as
|
||||
specified by the values 'n1' and 'n2'. The rest of the consoles
|
||||
outside the given range will still be controlled by the standard
|
||||
console driver.
|
||||
|
||||
NOTE: For x86 machines, the standard console is the VGA console which
|
||||
is typically located on the same video card. Thus, the consoles that
|
||||
are controlled by the VGA console will be garbled.
|
||||
|
||||
4. fbcon=rotate:<n>
|
||||
|
||||
This option changes the orientation angle of the console display. The
|
||||
value 'n' accepts the following:
|
||||
|
||||
0 - normal orientation (0 degree)
|
||||
1 - clockwise orientation (90 degrees)
|
||||
2 - upside down orientation (180 degrees)
|
||||
3 - counterclockwise orientation (270 degrees)
|
||||
|
||||
The angle can be changed anytime afterwards by 'echoing' the same
|
||||
numbers to any one of the 2 attributes found in
|
||||
/sys/class/graphics/fb{x}
|
||||
|
||||
con_rotate - rotate the display of the active console
|
||||
con_rotate_all - rotate the display of all consoles
|
||||
|
||||
Console rotation will only become available if Console Rotation
|
||||
Support is compiled in your kernel.
|
||||
|
||||
NOTE: This is purely console rotation. Any other applications that
|
||||
use the framebuffer will remain at their 'normal'orientation.
|
||||
Actually, the underlying fb driver is totally ignorant of console
|
||||
rotation.
|
||||
|
||||
---
|
||||
Antonino Daplas <adaplas@pol.net>
|
@ -146,10 +146,10 @@ pmipal Use the protected mode interface for palette changes.
|
||||
|
||||
mtrr:n setup memory type range registers for the vesafb framebuffer
|
||||
where n:
|
||||
0 - disabled (equivalent to nomtrr)
|
||||
0 - disabled (equivalent to nomtrr) (default)
|
||||
1 - uncachable
|
||||
2 - write-back
|
||||
3 - write-combining (default)
|
||||
3 - write-combining
|
||||
4 - write-through
|
||||
|
||||
If you see the following in dmesg, choose the type that matches the
|
||||
|
@ -25,6 +25,13 @@ Who: Adrian Bunk <bunk@stusta.de>
|
||||
|
||||
---------------------------
|
||||
|
||||
What: drivers depending on OBSOLETE_OSS_DRIVER
|
||||
When: January 2006
|
||||
Why: OSS drivers with ALSA replacements
|
||||
Who: Adrian Bunk <bunk@stusta.de>
|
||||
|
||||
---------------------------
|
||||
|
||||
What: RCU API moves to EXPORT_SYMBOL_GPL
|
||||
When: April 2006
|
||||
Files: include/linux/rcupdate.h, kernel/rcupdate.c
|
||||
@ -60,6 +67,21 @@ Who: Jody McIntyre <scjody@steamballoon.com>
|
||||
|
||||
---------------------------
|
||||
|
||||
What: Video4Linux API 1 ioctls and video_decoder.h from Video devices.
|
||||
When: July 2006
|
||||
Why: V4L1 AP1 was replaced by V4L2 API. during migration from 2.4 to 2.6
|
||||
series. The old API have lots of drawbacks and don't provide enough
|
||||
means to work with all video and audio standards. The newer API is
|
||||
already available on the main drivers and should be used instead.
|
||||
Newer drivers should use v4l_compat_translate_ioctl function to handle
|
||||
old calls, replacing to newer ones.
|
||||
Decoder iocts are using internally to allow video drivers to
|
||||
communicate with video decoders. This should also be improved to allow
|
||||
V4L2 calls being translated into compatible internal ioctls.
|
||||
Who: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
|
||||
|
||||
---------------------------
|
||||
|
||||
What: i2c sysfs name change: in1_ref, vid deprecated in favour of cpu0_vid
|
||||
When: November 2005
|
||||
Files: drivers/i2c/chips/adm1025.c, drivers/i2c/chips/adm1026.c
|
||||
@ -69,6 +91,22 @@ Who: Grant Coady <gcoady@gmail.com>
|
||||
|
||||
---------------------------
|
||||
|
||||
What: remove EXPORT_SYMBOL(panic_timeout)
|
||||
When: April 2006
|
||||
Files: kernel/panic.c
|
||||
Why: No modular usage in the kernel.
|
||||
Who: Adrian Bunk <bunk@stusta.de>
|
||||
|
||||
---------------------------
|
||||
|
||||
What: remove EXPORT_SYMBOL(insert_resource)
|
||||
When: April 2006
|
||||
Files: kernel/resource.c
|
||||
Why: No modular usage in the kernel.
|
||||
Who: Adrian Bunk <bunk@stusta.de>
|
||||
|
||||
---------------------------
|
||||
|
||||
What: PCMCIA control ioctl (needed for pcmcia-cs [cardmgr, cardctl])
|
||||
When: November 2005
|
||||
Files: drivers/pcmcia/: pcmcia_ioctl.c
|
||||
@ -95,3 +133,10 @@ Why: This interface has been obsoleted by the new layer3-independent
|
||||
to link against API-compatible library on top of libnfnetlink_queue
|
||||
instead of the current 'libipq'.
|
||||
Who: Harald Welte <laforge@netfilter.org>
|
||||
|
||||
---------------------------
|
||||
|
||||
What: EXPORT_SYMBOL(lookup_hash)
|
||||
When: January 2006
|
||||
Why: Too low-level interface. Use lookup_one_len or lookup_create instead.
|
||||
Who: Christoph Hellwig <hch@lst.de>
|
||||
|
173
Documentation/filesystems/dentry-locking.txt
Normal file
173
Documentation/filesystems/dentry-locking.txt
Normal file
@ -0,0 +1,173 @@
|
||||
RCU-based dcache locking model
|
||||
==============================
|
||||
|
||||
On many workloads, the most common operation on dcache is to look up a
|
||||
dentry, given a parent dentry and the name of the child. Typically,
|
||||
for every open(), stat() etc., the dentry corresponding to the
|
||||
pathname will be looked up by walking the tree starting with the first
|
||||
component of the pathname and using that dentry along with the next
|
||||
component to look up the next level and so on. Since it is a frequent
|
||||
operation for workloads like multiuser environments and web servers,
|
||||
it is important to optimize this path.
|
||||
|
||||
Prior to 2.5.10, dcache_lock was acquired in d_lookup and thus in
|
||||
every component during path look-up. Since 2.5.10 onwards, fast-walk
|
||||
algorithm changed this by holding the dcache_lock at the beginning and
|
||||
walking as many cached path component dentries as possible. This
|
||||
significantly decreases the number of acquisition of
|
||||
dcache_lock. However it also increases the lock hold time
|
||||
significantly and affects performance in large SMP machines. Since
|
||||
2.5.62 kernel, dcache has been using a new locking model that uses RCU
|
||||
to make dcache look-up lock-free.
|
||||
|
||||
The current dcache locking model is not very different from the
|
||||
existing dcache locking model. Prior to 2.5.62 kernel, dcache_lock
|
||||
protected the hash chain, d_child, d_alias, d_lru lists as well as
|
||||
d_inode and several other things like mount look-up. RCU-based changes
|
||||
affect only the way the hash chain is protected. For everything else
|
||||
the dcache_lock must be taken for both traversing as well as
|
||||
updating. The hash chain updates too take the dcache_lock. The
|
||||
significant change is the way d_lookup traverses the hash chain, it
|
||||
doesn't acquire the dcache_lock for this and rely on RCU to ensure
|
||||
that the dentry has not been *freed*.
|
||||
|
||||
|
||||
Dcache locking details
|
||||
======================
|
||||
|
||||
For many multi-user workloads, open() and stat() on files are very
|
||||
frequently occurring operations. Both involve walking of path names to
|
||||
find the dentry corresponding to the concerned file. In 2.4 kernel,
|
||||
dcache_lock was held during look-up of each path component. Contention
|
||||
and cache-line bouncing of this global lock caused significant
|
||||
scalability problems. With the introduction of RCU in Linux kernel,
|
||||
this was worked around by making the look-up of path components during
|
||||
path walking lock-free.
|
||||
|
||||
|
||||
Safe lock-free look-up of dcache hash table
|
||||
===========================================
|
||||
|
||||
Dcache is a complex data structure with the hash table entries also
|
||||
linked together in other lists. In 2.4 kernel, dcache_lock protected
|
||||
all the lists. We applied RCU only on hash chain walking. The rest of
|
||||
the lists are still protected by dcache_lock. Some of the important
|
||||
changes are :
|
||||
|
||||
1. The deletion from hash chain is done using hlist_del_rcu() macro
|
||||
which doesn't initialize next pointer of the deleted dentry and
|
||||
this allows us to walk safely lock-free while a deletion is
|
||||
happening.
|
||||
|
||||
2. Insertion of a dentry into the hash table is done using
|
||||
hlist_add_head_rcu() which take care of ordering the writes - the
|
||||
writes to the dentry must be visible before the dentry is
|
||||
inserted. This works in conjunction with hlist_for_each_rcu() while
|
||||
walking the hash chain. The only requirement is that all
|
||||
initialization to the dentry must be done before
|
||||
hlist_add_head_rcu() since we don't have dcache_lock protection
|
||||
while traversing the hash chain. This isn't different from the
|
||||
existing code.
|
||||
|
||||
3. The dentry looked up without holding dcache_lock by cannot be
|
||||
returned for walking if it is unhashed. It then may have a NULL
|
||||
d_inode or other bogosity since RCU doesn't protect the other
|
||||
fields in the dentry. We therefore use a flag DCACHE_UNHASHED to
|
||||
indicate unhashed dentries and use this in conjunction with a
|
||||
per-dentry lock (d_lock). Once looked up without the dcache_lock,
|
||||
we acquire the per-dentry lock (d_lock) and check if the dentry is
|
||||
unhashed. If so, the look-up is failed. If not, the reference count
|
||||
of the dentry is increased and the dentry is returned.
|
||||
|
||||
4. Once a dentry is looked up, it must be ensured during the path walk
|
||||
for that component it doesn't go away. In pre-2.5.10 code, this was
|
||||
done holding a reference to the dentry. dcache_rcu does the same.
|
||||
In some sense, dcache_rcu path walking looks like the pre-2.5.10
|
||||
version.
|
||||
|
||||
5. All dentry hash chain updates must take the dcache_lock as well as
|
||||
the per-dentry lock in that order. dput() does this to ensure that
|
||||
a dentry that has just been looked up in another CPU doesn't get
|
||||
deleted before dget() can be done on it.
|
||||
|
||||
6. There are several ways to do reference counting of RCU protected
|
||||
objects. One such example is in ipv4 route cache where deferred
|
||||
freeing (using call_rcu()) is done as soon as the reference count
|
||||
goes to zero. This cannot be done in the case of dentries because
|
||||
tearing down of dentries require blocking (dentry_iput()) which
|
||||
isn't supported from RCU callbacks. Instead, tearing down of
|
||||
dentries happen synchronously in dput(), but actual freeing happens
|
||||
later when RCU grace period is over. This allows safe lock-free
|
||||
walking of the hash chains, but a matched dentry may have been
|
||||
partially torn down. The checking of DCACHE_UNHASHED flag with
|
||||
d_lock held detects such dentries and prevents them from being
|
||||
returned from look-up.
|
||||
|
||||
|
||||
Maintaining POSIX rename semantics
|
||||
==================================
|
||||
|
||||
Since look-up of dentries is lock-free, it can race against a
|
||||
concurrent rename operation. For example, during rename of file A to
|
||||
B, look-up of either A or B must succeed. So, if look-up of B happens
|
||||
after A has been removed from the hash chain but not added to the new
|
||||
hash chain, it may fail. Also, a comparison while the name is being
|
||||
written concurrently by a rename may result in false positive matches
|
||||
violating rename semantics. Issues related to race with rename are
|
||||
handled as described below :
|
||||
|
||||
1. Look-up can be done in two ways - d_lookup() which is safe from
|
||||
simultaneous renames and __d_lookup() which is not. If
|
||||
__d_lookup() fails, it must be followed up by a d_lookup() to
|
||||
correctly determine whether a dentry is in the hash table or
|
||||
not. d_lookup() protects look-ups using a sequence lock
|
||||
(rename_lock).
|
||||
|
||||
2. The name associated with a dentry (d_name) may be changed if a
|
||||
rename is allowed to happen simultaneously. To avoid memcmp() in
|
||||
__d_lookup() go out of bounds due to a rename and false positive
|
||||
comparison, the name comparison is done while holding the
|
||||
per-dentry lock. This prevents concurrent renames during this
|
||||
operation.
|
||||
|
||||
3. Hash table walking during look-up may move to a different bucket as
|
||||
the current dentry is moved to a different bucket due to rename.
|
||||
But we use hlists in dcache hash table and they are
|
||||
null-terminated. So, even if a dentry moves to a different bucket,
|
||||
hash chain walk will terminate. [with a list_head list, it may not
|
||||
since termination is when the list_head in the original bucket is
|
||||
reached]. Since we redo the d_parent check and compare name while
|
||||
holding d_lock, lock-free look-up will not race against d_move().
|
||||
|
||||
4. There can be a theoretical race when a dentry keeps coming back to
|
||||
original bucket due to double moves. Due to this look-up may
|
||||
consider that it has never moved and can end up in a infinite loop.
|
||||
But this is not any worse that theoretical livelocks we already
|
||||
have in the kernel.
|
||||
|
||||
|
||||
Important guidelines for filesystem developers related to dcache_rcu
|
||||
====================================================================
|
||||
|
||||
1. Existing dcache interfaces (pre-2.5.62) exported to filesystem
|
||||
don't change. Only dcache internal implementation changes. However
|
||||
filesystems *must not* delete from the dentry hash chains directly
|
||||
using the list macros like allowed earlier. They must use dcache
|
||||
APIs like d_drop() or __d_drop() depending on the situation.
|
||||
|
||||
2. d_flags is now protected by a per-dentry lock (d_lock). All access
|
||||
to d_flags must be protected by it.
|
||||
|
||||
3. For a hashed dentry, checking of d_count needs to be protected by
|
||||
d_lock.
|
||||
|
||||
|
||||
Papers and other documentation on dcache locking
|
||||
================================================
|
||||
|
||||
1. Scaling dcache with RCU (http://linuxjournal.com/article.php?sid=7124).
|
||||
|
||||
2. http://lse.sourceforge.net/locking/dcache/dcache.html
|
||||
|
||||
|
||||
|
@ -1812,11 +1812,6 @@ it may overflow the messages buffer, but try to get as much of it as
|
||||
you can
|
||||
|
||||
|
||||
if you get an Oops, run ksymoops to decode it so that the
|
||||
names of the offending functions are provided. A non-decoded Oops is
|
||||
pretty useless
|
||||
|
||||
|
||||
send a copy of your devfsd configuration file(s)
|
||||
|
||||
send the bug report to me first.
|
||||
|
@ -17,8 +17,6 @@ set using tune2fs(8). Kernel-determined defaults are indicated by (*).
|
||||
bsddf (*) Makes `df' act like BSD.
|
||||
minixdf Makes `df' act like Minix.
|
||||
|
||||
check Check block and inode bitmaps at mount time
|
||||
(requires CONFIG_EXT2_CHECK).
|
||||
check=none, nocheck (*) Don't do extra checking of bitmaps on mount
|
||||
(check=normal and check=strict options removed)
|
||||
|
||||
|
195
Documentation/filesystems/ramfs-rootfs-initramfs.txt
Normal file
195
Documentation/filesystems/ramfs-rootfs-initramfs.txt
Normal file
@ -0,0 +1,195 @@
|
||||
ramfs, rootfs and initramfs
|
||||
October 17, 2005
|
||||
Rob Landley <rob@landley.net>
|
||||
=============================
|
||||
|
||||
What is ramfs?
|
||||
--------------
|
||||
|
||||
Ramfs is a very simple filesystem that exports Linux's disk caching
|
||||
mechanisms (the page cache and dentry cache) as a dynamically resizable
|
||||
ram-based filesystem.
|
||||
|
||||
Normally all files are cached in memory by Linux. Pages of data read from
|
||||
backing store (usually the block device the filesystem is mounted on) are kept
|
||||
around in case it's needed again, but marked as clean (freeable) in case the
|
||||
Virtual Memory system needs the memory for something else. Similarly, data
|
||||
written to files is marked clean as soon as it has been written to backing
|
||||
store, but kept around for caching purposes until the VM reallocates the
|
||||
memory. A similar mechanism (the dentry cache) greatly speeds up access to
|
||||
directories.
|
||||
|
||||
With ramfs, there is no backing store. Files written into ramfs allocate
|
||||
dentries and page cache as usual, but there's nowhere to write them to.
|
||||
This means the pages are never marked clean, so they can't be freed by the
|
||||
VM when it's looking to recycle memory.
|
||||
|
||||
The amount of code required to implement ramfs is tiny, because all the
|
||||
work is done by the existing Linux caching infrastructure. Basically,
|
||||
you're mounting the disk cache as a filesystem. Because of this, ramfs is not
|
||||
an optional component removable via menuconfig, since there would be negligible
|
||||
space savings.
|
||||
|
||||
ramfs and ramdisk:
|
||||
------------------
|
||||
|
||||
The older "ram disk" mechanism created a synthetic block device out of
|
||||
an area of ram and used it as backing store for a filesystem. This block
|
||||
device was of fixed size, so the filesystem mounted on it was of fixed
|
||||
size. Using a ram disk also required unnecessarily copying memory from the
|
||||
fake block device into the page cache (and copying changes back out), as well
|
||||
as creating and destroying dentries. Plus it needed a filesystem driver
|
||||
(such as ext2) to format and interpret this data.
|
||||
|
||||
Compared to ramfs, this wastes memory (and memory bus bandwidth), creates
|
||||
unnecessary work for the CPU, and pollutes the CPU caches. (There are tricks
|
||||
to avoid this copying by playing with the page tables, but they're unpleasantly
|
||||
complicated and turn out to be about as expensive as the copying anyway.)
|
||||
More to the point, all the work ramfs is doing has to happen _anyway_,
|
||||
since all file access goes through the page and dentry caches. The ram
|
||||
disk is simply unnecessary, ramfs is internally much simpler.
|
||||
|
||||
Another reason ramdisks are semi-obsolete is that the introduction of
|
||||
loopback devices offered a more flexible and convenient way to create
|
||||
synthetic block devices, now from files instead of from chunks of memory.
|
||||
See losetup (8) for details.
|
||||
|
||||
ramfs and tmpfs:
|
||||
----------------
|
||||
|
||||
One downside of ramfs is you can keep writing data into it until you fill
|
||||
up all memory, and the VM can't free it because the VM thinks that files
|
||||
should get written to backing store (rather than swap space), but ramfs hasn't
|
||||
got any backing store. Because of this, only root (or a trusted user) should
|
||||
be allowed write access to a ramfs mount.
|
||||
|
||||
A ramfs derivative called tmpfs was created to add size limits, and the ability
|
||||
to write the data to swap space. Normal users can be allowed write access to
|
||||
tmpfs mounts. See Documentation/filesystems/tmpfs.txt for more information.
|
||||
|
||||
What is rootfs?
|
||||
---------------
|
||||
|
||||
Rootfs is a special instance of ramfs, which is always present in 2.6 systems.
|
||||
(It's used internally as the starting and stopping point for searches of the
|
||||
kernel's doubly-linked list of mount points.)
|
||||
|
||||
Most systems just mount another filesystem over it and ignore it. The
|
||||
amount of space an empty instance of ramfs takes up is tiny.
|
||||
|
||||
What is initramfs?
|
||||
------------------
|
||||
|
||||
All 2.6 Linux kernels contain a gzipped "cpio" format archive, which is
|
||||
extracted into rootfs when the kernel boots up. After extracting, the kernel
|
||||
checks to see if rootfs contains a file "init", and if so it executes it as PID
|
||||
1. If found, this init process is responsible for bringing the system the
|
||||
rest of the way up, including locating and mounting the real root device (if
|
||||
any). If rootfs does not contain an init program after the embedded cpio
|
||||
archive is extracted into it, the kernel will fall through to the older code
|
||||
to locate and mount a root partition, then exec some variant of /sbin/init
|
||||
out of that.
|
||||
|
||||
All this differs from the old initrd in several ways:
|
||||
|
||||
- The old initrd was a separate file, while the initramfs archive is linked
|
||||
into the linux kernel image. (The directory linux-*/usr is devoted to
|
||||
generating this archive during the build.)
|
||||
|
||||
- The old initrd file was a gzipped filesystem image (in some file format,
|
||||
such as ext2, that had to be built into the kernel), while the new
|
||||
initramfs archive is a gzipped cpio archive (like tar only simpler,
|
||||
see cpio(1) and Documentation/early-userspace/buffer-format.txt).
|
||||
|
||||
- The program run by the old initrd (which was called /initrd, not /init) did
|
||||
some setup and then returned to the kernel, while the init program from
|
||||
initramfs is not expected to return to the kernel. (If /init needs to hand
|
||||
off control it can overmount / with a new root device and exec another init
|
||||
program. See the switch_root utility, below.)
|
||||
|
||||
- When switching another root device, initrd would pivot_root and then
|
||||
umount the ramdisk. But initramfs is rootfs: you can neither pivot_root
|
||||
rootfs, nor unmount it. Instead delete everything out of rootfs to
|
||||
free up the space (find -xdev / -exec rm '{}' ';'), overmount rootfs
|
||||
with the new root (cd /newmount; mount --move . /; chroot .), attach
|
||||
stdin/stdout/stderr to the new /dev/console, and exec the new init.
|
||||
|
||||
Since this is a remarkably persnickity process (and involves deleting
|
||||
commands before you can run them), the klibc package introduced a helper
|
||||
program (utils/run_init.c) to do all this for you. Most other packages
|
||||
(such as busybox) have named this command "switch_root".
|
||||
|
||||
Populating initramfs:
|
||||
---------------------
|
||||
|
||||
The 2.6 kernel build process always creates a gzipped cpio format initramfs
|
||||
archive and links it into the resulting kernel binary. By default, this
|
||||
archive is empty (consuming 134 bytes on x86). The config option
|
||||
CONFIG_INITRAMFS_SOURCE (for some reason buried under devices->block devices
|
||||
in menuconfig, and living in usr/Kconfig) can be used to specify a source for
|
||||
the initramfs archive, which will automatically be incorporated into the
|
||||
resulting binary. This option can point to an existing gzipped cpio archive, a
|
||||
directory containing files to be archived, or a text file specification such
|
||||
as the following example:
|
||||
|
||||
dir /dev 755 0 0
|
||||
nod /dev/console 644 0 0 c 5 1
|
||||
nod /dev/loop0 644 0 0 b 7 0
|
||||
dir /bin 755 1000 1000
|
||||
slink /bin/sh busybox 777 0 0
|
||||
file /bin/busybox initramfs/busybox 755 0 0
|
||||
dir /proc 755 0 0
|
||||
dir /sys 755 0 0
|
||||
dir /mnt 755 0 0
|
||||
file /init initramfs/init.sh 755 0 0
|
||||
|
||||
One advantage of the text file is that root access is not required to
|
||||
set permissions or create device nodes in the new archive. (Note that those
|
||||
two example "file" entries expect to find files named "init.sh" and "busybox" in
|
||||
a directory called "initramfs", under the linux-2.6.* directory. See
|
||||
Documentation/early-userspace/README for more details.)
|
||||
|
||||
If you don't already understand what shared libraries, devices, and paths
|
||||
you need to get a minimal root filesystem up and running, here are some
|
||||
references:
|
||||
http://www.tldp.org/HOWTO/Bootdisk-HOWTO/
|
||||
http://www.tldp.org/HOWTO/From-PowerUp-To-Bash-Prompt-HOWTO.html
|
||||
http://www.linuxfromscratch.org/lfs/view/stable/
|
||||
|
||||
The "klibc" package (http://www.kernel.org/pub/linux/libs/klibc) is
|
||||
designed to be a tiny C library to statically link early userspace
|
||||
code against, along with some related utilities. It is BSD licensed.
|
||||
|
||||
I use uClibc (http://www.uclibc.org) and busybox (http://www.busybox.net)
|
||||
myself. These are LGPL and GPL, respectively.
|
||||
|
||||
In theory you could use glibc, but that's not well suited for small embedded
|
||||
uses like this. (A "hello world" program statically linked against glibc is
|
||||
over 400k. With uClibc it's 7k. Also note that glibc dlopens libnss to do
|
||||
name lookups, even when otherwise statically linked.)
|
||||
|
||||
Future directions:
|
||||
------------------
|
||||
|
||||
Today (2.6.14), initramfs is always compiled in, but not always used. The
|
||||
kernel falls back to legacy boot code that is reached only if initramfs does
|
||||
not contain an /init program. The fallback is legacy code, there to ensure a
|
||||
smooth transition and allowing early boot functionality to gradually move to
|
||||
"early userspace" (I.E. initramfs).
|
||||
|
||||
The move to early userspace is necessary because finding and mounting the real
|
||||
root device is complex. Root partitions can span multiple devices (raid or
|
||||
separate journal). They can be out on the network (requiring dhcp, setting a
|
||||
specific mac address, logging into a server, etc). They can live on removable
|
||||
media, with dynamically allocated major/minor numbers and persistent naming
|
||||
issues requiring a full udev implementation to sort out. They can be
|
||||
compressed, encrypted, copy-on-write, loopback mounted, strangely partitioned,
|
||||
and so on.
|
||||
|
||||
This kind of complexity (which inevitably includes policy) is rightly handled
|
||||
in userspace. Both klibc and busybox/uClibc are working on simple initramfs
|
||||
packages to drop into a kernel build, and when standard solutions are ready
|
||||
and widely deployed, the kernel's legacy early boot code will become obsolete
|
||||
and a candidate for the feature removal schedule.
|
||||
|
||||
But that's a while off yet.
|
@ -3,7 +3,7 @@
|
||||
|
||||
Original author: Richard Gooch <rgooch@atnf.csiro.au>
|
||||
|
||||
Last updated on August 25, 2005
|
||||
Last updated on October 28, 2005
|
||||
|
||||
Copyright (C) 1999 Richard Gooch
|
||||
Copyright (C) 2005 Pekka Enberg
|
||||
@ -11,62 +11,61 @@
|
||||
This file is released under the GPLv2.
|
||||
|
||||
|
||||
What is it?
|
||||
===========
|
||||
Introduction
|
||||
============
|
||||
|
||||
The Virtual File System (otherwise known as the Virtual Filesystem
|
||||
Switch) is the software layer in the kernel that provides the
|
||||
filesystem interface to userspace programs. It also provides an
|
||||
abstraction within the kernel which allows different filesystem
|
||||
implementations to coexist.
|
||||
The Virtual File System (also known as the Virtual Filesystem Switch)
|
||||
is the software layer in the kernel that provides the filesystem
|
||||
interface to userspace programs. It also provides an abstraction
|
||||
within the kernel which allows different filesystem implementations to
|
||||
coexist.
|
||||
|
||||
VFS system calls open(2), stat(2), read(2), write(2), chmod(2) and so
|
||||
on are called from a process context. Filesystem locking is described
|
||||
in the document Documentation/filesystems/Locking.
|
||||
|
||||
|
||||
A Quick Look At How It Works
|
||||
============================
|
||||
Directory Entry Cache (dcache)
|
||||
------------------------------
|
||||
|
||||
In this section I'll briefly describe how things work, before
|
||||
launching into the details. I'll start with describing what happens
|
||||
when user programs open and manipulate files, and then look from the
|
||||
other view which is how a filesystem is supported and subsequently
|
||||
mounted.
|
||||
The VFS implements the open(2), stat(2), chmod(2), and similar system
|
||||
calls. The pathname argument that is passed to them is used by the VFS
|
||||
to search through the directory entry cache (also known as the dentry
|
||||
cache or dcache). This provides a very fast look-up mechanism to
|
||||
translate a pathname (filename) into a specific dentry. Dentries live
|
||||
in RAM and are never saved to disc: they exist only for performance.
|
||||
|
||||
The dentry cache is meant to be a view into your entire filespace. As
|
||||
most computers cannot fit all dentries in the RAM at the same time,
|
||||
some bits of the cache are missing. In order to resolve your pathname
|
||||
into a dentry, the VFS may have to resort to creating dentries along
|
||||
the way, and then loading the inode. This is done by looking up the
|
||||
inode.
|
||||
|
||||
|
||||
Opening a File
|
||||
--------------
|
||||
The Inode Object
|
||||
----------------
|
||||
|
||||
The VFS implements the open(2), stat(2), chmod(2) and similar system
|
||||
calls. The pathname argument is used by the VFS to search through the
|
||||
directory entry cache (dentry cache or "dcache"). This provides a very
|
||||
fast look-up mechanism to translate a pathname (filename) into a
|
||||
specific dentry.
|
||||
An individual dentry usually has a pointer to an inode. Inodes are
|
||||
filesystem objects such as regular files, directories, FIFOs and other
|
||||
beasts. They live either on the disc (for block device filesystems)
|
||||
or in the memory (for pseudo filesystems). Inodes that live on the
|
||||
disc are copied into the memory when required and changes to the inode
|
||||
are written back to disc. A single inode can be pointed to by multiple
|
||||
dentries (hard links, for example, do this).
|
||||
|
||||
An individual dentry usually has a pointer to an inode. Inodes are the
|
||||
things that live on disc drives, and can be regular files (you know:
|
||||
those things that you write data into), directories, FIFOs and other
|
||||
beasts. Dentries live in RAM and are never saved to disc: they exist
|
||||
only for performance. Inodes live on disc and are copied into memory
|
||||
when required. Later any changes are written back to disc. The inode
|
||||
that lives in RAM is a VFS inode, and it is this which the dentry
|
||||
points to. A single inode can be pointed to by multiple dentries
|
||||
(think about hardlinks).
|
||||
To look up an inode requires that the VFS calls the lookup() method of
|
||||
the parent directory inode. This method is installed by the specific
|
||||
filesystem implementation that the inode lives in. Once the VFS has
|
||||
the required dentry (and hence the inode), we can do all those boring
|
||||
things like open(2) the file, or stat(2) it to peek at the inode
|
||||
data. The stat(2) operation is fairly simple: once the VFS has the
|
||||
dentry, it peeks at the inode data and passes some of it back to
|
||||
userspace.
|
||||
|
||||
The dcache is meant to be a view into your entire filespace. Unlike
|
||||
Linus, most of us losers can't fit enough dentries into RAM to cover
|
||||
all of our filespace, so the dcache has bits missing. In order to
|
||||
resolve your pathname into a dentry, the VFS may have to resort to
|
||||
creating dentries along the way, and then loading the inode. This is
|
||||
done by looking up the inode.
|
||||
|
||||
To look up an inode (usually read from disc) requires that the VFS
|
||||
calls the lookup() method of the parent directory inode. This method
|
||||
is installed by the specific filesystem implementation that the inode
|
||||
lives in. There will be more on this later.
|
||||
|
||||
Once the VFS has the required dentry (and hence the inode), we can do
|
||||
all those boring things like open(2) the file, or stat(2) it to peek
|
||||
at the inode data. The stat(2) operation is fairly simple: once the
|
||||
VFS has the dentry, it peeks at the inode data and passes some of it
|
||||
back to userspace.
|
||||
The File Object
|
||||
---------------
|
||||
|
||||
Opening a file requires another operation: allocation of a file
|
||||
structure (this is the kernel-side implementation of file
|
||||
@ -74,51 +73,39 @@ descriptors). The freshly allocated file structure is initialized with
|
||||
a pointer to the dentry and a set of file operation member functions.
|
||||
These are taken from the inode data. The open() file method is then
|
||||
called so the specific filesystem implementation can do it's work. You
|
||||
can see that this is another switch performed by the VFS.
|
||||
|
||||
The file structure is placed into the file descriptor table for the
|
||||
process.
|
||||
can see that this is another switch performed by the VFS. The file
|
||||
structure is placed into the file descriptor table for the process.
|
||||
|
||||
Reading, writing and closing files (and other assorted VFS operations)
|
||||
is done by using the userspace file descriptor to grab the appropriate
|
||||
file structure, and then calling the required file structure method
|
||||
function to do whatever is required.
|
||||
|
||||
For as long as the file is open, it keeps the dentry "open" (in use),
|
||||
which in turn means that the VFS inode is still in use.
|
||||
|
||||
All VFS system calls (i.e. open(2), stat(2), read(2), write(2),
|
||||
chmod(2) and so on) are called from a process context. You should
|
||||
assume that these calls are made without any kernel locks being
|
||||
held. This means that the processes may be executing the same piece of
|
||||
filesystem or driver code at the same time, on different
|
||||
processors. You should ensure that access to shared resources is
|
||||
protected by appropriate locks.
|
||||
file structure, and then calling the required file structure method to
|
||||
do whatever is required. For as long as the file is open, it keeps the
|
||||
dentry in use, which in turn means that the VFS inode is still in use.
|
||||
|
||||
|
||||
Registering and Mounting a Filesystem
|
||||
-------------------------------------
|
||||
=====================================
|
||||
|
||||
If you want to support a new kind of filesystem in the kernel, all you
|
||||
need to do is call register_filesystem(). You pass a structure
|
||||
describing the filesystem implementation (struct file_system_type)
|
||||
which is then added to an internal table of supported filesystems. You
|
||||
can do:
|
||||
To register and unregister a filesystem, use the following API
|
||||
functions:
|
||||
|
||||
% cat /proc/filesystems
|
||||
#include <linux/fs.h>
|
||||
|
||||
to see what filesystems are currently available on your system.
|
||||
extern int register_filesystem(struct file_system_type *);
|
||||
extern int unregister_filesystem(struct file_system_type *);
|
||||
|
||||
When a request is made to mount a block device onto a directory in
|
||||
your filespace the VFS will call the appropriate method for the
|
||||
specific filesystem. The dentry for the mount point will then be
|
||||
updated to point to the root inode for the new filesystem.
|
||||
The passed struct file_system_type describes your filesystem. When a
|
||||
request is made to mount a device onto a directory in your filespace,
|
||||
the VFS will call the appropriate get_sb() method for the specific
|
||||
filesystem. The dentry for the mount point will then be updated to
|
||||
point to the root inode for the new filesystem.
|
||||
|
||||
It's now time to look at things in more detail.
|
||||
You can see all filesystems that are registered to the kernel in the
|
||||
file /proc/filesystems.
|
||||
|
||||
|
||||
struct file_system_type
|
||||
=======================
|
||||
-----------------------
|
||||
|
||||
This describes the filesystem. As of kernel 2.6.13, the following
|
||||
members are defined:
|
||||
@ -197,8 +184,14 @@ A fill_super() method implementation has the following arguments:
|
||||
int silent: whether or not to be silent on error
|
||||
|
||||
|
||||
The Superblock Object
|
||||
=====================
|
||||
|
||||
A superblock object represents a mounted filesystem.
|
||||
|
||||
|
||||
struct super_operations
|
||||
=======================
|
||||
-----------------------
|
||||
|
||||
This describes how the VFS can manipulate the superblock of your
|
||||
filesystem. As of kernel 2.6.13, the following members are defined:
|
||||
@ -286,9 +279,9 @@ or bottom half).
|
||||
a superblock. The second parameter indicates whether the method
|
||||
should wait until the write out has been completed. Optional.
|
||||
|
||||
write_super_lockfs: called when VFS is locking a filesystem and forcing
|
||||
it into a consistent state. This function is currently used by the
|
||||
Logical Volume Manager (LVM).
|
||||
write_super_lockfs: called when VFS is locking a filesystem and
|
||||
forcing it into a consistent state. This method is currently
|
||||
used by the Logical Volume Manager (LVM).
|
||||
|
||||
unlockfs: called when VFS is unlocking a filesystem and making it writable
|
||||
again.
|
||||
@ -317,8 +310,14 @@ field. This is a pointer to a "struct inode_operations" which
|
||||
describes the methods that can be performed on individual inodes.
|
||||
|
||||
|
||||
The Inode Object
|
||||
================
|
||||
|
||||
An inode object represents an object within the filesystem.
|
||||
|
||||
|
||||
struct inode_operations
|
||||
=======================
|
||||
-----------------------
|
||||
|
||||
This describes how the VFS can manipulate an inode in your
|
||||
filesystem. As of kernel 2.6.13, the following members are defined:
|
||||
@ -394,51 +393,62 @@ otherwise noted.
|
||||
will probably need to call d_instantiate() just as you would
|
||||
in the create() method
|
||||
|
||||
rename: called by the rename(2) system call to rename the object to
|
||||
have the parent and name given by the second inode and dentry.
|
||||
|
||||
readlink: called by the readlink(2) system call. Only required if
|
||||
you want to support reading symbolic links
|
||||
|
||||
follow_link: called by the VFS to follow a symbolic link to the
|
||||
inode it points to. Only required if you want to support
|
||||
symbolic links. This function returns a void pointer cookie
|
||||
symbolic links. This method returns a void pointer cookie
|
||||
that is passed to put_link().
|
||||
|
||||
put_link: called by the VFS to release resources allocated by
|
||||
follow_link(). The cookie returned by follow_link() is passed to
|
||||
to this function as the last parameter. It is used by filesystems
|
||||
such as NFS where page cache is not stable (i.e. page that was
|
||||
installed when the symbolic link walk started might not be in the
|
||||
page cache at the end of the walk).
|
||||
follow_link(). The cookie returned by follow_link() is passed
|
||||
to to this method as the last parameter. It is used by
|
||||
filesystems such as NFS where page cache is not stable
|
||||
(i.e. page that was installed when the symbolic link walk
|
||||
started might not be in the page cache at the end of the
|
||||
walk).
|
||||
|
||||
truncate: called by the VFS to change the size of a file. The i_size
|
||||
field of the inode is set to the desired size by the VFS before
|
||||
this function is called. This function is called by the truncate(2)
|
||||
system call and related functionality.
|
||||
truncate: called by the VFS to change the size of a file. The
|
||||
i_size field of the inode is set to the desired size by the
|
||||
VFS before this method is called. This method is called by
|
||||
the truncate(2) system call and related functionality.
|
||||
|
||||
permission: called by the VFS to check for access rights on a POSIX-like
|
||||
filesystem.
|
||||
|
||||
setattr: called by the VFS to set attributes for a file. This function is
|
||||
called by chmod(2) and related system calls.
|
||||
setattr: called by the VFS to set attributes for a file. This method
|
||||
is called by chmod(2) and related system calls.
|
||||
|
||||
getattr: called by the VFS to get attributes of a file. This function is
|
||||
called by stat(2) and related system calls.
|
||||
getattr: called by the VFS to get attributes of a file. This method
|
||||
is called by stat(2) and related system calls.
|
||||
|
||||
setxattr: called by the VFS to set an extended attribute for a file.
|
||||
Extended attribute is a name:value pair associated with an inode. This
|
||||
function is called by setxattr(2) system call.
|
||||
Extended attribute is a name:value pair associated with an
|
||||
inode. This method is called by setxattr(2) system call.
|
||||
|
||||
getxattr: called by the VFS to retrieve the value of an extended attribute
|
||||
name. This function is called by getxattr(2) function call.
|
||||
getxattr: called by the VFS to retrieve the value of an extended
|
||||
attribute name. This method is called by getxattr(2) function
|
||||
call.
|
||||
|
||||
listxattr: called by the VFS to list all extended attributes for a given
|
||||
file. This function is called by listxattr(2) system call.
|
||||
listxattr: called by the VFS to list all extended attributes for a
|
||||
given file. This method is called by listxattr(2) system call.
|
||||
|
||||
removexattr: called by the VFS to remove an extended attribute from a file.
|
||||
This function is called by removexattr(2) system call.
|
||||
removexattr: called by the VFS to remove an extended attribute from
|
||||
a file. This method is called by removexattr(2) system call.
|
||||
|
||||
|
||||
The Address Space Object
|
||||
========================
|
||||
|
||||
The address space object is used to identify pages in the page cache.
|
||||
|
||||
|
||||
struct address_space_operations
|
||||
===============================
|
||||
-------------------------------
|
||||
|
||||
This describes how the VFS can manipulate mapping of a file to page cache in
|
||||
your filesystem. As of kernel 2.6.13, the following members are defined:
|
||||
@ -502,8 +512,14 @@ struct address_space_operations {
|
||||
it. An example implementation can be found in fs/ext2/xip.c.
|
||||
|
||||
|
||||
The File Object
|
||||
===============
|
||||
|
||||
A file object represents a file opened by a process.
|
||||
|
||||
|
||||
struct file_operations
|
||||
======================
|
||||
----------------------
|
||||
|
||||
This describes how the VFS can manipulate an open file. As of kernel
|
||||
2.6.13, the following members are defined:
|
||||
@ -661,7 +677,7 @@ of child dentries. Child dentries are basically like files in a
|
||||
directory.
|
||||
|
||||
|
||||
Directory Entry Cache APIs
|
||||
Directory Entry Cache API
|
||||
--------------------------
|
||||
|
||||
There are a number of functions defined which permit a filesystem to
|
||||
@ -705,178 +721,24 @@ manipulate dentries:
|
||||
and the dentry is returned. The caller must use d_put()
|
||||
to free the dentry when it finishes using it.
|
||||
|
||||
|
||||
RCU-based dcache locking model
|
||||
------------------------------
|
||||
|
||||
On many workloads, the most common operation on dcache is
|
||||
to look up a dentry, given a parent dentry and the name
|
||||
of the child. Typically, for every open(), stat() etc.,
|
||||
the dentry corresponding to the pathname will be looked
|
||||
up by walking the tree starting with the first component
|
||||
of the pathname and using that dentry along with the next
|
||||
component to look up the next level and so on. Since it
|
||||
is a frequent operation for workloads like multiuser
|
||||
environments and web servers, it is important to optimize
|
||||
this path.
|
||||
|
||||
Prior to 2.5.10, dcache_lock was acquired in d_lookup and thus
|
||||
in every component during path look-up. Since 2.5.10 onwards,
|
||||
fast-walk algorithm changed this by holding the dcache_lock
|
||||
at the beginning and walking as many cached path component
|
||||
dentries as possible. This significantly decreases the number
|
||||
of acquisition of dcache_lock. However it also increases the
|
||||
lock hold time significantly and affects performance in large
|
||||
SMP machines. Since 2.5.62 kernel, dcache has been using
|
||||
a new locking model that uses RCU to make dcache look-up
|
||||
lock-free.
|
||||
|
||||
The current dcache locking model is not very different from the existing
|
||||
dcache locking model. Prior to 2.5.62 kernel, dcache_lock
|
||||
protected the hash chain, d_child, d_alias, d_lru lists as well
|
||||
as d_inode and several other things like mount look-up. RCU-based
|
||||
changes affect only the way the hash chain is protected. For everything
|
||||
else the dcache_lock must be taken for both traversing as well as
|
||||
updating. The hash chain updates too take the dcache_lock.
|
||||
The significant change is the way d_lookup traverses the hash chain,
|
||||
it doesn't acquire the dcache_lock for this and rely on RCU to
|
||||
ensure that the dentry has not been *freed*.
|
||||
For further information on dentry locking, please refer to the document
|
||||
Documentation/filesystems/dentry-locking.txt.
|
||||
|
||||
|
||||
Dcache locking details
|
||||
----------------------
|
||||
Resources
|
||||
=========
|
||||
|
||||
For many multi-user workloads, open() and stat() on files are
|
||||
very frequently occurring operations. Both involve walking
|
||||
of path names to find the dentry corresponding to the
|
||||
concerned file. In 2.4 kernel, dcache_lock was held
|
||||
during look-up of each path component. Contention and
|
||||
cache-line bouncing of this global lock caused significant
|
||||
scalability problems. With the introduction of RCU
|
||||
in Linux kernel, this was worked around by making
|
||||
the look-up of path components during path walking lock-free.
|
||||
(Note some of these resources are not up-to-date with the latest kernel
|
||||
version.)
|
||||
|
||||
Creating Linux virtual filesystems. 2002
|
||||
<http://lwn.net/Articles/13325/>
|
||||
|
||||
Safe lock-free look-up of dcache hash table
|
||||
===========================================
|
||||
The Linux Virtual File-system Layer by Neil Brown. 1999
|
||||
<http://www.cse.unsw.edu.au/~neilb/oss/linux-commentary/vfs.html>
|
||||
|
||||
Dcache is a complex data structure with the hash table entries
|
||||
also linked together in other lists. In 2.4 kernel, dcache_lock
|
||||
protected all the lists. We applied RCU only on hash chain
|
||||
walking. The rest of the lists are still protected by dcache_lock.
|
||||
Some of the important changes are :
|
||||
A tour of the Linux VFS by Michael K. Johnson. 1996
|
||||
<http://www.tldp.org/LDP/khg/HyperNews/get/fs/vfstour.html>
|
||||
|
||||
1. The deletion from hash chain is done using hlist_del_rcu() macro which
|
||||
doesn't initialize next pointer of the deleted dentry and this
|
||||
allows us to walk safely lock-free while a deletion is happening.
|
||||
|
||||
2. Insertion of a dentry into the hash table is done using
|
||||
hlist_add_head_rcu() which take care of ordering the writes -
|
||||
the writes to the dentry must be visible before the dentry
|
||||
is inserted. This works in conjunction with hlist_for_each_rcu()
|
||||
while walking the hash chain. The only requirement is that
|
||||
all initialization to the dentry must be done before hlist_add_head_rcu()
|
||||
since we don't have dcache_lock protection while traversing
|
||||
the hash chain. This isn't different from the existing code.
|
||||
|
||||
3. The dentry looked up without holding dcache_lock by cannot be
|
||||
returned for walking if it is unhashed. It then may have a NULL
|
||||
d_inode or other bogosity since RCU doesn't protect the other
|
||||
fields in the dentry. We therefore use a flag DCACHE_UNHASHED to
|
||||
indicate unhashed dentries and use this in conjunction with a
|
||||
per-dentry lock (d_lock). Once looked up without the dcache_lock,
|
||||
we acquire the per-dentry lock (d_lock) and check if the
|
||||
dentry is unhashed. If so, the look-up is failed. If not, the
|
||||
reference count of the dentry is increased and the dentry is returned.
|
||||
|
||||
4. Once a dentry is looked up, it must be ensured during the path
|
||||
walk for that component it doesn't go away. In pre-2.5.10 code,
|
||||
this was done holding a reference to the dentry. dcache_rcu does
|
||||
the same. In some sense, dcache_rcu path walking looks like
|
||||
the pre-2.5.10 version.
|
||||
|
||||
5. All dentry hash chain updates must take the dcache_lock as well as
|
||||
the per-dentry lock in that order. dput() does this to ensure
|
||||
that a dentry that has just been looked up in another CPU
|
||||
doesn't get deleted before dget() can be done on it.
|
||||
|
||||
6. There are several ways to do reference counting of RCU protected
|
||||
objects. One such example is in ipv4 route cache where
|
||||
deferred freeing (using call_rcu()) is done as soon as
|
||||
the reference count goes to zero. This cannot be done in
|
||||
the case of dentries because tearing down of dentries
|
||||
require blocking (dentry_iput()) which isn't supported from
|
||||
RCU callbacks. Instead, tearing down of dentries happen
|
||||
synchronously in dput(), but actual freeing happens later
|
||||
when RCU grace period is over. This allows safe lock-free
|
||||
walking of the hash chains, but a matched dentry may have
|
||||
been partially torn down. The checking of DCACHE_UNHASHED
|
||||
flag with d_lock held detects such dentries and prevents
|
||||
them from being returned from look-up.
|
||||
|
||||
|
||||
Maintaining POSIX rename semantics
|
||||
==================================
|
||||
|
||||
Since look-up of dentries is lock-free, it can race against
|
||||
a concurrent rename operation. For example, during rename
|
||||
of file A to B, look-up of either A or B must succeed.
|
||||
So, if look-up of B happens after A has been removed from the
|
||||
hash chain but not added to the new hash chain, it may fail.
|
||||
Also, a comparison while the name is being written concurrently
|
||||
by a rename may result in false positive matches violating
|
||||
rename semantics. Issues related to race with rename are
|
||||
handled as described below :
|
||||
|
||||
1. Look-up can be done in two ways - d_lookup() which is safe
|
||||
from simultaneous renames and __d_lookup() which is not.
|
||||
If __d_lookup() fails, it must be followed up by a d_lookup()
|
||||
to correctly determine whether a dentry is in the hash table
|
||||
or not. d_lookup() protects look-ups using a sequence
|
||||
lock (rename_lock).
|
||||
|
||||
2. The name associated with a dentry (d_name) may be changed if
|
||||
a rename is allowed to happen simultaneously. To avoid memcmp()
|
||||
in __d_lookup() go out of bounds due to a rename and false
|
||||
positive comparison, the name comparison is done while holding the
|
||||
per-dentry lock. This prevents concurrent renames during this
|
||||
operation.
|
||||
|
||||
3. Hash table walking during look-up may move to a different bucket as
|
||||
the current dentry is moved to a different bucket due to rename.
|
||||
But we use hlists in dcache hash table and they are null-terminated.
|
||||
So, even if a dentry moves to a different bucket, hash chain
|
||||
walk will terminate. [with a list_head list, it may not since
|
||||
termination is when the list_head in the original bucket is reached].
|
||||
Since we redo the d_parent check and compare name while holding
|
||||
d_lock, lock-free look-up will not race against d_move().
|
||||
|
||||
4. There can be a theoretical race when a dentry keeps coming back
|
||||
to original bucket due to double moves. Due to this look-up may
|
||||
consider that it has never moved and can end up in a infinite loop.
|
||||
But this is not any worse that theoretical livelocks we already
|
||||
have in the kernel.
|
||||
|
||||
|
||||
Important guidelines for filesystem developers related to dcache_rcu
|
||||
====================================================================
|
||||
|
||||
1. Existing dcache interfaces (pre-2.5.62) exported to filesystem
|
||||
don't change. Only dcache internal implementation changes. However
|
||||
filesystems *must not* delete from the dentry hash chains directly
|
||||
using the list macros like allowed earlier. They must use dcache
|
||||
APIs like d_drop() or __d_drop() depending on the situation.
|
||||
|
||||
2. d_flags is now protected by a per-dentry lock (d_lock). All
|
||||
access to d_flags must be protected by it.
|
||||
|
||||
3. For a hashed dentry, checking of d_count needs to be protected
|
||||
by d_lock.
|
||||
|
||||
|
||||
Papers and other documentation on dcache locking
|
||||
================================================
|
||||
|
||||
1. Scaling dcache with RCU (http://linuxjournal.com/article.php?sid=7124).
|
||||
|
||||
2. http://lse.sourceforge.net/locking/dcache/dcache.html
|
||||
A small trail through the Linux kernel by Andries Brouwer. 2001
|
||||
<http://www.win.tue.nl/~aeb/linux/vfs/trail.html>
|
||||
|
@ -1,18 +1,21 @@
|
||||
High Precision Event Timer Driver for Linux
|
||||
|
||||
The High Precision Event Timer (HPET) hardware is the future replacement for the 8254 and Real
|
||||
Time Clock (RTC) periodic timer functionality. Each HPET can have up two 32 timers. It is possible
|
||||
to configure the first two timers as legacy replacements for 8254 and RTC periodic. A specification
|
||||
done by INTEL and Microsoft can be found at http://www.intel.com/labs/platcomp/hpet/hpetspec.htm.
|
||||
The High Precision Event Timer (HPET) hardware is the future replacement
|
||||
for the 8254 and Real Time Clock (RTC) periodic timer functionality.
|
||||
Each HPET can have up two 32 timers. It is possible to configure the
|
||||
first two timers as legacy replacements for 8254 and RTC periodic timers.
|
||||
A specification done by Intel and Microsoft can be found at
|
||||
<http://www.intel.com/hardwaredesign/hpetspec.htm>.
|
||||
|
||||
The driver supports detection of HPET driver allocation and initialization of the HPET before the
|
||||
driver module_init routine is called. This enables platform code which uses timer 0 or 1 as the
|
||||
main timer to intercept HPET initialization. An example of this initialization can be found in
|
||||
The driver supports detection of HPET driver allocation and initialization
|
||||
of the HPET before the driver module_init routine is called. This enables
|
||||
platform code which uses timer 0 or 1 as the main timer to intercept HPET
|
||||
initialization. An example of this initialization can be found in
|
||||
arch/i386/kernel/time_hpet.c.
|
||||
|
||||
The driver provides two APIs which are very similar to the API found in the rtc.c driver.
|
||||
There is a user space API and a kernel space API. An example user space program is provided
|
||||
below.
|
||||
The driver provides two APIs which are very similar to the API found in
|
||||
the rtc.c driver. There is a user space API and a kernel space API.
|
||||
An example user space program is provided below.
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
@ -290,9 +293,8 @@ The kernel API has three interfaces exported from the driver:
|
||||
hpet_unregister(struct hpet_task *tp)
|
||||
hpet_control(struct hpet_task *tp, unsigned int cmd, unsigned long arg)
|
||||
|
||||
The kernel module using this interface fills in the ht_func and ht_data members of the
|
||||
hpet_task structure before calling hpet_register. hpet_control simply vectors to the hpet_ioctl
|
||||
routine and has the same commands and respective arguments as the user API. hpet_unregister
|
||||
The kernel module using this interface fills in the ht_func and ht_data
|
||||
members of the hpet_task structure before calling hpet_register.
|
||||
hpet_control simply vectors to the hpet_ioctl routine and has the same
|
||||
commands and respective arguments as the user API. hpet_unregister
|
||||
is used to terminate usage of the HPET timer reserved by hpet_register.
|
||||
|
||||
|
||||
|
@ -7,12 +7,10 @@ Supported adapters:
|
||||
* VIA Technologies, Inc. VT82C686A/B
|
||||
Datasheet: Sometimes available at the VIA website
|
||||
|
||||
* VIA Technologies, Inc. VT8231, VT8233, VT8233A, VT8235, VT8237
|
||||
Datasheet: available on request from Via
|
||||
* VIA Technologies, Inc. VT8231, VT8233, VT8233A, VT8235, VT8237R
|
||||
Datasheet: available on request from VIA
|
||||
|
||||
Authors:
|
||||
Frodo Looijaard <frodol@dds.nl>,
|
||||
Philip Edelbrock <phil@netroedge.com>,
|
||||
Kyösti Mälkki <kmalkki@cc.hut.fi>,
|
||||
Mark D. Studebaker <mdsxyz123@yahoo.com>,
|
||||
Jean Delvare <khali@linux-fr.org>
|
||||
|
@ -412,7 +412,7 @@ For now, you can ignore the `flags' parameter. It is there for future use.
|
||||
release_region(address,FOO_EXTENT);
|
||||
/* SENSORS ONLY END */
|
||||
ERROR1:
|
||||
kfree(new_client);
|
||||
kfree(data);
|
||||
ERROR0:
|
||||
return err;
|
||||
}
|
||||
@ -443,7 +443,7 @@ much simpler than the attachment code, fortunately!
|
||||
release_region(client->addr,LM78_EXTENT);
|
||||
/* HYBRID SENSORS CHIP ONLY END */
|
||||
|
||||
kfree(data);
|
||||
kfree(i2c_get_clientdata(client));
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -130,8 +130,6 @@ Code Seq# Include File Comments
|
||||
<mailto:zapman@interlan.net>
|
||||
'i' 00-3F linux/i2o.h
|
||||
'j' 00-3F linux/joystick.h
|
||||
'k' all asm-sparc/kbio.h
|
||||
asm-sparc64/kbio.h
|
||||
'l' 00-3F linux/tcfs_fs.h transparent cryptographic file system
|
||||
<http://mikonos.dia.unisa.it/tcfs>
|
||||
'l' 40-7F linux/udf_fs_i.h in development:
|
||||
|
@ -120,7 +120,7 @@ ISDN_NET_MAGIC 0x49344C02 isdn_net_local_s drivers/isdn/i4l/isdn_net_li
|
||||
SAVEKMSG_MAGIC2 0x4B4D5347 savekmsg arch/*/amiga/config.c
|
||||
STLI_BOARDMAGIC 0x4bc6c825 stlibrd include/linux/istallion.h
|
||||
CS_STATE_MAGIC 0x4c4f4749 cs_state sound/oss/cs46xx.c
|
||||
SLAB_C_MAGIC 0x4f17a36d kmem_cache_s mm/slab.c
|
||||
SLAB_C_MAGIC 0x4f17a36d kmem_cache mm/slab.c
|
||||
COW_MAGIC 0x4f4f4f4d cow_header_v1 arch/um/drivers/ubd_user.c
|
||||
I810_CARD_MAGIC 0x5072696E i810_card sound/oss/i810_audio.c
|
||||
TRIDENT_CARD_MAGIC 0x5072696E trident_card sound/oss/trident.c
|
||||
|
@ -116,3 +116,122 @@ and it's role in the array.
|
||||
|
||||
Once started with RUN_ARRAY, uninitialized spares can be added with
|
||||
HOT_ADD_DISK.
|
||||
|
||||
|
||||
|
||||
MD devices in sysfs
|
||||
-------------------
|
||||
md devices appear in sysfs (/sys) as regular block devices,
|
||||
e.g.
|
||||
/sys/block/md0
|
||||
|
||||
Each 'md' device will contain a subdirectory called 'md' which
|
||||
contains further md-specific information about the device.
|
||||
|
||||
All md devices contain:
|
||||
level
|
||||
a text file indicating the 'raid level'. This may be a standard
|
||||
numerical level prefixed by "RAID-" - e.g. "RAID-5", or some
|
||||
other name such as "linear" or "multipath".
|
||||
If no raid level has been set yet (array is still being
|
||||
assembled), this file will be empty.
|
||||
|
||||
raid_disks
|
||||
a text file with a simple number indicating the number of devices
|
||||
in a fully functional array. If this is not yet known, the file
|
||||
will be empty. If an array is being resized (not currently
|
||||
possible) this will contain the larger of the old and new sizes.
|
||||
|
||||
As component devices are added to an md array, they appear in the 'md'
|
||||
directory as new directories named
|
||||
dev-XXX
|
||||
where XXX is a name that the kernel knows for the device, e.g. hdb1.
|
||||
Each directory contains:
|
||||
|
||||
block
|
||||
a symlink to the block device in /sys/block, e.g.
|
||||
/sys/block/md0/md/dev-hdb1/block -> ../../../../block/hdb/hdb1
|
||||
|
||||
super
|
||||
A file containing an image of the superblock read from, or
|
||||
written to, that device.
|
||||
|
||||
state
|
||||
A file recording the current state of the device in the array
|
||||
which can be a comma separated list of
|
||||
faulty - device has been kicked from active use due to
|
||||
a detected fault
|
||||
in_sync - device is a fully in-sync member of the array
|
||||
spare - device is working, but not a full member.
|
||||
This includes spares that are in the process
|
||||
of being recoverred to
|
||||
This list make grow in future.
|
||||
|
||||
|
||||
An active md device will also contain and entry for each active device
|
||||
in the array. These are named
|
||||
|
||||
rdNN
|
||||
|
||||
where 'NN' is the possition in the array, starting from 0.
|
||||
So for a 3 drive array there will be rd0, rd1, rd2.
|
||||
These are symbolic links to the appropriate 'dev-XXX' entry.
|
||||
Thus, for example,
|
||||
cat /sys/block/md*/md/rd*/state
|
||||
will show 'in_sync' on every line.
|
||||
|
||||
|
||||
|
||||
Active md devices for levels that support data redundancy (1,4,5,6)
|
||||
also have
|
||||
|
||||
sync_action
|
||||
a text file that can be used to monitor and control the rebuild
|
||||
process. It contains one word which can be one of:
|
||||
resync - redundancy is being recalculated after unclean
|
||||
shutdown or creation
|
||||
recover - a hot spare is being built to replace a
|
||||
failed/missing device
|
||||
idle - nothing is happening
|
||||
check - A full check of redundancy was requested and is
|
||||
happening. This reads all block and checks
|
||||
them. A repair may also happen for some raid
|
||||
levels.
|
||||
repair - A full check and repair is happening. This is
|
||||
similar to 'resync', but was requested by the
|
||||
user, and the write-intent bitmap is NOT used to
|
||||
optimise the process.
|
||||
|
||||
This file is writable, and each of the strings that could be
|
||||
read are meaningful for writing.
|
||||
|
||||
'idle' will stop an active resync/recovery etc. There is no
|
||||
guarantee that another resync/recovery may not be automatically
|
||||
started again, though some event will be needed to trigger
|
||||
this.
|
||||
'resync' or 'recovery' can be used to restart the
|
||||
corresponding operation if it was stopped with 'idle'.
|
||||
'check' and 'repair' will start the appropriate process
|
||||
providing the current state is 'idle'.
|
||||
|
||||
mismatch_count
|
||||
When performing 'check' and 'repair', and possibly when
|
||||
performing 'resync', md will count the number of errors that are
|
||||
found. The count in 'mismatch_cnt' is the number of sectors
|
||||
that were re-written, or (for 'check') would have been
|
||||
re-written. As most raid levels work in units of pages rather
|
||||
than sectors, this my be larger than the number of actual errors
|
||||
by a factor of the number of sectors in a page.
|
||||
|
||||
Each active md device may also have attributes specific to the
|
||||
personality module that manages it.
|
||||
These are specific to the implementation of the module and could
|
||||
change substantially if the implementation changes.
|
||||
|
||||
These currently include
|
||||
|
||||
stripe_cache_size (currently raid5 only)
|
||||
number of entries in the stripe cache. This is writable, but
|
||||
there are upper and lower limits (32768, 16). Default is 128.
|
||||
strip_cache_active (currently raid5 only)
|
||||
number of active entries in the stripe cache
|
||||
|
@ -1,27 +1,82 @@
|
||||
|
||||
===========================
|
||||
Intel(R) PRO/Wireless 2100 Network Connection Driver for Linux
|
||||
Intel(R) PRO/Wireless 2100 Driver for Linux in support of:
|
||||
|
||||
Intel(R) PRO/Wireless 2100 Network Connection
|
||||
|
||||
Copyright (C) 2003-2005, Intel Corporation
|
||||
|
||||
README.ipw2100
|
||||
|
||||
March 14, 2005
|
||||
Version: 1.1.3
|
||||
Date : October 17, 2005
|
||||
|
||||
===========================
|
||||
Index
|
||||
---------------------------
|
||||
0. Introduction
|
||||
1. Release 1.1.0 Current Features
|
||||
2. Command Line Parameters
|
||||
3. Sysfs Helper Files
|
||||
4. Radio Kill Switch
|
||||
5. Dynamic Firmware
|
||||
6. Power Management
|
||||
7. Support
|
||||
8. License
|
||||
-----------------------------------------------
|
||||
0. IMPORTANT INFORMATION BEFORE USING THIS DRIVER
|
||||
1. Introduction
|
||||
2. Release 1.1.3 Current Features
|
||||
3. Command Line Parameters
|
||||
4. Sysfs Helper Files
|
||||
5. Radio Kill Switch
|
||||
6. Dynamic Firmware
|
||||
7. Power Management
|
||||
8. Support
|
||||
9. License
|
||||
|
||||
|
||||
===========================
|
||||
0. Introduction
|
||||
------------ ----- ----- ---- --- -- -
|
||||
0. IMPORTANT INFORMATION BEFORE USING THIS DRIVER
|
||||
-----------------------------------------------
|
||||
|
||||
Important Notice FOR ALL USERS OR DISTRIBUTORS!!!!
|
||||
|
||||
Intel wireless LAN adapters are engineered, manufactured, tested, and
|
||||
quality checked to ensure that they meet all necessary local and
|
||||
governmental regulatory agency requirements for the regions that they
|
||||
are designated and/or marked to ship into. Since wireless LANs are
|
||||
generally unlicensed devices that share spectrum with radars,
|
||||
satellites, and other licensed and unlicensed devices, it is sometimes
|
||||
necessary to dynamically detect, avoid, and limit usage to avoid
|
||||
interference with these devices. In many instances Intel is required to
|
||||
provide test data to prove regional and local compliance to regional and
|
||||
governmental regulations before certification or approval to use the
|
||||
product is granted. Intel's wireless LAN's EEPROM, firmware, and
|
||||
software driver are designed to carefully control parameters that affect
|
||||
radio operation and to ensure electromagnetic compliance (EMC). These
|
||||
parameters include, without limitation, RF power, spectrum usage,
|
||||
channel scanning, and human exposure.
|
||||
|
||||
For these reasons Intel cannot permit any manipulation by third parties
|
||||
of the software provided in binary format with the wireless WLAN
|
||||
adapters (e.g., the EEPROM and firmware). Furthermore, if you use any
|
||||
patches, utilities, or code with the Intel wireless LAN adapters that
|
||||
have been manipulated by an unauthorized party (i.e., patches,
|
||||
utilities, or code (including open source code modifications) which have
|
||||
not been validated by Intel), (i) you will be solely responsible for
|
||||
ensuring the regulatory compliance of the products, (ii) Intel will bear
|
||||
no liability, under any theory of liability for any issues associated
|
||||
with the modified products, including without limitation, claims under
|
||||
the warranty and/or issues arising from regulatory non-compliance, and
|
||||
(iii) Intel will not provide or be required to assist in providing
|
||||
support to any third parties for such modified products.
|
||||
|
||||
Note: Many regulatory agencies consider Wireless LAN adapters to be
|
||||
modules, and accordingly, condition system-level regulatory approval
|
||||
upon receipt and review of test data documenting that the antennas and
|
||||
system configuration do not cause the EMC and radio operation to be
|
||||
non-compliant.
|
||||
|
||||
The drivers available for download from SourceForge are provided as a
|
||||
part of a development project. Conformance to local regulatory
|
||||
requirements is the responsibility of the individual developer. As
|
||||
such, if you are interested in deploying or shipping a driver as part of
|
||||
solution intended to be used for purposes other than development, please
|
||||
obtain a tested driver from Intel Customer Support at:
|
||||
|
||||
http://support.intel.com/support/notebook/sb/CS-006408.htm
|
||||
|
||||
|
||||
1. Introduction
|
||||
-----------------------------------------------
|
||||
|
||||
This document provides a brief overview of the features supported by the
|
||||
IPW2100 driver project. The main project website, where the latest
|
||||
@ -34,9 +89,8 @@ potential fixes and patches, as well as links to the development mailing list
|
||||
for the driver project.
|
||||
|
||||
|
||||
===========================
|
||||
1. Release 1.1.0 Current Supported Features
|
||||
---------------------------
|
||||
2. Release 1.1.3 Current Supported Features
|
||||
-----------------------------------------------
|
||||
- Managed (BSS) and Ad-Hoc (IBSS)
|
||||
- WEP (shared key and open)
|
||||
- Wireless Tools support
|
||||
@ -51,9 +105,8 @@ on the amount of validation and interoperability testing that has been
|
||||
performed on a given feature.
|
||||
|
||||
|
||||
===========================
|
||||
2. Command Line Parameters
|
||||
---------------------------
|
||||
3. 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 command using this
|
||||
@ -75,9 +128,9 @@ associate boolean associate=0 /* Do NOT auto associate */
|
||||
disable boolean disable=1 /* Do not power the HW */
|
||||
|
||||
|
||||
===========================
|
||||
3. Sysfs Helper Files
|
||||
4. Sysfs Helper Files
|
||||
---------------------------
|
||||
-----------------------------------------------
|
||||
|
||||
There are several ways to control the behavior of the driver. Many of the
|
||||
general capabilities are exposed through the Wireless Tools (iwconfig). There
|
||||
@ -120,9 +173,8 @@ For the device level files, see /sys/bus/pci/drivers/ipw2100:
|
||||
based RF kill from ON -> OFF -> ON, the radio will NOT come back on
|
||||
|
||||
|
||||
===========================
|
||||
4. Radio Kill Switch
|
||||
---------------------------
|
||||
5. Radio Kill Switch
|
||||
-----------------------------------------------
|
||||
Most laptops provide the ability for the user to physically disable the radio.
|
||||
Some vendors have implemented this as a physical switch that requires no
|
||||
software to turn the radio off and on. On other laptops, however, the switch
|
||||
@ -134,9 +186,8 @@ See the Sysfs helper file 'rf_kill' for determining the state of the RF switch
|
||||
on your system.
|
||||
|
||||
|
||||
===========================
|
||||
5. Dynamic Firmware
|
||||
---------------------------
|
||||
6. Dynamic Firmware
|
||||
-----------------------------------------------
|
||||
As the firmware is licensed under a restricted use license, it can not be
|
||||
included within the kernel sources. To enable the IPW2100 you will need a
|
||||
firmware image to load into the wireless NIC's processors.
|
||||
@ -146,9 +197,8 @@ You can obtain these images from <http://ipw2100.sf.net/firmware.php>.
|
||||
See INSTALL for instructions on installing the firmware.
|
||||
|
||||
|
||||
===========================
|
||||
6. Power Management
|
||||
---------------------------
|
||||
7. Power Management
|
||||
-----------------------------------------------
|
||||
The IPW2100 supports the configuration of the Power Save Protocol
|
||||
through a private wireless extension interface. The IPW2100 supports
|
||||
the following different modes:
|
||||
@ -200,9 +250,8 @@ xxxx/yyyy will be replaced with 'off' -- the level reported will be the active
|
||||
level if `iwconfig eth1 power on` is invoked.
|
||||
|
||||
|
||||
===========================
|
||||
7. Support
|
||||
---------------------------
|
||||
8. Support
|
||||
-----------------------------------------------
|
||||
|
||||
For general development information and support,
|
||||
go to:
|
||||
@ -218,9 +267,8 @@ For installation support on the ipw2100 1.1.0 driver on Linux kernels
|
||||
|
||||
http://supportmail.intel.com
|
||||
|
||||
===========================
|
||||
8. License
|
||||
---------------------------
|
||||
9. License
|
||||
-----------------------------------------------
|
||||
|
||||
Copyright(c) 2003 - 2005 Intel Corporation. All rights reserved.
|
||||
|
||||
|
@ -1,33 +1,89 @@
|
||||
|
||||
Intel(R) PRO/Wireless 2915ABG Driver for Linux in support of:
|
||||
|
||||
Intel(R) PRO/Wireless 2200BG Network Connection
|
||||
Intel(R) PRO/Wireless 2915ABG Network Connection
|
||||
Intel(R) PRO/Wireless 2200BG Network Connection
|
||||
Intel(R) PRO/Wireless 2915ABG Network Connection
|
||||
|
||||
Note: The Intel(R) PRO/Wireless 2915ABG Driver for Linux and Intel(R)
|
||||
PRO/Wireless 2200BG Driver for Linux is a unified driver that works on
|
||||
both hardware adapters listed above. In this document the Intel(R)
|
||||
PRO/Wireless 2915ABG Driver for Linux will be used to reference the
|
||||
Note: The Intel(R) PRO/Wireless 2915ABG Driver for Linux and Intel(R)
|
||||
PRO/Wireless 2200BG Driver for Linux is a unified driver that works on
|
||||
both hardware adapters listed above. In this document the Intel(R)
|
||||
PRO/Wireless 2915ABG Driver for Linux will be used to reference the
|
||||
unified driver.
|
||||
|
||||
Copyright (C) 2004-2005, Intel Corporation
|
||||
|
||||
README.ipw2200
|
||||
|
||||
Version: 1.0.0
|
||||
Date : January 31, 2005
|
||||
Version: 1.0.8
|
||||
Date : October 20, 2005
|
||||
|
||||
|
||||
Index
|
||||
-----------------------------------------------
|
||||
0. IMPORTANT INFORMATION BEFORE USING THIS DRIVER
|
||||
1. Introduction
|
||||
1.1. Overview of features
|
||||
1.2. Module parameters
|
||||
1.3. Wireless Extension Private Methods
|
||||
1.4. Sysfs Helper Files
|
||||
2. About the Version Numbers
|
||||
3. Support
|
||||
4. License
|
||||
2. Ad-Hoc Networking
|
||||
3. Interacting with Wireless Tools
|
||||
3.1. iwconfig mode
|
||||
4. About the Version Numbers
|
||||
5. Firmware installation
|
||||
6. Support
|
||||
7. License
|
||||
|
||||
|
||||
0. IMPORTANT INFORMATION BEFORE USING THIS DRIVER
|
||||
-----------------------------------------------
|
||||
|
||||
Important Notice FOR ALL USERS OR DISTRIBUTORS!!!!
|
||||
|
||||
Intel wireless LAN adapters are engineered, manufactured, tested, and
|
||||
quality checked to ensure that they meet all necessary local and
|
||||
governmental regulatory agency requirements for the regions that they
|
||||
are designated and/or marked to ship into. Since wireless LANs are
|
||||
generally unlicensed devices that share spectrum with radars,
|
||||
satellites, and other licensed and unlicensed devices, it is sometimes
|
||||
necessary to dynamically detect, avoid, and limit usage to avoid
|
||||
interference with these devices. In many instances Intel is required to
|
||||
provide test data to prove regional and local compliance to regional and
|
||||
governmental regulations before certification or approval to use the
|
||||
product is granted. Intel's wireless LAN's EEPROM, firmware, and
|
||||
software driver are designed to carefully control parameters that affect
|
||||
radio operation and to ensure electromagnetic compliance (EMC). These
|
||||
parameters include, without limitation, RF power, spectrum usage,
|
||||
channel scanning, and human exposure.
|
||||
|
||||
For these reasons Intel cannot permit any manipulation by third parties
|
||||
of the software provided in binary format with the wireless WLAN
|
||||
adapters (e.g., the EEPROM and firmware). Furthermore, if you use any
|
||||
patches, utilities, or code with the Intel wireless LAN adapters that
|
||||
have been manipulated by an unauthorized party (i.e., patches,
|
||||
utilities, or code (including open source code modifications) which have
|
||||
not been validated by Intel), (i) you will be solely responsible for
|
||||
ensuring the regulatory compliance of the products, (ii) Intel will bear
|
||||
no liability, under any theory of liability for any issues associated
|
||||
with the modified products, including without limitation, claims under
|
||||
the warranty and/or issues arising from regulatory non-compliance, and
|
||||
(iii) Intel will not provide or be required to assist in providing
|
||||
support to any third parties for such modified products.
|
||||
|
||||
Note: Many regulatory agencies consider Wireless LAN adapters to be
|
||||
modules, and accordingly, condition system-level regulatory approval
|
||||
upon receipt and review of test data documenting that the antennas and
|
||||
system configuration do not cause the EMC and radio operation to be
|
||||
non-compliant.
|
||||
|
||||
The drivers available for download from SourceForge are provided as a
|
||||
part of a development project. Conformance to local regulatory
|
||||
requirements is the responsibility of the individual developer. As
|
||||
such, if you are interested in deploying or shipping a driver as part of
|
||||
solution intended to be used for purposes other than development, please
|
||||
obtain a tested driver from Intel Customer Support at:
|
||||
|
||||
http://support.intel.com/support/notebook/sb/CS-006408.htm
|
||||
|
||||
|
||||
1. Introduction
|
||||
@ -45,7 +101,7 @@ file.
|
||||
|
||||
1.1. Overview of Features
|
||||
-----------------------------------------------
|
||||
The current release (1.0.0) supports the following features:
|
||||
The current release (1.0.8) supports the following features:
|
||||
|
||||
+ BSS mode (Infrastructure, Managed)
|
||||
+ IBSS mode (Ad-Hoc)
|
||||
@ -56,17 +112,27 @@ The current release (1.0.0) supports the following features:
|
||||
+ Full A rate support (2915 only)
|
||||
+ Transmit power control
|
||||
+ S state support (ACPI suspend/resume)
|
||||
|
||||
The following features are currently enabled, but not officially
|
||||
supported:
|
||||
|
||||
+ WPA
|
||||
+ long/short preamble support
|
||||
+ Monitor mode (aka RFMon)
|
||||
|
||||
The distinction between officially supported and enabled is a reflection
|
||||
on the amount of validation and interoperability testing that has been
|
||||
performed on a given feature.
|
||||
|
||||
|
||||
|
||||
1.2. Command Line Parameters
|
||||
-----------------------------------------------
|
||||
|
||||
Like many modules used in the Linux kernel, the Intel(R) PRO/Wireless
|
||||
2915ABG Driver for Linux allows certain configuration options to be
|
||||
provided as module parameters. The most common way to specify a module
|
||||
parameter is via the command line.
|
||||
Like many modules used in the Linux kernel, the Intel(R) PRO/Wireless
|
||||
2915ABG Driver for Linux allows configuration options to be provided
|
||||
as module parameters. The most common way to specify a module parameter
|
||||
is via the command line.
|
||||
|
||||
The general form is:
|
||||
|
||||
@ -96,14 +162,18 @@ Where the supported parameter are:
|
||||
|
||||
debug
|
||||
If using a debug build, this is used to control the amount of debug
|
||||
info is logged. See the 'dval' and 'load' script for more info on
|
||||
how to use this (the dval and load scripts are provided as part
|
||||
info is logged. See the 'dvals' and 'load' script for more info on
|
||||
how to use this (the dvals and load scripts are provided as part
|
||||
of the ipw2200 development snapshot releases available from the
|
||||
SourceForge project at http://ipw2200.sf.net)
|
||||
|
||||
led
|
||||
Can be used to turn on experimental LED code.
|
||||
0 = Off, 1 = On. Default is 0.
|
||||
|
||||
mode
|
||||
Can be used to set the default mode of the adapter.
|
||||
0 = Managed, 1 = Ad-Hoc
|
||||
0 = Managed, 1 = Ad-Hoc, 2 = Monitor
|
||||
|
||||
|
||||
1.3. Wireless Extension Private Methods
|
||||
@ -164,8 +234,8 @@ The supported private methods are:
|
||||
-----------------------------------------------
|
||||
|
||||
The Linux kernel provides a pseudo file system that can be used to
|
||||
access various components of the operating system. The Intel(R)
|
||||
PRO/Wireless 2915ABG Driver for Linux exposes several configuration
|
||||
access various components of the operating system. The Intel(R)
|
||||
PRO/Wireless 2915ABG Driver for Linux exposes several configuration
|
||||
parameters through this mechanism.
|
||||
|
||||
An entry in the sysfs can support reading and/or writing. You can
|
||||
@ -184,13 +254,13 @@ You can set the debug level via:
|
||||
|
||||
Where $VALUE would be a number in the case of this sysfs entry. The
|
||||
input to sysfs files does not have to be a number. For example, the
|
||||
firmware loader used by hotplug utilizes sysfs entries for transferring
|
||||
firmware loader used by hotplug utilizes sysfs entries for transfering
|
||||
the firmware image from user space into the driver.
|
||||
|
||||
The Intel(R) PRO/Wireless 2915ABG Driver for Linux exposes sysfs entries
|
||||
at two levels -- driver level, which apply to all instances of the
|
||||
driver (in the event that there are more than one device installed) and
|
||||
device level, which applies only to the single specific instance.
|
||||
at two levels -- driver level, which apply to all instances of the driver
|
||||
(in the event that there are more than one device installed) and device
|
||||
level, which applies only to the single specific instance.
|
||||
|
||||
|
||||
1.4.1 Driver Level Sysfs Helper Files
|
||||
@ -203,6 +273,7 @@ For the driver level files, look in /sys/bus/pci/drivers/ipw2200/
|
||||
This controls the same global as the 'debug' module parameter
|
||||
|
||||
|
||||
|
||||
1.4.2 Device Level Sysfs Helper Files
|
||||
-----------------------------------------------
|
||||
|
||||
@ -213,7 +284,7 @@ For the device level files, look in
|
||||
For example:
|
||||
/sys/bus/pci/drivers/ipw2200/0000:02:01.0
|
||||
|
||||
For the device level files, see /sys/bus/pci/[drivers/ipw2200:
|
||||
For the device level files, see /sys/bus/pci/drivers/ipw2200:
|
||||
|
||||
rf_kill
|
||||
read -
|
||||
@ -231,8 +302,59 @@ For the device level files, see /sys/bus/pci/[drivers/ipw2200:
|
||||
ucode
|
||||
read-only access to the ucode version number
|
||||
|
||||
led
|
||||
read -
|
||||
0 = LED code disabled
|
||||
1 = LED code enabled
|
||||
write -
|
||||
0 = Disable LED code
|
||||
1 = Enable LED code
|
||||
|
||||
2. About the Version Numbers
|
||||
NOTE: The LED code has been reported to hang some systems when
|
||||
running ifconfig and is therefore disabled by default.
|
||||
|
||||
|
||||
2. Ad-Hoc Networking
|
||||
-----------------------------------------------
|
||||
|
||||
When using a device in an Ad-Hoc network, it is useful to understand the
|
||||
sequence and requirements for the driver to be able to create, join, or
|
||||
merge networks.
|
||||
|
||||
The following attempts to provide enough information so that you can
|
||||
have a consistent experience while using the driver as a member of an
|
||||
Ad-Hoc network.
|
||||
|
||||
2.1. Joining an Ad-Hoc Network
|
||||
-----------------------------------------------
|
||||
|
||||
The easiest way to get onto an Ad-Hoc network is to join one that
|
||||
already exists.
|
||||
|
||||
2.2. Creating an Ad-Hoc Network
|
||||
-----------------------------------------------
|
||||
|
||||
An Ad-Hoc networks is created using the syntax of the Wireless tool.
|
||||
|
||||
For Example:
|
||||
iwconfig eth1 mode ad-hoc essid testing channel 2
|
||||
|
||||
2.3. Merging Ad-Hoc Networks
|
||||
-----------------------------------------------
|
||||
|
||||
|
||||
3. Interaction with Wireless Tools
|
||||
-----------------------------------------------
|
||||
|
||||
3.1 iwconfig mode
|
||||
-----------------------------------------------
|
||||
|
||||
When configuring the mode of the adapter, all run-time configured parameters
|
||||
are reset to the value used when the module was loaded. This includes
|
||||
channels, rates, ESSID, etc.
|
||||
|
||||
|
||||
4. About the Version Numbers
|
||||
-----------------------------------------------
|
||||
|
||||
Due to the nature of open source development projects, there are
|
||||
@ -259,12 +381,23 @@ available as quickly as possible, unknown anomalies should be expected.
|
||||
The major version number will be incremented when significant changes
|
||||
are made to the driver. Currently, there are no major changes planned.
|
||||
|
||||
5. Firmware installation
|
||||
----------------------------------------------
|
||||
|
||||
3. Support
|
||||
The driver requires a firmware image, download it and extract the
|
||||
files under /lib/firmware (or wherever your hotplug's firmware.agent
|
||||
will look for firmware files)
|
||||
|
||||
The firmware can be downloaded from the following URL:
|
||||
|
||||
http://ipw2200.sf.net/
|
||||
|
||||
|
||||
6. Support
|
||||
-----------------------------------------------
|
||||
|
||||
For installation support of the 1.0.0 version, you can contact
|
||||
http://supportmail.intel.com, or you can use the open source project
|
||||
For direct support of the 1.0.0 version, you can contact
|
||||
http://supportmail.intel.com, or you can use the open source project
|
||||
support.
|
||||
|
||||
For general information and support, go to:
|
||||
@ -272,7 +405,7 @@ For general information and support, go to:
|
||||
http://ipw2200.sf.net/
|
||||
|
||||
|
||||
4. License
|
||||
7. License
|
||||
-----------------------------------------------
|
||||
|
||||
Copyright(c) 2003 - 2005 Intel Corporation. All rights reserved.
|
||||
@ -297,4 +430,3 @@ For general information and support, go to:
|
||||
James P. Ketrenos <ipw2100-admin@linux.intel.com>
|
||||
Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
|
||||
|
||||
|
||||
|
56
Documentation/networking/dccp.txt
Normal file
56
Documentation/networking/dccp.txt
Normal file
@ -0,0 +1,56 @@
|
||||
DCCP protocol
|
||||
============
|
||||
|
||||
Last updated: 10 November 2005
|
||||
|
||||
Contents
|
||||
========
|
||||
|
||||
- Introduction
|
||||
- Missing features
|
||||
- Socket options
|
||||
- Notes
|
||||
|
||||
Introduction
|
||||
============
|
||||
|
||||
Datagram Congestion Control Protocol (DCCP) is an unreliable, connection
|
||||
based protocol designed to solve issues present in UDP and TCP particularly
|
||||
for real time and multimedia traffic.
|
||||
|
||||
It has a base protocol and pluggable congestion control IDs (CCIDs).
|
||||
|
||||
It is at draft RFC status and the homepage for DCCP as a protocol is at:
|
||||
http://www.icir.org/kohler/dcp/
|
||||
|
||||
Missing features
|
||||
================
|
||||
|
||||
The DCCP implementation does not currently have all the features that are in
|
||||
the draft RFC.
|
||||
|
||||
In particular the following are missing:
|
||||
- CCID2 support
|
||||
- feature negotiation
|
||||
|
||||
When testing against other implementations it appears that elapsed time
|
||||
options are not coded compliant to the specification.
|
||||
|
||||
Socket options
|
||||
==============
|
||||
|
||||
DCCP_SOCKOPT_PACKET_SIZE is used for CCID3 to set default packet size for
|
||||
calculations.
|
||||
|
||||
DCCP_SOCKOPT_SERVICE sets the service. This is compulsory as per the
|
||||
specification. If you don't set it you will get EPROTO.
|
||||
|
||||
Notes
|
||||
=====
|
||||
|
||||
SELinux does not yet have support for DCCP. You will need to turn it off or
|
||||
else you will get EACCES.
|
||||
|
||||
DCCP does not travel through NAT successfully at present. This is because
|
||||
the checksum covers the psuedo-header as per TCP and UDP. It should be
|
||||
relatively trivial to add Linux NAT support for DCCP.
|
@ -176,8 +176,6 @@ information (_most_ of which _is_ _essential_) includes:
|
||||
- Which client caused the problem ?
|
||||
- How much data was being transferred ?
|
||||
- Was the network congested ?
|
||||
- If there was a kernel panic, please run the output through ksymoops
|
||||
before sending it to me, otherwise its _useless_.
|
||||
- How can the problem be reproduced ?
|
||||
- Can you use tcpdump to get a trace ? (N.B. Most (all?) versions of
|
||||
tcpdump don't understand how to dump DECnet properly, so including
|
||||
|
@ -78,6 +78,11 @@ inet_peer_gc_maxtime - INTEGER
|
||||
|
||||
TCP variables:
|
||||
|
||||
tcp_abc - INTEGER
|
||||
Controls Appropriate Byte Count defined in RFC3465. If set to
|
||||
0 then does congestion avoid once per ack. 1 is conservative
|
||||
value, and 2 is more agressive.
|
||||
|
||||
tcp_syn_retries - INTEGER
|
||||
Number of times initial SYNs for an active TCP connection attempt
|
||||
will be retransmitted. Should not be higher than 255. Default value
|
||||
|
@ -1,6 +1,6 @@
|
||||
NOTE: ksymoops is useless on 2.6. Please use the Oops in its original format
|
||||
(from dmesg, etc). Ignore any references in this or other docs to "decoding
|
||||
the Oops" or "running it through ksymoops". If you post an Oops fron 2.6 that
|
||||
the Oops" or "running it through ksymoops". If you post an Oops from 2.6 that
|
||||
has been run through ksymoops, people will just tell you to repost it.
|
||||
|
||||
Quick Summary
|
||||
|
@ -11,9 +11,9 @@ boot video card. (Kernel usually does not even contain video card
|
||||
driver -- vesafb and vgacon are widely used).
|
||||
|
||||
This is not problem for swsusp, because during swsusp resume, BIOS is
|
||||
run normally so video card is normally initialized. S3 has absolutely
|
||||
no chance of working with SMP/HT. Be sure it to turn it off before
|
||||
testing (swsusp should work ok, OTOH).
|
||||
run normally so video card is normally initialized. It should not be
|
||||
problem for S1 standby, because hardware should retain its state over
|
||||
that.
|
||||
|
||||
There are a few types of systems where video works after S3 resume:
|
||||
|
||||
@ -64,7 +64,7 @@ your video card (good luck getting docs :-(). Maybe suspending from X
|
||||
(proper X, knowing your hardware, not XF68_FBcon) might have better
|
||||
chance of working.
|
||||
|
||||
Table of known working systems:
|
||||
Table of known working notebooks:
|
||||
|
||||
Model hack (or "how to do it")
|
||||
------------------------------------------------------------------------------
|
||||
@ -73,7 +73,7 @@ Acer TM 242FX vbetool (6)
|
||||
Acer TM C110 video_post (8)
|
||||
Acer TM C300 vga=normal (only suspend on console, not in X), vbetool (6) or video_post (8)
|
||||
Acer TM 4052LCi s3_bios (2)
|
||||
Acer TM 636Lci s3_bios vga=normal (2)
|
||||
Acer TM 636Lci s3_bios,s3_mode (4)
|
||||
Acer TM 650 (Radeon M7) vga=normal plus boot-radeon (5) gets text console back
|
||||
Acer TM 660 ??? (*)
|
||||
Acer TM 800 vga=normal, X patches, see webpage (5) or vbetool (6)
|
||||
@ -137,6 +137,13 @@ Toshiba Satellite P10-554 s3_bios,s3_mode (4)(****)
|
||||
Toshiba M30 (2) xor X with nvidia driver using internal AGP
|
||||
Uniwill 244IIO ??? (*)
|
||||
|
||||
Known working desktop systems
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Mainboard Graphics card hack (or "how to do it")
|
||||
------------------------------------------------------------------------------
|
||||
Asus A7V8X nVidia RIVA TNT2 model 64 s3_bios,s3_mode (4)
|
||||
|
||||
|
||||
(*) from http://www.ubuntulinux.org/wiki/HoaryPMResults, not sure
|
||||
which options to use. If you know, please tell me.
|
||||
|
@ -871,7 +871,7 @@ by playing with the --adjust-vma parameter to objdump.
|
||||
|
||||
|
||||
|
||||
extern inline void spin_lock(spinlock_t *lp)
|
||||
static inline void spin_lock(spinlock_t *lp)
|
||||
{
|
||||
a0: 18 34 lr %r3,%r4
|
||||
a2: a7 3a 03 bc ahi %r3,956
|
||||
|
@ -8,11 +8,10 @@ All devices which can be addressed by means of ccws are called 'CCW devices' -
|
||||
even if they aren't actually driven by ccws.
|
||||
|
||||
All ccw devices are accessed via a subchannel, this is reflected in the
|
||||
structures under root/:
|
||||
structures under devices/:
|
||||
|
||||
root/
|
||||
- sys
|
||||
- legacy
|
||||
devices/
|
||||
- system/
|
||||
- css0/
|
||||
- 0.0.0000/0.0.0815/
|
||||
- 0.0.0001/0.0.4711/
|
||||
@ -36,7 +35,7 @@ availability: Can be 'good' or 'boxed'; 'no path' or 'no device' for
|
||||
|
||||
online: An interface to set the device online and offline.
|
||||
In the special case of the device being disconnected (see the
|
||||
notify function under 1.2), piping 0 to online will focibly delete
|
||||
notify function under 1.2), piping 0 to online will forcibly delete
|
||||
the device.
|
||||
|
||||
The device drivers can add entries to export per-device data and interfaces.
|
||||
@ -222,7 +221,7 @@ and are called 'chp0.<chpid>'. They have no driver and do not belong to any bus.
|
||||
Please note, that unlike /proc/chpids in 2.4, the channel path objects reflect
|
||||
only the logical state and not the physical state, since we cannot track the
|
||||
latter consistently due to lacking machine support (we don't need to be aware
|
||||
of anyway).
|
||||
of it anyway).
|
||||
|
||||
status - Can be 'online' or 'offline'.
|
||||
Piping 'on' or 'off' sets the chpid logically online/offline.
|
||||
@ -235,12 +234,16 @@ status - Can be 'online' or 'offline'.
|
||||
3. System devices
|
||||
-----------------
|
||||
|
||||
Note: cpus may yet be added here.
|
||||
|
||||
3.1 xpram
|
||||
---------
|
||||
|
||||
xpram shows up under sys/ as 'xpram'.
|
||||
xpram shows up under devices/system/ as 'xpram'.
|
||||
|
||||
3.2 cpus
|
||||
--------
|
||||
|
||||
For each cpu, a directory is created under devices/system/cpu/. Each cpu has an
|
||||
attribute 'online' which can be 0 or 1.
|
||||
|
||||
|
||||
4. Other devices
|
||||
|
89
Documentation/sched-arch.txt
Normal file
89
Documentation/sched-arch.txt
Normal file
@ -0,0 +1,89 @@
|
||||
CPU Scheduler implementation hints for architecture specific code
|
||||
|
||||
Nick Piggin, 2005
|
||||
|
||||
Context switch
|
||||
==============
|
||||
1. Runqueue locking
|
||||
By default, the switch_to arch function is called with the runqueue
|
||||
locked. This is usually not a problem unless switch_to may need to
|
||||
take the runqueue lock. This is usually due to a wake up operation in
|
||||
the context switch. See include/asm-ia64/system.h for an example.
|
||||
|
||||
To request the scheduler call switch_to with the runqueue unlocked,
|
||||
you must `#define __ARCH_WANT_UNLOCKED_CTXSW` in a header file
|
||||
(typically the one where switch_to is defined).
|
||||
|
||||
Unlocked context switches introduce only a very minor performance
|
||||
penalty to the core scheduler implementation in the CONFIG_SMP case.
|
||||
|
||||
2. Interrupt status
|
||||
By default, the switch_to arch function is called with interrupts
|
||||
disabled. Interrupts may be enabled over the call if it is likely to
|
||||
introduce a significant interrupt latency by adding the line
|
||||
`#define __ARCH_WANT_INTERRUPTS_ON_CTXSW` in the same place as for
|
||||
unlocked context switches. This define also implies
|
||||
`__ARCH_WANT_UNLOCKED_CTXSW`. See include/asm-arm/system.h for an
|
||||
example.
|
||||
|
||||
|
||||
CPU idle
|
||||
========
|
||||
Your cpu_idle routines need to obey the following rules:
|
||||
|
||||
1. Preempt should now disabled over idle routines. Should only
|
||||
be enabled to call schedule() then disabled again.
|
||||
|
||||
2. need_resched/TIF_NEED_RESCHED is only ever set, and will never
|
||||
be cleared until the running task has called schedule(). Idle
|
||||
threads need only ever query need_resched, and may never set or
|
||||
clear it.
|
||||
|
||||
3. When cpu_idle finds (need_resched() == 'true'), it should call
|
||||
schedule(). It should not call schedule() otherwise.
|
||||
|
||||
4. The only time interrupts need to be disabled when checking
|
||||
need_resched is if we are about to sleep the processor until
|
||||
the next interrupt (this doesn't provide any protection of
|
||||
need_resched, it prevents losing an interrupt).
|
||||
|
||||
4a. Common problem with this type of sleep appears to be:
|
||||
local_irq_disable();
|
||||
if (!need_resched()) {
|
||||
local_irq_enable();
|
||||
*** resched interrupt arrives here ***
|
||||
__asm__("sleep until next interrupt");
|
||||
}
|
||||
|
||||
5. TIF_POLLING_NRFLAG can be set by idle routines that do not
|
||||
need an interrupt to wake them up when need_resched goes high.
|
||||
In other words, they must be periodically polling need_resched,
|
||||
although it may be reasonable to do some background work or enter
|
||||
a low CPU priority.
|
||||
|
||||
5a. If TIF_POLLING_NRFLAG is set, and we do decide to enter
|
||||
an interrupt sleep, it needs to be cleared then a memory
|
||||
barrier issued (followed by a test of need_resched with
|
||||
interrupts disabled, as explained in 3).
|
||||
|
||||
arch/i386/kernel/process.c has examples of both polling and
|
||||
sleeping idle functions.
|
||||
|
||||
|
||||
Possible arch/ problems
|
||||
=======================
|
||||
|
||||
Possible arch problems I found (and either tried to fix or didn't):
|
||||
|
||||
h8300 - Is such sleeping racy vs interrupts? (See #4a).
|
||||
The H8/300 manual I found indicates yes, however disabling IRQs
|
||||
over the sleep mean only NMIs can wake it up, so can't fix easily
|
||||
without doing spin waiting.
|
||||
|
||||
ia64 - is safe_halt call racy vs interrupts? (does it sleep?) (See #4a)
|
||||
|
||||
sh64 - Is sleeping racy vs interrupts? (See #4a)
|
||||
|
||||
sparc - IRQs on at this point(?), change local_irq_save to _disable.
|
||||
- TODO: needs secondary CPUs to disable preempt (See #1)
|
||||
|
1060
Documentation/sharedsubtree.txt
Normal file
1060
Documentation/sharedsubtree.txt
Normal file
File diff suppressed because it is too large
Load Diff
@ -167,7 +167,7 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
|
||||
spdif - Support SPDIF I/O
|
||||
- Default: disabled
|
||||
|
||||
Module supports autoprobe and multiple chips (max 8).
|
||||
This module supports one chip and autoprobe.
|
||||
|
||||
The power-management is supported.
|
||||
|
||||
@ -206,7 +206,7 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
|
||||
See "AC97 Quirk Option" section below.
|
||||
spdif_aclink - S/PDIF transfer over AC-link (default = 1)
|
||||
|
||||
This module supports up to 8 cards and autoprobe.
|
||||
This module supports one card and autoprobe.
|
||||
|
||||
ATI IXP has two different methods to control SPDIF output. One is
|
||||
over AC-link and another is over the "direct" SPDIF output. The
|
||||
@ -218,7 +218,7 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
|
||||
|
||||
Module for ATI IXP 150/200/250 AC97 modem controllers.
|
||||
|
||||
Module supports up to 8 cards.
|
||||
This module supports one card and autoprobe.
|
||||
|
||||
Note: The default index value of this module is -2, i.e. the first
|
||||
slot is excluded.
|
||||
@ -637,7 +637,7 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
|
||||
model - force the model name
|
||||
position_fix - Fix DMA pointer (0 = auto, 1 = none, 2 = POSBUF, 3 = FIFO size)
|
||||
|
||||
Module supports up to 8 cards.
|
||||
This module supports one card and autoprobe.
|
||||
|
||||
Each codec may have a model table for different configurations.
|
||||
If your machine isn't listed there, the default (usually minimal)
|
||||
@ -663,6 +663,10 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
|
||||
adjusted. Appearing only when compiled with
|
||||
$CONFIG_SND_DEBUG=y
|
||||
|
||||
ALC260
|
||||
hp HP machines
|
||||
fujitsu Fujitsu S7020
|
||||
|
||||
CMI9880
|
||||
minimal 3-jack in back
|
||||
min_fp 3-jack in back, 2-jack in front
|
||||
@ -811,7 +815,7 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
|
||||
semaphores (e.g. on some ASUS laptops)
|
||||
(default off)
|
||||
|
||||
Module supports autoprobe and multiple bus-master chips (max 8).
|
||||
This module supports one chip and autoprobe.
|
||||
|
||||
Note: the latest driver supports auto-detection of chip clock.
|
||||
if you still encounter too fast playback, specify the clock
|
||||
@ -830,7 +834,7 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
|
||||
|
||||
ac97_clock - AC'97 codec clock base (0 = auto-detect)
|
||||
|
||||
This module supports up to 8 cards and autoprobe.
|
||||
This module supports one card and autoprobe.
|
||||
|
||||
Note: The default index value of this module is -2, i.e. the first
|
||||
slot is excluded.
|
||||
@ -950,8 +954,10 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
|
||||
use_cache - 0 or 1 (disabled by default)
|
||||
vaio_hack - alias buffer_top=0x25a800
|
||||
reset_workaround - enable AC97 RESET workaround for some laptops
|
||||
reset_workaround2 - enable extended AC97 RESET workaround for some
|
||||
other laptops
|
||||
|
||||
Module supports autoprobe and multiple chips (max 8).
|
||||
This module supports one chip and autoprobe.
|
||||
|
||||
The power-management is supported.
|
||||
|
||||
@ -980,6 +986,11 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
|
||||
workaround is enabled automatically. For other laptops with a
|
||||
hard freeze, you can try reset_workaround=1 option.
|
||||
|
||||
Note: Dell Latitude CSx laptops have another problem regarding
|
||||
AC97 RESET. On these laptops, reset_workaround2 option is
|
||||
turned on as default. This option is worth to try if the
|
||||
previous reset_workaround option doesn't help.
|
||||
|
||||
Note: This driver is really crappy. It's a porting from the
|
||||
OSS driver, which is a result of black-magic reverse engineering.
|
||||
The detection of codec will fail if the driver is loaded *after*
|
||||
@ -1310,7 +1321,7 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
|
||||
ac97_quirk - AC'97 workaround for strange hardware
|
||||
See "AC97 Quirk Option" section below.
|
||||
|
||||
Module supports autoprobe and multiple bus-master chips (max 8).
|
||||
This module supports one chip and autoprobe.
|
||||
|
||||
Note: on some SMP motherboards like MSI 694D the interrupts might
|
||||
not be generated properly. In such a case, please try to
|
||||
@ -1352,7 +1363,7 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
|
||||
|
||||
ac97_clock - AC'97 codec clock base (default 48000Hz)
|
||||
|
||||
Module supports up to 8 cards.
|
||||
This module supports one card and autoprobe.
|
||||
|
||||
Note: The default index value of this module is -2, i.e. the first
|
||||
slot is excluded.
|
||||
|
@ -18,8 +18,8 @@
|
||||
</affiliation>
|
||||
</author>
|
||||
|
||||
<date>March 6, 2005</date>
|
||||
<edition>0.3.4</edition>
|
||||
<date>October 6, 2005</date>
|
||||
<edition>0.3.5</edition>
|
||||
|
||||
<abstract>
|
||||
<para>
|
||||
@ -30,7 +30,7 @@
|
||||
|
||||
<legalnotice>
|
||||
<para>
|
||||
Copyright (c) 2002-2004 Takashi Iwai <email>tiwai@suse.de</email>
|
||||
Copyright (c) 2002-2005 Takashi Iwai <email>tiwai@suse.de</email>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
@ -1433,25 +1433,10 @@
|
||||
<informalexample>
|
||||
<programlisting>
|
||||
<![CDATA[
|
||||
if (chip->res_port) {
|
||||
release_resource(chip->res_port);
|
||||
kfree_nocheck(chip->res_port);
|
||||
}
|
||||
release_and_free_resource(chip->res_port);
|
||||
]]>
|
||||
</programlisting>
|
||||
</informalexample>
|
||||
|
||||
As you can see, the resource pointer is also to be freed
|
||||
via <function>kfree_nocheck()</function> after
|
||||
<function>release_resource()</function> is called. You
|
||||
cannot use <function>kfree()</function> here, because on ALSA,
|
||||
<function>kfree()</function> may be a wrapper to its own
|
||||
allocator with the memory debugging. Since the resource pointer
|
||||
is allocated externally outside the ALSA, it must be released
|
||||
via the native
|
||||
<function>kfree()</function>.
|
||||
<function>kfree_nocheck()</function> is used for that; it calls
|
||||
the native <function>kfree()</function> without wrapper.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
@ -2190,8 +2175,7 @@ struct _snd_pcm_runtime {
|
||||
unsigned int rate_den;
|
||||
|
||||
/* -- SW params -- */
|
||||
int tstamp_timespec; /* use timeval (0) or timespec (1) */
|
||||
snd_pcm_tstamp_t tstamp_mode; /* mmap timestamp is updated */
|
||||
struct timespec tstamp_mode; /* mmap timestamp is updated */
|
||||
unsigned int period_step;
|
||||
unsigned int sleep_min; /* min ticks to sleep */
|
||||
snd_pcm_uframes_t xfer_align; /* xfer size need to be a multiple */
|
||||
@ -3709,8 +3693,7 @@ struct _snd_pcm_runtime {
|
||||
<para>
|
||||
Here, the chip instance is retrieved via
|
||||
<function>snd_kcontrol_chip()</function> macro. This macro
|
||||
converts from kcontrol->private_data to the type defined by
|
||||
<type>chip_t</type>. The
|
||||
just accesses to kcontrol->private_data. The
|
||||
kcontrol->private_data field is
|
||||
given as the argument of <function>snd_ctl_new()</function>
|
||||
(see the later subsection
|
||||
@ -5998,32 +5981,23 @@ struct _snd_pcm_runtime {
|
||||
The first argument is the expression to evaluate, and the
|
||||
second argument is the action if it fails. When
|
||||
<constant>CONFIG_SND_DEBUG</constant>, is set, it will show an
|
||||
error message such as <computeroutput>BUG? (xxx) (called from
|
||||
yyy)</computeroutput>. When no debug flag is set, this is
|
||||
ignored.
|
||||
error message such as <computeroutput>BUG? (xxx)</computeroutput>
|
||||
together with stack trace.
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section id="useful-functions-snd-runtime-check">
|
||||
<title><function>snd_runtime_check()</function></title>
|
||||
<para>
|
||||
This macro is quite similar with
|
||||
<function>snd_assert()</function>. Unlike
|
||||
<function>snd_assert()</function>, the expression is always
|
||||
evaluated regardless of
|
||||
<constant>CONFIG_SND_DEBUG</constant>. When
|
||||
<constant>CONFIG_SND_DEBUG</constant> is set, the macro will
|
||||
show a message like <computeroutput>ERROR (xx) (called from
|
||||
yyy)</computeroutput>.
|
||||
When no debug flag is set, this macro is ignored.
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section id="useful-functions-snd-bug">
|
||||
<title><function>snd_BUG()</function></title>
|
||||
<para>
|
||||
It calls <function>snd_assert(0,)</function> -- that is, just
|
||||
prints the error message at the point. It's useful to show that
|
||||
a fatal error happens there.
|
||||
It shows <computeroutput>BUG?</computeroutput> message and
|
||||
stack trace as well as <function>snd_assert</function> at the point.
|
||||
It's useful to show that a fatal error happens there.
|
||||
</para>
|
||||
<para>
|
||||
When no debug flag is set, this macro is ignored.
|
||||
</para>
|
||||
</section>
|
||||
</chapter>
|
||||
|
@ -41,9 +41,9 @@ sure that bitwise types don't get mixed up (little-endian vs big-endian
|
||||
vs cpu-endian vs whatever), and there the constant "0" really _is_
|
||||
special.
|
||||
|
||||
Modify top-level Makefile to say
|
||||
Use
|
||||
|
||||
CHECK = sparse -Wbitwise
|
||||
make C=[12] CF=-Wbitwise
|
||||
|
||||
or you don't get any checking at all.
|
||||
|
||||
|
@ -8,7 +8,7 @@ V4L original API</a>
|
||||
</td><td>
|
||||
Obsoleted by V4L2 API
|
||||
</td></tr><tr><td>
|
||||
<A HREF=http://www.linuxtv.org/downloads/video4linux/API/V4L2_API.html>
|
||||
<A HREF=http://www.linuxtv.org/downloads/video4linux/API/V4L2_API>
|
||||
V4L2 API</a>
|
||||
</td><td>
|
||||
Should be used for new projects
|
||||
|
@ -1,137 +1,142 @@
|
||||
card=0 - *** UNKNOWN/GENERIC ***
|
||||
card=1 - MIRO PCTV
|
||||
card=2 - Hauppauge (bt848)
|
||||
card=3 - STB, Gateway P/N 6000699 (bt848)
|
||||
card=4 - Intel Create and Share PCI/ Smart Video Recorder III
|
||||
card=5 - Diamond DTV2000
|
||||
card=6 - AVerMedia TVPhone
|
||||
card=7 - MATRIX-Vision MV-Delta
|
||||
card=8 - Lifeview FlyVideo II (Bt848) LR26 / MAXI TV Video PCI2 LR26
|
||||
card=9 - IMS/IXmicro TurboTV
|
||||
card=10 - Hauppauge (bt878)
|
||||
card=11 - MIRO PCTV pro
|
||||
card=12 - ADS Technologies Channel Surfer TV (bt848)
|
||||
card=13 - AVerMedia TVCapture 98
|
||||
card=14 - Aimslab Video Highway Xtreme (VHX)
|
||||
card=15 - Zoltrix TV-Max
|
||||
card=16 - Prolink Pixelview PlayTV (bt878)
|
||||
card=17 - Leadtek WinView 601
|
||||
card=18 - AVEC Intercapture
|
||||
card=19 - Lifeview FlyVideo II EZ /FlyKit LR38 Bt848 (capture only)
|
||||
card=20 - CEI Raffles Card
|
||||
card=21 - Lifeview FlyVideo 98/ Lucky Star Image World ConferenceTV LR50
|
||||
card=22 - Askey CPH050/ Phoebe Tv Master + FM
|
||||
card=23 - Modular Technology MM201/MM202/MM205/MM210/MM215 PCTV, bt878
|
||||
card=24 - Askey CPH05X/06X (bt878) [many vendors]
|
||||
card=25 - Terratec TerraTV+ Version 1.0 (Bt848)/ Terra TValue Version 1.0/ Vobis TV-Boostar
|
||||
card=26 - Hauppauge WinCam newer (bt878)
|
||||
card=27 - Lifeview FlyVideo 98/ MAXI TV Video PCI2 LR50
|
||||
card=28 - Terratec TerraTV+ Version 1.1 (bt878)
|
||||
card=29 - Imagenation PXC200
|
||||
card=30 - Lifeview FlyVideo 98 LR50
|
||||
card=31 - Formac iProTV, Formac ProTV I (bt848)
|
||||
card=32 - Intel Create and Share PCI/ Smart Video Recorder III
|
||||
card=33 - Terratec TerraTValue Version Bt878
|
||||
card=34 - Leadtek WinFast 2000/ WinFast 2000 XP
|
||||
card=35 - Lifeview FlyVideo 98 LR50 / Chronos Video Shuttle II
|
||||
card=36 - Lifeview FlyVideo 98FM LR50 / Typhoon TView TV/FM Tuner
|
||||
card=37 - Prolink PixelView PlayTV pro
|
||||
card=38 - Askey CPH06X TView99
|
||||
card=39 - Pinnacle PCTV Studio/Rave
|
||||
card=40 - STB TV PCI FM, Gateway P/N 6000704 (bt878), 3Dfx VoodooTV 100
|
||||
card=41 - AVerMedia TVPhone 98
|
||||
card=42 - ProVideo PV951
|
||||
card=43 - Little OnAir TV
|
||||
card=44 - Sigma TVII-FM
|
||||
card=45 - MATRIX-Vision MV-Delta 2
|
||||
card=46 - Zoltrix Genie TV/FM
|
||||
card=47 - Terratec TV/Radio+
|
||||
card=48 - Askey CPH03x/ Dynalink Magic TView
|
||||
card=49 - IODATA GV-BCTV3/PCI
|
||||
card=50 - Prolink PV-BT878P+4E / PixelView PlayTV PAK / Lenco MXTV-9578 CP
|
||||
card=51 - Eagle Wireless Capricorn2 (bt878A)
|
||||
card=52 - Pinnacle PCTV Studio Pro
|
||||
card=53 - Typhoon TView RDS + FM Stereo / KNC1 TV Station RDS
|
||||
card=54 - Lifeview FlyVideo 2000 /FlyVideo A2/ Lifetec LT 9415 TV [LR90]
|
||||
card=55 - Askey CPH031/ BESTBUY Easy TV
|
||||
card=56 - Lifeview FlyVideo 98FM LR50
|
||||
card=57 - GrandTec 'Grand Video Capture' (Bt848)
|
||||
card=58 - Askey CPH060/ Phoebe TV Master Only (No FM)
|
||||
card=59 - Askey CPH03x TV Capturer
|
||||
card=60 - Modular Technology MM100PCTV
|
||||
card=61 - AG Electronics GMV1
|
||||
card=62 - Askey CPH061/ BESTBUY Easy TV (bt878)
|
||||
card=63 - ATI TV-Wonder
|
||||
card=64 - ATI TV-Wonder VE
|
||||
card=65 - Lifeview FlyVideo 2000S LR90
|
||||
card=66 - Terratec TValueRadio
|
||||
card=67 - IODATA GV-BCTV4/PCI
|
||||
card=68 - 3Dfx VoodooTV FM (Euro), VoodooTV 200 (USA)
|
||||
card=69 - Active Imaging AIMMS
|
||||
card=70 - Prolink Pixelview PV-BT878P+ (Rev.4C,8E)
|
||||
card=71 - Lifeview FlyVideo 98EZ (capture only) LR51
|
||||
card=72 - Prolink Pixelview PV-BT878P+9B (PlayTV Pro rev.9B FM+NICAM)
|
||||
card=73 - Sensoray 311
|
||||
card=74 - RemoteVision MX (RV605)
|
||||
card=75 - Powercolor MTV878/ MTV878R/ MTV878F
|
||||
card=76 - Canopus WinDVR PCI (COMPAQ Presario 3524JP, 5112JP)
|
||||
card=77 - GrandTec Multi Capture Card (Bt878)
|
||||
card=78 - Jetway TV/Capture JW-TV878-FBK, Kworld KW-TV878RF
|
||||
card=79 - DSP Design TCVIDEO
|
||||
card=80 - Hauppauge WinTV PVR
|
||||
card=81 - IODATA GV-BCTV5/PCI
|
||||
card=82 - Osprey 100/150 (878)
|
||||
card=83 - Osprey 100/150 (848)
|
||||
card=84 - Osprey 101 (848)
|
||||
card=85 - Osprey 101/151
|
||||
card=86 - Osprey 101/151 w/ svid
|
||||
card=87 - Osprey 200/201/250/251
|
||||
card=88 - Osprey 200/250
|
||||
card=89 - Osprey 210/220
|
||||
card=90 - Osprey 500
|
||||
card=91 - Osprey 540
|
||||
card=92 - Osprey 2000
|
||||
card=93 - IDS Eagle
|
||||
card=94 - Pinnacle PCTV Sat
|
||||
card=95 - Formac ProTV II (bt878)
|
||||
card=96 - MachTV
|
||||
card=97 - Euresys Picolo
|
||||
card=98 - ProVideo PV150
|
||||
card=99 - AD-TVK503
|
||||
card=100 - Hercules Smart TV Stereo
|
||||
card=101 - Pace TV & Radio Card
|
||||
card=102 - IVC-200
|
||||
card=103 - Grand X-Guard / Trust 814PCI
|
||||
card=104 - Nebula Electronics DigiTV
|
||||
card=105 - ProVideo PV143
|
||||
card=106 - PHYTEC VD-009-X1 MiniDIN (bt878)
|
||||
card=107 - PHYTEC VD-009-X1 Combi (bt878)
|
||||
card=108 - PHYTEC VD-009 MiniDIN (bt878)
|
||||
card=109 - PHYTEC VD-009 Combi (bt878)
|
||||
card=110 - IVC-100
|
||||
card=111 - IVC-120G
|
||||
card=112 - pcHDTV HD-2000 TV
|
||||
card=113 - Twinhan DST + clones
|
||||
card=114 - Winfast VC100
|
||||
card=115 - Teppro TEV-560/InterVision IV-560
|
||||
card=116 - SIMUS GVC1100
|
||||
card=117 - NGS NGSTV+
|
||||
card=118 - LMLBT4
|
||||
card=119 - Tekram M205 PRO
|
||||
card=120 - Conceptronic CONTVFMi
|
||||
card=121 - Euresys Picolo Tetra
|
||||
card=122 - Spirit TV Tuner
|
||||
card=123 - AVerMedia AVerTV DVB-T 771
|
||||
card=124 - AverMedia AverTV DVB-T 761
|
||||
card=125 - MATRIX Vision Sigma-SQ
|
||||
card=126 - MATRIX Vision Sigma-SLC
|
||||
card=127 - APAC Viewcomp 878(AMAX)
|
||||
card=128 - DViCO FusionHDTV DVB-T Lite
|
||||
card=129 - V-Gear MyVCD
|
||||
card=130 - Super TV Tuner
|
||||
card=131 - Tibet Systems 'Progress DVR' CS16
|
||||
card=132 - Kodicom 4400R (master)
|
||||
card=133 - Kodicom 4400R (slave)
|
||||
card=134 - Adlink RTV24
|
||||
card=135 - DViCO FusionHDTV 5 Lite
|
||||
card=136 - Acorp Y878F
|
||||
0 -> *** UNKNOWN/GENERIC ***
|
||||
1 -> MIRO PCTV
|
||||
2 -> Hauppauge (bt848)
|
||||
3 -> STB, Gateway P/N 6000699 (bt848)
|
||||
4 -> Intel Create and Share PCI/ Smart Video Recorder III
|
||||
5 -> Diamond DTV2000
|
||||
6 -> AVerMedia TVPhone
|
||||
7 -> MATRIX-Vision MV-Delta
|
||||
8 -> Lifeview FlyVideo II (Bt848) LR26 / MAXI TV Video PCI2 LR26
|
||||
9 -> IMS/IXmicro TurboTV
|
||||
10 -> Hauppauge (bt878) [0070:13eb,0070:3900,2636:10b4]
|
||||
11 -> MIRO PCTV pro
|
||||
12 -> ADS Technologies Channel Surfer TV (bt848)
|
||||
13 -> AVerMedia TVCapture 98 [1461:0002,1461:0004,1461:0300]
|
||||
14 -> Aimslab Video Highway Xtreme (VHX)
|
||||
15 -> Zoltrix TV-Max [a1a0:a0fc]
|
||||
16 -> Prolink Pixelview PlayTV (bt878)
|
||||
17 -> Leadtek WinView 601
|
||||
18 -> AVEC Intercapture
|
||||
19 -> Lifeview FlyVideo II EZ /FlyKit LR38 Bt848 (capture only)
|
||||
20 -> CEI Raffles Card
|
||||
21 -> Lifeview FlyVideo 98/ Lucky Star Image World ConferenceTV LR50
|
||||
22 -> Askey CPH050/ Phoebe Tv Master + FM [14ff:3002]
|
||||
23 -> Modular Technology MM201/MM202/MM205/MM210/MM215 PCTV, bt878 [14c7:0101]
|
||||
24 -> Askey CPH05X/06X (bt878) [many vendors] [144f:3002,144f:3005,144f:5000,14ff:3000]
|
||||
25 -> Terratec TerraTV+ Version 1.0 (Bt848)/ Terra TValue Version 1.0/ Vobis TV-Boostar
|
||||
26 -> Hauppauge WinCam newer (bt878)
|
||||
27 -> Lifeview FlyVideo 98/ MAXI TV Video PCI2 LR50
|
||||
28 -> Terratec TerraTV+ Version 1.1 (bt878) [153b:1127,1852:1852]
|
||||
29 -> Imagenation PXC200 [1295:200a]
|
||||
30 -> Lifeview FlyVideo 98 LR50 [1f7f:1850]
|
||||
31 -> Formac iProTV, Formac ProTV I (bt848)
|
||||
32 -> Intel Create and Share PCI/ Smart Video Recorder III
|
||||
33 -> Terratec TerraTValue Version Bt878 [153b:1117,153b:1118,153b:1119,153b:111a,153b:1134,153b:5018]
|
||||
34 -> Leadtek WinFast 2000/ WinFast 2000 XP [107d:6606,107d:6609,6606:217d,f6ff:fff6]
|
||||
35 -> Lifeview FlyVideo 98 LR50 / Chronos Video Shuttle II [1851:1850,1851:a050]
|
||||
36 -> Lifeview FlyVideo 98FM LR50 / Typhoon TView TV/FM Tuner [1852:1852]
|
||||
37 -> Prolink PixelView PlayTV pro
|
||||
38 -> Askey CPH06X TView99 [144f:3000,144f:a005,a04f:a0fc]
|
||||
39 -> Pinnacle PCTV Studio/Rave [11bd:0012,bd11:1200,bd11:ff00,11bd:ff12]
|
||||
40 -> STB TV PCI FM, Gateway P/N 6000704 (bt878), 3Dfx VoodooTV 100 [10b4:2636,10b4:2645,121a:3060]
|
||||
41 -> AVerMedia TVPhone 98 [1461:0001,1461:0003]
|
||||
42 -> ProVideo PV951 [aa0c:146c]
|
||||
43 -> Little OnAir TV
|
||||
44 -> Sigma TVII-FM
|
||||
45 -> MATRIX-Vision MV-Delta 2
|
||||
46 -> Zoltrix Genie TV/FM [15b0:4000,15b0:400a,15b0:400d,15b0:4010,15b0:4016]
|
||||
47 -> Terratec TV/Radio+ [153b:1123]
|
||||
48 -> Askey CPH03x/ Dynalink Magic TView
|
||||
49 -> IODATA GV-BCTV3/PCI [10fc:4020]
|
||||
50 -> Prolink PV-BT878P+4E / PixelView PlayTV PAK / Lenco MXTV-9578 CP
|
||||
51 -> Eagle Wireless Capricorn2 (bt878A)
|
||||
52 -> Pinnacle PCTV Studio Pro
|
||||
53 -> Typhoon TView RDS + FM Stereo / KNC1 TV Station RDS
|
||||
54 -> Lifeview FlyVideo 2000 /FlyVideo A2/ Lifetec LT 9415 TV [LR90]
|
||||
55 -> Askey CPH031/ BESTBUY Easy TV
|
||||
56 -> Lifeview FlyVideo 98FM LR50 [a051:41a0]
|
||||
57 -> GrandTec 'Grand Video Capture' (Bt848) [4344:4142]
|
||||
58 -> Askey CPH060/ Phoebe TV Master Only (No FM)
|
||||
59 -> Askey CPH03x TV Capturer
|
||||
60 -> Modular Technology MM100PCTV
|
||||
61 -> AG Electronics GMV1 [15cb:0101]
|
||||
62 -> Askey CPH061/ BESTBUY Easy TV (bt878)
|
||||
63 -> ATI TV-Wonder [1002:0001]
|
||||
64 -> ATI TV-Wonder VE [1002:0003]
|
||||
65 -> Lifeview FlyVideo 2000S LR90
|
||||
66 -> Terratec TValueRadio [153b:1135,153b:ff3b]
|
||||
67 -> IODATA GV-BCTV4/PCI [10fc:4050]
|
||||
68 -> 3Dfx VoodooTV FM (Euro), VoodooTV 200 (USA) [121a:3000,10b4:2637]
|
||||
69 -> Active Imaging AIMMS
|
||||
70 -> Prolink Pixelview PV-BT878P+ (Rev.4C,8E)
|
||||
71 -> Lifeview FlyVideo 98EZ (capture only) LR51 [1851:1851]
|
||||
72 -> Prolink Pixelview PV-BT878P+9B (PlayTV Pro rev.9B FM+NICAM) [1554:4011]
|
||||
73 -> Sensoray 311 [6000:0311]
|
||||
74 -> RemoteVision MX (RV605)
|
||||
75 -> Powercolor MTV878/ MTV878R/ MTV878F
|
||||
76 -> Canopus WinDVR PCI (COMPAQ Presario 3524JP, 5112JP) [0e11:0079]
|
||||
77 -> GrandTec Multi Capture Card (Bt878)
|
||||
78 -> Jetway TV/Capture JW-TV878-FBK, Kworld KW-TV878RF [0a01:17de]
|
||||
79 -> DSP Design TCVIDEO
|
||||
80 -> Hauppauge WinTV PVR [0070:4500]
|
||||
81 -> IODATA GV-BCTV5/PCI [10fc:4070,10fc:d018]
|
||||
82 -> Osprey 100/150 (878) [0070:ff00]
|
||||
83 -> Osprey 100/150 (848)
|
||||
84 -> Osprey 101 (848)
|
||||
85 -> Osprey 101/151
|
||||
86 -> Osprey 101/151 w/ svid
|
||||
87 -> Osprey 200/201/250/251
|
||||
88 -> Osprey 200/250 [0070:ff01]
|
||||
89 -> Osprey 210/220
|
||||
90 -> Osprey 500 [0070:ff02]
|
||||
91 -> Osprey 540 [0070:ff04]
|
||||
92 -> Osprey 2000 [0070:ff03]
|
||||
93 -> IDS Eagle
|
||||
94 -> Pinnacle PCTV Sat [11bd:001c]
|
||||
95 -> Formac ProTV II (bt878)
|
||||
96 -> MachTV
|
||||
97 -> Euresys Picolo
|
||||
98 -> ProVideo PV150 [aa00:1460,aa01:1461,aa02:1462,aa03:1463,aa04:1464,aa05:1465,aa06:1466,aa07:1467]
|
||||
99 -> AD-TVK503
|
||||
100 -> Hercules Smart TV Stereo
|
||||
101 -> Pace TV & Radio Card
|
||||
102 -> IVC-200 [0000:a155,0001:a155,0002:a155,0003:a155,0100:a155,0101:a155,0102:a155,0103:a155]
|
||||
103 -> Grand X-Guard / Trust 814PCI [0304:0102]
|
||||
104 -> Nebula Electronics DigiTV [0071:0101]
|
||||
105 -> ProVideo PV143 [aa00:1430,aa00:1431,aa00:1432,aa00:1433,aa03:1433]
|
||||
106 -> PHYTEC VD-009-X1 MiniDIN (bt878)
|
||||
107 -> PHYTEC VD-009-X1 Combi (bt878)
|
||||
108 -> PHYTEC VD-009 MiniDIN (bt878)
|
||||
109 -> PHYTEC VD-009 Combi (bt878)
|
||||
110 -> IVC-100 [ff00:a132]
|
||||
111 -> IVC-120G [ff00:a182,ff01:a182,ff02:a182,ff03:a182,ff04:a182,ff05:a182,ff06:a182,ff07:a182,ff08:a182,ff09:a182,ff0a:a182,ff0b:a182,ff0c:a182,ff0d:a182,ff0e:a182,ff0f:a182]
|
||||
112 -> pcHDTV HD-2000 TV [7063:2000]
|
||||
113 -> Twinhan DST + clones [11bd:0026,1822:0001,270f:fc00]
|
||||
114 -> Winfast VC100 [107d:6607]
|
||||
115 -> Teppro TEV-560/InterVision IV-560
|
||||
116 -> SIMUS GVC1100 [aa6a:82b2]
|
||||
117 -> NGS NGSTV+
|
||||
118 -> LMLBT4
|
||||
119 -> Tekram M205 PRO
|
||||
120 -> Conceptronic CONTVFMi
|
||||
121 -> Euresys Picolo Tetra [1805:0105,1805:0106,1805:0107,1805:0108]
|
||||
122 -> Spirit TV Tuner
|
||||
123 -> AVerMedia AVerTV DVB-T 771 [1461:0771]
|
||||
124 -> AverMedia AverTV DVB-T 761 [1461:0761]
|
||||
125 -> MATRIX Vision Sigma-SQ
|
||||
126 -> MATRIX Vision Sigma-SLC
|
||||
127 -> APAC Viewcomp 878(AMAX)
|
||||
128 -> DViCO FusionHDTV DVB-T Lite [18ac:db10]
|
||||
129 -> V-Gear MyVCD
|
||||
130 -> Super TV Tuner
|
||||
131 -> Tibet Systems 'Progress DVR' CS16
|
||||
132 -> Kodicom 4400R (master)
|
||||
133 -> Kodicom 4400R (slave)
|
||||
134 -> Adlink RTV24
|
||||
135 -> DViCO FusionHDTV 5 Lite [18ac:d500]
|
||||
136 -> Acorp Y878F [9511:1540]
|
||||
137 -> Conceptronic CTVFMi v2
|
||||
138 -> Prolink Pixelview PV-BT878P+ (Rev.2E)
|
||||
139 -> Prolink PixelView PlayTV MPEG2 PV-M4900
|
||||
140 -> Osprey 440 [0070:ff07]
|
||||
141 -> Asound Skyeye PCTV
|
||||
|
@ -1,32 +1,37 @@
|
||||
card=0 - UNKNOWN/GENERIC
|
||||
card=1 - Hauppauge WinTV 34xxx models
|
||||
card=2 - GDI Black Gold
|
||||
card=3 - PixelView
|
||||
card=4 - ATI TV Wonder Pro
|
||||
card=5 - Leadtek Winfast 2000XP Expert
|
||||
card=6 - AverTV Studio 303 (M126)
|
||||
card=7 - MSI TV-@nywhere Master
|
||||
card=8 - Leadtek Winfast DV2000
|
||||
card=9 - Leadtek PVR 2000
|
||||
card=10 - IODATA GV-VCP3/PCI
|
||||
card=11 - Prolink PlayTV PVR
|
||||
card=12 - ASUS PVR-416
|
||||
card=13 - MSI TV-@nywhere
|
||||
card=14 - KWorld/VStream XPert DVB-T
|
||||
card=15 - DViCO FusionHDTV DVB-T1
|
||||
card=16 - KWorld LTV883RF
|
||||
card=17 - DViCO FusionHDTV 3 Gold-Q
|
||||
card=18 - Hauppauge Nova-T DVB-T
|
||||
card=19 - Conexant DVB-T reference design
|
||||
card=20 - Provideo PV259
|
||||
card=21 - DViCO FusionHDTV DVB-T Plus
|
||||
card=22 - digitalnow DNTV Live! DVB-T
|
||||
card=23 - pcHDTV HD3000 HDTV
|
||||
card=24 - Hauppauge WinTV 28xxx (Roslyn) models
|
||||
card=25 - Digital-Logic MICROSPACE Entertainment Center (MEC)
|
||||
card=26 - IODATA GV/BCTV7E
|
||||
card=27 - PixelView PlayTV Ultra Pro (Stereo)
|
||||
card=28 - DViCO FusionHDTV 3 Gold-T
|
||||
card=29 - ADS Tech Instant TV DVB-T PCI
|
||||
card=30 - TerraTec Cinergy 1400 DVB-T
|
||||
card=31 - DViCO FusionHDTV 5 Gold
|
||||
0 -> UNKNOWN/GENERIC
|
||||
1 -> Hauppauge WinTV 34xxx models [0070:3400,0070:3401]
|
||||
2 -> GDI Black Gold [14c7:0106,14c7:0107]
|
||||
3 -> PixelView [1554:4811]
|
||||
4 -> ATI TV Wonder Pro [1002:00f8]
|
||||
5 -> Leadtek Winfast 2000XP Expert [107d:6611,107d:6613]
|
||||
6 -> AverTV Studio 303 (M126) [1461:000b]
|
||||
7 -> MSI TV-@nywhere Master [1462:8606]
|
||||
8 -> Leadtek Winfast DV2000 [107d:6620]
|
||||
9 -> Leadtek PVR 2000 [107d:663b,107d:663C]
|
||||
10 -> IODATA GV-VCP3/PCI [10fc:d003]
|
||||
11 -> Prolink PlayTV PVR
|
||||
12 -> ASUS PVR-416 [1043:4823]
|
||||
13 -> MSI TV-@nywhere
|
||||
14 -> KWorld/VStream XPert DVB-T [17de:08a6]
|
||||
15 -> DViCO FusionHDTV DVB-T1 [18ac:db00]
|
||||
16 -> KWorld LTV883RF
|
||||
17 -> DViCO FusionHDTV 3 Gold-Q [18ac:d810]
|
||||
18 -> Hauppauge Nova-T DVB-T [0070:9002]
|
||||
19 -> Conexant DVB-T reference design [14f1:0187]
|
||||
20 -> Provideo PV259 [1540:2580]
|
||||
21 -> DViCO FusionHDTV DVB-T Plus [18ac:db10]
|
||||
22 -> pcHDTV HD3000 HDTV [7063:3000]
|
||||
23 -> digitalnow DNTV Live! DVB-T [17de:a8a6]
|
||||
24 -> Hauppauge WinTV 28xxx (Roslyn) models [0070:2801]
|
||||
25 -> Digital-Logic MICROSPACE Entertainment Center (MEC) [14f1:0342]
|
||||
26 -> IODATA GV/BCTV7E [10fc:d035]
|
||||
27 -> PixelView PlayTV Ultra Pro (Stereo)
|
||||
28 -> DViCO FusionHDTV 3 Gold-T [18ac:d820]
|
||||
29 -> ADS Tech Instant TV DVB-T PCI [1421:0334]
|
||||
30 -> TerraTec Cinergy 1400 DVB-T [153b:1166]
|
||||
31 -> DViCO FusionHDTV 5 Gold [18ac:d500]
|
||||
32 -> AverMedia UltraTV Media Center PCI 550 [1461:8011]
|
||||
33 -> Kworld V-Stream Xpert DVD
|
||||
34 -> ATI HDTV Wonder [1002:a101]
|
||||
35 -> WinFast DTV1000-T [107d:665f]
|
||||
36 -> AVerTV 303 (M126) [1461:000a]
|
||||
|
10
Documentation/video4linux/CARDLIST.em28xx
Normal file
10
Documentation/video4linux/CARDLIST.em28xx
Normal file
@ -0,0 +1,10 @@
|
||||
0 -> Unknown EM2800 video grabber (em2800) [eb1a:2800]
|
||||
1 -> Unknown EM2820/2840 video grabber (em2820/em2840)
|
||||
2 -> Terratec Cinergy 250 USB (em2820/em2840) [0ccd:0036]
|
||||
3 -> Pinnacle PCTV USB 2 (em2820/em2840) [2304:0208]
|
||||
4 -> Hauppauge WinTV USB 2 (em2820/em2840) [2040:4200]
|
||||
5 -> MSI VOX USB 2.0 (em2820/em2840) [eb1a:2820]
|
||||
6 -> Terratec Cinergy 200 USB (em2800)
|
||||
7 -> Leadtek Winfast USB II (em2800)
|
||||
8 -> Kworld USB2800 (em2800)
|
||||
9 -> Pinnacle Dazzle DVC 90 (em2820/em2840) [2304:0207]
|
@ -6,10 +6,10 @@
|
||||
5 -> SKNet Monster TV [1131:4e85]
|
||||
6 -> Tevion MD 9717
|
||||
7 -> KNC One TV-Station RDS / Typhoon TV Tuner RDS [1131:fe01,1894:fe01]
|
||||
8 -> Terratec Cinergy 400 TV [153B:1142]
|
||||
8 -> Terratec Cinergy 400 TV [153b:1142]
|
||||
9 -> Medion 5044
|
||||
10 -> Kworld/KuroutoShikou SAA7130-TVPCI
|
||||
11 -> Terratec Cinergy 600 TV [153B:1143]
|
||||
11 -> Terratec Cinergy 600 TV [153b:1143]
|
||||
12 -> Medion 7134 [16be:0003]
|
||||
13 -> Typhoon TV+Radio 90031
|
||||
14 -> ELSA EX-VISION 300TV [1048:226b]
|
||||
@ -36,8 +36,8 @@
|
||||
35 -> AverMedia AverTV Studio 305 [1461:2115]
|
||||
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]
|
||||
38 -> Terratec Cinergy 200 TV [153b:1152]
|
||||
39 -> LifeView FlyTV Platinum Mini [5168:0212,4e42:0212]
|
||||
40 -> Compro VideoMate TV PVR/FM [185b:c100]
|
||||
41 -> Compro VideoMate TV Gold+ [185b:c100]
|
||||
42 -> Sabrent SBT-TVFM (saa7130)
|
||||
@ -46,7 +46,7 @@
|
||||
45 -> Avermedia AVerTV Studio 307 [1461:9715]
|
||||
46 -> AVerMedia Cardbus TV/Radio (E500) [1461:d6ee]
|
||||
47 -> Terratec Cinergy 400 mobile [153b:1162]
|
||||
48 -> Terratec Cinergy 600 TV MK3 [153B:1158]
|
||||
48 -> Terratec Cinergy 600 TV MK3 [153b:1158]
|
||||
49 -> Compro VideoMate Gold+ Pal [185b:c200]
|
||||
50 -> Pinnacle PCTV 300i DVB-T + PAL [11bd:002d]
|
||||
51 -> ProVideo PV952 [1540:9524]
|
||||
@ -56,12 +56,27 @@
|
||||
55 -> LifeView FlyDVB-T DUO [5168:0502,5168:0306]
|
||||
56 -> Avermedia AVerTV 307 [1461:a70a]
|
||||
57 -> Avermedia AVerTV GO 007 FM [1461:f31f]
|
||||
58 -> ADS Tech Instant TV (saa7135) [1421:0350,1421:0370]
|
||||
58 -> ADS Tech Instant TV (saa7135) [1421:0350,1421:0370,1421:1370]
|
||||
59 -> Kworld/Tevion V-Stream Xpert TV PVR7134
|
||||
60 -> Typhoon DVB-T Duo Digital/Analog Cardbus [4e42:0502]
|
||||
61 -> Philips TOUGH DVB-T reference design [1131:2004]
|
||||
62 -> Compro VideoMate TV Gold+II
|
||||
63 -> Kworld Xpert TV PVR7134
|
||||
64 -> FlyTV mini Asus Digimatrix [1043:0210,1043:0210]
|
||||
64 -> FlyTV mini Asus Digimatrix [1043:0210]
|
||||
65 -> V-Stream Studio TV Terminator
|
||||
66 -> Yuan TUN-900 (saa7135)
|
||||
67 -> Beholder BeholdTV 409 FM [0000:4091]
|
||||
68 -> GoTView 7135 PCI [5456:7135]
|
||||
69 -> Philips EUROPA V3 reference design [1131:2004]
|
||||
70 -> Compro Videomate DVB-T300 [185b:c900]
|
||||
71 -> Compro Videomate DVB-T200 [185b:c901]
|
||||
72 -> RTD Embedded Technologies VFG7350 [1435:7350]
|
||||
73 -> RTD Embedded Technologies VFG7330 [1435:7330]
|
||||
74 -> LifeView FlyTV Platinum Mini2 [14c0:1212]
|
||||
75 -> AVerMedia AVerTVHD MCE A180 [1461:1044]
|
||||
76 -> SKNet MonsterTV Mobile [1131:4ee9]
|
||||
77 -> Pinnacle PCTV 110i (saa7133) [11bd:002e]
|
||||
78 -> ASUSTeK P7131 Dual [1043:4862]
|
||||
79 -> Sedna/MuchTV PC TV Cardbus TV/Radio (ITO25 Rev:2B)
|
||||
80 -> ASUS Digimatrix TV [1043:0210]
|
||||
81 -> Philips Tiger reference design [1131:2018]
|
||||
|
@ -53,7 +53,7 @@ tuner=51 - Philips PAL/SECAM_D (FM 1256 I-H3)
|
||||
tuner=52 - Thomson DDT 7610 (ATSC/NTSC)
|
||||
tuner=53 - Philips FQ1286
|
||||
tuner=54 - tda8290+75
|
||||
tuner=55 - LG PAL (TAPE series)
|
||||
tuner=55 - TCL 2002MB
|
||||
tuner=56 - Philips PAL/SECAM multi (FQ1216AME MK4)
|
||||
tuner=57 - Philips FQ1236A MK4
|
||||
tuner=58 - Ymec TVision TVF-8531MF/8831MF/8731MF
|
||||
@ -65,3 +65,5 @@ tuner=63 - Philips FMD1216ME MK3 Hybrid Tuner
|
||||
tuner=64 - LG TDVS-H062F/TUA6034
|
||||
tuner=65 - Ymec TVF66T5-B/DFF
|
||||
tuner=66 - LG NTSC (TALN mini series)
|
||||
tuner=67 - Philips TD1316 Hybrid Tuner
|
||||
tuner=68 - Philips TUV1236D ATSC/NTSC dual in
|
||||
|
@ -17,9 +17,9 @@ audio
|
||||
- The chip specs for the on-chip TV sound decoder are next
|
||||
to useless :-/
|
||||
- Neverless the builtin TV sound decoder starts working now,
|
||||
at least for PAL-BG. Other TV norms need other code ...
|
||||
FOR ANY REPORTS ON THIS PLEASE MENTION THE TV NORM YOU ARE
|
||||
USING.
|
||||
at least for PAL-BG. Other TV norms need other code ...
|
||||
FOR ANY REPORTS ON THIS PLEASE MENTION THE TV NORM YOU ARE
|
||||
USING.
|
||||
- Most tuner chips do provide mono sound, which may or may not
|
||||
be useable depending on the board design. With the Hauppauge
|
||||
cards it works, so there is mono sound available as fallback.
|
||||
@ -65,5 +65,5 @@ Have fun,
|
||||
|
||||
Gerd
|
||||
|
||||
--
|
||||
--
|
||||
Gerd Knorr <kraxel@bytesex.org> [SuSE Labs]
|
||||
|
@ -78,5 +78,5 @@ Have fun,
|
||||
|
||||
Gerd
|
||||
|
||||
--
|
||||
--
|
||||
Gerd Knorr <kraxel@bytesex.org> [SuSE Labs]
|
||||
|
@ -149,11 +149,11 @@ Lifeview Flyvideo Series:
|
||||
2) There is a print on the PCB:
|
||||
LR25 = Flyvideo (Zoran ZR36120, SAA7110A)
|
||||
LR26 Rev.N = Flyvideo II (Bt848)
|
||||
Rev.O = Flyvideo II (Bt878)
|
||||
Rev.O = Flyvideo II (Bt878)
|
||||
LR37 Rev.C = Flyvideo EZ (Capture only, ZR36120 + SAA7110)
|
||||
LR38 Rev.A1= Flyvideo II EZ (Bt848 capture only)
|
||||
LR50 Rev.Q = Flyvideo 98 (w/eeprom and PCI subsystem ID)
|
||||
Rev.W = Flyvideo 98 (no eeprom)
|
||||
Rev.W = Flyvideo 98 (no eeprom)
|
||||
LR51 Rev.E = Flyvideo 98 EZ (capture only)
|
||||
LR90 = Flyvideo 2000 (Bt878)
|
||||
Flyvideo 2000S (Bt878) w/Stereo TV (Package incl. LR91 daughterboard)
|
||||
@ -163,7 +163,7 @@ Lifeview Flyvideo Series:
|
||||
LR136 = Flyvideo 2100/3100 (Low profile, SAA7130/SAA7134)
|
||||
LR137 = Flyvideo DV2000/DV3000 (SAA7130/SAA7134 + IEEE1394)
|
||||
LR138 Rev.C= Flyvideo 2000 (SAA7130)
|
||||
or Flyvideo 3000 (SAA7134) w/Stereo TV
|
||||
or Flyvideo 3000 (SAA7134) w/Stereo TV
|
||||
These exist in variations w/FM and w/Remote sometimes denoted
|
||||
by suffixes "FM" and "R".
|
||||
3) You have a laptop (miniPCI card):
|
||||
@ -197,7 +197,7 @@ Typhoon TV card series:
|
||||
50680 "TV Tuner Pal BG" (blue package)= Pixelview PV-BT878P+ (Rev 9B)
|
||||
50681 "TV Tuner PCI Pal I" (variant of 50680)
|
||||
50682 "TView TV/FM Tuner Pal BG" = Flyvideo 98FM (LR50 Rev.Q)
|
||||
Note: The package has a picture of CPH05x (which would be a real TView)
|
||||
Note: The package has a picture of CPH05x (which would be a real TView)
|
||||
50683 "TV Tuner PCI SECAM" (variant of 50680)
|
||||
50684 "TV Tuner Pal BG" = Pixelview 878TV(Rev.3D)
|
||||
50686 "TV Tuner" = KNC1 TV Station
|
||||
@ -418,9 +418,9 @@ Lifetec/Medion/Tevion/Aldi
|
||||
--------------------------
|
||||
LT9306/MD9306 = CPH061
|
||||
LT9415/MD9415 = LR90 Rev.F or Rev.G
|
||||
MD9592 = Avermedia TVphone98 (PCI_ID=1461:0003), PCB-Rev=M168II-B (w/TDA9873H)
|
||||
MD9717 = KNC One (Rev D4, saa7134, FM1216 MK2 tuner)
|
||||
MD5044 = KNC One (Rev D4, saa7134, FM1216ME MK3 tuner)
|
||||
MD9592 = Avermedia TVphone98 (PCI_ID=1461:0003), PCB-Rev=M168II-B (w/TDA9873H)
|
||||
MD9717 = KNC One (Rev D4, saa7134, FM1216 MK2 tuner)
|
||||
MD5044 = KNC One (Rev D4, saa7134, FM1216ME MK3 tuner)
|
||||
|
||||
Modular Technologies (www.modulartech.com) UK
|
||||
---------------------------------------------
|
||||
@ -453,10 +453,10 @@ Technisat
|
||||
Discos ADR PC-Karte ISA (no TV!)
|
||||
Discos ADR PC-Karte PCI (probably no TV?)
|
||||
Techni-PC-Sat (Sat. analog)
|
||||
Rev 1.2 (zr36120, vpx3220, stv0030, saa5246, BSJE3-494A)
|
||||
Rev 1.2 (zr36120, vpx3220, stv0030, saa5246, BSJE3-494A)
|
||||
Mediafocus I (zr36120/zr36125, drp3510, Sat. analog + ADR Radio)
|
||||
Mediafocus II (saa7146, Sat. analog)
|
||||
SatADR Rev 2.1 (saa7146a, saa7113h, stv0056a, msp3400c, drp3510a, BSKE3-307A)
|
||||
SatADR Rev 2.1 (saa7146a, saa7113h, stv0056a, msp3400c, drp3510a, BSKE3-307A)
|
||||
SkyStar 1 DVB (AV7110) = Technotrend Premium
|
||||
SkyStar 2 DVB (B2C2) (=Sky2PC)
|
||||
|
||||
|
@ -42,9 +42,9 @@ bttv uses the PCI Subsystem ID to autodetect the card type. lspci lists
|
||||
the Subsystem ID in the second line, looks like this:
|
||||
|
||||
00:0a.0 Multimedia video controller: Brooktree Corporation Bt878 (rev 02)
|
||||
Subsystem: Hauppauge computer works Inc. WinTV/GO
|
||||
Flags: bus master, medium devsel, latency 32, IRQ 5
|
||||
Memory at e2000000 (32-bit, prefetchable) [size=4K]
|
||||
Subsystem: Hauppauge computer works Inc. WinTV/GO
|
||||
Flags: bus master, medium devsel, latency 32, IRQ 5
|
||||
Memory at e2000000 (32-bit, prefetchable) [size=4K]
|
||||
|
||||
only bt878-based cards can have a subsystem ID (which does not mean
|
||||
that every card really has one). bt848 cards can't have a Subsystem
|
||||
|
@ -27,9 +27,9 @@ information out of a register+stack dump printed by the kernel on
|
||||
protection faults (so-called "kernel oops").
|
||||
|
||||
If you run into some kind of deadlock, you can try to dump a call trace
|
||||
for each process using sysrq-t (see Documentation/sysrq.txt). ksymoops
|
||||
will translate these dumps into kernel symbols too. This way it is
|
||||
possible to figure where *exactly* some process in "D" state is stuck.
|
||||
for each process using sysrq-t (see Documentation/sysrq.txt).
|
||||
This way it is possible to figure where *exactly* some process in "D"
|
||||
state is stuck.
|
||||
|
||||
I've seen reports that bttv 0.7.x crashes whereas 0.8.x works rock solid
|
||||
for some people. Thus probably a small buglet left somewhere in bttv
|
||||
|
@ -61,8 +61,8 @@ line for your board. The important fields are these two:
|
||||
struct tvcard
|
||||
{
|
||||
[ ... ]
|
||||
u32 gpiomask;
|
||||
u32 audiomux[6]; /* Tuner, Radio, external, internal, mute, stereo */
|
||||
u32 gpiomask;
|
||||
u32 audiomux[6]; /* Tuner, Radio, external, internal, mute, stereo */
|
||||
};
|
||||
|
||||
gpiomask specifies which pins are used to control the audio mux chip.
|
||||
@ -126,11 +126,11 @@ muxsel - video mux, input->registervalue mapping
|
||||
pll - same as pll= insmod option
|
||||
tuner_type - same as tuner= insmod option
|
||||
*_modulename - hint whenever some card needs this or that audio
|
||||
module loaded to work properly.
|
||||
module loaded to work properly.
|
||||
has_radio - whenever this TV card has a radio tuner.
|
||||
no_msp34xx - "1" disables loading of msp3400.o module
|
||||
no_tda9875 - "1" disables loading of tda9875.o module
|
||||
needs_tvaudio - set to "1" to load tvaudio.o module
|
||||
no_tda9875 - "1" disables loading of tda9875.o module
|
||||
needs_tvaudio - set to "1" to load tvaudio.o module
|
||||
|
||||
If some config item is specified both from the tvcards array and as
|
||||
insmod option, the insmod option takes precedence.
|
||||
@ -144,5 +144,5 @@ Good luck,
|
||||
|
||||
PS: If you have a new working entry, mail it to me.
|
||||
|
||||
--
|
||||
--
|
||||
Gerd Knorr <kraxel@bytesex.org>
|
||||
|
@ -21,7 +21,7 @@ SAMSUNG Tuner identification: (e.g. TCPM9091PD27)
|
||||
J= NTSC-Japan
|
||||
L= Secam LL
|
||||
M= BG+I+DK
|
||||
N= NTSC
|
||||
N= NTSC
|
||||
Q= BG+I+DK+LL
|
||||
[89]: ?
|
||||
[125]:
|
||||
@ -96,7 +96,7 @@ LG Innotek Tuner:
|
||||
TADC-H002F: NTSC (L,175/410?; 2-B, C-W+11, W+12-69)
|
||||
TADC-M201D: PAL D/K+B/G+I (L,143/425) (sound control at I2C address 0xc8)
|
||||
TADC-T003F: NTSC Taiwan (L,175/410?; 2-B, C-W+11, W+12-69)
|
||||
Suffix:
|
||||
Suffix:
|
||||
P= Standard phono female socket
|
||||
D= IEC female socket
|
||||
F= F-connector
|
||||
|
@ -10,33 +10,33 @@ bt878:
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
saa7134:
|
||||
/* LifeView FlyTV Platinum FM (LR214WF) */
|
||||
/* "Peter Missel <peter.missel@onlinehome.de> */
|
||||
.name = "LifeView FlyTV Platinum FM",
|
||||
/* GP27 MDT2005 PB4 pin 10 */
|
||||
/* GP26 MDT2005 PB3 pin 9 */
|
||||
/* GP25 MDT2005 PB2 pin 8 */
|
||||
/* GP23 MDT2005 PB1 pin 7 */
|
||||
/* GP22 MDT2005 PB0 pin 6 */
|
||||
/* GP21 MDT2005 PB5 pin 11 */
|
||||
/* GP20 MDT2005 PB6 pin 12 */
|
||||
/* GP19 MDT2005 PB7 pin 13 */
|
||||
/* nc MDT2005 PA3 pin 2 */
|
||||
/* Remote MDT2005 PA2 pin 1 */
|
||||
/* GP18 MDT2005 PA1 pin 18 */
|
||||
/* nc MDT2005 PA0 pin 17 strap low */
|
||||
/* LifeView FlyTV Platinum FM (LR214WF) */
|
||||
/* "Peter Missel <peter.missel@onlinehome.de> */
|
||||
.name = "LifeView FlyTV Platinum FM",
|
||||
/* GP27 MDT2005 PB4 pin 10 */
|
||||
/* GP26 MDT2005 PB3 pin 9 */
|
||||
/* GP25 MDT2005 PB2 pin 8 */
|
||||
/* GP23 MDT2005 PB1 pin 7 */
|
||||
/* GP22 MDT2005 PB0 pin 6 */
|
||||
/* GP21 MDT2005 PB5 pin 11 */
|
||||
/* GP20 MDT2005 PB6 pin 12 */
|
||||
/* GP19 MDT2005 PB7 pin 13 */
|
||||
/* nc MDT2005 PA3 pin 2 */
|
||||
/* Remote MDT2005 PA2 pin 1 */
|
||||
/* GP18 MDT2005 PA1 pin 18 */
|
||||
/* nc MDT2005 PA0 pin 17 strap low */
|
||||
|
||||
/* GP17 Strap "GP7"=High */
|
||||
/* GP16 Strap "GP6"=High
|
||||
0=Radio 1=TV
|
||||
Drives SA630D ENCH1 and HEF4052 A1 pins
|
||||
to do FM radio through SIF input */
|
||||
/* GP15 nc */
|
||||
/* GP14 nc */
|
||||
/* GP13 nc */
|
||||
/* GP12 Strap "GP5" = High */
|
||||
/* GP11 Strap "GP4" = High */
|
||||
/* GP10 Strap "GP3" = High */
|
||||
/* GP09 Strap "GP2" = Low */
|
||||
/* GP08 Strap "GP1" = Low */
|
||||
/* GP07.00 nc */
|
||||
/* GP17 Strap "GP7"=High */
|
||||
/* GP16 Strap "GP6"=High
|
||||
0=Radio 1=TV
|
||||
Drives SA630D ENCH1 and HEF4052 A1 pins
|
||||
to do FM radio through SIF input */
|
||||
/* GP15 nc */
|
||||
/* GP14 nc */
|
||||
/* GP13 nc */
|
||||
/* GP12 Strap "GP5" = High */
|
||||
/* GP11 Strap "GP4" = High */
|
||||
/* GP10 Strap "GP3" = High */
|
||||
/* GP09 Strap "GP2" = Low */
|
||||
/* GP08 Strap "GP1" = Low */
|
||||
/* GP07.00 nc */
|
||||
|
@ -13,12 +13,13 @@ This optimization is more critical now as bigger and bigger physical memories
|
||||
Users can use the huge page support in Linux kernel by either using the mmap
|
||||
system call or standard SYSv shared memory system calls (shmget, shmat).
|
||||
|
||||
First the Linux kernel needs to be built with CONFIG_HUGETLB_PAGE (present
|
||||
under Processor types and feature) and CONFIG_HUGETLBFS (present under file
|
||||
system option on config menu) config options.
|
||||
First the Linux kernel needs to be built with the CONFIG_HUGETLBFS
|
||||
(present under "File systems") and CONFIG_HUGETLB_PAGE (selected
|
||||
automatically when CONFIG_HUGETLBFS is selected) configuration
|
||||
options.
|
||||
|
||||
The kernel built with hugepage support should show the number of configured
|
||||
hugepages in the system by running the "cat /proc/meminfo" command.
|
||||
hugepages in the system by running the "cat /proc/meminfo" command.
|
||||
|
||||
/proc/meminfo also provides information about the total number of hugetlb
|
||||
pages configured in the kernel. It also displays information about the
|
||||
@ -38,19 +39,19 @@ in the kernel.
|
||||
|
||||
/proc/sys/vm/nr_hugepages indicates the current number of configured hugetlb
|
||||
pages in the kernel. Super user can dynamically request more (or free some
|
||||
pre-configured) hugepages.
|
||||
The allocation( or deallocation) of hugetlb pages is posible only if there are
|
||||
pre-configured) hugepages.
|
||||
The allocation (or deallocation) of hugetlb pages is possible only if there are
|
||||
enough physically contiguous free pages in system (freeing of hugepages is
|
||||
possible only if there are enough hugetlb pages free that can be transfered
|
||||
possible only if there are enough hugetlb pages free that can be transfered
|
||||
back to regular memory pool).
|
||||
|
||||
Pages that are used as hugetlb pages are reserved inside the kernel and can
|
||||
not be used for other purposes.
|
||||
not be used for other purposes.
|
||||
|
||||
Once the kernel with Hugetlb page support is built and running, a user can
|
||||
use either the mmap system call or shared memory system calls to start using
|
||||
the huge pages. It is required that the system administrator preallocate
|
||||
enough memory for huge page purposes.
|
||||
enough memory for huge page purposes.
|
||||
|
||||
Use the following command to dynamically allocate/deallocate hugepages:
|
||||
|
||||
@ -80,9 +81,9 @@ memory (huge pages) allowed for that filesystem (/mnt/huge). The size is
|
||||
rounded down to HPAGE_SIZE. The option nr_inode sets the maximum number of
|
||||
inodes that /mnt/huge can use. If the size or nr_inode options are not
|
||||
provided on command line then no limits are set. For size and nr_inodes
|
||||
options, you can use [G|g]/[M|m]/[K|k] to represent giga/mega/kilo. For
|
||||
example, size=2K has the same meaning as size=2048. An example is given at
|
||||
the end of this document.
|
||||
options, you can use [G|g]/[M|m]/[K|k] to represent giga/mega/kilo. For
|
||||
example, size=2K has the same meaning as size=2048. An example is given at
|
||||
the end of this document.
|
||||
|
||||
read and write system calls are not supported on files that reside on hugetlb
|
||||
file systems.
|
||||
|
57
MAINTAINERS
57
MAINTAINERS
@ -297,6 +297,11 @@ P: Richard Purdie
|
||||
M: rpurdie@rpsys.net
|
||||
S: Maintained
|
||||
|
||||
ARM/TOSA MACHINE SUPPORT
|
||||
P: Dirk Opfer
|
||||
M: dirk@opfer-online.de
|
||||
S: Maintained
|
||||
|
||||
ARM/PLEB SUPPORT
|
||||
P: Peter Chubb
|
||||
M: pleb@gelato.unsw.edu.au
|
||||
@ -702,7 +707,7 @@ DCCP PROTOCOL
|
||||
P: Arnaldo Carvalho de Melo
|
||||
M: acme@mandriva.com
|
||||
L: dccp@vger.kernel.org
|
||||
W: http://www.wlug.org.nz/DCCP
|
||||
W: http://linux-net.osdl.org/index.php/DCCP
|
||||
S: Maintained
|
||||
|
||||
DECnet NETWORK LAYER
|
||||
@ -1072,6 +1077,26 @@ P: Jaroslav Kysela
|
||||
M: perex@suse.cz
|
||||
S: Maintained
|
||||
|
||||
HPET: High Precision Event Timers driver (hpet.c)
|
||||
P: Clemens Ladisch
|
||||
M: clemens@ladisch.de
|
||||
S: Maintained
|
||||
|
||||
HPET: i386
|
||||
P: Venkatesh Pallipadi (Venki)
|
||||
M: venkatesh.pallipadi@intel.com
|
||||
S: Maintained
|
||||
|
||||
HPET: x86_64
|
||||
P: Andi Kleen and Vojtech Pavlik
|
||||
M: ak@muc.de and vojtech@suse.cz
|
||||
S: Maintained
|
||||
|
||||
HPET: ACPI hpet.c
|
||||
P: Bob Picco
|
||||
M: bob.picco@hp.com
|
||||
S: Maintained
|
||||
|
||||
HPFS FILESYSTEM
|
||||
P: Mikulas Patocka
|
||||
M: mikulas@artax.karlin.mff.cuni.cz
|
||||
@ -1305,6 +1330,24 @@ M: john.ronciak@intel.com
|
||||
W: http://sourceforge.net/projects/e1000/
|
||||
S: Supported
|
||||
|
||||
INTEL PRO/WIRELESS 2100 NETWORK CONNECTION SUPPORT
|
||||
P: Yi Zhu
|
||||
M: yi.zhu@intel.com
|
||||
P: James Ketrenos
|
||||
M: jketreno@linux.intel.com
|
||||
L: http://lists.sourceforge.net/mailman/listinfo/ipw2100-devel
|
||||
W: http://ipw2100.sourceforge.net
|
||||
S: Supported
|
||||
|
||||
INTEL PRO/WIRELESS 2915ABG NETWORK CONNECTION SUPPORT
|
||||
P: Yi Zhu
|
||||
M: yi.zhu@intel.com
|
||||
P: James Ketrenos
|
||||
M: jketreno@linux.intel.com
|
||||
L: http://lists.sourceforge.net/mailman/listinfo/ipw2100-devel
|
||||
W: http://ipw2200.sourceforge.net
|
||||
S: Supported
|
||||
|
||||
IOC3 DRIVER
|
||||
P: Ralf Baechle
|
||||
M: ralf@linux-mips.org
|
||||
@ -2046,6 +2089,12 @@ P: Matt Mackall
|
||||
M: mpm@selenic.com
|
||||
S: Maintained
|
||||
|
||||
RAPIDIO SUBSYSTEM
|
||||
P: Matt Porter
|
||||
M: mporter@kernel.crashing.org
|
||||
L: linux-kernel@vger.kernel.org
|
||||
S: Maintained
|
||||
|
||||
REAL TIME CLOCK DRIVER
|
||||
P: Paul Gortmaker
|
||||
M: p_gortmaker@yahoo.com
|
||||
@ -2450,10 +2499,10 @@ L: linux-kernel@vger.kernel.org
|
||||
S: Maintained
|
||||
|
||||
TRIVIAL PATCHES
|
||||
P: Rusty Russell
|
||||
M: trivial@rustcorp.com.au
|
||||
P: Adrian Bunk
|
||||
M: trivial@kernel.org
|
||||
L: linux-kernel@vger.kernel.org
|
||||
W: http://www.kernel.org/pub/linux/kernel/people/rusty/trivial/
|
||||
W: http://www.kernel.org/pub/linux/kernel/people/bunk/trivial/
|
||||
S: Maintained
|
||||
|
||||
TMS380 TOKEN-RING NETWORK DRIVER
|
||||
|
12
Makefile
12
Makefile
@ -346,7 +346,8 @@ AFLAGS_KERNEL =
|
||||
# Use LINUXINCLUDE when you must reference the include/ directory.
|
||||
# Needed to be compatible with the O= option
|
||||
LINUXINCLUDE := -Iinclude \
|
||||
$(if $(KBUILD_SRC),-Iinclude2 -I$(srctree)/include)
|
||||
$(if $(KBUILD_SRC),-Iinclude2 -I$(srctree)/include) \
|
||||
-include include/linux/autoconf.h
|
||||
|
||||
CPPFLAGS := -D__KERNEL__ $(LINUXINCLUDE)
|
||||
|
||||
@ -406,7 +407,7 @@ outputmakefile:
|
||||
# of make so .config is not included in this case either (for *config).
|
||||
|
||||
no-dot-config-targets := clean mrproper distclean \
|
||||
cscope TAGS tags help %docs check%
|
||||
cscope TAGS tags help %docs check% kernelrelease
|
||||
|
||||
config-targets := 0
|
||||
mixed-targets := 0
|
||||
@ -582,7 +583,7 @@ export MODLIB
|
||||
|
||||
|
||||
ifeq ($(KBUILD_EXTMOD),)
|
||||
core-y += kernel/ mm/ fs/ ipc/ security/ crypto/
|
||||
core-y += kernel/ mm/ fs/ ipc/ security/ crypto/ block/
|
||||
|
||||
vmlinux-dirs := $(patsubst %/,%,$(filter %/, $(init-y) $(init-m) \
|
||||
$(core-y) $(core-m) $(drivers-y) $(drivers-m) \
|
||||
@ -1249,11 +1250,6 @@ tags: FORCE
|
||||
# Scripts to check various things for consistency
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
configcheck:
|
||||
find * $(RCS_FIND_IGNORE) \
|
||||
-name '*.[hcS]' -type f -print | sort \
|
||||
| xargs $(PERL) -w scripts/checkconfig.pl
|
||||
|
||||
includecheck:
|
||||
find * $(RCS_FIND_IGNORE) \
|
||||
-name '*.[hcS]' -type f -print | sort \
|
||||
|
@ -43,21 +43,17 @@
|
||||
#include "proto.h"
|
||||
#include "pci_impl.h"
|
||||
|
||||
void default_idle(void)
|
||||
{
|
||||
barrier();
|
||||
}
|
||||
|
||||
void
|
||||
cpu_idle(void)
|
||||
{
|
||||
set_thread_flag(TIF_POLLING_NRFLAG);
|
||||
|
||||
while (1) {
|
||||
void (*idle)(void) = default_idle;
|
||||
/* FIXME -- EV6 and LCA45 know how to power down
|
||||
the CPU. */
|
||||
|
||||
while (!need_resched())
|
||||
idle();
|
||||
cpu_relax();
|
||||
schedule();
|
||||
}
|
||||
}
|
||||
|
@ -239,6 +239,8 @@ source "arch/arm/plat-omap/Kconfig"
|
||||
|
||||
source "arch/arm/mach-omap1/Kconfig"
|
||||
|
||||
source "arch/arm/mach-omap2/Kconfig"
|
||||
|
||||
source "arch/arm/mach-s3c2410/Kconfig"
|
||||
|
||||
source "arch/arm/mach-lh7a40x/Kconfig"
|
||||
@ -324,7 +326,7 @@ menu "Kernel Features"
|
||||
|
||||
config SMP
|
||||
bool "Symmetric Multi-Processing (EXPERIMENTAL)"
|
||||
depends on EXPERIMENTAL && BROKEN #&& n
|
||||
depends on EXPERIMENTAL && REALVIEW_MPCORE
|
||||
help
|
||||
This enables support for systems with more than one CPU. If you have
|
||||
a system with only one CPU, like most personal computers, say N. If
|
||||
@ -356,6 +358,16 @@ config HOTPLUG_CPU
|
||||
Say Y here to experiment with turning CPUs off and on. CPUs
|
||||
can be controlled through /sys/devices/system/cpu.
|
||||
|
||||
config LOCAL_TIMERS
|
||||
bool "Use local timer interrupts"
|
||||
depends on SMP && REALVIEW_MPCORE
|
||||
default y
|
||||
help
|
||||
Enable support for local timers on SMP platforms, rather then the
|
||||
legacy IPI broadcast method. Local timers allows the system
|
||||
accounting to be spread across the timer interval, preventing a
|
||||
"thundering herd" at every timer tick.
|
||||
|
||||
config PREEMPT
|
||||
bool "Preemptible Kernel (EXPERIMENTAL)"
|
||||
depends on EXPERIMENTAL
|
||||
@ -585,7 +597,7 @@ config FPE_NWFPE
|
||||
|
||||
config FPE_NWFPE_XP
|
||||
bool "Support extended precision"
|
||||
depends on FPE_NWFPE && !CPU_BIG_ENDIAN
|
||||
depends on FPE_NWFPE
|
||||
help
|
||||
Say Y to include 80-bit support in the kernel floating-point
|
||||
emulator. Otherwise, only 32 and 64-bit support is compiled in.
|
||||
|
@ -93,6 +93,7 @@ textaddr-$(CONFIG_ARCH_FORTUNET) := 0xc0008000
|
||||
machine-$(CONFIG_ARCH_IXP4XX) := ixp4xx
|
||||
machine-$(CONFIG_ARCH_IXP2000) := ixp2000
|
||||
machine-$(CONFIG_ARCH_OMAP1) := omap1
|
||||
machine-$(CONFIG_ARCH_OMAP2) := omap2
|
||||
incdir-$(CONFIG_ARCH_OMAP) := omap
|
||||
machine-$(CONFIG_ARCH_S3C2410) := s3c2410
|
||||
machine-$(CONFIG_ARCH_LH7A40X) := lh7a40x
|
||||
|
@ -283,8 +283,14 @@ void flush_window(void)
|
||||
putstr(".");
|
||||
}
|
||||
|
||||
#ifndef arch_error
|
||||
#define arch_error(x)
|
||||
#endif
|
||||
|
||||
static void error(char *x)
|
||||
{
|
||||
arch_error(x);
|
||||
|
||||
putstr("\n\n");
|
||||
putstr(x);
|
||||
putstr("\n\n -- System halted");
|
||||
|
@ -19,12 +19,6 @@
|
||||
|
||||
#define SCOOP_REG(d,adr) (*(volatile unsigned short*)(d +(adr)))
|
||||
|
||||
/* PCMCIA to Scoop linkage structures for pxa2xx_sharpsl.c
|
||||
There is no easy way to link multiple scoop devices into one
|
||||
single entity for the pxa2xx_pcmcia device */
|
||||
int scoop_num;
|
||||
struct scoop_pcmcia_dev *scoop_devs;
|
||||
|
||||
struct scoop_dev {
|
||||
void *base;
|
||||
spinlock_t scoop_lock;
|
||||
|
@ -1,7 +1,7 @@
|
||||
#
|
||||
# Automatically generated make config: don't edit
|
||||
# Linux kernel version: 2.6.13
|
||||
# Mon Sep 5 18:07:12 2005
|
||||
# Linux kernel version: 2.6.14
|
||||
# Wed Nov 9 18:53:40 2005
|
||||
#
|
||||
CONFIG_ARM=y
|
||||
CONFIG_MMU=y
|
||||
@ -22,6 +22,7 @@ CONFIG_INIT_ENV_ARG_LIMIT=32
|
||||
# General setup
|
||||
#
|
||||
CONFIG_LOCALVERSION=""
|
||||
CONFIG_LOCALVERSION_AUTO=y
|
||||
CONFIG_SWAP=y
|
||||
CONFIG_SYSVIPC=y
|
||||
# CONFIG_POSIX_MQUEUE is not set
|
||||
@ -31,6 +32,7 @@ CONFIG_SYSCTL=y
|
||||
# CONFIG_HOTPLUG is not set
|
||||
CONFIG_KOBJECT_UEVENT=y
|
||||
# CONFIG_IKCONFIG is not set
|
||||
CONFIG_INITRAMFS_SOURCE=""
|
||||
# CONFIG_EMBEDDED is not set
|
||||
CONFIG_KALLSYMS=y
|
||||
# CONFIG_KALLSYMS_EXTRA_PASS is not set
|
||||
@ -59,6 +61,23 @@ CONFIG_OBSOLETE_MODPARM=y
|
||||
# CONFIG_MODULE_SRCVERSION_ALL is not set
|
||||
# CONFIG_KMOD is not set
|
||||
|
||||
#
|
||||
# Block layer
|
||||
#
|
||||
|
||||
#
|
||||
# IO Schedulers
|
||||
#
|
||||
CONFIG_IOSCHED_NOOP=y
|
||||
CONFIG_IOSCHED_AS=y
|
||||
CONFIG_IOSCHED_DEADLINE=y
|
||||
CONFIG_IOSCHED_CFQ=y
|
||||
CONFIG_DEFAULT_AS=y
|
||||
# CONFIG_DEFAULT_DEADLINE is not set
|
||||
# CONFIG_DEFAULT_CFQ is not set
|
||||
# CONFIG_DEFAULT_NOOP is not set
|
||||
CONFIG_DEFAULT_IOSCHED="anticipatory"
|
||||
|
||||
#
|
||||
# System Type
|
||||
#
|
||||
@ -81,6 +100,7 @@ CONFIG_OBSOLETE_MODPARM=y
|
||||
# CONFIG_ARCH_LH7A40X is not set
|
||||
CONFIG_ARCH_OMAP=y
|
||||
# CONFIG_ARCH_VERSATILE is not set
|
||||
# CONFIG_ARCH_REALVIEW is not set
|
||||
# CONFIG_ARCH_IMX is not set
|
||||
# CONFIG_ARCH_H720X is not set
|
||||
# CONFIG_ARCH_AAEC2000 is not set
|
||||
@ -112,7 +132,7 @@ CONFIG_OMAP_SERIAL_WAKE=y
|
||||
# OMAP Core Type
|
||||
#
|
||||
# CONFIG_ARCH_OMAP730 is not set
|
||||
# CONFIG_ARCH_OMAP1510 is not set
|
||||
# CONFIG_ARCH_OMAP15XX is not set
|
||||
CONFIG_ARCH_OMAP16XX=y
|
||||
|
||||
#
|
||||
@ -177,6 +197,8 @@ CONFIG_FLATMEM_MANUAL=y
|
||||
# CONFIG_SPARSEMEM_MANUAL is not set
|
||||
CONFIG_FLATMEM=y
|
||||
CONFIG_FLAT_NODE_MEM_MAP=y
|
||||
# CONFIG_SPARSEMEM_STATIC is not set
|
||||
CONFIG_SPLIT_PTLOCK_CPUS=4096
|
||||
# CONFIG_LEDS is not set
|
||||
CONFIG_ALIGNMENT_TRAP=y
|
||||
|
||||
@ -258,13 +280,18 @@ CONFIG_IP_PNP_BOOTP=y
|
||||
# CONFIG_INET_ESP is not set
|
||||
# CONFIG_INET_IPCOMP is not set
|
||||
# CONFIG_INET_TUNNEL is not set
|
||||
CONFIG_IP_TCPDIAG=y
|
||||
# CONFIG_IP_TCPDIAG_IPV6 is not set
|
||||
CONFIG_INET_DIAG=y
|
||||
CONFIG_INET_TCP_DIAG=y
|
||||
# CONFIG_TCP_CONG_ADVANCED is not set
|
||||
CONFIG_TCP_CONG_BIC=y
|
||||
# CONFIG_IPV6 is not set
|
||||
# CONFIG_NETFILTER is not set
|
||||
|
||||
#
|
||||
# DCCP Configuration (EXPERIMENTAL)
|
||||
#
|
||||
# CONFIG_IP_DCCP is not set
|
||||
|
||||
#
|
||||
# SCTP Configuration (EXPERIMENTAL)
|
||||
#
|
||||
@ -281,6 +308,10 @@ CONFIG_TCP_CONG_BIC=y
|
||||
# CONFIG_NET_DIVERT is not set
|
||||
# CONFIG_ECONET is not set
|
||||
# CONFIG_WAN_ROUTER is not set
|
||||
|
||||
#
|
||||
# QoS and/or fair queueing
|
||||
#
|
||||
# CONFIG_NET_SCHED is not set
|
||||
# CONFIG_NET_CLS_ROUTE is not set
|
||||
|
||||
@ -291,6 +322,7 @@ CONFIG_TCP_CONG_BIC=y
|
||||
# CONFIG_HAMRADIO is not set
|
||||
# CONFIG_IRDA is not set
|
||||
# CONFIG_BT is not set
|
||||
# CONFIG_IEEE80211 is not set
|
||||
|
||||
#
|
||||
# Device Drivers
|
||||
@ -328,21 +360,13 @@ CONFIG_BLK_DEV_RAM=y
|
||||
CONFIG_BLK_DEV_RAM_COUNT=16
|
||||
CONFIG_BLK_DEV_RAM_SIZE=8192
|
||||
CONFIG_BLK_DEV_INITRD=y
|
||||
CONFIG_INITRAMFS_SOURCE=""
|
||||
# CONFIG_CDROM_PKTCDVD is not set
|
||||
|
||||
#
|
||||
# IO Schedulers
|
||||
#
|
||||
CONFIG_IOSCHED_NOOP=y
|
||||
CONFIG_IOSCHED_AS=y
|
||||
CONFIG_IOSCHED_DEADLINE=y
|
||||
CONFIG_IOSCHED_CFQ=y
|
||||
CONFIG_ATA_OVER_ETH=m
|
||||
|
||||
#
|
||||
# SCSI device support
|
||||
#
|
||||
# CONFIG_RAID_ATTRS is not set
|
||||
CONFIG_SCSI=y
|
||||
CONFIG_SCSI_PROC_FS=y
|
||||
|
||||
@ -369,10 +393,12 @@ CONFIG_SCSI_PROC_FS=y
|
||||
# CONFIG_SCSI_SPI_ATTRS is not set
|
||||
# CONFIG_SCSI_FC_ATTRS is not set
|
||||
# CONFIG_SCSI_ISCSI_ATTRS is not set
|
||||
# CONFIG_SCSI_SAS_ATTRS is not set
|
||||
|
||||
#
|
||||
# SCSI low-level drivers
|
||||
#
|
||||
# CONFIG_ISCSI_TCP is not set
|
||||
# CONFIG_SCSI_SATA is not set
|
||||
# CONFIG_SCSI_DEBUG is not set
|
||||
|
||||
@ -403,6 +429,11 @@ CONFIG_NETDEVICES=y
|
||||
# CONFIG_EQUALIZER is not set
|
||||
# CONFIG_TUN is not set
|
||||
|
||||
#
|
||||
# PHY device support
|
||||
#
|
||||
# CONFIG_PHYLIB is not set
|
||||
|
||||
#
|
||||
# Ethernet (10 or 100Mbit)
|
||||
#
|
||||
@ -439,6 +470,7 @@ CONFIG_PPP=y
|
||||
# CONFIG_PPP_SYNC_TTY is not set
|
||||
# CONFIG_PPP_DEFLATE is not set
|
||||
# CONFIG_PPP_BSDCOMP is not set
|
||||
# CONFIG_PPP_MPPE is not set
|
||||
# CONFIG_PPPOE is not set
|
||||
CONFIG_SLIP=y
|
||||
CONFIG_SLIP_COMPRESSED=y
|
||||
@ -541,24 +573,28 @@ CONFIG_WATCHDOG_NOWAYOUT=y
|
||||
#
|
||||
# TPM devices
|
||||
#
|
||||
# CONFIG_TELCLOCK is not set
|
||||
|
||||
#
|
||||
# I2C support
|
||||
#
|
||||
# CONFIG_I2C is not set
|
||||
# CONFIG_I2C_SENSOR is not set
|
||||
CONFIG_ISP1301_OMAP=y
|
||||
|
||||
#
|
||||
# Hardware Monitoring support
|
||||
#
|
||||
CONFIG_HWMON=y
|
||||
# CONFIG_HWMON_VID is not set
|
||||
# CONFIG_HWMON_DEBUG_CHIP is not set
|
||||
|
||||
#
|
||||
# Misc devices
|
||||
#
|
||||
|
||||
#
|
||||
# Multimedia Capabilities Port drivers
|
||||
#
|
||||
|
||||
#
|
||||
# Multimedia devices
|
||||
#
|
||||
@ -576,7 +612,6 @@ CONFIG_FB=y
|
||||
# CONFIG_FB_CFB_FILLRECT is not set
|
||||
# CONFIG_FB_CFB_COPYAREA is not set
|
||||
# CONFIG_FB_CFB_IMAGEBLIT is not set
|
||||
# CONFIG_FB_SOFT_CURSOR is not set
|
||||
# CONFIG_FB_MACMODES is not set
|
||||
CONFIG_FB_MODE_HELPERS=y
|
||||
# CONFIG_FB_TILEBLITTING is not set
|
||||
@ -589,6 +624,7 @@ CONFIG_FB_MODE_HELPERS=y
|
||||
# CONFIG_VGA_CONSOLE is not set
|
||||
CONFIG_DUMMY_CONSOLE=y
|
||||
CONFIG_FRAMEBUFFER_CONSOLE=y
|
||||
# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set
|
||||
CONFIG_FONTS=y
|
||||
CONFIG_FONT_8x8=y
|
||||
CONFIG_FONT_8x16=y
|
||||
@ -600,6 +636,7 @@ CONFIG_FONT_8x16=y
|
||||
# CONFIG_FONT_SUN8x16 is not set
|
||||
# CONFIG_FONT_SUN12x22 is not set
|
||||
# CONFIG_FONT_10x18 is not set
|
||||
# CONFIG_FONT_RL is not set
|
||||
|
||||
#
|
||||
# Logo configuration
|
||||
@ -624,10 +661,10 @@ CONFIG_SOUND=y
|
||||
# Open Sound System
|
||||
#
|
||||
CONFIG_SOUND_PRIME=y
|
||||
# CONFIG_OBSOLETE_OSS_DRIVER is not set
|
||||
# CONFIG_SOUND_MSNDCLAS is not set
|
||||
# CONFIG_SOUND_MSNDPIN is not set
|
||||
# CONFIG_SOUND_OSS is not set
|
||||
# CONFIG_SOUND_AD1980 is not set
|
||||
|
||||
#
|
||||
# USB support
|
||||
@ -636,23 +673,22 @@ CONFIG_USB_ARCH_HAS_HCD=y
|
||||
CONFIG_USB_ARCH_HAS_OHCI=y
|
||||
# CONFIG_USB is not set
|
||||
|
||||
#
|
||||
# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
|
||||
#
|
||||
|
||||
#
|
||||
# USB Gadget Support
|
||||
#
|
||||
CONFIG_USB_GADGET=y
|
||||
# CONFIG_USB_GADGET_DEBUG_FILES is not set
|
||||
CONFIG_USB_GADGET_SELECTED=y
|
||||
# CONFIG_USB_GADGET is not set
|
||||
# CONFIG_USB_GADGET_NET2280 is not set
|
||||
# CONFIG_USB_GADGET_PXA2XX is not set
|
||||
# CONFIG_USB_GADGET_GOKU is not set
|
||||
# CONFIG_USB_GADGET_LH7A40X is not set
|
||||
CONFIG_USB_GADGET_OMAP=y
|
||||
CONFIG_USB_OMAP=y
|
||||
# CONFIG_USB_GADGET_OMAP is not set
|
||||
# CONFIG_USB_GADGET_DUMMY_HCD is not set
|
||||
# CONFIG_USB_GADGET_DUALSPEED is not set
|
||||
# CONFIG_USB_ZERO is not set
|
||||
CONFIG_USB_ETH=y
|
||||
CONFIG_USB_ETH_RNDIS=y
|
||||
# CONFIG_USB_ETH is not set
|
||||
# CONFIG_USB_GADGETFS is not set
|
||||
# CONFIG_USB_FILE_STORAGE is not set
|
||||
# CONFIG_USB_G_SERIAL is not set
|
||||
@ -673,10 +709,6 @@ CONFIG_EXT2_FS=y
|
||||
# CONFIG_REISERFS_FS is not set
|
||||
# CONFIG_JFS_FS is not set
|
||||
# CONFIG_FS_POSIX_ACL is not set
|
||||
|
||||
#
|
||||
# XFS support
|
||||
#
|
||||
# CONFIG_XFS_FS is not set
|
||||
# CONFIG_MINIX_FS is not set
|
||||
CONFIG_ROMFS_FS=y
|
||||
@ -685,6 +717,7 @@ CONFIG_INOTIFY=y
|
||||
CONFIG_DNOTIFY=y
|
||||
# CONFIG_AUTOFS_FS is not set
|
||||
# CONFIG_AUTOFS4_FS is not set
|
||||
# CONFIG_FUSE_FS is not set
|
||||
|
||||
#
|
||||
# CD-ROM/DVD Filesystems
|
||||
@ -706,10 +739,10 @@ CONFIG_FAT_DEFAULT_CODEPAGE=437
|
||||
#
|
||||
CONFIG_PROC_FS=y
|
||||
CONFIG_SYSFS=y
|
||||
# CONFIG_DEVPTS_FS_XATTR is not set
|
||||
# CONFIG_TMPFS is not set
|
||||
# CONFIG_HUGETLB_PAGE is not set
|
||||
CONFIG_RAMFS=y
|
||||
# CONFIG_RELAYFS_FS is not set
|
||||
|
||||
#
|
||||
# Miscellaneous filesystems
|
||||
@ -750,6 +783,7 @@ CONFIG_RPCSEC_GSS_KRB5=y
|
||||
# CONFIG_NCP_FS is not set
|
||||
# CONFIG_CODA_FS is not set
|
||||
# CONFIG_AFS_FS is not set
|
||||
# CONFIG_9P_FS is not set
|
||||
|
||||
#
|
||||
# Partition Types
|
||||
@ -859,6 +893,7 @@ CONFIG_CRYPTO_DES=y
|
||||
# Library routines
|
||||
#
|
||||
# CONFIG_CRC_CCITT is not set
|
||||
# CONFIG_CRC16 is not set
|
||||
CONFIG_CRC32=y
|
||||
# CONFIG_LIBCRC32C is not set
|
||||
CONFIG_ZLIB_INFLATE=y
|
||||
|
@ -9,6 +9,7 @@
|
||||
*/
|
||||
#include <linux/module.h>
|
||||
#include <linux/string.h>
|
||||
#include <linux/cryptohash.h>
|
||||
#include <linux/delay.h>
|
||||
#include <linux/in6.h>
|
||||
#include <linux/syscalls.h>
|
||||
@ -126,6 +127,9 @@ EXPORT_SYMBOL(__put_user_2);
|
||||
EXPORT_SYMBOL(__put_user_4);
|
||||
EXPORT_SYMBOL(__put_user_8);
|
||||
|
||||
/* crypto hash */
|
||||
EXPORT_SYMBOL(sha_transform);
|
||||
|
||||
/* gcc lib functions */
|
||||
EXPORT_SYMBOL(__ashldi3);
|
||||
EXPORT_SYMBOL(__ashrdi3);
|
||||
|
@ -47,6 +47,13 @@
|
||||
movne r0, sp
|
||||
adrne lr, 1b
|
||||
bne do_IPI
|
||||
|
||||
#ifdef CONFIG_LOCAL_TIMERS
|
||||
test_for_ltirq r0, r6, r5, lr
|
||||
movne r0, sp
|
||||
adrne lr, 1b
|
||||
bne do_local_timer
|
||||
#endif
|
||||
#endif
|
||||
|
||||
.endm
|
||||
@ -785,7 +792,7 @@ __kuser_helper_end:
|
||||
* SP points to a minimal amount of processor-private memory, the address
|
||||
* of which is copied into r0 for the mode specific abort handler.
|
||||
*/
|
||||
.macro vector_stub, name, correction=0
|
||||
.macro vector_stub, name, mode, correction=0
|
||||
.align 5
|
||||
|
||||
vector_\name:
|
||||
@ -805,15 +812,14 @@ vector_\name:
|
||||
@ Prepare for SVC32 mode. IRQs remain disabled.
|
||||
@
|
||||
mrs r0, cpsr
|
||||
bic r0, r0, #MODE_MASK
|
||||
orr r0, r0, #SVC_MODE
|
||||
eor r0, r0, #(\mode ^ SVC_MODE)
|
||||
msr spsr_cxsf, r0
|
||||
|
||||
@
|
||||
@ the branch table must immediately follow this code
|
||||
@
|
||||
mov r0, sp
|
||||
and lr, lr, #0x0f
|
||||
mov r0, sp
|
||||
ldr lr, [pc, lr, lsl #2]
|
||||
movs pc, lr @ branch to handler in SVC mode
|
||||
.endm
|
||||
@ -823,7 +829,7 @@ __stubs_start:
|
||||
/*
|
||||
* Interrupt dispatcher
|
||||
*/
|
||||
vector_stub irq, 4
|
||||
vector_stub irq, IRQ_MODE, 4
|
||||
|
||||
.long __irq_usr @ 0 (USR_26 / USR_32)
|
||||
.long __irq_invalid @ 1 (FIQ_26 / FIQ_32)
|
||||
@ -846,7 +852,7 @@ __stubs_start:
|
||||
* Data abort dispatcher
|
||||
* Enter in ABT mode, spsr = USR CPSR, lr = USR PC
|
||||
*/
|
||||
vector_stub dabt, 8
|
||||
vector_stub dabt, ABT_MODE, 8
|
||||
|
||||
.long __dabt_usr @ 0 (USR_26 / USR_32)
|
||||
.long __dabt_invalid @ 1 (FIQ_26 / FIQ_32)
|
||||
@ -869,7 +875,7 @@ __stubs_start:
|
||||
* Prefetch abort dispatcher
|
||||
* Enter in ABT mode, spsr = USR CPSR, lr = USR PC
|
||||
*/
|
||||
vector_stub pabt, 4
|
||||
vector_stub pabt, ABT_MODE, 4
|
||||
|
||||
.long __pabt_usr @ 0 (USR_26 / USR_32)
|
||||
.long __pabt_invalid @ 1 (FIQ_26 / FIQ_32)
|
||||
@ -892,7 +898,7 @@ __stubs_start:
|
||||
* Undef instr entry dispatcher
|
||||
* Enter in UND mode, spsr = SVC/USR CPSR, lr = SVC/USR PC
|
||||
*/
|
||||
vector_stub und
|
||||
vector_stub und, UND_MODE
|
||||
|
||||
.long __und_usr @ 0 (USR_26 / USR_32)
|
||||
.long __und_invalid @ 1 (FIQ_26 / FIQ_32)
|
||||
|
@ -264,6 +264,7 @@ unlock:
|
||||
#endif
|
||||
#ifdef CONFIG_SMP
|
||||
show_ipi_list(p);
|
||||
show_local_irqs(p);
|
||||
#endif
|
||||
seq_printf(p, "Err: %10lu\n", irq_err_count);
|
||||
}
|
||||
@ -995,7 +996,7 @@ void __init init_irq_proc(void)
|
||||
struct proc_dir_entry *dir;
|
||||
int irq;
|
||||
|
||||
dir = proc_mkdir("irq", 0);
|
||||
dir = proc_mkdir("irq", NULL);
|
||||
if (!dir)
|
||||
return;
|
||||
|
||||
|
@ -86,12 +86,16 @@ EXPORT_SYMBOL(pm_power_off);
|
||||
*/
|
||||
void default_idle(void)
|
||||
{
|
||||
local_irq_disable();
|
||||
if (!need_resched() && !hlt_counter) {
|
||||
timer_dyn_reprogram();
|
||||
arch_idle();
|
||||
if (hlt_counter)
|
||||
cpu_relax();
|
||||
else {
|
||||
local_irq_disable();
|
||||
if (!need_resched()) {
|
||||
timer_dyn_reprogram();
|
||||
arch_idle();
|
||||
}
|
||||
local_irq_enable();
|
||||
}
|
||||
local_irq_enable();
|
||||
}
|
||||
|
||||
/*
|
||||
@ -116,13 +120,13 @@ void cpu_idle(void)
|
||||
|
||||
if (!idle)
|
||||
idle = default_idle;
|
||||
preempt_disable();
|
||||
leds_event(led_idle_start);
|
||||
while (!need_resched())
|
||||
idle();
|
||||
leds_event(led_idle_end);
|
||||
preempt_enable();
|
||||
preempt_enable_no_resched();
|
||||
schedule();
|
||||
preempt_disable();
|
||||
}
|
||||
}
|
||||
|
||||
@ -355,7 +359,7 @@ copy_thread(int nr, unsigned long clone_flags, unsigned long stack_start,
|
||||
struct thread_info *thread = p->thread_info;
|
||||
struct pt_regs *childregs;
|
||||
|
||||
childregs = ((struct pt_regs *)((unsigned long)thread + THREAD_START_SP)) - 1;
|
||||
childregs = (void *)thread + THREAD_START_SP - sizeof(*regs);
|
||||
*childregs = *regs;
|
||||
childregs->ARM_r0 = 0;
|
||||
childregs->ARM_sp = stack_start;
|
||||
|
@ -648,7 +648,7 @@ static int ptrace_setwmmxregs(struct task_struct *tsk, void __user *ufp)
|
||||
|
||||
#endif
|
||||
|
||||
static int do_ptrace(int request, struct task_struct *child, long addr, long data)
|
||||
long arch_ptrace(struct task_struct *child, long request, long addr, long data)
|
||||
{
|
||||
unsigned long tmp;
|
||||
int ret;
|
||||
@ -782,53 +782,6 @@ static int do_ptrace(int request, struct task_struct *child, long addr, long dat
|
||||
return ret;
|
||||
}
|
||||
|
||||
asmlinkage long sys_ptrace(long request, long pid, long addr, long data)
|
||||
{
|
||||
struct task_struct *child;
|
||||
int ret;
|
||||
|
||||
lock_kernel();
|
||||
ret = -EPERM;
|
||||
if (request == PTRACE_TRACEME) {
|
||||
/* are we already being traced? */
|
||||
if (current->ptrace & PT_PTRACED)
|
||||
goto out;
|
||||
ret = security_ptrace(current->parent, current);
|
||||
if (ret)
|
||||
goto out;
|
||||
/* set the ptrace bit in the process flags. */
|
||||
current->ptrace |= PT_PTRACED;
|
||||
ret = 0;
|
||||
goto out;
|
||||
}
|
||||
ret = -ESRCH;
|
||||
read_lock(&tasklist_lock);
|
||||
child = find_task_by_pid(pid);
|
||||
if (child)
|
||||
get_task_struct(child);
|
||||
read_unlock(&tasklist_lock);
|
||||
if (!child)
|
||||
goto out;
|
||||
|
||||
ret = -EPERM;
|
||||
if (pid == 1) /* you may not mess with init */
|
||||
goto out_tsk;
|
||||
|
||||
if (request == PTRACE_ATTACH) {
|
||||
ret = ptrace_attach(child);
|
||||
goto out_tsk;
|
||||
}
|
||||
ret = ptrace_check_attach(child, request == PTRACE_KILL);
|
||||
if (ret == 0)
|
||||
ret = do_ptrace(request, child, addr, data);
|
||||
|
||||
out_tsk:
|
||||
put_task_struct(child);
|
||||
out:
|
||||
unlock_kernel();
|
||||
return ret;
|
||||
}
|
||||
|
||||
asmlinkage void syscall_trace(int why, struct pt_regs *regs)
|
||||
{
|
||||
unsigned long ip;
|
||||
|
@ -338,7 +338,8 @@ void cpu_init(void)
|
||||
BUG();
|
||||
}
|
||||
|
||||
dump_cpu_info(cpu);
|
||||
if (system_state == SYSTEM_BOOTING)
|
||||
dump_cpu_info(cpu);
|
||||
|
||||
/*
|
||||
* setup stacks for re-entrant exception handlers
|
||||
@ -838,7 +839,12 @@ static int c_show(struct seq_file *m, void *v)
|
||||
|
||||
#if defined(CONFIG_SMP)
|
||||
for_each_online_cpu(i) {
|
||||
seq_printf(m, "Processor\t: %d\n", i);
|
||||
/*
|
||||
* glibc reads /proc/cpuinfo to determine the number of
|
||||
* online processors, looking for lines beginning with
|
||||
* "processor". Give glibc what it expects.
|
||||
*/
|
||||
seq_printf(m, "processor\t: %d\n", i);
|
||||
seq_printf(m, "BogoMIPS\t: %lu.%02lu\n\n",
|
||||
per_cpu(cpu_data, i).loops_per_jiffy / (500000UL/HZ),
|
||||
(per_cpu(cpu_data, i).loops_per_jiffy / (5000UL/HZ)) % 100);
|
||||
|
@ -142,7 +142,7 @@ int __cpuinit __cpu_up(unsigned int cpu)
|
||||
ret = -EIO;
|
||||
}
|
||||
|
||||
secondary_data.stack = 0;
|
||||
secondary_data.stack = NULL;
|
||||
secondary_data.pgdir = 0;
|
||||
|
||||
*pmd_offset(pgd, PHYS_OFFSET) = __pmd(0);
|
||||
@ -184,6 +184,11 @@ int __cpuexit __cpu_disable(void)
|
||||
*/
|
||||
migrate_irqs();
|
||||
|
||||
/*
|
||||
* Stop the local timer for this CPU.
|
||||
*/
|
||||
local_timer_stop(cpu);
|
||||
|
||||
/*
|
||||
* Flush user cache and TLB mappings, and then remove this CPU
|
||||
* from the vm mask set of all processes.
|
||||
@ -251,7 +256,9 @@ void __cpuexit cpu_die(void)
|
||||
asmlinkage void __cpuinit secondary_start_kernel(void)
|
||||
{
|
||||
struct mm_struct *mm = &init_mm;
|
||||
unsigned int cpu = smp_processor_id();
|
||||
unsigned int cpu;
|
||||
|
||||
cpu = smp_processor_id();
|
||||
|
||||
printk("CPU%u: Booted secondary processor\n", cpu);
|
||||
|
||||
@ -268,6 +275,7 @@ asmlinkage void __cpuinit secondary_start_kernel(void)
|
||||
local_flush_tlb_all();
|
||||
|
||||
cpu_init();
|
||||
preempt_disable();
|
||||
|
||||
/*
|
||||
* Give the platform a chance to do its own initialisation.
|
||||
@ -289,6 +297,11 @@ asmlinkage void __cpuinit secondary_start_kernel(void)
|
||||
*/
|
||||
cpu_set(cpu, cpu_online_map);
|
||||
|
||||
/*
|
||||
* Setup local timer for this CPU.
|
||||
*/
|
||||
local_timer_setup(cpu);
|
||||
|
||||
/*
|
||||
* OK, it's off to the idle thread for us
|
||||
*/
|
||||
@ -359,8 +372,8 @@ static void send_ipi_message(cpumask_t callmap, enum ipi_msg_type msg)
|
||||
* You must not call this function with disabled interrupts, from a
|
||||
* hardware interrupt handler, nor from a bottom half handler.
|
||||
*/
|
||||
int smp_call_function_on_cpu(void (*func)(void *info), void *info, int retry,
|
||||
int wait, cpumask_t callmap)
|
||||
static int smp_call_function_on_cpu(void (*func)(void *info), void *info,
|
||||
int retry, int wait, cpumask_t callmap)
|
||||
{
|
||||
struct smp_call_struct data;
|
||||
unsigned long timeout;
|
||||
@ -454,6 +467,18 @@ void show_ipi_list(struct seq_file *p)
|
||||
seq_putc(p, '\n');
|
||||
}
|
||||
|
||||
void show_local_irqs(struct seq_file *p)
|
||||
{
|
||||
unsigned int cpu;
|
||||
|
||||
seq_printf(p, "LOC: ");
|
||||
|
||||
for_each_present_cpu(cpu)
|
||||
seq_printf(p, "%10u ", irq_stat[cpu].local_timer_irqs);
|
||||
|
||||
seq_putc(p, '\n');
|
||||
}
|
||||
|
||||
static void ipi_timer(struct pt_regs *regs)
|
||||
{
|
||||
int user = user_mode(regs);
|
||||
@ -464,6 +489,18 @@ static void ipi_timer(struct pt_regs *regs)
|
||||
irq_exit();
|
||||
}
|
||||
|
||||
#ifdef CONFIG_LOCAL_TIMERS
|
||||
asmlinkage void do_local_timer(struct pt_regs *regs)
|
||||
{
|
||||
int cpu = smp_processor_id();
|
||||
|
||||
if (local_timer_ack()) {
|
||||
irq_stat[cpu].local_timer_irqs++;
|
||||
ipi_timer(regs);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* ipi_call_function - handle IPI from smp_call_function()
|
||||
*
|
||||
@ -515,7 +552,7 @@ static void ipi_cpu_stop(unsigned int cpu)
|
||||
*
|
||||
* Bit 0 - Inter-processor function call
|
||||
*/
|
||||
void do_IPI(struct pt_regs *regs)
|
||||
asmlinkage void do_IPI(struct pt_regs *regs)
|
||||
{
|
||||
unsigned int cpu = smp_processor_id();
|
||||
struct ipi_data *ipi = &per_cpu(ipi_data, cpu);
|
||||
|
@ -34,7 +34,7 @@
|
||||
and r2, r0, #7
|
||||
mov r3, #1
|
||||
mov r3, r3, lsl r2
|
||||
save_and_disable_irqs ip, r2
|
||||
save_and_disable_irqs ip
|
||||
ldrb r2, [r1, r0, lsr #3]
|
||||
\instr r2, r2, r3
|
||||
strb r2, [r1, r0, lsr #3]
|
||||
@ -54,7 +54,7 @@
|
||||
add r1, r1, r0, lsr #3
|
||||
and r3, r0, #7
|
||||
mov r0, #1
|
||||
save_and_disable_irqs ip, r2
|
||||
save_and_disable_irqs ip
|
||||
ldrb r2, [r1]
|
||||
tst r2, r0, lsl r3
|
||||
\instr r2, r2, r0, lsl r3
|
||||
|
@ -39,6 +39,7 @@ td3 .req lr
|
||||
|
||||
/* we must have at least one byte. */
|
||||
tst buf, #1 @ odd address?
|
||||
movne sum, sum, ror #8
|
||||
ldrneb td0, [buf], #1
|
||||
subne len, len, #1
|
||||
adcnes sum, sum, td0, put_byte_1
|
||||
@ -103,6 +104,9 @@ ENTRY(csum_partial)
|
||||
cmp len, #8 @ Ensure that we have at least
|
||||
blo .less8 @ 8 bytes to copy.
|
||||
|
||||
tst buf, #1
|
||||
movne sum, sum, ror #8
|
||||
|
||||
adds sum, sum, #0 @ C = 0
|
||||
tst buf, #3 @ Test destination alignment
|
||||
blne .not_aligned @ aligh destination, return here
|
||||
|
@ -14,6 +14,7 @@
|
||||
#include <linux/list.h>
|
||||
#include <linux/errno.h>
|
||||
#include <linux/err.h>
|
||||
#include <linux/string.h>
|
||||
|
||||
#include <asm/semaphore.h>
|
||||
#include <asm/hardware/clock.h>
|
||||
|
@ -25,6 +25,7 @@
|
||||
#include <asm/hardware.h>
|
||||
#include <asm/io.h>
|
||||
#include <asm/sizes.h>
|
||||
#include <asm/page.h>
|
||||
|
||||
#include <asm/mach/map.h>
|
||||
|
||||
|
@ -420,8 +420,7 @@ static int impd1_probe(struct lm_device *dev)
|
||||
free_impd1:
|
||||
if (impd1 && impd1->base)
|
||||
iounmap(impd1->base);
|
||||
if (impd1)
|
||||
kfree(impd1);
|
||||
kfree(impd1);
|
||||
release_lm:
|
||||
release_mem_region(dev->resource.start, SZ_4K);
|
||||
return ret;
|
||||
|
@ -84,63 +84,54 @@ static struct map_desc ixp2000_io_desc[] __initdata = {
|
||||
.virtual = IXP2000_CAP_VIRT_BASE,
|
||||
.pfn = __phys_to_pfn(IXP2000_CAP_PHYS_BASE),
|
||||
.length = IXP2000_CAP_SIZE,
|
||||
.type = MT_DEVICE
|
||||
.type = MT_IXP2000_DEVICE,
|
||||
}, {
|
||||
.virtual = IXP2000_INTCTL_VIRT_BASE,
|
||||
.pfn = __phys_to_pfn(IXP2000_INTCTL_PHYS_BASE),
|
||||
.length = IXP2000_INTCTL_SIZE,
|
||||
.type = MT_DEVICE
|
||||
.type = MT_IXP2000_DEVICE,
|
||||
}, {
|
||||
.virtual = IXP2000_PCI_CREG_VIRT_BASE,
|
||||
.pfn = __phys_to_pfn(IXP2000_PCI_CREG_PHYS_BASE),
|
||||
.length = IXP2000_PCI_CREG_SIZE,
|
||||
.type = MT_DEVICE
|
||||
.type = MT_IXP2000_DEVICE,
|
||||
}, {
|
||||
.virtual = IXP2000_PCI_CSR_VIRT_BASE,
|
||||
.pfn = __phys_to_pfn(IXP2000_PCI_CSR_PHYS_BASE),
|
||||
.length = IXP2000_PCI_CSR_SIZE,
|
||||
.type = MT_DEVICE
|
||||
.type = MT_IXP2000_DEVICE,
|
||||
}, {
|
||||
.virtual = IXP2000_MSF_VIRT_BASE,
|
||||
.pfn = __phys_to_pfn(IXP2000_MSF_PHYS_BASE),
|
||||
.length = IXP2000_MSF_SIZE,
|
||||
.type = MT_DEVICE
|
||||
.type = MT_IXP2000_DEVICE,
|
||||
}, {
|
||||
.virtual = IXP2000_PCI_IO_VIRT_BASE,
|
||||
.pfn = __phys_to_pfn(IXP2000_PCI_IO_PHYS_BASE),
|
||||
.length = IXP2000_PCI_IO_SIZE,
|
||||
.type = MT_DEVICE
|
||||
.type = MT_IXP2000_DEVICE,
|
||||
}, {
|
||||
.virtual = IXP2000_PCI_CFG0_VIRT_BASE,
|
||||
.pfn = __phys_to_pfn(IXP2000_PCI_CFG0_PHYS_BASE),
|
||||
.length = IXP2000_PCI_CFG0_SIZE,
|
||||
.type = MT_DEVICE
|
||||
.type = MT_IXP2000_DEVICE,
|
||||
}, {
|
||||
.virtual = IXP2000_PCI_CFG1_VIRT_BASE,
|
||||
.pfn = __phys_to_pfn(IXP2000_PCI_CFG1_PHYS_BASE),
|
||||
.length = IXP2000_PCI_CFG1_SIZE,
|
||||
.type = MT_DEVICE
|
||||
.type = MT_IXP2000_DEVICE,
|
||||
}
|
||||
};
|
||||
|
||||
void __init ixp2000_map_io(void)
|
||||
{
|
||||
extern unsigned int processor_id;
|
||||
|
||||
/*
|
||||
* On IXP2400 CPUs we need to use MT_IXP2000_DEVICE for
|
||||
* tweaking the PMDs so XCB=101. On IXP2800s we use the normal
|
||||
* PMD flags.
|
||||
* On IXP2400 CPUs we need to use MT_IXP2000_DEVICE so that
|
||||
* XCB=101 (to avoid triggering erratum #66), and given that
|
||||
* this mode speeds up I/O accesses and we have write buffer
|
||||
* flushes in the right places anyway, it doesn't hurt to use
|
||||
* XCB=101 for all IXP2000s.
|
||||
*/
|
||||
if ((processor_id & 0xfffffff0) == 0x69054190) {
|
||||
int i;
|
||||
|
||||
printk(KERN_INFO "Enabling IXP2400 erratum #66 workaround\n");
|
||||
|
||||
for(i=0;i<ARRAY_SIZE(ixp2000_io_desc);i++)
|
||||
ixp2000_io_desc[i].type = MT_IXP2000_DEVICE;
|
||||
}
|
||||
|
||||
iotable_init(ixp2000_io_desc, ARRAY_SIZE(ixp2000_io_desc));
|
||||
|
||||
/* Set slowport to 8-bit mode. */
|
||||
|
@ -91,8 +91,8 @@ EXPORT_SYMBOL(ixp2000_uengine_csr_write);
|
||||
|
||||
void ixp2000_uengine_reset(u32 uengine_mask)
|
||||
{
|
||||
ixp2000_reg_write(IXP2000_RESET1, uengine_mask & ixp2000_uengine_mask);
|
||||
ixp2000_reg_write(IXP2000_RESET1, 0);
|
||||
ixp2000_reg_wrb(IXP2000_RESET1, uengine_mask & ixp2000_uengine_mask);
|
||||
ixp2000_reg_wrb(IXP2000_RESET1, 0);
|
||||
}
|
||||
EXPORT_SYMBOL(ixp2000_uengine_reset);
|
||||
|
||||
@ -452,21 +452,20 @@ static int __init ixp2000_uengine_init(void)
|
||||
/*
|
||||
* Reset microengines.
|
||||
*/
|
||||
ixp2000_reg_write(IXP2000_RESET1, ixp2000_uengine_mask);
|
||||
ixp2000_reg_write(IXP2000_RESET1, 0);
|
||||
ixp2000_uengine_reset(ixp2000_uengine_mask);
|
||||
|
||||
/*
|
||||
* Synchronise timestamp counters across all microengines.
|
||||
*/
|
||||
value = ixp2000_reg_read(IXP2000_MISC_CONTROL);
|
||||
ixp2000_reg_write(IXP2000_MISC_CONTROL, value & ~0x80);
|
||||
ixp2000_reg_wrb(IXP2000_MISC_CONTROL, value & ~0x80);
|
||||
for (uengine = 0; uengine < 32; uengine++) {
|
||||
if (ixp2000_uengine_mask & (1 << uengine)) {
|
||||
ixp2000_uengine_csr_write(uengine, TIMESTAMP_LOW, 0);
|
||||
ixp2000_uengine_csr_write(uengine, TIMESTAMP_HIGH, 0);
|
||||
}
|
||||
}
|
||||
ixp2000_reg_write(IXP2000_MISC_CONTROL, value | 0x80);
|
||||
ixp2000_reg_wrb(IXP2000_MISC_CONTROL, value | 0x80);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -8,6 +8,16 @@ menu "Intel IXP4xx Implementation Options"
|
||||
|
||||
comment "IXP4xx Platforms"
|
||||
|
||||
# This entry is placed on top because otherwise it would have
|
||||
# been shown as a submenu.
|
||||
config MACH_NSLU2
|
||||
bool
|
||||
prompt "NSLU2" if !(MACH_IXDP465 || MACH_IXDPG425 || ARCH_IXDP425 || ARCH_ADI_COYOTE || ARCH_AVILA || ARCH_IXCDP1100 || ARCH_PRPMC1100 || MACH_GTWX5715)
|
||||
help
|
||||
Say 'Y' here if you want your kernel to support Linksys's
|
||||
NSLU2 NAS device. For more information on this platform,
|
||||
see http://www.nslu2-linux.org
|
||||
|
||||
config ARCH_AVILA
|
||||
bool "Avila"
|
||||
help
|
||||
|
@ -8,4 +8,5 @@ obj-$(CONFIG_ARCH_IXDP4XX) += ixdp425-pci.o ixdp425-setup.o
|
||||
obj-$(CONFIG_MACH_IXDPG425) += ixdpg425-pci.o coyote-setup.o
|
||||
obj-$(CONFIG_ARCH_ADI_COYOTE) += coyote-pci.o coyote-setup.o
|
||||
obj-$(CONFIG_MACH_GTWX5715) += gtwx5715-pci.o gtwx5715-setup.o
|
||||
obj-$(CONFIG_MACH_NSLU2) += nslu2-pci.o nslu2-setup.o nslu2-power.o
|
||||
|
||||
|
@ -427,7 +427,7 @@ void __init ixp4xx_pci_preinit(void)
|
||||
#ifdef __ARMEB__
|
||||
*PCI_CSR = PCI_CSR_IC | PCI_CSR_ABE | PCI_CSR_PDS | PCI_CSR_ADS;
|
||||
#else
|
||||
*PCI_CSR = PCI_CSR_IC;
|
||||
*PCI_CSR = PCI_CSR_IC | PCI_CSR_ABE;
|
||||
#endif
|
||||
|
||||
pr_debug("DONE\n");
|
||||
|
77
arch/arm/mach-ixp4xx/nslu2-pci.c
Normal file
77
arch/arm/mach-ixp4xx/nslu2-pci.c
Normal file
@ -0,0 +1,77 @@
|
||||
/*
|
||||
* arch/arm/mach-ixp4xx/nslu2-pci.c
|
||||
*
|
||||
* NSLU2 board-level PCI initialization
|
||||
*
|
||||
* based on ixdp425-pci.c:
|
||||
* Copyright (C) 2002 Intel Corporation.
|
||||
* Copyright (C) 2003-2004 MontaVista Software, Inc.
|
||||
*
|
||||
* Maintainer: http://www.nslu2-linux.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/config.h>
|
||||
#include <linux/pci.h>
|
||||
#include <linux/init.h>
|
||||
|
||||
#include <asm/mach/pci.h>
|
||||
#include <asm/mach-types.h>
|
||||
|
||||
void __init nslu2_pci_preinit(void)
|
||||
{
|
||||
set_irq_type(IRQ_NSLU2_PCI_INTA, IRQT_LOW);
|
||||
set_irq_type(IRQ_NSLU2_PCI_INTB, IRQT_LOW);
|
||||
set_irq_type(IRQ_NSLU2_PCI_INTC, IRQT_LOW);
|
||||
|
||||
gpio_line_isr_clear(NSLU2_PCI_INTA_PIN);
|
||||
gpio_line_isr_clear(NSLU2_PCI_INTB_PIN);
|
||||
gpio_line_isr_clear(NSLU2_PCI_INTC_PIN);
|
||||
|
||||
/* INTD is not configured as GPIO is used
|
||||
* for the power input button.
|
||||
*/
|
||||
|
||||
ixp4xx_pci_preinit();
|
||||
}
|
||||
|
||||
static int __init nslu2_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
|
||||
{
|
||||
static int pci_irq_table[NSLU2_PCI_IRQ_LINES] = {
|
||||
IRQ_NSLU2_PCI_INTA,
|
||||
IRQ_NSLU2_PCI_INTB,
|
||||
IRQ_NSLU2_PCI_INTC,
|
||||
};
|
||||
|
||||
int irq = -1;
|
||||
|
||||
if (slot >= 1 && slot <= NSLU2_PCI_MAX_DEV &&
|
||||
pin >= 1 && pin <= NSLU2_PCI_IRQ_LINES) {
|
||||
irq = pci_irq_table[(slot + pin - 2) % NSLU2_PCI_IRQ_LINES];
|
||||
}
|
||||
|
||||
return irq;
|
||||
}
|
||||
|
||||
struct hw_pci __initdata nslu2_pci = {
|
||||
.nr_controllers = 1,
|
||||
.preinit = nslu2_pci_preinit,
|
||||
.swizzle = pci_std_swizzle,
|
||||
.setup = ixp4xx_setup,
|
||||
.scan = ixp4xx_scan_bus,
|
||||
.map_irq = nslu2_map_irq,
|
||||
};
|
||||
|
||||
int __init nslu2_pci_init(void) /* monkey see, monkey do */
|
||||
{
|
||||
if (machine_is_nslu2())
|
||||
pci_common_init(&nslu2_pci);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
subsys_initcall(nslu2_pci_init);
|
92
arch/arm/mach-ixp4xx/nslu2-power.c
Normal file
92
arch/arm/mach-ixp4xx/nslu2-power.c
Normal file
@ -0,0 +1,92 @@
|
||||
/*
|
||||
* arch/arm/mach-ixp4xx/nslu2-power.c
|
||||
*
|
||||
* NSLU2 Power/Reset driver
|
||||
*
|
||||
* Copyright (C) 2005 Tower Technologies
|
||||
*
|
||||
* based on nslu2-io.c
|
||||
* Copyright (C) 2004 Karen Spearel
|
||||
*
|
||||
* Author: Alessandro Zummo <a.zummo@towertech.it>
|
||||
* Maintainers: http://www.nslu2-linux.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/module.h>
|
||||
#include <linux/reboot.h>
|
||||
#include <linux/interrupt.h>
|
||||
|
||||
#include <asm/mach-types.h>
|
||||
|
||||
extern void ctrl_alt_del(void);
|
||||
|
||||
static irqreturn_t nslu2_power_handler(int irq, void *dev_id, struct pt_regs *regs)
|
||||
{
|
||||
/* Signal init to do the ctrlaltdel action, this will bypass init if
|
||||
* it hasn't started and do a kernel_restart.
|
||||
*/
|
||||
ctrl_alt_del();
|
||||
|
||||
return IRQ_HANDLED;
|
||||
}
|
||||
|
||||
static irqreturn_t nslu2_reset_handler(int irq, void *dev_id, struct pt_regs *regs)
|
||||
{
|
||||
/* This is the paper-clip reset, it shuts the machine down directly.
|
||||
*/
|
||||
machine_power_off();
|
||||
|
||||
return IRQ_HANDLED;
|
||||
}
|
||||
|
||||
static int __init nslu2_power_init(void)
|
||||
{
|
||||
if (!(machine_is_nslu2()))
|
||||
return 0;
|
||||
|
||||
*IXP4XX_GPIO_GPISR = 0x20400000; /* read the 2 irqs to clr */
|
||||
|
||||
set_irq_type(NSLU2_RB_IRQ, IRQT_LOW);
|
||||
set_irq_type(NSLU2_PB_IRQ, IRQT_HIGH);
|
||||
|
||||
gpio_line_isr_clear(NSLU2_RB_GPIO);
|
||||
gpio_line_isr_clear(NSLU2_PB_GPIO);
|
||||
|
||||
if (request_irq(NSLU2_RB_IRQ, &nslu2_reset_handler,
|
||||
SA_INTERRUPT, "NSLU2 reset button", NULL) < 0) {
|
||||
|
||||
printk(KERN_DEBUG "Reset Button IRQ %d not available\n",
|
||||
NSLU2_RB_IRQ);
|
||||
|
||||
return -EIO;
|
||||
}
|
||||
|
||||
if (request_irq(NSLU2_PB_IRQ, &nslu2_power_handler,
|
||||
SA_INTERRUPT, "NSLU2 power button", NULL) < 0) {
|
||||
|
||||
printk(KERN_DEBUG "Power Button IRQ %d not available\n",
|
||||
NSLU2_PB_IRQ);
|
||||
|
||||
return -EIO;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void __exit nslu2_power_exit(void)
|
||||
{
|
||||
free_irq(NSLU2_RB_IRQ, NULL);
|
||||
free_irq(NSLU2_PB_IRQ, NULL);
|
||||
}
|
||||
|
||||
module_init(nslu2_power_init);
|
||||
module_exit(nslu2_power_exit);
|
||||
|
||||
MODULE_AUTHOR("Alessandro Zummo <a.zummo@towertech.it>");
|
||||
MODULE_DESCRIPTION("NSLU2 Power/Reset driver");
|
||||
MODULE_LICENSE("GPL");
|
134
arch/arm/mach-ixp4xx/nslu2-setup.c
Normal file
134
arch/arm/mach-ixp4xx/nslu2-setup.c
Normal file
@ -0,0 +1,134 @@
|
||||
/*
|
||||
* arch/arm/mach-ixp4xx/nslu2-setup.c
|
||||
*
|
||||
* NSLU2 board-setup
|
||||
*
|
||||
* based ixdp425-setup.c:
|
||||
* Copyright (C) 2003-2004 MontaVista Software, Inc.
|
||||
*
|
||||
* Author: Mark Rakes <mrakes at mac.com>
|
||||
* Maintainers: http://www.nslu2-linux.org/
|
||||
*
|
||||
* Fixed missing init_time in MACHINE_START kas11 10/22/04
|
||||
* Changed to conform to new style __init ixdp425 kas11 10/22/04
|
||||
*/
|
||||
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/serial.h>
|
||||
#include <linux/serial_8250.h>
|
||||
|
||||
#include <asm/mach-types.h>
|
||||
#include <asm/mach/arch.h>
|
||||
#include <asm/mach/flash.h>
|
||||
|
||||
static struct flash_platform_data nslu2_flash_data = {
|
||||
.map_name = "cfi_probe",
|
||||
.width = 2,
|
||||
};
|
||||
|
||||
static struct resource nslu2_flash_resource = {
|
||||
.start = NSLU2_FLASH_BASE,
|
||||
.end = NSLU2_FLASH_BASE + NSLU2_FLASH_SIZE,
|
||||
.flags = IORESOURCE_MEM,
|
||||
};
|
||||
|
||||
static struct platform_device nslu2_flash = {
|
||||
.name = "IXP4XX-Flash",
|
||||
.id = 0,
|
||||
.dev.platform_data = &nslu2_flash_data,
|
||||
.num_resources = 1,
|
||||
.resource = &nslu2_flash_resource,
|
||||
};
|
||||
|
||||
static struct ixp4xx_i2c_pins nslu2_i2c_gpio_pins = {
|
||||
.sda_pin = NSLU2_SDA_PIN,
|
||||
.scl_pin = NSLU2_SCL_PIN,
|
||||
};
|
||||
|
||||
static struct platform_device nslu2_i2c_controller = {
|
||||
.name = "IXP4XX-I2C",
|
||||
.id = 0,
|
||||
.dev.platform_data = &nslu2_i2c_gpio_pins,
|
||||
.num_resources = 0,
|
||||
};
|
||||
|
||||
static struct resource nslu2_uart_resources[] = {
|
||||
{
|
||||
.start = IXP4XX_UART1_BASE_PHYS,
|
||||
.end = IXP4XX_UART1_BASE_PHYS + 0x0fff,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
{
|
||||
.start = IXP4XX_UART2_BASE_PHYS,
|
||||
.end = IXP4XX_UART2_BASE_PHYS + 0x0fff,
|
||||
.flags = IORESOURCE_MEM,
|
||||
}
|
||||
};
|
||||
|
||||
static struct plat_serial8250_port nslu2_uart_data[] = {
|
||||
{
|
||||
.mapbase = IXP4XX_UART1_BASE_PHYS,
|
||||
.membase = (char *)IXP4XX_UART1_BASE_VIRT + REG_OFFSET,
|
||||
.irq = IRQ_IXP4XX_UART1,
|
||||
.flags = UPF_BOOT_AUTOCONF,
|
||||
.iotype = UPIO_MEM,
|
||||
.regshift = 2,
|
||||
.uartclk = IXP4XX_UART_XTAL,
|
||||
},
|
||||
{
|
||||
.mapbase = IXP4XX_UART2_BASE_PHYS,
|
||||
.membase = (char *)IXP4XX_UART2_BASE_VIRT + REG_OFFSET,
|
||||
.irq = IRQ_IXP4XX_UART2,
|
||||
.flags = UPF_BOOT_AUTOCONF,
|
||||
.iotype = UPIO_MEM,
|
||||
.regshift = 2,
|
||||
.uartclk = IXP4XX_UART_XTAL,
|
||||
},
|
||||
{ }
|
||||
};
|
||||
|
||||
static struct platform_device nslu2_uart = {
|
||||
.name = "serial8250",
|
||||
.id = PLAT8250_DEV_PLATFORM,
|
||||
.dev.platform_data = nslu2_uart_data,
|
||||
.num_resources = 2,
|
||||
.resource = nslu2_uart_resources,
|
||||
};
|
||||
|
||||
static struct platform_device *nslu2_devices[] __initdata = {
|
||||
&nslu2_i2c_controller,
|
||||
&nslu2_flash,
|
||||
&nslu2_uart,
|
||||
};
|
||||
|
||||
static void nslu2_power_off(void)
|
||||
{
|
||||
/* This causes the box to drop the power and go dead. */
|
||||
|
||||
/* enable the pwr cntl gpio */
|
||||
gpio_line_config(NSLU2_PO_GPIO, IXP4XX_GPIO_OUT);
|
||||
|
||||
/* do the deed */
|
||||
gpio_line_set(NSLU2_PO_GPIO, IXP4XX_GPIO_HIGH);
|
||||
}
|
||||
|
||||
static void __init nslu2_init(void)
|
||||
{
|
||||
ixp4xx_sys_init();
|
||||
|
||||
pm_power_off = nslu2_power_off;
|
||||
|
||||
platform_add_devices(nslu2_devices, ARRAY_SIZE(nslu2_devices));
|
||||
}
|
||||
|
||||
MACHINE_START(NSLU2, "Linksys NSLU2")
|
||||
/* Maintainer: www.nslu2-linux.org */
|
||||
.phys_ram = PHYS_OFFSET,
|
||||
.phys_io = IXP4XX_PERIPHERAL_BASE_PHYS,
|
||||
.io_pg_offst = ((IXP4XX_PERIPHERAL_BASE_VIRT) >> 18) & 0xFFFC,
|
||||
.boot_params = 0x00000100,
|
||||
.map_io = ixp4xx_map_io,
|
||||
.init_irq = ixp4xx_init_irq,
|
||||
.timer = &ixp4xx_timer,
|
||||
.init_machine = nslu2_init,
|
||||
MACHINE_END
|
@ -6,10 +6,10 @@ config ARCH_OMAP730
|
||||
bool "OMAP730 Based System"
|
||||
select ARCH_OMAP_OTG
|
||||
|
||||
config ARCH_OMAP1510
|
||||
config ARCH_OMAP15XX
|
||||
depends on ARCH_OMAP1
|
||||
default y
|
||||
bool "OMAP1510 Based System"
|
||||
bool "OMAP15xx Based System"
|
||||
|
||||
config ARCH_OMAP16XX
|
||||
depends on ARCH_OMAP1
|
||||
@ -21,7 +21,7 @@ comment "OMAP Board Type"
|
||||
|
||||
config MACH_OMAP_INNOVATOR
|
||||
bool "TI Innovator"
|
||||
depends on ARCH_OMAP1 && (ARCH_OMAP1510 || ARCH_OMAP16XX)
|
||||
depends on ARCH_OMAP1 && (ARCH_OMAP15XX || ARCH_OMAP16XX)
|
||||
help
|
||||
TI OMAP 1510 or 1610 Innovator board support. Say Y here if you
|
||||
have such a board.
|
||||
@ -64,20 +64,30 @@ config MACH_OMAP_PERSEUS2
|
||||
|
||||
config MACH_VOICEBLUE
|
||||
bool "Voiceblue"
|
||||
depends on ARCH_OMAP1 && ARCH_OMAP1510
|
||||
depends on ARCH_OMAP1 && ARCH_OMAP15XX
|
||||
help
|
||||
Support for Voiceblue GSM/VoIP gateway. Say Y here if you have
|
||||
such a board.
|
||||
|
||||
config MACH_NETSTAR
|
||||
bool "NetStar"
|
||||
depends on ARCH_OMAP1 && ARCH_OMAP1510
|
||||
depends on ARCH_OMAP1 && ARCH_OMAP15XX
|
||||
help
|
||||
Support for NetStar PBX. Say Y here if you have such a board.
|
||||
|
||||
config MACH_OMAP_PALMTE
|
||||
bool "Palm Tungsten E"
|
||||
depends on ARCH_OMAP1 && ARCH_OMAP15XX
|
||||
help
|
||||
Support for the Palm Tungsten E PDA. Currently only the LCD panel
|
||||
is supported. To boot the kernel, you'll need a PalmOS compatible
|
||||
bootloader; check out http://palmtelinux.sourceforge.net for more
|
||||
informations.
|
||||
Say Y here if you have such a PDA, say NO otherwise.
|
||||
|
||||
config MACH_OMAP_GENERIC
|
||||
bool "Generic OMAP board"
|
||||
depends on ARCH_OMAP1 && (ARCH_OMAP1510 || ARCH_OMAP16XX)
|
||||
depends on ARCH_OMAP1 && (ARCH_OMAP15XX || ARCH_OMAP16XX)
|
||||
help
|
||||
Support for generic OMAP-1510, 1610 or 1710 board with
|
||||
no FPGA. Can be used as template for porting Linux to
|
||||
@ -121,32 +131,32 @@ config OMAP_ARM_182MHZ
|
||||
|
||||
config OMAP_ARM_168MHZ
|
||||
bool "OMAP ARM 168 MHz CPU"
|
||||
depends on ARCH_OMAP1 && (ARCH_OMAP1510 || ARCH_OMAP16XX || ARCH_OMAP730)
|
||||
depends on ARCH_OMAP1 && (ARCH_OMAP15XX || ARCH_OMAP16XX || ARCH_OMAP730)
|
||||
help
|
||||
Enable 168MHz clock for OMAP CPU. If unsure, say N.
|
||||
|
||||
config OMAP_ARM_150MHZ
|
||||
bool "OMAP ARM 150 MHz CPU"
|
||||
depends on ARCH_OMAP1 && ARCH_OMAP1510
|
||||
depends on ARCH_OMAP1 && ARCH_OMAP15XX
|
||||
help
|
||||
Enable 150MHz clock for OMAP CPU. If unsure, say N.
|
||||
|
||||
config OMAP_ARM_120MHZ
|
||||
bool "OMAP ARM 120 MHz CPU"
|
||||
depends on ARCH_OMAP1 && (ARCH_OMAP1510 || ARCH_OMAP16XX || ARCH_OMAP730)
|
||||
depends on ARCH_OMAP1 && (ARCH_OMAP15XX || ARCH_OMAP16XX || ARCH_OMAP730)
|
||||
help
|
||||
Enable 120MHz clock for OMAP CPU. If unsure, say N.
|
||||
|
||||
config OMAP_ARM_60MHZ
|
||||
bool "OMAP ARM 60 MHz CPU"
|
||||
depends on ARCH_OMAP1 && (ARCH_OMAP1510 || ARCH_OMAP16XX || ARCH_OMAP730)
|
||||
depends on ARCH_OMAP1 && (ARCH_OMAP15XX || ARCH_OMAP16XX || ARCH_OMAP730)
|
||||
default y
|
||||
help
|
||||
Enable 60MHz clock for OMAP CPU. If unsure, say Y.
|
||||
|
||||
config OMAP_ARM_30MHZ
|
||||
bool "OMAP ARM 30 MHz CPU"
|
||||
depends on ARCH_OMAP1 && (ARCH_OMAP1510 || ARCH_OMAP16XX || ARCH_OMAP730)
|
||||
depends on ARCH_OMAP1 && (ARCH_OMAP15XX || ARCH_OMAP16XX || ARCH_OMAP730)
|
||||
help
|
||||
Enable 30MHz clock for OMAP CPU. If unsure, say N.
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
#
|
||||
|
||||
# Common support
|
||||
obj-y := io.o id.o irq.o time.o serial.o devices.o
|
||||
obj-y := io.o id.o clock.o irq.o time.o mux.o serial.o devices.o
|
||||
led-y := leds.o
|
||||
|
||||
# Specific board support
|
||||
@ -15,8 +15,9 @@ obj-$(CONFIG_MACH_OMAP_OSK) += board-osk.o
|
||||
obj-$(CONFIG_MACH_OMAP_H3) += board-h3.o
|
||||
obj-$(CONFIG_MACH_VOICEBLUE) += board-voiceblue.o
|
||||
obj-$(CONFIG_MACH_NETSTAR) += board-netstar.o
|
||||
obj-$(CONFIG_MACH_OMAP_PALMTE) += board-palmte.o
|
||||
|
||||
ifeq ($(CONFIG_ARCH_OMAP1510),y)
|
||||
ifeq ($(CONFIG_ARCH_OMAP15XX),y)
|
||||
# Innovator-1510 FPGA
|
||||
obj-$(CONFIG_MACH_OMAP_INNOVATOR) += fpga.o
|
||||
endif
|
||||
|
@ -15,7 +15,7 @@
|
||||
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/device.h>
|
||||
#include <linux/platform_device.h>
|
||||
|
||||
#include <asm/hardware.h>
|
||||
#include <asm/mach-types.h>
|
||||
@ -28,8 +28,6 @@
|
||||
#include <asm/arch/board.h>
|
||||
#include <asm/arch/common.h>
|
||||
|
||||
static int __initdata generic_serial_ports[OMAP_MAX_NR_PORTS] = {1, 1, 1};
|
||||
|
||||
static void __init omap_generic_init_irq(void)
|
||||
{
|
||||
omap_init_irq();
|
||||
@ -37,7 +35,7 @@ static void __init omap_generic_init_irq(void)
|
||||
|
||||
/* assume no Mini-AB port */
|
||||
|
||||
#ifdef CONFIG_ARCH_OMAP1510
|
||||
#ifdef CONFIG_ARCH_OMAP15XX
|
||||
static struct omap_usb_config generic1510_usb_config __initdata = {
|
||||
.register_host = 1,
|
||||
.register_dev = 1,
|
||||
@ -76,21 +74,19 @@ static struct omap_mmc_config generic_mmc_config __initdata = {
|
||||
|
||||
#endif
|
||||
|
||||
static struct omap_uart_config generic_uart_config __initdata = {
|
||||
.enabled_uarts = ((1 << 0) | (1 << 1) | (1 << 2)),
|
||||
};
|
||||
|
||||
static struct omap_board_config_kernel generic_config[] = {
|
||||
{ OMAP_TAG_USB, NULL },
|
||||
{ OMAP_TAG_MMC, &generic_mmc_config },
|
||||
{ OMAP_TAG_UART, &generic_uart_config },
|
||||
};
|
||||
|
||||
static void __init omap_generic_init(void)
|
||||
{
|
||||
const struct omap_uart_config *uart_conf;
|
||||
|
||||
/*
|
||||
* Make sure the serial ports are muxed on at this point.
|
||||
* You have to mux them off in device drivers later on
|
||||
* if not needed.
|
||||
*/
|
||||
#ifdef CONFIG_ARCH_OMAP1510
|
||||
#ifdef CONFIG_ARCH_OMAP15XX
|
||||
if (cpu_is_omap1510()) {
|
||||
generic_config[0].data = &generic1510_usb_config;
|
||||
}
|
||||
@ -101,20 +97,9 @@ static void __init omap_generic_init(void)
|
||||
}
|
||||
#endif
|
||||
|
||||
uart_conf = omap_get_config(OMAP_TAG_UART, struct omap_uart_config);
|
||||
if (uart_conf != NULL) {
|
||||
unsigned int enabled_ports, i;
|
||||
|
||||
enabled_ports = uart_conf->enabled_uarts;
|
||||
for (i = 0; i < 3; i++) {
|
||||
if (!(enabled_ports & (1 << i)))
|
||||
generic_serial_ports[i] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
omap_board_config = generic_config;
|
||||
omap_board_config_size = ARRAY_SIZE(generic_config);
|
||||
omap_serial_init(generic_serial_ports);
|
||||
omap_serial_init();
|
||||
}
|
||||
|
||||
static void __init omap_generic_map_io(void)
|
||||
|
@ -40,8 +40,6 @@
|
||||
|
||||
extern int omap_gpio_init(void);
|
||||
|
||||
static int __initdata h2_serial_ports[OMAP_MAX_NR_PORTS] = {1, 1, 1};
|
||||
|
||||
static struct mtd_partition h2_partitions[] = {
|
||||
/* bootloader (U-Boot, etc) in first sector */
|
||||
{
|
||||
@ -160,9 +158,20 @@ static struct omap_mmc_config h2_mmc_config __initdata = {
|
||||
},
|
||||
};
|
||||
|
||||
static struct omap_uart_config h2_uart_config __initdata = {
|
||||
.enabled_uarts = ((1 << 0) | (1 << 1) | (1 << 2)),
|
||||
};
|
||||
|
||||
static struct omap_lcd_config h2_lcd_config __initdata = {
|
||||
.panel_name = "h2",
|
||||
.ctrl_name = "internal",
|
||||
};
|
||||
|
||||
static struct omap_board_config_kernel h2_config[] = {
|
||||
{ OMAP_TAG_USB, &h2_usb_config },
|
||||
{ OMAP_TAG_MMC, &h2_mmc_config },
|
||||
{ OMAP_TAG_UART, &h2_uart_config },
|
||||
{ OMAP_TAG_LCD, &h2_lcd_config },
|
||||
};
|
||||
|
||||
static void __init h2_init(void)
|
||||
@ -180,12 +189,12 @@ static void __init h2_init(void)
|
||||
platform_add_devices(h2_devices, ARRAY_SIZE(h2_devices));
|
||||
omap_board_config = h2_config;
|
||||
omap_board_config_size = ARRAY_SIZE(h2_config);
|
||||
omap_serial_init();
|
||||
}
|
||||
|
||||
static void __init h2_map_io(void)
|
||||
{
|
||||
omap_map_common_io();
|
||||
omap_serial_init(h2_serial_ports);
|
||||
}
|
||||
|
||||
MACHINE_START(OMAP_H2, "TI-H2")
|
||||
|
@ -41,8 +41,6 @@
|
||||
|
||||
extern int omap_gpio_init(void);
|
||||
|
||||
static int __initdata h3_serial_ports[OMAP_MAX_NR_PORTS] = {1, 1, 1};
|
||||
|
||||
static struct mtd_partition h3_partitions[] = {
|
||||
/* bootloader (U-Boot, etc) in first sector */
|
||||
{
|
||||
@ -168,9 +166,20 @@ static struct omap_mmc_config h3_mmc_config __initdata = {
|
||||
},
|
||||
};
|
||||
|
||||
static struct omap_uart_config h3_uart_config __initdata = {
|
||||
.enabled_uarts = ((1 << 0) | (1 << 1) | (1 << 2)),
|
||||
};
|
||||
|
||||
static struct omap_lcd_config h3_lcd_config __initdata = {
|
||||
.panel_name = "h3",
|
||||
.ctrl_name = "internal",
|
||||
};
|
||||
|
||||
static struct omap_board_config_kernel h3_config[] = {
|
||||
{ OMAP_TAG_USB, &h3_usb_config },
|
||||
{ OMAP_TAG_MMC, &h3_mmc_config },
|
||||
{ OMAP_TAG_USB, &h3_usb_config },
|
||||
{ OMAP_TAG_MMC, &h3_mmc_config },
|
||||
{ OMAP_TAG_UART, &h3_uart_config },
|
||||
{ OMAP_TAG_LCD, &h3_lcd_config },
|
||||
};
|
||||
|
||||
static void __init h3_init(void)
|
||||
@ -180,6 +189,7 @@ static void __init h3_init(void)
|
||||
(void) platform_add_devices(devices, ARRAY_SIZE(devices));
|
||||
omap_board_config = h3_config;
|
||||
omap_board_config_size = ARRAY_SIZE(h3_config);
|
||||
omap_serial_init();
|
||||
}
|
||||
|
||||
static void __init h3_init_smc91x(void)
|
||||
@ -201,7 +211,6 @@ void h3_init_irq(void)
|
||||
static void __init h3_map_io(void)
|
||||
{
|
||||
omap_map_common_io();
|
||||
omap_serial_init(h3_serial_ports);
|
||||
}
|
||||
|
||||
MACHINE_START(OMAP_H3, "TI OMAP1710 H3 board")
|
||||
|
@ -36,8 +36,6 @@
|
||||
#include <asm/arch/usb.h>
|
||||
#include <asm/arch/common.h>
|
||||
|
||||
static int __initdata innovator_serial_ports[OMAP_MAX_NR_PORTS] = {1, 1, 1};
|
||||
|
||||
static struct mtd_partition innovator_partitions[] = {
|
||||
/* bootloader (U-Boot, etc) in first sector */
|
||||
{
|
||||
@ -99,7 +97,7 @@ static struct platform_device innovator_flash_device = {
|
||||
.resource = &innovator_flash_resource,
|
||||
};
|
||||
|
||||
#ifdef CONFIG_ARCH_OMAP1510
|
||||
#ifdef CONFIG_ARCH_OMAP15XX
|
||||
|
||||
/* Only FPGA needs to be mapped here. All others are done with ioremap */
|
||||
static struct map_desc innovator1510_io_desc[] __initdata = {
|
||||
@ -136,7 +134,7 @@ static struct platform_device *innovator1510_devices[] __initdata = {
|
||||
&innovator1510_smc91x_device,
|
||||
};
|
||||
|
||||
#endif /* CONFIG_ARCH_OMAP1510 */
|
||||
#endif /* CONFIG_ARCH_OMAP15XX */
|
||||
|
||||
#ifdef CONFIG_ARCH_OMAP16XX
|
||||
|
||||
@ -185,7 +183,7 @@ void innovator_init_irq(void)
|
||||
{
|
||||
omap_init_irq();
|
||||
omap_gpio_init();
|
||||
#ifdef CONFIG_ARCH_OMAP1510
|
||||
#ifdef CONFIG_ARCH_OMAP15XX
|
||||
if (cpu_is_omap1510()) {
|
||||
omap1510_fpga_init_irq();
|
||||
}
|
||||
@ -193,7 +191,7 @@ void innovator_init_irq(void)
|
||||
innovator_init_smc91x();
|
||||
}
|
||||
|
||||
#ifdef CONFIG_ARCH_OMAP1510
|
||||
#ifdef CONFIG_ARCH_OMAP15XX
|
||||
static struct omap_usb_config innovator1510_usb_config __initdata = {
|
||||
/* for bundled non-standard host and peripheral cables */
|
||||
.hmc_mode = 4,
|
||||
@ -205,6 +203,11 @@ static struct omap_usb_config innovator1510_usb_config __initdata = {
|
||||
.register_dev = 1,
|
||||
.pins[0] = 2,
|
||||
};
|
||||
|
||||
static struct omap_lcd_config innovator1510_lcd_config __initdata = {
|
||||
.panel_name = "inn1510",
|
||||
.ctrl_name = "internal",
|
||||
};
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ARCH_OMAP16XX
|
||||
@ -222,6 +225,11 @@ static struct omap_usb_config h2_usb_config __initdata = {
|
||||
|
||||
.pins[1] = 3,
|
||||
};
|
||||
|
||||
static struct omap_lcd_config innovator1610_lcd_config __initdata = {
|
||||
.panel_name = "inn1610",
|
||||
.ctrl_name = "internal",
|
||||
};
|
||||
#endif
|
||||
|
||||
static struct omap_mmc_config innovator_mmc_config __initdata = {
|
||||
@ -234,14 +242,20 @@ static struct omap_mmc_config innovator_mmc_config __initdata = {
|
||||
},
|
||||
};
|
||||
|
||||
static struct omap_uart_config innovator_uart_config __initdata = {
|
||||
.enabled_uarts = ((1 << 0) | (1 << 1) | (1 << 2)),
|
||||
};
|
||||
|
||||
static struct omap_board_config_kernel innovator_config[] = {
|
||||
{ OMAP_TAG_USB, NULL },
|
||||
{ OMAP_TAG_LCD, NULL },
|
||||
{ OMAP_TAG_MMC, &innovator_mmc_config },
|
||||
{ OMAP_TAG_UART, &innovator_uart_config },
|
||||
};
|
||||
|
||||
static void __init innovator_init(void)
|
||||
{
|
||||
#ifdef CONFIG_ARCH_OMAP1510
|
||||
#ifdef CONFIG_ARCH_OMAP15XX
|
||||
if (cpu_is_omap1510()) {
|
||||
platform_add_devices(innovator1510_devices, ARRAY_SIZE(innovator1510_devices));
|
||||
}
|
||||
@ -252,23 +266,28 @@ static void __init innovator_init(void)
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ARCH_OMAP1510
|
||||
if (cpu_is_omap1510())
|
||||
#ifdef CONFIG_ARCH_OMAP15XX
|
||||
if (cpu_is_omap1510()) {
|
||||
innovator_config[0].data = &innovator1510_usb_config;
|
||||
innovator_config[1].data = &innovator1510_lcd_config;
|
||||
}
|
||||
#endif
|
||||
#ifdef CONFIG_ARCH_OMAP16XX
|
||||
if (cpu_is_omap1610())
|
||||
if (cpu_is_omap1610()) {
|
||||
innovator_config[0].data = &h2_usb_config;
|
||||
innovator_config[1].data = &innovator1610_lcd_config;
|
||||
}
|
||||
#endif
|
||||
omap_board_config = innovator_config;
|
||||
omap_board_config_size = ARRAY_SIZE(innovator_config);
|
||||
omap_serial_init();
|
||||
}
|
||||
|
||||
static void __init innovator_map_io(void)
|
||||
{
|
||||
omap_map_common_io();
|
||||
|
||||
#ifdef CONFIG_ARCH_OMAP1510
|
||||
#ifdef CONFIG_ARCH_OMAP15XX
|
||||
if (cpu_is_omap1510()) {
|
||||
iotable_init(innovator1510_io_desc, ARRAY_SIZE(innovator1510_io_desc));
|
||||
udelay(10); /* Delay needed for FPGA */
|
||||
@ -280,7 +299,6 @@ static void __init innovator_map_io(void)
|
||||
fpga_read(OMAP1510_FPGA_BOARD_REV));
|
||||
}
|
||||
#endif
|
||||
omap_serial_init(innovator_serial_ports);
|
||||
}
|
||||
|
||||
MACHINE_START(OMAP_INNOVATOR, "TI-Innovator")
|
||||
|
@ -55,6 +55,14 @@ static struct platform_device *netstar_devices[] __initdata = {
|
||||
&netstar_smc91x_device,
|
||||
};
|
||||
|
||||
static struct omap_uart_config netstar_uart_config __initdata = {
|
||||
.enabled_uarts = ((1 << 0) | (1 << 1) | (1 << 2)),
|
||||
};
|
||||
|
||||
static struct omap_board_config_kernel netstar_config[] = {
|
||||
{ OMAP_TAG_UART, &netstar_uart_config },
|
||||
};
|
||||
|
||||
static void __init netstar_init_irq(void)
|
||||
{
|
||||
omap_init_irq();
|
||||
@ -92,14 +100,15 @@ static void __init netstar_init(void)
|
||||
/* Switch off red LED */
|
||||
omap_writeb(0x00, OMAP_LPG1_PMR); /* Disable clock */
|
||||
omap_writeb(0x80, OMAP_LPG1_LCR);
|
||||
}
|
||||
|
||||
static int __initdata omap_serial_ports[OMAP_MAX_NR_PORTS] = {1, 1, 1};
|
||||
omap_board_config = netstar_config;
|
||||
omap_board_config_size = ARRAY_SIZE(netstar_config);
|
||||
omap_serial_init();
|
||||
}
|
||||
|
||||
static void __init netstar_map_io(void)
|
||||
{
|
||||
omap_map_common_io();
|
||||
omap_serial_init(omap_serial_ports);
|
||||
}
|
||||
|
||||
#define MACHINE_PANICED 1
|
||||
|
@ -46,8 +46,6 @@
|
||||
#include <asm/arch/tc.h>
|
||||
#include <asm/arch/common.h>
|
||||
|
||||
static int __initdata osk_serial_ports[OMAP_MAX_NR_PORTS] = {1, 0, 0};
|
||||
|
||||
static struct mtd_partition osk_partitions[] = {
|
||||
/* bootloader (U-Boot, etc) in first sector */
|
||||
{
|
||||
@ -155,7 +153,7 @@ static void __init osk_init_smc91x(void)
|
||||
}
|
||||
|
||||
/* Check EMIFS wait states to fix errors with SMC_GET_PKT_HDR */
|
||||
EMIFS_CCS(1) |= 0x2;
|
||||
EMIFS_CCS(1) |= 0x3;
|
||||
}
|
||||
|
||||
static void __init osk_init_cf(void)
|
||||
@ -193,8 +191,19 @@ static struct omap_usb_config osk_usb_config __initdata = {
|
||||
.pins[0] = 2,
|
||||
};
|
||||
|
||||
static struct omap_uart_config osk_uart_config __initdata = {
|
||||
.enabled_uarts = (1 << 0),
|
||||
};
|
||||
|
||||
static struct omap_lcd_config osk_lcd_config __initdata = {
|
||||
.panel_name = "osk",
|
||||
.ctrl_name = "internal",
|
||||
};
|
||||
|
||||
static struct omap_board_config_kernel osk_config[] = {
|
||||
{ OMAP_TAG_USB, &osk_usb_config },
|
||||
{ OMAP_TAG_UART, &osk_uart_config },
|
||||
{ OMAP_TAG_LCD, &osk_lcd_config },
|
||||
};
|
||||
|
||||
#ifdef CONFIG_OMAP_OSK_MISTRAL
|
||||
@ -254,13 +263,13 @@ static void __init osk_init(void)
|
||||
omap_board_config_size = ARRAY_SIZE(osk_config);
|
||||
USB_TRANSCEIVER_CTRL_REG |= (3 << 1);
|
||||
|
||||
omap_serial_init();
|
||||
osk_mistral_init();
|
||||
}
|
||||
|
||||
static void __init osk_map_io(void)
|
||||
{
|
||||
omap_map_common_io();
|
||||
omap_serial_init(osk_serial_ports);
|
||||
}
|
||||
|
||||
MACHINE_START(OMAP_OSK, "TI-OSK")
|
||||
|
87
arch/arm/mach-omap1/board-palmte.c
Normal file
87
arch/arm/mach-omap1/board-palmte.c
Normal file
@ -0,0 +1,87 @@
|
||||
/*
|
||||
* linux/arch/arm/mach-omap1/board-palmte.c
|
||||
*
|
||||
* Modified from board-generic.c
|
||||
*
|
||||
* Support for the Palm Tungsten E PDA.
|
||||
*
|
||||
* Original version : Laurent Gonzalez
|
||||
*
|
||||
* Maintainters : http://palmtelinux.sf.net
|
||||
* palmtelinux-developpers@lists.sf.net
|
||||
*
|
||||
* 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/notifier.h>
|
||||
|
||||
#include <asm/hardware.h>
|
||||
#include <asm/mach-types.h>
|
||||
#include <asm/mach/arch.h>
|
||||
#include <asm/mach/map.h>
|
||||
|
||||
#include <asm/arch/gpio.h>
|
||||
#include <asm/arch/mux.h>
|
||||
#include <asm/arch/usb.h>
|
||||
#include <asm/arch/board.h>
|
||||
#include <asm/arch/common.h>
|
||||
#include <asm/hardware/clock.h>
|
||||
|
||||
static void __init omap_generic_init_irq(void)
|
||||
{
|
||||
omap_init_irq();
|
||||
}
|
||||
|
||||
static struct omap_usb_config palmte_usb_config __initdata = {
|
||||
.register_dev = 1,
|
||||
.hmc_mode = 0,
|
||||
.pins[0] = 3,
|
||||
};
|
||||
|
||||
static struct omap_mmc_config palmte_mmc_config __initdata = {
|
||||
.mmc [0] = {
|
||||
.enabled = 1,
|
||||
.wire4 = 1,
|
||||
.wp_pin = OMAP_MPUIO(3),
|
||||
.power_pin = -1,
|
||||
.switch_pin = -1,
|
||||
},
|
||||
};
|
||||
|
||||
static struct omap_lcd_config palmte_lcd_config __initdata = {
|
||||
.panel_name = "palmte",
|
||||
.ctrl_name = "internal",
|
||||
};
|
||||
|
||||
static struct omap_board_config_kernel palmte_config[] = {
|
||||
{ OMAP_TAG_USB, &palmte_usb_config },
|
||||
{ OMAP_TAG_MMC, &palmte_mmc_config },
|
||||
{ OMAP_TAG_LCD, &palmte_lcd_config },
|
||||
};
|
||||
|
||||
static void __init omap_generic_init(void)
|
||||
{
|
||||
omap_board_config = palmte_config;
|
||||
omap_board_config_size = ARRAY_SIZE(palmte_config);
|
||||
}
|
||||
|
||||
static void __init omap_generic_map_io(void)
|
||||
{
|
||||
omap_map_common_io();
|
||||
}
|
||||
|
||||
MACHINE_START(OMAP_PALMTE, "OMAP310 based Palm Tungsten E")
|
||||
.phys_ram = 0x10000000,
|
||||
.phys_io = 0xfff00000,
|
||||
.io_pg_offst = ((0xfef00000) >> 18) & 0xfffc,
|
||||
.boot_params = 0x10000100,
|
||||
.map_io = omap_generic_map_io,
|
||||
.init_irq = omap_generic_init_irq,
|
||||
.init_machine = omap_generic_init,
|
||||
.timer = &omap_timer,
|
||||
MACHINE_END
|
@ -29,6 +29,7 @@
|
||||
#include <asm/arch/mux.h>
|
||||
#include <asm/arch/fpga.h>
|
||||
#include <asm/arch/common.h>
|
||||
#include <asm/arch/board.h>
|
||||
|
||||
static struct resource smc91x_resources[] = {
|
||||
[0] = {
|
||||
@ -43,8 +44,6 @@ static struct resource smc91x_resources[] = {
|
||||
},
|
||||
};
|
||||
|
||||
static int __initdata p2_serial_ports[OMAP_MAX_NR_PORTS] = {1, 1, 0};
|
||||
|
||||
static struct mtd_partition p2_partitions[] = {
|
||||
/* bootloader (U-Boot, etc) in first sector */
|
||||
{
|
||||
@ -111,9 +110,27 @@ static struct platform_device *devices[] __initdata = {
|
||||
&smc91x_device,
|
||||
};
|
||||
|
||||
static struct omap_uart_config perseus2_uart_config __initdata = {
|
||||
.enabled_uarts = ((1 << 0) | (1 << 1)),
|
||||
};
|
||||
|
||||
static struct omap_lcd_config perseus2_lcd_config __initdata = {
|
||||
.panel_name = "p2",
|
||||
.ctrl_name = "internal",
|
||||
};
|
||||
|
||||
static struct omap_board_config_kernel perseus2_config[] = {
|
||||
{ OMAP_TAG_UART, &perseus2_uart_config },
|
||||
{ OMAP_TAG_LCD, &perseus2_lcd_config },
|
||||
};
|
||||
|
||||
static void __init omap_perseus2_init(void)
|
||||
{
|
||||
(void) platform_add_devices(devices, ARRAY_SIZE(devices));
|
||||
|
||||
omap_board_config = perseus2_config;
|
||||
omap_board_config_size = ARRAY_SIZE(perseus2_config);
|
||||
omap_serial_init();
|
||||
}
|
||||
|
||||
static void __init perseus2_init_smc91x(void)
|
||||
@ -131,7 +148,6 @@ void omap_perseus2_init_irq(void)
|
||||
omap_gpio_init();
|
||||
perseus2_init_smc91x();
|
||||
}
|
||||
|
||||
/* Only FPGA needs to be mapped here. All others are done with ioremap */
|
||||
static struct map_desc omap_perseus2_io_desc[] __initdata = {
|
||||
{
|
||||
@ -179,7 +195,6 @@ static void __init omap_perseus2_map_io(void)
|
||||
* It is used as the Ethernet controller interrupt
|
||||
*/
|
||||
omap_writel(omap_readl(OMAP730_IO_CONF_9) & 0x1FFFFFFF, OMAP730_IO_CONF_9);
|
||||
omap_serial_init(p2_serial_ports);
|
||||
}
|
||||
|
||||
MACHINE_START(OMAP_PERSEUS2, "OMAP730 Perseus2")
|
||||
|
@ -150,9 +150,14 @@ static struct omap_mmc_config voiceblue_mmc_config __initdata = {
|
||||
},
|
||||
};
|
||||
|
||||
static struct omap_uart_config voiceblue_uart_config __initdata = {
|
||||
.enabled_uarts = ((1 << 0) | (1 << 1) | (1 << 2)),
|
||||
};
|
||||
|
||||
static struct omap_board_config_kernel voiceblue_config[] = {
|
||||
{ OMAP_TAG_USB, &voiceblue_usb_config },
|
||||
{ OMAP_TAG_MMC, &voiceblue_mmc_config },
|
||||
{ OMAP_TAG_UART, &voiceblue_uart_config },
|
||||
};
|
||||
|
||||
static void __init voiceblue_init_irq(void)
|
||||
@ -191,6 +196,7 @@ static void __init voiceblue_init(void)
|
||||
platform_add_devices(voiceblue_devices, ARRAY_SIZE(voiceblue_devices));
|
||||
omap_board_config = voiceblue_config;
|
||||
omap_board_config_size = ARRAY_SIZE(voiceblue_config);
|
||||
omap_serial_init();
|
||||
|
||||
/* There is a good chance board is going up, so enable power LED
|
||||
* (it is connected through invertor) */
|
||||
@ -198,12 +204,9 @@ static void __init voiceblue_init(void)
|
||||
omap_writeb(0x00, OMAP_LPG1_PMR); /* Disable clock */
|
||||
}
|
||||
|
||||
static int __initdata omap_serial_ports[OMAP_MAX_NR_PORTS] = {1, 1, 1};
|
||||
|
||||
static void __init voiceblue_map_io(void)
|
||||
{
|
||||
omap_map_common_io();
|
||||
omap_serial_init(omap_serial_ports);
|
||||
}
|
||||
|
||||
#define MACHINE_PANICED 1
|
||||
|
792
arch/arm/mach-omap1/clock.c
Normal file
792
arch/arm/mach-omap1/clock.c
Normal file
@ -0,0 +1,792 @@
|
||||
/*
|
||||
* linux/arch/arm/mach-omap1/clock.c
|
||||
*
|
||||
* Copyright (C) 2004 - 2005 Nokia corporation
|
||||
* Written by Tuukka Tikkanen <tuukka.tikkanen@elektrobit.com>
|
||||
*
|
||||
* Modified to use omap shared clock framework by
|
||||
* Tony Lindgren <tony@atomide.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/kernel.h>
|
||||
#include <linux/list.h>
|
||||
#include <linux/errno.h>
|
||||
#include <linux/err.h>
|
||||
|
||||
#include <asm/io.h>
|
||||
#include <asm/hardware/clock.h>
|
||||
|
||||
#include <asm/arch/usb.h>
|
||||
#include <asm/arch/clock.h>
|
||||
#include <asm/arch/sram.h>
|
||||
|
||||
#include "clock.h"
|
||||
|
||||
__u32 arm_idlect1_mask;
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Omap1 specific clock functions
|
||||
*-------------------------------------------------------------------------*/
|
||||
|
||||
static void omap1_watchdog_recalc(struct clk * clk)
|
||||
{
|
||||
clk->rate = clk->parent->rate / 14;
|
||||
}
|
||||
|
||||
static void omap1_uart_recalc(struct clk * clk)
|
||||
{
|
||||
unsigned int val = omap_readl(clk->enable_reg);
|
||||
if (val & clk->enable_bit)
|
||||
clk->rate = 48000000;
|
||||
else
|
||||
clk->rate = 12000000;
|
||||
}
|
||||
|
||||
static int omap1_clk_enable_dsp_domain(struct clk *clk)
|
||||
{
|
||||
int retval;
|
||||
|
||||
retval = omap1_clk_use(&api_ck.clk);
|
||||
if (!retval) {
|
||||
retval = omap1_clk_enable(clk);
|
||||
omap1_clk_unuse(&api_ck.clk);
|
||||
}
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
||||
static void omap1_clk_disable_dsp_domain(struct clk *clk)
|
||||
{
|
||||
if (omap1_clk_use(&api_ck.clk) == 0) {
|
||||
omap1_clk_disable(clk);
|
||||
omap1_clk_unuse(&api_ck.clk);
|
||||
}
|
||||
}
|
||||
|
||||
static int omap1_clk_enable_uart_functional(struct clk *clk)
|
||||
{
|
||||
int ret;
|
||||
struct uart_clk *uclk;
|
||||
|
||||
ret = omap1_clk_enable(clk);
|
||||
if (ret == 0) {
|
||||
/* Set smart idle acknowledgement mode */
|
||||
uclk = (struct uart_clk *)clk;
|
||||
omap_writeb((omap_readb(uclk->sysc_addr) & ~0x10) | 8,
|
||||
uclk->sysc_addr);
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static void omap1_clk_disable_uart_functional(struct clk *clk)
|
||||
{
|
||||
struct uart_clk *uclk;
|
||||
|
||||
/* Set force idle acknowledgement mode */
|
||||
uclk = (struct uart_clk *)clk;
|
||||
omap_writeb((omap_readb(uclk->sysc_addr) & ~0x18), uclk->sysc_addr);
|
||||
|
||||
omap1_clk_disable(clk);
|
||||
}
|
||||
|
||||
static void omap1_clk_allow_idle(struct clk *clk)
|
||||
{
|
||||
struct arm_idlect1_clk * iclk = (struct arm_idlect1_clk *)clk;
|
||||
|
||||
if (!(clk->flags & CLOCK_IDLE_CONTROL))
|
||||
return;
|
||||
|
||||
if (iclk->no_idle_count > 0 && !(--iclk->no_idle_count))
|
||||
arm_idlect1_mask |= 1 << iclk->idlect_shift;
|
||||
}
|
||||
|
||||
static void omap1_clk_deny_idle(struct clk *clk)
|
||||
{
|
||||
struct arm_idlect1_clk * iclk = (struct arm_idlect1_clk *)clk;
|
||||
|
||||
if (!(clk->flags & CLOCK_IDLE_CONTROL))
|
||||
return;
|
||||
|
||||
if (iclk->no_idle_count++ == 0)
|
||||
arm_idlect1_mask &= ~(1 << iclk->idlect_shift);
|
||||
}
|
||||
|
||||
static __u16 verify_ckctl_value(__u16 newval)
|
||||
{
|
||||
/* This function checks for following limitations set
|
||||
* by the hardware (all conditions must be true):
|
||||
* DSPMMU_CK == DSP_CK or DSPMMU_CK == DSP_CK/2
|
||||
* ARM_CK >= TC_CK
|
||||
* DSP_CK >= TC_CK
|
||||
* DSPMMU_CK >= TC_CK
|
||||
*
|
||||
* In addition following rules are enforced:
|
||||
* LCD_CK <= TC_CK
|
||||
* ARMPER_CK <= TC_CK
|
||||
*
|
||||
* However, maximum frequencies are not checked for!
|
||||
*/
|
||||
__u8 per_exp;
|
||||
__u8 lcd_exp;
|
||||
__u8 arm_exp;
|
||||
__u8 dsp_exp;
|
||||
__u8 tc_exp;
|
||||
__u8 dspmmu_exp;
|
||||
|
||||
per_exp = (newval >> CKCTL_PERDIV_OFFSET) & 3;
|
||||
lcd_exp = (newval >> CKCTL_LCDDIV_OFFSET) & 3;
|
||||
arm_exp = (newval >> CKCTL_ARMDIV_OFFSET) & 3;
|
||||
dsp_exp = (newval >> CKCTL_DSPDIV_OFFSET) & 3;
|
||||
tc_exp = (newval >> CKCTL_TCDIV_OFFSET) & 3;
|
||||
dspmmu_exp = (newval >> CKCTL_DSPMMUDIV_OFFSET) & 3;
|
||||
|
||||
if (dspmmu_exp < dsp_exp)
|
||||
dspmmu_exp = dsp_exp;
|
||||
if (dspmmu_exp > dsp_exp+1)
|
||||
dspmmu_exp = dsp_exp+1;
|
||||
if (tc_exp < arm_exp)
|
||||
tc_exp = arm_exp;
|
||||
if (tc_exp < dspmmu_exp)
|
||||
tc_exp = dspmmu_exp;
|
||||
if (tc_exp > lcd_exp)
|
||||
lcd_exp = tc_exp;
|
||||
if (tc_exp > per_exp)
|
||||
per_exp = tc_exp;
|
||||
|
||||
newval &= 0xf000;
|
||||
newval |= per_exp << CKCTL_PERDIV_OFFSET;
|
||||
newval |= lcd_exp << CKCTL_LCDDIV_OFFSET;
|
||||
newval |= arm_exp << CKCTL_ARMDIV_OFFSET;
|
||||
newval |= dsp_exp << CKCTL_DSPDIV_OFFSET;
|
||||
newval |= tc_exp << CKCTL_TCDIV_OFFSET;
|
||||
newval |= dspmmu_exp << CKCTL_DSPMMUDIV_OFFSET;
|
||||
|
||||
return newval;
|
||||
}
|
||||
|
||||
static int calc_dsor_exp(struct clk *clk, unsigned long rate)
|
||||
{
|
||||
/* Note: If target frequency is too low, this function will return 4,
|
||||
* which is invalid value. Caller must check for this value and act
|
||||
* accordingly.
|
||||
*
|
||||
* Note: This function does not check for following limitations set
|
||||
* by the hardware (all conditions must be true):
|
||||
* DSPMMU_CK == DSP_CK or DSPMMU_CK == DSP_CK/2
|
||||
* ARM_CK >= TC_CK
|
||||
* DSP_CK >= TC_CK
|
||||
* DSPMMU_CK >= TC_CK
|
||||
*/
|
||||
unsigned long realrate;
|
||||
struct clk * parent;
|
||||
unsigned dsor_exp;
|
||||
|
||||
if (unlikely(!(clk->flags & RATE_CKCTL)))
|
||||
return -EINVAL;
|
||||
|
||||
parent = clk->parent;
|
||||
if (unlikely(parent == 0))
|
||||
return -EIO;
|
||||
|
||||
realrate = parent->rate;
|
||||
for (dsor_exp=0; dsor_exp<4; dsor_exp++) {
|
||||
if (realrate <= rate)
|
||||
break;
|
||||
|
||||
realrate /= 2;
|
||||
}
|
||||
|
||||
return dsor_exp;
|
||||
}
|
||||
|
||||
static void omap1_ckctl_recalc(struct clk * clk)
|
||||
{
|
||||
int dsor;
|
||||
|
||||
/* Calculate divisor encoded as 2-bit exponent */
|
||||
dsor = 1 << (3 & (omap_readw(ARM_CKCTL) >> clk->rate_offset));
|
||||
|
||||
if (unlikely(clk->rate == clk->parent->rate / dsor))
|
||||
return; /* No change, quick exit */
|
||||
clk->rate = clk->parent->rate / dsor;
|
||||
|
||||
if (unlikely(clk->flags & RATE_PROPAGATES))
|
||||
propagate_rate(clk);
|
||||
}
|
||||
|
||||
static void omap1_ckctl_recalc_dsp_domain(struct clk * clk)
|
||||
{
|
||||
int dsor;
|
||||
|
||||
/* Calculate divisor encoded as 2-bit exponent
|
||||
*
|
||||
* The clock control bits are in DSP domain,
|
||||
* so api_ck is needed for access.
|
||||
* Note that DSP_CKCTL virt addr = phys addr, so
|
||||
* we must use __raw_readw() instead of omap_readw().
|
||||
*/
|
||||
omap1_clk_use(&api_ck.clk);
|
||||
dsor = 1 << (3 & (__raw_readw(DSP_CKCTL) >> clk->rate_offset));
|
||||
omap1_clk_unuse(&api_ck.clk);
|
||||
|
||||
if (unlikely(clk->rate == clk->parent->rate / dsor))
|
||||
return; /* No change, quick exit */
|
||||
clk->rate = clk->parent->rate / dsor;
|
||||
|
||||
if (unlikely(clk->flags & RATE_PROPAGATES))
|
||||
propagate_rate(clk);
|
||||
}
|
||||
|
||||
/* MPU virtual clock functions */
|
||||
static int omap1_select_table_rate(struct clk * clk, unsigned long rate)
|
||||
{
|
||||
/* Find the highest supported frequency <= rate and switch to it */
|
||||
struct mpu_rate * ptr;
|
||||
|
||||
if (clk != &virtual_ck_mpu)
|
||||
return -EINVAL;
|
||||
|
||||
for (ptr = rate_table; ptr->rate; ptr++) {
|
||||
if (ptr->xtal != ck_ref.rate)
|
||||
continue;
|
||||
|
||||
/* DPLL1 cannot be reprogrammed without risking system crash */
|
||||
if (likely(ck_dpll1.rate!=0) && ptr->pll_rate != ck_dpll1.rate)
|
||||
continue;
|
||||
|
||||
/* Can check only after xtal frequency check */
|
||||
if (ptr->rate <= rate)
|
||||
break;
|
||||
}
|
||||
|
||||
if (!ptr->rate)
|
||||
return -EINVAL;
|
||||
|
||||
/*
|
||||
* In most cases we should not need to reprogram DPLL.
|
||||
* Reprogramming the DPLL is tricky, it must be done from SRAM.
|
||||
*/
|
||||
omap_sram_reprogram_clock(ptr->dpllctl_val, ptr->ckctl_val);
|
||||
|
||||
ck_dpll1.rate = ptr->pll_rate;
|
||||
propagate_rate(&ck_dpll1);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int omap1_clk_set_rate_dsp_domain(struct clk *clk, unsigned long rate)
|
||||
{
|
||||
int ret = -EINVAL;
|
||||
int dsor_exp;
|
||||
__u16 regval;
|
||||
|
||||
if (clk->flags & RATE_CKCTL) {
|
||||
dsor_exp = calc_dsor_exp(clk, rate);
|
||||
if (dsor_exp > 3)
|
||||
dsor_exp = -EINVAL;
|
||||
if (dsor_exp < 0)
|
||||
return dsor_exp;
|
||||
|
||||
regval = __raw_readw(DSP_CKCTL);
|
||||
regval &= ~(3 << clk->rate_offset);
|
||||
regval |= dsor_exp << clk->rate_offset;
|
||||
__raw_writew(regval, DSP_CKCTL);
|
||||
clk->rate = clk->parent->rate / (1 << dsor_exp);
|
||||
ret = 0;
|
||||
}
|
||||
|
||||
if (unlikely(ret == 0 && (clk->flags & RATE_PROPAGATES)))
|
||||
propagate_rate(clk);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static long omap1_round_to_table_rate(struct clk * clk, unsigned long rate)
|
||||
{
|
||||
/* Find the highest supported frequency <= rate */
|
||||
struct mpu_rate * ptr;
|
||||
long highest_rate;
|
||||
|
||||
if (clk != &virtual_ck_mpu)
|
||||
return -EINVAL;
|
||||
|
||||
highest_rate = -EINVAL;
|
||||
|
||||
for (ptr = rate_table; ptr->rate; ptr++) {
|
||||
if (ptr->xtal != ck_ref.rate)
|
||||
continue;
|
||||
|
||||
highest_rate = ptr->rate;
|
||||
|
||||
/* Can check only after xtal frequency check */
|
||||
if (ptr->rate <= rate)
|
||||
break;
|
||||
}
|
||||
|
||||
return highest_rate;
|
||||
}
|
||||
|
||||
static unsigned calc_ext_dsor(unsigned long rate)
|
||||
{
|
||||
unsigned dsor;
|
||||
|
||||
/* MCLK and BCLK divisor selection is not linear:
|
||||
* freq = 96MHz / dsor
|
||||
*
|
||||
* RATIO_SEL range: dsor <-> RATIO_SEL
|
||||
* 0..6: (RATIO_SEL+2) <-> (dsor-2)
|
||||
* 6..48: (8+(RATIO_SEL-6)*2) <-> ((dsor-8)/2+6)
|
||||
* Minimum dsor is 2 and maximum is 96. Odd divisors starting from 9
|
||||
* can not be used.
|
||||
*/
|
||||
for (dsor = 2; dsor < 96; ++dsor) {
|
||||
if ((dsor & 1) && dsor > 8)
|
||||
continue;
|
||||
if (rate >= 96000000 / dsor)
|
||||
break;
|
||||
}
|
||||
return dsor;
|
||||
}
|
||||
|
||||
/* Only needed on 1510 */
|
||||
static int omap1_set_uart_rate(struct clk * clk, unsigned long rate)
|
||||
{
|
||||
unsigned int val;
|
||||
|
||||
val = omap_readl(clk->enable_reg);
|
||||
if (rate == 12000000)
|
||||
val &= ~(1 << clk->enable_bit);
|
||||
else if (rate == 48000000)
|
||||
val |= (1 << clk->enable_bit);
|
||||
else
|
||||
return -EINVAL;
|
||||
omap_writel(val, clk->enable_reg);
|
||||
clk->rate = rate;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* External clock (MCLK & BCLK) functions */
|
||||
static int omap1_set_ext_clk_rate(struct clk * clk, unsigned long rate)
|
||||
{
|
||||
unsigned dsor;
|
||||
__u16 ratio_bits;
|
||||
|
||||
dsor = calc_ext_dsor(rate);
|
||||
clk->rate = 96000000 / dsor;
|
||||
if (dsor > 8)
|
||||
ratio_bits = ((dsor - 8) / 2 + 6) << 2;
|
||||
else
|
||||
ratio_bits = (dsor - 2) << 2;
|
||||
|
||||
ratio_bits |= omap_readw(clk->enable_reg) & ~0xfd;
|
||||
omap_writew(ratio_bits, clk->enable_reg);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static long omap1_round_ext_clk_rate(struct clk * clk, unsigned long rate)
|
||||
{
|
||||
return 96000000 / calc_ext_dsor(rate);
|
||||
}
|
||||
|
||||
static void omap1_init_ext_clk(struct clk * clk)
|
||||
{
|
||||
unsigned dsor;
|
||||
__u16 ratio_bits;
|
||||
|
||||
/* Determine current rate and ensure clock is based on 96MHz APLL */
|
||||
ratio_bits = omap_readw(clk->enable_reg) & ~1;
|
||||
omap_writew(ratio_bits, clk->enable_reg);
|
||||
|
||||
ratio_bits = (ratio_bits & 0xfc) >> 2;
|
||||
if (ratio_bits > 6)
|
||||
dsor = (ratio_bits - 6) * 2 + 8;
|
||||
else
|
||||
dsor = ratio_bits + 2;
|
||||
|
||||
clk-> rate = 96000000 / dsor;
|
||||
}
|
||||
|
||||
static int omap1_clk_use(struct clk *clk)
|
||||
{
|
||||
int ret = 0;
|
||||
if (clk->usecount++ == 0) {
|
||||
if (likely(clk->parent)) {
|
||||
ret = omap1_clk_use(clk->parent);
|
||||
|
||||
if (unlikely(ret != 0)) {
|
||||
clk->usecount--;
|
||||
return ret;
|
||||
}
|
||||
|
||||
if (clk->flags & CLOCK_NO_IDLE_PARENT)
|
||||
if (!cpu_is_omap24xx())
|
||||
omap1_clk_deny_idle(clk->parent);
|
||||
}
|
||||
|
||||
ret = clk->enable(clk);
|
||||
|
||||
if (unlikely(ret != 0) && clk->parent) {
|
||||
omap1_clk_unuse(clk->parent);
|
||||
clk->usecount--;
|
||||
}
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static void omap1_clk_unuse(struct clk *clk)
|
||||
{
|
||||
if (clk->usecount > 0 && !(--clk->usecount)) {
|
||||
clk->disable(clk);
|
||||
if (likely(clk->parent)) {
|
||||
omap1_clk_unuse(clk->parent);
|
||||
if (clk->flags & CLOCK_NO_IDLE_PARENT)
|
||||
if (!cpu_is_omap24xx())
|
||||
omap1_clk_allow_idle(clk->parent);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static int omap1_clk_enable(struct clk *clk)
|
||||
{
|
||||
__u16 regval16;
|
||||
__u32 regval32;
|
||||
|
||||
if (clk->flags & ALWAYS_ENABLED)
|
||||
return 0;
|
||||
|
||||
if (unlikely(clk->enable_reg == 0)) {
|
||||
printk(KERN_ERR "clock.c: Enable for %s without enable code\n",
|
||||
clk->name);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (clk->flags & ENABLE_REG_32BIT) {
|
||||
if (clk->flags & VIRTUAL_IO_ADDRESS) {
|
||||
regval32 = __raw_readl(clk->enable_reg);
|
||||
regval32 |= (1 << clk->enable_bit);
|
||||
__raw_writel(regval32, clk->enable_reg);
|
||||
} else {
|
||||
regval32 = omap_readl(clk->enable_reg);
|
||||
regval32 |= (1 << clk->enable_bit);
|
||||
omap_writel(regval32, clk->enable_reg);
|
||||
}
|
||||
} else {
|
||||
if (clk->flags & VIRTUAL_IO_ADDRESS) {
|
||||
regval16 = __raw_readw(clk->enable_reg);
|
||||
regval16 |= (1 << clk->enable_bit);
|
||||
__raw_writew(regval16, clk->enable_reg);
|
||||
} else {
|
||||
regval16 = omap_readw(clk->enable_reg);
|
||||
regval16 |= (1 << clk->enable_bit);
|
||||
omap_writew(regval16, clk->enable_reg);
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void omap1_clk_disable(struct clk *clk)
|
||||
{
|
||||
__u16 regval16;
|
||||
__u32 regval32;
|
||||
|
||||
if (clk->enable_reg == 0)
|
||||
return;
|
||||
|
||||
if (clk->flags & ENABLE_REG_32BIT) {
|
||||
if (clk->flags & VIRTUAL_IO_ADDRESS) {
|
||||
regval32 = __raw_readl(clk->enable_reg);
|
||||
regval32 &= ~(1 << clk->enable_bit);
|
||||
__raw_writel(regval32, clk->enable_reg);
|
||||
} else {
|
||||
regval32 = omap_readl(clk->enable_reg);
|
||||
regval32 &= ~(1 << clk->enable_bit);
|
||||
omap_writel(regval32, clk->enable_reg);
|
||||
}
|
||||
} else {
|
||||
if (clk->flags & VIRTUAL_IO_ADDRESS) {
|
||||
regval16 = __raw_readw(clk->enable_reg);
|
||||
regval16 &= ~(1 << clk->enable_bit);
|
||||
__raw_writew(regval16, clk->enable_reg);
|
||||
} else {
|
||||
regval16 = omap_readw(clk->enable_reg);
|
||||
regval16 &= ~(1 << clk->enable_bit);
|
||||
omap_writew(regval16, clk->enable_reg);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static long omap1_clk_round_rate(struct clk *clk, unsigned long rate)
|
||||
{
|
||||
int dsor_exp;
|
||||
|
||||
if (clk->flags & RATE_FIXED)
|
||||
return clk->rate;
|
||||
|
||||
if (clk->flags & RATE_CKCTL) {
|
||||
dsor_exp = calc_dsor_exp(clk, rate);
|
||||
if (dsor_exp < 0)
|
||||
return dsor_exp;
|
||||
if (dsor_exp > 3)
|
||||
dsor_exp = 3;
|
||||
return clk->parent->rate / (1 << dsor_exp);
|
||||
}
|
||||
|
||||
if(clk->round_rate != 0)
|
||||
return clk->round_rate(clk, rate);
|
||||
|
||||
return clk->rate;
|
||||
}
|
||||
|
||||
static int omap1_clk_set_rate(struct clk *clk, unsigned long rate)
|
||||
{
|
||||
int ret = -EINVAL;
|
||||
int dsor_exp;
|
||||
__u16 regval;
|
||||
|
||||
if (clk->set_rate)
|
||||
ret = clk->set_rate(clk, rate);
|
||||
else if (clk->flags & RATE_CKCTL) {
|
||||
dsor_exp = calc_dsor_exp(clk, rate);
|
||||
if (dsor_exp > 3)
|
||||
dsor_exp = -EINVAL;
|
||||
if (dsor_exp < 0)
|
||||
return dsor_exp;
|
||||
|
||||
regval = omap_readw(ARM_CKCTL);
|
||||
regval &= ~(3 << clk->rate_offset);
|
||||
regval |= dsor_exp << clk->rate_offset;
|
||||
regval = verify_ckctl_value(regval);
|
||||
omap_writew(regval, ARM_CKCTL);
|
||||
clk->rate = clk->parent->rate / (1 << dsor_exp);
|
||||
ret = 0;
|
||||
}
|
||||
|
||||
if (unlikely(ret == 0 && (clk->flags & RATE_PROPAGATES)))
|
||||
propagate_rate(clk);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Omap1 clock reset and init functions
|
||||
*-------------------------------------------------------------------------*/
|
||||
|
||||
#ifdef CONFIG_OMAP_RESET_CLOCKS
|
||||
/*
|
||||
* Resets some clocks that may be left on from bootloader,
|
||||
* but leaves serial clocks on. See also omap_late_clk_reset().
|
||||
*/
|
||||
static inline void omap1_early_clk_reset(void)
|
||||
{
|
||||
//omap_writel(0x3 << 29, MOD_CONF_CTRL_0);
|
||||
}
|
||||
|
||||
static int __init omap1_late_clk_reset(void)
|
||||
{
|
||||
/* Turn off all unused clocks */
|
||||
struct clk *p;
|
||||
__u32 regval32;
|
||||
|
||||
/* USB_REQ_EN will be disabled later if necessary (usb_dc_ck) */
|
||||
regval32 = omap_readw(SOFT_REQ_REG) & (1 << 4);
|
||||
omap_writew(regval32, SOFT_REQ_REG);
|
||||
omap_writew(0, SOFT_REQ_REG2);
|
||||
|
||||
list_for_each_entry(p, &clocks, node) {
|
||||
if (p->usecount > 0 || (p->flags & ALWAYS_ENABLED) ||
|
||||
p->enable_reg == 0)
|
||||
continue;
|
||||
|
||||
/* Clocks in the DSP domain need api_ck. Just assume bootloader
|
||||
* has not enabled any DSP clocks */
|
||||
if ((u32)p->enable_reg == DSP_IDLECT2) {
|
||||
printk(KERN_INFO "Skipping reset check for DSP domain "
|
||||
"clock \"%s\"\n", p->name);
|
||||
continue;
|
||||
}
|
||||
|
||||
/* Is the clock already disabled? */
|
||||
if (p->flags & ENABLE_REG_32BIT) {
|
||||
if (p->flags & VIRTUAL_IO_ADDRESS)
|
||||
regval32 = __raw_readl(p->enable_reg);
|
||||
else
|
||||
regval32 = omap_readl(p->enable_reg);
|
||||
} else {
|
||||
if (p->flags & VIRTUAL_IO_ADDRESS)
|
||||
regval32 = __raw_readw(p->enable_reg);
|
||||
else
|
||||
regval32 = omap_readw(p->enable_reg);
|
||||
}
|
||||
|
||||
if ((regval32 & (1 << p->enable_bit)) == 0)
|
||||
continue;
|
||||
|
||||
/* FIXME: This clock seems to be necessary but no-one
|
||||
* has asked for its activation. */
|
||||
if (p == &tc2_ck // FIX: pm.c (SRAM), CCP, Camera
|
||||
|| p == &ck_dpll1out.clk // FIX: SoSSI, SSR
|
||||
|| p == &arm_gpio_ck // FIX: GPIO code for 1510
|
||||
) {
|
||||
printk(KERN_INFO "FIXME: Clock \"%s\" seems unused\n",
|
||||
p->name);
|
||||
continue;
|
||||
}
|
||||
|
||||
printk(KERN_INFO "Disabling unused clock \"%s\"... ", p->name);
|
||||
p->disable(p);
|
||||
printk(" done\n");
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
late_initcall(omap1_late_clk_reset);
|
||||
|
||||
#else
|
||||
#define omap1_early_clk_reset() {}
|
||||
#endif
|
||||
|
||||
static struct clk_functions omap1_clk_functions = {
|
||||
.clk_use = omap1_clk_use,
|
||||
.clk_unuse = omap1_clk_unuse,
|
||||
.clk_round_rate = omap1_clk_round_rate,
|
||||
.clk_set_rate = omap1_clk_set_rate,
|
||||
};
|
||||
|
||||
int __init omap1_clk_init(void)
|
||||
{
|
||||
struct clk ** clkp;
|
||||
const struct omap_clock_config *info;
|
||||
int crystal_type = 0; /* Default 12 MHz */
|
||||
|
||||
omap1_early_clk_reset();
|
||||
clk_init(&omap1_clk_functions);
|
||||
|
||||
/* By default all idlect1 clocks are allowed to idle */
|
||||
arm_idlect1_mask = ~0;
|
||||
|
||||
for (clkp = onchip_clks; clkp < onchip_clks+ARRAY_SIZE(onchip_clks); clkp++) {
|
||||
if (((*clkp)->flags &CLOCK_IN_OMAP1510) && cpu_is_omap1510()) {
|
||||
clk_register(*clkp);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (((*clkp)->flags &CLOCK_IN_OMAP16XX) && cpu_is_omap16xx()) {
|
||||
clk_register(*clkp);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (((*clkp)->flags &CLOCK_IN_OMAP730) && cpu_is_omap730()) {
|
||||
clk_register(*clkp);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
info = omap_get_config(OMAP_TAG_CLOCK, struct omap_clock_config);
|
||||
if (info != NULL) {
|
||||
if (!cpu_is_omap1510())
|
||||
crystal_type = info->system_clock_type;
|
||||
}
|
||||
|
||||
#if defined(CONFIG_ARCH_OMAP730)
|
||||
ck_ref.rate = 13000000;
|
||||
#elif defined(CONFIG_ARCH_OMAP16XX)
|
||||
if (crystal_type == 2)
|
||||
ck_ref.rate = 19200000;
|
||||
#endif
|
||||
|
||||
printk("Clocks: ARM_SYSST: 0x%04x DPLL_CTL: 0x%04x ARM_CKCTL: 0x%04x\n",
|
||||
omap_readw(ARM_SYSST), omap_readw(DPLL_CTL),
|
||||
omap_readw(ARM_CKCTL));
|
||||
|
||||
/* We want to be in syncronous scalable mode */
|
||||
omap_writew(0x1000, ARM_SYSST);
|
||||
|
||||
#ifdef CONFIG_OMAP_CLOCKS_SET_BY_BOOTLOADER
|
||||
/* Use values set by bootloader. Determine PLL rate and recalculate
|
||||
* dependent clocks as if kernel had changed PLL or divisors.
|
||||
*/
|
||||
{
|
||||
unsigned pll_ctl_val = omap_readw(DPLL_CTL);
|
||||
|
||||
ck_dpll1.rate = ck_ref.rate; /* Base xtal rate */
|
||||
if (pll_ctl_val & 0x10) {
|
||||
/* PLL enabled, apply multiplier and divisor */
|
||||
if (pll_ctl_val & 0xf80)
|
||||
ck_dpll1.rate *= (pll_ctl_val & 0xf80) >> 7;
|
||||
ck_dpll1.rate /= ((pll_ctl_val & 0x60) >> 5) + 1;
|
||||
} else {
|
||||
/* PLL disabled, apply bypass divisor */
|
||||
switch (pll_ctl_val & 0xc) {
|
||||
case 0:
|
||||
break;
|
||||
case 0x4:
|
||||
ck_dpll1.rate /= 2;
|
||||
break;
|
||||
default:
|
||||
ck_dpll1.rate /= 4;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
propagate_rate(&ck_dpll1);
|
||||
#else
|
||||
/* Find the highest supported frequency and enable it */
|
||||
if (omap1_select_table_rate(&virtual_ck_mpu, ~0)) {
|
||||
printk(KERN_ERR "System frequencies not set. Check your config.\n");
|
||||
/* Guess sane values (60MHz) */
|
||||
omap_writew(0x2290, DPLL_CTL);
|
||||
omap_writew(0x1005, ARM_CKCTL);
|
||||
ck_dpll1.rate = 60000000;
|
||||
propagate_rate(&ck_dpll1);
|
||||
}
|
||||
#endif
|
||||
/* Cache rates for clocks connected to ck_ref (not dpll1) */
|
||||
propagate_rate(&ck_ref);
|
||||
printk(KERN_INFO "Clocking rate (xtal/DPLL1/MPU): "
|
||||
"%ld.%01ld/%ld.%01ld/%ld.%01ld MHz\n",
|
||||
ck_ref.rate / 1000000, (ck_ref.rate / 100000) % 10,
|
||||
ck_dpll1.rate / 1000000, (ck_dpll1.rate / 100000) % 10,
|
||||
arm_ck.rate / 1000000, (arm_ck.rate / 100000) % 10);
|
||||
|
||||
#ifdef CONFIG_MACH_OMAP_PERSEUS2
|
||||
/* Select slicer output as OMAP input clock */
|
||||
omap_writew(omap_readw(OMAP730_PCC_UPLD_CTRL) & ~0x1, OMAP730_PCC_UPLD_CTRL);
|
||||
#endif
|
||||
|
||||
/* Turn off DSP and ARM_TIMXO. Make sure ARM_INTHCK is not divided */
|
||||
omap_writew(omap_readw(ARM_CKCTL) & 0x0fff, ARM_CKCTL);
|
||||
|
||||
/* Put DSP/MPUI into reset until needed */
|
||||
omap_writew(0, ARM_RSTCT1);
|
||||
omap_writew(1, ARM_RSTCT2);
|
||||
omap_writew(0x400, ARM_IDLECT1);
|
||||
|
||||
/*
|
||||
* According to OMAP5910 Erratum SYS_DMA_1, bit DMACK_REQ (bit 8)
|
||||
* of the ARM_IDLECT2 register must be set to zero. The power-on
|
||||
* default value of this bit is one.
|
||||
*/
|
||||
omap_writew(0x0000, ARM_IDLECT2); /* Turn LCD clock off also */
|
||||
|
||||
/*
|
||||
* Only enable those clocks we will need, let the drivers
|
||||
* enable other clocks as necessary
|
||||
*/
|
||||
clk_use(&armper_ck.clk);
|
||||
clk_use(&armxor_ck.clk);
|
||||
clk_use(&armtim_ck.clk); /* This should be done by timer code */
|
||||
|
||||
if (cpu_is_omap1510())
|
||||
clk_enable(&arm_gpio_ck);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
768
arch/arm/mach-omap1/clock.h
Normal file
768
arch/arm/mach-omap1/clock.h
Normal file
@ -0,0 +1,768 @@
|
||||
/*
|
||||
* linux/arch/arm/mach-omap1/clock.h
|
||||
*
|
||||
* Copyright (C) 2004 - 2005 Nokia corporation
|
||||
* Written by Tuukka Tikkanen <tuukka.tikkanen@elektrobit.com>
|
||||
* Based on clocks.h by Tony Lindgren, Gordon McNutt and RidgeRun, Inc
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#ifndef __ARCH_ARM_MACH_OMAP1_CLOCK_H
|
||||
#define __ARCH_ARM_MACH_OMAP1_CLOCK_H
|
||||
|
||||
static int omap1_clk_enable(struct clk * clk);
|
||||
static void omap1_clk_disable(struct clk * clk);
|
||||
static void omap1_ckctl_recalc(struct clk * clk);
|
||||
static void omap1_watchdog_recalc(struct clk * clk);
|
||||
static void omap1_ckctl_recalc_dsp_domain(struct clk * clk);
|
||||
static int omap1_clk_enable_dsp_domain(struct clk * clk);
|
||||
static int omap1_clk_set_rate_dsp_domain(struct clk * clk, unsigned long rate);
|
||||
static void omap1_clk_disable_dsp_domain(struct clk * clk);
|
||||
static int omap1_set_uart_rate(struct clk * clk, unsigned long rate);
|
||||
static void omap1_uart_recalc(struct clk * clk);
|
||||
static int omap1_clk_enable_uart_functional(struct clk * clk);
|
||||
static void omap1_clk_disable_uart_functional(struct clk * clk);
|
||||
static int omap1_set_ext_clk_rate(struct clk * clk, unsigned long rate);
|
||||
static long omap1_round_ext_clk_rate(struct clk * clk, unsigned long rate);
|
||||
static void omap1_init_ext_clk(struct clk * clk);
|
||||
static int omap1_select_table_rate(struct clk * clk, unsigned long rate);
|
||||
static long omap1_round_to_table_rate(struct clk * clk, unsigned long rate);
|
||||
static int omap1_clk_use(struct clk *clk);
|
||||
static void omap1_clk_unuse(struct clk *clk);
|
||||
|
||||
struct mpu_rate {
|
||||
unsigned long rate;
|
||||
unsigned long xtal;
|
||||
unsigned long pll_rate;
|
||||
__u16 ckctl_val;
|
||||
__u16 dpllctl_val;
|
||||
};
|
||||
|
||||
struct uart_clk {
|
||||
struct clk clk;
|
||||
unsigned long sysc_addr;
|
||||
};
|
||||
|
||||
/* Provide a method for preventing idling some ARM IDLECT clocks */
|
||||
struct arm_idlect1_clk {
|
||||
struct clk clk;
|
||||
unsigned long no_idle_count;
|
||||
__u8 idlect_shift;
|
||||
};
|
||||
|
||||
/* ARM_CKCTL bit shifts */
|
||||
#define CKCTL_PERDIV_OFFSET 0
|
||||
#define CKCTL_LCDDIV_OFFSET 2
|
||||
#define CKCTL_ARMDIV_OFFSET 4
|
||||
#define CKCTL_DSPDIV_OFFSET 6
|
||||
#define CKCTL_TCDIV_OFFSET 8
|
||||
#define CKCTL_DSPMMUDIV_OFFSET 10
|
||||
/*#define ARM_TIMXO 12*/
|
||||
#define EN_DSPCK 13
|
||||
/*#define ARM_INTHCK_SEL 14*/ /* Divide-by-2 for mpu inth_ck */
|
||||
/* DSP_CKCTL bit shifts */
|
||||
#define CKCTL_DSPPERDIV_OFFSET 0
|
||||
|
||||
/* ARM_IDLECT2 bit shifts */
|
||||
#define EN_WDTCK 0
|
||||
#define EN_XORPCK 1
|
||||
#define EN_PERCK 2
|
||||
#define EN_LCDCK 3
|
||||
#define EN_LBCK 4 /* Not on 1610/1710 */
|
||||
/*#define EN_HSABCK 5*/
|
||||
#define EN_APICK 6
|
||||
#define EN_TIMCK 7
|
||||
#define DMACK_REQ 8
|
||||
#define EN_GPIOCK 9 /* Not on 1610/1710 */
|
||||
/*#define EN_LBFREECK 10*/
|
||||
#define EN_CKOUT_ARM 11
|
||||
|
||||
/* ARM_IDLECT3 bit shifts */
|
||||
#define EN_OCPI_CK 0
|
||||
#define EN_TC1_CK 2
|
||||
#define EN_TC2_CK 4
|
||||
|
||||
/* DSP_IDLECT2 bit shifts (0,1,2 are same as for ARM_IDLECT2) */
|
||||
#define EN_DSPTIMCK 5
|
||||
|
||||
/* Various register defines for clock controls scattered around OMAP chip */
|
||||
#define USB_MCLK_EN_BIT 4 /* In ULPD_CLKC_CTRL */
|
||||
#define USB_HOST_HHC_UHOST_EN 9 /* In MOD_CONF_CTRL_0 */
|
||||
#define SWD_ULPD_PLL_CLK_REQ 1 /* In SWD_CLK_DIV_CTRL_SEL */
|
||||
#define COM_ULPD_PLL_CLK_REQ 1 /* In COM_CLK_DIV_CTRL_SEL */
|
||||
#define SWD_CLK_DIV_CTRL_SEL 0xfffe0874
|
||||
#define COM_CLK_DIV_CTRL_SEL 0xfffe0878
|
||||
#define SOFT_REQ_REG 0xfffe0834
|
||||
#define SOFT_REQ_REG2 0xfffe0880
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Omap1 MPU rate table
|
||||
*-------------------------------------------------------------------------*/
|
||||
static struct mpu_rate rate_table[] = {
|
||||
/* MPU MHz, xtal MHz, dpll1 MHz, CKCTL, DPLL_CTL
|
||||
* NOTE: Comment order here is different from bits in CKCTL value:
|
||||
* armdiv, dspdiv, dspmmu, tcdiv, perdiv, lcddiv
|
||||
*/
|
||||
#if defined(CONFIG_OMAP_ARM_216MHZ)
|
||||
{ 216000000, 12000000, 216000000, 0x050d, 0x2910 }, /* 1/1/2/2/2/8 */
|
||||
#endif
|
||||
#if defined(CONFIG_OMAP_ARM_195MHZ)
|
||||
{ 195000000, 13000000, 195000000, 0x050e, 0x2790 }, /* 1/1/2/2/4/8 */
|
||||
#endif
|
||||
#if defined(CONFIG_OMAP_ARM_192MHZ)
|
||||
{ 192000000, 19200000, 192000000, 0x050f, 0x2510 }, /* 1/1/2/2/8/8 */
|
||||
{ 192000000, 12000000, 192000000, 0x050f, 0x2810 }, /* 1/1/2/2/8/8 */
|
||||
{ 96000000, 12000000, 192000000, 0x055f, 0x2810 }, /* 2/2/2/2/8/8 */
|
||||
{ 48000000, 12000000, 192000000, 0x0baf, 0x2810 }, /* 4/4/4/8/8/8 */
|
||||
{ 24000000, 12000000, 192000000, 0x0fff, 0x2810 }, /* 8/8/8/8/8/8 */
|
||||
#endif
|
||||
#if defined(CONFIG_OMAP_ARM_182MHZ)
|
||||
{ 182000000, 13000000, 182000000, 0x050e, 0x2710 }, /* 1/1/2/2/4/8 */
|
||||
#endif
|
||||
#if defined(CONFIG_OMAP_ARM_168MHZ)
|
||||
{ 168000000, 12000000, 168000000, 0x010f, 0x2710 }, /* 1/1/1/2/8/8 */
|
||||
#endif
|
||||
#if defined(CONFIG_OMAP_ARM_150MHZ)
|
||||
{ 150000000, 12000000, 150000000, 0x010a, 0x2cb0 }, /* 1/1/1/2/4/4 */
|
||||
#endif
|
||||
#if defined(CONFIG_OMAP_ARM_120MHZ)
|
||||
{ 120000000, 12000000, 120000000, 0x010a, 0x2510 }, /* 1/1/1/2/4/4 */
|
||||
#endif
|
||||
#if defined(CONFIG_OMAP_ARM_96MHZ)
|
||||
{ 96000000, 12000000, 96000000, 0x0005, 0x2410 }, /* 1/1/1/1/2/2 */
|
||||
#endif
|
||||
#if defined(CONFIG_OMAP_ARM_60MHZ)
|
||||
{ 60000000, 12000000, 60000000, 0x0005, 0x2290 }, /* 1/1/1/1/2/2 */
|
||||
#endif
|
||||
#if defined(CONFIG_OMAP_ARM_30MHZ)
|
||||
{ 30000000, 12000000, 60000000, 0x0555, 0x2290 }, /* 2/2/2/2/2/2 */
|
||||
#endif
|
||||
{ 0, 0, 0, 0, 0 },
|
||||
};
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Omap1 clocks
|
||||
*-------------------------------------------------------------------------*/
|
||||
|
||||
static struct clk ck_ref = {
|
||||
.name = "ck_ref",
|
||||
.rate = 12000000,
|
||||
.flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX |
|
||||
ALWAYS_ENABLED,
|
||||
.enable = &omap1_clk_enable,
|
||||
.disable = &omap1_clk_disable,
|
||||
};
|
||||
|
||||
static struct clk ck_dpll1 = {
|
||||
.name = "ck_dpll1",
|
||||
.parent = &ck_ref,
|
||||
.flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX |
|
||||
RATE_PROPAGATES | ALWAYS_ENABLED,
|
||||
.enable = &omap1_clk_enable,
|
||||
.disable = &omap1_clk_disable,
|
||||
};
|
||||
|
||||
static struct arm_idlect1_clk ck_dpll1out = {
|
||||
.clk = {
|
||||
.name = "ck_dpll1out",
|
||||
.parent = &ck_dpll1,
|
||||
.flags = CLOCK_IN_OMAP16XX | CLOCK_IDLE_CONTROL,
|
||||
.enable_reg = (void __iomem *)ARM_IDLECT2,
|
||||
.enable_bit = EN_CKOUT_ARM,
|
||||
.recalc = &followparent_recalc,
|
||||
.enable = &omap1_clk_enable,
|
||||
.disable = &omap1_clk_disable,
|
||||
},
|
||||
.idlect_shift = 12,
|
||||
};
|
||||
|
||||
static struct clk arm_ck = {
|
||||
.name = "arm_ck",
|
||||
.parent = &ck_dpll1,
|
||||
.flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX |
|
||||
RATE_CKCTL | RATE_PROPAGATES | ALWAYS_ENABLED,
|
||||
.rate_offset = CKCTL_ARMDIV_OFFSET,
|
||||
.recalc = &omap1_ckctl_recalc,
|
||||
.enable = &omap1_clk_enable,
|
||||
.disable = &omap1_clk_disable,
|
||||
};
|
||||
|
||||
static struct arm_idlect1_clk armper_ck = {
|
||||
.clk = {
|
||||
.name = "armper_ck",
|
||||
.parent = &ck_dpll1,
|
||||
.flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX |
|
||||
RATE_CKCTL | CLOCK_IDLE_CONTROL,
|
||||
.enable_reg = (void __iomem *)ARM_IDLECT2,
|
||||
.enable_bit = EN_PERCK,
|
||||
.rate_offset = CKCTL_PERDIV_OFFSET,
|
||||
.recalc = &omap1_ckctl_recalc,
|
||||
.enable = &omap1_clk_enable,
|
||||
.disable = &omap1_clk_disable,
|
||||
},
|
||||
.idlect_shift = 2,
|
||||
};
|
||||
|
||||
static struct clk arm_gpio_ck = {
|
||||
.name = "arm_gpio_ck",
|
||||
.parent = &ck_dpll1,
|
||||
.flags = CLOCK_IN_OMAP1510,
|
||||
.enable_reg = (void __iomem *)ARM_IDLECT2,
|
||||
.enable_bit = EN_GPIOCK,
|
||||
.recalc = &followparent_recalc,
|
||||
.enable = &omap1_clk_enable,
|
||||
.disable = &omap1_clk_disable,
|
||||
};
|
||||
|
||||
static struct arm_idlect1_clk armxor_ck = {
|
||||
.clk = {
|
||||
.name = "armxor_ck",
|
||||
.parent = &ck_ref,
|
||||
.flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX |
|
||||
CLOCK_IDLE_CONTROL,
|
||||
.enable_reg = (void __iomem *)ARM_IDLECT2,
|
||||
.enable_bit = EN_XORPCK,
|
||||
.recalc = &followparent_recalc,
|
||||
.enable = &omap1_clk_enable,
|
||||
.disable = &omap1_clk_disable,
|
||||
},
|
||||
.idlect_shift = 1,
|
||||
};
|
||||
|
||||
static struct arm_idlect1_clk armtim_ck = {
|
||||
.clk = {
|
||||
.name = "armtim_ck",
|
||||
.parent = &ck_ref,
|
||||
.flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX |
|
||||
CLOCK_IDLE_CONTROL,
|
||||
.enable_reg = (void __iomem *)ARM_IDLECT2,
|
||||
.enable_bit = EN_TIMCK,
|
||||
.recalc = &followparent_recalc,
|
||||
.enable = &omap1_clk_enable,
|
||||
.disable = &omap1_clk_disable,
|
||||
},
|
||||
.idlect_shift = 9,
|
||||
};
|
||||
|
||||
static struct arm_idlect1_clk armwdt_ck = {
|
||||
.clk = {
|
||||
.name = "armwdt_ck",
|
||||
.parent = &ck_ref,
|
||||
.flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX |
|
||||
CLOCK_IDLE_CONTROL,
|
||||
.enable_reg = (void __iomem *)ARM_IDLECT2,
|
||||
.enable_bit = EN_WDTCK,
|
||||
.recalc = &omap1_watchdog_recalc,
|
||||
.enable = &omap1_clk_enable,
|
||||
.disable = &omap1_clk_disable,
|
||||
},
|
||||
.idlect_shift = 0,
|
||||
};
|
||||
|
||||
static struct clk arminth_ck16xx = {
|
||||
.name = "arminth_ck",
|
||||
.parent = &arm_ck,
|
||||
.flags = CLOCK_IN_OMAP16XX | ALWAYS_ENABLED,
|
||||
.recalc = &followparent_recalc,
|
||||
/* Note: On 16xx the frequency can be divided by 2 by programming
|
||||
* ARM_CKCTL:ARM_INTHCK_SEL(14) to 1
|
||||
*
|
||||
* 1510 version is in TC clocks.
|
||||
*/
|
||||
.enable = &omap1_clk_enable,
|
||||
.disable = &omap1_clk_disable,
|
||||
};
|
||||
|
||||
static struct clk dsp_ck = {
|
||||
.name = "dsp_ck",
|
||||
.parent = &ck_dpll1,
|
||||
.flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX |
|
||||
RATE_CKCTL,
|
||||
.enable_reg = (void __iomem *)ARM_CKCTL,
|
||||
.enable_bit = EN_DSPCK,
|
||||
.rate_offset = CKCTL_DSPDIV_OFFSET,
|
||||
.recalc = &omap1_ckctl_recalc,
|
||||
.enable = &omap1_clk_enable,
|
||||
.disable = &omap1_clk_disable,
|
||||
};
|
||||
|
||||
static struct clk dspmmu_ck = {
|
||||
.name = "dspmmu_ck",
|
||||
.parent = &ck_dpll1,
|
||||
.flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX |
|
||||
RATE_CKCTL | ALWAYS_ENABLED,
|
||||
.rate_offset = CKCTL_DSPMMUDIV_OFFSET,
|
||||
.recalc = &omap1_ckctl_recalc,
|
||||
.enable = &omap1_clk_enable,
|
||||
.disable = &omap1_clk_disable,
|
||||
};
|
||||
|
||||
static struct clk dspper_ck = {
|
||||
.name = "dspper_ck",
|
||||
.parent = &ck_dpll1,
|
||||
.flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX |
|
||||
RATE_CKCTL | VIRTUAL_IO_ADDRESS,
|
||||
.enable_reg = (void __iomem *)DSP_IDLECT2,
|
||||
.enable_bit = EN_PERCK,
|
||||
.rate_offset = CKCTL_PERDIV_OFFSET,
|
||||
.recalc = &omap1_ckctl_recalc_dsp_domain,
|
||||
.set_rate = &omap1_clk_set_rate_dsp_domain,
|
||||
.enable = &omap1_clk_enable_dsp_domain,
|
||||
.disable = &omap1_clk_disable_dsp_domain,
|
||||
};
|
||||
|
||||
static struct clk dspxor_ck = {
|
||||
.name = "dspxor_ck",
|
||||
.parent = &ck_ref,
|
||||
.flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX |
|
||||
VIRTUAL_IO_ADDRESS,
|
||||
.enable_reg = (void __iomem *)DSP_IDLECT2,
|
||||
.enable_bit = EN_XORPCK,
|
||||
.recalc = &followparent_recalc,
|
||||
.enable = &omap1_clk_enable_dsp_domain,
|
||||
.disable = &omap1_clk_disable_dsp_domain,
|
||||
};
|
||||
|
||||
static struct clk dsptim_ck = {
|
||||
.name = "dsptim_ck",
|
||||
.parent = &ck_ref,
|
||||
.flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX |
|
||||
VIRTUAL_IO_ADDRESS,
|
||||
.enable_reg = (void __iomem *)DSP_IDLECT2,
|
||||
.enable_bit = EN_DSPTIMCK,
|
||||
.recalc = &followparent_recalc,
|
||||
.enable = &omap1_clk_enable_dsp_domain,
|
||||
.disable = &omap1_clk_disable_dsp_domain,
|
||||
};
|
||||
|
||||
/* Tie ARM_IDLECT1:IDLIF_ARM to this logical clock structure */
|
||||
static struct arm_idlect1_clk tc_ck = {
|
||||
.clk = {
|
||||
.name = "tc_ck",
|
||||
.parent = &ck_dpll1,
|
||||
.flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX |
|
||||
CLOCK_IN_OMAP730 | RATE_CKCTL |
|
||||
RATE_PROPAGATES | ALWAYS_ENABLED |
|
||||
CLOCK_IDLE_CONTROL,
|
||||
.rate_offset = CKCTL_TCDIV_OFFSET,
|
||||
.recalc = &omap1_ckctl_recalc,
|
||||
.enable = &omap1_clk_enable,
|
||||
.disable = &omap1_clk_disable,
|
||||
},
|
||||
.idlect_shift = 6,
|
||||
};
|
||||
|
||||
static struct clk arminth_ck1510 = {
|
||||
.name = "arminth_ck",
|
||||
.parent = &tc_ck.clk,
|
||||
.flags = CLOCK_IN_OMAP1510 | ALWAYS_ENABLED,
|
||||
.recalc = &followparent_recalc,
|
||||
/* Note: On 1510 the frequency follows TC_CK
|
||||
*
|
||||
* 16xx version is in MPU clocks.
|
||||
*/
|
||||
.enable = &omap1_clk_enable,
|
||||
.disable = &omap1_clk_disable,
|
||||
};
|
||||
|
||||
static struct clk tipb_ck = {
|
||||
/* No-idle controlled by "tc_ck" */
|
||||
.name = "tibp_ck",
|
||||
.parent = &tc_ck.clk,
|
||||
.flags = CLOCK_IN_OMAP1510 | ALWAYS_ENABLED,
|
||||
.recalc = &followparent_recalc,
|
||||
.enable = &omap1_clk_enable,
|
||||
.disable = &omap1_clk_disable,
|
||||
};
|
||||
|
||||
static struct clk l3_ocpi_ck = {
|
||||
/* No-idle controlled by "tc_ck" */
|
||||
.name = "l3_ocpi_ck",
|
||||
.parent = &tc_ck.clk,
|
||||
.flags = CLOCK_IN_OMAP16XX,
|
||||
.enable_reg = (void __iomem *)ARM_IDLECT3,
|
||||
.enable_bit = EN_OCPI_CK,
|
||||
.recalc = &followparent_recalc,
|
||||
.enable = &omap1_clk_enable,
|
||||
.disable = &omap1_clk_disable,
|
||||
};
|
||||
|
||||
static struct clk tc1_ck = {
|
||||
.name = "tc1_ck",
|
||||
.parent = &tc_ck.clk,
|
||||
.flags = CLOCK_IN_OMAP16XX,
|
||||
.enable_reg = (void __iomem *)ARM_IDLECT3,
|
||||
.enable_bit = EN_TC1_CK,
|
||||
.recalc = &followparent_recalc,
|
||||
.enable = &omap1_clk_enable,
|
||||
.disable = &omap1_clk_disable,
|
||||
};
|
||||
|
||||
static struct clk tc2_ck = {
|
||||
.name = "tc2_ck",
|
||||
.parent = &tc_ck.clk,
|
||||
.flags = CLOCK_IN_OMAP16XX,
|
||||
.enable_reg = (void __iomem *)ARM_IDLECT3,
|
||||
.enable_bit = EN_TC2_CK,
|
||||
.recalc = &followparent_recalc,
|
||||
.enable = &omap1_clk_enable,
|
||||
.disable = &omap1_clk_disable,
|
||||
};
|
||||
|
||||
static struct clk dma_ck = {
|
||||
/* No-idle controlled by "tc_ck" */
|
||||
.name = "dma_ck",
|
||||
.parent = &tc_ck.clk,
|
||||
.flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX |
|
||||
ALWAYS_ENABLED,
|
||||
.recalc = &followparent_recalc,
|
||||
.enable = &omap1_clk_enable,
|
||||
.disable = &omap1_clk_disable,
|
||||
};
|
||||
|
||||
static struct clk dma_lcdfree_ck = {
|
||||
.name = "dma_lcdfree_ck",
|
||||
.parent = &tc_ck.clk,
|
||||
.flags = CLOCK_IN_OMAP16XX | ALWAYS_ENABLED,
|
||||
.recalc = &followparent_recalc,
|
||||
.enable = &omap1_clk_enable,
|
||||
.disable = &omap1_clk_disable,
|
||||
};
|
||||
|
||||
static struct arm_idlect1_clk api_ck = {
|
||||
.clk = {
|
||||
.name = "api_ck",
|
||||
.parent = &tc_ck.clk,
|
||||
.flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX |
|
||||
CLOCK_IDLE_CONTROL,
|
||||
.enable_reg = (void __iomem *)ARM_IDLECT2,
|
||||
.enable_bit = EN_APICK,
|
||||
.recalc = &followparent_recalc,
|
||||
.enable = &omap1_clk_enable,
|
||||
.disable = &omap1_clk_disable,
|
||||
},
|
||||
.idlect_shift = 8,
|
||||
};
|
||||
|
||||
static struct arm_idlect1_clk lb_ck = {
|
||||
.clk = {
|
||||
.name = "lb_ck",
|
||||
.parent = &tc_ck.clk,
|
||||
.flags = CLOCK_IN_OMAP1510 | CLOCK_IDLE_CONTROL,
|
||||
.enable_reg = (void __iomem *)ARM_IDLECT2,
|
||||
.enable_bit = EN_LBCK,
|
||||
.recalc = &followparent_recalc,
|
||||
.enable = &omap1_clk_enable,
|
||||
.disable = &omap1_clk_disable,
|
||||
},
|
||||
.idlect_shift = 4,
|
||||
};
|
||||
|
||||
static struct clk rhea1_ck = {
|
||||
.name = "rhea1_ck",
|
||||
.parent = &tc_ck.clk,
|
||||
.flags = CLOCK_IN_OMAP16XX | ALWAYS_ENABLED,
|
||||
.recalc = &followparent_recalc,
|
||||
.enable = &omap1_clk_enable,
|
||||
.disable = &omap1_clk_disable,
|
||||
};
|
||||
|
||||
static struct clk rhea2_ck = {
|
||||
.name = "rhea2_ck",
|
||||
.parent = &tc_ck.clk,
|
||||
.flags = CLOCK_IN_OMAP16XX | ALWAYS_ENABLED,
|
||||
.recalc = &followparent_recalc,
|
||||
.enable = &omap1_clk_enable,
|
||||
.disable = &omap1_clk_disable,
|
||||
};
|
||||
|
||||
static struct clk lcd_ck_16xx = {
|
||||
.name = "lcd_ck",
|
||||
.parent = &ck_dpll1,
|
||||
.flags = CLOCK_IN_OMAP16XX | CLOCK_IN_OMAP730 | RATE_CKCTL,
|
||||
.enable_reg = (void __iomem *)ARM_IDLECT2,
|
||||
.enable_bit = EN_LCDCK,
|
||||
.rate_offset = CKCTL_LCDDIV_OFFSET,
|
||||
.recalc = &omap1_ckctl_recalc,
|
||||
.enable = &omap1_clk_enable,
|
||||
.disable = &omap1_clk_disable,
|
||||
};
|
||||
|
||||
static struct arm_idlect1_clk lcd_ck_1510 = {
|
||||
.clk = {
|
||||
.name = "lcd_ck",
|
||||
.parent = &ck_dpll1,
|
||||
.flags = CLOCK_IN_OMAP1510 | RATE_CKCTL |
|
||||
CLOCK_IDLE_CONTROL,
|
||||
.enable_reg = (void __iomem *)ARM_IDLECT2,
|
||||
.enable_bit = EN_LCDCK,
|
||||
.rate_offset = CKCTL_LCDDIV_OFFSET,
|
||||
.recalc = &omap1_ckctl_recalc,
|
||||
.enable = &omap1_clk_enable,
|
||||
.disable = &omap1_clk_disable,
|
||||
},
|
||||
.idlect_shift = 3,
|
||||
};
|
||||
|
||||
static struct clk uart1_1510 = {
|
||||
.name = "uart1_ck",
|
||||
/* Direct from ULPD, no real parent */
|
||||
.parent = &armper_ck.clk,
|
||||
.rate = 12000000,
|
||||
.flags = CLOCK_IN_OMAP1510 | ENABLE_REG_32BIT |
|
||||
ALWAYS_ENABLED | CLOCK_NO_IDLE_PARENT,
|
||||
.enable_reg = (void __iomem *)MOD_CONF_CTRL_0,
|
||||
.enable_bit = 29, /* Chooses between 12MHz and 48MHz */
|
||||
.set_rate = &omap1_set_uart_rate,
|
||||
.recalc = &omap1_uart_recalc,
|
||||
.enable = &omap1_clk_enable,
|
||||
.disable = &omap1_clk_disable,
|
||||
};
|
||||
|
||||
static struct uart_clk uart1_16xx = {
|
||||
.clk = {
|
||||
.name = "uart1_ck",
|
||||
/* Direct from ULPD, no real parent */
|
||||
.parent = &armper_ck.clk,
|
||||
.rate = 48000000,
|
||||
.flags = CLOCK_IN_OMAP16XX | RATE_FIXED |
|
||||
ENABLE_REG_32BIT | CLOCK_NO_IDLE_PARENT,
|
||||
.enable_reg = (void __iomem *)MOD_CONF_CTRL_0,
|
||||
.enable_bit = 29,
|
||||
.enable = &omap1_clk_enable_uart_functional,
|
||||
.disable = &omap1_clk_disable_uart_functional,
|
||||
},
|
||||
.sysc_addr = 0xfffb0054,
|
||||
};
|
||||
|
||||
static struct clk uart2_ck = {
|
||||
.name = "uart2_ck",
|
||||
/* Direct from ULPD, no real parent */
|
||||
.parent = &armper_ck.clk,
|
||||
.rate = 12000000,
|
||||
.flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX |
|
||||
ENABLE_REG_32BIT | ALWAYS_ENABLED |
|
||||
CLOCK_NO_IDLE_PARENT,
|
||||
.enable_reg = (void __iomem *)MOD_CONF_CTRL_0,
|
||||
.enable_bit = 30, /* Chooses between 12MHz and 48MHz */
|
||||
.set_rate = &omap1_set_uart_rate,
|
||||
.recalc = &omap1_uart_recalc,
|
||||
.enable = &omap1_clk_enable,
|
||||
.disable = &omap1_clk_disable,
|
||||
};
|
||||
|
||||
static struct clk uart3_1510 = {
|
||||
.name = "uart3_ck",
|
||||
/* Direct from ULPD, no real parent */
|
||||
.parent = &armper_ck.clk,
|
||||
.rate = 12000000,
|
||||
.flags = CLOCK_IN_OMAP1510 | ENABLE_REG_32BIT |
|
||||
ALWAYS_ENABLED | CLOCK_NO_IDLE_PARENT,
|
||||
.enable_reg = (void __iomem *)MOD_CONF_CTRL_0,
|
||||
.enable_bit = 31, /* Chooses between 12MHz and 48MHz */
|
||||
.set_rate = &omap1_set_uart_rate,
|
||||
.recalc = &omap1_uart_recalc,
|
||||
.enable = &omap1_clk_enable,
|
||||
.disable = &omap1_clk_disable,
|
||||
};
|
||||
|
||||
static struct uart_clk uart3_16xx = {
|
||||
.clk = {
|
||||
.name = "uart3_ck",
|
||||
/* Direct from ULPD, no real parent */
|
||||
.parent = &armper_ck.clk,
|
||||
.rate = 48000000,
|
||||
.flags = CLOCK_IN_OMAP16XX | RATE_FIXED |
|
||||
ENABLE_REG_32BIT | CLOCK_NO_IDLE_PARENT,
|
||||
.enable_reg = (void __iomem *)MOD_CONF_CTRL_0,
|
||||
.enable_bit = 31,
|
||||
.enable = &omap1_clk_enable_uart_functional,
|
||||
.disable = &omap1_clk_disable_uart_functional,
|
||||
},
|
||||
.sysc_addr = 0xfffb9854,
|
||||
};
|
||||
|
||||
static struct clk usb_clko = { /* 6 MHz output on W4_USB_CLKO */
|
||||
.name = "usb_clko",
|
||||
/* Direct from ULPD, no parent */
|
||||
.rate = 6000000,
|
||||
.flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX |
|
||||
RATE_FIXED | ENABLE_REG_32BIT,
|
||||
.enable_reg = (void __iomem *)ULPD_CLOCK_CTRL,
|
||||
.enable_bit = USB_MCLK_EN_BIT,
|
||||
.enable = &omap1_clk_enable,
|
||||
.disable = &omap1_clk_disable,
|
||||
};
|
||||
|
||||
static struct clk usb_hhc_ck1510 = {
|
||||
.name = "usb_hhc_ck",
|
||||
/* Direct from ULPD, no parent */
|
||||
.rate = 48000000, /* Actually 2 clocks, 12MHz and 48MHz */
|
||||
.flags = CLOCK_IN_OMAP1510 |
|
||||
RATE_FIXED | ENABLE_REG_32BIT,
|
||||
.enable_reg = (void __iomem *)MOD_CONF_CTRL_0,
|
||||
.enable_bit = USB_HOST_HHC_UHOST_EN,
|
||||
.enable = &omap1_clk_enable,
|
||||
.disable = &omap1_clk_disable,
|
||||
};
|
||||
|
||||
static struct clk usb_hhc_ck16xx = {
|
||||
.name = "usb_hhc_ck",
|
||||
/* Direct from ULPD, no parent */
|
||||
.rate = 48000000,
|
||||
/* OTG_SYSCON_2.OTG_PADEN == 0 (not 1510-compatible) */
|
||||
.flags = CLOCK_IN_OMAP16XX |
|
||||
RATE_FIXED | ENABLE_REG_32BIT,
|
||||
.enable_reg = (void __iomem *)OTG_BASE + 0x08 /* OTG_SYSCON_2 */,
|
||||
.enable_bit = 8 /* UHOST_EN */,
|
||||
.enable = &omap1_clk_enable,
|
||||
.disable = &omap1_clk_disable,
|
||||
};
|
||||
|
||||
static struct clk usb_dc_ck = {
|
||||
.name = "usb_dc_ck",
|
||||
/* Direct from ULPD, no parent */
|
||||
.rate = 48000000,
|
||||
.flags = CLOCK_IN_OMAP16XX | RATE_FIXED,
|
||||
.enable_reg = (void __iomem *)SOFT_REQ_REG,
|
||||
.enable_bit = 4,
|
||||
.enable = &omap1_clk_enable,
|
||||
.disable = &omap1_clk_disable,
|
||||
};
|
||||
|
||||
static struct clk mclk_1510 = {
|
||||
.name = "mclk",
|
||||
/* Direct from ULPD, no parent. May be enabled by ext hardware. */
|
||||
.rate = 12000000,
|
||||
.flags = CLOCK_IN_OMAP1510 | RATE_FIXED,
|
||||
.enable = &omap1_clk_enable,
|
||||
.disable = &omap1_clk_disable,
|
||||
};
|
||||
|
||||
static struct clk mclk_16xx = {
|
||||
.name = "mclk",
|
||||
/* Direct from ULPD, no parent. May be enabled by ext hardware. */
|
||||
.flags = CLOCK_IN_OMAP16XX,
|
||||
.enable_reg = (void __iomem *)COM_CLK_DIV_CTRL_SEL,
|
||||
.enable_bit = COM_ULPD_PLL_CLK_REQ,
|
||||
.set_rate = &omap1_set_ext_clk_rate,
|
||||
.round_rate = &omap1_round_ext_clk_rate,
|
||||
.init = &omap1_init_ext_clk,
|
||||
.enable = &omap1_clk_enable,
|
||||
.disable = &omap1_clk_disable,
|
||||
};
|
||||
|
||||
static struct clk bclk_1510 = {
|
||||
.name = "bclk",
|
||||
/* Direct from ULPD, no parent. May be enabled by ext hardware. */
|
||||
.rate = 12000000,
|
||||
.flags = CLOCK_IN_OMAP1510 | RATE_FIXED,
|
||||
.enable = &omap1_clk_enable,
|
||||
.disable = &omap1_clk_disable,
|
||||
};
|
||||
|
||||
static struct clk bclk_16xx = {
|
||||
.name = "bclk",
|
||||
/* Direct from ULPD, no parent. May be enabled by ext hardware. */
|
||||
.flags = CLOCK_IN_OMAP16XX,
|
||||
.enable_reg = (void __iomem *)SWD_CLK_DIV_CTRL_SEL,
|
||||
.enable_bit = SWD_ULPD_PLL_CLK_REQ,
|
||||
.set_rate = &omap1_set_ext_clk_rate,
|
||||
.round_rate = &omap1_round_ext_clk_rate,
|
||||
.init = &omap1_init_ext_clk,
|
||||
.enable = &omap1_clk_enable,
|
||||
.disable = &omap1_clk_disable,
|
||||
};
|
||||
|
||||
static struct clk mmc1_ck = {
|
||||
.name = "mmc1_ck",
|
||||
/* Functional clock is direct from ULPD, interface clock is ARMPER */
|
||||
.parent = &armper_ck.clk,
|
||||
.rate = 48000000,
|
||||
.flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX |
|
||||
RATE_FIXED | ENABLE_REG_32BIT | CLOCK_NO_IDLE_PARENT,
|
||||
.enable_reg = (void __iomem *)MOD_CONF_CTRL_0,
|
||||
.enable_bit = 23,
|
||||
.enable = &omap1_clk_enable,
|
||||
.disable = &omap1_clk_disable,
|
||||
};
|
||||
|
||||
static struct clk mmc2_ck = {
|
||||
.name = "mmc2_ck",
|
||||
/* Functional clock is direct from ULPD, interface clock is ARMPER */
|
||||
.parent = &armper_ck.clk,
|
||||
.rate = 48000000,
|
||||
.flags = CLOCK_IN_OMAP16XX |
|
||||
RATE_FIXED | ENABLE_REG_32BIT | CLOCK_NO_IDLE_PARENT,
|
||||
.enable_reg = (void __iomem *)MOD_CONF_CTRL_0,
|
||||
.enable_bit = 20,
|
||||
.enable = &omap1_clk_enable,
|
||||
.disable = &omap1_clk_disable,
|
||||
};
|
||||
|
||||
static struct clk virtual_ck_mpu = {
|
||||
.name = "mpu",
|
||||
.flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX |
|
||||
VIRTUAL_CLOCK | ALWAYS_ENABLED,
|
||||
.parent = &arm_ck, /* Is smarter alias for */
|
||||
.recalc = &followparent_recalc,
|
||||
.set_rate = &omap1_select_table_rate,
|
||||
.round_rate = &omap1_round_to_table_rate,
|
||||
.enable = &omap1_clk_enable,
|
||||
.disable = &omap1_clk_disable,
|
||||
};
|
||||
|
||||
static struct clk * onchip_clks[] = {
|
||||
/* non-ULPD clocks */
|
||||
&ck_ref,
|
||||
&ck_dpll1,
|
||||
/* CK_GEN1 clocks */
|
||||
&ck_dpll1out.clk,
|
||||
&arm_ck,
|
||||
&armper_ck.clk,
|
||||
&arm_gpio_ck,
|
||||
&armxor_ck.clk,
|
||||
&armtim_ck.clk,
|
||||
&armwdt_ck.clk,
|
||||
&arminth_ck1510, &arminth_ck16xx,
|
||||
/* CK_GEN2 clocks */
|
||||
&dsp_ck,
|
||||
&dspmmu_ck,
|
||||
&dspper_ck,
|
||||
&dspxor_ck,
|
||||
&dsptim_ck,
|
||||
/* CK_GEN3 clocks */
|
||||
&tc_ck.clk,
|
||||
&tipb_ck,
|
||||
&l3_ocpi_ck,
|
||||
&tc1_ck,
|
||||
&tc2_ck,
|
||||
&dma_ck,
|
||||
&dma_lcdfree_ck,
|
||||
&api_ck.clk,
|
||||
&lb_ck.clk,
|
||||
&rhea1_ck,
|
||||
&rhea2_ck,
|
||||
&lcd_ck_16xx,
|
||||
&lcd_ck_1510.clk,
|
||||
/* ULPD clocks */
|
||||
&uart1_1510,
|
||||
&uart1_16xx.clk,
|
||||
&uart2_ck,
|
||||
&uart3_1510,
|
||||
&uart3_16xx.clk,
|
||||
&usb_clko,
|
||||
&usb_hhc_ck1510, &usb_hhc_ck16xx,
|
||||
&usb_dc_ck,
|
||||
&mclk_1510, &mclk_16xx,
|
||||
&bclk_1510, &bclk_16xx,
|
||||
&mmc1_ck,
|
||||
&mmc2_ck,
|
||||
/* Virtual clocks */
|
||||
&virtual_ck_mpu,
|
||||
};
|
||||
|
||||
#endif
|
@ -25,56 +25,7 @@
|
||||
#include <asm/arch/mux.h>
|
||||
#include <asm/arch/gpio.h>
|
||||
|
||||
|
||||
static void omap_nop_release(struct device *dev)
|
||||
{
|
||||
/* Nothing */
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
#if defined(CONFIG_I2C_OMAP) || defined(CONFIG_I2C_OMAP_MODULE)
|
||||
|
||||
#define OMAP_I2C_BASE 0xfffb3800
|
||||
|
||||
static struct resource i2c_resources[] = {
|
||||
{
|
||||
.start = OMAP_I2C_BASE,
|
||||
.end = OMAP_I2C_BASE + 0x3f,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
{
|
||||
.start = INT_I2C,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
};
|
||||
|
||||
/* DMA not used; works around erratum writing to non-empty i2c fifo */
|
||||
|
||||
static struct platform_device omap_i2c_device = {
|
||||
.name = "i2c_omap",
|
||||
.id = -1,
|
||||
.dev = {
|
||||
.release = omap_nop_release,
|
||||
},
|
||||
.num_resources = ARRAY_SIZE(i2c_resources),
|
||||
.resource = i2c_resources,
|
||||
};
|
||||
|
||||
static void omap_init_i2c(void)
|
||||
{
|
||||
/* FIXME define and use a boot tag, in case of boards that
|
||||
* either don't wire up I2C, or chips that mux it differently...
|
||||
* it can include clocking and address info, maybe more.
|
||||
*/
|
||||
omap_cfg_reg(I2C_SCL);
|
||||
omap_cfg_reg(I2C_SDA);
|
||||
|
||||
(void) platform_device_register(&omap_i2c_device);
|
||||
}
|
||||
#else
|
||||
static inline void omap_init_i2c(void) {}
|
||||
#endif
|
||||
extern void omap_nop_release(struct device *dev);
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
@ -110,137 +61,6 @@ static inline void omap_init_irda(void) {}
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
#if defined(CONFIG_MMC_OMAP) || defined(CONFIG_MMC_OMAP_MODULE)
|
||||
|
||||
#define OMAP_MMC1_BASE 0xfffb7800
|
||||
#define OMAP_MMC2_BASE 0xfffb7c00 /* omap16xx only */
|
||||
|
||||
static struct omap_mmc_conf mmc1_conf;
|
||||
|
||||
static u64 mmc1_dmamask = 0xffffffff;
|
||||
|
||||
static struct resource mmc1_resources[] = {
|
||||
{
|
||||
.start = IO_ADDRESS(OMAP_MMC1_BASE),
|
||||
.end = IO_ADDRESS(OMAP_MMC1_BASE) + 0x7f,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
{
|
||||
.start = INT_MMC,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
};
|
||||
|
||||
static struct platform_device mmc_omap_device1 = {
|
||||
.name = "mmci-omap",
|
||||
.id = 1,
|
||||
.dev = {
|
||||
.release = omap_nop_release,
|
||||
.dma_mask = &mmc1_dmamask,
|
||||
.platform_data = &mmc1_conf,
|
||||
},
|
||||
.num_resources = ARRAY_SIZE(mmc1_resources),
|
||||
.resource = mmc1_resources,
|
||||
};
|
||||
|
||||
#ifdef CONFIG_ARCH_OMAP16XX
|
||||
|
||||
static struct omap_mmc_conf mmc2_conf;
|
||||
|
||||
static u64 mmc2_dmamask = 0xffffffff;
|
||||
|
||||
static struct resource mmc2_resources[] = {
|
||||
{
|
||||
.start = IO_ADDRESS(OMAP_MMC2_BASE),
|
||||
.end = IO_ADDRESS(OMAP_MMC2_BASE) + 0x7f,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
{
|
||||
.start = INT_1610_MMC2,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
};
|
||||
|
||||
static struct platform_device mmc_omap_device2 = {
|
||||
.name = "mmci-omap",
|
||||
.id = 2,
|
||||
.dev = {
|
||||
.release = omap_nop_release,
|
||||
.dma_mask = &mmc2_dmamask,
|
||||
.platform_data = &mmc2_conf,
|
||||
},
|
||||
.num_resources = ARRAY_SIZE(mmc2_resources),
|
||||
.resource = mmc2_resources,
|
||||
};
|
||||
#endif
|
||||
|
||||
static void __init omap_init_mmc(void)
|
||||
{
|
||||
const struct omap_mmc_config *mmc_conf;
|
||||
const struct omap_mmc_conf *mmc;
|
||||
|
||||
/* NOTE: assumes MMC was never (wrongly) enabled */
|
||||
mmc_conf = omap_get_config(OMAP_TAG_MMC, struct omap_mmc_config);
|
||||
if (!mmc_conf)
|
||||
return;
|
||||
|
||||
/* block 1 is always available and has just one pinout option */
|
||||
mmc = &mmc_conf->mmc[0];
|
||||
if (mmc->enabled) {
|
||||
omap_cfg_reg(MMC_CMD);
|
||||
omap_cfg_reg(MMC_CLK);
|
||||
omap_cfg_reg(MMC_DAT0);
|
||||
if (cpu_is_omap1710()) {
|
||||
omap_cfg_reg(M15_1710_MMC_CLKI);
|
||||
omap_cfg_reg(P19_1710_MMC_CMDDIR);
|
||||
omap_cfg_reg(P20_1710_MMC_DATDIR0);
|
||||
}
|
||||
if (mmc->wire4) {
|
||||
omap_cfg_reg(MMC_DAT1);
|
||||
/* NOTE: DAT2 can be on W10 (here) or M15 */
|
||||
if (!mmc->nomux)
|
||||
omap_cfg_reg(MMC_DAT2);
|
||||
omap_cfg_reg(MMC_DAT3);
|
||||
}
|
||||
mmc1_conf = *mmc;
|
||||
(void) platform_device_register(&mmc_omap_device1);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_ARCH_OMAP16XX
|
||||
/* block 2 is on newer chips, and has many pinout options */
|
||||
mmc = &mmc_conf->mmc[1];
|
||||
if (mmc->enabled) {
|
||||
if (!mmc->nomux) {
|
||||
omap_cfg_reg(Y8_1610_MMC2_CMD);
|
||||
omap_cfg_reg(Y10_1610_MMC2_CLK);
|
||||
omap_cfg_reg(R18_1610_MMC2_CLKIN);
|
||||
omap_cfg_reg(W8_1610_MMC2_DAT0);
|
||||
if (mmc->wire4) {
|
||||
omap_cfg_reg(V8_1610_MMC2_DAT1);
|
||||
omap_cfg_reg(W15_1610_MMC2_DAT2);
|
||||
omap_cfg_reg(R10_1610_MMC2_DAT3);
|
||||
}
|
||||
|
||||
/* These are needed for the level shifter */
|
||||
omap_cfg_reg(V9_1610_MMC2_CMDDIR);
|
||||
omap_cfg_reg(V5_1610_MMC2_DATDIR0);
|
||||
omap_cfg_reg(W19_1610_MMC2_DATDIR1);
|
||||
}
|
||||
|
||||
/* Feedback clock must be set on OMAP-1710 MMC2 */
|
||||
if (cpu_is_omap1710())
|
||||
omap_writel(omap_readl(MOD_CONF_CTRL_1) | (1 << 24),
|
||||
MOD_CONF_CTRL_1);
|
||||
mmc2_conf = *mmc;
|
||||
(void) platform_device_register(&mmc_omap_device2);
|
||||
}
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
#else
|
||||
static inline void omap_init_mmc(void) {}
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_OMAP_RTC) || defined(CONFIG_OMAP_RTC)
|
||||
|
||||
#define OMAP_RTC_BASE 0xfffb4800
|
||||
@ -279,38 +99,6 @@ static void omap_init_rtc(void)
|
||||
static inline void omap_init_rtc(void) {}
|
||||
#endif
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
#if defined(CONFIG_OMAP16XX_WATCHDOG) || defined(CONFIG_OMAP16XX_WATCHDOG_MODULE)
|
||||
|
||||
#define OMAP_WDT_BASE 0xfffeb000
|
||||
|
||||
static struct resource wdt_resources[] = {
|
||||
{
|
||||
.start = OMAP_WDT_BASE,
|
||||
.end = OMAP_WDT_BASE + 0x4f,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
};
|
||||
|
||||
static struct platform_device omap_wdt_device = {
|
||||
.name = "omap1610_wdt",
|
||||
.id = -1,
|
||||
.dev = {
|
||||
.release = omap_nop_release,
|
||||
},
|
||||
.num_resources = ARRAY_SIZE(wdt_resources),
|
||||
.resource = wdt_resources,
|
||||
};
|
||||
|
||||
static void omap_init_wdt(void)
|
||||
{
|
||||
(void) platform_device_register(&omap_wdt_device);
|
||||
}
|
||||
#else
|
||||
static inline void omap_init_wdt(void) {}
|
||||
#endif
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
@ -334,18 +122,15 @@ static inline void omap_init_wdt(void) {}
|
||||
* may be handled by the boot loader, and drivers should expect it will
|
||||
* normally have been done by the time they're probed.
|
||||
*/
|
||||
static int __init omap_init_devices(void)
|
||||
static int __init omap1_init_devices(void)
|
||||
{
|
||||
/* please keep these calls, and their implementations above,
|
||||
* in alphabetical order so they're easier to sort through.
|
||||
*/
|
||||
omap_init_i2c();
|
||||
omap_init_irda();
|
||||
omap_init_mmc();
|
||||
omap_init_rtc();
|
||||
omap_init_wdt();
|
||||
|
||||
return 0;
|
||||
}
|
||||
arch_initcall(omap_init_devices);
|
||||
arch_initcall(omap1_init_devices);
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user