Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
This commit is contained in:
commit
c373ba9991
623 changed files with 29937 additions and 12894 deletions
145
Documentation/arm/tcm.txt
Normal file
145
Documentation/arm/tcm.txt
Normal file
|
@ -0,0 +1,145 @@
|
|||
ARM TCM (Tightly-Coupled Memory) handling in Linux
|
||||
----
|
||||
Written by Linus Walleij <linus.walleij@stericsson.com>
|
||||
|
||||
Some ARM SoC:s have a so-called TCM (Tightly-Coupled Memory).
|
||||
This is usually just a few (4-64) KiB of RAM inside the ARM
|
||||
processor.
|
||||
|
||||
Due to being embedded inside the CPU The TCM has a
|
||||
Harvard-architecture, so there is an ITCM (instruction TCM)
|
||||
and a DTCM (data TCM). The DTCM can not contain any
|
||||
instructions, but the ITCM can actually contain data.
|
||||
The size of DTCM or ITCM is minimum 4KiB so the typical
|
||||
minimum configuration is 4KiB ITCM and 4KiB DTCM.
|
||||
|
||||
ARM CPU:s have special registers to read out status, physical
|
||||
location and size of TCM memories. arch/arm/include/asm/cputype.h
|
||||
defines a CPUID_TCM register that you can read out from the
|
||||
system control coprocessor. Documentation from ARM can be found
|
||||
at http://infocenter.arm.com, search for "TCM Status Register"
|
||||
to see documents for all CPUs. Reading this register you can
|
||||
determine if ITCM (bit 0) and/or DTCM (bit 16) is present in the
|
||||
machine.
|
||||
|
||||
There is further a TCM region register (search for "TCM Region
|
||||
Registers" at the ARM site) that can report and modify the location
|
||||
size of TCM memories at runtime. This is used to read out and modify
|
||||
TCM location and size. Notice that this is not a MMU table: you
|
||||
actually move the physical location of the TCM around. At the
|
||||
place you put it, it will mask any underlying RAM from the
|
||||
CPU so it is usually wise not to overlap any physical RAM with
|
||||
the TCM. The TCM memory exists totally outside the MMU and will
|
||||
override any MMU mappings.
|
||||
|
||||
Code executing inside the ITCM does not "see" any MMU mappings
|
||||
and e.g. register accesses must be made to physical addresses.
|
||||
|
||||
TCM is used for a few things:
|
||||
|
||||
- FIQ and other interrupt handlers that need deterministic
|
||||
timing and cannot wait for cache misses.
|
||||
|
||||
- Idle loops where all external RAM is set to self-refresh
|
||||
retention mode, so only on-chip RAM is accessible by
|
||||
the CPU and then we hang inside ITCM waiting for an
|
||||
interrupt.
|
||||
|
||||
- Other operations which implies shutting off or reconfiguring
|
||||
the external RAM controller.
|
||||
|
||||
There is an interface for using TCM on the ARM architecture
|
||||
in <asm/tcm.h>. Using this interface it is possible to:
|
||||
|
||||
- Define the physical address and size of ITCM and DTCM.
|
||||
|
||||
- Tag functions to be compiled into ITCM.
|
||||
|
||||
- Tag data and constants to be allocated to DTCM and ITCM.
|
||||
|
||||
- Have the remaining TCM RAM added to a special
|
||||
allocation pool with gen_pool_create() and gen_pool_add()
|
||||
and provice tcm_alloc() and tcm_free() for this
|
||||
memory. Such a heap is great for things like saving
|
||||
device state when shutting off device power domains.
|
||||
|
||||
A machine that has TCM memory shall select HAVE_TCM in
|
||||
arch/arm/Kconfig for itself, and then the
|
||||
rest of the functionality will depend on the physical
|
||||
location and size of ITCM and DTCM to be defined in
|
||||
mach/memory.h for the machine. Code that needs to use
|
||||
TCM shall #include <asm/tcm.h> If the TCM is not located
|
||||
at the place given in memory.h it will be moved using
|
||||
the TCM Region registers.
|
||||
|
||||
Functions to go into itcm can be tagged like this:
|
||||
int __tcmfunc foo(int bar);
|
||||
|
||||
Variables to go into dtcm can be tagged like this:
|
||||
int __tcmdata foo;
|
||||
|
||||
Constants can be tagged like this:
|
||||
int __tcmconst foo;
|
||||
|
||||
To put assembler into TCM just use
|
||||
.section ".tcm.text" or .section ".tcm.data"
|
||||
respectively.
|
||||
|
||||
Example code:
|
||||
|
||||
#include <asm/tcm.h>
|
||||
|
||||
/* Uninitialized data */
|
||||
static u32 __tcmdata tcmvar;
|
||||
/* Initialized data */
|
||||
static u32 __tcmdata tcmassigned = 0x2BADBABEU;
|
||||
/* Constant */
|
||||
static const u32 __tcmconst tcmconst = 0xCAFEBABEU;
|
||||
|
||||
static void __tcmlocalfunc tcm_to_tcm(void)
|
||||
{
|
||||
int i;
|
||||
for (i = 0; i < 100; i++)
|
||||
tcmvar ++;
|
||||
}
|
||||
|
||||
static void __tcmfunc hello_tcm(void)
|
||||
{
|
||||
/* Some abstract code that runs in ITCM */
|
||||
int i;
|
||||
for (i = 0; i < 100; i++) {
|
||||
tcmvar ++;
|
||||
}
|
||||
tcm_to_tcm();
|
||||
}
|
||||
|
||||
static void __init test_tcm(void)
|
||||
{
|
||||
u32 *tcmem;
|
||||
int i;
|
||||
|
||||
hello_tcm();
|
||||
printk("Hello TCM executed from ITCM RAM\n");
|
||||
|
||||
printk("TCM variable from testrun: %u @ %p\n", tcmvar, &tcmvar);
|
||||
tcmvar = 0xDEADBEEFU;
|
||||
printk("TCM variable: 0x%x @ %p\n", tcmvar, &tcmvar);
|
||||
|
||||
printk("TCM assigned variable: 0x%x @ %p\n", tcmassigned, &tcmassigned);
|
||||
|
||||
printk("TCM constant: 0x%x @ %p\n", tcmconst, &tcmconst);
|
||||
|
||||
/* Allocate some TCM memory from the pool */
|
||||
tcmem = tcm_alloc(20);
|
||||
if (tcmem) {
|
||||
printk("TCM Allocated 20 bytes of TCM @ %p\n", tcmem);
|
||||
tcmem[0] = 0xDEADBEEFU;
|
||||
tcmem[1] = 0x2BADBABEU;
|
||||
tcmem[2] = 0xCAFEBABEU;
|
||||
tcmem[3] = 0xDEADBEEFU;
|
||||
tcmem[4] = 0x2BADBABEU;
|
||||
for (i = 0; i < 5; i++)
|
||||
printk("TCM tcmem[%d] = %08x\n", i, tcmem[i]);
|
||||
tcm_free(tcmem, 20);
|
||||
}
|
||||
}
|
|
@ -194,7 +194,6 @@ static void cfag12864b_blit(void)
|
|||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#define EXAMPLES 6
|
||||
|
||||
|
|
|
@ -408,6 +408,26 @@ You can attach the current shell task by echoing 0:
|
|||
|
||||
# echo 0 > tasks
|
||||
|
||||
2.3 Mounting hierarchies by name
|
||||
--------------------------------
|
||||
|
||||
Passing the name=<x> option when mounting a cgroups hierarchy
|
||||
associates the given name with the hierarchy. This can be used when
|
||||
mounting a pre-existing hierarchy, in order to refer to it by name
|
||||
rather than by its set of active subsystems. Each hierarchy is either
|
||||
nameless, or has a unique name.
|
||||
|
||||
The name should match [\w.-]+
|
||||
|
||||
When passing a name=<x> option for a new hierarchy, you need to
|
||||
specify subsystems manually; the legacy behaviour of mounting all
|
||||
subsystems when none are explicitly specified is not supported when
|
||||
you give a subsystem a name.
|
||||
|
||||
The name of the subsystem appears as part of the hierarchy description
|
||||
in /proc/mounts and /proc/<pid>/cgroups.
|
||||
|
||||
|
||||
3. Kernel API
|
||||
=============
|
||||
|
||||
|
@ -501,7 +521,7 @@ rmdir() will fail with it. From this behavior, pre_destroy() can be
|
|||
called multiple times against a cgroup.
|
||||
|
||||
int can_attach(struct cgroup_subsys *ss, struct cgroup *cgrp,
|
||||
struct task_struct *task)
|
||||
struct task_struct *task, bool threadgroup)
|
||||
(cgroup_mutex held by caller)
|
||||
|
||||
Called prior to moving a task into a cgroup; if the subsystem
|
||||
|
@ -509,14 +529,20 @@ returns an error, this will abort the attach operation. If a NULL
|
|||
task is passed, then a successful result indicates that *any*
|
||||
unspecified task can be moved into the cgroup. Note that this isn't
|
||||
called on a fork. If this method returns 0 (success) then this should
|
||||
remain valid while the caller holds cgroup_mutex.
|
||||
remain valid while the caller holds cgroup_mutex. If threadgroup is
|
||||
true, then a successful result indicates that all threads in the given
|
||||
thread's threadgroup can be moved together.
|
||||
|
||||
void attach(struct cgroup_subsys *ss, struct cgroup *cgrp,
|
||||
struct cgroup *old_cgrp, struct task_struct *task)
|
||||
struct cgroup *old_cgrp, struct task_struct *task,
|
||||
bool threadgroup)
|
||||
(cgroup_mutex held by caller)
|
||||
|
||||
Called after the task has been attached to the cgroup, to allow any
|
||||
post-attachment activity that requires memory allocations or blocking.
|
||||
If threadgroup is true, the subsystem should take care of all threads
|
||||
in the specified thread's threadgroup. Currently does not support any
|
||||
subsystem that might need the old_cgrp for every thread in the group.
|
||||
|
||||
void fork(struct cgroup_subsy *ss, struct task_struct *task)
|
||||
|
||||
|
|
|
@ -179,6 +179,9 @@ The reclaim algorithm has not been modified for cgroups, except that
|
|||
pages that are selected for reclaiming come from the per cgroup LRU
|
||||
list.
|
||||
|
||||
NOTE: Reclaim does not work for the root cgroup, since we cannot set any
|
||||
limits on the root cgroup.
|
||||
|
||||
2. Locking
|
||||
|
||||
The memory controller uses the following hierarchy
|
||||
|
@ -210,6 +213,7 @@ We can alter the memory limit:
|
|||
NOTE: We can use a suffix (k, K, m, M, g or G) to indicate values in kilo,
|
||||
mega or gigabytes.
|
||||
NOTE: We can write "-1" to reset the *.limit_in_bytes(unlimited).
|
||||
NOTE: We cannot set limits on the root cgroup any more.
|
||||
|
||||
# cat /cgroups/0/memory.limit_in_bytes
|
||||
4194304
|
||||
|
@ -375,7 +379,42 @@ cgroups created below it.
|
|||
|
||||
NOTE2: This feature can be enabled/disabled per subtree.
|
||||
|
||||
7. TODO
|
||||
7. Soft limits
|
||||
|
||||
Soft limits allow for greater sharing of memory. The idea behind soft limits
|
||||
is to allow control groups to use as much of the memory as needed, provided
|
||||
|
||||
a. There is no memory contention
|
||||
b. They do not exceed their hard limit
|
||||
|
||||
When the system detects memory contention or low memory control groups
|
||||
are pushed back to their soft limits. If the soft limit of each control
|
||||
group is very high, they are pushed back as much as possible to make
|
||||
sure that one control group does not starve the others of memory.
|
||||
|
||||
Please note that soft limits is a best effort feature, it comes with
|
||||
no guarantees, but it does its best to make sure that when memory is
|
||||
heavily contended for, memory is allocated based on the soft limit
|
||||
hints/setup. Currently soft limit based reclaim is setup such that
|
||||
it gets invoked from balance_pgdat (kswapd).
|
||||
|
||||
7.1 Interface
|
||||
|
||||
Soft limits can be setup by using the following commands (in this example we
|
||||
assume a soft limit of 256 megabytes)
|
||||
|
||||
# echo 256M > memory.soft_limit_in_bytes
|
||||
|
||||
If we want to change this to 1G, we can at any time use
|
||||
|
||||
# echo 1G > memory.soft_limit_in_bytes
|
||||
|
||||
NOTE1: Soft limits take effect over a long period of time, since they involve
|
||||
reclaiming memory for balancing between memory cgroups
|
||||
NOTE2: It is recommended to set the soft limit always below the hard limit,
|
||||
otherwise the hard limit will take precedence.
|
||||
|
||||
8. TODO
|
||||
|
||||
1. Add support for accounting huge pages (as a separate controller)
|
||||
2. Make per-cgroup scanner reclaim not-shared pages first
|
||||
|
|
|
@ -54,20 +54,23 @@ features surfaced as a result:
|
|||
|
||||
3.1 General format of the API:
|
||||
struct dma_async_tx_descriptor *
|
||||
async_<operation>(<op specific parameters>,
|
||||
enum async_tx_flags flags,
|
||||
struct dma_async_tx_descriptor *dependency,
|
||||
dma_async_tx_callback callback_routine,
|
||||
void *callback_parameter);
|
||||
async_<operation>(<op specific parameters>, struct async_submit ctl *submit)
|
||||
|
||||
3.2 Supported operations:
|
||||
memcpy - memory copy between a source and a destination buffer
|
||||
memset - fill a destination buffer with a byte value
|
||||
xor - xor a series of source buffers and write the result to a
|
||||
destination buffer
|
||||
xor_zero_sum - xor a series of source buffers and set a flag if the
|
||||
result is zero. The implementation attempts to prevent
|
||||
writes to memory
|
||||
memcpy - memory copy between a source and a destination buffer
|
||||
memset - fill a destination buffer with a byte value
|
||||
xor - xor a series of source buffers and write the result to a
|
||||
destination buffer
|
||||
xor_val - xor a series of source buffers and set a flag if the
|
||||
result is zero. The implementation attempts to prevent
|
||||
writes to memory
|
||||
pq - generate the p+q (raid6 syndrome) from a series of source buffers
|
||||
pq_val - validate that a p and or q buffer are in sync with a given series of
|
||||
sources
|
||||
datap - (raid6_datap_recov) recover a raid6 data block and the p block
|
||||
from the given sources
|
||||
2data - (raid6_2data_recov) recover 2 raid6 data blocks from the given
|
||||
sources
|
||||
|
||||
3.3 Descriptor management:
|
||||
The return value is non-NULL and points to a 'descriptor' when the operation
|
||||
|
@ -80,8 +83,8 @@ acknowledged by the application before the offload engine driver is allowed to
|
|||
recycle (or free) the descriptor. A descriptor can be acked by one of the
|
||||
following methods:
|
||||
1/ setting the ASYNC_TX_ACK flag if no child operations are to be submitted
|
||||
2/ setting the ASYNC_TX_DEP_ACK flag to acknowledge the parent
|
||||
descriptor of a new operation.
|
||||
2/ submitting an unacknowledged descriptor as a dependency to another
|
||||
async_tx call will implicitly set the acknowledged state.
|
||||
3/ calling async_tx_ack() on the descriptor.
|
||||
|
||||
3.4 When does the operation execute?
|
||||
|
@ -119,30 +122,42 @@ of an operation.
|
|||
Perform a xor->copy->xor operation where each operation depends on the
|
||||
result from the previous operation:
|
||||
|
||||
void complete_xor_copy_xor(void *param)
|
||||
void callback(void *param)
|
||||
{
|
||||
printk("complete\n");
|
||||
struct completion *cmp = param;
|
||||
|
||||
complete(cmp);
|
||||
}
|
||||
|
||||
int run_xor_copy_xor(struct page **xor_srcs,
|
||||
int xor_src_cnt,
|
||||
struct page *xor_dest,
|
||||
size_t xor_len,
|
||||
struct page *copy_src,
|
||||
struct page *copy_dest,
|
||||
size_t copy_len)
|
||||
void run_xor_copy_xor(struct page **xor_srcs,
|
||||
int xor_src_cnt,
|
||||
struct page *xor_dest,
|
||||
size_t xor_len,
|
||||
struct page *copy_src,
|
||||
struct page *copy_dest,
|
||||
size_t copy_len)
|
||||
{
|
||||
struct dma_async_tx_descriptor *tx;
|
||||
addr_conv_t addr_conv[xor_src_cnt];
|
||||
struct async_submit_ctl submit;
|
||||
addr_conv_t addr_conv[NDISKS];
|
||||
struct completion cmp;
|
||||
|
||||
tx = async_xor(xor_dest, xor_srcs, 0, xor_src_cnt, xor_len,
|
||||
ASYNC_TX_XOR_DROP_DST, NULL, NULL, NULL);
|
||||
tx = async_memcpy(copy_dest, copy_src, 0, 0, copy_len,
|
||||
ASYNC_TX_DEP_ACK, tx, NULL, NULL);
|
||||
tx = async_xor(xor_dest, xor_srcs, 0, xor_src_cnt, xor_len,
|
||||
ASYNC_TX_XOR_DROP_DST | ASYNC_TX_DEP_ACK | ASYNC_TX_ACK,
|
||||
tx, complete_xor_copy_xor, NULL);
|
||||
init_async_submit(&submit, ASYNC_TX_XOR_DROP_DST, NULL, NULL, NULL,
|
||||
addr_conv);
|
||||
tx = async_xor(xor_dest, xor_srcs, 0, xor_src_cnt, xor_len, &submit)
|
||||
|
||||
submit->depend_tx = tx;
|
||||
tx = async_memcpy(copy_dest, copy_src, 0, 0, copy_len, &submit);
|
||||
|
||||
init_completion(&cmp);
|
||||
init_async_submit(&submit, ASYNC_TX_XOR_DROP_DST | ASYNC_TX_ACK, tx,
|
||||
callback, &cmp, addr_conv);
|
||||
tx = async_xor(xor_dest, xor_srcs, 0, xor_src_cnt, xor_len, &submit);
|
||||
|
||||
async_tx_issue_pending_all();
|
||||
|
||||
wait_for_completion(&cmp);
|
||||
}
|
||||
|
||||
See include/linux/async_tx.h for more information on the flags. See the
|
||||
|
|
|
@ -4,7 +4,7 @@ Shared Subtrees
|
|||
Contents:
|
||||
1) Overview
|
||||
2) Features
|
||||
3) smount command
|
||||
3) Setting mount states
|
||||
4) Use-case
|
||||
5) Detailed semantics
|
||||
6) Quiz
|
||||
|
@ -41,14 +41,14 @@ replicas continue to be exactly same.
|
|||
|
||||
Here is an example:
|
||||
|
||||
Lets say /mnt has a mount that is shared.
|
||||
Let's say /mnt has a mount that is shared.
|
||||
mount --make-shared /mnt
|
||||
|
||||
note: mount command does not yet support the --make-shared flag.
|
||||
I have included a small C program which does the same by executing
|
||||
'smount /mnt shared'
|
||||
Note: mount(8) command now supports the --make-shared flag,
|
||||
so the sample 'smount' program is no longer needed and has been
|
||||
removed.
|
||||
|
||||
#mount --bind /mnt /tmp
|
||||
# mount --bind /mnt /tmp
|
||||
The above command replicates the mount at /mnt to the mountpoint /tmp
|
||||
and the contents of both the mounts remain identical.
|
||||
|
||||
|
@ -58,8 +58,8 @@ replicas continue to be exactly same.
|
|||
#ls /tmp
|
||||
a b c
|
||||
|
||||
Now lets say we mount a device at /tmp/a
|
||||
#mount /dev/sd0 /tmp/a
|
||||
Now let's say we mount a device at /tmp/a
|
||||
# mount /dev/sd0 /tmp/a
|
||||
|
||||
#ls /tmp/a
|
||||
t1 t2 t2
|
||||
|
@ -80,21 +80,20 @@ replicas continue to be exactly same.
|
|||
|
||||
Here is an example:
|
||||
|
||||
Lets say /mnt has a mount which is shared.
|
||||
#mount --make-shared /mnt
|
||||
Let's say /mnt has a mount which is shared.
|
||||
# mount --make-shared /mnt
|
||||
|
||||
Lets bind mount /mnt to /tmp
|
||||
#mount --bind /mnt /tmp
|
||||
Let's bind mount /mnt to /tmp
|
||||
# mount --bind /mnt /tmp
|
||||
|
||||
the new mount at /tmp becomes a shared mount and it is a replica of
|
||||
the mount at /mnt.
|
||||
|
||||
Now lets make the mount at /tmp; a slave of /mnt
|
||||
#mount --make-slave /tmp
|
||||
[or smount /tmp slave]
|
||||
Now let's make the mount at /tmp; a slave of /mnt
|
||||
# mount --make-slave /tmp
|
||||
|
||||
lets mount /dev/sd0 on /mnt/a
|
||||
#mount /dev/sd0 /mnt/a
|
||||
let's mount /dev/sd0 on /mnt/a
|
||||
# mount /dev/sd0 /mnt/a
|
||||
|
||||
#ls /mnt/a
|
||||
t1 t2 t3
|
||||
|
@ -104,9 +103,9 @@ replicas continue to be exactly same.
|
|||
|
||||
Note the mount event has propagated to the mount at /tmp
|
||||
|
||||
However lets see what happens if we mount something on the mount at /tmp
|
||||
However let's see what happens if we mount something on the mount at /tmp
|
||||
|
||||
#mount /dev/sd1 /tmp/b
|
||||
# mount /dev/sd1 /tmp/b
|
||||
|
||||
#ls /tmp/b
|
||||
s1 s2 s3
|
||||
|
@ -124,12 +123,11 @@ replicas continue to be exactly same.
|
|||
|
||||
2d) A unbindable mount is a unbindable private mount
|
||||
|
||||
lets say we have a mount at /mnt and we make is unbindable
|
||||
let's say we have a mount at /mnt and we make is unbindable
|
||||
|
||||
#mount --make-unbindable /mnt
|
||||
[ smount /mnt unbindable ]
|
||||
# mount --make-unbindable /mnt
|
||||
|
||||
Lets try to bind mount this mount somewhere else.
|
||||
Let's try to bind mount this mount somewhere else.
|
||||
# mount --bind /mnt /tmp
|
||||
mount: wrong fs type, bad option, bad superblock on /mnt,
|
||||
or too many mounted file systems
|
||||
|
@ -137,149 +135,15 @@ replicas continue to be exactly same.
|
|||
Binding a unbindable mount is a invalid operation.
|
||||
|
||||
|
||||
3) smount command
|
||||
3) Setting mount states
|
||||
|
||||
Currently the mount command is not aware of shared subtree features.
|
||||
Work is in progress to add the support in mount ( util-linux package ).
|
||||
Till then use the following program.
|
||||
The mount command (util-linux package) can be used to set mount
|
||||
states:
|
||||
|
||||
------------------------------------------------------------------------
|
||||
//
|
||||
//this code was developed my Miklos Szeredi <miklos@szeredi.hu>
|
||||
//and modified by Ram Pai <linuxram@us.ibm.com>
|
||||
// sample usage:
|
||||
// smount /tmp shared
|
||||
//
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <string.h>
|
||||
#include <sys/mount.h>
|
||||
#include <sys/fsuid.h>
|
||||
|
||||
#ifndef MS_REC
|
||||
#define MS_REC 0x4000 /* 16384: Recursive loopback */
|
||||
#endif
|
||||
|
||||
#ifndef MS_SHARED
|
||||
#define MS_SHARED 1<<20 /* Shared */
|
||||
#endif
|
||||
|
||||
#ifndef MS_PRIVATE
|
||||
#define MS_PRIVATE 1<<18 /* Private */
|
||||
#endif
|
||||
|
||||
#ifndef MS_SLAVE
|
||||
#define MS_SLAVE 1<<19 /* Slave */
|
||||
#endif
|
||||
|
||||
#ifndef MS_UNBINDABLE
|
||||
#define MS_UNBINDABLE 1<<17 /* Unbindable */
|
||||
#endif
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
int type;
|
||||
if(argc != 3) {
|
||||
fprintf(stderr, "usage: %s dir "
|
||||
"<rshared|rslave|rprivate|runbindable|shared|slave"
|
||||
"|private|unbindable>\n" , argv[0]);
|
||||
return 1;
|
||||
}
|
||||
|
||||
fprintf(stdout, "%s %s %s\n", argv[0], argv[1], argv[2]);
|
||||
|
||||
if (strcmp(argv[2],"rshared")==0)
|
||||
type=(MS_SHARED|MS_REC);
|
||||
else if (strcmp(argv[2],"rslave")==0)
|
||||
type=(MS_SLAVE|MS_REC);
|
||||
else if (strcmp(argv[2],"rprivate")==0)
|
||||
type=(MS_PRIVATE|MS_REC);
|
||||
else if (strcmp(argv[2],"runbindable")==0)
|
||||
type=(MS_UNBINDABLE|MS_REC);
|
||||
else if (strcmp(argv[2],"shared")==0)
|
||||
type=MS_SHARED;
|
||||
else if (strcmp(argv[2],"slave")==0)
|
||||
type=MS_SLAVE;
|
||||
else if (strcmp(argv[2],"private")==0)
|
||||
type=MS_PRIVATE;
|
||||
else if (strcmp(argv[2],"unbindable")==0)
|
||||
type=MS_UNBINDABLE;
|
||||
else {
|
||||
fprintf(stderr, "invalid operation: %s\n", argv[2]);
|
||||
return 1;
|
||||
}
|
||||
setfsuid(getuid());
|
||||
|
||||
if(mount("", argv[1], "dontcare", type, "") == -1) {
|
||||
perror("mount");
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
-----------------------------------------------------------------------
|
||||
|
||||
Copy the above code snippet into smount.c
|
||||
gcc -o smount smount.c
|
||||
|
||||
|
||||
(i) To mark all the mounts under /mnt as shared execute the following
|
||||
command:
|
||||
|
||||
smount /mnt rshared
|
||||
the corresponding syntax planned for mount command is
|
||||
mount --make-rshared /mnt
|
||||
|
||||
just to mark a mount /mnt as shared, execute the following
|
||||
command:
|
||||
smount /mnt shared
|
||||
the corresponding syntax planned for mount command is
|
||||
mount --make-shared /mnt
|
||||
|
||||
(ii) To mark all the shared mounts under /mnt as slave execute the
|
||||
following
|
||||
|
||||
command:
|
||||
smount /mnt rslave
|
||||
the corresponding syntax planned for mount command is
|
||||
mount --make-rslave /mnt
|
||||
|
||||
just to mark a mount /mnt as slave, execute the following
|
||||
command:
|
||||
smount /mnt slave
|
||||
the corresponding syntax planned for mount command is
|
||||
mount --make-slave /mnt
|
||||
|
||||
(iii) To mark all the mounts under /mnt as private execute the
|
||||
following command:
|
||||
|
||||
smount /mnt rprivate
|
||||
the corresponding syntax planned for mount command is
|
||||
mount --make-rprivate /mnt
|
||||
|
||||
just to mark a mount /mnt as private, execute the following
|
||||
command:
|
||||
smount /mnt private
|
||||
the corresponding syntax planned for mount command is
|
||||
mount --make-private /mnt
|
||||
|
||||
NOTE: by default all the mounts are created as private. But if
|
||||
you want to change some shared/slave/unbindable mount as
|
||||
private at a later point in time, this command can help.
|
||||
|
||||
(iv) To mark all the mounts under /mnt as unbindable execute the
|
||||
following
|
||||
|
||||
command:
|
||||
smount /mnt runbindable
|
||||
the corresponding syntax planned for mount command is
|
||||
mount --make-runbindable /mnt
|
||||
|
||||
just to mark a mount /mnt as unbindable, execute the following
|
||||
command:
|
||||
smount /mnt unbindable
|
||||
the corresponding syntax planned for mount command is
|
||||
mount --make-unbindable /mnt
|
||||
mount --make-shared mountpoint
|
||||
mount --make-slave mountpoint
|
||||
mount --make-private mountpoint
|
||||
mount --make-unbindable mountpoint
|
||||
|
||||
|
||||
4) Use cases
|
||||
|
@ -350,7 +214,7 @@ replicas continue to be exactly same.
|
|||
mount --rbind / /view/v3
|
||||
mount --rbind / /view/v4
|
||||
|
||||
and if /usr has a versioning filesystem mounted, than that
|
||||
and if /usr has a versioning filesystem mounted, then that
|
||||
mount appears at /view/v1/usr, /view/v2/usr, /view/v3/usr and
|
||||
/view/v4/usr too
|
||||
|
||||
|
@ -390,7 +254,7 @@ replicas continue to be exactly same.
|
|||
|
||||
For example:
|
||||
mount --make-shared /mnt
|
||||
mount --bin /mnt /tmp
|
||||
mount --bind /mnt /tmp
|
||||
|
||||
The mount at /mnt and that at /tmp are both shared and belong
|
||||
to the same peer group. Anything mounted or unmounted under
|
||||
|
@ -558,7 +422,7 @@ replicas continue to be exactly same.
|
|||
then the subtree under the unbindable mount is pruned in the new
|
||||
location.
|
||||
|
||||
eg: lets say we have the following mount tree.
|
||||
eg: let's say we have the following mount tree.
|
||||
|
||||
A
|
||||
/ \
|
||||
|
@ -566,7 +430,7 @@ replicas continue to be exactly same.
|
|||
/ \ / \
|
||||
D E F G
|
||||
|
||||
Lets say all the mount except the mount C in the tree are
|
||||
Let's say all the mount except the mount C in the tree are
|
||||
of a type other than unbindable.
|
||||
|
||||
If this tree is rbound to say Z
|
||||
|
@ -683,13 +547,13 @@ replicas continue to be exactly same.
|
|||
'b' on mounts that receive propagation from mount 'B' and does not have
|
||||
sub-mounts within them are unmounted.
|
||||
|
||||
Example: Lets say 'B1', 'B2', 'B3' are shared mounts that propagate to
|
||||
Example: Let's say 'B1', 'B2', 'B3' are shared mounts that propagate to
|
||||
each other.
|
||||
|
||||
lets say 'A1', 'A2', 'A3' are first mounted at dentry 'b' on mount
|
||||
let's say 'A1', 'A2', 'A3' are first mounted at dentry 'b' on mount
|
||||
'B1', 'B2' and 'B3' respectively.
|
||||
|
||||
lets say 'C1', 'C2', 'C3' are next mounted at the same dentry 'b' on
|
||||
let's say 'C1', 'C2', 'C3' are next mounted at the same dentry 'b' on
|
||||
mount 'B1', 'B2' and 'B3' respectively.
|
||||
|
||||
if 'C1' is unmounted, all the mounts that are most-recently-mounted on
|
||||
|
@ -710,7 +574,7 @@ replicas continue to be exactly same.
|
|||
A cloned namespace contains all the mounts as that of the parent
|
||||
namespace.
|
||||
|
||||
Lets say 'A' and 'B' are the corresponding mounts in the parent and the
|
||||
Let's say 'A' and 'B' are the corresponding mounts in the parent and the
|
||||
child namespace.
|
||||
|
||||
If 'A' is shared, then 'B' is also shared and 'A' and 'B' propagate to
|
||||
|
@ -759,11 +623,11 @@ replicas continue to be exactly same.
|
|||
mount --make-slave /mnt
|
||||
|
||||
At this point we have the first mount at /tmp and
|
||||
its root dentry is 1. Lets call this mount 'A'
|
||||
its root dentry is 1. Let's call this mount 'A'
|
||||
And then we have a second mount at /tmp1 with root
|
||||
dentry 2. Lets call this mount 'B'
|
||||
dentry 2. Let's call this mount 'B'
|
||||
Next we have a third mount at /mnt with root dentry
|
||||
mnt. Lets call this mount 'C'
|
||||
mnt. Let's call this mount 'C'
|
||||
|
||||
'B' is the slave of 'A' and 'C' is a slave of 'B'
|
||||
A -> B -> C
|
||||
|
@ -794,7 +658,7 @@ replicas continue to be exactly same.
|
|||
|
||||
Q3 Why is unbindable mount needed?
|
||||
|
||||
Lets say we want to replicate the mount tree at multiple
|
||||
Let's say we want to replicate the mount tree at multiple
|
||||
locations within the same subtree.
|
||||
|
||||
if one rbind mounts a tree within the same subtree 'n' times
|
||||
|
@ -803,7 +667,7 @@ replicas continue to be exactly same.
|
|||
mounts. Here is a example.
|
||||
|
||||
step 1:
|
||||
lets say the root tree has just two directories with
|
||||
let's say the root tree has just two directories with
|
||||
one vfsmount.
|
||||
root
|
||||
/ \
|
||||
|
@ -875,7 +739,7 @@ replicas continue to be exactly same.
|
|||
Unclonable mounts come in handy here.
|
||||
|
||||
step 1:
|
||||
lets say the root tree has just two directories with
|
||||
let's say the root tree has just two directories with
|
||||
one vfsmount.
|
||||
root
|
||||
/ \
|
||||
|
|
|
@ -536,6 +536,7 @@ struct address_space_operations {
|
|||
/* migrate the contents of a page to the specified target */
|
||||
int (*migratepage) (struct page *, struct page *);
|
||||
int (*launder_page) (struct page *);
|
||||
int (*error_remove_page) (struct mapping *mapping, struct page *page);
|
||||
};
|
||||
|
||||
writepage: called by the VM to write a dirty page to backing store.
|
||||
|
@ -694,6 +695,12 @@ struct address_space_operations {
|
|||
prevent redirtying the page, it is kept locked during the whole
|
||||
operation.
|
||||
|
||||
error_remove_page: normally set to generic_error_remove_page if truncation
|
||||
is ok for this address space. Used for memory failure handling.
|
||||
Setting this implies you deal with pages going away under you,
|
||||
unless you have them locked or reference counts increased.
|
||||
|
||||
|
||||
The File Object
|
||||
===============
|
||||
|
||||
|
|
|
@ -135,6 +135,7 @@ Code Seq# Include File Comments
|
|||
<http://mikonos.dia.unisa.it/tcfs>
|
||||
'l' 40-7F linux/udf_fs_i.h in development:
|
||||
<http://sourceforge.net/projects/linux-udf/>
|
||||
'm' 00-09 linux/mmtimer.h
|
||||
'm' all linux/mtio.h conflict!
|
||||
'm' all linux/soundcard.h conflict!
|
||||
'm' all linux/synclink.h conflict!
|
||||
|
|
|
@ -96,13 +96,16 @@ handles that the Linux kernel will allocate. When you get lots
|
|||
of error messages about running out of file handles, you might
|
||||
want to increase this limit.
|
||||
|
||||
The three values in file-nr denote the number of allocated
|
||||
file handles, the number of unused file handles and the maximum
|
||||
number of file handles. When the allocated file handles come
|
||||
close to the maximum, but the number of unused file handles is
|
||||
significantly greater than 0, you've encountered a peak in your
|
||||
usage of file handles and you don't need to increase the maximum.
|
||||
Historically, the three values in file-nr denoted the number of
|
||||
allocated file handles, the number of allocated but unused file
|
||||
handles, and the maximum number of file handles. Linux 2.6 always
|
||||
reports 0 as the number of free file handles -- this is not an
|
||||
error, it just means that the number of allocated file handles
|
||||
exactly matches the number of used file handles.
|
||||
|
||||
Attempts to allocate more file descriptors than file-max are
|
||||
reported with printk, look for "VFS: file-max limit <number>
|
||||
reached".
|
||||
==============================================================
|
||||
|
||||
nr_open:
|
||||
|
|
|
@ -22,6 +22,7 @@ show up in /proc/sys/kernel:
|
|||
- callhome [ S390 only ]
|
||||
- auto_msgmni
|
||||
- core_pattern
|
||||
- core_pipe_limit
|
||||
- core_uses_pid
|
||||
- ctrl-alt-del
|
||||
- dentry-state
|
||||
|
@ -135,6 +136,27 @@ core_pattern is used to specify a core dumpfile pattern name.
|
|||
|
||||
==============================================================
|
||||
|
||||
core_pipe_limit:
|
||||
|
||||
This sysctl is only applicable when core_pattern is configured to pipe core
|
||||
files to user space helper a (when the first character of core_pattern is a '|',
|
||||
see above). When collecting cores via a pipe to an application, it is
|
||||
occasionally usefull for the collecting application to gather data about the
|
||||
crashing process from its /proc/pid directory. In order to do this safely, the
|
||||
kernel must wait for the collecting process to exit, so as not to remove the
|
||||
crashing processes proc files prematurely. This in turn creates the possibility
|
||||
that a misbehaving userspace collecting process can block the reaping of a
|
||||
crashed process simply by never exiting. This sysctl defends against that. It
|
||||
defines how many concurrent crashing processes may be piped to user space
|
||||
applications in parallel. If this value is exceeded, then those crashing
|
||||
processes above that value are noted via the kernel log and their cores are
|
||||
skipped. 0 is a special value, indicating that unlimited processes may be
|
||||
captured in parallel, but that no waiting will take place (i.e. the collecting
|
||||
process is not guaranteed access to /proc/<crahing pid>/). This value defaults
|
||||
to 0.
|
||||
|
||||
==============================================================
|
||||
|
||||
core_uses_pid:
|
||||
|
||||
The default coredump filename is "core". By setting
|
||||
|
|
|
@ -32,6 +32,8 @@ Currently, these files are in /proc/sys/vm:
|
|||
- legacy_va_layout
|
||||
- lowmem_reserve_ratio
|
||||
- max_map_count
|
||||
- memory_failure_early_kill
|
||||
- memory_failure_recovery
|
||||
- min_free_kbytes
|
||||
- min_slab_ratio
|
||||
- min_unmapped_ratio
|
||||
|
@ -53,7 +55,6 @@ Currently, these files are in /proc/sys/vm:
|
|||
- vfs_cache_pressure
|
||||
- zone_reclaim_mode
|
||||
|
||||
|
||||
==============================================================
|
||||
|
||||
block_dump
|
||||
|
@ -275,6 +276,44 @@ e.g., up to one or two maps per allocation.
|
|||
|
||||
The default value is 65536.
|
||||
|
||||
=============================================================
|
||||
|
||||
memory_failure_early_kill:
|
||||
|
||||
Control how to kill processes when uncorrected memory error (typically
|
||||
a 2bit error in a memory module) is detected in the background by hardware
|
||||
that cannot be handled by the kernel. In some cases (like the page
|
||||
still having a valid copy on disk) the kernel will handle the failure
|
||||
transparently without affecting any applications. But if there is
|
||||
no other uptodate copy of the data it will kill to prevent any data
|
||||
corruptions from propagating.
|
||||
|
||||
1: Kill all processes that have the corrupted and not reloadable page mapped
|
||||
as soon as the corruption is detected. Note this is not supported
|
||||
for a few types of pages, like kernel internally allocated data or
|
||||
the swap cache, but works for the majority of user pages.
|
||||
|
||||
0: Only unmap the corrupted page from all processes and only kill a process
|
||||
who tries to access it.
|
||||
|
||||
The kill is done using a catchable SIGBUS with BUS_MCEERR_AO, so processes can
|
||||
handle this if they want to.
|
||||
|
||||
This is only active on architectures/platforms with advanced machine
|
||||
check handling and depends on the hardware capabilities.
|
||||
|
||||
Applications can override this setting individually with the PR_MCE_KILL prctl
|
||||
|
||||
==============================================================
|
||||
|
||||
memory_failure_recovery
|
||||
|
||||
Enable memory failure recovery (when supported by the platform)
|
||||
|
||||
1: Attempt recovery.
|
||||
|
||||
0: Always panic on a memory failure.
|
||||
|
||||
==============================================================
|
||||
|
||||
min_free_kbytes:
|
||||
|
|
1
Documentation/vm/.gitignore
vendored
1
Documentation/vm/.gitignore
vendored
|
@ -1 +1,2 @@
|
|||
page-types
|
||||
slabinfo
|
||||
|
|
|
@ -80,7 +80,7 @@ Note: PTL can also be used to guarantee that no new clones using the
|
|||
mm start up ... this is a loose form of stability on mm_users. For
|
||||
example, it is used in copy_mm to protect against a racing tlb_gather_mmu
|
||||
single address space optimization, so that the zap_page_range (from
|
||||
vmtruncate) does not lose sending ipi's to cloned threads that might
|
||||
truncate) does not lose sending ipi's to cloned threads that might
|
||||
be spawned underneath it and go to user mode to drag in pte's into tlbs.
|
||||
|
||||
swap_lock
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
* Copyright (C) 2009 Wu Fengguang <fengguang.wu@intel.com>
|
||||
*/
|
||||
|
||||
#define _LARGEFILE64_SOURCE
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
|
@ -13,11 +14,32 @@
|
|||
#include <string.h>
|
||||
#include <getopt.h>
|
||||
#include <limits.h>
|
||||
#include <assert.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/errno.h>
|
||||
#include <sys/fcntl.h>
|
||||
|
||||
|
||||
/*
|
||||
* pagemap kernel ABI bits
|
||||
*/
|
||||
|
||||
#define PM_ENTRY_BYTES sizeof(uint64_t)
|
||||
#define PM_STATUS_BITS 3
|
||||
#define PM_STATUS_OFFSET (64 - PM_STATUS_BITS)
|
||||
#define PM_STATUS_MASK (((1LL << PM_STATUS_BITS) - 1) << PM_STATUS_OFFSET)
|
||||
#define PM_STATUS(nr) (((nr) << PM_STATUS_OFFSET) & PM_STATUS_MASK)
|
||||
#define PM_PSHIFT_BITS 6
|
||||
#define PM_PSHIFT_OFFSET (PM_STATUS_OFFSET - PM_PSHIFT_BITS)
|
||||
#define PM_PSHIFT_MASK (((1LL << PM_PSHIFT_BITS) - 1) << PM_PSHIFT_OFFSET)
|
||||
#define PM_PSHIFT(x) (((u64) (x) << PM_PSHIFT_OFFSET) & PM_PSHIFT_MASK)
|
||||
#define PM_PFRAME_MASK ((1LL << PM_PSHIFT_OFFSET) - 1)
|
||||
#define PM_PFRAME(x) ((x) & PM_PFRAME_MASK)
|
||||
|
||||
#define PM_PRESENT PM_STATUS(4LL)
|
||||
#define PM_SWAP PM_STATUS(2LL)
|
||||
|
||||
|
||||
/*
|
||||
* kernel page flags
|
||||
*/
|
||||
|
@ -126,6 +148,14 @@ static int nr_addr_ranges;
|
|||
static unsigned long opt_offset[MAX_ADDR_RANGES];
|
||||
static unsigned long opt_size[MAX_ADDR_RANGES];
|
||||
|
||||
#define MAX_VMAS 10240
|
||||
static int nr_vmas;
|
||||
static unsigned long pg_start[MAX_VMAS];
|
||||
static unsigned long pg_end[MAX_VMAS];
|
||||
static unsigned long voffset;
|
||||
|
||||
static int pagemap_fd;
|
||||
|
||||
#define MAX_BIT_FILTERS 64
|
||||
static int nr_bit_filters;
|
||||
static uint64_t opt_mask[MAX_BIT_FILTERS];
|
||||
|
@ -135,7 +165,6 @@ static int page_size;
|
|||
|
||||
#define PAGES_BATCH (64 << 10) /* 64k pages */
|
||||
static int kpageflags_fd;
|
||||
static uint64_t kpageflags_buf[KPF_BYTES * PAGES_BATCH];
|
||||
|
||||
#define HASH_SHIFT 13
|
||||
#define HASH_SIZE (1 << HASH_SHIFT)
|
||||
|
@ -158,6 +187,11 @@ static uint64_t page_flags[HASH_SIZE];
|
|||
type __min2 = (y); \
|
||||
__min1 < __min2 ? __min1 : __min2; })
|
||||
|
||||
#define max_t(type, x, y) ({ \
|
||||
type __max1 = (x); \
|
||||
type __max2 = (y); \
|
||||
__max1 > __max2 ? __max1 : __max2; })
|
||||
|
||||
static unsigned long pages2mb(unsigned long pages)
|
||||
{
|
||||
return (pages * page_size) >> 20;
|
||||
|
@ -224,26 +258,34 @@ static char *page_flag_longname(uint64_t flags)
|
|||
static void show_page_range(unsigned long offset, uint64_t flags)
|
||||
{
|
||||
static uint64_t flags0;
|
||||
static unsigned long voff;
|
||||
static unsigned long index;
|
||||
static unsigned long count;
|
||||
|
||||
if (flags == flags0 && offset == index + count) {
|
||||
if (flags == flags0 && offset == index + count &&
|
||||
(!opt_pid || voffset == voff + count)) {
|
||||
count++;
|
||||
return;
|
||||
}
|
||||
|
||||
if (count)
|
||||
printf("%lu\t%lu\t%s\n",
|
||||
if (count) {
|
||||
if (opt_pid)
|
||||
printf("%lx\t", voff);
|
||||
printf("%lx\t%lx\t%s\n",
|
||||
index, count, page_flag_name(flags0));
|
||||
}
|
||||
|
||||
flags0 = flags;
|
||||
index = offset;
|
||||
voff = voffset;
|
||||
count = 1;
|
||||
}
|
||||
|
||||
static void show_page(unsigned long offset, uint64_t flags)
|
||||
{
|
||||
printf("%lu\t%s\n", offset, page_flag_name(flags));
|
||||
if (opt_pid)
|
||||
printf("%lx\t", voffset);
|
||||
printf("%lx\t%s\n", offset, page_flag_name(flags));
|
||||
}
|
||||
|
||||
static void show_summary(void)
|
||||
|
@ -383,6 +425,8 @@ static void walk_pfn(unsigned long index, unsigned long count)
|
|||
lseek(kpageflags_fd, index * KPF_BYTES, SEEK_SET);
|
||||
|
||||
while (count) {
|
||||
uint64_t kpageflags_buf[KPF_BYTES * PAGES_BATCH];
|
||||
|
||||
batch = min_t(unsigned long, count, PAGES_BATCH);
|
||||
n = read(kpageflags_fd, kpageflags_buf, batch * KPF_BYTES);
|
||||
if (n == 0)
|
||||
|
@ -404,6 +448,81 @@ static void walk_pfn(unsigned long index, unsigned long count)
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
#define PAGEMAP_BATCH 4096
|
||||
static unsigned long task_pfn(unsigned long pgoff)
|
||||
{
|
||||
static uint64_t buf[PAGEMAP_BATCH];
|
||||
static unsigned long start;
|
||||
static long count;
|
||||
uint64_t pfn;
|
||||
|
||||
if (pgoff < start || pgoff >= start + count) {
|
||||
if (lseek64(pagemap_fd,
|
||||
(uint64_t)pgoff * PM_ENTRY_BYTES,
|
||||
SEEK_SET) < 0) {
|
||||
perror("pagemap seek");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
count = read(pagemap_fd, buf, sizeof(buf));
|
||||
if (count == 0)
|
||||
return 0;
|
||||
if (count < 0) {
|
||||
perror("pagemap read");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
if (count % PM_ENTRY_BYTES) {
|
||||
fatal("pagemap read not aligned.\n");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
count /= PM_ENTRY_BYTES;
|
||||
start = pgoff;
|
||||
}
|
||||
|
||||
pfn = buf[pgoff - start];
|
||||
if (pfn & PM_PRESENT)
|
||||
pfn = PM_PFRAME(pfn);
|
||||
else
|
||||
pfn = 0;
|
||||
|
||||
return pfn;
|
||||
}
|
||||
|
||||
static void walk_task(unsigned long index, unsigned long count)
|
||||
{
|
||||
int i = 0;
|
||||
const unsigned long end = index + count;
|
||||
|
||||
while (index < end) {
|
||||
|
||||
while (pg_end[i] <= index)
|
||||
if (++i >= nr_vmas)
|
||||
return;
|
||||
if (pg_start[i] >= end)
|
||||
return;
|
||||
|
||||
voffset = max_t(unsigned long, pg_start[i], index);
|
||||
index = min_t(unsigned long, pg_end[i], end);
|
||||
|
||||
assert(voffset < index);
|
||||
for (; voffset < index; voffset++) {
|
||||
unsigned long pfn = task_pfn(voffset);
|
||||
if (pfn)
|
||||
walk_pfn(pfn, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void add_addr_range(unsigned long offset, unsigned long size)
|
||||
{
|
||||
if (nr_addr_ranges >= MAX_ADDR_RANGES)
|
||||
fatal("too many addr ranges\n");
|
||||
|
||||
opt_offset[nr_addr_ranges] = offset;
|
||||
opt_size[nr_addr_ranges] = min_t(unsigned long, size, ULONG_MAX-offset);
|
||||
nr_addr_ranges++;
|
||||
}
|
||||
|
||||
static void walk_addr_ranges(void)
|
||||
{
|
||||
int i;
|
||||
|
@ -415,10 +534,13 @@ static void walk_addr_ranges(void)
|
|||
}
|
||||
|
||||
if (!nr_addr_ranges)
|
||||
walk_pfn(0, ULONG_MAX);
|
||||
add_addr_range(0, ULONG_MAX);
|
||||
|
||||
for (i = 0; i < nr_addr_ranges; i++)
|
||||
walk_pfn(opt_offset[i], opt_size[i]);
|
||||
if (!opt_pid)
|
||||
walk_pfn(opt_offset[i], opt_size[i]);
|
||||
else
|
||||
walk_task(opt_offset[i], opt_size[i]);
|
||||
|
||||
close(kpageflags_fd);
|
||||
}
|
||||
|
@ -446,8 +568,8 @@ static void usage(void)
|
|||
" -r|--raw Raw mode, for kernel developers\n"
|
||||
" -a|--addr addr-spec Walk a range of pages\n"
|
||||
" -b|--bits bits-spec Walk pages with specified bits\n"
|
||||
#if 0 /* planned features */
|
||||
" -p|--pid pid Walk process address space\n"
|
||||
#if 0 /* planned features */
|
||||
" -f|--file filename Walk file address space\n"
|
||||
#endif
|
||||
" -l|--list Show page details in ranges\n"
|
||||
|
@ -459,7 +581,7 @@ static void usage(void)
|
|||
" N+M pages range from N to N+M-1\n"
|
||||
" N,M pages range from N to M-1\n"
|
||||
" N, pages range from N to end\n"
|
||||
" ,M pages range from 0 to M\n"
|
||||
" ,M pages range from 0 to M-1\n"
|
||||
"bits-spec:\n"
|
||||
" bit1,bit2 (flags & (bit1|bit2)) != 0\n"
|
||||
" bit1,bit2=bit1 (flags & (bit1|bit2)) == bit1\n"
|
||||
|
@ -496,23 +618,59 @@ static unsigned long long parse_number(const char *str)
|
|||
|
||||
static void parse_pid(const char *str)
|
||||
{
|
||||
FILE *file;
|
||||
char buf[5000];
|
||||
|
||||
opt_pid = parse_number(str);
|
||||
|
||||
sprintf(buf, "/proc/%d/pagemap", opt_pid);
|
||||
pagemap_fd = open(buf, O_RDONLY);
|
||||
if (pagemap_fd < 0) {
|
||||
perror(buf);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
sprintf(buf, "/proc/%d/maps", opt_pid);
|
||||
file = fopen(buf, "r");
|
||||
if (!file) {
|
||||
perror(buf);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
while (fgets(buf, sizeof(buf), file) != NULL) {
|
||||
unsigned long vm_start;
|
||||
unsigned long vm_end;
|
||||
unsigned long long pgoff;
|
||||
int major, minor;
|
||||
char r, w, x, s;
|
||||
unsigned long ino;
|
||||
int n;
|
||||
|
||||
n = sscanf(buf, "%lx-%lx %c%c%c%c %llx %x:%x %lu",
|
||||
&vm_start,
|
||||
&vm_end,
|
||||
&r, &w, &x, &s,
|
||||
&pgoff,
|
||||
&major, &minor,
|
||||
&ino);
|
||||
if (n < 10) {
|
||||
fprintf(stderr, "unexpected line: %s\n", buf);
|
||||
continue;
|
||||
}
|
||||
pg_start[nr_vmas] = vm_start / page_size;
|
||||
pg_end[nr_vmas] = vm_end / page_size;
|
||||
if (++nr_vmas >= MAX_VMAS) {
|
||||
fprintf(stderr, "too many VMAs\n");
|
||||
break;
|
||||
}
|
||||
}
|
||||
fclose(file);
|
||||
}
|
||||
|
||||
static void parse_file(const char *name)
|
||||
{
|
||||
}
|
||||
|
||||
static void add_addr_range(unsigned long offset, unsigned long size)
|
||||
{
|
||||
if (nr_addr_ranges >= MAX_ADDR_RANGES)
|
||||
fatal("too much addr ranges\n");
|
||||
|
||||
opt_offset[nr_addr_ranges] = offset;
|
||||
opt_size[nr_addr_ranges] = size;
|
||||
nr_addr_ranges++;
|
||||
}
|
||||
|
||||
static void parse_addr_range(const char *optarg)
|
||||
{
|
||||
unsigned long offset;
|
||||
|
@ -676,8 +834,10 @@ int main(int argc, char *argv[])
|
|||
}
|
||||
}
|
||||
|
||||
if (opt_list && opt_pid)
|
||||
printf("voffset\t");
|
||||
if (opt_list == 1)
|
||||
printf("offset\tcount\tflags\n");
|
||||
printf("offset\tlen\tflags\n");
|
||||
if (opt_list == 2)
|
||||
printf("offset\tflags\n");
|
||||
|
||||
|
|
33
MAINTAINERS
33
MAINTAINERS
|
@ -257,12 +257,6 @@ W: http://www.lesswatts.org/projects/acpi/
|
|||
S: Supported
|
||||
F: drivers/acpi/fan.c
|
||||
|
||||
ACPI PCI HOTPLUG DRIVER
|
||||
M: Kristen Carlson Accardi <kristen.c.accardi@intel.com>
|
||||
L: linux-pci@vger.kernel.org
|
||||
S: Supported
|
||||
F: drivers/pci/hotplug/acpi*
|
||||
|
||||
ACPI THERMAL DRIVER
|
||||
M: Zhang Rui <rui.zhang@intel.com>
|
||||
L: linux-acpi@vger.kernel.org
|
||||
|
@ -689,7 +683,7 @@ S: Maintained
|
|||
ARM/INTEL IXP4XX ARM ARCHITECTURE
|
||||
M: Imre Kaloz <kaloz@openwrt.org>
|
||||
M: Krzysztof Halasa <khc@pm.waw.pl>
|
||||
L: linux-arm-kernel@lists.infradead.org
|
||||
L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
|
||||
S: Maintained
|
||||
F: arch/arm/mach-ixp4xx/
|
||||
|
||||
|
@ -746,18 +740,22 @@ M: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
|
|||
M: Dirk Opfer <dirk@opfer-online.de>
|
||||
S: Maintained
|
||||
|
||||
ARM/PALMTX,PALMT5,PALMLD,PALMTE2 SUPPORT
|
||||
M: Marek Vasut <marek.vasut@gmail.com>
|
||||
ARM/PALMTX,PALMT5,PALMLD,PALMTE2,PALMTC SUPPORT
|
||||
P: Marek Vasut
|
||||
M: marek.vasut@gmail.com
|
||||
L: linux-arm-kernel@lists.infradead.org
|
||||
W: http://hackndev.com
|
||||
S: Maintained
|
||||
|
||||
ARM/PALM TREO 680 SUPPORT
|
||||
M: Tomas Cech <sleep_walker@suse.cz>
|
||||
L: linux-arm-kernel@lists.infradead.org
|
||||
W: http://hackndev.com
|
||||
S: Maintained
|
||||
|
||||
ARM/PALMZ72 SUPPORT
|
||||
M: Sergey Lapin <slapin@ossfans.org>
|
||||
L: linux-arm-kernel@lists.infradead.org
|
||||
W: http://hackndev.com
|
||||
S: Maintained
|
||||
|
||||
|
@ -2331,7 +2329,9 @@ S: Orphan
|
|||
F: drivers/hwmon/
|
||||
|
||||
HARDWARE RANDOM NUMBER GENERATOR CORE
|
||||
S: Orphan
|
||||
M: Matt Mackall <mpm@selenic.com>
|
||||
M: Herbert Xu <herbert@gondor.apana.org.au>
|
||||
S: Odd fixes
|
||||
F: Documentation/hw_random.txt
|
||||
F: drivers/char/hw_random/
|
||||
F: include/linux/hw_random.h
|
||||
|
@ -4003,11 +4003,11 @@ F: Documentation/PCI/
|
|||
F: drivers/pci/
|
||||
F: include/linux/pci*
|
||||
|
||||
PCIE HOTPLUG DRIVER
|
||||
M: Kristen Carlson Accardi <kristen.c.accardi@intel.com>
|
||||
PCI HOTPLUG
|
||||
M: Jesse Barnes <jbarnes@virtuousgeek.org>
|
||||
L: linux-pci@vger.kernel.org
|
||||
S: Supported
|
||||
F: drivers/pci/pcie/
|
||||
F: drivers/pci/hotplug
|
||||
|
||||
PCMCIA SUBSYSTEM
|
||||
P: Linux PCMCIA Team
|
||||
|
@ -4670,12 +4670,6 @@ F: drivers/serial/serial_lh7a40x.c
|
|||
F: drivers/usb/gadget/lh7a40*
|
||||
F: drivers/usb/host/ohci-lh7a40*
|
||||
|
||||
SHPC HOTPLUG DRIVER
|
||||
M: Kristen Carlson Accardi <kristen.c.accardi@intel.com>
|
||||
L: linux-pci@vger.kernel.org
|
||||
S: Supported
|
||||
F: drivers/pci/hotplug/shpchp*
|
||||
|
||||
SIMPLE FIRMWARE INTERFACE (SFI)
|
||||
P: Len Brown
|
||||
M: lenb@kernel.org
|
||||
|
@ -4687,7 +4681,6 @@ F: arch/x86/kernel/*sfi*
|
|||
F: drivers/sfi/
|
||||
F: include/linux/sfi*.h
|
||||
|
||||
|
||||
SIMTEC EB110ATX (Chalice CATS)
|
||||
P: Ben Dooks
|
||||
M: Vincent Sanders <support@simtec.co.uk>
|
||||
|
|
|
@ -26,6 +26,8 @@
|
|||
#define F_GETOWN 6 /* for sockets. */
|
||||
#define F_SETSIG 10 /* for sockets. */
|
||||
#define F_GETSIG 11 /* for sockets. */
|
||||
#define F_SETOWN_EX 12
|
||||
#define F_GETOWN_EX 13
|
||||
|
||||
/* for posix fcntl() and lockf() */
|
||||
#define F_RDLCK 1
|
||||
|
|
|
@ -1016,7 +1016,7 @@ marvel_agp_bind_memory(alpha_agp_info *agp, off_t pg_start, struct agp_memory *m
|
|||
{
|
||||
struct marvel_agp_aperture *aper = agp->aperture.sysdata;
|
||||
return iommu_bind(aper->arena, aper->pg_start + pg_start,
|
||||
mem->page_count, mem->memory);
|
||||
mem->page_count, mem->pages);
|
||||
}
|
||||
|
||||
static int
|
||||
|
|
|
@ -680,7 +680,7 @@ titan_agp_bind_memory(alpha_agp_info *agp, off_t pg_start, struct agp_memory *me
|
|||
{
|
||||
struct titan_agp_aperture *aper = agp->aperture.sysdata;
|
||||
return iommu_bind(aper->arena, aper->pg_start + pg_start,
|
||||
mem->page_count, mem->memory);
|
||||
mem->page_count, mem->pages);
|
||||
}
|
||||
|
||||
static int
|
||||
|
|
|
@ -13,6 +13,5 @@ static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
|
|||
struct task_struct init_task = INIT_TASK(init_task);
|
||||
EXPORT_SYMBOL(init_task);
|
||||
|
||||
union thread_union init_thread_union
|
||||
__attribute__((section(".data.init_thread")))
|
||||
= { INIT_THREAD_INFO(init_task) };
|
||||
union thread_union init_thread_union __init_task_data =
|
||||
{ INIT_THREAD_INFO(init_task) };
|
||||
|
|
|
@ -198,7 +198,7 @@ extern unsigned long size_for_memory(unsigned long max);
|
|||
|
||||
extern int iommu_reserve(struct pci_iommu_arena *, long, long);
|
||||
extern int iommu_release(struct pci_iommu_arena *, long, long);
|
||||
extern int iommu_bind(struct pci_iommu_arena *, long, long, unsigned long *);
|
||||
extern int iommu_bind(struct pci_iommu_arena *, long, long, struct page **);
|
||||
extern int iommu_unbind(struct pci_iommu_arena *, long, long);
|
||||
|
||||
|
||||
|
|
|
@ -876,7 +876,7 @@ iommu_release(struct pci_iommu_arena *arena, long pg_start, long pg_count)
|
|||
|
||||
int
|
||||
iommu_bind(struct pci_iommu_arena *arena, long pg_start, long pg_count,
|
||||
unsigned long *physaddrs)
|
||||
struct page **pages)
|
||||
{
|
||||
unsigned long flags;
|
||||
unsigned long *ptes;
|
||||
|
@ -896,7 +896,7 @@ iommu_bind(struct pci_iommu_arena *arena, long pg_start, long pg_count,
|
|||
}
|
||||
|
||||
for(i = 0, j = pg_start; i < pg_count; i++, j++)
|
||||
ptes[j] = mk_iommu_pte(physaddrs[i]);
|
||||
ptes[j] = mk_iommu_pte(page_to_phys(pages[i]));
|
||||
|
||||
spin_unlock_irqrestore(&arena->lock, flags);
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
#include <asm-generic/vmlinux.lds.h>
|
||||
#include <asm/page.h>
|
||||
#include <asm/thread_info.h>
|
||||
|
||||
OUTPUT_FORMAT("elf64-alpha")
|
||||
OUTPUT_ARCH(alpha)
|
||||
|
@ -31,88 +32,21 @@ SECTIONS
|
|||
} :kernel
|
||||
|
||||
RODATA
|
||||
|
||||
/* Exception table */
|
||||
. = ALIGN(16);
|
||||
__ex_table : {
|
||||
__start___ex_table = .;
|
||||
*(__ex_table)
|
||||
__stop___ex_table = .;
|
||||
}
|
||||
EXCEPTION_TABLE(16)
|
||||
|
||||
/* Will be freed after init */
|
||||
. = ALIGN(PAGE_SIZE);
|
||||
/* Init code and data */
|
||||
__init_begin = .;
|
||||
.init.text : {
|
||||
_sinittext = .;
|
||||
INIT_TEXT
|
||||
_einittext = .;
|
||||
}
|
||||
.init.data : {
|
||||
INIT_DATA
|
||||
}
|
||||
|
||||
. = ALIGN(16);
|
||||
.init.setup : {
|
||||
__setup_start = .;
|
||||
*(.init.setup)
|
||||
__setup_end = .;
|
||||
}
|
||||
|
||||
. = ALIGN(8);
|
||||
.initcall.init : {
|
||||
__initcall_start = .;
|
||||
INITCALLS
|
||||
__initcall_end = .;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_BLK_DEV_INITRD
|
||||
. = ALIGN(PAGE_SIZE);
|
||||
.init.ramfs : {
|
||||
__initramfs_start = .;
|
||||
*(.init.ramfs)
|
||||
__initramfs_end = .;
|
||||
}
|
||||
#endif
|
||||
|
||||
. = ALIGN(8);
|
||||
.con_initcall.init : {
|
||||
__con_initcall_start = .;
|
||||
*(.con_initcall.init)
|
||||
__con_initcall_end = .;
|
||||
}
|
||||
|
||||
. = ALIGN(8);
|
||||
SECURITY_INIT
|
||||
|
||||
__init_begin = ALIGN(PAGE_SIZE);
|
||||
INIT_TEXT_SECTION(PAGE_SIZE)
|
||||
INIT_DATA_SECTION(16)
|
||||
PERCPU(PAGE_SIZE)
|
||||
|
||||
. = ALIGN(2 * PAGE_SIZE);
|
||||
/* Align to THREAD_SIZE rather than PAGE_SIZE here so any padding page
|
||||
needed for the THREAD_SIZE aligned init_task gets freed after init */
|
||||
. = ALIGN(THREAD_SIZE);
|
||||
__init_end = .;
|
||||
/* Freed after init ends here */
|
||||
|
||||
/* Note 2 page alignment above. */
|
||||
.data.init_thread : {
|
||||
*(.data.init_thread)
|
||||
}
|
||||
|
||||
. = ALIGN(PAGE_SIZE);
|
||||
.data.page_aligned : {
|
||||
*(.data.page_aligned)
|
||||
}
|
||||
|
||||
. = ALIGN(64);
|
||||
.data.cacheline_aligned : {
|
||||
*(.data.cacheline_aligned)
|
||||
}
|
||||
|
||||
_data = .;
|
||||
/* Data */
|
||||
.data : {
|
||||
DATA_DATA
|
||||
CONSTRUCTORS
|
||||
}
|
||||
RW_DATA_SECTION(64, PAGE_SIZE, THREAD_SIZE)
|
||||
|
||||
.got : {
|
||||
*(.got)
|
||||
|
@ -122,16 +56,7 @@ SECTIONS
|
|||
}
|
||||
_edata = .; /* End of data section */
|
||||
|
||||
__bss_start = .;
|
||||
.sbss : {
|
||||
*(.sbss)
|
||||
*(.scommon)
|
||||
}
|
||||
.bss : {
|
||||
*(.bss)
|
||||
*(COMMON)
|
||||
}
|
||||
__bss_stop = .;
|
||||
BSS_SECTION(0, 0, 0)
|
||||
_end = .;
|
||||
|
||||
.mdebug 0 : {
|
||||
|
|
|
@ -46,6 +46,10 @@ config GENERIC_CLOCKEVENTS_BROADCAST
|
|||
depends on GENERIC_CLOCKEVENTS
|
||||
default y if SMP && !LOCAL_TIMERS
|
||||
|
||||
config HAVE_TCM
|
||||
bool
|
||||
select GENERIC_ALLOCATOR
|
||||
|
||||
config NO_IOPORT
|
||||
bool
|
||||
|
||||
|
@ -649,6 +653,7 @@ config ARCH_U300
|
|||
bool "ST-Ericsson U300 Series"
|
||||
depends on MMU
|
||||
select CPU_ARM926T
|
||||
select HAVE_TCM
|
||||
select ARM_AMBA
|
||||
select ARM_VIC
|
||||
select GENERIC_TIME
|
||||
|
|
|
@ -865,6 +865,7 @@ void locomo_gpio_set_dir(struct device *dev, unsigned int bits, unsigned int dir
|
|||
|
||||
spin_unlock_irqrestore(&lchip->lock, flags);
|
||||
}
|
||||
EXPORT_SYMBOL(locomo_gpio_set_dir);
|
||||
|
||||
int locomo_gpio_read_level(struct device *dev, unsigned int bits)
|
||||
{
|
||||
|
@ -882,6 +883,7 @@ int locomo_gpio_read_level(struct device *dev, unsigned int bits)
|
|||
ret &= bits;
|
||||
return ret;
|
||||
}
|
||||
EXPORT_SYMBOL(locomo_gpio_read_level);
|
||||
|
||||
int locomo_gpio_read_output(struct device *dev, unsigned int bits)
|
||||
{
|
||||
|
@ -899,6 +901,7 @@ int locomo_gpio_read_output(struct device *dev, unsigned int bits)
|
|||
ret &= bits;
|
||||
return ret;
|
||||
}
|
||||
EXPORT_SYMBOL(locomo_gpio_read_output);
|
||||
|
||||
void locomo_gpio_write(struct device *dev, unsigned int bits, unsigned int set)
|
||||
{
|
||||
|
@ -920,6 +923,7 @@ void locomo_gpio_write(struct device *dev, unsigned int bits, unsigned int set)
|
|||
|
||||
spin_unlock_irqrestore(&lchip->lock, flags);
|
||||
}
|
||||
EXPORT_SYMBOL(locomo_gpio_write);
|
||||
|
||||
static void locomo_m62332_sendbit(void *mapbase, int bit)
|
||||
{
|
||||
|
@ -1084,13 +1088,12 @@ void locomo_m62332_senddata(struct locomo_dev *ldev, unsigned int dac_data, int
|
|||
|
||||
spin_unlock_irqrestore(&lchip->lock, flags);
|
||||
}
|
||||
EXPORT_SYMBOL(locomo_m62332_senddata);
|
||||
|
||||
/*
|
||||
* Frontlight control
|
||||
*/
|
||||
|
||||
static struct locomo *locomo_chip_driver(struct locomo_dev *ldev);
|
||||
|
||||
void locomo_frontlight_set(struct locomo_dev *dev, int duty, int vr, int bpwf)
|
||||
{
|
||||
unsigned long flags;
|
||||
|
@ -1182,11 +1185,13 @@ int locomo_driver_register(struct locomo_driver *driver)
|
|||
driver->drv.bus = &locomo_bus_type;
|
||||
return driver_register(&driver->drv);
|
||||
}
|
||||
EXPORT_SYMBOL(locomo_driver_register);
|
||||
|
||||
void locomo_driver_unregister(struct locomo_driver *driver)
|
||||
{
|
||||
driver_unregister(&driver->drv);
|
||||
}
|
||||
EXPORT_SYMBOL(locomo_driver_unregister);
|
||||
|
||||
static int __init locomo_init(void)
|
||||
{
|
||||
|
@ -1208,11 +1213,3 @@ module_exit(locomo_exit);
|
|||
MODULE_DESCRIPTION("Sharp LoCoMo core driver");
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_AUTHOR("John Lenz <lenz@cs.wisc.edu>");
|
||||
|
||||
EXPORT_SYMBOL(locomo_driver_register);
|
||||
EXPORT_SYMBOL(locomo_driver_unregister);
|
||||
EXPORT_SYMBOL(locomo_gpio_set_dir);
|
||||
EXPORT_SYMBOL(locomo_gpio_read_level);
|
||||
EXPORT_SYMBOL(locomo_gpio_read_output);
|
||||
EXPORT_SYMBOL(locomo_gpio_write);
|
||||
EXPORT_SYMBOL(locomo_m62332_senddata);
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
#include <linux/list.h>
|
||||
#include <linux/io.h>
|
||||
#include <linux/sysdev.h>
|
||||
#include <linux/device.h>
|
||||
#include <linux/amba/bus.h>
|
||||
|
||||
#include <asm/mach/irq.h>
|
||||
|
|
|
@ -1,783 +0,0 @@
|
|||
#
|
||||
# Automatically generated make config: don't edit
|
||||
# Linux kernel version: 2.6.24-rc5
|
||||
# Fri Dec 21 11:06:19 2007
|
||||
#
|
||||
CONFIG_ARM=y
|
||||
CONFIG_SYS_SUPPORTS_APM_EMULATION=y
|
||||
CONFIG_GENERIC_GPIO=y
|
||||
CONFIG_GENERIC_TIME=y
|
||||
CONFIG_GENERIC_CLOCKEVENTS=y
|
||||
CONFIG_MMU=y
|
||||
# CONFIG_NO_IOPORT is not set
|
||||
CONFIG_GENERIC_HARDIRQS=y
|
||||
CONFIG_STACKTRACE_SUPPORT=y
|
||||
CONFIG_LOCKDEP_SUPPORT=y
|
||||
CONFIG_TRACE_IRQFLAGS_SUPPORT=y
|
||||
CONFIG_HARDIRQS_SW_RESEND=y
|
||||
CONFIG_GENERIC_IRQ_PROBE=y
|
||||
CONFIG_RWSEM_GENERIC_SPINLOCK=y
|
||||
# CONFIG_ARCH_HAS_ILOG2_U32 is not set
|
||||
# CONFIG_ARCH_HAS_ILOG2_U64 is not set
|
||||
CONFIG_GENERIC_HWEIGHT=y
|
||||
CONFIG_GENERIC_CALIBRATE_DELAY=y
|
||||
CONFIG_ZONE_DMA=y
|
||||
CONFIG_ARCH_MTD_XIP=y
|
||||
CONFIG_VECTORS_BASE=0xffff0000
|
||||
CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
|
||||
|
||||
#
|
||||
# General setup
|
||||
#
|
||||
CONFIG_EXPERIMENTAL=y
|
||||
CONFIG_BROKEN_ON_SMP=y
|
||||
CONFIG_LOCK_KERNEL=y
|
||||
CONFIG_INIT_ENV_ARG_LIMIT=32
|
||||
CONFIG_LOCALVERSION=""
|
||||
CONFIG_LOCALVERSION_AUTO=y
|
||||
CONFIG_SWAP=y
|
||||
CONFIG_SYSVIPC=y
|
||||
CONFIG_SYSVIPC_SYSCTL=y
|
||||
# CONFIG_POSIX_MQUEUE is not set
|
||||
# CONFIG_BSD_PROCESS_ACCT is not set
|
||||
# CONFIG_TASKSTATS is not set
|
||||
# CONFIG_USER_NS is not set
|
||||
# CONFIG_PID_NS is not set
|
||||
# CONFIG_AUDIT is not set
|
||||
# CONFIG_IKCONFIG is not set
|
||||
CONFIG_LOG_BUF_SHIFT=14
|
||||
# CONFIG_CGROUPS is not set
|
||||
CONFIG_FAIR_GROUP_SCHED=y
|
||||
CONFIG_FAIR_USER_SCHED=y
|
||||
# CONFIG_FAIR_CGROUP_SCHED is not set
|
||||
CONFIG_SYSFS_DEPRECATED=y
|
||||
# CONFIG_RELAY is not set
|
||||
CONFIG_BLK_DEV_INITRD=y
|
||||
CONFIG_INITRAMFS_SOURCE=""
|
||||
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
|
||||
CONFIG_SYSCTL=y
|
||||
# CONFIG_EMBEDDED is not set
|
||||
CONFIG_UID16=y
|
||||
CONFIG_SYSCTL_SYSCALL=y
|
||||
CONFIG_KALLSYMS=y
|
||||
# CONFIG_KALLSYMS_ALL is not set
|
||||
# CONFIG_KALLSYMS_EXTRA_PASS is not set
|
||||
CONFIG_HOTPLUG=y
|
||||
CONFIG_PRINTK=y
|
||||
CONFIG_BUG=y
|
||||
CONFIG_ELF_CORE=y
|
||||
CONFIG_BASE_FULL=y
|
||||
CONFIG_FUTEX=y
|
||||
CONFIG_ANON_INODES=y
|
||||
CONFIG_EPOLL=y
|
||||
CONFIG_SIGNALFD=y
|
||||
CONFIG_EVENTFD=y
|
||||
CONFIG_SHMEM=y
|
||||
CONFIG_VM_EVENT_COUNTERS=y
|
||||
CONFIG_SLAB=y
|
||||
# CONFIG_SLUB is not set
|
||||
# CONFIG_SLOB is not set
|
||||
CONFIG_RT_MUTEXES=y
|
||||
# CONFIG_TINY_SHMEM is not set
|
||||
CONFIG_BASE_SMALL=0
|
||||
CONFIG_MODULES=y
|
||||
CONFIG_MODULE_UNLOAD=y
|
||||
CONFIG_MODULE_FORCE_UNLOAD=y
|
||||
# CONFIG_MODVERSIONS is not set
|
||||
# CONFIG_MODULE_SRCVERSION_ALL is not set
|
||||
# CONFIG_KMOD is not set
|
||||
CONFIG_BLOCK=y
|
||||
# CONFIG_LBD is not set
|
||||
# CONFIG_BLK_DEV_IO_TRACE is not set
|
||||
# CONFIG_LSF is not set
|
||||
# CONFIG_BLK_DEV_BSG is not set
|
||||
|
||||
#
|
||||
# IO Schedulers
|
||||
#
|
||||
CONFIG_IOSCHED_NOOP=y
|
||||
CONFIG_IOSCHED_AS=y
|
||||
CONFIG_IOSCHED_DEADLINE=y
|
||||
CONFIG_IOSCHED_CFQ=y
|
||||
# CONFIG_DEFAULT_AS is not set
|
||||
# CONFIG_DEFAULT_DEADLINE is not set
|
||||
CONFIG_DEFAULT_CFQ=y
|
||||
# CONFIG_DEFAULT_NOOP is not set
|
||||
CONFIG_DEFAULT_IOSCHED="cfq"
|
||||
|
||||
#
|
||||
# System Type
|
||||
#
|
||||
# CONFIG_ARCH_AAEC2000 is not set
|
||||
# CONFIG_ARCH_INTEGRATOR is not set
|
||||
# CONFIG_ARCH_REALVIEW is not set
|
||||
# CONFIG_ARCH_VERSATILE is not set
|
||||
# CONFIG_ARCH_AT91 is not set
|
||||
# CONFIG_ARCH_CLPS7500 is not set
|
||||
# CONFIG_ARCH_CLPS711X is not set
|
||||
# CONFIG_ARCH_CO285 is not set
|
||||
# CONFIG_ARCH_EBSA110 is not set
|
||||
# CONFIG_ARCH_EP93XX is not set
|
||||
# CONFIG_ARCH_FOOTBRIDGE is not set
|
||||
# CONFIG_ARCH_NETX is not set
|
||||
# CONFIG_ARCH_H720X is not set
|
||||
# CONFIG_ARCH_IMX is not set
|
||||
# CONFIG_ARCH_IOP13XX is not set
|
||||
# CONFIG_ARCH_IOP32X is not set
|
||||
# CONFIG_ARCH_IOP33X is not set
|
||||
# CONFIG_ARCH_IXP23XX is not set
|
||||
# CONFIG_ARCH_IXP2000 is not set
|
||||
# CONFIG_ARCH_IXP4XX is not set
|
||||
# CONFIG_ARCH_L7200 is not set
|
||||
# CONFIG_ARCH_KS8695 is not set
|
||||
# CONFIG_ARCH_NS9XXX is not set
|
||||
# CONFIG_ARCH_MXC is not set
|
||||
# CONFIG_ARCH_PNX4008 is not set
|
||||
CONFIG_ARCH_PXA=y
|
||||
# CONFIG_ARCH_RPC is not set
|
||||
# CONFIG_ARCH_SA1100 is not set
|
||||
# CONFIG_ARCH_S3C2410 is not set
|
||||
# CONFIG_ARCH_SHARK is not set
|
||||
# CONFIG_ARCH_LH7A40X is not set
|
||||
# CONFIG_ARCH_DAVINCI is not set
|
||||
# CONFIG_ARCH_OMAP is not set
|
||||
|
||||
#
|
||||
# Intel PXA2xx/PXA3xx Implementations
|
||||
#
|
||||
|
||||
#
|
||||
# Supported PXA3xx Processor Variants
|
||||
#
|
||||
CONFIG_CPU_PXA300=y
|
||||
CONFIG_CPU_PXA310=y
|
||||
# CONFIG_CPU_PXA320 is not set
|
||||
# CONFIG_ARCH_LUBBOCK is not set
|
||||
# CONFIG_MACH_LOGICPD_PXA270 is not set
|
||||
# CONFIG_MACH_MAINSTONE is not set
|
||||
# CONFIG_ARCH_PXA_IDP is not set
|
||||
# CONFIG_PXA_SHARPSL is not set
|
||||
# CONFIG_MACH_TRIZEPS4 is not set
|
||||
# CONFIG_MACH_EM_X270 is not set
|
||||
# CONFIG_MACH_ZYLONITE is not set
|
||||
CONFIG_MACH_LITTLETON=y
|
||||
# CONFIG_MACH_ARMCORE is not set
|
||||
CONFIG_PXA3xx=y
|
||||
CONFIG_PXA_SSP=y
|
||||
|
||||
#
|
||||
# Boot options
|
||||
#
|
||||
|
||||
#
|
||||
# Power management
|
||||
#
|
||||
|
||||
#
|
||||
# Processor Type
|
||||
#
|
||||
CONFIG_CPU_32=y
|
||||
CONFIG_CPU_XSC3=y
|
||||
CONFIG_CPU_32v5=y
|
||||
CONFIG_CPU_ABRT_EV5T=y
|
||||
CONFIG_CPU_CACHE_VIVT=y
|
||||
CONFIG_CPU_TLB_V4WBI=y
|
||||
CONFIG_CPU_CP15=y
|
||||
CONFIG_CPU_CP15_MMU=y
|
||||
CONFIG_IO_36=y
|
||||
|
||||
#
|
||||
# Processor Features
|
||||
#
|
||||
# CONFIG_ARM_THUMB is not set
|
||||
# CONFIG_CPU_DCACHE_DISABLE is not set
|
||||
# CONFIG_CPU_BPREDICT_DISABLE is not set
|
||||
# CONFIG_OUTER_CACHE is not set
|
||||
CONFIG_IWMMXT=y
|
||||
|
||||
#
|
||||
# Bus support
|
||||
#
|
||||
# CONFIG_PCI_SYSCALL is not set
|
||||
# CONFIG_ARCH_SUPPORTS_MSI is not set
|
||||
# CONFIG_PCCARD is not set
|
||||
|
||||
#
|
||||
# Kernel Features
|
||||
#
|
||||
CONFIG_TICK_ONESHOT=y
|
||||
# CONFIG_NO_HZ is not set
|
||||
# CONFIG_HIGH_RES_TIMERS is not set
|
||||
CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
|
||||
CONFIG_PREEMPT=y
|
||||
CONFIG_HZ=100
|
||||
CONFIG_AEABI=y
|
||||
CONFIG_OABI_COMPAT=y
|
||||
# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set
|
||||
CONFIG_SELECT_MEMORY_MODEL=y
|
||||
CONFIG_FLATMEM_MANUAL=y
|
||||
# CONFIG_DISCONTIGMEM_MANUAL is not set
|
||||
# CONFIG_SPARSEMEM_MANUAL is not set
|
||||
CONFIG_FLATMEM=y
|
||||
CONFIG_FLAT_NODE_MEM_MAP=y
|
||||
# CONFIG_SPARSEMEM_STATIC is not set
|
||||
# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
|
||||
CONFIG_SPLIT_PTLOCK_CPUS=4096
|
||||
# CONFIG_RESOURCES_64BIT is not set
|
||||
CONFIG_ZONE_DMA_FLAG=1
|
||||
CONFIG_BOUNCE=y
|
||||
CONFIG_VIRT_TO_BUS=y
|
||||
CONFIG_ALIGNMENT_TRAP=y
|
||||
|
||||
#
|
||||
# Boot options
|
||||
#
|
||||
CONFIG_ZBOOT_ROM_TEXT=0x0
|
||||
CONFIG_ZBOOT_ROM_BSS=0x0
|
||||
CONFIG_CMDLINE="root=/dev/nfs rootfstype=nfs nfsroot=192.168.1.100:/nfsroot/ ip=192.168.1.101:192.168.1.100::255.255.255.0::eth0:on console=ttyS2,38400 mem=64M"
|
||||
# CONFIG_XIP_KERNEL is not set
|
||||
# CONFIG_KEXEC is not set
|
||||
|
||||
#
|
||||
# CPU Frequency scaling
|
||||
#
|
||||
# CONFIG_CPU_FREQ is not set
|
||||
|
||||
#
|
||||
# Floating point emulation
|
||||
#
|
||||
|
||||
#
|
||||
# At least one emulation must be selected
|
||||
#
|
||||
CONFIG_FPE_NWFPE=y
|
||||
# CONFIG_FPE_NWFPE_XP is not set
|
||||
# CONFIG_FPE_FASTFPE is not set
|
||||
|
||||
#
|
||||
# Userspace binary formats
|
||||
#
|
||||
CONFIG_BINFMT_ELF=y
|
||||
# CONFIG_BINFMT_AOUT is not set
|
||||
# CONFIG_BINFMT_MISC is not set
|
||||
|
||||
#
|
||||
# Power management options
|
||||
#
|
||||
# CONFIG_PM is not set
|
||||
CONFIG_SUSPEND_UP_POSSIBLE=y
|
||||
|
||||
#
|
||||
# Networking
|
||||
#
|
||||
CONFIG_NET=y
|
||||
|
||||
#
|
||||
# Networking options
|
||||
#
|
||||
CONFIG_PACKET=y
|
||||
# CONFIG_PACKET_MMAP is not set
|
||||
CONFIG_UNIX=y
|
||||
CONFIG_XFRM=y
|
||||
# CONFIG_XFRM_USER is not set
|
||||
# CONFIG_XFRM_SUB_POLICY is not set
|
||||
# CONFIG_XFRM_MIGRATE is not set
|
||||
# CONFIG_NET_KEY is not set
|
||||
CONFIG_INET=y
|
||||
# CONFIG_IP_MULTICAST is not set
|
||||
# CONFIG_IP_ADVANCED_ROUTER is not set
|
||||
CONFIG_IP_FIB_HASH=y
|
||||
CONFIG_IP_PNP=y
|
||||
# CONFIG_IP_PNP_DHCP is not set
|
||||
# CONFIG_IP_PNP_BOOTP is not set
|
||||
# CONFIG_IP_PNP_RARP is not set
|
||||
# CONFIG_NET_IPIP is not set
|
||||
# CONFIG_NET_IPGRE is not set
|
||||
# CONFIG_ARPD is not set
|
||||
# CONFIG_SYN_COOKIES is not set
|
||||
# CONFIG_INET_AH is not set
|
||||
# CONFIG_INET_ESP is not set
|
||||
# CONFIG_INET_IPCOMP is not set
|
||||
# CONFIG_INET_XFRM_TUNNEL is not set
|
||||
# CONFIG_INET_TUNNEL is not set
|
||||
CONFIG_INET_XFRM_MODE_TRANSPORT=y
|
||||
CONFIG_INET_XFRM_MODE_TUNNEL=y
|
||||
CONFIG_INET_XFRM_MODE_BEET=y
|
||||
# CONFIG_INET_LRO is not set
|
||||
CONFIG_INET_DIAG=y
|
||||
CONFIG_INET_TCP_DIAG=y
|
||||
# CONFIG_TCP_CONG_ADVANCED is not set
|
||||
CONFIG_TCP_CONG_CUBIC=y
|
||||
CONFIG_DEFAULT_TCP_CONG="cubic"
|
||||
# CONFIG_TCP_MD5SIG is not set
|
||||
# CONFIG_IPV6 is not set
|
||||
# CONFIG_INET6_XFRM_TUNNEL is not set
|
||||
# CONFIG_INET6_TUNNEL is not set
|
||||
# CONFIG_NETWORK_SECMARK is not set
|
||||
# CONFIG_NETFILTER is not set
|
||||
# CONFIG_IP_DCCP is not set
|
||||
# CONFIG_IP_SCTP is not set
|
||||
# CONFIG_TIPC is not set
|
||||
# CONFIG_ATM is not set
|
||||
# CONFIG_BRIDGE is not set
|
||||
# CONFIG_VLAN_8021Q is not set
|
||||
# CONFIG_DECNET is not set
|
||||
# CONFIG_LLC2 is not set
|
||||
# CONFIG_IPX is not set
|
||||
# CONFIG_ATALK is not set
|
||||
# CONFIG_X25 is not set
|
||||
# CONFIG_LAPB is not set
|
||||
# CONFIG_ECONET is not set
|
||||
# CONFIG_WAN_ROUTER is not set
|
||||
# CONFIG_NET_SCHED is not set
|
||||
|
||||
#
|
||||
# Network testing
|
||||
#
|
||||
# CONFIG_NET_PKTGEN is not set
|
||||
# CONFIG_HAMRADIO is not set
|
||||
# CONFIG_IRDA is not set
|
||||
# CONFIG_BT is not set
|
||||
# CONFIG_AF_RXRPC is not set
|
||||
|
||||
#
|
||||
# Wireless
|
||||
#
|
||||
# CONFIG_CFG80211 is not set
|
||||
# CONFIG_WIRELESS_EXT is not set
|
||||
# CONFIG_MAC80211 is not set
|
||||
# CONFIG_IEEE80211 is not set
|
||||
# CONFIG_RFKILL is not set
|
||||
# CONFIG_NET_9P is not set
|
||||
|
||||
#
|
||||
# Device Drivers
|
||||
#
|
||||
|
||||
#
|
||||
# Generic Driver Options
|
||||
#
|
||||
CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
|
||||
# CONFIG_STANDALONE is not set
|
||||
# CONFIG_PREVENT_FIRMWARE_BUILD is not set
|
||||
CONFIG_FW_LOADER=y
|
||||
# CONFIG_DEBUG_DRIVER is not set
|
||||
# CONFIG_DEBUG_DEVRES is not set
|
||||
# CONFIG_SYS_HYPERVISOR is not set
|
||||
# CONFIG_CONNECTOR is not set
|
||||
# CONFIG_MTD is not set
|
||||
# CONFIG_PARPORT is not set
|
||||
# CONFIG_BLK_DEV is not set
|
||||
# CONFIG_MISC_DEVICES is not set
|
||||
# CONFIG_IDE is not set
|
||||
|
||||
#
|
||||
# SCSI device support
|
||||
#
|
||||
# CONFIG_RAID_ATTRS is not set
|
||||
# CONFIG_SCSI is not set
|
||||
# CONFIG_SCSI_DMA is not set
|
||||
# CONFIG_SCSI_NETLINK is not set
|
||||
# CONFIG_ATA is not set
|
||||
# CONFIG_MD is not set
|
||||
CONFIG_NETDEVICES=y
|
||||
# CONFIG_NETDEVICES_MULTIQUEUE is not set
|
||||
# CONFIG_DUMMY is not set
|
||||
# CONFIG_BONDING is not set
|
||||
# CONFIG_MACVLAN is not set
|
||||
# CONFIG_EQUALIZER is not set
|
||||
# CONFIG_TUN is not set
|
||||
# CONFIG_VETH is not set
|
||||
# CONFIG_PHYLIB is not set
|
||||
CONFIG_NET_ETHERNET=y
|
||||
CONFIG_MII=y
|
||||
# CONFIG_AX88796 is not set
|
||||
CONFIG_SMC91X=y
|
||||
# CONFIG_DM9000 is not set
|
||||
# CONFIG_SMC911X is not set
|
||||
# CONFIG_IBM_NEW_EMAC_ZMII is not set
|
||||
# CONFIG_IBM_NEW_EMAC_RGMII is not set
|
||||
# CONFIG_IBM_NEW_EMAC_TAH is not set
|
||||
# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
|
||||
# CONFIG_B44 is not set
|
||||
# CONFIG_NETDEV_1000 is not set
|
||||
# CONFIG_NETDEV_10000 is not set
|
||||
|
||||
#
|
||||
# Wireless LAN
|
||||
#
|
||||
# CONFIG_WLAN_PRE80211 is not set
|
||||
# CONFIG_WLAN_80211 is not set
|
||||
# CONFIG_WAN is not set
|
||||
# CONFIG_PPP is not set
|
||||
# CONFIG_SLIP is not set
|
||||
# CONFIG_SHAPER is not set
|
||||
# CONFIG_NETCONSOLE is not set
|
||||
# CONFIG_NETPOLL is not set
|
||||
# CONFIG_NET_POLL_CONTROLLER is not set
|
||||
# CONFIG_ISDN is not set
|
||||
|
||||
#
|
||||
# Input device support
|
||||
#
|
||||
CONFIG_INPUT=y
|
||||
# CONFIG_INPUT_FF_MEMLESS is not set
|
||||
# CONFIG_INPUT_POLLDEV is not set
|
||||
|
||||
#
|
||||
# Userland interfaces
|
||||
#
|
||||
CONFIG_INPUT_MOUSEDEV=y
|
||||
# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
|
||||
CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
|
||||
CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
|
||||
# CONFIG_INPUT_JOYDEV is not set
|
||||
# CONFIG_INPUT_EVDEV is not set
|
||||
# CONFIG_INPUT_EVBUG is not set
|
||||
|
||||
#
|
||||
# Input Device Drivers
|
||||
#
|
||||
# CONFIG_INPUT_KEYBOARD is not set
|
||||
# CONFIG_INPUT_MOUSE is not set
|
||||
# CONFIG_INPUT_JOYSTICK is not set
|
||||
# CONFIG_INPUT_TABLET is not set
|
||||
# CONFIG_INPUT_TOUCHSCREEN is not set
|
||||
# CONFIG_INPUT_MISC is not set
|
||||
|
||||
#
|
||||
# Hardware I/O ports
|
||||
#
|
||||
# CONFIG_SERIO is not set
|
||||
# CONFIG_GAMEPORT is not set
|
||||
|
||||
#
|
||||
# Character devices
|
||||
#
|
||||
CONFIG_VT=y
|
||||
CONFIG_VT_CONSOLE=y
|
||||
CONFIG_HW_CONSOLE=y
|
||||
# CONFIG_VT_HW_CONSOLE_BINDING is not set
|
||||
# CONFIG_SERIAL_NONSTANDARD is not set
|
||||
|
||||
#
|
||||
# Serial drivers
|
||||
#
|
||||
# CONFIG_SERIAL_8250 is not set
|
||||
|
||||
#
|
||||
# Non-8250 serial port support
|
||||
#
|
||||
CONFIG_SERIAL_PXA=y
|
||||
CONFIG_SERIAL_PXA_CONSOLE=y
|
||||
CONFIG_SERIAL_CORE=y
|
||||
CONFIG_SERIAL_CORE_CONSOLE=y
|
||||
CONFIG_UNIX98_PTYS=y
|
||||
# CONFIG_LEGACY_PTYS is not set
|
||||
# CONFIG_IPMI_HANDLER is not set
|
||||
# CONFIG_HW_RANDOM is not set
|
||||
# CONFIG_NVRAM is not set
|
||||
# CONFIG_R3964 is not set
|
||||
# CONFIG_RAW_DRIVER is not set
|
||||
# CONFIG_TCG_TPM is not set
|
||||
# CONFIG_I2C is not set
|
||||
|
||||
#
|
||||
# SPI support
|
||||
#
|
||||
# CONFIG_SPI is not set
|
||||
# CONFIG_SPI_MASTER is not set
|
||||
# CONFIG_W1 is not set
|
||||
# CONFIG_POWER_SUPPLY is not set
|
||||
# CONFIG_HWMON is not set
|
||||
# CONFIG_WATCHDOG is not set
|
||||
|
||||
#
|
||||
# Sonics Silicon Backplane
|
||||
#
|
||||
CONFIG_SSB_POSSIBLE=y
|
||||
# CONFIG_SSB is not set
|
||||
|
||||
#
|
||||
# Multifunction device drivers
|
||||
#
|
||||
# CONFIG_MFD_SM501 is not set
|
||||
|
||||
#
|
||||
# Multimedia devices
|
||||
#
|
||||
# CONFIG_VIDEO_DEV is not set
|
||||
# CONFIG_DVB_CORE is not set
|
||||
# CONFIG_DAB is not set
|
||||
|
||||
#
|
||||
# Graphics support
|
||||
#
|
||||
# CONFIG_VGASTATE is not set
|
||||
# CONFIG_VIDEO_OUTPUT_CONTROL is not set
|
||||
CONFIG_FB=y
|
||||
# CONFIG_FIRMWARE_EDID is not set
|
||||
# CONFIG_FB_DDC is not set
|
||||
CONFIG_FB_CFB_FILLRECT=y
|
||||
CONFIG_FB_CFB_COPYAREA=y
|
||||
CONFIG_FB_CFB_IMAGEBLIT=y
|
||||
# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set
|
||||
# CONFIG_FB_SYS_FILLRECT is not set
|
||||
# CONFIG_FB_SYS_COPYAREA is not set
|
||||
# CONFIG_FB_SYS_IMAGEBLIT is not set
|
||||
# CONFIG_FB_SYS_FOPS is not set
|
||||
CONFIG_FB_DEFERRED_IO=y
|
||||
# CONFIG_FB_SVGALIB is not set
|
||||
# CONFIG_FB_MACMODES is not set
|
||||
# CONFIG_FB_BACKLIGHT is not set
|
||||
# CONFIG_FB_MODE_HELPERS is not set
|
||||
# CONFIG_FB_TILEBLITTING is not set
|
||||
|
||||
#
|
||||
# Frame buffer hardware drivers
|
||||
#
|
||||
# CONFIG_FB_S1D13XXX is not set
|
||||
CONFIG_FB_PXA=y
|
||||
# CONFIG_FB_PXA_PARAMETERS is not set
|
||||
# CONFIG_FB_MBX is not set
|
||||
# CONFIG_FB_VIRTUAL is not set
|
||||
# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
|
||||
|
||||
#
|
||||
# Display device support
|
||||
#
|
||||
# CONFIG_DISPLAY_SUPPORT is not set
|
||||
|
||||
#
|
||||
# Console display driver support
|
||||
#
|
||||
# CONFIG_VGA_CONSOLE is not set
|
||||
CONFIG_DUMMY_CONSOLE=y
|
||||
CONFIG_FRAMEBUFFER_CONSOLE=y
|
||||
# CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY is not set
|
||||
# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set
|
||||
CONFIG_FONTS=y
|
||||
# CONFIG_FONT_8x8 is not set
|
||||
CONFIG_FONT_8x16=y
|
||||
# CONFIG_FONT_6x11 is not set
|
||||
# CONFIG_FONT_7x14 is not set
|
||||
# CONFIG_FONT_PEARL_8x8 is not set
|
||||
# CONFIG_FONT_ACORN_8x8 is not set
|
||||
# CONFIG_FONT_MINI_4x6 is not set
|
||||
# CONFIG_FONT_SUN8x16 is not set
|
||||
# CONFIG_FONT_SUN12x22 is not set
|
||||
# CONFIG_FONT_10x18 is not set
|
||||
CONFIG_LOGO=y
|
||||
CONFIG_LOGO_LINUX_MONO=y
|
||||
CONFIG_LOGO_LINUX_VGA16=y
|
||||
CONFIG_LOGO_LINUX_CLUT224=y
|
||||
|
||||
#
|
||||
# Sound
|
||||
#
|
||||
# CONFIG_SOUND is not set
|
||||
# CONFIG_HID_SUPPORT is not set
|
||||
# CONFIG_USB_SUPPORT is not set
|
||||
# CONFIG_MMC is not set
|
||||
# CONFIG_NEW_LEDS is not set
|
||||
CONFIG_RTC_LIB=y
|
||||
# CONFIG_RTC_CLASS is not set
|
||||
|
||||
#
|
||||
# File systems
|
||||
#
|
||||
# CONFIG_EXT2_FS is not set
|
||||
# CONFIG_EXT3_FS is not set
|
||||
# CONFIG_EXT4DEV_FS is not set
|
||||
# CONFIG_REISERFS_FS is not set
|
||||
# CONFIG_JFS_FS is not set
|
||||
CONFIG_FS_POSIX_ACL=y
|
||||
# CONFIG_XFS_FS is not set
|
||||
# CONFIG_GFS2_FS is not set
|
||||
# CONFIG_OCFS2_FS is not set
|
||||
# CONFIG_MINIX_FS is not set
|
||||
# CONFIG_ROMFS_FS is not set
|
||||
# CONFIG_INOTIFY is not set
|
||||
# CONFIG_QUOTA is not set
|
||||
# CONFIG_DNOTIFY is not set
|
||||
# CONFIG_AUTOFS_FS is not set
|
||||
# CONFIG_AUTOFS4_FS is not set
|
||||
# CONFIG_FUSE_FS is not set
|
||||
|
||||
#
|
||||
# CD-ROM/DVD Filesystems
|
||||
#
|
||||
# CONFIG_ISO9660_FS is not set
|
||||
# CONFIG_UDF_FS is not set
|
||||
|
||||
#
|
||||
# DOS/FAT/NT Filesystems
|
||||
#
|
||||
# CONFIG_MSDOS_FS is not set
|
||||
# CONFIG_VFAT_FS is not set
|
||||
# CONFIG_NTFS_FS is not set
|
||||
|
||||
#
|
||||
# Pseudo filesystems
|
||||
#
|
||||
CONFIG_PROC_FS=y
|
||||
CONFIG_PROC_SYSCTL=y
|
||||
CONFIG_SYSFS=y
|
||||
# CONFIG_TMPFS is not set
|
||||
# CONFIG_HUGETLB_PAGE is not set
|
||||
# CONFIG_CONFIGFS_FS is not set
|
||||
|
||||
#
|
||||
# Miscellaneous filesystems
|
||||
#
|
||||
# CONFIG_ADFS_FS is not set
|
||||
# CONFIG_AFFS_FS is not set
|
||||
# CONFIG_HFS_FS is not set
|
||||
# CONFIG_HFSPLUS_FS is not set
|
||||
# CONFIG_BEFS_FS is not set
|
||||
# CONFIG_BFS_FS is not set
|
||||
# CONFIG_EFS_FS is not set
|
||||
# CONFIG_CRAMFS is not set
|
||||
# CONFIG_VXFS_FS is not set
|
||||
# CONFIG_HPFS_FS is not set
|
||||
# CONFIG_QNX4FS_FS is not set
|
||||
# CONFIG_SYSV_FS is not set
|
||||
# CONFIG_UFS_FS is not set
|
||||
CONFIG_NETWORK_FILESYSTEMS=y
|
||||
CONFIG_NFS_FS=y
|
||||
CONFIG_NFS_V3=y
|
||||
CONFIG_NFS_V3_ACL=y
|
||||
CONFIG_NFS_V4=y
|
||||
CONFIG_NFS_DIRECTIO=y
|
||||
# CONFIG_NFSD is not set
|
||||
CONFIG_ROOT_NFS=y
|
||||
CONFIG_LOCKD=y
|
||||
CONFIG_LOCKD_V4=y
|
||||
CONFIG_NFS_ACL_SUPPORT=y
|
||||
CONFIG_NFS_COMMON=y
|
||||
CONFIG_SUNRPC=y
|
||||
CONFIG_SUNRPC_GSS=y
|
||||
# CONFIG_SUNRPC_BIND34 is not set
|
||||
CONFIG_RPCSEC_GSS_KRB5=y
|
||||
# CONFIG_RPCSEC_GSS_SPKM3 is not set
|
||||
# CONFIG_SMB_FS is not set
|
||||
# CONFIG_CIFS is not set
|
||||
# CONFIG_NCP_FS is not set
|
||||
# CONFIG_CODA_FS is not set
|
||||
# CONFIG_AFS_FS is not set
|
||||
|
||||
#
|
||||
# Partition Types
|
||||
#
|
||||
# CONFIG_PARTITION_ADVANCED is not set
|
||||
CONFIG_MSDOS_PARTITION=y
|
||||
# CONFIG_NLS is not set
|
||||
# CONFIG_DLM is not set
|
||||
# CONFIG_INSTRUMENTATION is not set
|
||||
|
||||
#
|
||||
# Kernel hacking
|
||||
#
|
||||
CONFIG_PRINTK_TIME=y
|
||||
CONFIG_ENABLE_WARN_DEPRECATED=y
|
||||
CONFIG_ENABLE_MUST_CHECK=y
|
||||
CONFIG_MAGIC_SYSRQ=y
|
||||
# CONFIG_UNUSED_SYMBOLS is not set
|
||||
# CONFIG_DEBUG_FS is not set
|
||||
# CONFIG_HEADERS_CHECK is not set
|
||||
CONFIG_DEBUG_KERNEL=y
|
||||
# CONFIG_DEBUG_SHIRQ is not set
|
||||
CONFIG_DETECT_SOFTLOCKUP=y
|
||||
CONFIG_SCHED_DEBUG=y
|
||||
# CONFIG_SCHEDSTATS is not set
|
||||
# CONFIG_TIMER_STATS is not set
|
||||
# CONFIG_DEBUG_SLAB is not set
|
||||
# CONFIG_DEBUG_PREEMPT is not set
|
||||
# CONFIG_DEBUG_RT_MUTEXES is not set
|
||||
# CONFIG_RT_MUTEX_TESTER is not set
|
||||
# CONFIG_DEBUG_SPINLOCK is not set
|
||||
# CONFIG_DEBUG_MUTEXES is not set
|
||||
# CONFIG_DEBUG_LOCK_ALLOC is not set
|
||||
# CONFIG_PROVE_LOCKING is not set
|
||||
# CONFIG_LOCK_STAT is not set
|
||||
# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
|
||||
# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
|
||||
# CONFIG_DEBUG_KOBJECT is not set
|
||||
CONFIG_DEBUG_BUGVERBOSE=y
|
||||
CONFIG_DEBUG_INFO=y
|
||||
# CONFIG_DEBUG_VM is not set
|
||||
# CONFIG_DEBUG_LIST is not set
|
||||
# CONFIG_DEBUG_SG is not set
|
||||
CONFIG_FRAME_POINTER=y
|
||||
CONFIG_FORCED_INLINING=y
|
||||
# CONFIG_BOOT_PRINTK_DELAY is not set
|
||||
# CONFIG_RCU_TORTURE_TEST is not set
|
||||
# CONFIG_FAULT_INJECTION is not set
|
||||
# CONFIG_SAMPLES is not set
|
||||
CONFIG_DEBUG_USER=y
|
||||
CONFIG_DEBUG_ERRORS=y
|
||||
CONFIG_DEBUG_LL=y
|
||||
# CONFIG_DEBUG_ICEDCC is not set
|
||||
|
||||
#
|
||||
# Security options
|
||||
#
|
||||
# CONFIG_KEYS is not set
|
||||
# CONFIG_SECURITY is not set
|
||||
# CONFIG_SECURITY_FILE_CAPABILITIES is not set
|
||||
CONFIG_CRYPTO=y
|
||||
CONFIG_CRYPTO_ALGAPI=y
|
||||
CONFIG_CRYPTO_BLKCIPHER=y
|
||||
CONFIG_CRYPTO_MANAGER=y
|
||||
# CONFIG_CRYPTO_HMAC is not set
|
||||
# CONFIG_CRYPTO_XCBC is not set
|
||||
# CONFIG_CRYPTO_NULL is not set
|
||||
# CONFIG_CRYPTO_MD4 is not set
|
||||
CONFIG_CRYPTO_MD5=y
|
||||
# CONFIG_CRYPTO_SHA1 is not set
|
||||
# CONFIG_CRYPTO_SHA256 is not set
|
||||
# CONFIG_CRYPTO_SHA512 is not set
|
||||
# CONFIG_CRYPTO_WP512 is not set
|
||||
# CONFIG_CRYPTO_TGR192 is not set
|
||||
# CONFIG_CRYPTO_GF128MUL is not set
|
||||
# CONFIG_CRYPTO_ECB is not set
|
||||
CONFIG_CRYPTO_CBC=y
|
||||
# CONFIG_CRYPTO_PCBC is not set
|
||||
# CONFIG_CRYPTO_LRW is not set
|
||||
# CONFIG_CRYPTO_XTS is not set
|
||||
# CONFIG_CRYPTO_CRYPTD is not set
|
||||
CONFIG_CRYPTO_DES=y
|
||||
# CONFIG_CRYPTO_FCRYPT is not set
|
||||
# CONFIG_CRYPTO_BLOWFISH is not set
|
||||
# CONFIG_CRYPTO_TWOFISH is not set
|
||||
# CONFIG_CRYPTO_SERPENT is not set
|
||||
# CONFIG_CRYPTO_AES is not set
|
||||
# CONFIG_CRYPTO_CAST5 is not set
|
||||
# CONFIG_CRYPTO_CAST6 is not set
|
||||
# CONFIG_CRYPTO_TEA is not set
|
||||
# CONFIG_CRYPTO_ARC4 is not set
|
||||
# CONFIG_CRYPTO_KHAZAD is not set
|
||||
# CONFIG_CRYPTO_ANUBIS is not set
|
||||
# CONFIG_CRYPTO_SEED is not set
|
||||
# CONFIG_CRYPTO_DEFLATE is not set
|
||||
# CONFIG_CRYPTO_MICHAEL_MIC is not set
|
||||
# CONFIG_CRYPTO_CRC32C is not set
|
||||
# CONFIG_CRYPTO_CAMELLIA is not set
|
||||
# CONFIG_CRYPTO_TEST is not set
|
||||
# CONFIG_CRYPTO_AUTHENC is not set
|
||||
CONFIG_CRYPTO_HW=y
|
||||
|
||||
#
|
||||
# Library routines
|
||||
#
|
||||
CONFIG_BITREVERSE=y
|
||||
CONFIG_CRC_CCITT=y
|
||||
# CONFIG_CRC16 is not set
|
||||
# CONFIG_CRC_ITU_T is not set
|
||||
CONFIG_CRC32=y
|
||||
# CONFIG_CRC7 is not set
|
||||
# CONFIG_LIBCRC32C is not set
|
||||
CONFIG_PLIST=y
|
||||
CONFIG_HAS_IOMEM=y
|
||||
CONFIG_HAS_IOPORT=y
|
||||
CONFIG_HAS_DMA=y
|
1332
arch/arm/configs/pxa3xx_defconfig
Normal file
1332
arch/arm/configs/pxa3xx_defconfig
Normal file
File diff suppressed because it is too large
Load diff
1129
arch/arm/configs/xcep_defconfig
Normal file
1129
arch/arm/configs/xcep_defconfig
Normal file
File diff suppressed because it is too large
Load diff
|
@ -1,736 +0,0 @@
|
|||
#
|
||||
# Automatically generated make config: don't edit
|
||||
# Linux kernel version: 2.6.23
|
||||
# Tue Oct 23 13:33:20 2007
|
||||
#
|
||||
CONFIG_ARM=y
|
||||
CONFIG_SYS_SUPPORTS_APM_EMULATION=y
|
||||
CONFIG_GENERIC_GPIO=y
|
||||
CONFIG_GENERIC_TIME=y
|
||||
CONFIG_GENERIC_CLOCKEVENTS=y
|
||||
CONFIG_MMU=y
|
||||
# CONFIG_NO_IOPORT is not set
|
||||
CONFIG_GENERIC_HARDIRQS=y
|
||||
CONFIG_STACKTRACE_SUPPORT=y
|
||||
CONFIG_LOCKDEP_SUPPORT=y
|
||||
CONFIG_TRACE_IRQFLAGS_SUPPORT=y
|
||||
CONFIG_HARDIRQS_SW_RESEND=y
|
||||
CONFIG_GENERIC_IRQ_PROBE=y
|
||||
CONFIG_RWSEM_GENERIC_SPINLOCK=y
|
||||
# CONFIG_ARCH_HAS_ILOG2_U32 is not set
|
||||
# CONFIG_ARCH_HAS_ILOG2_U64 is not set
|
||||
CONFIG_GENERIC_HWEIGHT=y
|
||||
CONFIG_GENERIC_CALIBRATE_DELAY=y
|
||||
CONFIG_ZONE_DMA=y
|
||||
CONFIG_ARCH_MTD_XIP=y
|
||||
CONFIG_VECTORS_BASE=0xffff0000
|
||||
CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
|
||||
|
||||
#
|
||||
# General setup
|
||||
#
|
||||
CONFIG_EXPERIMENTAL=y
|
||||
CONFIG_BROKEN_ON_SMP=y
|
||||
CONFIG_INIT_ENV_ARG_LIMIT=32
|
||||
CONFIG_LOCALVERSION=""
|
||||
CONFIG_LOCALVERSION_AUTO=y
|
||||
CONFIG_SWAP=y
|
||||
CONFIG_SYSVIPC=y
|
||||
CONFIG_SYSVIPC_SYSCTL=y
|
||||
# CONFIG_POSIX_MQUEUE is not set
|
||||
# CONFIG_BSD_PROCESS_ACCT is not set
|
||||
# CONFIG_TASKSTATS is not set
|
||||
# CONFIG_USER_NS is not set
|
||||
# CONFIG_AUDIT is not set
|
||||
# CONFIG_IKCONFIG is not set
|
||||
CONFIG_LOG_BUF_SHIFT=18
|
||||
# CONFIG_CGROUPS is not set
|
||||
CONFIG_FAIR_GROUP_SCHED=y
|
||||
CONFIG_FAIR_USER_SCHED=y
|
||||
# CONFIG_FAIR_CGROUP_SCHED is not set
|
||||
CONFIG_SYSFS_DEPRECATED=y
|
||||
# CONFIG_RELAY is not set
|
||||
# CONFIG_BLK_DEV_INITRD is not set
|
||||
# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
|
||||
CONFIG_SYSCTL=y
|
||||
# CONFIG_EMBEDDED is not set
|
||||
CONFIG_UID16=y
|
||||
CONFIG_SYSCTL_SYSCALL=y
|
||||
CONFIG_KALLSYMS=y
|
||||
# CONFIG_KALLSYMS_EXTRA_PASS is not set
|
||||
CONFIG_HOTPLUG=y
|
||||
CONFIG_PRINTK=y
|
||||
CONFIG_BUG=y
|
||||
CONFIG_ELF_CORE=y
|
||||
CONFIG_BASE_FULL=y
|
||||
CONFIG_FUTEX=y
|
||||
CONFIG_ANON_INODES=y
|
||||
CONFIG_EPOLL=y
|
||||
CONFIG_SIGNALFD=y
|
||||
CONFIG_EVENTFD=y
|
||||
CONFIG_SHMEM=y
|
||||
CONFIG_VM_EVENT_COUNTERS=y
|
||||
CONFIG_SLUB_DEBUG=y
|
||||
# CONFIG_SLAB is not set
|
||||
CONFIG_SLUB=y
|
||||
# CONFIG_SLOB is not set
|
||||
CONFIG_RT_MUTEXES=y
|
||||
# CONFIG_TINY_SHMEM is not set
|
||||
CONFIG_BASE_SMALL=0
|
||||
CONFIG_MODULES=y
|
||||
# CONFIG_MODULE_UNLOAD is not set
|
||||
# CONFIG_MODVERSIONS is not set
|
||||
# CONFIG_MODULE_SRCVERSION_ALL is not set
|
||||
# CONFIG_KMOD is not set
|
||||
CONFIG_BLOCK=y
|
||||
# CONFIG_LBD is not set
|
||||
# CONFIG_BLK_DEV_IO_TRACE is not set
|
||||
# CONFIG_LSF is not set
|
||||
# CONFIG_BLK_DEV_BSG is not set
|
||||
|
||||
#
|
||||
# IO Schedulers
|
||||
#
|
||||
CONFIG_IOSCHED_NOOP=y
|
||||
CONFIG_IOSCHED_AS=y
|
||||
CONFIG_IOSCHED_DEADLINE=y
|
||||
CONFIG_IOSCHED_CFQ=y
|
||||
# CONFIG_DEFAULT_AS is not set
|
||||
# CONFIG_DEFAULT_DEADLINE is not set
|
||||
CONFIG_DEFAULT_CFQ=y
|
||||
# CONFIG_DEFAULT_NOOP is not set
|
||||
CONFIG_DEFAULT_IOSCHED="cfq"
|
||||
|
||||
#
|
||||
# System Type
|
||||
#
|
||||
# CONFIG_ARCH_AAEC2000 is not set
|
||||
# CONFIG_ARCH_INTEGRATOR is not set
|
||||
# CONFIG_ARCH_REALVIEW is not set
|
||||
# CONFIG_ARCH_VERSATILE is not set
|
||||
# CONFIG_ARCH_AT91 is not set
|
||||
# CONFIG_ARCH_CLPS7500 is not set
|
||||
# CONFIG_ARCH_CLPS711X is not set
|
||||
# CONFIG_ARCH_CO285 is not set
|
||||
# CONFIG_ARCH_EBSA110 is not set
|
||||
# CONFIG_ARCH_EP93XX is not set
|
||||
# CONFIG_ARCH_FOOTBRIDGE is not set
|
||||
# CONFIG_ARCH_NETX is not set
|
||||
# CONFIG_ARCH_H720X is not set
|
||||
# CONFIG_ARCH_IMX is not set
|
||||
# CONFIG_ARCH_IOP13XX is not set
|
||||
# CONFIG_ARCH_IOP32X is not set
|
||||
# CONFIG_ARCH_IOP33X is not set
|
||||
# CONFIG_ARCH_IXP23XX is not set
|
||||
# CONFIG_ARCH_IXP2000 is not set
|
||||
# CONFIG_ARCH_IXP4XX is not set
|
||||
# CONFIG_ARCH_L7200 is not set
|
||||
# CONFIG_ARCH_KS8695 is not set
|
||||
# CONFIG_ARCH_NS9XXX is not set
|
||||
# CONFIG_ARCH_MXC is not set
|
||||
# CONFIG_ARCH_PNX4008 is not set
|
||||
CONFIG_ARCH_PXA=y
|
||||
# CONFIG_ARCH_RPC is not set
|
||||
# CONFIG_ARCH_SA1100 is not set
|
||||
# CONFIG_ARCH_S3C2410 is not set
|
||||
# CONFIG_ARCH_SHARK is not set
|
||||
# CONFIG_ARCH_LH7A40X is not set
|
||||
# CONFIG_ARCH_DAVINCI is not set
|
||||
# CONFIG_ARCH_OMAP is not set
|
||||
|
||||
#
|
||||
# Intel PXA2xx/PXA3xx Implementations
|
||||
#
|
||||
|
||||
#
|
||||
# Supported PXA3xx Processor Variants
|
||||
#
|
||||
CONFIG_CPU_PXA300=y
|
||||
CONFIG_CPU_PXA310=y
|
||||
CONFIG_CPU_PXA320=y
|
||||
# CONFIG_ARCH_LUBBOCK is not set
|
||||
# CONFIG_MACH_LOGICPD_PXA270 is not set
|
||||
# CONFIG_MACH_MAINSTONE is not set
|
||||
# CONFIG_ARCH_PXA_IDP is not set
|
||||
# CONFIG_PXA_SHARPSL is not set
|
||||
# CONFIG_MACH_TRIZEPS4 is not set
|
||||
# CONFIG_MACH_EM_X270 is not set
|
||||
CONFIG_MACH_ZYLONITE=y
|
||||
# CONFIG_MACH_ARMCORE is not set
|
||||
CONFIG_PXA3xx=y
|
||||
|
||||
#
|
||||
# Boot options
|
||||
#
|
||||
|
||||
#
|
||||
# Power management
|
||||
#
|
||||
|
||||
#
|
||||
# Processor Type
|
||||
#
|
||||
CONFIG_CPU_32=y
|
||||
CONFIG_CPU_XSC3=y
|
||||
CONFIG_CPU_32v5=y
|
||||
CONFIG_CPU_ABRT_EV5T=y
|
||||
CONFIG_CPU_CACHE_VIVT=y
|
||||
CONFIG_CPU_TLB_V4WBI=y
|
||||
CONFIG_CPU_CP15=y
|
||||
CONFIG_CPU_CP15_MMU=y
|
||||
CONFIG_IO_36=y
|
||||
|
||||
#
|
||||
# Processor Features
|
||||
#
|
||||
# CONFIG_ARM_THUMB is not set
|
||||
# CONFIG_CPU_DCACHE_DISABLE is not set
|
||||
# CONFIG_CPU_BPREDICT_DISABLE is not set
|
||||
# CONFIG_OUTER_CACHE is not set
|
||||
CONFIG_IWMMXT=y
|
||||
|
||||
#
|
||||
# Bus support
|
||||
#
|
||||
# CONFIG_PCI_SYSCALL is not set
|
||||
# CONFIG_ARCH_SUPPORTS_MSI is not set
|
||||
# CONFIG_PCCARD is not set
|
||||
|
||||
#
|
||||
# Kernel Features
|
||||
#
|
||||
# CONFIG_TICK_ONESHOT is not set
|
||||
# CONFIG_NO_HZ is not set
|
||||
# CONFIG_HIGH_RES_TIMERS is not set
|
||||
CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
|
||||
# CONFIG_PREEMPT is not set
|
||||
CONFIG_HZ=100
|
||||
CONFIG_AEABI=y
|
||||
CONFIG_OABI_COMPAT=y
|
||||
# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set
|
||||
CONFIG_SELECT_MEMORY_MODEL=y
|
||||
CONFIG_FLATMEM_MANUAL=y
|
||||
# CONFIG_DISCONTIGMEM_MANUAL is not set
|
||||
# CONFIG_SPARSEMEM_MANUAL is not set
|
||||
CONFIG_FLATMEM=y
|
||||
CONFIG_FLAT_NODE_MEM_MAP=y
|
||||
# CONFIG_SPARSEMEM_STATIC is not set
|
||||
# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
|
||||
CONFIG_SPLIT_PTLOCK_CPUS=4096
|
||||
# CONFIG_RESOURCES_64BIT is not set
|
||||
CONFIG_ZONE_DMA_FLAG=1
|
||||
CONFIG_BOUNCE=y
|
||||
CONFIG_VIRT_TO_BUS=y
|
||||
CONFIG_ALIGNMENT_TRAP=y
|
||||
|
||||
#
|
||||
# Boot options
|
||||
#
|
||||
CONFIG_ZBOOT_ROM_TEXT=0x0
|
||||
CONFIG_ZBOOT_ROM_BSS=0x0
|
||||
CONFIG_CMDLINE="root=/dev/nfs rootfstype=nfs nfsroot=192.168.1.100:/nfs/rootfs/ ip=192.168.1.101:192.168.1.100::255.255.255.0::eth0:on console=ttyS0,38400 mem=64M debug"
|
||||
# CONFIG_XIP_KERNEL is not set
|
||||
# CONFIG_KEXEC is not set
|
||||
|
||||
#
|
||||
# Floating point emulation
|
||||
#
|
||||
|
||||
#
|
||||
# At least one emulation must be selected
|
||||
#
|
||||
CONFIG_FPE_NWFPE=y
|
||||
# CONFIG_FPE_NWFPE_XP is not set
|
||||
# CONFIG_FPE_FASTFPE is not set
|
||||
|
||||
#
|
||||
# Userspace binary formats
|
||||
#
|
||||
CONFIG_BINFMT_ELF=y
|
||||
# CONFIG_BINFMT_AOUT is not set
|
||||
# CONFIG_BINFMT_MISC is not set
|
||||
|
||||
#
|
||||
# Power management options
|
||||
#
|
||||
# CONFIG_PM is not set
|
||||
CONFIG_SUSPEND_UP_POSSIBLE=y
|
||||
|
||||
#
|
||||
# Networking
|
||||
#
|
||||
CONFIG_NET=y
|
||||
|
||||
#
|
||||
# Networking options
|
||||
#
|
||||
CONFIG_PACKET=y
|
||||
# CONFIG_PACKET_MMAP is not set
|
||||
CONFIG_UNIX=y
|
||||
# CONFIG_NET_KEY is not set
|
||||
CONFIG_INET=y
|
||||
# CONFIG_IP_MULTICAST is not set
|
||||
# CONFIG_IP_ADVANCED_ROUTER is not set
|
||||
CONFIG_IP_FIB_HASH=y
|
||||
CONFIG_IP_PNP=y
|
||||
CONFIG_IP_PNP_DHCP=y
|
||||
CONFIG_IP_PNP_BOOTP=y
|
||||
CONFIG_IP_PNP_RARP=y
|
||||
# CONFIG_NET_IPIP is not set
|
||||
# CONFIG_NET_IPGRE is not set
|
||||
# CONFIG_ARPD is not set
|
||||
# CONFIG_SYN_COOKIES is not set
|
||||
# CONFIG_INET_AH is not set
|
||||
# CONFIG_INET_ESP is not set
|
||||
# CONFIG_INET_IPCOMP is not set
|
||||
# CONFIG_INET_XFRM_TUNNEL is not set
|
||||
# CONFIG_INET_TUNNEL is not set
|
||||
# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
|
||||
# CONFIG_INET_XFRM_MODE_TUNNEL is not set
|
||||
# CONFIG_INET_XFRM_MODE_BEET is not set
|
||||
# CONFIG_INET_LRO is not set
|
||||
# CONFIG_INET_DIAG is not set
|
||||
# CONFIG_TCP_CONG_ADVANCED is not set
|
||||
CONFIG_TCP_CONG_CUBIC=y
|
||||
CONFIG_DEFAULT_TCP_CONG="cubic"
|
||||
# CONFIG_TCP_MD5SIG is not set
|
||||
# CONFIG_IPV6 is not set
|
||||
# CONFIG_INET6_XFRM_TUNNEL is not set
|
||||
# CONFIG_INET6_TUNNEL is not set
|
||||
# CONFIG_NETWORK_SECMARK is not set
|
||||
# CONFIG_NETFILTER is not set
|
||||
# CONFIG_IP_DCCP is not set
|
||||
# CONFIG_IP_SCTP is not set
|
||||
# CONFIG_TIPC is not set
|
||||
# CONFIG_ATM is not set
|
||||
# CONFIG_BRIDGE is not set
|
||||
# CONFIG_VLAN_8021Q is not set
|
||||
# CONFIG_DECNET is not set
|
||||
# CONFIG_LLC2 is not set
|
||||
# CONFIG_IPX is not set
|
||||
# CONFIG_ATALK is not set
|
||||
# CONFIG_X25 is not set
|
||||
# CONFIG_LAPB is not set
|
||||
# CONFIG_ECONET is not set
|
||||
# CONFIG_WAN_ROUTER is not set
|
||||
# CONFIG_NET_SCHED is not set
|
||||
|
||||
#
|
||||
# Network testing
|
||||
#
|
||||
# CONFIG_NET_PKTGEN is not set
|
||||
# CONFIG_HAMRADIO is not set
|
||||
# CONFIG_IRDA is not set
|
||||
# CONFIG_BT is not set
|
||||
# CONFIG_AF_RXRPC is not set
|
||||
|
||||
#
|
||||
# Wireless
|
||||
#
|
||||
# CONFIG_CFG80211 is not set
|
||||
# CONFIG_WIRELESS_EXT is not set
|
||||
# CONFIG_MAC80211 is not set
|
||||
# CONFIG_IEEE80211 is not set
|
||||
# CONFIG_RFKILL is not set
|
||||
# CONFIG_NET_9P is not set
|
||||
|
||||
#
|
||||
# Device Drivers
|
||||
#
|
||||
|
||||
#
|
||||
# Generic Driver Options
|
||||
#
|
||||
CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
|
||||
CONFIG_STANDALONE=y
|
||||
CONFIG_PREVENT_FIRMWARE_BUILD=y
|
||||
CONFIG_FW_LOADER=y
|
||||
# CONFIG_SYS_HYPERVISOR is not set
|
||||
# CONFIG_CONNECTOR is not set
|
||||
# CONFIG_MTD is not set
|
||||
# CONFIG_PARPORT is not set
|
||||
# CONFIG_BLK_DEV is not set
|
||||
# CONFIG_MISC_DEVICES is not set
|
||||
# CONFIG_IDE is not set
|
||||
|
||||
#
|
||||
# SCSI device support
|
||||
#
|
||||
# CONFIG_RAID_ATTRS is not set
|
||||
# CONFIG_SCSI is not set
|
||||
# CONFIG_SCSI_DMA is not set
|
||||
# CONFIG_SCSI_NETLINK is not set
|
||||
# CONFIG_ATA is not set
|
||||
# CONFIG_MD is not set
|
||||
CONFIG_NETDEVICES=y
|
||||
# CONFIG_NETDEVICES_MULTIQUEUE is not set
|
||||
# CONFIG_DUMMY is not set
|
||||
# CONFIG_BONDING is not set
|
||||
# CONFIG_MACVLAN is not set
|
||||
# CONFIG_EQUALIZER is not set
|
||||
# CONFIG_TUN is not set
|
||||
# CONFIG_VETH is not set
|
||||
# CONFIG_PHYLIB is not set
|
||||
CONFIG_NET_ETHERNET=y
|
||||
CONFIG_MII=y
|
||||
# CONFIG_AX88796 is not set
|
||||
CONFIG_SMC91X=y
|
||||
# CONFIG_DM9000 is not set
|
||||
# CONFIG_SMC911X is not set
|
||||
# CONFIG_IBM_NEW_EMAC_ZMII is not set
|
||||
# CONFIG_IBM_NEW_EMAC_RGMII is not set
|
||||
# CONFIG_IBM_NEW_EMAC_TAH is not set
|
||||
# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
|
||||
# CONFIG_B44 is not set
|
||||
# CONFIG_NETDEV_1000 is not set
|
||||
# CONFIG_NETDEV_10000 is not set
|
||||
|
||||
#
|
||||
# Wireless LAN
|
||||
#
|
||||
# CONFIG_WLAN_PRE80211 is not set
|
||||
# CONFIG_WLAN_80211 is not set
|
||||
# CONFIG_WAN is not set
|
||||
# CONFIG_PPP is not set
|
||||
# CONFIG_SLIP is not set
|
||||
# CONFIG_SHAPER is not set
|
||||
# CONFIG_NETCONSOLE is not set
|
||||
# CONFIG_NETPOLL is not set
|
||||
# CONFIG_NET_POLL_CONTROLLER is not set
|
||||
# CONFIG_ISDN is not set
|
||||
|
||||
#
|
||||
# Input device support
|
||||
#
|
||||
CONFIG_INPUT=y
|
||||
# CONFIG_INPUT_FF_MEMLESS is not set
|
||||
# CONFIG_INPUT_POLLDEV is not set
|
||||
|
||||
#
|
||||
# Userland interfaces
|
||||
#
|
||||
CONFIG_INPUT_MOUSEDEV=y
|
||||
# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
|
||||
CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
|
||||
CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
|
||||
# CONFIG_INPUT_JOYDEV is not set
|
||||
# CONFIG_INPUT_EVDEV is not set
|
||||
# CONFIG_INPUT_EVBUG is not set
|
||||
|
||||
#
|
||||
# Input Device Drivers
|
||||
#
|
||||
# CONFIG_INPUT_KEYBOARD is not set
|
||||
# CONFIG_INPUT_MOUSE is not set
|
||||
# CONFIG_INPUT_JOYSTICK is not set
|
||||
# CONFIG_INPUT_TABLET is not set
|
||||
# CONFIG_INPUT_TOUCHSCREEN is not set
|
||||
# CONFIG_INPUT_MISC is not set
|
||||
|
||||
#
|
||||
# Hardware I/O ports
|
||||
#
|
||||
# CONFIG_SERIO is not set
|
||||
# CONFIG_GAMEPORT is not set
|
||||
|
||||
#
|
||||
# Character devices
|
||||
#
|
||||
CONFIG_VT=y
|
||||
CONFIG_VT_CONSOLE=y
|
||||
CONFIG_HW_CONSOLE=y
|
||||
# CONFIG_VT_HW_CONSOLE_BINDING is not set
|
||||
# CONFIG_SERIAL_NONSTANDARD is not set
|
||||
|
||||
#
|
||||
# Serial drivers
|
||||
#
|
||||
# CONFIG_SERIAL_8250 is not set
|
||||
|
||||
#
|
||||
# Non-8250 serial port support
|
||||
#
|
||||
CONFIG_SERIAL_PXA=y
|
||||
CONFIG_SERIAL_PXA_CONSOLE=y
|
||||
CONFIG_SERIAL_CORE=y
|
||||
CONFIG_SERIAL_CORE_CONSOLE=y
|
||||
CONFIG_UNIX98_PTYS=y
|
||||
# CONFIG_LEGACY_PTYS is not set
|
||||
# CONFIG_IPMI_HANDLER is not set
|
||||
# CONFIG_HW_RANDOM is not set
|
||||
# CONFIG_NVRAM is not set
|
||||
# CONFIG_R3964 is not set
|
||||
# CONFIG_RAW_DRIVER is not set
|
||||
# CONFIG_TCG_TPM is not set
|
||||
# CONFIG_I2C is not set
|
||||
|
||||
#
|
||||
# SPI support
|
||||
#
|
||||
# CONFIG_SPI is not set
|
||||
# CONFIG_SPI_MASTER is not set
|
||||
# CONFIG_W1 is not set
|
||||
# CONFIG_POWER_SUPPLY is not set
|
||||
# CONFIG_HWMON is not set
|
||||
|
||||
#
|
||||
# Sonics Silicon Backplane
|
||||
#
|
||||
CONFIG_SSB_POSSIBLE=y
|
||||
# CONFIG_SSB is not set
|
||||
|
||||
#
|
||||
# Multifunction device drivers
|
||||
#
|
||||
# CONFIG_MFD_SM501 is not set
|
||||
|
||||
#
|
||||
# Multimedia devices
|
||||
#
|
||||
# CONFIG_VIDEO_DEV is not set
|
||||
# CONFIG_DVB_CORE is not set
|
||||
# CONFIG_DAB is not set
|
||||
|
||||
#
|
||||
# Graphics support
|
||||
#
|
||||
# CONFIG_VGASTATE is not set
|
||||
# CONFIG_VIDEO_OUTPUT_CONTROL is not set
|
||||
CONFIG_FB=y
|
||||
# CONFIG_FIRMWARE_EDID is not set
|
||||
# CONFIG_FB_DDC is not set
|
||||
CONFIG_FB_CFB_FILLRECT=y
|
||||
CONFIG_FB_CFB_COPYAREA=y
|
||||
CONFIG_FB_CFB_IMAGEBLIT=y
|
||||
# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set
|
||||
# CONFIG_FB_SYS_FILLRECT is not set
|
||||
# CONFIG_FB_SYS_COPYAREA is not set
|
||||
# CONFIG_FB_SYS_IMAGEBLIT is not set
|
||||
# CONFIG_FB_SYS_FOPS is not set
|
||||
CONFIG_FB_DEFERRED_IO=y
|
||||
# CONFIG_FB_SVGALIB is not set
|
||||
# CONFIG_FB_MACMODES is not set
|
||||
# CONFIG_FB_BACKLIGHT is not set
|
||||
# CONFIG_FB_MODE_HELPERS is not set
|
||||
# CONFIG_FB_TILEBLITTING is not set
|
||||
|
||||
#
|
||||
# Frame buffer hardware drivers
|
||||
#
|
||||
# CONFIG_FB_S1D13XXX is not set
|
||||
CONFIG_FB_PXA=y
|
||||
# CONFIG_FB_PXA_PARAMETERS is not set
|
||||
# CONFIG_FB_MBX is not set
|
||||
# CONFIG_FB_VIRTUAL is not set
|
||||
# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
|
||||
|
||||
#
|
||||
# Display device support
|
||||
#
|
||||
# CONFIG_DISPLAY_SUPPORT is not set
|
||||
|
||||
#
|
||||
# Console display driver support
|
||||
#
|
||||
# CONFIG_VGA_CONSOLE is not set
|
||||
CONFIG_DUMMY_CONSOLE=y
|
||||
CONFIG_FRAMEBUFFER_CONSOLE=y
|
||||
CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y
|
||||
# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set
|
||||
CONFIG_FONTS=y
|
||||
# CONFIG_FONT_8x8 is not set
|
||||
# CONFIG_FONT_8x16 is not set
|
||||
CONFIG_FONT_6x11=y
|
||||
# CONFIG_FONT_7x14 is not set
|
||||
# CONFIG_FONT_PEARL_8x8 is not set
|
||||
# CONFIG_FONT_ACORN_8x8 is not set
|
||||
# CONFIG_FONT_MINI_4x6 is not set
|
||||
# CONFIG_FONT_SUN8x16 is not set
|
||||
# CONFIG_FONT_SUN12x22 is not set
|
||||
# CONFIG_FONT_10x18 is not set
|
||||
CONFIG_LOGO=y
|
||||
CONFIG_LOGO_LINUX_MONO=y
|
||||
CONFIG_LOGO_LINUX_VGA16=y
|
||||
CONFIG_LOGO_LINUX_CLUT224=y
|
||||
|
||||
#
|
||||
# Sound
|
||||
#
|
||||
# CONFIG_SOUND is not set
|
||||
# CONFIG_HID_SUPPORT is not set
|
||||
# CONFIG_USB_SUPPORT is not set
|
||||
# CONFIG_MMC is not set
|
||||
# CONFIG_NEW_LEDS is not set
|
||||
CONFIG_RTC_LIB=y
|
||||
# CONFIG_RTC_CLASS is not set
|
||||
|
||||
#
|
||||
# File systems
|
||||
#
|
||||
# CONFIG_EXT2_FS is not set
|
||||
# CONFIG_EXT3_FS is not set
|
||||
# CONFIG_EXT4DEV_FS is not set
|
||||
# CONFIG_REISERFS_FS is not set
|
||||
# CONFIG_JFS_FS is not set
|
||||
CONFIG_FS_POSIX_ACL=y
|
||||
# CONFIG_XFS_FS is not set
|
||||
# CONFIG_GFS2_FS is not set
|
||||
# CONFIG_OCFS2_FS is not set
|
||||
# CONFIG_MINIX_FS is not set
|
||||
# CONFIG_ROMFS_FS is not set
|
||||
# CONFIG_INOTIFY is not set
|
||||
# CONFIG_QUOTA is not set
|
||||
CONFIG_DNOTIFY=y
|
||||
# CONFIG_AUTOFS_FS is not set
|
||||
# CONFIG_AUTOFS4_FS is not set
|
||||
# CONFIG_FUSE_FS is not set
|
||||
|
||||
#
|
||||
# CD-ROM/DVD Filesystems
|
||||
#
|
||||
# CONFIG_ISO9660_FS is not set
|
||||
# CONFIG_UDF_FS is not set
|
||||
|
||||
#
|
||||
# DOS/FAT/NT Filesystems
|
||||
#
|
||||
# CONFIG_MSDOS_FS is not set
|
||||
# CONFIG_VFAT_FS is not set
|
||||
# CONFIG_NTFS_FS is not set
|
||||
|
||||
#
|
||||
# Pseudo filesystems
|
||||
#
|
||||
CONFIG_PROC_FS=y
|
||||
CONFIG_PROC_SYSCTL=y
|
||||
CONFIG_SYSFS=y
|
||||
# CONFIG_TMPFS is not set
|
||||
# CONFIG_HUGETLB_PAGE is not set
|
||||
# CONFIG_CONFIGFS_FS is not set
|
||||
|
||||
#
|
||||
# Miscellaneous filesystems
|
||||
#
|
||||
# CONFIG_ADFS_FS is not set
|
||||
# CONFIG_AFFS_FS is not set
|
||||
# CONFIG_HFS_FS is not set
|
||||
# CONFIG_HFSPLUS_FS is not set
|
||||
# CONFIG_BEFS_FS is not set
|
||||
# CONFIG_BFS_FS is not set
|
||||
# CONFIG_EFS_FS is not set
|
||||
# CONFIG_CRAMFS is not set
|
||||
# CONFIG_VXFS_FS is not set
|
||||
# CONFIG_HPFS_FS is not set
|
||||
# CONFIG_QNX4FS_FS is not set
|
||||
# CONFIG_SYSV_FS is not set
|
||||
# CONFIG_UFS_FS is not set
|
||||
CONFIG_NETWORK_FILESYSTEMS=y
|
||||
CONFIG_NFS_FS=y
|
||||
CONFIG_NFS_V3=y
|
||||
CONFIG_NFS_V3_ACL=y
|
||||
CONFIG_NFS_V4=y
|
||||
CONFIG_NFS_DIRECTIO=y
|
||||
# CONFIG_NFSD is not set
|
||||
CONFIG_ROOT_NFS=y
|
||||
CONFIG_LOCKD=y
|
||||
CONFIG_LOCKD_V4=y
|
||||
CONFIG_NFS_ACL_SUPPORT=y
|
||||
CONFIG_NFS_COMMON=y
|
||||
CONFIG_SUNRPC=y
|
||||
CONFIG_SUNRPC_GSS=y
|
||||
# CONFIG_SUNRPC_BIND34 is not set
|
||||
CONFIG_RPCSEC_GSS_KRB5=y
|
||||
# CONFIG_RPCSEC_GSS_SPKM3 is not set
|
||||
# CONFIG_SMB_FS is not set
|
||||
# CONFIG_CIFS is not set
|
||||
# CONFIG_NCP_FS is not set
|
||||
# CONFIG_CODA_FS is not set
|
||||
# CONFIG_AFS_FS is not set
|
||||
|
||||
#
|
||||
# Partition Types
|
||||
#
|
||||
# CONFIG_PARTITION_ADVANCED is not set
|
||||
CONFIG_MSDOS_PARTITION=y
|
||||
# CONFIG_NLS is not set
|
||||
# CONFIG_DLM is not set
|
||||
# CONFIG_INSTRUMENTATION is not set
|
||||
|
||||
#
|
||||
# Kernel hacking
|
||||
#
|
||||
# CONFIG_PRINTK_TIME is not set
|
||||
CONFIG_ENABLE_MUST_CHECK=y
|
||||
# CONFIG_MAGIC_SYSRQ is not set
|
||||
# CONFIG_UNUSED_SYMBOLS is not set
|
||||
# CONFIG_DEBUG_FS is not set
|
||||
# CONFIG_HEADERS_CHECK is not set
|
||||
# CONFIG_DEBUG_KERNEL is not set
|
||||
# CONFIG_SLUB_DEBUG_ON is not set
|
||||
CONFIG_DEBUG_BUGVERBOSE=y
|
||||
CONFIG_FRAME_POINTER=y
|
||||
# CONFIG_SAMPLES is not set
|
||||
CONFIG_DEBUG_USER=y
|
||||
|
||||
#
|
||||
# Security options
|
||||
#
|
||||
# CONFIG_KEYS is not set
|
||||
# CONFIG_SECURITY is not set
|
||||
# CONFIG_SECURITY_FILE_CAPABILITIES is not set
|
||||
CONFIG_CRYPTO=y
|
||||
CONFIG_CRYPTO_ALGAPI=y
|
||||
CONFIG_CRYPTO_BLKCIPHER=y
|
||||
CONFIG_CRYPTO_MANAGER=y
|
||||
# CONFIG_CRYPTO_HMAC is not set
|
||||
# CONFIG_CRYPTO_XCBC is not set
|
||||
# CONFIG_CRYPTO_NULL is not set
|
||||
# CONFIG_CRYPTO_MD4 is not set
|
||||
CONFIG_CRYPTO_MD5=y
|
||||
# CONFIG_CRYPTO_SHA1 is not set
|
||||
# CONFIG_CRYPTO_SHA256 is not set
|
||||
# CONFIG_CRYPTO_SHA512 is not set
|
||||
# CONFIG_CRYPTO_WP512 is not set
|
||||
# CONFIG_CRYPTO_TGR192 is not set
|
||||
# CONFIG_CRYPTO_GF128MUL is not set
|
||||
# CONFIG_CRYPTO_ECB is not set
|
||||
CONFIG_CRYPTO_CBC=y
|
||||
# CONFIG_CRYPTO_PCBC is not set
|
||||
# CONFIG_CRYPTO_LRW is not set
|
||||
# CONFIG_CRYPTO_XTS is not set
|
||||
# CONFIG_CRYPTO_CRYPTD is not set
|
||||
CONFIG_CRYPTO_DES=y
|
||||
# CONFIG_CRYPTO_FCRYPT is not set
|
||||
# CONFIG_CRYPTO_BLOWFISH is not set
|
||||
# CONFIG_CRYPTO_TWOFISH is not set
|
||||
# CONFIG_CRYPTO_SERPENT is not set
|
||||
# CONFIG_CRYPTO_AES is not set
|
||||
# CONFIG_CRYPTO_CAST5 is not set
|
||||
# CONFIG_CRYPTO_CAST6 is not set
|
||||
# CONFIG_CRYPTO_TEA is not set
|
||||
# CONFIG_CRYPTO_ARC4 is not set
|
||||
# CONFIG_CRYPTO_KHAZAD is not set
|
||||
# CONFIG_CRYPTO_ANUBIS is not set
|
||||
# CONFIG_CRYPTO_SEED is not set
|
||||
# CONFIG_CRYPTO_DEFLATE is not set
|
||||
# CONFIG_CRYPTO_MICHAEL_MIC is not set
|
||||
# CONFIG_CRYPTO_CRC32C is not set
|
||||
# CONFIG_CRYPTO_CAMELLIA is not set
|
||||
# CONFIG_CRYPTO_TEST is not set
|
||||
# CONFIG_CRYPTO_AUTHENC is not set
|
||||
# CONFIG_CRYPTO_HW is not set
|
||||
|
||||
#
|
||||
# Library routines
|
||||
#
|
||||
CONFIG_BITREVERSE=y
|
||||
# CONFIG_CRC_CCITT is not set
|
||||
# CONFIG_CRC16 is not set
|
||||
# CONFIG_CRC_ITU_T is not set
|
||||
CONFIG_CRC32=y
|
||||
# CONFIG_CRC7 is not set
|
||||
# CONFIG_LIBCRC32C is not set
|
||||
CONFIG_PLIST=y
|
||||
CONFIG_HAS_IOMEM=y
|
||||
CONFIG_HAS_IOPORT=y
|
||||
CONFIG_HAS_DMA=y
|
|
@ -19,31 +19,21 @@
|
|||
|
||||
#ifdef __KERNEL__
|
||||
|
||||
/*
|
||||
* On ARM, ordinary assignment (str instruction) doesn't clear the local
|
||||
* strex/ldrex monitor on some implementations. The reason we can use it for
|
||||
* atomic_set() is the clrex or dummy strex done on every exception return.
|
||||
*/
|
||||
#define atomic_read(v) ((v)->counter)
|
||||
#define atomic_set(v,i) (((v)->counter) = (i))
|
||||
|
||||
#if __LINUX_ARM_ARCH__ >= 6
|
||||
|
||||
/*
|
||||
* ARMv6 UP and SMP safe atomic ops. We use load exclusive and
|
||||
* store exclusive to ensure that these are atomic. We may loop
|
||||
* to ensure that the update happens. Writing to 'v->counter'
|
||||
* without using the following operations WILL break the atomic
|
||||
* nature of these ops.
|
||||
* to ensure that the update happens.
|
||||
*/
|
||||
static inline void atomic_set(atomic_t *v, int i)
|
||||
{
|
||||
unsigned long tmp;
|
||||
|
||||
__asm__ __volatile__("@ atomic_set\n"
|
||||
"1: ldrex %0, [%1]\n"
|
||||
" strex %0, %2, [%1]\n"
|
||||
" teq %0, #0\n"
|
||||
" bne 1b"
|
||||
: "=&r" (tmp)
|
||||
: "r" (&v->counter), "r" (i)
|
||||
: "cc");
|
||||
}
|
||||
|
||||
static inline void atomic_add(int i, atomic_t *v)
|
||||
{
|
||||
unsigned long tmp;
|
||||
|
@ -163,8 +153,6 @@ static inline void atomic_clear_mask(unsigned long mask, unsigned long *addr)
|
|||
#error SMP not supported on pre-ARMv6 CPUs
|
||||
#endif
|
||||
|
||||
#define atomic_set(v,i) (((v)->counter) = (i))
|
||||
|
||||
static inline int atomic_add_return(int i, atomic_t *v)
|
||||
{
|
||||
unsigned long flags;
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
#ifndef __ASMARM_CACHE_H
|
||||
#define __ASMARM_CACHE_H
|
||||
|
||||
#define L1_CACHE_SHIFT 5
|
||||
#define L1_CACHE_SHIFT CONFIG_ARM_L1_CACHE_SHIFT
|
||||
#define L1_CACHE_BYTES (1 << L1_CACHE_SHIFT)
|
||||
|
||||
/*
|
||||
|
|
|
@ -63,6 +63,11 @@ static inline unsigned int __attribute_const__ read_cpuid_cachetype(void)
|
|||
return read_cpuid(CPUID_CACHETYPE);
|
||||
}
|
||||
|
||||
static inline unsigned int __attribute_const__ read_cpuid_tcmstatus(void)
|
||||
{
|
||||
return read_cpuid(CPUID_TCM);
|
||||
}
|
||||
|
||||
/*
|
||||
* Intel's XScale3 core supports some v6 features (supersections, L2)
|
||||
* but advertises itself as v5 as it does not support the v6 ISA. For
|
||||
|
@ -73,7 +78,10 @@ static inline unsigned int __attribute_const__ read_cpuid_cachetype(void)
|
|||
#else
|
||||
static inline int cpu_is_xsc3(void)
|
||||
{
|
||||
if ((read_cpuid_id() & 0xffffe000) == 0x69056000)
|
||||
unsigned int id;
|
||||
id = read_cpuid_id() & 0xffffe000;
|
||||
/* It covers both Intel ID and Marvell ID */
|
||||
if ((id == 0x69056000) || (id == 0x56056000))
|
||||
return 1;
|
||||
|
||||
return 0;
|
||||
|
|
|
@ -187,11 +187,74 @@ union iop3xx_desc {
|
|||
void *ptr;
|
||||
};
|
||||
|
||||
/* No support for p+q operations */
|
||||
static inline int
|
||||
iop_chan_pq_slot_count(size_t len, int src_cnt, int *slots_per_op)
|
||||
{
|
||||
BUG();
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline void
|
||||
iop_desc_init_pq(struct iop_adma_desc_slot *desc, int src_cnt,
|
||||
unsigned long flags)
|
||||
{
|
||||
BUG();
|
||||
}
|
||||
|
||||
static inline void
|
||||
iop_desc_set_pq_addr(struct iop_adma_desc_slot *desc, dma_addr_t *addr)
|
||||
{
|
||||
BUG();
|
||||
}
|
||||
|
||||
static inline void
|
||||
iop_desc_set_pq_src_addr(struct iop_adma_desc_slot *desc, int src_idx,
|
||||
dma_addr_t addr, unsigned char coef)
|
||||
{
|
||||
BUG();
|
||||
}
|
||||
|
||||
static inline int
|
||||
iop_chan_pq_zero_sum_slot_count(size_t len, int src_cnt, int *slots_per_op)
|
||||
{
|
||||
BUG();
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline void
|
||||
iop_desc_init_pq_zero_sum(struct iop_adma_desc_slot *desc, int src_cnt,
|
||||
unsigned long flags)
|
||||
{
|
||||
BUG();
|
||||
}
|
||||
|
||||
static inline void
|
||||
iop_desc_set_pq_zero_sum_byte_count(struct iop_adma_desc_slot *desc, u32 len)
|
||||
{
|
||||
BUG();
|
||||
}
|
||||
|
||||
#define iop_desc_set_pq_zero_sum_src_addr iop_desc_set_pq_src_addr
|
||||
|
||||
static inline void
|
||||
iop_desc_set_pq_zero_sum_addr(struct iop_adma_desc_slot *desc, int pq_idx,
|
||||
dma_addr_t *src)
|
||||
{
|
||||
BUG();
|
||||
}
|
||||
|
||||
static inline int iop_adma_get_max_xor(void)
|
||||
{
|
||||
return 32;
|
||||
}
|
||||
|
||||
static inline int iop_adma_get_max_pq(void)
|
||||
{
|
||||
BUG();
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline u32 iop_chan_get_current_descriptor(struct iop_adma_chan *chan)
|
||||
{
|
||||
int id = chan->device->id;
|
||||
|
@ -332,6 +395,11 @@ static inline int iop_chan_zero_sum_slot_count(size_t len, int src_cnt,
|
|||
return slot_cnt;
|
||||
}
|
||||
|
||||
static inline int iop_desc_is_pq(struct iop_adma_desc_slot *desc)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline u32 iop_desc_get_dest_addr(struct iop_adma_desc_slot *desc,
|
||||
struct iop_adma_chan *chan)
|
||||
{
|
||||
|
@ -349,6 +417,14 @@ static inline u32 iop_desc_get_dest_addr(struct iop_adma_desc_slot *desc,
|
|||
return 0;
|
||||
}
|
||||
|
||||
|
||||
static inline u32 iop_desc_get_qdest_addr(struct iop_adma_desc_slot *desc,
|
||||
struct iop_adma_chan *chan)
|
||||
{
|
||||
BUG();
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline u32 iop_desc_get_byte_count(struct iop_adma_desc_slot *desc,
|
||||
struct iop_adma_chan *chan)
|
||||
{
|
||||
|
@ -756,13 +832,14 @@ static inline void iop_desc_set_block_fill_val(struct iop_adma_desc_slot *desc,
|
|||
hw_desc->src[0] = val;
|
||||
}
|
||||
|
||||
static inline int iop_desc_get_zero_result(struct iop_adma_desc_slot *desc)
|
||||
static inline enum sum_check_flags
|
||||
iop_desc_get_zero_result(struct iop_adma_desc_slot *desc)
|
||||
{
|
||||
struct iop3xx_desc_aau *hw_desc = desc->hw_desc;
|
||||
struct iop3xx_aau_desc_ctrl desc_ctrl = hw_desc->desc_ctrl_field;
|
||||
|
||||
iop_paranoia(!(desc_ctrl.tx_complete && desc_ctrl.zero_result_en));
|
||||
return desc_ctrl.zero_result_err;
|
||||
return desc_ctrl.zero_result_err << SUM_CHECK_P;
|
||||
}
|
||||
|
||||
static inline void iop_chan_append(struct iop_adma_chan *chan)
|
||||
|
|
|
@ -86,6 +86,7 @@ struct iop_adma_chan {
|
|||
* @idx: pool index
|
||||
* @unmap_src_cnt: number of xor sources
|
||||
* @unmap_len: transaction bytecount
|
||||
* @tx_list: list of descriptors that are associated with one operation
|
||||
* @async_tx: support for the async_tx api
|
||||
* @group_list: list of slots that make up a multi-descriptor transaction
|
||||
* for example transfer lengths larger than the supported hw max
|
||||
|
@ -102,10 +103,12 @@ struct iop_adma_desc_slot {
|
|||
u16 idx;
|
||||
u16 unmap_src_cnt;
|
||||
size_t unmap_len;
|
||||
struct list_head tx_list;
|
||||
struct dma_async_tx_descriptor async_tx;
|
||||
union {
|
||||
u32 *xor_check_result;
|
||||
u32 *crc32_result;
|
||||
u32 *pq_check_result;
|
||||
};
|
||||
};
|
||||
|
||||
|
|
31
arch/arm/include/asm/tcm.h
Normal file
31
arch/arm/include/asm/tcm.h
Normal file
|
@ -0,0 +1,31 @@
|
|||
/*
|
||||
*
|
||||
* Copyright (C) 2008-2009 ST-Ericsson AB
|
||||
* License terms: GNU General Public License (GPL) version 2
|
||||
*
|
||||
* Author: Rickard Andersson <rickard.andersson@stericsson.com>
|
||||
* Author: Linus Walleij <linus.walleij@stericsson.com>
|
||||
*
|
||||
*/
|
||||
#ifndef __ASMARM_TCM_H
|
||||
#define __ASMARM_TCM_H
|
||||
|
||||
#ifndef CONFIG_HAVE_TCM
|
||||
#error "You should not be including tcm.h unless you have a TCM!"
|
||||
#endif
|
||||
|
||||
#include <linux/compiler.h>
|
||||
|
||||
/* Tag variables with this */
|
||||
#define __tcmdata __section(.tcm.data)
|
||||
/* Tag constants with this */
|
||||
#define __tcmconst __section(.tcm.rodata)
|
||||
/* Tag functions inside TCM called from outside TCM with this */
|
||||
#define __tcmfunc __attribute__((long_call)) __section(.tcm.text) noinline
|
||||
/* Tag function inside TCM called from inside TCM with this */
|
||||
#define __tcmlocalfunc __section(.tcm.text)
|
||||
|
||||
void *tcm_alloc(size_t len);
|
||||
void tcm_free(void *addr, size_t len);
|
||||
|
||||
#endif
|
|
@ -35,7 +35,9 @@
|
|||
|
||||
#define ARM(x...)
|
||||
#define THUMB(x...) x
|
||||
#ifdef __ASSEMBLY__
|
||||
#define W(instr) instr.w
|
||||
#endif
|
||||
#define BSYM(sym) sym + 1
|
||||
|
||||
#else /* !CONFIG_THUMB2_KERNEL */
|
||||
|
@ -45,7 +47,9 @@
|
|||
|
||||
#define ARM(x...) x
|
||||
#define THUMB(x...)
|
||||
#ifdef __ASSEMBLY__
|
||||
#define W(instr) instr
|
||||
#endif
|
||||
#define BSYM(sym) sym
|
||||
|
||||
#endif /* CONFIG_THUMB2_KERNEL */
|
||||
|
|
|
@ -35,6 +35,7 @@ obj-$(CONFIG_OABI_COMPAT) += sys_oabi-compat.o
|
|||
obj-$(CONFIG_ARM_THUMBEE) += thumbee.o
|
||||
obj-$(CONFIG_KGDB) += kgdb.o
|
||||
obj-$(CONFIG_ARM_UNWIND) += unwind.o
|
||||
obj-$(CONFIG_HAVE_TCM) += tcm.o
|
||||
|
||||
obj-$(CONFIG_CRUNCH) += crunch.o crunch-bits.o
|
||||
AFLAGS_crunch-bits.o := -Wa,-mcpu=ep9312
|
||||
|
|
|
@ -272,7 +272,15 @@ __und_svc:
|
|||
@
|
||||
@ r0 - instruction
|
||||
@
|
||||
#ifndef CONFIG_THUMB2_KERNEL
|
||||
ldr r0, [r2, #-4]
|
||||
#else
|
||||
ldrh r0, [r2, #-2] @ Thumb instruction at LR - 2
|
||||
and r9, r0, #0xf800
|
||||
cmp r9, #0xe800 @ 32-bit instruction if xx >= 0
|
||||
ldrhhs r9, [r2] @ bottom 16 bits
|
||||
orrhs r0, r9, r0, lsl #16
|
||||
#endif
|
||||
adr r9, BSYM(1f)
|
||||
bl call_fpe
|
||||
|
||||
|
@ -678,7 +686,9 @@ ENTRY(fp_enter)
|
|||
.word no_fp
|
||||
.previous
|
||||
|
||||
no_fp: mov pc, lr
|
||||
ENTRY(no_fp)
|
||||
mov pc, lr
|
||||
ENDPROC(no_fp)
|
||||
|
||||
__und_usr_unknown:
|
||||
enable_irq
|
||||
|
@ -734,13 +744,6 @@ ENTRY(__switch_to)
|
|||
#ifdef CONFIG_MMU
|
||||
ldr r6, [r2, #TI_CPU_DOMAIN]
|
||||
#endif
|
||||
#if __LINUX_ARM_ARCH__ >= 6
|
||||
#ifdef CONFIG_CPU_32v6K
|
||||
clrex
|
||||
#else
|
||||
strex r5, r4, [ip] @ Clear exclusive monitor
|
||||
#endif
|
||||
#endif
|
||||
#if defined(CONFIG_HAS_TLS_REG)
|
||||
mcr p15, 0, r3, c13, c0, 3 @ set TLS register
|
||||
#elif !defined(CONFIG_TLS_REG_EMUL)
|
||||
|
|
|
@ -76,13 +76,25 @@
|
|||
#ifndef CONFIG_THUMB2_KERNEL
|
||||
.macro svc_exit, rpsr
|
||||
msr spsr_cxsf, \rpsr
|
||||
#if defined(CONFIG_CPU_32v6K)
|
||||
clrex @ clear the exclusive monitor
|
||||
ldmia sp, {r0 - pc}^ @ load r0 - pc, cpsr
|
||||
#elif defined (CONFIG_CPU_V6)
|
||||
ldr r0, [sp]
|
||||
strex r1, r2, [sp] @ clear the exclusive monitor
|
||||
ldmib sp, {r1 - pc}^ @ load r1 - pc, cpsr
|
||||
#endif
|
||||
.endm
|
||||
|
||||
.macro restore_user_regs, fast = 0, offset = 0
|
||||
ldr r1, [sp, #\offset + S_PSR] @ get calling cpsr
|
||||
ldr lr, [sp, #\offset + S_PC]! @ get pc
|
||||
msr spsr_cxsf, r1 @ save in spsr_svc
|
||||
#if defined(CONFIG_CPU_32v6K)
|
||||
clrex @ clear the exclusive monitor
|
||||
#elif defined (CONFIG_CPU_V6)
|
||||
strex r1, r2, [sp] @ clear the exclusive monitor
|
||||
#endif
|
||||
.if \fast
|
||||
ldmdb sp, {r1 - lr}^ @ get calling r1 - lr
|
||||
.else
|
||||
|
@ -98,6 +110,7 @@
|
|||
.endm
|
||||
#else /* CONFIG_THUMB2_KERNEL */
|
||||
.macro svc_exit, rpsr
|
||||
clrex @ clear the exclusive monitor
|
||||
ldr r0, [sp, #S_SP] @ top of the stack
|
||||
ldr r1, [sp, #S_PC] @ return address
|
||||
tst r0, #4 @ orig stack 8-byte aligned?
|
||||
|
@ -110,6 +123,7 @@
|
|||
.endm
|
||||
|
||||
.macro restore_user_regs, fast = 0, offset = 0
|
||||
clrex @ clear the exclusive monitor
|
||||
mov r2, sp
|
||||
load_user_sp_lr r2, r3, \offset + S_SP @ calling sp, lr
|
||||
ldr r1, [sp, #\offset + S_PSR] @ get calling cpsr
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
#include <linux/kernel.h>
|
||||
#include <linux/kprobes.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/stop_machine.h>
|
||||
#include <linux/stringify.h>
|
||||
#include <asm/traps.h>
|
||||
#include <asm/cacheflush.h>
|
||||
|
@ -83,10 +84,24 @@ void __kprobes arch_arm_kprobe(struct kprobe *p)
|
|||
flush_insns(p->addr, 1);
|
||||
}
|
||||
|
||||
/*
|
||||
* The actual disarming is done here on each CPU and synchronized using
|
||||
* stop_machine. This synchronization is necessary on SMP to avoid removing
|
||||
* a probe between the moment the 'Undefined Instruction' exception is raised
|
||||
* and the moment the exception handler reads the faulting instruction from
|
||||
* memory.
|
||||
*/
|
||||
int __kprobes __arch_disarm_kprobe(void *p)
|
||||
{
|
||||
struct kprobe *kp = p;
|
||||
*kp->addr = kp->opcode;
|
||||
flush_insns(kp->addr, 1);
|
||||
return 0;
|
||||
}
|
||||
|
||||
void __kprobes arch_disarm_kprobe(struct kprobe *p)
|
||||
{
|
||||
*p->addr = p->opcode;
|
||||
flush_insns(p->addr, 1);
|
||||
stop_machine(__arch_disarm_kprobe, p, &cpu_online_map);
|
||||
}
|
||||
|
||||
void __kprobes arch_remove_kprobe(struct kprobe *p)
|
||||
|
|
|
@ -45,6 +45,7 @@
|
|||
|
||||
#include "compat.h"
|
||||
#include "atags.h"
|
||||
#include "tcm.h"
|
||||
|
||||
#ifndef MEM_SIZE
|
||||
#define MEM_SIZE (16*1024*1024)
|
||||
|
@ -749,6 +750,7 @@ void __init setup_arch(char **cmdline_p)
|
|||
#endif
|
||||
|
||||
cpu_init();
|
||||
tcm_init();
|
||||
|
||||
/*
|
||||
* Set up various architecture-specific pointers
|
||||
|
|
246
arch/arm/kernel/tcm.c
Normal file
246
arch/arm/kernel/tcm.c
Normal file
|
@ -0,0 +1,246 @@
|
|||
/*
|
||||
* Copyright (C) 2008-2009 ST-Ericsson AB
|
||||
* License terms: GNU General Public License (GPL) version 2
|
||||
* TCM memory handling for ARM systems
|
||||
*
|
||||
* Author: Linus Walleij <linus.walleij@stericsson.com>
|
||||
* Author: Rickard Andersson <rickard.andersson@stericsson.com>
|
||||
*/
|
||||
#include <linux/init.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/stddef.h>
|
||||
#include <linux/ioport.h>
|
||||
#include <linux/genalloc.h>
|
||||
#include <linux/string.h> /* memcpy */
|
||||
#include <asm/page.h> /* PAGE_SHIFT */
|
||||
#include <asm/cputype.h>
|
||||
#include <asm/mach/map.h>
|
||||
#include <mach/memory.h>
|
||||
#include "tcm.h"
|
||||
|
||||
/* Scream and warn about misuse */
|
||||
#if !defined(ITCM_OFFSET) || !defined(ITCM_END) || \
|
||||
!defined(DTCM_OFFSET) || !defined(DTCM_END)
|
||||
#error "TCM support selected but offsets not defined!"
|
||||
#endif
|
||||
|
||||
static struct gen_pool *tcm_pool;
|
||||
|
||||
/* TCM section definitions from the linker */
|
||||
extern char __itcm_start, __sitcm_text, __eitcm_text;
|
||||
extern char __dtcm_start, __sdtcm_data, __edtcm_data;
|
||||
|
||||
/*
|
||||
* TCM memory resources
|
||||
*/
|
||||
static struct resource dtcm_res = {
|
||||
.name = "DTCM RAM",
|
||||
.start = DTCM_OFFSET,
|
||||
.end = DTCM_END,
|
||||
.flags = IORESOURCE_MEM
|
||||
};
|
||||
|
||||
static struct resource itcm_res = {
|
||||
.name = "ITCM RAM",
|
||||
.start = ITCM_OFFSET,
|
||||
.end = ITCM_END,
|
||||
.flags = IORESOURCE_MEM
|
||||
};
|
||||
|
||||
static struct map_desc dtcm_iomap[] __initdata = {
|
||||
{
|
||||
.virtual = DTCM_OFFSET,
|
||||
.pfn = __phys_to_pfn(DTCM_OFFSET),
|
||||
.length = (DTCM_END - DTCM_OFFSET + 1),
|
||||
.type = MT_UNCACHED
|
||||
}
|
||||
};
|
||||
|
||||
static struct map_desc itcm_iomap[] __initdata = {
|
||||
{
|
||||
.virtual = ITCM_OFFSET,
|
||||
.pfn = __phys_to_pfn(ITCM_OFFSET),
|
||||
.length = (ITCM_END - ITCM_OFFSET + 1),
|
||||
.type = MT_UNCACHED
|
||||
}
|
||||
};
|
||||
|
||||
/*
|
||||
* Allocate a chunk of TCM memory
|
||||
*/
|
||||
void *tcm_alloc(size_t len)
|
||||
{
|
||||
unsigned long vaddr;
|
||||
|
||||
if (!tcm_pool)
|
||||
return NULL;
|
||||
|
||||
vaddr = gen_pool_alloc(tcm_pool, len);
|
||||
if (!vaddr)
|
||||
return NULL;
|
||||
|
||||
return (void *) vaddr;
|
||||
}
|
||||
EXPORT_SYMBOL(tcm_alloc);
|
||||
|
||||
/*
|
||||
* Free a chunk of TCM memory
|
||||
*/
|
||||
void tcm_free(void *addr, size_t len)
|
||||
{
|
||||
gen_pool_free(tcm_pool, (unsigned long) addr, len);
|
||||
}
|
||||
EXPORT_SYMBOL(tcm_free);
|
||||
|
||||
|
||||
static void __init setup_tcm_bank(u8 type, u32 offset, u32 expected_size)
|
||||
{
|
||||
const int tcm_sizes[16] = { 0, -1, -1, 4, 8, 16, 32, 64, 128,
|
||||
256, 512, 1024, -1, -1, -1, -1 };
|
||||
u32 tcm_region;
|
||||
int tcm_size;
|
||||
|
||||
/* Read the special TCM region register c9, 0 */
|
||||
if (!type)
|
||||
asm("mrc p15, 0, %0, c9, c1, 0"
|
||||
: "=r" (tcm_region));
|
||||
else
|
||||
asm("mrc p15, 0, %0, c9, c1, 1"
|
||||
: "=r" (tcm_region));
|
||||
|
||||
tcm_size = tcm_sizes[(tcm_region >> 2) & 0x0f];
|
||||
if (tcm_size < 0) {
|
||||
pr_err("CPU: %sTCM of unknown size!\n",
|
||||
type ? "I" : "D");
|
||||
} else {
|
||||
pr_info("CPU: found %sTCM %dk @ %08x, %senabled\n",
|
||||
type ? "I" : "D",
|
||||
tcm_size,
|
||||
(tcm_region & 0xfffff000U),
|
||||
(tcm_region & 1) ? "" : "not ");
|
||||
}
|
||||
|
||||
if (tcm_size != expected_size) {
|
||||
pr_crit("CPU: %sTCM was detected %dk but expected %dk!\n",
|
||||
type ? "I" : "D",
|
||||
tcm_size,
|
||||
expected_size);
|
||||
/* Adjust to the expected size? what can we do... */
|
||||
}
|
||||
|
||||
/* Force move the TCM bank to where we want it, enable */
|
||||
tcm_region = offset | (tcm_region & 0x00000ffeU) | 1;
|
||||
|
||||
if (!type)
|
||||
asm("mcr p15, 0, %0, c9, c1, 0"
|
||||
: /* No output operands */
|
||||
: "r" (tcm_region));
|
||||
else
|
||||
asm("mcr p15, 0, %0, c9, c1, 1"
|
||||
: /* No output operands */
|
||||
: "r" (tcm_region));
|
||||
|
||||
pr_debug("CPU: moved %sTCM %dk to %08x, enabled\n",
|
||||
type ? "I" : "D",
|
||||
tcm_size,
|
||||
(tcm_region & 0xfffff000U));
|
||||
}
|
||||
|
||||
/*
|
||||
* This initializes the TCM memory
|
||||
*/
|
||||
void __init tcm_init(void)
|
||||
{
|
||||
u32 tcm_status = read_cpuid_tcmstatus();
|
||||
char *start;
|
||||
char *end;
|
||||
char *ram;
|
||||
|
||||
/* Setup DTCM if present */
|
||||
if (tcm_status & (1 << 16)) {
|
||||
setup_tcm_bank(0, DTCM_OFFSET,
|
||||
(DTCM_END - DTCM_OFFSET + 1) >> 10);
|
||||
request_resource(&iomem_resource, &dtcm_res);
|
||||
iotable_init(dtcm_iomap, 1);
|
||||
/* Copy data from RAM to DTCM */
|
||||
start = &__sdtcm_data;
|
||||
end = &__edtcm_data;
|
||||
ram = &__dtcm_start;
|
||||
memcpy(start, ram, (end-start));
|
||||
pr_debug("CPU DTCM: copied data from %p - %p\n", start, end);
|
||||
}
|
||||
|
||||
/* Setup ITCM if present */
|
||||
if (tcm_status & 1) {
|
||||
setup_tcm_bank(1, ITCM_OFFSET,
|
||||
(ITCM_END - ITCM_OFFSET + 1) >> 10);
|
||||
request_resource(&iomem_resource, &itcm_res);
|
||||
iotable_init(itcm_iomap, 1);
|
||||
/* Copy code from RAM to ITCM */
|
||||
start = &__sitcm_text;
|
||||
end = &__eitcm_text;
|
||||
ram = &__itcm_start;
|
||||
memcpy(start, ram, (end-start));
|
||||
pr_debug("CPU ITCM: copied code from %p - %p\n", start, end);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* This creates the TCM memory pool and has to be done later,
|
||||
* during the core_initicalls, since the allocator is not yet
|
||||
* up and running when the first initialization runs.
|
||||
*/
|
||||
static int __init setup_tcm_pool(void)
|
||||
{
|
||||
u32 tcm_status = read_cpuid_tcmstatus();
|
||||
u32 dtcm_pool_start = (u32) &__edtcm_data;
|
||||
u32 itcm_pool_start = (u32) &__eitcm_text;
|
||||
int ret;
|
||||
|
||||
/*
|
||||
* Set up malloc pool, 2^2 = 4 bytes granularity since
|
||||
* the TCM is sometimes just 4 KiB. NB: pages and cache
|
||||
* line alignments does not matter in TCM!
|
||||
*/
|
||||
tcm_pool = gen_pool_create(2, -1);
|
||||
|
||||
pr_debug("Setting up TCM memory pool\n");
|
||||
|
||||
/* Add the rest of DTCM to the TCM pool */
|
||||
if (tcm_status & (1 << 16)) {
|
||||
if (dtcm_pool_start < DTCM_END) {
|
||||
ret = gen_pool_add(tcm_pool, dtcm_pool_start,
|
||||
DTCM_END - dtcm_pool_start + 1, -1);
|
||||
if (ret) {
|
||||
pr_err("CPU DTCM: could not add DTCM " \
|
||||
"remainder to pool!\n");
|
||||
return ret;
|
||||
}
|
||||
pr_debug("CPU DTCM: Added %08x bytes @ %08x to " \
|
||||
"the TCM memory pool\n",
|
||||
DTCM_END - dtcm_pool_start + 1,
|
||||
dtcm_pool_start);
|
||||
}
|
||||
}
|
||||
|
||||
/* Add the rest of ITCM to the TCM pool */
|
||||
if (tcm_status & 1) {
|
||||
if (itcm_pool_start < ITCM_END) {
|
||||
ret = gen_pool_add(tcm_pool, itcm_pool_start,
|
||||
ITCM_END - itcm_pool_start + 1, -1);
|
||||
if (ret) {
|
||||
pr_err("CPU ITCM: could not add ITCM " \
|
||||
"remainder to pool!\n");
|
||||
return ret;
|
||||
}
|
||||
pr_debug("CPU ITCM: Added %08x bytes @ %08x to " \
|
||||
"the TCM memory pool\n",
|
||||
ITCM_END - itcm_pool_start + 1,
|
||||
itcm_pool_start);
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
core_initcall(setup_tcm_pool);
|
17
arch/arm/kernel/tcm.h
Normal file
17
arch/arm/kernel/tcm.h
Normal file
|
@ -0,0 +1,17 @@
|
|||
/*
|
||||
* Copyright (C) 2008-2009 ST-Ericsson AB
|
||||
* License terms: GNU General Public License (GPL) version 2
|
||||
* TCM memory handling for ARM systems
|
||||
*
|
||||
* Author: Linus Walleij <linus.walleij@stericsson.com>
|
||||
* Author: Rickard Andersson <rickard.andersson@stericsson.com>
|
||||
*/
|
||||
|
||||
#ifdef CONFIG_HAVE_TCM
|
||||
void __init tcm_init(void);
|
||||
#else
|
||||
/* No TCM support, just blank inlines to be optimized out */
|
||||
inline void tcm_init(void)
|
||||
{
|
||||
}
|
||||
#endif
|
|
@ -199,6 +199,63 @@ SECTIONS
|
|||
}
|
||||
_edata_loc = __data_loc + SIZEOF(.data);
|
||||
|
||||
#ifdef CONFIG_HAVE_TCM
|
||||
/*
|
||||
* We align everything to a page boundary so we can
|
||||
* free it after init has commenced and TCM contents have
|
||||
* been copied to its destination.
|
||||
*/
|
||||
.tcm_start : {
|
||||
. = ALIGN(PAGE_SIZE);
|
||||
__tcm_start = .;
|
||||
__itcm_start = .;
|
||||
}
|
||||
|
||||
/*
|
||||
* Link these to the ITCM RAM
|
||||
* Put VMA to the TCM address and LMA to the common RAM
|
||||
* and we'll upload the contents from RAM to TCM and free
|
||||
* the used RAM after that.
|
||||
*/
|
||||
.text_itcm ITCM_OFFSET : AT(__itcm_start)
|
||||
{
|
||||
__sitcm_text = .;
|
||||
*(.tcm.text)
|
||||
*(.tcm.rodata)
|
||||
. = ALIGN(4);
|
||||
__eitcm_text = .;
|
||||
}
|
||||
|
||||
/*
|
||||
* Reset the dot pointer, this is needed to create the
|
||||
* relative __dtcm_start below (to be used as extern in code).
|
||||
*/
|
||||
. = ADDR(.tcm_start) + SIZEOF(.tcm_start) + SIZEOF(.text_itcm);
|
||||
|
||||
.dtcm_start : {
|
||||
__dtcm_start = .;
|
||||
}
|
||||
|
||||
/* TODO: add remainder of ITCM as well, that can be used for data! */
|
||||
.data_dtcm DTCM_OFFSET : AT(__dtcm_start)
|
||||
{
|
||||
. = ALIGN(4);
|
||||
__sdtcm_data = .;
|
||||
*(.tcm.data)
|
||||
. = ALIGN(4);
|
||||
__edtcm_data = .;
|
||||
}
|
||||
|
||||
/* Reset the dot pointer or the linker gets confused */
|
||||
. = ADDR(.dtcm_start) + SIZEOF(.data_dtcm);
|
||||
|
||||
/* End marker for freeing TCM copy in linked object */
|
||||
.tcm_end : AT(ADDR(.dtcm_start) + SIZEOF(.data_dtcm)){
|
||||
. = ALIGN(PAGE_SIZE);
|
||||
__tcm_end = .;
|
||||
}
|
||||
#endif
|
||||
|
||||
.bss : {
|
||||
__bss_start = .; /* BSS */
|
||||
*(.bss)
|
||||
|
|
|
@ -12,8 +12,9 @@
|
|||
#include <linux/linkage.h>
|
||||
#include <asm/assembler.h>
|
||||
#include <asm/asm-offsets.h>
|
||||
#include <asm/cache.h>
|
||||
|
||||
#define COPY_COUNT (PAGE_SZ/64 PLD( -1 ))
|
||||
#define COPY_COUNT (PAGE_SZ / (2 * L1_CACHE_BYTES) PLD( -1 ))
|
||||
|
||||
.text
|
||||
.align 5
|
||||
|
@ -26,17 +27,16 @@
|
|||
ENTRY(copy_page)
|
||||
stmfd sp!, {r4, lr} @ 2
|
||||
PLD( pld [r1, #0] )
|
||||
PLD( pld [r1, #32] )
|
||||
PLD( pld [r1, #L1_CACHE_BYTES] )
|
||||
mov r2, #COPY_COUNT @ 1
|
||||
ldmia r1!, {r3, r4, ip, lr} @ 4+1
|
||||
1: PLD( pld [r1, #64] )
|
||||
PLD( pld [r1, #96] )
|
||||
2: stmia r0!, {r3, r4, ip, lr} @ 4
|
||||
ldmia r1!, {r3, r4, ip, lr} @ 4+1
|
||||
stmia r0!, {r3, r4, ip, lr} @ 4
|
||||
ldmia r1!, {r3, r4, ip, lr} @ 4+1
|
||||
1: PLD( pld [r1, #2 * L1_CACHE_BYTES])
|
||||
PLD( pld [r1, #3 * L1_CACHE_BYTES])
|
||||
2:
|
||||
.rept (2 * L1_CACHE_BYTES / 16 - 1)
|
||||
stmia r0!, {r3, r4, ip, lr} @ 4
|
||||
ldmia r1!, {r3, r4, ip, lr} @ 4
|
||||
.endr
|
||||
subs r2, r2, #1 @ 1
|
||||
stmia r0!, {r3, r4, ip, lr} @ 4
|
||||
ldmgtia r1!, {r3, r4, ip, lr} @ 4
|
||||
|
|
|
@ -771,9 +771,9 @@ void __init at91_add_device_pwm(u32 mask) {}
|
|||
* AC97
|
||||
* -------------------------------------------------------------------- */
|
||||
|
||||
#if defined(CONFIG_SND_AT91_AC97) || defined(CONFIG_SND_AT91_AC97_MODULE)
|
||||
#if defined(CONFIG_SND_ATMEL_AC97C) || defined(CONFIG_SND_ATMEL_AC97C_MODULE)
|
||||
static u64 ac97_dmamask = DMA_BIT_MASK(32);
|
||||
static struct atmel_ac97_data ac97_data;
|
||||
static struct ac97c_platform_data ac97_data;
|
||||
|
||||
static struct resource ac97_resources[] = {
|
||||
[0] = {
|
||||
|
@ -789,7 +789,7 @@ static struct resource ac97_resources[] = {
|
|||
};
|
||||
|
||||
static struct platform_device at91cap9_ac97_device = {
|
||||
.name = "ac97c",
|
||||
.name = "atmel_ac97c",
|
||||
.id = 1,
|
||||
.dev = {
|
||||
.dma_mask = &ac97_dmamask,
|
||||
|
@ -800,7 +800,7 @@ static struct platform_device at91cap9_ac97_device = {
|
|||
.num_resources = ARRAY_SIZE(ac97_resources),
|
||||
};
|
||||
|
||||
void __init at91_add_device_ac97(struct atmel_ac97_data *data)
|
||||
void __init at91_add_device_ac97(struct ac97c_platform_data *data)
|
||||
{
|
||||
if (!data)
|
||||
return;
|
||||
|
@ -818,7 +818,7 @@ void __init at91_add_device_ac97(struct atmel_ac97_data *data)
|
|||
platform_device_register(&at91cap9_ac97_device);
|
||||
}
|
||||
#else
|
||||
void __init at91_add_device_ac97(struct atmel_ac97_data *data) {}
|
||||
void __init at91_add_device_ac97(struct ac97c_platform_data *data) {}
|
||||
#endif
|
||||
|
||||
|
||||
|
|
|
@ -24,10 +24,58 @@
|
|||
#include <mach/at91sam9g45.h>
|
||||
#include <mach/at91sam9g45_matrix.h>
|
||||
#include <mach/at91sam9_smc.h>
|
||||
#include <mach/at_hdmac.h>
|
||||
|
||||
#include "generic.h"
|
||||
|
||||
|
||||
/* --------------------------------------------------------------------
|
||||
* HDMAC - AHB DMA Controller
|
||||
* -------------------------------------------------------------------- */
|
||||
|
||||
#if defined(CONFIG_AT_HDMAC) || defined(CONFIG_AT_HDMAC_MODULE)
|
||||
static u64 hdmac_dmamask = DMA_BIT_MASK(32);
|
||||
|
||||
static struct at_dma_platform_data atdma_pdata = {
|
||||
.nr_channels = 8,
|
||||
};
|
||||
|
||||
static struct resource hdmac_resources[] = {
|
||||
[0] = {
|
||||
.start = AT91_BASE_SYS + AT91_DMA,
|
||||
.end = AT91_BASE_SYS + AT91_DMA + SZ_512 - 1,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
[2] = {
|
||||
.start = AT91SAM9G45_ID_DMA,
|
||||
.end = AT91SAM9G45_ID_DMA,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
};
|
||||
|
||||
static struct platform_device at_hdmac_device = {
|
||||
.name = "at_hdmac",
|
||||
.id = -1,
|
||||
.dev = {
|
||||
.dma_mask = &hdmac_dmamask,
|
||||
.coherent_dma_mask = DMA_BIT_MASK(32),
|
||||
.platform_data = &atdma_pdata,
|
||||
},
|
||||
.resource = hdmac_resources,
|
||||
.num_resources = ARRAY_SIZE(hdmac_resources),
|
||||
};
|
||||
|
||||
void __init at91_add_device_hdmac(void)
|
||||
{
|
||||
dma_cap_set(DMA_MEMCPY, atdma_pdata.cap_mask);
|
||||
dma_cap_set(DMA_SLAVE, atdma_pdata.cap_mask);
|
||||
platform_device_register(&at_hdmac_device);
|
||||
}
|
||||
#else
|
||||
void __init at91_add_device_hdmac(void) {}
|
||||
#endif
|
||||
|
||||
|
||||
/* --------------------------------------------------------------------
|
||||
* USB Host (OHCI)
|
||||
* -------------------------------------------------------------------- */
|
||||
|
@ -549,6 +597,61 @@ void __init at91_add_device_spi(struct spi_board_info *devices, int nr_devices)
|
|||
#endif
|
||||
|
||||
|
||||
/* --------------------------------------------------------------------
|
||||
* AC97
|
||||
* -------------------------------------------------------------------- */
|
||||
|
||||
#if defined(CONFIG_SND_ATMEL_AC97C) || defined(CONFIG_SND_ATMEL_AC97C_MODULE)
|
||||
static u64 ac97_dmamask = DMA_BIT_MASK(32);
|
||||
static struct ac97c_platform_data ac97_data;
|
||||
|
||||
static struct resource ac97_resources[] = {
|
||||
[0] = {
|
||||
.start = AT91SAM9G45_BASE_AC97C,
|
||||
.end = AT91SAM9G45_BASE_AC97C + SZ_16K - 1,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
[1] = {
|
||||
.start = AT91SAM9G45_ID_AC97C,
|
||||
.end = AT91SAM9G45_ID_AC97C,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
};
|
||||
|
||||
static struct platform_device at91sam9g45_ac97_device = {
|
||||
.name = "atmel_ac97c",
|
||||
.id = 0,
|
||||
.dev = {
|
||||
.dma_mask = &ac97_dmamask,
|
||||
.coherent_dma_mask = DMA_BIT_MASK(32),
|
||||
.platform_data = &ac97_data,
|
||||
},
|
||||
.resource = ac97_resources,
|
||||
.num_resources = ARRAY_SIZE(ac97_resources),
|
||||
};
|
||||
|
||||
void __init at91_add_device_ac97(struct ac97c_platform_data *data)
|
||||
{
|
||||
if (!data)
|
||||
return;
|
||||
|
||||
at91_set_A_periph(AT91_PIN_PD8, 0); /* AC97FS */
|
||||
at91_set_A_periph(AT91_PIN_PD9, 0); /* AC97CK */
|
||||
at91_set_A_periph(AT91_PIN_PD7, 0); /* AC97TX */
|
||||
at91_set_A_periph(AT91_PIN_PD6, 0); /* AC97RX */
|
||||
|
||||
/* reset */
|
||||
if (data->reset_pin)
|
||||
at91_set_gpio_output(data->reset_pin, 0);
|
||||
|
||||
ac97_data = *data;
|
||||
platform_device_register(&at91sam9g45_ac97_device);
|
||||
}
|
||||
#else
|
||||
void __init at91_add_device_ac97(struct ac97c_platform_data *data) {}
|
||||
#endif
|
||||
|
||||
|
||||
/* --------------------------------------------------------------------
|
||||
* LCD Controller
|
||||
* -------------------------------------------------------------------- */
|
||||
|
@ -1220,6 +1323,7 @@ void __init at91_add_device_serial(void) {}
|
|||
*/
|
||||
static int __init at91_add_standard_devices(void)
|
||||
{
|
||||
at91_add_device_hdmac();
|
||||
at91_add_device_rtc();
|
||||
at91_add_device_rtt();
|
||||
at91_add_device_watchdog();
|
||||
|
|
|
@ -21,10 +21,56 @@
|
|||
#include <mach/at91sam9rl.h>
|
||||
#include <mach/at91sam9rl_matrix.h>
|
||||
#include <mach/at91sam9_smc.h>
|
||||
#include <mach/at_hdmac.h>
|
||||
|
||||
#include "generic.h"
|
||||
|
||||
|
||||
/* --------------------------------------------------------------------
|
||||
* HDMAC - AHB DMA Controller
|
||||
* -------------------------------------------------------------------- */
|
||||
|
||||
#if defined(CONFIG_AT_HDMAC) || defined(CONFIG_AT_HDMAC_MODULE)
|
||||
static u64 hdmac_dmamask = DMA_BIT_MASK(32);
|
||||
|
||||
static struct at_dma_platform_data atdma_pdata = {
|
||||
.nr_channels = 2,
|
||||
};
|
||||
|
||||
static struct resource hdmac_resources[] = {
|
||||
[0] = {
|
||||
.start = AT91_BASE_SYS + AT91_DMA,
|
||||
.end = AT91_BASE_SYS + AT91_DMA + SZ_512 - 1,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
[2] = {
|
||||
.start = AT91SAM9RL_ID_DMA,
|
||||
.end = AT91SAM9RL_ID_DMA,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
};
|
||||
|
||||
static struct platform_device at_hdmac_device = {
|
||||
.name = "at_hdmac",
|
||||
.id = -1,
|
||||
.dev = {
|
||||
.dma_mask = &hdmac_dmamask,
|
||||
.coherent_dma_mask = DMA_BIT_MASK(32),
|
||||
.platform_data = &atdma_pdata,
|
||||
},
|
||||
.resource = hdmac_resources,
|
||||
.num_resources = ARRAY_SIZE(hdmac_resources),
|
||||
};
|
||||
|
||||
void __init at91_add_device_hdmac(void)
|
||||
{
|
||||
dma_cap_set(DMA_MEMCPY, atdma_pdata.cap_mask);
|
||||
platform_device_register(&at_hdmac_device);
|
||||
}
|
||||
#else
|
||||
void __init at91_add_device_hdmac(void) {}
|
||||
#endif
|
||||
|
||||
/* --------------------------------------------------------------------
|
||||
* USB HS Device (Gadget)
|
||||
* -------------------------------------------------------------------- */
|
||||
|
@ -397,6 +443,61 @@ void __init at91_add_device_spi(struct spi_board_info *devices, int nr_devices)
|
|||
#endif
|
||||
|
||||
|
||||
/* --------------------------------------------------------------------
|
||||
* AC97
|
||||
* -------------------------------------------------------------------- */
|
||||
|
||||
#if defined(CONFIG_SND_ATMEL_AC97C) || defined(CONFIG_SND_ATMEL_AC97C_MODULE)
|
||||
static u64 ac97_dmamask = DMA_BIT_MASK(32);
|
||||
static struct ac97c_platform_data ac97_data;
|
||||
|
||||
static struct resource ac97_resources[] = {
|
||||
[0] = {
|
||||
.start = AT91SAM9RL_BASE_AC97C,
|
||||
.end = AT91SAM9RL_BASE_AC97C + SZ_16K - 1,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
[1] = {
|
||||
.start = AT91SAM9RL_ID_AC97C,
|
||||
.end = AT91SAM9RL_ID_AC97C,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
};
|
||||
|
||||
static struct platform_device at91sam9rl_ac97_device = {
|
||||
.name = "atmel_ac97c",
|
||||
.id = 0,
|
||||
.dev = {
|
||||
.dma_mask = &ac97_dmamask,
|
||||
.coherent_dma_mask = DMA_BIT_MASK(32),
|
||||
.platform_data = &ac97_data,
|
||||
},
|
||||
.resource = ac97_resources,
|
||||
.num_resources = ARRAY_SIZE(ac97_resources),
|
||||
};
|
||||
|
||||
void __init at91_add_device_ac97(struct ac97c_platform_data *data)
|
||||
{
|
||||
if (!data)
|
||||
return;
|
||||
|
||||
at91_set_A_periph(AT91_PIN_PD1, 0); /* AC97FS */
|
||||
at91_set_A_periph(AT91_PIN_PD2, 0); /* AC97CK */
|
||||
at91_set_A_periph(AT91_PIN_PD3, 0); /* AC97TX */
|
||||
at91_set_A_periph(AT91_PIN_PD4, 0); /* AC97RX */
|
||||
|
||||
/* reset */
|
||||
if (data->reset_pin)
|
||||
at91_set_gpio_output(data->reset_pin, 0);
|
||||
|
||||
ac97_data = *data;
|
||||
platform_device_register(&at91sam9rl_ac97_device);
|
||||
}
|
||||
#else
|
||||
void __init at91_add_device_ac97(struct ac97c_platform_data *data) {}
|
||||
#endif
|
||||
|
||||
|
||||
/* --------------------------------------------------------------------
|
||||
* LCD Controller
|
||||
* -------------------------------------------------------------------- */
|
||||
|
@ -1103,6 +1204,7 @@ void __init at91_add_device_serial(void) {}
|
|||
*/
|
||||
static int __init at91_add_standard_devices(void)
|
||||
{
|
||||
at91_add_device_hdmac();
|
||||
at91_add_device_rtc();
|
||||
at91_add_device_rtt();
|
||||
at91_add_device_watchdog();
|
||||
|
|
|
@ -364,7 +364,7 @@ static struct atmel_lcdfb_info __initdata cap9adk_lcdc_data;
|
|||
/*
|
||||
* AC97
|
||||
*/
|
||||
static struct atmel_ac97_data cap9adk_ac97_data = {
|
||||
static struct ac97c_platform_data cap9adk_ac97_data = {
|
||||
// .reset_pin = ... not connected
|
||||
};
|
||||
|
||||
|
|
|
@ -340,7 +340,7 @@ static void __init neocore926_add_device_buttons(void) {}
|
|||
/*
|
||||
* AC97
|
||||
*/
|
||||
static struct atmel_ac97_data neocore926_ac97_data = {
|
||||
static struct ac97c_platform_data neocore926_ac97_data = {
|
||||
.reset_pin = AT91_PIN_PA13,
|
||||
};
|
||||
|
||||
|
|
|
@ -310,6 +310,14 @@ static void __init ek_add_device_buttons(void) {}
|
|||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* AC97
|
||||
* reset_pin is not connected: NRST
|
||||
*/
|
||||
static struct ac97c_platform_data ek_ac97_data = {
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
* LEDs ... these could all be PWM-driven, for variable brightness
|
||||
*/
|
||||
|
@ -372,6 +380,8 @@ static void __init ek_board_init(void)
|
|||
at91_add_device_lcdc(&ek_lcdc_data);
|
||||
/* Push Buttons */
|
||||
ek_add_device_buttons();
|
||||
/* AC97 */
|
||||
at91_add_device_ac97(&ek_ac97_data);
|
||||
/* LEDs */
|
||||
at91_gpio_leds(ek_leds, ARRAY_SIZE(ek_leds));
|
||||
at91_pwm_leds(ek_pwm_led, ARRAY_SIZE(ek_pwm_led));
|
||||
|
|
|
@ -210,6 +210,14 @@ static struct atmel_lcdfb_info __initdata ek_lcdc_data;
|
|||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* AC97
|
||||
* reset_pin is not connected: NRST
|
||||
*/
|
||||
static struct ac97c_platform_data ek_ac97_data = {
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
* LEDs
|
||||
*/
|
||||
|
@ -299,6 +307,8 @@ static void __init ek_board_init(void)
|
|||
at91_add_device_mmc(0, &ek_mmc_data);
|
||||
/* LCD Controller */
|
||||
at91_add_device_lcdc(&ek_lcdc_data);
|
||||
/* AC97 */
|
||||
at91_add_device_ac97(&ek_ac97_data);
|
||||
/* Touch Screen Controller */
|
||||
at91_add_device_tsadcc();
|
||||
/* LEDs */
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
#include <linux/amba/bus.h>
|
||||
#include <linux/amba/kmi.h>
|
||||
#include <linux/amba/clcd.h>
|
||||
#include <linux/amba/mmci.h>
|
||||
#include <linux/io.h>
|
||||
|
||||
#include <asm/clkdev.h>
|
||||
|
@ -35,7 +36,6 @@
|
|||
#include <asm/mach/arch.h>
|
||||
#include <asm/mach/flash.h>
|
||||
#include <asm/mach/irq.h>
|
||||
#include <asm/mach/mmc.h>
|
||||
#include <asm/mach/map.h>
|
||||
#include <asm/mach/time.h>
|
||||
|
||||
|
@ -400,7 +400,7 @@ static unsigned int mmc_status(struct device *dev)
|
|||
return status & 8;
|
||||
}
|
||||
|
||||
static struct mmc_platform_data mmc_data = {
|
||||
static struct mmci_platform_data mmc_data = {
|
||||
.ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34,
|
||||
.status = mmc_status,
|
||||
.gpio_wp = -1,
|
||||
|
|
|
@ -150,6 +150,8 @@ static inline int iop_adma_get_max_xor(void)
|
|||
return 16;
|
||||
}
|
||||
|
||||
#define iop_adma_get_max_pq iop_adma_get_max_xor
|
||||
|
||||
static inline u32 iop_chan_get_current_descriptor(struct iop_adma_chan *chan)
|
||||
{
|
||||
return __raw_readl(ADMA_ADAR(chan));
|
||||
|
@ -211,7 +213,10 @@ iop_chan_xor_slot_count(size_t len, int src_cnt, int *slots_per_op)
|
|||
#define IOP_ADMA_MAX_BYTE_COUNT ADMA_MAX_BYTE_COUNT
|
||||
#define IOP_ADMA_ZERO_SUM_MAX_BYTE_COUNT ADMA_MAX_BYTE_COUNT
|
||||
#define IOP_ADMA_XOR_MAX_BYTE_COUNT ADMA_MAX_BYTE_COUNT
|
||||
#define IOP_ADMA_PQ_MAX_BYTE_COUNT ADMA_MAX_BYTE_COUNT
|
||||
#define iop_chan_zero_sum_slot_count(l, s, o) iop_chan_xor_slot_count(l, s, o)
|
||||
#define iop_chan_pq_slot_count iop_chan_xor_slot_count
|
||||
#define iop_chan_pq_zero_sum_slot_count iop_chan_xor_slot_count
|
||||
|
||||
static inline u32 iop_desc_get_dest_addr(struct iop_adma_desc_slot *desc,
|
||||
struct iop_adma_chan *chan)
|
||||
|
@ -220,6 +225,13 @@ static inline u32 iop_desc_get_dest_addr(struct iop_adma_desc_slot *desc,
|
|||
return hw_desc->dest_addr;
|
||||
}
|
||||
|
||||
static inline u32 iop_desc_get_qdest_addr(struct iop_adma_desc_slot *desc,
|
||||
struct iop_adma_chan *chan)
|
||||
{
|
||||
struct iop13xx_adma_desc_hw *hw_desc = desc->hw_desc;
|
||||
return hw_desc->q_dest_addr;
|
||||
}
|
||||
|
||||
static inline u32 iop_desc_get_byte_count(struct iop_adma_desc_slot *desc,
|
||||
struct iop_adma_chan *chan)
|
||||
{
|
||||
|
@ -319,6 +331,58 @@ iop_desc_init_zero_sum(struct iop_adma_desc_slot *desc, int src_cnt,
|
|||
return 1;
|
||||
}
|
||||
|
||||
static inline void
|
||||
iop_desc_init_pq(struct iop_adma_desc_slot *desc, int src_cnt,
|
||||
unsigned long flags)
|
||||
{
|
||||
struct iop13xx_adma_desc_hw *hw_desc = desc->hw_desc;
|
||||
union {
|
||||
u32 value;
|
||||
struct iop13xx_adma_desc_ctrl field;
|
||||
} u_desc_ctrl;
|
||||
|
||||
u_desc_ctrl.value = 0;
|
||||
u_desc_ctrl.field.src_select = src_cnt - 1;
|
||||
u_desc_ctrl.field.xfer_dir = 3; /* local to internal bus */
|
||||
u_desc_ctrl.field.pq_xfer_en = 1;
|
||||
u_desc_ctrl.field.p_xfer_dis = !!(flags & DMA_PREP_PQ_DISABLE_P);
|
||||
u_desc_ctrl.field.int_en = flags & DMA_PREP_INTERRUPT;
|
||||
hw_desc->desc_ctrl = u_desc_ctrl.value;
|
||||
}
|
||||
|
||||
static inline int iop_desc_is_pq(struct iop_adma_desc_slot *desc)
|
||||
{
|
||||
struct iop13xx_adma_desc_hw *hw_desc = desc->hw_desc;
|
||||
union {
|
||||
u32 value;
|
||||
struct iop13xx_adma_desc_ctrl field;
|
||||
} u_desc_ctrl;
|
||||
|
||||
u_desc_ctrl.value = hw_desc->desc_ctrl;
|
||||
return u_desc_ctrl.field.pq_xfer_en;
|
||||
}
|
||||
|
||||
static inline void
|
||||
iop_desc_init_pq_zero_sum(struct iop_adma_desc_slot *desc, int src_cnt,
|
||||
unsigned long flags)
|
||||
{
|
||||
struct iop13xx_adma_desc_hw *hw_desc = desc->hw_desc;
|
||||
union {
|
||||
u32 value;
|
||||
struct iop13xx_adma_desc_ctrl field;
|
||||
} u_desc_ctrl;
|
||||
|
||||
u_desc_ctrl.value = 0;
|
||||
u_desc_ctrl.field.src_select = src_cnt - 1;
|
||||
u_desc_ctrl.field.xfer_dir = 3; /* local to internal bus */
|
||||
u_desc_ctrl.field.zero_result = 1;
|
||||
u_desc_ctrl.field.status_write_back_en = 1;
|
||||
u_desc_ctrl.field.pq_xfer_en = 1;
|
||||
u_desc_ctrl.field.p_xfer_dis = !!(flags & DMA_PREP_PQ_DISABLE_P);
|
||||
u_desc_ctrl.field.int_en = flags & DMA_PREP_INTERRUPT;
|
||||
hw_desc->desc_ctrl = u_desc_ctrl.value;
|
||||
}
|
||||
|
||||
static inline void iop_desc_set_byte_count(struct iop_adma_desc_slot *desc,
|
||||
struct iop_adma_chan *chan,
|
||||
u32 byte_count)
|
||||
|
@ -351,6 +415,7 @@ iop_desc_set_zero_sum_byte_count(struct iop_adma_desc_slot *desc, u32 len)
|
|||
}
|
||||
}
|
||||
|
||||
#define iop_desc_set_pq_zero_sum_byte_count iop_desc_set_zero_sum_byte_count
|
||||
|
||||
static inline void iop_desc_set_dest_addr(struct iop_adma_desc_slot *desc,
|
||||
struct iop_adma_chan *chan,
|
||||
|
@ -361,6 +426,16 @@ static inline void iop_desc_set_dest_addr(struct iop_adma_desc_slot *desc,
|
|||
hw_desc->upper_dest_addr = 0;
|
||||
}
|
||||
|
||||
static inline void
|
||||
iop_desc_set_pq_addr(struct iop_adma_desc_slot *desc, dma_addr_t *addr)
|
||||
{
|
||||
struct iop13xx_adma_desc_hw *hw_desc = desc->hw_desc;
|
||||
|
||||
hw_desc->dest_addr = addr[0];
|
||||
hw_desc->q_dest_addr = addr[1];
|
||||
hw_desc->upper_dest_addr = 0;
|
||||
}
|
||||
|
||||
static inline void iop_desc_set_memcpy_src_addr(struct iop_adma_desc_slot *desc,
|
||||
dma_addr_t addr)
|
||||
{
|
||||
|
@ -388,6 +463,29 @@ static inline void iop_desc_set_xor_src_addr(struct iop_adma_desc_slot *desc,
|
|||
} while (slot_cnt);
|
||||
}
|
||||
|
||||
static inline void
|
||||
iop_desc_set_pq_src_addr(struct iop_adma_desc_slot *desc, int src_idx,
|
||||
dma_addr_t addr, unsigned char coef)
|
||||
{
|
||||
int slot_cnt = desc->slot_cnt, slots_per_op = desc->slots_per_op;
|
||||
struct iop13xx_adma_desc_hw *hw_desc = desc->hw_desc, *iter;
|
||||
struct iop13xx_adma_src *src;
|
||||
int i = 0;
|
||||
|
||||
do {
|
||||
iter = iop_hw_desc_slot_idx(hw_desc, i);
|
||||
src = &iter->src[src_idx];
|
||||
src->src_addr = addr;
|
||||
src->pq_upper_src_addr = 0;
|
||||
src->pq_dmlt = coef;
|
||||
slot_cnt -= slots_per_op;
|
||||
if (slot_cnt) {
|
||||
i += slots_per_op;
|
||||
addr += IOP_ADMA_PQ_MAX_BYTE_COUNT;
|
||||
}
|
||||
} while (slot_cnt);
|
||||
}
|
||||
|
||||
static inline void
|
||||
iop_desc_init_interrupt(struct iop_adma_desc_slot *desc,
|
||||
struct iop_adma_chan *chan)
|
||||
|
@ -399,6 +497,15 @@ iop_desc_init_interrupt(struct iop_adma_desc_slot *desc,
|
|||
}
|
||||
|
||||
#define iop_desc_set_zero_sum_src_addr iop_desc_set_xor_src_addr
|
||||
#define iop_desc_set_pq_zero_sum_src_addr iop_desc_set_pq_src_addr
|
||||
|
||||
static inline void
|
||||
iop_desc_set_pq_zero_sum_addr(struct iop_adma_desc_slot *desc, int pq_idx,
|
||||
dma_addr_t *src)
|
||||
{
|
||||
iop_desc_set_xor_src_addr(desc, pq_idx, src[pq_idx]);
|
||||
iop_desc_set_xor_src_addr(desc, pq_idx+1, src[pq_idx+1]);
|
||||
}
|
||||
|
||||
static inline void iop_desc_set_next_desc(struct iop_adma_desc_slot *desc,
|
||||
u32 next_desc_addr)
|
||||
|
@ -428,18 +535,20 @@ static inline void iop_desc_set_block_fill_val(struct iop_adma_desc_slot *desc,
|
|||
hw_desc->block_fill_data = val;
|
||||
}
|
||||
|
||||
static inline int iop_desc_get_zero_result(struct iop_adma_desc_slot *desc)
|
||||
static inline enum sum_check_flags
|
||||
iop_desc_get_zero_result(struct iop_adma_desc_slot *desc)
|
||||
{
|
||||
struct iop13xx_adma_desc_hw *hw_desc = desc->hw_desc;
|
||||
struct iop13xx_adma_desc_ctrl desc_ctrl = hw_desc->desc_ctrl_field;
|
||||
struct iop13xx_adma_byte_count byte_count = hw_desc->byte_count_field;
|
||||
enum sum_check_flags flags;
|
||||
|
||||
BUG_ON(!(byte_count.tx_complete && desc_ctrl.zero_result));
|
||||
|
||||
if (desc_ctrl.pq_xfer_en)
|
||||
return byte_count.zero_result_err_q;
|
||||
else
|
||||
return byte_count.zero_result_err;
|
||||
flags = byte_count.zero_result_err_q << SUM_CHECK_Q;
|
||||
flags |= byte_count.zero_result_err << SUM_CHECK_P;
|
||||
|
||||
return flags;
|
||||
}
|
||||
|
||||
static inline void iop_chan_append(struct iop_adma_chan *chan)
|
||||
|
|
|
@ -477,10 +477,8 @@ void __init iop13xx_platform_init(void)
|
|||
plat_data = &iop13xx_adma_0_data;
|
||||
dma_cap_set(DMA_MEMCPY, plat_data->cap_mask);
|
||||
dma_cap_set(DMA_XOR, plat_data->cap_mask);
|
||||
dma_cap_set(DMA_DUAL_XOR, plat_data->cap_mask);
|
||||
dma_cap_set(DMA_ZERO_SUM, plat_data->cap_mask);
|
||||
dma_cap_set(DMA_XOR_VAL, plat_data->cap_mask);
|
||||
dma_cap_set(DMA_MEMSET, plat_data->cap_mask);
|
||||
dma_cap_set(DMA_MEMCPY_CRC32C, plat_data->cap_mask);
|
||||
dma_cap_set(DMA_INTERRUPT, plat_data->cap_mask);
|
||||
break;
|
||||
case IOP13XX_INIT_ADMA_1:
|
||||
|
@ -489,10 +487,8 @@ void __init iop13xx_platform_init(void)
|
|||
plat_data = &iop13xx_adma_1_data;
|
||||
dma_cap_set(DMA_MEMCPY, plat_data->cap_mask);
|
||||
dma_cap_set(DMA_XOR, plat_data->cap_mask);
|
||||
dma_cap_set(DMA_DUAL_XOR, plat_data->cap_mask);
|
||||
dma_cap_set(DMA_ZERO_SUM, plat_data->cap_mask);
|
||||
dma_cap_set(DMA_XOR_VAL, plat_data->cap_mask);
|
||||
dma_cap_set(DMA_MEMSET, plat_data->cap_mask);
|
||||
dma_cap_set(DMA_MEMCPY_CRC32C, plat_data->cap_mask);
|
||||
dma_cap_set(DMA_INTERRUPT, plat_data->cap_mask);
|
||||
break;
|
||||
case IOP13XX_INIT_ADMA_2:
|
||||
|
@ -501,14 +497,11 @@ void __init iop13xx_platform_init(void)
|
|||
plat_data = &iop13xx_adma_2_data;
|
||||
dma_cap_set(DMA_MEMCPY, plat_data->cap_mask);
|
||||
dma_cap_set(DMA_XOR, plat_data->cap_mask);
|
||||
dma_cap_set(DMA_DUAL_XOR, plat_data->cap_mask);
|
||||
dma_cap_set(DMA_ZERO_SUM, plat_data->cap_mask);
|
||||
dma_cap_set(DMA_XOR_VAL, plat_data->cap_mask);
|
||||
dma_cap_set(DMA_MEMSET, plat_data->cap_mask);
|
||||
dma_cap_set(DMA_MEMCPY_CRC32C, plat_data->cap_mask);
|
||||
dma_cap_set(DMA_INTERRUPT, plat_data->cap_mask);
|
||||
dma_cap_set(DMA_PQ_XOR, plat_data->cap_mask);
|
||||
dma_cap_set(DMA_PQ_UPDATE, plat_data->cap_mask);
|
||||
dma_cap_set(DMA_PQ_ZERO_SUM, plat_data->cap_mask);
|
||||
dma_cap_set(DMA_PQ, plat_data->cap_mask);
|
||||
dma_cap_set(DMA_PQ_VAL, plat_data->cap_mask);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -21,6 +21,11 @@ config CPU_PXA930
|
|||
|
||||
config CPU_PXA935
|
||||
bool "PXA935 (codename Tavor-P65)"
|
||||
select CPU_PXA930
|
||||
|
||||
config CPU_PXA950
|
||||
bool "PXA950 (codename Tavor-PV2)"
|
||||
select CPU_PXA930
|
||||
|
||||
endmenu
|
||||
|
||||
|
@ -79,6 +84,12 @@ config MACH_MP900C
|
|||
bool "Nec Mobilepro 900/c"
|
||||
select PXA25x
|
||||
|
||||
config MACH_BALLOON3
|
||||
bool "Balloon 3 board"
|
||||
select PXA27x
|
||||
select IWMMXT
|
||||
select PXA_HAVE_BOARD_IRQS
|
||||
|
||||
config ARCH_PXA_IDP
|
||||
bool "Accelent Xscale IDP"
|
||||
select PXA25x
|
||||
|
@ -371,6 +382,15 @@ config MACH_PALMTE2
|
|||
Say Y here if you intend to run this kernel on a Palm Tungsten|E2
|
||||
handheld computer.
|
||||
|
||||
config MACH_PALMTC
|
||||
bool "Palm Tungsten|C"
|
||||
default y
|
||||
depends on ARCH_PXA_PALM
|
||||
select PXA25x
|
||||
help
|
||||
Say Y here if you intend to run this kernel on a Palm Tungsten|C
|
||||
handheld computer.
|
||||
|
||||
config MACH_PALMT5
|
||||
bool "Palm Tungsten|T5"
|
||||
default y
|
||||
|
@ -458,6 +478,7 @@ config PXA_EZX
|
|||
select PXA27x
|
||||
select IWMMXT
|
||||
select HAVE_PWM
|
||||
select PXA_HAVE_BOARD_IRQS
|
||||
|
||||
config MACH_EZX_A780
|
||||
bool "Motorola EZX A780"
|
||||
|
@ -489,6 +510,21 @@ config MACH_EZX_E2
|
|||
default y
|
||||
depends on PXA_EZX
|
||||
|
||||
config MACH_XCEP
|
||||
bool "Iskratel Electronics XCEP"
|
||||
select PXA25x
|
||||
select MTD
|
||||
select MTD_PARTITIONS
|
||||
select MTD_PHYSMAP
|
||||
select MTD_CFI_INTELEXT
|
||||
select MTD_CFI
|
||||
select MTD_CHAR
|
||||
select SMC91X
|
||||
select PXA_SSP
|
||||
help
|
||||
PXA255 based Single Board Computer with SMC 91C111 ethernet chip and 64 MB of flash.
|
||||
Tuned for usage in Libera instruments for particle accelerators.
|
||||
|
||||
endmenu
|
||||
|
||||
config PXA25x
|
||||
|
|
|
@ -31,6 +31,7 @@ obj-$(CONFIG_GUMSTIX_AM300EPD) += am300epd.o
|
|||
obj-$(CONFIG_ARCH_LUBBOCK) += lubbock.o
|
||||
obj-$(CONFIG_MACH_LOGICPD_PXA270) += lpd270.o
|
||||
obj-$(CONFIG_MACH_MAINSTONE) += mainstone.o
|
||||
obj-$(CONFIG_MACH_BALLOON3) += balloon3.o
|
||||
obj-$(CONFIG_MACH_MP900C) += mp900.o
|
||||
obj-$(CONFIG_ARCH_PXA_IDP) += idp.o
|
||||
obj-$(CONFIG_MACH_TRIZEPS4) += trizeps4.o
|
||||
|
@ -58,6 +59,7 @@ obj-$(CONFIG_MACH_E750) += e750.o
|
|||
obj-$(CONFIG_MACH_E400) += e400.o
|
||||
obj-$(CONFIG_MACH_E800) += e800.o
|
||||
obj-$(CONFIG_MACH_PALMTE2) += palmte2.o
|
||||
obj-$(CONFIG_MACH_PALMTC) += palmtc.o
|
||||
obj-$(CONFIG_MACH_PALMT5) += palmt5.o
|
||||
obj-$(CONFIG_MACH_PALMTX) += palmtx.o
|
||||
obj-$(CONFIG_MACH_PALMLD) += palmld.o
|
||||
|
@ -78,6 +80,8 @@ obj-$(CONFIG_MACH_ARMCORE) += cm-x2xx.o cm-x255.o cm-x270.o
|
|||
obj-$(CONFIG_MACH_CM_X300) += cm-x300.o
|
||||
obj-$(CONFIG_PXA_EZX) += ezx.o
|
||||
|
||||
obj-$(CONFIG_MACH_XCEP) += xcep.o
|
||||
|
||||
obj-$(CONFIG_MACH_INTELMOTE2) += imote2.o
|
||||
obj-$(CONFIG_MACH_STARGATE2) += stargate2.o
|
||||
obj-$(CONFIG_MACH_CSB726) += csb726.o
|
||||
|
|
361
arch/arm/mach-pxa/balloon3.c
Normal file
361
arch/arm/mach-pxa/balloon3.c
Normal file
|
@ -0,0 +1,361 @@
|
|||
/*
|
||||
* linux/arch/arm/mach-pxa/balloon3.c
|
||||
*
|
||||
* Support for Balloonboard.org Balloon3 board.
|
||||
*
|
||||
* Author: Nick Bane, Wookey, Jonathan McDowell
|
||||
* Created: June, 2006
|
||||
* Copyright: Toby Churchill Ltd
|
||||
* Derived from mainstone.c, by Nico Pitre
|
||||
*
|
||||
* 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/init.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/sysdev.h>
|
||||
#include <linux/interrupt.h>
|
||||
#include <linux/sched.h>
|
||||
#include <linux/bitops.h>
|
||||
#include <linux/fb.h>
|
||||
#include <linux/gpio.h>
|
||||
#include <linux/ioport.h>
|
||||
#include <linux/mtd/mtd.h>
|
||||
#include <linux/mtd/partitions.h>
|
||||
#include <linux/types.h>
|
||||
|
||||
#include <asm/setup.h>
|
||||
#include <asm/mach-types.h>
|
||||
#include <asm/irq.h>
|
||||
#include <asm/sizes.h>
|
||||
|
||||
#include <asm/mach/arch.h>
|
||||
#include <asm/mach/map.h>
|
||||
#include <asm/mach/irq.h>
|
||||
#include <asm/mach/flash.h>
|
||||
|
||||
#include <mach/pxa27x.h>
|
||||
#include <mach/balloon3.h>
|
||||
#include <mach/audio.h>
|
||||
#include <mach/pxafb.h>
|
||||
#include <mach/mmc.h>
|
||||
#include <mach/udc.h>
|
||||
#include <mach/pxa27x-udc.h>
|
||||
#include <mach/irda.h>
|
||||
#include <mach/ohci.h>
|
||||
|
||||
#include <plat/i2c.h>
|
||||
|
||||
#include "generic.h"
|
||||
#include "devices.h"
|
||||
|
||||
static unsigned long balloon3_irq_enabled;
|
||||
|
||||
static unsigned long balloon3_features_present =
|
||||
(1 << BALLOON3_FEATURE_OHCI) | (1 << BALLOON3_FEATURE_CF) |
|
||||
(1 << BALLOON3_FEATURE_AUDIO) |
|
||||
(1 << BALLOON3_FEATURE_TOPPOLY);
|
||||
|
||||
int balloon3_has(enum balloon3_features feature)
|
||||
{
|
||||
return (balloon3_features_present & (1 << feature)) ? 1 : 0;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(balloon3_has);
|
||||
|
||||
int __init parse_balloon3_features(char *arg)
|
||||
{
|
||||
if (!arg)
|
||||
return 0;
|
||||
|
||||
return strict_strtoul(arg, 0, &balloon3_features_present);
|
||||
}
|
||||
early_param("balloon3_features", parse_balloon3_features);
|
||||
|
||||
static void balloon3_mask_irq(unsigned int irq)
|
||||
{
|
||||
int balloon3_irq = (irq - BALLOON3_IRQ(0));
|
||||
balloon3_irq_enabled &= ~(1 << balloon3_irq);
|
||||
__raw_writel(~balloon3_irq_enabled, BALLOON3_INT_CONTROL_REG);
|
||||
}
|
||||
|
||||
static void balloon3_unmask_irq(unsigned int irq)
|
||||
{
|
||||
int balloon3_irq = (irq - BALLOON3_IRQ(0));
|
||||
balloon3_irq_enabled |= (1 << balloon3_irq);
|
||||
__raw_writel(~balloon3_irq_enabled, BALLOON3_INT_CONTROL_REG);
|
||||
}
|
||||
|
||||
static struct irq_chip balloon3_irq_chip = {
|
||||
.name = "FPGA",
|
||||
.ack = balloon3_mask_irq,
|
||||
.mask = balloon3_mask_irq,
|
||||
.unmask = balloon3_unmask_irq,
|
||||
};
|
||||
|
||||
static void balloon3_irq_handler(unsigned int irq, struct irq_desc *desc)
|
||||
{
|
||||
unsigned long pending = __raw_readl(BALLOON3_INT_CONTROL_REG) &
|
||||
balloon3_irq_enabled;
|
||||
|
||||
do {
|
||||
/* clear useless edge notification */
|
||||
if (desc->chip->ack)
|
||||
desc->chip->ack(BALLOON3_AUX_NIRQ);
|
||||
while (pending) {
|
||||
irq = BALLOON3_IRQ(0) + __ffs(pending);
|
||||
generic_handle_irq(irq);
|
||||
pending &= pending - 1;
|
||||
}
|
||||
pending = __raw_readl(BALLOON3_INT_CONTROL_REG) &
|
||||
balloon3_irq_enabled;
|
||||
} while (pending);
|
||||
}
|
||||
|
||||
static void __init balloon3_init_irq(void)
|
||||
{
|
||||
int irq;
|
||||
|
||||
pxa27x_init_irq();
|
||||
/* setup extra Balloon3 irqs */
|
||||
for (irq = BALLOON3_IRQ(0); irq <= BALLOON3_IRQ(7); irq++) {
|
||||
set_irq_chip(irq, &balloon3_irq_chip);
|
||||
set_irq_handler(irq, handle_level_irq);
|
||||
set_irq_flags(irq, IRQF_VALID | IRQF_PROBE);
|
||||
}
|
||||
|
||||
set_irq_chained_handler(BALLOON3_AUX_NIRQ, balloon3_irq_handler);
|
||||
set_irq_type(BALLOON3_AUX_NIRQ, IRQ_TYPE_EDGE_FALLING);
|
||||
|
||||
pr_debug("%s: chained handler installed - irq %d automatically "
|
||||
"enabled\n", __func__, BALLOON3_AUX_NIRQ);
|
||||
}
|
||||
|
||||
static void balloon3_backlight_power(int on)
|
||||
{
|
||||
pr_debug("%s: power is %s\n", __func__, on ? "on" : "off");
|
||||
gpio_set_value(BALLOON3_GPIO_RUN_BACKLIGHT, on);
|
||||
}
|
||||
|
||||
static unsigned long balloon3_lcd_pin_config[] = {
|
||||
/* LCD - 16bpp Active TFT */
|
||||
GPIO58_LCD_LDD_0,
|
||||
GPIO59_LCD_LDD_1,
|
||||
GPIO60_LCD_LDD_2,
|
||||
GPIO61_LCD_LDD_3,
|
||||
GPIO62_LCD_LDD_4,
|
||||
GPIO63_LCD_LDD_5,
|
||||
GPIO64_LCD_LDD_6,
|
||||
GPIO65_LCD_LDD_7,
|
||||
GPIO66_LCD_LDD_8,
|
||||
GPIO67_LCD_LDD_9,
|
||||
GPIO68_LCD_LDD_10,
|
||||
GPIO69_LCD_LDD_11,
|
||||
GPIO70_LCD_LDD_12,
|
||||
GPIO71_LCD_LDD_13,
|
||||
GPIO72_LCD_LDD_14,
|
||||
GPIO73_LCD_LDD_15,
|
||||
GPIO74_LCD_FCLK,
|
||||
GPIO75_LCD_LCLK,
|
||||
GPIO76_LCD_PCLK,
|
||||
GPIO77_LCD_BIAS,
|
||||
|
||||
GPIO99_GPIO, /* Backlight */
|
||||
};
|
||||
|
||||
static struct pxafb_mode_info balloon3_lcd_modes[] = {
|
||||
{
|
||||
.pixclock = 38000,
|
||||
.xres = 480,
|
||||
.yres = 640,
|
||||
.bpp = 16,
|
||||
.hsync_len = 8,
|
||||
.left_margin = 8,
|
||||
.right_margin = 8,
|
||||
.vsync_len = 2,
|
||||
.upper_margin = 4,
|
||||
.lower_margin = 5,
|
||||
.sync = 0,
|
||||
},
|
||||
};
|
||||
|
||||
static struct pxafb_mach_info balloon3_pxafb_info = {
|
||||
.modes = balloon3_lcd_modes,
|
||||
.num_modes = ARRAY_SIZE(balloon3_lcd_modes),
|
||||
.lcd_conn = LCD_COLOR_TFT_16BPP | LCD_PCLK_EDGE_FALL,
|
||||
.pxafb_backlight_power = balloon3_backlight_power,
|
||||
};
|
||||
|
||||
static unsigned long balloon3_mmc_pin_config[] = {
|
||||
GPIO32_MMC_CLK,
|
||||
GPIO92_MMC_DAT_0,
|
||||
GPIO109_MMC_DAT_1,
|
||||
GPIO110_MMC_DAT_2,
|
||||
GPIO111_MMC_DAT_3,
|
||||
GPIO112_MMC_CMD,
|
||||
};
|
||||
|
||||
static void balloon3_mci_setpower(struct device *dev, unsigned int vdd)
|
||||
{
|
||||
struct pxamci_platform_data *p_d = dev->platform_data;
|
||||
|
||||
if ((1 << vdd) & p_d->ocr_mask) {
|
||||
pr_debug("%s: on\n", __func__);
|
||||
/* FIXME something to prod here? */
|
||||
} else {
|
||||
pr_debug("%s: off\n", __func__);
|
||||
/* FIXME something to prod here? */
|
||||
}
|
||||
}
|
||||
|
||||
static struct pxamci_platform_data balloon3_mci_platform_data = {
|
||||
.ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34,
|
||||
.setpower = balloon3_mci_setpower,
|
||||
};
|
||||
|
||||
static int balloon3_udc_is_connected(void)
|
||||
{
|
||||
pr_debug("%s: udc connected\n", __func__);
|
||||
return 1;
|
||||
}
|
||||
|
||||
static void balloon3_udc_command(int cmd)
|
||||
{
|
||||
switch (cmd) {
|
||||
case PXA2XX_UDC_CMD_CONNECT:
|
||||
UP2OCR |= (UP2OCR_DPPUE + UP2OCR_DPPUBE);
|
||||
pr_debug("%s: connect\n", __func__);
|
||||
break;
|
||||
case PXA2XX_UDC_CMD_DISCONNECT:
|
||||
UP2OCR &= ~UP2OCR_DPPUE;
|
||||
pr_debug("%s: disconnect\n", __func__);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static struct pxa2xx_udc_mach_info balloon3_udc_info = {
|
||||
.udc_is_connected = balloon3_udc_is_connected,
|
||||
.udc_command = balloon3_udc_command,
|
||||
};
|
||||
|
||||
static struct pxaficp_platform_data balloon3_ficp_platform_data = {
|
||||
.transceiver_cap = IR_SIRMODE | IR_FIRMODE | IR_OFF,
|
||||
};
|
||||
|
||||
static unsigned long balloon3_ohci_pin_config[] = {
|
||||
GPIO88_USBH1_PWR,
|
||||
GPIO89_USBH1_PEN,
|
||||
};
|
||||
|
||||
static struct pxaohci_platform_data balloon3_ohci_platform_data = {
|
||||
.port_mode = PMM_PERPORT_MODE,
|
||||
.flags = ENABLE_PORT_ALL | POWER_CONTROL_LOW | POWER_SENSE_LOW,
|
||||
};
|
||||
|
||||
static unsigned long balloon3_pin_config[] __initdata = {
|
||||
/* Select BTUART 'COM1/ttyS0' as IO option for pins 42/43/44/45 */
|
||||
GPIO42_BTUART_RXD,
|
||||
GPIO43_BTUART_TXD,
|
||||
GPIO44_BTUART_CTS,
|
||||
GPIO45_BTUART_RTS,
|
||||
|
||||
/* Wakeup GPIO */
|
||||
GPIO1_GPIO | WAKEUP_ON_EDGE_BOTH,
|
||||
|
||||
/* NAND & IDLE LED GPIOs */
|
||||
GPIO9_GPIO,
|
||||
GPIO10_GPIO,
|
||||
};
|
||||
|
||||
static struct gpio_led balloon3_gpio_leds[] = {
|
||||
{
|
||||
.name = "balloon3:green:idle",
|
||||
.default_trigger = "heartbeat",
|
||||
.gpio = BALLOON3_GPIO_LED_IDLE,
|
||||
.active_low = 1,
|
||||
},
|
||||
{
|
||||
.name = "balloon3:green:nand",
|
||||
.default_trigger = "nand-disk",
|
||||
.gpio = BALLOON3_GPIO_LED_NAND,
|
||||
.active_low = 1,
|
||||
},
|
||||
};
|
||||
|
||||
static struct gpio_led_platform_data balloon3_gpio_leds_platform_data = {
|
||||
.leds = balloon3_gpio_leds,
|
||||
.num_leds = ARRAY_SIZE(balloon3_gpio_leds),
|
||||
};
|
||||
|
||||
static struct platform_device balloon3led_device = {
|
||||
.name = "leds-gpio",
|
||||
.id = -1,
|
||||
.dev = {
|
||||
.platform_data = &balloon3_gpio_leds_platform_data,
|
||||
},
|
||||
};
|
||||
|
||||
static void __init balloon3_init(void)
|
||||
{
|
||||
pr_info("Initialising Balloon3\n");
|
||||
|
||||
/* system bus arbiter setting
|
||||
* - Core_Park
|
||||
* - LCD_wt:DMA_wt:CORE_Wt = 2:3:4
|
||||
*/
|
||||
ARB_CNTRL = ARB_CORE_PARK | 0x234;
|
||||
|
||||
pxa_set_i2c_info(NULL);
|
||||
if (balloon3_has(BALLOON3_FEATURE_AUDIO))
|
||||
pxa_set_ac97_info(NULL);
|
||||
|
||||
if (balloon3_has(BALLOON3_FEATURE_TOPPOLY)) {
|
||||
pxa2xx_mfp_config(ARRAY_AND_SIZE(balloon3_lcd_pin_config));
|
||||
gpio_request(BALLOON3_GPIO_RUN_BACKLIGHT,
|
||||
"LCD Backlight Power");
|
||||
gpio_direction_output(BALLOON3_GPIO_RUN_BACKLIGHT, 1);
|
||||
set_pxa_fb_info(&balloon3_pxafb_info);
|
||||
}
|
||||
|
||||
if (balloon3_has(BALLOON3_FEATURE_MMC)) {
|
||||
pxa2xx_mfp_config(ARRAY_AND_SIZE(balloon3_mmc_pin_config));
|
||||
pxa_set_mci_info(&balloon3_mci_platform_data);
|
||||
}
|
||||
pxa_set_ficp_info(&balloon3_ficp_platform_data);
|
||||
if (balloon3_has(BALLOON3_FEATURE_OHCI)) {
|
||||
pxa2xx_mfp_config(ARRAY_AND_SIZE(balloon3_ohci_pin_config));
|
||||
pxa_set_ohci_info(&balloon3_ohci_platform_data);
|
||||
}
|
||||
pxa_set_udc_info(&balloon3_udc_info);
|
||||
|
||||
pxa2xx_mfp_config(ARRAY_AND_SIZE(balloon3_pin_config));
|
||||
|
||||
platform_device_register(&balloon3led_device);
|
||||
}
|
||||
|
||||
static struct map_desc balloon3_io_desc[] __initdata = {
|
||||
{ /* CPLD/FPGA */
|
||||
.virtual = BALLOON3_FPGA_VIRT,
|
||||
.pfn = __phys_to_pfn(BALLOON3_FPGA_PHYS),
|
||||
.length = BALLOON3_FPGA_LENGTH,
|
||||
.type = MT_DEVICE,
|
||||
},
|
||||
};
|
||||
|
||||
static void __init balloon3_map_io(void)
|
||||
{
|
||||
pxa_map_io();
|
||||
iotable_init(balloon3_io_desc, ARRAY_SIZE(balloon3_io_desc));
|
||||
}
|
||||
|
||||
MACHINE_START(BALLOON3, "Balloon3")
|
||||
/* Maintainer: Nick Bane. */
|
||||
.phys_io = 0x40000000,
|
||||
.io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc,
|
||||
.map_io = balloon3_map_io,
|
||||
.init_irq = balloon3_init_irq,
|
||||
.timer = &pxa_timer,
|
||||
.init_machine = balloon3_init,
|
||||
.boot_params = PHYS_OFFSET + 0x100,
|
||||
MACHINE_END
|
|
@ -12,7 +12,6 @@ struct clk {
|
|||
unsigned int cken;
|
||||
unsigned int delay;
|
||||
unsigned int enabled;
|
||||
struct clk *other;
|
||||
};
|
||||
|
||||
#define INIT_CLKREG(_clk,_devname,_conname) \
|
||||
|
|
|
@ -13,13 +13,18 @@
|
|||
#include <linux/sysdev.h>
|
||||
#include <linux/irq.h>
|
||||
#include <linux/gpio.h>
|
||||
#include <linux/delay.h>
|
||||
|
||||
#include <linux/rtc-v3020.h>
|
||||
#include <video/mbxfb.h>
|
||||
|
||||
#include <linux/spi/spi.h>
|
||||
#include <linux/spi/libertas_spi.h>
|
||||
|
||||
#include <mach/pxa27x.h>
|
||||
#include <mach/ohci.h>
|
||||
#include <mach/mmc.h>
|
||||
#include <mach/pxa2xx_spi.h>
|
||||
|
||||
#include "generic.h"
|
||||
|
||||
|
@ -34,6 +39,10 @@
|
|||
/* MMC power enable */
|
||||
#define GPIO105_MMC_POWER (105)
|
||||
|
||||
/* WLAN GPIOS */
|
||||
#define GPIO19_WLAN_STRAP (19)
|
||||
#define GPIO102_WLAN_RST (102)
|
||||
|
||||
static unsigned long cmx270_pin_config[] = {
|
||||
/* AC'97 */
|
||||
GPIO28_AC97_BITCLK,
|
||||
|
@ -94,8 +103,8 @@ static unsigned long cmx270_pin_config[] = {
|
|||
GPIO26_SSP1_RXD,
|
||||
|
||||
/* SSP2 */
|
||||
GPIO19_SSP2_SCLK,
|
||||
GPIO14_SSP2_SFRM,
|
||||
GPIO19_GPIO, /* SSP2 clock is used as GPIO for Libertas pin-strap */
|
||||
GPIO14_GPIO,
|
||||
GPIO87_SSP2_TXD,
|
||||
GPIO88_SSP2_RXD,
|
||||
|
||||
|
@ -123,6 +132,7 @@ static unsigned long cmx270_pin_config[] = {
|
|||
GPIO0_GPIO | WAKEUP_ON_EDGE_BOTH,
|
||||
GPIO105_GPIO | MFP_LPM_DRIVE_HIGH, /* MMC/SD power */
|
||||
GPIO53_GPIO, /* PC card reset */
|
||||
GPIO102_GPIO, /* WLAN reset */
|
||||
|
||||
/* NAND controls */
|
||||
GPIO11_GPIO | MFP_LPM_DRIVE_HIGH, /* NAND CE# */
|
||||
|
@ -131,6 +141,7 @@ static unsigned long cmx270_pin_config[] = {
|
|||
/* interrupts */
|
||||
GPIO10_GPIO, /* DM9000 interrupt */
|
||||
GPIO83_GPIO, /* MMC card detect */
|
||||
GPIO95_GPIO, /* WLAN interrupt */
|
||||
};
|
||||
|
||||
/* V3020 RTC */
|
||||
|
@ -271,56 +282,12 @@ static inline void cmx270_init_ohci(void) {}
|
|||
#endif
|
||||
|
||||
#if defined(CONFIG_MMC) || defined(CONFIG_MMC_MODULE)
|
||||
static int cmx270_mci_init(struct device *dev,
|
||||
irq_handler_t cmx270_detect_int,
|
||||
void *data)
|
||||
{
|
||||
int err;
|
||||
|
||||
err = gpio_request(GPIO105_MMC_POWER, "MMC/SD power");
|
||||
if (err) {
|
||||
dev_warn(dev, "power gpio unavailable\n");
|
||||
return err;
|
||||
}
|
||||
|
||||
gpio_direction_output(GPIO105_MMC_POWER, 0);
|
||||
|
||||
err = request_irq(CMX270_MMC_IRQ, cmx270_detect_int,
|
||||
IRQF_DISABLED | IRQF_TRIGGER_FALLING,
|
||||
"MMC card detect", data);
|
||||
if (err) {
|
||||
gpio_free(GPIO105_MMC_POWER);
|
||||
dev_err(dev, "cmx270_mci_init: MMC/SD: can't"
|
||||
" request MMC card detect IRQ\n");
|
||||
}
|
||||
|
||||
return err;
|
||||
}
|
||||
|
||||
static void cmx270_mci_setpower(struct device *dev, unsigned int vdd)
|
||||
{
|
||||
struct pxamci_platform_data *p_d = dev->platform_data;
|
||||
|
||||
if ((1 << vdd) & p_d->ocr_mask) {
|
||||
dev_dbg(dev, "power on\n");
|
||||
gpio_set_value(GPIO105_MMC_POWER, 0);
|
||||
} else {
|
||||
gpio_set_value(GPIO105_MMC_POWER, 1);
|
||||
dev_dbg(dev, "power off\n");
|
||||
}
|
||||
}
|
||||
|
||||
static void cmx270_mci_exit(struct device *dev, void *data)
|
||||
{
|
||||
free_irq(CMX270_MMC_IRQ, data);
|
||||
gpio_free(GPIO105_MMC_POWER);
|
||||
}
|
||||
|
||||
static struct pxamci_platform_data cmx270_mci_platform_data = {
|
||||
.ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34,
|
||||
.init = cmx270_mci_init,
|
||||
.setpower = cmx270_mci_setpower,
|
||||
.exit = cmx270_mci_exit,
|
||||
.ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34,
|
||||
.gpio_card_detect = GPIO83_MMC_IRQ,
|
||||
.gpio_card_ro = -1,
|
||||
.gpio_power = GPIO105_MMC_POWER,
|
||||
.gpio_power_invert = 1,
|
||||
};
|
||||
|
||||
static void __init cmx270_init_mmc(void)
|
||||
|
@ -331,6 +298,100 @@ static void __init cmx270_init_mmc(void)
|
|||
static inline void cmx270_init_mmc(void) {}
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_SPI_PXA2XX) || defined(CONFIG_SPI_PXA2XX_MODULE)
|
||||
static struct pxa2xx_spi_master cm_x270_spi_info = {
|
||||
.num_chipselect = 1,
|
||||
.enable_dma = 1,
|
||||
};
|
||||
|
||||
static struct pxa2xx_spi_chip cm_x270_libertas_chip = {
|
||||
.rx_threshold = 1,
|
||||
.tx_threshold = 1,
|
||||
.timeout = 1000,
|
||||
.gpio_cs = 14,
|
||||
};
|
||||
|
||||
static unsigned long cm_x270_libertas_pin_config[] = {
|
||||
/* SSP2 */
|
||||
GPIO19_SSP2_SCLK,
|
||||
GPIO14_GPIO,
|
||||
GPIO87_SSP2_TXD,
|
||||
GPIO88_SSP2_RXD,
|
||||
|
||||
};
|
||||
|
||||
static int cm_x270_libertas_setup(struct spi_device *spi)
|
||||
{
|
||||
int err = gpio_request(GPIO19_WLAN_STRAP, "WLAN STRAP");
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
err = gpio_request(GPIO102_WLAN_RST, "WLAN RST");
|
||||
if (err)
|
||||
goto err_free_strap;
|
||||
|
||||
err = gpio_direction_output(GPIO102_WLAN_RST, 0);
|
||||
if (err)
|
||||
goto err_free_strap;
|
||||
msleep(100);
|
||||
|
||||
err = gpio_direction_output(GPIO19_WLAN_STRAP, 1);
|
||||
if (err)
|
||||
goto err_free_strap;
|
||||
msleep(100);
|
||||
|
||||
pxa2xx_mfp_config(ARRAY_AND_SIZE(cm_x270_libertas_pin_config));
|
||||
|
||||
gpio_set_value(GPIO102_WLAN_RST, 1);
|
||||
msleep(100);
|
||||
|
||||
spi->bits_per_word = 16;
|
||||
spi_setup(spi);
|
||||
|
||||
return 0;
|
||||
|
||||
err_free_strap:
|
||||
gpio_free(GPIO19_WLAN_STRAP);
|
||||
|
||||
return err;
|
||||
}
|
||||
|
||||
static int cm_x270_libertas_teardown(struct spi_device *spi)
|
||||
{
|
||||
gpio_set_value(GPIO102_WLAN_RST, 0);
|
||||
gpio_free(GPIO102_WLAN_RST);
|
||||
gpio_free(GPIO19_WLAN_STRAP);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
struct libertas_spi_platform_data cm_x270_libertas_pdata = {
|
||||
.use_dummy_writes = 1,
|
||||
.setup = cm_x270_libertas_setup,
|
||||
.teardown = cm_x270_libertas_teardown,
|
||||
};
|
||||
|
||||
static struct spi_board_info cm_x270_spi_devices[] __initdata = {
|
||||
{
|
||||
.modalias = "libertas_spi",
|
||||
.max_speed_hz = 13000000,
|
||||
.bus_num = 2,
|
||||
.irq = gpio_to_irq(95),
|
||||
.chip_select = 0,
|
||||
.controller_data = &cm_x270_libertas_chip,
|
||||
.platform_data = &cm_x270_libertas_pdata,
|
||||
},
|
||||
};
|
||||
|
||||
static void __init cmx270_init_spi(void)
|
||||
{
|
||||
pxa2xx_set_spi_info(2, &cm_x270_spi_info);
|
||||
spi_register_board_info(ARRAY_AND_SIZE(cm_x270_spi_devices));
|
||||
}
|
||||
#else
|
||||
static inline void cmx270_init_spi(void) {}
|
||||
#endif
|
||||
|
||||
void __init cmx270_init(void)
|
||||
{
|
||||
pxa2xx_mfp_config(ARRAY_AND_SIZE(cmx270_pin_config));
|
||||
|
@ -343,4 +404,5 @@ void __init cmx270_init(void)
|
|||
cmx270_init_mmc();
|
||||
cmx270_init_ohci();
|
||||
cmx270_init_2700G();
|
||||
cmx270_init_spi();
|
||||
}
|
||||
|
|
|
@ -306,68 +306,21 @@ static void cm_x300_mci_exit(struct device *dev, void *data)
|
|||
}
|
||||
|
||||
static struct pxamci_platform_data cm_x300_mci_platform_data = {
|
||||
.detect_delay = 20,
|
||||
.ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34,
|
||||
.init = cm_x300_mci_init,
|
||||
.exit = cm_x300_mci_exit,
|
||||
.detect_delay = 20,
|
||||
.ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34,
|
||||
.init = cm_x300_mci_init,
|
||||
.exit = cm_x300_mci_exit,
|
||||
.gpio_card_detect = -1,
|
||||
.gpio_card_ro = -1,
|
||||
.gpio_power = -1,
|
||||
};
|
||||
|
||||
static int cm_x300_mci2_ro(struct device *dev)
|
||||
{
|
||||
return gpio_get_value(GPIO85_MMC2_WP);
|
||||
}
|
||||
|
||||
static int cm_x300_mci2_init(struct device *dev,
|
||||
irq_handler_t cm_x300_detect_int,
|
||||
void *data)
|
||||
{
|
||||
int err;
|
||||
|
||||
/*
|
||||
* setup GPIO for CM-X300 MMC controller
|
||||
*/
|
||||
err = gpio_request(GPIO82_MMC2_IRQ, "mmc card detect");
|
||||
if (err)
|
||||
goto err_request_cd;
|
||||
gpio_direction_input(GPIO82_MMC2_IRQ);
|
||||
|
||||
err = gpio_request(GPIO85_MMC2_WP, "mmc write protect");
|
||||
if (err)
|
||||
goto err_request_wp;
|
||||
gpio_direction_input(GPIO85_MMC2_WP);
|
||||
|
||||
err = request_irq(CM_X300_MMC2_IRQ, cm_x300_detect_int,
|
||||
IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING,
|
||||
"MMC card detect", data);
|
||||
if (err) {
|
||||
printk(KERN_ERR "%s: MMC/SD/SDIO: "
|
||||
"can't request card detect IRQ\n", __func__);
|
||||
goto err_request_irq;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
err_request_irq:
|
||||
gpio_free(GPIO85_MMC2_WP);
|
||||
err_request_wp:
|
||||
gpio_free(GPIO82_MMC2_IRQ);
|
||||
err_request_cd:
|
||||
return err;
|
||||
}
|
||||
|
||||
static void cm_x300_mci2_exit(struct device *dev, void *data)
|
||||
{
|
||||
free_irq(CM_X300_MMC2_IRQ, data);
|
||||
gpio_free(GPIO82_MMC2_IRQ);
|
||||
gpio_free(GPIO85_MMC2_WP);
|
||||
}
|
||||
|
||||
static struct pxamci_platform_data cm_x300_mci2_platform_data = {
|
||||
.detect_delay = 20,
|
||||
.ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34,
|
||||
.init = cm_x300_mci2_init,
|
||||
.exit = cm_x300_mci2_exit,
|
||||
.get_ro = cm_x300_mci2_ro,
|
||||
.detect_delay = 20,
|
||||
.ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34,
|
||||
.gpio_card_detect = GPIO82_MMC2_IRQ,
|
||||
.gpio_card_ro = GPIO85_MMC2_WP,
|
||||
.gpio_power = -1,
|
||||
};
|
||||
|
||||
static void __init cm_x300_init_mmc(void)
|
||||
|
|
|
@ -172,6 +172,7 @@ void __init colibri_pxa300_init(void)
|
|||
{
|
||||
colibri_pxa300_init_eth();
|
||||
colibri_pxa300_init_ohci();
|
||||
colibri_pxa3xx_init_nand();
|
||||
colibri_pxa300_init_lcd();
|
||||
colibri_pxa3xx_init_lcd(mfp_to_gpio(GPIO39_GPIO));
|
||||
colibri_pxa310_init_ac97();
|
||||
|
|
|
@ -164,15 +164,48 @@ static inline void __init colibri_pxa320_init_ac97(void)
|
|||
static inline void colibri_pxa320_init_ac97(void) {}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* The following configuration is verified to work with the Toradex Orchid
|
||||
* carrier board
|
||||
*/
|
||||
static mfp_cfg_t colibri_pxa320_uart_pin_config[] __initdata = {
|
||||
/* UART 1 configuration (may be set by bootloader) */
|
||||
GPIO99_UART1_CTS,
|
||||
GPIO104_UART1_RTS,
|
||||
GPIO97_UART1_RXD,
|
||||
GPIO98_UART1_TXD,
|
||||
GPIO101_UART1_DTR,
|
||||
GPIO103_UART1_DSR,
|
||||
GPIO100_UART1_DCD,
|
||||
GPIO102_UART1_RI,
|
||||
|
||||
/* UART 2 configuration */
|
||||
GPIO109_UART2_CTS,
|
||||
GPIO112_UART2_RTS,
|
||||
GPIO110_UART2_RXD,
|
||||
GPIO111_UART2_TXD,
|
||||
|
||||
/* UART 3 configuration */
|
||||
GPIO30_UART3_RXD,
|
||||
GPIO31_UART3_TXD,
|
||||
};
|
||||
|
||||
static void __init colibri_pxa320_init_uart(void)
|
||||
{
|
||||
pxa3xx_mfp_config(ARRAY_AND_SIZE(colibri_pxa320_uart_pin_config));
|
||||
}
|
||||
|
||||
void __init colibri_pxa320_init(void)
|
||||
{
|
||||
colibri_pxa320_init_eth();
|
||||
colibri_pxa320_init_ohci();
|
||||
colibri_pxa3xx_init_nand();
|
||||
colibri_pxa320_init_lcd();
|
||||
colibri_pxa3xx_init_lcd(mfp_to_gpio(GPIO49_GPIO));
|
||||
colibri_pxa320_init_ac97();
|
||||
colibri_pxa3xx_init_mmc(ARRAY_AND_SIZE(colibri_pxa320_mmc_pin_config),
|
||||
mfp_to_gpio(MFP_PIN_GPIO28));
|
||||
colibri_pxa320_init_uart();
|
||||
}
|
||||
|
||||
MACHINE_START(COLIBRI320, "Toradex Colibri PXA320")
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
#include <mach/colibri.h>
|
||||
#include <mach/mmc.h>
|
||||
#include <mach/pxafb.h>
|
||||
#include <mach/pxa3xx_nand.h>
|
||||
|
||||
#include "generic.h"
|
||||
#include "devices.h"
|
||||
|
@ -95,10 +96,13 @@ static void colibri_pxa3xx_mci_exit(struct device *dev, void *data)
|
|||
}
|
||||
|
||||
static struct pxamci_platform_data colibri_pxa3xx_mci_platform_data = {
|
||||
.detect_delay = 20,
|
||||
.ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34,
|
||||
.init = colibri_pxa3xx_mci_init,
|
||||
.exit = colibri_pxa3xx_mci_exit,
|
||||
.detect_delay = 20,
|
||||
.ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34,
|
||||
.init = colibri_pxa3xx_mci_init,
|
||||
.exit = colibri_pxa3xx_mci_exit,
|
||||
.gpio_card_detect = -1,
|
||||
.gpio_card_ro = -1,
|
||||
.gpio_power = -1,
|
||||
};
|
||||
|
||||
void __init colibri_pxa3xx_init_mmc(mfp_cfg_t *pins, int len, int detect_pin)
|
||||
|
@ -154,3 +158,43 @@ void __init colibri_pxa3xx_init_lcd(int bl_pin)
|
|||
}
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_MTD_NAND_PXA3xx) || defined(CONFIG_MTD_NAND_PXA3xx_MODULE)
|
||||
static struct mtd_partition colibri_nand_partitions[] = {
|
||||
{
|
||||
.name = "bootloader",
|
||||
.offset = 0,
|
||||
.size = SZ_512K,
|
||||
.mask_flags = MTD_WRITEABLE, /* force read-only */
|
||||
},
|
||||
{
|
||||
.name = "kernel",
|
||||
.offset = MTDPART_OFS_APPEND,
|
||||
.size = SZ_4M,
|
||||
.mask_flags = MTD_WRITEABLE, /* force read-only */
|
||||
},
|
||||
{
|
||||
.name = "reserved",
|
||||
.offset = MTDPART_OFS_APPEND,
|
||||
.size = SZ_1M,
|
||||
.mask_flags = MTD_WRITEABLE, /* force read-only */
|
||||
},
|
||||
{
|
||||
.name = "fs",
|
||||
.offset = MTDPART_OFS_APPEND,
|
||||
.size = MTDPART_SIZ_FULL,
|
||||
},
|
||||
};
|
||||
|
||||
static struct pxa3xx_nand_platform_data colibri_nand_info = {
|
||||
.enable_arbiter = 1,
|
||||
.keep_config = 1,
|
||||
.parts = colibri_nand_partitions,
|
||||
.nr_parts = ARRAY_SIZE(colibri_nand_partitions),
|
||||
};
|
||||
|
||||
void __init colibri_pxa3xx_init_nand(void)
|
||||
{
|
||||
pxa3xx_set_nand_info(&colibri_nand_info);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
#include <linux/spi/ads7846.h>
|
||||
#include <linux/spi/corgi_lcd.h>
|
||||
#include <linux/mtd/sharpsl.h>
|
||||
#include <linux/input/matrix_keypad.h>
|
||||
#include <video/w100fb.h>
|
||||
|
||||
#include <asm/setup.h>
|
||||
|
@ -104,6 +105,28 @@ static unsigned long corgi_pin_config[] __initdata = {
|
|||
GPIO6_MMC_CLK,
|
||||
GPIO8_MMC_CS0,
|
||||
|
||||
/* GPIO Matrix Keypad */
|
||||
GPIO66_GPIO, /* column 0 */
|
||||
GPIO67_GPIO, /* column 1 */
|
||||
GPIO68_GPIO, /* column 2 */
|
||||
GPIO69_GPIO, /* column 3 */
|
||||
GPIO70_GPIO, /* column 4 */
|
||||
GPIO71_GPIO, /* column 5 */
|
||||
GPIO72_GPIO, /* column 6 */
|
||||
GPIO73_GPIO, /* column 7 */
|
||||
GPIO74_GPIO, /* column 8 */
|
||||
GPIO75_GPIO, /* column 9 */
|
||||
GPIO76_GPIO, /* column 10 */
|
||||
GPIO77_GPIO, /* column 11 */
|
||||
GPIO58_GPIO, /* row 0 */
|
||||
GPIO59_GPIO, /* row 1 */
|
||||
GPIO60_GPIO, /* row 2 */
|
||||
GPIO61_GPIO, /* row 3 */
|
||||
GPIO62_GPIO, /* row 4 */
|
||||
GPIO63_GPIO, /* row 5 */
|
||||
GPIO64_GPIO, /* row 6 */
|
||||
GPIO65_GPIO, /* row 7 */
|
||||
|
||||
/* GPIO */
|
||||
GPIO9_GPIO, /* CORGI_GPIO_nSD_DETECT */
|
||||
GPIO7_GPIO, /* CORGI_GPIO_nSD_WP */
|
||||
|
@ -267,9 +290,115 @@ static struct platform_device corgifb_device = {
|
|||
/*
|
||||
* Corgi Keyboard Device
|
||||
*/
|
||||
#define CORGI_KEY_CALENDER KEY_F1
|
||||
#define CORGI_KEY_ADDRESS KEY_F2
|
||||
#define CORGI_KEY_FN KEY_F3
|
||||
#define CORGI_KEY_CANCEL KEY_F4
|
||||
#define CORGI_KEY_OFF KEY_SUSPEND
|
||||
#define CORGI_KEY_EXOK KEY_F5
|
||||
#define CORGI_KEY_EXCANCEL KEY_F6
|
||||
#define CORGI_KEY_EXJOGDOWN KEY_F7
|
||||
#define CORGI_KEY_EXJOGUP KEY_F8
|
||||
#define CORGI_KEY_JAP1 KEY_LEFTCTRL
|
||||
#define CORGI_KEY_JAP2 KEY_LEFTALT
|
||||
#define CORGI_KEY_MAIL KEY_F10
|
||||
#define CORGI_KEY_OK KEY_F11
|
||||
#define CORGI_KEY_MENU KEY_F12
|
||||
|
||||
static const uint32_t corgikbd_keymap[] = {
|
||||
KEY(0, 1, KEY_1),
|
||||
KEY(0, 2, KEY_3),
|
||||
KEY(0, 3, KEY_5),
|
||||
KEY(0, 4, KEY_6),
|
||||
KEY(0, 5, KEY_7),
|
||||
KEY(0, 6, KEY_9),
|
||||
KEY(0, 7, KEY_0),
|
||||
KEY(0, 8, KEY_BACKSPACE),
|
||||
KEY(1, 1, KEY_2),
|
||||
KEY(1, 2, KEY_4),
|
||||
KEY(1, 3, KEY_R),
|
||||
KEY(1, 4, KEY_Y),
|
||||
KEY(1, 5, KEY_8),
|
||||
KEY(1, 6, KEY_I),
|
||||
KEY(1, 7, KEY_O),
|
||||
KEY(1, 8, KEY_P),
|
||||
KEY(2, 0, KEY_TAB),
|
||||
KEY(2, 1, KEY_Q),
|
||||
KEY(2, 2, KEY_E),
|
||||
KEY(2, 3, KEY_T),
|
||||
KEY(2, 4, KEY_G),
|
||||
KEY(2, 5, KEY_U),
|
||||
KEY(2, 6, KEY_J),
|
||||
KEY(2, 7, KEY_K),
|
||||
KEY(3, 0, CORGI_KEY_CALENDER),
|
||||
KEY(3, 1, KEY_W),
|
||||
KEY(3, 2, KEY_S),
|
||||
KEY(3, 3, KEY_F),
|
||||
KEY(3, 4, KEY_V),
|
||||
KEY(3, 5, KEY_H),
|
||||
KEY(3, 6, KEY_M),
|
||||
KEY(3, 7, KEY_L),
|
||||
KEY(3, 9, KEY_RIGHTSHIFT),
|
||||
KEY(4, 0, CORGI_KEY_ADDRESS),
|
||||
KEY(4, 1, KEY_A),
|
||||
KEY(4, 2, KEY_D),
|
||||
KEY(4, 3, KEY_C),
|
||||
KEY(4, 4, KEY_B),
|
||||
KEY(4, 5, KEY_N),
|
||||
KEY(4, 6, KEY_DOT),
|
||||
KEY(4, 8, KEY_ENTER),
|
||||
KEY(4, 10, KEY_LEFTSHIFT),
|
||||
KEY(5, 0, CORGI_KEY_MAIL),
|
||||
KEY(5, 1, KEY_Z),
|
||||
KEY(5, 2, KEY_X),
|
||||
KEY(5, 3, KEY_MINUS),
|
||||
KEY(5, 4, KEY_SPACE),
|
||||
KEY(5, 5, KEY_COMMA),
|
||||
KEY(5, 7, KEY_UP),
|
||||
KEY(5, 11, CORGI_KEY_FN),
|
||||
KEY(6, 0, KEY_SYSRQ),
|
||||
KEY(6, 1, CORGI_KEY_JAP1),
|
||||
KEY(6, 2, CORGI_KEY_JAP2),
|
||||
KEY(6, 3, CORGI_KEY_CANCEL),
|
||||
KEY(6, 4, CORGI_KEY_OK),
|
||||
KEY(6, 5, CORGI_KEY_MENU),
|
||||
KEY(6, 6, KEY_LEFT),
|
||||
KEY(6, 7, KEY_DOWN),
|
||||
KEY(6, 8, KEY_RIGHT),
|
||||
KEY(7, 0, CORGI_KEY_OFF),
|
||||
KEY(7, 1, CORGI_KEY_EXOK),
|
||||
KEY(7, 2, CORGI_KEY_EXCANCEL),
|
||||
KEY(7, 3, CORGI_KEY_EXJOGDOWN),
|
||||
KEY(7, 4, CORGI_KEY_EXJOGUP),
|
||||
};
|
||||
|
||||
static struct matrix_keymap_data corgikbd_keymap_data = {
|
||||
.keymap = corgikbd_keymap,
|
||||
.keymap_size = ARRAY_SIZE(corgikbd_keymap),
|
||||
};
|
||||
|
||||
static const int corgikbd_row_gpios[] =
|
||||
{ 58, 59, 60, 61, 62, 63, 64, 65 };
|
||||
static const int corgikbd_col_gpios[] =
|
||||
{ 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77 };
|
||||
|
||||
static struct matrix_keypad_platform_data corgikbd_pdata = {
|
||||
.keymap_data = &corgikbd_keymap_data,
|
||||
.row_gpios = corgikbd_row_gpios,
|
||||
.col_gpios = corgikbd_col_gpios,
|
||||
.num_row_gpios = ARRAY_SIZE(corgikbd_row_gpios),
|
||||
.num_col_gpios = ARRAY_SIZE(corgikbd_col_gpios),
|
||||
.col_scan_delay_us = 10,
|
||||
.debounce_ms = 10,
|
||||
.wakeup = 1,
|
||||
};
|
||||
|
||||
static struct platform_device corgikbd_device = {
|
||||
.name = "corgi-keyboard",
|
||||
.name = "matrix-keypad",
|
||||
.id = -1,
|
||||
.dev = {
|
||||
.platform_data = &corgikbd_pdata,
|
||||
},
|
||||
};
|
||||
|
||||
/*
|
||||
|
@ -307,111 +436,20 @@ static struct platform_device corgiled_device = {
|
|||
* The card detect interrupt isn't debounced so we delay it by 250ms
|
||||
* to give the card a chance to fully insert/eject.
|
||||
*/
|
||||
static struct pxamci_platform_data corgi_mci_platform_data;
|
||||
|
||||
static int corgi_mci_init(struct device *dev, irq_handler_t corgi_detect_int, void *data)
|
||||
{
|
||||
int err;
|
||||
|
||||
err = gpio_request(CORGI_GPIO_nSD_DETECT, "nSD_DETECT");
|
||||
if (err)
|
||||
goto err_out;
|
||||
|
||||
err = gpio_request(CORGI_GPIO_nSD_WP, "nSD_WP");
|
||||
if (err)
|
||||
goto err_free_1;
|
||||
|
||||
err = gpio_request(CORGI_GPIO_SD_PWR, "SD_PWR");
|
||||
if (err)
|
||||
goto err_free_2;
|
||||
|
||||
gpio_direction_input(CORGI_GPIO_nSD_DETECT);
|
||||
gpio_direction_input(CORGI_GPIO_nSD_WP);
|
||||
gpio_direction_output(CORGI_GPIO_SD_PWR, 0);
|
||||
|
||||
corgi_mci_platform_data.detect_delay = msecs_to_jiffies(250);
|
||||
|
||||
err = request_irq(CORGI_IRQ_GPIO_nSD_DETECT, corgi_detect_int,
|
||||
IRQF_DISABLED | IRQF_TRIGGER_RISING |
|
||||
IRQF_TRIGGER_FALLING,
|
||||
"MMC card detect", data);
|
||||
if (err) {
|
||||
pr_err("%s: MMC/SD: can't request MMC card detect IRQ\n",
|
||||
__func__);
|
||||
goto err_free_3;
|
||||
}
|
||||
return 0;
|
||||
|
||||
err_free_3:
|
||||
gpio_free(CORGI_GPIO_SD_PWR);
|
||||
err_free_2:
|
||||
gpio_free(CORGI_GPIO_nSD_WP);
|
||||
err_free_1:
|
||||
gpio_free(CORGI_GPIO_nSD_DETECT);
|
||||
err_out:
|
||||
return err;
|
||||
}
|
||||
|
||||
static void corgi_mci_setpower(struct device *dev, unsigned int vdd)
|
||||
{
|
||||
struct pxamci_platform_data* p_d = dev->platform_data;
|
||||
|
||||
gpio_set_value(CORGI_GPIO_SD_PWR, ((1 << vdd) & p_d->ocr_mask));
|
||||
}
|
||||
|
||||
static int corgi_mci_get_ro(struct device *dev)
|
||||
{
|
||||
return gpio_get_value(CORGI_GPIO_nSD_WP);
|
||||
}
|
||||
|
||||
static void corgi_mci_exit(struct device *dev, void *data)
|
||||
{
|
||||
free_irq(CORGI_IRQ_GPIO_nSD_DETECT, data);
|
||||
gpio_free(CORGI_GPIO_SD_PWR);
|
||||
gpio_free(CORGI_GPIO_nSD_WP);
|
||||
gpio_free(CORGI_GPIO_nSD_DETECT);
|
||||
}
|
||||
|
||||
static struct pxamci_platform_data corgi_mci_platform_data = {
|
||||
.ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34,
|
||||
.init = corgi_mci_init,
|
||||
.get_ro = corgi_mci_get_ro,
|
||||
.setpower = corgi_mci_setpower,
|
||||
.exit = corgi_mci_exit,
|
||||
.ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34,
|
||||
.gpio_card_detect = -1,
|
||||
.gpio_card_ro = CORGI_GPIO_nSD_WP,
|
||||
.gpio_power = CORGI_GPIO_SD_PWR,
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
* Irda
|
||||
*/
|
||||
static void corgi_irda_transceiver_mode(struct device *dev, int mode)
|
||||
{
|
||||
gpio_set_value(CORGI_GPIO_IR_ON, mode & IR_OFF);
|
||||
pxa2xx_transceiver_mode(dev, mode);
|
||||
}
|
||||
|
||||
static int corgi_irda_startup(struct device *dev)
|
||||
{
|
||||
int err;
|
||||
|
||||
err = gpio_request(CORGI_GPIO_IR_ON, "IR_ON");
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
gpio_direction_output(CORGI_GPIO_IR_ON, 1);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void corgi_irda_shutdown(struct device *dev)
|
||||
{
|
||||
gpio_free(CORGI_GPIO_IR_ON);
|
||||
}
|
||||
|
||||
static struct pxaficp_platform_data corgi_ficp_platform_data = {
|
||||
.gpio_pwdown = CORGI_GPIO_IR_ON,
|
||||
.transceiver_cap = IR_SIRMODE | IR_OFF,
|
||||
.transceiver_mode = corgi_irda_transceiver_mode,
|
||||
.startup = corgi_irda_startup,
|
||||
.shutdown = corgi_irda_shutdown,
|
||||
};
|
||||
|
||||
|
||||
|
@ -636,6 +674,7 @@ static void __init corgi_init(void)
|
|||
corgi_init_spi();
|
||||
|
||||
pxa_set_udc_info(&udc_info);
|
||||
corgi_mci_platform_data.detect_delay = msecs_to_jiffies(250);
|
||||
pxa_set_mci_info(&corgi_mci_platform_data);
|
||||
pxa_set_ficp_info(&corgi_ficp_platform_data);
|
||||
pxa_set_i2c_info(NULL);
|
||||
|
|
|
@ -130,61 +130,17 @@ static struct pxamci_platform_data csb726_mci_data;
|
|||
static int csb726_mci_init(struct device *dev,
|
||||
irq_handler_t detect, void *data)
|
||||
{
|
||||
int err;
|
||||
|
||||
csb726_mci_data.detect_delay = msecs_to_jiffies(500);
|
||||
|
||||
err = gpio_request(CSB726_GPIO_MMC_DETECT, "MMC detect");
|
||||
if (err)
|
||||
goto err_det_req;
|
||||
|
||||
err = gpio_direction_input(CSB726_GPIO_MMC_DETECT);
|
||||
if (err)
|
||||
goto err_det_dir;
|
||||
|
||||
err = gpio_request(CSB726_GPIO_MMC_RO, "MMC ro");
|
||||
if (err)
|
||||
goto err_ro_req;
|
||||
|
||||
err = gpio_direction_input(CSB726_GPIO_MMC_RO);
|
||||
if (err)
|
||||
goto err_ro_dir;
|
||||
|
||||
err = request_irq(gpio_to_irq(CSB726_GPIO_MMC_DETECT), detect,
|
||||
IRQF_DISABLED, "MMC card detect", data);
|
||||
if (err)
|
||||
goto err_irq;
|
||||
|
||||
return 0;
|
||||
|
||||
err_irq:
|
||||
err_ro_dir:
|
||||
gpio_free(CSB726_GPIO_MMC_RO);
|
||||
err_ro_req:
|
||||
err_det_dir:
|
||||
gpio_free(CSB726_GPIO_MMC_DETECT);
|
||||
err_det_req:
|
||||
return err;
|
||||
}
|
||||
|
||||
static int csb726_mci_get_ro(struct device *dev)
|
||||
{
|
||||
return gpio_get_value(CSB726_GPIO_MMC_RO);
|
||||
}
|
||||
|
||||
static void csb726_mci_exit(struct device *dev, void *data)
|
||||
{
|
||||
free_irq(gpio_to_irq(CSB726_GPIO_MMC_DETECT), data);
|
||||
gpio_free(CSB726_GPIO_MMC_RO);
|
||||
gpio_free(CSB726_GPIO_MMC_DETECT);
|
||||
}
|
||||
|
||||
static struct pxamci_platform_data csb726_mci = {
|
||||
.ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34,
|
||||
.init = csb726_mci_init,
|
||||
.get_ro = csb726_mci_get_ro,
|
||||
.ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34,
|
||||
.init = csb726_mci_init,
|
||||
/* FIXME setpower */
|
||||
.exit = csb726_mci_exit,
|
||||
.gpio_card_detect = CSB726_GPIO_MMC_DETECT,
|
||||
.gpio_card_ro = CSB726_GPIO_MMC_RO,
|
||||
.gpio_power = -1,
|
||||
};
|
||||
|
||||
static struct pxaohci_platform_data csb726_ohci_platform_data = {
|
||||
|
|
|
@ -935,6 +935,33 @@ void __init pxa3xx_set_nand_info(struct pxa3xx_nand_platform_data *info)
|
|||
{
|
||||
pxa_register_device(&pxa3xx_device_nand, info);
|
||||
}
|
||||
|
||||
static struct resource pxa3xx_resources_gcu[] = {
|
||||
{
|
||||
.start = 0x54000000,
|
||||
.end = 0x54000fff,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
{
|
||||
.start = IRQ_GCU,
|
||||
.end = IRQ_GCU,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
};
|
||||
|
||||
static u64 pxa3xx_gcu_dmamask = DMA_BIT_MASK(32);
|
||||
|
||||
struct platform_device pxa3xx_device_gcu = {
|
||||
.name = "pxa3xx-gcu",
|
||||
.id = -1,
|
||||
.num_resources = ARRAY_SIZE(pxa3xx_resources_gcu),
|
||||
.resource = pxa3xx_resources_gcu,
|
||||
.dev = {
|
||||
.dma_mask = &pxa3xx_gcu_dmamask,
|
||||
.coherent_dma_mask = 0xffffffff,
|
||||
},
|
||||
};
|
||||
|
||||
#endif /* CONFIG_PXA3xx */
|
||||
|
||||
/* pxa2xx-spi platform-device ID equals respective SSP platform-device ID + 1.
|
||||
|
|
|
@ -35,4 +35,6 @@ extern struct platform_device pxa27x_device_pwm1;
|
|||
extern struct platform_device pxa3xx_device_nand;
|
||||
extern struct platform_device pxa3xx_device_i2c_power;
|
||||
|
||||
extern struct platform_device pxa3xx_device_gcu;
|
||||
|
||||
void __init pxa_register_device(struct platform_device *dev, void *data);
|
||||
|
|
|
@ -199,7 +199,6 @@ static void __init e740_init(void)
|
|||
platform_add_devices(devices, ARRAY_SIZE(devices));
|
||||
pxa_set_udc_info(&e7xx_udc_mach_info);
|
||||
pxa_set_ac97_info(NULL);
|
||||
e7xx_irda_init();
|
||||
pxa_set_ficp_info(&e7xx_ficp_platform_data);
|
||||
}
|
||||
|
||||
|
|
|
@ -200,7 +200,6 @@ static void __init e750_init(void)
|
|||
platform_add_devices(devices, ARRAY_SIZE(devices));
|
||||
pxa_set_udc_info(&e7xx_udc_mach_info);
|
||||
pxa_set_ac97_info(NULL);
|
||||
e7xx_irda_init();
|
||||
pxa_set_ficp_info(&e7xx_ficp_platform_data);
|
||||
}
|
||||
|
||||
|
|
|
@ -646,13 +646,16 @@ static int em_x270_mci_get_ro(struct device *dev)
|
|||
}
|
||||
|
||||
static struct pxamci_platform_data em_x270_mci_platform_data = {
|
||||
.ocr_mask = MMC_VDD_20_21|MMC_VDD_21_22|MMC_VDD_22_23|
|
||||
MMC_VDD_24_25|MMC_VDD_25_26|MMC_VDD_26_27|
|
||||
MMC_VDD_27_28|MMC_VDD_28_29|MMC_VDD_29_30|
|
||||
MMC_VDD_30_31|MMC_VDD_31_32,
|
||||
.init = em_x270_mci_init,
|
||||
.setpower = em_x270_mci_setpower,
|
||||
.exit = em_x270_mci_exit,
|
||||
.ocr_mask = MMC_VDD_20_21|MMC_VDD_21_22|MMC_VDD_22_23|
|
||||
MMC_VDD_24_25|MMC_VDD_25_26|MMC_VDD_26_27|
|
||||
MMC_VDD_27_28|MMC_VDD_28_29|MMC_VDD_29_30|
|
||||
MMC_VDD_30_31|MMC_VDD_31_32,
|
||||
.init = em_x270_mci_init,
|
||||
.setpower = em_x270_mci_setpower,
|
||||
.exit = em_x270_mci_exit,
|
||||
.gpio_card_detect = -1,
|
||||
.gpio_card_ro = -1,
|
||||
.gpio_power = -1,
|
||||
};
|
||||
|
||||
static void __init em_x270_init_mmc(void)
|
||||
|
@ -1022,22 +1025,32 @@ static int em_x270_sensor_power(struct device *dev, int on)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static struct soc_camera_link iclink = {
|
||||
.bus_id = 0,
|
||||
.power = em_x270_sensor_power,
|
||||
};
|
||||
|
||||
static struct i2c_board_info em_x270_i2c_cam_info[] = {
|
||||
{
|
||||
I2C_BOARD_INFO("mt9m111", 0x48),
|
||||
},
|
||||
};
|
||||
|
||||
static struct soc_camera_link iclink = {
|
||||
.bus_id = 0,
|
||||
.power = em_x270_sensor_power,
|
||||
.board_info = &em_x270_i2c_cam_info[0],
|
||||
.i2c_adapter_id = 0,
|
||||
.module_name = "mt9m111",
|
||||
};
|
||||
|
||||
static struct platform_device em_x270_camera = {
|
||||
.name = "soc-camera-pdrv",
|
||||
.id = -1,
|
||||
.dev = {
|
||||
.platform_data = &iclink,
|
||||
},
|
||||
};
|
||||
|
||||
static void __init em_x270_init_camera(void)
|
||||
{
|
||||
i2c_register_board_info(0, ARRAY_AND_SIZE(em_x270_i2c_cam_info));
|
||||
pxa_set_camera_info(&em_x270_camera_platform_data);
|
||||
platform_device_register(&em_x270_camera);
|
||||
}
|
||||
#else
|
||||
static inline void em_x270_init_camera(void) {}
|
||||
|
@ -1103,6 +1116,7 @@ REGULATOR_CONSUMER(ldo5, NULL, "vcc cam");
|
|||
REGULATOR_CONSUMER(ldo10, &pxa_device_mci.dev, "vcc sdio");
|
||||
REGULATOR_CONSUMER(ldo12, NULL, "vcc usb");
|
||||
REGULATOR_CONSUMER(ldo19, &em_x270_gprs_userspace_consumer.dev, "vcc gprs");
|
||||
REGULATOR_CONSUMER(buck2, NULL, "vcc_core");
|
||||
|
||||
#define REGULATOR_INIT(_ldo, _min_uV, _max_uV, _ops_mask) \
|
||||
static struct regulator_init_data _ldo##_data = { \
|
||||
|
@ -1125,6 +1139,7 @@ REGULATOR_INIT(ldo10, 2000000, 3200000,
|
|||
REGULATOR_CHANGE_STATUS | REGULATOR_CHANGE_VOLTAGE);
|
||||
REGULATOR_INIT(ldo12, 3000000, 3000000, REGULATOR_CHANGE_STATUS);
|
||||
REGULATOR_INIT(ldo19, 3200000, 3200000, REGULATOR_CHANGE_STATUS);
|
||||
REGULATOR_INIT(buck2, 1000000, 1650000, REGULATOR_CHANGE_VOLTAGE);
|
||||
|
||||
struct led_info em_x270_led_info = {
|
||||
.name = "em-x270:orange",
|
||||
|
@ -1194,6 +1209,8 @@ struct da903x_subdev_info em_x270_da9030_subdevs[] = {
|
|||
DA9030_LDO(12),
|
||||
DA9030_LDO(19),
|
||||
|
||||
DA9030_SUBDEV(regulator, BUCK2, &buck2_data),
|
||||
|
||||
DA9030_SUBDEV(led, LED_PC, &em_x270_led_info),
|
||||
DA9030_SUBDEV(backlight, WLED, &em_x270_led_info),
|
||||
DA9030_SUBDEV(battery, BAT, &em_x270_batterty_info),
|
||||
|
@ -1245,7 +1262,6 @@ static void __init em_x270_init_i2c(void)
|
|||
|
||||
static void __init em_x270_module_init(void)
|
||||
{
|
||||
pr_info("%s\n", __func__);
|
||||
pxa2xx_mfp_config(ARRAY_AND_SIZE(em_x270_pin_config));
|
||||
|
||||
mmc_cd = GPIO13_MMC_CD;
|
||||
|
@ -1257,7 +1273,6 @@ static void __init em_x270_module_init(void)
|
|||
|
||||
static void __init em_x270_exeda_init(void)
|
||||
{
|
||||
pr_info("%s\n", __func__);
|
||||
pxa2xx_mfp_config(ARRAY_AND_SIZE(exeda_pin_config));
|
||||
|
||||
mmc_cd = GPIO114_MMC_CD;
|
||||
|
|
|
@ -47,44 +47,9 @@ struct pxa2xx_udc_mach_info e7xx_udc_mach_info = {
|
|||
.gpio_pullup_inverted = 1
|
||||
};
|
||||
|
||||
static void e7xx_irda_transceiver_mode(struct device *dev, int mode)
|
||||
{
|
||||
if (mode & IR_OFF) {
|
||||
gpio_set_value(GPIO_E7XX_IR_OFF, 1);
|
||||
pxa2xx_transceiver_mode(dev, mode);
|
||||
} else {
|
||||
pxa2xx_transceiver_mode(dev, mode);
|
||||
gpio_set_value(GPIO_E7XX_IR_OFF, 0);
|
||||
}
|
||||
}
|
||||
|
||||
int e7xx_irda_init(void)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = gpio_request(GPIO_E7XX_IR_OFF, "IrDA power");
|
||||
if (ret)
|
||||
goto out;
|
||||
|
||||
ret = gpio_direction_output(GPIO_E7XX_IR_OFF, 0);
|
||||
if (ret)
|
||||
goto out;
|
||||
|
||||
e7xx_irda_transceiver_mode(NULL, IR_SIRMODE | IR_OFF);
|
||||
out:
|
||||
return ret;
|
||||
}
|
||||
|
||||
static void e7xx_irda_shutdown(struct device *dev)
|
||||
{
|
||||
e7xx_irda_transceiver_mode(dev, IR_SIRMODE | IR_OFF);
|
||||
gpio_free(GPIO_E7XX_IR_OFF);
|
||||
}
|
||||
|
||||
struct pxaficp_platform_data e7xx_ficp_platform_data = {
|
||||
.transceiver_cap = IR_SIRMODE | IR_OFF,
|
||||
.transceiver_mode = e7xx_irda_transceiver_mode,
|
||||
.shutdown = e7xx_irda_shutdown,
|
||||
.gpio_pwdown = GPIO_E7XX_IR_OFF,
|
||||
.transceiver_cap = IR_SIRMODE | IR_OFF,
|
||||
};
|
||||
|
||||
int eseries_tmio_enable(struct platform_device *dev)
|
||||
|
|
|
@ -88,7 +88,10 @@ static struct platform_device *devices[] __initdata = {
|
|||
|
||||
#ifdef CONFIG_MMC_PXA
|
||||
static struct pxamci_platform_data gumstix_mci_platform_data = {
|
||||
.ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34,
|
||||
.ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34,
|
||||
.gpio_card_detect = -1,
|
||||
.gpio_card_ro = -1,
|
||||
.gpio_power = -1,
|
||||
};
|
||||
|
||||
static void __init gumstix_mmc_init(void)
|
||||
|
|
|
@ -45,6 +45,7 @@
|
|||
#include <mach/irda.h>
|
||||
#include <mach/pxa2xx_spi.h>
|
||||
|
||||
#include <video/platform_lcd.h>
|
||||
#include <video/w100fb.h>
|
||||
|
||||
#include "devices.h"
|
||||
|
@ -174,14 +175,9 @@ static int hx4700_gpio_request(struct gpio_ress *gpios, int size)
|
|||
* IRDA
|
||||
*/
|
||||
|
||||
static void irda_transceiver_mode(struct device *dev, int mode)
|
||||
{
|
||||
gpio_set_value(GPIO105_HX4700_nIR_ON, mode & IR_OFF);
|
||||
}
|
||||
|
||||
static struct pxaficp_platform_data ficp_info = {
|
||||
.transceiver_cap = IR_SIRMODE | IR_OFF,
|
||||
.transceiver_mode = irda_transceiver_mode,
|
||||
.gpio_pwdown = GPIO105_HX4700_nIR_ON,
|
||||
.transceiver_cap = IR_SIRMODE | IR_OFF,
|
||||
};
|
||||
|
||||
/*
|
||||
|
@ -368,8 +364,6 @@ static struct platform_device egpio = {
|
|||
* LCD - Sony display connected to ATI Imageon w3220
|
||||
*/
|
||||
|
||||
static int lcd_power;
|
||||
|
||||
static void sony_lcd_init(void)
|
||||
{
|
||||
gpio_set_value(GPIO84_HX4700_LCD_SQN, 1);
|
||||
|
@ -410,35 +404,6 @@ static void sony_lcd_off(void)
|
|||
gpio_set_value(GPIO110_HX4700_LCD_LVDD_3V3_ON, 0);
|
||||
}
|
||||
|
||||
static int hx4700_lcd_set_power(struct lcd_device *ldev, int level)
|
||||
{
|
||||
switch (level) {
|
||||
case FB_BLANK_UNBLANK:
|
||||
sony_lcd_init();
|
||||
break;
|
||||
case FB_BLANK_NORMAL:
|
||||
case FB_BLANK_VSYNC_SUSPEND:
|
||||
case FB_BLANK_HSYNC_SUSPEND:
|
||||
case FB_BLANK_POWERDOWN:
|
||||
sony_lcd_off();
|
||||
break;
|
||||
}
|
||||
lcd_power = level;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int hx4700_lcd_get_power(struct lcd_device *lm)
|
||||
{
|
||||
return lcd_power;
|
||||
}
|
||||
|
||||
static struct lcd_ops hx4700_lcd_ops = {
|
||||
.get_power = hx4700_lcd_get_power,
|
||||
.set_power = hx4700_lcd_set_power,
|
||||
};
|
||||
|
||||
static struct lcd_device *hx4700_lcd_device;
|
||||
|
||||
#ifdef CONFIG_PM
|
||||
static void w3220_lcd_suspend(struct w100fb_par *wfb)
|
||||
{
|
||||
|
@ -573,6 +538,27 @@ static struct platform_device w3220 = {
|
|||
.resource = w3220_resources,
|
||||
};
|
||||
|
||||
static void hx4700_lcd_set_power(struct plat_lcd_data *pd, unsigned int power)
|
||||
{
|
||||
if (power)
|
||||
sony_lcd_init();
|
||||
else
|
||||
sony_lcd_off();
|
||||
}
|
||||
|
||||
static struct plat_lcd_data hx4700_lcd_data = {
|
||||
.set_power = hx4700_lcd_set_power,
|
||||
};
|
||||
|
||||
static struct platform_device hx4700_lcd = {
|
||||
.name = "platform-lcd",
|
||||
.id = -1,
|
||||
.dev = {
|
||||
.platform_data = &hx4700_lcd_data,
|
||||
.parent = &w3220.dev,
|
||||
},
|
||||
};
|
||||
|
||||
/*
|
||||
* Backlight
|
||||
*/
|
||||
|
@ -872,9 +858,6 @@ static void __init hx4700_init(void)
|
|||
pxa2xx_set_spi_info(2, &pxa_ssp2_master_info);
|
||||
spi_register_board_info(ARRAY_AND_SIZE(tsc2046_board_info));
|
||||
|
||||
hx4700_lcd_device = lcd_device_register("w100fb", NULL,
|
||||
(void *)&w3220_info, &hx4700_lcd_ops);
|
||||
|
||||
gpio_set_value(GPIO71_HX4700_ASIC3_nRESET, 0);
|
||||
mdelay(10);
|
||||
gpio_set_value(GPIO71_HX4700_ASIC3_nRESET, 1);
|
||||
|
|
|
@ -168,7 +168,10 @@ static struct pxafb_mach_info sharp_lm8v31 = {
|
|||
};
|
||||
|
||||
static struct pxamci_platform_data idp_mci_platform_data = {
|
||||
.ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34,
|
||||
.ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34,
|
||||
.gpio_card_detect = -1,
|
||||
.gpio_card_ro = -1,
|
||||
.gpio_power = -1,
|
||||
};
|
||||
|
||||
static void __init idp_init(void)
|
||||
|
|
|
@ -389,6 +389,9 @@ static int imote2_mci_get_ro(struct device *dev)
|
|||
static struct pxamci_platform_data imote2_mci_platform_data = {
|
||||
.ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34, /* default anyway */
|
||||
.get_ro = imote2_mci_get_ro,
|
||||
.gpio_card_detect = -1,
|
||||
.gpio_card_ro = -1,
|
||||
.gpio_power = -1,
|
||||
};
|
||||
|
||||
static struct mtd_partition imote2flash_partitions[] = {
|
||||
|
|
134
arch/arm/mach-pxa/include/mach/balloon3.h
Normal file
134
arch/arm/mach-pxa/include/mach/balloon3.h
Normal file
|
@ -0,0 +1,134 @@
|
|||
/*
|
||||
* linux/include/asm-arm/arch-pxa/balloon3.h
|
||||
*
|
||||
* Authors: Nick Bane and Wookey
|
||||
* Created: Oct, 2005
|
||||
* Copyright: Toby Churchill Ltd
|
||||
* Cribbed from mainstone.c, by Nicholas Pitre
|
||||
*
|
||||
* 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_BALLOON3_H
|
||||
#define ASM_ARCH_BALLOON3_H
|
||||
|
||||
enum balloon3_features {
|
||||
BALLOON3_FEATURE_OHCI,
|
||||
BALLOON3_FEATURE_MMC,
|
||||
BALLOON3_FEATURE_CF,
|
||||
BALLOON3_FEATURE_AUDIO,
|
||||
BALLOON3_FEATURE_TOPPOLY,
|
||||
};
|
||||
|
||||
#define BALLOON3_FPGA_PHYS PXA_CS4_PHYS
|
||||
#define BALLOON3_FPGA_VIRT (0xf1000000) /* as per balloon2 */
|
||||
#define BALLOON3_FPGA_LENGTH 0x01000000
|
||||
|
||||
/* FPGA/CPLD registers */
|
||||
#define BALLOON3_PCMCIA0_REG (BALLOON3_FPGA_VIRT + 0x00e00008)
|
||||
/* fixme - same for now */
|
||||
#define BALLOON3_PCMCIA1_REG (BALLOON3_FPGA_VIRT + 0x00e00008)
|
||||
#define BALLOON3_NANDIO_IO_REG (BALLOON3_FPGA_VIRT + 0x00e00000)
|
||||
/* fpga/cpld interrupt control register */
|
||||
#define BALLOON3_INT_CONTROL_REG (BALLOON3_FPGA_VIRT + 0x00e0000C)
|
||||
#define BALLOON3_NANDIO_CTL2_REG (BALLOON3_FPGA_VIRT + 0x00e00010)
|
||||
#define BALLOON3_NANDIO_CTL_REG (BALLOON3_FPGA_VIRT + 0x00e00014)
|
||||
#define BALLOON3_VERSION_REG (BALLOON3_FPGA_VIRT + 0x00e0001c)
|
||||
|
||||
#define BALLOON3_SAMOSA_ADDR_REG (BALLOON3_FPGA_VIRT + 0x00c00000)
|
||||
#define BALLOON3_SAMOSA_DATA_REG (BALLOON3_FPGA_VIRT + 0x00c00004)
|
||||
#define BALLOON3_SAMOSA_STATUS_REG (BALLOON3_FPGA_VIRT + 0x00c0001c)
|
||||
|
||||
/* GPIOs for irqs */
|
||||
#define BALLOON3_GPIO_AUX_NIRQ (94)
|
||||
#define BALLOON3_GPIO_CODEC_IRQ (95)
|
||||
|
||||
/* Timer and Idle LED locations */
|
||||
#define BALLOON3_GPIO_LED_NAND (9)
|
||||
#define BALLOON3_GPIO_LED_IDLE (10)
|
||||
|
||||
/* backlight control */
|
||||
#define BALLOON3_GPIO_RUN_BACKLIGHT (99)
|
||||
|
||||
#define BALLOON3_GPIO_S0_CD (105)
|
||||
|
||||
/* FPGA Interrupt Mask/Acknowledge Register */
|
||||
#define BALLOON3_INT_S0_IRQ (1 << 0) /* PCMCIA 0 IRQ */
|
||||
#define BALLOON3_INT_S0_STSCHG (1 << 1) /* PCMCIA 0 status changed */
|
||||
|
||||
/* CF Status Register */
|
||||
#define BALLOON3_PCMCIA_nIRQ (1 << 0) /* IRQ / ready signal */
|
||||
#define BALLOON3_PCMCIA_nSTSCHG_BVD1 (1 << 1)
|
||||
/* VDD sense / card status changed */
|
||||
|
||||
/* CF control register (write) */
|
||||
#define BALLOON3_PCMCIA_RESET (1 << 0) /* Card reset signal */
|
||||
#define BALLOON3_PCMCIA_ENABLE (1 << 1)
|
||||
#define BALLOON3_PCMCIA_ADD_ENABLE (1 << 2)
|
||||
|
||||
/* CPLD (and FPGA) interface definitions */
|
||||
#define CPLD_LCD0_DATA_SET 0x00
|
||||
#define CPLD_LCD0_DATA_CLR 0x10
|
||||
#define CPLD_LCD0_COMMAND_SET 0x01
|
||||
#define CPLD_LCD0_COMMAND_CLR 0x11
|
||||
#define CPLD_LCD1_DATA_SET 0x02
|
||||
#define CPLD_LCD1_DATA_CLR 0x12
|
||||
#define CPLD_LCD1_COMMAND_SET 0x03
|
||||
#define CPLD_LCD1_COMMAND_CLR 0x13
|
||||
|
||||
#define CPLD_MISC_SET 0x07
|
||||
#define CPLD_MISC_CLR 0x17
|
||||
#define CPLD_MISC_LOON_NRESET_BIT 0
|
||||
#define CPLD_MISC_LOON_UNSUSP_BIT 1
|
||||
#define CPLD_MISC_RUN_5V_BIT 2
|
||||
#define CPLD_MISC_CHG_D0_BIT 3
|
||||
#define CPLD_MISC_CHG_D1_BIT 4
|
||||
#define CPLD_MISC_DAC_NCS_BIT 5
|
||||
|
||||
#define CPLD_LCD_SET 0x08
|
||||
#define CPLD_LCD_CLR 0x18
|
||||
#define CPLD_LCD_BACKLIGHT_EN_0_BIT 0
|
||||
#define CPLD_LCD_BACKLIGHT_EN_1_BIT 1
|
||||
#define CPLD_LCD_LED_RED_BIT 4
|
||||
#define CPLD_LCD_LED_GREEN_BIT 5
|
||||
#define CPLD_LCD_NRESET_BIT 7
|
||||
|
||||
#define CPLD_LCD_RO_SET 0x09
|
||||
#define CPLD_LCD_RO_CLR 0x19
|
||||
#define CPLD_LCD_RO_LCD0_nWAIT_BIT 0
|
||||
#define CPLD_LCD_RO_LCD1_nWAIT_BIT 1
|
||||
|
||||
#define CPLD_SERIAL_SET 0x0a
|
||||
#define CPLD_SERIAL_CLR 0x1a
|
||||
#define CPLD_SERIAL_GSM_RI_BIT 0
|
||||
#define CPLD_SERIAL_GSM_CTS_BIT 1
|
||||
#define CPLD_SERIAL_GSM_DTR_BIT 2
|
||||
#define CPLD_SERIAL_LPR_CTS_BIT 3
|
||||
#define CPLD_SERIAL_TC232_CTS_BIT 4
|
||||
#define CPLD_SERIAL_TC232_DSR_BIT 5
|
||||
|
||||
#define CPLD_SROUTING_SET 0x0b
|
||||
#define CPLD_SROUTING_CLR 0x1b
|
||||
#define CPLD_SROUTING_MSP430_LPR 0
|
||||
#define CPLD_SROUTING_MSP430_TC232 1
|
||||
#define CPLD_SROUTING_MSP430_GSM 2
|
||||
#define CPLD_SROUTING_LOON_LPR (0 << 4)
|
||||
#define CPLD_SROUTING_LOON_TC232 (1 << 4)
|
||||
#define CPLD_SROUTING_LOON_GSM (2 << 4)
|
||||
|
||||
#define CPLD_AROUTING_SET 0x0c
|
||||
#define CPLD_AROUTING_CLR 0x1c
|
||||
#define CPLD_AROUTING_MIC2PHONE_BIT 0
|
||||
#define CPLD_AROUTING_PHONE2INT_BIT 1
|
||||
#define CPLD_AROUTING_PHONE2EXT_BIT 2
|
||||
#define CPLD_AROUTING_LOONL2INT_BIT 3
|
||||
#define CPLD_AROUTING_LOONL2EXT_BIT 4
|
||||
#define CPLD_AROUTING_LOONR2PHONE_BIT 5
|
||||
#define CPLD_AROUTING_LOONR2INT_BIT 6
|
||||
#define CPLD_AROUTING_LOONR2EXT_BIT 7
|
||||
|
||||
extern int balloon3_has(enum balloon3_features feature);
|
||||
|
||||
#endif
|
|
@ -23,6 +23,12 @@ static inline void colibri_pxa3xx_init_lcd(int bl_pin) {}
|
|||
extern void colibri_pxa3xx_init_eth(struct ax_plat_data *plat_data);
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_MTD_NAND_PXA3xx) || defined(CONFIG_MTD_NAND_PXA3xx_MODULE)
|
||||
extern void colibri_pxa3xx_init_nand(void);
|
||||
#else
|
||||
static inline void colibri_pxa3xx_init_nand(void) {}
|
||||
#endif
|
||||
|
||||
/* physical memory regions */
|
||||
#define COLIBRI_SDRAM_BASE 0xa0000000 /* SDRAM region */
|
||||
|
||||
|
|
|
@ -24,34 +24,27 @@
|
|||
mov \tmp, \tmp, lsr #13
|
||||
and \tmp, \tmp, #0x7 @ Core G
|
||||
cmp \tmp, #1
|
||||
bhi 1004f
|
||||
bhi 1002f
|
||||
|
||||
@ Core Generation 1 (PXA25x)
|
||||
mov \base, #io_p2v(0x40000000) @ IIR Ctl = 0x40d00000
|
||||
add \base, \base, #0x00d00000
|
||||
ldr \irqstat, [\base, #0] @ ICIP
|
||||
ldr \irqnr, [\base, #4] @ ICMR
|
||||
b 1002f
|
||||
|
||||
1004:
|
||||
mrc p6, 0, \irqstat, c6, c0, 0 @ ICIP2
|
||||
mrc p6, 0, \irqnr, c7, c0, 0 @ ICMR2
|
||||
ands \irqnr, \irqstat, \irqnr
|
||||
beq 1003f
|
||||
rsb \irqstat, \irqnr, #0
|
||||
and \irqstat, \irqstat, \irqnr
|
||||
clz \irqnr, \irqstat
|
||||
rsb \irqnr, \irqnr, #31
|
||||
add \irqnr, \irqnr, #(32 + PXA_IRQ(0))
|
||||
b 1001f
|
||||
1003:
|
||||
mrc p6, 0, \irqstat, c0, c0, 0 @ ICIP
|
||||
mrc p6, 0, \irqnr, c1, c0, 0 @ ICMR
|
||||
1002:
|
||||
ands \irqnr, \irqstat, \irqnr
|
||||
beq 1001f
|
||||
rsb \irqstat, \irqnr, #0
|
||||
and \irqstat, \irqstat, \irqnr
|
||||
clz \irqnr, \irqstat
|
||||
rsb \irqnr, \irqnr, #(31 + PXA_IRQ(0))
|
||||
b 1001f
|
||||
1002:
|
||||
@ Core Generation 2 (PXA27x) or Core Generation 3 (PXA3xx)
|
||||
mrc p6, 0, \irqstat, c5, c0, 0 @ ICHP
|
||||
tst \irqstat, #0x80000000
|
||||
beq 1001f
|
||||
bic \irqstat, \irqstat, #0x80000000
|
||||
mov \irqnr, \irqstat, lsr #16
|
||||
1001:
|
||||
.endm
|
||||
|
|
|
@ -197,6 +197,16 @@
|
|||
#define __cpu_is_pxa935(id) (0)
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_CPU_PXA950
|
||||
#define __cpu_is_pxa950(id) \
|
||||
({ \
|
||||
unsigned int _id = (id) >> 4 & 0xfff; \
|
||||
id == 0x697; \
|
||||
})
|
||||
#else
|
||||
#define __cpu_is_pxa950(id) (0)
|
||||
#endif
|
||||
|
||||
#define cpu_is_pxa210() \
|
||||
({ \
|
||||
__cpu_is_pxa210(read_cpuid_id()); \
|
||||
|
@ -249,6 +259,13 @@
|
|||
__cpu_is_pxa935(id); \
|
||||
})
|
||||
|
||||
#define cpu_is_pxa950() \
|
||||
({ \
|
||||
unsigned int id = read_cpuid(CPUID_ID); \
|
||||
__cpu_is_pxa950(id); \
|
||||
})
|
||||
|
||||
|
||||
/*
|
||||
* CPUID Core Generation Bit
|
||||
* <= 0x2 for pxa21x/pxa25x/pxa26x/pxa27x
|
||||
|
|
|
@ -12,6 +12,8 @@ struct pxaficp_platform_data {
|
|||
void (*transceiver_mode)(struct device *dev, int mode);
|
||||
int (*startup)(struct device *dev);
|
||||
void (*shutdown)(struct device *dev);
|
||||
int gpio_pwdown; /* powerdown GPIO for the IrDA chip */
|
||||
bool gpio_pwdown_inverted; /* gpio_pwdown is inverted */
|
||||
};
|
||||
|
||||
extern void pxa_set_ficp_info(struct pxaficp_platform_data *info);
|
||||
|
|
|
@ -68,9 +68,10 @@
|
|||
#ifdef CONFIG_PXA3xx
|
||||
#define IRQ_SSP4 PXA_IRQ(13) /* SSP4 service request */
|
||||
#define IRQ_CIR PXA_IRQ(34) /* Consumer IR */
|
||||
#define IRQ_COMM_WDT PXA_IRQ(35) /* Comm WDT interrupt */
|
||||
#define IRQ_TSI PXA_IRQ(36) /* Touch Screen Interface (PXA320) */
|
||||
#define IRQ_USIM2 PXA_IRQ(38) /* USIM2 Controller */
|
||||
#define IRQ_GRPHICS PXA_IRQ(39) /* Graphics Controller */
|
||||
#define IRQ_GCU PXA_IRQ(39) /* Graphics Controller */
|
||||
#define IRQ_MMC2 PXA_IRQ(41) /* MMC2 Controller */
|
||||
#define IRQ_1WIRE PXA_IRQ(44) /* 1-Wire Controller */
|
||||
#define IRQ_NAND PXA_IRQ(45) /* NAND Controller */
|
||||
|
@ -81,8 +82,31 @@
|
|||
#define IRQ_MMC3 PXA_IRQ(55) /* MMC3 Controller (PXA310) */
|
||||
#endif
|
||||
|
||||
#define PXA_GPIO_IRQ_BASE PXA_IRQ(64)
|
||||
#define PXA_GPIO_IRQ_NUM (128)
|
||||
#ifdef CONFIG_CPU_PXA935
|
||||
#define IRQ_U2O PXA_IRQ(64) /* USB OTG 2.0 Controller (PXA935) */
|
||||
#define IRQ_U2H PXA_IRQ(65) /* USB Host 2.0 Controller (PXA935) */
|
||||
|
||||
#define IRQ_MMC3_PXA935 PXA_IRQ(72) /* MMC3 Controller (PXA935) */
|
||||
#define IRQ_MMC4_PXA935 PXA_IRQ(73) /* MMC4 Controller (PXA935) */
|
||||
#define IRQ_MMC5_PXA935 PXA_IRQ(74) /* MMC5 Controller (PXA935) */
|
||||
|
||||
#define IRQ_U2P PXA_IRQ(93) /* USB PHY D+/D- Lines (PXA935) */
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_CPU_PXA930
|
||||
#define IRQ_ENHROT PXA_IRQ(37) /* Enhanced Rotary (PXA930) */
|
||||
#define IRQ_ACIPC0 PXA_IRQ(5)
|
||||
#define IRQ_ACIPC1 PXA_IRQ(40)
|
||||
#define IRQ_ACIPC2 PXA_IRQ(19)
|
||||
#define IRQ_TRKBALL PXA_IRQ(43) /* Track Ball */
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_CPU_PXA950
|
||||
#define IRQ_GC500 PXA_IRQ(70) /* Graphics Controller (PXA950) */
|
||||
#endif
|
||||
|
||||
#define PXA_GPIO_IRQ_BASE PXA_IRQ(96)
|
||||
#define PXA_GPIO_IRQ_NUM (192)
|
||||
|
||||
#define GPIO_2_x_TO_IRQ(x) (PXA_GPIO_IRQ_BASE + (x))
|
||||
#define IRQ_GPIO(x) (((x) < 2) ? (IRQ_GPIO0 + (x)) : GPIO_2_x_TO_IRQ(x))
|
||||
|
@ -105,6 +129,8 @@
|
|||
#define IRQ_BOARD_END (IRQ_BOARD_START + 70)
|
||||
#elif defined(CONFIG_MACH_ZYLONITE)
|
||||
#define IRQ_BOARD_END (IRQ_BOARD_START + 32)
|
||||
#elif defined(CONFIG_PXA_EZX)
|
||||
#define IRQ_BOARD_END (IRQ_BOARD_START + 23)
|
||||
#else
|
||||
#define IRQ_BOARD_END (IRQ_BOARD_START + 16)
|
||||
#endif
|
||||
|
@ -237,6 +263,16 @@
|
|||
#define MAINSTONE_S1_STSCHG_IRQ MAINSTONE_IRQ(14)
|
||||
#define MAINSTONE_S1_IRQ MAINSTONE_IRQ(15)
|
||||
|
||||
/* Balloon3 Interrupts */
|
||||
#define BALLOON3_IRQ(x) (IRQ_BOARD_START + (x))
|
||||
|
||||
#define BALLOON3_BP_CF_NRDY_IRQ BALLOON3_IRQ(0)
|
||||
#define BALLOON3_BP_NSTSCHG_IRQ BALLOON3_IRQ(1)
|
||||
|
||||
#define BALLOON3_AUX_NIRQ IRQ_GPIO(BALLOON3_GPIO_AUX_NIRQ)
|
||||
#define BALLOON3_CODEC_IRQ IRQ_GPIO(BALLOON3_GPIO_CODEC_IRQ)
|
||||
#define BALLOON3_S0_CD_IRQ IRQ_GPIO(BALLOON3_GPIO_S0_CD)
|
||||
|
||||
/* LoCoMo Interrupts (CONFIG_SHARP_LOCOMO) */
|
||||
#define IRQ_LOCOMO_KEY_BASE (IRQ_BOARD_START + 0)
|
||||
#define IRQ_LOCOMO_GPIO_BASE (IRQ_BOARD_START + 1)
|
||||
|
|
|
@ -16,305 +16,6 @@
|
|||
#ifndef __ASM_ARCH_MFP_H
|
||||
#define __ASM_ARCH_MFP_H
|
||||
|
||||
#define mfp_to_gpio(m) ((m) % 128)
|
||||
|
||||
/* list of all the configurable MFP pins */
|
||||
enum {
|
||||
MFP_PIN_INVALID = -1,
|
||||
|
||||
MFP_PIN_GPIO0 = 0,
|
||||
MFP_PIN_GPIO1,
|
||||
MFP_PIN_GPIO2,
|
||||
MFP_PIN_GPIO3,
|
||||
MFP_PIN_GPIO4,
|
||||
MFP_PIN_GPIO5,
|
||||
MFP_PIN_GPIO6,
|
||||
MFP_PIN_GPIO7,
|
||||
MFP_PIN_GPIO8,
|
||||
MFP_PIN_GPIO9,
|
||||
MFP_PIN_GPIO10,
|
||||
MFP_PIN_GPIO11,
|
||||
MFP_PIN_GPIO12,
|
||||
MFP_PIN_GPIO13,
|
||||
MFP_PIN_GPIO14,
|
||||
MFP_PIN_GPIO15,
|
||||
MFP_PIN_GPIO16,
|
||||
MFP_PIN_GPIO17,
|
||||
MFP_PIN_GPIO18,
|
||||
MFP_PIN_GPIO19,
|
||||
MFP_PIN_GPIO20,
|
||||
MFP_PIN_GPIO21,
|
||||
MFP_PIN_GPIO22,
|
||||
MFP_PIN_GPIO23,
|
||||
MFP_PIN_GPIO24,
|
||||
MFP_PIN_GPIO25,
|
||||
MFP_PIN_GPIO26,
|
||||
MFP_PIN_GPIO27,
|
||||
MFP_PIN_GPIO28,
|
||||
MFP_PIN_GPIO29,
|
||||
MFP_PIN_GPIO30,
|
||||
MFP_PIN_GPIO31,
|
||||
MFP_PIN_GPIO32,
|
||||
MFP_PIN_GPIO33,
|
||||
MFP_PIN_GPIO34,
|
||||
MFP_PIN_GPIO35,
|
||||
MFP_PIN_GPIO36,
|
||||
MFP_PIN_GPIO37,
|
||||
MFP_PIN_GPIO38,
|
||||
MFP_PIN_GPIO39,
|
||||
MFP_PIN_GPIO40,
|
||||
MFP_PIN_GPIO41,
|
||||
MFP_PIN_GPIO42,
|
||||
MFP_PIN_GPIO43,
|
||||
MFP_PIN_GPIO44,
|
||||
MFP_PIN_GPIO45,
|
||||
MFP_PIN_GPIO46,
|
||||
MFP_PIN_GPIO47,
|
||||
MFP_PIN_GPIO48,
|
||||
MFP_PIN_GPIO49,
|
||||
MFP_PIN_GPIO50,
|
||||
MFP_PIN_GPIO51,
|
||||
MFP_PIN_GPIO52,
|
||||
MFP_PIN_GPIO53,
|
||||
MFP_PIN_GPIO54,
|
||||
MFP_PIN_GPIO55,
|
||||
MFP_PIN_GPIO56,
|
||||
MFP_PIN_GPIO57,
|
||||
MFP_PIN_GPIO58,
|
||||
MFP_PIN_GPIO59,
|
||||
MFP_PIN_GPIO60,
|
||||
MFP_PIN_GPIO61,
|
||||
MFP_PIN_GPIO62,
|
||||
MFP_PIN_GPIO63,
|
||||
MFP_PIN_GPIO64,
|
||||
MFP_PIN_GPIO65,
|
||||
MFP_PIN_GPIO66,
|
||||
MFP_PIN_GPIO67,
|
||||
MFP_PIN_GPIO68,
|
||||
MFP_PIN_GPIO69,
|
||||
MFP_PIN_GPIO70,
|
||||
MFP_PIN_GPIO71,
|
||||
MFP_PIN_GPIO72,
|
||||
MFP_PIN_GPIO73,
|
||||
MFP_PIN_GPIO74,
|
||||
MFP_PIN_GPIO75,
|
||||
MFP_PIN_GPIO76,
|
||||
MFP_PIN_GPIO77,
|
||||
MFP_PIN_GPIO78,
|
||||
MFP_PIN_GPIO79,
|
||||
MFP_PIN_GPIO80,
|
||||
MFP_PIN_GPIO81,
|
||||
MFP_PIN_GPIO82,
|
||||
MFP_PIN_GPIO83,
|
||||
MFP_PIN_GPIO84,
|
||||
MFP_PIN_GPIO85,
|
||||
MFP_PIN_GPIO86,
|
||||
MFP_PIN_GPIO87,
|
||||
MFP_PIN_GPIO88,
|
||||
MFP_PIN_GPIO89,
|
||||
MFP_PIN_GPIO90,
|
||||
MFP_PIN_GPIO91,
|
||||
MFP_PIN_GPIO92,
|
||||
MFP_PIN_GPIO93,
|
||||
MFP_PIN_GPIO94,
|
||||
MFP_PIN_GPIO95,
|
||||
MFP_PIN_GPIO96,
|
||||
MFP_PIN_GPIO97,
|
||||
MFP_PIN_GPIO98,
|
||||
MFP_PIN_GPIO99,
|
||||
MFP_PIN_GPIO100,
|
||||
MFP_PIN_GPIO101,
|
||||
MFP_PIN_GPIO102,
|
||||
MFP_PIN_GPIO103,
|
||||
MFP_PIN_GPIO104,
|
||||
MFP_PIN_GPIO105,
|
||||
MFP_PIN_GPIO106,
|
||||
MFP_PIN_GPIO107,
|
||||
MFP_PIN_GPIO108,
|
||||
MFP_PIN_GPIO109,
|
||||
MFP_PIN_GPIO110,
|
||||
MFP_PIN_GPIO111,
|
||||
MFP_PIN_GPIO112,
|
||||
MFP_PIN_GPIO113,
|
||||
MFP_PIN_GPIO114,
|
||||
MFP_PIN_GPIO115,
|
||||
MFP_PIN_GPIO116,
|
||||
MFP_PIN_GPIO117,
|
||||
MFP_PIN_GPIO118,
|
||||
MFP_PIN_GPIO119,
|
||||
MFP_PIN_GPIO120,
|
||||
MFP_PIN_GPIO121,
|
||||
MFP_PIN_GPIO122,
|
||||
MFP_PIN_GPIO123,
|
||||
MFP_PIN_GPIO124,
|
||||
MFP_PIN_GPIO125,
|
||||
MFP_PIN_GPIO126,
|
||||
MFP_PIN_GPIO127,
|
||||
MFP_PIN_GPIO0_2,
|
||||
MFP_PIN_GPIO1_2,
|
||||
MFP_PIN_GPIO2_2,
|
||||
MFP_PIN_GPIO3_2,
|
||||
MFP_PIN_GPIO4_2,
|
||||
MFP_PIN_GPIO5_2,
|
||||
MFP_PIN_GPIO6_2,
|
||||
MFP_PIN_GPIO7_2,
|
||||
MFP_PIN_GPIO8_2,
|
||||
MFP_PIN_GPIO9_2,
|
||||
MFP_PIN_GPIO10_2,
|
||||
MFP_PIN_GPIO11_2,
|
||||
MFP_PIN_GPIO12_2,
|
||||
MFP_PIN_GPIO13_2,
|
||||
MFP_PIN_GPIO14_2,
|
||||
MFP_PIN_GPIO15_2,
|
||||
MFP_PIN_GPIO16_2,
|
||||
MFP_PIN_GPIO17_2,
|
||||
|
||||
MFP_PIN_ULPI_STP,
|
||||
MFP_PIN_ULPI_NXT,
|
||||
MFP_PIN_ULPI_DIR,
|
||||
|
||||
MFP_PIN_nXCVREN,
|
||||
MFP_PIN_DF_CLE_nOE,
|
||||
MFP_PIN_DF_nADV1_ALE,
|
||||
MFP_PIN_DF_SCLK_E,
|
||||
MFP_PIN_DF_SCLK_S,
|
||||
MFP_PIN_nBE0,
|
||||
MFP_PIN_nBE1,
|
||||
MFP_PIN_DF_nADV2_ALE,
|
||||
MFP_PIN_DF_INT_RnB,
|
||||
MFP_PIN_DF_nCS0,
|
||||
MFP_PIN_DF_nCS1,
|
||||
MFP_PIN_nLUA,
|
||||
MFP_PIN_nLLA,
|
||||
MFP_PIN_DF_nWE,
|
||||
MFP_PIN_DF_ALE_nWE,
|
||||
MFP_PIN_DF_nRE_nOE,
|
||||
MFP_PIN_DF_ADDR0,
|
||||
MFP_PIN_DF_ADDR1,
|
||||
MFP_PIN_DF_ADDR2,
|
||||
MFP_PIN_DF_ADDR3,
|
||||
MFP_PIN_DF_IO0,
|
||||
MFP_PIN_DF_IO1,
|
||||
MFP_PIN_DF_IO2,
|
||||
MFP_PIN_DF_IO3,
|
||||
MFP_PIN_DF_IO4,
|
||||
MFP_PIN_DF_IO5,
|
||||
MFP_PIN_DF_IO6,
|
||||
MFP_PIN_DF_IO7,
|
||||
MFP_PIN_DF_IO8,
|
||||
MFP_PIN_DF_IO9,
|
||||
MFP_PIN_DF_IO10,
|
||||
MFP_PIN_DF_IO11,
|
||||
MFP_PIN_DF_IO12,
|
||||
MFP_PIN_DF_IO13,
|
||||
MFP_PIN_DF_IO14,
|
||||
MFP_PIN_DF_IO15,
|
||||
|
||||
/* additional pins on PXA930 */
|
||||
MFP_PIN_GSIM_UIO,
|
||||
MFP_PIN_GSIM_UCLK,
|
||||
MFP_PIN_GSIM_UDET,
|
||||
MFP_PIN_GSIM_nURST,
|
||||
MFP_PIN_PMIC_INT,
|
||||
MFP_PIN_RDY,
|
||||
|
||||
MFP_PIN_MAX,
|
||||
};
|
||||
|
||||
/*
|
||||
* a possible MFP configuration is represented by a 32-bit integer
|
||||
*
|
||||
* bit 0.. 9 - MFP Pin Number (1024 Pins Maximum)
|
||||
* bit 10..12 - Alternate Function Selection
|
||||
* bit 13..15 - Drive Strength
|
||||
* bit 16..18 - Low Power Mode State
|
||||
* bit 19..20 - Low Power Mode Edge Detection
|
||||
* bit 21..22 - Run Mode Pull State
|
||||
*
|
||||
* to facilitate the definition, the following macros are provided
|
||||
*
|
||||
* MFP_CFG_DEFAULT - default MFP configuration value, with
|
||||
* alternate function = 0,
|
||||
* drive strength = fast 3mA (MFP_DS03X)
|
||||
* low power mode = default
|
||||
* edge detection = none
|
||||
*
|
||||
* MFP_CFG - default MFPR value with alternate function
|
||||
* MFP_CFG_DRV - default MFPR value with alternate function and
|
||||
* pin drive strength
|
||||
* MFP_CFG_LPM - default MFPR value with alternate function and
|
||||
* low power mode
|
||||
* MFP_CFG_X - default MFPR value with alternate function,
|
||||
* pin drive strength and low power mode
|
||||
*/
|
||||
|
||||
typedef unsigned long mfp_cfg_t;
|
||||
|
||||
#define MFP_PIN(x) ((x) & 0x3ff)
|
||||
|
||||
#define MFP_AF0 (0x0 << 10)
|
||||
#define MFP_AF1 (0x1 << 10)
|
||||
#define MFP_AF2 (0x2 << 10)
|
||||
#define MFP_AF3 (0x3 << 10)
|
||||
#define MFP_AF4 (0x4 << 10)
|
||||
#define MFP_AF5 (0x5 << 10)
|
||||
#define MFP_AF6 (0x6 << 10)
|
||||
#define MFP_AF7 (0x7 << 10)
|
||||
#define MFP_AF_MASK (0x7 << 10)
|
||||
#define MFP_AF(x) (((x) >> 10) & 0x7)
|
||||
|
||||
#define MFP_DS01X (0x0 << 13)
|
||||
#define MFP_DS02X (0x1 << 13)
|
||||
#define MFP_DS03X (0x2 << 13)
|
||||
#define MFP_DS04X (0x3 << 13)
|
||||
#define MFP_DS06X (0x4 << 13)
|
||||
#define MFP_DS08X (0x5 << 13)
|
||||
#define MFP_DS10X (0x6 << 13)
|
||||
#define MFP_DS13X (0x7 << 13)
|
||||
#define MFP_DS_MASK (0x7 << 13)
|
||||
#define MFP_DS(x) (((x) >> 13) & 0x7)
|
||||
|
||||
#define MFP_LPM_DEFAULT (0x0 << 16)
|
||||
#define MFP_LPM_DRIVE_LOW (0x1 << 16)
|
||||
#define MFP_LPM_DRIVE_HIGH (0x2 << 16)
|
||||
#define MFP_LPM_PULL_LOW (0x3 << 16)
|
||||
#define MFP_LPM_PULL_HIGH (0x4 << 16)
|
||||
#define MFP_LPM_FLOAT (0x5 << 16)
|
||||
#define MFP_LPM_INPUT (0x6 << 16)
|
||||
#define MFP_LPM_STATE_MASK (0x7 << 16)
|
||||
#define MFP_LPM_STATE(x) (((x) >> 16) & 0x7)
|
||||
|
||||
#define MFP_LPM_EDGE_NONE (0x0 << 19)
|
||||
#define MFP_LPM_EDGE_RISE (0x1 << 19)
|
||||
#define MFP_LPM_EDGE_FALL (0x2 << 19)
|
||||
#define MFP_LPM_EDGE_BOTH (0x3 << 19)
|
||||
#define MFP_LPM_EDGE_MASK (0x3 << 19)
|
||||
#define MFP_LPM_EDGE(x) (((x) >> 19) & 0x3)
|
||||
|
||||
#define MFP_PULL_NONE (0x0 << 21)
|
||||
#define MFP_PULL_LOW (0x1 << 21)
|
||||
#define MFP_PULL_HIGH (0x2 << 21)
|
||||
#define MFP_PULL_BOTH (0x3 << 21)
|
||||
#define MFP_PULL_MASK (0x3 << 21)
|
||||
#define MFP_PULL(x) (((x) >> 21) & 0x3)
|
||||
|
||||
#define MFP_CFG_DEFAULT (MFP_AF0 | MFP_DS03X | MFP_LPM_DEFAULT |\
|
||||
MFP_LPM_EDGE_NONE | MFP_PULL_NONE)
|
||||
|
||||
#define MFP_CFG(pin, af) \
|
||||
((MFP_CFG_DEFAULT & ~MFP_AF_MASK) |\
|
||||
(MFP_PIN(MFP_PIN_##pin) | MFP_##af))
|
||||
|
||||
#define MFP_CFG_DRV(pin, af, drv) \
|
||||
((MFP_CFG_DEFAULT & ~(MFP_AF_MASK | MFP_DS_MASK)) |\
|
||||
(MFP_PIN(MFP_PIN_##pin) | MFP_##af | MFP_##drv))
|
||||
|
||||
#define MFP_CFG_LPM(pin, af, lpm) \
|
||||
((MFP_CFG_DEFAULT & ~(MFP_AF_MASK | MFP_LPM_STATE_MASK)) |\
|
||||
(MFP_PIN(MFP_PIN_##pin) | MFP_##af | MFP_LPM_##lpm))
|
||||
|
||||
#define MFP_CFG_X(pin, af, drv, lpm) \
|
||||
((MFP_CFG_DEFAULT & ~(MFP_AF_MASK | MFP_DS_MASK | MFP_LPM_STATE_MASK)) |\
|
||||
(MFP_PIN(MFP_PIN_##pin) | MFP_##af | MFP_##drv | MFP_LPM_##lpm))
|
||||
#include <plat/mfp.h>
|
||||
|
||||
#endif /* __ASM_ARCH_MFP_H */
|
||||
|
|
|
@ -14,6 +14,11 @@ struct pxamci_platform_data {
|
|||
int (*get_ro)(struct device *);
|
||||
void (*setpower)(struct device *, unsigned int);
|
||||
void (*exit)(struct device *, void *);
|
||||
int gpio_card_detect; /* gpio detecting card insertion */
|
||||
int gpio_card_ro; /* gpio detecting read only toggle */
|
||||
bool gpio_card_ro_invert; /* gpio ro is inverted */
|
||||
int gpio_power; /* gpio powering up MMC bus */
|
||||
bool gpio_power_invert; /* gpio power is inverted */
|
||||
};
|
||||
|
||||
extern void pxa_set_mci_info(struct pxamci_platform_data *info);
|
||||
|
|
86
arch/arm/mach-pxa/include/mach/palmtc.h
Normal file
86
arch/arm/mach-pxa/include/mach/palmtc.h
Normal file
|
@ -0,0 +1,86 @@
|
|||
/*
|
||||
* linux/include/asm-arm/arch-pxa/palmtc-gpio.h
|
||||
*
|
||||
* GPIOs and interrupts for Palm Tungsten|C Handheld Computer
|
||||
*
|
||||
* Authors: Alex Osborne <bobofdoom@gmail.com>
|
||||
* Marek Vasut <marek.vasut@gmail.com>
|
||||
* Holger Bocklet <bitz.email@gmx.net>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _INCLUDE_PALMTC_H_
|
||||
#define _INCLUDE_PALMTC_H_
|
||||
|
||||
/** HERE ARE GPIOs **/
|
||||
|
||||
/* GPIOs */
|
||||
#define GPIO_NR_PALMTC_EARPHONE_DETECT 2
|
||||
#define GPIO_NR_PALMTC_CRADLE_DETECT 5
|
||||
#define GPIO_NR_PALMTC_HOTSYNC_BUTTON 7
|
||||
|
||||
/* SD/MMC */
|
||||
#define GPIO_NR_PALMTC_SD_DETECT_N 12
|
||||
#define GPIO_NR_PALMTC_SD_POWER 32
|
||||
#define GPIO_NR_PALMTC_SD_READONLY 54
|
||||
|
||||
/* WLAN */
|
||||
#define GPIO_NR_PALMTC_PCMCIA_READY 13
|
||||
#define GPIO_NR_PALMTC_PCMCIA_PWRREADY 14
|
||||
#define GPIO_NR_PALMTC_PCMCIA_POWER1 15
|
||||
#define GPIO_NR_PALMTC_PCMCIA_POWER2 33
|
||||
#define GPIO_NR_PALMTC_PCMCIA_POWER3 55
|
||||
#define GPIO_NR_PALMTC_PCMCIA_RESET 78
|
||||
|
||||
/* UDC */
|
||||
#define GPIO_NR_PALMTC_USB_DETECT_N 4
|
||||
#define GPIO_NR_PALMTC_USB_POWER 36
|
||||
|
||||
/* LCD/BACKLIGHT */
|
||||
#define GPIO_NR_PALMTC_BL_POWER 16
|
||||
#define GPIO_NR_PALMTC_LCD_POWER 44
|
||||
#define GPIO_NR_PALMTC_LCD_BLANK 38
|
||||
|
||||
/* UART */
|
||||
#define GPIO_NR_PALMTC_RS232_POWER 37
|
||||
|
||||
/* IRDA */
|
||||
#define GPIO_NR_PALMTC_IR_DISABLE 45
|
||||
|
||||
/* IRQs */
|
||||
#define IRQ_GPIO_PALMTC_SD_DETECT_N IRQ_GPIO(GPIO_NR_PALMTC_SD_DETECT_N)
|
||||
#define IRQ_GPIO_PALMTC_WLAN_READY IRQ_GPIO(GPIO_NR_PALMTC_WLAN_READY)
|
||||
|
||||
/* UCB1400 GPIOs */
|
||||
#define GPIO_NR_PALMTC_POWER_DETECT (0x80 | 0x00)
|
||||
#define GPIO_NR_PALMTC_HEADPHONE_DETECT (0x80 | 0x01)
|
||||
#define GPIO_NR_PALMTC_SPEAKER_ENABLE (0x80 | 0x03)
|
||||
#define GPIO_NR_PALMTC_VIBRA_POWER (0x80 | 0x05)
|
||||
#define GPIO_NR_PALMTC_LED_POWER (0x80 | 0x07)
|
||||
|
||||
/** HERE ARE INIT VALUES **/
|
||||
#define PALMTC_UCB1400_GPIO_OFFSET 0x80
|
||||
|
||||
/* BATTERY */
|
||||
#define PALMTC_BAT_MAX_VOLTAGE 4000 /* 4.00V maximum voltage */
|
||||
#define PALMTC_BAT_MIN_VOLTAGE 3550 /* 3.55V critical voltage */
|
||||
#define PALMTC_BAT_MAX_CURRENT 0 /* unknokn */
|
||||
#define PALMTC_BAT_MIN_CURRENT 0 /* unknown */
|
||||
#define PALMTC_BAT_MAX_CHARGE 1 /* unknown */
|
||||
#define PALMTC_BAT_MIN_CHARGE 1 /* unknown */
|
||||
#define PALMTC_MAX_LIFE_MINS 240 /* on-life in minutes */
|
||||
|
||||
#define PALMTC_BAT_MEASURE_DELAY (HZ * 1)
|
||||
|
||||
/* BACKLIGHT */
|
||||
#define PALMTC_MAX_INTENSITY 0xFE
|
||||
#define PALMTC_DEFAULT_INTENSITY 0x7E
|
||||
#define PALMTC_LIMIT_MASK 0x7F
|
||||
#define PALMTC_PRESCALER 0x3F
|
||||
#define PALMTC_PERIOD_NS 3500
|
||||
|
||||
#endif
|
|
@ -82,6 +82,11 @@
|
|||
#define PALMTX_PHYS_FLASH_START PXA_CS0_PHYS /* ChipSelect 0 */
|
||||
#define PALMTX_PHYS_NAND_START PXA_CS1_PHYS /* ChipSelect 1 */
|
||||
|
||||
#define PALMTX_NAND_ALE_PHYS (PALMTX_PHYS_NAND_START | (1 << 24))
|
||||
#define PALMTX_NAND_CLE_PHYS (PALMTX_PHYS_NAND_START | (1 << 25))
|
||||
#define PALMTX_NAND_ALE_VIRT 0xff100000
|
||||
#define PALMTX_NAND_CLE_VIRT 0xff200000
|
||||
|
||||
/* TOUCHSCREEN */
|
||||
#define AC97_LINK_FRAME 21
|
||||
|
||||
|
|
|
@ -208,7 +208,7 @@
|
|||
#define CKEN_MVED 43 /* < MVED clock enable */
|
||||
|
||||
/* Note: GCU clock enable bit differs on PXA300/PXA310 and PXA320 */
|
||||
#define PXA300_CKEN_GRAPHICS 42 /* Graphics controller clock enable */
|
||||
#define PXA320_CKEN_GRAPHICS 7 /* Graphics controller clock enable */
|
||||
#define CKEN_PXA300_GCU 42 /* Graphics controller clock enable */
|
||||
#define CKEN_PXA320_GCU 7 /* Graphics controller clock enable */
|
||||
|
||||
#endif /* __ASM_ARCH_PXA3XX_REGS_H */
|
||||
|
|
|
@ -118,7 +118,8 @@ struct pxafb_mach_info {
|
|||
u_int fixed_modes:1,
|
||||
cmap_inverse:1,
|
||||
cmap_static:1,
|
||||
unused:29;
|
||||
acceleration_enabled:1,
|
||||
unused:28;
|
||||
|
||||
/* The following should be defined in LCCR0
|
||||
* LCCR0_Act or LCCR0_Pas Active or Passive
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
#define ICFP __REG(0x40D0000C) /* Interrupt Controller FIQ Pending Register */
|
||||
#define ICPR __REG(0x40D00010) /* Interrupt Controller Pending Register */
|
||||
#define ICCR __REG(0x40D00014) /* Interrupt Controller Control Register */
|
||||
#define ICHP __REG(0x40D00018) /* Interrupt Controller Highest Priority Register */
|
||||
|
||||
#define ICIP2 __REG(0x40D0009C) /* Interrupt Controller IRQ Pending Register 2 */
|
||||
#define ICMR2 __REG(0x40D000A0) /* Interrupt Controller Mask Register 2 */
|
||||
|
@ -20,4 +21,14 @@
|
|||
#define ICFP2 __REG(0x40D000A8) /* Interrupt Controller FIQ Pending Register 2 */
|
||||
#define ICPR2 __REG(0x40D000AC) /* Interrupt Controller Pending Register 2 */
|
||||
|
||||
#define ICIP3 __REG(0x40D00130) /* Interrupt Controller IRQ Pending Register 3 */
|
||||
#define ICMR3 __REG(0x40D00134) /* Interrupt Controller Mask Register 3 */
|
||||
#define ICLR3 __REG(0x40D00138) /* Interrupt Controller Level Register 3 */
|
||||
#define ICFP3 __REG(0x40D0013C) /* Interrupt Controller FIQ Pending Register 3 */
|
||||
#define ICPR3 __REG(0x40D00140) /* Interrupt Controller Pending Register 3 */
|
||||
|
||||
#define IPR(x) __REG(0x40D0001C + (x < 32 ? (x << 2) \
|
||||
: (x < 64 ? (0x94 + ((x - 32) << 2)) \
|
||||
: (0x128 + ((x - 64) << 2)))))
|
||||
|
||||
#endif /* __ASM_MACH_REGS_INTC_H */
|
||||
|
|
|
@ -37,7 +37,7 @@ static inline void arch_decomp_setup(void)
|
|||
{
|
||||
if (machine_is_littleton() || machine_is_intelmote2()
|
||||
|| machine_is_csb726() || machine_is_stargate2()
|
||||
|| machine_is_cm_x300())
|
||||
|| machine_is_cm_x300() || machine_is_balloon3())
|
||||
UART = STUART;
|
||||
}
|
||||
|
||||
|
|
|
@ -120,7 +120,7 @@ static void __init pxa_init_low_gpio_irq(set_wake_t fn)
|
|||
|
||||
void __init pxa_init_irq(int irq_nr, set_wake_t fn)
|
||||
{
|
||||
int irq;
|
||||
int irq, i;
|
||||
|
||||
pxa_internal_irq_nr = irq_nr;
|
||||
|
||||
|
@ -129,6 +129,12 @@ void __init pxa_init_irq(int irq_nr, set_wake_t fn)
|
|||
_ICLR(irq) = 0; /* all IRQs are IRQ, not FIQ */
|
||||
}
|
||||
|
||||
/* initialize interrupt priority */
|
||||
if (cpu_is_pxa27x() || cpu_is_pxa3xx()) {
|
||||
for (i = 0; i < irq_nr; i++)
|
||||
IPR(i) = i | (1 << 31);
|
||||
}
|
||||
|
||||
/* only unmasked interrupts kick us out of idle */
|
||||
ICCR = 1;
|
||||
|
||||
|
|
|
@ -265,45 +265,12 @@ static inline void littleton_init_keypad(void) {}
|
|||
#endif
|
||||
|
||||
#if defined(CONFIG_MMC_PXA) || defined(CONFIG_MMC_PXA_MODULE)
|
||||
static int littleton_mci_init(struct device *dev,
|
||||
irq_handler_t littleton_detect_int, void *data)
|
||||
{
|
||||
int err, gpio_cd = GPIO_MMC1_CARD_DETECT;
|
||||
|
||||
err = gpio_request(gpio_cd, "mmc card detect");
|
||||
if (err)
|
||||
goto err_request_cd;
|
||||
|
||||
gpio_direction_input(gpio_cd);
|
||||
|
||||
err = request_irq(gpio_to_irq(gpio_cd), littleton_detect_int,
|
||||
IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING,
|
||||
"mmc card detect", data);
|
||||
if (err) {
|
||||
dev_err(dev, "failed to request card detect IRQ\n");
|
||||
goto err_request_irq;
|
||||
}
|
||||
return 0;
|
||||
|
||||
err_request_irq:
|
||||
gpio_free(gpio_cd);
|
||||
err_request_cd:
|
||||
return err;
|
||||
}
|
||||
|
||||
static void littleton_mci_exit(struct device *dev, void *data)
|
||||
{
|
||||
int gpio_cd = GPIO_MMC1_CARD_DETECT;
|
||||
|
||||
free_irq(gpio_to_irq(gpio_cd), data);
|
||||
gpio_free(gpio_cd);
|
||||
}
|
||||
|
||||
static struct pxamci_platform_data littleton_mci_platform_data = {
|
||||
.detect_delay = 20,
|
||||
.ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34,
|
||||
.init = littleton_mci_init,
|
||||
.exit = littleton_mci_exit,
|
||||
.detect_delay = 20,
|
||||
.ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34,
|
||||
.gpio_card_detect = GPIO_MMC1_CARD_DETECT,
|
||||
.gpio_card_ro = -1,
|
||||
.gpio_power = -1,
|
||||
};
|
||||
|
||||
static void __init littleton_init_mmc(void)
|
||||
|
|
|
@ -482,11 +482,14 @@ static void lubbock_mci_exit(struct device *dev, void *data)
|
|||
}
|
||||
|
||||
static struct pxamci_platform_data lubbock_mci_platform_data = {
|
||||
.ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34,
|
||||
.detect_delay = 1,
|
||||
.init = lubbock_mci_init,
|
||||
.get_ro = lubbock_mci_get_ro,
|
||||
.exit = lubbock_mci_exit,
|
||||
.ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34,
|
||||
.detect_delay = 1,
|
||||
.init = lubbock_mci_init,
|
||||
.get_ro = lubbock_mci_get_ro,
|
||||
.exit = lubbock_mci_exit,
|
||||
.gpio_card_detect = -1,
|
||||
.gpio_card_ro = -1,
|
||||
.gpio_power = -1,
|
||||
};
|
||||
|
||||
static void lubbock_irda_transceiver_mode(struct device *dev, int mode)
|
||||
|
@ -504,8 +507,9 @@ static void lubbock_irda_transceiver_mode(struct device *dev, int mode)
|
|||
}
|
||||
|
||||
static struct pxaficp_platform_data lubbock_ficp_platform_data = {
|
||||
.transceiver_cap = IR_SIRMODE | IR_FIRMODE,
|
||||
.transceiver_mode = lubbock_irda_transceiver_mode,
|
||||
.gpio_pwdown = -1,
|
||||
.transceiver_cap = IR_SIRMODE | IR_FIRMODE,
|
||||
.transceiver_mode = lubbock_irda_transceiver_mode,
|
||||
};
|
||||
|
||||
static void __init lubbock_init(void)
|
||||
|
|
|
@ -140,15 +140,9 @@ static unsigned long magician_pin_config[] __initdata = {
|
|||
* IRDA
|
||||
*/
|
||||
|
||||
static void magician_irda_transceiver_mode(struct device *dev, int mode)
|
||||
{
|
||||
gpio_set_value(GPIO83_MAGICIAN_nIR_EN, mode & IR_OFF);
|
||||
pxa2xx_transceiver_mode(dev, mode);
|
||||
}
|
||||
|
||||
static struct pxaficp_platform_data magician_ficp_info = {
|
||||
.transceiver_cap = IR_SIRMODE | IR_OFF,
|
||||
.transceiver_mode = magician_irda_transceiver_mode,
|
||||
.gpio_pwdown = GPIO83_MAGICIAN_nIR_EN,
|
||||
.transceiver_cap = IR_SIRMODE | IR_OFF,
|
||||
};
|
||||
|
||||
/*
|
||||
|
@ -651,55 +645,24 @@ static struct platform_device bq24022 = {
|
|||
static int magician_mci_init(struct device *dev,
|
||||
irq_handler_t detect_irq, void *data)
|
||||
{
|
||||
int err;
|
||||
|
||||
err = request_irq(IRQ_MAGICIAN_SD, detect_irq,
|
||||
return request_irq(IRQ_MAGICIAN_SD, detect_irq,
|
||||
IRQF_DISABLED | IRQF_SAMPLE_RANDOM,
|
||||
"MMC card detect", data);
|
||||
if (err)
|
||||
goto err_request_irq;
|
||||
err = gpio_request(EGPIO_MAGICIAN_SD_POWER, "SD_POWER");
|
||||
if (err)
|
||||
goto err_request_power;
|
||||
err = gpio_request(EGPIO_MAGICIAN_nSD_READONLY, "nSD_READONLY");
|
||||
if (err)
|
||||
goto err_request_readonly;
|
||||
|
||||
return 0;
|
||||
|
||||
err_request_readonly:
|
||||
gpio_free(EGPIO_MAGICIAN_SD_POWER);
|
||||
err_request_power:
|
||||
free_irq(IRQ_MAGICIAN_SD, data);
|
||||
err_request_irq:
|
||||
return err;
|
||||
}
|
||||
|
||||
static void magician_mci_setpower(struct device *dev, unsigned int vdd)
|
||||
{
|
||||
struct pxamci_platform_data *pdata = dev->platform_data;
|
||||
|
||||
gpio_set_value(EGPIO_MAGICIAN_SD_POWER, (1 << vdd) & pdata->ocr_mask);
|
||||
}
|
||||
|
||||
static int magician_mci_get_ro(struct device *dev)
|
||||
{
|
||||
return (!gpio_get_value(EGPIO_MAGICIAN_nSD_READONLY));
|
||||
"mmc card detect", data);
|
||||
}
|
||||
|
||||
static void magician_mci_exit(struct device *dev, void *data)
|
||||
{
|
||||
gpio_free(EGPIO_MAGICIAN_nSD_READONLY);
|
||||
gpio_free(EGPIO_MAGICIAN_SD_POWER);
|
||||
free_irq(IRQ_MAGICIAN_SD, data);
|
||||
}
|
||||
|
||||
static struct pxamci_platform_data magician_mci_info = {
|
||||
.ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34,
|
||||
.init = magician_mci_init,
|
||||
.get_ro = magician_mci_get_ro,
|
||||
.setpower = magician_mci_setpower,
|
||||
.exit = magician_mci_exit,
|
||||
.ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34,
|
||||
.init = magician_mci_init,
|
||||
.exit = magician_mci_exit,
|
||||
.gpio_card_detect = -1,
|
||||
.gpio_card_ro = EGPIO_MAGICIAN_nSD_READONLY,
|
||||
.gpio_card_ro_invert = 1,
|
||||
.gpio_power = EGPIO_MAGICIAN_SD_POWER,
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -450,10 +450,13 @@ static void mainstone_mci_exit(struct device *dev, void *data)
|
|||
}
|
||||
|
||||
static struct pxamci_platform_data mainstone_mci_platform_data = {
|
||||
.ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34,
|
||||
.init = mainstone_mci_init,
|
||||
.setpower = mainstone_mci_setpower,
|
||||
.exit = mainstone_mci_exit,
|
||||
.ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34,
|
||||
.init = mainstone_mci_init,
|
||||
.setpower = mainstone_mci_setpower,
|
||||
.exit = mainstone_mci_exit,
|
||||
.gpio_card_detect = -1,
|
||||
.gpio_card_ro = -1,
|
||||
.gpio_power = -1,
|
||||
};
|
||||
|
||||
static void mainstone_irda_transceiver_mode(struct device *dev, int mode)
|
||||
|
@ -476,8 +479,9 @@ static void mainstone_irda_transceiver_mode(struct device *dev, int mode)
|
|||
}
|
||||
|
||||
static struct pxaficp_platform_data mainstone_ficp_platform_data = {
|
||||
.transceiver_cap = IR_SIRMODE | IR_FIRMODE | IR_OFF,
|
||||
.transceiver_mode = mainstone_irda_transceiver_mode,
|
||||
.gpio_pwdown = -1,
|
||||
.transceiver_cap = IR_SIRMODE | IR_FIRMODE | IR_OFF,
|
||||
.transceiver_mode = mainstone_irda_transceiver_mode,
|
||||
};
|
||||
|
||||
static struct gpio_keys_button gpio_keys_button[] = {
|
||||
|
|
|
@ -434,72 +434,15 @@ struct gpio_vbus_mach_info gpio_vbus_data = {
|
|||
/*
|
||||
* SDIO/MMC Card controller
|
||||
*/
|
||||
static void mci_setpower(struct device *dev, unsigned int vdd)
|
||||
{
|
||||
struct pxamci_platform_data *p_d = dev->platform_data;
|
||||
|
||||
if ((1 << vdd) & p_d->ocr_mask)
|
||||
gpio_set_value(GPIO91_SDIO_EN, 1); /* enable SDIO power */
|
||||
else
|
||||
gpio_set_value(GPIO91_SDIO_EN, 0); /* disable SDIO power */
|
||||
}
|
||||
|
||||
static int mci_get_ro(struct device *dev)
|
||||
{
|
||||
return gpio_get_value(GPIO78_SDIO_RO);
|
||||
}
|
||||
|
||||
struct gpio_ress mci_gpios[] = {
|
||||
MIO_GPIO_IN(GPIO78_SDIO_RO, "SDIO readonly detect"),
|
||||
MIO_GPIO_IN(GPIO15_SDIO_INSERT, "SDIO insertion detect"),
|
||||
MIO_GPIO_OUT(GPIO91_SDIO_EN, 0, "SDIO power enable")
|
||||
};
|
||||
|
||||
static void mci_exit(struct device *dev, void *data)
|
||||
{
|
||||
mio_gpio_free(ARRAY_AND_SIZE(mci_gpios));
|
||||
free_irq(gpio_to_irq(GPIO15_SDIO_INSERT), data);
|
||||
}
|
||||
|
||||
static struct pxamci_platform_data mioa701_mci_info;
|
||||
|
||||
/**
|
||||
* The card detect interrupt isn't debounced so we delay it by 250ms
|
||||
* to give the card a chance to fully insert/eject.
|
||||
*/
|
||||
static int mci_init(struct device *dev, irq_handler_t detect_int, void *data)
|
||||
{
|
||||
int rc;
|
||||
int irq = gpio_to_irq(GPIO15_SDIO_INSERT);
|
||||
|
||||
rc = mio_gpio_request(ARRAY_AND_SIZE(mci_gpios));
|
||||
if (rc)
|
||||
goto err_gpio;
|
||||
/* enable RE/FE interrupt on card insertion and removal */
|
||||
rc = request_irq(irq, detect_int,
|
||||
IRQF_DISABLED | IRQF_TRIGGER_RISING |
|
||||
IRQF_TRIGGER_FALLING,
|
||||
"MMC card detect", data);
|
||||
if (rc)
|
||||
goto err_irq;
|
||||
|
||||
mioa701_mci_info.detect_delay = msecs_to_jiffies(250);
|
||||
return 0;
|
||||
|
||||
err_irq:
|
||||
dev_err(dev, "mioa701_mci_init: MMC/SD:"
|
||||
" can't request MMC card detect IRQ\n");
|
||||
mio_gpio_free(ARRAY_AND_SIZE(mci_gpios));
|
||||
err_gpio:
|
||||
return rc;
|
||||
}
|
||||
|
||||
static struct pxamci_platform_data mioa701_mci_info = {
|
||||
.ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34,
|
||||
.init = mci_init,
|
||||
.get_ro = mci_get_ro,
|
||||
.setpower = mci_setpower,
|
||||
.exit = mci_exit,
|
||||
.ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34,
|
||||
.gpio_card_detect = GPIO15_SDIO_INSERT,
|
||||
.gpio_card_ro = GPIO78_SDIO_RO,
|
||||
.gpio_power = GPIO91_SDIO_EN,
|
||||
};
|
||||
|
||||
/* FlashRAM */
|
||||
|
@ -765,19 +708,20 @@ static struct i2c_board_info __initdata mioa701_pi2c_devices[] = {
|
|||
},
|
||||
};
|
||||
|
||||
static struct soc_camera_link iclink = {
|
||||
.bus_id = 0, /* Must match id in pxa27x_device_camera in device.c */
|
||||
};
|
||||
|
||||
/* Board I2C devices. */
|
||||
static struct i2c_board_info __initdata mioa701_i2c_devices[] = {
|
||||
{
|
||||
/* Must initialize before the camera(s) */
|
||||
I2C_BOARD_INFO("mt9m111", 0x5d),
|
||||
.platform_data = &iclink,
|
||||
},
|
||||
};
|
||||
|
||||
static struct soc_camera_link iclink = {
|
||||
.bus_id = 0, /* Match id in pxa27x_device_camera in device.c */
|
||||
.board_info = &mioa701_i2c_devices[0],
|
||||
.i2c_adapter_id = 0,
|
||||
.module_name = "mt9m111",
|
||||
};
|
||||
|
||||
struct i2c_pxa_platform_data i2c_pdata = {
|
||||
.fast_mode = 1,
|
||||
};
|
||||
|
@ -811,6 +755,7 @@ MIO_SIMPLE_DEV(pxa2xx_pcm, "pxa2xx-pcm", NULL)
|
|||
MIO_SIMPLE_DEV(mioa701_sound, "mioa701-wm9713", NULL)
|
||||
MIO_SIMPLE_DEV(mioa701_board, "mioa701-board", NULL)
|
||||
MIO_SIMPLE_DEV(gpio_vbus, "gpio-vbus", &gpio_vbus_data);
|
||||
MIO_SIMPLE_DEV(mioa701_camera, "soc-camera-pdrv",&iclink);
|
||||
|
||||
static struct platform_device *devices[] __initdata = {
|
||||
&mioa701_gpio_keys,
|
||||
|
@ -821,6 +766,7 @@ static struct platform_device *devices[] __initdata = {
|
|||
&power_dev,
|
||||
&strataflash,
|
||||
&gpio_vbus,
|
||||
&mioa701_camera,
|
||||
&mioa701_board,
|
||||
};
|
||||
|
||||
|
@ -841,7 +787,7 @@ static void mioa701_restart(char c, const char *cmd)
|
|||
static struct gpio_ress global_gpios[] = {
|
||||
MIO_GPIO_OUT(GPIO9_CHARGE_EN, 1, "Charger enable"),
|
||||
MIO_GPIO_OUT(GPIO18_POWEROFF, 0, "Power Off"),
|
||||
MIO_GPIO_OUT(GPIO87_LCD_POWER, 0, "LCD Power")
|
||||
MIO_GPIO_OUT(GPIO87_LCD_POWER, 0, "LCD Power"),
|
||||
};
|
||||
|
||||
static void __init mioa701_machine_init(void)
|
||||
|
@ -855,6 +801,7 @@ static void __init mioa701_machine_init(void)
|
|||
mio_gpio_request(ARRAY_AND_SIZE(global_gpios));
|
||||
bootstrap_init();
|
||||
set_pxa_fb_info(&mioa701_pxafb_info);
|
||||
mioa701_mci_info.detect_delay = msecs_to_jiffies(250);
|
||||
pxa_set_mci_info(&mioa701_mci_info);
|
||||
pxa_set_keypad_info(&mioa701_keypad_info);
|
||||
wm97xx_bat_set_pdata(&mioa701_battery_data);
|
||||
|
@ -869,7 +816,6 @@ static void __init mioa701_machine_init(void)
|
|||
pxa_set_i2c_info(&i2c_pdata);
|
||||
pxa27x_set_i2c_power_info(NULL);
|
||||
pxa_set_camera_info(&mioa701_pxacamera_platform_data);
|
||||
i2c_register_board_info(0, ARRAY_AND_SIZE(mioa701_i2c_devices));
|
||||
}
|
||||
|
||||
static void mioa701_machine_exit(void)
|
||||
|
|
|
@ -25,6 +25,9 @@
|
|||
#include <linux/wm97xx_batt.h>
|
||||
#include <linux/power_supply.h>
|
||||
#include <linux/sysdev.h>
|
||||
#include <linux/mtd/mtd.h>
|
||||
#include <linux/mtd/partitions.h>
|
||||
#include <linux/mtd/physmap.h>
|
||||
|
||||
#include <asm/mach-types.h>
|
||||
#include <asm/mach/arch.h>
|
||||
|
@ -140,86 +143,51 @@ static unsigned long palmld_pin_config[] __initdata = {
|
|||
GPIO13_GPIO, /* earphone detect */
|
||||
};
|
||||
|
||||
/******************************************************************************
|
||||
* NOR Flash
|
||||
******************************************************************************/
|
||||
static struct mtd_partition palmld_partitions[] = {
|
||||
{
|
||||
.name = "Flash",
|
||||
.offset = 0x00000000,
|
||||
.size = MTDPART_SIZ_FULL,
|
||||
.mask_flags = 0
|
||||
}
|
||||
};
|
||||
|
||||
static struct physmap_flash_data palmld_flash_data[] = {
|
||||
{
|
||||
.width = 2, /* bankwidth in bytes */
|
||||
.parts = palmld_partitions,
|
||||
.nr_parts = ARRAY_SIZE(palmld_partitions)
|
||||
}
|
||||
};
|
||||
|
||||
static struct resource palmld_flash_resource = {
|
||||
.start = PXA_CS0_PHYS,
|
||||
.end = PXA_CS0_PHYS + SZ_4M - 1,
|
||||
.flags = IORESOURCE_MEM,
|
||||
};
|
||||
|
||||
static struct platform_device palmld_flash = {
|
||||
.name = "physmap-flash",
|
||||
.id = 0,
|
||||
.resource = &palmld_flash_resource,
|
||||
.num_resources = 1,
|
||||
.dev = {
|
||||
.platform_data = palmld_flash_data,
|
||||
},
|
||||
};
|
||||
|
||||
/******************************************************************************
|
||||
* SD/MMC card controller
|
||||
******************************************************************************/
|
||||
static int palmld_mci_init(struct device *dev, irq_handler_t palmld_detect_int,
|
||||
void *data)
|
||||
{
|
||||
int err = 0;
|
||||
|
||||
/* Setup an interrupt for detecting card insert/remove events */
|
||||
err = gpio_request(GPIO_NR_PALMLD_SD_DETECT_N, "SD IRQ");
|
||||
if (err)
|
||||
goto err;
|
||||
err = gpio_direction_input(GPIO_NR_PALMLD_SD_DETECT_N);
|
||||
if (err)
|
||||
goto err2;
|
||||
err = request_irq(gpio_to_irq(GPIO_NR_PALMLD_SD_DETECT_N),
|
||||
palmld_detect_int, IRQF_DISABLED | IRQF_SAMPLE_RANDOM |
|
||||
IRQF_TRIGGER_FALLING | IRQF_TRIGGER_RISING,
|
||||
"SD/MMC card detect", data);
|
||||
if (err) {
|
||||
printk(KERN_ERR "%s: cannot request SD/MMC card detect IRQ\n",
|
||||
__func__);
|
||||
goto err2;
|
||||
}
|
||||
|
||||
err = gpio_request(GPIO_NR_PALMLD_SD_POWER, "SD_POWER");
|
||||
if (err)
|
||||
goto err3;
|
||||
err = gpio_direction_output(GPIO_NR_PALMLD_SD_POWER, 0);
|
||||
if (err)
|
||||
goto err4;
|
||||
|
||||
err = gpio_request(GPIO_NR_PALMLD_SD_READONLY, "SD_READONLY");
|
||||
if (err)
|
||||
goto err4;
|
||||
err = gpio_direction_input(GPIO_NR_PALMLD_SD_READONLY);
|
||||
if (err)
|
||||
goto err5;
|
||||
|
||||
printk(KERN_DEBUG "%s: irq registered\n", __func__);
|
||||
|
||||
return 0;
|
||||
|
||||
err5:
|
||||
gpio_free(GPIO_NR_PALMLD_SD_READONLY);
|
||||
err4:
|
||||
gpio_free(GPIO_NR_PALMLD_SD_POWER);
|
||||
err3:
|
||||
free_irq(gpio_to_irq(GPIO_NR_PALMLD_SD_DETECT_N), data);
|
||||
err2:
|
||||
gpio_free(GPIO_NR_PALMLD_SD_DETECT_N);
|
||||
err:
|
||||
return err;
|
||||
}
|
||||
|
||||
static void palmld_mci_exit(struct device *dev, void *data)
|
||||
{
|
||||
gpio_free(GPIO_NR_PALMLD_SD_READONLY);
|
||||
gpio_free(GPIO_NR_PALMLD_SD_POWER);
|
||||
free_irq(gpio_to_irq(GPIO_NR_PALMLD_SD_DETECT_N), data);
|
||||
gpio_free(GPIO_NR_PALMLD_SD_DETECT_N);
|
||||
}
|
||||
|
||||
static void palmld_mci_power(struct device *dev, unsigned int vdd)
|
||||
{
|
||||
struct pxamci_platform_data *p_d = dev->platform_data;
|
||||
gpio_set_value(GPIO_NR_PALMLD_SD_POWER, p_d->ocr_mask & (1 << vdd));
|
||||
}
|
||||
|
||||
static int palmld_mci_get_ro(struct device *dev)
|
||||
{
|
||||
return gpio_get_value(GPIO_NR_PALMLD_SD_READONLY);
|
||||
}
|
||||
|
||||
static struct pxamci_platform_data palmld_mci_platform_data = {
|
||||
.ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34,
|
||||
.setpower = palmld_mci_power,
|
||||
.get_ro = palmld_mci_get_ro,
|
||||
.init = palmld_mci_init,
|
||||
.exit = palmld_mci_exit,
|
||||
.ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34,
|
||||
.gpio_card_detect = GPIO_NR_PALMLD_SD_DETECT_N,
|
||||
.gpio_card_ro = GPIO_NR_PALMLD_SD_READONLY,
|
||||
.gpio_power = GPIO_NR_PALMLD_SD_POWER,
|
||||
.detect_delay = 20,
|
||||
};
|
||||
|
||||
/******************************************************************************
|
||||
|
@ -336,35 +304,9 @@ static struct platform_device palmld_backlight = {
|
|||
/******************************************************************************
|
||||
* IrDA
|
||||
******************************************************************************/
|
||||
static int palmld_irda_startup(struct device *dev)
|
||||
{
|
||||
int err;
|
||||
err = gpio_request(GPIO_NR_PALMLD_IR_DISABLE, "IR DISABLE");
|
||||
if (err)
|
||||
goto err;
|
||||
err = gpio_direction_output(GPIO_NR_PALMLD_IR_DISABLE, 1);
|
||||
if (err)
|
||||
gpio_free(GPIO_NR_PALMLD_IR_DISABLE);
|
||||
err:
|
||||
return err;
|
||||
}
|
||||
|
||||
static void palmld_irda_shutdown(struct device *dev)
|
||||
{
|
||||
gpio_free(GPIO_NR_PALMLD_IR_DISABLE);
|
||||
}
|
||||
|
||||
static void palmld_irda_transceiver_mode(struct device *dev, int mode)
|
||||
{
|
||||
gpio_set_value(GPIO_NR_PALMLD_IR_DISABLE, mode & IR_OFF);
|
||||
pxa2xx_transceiver_mode(dev, mode);
|
||||
}
|
||||
|
||||
static struct pxaficp_platform_data palmld_ficp_platform_data = {
|
||||
.startup = palmld_irda_startup,
|
||||
.shutdown = palmld_irda_shutdown,
|
||||
.transceiver_cap = IR_SIRMODE | IR_FIRMODE | IR_OFF,
|
||||
.transceiver_mode = palmld_irda_transceiver_mode,
|
||||
.gpio_pwdown = GPIO_NR_PALMLD_IR_DISABLE,
|
||||
.transceiver_cap = IR_SIRMODE | IR_OFF,
|
||||
};
|
||||
|
||||
/******************************************************************************
|
||||
|
@ -560,6 +502,7 @@ static struct platform_device *devices[] __initdata = {
|
|||
&power_supply,
|
||||
&palmld_asoc,
|
||||
&palmld_hdd,
|
||||
&palmld_flash,
|
||||
};
|
||||
|
||||
static struct map_desc palmld_io_desc[] __initdata = {
|
||||
|
|
|
@ -124,83 +124,12 @@ static unsigned long palmt5_pin_config[] __initdata = {
|
|||
/******************************************************************************
|
||||
* SD/MMC card controller
|
||||
******************************************************************************/
|
||||
static int palmt5_mci_init(struct device *dev, irq_handler_t palmt5_detect_int,
|
||||
void *data)
|
||||
{
|
||||
int err = 0;
|
||||
|
||||
/* Setup an interrupt for detecting card insert/remove events */
|
||||
err = gpio_request(GPIO_NR_PALMT5_SD_DETECT_N, "SD IRQ");
|
||||
if (err)
|
||||
goto err;
|
||||
err = gpio_direction_input(GPIO_NR_PALMT5_SD_DETECT_N);
|
||||
if (err)
|
||||
goto err2;
|
||||
err = request_irq(gpio_to_irq(GPIO_NR_PALMT5_SD_DETECT_N),
|
||||
palmt5_detect_int, IRQF_DISABLED | IRQF_SAMPLE_RANDOM |
|
||||
IRQF_TRIGGER_FALLING | IRQF_TRIGGER_RISING,
|
||||
"SD/MMC card detect", data);
|
||||
if (err) {
|
||||
printk(KERN_ERR "%s: cannot request SD/MMC card detect IRQ\n",
|
||||
__func__);
|
||||
goto err2;
|
||||
}
|
||||
|
||||
err = gpio_request(GPIO_NR_PALMT5_SD_POWER, "SD_POWER");
|
||||
if (err)
|
||||
goto err3;
|
||||
err = gpio_direction_output(GPIO_NR_PALMT5_SD_POWER, 0);
|
||||
if (err)
|
||||
goto err4;
|
||||
|
||||
err = gpio_request(GPIO_NR_PALMT5_SD_READONLY, "SD_READONLY");
|
||||
if (err)
|
||||
goto err4;
|
||||
err = gpio_direction_input(GPIO_NR_PALMT5_SD_READONLY);
|
||||
if (err)
|
||||
goto err5;
|
||||
|
||||
printk(KERN_DEBUG "%s: irq registered\n", __func__);
|
||||
|
||||
return 0;
|
||||
|
||||
err5:
|
||||
gpio_free(GPIO_NR_PALMT5_SD_READONLY);
|
||||
err4:
|
||||
gpio_free(GPIO_NR_PALMT5_SD_POWER);
|
||||
err3:
|
||||
free_irq(gpio_to_irq(GPIO_NR_PALMT5_SD_DETECT_N), data);
|
||||
err2:
|
||||
gpio_free(GPIO_NR_PALMT5_SD_DETECT_N);
|
||||
err:
|
||||
return err;
|
||||
}
|
||||
|
||||
static void palmt5_mci_exit(struct device *dev, void *data)
|
||||
{
|
||||
gpio_free(GPIO_NR_PALMT5_SD_READONLY);
|
||||
gpio_free(GPIO_NR_PALMT5_SD_POWER);
|
||||
free_irq(IRQ_GPIO_PALMT5_SD_DETECT_N, data);
|
||||
gpio_free(GPIO_NR_PALMT5_SD_DETECT_N);
|
||||
}
|
||||
|
||||
static void palmt5_mci_power(struct device *dev, unsigned int vdd)
|
||||
{
|
||||
struct pxamci_platform_data *p_d = dev->platform_data;
|
||||
gpio_set_value(GPIO_NR_PALMT5_SD_POWER, p_d->ocr_mask & (1 << vdd));
|
||||
}
|
||||
|
||||
static int palmt5_mci_get_ro(struct device *dev)
|
||||
{
|
||||
return gpio_get_value(GPIO_NR_PALMT5_SD_READONLY);
|
||||
}
|
||||
|
||||
static struct pxamci_platform_data palmt5_mci_platform_data = {
|
||||
.ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34,
|
||||
.setpower = palmt5_mci_power,
|
||||
.get_ro = palmt5_mci_get_ro,
|
||||
.init = palmt5_mci_init,
|
||||
.exit = palmt5_mci_exit,
|
||||
.ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34,
|
||||
.gpio_card_detect = GPIO_NR_PALMT5_SD_DETECT_N,
|
||||
.gpio_card_ro = GPIO_NR_PALMT5_SD_READONLY,
|
||||
.gpio_power = GPIO_NR_PALMT5_SD_POWER,
|
||||
.detect_delay = 20,
|
||||
};
|
||||
|
||||
/******************************************************************************
|
||||
|
@ -314,35 +243,9 @@ static struct platform_device palmt5_backlight = {
|
|||
/******************************************************************************
|
||||
* IrDA
|
||||
******************************************************************************/
|
||||
static int palmt5_irda_startup(struct device *dev)
|
||||
{
|
||||
int err;
|
||||
err = gpio_request(GPIO_NR_PALMT5_IR_DISABLE, "IR DISABLE");
|
||||
if (err)
|
||||
goto err;
|
||||
err = gpio_direction_output(GPIO_NR_PALMT5_IR_DISABLE, 1);
|
||||
if (err)
|
||||
gpio_free(GPIO_NR_PALMT5_IR_DISABLE);
|
||||
err:
|
||||
return err;
|
||||
}
|
||||
|
||||
static void palmt5_irda_shutdown(struct device *dev)
|
||||
{
|
||||
gpio_free(GPIO_NR_PALMT5_IR_DISABLE);
|
||||
}
|
||||
|
||||
static void palmt5_irda_transceiver_mode(struct device *dev, int mode)
|
||||
{
|
||||
gpio_set_value(GPIO_NR_PALMT5_IR_DISABLE, mode & IR_OFF);
|
||||
pxa2xx_transceiver_mode(dev, mode);
|
||||
}
|
||||
|
||||
static struct pxaficp_platform_data palmt5_ficp_platform_data = {
|
||||
.startup = palmt5_irda_startup,
|
||||
.shutdown = palmt5_irda_shutdown,
|
||||
.transceiver_cap = IR_SIRMODE | IR_FIRMODE | IR_OFF,
|
||||
.transceiver_mode = palmt5_irda_transceiver_mode,
|
||||
.gpio_pwdown = GPIO_NR_PALMT5_IR_DISABLE,
|
||||
.transceiver_cap = IR_SIRMODE | IR_OFF,
|
||||
};
|
||||
|
||||
/******************************************************************************
|
||||
|
|
436
arch/arm/mach-pxa/palmtc.c
Normal file
436
arch/arm/mach-pxa/palmtc.c
Normal file
|
@ -0,0 +1,436 @@
|
|||
/*
|
||||
* linux/arch/arm/mach-pxa/palmtc.c
|
||||
*
|
||||
* Support for the Palm Tungsten|C
|
||||
*
|
||||
* Author: Marek Vasut <marek.vasut@gmail.com>
|
||||
*
|
||||
* Based on work of:
|
||||
* Petr Blaha <p3t3@centrum.cz>
|
||||
* Chetan S. Kumar <shivakumar.chetan@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/delay.h>
|
||||
#include <linux/irq.h>
|
||||
#include <linux/input.h>
|
||||
#include <linux/pwm_backlight.h>
|
||||
#include <linux/gpio.h>
|
||||
#include <linux/input/matrix_keypad.h>
|
||||
#include <linux/ucb1400.h>
|
||||
#include <linux/power_supply.h>
|
||||
#include <linux/gpio_keys.h>
|
||||
#include <linux/mtd/physmap.h>
|
||||
|
||||
#include <asm/mach-types.h>
|
||||
#include <asm/mach/arch.h>
|
||||
#include <asm/mach/map.h>
|
||||
|
||||
#include <mach/audio.h>
|
||||
#include <mach/palmtc.h>
|
||||
#include <mach/mmc.h>
|
||||
#include <mach/pxafb.h>
|
||||
#include <mach/mfp-pxa25x.h>
|
||||
#include <mach/irda.h>
|
||||
#include <mach/udc.h>
|
||||
#include <mach/pxa2xx-regs.h>
|
||||
|
||||
#include "generic.h"
|
||||
#include "devices.h"
|
||||
|
||||
/******************************************************************************
|
||||
* Pin configuration
|
||||
******************************************************************************/
|
||||
static unsigned long palmtc_pin_config[] __initdata = {
|
||||
/* MMC */
|
||||
GPIO6_MMC_CLK,
|
||||
GPIO8_MMC_CS0,
|
||||
GPIO12_GPIO, /* detect */
|
||||
GPIO32_GPIO, /* power */
|
||||
GPIO54_GPIO, /* r/o switch */
|
||||
|
||||
/* PCMCIA */
|
||||
GPIO52_nPCE_1,
|
||||
GPIO53_nPCE_2,
|
||||
GPIO50_nPIOR,
|
||||
GPIO51_nPIOW,
|
||||
GPIO49_nPWE,
|
||||
GPIO48_nPOE,
|
||||
GPIO52_nPCE_1,
|
||||
GPIO53_nPCE_2,
|
||||
GPIO57_nIOIS16,
|
||||
GPIO56_nPWAIT,
|
||||
|
||||
/* AC97 */
|
||||
GPIO28_AC97_BITCLK,
|
||||
GPIO29_AC97_SDATA_IN_0,
|
||||
GPIO30_AC97_SDATA_OUT,
|
||||
GPIO31_AC97_SYNC,
|
||||
|
||||
/* IrDA */
|
||||
GPIO45_GPIO, /* ir disable */
|
||||
GPIO46_FICP_RXD,
|
||||
GPIO47_FICP_TXD,
|
||||
|
||||
/* PWM */
|
||||
GPIO17_PWM1_OUT,
|
||||
|
||||
/* USB */
|
||||
GPIO4_GPIO, /* detect */
|
||||
GPIO36_GPIO, /* pullup */
|
||||
|
||||
/* LCD */
|
||||
GPIO58_LCD_LDD_0,
|
||||
GPIO59_LCD_LDD_1,
|
||||
GPIO60_LCD_LDD_2,
|
||||
GPIO61_LCD_LDD_3,
|
||||
GPIO62_LCD_LDD_4,
|
||||
GPIO63_LCD_LDD_5,
|
||||
GPIO64_LCD_LDD_6,
|
||||
GPIO65_LCD_LDD_7,
|
||||
GPIO66_LCD_LDD_8,
|
||||
GPIO67_LCD_LDD_9,
|
||||
GPIO68_LCD_LDD_10,
|
||||
GPIO69_LCD_LDD_11,
|
||||
GPIO70_LCD_LDD_12,
|
||||
GPIO71_LCD_LDD_13,
|
||||
GPIO72_LCD_LDD_14,
|
||||
GPIO73_LCD_LDD_15,
|
||||
GPIO74_LCD_FCLK,
|
||||
GPIO75_LCD_LCLK,
|
||||
GPIO76_LCD_PCLK,
|
||||
GPIO77_LCD_BIAS,
|
||||
|
||||
/* MATRIX KEYPAD */
|
||||
GPIO0_GPIO | WAKEUP_ON_EDGE_BOTH, /* in 0 */
|
||||
GPIO9_GPIO | WAKEUP_ON_EDGE_BOTH, /* in 1 */
|
||||
GPIO10_GPIO | WAKEUP_ON_EDGE_BOTH, /* in 2 */
|
||||
GPIO11_GPIO | WAKEUP_ON_EDGE_BOTH, /* in 3 */
|
||||
GPIO18_GPIO | MFP_LPM_DRIVE_LOW, /* out 0 */
|
||||
GPIO19_GPIO | MFP_LPM_DRIVE_LOW, /* out 1 */
|
||||
GPIO20_GPIO | MFP_LPM_DRIVE_LOW, /* out 2 */
|
||||
GPIO21_GPIO | MFP_LPM_DRIVE_LOW, /* out 3 */
|
||||
GPIO22_GPIO | MFP_LPM_DRIVE_LOW, /* out 4 */
|
||||
GPIO23_GPIO | MFP_LPM_DRIVE_LOW, /* out 5 */
|
||||
GPIO24_GPIO | MFP_LPM_DRIVE_LOW, /* out 6 */
|
||||
GPIO25_GPIO | MFP_LPM_DRIVE_LOW, /* out 7 */
|
||||
GPIO26_GPIO | MFP_LPM_DRIVE_LOW, /* out 8 */
|
||||
GPIO27_GPIO | MFP_LPM_DRIVE_LOW, /* out 9 */
|
||||
GPIO79_GPIO | MFP_LPM_DRIVE_LOW, /* out 10 */
|
||||
GPIO80_GPIO | MFP_LPM_DRIVE_LOW, /* out 11 */
|
||||
|
||||
/* PXA GPIO KEYS */
|
||||
GPIO7_GPIO | WAKEUP_ON_EDGE_BOTH, /* hotsync button on cradle */
|
||||
|
||||
/* MISC */
|
||||
GPIO1_RST, /* reset */
|
||||
GPIO2_GPIO, /* earphone detect */
|
||||
GPIO16_GPIO, /* backlight switch */
|
||||
};
|
||||
|
||||
/******************************************************************************
|
||||
* SD/MMC card controller
|
||||
******************************************************************************/
|
||||
static struct pxamci_platform_data palmtc_mci_platform_data = {
|
||||
.ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34,
|
||||
.gpio_power = GPIO_NR_PALMTC_SD_POWER,
|
||||
.gpio_card_ro = GPIO_NR_PALMTC_SD_READONLY,
|
||||
.gpio_card_detect = GPIO_NR_PALMTC_SD_DETECT_N,
|
||||
.detect_delay = 20,
|
||||
};
|
||||
|
||||
/******************************************************************************
|
||||
* GPIO keys
|
||||
******************************************************************************/
|
||||
static struct gpio_keys_button palmtc_pxa_buttons[] = {
|
||||
{KEY_F8, GPIO_NR_PALMTC_HOTSYNC_BUTTON, 1, "HotSync Button", EV_KEY, 1},
|
||||
};
|
||||
|
||||
static struct gpio_keys_platform_data palmtc_pxa_keys_data = {
|
||||
.buttons = palmtc_pxa_buttons,
|
||||
.nbuttons = ARRAY_SIZE(palmtc_pxa_buttons),
|
||||
};
|
||||
|
||||
static struct platform_device palmtc_pxa_keys = {
|
||||
.name = "gpio-keys",
|
||||
.id = -1,
|
||||
.dev = {
|
||||
.platform_data = &palmtc_pxa_keys_data,
|
||||
},
|
||||
};
|
||||
|
||||
/******************************************************************************
|
||||
* Backlight
|
||||
******************************************************************************/
|
||||
static int palmtc_backlight_init(struct device *dev)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = gpio_request(GPIO_NR_PALMTC_BL_POWER, "BL POWER");
|
||||
if (ret)
|
||||
goto err;
|
||||
ret = gpio_direction_output(GPIO_NR_PALMTC_BL_POWER, 1);
|
||||
if (ret)
|
||||
goto err2;
|
||||
|
||||
return 0;
|
||||
|
||||
err2:
|
||||
gpio_free(GPIO_NR_PALMTC_BL_POWER);
|
||||
err:
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int palmtc_backlight_notify(int brightness)
|
||||
{
|
||||
/* backlight is on when GPIO16 AF0 is high */
|
||||
gpio_set_value(GPIO_NR_PALMTC_BL_POWER, brightness);
|
||||
return brightness;
|
||||
}
|
||||
|
||||
static void palmtc_backlight_exit(struct device *dev)
|
||||
{
|
||||
gpio_free(GPIO_NR_PALMTC_BL_POWER);
|
||||
}
|
||||
|
||||
static struct platform_pwm_backlight_data palmtc_backlight_data = {
|
||||
.pwm_id = 1,
|
||||
.max_brightness = PALMTC_MAX_INTENSITY,
|
||||
.dft_brightness = PALMTC_MAX_INTENSITY,
|
||||
.pwm_period_ns = PALMTC_PERIOD_NS,
|
||||
.init = palmtc_backlight_init,
|
||||
.notify = palmtc_backlight_notify,
|
||||
.exit = palmtc_backlight_exit,
|
||||
};
|
||||
|
||||
static struct platform_device palmtc_backlight = {
|
||||
.name = "pwm-backlight",
|
||||
.dev = {
|
||||
.parent = &pxa25x_device_pwm1.dev,
|
||||
.platform_data = &palmtc_backlight_data,
|
||||
},
|
||||
};
|
||||
|
||||
/******************************************************************************
|
||||
* IrDA
|
||||
******************************************************************************/
|
||||
static struct pxaficp_platform_data palmtc_ficp_platform_data = {
|
||||
.gpio_pwdown = GPIO_NR_PALMTC_IR_DISABLE,
|
||||
.transceiver_cap = IR_SIRMODE | IR_OFF,
|
||||
};
|
||||
|
||||
/******************************************************************************
|
||||
* Keyboard
|
||||
******************************************************************************/
|
||||
static const uint32_t palmtc_matrix_keys[] = {
|
||||
KEY(0, 0, KEY_F1),
|
||||
KEY(0, 1, KEY_X),
|
||||
KEY(0, 2, KEY_POWER),
|
||||
KEY(0, 3, KEY_TAB),
|
||||
KEY(0, 4, KEY_A),
|
||||
KEY(0, 5, KEY_Q),
|
||||
KEY(0, 6, KEY_LEFTSHIFT),
|
||||
KEY(0, 7, KEY_Z),
|
||||
KEY(0, 8, KEY_S),
|
||||
KEY(0, 9, KEY_W),
|
||||
KEY(0, 10, KEY_E),
|
||||
KEY(0, 11, KEY_UP),
|
||||
|
||||
KEY(1, 0, KEY_F2),
|
||||
KEY(1, 1, KEY_DOWN),
|
||||
KEY(1, 3, KEY_D),
|
||||
KEY(1, 4, KEY_C),
|
||||
KEY(1, 5, KEY_F),
|
||||
KEY(1, 6, KEY_R),
|
||||
KEY(1, 7, KEY_SPACE),
|
||||
KEY(1, 8, KEY_V),
|
||||
KEY(1, 9, KEY_G),
|
||||
KEY(1, 10, KEY_T),
|
||||
KEY(1, 11, KEY_LEFT),
|
||||
|
||||
KEY(2, 0, KEY_F3),
|
||||
KEY(2, 1, KEY_LEFTCTRL),
|
||||
KEY(2, 3, KEY_H),
|
||||
KEY(2, 4, KEY_Y),
|
||||
KEY(2, 5, KEY_N),
|
||||
KEY(2, 6, KEY_J),
|
||||
KEY(2, 7, KEY_U),
|
||||
KEY(2, 8, KEY_M),
|
||||
KEY(2, 9, KEY_K),
|
||||
KEY(2, 10, KEY_I),
|
||||
KEY(2, 11, KEY_RIGHT),
|
||||
|
||||
KEY(3, 0, KEY_F4),
|
||||
KEY(3, 1, KEY_ENTER),
|
||||
KEY(3, 3, KEY_DOT),
|
||||
KEY(3, 4, KEY_L),
|
||||
KEY(3, 5, KEY_O),
|
||||
KEY(3, 6, KEY_LEFTALT),
|
||||
KEY(3, 7, KEY_ENTER),
|
||||
KEY(3, 8, KEY_BACKSPACE),
|
||||
KEY(3, 9, KEY_P),
|
||||
KEY(3, 10, KEY_B),
|
||||
KEY(3, 11, KEY_FN),
|
||||
};
|
||||
|
||||
const struct matrix_keymap_data palmtc_keymap_data = {
|
||||
.keymap = palmtc_matrix_keys,
|
||||
.keymap_size = ARRAY_SIZE(palmtc_matrix_keys),
|
||||
};
|
||||
|
||||
const static unsigned int palmtc_keypad_row_gpios[] = {
|
||||
0, 9, 10, 11
|
||||
};
|
||||
|
||||
const static unsigned int palmtc_keypad_col_gpios[] = {
|
||||
18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 79, 80
|
||||
};
|
||||
|
||||
static struct matrix_keypad_platform_data palmtc_keypad_platform_data = {
|
||||
.keymap_data = &palmtc_keymap_data,
|
||||
.col_gpios = palmtc_keypad_row_gpios,
|
||||
.num_col_gpios = 12,
|
||||
.row_gpios = palmtc_keypad_col_gpios,
|
||||
.num_row_gpios = 4,
|
||||
.active_low = 1,
|
||||
|
||||
.debounce_ms = 20,
|
||||
.col_scan_delay_us = 5,
|
||||
};
|
||||
|
||||
static struct platform_device palmtc_keyboard = {
|
||||
.name = "matrix-keypad",
|
||||
.id = -1,
|
||||
.dev = {
|
||||
.platform_data = &palmtc_keypad_platform_data,
|
||||
},
|
||||
};
|
||||
|
||||
/******************************************************************************
|
||||
* UDC
|
||||
******************************************************************************/
|
||||
static struct pxa2xx_udc_mach_info palmtc_udc_info __initdata = {
|
||||
.gpio_vbus = GPIO_NR_PALMTC_USB_DETECT_N,
|
||||
.gpio_vbus_inverted = 1,
|
||||
.gpio_pullup = GPIO_NR_PALMTC_USB_POWER,
|
||||
};
|
||||
|
||||
/******************************************************************************
|
||||
* Touchscreen / Battery / GPIO-extender
|
||||
******************************************************************************/
|
||||
static struct platform_device palmtc_ucb1400_core = {
|
||||
.name = "ucb1400_core",
|
||||
.id = -1,
|
||||
};
|
||||
|
||||
/******************************************************************************
|
||||
* NOR Flash
|
||||
******************************************************************************/
|
||||
static struct resource palmtc_flash_resource = {
|
||||
.start = PXA_CS0_PHYS,
|
||||
.end = PXA_CS0_PHYS + SZ_16M - 1,
|
||||
.flags = IORESOURCE_MEM,
|
||||
};
|
||||
|
||||
static struct mtd_partition palmtc_flash_parts[] = {
|
||||
{
|
||||
.name = "U-Boot Bootloader",
|
||||
.offset = 0x0,
|
||||
.size = 0x40000,
|
||||
},
|
||||
{
|
||||
.name = "Linux Kernel",
|
||||
.offset = 0x40000,
|
||||
.size = 0x2c0000,
|
||||
},
|
||||
{
|
||||
.name = "Filesystem",
|
||||
.offset = 0x300000,
|
||||
.size = 0xcc0000,
|
||||
},
|
||||
{
|
||||
.name = "U-Boot Environment",
|
||||
.offset = 0xfc0000,
|
||||
.size = MTDPART_SIZ_FULL,
|
||||
},
|
||||
};
|
||||
|
||||
static struct physmap_flash_data palmtc_flash_data = {
|
||||
.width = 4,
|
||||
.parts = palmtc_flash_parts,
|
||||
.nr_parts = ARRAY_SIZE(palmtc_flash_parts),
|
||||
};
|
||||
|
||||
static struct platform_device palmtc_flash = {
|
||||
.name = "physmap-flash",
|
||||
.id = -1,
|
||||
.resource = &palmtc_flash_resource,
|
||||
.num_resources = 1,
|
||||
.dev = {
|
||||
.platform_data = &palmtc_flash_data,
|
||||
},
|
||||
};
|
||||
|
||||
/******************************************************************************
|
||||
* Framebuffer
|
||||
******************************************************************************/
|
||||
static struct pxafb_mode_info palmtc_lcd_modes[] = {
|
||||
{
|
||||
.pixclock = 115384,
|
||||
.xres = 320,
|
||||
.yres = 320,
|
||||
.bpp = 16,
|
||||
|
||||
.left_margin = 27,
|
||||
.right_margin = 7,
|
||||
.upper_margin = 7,
|
||||
.lower_margin = 8,
|
||||
|
||||
.hsync_len = 6,
|
||||
.vsync_len = 1,
|
||||
},
|
||||
};
|
||||
|
||||
static struct pxafb_mach_info palmtc_lcd_screen = {
|
||||
.modes = palmtc_lcd_modes,
|
||||
.num_modes = ARRAY_SIZE(palmtc_lcd_modes),
|
||||
.lcd_conn = LCD_COLOR_TFT_16BPP | LCD_PCLK_EDGE_FALL,
|
||||
};
|
||||
|
||||
/******************************************************************************
|
||||
* Machine init
|
||||
******************************************************************************/
|
||||
static struct platform_device *devices[] __initdata = {
|
||||
&palmtc_backlight,
|
||||
&palmtc_ucb1400_core,
|
||||
&palmtc_keyboard,
|
||||
&palmtc_pxa_keys,
|
||||
&palmtc_flash,
|
||||
};
|
||||
|
||||
static void __init palmtc_init(void)
|
||||
{
|
||||
pxa2xx_mfp_config(ARRAY_AND_SIZE(palmtc_pin_config));
|
||||
|
||||
set_pxa_fb_info(&palmtc_lcd_screen);
|
||||
pxa_set_mci_info(&palmtc_mci_platform_data);
|
||||
pxa_set_udc_info(&palmtc_udc_info);
|
||||
pxa_set_ac97_info(NULL);
|
||||
pxa_set_ficp_info(&palmtc_ficp_platform_data);
|
||||
|
||||
platform_add_devices(devices, ARRAY_SIZE(devices));
|
||||
};
|
||||
|
||||
MACHINE_START(PALMTC, "Palm Tungsten|C")
|
||||
.phys_io = 0x40000000,
|
||||
.boot_params = 0xa0000100,
|
||||
.io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc,
|
||||
.map_io = pxa_map_io,
|
||||
.init_irq = pxa25x_init_irq,
|
||||
.timer = &pxa_timer,
|
||||
.init_machine = palmtc_init
|
||||
MACHINE_END
|
|
@ -117,83 +117,11 @@ static unsigned long palmte2_pin_config[] __initdata = {
|
|||
/******************************************************************************
|
||||
* SD/MMC card controller
|
||||
******************************************************************************/
|
||||
static int palmte2_mci_init(struct device *dev,
|
||||
irq_handler_t palmte2_detect_int, void *data)
|
||||
{
|
||||
int err = 0;
|
||||
|
||||
/* Setup an interrupt for detecting card insert/remove events */
|
||||
err = gpio_request(GPIO_NR_PALMTE2_SD_DETECT_N, "SD IRQ");
|
||||
if (err)
|
||||
goto err;
|
||||
err = gpio_direction_input(GPIO_NR_PALMTE2_SD_DETECT_N);
|
||||
if (err)
|
||||
goto err2;
|
||||
err = request_irq(gpio_to_irq(GPIO_NR_PALMTE2_SD_DETECT_N),
|
||||
palmte2_detect_int, IRQF_DISABLED | IRQF_SAMPLE_RANDOM |
|
||||
IRQF_TRIGGER_FALLING | IRQF_TRIGGER_RISING,
|
||||
"SD/MMC card detect", data);
|
||||
if (err) {
|
||||
printk(KERN_ERR "%s: cannot request SD/MMC card detect IRQ\n",
|
||||
__func__);
|
||||
goto err2;
|
||||
}
|
||||
|
||||
err = gpio_request(GPIO_NR_PALMTE2_SD_POWER, "SD_POWER");
|
||||
if (err)
|
||||
goto err3;
|
||||
err = gpio_direction_output(GPIO_NR_PALMTE2_SD_POWER, 0);
|
||||
if (err)
|
||||
goto err4;
|
||||
|
||||
err = gpio_request(GPIO_NR_PALMTE2_SD_READONLY, "SD_READONLY");
|
||||
if (err)
|
||||
goto err4;
|
||||
err = gpio_direction_input(GPIO_NR_PALMTE2_SD_READONLY);
|
||||
if (err)
|
||||
goto err5;
|
||||
|
||||
printk(KERN_DEBUG "%s: irq registered\n", __func__);
|
||||
|
||||
return 0;
|
||||
|
||||
err5:
|
||||
gpio_free(GPIO_NR_PALMTE2_SD_READONLY);
|
||||
err4:
|
||||
gpio_free(GPIO_NR_PALMTE2_SD_POWER);
|
||||
err3:
|
||||
free_irq(gpio_to_irq(GPIO_NR_PALMTE2_SD_DETECT_N), data);
|
||||
err2:
|
||||
gpio_free(GPIO_NR_PALMTE2_SD_DETECT_N);
|
||||
err:
|
||||
return err;
|
||||
}
|
||||
|
||||
static void palmte2_mci_exit(struct device *dev, void *data)
|
||||
{
|
||||
gpio_free(GPIO_NR_PALMTE2_SD_READONLY);
|
||||
gpio_free(GPIO_NR_PALMTE2_SD_POWER);
|
||||
free_irq(gpio_to_irq(GPIO_NR_PALMTE2_SD_DETECT_N), data);
|
||||
gpio_free(GPIO_NR_PALMTE2_SD_DETECT_N);
|
||||
}
|
||||
|
||||
static void palmte2_mci_power(struct device *dev, unsigned int vdd)
|
||||
{
|
||||
struct pxamci_platform_data *p_d = dev->platform_data;
|
||||
gpio_set_value(GPIO_NR_PALMTE2_SD_POWER, p_d->ocr_mask & (1 << vdd));
|
||||
}
|
||||
|
||||
static int palmte2_mci_get_ro(struct device *dev)
|
||||
{
|
||||
return gpio_get_value(GPIO_NR_PALMTE2_SD_READONLY);
|
||||
}
|
||||
|
||||
static struct pxamci_platform_data palmte2_mci_platform_data = {
|
||||
.ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34,
|
||||
.setpower = palmte2_mci_power,
|
||||
.get_ro = palmte2_mci_get_ro,
|
||||
.init = palmte2_mci_init,
|
||||
.exit = palmte2_mci_exit,
|
||||
.ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34,
|
||||
.gpio_card_detect = GPIO_NR_PALMTE2_SD_DETECT_N,
|
||||
.gpio_card_ro = GPIO_NR_PALMTE2_SD_READONLY,
|
||||
.gpio_power = GPIO_NR_PALMTE2_SD_POWER,
|
||||
};
|
||||
|
||||
/******************************************************************************
|
||||
|
@ -287,35 +215,9 @@ static struct platform_device palmte2_backlight = {
|
|||
/******************************************************************************
|
||||
* IrDA
|
||||
******************************************************************************/
|
||||
static int palmte2_irda_startup(struct device *dev)
|
||||
{
|
||||
int err;
|
||||
err = gpio_request(GPIO_NR_PALMTE2_IR_DISABLE, "IR DISABLE");
|
||||
if (err)
|
||||
goto err;
|
||||
err = gpio_direction_output(GPIO_NR_PALMTE2_IR_DISABLE, 1);
|
||||
if (err)
|
||||
gpio_free(GPIO_NR_PALMTE2_IR_DISABLE);
|
||||
err:
|
||||
return err;
|
||||
}
|
||||
|
||||
static void palmte2_irda_shutdown(struct device *dev)
|
||||
{
|
||||
gpio_free(GPIO_NR_PALMTE2_IR_DISABLE);
|
||||
}
|
||||
|
||||
static void palmte2_irda_transceiver_mode(struct device *dev, int mode)
|
||||
{
|
||||
gpio_set_value(GPIO_NR_PALMTE2_IR_DISABLE, mode & IR_OFF);
|
||||
pxa2xx_transceiver_mode(dev, mode);
|
||||
}
|
||||
|
||||
static struct pxaficp_platform_data palmte2_ficp_platform_data = {
|
||||
.startup = palmte2_irda_startup,
|
||||
.shutdown = palmte2_irda_shutdown,
|
||||
.transceiver_cap = IR_SIRMODE | IR_FIRMODE | IR_OFF,
|
||||
.transceiver_mode = palmte2_irda_transceiver_mode,
|
||||
.gpio_pwdown = GPIO_NR_PALMTE2_IR_DISABLE,
|
||||
.transceiver_cap = IR_SIRMODE | IR_OFF,
|
||||
};
|
||||
|
||||
/******************************************************************************
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue