Merge commit 'v2.6.30-rc1' into perfcounters/core
Conflicts:
arch/powerpc/include/asm/systbl.h
arch/powerpc/include/asm/unistd.h
include/linux/init_task.h
Merge reason: the conflicts are non-trivial: PowerPC placement
of sys_perf_counter_open has to be mixed with the
new preadv/pwrite syscalls.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
@@ -136,7 +136,7 @@ exactly why.
|
|||||||
The standard 32-bit addressing PCI device would do something like
|
The standard 32-bit addressing PCI device would do something like
|
||||||
this:
|
this:
|
||||||
|
|
||||||
if (pci_set_dma_mask(pdev, DMA_32BIT_MASK)) {
|
if (pci_set_dma_mask(pdev, DMA_BIT_MASK(32))) {
|
||||||
printk(KERN_WARNING
|
printk(KERN_WARNING
|
||||||
"mydev: No suitable DMA available.\n");
|
"mydev: No suitable DMA available.\n");
|
||||||
goto ignore_this_device;
|
goto ignore_this_device;
|
||||||
@@ -155,9 +155,9 @@ all 64-bits when accessing streaming DMA:
|
|||||||
|
|
||||||
int using_dac;
|
int using_dac;
|
||||||
|
|
||||||
if (!pci_set_dma_mask(pdev, DMA_64BIT_MASK)) {
|
if (!pci_set_dma_mask(pdev, DMA_BIT_MASK(64))) {
|
||||||
using_dac = 1;
|
using_dac = 1;
|
||||||
} else if (!pci_set_dma_mask(pdev, DMA_32BIT_MASK)) {
|
} else if (!pci_set_dma_mask(pdev, DMA_BIT_MASK(32))) {
|
||||||
using_dac = 0;
|
using_dac = 0;
|
||||||
} else {
|
} else {
|
||||||
printk(KERN_WARNING
|
printk(KERN_WARNING
|
||||||
@@ -170,14 +170,14 @@ the case would look like this:
|
|||||||
|
|
||||||
int using_dac, consistent_using_dac;
|
int using_dac, consistent_using_dac;
|
||||||
|
|
||||||
if (!pci_set_dma_mask(pdev, DMA_64BIT_MASK)) {
|
if (!pci_set_dma_mask(pdev, DMA_BIT_MASK(64))) {
|
||||||
using_dac = 1;
|
using_dac = 1;
|
||||||
consistent_using_dac = 1;
|
consistent_using_dac = 1;
|
||||||
pci_set_consistent_dma_mask(pdev, DMA_64BIT_MASK);
|
pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64));
|
||||||
} else if (!pci_set_dma_mask(pdev, DMA_32BIT_MASK)) {
|
} else if (!pci_set_dma_mask(pdev, DMA_BIT_MASK(32))) {
|
||||||
using_dac = 0;
|
using_dac = 0;
|
||||||
consistent_using_dac = 0;
|
consistent_using_dac = 0;
|
||||||
pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK);
|
pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32));
|
||||||
} else {
|
} else {
|
||||||
printk(KERN_WARNING
|
printk(KERN_WARNING
|
||||||
"mydev: No suitable DMA available.\n");
|
"mydev: No suitable DMA available.\n");
|
||||||
@@ -192,7 +192,7 @@ check the return value from pci_set_consistent_dma_mask().
|
|||||||
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, DMA_24BIT_MASK)) {
|
if (pci_set_dma_mask(pdev, DMA_BIT_MASK(24))) {
|
||||||
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;
|
||||||
@@ -213,7 +213,7 @@ most specific mask.
|
|||||||
|
|
||||||
Here is pseudo-code showing how this might be done:
|
Here is pseudo-code showing how this might be done:
|
||||||
|
|
||||||
#define PLAYBACK_ADDRESS_BITS DMA_32BIT_MASK
|
#define PLAYBACK_ADDRESS_BITS DMA_BIT_MASK(32)
|
||||||
#define RECORD_ADDRESS_BITS 0x00ffffff
|
#define RECORD_ADDRESS_BITS 0x00ffffff
|
||||||
|
|
||||||
struct my_sound_card *card;
|
struct my_sound_card *card;
|
||||||
|
|||||||
@@ -1137,8 +1137,8 @@
|
|||||||
if (err < 0)
|
if (err < 0)
|
||||||
return err;
|
return err;
|
||||||
/* check PCI availability (28bit DMA) */
|
/* check PCI availability (28bit DMA) */
|
||||||
if (pci_set_dma_mask(pci, DMA_28BIT_MASK) < 0 ||
|
if (pci_set_dma_mask(pci, DMA_BIT_MASK(28)) < 0 ||
|
||||||
pci_set_consistent_dma_mask(pci, DMA_28BIT_MASK) < 0) {
|
pci_set_consistent_dma_mask(pci, DMA_BIT_MASK(28)) < 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;
|
||||||
@@ -1252,8 +1252,8 @@
|
|||||||
err = pci_enable_device(pci);
|
err = pci_enable_device(pci);
|
||||||
if (err < 0)
|
if (err < 0)
|
||||||
return err;
|
return err;
|
||||||
if (pci_set_dma_mask(pci, DMA_28BIT_MASK) < 0 ||
|
if (pci_set_dma_mask(pci, DMA_BIT_MASK(28)) < 0 ||
|
||||||
pci_set_consistent_dma_mask(pci, DMA_28BIT_MASK) < 0) {
|
pci_set_consistent_dma_mask(pci, DMA_BIT_MASK(28)) < 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;
|
||||||
|
|||||||
@@ -8,6 +8,8 @@ cpqarray.txt
|
|||||||
- info on using Compaq's SMART2 Intelligent Disk Array Controllers.
|
- info on using Compaq's SMART2 Intelligent Disk Array Controllers.
|
||||||
floppy.txt
|
floppy.txt
|
||||||
- notes and driver options for the floppy disk driver.
|
- notes and driver options for the floppy disk driver.
|
||||||
|
mflash.txt
|
||||||
|
- info on mGine m(g)flash driver for linux.
|
||||||
nbd.txt
|
nbd.txt
|
||||||
- info on a TCP implementation of a network block device.
|
- info on a TCP implementation of a network block device.
|
||||||
paride.txt
|
paride.txt
|
||||||
|
|||||||
84
Documentation/blockdev/mflash.txt
Normal file
84
Documentation/blockdev/mflash.txt
Normal file
@@ -0,0 +1,84 @@
|
|||||||
|
This document describes m[g]flash support in linux.
|
||||||
|
|
||||||
|
Contents
|
||||||
|
1. Overview
|
||||||
|
2. Reserved area configuration
|
||||||
|
3. Example of mflash platform driver registration
|
||||||
|
|
||||||
|
1. Overview
|
||||||
|
|
||||||
|
Mflash and gflash are embedded flash drive. The only difference is mflash is
|
||||||
|
MCP(Multi Chip Package) device. These two device operate exactly same way.
|
||||||
|
So the rest mflash repersents mflash and gflash altogether.
|
||||||
|
|
||||||
|
Internally, mflash has nand flash and other hardware logics and supports
|
||||||
|
2 different operation (ATA, IO) modes. ATA mode doesn't need any new
|
||||||
|
driver and currently works well under standard IDE subsystem. Actually it's
|
||||||
|
one chip SSD. IO mode is ATA-like custom mode for the host that doesn't have
|
||||||
|
IDE interface.
|
||||||
|
|
||||||
|
Followings are brief descriptions about IO mode.
|
||||||
|
A. IO mode based on ATA protocol and uses some custom command. (read confirm,
|
||||||
|
write confirm)
|
||||||
|
B. IO mode uses SRAM bus interface.
|
||||||
|
C. IO mode supports 4kB boot area, so host can boot from mflash.
|
||||||
|
|
||||||
|
2. Reserved area configuration
|
||||||
|
If host boot from mflash, usually needs raw area for boot loader image. All of
|
||||||
|
the mflash's block device operation will be taken this value as start offset.
|
||||||
|
Note that boot loader's size of reserved area and kernel configuration value
|
||||||
|
must be same.
|
||||||
|
|
||||||
|
3. Example of mflash platform driver registration
|
||||||
|
Working mflash is very straight forward. Adding platform device stuff to board
|
||||||
|
configuration file is all. Here is some pseudo example.
|
||||||
|
|
||||||
|
static struct mg_drv_data mflash_drv_data = {
|
||||||
|
/* If you want to polling driver set to 1 */
|
||||||
|
.use_polling = 0,
|
||||||
|
/* device attribution */
|
||||||
|
.dev_attr = MG_BOOT_DEV
|
||||||
|
};
|
||||||
|
|
||||||
|
static struct resource mg_mflash_rsc[] = {
|
||||||
|
/* Base address of mflash */
|
||||||
|
[0] = {
|
||||||
|
.start = 0x08000000,
|
||||||
|
.end = 0x08000000 + SZ_64K - 1,
|
||||||
|
.flags = IORESOURCE_MEM
|
||||||
|
},
|
||||||
|
/* mflash interrupt pin */
|
||||||
|
[1] = {
|
||||||
|
.start = IRQ_GPIO(84),
|
||||||
|
.end = IRQ_GPIO(84),
|
||||||
|
.flags = IORESOURCE_IRQ
|
||||||
|
},
|
||||||
|
/* mflash reset pin */
|
||||||
|
[2] = {
|
||||||
|
.start = 43,
|
||||||
|
.end = 43,
|
||||||
|
.name = MG_RST_PIN,
|
||||||
|
.flags = IORESOURCE_IO
|
||||||
|
},
|
||||||
|
/* mflash reset-out pin
|
||||||
|
* If you use mflash as storage device (i.e. other than MG_BOOT_DEV),
|
||||||
|
* should assign this */
|
||||||
|
[3] = {
|
||||||
|
.start = 51,
|
||||||
|
.end = 51,
|
||||||
|
.name = MG_RSTOUT_PIN,
|
||||||
|
.flags = IORESOURCE_IO
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
static struct platform_device mflash_dev = {
|
||||||
|
.name = MG_DEV_NAME,
|
||||||
|
.id = -1,
|
||||||
|
.dev = {
|
||||||
|
.platform_data = &mflash_drv_data,
|
||||||
|
},
|
||||||
|
.num_resources = ARRAY_SIZE(mg_mflash_rsc),
|
||||||
|
.resource = mg_mflash_rsc
|
||||||
|
};
|
||||||
|
|
||||||
|
platform_device_register(&mflash_dev);
|
||||||
@@ -2797,6 +2797,10 @@ Your cooperation is appreciated.
|
|||||||
206 = /dev/ttySC1 SC26xx serial port 1
|
206 = /dev/ttySC1 SC26xx serial port 1
|
||||||
207 = /dev/ttySC2 SC26xx serial port 2
|
207 = /dev/ttySC2 SC26xx serial port 2
|
||||||
208 = /dev/ttySC3 SC26xx serial port 3
|
208 = /dev/ttySC3 SC26xx serial port 3
|
||||||
|
209 = /dev/ttyMAX0 MAX3100 serial port 0
|
||||||
|
210 = /dev/ttyMAX1 MAX3100 serial port 1
|
||||||
|
211 = /dev/ttyMAX2 MAX3100 serial port 2
|
||||||
|
212 = /dev/ttyMAX3 MAX3100 serial port 3
|
||||||
|
|
||||||
205 char Low-density serial ports (alternate device)
|
205 char Low-density serial ports (alternate device)
|
||||||
0 = /dev/culu0 Callout device for ttyLU0
|
0 = /dev/culu0 Callout device for ttyLU0
|
||||||
|
|||||||
@@ -59,7 +59,8 @@ Accepted options:
|
|||||||
ypan Enable display panning using the VESA protected mode
|
ypan Enable display panning using the VESA protected mode
|
||||||
interface. The visible screen is just a window of the
|
interface. The visible screen is just a window of the
|
||||||
video memory, console scrolling is done by changing the
|
video memory, console scrolling is done by changing the
|
||||||
start of the window. Available on x86 only.
|
start of the window. This option is available on x86
|
||||||
|
only and is the default option on that architecture.
|
||||||
|
|
||||||
ywrap Same as ypan, but assumes your gfx board can wrap-around
|
ywrap Same as ypan, but assumes your gfx board can wrap-around
|
||||||
the video memory (i.e. starts reading from top if it
|
the video memory (i.e. starts reading from top if it
|
||||||
@@ -67,7 +68,7 @@ ywrap Same as ypan, but assumes your gfx board can wrap-around
|
|||||||
Available on x86 only.
|
Available on x86 only.
|
||||||
|
|
||||||
redraw Scroll by redrawing the affected part of the screen, this
|
redraw Scroll by redrawing the affected part of the screen, this
|
||||||
is the safe (and slow) default.
|
is the default on non-x86.
|
||||||
|
|
||||||
(If you're using uvesafb as a module, the above three options are
|
(If you're using uvesafb as a module, the above three options are
|
||||||
used a parameter of the scroll option, e.g. scroll=ypan.)
|
used a parameter of the scroll option, e.g. scroll=ypan.)
|
||||||
@@ -182,7 +183,7 @@ from the Video BIOS if you set pixclock to 0 in fb_var_screeninfo.
|
|||||||
|
|
||||||
--
|
--
|
||||||
Michal Januszewski <spock@gentoo.org>
|
Michal Januszewski <spock@gentoo.org>
|
||||||
Last updated: 2007-06-16
|
Last updated: 2009-03-30
|
||||||
|
|
||||||
Documentation of the uvesafb options is loosely based on vesafb.txt.
|
Documentation of the uvesafb options is loosely based on vesafb.txt.
|
||||||
|
|
||||||
|
|||||||
@@ -68,6 +68,8 @@ ncpfs.txt
|
|||||||
- info on Novell Netware(tm) filesystem using NCP protocol.
|
- info on Novell Netware(tm) filesystem using NCP protocol.
|
||||||
nfsroot.txt
|
nfsroot.txt
|
||||||
- short guide on setting up a diskless box with NFS root filesystem.
|
- short guide on setting up a diskless box with NFS root filesystem.
|
||||||
|
nilfs2.txt
|
||||||
|
- info and mount options for the NILFS2 filesystem.
|
||||||
ntfs.txt
|
ntfs.txt
|
||||||
- info and mount options for the NTFS filesystem (Windows NT).
|
- info and mount options for the NTFS filesystem (Windows NT).
|
||||||
ocfs2.txt
|
ocfs2.txt
|
||||||
|
|||||||
200
Documentation/filesystems/nilfs2.txt
Normal file
200
Documentation/filesystems/nilfs2.txt
Normal file
@@ -0,0 +1,200 @@
|
|||||||
|
NILFS2
|
||||||
|
------
|
||||||
|
|
||||||
|
NILFS2 is a log-structured file system (LFS) supporting continuous
|
||||||
|
snapshotting. In addition to versioning capability of the entire file
|
||||||
|
system, users can even restore files mistakenly overwritten or
|
||||||
|
destroyed just a few seconds ago. Since NILFS2 can keep consistency
|
||||||
|
like conventional LFS, it achieves quick recovery after system
|
||||||
|
crashes.
|
||||||
|
|
||||||
|
NILFS2 creates a number of checkpoints every few seconds or per
|
||||||
|
synchronous write basis (unless there is no change). Users can select
|
||||||
|
significant versions among continuously created checkpoints, and can
|
||||||
|
change them into snapshots which will be preserved until they are
|
||||||
|
changed back to checkpoints.
|
||||||
|
|
||||||
|
There is no limit on the number of snapshots until the volume gets
|
||||||
|
full. Each snapshot is mountable as a read-only file system
|
||||||
|
concurrently with its writable mount, and this feature is convenient
|
||||||
|
for online backup.
|
||||||
|
|
||||||
|
The userland tools are included in nilfs-utils package, which is
|
||||||
|
available from the following download page. At least "mkfs.nilfs2",
|
||||||
|
"mount.nilfs2", "umount.nilfs2", and "nilfs_cleanerd" (so called
|
||||||
|
cleaner or garbage collector) are required. Details on the tools are
|
||||||
|
described in the man pages included in the package.
|
||||||
|
|
||||||
|
Project web page: http://www.nilfs.org/en/
|
||||||
|
Download page: http://www.nilfs.org/en/download.html
|
||||||
|
Git tree web page: http://www.nilfs.org/git/
|
||||||
|
NILFS mailing lists: http://www.nilfs.org/mailman/listinfo/users
|
||||||
|
|
||||||
|
Caveats
|
||||||
|
=======
|
||||||
|
|
||||||
|
Features which NILFS2 does not support yet:
|
||||||
|
|
||||||
|
- atime
|
||||||
|
- extended attributes
|
||||||
|
- POSIX ACLs
|
||||||
|
- quotas
|
||||||
|
- writable snapshots
|
||||||
|
- remote backup (CDP)
|
||||||
|
- data integrity
|
||||||
|
- defragmentation
|
||||||
|
|
||||||
|
Mount options
|
||||||
|
=============
|
||||||
|
|
||||||
|
NILFS2 supports the following mount options:
|
||||||
|
(*) == default
|
||||||
|
|
||||||
|
barrier=on(*) This enables/disables barriers. barrier=off disables
|
||||||
|
it, barrier=on enables it.
|
||||||
|
errors=continue(*) Keep going on a filesystem error.
|
||||||
|
errors=remount-ro Remount the filesystem read-only on an error.
|
||||||
|
errors=panic Panic and halt the machine if an error occurs.
|
||||||
|
cp=n Specify the checkpoint-number of the snapshot to be
|
||||||
|
mounted. Checkpoints and snapshots are listed by lscp
|
||||||
|
user command. Only the checkpoints marked as snapshot
|
||||||
|
are mountable with this option. Snapshot is read-only,
|
||||||
|
so a read-only mount option must be specified together.
|
||||||
|
order=relaxed(*) Apply relaxed order semantics that allows modified data
|
||||||
|
blocks to be written to disk without making a
|
||||||
|
checkpoint if no metadata update is going. This mode
|
||||||
|
is equivalent to the ordered data mode of the ext3
|
||||||
|
filesystem except for the updates on data blocks still
|
||||||
|
conserve atomicity. This will improve synchronous
|
||||||
|
write performance for overwriting.
|
||||||
|
order=strict Apply strict in-order semantics that preserves sequence
|
||||||
|
of all file operations including overwriting of data
|
||||||
|
blocks. That means, it is guaranteed that no
|
||||||
|
overtaking of events occurs in the recovered file
|
||||||
|
system after a crash.
|
||||||
|
|
||||||
|
NILFS2 usage
|
||||||
|
============
|
||||||
|
|
||||||
|
To use nilfs2 as a local file system, simply:
|
||||||
|
|
||||||
|
# mkfs -t nilfs2 /dev/block_device
|
||||||
|
# mount -t nilfs2 /dev/block_device /dir
|
||||||
|
|
||||||
|
This will also invoke the cleaner through the mount helper program
|
||||||
|
(mount.nilfs2).
|
||||||
|
|
||||||
|
Checkpoints and snapshots are managed by the following commands.
|
||||||
|
Their manpages are included in the nilfs-utils package above.
|
||||||
|
|
||||||
|
lscp list checkpoints or snapshots.
|
||||||
|
mkcp make a checkpoint or a snapshot.
|
||||||
|
chcp change an existing checkpoint to a snapshot or vice versa.
|
||||||
|
rmcp invalidate specified checkpoint(s).
|
||||||
|
|
||||||
|
To mount a snapshot,
|
||||||
|
|
||||||
|
# mount -t nilfs2 -r -o cp=<cno> /dev/block_device /snap_dir
|
||||||
|
|
||||||
|
where <cno> is the checkpoint number of the snapshot.
|
||||||
|
|
||||||
|
To unmount the NILFS2 mount point or snapshot, simply:
|
||||||
|
|
||||||
|
# umount /dir
|
||||||
|
|
||||||
|
Then, the cleaner daemon is automatically shut down by the umount
|
||||||
|
helper program (umount.nilfs2).
|
||||||
|
|
||||||
|
Disk format
|
||||||
|
===========
|
||||||
|
|
||||||
|
A nilfs2 volume is equally divided into a number of segments except
|
||||||
|
for the super block (SB) and segment #0. A segment is the container
|
||||||
|
of logs. Each log is composed of summary information blocks, payload
|
||||||
|
blocks, and an optional super root block (SR):
|
||||||
|
|
||||||
|
______________________________________________________
|
||||||
|
| |SB| | Segment | Segment | Segment | ... | Segment | |
|
||||||
|
|_|__|_|____0____|____1____|____2____|_____|____N____|_|
|
||||||
|
0 +1K +4K +8M +16M +24M +(8MB x N)
|
||||||
|
. . (Typical offsets for 4KB-block)
|
||||||
|
. .
|
||||||
|
.______________________.
|
||||||
|
| log | log |... | log |
|
||||||
|
|__1__|__2__|____|__m__|
|
||||||
|
. .
|
||||||
|
. .
|
||||||
|
. .
|
||||||
|
.______________________________.
|
||||||
|
| Summary | Payload blocks |SR|
|
||||||
|
|_blocks__|_________________|__|
|
||||||
|
|
||||||
|
The payload blocks are organized per file, and each file consists of
|
||||||
|
data blocks and B-tree node blocks:
|
||||||
|
|
||||||
|
|<--- File-A --->|<--- File-B --->|
|
||||||
|
_______________________________________________________________
|
||||||
|
| Data blocks | B-tree blocks | Data blocks | B-tree blocks | ...
|
||||||
|
_|_____________|_______________|_____________|_______________|_
|
||||||
|
|
||||||
|
|
||||||
|
Since only the modified blocks are written in the log, it may have
|
||||||
|
files without data blocks or B-tree node blocks.
|
||||||
|
|
||||||
|
The organization of the blocks is recorded in the summary information
|
||||||
|
blocks, which contains a header structure (nilfs_segment_summary), per
|
||||||
|
file structures (nilfs_finfo), and per block structures (nilfs_binfo):
|
||||||
|
|
||||||
|
_________________________________________________________________________
|
||||||
|
| Summary | finfo | binfo | ... | binfo | finfo | binfo | ... | binfo |...
|
||||||
|
|_blocks__|___A___|_(A,1)_|_____|(A,Na)_|___B___|_(B,1)_|_____|(B,Nb)_|___
|
||||||
|
|
||||||
|
|
||||||
|
The logs include regular files, directory files, symbolic link files
|
||||||
|
and several meta data files. The mata data files are the files used
|
||||||
|
to maintain file system meta data. The current version of NILFS2 uses
|
||||||
|
the following meta data files:
|
||||||
|
|
||||||
|
1) Inode file (ifile) -- Stores on-disk inodes
|
||||||
|
2) Checkpoint file (cpfile) -- Stores checkpoints
|
||||||
|
3) Segment usage file (sufile) -- Stores allocation state of segments
|
||||||
|
4) Data address translation file -- Maps virtual block numbers to usual
|
||||||
|
(DAT) block numbers. This file serves to
|
||||||
|
make on-disk blocks relocatable.
|
||||||
|
|
||||||
|
The following figure shows a typical organization of the logs:
|
||||||
|
|
||||||
|
_________________________________________________________________________
|
||||||
|
| Summary | regular file | file | ... | ifile | cpfile | sufile | DAT |SR|
|
||||||
|
|_blocks__|_or_directory_|_______|_____|_______|________|________|_____|__|
|
||||||
|
|
||||||
|
|
||||||
|
To stride over segment boundaries, this sequence of files may be split
|
||||||
|
into multiple logs. The sequence of logs that should be treated as
|
||||||
|
logically one log, is delimited with flags marked in the segment
|
||||||
|
summary. The recovery code of nilfs2 looks this boundary information
|
||||||
|
to ensure atomicity of updates.
|
||||||
|
|
||||||
|
The super root block is inserted for every checkpoints. It includes
|
||||||
|
three special inodes, inodes for the DAT, cpfile, and sufile. Inodes
|
||||||
|
of regular files, directories, symlinks and other special files, are
|
||||||
|
included in the ifile. The inode of ifile itself is included in the
|
||||||
|
corresponding checkpoint entry in the cpfile. Thus, the hierarchy
|
||||||
|
among NILFS2 files can be depicted as follows:
|
||||||
|
|
||||||
|
Super block (SB)
|
||||||
|
|
|
||||||
|
v
|
||||||
|
Super root block (the latest cno=xx)
|
||||||
|
|-- DAT
|
||||||
|
|-- sufile
|
||||||
|
`-- cpfile
|
||||||
|
|-- ifile (cno=c1)
|
||||||
|
|-- ifile (cno=c2) ---- file (ino=i1)
|
||||||
|
: : |-- file (ino=i2)
|
||||||
|
`-- ifile (cno=xx) |-- file (ino=i3)
|
||||||
|
: :
|
||||||
|
`-- file (ino=yy)
|
||||||
|
( regular file, directory, or symlink )
|
||||||
|
|
||||||
|
For detail on the format of each file, please see include/linux/nilfs2_fs.h.
|
||||||
36
Documentation/hwmon/g760a
Normal file
36
Documentation/hwmon/g760a
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
Kernel driver g760a
|
||||||
|
===================
|
||||||
|
|
||||||
|
Supported chips:
|
||||||
|
* Global Mixed-mode Technology Inc. G760A
|
||||||
|
Prefix: 'g760a'
|
||||||
|
Datasheet: Publicly available at the GMT website
|
||||||
|
http://www.gmt.com.tw/datasheet/g760a.pdf
|
||||||
|
|
||||||
|
Author: Herbert Valerio Riedel <hvr@gnu.org>
|
||||||
|
|
||||||
|
Description
|
||||||
|
-----------
|
||||||
|
|
||||||
|
The GMT G760A Fan Speed PWM Controller is connected directly to a fan
|
||||||
|
and performs closed-loop control of the fan speed.
|
||||||
|
|
||||||
|
The fan speed is programmed by setting the period via 'pwm1' of two
|
||||||
|
consecutive speed pulses. The period is defined in terms of clock
|
||||||
|
cycle counts of an assumed 32kHz clock source.
|
||||||
|
|
||||||
|
Setting a period of 0 stops the fan; setting the period to 255 sets
|
||||||
|
fan to maximum speed.
|
||||||
|
|
||||||
|
The measured fan rotation speed returned via 'fan1_input' is derived
|
||||||
|
from the measured speed pulse period by assuming again a 32kHz clock
|
||||||
|
source and a 2 pulse-per-revolution fan.
|
||||||
|
|
||||||
|
The 'alarms' file provides access to the two alarm bits provided by
|
||||||
|
the G760A chip's status register: Bit 0 is set when the actual fan
|
||||||
|
speed differs more than 20% with respect to the programmed fan speed;
|
||||||
|
bit 1 is set when fan speed is below 1920 RPM.
|
||||||
|
|
||||||
|
The g760a driver will not update its values more frequently than every
|
||||||
|
other second; reading them more often will do no harm, but will return
|
||||||
|
'old' values.
|
||||||
@@ -61,24 +61,28 @@ GigaSet 307x Device Driver
|
|||||||
---------------------
|
---------------------
|
||||||
2.1. Modules
|
2.1. Modules
|
||||||
-------
|
-------
|
||||||
To get the device working, you have to load the proper kernel module. You
|
For the devices to work, the proper kernel modules have to be loaded.
|
||||||
can do this using
|
This normally happens automatically when the system detects the USB
|
||||||
modprobe modulename
|
device (base, M105) or when the line discipline is attached (M101). It
|
||||||
where modulename is ser_gigaset (M101), usb_gigaset (M105), or
|
can also be triggered manually using the modprobe(8) command, for example
|
||||||
bas_gigaset (direct USB connection to the base).
|
for troubleshooting or to pass module parameters.
|
||||||
|
|
||||||
The module ser_gigaset provides a serial line discipline N_GIGASET_M101
|
The module ser_gigaset provides a serial line discipline N_GIGASET_M101
|
||||||
which drives the device through the regular serial line driver. To use it,
|
which drives the device through the regular serial line driver. It must
|
||||||
run the Gigaset M101 daemon "gigasetm101d" (also available from
|
be attached to the serial line to which the M101 is connected with the
|
||||||
http://sourceforge.net/projects/gigaset307x/) with the device file of the
|
ldattach(8) command (requires util-linux-ng release 2.14 or later), for
|
||||||
RS232 port to the M101 as an argument, for example:
|
example:
|
||||||
gigasetm101d /dev/ttyS1
|
ldattach GIGASET_M101 /dev/ttyS1
|
||||||
This will open the device file, set its line discipline to N_GIGASET_M101,
|
This will open the device file, attach the line discipline to it, and
|
||||||
and then sleep in the background, keeping the device open so that the
|
then sleep in the background, keeping the device open so that the line
|
||||||
line discipline remains active. To deactivate it, kill the daemon, for
|
discipline remains active. To deactivate it, kill the daemon, for example
|
||||||
example with
|
with
|
||||||
killall gigasetm101d
|
killall ldattach
|
||||||
before disconnecting the device.
|
before disconnecting the device. To have this happen automatically at
|
||||||
|
system startup/shutdown on an LSB compatible system, create and activate
|
||||||
|
an appropriate LSB startup script /etc/init.d/gigaset. (The init name
|
||||||
|
'gigaset' is officially assigned to this project by LANANA.)
|
||||||
|
Alternatively, just add the 'ldattach' command line to /etc/rc.local.
|
||||||
|
|
||||||
2.2. Device nodes for user space programs
|
2.2. Device nodes for user space programs
|
||||||
------------------------------------
|
------------------------------------
|
||||||
@@ -194,10 +198,11 @@ GigaSet 307x Device Driver
|
|||||||
operation (for wireless access to the base), but are needed for access
|
operation (for wireless access to the base), but are needed for access
|
||||||
to the M105's own configuration mode (registration to the base, baudrate
|
to the M105's own configuration mode (registration to the base, baudrate
|
||||||
and line format settings, device status queries) via the gigacontr
|
and line format settings, device status queries) via the gigacontr
|
||||||
utility. Their use is disabled in the driver by default for safety
|
utility. Their use is controlled by the kernel configuration option
|
||||||
reasons but can be enabled by setting the kernel configuration option
|
"Support for undocumented USB requests" (CONFIG_GIGASET_UNDOCREQ). If you
|
||||||
"Support for undocumented USB requests" (GIGASET_UNDOCREQ) to "Y" and
|
encounter error code -ENOTTY when trying to use some features of the
|
||||||
recompiling.
|
M105, try setting that option to "y" via 'make {x,menu}config' and
|
||||||
|
recompiling the driver.
|
||||||
|
|
||||||
|
|
||||||
3. Troubleshooting
|
3. Troubleshooting
|
||||||
@@ -228,6 +233,13 @@ GigaSet 307x Device Driver
|
|||||||
Solution:
|
Solution:
|
||||||
Select Unimodem mode for all DECT data adapters. (see section 2.4.)
|
Select Unimodem mode for all DECT data adapters. (see section 2.4.)
|
||||||
|
|
||||||
|
Problem:
|
||||||
|
You want to configure your USB DECT data adapter (M105) but gigacontr
|
||||||
|
reports an error: "/dev/ttyGU0: Inappropriate ioctl for device".
|
||||||
|
Solution:
|
||||||
|
Recompile the usb_gigaset driver with the kernel configuration option
|
||||||
|
CONFIG_GIGASET_UNDOCREQ set to 'y'. (see section 2.6.)
|
||||||
|
|
||||||
3.2. Telling the driver to provide more information
|
3.2. Telling the driver to provide more information
|
||||||
----------------------------------------------
|
----------------------------------------------
|
||||||
Building the driver with the "Gigaset debugging" kernel configuration
|
Building the driver with the "Gigaset debugging" kernel configuration
|
||||||
|
|||||||
@@ -212,7 +212,9 @@ hit, Kprobes calls kp->pre_handler. After the probed instruction
|
|||||||
is single-stepped, Kprobe calls kp->post_handler. If a fault
|
is single-stepped, Kprobe calls kp->post_handler. If a fault
|
||||||
occurs during execution of kp->pre_handler or kp->post_handler,
|
occurs during execution of kp->pre_handler or kp->post_handler,
|
||||||
or during single-stepping of the probed instruction, Kprobes calls
|
or during single-stepping of the probed instruction, Kprobes calls
|
||||||
kp->fault_handler. Any or all handlers can be NULL.
|
kp->fault_handler. Any or all handlers can be NULL. If kp->flags
|
||||||
|
is set KPROBE_FLAG_DISABLED, that kp will be registered but disabled,
|
||||||
|
so, it's handlers aren't hit until calling enable_kprobe(kp).
|
||||||
|
|
||||||
NOTE:
|
NOTE:
|
||||||
1. With the introduction of the "symbol_name" field to struct kprobe,
|
1. With the introduction of the "symbol_name" field to struct kprobe,
|
||||||
@@ -363,6 +365,26 @@ probes) in the specified array, they clear the addr field of those
|
|||||||
incorrect probes. However, other probes in the array are
|
incorrect probes. However, other probes in the array are
|
||||||
unregistered correctly.
|
unregistered correctly.
|
||||||
|
|
||||||
|
4.7 disable_*probe
|
||||||
|
|
||||||
|
#include <linux/kprobes.h>
|
||||||
|
int disable_kprobe(struct kprobe *kp);
|
||||||
|
int disable_kretprobe(struct kretprobe *rp);
|
||||||
|
int disable_jprobe(struct jprobe *jp);
|
||||||
|
|
||||||
|
Temporarily disables the specified *probe. You can enable it again by using
|
||||||
|
enable_*probe(). You must specify the probe which has been registered.
|
||||||
|
|
||||||
|
4.8 enable_*probe
|
||||||
|
|
||||||
|
#include <linux/kprobes.h>
|
||||||
|
int enable_kprobe(struct kprobe *kp);
|
||||||
|
int enable_kretprobe(struct kretprobe *rp);
|
||||||
|
int enable_jprobe(struct jprobe *jp);
|
||||||
|
|
||||||
|
Enables *probe which has been disabled by disable_*probe(). You must specify
|
||||||
|
the probe which has been registered.
|
||||||
|
|
||||||
5. Kprobes Features and Limitations
|
5. Kprobes Features and Limitations
|
||||||
|
|
||||||
Kprobes allows multiple probes at the same address. Currently,
|
Kprobes allows multiple probes at the same address. Currently,
|
||||||
@@ -500,10 +522,14 @@ the probe. If the probed function belongs to a module, the module name
|
|||||||
is also specified. Following columns show probe status. If the probe is on
|
is also specified. Following columns show probe status. If the probe is on
|
||||||
a virtual address that is no longer valid (module init sections, module
|
a virtual address that is no longer valid (module init sections, module
|
||||||
virtual addresses that correspond to modules that've been unloaded),
|
virtual addresses that correspond to modules that've been unloaded),
|
||||||
such probes are marked with [GONE].
|
such probes are marked with [GONE]. If the probe is temporarily disabled,
|
||||||
|
such probes are marked with [DISABLED].
|
||||||
|
|
||||||
/debug/kprobes/enabled: Turn kprobes ON/OFF
|
/debug/kprobes/enabled: Turn kprobes ON/OFF forcibly.
|
||||||
|
|
||||||
Provides a knob to globally turn registered kprobes ON or OFF. By default,
|
Provides a knob to globally and forcibly turn registered kprobes ON or OFF.
|
||||||
all kprobes are enabled. By echoing "0" to this file, all registered probes
|
By default, all kprobes are enabled. By echoing "0" to this file, all
|
||||||
will be disarmed, till such time a "1" is echoed to this file.
|
registered probes will be disarmed, till such time a "1" is echoed to this
|
||||||
|
file. Note that this knob just disarms and arms all kprobes and doesn't
|
||||||
|
change each probe's disabling state. This means that disabled kprobes (marked
|
||||||
|
[DISABLED]) will be not enabled if you turn ON all kprobes by this knob.
|
||||||
|
|||||||
71
Documentation/sound/alsa/soc/jack.txt
Normal file
71
Documentation/sound/alsa/soc/jack.txt
Normal file
@@ -0,0 +1,71 @@
|
|||||||
|
ASoC jack detection
|
||||||
|
===================
|
||||||
|
|
||||||
|
ALSA has a standard API for representing physical jacks to user space,
|
||||||
|
the kernel side of which can be seen in include/sound/jack.h. ASoC
|
||||||
|
provides a version of this API adding two additional features:
|
||||||
|
|
||||||
|
- It allows more than one jack detection method to work together on one
|
||||||
|
user visible jack. In embedded systems it is common for multiple
|
||||||
|
to be present on a single jack but handled by separate bits of
|
||||||
|
hardware.
|
||||||
|
|
||||||
|
- Integration with DAPM, allowing DAPM endpoints to be updated
|
||||||
|
automatically based on the detected jack status (eg, turning off the
|
||||||
|
headphone outputs if no headphones are present).
|
||||||
|
|
||||||
|
This is done by splitting the jacks up into three things working
|
||||||
|
together: the jack itself represented by a struct snd_soc_jack, sets of
|
||||||
|
snd_soc_jack_pins representing DAPM endpoints to update and blocks of
|
||||||
|
code providing jack reporting mechanisms.
|
||||||
|
|
||||||
|
For example, a system may have a stereo headset jack with two reporting
|
||||||
|
mechanisms, one for the headphone and one for the microphone. Some
|
||||||
|
systems won't be able to use their speaker output while a headphone is
|
||||||
|
connected and so will want to make sure to update both speaker and
|
||||||
|
headphone when the headphone jack status changes.
|
||||||
|
|
||||||
|
The jack - struct snd_soc_jack
|
||||||
|
==============================
|
||||||
|
|
||||||
|
This represents a physical jack on the system and is what is visible to
|
||||||
|
user space. The jack itself is completely passive, it is set up by the
|
||||||
|
machine driver and updated by jack detection methods.
|
||||||
|
|
||||||
|
Jacks are created by the machine driver calling snd_soc_jack_new().
|
||||||
|
|
||||||
|
snd_soc_jack_pin
|
||||||
|
================
|
||||||
|
|
||||||
|
These represent a DAPM pin to update depending on some of the status
|
||||||
|
bits supported by the jack. Each snd_soc_jack has zero or more of these
|
||||||
|
which are updated automatically. They are created by the machine driver
|
||||||
|
and associated with the jack using snd_soc_jack_add_pins(). The status
|
||||||
|
of the endpoint may configured to be the opposite of the jack status if
|
||||||
|
required (eg, enabling a built in microphone if a microphone is not
|
||||||
|
connected via a jack).
|
||||||
|
|
||||||
|
Jack detection methods
|
||||||
|
======================
|
||||||
|
|
||||||
|
Actual jack detection is done by code which is able to monitor some
|
||||||
|
input to the system and update a jack by calling snd_soc_jack_report(),
|
||||||
|
specifying a subset of bits to update. The jack detection code should
|
||||||
|
be set up by the machine driver, taking configuration for the jack to
|
||||||
|
update and the set of things to report when the jack is connected.
|
||||||
|
|
||||||
|
Often this is done based on the status of a GPIO - a handler for this is
|
||||||
|
provided by the snd_soc_jack_add_gpio() function. Other methods are
|
||||||
|
also available, for example integrated into CODECs. One example of
|
||||||
|
CODEC integrated jack detection can be see in the WM8350 driver.
|
||||||
|
|
||||||
|
Each jack may have multiple reporting mechanisms, though it will need at
|
||||||
|
least one to be useful.
|
||||||
|
|
||||||
|
Machine drivers
|
||||||
|
===============
|
||||||
|
|
||||||
|
These are all hooked together by the machine driver depending on the
|
||||||
|
system hardware. The machine driver will set up the snd_soc_jack and
|
||||||
|
the list of pins to update then set up one or more jack detection
|
||||||
|
mechanisms to update that jack based on their current status.
|
||||||
@@ -39,6 +39,8 @@ Currently, these files are in /proc/sys/vm:
|
|||||||
- nr_hugepages
|
- nr_hugepages
|
||||||
- nr_overcommit_hugepages
|
- nr_overcommit_hugepages
|
||||||
- nr_pdflush_threads
|
- nr_pdflush_threads
|
||||||
|
- nr_pdflush_threads_min
|
||||||
|
- nr_pdflush_threads_max
|
||||||
- nr_trim_pages (only if CONFIG_MMU=n)
|
- nr_trim_pages (only if CONFIG_MMU=n)
|
||||||
- numa_zonelist_order
|
- numa_zonelist_order
|
||||||
- oom_dump_tasks
|
- oom_dump_tasks
|
||||||
@@ -463,6 +465,32 @@ The default value is 0.
|
|||||||
|
|
||||||
==============================================================
|
==============================================================
|
||||||
|
|
||||||
|
nr_pdflush_threads_min
|
||||||
|
|
||||||
|
This value controls the minimum number of pdflush threads.
|
||||||
|
|
||||||
|
At boot time, the kernel will create and maintain 'nr_pdflush_threads_min'
|
||||||
|
threads for the kernel's lifetime.
|
||||||
|
|
||||||
|
The default value is 2. The minimum value you can specify is 1, and
|
||||||
|
the maximum value is the current setting of 'nr_pdflush_threads_max'.
|
||||||
|
|
||||||
|
See 'nr_pdflush_threads_max' below for more information.
|
||||||
|
|
||||||
|
==============================================================
|
||||||
|
|
||||||
|
nr_pdflush_threads_max
|
||||||
|
|
||||||
|
This value controls the maximum number of pdflush threads that can be
|
||||||
|
created. The pdflush algorithm will create a new pdflush thread (up to
|
||||||
|
this maximum) if no pdflush threads have been available for >= 1 second.
|
||||||
|
|
||||||
|
The default value is 8. The minimum value you can specify is the
|
||||||
|
current value of 'nr_pdflush_threads_min' and the
|
||||||
|
maximum is 1000.
|
||||||
|
|
||||||
|
==============================================================
|
||||||
|
|
||||||
overcommit_memory:
|
overcommit_memory:
|
||||||
|
|
||||||
This value contains a flag that enables memory overcommitment.
|
This value contains a flag that enables memory overcommitment.
|
||||||
|
|||||||
125
Documentation/video4linux/pxa_camera.txt
Normal file
125
Documentation/video4linux/pxa_camera.txt
Normal file
@@ -0,0 +1,125 @@
|
|||||||
|
PXA-Camera Host Driver
|
||||||
|
======================
|
||||||
|
|
||||||
|
Constraints
|
||||||
|
-----------
|
||||||
|
a) Image size for YUV422P format
|
||||||
|
All YUV422P images are enforced to have width x height % 16 = 0.
|
||||||
|
This is due to DMA constraints, which transfers only planes of 8 byte
|
||||||
|
multiples.
|
||||||
|
|
||||||
|
|
||||||
|
Global video workflow
|
||||||
|
---------------------
|
||||||
|
a) QCI stopped
|
||||||
|
Initialy, the QCI interface is stopped.
|
||||||
|
When a buffer is queued (pxa_videobuf_ops->buf_queue), the QCI starts.
|
||||||
|
|
||||||
|
b) QCI started
|
||||||
|
More buffers can be queued while the QCI is started without halting the
|
||||||
|
capture. The new buffers are "appended" at the tail of the DMA chain, and
|
||||||
|
smoothly captured one frame after the other.
|
||||||
|
|
||||||
|
Once a buffer is filled in the QCI interface, it is marked as "DONE" and
|
||||||
|
removed from the active buffers list. It can be then requeud or dequeued by
|
||||||
|
userland application.
|
||||||
|
|
||||||
|
Once the last buffer is filled in, the QCI interface stops.
|
||||||
|
|
||||||
|
|
||||||
|
DMA usage
|
||||||
|
---------
|
||||||
|
a) DMA flow
|
||||||
|
- first buffer queued for capture
|
||||||
|
Once a first buffer is queued for capture, the QCI is started, but data
|
||||||
|
transfer is not started. On "End Of Frame" interrupt, the irq handler
|
||||||
|
starts the DMA chain.
|
||||||
|
- capture of one videobuffer
|
||||||
|
The DMA chain starts transfering data into videobuffer RAM pages.
|
||||||
|
When all pages are transfered, the DMA irq is raised on "ENDINTR" status
|
||||||
|
- finishing one videobuffer
|
||||||
|
The DMA irq handler marks the videobuffer as "done", and removes it from
|
||||||
|
the active running queue
|
||||||
|
Meanwhile, the next videobuffer (if there is one), is transfered by DMA
|
||||||
|
- finishing the last videobuffer
|
||||||
|
On the DMA irq of the last videobuffer, the QCI is stopped.
|
||||||
|
|
||||||
|
b) DMA prepared buffer will have this structure
|
||||||
|
|
||||||
|
+------------+-----+---------------+-----------------+
|
||||||
|
| desc-sg[0] | ... | desc-sg[last] | finisher/linker |
|
||||||
|
+------------+-----+---------------+-----------------+
|
||||||
|
|
||||||
|
This structure is pointed by dma->sg_cpu.
|
||||||
|
The descriptors are used as follows :
|
||||||
|
- desc-sg[i]: i-th descriptor, transfering the i-th sg
|
||||||
|
element to the video buffer scatter gather
|
||||||
|
- finisher: has ddadr=DADDR_STOP, dcmd=ENDIRQEN
|
||||||
|
- linker: has ddadr= desc-sg[0] of next video buffer, dcmd=0
|
||||||
|
|
||||||
|
For the next schema, let's assume d0=desc-sg[0] .. dN=desc-sg[N],
|
||||||
|
"f" stands for finisher and "l" for linker.
|
||||||
|
A typical running chain is :
|
||||||
|
|
||||||
|
Videobuffer 1 Videobuffer 2
|
||||||
|
+---------+----+---+ +----+----+----+---+
|
||||||
|
| d0 | .. | dN | l | | d0 | .. | dN | f |
|
||||||
|
+---------+----+-|-+ ^----+----+----+---+
|
||||||
|
| |
|
||||||
|
+----+
|
||||||
|
|
||||||
|
After the chaining is finished, the chain looks like :
|
||||||
|
|
||||||
|
Videobuffer 1 Videobuffer 2 Videobuffer 3
|
||||||
|
+---------+----+---+ +----+----+----+---+ +----+----+----+---+
|
||||||
|
| d0 | .. | dN | l | | d0 | .. | dN | l | | d0 | .. | dN | f |
|
||||||
|
+---------+----+-|-+ ^----+----+----+-|-+ ^----+----+----+---+
|
||||||
|
| | | |
|
||||||
|
+----+ +----+
|
||||||
|
new_link
|
||||||
|
|
||||||
|
c) DMA hot chaining timeslice issue
|
||||||
|
|
||||||
|
As DMA chaining is done while DMA _is_ running, the linking may be done
|
||||||
|
while the DMA jumps from one Videobuffer to another. On the schema, that
|
||||||
|
would be a problem if the following sequence is encountered :
|
||||||
|
|
||||||
|
- DMA chain is Videobuffer1 + Videobuffer2
|
||||||
|
- pxa_videobuf_queue() is called to queue Videobuffer3
|
||||||
|
- DMA controller finishes Videobuffer2, and DMA stops
|
||||||
|
=>
|
||||||
|
Videobuffer 1 Videobuffer 2
|
||||||
|
+---------+----+---+ +----+----+----+---+
|
||||||
|
| d0 | .. | dN | l | | d0 | .. | dN | f |
|
||||||
|
+---------+----+-|-+ ^----+----+----+-^-+
|
||||||
|
| | |
|
||||||
|
+----+ +-- DMA DDADR loads DDADR_STOP
|
||||||
|
|
||||||
|
- pxa_dma_add_tail_buf() is called, the Videobuffer2 "finisher" is
|
||||||
|
replaced by a "linker" to Videobuffer3 (creation of new_link)
|
||||||
|
- pxa_videobuf_queue() finishes
|
||||||
|
- the DMA irq handler is called, which terminates Videobuffer2
|
||||||
|
- Videobuffer3 capture is not scheduled on DMA chain (as it stopped !!!)
|
||||||
|
|
||||||
|
Videobuffer 1 Videobuffer 2 Videobuffer 3
|
||||||
|
+---------+----+---+ +----+----+----+---+ +----+----+----+---+
|
||||||
|
| d0 | .. | dN | l | | d0 | .. | dN | l | | d0 | .. | dN | f |
|
||||||
|
+---------+----+-|-+ ^----+----+----+-|-+ ^----+----+----+---+
|
||||||
|
| | | |
|
||||||
|
+----+ +----+
|
||||||
|
new_link
|
||||||
|
DMA DDADR still is DDADR_STOP
|
||||||
|
|
||||||
|
- pxa_camera_check_link_miss() is called
|
||||||
|
This checks if the DMA is finished and a buffer is still on the
|
||||||
|
pcdev->capture list. If that's the case, the capture will be restarted,
|
||||||
|
and Videobuffer3 is scheduled on DMA chain.
|
||||||
|
- the DMA irq handler finishes
|
||||||
|
|
||||||
|
Note: if DMA stops just after pxa_camera_check_link_miss() reads DDADR()
|
||||||
|
value, we have the guarantee that the DMA irq handler will be called back
|
||||||
|
when the DMA will finish the buffer, and pxa_camera_check_link_miss() will
|
||||||
|
be called again, to reschedule Videobuffer3.
|
||||||
|
|
||||||
|
--
|
||||||
|
Author: Robert Jarzmik <robert.jarzmik@free.fr>
|
||||||
@@ -90,7 +90,7 @@ up before calling v4l2_device_register then it will be untouched. If dev is
|
|||||||
NULL, then you *must* setup v4l2_dev->name before calling v4l2_device_register.
|
NULL, then you *must* setup v4l2_dev->name before calling v4l2_device_register.
|
||||||
|
|
||||||
The first 'dev' argument is normally the struct device pointer of a pci_dev,
|
The first 'dev' argument is normally the struct device pointer of a pci_dev,
|
||||||
usb_device or platform_device. It is rare for dev to be NULL, but it happens
|
usb_interface or platform_device. It is rare for dev to be NULL, but it happens
|
||||||
with ISA devices or when one device creates multiple PCI devices, thus making
|
with ISA devices or when one device creates multiple PCI devices, thus making
|
||||||
it impossible to associate v4l2_dev with a particular parent.
|
it impossible to associate v4l2_dev with a particular parent.
|
||||||
|
|
||||||
@@ -351,17 +351,6 @@ And this to go from an i2c_client to a v4l2_subdev struct:
|
|||||||
|
|
||||||
struct v4l2_subdev *sd = i2c_get_clientdata(client);
|
struct v4l2_subdev *sd = i2c_get_clientdata(client);
|
||||||
|
|
||||||
Finally you need to make a command function to make driver->command()
|
|
||||||
call the right subdev_ops functions:
|
|
||||||
|
|
||||||
static int subdev_command(struct i2c_client *client, unsigned cmd, void *arg)
|
|
||||||
{
|
|
||||||
return v4l2_subdev_command(i2c_get_clientdata(client), cmd, arg);
|
|
||||||
}
|
|
||||||
|
|
||||||
If driver->command is never used then you can leave this out. Eventually the
|
|
||||||
driver->command usage should be removed from v4l.
|
|
||||||
|
|
||||||
Make sure to call v4l2_device_unregister_subdev(sd) when the remove() callback
|
Make sure to call v4l2_device_unregister_subdev(sd) when the remove() callback
|
||||||
is called. This will unregister the sub-device from the bridge driver. It is
|
is called. This will unregister the sub-device from the bridge driver. It is
|
||||||
safe to call this even if the sub-device was never registered.
|
safe to call this even if the sub-device was never registered.
|
||||||
@@ -375,14 +364,12 @@ from the remove() callback ensures that this is always done correctly.
|
|||||||
|
|
||||||
The bridge driver also has some helper functions it can use:
|
The bridge driver also has some helper functions it can use:
|
||||||
|
|
||||||
struct v4l2_subdev *sd = v4l2_i2c_new_subdev(adapter, "module_foo", "chipid", 0x36);
|
struct v4l2_subdev *sd = v4l2_i2c_new_subdev(v4l2_dev, adapter,
|
||||||
|
"module_foo", "chipid", 0x36);
|
||||||
|
|
||||||
This loads the given module (can be NULL if no module needs to be loaded) and
|
This loads the given module (can be NULL if no module needs to be loaded) and
|
||||||
calls i2c_new_device() with the given i2c_adapter and chip/address arguments.
|
calls i2c_new_device() with the given i2c_adapter and chip/address arguments.
|
||||||
If all goes well, then it registers the subdev with the v4l2_device. It gets
|
If all goes well, then it registers the subdev with the v4l2_device.
|
||||||
the v4l2_device by calling i2c_get_adapdata(adapter), so you should make sure
|
|
||||||
to call i2c_set_adapdata(adapter, v4l2_device) when you setup the i2c_adapter
|
|
||||||
in your driver.
|
|
||||||
|
|
||||||
You can also use v4l2_i2c_new_probed_subdev() which is very similar to
|
You can also use v4l2_i2c_new_probed_subdev() which is very similar to
|
||||||
v4l2_i2c_new_subdev(), except that it has an array of possible I2C addresses
|
v4l2_i2c_new_subdev(), except that it has an array of possible I2C addresses
|
||||||
|
|||||||
@@ -1544,7 +1544,6 @@ S: Maintained
|
|||||||
DVB SUBSYSTEM AND DRIVERS
|
DVB SUBSYSTEM AND DRIVERS
|
||||||
P: LinuxTV.org Project
|
P: LinuxTV.org Project
|
||||||
M: linux-media@vger.kernel.org
|
M: linux-media@vger.kernel.org
|
||||||
L: linux-dvb@linuxtv.org (subscription required)
|
|
||||||
W: http://linuxtv.org/
|
W: http://linuxtv.org/
|
||||||
T: git kernel.org:/pub/scm/linux/kernel/git/mchehab/linux-2.6.git
|
T: git kernel.org:/pub/scm/linux/kernel/git/mchehab/linux-2.6.git
|
||||||
S: Maintained
|
S: Maintained
|
||||||
@@ -3245,6 +3244,13 @@ M: andi@lisas.de
|
|||||||
L: netdev@vger.kernel.org
|
L: netdev@vger.kernel.org
|
||||||
S: Maintained
|
S: Maintained
|
||||||
|
|
||||||
|
NILFS2 FILESYSTEM
|
||||||
|
P: KONISHI Ryusuke
|
||||||
|
M: konishi.ryusuke@lab.ntt.co.jp
|
||||||
|
L: users@nilfs.org
|
||||||
|
W: http://www.nilfs.org/en/
|
||||||
|
S: Supported
|
||||||
|
|
||||||
NINJA SCSI-3 / NINJA SCSI-32Bi (16bit/CardBus) PCMCIA SCSI HOST ADAPTER DRIVER
|
NINJA SCSI-3 / NINJA SCSI-32Bi (16bit/CardBus) PCMCIA SCSI HOST ADAPTER DRIVER
|
||||||
P: YOKOTA Hiroshi
|
P: YOKOTA Hiroshi
|
||||||
M: yokota@netlab.is.tsukuba.ac.jp
|
M: yokota@netlab.is.tsukuba.ac.jp
|
||||||
|
|||||||
4
Makefile
4
Makefile
@@ -1,7 +1,7 @@
|
|||||||
VERSION = 2
|
VERSION = 2
|
||||||
PATCHLEVEL = 6
|
PATCHLEVEL = 6
|
||||||
SUBLEVEL = 29
|
SUBLEVEL = 30
|
||||||
EXTRAVERSION =
|
EXTRAVERSION = -rc1
|
||||||
NAME = Temporary Tasmanian Devil
|
NAME = Temporary Tasmanian Devil
|
||||||
|
|
||||||
# *DOCUMENTATION*
|
# *DOCUMENTATION*
|
||||||
|
|||||||
@@ -118,7 +118,7 @@ static struct resource ide_resources[] = {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
static u64 ide_dma_mask = DMA_32BIT_MASK;
|
static u64 ide_dma_mask = DMA_BIT_MASK(32);
|
||||||
|
|
||||||
static struct platform_device ide_dev = {
|
static struct platform_device ide_dev = {
|
||||||
.name = "palm_bk3710",
|
.name = "palm_bk3710",
|
||||||
@@ -127,7 +127,7 @@ static struct platform_device ide_dev = {
|
|||||||
.num_resources = ARRAY_SIZE(ide_resources),
|
.num_resources = ARRAY_SIZE(ide_resources),
|
||||||
.dev = {
|
.dev = {
|
||||||
.dma_mask = &ide_dma_mask,
|
.dma_mask = &ide_dma_mask,
|
||||||
.coherent_dma_mask = DMA_32BIT_MASK,
|
.coherent_dma_mask = DMA_BIT_MASK(32),
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ static struct resource usb_resources[] = {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
static u64 usb_dmamask = DMA_32BIT_MASK;
|
static u64 usb_dmamask = DMA_BIT_MASK(32);
|
||||||
|
|
||||||
static struct platform_device usb_dev = {
|
static struct platform_device usb_dev = {
|
||||||
.name = "musb_hdrc",
|
.name = "musb_hdrc",
|
||||||
@@ -72,7 +72,7 @@ static struct platform_device usb_dev = {
|
|||||||
.dev = {
|
.dev = {
|
||||||
.platform_data = &usb_data,
|
.platform_data = &usb_data,
|
||||||
.dma_mask = &usb_dmamask,
|
.dma_mask = &usb_dmamask,
|
||||||
.coherent_dma_mask = DMA_32BIT_MASK,
|
.coherent_dma_mask = DMA_BIT_MASK(32),
|
||||||
},
|
},
|
||||||
.resource = usb_resources,
|
.resource = usb_resources,
|
||||||
.num_resources = ARRAY_SIZE(usb_resources),
|
.num_resources = ARRAY_SIZE(usb_resources),
|
||||||
|
|||||||
@@ -307,7 +307,7 @@ static struct resource iop13xx_adma_2_resources[] = {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
static u64 iop13xx_adma_dmamask = DMA_64BIT_MASK;
|
static u64 iop13xx_adma_dmamask = DMA_BIT_MASK(64);
|
||||||
static struct iop_adma_platform_data iop13xx_adma_0_data = {
|
static struct iop_adma_platform_data iop13xx_adma_0_data = {
|
||||||
.hw_id = 0,
|
.hw_id = 0,
|
||||||
.pool_size = PAGE_SIZE,
|
.pool_size = PAGE_SIZE,
|
||||||
@@ -331,7 +331,7 @@ static struct platform_device iop13xx_adma_0_channel = {
|
|||||||
.resource = iop13xx_adma_0_resources,
|
.resource = iop13xx_adma_0_resources,
|
||||||
.dev = {
|
.dev = {
|
||||||
.dma_mask = &iop13xx_adma_dmamask,
|
.dma_mask = &iop13xx_adma_dmamask,
|
||||||
.coherent_dma_mask = DMA_64BIT_MASK,
|
.coherent_dma_mask = DMA_BIT_MASK(64),
|
||||||
.platform_data = (void *) &iop13xx_adma_0_data,
|
.platform_data = (void *) &iop13xx_adma_0_data,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
@@ -343,7 +343,7 @@ static struct platform_device iop13xx_adma_1_channel = {
|
|||||||
.resource = iop13xx_adma_1_resources,
|
.resource = iop13xx_adma_1_resources,
|
||||||
.dev = {
|
.dev = {
|
||||||
.dma_mask = &iop13xx_adma_dmamask,
|
.dma_mask = &iop13xx_adma_dmamask,
|
||||||
.coherent_dma_mask = DMA_64BIT_MASK,
|
.coherent_dma_mask = DMA_BIT_MASK(64),
|
||||||
.platform_data = (void *) &iop13xx_adma_1_data,
|
.platform_data = (void *) &iop13xx_adma_1_data,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
@@ -355,7 +355,7 @@ static struct platform_device iop13xx_adma_2_channel = {
|
|||||||
.resource = iop13xx_adma_2_resources,
|
.resource = iop13xx_adma_2_resources,
|
||||||
.dev = {
|
.dev = {
|
||||||
.dma_mask = &iop13xx_adma_dmamask,
|
.dma_mask = &iop13xx_adma_dmamask,
|
||||||
.coherent_dma_mask = DMA_64BIT_MASK,
|
.coherent_dma_mask = DMA_BIT_MASK(64),
|
||||||
.platform_data = (void *) &iop13xx_adma_2_data,
|
.platform_data = (void *) &iop13xx_adma_2_data,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -151,7 +151,7 @@ static struct resource iop13xx_tpmi_3_resources[] = {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
u64 iop13xx_tpmi_mask = DMA_64BIT_MASK;
|
u64 iop13xx_tpmi_mask = DMA_BIT_MASK(64);
|
||||||
static struct platform_device iop13xx_tpmi_0_device = {
|
static struct platform_device iop13xx_tpmi_0_device = {
|
||||||
.name = "iop-tpmi",
|
.name = "iop-tpmi",
|
||||||
.id = 0,
|
.id = 0,
|
||||||
@@ -159,7 +159,7 @@ static struct platform_device iop13xx_tpmi_0_device = {
|
|||||||
.resource = iop13xx_tpmi_0_resources,
|
.resource = iop13xx_tpmi_0_resources,
|
||||||
.dev = {
|
.dev = {
|
||||||
.dma_mask = &iop13xx_tpmi_mask,
|
.dma_mask = &iop13xx_tpmi_mask,
|
||||||
.coherent_dma_mask = DMA_64BIT_MASK,
|
.coherent_dma_mask = DMA_BIT_MASK(64),
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -170,7 +170,7 @@ static struct platform_device iop13xx_tpmi_1_device = {
|
|||||||
.resource = iop13xx_tpmi_1_resources,
|
.resource = iop13xx_tpmi_1_resources,
|
||||||
.dev = {
|
.dev = {
|
||||||
.dma_mask = &iop13xx_tpmi_mask,
|
.dma_mask = &iop13xx_tpmi_mask,
|
||||||
.coherent_dma_mask = DMA_64BIT_MASK,
|
.coherent_dma_mask = DMA_BIT_MASK(64),
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -181,7 +181,7 @@ static struct platform_device iop13xx_tpmi_2_device = {
|
|||||||
.resource = iop13xx_tpmi_2_resources,
|
.resource = iop13xx_tpmi_2_resources,
|
||||||
.dev = {
|
.dev = {
|
||||||
.dma_mask = &iop13xx_tpmi_mask,
|
.dma_mask = &iop13xx_tpmi_mask,
|
||||||
.coherent_dma_mask = DMA_64BIT_MASK,
|
.coherent_dma_mask = DMA_BIT_MASK(64),
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -192,7 +192,7 @@ static struct platform_device iop13xx_tpmi_3_device = {
|
|||||||
.resource = iop13xx_tpmi_3_resources,
|
.resource = iop13xx_tpmi_3_resources,
|
||||||
.dev = {
|
.dev = {
|
||||||
.dma_mask = &iop13xx_tpmi_mask,
|
.dma_mask = &iop13xx_tpmi_mask,
|
||||||
.coherent_dma_mask = DMA_64BIT_MASK,
|
.coherent_dma_mask = DMA_BIT_MASK(64),
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -508,7 +508,7 @@ static struct mv_xor_platform_shared_data kirkwood_xor_shared_data = {
|
|||||||
.dram = &kirkwood_mbus_dram_info,
|
.dram = &kirkwood_mbus_dram_info,
|
||||||
};
|
};
|
||||||
|
|
||||||
static u64 kirkwood_xor_dmamask = DMA_32BIT_MASK;
|
static u64 kirkwood_xor_dmamask = DMA_BIT_MASK(32);
|
||||||
|
|
||||||
|
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
@@ -559,7 +559,7 @@ static struct platform_device kirkwood_xor00_channel = {
|
|||||||
.resource = kirkwood_xor00_resources,
|
.resource = kirkwood_xor00_resources,
|
||||||
.dev = {
|
.dev = {
|
||||||
.dma_mask = &kirkwood_xor_dmamask,
|
.dma_mask = &kirkwood_xor_dmamask,
|
||||||
.coherent_dma_mask = DMA_64BIT_MASK,
|
.coherent_dma_mask = DMA_BIT_MASK(64),
|
||||||
.platform_data = (void *)&kirkwood_xor00_data,
|
.platform_data = (void *)&kirkwood_xor00_data,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
@@ -585,7 +585,7 @@ static struct platform_device kirkwood_xor01_channel = {
|
|||||||
.resource = kirkwood_xor01_resources,
|
.resource = kirkwood_xor01_resources,
|
||||||
.dev = {
|
.dev = {
|
||||||
.dma_mask = &kirkwood_xor_dmamask,
|
.dma_mask = &kirkwood_xor_dmamask,
|
||||||
.coherent_dma_mask = DMA_64BIT_MASK,
|
.coherent_dma_mask = DMA_BIT_MASK(64),
|
||||||
.platform_data = (void *)&kirkwood_xor01_data,
|
.platform_data = (void *)&kirkwood_xor01_data,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
@@ -657,7 +657,7 @@ static struct platform_device kirkwood_xor10_channel = {
|
|||||||
.resource = kirkwood_xor10_resources,
|
.resource = kirkwood_xor10_resources,
|
||||||
.dev = {
|
.dev = {
|
||||||
.dma_mask = &kirkwood_xor_dmamask,
|
.dma_mask = &kirkwood_xor_dmamask,
|
||||||
.coherent_dma_mask = DMA_64BIT_MASK,
|
.coherent_dma_mask = DMA_BIT_MASK(64),
|
||||||
.platform_data = (void *)&kirkwood_xor10_data,
|
.platform_data = (void *)&kirkwood_xor10_data,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
@@ -683,7 +683,7 @@ static struct platform_device kirkwood_xor11_channel = {
|
|||||||
.resource = kirkwood_xor11_resources,
|
.resource = kirkwood_xor11_resources,
|
||||||
.dev = {
|
.dev = {
|
||||||
.dma_mask = &kirkwood_xor_dmamask,
|
.dma_mask = &kirkwood_xor_dmamask,
|
||||||
.coherent_dma_mask = DMA_64BIT_MASK,
|
.coherent_dma_mask = DMA_BIT_MASK(64),
|
||||||
.platform_data = (void *)&kirkwood_xor11_data,
|
.platform_data = (void *)&kirkwood_xor11_data,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -6,6 +6,9 @@
|
|||||||
|
|
||||||
obj-y += generic.o clock.o devices.o
|
obj-y += generic.o clock.o devices.o
|
||||||
|
|
||||||
|
# Support for CMOS sensor interface
|
||||||
|
obj-$(CONFIG_MX1_VIDEO) += ksym_mx1.o mx1_camera_fiq.o
|
||||||
|
|
||||||
# Specific board support
|
# Specific board support
|
||||||
obj-$(CONFIG_ARCH_MX1ADS) += mx1ads.o
|
obj-$(CONFIG_ARCH_MX1ADS) += mx1ads.o
|
||||||
obj-$(CONFIG_MACH_SCB9328) += scb9328.o
|
obj-$(CONFIG_MACH_SCB9328) += scb9328.o
|
||||||
@@ -44,7 +44,7 @@ static struct resource imx_csi_resources[] = {
|
|||||||
static u64 imx_csi_dmamask = 0xffffffffUL;
|
static u64 imx_csi_dmamask = 0xffffffffUL;
|
||||||
|
|
||||||
struct platform_device imx_csi_device = {
|
struct platform_device imx_csi_device = {
|
||||||
.name = "imx-csi",
|
.name = "mx1-camera",
|
||||||
.id = 0, /* This is used to put cameras on this interface */
|
.id = 0, /* This is used to put cameras on this interface */
|
||||||
.dev = {
|
.dev = {
|
||||||
.dma_mask = &imx_csi_dmamask,
|
.dma_mask = &imx_csi_dmamask,
|
||||||
|
|||||||
18
arch/arm/mach-mx1/ksym_mx1.c
Normal file
18
arch/arm/mach-mx1/ksym_mx1.c
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
/*
|
||||||
|
* Exported ksyms of ARCH_MX1
|
||||||
|
*
|
||||||
|
* Copyright (C) 2008, Darius Augulis <augulis.darius@gmail.com>
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License version 2 as
|
||||||
|
* published by the Free Software Foundation.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <linux/platform_device.h>
|
||||||
|
#include <linux/module.h>
|
||||||
|
|
||||||
|
#include <mach/mx1_camera.h>
|
||||||
|
|
||||||
|
/* IMX camera FIQ handler */
|
||||||
|
EXPORT_SYMBOL(mx1_camera_sof_fiq_start);
|
||||||
|
EXPORT_SYMBOL(mx1_camera_sof_fiq_end);
|
||||||
35
arch/arm/mach-mx1/mx1_camera_fiq.S
Normal file
35
arch/arm/mach-mx1/mx1_camera_fiq.S
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2008 Paulius Zaleckas <paulius.zaleckas@teltonika.lt>
|
||||||
|
*
|
||||||
|
* Based on linux/arch/arm/lib/floppydma.S
|
||||||
|
* Copyright (C) 1995, 1996 Russell King
|
||||||
|
*
|
||||||
|
* 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/linkage.h>
|
||||||
|
#include <asm/assembler.h>
|
||||||
|
|
||||||
|
.text
|
||||||
|
.global mx1_camera_sof_fiq_end
|
||||||
|
.global mx1_camera_sof_fiq_start
|
||||||
|
mx1_camera_sof_fiq_start:
|
||||||
|
@ enable dma
|
||||||
|
ldr r12, [r9]
|
||||||
|
orr r12, r12, #0x00000001
|
||||||
|
str r12, [r9]
|
||||||
|
@ unmask DMA interrupt
|
||||||
|
ldr r12, [r8]
|
||||||
|
bic r12, r12, r13
|
||||||
|
str r12, [r8]
|
||||||
|
@ disable SOF interrupt
|
||||||
|
ldr r12, [r10]
|
||||||
|
bic r12, r12, #0x00010000
|
||||||
|
str r12, [r10]
|
||||||
|
@ clear SOF flag
|
||||||
|
mov r12, #0x00010000
|
||||||
|
str r12, [r11]
|
||||||
|
@ return from FIQ
|
||||||
|
subs pc, lr, #4
|
||||||
|
mx1_camera_sof_fiq_end:
|
||||||
@@ -533,7 +533,7 @@ static struct clk_lookup lookups[] __initdata = {
|
|||||||
_REGISTER_CLOCK(NULL, "kpp", kpp_clk)
|
_REGISTER_CLOCK(NULL, "kpp", kpp_clk)
|
||||||
_REGISTER_CLOCK("fsl-usb2-udc", "usb", usb_clk1)
|
_REGISTER_CLOCK("fsl-usb2-udc", "usb", usb_clk1)
|
||||||
_REGISTER_CLOCK("fsl-usb2-udc", "usb_ahb", usb_clk2)
|
_REGISTER_CLOCK("fsl-usb2-udc", "usb_ahb", usb_clk2)
|
||||||
_REGISTER_CLOCK("mx3-camera.0", "csi", csi_clk)
|
_REGISTER_CLOCK("mx3-camera.0", NULL, csi_clk)
|
||||||
_REGISTER_CLOCK("imx-uart.0", NULL, uart1_clk)
|
_REGISTER_CLOCK("imx-uart.0", NULL, uart1_clk)
|
||||||
_REGISTER_CLOCK("imx-uart.1", NULL, uart2_clk)
|
_REGISTER_CLOCK("imx-uart.1", NULL, uart2_clk)
|
||||||
_REGISTER_CLOCK("imx-uart.2", NULL, uart3_clk)
|
_REGISTER_CLOCK("imx-uart.2", NULL, uart3_clk)
|
||||||
|
|||||||
@@ -463,7 +463,7 @@ static struct platform_device orion5x_xor_shared = {
|
|||||||
.resource = orion5x_xor_shared_resources,
|
.resource = orion5x_xor_shared_resources,
|
||||||
};
|
};
|
||||||
|
|
||||||
static u64 orion5x_xor_dmamask = DMA_32BIT_MASK;
|
static u64 orion5x_xor_dmamask = DMA_BIT_MASK(32);
|
||||||
|
|
||||||
static struct resource orion5x_xor0_resources[] = {
|
static struct resource orion5x_xor0_resources[] = {
|
||||||
[0] = {
|
[0] = {
|
||||||
@@ -486,7 +486,7 @@ static struct platform_device orion5x_xor0_channel = {
|
|||||||
.resource = orion5x_xor0_resources,
|
.resource = orion5x_xor0_resources,
|
||||||
.dev = {
|
.dev = {
|
||||||
.dma_mask = &orion5x_xor_dmamask,
|
.dma_mask = &orion5x_xor_dmamask,
|
||||||
.coherent_dma_mask = DMA_64BIT_MASK,
|
.coherent_dma_mask = DMA_BIT_MASK(64),
|
||||||
.platform_data = (void *)&orion5x_xor0_data,
|
.platform_data = (void *)&orion5x_xor0_data,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
@@ -512,7 +512,7 @@ static struct platform_device orion5x_xor1_channel = {
|
|||||||
.resource = orion5x_xor1_resources,
|
.resource = orion5x_xor1_resources,
|
||||||
.dev = {
|
.dev = {
|
||||||
.dma_mask = &orion5x_xor_dmamask,
|
.dma_mask = &orion5x_xor_dmamask,
|
||||||
.coherent_dma_mask = DMA_64BIT_MASK,
|
.coherent_dma_mask = DMA_BIT_MASK(64),
|
||||||
.platform_data = (void *)&orion5x_xor1_data,
|
.platform_data = (void *)&orion5x_xor1_data,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -38,6 +38,7 @@ struct pxa2xx_spi_chip {
|
|||||||
u8 dma_burst_size;
|
u8 dma_burst_size;
|
||||||
u32 timeout;
|
u32 timeout;
|
||||||
u8 enable_loopback;
|
u8 enable_loopback;
|
||||||
|
int gpio_cs;
|
||||||
void (*cs_control)(u32 command);
|
void (*cs_control)(u32 command);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -409,8 +409,7 @@ static struct platform_device bast_sio = {
|
|||||||
static struct s3c2410_platform_i2c __initdata bast_i2c_info = {
|
static struct s3c2410_platform_i2c __initdata bast_i2c_info = {
|
||||||
.flags = 0,
|
.flags = 0,
|
||||||
.slave_addr = 0x10,
|
.slave_addr = 0x10,
|
||||||
.bus_freq = 100*1000,
|
.frequency = 100*1000,
|
||||||
.max_freq = 130*1000,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Asix AX88796 10/100 ethernet controller */
|
/* Asix AX88796 10/100 ethernet controller */
|
||||||
|
|||||||
@@ -340,8 +340,7 @@ static struct platform_device *n35_devices[] __initdata = {
|
|||||||
static struct s3c2410_platform_i2c n30_i2ccfg = {
|
static struct s3c2410_platform_i2c n30_i2ccfg = {
|
||||||
.flags = 0,
|
.flags = 0,
|
||||||
.slave_addr = 0x10,
|
.slave_addr = 0x10,
|
||||||
.bus_freq = 10*1000,
|
.frequency = 10*1000,
|
||||||
.max_freq = 10*1000,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Lots of hardcoded stuff, but it sets up the hardware in a useful
|
/* Lots of hardcoded stuff, but it sets up the hardware in a useful
|
||||||
|
|||||||
@@ -453,8 +453,7 @@ static struct spi_board_info __initdata jive_spi_devs[] = {
|
|||||||
/* I2C bus and device configuration. */
|
/* I2C bus and device configuration. */
|
||||||
|
|
||||||
static struct s3c2410_platform_i2c jive_i2c_cfg __initdata = {
|
static struct s3c2410_platform_i2c jive_i2c_cfg __initdata = {
|
||||||
.max_freq = 80 * 1000,
|
.frequency = 80 * 1000,
|
||||||
.bus_freq = 50 * 1000,
|
|
||||||
.flags = S3C_IICFLG_FILTER,
|
.flags = S3C_IICFLG_FILTER,
|
||||||
.sda_delay = 2,
|
.sda_delay = 2,
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -119,7 +119,7 @@ static struct resource iop3xx_aau_resources[] = {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
static u64 iop3xx_adma_dmamask = DMA_32BIT_MASK;
|
static u64 iop3xx_adma_dmamask = DMA_BIT_MASK(32);
|
||||||
|
|
||||||
static struct iop_adma_platform_data iop3xx_dma_0_data = {
|
static struct iop_adma_platform_data iop3xx_dma_0_data = {
|
||||||
.hw_id = DMA0_ID,
|
.hw_id = DMA0_ID,
|
||||||
@@ -143,7 +143,7 @@ struct platform_device iop3xx_dma_0_channel = {
|
|||||||
.resource = iop3xx_dma_0_resources,
|
.resource = iop3xx_dma_0_resources,
|
||||||
.dev = {
|
.dev = {
|
||||||
.dma_mask = &iop3xx_adma_dmamask,
|
.dma_mask = &iop3xx_adma_dmamask,
|
||||||
.coherent_dma_mask = DMA_64BIT_MASK,
|
.coherent_dma_mask = DMA_BIT_MASK(64),
|
||||||
.platform_data = (void *) &iop3xx_dma_0_data,
|
.platform_data = (void *) &iop3xx_dma_0_data,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
@@ -155,7 +155,7 @@ struct platform_device iop3xx_dma_1_channel = {
|
|||||||
.resource = iop3xx_dma_1_resources,
|
.resource = iop3xx_dma_1_resources,
|
||||||
.dev = {
|
.dev = {
|
||||||
.dma_mask = &iop3xx_adma_dmamask,
|
.dma_mask = &iop3xx_adma_dmamask,
|
||||||
.coherent_dma_mask = DMA_64BIT_MASK,
|
.coherent_dma_mask = DMA_BIT_MASK(64),
|
||||||
.platform_data = (void *) &iop3xx_dma_1_data,
|
.platform_data = (void *) &iop3xx_dma_1_data,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
@@ -167,7 +167,7 @@ struct platform_device iop3xx_aau_channel = {
|
|||||||
.resource = iop3xx_aau_resources,
|
.resource = iop3xx_aau_resources,
|
||||||
.dev = {
|
.dev = {
|
||||||
.dma_mask = &iop3xx_adma_dmamask,
|
.dma_mask = &iop3xx_adma_dmamask,
|
||||||
.coherent_dma_mask = DMA_64BIT_MASK,
|
.coherent_dma_mask = DMA_BIT_MASK(64),
|
||||||
.platform_data = (void *) &iop3xx_aau_data,
|
.platform_data = (void *) &iop3xx_aau_data,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|||||||
25
arch/arm/plat-mxc/include/mach/i2c.h
Normal file
25
arch/arm/plat-mxc/include/mach/i2c.h
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
/*
|
||||||
|
* i2c.h - i.MX I2C driver header file
|
||||||
|
*
|
||||||
|
* Copyright (c) 2008, Darius Augulis <augulis.darius@gmail.com>
|
||||||
|
*
|
||||||
|
* This file is released under the GPLv2
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef __ASM_ARCH_I2C_H_
|
||||||
|
#define __ASM_ARCH_I2C_H_
|
||||||
|
|
||||||
|
/**
|
||||||
|
* struct imxi2c_platform_data - structure of platform data for MXC I2C driver
|
||||||
|
* @init: Initialise gpio's and other board specific things
|
||||||
|
* @exit: Free everything initialised by @init
|
||||||
|
* @bitrate: Bus speed measured in Hz
|
||||||
|
*
|
||||||
|
**/
|
||||||
|
struct imxi2c_platform_data {
|
||||||
|
int (*init)(struct device *dev);
|
||||||
|
void (*exit)(struct device *dev);
|
||||||
|
int bitrate;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif /* __ASM_ARCH_I2C_H_ */
|
||||||
@@ -24,4 +24,12 @@
|
|||||||
#define PHYS_OFFSET UL(0x80000000)
|
#define PHYS_OFFSET UL(0x80000000)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(CONFIG_MX1_VIDEO)
|
||||||
|
/*
|
||||||
|
* Increase size of DMA-consistent memory region.
|
||||||
|
* This is required for i.MX camera driver to capture at least four VGA frames.
|
||||||
|
*/
|
||||||
|
#define CONSISTENT_DMA_SIZE SZ_4M
|
||||||
|
#endif /* CONFIG_MX1_VIDEO */
|
||||||
|
|
||||||
#endif /* __ASM_ARCH_MXC_MEMORY_H__ */
|
#endif /* __ASM_ARCH_MXC_MEMORY_H__ */
|
||||||
|
|||||||
35
arch/arm/plat-mxc/include/mach/mx1_camera.h
Normal file
35
arch/arm/plat-mxc/include/mach/mx1_camera.h
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
/*
|
||||||
|
* mx1_camera.h - i.MX1/i.MXL camera driver header file
|
||||||
|
*
|
||||||
|
* Copyright (c) 2008, Paulius Zaleckas <paulius.zaleckas@teltonika.lt>
|
||||||
|
* Copyright (C) 2009, Darius Augulis <augulis.darius@gmail.com>
|
||||||
|
*
|
||||||
|
* Based on PXA camera.h file:
|
||||||
|
* Copyright (C) 2003, Intel Corporation
|
||||||
|
* Copyright (C) 2008, Guennadi Liakhovetski <kernel@pengutronix.de>
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License version 2 as
|
||||||
|
* published by the Free Software Foundation.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef __ASM_ARCH_CAMERA_H_
|
||||||
|
#define __ASM_ARCH_CAMERA_H_
|
||||||
|
|
||||||
|
#define MX1_CAMERA_DATA_HIGH 1
|
||||||
|
#define MX1_CAMERA_PCLK_RISING 2
|
||||||
|
#define MX1_CAMERA_VSYNC_HIGH 4
|
||||||
|
|
||||||
|
extern unsigned char mx1_camera_sof_fiq_start, mx1_camera_sof_fiq_end;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* struct mx1_camera_pdata - i.MX1/i.MXL camera platform data
|
||||||
|
* @mclk_10khz: master clock frequency in 10kHz units
|
||||||
|
* @flags: MX1 camera platform flags
|
||||||
|
*/
|
||||||
|
struct mx1_camera_pdata {
|
||||||
|
unsigned long mclk_10khz;
|
||||||
|
unsigned long flags;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif /* __ASM_ARCH_CAMERA_H_ */
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
/* linux/arch/arm/plat-s3c/dev-i2c0.c
|
/* linux/arch/arm/plat-s3c/dev-i2c0.c
|
||||||
*
|
*
|
||||||
* Copyright 2008 Simtec Electronics
|
* Copyright 2008,2009 Simtec Electronics
|
||||||
* Ben Dooks <ben@simtec.co.uk>
|
* Ben Dooks <ben@simtec.co.uk>
|
||||||
* http://armlinux.simtec.co.uk/
|
* http://armlinux.simtec.co.uk/
|
||||||
*
|
*
|
||||||
@@ -50,9 +50,8 @@ struct platform_device s3c_device_i2c0 = {
|
|||||||
static struct s3c2410_platform_i2c default_i2c_data0 __initdata = {
|
static struct s3c2410_platform_i2c default_i2c_data0 __initdata = {
|
||||||
.flags = 0,
|
.flags = 0,
|
||||||
.slave_addr = 0x10,
|
.slave_addr = 0x10,
|
||||||
.bus_freq = 100*1000,
|
.frequency = 100*1000,
|
||||||
.max_freq = 400*1000,
|
.sda_delay = 100,
|
||||||
.sda_delay = S3C2410_IICLC_SDA_DELAY5 | S3C2410_IICLC_FILTER_ON,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
void __init s3c_i2c0_set_platdata(struct s3c2410_platform_i2c *pd)
|
void __init s3c_i2c0_set_platdata(struct s3c2410_platform_i2c *pd)
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/* linux/arch/arm/plat-s3c/dev-i2c1.c
|
/* linux/arch/arm/plat-s3c/dev-i2c1.c
|
||||||
*
|
*
|
||||||
* Copyright 2008 Simtec Electronics
|
* Copyright 2008,2009 Simtec Electronics
|
||||||
* Ben Dooks <ben@simtec.co.uk>
|
* Ben Dooks <ben@simtec.co.uk>
|
||||||
* http://armlinux.simtec.co.uk/
|
* http://armlinux.simtec.co.uk/
|
||||||
*
|
*
|
||||||
@@ -47,9 +47,8 @@ static struct s3c2410_platform_i2c default_i2c_data1 __initdata = {
|
|||||||
.flags = 0,
|
.flags = 0,
|
||||||
.bus_num = 1,
|
.bus_num = 1,
|
||||||
.slave_addr = 0x10,
|
.slave_addr = 0x10,
|
||||||
.bus_freq = 100*1000,
|
.frequency = 100*1000,
|
||||||
.max_freq = 400*1000,
|
.sda_delay = 100,
|
||||||
.sda_delay = S3C2410_IICLC_SDA_DELAY5 | S3C2410_IICLC_FILTER_ON,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
void __init s3c_i2c1_set_platdata(struct s3c2410_platform_i2c *pd)
|
void __init s3c_i2c1_set_platdata(struct s3c2410_platform_i2c *pd)
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
/* arch/arm/mach-s3c2410/include/mach/iic.h
|
/* arch/arm/plat-s3c/include/plat/iic.h
|
||||||
*
|
*
|
||||||
* Copyright (c) 2004 Simtec Electronics
|
* Copyright 2004,2009 Simtec Electronics
|
||||||
* Ben Dooks <ben@simtec.co.uk>
|
* Ben Dooks <ben@simtec.co.uk>
|
||||||
*
|
*
|
||||||
* S3C2410 - I2C Controller platfrom_device info
|
* S3C - I2C Controller platform_device info
|
||||||
*
|
*
|
||||||
* 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
|
||||||
@@ -15,19 +15,24 @@
|
|||||||
|
|
||||||
#define S3C_IICFLG_FILTER (1<<0) /* enable s3c2440 filter */
|
#define S3C_IICFLG_FILTER (1<<0) /* enable s3c2440 filter */
|
||||||
|
|
||||||
/* Notes:
|
/**
|
||||||
* 1) All frequencies are expressed in Hz
|
* struct s3c2410_platform_i2c - Platform data for s3c I2C.
|
||||||
* 2) A value of zero is `do not care`
|
* @bus_num: The bus number to use (if possible).
|
||||||
*/
|
* @flags: Any flags for the I2C bus (E.g. S3C_IICFLK_FILTER).
|
||||||
|
* @slave_addr: The I2C address for the slave device (if enabled).
|
||||||
|
* @frequency: The desired frequency in Hz of the bus. This is
|
||||||
|
* guaranteed to not be exceeded. If the caller does
|
||||||
|
* not care, use zero and the driver will select a
|
||||||
|
* useful default.
|
||||||
|
* @sda_delay: The delay (in ns) applied to SDA edges.
|
||||||
|
* @cfg_gpio: A callback to configure the pins for I2C operation.
|
||||||
|
*/
|
||||||
struct s3c2410_platform_i2c {
|
struct s3c2410_platform_i2c {
|
||||||
int bus_num; /* bus number to use */
|
int bus_num;
|
||||||
unsigned int flags;
|
unsigned int flags;
|
||||||
unsigned int slave_addr; /* slave address for controller */
|
unsigned int slave_addr;
|
||||||
unsigned long bus_freq; /* standard bus frequency */
|
unsigned long frequency;
|
||||||
unsigned long max_freq; /* max frequency for the bus */
|
unsigned int sda_delay;
|
||||||
unsigned long min_freq; /* min frequency for the bus */
|
|
||||||
unsigned int sda_delay; /* pclks (s3c2440 only) */
|
|
||||||
|
|
||||||
void (*cfg_gpio)(struct platform_device *dev);
|
void (*cfg_gpio)(struct platform_device *dev);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -280,13 +280,13 @@ static struct resource hh_fpga0_resource[] = {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
static u64 hh_fpga0_dma_mask = DMA_32BIT_MASK;
|
static u64 hh_fpga0_dma_mask = DMA_BIT_MASK(32);
|
||||||
static struct platform_device hh_fpga0_device = {
|
static struct platform_device hh_fpga0_device = {
|
||||||
.name = "hh_fpga",
|
.name = "hh_fpga",
|
||||||
.id = 0,
|
.id = 0,
|
||||||
.dev = {
|
.dev = {
|
||||||
.dma_mask = &hh_fpga0_dma_mask,
|
.dma_mask = &hh_fpga0_dma_mask,
|
||||||
.coherent_dma_mask = DMA_32BIT_MASK,
|
.coherent_dma_mask = DMA_BIT_MASK(32),
|
||||||
},
|
},
|
||||||
.resource = hh_fpga0_resource,
|
.resource = hh_fpga0_resource,
|
||||||
.num_resources = ARRAY_SIZE(hh_fpga0_resource),
|
.num_resources = ARRAY_SIZE(hh_fpga0_resource),
|
||||||
|
|||||||
@@ -60,26 +60,26 @@
|
|||||||
* don't ... tc, smc, pio, rtc, watchdog, pwm, ps2, and more.
|
* don't ... tc, smc, pio, rtc, watchdog, pwm, ps2, and more.
|
||||||
*/
|
*/
|
||||||
#define DEFINE_DEV(_name, _id) \
|
#define DEFINE_DEV(_name, _id) \
|
||||||
static u64 _name##_id##_dma_mask = DMA_32BIT_MASK; \
|
static u64 _name##_id##_dma_mask = DMA_BIT_MASK(32); \
|
||||||
static struct platform_device _name##_id##_device = { \
|
static struct platform_device _name##_id##_device = { \
|
||||||
.name = #_name, \
|
.name = #_name, \
|
||||||
.id = _id, \
|
.id = _id, \
|
||||||
.dev = { \
|
.dev = { \
|
||||||
.dma_mask = &_name##_id##_dma_mask, \
|
.dma_mask = &_name##_id##_dma_mask, \
|
||||||
.coherent_dma_mask = DMA_32BIT_MASK, \
|
.coherent_dma_mask = DMA_BIT_MASK(32), \
|
||||||
}, \
|
}, \
|
||||||
.resource = _name##_id##_resource, \
|
.resource = _name##_id##_resource, \
|
||||||
.num_resources = ARRAY_SIZE(_name##_id##_resource), \
|
.num_resources = ARRAY_SIZE(_name##_id##_resource), \
|
||||||
}
|
}
|
||||||
#define DEFINE_DEV_DATA(_name, _id) \
|
#define DEFINE_DEV_DATA(_name, _id) \
|
||||||
static u64 _name##_id##_dma_mask = DMA_32BIT_MASK; \
|
static u64 _name##_id##_dma_mask = DMA_BIT_MASK(32); \
|
||||||
static struct platform_device _name##_id##_device = { \
|
static struct platform_device _name##_id##_device = { \
|
||||||
.name = #_name, \
|
.name = #_name, \
|
||||||
.id = _id, \
|
.id = _id, \
|
||||||
.dev = { \
|
.dev = { \
|
||||||
.dma_mask = &_name##_id##_dma_mask, \
|
.dma_mask = &_name##_id##_dma_mask, \
|
||||||
.platform_data = &_name##_id##_data, \
|
.platform_data = &_name##_id##_data, \
|
||||||
.coherent_dma_mask = DMA_32BIT_MASK, \
|
.coherent_dma_mask = DMA_BIT_MASK(32), \
|
||||||
}, \
|
}, \
|
||||||
.resource = _name##_id##_resource, \
|
.resource = _name##_id##_resource, \
|
||||||
.num_resources = ARRAY_SIZE(_name##_id##_resource), \
|
.num_resources = ARRAY_SIZE(_name##_id##_resource), \
|
||||||
|
|||||||
@@ -11,6 +11,8 @@
|
|||||||
#ifndef _SPI_CHANNEL_H_
|
#ifndef _SPI_CHANNEL_H_
|
||||||
#define _SPI_CHANNEL_H_
|
#define _SPI_CHANNEL_H_
|
||||||
|
|
||||||
|
#define MIN_SPI_BAUD_VAL 2
|
||||||
|
|
||||||
#define SPI_READ 0
|
#define SPI_READ 0
|
||||||
#define SPI_WRITE 1
|
#define SPI_WRITE 1
|
||||||
|
|
||||||
@@ -122,6 +124,9 @@ struct bfin5xx_spi_chip {
|
|||||||
u8 bits_per_word;
|
u8 bits_per_word;
|
||||||
u8 cs_change_per_word;
|
u8 cs_change_per_word;
|
||||||
u16 cs_chg_udelay; /* Some devices require 16-bit delays */
|
u16 cs_chg_udelay; /* Some devices require 16-bit delays */
|
||||||
|
u32 cs_gpio;
|
||||||
|
/* Value to send if no TX value is supplied, usually 0x0 or 0xFFFF */
|
||||||
|
u16 idle_tx_val;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* _SPI_CHANNEL_H_ */
|
#endif /* _SPI_CHANNEL_H_ */
|
||||||
|
|||||||
@@ -53,9 +53,9 @@
|
|||||||
#define UART_SET_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) | DLAB); SSYNC(); } while (0)
|
#define UART_SET_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) | DLAB); SSYNC(); } while (0)
|
||||||
#define UART_CLEAR_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) & ~DLAB); SSYNC(); } while (0)
|
#define UART_CLEAR_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) & ~DLAB); SSYNC(); } while (0)
|
||||||
|
|
||||||
#define UART_GET_CTS(x) gpio_get_value(x->cts_pin)
|
#define UART_GET_CTS(x) (!gpio_get_value(x->cts_pin))
|
||||||
#define UART_SET_RTS(x) gpio_set_value(x->rts_pin, 1)
|
#define UART_DISABLE_RTS(x) gpio_set_value(x->rts_pin, 1)
|
||||||
#define UART_CLEAR_RTS(x) gpio_set_value(x->rts_pin, 0)
|
#define UART_ENABLE_RTS(x) gpio_set_value(x->rts_pin, 0)
|
||||||
#define UART_ENABLE_INTS(x, v) UART_PUT_IER(x, v)
|
#define UART_ENABLE_INTS(x, v) UART_PUT_IER(x, v)
|
||||||
#define UART_DISABLE_INTS(x) UART_PUT_IER(x, 0)
|
#define UART_DISABLE_INTS(x) UART_PUT_IER(x, 0)
|
||||||
|
|
||||||
@@ -87,6 +87,7 @@
|
|||||||
struct bfin_serial_port {
|
struct bfin_serial_port {
|
||||||
struct uart_port port;
|
struct uart_port port;
|
||||||
unsigned int old_status;
|
unsigned int old_status;
|
||||||
|
int status_irq;
|
||||||
unsigned int lsr;
|
unsigned int lsr;
|
||||||
#ifdef CONFIG_SERIAL_BFIN_DMA
|
#ifdef CONFIG_SERIAL_BFIN_DMA
|
||||||
int tx_done;
|
int tx_done;
|
||||||
@@ -125,6 +126,7 @@ static inline void UART_CLEAR_LSR(struct bfin_serial_port *uart)
|
|||||||
struct bfin_serial_res {
|
struct bfin_serial_res {
|
||||||
unsigned long uart_base_addr;
|
unsigned long uart_base_addr;
|
||||||
int uart_irq;
|
int uart_irq;
|
||||||
|
int uart_status_irq;
|
||||||
#ifdef CONFIG_SERIAL_BFIN_DMA
|
#ifdef CONFIG_SERIAL_BFIN_DMA
|
||||||
unsigned int uart_tx_dma_channel;
|
unsigned int uart_tx_dma_channel;
|
||||||
unsigned int uart_rx_dma_channel;
|
unsigned int uart_rx_dma_channel;
|
||||||
@@ -140,6 +142,7 @@ struct bfin_serial_res bfin_serial_resource[] = {
|
|||||||
{
|
{
|
||||||
0xFFC00400,
|
0xFFC00400,
|
||||||
IRQ_UART0_RX,
|
IRQ_UART0_RX,
|
||||||
|
IRQ_UART0_ERROR,
|
||||||
#ifdef CONFIG_SERIAL_BFIN_DMA
|
#ifdef CONFIG_SERIAL_BFIN_DMA
|
||||||
CH_UART0_TX,
|
CH_UART0_TX,
|
||||||
CH_UART0_RX,
|
CH_UART0_RX,
|
||||||
@@ -154,6 +157,7 @@ struct bfin_serial_res bfin_serial_resource[] = {
|
|||||||
{
|
{
|
||||||
0xFFC02000,
|
0xFFC02000,
|
||||||
IRQ_UART1_RX,
|
IRQ_UART1_RX,
|
||||||
|
IRQ_UART1_ERROR,
|
||||||
#ifdef CONFIG_SERIAL_BFIN_DMA
|
#ifdef CONFIG_SERIAL_BFIN_DMA
|
||||||
CH_UART1_TX,
|
CH_UART1_TX,
|
||||||
CH_UART1_RX,
|
CH_UART1_RX,
|
||||||
|
|||||||
@@ -53,9 +53,9 @@
|
|||||||
#define UART_SET_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) | DLAB); SSYNC(); } while (0)
|
#define UART_SET_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) | DLAB); SSYNC(); } while (0)
|
||||||
#define UART_CLEAR_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) & ~DLAB); SSYNC(); } while (0)
|
#define UART_CLEAR_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) & ~DLAB); SSYNC(); } while (0)
|
||||||
|
|
||||||
#define UART_GET_CTS(x) gpio_get_value(x->cts_pin)
|
#define UART_GET_CTS(x) (!gpio_get_value(x->cts_pin))
|
||||||
#define UART_SET_RTS(x) gpio_set_value(x->rts_pin, 1)
|
#define UART_DISABLE_RTS(x) gpio_set_value(x->rts_pin, 1)
|
||||||
#define UART_CLEAR_RTS(x) gpio_set_value(x->rts_pin, 0)
|
#define UART_ENABLE_RTS(x) gpio_set_value(x->rts_pin, 0)
|
||||||
#define UART_ENABLE_INTS(x, v) UART_PUT_IER(x, v)
|
#define UART_ENABLE_INTS(x, v) UART_PUT_IER(x, v)
|
||||||
#define UART_DISABLE_INTS(x) UART_PUT_IER(x, 0)
|
#define UART_DISABLE_INTS(x) UART_PUT_IER(x, 0)
|
||||||
|
|
||||||
@@ -87,6 +87,7 @@
|
|||||||
struct bfin_serial_port {
|
struct bfin_serial_port {
|
||||||
struct uart_port port;
|
struct uart_port port;
|
||||||
unsigned int old_status;
|
unsigned int old_status;
|
||||||
|
int status_irq;
|
||||||
unsigned int lsr;
|
unsigned int lsr;
|
||||||
#ifdef CONFIG_SERIAL_BFIN_DMA
|
#ifdef CONFIG_SERIAL_BFIN_DMA
|
||||||
int tx_done;
|
int tx_done;
|
||||||
@@ -125,6 +126,7 @@ static inline void UART_CLEAR_LSR(struct bfin_serial_port *uart)
|
|||||||
struct bfin_serial_res {
|
struct bfin_serial_res {
|
||||||
unsigned long uart_base_addr;
|
unsigned long uart_base_addr;
|
||||||
int uart_irq;
|
int uart_irq;
|
||||||
|
int uart_status_irq;
|
||||||
#ifdef CONFIG_SERIAL_BFIN_DMA
|
#ifdef CONFIG_SERIAL_BFIN_DMA
|
||||||
unsigned int uart_tx_dma_channel;
|
unsigned int uart_tx_dma_channel;
|
||||||
unsigned int uart_rx_dma_channel;
|
unsigned int uart_rx_dma_channel;
|
||||||
@@ -140,6 +142,7 @@ struct bfin_serial_res bfin_serial_resource[] = {
|
|||||||
{
|
{
|
||||||
0xFFC00400,
|
0xFFC00400,
|
||||||
IRQ_UART0_RX,
|
IRQ_UART0_RX,
|
||||||
|
IRQ_UART0_ERROR,
|
||||||
#ifdef CONFIG_SERIAL_BFIN_DMA
|
#ifdef CONFIG_SERIAL_BFIN_DMA
|
||||||
CH_UART0_TX,
|
CH_UART0_TX,
|
||||||
CH_UART0_RX,
|
CH_UART0_RX,
|
||||||
@@ -154,6 +157,7 @@ struct bfin_serial_res bfin_serial_resource[] = {
|
|||||||
{
|
{
|
||||||
0xFFC02000,
|
0xFFC02000,
|
||||||
IRQ_UART1_RX,
|
IRQ_UART1_RX,
|
||||||
|
IRQ_UART1_ERROR,
|
||||||
#ifdef CONFIG_SERIAL_BFIN_DMA
|
#ifdef CONFIG_SERIAL_BFIN_DMA
|
||||||
CH_UART1_TX,
|
CH_UART1_TX,
|
||||||
CH_UART1_RX,
|
CH_UART1_RX,
|
||||||
@@ -167,29 +171,3 @@ struct bfin_serial_res bfin_serial_resource[] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
#define DRIVER_NAME "bfin-uart"
|
#define DRIVER_NAME "bfin-uart"
|
||||||
|
|
||||||
static void bfin_serial_hw_init(struct bfin_serial_port *uart)
|
|
||||||
{
|
|
||||||
|
|
||||||
#ifdef CONFIG_SERIAL_BFIN_UART0
|
|
||||||
peripheral_request(P_UART0_TX, DRIVER_NAME);
|
|
||||||
peripheral_request(P_UART0_RX, DRIVER_NAME);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef CONFIG_SERIAL_BFIN_UART1
|
|
||||||
peripheral_request(P_UART1_TX, DRIVER_NAME);
|
|
||||||
peripheral_request(P_UART1_RX, DRIVER_NAME);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef CONFIG_SERIAL_BFIN_CTSRTS
|
|
||||||
if (uart->cts_pin >= 0) {
|
|
||||||
gpio_request(uart->cts_pin, DRIVER_NAME);
|
|
||||||
gpio_direction_input(uart->cts_pin);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (uart->rts_pin >= 0) {
|
|
||||||
gpio_request(uart->rts_pin, DRIVER_NAME);
|
|
||||||
gpio_direction_output(uart->rts_pin, 0);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -53,9 +53,9 @@
|
|||||||
#define UART_SET_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) | DLAB); SSYNC(); } while (0)
|
#define UART_SET_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) | DLAB); SSYNC(); } while (0)
|
||||||
#define UART_CLEAR_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) & ~DLAB); SSYNC(); } while (0)
|
#define UART_CLEAR_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) & ~DLAB); SSYNC(); } while (0)
|
||||||
|
|
||||||
#define UART_GET_CTS(x) gpio_get_value(x->cts_pin)
|
#define UART_GET_CTS(x) (!gpio_get_value(x->cts_pin))
|
||||||
#define UART_SET_RTS(x) gpio_set_value(x->rts_pin, 1)
|
#define UART_DISABLE_RTS(x) gpio_set_value(x->rts_pin, 1)
|
||||||
#define UART_CLEAR_RTS(x) gpio_set_value(x->rts_pin, 0)
|
#define UART_ENABLE_RTS(x) gpio_set_value(x->rts_pin, 0)
|
||||||
#define UART_ENABLE_INTS(x, v) UART_PUT_IER(x, v)
|
#define UART_ENABLE_INTS(x, v) UART_PUT_IER(x, v)
|
||||||
#define UART_DISABLE_INTS(x) UART_PUT_IER(x, 0)
|
#define UART_DISABLE_INTS(x) UART_PUT_IER(x, 0)
|
||||||
|
|
||||||
@@ -74,6 +74,7 @@
|
|||||||
struct bfin_serial_port {
|
struct bfin_serial_port {
|
||||||
struct uart_port port;
|
struct uart_port port;
|
||||||
unsigned int old_status;
|
unsigned int old_status;
|
||||||
|
int status_irq;
|
||||||
unsigned int lsr;
|
unsigned int lsr;
|
||||||
#ifdef CONFIG_SERIAL_BFIN_DMA
|
#ifdef CONFIG_SERIAL_BFIN_DMA
|
||||||
int tx_done;
|
int tx_done;
|
||||||
@@ -116,6 +117,7 @@ static inline void UART_CLEAR_LSR(struct bfin_serial_port *uart)
|
|||||||
struct bfin_serial_res {
|
struct bfin_serial_res {
|
||||||
unsigned long uart_base_addr;
|
unsigned long uart_base_addr;
|
||||||
int uart_irq;
|
int uart_irq;
|
||||||
|
int uart_status_irq;
|
||||||
#ifdef CONFIG_SERIAL_BFIN_DMA
|
#ifdef CONFIG_SERIAL_BFIN_DMA
|
||||||
unsigned int uart_tx_dma_channel;
|
unsigned int uart_tx_dma_channel;
|
||||||
unsigned int uart_rx_dma_channel;
|
unsigned int uart_rx_dma_channel;
|
||||||
@@ -130,6 +132,7 @@ struct bfin_serial_res bfin_serial_resource[] = {
|
|||||||
{
|
{
|
||||||
0xFFC00400,
|
0xFFC00400,
|
||||||
IRQ_UART_RX,
|
IRQ_UART_RX,
|
||||||
|
IRQ_UART_ERROR,
|
||||||
#ifdef CONFIG_SERIAL_BFIN_DMA
|
#ifdef CONFIG_SERIAL_BFIN_DMA
|
||||||
CH_UART_TX,
|
CH_UART_TX,
|
||||||
CH_UART_RX,
|
CH_UART_RX,
|
||||||
@@ -142,23 +145,3 @@ struct bfin_serial_res bfin_serial_resource[] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
#define DRIVER_NAME "bfin-uart"
|
#define DRIVER_NAME "bfin-uart"
|
||||||
|
|
||||||
static void bfin_serial_hw_init(struct bfin_serial_port *uart)
|
|
||||||
{
|
|
||||||
|
|
||||||
#ifdef CONFIG_SERIAL_BFIN_UART0
|
|
||||||
peripheral_request(P_UART0_TX, DRIVER_NAME);
|
|
||||||
peripheral_request(P_UART0_RX, DRIVER_NAME);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef CONFIG_SERIAL_BFIN_CTSRTS
|
|
||||||
if (uart->cts_pin >= 0) {
|
|
||||||
gpio_request(uart->cts_pin, DRIVER_NAME);
|
|
||||||
gpio_direction_input(uart->cts_pin);
|
|
||||||
}
|
|
||||||
if (uart->rts_pin >= 0) {
|
|
||||||
gpio_request(uart->rts_pin, DRIVER_NAME);
|
|
||||||
gpio_direction_output(uart->rts_pin, 0);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -53,9 +53,9 @@
|
|||||||
#define UART_SET_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) | DLAB); SSYNC(); } while (0)
|
#define UART_SET_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) | DLAB); SSYNC(); } while (0)
|
||||||
#define UART_CLEAR_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) & ~DLAB); SSYNC(); } while (0)
|
#define UART_CLEAR_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) & ~DLAB); SSYNC(); } while (0)
|
||||||
|
|
||||||
#define UART_GET_CTS(x) gpio_get_value(x->cts_pin)
|
#define UART_GET_CTS(x) (!gpio_get_value(x->cts_pin))
|
||||||
#define UART_SET_RTS(x) gpio_set_value(x->rts_pin, 1)
|
#define UART_DISABLE_RTS(x) gpio_set_value(x->rts_pin, 1)
|
||||||
#define UART_CLEAR_RTS(x) gpio_set_value(x->rts_pin, 0)
|
#define UART_ENABLE_RTS(x) gpio_set_value(x->rts_pin, 0)
|
||||||
#define UART_ENABLE_INTS(x, v) UART_PUT_IER(x, v)
|
#define UART_ENABLE_INTS(x, v) UART_PUT_IER(x, v)
|
||||||
#define UART_DISABLE_INTS(x) UART_PUT_IER(x, 0)
|
#define UART_DISABLE_INTS(x) UART_PUT_IER(x, 0)
|
||||||
|
|
||||||
@@ -87,6 +87,7 @@
|
|||||||
struct bfin_serial_port {
|
struct bfin_serial_port {
|
||||||
struct uart_port port;
|
struct uart_port port;
|
||||||
unsigned int old_status;
|
unsigned int old_status;
|
||||||
|
int status_irq;
|
||||||
unsigned int lsr;
|
unsigned int lsr;
|
||||||
#ifdef CONFIG_SERIAL_BFIN_DMA
|
#ifdef CONFIG_SERIAL_BFIN_DMA
|
||||||
int tx_done;
|
int tx_done;
|
||||||
@@ -99,7 +100,6 @@ struct bfin_serial_port {
|
|||||||
struct work_struct tx_dma_workqueue;
|
struct work_struct tx_dma_workqueue;
|
||||||
#endif
|
#endif
|
||||||
#ifdef CONFIG_SERIAL_BFIN_CTSRTS
|
#ifdef CONFIG_SERIAL_BFIN_CTSRTS
|
||||||
struct timer_list cts_timer;
|
|
||||||
int cts_pin;
|
int cts_pin;
|
||||||
int rts_pin;
|
int rts_pin;
|
||||||
#endif
|
#endif
|
||||||
@@ -125,6 +125,7 @@ static inline void UART_CLEAR_LSR(struct bfin_serial_port *uart)
|
|||||||
struct bfin_serial_res {
|
struct bfin_serial_res {
|
||||||
unsigned long uart_base_addr;
|
unsigned long uart_base_addr;
|
||||||
int uart_irq;
|
int uart_irq;
|
||||||
|
int uart_status_irq;
|
||||||
#ifdef CONFIG_SERIAL_BFIN_DMA
|
#ifdef CONFIG_SERIAL_BFIN_DMA
|
||||||
unsigned int uart_tx_dma_channel;
|
unsigned int uart_tx_dma_channel;
|
||||||
unsigned int uart_rx_dma_channel;
|
unsigned int uart_rx_dma_channel;
|
||||||
@@ -140,6 +141,7 @@ struct bfin_serial_res bfin_serial_resource[] = {
|
|||||||
{
|
{
|
||||||
0xFFC00400,
|
0xFFC00400,
|
||||||
IRQ_UART0_RX,
|
IRQ_UART0_RX,
|
||||||
|
IRQ_UART0_ERROR,
|
||||||
#ifdef CONFIG_SERIAL_BFIN_DMA
|
#ifdef CONFIG_SERIAL_BFIN_DMA
|
||||||
CH_UART0_TX,
|
CH_UART0_TX,
|
||||||
CH_UART0_RX,
|
CH_UART0_RX,
|
||||||
@@ -154,6 +156,7 @@ struct bfin_serial_res bfin_serial_resource[] = {
|
|||||||
{
|
{
|
||||||
0xFFC02000,
|
0xFFC02000,
|
||||||
IRQ_UART1_RX,
|
IRQ_UART1_RX,
|
||||||
|
IRQ_UART1_ERROR,
|
||||||
#ifdef CONFIG_SERIAL_BFIN_DMA
|
#ifdef CONFIG_SERIAL_BFIN_DMA
|
||||||
CH_UART1_TX,
|
CH_UART1_TX,
|
||||||
CH_UART1_RX,
|
CH_UART1_RX,
|
||||||
@@ -167,29 +170,3 @@ struct bfin_serial_res bfin_serial_resource[] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
#define DRIVER_NAME "bfin-uart"
|
#define DRIVER_NAME "bfin-uart"
|
||||||
|
|
||||||
static void bfin_serial_hw_init(struct bfin_serial_port *uart)
|
|
||||||
{
|
|
||||||
|
|
||||||
#ifdef CONFIG_SERIAL_BFIN_UART0
|
|
||||||
peripheral_request(P_UART0_TX, DRIVER_NAME);
|
|
||||||
peripheral_request(P_UART0_RX, DRIVER_NAME);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef CONFIG_SERIAL_BFIN_UART1
|
|
||||||
peripheral_request(P_UART1_TX, DRIVER_NAME);
|
|
||||||
peripheral_request(P_UART1_RX, DRIVER_NAME);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef CONFIG_SERIAL_BFIN_CTSRTS
|
|
||||||
if (uart->cts_pin >= 0) {
|
|
||||||
gpio_request(uart->cts_pin, DRIVER_NAME);
|
|
||||||
gpio_direction_input(uart->cts_pin);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (uart->rts_pin >= 0) {
|
|
||||||
gpio_request(uart->rts_pin, DRIVER_NAME);
|
|
||||||
gpio_direction_output(uart->rts_pin, 0);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -53,9 +53,9 @@
|
|||||||
#define UART_SET_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) | DLAB); SSYNC(); } while (0)
|
#define UART_SET_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) | DLAB); SSYNC(); } while (0)
|
||||||
#define UART_CLEAR_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) & ~DLAB); SSYNC(); } while (0)
|
#define UART_CLEAR_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) & ~DLAB); SSYNC(); } while (0)
|
||||||
|
|
||||||
#define UART_GET_CTS(x) gpio_get_value(x->cts_pin)
|
#define UART_GET_CTS(x) (!gpio_get_value(x->cts_pin))
|
||||||
#define UART_SET_RTS(x) gpio_set_value(x->rts_pin, 1)
|
#define UART_DISABLE_RTS(x) gpio_set_value(x->rts_pin, 1)
|
||||||
#define UART_CLEAR_RTS(x) gpio_set_value(x->rts_pin, 0)
|
#define UART_ENABLE_RTS(x) gpio_set_value(x->rts_pin, 0)
|
||||||
#define UART_ENABLE_INTS(x, v) UART_PUT_IER(x, v)
|
#define UART_ENABLE_INTS(x, v) UART_PUT_IER(x, v)
|
||||||
#define UART_DISABLE_INTS(x) UART_PUT_IER(x, 0)
|
#define UART_DISABLE_INTS(x) UART_PUT_IER(x, 0)
|
||||||
|
|
||||||
@@ -87,6 +87,7 @@
|
|||||||
struct bfin_serial_port {
|
struct bfin_serial_port {
|
||||||
struct uart_port port;
|
struct uart_port port;
|
||||||
unsigned int old_status;
|
unsigned int old_status;
|
||||||
|
int status_irq;
|
||||||
unsigned int lsr;
|
unsigned int lsr;
|
||||||
#ifdef CONFIG_SERIAL_BFIN_DMA
|
#ifdef CONFIG_SERIAL_BFIN_DMA
|
||||||
int tx_done;
|
int tx_done;
|
||||||
@@ -125,6 +126,7 @@ static inline void UART_CLEAR_LSR(struct bfin_serial_port *uart)
|
|||||||
struct bfin_serial_res {
|
struct bfin_serial_res {
|
||||||
unsigned long uart_base_addr;
|
unsigned long uart_base_addr;
|
||||||
int uart_irq;
|
int uart_irq;
|
||||||
|
int uart_status_irq;
|
||||||
#ifdef CONFIG_SERIAL_BFIN_DMA
|
#ifdef CONFIG_SERIAL_BFIN_DMA
|
||||||
unsigned int uart_tx_dma_channel;
|
unsigned int uart_tx_dma_channel;
|
||||||
unsigned int uart_rx_dma_channel;
|
unsigned int uart_rx_dma_channel;
|
||||||
@@ -140,6 +142,7 @@ struct bfin_serial_res bfin_serial_resource[] = {
|
|||||||
{
|
{
|
||||||
0xFFC00400,
|
0xFFC00400,
|
||||||
IRQ_UART0_RX,
|
IRQ_UART0_RX,
|
||||||
|
IRQ_UART0_ERROR,
|
||||||
#ifdef CONFIG_SERIAL_BFIN_DMA
|
#ifdef CONFIG_SERIAL_BFIN_DMA
|
||||||
CH_UART0_TX,
|
CH_UART0_TX,
|
||||||
CH_UART0_RX,
|
CH_UART0_RX,
|
||||||
@@ -154,6 +157,7 @@ struct bfin_serial_res bfin_serial_resource[] = {
|
|||||||
{
|
{
|
||||||
0xFFC02000,
|
0xFFC02000,
|
||||||
IRQ_UART1_RX,
|
IRQ_UART1_RX,
|
||||||
|
IRQ_UART1_ERROR,
|
||||||
#ifdef CONFIG_SERIAL_BFIN_DMA
|
#ifdef CONFIG_SERIAL_BFIN_DMA
|
||||||
CH_UART1_TX,
|
CH_UART1_TX,
|
||||||
CH_UART1_RX,
|
CH_UART1_RX,
|
||||||
|
|||||||
@@ -46,41 +46,27 @@
|
|||||||
#define UART_PUT_CHAR(uart,v) bfin_write16(((uart)->port.membase + OFFSET_THR),v)
|
#define UART_PUT_CHAR(uart,v) bfin_write16(((uart)->port.membase + OFFSET_THR),v)
|
||||||
#define UART_PUT_DLL(uart,v) bfin_write16(((uart)->port.membase + OFFSET_DLL),v)
|
#define UART_PUT_DLL(uart,v) bfin_write16(((uart)->port.membase + OFFSET_DLL),v)
|
||||||
#define UART_SET_IER(uart,v) bfin_write16(((uart)->port.membase + OFFSET_IER_SET),v)
|
#define UART_SET_IER(uart,v) bfin_write16(((uart)->port.membase + OFFSET_IER_SET),v)
|
||||||
#define UART_CLEAR_IER(uart,v) bfin_write16(((uart)->port.membase + OFFSET_IER_CLEAR),v)
|
#define UART_CLEAR_IER(uart,v) bfin_write16(((uart)->port.membase + OFFSET_IER_CLEAR),v)
|
||||||
#define UART_PUT_DLH(uart,v) bfin_write16(((uart)->port.membase + OFFSET_DLH),v)
|
#define UART_PUT_DLH(uart,v) bfin_write16(((uart)->port.membase + OFFSET_DLH),v)
|
||||||
#define UART_PUT_LSR(uart,v) bfin_write16(((uart)->port.membase + OFFSET_LSR),v)
|
#define UART_PUT_LSR(uart,v) bfin_write16(((uart)->port.membase + OFFSET_LSR),v)
|
||||||
#define UART_PUT_LCR(uart,v) bfin_write16(((uart)->port.membase + OFFSET_LCR),v)
|
#define UART_PUT_LCR(uart,v) bfin_write16(((uart)->port.membase + OFFSET_LCR),v)
|
||||||
#define UART_CLEAR_LSR(uart) bfin_write16(((uart)->port.membase + OFFSET_LSR), -1)
|
#define UART_CLEAR_LSR(uart) bfin_write16(((uart)->port.membase + OFFSET_LSR), -1)
|
||||||
#define UART_PUT_GCTL(uart,v) bfin_write16(((uart)->port.membase + OFFSET_GCTL),v)
|
#define UART_PUT_GCTL(uart,v) bfin_write16(((uart)->port.membase + OFFSET_GCTL),v)
|
||||||
#define UART_PUT_MCR(uart,v) bfin_write16(((uart)->port.membase + OFFSET_MCR),v)
|
#define UART_PUT_MCR(uart,v) bfin_write16(((uart)->port.membase + OFFSET_MCR),v)
|
||||||
|
#define UART_CLEAR_SCTS(uart) bfin_write16(((uart)->port.membase + OFFSET_MSR),SCTS)
|
||||||
|
|
||||||
#define UART_SET_DLAB(uart) /* MMRs not muxed on BF54x */
|
#define UART_SET_DLAB(uart) /* MMRs not muxed on BF54x */
|
||||||
#define UART_CLEAR_DLAB(uart) /* MMRs not muxed on BF54x */
|
#define UART_CLEAR_DLAB(uart) /* MMRs not muxed on BF54x */
|
||||||
|
|
||||||
#define UART_GET_CTS(x) (UART_GET_MSR(x) & CTS)
|
#define UART_GET_CTS(x) (UART_GET_MSR(x) & CTS)
|
||||||
#define UART_SET_RTS(x) (UART_PUT_MCR(x, UART_GET_MCR(x) | MRTS))
|
#define UART_DISABLE_RTS(x) UART_PUT_MCR(x, UART_GET_MCR(x) & ~(ARTS|MRTS))
|
||||||
#define UART_CLEAR_RTS(x) (UART_PUT_MCR(x, UART_GET_MCR(x) & ~MRTS))
|
#define UART_ENABLE_RTS(x) UART_PUT_MCR(x, UART_GET_MCR(x) | MRTS | ARTS)
|
||||||
#define UART_ENABLE_INTS(x, v) UART_SET_IER(x, v)
|
#define UART_ENABLE_INTS(x, v) UART_SET_IER(x, v)
|
||||||
#define UART_DISABLE_INTS(x) UART_CLEAR_IER(x, 0xF)
|
#define UART_DISABLE_INTS(x) UART_CLEAR_IER(x, 0xF)
|
||||||
|
|
||||||
#if defined(CONFIG_BFIN_UART0_CTSRTS) || defined(CONFIG_BFIN_UART2_CTSRTS)
|
#if defined(CONFIG_BFIN_UART0_CTSRTS) || defined(CONFIG_BFIN_UART1_CTSRTS) || \
|
||||||
# define CONFIG_SERIAL_BFIN_CTSRTS
|
defined(CONFIG_BFIN_UART2_CTSRTS) || defined(CONFIG_BFIN_UART3_CTSRTS)
|
||||||
|
# define CONFIG_SERIAL_BFIN_HARD_CTSRTS
|
||||||
# ifndef CONFIG_UART0_CTS_PIN
|
|
||||||
# define CONFIG_UART0_CTS_PIN -1
|
|
||||||
# endif
|
|
||||||
|
|
||||||
# ifndef CONFIG_UART0_RTS_PIN
|
|
||||||
# define CONFIG_UART0_RTS_PIN -1
|
|
||||||
# endif
|
|
||||||
|
|
||||||
# ifndef CONFIG_UART2_CTS_PIN
|
|
||||||
# define CONFIG_UART2_CTS_PIN -1
|
|
||||||
# endif
|
|
||||||
|
|
||||||
# ifndef CONFIG_UART2_RTS_PIN
|
|
||||||
# define CONFIG_UART2_RTS_PIN -1
|
|
||||||
# endif
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define BFIN_UART_TX_FIFO_SIZE 2
|
#define BFIN_UART_TX_FIFO_SIZE 2
|
||||||
@@ -91,6 +77,7 @@
|
|||||||
struct bfin_serial_port {
|
struct bfin_serial_port {
|
||||||
struct uart_port port;
|
struct uart_port port;
|
||||||
unsigned int old_status;
|
unsigned int old_status;
|
||||||
|
int status_irq;
|
||||||
#ifdef CONFIG_SERIAL_BFIN_DMA
|
#ifdef CONFIG_SERIAL_BFIN_DMA
|
||||||
int tx_done;
|
int tx_done;
|
||||||
int tx_count;
|
int tx_count;
|
||||||
@@ -101,23 +88,24 @@ struct bfin_serial_port {
|
|||||||
unsigned int rx_dma_channel;
|
unsigned int rx_dma_channel;
|
||||||
struct work_struct tx_dma_workqueue;
|
struct work_struct tx_dma_workqueue;
|
||||||
#endif
|
#endif
|
||||||
#ifdef CONFIG_SERIAL_BFIN_CTSRTS
|
#ifdef CONFIG_SERIAL_BFIN_HARD_CTSRTS
|
||||||
struct timer_list cts_timer;
|
int scts;
|
||||||
int cts_pin;
|
int cts_pin;
|
||||||
int rts_pin;
|
int rts_pin;
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
struct bfin_serial_res {
|
struct bfin_serial_res {
|
||||||
unsigned long uart_base_addr;
|
unsigned long uart_base_addr;
|
||||||
int uart_irq;
|
int uart_irq;
|
||||||
|
int uart_status_irq;
|
||||||
#ifdef CONFIG_SERIAL_BFIN_DMA
|
#ifdef CONFIG_SERIAL_BFIN_DMA
|
||||||
unsigned int uart_tx_dma_channel;
|
unsigned int uart_tx_dma_channel;
|
||||||
unsigned int uart_rx_dma_channel;
|
unsigned int uart_rx_dma_channel;
|
||||||
#endif
|
#endif
|
||||||
#ifdef CONFIG_SERIAL_BFIN_CTSRTS
|
#ifdef CONFIG_SERIAL_BFIN_HARD_CTSRTS
|
||||||
int uart_cts_pin;
|
int uart_cts_pin;
|
||||||
int uart_rts_pin;
|
int uart_rts_pin;
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -126,13 +114,14 @@ struct bfin_serial_res bfin_serial_resource[] = {
|
|||||||
{
|
{
|
||||||
0xFFC00400,
|
0xFFC00400,
|
||||||
IRQ_UART0_RX,
|
IRQ_UART0_RX,
|
||||||
|
IRQ_UART0_ERROR,
|
||||||
#ifdef CONFIG_SERIAL_BFIN_DMA
|
#ifdef CONFIG_SERIAL_BFIN_DMA
|
||||||
CH_UART0_TX,
|
CH_UART0_TX,
|
||||||
CH_UART0_RX,
|
CH_UART0_RX,
|
||||||
#endif
|
#endif
|
||||||
#ifdef CONFIG_SERIAL_BFIN_CTSRTS
|
#ifdef CONFIG_SERIAL_BFIN_HARD_CTSRTS
|
||||||
CONFIG_UART0_CTS_PIN,
|
0,
|
||||||
CONFIG_UART0_RTS_PIN,
|
0,
|
||||||
#endif
|
#endif
|
||||||
},
|
},
|
||||||
#endif
|
#endif
|
||||||
@@ -140,13 +129,14 @@ struct bfin_serial_res bfin_serial_resource[] = {
|
|||||||
{
|
{
|
||||||
0xFFC02000,
|
0xFFC02000,
|
||||||
IRQ_UART1_RX,
|
IRQ_UART1_RX,
|
||||||
|
IRQ_UART1_ERROR,
|
||||||
#ifdef CONFIG_SERIAL_BFIN_DMA
|
#ifdef CONFIG_SERIAL_BFIN_DMA
|
||||||
CH_UART1_TX,
|
CH_UART1_TX,
|
||||||
CH_UART1_RX,
|
CH_UART1_RX,
|
||||||
#endif
|
#endif
|
||||||
#ifdef CONFIG_SERIAL_BFIN_CTSRTS
|
#ifdef CONFIG_SERIAL_BFIN_HARD_CTSRTS
|
||||||
0,
|
GPIO_PE10,
|
||||||
0,
|
GPIO_PE9,
|
||||||
#endif
|
#endif
|
||||||
},
|
},
|
||||||
#endif
|
#endif
|
||||||
@@ -154,13 +144,14 @@ struct bfin_serial_res bfin_serial_resource[] = {
|
|||||||
{
|
{
|
||||||
0xFFC02100,
|
0xFFC02100,
|
||||||
IRQ_UART2_RX,
|
IRQ_UART2_RX,
|
||||||
|
IRQ_UART2_ERROR,
|
||||||
#ifdef CONFIG_SERIAL_BFIN_DMA
|
#ifdef CONFIG_SERIAL_BFIN_DMA
|
||||||
CH_UART2_TX,
|
CH_UART2_TX,
|
||||||
CH_UART2_RX,
|
CH_UART2_RX,
|
||||||
#endif
|
#endif
|
||||||
#ifdef CONFIG_SERIAL_BFIN_CTSRTS
|
#ifdef CONFIG_SERIAL_BFIN_HARD_CTSRTS
|
||||||
CONFIG_UART2_CTS_PIN,
|
0,
|
||||||
CONFIG_UART2_RTS_PIN,
|
0,
|
||||||
#endif
|
#endif
|
||||||
},
|
},
|
||||||
#endif
|
#endif
|
||||||
@@ -168,61 +159,17 @@ struct bfin_serial_res bfin_serial_resource[] = {
|
|||||||
{
|
{
|
||||||
0xFFC03100,
|
0xFFC03100,
|
||||||
IRQ_UART3_RX,
|
IRQ_UART3_RX,
|
||||||
|
IRQ_UART3_ERROR,
|
||||||
#ifdef CONFIG_SERIAL_BFIN_DMA
|
#ifdef CONFIG_SERIAL_BFIN_DMA
|
||||||
CH_UART3_TX,
|
CH_UART3_TX,
|
||||||
CH_UART3_RX,
|
CH_UART3_RX,
|
||||||
#endif
|
#endif
|
||||||
#ifdef CONFIG_SERIAL_BFIN_CTSRTS
|
#ifdef CONFIG_SERIAL_BFIN_HARD_CTSRTS
|
||||||
0,
|
GPIO_PB3,
|
||||||
0,
|
GPIO_PB2,
|
||||||
#endif
|
#endif
|
||||||
},
|
},
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
#define DRIVER_NAME "bfin-uart"
|
#define DRIVER_NAME "bfin-uart"
|
||||||
|
|
||||||
static void bfin_serial_hw_init(struct bfin_serial_port *uart)
|
|
||||||
{
|
|
||||||
#ifdef CONFIG_SERIAL_BFIN_UART0
|
|
||||||
peripheral_request(P_UART0_TX, DRIVER_NAME);
|
|
||||||
peripheral_request(P_UART0_RX, DRIVER_NAME);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef CONFIG_SERIAL_BFIN_UART1
|
|
||||||
peripheral_request(P_UART1_TX, DRIVER_NAME);
|
|
||||||
peripheral_request(P_UART1_RX, DRIVER_NAME);
|
|
||||||
|
|
||||||
#ifdef CONFIG_BFIN_UART1_CTSRTS
|
|
||||||
peripheral_request(P_UART1_RTS, DRIVER_NAME);
|
|
||||||
peripheral_request(P_UART1_CTS, DRIVER_NAME);
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef CONFIG_SERIAL_BFIN_UART2
|
|
||||||
peripheral_request(P_UART2_TX, DRIVER_NAME);
|
|
||||||
peripheral_request(P_UART2_RX, DRIVER_NAME);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef CONFIG_SERIAL_BFIN_UART3
|
|
||||||
peripheral_request(P_UART3_TX, DRIVER_NAME);
|
|
||||||
peripheral_request(P_UART3_RX, DRIVER_NAME);
|
|
||||||
|
|
||||||
#ifdef CONFIG_BFIN_UART3_CTSRTS
|
|
||||||
peripheral_request(P_UART3_RTS, DRIVER_NAME);
|
|
||||||
peripheral_request(P_UART3_CTS, DRIVER_NAME);
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
SSYNC();
|
|
||||||
#ifdef CONFIG_SERIAL_BFIN_CTSRTS
|
|
||||||
if (uart->cts_pin >= 0) {
|
|
||||||
gpio_request(uart->cts_pin, DRIVER_NAME);
|
|
||||||
gpio_direction_input(uart->cts_pin);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (uart->rts_pin >= 0) {
|
|
||||||
gpio_request(uart->rts_pin, DRIVER_NAME);
|
|
||||||
gpio_direction_output(uart->rts_pin, 0);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -53,9 +53,9 @@
|
|||||||
#define UART_SET_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) | DLAB); SSYNC(); } while (0)
|
#define UART_SET_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) | DLAB); SSYNC(); } while (0)
|
||||||
#define UART_CLEAR_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) & ~DLAB); SSYNC(); } while (0)
|
#define UART_CLEAR_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) & ~DLAB); SSYNC(); } while (0)
|
||||||
|
|
||||||
#define UART_GET_CTS(x) gpio_get_value(x->cts_pin)
|
#define UART_GET_CTS(x) (!gpio_get_value(x->cts_pin))
|
||||||
#define UART_SET_RTS(x) gpio_set_value(x->rts_pin, 1)
|
#define UART_DISABLE_RTS(x) gpio_set_value(x->rts_pin, 1)
|
||||||
#define UART_CLEAR_RTS(x) gpio_set_value(x->rts_pin, 0)
|
#define UART_ENABLE_RTS(x) gpio_set_value(x->rts_pin, 0)
|
||||||
#define UART_ENABLE_INTS(x, v) UART_PUT_IER(x, v)
|
#define UART_ENABLE_INTS(x, v) UART_PUT_IER(x, v)
|
||||||
#define UART_DISABLE_INTS(x) UART_PUT_IER(x, 0)
|
#define UART_DISABLE_INTS(x) UART_PUT_IER(x, 0)
|
||||||
|
|
||||||
@@ -74,6 +74,7 @@
|
|||||||
struct bfin_serial_port {
|
struct bfin_serial_port {
|
||||||
struct uart_port port;
|
struct uart_port port;
|
||||||
unsigned int old_status;
|
unsigned int old_status;
|
||||||
|
int status_irq;
|
||||||
unsigned int lsr;
|
unsigned int lsr;
|
||||||
#ifdef CONFIG_SERIAL_BFIN_DMA
|
#ifdef CONFIG_SERIAL_BFIN_DMA
|
||||||
int tx_done;
|
int tx_done;
|
||||||
@@ -116,6 +117,7 @@ static inline void UART_CLEAR_LSR(struct bfin_serial_port *uart)
|
|||||||
struct bfin_serial_res {
|
struct bfin_serial_res {
|
||||||
unsigned long uart_base_addr;
|
unsigned long uart_base_addr;
|
||||||
int uart_irq;
|
int uart_irq;
|
||||||
|
int uart_status_irq;
|
||||||
#ifdef CONFIG_SERIAL_BFIN_DMA
|
#ifdef CONFIG_SERIAL_BFIN_DMA
|
||||||
unsigned int uart_tx_dma_channel;
|
unsigned int uart_tx_dma_channel;
|
||||||
unsigned int uart_rx_dma_channel;
|
unsigned int uart_rx_dma_channel;
|
||||||
@@ -130,6 +132,7 @@ struct bfin_serial_res bfin_serial_resource[] = {
|
|||||||
{
|
{
|
||||||
0xFFC00400,
|
0xFFC00400,
|
||||||
IRQ_UART_RX,
|
IRQ_UART_RX,
|
||||||
|
IRQ_UART_ERROR,
|
||||||
#ifdef CONFIG_SERIAL_BFIN_DMA
|
#ifdef CONFIG_SERIAL_BFIN_DMA
|
||||||
CH_UART_TX,
|
CH_UART_TX,
|
||||||
CH_UART_RX,
|
CH_UART_RX,
|
||||||
@@ -142,23 +145,3 @@ struct bfin_serial_res bfin_serial_resource[] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
#define DRIVER_NAME "bfin-uart"
|
#define DRIVER_NAME "bfin-uart"
|
||||||
|
|
||||||
static void bfin_serial_hw_init(struct bfin_serial_port *uart)
|
|
||||||
{
|
|
||||||
|
|
||||||
#ifdef CONFIG_SERIAL_BFIN_UART0
|
|
||||||
peripheral_request(P_UART0_TX, DRIVER_NAME);
|
|
||||||
peripheral_request(P_UART0_RX, DRIVER_NAME);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef CONFIG_SERIAL_BFIN_CTSRTS
|
|
||||||
if (uart->cts_pin >= 0) {
|
|
||||||
gpio_request(uart->cts_pin, DRIVER_NAME);
|
|
||||||
gpio_direction_input(uart->cts_pin);
|
|
||||||
}
|
|
||||||
if (uart->rts_pin >= 0) {
|
|
||||||
gpio_request(uart->rts_pin, DRIVER_NAME);
|
|
||||||
gpio_direction_output(uart->rts_pin, 0);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -74,8 +74,9 @@
|
|||||||
#define TIOCSHAYESESP 0x545F /* Set Hayes ESP configuration */
|
#define TIOCSHAYESESP 0x545F /* Set Hayes ESP configuration */
|
||||||
#define FIOQSIZE 0x5460
|
#define FIOQSIZE 0x5460
|
||||||
|
|
||||||
#define TIOCSERSETRS485 0x5461 /* enable rs-485 */
|
#define TIOCSERSETRS485 0x5461 /* enable rs-485 (deprecated) */
|
||||||
#define TIOCSERWRRS485 0x5462 /* write rs-485 */
|
#define TIOCSERWRRS485 0x5462 /* write rs-485 */
|
||||||
|
#define TIOCSRS485 0x5463 /* enable rs-485 */
|
||||||
|
|
||||||
/* Used for packet mode */
|
/* Used for packet mode */
|
||||||
#define TIOCPKT_DATA 0
|
#define TIOCPKT_DATA 0
|
||||||
|
|||||||
@@ -1,15 +1,13 @@
|
|||||||
/* RS-485 structures */
|
/* RS-485 structures */
|
||||||
|
|
||||||
/* RS-485 support */
|
/* Used with ioctl() TIOCSERSETRS485 for backward compatibility!
|
||||||
/* Used with ioctl() TIOCSERSETRS485 */
|
* XXX: Do not use it for new code!
|
||||||
|
*/
|
||||||
struct rs485_control {
|
struct rs485_control {
|
||||||
unsigned short rts_on_send;
|
unsigned short rts_on_send;
|
||||||
unsigned short rts_after_sent;
|
unsigned short rts_after_sent;
|
||||||
unsigned long delay_rts_before_send;
|
unsigned long delay_rts_before_send;
|
||||||
unsigned short enabled;
|
unsigned short enabled;
|
||||||
#ifdef __KERNEL__
|
|
||||||
int disable_serial_loopback;
|
|
||||||
#endif
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Used with ioctl() TIOCSERWRRS485 */
|
/* Used with ioctl() TIOCSERWRRS485 */
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
#include <asm/termbits.h>
|
#include <asm/termbits.h>
|
||||||
#include <asm/ioctls.h>
|
#include <asm/ioctls.h>
|
||||||
#include <asm/rs485.h>
|
#include <asm/rs485.h>
|
||||||
|
#include <linux/serial.h>
|
||||||
|
|
||||||
struct winsize {
|
struct winsize {
|
||||||
unsigned short ws_row;
|
unsigned short ws_row;
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ int force_iommu __read_mostly;
|
|||||||
to i386. */
|
to i386. */
|
||||||
struct device fallback_dev = {
|
struct device fallback_dev = {
|
||||||
.init_name = "fallback device",
|
.init_name = "fallback device",
|
||||||
.coherent_dma_mask = DMA_32BIT_MASK,
|
.coherent_dma_mask = DMA_BIT_MASK(32),
|
||||||
.dma_mask = &fallback_dev.coherent_dma_mask,
|
.dma_mask = &fallback_dev.coherent_dma_mask,
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -75,7 +75,7 @@ int iommu_dma_supported(struct device *dev, u64 mask)
|
|||||||
/* Copied from i386. Doesn't make much sense, because it will
|
/* Copied from i386. Doesn't make much sense, because it will
|
||||||
only work for pci_alloc_coherent.
|
only work for pci_alloc_coherent.
|
||||||
The caller just has to use GFP_DMA in this case. */
|
The caller just has to use GFP_DMA in this case. */
|
||||||
if (mask < DMA_24BIT_MASK)
|
if (mask < DMA_BIT_MASK(24))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
/* Tell the device to use SAC when IOMMU force is on. This
|
/* Tell the device to use SAC when IOMMU force is on. This
|
||||||
@@ -90,7 +90,7 @@ int iommu_dma_supported(struct device *dev, u64 mask)
|
|||||||
SAC for these. Assume all masks <= 40 bits are of this
|
SAC for these. Assume all masks <= 40 bits are of this
|
||||||
type. Normally this doesn't make any difference, but gives
|
type. Normally this doesn't make any difference, but gives
|
||||||
more gentle handling of IOMMU overflow. */
|
more gentle handling of IOMMU overflow. */
|
||||||
if (iommu_sac_force && (mask >= DMA_40BIT_MASK)) {
|
if (iommu_sac_force && (mask >= DMA_BIT_MASK(40))) {
|
||||||
dev_info(dev, "Force SAC with mask %lx\n", mask);
|
dev_info(dev, "Force SAC with mask %lx\n", mask);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -349,7 +349,7 @@ static int sn_dma_mapping_error(struct device *dev, dma_addr_t dma_addr)
|
|||||||
|
|
||||||
u64 sn_dma_get_required_mask(struct device *dev)
|
u64 sn_dma_get_required_mask(struct device *dev)
|
||||||
{
|
{
|
||||||
return DMA_64BIT_MASK;
|
return DMA_BIT_MASK(64);
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL_GPL(sn_dma_get_required_mask);
|
EXPORT_SYMBOL_GPL(sn_dma_get_required_mask);
|
||||||
|
|
||||||
|
|||||||
@@ -80,14 +80,14 @@ static struct resource au1xxx_usb_ohci_resources[] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
/* The dmamask must be set for OHCI to work */
|
/* The dmamask must be set for OHCI to work */
|
||||||
static u64 ohci_dmamask = DMA_32BIT_MASK;
|
static u64 ohci_dmamask = DMA_BIT_MASK(32);
|
||||||
|
|
||||||
static struct platform_device au1xxx_usb_ohci_device = {
|
static struct platform_device au1xxx_usb_ohci_device = {
|
||||||
.name = "au1xxx-ohci",
|
.name = "au1xxx-ohci",
|
||||||
.id = 0,
|
.id = 0,
|
||||||
.dev = {
|
.dev = {
|
||||||
.dma_mask = &ohci_dmamask,
|
.dma_mask = &ohci_dmamask,
|
||||||
.coherent_dma_mask = DMA_32BIT_MASK,
|
.coherent_dma_mask = DMA_BIT_MASK(32),
|
||||||
},
|
},
|
||||||
.num_resources = ARRAY_SIZE(au1xxx_usb_ohci_resources),
|
.num_resources = ARRAY_SIZE(au1xxx_usb_ohci_resources),
|
||||||
.resource = au1xxx_usb_ohci_resources,
|
.resource = au1xxx_usb_ohci_resources,
|
||||||
@@ -109,14 +109,14 @@ static struct resource au1100_lcd_resources[] = {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
static u64 au1100_lcd_dmamask = DMA_32BIT_MASK;
|
static u64 au1100_lcd_dmamask = DMA_BIT_MASK(32);
|
||||||
|
|
||||||
static struct platform_device au1100_lcd_device = {
|
static struct platform_device au1100_lcd_device = {
|
||||||
.name = "au1100-lcd",
|
.name = "au1100-lcd",
|
||||||
.id = 0,
|
.id = 0,
|
||||||
.dev = {
|
.dev = {
|
||||||
.dma_mask = &au1100_lcd_dmamask,
|
.dma_mask = &au1100_lcd_dmamask,
|
||||||
.coherent_dma_mask = DMA_32BIT_MASK,
|
.coherent_dma_mask = DMA_BIT_MASK(32),
|
||||||
},
|
},
|
||||||
.num_resources = ARRAY_SIZE(au1100_lcd_resources),
|
.num_resources = ARRAY_SIZE(au1100_lcd_resources),
|
||||||
.resource = au1100_lcd_resources,
|
.resource = au1100_lcd_resources,
|
||||||
@@ -138,14 +138,14 @@ static struct resource au1xxx_usb_ehci_resources[] = {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
static u64 ehci_dmamask = DMA_32BIT_MASK;
|
static u64 ehci_dmamask = DMA_BIT_MASK(32);
|
||||||
|
|
||||||
static struct platform_device au1xxx_usb_ehci_device = {
|
static struct platform_device au1xxx_usb_ehci_device = {
|
||||||
.name = "au1xxx-ehci",
|
.name = "au1xxx-ehci",
|
||||||
.id = 0,
|
.id = 0,
|
||||||
.dev = {
|
.dev = {
|
||||||
.dma_mask = &ehci_dmamask,
|
.dma_mask = &ehci_dmamask,
|
||||||
.coherent_dma_mask = DMA_32BIT_MASK,
|
.coherent_dma_mask = DMA_BIT_MASK(32),
|
||||||
},
|
},
|
||||||
.num_resources = ARRAY_SIZE(au1xxx_usb_ehci_resources),
|
.num_resources = ARRAY_SIZE(au1xxx_usb_ehci_resources),
|
||||||
.resource = au1xxx_usb_ehci_resources,
|
.resource = au1xxx_usb_ehci_resources,
|
||||||
@@ -165,14 +165,14 @@ static struct resource au1xxx_usb_gdt_resources[] = {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
static u64 udc_dmamask = DMA_32BIT_MASK;
|
static u64 udc_dmamask = DMA_BIT_MASK(32);
|
||||||
|
|
||||||
static struct platform_device au1xxx_usb_gdt_device = {
|
static struct platform_device au1xxx_usb_gdt_device = {
|
||||||
.name = "au1xxx-udc",
|
.name = "au1xxx-udc",
|
||||||
.id = 0,
|
.id = 0,
|
||||||
.dev = {
|
.dev = {
|
||||||
.dma_mask = &udc_dmamask,
|
.dma_mask = &udc_dmamask,
|
||||||
.coherent_dma_mask = DMA_32BIT_MASK,
|
.coherent_dma_mask = DMA_BIT_MASK(32),
|
||||||
},
|
},
|
||||||
.num_resources = ARRAY_SIZE(au1xxx_usb_gdt_resources),
|
.num_resources = ARRAY_SIZE(au1xxx_usb_gdt_resources),
|
||||||
.resource = au1xxx_usb_gdt_resources,
|
.resource = au1xxx_usb_gdt_resources,
|
||||||
@@ -192,14 +192,14 @@ static struct resource au1xxx_usb_otg_resources[] = {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
static u64 uoc_dmamask = DMA_32BIT_MASK;
|
static u64 uoc_dmamask = DMA_BIT_MASK(32);
|
||||||
|
|
||||||
static struct platform_device au1xxx_usb_otg_device = {
|
static struct platform_device au1xxx_usb_otg_device = {
|
||||||
.name = "au1xxx-uoc",
|
.name = "au1xxx-uoc",
|
||||||
.id = 0,
|
.id = 0,
|
||||||
.dev = {
|
.dev = {
|
||||||
.dma_mask = &uoc_dmamask,
|
.dma_mask = &uoc_dmamask,
|
||||||
.coherent_dma_mask = DMA_32BIT_MASK,
|
.coherent_dma_mask = DMA_BIT_MASK(32),
|
||||||
},
|
},
|
||||||
.num_resources = ARRAY_SIZE(au1xxx_usb_otg_resources),
|
.num_resources = ARRAY_SIZE(au1xxx_usb_otg_resources),
|
||||||
.resource = au1xxx_usb_otg_resources,
|
.resource = au1xxx_usb_otg_resources,
|
||||||
@@ -218,20 +218,20 @@ static struct resource au1200_lcd_resources[] = {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
static u64 au1200_lcd_dmamask = DMA_32BIT_MASK;
|
static u64 au1200_lcd_dmamask = DMA_BIT_MASK(32);
|
||||||
|
|
||||||
static struct platform_device au1200_lcd_device = {
|
static struct platform_device au1200_lcd_device = {
|
||||||
.name = "au1200-lcd",
|
.name = "au1200-lcd",
|
||||||
.id = 0,
|
.id = 0,
|
||||||
.dev = {
|
.dev = {
|
||||||
.dma_mask = &au1200_lcd_dmamask,
|
.dma_mask = &au1200_lcd_dmamask,
|
||||||
.coherent_dma_mask = DMA_32BIT_MASK,
|
.coherent_dma_mask = DMA_BIT_MASK(32),
|
||||||
},
|
},
|
||||||
.num_resources = ARRAY_SIZE(au1200_lcd_resources),
|
.num_resources = ARRAY_SIZE(au1200_lcd_resources),
|
||||||
.resource = au1200_lcd_resources,
|
.resource = au1200_lcd_resources,
|
||||||
};
|
};
|
||||||
|
|
||||||
static u64 au1xxx_mmc_dmamask = DMA_32BIT_MASK;
|
static u64 au1xxx_mmc_dmamask = DMA_BIT_MASK(32);
|
||||||
|
|
||||||
extern struct au1xmmc_platform_data au1xmmc_platdata[2];
|
extern struct au1xmmc_platform_data au1xmmc_platdata[2];
|
||||||
|
|
||||||
@@ -263,7 +263,7 @@ static struct platform_device au1200_mmc0_device = {
|
|||||||
.id = 0,
|
.id = 0,
|
||||||
.dev = {
|
.dev = {
|
||||||
.dma_mask = &au1xxx_mmc_dmamask,
|
.dma_mask = &au1xxx_mmc_dmamask,
|
||||||
.coherent_dma_mask = DMA_32BIT_MASK,
|
.coherent_dma_mask = DMA_BIT_MASK(32),
|
||||||
.platform_data = &au1xmmc_platdata[0],
|
.platform_data = &au1xmmc_platdata[0],
|
||||||
},
|
},
|
||||||
.num_resources = ARRAY_SIZE(au1200_mmc0_resources),
|
.num_resources = ARRAY_SIZE(au1200_mmc0_resources),
|
||||||
@@ -299,7 +299,7 @@ static struct platform_device au1200_mmc1_device = {
|
|||||||
.id = 1,
|
.id = 1,
|
||||||
.dev = {
|
.dev = {
|
||||||
.dma_mask = &au1xxx_mmc_dmamask,
|
.dma_mask = &au1xxx_mmc_dmamask,
|
||||||
.coherent_dma_mask = DMA_32BIT_MASK,
|
.coherent_dma_mask = DMA_BIT_MASK(32),
|
||||||
.platform_data = &au1xmmc_platdata[1],
|
.platform_data = &au1xmmc_platdata[1],
|
||||||
},
|
},
|
||||||
.num_resources = ARRAY_SIZE(au1200_mmc1_resources),
|
.num_resources = ARRAY_SIZE(au1200_mmc1_resources),
|
||||||
|
|||||||
@@ -119,14 +119,14 @@ static struct resource ide_resources[] = {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
static u64 ide_dmamask = DMA_32BIT_MASK;
|
static u64 ide_dmamask = DMA_BIT_MASK(32);
|
||||||
|
|
||||||
static struct platform_device ide_device = {
|
static struct platform_device ide_device = {
|
||||||
.name = "au1200-ide",
|
.name = "au1200-ide",
|
||||||
.id = 0,
|
.id = 0,
|
||||||
.dev = {
|
.dev = {
|
||||||
.dma_mask = &ide_dmamask,
|
.dma_mask = &ide_dmamask,
|
||||||
.coherent_dma_mask = DMA_32BIT_MASK,
|
.coherent_dma_mask = DMA_BIT_MASK(32),
|
||||||
},
|
},
|
||||||
.num_resources = ARRAY_SIZE(ide_resources),
|
.num_resources = ARRAY_SIZE(ide_resources),
|
||||||
.resource = ide_resources
|
.resource = ide_resources
|
||||||
|
|||||||
@@ -42,7 +42,7 @@
|
|||||||
#include <irq-mapping.h>
|
#include <irq-mapping.h>
|
||||||
#include <pnx833x.h>
|
#include <pnx833x.h>
|
||||||
|
|
||||||
static u64 uart_dmamask = DMA_32BIT_MASK;
|
static u64 uart_dmamask = DMA_BIT_MASK(32);
|
||||||
|
|
||||||
static struct resource pnx833x_uart_resources[] = {
|
static struct resource pnx833x_uart_resources[] = {
|
||||||
[0] = {
|
[0] = {
|
||||||
@@ -101,14 +101,14 @@ static struct platform_device pnx833x_uart_device = {
|
|||||||
.id = -1,
|
.id = -1,
|
||||||
.dev = {
|
.dev = {
|
||||||
.dma_mask = &uart_dmamask,
|
.dma_mask = &uart_dmamask,
|
||||||
.coherent_dma_mask = DMA_32BIT_MASK,
|
.coherent_dma_mask = DMA_BIT_MASK(32),
|
||||||
.platform_data = pnx8xxx_ports,
|
.platform_data = pnx8xxx_ports,
|
||||||
},
|
},
|
||||||
.num_resources = ARRAY_SIZE(pnx833x_uart_resources),
|
.num_resources = ARRAY_SIZE(pnx833x_uart_resources),
|
||||||
.resource = pnx833x_uart_resources,
|
.resource = pnx833x_uart_resources,
|
||||||
};
|
};
|
||||||
|
|
||||||
static u64 ehci_dmamask = DMA_32BIT_MASK;
|
static u64 ehci_dmamask = DMA_BIT_MASK(32);
|
||||||
|
|
||||||
static struct resource pnx833x_usb_ehci_resources[] = {
|
static struct resource pnx833x_usb_ehci_resources[] = {
|
||||||
[0] = {
|
[0] = {
|
||||||
@@ -128,7 +128,7 @@ static struct platform_device pnx833x_usb_ehci_device = {
|
|||||||
.id = -1,
|
.id = -1,
|
||||||
.dev = {
|
.dev = {
|
||||||
.dma_mask = &ehci_dmamask,
|
.dma_mask = &ehci_dmamask,
|
||||||
.coherent_dma_mask = DMA_32BIT_MASK,
|
.coherent_dma_mask = DMA_BIT_MASK(32),
|
||||||
},
|
},
|
||||||
.num_resources = ARRAY_SIZE(pnx833x_usb_ehci_resources),
|
.num_resources = ARRAY_SIZE(pnx833x_usb_ehci_resources),
|
||||||
.resource = pnx833x_usb_ehci_resources,
|
.resource = pnx833x_usb_ehci_resources,
|
||||||
@@ -198,7 +198,7 @@ static struct platform_device pnx833x_i2c1_device = {
|
|||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static u64 ethernet_dmamask = DMA_32BIT_MASK;
|
static u64 ethernet_dmamask = DMA_BIT_MASK(32);
|
||||||
|
|
||||||
static struct resource pnx833x_ethernet_resources[] = {
|
static struct resource pnx833x_ethernet_resources[] = {
|
||||||
[0] = {
|
[0] = {
|
||||||
@@ -218,7 +218,7 @@ static struct platform_device pnx833x_ethernet_device = {
|
|||||||
.id = -1,
|
.id = -1,
|
||||||
.dev = {
|
.dev = {
|
||||||
.dma_mask = ðernet_dmamask,
|
.dma_mask = ðernet_dmamask,
|
||||||
.coherent_dma_mask = DMA_32BIT_MASK,
|
.coherent_dma_mask = DMA_BIT_MASK(32),
|
||||||
},
|
},
|
||||||
.num_resources = ARRAY_SIZE(pnx833x_ethernet_resources),
|
.num_resources = ARRAY_SIZE(pnx833x_ethernet_resources),
|
||||||
.resource = pnx833x_ethernet_resources,
|
.resource = pnx833x_ethernet_resources,
|
||||||
|
|||||||
@@ -92,16 +92,16 @@ struct pnx8xxx_port pnx8xxx_ports[] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
/* The dmamask must be set for OHCI to work */
|
/* The dmamask must be set for OHCI to work */
|
||||||
static u64 ohci_dmamask = DMA_32BIT_MASK;
|
static u64 ohci_dmamask = DMA_BIT_MASK(32);
|
||||||
|
|
||||||
static u64 uart_dmamask = DMA_32BIT_MASK;
|
static u64 uart_dmamask = DMA_BIT_MASK(32);
|
||||||
|
|
||||||
static struct platform_device pnx8550_usb_ohci_device = {
|
static struct platform_device pnx8550_usb_ohci_device = {
|
||||||
.name = "pnx8550-ohci",
|
.name = "pnx8550-ohci",
|
||||||
.id = -1,
|
.id = -1,
|
||||||
.dev = {
|
.dev = {
|
||||||
.dma_mask = &ohci_dmamask,
|
.dma_mask = &ohci_dmamask,
|
||||||
.coherent_dma_mask = DMA_32BIT_MASK,
|
.coherent_dma_mask = DMA_BIT_MASK(32),
|
||||||
},
|
},
|
||||||
.num_resources = ARRAY_SIZE(pnx8550_usb_ohci_resources),
|
.num_resources = ARRAY_SIZE(pnx8550_usb_ohci_resources),
|
||||||
.resource = pnx8550_usb_ohci_resources,
|
.resource = pnx8550_usb_ohci_resources,
|
||||||
@@ -112,7 +112,7 @@ static struct platform_device pnx8550_uart_device = {
|
|||||||
.id = -1,
|
.id = -1,
|
||||||
.dev = {
|
.dev = {
|
||||||
.dma_mask = &uart_dmamask,
|
.dma_mask = &uart_dmamask,
|
||||||
.coherent_dma_mask = DMA_32BIT_MASK,
|
.coherent_dma_mask = DMA_BIT_MASK(32),
|
||||||
.platform_data = pnx8xxx_ports,
|
.platform_data = pnx8xxx_ports,
|
||||||
},
|
},
|
||||||
.num_resources = ARRAY_SIZE(pnx8550_uart_resources),
|
.num_resources = ARRAY_SIZE(pnx8550_uart_resources),
|
||||||
|
|||||||
@@ -49,14 +49,14 @@ static struct resource msp_usbhost_resources [] = {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
static u64 msp_usbhost_dma_mask = DMA_32BIT_MASK;
|
static u64 msp_usbhost_dma_mask = DMA_BIT_MASK(32);
|
||||||
|
|
||||||
static struct platform_device msp_usbhost_device = {
|
static struct platform_device msp_usbhost_device = {
|
||||||
.name = "pmcmsp-ehci",
|
.name = "pmcmsp-ehci",
|
||||||
.id = 0,
|
.id = 0,
|
||||||
.dev = {
|
.dev = {
|
||||||
.dma_mask = &msp_usbhost_dma_mask,
|
.dma_mask = &msp_usbhost_dma_mask,
|
||||||
.coherent_dma_mask = DMA_32BIT_MASK,
|
.coherent_dma_mask = DMA_BIT_MASK(32),
|
||||||
},
|
},
|
||||||
.num_resources = ARRAY_SIZE(msp_usbhost_resources),
|
.num_resources = ARRAY_SIZE(msp_usbhost_resources),
|
||||||
.resource = msp_usbhost_resources,
|
.resource = msp_usbhost_resources,
|
||||||
@@ -77,14 +77,14 @@ static struct resource msp_usbdev_resources [] = {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
static u64 msp_usbdev_dma_mask = DMA_32BIT_MASK;
|
static u64 msp_usbdev_dma_mask = DMA_BIT_MASK(32);
|
||||||
|
|
||||||
static struct platform_device msp_usbdev_device = {
|
static struct platform_device msp_usbdev_device = {
|
||||||
.name = "msp71xx_udc",
|
.name = "msp71xx_udc",
|
||||||
.id = 0,
|
.id = 0,
|
||||||
.dev = {
|
.dev = {
|
||||||
.dma_mask = &msp_usbdev_dma_mask,
|
.dma_mask = &msp_usbdev_dma_mask,
|
||||||
.coherent_dma_mask = DMA_32BIT_MASK,
|
.coherent_dma_mask = DMA_BIT_MASK(32),
|
||||||
},
|
},
|
||||||
.num_resources = ARRAY_SIZE(msp_usbdev_resources),
|
.num_resources = ARRAY_SIZE(msp_usbdev_resources),
|
||||||
.resource = msp_usbdev_resources,
|
.resource = msp_usbdev_resources,
|
||||||
|
|||||||
@@ -316,7 +316,7 @@ config ARCH_ENABLE_MEMORY_HOTREMOVE
|
|||||||
|
|
||||||
config KEXEC
|
config KEXEC
|
||||||
bool "kexec system call (EXPERIMENTAL)"
|
bool "kexec system call (EXPERIMENTAL)"
|
||||||
depends on BOOK3S && EXPERIMENTAL
|
depends on PPC_BOOK3S && EXPERIMENTAL
|
||||||
help
|
help
|
||||||
kexec is a system call that implements the ability to shutdown your
|
kexec is a system call that implements the ability to shutdown your
|
||||||
current kernel, and to start another kernel. It is like a reboot
|
current kernel, and to start another kernel. It is like a reboot
|
||||||
@@ -775,6 +775,7 @@ config LOWMEM_CAM_NUM_BOOL
|
|||||||
Say N here unless you know what you are doing.
|
Say N here unless you know what you are doing.
|
||||||
|
|
||||||
config LOWMEM_CAM_NUM
|
config LOWMEM_CAM_NUM
|
||||||
|
depends on FSL_BOOKE
|
||||||
int "Number of CAMs to use to map low memory" if LOWMEM_CAM_NUM_BOOL
|
int "Number of CAMs to use to map low memory" if LOWMEM_CAM_NUM_BOOL
|
||||||
default 3
|
default 3
|
||||||
|
|
||||||
|
|||||||
@@ -57,14 +57,14 @@
|
|||||||
bus-frequency = <0>; /* Fixed by bootwrapper */
|
bus-frequency = <0>; /* Fixed by bootwrapper */
|
||||||
|
|
||||||
memory-controller@2000 {
|
memory-controller@2000 {
|
||||||
compatible = "fsl,8540-memory-controller";
|
compatible = "fsl,mpc8540-memory-controller";
|
||||||
reg = <0x2000 0x1000>;
|
reg = <0x2000 0x1000>;
|
||||||
interrupt-parent = <&mpic>;
|
interrupt-parent = <&mpic>;
|
||||||
interrupts = <0x12 0x2>;
|
interrupts = <0x12 0x2>;
|
||||||
};
|
};
|
||||||
|
|
||||||
L2: l2-cache-controller@20000 {
|
L2: l2-cache-controller@20000 {
|
||||||
compatible = "fsl,8540-l2-cache-controller";
|
compatible = "fsl,mpc8540-l2-cache-controller";
|
||||||
reg = <0x20000 0x1000>;
|
reg = <0x20000 0x1000>;
|
||||||
cache-line-size = <0x20>; /* 32 bytes */
|
cache-line-size = <0x20>; /* 32 bytes */
|
||||||
cache-size = <0x40000>; /* L2, 256K */
|
cache-size = <0x40000>; /* L2, 256K */
|
||||||
|
|||||||
@@ -17,6 +17,14 @@
|
|||||||
#address-cells = <1>;
|
#address-cells = <1>;
|
||||||
#size-cells = <1>;
|
#size-cells = <1>;
|
||||||
|
|
||||||
|
aliases {
|
||||||
|
ethernet0 = &enet0;
|
||||||
|
ethernet1 = &enet1;
|
||||||
|
serial0 = &serial0;
|
||||||
|
serial1 = &serial1;
|
||||||
|
pci0 = &pci0;
|
||||||
|
};
|
||||||
|
|
||||||
cpus {
|
cpus {
|
||||||
#address-cells = <1>;
|
#address-cells = <1>;
|
||||||
#size-cells = <0>;
|
#size-cells = <0>;
|
||||||
@@ -45,7 +53,7 @@
|
|||||||
#size-cells = <1>;
|
#size-cells = <1>;
|
||||||
reg = <0xf0010100 0x60>;
|
reg = <0xf0010100 0x60>;
|
||||||
|
|
||||||
ranges = <0x0 0x0 0xfe000000 0x800000
|
ranges = <0x0 0x0 0xff800000 0x800000
|
||||||
0x1 0x0 0xf4500000 0x8000
|
0x1 0x0 0xf4500000 0x8000
|
||||||
0x8 0x0 0xf8200000 0x8000>;
|
0x8 0x0 0xf8200000 0x8000>;
|
||||||
|
|
||||||
@@ -71,7 +79,7 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
pci@f0010800 {
|
pci0: pci@f0010800 {
|
||||||
device_type = "pci";
|
device_type = "pci";
|
||||||
reg = <0xf0010800 0x10c 0xf00101ac 0x8 0xf00101c4 0x8>;
|
reg = <0xf0010800 0x10c 0xf00101ac 0x8 0xf00101c4 0x8>;
|
||||||
compatible = "fsl,mpc8280-pci", "fsl,pq2-pci";
|
compatible = "fsl,mpc8280-pci", "fsl,pq2-pci";
|
||||||
@@ -142,7 +150,7 @@
|
|||||||
reg = <0x119f0 0x10 0x115f0 0x10>;
|
reg = <0x119f0 0x10 0x115f0 0x10>;
|
||||||
};
|
};
|
||||||
|
|
||||||
serial@11a00 {
|
serial0: serial@11a00 {
|
||||||
device_type = "serial";
|
device_type = "serial";
|
||||||
compatible = "fsl,mpc8280-scc-uart",
|
compatible = "fsl,mpc8280-scc-uart",
|
||||||
"fsl,cpm2-scc-uart";
|
"fsl,cpm2-scc-uart";
|
||||||
@@ -153,7 +161,7 @@
|
|||||||
fsl,cpm-command = <0x800000>;
|
fsl,cpm-command = <0x800000>;
|
||||||
};
|
};
|
||||||
|
|
||||||
serial@11a20 {
|
serial1: serial@11a20 {
|
||||||
device_type = "serial";
|
device_type = "serial";
|
||||||
compatible = "fsl,mpc8280-scc-uart",
|
compatible = "fsl,mpc8280-scc-uart",
|
||||||
"fsl,cpm2-scc-uart";
|
"fsl,cpm2-scc-uart";
|
||||||
@@ -164,7 +172,7 @@
|
|||||||
fsl,cpm-command = <0x4a00000>;
|
fsl,cpm-command = <0x4a00000>;
|
||||||
};
|
};
|
||||||
|
|
||||||
ethernet@11320 {
|
enet0: ethernet@11320 {
|
||||||
device_type = "network";
|
device_type = "network";
|
||||||
compatible = "fsl,mpc8280-fcc-enet",
|
compatible = "fsl,mpc8280-fcc-enet",
|
||||||
"fsl,cpm2-fcc-enet";
|
"fsl,cpm2-fcc-enet";
|
||||||
@@ -176,7 +184,7 @@
|
|||||||
fsl,cpm-command = <0x16200300>;
|
fsl,cpm-command = <0x16200300>;
|
||||||
};
|
};
|
||||||
|
|
||||||
ethernet@11340 {
|
enet1: ethernet@11340 {
|
||||||
device_type = "network";
|
device_type = "network";
|
||||||
compatible = "fsl,mpc8280-fcc-enet",
|
compatible = "fsl,mpc8280-fcc-enet",
|
||||||
"fsl,cpm2-fcc-enet";
|
"fsl,cpm2-fcc-enet";
|
||||||
|
|||||||
@@ -156,14 +156,14 @@
|
|||||||
compatible = "simple-bus";
|
compatible = "simple-bus";
|
||||||
|
|
||||||
memory-controller@2000 {
|
memory-controller@2000 {
|
||||||
compatible = "fsl,8548-memory-controller";
|
compatible = "fsl,mpc8548-memory-controller";
|
||||||
reg = <0x2000 0x1000>;
|
reg = <0x2000 0x1000>;
|
||||||
interrupt-parent = <&mpic>;
|
interrupt-parent = <&mpic>;
|
||||||
interrupts = <0x12 0x2>;
|
interrupts = <0x12 0x2>;
|
||||||
};
|
};
|
||||||
|
|
||||||
L2: l2-cache-controller@20000 {
|
L2: l2-cache-controller@20000 {
|
||||||
compatible = "fsl,8548-l2-cache-controller";
|
compatible = "fsl,mpc8548-l2-cache-controller";
|
||||||
reg = <0x20000 0x1000>;
|
reg = <0x20000 0x1000>;
|
||||||
cache-line-size = <0x20>; // 32 bytes
|
cache-line-size = <0x20>; // 32 bytes
|
||||||
cache-size = <0x80000>; // L2, 512K
|
cache-size = <0x80000>; // L2, 512K
|
||||||
|
|||||||
@@ -61,14 +61,14 @@
|
|||||||
clock-frequency = <0>;
|
clock-frequency = <0>;
|
||||||
|
|
||||||
memory-controller@2000 {
|
memory-controller@2000 {
|
||||||
compatible = "fsl,8560-memory-controller";
|
compatible = "fsl,mpc8560-memory-controller";
|
||||||
reg = <0x2000 0x1000>;
|
reg = <0x2000 0x1000>;
|
||||||
interrupt-parent = <&mpic>;
|
interrupt-parent = <&mpic>;
|
||||||
interrupts = <0x12 0x2>;
|
interrupts = <0x12 0x2>;
|
||||||
};
|
};
|
||||||
|
|
||||||
L2: l2-cache-controller@20000 {
|
L2: l2-cache-controller@20000 {
|
||||||
compatible = "fsl,8560-l2-cache-controller";
|
compatible = "fsl,mpc8560-l2-cache-controller";
|
||||||
reg = <0x20000 0x1000>;
|
reg = <0x20000 0x1000>;
|
||||||
cache-line-size = <0x20>; // 32 bytes
|
cache-line-size = <0x20>; // 32 bytes
|
||||||
cache-size = <0x40000>; // L2, 256K
|
cache-size = <0x40000>; // L2, 256K
|
||||||
|
|||||||
@@ -52,6 +52,7 @@
|
|||||||
soc8544@e0000000 {
|
soc8544@e0000000 {
|
||||||
#address-cells = <1>;
|
#address-cells = <1>;
|
||||||
#size-cells = <1>;
|
#size-cells = <1>;
|
||||||
|
device_type = "soc";
|
||||||
|
|
||||||
ranges = <0x00000000 0xe0000000 0x00100000>;
|
ranges = <0x00000000 0xe0000000 0x00100000>;
|
||||||
reg = <0xe0000000 0x00001000>; // CCSRBAR 1M
|
reg = <0xe0000000 0x00001000>; // CCSRBAR 1M
|
||||||
@@ -78,11 +79,11 @@
|
|||||||
#address-cells = <1>;
|
#address-cells = <1>;
|
||||||
#size-cells = <0>;
|
#size-cells = <0>;
|
||||||
cell-index = <0>;
|
cell-index = <0>;
|
||||||
compatible = "fsl-i2c";
|
compatible = "fsl,mpc8544-i2c", "fsl-i2c";
|
||||||
reg = <0x3000 0x100>;
|
reg = <0x3000 0x100>;
|
||||||
interrupts = <43 2>;
|
interrupts = <43 2>;
|
||||||
interrupt-parent = <&mpic>;
|
interrupt-parent = <&mpic>;
|
||||||
dfsrr;
|
fsl,preserve-clocking;
|
||||||
|
|
||||||
dtt@28 {
|
dtt@28 {
|
||||||
compatible = "winbond,w83782d";
|
compatible = "winbond,w83782d";
|
||||||
@@ -110,11 +111,11 @@
|
|||||||
#address-cells = <1>;
|
#address-cells = <1>;
|
||||||
#size-cells = <0>;
|
#size-cells = <0>;
|
||||||
cell-index = <1>;
|
cell-index = <1>;
|
||||||
compatible = "fsl-i2c";
|
compatible = "fsl,mpc8544-i2c", "fsl-i2c";
|
||||||
reg = <0x3100 0x100>;
|
reg = <0x3100 0x100>;
|
||||||
interrupts = <43 2>;
|
interrupts = <43 2>;
|
||||||
interrupt-parent = <&mpic>;
|
interrupt-parent = <&mpic>;
|
||||||
dfsrr;
|
fsl,preserve-clocking;
|
||||||
};
|
};
|
||||||
|
|
||||||
enet0: ethernet@24000 {
|
enet0: ethernet@24000 {
|
||||||
|
|||||||
@@ -57,14 +57,14 @@
|
|||||||
compatible = "fsl,mpc8560-immr", "simple-bus";
|
compatible = "fsl,mpc8560-immr", "simple-bus";
|
||||||
|
|
||||||
memory-controller@2000 {
|
memory-controller@2000 {
|
||||||
compatible = "fsl,8540-memory-controller";
|
compatible = "fsl,mpc8540-memory-controller";
|
||||||
reg = <0x2000 0x1000>;
|
reg = <0x2000 0x1000>;
|
||||||
interrupt-parent = <&mpic>;
|
interrupt-parent = <&mpic>;
|
||||||
interrupts = <18 2>;
|
interrupts = <18 2>;
|
||||||
};
|
};
|
||||||
|
|
||||||
L2: l2-cache-controller@20000 {
|
L2: l2-cache-controller@20000 {
|
||||||
compatible = "fsl,8540-l2-cache-controller";
|
compatible = "fsl,mpc8540-l2-cache-controller";
|
||||||
reg = <0x20000 0x1000>;
|
reg = <0x20000 0x1000>;
|
||||||
cache-line-size = <32>;
|
cache-line-size = <32>;
|
||||||
cache-size = <0x40000>; // L2, 256K
|
cache-size = <0x40000>; // L2, 256K
|
||||||
|
|||||||
@@ -59,14 +59,14 @@
|
|||||||
compatible = "fsl,mpc8540-immr", "simple-bus";
|
compatible = "fsl,mpc8540-immr", "simple-bus";
|
||||||
|
|
||||||
memory-controller@2000 {
|
memory-controller@2000 {
|
||||||
compatible = "fsl,8540-memory-controller";
|
compatible = "fsl,mpc8540-memory-controller";
|
||||||
reg = <0x2000 0x1000>;
|
reg = <0x2000 0x1000>;
|
||||||
interrupt-parent = <&mpic>;
|
interrupt-parent = <&mpic>;
|
||||||
interrupts = <18 2>;
|
interrupts = <18 2>;
|
||||||
};
|
};
|
||||||
|
|
||||||
L2: l2-cache-controller@20000 {
|
L2: l2-cache-controller@20000 {
|
||||||
compatible = "fsl,8540-l2-cache-controller";
|
compatible = "fsl,mpc8540-l2-cache-controller";
|
||||||
reg = <0x20000 0x1000>;
|
reg = <0x20000 0x1000>;
|
||||||
cache-line-size = <32>;
|
cache-line-size = <32>;
|
||||||
cache-size = <0x40000>; // L2, 256K
|
cache-size = <0x40000>; // L2, 256K
|
||||||
|
|||||||
@@ -58,14 +58,14 @@
|
|||||||
compatible = "fsl,mpc8541-immr", "simple-bus";
|
compatible = "fsl,mpc8541-immr", "simple-bus";
|
||||||
|
|
||||||
memory-controller@2000 {
|
memory-controller@2000 {
|
||||||
compatible = "fsl,8540-memory-controller";
|
compatible = "fsl,mpc8540-memory-controller";
|
||||||
reg = <0x2000 0x1000>;
|
reg = <0x2000 0x1000>;
|
||||||
interrupt-parent = <&mpic>;
|
interrupt-parent = <&mpic>;
|
||||||
interrupts = <18 2>;
|
interrupts = <18 2>;
|
||||||
};
|
};
|
||||||
|
|
||||||
L2: l2-cache-controller@20000 {
|
L2: l2-cache-controller@20000 {
|
||||||
compatible = "fsl,8540-l2-cache-controller";
|
compatible = "fsl,mpc8540-l2-cache-controller";
|
||||||
reg = <0x20000 0x1000>;
|
reg = <0x20000 0x1000>;
|
||||||
cache-line-size = <32>;
|
cache-line-size = <32>;
|
||||||
cache-size = <0x40000>; // L2, 256K
|
cache-size = <0x40000>; // L2, 256K
|
||||||
|
|||||||
@@ -58,14 +58,14 @@
|
|||||||
compatible = "fsl,mpc8555-immr", "simple-bus";
|
compatible = "fsl,mpc8555-immr", "simple-bus";
|
||||||
|
|
||||||
memory-controller@2000 {
|
memory-controller@2000 {
|
||||||
compatible = "fsl,8540-memory-controller";
|
compatible = "fsl,mpc8540-memory-controller";
|
||||||
reg = <0x2000 0x1000>;
|
reg = <0x2000 0x1000>;
|
||||||
interrupt-parent = <&mpic>;
|
interrupt-parent = <&mpic>;
|
||||||
interrupts = <18 2>;
|
interrupts = <18 2>;
|
||||||
};
|
};
|
||||||
|
|
||||||
L2: l2-cache-controller@20000 {
|
L2: l2-cache-controller@20000 {
|
||||||
compatible = "fsl,8540-l2-cache-controller";
|
compatible = "fsl,mpc8540-l2-cache-controller";
|
||||||
reg = <0x20000 0x1000>;
|
reg = <0x20000 0x1000>;
|
||||||
cache-line-size = <32>;
|
cache-line-size = <32>;
|
||||||
cache-size = <0x40000>; // L2, 256K
|
cache-size = <0x40000>; // L2, 256K
|
||||||
|
|||||||
@@ -60,14 +60,14 @@
|
|||||||
compatible = "fsl,mpc8560-immr", "simple-bus";
|
compatible = "fsl,mpc8560-immr", "simple-bus";
|
||||||
|
|
||||||
memory-controller@2000 {
|
memory-controller@2000 {
|
||||||
compatible = "fsl,8540-memory-controller";
|
compatible = "fsl,mpc8540-memory-controller";
|
||||||
reg = <0x2000 0x1000>;
|
reg = <0x2000 0x1000>;
|
||||||
interrupt-parent = <&mpic>;
|
interrupt-parent = <&mpic>;
|
||||||
interrupts = <18 2>;
|
interrupts = <18 2>;
|
||||||
};
|
};
|
||||||
|
|
||||||
L2: l2-cache-controller@20000 {
|
L2: l2-cache-controller@20000 {
|
||||||
compatible = "fsl,8540-l2-cache-controller";
|
compatible = "fsl,mpc8540-l2-cache-controller";
|
||||||
reg = <0x20000 0x1000>;
|
reg = <0x20000 0x1000>;
|
||||||
cache-line-size = <32>;
|
cache-line-size = <32>;
|
||||||
cache-size = <0x40000>; // L2, 256K
|
cache-size = <0x40000>; // L2, 256K
|
||||||
|
|||||||
@@ -95,7 +95,7 @@ CONFIG_CGROUP_CPUACCT=y
|
|||||||
CONFIG_SYSFS_DEPRECATED=y
|
CONFIG_SYSFS_DEPRECATED=y
|
||||||
CONFIG_SYSFS_DEPRECATED_V2=y
|
CONFIG_SYSFS_DEPRECATED_V2=y
|
||||||
CONFIG_PROC_PID_CPUSET=y
|
CONFIG_PROC_PID_CPUSET=y
|
||||||
# CONFIG_RELAY is not set
|
CONFIG_RELAY=y
|
||||||
CONFIG_NAMESPACES=y
|
CONFIG_NAMESPACES=y
|
||||||
# CONFIG_UTS_NS is not set
|
# CONFIG_UTS_NS is not set
|
||||||
# CONFIG_IPC_NS is not set
|
# CONFIG_IPC_NS is not set
|
||||||
|
|||||||
@@ -125,7 +125,7 @@ struct lppaca {
|
|||||||
// NOTE: This value will ALWAYS be zero for dedicated processors and
|
// NOTE: This value will ALWAYS be zero for dedicated processors and
|
||||||
// will NEVER be zero for shared processors (ie, initialized to a 1).
|
// will NEVER be zero for shared processors (ie, initialized to a 1).
|
||||||
volatile u32 yield_count; // PLIC increments each dispatchx00-x03
|
volatile u32 yield_count; // PLIC increments each dispatchx00-x03
|
||||||
u32 reserved6;
|
volatile u32 dispersion_count; // dispatch changed phys cpu x04-x07
|
||||||
volatile u64 cmo_faults; // CMO page fault count x08-x0F
|
volatile u64 cmo_faults; // CMO page fault count x08-x0F
|
||||||
volatile u64 cmo_fault_time; // CMO page fault time x10-x17
|
volatile u64 cmo_fault_time; // CMO page fault time x10-x17
|
||||||
u8 reserved7[104]; // Reserved x18-x7F
|
u8 reserved7[104]; // Reserved x18-x7F
|
||||||
|
|||||||
@@ -22,6 +22,14 @@
|
|||||||
#define MPIC_GREG_FEATURE_1 0x00010
|
#define MPIC_GREG_FEATURE_1 0x00010
|
||||||
#define MPIC_GREG_GLOBAL_CONF_0 0x00020
|
#define MPIC_GREG_GLOBAL_CONF_0 0x00020
|
||||||
#define MPIC_GREG_GCONF_RESET 0x80000000
|
#define MPIC_GREG_GCONF_RESET 0x80000000
|
||||||
|
/* On the FSL mpic implementations the Mode field is expand to be
|
||||||
|
* 2 bits wide:
|
||||||
|
* 0b00 = pass through (interrupts routed to IRQ0)
|
||||||
|
* 0b01 = Mixed mode
|
||||||
|
* 0b10 = reserved
|
||||||
|
* 0b11 = External proxy / coreint
|
||||||
|
*/
|
||||||
|
#define MPIC_GREG_GCONF_COREINT 0x60000000
|
||||||
#define MPIC_GREG_GCONF_8259_PTHROU_DIS 0x20000000
|
#define MPIC_GREG_GCONF_8259_PTHROU_DIS 0x20000000
|
||||||
#define MPIC_GREG_GCONF_NO_BIAS 0x10000000
|
#define MPIC_GREG_GCONF_NO_BIAS 0x10000000
|
||||||
#define MPIC_GREG_GCONF_BASE_MASK 0x000fffff
|
#define MPIC_GREG_GCONF_BASE_MASK 0x000fffff
|
||||||
@@ -357,6 +365,8 @@ struct mpic
|
|||||||
#define MPIC_BROKEN_FRR_NIRQS 0x00000800
|
#define MPIC_BROKEN_FRR_NIRQS 0x00000800
|
||||||
/* Destination only supports a single CPU at a time */
|
/* Destination only supports a single CPU at a time */
|
||||||
#define MPIC_SINGLE_DEST_CPU 0x00001000
|
#define MPIC_SINGLE_DEST_CPU 0x00001000
|
||||||
|
/* Enable CoreInt delivery of interrupts */
|
||||||
|
#define MPIC_ENABLE_COREINT 0x00002000
|
||||||
|
|
||||||
/* MPIC HW modification ID */
|
/* MPIC HW modification ID */
|
||||||
#define MPIC_REGSET_MASK 0xf0000000
|
#define MPIC_REGSET_MASK 0xf0000000
|
||||||
@@ -470,6 +480,8 @@ extern void mpic_end_irq(unsigned int irq);
|
|||||||
extern unsigned int mpic_get_one_irq(struct mpic *mpic);
|
extern unsigned int mpic_get_one_irq(struct mpic *mpic);
|
||||||
/* This one gets from the primary mpic */
|
/* This one gets from the primary mpic */
|
||||||
extern unsigned int mpic_get_irq(void);
|
extern unsigned int mpic_get_irq(void);
|
||||||
|
/* This one gets from the primary mpic via CoreInt*/
|
||||||
|
extern unsigned int mpic_get_coreint_irq(void);
|
||||||
/* Fetch Machine Check interrupt from primary mpic */
|
/* Fetch Machine Check interrupt from primary mpic */
|
||||||
extern unsigned int mpic_get_mcirq(void);
|
extern unsigned int mpic_get_mcirq(void);
|
||||||
|
|
||||||
|
|||||||
@@ -21,7 +21,6 @@
|
|||||||
|
|
||||||
#include <linux/types.h>
|
#include <linux/types.h>
|
||||||
#include <linux/ioctl.h>
|
#include <linux/ioctl.h>
|
||||||
#include <linux/types.h>
|
|
||||||
|
|
||||||
/* ioctl */
|
/* ioctl */
|
||||||
#define PS3FB_IOCTL_SETMODE _IOW('r', 1, int) /* set video mode */
|
#define PS3FB_IOCTL_SETMODE _IOW('r', 1, int) /* set video mode */
|
||||||
|
|||||||
@@ -151,9 +151,11 @@ extern unsigned long bad_call_to_PMD_PAGE_SIZE(void);
|
|||||||
_PAGE_NO_CACHE)
|
_PAGE_NO_CACHE)
|
||||||
#define PAGE_KERNEL_NCG __pgprot(_PAGE_BASE_NC | _PAGE_KERNEL_RW | \
|
#define PAGE_KERNEL_NCG __pgprot(_PAGE_BASE_NC | _PAGE_KERNEL_RW | \
|
||||||
_PAGE_NO_CACHE | _PAGE_GUARDED)
|
_PAGE_NO_CACHE | _PAGE_GUARDED)
|
||||||
#define PAGE_KERNEL_X __pgprot(_PAGE_BASE | _PAGE_KERNEL_RW | _PAGE_EXEC)
|
#define PAGE_KERNEL_X __pgprot(_PAGE_BASE | _PAGE_KERNEL_RW | _PAGE_EXEC | \
|
||||||
|
_PAGE_HWEXEC)
|
||||||
#define PAGE_KERNEL_RO __pgprot(_PAGE_BASE | _PAGE_KERNEL_RO)
|
#define PAGE_KERNEL_RO __pgprot(_PAGE_BASE | _PAGE_KERNEL_RO)
|
||||||
#define PAGE_KERNEL_ROX __pgprot(_PAGE_BASE | _PAGE_KERNEL_RO | _PAGE_EXEC)
|
#define PAGE_KERNEL_ROX __pgprot(_PAGE_BASE | _PAGE_KERNEL_RO | _PAGE_EXEC | \
|
||||||
|
_PAGE_HWEXEC)
|
||||||
|
|
||||||
/* Protection used for kernel text. We want the debuggers to be able to
|
/* Protection used for kernel text. We want the debuggers to be able to
|
||||||
* set breakpoints anywhere, so don't write protect the kernel text
|
* set breakpoints anywhere, so don't write protect the kernel text
|
||||||
|
|||||||
@@ -143,6 +143,36 @@
|
|||||||
#define FPSCR_NI 0x00000004 /* FPU non IEEE-Mode */
|
#define FPSCR_NI 0x00000004 /* FPU non IEEE-Mode */
|
||||||
#define FPSCR_RN 0x00000003 /* FPU rounding control */
|
#define FPSCR_RN 0x00000003 /* FPU rounding control */
|
||||||
|
|
||||||
|
/* Bit definitions for SPEFSCR. */
|
||||||
|
#define SPEFSCR_SOVH 0x80000000 /* Summary integer overflow high */
|
||||||
|
#define SPEFSCR_OVH 0x40000000 /* Integer overflow high */
|
||||||
|
#define SPEFSCR_FGH 0x20000000 /* Embedded FP guard bit high */
|
||||||
|
#define SPEFSCR_FXH 0x10000000 /* Embedded FP sticky bit high */
|
||||||
|
#define SPEFSCR_FINVH 0x08000000 /* Embedded FP invalid operation high */
|
||||||
|
#define SPEFSCR_FDBZH 0x04000000 /* Embedded FP div by zero high */
|
||||||
|
#define SPEFSCR_FUNFH 0x02000000 /* Embedded FP underflow high */
|
||||||
|
#define SPEFSCR_FOVFH 0x01000000 /* Embedded FP overflow high */
|
||||||
|
#define SPEFSCR_FINXS 0x00200000 /* Embedded FP inexact sticky */
|
||||||
|
#define SPEFSCR_FINVS 0x00100000 /* Embedded FP invalid op. sticky */
|
||||||
|
#define SPEFSCR_FDBZS 0x00080000 /* Embedded FP div by zero sticky */
|
||||||
|
#define SPEFSCR_FUNFS 0x00040000 /* Embedded FP underflow sticky */
|
||||||
|
#define SPEFSCR_FOVFS 0x00020000 /* Embedded FP overflow sticky */
|
||||||
|
#define SPEFSCR_MODE 0x00010000 /* Embedded FP mode */
|
||||||
|
#define SPEFSCR_SOV 0x00008000 /* Integer summary overflow */
|
||||||
|
#define SPEFSCR_OV 0x00004000 /* Integer overflow */
|
||||||
|
#define SPEFSCR_FG 0x00002000 /* Embedded FP guard bit */
|
||||||
|
#define SPEFSCR_FX 0x00001000 /* Embedded FP sticky bit */
|
||||||
|
#define SPEFSCR_FINV 0x00000800 /* Embedded FP invalid operation */
|
||||||
|
#define SPEFSCR_FDBZ 0x00000400 /* Embedded FP div by zero */
|
||||||
|
#define SPEFSCR_FUNF 0x00000200 /* Embedded FP underflow */
|
||||||
|
#define SPEFSCR_FOVF 0x00000100 /* Embedded FP overflow */
|
||||||
|
#define SPEFSCR_FINXE 0x00000040 /* Embedded FP inexact enable */
|
||||||
|
#define SPEFSCR_FINVE 0x00000020 /* Embedded FP invalid op. enable */
|
||||||
|
#define SPEFSCR_FDBZE 0x00000010 /* Embedded FP div by zero enable */
|
||||||
|
#define SPEFSCR_FUNFE 0x00000008 /* Embedded FP underflow enable */
|
||||||
|
#define SPEFSCR_FOVFE 0x00000004 /* Embedded FP overflow enable */
|
||||||
|
#define SPEFSCR_FRMC 0x00000003 /* Embedded FP rounding mode control */
|
||||||
|
|
||||||
/* Special Purpose Registers (SPRNs)*/
|
/* Special Purpose Registers (SPRNs)*/
|
||||||
#define SPRN_CTR 0x009 /* Count Register */
|
#define SPRN_CTR 0x009 /* Count Register */
|
||||||
#define SPRN_DSCR 0x11
|
#define SPRN_DSCR 0x11
|
||||||
|
|||||||
@@ -423,36 +423,6 @@
|
|||||||
#define SGR_NORMAL 0 /* Speculative fetching allowed. */
|
#define SGR_NORMAL 0 /* Speculative fetching allowed. */
|
||||||
#define SGR_GUARDED 1 /* Speculative fetching disallowed. */
|
#define SGR_GUARDED 1 /* Speculative fetching disallowed. */
|
||||||
|
|
||||||
/* Bit definitions for SPEFSCR. */
|
|
||||||
#define SPEFSCR_SOVH 0x80000000 /* Summary integer overflow high */
|
|
||||||
#define SPEFSCR_OVH 0x40000000 /* Integer overflow high */
|
|
||||||
#define SPEFSCR_FGH 0x20000000 /* Embedded FP guard bit high */
|
|
||||||
#define SPEFSCR_FXH 0x10000000 /* Embedded FP sticky bit high */
|
|
||||||
#define SPEFSCR_FINVH 0x08000000 /* Embedded FP invalid operation high */
|
|
||||||
#define SPEFSCR_FDBZH 0x04000000 /* Embedded FP div by zero high */
|
|
||||||
#define SPEFSCR_FUNFH 0x02000000 /* Embedded FP underflow high */
|
|
||||||
#define SPEFSCR_FOVFH 0x01000000 /* Embedded FP overflow high */
|
|
||||||
#define SPEFSCR_FINXS 0x00200000 /* Embedded FP inexact sticky */
|
|
||||||
#define SPEFSCR_FINVS 0x00100000 /* Embedded FP invalid op. sticky */
|
|
||||||
#define SPEFSCR_FDBZS 0x00080000 /* Embedded FP div by zero sticky */
|
|
||||||
#define SPEFSCR_FUNFS 0x00040000 /* Embedded FP underflow sticky */
|
|
||||||
#define SPEFSCR_FOVFS 0x00020000 /* Embedded FP overflow sticky */
|
|
||||||
#define SPEFSCR_MODE 0x00010000 /* Embedded FP mode */
|
|
||||||
#define SPEFSCR_SOV 0x00008000 /* Integer summary overflow */
|
|
||||||
#define SPEFSCR_OV 0x00004000 /* Integer overflow */
|
|
||||||
#define SPEFSCR_FG 0x00002000 /* Embedded FP guard bit */
|
|
||||||
#define SPEFSCR_FX 0x00001000 /* Embedded FP sticky bit */
|
|
||||||
#define SPEFSCR_FINV 0x00000800 /* Embedded FP invalid operation */
|
|
||||||
#define SPEFSCR_FDBZ 0x00000400 /* Embedded FP div by zero */
|
|
||||||
#define SPEFSCR_FUNF 0x00000200 /* Embedded FP underflow */
|
|
||||||
#define SPEFSCR_FOVF 0x00000100 /* Embedded FP overflow */
|
|
||||||
#define SPEFSCR_FINXE 0x00000040 /* Embedded FP inexact enable */
|
|
||||||
#define SPEFSCR_FINVE 0x00000020 /* Embedded FP invalid op. enable */
|
|
||||||
#define SPEFSCR_FDBZE 0x00000010 /* Embedded FP div by zero enable */
|
|
||||||
#define SPEFSCR_FUNFE 0x00000008 /* Embedded FP underflow enable */
|
|
||||||
#define SPEFSCR_FOVFE 0x00000004 /* Embedded FP overflow enable */
|
|
||||||
#define SPEFSCR_FRMC 0x00000003 /* Embedded FP rounding mode control */
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The IBM-403 is an even more odd special case, as it is much
|
* The IBM-403 is an even more odd special case, as it is much
|
||||||
* older than the IBM-405 series. We put these down here incase someone
|
* older than the IBM-405 series. We put these down here incase someone
|
||||||
|
|||||||
@@ -68,7 +68,8 @@ struct rtas_t {
|
|||||||
#define RTAS_EPOW_WARNING 0x40000000 /* set bit 1 */
|
#define RTAS_EPOW_WARNING 0x40000000 /* set bit 1 */
|
||||||
#define RTAS_POWERMGM_EVENTS 0x20000000 /* set bit 2 */
|
#define RTAS_POWERMGM_EVENTS 0x20000000 /* set bit 2 */
|
||||||
#define RTAS_HOTPLUG_EVENTS 0x10000000 /* set bit 3 */
|
#define RTAS_HOTPLUG_EVENTS 0x10000000 /* set bit 3 */
|
||||||
#define RTAS_EVENT_SCAN_ALL_EVENTS 0xf0000000
|
#define RTAS_IO_EVENTS 0x08000000 /* set bit 4 */
|
||||||
|
#define RTAS_EVENT_SCAN_ALL_EVENTS 0xffffffff
|
||||||
|
|
||||||
/* RTAS event severity */
|
/* RTAS event severity */
|
||||||
#define RTAS_SEVERITY_FATAL 0x5
|
#define RTAS_SEVERITY_FATAL 0x5
|
||||||
|
|||||||
@@ -29,9 +29,9 @@
|
|||||||
|
|
||||||
/* basic word size definitions */
|
/* basic word size definitions */
|
||||||
#define _FP_W_TYPE_SIZE 32
|
#define _FP_W_TYPE_SIZE 32
|
||||||
#define _FP_W_TYPE unsigned long
|
#define _FP_W_TYPE unsigned int
|
||||||
#define _FP_WS_TYPE signed long
|
#define _FP_WS_TYPE signed int
|
||||||
#define _FP_I_TYPE long
|
#define _FP_I_TYPE int
|
||||||
|
|
||||||
#define __ll_B ((UWtype) 1 << (W_TYPE_SIZE / 2))
|
#define __ll_B ((UWtype) 1 << (W_TYPE_SIZE / 2))
|
||||||
#define __ll_lowpart(t) ((UWtype) (t) & (__ll_B - 1))
|
#define __ll_lowpart(t) ((UWtype) (t) & (__ll_B - 1))
|
||||||
|
|||||||
@@ -323,3 +323,5 @@ SYSCALL_SPU(dup3)
|
|||||||
SYSCALL_SPU(pipe2)
|
SYSCALL_SPU(pipe2)
|
||||||
SYSCALL(inotify_init1)
|
SYSCALL(inotify_init1)
|
||||||
SYSCALL_SPU(perf_counter_open)
|
SYSCALL_SPU(perf_counter_open)
|
||||||
|
COMPAT_SYS_SPU(preadv)
|
||||||
|
COMPAT_SYS_SPU(pwritev)
|
||||||
|
|||||||
@@ -342,10 +342,12 @@
|
|||||||
#define __NR_pipe2 317
|
#define __NR_pipe2 317
|
||||||
#define __NR_inotify_init1 318
|
#define __NR_inotify_init1 318
|
||||||
#define __NR_perf_counter_open 319
|
#define __NR_perf_counter_open 319
|
||||||
|
#define __NR_preadv 320
|
||||||
|
#define __NR_pwritev 321
|
||||||
|
|
||||||
#ifdef __KERNEL__
|
#ifdef __KERNEL__
|
||||||
|
|
||||||
#define __NR_syscalls 320
|
#define __NR_syscalls 322
|
||||||
|
|
||||||
#define __NR__exit __NR_exit
|
#define __NR__exit __NR_exit
|
||||||
#define NR_syscalls __NR_syscalls
|
#define NR_syscalls __NR_syscalls
|
||||||
|
|||||||
@@ -94,7 +94,7 @@ static int dma_direct_dma_supported(struct device *dev, u64 mask)
|
|||||||
* done via some global so platforms can set the limit in case
|
* done via some global so platforms can set the limit in case
|
||||||
* they have limited DMA windows
|
* they have limited DMA windows
|
||||||
*/
|
*/
|
||||||
return mask >= DMA_32BIT_MASK;
|
return mask >= DMA_BIT_MASK(32);
|
||||||
#else
|
#else
|
||||||
return 1;
|
return 1;
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -145,6 +145,11 @@ END_FTR_SECTION_IFSET(CPU_FTR_VSX)
|
|||||||
beq 1f
|
beq 1f
|
||||||
PPC_LL r4,_MSR-STACK_FRAME_OVERHEAD(r5)
|
PPC_LL r4,_MSR-STACK_FRAME_OVERHEAD(r5)
|
||||||
li r3,MSR_FP|MSR_FE0|MSR_FE1
|
li r3,MSR_FP|MSR_FE0|MSR_FE1
|
||||||
|
#ifdef CONFIG_VSX
|
||||||
|
BEGIN_FTR_SECTION
|
||||||
|
oris r3,r3,MSR_VSX@h
|
||||||
|
END_FTR_SECTION_IFSET(CPU_FTR_VSX)
|
||||||
|
#endif
|
||||||
andc r4,r4,r3 /* disable FP for previous task */
|
andc r4,r4,r3 /* disable FP for previous task */
|
||||||
PPC_STL r4,_MSR-STACK_FRAME_OVERHEAD(r5)
|
PPC_STL r4,_MSR-STACK_FRAME_OVERHEAD(r5)
|
||||||
1:
|
1:
|
||||||
|
|||||||
@@ -293,7 +293,7 @@ __ftrace_make_nop(struct module *mod,
|
|||||||
if (tramp & 0x8000)
|
if (tramp & 0x8000)
|
||||||
tramp -= 0x10000;
|
tramp -= 0x10000;
|
||||||
|
|
||||||
pr_debug(" %x ", tramp);
|
pr_debug(" %lx ", tramp);
|
||||||
|
|
||||||
if (tramp != addr) {
|
if (tramp != addr) {
|
||||||
printk(KERN_ERR
|
printk(KERN_ERR
|
||||||
@@ -564,7 +564,7 @@ void prepare_ftrace_return(unsigned long *parent, unsigned long self_addr)
|
|||||||
if (unlikely(atomic_read(¤t->tracing_graph_pause)))
|
if (unlikely(atomic_read(¤t->tracing_graph_pause)))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
#if CONFIG_PPC64
|
#ifdef CONFIG_PPC64
|
||||||
/* non core kernel code needs to save and restore the TOC */
|
/* non core kernel code needs to save and restore the TOC */
|
||||||
if (REGION_ID(self_addr) != KERNEL_REGION_ID)
|
if (REGION_ID(self_addr) != KERNEL_REGION_ID)
|
||||||
return_hooker = (unsigned long)&mod_return_to_handler;
|
return_hooker = (unsigned long)&mod_return_to_handler;
|
||||||
|
|||||||
@@ -677,11 +677,13 @@ unsigned int irq_create_mapping(struct irq_host *host,
|
|||||||
return NO_IRQ;
|
return NO_IRQ;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
pr_debug("irq: -> obtained virq %d\n", virq);
|
|
||||||
|
|
||||||
if (irq_setup_virq(host, virq, hwirq))
|
if (irq_setup_virq(host, virq, hwirq))
|
||||||
return NO_IRQ;
|
return NO_IRQ;
|
||||||
|
|
||||||
|
printk(KERN_DEBUG "irq: irq %lu on host %s mapped to virtual irq %u\n",
|
||||||
|
hwirq, host->of_node ? host->of_node->full_name : "null", virq);
|
||||||
|
|
||||||
return virq;
|
return virq;
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL_GPL(irq_create_mapping);
|
EXPORT_SYMBOL_GPL(irq_create_mapping);
|
||||||
|
|||||||
@@ -434,6 +434,21 @@ static void pseries_cmo_data(struct seq_file *m)
|
|||||||
seq_printf(m, "cmo_page_size=%lu\n", cmo_get_page_size());
|
seq_printf(m, "cmo_page_size=%lu\n", cmo_get_page_size());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void splpar_dispatch_data(struct seq_file *m)
|
||||||
|
{
|
||||||
|
int cpu;
|
||||||
|
unsigned long dispatches = 0;
|
||||||
|
unsigned long dispatch_dispersions = 0;
|
||||||
|
|
||||||
|
for_each_possible_cpu(cpu) {
|
||||||
|
dispatches += lppaca[cpu].yield_count;
|
||||||
|
dispatch_dispersions += lppaca[cpu].dispersion_count;
|
||||||
|
}
|
||||||
|
|
||||||
|
seq_printf(m, "dispatches=%lu\n", dispatches);
|
||||||
|
seq_printf(m, "dispatch_dispersions=%lu\n", dispatch_dispersions);
|
||||||
|
}
|
||||||
|
|
||||||
static int pseries_lparcfg_data(struct seq_file *m, void *v)
|
static int pseries_lparcfg_data(struct seq_file *m, void *v)
|
||||||
{
|
{
|
||||||
int partition_potential_processors;
|
int partition_potential_processors;
|
||||||
@@ -460,6 +475,7 @@ static int pseries_lparcfg_data(struct seq_file *m, void *v)
|
|||||||
parse_ppp_data(m);
|
parse_ppp_data(m);
|
||||||
parse_mpp_data(m);
|
parse_mpp_data(m);
|
||||||
pseries_cmo_data(m);
|
pseries_cmo_data(m);
|
||||||
|
splpar_dispatch_data(m);
|
||||||
|
|
||||||
seq_printf(m, "purr=%ld\n", get_purr());
|
seq_printf(m, "purr=%ld\n", get_purr());
|
||||||
} else { /* non SPLPAR case */
|
} else { /* non SPLPAR case */
|
||||||
|
|||||||
@@ -495,7 +495,15 @@ _GLOBAL(giveup_altivec)
|
|||||||
stvx vr0,r4,r3
|
stvx vr0,r4,r3
|
||||||
beq 1f
|
beq 1f
|
||||||
ld r4,_MSR-STACK_FRAME_OVERHEAD(r5)
|
ld r4,_MSR-STACK_FRAME_OVERHEAD(r5)
|
||||||
|
#ifdef CONFIG_VSX
|
||||||
|
BEGIN_FTR_SECTION
|
||||||
|
lis r3,(MSR_VEC|MSR_VSX)@h
|
||||||
|
FTR_SECTION_ELSE
|
||||||
lis r3,MSR_VEC@h
|
lis r3,MSR_VEC@h
|
||||||
|
ALT_FTR_SECTION_END_IFSET(CPU_FTR_VSX)
|
||||||
|
#else
|
||||||
|
lis r3,MSR_VEC@h
|
||||||
|
#endif
|
||||||
andc r4,r4,r3 /* disable FP for previous task */
|
andc r4,r4,r3 /* disable FP for previous task */
|
||||||
std r4,_MSR-STACK_FRAME_OVERHEAD(r5)
|
std r4,_MSR-STACK_FRAME_OVERHEAD(r5)
|
||||||
1:
|
1:
|
||||||
|
|||||||
@@ -76,7 +76,7 @@ struct of_device* of_platform_device_create(struct device_node *np,
|
|||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
dev->dma_mask = 0xffffffffUL;
|
dev->dma_mask = 0xffffffffUL;
|
||||||
dev->dev.coherent_dma_mask = DMA_32BIT_MASK;
|
dev->dev.coherent_dma_mask = DMA_BIT_MASK(32);
|
||||||
|
|
||||||
dev->dev.bus = &of_platform_bus_type;
|
dev->dev.bus = &of_platform_bus_type;
|
||||||
|
|
||||||
|
|||||||
@@ -614,7 +614,7 @@ static unsigned char ibm_architecture_vec[] = {
|
|||||||
W(0xffffffff), /* virt_base */
|
W(0xffffffff), /* virt_base */
|
||||||
W(0xffffffff), /* virt_size */
|
W(0xffffffff), /* virt_size */
|
||||||
W(0xffffffff), /* load_base */
|
W(0xffffffff), /* load_base */
|
||||||
W(64), /* 128MB min RMA */
|
W(64), /* 64MB min RMA */
|
||||||
W(0xffffffff), /* full client load */
|
W(0xffffffff), /* full client load */
|
||||||
0, /* min RMA percentage of total RAM */
|
0, /* min RMA percentage of total RAM */
|
||||||
48, /* max log_2(hash table size) */
|
48, /* max log_2(hash table size) */
|
||||||
@@ -732,15 +732,17 @@ static void __init prom_send_capabilities(void)
|
|||||||
root = call_prom("open", 1, 1, ADDR("/"));
|
root = call_prom("open", 1, 1, ADDR("/"));
|
||||||
if (root != 0) {
|
if (root != 0) {
|
||||||
/* try calling the ibm,client-architecture-support method */
|
/* try calling the ibm,client-architecture-support method */
|
||||||
|
prom_printf("Calling ibm,client-architecture...");
|
||||||
if (call_prom_ret("call-method", 3, 2, &ret,
|
if (call_prom_ret("call-method", 3, 2, &ret,
|
||||||
ADDR("ibm,client-architecture-support"),
|
ADDR("ibm,client-architecture-support"),
|
||||||
root,
|
root,
|
||||||
ADDR(ibm_architecture_vec)) == 0) {
|
ADDR(ibm_architecture_vec)) == 0) {
|
||||||
/* the call exists... */
|
/* the call exists... */
|
||||||
if (ret)
|
if (ret)
|
||||||
prom_printf("WARNING: ibm,client-architecture"
|
prom_printf("\nWARNING: ibm,client-architecture"
|
||||||
"-support call FAILED!\n");
|
"-support call FAILED!\n");
|
||||||
call_prom("close", 1, 0, root);
|
call_prom("close", 1, 0, root);
|
||||||
|
prom_printf(" done\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
call_prom("close", 1, 0, root);
|
call_prom("close", 1, 0, root);
|
||||||
@@ -1083,7 +1085,7 @@ static void __init prom_instantiate_rtas(void)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
prom_printf("instantiating rtas at 0x%x ...", base);
|
prom_printf("instantiating rtas at 0x%x...", base);
|
||||||
|
|
||||||
if (call_prom_ret("call-method", 3, 2, &entry,
|
if (call_prom_ret("call-method", 3, 2, &entry,
|
||||||
ADDR("instantiate-rtas"),
|
ADDR("instantiate-rtas"),
|
||||||
@@ -1495,7 +1497,7 @@ static int __init prom_find_machine_type(void)
|
|||||||
return PLATFORM_GENERIC;
|
return PLATFORM_GENERIC;
|
||||||
x = prom_getproplen(rtas, "ibm,hypertas-functions");
|
x = prom_getproplen(rtas, "ibm,hypertas-functions");
|
||||||
if (x != PROM_ERROR) {
|
if (x != PROM_ERROR) {
|
||||||
prom_printf("Hypertas detected, assuming LPAR !\n");
|
prom_debug("Hypertas detected, assuming LPAR !\n");
|
||||||
return PLATFORM_PSERIES_LPAR;
|
return PLATFORM_PSERIES_LPAR;
|
||||||
}
|
}
|
||||||
return PLATFORM_PSERIES;
|
return PLATFORM_PSERIES;
|
||||||
@@ -1544,7 +1546,7 @@ static void __init prom_check_displays(void)
|
|||||||
};
|
};
|
||||||
const unsigned char *clut;
|
const unsigned char *clut;
|
||||||
|
|
||||||
prom_printf("Looking for displays\n");
|
prom_debug("Looking for displays\n");
|
||||||
for (node = 0; prom_next_node(&node); ) {
|
for (node = 0; prom_next_node(&node); ) {
|
||||||
memset(type, 0, sizeof(type));
|
memset(type, 0, sizeof(type));
|
||||||
prom_getprop(node, "device_type", type, sizeof(type));
|
prom_getprop(node, "device_type", type, sizeof(type));
|
||||||
@@ -1562,7 +1564,7 @@ static void __init prom_check_displays(void)
|
|||||||
if (call_prom("package-to-path", 3, 1, node, path,
|
if (call_prom("package-to-path", 3, 1, node, path,
|
||||||
PROM_SCRATCH_SIZE-10) == PROM_ERROR)
|
PROM_SCRATCH_SIZE-10) == PROM_ERROR)
|
||||||
continue;
|
continue;
|
||||||
prom_printf("found display : %s, opening ... ", path);
|
prom_printf("found display : %s, opening... ", path);
|
||||||
|
|
||||||
ih = call_prom("open", 1, 1, path);
|
ih = call_prom("open", 1, 1, path);
|
||||||
if (ih == 0) {
|
if (ih == 0) {
|
||||||
@@ -2387,7 +2389,7 @@ unsigned long __init prom_init(unsigned long r3, unsigned long r4,
|
|||||||
/*
|
/*
|
||||||
* Now finally create the flattened device-tree
|
* Now finally create the flattened device-tree
|
||||||
*/
|
*/
|
||||||
prom_printf("copying OF device tree ...\n");
|
prom_printf("copying OF device tree...\n");
|
||||||
flatten_device_tree();
|
flatten_device_tree();
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -2402,7 +2404,7 @@ unsigned long __init prom_init(unsigned long r3, unsigned long r4,
|
|||||||
* Call OF "quiesce" method to shut down pending DMA's from
|
* Call OF "quiesce" method to shut down pending DMA's from
|
||||||
* devices etc...
|
* devices etc...
|
||||||
*/
|
*/
|
||||||
prom_printf("Calling quiesce ...\n");
|
prom_printf("Calling quiesce...\n");
|
||||||
call_prom("quiesce", 0, 0);
|
call_prom("quiesce", 0, 0);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -67,7 +67,8 @@ static long compat_ptrace_old(struct task_struct *child, long request,
|
|||||||
/* Macros to workout the correct index for the FPR in the thread struct */
|
/* Macros to workout the correct index for the FPR in the thread struct */
|
||||||
#define FPRNUMBER(i) (((i) - PT_FPR0) >> 1)
|
#define FPRNUMBER(i) (((i) - PT_FPR0) >> 1)
|
||||||
#define FPRHALF(i) (((i) - PT_FPR0) & 1)
|
#define FPRHALF(i) (((i) - PT_FPR0) & 1)
|
||||||
#define FPRINDEX(i) TS_FPRWIDTH * FPRNUMBER(i) + FPRHALF(i)
|
#define FPRINDEX(i) TS_FPRWIDTH * FPRNUMBER(i) * 2 + FPRHALF(i)
|
||||||
|
#define FPRINDEX_3264(i) (TS_FPRWIDTH * ((i) - PT_FPR0))
|
||||||
|
|
||||||
long compat_arch_ptrace(struct task_struct *child, compat_long_t request,
|
long compat_arch_ptrace(struct task_struct *child, compat_long_t request,
|
||||||
compat_ulong_t caddr, compat_ulong_t cdata)
|
compat_ulong_t caddr, compat_ulong_t cdata)
|
||||||
@@ -168,8 +169,9 @@ long compat_arch_ptrace(struct task_struct *child, compat_long_t request,
|
|||||||
CHECK_FULL_REGS(child->thread.regs);
|
CHECK_FULL_REGS(child->thread.regs);
|
||||||
if (numReg >= PT_FPR0) {
|
if (numReg >= PT_FPR0) {
|
||||||
flush_fp_to_thread(child);
|
flush_fp_to_thread(child);
|
||||||
tmp = ((unsigned long int *)child->thread.fpr)
|
/* get 64 bit FPR */
|
||||||
[FPRINDEX(numReg)];
|
tmp = ((u64 *)child->thread.fpr)
|
||||||
|
[FPRINDEX_3264(numReg)];
|
||||||
} else { /* register within PT_REGS struct */
|
} else { /* register within PT_REGS struct */
|
||||||
tmp = ptrace_get_reg(child, numReg);
|
tmp = ptrace_get_reg(child, numReg);
|
||||||
}
|
}
|
||||||
@@ -262,8 +264,13 @@ long compat_arch_ptrace(struct task_struct *child, compat_long_t request,
|
|||||||
freg = (freg & 0xfffffffful) | (data << 32);
|
freg = (freg & 0xfffffffful) | (data << 32);
|
||||||
ret = ptrace_put_reg(child, numReg, freg);
|
ret = ptrace_put_reg(child, numReg, freg);
|
||||||
} else {
|
} else {
|
||||||
|
u64 *tmp;
|
||||||
flush_fp_to_thread(child);
|
flush_fp_to_thread(child);
|
||||||
((unsigned int *)child->thread.regs)[index] = data;
|
/* get 64 bit FPR ... */
|
||||||
|
tmp = &(((u64 *)child->thread.fpr)
|
||||||
|
[FPRINDEX_3264(numReg)]);
|
||||||
|
/* ... write the 32 bit part we want */
|
||||||
|
((u32 *)tmp)[index % 2] = data;
|
||||||
ret = 0;
|
ret = 0;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -36,7 +36,6 @@
|
|||||||
#include <linux/percpu.h>
|
#include <linux/percpu.h>
|
||||||
#include <linux/lmb.h>
|
#include <linux/lmb.h>
|
||||||
#include <linux/of_platform.h>
|
#include <linux/of_platform.h>
|
||||||
#include <linux/platform_device.h>
|
|
||||||
#include <asm/io.h>
|
#include <asm/io.h>
|
||||||
#include <asm/prom.h>
|
#include <asm/prom.h>
|
||||||
#include <asm/processor.h>
|
#include <asm/processor.h>
|
||||||
|
|||||||
@@ -644,7 +644,7 @@ static void dma_fixed_unmap_sg(struct device *dev, struct scatterlist *sg,
|
|||||||
|
|
||||||
static int dma_fixed_dma_supported(struct device *dev, u64 mask)
|
static int dma_fixed_dma_supported(struct device *dev, u64 mask)
|
||||||
{
|
{
|
||||||
return mask == DMA_64BIT_MASK;
|
return mask == DMA_BIT_MASK(64);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int dma_set_mask_and_switch(struct device *dev, u64 dma_mask);
|
static int dma_set_mask_and_switch(struct device *dev, u64 dma_mask);
|
||||||
|
|||||||
@@ -202,7 +202,7 @@ static struct iommu_table vio_iommu_table;
|
|||||||
void *iseries_hv_alloc(size_t size, dma_addr_t *dma_handle, gfp_t flag)
|
void *iseries_hv_alloc(size_t size, dma_addr_t *dma_handle, gfp_t flag)
|
||||||
{
|
{
|
||||||
return iommu_alloc_coherent(NULL, &vio_iommu_table, size, dma_handle,
|
return iommu_alloc_coherent(NULL, &vio_iommu_table, size, dma_handle,
|
||||||
DMA_32BIT_MASK, flag, -1);
|
DMA_BIT_MASK(32), flag, -1);
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL_GPL(iseries_hv_alloc);
|
EXPORT_SYMBOL_GPL(iseries_hv_alloc);
|
||||||
|
|
||||||
@@ -217,7 +217,7 @@ dma_addr_t iseries_hv_map(void *vaddr, size_t size,
|
|||||||
{
|
{
|
||||||
return iommu_map_page(NULL, &vio_iommu_table, virt_to_page(vaddr),
|
return iommu_map_page(NULL, &vio_iommu_table, virt_to_page(vaddr),
|
||||||
(unsigned long)vaddr % PAGE_SIZE, size,
|
(unsigned long)vaddr % PAGE_SIZE, size,
|
||||||
DMA_32BIT_MASK, direction, NULL);
|
DMA_BIT_MASK(32), direction, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
void iseries_hv_unmap(dma_addr_t dma_handle, size_t size,
|
void iseries_hv_unmap(dma_addr_t dma_handle, size_t size,
|
||||||
|
|||||||
@@ -689,7 +689,7 @@ static void ps3_ioc0_unmap_sg(struct device *_dev, struct scatterlist *sg,
|
|||||||
|
|
||||||
static int ps3_dma_supported(struct device *_dev, u64 mask)
|
static int ps3_dma_supported(struct device *_dev, u64 mask)
|
||||||
{
|
{
|
||||||
return mask >= DMA_32BIT_MASK;
|
return mask >= DMA_BIT_MASK(32);
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct dma_mapping_ops ps3_sb_dma_ops = {
|
static struct dma_mapping_ops ps3_sb_dma_ops = {
|
||||||
|
|||||||
@@ -1170,6 +1170,12 @@ struct mpic * __init mpic_alloc(struct device_node *node,
|
|||||||
mb();
|
mb();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* CoreInt */
|
||||||
|
if (flags & MPIC_ENABLE_COREINT)
|
||||||
|
mpic_write(mpic->gregs, MPIC_INFO(GREG_GLOBAL_CONF_0),
|
||||||
|
mpic_read(mpic->gregs, MPIC_INFO(GREG_GLOBAL_CONF_0))
|
||||||
|
| MPIC_GREG_GCONF_COREINT);
|
||||||
|
|
||||||
if (flags & MPIC_ENABLE_MCK)
|
if (flags & MPIC_ENABLE_MCK)
|
||||||
mpic_write(mpic->gregs, MPIC_INFO(GREG_GLOBAL_CONF_0),
|
mpic_write(mpic->gregs, MPIC_INFO(GREG_GLOBAL_CONF_0),
|
||||||
mpic_read(mpic->gregs, MPIC_INFO(GREG_GLOBAL_CONF_0))
|
mpic_read(mpic->gregs, MPIC_INFO(GREG_GLOBAL_CONF_0))
|
||||||
@@ -1525,6 +1531,34 @@ unsigned int mpic_get_irq(void)
|
|||||||
return mpic_get_one_irq(mpic);
|
return mpic_get_one_irq(mpic);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
unsigned int mpic_get_coreint_irq(void)
|
||||||
|
{
|
||||||
|
#ifdef CONFIG_BOOKE
|
||||||
|
struct mpic *mpic = mpic_primary;
|
||||||
|
u32 src;
|
||||||
|
|
||||||
|
BUG_ON(mpic == NULL);
|
||||||
|
|
||||||
|
src = mfspr(SPRN_EPR);
|
||||||
|
|
||||||
|
if (unlikely(src == mpic->spurious_vec)) {
|
||||||
|
if (mpic->flags & MPIC_SPV_EOI)
|
||||||
|
mpic_eoi(mpic);
|
||||||
|
return NO_IRQ;
|
||||||
|
}
|
||||||
|
if (unlikely(mpic->protected && test_bit(src, mpic->protected))) {
|
||||||
|
if (printk_ratelimit())
|
||||||
|
printk(KERN_WARNING "%s: Got protected source %d !\n",
|
||||||
|
mpic->name, (int)src);
|
||||||
|
return NO_IRQ;
|
||||||
|
}
|
||||||
|
|
||||||
|
return irq_linear_revmap(mpic->irqhost, src);
|
||||||
|
#else
|
||||||
|
return NO_IRQ;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
unsigned int mpic_get_mcirq(void)
|
unsigned int mpic_get_mcirq(void)
|
||||||
{
|
{
|
||||||
struct mpic *mpic = mpic_primary;
|
struct mpic *mpic = mpic_primary;
|
||||||
|
|||||||
@@ -238,7 +238,7 @@ static inline unsigned long dma_alloc_coherent_mask(struct device *dev,
|
|||||||
|
|
||||||
dma_mask = dev->coherent_dma_mask;
|
dma_mask = dev->coherent_dma_mask;
|
||||||
if (!dma_mask)
|
if (!dma_mask)
|
||||||
dma_mask = (gfp & GFP_DMA) ? DMA_24BIT_MASK : DMA_32BIT_MASK;
|
dma_mask = (gfp & GFP_DMA) ? DMA_BIT_MASK(24) : DMA_BIT_MASK(32);
|
||||||
|
|
||||||
return dma_mask;
|
return dma_mask;
|
||||||
}
|
}
|
||||||
@@ -247,10 +247,10 @@ static inline gfp_t dma_alloc_coherent_gfp_flags(struct device *dev, gfp_t gfp)
|
|||||||
{
|
{
|
||||||
unsigned long dma_mask = dma_alloc_coherent_mask(dev, gfp);
|
unsigned long dma_mask = dma_alloc_coherent_mask(dev, gfp);
|
||||||
|
|
||||||
if (dma_mask <= DMA_24BIT_MASK)
|
if (dma_mask <= DMA_BIT_MASK(24))
|
||||||
gfp |= GFP_DMA;
|
gfp |= GFP_DMA;
|
||||||
#ifdef CONFIG_X86_64
|
#ifdef CONFIG_X86_64
|
||||||
if (dma_mask <= DMA_32BIT_MASK && !(gfp & GFP_DMA))
|
if (dma_mask <= DMA_BIT_MASK(32) && !(gfp & GFP_DMA))
|
||||||
gfp |= GFP_DMA32;
|
gfp |= GFP_DMA32;
|
||||||
#endif
|
#endif
|
||||||
return gfp;
|
return gfp;
|
||||||
|
|||||||
@@ -20,7 +20,6 @@
|
|||||||
|
|
||||||
#include <asm/cacheflush.h>
|
#include <asm/cacheflush.h>
|
||||||
#include <asm/ftrace.h>
|
#include <asm/ftrace.h>
|
||||||
#include <linux/ftrace.h>
|
|
||||||
#include <asm/nops.h>
|
#include <asm/nops.h>
|
||||||
#include <asm/nmi.h>
|
#include <asm/nmi.h>
|
||||||
|
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ EXPORT_SYMBOL(bad_dma_address);
|
|||||||
to older i386. */
|
to older i386. */
|
||||||
struct device x86_dma_fallback_dev = {
|
struct device x86_dma_fallback_dev = {
|
||||||
.init_name = "fallback device",
|
.init_name = "fallback device",
|
||||||
.coherent_dma_mask = DMA_32BIT_MASK,
|
.coherent_dma_mask = DMA_BIT_MASK(32),
|
||||||
.dma_mask = &x86_dma_fallback_dev.coherent_dma_mask,
|
.dma_mask = &x86_dma_fallback_dev.coherent_dma_mask,
|
||||||
};
|
};
|
||||||
EXPORT_SYMBOL(x86_dma_fallback_dev);
|
EXPORT_SYMBOL(x86_dma_fallback_dev);
|
||||||
@@ -148,7 +148,7 @@ again:
|
|||||||
if (!is_buffer_dma_capable(dma_mask, addr, size)) {
|
if (!is_buffer_dma_capable(dma_mask, addr, size)) {
|
||||||
__free_pages(page, get_order(size));
|
__free_pages(page, get_order(size));
|
||||||
|
|
||||||
if (dma_mask < DMA_32BIT_MASK && !(flag & GFP_DMA)) {
|
if (dma_mask < DMA_BIT_MASK(32) && !(flag & GFP_DMA)) {
|
||||||
flag = (flag & ~GFP_DMA32) | GFP_DMA;
|
flag = (flag & ~GFP_DMA32) | GFP_DMA;
|
||||||
goto again;
|
goto again;
|
||||||
}
|
}
|
||||||
@@ -243,7 +243,7 @@ int dma_supported(struct device *dev, u64 mask)
|
|||||||
/* Copied from i386. Doesn't make much sense, because it will
|
/* Copied from i386. Doesn't make much sense, because it will
|
||||||
only work for pci_alloc_coherent.
|
only work for pci_alloc_coherent.
|
||||||
The caller just has to use GFP_DMA in this case. */
|
The caller just has to use GFP_DMA in this case. */
|
||||||
if (mask < DMA_24BIT_MASK)
|
if (mask < DMA_BIT_MASK(24))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
/* Tell the device to use SAC when IOMMU force is on. This
|
/* Tell the device to use SAC when IOMMU force is on. This
|
||||||
@@ -258,7 +258,7 @@ int dma_supported(struct device *dev, u64 mask)
|
|||||||
SAC for these. Assume all masks <= 40 bits are of this
|
SAC for these. Assume all masks <= 40 bits are of this
|
||||||
type. Normally this doesn't make any difference, but gives
|
type. Normally this doesn't make any difference, but gives
|
||||||
more gentle handling of IOMMU overflow. */
|
more gentle handling of IOMMU overflow. */
|
||||||
if (iommu_sac_force && (mask >= DMA_40BIT_MASK)) {
|
if (iommu_sac_force && (mask >= DMA_BIT_MASK(40))) {
|
||||||
dev_info(dev, "Force SAC with mask %Lx\n", mask);
|
dev_info(dev, "Force SAC with mask %Lx\n", mask);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ static int
|
|||||||
check_addr(char *name, struct device *hwdev, dma_addr_t bus, size_t size)
|
check_addr(char *name, struct device *hwdev, dma_addr_t bus, size_t size)
|
||||||
{
|
{
|
||||||
if (hwdev && !is_buffer_dma_capable(*hwdev->dma_mask, bus, size)) {
|
if (hwdev && !is_buffer_dma_capable(*hwdev->dma_mask, bus, size)) {
|
||||||
if (*hwdev->dma_mask >= DMA_32BIT_MASK)
|
if (*hwdev->dma_mask >= DMA_BIT_MASK(32))
|
||||||
printk(KERN_ERR
|
printk(KERN_ERR
|
||||||
"nommu_%s: overflow %Lx+%zu of device mask %Lx\n",
|
"nommu_%s: overflow %Lx+%zu of device mask %Lx\n",
|
||||||
name, (long long)bus, size,
|
name, (long long)bus, size,
|
||||||
|
|||||||
@@ -64,12 +64,11 @@ static struct workqueue_struct *kblockd_workqueue;
|
|||||||
|
|
||||||
static void drive_stat_acct(struct request *rq, int new_io)
|
static void drive_stat_acct(struct request *rq, int new_io)
|
||||||
{
|
{
|
||||||
struct gendisk *disk = rq->rq_disk;
|
|
||||||
struct hd_struct *part;
|
struct hd_struct *part;
|
||||||
int rw = rq_data_dir(rq);
|
int rw = rq_data_dir(rq);
|
||||||
int cpu;
|
int cpu;
|
||||||
|
|
||||||
if (!blk_fs_request(rq) || !disk || !blk_do_io_stat(disk->queue))
|
if (!blk_fs_request(rq) || !blk_do_io_stat(rq))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
cpu = part_stat_lock();
|
cpu = part_stat_lock();
|
||||||
@@ -132,6 +131,7 @@ void blk_rq_init(struct request_queue *q, struct request *rq)
|
|||||||
INIT_HLIST_NODE(&rq->hash);
|
INIT_HLIST_NODE(&rq->hash);
|
||||||
RB_CLEAR_NODE(&rq->rb_node);
|
RB_CLEAR_NODE(&rq->rb_node);
|
||||||
rq->cmd = rq->__cmd;
|
rq->cmd = rq->__cmd;
|
||||||
|
rq->cmd_len = BLK_MAX_CDB;
|
||||||
rq->tag = -1;
|
rq->tag = -1;
|
||||||
rq->ref_count = 1;
|
rq->ref_count = 1;
|
||||||
}
|
}
|
||||||
@@ -1124,8 +1124,6 @@ void init_request_from_bio(struct request *req, struct bio *bio)
|
|||||||
|
|
||||||
if (bio_sync(bio))
|
if (bio_sync(bio))
|
||||||
req->cmd_flags |= REQ_RW_SYNC;
|
req->cmd_flags |= REQ_RW_SYNC;
|
||||||
if (bio_unplug(bio))
|
|
||||||
req->cmd_flags |= REQ_UNPLUG;
|
|
||||||
if (bio_rw_meta(bio))
|
if (bio_rw_meta(bio))
|
||||||
req->cmd_flags |= REQ_RW_META;
|
req->cmd_flags |= REQ_RW_META;
|
||||||
if (bio_noidle(bio))
|
if (bio_noidle(bio))
|
||||||
@@ -1675,9 +1673,7 @@ EXPORT_SYMBOL(blkdev_dequeue_request);
|
|||||||
|
|
||||||
static void blk_account_io_completion(struct request *req, unsigned int bytes)
|
static void blk_account_io_completion(struct request *req, unsigned int bytes)
|
||||||
{
|
{
|
||||||
struct gendisk *disk = req->rq_disk;
|
if (!blk_do_io_stat(req))
|
||||||
|
|
||||||
if (!disk || !blk_do_io_stat(disk->queue))
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (blk_fs_request(req)) {
|
if (blk_fs_request(req)) {
|
||||||
@@ -1694,9 +1690,7 @@ static void blk_account_io_completion(struct request *req, unsigned int bytes)
|
|||||||
|
|
||||||
static void blk_account_io_done(struct request *req)
|
static void blk_account_io_done(struct request *req)
|
||||||
{
|
{
|
||||||
struct gendisk *disk = req->rq_disk;
|
if (!blk_do_io_stat(req))
|
||||||
|
|
||||||
if (!disk || !blk_do_io_stat(disk->queue))
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -1711,7 +1705,7 @@ static void blk_account_io_done(struct request *req)
|
|||||||
int cpu;
|
int cpu;
|
||||||
|
|
||||||
cpu = part_stat_lock();
|
cpu = part_stat_lock();
|
||||||
part = disk_map_sector_rcu(disk, req->sector);
|
part = disk_map_sector_rcu(req->rq_disk, req->sector);
|
||||||
|
|
||||||
part_stat_inc(cpu, part, ios[rw]);
|
part_stat_inc(cpu, part, ios[rw]);
|
||||||
part_stat_add(cpu, part, ticks[rw], duration);
|
part_stat_add(cpu, part, ticks[rw], duration);
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user