Merge rsync://rsync.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
This commit is contained in:
Коммит
7b7e394185
6
CREDITS
6
CREDITS
|
@ -3382,7 +3382,7 @@ S: Germany
|
|||
|
||||
N: Geert Uytterhoeven
|
||||
E: geert@linux-m68k.org
|
||||
W: http://home.tvd.be/cr26864/
|
||||
W: http://users.telenet.be/geertu/
|
||||
P: 1024/862678A6 C51D 361C 0BD1 4C90 B275 C553 6EEA 11BA 8626 78A6
|
||||
D: m68k/Amiga and PPC/CHRP Longtrail coordinator
|
||||
D: Frame buffer device and XF68_FBDev maintainer
|
||||
|
@ -3392,8 +3392,8 @@ D: Amiga Buddha and Catweasel chipset IDE
|
|||
D: Atari Falcon chipset IDE
|
||||
D: Amiga Gayle chipset IDE
|
||||
D: mipsel NEC DDB Vrc-5074
|
||||
S: Emiel Vlieberghlaan 2A/21
|
||||
S: B-3010 Kessel-Lo
|
||||
S: Haterbeekstraat 55B
|
||||
S: B-3200 Aarschot
|
||||
S: Belgium
|
||||
|
||||
N: Chris Vance
|
||||
|
|
|
@ -33,7 +33,9 @@ pci_alloc_consistent(struct pci_dev *dev, size_t size,
|
|||
|
||||
Consistent memory is memory for which a write by either the device or
|
||||
the processor can immediately be read by the processor or device
|
||||
without having to worry about caching effects.
|
||||
without having to worry about caching effects. (You may however need
|
||||
to make sure to flush the processor's write buffers before telling
|
||||
devices to read that memory.)
|
||||
|
||||
This routine allocates a region of <size> bytes of consistent memory.
|
||||
it also returns a <dma_handle> which may be cast to an unsigned
|
||||
|
@ -304,12 +306,12 @@ dma address with dma_mapping_error(). A non zero return value means the mapping
|
|||
could not be created and the driver should take appropriate action (eg
|
||||
reduce current DMA mapping usage or delay and try again later).
|
||||
|
||||
int
|
||||
dma_map_sg(struct device *dev, struct scatterlist *sg, int nents,
|
||||
enum dma_data_direction direction)
|
||||
int
|
||||
pci_map_sg(struct pci_dev *hwdev, struct scatterlist *sg,
|
||||
int nents, int direction)
|
||||
int
|
||||
dma_map_sg(struct device *dev, struct scatterlist *sg,
|
||||
int nents, enum dma_data_direction direction)
|
||||
int
|
||||
pci_map_sg(struct pci_dev *hwdev, struct scatterlist *sg,
|
||||
int nents, int direction)
|
||||
|
||||
Maps a scatter gather list from the block layer.
|
||||
|
||||
|
@ -327,12 +329,33 @@ critical that the driver do something, in the case of a block driver
|
|||
aborting the request or even oopsing is better than doing nothing and
|
||||
corrupting the filesystem.
|
||||
|
||||
void
|
||||
dma_unmap_sg(struct device *dev, struct scatterlist *sg, int nhwentries,
|
||||
enum dma_data_direction direction)
|
||||
void
|
||||
pci_unmap_sg(struct pci_dev *hwdev, struct scatterlist *sg,
|
||||
int nents, int direction)
|
||||
With scatterlists, you use the resulting mapping like this:
|
||||
|
||||
int i, count = dma_map_sg(dev, sglist, nents, direction);
|
||||
struct scatterlist *sg;
|
||||
|
||||
for (i = 0, sg = sglist; i < count; i++, sg++) {
|
||||
hw_address[i] = sg_dma_address(sg);
|
||||
hw_len[i] = sg_dma_len(sg);
|
||||
}
|
||||
|
||||
where nents is the number of entries in the sglist.
|
||||
|
||||
The implementation is free to merge several consecutive sglist entries
|
||||
into one (e.g. with an IOMMU, or if several pages just happen to be
|
||||
physically contiguous) and returns the actual number of sg entries it
|
||||
mapped them to. On failure 0, is returned.
|
||||
|
||||
Then you should loop count times (note: this can be less than nents times)
|
||||
and use sg_dma_address() and sg_dma_len() macros where you previously
|
||||
accessed sg->address and sg->length as shown above.
|
||||
|
||||
void
|
||||
dma_unmap_sg(struct device *dev, struct scatterlist *sg,
|
||||
int nhwentries, enum dma_data_direction direction)
|
||||
void
|
||||
pci_unmap_sg(struct pci_dev *hwdev, struct scatterlist *sg,
|
||||
int nents, int direction)
|
||||
|
||||
unmap the previously mapped scatter/gather list. All the parameters
|
||||
must be the same as those and passed in to the scatter/gather mapping
|
||||
|
|
|
@ -58,11 +58,15 @@ translating each of those pages back to a kernel address using
|
|||
something like __va(). [ EDIT: Update this when we integrate
|
||||
Gerd Knorr's generic code which does this. ]
|
||||
|
||||
This rule also means that you may not use kernel image addresses
|
||||
(ie. items in the kernel's data/text/bss segment, or your driver's)
|
||||
nor may you use kernel stack addresses for DMA. Both of these items
|
||||
might be mapped somewhere entirely different than the rest of physical
|
||||
memory.
|
||||
This rule also means that you may use neither kernel image addresses
|
||||
(items in data/text/bss segments), nor module image addresses, nor
|
||||
stack addresses for DMA. These could all be mapped somewhere entirely
|
||||
different than the rest of physical memory. Even if those classes of
|
||||
memory could physically work with DMA, you'd need to ensure the I/O
|
||||
buffers were cacheline-aligned. Without that, you'd see cacheline
|
||||
sharing problems (data corruption) on CPUs with DMA-incoherent caches.
|
||||
(The CPU could write to one word, DMA would write to a different one
|
||||
in the same cache line, and one of them could be overwritten.)
|
||||
|
||||
Also, this means that you cannot take the return of a kmap()
|
||||
call and DMA to/from that. This is similar to vmalloc().
|
||||
|
@ -194,7 +198,7 @@ document for how to handle this case.
|
|||
Finally, if your device can only drive the low 24-bits of
|
||||
address during PCI bus mastering you might do something like:
|
||||
|
||||
if (pci_set_dma_mask(pdev, 0x00ffffff)) {
|
||||
if (pci_set_dma_mask(pdev, DMA_24BIT_MASK)) {
|
||||
printk(KERN_WARNING
|
||||
"mydev: 24-bit DMA addressing not available.\n");
|
||||
goto ignore_this_device;
|
||||
|
@ -212,7 +216,7 @@ functions (for example a sound card provides playback and record
|
|||
functions) and the various different functions have _different_
|
||||
DMA addressing limitations, you may wish to probe each mask and
|
||||
only provide the functionality which the machine can handle. It
|
||||
is important that the last call to pci_set_dma_mask() be for the
|
||||
is important that the last call to pci_set_dma_mask() be for the
|
||||
most specific mask.
|
||||
|
||||
Here is pseudo-code showing how this might be done:
|
||||
|
@ -284,6 +288,11 @@ There are two types of DMA mappings:
|
|||
|
||||
in order to get correct behavior on all platforms.
|
||||
|
||||
Also, on some platforms your driver may need to flush CPU write
|
||||
buffers in much the same way as it needs to flush write buffers
|
||||
found in PCI bridges (such as by reading a register's value
|
||||
after writing it).
|
||||
|
||||
- Streaming DMA mappings which are usually mapped for one DMA transfer,
|
||||
unmapped right after it (unless you use pci_dma_sync_* below) and for which
|
||||
hardware can optimize for sequential accesses.
|
||||
|
@ -303,6 +312,9 @@ There are two types of DMA mappings:
|
|||
|
||||
Neither type of DMA mapping has alignment restrictions that come
|
||||
from PCI, although some devices may have such restrictions.
|
||||
Also, systems with caches that aren't DMA-coherent will work better
|
||||
when the underlying buffers don't share cache lines with other data.
|
||||
|
||||
|
||||
Using Consistent DMA mappings.
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
# This makefile is used to generate the kernel documentation,
|
||||
# primarily based on in-line comments in various source files.
|
||||
# See Documentation/kernel-doc-nano-HOWTO.txt for instruction in how
|
||||
# to ducument the SRC - and how to read it.
|
||||
# to document the SRC - and how to read it.
|
||||
# To add a new book the only step required is to add the book to the
|
||||
# list of DOCBOOKS.
|
||||
|
||||
|
|
|
@ -322,7 +322,6 @@ X!Earch/i386/kernel/mca.c
|
|||
<chapter id="sysfs">
|
||||
<title>The Filesystem for Exporting Kernel Objects</title>
|
||||
!Efs/sysfs/file.c
|
||||
!Efs/sysfs/dir.c
|
||||
!Efs/sysfs/symlink.c
|
||||
!Efs/sysfs/bin.c
|
||||
</chapter>
|
||||
|
|
|
@ -705,7 +705,7 @@ and other resources, etc.
|
|||
|
||||
<sect1><title>ata_scsi_error()</title>
|
||||
<para>
|
||||
ata_scsi_error() is the current hostt->eh_strategy_handler()
|
||||
ata_scsi_error() is the current transportt->eh_strategy_handler()
|
||||
for libata. As discussed above, this will be entered in two
|
||||
cases - timeout and ATAPI error completion. This function
|
||||
calls low level libata driver's eng_timeout() callback, the
|
||||
|
|
|
@ -603,7 +603,8 @@ start exactly where you are now.
|
|||
|
||||
|
||||
----------
|
||||
Thanks to Paolo Ciarrocchi who allowed the "Development Process" section
|
||||
Thanks to Paolo Ciarrocchi who allowed the "Development Process"
|
||||
(http://linux.tar.bz/articles/2.6-development_process) section
|
||||
to be based on text he had written, and to Randy Dunlap and Gerrit
|
||||
Huizenga for some of the list of things you should and should not say.
|
||||
Also thanks to Pat Mochel, Hanna Linder, Randy Dunlap, Kay Sievers,
|
||||
|
|
|
@ -30,7 +30,7 @@ specific hotkey(event))
|
|||
echo "event_num:event_type:event_argument" >
|
||||
/proc/acpi/hotkey/action.
|
||||
The result of the execution of this aml method is
|
||||
attached to /proc/acpi/hotkey/poll_method, which is dnyamically
|
||||
attached to /proc/acpi/hotkey/poll_method, which is dynamically
|
||||
created. Please use command "cat /proc/acpi/hotkey/polling_method"
|
||||
to retrieve it.
|
||||
|
||||
|
|
|
@ -0,0 +1,22 @@
|
|||
As of the Linux 2.6.10 kernel, it is now possible to change the
|
||||
IO scheduler for a given block device on the fly (thus making it possible,
|
||||
for instance, to set the CFQ scheduler for the system default, but
|
||||
set a specific device to use the anticipatory or noop schedulers - which
|
||||
can improve that device's throughput).
|
||||
|
||||
To set a specific scheduler, simply do this:
|
||||
|
||||
echo SCHEDNAME > /sys/block/DEV/queue/scheduler
|
||||
|
||||
where SCHEDNAME is the name of a defined IO scheduler, and DEV is the
|
||||
device name (hda, hdb, sga, or whatever you happen to have).
|
||||
|
||||
The list of defined schedulers can be found by simply doing
|
||||
a "cat /sys/block/DEV/queue/scheduler" - the list of valid names
|
||||
will be displayed, with the currently selected scheduler in brackets:
|
||||
|
||||
# cat /sys/block/hda/queue/scheduler
|
||||
noop anticipatory deadline [cfq]
|
||||
# echo anticipatory > /sys/block/hda/queue/scheduler
|
||||
# cat /sys/block/hda/queue/scheduler
|
||||
noop [anticipatory] deadline cfq
|
|
@ -53,4 +53,4 @@ the CPUFreq Mailing list:
|
|||
* http://lists.linux.org.uk/mailman/listinfo/cpufreq
|
||||
|
||||
Clock and voltage scaling for the SA-1100:
|
||||
* http://www.lart.tudelft.nl/projects/scaling
|
||||
* http://www.lartmaker.nl/projects/scaling
|
||||
|
|
|
@ -25,8 +25,9 @@ Who: Adrian Bunk <bunk@stusta.de>
|
|||
|
||||
---------------------------
|
||||
|
||||
What: drivers depending on OBSOLETE_OSS_DRIVER
|
||||
When: January 2006
|
||||
What: drivers that were depending on OBSOLETE_OSS_DRIVER
|
||||
(config options already removed)
|
||||
When: before 2.6.19
|
||||
Why: OSS drivers with ALSA replacements
|
||||
Who: Adrian Bunk <bunk@stusta.de>
|
||||
|
||||
|
@ -71,14 +72,6 @@ Who: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
|
|||
|
||||
---------------------------
|
||||
|
||||
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
|
||||
|
|
|
@ -246,6 +246,7 @@ class/
|
|||
devices/
|
||||
firmware/
|
||||
net/
|
||||
fs/
|
||||
|
||||
devices/ contains a filesystem representation of the device tree. It maps
|
||||
directly to the internal kernel device tree, which is a hierarchy of
|
||||
|
@ -264,6 +265,10 @@ drivers/ contains a directory for each device driver that is loaded
|
|||
for devices on that particular bus (this assumes that drivers do not
|
||||
span multiple bus types).
|
||||
|
||||
fs/ contains a directory for some filesystems. Currently each
|
||||
filesystem wanting to export attributes must create its own hierarchy
|
||||
below fs/ (see ./fuse.txt for an example).
|
||||
|
||||
|
||||
More information can driver-model specific features can be found in
|
||||
Documentation/driver-model/.
|
||||
|
|
|
@ -694,7 +694,7 @@ struct file_operations
|
|||
----------------------
|
||||
|
||||
This describes how the VFS can manipulate an open file. As of kernel
|
||||
2.6.13, the following members are defined:
|
||||
2.6.17, the following members are defined:
|
||||
|
||||
struct file_operations {
|
||||
loff_t (*llseek) (struct file *, loff_t, int);
|
||||
|
@ -723,6 +723,10 @@ struct file_operations {
|
|||
int (*check_flags)(int);
|
||||
int (*dir_notify)(struct file *filp, unsigned long arg);
|
||||
int (*flock) (struct file *, int, struct file_lock *);
|
||||
ssize_t (*splice_write)(struct pipe_inode_info *, struct file *, size_t, unsigned
|
||||
int);
|
||||
ssize_t (*splice_read)(struct file *, struct pipe_inode_info *, size_t, unsigned
|
||||
int);
|
||||
};
|
||||
|
||||
Again, all methods are called without any locks being held, unless
|
||||
|
@ -790,6 +794,12 @@ otherwise noted.
|
|||
|
||||
flock: called by the flock(2) system call
|
||||
|
||||
splice_write: called by the VFS to splice data from a pipe to a file. This
|
||||
method is used by the splice(2) system call
|
||||
|
||||
splice_read: called by the VFS to splice data from file to a pipe. This
|
||||
method is used by the splice(2) system call
|
||||
|
||||
Note that the file operations are implemented by the specific
|
||||
filesystem in which the inode resides. When opening a device node
|
||||
(character or block special) most filesystems will call special
|
||||
|
|
|
@ -1,17 +1,19 @@
|
|||
=================================
|
||||
INTERNAL KERNEL ABI FOR FR-V ARCH
|
||||
=================================
|
||||
=================================
|
||||
INTERNAL KERNEL ABI FOR FR-V ARCH
|
||||
=================================
|
||||
|
||||
The internal FRV kernel ABI is not quite the same as the userspace ABI. A number of the registers
|
||||
are used for special purposed, and the ABI is not consistent between modules vs core, and MMU vs
|
||||
no-MMU.
|
||||
The internal FRV kernel ABI is not quite the same as the userspace ABI. A
|
||||
number of the registers are used for special purposed, and the ABI is not
|
||||
consistent between modules vs core, and MMU vs no-MMU.
|
||||
|
||||
This partly stems from the fact that FRV CPUs do not have a separate supervisor stack pointer, and
|
||||
most of them do not have any scratch registers, thus requiring at least one general purpose
|
||||
register to be clobbered in such an event. Also, within the kernel core, it is possible to simply
|
||||
jump or call directly between functions using a relative offset. This cannot be extended to modules
|
||||
for the displacement is likely to be too far. Thus in modules the address of a function to call
|
||||
must be calculated in a register and then used, requiring two extra instructions.
|
||||
This partly stems from the fact that FRV CPUs do not have a separate
|
||||
supervisor stack pointer, and most of them do not have any scratch
|
||||
registers, thus requiring at least one general purpose register to be
|
||||
clobbered in such an event. Also, within the kernel core, it is possible to
|
||||
simply jump or call directly between functions using a relative offset.
|
||||
This cannot be extended to modules for the displacement is likely to be too
|
||||
far. Thus in modules the address of a function to call must be calculated
|
||||
in a register and then used, requiring two extra instructions.
|
||||
|
||||
This document has the following sections:
|
||||
|
||||
|
@ -39,7 +41,8 @@ When a system call is made, the following registers are effective:
|
|||
CPU OPERATING MODES
|
||||
===================
|
||||
|
||||
The FR-V CPU has three basic operating modes. In order of increasing capability:
|
||||
The FR-V CPU has three basic operating modes. In order of increasing
|
||||
capability:
|
||||
|
||||
(1) User mode.
|
||||
|
||||
|
@ -47,42 +50,46 @@ The FR-V CPU has three basic operating modes. In order of increasing capability:
|
|||
|
||||
(2) Kernel mode.
|
||||
|
||||
Normal kernel mode. There are many additional control registers available that may be
|
||||
accessed in this mode, in addition to all the stuff available to user mode. This has two
|
||||
submodes:
|
||||
Normal kernel mode. There are many additional control registers
|
||||
available that may be accessed in this mode, in addition to all the
|
||||
stuff available to user mode. This has two submodes:
|
||||
|
||||
(a) Exceptions enabled (PSR.T == 1).
|
||||
|
||||
Exceptions will invoke the appropriate normal kernel mode handler. On entry to the
|
||||
handler, the PSR.T bit will be cleared.
|
||||
Exceptions will invoke the appropriate normal kernel mode
|
||||
handler. On entry to the handler, the PSR.T bit will be cleared.
|
||||
|
||||
(b) Exceptions disabled (PSR.T == 0).
|
||||
|
||||
No exceptions or interrupts may happen. Any mandatory exceptions will cause the CPU to
|
||||
halt unless the CPU is told to jump into debug mode instead.
|
||||
No exceptions or interrupts may happen. Any mandatory exceptions
|
||||
will cause the CPU to halt unless the CPU is told to jump into
|
||||
debug mode instead.
|
||||
|
||||
(3) Debug mode.
|
||||
|
||||
No exceptions may happen in this mode. Memory protection and management exceptions will be
|
||||
flagged for later consideration, but the exception handler won't be invoked. Debugging traps
|
||||
such as hardware breakpoints and watchpoints will be ignored. This mode is entered only by
|
||||
debugging events obtained from the other two modes.
|
||||
No exceptions may happen in this mode. Memory protection and
|
||||
management exceptions will be flagged for later consideration, but
|
||||
the exception handler won't be invoked. Debugging traps such as
|
||||
hardware breakpoints and watchpoints will be ignored. This mode is
|
||||
entered only by debugging events obtained from the other two modes.
|
||||
|
||||
All kernel mode registers may be accessed, plus a few extra debugging specific registers.
|
||||
All kernel mode registers may be accessed, plus a few extra debugging
|
||||
specific registers.
|
||||
|
||||
|
||||
=================================
|
||||
INTERNAL KERNEL-MODE REGISTER ABI
|
||||
=================================
|
||||
|
||||
There are a number of permanent register assignments that are set up by entry.S in the exception
|
||||
prologue. Note that there is a complete set of exception prologues for each of user->kernel
|
||||
transition and kernel->kernel transition. There are also user->debug and kernel->debug mode
|
||||
transition prologues.
|
||||
There are a number of permanent register assignments that are set up by
|
||||
entry.S in the exception prologue. Note that there is a complete set of
|
||||
exception prologues for each of user->kernel transition and kernel->kernel
|
||||
transition. There are also user->debug and kernel->debug mode transition
|
||||
prologues.
|
||||
|
||||
|
||||
REGISTER FLAVOUR USE
|
||||
=============== ======= ====================================================
|
||||
=============== ======= ==============================================
|
||||
GR1 Supervisor stack pointer
|
||||
GR15 Current thread info pointer
|
||||
GR16 GP-Rel base register for small data
|
||||
|
@ -92,10 +99,12 @@ transition prologues.
|
|||
GR31 NOMMU Destroyed by debug mode entry
|
||||
GR31 MMU Destroyed by TLB miss kernel mode entry
|
||||
CCR.ICC2 Virtual interrupt disablement tracking
|
||||
CCCR.CC3 Cleared by exception prologue (atomic op emulation)
|
||||
CCCR.CC3 Cleared by exception prologue
|
||||
(atomic op emulation)
|
||||
SCR0 MMU See mmu-layout.txt.
|
||||
SCR1 MMU See mmu-layout.txt.
|
||||
SCR2 MMU Save for EAR0 (destroyed by icache insns in debug mode)
|
||||
SCR2 MMU Save for EAR0 (destroyed by icache insns
|
||||
in debug mode)
|
||||
SCR3 MMU Save for GR31 during debug exceptions
|
||||
DAMR/IAMR NOMMU Fixed memory protection layout.
|
||||
DAMR/IAMR MMU See mmu-layout.txt.
|
||||
|
@ -104,18 +113,21 @@ transition prologues.
|
|||
Certain registers are also used or modified across function calls:
|
||||
|
||||
REGISTER CALL RETURN
|
||||
=============== =============================== ===============================
|
||||
=============== =============================== ======================
|
||||
GR0 Fixed Zero -
|
||||
GR2 Function call frame pointer
|
||||
GR3 Special Preserved
|
||||
GR3-GR7 - Clobbered
|
||||
GR8 Function call arg #1 Return value (or clobbered)
|
||||
GR9 Function call arg #2 Return value MSW (or clobbered)
|
||||
GR8 Function call arg #1 Return value
|
||||
(or clobbered)
|
||||
GR9 Function call arg #2 Return value MSW
|
||||
(or clobbered)
|
||||
GR10-GR13 Function call arg #3-#6 Clobbered
|
||||
GR14 - Clobbered
|
||||
GR15-GR16 Special Preserved
|
||||
GR17-GR27 - Preserved
|
||||
GR28-GR31 Special Only accessed explicitly
|
||||
GR28-GR31 Special Only accessed
|
||||
explicitly
|
||||
LR Return address after CALL Clobbered
|
||||
CCR/CCCR - Mostly Clobbered
|
||||
|
||||
|
@ -124,46 +136,53 @@ Certain registers are also used or modified across function calls:
|
|||
INTERNAL DEBUG-MODE REGISTER ABI
|
||||
================================
|
||||
|
||||
This is the same as the kernel-mode register ABI for functions calls. The difference is that in
|
||||
debug-mode there's a different stack and a different exception frame. Almost all the global
|
||||
registers from kernel-mode (including the stack pointer) may be changed.
|
||||
This is the same as the kernel-mode register ABI for functions calls. The
|
||||
difference is that in debug-mode there's a different stack and a different
|
||||
exception frame. Almost all the global registers from kernel-mode
|
||||
(including the stack pointer) may be changed.
|
||||
|
||||
REGISTER FLAVOUR USE
|
||||
=============== ======= ====================================================
|
||||
=============== ======= ==============================================
|
||||
GR1 Debug stack pointer
|
||||
GR16 GP-Rel base register for small data
|
||||
GR31 Current debug exception frame pointer (__debug_frame)
|
||||
GR31 Current debug exception frame pointer
|
||||
(__debug_frame)
|
||||
SCR3 MMU Saved value of GR31
|
||||
|
||||
|
||||
Note that debug mode is able to interfere with the kernel's emulated atomic ops, so it must be
|
||||
exceedingly careful not to do any that would interact with the main kernel in this regard. Hence
|
||||
the debug mode code (gdbstub) is almost completely self-contained. The only external code used is
|
||||
the sprintf family of functions.
|
||||
Note that debug mode is able to interfere with the kernel's emulated atomic
|
||||
ops, so it must be exceedingly careful not to do any that would interact
|
||||
with the main kernel in this regard. Hence the debug mode code (gdbstub) is
|
||||
almost completely self-contained. The only external code used is the
|
||||
sprintf family of functions.
|
||||
|
||||
Futhermore, break.S is so complicated because single-step mode does not switch off on entry to an
|
||||
exception. That means unless manually disabled, single-stepping will blithely go on stepping into
|
||||
things like interrupts. See gdbstub.txt for more information.
|
||||
Futhermore, break.S is so complicated because single-step mode does not
|
||||
switch off on entry to an exception. That means unless manually disabled,
|
||||
single-stepping will blithely go on stepping into things like interrupts.
|
||||
See gdbstub.txt for more information.
|
||||
|
||||
|
||||
==========================
|
||||
VIRTUAL INTERRUPT HANDLING
|
||||
==========================
|
||||
|
||||
Because accesses to the PSR is so slow, and to disable interrupts we have to access it twice (once
|
||||
to read and once to write), we don't actually disable interrupts at all if we don't have to. What
|
||||
we do instead is use the ICC2 condition code flags to note virtual disablement, such that if we
|
||||
then do take an interrupt, we note the flag, really disable interrupts, set another flag and resume
|
||||
execution at the point the interrupt happened. Setting condition flags as a side effect of an
|
||||
arithmetic or logical instruction is really fast. This use of the ICC2 only occurs within the
|
||||
Because accesses to the PSR is so slow, and to disable interrupts we have
|
||||
to access it twice (once to read and once to write), we don't actually
|
||||
disable interrupts at all if we don't have to. What we do instead is use
|
||||
the ICC2 condition code flags to note virtual disablement, such that if we
|
||||
then do take an interrupt, we note the flag, really disable interrupts, set
|
||||
another flag and resume execution at the point the interrupt happened.
|
||||
Setting condition flags as a side effect of an arithmetic or logical
|
||||
instruction is really fast. This use of the ICC2 only occurs within the
|
||||
kernel - it does not affect userspace.
|
||||
|
||||
The flags we use are:
|
||||
|
||||
(*) CCR.ICC2.Z [Zero flag]
|
||||
|
||||
Set to virtually disable interrupts, clear when interrupts are virtually enabled. Can be
|
||||
modified by logical instructions without affecting the Carry flag.
|
||||
Set to virtually disable interrupts, clear when interrupts are
|
||||
virtually enabled. Can be modified by logical instructions without
|
||||
affecting the Carry flag.
|
||||
|
||||
(*) CCR.ICC2.C [Carry flag]
|
||||
|
||||
|
@ -176,8 +195,9 @@ What happens is this:
|
|||
|
||||
ICC2.Z is 0, ICC2.C is 1.
|
||||
|
||||
(2) An interrupt occurs. The exception prologue examines ICC2.Z and determines that nothing needs
|
||||
doing. This is done simply with an unlikely BEQ instruction.
|
||||
(2) An interrupt occurs. The exception prologue examines ICC2.Z and
|
||||
determines that nothing needs doing. This is done simply with an
|
||||
unlikely BEQ instruction.
|
||||
|
||||
(3) The interrupts are disabled (local_irq_disable)
|
||||
|
||||
|
@ -187,48 +207,56 @@ What happens is this:
|
|||
|
||||
ICC2.Z would be set to 0.
|
||||
|
||||
A TIHI #2 instruction (trap #2 if condition HI - Z==0 && C==0) would be used to trap if
|
||||
interrupts were now virtually enabled, but physically disabled - which they're not, so the
|
||||
trap isn't taken. The kernel would then be back to state (1).
|
||||
A TIHI #2 instruction (trap #2 if condition HI - Z==0 && C==0) would
|
||||
be used to trap if interrupts were now virtually enabled, but
|
||||
physically disabled - which they're not, so the trap isn't taken. The
|
||||
kernel would then be back to state (1).
|
||||
|
||||
(5) An interrupt occurs. The exception prologue examines ICC2.Z and determines that the interrupt
|
||||
shouldn't actually have happened. It jumps aside, and there disabled interrupts by setting
|
||||
PSR.PIL to 14 and then it clears ICC2.C.
|
||||
(5) An interrupt occurs. The exception prologue examines ICC2.Z and
|
||||
determines that the interrupt shouldn't actually have happened. It
|
||||
jumps aside, and there disabled interrupts by setting PSR.PIL to 14
|
||||
and then it clears ICC2.C.
|
||||
|
||||
(6) If interrupts were then saved and disabled again (local_irq_save):
|
||||
|
||||
ICC2.Z would be shifted into the save variable and masked off (giving a 1).
|
||||
ICC2.Z would be shifted into the save variable and masked off
|
||||
(giving a 1).
|
||||
|
||||
ICC2.Z would then be set to 1 (thus unchanged), and ICC2.C would be unaffected (ie: 0).
|
||||
ICC2.Z would then be set to 1 (thus unchanged), and ICC2.C would be
|
||||
unaffected (ie: 0).
|
||||
|
||||
(7) If interrupts were then restored from state (6) (local_irq_restore):
|
||||
|
||||
ICC2.Z would be set to indicate the result of XOR'ing the saved value (ie: 1) with 1, which
|
||||
gives a result of 0 - thus leaving ICC2.Z set.
|
||||
ICC2.Z would be set to indicate the result of XOR'ing the saved
|
||||
value (ie: 1) with 1, which gives a result of 0 - thus leaving
|
||||
ICC2.Z set.
|
||||
|
||||
ICC2.C would remain unaffected (ie: 0).
|
||||
|
||||
A TIHI #2 instruction would be used to again assay the current state, but this would do
|
||||
nothing as Z==1.
|
||||
A TIHI #2 instruction would be used to again assay the current state,
|
||||
but this would do nothing as Z==1.
|
||||
|
||||
(8) If interrupts were then enabled (local_irq_enable):
|
||||
|
||||
ICC2.Z would be cleared. ICC2.C would be left unaffected. Both flags would now be 0.
|
||||
ICC2.Z would be cleared. ICC2.C would be left unaffected. Both
|
||||
flags would now be 0.
|
||||
|
||||
A TIHI #2 instruction again issued to assay the current state would then trap as both Z==0
|
||||
[interrupts virtually enabled] and C==0 [interrupts really disabled] would then be true.
|
||||
A TIHI #2 instruction again issued to assay the current state would
|
||||
then trap as both Z==0 [interrupts virtually enabled] and C==0
|
||||
[interrupts really disabled] would then be true.
|
||||
|
||||
(9) The trap #2 handler would simply enable hardware interrupts (set PSR.PIL to 0), set ICC2.C to
|
||||
1 and return.
|
||||
(9) The trap #2 handler would simply enable hardware interrupts
|
||||
(set PSR.PIL to 0), set ICC2.C to 1 and return.
|
||||
|
||||
(10) Immediately upon returning, the pending interrupt would be taken.
|
||||
|
||||
(11) The interrupt handler would take the path of actually processing the interrupt (ICC2.Z is
|
||||
clear, BEQ fails as per step (2)).
|
||||
(11) The interrupt handler would take the path of actually processing the
|
||||
interrupt (ICC2.Z is clear, BEQ fails as per step (2)).
|
||||
|
||||
(12) The interrupt handler would then set ICC2.C to 1 since hardware interrupts are definitely
|
||||
enabled - or else the kernel wouldn't be here.
|
||||
(12) The interrupt handler would then set ICC2.C to 1 since hardware
|
||||
interrupts are definitely enabled - or else the kernel wouldn't be here.
|
||||
|
||||
(13) On return from the interrupt handler, things would be back to state (1).
|
||||
|
||||
This trap (#2) is only available in kernel mode. In user mode it will result in SIGILL.
|
||||
This trap (#2) is only available in kernel mode. In user mode it will
|
||||
result in SIGILL.
|
||||
|
|
|
@ -12,18 +12,22 @@ meant as a replacement for the older, individual drivers:
|
|||
teletext adapters)
|
||||
|
||||
It currently supports the following devices:
|
||||
* Philips adapter
|
||||
* home brew teletext adapter
|
||||
* Velleman K8000 adapter
|
||||
* ELV adapter
|
||||
* Analog Devices evaluation boards (ADM1025, ADM1030, ADM1031, ADM1032)
|
||||
* Barco LPT->DVI (K5800236) adapter
|
||||
* (type=0) Philips adapter
|
||||
* (type=1) home brew teletext adapter
|
||||
* (type=2) Velleman K8000 adapter
|
||||
* (type=3) ELV adapter
|
||||
* (type=4) Analog Devices ADM1032 evaluation board
|
||||
* (type=5) Analog Devices evaluation boards: ADM1025, ADM1030, ADM1031
|
||||
* (type=6) Barco LPT->DVI (K5800236) adapter
|
||||
|
||||
These devices use different pinout configurations, so you have to tell
|
||||
the driver what you have, using the type module parameter. There is no
|
||||
way to autodetect the devices. Support for different pinout configurations
|
||||
can be easily added when needed.
|
||||
|
||||
Earlier kernels defaulted to type=0 (Philips). But now, if the type
|
||||
parameter is missing, the driver will simply fail to initialize.
|
||||
|
||||
|
||||
Building your own adapter
|
||||
-------------------------
|
||||
|
|
|
@ -0,0 +1,286 @@
|
|||
GigaSet 307x Device Driver
|
||||
==========================
|
||||
|
||||
1. Requirements
|
||||
------------
|
||||
1.1. Hardware
|
||||
--------
|
||||
This release supports the connection of the Gigaset 307x/417x family of
|
||||
ISDN DECT bases via Gigaset M101 Data, Gigaset M105 Data or direct USB
|
||||
connection. The following devices are reported to be compatible:
|
||||
307x/417x:
|
||||
Gigaset SX255isdn
|
||||
Gigaset SX353isdn
|
||||
Sinus 45 [AB] isdn (Deutsche Telekom)
|
||||
Sinus 721X/XA
|
||||
Vox Chicago 390 ISDN (KPN Telecom)
|
||||
M101:
|
||||
Sinus 45 Data 1 (Telekom)
|
||||
M105:
|
||||
Gigaset USB Adapter DECT
|
||||
Sinus 45 Data 2 (Telekom)
|
||||
Sinus 721 data
|
||||
Chicago 390 USB (KPN)
|
||||
See also http://www.erbze.info/sinus_gigaset.htm and
|
||||
http://gigaset307x.sourceforge.net/
|
||||
|
||||
We had also reports from users of Gigaset M105 who could use the drivers
|
||||
with SX 100 and CX 100 ISDN bases (only in unimodem mode, see section 2.4.)
|
||||
If you have another device that works with our driver, please let us know.
|
||||
For example, Gigaset SX205isdn/Sinus 721 X SE and Gigaset SX303isdn bases
|
||||
are just versions without answering machine of models known to work, so
|
||||
they should work just as well; but so far we are lacking positive reports
|
||||
on these.
|
||||
|
||||
Chances of getting an USB device to work are good if the output of
|
||||
lsusb
|
||||
at the command line contains one of the following:
|
||||
ID 0681:0001
|
||||
ID 0681:0002
|
||||
ID 0681:0009
|
||||
ID 0681:0021
|
||||
ID 0681:0022
|
||||
|
||||
1.2. Software
|
||||
--------
|
||||
The driver works with ISDN4linux and so can be used with any software
|
||||
which is able to use ISDN4linux for ISDN connections (voice or data).
|
||||
CAPI4Linux support is planned but not yet available.
|
||||
|
||||
There are some user space tools available at
|
||||
http://sourceforge.net/projects/gigaset307x/
|
||||
which provide access to additional device specific functions like SMS,
|
||||
phonebook or call journal.
|
||||
|
||||
|
||||
2. How to use the driver
|
||||
---------------------
|
||||
2.1. Modules
|
||||
-------
|
||||
To get the device working, you have to load the proper kernel module. You
|
||||
can do this using
|
||||
modprobe modulename
|
||||
where modulename is usb_gigaset (M105) or bas_gigaset (direct USB
|
||||
connection to the base).
|
||||
|
||||
2.2. Device nodes for user space programs
|
||||
------------------------------------
|
||||
The device can be accessed from user space (eg. by the user space tools
|
||||
mentioned in 1.2.) through the device nodes:
|
||||
|
||||
- /dev/ttyGU0 for M105 (USB data boxes)
|
||||
- /dev/ttyGB0 for the base driver (direct USB connection)
|
||||
|
||||
You can also select a "default device" which is used by the frontends when
|
||||
no device node is given as parameter, by creating a symlink /dev/ttyG to
|
||||
one of them, eg.:
|
||||
|
||||
ln -s /dev/ttyGB0 /dev/ttyG
|
||||
|
||||
2.3. ISDN4linux
|
||||
----------
|
||||
This is the "normal" mode of operation. After loading the module you can
|
||||
set up the ISDN system just as you'd do with any ISDN card.
|
||||
Your distribution should provide some configuration utility.
|
||||
If not, you can use some HOWTOs like
|
||||
http://www.linuxhaven.de/dlhp/HOWTO/DE-ISDN-HOWTO-5.html
|
||||
If this doesn't work, because you have some recent device like SX100 where
|
||||
debug output (see section 3.2.) shows something like this when dialing
|
||||
CMD Received: ERROR
|
||||
Available Params: 0
|
||||
Connection State: 0, Response: -1
|
||||
gigaset_process_response: resp_code -1 in ConState 0 !
|
||||
Timeout occurred
|
||||
you might need to use unimodem mode:
|
||||
|
||||
2.4. Unimodem mode
|
||||
-------------
|
||||
This is needed for some devices [e.g. SX100] as they have problems with
|
||||
the "normal" commands.
|
||||
|
||||
If you have installed the command line tool gigacontr, you can enter
|
||||
unimodem mode using
|
||||
gigacontr --mode unimodem
|
||||
You can switch back using
|
||||
gigacontr --mode isdn
|
||||
|
||||
You can also load the driver using e.g.
|
||||
modprobe usb_gigaset startmode=0
|
||||
to prevent the driver from starting in "isdn4linux mode".
|
||||
|
||||
In this mode the device works like a modem connected to a serial port
|
||||
(the /dev/ttyGU0, ... mentioned above) which understands the commands
|
||||
ATZ init, reset
|
||||
=> OK or ERROR
|
||||
ATD
|
||||
ATDT dial
|
||||
=> OK, CONNECT,
|
||||
BUSY,
|
||||
NO DIAL TONE,
|
||||
NO CARRIER,
|
||||
NO ANSWER
|
||||
<pause>+++<pause> change to command mode when connected
|
||||
ATH hangup
|
||||
|
||||
You can use some configuration tool of your distribution to configure this
|
||||
"modem" or configure pppd/wvdial manually. There are some example ppp
|
||||
configuration files and chat scripts in the gigaset-VERSION/ppp directory.
|
||||
Please note that the USB drivers are not able to change the state of the
|
||||
control lines (the M105 driver can be configured to use some undocumented
|
||||
control requests, if you really need the control lines, though). This means
|
||||
you must use "Stupid Mode" if you are using wvdial or you should use the
|
||||
nocrtscts option of pppd.
|
||||
You must also assure that the ppp_async module is loaded with the parameter
|
||||
flag_time=0. You can do this e.g. by adding a line like
|
||||
|
||||
options ppp_async flag_time=0
|
||||
|
||||
to /etc/modprobe.conf. If your distribution has some local module
|
||||
configuration file like /etc/modprobe.conf.local,
|
||||
using that should be preferred.
|
||||
|
||||
2.5. Call-ID (CID) mode
|
||||
------------------
|
||||
Call-IDs are numbers used to tag commands to, and responses from, the
|
||||
Gigaset base in order to support the simultaneous handling of multiple
|
||||
ISDN calls. Their use can be enabled ("CID mode") or disabled ("Unimodem
|
||||
mode"). Without Call-IDs (in Unimodem mode), only a very limited set of
|
||||
functions is available. It allows outgoing data connections only, but
|
||||
does not signal incoming calls or other base events.
|
||||
|
||||
DECT cordless data devices (M10x) permanently occupy the cordless
|
||||
connection to the base while Call-IDs are activated. As the Gigaset
|
||||
bases only support one DECT data connection at a time, this prevents
|
||||
other DECT cordless data devices from accessing the base.
|
||||
|
||||
During active operation, the driver switches to the necessary mode
|
||||
automatically. However, for the reasons above, the mode chosen when
|
||||
the device is not in use (idle) can be selected by the user.
|
||||
- If you want to receive incoming calls, you can use the default
|
||||
settings (CID mode).
|
||||
- If you have several DECT data devices (M10x) which you want to use
|
||||
in turn, select Unimodem mode by passing the parameter "cidmode=0" to
|
||||
the driver ("modprobe usb_gigaset cidmode=0" or modprobe.conf).
|
||||
|
||||
If you want both of these at once, you are out of luck.
|
||||
|
||||
You can also use /sys/module/<name>/parameters/cidmode for changing
|
||||
the CID mode setting (<name> is usb_gigaset or bas_gigaset).
|
||||
|
||||
|
||||
3. Troubleshooting
|
||||
---------------
|
||||
3.1. Solutions to frequently reported problems
|
||||
-----------------------------------------
|
||||
Problem:
|
||||
You have a slow provider and isdn4linux gives up dialing too early.
|
||||
Solution:
|
||||
Load the isdn module using the dialtimeout option. You can do this e.g.
|
||||
by adding a line like
|
||||
|
||||
options isdn dialtimeout=15
|
||||
|
||||
to /etc/modprobe.conf. If your distribution has some local module
|
||||
configuration file like /etc/modprobe.conf.local,
|
||||
using that should be preferred.
|
||||
|
||||
Problem:
|
||||
Your isdn script aborts with a message about isdnlog.
|
||||
Solution:
|
||||
Try deactivating (or commenting out) isdnlog. This driver does not
|
||||
support it.
|
||||
|
||||
Problem:
|
||||
You have two or more DECT data adapters (M101/M105) and only the
|
||||
first one you turn on works.
|
||||
Solution:
|
||||
Select Unimodem mode for all DECT data adapters. (see section 2.4.)
|
||||
|
||||
3.2. Telling the driver to provide more information
|
||||
----------------------------------------------
|
||||
Building the driver with the "Gigaset debugging" kernel configuration
|
||||
option (CONFIG_GIGASET_DEBUG) gives it the ability to produce additional
|
||||
information useful for debugging.
|
||||
|
||||
You can control the amount of debugging information the driver produces by
|
||||
writing an appropriate value to /sys/module/gigaset/parameters/debug, e.g.
|
||||
echo 0 > /sys/module/gigaset/parameters/debug
|
||||
switches off debugging output completely,
|
||||
echo 0x10a020 > /sys/module/gigaset/parameters/debug
|
||||
enables the standard set of debugging output messages. These values are
|
||||
bit patterns where every bit controls a certain type of debugging output.
|
||||
See the constants DEBUG_* in the source file gigaset.h for details.
|
||||
|
||||
The initial value can be set using the debug parameter when loading the
|
||||
module "gigaset", e.g. by adding a line
|
||||
options gigaset debug=0
|
||||
to /etc/modprobe.conf, ...
|
||||
|
||||
Generated debugging information can be found
|
||||
- as output of the command
|
||||
dmesg
|
||||
- in system log files written by your syslog daemon, usually
|
||||
in /var/log/, e.g. /var/log/messages.
|
||||
|
||||
3.3. Reporting problems and bugs
|
||||
---------------------------
|
||||
If you can't solve problems with the driver on your own, feel free to
|
||||
use one of the forums, bug trackers, or mailing lists on
|
||||
http://sourceforge.net/projects/gigaset307x
|
||||
or write an electronic mail to the maintainers.
|
||||
|
||||
Try to provide as much information as possible, such as
|
||||
- distribution
|
||||
- kernel version (uname -r)
|
||||
- gcc version (gcc --version)
|
||||
- hardware architecture (uname -m, ...)
|
||||
- type and firmware version of your device (base and wireless module,
|
||||
if any)
|
||||
- output of "lsusb -v" (if using an USB device)
|
||||
- error messages
|
||||
- relevant system log messages (it would help if you activate debug
|
||||
output as described in 3.2.)
|
||||
|
||||
For help with general configuration problems not specific to our driver,
|
||||
such as isdn4linux and network configuration issues, please refer to the
|
||||
appropriate forums and newsgroups.
|
||||
|
||||
3.4. Reporting problem solutions
|
||||
---------------------------
|
||||
If you solved a problem with our drivers, wrote startup scripts for your
|
||||
distribution, ... feel free to contact us (using one of the places
|
||||
mentioned in 3.3.). We'd like to add scripts, hints, documentation
|
||||
to the driver and/or the project web page.
|
||||
|
||||
|
||||
4. Links, other software
|
||||
---------------------
|
||||
- Sourceforge project developing this driver and associated tools
|
||||
http://sourceforge.net/projects/gigaset307x
|
||||
- Yahoo! Group on the Siemens Gigaset family of devices
|
||||
http://de.groups.yahoo.com/group/Siemens-Gigaset
|
||||
- Siemens Gigaset/T-Sinus compatibility table
|
||||
http://www.erbze.info/sinus_gigaset.htm
|
||||
|
||||
|
||||
5. Credits
|
||||
-------
|
||||
Thanks to
|
||||
|
||||
Karsten Keil
|
||||
for his help with isdn4linux
|
||||
Deti Fliegl
|
||||
for his base driver code
|
||||
Dennis Dietrich
|
||||
for his kernel 2.6 patches
|
||||
Andreas Rummel
|
||||
for his work and logs to get unimodem mode working
|
||||
Andreas Degert
|
||||
for his logs and patches to get cx 100 working
|
||||
Dietrich Feist
|
||||
for his generous donation of one M105 and two M101 cordless adapters
|
||||
Christoph Schweers
|
||||
for his generous donation of a M34 device
|
||||
|
||||
and all the other people who sent logs and other information.
|
||||
|
|
@ -44,7 +44,7 @@ What is covered within this file is mainly information to authors
|
|||
of modules. The author of an external modules should supply
|
||||
a makefile that hides most of the complexity so one only has to type
|
||||
'make' to build the module. A complete example will be present in
|
||||
chapter ¤. Creating a kbuild file for an external module".
|
||||
chapter 4, "Creating a kbuild file for an external module".
|
||||
|
||||
|
||||
=== 2. How to build external modules
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
February 2003 Kernel Parameters v2.5.59
|
||||
Kernel Parameters
|
||||
~~~~~~~~~~~~~~~~~
|
||||
|
||||
The following is a consolidated list of the kernel parameters as implemented
|
||||
|
@ -17,9 +17,17 @@ are specified on the kernel command line with the module name plus
|
|||
|
||||
usbcore.blinkenlights=1
|
||||
|
||||
The text in square brackets at the beginning of the description states the
|
||||
restrictions on the kernel for the said kernel parameter to be valid. The
|
||||
restrictions referred to are that the relevant option is valid if:
|
||||
This document may not be entirely up to date and comprehensive. The command
|
||||
"modinfo -p ${modulename}" shows a current list of all parameters of a loadable
|
||||
module. Loadable modules, after being loaded into the running kernel, also
|
||||
reveal their parameters in /sys/module/${modulename}/parameters/. Some of these
|
||||
parameters may be changed at runtime by the command
|
||||
"echo -n ${value} > /sys/module/${modulename}/parameters/${parm}".
|
||||
|
||||
The parameters listed below are only valid if certain kernel build options were
|
||||
enabled and if respective hardware is present. The text in square brackets at
|
||||
the beginning of each description states the restrictions within which a
|
||||
parameter is applicable:
|
||||
|
||||
ACPI ACPI support is enabled.
|
||||
ALSA ALSA sound support is enabled.
|
||||
|
@ -1046,10 +1054,10 @@ running once the system is up.
|
|||
noltlbs [PPC] Do not use large page/tlb entries for kernel
|
||||
lowmem mapping on PPC40x.
|
||||
|
||||
nomce [IA-32] Machine Check Exception
|
||||
|
||||
nomca [IA-64] Disable machine check abort handling
|
||||
|
||||
nomce [IA-32] Machine Check Exception
|
||||
|
||||
noresidual [PPC] Don't use residual data on PReP machines.
|
||||
|
||||
noresume [SWSUSP] Disables resume and restores original swap
|
||||
|
@ -1682,20 +1690,6 @@ running once the system is up.
|
|||
|
||||
|
||||
______________________________________________________________________
|
||||
Changelog:
|
||||
|
||||
2000-06-?? Mr. Unknown
|
||||
The last known update (for 2.4.0) - the changelog was not kept before.
|
||||
|
||||
2002-11-24 Petr Baudis <pasky@ucw.cz>
|
||||
Randy Dunlap <randy.dunlap@verizon.net>
|
||||
Update for 2.5.49, description for most of the options introduced,
|
||||
references to other documentation (C files, READMEs, ..), added S390,
|
||||
PPC, SPARC, MTD, ALSA and OSS category. Minor corrections and
|
||||
reformatting.
|
||||
|
||||
2005-10-19 Randy Dunlap <rdunlap@xenotime.net>
|
||||
Lots of typos, whitespace, some reformatting.
|
||||
|
||||
TODO:
|
||||
|
||||
|
|
|
@ -919,11 +919,11 @@ int main(int argc, char **argv)
|
|||
int settle_time = 60;
|
||||
|
||||
/* Parse the simple command-line */
|
||||
if (ac == 2)
|
||||
disk = av[1];
|
||||
else if (ac == 4) {
|
||||
settle_time = atoi(av[2]);
|
||||
disk = av[3];
|
||||
if (argc == 2)
|
||||
disk = argv[1];
|
||||
else if (argc == 4) {
|
||||
settle_time = atoi(argv[2]);
|
||||
disk = argv[3];
|
||||
} else
|
||||
usage();
|
||||
|
||||
|
|
|
@ -610,6 +610,7 @@ loads. Consider the following sequence of events:
|
|||
|
||||
CPU 1 CPU 2
|
||||
======================= =======================
|
||||
{ B = 7; X = 9; Y = 8; C = &Y }
|
||||
STORE A = 1
|
||||
STORE B = 2
|
||||
<write barrier>
|
||||
|
@ -651,7 +652,20 @@ In the above example, CPU 2 perceives that B is 7, despite the load of *C
|
|||
(which would be B) coming after the the LOAD of C.
|
||||
|
||||
If, however, a data dependency barrier were to be placed between the load of C
|
||||
and the load of *C (ie: B) on CPU 2, then the following will occur:
|
||||
and the load of *C (ie: B) on CPU 2:
|
||||
|
||||
CPU 1 CPU 2
|
||||
======================= =======================
|
||||
{ B = 7; X = 9; Y = 8; C = &Y }
|
||||
STORE A = 1
|
||||
STORE B = 2
|
||||
<write barrier>
|
||||
STORE C = &B LOAD X
|
||||
STORE D = 4 LOAD C (gets &B)
|
||||
<data dependency barrier>
|
||||
LOAD *C (reads B)
|
||||
|
||||
then the following will occur:
|
||||
|
||||
+-------+ : : : :
|
||||
| | +------+ +-------+
|
||||
|
@ -829,8 +843,8 @@ There are some more advanced barrier functions:
|
|||
(*) smp_mb__after_atomic_inc();
|
||||
|
||||
These are for use with atomic add, subtract, increment and decrement
|
||||
functions, especially when used for reference counting. These functions
|
||||
do not imply memory barriers.
|
||||
functions that don't return a value, especially when used for reference
|
||||
counting. These functions do not imply memory barriers.
|
||||
|
||||
As an example, consider a piece of code that marks an object as being dead
|
||||
and then decrements the object's reference count:
|
||||
|
@ -1263,15 +1277,17 @@ else.
|
|||
ATOMIC OPERATIONS
|
||||
-----------------
|
||||
|
||||
Though they are technically interprocessor interaction considerations, atomic
|
||||
operations are noted specially as they do _not_ generally imply memory
|
||||
barriers. The possible offenders include:
|
||||
Whilst they are technically interprocessor interaction considerations, atomic
|
||||
operations are noted specially as some of them imply full memory barriers and
|
||||
some don't, but they're very heavily relied on as a group throughout the
|
||||
kernel.
|
||||
|
||||
Any atomic operation that modifies some state in memory and returns information
|
||||
about the state (old or new) implies an SMP-conditional general memory barrier
|
||||
(smp_mb()) on each side of the actual operation. These include:
|
||||
|
||||
xchg();
|
||||
cmpxchg();
|
||||
test_and_set_bit();
|
||||
test_and_clear_bit();
|
||||
test_and_change_bit();
|
||||
atomic_cmpxchg();
|
||||
atomic_inc_return();
|
||||
atomic_dec_return();
|
||||
|
@ -1282,21 +1298,31 @@ barriers. The possible offenders include:
|
|||
atomic_sub_and_test();
|
||||
atomic_add_negative();
|
||||
atomic_add_unless();
|
||||
test_and_set_bit();
|
||||
test_and_clear_bit();
|
||||
test_and_change_bit();
|
||||
|
||||
These may be used for such things as implementing LOCK operations or controlling
|
||||
the lifetime of objects by decreasing their reference counts. In such cases
|
||||
they need preceding memory barriers.
|
||||
These are used for such things as implementing LOCK-class and UNLOCK-class
|
||||
operations and adjusting reference counters towards object destruction, and as
|
||||
such the implicit memory barrier effects are necessary.
|
||||
|
||||
The following may also be possible offenders as they may be used as UNLOCK
|
||||
operations.
|
||||
|
||||
The following operation are potential problems as they do _not_ imply memory
|
||||
barriers, but might be used for implementing such things as UNLOCK-class
|
||||
operations:
|
||||
|
||||
atomic_set();
|
||||
set_bit();
|
||||
clear_bit();
|
||||
change_bit();
|
||||
atomic_set();
|
||||
|
||||
With these the appropriate explicit memory barrier should be used if necessary
|
||||
(smp_mb__before_clear_bit() for instance).
|
||||
|
||||
|
||||
The following are a little tricky:
|
||||
The following also do _not_ imply memory barriers, and so may require explicit
|
||||
memory barriers under some circumstances (smp_mb__before_atomic_dec() for
|
||||
instance)):
|
||||
|
||||
atomic_add();
|
||||
atomic_sub();
|
||||
|
@ -1317,10 +1343,12 @@ specific order.
|
|||
|
||||
|
||||
Basically, each usage case has to be carefully considered as to whether memory
|
||||
barriers are needed or not. The simplest rule is probably: if the atomic
|
||||
operation is protected by a lock, then it does not require a barrier unless
|
||||
there's another operation within the critical section with respect to which an
|
||||
ordering must be maintained.
|
||||
barriers are needed or not.
|
||||
|
||||
[!] Note that special memory barrier primitives are available for these
|
||||
situations because on some CPUs the atomic instructions used imply full memory
|
||||
barriers, and so barrier instructions are superfluous in conjunction with them,
|
||||
and in such cases the special barrier primitives will be no-ops.
|
||||
|
||||
See Documentation/atomic_ops.txt for more information.
|
||||
|
||||
|
|
|
@ -138,19 +138,29 @@ Reading MTRRs from a C program using ioctl()'s:
|
|||
|
||||
*/
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <fcntl.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <errno.h>
|
||||
#define MTRR_NEED_STRINGS
|
||||
#include <asm/mtrr.h>
|
||||
|
||||
#define TRUE 1
|
||||
#define FALSE 0
|
||||
#define ERRSTRING strerror (errno)
|
||||
|
||||
static char *mtrr_strings[MTRR_NUM_TYPES] =
|
||||
{
|
||||
"uncachable", /* 0 */
|
||||
"write-combining", /* 1 */
|
||||
"?", /* 2 */
|
||||
"?", /* 3 */
|
||||
"write-through", /* 4 */
|
||||
"write-protect", /* 5 */
|
||||
"write-back", /* 6 */
|
||||
};
|
||||
|
||||
int main ()
|
||||
{
|
||||
|
@ -232,13 +242,22 @@ Creating MTRRs from a C programme using ioctl()'s:
|
|||
#include <fcntl.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <errno.h>
|
||||
#define MTRR_NEED_STRINGS
|
||||
#include <asm/mtrr.h>
|
||||
|
||||
#define TRUE 1
|
||||
#define FALSE 0
|
||||
#define ERRSTRING strerror (errno)
|
||||
|
||||
static char *mtrr_strings[MTRR_NUM_TYPES] =
|
||||
{
|
||||
"uncachable", /* 0 */
|
||||
"write-combining", /* 1 */
|
||||
"?", /* 2 */
|
||||
"?", /* 3 */
|
||||
"write-through", /* 4 */
|
||||
"write-protect", /* 5 */
|
||||
"write-back", /* 6 */
|
||||
};
|
||||
|
||||
int main (int argc, char **argv)
|
||||
{
|
||||
|
|
|
@ -254,7 +254,7 @@ and, the number of frames be
|
|||
|
||||
<block number> * <block size> / <frame size>
|
||||
|
||||
Suposse the following parameters, which apply for 2.6 kernel and an
|
||||
Suppose the following parameters, which apply for 2.6 kernel and an
|
||||
i386 architecture:
|
||||
|
||||
<size-max> = 131072 bytes
|
||||
|
|
|
@ -138,7 +138,7 @@ This means that you have to read/write IP packets when you are using tun and
|
|||
ethernet frames when using tap.
|
||||
|
||||
5. What is the difference between BPF and TUN/TAP driver?
|
||||
BFP is an advanced packet filter. It can be attached to existing
|
||||
BPF is an advanced packet filter. It can be attached to existing
|
||||
network interface. It does not provide a virtual network interface.
|
||||
A TUN/TAP driver does provide a virtual network interface and it is possible
|
||||
to attach BPF to this interface.
|
||||
|
|
|
@ -0,0 +1,166 @@
|
|||
|
||||
The sync patches work is based on initial patches from
|
||||
Krisztian <hidden@balabit.hu> and others and additional patches
|
||||
from Jamal <hadi@cyberus.ca>.
|
||||
|
||||
The end goal for syncing is to be able to insert attributes + generate
|
||||
events so that the an SA can be safely moved from one machine to another
|
||||
for HA purposes.
|
||||
The idea is to synchronize the SA so that the takeover machine can do
|
||||
the processing of the SA as accurate as possible if it has access to it.
|
||||
|
||||
We already have the ability to generate SA add/del/upd events.
|
||||
These patches add ability to sync and have accurate lifetime byte (to
|
||||
ensure proper decay of SAs) and replay counters to avoid replay attacks
|
||||
with as minimal loss at failover time.
|
||||
This way a backup stays as closely uptodate as an active member.
|
||||
|
||||
Because the above items change for every packet the SA receives,
|
||||
it is possible for a lot of the events to be generated.
|
||||
For this reason, we also add a nagle-like algorithm to restrict
|
||||
the events. i.e we are going to set thresholds to say "let me
|
||||
know if the replay sequence threshold is reached or 10 secs have passed"
|
||||
These thresholds are set system-wide via sysctls or can be updated
|
||||
per SA.
|
||||
|
||||
The identified items that need to be synchronized are:
|
||||
- the lifetime byte counter
|
||||
note that: lifetime time limit is not important if you assume the failover
|
||||
machine is known ahead of time since the decay of the time countdown
|
||||
is not driven by packet arrival.
|
||||
- the replay sequence for both inbound and outbound
|
||||
|
||||
1) Message Structure
|
||||
----------------------
|
||||
|
||||
nlmsghdr:aevent_id:optional-TLVs.
|
||||
|
||||
The netlink message types are:
|
||||
|
||||
XFRM_MSG_NEWAE and XFRM_MSG_GETAE.
|
||||
|
||||
A XFRM_MSG_GETAE does not have TLVs.
|
||||
A XFRM_MSG_NEWAE will have at least two TLVs (as is
|
||||
discussed further below).
|
||||
|
||||
aevent_id structure looks like:
|
||||
|
||||
struct xfrm_aevent_id {
|
||||
struct xfrm_usersa_id sa_id;
|
||||
__u32 flags;
|
||||
};
|
||||
|
||||
xfrm_usersa_id in this message layout identifies the SA.
|
||||
|
||||
flags are used to indicate different things. The possible
|
||||
flags are:
|
||||
XFRM_AE_RTHR=1, /* replay threshold*/
|
||||
XFRM_AE_RVAL=2, /* replay value */
|
||||
XFRM_AE_LVAL=4, /* lifetime value */
|
||||
XFRM_AE_ETHR=8, /* expiry timer threshold */
|
||||
XFRM_AE_CR=16, /* Event cause is replay update */
|
||||
XFRM_AE_CE=32, /* Event cause is timer expiry */
|
||||
XFRM_AE_CU=64, /* Event cause is policy update */
|
||||
|
||||
How these flags are used is dependent on the direction of the
|
||||
message (kernel<->user) as well the cause (config, query or event).
|
||||
This is described below in the different messages.
|
||||
|
||||
The pid will be set appropriately in netlink to recognize direction
|
||||
(0 to the kernel and pid = processid that created the event
|
||||
when going from kernel to user space)
|
||||
|
||||
A program needs to subscribe to multicast group XFRMNLGRP_AEVENTS
|
||||
to get notified of these events.
|
||||
|
||||
2) TLVS reflect the different parameters:
|
||||
-----------------------------------------
|
||||
|
||||
a) byte value (XFRMA_LTIME_VAL)
|
||||
This TLV carries the running/current counter for byte lifetime since
|
||||
last event.
|
||||
|
||||
b)replay value (XFRMA_REPLAY_VAL)
|
||||
This TLV carries the running/current counter for replay sequence since
|
||||
last event.
|
||||
|
||||
c)replay threshold (XFRMA_REPLAY_THRESH)
|
||||
This TLV carries the threshold being used by the kernel to trigger events
|
||||
when the replay sequence is exceeded.
|
||||
|
||||
d) expiry timer (XFRMA_ETIMER_THRESH)
|
||||
This is a timer value in milliseconds which is used as the nagle
|
||||
value to rate limit the events.
|
||||
|
||||
3) Default configurations for the parameters:
|
||||
----------------------------------------------
|
||||
|
||||
By default these events should be turned off unless there is
|
||||
at least one listener registered to listen to the multicast
|
||||
group XFRMNLGRP_AEVENTS.
|
||||
|
||||
Programs installing SAs will need to specify the two thresholds, however,
|
||||
in order to not change existing applications such as racoon
|
||||
we also provide default threshold values for these different parameters
|
||||
in case they are not specified.
|
||||
|
||||
the two sysctls/proc entries are:
|
||||
a) /proc/sys/net/core/sysctl_xfrm_aevent_etime
|
||||
used to provide default values for the XFRMA_ETIMER_THRESH in incremental
|
||||
units of time of 100ms. The default is 10 (1 second)
|
||||
|
||||
b) /proc/sys/net/core/sysctl_xfrm_aevent_rseqth
|
||||
used to provide default values for XFRMA_REPLAY_THRESH parameter
|
||||
in incremental packet count. The default is two packets.
|
||||
|
||||
4) Message types
|
||||
----------------
|
||||
|
||||
a) XFRM_MSG_GETAE issued by user-->kernel.
|
||||
XFRM_MSG_GETAE does not carry any TLVs.
|
||||
The response is a XFRM_MSG_NEWAE which is formatted based on what
|
||||
XFRM_MSG_GETAE queried for.
|
||||
The response will always have XFRMA_LTIME_VAL and XFRMA_REPLAY_VAL TLVs.
|
||||
*if XFRM_AE_RTHR flag is set, then XFRMA_REPLAY_THRESH is also retrieved
|
||||
*if XFRM_AE_ETHR flag is set, then XFRMA_ETIMER_THRESH is also retrieved
|
||||
|
||||
b) XFRM_MSG_NEWAE is issued by either user space to configure
|
||||
or kernel to announce events or respond to a XFRM_MSG_GETAE.
|
||||
|
||||
i) user --> kernel to configure a specific SA.
|
||||
any of the values or threshold parameters can be updated by passing the
|
||||
appropriate TLV.
|
||||
A response is issued back to the sender in user space to indicate success
|
||||
or failure.
|
||||
In the case of success, additionally an event with
|
||||
XFRM_MSG_NEWAE is also issued to any listeners as described in iii).
|
||||
|
||||
ii) kernel->user direction as a response to XFRM_MSG_GETAE
|
||||
The response will always have XFRMA_LTIME_VAL and XFRMA_REPLAY_VAL TLVs.
|
||||
The threshold TLVs will be included if explicitly requested in
|
||||
the XFRM_MSG_GETAE message.
|
||||
|
||||
iii) kernel->user to report as event if someone sets any values or
|
||||
thresholds for an SA using XFRM_MSG_NEWAE (as described in #i above).
|
||||
In such a case XFRM_AE_CU flag is set to inform the user that
|
||||
the change happened as a result of an update.
|
||||
The message will always have XFRMA_LTIME_VAL and XFRMA_REPLAY_VAL TLVs.
|
||||
|
||||
iv) kernel->user to report event when replay threshold or a timeout
|
||||
is exceeded.
|
||||
In such a case either XFRM_AE_CR (replay exceeded) or XFRM_AE_CE (timeout
|
||||
happened) is set to inform the user what happened.
|
||||
Note the two flags are mutually exclusive.
|
||||
The message will always have XFRMA_LTIME_VAL and XFRMA_REPLAY_VAL TLVs.
|
||||
|
||||
Exceptions to threshold settings
|
||||
--------------------------------
|
||||
|
||||
If you have an SA that is getting hit by traffic in bursts such that
|
||||
there is a period where the timer threshold expires with no packets
|
||||
seen, then an odd behavior is seen as follows:
|
||||
The first packet arrival after a timer expiry will trigger a timeout
|
||||
aevent; i.e we dont wait for a timeout period or a packet threshold
|
||||
to be reached. This is done for simplicity and efficiency reasons.
|
||||
|
||||
-JHS
|
|
@ -259,7 +259,17 @@ on the bus need to be capable of doing it, so this is something which needs
|
|||
to be handled by platform and generic code, not individual drivers.
|
||||
|
||||
|
||||
8. Obsolete functions
|
||||
8. Vendor and device identifications
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
For the future, let's avoid adding device ids to include/linux/pci_ids.h.
|
||||
|
||||
PCI_VENDOR_ID_xxx for vendors, and a hex constant for device ids.
|
||||
|
||||
Rationale: PCI_VENDOR_ID_xxx constants are re-used, but device ids are not.
|
||||
Further, device ids are arbitrary hex numbers, normally used only in a
|
||||
single location, the pci_device_id table.
|
||||
|
||||
9. Obsolete functions
|
||||
~~~~~~~~~~~~~~~~~~~~~
|
||||
There are several functions which you might come across when trying to
|
||||
port an old driver to the new PCI interface. They are no longer present
|
||||
|
|
|
@ -1,5 +1,11 @@
|
|||
This file details changes in 2.6 which affect PCMCIA card driver authors:
|
||||
|
||||
* New release helper (as of 2.6.17)
|
||||
Instead of calling pcmcia_release_{configuration,io,irq,win}, all that's
|
||||
necessary now is calling pcmcia_disable_device. As there is no valid
|
||||
reason left to call pcmcia_release_io and pcmcia_release_irq, the
|
||||
exports for them were removed.
|
||||
|
||||
* Unify detach and REMOVAL event code, as well as attach and INSERTION
|
||||
code (as of 2.6.16)
|
||||
void (*remove) (struct pcmcia_device *dev);
|
||||
|
|
|
@ -140,7 +140,7 @@ IBM TP T41p s3_bios (2), switch to X after resume
|
|||
IBM TP T42 s3_bios (2)
|
||||
IBM ThinkPad T42p (2373-GTG) s3_bios (2)
|
||||
IBM TP X20 ??? (*)
|
||||
IBM TP X30 s3_bios (2)
|
||||
IBM TP X30 s3_bios, s3_mode (4)
|
||||
IBM TP X31 / Type 2672-XXH none (1), use radeontool (http://fdd.com/software/radeon/) to turn off backlight.
|
||||
IBM TP X32 none (1), but backlight is on and video is trashed after long suspend. s3_bios,s3_mode (4) works too. Perhaps that gets better results?
|
||||
IBM Thinkpad X40 Type 2371-7JG s3_bios,s3_mode (4)
|
||||
|
|
|
@ -19,9 +19,9 @@ TABLE OF CONTENTS
|
|||
[2-1-1] Overview
|
||||
[2-1-2] Flow of scmds through EH
|
||||
[2-1-3] Flow of control
|
||||
[2-2] EH through hostt->eh_strategy_handler()
|
||||
[2-2-1] Pre hostt->eh_strategy_handler() SCSI midlayer conditions
|
||||
[2-2-2] Post hostt->eh_strategy_handler() SCSI midlayer conditions
|
||||
[2-2] EH through transportt->eh_strategy_handler()
|
||||
[2-2-1] Pre transportt->eh_strategy_handler() SCSI midlayer conditions
|
||||
[2-2-2] Post transportt->eh_strategy_handler() SCSI midlayer conditions
|
||||
[2-2-3] Things to consider
|
||||
|
||||
|
||||
|
@ -413,9 +413,9 @@ scmd->allowed.
|
|||
layer of failure of the scmds.
|
||||
|
||||
|
||||
[2-2] EH through hostt->eh_strategy_handler()
|
||||
[2-2] EH through transportt->eh_strategy_handler()
|
||||
|
||||
hostt->eh_strategy_handler() is invoked in the place of
|
||||
transportt->eh_strategy_handler() is invoked in the place of
|
||||
scsi_unjam_host() and it is responsible for whole recovery process.
|
||||
On completion, the handler should have made lower layers forget about
|
||||
all failed scmds and either ready for new commands or offline. Also,
|
||||
|
@ -424,7 +424,7 @@ SCSI midlayer. IOW, of the steps described in [2-1-2], all steps
|
|||
except for #1 must be implemented by eh_strategy_handler().
|
||||
|
||||
|
||||
[2-2-1] Pre hostt->eh_strategy_handler() SCSI midlayer conditions
|
||||
[2-2-1] Pre transportt->eh_strategy_handler() SCSI midlayer conditions
|
||||
|
||||
The following conditions are true on entry to the handler.
|
||||
|
||||
|
@ -437,7 +437,7 @@ except for #1 must be implemented by eh_strategy_handler().
|
|||
- shost->host_failed == shost->host_busy
|
||||
|
||||
|
||||
[2-2-2] Post hostt->eh_strategy_handler() SCSI midlayer conditions
|
||||
[2-2-2] Post transportt->eh_strategy_handler() SCSI midlayer conditions
|
||||
|
||||
The following conditions must be true on exit from the handler.
|
||||
|
||||
|
|
|
@ -804,7 +804,6 @@ Summary:
|
|||
eh_bus_reset_handler - issue SCSI bus reset
|
||||
eh_device_reset_handler - issue SCSI device reset
|
||||
eh_host_reset_handler - reset host (host bus adapter)
|
||||
eh_strategy_handler - driver supplied alternate to scsi_unjam_host()
|
||||
info - supply information about given host
|
||||
ioctl - driver can respond to ioctls
|
||||
proc_info - supports /proc/scsi/{driver_name}/{host_no}
|
||||
|
@ -969,24 +968,6 @@ Details:
|
|||
int eh_host_reset_handler(struct scsi_cmnd * scp)
|
||||
|
||||
|
||||
/**
|
||||
* eh_strategy_handler - driver supplied alternate to scsi_unjam_host()
|
||||
* @shp: host on which error has occurred
|
||||
*
|
||||
* Returns TRUE if host unjammed, else FALSE.
|
||||
*
|
||||
* Locks: none
|
||||
*
|
||||
* Calling context: kernel thread
|
||||
*
|
||||
* Notes: Invoked from scsi_eh thread. LLD supplied alternate to
|
||||
* scsi_unjam_host() found in scsi_error.c
|
||||
*
|
||||
* Optionally defined in: LLD
|
||||
**/
|
||||
int eh_strategy_handler(struct Scsi_Host * shp)
|
||||
|
||||
|
||||
/**
|
||||
* info - supply information about given host: driver name plus data
|
||||
* to distinguish given host
|
||||
|
|
|
@ -3,14 +3,11 @@
|
|||
--------------------
|
||||
|
||||
|
||||
$Id: driver,v 1.10 2002/07/22 15:27:30 rmk Exp $
|
||||
|
||||
|
||||
This document is meant as a brief overview of some aspects of the new serial
|
||||
driver. It is not complete, any questions you have should be directed to
|
||||
<rmk@arm.linux.org.uk>
|
||||
|
||||
The reference implementation is contained within serial_amba.c.
|
||||
The reference implementation is contained within amba_pl011.c.
|
||||
|
||||
|
||||
|
||||
|
@ -31,6 +28,11 @@ The serial core provides a few helper functions. This includes identifing
|
|||
the correct port structure (via uart_get_console) and decoding command line
|
||||
arguments (uart_parse_options).
|
||||
|
||||
There is also a helper function (uart_write_console) which performs a
|
||||
character by character write, translating newlines to CRLF sequences.
|
||||
Driver writers are recommended to use this function rather than implementing
|
||||
their own version.
|
||||
|
||||
|
||||
Locking
|
||||
-------
|
||||
|
@ -86,6 +88,7 @@ hardware.
|
|||
- TIOCM_DTR DTR signal.
|
||||
- TIOCM_OUT1 OUT1 signal.
|
||||
- TIOCM_OUT2 OUT2 signal.
|
||||
- TIOCM_LOOP Set the port into loopback mode.
|
||||
If the appropriate bit is set, the signal should be driven
|
||||
active. If the bit is clear, the signal should be driven
|
||||
inactive.
|
||||
|
@ -141,6 +144,10 @@ hardware.
|
|||
enable_ms(port)
|
||||
Enable the modem status interrupts.
|
||||
|
||||
This method may be called multiple times. Modem status
|
||||
interrupts should be disabled when the shutdown method is
|
||||
called.
|
||||
|
||||
Locking: port->lock taken.
|
||||
Interrupts: locally disabled.
|
||||
This call must not sleep
|
||||
|
@ -160,6 +167,8 @@ hardware.
|
|||
state. Enable the port for reception. It should not activate
|
||||
RTS nor DTR; this will be done via a separate call to set_mctrl.
|
||||
|
||||
This method will only be called when the port is initially opened.
|
||||
|
||||
Locking: port_sem taken.
|
||||
Interrupts: globally disabled.
|
||||
|
||||
|
@ -169,6 +178,11 @@ hardware.
|
|||
RTS nor DTR; this will have already been done via a separate
|
||||
call to set_mctrl.
|
||||
|
||||
Drivers must not access port->info once this call has completed.
|
||||
|
||||
This method will only be called when there are no more users of
|
||||
this port.
|
||||
|
||||
Locking: port_sem taken.
|
||||
Interrupts: caller dependent.
|
||||
|
||||
|
|
|
@ -120,6 +120,34 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
|
|||
enable - enable card
|
||||
- Default: enabled, for PCI and ISA PnP cards
|
||||
|
||||
Module snd-adlib
|
||||
----------------
|
||||
|
||||
Module for AdLib FM cards.
|
||||
|
||||
port - port # for OPL chip
|
||||
|
||||
This module supports multiple cards. It does not support autoprobe, so
|
||||
the port must be specified. For actual AdLib FM cards it will be 0x388.
|
||||
Note that this card does not have PCM support and no mixer; only FM
|
||||
synthesis.
|
||||
|
||||
Make sure you have "sbiload" from the alsa-tools package available and,
|
||||
after loading the module, find out the assigned ALSA sequencer port
|
||||
number through "sbiload -l". Example output:
|
||||
|
||||
Port Client name Port name
|
||||
64:0 OPL2 FM synth OPL2 FM Port
|
||||
|
||||
Load the std.sb and drums.sb patches also supplied by sbiload:
|
||||
|
||||
sbiload -p 64:0 std.sb drums.sb
|
||||
|
||||
If you use this driver to drive an OPL3, you can use std.o3 and drums.o3
|
||||
instead. To have the card produce sound, use aplaymidi from alsa-utils:
|
||||
|
||||
aplaymidi -p 64:0 foo.mid
|
||||
|
||||
Module snd-ad1816a
|
||||
------------------
|
||||
|
||||
|
@ -190,6 +218,15 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
|
|||
|
||||
The power-management is supported.
|
||||
|
||||
Module snd-als300
|
||||
-----------------
|
||||
|
||||
Module for Avance Logic ALS300 and ALS300+
|
||||
|
||||
This module supports multiple cards.
|
||||
|
||||
The power-management is supported.
|
||||
|
||||
Module snd-als4000
|
||||
------------------
|
||||
|
||||
|
@ -701,6 +738,7 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
|
|||
uniwill 3-jack
|
||||
F1734 2-jack
|
||||
lg LG laptop (m1 express dual)
|
||||
lg-lw LG LW20 laptop
|
||||
test for testing/debugging purpose, almost all controls can be
|
||||
adjusted. Appearing only when compiled with
|
||||
$CONFIG_SND_DEBUG=y
|
||||
|
@ -1013,6 +1051,23 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
|
|||
|
||||
The power-management is supported.
|
||||
|
||||
Module snd-miro
|
||||
---------------
|
||||
|
||||
Module for Miro soundcards: miroSOUND PCM 1 pro,
|
||||
miroSOUND PCM 12,
|
||||
miroSOUND PCM 20 Radio.
|
||||
|
||||
port - Port # (0x530,0x604,0xe80,0xf40)
|
||||
irq - IRQ # (5,7,9,10,11)
|
||||
dma1 - 1st dma # (0,1,3)
|
||||
dma2 - 2nd dma # (0,1)
|
||||
mpu_port - MPU-401 port # (0x300,0x310,0x320,0x330)
|
||||
mpu_irq - MPU-401 irq # (5,7,9,10)
|
||||
fm_port - FM Port # (0x388)
|
||||
wss - enable WSS mode
|
||||
ide - enable onboard ide support
|
||||
|
||||
Module snd-mixart
|
||||
-----------------
|
||||
|
||||
|
@ -1202,6 +1257,20 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
|
|||
|
||||
The power-management is supported.
|
||||
|
||||
Module snd-riptide
|
||||
------------------
|
||||
|
||||
Module for Conexant Riptide chip
|
||||
|
||||
joystick_port - Joystick port # (default: 0x200)
|
||||
mpu_port - MPU401 port # (default: 0x330)
|
||||
opl3_port - OPL3 port # (default: 0x388)
|
||||
|
||||
This module supports multiple cards.
|
||||
The driver requires the firmware loader support on kernel.
|
||||
You need to install the firmware file "riptide.hex" to the standard
|
||||
firmware path (e.g. /lib/firmware).
|
||||
|
||||
Module snd-rme32
|
||||
----------------
|
||||
|
||||
|
|
|
@ -1123,8 +1123,8 @@
|
|||
if ((err = pci_enable_device(pci)) < 0)
|
||||
return err;
|
||||
/* check PCI availability (28bit DMA) */
|
||||
if (pci_set_dma_mask(pci, 0x0fffffff) < 0 ||
|
||||
pci_set_consistent_dma_mask(pci, 0x0fffffff) < 0) {
|
||||
if (pci_set_dma_mask(pci, DMA_28BIT_MASK) < 0 ||
|
||||
pci_set_consistent_dma_mask(pci, DMA_28BIT_MASK) < 0) {
|
||||
printk(KERN_ERR "error to set 28bit mask DMA\n");
|
||||
pci_disable_device(pci);
|
||||
return -ENXIO;
|
||||
|
@ -1216,7 +1216,7 @@
|
|||
The allocation of PCI resources is done in the
|
||||
<function>probe()</function> function, and usually an extra
|
||||
<function>xxx_create()</function> function is written for this
|
||||
purpose.
|
||||
purpose.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
|
@ -1225,7 +1225,7 @@
|
|||
allocating resources. Also, you need to set the proper PCI DMA
|
||||
mask to limit the accessed i/o range. In some cases, you might
|
||||
need to call <function>pci_set_master()</function> function,
|
||||
too.
|
||||
too.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
|
@ -1236,8 +1236,8 @@
|
|||
<![CDATA[
|
||||
if ((err = pci_enable_device(pci)) < 0)
|
||||
return err;
|
||||
if (pci_set_dma_mask(pci, 0x0fffffff) < 0 ||
|
||||
pci_set_consistent_dma_mask(pci, 0x0fffffff) < 0) {
|
||||
if (pci_set_dma_mask(pci, DMA_28BIT_MASK) < 0 ||
|
||||
pci_set_consistent_dma_mask(pci, DMA_28BIT_MASK) < 0) {
|
||||
printk(KERN_ERR "error to set 28bit mask DMA\n");
|
||||
pci_disable_device(pci);
|
||||
return -ENXIO;
|
||||
|
@ -1256,13 +1256,13 @@
|
|||
functions. Unlike ALSA ver.0.5.x., there are no helpers for
|
||||
that. And these resources must be released in the destructor
|
||||
function (see below). Also, on ALSA 0.9.x, you don't need to
|
||||
allocate (pseudo-)DMA for PCI like ALSA 0.5.x.
|
||||
allocate (pseudo-)DMA for PCI like ALSA 0.5.x.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Now assume that this PCI device has an I/O port with 8 bytes
|
||||
and an interrupt. Then struct <structname>mychip</structname> will have the
|
||||
following fields:
|
||||
following fields:
|
||||
|
||||
<informalexample>
|
||||
<programlisting>
|
||||
|
|
|
@ -52,7 +52,7 @@
|
|||
51 -> ProVideo PV952 [1540:9524]
|
||||
52 -> AverMedia AverTV/305 [1461:2108]
|
||||
53 -> ASUS TV-FM 7135 [1043:4845]
|
||||
54 -> LifeView FlyTV Platinum FM [5168:0214,1489:0214]
|
||||
54 -> LifeView FlyTV Platinum FM / Gold [5168:0214,1489:0214,5168:0304]
|
||||
55 -> LifeView FlyDVB-T DUO [5168:0306]
|
||||
56 -> Avermedia AVerTV 307 [1461:a70a]
|
||||
57 -> Avermedia AVerTV GO 007 FM [1461:f31f]
|
||||
|
@ -84,7 +84,7 @@
|
|||
83 -> Terratec Cinergy 250 PCI TV [153b:1160]
|
||||
84 -> LifeView FlyDVB Trio [5168:0319]
|
||||
85 -> AverTV DVB-T 777 [1461:2c05]
|
||||
86 -> LifeView FlyDVB-T [5168:0301]
|
||||
86 -> LifeView FlyDVB-T / Genius VideoWonder DVB-T [5168:0301,1489:0301]
|
||||
87 -> ADS Instant TV Duo Cardbus PTV331 [0331:1421]
|
||||
88 -> Tevion/KWorld DVB-T 220RF [17de:7201]
|
||||
89 -> ELSA EX-VISION 700TV [1048:226c]
|
||||
|
@ -92,3 +92,4 @@
|
|||
91 -> AVerMedia A169 B [1461:7360]
|
||||
92 -> AVerMedia A169 B1 [1461:6360]
|
||||
93 -> Medion 7134 Bridge #2 [16be:0005]
|
||||
94 -> LifeView FlyDVB-T Hybrid Cardbus [5168:3306,5168:3502]
|
||||
|
|
|
@ -122,7 +122,7 @@ WHAT YOU NEED:
|
|||
- A Linux box with USB support (2.3/2.4; 2.2 w/backport may work)
|
||||
|
||||
- A Video4Linux compatible frame grabber program such as xawtv.
|
||||
|
||||
|
||||
HOW TO COMPILE THE DRIVER:
|
||||
|
||||
You need to compile the driver only if you are a developer
|
|
@ -9,7 +9,7 @@ INTRODUCTION:
|
|||
|
||||
This is a driver for the OV511, a USB-only chip used in many "webcam" devices.
|
||||
Any camera using the OV511/OV511+ and the OV6620/OV7610/20/20AE should work.
|
||||
Video capture devices that use the Philips SAA7111A decoder also work. It
|
||||
Video capture devices that use the Philips SAA7111A decoder also work. It
|
||||
supports streaming and capture of color or monochrome video via the Video4Linux
|
||||
API. Most V4L apps are compatible with it. Most resolutions with a width and
|
||||
height that are a multiple of 8 are supported.
|
||||
|
@ -52,15 +52,15 @@ from it:
|
|||
|
||||
chmod 666 /dev/video
|
||||
chmod 666 /dev/video0 (if necessary)
|
||||
|
||||
|
||||
Now you are ready to run a video app! Both vidcat and xawtv work well for me
|
||||
at 640x480.
|
||||
|
||||
|
||||
[Using vidcat:]
|
||||
|
||||
vidcat -s 640x480 -p c > test.jpg
|
||||
xview test.jpg
|
||||
|
||||
|
||||
[Using xawtv:]
|
||||
|
||||
From the main xawtv directory:
|
||||
|
@ -70,7 +70,7 @@ From the main xawtv directory:
|
|||
make
|
||||
make install
|
||||
|
||||
Now you should be able to run xawtv. Right click for the options dialog.
|
||||
Now you should be able to run xawtv. Right click for the options dialog.
|
||||
|
||||
MODULE PARAMETERS:
|
||||
|
||||
|
@ -286,4 +286,3 @@ Randy Dunlap, and others. Big thanks to them for their pioneering work on that
|
|||
and the USB stack. Thanks to Bret Wallach for getting camera reg IO, ISOC, and
|
||||
image capture working. Thanks to Orion Sky Lawlor, Kevin Moore, and Claudio
|
||||
Matsuoka for their work as well.
|
||||
|
|
@ -174,7 +174,7 @@ Module parameters are listed below:
|
|||
-------------------------------------------------------------------------------
|
||||
Name: video_nr
|
||||
Type: short array (min = 0, max = 64)
|
||||
Syntax: <-1|n[,...]>
|
||||
Syntax: <-1|n[,...]>
|
||||
Description: Specify V4L2 minor mode number:
|
||||
-1 = use next available
|
||||
n = use minor number n
|
||||
|
@ -187,7 +187,7 @@ Default: -1
|
|||
-------------------------------------------------------------------------------
|
||||
Name: force_munmap
|
||||
Type: bool array (min = 0, max = 64)
|
||||
Syntax: <0|1[,...]>
|
||||
Syntax: <0|1[,...]>
|
||||
Description: Force the application to unmap previously mapped buffer memory
|
||||
before calling any VIDIOC_S_CROP or VIDIOC_S_FMT ioctl's. Not
|
||||
all the applications support this feature. This parameter is
|
||||
|
@ -206,7 +206,7 @@ Default: 2
|
|||
-------------------------------------------------------------------------------
|
||||
Name: debug
|
||||
Type: ushort
|
||||
Syntax: <n>
|
||||
Syntax: <n>
|
||||
Description: Debugging information level, from 0 to 3:
|
||||
0 = none (use carefully)
|
||||
1 = critical errors
|
||||
|
@ -267,7 +267,7 @@ The sysfs interface also provides the "frame_header" entry, which exports the
|
|||
frame header of the most recent requested and captured video frame. The header
|
||||
is always 18-bytes long and is appended to every video frame by the SN9C10x
|
||||
controllers. As an example, this additional information can be used by the user
|
||||
application for implementing auto-exposure features via software.
|
||||
application for implementing auto-exposure features via software.
|
||||
|
||||
The following table describes the frame header:
|
||||
|
||||
|
@ -441,7 +441,7 @@ blue pixels in one video frame. Each pixel is associated with a 8-bit long
|
|||
value and is disposed in memory according to the pattern shown below:
|
||||
|
||||
B[0] G[1] B[2] G[3] ... B[m-2] G[m-1]
|
||||
G[m] R[m+1] G[m+2] R[m+2] ... G[2m-2] R[2m-1]
|
||||
G[m] R[m+1] G[m+2] R[m+2] ... G[2m-2] R[2m-1]
|
||||
...
|
||||
... B[(n-1)(m-2)] G[(n-1)(m-1)]
|
||||
... G[n(m-2)] R[n(m-1)]
|
||||
|
@ -472,12 +472,12 @@ The pixel reference value is calculated as follows:
|
|||
The algorithm purely describes the conversion from compressed Bayer code used
|
||||
in the SN9C10x chips to uncompressed Bayer. Additional steps are required to
|
||||
convert this to a color image (i.e. a color interpolation algorithm).
|
||||
|
||||
|
||||
The following Huffman codes have been found:
|
||||
0: +0 (relative to reference pixel value)
|
||||
0: +0 (relative to reference pixel value)
|
||||
100: +4
|
||||
101: -4?
|
||||
1110xxxx: set absolute value to xxxx.0000
|
||||
1110xxxx: set absolute value to xxxx.0000
|
||||
1101: +11
|
||||
1111: -11
|
||||
11001: +20
|
|
@ -5,15 +5,15 @@ Copyright, 2001, Kevin Sisson
|
|||
|
||||
INTRODUCTION:
|
||||
|
||||
STMicroelectronics produces the STV0680B chip, which comes in two
|
||||
types, -001 and -003. The -003 version allows the recording and downloading
|
||||
of sound clips from the camera, and allows a flash attachment. Otherwise,
|
||||
it uses the same commands as the -001 version. Both versions support a
|
||||
variety of SDRAM sizes and sensors, allowing for a maximum of 26 VGA or 20
|
||||
CIF pictures. The STV0680 supports either a serial or a usb interface, and
|
||||
STMicroelectronics produces the STV0680B chip, which comes in two
|
||||
types, -001 and -003. The -003 version allows the recording and downloading
|
||||
of sound clips from the camera, and allows a flash attachment. Otherwise,
|
||||
it uses the same commands as the -001 version. Both versions support a
|
||||
variety of SDRAM sizes and sensors, allowing for a maximum of 26 VGA or 20
|
||||
CIF pictures. The STV0680 supports either a serial or a usb interface, and
|
||||
video is possible through the usb interface.
|
||||
|
||||
The following cameras are known to work with this driver, although any
|
||||
The following cameras are known to work with this driver, although any
|
||||
camera with Vendor/Product codes of 0553/0202 should work:
|
||||
|
||||
Aiptek Pencam (various models)
|
||||
|
@ -34,15 +34,15 @@ http://www.linux-usb.org
|
|||
MODULE OPTIONS:
|
||||
|
||||
When the driver is compiled as a module, you can set a "swapRGB=1"
|
||||
option, if necessary, for those applications that require it
|
||||
(such as xawtv). However, the driver should detect and set this
|
||||
option, if necessary, for those applications that require it
|
||||
(such as xawtv). However, the driver should detect and set this
|
||||
automatically, so this option should not normally be used.
|
||||
|
||||
|
||||
KNOWN PROBLEMS:
|
||||
|
||||
The driver seems to work better with the usb-ohci than the usb-uhci host
|
||||
controller driver.
|
||||
The driver seems to work better with the usb-ohci than the usb-uhci host
|
||||
controller driver.
|
||||
|
||||
HELP:
|
||||
|
||||
|
@ -50,6 +50,4 @@ The latest info on this driver can be found at:
|
|||
http://personal.clt.bellsouth.net/~kjsisson or at
|
||||
http://stv0680-usb.sourceforge.net
|
||||
|
||||
Any questions to me can be send to: kjsisson@bellsouth.net
|
||||
|
||||
|
||||
Any questions to me can be send to: kjsisson@bellsouth.net
|
|
@ -1,5 +1,5 @@
|
|||
|
||||
W996[87]CF JPEG USB Dual Mode Camera Chip
|
||||
W996[87]CF JPEG USB Dual Mode Camera Chip
|
||||
Driver for Linux 2.6 (basic version)
|
||||
=========================================
|
||||
|
||||
|
@ -115,7 +115,7 @@ additional testing and full support, would be much appreciated.
|
|||
======================
|
||||
For it to work properly, the driver needs kernel support for Video4Linux, USB
|
||||
and I2C, and the "ovcamchip" module for the image sensor. Make sure you are not
|
||||
actually using any external "ovcamchip" module, given that the W996[87]CF
|
||||
actually using any external "ovcamchip" module, given that the W996[87]CF
|
||||
driver depends on the version of the module present in the official kernels.
|
||||
|
||||
The following options of the kernel configuration file must be enabled and
|
||||
|
@ -197,16 +197,16 @@ Note: The kernel must be compiled with the CONFIG_KMOD option
|
|||
enabled for the 'ovcamchip' module to be loaded and for
|
||||
this parameter to be present.
|
||||
-------------------------------------------------------------------------------
|
||||
Name: simcams
|
||||
Type: int
|
||||
Syntax: <n>
|
||||
Name: simcams
|
||||
Type: int
|
||||
Syntax: <n>
|
||||
Description: Number of cameras allowed to stream simultaneously.
|
||||
n may vary from 0 to 32.
|
||||
Default: 32
|
||||
-------------------------------------------------------------------------------
|
||||
Name: video_nr
|
||||
Type: int array (min = 0, max = 32)
|
||||
Syntax: <-1|n[,...]>
|
||||
Syntax: <-1|n[,...]>
|
||||
Description: Specify V4L minor mode number.
|
||||
-1 = use next available
|
||||
n = use minor number n
|
||||
|
@ -219,7 +219,7 @@ Default: -1
|
|||
-------------------------------------------------------------------------------
|
||||
Name: packet_size
|
||||
Type: int array (min = 0, max = 32)
|
||||
Syntax: <n[,...]>
|
||||
Syntax: <n[,...]>
|
||||
Description: Specify the maximum data payload size in bytes for alternate
|
||||
settings, for each device. n is scaled between 63 and 1023.
|
||||
Default: 1023
|
||||
|
@ -234,7 +234,7 @@ Default: 2
|
|||
-------------------------------------------------------------------------------
|
||||
Name: double_buffer
|
||||
Type: bool array (min = 0, max = 32)
|
||||
Syntax: <0|1[,...]>
|
||||
Syntax: <0|1[,...]>
|
||||
Description: Hardware double buffering: 0 disabled, 1 enabled.
|
||||
It should be enabled if you want smooth video output: if you
|
||||
obtain out of sync. video, disable it, or try to
|
||||
|
@ -243,13 +243,13 @@ Default: 1 for every device.
|
|||
-------------------------------------------------------------------------------
|
||||
Name: clamping
|
||||
Type: bool array (min = 0, max = 32)
|
||||
Syntax: <0|1[,...]>
|
||||
Syntax: <0|1[,...]>
|
||||
Description: Video data clamping: 0 disabled, 1 enabled.
|
||||
Default: 0 for every device.
|
||||
-------------------------------------------------------------------------------
|
||||
Name: filter_type
|
||||
Type: int array (min = 0, max = 32)
|
||||
Syntax: <0|1|2[,...]>
|
||||
Syntax: <0|1|2[,...]>
|
||||
Description: Video filter type.
|
||||
0 none, 1 (1-2-1) 3-tap filter, 2 (2-3-6-3-2) 5-tap filter.
|
||||
The filter is used to reduce noise and aliasing artifacts
|
||||
|
@ -258,13 +258,13 @@ Default: 0 for every device.
|
|||
-------------------------------------------------------------------------------
|
||||
Name: largeview
|
||||
Type: bool array (min = 0, max = 32)
|
||||
Syntax: <0|1[,...]>
|
||||
Syntax: <0|1[,...]>
|
||||
Description: Large view: 0 disabled, 1 enabled.
|
||||
Default: 1 for every device.
|
||||
-------------------------------------------------------------------------------
|
||||
Name: upscaling
|
||||
Type: bool array (min = 0, max = 32)
|
||||
Syntax: <0|1[,...]>
|
||||
Syntax: <0|1[,...]>
|
||||
Description: Software scaling (for non-compressed video only):
|
||||
0 disabled, 1 enabled.
|
||||
Disable it if you have a slow CPU or you don't have enough
|
||||
|
@ -341,8 +341,8 @@ Default: 50 for every device.
|
|||
-------------------------------------------------------------------------------
|
||||
Name: bandingfilter
|
||||
Type: bool array (min = 0, max = 32)
|
||||
Syntax: <0|1[,...]>
|
||||
Description: Banding filter to reduce effects of fluorescent
|
||||
Syntax: <0|1[,...]>
|
||||
Description: Banding filter to reduce effects of fluorescent
|
||||
lighting:
|
||||
0 disabled, 1 enabled.
|
||||
This filter tries to reduce the pattern of horizontal
|
||||
|
@ -374,7 +374,7 @@ Default: 0 for every device.
|
|||
-------------------------------------------------------------------------------
|
||||
Name: monochrome
|
||||
Type: bool array (min = 0, max = 32)
|
||||
Syntax: <0|1[,...]>
|
||||
Syntax: <0|1[,...]>
|
||||
Description: The image sensor is monochrome:
|
||||
0 = no, 1 = yes
|
||||
Default: 0 for every device.
|
||||
|
@ -400,19 +400,19 @@ Default: 32768 for every device.
|
|||
-------------------------------------------------------------------------------
|
||||
Name: contrast
|
||||
Type: long array (min = 0, max = 32)
|
||||
Syntax: <n[,...]>
|
||||
Syntax: <n[,...]>
|
||||
Description: Set picture contrast (0-65535).
|
||||
Default: 50000 for every device.
|
||||
-------------------------------------------------------------------------------
|
||||
Name: whiteness
|
||||
Type: long array (min = 0, max = 32)
|
||||
Syntax: <n[,...]>
|
||||
Syntax: <n[,...]>
|
||||
Description: Set picture whiteness (0-65535).
|
||||
Default: 32768 for every device.
|
||||
-------------------------------------------------------------------------------
|
||||
Name: debug
|
||||
Type: int
|
||||
Syntax: <n>
|
||||
Syntax: <n>
|
||||
Description: Debugging information level, from 0 to 6:
|
||||
0 = none (use carefully)
|
||||
1 = critical errors
|
|
@ -27,12 +27,21 @@ number of free hugetlb pages at any time. It also displays information about
|
|||
the configured hugepage size - this is needed for generating the proper
|
||||
alignment and size of the arguments to the above system calls.
|
||||
|
||||
The output of "cat /proc/meminfo" will have output like:
|
||||
The output of "cat /proc/meminfo" will have lines like:
|
||||
|
||||
.....
|
||||
HugePages_Total: xxx
|
||||
HugePages_Free: yyy
|
||||
Hugepagesize: zzz KB
|
||||
HugePages_Rsvd: www
|
||||
Hugepagesize: zzz kB
|
||||
|
||||
where:
|
||||
HugePages_Total is the size of the pool of hugepages.
|
||||
HugePages_Free is the number of hugepages in the pool that are not yet
|
||||
allocated.
|
||||
HugePages_Rsvd is short for "reserved," and is the number of hugepages
|
||||
for which a commitment to allocate from the pool has been made, but no
|
||||
allocation has yet been made. It's vaguely analogous to overcommit.
|
||||
|
||||
/proc/filesystems should also show a filesystem of type "hugetlbfs" configured
|
||||
in the kernel.
|
||||
|
@ -42,11 +51,11 @@ pages in the kernel. Super user can dynamically request more (or free some
|
|||
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 transferred
|
||||
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.
|
||||
Pages that are used as hugetlb pages are reserved inside the kernel and cannot
|
||||
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
|
||||
|
@ -60,7 +69,7 @@ Use the following command to dynamically allocate/deallocate hugepages:
|
|||
This command will try to configure 20 hugepages in the system. The success
|
||||
or failure of allocation depends on the amount of physically contiguous
|
||||
memory that is preset in system at this time. System administrators may want
|
||||
to put this command in one of the local rc init file. This will enable the
|
||||
to put this command in one of the local rc init files. This will enable the
|
||||
kernel to request huge pages early in the boot process (when the possibility
|
||||
of getting physical contiguous pages is still very high).
|
||||
|
||||
|
@ -78,8 +87,8 @@ the uid and gid of the current process are taken. The mode option sets the
|
|||
mode of root of file system to value & 0777. This value is given in octal.
|
||||
By default the value 0755 is picked. The size option sets the maximum value of
|
||||
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
|
||||
rounded down to HPAGE_SIZE. The option nr_inodes sets the maximum number of
|
||||
inodes that /mnt/huge can use. If the size or nr_inodes 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
|
||||
|
@ -88,7 +97,7 @@ the end of this document.
|
|||
read and write system calls are not supported on files that reside on hugetlb
|
||||
file systems.
|
||||
|
||||
A regular chown, chgrp and chmod commands (with right permissions) could be
|
||||
Regular chown, chgrp, and chmod commands (with right permissions) could be
|
||||
used to change the file attributes on hugetlbfs.
|
||||
|
||||
Also, it is important to note that no such mount command is required if the
|
||||
|
@ -96,8 +105,8 @@ applications are going to use only shmat/shmget system calls. Users who
|
|||
wish to use hugetlb page via shared memory segment should be a member of
|
||||
a supplementary group and system admin needs to configure that gid into
|
||||
/proc/sys/vm/hugetlb_shm_group. It is possible for same or different
|
||||
applications to use any combination of mmaps and shm* calls. Though the
|
||||
mount of filesystem will be required for using mmaps.
|
||||
applications to use any combination of mmaps and shm* calls, though the
|
||||
mount of filesystem will be required for using mmap calls.
|
||||
|
||||
*******************************************************************
|
||||
|
||||
|
|
|
@ -151,6 +151,11 @@ NUMA
|
|||
|
||||
numa=fake=X Fake X nodes and ignore NUMA setup of the actual machine.
|
||||
|
||||
numa=hotadd=percent
|
||||
Only allow hotadd memory to preallocate page structures upto
|
||||
percent of already available memory.
|
||||
numa=hotadd=0 will disable hotadd memory.
|
||||
|
||||
ACPI
|
||||
|
||||
acpi=off Don't enable ACPI
|
||||
|
|
2
Kbuild
2
Kbuild
|
@ -18,7 +18,7 @@ define sed-y
|
|||
"/^->/{s:^->\([^ ]*\) [\$$#]*\([^ ]*\) \(.*\):#define \1 \2 /* \3 */:; s:->::; p;}"
|
||||
endef
|
||||
# Override default regexp for specific architectures
|
||||
sed-$(CONFIG_MIPS) := "/^@@@/s///p"
|
||||
sed-$(CONFIG_MIPS) := "/^@@@/{s/^@@@//; s/ \#.*\$$//; p;}"
|
||||
|
||||
quiet_cmd_offsets = GEN $@
|
||||
define cmd_offsets
|
||||
|
|
37
MAINTAINERS
37
MAINTAINERS
|
@ -411,6 +411,7 @@ AX.25 NETWORK LAYER
|
|||
P: Ralf Baechle
|
||||
M: ralf@linux-mips.org
|
||||
L: linux-hams@vger.kernel.org
|
||||
W: http://www.linux-ax25.org/
|
||||
S: Maintained
|
||||
|
||||
BAYCOM/HDLCDRV DRIVERS FOR AX.25
|
||||
|
@ -420,6 +421,14 @@ L: linux-hams@vger.kernel.org
|
|||
W: http://www.baycom.org/~tom/ham/ham.html
|
||||
S: Maintained
|
||||
|
||||
BCM43XX WIRELESS DRIVER
|
||||
P: Michael Buesch
|
||||
M: mb@bu3sch.de
|
||||
P: Stefano Brivio
|
||||
M: st3@riseup.net
|
||||
W: http://bcm43xx.berlios.de/
|
||||
S: Maintained
|
||||
|
||||
BEFS FILE SYSTEM
|
||||
P: Sergey S. Kostyliov
|
||||
M: rathamahata@php4.ru
|
||||
|
@ -1451,6 +1460,19 @@ P: Juanjo Ciarlante
|
|||
M: jjciarla@raiz.uncu.edu.ar
|
||||
S: Maintained
|
||||
|
||||
IPATH DRIVER:
|
||||
P: Bryan O'Sullivan
|
||||
M: support@pathscale.com
|
||||
L: openib-general@openib.org
|
||||
S: Supported
|
||||
|
||||
IPMI SUBSYSTEM
|
||||
P: Corey Minyard
|
||||
M: minyard@acm.org
|
||||
L: openipmi-developer@lists.sourceforge.net
|
||||
W: http://openipmi.sourceforge.net/
|
||||
S: Supported
|
||||
|
||||
IPX NETWORK LAYER
|
||||
P: Arnaldo Carvalho de Melo
|
||||
M: acme@conectiva.com.br
|
||||
|
@ -1550,9 +1572,7 @@ S: Maintained
|
|||
|
||||
KEXEC
|
||||
P: Eric Biederman
|
||||
P: Randy Dunlap
|
||||
M: ebiederm@xmission.com
|
||||
M: rdunlap@xenotime.net
|
||||
W: http://www.xmission.com/~ebiederm/files/kexec/
|
||||
L: linux-kernel@vger.kernel.org
|
||||
L: fastboot@osdl.org
|
||||
|
@ -1865,6 +1885,7 @@ NETROM NETWORK LAYER
|
|||
P: Ralf Baechle
|
||||
M: ralf@linux-mips.org
|
||||
L: linux-hams@vger.kernel.org
|
||||
W: http://www.linux-ax25.org/
|
||||
S: Maintained
|
||||
|
||||
NETWORK BLOCK DEVICE
|
||||
|
@ -2052,8 +2073,12 @@ P: Matthew Wilcox
|
|||
M: matthew@wil.cx
|
||||
P: Grant Grundler
|
||||
M: grundler@parisc-linux.org
|
||||
P: Kyle McMartin
|
||||
M: kyle@parisc-linux.org
|
||||
L: parisc-linux@parisc-linux.org
|
||||
W: http://www.parisc-linux.org/
|
||||
T: git kernel.org:/pub/scm/linux/kernel/git/kyle/parisc-2.6.git
|
||||
T: cvs cvs.parisc-linux.org:/var/cvs/linux-2.6
|
||||
S: Maintained
|
||||
|
||||
PCI ERROR RECOVERY
|
||||
|
@ -2256,6 +2281,7 @@ ROSE NETWORK LAYER
|
|||
P: Ralf Baechle
|
||||
M: ralf@linux-mips.org
|
||||
L: linux-hams@vger.kernel.org
|
||||
W: http://www.linux-ax25.org/
|
||||
S: Maintained
|
||||
|
||||
RISCOM8 DRIVER
|
||||
|
@ -3054,13 +3080,6 @@ M: khali@linux-fr.org
|
|||
L: lm-sensors@lm-sensors.org
|
||||
S: Odd Fixes
|
||||
|
||||
WAN ROUTER & SANGOMA WANPIPE DRIVERS & API (X.25, FRAME RELAY, PPP, CISCO HDLC)
|
||||
P: Nenad Corbic
|
||||
M: ncorbic@sangoma.com
|
||||
M: dm@sangoma.com
|
||||
W: http://www.sangoma.com
|
||||
S: Supported
|
||||
|
||||
WATCHDOG DEVICE DRIVERS
|
||||
P: Wim Van Sebroeck
|
||||
M: wim@iguana.be
|
||||
|
|
60
Makefile
60
Makefile
|
@ -1,7 +1,7 @@
|
|||
VERSION = 2
|
||||
PATCHLEVEL = 6
|
||||
SUBLEVEL = 16
|
||||
EXTRAVERSION =
|
||||
SUBLEVEL = 17
|
||||
EXTRAVERSION =-rc3
|
||||
NAME=Sliding Snow Leopard
|
||||
|
||||
# *DOCUMENTATION*
|
||||
|
@ -1112,7 +1112,6 @@ modules_install: _emodinst_ _emodinst_post
|
|||
install-dir := $(if $(INSTALL_MOD_DIR),$(INSTALL_MOD_DIR),extra)
|
||||
PHONY += _emodinst_
|
||||
_emodinst_:
|
||||
$(Q)rm -rf $(MODLIB)/$(install-dir)
|
||||
$(Q)mkdir -p $(MODLIB)/$(install-dir)
|
||||
$(Q)$(MAKE) -rR -f $(srctree)/scripts/Makefile.modinst
|
||||
|
||||
|
@ -1275,40 +1274,43 @@ kernelversion:
|
|||
|
||||
# Single targets
|
||||
# ---------------------------------------------------------------------------
|
||||
# The directory part is taken from first prerequisite, so this
|
||||
# works even with external modules
|
||||
%.s: %.c prepare scripts FORCE
|
||||
$(Q)$(MAKE) $(build)=$(dir $<) $(dir $<)$(notdir $@)
|
||||
%.i: %.c prepare scripts FORCE
|
||||
$(Q)$(MAKE) $(build)=$(dir $<) $(dir $<)$(notdir $@)
|
||||
%.o: %.c prepare scripts FORCE
|
||||
$(Q)$(MAKE) $(build)=$(dir $<) $(dir $<)$(notdir $@)
|
||||
%.lst: %.c prepare scripts FORCE
|
||||
$(Q)$(MAKE) $(build)=$(dir $<) $(dir $<)$(notdir $@)
|
||||
%.s: %.S prepare scripts FORCE
|
||||
$(Q)$(MAKE) $(build)=$(dir $<) $(dir $<)$(notdir $@)
|
||||
%.o: %.S prepare scripts FORCE
|
||||
$(Q)$(MAKE) $(build)=$(dir $<) $(dir $<)$(notdir $@)
|
||||
# Single targets are compatible with:
|
||||
# - build whith mixed source and output
|
||||
# - build with separate output dir 'make O=...'
|
||||
# - external modules
|
||||
#
|
||||
# target-dir => where to store outputfile
|
||||
# build-dir => directory in kernel source tree to use
|
||||
|
||||
# For external modules we shall include any directory of the target,
|
||||
# but usual case there is no directory part.
|
||||
# make M=`pwd` module.o => $(dir $@)=./
|
||||
# make M=`pwd` foo/module.o => $(dir $@)=foo/
|
||||
# make M=`pwd` / => $(dir $@)=/
|
||||
|
||||
ifeq ($(KBUILD_EXTMOD),)
|
||||
target-dir = $(@D)
|
||||
build-dir = $(patsubst %/,%,$(dir $@))
|
||||
target-dir = $(dir $@)
|
||||
else
|
||||
zap-slash=$(filter-out .,$(patsubst %/,%,$(dir $@)))
|
||||
target-dir = $(KBUILD_EXTMOD)$(if $(zap-slash),/$(zap-slash))
|
||||
build-dir = $(KBUILD_EXTMOD)$(if $(zap-slash),/$(zap-slash))
|
||||
target-dir = $(if $(KBUILD_EXTMOD),$(dir $<),$(dir $@))
|
||||
endif
|
||||
|
||||
/ %/: scripts prepare FORCE
|
||||
%.s: %.c prepare scripts FORCE
|
||||
$(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@)
|
||||
%.i: %.c prepare scripts FORCE
|
||||
$(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@)
|
||||
%.o: %.c prepare scripts FORCE
|
||||
$(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@)
|
||||
%.lst: %.c prepare scripts FORCE
|
||||
$(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@)
|
||||
%.s: %.S prepare scripts FORCE
|
||||
$(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@)
|
||||
%.o: %.S prepare scripts FORCE
|
||||
$(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@)
|
||||
|
||||
# Modules
|
||||
/ %/: prepare scripts FORCE
|
||||
$(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1) \
|
||||
$(build)=$(target-dir)
|
||||
%.ko: scripts FORCE
|
||||
$(build)=$(build-dir)
|
||||
%.ko: prepare scripts FORCE
|
||||
$(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1) \
|
||||
$(build)=$(target-dir) $(@:.ko=.o)
|
||||
$(build)=$(build-dir) $(@:.ko=.o)
|
||||
$(Q)$(MAKE) -rR -f $(srctree)/scripts/Makefile.modpost
|
||||
|
||||
# FIXME Should go into a make.lib or something
|
||||
|
|
23
README
23
README
|
@ -165,10 +165,31 @@ CONFIGURING the kernel:
|
|||
"make xconfig" X windows (Qt) based configuration tool.
|
||||
"make gconfig" X windows (Gtk) based configuration tool.
|
||||
"make oldconfig" Default all questions based on the contents of
|
||||
your existing ./.config file.
|
||||
your existing ./.config file and asking about
|
||||
new config symbols.
|
||||
"make silentoldconfig"
|
||||
Like above, but avoids cluttering the screen
|
||||
with questions already answered.
|
||||
"make defconfig" Create a ./.config file by using the default
|
||||
symbol values from arch/$ARCH/defconfig.
|
||||
"make allyesconfig"
|
||||
Create a ./.config file by setting symbol
|
||||
values to 'y' as much as possible.
|
||||
"make allmodconfig"
|
||||
Create a ./.config file by setting symbol
|
||||
values to 'm' as much as possible.
|
||||
"make allnoconfig" Create a ./.config file by setting symbol
|
||||
values to 'n' as much as possible.
|
||||
"make randconfig" Create a ./.config file by setting symbol
|
||||
values to random values.
|
||||
|
||||
The allyesconfig/allmodconfig/allnoconfig/randconfig variants can
|
||||
also use the environment variable KCONFIG_ALLCONFIG to specify a
|
||||
filename that contains config options that the user requires to be
|
||||
set to a specific value. If KCONFIG_ALLCONFIG=filename is not used,
|
||||
"make *config" checks for a file named "all{yes/mod/no/random}.config"
|
||||
for symbol values that are to be forced. If this file is not found,
|
||||
it checks for a file named "all.config" to contain forced values.
|
||||
|
||||
NOTES on "make config":
|
||||
- having unnecessary drivers will make the kernel bigger, and can
|
||||
|
|
|
@ -549,6 +549,11 @@ config NUMA
|
|||
Access). This option is for configuring high-end multiprocessor
|
||||
server machines. If in doubt, say N.
|
||||
|
||||
config NODES_SHIFT
|
||||
int
|
||||
default "7"
|
||||
depends on NEED_MULTIPLE_NODES
|
||||
|
||||
# LARGE_VMALLOC is racy, if you *really* need it then fix it first
|
||||
config ALPHA_LARGE_VMALLOC
|
||||
bool
|
||||
|
|
|
@ -76,7 +76,6 @@ EXPORT_SYMBOL(strncpy);
|
|||
EXPORT_SYMBOL(strnlen);
|
||||
EXPORT_SYMBOL(strncat);
|
||||
EXPORT_SYMBOL(strstr);
|
||||
EXPORT_SYMBOL(strpbrk);
|
||||
EXPORT_SYMBOL(strchr);
|
||||
EXPORT_SYMBOL(strrchr);
|
||||
EXPORT_SYMBOL(memcmp);
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
#include <linux/config.h> /* CONFIG_ALPHA_LCA etc */
|
||||
#include <linux/mc146818rtc.h>
|
||||
#include <linux/console.h>
|
||||
#include <linux/cpu.h>
|
||||
#include <linux/errno.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/string.h>
|
||||
|
@ -471,6 +472,22 @@ page_is_ram(unsigned long pfn)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int __init
|
||||
register_cpus(void)
|
||||
{
|
||||
int i;
|
||||
|
||||
for_each_possible_cpu(i) {
|
||||
struct cpu *p = kzalloc(sizeof(*p), GFP_KERNEL);
|
||||
if (!p)
|
||||
return -ENOMEM;
|
||||
register_cpu(p, i, NULL);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
arch_initcall(register_cpus);
|
||||
|
||||
void __init
|
||||
setup_arch(char **cmdline_p)
|
||||
{
|
||||
|
|
|
@ -439,7 +439,7 @@ setup_smp(void)
|
|||
if ((cpu->flags & 0x1cc) == 0x1cc) {
|
||||
smp_num_probed++;
|
||||
/* Assume here that "whami" == index */
|
||||
cpu_set(i, cpu_possible_map);
|
||||
cpu_set(i, cpu_present_mask);
|
||||
cpu->pal_revision = boot_cpu_palrev;
|
||||
}
|
||||
|
||||
|
@ -450,9 +450,8 @@ setup_smp(void)
|
|||
}
|
||||
} else {
|
||||
smp_num_probed = 1;
|
||||
cpu_set(boot_cpuid, cpu_possible_map);
|
||||
cpu_set(boot_cpuid, cpu_present_mask);
|
||||
}
|
||||
cpu_present_mask = cpumask_of_cpu(boot_cpuid);
|
||||
|
||||
printk(KERN_INFO "SMP: %d CPUs probed -- cpu_present_mask = %lx\n",
|
||||
smp_num_probed, cpu_possible_map.bits[0]);
|
||||
|
@ -488,9 +487,8 @@ void __devinit
|
|||
smp_prepare_boot_cpu(void)
|
||||
{
|
||||
/*
|
||||
* Mark the boot cpu (current cpu) as both present and online
|
||||
* Mark the boot cpu (current cpu) as online
|
||||
*/
|
||||
cpu_set(smp_processor_id(), cpu_present_mask);
|
||||
cpu_set(smp_processor_id(), cpu_online_map);
|
||||
}
|
||||
|
||||
|
|
|
@ -43,8 +43,8 @@ strncpy:
|
|||
|
||||
.align 4
|
||||
$multiword:
|
||||
subq $24, 1, $2 # clear the final bits in the prev word
|
||||
or $2, $24, $2
|
||||
subq $27, 1, $2 # clear the final bits in the prev word
|
||||
or $2, $27, $2
|
||||
zapnot $1, $2, $1
|
||||
subq $18, 1, $18
|
||||
|
||||
|
@ -70,8 +70,8 @@ $multiword:
|
|||
bne $18, 0b
|
||||
|
||||
1: ldq_u $1, 0($16) # clear the leading bits in the final word
|
||||
subq $27, 1, $2
|
||||
or $2, $27, $2
|
||||
subq $24, 1, $2
|
||||
or $2, $24, $2
|
||||
|
||||
zap $1, $2, $1
|
||||
stq_u $1, 0($16)
|
||||
|
|
|
@ -512,6 +512,12 @@ config ARCH_DISCONTIGMEM_ENABLE
|
|||
or have huge holes in the physical address space for other reasons.
|
||||
See <file:Documentation/vm/numa> for more.
|
||||
|
||||
config NODES_SHIFT
|
||||
int
|
||||
default "4" if ARCH_LH7A40X
|
||||
default "2"
|
||||
depends on NEED_MULTIPLE_NODES
|
||||
|
||||
source "mm/Kconfig"
|
||||
|
||||
config LEDS
|
||||
|
|
|
@ -66,7 +66,7 @@ tune-$(CONFIG_CPU_XSC3) :=$(call cc-option,-mtune=xscale,-mtune=strongarm110) -
|
|||
tune-$(CONFIG_CPU_V6) :=$(call cc-option,-mtune=arm1136j-s,-mtune=strongarm)
|
||||
|
||||
ifeq ($(CONFIG_AEABI),y)
|
||||
CFLAGS_ABI :=-mabi=aapcs -mno-thumb-interwork
|
||||
CFLAGS_ABI :=-mabi=aapcs-linux -mno-thumb-interwork
|
||||
else
|
||||
CFLAGS_ABI :=$(call cc-option,-mapcs-32,-mabi=apcs-gnu) $(call cc-option,-mno-thumb-interwork,)
|
||||
endif
|
||||
|
|
|
@ -18,6 +18,7 @@ SECTIONS
|
|||
_start = .;
|
||||
*(.start)
|
||||
*(.text)
|
||||
*(.text.*)
|
||||
*(.fixup)
|
||||
*(.gnu.warning)
|
||||
*(.rodata)
|
||||
|
|
|
@ -18,6 +18,18 @@
|
|||
#include <asm/io.h>
|
||||
#include <asm/hardware/scoop.h>
|
||||
|
||||
/* PCMCIA to Scoop linkage
|
||||
|
||||
There is no easy way to link multiple scoop devices into one
|
||||
single entity for the pxa2xx_pcmcia device so this structure
|
||||
is used which is setup by the platform code.
|
||||
|
||||
This file is never modular so this symbol is always
|
||||
accessile to the board support files.
|
||||
*/
|
||||
struct scoop_pcmcia_config *platform_scoop_config;
|
||||
EXPORT_SYMBOL(platform_scoop_config);
|
||||
|
||||
#define SCOOP_REG(d,adr) (*(volatile unsigned short*)(d +(adr)))
|
||||
|
||||
struct scoop_dev {
|
||||
|
|
|
@ -379,7 +379,7 @@ CONFIG_MTD_PHYSMAP_BANKWIDTH=2
|
|||
# CONFIG_MTD_DOC2001 is not set
|
||||
# CONFIG_MTD_DOC2001PLUS is not set
|
||||
CONFIG_MTD_AT91_DATAFLASH=y
|
||||
CONFIG_MTD_AT91_DATAFLASH_CARD=y
|
||||
# CONFIG_MTD_AT91_DATAFLASH_CARD is not set
|
||||
|
||||
#
|
||||
# NAND Flash Device Drivers
|
||||
|
|
|
@ -370,7 +370,7 @@ CONFIG_MTD_PHYSMAP_BANKWIDTH=2
|
|||
# CONFIG_MTD_DOC2001 is not set
|
||||
# CONFIG_MTD_DOC2001PLUS is not set
|
||||
CONFIG_MTD_AT91_DATAFLASH=y
|
||||
CONFIG_MTD_AT91_DATAFLASH_CARD=y
|
||||
# CONFIG_MTD_AT91_DATAFLASH_CARD is not set
|
||||
|
||||
#
|
||||
# NAND Flash Device Drivers
|
||||
|
|
|
@ -1,12 +1,14 @@
|
|||
#
|
||||
# Automatically generated make config: don't edit
|
||||
# Linux kernel version: 2.6.16
|
||||
# Mon Mar 20 14:54:51 2006
|
||||
# Linux kernel version: 2.6.17-rc2
|
||||
# Wed Apr 19 21:21:01 2006
|
||||
#
|
||||
CONFIG_ARM=y
|
||||
CONFIG_MMU=y
|
||||
CONFIG_RWSEM_GENERIC_SPINLOCK=y
|
||||
CONFIG_GENERIC_HWEIGHT=y
|
||||
CONFIG_GENERIC_CALIBRATE_DELAY=y
|
||||
CONFIG_VECTORS_BASE=0xffff0000
|
||||
|
||||
#
|
||||
# Code maturity level options
|
||||
|
@ -28,6 +30,7 @@ CONFIG_SYSCTL=y
|
|||
# CONFIG_AUDIT is not set
|
||||
CONFIG_IKCONFIG=y
|
||||
CONFIG_IKCONFIG_PROC=y
|
||||
# CONFIG_RELAY is not set
|
||||
CONFIG_INITRAMFS_SOURCE=""
|
||||
CONFIG_UID16=y
|
||||
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
|
||||
|
@ -43,10 +46,6 @@ CONFIG_BASE_FULL=y
|
|||
CONFIG_FUTEX=y
|
||||
CONFIG_EPOLL=y
|
||||
CONFIG_SHMEM=y
|
||||
CONFIG_CC_ALIGN_FUNCTIONS=0
|
||||
CONFIG_CC_ALIGN_LABELS=0
|
||||
CONFIG_CC_ALIGN_LOOPS=0
|
||||
CONFIG_CC_ALIGN_JUMPS=0
|
||||
CONFIG_SLAB=y
|
||||
# CONFIG_TINY_SHMEM is not set
|
||||
CONFIG_BASE_SMALL=0
|
||||
|
@ -59,7 +58,6 @@ CONFIG_OBSOLETE_INTERMODULE=y
|
|||
CONFIG_MODULES=y
|
||||
CONFIG_MODULE_UNLOAD=y
|
||||
CONFIG_MODULE_FORCE_UNLOAD=y
|
||||
CONFIG_OBSOLETE_MODPARM=y
|
||||
# CONFIG_MODVERSIONS is not set
|
||||
# CONFIG_MODULE_SRCVERSION_ALL is not set
|
||||
CONFIG_KMOD=y
|
||||
|
@ -67,6 +65,7 @@ CONFIG_KMOD=y
|
|||
#
|
||||
# Block layer
|
||||
#
|
||||
# CONFIG_BLK_DEV_IO_TRACE is not set
|
||||
|
||||
#
|
||||
# IO Schedulers
|
||||
|
@ -94,6 +93,7 @@ CONFIG_ARCH_EP93XX=y
|
|||
# CONFIG_ARCH_IOP3XX is not set
|
||||
# CONFIG_ARCH_IXP4XX is not set
|
||||
# CONFIG_ARCH_IXP2000 is not set
|
||||
# CONFIG_ARCH_IXP23XX is not set
|
||||
# CONFIG_ARCH_L7200 is not set
|
||||
# CONFIG_ARCH_PXA is not set
|
||||
# CONFIG_ARCH_RPC is not set
|
||||
|
@ -112,7 +112,6 @@ CONFIG_ARCH_EP93XX=y
|
|||
#
|
||||
# Cirrus EP93xx Implementation Options
|
||||
#
|
||||
CONFIG_CRUNCH=y
|
||||
|
||||
#
|
||||
# EP93xx Platforms
|
||||
|
@ -232,12 +231,15 @@ CONFIG_SYN_COOKIES=y
|
|||
# CONFIG_INET_AH is not set
|
||||
# CONFIG_INET_ESP is not set
|
||||
# CONFIG_INET_IPCOMP is not set
|
||||
# CONFIG_INET_XFRM_TUNNEL is not set
|
||||
# CONFIG_INET_TUNNEL 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_INET6_XFRM_TUNNEL is not set
|
||||
# CONFIG_INET6_TUNNEL is not set
|
||||
# CONFIG_NETFILTER is not set
|
||||
|
||||
#
|
||||
|
@ -346,7 +348,6 @@ CONFIG_MTD_CFI_I2=y
|
|||
# CONFIG_MTD_OTP is not set
|
||||
CONFIG_MTD_CFI_INTELEXT=y
|
||||
CONFIG_MTD_CFI_AMDSTD=y
|
||||
CONFIG_MTD_CFI_AMDSTD_RETRY=0
|
||||
CONFIG_MTD_CFI_STAA=y
|
||||
CONFIG_MTD_CFI_UTIL=y
|
||||
# CONFIG_MTD_RAM is not set
|
||||
|
@ -371,7 +372,6 @@ CONFIG_MTD_PHYSMAP_BANKWIDTH=1
|
|||
# CONFIG_MTD_SLRAM is not set
|
||||
# CONFIG_MTD_PHRAM is not set
|
||||
# CONFIG_MTD_MTDRAM is not set
|
||||
# CONFIG_MTD_BLKMTD is not set
|
||||
# CONFIG_MTD_BLOCK2MTD is not set
|
||||
|
||||
#
|
||||
|
@ -412,7 +412,7 @@ CONFIG_MTD_NAND_IDS=y
|
|||
# CONFIG_BLK_DEV_NBD is not set
|
||||
# CONFIG_BLK_DEV_UB is not set
|
||||
# CONFIG_BLK_DEV_RAM is not set
|
||||
CONFIG_BLK_DEV_RAM_COUNT=16
|
||||
# CONFIG_BLK_DEV_INITRD is not set
|
||||
# CONFIG_CDROM_PKTCDVD is not set
|
||||
# CONFIG_ATA_OVER_ETH is not set
|
||||
|
||||
|
@ -576,13 +576,13 @@ CONFIG_WATCHDOG=y
|
|||
# Watchdog Device Drivers
|
||||
#
|
||||
# CONFIG_SOFT_WATCHDOG is not set
|
||||
CONFIG_EP93XX_WATCHDOG=y
|
||||
|
||||
#
|
||||
# USB-based Watchdog Cards
|
||||
#
|
||||
# CONFIG_USBPCWATCHDOG is not set
|
||||
# CONFIG_NVRAM is not set
|
||||
# CONFIG_RTC is not set
|
||||
# CONFIG_DTLK is not set
|
||||
# CONFIG_R3964 is not set
|
||||
|
||||
|
@ -626,9 +626,7 @@ CONFIG_I2C_ALGOBIT=y
|
|||
# CONFIG_SENSORS_PCF8574 is not set
|
||||
# CONFIG_SENSORS_PCA9539 is not set
|
||||
# CONFIG_SENSORS_PCF8591 is not set
|
||||
# CONFIG_SENSORS_RTC8564 is not set
|
||||
# CONFIG_SENSORS_MAX6875 is not set
|
||||
# CONFIG_RTC_X1205_I2C is not set
|
||||
CONFIG_I2C_DEBUG_CORE=y
|
||||
CONFIG_I2C_DEBUG_ALGO=y
|
||||
CONFIG_I2C_DEBUG_BUS=y
|
||||
|
@ -690,7 +688,16 @@ CONFIG_HWMON=y
|
|||
#
|
||||
|
||||
#
|
||||
# Multimedia Capabilities Port drivers
|
||||
# LED devices
|
||||
#
|
||||
# CONFIG_NEW_LEDS is not set
|
||||
|
||||
#
|
||||
# LED drivers
|
||||
#
|
||||
|
||||
#
|
||||
# LED Triggers
|
||||
#
|
||||
|
||||
#
|
||||
|
@ -702,6 +709,7 @@ CONFIG_HWMON=y
|
|||
# Digital Video Broadcasting Devices
|
||||
#
|
||||
# CONFIG_DVB is not set
|
||||
# CONFIG_USB_DABUSB is not set
|
||||
|
||||
#
|
||||
# Graphics support
|
||||
|
@ -718,6 +726,7 @@ CONFIG_HWMON=y
|
|||
#
|
||||
CONFIG_USB_ARCH_HAS_HCD=y
|
||||
# CONFIG_USB_ARCH_HAS_OHCI is not set
|
||||
# CONFIG_USB_ARCH_HAS_EHCI is not set
|
||||
CONFIG_USB=y
|
||||
CONFIG_USB_DEBUG=y
|
||||
|
||||
|
@ -775,15 +784,6 @@ CONFIG_USB_STORAGE=y
|
|||
# CONFIG_USB_MDC800 is not set
|
||||
# CONFIG_USB_MICROTEK is not set
|
||||
|
||||
#
|
||||
# USB Multimedia devices
|
||||
#
|
||||
# CONFIG_USB_DABUSB is not set
|
||||
|
||||
#
|
||||
# Video4Linux support is needed for USB Multimedia device support
|
||||
#
|
||||
|
||||
#
|
||||
# USB Network Adapters
|
||||
#
|
||||
|
@ -813,6 +813,7 @@ CONFIG_USB_SERIAL_CONSOLE=y
|
|||
# CONFIG_USB_SERIAL_CYPRESS_M8 is not set
|
||||
# CONFIG_USB_SERIAL_EMPEG is not set
|
||||
# CONFIG_USB_SERIAL_FTDI_SIO is not set
|
||||
# CONFIG_USB_SERIAL_FUNSOFT is not set
|
||||
# CONFIG_USB_SERIAL_VISOR is not set
|
||||
# CONFIG_USB_SERIAL_IPAQ is not set
|
||||
# CONFIG_USB_SERIAL_IR is not set
|
||||
|
@ -825,6 +826,7 @@ CONFIG_USB_SERIAL_CONSOLE=y
|
|||
# CONFIG_USB_SERIAL_KLSI is not set
|
||||
# CONFIG_USB_SERIAL_KOBIL_SCT is not set
|
||||
# CONFIG_USB_SERIAL_MCT_U232 is not set
|
||||
# CONFIG_USB_SERIAL_NAVMAN is not set
|
||||
CONFIG_USB_SERIAL_PL2303=y
|
||||
# CONFIG_USB_SERIAL_HP4X is not set
|
||||
# CONFIG_USB_SERIAL_SAFE is not set
|
||||
|
@ -864,6 +866,32 @@ CONFIG_USB_SERIAL_PL2303=y
|
|||
#
|
||||
# CONFIG_MMC is not set
|
||||
|
||||
#
|
||||
# Real Time Clock
|
||||
#
|
||||
CONFIG_RTC_LIB=y
|
||||
CONFIG_RTC_CLASS=y
|
||||
CONFIG_RTC_HCTOSYS=y
|
||||
CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
|
||||
|
||||
#
|
||||
# RTC interfaces
|
||||
#
|
||||
CONFIG_RTC_INTF_SYSFS=y
|
||||
CONFIG_RTC_INTF_PROC=y
|
||||
CONFIG_RTC_INTF_DEV=y
|
||||
|
||||
#
|
||||
# RTC drivers
|
||||
#
|
||||
# CONFIG_RTC_DRV_X1205 is not set
|
||||
# CONFIG_RTC_DRV_DS1672 is not set
|
||||
# CONFIG_RTC_DRV_PCF8563 is not set
|
||||
# CONFIG_RTC_DRV_RS5C372 is not set
|
||||
CONFIG_RTC_DRV_M48T86=y
|
||||
CONFIG_RTC_DRV_EP93XX=y
|
||||
# CONFIG_RTC_DRV_TEST is not set
|
||||
|
||||
#
|
||||
# File systems
|
||||
#
|
||||
|
@ -912,7 +940,6 @@ CONFIG_SYSFS=y
|
|||
CONFIG_TMPFS=y
|
||||
# CONFIG_HUGETLB_PAGE is not set
|
||||
CONFIG_RAMFS=y
|
||||
# CONFIG_RELAYFS_FS is not set
|
||||
# CONFIG_CONFIGFS_FS is not set
|
||||
|
||||
#
|
||||
|
@ -1044,6 +1071,7 @@ CONFIG_LOG_BUF_SHIFT=14
|
|||
CONFIG_DETECT_SOFTLOCKUP=y
|
||||
# CONFIG_SCHEDSTATS is not set
|
||||
CONFIG_DEBUG_SLAB=y
|
||||
# CONFIG_DEBUG_SLAB_LEAK is not set
|
||||
CONFIG_DEBUG_MUTEXES=y
|
||||
CONFIG_DEBUG_SPINLOCK=y
|
||||
# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
|
||||
|
@ -1053,6 +1081,7 @@ CONFIG_DEBUG_BUGVERBOSE=y
|
|||
# CONFIG_DEBUG_FS is not set
|
||||
# CONFIG_DEBUG_VM is not set
|
||||
CONFIG_FRAME_POINTER=y
|
||||
# CONFIG_UNWIND_INFO is not set
|
||||
CONFIG_FORCED_INLINING=y
|
||||
# CONFIG_RCU_TORTURE_TEST is not set
|
||||
CONFIG_DEBUG_USER=y
|
||||
|
|
|
@ -1,18 +1,19 @@
|
|||
#
|
||||
# Automatically generated make config: don't edit
|
||||
# Linux kernel version: 2.6.16-rc2
|
||||
# Wed Feb 8 04:49:11 2006
|
||||
# Linux kernel version: 2.6.17-rc2
|
||||
# Wed Apr 19 21:12:49 2006
|
||||
#
|
||||
CONFIG_ARM=y
|
||||
CONFIG_MMU=y
|
||||
CONFIG_RWSEM_GENERIC_SPINLOCK=y
|
||||
CONFIG_GENERIC_HWEIGHT=y
|
||||
CONFIG_GENERIC_CALIBRATE_DELAY=y
|
||||
CONFIG_VECTORS_BASE=0xffff0000
|
||||
|
||||
#
|
||||
# Code maturity level options
|
||||
#
|
||||
CONFIG_EXPERIMENTAL=y
|
||||
CONFIG_CLEAN_COMPILE=y
|
||||
CONFIG_BROKEN_ON_SMP=y
|
||||
CONFIG_INIT_ENV_ARG_LIMIT=32
|
||||
|
||||
|
@ -29,6 +30,7 @@ CONFIG_BSD_PROCESS_ACCT=y
|
|||
CONFIG_SYSCTL=y
|
||||
# CONFIG_AUDIT is not set
|
||||
# CONFIG_IKCONFIG is not set
|
||||
# CONFIG_RELAY is not set
|
||||
CONFIG_INITRAMFS_SOURCE=""
|
||||
CONFIG_UID16=y
|
||||
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
|
||||
|
@ -44,10 +46,6 @@ CONFIG_BASE_FULL=y
|
|||
CONFIG_FUTEX=y
|
||||
CONFIG_EPOLL=y
|
||||
CONFIG_SHMEM=y
|
||||
CONFIG_CC_ALIGN_FUNCTIONS=0
|
||||
CONFIG_CC_ALIGN_LABELS=0
|
||||
CONFIG_CC_ALIGN_LOOPS=0
|
||||
CONFIG_CC_ALIGN_JUMPS=0
|
||||
CONFIG_SLAB=y
|
||||
# CONFIG_TINY_SHMEM is not set
|
||||
CONFIG_BASE_SMALL=0
|
||||
|
@ -60,7 +58,6 @@ CONFIG_OBSOLETE_INTERMODULE=y
|
|||
CONFIG_MODULES=y
|
||||
CONFIG_MODULE_UNLOAD=y
|
||||
# CONFIG_MODULE_FORCE_UNLOAD is not set
|
||||
CONFIG_OBSOLETE_MODPARM=y
|
||||
# CONFIG_MODVERSIONS is not set
|
||||
# CONFIG_MODULE_SRCVERSION_ALL is not set
|
||||
CONFIG_KMOD=y
|
||||
|
@ -68,6 +65,7 @@ CONFIG_KMOD=y
|
|||
#
|
||||
# Block layer
|
||||
#
|
||||
# CONFIG_BLK_DEV_IO_TRACE is not set
|
||||
|
||||
#
|
||||
# IO Schedulers
|
||||
|
@ -89,11 +87,13 @@ CONFIG_DEFAULT_IOSCHED="anticipatory"
|
|||
# CONFIG_ARCH_CLPS711X is not set
|
||||
# CONFIG_ARCH_CO285 is not set
|
||||
# CONFIG_ARCH_EBSA110 is not set
|
||||
# CONFIG_ARCH_EP93XX is not set
|
||||
# CONFIG_ARCH_FOOTBRIDGE is not set
|
||||
# CONFIG_ARCH_INTEGRATOR is not set
|
||||
# CONFIG_ARCH_IOP3XX is not set
|
||||
# CONFIG_ARCH_IXP4XX is not set
|
||||
CONFIG_ARCH_IXP2000=y
|
||||
# CONFIG_ARCH_IXP23XX is not set
|
||||
# CONFIG_ARCH_L7200 is not set
|
||||
# CONFIG_ARCH_PXA is not set
|
||||
# CONFIG_ARCH_RPC is not set
|
||||
|
@ -123,6 +123,7 @@ CONFIG_ARCH_IXDP2800=y
|
|||
CONFIG_ARCH_IXDP2X00=y
|
||||
CONFIG_ARCH_IXDP2401=y
|
||||
CONFIG_ARCH_IXDP2801=y
|
||||
CONFIG_MACH_IXDP28X5=y
|
||||
CONFIG_ARCH_IXDP2X01=y
|
||||
# CONFIG_IXP2000_SUPPORT_BROKEN_PCI_IO is not set
|
||||
|
||||
|
@ -147,7 +148,6 @@ CONFIG_XSCALE_PMU=y
|
|||
# Bus support
|
||||
#
|
||||
CONFIG_PCI=y
|
||||
CONFIG_PCI_LEGACY_PROC=y
|
||||
# CONFIG_PCI_DEBUG is not set
|
||||
|
||||
#
|
||||
|
@ -160,6 +160,7 @@ CONFIG_PCI_LEGACY_PROC=y
|
|||
#
|
||||
# CONFIG_PREEMPT is not set
|
||||
# CONFIG_NO_IDLE_HZ is not set
|
||||
CONFIG_HZ=100
|
||||
# CONFIG_AEABI is not set
|
||||
# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set
|
||||
CONFIG_SELECT_MEMORY_MODEL=y
|
||||
|
@ -213,6 +214,7 @@ CONFIG_NET=y
|
|||
#
|
||||
# Networking options
|
||||
#
|
||||
# CONFIG_NETDEBUG is not set
|
||||
CONFIG_PACKET=y
|
||||
CONFIG_PACKET_MMAP=y
|
||||
CONFIG_UNIX=y
|
||||
|
@ -232,12 +234,15 @@ CONFIG_SYN_COOKIES=y
|
|||
# CONFIG_INET_AH is not set
|
||||
# CONFIG_INET_ESP is not set
|
||||
# CONFIG_INET_IPCOMP is not set
|
||||
# CONFIG_INET_XFRM_TUNNEL is not set
|
||||
# CONFIG_INET_TUNNEL 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_INET6_XFRM_TUNNEL is not set
|
||||
# CONFIG_INET6_TUNNEL is not set
|
||||
# CONFIG_NETFILTER is not set
|
||||
|
||||
#
|
||||
|
@ -347,7 +352,6 @@ CONFIG_MTD_CFI_UTIL=y
|
|||
# CONFIG_MTD_ROM is not set
|
||||
# CONFIG_MTD_ABSENT is not set
|
||||
# CONFIG_MTD_OBSOLETE_CHIPS is not set
|
||||
# CONFIG_MTD_XIP is not set
|
||||
|
||||
#
|
||||
# Mapping drivers for chip access
|
||||
|
@ -366,7 +370,6 @@ CONFIG_MTD_IXP2000=y
|
|||
# CONFIG_MTD_SLRAM is not set
|
||||
# CONFIG_MTD_PHRAM is not set
|
||||
# CONFIG_MTD_MTDRAM is not set
|
||||
# CONFIG_MTD_BLKMTD is not set
|
||||
# CONFIG_MTD_BLOCK2MTD is not set
|
||||
|
||||
#
|
||||
|
@ -614,8 +617,9 @@ CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
|
|||
#
|
||||
CONFIG_SERIAL_8250=y
|
||||
CONFIG_SERIAL_8250_CONSOLE=y
|
||||
CONFIG_SERIAL_8250_PCI=y
|
||||
CONFIG_SERIAL_8250_NR_UARTS=3
|
||||
CONFIG_SERIAL_8250_RUNTIME_UARTS=4
|
||||
CONFIG_SERIAL_8250_RUNTIME_UARTS=3
|
||||
# CONFIG_SERIAL_8250_EXTENDED is not set
|
||||
|
||||
#
|
||||
|
@ -623,6 +627,7 @@ CONFIG_SERIAL_8250_RUNTIME_UARTS=4
|
|||
#
|
||||
CONFIG_SERIAL_CORE=y
|
||||
CONFIG_SERIAL_CORE_CONSOLE=y
|
||||
# CONFIG_SERIAL_JSM is not set
|
||||
CONFIG_UNIX98_PTYS=y
|
||||
CONFIG_LEGACY_PTYS=y
|
||||
CONFIG_LEGACY_PTY_COUNT=256
|
||||
|
@ -650,7 +655,6 @@ CONFIG_IXP2000_WATCHDOG=y
|
|||
# CONFIG_PCIPCWATCHDOG is not set
|
||||
# CONFIG_WDTPCI is not set
|
||||
# CONFIG_NVRAM is not set
|
||||
# CONFIG_RTC is not set
|
||||
# CONFIG_DTLK is not set
|
||||
# CONFIG_R3964 is not set
|
||||
# CONFIG_APPLICOM is not set
|
||||
|
@ -696,7 +700,6 @@ CONFIG_I2C_IXP2000=y
|
|||
# CONFIG_I2C_PARPORT_LIGHT is not set
|
||||
# CONFIG_I2C_PROSAVAGE is not set
|
||||
# CONFIG_I2C_SAVAGE4 is not set
|
||||
# CONFIG_SCx200_ACB is not set
|
||||
# CONFIG_I2C_SIS5595 is not set
|
||||
# CONFIG_I2C_SIS630 is not set
|
||||
# CONFIG_I2C_SIS96X is not set
|
||||
|
@ -715,9 +718,7 @@ CONFIG_SENSORS_EEPROM=y
|
|||
# CONFIG_SENSORS_PCF8574 is not set
|
||||
# CONFIG_SENSORS_PCA9539 is not set
|
||||
# CONFIG_SENSORS_PCF8591 is not set
|
||||
# CONFIG_SENSORS_RTC8564 is not set
|
||||
# CONFIG_SENSORS_MAX6875 is not set
|
||||
# CONFIG_RTC_X1205_I2C is not set
|
||||
# CONFIG_I2C_DEBUG_CORE is not set
|
||||
# CONFIG_I2C_DEBUG_ALGO is not set
|
||||
# CONFIG_I2C_DEBUG_BUS is not set
|
||||
|
@ -729,6 +730,11 @@ CONFIG_SENSORS_EEPROM=y
|
|||
# CONFIG_SPI is not set
|
||||
# CONFIG_SPI_MASTER is not set
|
||||
|
||||
#
|
||||
# Dallas's 1-wire bus
|
||||
#
|
||||
# CONFIG_W1 is not set
|
||||
|
||||
#
|
||||
# Hardware Monitoring support
|
||||
#
|
||||
|
@ -742,6 +748,7 @@ CONFIG_HWMON=y
|
|||
# CONFIG_SENSORS_ASB100 is not set
|
||||
# CONFIG_SENSORS_ATXP1 is not set
|
||||
# CONFIG_SENSORS_DS1621 is not set
|
||||
# CONFIG_SENSORS_F71805F is not set
|
||||
# CONFIG_SENSORS_FSCHER is not set
|
||||
# CONFIG_SENSORS_FSCPOS is not set
|
||||
# CONFIG_SENSORS_GL518SM is not set
|
||||
|
@ -776,7 +783,16 @@ CONFIG_HWMON=y
|
|||
#
|
||||
|
||||
#
|
||||
# Multimedia Capabilities Port drivers
|
||||
# LED devices
|
||||
#
|
||||
# CONFIG_NEW_LEDS is not set
|
||||
|
||||
#
|
||||
# LED drivers
|
||||
#
|
||||
|
||||
#
|
||||
# LED Triggers
|
||||
#
|
||||
|
||||
#
|
||||
|
@ -804,6 +820,7 @@ CONFIG_HWMON=y
|
|||
#
|
||||
CONFIG_USB_ARCH_HAS_HCD=y
|
||||
CONFIG_USB_ARCH_HAS_OHCI=y
|
||||
CONFIG_USB_ARCH_HAS_EHCI=y
|
||||
# CONFIG_USB is not set
|
||||
|
||||
#
|
||||
|
@ -820,6 +837,12 @@ CONFIG_USB_ARCH_HAS_OHCI=y
|
|||
#
|
||||
# CONFIG_MMC is not set
|
||||
|
||||
#
|
||||
# Real Time Clock
|
||||
#
|
||||
CONFIG_RTC_LIB=y
|
||||
# CONFIG_RTC_CLASS is not set
|
||||
|
||||
#
|
||||
# File systems
|
||||
#
|
||||
|
@ -870,7 +893,6 @@ CONFIG_SYSFS=y
|
|||
CONFIG_TMPFS=y
|
||||
# CONFIG_HUGETLB_PAGE is not set
|
||||
CONFIG_RAMFS=y
|
||||
# CONFIG_RELAYFS_FS is not set
|
||||
# CONFIG_CONFIGFS_FS is not set
|
||||
|
||||
#
|
||||
|
@ -972,6 +994,7 @@ CONFIG_DEBUG_BUGVERBOSE=y
|
|||
# CONFIG_DEBUG_FS is not set
|
||||
# CONFIG_DEBUG_VM is not set
|
||||
CONFIG_FRAME_POINTER=y
|
||||
# CONFIG_UNWIND_INFO is not set
|
||||
CONFIG_FORCED_INLINING=y
|
||||
# CONFIG_RCU_TORTURE_TEST is not set
|
||||
CONFIG_DEBUG_USER=y
|
||||
|
|
|
@ -1,12 +1,14 @@
|
|||
#
|
||||
# Automatically generated make config: don't edit
|
||||
# Linux kernel version: 2.6.16
|
||||
# Tue Mar 21 03:27:20 2006
|
||||
# Linux kernel version: 2.6.17-rc2
|
||||
# Wed Apr 19 21:13:50 2006
|
||||
#
|
||||
CONFIG_ARM=y
|
||||
CONFIG_MMU=y
|
||||
CONFIG_RWSEM_GENERIC_SPINLOCK=y
|
||||
CONFIG_GENERIC_HWEIGHT=y
|
||||
CONFIG_GENERIC_CALIBRATE_DELAY=y
|
||||
CONFIG_VECTORS_BASE=0xffff0000
|
||||
|
||||
#
|
||||
# Code maturity level options
|
||||
|
@ -28,6 +30,7 @@ CONFIG_BSD_PROCESS_ACCT=y
|
|||
CONFIG_SYSCTL=y
|
||||
# CONFIG_AUDIT is not set
|
||||
# CONFIG_IKCONFIG is not set
|
||||
# CONFIG_RELAY is not set
|
||||
CONFIG_INITRAMFS_SOURCE=""
|
||||
CONFIG_UID16=y
|
||||
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
|
||||
|
@ -43,10 +46,6 @@ CONFIG_BASE_FULL=y
|
|||
CONFIG_FUTEX=y
|
||||
CONFIG_EPOLL=y
|
||||
CONFIG_SHMEM=y
|
||||
CONFIG_CC_ALIGN_FUNCTIONS=0
|
||||
CONFIG_CC_ALIGN_LABELS=0
|
||||
CONFIG_CC_ALIGN_LOOPS=0
|
||||
CONFIG_CC_ALIGN_JUMPS=0
|
||||
CONFIG_SLAB=y
|
||||
# CONFIG_TINY_SHMEM is not set
|
||||
CONFIG_BASE_SMALL=0
|
||||
|
@ -59,7 +58,6 @@ CONFIG_OBSOLETE_INTERMODULE=y
|
|||
CONFIG_MODULES=y
|
||||
CONFIG_MODULE_UNLOAD=y
|
||||
# CONFIG_MODULE_FORCE_UNLOAD is not set
|
||||
CONFIG_OBSOLETE_MODPARM=y
|
||||
# CONFIG_MODVERSIONS is not set
|
||||
# CONFIG_MODULE_SRCVERSION_ALL is not set
|
||||
CONFIG_KMOD=y
|
||||
|
@ -67,6 +65,7 @@ CONFIG_KMOD=y
|
|||
#
|
||||
# Block layer
|
||||
#
|
||||
# CONFIG_BLK_DEV_IO_TRACE is not set
|
||||
|
||||
#
|
||||
# IO Schedulers
|
||||
|
@ -143,7 +142,6 @@ CONFIG_CPU_BIG_ENDIAN=y
|
|||
# Bus support
|
||||
#
|
||||
CONFIG_PCI=y
|
||||
CONFIG_PCI_LEGACY_PROC=y
|
||||
# CONFIG_PCI_DEBUG is not set
|
||||
|
||||
#
|
||||
|
@ -230,12 +228,15 @@ CONFIG_SYN_COOKIES=y
|
|||
# CONFIG_INET_AH is not set
|
||||
# CONFIG_INET_ESP is not set
|
||||
# CONFIG_INET_IPCOMP is not set
|
||||
# CONFIG_INET_XFRM_TUNNEL is not set
|
||||
# CONFIG_INET_TUNNEL 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_INET6_XFRM_TUNNEL is not set
|
||||
# CONFIG_INET6_TUNNEL is not set
|
||||
# CONFIG_NETFILTER is not set
|
||||
|
||||
#
|
||||
|
@ -365,7 +366,6 @@ CONFIG_MTD_PHYSMAP_BANKWIDTH=1
|
|||
# CONFIG_MTD_SLRAM is not set
|
||||
# CONFIG_MTD_PHRAM is not set
|
||||
# CONFIG_MTD_MTDRAM is not set
|
||||
# CONFIG_MTD_BLKMTD is not set
|
||||
# CONFIG_MTD_BLOCK2MTD is not set
|
||||
|
||||
#
|
||||
|
@ -527,7 +527,6 @@ CONFIG_BLK_DEV_SD=y
|
|||
# CONFIG_SCSI_INIA100 is not set
|
||||
# CONFIG_SCSI_SYM53C8XX_2 is not set
|
||||
# CONFIG_SCSI_IPR is not set
|
||||
# CONFIG_SCSI_QLOGIC_FC is not set
|
||||
# CONFIG_SCSI_QLOGIC_1280 is not set
|
||||
# CONFIG_SCSI_QLA_FC is not set
|
||||
# CONFIG_SCSI_LPFC is not set
|
||||
|
@ -735,6 +734,7 @@ CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
|
|||
#
|
||||
CONFIG_SERIAL_8250=y
|
||||
CONFIG_SERIAL_8250_CONSOLE=y
|
||||
CONFIG_SERIAL_8250_PCI=y
|
||||
CONFIG_SERIAL_8250_NR_UARTS=4
|
||||
CONFIG_SERIAL_8250_RUNTIME_UARTS=4
|
||||
# CONFIG_SERIAL_8250_EXTENDED is not set
|
||||
|
@ -776,7 +776,6 @@ CONFIG_WATCHDOG=y
|
|||
#
|
||||
# CONFIG_USBPCWATCHDOG is not set
|
||||
# CONFIG_NVRAM is not set
|
||||
# CONFIG_RTC is not set
|
||||
# CONFIG_DTLK is not set
|
||||
# CONFIG_R3964 is not set
|
||||
# CONFIG_APPLICOM is not set
|
||||
|
@ -821,7 +820,6 @@ CONFIG_I2C_ALGOBIT=y
|
|||
# CONFIG_I2C_PARPORT_LIGHT is not set
|
||||
# CONFIG_I2C_PROSAVAGE is not set
|
||||
# CONFIG_I2C_SAVAGE4 is not set
|
||||
# CONFIG_SCx200_ACB is not set
|
||||
# CONFIG_I2C_SIS5595 is not set
|
||||
# CONFIG_I2C_SIS630 is not set
|
||||
# CONFIG_I2C_SIS96X is not set
|
||||
|
@ -840,9 +838,7 @@ CONFIG_SENSORS_EEPROM=y
|
|||
# CONFIG_SENSORS_PCF8574 is not set
|
||||
# CONFIG_SENSORS_PCA9539 is not set
|
||||
# CONFIG_SENSORS_PCF8591 is not set
|
||||
# CONFIG_SENSORS_RTC8564 is not set
|
||||
# CONFIG_SENSORS_MAX6875 is not set
|
||||
# CONFIG_RTC_X1205_I2C is not set
|
||||
# CONFIG_I2C_DEBUG_CORE is not set
|
||||
# CONFIG_I2C_DEBUG_ALGO is not set
|
||||
# CONFIG_I2C_DEBUG_BUS is not set
|
||||
|
@ -907,7 +903,16 @@ CONFIG_HWMON=y
|
|||
#
|
||||
|
||||
#
|
||||
# Multimedia Capabilities Port drivers
|
||||
# LED devices
|
||||
#
|
||||
# CONFIG_NEW_LEDS is not set
|
||||
|
||||
#
|
||||
# LED drivers
|
||||
#
|
||||
|
||||
#
|
||||
# LED Triggers
|
||||
#
|
||||
|
||||
#
|
||||
|
@ -919,6 +924,7 @@ CONFIG_HWMON=y
|
|||
# Digital Video Broadcasting Devices
|
||||
#
|
||||
# CONFIG_DVB is not set
|
||||
# CONFIG_USB_DABUSB is not set
|
||||
|
||||
#
|
||||
# Graphics support
|
||||
|
@ -935,6 +941,7 @@ CONFIG_HWMON=y
|
|||
#
|
||||
CONFIG_USB_ARCH_HAS_HCD=y
|
||||
CONFIG_USB_ARCH_HAS_OHCI=y
|
||||
CONFIG_USB_ARCH_HAS_EHCI=y
|
||||
CONFIG_USB=y
|
||||
# CONFIG_USB_DEBUG is not set
|
||||
|
||||
|
@ -1000,9 +1007,7 @@ CONFIG_USB_STORAGE=y
|
|||
# CONFIG_USB_ACECAD is not set
|
||||
# CONFIG_USB_KBTAB is not set
|
||||
# CONFIG_USB_POWERMATE is not set
|
||||
# CONFIG_USB_MTOUCH is not set
|
||||
# CONFIG_USB_ITMTOUCH is not set
|
||||
# CONFIG_USB_EGALAX is not set
|
||||
# CONFIG_USB_TOUCHSCREEN is not set
|
||||
# CONFIG_USB_YEALINK is not set
|
||||
# CONFIG_USB_XPAD is not set
|
||||
# CONFIG_USB_ATI_REMOTE is not set
|
||||
|
@ -1016,15 +1021,6 @@ CONFIG_USB_STORAGE=y
|
|||
# CONFIG_USB_MDC800 is not set
|
||||
# CONFIG_USB_MICROTEK is not set
|
||||
|
||||
#
|
||||
# USB Multimedia devices
|
||||
#
|
||||
# CONFIG_USB_DABUSB is not set
|
||||
|
||||
#
|
||||
# Video4Linux support is needed for USB Multimedia device support
|
||||
#
|
||||
|
||||
#
|
||||
# USB Network Adapters
|
||||
#
|
||||
|
@ -1075,6 +1071,12 @@ CONFIG_USB_MON=y
|
|||
#
|
||||
# CONFIG_MMC is not set
|
||||
|
||||
#
|
||||
# Real Time Clock
|
||||
#
|
||||
CONFIG_RTC_LIB=y
|
||||
# CONFIG_RTC_CLASS is not set
|
||||
|
||||
#
|
||||
# File systems
|
||||
#
|
||||
|
@ -1127,7 +1129,6 @@ CONFIG_SYSFS=y
|
|||
CONFIG_TMPFS=y
|
||||
# CONFIG_HUGETLB_PAGE is not set
|
||||
CONFIG_RAMFS=y
|
||||
# CONFIG_RELAYFS_FS is not set
|
||||
# CONFIG_CONFIGFS_FS is not set
|
||||
|
||||
#
|
||||
|
@ -1268,6 +1269,7 @@ CONFIG_DEBUG_BUGVERBOSE=y
|
|||
# CONFIG_DEBUG_FS is not set
|
||||
# CONFIG_DEBUG_VM is not set
|
||||
CONFIG_FRAME_POINTER=y
|
||||
# CONFIG_UNWIND_INFO is not set
|
||||
CONFIG_FORCED_INLINING=y
|
||||
# CONFIG_RCU_TORTURE_TEST is not set
|
||||
CONFIG_DEBUG_USER=y
|
||||
|
|
|
@ -29,7 +29,7 @@ ifneq ($(CONFIG_ARCH_EBSA110),y)
|
|||
obj-y += io.o
|
||||
endif
|
||||
|
||||
head-y := head.o
|
||||
head-y := head$(MMUEXT).o
|
||||
obj-$(CONFIG_DEBUG_LL) += debug.o
|
||||
|
||||
extra-y := $(head-y) init_task.o vmlinux.lds
|
||||
|
|
|
@ -100,23 +100,11 @@ EXPORT_SYMBOL(__raw_writesl);
|
|||
#endif
|
||||
|
||||
/* string / mem functions */
|
||||
EXPORT_SYMBOL(strcpy);
|
||||
EXPORT_SYMBOL(strncpy);
|
||||
EXPORT_SYMBOL(strcat);
|
||||
EXPORT_SYMBOL(strncat);
|
||||
EXPORT_SYMBOL(strcmp);
|
||||
EXPORT_SYMBOL(strncmp);
|
||||
EXPORT_SYMBOL(strchr);
|
||||
EXPORT_SYMBOL(strlen);
|
||||
EXPORT_SYMBOL(strnlen);
|
||||
EXPORT_SYMBOL(strpbrk);
|
||||
EXPORT_SYMBOL(strrchr);
|
||||
EXPORT_SYMBOL(strstr);
|
||||
EXPORT_SYMBOL(memset);
|
||||
EXPORT_SYMBOL(memcpy);
|
||||
EXPORT_SYMBOL(memmove);
|
||||
EXPORT_SYMBOL(memcmp);
|
||||
EXPORT_SYMBOL(memscan);
|
||||
EXPORT_SYMBOL(memchr);
|
||||
EXPORT_SYMBOL(__memzero);
|
||||
|
||||
|
@ -190,8 +178,6 @@ EXPORT_SYMBOL(_find_next_bit_be);
|
|||
|
||||
/* syscalls */
|
||||
EXPORT_SYMBOL(sys_write);
|
||||
EXPORT_SYMBOL(sys_read);
|
||||
EXPORT_SYMBOL(sys_lseek);
|
||||
EXPORT_SYMBOL(sys_open);
|
||||
EXPORT_SYMBOL(sys_exit);
|
||||
EXPORT_SYMBOL(sys_wait4);
|
||||
|
|
|
@ -20,10 +20,11 @@
|
|||
#include <asm/mach-types.h>
|
||||
#include <asm/procinfo.h>
|
||||
#include <asm/ptrace.h>
|
||||
#include <asm/constants.h>
|
||||
#include <asm/thread_info.h>
|
||||
#include <asm/system.h>
|
||||
|
||||
#define PROCINFO_INITFUNC 12
|
||||
#define MACHINFO_TYPE 0
|
||||
|
||||
/*
|
||||
* Kernel startup entry point.
|
||||
|
@ -79,5 +80,6 @@ __after_proc_init:
|
|||
|
||||
mov pc, r13 @ clear the BSS and jump
|
||||
@ to start_kernel
|
||||
.ltorg
|
||||
|
||||
#include "head-common.S"
|
||||
|
|
|
@ -252,6 +252,9 @@ static void __init dump_cpu_info(int cpu)
|
|||
dump_cache("cache", cpu, CACHE_ISIZE(info));
|
||||
}
|
||||
}
|
||||
|
||||
if (arch_is_coherent())
|
||||
printk("Cache coherency enabled\n");
|
||||
}
|
||||
|
||||
int cpu_architecture(void)
|
||||
|
@ -319,6 +322,12 @@ static void __init setup_processor(void)
|
|||
sprintf(system_utsname.machine, "%s%c", list->arch_name, ENDIANNESS);
|
||||
sprintf(elf_platform, "%s%c", list->elf_name, ENDIANNESS);
|
||||
elf_hwcap = list->elf_hwcap;
|
||||
#ifndef CONFIG_ARM_THUMB
|
||||
elf_hwcap &= ~HWCAP_THUMB;
|
||||
#endif
|
||||
#ifndef CONFIG_VFP
|
||||
elf_hwcap &= ~HWCAP_VFP;
|
||||
#endif
|
||||
|
||||
cpu_proc_init();
|
||||
}
|
||||
|
@ -398,7 +407,7 @@ static void __init early_initrd(char **p)
|
|||
}
|
||||
__early_param("initrd=", early_initrd);
|
||||
|
||||
static void __init add_memory(unsigned long start, unsigned long size)
|
||||
static void __init arm_add_memory(unsigned long start, unsigned long size)
|
||||
{
|
||||
/*
|
||||
* Ensure that start/size are aligned to a page boundary.
|
||||
|
@ -436,7 +445,7 @@ static void __init early_mem(char **p)
|
|||
if (**p == '@')
|
||||
start = memparse(*p + 1, p);
|
||||
|
||||
add_memory(start, size);
|
||||
arm_add_memory(start, size);
|
||||
}
|
||||
__early_param("mem=", early_mem);
|
||||
|
||||
|
@ -578,7 +587,7 @@ static int __init parse_tag_mem32(const struct tag *tag)
|
|||
tag->u.mem.start, tag->u.mem.size / 1024);
|
||||
return -EINVAL;
|
||||
}
|
||||
add_memory(tag->u.mem.start, tag->u.mem.size);
|
||||
arm_add_memory(tag->u.mem.start, tag->u.mem.size);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -798,7 +807,7 @@ static int __init topology_init(void)
|
|||
{
|
||||
int cpu;
|
||||
|
||||
for_each_cpu(cpu)
|
||||
for_each_possible_cpu(cpu)
|
||||
register_cpu(&per_cpu(cpu_data, cpu).cpu, cpu, NULL);
|
||||
|
||||
return 0;
|
||||
|
|
|
@ -16,11 +16,12 @@ obj-$(CONFIG_MACH_CSB637) += board-csb637.o
|
|||
#obj-$(CONFIG_MACH_KB9200) += board-kb9202.o
|
||||
|
||||
# LEDs support
|
||||
#led-$(CONFIG_ARCH_AT91RM9200DK) += leds.o
|
||||
#led-$(CONFIG_MACH_AT91RM9200EK) += leds.o
|
||||
#led-$(CONFIG_MACH_CSB337) += leds.o
|
||||
#led-$(CONFIG_MACH_CSB637) += leds.o
|
||||
led-$(CONFIG_ARCH_AT91RM9200DK) += leds.o
|
||||
led-$(CONFIG_MACH_AT91RM9200EK) += leds.o
|
||||
led-$(CONFIG_MACH_CSB337) += leds.o
|
||||
led-$(CONFIG_MACH_CSB637) += leds.o
|
||||
#led-$(CONFIG_MACH_KB9200) += leds.o
|
||||
#led-$(CONFIG_MACH_KAFA) += leds.o
|
||||
obj-$(CONFIG_LEDS) += $(led-y)
|
||||
|
||||
# VGA support
|
||||
|
|
|
@ -67,6 +67,9 @@ static void __init csb337_map_io(void)
|
|||
/* Initialize clocks: 3.6864 MHz crystal */
|
||||
at91_clock_init(3686400);
|
||||
|
||||
/* Setup the LEDs */
|
||||
at91_init_leds(AT91_PIN_PB2, AT91_PIN_PB2);
|
||||
|
||||
#ifdef CONFIG_SERIAL_AT91
|
||||
at91_console_port = CSB337_SERIAL_CONSOLE;
|
||||
memcpy(at91_serial_map, serial, sizeof(serial));
|
||||
|
|
|
@ -67,6 +67,9 @@ static void __init csb637_map_io(void)
|
|||
/* Initialize clocks: 3.6864 MHz crystal */
|
||||
at91_clock_init(3686400);
|
||||
|
||||
/* Setup the LEDs */
|
||||
at91_init_leds(AT91_PIN_PB2, AT91_PIN_PB2);
|
||||
|
||||
#ifdef CONFIG_SERIAL_AT91
|
||||
at91_console_port = CSB637_SERIAL_CONSOLE;
|
||||
memcpy(at91_serial_map, serial, sizeof(serial));
|
||||
|
|
|
@ -70,6 +70,9 @@ static void __init dk_map_io(void)
|
|||
/* Initialize clocks: 18.432 MHz crystal */
|
||||
at91_clock_init(18432000);
|
||||
|
||||
/* Setup the LEDs */
|
||||
at91_init_leds(AT91_PIN_PB2, AT91_PIN_PB2);
|
||||
|
||||
#ifdef CONFIG_SERIAL_AT91
|
||||
at91_console_port = DK_SERIAL_CONSOLE;
|
||||
memcpy(at91_serial_map, serial, sizeof(serial));
|
||||
|
@ -118,9 +121,14 @@ static void __init dk_board_init(void)
|
|||
at91_add_device_udc(&dk_udc_data);
|
||||
/* Compact Flash */
|
||||
at91_add_device_cf(&dk_cf_data);
|
||||
#ifdef CONFIG_MTD_AT91_DATAFLASH_CARD
|
||||
/* DataFlash card */
|
||||
at91_set_gpio_output(AT91_PIN_PB7, 0);
|
||||
#else
|
||||
/* MMC */
|
||||
at91_set_gpio_output(AT91_PIN_PB7, 1); /* this MMC card slot can optionally use SPI signaling (CS3). default: MMC */
|
||||
at91_set_gpio_output(AT91_PIN_PB7, 1); /* this MMC card slot can optionally use SPI signaling (CS3). */
|
||||
at91_add_device_mmc(&dk_mmc_data);
|
||||
#endif
|
||||
/* VGA */
|
||||
// dk_add_device_video();
|
||||
}
|
||||
|
|
|
@ -70,6 +70,9 @@ static void __init ek_map_io(void)
|
|||
/* Initialize clocks: 18.432 MHz crystal */
|
||||
at91_clock_init(18432000);
|
||||
|
||||
/* Setup the LEDs */
|
||||
at91_init_leds(AT91_PIN_PB1, AT91_PIN_PB2);
|
||||
|
||||
#ifdef CONFIG_SERIAL_AT91
|
||||
at91_console_port = EK_SERIAL_CONSOLE;
|
||||
memcpy(at91_serial_map, serial, sizeof(serial));
|
||||
|
@ -111,9 +114,14 @@ static void __init ek_board_init(void)
|
|||
at91_add_device_usbh(&ek_usbh_data);
|
||||
/* USB Device */
|
||||
at91_add_device_udc(&ek_udc_data);
|
||||
#ifdef CONFIG_MTD_AT91_DATAFLASH_CARD
|
||||
/* DataFlash card */
|
||||
at91_set_gpio_output(AT91_PIN_PB22, 0);
|
||||
#else
|
||||
/* MMC */
|
||||
at91_set_gpio_output(AT91_PIN_PB22, 1); /* this MMC card slot can optionally use SPI signaling (CS3). default: MMC */
|
||||
at91_set_gpio_output(AT91_PIN_PB22, 1); /* this MMC card slot can optionally use SPI signaling (CS3). */
|
||||
at91_add_device_mmc(&ek_mmc_data);
|
||||
#endif
|
||||
/* VGA */
|
||||
// ek_add_device_video();
|
||||
}
|
||||
|
|
|
@ -28,10 +28,10 @@
|
|||
static u64 ohci_dmamask = 0xffffffffUL;
|
||||
static struct at91_usbh_data usbh_data;
|
||||
|
||||
static struct resource at91rm9200_usbh_resource[] = {
|
||||
static struct resource at91_usbh_resource[] = {
|
||||
[0] = {
|
||||
.start = AT91_UHP_BASE,
|
||||
.end = AT91_UHP_BASE + SZ_1M -1,
|
||||
.end = AT91_UHP_BASE + SZ_1M - 1,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
[1] = {
|
||||
|
@ -49,8 +49,8 @@ static struct platform_device at91rm9200_usbh_device = {
|
|||
.coherent_dma_mask = 0xffffffff,
|
||||
.platform_data = &usbh_data,
|
||||
},
|
||||
.resource = at91rm9200_usbh_resource,
|
||||
.num_resources = ARRAY_SIZE(at91rm9200_usbh_resource),
|
||||
.resource = at91_usbh_resource,
|
||||
.num_resources = ARRAY_SIZE(at91_usbh_resource),
|
||||
};
|
||||
|
||||
void __init at91_add_device_usbh(struct at91_usbh_data *data)
|
||||
|
@ -121,6 +121,19 @@ void __init at91_add_device_udc(struct at91_udc_data *data) {}
|
|||
static u64 eth_dmamask = 0xffffffffUL;
|
||||
static struct at91_eth_data eth_data;
|
||||
|
||||
static struct resource at91_eth_resources[] = {
|
||||
[0] = {
|
||||
.start = AT91_BASE_EMAC,
|
||||
.end = AT91_BASE_EMAC + SZ_16K - 1,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
[1] = {
|
||||
.start = AT91_ID_EMAC,
|
||||
.end = AT91_ID_EMAC,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
};
|
||||
|
||||
static struct platform_device at91rm9200_eth_device = {
|
||||
.name = "at91_ether",
|
||||
.id = -1,
|
||||
|
@ -129,7 +142,8 @@ static struct platform_device at91rm9200_eth_device = {
|
|||
.coherent_dma_mask = 0xffffffff,
|
||||
.platform_data = ð_data,
|
||||
},
|
||||
.num_resources = 0,
|
||||
.resource = at91_eth_resources,
|
||||
.num_resources = ARRAY_SIZE(at91_eth_resources),
|
||||
};
|
||||
|
||||
void __init at91_add_device_eth(struct at91_eth_data *data)
|
||||
|
@ -180,13 +194,23 @@ void __init at91_add_device_eth(struct at91_eth_data *data) {}
|
|||
#if defined(CONFIG_AT91_CF) || defined(CONFIG_AT91_CF_MODULE)
|
||||
static struct at91_cf_data cf_data;
|
||||
|
||||
static struct resource at91_cf_resources[] = {
|
||||
[0] = {
|
||||
.start = AT91_CF_BASE,
|
||||
/* ties up CS4, CS5, and CS6 */
|
||||
.end = AT91_CF_BASE + (0x30000000 - 1),
|
||||
.flags = IORESOURCE_MEM | IORESOURCE_MEM_8AND16BIT,
|
||||
},
|
||||
};
|
||||
|
||||
static struct platform_device at91rm9200_cf_device = {
|
||||
.name = "at91_cf",
|
||||
.id = -1,
|
||||
.dev = {
|
||||
.platform_data = &cf_data,
|
||||
},
|
||||
.num_resources = 0,
|
||||
.resource = at91_cf_resources,
|
||||
.num_resources = ARRAY_SIZE(at91_cf_resources),
|
||||
};
|
||||
|
||||
void __init at91_add_device_cf(struct at91_cf_data *data)
|
||||
|
@ -224,15 +248,20 @@ static u64 mmc_dmamask = 0xffffffffUL;
|
|||
static struct at91_mmc_data mmc_data;
|
||||
|
||||
static struct resource at91_mmc_resources[] = {
|
||||
{
|
||||
[0] = {
|
||||
.start = AT91_BASE_MCI,
|
||||
.end = AT91_BASE_MCI + SZ_16K - 1,
|
||||
.flags = IORESOURCE_MEM,
|
||||
}
|
||||
},
|
||||
[1] = {
|
||||
.start = AT91_ID_MCI,
|
||||
.end = AT91_ID_MCI,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
};
|
||||
|
||||
static struct platform_device at91rm9200_mmc_device = {
|
||||
.name = "at91rm9200_mci",
|
||||
.name = "at91_mci",
|
||||
.id = -1,
|
||||
.dev = {
|
||||
.dma_mask = &mmc_dmamask,
|
||||
|
@ -290,4 +319,123 @@ void __init at91_add_device_mmc(struct at91_mmc_data *data)
|
|||
void __init at91_add_device_mmc(struct at91_mmc_data *data) {}
|
||||
#endif
|
||||
|
||||
/* --------------------------------------------------------------------
|
||||
* NAND / SmartMedia
|
||||
* -------------------------------------------------------------------- */
|
||||
|
||||
#if defined(CONFIG_MTD_NAND_AT91) || defined(CONFIG_MTD_NAND_AT91_MODULE)
|
||||
static struct at91_nand_data nand_data;
|
||||
|
||||
static struct resource at91_nand_resources[] = {
|
||||
{
|
||||
.start = AT91_SMARTMEDIA_BASE,
|
||||
.end = AT91_SMARTMEDIA_BASE + SZ_8M - 1,
|
||||
.flags = IORESOURCE_MEM,
|
||||
}
|
||||
};
|
||||
|
||||
static struct platform_device at91_nand_device = {
|
||||
.name = "at91_nand",
|
||||
.id = -1,
|
||||
.dev = {
|
||||
.platform_data = &nand_data,
|
||||
},
|
||||
.resource = at91_nand_resources,
|
||||
.num_resources = ARRAY_SIZE(at91_nand_resources),
|
||||
};
|
||||
|
||||
void __init at91_add_device_nand(struct at91_nand_data *data)
|
||||
{
|
||||
if (!data)
|
||||
return;
|
||||
|
||||
/* enable pin */
|
||||
if (data->enable_pin)
|
||||
at91_set_gpio_output(data->enable_pin, 1);
|
||||
|
||||
/* ready/busy pin */
|
||||
if (data->rdy_pin)
|
||||
at91_set_gpio_input(data->rdy_pin, 1);
|
||||
|
||||
/* card detect pin */
|
||||
if (data->det_pin)
|
||||
at91_set_gpio_input(data->det_pin, 1);
|
||||
|
||||
at91_set_A_periph(AT91_PIN_PC1, 0); /* SMOE */
|
||||
at91_set_A_periph(AT91_PIN_PC3, 0); /* SMWE */
|
||||
|
||||
nand_data = *data;
|
||||
platform_device_register(&at91_nand_device);
|
||||
}
|
||||
#else
|
||||
void __init at91_add_device_nand(struct at91_nand_data *data) {}
|
||||
#endif
|
||||
|
||||
|
||||
/* --------------------------------------------------------------------
|
||||
* TWI (i2c)
|
||||
* -------------------------------------------------------------------- */
|
||||
|
||||
#if defined(CONFIG_I2C_AT91) || defined(CONFIG_I2C_AT91_MODULE)
|
||||
static struct platform_device at91rm9200_twi_device = {
|
||||
.name = "at91_i2c",
|
||||
.id = -1,
|
||||
.num_resources = 0,
|
||||
};
|
||||
|
||||
void __init at91_add_device_i2c(void)
|
||||
{
|
||||
/* pins used for TWI interface */
|
||||
at91_set_A_periph(AT91_PIN_PA25, 0); /* TWD */
|
||||
at91_set_multi_drive(AT91_PIN_PA25, 1);
|
||||
|
||||
at91_set_A_periph(AT91_PIN_PA26, 0); /* TWCK */
|
||||
at91_set_multi_drive(AT91_PIN_PA26, 1);
|
||||
|
||||
platform_device_register(&at91rm9200_twi_device);
|
||||
}
|
||||
#else
|
||||
void __init at91_add_device_i2c(void) {}
|
||||
#endif
|
||||
|
||||
|
||||
/* --------------------------------------------------------------------
|
||||
* RTC
|
||||
* -------------------------------------------------------------------- */
|
||||
|
||||
#if defined(CONFIG_AT91_RTC) || defined(CONFIG_AT91_RTC_MODULE)
|
||||
static struct platform_device at91rm9200_rtc_device = {
|
||||
.name = "at91_rtc",
|
||||
.id = -1,
|
||||
.num_resources = 0,
|
||||
};
|
||||
|
||||
void __init at91_add_device_rtc(void)
|
||||
{
|
||||
platform_device_register(&at91rm9200_rtc_device);
|
||||
}
|
||||
#else
|
||||
void __init at91_add_device_rtc(void) {}
|
||||
#endif
|
||||
|
||||
|
||||
/* --------------------------------------------------------------------
|
||||
* LEDs
|
||||
* -------------------------------------------------------------------- */
|
||||
|
||||
#if defined(CONFIG_LEDS)
|
||||
u8 at91_leds_cpu;
|
||||
u8 at91_leds_timer;
|
||||
|
||||
void __init at91_init_leds(u8 cpu_led, u8 timer_led)
|
||||
{
|
||||
at91_leds_cpu = cpu_led;
|
||||
at91_leds_timer = timer_led;
|
||||
}
|
||||
|
||||
#else
|
||||
void __init at91_init_leds(u8 cpu_led, u8 timer_led) {}
|
||||
#endif
|
||||
|
||||
|
||||
/* -------------------------------------------------------------------- */
|
||||
|
|
|
@ -0,0 +1,100 @@
|
|||
/*
|
||||
* LED driver for Atmel AT91-based boards.
|
||||
*
|
||||
* Copyright (C) SAN People (Pty) Ltd
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version
|
||||
* 2 of the License, or (at your option) any later version.
|
||||
*/
|
||||
|
||||
#include <linux/config.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/init.h>
|
||||
|
||||
#include <asm/mach-types.h>
|
||||
#include <asm/leds.h>
|
||||
#include <asm/arch/board.h>
|
||||
#include <asm/arch/gpio.h>
|
||||
|
||||
|
||||
static inline void at91_led_on(unsigned int led)
|
||||
{
|
||||
at91_set_gpio_value(led, 0);
|
||||
}
|
||||
|
||||
static inline void at91_led_off(unsigned int led)
|
||||
{
|
||||
at91_set_gpio_value(led, 1);
|
||||
}
|
||||
|
||||
static inline void at91_led_toggle(unsigned int led)
|
||||
{
|
||||
unsigned long is_off = at91_get_gpio_value(led);
|
||||
if (is_off)
|
||||
at91_led_on(led);
|
||||
else
|
||||
at91_led_off(led);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Handle LED events.
|
||||
*/
|
||||
static void at91_leds_event(led_event_t evt)
|
||||
{
|
||||
unsigned long flags;
|
||||
|
||||
local_irq_save(flags);
|
||||
|
||||
switch(evt) {
|
||||
case led_start: /* System startup */
|
||||
at91_led_on(at91_leds_cpu);
|
||||
break;
|
||||
|
||||
case led_stop: /* System stop / suspend */
|
||||
at91_led_off(at91_leds_cpu);
|
||||
break;
|
||||
|
||||
#ifdef CONFIG_LEDS_TIMER
|
||||
case led_timer: /* Every 50 timer ticks */
|
||||
at91_led_toggle(at91_leds_timer);
|
||||
break;
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_LEDS_CPU
|
||||
case led_idle_start: /* Entering idle state */
|
||||
at91_led_off(at91_leds_cpu);
|
||||
break;
|
||||
|
||||
case led_idle_end: /* Exit idle state */
|
||||
at91_led_on(at91_leds_cpu);
|
||||
break;
|
||||
#endif
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
local_irq_restore(flags);
|
||||
}
|
||||
|
||||
|
||||
static int __init leds_init(void)
|
||||
{
|
||||
if (!at91_leds_timer || !at91_leds_cpu)
|
||||
return -ENODEV;
|
||||
|
||||
/* Enable PIO to access the LEDs */
|
||||
at91_set_gpio_output(at91_leds_timer, 1);
|
||||
at91_set_gpio_output(at91_leds_cpu, 1);
|
||||
|
||||
leds_event = at91_leds_event;
|
||||
|
||||
leds_event(led_start);
|
||||
return 0;
|
||||
}
|
||||
|
||||
__initcall(leds_init);
|
|
@ -424,6 +424,14 @@ static struct amba_device uart3_device = {
|
|||
.periphid = 0x00041010,
|
||||
};
|
||||
|
||||
|
||||
static struct platform_device ep93xx_rtc_device = {
|
||||
.name = "ep93xx-rtc",
|
||||
.id = -1,
|
||||
.num_resources = 0,
|
||||
};
|
||||
|
||||
|
||||
void __init ep93xx_init_devices(void)
|
||||
{
|
||||
unsigned int v;
|
||||
|
@ -439,4 +447,6 @@ void __init ep93xx_init_devices(void)
|
|||
amba_device_register(&uart1_device, &iomem_resource);
|
||||
amba_device_register(&uart2_device, &iomem_resource);
|
||||
amba_device_register(&uart3_device, &iomem_resource);
|
||||
|
||||
platform_device_register(&ep93xx_rtc_device);
|
||||
}
|
||||
|
|
|
@ -17,6 +17,8 @@
|
|||
#include <linux/sched.h>
|
||||
#include <linux/interrupt.h>
|
||||
#include <linux/mtd/physmap.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/m48t86.h>
|
||||
#include <asm/io.h>
|
||||
#include <asm/hardware.h>
|
||||
#include <asm/mach-types.h>
|
||||
|
@ -39,6 +41,16 @@ static struct map_desc ts72xx_io_desc[] __initdata = {
|
|||
.pfn = __phys_to_pfn(TS72XX_OPTIONS2_PHYS_BASE),
|
||||
.length = TS72XX_OPTIONS2_SIZE,
|
||||
.type = MT_DEVICE,
|
||||
}, {
|
||||
.virtual = TS72XX_RTC_INDEX_VIRT_BASE,
|
||||
.pfn = __phys_to_pfn(TS72XX_RTC_INDEX_PHYS_BASE),
|
||||
.length = TS72XX_RTC_INDEX_SIZE,
|
||||
.type = MT_DEVICE,
|
||||
}, {
|
||||
.virtual = TS72XX_RTC_DATA_VIRT_BASE,
|
||||
.pfn = __phys_to_pfn(TS72XX_RTC_DATA_PHYS_BASE),
|
||||
.length = TS72XX_RTC_DATA_SIZE,
|
||||
.type = MT_DEVICE,
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -99,11 +111,38 @@ static void __init ts72xx_map_io(void)
|
|||
}
|
||||
}
|
||||
|
||||
static unsigned char ts72xx_rtc_readb(unsigned long addr)
|
||||
{
|
||||
__raw_writeb(addr, TS72XX_RTC_INDEX_VIRT_BASE);
|
||||
return __raw_readb(TS72XX_RTC_DATA_VIRT_BASE);
|
||||
}
|
||||
|
||||
static void ts72xx_rtc_writeb(unsigned char value, unsigned long addr)
|
||||
{
|
||||
__raw_writeb(addr, TS72XX_RTC_INDEX_VIRT_BASE);
|
||||
__raw_writeb(value, TS72XX_RTC_DATA_VIRT_BASE);
|
||||
}
|
||||
|
||||
static struct m48t86_ops ts72xx_rtc_ops = {
|
||||
.readb = ts72xx_rtc_readb,
|
||||
.writeb = ts72xx_rtc_writeb,
|
||||
};
|
||||
|
||||
static struct platform_device ts72xx_rtc_device = {
|
||||
.name = "rtc-m48t86",
|
||||
.id = -1,
|
||||
.dev = {
|
||||
.platform_data = &ts72xx_rtc_ops,
|
||||
},
|
||||
.num_resources = 0,
|
||||
};
|
||||
|
||||
static void __init ts72xx_init_machine(void)
|
||||
{
|
||||
ep93xx_init_devices();
|
||||
if (board_is_ts7200())
|
||||
physmap_configure(TS72XX_NOR_PHYS_BASE, 0x01000000, 1, NULL);
|
||||
platform_device_register(&ts72xx_rtc_device);
|
||||
}
|
||||
|
||||
MACHINE_START(TS72XX, "Technologic Systems TS-72xx SBC")
|
||||
|
|
|
@ -7,11 +7,18 @@
|
|||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* 03/03/2004 Sascha Hauer <sascha@saschahauer.de>
|
||||
* 2004-03-03 Sascha Hauer <sascha@saschahauer.de>
|
||||
* initial version heavily inspired by
|
||||
* linux/arch/arm/mach-pxa/dma.c
|
||||
*
|
||||
* 2005-04-17 Pavel Pisa <pisa@cmp.felk.cvut.cz>
|
||||
* Changed to support scatter gather DMA
|
||||
* by taking Russell's code from RiscPC
|
||||
*
|
||||
*/
|
||||
|
||||
#undef DEBUG
|
||||
|
||||
#include <linux/module.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/kernel.h>
|
||||
|
@ -22,69 +29,368 @@
|
|||
#include <asm/irq.h>
|
||||
#include <asm/hardware.h>
|
||||
#include <asm/dma.h>
|
||||
#include <asm/arch/imx-dma.h>
|
||||
|
||||
static struct dma_channel {
|
||||
char *name;
|
||||
void (*irq_handler) (int, void *, struct pt_regs *);
|
||||
void (*err_handler) (int, void *, struct pt_regs *);
|
||||
void *data;
|
||||
} dma_channels[11];
|
||||
struct imx_dma_channel imx_dma_channels[IMX_DMA_CHANNELS];
|
||||
|
||||
/* set err_handler to NULL to have the standard info-only error handler */
|
||||
int
|
||||
imx_request_dma(char *name, imx_dma_prio prio,
|
||||
void (*irq_handler) (int, void *, struct pt_regs *),
|
||||
void (*err_handler) (int, void *, struct pt_regs *), void *data)
|
||||
/*
|
||||
* imx_dma_sg_next - prepare next chunk for scatter-gather DMA emulation
|
||||
* @dma_ch: i.MX DMA channel number
|
||||
* @lastcount: number of bytes transferred during last transfer
|
||||
*
|
||||
* Functions prepares DMA controller for next sg data chunk transfer.
|
||||
* The @lastcount argument informs function about number of bytes transferred
|
||||
* during last block. Zero value can be used for @lastcount to setup DMA
|
||||
* for the first chunk.
|
||||
*/
|
||||
static inline int imx_dma_sg_next(imx_dmach_t dma_ch, unsigned int lastcount)
|
||||
{
|
||||
unsigned long flags;
|
||||
int i, found = 0;
|
||||
struct imx_dma_channel *imxdma = &imx_dma_channels[dma_ch];
|
||||
unsigned int nextcount;
|
||||
unsigned int nextaddr;
|
||||
|
||||
/* basic sanity checks */
|
||||
if (!name || !irq_handler)
|
||||
return -EINVAL;
|
||||
if (!imxdma->name) {
|
||||
printk(KERN_CRIT "%s: called for not allocated channel %d\n",
|
||||
__FUNCTION__, dma_ch);
|
||||
return 0;
|
||||
}
|
||||
|
||||
local_irq_save(flags);
|
||||
imxdma->resbytes -= lastcount;
|
||||
|
||||
/* try grabbing a DMA channel with the requested priority */
|
||||
for (i = prio; i < prio + (prio == DMA_PRIO_LOW) ? 8 : 4; i++) {
|
||||
if (!dma_channels[i].name) {
|
||||
found = 1;
|
||||
break;
|
||||
if (!imxdma->sg) {
|
||||
pr_debug("imxdma%d: no sg data\n", dma_ch);
|
||||
return 0;
|
||||
}
|
||||
|
||||
imxdma->sgbc += lastcount;
|
||||
if ((imxdma->sgbc >= imxdma->sg->length) || !imxdma->resbytes) {
|
||||
if ((imxdma->sgcount <= 1) || !imxdma->resbytes) {
|
||||
pr_debug("imxdma%d: sg transfer limit reached\n",
|
||||
dma_ch);
|
||||
imxdma->sgcount=0;
|
||||
imxdma->sg = NULL;
|
||||
return 0;
|
||||
} else {
|
||||
imxdma->sgcount--;
|
||||
imxdma->sg++;
|
||||
imxdma->sgbc = 0;
|
||||
}
|
||||
}
|
||||
nextcount = imxdma->sg->length - imxdma->sgbc;
|
||||
nextaddr = imxdma->sg->dma_address + imxdma->sgbc;
|
||||
|
||||
if (!found) {
|
||||
/* requested prio group is full, try hier priorities */
|
||||
for (i = prio - 1; i >= 0; i--) {
|
||||
if (!dma_channels[i].name) {
|
||||
found = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if(imxdma->resbytes < nextcount)
|
||||
nextcount = imxdma->resbytes;
|
||||
|
||||
if (found) {
|
||||
DIMR &= ~(1 << i);
|
||||
dma_channels[i].name = name;
|
||||
dma_channels[i].irq_handler = irq_handler;
|
||||
dma_channels[i].err_handler = err_handler;
|
||||
dma_channels[i].data = data;
|
||||
} else {
|
||||
printk(KERN_WARNING "No more available DMA channels for %s\n",
|
||||
name);
|
||||
i = -ENODEV;
|
||||
}
|
||||
if ((imxdma->dma_mode & DMA_MODE_MASK) == DMA_MODE_READ)
|
||||
DAR(dma_ch) = nextaddr;
|
||||
else
|
||||
SAR(dma_ch) = nextaddr;
|
||||
|
||||
local_irq_restore(flags);
|
||||
return i;
|
||||
CNTR(dma_ch) = nextcount;
|
||||
pr_debug("imxdma%d: next sg chunk dst 0x%08x, src 0x%08x, size 0x%08x\n",
|
||||
dma_ch, DAR(dma_ch), SAR(dma_ch), CNTR(dma_ch));
|
||||
|
||||
return nextcount;
|
||||
}
|
||||
|
||||
void
|
||||
imx_free_dma(int dma_ch)
|
||||
/*
|
||||
* imx_dma_setup_sg_base - scatter-gather DMA emulation
|
||||
* @dma_ch: i.MX DMA channel number
|
||||
* @sg: pointer to the scatter-gather list/vector
|
||||
* @sgcount: scatter-gather list hungs count
|
||||
*
|
||||
* Functions sets up i.MX DMA state for emulated scatter-gather transfer
|
||||
* and sets up channel registers to be ready for the first chunk
|
||||
*/
|
||||
static int
|
||||
imx_dma_setup_sg_base(imx_dmach_t dma_ch,
|
||||
struct scatterlist *sg, unsigned int sgcount)
|
||||
{
|
||||
struct imx_dma_channel *imxdma = &imx_dma_channels[dma_ch];
|
||||
|
||||
imxdma->sg = sg;
|
||||
imxdma->sgcount = sgcount;
|
||||
imxdma->sgbc = 0;
|
||||
return imx_dma_sg_next(dma_ch, 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* imx_dma_setup_single - setup i.MX DMA channel for linear memory to/from device transfer
|
||||
* @dma_ch: i.MX DMA channel number
|
||||
* @dma_address: the DMA/physical memory address of the linear data block
|
||||
* to transfer
|
||||
* @dma_length: length of the data block in bytes
|
||||
* @dev_addr: physical device port address
|
||||
* @dmamode: DMA transfer mode, %DMA_MODE_READ from the device to the memory
|
||||
* or %DMA_MODE_WRITE from memory to the device
|
||||
*
|
||||
* The function setups DMA channel source and destination addresses for transfer
|
||||
* specified by provided parameters. The scatter-gather emulation is disabled,
|
||||
* because linear data block
|
||||
* form the physical address range is transfered.
|
||||
* Return value: if incorrect parameters are provided -%EINVAL.
|
||||
* Zero indicates success.
|
||||
*/
|
||||
int
|
||||
imx_dma_setup_single(imx_dmach_t dma_ch, dma_addr_t dma_address,
|
||||
unsigned int dma_length, unsigned int dev_addr,
|
||||
dmamode_t dmamode)
|
||||
{
|
||||
struct imx_dma_channel *imxdma = &imx_dma_channels[dma_ch];
|
||||
|
||||
imxdma->sg = NULL;
|
||||
imxdma->sgcount = 0;
|
||||
imxdma->dma_mode = dmamode;
|
||||
imxdma->resbytes = dma_length;
|
||||
|
||||
if (!dma_address) {
|
||||
printk(KERN_ERR "imxdma%d: imx_dma_setup_single null address\n",
|
||||
dma_ch);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (!dma_length) {
|
||||
printk(KERN_ERR "imxdma%d: imx_dma_setup_single zero length\n",
|
||||
dma_ch);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if ((dmamode & DMA_MODE_MASK) == DMA_MODE_READ) {
|
||||
pr_debug("imxdma%d: mx_dma_setup_single2dev dma_addressg=0x%08x dma_length=%d dev_addr=0x%08x for read\n",
|
||||
dma_ch, (unsigned int)dma_address, dma_length,
|
||||
dev_addr);
|
||||
SAR(dma_ch) = dev_addr;
|
||||
DAR(dma_ch) = (unsigned int)dma_address;
|
||||
} else if ((dmamode & DMA_MODE_MASK) == DMA_MODE_WRITE) {
|
||||
pr_debug("imxdma%d: mx_dma_setup_single2dev dma_addressg=0x%08x dma_length=%d dev_addr=0x%08x for write\n",
|
||||
dma_ch, (unsigned int)dma_address, dma_length,
|
||||
dev_addr);
|
||||
SAR(dma_ch) = (unsigned int)dma_address;
|
||||
DAR(dma_ch) = dev_addr;
|
||||
} else {
|
||||
printk(KERN_ERR "imxdma%d: imx_dma_setup_single bad dmamode\n",
|
||||
dma_ch);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
CNTR(dma_ch) = dma_length;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* imx_dma_setup_sg - setup i.MX DMA channel SG list to/from device transfer
|
||||
* @dma_ch: i.MX DMA channel number
|
||||
* @sg: pointer to the scatter-gather list/vector
|
||||
* @sgcount: scatter-gather list hungs count
|
||||
* @dma_length: total length of the transfer request in bytes
|
||||
* @dev_addr: physical device port address
|
||||
* @dmamode: DMA transfer mode, %DMA_MODE_READ from the device to the memory
|
||||
* or %DMA_MODE_WRITE from memory to the device
|
||||
*
|
||||
* The function setups DMA channel state and registers to be ready for transfer
|
||||
* specified by provided parameters. The scatter-gather emulation is set up
|
||||
* according to the parameters.
|
||||
*
|
||||
* The full preparation of the transfer requires setup of more register
|
||||
* by the caller before imx_dma_enable() can be called.
|
||||
*
|
||||
* %BLR(dma_ch) holds transfer burst length in bytes, 0 means 64 bytes
|
||||
*
|
||||
* %RSSR(dma_ch) has to be set to the DMA request line source %DMA_REQ_xxx
|
||||
*
|
||||
* %CCR(dma_ch) has to specify transfer parameters, the next settings is typical
|
||||
* for linear or simple scatter-gather transfers if %DMA_MODE_READ is specified
|
||||
*
|
||||
* %CCR_DMOD_LINEAR | %CCR_DSIZ_32 | %CCR_SMOD_FIFO | %CCR_SSIZ_x
|
||||
*
|
||||
* The typical setup for %DMA_MODE_WRITE is specified by next options combination
|
||||
*
|
||||
* %CCR_SMOD_LINEAR | %CCR_SSIZ_32 | %CCR_DMOD_FIFO | %CCR_DSIZ_x
|
||||
*
|
||||
* Be carefull there and do not mistakenly mix source and target device
|
||||
* port sizes constants, they are really different:
|
||||
* %CCR_SSIZ_8, %CCR_SSIZ_16, %CCR_SSIZ_32,
|
||||
* %CCR_DSIZ_8, %CCR_DSIZ_16, %CCR_DSIZ_32
|
||||
*
|
||||
* Return value: if incorrect parameters are provided -%EINVAL.
|
||||
* Zero indicates success.
|
||||
*/
|
||||
int
|
||||
imx_dma_setup_sg(imx_dmach_t dma_ch,
|
||||
struct scatterlist *sg, unsigned int sgcount, unsigned int dma_length,
|
||||
unsigned int dev_addr, dmamode_t dmamode)
|
||||
{
|
||||
int res;
|
||||
struct imx_dma_channel *imxdma = &imx_dma_channels[dma_ch];
|
||||
|
||||
imxdma->sg = NULL;
|
||||
imxdma->sgcount = 0;
|
||||
imxdma->dma_mode = dmamode;
|
||||
imxdma->resbytes = dma_length;
|
||||
|
||||
if (!sg || !sgcount) {
|
||||
printk(KERN_ERR "imxdma%d: imx_dma_setup_sg epty sg list\n",
|
||||
dma_ch);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (!sg->length) {
|
||||
printk(KERN_ERR "imxdma%d: imx_dma_setup_sg zero length\n",
|
||||
dma_ch);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if ((dmamode & DMA_MODE_MASK) == DMA_MODE_READ) {
|
||||
pr_debug("imxdma%d: mx_dma_setup_sg2dev sg=%p sgcount=%d total length=%d dev_addr=0x%08x for read\n",
|
||||
dma_ch, sg, sgcount, dma_length, dev_addr);
|
||||
SAR(dma_ch) = dev_addr;
|
||||
} else if ((dmamode & DMA_MODE_MASK) == DMA_MODE_WRITE) {
|
||||
pr_debug("imxdma%d: mx_dma_setup_sg2dev sg=%p sgcount=%d total length=%d dev_addr=0x%08x for write\n",
|
||||
dma_ch, sg, sgcount, dma_length, dev_addr);
|
||||
DAR(dma_ch) = dev_addr;
|
||||
} else {
|
||||
printk(KERN_ERR "imxdma%d: imx_dma_setup_sg bad dmamode\n",
|
||||
dma_ch);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
res = imx_dma_setup_sg_base(dma_ch, sg, sgcount);
|
||||
if (res <= 0) {
|
||||
printk(KERN_ERR "imxdma%d: no sg chunk ready\n", dma_ch);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* imx_dma_setup_handlers - setup i.MX DMA channel end and error notification handlers
|
||||
* @dma_ch: i.MX DMA channel number
|
||||
* @irq_handler: the pointer to the function called if the transfer
|
||||
* ends successfully
|
||||
* @err_handler: the pointer to the function called if the premature
|
||||
* end caused by error occurs
|
||||
* @data: user specified value to be passed to the handlers
|
||||
*/
|
||||
int
|
||||
imx_dma_setup_handlers(imx_dmach_t dma_ch,
|
||||
void (*irq_handler) (int, void *, struct pt_regs *),
|
||||
void (*err_handler) (int, void *, struct pt_regs *),
|
||||
void *data)
|
||||
{
|
||||
struct imx_dma_channel *imxdma = &imx_dma_channels[dma_ch];
|
||||
unsigned long flags;
|
||||
|
||||
if (!imxdma->name) {
|
||||
printk(KERN_CRIT "%s: called for not allocated channel %d\n",
|
||||
__FUNCTION__, dma_ch);
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
local_irq_save(flags);
|
||||
DISR = (1 << dma_ch);
|
||||
imxdma->irq_handler = irq_handler;
|
||||
imxdma->err_handler = err_handler;
|
||||
imxdma->data = data;
|
||||
local_irq_restore(flags);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* imx_dma_enable - function to start i.MX DMA channel operation
|
||||
* @dma_ch: i.MX DMA channel number
|
||||
*
|
||||
* The channel has to be allocated by driver through imx_dma_request()
|
||||
* or imx_dma_request_by_prio() function.
|
||||
* The transfer parameters has to be set to the channel registers through
|
||||
* call of the imx_dma_setup_single() or imx_dma_setup_sg() function
|
||||
* and registers %BLR(dma_ch), %RSSR(dma_ch) and %CCR(dma_ch) has to
|
||||
* be set prior this function call by the channel user.
|
||||
*/
|
||||
void imx_dma_enable(imx_dmach_t dma_ch)
|
||||
{
|
||||
struct imx_dma_channel *imxdma = &imx_dma_channels[dma_ch];
|
||||
unsigned long flags;
|
||||
|
||||
pr_debug("imxdma%d: imx_dma_enable\n", dma_ch);
|
||||
|
||||
if (!imxdma->name) {
|
||||
printk(KERN_CRIT "%s: called for not allocated channel %d\n",
|
||||
__FUNCTION__, dma_ch);
|
||||
return;
|
||||
}
|
||||
|
||||
local_irq_save(flags);
|
||||
DISR = (1 << dma_ch);
|
||||
DIMR &= ~(1 << dma_ch);
|
||||
CCR(dma_ch) |= CCR_CEN;
|
||||
local_irq_restore(flags);
|
||||
}
|
||||
|
||||
/**
|
||||
* imx_dma_disable - stop, finish i.MX DMA channel operatin
|
||||
* @dma_ch: i.MX DMA channel number
|
||||
*/
|
||||
void imx_dma_disable(imx_dmach_t dma_ch)
|
||||
{
|
||||
unsigned long flags;
|
||||
|
||||
if (!dma_channels[dma_ch].name) {
|
||||
pr_debug("imxdma%d: imx_dma_disable\n", dma_ch);
|
||||
|
||||
local_irq_save(flags);
|
||||
DIMR |= (1 << dma_ch);
|
||||
CCR(dma_ch) &= ~CCR_CEN;
|
||||
DISR = (1 << dma_ch);
|
||||
local_irq_restore(flags);
|
||||
}
|
||||
|
||||
/**
|
||||
* imx_dma_request - request/allocate specified channel number
|
||||
* @dma_ch: i.MX DMA channel number
|
||||
* @name: the driver/caller own non-%NULL identification
|
||||
*/
|
||||
int imx_dma_request(imx_dmach_t dma_ch, const char *name)
|
||||
{
|
||||
struct imx_dma_channel *imxdma = &imx_dma_channels[dma_ch];
|
||||
unsigned long flags;
|
||||
|
||||
/* basic sanity checks */
|
||||
if (!name)
|
||||
return -EINVAL;
|
||||
|
||||
if (dma_ch >= IMX_DMA_CHANNELS) {
|
||||
printk(KERN_CRIT "%s: called for non-existed channel %d\n",
|
||||
__FUNCTION__, dma_ch);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
local_irq_save(flags);
|
||||
if (imxdma->name) {
|
||||
local_irq_restore(flags);
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
imxdma->name = name;
|
||||
imxdma->irq_handler = NULL;
|
||||
imxdma->err_handler = NULL;
|
||||
imxdma->data = NULL;
|
||||
imxdma->sg = NULL;
|
||||
local_irq_restore(flags);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* imx_dma_free - release previously acquired channel
|
||||
* @dma_ch: i.MX DMA channel number
|
||||
*/
|
||||
void imx_dma_free(imx_dmach_t dma_ch)
|
||||
{
|
||||
unsigned long flags;
|
||||
struct imx_dma_channel *imxdma = &imx_dma_channels[dma_ch];
|
||||
|
||||
if (!imxdma->name) {
|
||||
printk(KERN_CRIT
|
||||
"%s: trying to free channel %d which is already freed\n",
|
||||
__FUNCTION__, dma_ch);
|
||||
|
@ -92,27 +398,84 @@ imx_free_dma(int dma_ch)
|
|||
}
|
||||
|
||||
local_irq_save(flags);
|
||||
DIMR &= ~(1 << dma_ch);
|
||||
dma_channels[dma_ch].name = NULL;
|
||||
/* Disable interrupts */
|
||||
DIMR |= (1 << dma_ch);
|
||||
CCR(dma_ch) &= ~CCR_CEN;
|
||||
imxdma->name = NULL;
|
||||
local_irq_restore(flags);
|
||||
}
|
||||
|
||||
static irqreturn_t
|
||||
dma_err_handler(int irq, void *dev_id, struct pt_regs *regs)
|
||||
/**
|
||||
* imx_dma_request_by_prio - find and request some of free channels best suiting requested priority
|
||||
* @dma_ch: i.MX DMA channel number
|
||||
* @name: the driver/caller own non-%NULL identification
|
||||
* @prio: one of the hardware distinguished priority level:
|
||||
* %DMA_PRIO_HIGH, %DMA_PRIO_MEDIUM, %DMA_PRIO_LOW
|
||||
*
|
||||
* This function tries to find free channel in the specified priority group
|
||||
* if the priority cannot be achieved it tries to look for free channel
|
||||
* in the higher and then even lower priority groups.
|
||||
*
|
||||
* Return value: If there is no free channel to allocate, -%ENODEV is returned.
|
||||
* Zero value indicates successful channel allocation.
|
||||
*/
|
||||
int
|
||||
imx_dma_request_by_prio(imx_dmach_t * pdma_ch, const char *name,
|
||||
imx_dma_prio prio)
|
||||
{
|
||||
int i;
|
||||
int best;
|
||||
|
||||
switch (prio) {
|
||||
case (DMA_PRIO_HIGH):
|
||||
best = 8;
|
||||
break;
|
||||
case (DMA_PRIO_MEDIUM):
|
||||
best = 4;
|
||||
break;
|
||||
case (DMA_PRIO_LOW):
|
||||
default:
|
||||
best = 0;
|
||||
break;
|
||||
}
|
||||
|
||||
for (i = best; i < IMX_DMA_CHANNELS; i++) {
|
||||
if (!imx_dma_request(i, name)) {
|
||||
*pdma_ch = i;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
for (i = best - 1; i >= 0; i--) {
|
||||
if (!imx_dma_request(i, name)) {
|
||||
*pdma_ch = i;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
printk(KERN_ERR "%s: no free DMA channel found\n", __FUNCTION__);
|
||||
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
static irqreturn_t dma_err_handler(int irq, void *dev_id, struct pt_regs *regs)
|
||||
{
|
||||
int i, disr = DISR;
|
||||
struct dma_channel *channel;
|
||||
struct imx_dma_channel *channel;
|
||||
unsigned int err_mask = DBTOSR | DRTOSR | DSESR | DBOSR;
|
||||
|
||||
DISR = disr;
|
||||
for (i = 0; i < 11; i++) {
|
||||
channel = &dma_channels[i];
|
||||
for (i = 0; i < IMX_DMA_CHANNELS; i++) {
|
||||
channel = &imx_dma_channels[i];
|
||||
|
||||
if ( (err_mask & 1<<i) && channel->name && channel->err_handler) {
|
||||
if ((err_mask & 1 << i) && channel->name
|
||||
&& channel->err_handler) {
|
||||
channel->err_handler(i, channel->data, regs);
|
||||
continue;
|
||||
}
|
||||
|
||||
imx_dma_channels[i].sg = NULL;
|
||||
|
||||
if (DBTOSR & (1 << i)) {
|
||||
printk(KERN_WARNING
|
||||
"Burst timeout on channel %d (%s)\n",
|
||||
|
@ -141,17 +504,27 @@ dma_err_handler(int irq, void *dev_id, struct pt_regs *regs)
|
|||
return IRQ_HANDLED;
|
||||
}
|
||||
|
||||
static irqreturn_t
|
||||
dma_irq_handler(int irq, void *dev_id, struct pt_regs *regs)
|
||||
static irqreturn_t dma_irq_handler(int irq, void *dev_id, struct pt_regs *regs)
|
||||
{
|
||||
int i, disr = DISR;
|
||||
|
||||
pr_debug("imxdma: dma_irq_handler called, disr=0x%08x\n",
|
||||
disr);
|
||||
|
||||
DISR = disr;
|
||||
for (i = 0; i < 11; i++) {
|
||||
for (i = 0; i < IMX_DMA_CHANNELS; i++) {
|
||||
if (disr & (1 << i)) {
|
||||
struct dma_channel *channel = &dma_channels[i];
|
||||
if (channel->name && channel->irq_handler) {
|
||||
channel->irq_handler(i, channel->data, regs);
|
||||
struct imx_dma_channel *channel = &imx_dma_channels[i];
|
||||
if (channel->name) {
|
||||
if (imx_dma_sg_next(i, CNTR(i))) {
|
||||
CCR(i) &= ~CCR_CEN;
|
||||
mb();
|
||||
CCR(i) |= CCR_CEN;
|
||||
} else {
|
||||
if (channel->irq_handler)
|
||||
channel->irq_handler(i,
|
||||
channel->data, regs);
|
||||
}
|
||||
} else {
|
||||
/*
|
||||
* IRQ for an unregistered DMA channel:
|
||||
|
@ -165,10 +538,10 @@ dma_irq_handler(int irq, void *dev_id, struct pt_regs *regs)
|
|||
return IRQ_HANDLED;
|
||||
}
|
||||
|
||||
static int __init
|
||||
imx_dma_init(void)
|
||||
static int __init imx_dma_init(void)
|
||||
{
|
||||
int ret;
|
||||
int i;
|
||||
|
||||
/* reset DMA module */
|
||||
DCR = DCR_DRST;
|
||||
|
@ -189,15 +562,27 @@ imx_dma_init(void)
|
|||
DCR = DCR_DEN;
|
||||
|
||||
/* clear all interrupts */
|
||||
DISR = 0x3ff;
|
||||
DISR = (1 << IMX_DMA_CHANNELS) - 1;
|
||||
|
||||
/* enable interrupts */
|
||||
DIMR = 0;
|
||||
DIMR = (1 << IMX_DMA_CHANNELS) - 1;
|
||||
|
||||
for (i = 0; i < IMX_DMA_CHANNELS; i++) {
|
||||
imx_dma_channels[i].sg = NULL;
|
||||
imx_dma_channels[i].dma_num = i;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
arch_initcall(imx_dma_init);
|
||||
|
||||
EXPORT_SYMBOL(imx_request_dma);
|
||||
EXPORT_SYMBOL(imx_free_dma);
|
||||
EXPORT_SYMBOL(imx_dma_setup_single);
|
||||
EXPORT_SYMBOL(imx_dma_setup_sg);
|
||||
EXPORT_SYMBOL(imx_dma_setup_handlers);
|
||||
EXPORT_SYMBOL(imx_dma_enable);
|
||||
EXPORT_SYMBOL(imx_dma_disable);
|
||||
EXPORT_SYMBOL(imx_dma_request);
|
||||
EXPORT_SYMBOL(imx_dma_free);
|
||||
EXPORT_SYMBOL(imx_dma_request_by_prio);
|
||||
EXPORT_SYMBOL(imx_dma_channels);
|
||||
|
|
|
@ -33,6 +33,7 @@
|
|||
#include <asm/arch/imx-regs.h>
|
||||
|
||||
#include <asm/mach/map.h>
|
||||
#include <asm/arch/mmc.h>
|
||||
|
||||
void imx_gpio_mode(int gpio_mode)
|
||||
{
|
||||
|
@ -175,13 +176,25 @@ static struct resource imx_mmc_resources[] = {
|
|||
},
|
||||
};
|
||||
|
||||
static u64 imxmmmc_dmamask = 0xffffffffUL;
|
||||
|
||||
static struct platform_device imx_mmc_device = {
|
||||
.name = "imx-mmc",
|
||||
.id = 0,
|
||||
.dev = {
|
||||
.dma_mask = &imxmmmc_dmamask,
|
||||
.coherent_dma_mask = 0xffffffff,
|
||||
},
|
||||
.num_resources = ARRAY_SIZE(imx_mmc_resources),
|
||||
.resource = imx_mmc_resources,
|
||||
};
|
||||
|
||||
void __init imx_set_mmc_info(struct imxmmc_platform_data *info)
|
||||
{
|
||||
imx_mmc_device.dev.platform_data = info;
|
||||
}
|
||||
EXPORT_SYMBOL(imx_set_mmc_info);
|
||||
|
||||
static struct resource imx_uart1_resources[] = {
|
||||
[0] = {
|
||||
.start = 0x00206000,
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
#include <asm/mach-types.h>
|
||||
|
||||
#include <asm/mach/arch.h>
|
||||
#include <asm/arch/mmc.h>
|
||||
#include <linux/interrupt.h>
|
||||
#include "generic.h"
|
||||
|
||||
|
@ -51,11 +52,28 @@ static struct platform_device *devices[] __initdata = {
|
|||
&cs89x0_device,
|
||||
};
|
||||
|
||||
#ifdef CONFIG_MMC_IMX
|
||||
static int mx1ads_mmc_card_present(void)
|
||||
{
|
||||
/* MMC/SD Card Detect is PB 20 on MX1ADS V1.0.7 */
|
||||
return (SSR(1) & (1 << 20) ? 0 : 1);
|
||||
}
|
||||
|
||||
static struct imxmmc_platform_data mx1ads_mmc_info = {
|
||||
.card_present = mx1ads_mmc_card_present,
|
||||
};
|
||||
#endif
|
||||
|
||||
static void __init
|
||||
mx1ads_init(void)
|
||||
{
|
||||
#ifdef CONFIG_LEDS
|
||||
imx_gpio_mode(GPIO_PORTA | GPIO_OUT | 2);
|
||||
#endif
|
||||
#ifdef CONFIG_MMC_IMX
|
||||
/* SD/MMC card detect */
|
||||
imx_gpio_mode(GPIO_PORTB | GPIO_GIUS | GPIO_IN | 20);
|
||||
imx_set_mmc_info(&mx1ads_mmc_info);
|
||||
#endif
|
||||
platform_add_devices(devices, ARRAY_SIZE(devices));
|
||||
}
|
||||
|
|
|
@ -44,6 +44,15 @@
|
|||
#include <asm/mach/irq.h>
|
||||
#include <asm/mach/pci.h>
|
||||
|
||||
static int __init espresso_pci_init(void)
|
||||
{
|
||||
if (machine_is_espresso())
|
||||
ixp23xx_pci_slave_init();
|
||||
|
||||
return 0;
|
||||
};
|
||||
subsys_initcall(espresso_pci_init);
|
||||
|
||||
static void __init espresso_init(void)
|
||||
{
|
||||
physmap_configure(0x90000000, 0x02000000, 2, NULL);
|
||||
|
|
|
@ -201,7 +201,7 @@ int clear_master_aborts(void)
|
|||
return 0;
|
||||
}
|
||||
|
||||
void __init ixp23xx_pci_preinit(void)
|
||||
static void __init ixp23xx_pci_common_init(void)
|
||||
{
|
||||
#ifdef __ARMEB__
|
||||
*IXP23XX_PCI_CONTROL |= 0x20000; /* set I/O swapping */
|
||||
|
@ -219,7 +219,18 @@ void __init ixp23xx_pci_preinit(void)
|
|||
*IXP23XX_PCI_CPP_ADDR_BITS &= ~(1 << 1);
|
||||
} else {
|
||||
*IXP23XX_PCI_CPP_ADDR_BITS |= (1 << 1);
|
||||
|
||||
/*
|
||||
* Enable coherency on A2 silicon.
|
||||
*/
|
||||
if (arch_is_coherent())
|
||||
*IXP23XX_CPP2XSI_CURR_XFER_REG3 &= ~IXP23XX_CPP2XSI_COH_OFF;
|
||||
}
|
||||
}
|
||||
|
||||
void __init ixp23xx_pci_preinit(void)
|
||||
{
|
||||
ixp23xx_pci_common_init();
|
||||
|
||||
hook_fault_code(16+6, ixp23xx_pci_abort_handler, SIGBUS,
|
||||
"PCI config cycle to non-existent device");
|
||||
|
@ -273,3 +284,8 @@ int ixp23xx_pci_setup(int nr, struct pci_sys_data *sys)
|
|||
|
||||
return 1;
|
||||
}
|
||||
|
||||
void ixp23xx_pci_slave_init(void)
|
||||
{
|
||||
ixp23xx_pci_common_init();
|
||||
}
|
||||
|
|
|
@ -91,7 +91,7 @@ static void ixp4xx_config_irq(unsigned irq, enum ixp4xx_irq_type type);
|
|||
/*
|
||||
* IRQ -> GPIO mapping table
|
||||
*/
|
||||
static char irq2gpio[32] = {
|
||||
static signed char irq2gpio[32] = {
|
||||
-1, -1, -1, -1, -1, -1, 0, 1,
|
||||
-1, -1, -1, -1, -1, -1, -1, -1,
|
||||
-1, -1, -1, 2, 3, 4, 5, 6,
|
||||
|
|
|
@ -69,12 +69,6 @@ config MACH_VOICEBLUE
|
|||
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_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
|
||||
|
@ -85,6 +79,20 @@ config MACH_OMAP_PALMTE
|
|||
informations.
|
||||
Say Y here if you have such a PDA, say NO otherwise.
|
||||
|
||||
config MACH_NOKIA770
|
||||
bool "Nokia 770"
|
||||
depends on ARCH_OMAP1 && ARCH_OMAP16XX
|
||||
help
|
||||
Support for the Nokia 770 Internet Tablet. Say Y here if you
|
||||
have such a device.
|
||||
|
||||
config MACH_AMS_DELTA
|
||||
bool "Amstrad E3 (Delta)"
|
||||
depends on ARCH_OMAP1 && ARCH_OMAP15XX
|
||||
help
|
||||
Support for the Amstrad E3 (codename Delta) videophone. Say Y here
|
||||
if you have such a device.
|
||||
|
||||
config MACH_OMAP_GENERIC
|
||||
bool "Generic OMAP board"
|
||||
depends on ARCH_OMAP1 && (ARCH_OMAP15XX || ARCH_OMAP16XX)
|
||||
|
|
|
@ -3,7 +3,13 @@
|
|||
#
|
||||
|
||||
# Common support
|
||||
obj-y := io.o id.o clock.o irq.o time.o mux.o serial.o devices.o
|
||||
obj-y := io.o id.o clock.o irq.o mux.o serial.o devices.o
|
||||
|
||||
obj-$(CONFIG_OMAP_MPU_TIMER) += time.o
|
||||
|
||||
# Power Management
|
||||
obj-$(CONFIG_PM) += pm.o sleep.o
|
||||
|
||||
led-y := leds.o
|
||||
|
||||
# Specific board support
|
||||
|
@ -14,8 +20,9 @@ obj-$(CONFIG_MACH_OMAP_PERSEUS2) += board-perseus2.o
|
|||
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
|
||||
obj-$(CONFIG_MACH_NOKIA770) += board-nokia770.o
|
||||
obj-$(CONFIG_MACH_AMS_DELTA) += board-ams-delta.o
|
||||
|
||||
ifeq ($(CONFIG_ARCH_OMAP15XX),y)
|
||||
# Innovator-1510 FPGA
|
||||
|
|
|
@ -0,0 +1,116 @@
|
|||
/*
|
||||
* linux/arch/arm/mach-omap1/board-ams-delta.c
|
||||
*
|
||||
* Modified from board-generic.c
|
||||
*
|
||||
* Board specific inits for the Amstrad E3 (codename Delta) videophone
|
||||
*
|
||||
* Copyright (C) 2006 Jonathan McDowell <noodles@earth.li>
|
||||
*
|
||||
* 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 <asm/hardware.h>
|
||||
#include <asm/mach-types.h>
|
||||
#include <asm/mach/arch.h>
|
||||
#include <asm/mach/map.h>
|
||||
|
||||
#include <asm/arch/board-ams-delta.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>
|
||||
|
||||
static u8 ams_delta_latch1_reg;
|
||||
static u16 ams_delta_latch2_reg;
|
||||
|
||||
void ams_delta_latch1_write(u8 mask, u8 value)
|
||||
{
|
||||
ams_delta_latch1_reg &= ~mask;
|
||||
ams_delta_latch1_reg |= value;
|
||||
*(volatile __u8 *) AMS_DELTA_LATCH1_VIRT = ams_delta_latch1_reg;
|
||||
}
|
||||
|
||||
void ams_delta_latch2_write(u16 mask, u16 value)
|
||||
{
|
||||
ams_delta_latch2_reg &= ~mask;
|
||||
ams_delta_latch2_reg |= value;
|
||||
*(volatile __u16 *) AMS_DELTA_LATCH2_VIRT = ams_delta_latch2_reg;
|
||||
}
|
||||
|
||||
static void __init ams_delta_init_irq(void)
|
||||
{
|
||||
omap1_init_common_hw();
|
||||
omap_init_irq();
|
||||
omap_gpio_init();
|
||||
}
|
||||
|
||||
static struct map_desc ams_delta_io_desc[] __initdata = {
|
||||
// AMS_DELTA_LATCH1
|
||||
{
|
||||
.virtual = AMS_DELTA_LATCH1_VIRT,
|
||||
.pfn = __phys_to_pfn(AMS_DELTA_LATCH1_PHYS),
|
||||
.length = 0x01000000,
|
||||
.type = MT_DEVICE
|
||||
},
|
||||
// AMS_DELTA_LATCH2
|
||||
{
|
||||
.virtual = AMS_DELTA_LATCH2_VIRT,
|
||||
.pfn = __phys_to_pfn(AMS_DELTA_LATCH2_PHYS),
|
||||
.length = 0x01000000,
|
||||
.type = MT_DEVICE
|
||||
},
|
||||
// AMS_DELTA_MODEM
|
||||
{
|
||||
.virtual = AMS_DELTA_MODEM_VIRT,
|
||||
.pfn = __phys_to_pfn(AMS_DELTA_MODEM_PHYS),
|
||||
.length = 0x01000000,
|
||||
.type = MT_DEVICE
|
||||
}
|
||||
};
|
||||
|
||||
static struct omap_uart_config ams_delta_uart_config __initdata = {
|
||||
.enabled_uarts = 1,
|
||||
};
|
||||
|
||||
static struct omap_board_config_kernel ams_delta_config[] = {
|
||||
{ OMAP_TAG_UART, &ams_delta_uart_config },
|
||||
};
|
||||
|
||||
static void __init ams_delta_init(void)
|
||||
{
|
||||
iotable_init(ams_delta_io_desc, ARRAY_SIZE(ams_delta_io_desc));
|
||||
|
||||
omap_board_config = ams_delta_config;
|
||||
omap_board_config_size = ARRAY_SIZE(ams_delta_config);
|
||||
omap_serial_init();
|
||||
|
||||
/* Clear latch2 (NAND, LCD, modem enable) */
|
||||
ams_delta_latch2_write(~0, 0);
|
||||
}
|
||||
|
||||
static void __init ams_delta_map_io(void)
|
||||
{
|
||||
omap1_map_common_io();
|
||||
}
|
||||
|
||||
MACHINE_START(AMS_DELTA, "Amstrad E3 (Delta)")
|
||||
/* Maintainer: Jonathan McDowell <noodles@earth.li> */
|
||||
.phys_io = 0xfff00000,
|
||||
.io_pg_offst = ((0xfef00000) >> 18) & 0xfffc,
|
||||
.boot_params = 0x10000100,
|
||||
.map_io = ams_delta_map_io,
|
||||
.init_irq = ams_delta_init_irq,
|
||||
.init_machine = ams_delta_init,
|
||||
.timer = &omap_timer,
|
||||
MACHINE_END
|
||||
|
||||
EXPORT_SYMBOL(ams_delta_latch1_write);
|
||||
EXPORT_SYMBOL(ams_delta_latch2_write);
|
|
@ -88,7 +88,7 @@ static struct omap_board_config_kernel generic_config[] = {
|
|||
static void __init omap_generic_init(void)
|
||||
{
|
||||
#ifdef CONFIG_ARCH_OMAP15XX
|
||||
if (cpu_is_omap1510()) {
|
||||
if (cpu_is_omap15xx()) {
|
||||
generic_config[0].data = &generic1510_usb_config;
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -24,7 +24,9 @@
|
|||
#include <linux/platform_device.h>
|
||||
#include <linux/delay.h>
|
||||
#include <linux/mtd/mtd.h>
|
||||
#include <linux/mtd/nand.h>
|
||||
#include <linux/mtd/partitions.h>
|
||||
#include <linux/input.h>
|
||||
|
||||
#include <asm/hardware.h>
|
||||
#include <asm/mach-types.h>
|
||||
|
@ -35,12 +37,55 @@
|
|||
#include <asm/arch/gpio.h>
|
||||
#include <asm/arch/mux.h>
|
||||
#include <asm/arch/tc.h>
|
||||
#include <asm/arch/irda.h>
|
||||
#include <asm/arch/usb.h>
|
||||
#include <asm/arch/keypad.h>
|
||||
#include <asm/arch/common.h>
|
||||
#include <asm/arch/mcbsp.h>
|
||||
#include <asm/arch/omap-alsa.h>
|
||||
|
||||
extern int omap_gpio_init(void);
|
||||
|
||||
static struct mtd_partition h2_partitions[] = {
|
||||
static int h2_keymap[] = {
|
||||
KEY(0, 0, KEY_LEFT),
|
||||
KEY(0, 1, KEY_RIGHT),
|
||||
KEY(0, 2, KEY_3),
|
||||
KEY(0, 3, KEY_F10),
|
||||
KEY(0, 4, KEY_F5),
|
||||
KEY(0, 5, KEY_9),
|
||||
KEY(1, 0, KEY_DOWN),
|
||||
KEY(1, 1, KEY_UP),
|
||||
KEY(1, 2, KEY_2),
|
||||
KEY(1, 3, KEY_F9),
|
||||
KEY(1, 4, KEY_F7),
|
||||
KEY(1, 5, KEY_0),
|
||||
KEY(2, 0, KEY_ENTER),
|
||||
KEY(2, 1, KEY_6),
|
||||
KEY(2, 2, KEY_1),
|
||||
KEY(2, 3, KEY_F2),
|
||||
KEY(2, 4, KEY_F6),
|
||||
KEY(2, 5, KEY_HOME),
|
||||
KEY(3, 0, KEY_8),
|
||||
KEY(3, 1, KEY_5),
|
||||
KEY(3, 2, KEY_F12),
|
||||
KEY(3, 3, KEY_F3),
|
||||
KEY(3, 4, KEY_F8),
|
||||
KEY(3, 5, KEY_END),
|
||||
KEY(4, 0, KEY_7),
|
||||
KEY(4, 1, KEY_4),
|
||||
KEY(4, 2, KEY_F11),
|
||||
KEY(4, 3, KEY_F1),
|
||||
KEY(4, 4, KEY_F4),
|
||||
KEY(4, 5, KEY_ESC),
|
||||
KEY(5, 0, KEY_F13),
|
||||
KEY(5, 1, KEY_F14),
|
||||
KEY(5, 2, KEY_F15),
|
||||
KEY(5, 3, KEY_F16),
|
||||
KEY(5, 4, KEY_SLEEP),
|
||||
0
|
||||
};
|
||||
|
||||
static struct mtd_partition h2_nor_partitions[] = {
|
||||
/* bootloader (U-Boot, etc) in first sector */
|
||||
{
|
||||
.name = "bootloader",
|
||||
|
@ -71,26 +116,26 @@ static struct mtd_partition h2_partitions[] = {
|
|||
}
|
||||
};
|
||||
|
||||
static struct flash_platform_data h2_flash_data = {
|
||||
static struct flash_platform_data h2_nor_data = {
|
||||
.map_name = "cfi_probe",
|
||||
.width = 2,
|
||||
.parts = h2_partitions,
|
||||
.nr_parts = ARRAY_SIZE(h2_partitions),
|
||||
.parts = h2_nor_partitions,
|
||||
.nr_parts = ARRAY_SIZE(h2_nor_partitions),
|
||||
};
|
||||
|
||||
static struct resource h2_flash_resource = {
|
||||
static struct resource h2_nor_resource = {
|
||||
/* This is on CS3, wherever it's mapped */
|
||||
.flags = IORESOURCE_MEM,
|
||||
};
|
||||
|
||||
static struct platform_device h2_flash_device = {
|
||||
static struct platform_device h2_nor_device = {
|
||||
.name = "omapflash",
|
||||
.id = 0,
|
||||
.dev = {
|
||||
.platform_data = &h2_flash_data,
|
||||
.platform_data = &h2_nor_data,
|
||||
},
|
||||
.num_resources = 1,
|
||||
.resource = &h2_flash_resource,
|
||||
.resource = &h2_nor_resource,
|
||||
};
|
||||
|
||||
static struct resource h2_smc91x_resources[] = {
|
||||
|
@ -113,9 +158,119 @@ static struct platform_device h2_smc91x_device = {
|
|||
.resource = h2_smc91x_resources,
|
||||
};
|
||||
|
||||
static struct resource h2_kp_resources[] = {
|
||||
[0] = {
|
||||
.start = INT_KEYBOARD,
|
||||
.end = INT_KEYBOARD,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
};
|
||||
|
||||
static struct omap_kp_platform_data h2_kp_data = {
|
||||
.rows = 8,
|
||||
.cols = 8,
|
||||
.keymap = h2_keymap,
|
||||
.rep = 1,
|
||||
};
|
||||
|
||||
static struct platform_device h2_kp_device = {
|
||||
.name = "omap-keypad",
|
||||
.id = -1,
|
||||
.dev = {
|
||||
.platform_data = &h2_kp_data,
|
||||
},
|
||||
.num_resources = ARRAY_SIZE(h2_kp_resources),
|
||||
.resource = h2_kp_resources,
|
||||
};
|
||||
|
||||
#define H2_IRDA_FIRSEL_GPIO_PIN 17
|
||||
|
||||
#if defined(CONFIG_OMAP_IR) || defined(CONFIG_OMAP_IR_MODULE)
|
||||
static int h2_transceiver_mode(struct device *dev, int state)
|
||||
{
|
||||
if (state & IR_SIRMODE)
|
||||
omap_set_gpio_dataout(H2_IRDA_FIRSEL_GPIO_PIN, 0);
|
||||
else /* MIR/FIR */
|
||||
omap_set_gpio_dataout(H2_IRDA_FIRSEL_GPIO_PIN, 1);
|
||||
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
static struct omap_irda_config h2_irda_data = {
|
||||
.transceiver_cap = IR_SIRMODE | IR_MIRMODE | IR_FIRMODE,
|
||||
.rx_channel = OMAP_DMA_UART3_RX,
|
||||
.tx_channel = OMAP_DMA_UART3_TX,
|
||||
.dest_start = UART3_THR,
|
||||
.src_start = UART3_RHR,
|
||||
.tx_trigger = 0,
|
||||
.rx_trigger = 0,
|
||||
};
|
||||
|
||||
static struct resource h2_irda_resources[] = {
|
||||
[0] = {
|
||||
.start = INT_UART3,
|
||||
.end = INT_UART3,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
};
|
||||
static struct platform_device h2_irda_device = {
|
||||
.name = "omapirda",
|
||||
.id = 0,
|
||||
.dev = {
|
||||
.platform_data = &h2_irda_data,
|
||||
},
|
||||
.num_resources = ARRAY_SIZE(h2_irda_resources),
|
||||
.resource = h2_irda_resources,
|
||||
};
|
||||
|
||||
static struct platform_device h2_lcd_device = {
|
||||
.name = "lcd_h2",
|
||||
.id = -1,
|
||||
};
|
||||
|
||||
static struct omap_mcbsp_reg_cfg mcbsp_regs = {
|
||||
.spcr2 = FREE | FRST | GRST | XRST | XINTM(3),
|
||||
.spcr1 = RINTM(3) | RRST,
|
||||
.rcr2 = RPHASE | RFRLEN2(OMAP_MCBSP_WORD_8) |
|
||||
RWDLEN2(OMAP_MCBSP_WORD_16) | RDATDLY(1),
|
||||
.rcr1 = RFRLEN1(OMAP_MCBSP_WORD_8) | RWDLEN1(OMAP_MCBSP_WORD_16),
|
||||
.xcr2 = XPHASE | XFRLEN2(OMAP_MCBSP_WORD_8) |
|
||||
XWDLEN2(OMAP_MCBSP_WORD_16) | XDATDLY(1) | XFIG,
|
||||
.xcr1 = XFRLEN1(OMAP_MCBSP_WORD_8) | XWDLEN1(OMAP_MCBSP_WORD_16),
|
||||
.srgr1 = FWID(15),
|
||||
.srgr2 = GSYNC | CLKSP | FSGM | FPER(31),
|
||||
|
||||
.pcr0 = CLKXM | CLKRM | FSXP | FSRP | CLKXP | CLKRP,
|
||||
//.pcr0 = CLKXP | CLKRP, /* mcbsp: slave */
|
||||
};
|
||||
|
||||
static struct omap_alsa_codec_config alsa_config = {
|
||||
.name = "H2 TSC2101",
|
||||
.mcbsp_regs_alsa = &mcbsp_regs,
|
||||
.codec_configure_dev = NULL, // tsc2101_configure,
|
||||
.codec_set_samplerate = NULL, // tsc2101_set_samplerate,
|
||||
.codec_clock_setup = NULL, // tsc2101_clock_setup,
|
||||
.codec_clock_on = NULL, // tsc2101_clock_on,
|
||||
.codec_clock_off = NULL, // tsc2101_clock_off,
|
||||
.get_default_samplerate = NULL, // tsc2101_get_default_samplerate,
|
||||
};
|
||||
|
||||
static struct platform_device h2_mcbsp1_device = {
|
||||
.name = "omap_alsa_mcbsp",
|
||||
.id = 1,
|
||||
.dev = {
|
||||
.platform_data = &alsa_config,
|
||||
},
|
||||
};
|
||||
|
||||
static struct platform_device *h2_devices[] __initdata = {
|
||||
&h2_flash_device,
|
||||
&h2_nor_device,
|
||||
&h2_smc91x_device,
|
||||
&h2_irda_device,
|
||||
&h2_kp_device,
|
||||
&h2_lcd_device,
|
||||
&h2_mcbsp1_device,
|
||||
};
|
||||
|
||||
static void __init h2_init_smc91x(void)
|
||||
|
@ -164,7 +319,6 @@ static struct omap_uart_config h2_uart_config __initdata = {
|
|||
};
|
||||
|
||||
static struct omap_lcd_config h2_lcd_config __initdata = {
|
||||
.panel_name = "h2",
|
||||
.ctrl_name = "internal",
|
||||
};
|
||||
|
||||
|
@ -177,16 +331,34 @@ static struct omap_board_config_kernel h2_config[] = {
|
|||
|
||||
static void __init h2_init(void)
|
||||
{
|
||||
/* NOTE: revC boards support NAND-boot, which can put NOR on CS2B
|
||||
* and NAND (either 16bit or 8bit) on CS3.
|
||||
/* Here we assume the NOR boot config: NOR on CS3 (possibly swapped
|
||||
* to address 0 by a dip switch), NAND on CS2B. The NAND driver will
|
||||
* notice whether a NAND chip is enabled at probe time.
|
||||
*
|
||||
* FIXME revC boards (and H3) support NAND-boot, with a dip switch to
|
||||
* put NOR on CS2B and NAND (which on H2 may be 16bit) on CS3. Try
|
||||
* detecting that in code here, to avoid probing every possible flash
|
||||
* configuration...
|
||||
*/
|
||||
h2_flash_resource.end = h2_flash_resource.start = omap_cs3_phys();
|
||||
h2_flash_resource.end += SZ_32M - 1;
|
||||
h2_nor_resource.end = h2_nor_resource.start = omap_cs3_phys();
|
||||
h2_nor_resource.end += SZ_32M - 1;
|
||||
|
||||
omap_cfg_reg(L3_1610_FLASH_CS2B_OE);
|
||||
omap_cfg_reg(M8_1610_FLASH_CS2B_WE);
|
||||
|
||||
/* MMC: card detect and WP */
|
||||
// omap_cfg_reg(U19_ARMIO1); /* CD */
|
||||
omap_cfg_reg(BALLOUT_V8_ARMIO3); /* WP */
|
||||
|
||||
/* Irda */
|
||||
#if defined(CONFIG_OMAP_IR) || defined(CONFIG_OMAP_IR_MODULE)
|
||||
omap_writel(omap_readl(FUNC_MUX_CTRL_A) | 7, FUNC_MUX_CTRL_A);
|
||||
if (!(omap_request_gpio(H2_IRDA_FIRSEL_GPIO_PIN))) {
|
||||
omap_set_gpio_direction(H2_IRDA_FIRSEL_GPIO_PIN, 0);
|
||||
h2_irda_data.transceiver_mode = h2_transceiver_mode;
|
||||
}
|
||||
#endif
|
||||
|
||||
platform_add_devices(h2_devices, ARRAY_SIZE(h2_devices));
|
||||
omap_board_config = h2_config;
|
||||
omap_board_config_size = ARRAY_SIZE(h2_config);
|
||||
|
|
|
@ -21,8 +21,11 @@
|
|||
#include <linux/kernel.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/errno.h>
|
||||
#include <linux/workqueue.h>
|
||||
#include <linux/mtd/mtd.h>
|
||||
#include <linux/mtd/nand.h>
|
||||
#include <linux/mtd/partitions.h>
|
||||
#include <linux/input.h>
|
||||
|
||||
#include <asm/setup.h>
|
||||
#include <asm/page.h>
|
||||
|
@ -33,15 +36,59 @@
|
|||
#include <asm/mach/map.h>
|
||||
|
||||
#include <asm/arch/gpio.h>
|
||||
#include <asm/arch/gpioexpander.h>
|
||||
#include <asm/arch/irqs.h>
|
||||
#include <asm/arch/mux.h>
|
||||
#include <asm/arch/tc.h>
|
||||
#include <asm/arch/irda.h>
|
||||
#include <asm/arch/usb.h>
|
||||
#include <asm/arch/keypad.h>
|
||||
#include <asm/arch/dma.h>
|
||||
#include <asm/arch/common.h>
|
||||
|
||||
extern int omap_gpio_init(void);
|
||||
|
||||
static struct mtd_partition h3_partitions[] = {
|
||||
static int h3_keymap[] = {
|
||||
KEY(0, 0, KEY_LEFT),
|
||||
KEY(0, 1, KEY_RIGHT),
|
||||
KEY(0, 2, KEY_3),
|
||||
KEY(0, 3, KEY_F10),
|
||||
KEY(0, 4, KEY_F5),
|
||||
KEY(0, 5, KEY_9),
|
||||
KEY(1, 0, KEY_DOWN),
|
||||
KEY(1, 1, KEY_UP),
|
||||
KEY(1, 2, KEY_2),
|
||||
KEY(1, 3, KEY_F9),
|
||||
KEY(1, 4, KEY_F7),
|
||||
KEY(1, 5, KEY_0),
|
||||
KEY(2, 0, KEY_ENTER),
|
||||
KEY(2, 1, KEY_6),
|
||||
KEY(2, 2, KEY_1),
|
||||
KEY(2, 3, KEY_F2),
|
||||
KEY(2, 4, KEY_F6),
|
||||
KEY(2, 5, KEY_HOME),
|
||||
KEY(3, 0, KEY_8),
|
||||
KEY(3, 1, KEY_5),
|
||||
KEY(3, 2, KEY_F12),
|
||||
KEY(3, 3, KEY_F3),
|
||||
KEY(3, 4, KEY_F8),
|
||||
KEY(3, 5, KEY_END),
|
||||
KEY(4, 0, KEY_7),
|
||||
KEY(4, 1, KEY_4),
|
||||
KEY(4, 2, KEY_F11),
|
||||
KEY(4, 3, KEY_F1),
|
||||
KEY(4, 4, KEY_F4),
|
||||
KEY(4, 5, KEY_ESC),
|
||||
KEY(5, 0, KEY_F13),
|
||||
KEY(5, 1, KEY_F14),
|
||||
KEY(5, 2, KEY_F15),
|
||||
KEY(5, 3, KEY_F16),
|
||||
KEY(5, 4, KEY_SLEEP),
|
||||
0
|
||||
};
|
||||
|
||||
|
||||
static struct mtd_partition nor_partitions[] = {
|
||||
/* bootloader (U-Boot, etc) in first sector */
|
||||
{
|
||||
.name = "bootloader",
|
||||
|
@ -72,26 +119,80 @@ static struct mtd_partition h3_partitions[] = {
|
|||
}
|
||||
};
|
||||
|
||||
static struct flash_platform_data h3_flash_data = {
|
||||
static struct flash_platform_data nor_data = {
|
||||
.map_name = "cfi_probe",
|
||||
.width = 2,
|
||||
.parts = h3_partitions,
|
||||
.nr_parts = ARRAY_SIZE(h3_partitions),
|
||||
.parts = nor_partitions,
|
||||
.nr_parts = ARRAY_SIZE(nor_partitions),
|
||||
};
|
||||
|
||||
static struct resource h3_flash_resource = {
|
||||
static struct resource nor_resource = {
|
||||
/* This is on CS3, wherever it's mapped */
|
||||
.flags = IORESOURCE_MEM,
|
||||
};
|
||||
|
||||
static struct platform_device flash_device = {
|
||||
static struct platform_device nor_device = {
|
||||
.name = "omapflash",
|
||||
.id = 0,
|
||||
.dev = {
|
||||
.platform_data = &h3_flash_data,
|
||||
.platform_data = &nor_data,
|
||||
},
|
||||
.num_resources = 1,
|
||||
.resource = &h3_flash_resource,
|
||||
.resource = &nor_resource,
|
||||
};
|
||||
|
||||
static struct mtd_partition nand_partitions[] = {
|
||||
#if 0
|
||||
/* REVISIT: enable these partitions if you make NAND BOOT work */
|
||||
{
|
||||
.name = "xloader",
|
||||
.offset = 0,
|
||||
.size = 64 * 1024,
|
||||
.mask_flags = MTD_WRITEABLE, /* force read-only */
|
||||
},
|
||||
{
|
||||
.name = "bootloader",
|
||||
.offset = MTDPART_OFS_APPEND,
|
||||
.size = 256 * 1024,
|
||||
.mask_flags = MTD_WRITEABLE, /* force read-only */
|
||||
},
|
||||
{
|
||||
.name = "params",
|
||||
.offset = MTDPART_OFS_APPEND,
|
||||
.size = 192 * 1024,
|
||||
},
|
||||
{
|
||||
.name = "kernel",
|
||||
.offset = MTDPART_OFS_APPEND,
|
||||
.size = 2 * SZ_1M,
|
||||
},
|
||||
#endif
|
||||
{
|
||||
.name = "filesystem",
|
||||
.size = MTDPART_SIZ_FULL,
|
||||
.offset = MTDPART_OFS_APPEND,
|
||||
},
|
||||
};
|
||||
|
||||
/* dip switches control NAND chip access: 8 bit, 16 bit, or neither */
|
||||
static struct nand_platform_data nand_data = {
|
||||
.options = NAND_SAMSUNG_LP_OPTIONS,
|
||||
.parts = nand_partitions,
|
||||
.nr_parts = ARRAY_SIZE(nand_partitions),
|
||||
};
|
||||
|
||||
static struct resource nand_resource = {
|
||||
.flags = IORESOURCE_MEM,
|
||||
};
|
||||
|
||||
static struct platform_device nand_device = {
|
||||
.name = "omapnand",
|
||||
.id = 0,
|
||||
.dev = {
|
||||
.platform_data = &nand_data,
|
||||
},
|
||||
.num_resources = 1,
|
||||
.resource = &nand_resource,
|
||||
};
|
||||
|
||||
static struct resource smc91x_resources[] = {
|
||||
|
@ -138,10 +239,136 @@ static struct platform_device intlat_device = {
|
|||
.resource = intlat_resources,
|
||||
};
|
||||
|
||||
static struct resource h3_kp_resources[] = {
|
||||
[0] = {
|
||||
.start = INT_KEYBOARD,
|
||||
.end = INT_KEYBOARD,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
};
|
||||
|
||||
static struct omap_kp_platform_data h3_kp_data = {
|
||||
.rows = 8,
|
||||
.cols = 8,
|
||||
.keymap = h3_keymap,
|
||||
.rep = 1,
|
||||
};
|
||||
|
||||
static struct platform_device h3_kp_device = {
|
||||
.name = "omap-keypad",
|
||||
.id = -1,
|
||||
.dev = {
|
||||
.platform_data = &h3_kp_data,
|
||||
},
|
||||
.num_resources = ARRAY_SIZE(h3_kp_resources),
|
||||
.resource = h3_kp_resources,
|
||||
};
|
||||
|
||||
|
||||
/* Select between the IrDA and aGPS module
|
||||
*/
|
||||
static int h3_select_irda(struct device *dev, int state)
|
||||
{
|
||||
unsigned char expa;
|
||||
int err = 0;
|
||||
|
||||
if ((err = read_gpio_expa(&expa, 0x26))) {
|
||||
printk(KERN_ERR "Error reading from I/O EXPANDER \n");
|
||||
return err;
|
||||
}
|
||||
|
||||
/* 'P6' enable/disable IRDA_TX and IRDA_RX */
|
||||
if (state & IR_SEL) { /* IrDA */
|
||||
if ((err = write_gpio_expa(expa | 0x40, 0x26))) {
|
||||
printk(KERN_ERR "Error writing to I/O EXPANDER \n");
|
||||
return err;
|
||||
}
|
||||
} else {
|
||||
if ((err = write_gpio_expa(expa & ~0x40, 0x26))) {
|
||||
printk(KERN_ERR "Error writing to I/O EXPANDER \n");
|
||||
return err;
|
||||
}
|
||||
}
|
||||
return err;
|
||||
}
|
||||
|
||||
static void set_trans_mode(void *data)
|
||||
{
|
||||
int *mode = data;
|
||||
unsigned char expa;
|
||||
int err = 0;
|
||||
|
||||
if ((err = read_gpio_expa(&expa, 0x27)) != 0) {
|
||||
printk(KERN_ERR "Error reading from I/O expander\n");
|
||||
}
|
||||
|
||||
expa &= ~0x03;
|
||||
|
||||
if (*mode & IR_SIRMODE) {
|
||||
expa |= 0x01;
|
||||
} else { /* MIR/FIR */
|
||||
expa |= 0x03;
|
||||
}
|
||||
|
||||
if ((err = write_gpio_expa(expa, 0x27)) != 0) {
|
||||
printk(KERN_ERR "Error writing to I/O expander\n");
|
||||
}
|
||||
}
|
||||
|
||||
static int h3_transceiver_mode(struct device *dev, int mode)
|
||||
{
|
||||
struct omap_irda_config *irda_config = dev->platform_data;
|
||||
|
||||
cancel_delayed_work(&irda_config->gpio_expa);
|
||||
PREPARE_WORK(&irda_config->gpio_expa, set_trans_mode, &mode);
|
||||
schedule_work(&irda_config->gpio_expa);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct omap_irda_config h3_irda_data = {
|
||||
.transceiver_cap = IR_SIRMODE | IR_MIRMODE | IR_FIRMODE,
|
||||
.transceiver_mode = h3_transceiver_mode,
|
||||
.select_irda = h3_select_irda,
|
||||
.rx_channel = OMAP_DMA_UART3_RX,
|
||||
.tx_channel = OMAP_DMA_UART3_TX,
|
||||
.dest_start = UART3_THR,
|
||||
.src_start = UART3_RHR,
|
||||
.tx_trigger = 0,
|
||||
.rx_trigger = 0,
|
||||
};
|
||||
|
||||
static struct resource h3_irda_resources[] = {
|
||||
[0] = {
|
||||
.start = INT_UART3,
|
||||
.end = INT_UART3,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
};
|
||||
|
||||
static struct platform_device h3_irda_device = {
|
||||
.name = "omapirda",
|
||||
.id = 0,
|
||||
.dev = {
|
||||
.platform_data = &h3_irda_data,
|
||||
},
|
||||
.num_resources = ARRAY_SIZE(h3_irda_resources),
|
||||
.resource = h3_irda_resources,
|
||||
};
|
||||
|
||||
static struct platform_device h3_lcd_device = {
|
||||
.name = "lcd_h3",
|
||||
.id = -1,
|
||||
};
|
||||
|
||||
static struct platform_device *devices[] __initdata = {
|
||||
&flash_device,
|
||||
&nor_device,
|
||||
&nand_device,
|
||||
&smc91x_device,
|
||||
&intlat_device,
|
||||
&h3_irda_device,
|
||||
&h3_kp_device,
|
||||
&h3_lcd_device,
|
||||
};
|
||||
|
||||
static struct omap_usb_config h3_usb_config __initdata = {
|
||||
|
@ -171,7 +398,6 @@ static struct omap_uart_config h3_uart_config __initdata = {
|
|||
};
|
||||
|
||||
static struct omap_lcd_config h3_lcd_config __initdata = {
|
||||
.panel_name = "h3",
|
||||
.ctrl_name = "internal",
|
||||
};
|
||||
|
||||
|
@ -182,11 +408,36 @@ static struct omap_board_config_kernel h3_config[] = {
|
|||
{ OMAP_TAG_LCD, &h3_lcd_config },
|
||||
};
|
||||
|
||||
#define H3_NAND_RB_GPIO_PIN 10
|
||||
|
||||
static int nand_dev_ready(struct nand_platform_data *data)
|
||||
{
|
||||
return omap_get_gpio_datain(H3_NAND_RB_GPIO_PIN);
|
||||
}
|
||||
|
||||
static void __init h3_init(void)
|
||||
{
|
||||
h3_flash_resource.end = h3_flash_resource.start = omap_cs3_phys();
|
||||
h3_flash_resource.end += OMAP_CS3_SIZE - 1;
|
||||
(void) platform_add_devices(devices, ARRAY_SIZE(devices));
|
||||
/* Here we assume the NOR boot config: NOR on CS3 (possibly swapped
|
||||
* to address 0 by a dip switch), NAND on CS2B. The NAND driver will
|
||||
* notice whether a NAND chip is enabled at probe time.
|
||||
*
|
||||
* H3 support NAND-boot, with a dip switch to put NOR on CS2B and NAND
|
||||
* (which on H2 may be 16bit) on CS3. Try detecting that in code here,
|
||||
* to avoid probing every possible flash configuration...
|
||||
*/
|
||||
nor_resource.end = nor_resource.start = omap_cs3_phys();
|
||||
nor_resource.end += SZ_32M - 1;
|
||||
|
||||
nand_resource.end = nand_resource.start = OMAP_CS2B_PHYS;
|
||||
nand_resource.end += SZ_4K - 1;
|
||||
if (!(omap_request_gpio(H3_NAND_RB_GPIO_PIN)))
|
||||
nand_data.dev_ready = nand_dev_ready;
|
||||
|
||||
/* GPIO10 Func_MUX_CTRL reg bit 29:27, Configure V2 to mode1 as GPIO */
|
||||
/* GPIO10 pullup/down register, Enable pullup on GPIO10 */
|
||||
omap_cfg_reg(V2_1710_GPIO10);
|
||||
|
||||
platform_add_devices(devices, ARRAY_SIZE(devices));
|
||||
omap_board_config = h3_config;
|
||||
omap_board_config_size = ARRAY_SIZE(h3_config);
|
||||
omap_serial_init();
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
#include <linux/delay.h>
|
||||
#include <linux/mtd/mtd.h>
|
||||
#include <linux/mtd/partitions.h>
|
||||
#include <linux/input.h>
|
||||
|
||||
#include <asm/hardware.h>
|
||||
#include <asm/mach-types.h>
|
||||
|
@ -34,8 +35,22 @@
|
|||
#include <asm/arch/gpio.h>
|
||||
#include <asm/arch/tc.h>
|
||||
#include <asm/arch/usb.h>
|
||||
#include <asm/arch/keypad.h>
|
||||
#include <asm/arch/common.h>
|
||||
|
||||
static int innovator_keymap[] = {
|
||||
KEY(0, 0, KEY_F1),
|
||||
KEY(0, 3, KEY_DOWN),
|
||||
KEY(1, 1, KEY_F2),
|
||||
KEY(1, 2, KEY_RIGHT),
|
||||
KEY(2, 0, KEY_F3),
|
||||
KEY(2, 1, KEY_F4),
|
||||
KEY(2, 2, KEY_UP),
|
||||
KEY(3, 2, KEY_ENTER),
|
||||
KEY(3, 3, KEY_LEFT),
|
||||
0
|
||||
};
|
||||
|
||||
static struct mtd_partition innovator_partitions[] = {
|
||||
/* bootloader (U-Boot, etc) in first sector */
|
||||
{
|
||||
|
@ -97,6 +112,31 @@ static struct platform_device innovator_flash_device = {
|
|||
.resource = &innovator_flash_resource,
|
||||
};
|
||||
|
||||
static struct resource innovator_kp_resources[] = {
|
||||
[0] = {
|
||||
.start = INT_KEYBOARD,
|
||||
.end = INT_KEYBOARD,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
};
|
||||
|
||||
static struct omap_kp_platform_data innovator_kp_data = {
|
||||
.rows = 8,
|
||||
.cols = 8,
|
||||
.keymap = innovator_keymap,
|
||||
};
|
||||
|
||||
static struct platform_device innovator_kp_device = {
|
||||
.name = "omap-keypad",
|
||||
.id = -1,
|
||||
.dev = {
|
||||
.platform_data = &innovator_kp_data,
|
||||
},
|
||||
.num_resources = ARRAY_SIZE(innovator_kp_resources),
|
||||
.resource = innovator_kp_resources,
|
||||
};
|
||||
|
||||
|
||||
#ifdef CONFIG_ARCH_OMAP15XX
|
||||
|
||||
/* Only FPGA needs to be mapped here. All others are done with ioremap */
|
||||
|
@ -129,9 +169,16 @@ static struct platform_device innovator1510_smc91x_device = {
|
|||
.resource = innovator1510_smc91x_resources,
|
||||
};
|
||||
|
||||
static struct platform_device innovator1510_lcd_device = {
|
||||
.name = "lcd_inn1510",
|
||||
.id = -1,
|
||||
};
|
||||
|
||||
static struct platform_device *innovator1510_devices[] __initdata = {
|
||||
&innovator_flash_device,
|
||||
&innovator1510_smc91x_device,
|
||||
&innovator_kp_device,
|
||||
&innovator1510_lcd_device,
|
||||
};
|
||||
|
||||
#endif /* CONFIG_ARCH_OMAP15XX */
|
||||
|
@ -158,9 +205,16 @@ static struct platform_device innovator1610_smc91x_device = {
|
|||
.resource = innovator1610_smc91x_resources,
|
||||
};
|
||||
|
||||
static struct platform_device innovator1610_lcd_device = {
|
||||
.name = "inn1610_lcd",
|
||||
.id = -1,
|
||||
};
|
||||
|
||||
static struct platform_device *innovator1610_devices[] __initdata = {
|
||||
&innovator_flash_device,
|
||||
&innovator1610_smc91x_device,
|
||||
&innovator_kp_device,
|
||||
&innovator1610_lcd_device,
|
||||
};
|
||||
|
||||
#endif /* CONFIG_ARCH_OMAP16XX */
|
||||
|
@ -206,7 +260,6 @@ static struct omap_usb_config innovator1510_usb_config __initdata = {
|
|||
};
|
||||
|
||||
static struct omap_lcd_config innovator1510_lcd_config __initdata = {
|
||||
.panel_name = "inn1510",
|
||||
.ctrl_name = "internal",
|
||||
};
|
||||
#endif
|
||||
|
@ -228,7 +281,6 @@ static struct omap_usb_config h2_usb_config __initdata = {
|
|||
};
|
||||
|
||||
static struct omap_lcd_config innovator1610_lcd_config __initdata = {
|
||||
.panel_name = "inn1610",
|
||||
.ctrl_name = "internal",
|
||||
};
|
||||
#endif
|
||||
|
|
|
@ -1,160 +0,0 @@
|
|||
/*
|
||||
* Modified from board-generic.c
|
||||
*
|
||||
* Copyright (C) 2004 2N Telekomunikace, Ladislav Michl <michl@2n.cz>
|
||||
*
|
||||
* Code for Netstar OMAP board.
|
||||
*
|
||||
* 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/delay.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/interrupt.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/notifier.h>
|
||||
#include <linux/reboot.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/common.h>
|
||||
|
||||
extern void __init omap_init_time(void);
|
||||
extern int omap_gpio_init(void);
|
||||
|
||||
static struct resource netstar_smc91x_resources[] = {
|
||||
[0] = {
|
||||
.start = OMAP_CS1_PHYS + 0x300,
|
||||
.end = OMAP_CS1_PHYS + 0x300 + 16,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
[1] = {
|
||||
.start = OMAP_GPIO_IRQ(8),
|
||||
.end = OMAP_GPIO_IRQ(8),
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
};
|
||||
|
||||
static struct platform_device netstar_smc91x_device = {
|
||||
.name = "smc91x",
|
||||
.id = 0,
|
||||
.num_resources = ARRAY_SIZE(netstar_smc91x_resources),
|
||||
.resource = netstar_smc91x_resources,
|
||||
};
|
||||
|
||||
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)
|
||||
{
|
||||
omap1_init_common_hw();
|
||||
omap_init_irq();
|
||||
omap_gpio_init();
|
||||
}
|
||||
|
||||
static void __init netstar_init(void)
|
||||
{
|
||||
/* green LED */
|
||||
omap_request_gpio(4);
|
||||
omap_set_gpio_direction(4, 0);
|
||||
/* smc91x reset */
|
||||
omap_request_gpio(7);
|
||||
omap_set_gpio_direction(7, 0);
|
||||
omap_set_gpio_dataout(7, 1);
|
||||
udelay(2); /* wait at least 100ns */
|
||||
omap_set_gpio_dataout(7, 0);
|
||||
mdelay(50); /* 50ms until PHY ready */
|
||||
/* smc91x interrupt pin */
|
||||
omap_request_gpio(8);
|
||||
|
||||
omap_request_gpio(12);
|
||||
omap_request_gpio(13);
|
||||
omap_request_gpio(14);
|
||||
omap_request_gpio(15);
|
||||
set_irq_type(OMAP_GPIO_IRQ(12), IRQT_FALLING);
|
||||
set_irq_type(OMAP_GPIO_IRQ(13), IRQT_FALLING);
|
||||
set_irq_type(OMAP_GPIO_IRQ(14), IRQT_FALLING);
|
||||
set_irq_type(OMAP_GPIO_IRQ(15), IRQT_FALLING);
|
||||
|
||||
platform_add_devices(netstar_devices, ARRAY_SIZE(netstar_devices));
|
||||
|
||||
/* Switch on green LED */
|
||||
omap_set_gpio_dataout(4, 0);
|
||||
/* Switch off red LED */
|
||||
omap_writeb(0x00, OMAP_LPG1_PMR); /* Disable clock */
|
||||
omap_writeb(0x80, OMAP_LPG1_LCR);
|
||||
|
||||
omap_board_config = netstar_config;
|
||||
omap_board_config_size = ARRAY_SIZE(netstar_config);
|
||||
omap_serial_init();
|
||||
}
|
||||
|
||||
static void __init netstar_map_io(void)
|
||||
{
|
||||
omap1_map_common_io();
|
||||
}
|
||||
|
||||
#define MACHINE_PANICED 1
|
||||
#define MACHINE_REBOOTING 2
|
||||
#define MACHINE_REBOOT 4
|
||||
static unsigned long machine_state;
|
||||
|
||||
static int panic_event(struct notifier_block *this, unsigned long event,
|
||||
void *ptr)
|
||||
{
|
||||
if (test_and_set_bit(MACHINE_PANICED, &machine_state))
|
||||
return NOTIFY_DONE;
|
||||
|
||||
/* Switch off green LED */
|
||||
omap_set_gpio_dataout(4, 1);
|
||||
/* Flash red LED */
|
||||
omap_writeb(0x78, OMAP_LPG1_LCR);
|
||||
omap_writeb(0x01, OMAP_LPG1_PMR); /* Enable clock */
|
||||
|
||||
return NOTIFY_DONE;
|
||||
}
|
||||
|
||||
static struct notifier_block panic_block = {
|
||||
.notifier_call = panic_event,
|
||||
};
|
||||
|
||||
static int __init netstar_late_init(void)
|
||||
{
|
||||
/* TODO: Setup front panel switch here */
|
||||
|
||||
/* Setup panic notifier */
|
||||
atomic_notifier_chain_register(&panic_notifier_list, &panic_block);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
postcore_initcall(netstar_late_init);
|
||||
|
||||
MACHINE_START(NETSTAR, "NetStar OMAP5910")
|
||||
/* Maintainer: Ladislav Michl <michl@2n.cz> */
|
||||
.phys_io = 0xfff00000,
|
||||
.io_pg_offst = ((0xfef00000) >> 18) & 0xfffc,
|
||||
.boot_params = 0x10000100,
|
||||
.map_io = netstar_map_io,
|
||||
.init_irq = netstar_init_irq,
|
||||
.init_machine = netstar_init,
|
||||
.timer = &omap_timer,
|
||||
MACHINE_END
|
|
@ -0,0 +1,268 @@
|
|||
/*
|
||||
* linux/arch/arm/mach-omap1/board-nokia770.c
|
||||
*
|
||||
* Modified from board-generic.c
|
||||
*
|
||||
* 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/input.h>
|
||||
#include <linux/clk.h>
|
||||
|
||||
#include <linux/spi/spi.h>
|
||||
#include <linux/spi/ads7846.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/keypad.h>
|
||||
#include <asm/arch/common.h>
|
||||
#include <asm/arch/dsp_common.h>
|
||||
#include <asm/arch/aic23.h>
|
||||
#include <asm/arch/gpio.h>
|
||||
|
||||
static void __init omap_nokia770_init_irq(void)
|
||||
{
|
||||
/* On Nokia 770, the SleepX signal is masked with an
|
||||
* MPUIO line by default. It has to be unmasked for it
|
||||
* to become functional */
|
||||
|
||||
/* SleepX mask direction */
|
||||
omap_writew((omap_readw(0xfffb5008) & ~2), 0xfffb5008);
|
||||
/* Unmask SleepX signal */
|
||||
omap_writew((omap_readw(0xfffb5004) & ~2), 0xfffb5004);
|
||||
|
||||
omap1_init_common_hw();
|
||||
omap_init_irq();
|
||||
}
|
||||
|
||||
static int nokia770_keymap[] = {
|
||||
KEY(0, 1, GROUP_0 | KEY_UP),
|
||||
KEY(0, 2, GROUP_1 | KEY_F5),
|
||||
KEY(1, 0, GROUP_0 | KEY_LEFT),
|
||||
KEY(1, 1, GROUP_0 | KEY_ENTER),
|
||||
KEY(1, 2, GROUP_0 | KEY_RIGHT),
|
||||
KEY(2, 0, GROUP_1 | KEY_ESC),
|
||||
KEY(2, 1, GROUP_0 | KEY_DOWN),
|
||||
KEY(2, 2, GROUP_1 | KEY_F4),
|
||||
KEY(3, 0, GROUP_2 | KEY_F7),
|
||||
KEY(3, 1, GROUP_2 | KEY_F8),
|
||||
KEY(3, 2, GROUP_2 | KEY_F6),
|
||||
0
|
||||
};
|
||||
|
||||
static struct resource nokia770_kp_resources[] = {
|
||||
[0] = {
|
||||
.start = INT_KEYBOARD,
|
||||
.end = INT_KEYBOARD,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
};
|
||||
|
||||
static struct omap_kp_platform_data nokia770_kp_data = {
|
||||
.rows = 8,
|
||||
.cols = 8,
|
||||
.keymap = nokia770_keymap
|
||||
};
|
||||
|
||||
static struct platform_device nokia770_kp_device = {
|
||||
.name = "omap-keypad",
|
||||
.id = -1,
|
||||
.dev = {
|
||||
.platform_data = &nokia770_kp_data,
|
||||
},
|
||||
.num_resources = ARRAY_SIZE(nokia770_kp_resources),
|
||||
.resource = nokia770_kp_resources,
|
||||
};
|
||||
|
||||
static struct platform_device *nokia770_devices[] __initdata = {
|
||||
&nokia770_kp_device,
|
||||
};
|
||||
|
||||
static struct ads7846_platform_data nokia770_ads7846_platform_data __initdata = {
|
||||
.x_max = 0x0fff,
|
||||
.y_max = 0x0fff,
|
||||
.x_plate_ohms = 180,
|
||||
.pressure_max = 255,
|
||||
.debounce_max = 10,
|
||||
.debounce_tol = 3,
|
||||
};
|
||||
|
||||
static struct spi_board_info nokia770_spi_board_info[] __initdata = {
|
||||
[0] = {
|
||||
.modalias = "lcd_lph8923",
|
||||
.bus_num = 2,
|
||||
.chip_select = 3,
|
||||
.max_speed_hz = 12000000,
|
||||
},
|
||||
[1] = {
|
||||
.modalias = "ads7846",
|
||||
.bus_num = 2,
|
||||
.chip_select = 0,
|
||||
.max_speed_hz = 2500000,
|
||||
.irq = OMAP_GPIO_IRQ(15),
|
||||
.platform_data = &nokia770_ads7846_platform_data,
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
/* assume no Mini-AB port */
|
||||
|
||||
static struct omap_usb_config nokia770_usb_config __initdata = {
|
||||
.otg = 1,
|
||||
.register_host = 1,
|
||||
.register_dev = 1,
|
||||
.hmc_mode = 16,
|
||||
.pins[0] = 6,
|
||||
};
|
||||
|
||||
static struct omap_mmc_config nokia770_mmc_config __initdata = {
|
||||
.mmc[0] = {
|
||||
.enabled = 0,
|
||||
.wire4 = 0,
|
||||
.wp_pin = -1,
|
||||
.power_pin = -1,
|
||||
.switch_pin = -1,
|
||||
},
|
||||
.mmc[1] = {
|
||||
.enabled = 0,
|
||||
.wire4 = 0,
|
||||
.wp_pin = -1,
|
||||
.power_pin = -1,
|
||||
.switch_pin = -1,
|
||||
},
|
||||
};
|
||||
|
||||
static struct omap_board_config_kernel nokia770_config[] = {
|
||||
{ OMAP_TAG_USB, NULL },
|
||||
{ OMAP_TAG_MMC, &nokia770_mmc_config },
|
||||
};
|
||||
|
||||
/*
|
||||
* audio power control
|
||||
*/
|
||||
#define HEADPHONE_GPIO 14
|
||||
#define AMPLIFIER_CTRL_GPIO 58
|
||||
|
||||
static struct clk *dspxor_ck;
|
||||
static DECLARE_MUTEX(audio_pwr_sem);
|
||||
/*
|
||||
* audio_pwr_state
|
||||
* +--+-------------------------+---------------------------------------+
|
||||
* |-1|down |power-up request -> 0 |
|
||||
* +--+-------------------------+---------------------------------------+
|
||||
* | 0|up |power-down(1) request -> 1 |
|
||||
* | | |power-down(2) request -> (ignore) |
|
||||
* +--+-------------------------+---------------------------------------+
|
||||
* | 1|up, |power-up request -> 0 |
|
||||
* | |received down(1) request |power-down(2) request -> -1 |
|
||||
* +--+-------------------------+---------------------------------------+
|
||||
*/
|
||||
static int audio_pwr_state = -1;
|
||||
|
||||
/*
|
||||
* audio_pwr_up / down should be called under audio_pwr_sem
|
||||
*/
|
||||
static void nokia770_audio_pwr_up(void)
|
||||
{
|
||||
clk_enable(dspxor_ck);
|
||||
|
||||
/* Turn on codec */
|
||||
tlv320aic23_power_up();
|
||||
|
||||
if (omap_get_gpio_datain(HEADPHONE_GPIO))
|
||||
/* HP not connected, turn on amplifier */
|
||||
omap_set_gpio_dataout(AMPLIFIER_CTRL_GPIO, 1);
|
||||
else
|
||||
/* HP connected, do not turn on amplifier */
|
||||
printk("HP connected\n");
|
||||
}
|
||||
|
||||
static void codec_delayed_power_down(void *arg)
|
||||
{
|
||||
down(&audio_pwr_sem);
|
||||
if (audio_pwr_state == -1)
|
||||
tlv320aic23_power_down();
|
||||
clk_disable(dspxor_ck);
|
||||
up(&audio_pwr_sem);
|
||||
}
|
||||
|
||||
static DECLARE_WORK(codec_power_down_work, codec_delayed_power_down, NULL);
|
||||
|
||||
static void nokia770_audio_pwr_down(void)
|
||||
{
|
||||
/* Turn off amplifier */
|
||||
omap_set_gpio_dataout(AMPLIFIER_CTRL_GPIO, 0);
|
||||
|
||||
/* Turn off codec: schedule delayed work */
|
||||
schedule_delayed_work(&codec_power_down_work, HZ / 20); /* 50ms */
|
||||
}
|
||||
|
||||
void nokia770_audio_pwr_up_request(int stage)
|
||||
{
|
||||
down(&audio_pwr_sem);
|
||||
if (audio_pwr_state == -1)
|
||||
nokia770_audio_pwr_up();
|
||||
/* force audio_pwr_state = 0, even if it was 1. */
|
||||
audio_pwr_state = 0;
|
||||
up(&audio_pwr_sem);
|
||||
}
|
||||
|
||||
void nokia770_audio_pwr_down_request(int stage)
|
||||
{
|
||||
down(&audio_pwr_sem);
|
||||
switch (stage) {
|
||||
case 1:
|
||||
if (audio_pwr_state == 0)
|
||||
audio_pwr_state = 1;
|
||||
break;
|
||||
case 2:
|
||||
if (audio_pwr_state == 1) {
|
||||
nokia770_audio_pwr_down();
|
||||
audio_pwr_state = -1;
|
||||
}
|
||||
break;
|
||||
}
|
||||
up(&audio_pwr_sem);
|
||||
}
|
||||
|
||||
static void __init omap_nokia770_init(void)
|
||||
{
|
||||
nokia770_config[0].data = &nokia770_usb_config;
|
||||
|
||||
platform_add_devices(nokia770_devices, ARRAY_SIZE(nokia770_devices));
|
||||
spi_register_board_info(nokia770_spi_board_info,
|
||||
ARRAY_SIZE(nokia770_spi_board_info));
|
||||
omap_board_config = nokia770_config;
|
||||
omap_board_config_size = ARRAY_SIZE(nokia770_config);
|
||||
omap_serial_init();
|
||||
omap_dsp_audio_pwr_up_request = nokia770_audio_pwr_up_request;
|
||||
omap_dsp_audio_pwr_down_request = nokia770_audio_pwr_down_request;
|
||||
dspxor_ck = clk_get(0, "dspxor_ck");
|
||||
}
|
||||
|
||||
static void __init omap_nokia770_map_io(void)
|
||||
{
|
||||
omap1_map_common_io();
|
||||
}
|
||||
|
||||
MACHINE_START(NOKIA770, "Nokia 770")
|
||||
.phys_io = 0xfff00000,
|
||||
.io_pg_offst = ((0xfef00000) >> 18) & 0xfffc,
|
||||
.boot_params = 0x10000100,
|
||||
.map_io = omap_nokia770_map_io,
|
||||
.init_irq = omap_nokia770_init_irq,
|
||||
.init_machine = omap_nokia770_init,
|
||||
.timer = &omap_timer,
|
||||
MACHINE_END
|
|
@ -33,6 +33,7 @@
|
|||
|
||||
#include <linux/mtd/mtd.h>
|
||||
#include <linux/mtd/partitions.h>
|
||||
#include <linux/input.h>
|
||||
|
||||
#include <asm/hardware.h>
|
||||
#include <asm/mach-types.h>
|
||||
|
@ -44,7 +45,24 @@
|
|||
#include <asm/arch/usb.h>
|
||||
#include <asm/arch/mux.h>
|
||||
#include <asm/arch/tc.h>
|
||||
#include <asm/arch/keypad.h>
|
||||
#include <asm/arch/common.h>
|
||||
#include <asm/arch/mcbsp.h>
|
||||
#include <asm/arch/omap-alsa.h>
|
||||
|
||||
static int osk_keymap[] = {
|
||||
KEY(0, 0, KEY_F1),
|
||||
KEY(0, 3, KEY_UP),
|
||||
KEY(1, 1, KEY_LEFTCTRL),
|
||||
KEY(1, 2, KEY_LEFT),
|
||||
KEY(2, 0, KEY_SPACE),
|
||||
KEY(2, 1, KEY_ESC),
|
||||
KEY(2, 2, KEY_DOWN),
|
||||
KEY(3, 2, KEY_ENTER),
|
||||
KEY(3, 3, KEY_RIGHT),
|
||||
0
|
||||
};
|
||||
|
||||
|
||||
static struct mtd_partition osk_partitions[] = {
|
||||
/* bootloader (U-Boot, etc) in first sector */
|
||||
|
@ -133,9 +151,69 @@ static struct platform_device osk5912_cf_device = {
|
|||
.resource = osk5912_cf_resources,
|
||||
};
|
||||
|
||||
#define DEFAULT_BITPERSAMPLE 16
|
||||
|
||||
static struct omap_mcbsp_reg_cfg mcbsp_regs = {
|
||||
.spcr2 = FREE | FRST | GRST | XRST | XINTM(3),
|
||||
.spcr1 = RINTM(3) | RRST,
|
||||
.rcr2 = RPHASE | RFRLEN2(OMAP_MCBSP_WORD_8) |
|
||||
RWDLEN2(OMAP_MCBSP_WORD_16) | RDATDLY(0),
|
||||
.rcr1 = RFRLEN1(OMAP_MCBSP_WORD_8) | RWDLEN1(OMAP_MCBSP_WORD_16),
|
||||
.xcr2 = XPHASE | XFRLEN2(OMAP_MCBSP_WORD_8) |
|
||||
XWDLEN2(OMAP_MCBSP_WORD_16) | XDATDLY(0) | XFIG,
|
||||
.xcr1 = XFRLEN1(OMAP_MCBSP_WORD_8) | XWDLEN1(OMAP_MCBSP_WORD_16),
|
||||
.srgr1 = FWID(DEFAULT_BITPERSAMPLE - 1),
|
||||
.srgr2 = GSYNC | CLKSP | FSGM | FPER(DEFAULT_BITPERSAMPLE * 2 - 1),
|
||||
/*.pcr0 = FSXM | FSRM | CLKXM | CLKRM | CLKXP | CLKRP,*/ /* mcbsp: master */
|
||||
.pcr0 = CLKXP | CLKRP, /* mcbsp: slave */
|
||||
};
|
||||
|
||||
static struct omap_alsa_codec_config alsa_config = {
|
||||
.name = "OSK AIC23",
|
||||
.mcbsp_regs_alsa = &mcbsp_regs,
|
||||
.codec_configure_dev = NULL, // aic23_configure,
|
||||
.codec_set_samplerate = NULL, // aic23_set_samplerate,
|
||||
.codec_clock_setup = NULL, // aic23_clock_setup,
|
||||
.codec_clock_on = NULL, // aic23_clock_on,
|
||||
.codec_clock_off = NULL, // aic23_clock_off,
|
||||
.get_default_samplerate = NULL, // aic23_get_default_samplerate,
|
||||
};
|
||||
|
||||
static struct platform_device osk5912_mcbsp1_device = {
|
||||
.name = "omap_mcbsp",
|
||||
.id = 1,
|
||||
.name = "omap_alsa_mcbsp",
|
||||
.id = 1,
|
||||
.dev = {
|
||||
.platform_data = &alsa_config,
|
||||
},
|
||||
};
|
||||
|
||||
static struct resource osk5912_kp_resources[] = {
|
||||
[0] = {
|
||||
.start = INT_KEYBOARD,
|
||||
.end = INT_KEYBOARD,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
};
|
||||
|
||||
static struct omap_kp_platform_data osk_kp_data = {
|
||||
.rows = 8,
|
||||
.cols = 8,
|
||||
.keymap = osk_keymap,
|
||||
};
|
||||
|
||||
static struct platform_device osk5912_kp_device = {
|
||||
.name = "omap-keypad",
|
||||
.id = -1,
|
||||
.dev = {
|
||||
.platform_data = &osk_kp_data,
|
||||
},
|
||||
.num_resources = ARRAY_SIZE(osk5912_kp_resources),
|
||||
.resource = osk5912_kp_resources,
|
||||
};
|
||||
|
||||
static struct platform_device osk5912_lcd_device = {
|
||||
.name = "lcd_osk",
|
||||
.id = -1,
|
||||
};
|
||||
|
||||
static struct platform_device *osk5912_devices[] __initdata = {
|
||||
|
@ -143,6 +221,8 @@ static struct platform_device *osk5912_devices[] __initdata = {
|
|||
&osk5912_smc91x_device,
|
||||
&osk5912_cf_device,
|
||||
&osk5912_mcbsp1_device,
|
||||
&osk5912_kp_device,
|
||||
&osk5912_lcd_device,
|
||||
};
|
||||
|
||||
static void __init osk_init_smc91x(void)
|
||||
|
@ -197,7 +277,6 @@ static struct omap_uart_config osk_uart_config __initdata = {
|
|||
};
|
||||
|
||||
static struct omap_lcd_config osk_lcd_config __initdata = {
|
||||
.panel_name = "osk",
|
||||
.ctrl_name = "internal",
|
||||
};
|
||||
|
||||
|
@ -255,8 +334,18 @@ static void __init osk_mistral_init(void)
|
|||
static void __init osk_mistral_init(void) { }
|
||||
#endif
|
||||
|
||||
#define EMIFS_CS3_VAL (0x88013141)
|
||||
|
||||
static void __init osk_init(void)
|
||||
{
|
||||
/* Workaround for wrong CS3 (NOR flash) timing
|
||||
* There are some U-Boot versions out there which configure
|
||||
* wrong CS3 memory timings. This mainly leads to CRC
|
||||
* or similiar errors if you use NOR flash (e.g. with JFFS2)
|
||||
*/
|
||||
if (EMIFS_CCS(3) != EMIFS_CS3_VAL)
|
||||
EMIFS_CCS(3) = EMIFS_CS3_VAL;
|
||||
|
||||
osk_flash_resource.end = osk_flash_resource.start = omap_cs3_phys();
|
||||
osk_flash_resource.end += SZ_32M - 1;
|
||||
platform_add_devices(osk5912_devices, ARRAY_SIZE(osk5912_devices));
|
||||
|
|
|
@ -38,6 +38,15 @@ static void __init omap_generic_init_irq(void)
|
|||
omap_init_irq();
|
||||
}
|
||||
|
||||
static struct platform_device palmte_lcd_device = {
|
||||
.name = "lcd_palmte",
|
||||
.id = -1,
|
||||
};
|
||||
|
||||
static struct platform_device *devices[] __initdata = {
|
||||
&palmte_lcd_device,
|
||||
};
|
||||
|
||||
static struct omap_usb_config palmte_usb_config __initdata = {
|
||||
.register_dev = 1,
|
||||
.hmc_mode = 0,
|
||||
|
@ -55,7 +64,6 @@ static struct omap_mmc_config palmte_mmc_config __initdata = {
|
|||
};
|
||||
|
||||
static struct omap_lcd_config palmte_lcd_config __initdata = {
|
||||
.panel_name = "palmte",
|
||||
.ctrl_name = "internal",
|
||||
};
|
||||
|
||||
|
@ -69,6 +77,8 @@ static void __init omap_generic_init(void)
|
|||
{
|
||||
omap_board_config = palmte_config;
|
||||
omap_board_config_size = ARRAY_SIZE(palmte_config);
|
||||
|
||||
platform_add_devices(devices, ARRAY_SIZE(devices));
|
||||
}
|
||||
|
||||
static void __init omap_generic_map_io(void)
|
||||
|
|
|
@ -16,7 +16,9 @@
|
|||
#include <linux/platform_device.h>
|
||||
#include <linux/delay.h>
|
||||
#include <linux/mtd/mtd.h>
|
||||
#include <linux/mtd/nand.h>
|
||||
#include <linux/mtd/partitions.h>
|
||||
#include <linux/input.h>
|
||||
|
||||
#include <asm/hardware.h>
|
||||
#include <asm/mach-types.h>
|
||||
|
@ -28,9 +30,44 @@
|
|||
#include <asm/arch/gpio.h>
|
||||
#include <asm/arch/mux.h>
|
||||
#include <asm/arch/fpga.h>
|
||||
#include <asm/arch/keypad.h>
|
||||
#include <asm/arch/common.h>
|
||||
#include <asm/arch/board.h>
|
||||
|
||||
static int p2_keymap[] = {
|
||||
KEY(0,0,KEY_UP),
|
||||
KEY(0,1,KEY_RIGHT),
|
||||
KEY(0,2,KEY_LEFT),
|
||||
KEY(0,3,KEY_DOWN),
|
||||
KEY(0,4,KEY_CENTER),
|
||||
KEY(0,5,KEY_0_5),
|
||||
KEY(1,0,KEY_SOFT2),
|
||||
KEY(1,1,KEY_SEND),
|
||||
KEY(1,2,KEY_END),
|
||||
KEY(1,3,KEY_VOLUMEDOWN),
|
||||
KEY(1,4,KEY_VOLUMEUP),
|
||||
KEY(1,5,KEY_RECORD),
|
||||
KEY(2,0,KEY_SOFT1),
|
||||
KEY(2,1,KEY_3),
|
||||
KEY(2,2,KEY_6),
|
||||
KEY(2,3,KEY_9),
|
||||
KEY(2,4,KEY_SHARP),
|
||||
KEY(2,5,KEY_2_5),
|
||||
KEY(3,0,KEY_BACK),
|
||||
KEY(3,1,KEY_2),
|
||||
KEY(3,2,KEY_5),
|
||||
KEY(3,3,KEY_8),
|
||||
KEY(3,4,KEY_0),
|
||||
KEY(3,5,KEY_HEADSETHOOK),
|
||||
KEY(4,0,KEY_HOME),
|
||||
KEY(4,1,KEY_1),
|
||||
KEY(4,2,KEY_4),
|
||||
KEY(4,3,KEY_7),
|
||||
KEY(4,4,KEY_STAR),
|
||||
KEY(4,5,KEY_POWER),
|
||||
0
|
||||
};
|
||||
|
||||
static struct resource smc91x_resources[] = {
|
||||
[0] = {
|
||||
.start = H2P2_DBG_FPGA_ETHR_START, /* Physical */
|
||||
|
@ -44,7 +81,7 @@ static struct resource smc91x_resources[] = {
|
|||
},
|
||||
};
|
||||
|
||||
static struct mtd_partition p2_partitions[] = {
|
||||
static struct mtd_partition nor_partitions[] = {
|
||||
/* bootloader (U-Boot, etc) in first sector */
|
||||
{
|
||||
.name = "bootloader",
|
||||
|
@ -75,27 +112,47 @@ static struct mtd_partition p2_partitions[] = {
|
|||
},
|
||||
};
|
||||
|
||||
static struct flash_platform_data p2_flash_data = {
|
||||
static struct flash_platform_data nor_data = {
|
||||
.map_name = "cfi_probe",
|
||||
.width = 2,
|
||||
.parts = p2_partitions,
|
||||
.nr_parts = ARRAY_SIZE(p2_partitions),
|
||||
.parts = nor_partitions,
|
||||
.nr_parts = ARRAY_SIZE(nor_partitions),
|
||||
};
|
||||
|
||||
static struct resource p2_flash_resource = {
|
||||
static struct resource nor_resource = {
|
||||
.start = OMAP_CS0_PHYS,
|
||||
.end = OMAP_CS0_PHYS + SZ_32M - 1,
|
||||
.flags = IORESOURCE_MEM,
|
||||
};
|
||||
|
||||
static struct platform_device p2_flash_device = {
|
||||
static struct platform_device nor_device = {
|
||||
.name = "omapflash",
|
||||
.id = 0,
|
||||
.dev = {
|
||||
.platform_data = &p2_flash_data,
|
||||
.platform_data = &nor_data,
|
||||
},
|
||||
.num_resources = 1,
|
||||
.resource = &p2_flash_resource,
|
||||
.resource = &nor_resource,
|
||||
};
|
||||
|
||||
static struct nand_platform_data nand_data = {
|
||||
.options = NAND_SAMSUNG_LP_OPTIONS,
|
||||
};
|
||||
|
||||
static struct resource nand_resource = {
|
||||
.start = OMAP_CS3_PHYS,
|
||||
.end = OMAP_CS3_PHYS + SZ_4K - 1,
|
||||
.flags = IORESOURCE_MEM,
|
||||
};
|
||||
|
||||
static struct platform_device nand_device = {
|
||||
.name = "omapnand",
|
||||
.id = 0,
|
||||
.dev = {
|
||||
.platform_data = &nand_data,
|
||||
},
|
||||
.num_resources = 1,
|
||||
.resource = &nand_resource,
|
||||
};
|
||||
|
||||
static struct platform_device smc91x_device = {
|
||||
|
@ -105,17 +162,55 @@ static struct platform_device smc91x_device = {
|
|||
.resource = smc91x_resources,
|
||||
};
|
||||
|
||||
static struct platform_device *devices[] __initdata = {
|
||||
&p2_flash_device,
|
||||
&smc91x_device,
|
||||
static struct resource kp_resources[] = {
|
||||
[0] = {
|
||||
.start = INT_730_MPUIO_KEYPAD,
|
||||
.end = INT_730_MPUIO_KEYPAD,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
};
|
||||
|
||||
static struct omap_kp_platform_data kp_data = {
|
||||
.rows = 8,
|
||||
.cols = 8,
|
||||
.keymap = p2_keymap,
|
||||
};
|
||||
|
||||
static struct platform_device kp_device = {
|
||||
.name = "omap-keypad",
|
||||
.id = -1,
|
||||
.dev = {
|
||||
.platform_data = &kp_data,
|
||||
},
|
||||
.num_resources = ARRAY_SIZE(kp_resources),
|
||||
.resource = kp_resources,
|
||||
};
|
||||
|
||||
static struct platform_device lcd_device = {
|
||||
.name = "lcd_p2",
|
||||
.id = -1,
|
||||
};
|
||||
|
||||
static struct platform_device *devices[] __initdata = {
|
||||
&nor_device,
|
||||
&nand_device,
|
||||
&smc91x_device,
|
||||
&kp_device,
|
||||
&lcd_device,
|
||||
};
|
||||
|
||||
#define P2_NAND_RB_GPIO_PIN 62
|
||||
|
||||
static int nand_dev_ready(struct nand_platform_data *data)
|
||||
{
|
||||
return omap_get_gpio_datain(P2_NAND_RB_GPIO_PIN);
|
||||
}
|
||||
|
||||
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",
|
||||
};
|
||||
|
||||
|
@ -126,7 +221,13 @@ static struct omap_board_config_kernel perseus2_config[] = {
|
|||
|
||||
static void __init omap_perseus2_init(void)
|
||||
{
|
||||
(void) platform_add_devices(devices, ARRAY_SIZE(devices));
|
||||
if (!(omap_request_gpio(P2_NAND_RB_GPIO_PIN)))
|
||||
nand_data.dev_ready = nand_dev_ready;
|
||||
|
||||
omap_cfg_reg(L3_1610_FLASH_CS2B_OE);
|
||||
omap_cfg_reg(M8_1610_FLASH_CS2B_WE);
|
||||
|
||||
platform_add_devices(devices, ARRAY_SIZE(devices));
|
||||
|
||||
omap_board_config = perseus2_config;
|
||||
omap_board_config_size = ARRAY_SIZE(perseus2_config);
|
||||
|
|
|
@ -155,9 +155,9 @@ static struct omap_uart_config voiceblue_uart_config __initdata = {
|
|||
};
|
||||
|
||||
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 },
|
||||
{ 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)
|
||||
|
@ -235,7 +235,7 @@ static struct notifier_block panic_block = {
|
|||
static int __init voiceblue_setup(void)
|
||||
{
|
||||
/* Setup panic notifier */
|
||||
atomic_notifier_chain_register(&panic_notifier_list, &panic_block);
|
||||
notifier_chain_register(&panic_notifier_list, &panic_block);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -345,7 +345,7 @@ static unsigned calc_ext_dsor(unsigned long rate)
|
|||
*/
|
||||
for (dsor = 2; dsor < 96; ++dsor) {
|
||||
if ((dsor & 1) && dsor > 8)
|
||||
continue;
|
||||
continue;
|
||||
if (rate >= 96000000 / dsor)
|
||||
break;
|
||||
}
|
||||
|
@ -687,6 +687,11 @@ int __init omap1_clk_init(void)
|
|||
clk_register(*clkp);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (((*clkp)->flags &CLOCK_IN_OMAP310) && cpu_is_omap310()) {
|
||||
clk_register(*clkp);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
info = omap_get_config(OMAP_TAG_CLOCK, struct omap_clock_config);
|
||||
|
@ -784,7 +789,7 @@ int __init omap1_clk_init(void)
|
|||
clk_enable(&armxor_ck.clk);
|
||||
clk_enable(&armtim_ck.clk); /* This should be done by timer code */
|
||||
|
||||
if (cpu_is_omap1510())
|
||||
if (cpu_is_omap15xx())
|
||||
clk_enable(&arm_gpio_ck);
|
||||
|
||||
return 0;
|
||||
|
|
|
@ -151,7 +151,7 @@ static struct clk ck_ref = {
|
|||
.name = "ck_ref",
|
||||
.rate = 12000000,
|
||||
.flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX |
|
||||
ALWAYS_ENABLED,
|
||||
CLOCK_IN_OMAP310 | ALWAYS_ENABLED,
|
||||
.enable = &omap1_clk_enable_generic,
|
||||
.disable = &omap1_clk_disable_generic,
|
||||
};
|
||||
|
@ -160,7 +160,7 @@ static struct clk ck_dpll1 = {
|
|||
.name = "ck_dpll1",
|
||||
.parent = &ck_ref,
|
||||
.flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX |
|
||||
RATE_PROPAGATES | ALWAYS_ENABLED,
|
||||
CLOCK_IN_OMAP310 | RATE_PROPAGATES | ALWAYS_ENABLED,
|
||||
.enable = &omap1_clk_enable_generic,
|
||||
.disable = &omap1_clk_disable_generic,
|
||||
};
|
||||
|
@ -183,7 +183,8 @@ static struct clk arm_ck = {
|
|||
.name = "arm_ck",
|
||||
.parent = &ck_dpll1,
|
||||
.flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX |
|
||||
RATE_CKCTL | RATE_PROPAGATES | ALWAYS_ENABLED,
|
||||
CLOCK_IN_OMAP310 | RATE_CKCTL | RATE_PROPAGATES |
|
||||
ALWAYS_ENABLED,
|
||||
.rate_offset = CKCTL_ARMDIV_OFFSET,
|
||||
.recalc = &omap1_ckctl_recalc,
|
||||
.enable = &omap1_clk_enable_generic,
|
||||
|
@ -195,7 +196,8 @@ static struct arm_idlect1_clk armper_ck = {
|
|||
.name = "armper_ck",
|
||||
.parent = &ck_dpll1,
|
||||
.flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX |
|
||||
RATE_CKCTL | CLOCK_IDLE_CONTROL,
|
||||
CLOCK_IN_OMAP310 | RATE_CKCTL |
|
||||
CLOCK_IDLE_CONTROL,
|
||||
.enable_reg = (void __iomem *)ARM_IDLECT2,
|
||||
.enable_bit = EN_PERCK,
|
||||
.rate_offset = CKCTL_PERDIV_OFFSET,
|
||||
|
@ -209,7 +211,7 @@ static struct arm_idlect1_clk armper_ck = {
|
|||
static struct clk arm_gpio_ck = {
|
||||
.name = "arm_gpio_ck",
|
||||
.parent = &ck_dpll1,
|
||||
.flags = CLOCK_IN_OMAP1510,
|
||||
.flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP310,
|
||||
.enable_reg = (void __iomem *)ARM_IDLECT2,
|
||||
.enable_bit = EN_GPIOCK,
|
||||
.recalc = &followparent_recalc,
|
||||
|
@ -222,7 +224,7 @@ static struct arm_idlect1_clk armxor_ck = {
|
|||
.name = "armxor_ck",
|
||||
.parent = &ck_ref,
|
||||
.flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX |
|
||||
CLOCK_IDLE_CONTROL,
|
||||
CLOCK_IN_OMAP310 | CLOCK_IDLE_CONTROL,
|
||||
.enable_reg = (void __iomem *)ARM_IDLECT2,
|
||||
.enable_bit = EN_XORPCK,
|
||||
.recalc = &followparent_recalc,
|
||||
|
@ -237,7 +239,7 @@ static struct arm_idlect1_clk armtim_ck = {
|
|||
.name = "armtim_ck",
|
||||
.parent = &ck_ref,
|
||||
.flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX |
|
||||
CLOCK_IDLE_CONTROL,
|
||||
CLOCK_IN_OMAP310 | CLOCK_IDLE_CONTROL,
|
||||
.enable_reg = (void __iomem *)ARM_IDLECT2,
|
||||
.enable_bit = EN_TIMCK,
|
||||
.recalc = &followparent_recalc,
|
||||
|
@ -252,7 +254,7 @@ static struct arm_idlect1_clk armwdt_ck = {
|
|||
.name = "armwdt_ck",
|
||||
.parent = &ck_ref,
|
||||
.flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX |
|
||||
CLOCK_IDLE_CONTROL,
|
||||
CLOCK_IN_OMAP310 | CLOCK_IDLE_CONTROL,
|
||||
.enable_reg = (void __iomem *)ARM_IDLECT2,
|
||||
.enable_bit = EN_WDTCK,
|
||||
.recalc = &omap1_watchdog_recalc,
|
||||
|
@ -344,9 +346,9 @@ static struct arm_idlect1_clk tc_ck = {
|
|||
.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,
|
||||
CLOCK_IN_OMAP730 | CLOCK_IN_OMAP310 |
|
||||
RATE_CKCTL | RATE_PROPAGATES |
|
||||
ALWAYS_ENABLED | CLOCK_IDLE_CONTROL,
|
||||
.rate_offset = CKCTL_TCDIV_OFFSET,
|
||||
.recalc = &omap1_ckctl_recalc,
|
||||
.enable = &omap1_clk_enable_generic,
|
||||
|
@ -358,7 +360,8 @@ static struct arm_idlect1_clk tc_ck = {
|
|||
static struct clk arminth_ck1510 = {
|
||||
.name = "arminth_ck",
|
||||
.parent = &tc_ck.clk,
|
||||
.flags = CLOCK_IN_OMAP1510 | ALWAYS_ENABLED,
|
||||
.flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP310 |
|
||||
ALWAYS_ENABLED,
|
||||
.recalc = &followparent_recalc,
|
||||
/* Note: On 1510 the frequency follows TC_CK
|
||||
*
|
||||
|
@ -372,7 +375,8 @@ static struct clk tipb_ck = {
|
|||
/* No-idle controlled by "tc_ck" */
|
||||
.name = "tibp_ck",
|
||||
.parent = &tc_ck.clk,
|
||||
.flags = CLOCK_IN_OMAP1510 | ALWAYS_ENABLED,
|
||||
.flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP310 |
|
||||
ALWAYS_ENABLED,
|
||||
.recalc = &followparent_recalc,
|
||||
.enable = &omap1_clk_enable_generic,
|
||||
.disable = &omap1_clk_disable_generic,
|
||||
|
@ -417,7 +421,7 @@ static struct clk dma_ck = {
|
|||
.name = "dma_ck",
|
||||
.parent = &tc_ck.clk,
|
||||
.flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX |
|
||||
ALWAYS_ENABLED,
|
||||
CLOCK_IN_OMAP310 | ALWAYS_ENABLED,
|
||||
.recalc = &followparent_recalc,
|
||||
.enable = &omap1_clk_enable_generic,
|
||||
.disable = &omap1_clk_disable_generic,
|
||||
|
@ -437,7 +441,7 @@ static struct arm_idlect1_clk api_ck = {
|
|||
.name = "api_ck",
|
||||
.parent = &tc_ck.clk,
|
||||
.flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX |
|
||||
CLOCK_IDLE_CONTROL,
|
||||
CLOCK_IN_OMAP310 | CLOCK_IDLE_CONTROL,
|
||||
.enable_reg = (void __iomem *)ARM_IDLECT2,
|
||||
.enable_bit = EN_APICK,
|
||||
.recalc = &followparent_recalc,
|
||||
|
@ -451,7 +455,8 @@ static struct arm_idlect1_clk lb_ck = {
|
|||
.clk = {
|
||||
.name = "lb_ck",
|
||||
.parent = &tc_ck.clk,
|
||||
.flags = CLOCK_IN_OMAP1510 | CLOCK_IDLE_CONTROL,
|
||||
.flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP310 |
|
||||
CLOCK_IDLE_CONTROL,
|
||||
.enable_reg = (void __iomem *)ARM_IDLECT2,
|
||||
.enable_bit = EN_LBCK,
|
||||
.recalc = &followparent_recalc,
|
||||
|
@ -495,8 +500,8 @@ static struct arm_idlect1_clk lcd_ck_1510 = {
|
|||
.clk = {
|
||||
.name = "lcd_ck",
|
||||
.parent = &ck_dpll1,
|
||||
.flags = CLOCK_IN_OMAP1510 | RATE_CKCTL |
|
||||
CLOCK_IDLE_CONTROL,
|
||||
.flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP310 |
|
||||
RATE_CKCTL | CLOCK_IDLE_CONTROL,
|
||||
.enable_reg = (void __iomem *)ARM_IDLECT2,
|
||||
.enable_bit = EN_LCDCK,
|
||||
.rate_offset = CKCTL_LCDDIV_OFFSET,
|
||||
|
@ -512,8 +517,9 @@ static struct clk uart1_1510 = {
|
|||
/* 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,
|
||||
.flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP310 |
|
||||
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,
|
||||
|
@ -544,8 +550,8 @@ static struct clk uart2_ck = {
|
|||
.parent = &armper_ck.clk,
|
||||
.rate = 12000000,
|
||||
.flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX |
|
||||
ENABLE_REG_32BIT | ALWAYS_ENABLED |
|
||||
CLOCK_NO_IDLE_PARENT,
|
||||
CLOCK_IN_OMAP310 | 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,
|
||||
|
@ -559,8 +565,9 @@ static struct clk uart3_1510 = {
|
|||
/* 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,
|
||||
.flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP310 |
|
||||
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,
|
||||
|
@ -590,7 +597,7 @@ static struct clk usb_clko = { /* 6 MHz output on W4_USB_CLKO */
|
|||
/* Direct from ULPD, no parent */
|
||||
.rate = 6000000,
|
||||
.flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX |
|
||||
RATE_FIXED | ENABLE_REG_32BIT,
|
||||
CLOCK_IN_OMAP310 | RATE_FIXED | ENABLE_REG_32BIT,
|
||||
.enable_reg = (void __iomem *)ULPD_CLOCK_CTRL,
|
||||
.enable_bit = USB_MCLK_EN_BIT,
|
||||
.enable = &omap1_clk_enable_generic,
|
||||
|
@ -601,7 +608,7 @@ 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 |
|
||||
.flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP310 |
|
||||
RATE_FIXED | ENABLE_REG_32BIT,
|
||||
.enable_reg = (void __iomem *)MOD_CONF_CTRL_0,
|
||||
.enable_bit = USB_HOST_HHC_UHOST_EN,
|
||||
|
@ -637,7 +644,9 @@ 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,
|
||||
.flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP310 | RATE_FIXED,
|
||||
.enable_reg = (void __iomem *)SOFT_REQ_REG,
|
||||
.enable_bit = 6,
|
||||
.enable = &omap1_clk_enable_generic,
|
||||
.disable = &omap1_clk_disable_generic,
|
||||
};
|
||||
|
@ -659,7 +668,7 @@ 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,
|
||||
.flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP310 | RATE_FIXED,
|
||||
.enable = &omap1_clk_enable_generic,
|
||||
.disable = &omap1_clk_disable_generic,
|
||||
};
|
||||
|
@ -678,12 +687,14 @@ static struct clk bclk_16xx = {
|
|||
};
|
||||
|
||||
static struct clk mmc1_ck = {
|
||||
.name = "mmc1_ck",
|
||||
.name = "mmc_ck",
|
||||
.id = 1,
|
||||
/* 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,
|
||||
CLOCK_IN_OMAP310 | RATE_FIXED | ENABLE_REG_32BIT |
|
||||
CLOCK_NO_IDLE_PARENT,
|
||||
.enable_reg = (void __iomem *)MOD_CONF_CTRL_0,
|
||||
.enable_bit = 23,
|
||||
.enable = &omap1_clk_enable_generic,
|
||||
|
@ -691,7 +702,8 @@ static struct clk mmc1_ck = {
|
|||
};
|
||||
|
||||
static struct clk mmc2_ck = {
|
||||
.name = "mmc2_ck",
|
||||
.name = "mmc_ck",
|
||||
.id = 2,
|
||||
/* Functional clock is direct from ULPD, interface clock is ARMPER */
|
||||
.parent = &armper_ck.clk,
|
||||
.rate = 48000000,
|
||||
|
@ -706,7 +718,7 @@ static struct clk mmc2_ck = {
|
|||
static struct clk virtual_ck_mpu = {
|
||||
.name = "mpu",
|
||||
.flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX |
|
||||
VIRTUAL_CLOCK | ALWAYS_ENABLED,
|
||||
CLOCK_IN_OMAP310 | VIRTUAL_CLOCK | ALWAYS_ENABLED,
|
||||
.parent = &arm_ck, /* Is smarter alias for */
|
||||
.recalc = &followparent_recalc,
|
||||
.set_rate = &omap1_select_table_rate,
|
||||
|
@ -715,6 +727,20 @@ static struct clk virtual_ck_mpu = {
|
|||
.disable = &omap1_clk_disable_generic,
|
||||
};
|
||||
|
||||
/* virtual functional clock domain for I2C. Just for making sure that ARMXOR_CK
|
||||
remains active during MPU idle whenever this is enabled */
|
||||
static struct clk i2c_fck = {
|
||||
.name = "i2c_fck",
|
||||
.id = 1,
|
||||
.flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX |
|
||||
VIRTUAL_CLOCK | CLOCK_NO_IDLE_PARENT |
|
||||
ALWAYS_ENABLED,
|
||||
.parent = &armxor_ck.clk,
|
||||
.recalc = &followparent_recalc,
|
||||
.enable = &omap1_clk_enable_generic,
|
||||
.disable = &omap1_clk_disable_generic,
|
||||
};
|
||||
|
||||
static struct clk * onchip_clks[] = {
|
||||
/* non-ULPD clocks */
|
||||
&ck_ref,
|
||||
|
@ -763,6 +789,7 @@ static struct clk * onchip_clks[] = {
|
|||
&mmc2_ck,
|
||||
/* Virtual clocks */
|
||||
&virtual_ck_mpu,
|
||||
&i2c_fck,
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
@ -25,10 +25,6 @@
|
|||
#include <asm/arch/mux.h>
|
||||
#include <asm/arch/gpio.h>
|
||||
|
||||
extern void omap_nop_release(struct device *dev);
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
#if defined(CONFIG_OMAP1610_IR) || defined(CONFIG_OMAP161O_IR_MODULE)
|
||||
|
||||
static u64 irda_dmamask = 0xffffffff;
|
||||
|
@ -37,7 +33,6 @@ static struct platform_device omap1610ir_device = {
|
|||
.name = "omap1610-ir",
|
||||
.id = -1,
|
||||
.dev = {
|
||||
.release = omap_nop_release,
|
||||
.dma_mask = &irda_dmamask,
|
||||
},
|
||||
};
|
||||
|
@ -84,9 +79,6 @@ static struct resource rtc_resources[] = {
|
|||
static struct platform_device omap_rtc_device = {
|
||||
.name = "omap_rtc",
|
||||
.id = -1,
|
||||
.dev = {
|
||||
.release = omap_nop_release,
|
||||
},
|
||||
.num_resources = ARRAY_SIZE(rtc_resources),
|
||||
.resource = rtc_resources,
|
||||
};
|
||||
|
@ -99,6 +91,42 @@ static void omap_init_rtc(void)
|
|||
static inline void omap_init_rtc(void) {}
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_OMAP_STI)
|
||||
|
||||
#define OMAP1_STI_BASE IO_ADDRESS(0xfffea000)
|
||||
#define OMAP1_STI_CHANNEL_BASE (OMAP1_STI_BASE + 0x400)
|
||||
|
||||
static struct resource sti_resources[] = {
|
||||
{
|
||||
.start = OMAP1_STI_BASE,
|
||||
.end = OMAP1_STI_BASE + SZ_1K - 1,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
{
|
||||
.start = OMAP1_STI_CHANNEL_BASE,
|
||||
.end = OMAP1_STI_CHANNEL_BASE + SZ_1K - 1,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
{
|
||||
.start = INT_1610_STI,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
}
|
||||
};
|
||||
|
||||
static struct platform_device sti_device = {
|
||||
.name = "sti",
|
||||
.id = -1,
|
||||
.num_resources = ARRAY_SIZE(sti_resources),
|
||||
.resource = sti_resources,
|
||||
};
|
||||
|
||||
static inline void omap_init_sti(void)
|
||||
{
|
||||
platform_device_register(&sti_device);
|
||||
}
|
||||
#else
|
||||
static inline void omap_init_sti(void) {}
|
||||
#endif
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
|
@ -129,6 +157,7 @@ static int __init omap1_init_devices(void)
|
|||
*/
|
||||
omap_init_irda();
|
||||
omap_init_rtc();
|
||||
omap_init_sti();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
#include <asm/io.h>
|
||||
#include <asm/arch/mux.h>
|
||||
#include <asm/arch/tc.h>
|
||||
#include <asm/arch/omapfb.h>
|
||||
|
||||
extern int omap1_clk_init(void);
|
||||
extern void omap_check_revision(void);
|
||||
|
@ -110,7 +111,7 @@ void __init omap1_map_common_io(void)
|
|||
}
|
||||
#endif
|
||||
#ifdef CONFIG_ARCH_OMAP15XX
|
||||
if (cpu_is_omap1510()) {
|
||||
if (cpu_is_omap15xx()) {
|
||||
iotable_init(omap1510_io_desc, ARRAY_SIZE(omap1510_io_desc));
|
||||
}
|
||||
#endif
|
||||
|
@ -121,6 +122,7 @@ void __init omap1_map_common_io(void)
|
|||
#endif
|
||||
|
||||
omap_sram_init();
|
||||
omapfb_reserve_mem();
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -60,7 +60,7 @@ struct omap_irq_bank {
|
|||
unsigned long wake_enable;
|
||||
};
|
||||
|
||||
static unsigned int irq_bank_count = 0;
|
||||
static unsigned int irq_bank_count;
|
||||
static struct omap_irq_bank *irq_banks;
|
||||
|
||||
static inline unsigned int irq_bank_readl(int bank, int offset)
|
||||
|
@ -142,28 +142,28 @@ static void omap_irq_set_cfg(int irq, int fiq, int priority, int trigger)
|
|||
|
||||
#ifdef CONFIG_ARCH_OMAP730
|
||||
static struct omap_irq_bank omap730_irq_banks[] = {
|
||||
{ .base_reg = OMAP_IH1_BASE, .trigger_map = 0xb3f8e22f },
|
||||
{ .base_reg = OMAP_IH2_BASE, .trigger_map = 0xfdb9c1f2 },
|
||||
{ .base_reg = OMAP_IH1_BASE, .trigger_map = 0xb3f8e22f },
|
||||
{ .base_reg = OMAP_IH2_BASE, .trigger_map = 0xfdb9c1f2 },
|
||||
{ .base_reg = OMAP_IH2_BASE + 0x100, .trigger_map = 0x800040f3 },
|
||||
};
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ARCH_OMAP15XX
|
||||
static struct omap_irq_bank omap1510_irq_banks[] = {
|
||||
{ .base_reg = OMAP_IH1_BASE, .trigger_map = 0xb3febfff },
|
||||
{ .base_reg = OMAP_IH2_BASE, .trigger_map = 0xffbfffed },
|
||||
{ .base_reg = OMAP_IH1_BASE, .trigger_map = 0xb3febfff },
|
||||
{ .base_reg = OMAP_IH2_BASE, .trigger_map = 0xffbfffed },
|
||||
};
|
||||
static struct omap_irq_bank omap310_irq_banks[] = {
|
||||
{ .base_reg = OMAP_IH1_BASE, .trigger_map = 0xb3faefc3 },
|
||||
{ .base_reg = OMAP_IH2_BASE, .trigger_map = 0x65b3c061 },
|
||||
{ .base_reg = OMAP_IH1_BASE, .trigger_map = 0xb3faefc3 },
|
||||
{ .base_reg = OMAP_IH2_BASE, .trigger_map = 0x65b3c061 },
|
||||
};
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_ARCH_OMAP16XX)
|
||||
|
||||
static struct omap_irq_bank omap1610_irq_banks[] = {
|
||||
{ .base_reg = OMAP_IH1_BASE, .trigger_map = 0xb3fefe8f },
|
||||
{ .base_reg = OMAP_IH2_BASE, .trigger_map = 0xfdb7c1fd },
|
||||
{ .base_reg = OMAP_IH1_BASE, .trigger_map = 0xb3fefe8f },
|
||||
{ .base_reg = OMAP_IH2_BASE, .trigger_map = 0xfdb7c1fd },
|
||||
{ .base_reg = OMAP_IH2_BASE + 0x100, .trigger_map = 0xffffb7ff },
|
||||
{ .base_reg = OMAP_IH2_BASE + 0x200, .trigger_map = 0xffffffff },
|
||||
};
|
||||
|
|
|
@ -35,16 +35,20 @@
|
|||
|
||||
#ifdef CONFIG_ARCH_OMAP730
|
||||
struct pin_config __initdata_or_module omap730_pins[] = {
|
||||
MUX_CFG_730("E2_730_KBR0", 12, 21, 0, 0, 20, 1, NA, 0, 0)
|
||||
MUX_CFG_730("J7_730_KBR1", 12, 25, 0, 0, 24, 1, NA, 0, 0)
|
||||
MUX_CFG_730("E1_730_KBR2", 12, 29, 0, 0, 28, 1, NA, 0, 0)
|
||||
MUX_CFG_730("F3_730_KBR3", 13, 1, 0, 0, 0, 1, NA, 0, 0)
|
||||
MUX_CFG_730("D2_730_KBR4", 13, 5, 0, 0, 4, 1, NA, 0, 0)
|
||||
MUX_CFG_730("C2_730_KBC0", 13, 9, 0, 0, 8, 1, NA, 0, 0)
|
||||
MUX_CFG_730("D3_730_KBC1", 13, 13, 0, 0, 12, 1, NA, 0, 0)
|
||||
MUX_CFG_730("E4_730_KBC2", 13, 17, 0, 0, 16, 1, NA, 0, 0)
|
||||
MUX_CFG_730("F4_730_KBC3", 13, 21, 0, 0, 20, 1, NA, 0, 0)
|
||||
MUX_CFG_730("E3_730_KBC4", 13, 25, 0, 0, 24, 1, NA, 0, 0)
|
||||
MUX_CFG_730("E2_730_KBR0", 12, 21, 0, 20, 1, 0)
|
||||
MUX_CFG_730("J7_730_KBR1", 12, 25, 0, 24, 1, 0)
|
||||
MUX_CFG_730("E1_730_KBR2", 12, 29, 0, 28, 1, 0)
|
||||
MUX_CFG_730("F3_730_KBR3", 13, 1, 0, 0, 1, 0)
|
||||
MUX_CFG_730("D2_730_KBR4", 13, 5, 0, 4, 1, 0)
|
||||
MUX_CFG_730("C2_730_KBC0", 13, 9, 0, 8, 1, 0)
|
||||
MUX_CFG_730("D3_730_KBC1", 13, 13, 0, 12, 1, 0)
|
||||
MUX_CFG_730("E4_730_KBC2", 13, 17, 0, 16, 1, 0)
|
||||
MUX_CFG_730("F4_730_KBC3", 13, 21, 0, 20, 1, 0)
|
||||
MUX_CFG_730("E3_730_KBC4", 13, 25, 0, 24, 1, 0)
|
||||
|
||||
MUX_CFG_730("AA17_730_USB_DM", 2, 21, 0, 20, 0, 0)
|
||||
MUX_CFG_730("W16_730_USB_PU_EN", 2, 25, 0, 24, 0, 0)
|
||||
MUX_CFG_730("W17_730_USB_VBUSI", 2, 29, 0, 28, 0, 0)
|
||||
};
|
||||
#endif
|
||||
|
||||
|
@ -73,8 +77,8 @@ MUX_CFG("UART3_BCLK", A, 0, 0, 2, 6, 0, NA, 0, 0)
|
|||
MUX_CFG("Y15_1610_UART3_RTS", A, 0, 1, 2, 6, 0, NA, 0, 0)
|
||||
|
||||
/* PWT & PWL, conflicts with UART3 */
|
||||
MUX_CFG("PWT", 6, 0, 2, 0, 30, 0, NA, 0, 0)
|
||||
MUX_CFG("PWL", 6, 3, 1, 0, 31, 1, NA, 0, 0)
|
||||
MUX_CFG("PWT", 6, 0, 2, 0, 30, 0, NA, 0, 0)
|
||||
MUX_CFG("PWL", 6, 3, 1, 0, 31, 1, NA, 0, 0)
|
||||
|
||||
/* USB internal master generic */
|
||||
MUX_CFG("R18_USB_VBUS", 7, 9, 2, 1, 11, 0, NA, 0, 1)
|
||||
|
@ -151,7 +155,7 @@ MUX_CFG("MCBSP3_CLKX", 9, 3, 1, 1, 29, 0, NA, 0, 1)
|
|||
|
||||
/* Misc ballouts */
|
||||
MUX_CFG("BALLOUT_V8_ARMIO3", B, 18, 0, 2, 25, 1, NA, 0, 1)
|
||||
MUX_CFG("N20_HDQ", 6, 18, 1, 1, 4, 0, 1, 4, 0)
|
||||
MUX_CFG("N20_HDQ", 6, 18, 1, 1, 4, 0, 1, 4, 0)
|
||||
|
||||
/* OMAP-1610 MMC2 */
|
||||
MUX_CFG("W8_1610_MMC2_DAT0", B, 21, 6, 2, 23, 1, 2, 1, 1)
|
||||
|
|
|
@ -0,0 +1,770 @@
|
|||
/*
|
||||
* linux/arch/arm/mach-omap1/pm.c
|
||||
*
|
||||
* OMAP Power Management Routines
|
||||
*
|
||||
* Original code for the SA11x0:
|
||||
* Copyright (c) 2001 Cliff Brake <cbrake@accelent.com>
|
||||
*
|
||||
* Modified for the PXA250 by Nicolas Pitre:
|
||||
* Copyright (c) 2002 Monta Vista Software, Inc.
|
||||
*
|
||||
* Modified for the OMAP1510 by David Singleton:
|
||||
* Copyright (c) 2002 Monta Vista Software, Inc.
|
||||
*
|
||||
* Cleanup 2004 for OMAP1510/1610 by Dirk Behme <dirk.behme@de.bosch.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the
|
||||
* Free Software Foundation; either version 2 of the License, or (at your
|
||||
* option) any later version.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
|
||||
* NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
|
||||
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* 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.,
|
||||
* 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
#include <linux/pm.h>
|
||||
#include <linux/sched.h>
|
||||
#include <linux/proc_fs.h>
|
||||
#include <linux/pm.h>
|
||||
#include <linux/interrupt.h>
|
||||
#include <linux/sysfs.h>
|
||||
#include <linux/module.h>
|
||||
|
||||
#include <asm/io.h>
|
||||
#include <asm/irq.h>
|
||||
#include <asm/atomic.h>
|
||||
#include <asm/mach/time.h>
|
||||
#include <asm/mach/irq.h>
|
||||
#include <asm/mach-types.h>
|
||||
|
||||
#include <asm/arch/irqs.h>
|
||||
#include <asm/arch/clock.h>
|
||||
#include <asm/arch/sram.h>
|
||||
#include <asm/arch/tc.h>
|
||||
#include <asm/arch/pm.h>
|
||||
#include <asm/arch/mux.h>
|
||||
#include <asm/arch/tps65010.h>
|
||||
#include <asm/arch/dma.h>
|
||||
#include <asm/arch/dsp_common.h>
|
||||
#include <asm/arch/dmtimer.h>
|
||||
|
||||
static unsigned int arm_sleep_save[ARM_SLEEP_SAVE_SIZE];
|
||||
static unsigned short dsp_sleep_save[DSP_SLEEP_SAVE_SIZE];
|
||||
static unsigned short ulpd_sleep_save[ULPD_SLEEP_SAVE_SIZE];
|
||||
static unsigned int mpui730_sleep_save[MPUI730_SLEEP_SAVE_SIZE];
|
||||
static unsigned int mpui1510_sleep_save[MPUI1510_SLEEP_SAVE_SIZE];
|
||||
static unsigned int mpui1610_sleep_save[MPUI1610_SLEEP_SAVE_SIZE];
|
||||
|
||||
static unsigned short enable_dyn_sleep = 1;
|
||||
|
||||
static ssize_t omap_pm_sleep_while_idle_show(struct subsystem * subsys, char *buf)
|
||||
{
|
||||
return sprintf(buf, "%hu\n", enable_dyn_sleep);
|
||||
}
|
||||
|
||||
static ssize_t omap_pm_sleep_while_idle_store(struct subsystem * subsys,
|
||||
const char * buf,
|
||||
size_t n)
|
||||
{
|
||||
unsigned short value;
|
||||
if (sscanf(buf, "%hu", &value) != 1 ||
|
||||
(value != 0 && value != 1)) {
|
||||
printk(KERN_ERR "idle_sleep_store: Invalid value\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
enable_dyn_sleep = value;
|
||||
return n;
|
||||
}
|
||||
|
||||
static struct subsys_attribute sleep_while_idle_attr = {
|
||||
.attr = {
|
||||
.name = __stringify(sleep_while_idle),
|
||||
.mode = 0644,
|
||||
},
|
||||
.show = omap_pm_sleep_while_idle_show,
|
||||
.store = omap_pm_sleep_while_idle_store,
|
||||
};
|
||||
|
||||
extern struct subsystem power_subsys;
|
||||
static void (*omap_sram_idle)(void) = NULL;
|
||||
static void (*omap_sram_suspend)(unsigned long r0, unsigned long r1) = NULL;
|
||||
|
||||
/*
|
||||
* Let's power down on idle, but only if we are really
|
||||
* idle, because once we start down the path of
|
||||
* going idle we continue to do idle even if we get
|
||||
* a clock tick interrupt . .
|
||||
*/
|
||||
void omap_pm_idle(void)
|
||||
{
|
||||
extern __u32 arm_idlect1_mask;
|
||||
__u32 use_idlect1 = arm_idlect1_mask;
|
||||
#ifndef CONFIG_OMAP_MPU_TIMER
|
||||
int do_sleep;
|
||||
#endif
|
||||
|
||||
local_irq_disable();
|
||||
local_fiq_disable();
|
||||
if (need_resched()) {
|
||||
local_fiq_enable();
|
||||
local_irq_enable();
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
* Since an interrupt may set up a timer, we don't want to
|
||||
* reprogram the hardware timer with interrupts enabled.
|
||||
* Re-enable interrupts only after returning from idle.
|
||||
*/
|
||||
timer_dyn_reprogram();
|
||||
|
||||
#ifdef CONFIG_OMAP_MPU_TIMER
|
||||
#warning Enable 32kHz OS timer in order to allow sleep states in idle
|
||||
use_idlect1 = use_idlect1 & ~(1 << 9);
|
||||
#else
|
||||
|
||||
do_sleep = 0;
|
||||
while (enable_dyn_sleep) {
|
||||
|
||||
#ifdef CONFIG_CBUS_TAHVO_USB
|
||||
extern int vbus_active;
|
||||
/* Clock requirements? */
|
||||
if (vbus_active)
|
||||
break;
|
||||
#endif
|
||||
do_sleep = 1;
|
||||
break;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_OMAP_DM_TIMER
|
||||
use_idlect1 = omap_dm_timer_modify_idlect_mask(use_idlect1);
|
||||
#endif
|
||||
|
||||
if (omap_dma_running()) {
|
||||
use_idlect1 &= ~(1 << 6);
|
||||
if (omap_lcd_dma_ext_running())
|
||||
use_idlect1 &= ~(1 << 12);
|
||||
}
|
||||
|
||||
/* We should be able to remove the do_sleep variable and multiple
|
||||
* tests above as soon as drivers, timer and DMA code have been fixed.
|
||||
* Even the sleep block count should become obsolete. */
|
||||
if ((use_idlect1 != ~0) || !do_sleep) {
|
||||
|
||||
__u32 saved_idlect1 = omap_readl(ARM_IDLECT1);
|
||||
if (cpu_is_omap15xx())
|
||||
use_idlect1 &= OMAP1510_BIG_SLEEP_REQUEST;
|
||||
else
|
||||
use_idlect1 &= OMAP1610_IDLECT1_SLEEP_VAL;
|
||||
omap_writel(use_idlect1, ARM_IDLECT1);
|
||||
__asm__ volatile ("mcr p15, 0, r0, c7, c0, 4");
|
||||
omap_writel(saved_idlect1, ARM_IDLECT1);
|
||||
|
||||
local_fiq_enable();
|
||||
local_irq_enable();
|
||||
return;
|
||||
}
|
||||
omap_sram_suspend(omap_readl(ARM_IDLECT1),
|
||||
omap_readl(ARM_IDLECT2));
|
||||
#endif
|
||||
|
||||
local_fiq_enable();
|
||||
local_irq_enable();
|
||||
}
|
||||
|
||||
/*
|
||||
* Configuration of the wakeup event is board specific. For the
|
||||
* moment we put it into this helper function. Later it may move
|
||||
* to board specific files.
|
||||
*/
|
||||
static void omap_pm_wakeup_setup(void)
|
||||
{
|
||||
u32 level1_wake = 0;
|
||||
u32 level2_wake = OMAP_IRQ_BIT(INT_UART2);
|
||||
|
||||
/*
|
||||
* Turn off all interrupts except GPIO bank 1, L1-2nd level cascade,
|
||||
* and the L2 wakeup interrupts: keypad and UART2. Note that the
|
||||
* drivers must still separately call omap_set_gpio_wakeup() to
|
||||
* wake up to a GPIO interrupt.
|
||||
*/
|
||||
if (cpu_is_omap730())
|
||||
level1_wake = OMAP_IRQ_BIT(INT_730_GPIO_BANK1) |
|
||||
OMAP_IRQ_BIT(INT_730_IH2_IRQ);
|
||||
else if (cpu_is_omap15xx())
|
||||
level1_wake = OMAP_IRQ_BIT(INT_GPIO_BANK1) |
|
||||
OMAP_IRQ_BIT(INT_1510_IH2_IRQ);
|
||||
else if (cpu_is_omap16xx())
|
||||
level1_wake = OMAP_IRQ_BIT(INT_GPIO_BANK1) |
|
||||
OMAP_IRQ_BIT(INT_1610_IH2_IRQ);
|
||||
|
||||
omap_writel(~level1_wake, OMAP_IH1_MIR);
|
||||
|
||||
if (cpu_is_omap730()) {
|
||||
omap_writel(~level2_wake, OMAP_IH2_0_MIR);
|
||||
omap_writel(~(OMAP_IRQ_BIT(INT_730_WAKE_UP_REQ) |
|
||||
OMAP_IRQ_BIT(INT_730_MPUIO_KEYPAD)),
|
||||
OMAP_IH2_1_MIR);
|
||||
} else if (cpu_is_omap15xx()) {
|
||||
level2_wake |= OMAP_IRQ_BIT(INT_KEYBOARD);
|
||||
omap_writel(~level2_wake, OMAP_IH2_MIR);
|
||||
} else if (cpu_is_omap16xx()) {
|
||||
level2_wake |= OMAP_IRQ_BIT(INT_KEYBOARD);
|
||||
omap_writel(~level2_wake, OMAP_IH2_0_MIR);
|
||||
|
||||
/* INT_1610_WAKE_UP_REQ is needed for GPIO wakeup... */
|
||||
omap_writel(~OMAP_IRQ_BIT(INT_1610_WAKE_UP_REQ),
|
||||
OMAP_IH2_1_MIR);
|
||||
omap_writel(~0x0, OMAP_IH2_2_MIR);
|
||||
omap_writel(~0x0, OMAP_IH2_3_MIR);
|
||||
}
|
||||
|
||||
/* New IRQ agreement, recalculate in cascade order */
|
||||
omap_writel(1, OMAP_IH2_CONTROL);
|
||||
omap_writel(1, OMAP_IH1_CONTROL);
|
||||
}
|
||||
|
||||
#define EN_DSPCK 13 /* ARM_CKCTL */
|
||||
#define EN_APICK 6 /* ARM_IDLECT2 */
|
||||
#define DSP_EN 1 /* ARM_RSTCT1 */
|
||||
|
||||
void omap_pm_suspend(void)
|
||||
{
|
||||
unsigned long arg0 = 0, arg1 = 0;
|
||||
|
||||
printk("PM: OMAP%x is trying to enter deep sleep...\n", system_rev);
|
||||
|
||||
omap_serial_wake_trigger(1);
|
||||
|
||||
if (machine_is_omap_osk()) {
|
||||
/* Stop LED1 (D9) blink */
|
||||
tps65010_set_led(LED1, OFF);
|
||||
}
|
||||
|
||||
omap_writew(0xffff, ULPD_SOFT_DISABLE_REQ_REG);
|
||||
|
||||
/*
|
||||
* Step 1: turn off interrupts (FIXME: NOTE: already disabled)
|
||||
*/
|
||||
|
||||
local_irq_disable();
|
||||
local_fiq_disable();
|
||||
|
||||
/*
|
||||
* Step 2: save registers
|
||||
*
|
||||
* The omap is a strange/beautiful device. The caches, memory
|
||||
* and register state are preserved across power saves.
|
||||
* We have to save and restore very little register state to
|
||||
* idle the omap.
|
||||
*
|
||||
* Save interrupt, MPUI, ARM and UPLD control registers.
|
||||
*/
|
||||
|
||||
if (cpu_is_omap730()) {
|
||||
MPUI730_SAVE(OMAP_IH1_MIR);
|
||||
MPUI730_SAVE(OMAP_IH2_0_MIR);
|
||||
MPUI730_SAVE(OMAP_IH2_1_MIR);
|
||||
MPUI730_SAVE(MPUI_CTRL);
|
||||
MPUI730_SAVE(MPUI_DSP_BOOT_CONFIG);
|
||||
MPUI730_SAVE(MPUI_DSP_API_CONFIG);
|
||||
MPUI730_SAVE(EMIFS_CONFIG);
|
||||
MPUI730_SAVE(EMIFF_SDRAM_CONFIG);
|
||||
|
||||
} else if (cpu_is_omap15xx()) {
|
||||
MPUI1510_SAVE(OMAP_IH1_MIR);
|
||||
MPUI1510_SAVE(OMAP_IH2_MIR);
|
||||
MPUI1510_SAVE(MPUI_CTRL);
|
||||
MPUI1510_SAVE(MPUI_DSP_BOOT_CONFIG);
|
||||
MPUI1510_SAVE(MPUI_DSP_API_CONFIG);
|
||||
MPUI1510_SAVE(EMIFS_CONFIG);
|
||||
MPUI1510_SAVE(EMIFF_SDRAM_CONFIG);
|
||||
} else if (cpu_is_omap16xx()) {
|
||||
MPUI1610_SAVE(OMAP_IH1_MIR);
|
||||
MPUI1610_SAVE(OMAP_IH2_0_MIR);
|
||||
MPUI1610_SAVE(OMAP_IH2_1_MIR);
|
||||
MPUI1610_SAVE(OMAP_IH2_2_MIR);
|
||||
MPUI1610_SAVE(OMAP_IH2_3_MIR);
|
||||
MPUI1610_SAVE(MPUI_CTRL);
|
||||
MPUI1610_SAVE(MPUI_DSP_BOOT_CONFIG);
|
||||
MPUI1610_SAVE(MPUI_DSP_API_CONFIG);
|
||||
MPUI1610_SAVE(EMIFS_CONFIG);
|
||||
MPUI1610_SAVE(EMIFF_SDRAM_CONFIG);
|
||||
}
|
||||
|
||||
ARM_SAVE(ARM_CKCTL);
|
||||
ARM_SAVE(ARM_IDLECT1);
|
||||
ARM_SAVE(ARM_IDLECT2);
|
||||
if (!(cpu_is_omap15xx()))
|
||||
ARM_SAVE(ARM_IDLECT3);
|
||||
ARM_SAVE(ARM_EWUPCT);
|
||||
ARM_SAVE(ARM_RSTCT1);
|
||||
ARM_SAVE(ARM_RSTCT2);
|
||||
ARM_SAVE(ARM_SYSST);
|
||||
ULPD_SAVE(ULPD_CLOCK_CTRL);
|
||||
ULPD_SAVE(ULPD_STATUS_REQ);
|
||||
|
||||
/* (Step 3 removed - we now allow deep sleep by default) */
|
||||
|
||||
/*
|
||||
* Step 4: OMAP DSP Shutdown
|
||||
*/
|
||||
|
||||
/* stop DSP */
|
||||
omap_writew(omap_readw(ARM_RSTCT1) & ~(1 << DSP_EN), ARM_RSTCT1);
|
||||
|
||||
/* shut down dsp_ck */
|
||||
omap_writew(omap_readw(ARM_CKCTL) & ~(1 << EN_DSPCK), ARM_CKCTL);
|
||||
|
||||
/* temporarily enabling api_ck to access DSP registers */
|
||||
omap_writew(omap_readw(ARM_IDLECT2) | 1 << EN_APICK, ARM_IDLECT2);
|
||||
|
||||
/* save DSP registers */
|
||||
DSP_SAVE(DSP_IDLECT2);
|
||||
|
||||
/* Stop all DSP domain clocks */
|
||||
__raw_writew(0, DSP_IDLECT2);
|
||||
|
||||
/*
|
||||
* Step 5: Wakeup Event Setup
|
||||
*/
|
||||
|
||||
omap_pm_wakeup_setup();
|
||||
|
||||
/*
|
||||
* Step 6: ARM and Traffic controller shutdown
|
||||
*/
|
||||
|
||||
/* disable ARM watchdog */
|
||||
omap_writel(0x00F5, OMAP_WDT_TIMER_MODE);
|
||||
omap_writel(0x00A0, OMAP_WDT_TIMER_MODE);
|
||||
|
||||
/*
|
||||
* Step 6b: ARM and Traffic controller shutdown
|
||||
*
|
||||
* Step 6 continues here. Prepare jump to power management
|
||||
* assembly code in internal SRAM.
|
||||
*
|
||||
* Since the omap_cpu_suspend routine has been copied to
|
||||
* SRAM, we'll do an indirect procedure call to it and pass the
|
||||
* contents of arm_idlect1 and arm_idlect2 so it can restore
|
||||
* them when it wakes up and it will return.
|
||||
*/
|
||||
|
||||
arg0 = arm_sleep_save[ARM_SLEEP_SAVE_ARM_IDLECT1];
|
||||
arg1 = arm_sleep_save[ARM_SLEEP_SAVE_ARM_IDLECT2];
|
||||
|
||||
/*
|
||||
* Step 6c: ARM and Traffic controller shutdown
|
||||
*
|
||||
* Jump to assembly code. The processor will stay there
|
||||
* until wake up.
|
||||
*/
|
||||
omap_sram_suspend(arg0, arg1);
|
||||
|
||||
/*
|
||||
* If we are here, processor is woken up!
|
||||
*/
|
||||
|
||||
/*
|
||||
* Restore DSP clocks
|
||||
*/
|
||||
|
||||
/* again temporarily enabling api_ck to access DSP registers */
|
||||
omap_writew(omap_readw(ARM_IDLECT2) | 1 << EN_APICK, ARM_IDLECT2);
|
||||
|
||||
/* Restore DSP domain clocks */
|
||||
DSP_RESTORE(DSP_IDLECT2);
|
||||
|
||||
/*
|
||||
* Restore ARM state, except ARM_IDLECT1/2 which omap_cpu_suspend did
|
||||
*/
|
||||
|
||||
if (!(cpu_is_omap15xx()))
|
||||
ARM_RESTORE(ARM_IDLECT3);
|
||||
ARM_RESTORE(ARM_CKCTL);
|
||||
ARM_RESTORE(ARM_EWUPCT);
|
||||
ARM_RESTORE(ARM_RSTCT1);
|
||||
ARM_RESTORE(ARM_RSTCT2);
|
||||
ARM_RESTORE(ARM_SYSST);
|
||||
ULPD_RESTORE(ULPD_CLOCK_CTRL);
|
||||
ULPD_RESTORE(ULPD_STATUS_REQ);
|
||||
|
||||
if (cpu_is_omap730()) {
|
||||
MPUI730_RESTORE(EMIFS_CONFIG);
|
||||
MPUI730_RESTORE(EMIFF_SDRAM_CONFIG);
|
||||
MPUI730_RESTORE(OMAP_IH1_MIR);
|
||||
MPUI730_RESTORE(OMAP_IH2_0_MIR);
|
||||
MPUI730_RESTORE(OMAP_IH2_1_MIR);
|
||||
} else if (cpu_is_omap15xx()) {
|
||||
MPUI1510_RESTORE(MPUI_CTRL);
|
||||
MPUI1510_RESTORE(MPUI_DSP_BOOT_CONFIG);
|
||||
MPUI1510_RESTORE(MPUI_DSP_API_CONFIG);
|
||||
MPUI1510_RESTORE(EMIFS_CONFIG);
|
||||
MPUI1510_RESTORE(EMIFF_SDRAM_CONFIG);
|
||||
MPUI1510_RESTORE(OMAP_IH1_MIR);
|
||||
MPUI1510_RESTORE(OMAP_IH2_MIR);
|
||||
} else if (cpu_is_omap16xx()) {
|
||||
MPUI1610_RESTORE(MPUI_CTRL);
|
||||
MPUI1610_RESTORE(MPUI_DSP_BOOT_CONFIG);
|
||||
MPUI1610_RESTORE(MPUI_DSP_API_CONFIG);
|
||||
MPUI1610_RESTORE(EMIFS_CONFIG);
|
||||
MPUI1610_RESTORE(EMIFF_SDRAM_CONFIG);
|
||||
|
||||
MPUI1610_RESTORE(OMAP_IH1_MIR);
|
||||
MPUI1610_RESTORE(OMAP_IH2_0_MIR);
|
||||
MPUI1610_RESTORE(OMAP_IH2_1_MIR);
|
||||
MPUI1610_RESTORE(OMAP_IH2_2_MIR);
|
||||
MPUI1610_RESTORE(OMAP_IH2_3_MIR);
|
||||
}
|
||||
|
||||
omap_writew(0, ULPD_SOFT_DISABLE_REQ_REG);
|
||||
|
||||
/*
|
||||
* Reenable interrupts
|
||||
*/
|
||||
|
||||
local_irq_enable();
|
||||
local_fiq_enable();
|
||||
|
||||
omap_serial_wake_trigger(0);
|
||||
|
||||
printk("PM: OMAP%x is re-starting from deep sleep...\n", system_rev);
|
||||
|
||||
if (machine_is_omap_osk()) {
|
||||
/* Let LED1 (D9) blink again */
|
||||
tps65010_set_led(LED1, BLINK);
|
||||
}
|
||||
}
|
||||
|
||||
#if defined(DEBUG) && defined(CONFIG_PROC_FS)
|
||||
static int g_read_completed;
|
||||
|
||||
/*
|
||||
* Read system PM registers for debugging
|
||||
*/
|
||||
static int omap_pm_read_proc(
|
||||
char *page_buffer,
|
||||
char **my_first_byte,
|
||||
off_t virtual_start,
|
||||
int length,
|
||||
int *eof,
|
||||
void *data)
|
||||
{
|
||||
int my_buffer_offset = 0;
|
||||
char * const my_base = page_buffer;
|
||||
|
||||
ARM_SAVE(ARM_CKCTL);
|
||||
ARM_SAVE(ARM_IDLECT1);
|
||||
ARM_SAVE(ARM_IDLECT2);
|
||||
if (!(cpu_is_omap15xx()))
|
||||
ARM_SAVE(ARM_IDLECT3);
|
||||
ARM_SAVE(ARM_EWUPCT);
|
||||
ARM_SAVE(ARM_RSTCT1);
|
||||
ARM_SAVE(ARM_RSTCT2);
|
||||
ARM_SAVE(ARM_SYSST);
|
||||
|
||||
ULPD_SAVE(ULPD_IT_STATUS);
|
||||
ULPD_SAVE(ULPD_CLOCK_CTRL);
|
||||
ULPD_SAVE(ULPD_SOFT_REQ);
|
||||
ULPD_SAVE(ULPD_STATUS_REQ);
|
||||
ULPD_SAVE(ULPD_DPLL_CTRL);
|
||||
ULPD_SAVE(ULPD_POWER_CTRL);
|
||||
|
||||
if (cpu_is_omap730()) {
|
||||
MPUI730_SAVE(MPUI_CTRL);
|
||||
MPUI730_SAVE(MPUI_DSP_STATUS);
|
||||
MPUI730_SAVE(MPUI_DSP_BOOT_CONFIG);
|
||||
MPUI730_SAVE(MPUI_DSP_API_CONFIG);
|
||||
MPUI730_SAVE(EMIFF_SDRAM_CONFIG);
|
||||
MPUI730_SAVE(EMIFS_CONFIG);
|
||||
} else if (cpu_is_omap15xx()) {
|
||||
MPUI1510_SAVE(MPUI_CTRL);
|
||||
MPUI1510_SAVE(MPUI_DSP_STATUS);
|
||||
MPUI1510_SAVE(MPUI_DSP_BOOT_CONFIG);
|
||||
MPUI1510_SAVE(MPUI_DSP_API_CONFIG);
|
||||
MPUI1510_SAVE(EMIFF_SDRAM_CONFIG);
|
||||
MPUI1510_SAVE(EMIFS_CONFIG);
|
||||
} else if (cpu_is_omap16xx()) {
|
||||
MPUI1610_SAVE(MPUI_CTRL);
|
||||
MPUI1610_SAVE(MPUI_DSP_STATUS);
|
||||
MPUI1610_SAVE(MPUI_DSP_BOOT_CONFIG);
|
||||
MPUI1610_SAVE(MPUI_DSP_API_CONFIG);
|
||||
MPUI1610_SAVE(EMIFF_SDRAM_CONFIG);
|
||||
MPUI1610_SAVE(EMIFS_CONFIG);
|
||||
}
|
||||
|
||||
if (virtual_start == 0) {
|
||||
g_read_completed = 0;
|
||||
|
||||
my_buffer_offset += sprintf(my_base + my_buffer_offset,
|
||||
"ARM_CKCTL_REG: 0x%-8x \n"
|
||||
"ARM_IDLECT1_REG: 0x%-8x \n"
|
||||
"ARM_IDLECT2_REG: 0x%-8x \n"
|
||||
"ARM_IDLECT3_REG: 0x%-8x \n"
|
||||
"ARM_EWUPCT_REG: 0x%-8x \n"
|
||||
"ARM_RSTCT1_REG: 0x%-8x \n"
|
||||
"ARM_RSTCT2_REG: 0x%-8x \n"
|
||||
"ARM_SYSST_REG: 0x%-8x \n"
|
||||
"ULPD_IT_STATUS_REG: 0x%-4x \n"
|
||||
"ULPD_CLOCK_CTRL_REG: 0x%-4x \n"
|
||||
"ULPD_SOFT_REQ_REG: 0x%-4x \n"
|
||||
"ULPD_DPLL_CTRL_REG: 0x%-4x \n"
|
||||
"ULPD_STATUS_REQ_REG: 0x%-4x \n"
|
||||
"ULPD_POWER_CTRL_REG: 0x%-4x \n",
|
||||
ARM_SHOW(ARM_CKCTL),
|
||||
ARM_SHOW(ARM_IDLECT1),
|
||||
ARM_SHOW(ARM_IDLECT2),
|
||||
ARM_SHOW(ARM_IDLECT3),
|
||||
ARM_SHOW(ARM_EWUPCT),
|
||||
ARM_SHOW(ARM_RSTCT1),
|
||||
ARM_SHOW(ARM_RSTCT2),
|
||||
ARM_SHOW(ARM_SYSST),
|
||||
ULPD_SHOW(ULPD_IT_STATUS),
|
||||
ULPD_SHOW(ULPD_CLOCK_CTRL),
|
||||
ULPD_SHOW(ULPD_SOFT_REQ),
|
||||
ULPD_SHOW(ULPD_DPLL_CTRL),
|
||||
ULPD_SHOW(ULPD_STATUS_REQ),
|
||||
ULPD_SHOW(ULPD_POWER_CTRL));
|
||||
|
||||
if (cpu_is_omap730()) {
|
||||
my_buffer_offset += sprintf(my_base + my_buffer_offset,
|
||||
"MPUI730_CTRL_REG 0x%-8x \n"
|
||||
"MPUI730_DSP_STATUS_REG: 0x%-8x \n"
|
||||
"MPUI730_DSP_BOOT_CONFIG_REG: 0x%-8x \n"
|
||||
"MPUI730_DSP_API_CONFIG_REG: 0x%-8x \n"
|
||||
"MPUI730_SDRAM_CONFIG_REG: 0x%-8x \n"
|
||||
"MPUI730_EMIFS_CONFIG_REG: 0x%-8x \n",
|
||||
MPUI730_SHOW(MPUI_CTRL),
|
||||
MPUI730_SHOW(MPUI_DSP_STATUS),
|
||||
MPUI730_SHOW(MPUI_DSP_BOOT_CONFIG),
|
||||
MPUI730_SHOW(MPUI_DSP_API_CONFIG),
|
||||
MPUI730_SHOW(EMIFF_SDRAM_CONFIG),
|
||||
MPUI730_SHOW(EMIFS_CONFIG));
|
||||
} else if (cpu_is_omap15xx()) {
|
||||
my_buffer_offset += sprintf(my_base + my_buffer_offset,
|
||||
"MPUI1510_CTRL_REG 0x%-8x \n"
|
||||
"MPUI1510_DSP_STATUS_REG: 0x%-8x \n"
|
||||
"MPUI1510_DSP_BOOT_CONFIG_REG: 0x%-8x \n"
|
||||
"MPUI1510_DSP_API_CONFIG_REG: 0x%-8x \n"
|
||||
"MPUI1510_SDRAM_CONFIG_REG: 0x%-8x \n"
|
||||
"MPUI1510_EMIFS_CONFIG_REG: 0x%-8x \n",
|
||||
MPUI1510_SHOW(MPUI_CTRL),
|
||||
MPUI1510_SHOW(MPUI_DSP_STATUS),
|
||||
MPUI1510_SHOW(MPUI_DSP_BOOT_CONFIG),
|
||||
MPUI1510_SHOW(MPUI_DSP_API_CONFIG),
|
||||
MPUI1510_SHOW(EMIFF_SDRAM_CONFIG),
|
||||
MPUI1510_SHOW(EMIFS_CONFIG));
|
||||
} else if (cpu_is_omap16xx()) {
|
||||
my_buffer_offset += sprintf(my_base + my_buffer_offset,
|
||||
"MPUI1610_CTRL_REG 0x%-8x \n"
|
||||
"MPUI1610_DSP_STATUS_REG: 0x%-8x \n"
|
||||
"MPUI1610_DSP_BOOT_CONFIG_REG: 0x%-8x \n"
|
||||
"MPUI1610_DSP_API_CONFIG_REG: 0x%-8x \n"
|
||||
"MPUI1610_SDRAM_CONFIG_REG: 0x%-8x \n"
|
||||
"MPUI1610_EMIFS_CONFIG_REG: 0x%-8x \n",
|
||||
MPUI1610_SHOW(MPUI_CTRL),
|
||||
MPUI1610_SHOW(MPUI_DSP_STATUS),
|
||||
MPUI1610_SHOW(MPUI_DSP_BOOT_CONFIG),
|
||||
MPUI1610_SHOW(MPUI_DSP_API_CONFIG),
|
||||
MPUI1610_SHOW(EMIFF_SDRAM_CONFIG),
|
||||
MPUI1610_SHOW(EMIFS_CONFIG));
|
||||
}
|
||||
|
||||
g_read_completed++;
|
||||
} else if (g_read_completed >= 1) {
|
||||
*eof = 1;
|
||||
return 0;
|
||||
}
|
||||
g_read_completed++;
|
||||
|
||||
*my_first_byte = page_buffer;
|
||||
return my_buffer_offset;
|
||||
}
|
||||
|
||||
static void omap_pm_init_proc(void)
|
||||
{
|
||||
struct proc_dir_entry *entry;
|
||||
|
||||
entry = create_proc_read_entry("driver/omap_pm",
|
||||
S_IWUSR | S_IRUGO, NULL,
|
||||
omap_pm_read_proc, NULL);
|
||||
}
|
||||
|
||||
#endif /* DEBUG && CONFIG_PROC_FS */
|
||||
|
||||
static void (*saved_idle)(void) = NULL;
|
||||
|
||||
/*
|
||||
* omap_pm_prepare - Do preliminary suspend work.
|
||||
* @state: suspend state we're entering.
|
||||
*
|
||||
*/
|
||||
static int omap_pm_prepare(suspend_state_t state)
|
||||
{
|
||||
int error = 0;
|
||||
|
||||
/* We cannot sleep in idle until we have resumed */
|
||||
saved_idle = pm_idle;
|
||||
pm_idle = NULL;
|
||||
|
||||
switch (state)
|
||||
{
|
||||
case PM_SUSPEND_STANDBY:
|
||||
case PM_SUSPEND_MEM:
|
||||
break;
|
||||
|
||||
case PM_SUSPEND_DISK:
|
||||
return -ENOTSUPP;
|
||||
|
||||
default:
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
return error;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* omap_pm_enter - Actually enter a sleep state.
|
||||
* @state: State we're entering.
|
||||
*
|
||||
*/
|
||||
|
||||
static int omap_pm_enter(suspend_state_t state)
|
||||
{
|
||||
switch (state)
|
||||
{
|
||||
case PM_SUSPEND_STANDBY:
|
||||
case PM_SUSPEND_MEM:
|
||||
omap_pm_suspend();
|
||||
break;
|
||||
|
||||
case PM_SUSPEND_DISK:
|
||||
return -ENOTSUPP;
|
||||
|
||||
default:
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* omap_pm_finish - Finish up suspend sequence.
|
||||
* @state: State we're coming out of.
|
||||
*
|
||||
* This is called after we wake back up (or if entering the sleep state
|
||||
* failed).
|
||||
*/
|
||||
|
||||
static int omap_pm_finish(suspend_state_t state)
|
||||
{
|
||||
pm_idle = saved_idle;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
static irqreturn_t omap_wakeup_interrupt(int irq, void * dev,
|
||||
struct pt_regs * regs)
|
||||
{
|
||||
return IRQ_HANDLED;
|
||||
}
|
||||
|
||||
static struct irqaction omap_wakeup_irq = {
|
||||
.name = "peripheral wakeup",
|
||||
.flags = SA_INTERRUPT,
|
||||
.handler = omap_wakeup_interrupt
|
||||
};
|
||||
|
||||
|
||||
|
||||
static struct pm_ops omap_pm_ops ={
|
||||
.pm_disk_mode = 0,
|
||||
.prepare = omap_pm_prepare,
|
||||
.enter = omap_pm_enter,
|
||||
.finish = omap_pm_finish,
|
||||
};
|
||||
|
||||
static int __init omap_pm_init(void)
|
||||
{
|
||||
printk("Power Management for TI OMAP.\n");
|
||||
|
||||
/*
|
||||
* We copy the assembler sleep/wakeup routines to SRAM.
|
||||
* These routines need to be in SRAM as that's the only
|
||||
* memory the MPU can see when it wakes up.
|
||||
*/
|
||||
if (cpu_is_omap730()) {
|
||||
omap_sram_idle = omap_sram_push(omap730_idle_loop_suspend,
|
||||
omap730_idle_loop_suspend_sz);
|
||||
omap_sram_suspend = omap_sram_push(omap730_cpu_suspend,
|
||||
omap730_cpu_suspend_sz);
|
||||
} else if (cpu_is_omap15xx()) {
|
||||
omap_sram_idle = omap_sram_push(omap1510_idle_loop_suspend,
|
||||
omap1510_idle_loop_suspend_sz);
|
||||
omap_sram_suspend = omap_sram_push(omap1510_cpu_suspend,
|
||||
omap1510_cpu_suspend_sz);
|
||||
} else if (cpu_is_omap16xx()) {
|
||||
omap_sram_idle = omap_sram_push(omap1610_idle_loop_suspend,
|
||||
omap1610_idle_loop_suspend_sz);
|
||||
omap_sram_suspend = omap_sram_push(omap1610_cpu_suspend,
|
||||
omap1610_cpu_suspend_sz);
|
||||
}
|
||||
|
||||
if (omap_sram_idle == NULL || omap_sram_suspend == NULL) {
|
||||
printk(KERN_ERR "PM not initialized: Missing SRAM support\n");
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
pm_idle = omap_pm_idle;
|
||||
|
||||
if (cpu_is_omap730())
|
||||
setup_irq(INT_730_WAKE_UP_REQ, &omap_wakeup_irq);
|
||||
else if (cpu_is_omap16xx())
|
||||
setup_irq(INT_1610_WAKE_UP_REQ, &omap_wakeup_irq);
|
||||
|
||||
/* Program new power ramp-up time
|
||||
* (0 for most boards since we don't lower voltage when in deep sleep)
|
||||
*/
|
||||
omap_writew(ULPD_SETUP_ANALOG_CELL_3_VAL, ULPD_SETUP_ANALOG_CELL_3);
|
||||
|
||||
/* Setup ULPD POWER_CTRL_REG - enter deep sleep whenever possible */
|
||||
omap_writew(ULPD_POWER_CTRL_REG_VAL, ULPD_POWER_CTRL);
|
||||
|
||||
/* Configure IDLECT3 */
|
||||
if (cpu_is_omap730())
|
||||
omap_writel(OMAP730_IDLECT3_VAL, OMAP730_IDLECT3);
|
||||
else if (cpu_is_omap16xx())
|
||||
omap_writel(OMAP1610_IDLECT3_VAL, OMAP1610_IDLECT3);
|
||||
|
||||
pm_set_ops(&omap_pm_ops);
|
||||
|
||||
#if defined(DEBUG) && defined(CONFIG_PROC_FS)
|
||||
omap_pm_init_proc();
|
||||
#endif
|
||||
|
||||
subsys_create_file(&power_subsys, &sleep_while_idle_attr);
|
||||
|
||||
if (cpu_is_omap16xx()) {
|
||||
/* configure LOW_PWR pin */
|
||||
omap_cfg_reg(T20_1610_LOW_PWR);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
__initcall(omap_pm_init);
|
Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше
Загрузка…
Ссылка в новой задаче