Merge ../linus
This commit is contained in:
commit
f1f76afd71
6
CREDITS
6
CREDITS
|
@ -3382,7 +3382,7 @@ S: Germany
|
||||||
|
|
||||||
N: Geert Uytterhoeven
|
N: Geert Uytterhoeven
|
||||||
E: geert@linux-m68k.org
|
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
|
P: 1024/862678A6 C51D 361C 0BD1 4C90 B275 C553 6EEA 11BA 8626 78A6
|
||||||
D: m68k/Amiga and PPC/CHRP Longtrail coordinator
|
D: m68k/Amiga and PPC/CHRP Longtrail coordinator
|
||||||
D: Frame buffer device and XF68_FBDev maintainer
|
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: Atari Falcon chipset IDE
|
||||||
D: Amiga Gayle chipset IDE
|
D: Amiga Gayle chipset IDE
|
||||||
D: mipsel NEC DDB Vrc-5074
|
D: mipsel NEC DDB Vrc-5074
|
||||||
S: Emiel Vlieberghlaan 2A/21
|
S: Haterbeekstraat 55B
|
||||||
S: B-3010 Kessel-Lo
|
S: B-3200 Aarschot
|
||||||
S: Belgium
|
S: Belgium
|
||||||
|
|
||||||
N: Chris Vance
|
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
|
Consistent memory is memory for which a write by either the device or
|
||||||
the processor can immediately be read by the processor or device
|
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.
|
This routine allocates a region of <size> bytes of consistent memory.
|
||||||
it also returns a <dma_handle> which may be cast to an unsigned
|
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
|
could not be created and the driver should take appropriate action (eg
|
||||||
reduce current DMA mapping usage or delay and try again later).
|
reduce current DMA mapping usage or delay and try again later).
|
||||||
|
|
||||||
int
|
int
|
||||||
dma_map_sg(struct device *dev, struct scatterlist *sg, int nents,
|
dma_map_sg(struct device *dev, struct scatterlist *sg,
|
||||||
enum dma_data_direction direction)
|
int nents, enum dma_data_direction direction)
|
||||||
int
|
int
|
||||||
pci_map_sg(struct pci_dev *hwdev, struct scatterlist *sg,
|
pci_map_sg(struct pci_dev *hwdev, struct scatterlist *sg,
|
||||||
int nents, int direction)
|
int nents, int direction)
|
||||||
|
|
||||||
Maps a scatter gather list from the block layer.
|
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
|
aborting the request or even oopsing is better than doing nothing and
|
||||||
corrupting the filesystem.
|
corrupting the filesystem.
|
||||||
|
|
||||||
void
|
With scatterlists, you use the resulting mapping like this:
|
||||||
dma_unmap_sg(struct device *dev, struct scatterlist *sg, int nhwentries,
|
|
||||||
enum dma_data_direction direction)
|
int i, count = dma_map_sg(dev, sglist, nents, direction);
|
||||||
void
|
struct scatterlist *sg;
|
||||||
pci_unmap_sg(struct pci_dev *hwdev, struct scatterlist *sg,
|
|
||||||
int nents, int direction)
|
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
|
unmap the previously mapped scatter/gather list. All the parameters
|
||||||
must be the same as those and passed in to the scatter/gather mapping
|
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
|
something like __va(). [ EDIT: Update this when we integrate
|
||||||
Gerd Knorr's generic code which does this. ]
|
Gerd Knorr's generic code which does this. ]
|
||||||
|
|
||||||
This rule also means that you may not use kernel image addresses
|
This rule also means that you may use neither kernel image addresses
|
||||||
(ie. items in the kernel's data/text/bss segment, or your driver's)
|
(items in data/text/bss segments), nor module image addresses, nor
|
||||||
nor may you use kernel stack addresses for DMA. Both of these items
|
stack addresses for DMA. These could all be mapped somewhere entirely
|
||||||
might be mapped somewhere entirely different than the rest of physical
|
different than the rest of physical memory. Even if those classes of
|
||||||
memory.
|
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()
|
Also, this means that you cannot take the return of a kmap()
|
||||||
call and DMA to/from that. This is similar to vmalloc().
|
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
|
Finally, if your device can only drive the low 24-bits of
|
||||||
address during PCI bus mastering you might do something like:
|
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
|
printk(KERN_WARNING
|
||||||
"mydev: 24-bit DMA addressing not available.\n");
|
"mydev: 24-bit DMA addressing not available.\n");
|
||||||
goto ignore_this_device;
|
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_
|
functions) and the various different functions have _different_
|
||||||
DMA addressing limitations, you may wish to probe each mask and
|
DMA addressing limitations, you may wish to probe each mask and
|
||||||
only provide the functionality which the machine can handle. It
|
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.
|
most specific mask.
|
||||||
|
|
||||||
Here is pseudo-code showing how this might be done:
|
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.
|
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,
|
- 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
|
unmapped right after it (unless you use pci_dma_sync_* below) and for which
|
||||||
hardware can optimize for sequential accesses.
|
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
|
Neither type of DMA mapping has alignment restrictions that come
|
||||||
from PCI, although some devices may have such restrictions.
|
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.
|
Using Consistent DMA mappings.
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
# This makefile is used to generate the kernel documentation,
|
# This makefile is used to generate the kernel documentation,
|
||||||
# primarily based on in-line comments in various source files.
|
# primarily based on in-line comments in various source files.
|
||||||
# See Documentation/kernel-doc-nano-HOWTO.txt for instruction in how
|
# 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
|
# To add a new book the only step required is to add the book to the
|
||||||
# list of DOCBOOKS.
|
# list of DOCBOOKS.
|
||||||
|
|
||||||
|
|
|
@ -322,7 +322,6 @@ X!Earch/i386/kernel/mca.c
|
||||||
<chapter id="sysfs">
|
<chapter id="sysfs">
|
||||||
<title>The Filesystem for Exporting Kernel Objects</title>
|
<title>The Filesystem for Exporting Kernel Objects</title>
|
||||||
!Efs/sysfs/file.c
|
!Efs/sysfs/file.c
|
||||||
!Efs/sysfs/dir.c
|
|
||||||
!Efs/sysfs/symlink.c
|
!Efs/sysfs/symlink.c
|
||||||
!Efs/sysfs/bin.c
|
!Efs/sysfs/bin.c
|
||||||
</chapter>
|
</chapter>
|
||||||
|
|
|
@ -120,14 +120,27 @@ void (*dev_config) (struct ata_port *, struct ata_device *);
|
||||||
<programlisting>
|
<programlisting>
|
||||||
void (*set_piomode) (struct ata_port *, struct ata_device *);
|
void (*set_piomode) (struct ata_port *, struct ata_device *);
|
||||||
void (*set_dmamode) (struct ata_port *, struct ata_device *);
|
void (*set_dmamode) (struct ata_port *, struct ata_device *);
|
||||||
void (*post_set_mode) (struct ata_port *ap);
|
void (*post_set_mode) (struct ata_port *);
|
||||||
|
unsigned int (*mode_filter) (struct ata_port *, struct ata_device *, unsigned int);
|
||||||
</programlisting>
|
</programlisting>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Hooks called prior to the issue of SET FEATURES - XFER MODE
|
Hooks called prior to the issue of SET FEATURES - XFER MODE
|
||||||
command. dev->pio_mode is guaranteed to be valid when
|
command. The optional ->mode_filter() hook is called when libata
|
||||||
->set_piomode() is called, and dev->dma_mode is guaranteed to be
|
has built a mask of the possible modes. This is passed to the
|
||||||
valid when ->set_dmamode() is called. ->post_set_mode() is
|
->mode_filter() function which should return a mask of valid modes
|
||||||
|
after filtering those unsuitable due to hardware limits. It is not
|
||||||
|
valid to use this interface to add modes.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
dev->pio_mode and dev->dma_mode are guaranteed to be valid when
|
||||||
|
->set_piomode() and when ->set_dmamode() is called. The timings for
|
||||||
|
any other drive sharing the cable will also be valid at this point.
|
||||||
|
That is the library records the decisions for the modes of each
|
||||||
|
drive on a channel before it attempts to set any of them.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
->post_set_mode() is
|
||||||
called unconditionally, after the SET FEATURES - XFER MODE
|
called unconditionally, after the SET FEATURES - XFER MODE
|
||||||
command completes successfully.
|
command completes successfully.
|
||||||
</para>
|
</para>
|
||||||
|
@ -230,6 +243,32 @@ void (*dev_select)(struct ata_port *ap, unsigned int device);
|
||||||
|
|
||||||
</sect2>
|
</sect2>
|
||||||
|
|
||||||
|
<sect2><title>Private tuning method</title>
|
||||||
|
<programlisting>
|
||||||
|
void (*set_mode) (struct ata_port *ap);
|
||||||
|
</programlisting>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
By default libata performs drive and controller tuning in
|
||||||
|
accordance with the ATA timing rules and also applies blacklists
|
||||||
|
and cable limits. Some controllers need special handling and have
|
||||||
|
custom tuning rules, typically raid controllers that use ATA
|
||||||
|
commands but do not actually do drive timing.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<warning>
|
||||||
|
<para>
|
||||||
|
This hook should not be used to replace the standard controller
|
||||||
|
tuning logic when a controller has quirks. Replacing the default
|
||||||
|
tuning logic in that case would bypass handling for drive and
|
||||||
|
bridge quirks that may be important to data reliability. If a
|
||||||
|
controller needs to filter the mode selection it should use the
|
||||||
|
mode_filter hook instead.
|
||||||
|
</para>
|
||||||
|
</warning>
|
||||||
|
|
||||||
|
</sect2>
|
||||||
|
|
||||||
<sect2><title>Reset ATA bus</title>
|
<sect2><title>Reset ATA bus</title>
|
||||||
<programlisting>
|
<programlisting>
|
||||||
void (*phy_reset) (struct ata_port *ap);
|
void (*phy_reset) (struct ata_port *ap);
|
||||||
|
@ -666,7 +705,7 @@ and other resources, etc.
|
||||||
|
|
||||||
<sect1><title>ata_scsi_error()</title>
|
<sect1><title>ata_scsi_error()</title>
|
||||||
<para>
|
<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
|
for libata. As discussed above, this will be entered in two
|
||||||
cases - timeout and ATAPI error completion. This function
|
cases - timeout and ATAPI error completion. This function
|
||||||
calls low level libata driver's eng_timeout() callback, the
|
calls low level libata driver's eng_timeout() callback, the
|
||||||
|
|
|
@ -30,7 +30,7 @@ specific hotkey(event))
|
||||||
echo "event_num:event_type:event_argument" >
|
echo "event_num:event_type:event_argument" >
|
||||||
/proc/acpi/hotkey/action.
|
/proc/acpi/hotkey/action.
|
||||||
The result of the execution of this aml method is
|
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"
|
created. Please use command "cat /proc/acpi/hotkey/polling_method"
|
||||||
to retrieve it.
|
to retrieve it.
|
||||||
|
|
||||||
|
|
|
@ -71,14 +71,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)
|
What: remove EXPORT_SYMBOL(insert_resource)
|
||||||
When: April 2006
|
When: April 2006
|
||||||
Files: kernel/resource.c
|
Files: kernel/resource.c
|
||||||
|
@ -127,13 +119,6 @@ Who: Christoph Hellwig <hch@lst.de>
|
||||||
|
|
||||||
---------------------------
|
---------------------------
|
||||||
|
|
||||||
What: EXPORT_SYMBOL(lookup_hash)
|
|
||||||
When: January 2006
|
|
||||||
Why: Too low-level interface. Use lookup_one_len or lookup_create instead.
|
|
||||||
Who: Christoph Hellwig <hch@lst.de>
|
|
||||||
|
|
||||||
---------------------------
|
|
||||||
|
|
||||||
What: CONFIG_FORCED_INLINING
|
What: CONFIG_FORCED_INLINING
|
||||||
When: June 2006
|
When: June 2006
|
||||||
Why: Config option is there to see if gcc is good enough. (in january
|
Why: Config option is there to see if gcc is good enough. (in january
|
||||||
|
@ -241,3 +226,15 @@ Why: The USB subsystem has changed a lot over time, and it has been
|
||||||
Who: Greg Kroah-Hartman <gregkh@suse.de>
|
Who: Greg Kroah-Hartman <gregkh@suse.de>
|
||||||
|
|
||||||
---------------------------
|
---------------------------
|
||||||
|
|
||||||
|
What: find_trylock_page
|
||||||
|
When: January 2007
|
||||||
|
Why: The interface no longer has any callers left in the kernel. It
|
||||||
|
is an odd interface (compared with other find_*_page functions), in
|
||||||
|
that it does not take a refcount to the page, only the page lock.
|
||||||
|
It should be replaced with find_get_page or find_lock_page if possible.
|
||||||
|
This feature removal can be reevaluated if users of the interface
|
||||||
|
cannot cleanly use something else.
|
||||||
|
Who: Nick Piggin <npiggin@suse.de>
|
||||||
|
|
||||||
|
---------------------------
|
||||||
|
|
|
@ -694,7 +694,7 @@ struct file_operations
|
||||||
----------------------
|
----------------------
|
||||||
|
|
||||||
This describes how the VFS can manipulate an open file. As of kernel
|
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 {
|
struct file_operations {
|
||||||
loff_t (*llseek) (struct file *, loff_t, int);
|
loff_t (*llseek) (struct file *, loff_t, int);
|
||||||
|
@ -723,6 +723,10 @@ struct file_operations {
|
||||||
int (*check_flags)(int);
|
int (*check_flags)(int);
|
||||||
int (*dir_notify)(struct file *filp, unsigned long arg);
|
int (*dir_notify)(struct file *filp, unsigned long arg);
|
||||||
int (*flock) (struct file *, int, struct file_lock *);
|
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
|
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
|
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
|
Note that the file operations are implemented by the specific
|
||||||
filesystem in which the inode resides. When opening a device node
|
filesystem in which the inode resides. When opening a device node
|
||||||
(character or block special) most filesystems will call special
|
(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
|
The internal FRV kernel ABI is not quite the same as the userspace ABI. A
|
||||||
are used for special purposed, and the ABI is not consistent between modules vs core, and MMU vs
|
number of the registers are used for special purposed, and the ABI is not
|
||||||
no-MMU.
|
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
|
This partly stems from the fact that FRV CPUs do not have a separate
|
||||||
most of them do not have any scratch registers, thus requiring at least one general purpose
|
supervisor stack pointer, and most of them do not have any scratch
|
||||||
register to be clobbered in such an event. Also, within the kernel core, it is possible to simply
|
registers, thus requiring at least one general purpose register to be
|
||||||
jump or call directly between functions using a relative offset. This cannot be extended to modules
|
clobbered in such an event. Also, within the kernel core, it is possible to
|
||||||
for the displacement is likely to be too far. Thus in modules the address of a function to call
|
simply jump or call directly between functions using a relative offset.
|
||||||
must be calculated in a register and then used, requiring two extra instructions.
|
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:
|
This document has the following sections:
|
||||||
|
|
||||||
|
@ -39,7 +41,8 @@ When a system call is made, the following registers are effective:
|
||||||
CPU OPERATING MODES
|
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.
|
(1) User mode.
|
||||||
|
|
||||||
|
@ -47,42 +50,46 @@ The FR-V CPU has three basic operating modes. In order of increasing capability:
|
||||||
|
|
||||||
(2) Kernel mode.
|
(2) Kernel mode.
|
||||||
|
|
||||||
Normal kernel mode. There are many additional control registers available that may be
|
Normal kernel mode. There are many additional control registers
|
||||||
accessed in this mode, in addition to all the stuff available to user mode. This has two
|
available that may be accessed in this mode, in addition to all the
|
||||||
submodes:
|
stuff available to user mode. This has two submodes:
|
||||||
|
|
||||||
(a) Exceptions enabled (PSR.T == 1).
|
(a) Exceptions enabled (PSR.T == 1).
|
||||||
|
|
||||||
Exceptions will invoke the appropriate normal kernel mode handler. On entry to the
|
Exceptions will invoke the appropriate normal kernel mode
|
||||||
handler, the PSR.T bit will be cleared.
|
handler. On entry to the handler, the PSR.T bit will be cleared.
|
||||||
|
|
||||||
(b) Exceptions disabled (PSR.T == 0).
|
(b) Exceptions disabled (PSR.T == 0).
|
||||||
|
|
||||||
No exceptions or interrupts may happen. Any mandatory exceptions will cause the CPU to
|
No exceptions or interrupts may happen. Any mandatory exceptions
|
||||||
halt unless the CPU is told to jump into debug mode instead.
|
will cause the CPU to halt unless the CPU is told to jump into
|
||||||
|
debug mode instead.
|
||||||
|
|
||||||
(3) Debug mode.
|
(3) Debug mode.
|
||||||
|
|
||||||
No exceptions may happen in this mode. Memory protection and management exceptions will be
|
No exceptions may happen in this mode. Memory protection and
|
||||||
flagged for later consideration, but the exception handler won't be invoked. Debugging traps
|
management exceptions will be flagged for later consideration, but
|
||||||
such as hardware breakpoints and watchpoints will be ignored. This mode is entered only by
|
the exception handler won't be invoked. Debugging traps such as
|
||||||
debugging events obtained from the other two modes.
|
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
|
INTERNAL KERNEL-MODE REGISTER ABI
|
||||||
=================================
|
=================================
|
||||||
|
|
||||||
There are a number of permanent register assignments that are set up by entry.S in the exception
|
There are a number of permanent register assignments that are set up by
|
||||||
prologue. Note that there is a complete set of exception prologues for each of user->kernel
|
entry.S in the exception prologue. Note that there is a complete set of
|
||||||
transition and kernel->kernel transition. There are also user->debug and kernel->debug mode
|
exception prologues for each of user->kernel transition and kernel->kernel
|
||||||
transition prologues.
|
transition. There are also user->debug and kernel->debug mode transition
|
||||||
|
prologues.
|
||||||
|
|
||||||
|
|
||||||
REGISTER FLAVOUR USE
|
REGISTER FLAVOUR USE
|
||||||
=============== ======= ====================================================
|
=============== ======= ==============================================
|
||||||
GR1 Supervisor stack pointer
|
GR1 Supervisor stack pointer
|
||||||
GR15 Current thread info pointer
|
GR15 Current thread info pointer
|
||||||
GR16 GP-Rel base register for small data
|
GR16 GP-Rel base register for small data
|
||||||
|
@ -92,10 +99,12 @@ transition prologues.
|
||||||
GR31 NOMMU Destroyed by debug mode entry
|
GR31 NOMMU Destroyed by debug mode entry
|
||||||
GR31 MMU Destroyed by TLB miss kernel mode entry
|
GR31 MMU Destroyed by TLB miss kernel mode entry
|
||||||
CCR.ICC2 Virtual interrupt disablement tracking
|
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.
|
SCR0 MMU See mmu-layout.txt.
|
||||||
SCR1 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
|
SCR3 MMU Save for GR31 during debug exceptions
|
||||||
DAMR/IAMR NOMMU Fixed memory protection layout.
|
DAMR/IAMR NOMMU Fixed memory protection layout.
|
||||||
DAMR/IAMR MMU See mmu-layout.txt.
|
DAMR/IAMR MMU See mmu-layout.txt.
|
||||||
|
@ -104,18 +113,21 @@ transition prologues.
|
||||||
Certain registers are also used or modified across function calls:
|
Certain registers are also used or modified across function calls:
|
||||||
|
|
||||||
REGISTER CALL RETURN
|
REGISTER CALL RETURN
|
||||||
=============== =============================== ===============================
|
=============== =============================== ======================
|
||||||
GR0 Fixed Zero -
|
GR0 Fixed Zero -
|
||||||
GR2 Function call frame pointer
|
GR2 Function call frame pointer
|
||||||
GR3 Special Preserved
|
GR3 Special Preserved
|
||||||
GR3-GR7 - Clobbered
|
GR3-GR7 - Clobbered
|
||||||
GR8 Function call arg #1 Return value (or clobbered)
|
GR8 Function call arg #1 Return value
|
||||||
GR9 Function call arg #2 Return value MSW (or clobbered)
|
(or clobbered)
|
||||||
|
GR9 Function call arg #2 Return value MSW
|
||||||
|
(or clobbered)
|
||||||
GR10-GR13 Function call arg #3-#6 Clobbered
|
GR10-GR13 Function call arg #3-#6 Clobbered
|
||||||
GR14 - Clobbered
|
GR14 - Clobbered
|
||||||
GR15-GR16 Special Preserved
|
GR15-GR16 Special Preserved
|
||||||
GR17-GR27 - Preserved
|
GR17-GR27 - Preserved
|
||||||
GR28-GR31 Special Only accessed explicitly
|
GR28-GR31 Special Only accessed
|
||||||
|
explicitly
|
||||||
LR Return address after CALL Clobbered
|
LR Return address after CALL Clobbered
|
||||||
CCR/CCCR - Mostly Clobbered
|
CCR/CCCR - Mostly Clobbered
|
||||||
|
|
||||||
|
@ -124,46 +136,53 @@ Certain registers are also used or modified across function calls:
|
||||||
INTERNAL DEBUG-MODE REGISTER ABI
|
INTERNAL DEBUG-MODE REGISTER ABI
|
||||||
================================
|
================================
|
||||||
|
|
||||||
This is the same as the kernel-mode register ABI for functions calls. The difference is that in
|
This is the same as the kernel-mode register ABI for functions calls. The
|
||||||
debug-mode there's a different stack and a different exception frame. Almost all the global
|
difference is that in debug-mode there's a different stack and a different
|
||||||
registers from kernel-mode (including the stack pointer) may be changed.
|
exception frame. Almost all the global registers from kernel-mode
|
||||||
|
(including the stack pointer) may be changed.
|
||||||
|
|
||||||
REGISTER FLAVOUR USE
|
REGISTER FLAVOUR USE
|
||||||
=============== ======= ====================================================
|
=============== ======= ==============================================
|
||||||
GR1 Debug stack pointer
|
GR1 Debug stack pointer
|
||||||
GR16 GP-Rel base register for small data
|
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
|
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
|
Note that debug mode is able to interfere with the kernel's emulated atomic
|
||||||
exceedingly careful not to do any that would interact with the main kernel in this regard. Hence
|
ops, so it must be exceedingly careful not to do any that would interact
|
||||||
the debug mode code (gdbstub) is almost completely self-contained. The only external code used is
|
with the main kernel in this regard. Hence the debug mode code (gdbstub) is
|
||||||
the sprintf family of functions.
|
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
|
Futhermore, break.S is so complicated because single-step mode does not
|
||||||
exception. That means unless manually disabled, single-stepping will blithely go on stepping into
|
switch off on entry to an exception. That means unless manually disabled,
|
||||||
things like interrupts. See gdbstub.txt for more information.
|
single-stepping will blithely go on stepping into things like interrupts.
|
||||||
|
See gdbstub.txt for more information.
|
||||||
|
|
||||||
|
|
||||||
==========================
|
==========================
|
||||||
VIRTUAL INTERRUPT HANDLING
|
VIRTUAL INTERRUPT HANDLING
|
||||||
==========================
|
==========================
|
||||||
|
|
||||||
Because accesses to the PSR is so slow, and to disable interrupts we have to access it twice (once
|
Because accesses to the PSR is so slow, and to disable interrupts we have
|
||||||
to read and once to write), we don't actually disable interrupts at all if we don't have to. What
|
to access it twice (once to read and once to write), we don't actually
|
||||||
we do instead is use the ICC2 condition code flags to note virtual disablement, such that if we
|
disable interrupts at all if we don't have to. What we do instead is use
|
||||||
then do take an interrupt, we note the flag, really disable interrupts, set another flag and resume
|
the ICC2 condition code flags to note virtual disablement, such that if we
|
||||||
execution at the point the interrupt happened. Setting condition flags as a side effect of an
|
then do take an interrupt, we note the flag, really disable interrupts, set
|
||||||
arithmetic or logical instruction is really fast. This use of the ICC2 only occurs within the
|
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.
|
kernel - it does not affect userspace.
|
||||||
|
|
||||||
The flags we use are:
|
The flags we use are:
|
||||||
|
|
||||||
(*) CCR.ICC2.Z [Zero flag]
|
(*) CCR.ICC2.Z [Zero flag]
|
||||||
|
|
||||||
Set to virtually disable interrupts, clear when interrupts are virtually enabled. Can be
|
Set to virtually disable interrupts, clear when interrupts are
|
||||||
modified by logical instructions without affecting the Carry flag.
|
virtually enabled. Can be modified by logical instructions without
|
||||||
|
affecting the Carry flag.
|
||||||
|
|
||||||
(*) CCR.ICC2.C [Carry flag]
|
(*) CCR.ICC2.C [Carry flag]
|
||||||
|
|
||||||
|
@ -176,8 +195,9 @@ What happens is this:
|
||||||
|
|
||||||
ICC2.Z is 0, ICC2.C is 1.
|
ICC2.Z is 0, ICC2.C is 1.
|
||||||
|
|
||||||
(2) An interrupt occurs. The exception prologue examines ICC2.Z and determines that nothing needs
|
(2) An interrupt occurs. The exception prologue examines ICC2.Z and
|
||||||
doing. This is done simply with an unlikely BEQ instruction.
|
determines that nothing needs doing. This is done simply with an
|
||||||
|
unlikely BEQ instruction.
|
||||||
|
|
||||||
(3) The interrupts are disabled (local_irq_disable)
|
(3) The interrupts are disabled (local_irq_disable)
|
||||||
|
|
||||||
|
@ -187,48 +207,56 @@ What happens is this:
|
||||||
|
|
||||||
ICC2.Z would be set to 0.
|
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
|
A TIHI #2 instruction (trap #2 if condition HI - Z==0 && C==0) would
|
||||||
interrupts were now virtually enabled, but physically disabled - which they're not, so the
|
be used to trap if interrupts were now virtually enabled, but
|
||||||
trap isn't taken. The kernel would then be back to state (1).
|
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
|
(5) An interrupt occurs. The exception prologue examines ICC2.Z and
|
||||||
shouldn't actually have happened. It jumps aside, and there disabled interrupts by setting
|
determines that the interrupt shouldn't actually have happened. It
|
||||||
PSR.PIL to 14 and then it clears ICC2.C.
|
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):
|
(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):
|
(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
|
ICC2.Z would be set to indicate the result of XOR'ing the saved
|
||||||
gives a result of 0 - thus leaving ICC2.Z set.
|
value (ie: 1) with 1, which gives a result of 0 - thus leaving
|
||||||
|
ICC2.Z set.
|
||||||
|
|
||||||
ICC2.C would remain unaffected (ie: 0).
|
ICC2.C would remain unaffected (ie: 0).
|
||||||
|
|
||||||
A TIHI #2 instruction would be used to again assay the current state, but this would do
|
A TIHI #2 instruction would be used to again assay the current state,
|
||||||
nothing as Z==1.
|
but this would do nothing as Z==1.
|
||||||
|
|
||||||
(8) If interrupts were then enabled (local_irq_enable):
|
(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
|
A TIHI #2 instruction again issued to assay the current state would
|
||||||
[interrupts virtually enabled] and C==0 [interrupts really disabled] would then be true.
|
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
|
(9) The trap #2 handler would simply enable hardware interrupts
|
||||||
1 and return.
|
(set PSR.PIL to 0), set ICC2.C to 1 and return.
|
||||||
|
|
||||||
(10) Immediately upon returning, the pending interrupt would be taken.
|
(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
|
(11) The interrupt handler would take the path of actually processing the
|
||||||
clear, BEQ fails as per step (2)).
|
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
|
(12) The interrupt handler would then set ICC2.C to 1 since hardware
|
||||||
enabled - or else the kernel wouldn't be here.
|
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).
|
(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)
|
teletext adapters)
|
||||||
|
|
||||||
It currently supports the following devices:
|
It currently supports the following devices:
|
||||||
* Philips adapter
|
* (type=0) Philips adapter
|
||||||
* home brew teletext adapter
|
* (type=1) home brew teletext adapter
|
||||||
* Velleman K8000 adapter
|
* (type=2) Velleman K8000 adapter
|
||||||
* ELV adapter
|
* (type=3) ELV adapter
|
||||||
* Analog Devices evaluation boards (ADM1025, ADM1030, ADM1031, ADM1032)
|
* (type=4) Analog Devices ADM1032 evaluation board
|
||||||
* Barco LPT->DVI (K5800236) adapter
|
* (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
|
These devices use different pinout configurations, so you have to tell
|
||||||
the driver what you have, using the type module parameter. There is no
|
the driver what you have, using the type module parameter. There is no
|
||||||
way to autodetect the devices. Support for different pinout configurations
|
way to autodetect the devices. Support for different pinout configurations
|
||||||
can be easily added when needed.
|
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
|
Building your own adapter
|
||||||
-------------------------
|
-------------------------
|
||||||
|
|
|
@ -36,12 +36,12 @@ with them.
|
||||||
|
|
||||||
All NES and SNES use the same synchronous serial protocol, clocked from
|
All NES and SNES use the same synchronous serial protocol, clocked from
|
||||||
the computer's side (and thus timing insensitive). To allow up to 5 NES
|
the computer's side (and thus timing insensitive). To allow up to 5 NES
|
||||||
and/or SNES gamepads connected to the parallel port at once, the output
|
and/or SNES gamepads and/or SNES mice connected to the parallel port at once,
|
||||||
lines of the parallel port are shared, while one of 5 available input lines
|
the output lines of the parallel port are shared, while one of 5 available
|
||||||
is assigned to each gamepad.
|
input lines is assigned to each gamepad.
|
||||||
|
|
||||||
This protocol is handled by the gamecon.c driver, so that's the one
|
This protocol is handled by the gamecon.c driver, so that's the one
|
||||||
you'll use for NES and SNES gamepads.
|
you'll use for NES, SNES gamepads and SNES mice.
|
||||||
|
|
||||||
The main problem with PC parallel ports is that they don't have +5V power
|
The main problem with PC parallel ports is that they don't have +5V power
|
||||||
source on any of their pins. So, if you want a reliable source of power
|
source on any of their pins. So, if you want a reliable source of power
|
||||||
|
@ -106,7 +106,7 @@ A, Turbo B, Select and Start, and is connected through 5 wires, then it is
|
||||||
either a NES or NES clone and will work with this connection. SNES gamepads
|
either a NES or NES clone and will work with this connection. SNES gamepads
|
||||||
also use 5 wires, but have more buttons. They will work as well, of course.
|
also use 5 wires, but have more buttons. They will work as well, of course.
|
||||||
|
|
||||||
Pinout for NES gamepads Pinout for SNES gamepads
|
Pinout for NES gamepads Pinout for SNES gamepads and mice
|
||||||
|
|
||||||
+----> Power +-----------------------\
|
+----> Power +-----------------------\
|
||||||
| 7 | o o o o | x x o | 1
|
| 7 | o o o o | x x o | 1
|
||||||
|
@ -454,6 +454,7 @@ uses the following kernel/module command line:
|
||||||
6 | N64 pad
|
6 | N64 pad
|
||||||
7 | Sony PSX controller
|
7 | Sony PSX controller
|
||||||
8 | Sony PSX DDR controller
|
8 | Sony PSX DDR controller
|
||||||
|
9 | SNES mouse
|
||||||
|
|
||||||
The exact type of the PSX controller type is autoprobed when used so
|
The exact type of the PSX controller type is autoprobed when used so
|
||||||
hot swapping should work (but is not recomended).
|
hot swapping should work (but is not recomended).
|
||||||
|
|
286
Documentation/isdn/README.gigaset
Normal file
286
Documentation/isdn/README.gigaset
Normal file
|
@ -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
|
of modules. The author of an external modules should supply
|
||||||
a makefile that hides most of the complexity so one only has to type
|
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
|
'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
|
=== 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
|
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
|
usbcore.blinkenlights=1
|
||||||
|
|
||||||
The text in square brackets at the beginning of the description states the
|
This document may not be entirely up to date and comprehensive. The command
|
||||||
restrictions on the kernel for the said kernel parameter to be valid. The
|
"modinfo -p ${modulename}" shows a current list of all parameters of a loadable
|
||||||
restrictions referred to are that the relevant option is valid if:
|
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.
|
ACPI ACPI support is enabled.
|
||||||
ALSA ALSA sound 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
|
noltlbs [PPC] Do not use large page/tlb entries for kernel
|
||||||
lowmem mapping on PPC40x.
|
lowmem mapping on PPC40x.
|
||||||
|
|
||||||
nomce [IA-32] Machine Check Exception
|
|
||||||
|
|
||||||
nomca [IA-64] Disable machine check abort handling
|
nomca [IA-64] Disable machine check abort handling
|
||||||
|
|
||||||
|
nomce [IA-32] Machine Check Exception
|
||||||
|
|
||||||
noresidual [PPC] Don't use residual data on PReP machines.
|
noresidual [PPC] Don't use residual data on PReP machines.
|
||||||
|
|
||||||
noresume [SWSUSP] Disables resume and restores original swap
|
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:
|
TODO:
|
||||||
|
|
||||||
|
|
|
@ -919,11 +919,11 @@ int main(int argc, char **argv)
|
||||||
int settle_time = 60;
|
int settle_time = 60;
|
||||||
|
|
||||||
/* Parse the simple command-line */
|
/* Parse the simple command-line */
|
||||||
if (ac == 2)
|
if (argc == 2)
|
||||||
disk = av[1];
|
disk = argv[1];
|
||||||
else if (ac == 4) {
|
else if (argc == 4) {
|
||||||
settle_time = atoi(av[2]);
|
settle_time = atoi(argv[2]);
|
||||||
disk = av[3];
|
disk = argv[3];
|
||||||
} else
|
} else
|
||||||
usage();
|
usage();
|
||||||
|
|
||||||
|
|
71
Documentation/leds-class.txt
Normal file
71
Documentation/leds-class.txt
Normal file
|
@ -0,0 +1,71 @@
|
||||||
|
LED handling under Linux
|
||||||
|
========================
|
||||||
|
|
||||||
|
If you're reading this and thinking about keyboard leds, these are
|
||||||
|
handled by the input subsystem and the led class is *not* needed.
|
||||||
|
|
||||||
|
In its simplest form, the LED class just allows control of LEDs from
|
||||||
|
userspace. LEDs appear in /sys/class/leds/. The brightness file will
|
||||||
|
set the brightness of the LED (taking a value 0-255). Most LEDs don't
|
||||||
|
have hardware brightness support so will just be turned on for non-zero
|
||||||
|
brightness settings.
|
||||||
|
|
||||||
|
The class also introduces the optional concept of an LED trigger. A trigger
|
||||||
|
is a kernel based source of led events. Triggers can either be simple or
|
||||||
|
complex. A simple trigger isn't configurable and is designed to slot into
|
||||||
|
existing subsystems with minimal additional code. Examples are the ide-disk,
|
||||||
|
nand-disk and sharpsl-charge triggers. With led triggers disabled, the code
|
||||||
|
optimises away.
|
||||||
|
|
||||||
|
Complex triggers whilst available to all LEDs have LED specific
|
||||||
|
parameters and work on a per LED basis. The timer trigger is an example.
|
||||||
|
|
||||||
|
You can change triggers in a similar manner to the way an IO scheduler
|
||||||
|
is chosen (via /sys/class/leds/<device>/trigger). Trigger specific
|
||||||
|
parameters can appear in /sys/class/leds/<device> once a given trigger is
|
||||||
|
selected.
|
||||||
|
|
||||||
|
|
||||||
|
Design Philosophy
|
||||||
|
=================
|
||||||
|
|
||||||
|
The underlying design philosophy is simplicity. LEDs are simple devices
|
||||||
|
and the aim is to keep a small amount of code giving as much functionality
|
||||||
|
as possible. Please keep this in mind when suggesting enhancements.
|
||||||
|
|
||||||
|
|
||||||
|
LED Device Naming
|
||||||
|
=================
|
||||||
|
|
||||||
|
Is currently of the form:
|
||||||
|
|
||||||
|
"devicename:colour"
|
||||||
|
|
||||||
|
There have been calls for LED properties such as colour to be exported as
|
||||||
|
individual led class attributes. As a solution which doesn't incur as much
|
||||||
|
overhead, I suggest these become part of the device name. The naming scheme
|
||||||
|
above leaves scope for further attributes should they be needed.
|
||||||
|
|
||||||
|
|
||||||
|
Known Issues
|
||||||
|
============
|
||||||
|
|
||||||
|
The LED Trigger core cannot be a module as the simple trigger functions
|
||||||
|
would cause nightmare dependency issues. I see this as a minor issue
|
||||||
|
compared to the benefits the simple trigger functionality brings. The
|
||||||
|
rest of the LED subsystem can be modular.
|
||||||
|
|
||||||
|
Some leds can be programmed to flash in hardware. As this isn't a generic
|
||||||
|
LED device property, this should be exported as a device specific sysfs
|
||||||
|
attribute rather than part of the class if this functionality is required.
|
||||||
|
|
||||||
|
|
||||||
|
Future Development
|
||||||
|
==================
|
||||||
|
|
||||||
|
At the moment, a trigger can't be created specifically for a single LED.
|
||||||
|
There are a number of cases where a trigger might only be mappable to a
|
||||||
|
particular LED (ACPI?). The addition of triggers provided by the LED driver
|
||||||
|
should cover this option and be possible to add without breaking the
|
||||||
|
current interface.
|
||||||
|
|
1941
Documentation/memory-barriers.txt
Normal file
1941
Documentation/memory-barriers.txt
Normal file
File diff suppressed because it is too large
Load diff
|
@ -138,19 +138,29 @@ Reading MTRRs from a C program using ioctl()'s:
|
||||||
|
|
||||||
*/
|
*/
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <sys/ioctl.h>
|
#include <sys/ioctl.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#define MTRR_NEED_STRINGS
|
|
||||||
#include <asm/mtrr.h>
|
#include <asm/mtrr.h>
|
||||||
|
|
||||||
#define TRUE 1
|
#define TRUE 1
|
||||||
#define FALSE 0
|
#define FALSE 0
|
||||||
#define ERRSTRING strerror (errno)
|
#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 main ()
|
||||||
{
|
{
|
||||||
|
@ -232,13 +242,22 @@ Creating MTRRs from a C programme using ioctl()'s:
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <sys/ioctl.h>
|
#include <sys/ioctl.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#define MTRR_NEED_STRINGS
|
|
||||||
#include <asm/mtrr.h>
|
#include <asm/mtrr.h>
|
||||||
|
|
||||||
#define TRUE 1
|
#define TRUE 1
|
||||||
#define FALSE 0
|
#define FALSE 0
|
||||||
#define ERRSTRING strerror (errno)
|
#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)
|
int main (int argc, char **argv)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,18 +0,0 @@
|
||||||
To-do items for network drivers
|
|
||||||
-------------------------------
|
|
||||||
|
|
||||||
* Move ethernet crc routine to generic code
|
|
||||||
|
|
||||||
* (for 2.5) Integrate Jamal Hadi Salim's netdev Rx polling API change
|
|
||||||
|
|
||||||
* Audit all net drivers to make sure magic packet / wake-on-lan /
|
|
||||||
similar features are disabled in the driver by default.
|
|
||||||
|
|
||||||
* Audit all net drivers to make sure the module always prints out a
|
|
||||||
version string when loaded as a module, but only prints a version
|
|
||||||
string when built into the kernel if a device is detected.
|
|
||||||
|
|
||||||
* Add ETHTOOL_GDRVINFO ioctl support to all ethernet drivers.
|
|
||||||
|
|
||||||
* dmfe PCI DMA is totally wrong and only works on x86
|
|
||||||
|
|
36
Documentation/networking/bcm43xx.txt
Normal file
36
Documentation/networking/bcm43xx.txt
Normal file
|
@ -0,0 +1,36 @@
|
||||||
|
|
||||||
|
BCM43xx Linux Driver Project
|
||||||
|
============================
|
||||||
|
|
||||||
|
About this software
|
||||||
|
-------------------
|
||||||
|
|
||||||
|
The goal of this project is to develop a linux driver for Broadcom
|
||||||
|
BCM43xx chips, based on the specification at
|
||||||
|
http://bcm-specs.sipsolutions.net/
|
||||||
|
|
||||||
|
The project page is http://bcm43xx.berlios.de/
|
||||||
|
|
||||||
|
|
||||||
|
Requirements
|
||||||
|
------------
|
||||||
|
|
||||||
|
1) Linux Kernel 2.6.16 or later
|
||||||
|
http://www.kernel.org/
|
||||||
|
|
||||||
|
You may want to configure your kernel with:
|
||||||
|
|
||||||
|
CONFIG_DEBUG_FS (optional):
|
||||||
|
-> Kernel hacking
|
||||||
|
-> Debug Filesystem
|
||||||
|
|
||||||
|
2) SoftMAC IEEE 802.11 Networking Stack extension and patched ieee80211
|
||||||
|
modules:
|
||||||
|
http://softmac.sipsolutions.net/
|
||||||
|
|
||||||
|
3) Firmware Files
|
||||||
|
|
||||||
|
Please try fwcutter. Fwcutter can extract the firmware from various
|
||||||
|
binary driver files. It supports driver files from Windows, MacOS and
|
||||||
|
Linux. You can get fwcutter from http://bcm43xx.berlios.de/.
|
||||||
|
Also, fwcutter comes with a README file for further instructions.
|
|
@ -254,7 +254,7 @@ and, the number of frames be
|
||||||
|
|
||||||
<block number> * <block size> / <frame size>
|
<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:
|
i386 architecture:
|
||||||
|
|
||||||
<size-max> = 131072 bytes
|
<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.
|
ethernet frames when using tap.
|
||||||
|
|
||||||
5. What is the difference between BPF and TUN/TAP driver?
|
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.
|
network interface. It does not provide a virtual network interface.
|
||||||
A TUN/TAP driver does provide a virtual network interface and it is possible
|
A TUN/TAP driver does provide a virtual network interface and it is possible
|
||||||
to attach BPF to this interface.
|
to attach BPF to this interface.
|
||||||
|
|
166
Documentation/networking/xfrm_sync.txt
Normal file
166
Documentation/networking/xfrm_sync.txt
Normal file
|
@ -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
|
|
@ -1,5 +1,11 @@
|
||||||
This file details changes in 2.6 which affect PCMCIA card driver authors:
|
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
|
* Unify detach and REMOVAL event code, as well as attach and INSERTION
|
||||||
code (as of 2.6.16)
|
code (as of 2.6.16)
|
||||||
void (*remove) (struct pcmcia_device *dev);
|
void (*remove) (struct pcmcia_device *dev);
|
||||||
|
|
|
@ -719,6 +719,11 @@ address which can extend beyond that limit.
|
||||||
- model : this is your board name/model
|
- model : this is your board name/model
|
||||||
- #address-cells : address representation for "root" devices
|
- #address-cells : address representation for "root" devices
|
||||||
- #size-cells: the size representation for "root" devices
|
- #size-cells: the size representation for "root" devices
|
||||||
|
- device_type : This property shouldn't be necessary. However, if
|
||||||
|
you decide to create a device_type for your root node, make sure it
|
||||||
|
is _not_ "chrp" unless your platform is a pSeries or PAPR compliant
|
||||||
|
one for 64-bit, or a CHRP-type machine for 32-bit as this will
|
||||||
|
matched by the kernel this way.
|
||||||
|
|
||||||
Additionally, some recommended properties are:
|
Additionally, some recommended properties are:
|
||||||
|
|
||||||
|
|
|
@ -19,9 +19,9 @@ TABLE OF CONTENTS
|
||||||
[2-1-1] Overview
|
[2-1-1] Overview
|
||||||
[2-1-2] Flow of scmds through EH
|
[2-1-2] Flow of scmds through EH
|
||||||
[2-1-3] Flow of control
|
[2-1-3] Flow of control
|
||||||
[2-2] EH through hostt->eh_strategy_handler()
|
[2-2] EH through transportt->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
|
||||||
[2-2-2] Post hostt->eh_strategy_handler() SCSI midlayer conditions
|
[2-2-2] Post transportt->eh_strategy_handler() SCSI midlayer conditions
|
||||||
[2-2-3] Things to consider
|
[2-2-3] Things to consider
|
||||||
|
|
||||||
|
|
||||||
|
@ -413,9 +413,9 @@ scmd->allowed.
|
||||||
layer of failure of the scmds.
|
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.
|
scsi_unjam_host() and it is responsible for whole recovery process.
|
||||||
On completion, the handler should have made lower layers forget about
|
On completion, the handler should have made lower layers forget about
|
||||||
all failed scmds and either ready for new commands or offline. Also,
|
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().
|
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.
|
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
|
- 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.
|
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_bus_reset_handler - issue SCSI bus reset
|
||||||
eh_device_reset_handler - issue SCSI device reset
|
eh_device_reset_handler - issue SCSI device reset
|
||||||
eh_host_reset_handler - reset host (host bus adapter)
|
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
|
info - supply information about given host
|
||||||
ioctl - driver can respond to ioctls
|
ioctl - driver can respond to ioctls
|
||||||
proc_info - supports /proc/scsi/{driver_name}/{host_no}
|
proc_info - supports /proc/scsi/{driver_name}/{host_no}
|
||||||
|
@ -969,24 +968,6 @@ Details:
|
||||||
int eh_host_reset_handler(struct scsi_cmnd * scp)
|
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
|
* info - supply information about given host: driver name plus data
|
||||||
* to distinguish given host
|
* 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
|
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
|
driver. It is not complete, any questions you have should be directed to
|
||||||
<rmk@arm.linux.org.uk>
|
<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
|
the correct port structure (via uart_get_console) and decoding command line
|
||||||
arguments (uart_parse_options).
|
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
|
Locking
|
||||||
-------
|
-------
|
||||||
|
@ -86,6 +88,7 @@ hardware.
|
||||||
- TIOCM_DTR DTR signal.
|
- TIOCM_DTR DTR signal.
|
||||||
- TIOCM_OUT1 OUT1 signal.
|
- TIOCM_OUT1 OUT1 signal.
|
||||||
- TIOCM_OUT2 OUT2 signal.
|
- TIOCM_OUT2 OUT2 signal.
|
||||||
|
- TIOCM_LOOP Set the port into loopback mode.
|
||||||
If the appropriate bit is set, the signal should be driven
|
If the appropriate bit is set, the signal should be driven
|
||||||
active. If the bit is clear, the signal should be driven
|
active. If the bit is clear, the signal should be driven
|
||||||
inactive.
|
inactive.
|
||||||
|
@ -141,6 +144,10 @@ hardware.
|
||||||
enable_ms(port)
|
enable_ms(port)
|
||||||
Enable the modem status interrupts.
|
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.
|
Locking: port->lock taken.
|
||||||
Interrupts: locally disabled.
|
Interrupts: locally disabled.
|
||||||
This call must not sleep
|
This call must not sleep
|
||||||
|
@ -160,6 +167,8 @@ hardware.
|
||||||
state. Enable the port for reception. It should not activate
|
state. Enable the port for reception. It should not activate
|
||||||
RTS nor DTR; this will be done via a separate call to set_mctrl.
|
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.
|
Locking: port_sem taken.
|
||||||
Interrupts: globally disabled.
|
Interrupts: globally disabled.
|
||||||
|
|
||||||
|
@ -169,6 +178,11 @@ hardware.
|
||||||
RTS nor DTR; this will have already been done via a separate
|
RTS nor DTR; this will have already been done via a separate
|
||||||
call to set_mctrl.
|
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.
|
Locking: port_sem taken.
|
||||||
Interrupts: caller dependent.
|
Interrupts: caller dependent.
|
||||||
|
|
||||||
|
|
|
@ -120,6 +120,34 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
|
||||||
enable - enable card
|
enable - enable card
|
||||||
- Default: enabled, for PCI and ISA PnP cards
|
- 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
|
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.
|
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
|
Module snd-als4000
|
||||||
------------------
|
------------------
|
||||||
|
|
||||||
|
@ -701,6 +738,7 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
|
||||||
uniwill 3-jack
|
uniwill 3-jack
|
||||||
F1734 2-jack
|
F1734 2-jack
|
||||||
lg LG laptop (m1 express dual)
|
lg LG laptop (m1 express dual)
|
||||||
|
lg-lw LG LW20 laptop
|
||||||
test for testing/debugging purpose, almost all controls can be
|
test for testing/debugging purpose, almost all controls can be
|
||||||
adjusted. Appearing only when compiled with
|
adjusted. Appearing only when compiled with
|
||||||
$CONFIG_SND_DEBUG=y
|
$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.
|
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
|
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.
|
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
|
Module snd-rme32
|
||||||
----------------
|
----------------
|
||||||
|
|
||||||
|
|
|
@ -1123,8 +1123,8 @@
|
||||||
if ((err = pci_enable_device(pci)) < 0)
|
if ((err = pci_enable_device(pci)) < 0)
|
||||||
return err;
|
return err;
|
||||||
/* check PCI availability (28bit DMA) */
|
/* check PCI availability (28bit DMA) */
|
||||||
if (pci_set_dma_mask(pci, 0x0fffffff) < 0 ||
|
if (pci_set_dma_mask(pci, DMA_28BIT_MASK) < 0 ||
|
||||||
pci_set_consistent_dma_mask(pci, 0x0fffffff) < 0) {
|
pci_set_consistent_dma_mask(pci, DMA_28BIT_MASK) < 0) {
|
||||||
printk(KERN_ERR "error to set 28bit mask DMA\n");
|
printk(KERN_ERR "error to set 28bit mask DMA\n");
|
||||||
pci_disable_device(pci);
|
pci_disable_device(pci);
|
||||||
return -ENXIO;
|
return -ENXIO;
|
||||||
|
@ -1216,7 +1216,7 @@
|
||||||
The allocation of PCI resources is done in the
|
The allocation of PCI resources is done in the
|
||||||
<function>probe()</function> function, and usually an extra
|
<function>probe()</function> function, and usually an extra
|
||||||
<function>xxx_create()</function> function is written for this
|
<function>xxx_create()</function> function is written for this
|
||||||
purpose.
|
purpose.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
|
@ -1225,7 +1225,7 @@
|
||||||
allocating resources. Also, you need to set the proper PCI DMA
|
allocating resources. Also, you need to set the proper PCI DMA
|
||||||
mask to limit the accessed i/o range. In some cases, you might
|
mask to limit the accessed i/o range. In some cases, you might
|
||||||
need to call <function>pci_set_master()</function> function,
|
need to call <function>pci_set_master()</function> function,
|
||||||
too.
|
too.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
|
@ -1236,8 +1236,8 @@
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
if ((err = pci_enable_device(pci)) < 0)
|
if ((err = pci_enable_device(pci)) < 0)
|
||||||
return err;
|
return err;
|
||||||
if (pci_set_dma_mask(pci, 0x0fffffff) < 0 ||
|
if (pci_set_dma_mask(pci, DMA_28BIT_MASK) < 0 ||
|
||||||
pci_set_consistent_dma_mask(pci, 0x0fffffff) < 0) {
|
pci_set_consistent_dma_mask(pci, DMA_28BIT_MASK) < 0) {
|
||||||
printk(KERN_ERR "error to set 28bit mask DMA\n");
|
printk(KERN_ERR "error to set 28bit mask DMA\n");
|
||||||
pci_disable_device(pci);
|
pci_disable_device(pci);
|
||||||
return -ENXIO;
|
return -ENXIO;
|
||||||
|
@ -1256,13 +1256,13 @@
|
||||||
functions. Unlike ALSA ver.0.5.x., there are no helpers for
|
functions. Unlike ALSA ver.0.5.x., there are no helpers for
|
||||||
that. And these resources must be released in the destructor
|
that. And these resources must be released in the destructor
|
||||||
function (see below). Also, on ALSA 0.9.x, you don't need to
|
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>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Now assume that this PCI device has an I/O port with 8 bytes
|
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
|
and an interrupt. Then struct <structname>mychip</structname> will have the
|
||||||
following fields:
|
following fields:
|
||||||
|
|
||||||
<informalexample>
|
<informalexample>
|
||||||
<programlisting>
|
<programlisting>
|
||||||
|
|
|
@ -52,7 +52,7 @@
|
||||||
51 -> ProVideo PV952 [1540:9524]
|
51 -> ProVideo PV952 [1540:9524]
|
||||||
52 -> AverMedia AverTV/305 [1461:2108]
|
52 -> AverMedia AverTV/305 [1461:2108]
|
||||||
53 -> ASUS TV-FM 7135 [1043:4845]
|
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]
|
55 -> LifeView FlyDVB-T DUO [5168:0306]
|
||||||
56 -> Avermedia AVerTV 307 [1461:a70a]
|
56 -> Avermedia AVerTV 307 [1461:a70a]
|
||||||
57 -> Avermedia AVerTV GO 007 FM [1461:f31f]
|
57 -> Avermedia AVerTV GO 007 FM [1461:f31f]
|
||||||
|
@ -84,7 +84,7 @@
|
||||||
83 -> Terratec Cinergy 250 PCI TV [153b:1160]
|
83 -> Terratec Cinergy 250 PCI TV [153b:1160]
|
||||||
84 -> LifeView FlyDVB Trio [5168:0319]
|
84 -> LifeView FlyDVB Trio [5168:0319]
|
||||||
85 -> AverTV DVB-T 777 [1461:2c05]
|
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]
|
87 -> ADS Instant TV Duo Cardbus PTV331 [0331:1421]
|
||||||
88 -> Tevion/KWorld DVB-T 220RF [17de:7201]
|
88 -> Tevion/KWorld DVB-T 220RF [17de:7201]
|
||||||
89 -> ELSA EX-VISION 700TV [1048:226c]
|
89 -> ELSA EX-VISION 700TV [1048:226c]
|
||||||
|
@ -92,3 +92,4 @@
|
||||||
91 -> AVerMedia A169 B [1461:7360]
|
91 -> AVerMedia A169 B [1461:7360]
|
||||||
92 -> AVerMedia A169 B1 [1461:6360]
|
92 -> AVerMedia A169 B1 [1461:6360]
|
||||||
93 -> Medion 7134 Bridge #2 [16be:0005]
|
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 Linux box with USB support (2.3/2.4; 2.2 w/backport may work)
|
||||||
|
|
||||||
- A Video4Linux compatible frame grabber program such as xawtv.
|
- A Video4Linux compatible frame grabber program such as xawtv.
|
||||||
|
|
||||||
HOW TO COMPILE THE DRIVER:
|
HOW TO COMPILE THE DRIVER:
|
||||||
|
|
||||||
You need to compile the driver only if you are a developer
|
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.
|
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.
|
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
|
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
|
API. Most V4L apps are compatible with it. Most resolutions with a width and
|
||||||
height that are a multiple of 8 are supported.
|
height that are a multiple of 8 are supported.
|
||||||
|
@ -52,15 +52,15 @@ from it:
|
||||||
|
|
||||||
chmod 666 /dev/video
|
chmod 666 /dev/video
|
||||||
chmod 666 /dev/video0 (if necessary)
|
chmod 666 /dev/video0 (if necessary)
|
||||||
|
|
||||||
Now you are ready to run a video app! Both vidcat and xawtv work well for me
|
Now you are ready to run a video app! Both vidcat and xawtv work well for me
|
||||||
at 640x480.
|
at 640x480.
|
||||||
|
|
||||||
[Using vidcat:]
|
[Using vidcat:]
|
||||||
|
|
||||||
vidcat -s 640x480 -p c > test.jpg
|
vidcat -s 640x480 -p c > test.jpg
|
||||||
xview test.jpg
|
xview test.jpg
|
||||||
|
|
||||||
[Using xawtv:]
|
[Using xawtv:]
|
||||||
|
|
||||||
From the main xawtv directory:
|
From the main xawtv directory:
|
||||||
|
@ -70,7 +70,7 @@ From the main xawtv directory:
|
||||||
make
|
make
|
||||||
make install
|
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:
|
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
|
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
|
image capture working. Thanks to Orion Sky Lawlor, Kevin Moore, and Claudio
|
||||||
Matsuoka for their work as well.
|
Matsuoka for their work as well.
|
||||||
|
|
|
@ -174,7 +174,7 @@ Module parameters are listed below:
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Name: video_nr
|
Name: video_nr
|
||||||
Type: short array (min = 0, max = 64)
|
Type: short array (min = 0, max = 64)
|
||||||
Syntax: <-1|n[,...]>
|
Syntax: <-1|n[,...]>
|
||||||
Description: Specify V4L2 minor mode number:
|
Description: Specify V4L2 minor mode number:
|
||||||
-1 = use next available
|
-1 = use next available
|
||||||
n = use minor number n
|
n = use minor number n
|
||||||
|
@ -187,7 +187,7 @@ Default: -1
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Name: force_munmap
|
Name: force_munmap
|
||||||
Type: bool array (min = 0, max = 64)
|
Type: bool array (min = 0, max = 64)
|
||||||
Syntax: <0|1[,...]>
|
Syntax: <0|1[,...]>
|
||||||
Description: Force the application to unmap previously mapped buffer memory
|
Description: Force the application to unmap previously mapped buffer memory
|
||||||
before calling any VIDIOC_S_CROP or VIDIOC_S_FMT ioctl's. Not
|
before calling any VIDIOC_S_CROP or VIDIOC_S_FMT ioctl's. Not
|
||||||
all the applications support this feature. This parameter is
|
all the applications support this feature. This parameter is
|
||||||
|
@ -206,7 +206,7 @@ Default: 2
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Name: debug
|
Name: debug
|
||||||
Type: ushort
|
Type: ushort
|
||||||
Syntax: <n>
|
Syntax: <n>
|
||||||
Description: Debugging information level, from 0 to 3:
|
Description: Debugging information level, from 0 to 3:
|
||||||
0 = none (use carefully)
|
0 = none (use carefully)
|
||||||
1 = critical errors
|
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
|
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
|
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
|
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:
|
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:
|
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]
|
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)]
|
... B[(n-1)(m-2)] G[(n-1)(m-1)]
|
||||||
... G[n(m-2)] R[n(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
|
The algorithm purely describes the conversion from compressed Bayer code used
|
||||||
in the SN9C10x chips to uncompressed Bayer. Additional steps are required to
|
in the SN9C10x chips to uncompressed Bayer. Additional steps are required to
|
||||||
convert this to a color image (i.e. a color interpolation algorithm).
|
convert this to a color image (i.e. a color interpolation algorithm).
|
||||||
|
|
||||||
The following Huffman codes have been found:
|
The following Huffman codes have been found:
|
||||||
0: +0 (relative to reference pixel value)
|
0: +0 (relative to reference pixel value)
|
||||||
100: +4
|
100: +4
|
||||||
101: -4?
|
101: -4?
|
||||||
1110xxxx: set absolute value to xxxx.0000
|
1110xxxx: set absolute value to xxxx.0000
|
||||||
1101: +11
|
1101: +11
|
||||||
1111: -11
|
1111: -11
|
||||||
11001: +20
|
11001: +20
|
|
@ -5,15 +5,15 @@ Copyright, 2001, Kevin Sisson
|
||||||
|
|
||||||
INTRODUCTION:
|
INTRODUCTION:
|
||||||
|
|
||||||
STMicroelectronics produces the STV0680B chip, which comes in two
|
STMicroelectronics produces the STV0680B chip, which comes in two
|
||||||
types, -001 and -003. The -003 version allows the recording and downloading
|
types, -001 and -003. The -003 version allows the recording and downloading
|
||||||
of sound clips from the camera, and allows a flash attachment. Otherwise,
|
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
|
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
|
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
|
CIF pictures. The STV0680 supports either a serial or a usb interface, and
|
||||||
video is possible through the usb interface.
|
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:
|
camera with Vendor/Product codes of 0553/0202 should work:
|
||||||
|
|
||||||
Aiptek Pencam (various models)
|
Aiptek Pencam (various models)
|
||||||
|
@ -34,15 +34,15 @@ http://www.linux-usb.org
|
||||||
MODULE OPTIONS:
|
MODULE OPTIONS:
|
||||||
|
|
||||||
When the driver is compiled as a module, you can set a "swapRGB=1"
|
When the driver is compiled as a module, you can set a "swapRGB=1"
|
||||||
option, if necessary, for those applications that require it
|
option, if necessary, for those applications that require it
|
||||||
(such as xawtv). However, the driver should detect and set this
|
(such as xawtv). However, the driver should detect and set this
|
||||||
automatically, so this option should not normally be used.
|
automatically, so this option should not normally be used.
|
||||||
|
|
||||||
|
|
||||||
KNOWN PROBLEMS:
|
KNOWN PROBLEMS:
|
||||||
|
|
||||||
The driver seems to work better with the usb-ohci than the usb-uhci host
|
The driver seems to work better with the usb-ohci than the usb-uhci host
|
||||||
controller driver.
|
controller driver.
|
||||||
|
|
||||||
HELP:
|
HELP:
|
||||||
|
|
||||||
|
@ -50,6 +50,4 @@ The latest info on this driver can be found at:
|
||||||
http://personal.clt.bellsouth.net/~kjsisson or at
|
http://personal.clt.bellsouth.net/~kjsisson or at
|
||||||
http://stv0680-usb.sourceforge.net
|
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)
|
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
|
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
|
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.
|
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
|
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
|
enabled for the 'ovcamchip' module to be loaded and for
|
||||||
this parameter to be present.
|
this parameter to be present.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Name: simcams
|
Name: simcams
|
||||||
Type: int
|
Type: int
|
||||||
Syntax: <n>
|
Syntax: <n>
|
||||||
Description: Number of cameras allowed to stream simultaneously.
|
Description: Number of cameras allowed to stream simultaneously.
|
||||||
n may vary from 0 to 32.
|
n may vary from 0 to 32.
|
||||||
Default: 32
|
Default: 32
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Name: video_nr
|
Name: video_nr
|
||||||
Type: int array (min = 0, max = 32)
|
Type: int array (min = 0, max = 32)
|
||||||
Syntax: <-1|n[,...]>
|
Syntax: <-1|n[,...]>
|
||||||
Description: Specify V4L minor mode number.
|
Description: Specify V4L minor mode number.
|
||||||
-1 = use next available
|
-1 = use next available
|
||||||
n = use minor number n
|
n = use minor number n
|
||||||
|
@ -219,7 +219,7 @@ Default: -1
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Name: packet_size
|
Name: packet_size
|
||||||
Type: int array (min = 0, max = 32)
|
Type: int array (min = 0, max = 32)
|
||||||
Syntax: <n[,...]>
|
Syntax: <n[,...]>
|
||||||
Description: Specify the maximum data payload size in bytes for alternate
|
Description: Specify the maximum data payload size in bytes for alternate
|
||||||
settings, for each device. n is scaled between 63 and 1023.
|
settings, for each device. n is scaled between 63 and 1023.
|
||||||
Default: 1023
|
Default: 1023
|
||||||
|
@ -234,7 +234,7 @@ Default: 2
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Name: double_buffer
|
Name: double_buffer
|
||||||
Type: bool array (min = 0, max = 32)
|
Type: bool array (min = 0, max = 32)
|
||||||
Syntax: <0|1[,...]>
|
Syntax: <0|1[,...]>
|
||||||
Description: Hardware double buffering: 0 disabled, 1 enabled.
|
Description: Hardware double buffering: 0 disabled, 1 enabled.
|
||||||
It should be enabled if you want smooth video output: if you
|
It should be enabled if you want smooth video output: if you
|
||||||
obtain out of sync. video, disable it, or try to
|
obtain out of sync. video, disable it, or try to
|
||||||
|
@ -243,13 +243,13 @@ Default: 1 for every device.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Name: clamping
|
Name: clamping
|
||||||
Type: bool array (min = 0, max = 32)
|
Type: bool array (min = 0, max = 32)
|
||||||
Syntax: <0|1[,...]>
|
Syntax: <0|1[,...]>
|
||||||
Description: Video data clamping: 0 disabled, 1 enabled.
|
Description: Video data clamping: 0 disabled, 1 enabled.
|
||||||
Default: 0 for every device.
|
Default: 0 for every device.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Name: filter_type
|
Name: filter_type
|
||||||
Type: int array (min = 0, max = 32)
|
Type: int array (min = 0, max = 32)
|
||||||
Syntax: <0|1|2[,...]>
|
Syntax: <0|1|2[,...]>
|
||||||
Description: Video filter type.
|
Description: Video filter type.
|
||||||
0 none, 1 (1-2-1) 3-tap filter, 2 (2-3-6-3-2) 5-tap filter.
|
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
|
The filter is used to reduce noise and aliasing artifacts
|
||||||
|
@ -258,13 +258,13 @@ Default: 0 for every device.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Name: largeview
|
Name: largeview
|
||||||
Type: bool array (min = 0, max = 32)
|
Type: bool array (min = 0, max = 32)
|
||||||
Syntax: <0|1[,...]>
|
Syntax: <0|1[,...]>
|
||||||
Description: Large view: 0 disabled, 1 enabled.
|
Description: Large view: 0 disabled, 1 enabled.
|
||||||
Default: 1 for every device.
|
Default: 1 for every device.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Name: upscaling
|
Name: upscaling
|
||||||
Type: bool array (min = 0, max = 32)
|
Type: bool array (min = 0, max = 32)
|
||||||
Syntax: <0|1[,...]>
|
Syntax: <0|1[,...]>
|
||||||
Description: Software scaling (for non-compressed video only):
|
Description: Software scaling (for non-compressed video only):
|
||||||
0 disabled, 1 enabled.
|
0 disabled, 1 enabled.
|
||||||
Disable it if you have a slow CPU or you don't have enough
|
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
|
Name: bandingfilter
|
||||||
Type: bool array (min = 0, max = 32)
|
Type: bool array (min = 0, max = 32)
|
||||||
Syntax: <0|1[,...]>
|
Syntax: <0|1[,...]>
|
||||||
Description: Banding filter to reduce effects of fluorescent
|
Description: Banding filter to reduce effects of fluorescent
|
||||||
lighting:
|
lighting:
|
||||||
0 disabled, 1 enabled.
|
0 disabled, 1 enabled.
|
||||||
This filter tries to reduce the pattern of horizontal
|
This filter tries to reduce the pattern of horizontal
|
||||||
|
@ -374,7 +374,7 @@ Default: 0 for every device.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Name: monochrome
|
Name: monochrome
|
||||||
Type: bool array (min = 0, max = 32)
|
Type: bool array (min = 0, max = 32)
|
||||||
Syntax: <0|1[,...]>
|
Syntax: <0|1[,...]>
|
||||||
Description: The image sensor is monochrome:
|
Description: The image sensor is monochrome:
|
||||||
0 = no, 1 = yes
|
0 = no, 1 = yes
|
||||||
Default: 0 for every device.
|
Default: 0 for every device.
|
||||||
|
@ -400,19 +400,19 @@ Default: 32768 for every device.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Name: contrast
|
Name: contrast
|
||||||
Type: long array (min = 0, max = 32)
|
Type: long array (min = 0, max = 32)
|
||||||
Syntax: <n[,...]>
|
Syntax: <n[,...]>
|
||||||
Description: Set picture contrast (0-65535).
|
Description: Set picture contrast (0-65535).
|
||||||
Default: 50000 for every device.
|
Default: 50000 for every device.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Name: whiteness
|
Name: whiteness
|
||||||
Type: long array (min = 0, max = 32)
|
Type: long array (min = 0, max = 32)
|
||||||
Syntax: <n[,...]>
|
Syntax: <n[,...]>
|
||||||
Description: Set picture whiteness (0-65535).
|
Description: Set picture whiteness (0-65535).
|
||||||
Default: 32768 for every device.
|
Default: 32768 for every device.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Name: debug
|
Name: debug
|
||||||
Type: int
|
Type: int
|
||||||
Syntax: <n>
|
Syntax: <n>
|
||||||
Description: Debugging information level, from 0 to 6:
|
Description: Debugging information level, from 0 to 6:
|
||||||
0 = none (use carefully)
|
0 = none (use carefully)
|
||||||
1 = critical errors
|
1 = critical errors
|
|
@ -27,7 +27,7 @@ number of free hugetlb pages at any time. It also displays information about
|
||||||
the configured hugepage size - this is needed for generating the proper
|
the configured hugepage size - this is needed for generating the proper
|
||||||
alignment and size of the arguments to the above system calls.
|
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_Total: xxx
|
||||||
|
@ -42,11 +42,11 @@ pages in the kernel. Super user can dynamically request more (or free some
|
||||||
pre-configured) hugepages.
|
pre-configured) hugepages.
|
||||||
The allocation (or deallocation) of hugetlb pages is possible only if there are
|
The allocation (or deallocation) of hugetlb pages is possible only if there are
|
||||||
enough physically contiguous free pages in system (freeing of hugepages is
|
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).
|
back to regular memory pool).
|
||||||
|
|
||||||
Pages that are used as hugetlb pages are reserved inside the kernel and can
|
Pages that are used as hugetlb pages are reserved inside the kernel and cannot
|
||||||
not be used for other purposes.
|
be used for other purposes.
|
||||||
|
|
||||||
Once the kernel with Hugetlb page support is built and running, a user can
|
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
|
use either the mmap system call or shared memory system calls to start using
|
||||||
|
@ -60,7 +60,7 @@ Use the following command to dynamically allocate/deallocate hugepages:
|
||||||
This command will try to configure 20 hugepages in the system. The success
|
This command will try to configure 20 hugepages in the system. The success
|
||||||
or failure of allocation depends on the amount of physically contiguous
|
or failure of allocation depends on the amount of physically contiguous
|
||||||
memory that is preset in system at this time. System administrators may want
|
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
|
kernel to request huge pages early in the boot process (when the possibility
|
||||||
of getting physical contiguous pages is still very high).
|
of getting physical contiguous pages is still very high).
|
||||||
|
|
||||||
|
@ -78,8 +78,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.
|
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
|
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
|
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
|
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_inode options are not
|
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
|
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
|
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
|
example, size=2K has the same meaning as size=2048. An example is given at
|
||||||
|
@ -88,7 +88,7 @@ the end of this document.
|
||||||
read and write system calls are not supported on files that reside on hugetlb
|
read and write system calls are not supported on files that reside on hugetlb
|
||||||
file systems.
|
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.
|
used to change the file attributes on hugetlbfs.
|
||||||
|
|
||||||
Also, it is important to note that no such mount command is required if the
|
Also, it is important to note that no such mount command is required if the
|
||||||
|
@ -96,8 +96,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
|
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
|
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
|
/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
|
applications to use any combination of mmaps and shm* calls, though the
|
||||||
mount of filesystem will be required for using mmaps.
|
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=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
|
||||||
|
|
||||||
acpi=off Don't enable 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;}"
|
"/^->/{s:^->\([^ ]*\) [\$$#]*\([^ ]*\) \(.*\):#define \1 \2 /* \3 */:; s:->::; p;}"
|
||||||
endef
|
endef
|
||||||
# Override default regexp for specific architectures
|
# Override default regexp for specific architectures
|
||||||
sed-$(CONFIG_MIPS) := "/^@@@/s///p"
|
sed-$(CONFIG_MIPS) := "/^@@@/{s/^@@@//; s/ \#.*\$$//; p;}"
|
||||||
|
|
||||||
quiet_cmd_offsets = GEN $@
|
quiet_cmd_offsets = GEN $@
|
||||||
define cmd_offsets
|
define cmd_offsets
|
||||||
|
|
16
MAINTAINERS
16
MAINTAINERS
|
@ -1451,6 +1451,12 @@ P: Juanjo Ciarlante
|
||||||
M: jjciarla@raiz.uncu.edu.ar
|
M: jjciarla@raiz.uncu.edu.ar
|
||||||
S: Maintained
|
S: Maintained
|
||||||
|
|
||||||
|
IPATH DRIVER:
|
||||||
|
P: Bryan O'Sullivan
|
||||||
|
M: support@pathscale.com
|
||||||
|
L: openib-general@openib.org
|
||||||
|
S: Supported
|
||||||
|
|
||||||
IPX NETWORK LAYER
|
IPX NETWORK LAYER
|
||||||
P: Arnaldo Carvalho de Melo
|
P: Arnaldo Carvalho de Melo
|
||||||
M: acme@conectiva.com.br
|
M: acme@conectiva.com.br
|
||||||
|
@ -1550,9 +1556,7 @@ S: Maintained
|
||||||
|
|
||||||
KEXEC
|
KEXEC
|
||||||
P: Eric Biederman
|
P: Eric Biederman
|
||||||
P: Randy Dunlap
|
|
||||||
M: ebiederm@xmission.com
|
M: ebiederm@xmission.com
|
||||||
M: rdunlap@xenotime.net
|
|
||||||
W: http://www.xmission.com/~ebiederm/files/kexec/
|
W: http://www.xmission.com/~ebiederm/files/kexec/
|
||||||
L: linux-kernel@vger.kernel.org
|
L: linux-kernel@vger.kernel.org
|
||||||
L: fastboot@osdl.org
|
L: fastboot@osdl.org
|
||||||
|
@ -1885,6 +1889,7 @@ NETWORKING [GENERAL]
|
||||||
P: Networking Team
|
P: Networking Team
|
||||||
M: netdev@vger.kernel.org
|
M: netdev@vger.kernel.org
|
||||||
L: netdev@vger.kernel.org
|
L: netdev@vger.kernel.org
|
||||||
|
W: http://linux-net.osdl.org/
|
||||||
S: Maintained
|
S: Maintained
|
||||||
|
|
||||||
NETWORKING [IPv4/IPv6]
|
NETWORKING [IPv4/IPv6]
|
||||||
|
@ -3053,13 +3058,6 @@ M: khali@linux-fr.org
|
||||||
L: lm-sensors@lm-sensors.org
|
L: lm-sensors@lm-sensors.org
|
||||||
S: Odd Fixes
|
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
|
WATCHDOG DEVICE DRIVERS
|
||||||
P: Wim Van Sebroeck
|
P: Wim Van Sebroeck
|
||||||
M: wim@iguana.be
|
M: wim@iguana.be
|
||||||
|
|
60
Makefile
60
Makefile
|
@ -1,7 +1,7 @@
|
||||||
VERSION = 2
|
VERSION = 2
|
||||||
PATCHLEVEL = 6
|
PATCHLEVEL = 6
|
||||||
SUBLEVEL = 16
|
SUBLEVEL = 17
|
||||||
EXTRAVERSION =
|
EXTRAVERSION =-rc1
|
||||||
NAME=Sliding Snow Leopard
|
NAME=Sliding Snow Leopard
|
||||||
|
|
||||||
# *DOCUMENTATION*
|
# *DOCUMENTATION*
|
||||||
|
@ -1112,7 +1112,6 @@ modules_install: _emodinst_ _emodinst_post
|
||||||
install-dir := $(if $(INSTALL_MOD_DIR),$(INSTALL_MOD_DIR),extra)
|
install-dir := $(if $(INSTALL_MOD_DIR),$(INSTALL_MOD_DIR),extra)
|
||||||
PHONY += _emodinst_
|
PHONY += _emodinst_
|
||||||
_emodinst_:
|
_emodinst_:
|
||||||
$(Q)rm -rf $(MODLIB)/$(install-dir)
|
|
||||||
$(Q)mkdir -p $(MODLIB)/$(install-dir)
|
$(Q)mkdir -p $(MODLIB)/$(install-dir)
|
||||||
$(Q)$(MAKE) -rR -f $(srctree)/scripts/Makefile.modinst
|
$(Q)$(MAKE) -rR -f $(srctree)/scripts/Makefile.modinst
|
||||||
|
|
||||||
|
@ -1275,40 +1274,43 @@ kernelversion:
|
||||||
|
|
||||||
# Single targets
|
# Single targets
|
||||||
# ---------------------------------------------------------------------------
|
# ---------------------------------------------------------------------------
|
||||||
# The directory part is taken from first prerequisite, so this
|
# Single targets are compatible with:
|
||||||
# works even with external modules
|
# - build whith mixed source and output
|
||||||
%.s: %.c prepare scripts FORCE
|
# - build with separate output dir 'make O=...'
|
||||||
$(Q)$(MAKE) $(build)=$(dir $<) $(dir $<)$(notdir $@)
|
# - external modules
|
||||||
%.i: %.c prepare scripts FORCE
|
#
|
||||||
$(Q)$(MAKE) $(build)=$(dir $<) $(dir $<)$(notdir $@)
|
# target-dir => where to store outputfile
|
||||||
%.o: %.c prepare scripts FORCE
|
# build-dir => directory in kernel source tree to use
|
||||||
$(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 $@)
|
|
||||||
|
|
||||||
# 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),)
|
ifeq ($(KBUILD_EXTMOD),)
|
||||||
target-dir = $(@D)
|
build-dir = $(patsubst %/,%,$(dir $@))
|
||||||
|
target-dir = $(dir $@)
|
||||||
else
|
else
|
||||||
zap-slash=$(filter-out .,$(patsubst %/,%,$(dir $@)))
|
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
|
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) \
|
$(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1) \
|
||||||
$(build)=$(target-dir)
|
$(build)=$(build-dir)
|
||||||
%.ko: scripts FORCE
|
%.ko: prepare scripts FORCE
|
||||||
$(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1) \
|
$(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
|
$(Q)$(MAKE) -rR -f $(srctree)/scripts/Makefile.modpost
|
||||||
|
|
||||||
# FIXME Should go into a make.lib or something
|
# FIXME Should go into a make.lib or something
|
||||||
|
|
|
@ -549,6 +549,11 @@ config NUMA
|
||||||
Access). This option is for configuring high-end multiprocessor
|
Access). This option is for configuring high-end multiprocessor
|
||||||
server machines. If in doubt, say N.
|
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
|
# LARGE_VMALLOC is racy, if you *really* need it then fix it first
|
||||||
config ALPHA_LARGE_VMALLOC
|
config ALPHA_LARGE_VMALLOC
|
||||||
bool
|
bool
|
||||||
|
|
|
@ -76,7 +76,6 @@ EXPORT_SYMBOL(strncpy);
|
||||||
EXPORT_SYMBOL(strnlen);
|
EXPORT_SYMBOL(strnlen);
|
||||||
EXPORT_SYMBOL(strncat);
|
EXPORT_SYMBOL(strncat);
|
||||||
EXPORT_SYMBOL(strstr);
|
EXPORT_SYMBOL(strstr);
|
||||||
EXPORT_SYMBOL(strpbrk);
|
|
||||||
EXPORT_SYMBOL(strchr);
|
EXPORT_SYMBOL(strchr);
|
||||||
EXPORT_SYMBOL(strrchr);
|
EXPORT_SYMBOL(strrchr);
|
||||||
EXPORT_SYMBOL(memcmp);
|
EXPORT_SYMBOL(memcmp);
|
||||||
|
@ -216,8 +215,6 @@ EXPORT_SYMBOL(memcpy);
|
||||||
EXPORT_SYMBOL(memset);
|
EXPORT_SYMBOL(memset);
|
||||||
EXPORT_SYMBOL(memchr);
|
EXPORT_SYMBOL(memchr);
|
||||||
|
|
||||||
EXPORT_SYMBOL(get_wchan);
|
|
||||||
|
|
||||||
#ifdef CONFIG_ALPHA_IRONGATE
|
#ifdef CONFIG_ALPHA_IRONGATE
|
||||||
EXPORT_SYMBOL(irongate_ioremap);
|
EXPORT_SYMBOL(irongate_ioremap);
|
||||||
EXPORT_SYMBOL(irongate_iounmap);
|
EXPORT_SYMBOL(irongate_iounmap);
|
||||||
|
|
|
@ -435,7 +435,7 @@ marvel_specify_io7(char *str)
|
||||||
str = pchar;
|
str = pchar;
|
||||||
} while(*str);
|
} while(*str);
|
||||||
|
|
||||||
return 0;
|
return 1;
|
||||||
}
|
}
|
||||||
__setup("io7=", marvel_specify_io7);
|
__setup("io7=", marvel_specify_io7);
|
||||||
|
|
||||||
|
|
|
@ -24,10 +24,12 @@
|
||||||
#include <linux/config.h> /* CONFIG_ALPHA_LCA etc */
|
#include <linux/config.h> /* CONFIG_ALPHA_LCA etc */
|
||||||
#include <linux/mc146818rtc.h>
|
#include <linux/mc146818rtc.h>
|
||||||
#include <linux/console.h>
|
#include <linux/console.h>
|
||||||
|
#include <linux/cpu.h>
|
||||||
#include <linux/errno.h>
|
#include <linux/errno.h>
|
||||||
#include <linux/init.h>
|
#include <linux/init.h>
|
||||||
#include <linux/string.h>
|
#include <linux/string.h>
|
||||||
#include <linux/ioport.h>
|
#include <linux/ioport.h>
|
||||||
|
#include <linux/platform_device.h>
|
||||||
#include <linux/bootmem.h>
|
#include <linux/bootmem.h>
|
||||||
#include <linux/pci.h>
|
#include <linux/pci.h>
|
||||||
#include <linux/seq_file.h>
|
#include <linux/seq_file.h>
|
||||||
|
@ -470,6 +472,22 @@ page_is_ram(unsigned long pfn)
|
||||||
return 0;
|
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
|
void __init
|
||||||
setup_arch(char **cmdline_p)
|
setup_arch(char **cmdline_p)
|
||||||
{
|
{
|
||||||
|
@ -1478,3 +1496,20 @@ alpha_panic_event(struct notifier_block *this, unsigned long event, void *ptr)
|
||||||
#endif
|
#endif
|
||||||
return NOTIFY_DONE;
|
return NOTIFY_DONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static __init int add_pcspkr(void)
|
||||||
|
{
|
||||||
|
struct platform_device *pd;
|
||||||
|
int ret;
|
||||||
|
|
||||||
|
pd = platform_device_alloc("pcspkr", -1);
|
||||||
|
if (!pd)
|
||||||
|
return -ENOMEM;
|
||||||
|
|
||||||
|
ret = platform_device_add(pd);
|
||||||
|
if (ret)
|
||||||
|
platform_device_put(pd);
|
||||||
|
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
device_initcall(add_pcspkr);
|
||||||
|
|
|
@ -439,7 +439,7 @@ setup_smp(void)
|
||||||
if ((cpu->flags & 0x1cc) == 0x1cc) {
|
if ((cpu->flags & 0x1cc) == 0x1cc) {
|
||||||
smp_num_probed++;
|
smp_num_probed++;
|
||||||
/* Assume here that "whami" == index */
|
/* Assume here that "whami" == index */
|
||||||
cpu_set(i, cpu_possible_map);
|
cpu_set(i, cpu_present_mask);
|
||||||
cpu->pal_revision = boot_cpu_palrev;
|
cpu->pal_revision = boot_cpu_palrev;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -450,9 +450,8 @@ setup_smp(void)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
smp_num_probed = 1;
|
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",
|
printk(KERN_INFO "SMP: %d CPUs probed -- cpu_present_mask = %lx\n",
|
||||||
smp_num_probed, cpu_possible_map.bits[0]);
|
smp_num_probed, cpu_possible_map.bits[0]);
|
||||||
|
@ -488,9 +487,8 @@ void __devinit
|
||||||
smp_prepare_boot_cpu(void)
|
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);
|
cpu_set(smp_processor_id(), cpu_online_map);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -77,6 +77,14 @@ config FIQ
|
||||||
config ARCH_MTD_XIP
|
config ARCH_MTD_XIP
|
||||||
bool
|
bool
|
||||||
|
|
||||||
|
config VECTORS_BASE
|
||||||
|
hex
|
||||||
|
default 0xffff0000 if MMU
|
||||||
|
default DRAM_BASE if REMAP_VECTORS_TO_RAM
|
||||||
|
default 0x00000000
|
||||||
|
help
|
||||||
|
The base address of exception vectors.
|
||||||
|
|
||||||
source "init/Kconfig"
|
source "init/Kconfig"
|
||||||
|
|
||||||
menu "System Type"
|
menu "System Type"
|
||||||
|
@ -504,6 +512,12 @@ config ARCH_DISCONTIGMEM_ENABLE
|
||||||
or have huge holes in the physical address space for other reasons.
|
or have huge holes in the physical address space for other reasons.
|
||||||
See <file:Documentation/vm/numa> for more.
|
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"
|
source "mm/Kconfig"
|
||||||
|
|
||||||
config LEDS
|
config LEDS
|
||||||
|
@ -839,6 +853,8 @@ source "drivers/misc/Kconfig"
|
||||||
|
|
||||||
source "drivers/mfd/Kconfig"
|
source "drivers/mfd/Kconfig"
|
||||||
|
|
||||||
|
source "drivers/leds/Kconfig"
|
||||||
|
|
||||||
source "drivers/media/Kconfig"
|
source "drivers/media/Kconfig"
|
||||||
|
|
||||||
source "drivers/video/Kconfig"
|
source "drivers/video/Kconfig"
|
||||||
|
|
44
arch/arm/Kconfig-nommu
Normal file
44
arch/arm/Kconfig-nommu
Normal file
|
@ -0,0 +1,44 @@
|
||||||
|
#
|
||||||
|
# Kconfig for uClinux(non-paged MM) depend configurations
|
||||||
|
# Hyok S. Choi <hyok.choi@samsung.com>
|
||||||
|
#
|
||||||
|
|
||||||
|
config SET_MEM_PARAM
|
||||||
|
bool "Set flash/sdram size and base addr"
|
||||||
|
help
|
||||||
|
Say Y to manually set the base addresses and sizes.
|
||||||
|
otherwise, the default values are assigned.
|
||||||
|
|
||||||
|
config DRAM_BASE
|
||||||
|
hex '(S)DRAM Base Address' if SET_MEM_PARAM
|
||||||
|
default 0x00800000
|
||||||
|
|
||||||
|
config DRAM_SIZE
|
||||||
|
hex '(S)DRAM SIZE' if SET_MEM_PARAM
|
||||||
|
default 0x00800000
|
||||||
|
|
||||||
|
config FLASH_MEM_BASE
|
||||||
|
hex 'FLASH Base Address' if SET_MEM_PARAM
|
||||||
|
default 0x00400000
|
||||||
|
|
||||||
|
config FLASH_SIZE
|
||||||
|
hex 'FLASH Size' if SET_MEM_PARAM
|
||||||
|
default 0x00400000
|
||||||
|
|
||||||
|
config REMAP_VECTORS_TO_RAM
|
||||||
|
bool 'Install vectors to the begining of RAM' if DRAM_BASE
|
||||||
|
depends on DRAM_BASE
|
||||||
|
help
|
||||||
|
The kernel needs to change the hardware exception vectors.
|
||||||
|
In nommu mode, the hardware exception vectors are normally
|
||||||
|
placed at address 0x00000000. However, this region may be
|
||||||
|
occupied by read-only memory depending on H/W design.
|
||||||
|
|
||||||
|
If the region contains read-write memory, say 'n' here.
|
||||||
|
|
||||||
|
If your CPU provides a remap facility which allows the exception
|
||||||
|
vectors to be mapped to writable memory, say 'n' here.
|
||||||
|
|
||||||
|
Otherwise, say 'y' here. In this case, the kernel will require
|
||||||
|
external support to redirect the hardware exception vectors to
|
||||||
|
the writable versions located at DRAM_BASE.
|
|
@ -20,6 +20,11 @@ GZFLAGS :=-9
|
||||||
# Select a platform tht is kept up-to-date
|
# Select a platform tht is kept up-to-date
|
||||||
KBUILD_DEFCONFIG := versatile_defconfig
|
KBUILD_DEFCONFIG := versatile_defconfig
|
||||||
|
|
||||||
|
# defines filename extension depending memory manement type.
|
||||||
|
ifeq ($(CONFIG_MMU),)
|
||||||
|
MMUEXT := -nommu
|
||||||
|
endif
|
||||||
|
|
||||||
ifeq ($(CONFIG_FRAME_POINTER),y)
|
ifeq ($(CONFIG_FRAME_POINTER),y)
|
||||||
CFLAGS +=-fno-omit-frame-pointer -mapcs -mno-sched-prolog
|
CFLAGS +=-fno-omit-frame-pointer -mapcs -mno-sched-prolog
|
||||||
endif
|
endif
|
||||||
|
@ -73,7 +78,7 @@ AFLAGS +=$(CFLAGS_ABI) $(arch-y) $(tune-y) -msoft-float
|
||||||
CHECKFLAGS += -D__arm__
|
CHECKFLAGS += -D__arm__
|
||||||
|
|
||||||
#Default value
|
#Default value
|
||||||
head-y := arch/arm/kernel/head.o arch/arm/kernel/init_task.o
|
head-y := arch/arm/kernel/head$(MMUEXT).o arch/arm/kernel/init_task.o
|
||||||
textofs-y := 0x00008000
|
textofs-y := 0x00008000
|
||||||
|
|
||||||
machine-$(CONFIG_ARCH_RPC) := rpc
|
machine-$(CONFIG_ARCH_RPC) := rpc
|
||||||
|
@ -133,7 +138,7 @@ else
|
||||||
MACHINE :=
|
MACHINE :=
|
||||||
endif
|
endif
|
||||||
|
|
||||||
export TEXT_OFFSET GZFLAGS
|
export TEXT_OFFSET GZFLAGS MMUEXT
|
||||||
|
|
||||||
# Do we have FASTFPE?
|
# Do we have FASTFPE?
|
||||||
FASTFPE :=arch/arm/fastfpe
|
FASTFPE :=arch/arm/fastfpe
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
* linux/arch/arm/boot/compressed/head.S
|
* linux/arch/arm/boot/compressed/head.S
|
||||||
*
|
*
|
||||||
* Copyright (C) 1996-2002 Russell King
|
* Copyright (C) 1996-2002 Russell King
|
||||||
|
* Copyright (C) 2004 Hyok S. Choi (MPU support)
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License version 2 as
|
||||||
|
@ -320,6 +321,62 @@ params: ldr r0, =params_phys
|
||||||
cache_on: mov r3, #8 @ cache_on function
|
cache_on: mov r3, #8 @ cache_on function
|
||||||
b call_cache_fn
|
b call_cache_fn
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Initialize the highest priority protection region, PR7
|
||||||
|
* to cover all 32bit address and cacheable and bufferable.
|
||||||
|
*/
|
||||||
|
__armv4_mpu_cache_on:
|
||||||
|
mov r0, #0x3f @ 4G, the whole
|
||||||
|
mcr p15, 0, r0, c6, c7, 0 @ PR7 Area Setting
|
||||||
|
mcr p15, 0, r0, c6, c7, 1
|
||||||
|
|
||||||
|
mov r0, #0x80 @ PR7
|
||||||
|
mcr p15, 0, r0, c2, c0, 0 @ D-cache on
|
||||||
|
mcr p15, 0, r0, c2, c0, 1 @ I-cache on
|
||||||
|
mcr p15, 0, r0, c3, c0, 0 @ write-buffer on
|
||||||
|
|
||||||
|
mov r0, #0xc000
|
||||||
|
mcr p15, 0, r0, c5, c0, 1 @ I-access permission
|
||||||
|
mcr p15, 0, r0, c5, c0, 0 @ D-access permission
|
||||||
|
|
||||||
|
mov r0, #0
|
||||||
|
mcr p15, 0, r0, c7, c10, 4 @ drain write buffer
|
||||||
|
mcr p15, 0, r0, c7, c5, 0 @ flush(inval) I-Cache
|
||||||
|
mcr p15, 0, r0, c7, c6, 0 @ flush(inval) D-Cache
|
||||||
|
mrc p15, 0, r0, c1, c0, 0 @ read control reg
|
||||||
|
@ ...I .... ..D. WC.M
|
||||||
|
orr r0, r0, #0x002d @ .... .... ..1. 11.1
|
||||||
|
orr r0, r0, #0x1000 @ ...1 .... .... ....
|
||||||
|
|
||||||
|
mcr p15, 0, r0, c1, c0, 0 @ write control reg
|
||||||
|
|
||||||
|
mov r0, #0
|
||||||
|
mcr p15, 0, r0, c7, c5, 0 @ flush(inval) I-Cache
|
||||||
|
mcr p15, 0, r0, c7, c6, 0 @ flush(inval) D-Cache
|
||||||
|
mov pc, lr
|
||||||
|
|
||||||
|
__armv3_mpu_cache_on:
|
||||||
|
mov r0, #0x3f @ 4G, the whole
|
||||||
|
mcr p15, 0, r0, c6, c7, 0 @ PR7 Area Setting
|
||||||
|
|
||||||
|
mov r0, #0x80 @ PR7
|
||||||
|
mcr p15, 0, r0, c2, c0, 0 @ cache on
|
||||||
|
mcr p15, 0, r0, c3, c0, 0 @ write-buffer on
|
||||||
|
|
||||||
|
mov r0, #0xc000
|
||||||
|
mcr p15, 0, r0, c5, c0, 0 @ access permission
|
||||||
|
|
||||||
|
mov r0, #0
|
||||||
|
mcr p15, 0, r0, c7, c0, 0 @ invalidate whole cache v3
|
||||||
|
mrc p15, 0, r0, c1, c0, 0 @ read control reg
|
||||||
|
@ .... .... .... WC.M
|
||||||
|
orr r0, r0, #0x000d @ .... .... .... 11.1
|
||||||
|
mov r0, #0
|
||||||
|
mcr p15, 0, r0, c1, c0, 0 @ write control reg
|
||||||
|
|
||||||
|
mcr p15, 0, r0, c7, c0, 0 @ invalidate whole cache v3
|
||||||
|
mov pc, lr
|
||||||
|
|
||||||
__setup_mmu: sub r3, r4, #16384 @ Page directory size
|
__setup_mmu: sub r3, r4, #16384 @ Page directory size
|
||||||
bic r3, r3, #0xff @ Align the pointer
|
bic r3, r3, #0xff @ Align the pointer
|
||||||
bic r3, r3, #0x3f00
|
bic r3, r3, #0x3f00
|
||||||
|
@ -496,6 +553,18 @@ proc_types:
|
||||||
b __armv4_mmu_cache_off
|
b __armv4_mmu_cache_off
|
||||||
mov pc, lr
|
mov pc, lr
|
||||||
|
|
||||||
|
.word 0x41007400 @ ARM74x
|
||||||
|
.word 0xff00ff00
|
||||||
|
b __armv3_mpu_cache_on
|
||||||
|
b __armv3_mpu_cache_off
|
||||||
|
b __armv3_mpu_cache_flush
|
||||||
|
|
||||||
|
.word 0x41009400 @ ARM94x
|
||||||
|
.word 0xff00ff00
|
||||||
|
b __armv4_mpu_cache_on
|
||||||
|
b __armv4_mpu_cache_off
|
||||||
|
b __armv4_mpu_cache_flush
|
||||||
|
|
||||||
.word 0x00007000 @ ARM7 IDs
|
.word 0x00007000 @ ARM7 IDs
|
||||||
.word 0x0000f000
|
.word 0x0000f000
|
||||||
mov pc, lr
|
mov pc, lr
|
||||||
|
@ -562,6 +631,24 @@ proc_types:
|
||||||
cache_off: mov r3, #12 @ cache_off function
|
cache_off: mov r3, #12 @ cache_off function
|
||||||
b call_cache_fn
|
b call_cache_fn
|
||||||
|
|
||||||
|
__armv4_mpu_cache_off:
|
||||||
|
mrc p15, 0, r0, c1, c0
|
||||||
|
bic r0, r0, #0x000d
|
||||||
|
mcr p15, 0, r0, c1, c0 @ turn MPU and cache off
|
||||||
|
mov r0, #0
|
||||||
|
mcr p15, 0, r0, c7, c10, 4 @ drain write buffer
|
||||||
|
mcr p15, 0, r0, c7, c6, 0 @ flush D-Cache
|
||||||
|
mcr p15, 0, r0, c7, c5, 0 @ flush I-Cache
|
||||||
|
mov pc, lr
|
||||||
|
|
||||||
|
__armv3_mpu_cache_off:
|
||||||
|
mrc p15, 0, r0, c1, c0
|
||||||
|
bic r0, r0, #0x000d
|
||||||
|
mcr p15, 0, r0, c1, c0, 0 @ turn MPU and cache off
|
||||||
|
mov r0, #0
|
||||||
|
mcr p15, 0, r0, c7, c0, 0 @ invalidate whole cache v3
|
||||||
|
mov pc, lr
|
||||||
|
|
||||||
__armv4_mmu_cache_off:
|
__armv4_mmu_cache_off:
|
||||||
mrc p15, 0, r0, c1, c0
|
mrc p15, 0, r0, c1, c0
|
||||||
bic r0, r0, #0x000d
|
bic r0, r0, #0x000d
|
||||||
|
@ -601,6 +688,24 @@ cache_clean_flush:
|
||||||
mov r3, #16
|
mov r3, #16
|
||||||
b call_cache_fn
|
b call_cache_fn
|
||||||
|
|
||||||
|
__armv4_mpu_cache_flush:
|
||||||
|
mov r2, #1
|
||||||
|
mov r3, #0
|
||||||
|
mcr p15, 0, ip, c7, c6, 0 @ invalidate D cache
|
||||||
|
mov r1, #7 << 5 @ 8 segments
|
||||||
|
1: orr r3, r1, #63 << 26 @ 64 entries
|
||||||
|
2: mcr p15, 0, r3, c7, c14, 2 @ clean & invalidate D index
|
||||||
|
subs r3, r3, #1 << 26
|
||||||
|
bcs 2b @ entries 63 to 0
|
||||||
|
subs r1, r1, #1 << 5
|
||||||
|
bcs 1b @ segments 7 to 0
|
||||||
|
|
||||||
|
teq r2, #0
|
||||||
|
mcrne p15, 0, ip, c7, c5, 0 @ invalidate I cache
|
||||||
|
mcr p15, 0, ip, c7, c10, 4 @ drain WB
|
||||||
|
mov pc, lr
|
||||||
|
|
||||||
|
|
||||||
__armv6_mmu_cache_flush:
|
__armv6_mmu_cache_flush:
|
||||||
mov r1, #0
|
mov r1, #0
|
||||||
mcr p15, 0, r1, c7, c14, 0 @ clean+invalidate D
|
mcr p15, 0, r1, c7, c14, 0 @ clean+invalidate D
|
||||||
|
@ -638,6 +743,7 @@ no_cache_id:
|
||||||
mov pc, lr
|
mov pc, lr
|
||||||
|
|
||||||
__armv3_mmu_cache_flush:
|
__armv3_mmu_cache_flush:
|
||||||
|
__armv3_mpu_cache_flush:
|
||||||
mov r1, #0
|
mov r1, #0
|
||||||
mcr p15, 0, r0, c7, c0, 0 @ invalidate whole cache v3
|
mcr p15, 0, r0, c7, c0, 0 @ invalidate whole cache v3
|
||||||
mov pc, lr
|
mov pc, lr
|
||||||
|
|
|
@ -18,6 +18,7 @@ SECTIONS
|
||||||
_start = .;
|
_start = .;
|
||||||
*(.start)
|
*(.start)
|
||||||
*(.text)
|
*(.text)
|
||||||
|
*(.text.*)
|
||||||
*(.fixup)
|
*(.fixup)
|
||||||
*(.gnu.warning)
|
*(.gnu.warning)
|
||||||
*(.rodata)
|
*(.rodata)
|
||||||
|
|
|
@ -22,6 +22,7 @@
|
||||||
#include <linux/delay.h>
|
#include <linux/delay.h>
|
||||||
#include <linux/interrupt.h>
|
#include <linux/interrupt.h>
|
||||||
#include <linux/platform_device.h>
|
#include <linux/platform_device.h>
|
||||||
|
#include <linux/leds.h>
|
||||||
|
|
||||||
#include <asm/hardware.h>
|
#include <asm/hardware.h>
|
||||||
#include <asm/mach-types.h>
|
#include <asm/mach-types.h>
|
||||||
|
@ -75,6 +76,7 @@ static void sharpsl_battery_thread(void *private_);
|
||||||
struct sharpsl_pm_status sharpsl_pm;
|
struct sharpsl_pm_status sharpsl_pm;
|
||||||
DECLARE_WORK(toggle_charger, sharpsl_charge_toggle, NULL);
|
DECLARE_WORK(toggle_charger, sharpsl_charge_toggle, NULL);
|
||||||
DECLARE_WORK(sharpsl_bat, sharpsl_battery_thread, NULL);
|
DECLARE_WORK(sharpsl_bat, sharpsl_battery_thread, NULL);
|
||||||
|
DEFINE_LED_TRIGGER(sharpsl_charge_led_trigger);
|
||||||
|
|
||||||
|
|
||||||
static int get_percentage(int voltage)
|
static int get_percentage(int voltage)
|
||||||
|
@ -190,10 +192,10 @@ void sharpsl_pm_led(int val)
|
||||||
dev_err(sharpsl_pm.dev, "Charging Error!\n");
|
dev_err(sharpsl_pm.dev, "Charging Error!\n");
|
||||||
} else if (val == SHARPSL_LED_ON) {
|
} else if (val == SHARPSL_LED_ON) {
|
||||||
dev_dbg(sharpsl_pm.dev, "Charge LED On\n");
|
dev_dbg(sharpsl_pm.dev, "Charge LED On\n");
|
||||||
|
led_trigger_event(sharpsl_charge_led_trigger, LED_FULL);
|
||||||
} else {
|
} else {
|
||||||
dev_dbg(sharpsl_pm.dev, "Charge LED Off\n");
|
dev_dbg(sharpsl_pm.dev, "Charge LED Off\n");
|
||||||
|
led_trigger_event(sharpsl_charge_led_trigger, LED_OFF);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -786,6 +788,8 @@ static int __init sharpsl_pm_probe(struct platform_device *pdev)
|
||||||
init_timer(&sharpsl_pm.chrg_full_timer);
|
init_timer(&sharpsl_pm.chrg_full_timer);
|
||||||
sharpsl_pm.chrg_full_timer.function = sharpsl_chrg_full_timer;
|
sharpsl_pm.chrg_full_timer.function = sharpsl_chrg_full_timer;
|
||||||
|
|
||||||
|
led_trigger_register_simple("sharpsl-charge", &sharpsl_charge_led_trigger);
|
||||||
|
|
||||||
sharpsl_pm.machinfo->init();
|
sharpsl_pm.machinfo->init();
|
||||||
|
|
||||||
device_create_file(&pdev->dev, &dev_attr_battery_percentage);
|
device_create_file(&pdev->dev, &dev_attr_battery_percentage);
|
||||||
|
@ -807,6 +811,8 @@ static int sharpsl_pm_remove(struct platform_device *pdev)
|
||||||
device_remove_file(&pdev->dev, &dev_attr_battery_percentage);
|
device_remove_file(&pdev->dev, &dev_attr_battery_percentage);
|
||||||
device_remove_file(&pdev->dev, &dev_attr_battery_voltage);
|
device_remove_file(&pdev->dev, &dev_attr_battery_voltage);
|
||||||
|
|
||||||
|
led_trigger_unregister_simple(sharpsl_charge_led_trigger);
|
||||||
|
|
||||||
sharpsl_pm.machinfo->exit();
|
sharpsl_pm.machinfo->exit();
|
||||||
|
|
||||||
del_timer_sync(&sharpsl_pm.chrg_full_timer);
|
del_timer_sync(&sharpsl_pm.chrg_full_timer);
|
||||||
|
|
|
@ -379,7 +379,7 @@ CONFIG_MTD_PHYSMAP_BANKWIDTH=2
|
||||||
# CONFIG_MTD_DOC2001 is not set
|
# CONFIG_MTD_DOC2001 is not set
|
||||||
# CONFIG_MTD_DOC2001PLUS is not set
|
# CONFIG_MTD_DOC2001PLUS is not set
|
||||||
CONFIG_MTD_AT91_DATAFLASH=y
|
CONFIG_MTD_AT91_DATAFLASH=y
|
||||||
CONFIG_MTD_AT91_DATAFLASH_CARD=y
|
# CONFIG_MTD_AT91_DATAFLASH_CARD is not set
|
||||||
|
|
||||||
#
|
#
|
||||||
# NAND Flash Device Drivers
|
# NAND Flash Device Drivers
|
||||||
|
|
|
@ -370,7 +370,7 @@ CONFIG_MTD_PHYSMAP_BANKWIDTH=2
|
||||||
# CONFIG_MTD_DOC2001 is not set
|
# CONFIG_MTD_DOC2001 is not set
|
||||||
# CONFIG_MTD_DOC2001PLUS is not set
|
# CONFIG_MTD_DOC2001PLUS is not set
|
||||||
CONFIG_MTD_AT91_DATAFLASH=y
|
CONFIG_MTD_AT91_DATAFLASH=y
|
||||||
CONFIG_MTD_AT91_DATAFLASH_CARD=y
|
# CONFIG_MTD_AT91_DATAFLASH_CARD is not set
|
||||||
|
|
||||||
#
|
#
|
||||||
# NAND Flash Device Drivers
|
# NAND Flash Device Drivers
|
||||||
|
|
|
@ -100,23 +100,11 @@ EXPORT_SYMBOL(__raw_writesl);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* string / mem functions */
|
/* 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(strchr);
|
||||||
EXPORT_SYMBOL(strlen);
|
|
||||||
EXPORT_SYMBOL(strnlen);
|
|
||||||
EXPORT_SYMBOL(strpbrk);
|
|
||||||
EXPORT_SYMBOL(strrchr);
|
EXPORT_SYMBOL(strrchr);
|
||||||
EXPORT_SYMBOL(strstr);
|
|
||||||
EXPORT_SYMBOL(memset);
|
EXPORT_SYMBOL(memset);
|
||||||
EXPORT_SYMBOL(memcpy);
|
EXPORT_SYMBOL(memcpy);
|
||||||
EXPORT_SYMBOL(memmove);
|
EXPORT_SYMBOL(memmove);
|
||||||
EXPORT_SYMBOL(memcmp);
|
|
||||||
EXPORT_SYMBOL(memscan);
|
|
||||||
EXPORT_SYMBOL(memchr);
|
EXPORT_SYMBOL(memchr);
|
||||||
EXPORT_SYMBOL(__memzero);
|
EXPORT_SYMBOL(__memzero);
|
||||||
|
|
||||||
|
@ -190,8 +178,6 @@ EXPORT_SYMBOL(_find_next_bit_be);
|
||||||
|
|
||||||
/* syscalls */
|
/* syscalls */
|
||||||
EXPORT_SYMBOL(sys_write);
|
EXPORT_SYMBOL(sys_write);
|
||||||
EXPORT_SYMBOL(sys_read);
|
|
||||||
EXPORT_SYMBOL(sys_lseek);
|
EXPORT_SYMBOL(sys_lseek);
|
||||||
EXPORT_SYMBOL(sys_open);
|
|
||||||
EXPORT_SYMBOL(sys_exit);
|
EXPORT_SYMBOL(sys_exit);
|
||||||
EXPORT_SYMBOL(sys_wait4);
|
EXPORT_SYMBOL(sys_wait4);
|
||||||
|
|
|
@ -666,7 +666,7 @@ __kuser_helper_start:
|
||||||
*
|
*
|
||||||
* #define __kernel_dmb() \
|
* #define __kernel_dmb() \
|
||||||
* asm volatile ( "mov r0, #0xffff0fff; mov lr, pc; sub pc, r0, #95" \
|
* asm volatile ( "mov r0, #0xffff0fff; mov lr, pc; sub pc, r0, #95" \
|
||||||
* : : : "lr","cc" )
|
* : : : "r0", "lr","cc" )
|
||||||
*/
|
*/
|
||||||
|
|
||||||
__kuser_memory_barrier: @ 0xffff0fa0
|
__kuser_memory_barrier: @ 0xffff0fa0
|
||||||
|
|
217
arch/arm/kernel/head-common.S
Normal file
217
arch/arm/kernel/head-common.S
Normal file
|
@ -0,0 +1,217 @@
|
||||||
|
/*
|
||||||
|
* linux/arch/arm/kernel/head-common.S
|
||||||
|
*
|
||||||
|
* Copyright (C) 1994-2002 Russell King
|
||||||
|
* Copyright (c) 2003 ARM Limited
|
||||||
|
* All Rights Reserved
|
||||||
|
*
|
||||||
|
* 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.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
.type __switch_data, %object
|
||||||
|
__switch_data:
|
||||||
|
.long __mmap_switched
|
||||||
|
.long __data_loc @ r4
|
||||||
|
.long __data_start @ r5
|
||||||
|
.long __bss_start @ r6
|
||||||
|
.long _end @ r7
|
||||||
|
.long processor_id @ r4
|
||||||
|
.long __machine_arch_type @ r5
|
||||||
|
.long cr_alignment @ r6
|
||||||
|
.long init_thread_union + THREAD_START_SP @ sp
|
||||||
|
|
||||||
|
/*
|
||||||
|
* The following fragment of code is executed with the MMU on in MMU mode,
|
||||||
|
* and uses absolute addresses; this is not position independent.
|
||||||
|
*
|
||||||
|
* r0 = cp#15 control register
|
||||||
|
* r1 = machine ID
|
||||||
|
* r9 = processor ID
|
||||||
|
*/
|
||||||
|
.type __mmap_switched, %function
|
||||||
|
__mmap_switched:
|
||||||
|
adr r3, __switch_data + 4
|
||||||
|
|
||||||
|
ldmia r3!, {r4, r5, r6, r7}
|
||||||
|
cmp r4, r5 @ Copy data segment if needed
|
||||||
|
1: cmpne r5, r6
|
||||||
|
ldrne fp, [r4], #4
|
||||||
|
strne fp, [r5], #4
|
||||||
|
bne 1b
|
||||||
|
|
||||||
|
mov fp, #0 @ Clear BSS (and zero fp)
|
||||||
|
1: cmp r6, r7
|
||||||
|
strcc fp, [r6],#4
|
||||||
|
bcc 1b
|
||||||
|
|
||||||
|
ldmia r3, {r4, r5, r6, sp}
|
||||||
|
str r9, [r4] @ Save processor ID
|
||||||
|
str r1, [r5] @ Save machine type
|
||||||
|
bic r4, r0, #CR_A @ Clear 'A' bit
|
||||||
|
stmia r6, {r0, r4} @ Save control register values
|
||||||
|
b start_kernel
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Exception handling. Something went wrong and we can't proceed. We
|
||||||
|
* ought to tell the user, but since we don't have any guarantee that
|
||||||
|
* we're even running on the right architecture, we do virtually nothing.
|
||||||
|
*
|
||||||
|
* If CONFIG_DEBUG_LL is set we try to print out something about the error
|
||||||
|
* and hope for the best (useful if bootloader fails to pass a proper
|
||||||
|
* machine ID for example).
|
||||||
|
*/
|
||||||
|
|
||||||
|
.type __error_p, %function
|
||||||
|
__error_p:
|
||||||
|
#ifdef CONFIG_DEBUG_LL
|
||||||
|
adr r0, str_p1
|
||||||
|
bl printascii
|
||||||
|
b __error
|
||||||
|
str_p1: .asciz "\nError: unrecognized/unsupported processor variant.\n"
|
||||||
|
.align
|
||||||
|
#endif
|
||||||
|
|
||||||
|
.type __error_a, %function
|
||||||
|
__error_a:
|
||||||
|
#ifdef CONFIG_DEBUG_LL
|
||||||
|
mov r4, r1 @ preserve machine ID
|
||||||
|
adr r0, str_a1
|
||||||
|
bl printascii
|
||||||
|
mov r0, r4
|
||||||
|
bl printhex8
|
||||||
|
adr r0, str_a2
|
||||||
|
bl printascii
|
||||||
|
adr r3, 3f
|
||||||
|
ldmia r3, {r4, r5, r6} @ get machine desc list
|
||||||
|
sub r4, r3, r4 @ get offset between virt&phys
|
||||||
|
add r5, r5, r4 @ convert virt addresses to
|
||||||
|
add r6, r6, r4 @ physical address space
|
||||||
|
1: ldr r0, [r5, #MACHINFO_TYPE] @ get machine type
|
||||||
|
bl printhex8
|
||||||
|
mov r0, #'\t'
|
||||||
|
bl printch
|
||||||
|
ldr r0, [r5, #MACHINFO_NAME] @ get machine name
|
||||||
|
add r0, r0, r4
|
||||||
|
bl printascii
|
||||||
|
mov r0, #'\n'
|
||||||
|
bl printch
|
||||||
|
add r5, r5, #SIZEOF_MACHINE_DESC @ next machine_desc
|
||||||
|
cmp r5, r6
|
||||||
|
blo 1b
|
||||||
|
adr r0, str_a3
|
||||||
|
bl printascii
|
||||||
|
b __error
|
||||||
|
str_a1: .asciz "\nError: unrecognized/unsupported machine ID (r1 = 0x"
|
||||||
|
str_a2: .asciz ").\n\nAvailable machine support:\n\nID (hex)\tNAME\n"
|
||||||
|
str_a3: .asciz "\nPlease check your kernel config and/or bootloader.\n"
|
||||||
|
.align
|
||||||
|
#endif
|
||||||
|
|
||||||
|
.type __error, %function
|
||||||
|
__error:
|
||||||
|
#ifdef CONFIG_ARCH_RPC
|
||||||
|
/*
|
||||||
|
* Turn the screen red on a error - RiscPC only.
|
||||||
|
*/
|
||||||
|
mov r0, #0x02000000
|
||||||
|
mov r3, #0x11
|
||||||
|
orr r3, r3, r3, lsl #8
|
||||||
|
orr r3, r3, r3, lsl #16
|
||||||
|
str r3, [r0], #4
|
||||||
|
str r3, [r0], #4
|
||||||
|
str r3, [r0], #4
|
||||||
|
str r3, [r0], #4
|
||||||
|
#endif
|
||||||
|
1: mov r0, r0
|
||||||
|
b 1b
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Read processor ID register (CP#15, CR0), and look up in the linker-built
|
||||||
|
* supported processor list. Note that we can't use the absolute addresses
|
||||||
|
* for the __proc_info lists since we aren't running with the MMU on
|
||||||
|
* (and therefore, we are not in the correct address space). We have to
|
||||||
|
* calculate the offset.
|
||||||
|
*
|
||||||
|
* r9 = cpuid
|
||||||
|
* Returns:
|
||||||
|
* r3, r4, r6 corrupted
|
||||||
|
* r5 = proc_info pointer in physical address space
|
||||||
|
* r9 = cpuid (preserved)
|
||||||
|
*/
|
||||||
|
.type __lookup_processor_type, %function
|
||||||
|
__lookup_processor_type:
|
||||||
|
adr r3, 3f
|
||||||
|
ldmda r3, {r5 - r7}
|
||||||
|
sub r3, r3, r7 @ get offset between virt&phys
|
||||||
|
add r5, r5, r3 @ convert virt addresses to
|
||||||
|
add r6, r6, r3 @ physical address space
|
||||||
|
1: ldmia r5, {r3, r4} @ value, mask
|
||||||
|
and r4, r4, r9 @ mask wanted bits
|
||||||
|
teq r3, r4
|
||||||
|
beq 2f
|
||||||
|
add r5, r5, #PROC_INFO_SZ @ sizeof(proc_info_list)
|
||||||
|
cmp r5, r6
|
||||||
|
blo 1b
|
||||||
|
mov r5, #0 @ unknown processor
|
||||||
|
2: mov pc, lr
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This provides a C-API version of the above function.
|
||||||
|
*/
|
||||||
|
ENTRY(lookup_processor_type)
|
||||||
|
stmfd sp!, {r4 - r7, r9, lr}
|
||||||
|
mov r9, r0
|
||||||
|
bl __lookup_processor_type
|
||||||
|
mov r0, r5
|
||||||
|
ldmfd sp!, {r4 - r7, r9, pc}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Look in include/asm-arm/procinfo.h and arch/arm/kernel/arch.[ch] for
|
||||||
|
* more information about the __proc_info and __arch_info structures.
|
||||||
|
*/
|
||||||
|
.long __proc_info_begin
|
||||||
|
.long __proc_info_end
|
||||||
|
3: .long .
|
||||||
|
.long __arch_info_begin
|
||||||
|
.long __arch_info_end
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Lookup machine architecture in the linker-build list of architectures.
|
||||||
|
* Note that we can't use the absolute addresses for the __arch_info
|
||||||
|
* lists since we aren't running with the MMU on (and therefore, we are
|
||||||
|
* not in the correct address space). We have to calculate the offset.
|
||||||
|
*
|
||||||
|
* r1 = machine architecture number
|
||||||
|
* Returns:
|
||||||
|
* r3, r4, r6 corrupted
|
||||||
|
* r5 = mach_info pointer in physical address space
|
||||||
|
*/
|
||||||
|
.type __lookup_machine_type, %function
|
||||||
|
__lookup_machine_type:
|
||||||
|
adr r3, 3b
|
||||||
|
ldmia r3, {r4, r5, r6}
|
||||||
|
sub r3, r3, r4 @ get offset between virt&phys
|
||||||
|
add r5, r5, r3 @ convert virt addresses to
|
||||||
|
add r6, r6, r3 @ physical address space
|
||||||
|
1: ldr r3, [r5, #MACHINFO_TYPE] @ get machine type
|
||||||
|
teq r3, r1 @ matches loader number?
|
||||||
|
beq 2f @ found
|
||||||
|
add r5, r5, #SIZEOF_MACHINE_DESC @ next machine_desc
|
||||||
|
cmp r5, r6
|
||||||
|
blo 1b
|
||||||
|
mov r5, #0 @ unknown machine
|
||||||
|
2: mov pc, lr
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This provides a C-API version of the above function.
|
||||||
|
*/
|
||||||
|
ENTRY(lookup_machine_type)
|
||||||
|
stmfd sp!, {r4 - r6, lr}
|
||||||
|
mov r1, r0
|
||||||
|
bl __lookup_machine_type
|
||||||
|
mov r0, r5
|
||||||
|
ldmfd sp!, {r4 - r6, pc}
|
83
arch/arm/kernel/head-nommu.S
Normal file
83
arch/arm/kernel/head-nommu.S
Normal file
|
@ -0,0 +1,83 @@
|
||||||
|
/*
|
||||||
|
* linux/arch/arm/kernel/head-nommu.S
|
||||||
|
*
|
||||||
|
* Copyright (C) 1994-2002 Russell King
|
||||||
|
* Copyright (C) 2003-2006 Hyok S. Choi
|
||||||
|
*
|
||||||
|
* 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.
|
||||||
|
*
|
||||||
|
* Common kernel startup code (non-paged MM)
|
||||||
|
* for 32-bit CPUs which has a process ID register(CP15).
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
#include <linux/config.h>
|
||||||
|
#include <linux/linkage.h>
|
||||||
|
#include <linux/init.h>
|
||||||
|
|
||||||
|
#include <asm/assembler.h>
|
||||||
|
#include <asm/mach-types.h>
|
||||||
|
#include <asm/procinfo.h>
|
||||||
|
#include <asm/ptrace.h>
|
||||||
|
#include <asm/constants.h>
|
||||||
|
#include <asm/system.h>
|
||||||
|
|
||||||
|
#define PROCINFO_INITFUNC 12
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Kernel startup entry point.
|
||||||
|
* ---------------------------
|
||||||
|
*
|
||||||
|
* This is normally called from the decompressor code. The requirements
|
||||||
|
* are: MMU = off, D-cache = off, I-cache = dont care, r0 = 0,
|
||||||
|
* r1 = machine nr.
|
||||||
|
*
|
||||||
|
* See linux/arch/arm/tools/mach-types for the complete list of machine
|
||||||
|
* numbers for r1.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
__INIT
|
||||||
|
.type stext, %function
|
||||||
|
ENTRY(stext)
|
||||||
|
msr cpsr_c, #PSR_F_BIT | PSR_I_BIT | MODE_SVC @ ensure svc mode
|
||||||
|
@ and irqs disabled
|
||||||
|
mrc p15, 0, r9, c0, c0 @ get processor id
|
||||||
|
bl __lookup_processor_type @ r5=procinfo r9=cpuid
|
||||||
|
movs r10, r5 @ invalid processor (r5=0)?
|
||||||
|
beq __error_p @ yes, error 'p'
|
||||||
|
bl __lookup_machine_type @ r5=machinfo
|
||||||
|
movs r8, r5 @ invalid machine (r5=0)?
|
||||||
|
beq __error_a @ yes, error 'a'
|
||||||
|
|
||||||
|
ldr r13, __switch_data @ address to jump to after
|
||||||
|
@ the initialization is done
|
||||||
|
adr lr, __after_proc_init @ return (PIC) address
|
||||||
|
add pc, r10, #PROCINFO_INITFUNC
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Set the Control Register and Read the process ID.
|
||||||
|
*/
|
||||||
|
.type __after_proc_init, %function
|
||||||
|
__after_proc_init:
|
||||||
|
mrc p15, 0, r0, c1, c0, 0 @ read control reg
|
||||||
|
#ifdef CONFIG_ALIGNMENT_TRAP
|
||||||
|
orr r0, r0, #CR_A
|
||||||
|
#else
|
||||||
|
bic r0, r0, #CR_A
|
||||||
|
#endif
|
||||||
|
#ifdef CONFIG_CPU_DCACHE_DISABLE
|
||||||
|
bic r0, r0, #CR_C
|
||||||
|
#endif
|
||||||
|
#ifdef CONFIG_CPU_BPREDICT_DISABLE
|
||||||
|
bic r0, r0, #CR_Z
|
||||||
|
#endif
|
||||||
|
#ifdef CONFIG_CPU_ICACHE_DISABLE
|
||||||
|
bic r0, r0, #CR_I
|
||||||
|
#endif
|
||||||
|
mcr p15, 0, r0, c1, c0, 0 @ write control reg
|
||||||
|
|
||||||
|
mov pc, r13 @ clear the BSS and jump
|
||||||
|
@ to start_kernel
|
||||||
|
|
||||||
|
#include "head-common.S"
|
|
@ -102,49 +102,6 @@ ENTRY(stext)
|
||||||
adr lr, __enable_mmu @ return (PIC) address
|
adr lr, __enable_mmu @ return (PIC) address
|
||||||
add pc, r10, #PROCINFO_INITFUNC
|
add pc, r10, #PROCINFO_INITFUNC
|
||||||
|
|
||||||
.type __switch_data, %object
|
|
||||||
__switch_data:
|
|
||||||
.long __mmap_switched
|
|
||||||
.long __data_loc @ r4
|
|
||||||
.long __data_start @ r5
|
|
||||||
.long __bss_start @ r6
|
|
||||||
.long _end @ r7
|
|
||||||
.long processor_id @ r4
|
|
||||||
.long __machine_arch_type @ r5
|
|
||||||
.long cr_alignment @ r6
|
|
||||||
.long init_thread_union + THREAD_START_SP @ sp
|
|
||||||
|
|
||||||
/*
|
|
||||||
* The following fragment of code is executed with the MMU on, and uses
|
|
||||||
* absolute addresses; this is not position independent.
|
|
||||||
*
|
|
||||||
* r0 = cp#15 control register
|
|
||||||
* r1 = machine ID
|
|
||||||
* r9 = processor ID
|
|
||||||
*/
|
|
||||||
.type __mmap_switched, %function
|
|
||||||
__mmap_switched:
|
|
||||||
adr r3, __switch_data + 4
|
|
||||||
|
|
||||||
ldmia r3!, {r4, r5, r6, r7}
|
|
||||||
cmp r4, r5 @ Copy data segment if needed
|
|
||||||
1: cmpne r5, r6
|
|
||||||
ldrne fp, [r4], #4
|
|
||||||
strne fp, [r5], #4
|
|
||||||
bne 1b
|
|
||||||
|
|
||||||
mov fp, #0 @ Clear BSS (and zero fp)
|
|
||||||
1: cmp r6, r7
|
|
||||||
strcc fp, [r6],#4
|
|
||||||
bcc 1b
|
|
||||||
|
|
||||||
ldmia r3, {r4, r5, r6, sp}
|
|
||||||
str r9, [r4] @ Save processor ID
|
|
||||||
str r1, [r5] @ Save machine type
|
|
||||||
bic r4, r0, #CR_A @ Clear 'A' bit
|
|
||||||
stmia r6, {r0, r4} @ Save control register values
|
|
||||||
b start_kernel
|
|
||||||
|
|
||||||
#if defined(CONFIG_SMP)
|
#if defined(CONFIG_SMP)
|
||||||
.type secondary_startup, #function
|
.type secondary_startup, #function
|
||||||
ENTRY(secondary_startup)
|
ENTRY(secondary_startup)
|
||||||
|
@ -367,166 +324,4 @@ __create_page_tables:
|
||||||
mov pc, lr
|
mov pc, lr
|
||||||
.ltorg
|
.ltorg
|
||||||
|
|
||||||
|
#include "head-common.S"
|
||||||
|
|
||||||
/*
|
|
||||||
* Exception handling. Something went wrong and we can't proceed. We
|
|
||||||
* ought to tell the user, but since we don't have any guarantee that
|
|
||||||
* we're even running on the right architecture, we do virtually nothing.
|
|
||||||
*
|
|
||||||
* If CONFIG_DEBUG_LL is set we try to print out something about the error
|
|
||||||
* and hope for the best (useful if bootloader fails to pass a proper
|
|
||||||
* machine ID for example).
|
|
||||||
*/
|
|
||||||
|
|
||||||
.type __error_p, %function
|
|
||||||
__error_p:
|
|
||||||
#ifdef CONFIG_DEBUG_LL
|
|
||||||
adr r0, str_p1
|
|
||||||
bl printascii
|
|
||||||
b __error
|
|
||||||
str_p1: .asciz "\nError: unrecognized/unsupported processor variant.\n"
|
|
||||||
.align
|
|
||||||
#endif
|
|
||||||
|
|
||||||
.type __error_a, %function
|
|
||||||
__error_a:
|
|
||||||
#ifdef CONFIG_DEBUG_LL
|
|
||||||
mov r4, r1 @ preserve machine ID
|
|
||||||
adr r0, str_a1
|
|
||||||
bl printascii
|
|
||||||
mov r0, r4
|
|
||||||
bl printhex8
|
|
||||||
adr r0, str_a2
|
|
||||||
bl printascii
|
|
||||||
adr r3, 3f
|
|
||||||
ldmia r3, {r4, r5, r6} @ get machine desc list
|
|
||||||
sub r4, r3, r4 @ get offset between virt&phys
|
|
||||||
add r5, r5, r4 @ convert virt addresses to
|
|
||||||
add r6, r6, r4 @ physical address space
|
|
||||||
1: ldr r0, [r5, #MACHINFO_TYPE] @ get machine type
|
|
||||||
bl printhex8
|
|
||||||
mov r0, #'\t'
|
|
||||||
bl printch
|
|
||||||
ldr r0, [r5, #MACHINFO_NAME] @ get machine name
|
|
||||||
add r0, r0, r4
|
|
||||||
bl printascii
|
|
||||||
mov r0, #'\n'
|
|
||||||
bl printch
|
|
||||||
add r5, r5, #SIZEOF_MACHINE_DESC @ next machine_desc
|
|
||||||
cmp r5, r6
|
|
||||||
blo 1b
|
|
||||||
adr r0, str_a3
|
|
||||||
bl printascii
|
|
||||||
b __error
|
|
||||||
str_a1: .asciz "\nError: unrecognized/unsupported machine ID (r1 = 0x"
|
|
||||||
str_a2: .asciz ").\n\nAvailable machine support:\n\nID (hex)\tNAME\n"
|
|
||||||
str_a3: .asciz "\nPlease check your kernel config and/or bootloader.\n"
|
|
||||||
.align
|
|
||||||
#endif
|
|
||||||
|
|
||||||
.type __error, %function
|
|
||||||
__error:
|
|
||||||
#ifdef CONFIG_ARCH_RPC
|
|
||||||
/*
|
|
||||||
* Turn the screen red on a error - RiscPC only.
|
|
||||||
*/
|
|
||||||
mov r0, #0x02000000
|
|
||||||
mov r3, #0x11
|
|
||||||
orr r3, r3, r3, lsl #8
|
|
||||||
orr r3, r3, r3, lsl #16
|
|
||||||
str r3, [r0], #4
|
|
||||||
str r3, [r0], #4
|
|
||||||
str r3, [r0], #4
|
|
||||||
str r3, [r0], #4
|
|
||||||
#endif
|
|
||||||
1: mov r0, r0
|
|
||||||
b 1b
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Read processor ID register (CP#15, CR0), and look up in the linker-built
|
|
||||||
* supported processor list. Note that we can't use the absolute addresses
|
|
||||||
* for the __proc_info lists since we aren't running with the MMU on
|
|
||||||
* (and therefore, we are not in the correct address space). We have to
|
|
||||||
* calculate the offset.
|
|
||||||
*
|
|
||||||
* r9 = cpuid
|
|
||||||
* Returns:
|
|
||||||
* r3, r4, r6 corrupted
|
|
||||||
* r5 = proc_info pointer in physical address space
|
|
||||||
* r9 = cpuid (preserved)
|
|
||||||
*/
|
|
||||||
.type __lookup_processor_type, %function
|
|
||||||
__lookup_processor_type:
|
|
||||||
adr r3, 3f
|
|
||||||
ldmda r3, {r5 - r7}
|
|
||||||
sub r3, r3, r7 @ get offset between virt&phys
|
|
||||||
add r5, r5, r3 @ convert virt addresses to
|
|
||||||
add r6, r6, r3 @ physical address space
|
|
||||||
1: ldmia r5, {r3, r4} @ value, mask
|
|
||||||
and r4, r4, r9 @ mask wanted bits
|
|
||||||
teq r3, r4
|
|
||||||
beq 2f
|
|
||||||
add r5, r5, #PROC_INFO_SZ @ sizeof(proc_info_list)
|
|
||||||
cmp r5, r6
|
|
||||||
blo 1b
|
|
||||||
mov r5, #0 @ unknown processor
|
|
||||||
2: mov pc, lr
|
|
||||||
|
|
||||||
/*
|
|
||||||
* This provides a C-API version of the above function.
|
|
||||||
*/
|
|
||||||
ENTRY(lookup_processor_type)
|
|
||||||
stmfd sp!, {r4 - r7, r9, lr}
|
|
||||||
mov r9, r0
|
|
||||||
bl __lookup_processor_type
|
|
||||||
mov r0, r5
|
|
||||||
ldmfd sp!, {r4 - r7, r9, pc}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Look in include/asm-arm/procinfo.h and arch/arm/kernel/arch.[ch] for
|
|
||||||
* more information about the __proc_info and __arch_info structures.
|
|
||||||
*/
|
|
||||||
.long __proc_info_begin
|
|
||||||
.long __proc_info_end
|
|
||||||
3: .long .
|
|
||||||
.long __arch_info_begin
|
|
||||||
.long __arch_info_end
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Lookup machine architecture in the linker-build list of architectures.
|
|
||||||
* Note that we can't use the absolute addresses for the __arch_info
|
|
||||||
* lists since we aren't running with the MMU on (and therefore, we are
|
|
||||||
* not in the correct address space). We have to calculate the offset.
|
|
||||||
*
|
|
||||||
* r1 = machine architecture number
|
|
||||||
* Returns:
|
|
||||||
* r3, r4, r6 corrupted
|
|
||||||
* r5 = mach_info pointer in physical address space
|
|
||||||
*/
|
|
||||||
.type __lookup_machine_type, %function
|
|
||||||
__lookup_machine_type:
|
|
||||||
adr r3, 3b
|
|
||||||
ldmia r3, {r4, r5, r6}
|
|
||||||
sub r3, r3, r4 @ get offset between virt&phys
|
|
||||||
add r5, r5, r3 @ convert virt addresses to
|
|
||||||
add r6, r6, r3 @ physical address space
|
|
||||||
1: ldr r3, [r5, #MACHINFO_TYPE] @ get machine type
|
|
||||||
teq r3, r1 @ matches loader number?
|
|
||||||
beq 2f @ found
|
|
||||||
add r5, r5, #SIZEOF_MACHINE_DESC @ next machine_desc
|
|
||||||
cmp r5, r6
|
|
||||||
blo 1b
|
|
||||||
mov r5, #0 @ unknown machine
|
|
||||||
2: mov pc, lr
|
|
||||||
|
|
||||||
/*
|
|
||||||
* This provides a C-API version of the above function.
|
|
||||||
*/
|
|
||||||
ENTRY(lookup_machine_type)
|
|
||||||
stmfd sp!, {r4 - r6, lr}
|
|
||||||
mov r1, r0
|
|
||||||
bl __lookup_machine_type
|
|
||||||
mov r0, r5
|
|
||||||
ldmfd sp!, {r4 - r6, pc}
|
|
||||||
|
|
|
@ -474,4 +474,3 @@ unsigned long get_wchan(struct task_struct *p)
|
||||||
} while (count ++ < 16);
|
} while (count ++ < 16);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL(get_wchan);
|
|
||||||
|
|
|
@ -252,6 +252,9 @@ static void __init dump_cpu_info(int cpu)
|
||||||
dump_cache("cache", cpu, CACHE_ISIZE(info));
|
dump_cache("cache", cpu, CACHE_ISIZE(info));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (arch_is_coherent())
|
||||||
|
printk("Cache coherency enabled\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
int cpu_architecture(void)
|
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(system_utsname.machine, "%s%c", list->arch_name, ENDIANNESS);
|
||||||
sprintf(elf_platform, "%s%c", list->elf_name, ENDIANNESS);
|
sprintf(elf_platform, "%s%c", list->elf_name, ENDIANNESS);
|
||||||
elf_hwcap = list->elf_hwcap;
|
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();
|
cpu_proc_init();
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,6 +7,6 @@
|
||||||
* it under the terms of the GNU General Public License version 2 as
|
* it under the terms of the GNU General Public License version 2 as
|
||||||
* published by the Free Software Foundation.
|
* published by the Free Software Foundation.
|
||||||
*/
|
*/
|
||||||
#define KERN_SIGRETURN_CODE 0xffff0500
|
#define KERN_SIGRETURN_CODE (CONFIG_VECTORS_BASE + 0x00000500)
|
||||||
|
|
||||||
extern const unsigned long sigreturn_codes[7];
|
extern const unsigned long sigreturn_codes[7];
|
||||||
|
|
|
@ -688,6 +688,7 @@ EXPORT_SYMBOL(abort);
|
||||||
|
|
||||||
void __init trap_init(void)
|
void __init trap_init(void)
|
||||||
{
|
{
|
||||||
|
unsigned long vectors = CONFIG_VECTORS_BASE;
|
||||||
extern char __stubs_start[], __stubs_end[];
|
extern char __stubs_start[], __stubs_end[];
|
||||||
extern char __vectors_start[], __vectors_end[];
|
extern char __vectors_start[], __vectors_end[];
|
||||||
extern char __kuser_helper_start[], __kuser_helper_end[];
|
extern char __kuser_helper_start[], __kuser_helper_end[];
|
||||||
|
@ -698,9 +699,9 @@ void __init trap_init(void)
|
||||||
* into the vector page, mapped at 0xffff0000, and ensure these
|
* into the vector page, mapped at 0xffff0000, and ensure these
|
||||||
* are visible to the instruction stream.
|
* are visible to the instruction stream.
|
||||||
*/
|
*/
|
||||||
memcpy((void *)0xffff0000, __vectors_start, __vectors_end - __vectors_start);
|
memcpy((void *)vectors, __vectors_start, __vectors_end - __vectors_start);
|
||||||
memcpy((void *)0xffff0200, __stubs_start, __stubs_end - __stubs_start);
|
memcpy((void *)vectors + 0x200, __stubs_start, __stubs_end - __stubs_start);
|
||||||
memcpy((void *)0xffff1000 - kuser_sz, __kuser_helper_start, kuser_sz);
|
memcpy((void *)vectors + 0x1000 - kuser_sz, __kuser_helper_start, kuser_sz);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copy signal return handlers into the vector page, and
|
* Copy signal return handlers into the vector page, and
|
||||||
|
@ -709,6 +710,6 @@ void __init trap_init(void)
|
||||||
memcpy((void *)KERN_SIGRETURN_CODE, sigreturn_codes,
|
memcpy((void *)KERN_SIGRETURN_CODE, sigreturn_codes,
|
||||||
sizeof(sigreturn_codes));
|
sizeof(sigreturn_codes));
|
||||||
|
|
||||||
flush_icache_range(0xffff0000, 0xffff0000 + PAGE_SIZE);
|
flush_icache_range(vectors, vectors + PAGE_SIZE);
|
||||||
modify_domain(DOMAIN_USER, DOMAIN_CLIENT);
|
modify_domain(DOMAIN_USER, DOMAIN_CLIENT);
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,11 +16,12 @@ obj-$(CONFIG_MACH_CSB637) += board-csb637.o
|
||||||
#obj-$(CONFIG_MACH_KB9200) += board-kb9202.o
|
#obj-$(CONFIG_MACH_KB9200) += board-kb9202.o
|
||||||
|
|
||||||
# LEDs support
|
# LEDs support
|
||||||
#led-$(CONFIG_ARCH_AT91RM9200DK) += leds.o
|
led-$(CONFIG_ARCH_AT91RM9200DK) += leds.o
|
||||||
#led-$(CONFIG_MACH_AT91RM9200EK) += leds.o
|
led-$(CONFIG_MACH_AT91RM9200EK) += leds.o
|
||||||
#led-$(CONFIG_MACH_CSB337) += leds.o
|
led-$(CONFIG_MACH_CSB337) += leds.o
|
||||||
#led-$(CONFIG_MACH_CSB637) += leds.o
|
led-$(CONFIG_MACH_CSB637) += leds.o
|
||||||
#led-$(CONFIG_MACH_KB9200) += leds.o
|
#led-$(CONFIG_MACH_KB9200) += leds.o
|
||||||
|
#led-$(CONFIG_MACH_KAFA) += leds.o
|
||||||
obj-$(CONFIG_LEDS) += $(led-y)
|
obj-$(CONFIG_LEDS) += $(led-y)
|
||||||
|
|
||||||
# VGA support
|
# VGA support
|
||||||
|
|
|
@ -67,6 +67,9 @@ static void __init csb337_map_io(void)
|
||||||
/* Initialize clocks: 3.6864 MHz crystal */
|
/* Initialize clocks: 3.6864 MHz crystal */
|
||||||
at91_clock_init(3686400);
|
at91_clock_init(3686400);
|
||||||
|
|
||||||
|
/* Setup the LEDs */
|
||||||
|
at91_init_leds(AT91_PIN_PB2, AT91_PIN_PB2);
|
||||||
|
|
||||||
#ifdef CONFIG_SERIAL_AT91
|
#ifdef CONFIG_SERIAL_AT91
|
||||||
at91_console_port = CSB337_SERIAL_CONSOLE;
|
at91_console_port = CSB337_SERIAL_CONSOLE;
|
||||||
memcpy(at91_serial_map, serial, sizeof(serial));
|
memcpy(at91_serial_map, serial, sizeof(serial));
|
||||||
|
|
|
@ -67,6 +67,9 @@ static void __init csb637_map_io(void)
|
||||||
/* Initialize clocks: 3.6864 MHz crystal */
|
/* Initialize clocks: 3.6864 MHz crystal */
|
||||||
at91_clock_init(3686400);
|
at91_clock_init(3686400);
|
||||||
|
|
||||||
|
/* Setup the LEDs */
|
||||||
|
at91_init_leds(AT91_PIN_PB2, AT91_PIN_PB2);
|
||||||
|
|
||||||
#ifdef CONFIG_SERIAL_AT91
|
#ifdef CONFIG_SERIAL_AT91
|
||||||
at91_console_port = CSB637_SERIAL_CONSOLE;
|
at91_console_port = CSB637_SERIAL_CONSOLE;
|
||||||
memcpy(at91_serial_map, serial, sizeof(serial));
|
memcpy(at91_serial_map, serial, sizeof(serial));
|
||||||
|
|
|
@ -70,6 +70,9 @@ static void __init dk_map_io(void)
|
||||||
/* Initialize clocks: 18.432 MHz crystal */
|
/* Initialize clocks: 18.432 MHz crystal */
|
||||||
at91_clock_init(18432000);
|
at91_clock_init(18432000);
|
||||||
|
|
||||||
|
/* Setup the LEDs */
|
||||||
|
at91_init_leds(AT91_PIN_PB2, AT91_PIN_PB2);
|
||||||
|
|
||||||
#ifdef CONFIG_SERIAL_AT91
|
#ifdef CONFIG_SERIAL_AT91
|
||||||
at91_console_port = DK_SERIAL_CONSOLE;
|
at91_console_port = DK_SERIAL_CONSOLE;
|
||||||
memcpy(at91_serial_map, serial, sizeof(serial));
|
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);
|
at91_add_device_udc(&dk_udc_data);
|
||||||
/* Compact Flash */
|
/* Compact Flash */
|
||||||
at91_add_device_cf(&dk_cf_data);
|
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 */
|
/* 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);
|
at91_add_device_mmc(&dk_mmc_data);
|
||||||
|
#endif
|
||||||
/* VGA */
|
/* VGA */
|
||||||
// dk_add_device_video();
|
// dk_add_device_video();
|
||||||
}
|
}
|
||||||
|
|
|
@ -70,6 +70,9 @@ static void __init ek_map_io(void)
|
||||||
/* Initialize clocks: 18.432 MHz crystal */
|
/* Initialize clocks: 18.432 MHz crystal */
|
||||||
at91_clock_init(18432000);
|
at91_clock_init(18432000);
|
||||||
|
|
||||||
|
/* Setup the LEDs */
|
||||||
|
at91_init_leds(AT91_PIN_PB1, AT91_PIN_PB2);
|
||||||
|
|
||||||
#ifdef CONFIG_SERIAL_AT91
|
#ifdef CONFIG_SERIAL_AT91
|
||||||
at91_console_port = EK_SERIAL_CONSOLE;
|
at91_console_port = EK_SERIAL_CONSOLE;
|
||||||
memcpy(at91_serial_map, serial, sizeof(serial));
|
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);
|
at91_add_device_usbh(&ek_usbh_data);
|
||||||
/* USB Device */
|
/* USB Device */
|
||||||
at91_add_device_udc(&ek_udc_data);
|
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 */
|
/* 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);
|
at91_add_device_mmc(&ek_mmc_data);
|
||||||
|
#endif
|
||||||
/* VGA */
|
/* VGA */
|
||||||
// ek_add_device_video();
|
// ek_add_device_video();
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,10 +28,10 @@
|
||||||
static u64 ohci_dmamask = 0xffffffffUL;
|
static u64 ohci_dmamask = 0xffffffffUL;
|
||||||
static struct at91_usbh_data usbh_data;
|
static struct at91_usbh_data usbh_data;
|
||||||
|
|
||||||
static struct resource at91rm9200_usbh_resource[] = {
|
static struct resource at91_usbh_resource[] = {
|
||||||
[0] = {
|
[0] = {
|
||||||
.start = AT91_UHP_BASE,
|
.start = AT91_UHP_BASE,
|
||||||
.end = AT91_UHP_BASE + SZ_1M -1,
|
.end = AT91_UHP_BASE + SZ_1M - 1,
|
||||||
.flags = IORESOURCE_MEM,
|
.flags = IORESOURCE_MEM,
|
||||||
},
|
},
|
||||||
[1] = {
|
[1] = {
|
||||||
|
@ -49,8 +49,8 @@ static struct platform_device at91rm9200_usbh_device = {
|
||||||
.coherent_dma_mask = 0xffffffff,
|
.coherent_dma_mask = 0xffffffff,
|
||||||
.platform_data = &usbh_data,
|
.platform_data = &usbh_data,
|
||||||
},
|
},
|
||||||
.resource = at91rm9200_usbh_resource,
|
.resource = at91_usbh_resource,
|
||||||
.num_resources = ARRAY_SIZE(at91rm9200_usbh_resource),
|
.num_resources = ARRAY_SIZE(at91_usbh_resource),
|
||||||
};
|
};
|
||||||
|
|
||||||
void __init at91_add_device_usbh(struct at91_usbh_data *data)
|
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 u64 eth_dmamask = 0xffffffffUL;
|
||||||
static struct at91_eth_data eth_data;
|
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 = {
|
static struct platform_device at91rm9200_eth_device = {
|
||||||
.name = "at91_ether",
|
.name = "at91_ether",
|
||||||
.id = -1,
|
.id = -1,
|
||||||
|
@ -129,7 +142,8 @@ static struct platform_device at91rm9200_eth_device = {
|
||||||
.coherent_dma_mask = 0xffffffff,
|
.coherent_dma_mask = 0xffffffff,
|
||||||
.platform_data = ð_data,
|
.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)
|
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)
|
#if defined(CONFIG_AT91_CF) || defined(CONFIG_AT91_CF_MODULE)
|
||||||
static struct at91_cf_data cf_data;
|
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 = {
|
static struct platform_device at91rm9200_cf_device = {
|
||||||
.name = "at91_cf",
|
.name = "at91_cf",
|
||||||
.id = -1,
|
.id = -1,
|
||||||
.dev = {
|
.dev = {
|
||||||
.platform_data = &cf_data,
|
.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)
|
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 at91_mmc_data mmc_data;
|
||||||
|
|
||||||
static struct resource at91_mmc_resources[] = {
|
static struct resource at91_mmc_resources[] = {
|
||||||
{
|
[0] = {
|
||||||
.start = AT91_BASE_MCI,
|
.start = AT91_BASE_MCI,
|
||||||
.end = AT91_BASE_MCI + SZ_16K - 1,
|
.end = AT91_BASE_MCI + SZ_16K - 1,
|
||||||
.flags = IORESOURCE_MEM,
|
.flags = IORESOURCE_MEM,
|
||||||
}
|
},
|
||||||
|
[1] = {
|
||||||
|
.start = AT91_ID_MCI,
|
||||||
|
.end = AT91_ID_MCI,
|
||||||
|
.flags = IORESOURCE_IRQ,
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct platform_device at91rm9200_mmc_device = {
|
static struct platform_device at91rm9200_mmc_device = {
|
||||||
.name = "at91rm9200_mci",
|
.name = "at91_mci",
|
||||||
.id = -1,
|
.id = -1,
|
||||||
.dev = {
|
.dev = {
|
||||||
.dma_mask = &mmc_dmamask,
|
.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) {}
|
void __init at91_add_device_mmc(struct at91_mmc_data *data) {}
|
||||||
#endif
|
#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
|
||||||
|
|
||||||
|
|
||||||
/* -------------------------------------------------------------------- */
|
/* -------------------------------------------------------------------- */
|
||||||
|
|
100
arch/arm/mach-at91rm9200/leds.c
Normal file
100
arch/arm/mach-at91rm9200/leds.c
Normal file
|
@ -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,
|
.periphid = 0x00041010,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
static struct platform_device ep93xx_rtc_device = {
|
||||||
|
.name = "ep93xx-rtc",
|
||||||
|
.id = -1,
|
||||||
|
.num_resources = 0,
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
void __init ep93xx_init_devices(void)
|
void __init ep93xx_init_devices(void)
|
||||||
{
|
{
|
||||||
unsigned int v;
|
unsigned int v;
|
||||||
|
@ -439,4 +447,6 @@ void __init ep93xx_init_devices(void)
|
||||||
amba_device_register(&uart1_device, &iomem_resource);
|
amba_device_register(&uart1_device, &iomem_resource);
|
||||||
amba_device_register(&uart2_device, &iomem_resource);
|
amba_device_register(&uart2_device, &iomem_resource);
|
||||||
amba_device_register(&uart3_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/sched.h>
|
||||||
#include <linux/interrupt.h>
|
#include <linux/interrupt.h>
|
||||||
#include <linux/mtd/physmap.h>
|
#include <linux/mtd/physmap.h>
|
||||||
|
#include <linux/platform_device.h>
|
||||||
|
#include <linux/m48t86.h>
|
||||||
#include <asm/io.h>
|
#include <asm/io.h>
|
||||||
#include <asm/hardware.h>
|
#include <asm/hardware.h>
|
||||||
#include <asm/mach-types.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),
|
.pfn = __phys_to_pfn(TS72XX_OPTIONS2_PHYS_BASE),
|
||||||
.length = TS72XX_OPTIONS2_SIZE,
|
.length = TS72XX_OPTIONS2_SIZE,
|
||||||
.type = MT_DEVICE,
|
.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)
|
static void __init ts72xx_init_machine(void)
|
||||||
{
|
{
|
||||||
ep93xx_init_devices();
|
ep93xx_init_devices();
|
||||||
if (board_is_ts7200())
|
if (board_is_ts7200())
|
||||||
physmap_configure(TS72XX_NOR_PHYS_BASE, 0x01000000, 1, NULL);
|
physmap_configure(TS72XX_NOR_PHYS_BASE, 0x01000000, 1, NULL);
|
||||||
|
platform_device_register(&ts72xx_rtc_device);
|
||||||
}
|
}
|
||||||
|
|
||||||
MACHINE_START(TS72XX, "Technologic Systems TS-72xx SBC")
|
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
|
* it under the terms of the GNU General Public License version 2 as
|
||||||
* published by the Free Software Foundation.
|
* 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
|
* initial version heavily inspired by
|
||||||
* linux/arch/arm/mach-pxa/dma.c
|
* 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/module.h>
|
||||||
#include <linux/init.h>
|
#include <linux/init.h>
|
||||||
#include <linux/kernel.h>
|
#include <linux/kernel.h>
|
||||||
|
@ -22,69 +29,368 @@
|
||||||
#include <asm/irq.h>
|
#include <asm/irq.h>
|
||||||
#include <asm/hardware.h>
|
#include <asm/hardware.h>
|
||||||
#include <asm/dma.h>
|
#include <asm/dma.h>
|
||||||
|
#include <asm/arch/imx-dma.h>
|
||||||
|
|
||||||
static struct dma_channel {
|
struct imx_dma_channel imx_dma_channels[IMX_DMA_CHANNELS];
|
||||||
char *name;
|
|
||||||
void (*irq_handler) (int, void *, struct pt_regs *);
|
|
||||||
void (*err_handler) (int, void *, struct pt_regs *);
|
|
||||||
void *data;
|
|
||||||
} dma_channels[11];
|
|
||||||
|
|
||||||
/* set err_handler to NULL to have the standard info-only error handler */
|
/*
|
||||||
int
|
* imx_dma_sg_next - prepare next chunk for scatter-gather DMA emulation
|
||||||
imx_request_dma(char *name, imx_dma_prio prio,
|
* @dma_ch: i.MX DMA channel number
|
||||||
void (*irq_handler) (int, void *, struct pt_regs *),
|
* @lastcount: number of bytes transferred during last transfer
|
||||||
void (*err_handler) (int, void *, struct pt_regs *), void *data)
|
*
|
||||||
|
* 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;
|
struct imx_dma_channel *imxdma = &imx_dma_channels[dma_ch];
|
||||||
int i, found = 0;
|
unsigned int nextcount;
|
||||||
|
unsigned int nextaddr;
|
||||||
|
|
||||||
/* basic sanity checks */
|
if (!imxdma->name) {
|
||||||
if (!name || !irq_handler)
|
printk(KERN_CRIT "%s: called for not allocated channel %d\n",
|
||||||
return -EINVAL;
|
__FUNCTION__, dma_ch);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
local_irq_save(flags);
|
imxdma->resbytes -= lastcount;
|
||||||
|
|
||||||
/* try grabbing a DMA channel with the requested priority */
|
if (!imxdma->sg) {
|
||||||
for (i = prio; i < prio + (prio == DMA_PRIO_LOW) ? 8 : 4; i++) {
|
pr_debug("imxdma%d: no sg data\n", dma_ch);
|
||||||
if (!dma_channels[i].name) {
|
return 0;
|
||||||
found = 1;
|
}
|
||||||
break;
|
|
||||||
|
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) {
|
if(imxdma->resbytes < nextcount)
|
||||||
/* requested prio group is full, try hier priorities */
|
nextcount = imxdma->resbytes;
|
||||||
for (i = prio - 1; i >= 0; i--) {
|
|
||||||
if (!dma_channels[i].name) {
|
|
||||||
found = 1;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (found) {
|
if ((imxdma->dma_mode & DMA_MODE_MASK) == DMA_MODE_READ)
|
||||||
DIMR &= ~(1 << i);
|
DAR(dma_ch) = nextaddr;
|
||||||
dma_channels[i].name = name;
|
else
|
||||||
dma_channels[i].irq_handler = irq_handler;
|
SAR(dma_ch) = nextaddr;
|
||||||
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
local_irq_restore(flags);
|
CNTR(dma_ch) = nextcount;
|
||||||
return i;
|
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;
|
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
|
printk(KERN_CRIT
|
||||||
"%s: trying to free channel %d which is already freed\n",
|
"%s: trying to free channel %d which is already freed\n",
|
||||||
__FUNCTION__, dma_ch);
|
__FUNCTION__, dma_ch);
|
||||||
|
@ -92,27 +398,84 @@ imx_free_dma(int dma_ch)
|
||||||
}
|
}
|
||||||
|
|
||||||
local_irq_save(flags);
|
local_irq_save(flags);
|
||||||
DIMR &= ~(1 << dma_ch);
|
/* Disable interrupts */
|
||||||
dma_channels[dma_ch].name = NULL;
|
DIMR |= (1 << dma_ch);
|
||||||
|
CCR(dma_ch) &= ~CCR_CEN;
|
||||||
|
imxdma->name = NULL;
|
||||||
local_irq_restore(flags);
|
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;
|
int i, disr = DISR;
|
||||||
struct dma_channel *channel;
|
struct imx_dma_channel *channel;
|
||||||
unsigned int err_mask = DBTOSR | DRTOSR | DSESR | DBOSR;
|
unsigned int err_mask = DBTOSR | DRTOSR | DSESR | DBOSR;
|
||||||
|
|
||||||
DISR = disr;
|
DISR = disr;
|
||||||
for (i = 0; i < 11; i++) {
|
for (i = 0; i < IMX_DMA_CHANNELS; i++) {
|
||||||
channel = &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);
|
channel->err_handler(i, channel->data, regs);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
imx_dma_channels[i].sg = NULL;
|
||||||
|
|
||||||
if (DBTOSR & (1 << i)) {
|
if (DBTOSR & (1 << i)) {
|
||||||
printk(KERN_WARNING
|
printk(KERN_WARNING
|
||||||
"Burst timeout on channel %d (%s)\n",
|
"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;
|
return IRQ_HANDLED;
|
||||||
}
|
}
|
||||||
|
|
||||||
static irqreturn_t
|
static irqreturn_t dma_irq_handler(int irq, void *dev_id, struct pt_regs *regs)
|
||||||
dma_irq_handler(int irq, void *dev_id, struct pt_regs *regs)
|
|
||||||
{
|
{
|
||||||
int i, disr = DISR;
|
int i, disr = DISR;
|
||||||
|
|
||||||
|
pr_debug("imxdma: dma_irq_handler called, disr=0x%08x\n",
|
||||||
|
disr);
|
||||||
|
|
||||||
DISR = disr;
|
DISR = disr;
|
||||||
for (i = 0; i < 11; i++) {
|
for (i = 0; i < IMX_DMA_CHANNELS; i++) {
|
||||||
if (disr & (1 << i)) {
|
if (disr & (1 << i)) {
|
||||||
struct dma_channel *channel = &dma_channels[i];
|
struct imx_dma_channel *channel = &imx_dma_channels[i];
|
||||||
if (channel->name && channel->irq_handler) {
|
if (channel->name) {
|
||||||
channel->irq_handler(i, channel->data, regs);
|
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 {
|
} else {
|
||||||
/*
|
/*
|
||||||
* IRQ for an unregistered DMA channel:
|
* 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;
|
return IRQ_HANDLED;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int __init
|
static int __init imx_dma_init(void)
|
||||||
imx_dma_init(void)
|
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
|
int i;
|
||||||
|
|
||||||
/* reset DMA module */
|
/* reset DMA module */
|
||||||
DCR = DCR_DRST;
|
DCR = DCR_DRST;
|
||||||
|
@ -189,15 +562,27 @@ imx_dma_init(void)
|
||||||
DCR = DCR_DEN;
|
DCR = DCR_DEN;
|
||||||
|
|
||||||
/* clear all interrupts */
|
/* clear all interrupts */
|
||||||
DISR = 0x3ff;
|
DISR = (1 << IMX_DMA_CHANNELS) - 1;
|
||||||
|
|
||||||
/* enable interrupts */
|
/* 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;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
arch_initcall(imx_dma_init);
|
arch_initcall(imx_dma_init);
|
||||||
|
|
||||||
EXPORT_SYMBOL(imx_request_dma);
|
EXPORT_SYMBOL(imx_dma_setup_single);
|
||||||
EXPORT_SYMBOL(imx_free_dma);
|
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/arch/imx-regs.h>
|
||||||
|
|
||||||
#include <asm/mach/map.h>
|
#include <asm/mach/map.h>
|
||||||
|
#include <asm/arch/mmc.h>
|
||||||
|
|
||||||
void imx_gpio_mode(int gpio_mode)
|
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 = {
|
static struct platform_device imx_mmc_device = {
|
||||||
.name = "imx-mmc",
|
.name = "imx-mmc",
|
||||||
.id = 0,
|
.id = 0,
|
||||||
|
.dev = {
|
||||||
|
.dma_mask = &imxmmmc_dmamask,
|
||||||
|
.coherent_dma_mask = 0xffffffff,
|
||||||
|
},
|
||||||
.num_resources = ARRAY_SIZE(imx_mmc_resources),
|
.num_resources = ARRAY_SIZE(imx_mmc_resources),
|
||||||
.resource = 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[] = {
|
static struct resource imx_uart1_resources[] = {
|
||||||
[0] = {
|
[0] = {
|
||||||
.start = 0x00206000,
|
.start = 0x00206000,
|
||||||
|
|
|
@ -25,6 +25,7 @@
|
||||||
#include <asm/mach-types.h>
|
#include <asm/mach-types.h>
|
||||||
|
|
||||||
#include <asm/mach/arch.h>
|
#include <asm/mach/arch.h>
|
||||||
|
#include <asm/arch/mmc.h>
|
||||||
#include <linux/interrupt.h>
|
#include <linux/interrupt.h>
|
||||||
#include "generic.h"
|
#include "generic.h"
|
||||||
|
|
||||||
|
@ -51,11 +52,28 @@ static struct platform_device *devices[] __initdata = {
|
||||||
&cs89x0_device,
|
&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
|
static void __init
|
||||||
mx1ads_init(void)
|
mx1ads_init(void)
|
||||||
{
|
{
|
||||||
#ifdef CONFIG_LEDS
|
#ifdef CONFIG_LEDS
|
||||||
imx_gpio_mode(GPIO_PORTA | GPIO_OUT | 2);
|
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
|
#endif
|
||||||
platform_add_devices(devices, ARRAY_SIZE(devices));
|
platform_add_devices(devices, ARRAY_SIZE(devices));
|
||||||
}
|
}
|
||||||
|
|
|
@ -44,6 +44,15 @@
|
||||||
#include <asm/mach/irq.h>
|
#include <asm/mach/irq.h>
|
||||||
#include <asm/mach/pci.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)
|
static void __init espresso_init(void)
|
||||||
{
|
{
|
||||||
physmap_configure(0x90000000, 0x02000000, 2, NULL);
|
physmap_configure(0x90000000, 0x02000000, 2, NULL);
|
||||||
|
|
|
@ -201,7 +201,7 @@ int clear_master_aborts(void)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void __init ixp23xx_pci_preinit(void)
|
static void __init ixp23xx_pci_common_init(void)
|
||||||
{
|
{
|
||||||
#ifdef __ARMEB__
|
#ifdef __ARMEB__
|
||||||
*IXP23XX_PCI_CONTROL |= 0x20000; /* set I/O swapping */
|
*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);
|
*IXP23XX_PCI_CPP_ADDR_BITS &= ~(1 << 1);
|
||||||
} else {
|
} else {
|
||||||
*IXP23XX_PCI_CPP_ADDR_BITS |= (1 << 1);
|
*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,
|
hook_fault_code(16+6, ixp23xx_pci_abort_handler, SIGBUS,
|
||||||
"PCI config cycle to non-existent device");
|
"PCI config cycle to non-existent device");
|
||||||
|
@ -273,3 +284,8 @@ int ixp23xx_pci_setup(int nr, struct pci_sys_data *sys)
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ixp23xx_pci_slave_init(void)
|
||||||
|
{
|
||||||
|
ixp23xx_pci_common_init();
|
||||||
|
}
|
||||||
|
|
|
@ -69,12 +69,6 @@ config MACH_VOICEBLUE
|
||||||
Support for Voiceblue GSM/VoIP gateway. Say Y here if you have
|
Support for Voiceblue GSM/VoIP gateway. Say Y here if you have
|
||||||
such a board.
|
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
|
config MACH_OMAP_PALMTE
|
||||||
bool "Palm Tungsten E"
|
bool "Palm Tungsten E"
|
||||||
depends on ARCH_OMAP1 && ARCH_OMAP15XX
|
depends on ARCH_OMAP1 && ARCH_OMAP15XX
|
||||||
|
@ -85,6 +79,20 @@ config MACH_OMAP_PALMTE
|
||||||
informations.
|
informations.
|
||||||
Say Y here if you have such a PDA, say NO otherwise.
|
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
|
config MACH_OMAP_GENERIC
|
||||||
bool "Generic OMAP board"
|
bool "Generic OMAP board"
|
||||||
depends on ARCH_OMAP1 && (ARCH_OMAP15XX || ARCH_OMAP16XX)
|
depends on ARCH_OMAP1 && (ARCH_OMAP15XX || ARCH_OMAP16XX)
|
||||||
|
|
|
@ -3,7 +3,13 @@
|
||||||
#
|
#
|
||||||
|
|
||||||
# Common support
|
# 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
|
led-y := leds.o
|
||||||
|
|
||||||
# Specific board support
|
# 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_OSK) += board-osk.o
|
||||||
obj-$(CONFIG_MACH_OMAP_H3) += board-h3.o
|
obj-$(CONFIG_MACH_OMAP_H3) += board-h3.o
|
||||||
obj-$(CONFIG_MACH_VOICEBLUE) += board-voiceblue.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_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)
|
ifeq ($(CONFIG_ARCH_OMAP15XX),y)
|
||||||
# Innovator-1510 FPGA
|
# Innovator-1510 FPGA
|
||||||
|
|
116
arch/arm/mach-omap1/board-ams-delta.c
Normal file
116
arch/arm/mach-omap1/board-ams-delta.c
Normal file
|
@ -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)
|
static void __init omap_generic_init(void)
|
||||||
{
|
{
|
||||||
#ifdef CONFIG_ARCH_OMAP15XX
|
#ifdef CONFIG_ARCH_OMAP15XX
|
||||||
if (cpu_is_omap1510()) {
|
if (cpu_is_omap15xx()) {
|
||||||
generic_config[0].data = &generic1510_usb_config;
|
generic_config[0].data = &generic1510_usb_config;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -24,7 +24,9 @@
|
||||||
#include <linux/platform_device.h>
|
#include <linux/platform_device.h>
|
||||||
#include <linux/delay.h>
|
#include <linux/delay.h>
|
||||||
#include <linux/mtd/mtd.h>
|
#include <linux/mtd/mtd.h>
|
||||||
|
#include <linux/mtd/nand.h>
|
||||||
#include <linux/mtd/partitions.h>
|
#include <linux/mtd/partitions.h>
|
||||||
|
#include <linux/input.h>
|
||||||
|
|
||||||
#include <asm/hardware.h>
|
#include <asm/hardware.h>
|
||||||
#include <asm/mach-types.h>
|
#include <asm/mach-types.h>
|
||||||
|
@ -35,12 +37,55 @@
|
||||||
#include <asm/arch/gpio.h>
|
#include <asm/arch/gpio.h>
|
||||||
#include <asm/arch/mux.h>
|
#include <asm/arch/mux.h>
|
||||||
#include <asm/arch/tc.h>
|
#include <asm/arch/tc.h>
|
||||||
|
#include <asm/arch/irda.h>
|
||||||
#include <asm/arch/usb.h>
|
#include <asm/arch/usb.h>
|
||||||
|
#include <asm/arch/keypad.h>
|
||||||
#include <asm/arch/common.h>
|
#include <asm/arch/common.h>
|
||||||
|
#include <asm/arch/mcbsp.h>
|
||||||
|
#include <asm/arch/omap-alsa.h>
|
||||||
|
|
||||||
extern int omap_gpio_init(void);
|
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 */
|
/* bootloader (U-Boot, etc) in first sector */
|
||||||
{
|
{
|
||||||
.name = "bootloader",
|
.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",
|
.map_name = "cfi_probe",
|
||||||
.width = 2,
|
.width = 2,
|
||||||
.parts = h2_partitions,
|
.parts = h2_nor_partitions,
|
||||||
.nr_parts = ARRAY_SIZE(h2_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 */
|
/* This is on CS3, wherever it's mapped */
|
||||||
.flags = IORESOURCE_MEM,
|
.flags = IORESOURCE_MEM,
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct platform_device h2_flash_device = {
|
static struct platform_device h2_nor_device = {
|
||||||
.name = "omapflash",
|
.name = "omapflash",
|
||||||
.id = 0,
|
.id = 0,
|
||||||
.dev = {
|
.dev = {
|
||||||
.platform_data = &h2_flash_data,
|
.platform_data = &h2_nor_data,
|
||||||
},
|
},
|
||||||
.num_resources = 1,
|
.num_resources = 1,
|
||||||
.resource = &h2_flash_resource,
|
.resource = &h2_nor_resource,
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct resource h2_smc91x_resources[] = {
|
static struct resource h2_smc91x_resources[] = {
|
||||||
|
@ -113,9 +158,119 @@ static struct platform_device h2_smc91x_device = {
|
||||||
.resource = h2_smc91x_resources,
|
.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 = {
|
static struct platform_device *h2_devices[] __initdata = {
|
||||||
&h2_flash_device,
|
&h2_nor_device,
|
||||||
&h2_smc91x_device,
|
&h2_smc91x_device,
|
||||||
|
&h2_irda_device,
|
||||||
|
&h2_kp_device,
|
||||||
|
&h2_lcd_device,
|
||||||
|
&h2_mcbsp1_device,
|
||||||
};
|
};
|
||||||
|
|
||||||
static void __init h2_init_smc91x(void)
|
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 = {
|
static struct omap_lcd_config h2_lcd_config __initdata = {
|
||||||
.panel_name = "h2",
|
|
||||||
.ctrl_name = "internal",
|
.ctrl_name = "internal",
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -177,16 +331,34 @@ static struct omap_board_config_kernel h2_config[] = {
|
||||||
|
|
||||||
static void __init h2_init(void)
|
static void __init h2_init(void)
|
||||||
{
|
{
|
||||||
/* NOTE: revC boards support NAND-boot, which can put NOR on CS2B
|
/* Here we assume the NOR boot config: NOR on CS3 (possibly swapped
|
||||||
* and NAND (either 16bit or 8bit) on CS3.
|
* 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_nor_resource.end = h2_nor_resource.start = omap_cs3_phys();
|
||||||
h2_flash_resource.end += SZ_32M - 1;
|
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 */
|
/* MMC: card detect and WP */
|
||||||
// omap_cfg_reg(U19_ARMIO1); /* CD */
|
// omap_cfg_reg(U19_ARMIO1); /* CD */
|
||||||
omap_cfg_reg(BALLOUT_V8_ARMIO3); /* WP */
|
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));
|
platform_add_devices(h2_devices, ARRAY_SIZE(h2_devices));
|
||||||
omap_board_config = h2_config;
|
omap_board_config = h2_config;
|
||||||
omap_board_config_size = ARRAY_SIZE(h2_config);
|
omap_board_config_size = ARRAY_SIZE(h2_config);
|
||||||
|
|
|
@ -21,8 +21,11 @@
|
||||||
#include <linux/kernel.h>
|
#include <linux/kernel.h>
|
||||||
#include <linux/platform_device.h>
|
#include <linux/platform_device.h>
|
||||||
#include <linux/errno.h>
|
#include <linux/errno.h>
|
||||||
|
#include <linux/workqueue.h>
|
||||||
#include <linux/mtd/mtd.h>
|
#include <linux/mtd/mtd.h>
|
||||||
|
#include <linux/mtd/nand.h>
|
||||||
#include <linux/mtd/partitions.h>
|
#include <linux/mtd/partitions.h>
|
||||||
|
#include <linux/input.h>
|
||||||
|
|
||||||
#include <asm/setup.h>
|
#include <asm/setup.h>
|
||||||
#include <asm/page.h>
|
#include <asm/page.h>
|
||||||
|
@ -33,15 +36,59 @@
|
||||||
#include <asm/mach/map.h>
|
#include <asm/mach/map.h>
|
||||||
|
|
||||||
#include <asm/arch/gpio.h>
|
#include <asm/arch/gpio.h>
|
||||||
|
#include <asm/arch/gpioexpander.h>
|
||||||
#include <asm/arch/irqs.h>
|
#include <asm/arch/irqs.h>
|
||||||
#include <asm/arch/mux.h>
|
#include <asm/arch/mux.h>
|
||||||
#include <asm/arch/tc.h>
|
#include <asm/arch/tc.h>
|
||||||
|
#include <asm/arch/irda.h>
|
||||||
#include <asm/arch/usb.h>
|
#include <asm/arch/usb.h>
|
||||||
|
#include <asm/arch/keypad.h>
|
||||||
|
#include <asm/arch/dma.h>
|
||||||
#include <asm/arch/common.h>
|
#include <asm/arch/common.h>
|
||||||
|
|
||||||
extern int omap_gpio_init(void);
|
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 */
|
/* bootloader (U-Boot, etc) in first sector */
|
||||||
{
|
{
|
||||||
.name = "bootloader",
|
.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",
|
.map_name = "cfi_probe",
|
||||||
.width = 2,
|
.width = 2,
|
||||||
.parts = h3_partitions,
|
.parts = nor_partitions,
|
||||||
.nr_parts = ARRAY_SIZE(h3_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 */
|
/* This is on CS3, wherever it's mapped */
|
||||||
.flags = IORESOURCE_MEM,
|
.flags = IORESOURCE_MEM,
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct platform_device flash_device = {
|
static struct platform_device nor_device = {
|
||||||
.name = "omapflash",
|
.name = "omapflash",
|
||||||
.id = 0,
|
.id = 0,
|
||||||
.dev = {
|
.dev = {
|
||||||
.platform_data = &h3_flash_data,
|
.platform_data = &nor_data,
|
||||||
},
|
},
|
||||||
.num_resources = 1,
|
.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[] = {
|
static struct resource smc91x_resources[] = {
|
||||||
|
@ -138,10 +239,136 @@ static struct platform_device intlat_device = {
|
||||||
.resource = intlat_resources,
|
.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 = {
|
static struct platform_device *devices[] __initdata = {
|
||||||
&flash_device,
|
&nor_device,
|
||||||
|
&nand_device,
|
||||||
&smc91x_device,
|
&smc91x_device,
|
||||||
&intlat_device,
|
&intlat_device,
|
||||||
|
&h3_irda_device,
|
||||||
|
&h3_kp_device,
|
||||||
|
&h3_lcd_device,
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct omap_usb_config h3_usb_config __initdata = {
|
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 = {
|
static struct omap_lcd_config h3_lcd_config __initdata = {
|
||||||
.panel_name = "h3",
|
|
||||||
.ctrl_name = "internal",
|
.ctrl_name = "internal",
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -182,11 +408,36 @@ static struct omap_board_config_kernel h3_config[] = {
|
||||||
{ OMAP_TAG_LCD, &h3_lcd_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)
|
static void __init h3_init(void)
|
||||||
{
|
{
|
||||||
h3_flash_resource.end = h3_flash_resource.start = omap_cs3_phys();
|
/* Here we assume the NOR boot config: NOR on CS3 (possibly swapped
|
||||||
h3_flash_resource.end += OMAP_CS3_SIZE - 1;
|
* to address 0 by a dip switch), NAND on CS2B. The NAND driver will
|
||||||
(void) platform_add_devices(devices, ARRAY_SIZE(devices));
|
* 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 = h3_config;
|
||||||
omap_board_config_size = ARRAY_SIZE(h3_config);
|
omap_board_config_size = ARRAY_SIZE(h3_config);
|
||||||
omap_serial_init();
|
omap_serial_init();
|
||||||
|
|
|
@ -22,6 +22,7 @@
|
||||||
#include <linux/delay.h>
|
#include <linux/delay.h>
|
||||||
#include <linux/mtd/mtd.h>
|
#include <linux/mtd/mtd.h>
|
||||||
#include <linux/mtd/partitions.h>
|
#include <linux/mtd/partitions.h>
|
||||||
|
#include <linux/input.h>
|
||||||
|
|
||||||
#include <asm/hardware.h>
|
#include <asm/hardware.h>
|
||||||
#include <asm/mach-types.h>
|
#include <asm/mach-types.h>
|
||||||
|
@ -34,8 +35,22 @@
|
||||||
#include <asm/arch/gpio.h>
|
#include <asm/arch/gpio.h>
|
||||||
#include <asm/arch/tc.h>
|
#include <asm/arch/tc.h>
|
||||||
#include <asm/arch/usb.h>
|
#include <asm/arch/usb.h>
|
||||||
|
#include <asm/arch/keypad.h>
|
||||||
#include <asm/arch/common.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[] = {
|
static struct mtd_partition innovator_partitions[] = {
|
||||||
/* bootloader (U-Boot, etc) in first sector */
|
/* bootloader (U-Boot, etc) in first sector */
|
||||||
{
|
{
|
||||||
|
@ -97,6 +112,31 @@ static struct platform_device innovator_flash_device = {
|
||||||
.resource = &innovator_flash_resource,
|
.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
|
#ifdef CONFIG_ARCH_OMAP15XX
|
||||||
|
|
||||||
/* Only FPGA needs to be mapped here. All others are done with ioremap */
|
/* 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,
|
.resource = innovator1510_smc91x_resources,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static struct platform_device innovator1510_lcd_device = {
|
||||||
|
.name = "lcd_inn1510",
|
||||||
|
.id = -1,
|
||||||
|
};
|
||||||
|
|
||||||
static struct platform_device *innovator1510_devices[] __initdata = {
|
static struct platform_device *innovator1510_devices[] __initdata = {
|
||||||
&innovator_flash_device,
|
&innovator_flash_device,
|
||||||
&innovator1510_smc91x_device,
|
&innovator1510_smc91x_device,
|
||||||
|
&innovator_kp_device,
|
||||||
|
&innovator1510_lcd_device,
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* CONFIG_ARCH_OMAP15XX */
|
#endif /* CONFIG_ARCH_OMAP15XX */
|
||||||
|
@ -158,9 +205,16 @@ static struct platform_device innovator1610_smc91x_device = {
|
||||||
.resource = innovator1610_smc91x_resources,
|
.resource = innovator1610_smc91x_resources,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static struct platform_device innovator1610_lcd_device = {
|
||||||
|
.name = "inn1610_lcd",
|
||||||
|
.id = -1,
|
||||||
|
};
|
||||||
|
|
||||||
static struct platform_device *innovator1610_devices[] __initdata = {
|
static struct platform_device *innovator1610_devices[] __initdata = {
|
||||||
&innovator_flash_device,
|
&innovator_flash_device,
|
||||||
&innovator1610_smc91x_device,
|
&innovator1610_smc91x_device,
|
||||||
|
&innovator_kp_device,
|
||||||
|
&innovator1610_lcd_device,
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* CONFIG_ARCH_OMAP16XX */
|
#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 = {
|
static struct omap_lcd_config innovator1510_lcd_config __initdata = {
|
||||||
.panel_name = "inn1510",
|
|
||||||
.ctrl_name = "internal",
|
.ctrl_name = "internal",
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
@ -228,7 +281,6 @@ static struct omap_usb_config h2_usb_config __initdata = {
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct omap_lcd_config innovator1610_lcd_config __initdata = {
|
static struct omap_lcd_config innovator1610_lcd_config __initdata = {
|
||||||
.panel_name = "inn1610",
|
|
||||||
.ctrl_name = "internal",
|
.ctrl_name = "internal",
|
||||||
};
|
};
|
||||||
#endif
|
#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
|
|
268
arch/arm/mach-omap1/board-nokia770.c
Normal file
268
arch/arm/mach-omap1/board-nokia770.c
Normal file
|
@ -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/mtd.h>
|
||||||
#include <linux/mtd/partitions.h>
|
#include <linux/mtd/partitions.h>
|
||||||
|
#include <linux/input.h>
|
||||||
|
|
||||||
#include <asm/hardware.h>
|
#include <asm/hardware.h>
|
||||||
#include <asm/mach-types.h>
|
#include <asm/mach-types.h>
|
||||||
|
@ -44,7 +45,24 @@
|
||||||
#include <asm/arch/usb.h>
|
#include <asm/arch/usb.h>
|
||||||
#include <asm/arch/mux.h>
|
#include <asm/arch/mux.h>
|
||||||
#include <asm/arch/tc.h>
|
#include <asm/arch/tc.h>
|
||||||
|
#include <asm/arch/keypad.h>
|
||||||
#include <asm/arch/common.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[] = {
|
static struct mtd_partition osk_partitions[] = {
|
||||||
/* bootloader (U-Boot, etc) in first sector */
|
/* bootloader (U-Boot, etc) in first sector */
|
||||||
|
@ -133,9 +151,69 @@ static struct platform_device osk5912_cf_device = {
|
||||||
.resource = osk5912_cf_resources,
|
.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 = {
|
static struct platform_device osk5912_mcbsp1_device = {
|
||||||
.name = "omap_mcbsp",
|
.name = "omap_alsa_mcbsp",
|
||||||
.id = 1,
|
.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 = {
|
static struct platform_device *osk5912_devices[] __initdata = {
|
||||||
|
@ -143,6 +221,8 @@ static struct platform_device *osk5912_devices[] __initdata = {
|
||||||
&osk5912_smc91x_device,
|
&osk5912_smc91x_device,
|
||||||
&osk5912_cf_device,
|
&osk5912_cf_device,
|
||||||
&osk5912_mcbsp1_device,
|
&osk5912_mcbsp1_device,
|
||||||
|
&osk5912_kp_device,
|
||||||
|
&osk5912_lcd_device,
|
||||||
};
|
};
|
||||||
|
|
||||||
static void __init osk_init_smc91x(void)
|
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 = {
|
static struct omap_lcd_config osk_lcd_config __initdata = {
|
||||||
.panel_name = "osk",
|
|
||||||
.ctrl_name = "internal",
|
.ctrl_name = "internal",
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -255,8 +334,18 @@ static void __init osk_mistral_init(void)
|
||||||
static void __init osk_mistral_init(void) { }
|
static void __init osk_mistral_init(void) { }
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#define EMIFS_CS3_VAL (0x88013141)
|
||||||
|
|
||||||
static void __init osk_init(void)
|
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 = osk_flash_resource.start = omap_cs3_phys();
|
||||||
osk_flash_resource.end += SZ_32M - 1;
|
osk_flash_resource.end += SZ_32M - 1;
|
||||||
platform_add_devices(osk5912_devices, ARRAY_SIZE(osk5912_devices));
|
platform_add_devices(osk5912_devices, ARRAY_SIZE(osk5912_devices));
|
||||||
|
|
|
@ -38,6 +38,15 @@ static void __init omap_generic_init_irq(void)
|
||||||
omap_init_irq();
|
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 = {
|
static struct omap_usb_config palmte_usb_config __initdata = {
|
||||||
.register_dev = 1,
|
.register_dev = 1,
|
||||||
.hmc_mode = 0,
|
.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 = {
|
static struct omap_lcd_config palmte_lcd_config __initdata = {
|
||||||
.panel_name = "palmte",
|
|
||||||
.ctrl_name = "internal",
|
.ctrl_name = "internal",
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -69,6 +77,8 @@ static void __init omap_generic_init(void)
|
||||||
{
|
{
|
||||||
omap_board_config = palmte_config;
|
omap_board_config = palmte_config;
|
||||||
omap_board_config_size = ARRAY_SIZE(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)
|
static void __init omap_generic_map_io(void)
|
||||||
|
|
|
@ -16,7 +16,9 @@
|
||||||
#include <linux/platform_device.h>
|
#include <linux/platform_device.h>
|
||||||
#include <linux/delay.h>
|
#include <linux/delay.h>
|
||||||
#include <linux/mtd/mtd.h>
|
#include <linux/mtd/mtd.h>
|
||||||
|
#include <linux/mtd/nand.h>
|
||||||
#include <linux/mtd/partitions.h>
|
#include <linux/mtd/partitions.h>
|
||||||
|
#include <linux/input.h>
|
||||||
|
|
||||||
#include <asm/hardware.h>
|
#include <asm/hardware.h>
|
||||||
#include <asm/mach-types.h>
|
#include <asm/mach-types.h>
|
||||||
|
@ -28,9 +30,44 @@
|
||||||
#include <asm/arch/gpio.h>
|
#include <asm/arch/gpio.h>
|
||||||
#include <asm/arch/mux.h>
|
#include <asm/arch/mux.h>
|
||||||
#include <asm/arch/fpga.h>
|
#include <asm/arch/fpga.h>
|
||||||
|
#include <asm/arch/keypad.h>
|
||||||
#include <asm/arch/common.h>
|
#include <asm/arch/common.h>
|
||||||
#include <asm/arch/board.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[] = {
|
static struct resource smc91x_resources[] = {
|
||||||
[0] = {
|
[0] = {
|
||||||
.start = H2P2_DBG_FPGA_ETHR_START, /* Physical */
|
.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 */
|
/* bootloader (U-Boot, etc) in first sector */
|
||||||
{
|
{
|
||||||
.name = "bootloader",
|
.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",
|
.map_name = "cfi_probe",
|
||||||
.width = 2,
|
.width = 2,
|
||||||
.parts = p2_partitions,
|
.parts = nor_partitions,
|
||||||
.nr_parts = ARRAY_SIZE(p2_partitions),
|
.nr_parts = ARRAY_SIZE(nor_partitions),
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct resource p2_flash_resource = {
|
static struct resource nor_resource = {
|
||||||
.start = OMAP_CS0_PHYS,
|
.start = OMAP_CS0_PHYS,
|
||||||
.end = OMAP_CS0_PHYS + SZ_32M - 1,
|
.end = OMAP_CS0_PHYS + SZ_32M - 1,
|
||||||
.flags = IORESOURCE_MEM,
|
.flags = IORESOURCE_MEM,
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct platform_device p2_flash_device = {
|
static struct platform_device nor_device = {
|
||||||
.name = "omapflash",
|
.name = "omapflash",
|
||||||
.id = 0,
|
.id = 0,
|
||||||
.dev = {
|
.dev = {
|
||||||
.platform_data = &p2_flash_data,
|
.platform_data = &nor_data,
|
||||||
},
|
},
|
||||||
.num_resources = 1,
|
.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 = {
|
static struct platform_device smc91x_device = {
|
||||||
|
@ -105,17 +162,55 @@ static struct platform_device smc91x_device = {
|
||||||
.resource = smc91x_resources,
|
.resource = smc91x_resources,
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct platform_device *devices[] __initdata = {
|
static struct resource kp_resources[] = {
|
||||||
&p2_flash_device,
|
[0] = {
|
||||||
&smc91x_device,
|
.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 = {
|
static struct omap_uart_config perseus2_uart_config __initdata = {
|
||||||
.enabled_uarts = ((1 << 0) | (1 << 1)),
|
.enabled_uarts = ((1 << 0) | (1 << 1)),
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct omap_lcd_config perseus2_lcd_config __initdata = {
|
static struct omap_lcd_config perseus2_lcd_config __initdata = {
|
||||||
.panel_name = "p2",
|
|
||||||
.ctrl_name = "internal",
|
.ctrl_name = "internal",
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -126,7 +221,13 @@ static struct omap_board_config_kernel perseus2_config[] = {
|
||||||
|
|
||||||
static void __init omap_perseus2_init(void)
|
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 = perseus2_config;
|
||||||
omap_board_config_size = ARRAY_SIZE(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[] = {
|
static struct omap_board_config_kernel voiceblue_config[] = {
|
||||||
{ OMAP_TAG_USB, &voiceblue_usb_config },
|
{ OMAP_TAG_USB, &voiceblue_usb_config },
|
||||||
{ OMAP_TAG_MMC, &voiceblue_mmc_config },
|
{ OMAP_TAG_MMC, &voiceblue_mmc_config },
|
||||||
{ OMAP_TAG_UART, &voiceblue_uart_config },
|
{ OMAP_TAG_UART, &voiceblue_uart_config },
|
||||||
};
|
};
|
||||||
|
|
||||||
static void __init voiceblue_init_irq(void)
|
static void __init voiceblue_init_irq(void)
|
||||||
|
@ -235,7 +235,7 @@ static struct notifier_block panic_block = {
|
||||||
static int __init voiceblue_setup(void)
|
static int __init voiceblue_setup(void)
|
||||||
{
|
{
|
||||||
/* Setup panic notifier */
|
/* Setup panic notifier */
|
||||||
atomic_notifier_chain_register(&panic_notifier_list, &panic_block);
|
notifier_chain_register(&panic_notifier_list, &panic_block);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -345,7 +345,7 @@ static unsigned calc_ext_dsor(unsigned long rate)
|
||||||
*/
|
*/
|
||||||
for (dsor = 2; dsor < 96; ++dsor) {
|
for (dsor = 2; dsor < 96; ++dsor) {
|
||||||
if ((dsor & 1) && dsor > 8)
|
if ((dsor & 1) && dsor > 8)
|
||||||
continue;
|
continue;
|
||||||
if (rate >= 96000000 / dsor)
|
if (rate >= 96000000 / dsor)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -687,6 +687,11 @@ int __init omap1_clk_init(void)
|
||||||
clk_register(*clkp);
|
clk_register(*clkp);
|
||||||
continue;
|
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);
|
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(&armxor_ck.clk);
|
||||||
clk_enable(&armtim_ck.clk); /* This should be done by timer code */
|
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);
|
clk_enable(&arm_gpio_ck);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -151,7 +151,7 @@ static struct clk ck_ref = {
|
||||||
.name = "ck_ref",
|
.name = "ck_ref",
|
||||||
.rate = 12000000,
|
.rate = 12000000,
|
||||||
.flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX |
|
.flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX |
|
||||||
ALWAYS_ENABLED,
|
CLOCK_IN_OMAP310 | ALWAYS_ENABLED,
|
||||||
.enable = &omap1_clk_enable_generic,
|
.enable = &omap1_clk_enable_generic,
|
||||||
.disable = &omap1_clk_disable_generic,
|
.disable = &omap1_clk_disable_generic,
|
||||||
};
|
};
|
||||||
|
@ -160,7 +160,7 @@ static struct clk ck_dpll1 = {
|
||||||
.name = "ck_dpll1",
|
.name = "ck_dpll1",
|
||||||
.parent = &ck_ref,
|
.parent = &ck_ref,
|
||||||
.flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX |
|
.flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX |
|
||||||
RATE_PROPAGATES | ALWAYS_ENABLED,
|
CLOCK_IN_OMAP310 | RATE_PROPAGATES | ALWAYS_ENABLED,
|
||||||
.enable = &omap1_clk_enable_generic,
|
.enable = &omap1_clk_enable_generic,
|
||||||
.disable = &omap1_clk_disable_generic,
|
.disable = &omap1_clk_disable_generic,
|
||||||
};
|
};
|
||||||
|
@ -183,7 +183,8 @@ static struct clk arm_ck = {
|
||||||
.name = "arm_ck",
|
.name = "arm_ck",
|
||||||
.parent = &ck_dpll1,
|
.parent = &ck_dpll1,
|
||||||
.flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX |
|
.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,
|
.rate_offset = CKCTL_ARMDIV_OFFSET,
|
||||||
.recalc = &omap1_ckctl_recalc,
|
.recalc = &omap1_ckctl_recalc,
|
||||||
.enable = &omap1_clk_enable_generic,
|
.enable = &omap1_clk_enable_generic,
|
||||||
|
@ -195,7 +196,8 @@ static struct arm_idlect1_clk armper_ck = {
|
||||||
.name = "armper_ck",
|
.name = "armper_ck",
|
||||||
.parent = &ck_dpll1,
|
.parent = &ck_dpll1,
|
||||||
.flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX |
|
.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_reg = (void __iomem *)ARM_IDLECT2,
|
||||||
.enable_bit = EN_PERCK,
|
.enable_bit = EN_PERCK,
|
||||||
.rate_offset = CKCTL_PERDIV_OFFSET,
|
.rate_offset = CKCTL_PERDIV_OFFSET,
|
||||||
|
@ -209,7 +211,7 @@ static struct arm_idlect1_clk armper_ck = {
|
||||||
static struct clk arm_gpio_ck = {
|
static struct clk arm_gpio_ck = {
|
||||||
.name = "arm_gpio_ck",
|
.name = "arm_gpio_ck",
|
||||||
.parent = &ck_dpll1,
|
.parent = &ck_dpll1,
|
||||||
.flags = CLOCK_IN_OMAP1510,
|
.flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP310,
|
||||||
.enable_reg = (void __iomem *)ARM_IDLECT2,
|
.enable_reg = (void __iomem *)ARM_IDLECT2,
|
||||||
.enable_bit = EN_GPIOCK,
|
.enable_bit = EN_GPIOCK,
|
||||||
.recalc = &followparent_recalc,
|
.recalc = &followparent_recalc,
|
||||||
|
@ -222,7 +224,7 @@ static struct arm_idlect1_clk armxor_ck = {
|
||||||
.name = "armxor_ck",
|
.name = "armxor_ck",
|
||||||
.parent = &ck_ref,
|
.parent = &ck_ref,
|
||||||
.flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX |
|
.flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX |
|
||||||
CLOCK_IDLE_CONTROL,
|
CLOCK_IN_OMAP310 | CLOCK_IDLE_CONTROL,
|
||||||
.enable_reg = (void __iomem *)ARM_IDLECT2,
|
.enable_reg = (void __iomem *)ARM_IDLECT2,
|
||||||
.enable_bit = EN_XORPCK,
|
.enable_bit = EN_XORPCK,
|
||||||
.recalc = &followparent_recalc,
|
.recalc = &followparent_recalc,
|
||||||
|
@ -237,7 +239,7 @@ static struct arm_idlect1_clk armtim_ck = {
|
||||||
.name = "armtim_ck",
|
.name = "armtim_ck",
|
||||||
.parent = &ck_ref,
|
.parent = &ck_ref,
|
||||||
.flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX |
|
.flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX |
|
||||||
CLOCK_IDLE_CONTROL,
|
CLOCK_IN_OMAP310 | CLOCK_IDLE_CONTROL,
|
||||||
.enable_reg = (void __iomem *)ARM_IDLECT2,
|
.enable_reg = (void __iomem *)ARM_IDLECT2,
|
||||||
.enable_bit = EN_TIMCK,
|
.enable_bit = EN_TIMCK,
|
||||||
.recalc = &followparent_recalc,
|
.recalc = &followparent_recalc,
|
||||||
|
@ -252,7 +254,7 @@ static struct arm_idlect1_clk armwdt_ck = {
|
||||||
.name = "armwdt_ck",
|
.name = "armwdt_ck",
|
||||||
.parent = &ck_ref,
|
.parent = &ck_ref,
|
||||||
.flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX |
|
.flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX |
|
||||||
CLOCK_IDLE_CONTROL,
|
CLOCK_IN_OMAP310 | CLOCK_IDLE_CONTROL,
|
||||||
.enable_reg = (void __iomem *)ARM_IDLECT2,
|
.enable_reg = (void __iomem *)ARM_IDLECT2,
|
||||||
.enable_bit = EN_WDTCK,
|
.enable_bit = EN_WDTCK,
|
||||||
.recalc = &omap1_watchdog_recalc,
|
.recalc = &omap1_watchdog_recalc,
|
||||||
|
@ -344,9 +346,9 @@ static struct arm_idlect1_clk tc_ck = {
|
||||||
.name = "tc_ck",
|
.name = "tc_ck",
|
||||||
.parent = &ck_dpll1,
|
.parent = &ck_dpll1,
|
||||||
.flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX |
|
.flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX |
|
||||||
CLOCK_IN_OMAP730 | RATE_CKCTL |
|
CLOCK_IN_OMAP730 | CLOCK_IN_OMAP310 |
|
||||||
RATE_PROPAGATES | ALWAYS_ENABLED |
|
RATE_CKCTL | RATE_PROPAGATES |
|
||||||
CLOCK_IDLE_CONTROL,
|
ALWAYS_ENABLED | CLOCK_IDLE_CONTROL,
|
||||||
.rate_offset = CKCTL_TCDIV_OFFSET,
|
.rate_offset = CKCTL_TCDIV_OFFSET,
|
||||||
.recalc = &omap1_ckctl_recalc,
|
.recalc = &omap1_ckctl_recalc,
|
||||||
.enable = &omap1_clk_enable_generic,
|
.enable = &omap1_clk_enable_generic,
|
||||||
|
@ -358,7 +360,8 @@ static struct arm_idlect1_clk tc_ck = {
|
||||||
static struct clk arminth_ck1510 = {
|
static struct clk arminth_ck1510 = {
|
||||||
.name = "arminth_ck",
|
.name = "arminth_ck",
|
||||||
.parent = &tc_ck.clk,
|
.parent = &tc_ck.clk,
|
||||||
.flags = CLOCK_IN_OMAP1510 | ALWAYS_ENABLED,
|
.flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP310 |
|
||||||
|
ALWAYS_ENABLED,
|
||||||
.recalc = &followparent_recalc,
|
.recalc = &followparent_recalc,
|
||||||
/* Note: On 1510 the frequency follows TC_CK
|
/* Note: On 1510 the frequency follows TC_CK
|
||||||
*
|
*
|
||||||
|
@ -372,7 +375,8 @@ static struct clk tipb_ck = {
|
||||||
/* No-idle controlled by "tc_ck" */
|
/* No-idle controlled by "tc_ck" */
|
||||||
.name = "tibp_ck",
|
.name = "tibp_ck",
|
||||||
.parent = &tc_ck.clk,
|
.parent = &tc_ck.clk,
|
||||||
.flags = CLOCK_IN_OMAP1510 | ALWAYS_ENABLED,
|
.flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP310 |
|
||||||
|
ALWAYS_ENABLED,
|
||||||
.recalc = &followparent_recalc,
|
.recalc = &followparent_recalc,
|
||||||
.enable = &omap1_clk_enable_generic,
|
.enable = &omap1_clk_enable_generic,
|
||||||
.disable = &omap1_clk_disable_generic,
|
.disable = &omap1_clk_disable_generic,
|
||||||
|
@ -417,7 +421,7 @@ static struct clk dma_ck = {
|
||||||
.name = "dma_ck",
|
.name = "dma_ck",
|
||||||
.parent = &tc_ck.clk,
|
.parent = &tc_ck.clk,
|
||||||
.flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX |
|
.flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX |
|
||||||
ALWAYS_ENABLED,
|
CLOCK_IN_OMAP310 | ALWAYS_ENABLED,
|
||||||
.recalc = &followparent_recalc,
|
.recalc = &followparent_recalc,
|
||||||
.enable = &omap1_clk_enable_generic,
|
.enable = &omap1_clk_enable_generic,
|
||||||
.disable = &omap1_clk_disable_generic,
|
.disable = &omap1_clk_disable_generic,
|
||||||
|
@ -437,7 +441,7 @@ static struct arm_idlect1_clk api_ck = {
|
||||||
.name = "api_ck",
|
.name = "api_ck",
|
||||||
.parent = &tc_ck.clk,
|
.parent = &tc_ck.clk,
|
||||||
.flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX |
|
.flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX |
|
||||||
CLOCK_IDLE_CONTROL,
|
CLOCK_IN_OMAP310 | CLOCK_IDLE_CONTROL,
|
||||||
.enable_reg = (void __iomem *)ARM_IDLECT2,
|
.enable_reg = (void __iomem *)ARM_IDLECT2,
|
||||||
.enable_bit = EN_APICK,
|
.enable_bit = EN_APICK,
|
||||||
.recalc = &followparent_recalc,
|
.recalc = &followparent_recalc,
|
||||||
|
@ -451,7 +455,8 @@ static struct arm_idlect1_clk lb_ck = {
|
||||||
.clk = {
|
.clk = {
|
||||||
.name = "lb_ck",
|
.name = "lb_ck",
|
||||||
.parent = &tc_ck.clk,
|
.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_reg = (void __iomem *)ARM_IDLECT2,
|
||||||
.enable_bit = EN_LBCK,
|
.enable_bit = EN_LBCK,
|
||||||
.recalc = &followparent_recalc,
|
.recalc = &followparent_recalc,
|
||||||
|
@ -495,8 +500,8 @@ static struct arm_idlect1_clk lcd_ck_1510 = {
|
||||||
.clk = {
|
.clk = {
|
||||||
.name = "lcd_ck",
|
.name = "lcd_ck",
|
||||||
.parent = &ck_dpll1,
|
.parent = &ck_dpll1,
|
||||||
.flags = CLOCK_IN_OMAP1510 | RATE_CKCTL |
|
.flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP310 |
|
||||||
CLOCK_IDLE_CONTROL,
|
RATE_CKCTL | CLOCK_IDLE_CONTROL,
|
||||||
.enable_reg = (void __iomem *)ARM_IDLECT2,
|
.enable_reg = (void __iomem *)ARM_IDLECT2,
|
||||||
.enable_bit = EN_LCDCK,
|
.enable_bit = EN_LCDCK,
|
||||||
.rate_offset = CKCTL_LCDDIV_OFFSET,
|
.rate_offset = CKCTL_LCDDIV_OFFSET,
|
||||||
|
@ -512,8 +517,9 @@ static struct clk uart1_1510 = {
|
||||||
/* Direct from ULPD, no real parent */
|
/* Direct from ULPD, no real parent */
|
||||||
.parent = &armper_ck.clk,
|
.parent = &armper_ck.clk,
|
||||||
.rate = 12000000,
|
.rate = 12000000,
|
||||||
.flags = CLOCK_IN_OMAP1510 | ENABLE_REG_32BIT |
|
.flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP310 |
|
||||||
ALWAYS_ENABLED | CLOCK_NO_IDLE_PARENT,
|
ENABLE_REG_32BIT | ALWAYS_ENABLED |
|
||||||
|
CLOCK_NO_IDLE_PARENT,
|
||||||
.enable_reg = (void __iomem *)MOD_CONF_CTRL_0,
|
.enable_reg = (void __iomem *)MOD_CONF_CTRL_0,
|
||||||
.enable_bit = 29, /* Chooses between 12MHz and 48MHz */
|
.enable_bit = 29, /* Chooses between 12MHz and 48MHz */
|
||||||
.set_rate = &omap1_set_uart_rate,
|
.set_rate = &omap1_set_uart_rate,
|
||||||
|
@ -544,8 +550,8 @@ static struct clk uart2_ck = {
|
||||||
.parent = &armper_ck.clk,
|
.parent = &armper_ck.clk,
|
||||||
.rate = 12000000,
|
.rate = 12000000,
|
||||||
.flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX |
|
.flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX |
|
||||||
ENABLE_REG_32BIT | ALWAYS_ENABLED |
|
CLOCK_IN_OMAP310 | ENABLE_REG_32BIT |
|
||||||
CLOCK_NO_IDLE_PARENT,
|
ALWAYS_ENABLED | CLOCK_NO_IDLE_PARENT,
|
||||||
.enable_reg = (void __iomem *)MOD_CONF_CTRL_0,
|
.enable_reg = (void __iomem *)MOD_CONF_CTRL_0,
|
||||||
.enable_bit = 30, /* Chooses between 12MHz and 48MHz */
|
.enable_bit = 30, /* Chooses between 12MHz and 48MHz */
|
||||||
.set_rate = &omap1_set_uart_rate,
|
.set_rate = &omap1_set_uart_rate,
|
||||||
|
@ -559,8 +565,9 @@ static struct clk uart3_1510 = {
|
||||||
/* Direct from ULPD, no real parent */
|
/* Direct from ULPD, no real parent */
|
||||||
.parent = &armper_ck.clk,
|
.parent = &armper_ck.clk,
|
||||||
.rate = 12000000,
|
.rate = 12000000,
|
||||||
.flags = CLOCK_IN_OMAP1510 | ENABLE_REG_32BIT |
|
.flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP310 |
|
||||||
ALWAYS_ENABLED | CLOCK_NO_IDLE_PARENT,
|
ENABLE_REG_32BIT | ALWAYS_ENABLED |
|
||||||
|
CLOCK_NO_IDLE_PARENT,
|
||||||
.enable_reg = (void __iomem *)MOD_CONF_CTRL_0,
|
.enable_reg = (void __iomem *)MOD_CONF_CTRL_0,
|
||||||
.enable_bit = 31, /* Chooses between 12MHz and 48MHz */
|
.enable_bit = 31, /* Chooses between 12MHz and 48MHz */
|
||||||
.set_rate = &omap1_set_uart_rate,
|
.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 */
|
/* Direct from ULPD, no parent */
|
||||||
.rate = 6000000,
|
.rate = 6000000,
|
||||||
.flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX |
|
.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_reg = (void __iomem *)ULPD_CLOCK_CTRL,
|
||||||
.enable_bit = USB_MCLK_EN_BIT,
|
.enable_bit = USB_MCLK_EN_BIT,
|
||||||
.enable = &omap1_clk_enable_generic,
|
.enable = &omap1_clk_enable_generic,
|
||||||
|
@ -601,7 +608,7 @@ static struct clk usb_hhc_ck1510 = {
|
||||||
.name = "usb_hhc_ck",
|
.name = "usb_hhc_ck",
|
||||||
/* Direct from ULPD, no parent */
|
/* Direct from ULPD, no parent */
|
||||||
.rate = 48000000, /* Actually 2 clocks, 12MHz and 48MHz */
|
.rate = 48000000, /* Actually 2 clocks, 12MHz and 48MHz */
|
||||||
.flags = CLOCK_IN_OMAP1510 |
|
.flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP310 |
|
||||||
RATE_FIXED | ENABLE_REG_32BIT,
|
RATE_FIXED | ENABLE_REG_32BIT,
|
||||||
.enable_reg = (void __iomem *)MOD_CONF_CTRL_0,
|
.enable_reg = (void __iomem *)MOD_CONF_CTRL_0,
|
||||||
.enable_bit = USB_HOST_HHC_UHOST_EN,
|
.enable_bit = USB_HOST_HHC_UHOST_EN,
|
||||||
|
@ -637,7 +644,9 @@ static struct clk mclk_1510 = {
|
||||||
.name = "mclk",
|
.name = "mclk",
|
||||||
/* Direct from ULPD, no parent. May be enabled by ext hardware. */
|
/* Direct from ULPD, no parent. May be enabled by ext hardware. */
|
||||||
.rate = 12000000,
|
.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,
|
.enable = &omap1_clk_enable_generic,
|
||||||
.disable = &omap1_clk_disable_generic,
|
.disable = &omap1_clk_disable_generic,
|
||||||
};
|
};
|
||||||
|
@ -659,7 +668,7 @@ static struct clk bclk_1510 = {
|
||||||
.name = "bclk",
|
.name = "bclk",
|
||||||
/* Direct from ULPD, no parent. May be enabled by ext hardware. */
|
/* Direct from ULPD, no parent. May be enabled by ext hardware. */
|
||||||
.rate = 12000000,
|
.rate = 12000000,
|
||||||
.flags = CLOCK_IN_OMAP1510 | RATE_FIXED,
|
.flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP310 | RATE_FIXED,
|
||||||
.enable = &omap1_clk_enable_generic,
|
.enable = &omap1_clk_enable_generic,
|
||||||
.disable = &omap1_clk_disable_generic,
|
.disable = &omap1_clk_disable_generic,
|
||||||
};
|
};
|
||||||
|
@ -678,12 +687,14 @@ static struct clk bclk_16xx = {
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct clk mmc1_ck = {
|
static struct clk mmc1_ck = {
|
||||||
.name = "mmc1_ck",
|
.name = "mmc_ck",
|
||||||
|
.id = 1,
|
||||||
/* Functional clock is direct from ULPD, interface clock is ARMPER */
|
/* Functional clock is direct from ULPD, interface clock is ARMPER */
|
||||||
.parent = &armper_ck.clk,
|
.parent = &armper_ck.clk,
|
||||||
.rate = 48000000,
|
.rate = 48000000,
|
||||||
.flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX |
|
.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_reg = (void __iomem *)MOD_CONF_CTRL_0,
|
||||||
.enable_bit = 23,
|
.enable_bit = 23,
|
||||||
.enable = &omap1_clk_enable_generic,
|
.enable = &omap1_clk_enable_generic,
|
||||||
|
@ -691,7 +702,8 @@ static struct clk mmc1_ck = {
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct clk mmc2_ck = {
|
static struct clk mmc2_ck = {
|
||||||
.name = "mmc2_ck",
|
.name = "mmc_ck",
|
||||||
|
.id = 2,
|
||||||
/* Functional clock is direct from ULPD, interface clock is ARMPER */
|
/* Functional clock is direct from ULPD, interface clock is ARMPER */
|
||||||
.parent = &armper_ck.clk,
|
.parent = &armper_ck.clk,
|
||||||
.rate = 48000000,
|
.rate = 48000000,
|
||||||
|
@ -706,7 +718,7 @@ static struct clk mmc2_ck = {
|
||||||
static struct clk virtual_ck_mpu = {
|
static struct clk virtual_ck_mpu = {
|
||||||
.name = "mpu",
|
.name = "mpu",
|
||||||
.flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX |
|
.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 */
|
.parent = &arm_ck, /* Is smarter alias for */
|
||||||
.recalc = &followparent_recalc,
|
.recalc = &followparent_recalc,
|
||||||
.set_rate = &omap1_select_table_rate,
|
.set_rate = &omap1_select_table_rate,
|
||||||
|
@ -715,6 +727,20 @@ static struct clk virtual_ck_mpu = {
|
||||||
.disable = &omap1_clk_disable_generic,
|
.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[] = {
|
static struct clk * onchip_clks[] = {
|
||||||
/* non-ULPD clocks */
|
/* non-ULPD clocks */
|
||||||
&ck_ref,
|
&ck_ref,
|
||||||
|
@ -763,6 +789,7 @@ static struct clk * onchip_clks[] = {
|
||||||
&mmc2_ck,
|
&mmc2_ck,
|
||||||
/* Virtual clocks */
|
/* Virtual clocks */
|
||||||
&virtual_ck_mpu,
|
&virtual_ck_mpu,
|
||||||
|
&i2c_fck,
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -25,10 +25,6 @@
|
||||||
#include <asm/arch/mux.h>
|
#include <asm/arch/mux.h>
|
||||||
#include <asm/arch/gpio.h>
|
#include <asm/arch/gpio.h>
|
||||||
|
|
||||||
extern void omap_nop_release(struct device *dev);
|
|
||||||
|
|
||||||
/*-------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
#if defined(CONFIG_OMAP1610_IR) || defined(CONFIG_OMAP161O_IR_MODULE)
|
#if defined(CONFIG_OMAP1610_IR) || defined(CONFIG_OMAP161O_IR_MODULE)
|
||||||
|
|
||||||
static u64 irda_dmamask = 0xffffffff;
|
static u64 irda_dmamask = 0xffffffff;
|
||||||
|
@ -37,7 +33,6 @@ static struct platform_device omap1610ir_device = {
|
||||||
.name = "omap1610-ir",
|
.name = "omap1610-ir",
|
||||||
.id = -1,
|
.id = -1,
|
||||||
.dev = {
|
.dev = {
|
||||||
.release = omap_nop_release,
|
|
||||||
.dma_mask = &irda_dmamask,
|
.dma_mask = &irda_dmamask,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
@ -84,9 +79,6 @@ static struct resource rtc_resources[] = {
|
||||||
static struct platform_device omap_rtc_device = {
|
static struct platform_device omap_rtc_device = {
|
||||||
.name = "omap_rtc",
|
.name = "omap_rtc",
|
||||||
.id = -1,
|
.id = -1,
|
||||||
.dev = {
|
|
||||||
.release = omap_nop_release,
|
|
||||||
},
|
|
||||||
.num_resources = ARRAY_SIZE(rtc_resources),
|
.num_resources = ARRAY_SIZE(rtc_resources),
|
||||||
.resource = rtc_resources,
|
.resource = rtc_resources,
|
||||||
};
|
};
|
||||||
|
@ -99,6 +91,42 @@ static void omap_init_rtc(void)
|
||||||
static inline void omap_init_rtc(void) {}
|
static inline void omap_init_rtc(void) {}
|
||||||
#endif
|
#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_irda();
|
||||||
omap_init_rtc();
|
omap_init_rtc();
|
||||||
|
omap_init_sti();
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,6 +18,7 @@
|
||||||
#include <asm/io.h>
|
#include <asm/io.h>
|
||||||
#include <asm/arch/mux.h>
|
#include <asm/arch/mux.h>
|
||||||
#include <asm/arch/tc.h>
|
#include <asm/arch/tc.h>
|
||||||
|
#include <asm/arch/omapfb.h>
|
||||||
|
|
||||||
extern int omap1_clk_init(void);
|
extern int omap1_clk_init(void);
|
||||||
extern void omap_check_revision(void);
|
extern void omap_check_revision(void);
|
||||||
|
@ -110,7 +111,7 @@ void __init omap1_map_common_io(void)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#ifdef CONFIG_ARCH_OMAP15XX
|
#ifdef CONFIG_ARCH_OMAP15XX
|
||||||
if (cpu_is_omap1510()) {
|
if (cpu_is_omap15xx()) {
|
||||||
iotable_init(omap1510_io_desc, ARRAY_SIZE(omap1510_io_desc));
|
iotable_init(omap1510_io_desc, ARRAY_SIZE(omap1510_io_desc));
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -121,6 +122,7 @@ void __init omap1_map_common_io(void)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
omap_sram_init();
|
omap_sram_init();
|
||||||
|
omapfb_reserve_mem();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -60,7 +60,7 @@ struct omap_irq_bank {
|
||||||
unsigned long wake_enable;
|
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 struct omap_irq_bank *irq_banks;
|
||||||
|
|
||||||
static inline unsigned int irq_bank_readl(int bank, int offset)
|
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
|
#ifdef CONFIG_ARCH_OMAP730
|
||||||
static struct omap_irq_bank omap730_irq_banks[] = {
|
static struct omap_irq_bank omap730_irq_banks[] = {
|
||||||
{ .base_reg = OMAP_IH1_BASE, .trigger_map = 0xb3f8e22f },
|
{ .base_reg = OMAP_IH1_BASE, .trigger_map = 0xb3f8e22f },
|
||||||
{ .base_reg = OMAP_IH2_BASE, .trigger_map = 0xfdb9c1f2 },
|
{ .base_reg = OMAP_IH2_BASE, .trigger_map = 0xfdb9c1f2 },
|
||||||
{ .base_reg = OMAP_IH2_BASE + 0x100, .trigger_map = 0x800040f3 },
|
{ .base_reg = OMAP_IH2_BASE + 0x100, .trigger_map = 0x800040f3 },
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_ARCH_OMAP15XX
|
#ifdef CONFIG_ARCH_OMAP15XX
|
||||||
static struct omap_irq_bank omap1510_irq_banks[] = {
|
static struct omap_irq_bank omap1510_irq_banks[] = {
|
||||||
{ .base_reg = OMAP_IH1_BASE, .trigger_map = 0xb3febfff },
|
{ .base_reg = OMAP_IH1_BASE, .trigger_map = 0xb3febfff },
|
||||||
{ .base_reg = OMAP_IH2_BASE, .trigger_map = 0xffbfffed },
|
{ .base_reg = OMAP_IH2_BASE, .trigger_map = 0xffbfffed },
|
||||||
};
|
};
|
||||||
static struct omap_irq_bank omap310_irq_banks[] = {
|
static struct omap_irq_bank omap310_irq_banks[] = {
|
||||||
{ .base_reg = OMAP_IH1_BASE, .trigger_map = 0xb3faefc3 },
|
{ .base_reg = OMAP_IH1_BASE, .trigger_map = 0xb3faefc3 },
|
||||||
{ .base_reg = OMAP_IH2_BASE, .trigger_map = 0x65b3c061 },
|
{ .base_reg = OMAP_IH2_BASE, .trigger_map = 0x65b3c061 },
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(CONFIG_ARCH_OMAP16XX)
|
#if defined(CONFIG_ARCH_OMAP16XX)
|
||||||
|
|
||||||
static struct omap_irq_bank omap1610_irq_banks[] = {
|
static struct omap_irq_bank omap1610_irq_banks[] = {
|
||||||
{ .base_reg = OMAP_IH1_BASE, .trigger_map = 0xb3fefe8f },
|
{ .base_reg = OMAP_IH1_BASE, .trigger_map = 0xb3fefe8f },
|
||||||
{ .base_reg = OMAP_IH2_BASE, .trigger_map = 0xfdb7c1fd },
|
{ .base_reg = OMAP_IH2_BASE, .trigger_map = 0xfdb7c1fd },
|
||||||
{ .base_reg = OMAP_IH2_BASE + 0x100, .trigger_map = 0xffffb7ff },
|
{ .base_reg = OMAP_IH2_BASE + 0x100, .trigger_map = 0xffffb7ff },
|
||||||
{ .base_reg = OMAP_IH2_BASE + 0x200, .trigger_map = 0xffffffff },
|
{ .base_reg = OMAP_IH2_BASE + 0x200, .trigger_map = 0xffffffff },
|
||||||
};
|
};
|
||||||
|
|
|
@ -35,16 +35,20 @@
|
||||||
|
|
||||||
#ifdef CONFIG_ARCH_OMAP730
|
#ifdef CONFIG_ARCH_OMAP730
|
||||||
struct pin_config __initdata_or_module omap730_pins[] = {
|
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("E2_730_KBR0", 12, 21, 0, 20, 1, 0)
|
||||||
MUX_CFG_730("J7_730_KBR1", 12, 25, 0, 0, 24, 1, NA, 0, 0)
|
MUX_CFG_730("J7_730_KBR1", 12, 25, 0, 24, 1, 0)
|
||||||
MUX_CFG_730("E1_730_KBR2", 12, 29, 0, 0, 28, 1, NA, 0, 0)
|
MUX_CFG_730("E1_730_KBR2", 12, 29, 0, 28, 1, 0)
|
||||||
MUX_CFG_730("F3_730_KBR3", 13, 1, 0, 0, 0, 1, NA, 0, 0)
|
MUX_CFG_730("F3_730_KBR3", 13, 1, 0, 0, 1, 0)
|
||||||
MUX_CFG_730("D2_730_KBR4", 13, 5, 0, 0, 4, 1, NA, 0, 0)
|
MUX_CFG_730("D2_730_KBR4", 13, 5, 0, 4, 1, 0)
|
||||||
MUX_CFG_730("C2_730_KBC0", 13, 9, 0, 0, 8, 1, NA, 0, 0)
|
MUX_CFG_730("C2_730_KBC0", 13, 9, 0, 8, 1, 0)
|
||||||
MUX_CFG_730("D3_730_KBC1", 13, 13, 0, 0, 12, 1, NA, 0, 0)
|
MUX_CFG_730("D3_730_KBC1", 13, 13, 0, 12, 1, 0)
|
||||||
MUX_CFG_730("E4_730_KBC2", 13, 17, 0, 0, 16, 1, NA, 0, 0)
|
MUX_CFG_730("E4_730_KBC2", 13, 17, 0, 16, 1, 0)
|
||||||
MUX_CFG_730("F4_730_KBC3", 13, 21, 0, 0, 20, 1, NA, 0, 0)
|
MUX_CFG_730("F4_730_KBC3", 13, 21, 0, 20, 1, 0)
|
||||||
MUX_CFG_730("E3_730_KBC4", 13, 25, 0, 0, 24, 1, NA, 0, 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
|
#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)
|
MUX_CFG("Y15_1610_UART3_RTS", A, 0, 1, 2, 6, 0, NA, 0, 0)
|
||||||
|
|
||||||
/* PWT & PWL, conflicts with UART3 */
|
/* PWT & PWL, conflicts with UART3 */
|
||||||
MUX_CFG("PWT", 6, 0, 2, 0, 30, 0, 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)
|
MUX_CFG("PWL", 6, 3, 1, 0, 31, 1, NA, 0, 0)
|
||||||
|
|
||||||
/* USB internal master generic */
|
/* USB internal master generic */
|
||||||
MUX_CFG("R18_USB_VBUS", 7, 9, 2, 1, 11, 0, NA, 0, 1)
|
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 */
|
/* Misc ballouts */
|
||||||
MUX_CFG("BALLOUT_V8_ARMIO3", B, 18, 0, 2, 25, 1, NA, 0, 1)
|
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 */
|
/* OMAP-1610 MMC2 */
|
||||||
MUX_CFG("W8_1610_MMC2_DAT0", B, 21, 6, 2, 23, 1, 2, 1, 1)
|
MUX_CFG("W8_1610_MMC2_DAT0", B, 21, 6, 2, 23, 1, 2, 1, 1)
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue