Merge with /pub/scm/linux/kernel/git/torvalds/linux-2.6.git
This commit is contained in:
commit
53b2ec5518
3100 changed files with 172114 additions and 82143 deletions
6
CREDITS
6
CREDITS
|
@ -2247,6 +2247,12 @@ S: 249 Nichols Avenue
|
|||
S: Syracuse, New York 13206
|
||||
S: USA
|
||||
|
||||
N: Kyle McMartin
|
||||
E: kyle@parisc-linux.org
|
||||
D: Linux/PARISC hacker
|
||||
D: AD1889 sound driver
|
||||
S: Ottawa, Canada
|
||||
|
||||
N: Dirk Melchers
|
||||
E: dirk@merlin.nbg.sub.org
|
||||
D: 8 bit XT hard disk driver for OMTI5520
|
||||
|
|
|
@ -65,7 +65,7 @@ o isdn4k-utils 3.1pre1 # isdnctrl 2>&1|grep version
|
|||
o nfs-utils 1.0.5 # showmount --version
|
||||
o procps 3.2.0 # ps --version
|
||||
o oprofile 0.9 # oprofiled --version
|
||||
o udev 058 # udevinfo -V
|
||||
o udev 071 # udevinfo -V
|
||||
|
||||
Kernel compilation
|
||||
==================
|
||||
|
|
|
@ -286,7 +286,9 @@ X!Edrivers/pci/search.c
|
|||
-->
|
||||
!Edrivers/pci/msi.c
|
||||
!Edrivers/pci/bus.c
|
||||
!Edrivers/pci/hotplug.c
|
||||
<!-- FIXME: Removed for now since no structured comments in source
|
||||
X!Edrivers/pci/hotplug.c
|
||||
-->
|
||||
!Edrivers/pci/probe.c
|
||||
!Edrivers/pci/rom.c
|
||||
</sect1>
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -291,7 +291,7 @@
|
|||
|
||||
!Edrivers/usb/core/hcd.c
|
||||
!Edrivers/usb/core/hcd-pci.c
|
||||
!Edrivers/usb/core/buffer.c
|
||||
!Idrivers/usb/core/buffer.c
|
||||
</chapter>
|
||||
|
||||
<chapter>
|
||||
|
|
|
@ -345,8 +345,7 @@ if (!retval) {
|
|||
<programlisting>
|
||||
static inline void skel_delete (struct usb_skel *dev)
|
||||
{
|
||||
if (dev->bulk_in_buffer != NULL)
|
||||
kfree (dev->bulk_in_buffer);
|
||||
kfree (dev->bulk_in_buffer);
|
||||
if (dev->bulk_out_buffer != NULL)
|
||||
usb_buffer_free (dev->udev, dev->bulk_out_size,
|
||||
dev->bulk_out_buffer,
|
||||
|
|
122
Documentation/RCU/torture.txt
Normal file
122
Documentation/RCU/torture.txt
Normal file
|
@ -0,0 +1,122 @@
|
|||
RCU Torture Test Operation
|
||||
|
||||
|
||||
CONFIG_RCU_TORTURE_TEST
|
||||
|
||||
The CONFIG_RCU_TORTURE_TEST config option is available for all RCU
|
||||
implementations. It creates an rcutorture kernel module that can
|
||||
be loaded to run a torture test. The test periodically outputs
|
||||
status messages via printk(), which can be examined via the dmesg
|
||||
command (perhaps grepping for "rcutorture"). The test is started
|
||||
when the module is loaded, and stops when the module is unloaded.
|
||||
|
||||
However, actually setting this config option to "y" results in the system
|
||||
running the test immediately upon boot, and ending only when the system
|
||||
is taken down. Normally, one will instead want to build the system
|
||||
with CONFIG_RCU_TORTURE_TEST=m and to use modprobe and rmmod to control
|
||||
the test, perhaps using a script similar to the one shown at the end of
|
||||
this document. Note that you will need CONFIG_MODULE_UNLOAD in order
|
||||
to be able to end the test.
|
||||
|
||||
|
||||
MODULE PARAMETERS
|
||||
|
||||
This module has the following parameters:
|
||||
|
||||
nreaders This is the number of RCU reading threads supported.
|
||||
The default is twice the number of CPUs. Why twice?
|
||||
To properly exercise RCU implementations with preemptible
|
||||
read-side critical sections.
|
||||
|
||||
stat_interval The number of seconds between output of torture
|
||||
statistics (via printk()). Regardless of the interval,
|
||||
statistics are printed when the module is unloaded.
|
||||
Setting the interval to zero causes the statistics to
|
||||
be printed -only- when the module is unloaded, and this
|
||||
is the default.
|
||||
|
||||
verbose Enable debug printk()s. Default is disabled.
|
||||
|
||||
|
||||
OUTPUT
|
||||
|
||||
The statistics output is as follows:
|
||||
|
||||
rcutorture: --- Start of test: nreaders=16 stat_interval=0 verbose=0
|
||||
rcutorture: rtc: 0000000000000000 ver: 1916 tfle: 0 rta: 1916 rtaf: 0 rtf: 1915
|
||||
rcutorture: Reader Pipe: 1466408 9747 0 0 0 0 0 0 0 0 0
|
||||
rcutorture: Reader Batch: 1464477 11678 0 0 0 0 0 0 0 0
|
||||
rcutorture: Free-Block Circulation: 1915 1915 1915 1915 1915 1915 1915 1915 1915 1915 0
|
||||
rcutorture: --- End of test
|
||||
|
||||
The command "dmesg | grep rcutorture:" will extract this information on
|
||||
most systems. On more esoteric configurations, it may be necessary to
|
||||
use other commands to access the output of the printk()s used by
|
||||
the RCU torture test. The printk()s use KERN_ALERT, so they should
|
||||
be evident. ;-)
|
||||
|
||||
The entries are as follows:
|
||||
|
||||
o "ggp": The number of counter flips (or batches) since boot.
|
||||
|
||||
o "rtc": The hexadecimal address of the structure currently visible
|
||||
to readers.
|
||||
|
||||
o "ver": The number of times since boot that the rcutw writer task
|
||||
has changed the structure visible to readers.
|
||||
|
||||
o "tfle": If non-zero, indicates that the "torture freelist"
|
||||
containing structure to be placed into the "rtc" area is empty.
|
||||
This condition is important, since it can fool you into thinking
|
||||
that RCU is working when it is not. :-/
|
||||
|
||||
o "rta": Number of structures allocated from the torture freelist.
|
||||
|
||||
o "rtaf": Number of allocations from the torture freelist that have
|
||||
failed due to the list being empty.
|
||||
|
||||
o "rtf": Number of frees into the torture freelist.
|
||||
|
||||
o "Reader Pipe": Histogram of "ages" of structures seen by readers.
|
||||
If any entries past the first two are non-zero, RCU is broken.
|
||||
And rcutorture prints the error flag string "!!!" to make sure
|
||||
you notice. The age of a newly allocated structure is zero,
|
||||
it becomes one when removed from reader visibility, and is
|
||||
incremented once per grace period subsequently -- and is freed
|
||||
after passing through (RCU_TORTURE_PIPE_LEN-2) grace periods.
|
||||
|
||||
The output displayed above was taken from a correctly working
|
||||
RCU. If you want to see what it looks like when broken, break
|
||||
it yourself. ;-)
|
||||
|
||||
o "Reader Batch": Another histogram of "ages" of structures seen
|
||||
by readers, but in terms of counter flips (or batches) rather
|
||||
than in terms of grace periods. The legal number of non-zero
|
||||
entries is again two. The reason for this separate view is
|
||||
that it is easier to get the third entry to show up in the
|
||||
"Reader Batch" list than in the "Reader Pipe" list.
|
||||
|
||||
o "Free-Block Circulation": Shows the number of torture structures
|
||||
that have reached a given point in the pipeline. The first element
|
||||
should closely correspond to the number of structures allocated,
|
||||
the second to the number that have been removed from reader view,
|
||||
and all but the last remaining to the corresponding number of
|
||||
passes through a grace period. The last entry should be zero,
|
||||
as it is only incremented if a torture structure's counter
|
||||
somehow gets incremented farther than it should.
|
||||
|
||||
|
||||
USAGE
|
||||
|
||||
The following script may be used to torture RCU:
|
||||
|
||||
#!/bin/sh
|
||||
|
||||
modprobe rcutorture
|
||||
sleep 100
|
||||
rmmod rcutorture
|
||||
dmesg | grep rcutorture:
|
||||
|
||||
The output can be manually inspected for the error flag of "!!!".
|
||||
One could of course create a more elaborate script that automatically
|
||||
checked for such errors.
|
|
@ -906,9 +906,20 @@ Aside:
|
|||
|
||||
|
||||
4. The I/O scheduler
|
||||
I/O schedulers are now per queue. They should be runtime switchable and modular
|
||||
but aren't yet. Jens has most bits to do this, but the sysfs implementation is
|
||||
missing.
|
||||
I/O scheduler, a.k.a. elevator, is implemented in two layers. Generic dispatch
|
||||
queue and specific I/O schedulers. Unless stated otherwise, elevator is used
|
||||
to refer to both parts and I/O scheduler to specific I/O schedulers.
|
||||
|
||||
Block layer implements generic dispatch queue in ll_rw_blk.c and elevator.c.
|
||||
The generic dispatch queue is responsible for properly ordering barrier
|
||||
requests, requeueing, handling non-fs requests and all other subtleties.
|
||||
|
||||
Specific I/O schedulers are responsible for ordering normal filesystem
|
||||
requests. They can also choose to delay certain requests to improve
|
||||
throughput or whatever purpose. As the plural form indicates, there are
|
||||
multiple I/O schedulers. They can be built as modules but at least one should
|
||||
be built inside the kernel. Each queue can choose different one and can also
|
||||
change to another one dynamically.
|
||||
|
||||
A block layer call to the i/o scheduler follows the convention elv_xxx(). This
|
||||
calls elevator_xxx_fn in the elevator switch (drivers/block/elevator.c). Oh,
|
||||
|
@ -921,44 +932,36 @@ keeping work.
|
|||
The functions an elevator may implement are: (* are mandatory)
|
||||
elevator_merge_fn called to query requests for merge with a bio
|
||||
|
||||
elevator_merge_req_fn " " " with another request
|
||||
elevator_merge_req_fn called when two requests get merged. the one
|
||||
which gets merged into the other one will be
|
||||
never seen by I/O scheduler again. IOW, after
|
||||
being merged, the request is gone.
|
||||
|
||||
elevator_merged_fn called when a request in the scheduler has been
|
||||
involved in a merge. It is used in the deadline
|
||||
scheduler for example, to reposition the request
|
||||
if its sorting order has changed.
|
||||
|
||||
*elevator_next_req_fn returns the next scheduled request, or NULL
|
||||
if there are none (or none are ready).
|
||||
elevator_dispatch_fn fills the dispatch queue with ready requests.
|
||||
I/O schedulers are free to postpone requests by
|
||||
not filling the dispatch queue unless @force
|
||||
is non-zero. Once dispatched, I/O schedulers
|
||||
are not allowed to manipulate the requests -
|
||||
they belong to generic dispatch queue.
|
||||
|
||||
*elevator_add_req_fn called to add a new request into the scheduler
|
||||
elevator_add_req_fn called to add a new request into the scheduler
|
||||
|
||||
elevator_queue_empty_fn returns true if the merge queue is empty.
|
||||
Drivers shouldn't use this, but rather check
|
||||
if elv_next_request is NULL (without losing the
|
||||
request if one exists!)
|
||||
|
||||
elevator_remove_req_fn This is called when a driver claims ownership of
|
||||
the target request - it now belongs to the
|
||||
driver. It must not be modified or merged.
|
||||
Drivers must not lose the request! A subsequent
|
||||
call of elevator_next_req_fn must return the
|
||||
_next_ request.
|
||||
|
||||
elevator_requeue_req_fn called to add a request to the scheduler. This
|
||||
is used when the request has alrnadebeen
|
||||
returned by elv_next_request, but hasn't
|
||||
completed. If this is not implemented then
|
||||
elevator_add_req_fn is called instead.
|
||||
|
||||
elevator_former_req_fn
|
||||
elevator_latter_req_fn These return the request before or after the
|
||||
one specified in disk sort order. Used by the
|
||||
block layer to find merge possibilities.
|
||||
|
||||
elevator_completed_req_fn called when a request is completed. This might
|
||||
come about due to being merged with another or
|
||||
when the device completes the request.
|
||||
elevator_completed_req_fn called when a request is completed.
|
||||
|
||||
elevator_may_queue_fn returns true if the scheduler wants to allow the
|
||||
current context to queue a new request even if
|
||||
|
@ -967,13 +970,33 @@ elevator_may_queue_fn returns true if the scheduler wants to allow the
|
|||
|
||||
elevator_set_req_fn
|
||||
elevator_put_req_fn Must be used to allocate and free any elevator
|
||||
specific storate for a request.
|
||||
specific storage for a request.
|
||||
|
||||
elevator_activate_req_fn Called when device driver first sees a request.
|
||||
I/O schedulers can use this callback to
|
||||
determine when actual execution of a request
|
||||
starts.
|
||||
elevator_deactivate_req_fn Called when device driver decides to delay
|
||||
a request by requeueing it.
|
||||
|
||||
elevator_init_fn
|
||||
elevator_exit_fn Allocate and free any elevator specific storage
|
||||
for a queue.
|
||||
|
||||
4.2 I/O scheduler implementation
|
||||
4.2 Request flows seen by I/O schedulers
|
||||
All requests seens by I/O schedulers strictly follow one of the following three
|
||||
flows.
|
||||
|
||||
set_req_fn ->
|
||||
|
||||
i. add_req_fn -> (merged_fn ->)* -> dispatch_fn -> activate_req_fn ->
|
||||
(deactivate_req_fn -> activate_req_fn ->)* -> completed_req_fn
|
||||
ii. add_req_fn -> (merged_fn ->)* -> merge_req_fn
|
||||
iii. [none]
|
||||
|
||||
-> put_req_fn
|
||||
|
||||
4.3 I/O scheduler implementation
|
||||
The generic i/o scheduler algorithm attempts to sort/merge/batch requests for
|
||||
optimal disk scan and request servicing performance (based on generic
|
||||
principles and device capabilities), optimized for:
|
||||
|
@ -993,18 +1016,7 @@ request in sort order to prevent binary tree lookups.
|
|||
This arrangement is not a generic block layer characteristic however, so
|
||||
elevators may implement queues as they please.
|
||||
|
||||
ii. Last merge hint
|
||||
The last merge hint is part of the generic queue layer. I/O schedulers must do
|
||||
some management on it. For the most part, the most important thing is to make
|
||||
sure q->last_merge is cleared (set to NULL) when the request on it is no longer
|
||||
a candidate for merging (for example if it has been sent to the driver).
|
||||
|
||||
The last merge performed is cached as a hint for the subsequent request. If
|
||||
sequential data is being submitted, the hint is used to perform merges without
|
||||
any scanning. This is not sufficient when there are multiple processes doing
|
||||
I/O though, so a "merge hash" is used by some schedulers.
|
||||
|
||||
iii. Merge hash
|
||||
ii. Merge hash
|
||||
AS and deadline use a hash table indexed by the last sector of a request. This
|
||||
enables merging code to quickly look up "back merge" candidates, even when
|
||||
multiple I/O streams are being performed at once on one disk.
|
||||
|
@ -1013,29 +1025,8 @@ multiple I/O streams are being performed at once on one disk.
|
|||
are far less common than "back merges" due to the nature of most I/O patterns.
|
||||
Front merges are handled by the binary trees in AS and deadline schedulers.
|
||||
|
||||
iv. Handling barrier cases
|
||||
A request with flags REQ_HARDBARRIER or REQ_SOFTBARRIER must not be ordered
|
||||
around. That is, they must be processed after all older requests, and before
|
||||
any newer ones. This includes merges!
|
||||
|
||||
In AS and deadline schedulers, barriers have the effect of flushing the reorder
|
||||
queue. The performance cost of this will vary from nothing to a lot depending
|
||||
on i/o patterns and device characteristics. Obviously they won't improve
|
||||
performance, so their use should be kept to a minimum.
|
||||
|
||||
v. Handling insertion position directives
|
||||
A request may be inserted with a position directive. The directives are one of
|
||||
ELEVATOR_INSERT_BACK, ELEVATOR_INSERT_FRONT, ELEVATOR_INSERT_SORT.
|
||||
|
||||
ELEVATOR_INSERT_SORT is a general directive for non-barrier requests.
|
||||
ELEVATOR_INSERT_BACK is used to insert a barrier to the back of the queue.
|
||||
ELEVATOR_INSERT_FRONT is used to insert a barrier to the front of the queue, and
|
||||
overrides the ordering requested by any previous barriers. In practice this is
|
||||
harmless and required, because it is used for SCSI requeueing. This does not
|
||||
require flushing the reorder queue, so does not impose a performance penalty.
|
||||
|
||||
vi. Plugging the queue to batch requests in anticipation of opportunities for
|
||||
merge/sort optimizations
|
||||
iii. Plugging the queue to batch requests in anticipation of opportunities for
|
||||
merge/sort optimizations
|
||||
|
||||
This is just the same as in 2.4 so far, though per-device unplugging
|
||||
support is anticipated for 2.5. Also with a priority-based i/o scheduler,
|
||||
|
@ -1069,7 +1060,7 @@ Aside:
|
|||
blk_kick_queue() to unplug a specific queue (right away ?)
|
||||
or optionally, all queues, is in the plan.
|
||||
|
||||
4.3 I/O contexts
|
||||
4.4 I/O contexts
|
||||
I/O contexts provide a dynamically allocated per process data area. They may
|
||||
be used in I/O schedulers, and in the block layer (could be used for IO statis,
|
||||
priorities for example). See *io_context in drivers/block/ll_rw_blk.c, and
|
||||
|
|
|
@ -49,9 +49,6 @@ changes occur:
|
|||
page table operations such as what happens during
|
||||
fork, and exec.
|
||||
|
||||
Platform developers note that generic code will always
|
||||
invoke this interface without mm->page_table_lock held.
|
||||
|
||||
3) void flush_tlb_range(struct vm_area_struct *vma,
|
||||
unsigned long start, unsigned long end)
|
||||
|
||||
|
@ -72,9 +69,6 @@ changes occur:
|
|||
call flush_tlb_page (see below) for each entry which may be
|
||||
modified.
|
||||
|
||||
Platform developers note that generic code will always
|
||||
invoke this interface with mm->page_table_lock held.
|
||||
|
||||
4) void flush_tlb_page(struct vm_area_struct *vma, unsigned long addr)
|
||||
|
||||
This time we need to remove the PAGE_SIZE sized translation
|
||||
|
@ -93,9 +87,6 @@ changes occur:
|
|||
|
||||
This is used primarily during fault processing.
|
||||
|
||||
Platform developers note that generic code will always
|
||||
invoke this interface with mm->page_table_lock held.
|
||||
|
||||
5) void flush_tlb_pgtables(struct mm_struct *mm,
|
||||
unsigned long start, unsigned long end)
|
||||
|
||||
|
|
|
@ -94,7 +94,7 @@ the available CPU and Memory resources amongst the requesting tasks.
|
|||
But larger systems, which benefit more from careful processor and
|
||||
memory placement to reduce memory access times and contention,
|
||||
and which typically represent a larger investment for the customer,
|
||||
can benefit from explictly placing jobs on properly sized subsets of
|
||||
can benefit from explicitly placing jobs on properly sized subsets of
|
||||
the system.
|
||||
|
||||
This can be especially valuable on:
|
||||
|
|
|
@ -14,8 +14,8 @@ struct device_driver {
|
|||
int (*probe) (struct device * dev);
|
||||
int (*remove) (struct device * dev);
|
||||
|
||||
int (*suspend) (struct device * dev, pm_message_t state, u32 level);
|
||||
int (*resume) (struct device * dev, u32 level);
|
||||
int (*suspend) (struct device * dev, pm_message_t state);
|
||||
int (*resume) (struct device * dev);
|
||||
};
|
||||
|
||||
|
||||
|
@ -194,69 +194,13 @@ device; i.e. anything in the device's driver_data field.
|
|||
If the device is still present, it should quiesce the device and place
|
||||
it into a supported low-power state.
|
||||
|
||||
int (*suspend) (struct device * dev, pm_message_t state, u32 level);
|
||||
int (*suspend) (struct device * dev, pm_message_t state);
|
||||
|
||||
suspend is called to put the device in a low power state. There are
|
||||
several stages to successfully suspending a device, which is denoted in
|
||||
the @level parameter. Breaking the suspend transition into several
|
||||
stages affords the platform flexibility in performing device power
|
||||
management based on the requirements of the system and the
|
||||
user-defined policy.
|
||||
suspend is called to put the device in a low power state.
|
||||
|
||||
SUSPEND_NOTIFY notifies the device that a suspend transition is about
|
||||
to happen. This happens on system power state transitions to verify
|
||||
that all devices can successfully suspend.
|
||||
int (*resume) (struct device * dev);
|
||||
|
||||
A driver may choose to fail on this call, which should cause the
|
||||
entire suspend transition to fail. A driver should fail only if it
|
||||
knows that the device will not be able to be resumed properly when the
|
||||
system wakes up again. It could also fail if it somehow determines it
|
||||
is in the middle of an operation too important to stop.
|
||||
|
||||
SUSPEND_DISABLE tells the device to stop I/O transactions. When it
|
||||
stops transactions, or what it should do with unfinished transactions
|
||||
is a policy of the driver. After this call, the driver should not
|
||||
accept any other I/O requests.
|
||||
|
||||
SUSPEND_SAVE_STATE tells the device to save the context of the
|
||||
hardware. This includes any bus-specific hardware state and
|
||||
device-specific hardware state. A pointer to this saved state can be
|
||||
stored in the device's saved_state field.
|
||||
|
||||
SUSPEND_POWER_DOWN tells the driver to place the device in the low
|
||||
power state requested.
|
||||
|
||||
Whether suspend is called with a given level is a policy of the
|
||||
platform. Some levels may be omitted; drivers must not assume the
|
||||
reception of any level. However, all levels must be called in the
|
||||
order above; i.e. notification will always come before disabling;
|
||||
disabling the device will come before suspending the device.
|
||||
|
||||
All calls are made with interrupts enabled, except for the
|
||||
SUSPEND_POWER_DOWN level.
|
||||
|
||||
int (*resume) (struct device * dev, u32 level);
|
||||
|
||||
Resume is used to bring a device back from a low power state. Like the
|
||||
suspend transition, it happens in several stages.
|
||||
|
||||
RESUME_POWER_ON tells the driver to set the power state to the state
|
||||
before the suspend call (The device could have already been in a low
|
||||
power state before the suspend call to put in a lower power state).
|
||||
|
||||
RESUME_RESTORE_STATE tells the driver to restore the state saved by
|
||||
the SUSPEND_SAVE_STATE suspend call.
|
||||
|
||||
RESUME_ENABLE tells the driver to start accepting I/O transactions
|
||||
again. Depending on driver policy, the device may already have pending
|
||||
I/O requests.
|
||||
|
||||
RESUME_POWER_ON is called with interrupts disabled. The other resume
|
||||
levels are called with interrupts enabled.
|
||||
|
||||
As with the various suspend stages, the driver must not assume that
|
||||
any other resume calls have been or will be made. Each call should be
|
||||
self-contained and not dependent on any external state.
|
||||
Resume is used to bring a device back from a low power state.
|
||||
|
||||
|
||||
Attributes
|
||||
|
|
|
@ -350,7 +350,7 @@ When a driver is registered, the bus's list of devices is iterated
|
|||
over. bus->match() is called for each device that is not already
|
||||
claimed by a driver.
|
||||
|
||||
When a device is successfully bound to a device, device->driver is
|
||||
When a device is successfully bound to a driver, device->driver is
|
||||
set, the device is added to a per-driver list of devices, and a
|
||||
symlink is created in the driver's sysfs directory that points to the
|
||||
device's physical directory:
|
||||
|
|
|
@ -50,9 +50,14 @@ userspace utilities, etc.
|
|||
Features
|
||||
========
|
||||
|
||||
- This is a complete rewrite of the NTFS driver that used to be in the kernel.
|
||||
This new driver implements NTFS read support and is functionally equivalent
|
||||
to the old ntfs driver.
|
||||
- This is a complete rewrite of the NTFS driver that used to be in the 2.4 and
|
||||
earlier kernels. This new driver implements NTFS read support and is
|
||||
functionally equivalent to the old ntfs driver and it also implements limited
|
||||
write support. The biggest limitation at present is that files/directories
|
||||
cannot be created or deleted. See below for the list of write features that
|
||||
are so far supported. Another limitation is that writing to compressed files
|
||||
is not implemented at all. Also, neither read nor write access to encrypted
|
||||
files is so far implemented.
|
||||
- The new driver has full support for sparse files on NTFS 3.x volumes which
|
||||
the old driver isn't happy with.
|
||||
- The new driver supports execution of binaries due to mmap() now being
|
||||
|
@ -78,7 +83,20 @@ Features
|
|||
- The new driver supports fsync(2), fdatasync(2), and msync(2).
|
||||
- The new driver supports readv(2) and writev(2).
|
||||
- The new driver supports access time updates (including mtime and ctime).
|
||||
|
||||
- The new driver supports truncate(2) and open(2) with O_TRUNC. But at present
|
||||
only very limited support for highly fragmented files, i.e. ones which have
|
||||
their data attribute split across multiple extents, is included. Another
|
||||
limitation is that at present truncate(2) will never create sparse files,
|
||||
since to mark a file sparse we need to modify the directory entry for the
|
||||
file and we do not implement directory modifications yet.
|
||||
- The new driver supports write(2) which can both overwrite existing data and
|
||||
extend the file size so that you can write beyond the existing data. Also,
|
||||
writing into sparse regions is supported and the holes are filled in with
|
||||
clusters. But at present only limited support for highly fragmented files,
|
||||
i.e. ones which have their data attribute split across multiple extents, is
|
||||
included. Another limitation is that write(2) will never create sparse
|
||||
files, since to mark a file sparse we need to modify the directory entry for
|
||||
the file and we do not implement directory modifications yet.
|
||||
|
||||
Supported mount options
|
||||
=======================
|
||||
|
@ -439,6 +457,22 @@ ChangeLog
|
|||
|
||||
Note, a technical ChangeLog aimed at kernel hackers is in fs/ntfs/ChangeLog.
|
||||
|
||||
2.1.25:
|
||||
- Write support is now extended with write(2) being able to both
|
||||
overwrite existing file data and to extend files. Also, if a write
|
||||
to a sparse region occurs, write(2) will fill in the hole. Note,
|
||||
mmap(2) based writes still do not support writing into holes or
|
||||
writing beyond the initialized size.
|
||||
- Write support has a new feature and that is that truncate(2) and
|
||||
open(2) with O_TRUNC are now implemented thus files can be both made
|
||||
smaller and larger.
|
||||
- Note: Both write(2) and truncate(2)/open(2) with O_TRUNC still have
|
||||
limitations in that they
|
||||
- only provide limited support for highly fragmented files.
|
||||
- only work on regular, i.e. uncompressed and unencrypted files.
|
||||
- never create sparse files although this will change once directory
|
||||
operations are implemented.
|
||||
- Lots of bug fixes and enhancements across the board.
|
||||
2.1.24:
|
||||
- Support journals ($LogFile) which have been modified by chkdsk. This
|
||||
means users can boot into Windows after we marked the volume dirty.
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
#include <linux/kernel.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/device.h>
|
||||
#include <linux/string.h>
|
||||
|
||||
#include "linux/firmware.h"
|
||||
|
||||
|
|
|
@ -14,6 +14,8 @@
|
|||
#include <linux/module.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/timer.h>
|
||||
#include <linux/slab.h>
|
||||
#include <linux/string.h>
|
||||
#include <linux/firmware.h>
|
||||
|
||||
|
||||
|
|
|
@ -4,18 +4,18 @@ Kernel driver it87
|
|||
Supported chips:
|
||||
* IT8705F
|
||||
Prefix: 'it87'
|
||||
Addresses scanned: from Super I/O config space, or default ISA 0x290 (8 I/O ports)
|
||||
Addresses scanned: from Super I/O config space (8 I/O ports)
|
||||
Datasheet: Publicly available at the ITE website
|
||||
http://www.ite.com.tw/
|
||||
* IT8712F
|
||||
Prefix: 'it8712'
|
||||
Addresses scanned: I2C 0x28 - 0x2f
|
||||
from Super I/O config space, or default ISA 0x290 (8 I/O ports)
|
||||
from Super I/O config space (8 I/O ports)
|
||||
Datasheet: Publicly available at the ITE website
|
||||
http://www.ite.com.tw/
|
||||
* SiS950 [clone of IT8705F]
|
||||
Prefix: 'sis950'
|
||||
Addresses scanned: from Super I/O config space, or default ISA 0x290 (8 I/O ports)
|
||||
Prefix: 'it87'
|
||||
Addresses scanned: from Super I/O config space (8 I/O ports)
|
||||
Datasheet: No longer be available
|
||||
|
||||
Author: Christophe Gauthron <chrisg@0-in.com>
|
||||
|
|
|
@ -24,14 +24,14 @@ Supported chips:
|
|||
http://www.national.com/pf/LM/LM86.html
|
||||
* Analog Devices ADM1032
|
||||
Prefix: 'adm1032'
|
||||
Addresses scanned: I2C 0x4c
|
||||
Addresses scanned: I2C 0x4c and 0x4d
|
||||
Datasheet: Publicly available at the Analog Devices website
|
||||
http://products.analog.com/products/info.asp?product=ADM1032
|
||||
http://www.analog.com/en/prod/0,2877,ADM1032,00.html
|
||||
* Analog Devices ADT7461
|
||||
Prefix: 'adt7461'
|
||||
Addresses scanned: I2C 0x4c
|
||||
Addresses scanned: I2C 0x4c and 0x4d
|
||||
Datasheet: Publicly available at the Analog Devices website
|
||||
http://products.analog.com/products/info.asp?product=ADT7461
|
||||
http://www.analog.com/en/prod/0,2877,ADT7461,00.html
|
||||
Note: Only if in ADM1032 compatibility mode
|
||||
* Maxim MAX6657
|
||||
Prefix: 'max6657'
|
||||
|
@ -71,8 +71,8 @@ increased resolution of the remote temperature measurement.
|
|||
|
||||
The different chipsets of the family are not strictly identical, although
|
||||
very similar. This driver doesn't handle any specific feature for now,
|
||||
but could if there ever was a need for it. For reference, here comes a
|
||||
non-exhaustive list of specific features:
|
||||
with the exception of SMBus PEC. For reference, here comes a non-exhaustive
|
||||
list of specific features:
|
||||
|
||||
LM90:
|
||||
* Filter and alert configuration register at 0xBF.
|
||||
|
@ -91,6 +91,7 @@ ADM1032:
|
|||
* Conversion averaging.
|
||||
* Up to 64 conversions/s.
|
||||
* ALERT is triggered by open remote sensor.
|
||||
* SMBus PEC support for Write Byte and Receive Byte transactions.
|
||||
|
||||
ADT7461
|
||||
* Extended temperature range (breaks compatibility)
|
||||
|
@ -119,3 +120,37 @@ The lm90 driver will not update its values more frequently than every
|
|||
other second; reading them more often will do no harm, but will return
|
||||
'old' values.
|
||||
|
||||
PEC Support
|
||||
-----------
|
||||
|
||||
The ADM1032 is the only chip of the family which supports PEC. It does
|
||||
not support PEC on all transactions though, so some care must be taken.
|
||||
|
||||
When reading a register value, the PEC byte is computed and sent by the
|
||||
ADM1032 chip. However, in the case of a combined transaction (SMBus Read
|
||||
Byte), the ADM1032 computes the CRC value over only the second half of
|
||||
the message rather than its entirety, because it thinks the first half
|
||||
of the message belongs to a different transaction. As a result, the CRC
|
||||
value differs from what the SMBus master expects, and all reads fail.
|
||||
|
||||
For this reason, the lm90 driver will enable PEC for the ADM1032 only if
|
||||
the bus supports the SMBus Send Byte and Receive Byte transaction types.
|
||||
These transactions will be used to read register values, instead of
|
||||
SMBus Read Byte, and PEC will work properly.
|
||||
|
||||
Additionally, the ADM1032 doesn't support SMBus Send Byte with PEC.
|
||||
Instead, it will try to write the PEC value to the register (because the
|
||||
SMBus Send Byte transaction with PEC is similar to a Write Byte transaction
|
||||
without PEC), which is not what we want. Thus, PEC is explicitely disabled
|
||||
on SMBus Send Byte transactions in the lm90 driver.
|
||||
|
||||
PEC on byte data transactions represents a significant increase in bandwidth
|
||||
usage (+33% for writes, +25% for reads) in normal conditions. With the need
|
||||
to use two SMBus transaction for reads, this overhead jumps to +50%. Worse,
|
||||
two transactions will typically mean twice as much delay waiting for
|
||||
transaction completion, effectively doubling the register cache refresh time.
|
||||
I guess reliability comes at a price, but it's quite expensive this time.
|
||||
|
||||
So, as not everyone might enjoy the slowdown, PEC can be disabled through
|
||||
sysfs. Just write 0 to the "pec" file and PEC will be disabled. Write 1
|
||||
to that file to enable PEC again.
|
||||
|
|
|
@ -3,6 +3,7 @@ Kernel driver smsc47b397
|
|||
|
||||
Supported chips:
|
||||
* SMSC LPC47B397-NC
|
||||
* SMSC SCH5307-NS
|
||||
Prefix: 'smsc47b397'
|
||||
Addresses scanned: none, address read from Super I/O config space
|
||||
Datasheet: In this file
|
||||
|
@ -12,11 +13,14 @@ Authors: Mark M. Hoffman <mhoffman@lightlink.com>
|
|||
|
||||
November 23, 2004
|
||||
|
||||
The following specification describes the SMSC LPC47B397-NC sensor chip
|
||||
The following specification describes the SMSC LPC47B397-NC[1] sensor chip
|
||||
(for which there is no public datasheet available). This document was
|
||||
provided by Craig Kelly (In-Store Broadcast Network) and edited/corrected
|
||||
by Mark M. Hoffman <mhoffman@lightlink.com>.
|
||||
|
||||
[1] And SMSC SCH5307-NS, which has a different device ID but is otherwise
|
||||
compatible.
|
||||
|
||||
* * * * *
|
||||
|
||||
Methods for detecting the HP SIO and reading the thermal data on a dc7100.
|
||||
|
@ -127,7 +131,7 @@ OUT DX,AL
|
|||
The registers of interest for identifying the SIO on the dc7100 are Device ID
|
||||
(0x20) and Device Rev (0x21).
|
||||
|
||||
The Device ID will read 0X6F
|
||||
The Device ID will read 0x6F (for SCH5307-NS, 0x81)
|
||||
The Device Rev currently reads 0x01
|
||||
|
||||
Obtaining the HWM Base Address.
|
||||
|
|
|
@ -12,6 +12,10 @@ Supported chips:
|
|||
http://www.smsc.com/main/datasheets/47m14x.pdf
|
||||
http://www.smsc.com/main/tools/discontinued/47m15x.pdf
|
||||
http://www.smsc.com/main/datasheets/47m192.pdf
|
||||
* SMSC LPC47M997
|
||||
Addresses scanned: none, address read from Super I/O config space
|
||||
Prefix: 'smsc47m1'
|
||||
Datasheet: none
|
||||
|
||||
Authors:
|
||||
Mark D. Studebaker <mdsxyz123@yahoo.com>,
|
||||
|
@ -30,6 +34,9 @@ The 47M15x and 47M192 chips contain a full 'hardware monitoring block'
|
|||
in addition to the fan monitoring and control. The hardware monitoring
|
||||
block is not supported by the driver.
|
||||
|
||||
No documentation is available for the 47M997, but it has the same device
|
||||
ID as the 47M15x and 47M192 chips and seems to be compatible.
|
||||
|
||||
Fan rotation speeds are reported in RPM (rotations per minute). An alarm is
|
||||
triggered if the rotation speed has dropped below a programmable limit. Fan
|
||||
readings can be divided by a programmable divider (1, 2, 4 or 8) to give
|
||||
|
|
|
@ -272,3 +272,6 @@ beep_mask Bitmask for beep.
|
|||
|
||||
eeprom Raw EEPROM data in binary form.
|
||||
Read only.
|
||||
|
||||
pec Enable or disable PEC (SMBus only)
|
||||
Read/Write
|
||||
|
|
|
@ -18,8 +18,9 @@ Authors:
|
|||
Module Parameters
|
||||
-----------------
|
||||
|
||||
force_addr=0xaddr Set the I/O base address. Useful for Asus A7V boards
|
||||
that don't set the address in the BIOS. Does not do a
|
||||
force_addr=0xaddr Set the I/O base address. Useful for boards that
|
||||
don't set the address in the BIOS. Look for a BIOS
|
||||
upgrade before resorting to this. Does not do a
|
||||
PCI force; the via686a must still be present in lspci.
|
||||
Don't use this unless the driver complains that the
|
||||
base address is not set.
|
||||
|
@ -63,3 +64,15 @@ miss once-only alarms.
|
|||
|
||||
The driver only updates its values each 1.5 seconds; reading it more often
|
||||
will do no harm, but will return 'old' values.
|
||||
|
||||
Known Issues
|
||||
------------
|
||||
|
||||
This driver handles sensors integrated in some VIA south bridges. It is
|
||||
possible that a motherboard maker used a VT82C686A/B chip as part of a
|
||||
product design but was not interested in its hardware monitoring features,
|
||||
in which case the sensor inputs will not be wired. This is the case of
|
||||
the Asus K7V, A7V and A7V133 motherboards, to name only a few of them.
|
||||
So, if you need the force_addr parameter, and end up with values which
|
||||
don't seem to make any sense, don't look any further: your chip is simply
|
||||
not wired for hardware monitoring.
|
||||
|
|
|
@ -2,6 +2,7 @@ Kernel driver i2c-i810
|
|||
|
||||
Supported adapters:
|
||||
* Intel 82810, 82810-DC100, 82810E, and 82815 (GMCH)
|
||||
* Intel 82845G (GMCH)
|
||||
|
||||
Authors:
|
||||
Frodo Looijaard <frodol@dds.nl>,
|
||||
|
|
|
@ -4,17 +4,18 @@ Supported adapters:
|
|||
* VIA Technologies, Inc. VT82C596A/B
|
||||
Datasheet: Sometimes available at the VIA website
|
||||
|
||||
* VIA Technologies, Inc. VT82C686A/B
|
||||
* VIA Technologies, Inc. VT82C686A/B
|
||||
Datasheet: Sometimes available at the VIA website
|
||||
|
||||
* VIA Technologies, Inc. VT8231, VT8233, VT8233A, VT8235, VT8237
|
||||
Datasheet: available on request from Via
|
||||
|
||||
Authors:
|
||||
Frodo Looijaard <frodol@dds.nl>,
|
||||
Philip Edelbrock <phil@netroedge.com>,
|
||||
Kyösti Mälkki <kmalkki@cc.hut.fi>,
|
||||
Mark D. Studebaker <mdsxyz123@yahoo.com>
|
||||
Frodo Looijaard <frodol@dds.nl>,
|
||||
Philip Edelbrock <phil@netroedge.com>,
|
||||
Kyösti Mälkki <kmalkki@cc.hut.fi>,
|
||||
Mark D. Studebaker <mdsxyz123@yahoo.com>,
|
||||
Jean Delvare <khali@linux-fr.org>
|
||||
|
||||
Module Parameters
|
||||
-----------------
|
||||
|
@ -28,20 +29,22 @@ Description
|
|||
-----------
|
||||
|
||||
i2c-viapro is a true SMBus host driver for motherboards with one of the
|
||||
supported VIA southbridges.
|
||||
supported VIA south bridges.
|
||||
|
||||
Your lspci -n listing must show one of these :
|
||||
|
||||
device 1106:3050 (VT82C596 function 3)
|
||||
device 1106:3051 (VT82C596 function 3)
|
||||
device 1106:3050 (VT82C596A function 3)
|
||||
device 1106:3051 (VT82C596B function 3)
|
||||
device 1106:3057 (VT82C686 function 4)
|
||||
device 1106:3074 (VT8233)
|
||||
device 1106:3147 (VT8233A)
|
||||
device 1106:8235 (VT8231)
|
||||
devide 1106:3177 (VT8235)
|
||||
devide 1106:3227 (VT8237)
|
||||
device 1106:8235 (VT8231 function 4)
|
||||
device 1106:3177 (VT8235)
|
||||
device 1106:3227 (VT8237R)
|
||||
|
||||
If none of these show up, you should look in the BIOS for settings like
|
||||
enable ACPI / SMBus or even USB.
|
||||
|
||||
|
||||
Except for the oldest chips (VT82C596A/B, VT82C686A and most probably
|
||||
VT8231), this driver supports I2C block transactions. Such transactions
|
||||
are mainly useful to read from and write to EEPROMs.
|
||||
|
|
38
Documentation/i2c/chips/x1205
Normal file
38
Documentation/i2c/chips/x1205
Normal file
|
@ -0,0 +1,38 @@
|
|||
Kernel driver x1205
|
||||
===================
|
||||
|
||||
Supported chips:
|
||||
* Xicor X1205 RTC
|
||||
Prefix: 'x1205'
|
||||
Addresses scanned: none
|
||||
Datasheet: http://www.intersil.com/cda/deviceinfo/0,1477,X1205,00.html
|
||||
|
||||
Authors:
|
||||
Karen Spearel <kas11@tampabay.rr.com>,
|
||||
Alessandro Zummo <a.zummo@towertech.it>
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
This module aims to provide complete access to the Xicor X1205 RTC.
|
||||
Recently Xicor has merged with Intersil, but the chip is
|
||||
still sold under the Xicor brand.
|
||||
|
||||
This chip is located at address 0x6f and uses a 2-byte register addressing.
|
||||
Two bytes need to be written to read a single register, while most
|
||||
other chips just require one and take the second one as the data
|
||||
to be written. To prevent corrupting unknown chips, the user must
|
||||
explicitely set the probe parameter.
|
||||
|
||||
example:
|
||||
|
||||
modprobe x1205 probe=0,0x6f
|
||||
|
||||
The module supports one more option, hctosys, which is used to set the
|
||||
software clock from the x1205. On systems where the x1205 is the
|
||||
only hardware rtc, this parameter could be used to achieve a correct
|
||||
date/time earlier in the system boot sequence.
|
||||
|
||||
example:
|
||||
|
||||
modprobe x1205 probe=0,0x6f hctosys=1
|
|
@ -17,9 +17,10 @@ For the most up-to-date list of functionality constants, please check
|
|||
I2C_FUNC_I2C Plain i2c-level commands (Pure SMBus
|
||||
adapters typically can not do these)
|
||||
I2C_FUNC_10BIT_ADDR Handles the 10-bit address extensions
|
||||
I2C_FUNC_PROTOCOL_MANGLING Knows about the I2C_M_REV_DIR_ADDR,
|
||||
I2C_M_REV_DIR_ADDR and I2C_M_REV_DIR_NOSTART
|
||||
flags (which modify the i2c protocol!)
|
||||
I2C_FUNC_PROTOCOL_MANGLING Knows about the I2C_M_IGNORE_NAK,
|
||||
I2C_M_REV_DIR_ADDR, I2C_M_NOSTART and
|
||||
I2C_M_NO_RD_ACK flags (which modify the
|
||||
I2C protocol!)
|
||||
I2C_FUNC_SMBUS_QUICK Handles the SMBus write_quick command
|
||||
I2C_FUNC_SMBUS_READ_BYTE Handles the SMBus read_byte command
|
||||
I2C_FUNC_SMBUS_WRITE_BYTE Handles the SMBus write_byte command
|
||||
|
|
|
@ -82,7 +82,7 @@ Technical changes:
|
|||
exit and exit_free. For i2c+isa drivers, labels should be named
|
||||
ERROR0, ERROR1 and ERROR2. Don't forget to properly set err before
|
||||
jumping to error labels. By the way, labels should be left-aligned.
|
||||
Use memset to fill the client and data area with 0x00.
|
||||
Use kzalloc instead of kmalloc.
|
||||
Use i2c_set_clientdata to set the client data (as opposed to
|
||||
a direct access to client->data).
|
||||
Use strlcpy instead of strcpy to copy the client name.
|
||||
|
|
|
@ -33,8 +33,8 @@ static struct i2c_driver foo_driver = {
|
|||
.command = &foo_command /* may be NULL */
|
||||
}
|
||||
|
||||
The name can be chosen freely, and may be upto 40 characters long. Please
|
||||
use something descriptive here.
|
||||
The name field must match the driver name, including the case. It must not
|
||||
contain spaces, and may be up to 31 characters long.
|
||||
|
||||
Don't worry about the flags field; just put I2C_DF_NOTIFY into it. This
|
||||
means that your driver will be notified when new adapters are found.
|
||||
|
@ -43,9 +43,6 @@ This is almost always what you want.
|
|||
All other fields are for call-back functions which will be explained
|
||||
below.
|
||||
|
||||
There use to be two additional fields in this structure, inc_use et dec_use,
|
||||
for module usage count, but these fields were obsoleted and removed.
|
||||
|
||||
|
||||
Extra client data
|
||||
=================
|
||||
|
@ -58,6 +55,7 @@ be very useful.
|
|||
An example structure is below.
|
||||
|
||||
struct foo_data {
|
||||
struct i2c_client client;
|
||||
struct semaphore lock; /* For ISA access in `sensors' drivers. */
|
||||
int sysctl_id; /* To keep the /proc directory entry for
|
||||
`sensors' drivers. */
|
||||
|
@ -275,6 +273,7 @@ For now, you can ignore the `flags' parameter. It is there for future use.
|
|||
if (is_isa) {
|
||||
|
||||
/* Discard immediately if this ISA range is already used */
|
||||
/* FIXME: never use check_region(), only request_region() */
|
||||
if (check_region(address,FOO_EXTENT))
|
||||
goto ERROR0;
|
||||
|
||||
|
@ -310,22 +309,15 @@ For now, you can ignore the `flags' parameter. It is there for future use.
|
|||
client structure, even though we cannot fill it completely yet.
|
||||
But it allows us to access several i2c functions safely */
|
||||
|
||||
/* Note that we reserve some space for foo_data too. If you don't
|
||||
need it, remove it. We do it here to help to lessen memory
|
||||
fragmentation. */
|
||||
if (! (new_client = kmalloc(sizeof(struct i2c_client) +
|
||||
sizeof(struct foo_data),
|
||||
GFP_KERNEL))) {
|
||||
if (!(data = kzalloc(sizeof(struct foo_data), GFP_KERNEL))) {
|
||||
err = -ENOMEM;
|
||||
goto ERROR0;
|
||||
}
|
||||
|
||||
/* This is tricky, but it will set the data to the right value. */
|
||||
client->data = new_client + 1;
|
||||
data = (struct foo_data *) (client->data);
|
||||
new_client = &data->client;
|
||||
i2c_set_clientdata(new_client, data);
|
||||
|
||||
new_client->addr = address;
|
||||
new_client->data = data;
|
||||
new_client->adapter = adapter;
|
||||
new_client->driver = &foo_driver;
|
||||
new_client->flags = 0;
|
||||
|
@ -451,7 +443,7 @@ much simpler than the attachment code, fortunately!
|
|||
release_region(client->addr,LM78_EXTENT);
|
||||
/* HYBRID SENSORS CHIP ONLY END */
|
||||
|
||||
kfree(client); /* Frees client data too, if allocated at the same time */
|
||||
kfree(data);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -576,12 +568,12 @@ SMBus communication
|
|||
extern s32 i2c_smbus_write_block_data(struct i2c_client * client,
|
||||
u8 command, u8 length,
|
||||
u8 *values);
|
||||
extern s32 i2c_smbus_read_i2c_block_data(struct i2c_client * client,
|
||||
u8 command, u8 *values);
|
||||
|
||||
These ones were removed in Linux 2.6.10 because they had no users, but could
|
||||
be added back later if needed:
|
||||
|
||||
extern s32 i2c_smbus_read_i2c_block_data(struct i2c_client * client,
|
||||
u8 command, u8 *values);
|
||||
extern s32 i2c_smbus_read_block_data(struct i2c_client * client,
|
||||
u8 command, u8 *values);
|
||||
extern s32 i2c_smbus_write_i2c_block_data(struct i2c_client * client,
|
||||
|
|
|
@ -2,7 +2,6 @@ Driver documentation for yealink usb-p1k phones
|
|||
|
||||
0. Status
|
||||
~~~~~~~~~
|
||||
|
||||
The p1k is a relatively cheap usb 1.1 phone with:
|
||||
- keyboard full support, yealink.ko / input event API
|
||||
- LCD full support, yealink.ko / sysfs API
|
||||
|
@ -17,9 +16,8 @@ For vendor documentation see http://www.yealink.com
|
|||
|
||||
1. Compilation (stand alone version)
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Currently only kernel 2.6.x.y versions are supported.
|
||||
In order to build the yealink.ko module do:
|
||||
In order to build the yealink.ko module do
|
||||
|
||||
make
|
||||
|
||||
|
@ -28,6 +26,21 @@ the Makefile is pointing to the location where your kernel sources
|
|||
are located, default /usr/src/linux.
|
||||
|
||||
|
||||
1.1 Troubleshooting
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
Q: Module yealink compiled and installed without any problem but phone
|
||||
is not initialized and does not react to any actions.
|
||||
A: If you see something like:
|
||||
hiddev0: USB HID v1.00 Device [Yealink Network Technology Ltd. VOIP USB Phone
|
||||
in dmesg, it means that the hid driver has grabbed the device first. Try to
|
||||
load module yealink before any other usb hid driver. Please see the
|
||||
instructions provided by your distribution on module configuration.
|
||||
|
||||
Q: Phone is working now (displays version and accepts keypad input) but I can't
|
||||
find the sysfs files.
|
||||
A: The sysfs files are located on the particular usb endpoint. On most
|
||||
distributions you can do: "find /sys/ -name get_icons" for a hint.
|
||||
|
||||
|
||||
2. keyboard features
|
||||
~~~~~~~~~~~~~~~~~~~~
|
||||
|
|
|
@ -1460,8 +1460,6 @@ running once the system is up.
|
|||
stifb= [HW]
|
||||
Format: bpp:<bpp1>[:<bpp2>[:<bpp3>...]]
|
||||
|
||||
stram_swap= [HW,M68k]
|
||||
|
||||
swiotlb= [IA-64] Number of I/O TLB slabs
|
||||
|
||||
switches= [HW,M68k]
|
||||
|
@ -1517,8 +1515,6 @@ running once the system is up.
|
|||
uart6850= [HW,OSS]
|
||||
Format: <io>,<irq>
|
||||
|
||||
usb-handoff [HW] Enable early USB BIOS -> OS handoff
|
||||
|
||||
usbhid.mousepoll=
|
||||
[USBHID] The interval which mice are to be polled at.
|
||||
|
||||
|
|
|
@ -196,7 +196,7 @@ KEY ACCESS PERMISSIONS
|
|||
|
||||
Keys have an owner user ID, a group access ID, and a permissions mask. The mask
|
||||
has up to eight bits each for possessor, user, group and other access. Only
|
||||
five of each set of eight bits are defined. These permissions granted are:
|
||||
six of each set of eight bits are defined. These permissions granted are:
|
||||
|
||||
(*) View
|
||||
|
||||
|
@ -224,6 +224,10 @@ five of each set of eight bits are defined. These permissions granted are:
|
|||
keyring to a key, a process must have Write permission on the keyring and
|
||||
Link permission on the key.
|
||||
|
||||
(*) Set Attribute
|
||||
|
||||
This permits a key's UID, GID and permissions mask to be changed.
|
||||
|
||||
For changing the ownership, group ID or permissions mask, being the owner of
|
||||
the key or having the sysadmin capability is sufficient.
|
||||
|
||||
|
@ -242,15 +246,15 @@ about the status of the key service:
|
|||
this way:
|
||||
|
||||
SERIAL FLAGS USAGE EXPY PERM UID GID TYPE DESCRIPTION: SUMMARY
|
||||
00000001 I----- 39 perm 1f1f0000 0 0 keyring _uid_ses.0: 1/4
|
||||
00000002 I----- 2 perm 1f1f0000 0 0 keyring _uid.0: empty
|
||||
00000007 I----- 1 perm 1f1f0000 0 0 keyring _pid.1: empty
|
||||
0000018d I----- 1 perm 1f1f0000 0 0 keyring _pid.412: empty
|
||||
000004d2 I--Q-- 1 perm 1f1f0000 32 -1 keyring _uid.32: 1/4
|
||||
000004d3 I--Q-- 3 perm 1f1f0000 32 -1 keyring _uid_ses.32: empty
|
||||
00000001 I----- 39 perm 1f3f0000 0 0 keyring _uid_ses.0: 1/4
|
||||
00000002 I----- 2 perm 1f3f0000 0 0 keyring _uid.0: empty
|
||||
00000007 I----- 1 perm 1f3f0000 0 0 keyring _pid.1: empty
|
||||
0000018d I----- 1 perm 1f3f0000 0 0 keyring _pid.412: empty
|
||||
000004d2 I--Q-- 1 perm 1f3f0000 32 -1 keyring _uid.32: 1/4
|
||||
000004d3 I--Q-- 3 perm 1f3f0000 32 -1 keyring _uid_ses.32: empty
|
||||
00000892 I--QU- 1 perm 1f000000 0 0 user metal:copper: 0
|
||||
00000893 I--Q-N 1 35s 1f1f0000 0 0 user metal:silver: 0
|
||||
00000894 I--Q-- 1 10h 001f0000 0 0 user metal:gold: 0
|
||||
00000893 I--Q-N 1 35s 1f3f0000 0 0 user metal:silver: 0
|
||||
00000894 I--Q-- 1 10h 003f0000 0 0 user metal:gold: 0
|
||||
|
||||
The flags are:
|
||||
|
||||
|
|
|
@ -626,7 +626,7 @@ ignored (others aren't affected).
|
|||
can be performed in optimal order. Not all SCSI devices support
|
||||
tagged queuing (:-().
|
||||
|
||||
4.6 switches=
|
||||
4.5 switches=
|
||||
-------------
|
||||
|
||||
Syntax: switches=<list of switches>
|
||||
|
@ -661,28 +661,6 @@ correctly.
|
|||
earlier initialization ("ov_"-less) takes precedence. But the
|
||||
switching-off on reset still happens in this case.
|
||||
|
||||
4.5) stram_swap=
|
||||
----------------
|
||||
|
||||
Syntax: stram_swap=<do_swap>[,<max_swap>]
|
||||
|
||||
This option is available only if the kernel has been compiled with
|
||||
CONFIG_STRAM_SWAP enabled. Normally, the kernel then determines
|
||||
dynamically whether to actually use ST-RAM as swap space. (Currently,
|
||||
the fraction of ST-RAM must be less or equal 1/3 of total memory to
|
||||
enable this swapping.) You can override the kernel's decision by
|
||||
specifying this option. 1 for <do_swap> means always enable the swap,
|
||||
even if you have less alternate RAM. 0 stands for never swap to
|
||||
ST-RAM, even if it's small enough compared to the rest of memory.
|
||||
|
||||
If ST-RAM swapping is enabled, the kernel usually uses all free
|
||||
ST-RAM as swap "device". If the kernel resides in ST-RAM, the region
|
||||
allocated by it is obviously never used for swapping :-) You can also
|
||||
limit this amount by specifying the second parameter, <max_swap>, if
|
||||
you want to use parts of ST-RAM as normal system memory. <max_swap> is
|
||||
in kBytes and the number should be a multiple of 4 (otherwise: rounded
|
||||
down).
|
||||
|
||||
5) Options for Amiga Only:
|
||||
==========================
|
||||
|
||||
|
|
168
Documentation/mips/AU1xxx_IDE.README
Normal file
168
Documentation/mips/AU1xxx_IDE.README
Normal file
|
@ -0,0 +1,168 @@
|
|||
README for MIPS AU1XXX IDE driver - Released 2005-07-15
|
||||
|
||||
ABOUT
|
||||
-----
|
||||
This file describes the 'drivers/ide/mips/au1xxx-ide.c', related files and the
|
||||
services they provide.
|
||||
|
||||
If you are short in patience and just want to know how to add your hard disc to
|
||||
the white or black list, go to the 'ADD NEW HARD DISC TO WHITE OR BLACK LIST'
|
||||
section.
|
||||
|
||||
|
||||
LICENSE
|
||||
-------
|
||||
|
||||
Copyright (c) 2003-2005 AMD, Personal Connectivity Solutions
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU General Public License as published by the Free Software
|
||||
Foundation; either version 2 of the License, or (at your option) any later
|
||||
version.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
|
||||
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR
|
||||
BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
You should have received a copy of the GNU General Public License along with
|
||||
this program; if not, write to the Free Software Foundation, Inc.,
|
||||
675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
|
||||
Note: for more information, please refer "AMD Alchemy Au1200/Au1550 IDE
|
||||
Interface and Linux Device Driver" Application Note.
|
||||
|
||||
|
||||
FILES, CONFIGS AND COMPATABILITY
|
||||
--------------------------------
|
||||
|
||||
Two files are introduced:
|
||||
|
||||
a) 'include/asm-mips/mach-au1x00/au1xxx_ide.h'
|
||||
containes : struct _auide_hwif
|
||||
struct drive_list_entry dma_white_list
|
||||
struct drive_list_entry dma_black_list
|
||||
timing parameters for PIO mode 0/1/2/3/4
|
||||
timing parameters for MWDMA 0/1/2
|
||||
|
||||
b) 'drivers/ide/mips/au1xxx-ide.c'
|
||||
contains the functionality of the AU1XXX IDE driver
|
||||
|
||||
Four configs variables are introduced:
|
||||
|
||||
CONFIG_BLK_DEV_IDE_AU1XXX_PIO_DBDMA - enable the PIO+DBDMA mode
|
||||
CONFIG_BLK_DEV_IDE_AU1XXX_MDMA2_DBDMA - enable the MWDMA mode
|
||||
CONFIG_BLK_DEV_IDE_AU1XXX_BURSTABLE_ON - set Burstable FIFO in DBDMA
|
||||
controler
|
||||
CONFIG_BLK_DEV_IDE_AU1XXX_SEQTS_PER_RQ - maximum transfer size
|
||||
per descriptor
|
||||
|
||||
If MWDMA is enabled and the connected hard disc is not on the white list, the
|
||||
kernel switches to a "safe mwdma mode" at boot time. In this mode the IDE
|
||||
performance is substantial slower then in full speed mwdma. In this case
|
||||
please add your hard disc to the white list (follow instruction from 'ADD NEW
|
||||
HARD DISC TO WHITE OR BLACK LIST' section).
|
||||
|
||||
|
||||
SUPPORTED IDE MODES
|
||||
-------------------
|
||||
|
||||
The AU1XXX IDE driver supported all PIO modes - PIO mode 0/1/2/3/4 - and all
|
||||
MWDMA modes - MWDMA 0/1/2 -. There is no support for SWDMA and UDMA mode.
|
||||
|
||||
To change the PIO mode use the program hdparm with option -p, e.g.
|
||||
'hdparm -p0 [device]' for PIO mode 0. To enable the MWDMA mode use the option
|
||||
-X, e.g. 'hdparm -X32 [device]' for MWDMA mode 0.
|
||||
|
||||
|
||||
PERFORMANCE CONFIGURATIONS
|
||||
--------------------------
|
||||
|
||||
If the used system doesn't need USB support enable the following kernel configs:
|
||||
|
||||
CONFIG_IDE=y
|
||||
CONFIG_BLK_DEV_IDE=y
|
||||
CONFIG_IDE_GENERIC=y
|
||||
CONFIG_BLK_DEV_IDEPCI=y
|
||||
CONFIG_BLK_DEV_GENERIC=y
|
||||
CONFIG_BLK_DEV_IDEDMA_PCI=y
|
||||
CONFIG_IDEDMA_PCI_AUTO=y
|
||||
CONFIG_BLK_DEV_IDE_AU1XXX=y
|
||||
CONFIG_BLK_DEV_IDE_AU1XXX_MDMA2_DBDMA=y
|
||||
CONFIG_BLK_DEV_IDE_AU1XXX_BURSTABLE_ON=y
|
||||
CONFIG_BLK_DEV_IDE_AU1XXX_SEQTS_PER_RQ=128
|
||||
CONFIG_BLK_DEV_IDEDMA=y
|
||||
CONFIG_IDEDMA_AUTO=y
|
||||
|
||||
If the used system need the USB support enable the following kernel configs for
|
||||
high IDE to USB throughput.
|
||||
|
||||
CONFIG_BLK_DEV_IDEDISK=y
|
||||
CONFIG_IDE_GENERIC=y
|
||||
CONFIG_BLK_DEV_IDEPCI=y
|
||||
CONFIG_BLK_DEV_GENERIC=y
|
||||
CONFIG_BLK_DEV_IDEDMA_PCI=y
|
||||
CONFIG_IDEDMA_PCI_AUTO=y
|
||||
CONFIG_BLK_DEV_IDE_AU1XXX=y
|
||||
CONFIG_BLK_DEV_IDE_AU1XXX_MDMA2_DBDMA=y
|
||||
CONFIG_BLK_DEV_IDE_AU1XXX_SEQTS_PER_RQ=128
|
||||
CONFIG_BLK_DEV_IDEDMA=y
|
||||
CONFIG_IDEDMA_AUTO=y
|
||||
|
||||
|
||||
ADD NEW HARD DISC TO WHITE OR BLACK LIST
|
||||
----------------------------------------
|
||||
|
||||
Step 1 : detect the model name of your hard disc
|
||||
|
||||
a) connect your hard disc to the AU1XXX
|
||||
|
||||
b) boot your kernel and get the hard disc model.
|
||||
|
||||
Example boot log:
|
||||
|
||||
--snipped--
|
||||
Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2
|
||||
ide: Assuming 50MHz system bus speed for PIO modes; override with idebus=xx
|
||||
Au1xxx IDE(builtin) configured for MWDMA2
|
||||
Probing IDE interface ide0...
|
||||
hda: Maxtor 6E040L0, ATA DISK drive
|
||||
ide0 at 0xac800000-0xac800007,0xac8001c0 on irq 64
|
||||
hda: max request size: 64KiB
|
||||
hda: 80293248 sectors (41110 MB) w/2048KiB Cache, CHS=65535/16/63, (U)DMA
|
||||
--snipped--
|
||||
|
||||
In this example 'Maxtor 6E040L0'.
|
||||
|
||||
Step 2 : edit 'include/asm-mips/mach-au1x00/au1xxx_ide.h'
|
||||
|
||||
Add your hard disc to the dma_white_list or dma_black_list structur.
|
||||
|
||||
Step 3 : Recompile the kernel
|
||||
|
||||
Enable MWDMA support in the kernel configuration. Recompile the kernel and
|
||||
reboot.
|
||||
|
||||
Step 4 : Tests
|
||||
|
||||
If you have add a hard disc to the white list, please run some stress tests
|
||||
for verification.
|
||||
|
||||
|
||||
ACKNOWLEDGMENTS
|
||||
---------------
|
||||
|
||||
These drivers wouldn't have been done without the base of kernel 2.4.x AU1XXX
|
||||
IDE driver from AMD.
|
||||
|
||||
Additional input also from:
|
||||
Matthias Lenk <matthias.lenk@amd.com>
|
||||
|
||||
Happy hacking!
|
||||
Enrico Walther <enrico.walther@amd.com>
|
|
@ -777,7 +777,7 @@ doing so is the same as described in the "Configuring Multiple Bonds
|
|||
Manually" section, below.
|
||||
|
||||
NOTE: It has been observed that some Red Hat supplied kernels
|
||||
are apparently unable to rename modules at load time (the "-obonding1"
|
||||
are apparently unable to rename modules at load time (the "-o bond1"
|
||||
part). Attempts to pass that option to modprobe will produce an
|
||||
"Operation not permitted" error. This has been reported on some
|
||||
Fedora Core kernels, and has been seen on RHEL 4 as well. On kernels
|
||||
|
@ -883,7 +883,8 @@ the above does not work, and the second bonding instance never sees
|
|||
its options. In that case, the second options line can be substituted
|
||||
as follows:
|
||||
|
||||
install bonding1 /sbin/modprobe bonding -obond1 mode=balance-alb miimon=50
|
||||
install bond1 /sbin/modprobe --ignore-install bonding -o bond1 \
|
||||
mode=balance-alb miimon=50
|
||||
|
||||
This may be repeated any number of times, specifying a new and
|
||||
unique name in place of bond1 for each subsequent instance.
|
||||
|
|
|
@ -309,7 +309,7 @@ tcp_tso_win_divisor - INTEGER
|
|||
can be consumed by a single TSO frame.
|
||||
The setting of this parameter is a choice between burstiness and
|
||||
building larger TSO frames.
|
||||
Default: 8
|
||||
Default: 3
|
||||
|
||||
tcp_frto - BOOLEAN
|
||||
Enables F-RTO, an enhanced recovery algorithm for TCP retransmission
|
||||
|
|
50
MAINTAINERS
50
MAINTAINERS
|
@ -116,12 +116,6 @@ M: ajk@iehk.rwth-aachen.de
|
|||
L: linux-hams@vger.kernel.org
|
||||
S: Maintained
|
||||
|
||||
YEALINK PHONE DRIVER
|
||||
P: Henk Vergonet
|
||||
M: Henk.Vergonet@gmail.com
|
||||
L: usbb2k-api-dev@nongnu.org
|
||||
S: Maintained
|
||||
|
||||
8139CP 10/100 FAST ETHERNET DRIVER
|
||||
P: Jeff Garzik
|
||||
M: jgarzik@pobox.com
|
||||
|
@ -197,6 +191,15 @@ M: Thorsten Knabe <linux@thorsten-knabe.de>
|
|||
W: http://linux.thorsten-knabe.de
|
||||
S: Maintained
|
||||
|
||||
AD1889 SOUND DRIVER
|
||||
P: Kyle McMartin
|
||||
M: kyle@parisc-linux.org
|
||||
P: Thibaut Varene
|
||||
M: T-Bone@parisc-linux.org
|
||||
W: http://wiki.parisc-linux.org/AD1889
|
||||
L: parisc-linux@lists.parisc-linux.org
|
||||
S: Maintained
|
||||
|
||||
ADM1025 HARDWARE MONITOR DRIVER
|
||||
P: Jean Delvare
|
||||
M: khali@linux-fr.org
|
||||
|
@ -1640,7 +1643,7 @@ S: Maintained
|
|||
MIPS
|
||||
P: Ralf Baechle
|
||||
M: ralf@linux-mips.org
|
||||
W: http://oss.sgi.com/mips/mips-howto.html
|
||||
W: http://www.linux-mips.org/
|
||||
L: linux-mips@linux-mips.org
|
||||
S: Maintained
|
||||
|
||||
|
@ -1942,6 +1945,14 @@ M: george@mvista.com
|
|||
L: netdev@vger.kernel.org
|
||||
S: Supported
|
||||
|
||||
POWERPC 4xx EMAC DRIVER
|
||||
P: Eugene Surovegin
|
||||
M: ebs@ebshome.net
|
||||
W: http://kernel.ebshome.net/emac/
|
||||
L: linuxppc-embedded@ozlabs.org
|
||||
L: netdev@vger.kernel.org
|
||||
S: Maintained
|
||||
|
||||
PNP SUPPORT
|
||||
P: Adam Belay
|
||||
M: ambx1@neo.rr.com
|
||||
|
@ -2275,6 +2286,11 @@ W: http://tpmdd.sourceforge.net
|
|||
L: tpmdd-devel@lists.sourceforge.net
|
||||
S: Maintained
|
||||
|
||||
Telecom Clock Driver for MCPL0010
|
||||
P: Mark Gross
|
||||
M: mark.gross@intel.com
|
||||
S: Supported
|
||||
|
||||
TENSILICA XTENSA PORT (xtensa):
|
||||
P: Chris Zankel
|
||||
M: chris@zankel.net
|
||||
|
@ -2486,14 +2502,6 @@ L: linux-kernel@vger.kernel.org
|
|||
L: linux-usb-devel@lists.sourceforge.net
|
||||
S: Supported
|
||||
|
||||
USB BLUETOOTH TTY CONVERTER DRIVER
|
||||
P: Greg Kroah-Hartman
|
||||
M: greg@kroah.com
|
||||
L: linux-usb-users@lists.sourceforge.net
|
||||
L: linux-usb-devel@lists.sourceforge.net
|
||||
S: Maintained
|
||||
W: http://www.kroah.com/linux-usb/
|
||||
|
||||
USB CDC ETHERNET DRIVER
|
||||
P: Greg Kroah-Hartman
|
||||
M: greg@kroah.com
|
||||
|
@ -2727,6 +2735,12 @@ P: Roger Luethi
|
|||
M: rl@hellgate.ch
|
||||
S: Maintained
|
||||
|
||||
VIAPRO SMBUS DRIVER
|
||||
P: Jean Delvare
|
||||
M: khali@linux-fr.org
|
||||
L: lm-sensors@lm-sensors.org
|
||||
S: Maintained
|
||||
|
||||
UCLINUX (AND M68KNOMMU)
|
||||
P: Greg Ungerer
|
||||
M: gerg@uclinux.org
|
||||
|
@ -2848,6 +2862,12 @@ M: jpr@f6fbb.org
|
|||
L: linux-hams@vger.kernel.org
|
||||
S: Maintained
|
||||
|
||||
YEALINK PHONE DRIVER
|
||||
P: Henk Vergonet
|
||||
M: Henk.Vergonet@gmail.com
|
||||
L: usbb2k-api-dev@nongnu.org
|
||||
S: Maintained
|
||||
|
||||
YMFPCI YAMAHA PCI SOUND (Use ALSA instead)
|
||||
P: Pete Zaitcev
|
||||
M: zaitcev@yahoo.com
|
||||
|
|
8
Makefile
8
Makefile
|
@ -1,7 +1,7 @@
|
|||
VERSION = 2
|
||||
PATCHLEVEL = 6
|
||||
SUBLEVEL = 14
|
||||
EXTRAVERSION =-rc5
|
||||
EXTRAVERSION =
|
||||
NAME=Affluent Albatross
|
||||
|
||||
# *DOCUMENTATION*
|
||||
|
@ -334,7 +334,7 @@ KALLSYMS = scripts/kallsyms
|
|||
PERL = perl
|
||||
CHECK = sparse
|
||||
|
||||
CHECKFLAGS := -D__linux__ -Dlinux -D__STDC__ -Dunix -D__unix__ $(CF)
|
||||
CHECKFLAGS := -D__linux__ -Dlinux -D__STDC__ -Dunix -D__unix__ -Wbitwise $(CF)
|
||||
MODFLAGS = -DMODULE
|
||||
CFLAGS_MODULE = $(MODFLAGS)
|
||||
AFLAGS_MODULE = $(MODFLAGS)
|
||||
|
@ -371,8 +371,8 @@ export MODVERDIR := $(if $(KBUILD_EXTMOD),$(firstword $(KBUILD_EXTMOD))/).tmp_ve
|
|||
|
||||
# Files to ignore in find ... statements
|
||||
|
||||
RCS_FIND_IGNORE := \( -name SCCS -o -name BitKeeper -o -name .svn -o -name CVS -o -name .pc -o -name .hg \) -prune -o
|
||||
export RCS_TAR_IGNORE := --exclude SCCS --exclude BitKeeper --exclude .svn --exclude CVS --exclude .pc --exclude .hg
|
||||
RCS_FIND_IGNORE := \( -name SCCS -o -name BitKeeper -o -name .svn -o -name CVS -o -name .pc -o -name .hg -o -name .git \) -prune -o
|
||||
export RCS_TAR_IGNORE := --exclude SCCS --exclude BitKeeper --exclude .svn --exclude CVS --exclude .pc --exclude .hg --exclude .git
|
||||
|
||||
# ===========================================================================
|
||||
# Rules shared between *config targets and build targets
|
||||
|
|
4
README
4
README
|
@ -54,6 +54,10 @@ INSTALLING the kernel:
|
|||
|
||||
gzip -cd linux-2.6.XX.tar.gz | tar xvf -
|
||||
|
||||
or
|
||||
bzip2 -dc linux-2.6.XX.tar.bz2 | tar xvf -
|
||||
|
||||
|
||||
Replace "XX" with the version number of the latest kernel.
|
||||
|
||||
Do NOT use the /usr/src/linux area! This area has a (usually
|
||||
|
|
|
@ -154,7 +154,7 @@ pci_dma_supported(struct pci_dev *hwdev, dma_addr_t mask)
|
|||
|
||||
void *
|
||||
dma_alloc_coherent(struct device *dev, size_t size,
|
||||
dma_addr_t *dma_handle, int gfp)
|
||||
dma_addr_t *dma_handle, gfp_t gfp)
|
||||
{
|
||||
void *ret;
|
||||
|
||||
|
|
|
@ -397,7 +397,7 @@ pci_alloc_consistent(struct pci_dev *pdev, size_t size, dma_addr_t *dma_addrp)
|
|||
{
|
||||
void *cpu_addr;
|
||||
long order = get_order(size);
|
||||
int gfp = GFP_ATOMIC;
|
||||
gfp_t gfp = GFP_ATOMIC;
|
||||
|
||||
try_again:
|
||||
cpu_addr = (void *)__get_free_pages(gfp, order);
|
||||
|
|
|
@ -55,10 +55,6 @@
|
|||
#include "proto.h"
|
||||
#include "irq_impl.h"
|
||||
|
||||
u64 jiffies_64 = INITIAL_JIFFIES;
|
||||
|
||||
EXPORT_SYMBOL(jiffies_64);
|
||||
|
||||
extern unsigned long wall_jiffies; /* kernel/timer.c */
|
||||
|
||||
static int set_rtc_mmss(unsigned long);
|
||||
|
|
|
@ -371,6 +371,8 @@ show_mem(void)
|
|||
show_free_areas();
|
||||
printk("Free swap: %6ldkB\n", nr_swap_pages<<(PAGE_SHIFT-10));
|
||||
for_each_online_node(nid) {
|
||||
unsigned long flags;
|
||||
pgdat_resize_lock(NODE_DATA(nid), &flags);
|
||||
i = node_spanned_pages(nid);
|
||||
while (i-- > 0) {
|
||||
struct page *page = nid_page_nr(nid, i);
|
||||
|
@ -384,6 +386,7 @@ show_mem(void)
|
|||
else
|
||||
shared += page_count(page) - 1;
|
||||
}
|
||||
pgdat_resize_unlock(NODE_DATA(nid), &flags);
|
||||
}
|
||||
printk("%ld pages of RAM\n",total);
|
||||
printk("%ld free pages\n",free);
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
#include <asm/pgalloc.h>
|
||||
#include <asm/cacheflush.h>
|
||||
|
||||
/* called with the page_table_lock held */
|
||||
static inline void
|
||||
remap_area_pte(pte_t * pte, unsigned long address, unsigned long size,
|
||||
unsigned long phys_addr, unsigned long flags)
|
||||
|
@ -31,7 +30,6 @@ remap_area_pte(pte_t * pte, unsigned long address, unsigned long size,
|
|||
} while (address && (address < end));
|
||||
}
|
||||
|
||||
/* called with the page_table_lock held */
|
||||
static inline int
|
||||
remap_area_pmd(pmd_t * pmd, unsigned long address, unsigned long size,
|
||||
unsigned long phys_addr, unsigned long flags)
|
||||
|
@ -46,7 +44,7 @@ remap_area_pmd(pmd_t * pmd, unsigned long address, unsigned long size,
|
|||
if (address >= end)
|
||||
BUG();
|
||||
do {
|
||||
pte_t * pte = pte_alloc_kernel(&init_mm, pmd, address);
|
||||
pte_t * pte = pte_alloc_kernel(pmd, address);
|
||||
if (!pte)
|
||||
return -ENOMEM;
|
||||
remap_area_pte(pte, address, end - address,
|
||||
|
@ -70,7 +68,6 @@ __alpha_remap_area_pages(unsigned long address, unsigned long phys_addr,
|
|||
flush_cache_all();
|
||||
if (address >= end)
|
||||
BUG();
|
||||
spin_lock(&init_mm.page_table_lock);
|
||||
do {
|
||||
pmd_t *pmd;
|
||||
pmd = pmd_alloc(&init_mm, dir, address);
|
||||
|
@ -84,7 +81,6 @@ __alpha_remap_area_pages(unsigned long address, unsigned long phys_addr,
|
|||
address = (address + PGDIR_SIZE) & PGDIR_MASK;
|
||||
dir++;
|
||||
} while (address && (address < end));
|
||||
spin_unlock(&init_mm.page_table_lock);
|
||||
return error;
|
||||
}
|
||||
|
||||
|
|
|
@ -204,6 +204,7 @@ config ARCH_H720X
|
|||
|
||||
config ARCH_AAEC2000
|
||||
bool "Agilent AAEC-2000 based"
|
||||
select ARM_AMBA
|
||||
help
|
||||
This enables support for systems based on the Agilent AAEC-2000
|
||||
|
||||
|
@ -687,7 +688,8 @@ source "drivers/acorn/block/Kconfig"
|
|||
|
||||
if PCMCIA || ARCH_CLPS7500 || ARCH_IOP3XX || ARCH_IXP4XX \
|
||||
|| ARCH_L7200 || ARCH_LH7A40X || ARCH_PXA || ARCH_RPC \
|
||||
|| ARCH_S3C2410 || ARCH_SA1100 || ARCH_SHARK || FOOTBRIDGE
|
||||
|| ARCH_S3C2410 || ARCH_SA1100 || ARCH_SHARK || FOOTBRIDGE \
|
||||
|| MACH_MP1000
|
||||
source "drivers/ide/Kconfig"
|
||||
endif
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
# Copyright (C) 1995-2001 by Russell King
|
||||
|
||||
LDFLAGS_vmlinux :=-p --no-undefined -X
|
||||
CPPFLAGS_vmlinux.lds = -DTEXTADDR=$(TEXTADDR) -DDATAADDR=$(DATAADDR)
|
||||
CPPFLAGS_vmlinux.lds = -DKERNEL_RAM_ADDR=$(TEXTADDR)
|
||||
OBJCOPYFLAGS :=-O binary -R .note -R .comment -S
|
||||
GZFLAGS :=-9
|
||||
#CFLAGS +=-pipe
|
||||
|
@ -108,27 +108,19 @@ export CFLAGS_3c589_cs.o
|
|||
endif
|
||||
|
||||
TEXTADDR := $(textaddr-y)
|
||||
ifeq ($(CONFIG_XIP_KERNEL),y)
|
||||
DATAADDR := $(TEXTADDR)
|
||||
xipaddr-$(CONFIG_ARCH_CO285) := 0x5f000000
|
||||
xipaddr-y ?= 0xbf000000
|
||||
# Replace phys addr with virt addr while keeping offset from base.
|
||||
TEXTADDR := $(shell echo $(CONFIG_XIP_PHYS_ADDR) $(xipaddr-y) | \
|
||||
awk --non-decimal-data '/[:xdigit:]/ \
|
||||
{ printf("0x%x\n", and($$1, 0x000fffff) + $$2) }' )
|
||||
endif
|
||||
|
||||
ifeq ($(incdir-y),)
|
||||
incdir-y := $(machine-y)
|
||||
endif
|
||||
INCDIR := arch-$(incdir-y)
|
||||
|
||||
ifneq ($(machine-y),)
|
||||
MACHINE := arch/arm/mach-$(machine-y)/
|
||||
else
|
||||
MACHINE :=
|
||||
endif
|
||||
|
||||
export TEXTADDR DATAADDR GZFLAGS
|
||||
export TEXTADDR GZFLAGS
|
||||
|
||||
# Do we have FASTFPE?
|
||||
FASTFPE :=arch/arm/fastfpe
|
||||
|
|
|
@ -39,7 +39,8 @@
|
|||
defined(CONFIG_ARCH_IXP4XX) || \
|
||||
defined(CONFIG_ARCH_IXP2000) || \
|
||||
defined(CONFIG_ARCH_LH7A40X) || \
|
||||
defined(CONFIG_ARCH_OMAP)
|
||||
defined(CONFIG_ARCH_OMAP) || \
|
||||
defined(CONFIG_MACH_MP1000)
|
||||
.macro loadsp, rb
|
||||
addruart \rb
|
||||
.endm
|
||||
|
|
|
@ -30,7 +30,7 @@ unsigned int __machine_arch_type;
|
|||
#define putstr icedcc_putstr
|
||||
#define putc icedcc_putc
|
||||
|
||||
extern void idedcc_putc(int ch);
|
||||
extern void icedcc_putc(int ch);
|
||||
|
||||
static void
|
||||
icedcc_putstr(const char *ptr)
|
||||
|
|
|
@ -10,6 +10,8 @@
|
|||
#include <linux/module.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/device.h>
|
||||
#include <linux/string.h>
|
||||
#include <linux/slab.h>
|
||||
|
||||
#include <asm/io.h>
|
||||
#include <asm/irq.h>
|
||||
|
|
|
@ -33,8 +33,8 @@
|
|||
#include <asm/cacheflush.h>
|
||||
|
||||
#undef DEBUG
|
||||
|
||||
#undef STATS
|
||||
|
||||
#ifdef STATS
|
||||
#define DO_STATS(X) do { X ; } while (0)
|
||||
#else
|
||||
|
@ -52,26 +52,31 @@ struct safe_buffer {
|
|||
int direction;
|
||||
|
||||
/* safe buffer info */
|
||||
struct dma_pool *pool;
|
||||
struct dmabounce_pool *pool;
|
||||
void *safe;
|
||||
dma_addr_t safe_dma_addr;
|
||||
};
|
||||
|
||||
struct dmabounce_pool {
|
||||
unsigned long size;
|
||||
struct dma_pool *pool;
|
||||
#ifdef STATS
|
||||
unsigned long allocs;
|
||||
#endif
|
||||
};
|
||||
|
||||
struct dmabounce_device_info {
|
||||
struct list_head node;
|
||||
|
||||
struct device *dev;
|
||||
struct dma_pool *small_buffer_pool;
|
||||
struct dma_pool *large_buffer_pool;
|
||||
struct list_head safe_buffers;
|
||||
unsigned long small_buffer_size, large_buffer_size;
|
||||
#ifdef STATS
|
||||
unsigned long sbp_allocs;
|
||||
unsigned long lbp_allocs;
|
||||
unsigned long total_allocs;
|
||||
unsigned long map_op_count;
|
||||
unsigned long bounce_count;
|
||||
#endif
|
||||
struct dmabounce_pool small;
|
||||
struct dmabounce_pool large;
|
||||
};
|
||||
|
||||
static LIST_HEAD(dmabounce_devs);
|
||||
|
@ -82,9 +87,9 @@ static void print_alloc_stats(struct dmabounce_device_info *device_info)
|
|||
printk(KERN_INFO
|
||||
"%s: dmabounce: sbp: %lu, lbp: %lu, other: %lu, total: %lu\n",
|
||||
device_info->dev->bus_id,
|
||||
device_info->sbp_allocs, device_info->lbp_allocs,
|
||||
device_info->total_allocs - device_info->sbp_allocs -
|
||||
device_info->lbp_allocs,
|
||||
device_info->small.allocs, device_info->large.allocs,
|
||||
device_info->total_allocs - device_info->small.allocs -
|
||||
device_info->large.allocs,
|
||||
device_info->total_allocs);
|
||||
}
|
||||
#endif
|
||||
|
@ -106,18 +111,22 @@ find_dmabounce_dev(struct device *dev)
|
|||
/* allocate a 'safe' buffer and keep track of it */
|
||||
static inline struct safe_buffer *
|
||||
alloc_safe_buffer(struct dmabounce_device_info *device_info, void *ptr,
|
||||
size_t size, enum dma_data_direction dir)
|
||||
size_t size, enum dma_data_direction dir)
|
||||
{
|
||||
struct safe_buffer *buf;
|
||||
struct dma_pool *pool;
|
||||
struct dmabounce_pool *pool;
|
||||
struct device *dev = device_info->dev;
|
||||
void *safe;
|
||||
dma_addr_t safe_dma_addr;
|
||||
|
||||
dev_dbg(dev, "%s(ptr=%p, size=%d, dir=%d)\n",
|
||||
__func__, ptr, size, dir);
|
||||
|
||||
DO_STATS ( device_info->total_allocs++ );
|
||||
if (size <= device_info->small.size) {
|
||||
pool = &device_info->small;
|
||||
} else if (size <= device_info->large.size) {
|
||||
pool = &device_info->large;
|
||||
} else {
|
||||
pool = NULL;
|
||||
}
|
||||
|
||||
buf = kmalloc(sizeof(struct safe_buffer), GFP_ATOMIC);
|
||||
if (buf == NULL) {
|
||||
|
@ -125,41 +134,35 @@ alloc_safe_buffer(struct dmabounce_device_info *device_info, void *ptr,
|
|||
return NULL;
|
||||
}
|
||||
|
||||
if (size <= device_info->small_buffer_size) {
|
||||
pool = device_info->small_buffer_pool;
|
||||
safe = dma_pool_alloc(pool, GFP_ATOMIC, &safe_dma_addr);
|
||||
buf->ptr = ptr;
|
||||
buf->size = size;
|
||||
buf->direction = dir;
|
||||
buf->pool = pool;
|
||||
|
||||
DO_STATS ( device_info->sbp_allocs++ );
|
||||
} else if (size <= device_info->large_buffer_size) {
|
||||
pool = device_info->large_buffer_pool;
|
||||
safe = dma_pool_alloc(pool, GFP_ATOMIC, &safe_dma_addr);
|
||||
|
||||
DO_STATS ( device_info->lbp_allocs++ );
|
||||
if (pool) {
|
||||
buf->safe = dma_pool_alloc(pool->pool, GFP_ATOMIC,
|
||||
&buf->safe_dma_addr);
|
||||
} else {
|
||||
pool = NULL;
|
||||
safe = dma_alloc_coherent(dev, size, &safe_dma_addr, GFP_ATOMIC);
|
||||
buf->safe = dma_alloc_coherent(dev, size, &buf->safe_dma_addr,
|
||||
GFP_ATOMIC);
|
||||
}
|
||||
|
||||
if (safe == NULL) {
|
||||
dev_warn(device_info->dev,
|
||||
"%s: could not alloc dma memory (size=%d)\n",
|
||||
__func__, size);
|
||||
if (buf->safe == NULL) {
|
||||
dev_warn(dev,
|
||||
"%s: could not alloc dma memory (size=%d)\n",
|
||||
__func__, size);
|
||||
kfree(buf);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#ifdef STATS
|
||||
if (pool)
|
||||
pool->allocs++;
|
||||
device_info->total_allocs++;
|
||||
if (device_info->total_allocs % 1000 == 0)
|
||||
print_alloc_stats(device_info);
|
||||
#endif
|
||||
|
||||
buf->ptr = ptr;
|
||||
buf->size = size;
|
||||
buf->direction = dir;
|
||||
buf->pool = pool;
|
||||
buf->safe = safe;
|
||||
buf->safe_dma_addr = safe_dma_addr;
|
||||
|
||||
list_add(&buf->node, &device_info->safe_buffers);
|
||||
|
||||
return buf;
|
||||
|
@ -186,7 +189,7 @@ free_safe_buffer(struct dmabounce_device_info *device_info, struct safe_buffer *
|
|||
list_del(&buf->node);
|
||||
|
||||
if (buf->pool)
|
||||
dma_pool_free(buf->pool, buf->safe, buf->safe_dma_addr);
|
||||
dma_pool_free(buf->pool->pool, buf->safe, buf->safe_dma_addr);
|
||||
else
|
||||
dma_free_coherent(device_info->dev, buf->size, buf->safe,
|
||||
buf->safe_dma_addr);
|
||||
|
@ -197,12 +200,10 @@ free_safe_buffer(struct dmabounce_device_info *device_info, struct safe_buffer *
|
|||
/* ************************************************** */
|
||||
|
||||
#ifdef STATS
|
||||
|
||||
static void print_map_stats(struct dmabounce_device_info *device_info)
|
||||
{
|
||||
printk(KERN_INFO
|
||||
"%s: dmabounce: map_op_count=%lu, bounce_count=%lu\n",
|
||||
device_info->dev->bus_id,
|
||||
dev_info(device_info->dev,
|
||||
"dmabounce: map_op_count=%lu, bounce_count=%lu\n",
|
||||
device_info->map_op_count, device_info->bounce_count);
|
||||
}
|
||||
#endif
|
||||
|
@ -258,13 +259,13 @@ map_single(struct device *dev, void *ptr, size_t size,
|
|||
__func__, ptr, buf->safe, size);
|
||||
memcpy(buf->safe, ptr, size);
|
||||
}
|
||||
consistent_sync(buf->safe, size, dir);
|
||||
ptr = buf->safe;
|
||||
|
||||
dma_addr = buf->safe_dma_addr;
|
||||
} else {
|
||||
consistent_sync(ptr, size, dir);
|
||||
}
|
||||
|
||||
consistent_sync(ptr, size, dir);
|
||||
|
||||
return dma_addr;
|
||||
}
|
||||
|
||||
|
@ -278,7 +279,7 @@ unmap_single(struct device *dev, dma_addr_t dma_addr, size_t size,
|
|||
/*
|
||||
* Trying to unmap an invalid mapping
|
||||
*/
|
||||
if (dma_addr == ~0) {
|
||||
if (dma_mapping_error(dma_addr)) {
|
||||
dev_err(dev, "Trying to unmap invalid mapping\n");
|
||||
return;
|
||||
}
|
||||
|
@ -570,11 +571,25 @@ dma_sync_sg_for_device(struct device *dev, struct scatterlist *sg, int nents,
|
|||
local_irq_restore(flags);
|
||||
}
|
||||
|
||||
static int
|
||||
dmabounce_init_pool(struct dmabounce_pool *pool, struct device *dev, const char *name,
|
||||
unsigned long size)
|
||||
{
|
||||
pool->size = size;
|
||||
DO_STATS(pool->allocs = 0);
|
||||
pool->pool = dma_pool_create(name, dev, size,
|
||||
0 /* byte alignment */,
|
||||
0 /* no page-crossing issues */);
|
||||
|
||||
return pool->pool ? 0 : -ENOMEM;
|
||||
}
|
||||
|
||||
int
|
||||
dmabounce_register_dev(struct device *dev, unsigned long small_buffer_size,
|
||||
unsigned long large_buffer_size)
|
||||
{
|
||||
struct dmabounce_device_info *device_info;
|
||||
int ret;
|
||||
|
||||
device_info = kmalloc(sizeof(struct dmabounce_device_info), GFP_ATOMIC);
|
||||
if (!device_info) {
|
||||
|
@ -584,45 +599,31 @@ dmabounce_register_dev(struct device *dev, unsigned long small_buffer_size,
|
|||
return -ENOMEM;
|
||||
}
|
||||
|
||||
device_info->small_buffer_pool =
|
||||
dma_pool_create("small_dmabounce_pool",
|
||||
dev,
|
||||
small_buffer_size,
|
||||
0 /* byte alignment */,
|
||||
0 /* no page-crossing issues */);
|
||||
if (!device_info->small_buffer_pool) {
|
||||
printk(KERN_ERR
|
||||
"dmabounce: could not allocate small DMA pool for %s\n",
|
||||
dev->bus_id);
|
||||
kfree(device_info);
|
||||
return -ENOMEM;
|
||||
ret = dmabounce_init_pool(&device_info->small, dev,
|
||||
"small_dmabounce_pool", small_buffer_size);
|
||||
if (ret) {
|
||||
dev_err(dev,
|
||||
"dmabounce: could not allocate DMA pool for %ld byte objects\n",
|
||||
small_buffer_size);
|
||||
goto err_free;
|
||||
}
|
||||
|
||||
if (large_buffer_size) {
|
||||
device_info->large_buffer_pool =
|
||||
dma_pool_create("large_dmabounce_pool",
|
||||
dev,
|
||||
large_buffer_size,
|
||||
0 /* byte alignment */,
|
||||
0 /* no page-crossing issues */);
|
||||
if (!device_info->large_buffer_pool) {
|
||||
printk(KERN_ERR
|
||||
"dmabounce: could not allocate large DMA pool for %s\n",
|
||||
dev->bus_id);
|
||||
dma_pool_destroy(device_info->small_buffer_pool);
|
||||
|
||||
return -ENOMEM;
|
||||
ret = dmabounce_init_pool(&device_info->large, dev,
|
||||
"large_dmabounce_pool",
|
||||
large_buffer_size);
|
||||
if (ret) {
|
||||
dev_err(dev,
|
||||
"dmabounce: could not allocate DMA pool for %ld byte objects\n",
|
||||
large_buffer_size);
|
||||
goto err_destroy;
|
||||
}
|
||||
}
|
||||
|
||||
device_info->dev = dev;
|
||||
device_info->small_buffer_size = small_buffer_size;
|
||||
device_info->large_buffer_size = large_buffer_size;
|
||||
INIT_LIST_HEAD(&device_info->safe_buffers);
|
||||
|
||||
#ifdef STATS
|
||||
device_info->sbp_allocs = 0;
|
||||
device_info->lbp_allocs = 0;
|
||||
device_info->total_allocs = 0;
|
||||
device_info->map_op_count = 0;
|
||||
device_info->bounce_count = 0;
|
||||
|
@ -634,6 +635,12 @@ dmabounce_register_dev(struct device *dev, unsigned long small_buffer_size,
|
|||
dev->bus_id, dev->bus->name);
|
||||
|
||||
return 0;
|
||||
|
||||
err_destroy:
|
||||
dma_pool_destroy(device_info->small.pool);
|
||||
err_free:
|
||||
kfree(device_info);
|
||||
return ret;
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -655,10 +662,10 @@ dmabounce_unregister_dev(struct device *dev)
|
|||
BUG();
|
||||
}
|
||||
|
||||
if (device_info->small_buffer_pool)
|
||||
dma_pool_destroy(device_info->small_buffer_pool);
|
||||
if (device_info->large_buffer_pool)
|
||||
dma_pool_destroy(device_info->large_buffer_pool);
|
||||
if (device_info->small.pool)
|
||||
dma_pool_destroy(device_info->small.pool);
|
||||
if (device_info->large.pool)
|
||||
dma_pool_destroy(device_info->large.pool);
|
||||
|
||||
#ifdef STATS
|
||||
print_alloc_stats(device_info);
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
#include <linux/delay.h>
|
||||
#include <linux/errno.h>
|
||||
#include <linux/ioport.h>
|
||||
#include <linux/device.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/slab.h>
|
||||
#include <linux/spinlock.h>
|
||||
|
||||
|
@ -550,15 +550,12 @@ struct locomo_save_data {
|
|||
u16 LCM_SPIMD;
|
||||
};
|
||||
|
||||
static int locomo_suspend(struct device *dev, pm_message_t state, u32 level)
|
||||
static int locomo_suspend(struct device *dev, pm_message_t state)
|
||||
{
|
||||
struct locomo *lchip = dev_get_drvdata(dev);
|
||||
struct locomo_save_data *save;
|
||||
unsigned long flags;
|
||||
|
||||
if (level != SUSPEND_DISABLE)
|
||||
return 0;
|
||||
|
||||
save = kmalloc(sizeof(struct locomo_save_data), GFP_KERNEL);
|
||||
if (!save)
|
||||
return -ENOMEM;
|
||||
|
@ -597,16 +594,13 @@ static int locomo_suspend(struct device *dev, pm_message_t state, u32 level)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int locomo_resume(struct device *dev, u32 level)
|
||||
static int locomo_resume(struct device *dev)
|
||||
{
|
||||
struct locomo *lchip = dev_get_drvdata(dev);
|
||||
struct locomo_save_data *save;
|
||||
unsigned long r;
|
||||
unsigned long flags;
|
||||
|
||||
if (level != RESUME_ENABLE)
|
||||
return 0;
|
||||
|
||||
save = (struct locomo_save_data *) dev->power.saved_state;
|
||||
if (!save)
|
||||
return 0;
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
#include <linux/ptrace.h>
|
||||
#include <linux/errno.h>
|
||||
#include <linux/ioport.h>
|
||||
#include <linux/device.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/slab.h>
|
||||
#include <linux/spinlock.h>
|
||||
#include <linux/dma-mapping.h>
|
||||
|
@ -801,7 +801,7 @@ struct sa1111_save_data {
|
|||
|
||||
#ifdef CONFIG_PM
|
||||
|
||||
static int sa1111_suspend(struct device *dev, pm_message_t state, u32 level)
|
||||
static int sa1111_suspend(struct device *dev, pm_message_t state)
|
||||
{
|
||||
struct sa1111 *sachip = dev_get_drvdata(dev);
|
||||
struct sa1111_save_data *save;
|
||||
|
@ -809,9 +809,6 @@ static int sa1111_suspend(struct device *dev, pm_message_t state, u32 level)
|
|||
unsigned int val;
|
||||
void __iomem *base;
|
||||
|
||||
if (level != SUSPEND_DISABLE)
|
||||
return 0;
|
||||
|
||||
save = kmalloc(sizeof(struct sa1111_save_data), GFP_KERNEL);
|
||||
if (!save)
|
||||
return -ENOMEM;
|
||||
|
@ -856,23 +853,19 @@ static int sa1111_suspend(struct device *dev, pm_message_t state, u32 level)
|
|||
/*
|
||||
* sa1111_resume - Restore the SA1111 device state.
|
||||
* @dev: device to restore
|
||||
* @level: resume level
|
||||
*
|
||||
* Restore the general state of the SA1111; clock control and
|
||||
* interrupt controller. Other parts of the SA1111 must be
|
||||
* restored by their respective drivers, and must be called
|
||||
* via LDM after this function.
|
||||
*/
|
||||
static int sa1111_resume(struct device *dev, u32 level)
|
||||
static int sa1111_resume(struct device *dev)
|
||||
{
|
||||
struct sa1111 *sachip = dev_get_drvdata(dev);
|
||||
struct sa1111_save_data *save;
|
||||
unsigned long flags, id;
|
||||
void __iomem *base;
|
||||
|
||||
if (level != RESUME_ENABLE)
|
||||
return 0;
|
||||
|
||||
save = (struct sa1111_save_data *)dev->power.saved_state;
|
||||
if (!save)
|
||||
return 0;
|
||||
|
|
|
@ -12,6 +12,8 @@
|
|||
*/
|
||||
|
||||
#include <linux/device.h>
|
||||
#include <linux/string.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <asm/io.h>
|
||||
#include <asm/hardware/scoop.h>
|
||||
|
||||
|
@ -102,26 +104,24 @@ static void check_scoop_reg(struct scoop_dev *sdev)
|
|||
}
|
||||
|
||||
#ifdef CONFIG_PM
|
||||
static int scoop_suspend(struct device *dev, pm_message_t state, uint32_t level)
|
||||
static int scoop_suspend(struct device *dev, pm_message_t state)
|
||||
{
|
||||
if (level == SUSPEND_POWER_DOWN) {
|
||||
struct scoop_dev *sdev = dev_get_drvdata(dev);
|
||||
struct scoop_dev *sdev = dev_get_drvdata(dev);
|
||||
|
||||
check_scoop_reg(sdev);
|
||||
sdev->scoop_gpwr = SCOOP_REG(sdev->base, SCOOP_GPWR);
|
||||
SCOOP_REG(sdev->base, SCOOP_GPWR) = (sdev->scoop_gpwr & ~sdev->suspend_clr) | sdev->suspend_set;
|
||||
|
||||
check_scoop_reg(sdev);
|
||||
sdev->scoop_gpwr = SCOOP_REG(sdev->base, SCOOP_GPWR);
|
||||
SCOOP_REG(sdev->base, SCOOP_GPWR) = (sdev->scoop_gpwr & ~sdev->suspend_clr) | sdev->suspend_set;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int scoop_resume(struct device *dev, uint32_t level)
|
||||
static int scoop_resume(struct device *dev)
|
||||
{
|
||||
if (level == RESUME_POWER_ON) {
|
||||
struct scoop_dev *sdev = dev_get_drvdata(dev);
|
||||
struct scoop_dev *sdev = dev_get_drvdata(dev);
|
||||
|
||||
check_scoop_reg(sdev);
|
||||
SCOOP_REG(sdev->base,SCOOP_GPWR) = sdev->scoop_gpwr;
|
||||
|
||||
check_scoop_reg(sdev);
|
||||
SCOOP_REG(sdev->base,SCOOP_GPWR) = sdev->scoop_gpwr;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
#else
|
||||
|
|
|
@ -559,7 +559,7 @@ CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
|
|||
#
|
||||
CONFIG_SERIAL_8250=y
|
||||
CONFIG_SERIAL_8250_CONSOLE=y
|
||||
CONFIG_SERIAL_8250_NR_UARTS=2
|
||||
CONFIG_SERIAL_8250_NR_UARTS=1
|
||||
# CONFIG_SERIAL_8250_EXTENDED is not set
|
||||
|
||||
#
|
||||
|
|
|
@ -559,7 +559,7 @@ CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
|
|||
#
|
||||
CONFIG_SERIAL_8250=y
|
||||
CONFIG_SERIAL_8250_CONSOLE=y
|
||||
CONFIG_SERIAL_8250_NR_UARTS=2
|
||||
CONFIG_SERIAL_8250_NR_UARTS=1
|
||||
# CONFIG_SERIAL_8250_EXTENDED is not set
|
||||
|
||||
#
|
||||
|
|
897
arch/arm/configs/mp1000_defconfig
Normal file
897
arch/arm/configs/mp1000_defconfig
Normal file
|
@ -0,0 +1,897 @@
|
|||
#
|
||||
# Automatically generated make config: don't edit
|
||||
# Linux kernel version: 2.6.14-rc1
|
||||
# Fri Sep 16 15:48:13 2005
|
||||
#
|
||||
CONFIG_ARM=y
|
||||
CONFIG_MMU=y
|
||||
CONFIG_UID16=y
|
||||
CONFIG_RWSEM_GENERIC_SPINLOCK=y
|
||||
CONFIG_GENERIC_CALIBRATE_DELAY=y
|
||||
|
||||
#
|
||||
# Code maturity level options
|
||||
#
|
||||
CONFIG_EXPERIMENTAL=y
|
||||
# CONFIG_CLEAN_COMPILE is not set
|
||||
CONFIG_BROKEN=y
|
||||
CONFIG_BROKEN_ON_SMP=y
|
||||
CONFIG_LOCK_KERNEL=y
|
||||
CONFIG_INIT_ENV_ARG_LIMIT=32
|
||||
|
||||
#
|
||||
# General setup
|
||||
#
|
||||
CONFIG_LOCALVERSION=""
|
||||
CONFIG_LOCALVERSION_AUTO=y
|
||||
CONFIG_SWAP=y
|
||||
CONFIG_SYSVIPC=y
|
||||
# CONFIG_POSIX_MQUEUE is not set
|
||||
# CONFIG_BSD_PROCESS_ACCT is not set
|
||||
CONFIG_SYSCTL=y
|
||||
# CONFIG_AUDIT is not set
|
||||
# CONFIG_HOTPLUG is not set
|
||||
CONFIG_KOBJECT_UEVENT=y
|
||||
CONFIG_IKCONFIG=y
|
||||
CONFIG_IKCONFIG_PROC=y
|
||||
CONFIG_INITRAMFS_SOURCE=""
|
||||
CONFIG_EMBEDDED=y
|
||||
CONFIG_KALLSYMS=y
|
||||
# CONFIG_KALLSYMS_ALL is not set
|
||||
# CONFIG_KALLSYMS_EXTRA_PASS is not set
|
||||
CONFIG_PRINTK=y
|
||||
CONFIG_BUG=y
|
||||
CONFIG_BASE_FULL=y
|
||||
CONFIG_FUTEX=y
|
||||
CONFIG_EPOLL=y
|
||||
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
|
||||
CONFIG_SHMEM=y
|
||||
CONFIG_CC_ALIGN_FUNCTIONS=0
|
||||
CONFIG_CC_ALIGN_LABELS=0
|
||||
CONFIG_CC_ALIGN_LOOPS=0
|
||||
CONFIG_CC_ALIGN_JUMPS=0
|
||||
# CONFIG_TINY_SHMEM is not set
|
||||
CONFIG_BASE_SMALL=0
|
||||
|
||||
#
|
||||
# Loadable module support
|
||||
#
|
||||
CONFIG_MODULES=y
|
||||
CONFIG_MODULE_UNLOAD=y
|
||||
# CONFIG_MODULE_FORCE_UNLOAD is not set
|
||||
CONFIG_OBSOLETE_MODPARM=y
|
||||
# CONFIG_MODVERSIONS is not set
|
||||
# CONFIG_MODULE_SRCVERSION_ALL is not set
|
||||
CONFIG_KMOD=y
|
||||
|
||||
#
|
||||
# System Type
|
||||
#
|
||||
# CONFIG_ARCH_CLPS7500 is not set
|
||||
CONFIG_ARCH_CLPS711X=y
|
||||
# CONFIG_ARCH_CO285 is not set
|
||||
# CONFIG_ARCH_EBSA110 is not set
|
||||
# CONFIG_ARCH_CAMELOT is not set
|
||||
# CONFIG_ARCH_FOOTBRIDGE is not set
|
||||
# CONFIG_ARCH_INTEGRATOR is not set
|
||||
# CONFIG_ARCH_IOP3XX is not set
|
||||
# CONFIG_ARCH_IXP4XX is not set
|
||||
# CONFIG_ARCH_IXP2000 is not set
|
||||
# CONFIG_ARCH_L7200 is not set
|
||||
# CONFIG_ARCH_PXA is not set
|
||||
# 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_OMAP is not set
|
||||
# CONFIG_ARCH_VERSATILE is not set
|
||||
# CONFIG_ARCH_IMX is not set
|
||||
# CONFIG_ARCH_H720X is not set
|
||||
# CONFIG_ARCH_AAEC2000 is not set
|
||||
|
||||
#
|
||||
# CLPS711X/EP721X Implementations
|
||||
#
|
||||
# CONFIG_ARCH_AUTCPU12 is not set
|
||||
# CONFIG_ARCH_CDB89712 is not set
|
||||
# CONFIG_ARCH_CEIVA is not set
|
||||
# CONFIG_ARCH_CLEP7312 is not set
|
||||
# CONFIG_ARCH_EDB7211 is not set
|
||||
# CONFIG_ARCH_P720T is not set
|
||||
# CONFIG_ARCH_FORTUNET is not set
|
||||
CONFIG_MACH_MP1000=y
|
||||
CONFIG_MP1000_90MHZ=y
|
||||
|
||||
#
|
||||
# Processor Type
|
||||
#
|
||||
CONFIG_CPU_32=y
|
||||
CONFIG_CPU_ARM720T=y
|
||||
CONFIG_CPU_32v4=y
|
||||
CONFIG_CPU_ABRT_LV4T=y
|
||||
CONFIG_CPU_CACHE_V4=y
|
||||
CONFIG_CPU_CACHE_VIVT=y
|
||||
CONFIG_CPU_COPY_V4WT=y
|
||||
CONFIG_CPU_TLB_V4WT=y
|
||||
|
||||
#
|
||||
# Processor Features
|
||||
#
|
||||
CONFIG_ARM_THUMB=y
|
||||
|
||||
#
|
||||
# Bus support
|
||||
#
|
||||
CONFIG_ISA_DMA_API=y
|
||||
|
||||
#
|
||||
# PCCARD (PCMCIA/CardBus) support
|
||||
#
|
||||
# CONFIG_PCCARD is not set
|
||||
|
||||
#
|
||||
# Kernel Features
|
||||
#
|
||||
# CONFIG_SMP is not set
|
||||
CONFIG_PREEMPT=y
|
||||
# CONFIG_NO_IDLE_HZ is not set
|
||||
# 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_ALIGNMENT_TRAP=y
|
||||
|
||||
#
|
||||
# Boot options
|
||||
#
|
||||
CONFIG_ZBOOT_ROM_TEXT=0x0
|
||||
CONFIG_ZBOOT_ROM_BSS=0x0
|
||||
CONFIG_CMDLINE="console=ttyCL,38400 root=/dev/discs/disc0/part1 ip=any cs89x0_media=rj45"
|
||||
# CONFIG_XIP_KERNEL 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=y
|
||||
# CONFIG_ARTHUR is not set
|
||||
|
||||
#
|
||||
# Power management options
|
||||
#
|
||||
# CONFIG_PM is not set
|
||||
|
||||
#
|
||||
# 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_TUNNEL is not set
|
||||
CONFIG_INET_DIAG=y
|
||||
CONFIG_INET_TCP_DIAG=y
|
||||
# CONFIG_TCP_CONG_ADVANCED is not set
|
||||
CONFIG_TCP_CONG_BIC=y
|
||||
CONFIG_IPV6=y
|
||||
# CONFIG_IPV6_PRIVACY is not set
|
||||
# CONFIG_INET6_AH is not set
|
||||
# CONFIG_INET6_ESP is not set
|
||||
# CONFIG_INET6_IPCOMP is not set
|
||||
# CONFIG_INET6_TUNNEL is not set
|
||||
# CONFIG_IPV6_TUNNEL is not set
|
||||
# CONFIG_NETFILTER is not set
|
||||
|
||||
#
|
||||
# DCCP Configuration (EXPERIMENTAL)
|
||||
#
|
||||
# CONFIG_IP_DCCP is not set
|
||||
|
||||
#
|
||||
# SCTP Configuration (EXPERIMENTAL)
|
||||
#
|
||||
# CONFIG_IP_SCTP 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_NET_DIVERT is not set
|
||||
# CONFIG_ECONET is not set
|
||||
# CONFIG_WAN_ROUTER is not set
|
||||
# CONFIG_NET_SCHED is not set
|
||||
# CONFIG_NET_CLS_ROUTE is not set
|
||||
|
||||
#
|
||||
# Network testing
|
||||
#
|
||||
# CONFIG_NET_PKTGEN is not set
|
||||
# CONFIG_NETFILTER_NETLINK is not set
|
||||
# CONFIG_HAMRADIO is not set
|
||||
# CONFIG_IRDA is not set
|
||||
# CONFIG_BT is not set
|
||||
# CONFIG_IEEE80211 is not set
|
||||
|
||||
#
|
||||
# Device Drivers
|
||||
#
|
||||
|
||||
#
|
||||
# Generic Driver Options
|
||||
#
|
||||
CONFIG_STANDALONE=y
|
||||
CONFIG_PREVENT_FIRMWARE_BUILD=y
|
||||
# CONFIG_FW_LOADER is not set
|
||||
# CONFIG_DEBUG_DRIVER is not set
|
||||
|
||||
#
|
||||
# Memory Technology Devices (MTD)
|
||||
#
|
||||
CONFIG_MTD=y
|
||||
CONFIG_MTD_DEBUG=y
|
||||
CONFIG_MTD_DEBUG_VERBOSE=3
|
||||
# CONFIG_MTD_CONCAT is not set
|
||||
CONFIG_MTD_PARTITIONS=y
|
||||
CONFIG_MTD_REDBOOT_PARTS=m
|
||||
CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-2
|
||||
CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED=y
|
||||
# CONFIG_MTD_REDBOOT_PARTS_READONLY is not set
|
||||
CONFIG_MTD_CMDLINE_PARTS=y
|
||||
# CONFIG_MTD_AFS_PARTS is not set
|
||||
|
||||
#
|
||||
# User Modules And Translation Layers
|
||||
#
|
||||
CONFIG_MTD_CHAR=y
|
||||
CONFIG_MTD_BLOCK=y
|
||||
# CONFIG_FTL is not set
|
||||
# CONFIG_NFTL is not set
|
||||
# CONFIG_INFTL is not set
|
||||
|
||||
#
|
||||
# RAM/ROM/Flash chip drivers
|
||||
#
|
||||
CONFIG_MTD_CFI=m
|
||||
# CONFIG_MTD_JEDECPROBE is not set
|
||||
CONFIG_MTD_GEN_PROBE=m
|
||||
CONFIG_MTD_CFI_ADV_OPTIONS=y
|
||||
CONFIG_MTD_CFI_NOSWAP=y
|
||||
# CONFIG_MTD_CFI_BE_BYTE_SWAP is not set
|
||||
# CONFIG_MTD_CFI_LE_BYTE_SWAP is not set
|
||||
CONFIG_MTD_CFI_GEOMETRY=y
|
||||
# CONFIG_MTD_MAP_BANK_WIDTH_1 is not set
|
||||
# CONFIG_MTD_MAP_BANK_WIDTH_2 is not set
|
||||
CONFIG_MTD_MAP_BANK_WIDTH_4=y
|
||||
# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
|
||||
# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
|
||||
# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
|
||||
# CONFIG_MTD_CFI_I1 is not set
|
||||
CONFIG_MTD_CFI_I2=y
|
||||
# CONFIG_MTD_CFI_I4 is not set
|
||||
# CONFIG_MTD_CFI_I8 is not set
|
||||
# CONFIG_MTD_OTP is not set
|
||||
CONFIG_MTD_CFI_INTELEXT=m
|
||||
# CONFIG_MTD_CFI_AMDSTD is not set
|
||||
# CONFIG_MTD_CFI_STAA is not set
|
||||
CONFIG_MTD_CFI_UTIL=m
|
||||
# CONFIG_MTD_RAM is not set
|
||||
# CONFIG_MTD_ROM is not set
|
||||
# CONFIG_MTD_ABSENT is not set
|
||||
# CONFIG_MTD_OBSOLETE_CHIPS is not set
|
||||
# CONFIG_MTD_XIP is not set
|
||||
|
||||
#
|
||||
# Mapping drivers for chip access
|
||||
#
|
||||
# CONFIG_MTD_COMPLEX_MAPPINGS is not set
|
||||
CONFIG_MTD_PHYSMAP=m
|
||||
CONFIG_MTD_PHYSMAP_START=0x0000000
|
||||
CONFIG_MTD_PHYSMAP_LEN=0x4000000
|
||||
CONFIG_MTD_PHYSMAP_BANKWIDTH=2
|
||||
# CONFIG_MTD_ARM_INTEGRATOR is not set
|
||||
CONFIG_MTD_EDB7312=m
|
||||
# CONFIG_MTD_PLATRAM is not set
|
||||
|
||||
#
|
||||
# Self-contained MTD device drivers
|
||||
#
|
||||
# CONFIG_MTD_SLRAM is not set
|
||||
# CONFIG_MTD_PHRAM is not set
|
||||
# CONFIG_MTD_MTDRAM is not set
|
||||
# CONFIG_MTD_BLKMTD is not set
|
||||
# CONFIG_MTD_BLOCK2MTD is not set
|
||||
|
||||
#
|
||||
# Disk-On-Chip Device Drivers
|
||||
#
|
||||
# CONFIG_MTD_DOC2000 is not set
|
||||
# CONFIG_MTD_DOC2001 is not set
|
||||
# CONFIG_MTD_DOC2001PLUS is not set
|
||||
|
||||
#
|
||||
# NAND Flash Device Drivers
|
||||
#
|
||||
CONFIG_MTD_NAND=y
|
||||
# CONFIG_MTD_NAND_VERIFY_WRITE is not set
|
||||
CONFIG_MTD_NAND_MP1000=y
|
||||
CONFIG_MTD_NAND_IDS=y
|
||||
# CONFIG_MTD_NAND_DISKONCHIP is not set
|
||||
# CONFIG_MTD_NAND_NANDSIM is not set
|
||||
|
||||
#
|
||||
# Parallel port support
|
||||
#
|
||||
# CONFIG_PARPORT is not set
|
||||
|
||||
#
|
||||
# Plug and Play support
|
||||
#
|
||||
|
||||
#
|
||||
# Block devices
|
||||
#
|
||||
# CONFIG_BLK_DEV_COW_COMMON is not set
|
||||
CONFIG_BLK_DEV_LOOP=m
|
||||
# CONFIG_BLK_DEV_CRYPTOLOOP is not set
|
||||
# CONFIG_BLK_DEV_NBD is not set
|
||||
CONFIG_BLK_DEV_RAM=y
|
||||
CONFIG_BLK_DEV_RAM_COUNT=2
|
||||
CONFIG_BLK_DEV_RAM_SIZE=16384
|
||||
CONFIG_BLK_DEV_INITRD=y
|
||||
# CONFIG_CDROM_PKTCDVD is not set
|
||||
|
||||
#
|
||||
# IO Schedulers
|
||||
#
|
||||
CONFIG_IOSCHED_NOOP=y
|
||||
CONFIG_IOSCHED_AS=y
|
||||
CONFIG_IOSCHED_DEADLINE=y
|
||||
CONFIG_IOSCHED_CFQ=y
|
||||
# CONFIG_ATA_OVER_ETH is not set
|
||||
|
||||
#
|
||||
# ATA/ATAPI/MFM/RLL support
|
||||
#
|
||||
CONFIG_IDE=y
|
||||
CONFIG_BLK_DEV_IDE=y
|
||||
|
||||
#
|
||||
# Please see Documentation/ide.txt for help/info on IDE drives
|
||||
#
|
||||
# CONFIG_BLK_DEV_IDE_SATA is not set
|
||||
# CONFIG_BLK_DEV_HD_IDE is not set
|
||||
CONFIG_BLK_DEV_IDEDISK=y
|
||||
# CONFIG_IDEDISK_MULTI_MODE is not set
|
||||
# CONFIG_BLK_DEV_IDECD is not set
|
||||
# CONFIG_BLK_DEV_IDETAPE is not set
|
||||
# CONFIG_BLK_DEV_IDEFLOPPY is not set
|
||||
# CONFIG_IDE_TASK_IOCTL is not set
|
||||
|
||||
#
|
||||
# IDE chipset support/bugfixes
|
||||
#
|
||||
# CONFIG_IDE_GENERIC is not set
|
||||
CONFIG_IDE_ARM=y
|
||||
CONFIG_BLK_DEV_IDE_MP1000=y
|
||||
# CONFIG_BLK_DEV_IDEDMA is not set
|
||||
# CONFIG_IDEDMA_AUTO is not set
|
||||
# CONFIG_BLK_DEV_HD is not set
|
||||
|
||||
#
|
||||
# SCSI device support
|
||||
#
|
||||
# CONFIG_RAID_ATTRS is not set
|
||||
# CONFIG_SCSI is not set
|
||||
|
||||
#
|
||||
# Multi-device support (RAID and LVM)
|
||||
#
|
||||
CONFIG_MD=y
|
||||
# CONFIG_BLK_DEV_MD is not set
|
||||
CONFIG_BLK_DEV_DM=y
|
||||
# CONFIG_DM_CRYPT is not set
|
||||
# CONFIG_DM_SNAPSHOT is not set
|
||||
# CONFIG_DM_MIRROR is not set
|
||||
# CONFIG_DM_ZERO is not set
|
||||
# CONFIG_DM_MULTIPATH is not set
|
||||
|
||||
#
|
||||
# Fusion MPT device support
|
||||
#
|
||||
# CONFIG_FUSION is not set
|
||||
|
||||
#
|
||||
# IEEE 1394 (FireWire) support
|
||||
#
|
||||
# CONFIG_IEEE1394 is not set
|
||||
|
||||
#
|
||||
# I2O device support
|
||||
#
|
||||
|
||||
#
|
||||
# Network device support
|
||||
#
|
||||
CONFIG_NETDEVICES=y
|
||||
# CONFIG_DUMMY is not set
|
||||
# CONFIG_BONDING is not set
|
||||
# CONFIG_EQUALIZER is not set
|
||||
# CONFIG_TUN is not set
|
||||
|
||||
#
|
||||
# PHY device support
|
||||
#
|
||||
# CONFIG_PHYLIB is not set
|
||||
|
||||
#
|
||||
# Ethernet (10 or 100Mbit)
|
||||
#
|
||||
CONFIG_NET_ETHERNET=y
|
||||
# CONFIG_MII is not set
|
||||
# CONFIG_SMC91X is not set
|
||||
# CONFIG_DM9000 is not set
|
||||
CONFIG_CS89x0=y
|
||||
|
||||
#
|
||||
# Ethernet (1000 Mbit)
|
||||
#
|
||||
|
||||
#
|
||||
# Ethernet (10000 Mbit)
|
||||
#
|
||||
|
||||
#
|
||||
# Token Ring devices
|
||||
#
|
||||
|
||||
#
|
||||
# Wireless LAN (non-hamradio)
|
||||
#
|
||||
# CONFIG_NET_RADIO is not set
|
||||
|
||||
#
|
||||
# Wan interfaces
|
||||
#
|
||||
# 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
|
||||
|
||||
#
|
||||
# ISDN subsystem
|
||||
#
|
||||
# CONFIG_ISDN is not set
|
||||
|
||||
#
|
||||
# Input device support
|
||||
#
|
||||
CONFIG_INPUT=y
|
||||
|
||||
#
|
||||
# Userland interfaces
|
||||
#
|
||||
# CONFIG_INPUT_MOUSEDEV is not set
|
||||
# CONFIG_INPUT_JOYDEV is not set
|
||||
# CONFIG_INPUT_TSDEV is not set
|
||||
# CONFIG_INPUT_EVDEV is not set
|
||||
CONFIG_INPUT_EVBUG=y
|
||||
|
||||
#
|
||||
# Input Device Drivers
|
||||
#
|
||||
# CONFIG_INPUT_KEYBOARD is not set
|
||||
# CONFIG_INPUT_MOUSE is not set
|
||||
# CONFIG_INPUT_JOYSTICK is not set
|
||||
# CONFIG_INPUT_TOUCHSCREEN is not set
|
||||
# CONFIG_INPUT_MISC is not set
|
||||
|
||||
#
|
||||
# Hardware I/O ports
|
||||
#
|
||||
CONFIG_SERIO=y
|
||||
CONFIG_SERIO_SERPORT=y
|
||||
# CONFIG_SERIO_LIBPS2 is not set
|
||||
# CONFIG_SERIO_RAW is not set
|
||||
# CONFIG_GAMEPORT is not set
|
||||
|
||||
#
|
||||
# Character devices
|
||||
#
|
||||
CONFIG_VT=y
|
||||
CONFIG_VT_CONSOLE=y
|
||||
CONFIG_HW_CONSOLE=y
|
||||
# CONFIG_SERIAL_NONSTANDARD is not set
|
||||
|
||||
#
|
||||
# Serial drivers
|
||||
#
|
||||
CONFIG_SERIAL_8250=y
|
||||
CONFIG_SERIAL_8250_CONSOLE=y
|
||||
CONFIG_SERIAL_8250_NR_UARTS=2
|
||||
# CONFIG_SERIAL_8250_EXTENDED is not set
|
||||
|
||||
#
|
||||
# Non-8250 serial port support
|
||||
#
|
||||
CONFIG_SERIAL_CLPS711X=y
|
||||
CONFIG_SERIAL_CLPS711X_CONSOLE=y
|
||||
CONFIG_SERIAL_CORE=y
|
||||
CONFIG_SERIAL_CORE_CONSOLE=y
|
||||
CONFIG_UNIX98_PTYS=y
|
||||
CONFIG_LEGACY_PTYS=y
|
||||
CONFIG_LEGACY_PTY_COUNT=256
|
||||
|
||||
#
|
||||
# IPMI
|
||||
#
|
||||
# CONFIG_IPMI_HANDLER is not set
|
||||
|
||||
#
|
||||
# Watchdog Cards
|
||||
#
|
||||
# CONFIG_WATCHDOG is not set
|
||||
CONFIG_NVRAM=y
|
||||
CONFIG_RTC=y
|
||||
# CONFIG_DTLK is not set
|
||||
# CONFIG_R3964 is not set
|
||||
|
||||
#
|
||||
# Ftape, the floppy tape device driver
|
||||
#
|
||||
# CONFIG_RAW_DRIVER is not set
|
||||
|
||||
#
|
||||
# TPM devices
|
||||
#
|
||||
|
||||
#
|
||||
# I2C support
|
||||
#
|
||||
# CONFIG_I2C is not set
|
||||
|
||||
#
|
||||
# Hardware Monitoring support
|
||||
#
|
||||
CONFIG_HWMON=y
|
||||
# CONFIG_HWMON_VID is not set
|
||||
# CONFIG_HWMON_DEBUG_CHIP is not set
|
||||
|
||||
#
|
||||
# Misc devices
|
||||
#
|
||||
|
||||
#
|
||||
# Multimedia Capabilities Port drivers
|
||||
#
|
||||
|
||||
#
|
||||
# Multimedia devices
|
||||
#
|
||||
# CONFIG_VIDEO_DEV is not set
|
||||
|
||||
#
|
||||
# Digital Video Broadcasting Devices
|
||||
#
|
||||
# CONFIG_DVB is not set
|
||||
|
||||
#
|
||||
# Graphics support
|
||||
#
|
||||
# CONFIG_FB is not set
|
||||
|
||||
#
|
||||
# Console display driver support
|
||||
#
|
||||
# CONFIG_VGA_CONSOLE is not set
|
||||
CONFIG_DUMMY_CONSOLE=y
|
||||
|
||||
#
|
||||
# Sound
|
||||
#
|
||||
# CONFIG_SOUND is not set
|
||||
|
||||
#
|
||||
# USB support
|
||||
#
|
||||
CONFIG_USB_ARCH_HAS_HCD=y
|
||||
# CONFIG_USB_ARCH_HAS_OHCI is not set
|
||||
# CONFIG_USB is not set
|
||||
|
||||
#
|
||||
# USB Gadget Support
|
||||
#
|
||||
# CONFIG_USB_GADGET is not set
|
||||
|
||||
#
|
||||
# MMC/SD Card support
|
||||
#
|
||||
# CONFIG_MMC is not set
|
||||
|
||||
#
|
||||
# File systems
|
||||
#
|
||||
CONFIG_EXT2_FS=y
|
||||
CONFIG_EXT2_FS_XATTR=y
|
||||
# CONFIG_EXT2_FS_POSIX_ACL is not set
|
||||
# CONFIG_EXT2_FS_SECURITY is not set
|
||||
# CONFIG_EXT2_FS_XIP is not set
|
||||
CONFIG_EXT3_FS=y
|
||||
CONFIG_EXT3_FS_XATTR=y
|
||||
# CONFIG_EXT3_FS_POSIX_ACL is not set
|
||||
# CONFIG_EXT3_FS_SECURITY is not set
|
||||
CONFIG_JBD=y
|
||||
# CONFIG_JBD_DEBUG is not set
|
||||
CONFIG_FS_MBCACHE=y
|
||||
CONFIG_REISERFS_FS=m
|
||||
# CONFIG_REISERFS_CHECK is not set
|
||||
# CONFIG_REISERFS_PROC_INFO is not set
|
||||
# CONFIG_REISERFS_FS_XATTR is not set
|
||||
# CONFIG_JFS_FS is not set
|
||||
CONFIG_FS_POSIX_ACL=y
|
||||
# CONFIG_XFS_FS is not set
|
||||
# CONFIG_MINIX_FS is not set
|
||||
# CONFIG_ROMFS_FS is not set
|
||||
CONFIG_INOTIFY=y
|
||||
CONFIG_QUOTA=y
|
||||
# CONFIG_QFMT_V1 is not set
|
||||
# CONFIG_QFMT_V2 is not set
|
||||
CONFIG_QUOTACTL=y
|
||||
CONFIG_DNOTIFY=y
|
||||
# CONFIG_AUTOFS_FS is not set
|
||||
# CONFIG_AUTOFS4_FS is not set
|
||||
# CONFIG_FUSE_FS is not set
|
||||
|
||||
#
|
||||
# CD-ROM/DVD Filesystems
|
||||
#
|
||||
# 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_SYSFS=y
|
||||
CONFIG_TMPFS=y
|
||||
# CONFIG_HUGETLBFS is not set
|
||||
# CONFIG_HUGETLB_PAGE is not set
|
||||
CONFIG_RAMFS=y
|
||||
# CONFIG_RELAYFS_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_JFFS_FS is not set
|
||||
CONFIG_JFFS2_FS=m
|
||||
CONFIG_JFFS2_FS_DEBUG=0
|
||||
CONFIG_JFFS2_FS_WRITEBUFFER=y
|
||||
# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
|
||||
CONFIG_JFFS2_ZLIB=y
|
||||
CONFIG_JFFS2_RTIME=y
|
||||
# CONFIG_JFFS2_RUBIN is not set
|
||||
CONFIG_CRAMFS=m
|
||||
# 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
|
||||
|
||||
#
|
||||
# Network File Systems
|
||||
#
|
||||
CONFIG_NFS_FS=y
|
||||
CONFIG_NFS_V3=y
|
||||
# CONFIG_NFS_V3_ACL is not set
|
||||
CONFIG_NFS_V4=y
|
||||
# CONFIG_NFS_DIRECTIO is not set
|
||||
CONFIG_NFSD=y
|
||||
CONFIG_NFSD_V3=y
|
||||
# CONFIG_NFSD_V3_ACL is not set
|
||||
CONFIG_NFSD_V4=y
|
||||
CONFIG_NFSD_TCP=y
|
||||
CONFIG_ROOT_NFS=y
|
||||
CONFIG_LOCKD=y
|
||||
CONFIG_LOCKD_V4=y
|
||||
CONFIG_EXPORTFS=y
|
||||
CONFIG_NFS_COMMON=y
|
||||
CONFIG_SUNRPC=y
|
||||
CONFIG_SUNRPC_GSS=y
|
||||
CONFIG_RPCSEC_GSS_KRB5=y
|
||||
# CONFIG_RPCSEC_GSS_SPKM3 is not set
|
||||
CONFIG_SMB_FS=m
|
||||
# CONFIG_SMB_NLS_DEFAULT is not set
|
||||
CONFIG_CIFS=m
|
||||
# CONFIG_CIFS_STATS is not set
|
||||
# CONFIG_CIFS_XATTR is not set
|
||||
# CONFIG_CIFS_EXPERIMENTAL is not set
|
||||
# CONFIG_NCP_FS is not set
|
||||
# CONFIG_CODA_FS is not set
|
||||
# CONFIG_AFS_FS is not set
|
||||
# CONFIG_9P_FS is not set
|
||||
|
||||
#
|
||||
# Partition Types
|
||||
#
|
||||
# CONFIG_PARTITION_ADVANCED is not set
|
||||
CONFIG_MSDOS_PARTITION=y
|
||||
|
||||
#
|
||||
# Native Language Support
|
||||
#
|
||||
CONFIG_NLS=y
|
||||
CONFIG_NLS_DEFAULT="iso8859-1"
|
||||
CONFIG_NLS_CODEPAGE_437=y
|
||||
# CONFIG_NLS_CODEPAGE_737 is not set
|
||||
# CONFIG_NLS_CODEPAGE_775 is not set
|
||||
# CONFIG_NLS_CODEPAGE_850 is not set
|
||||
# CONFIG_NLS_CODEPAGE_852 is not set
|
||||
# CONFIG_NLS_CODEPAGE_855 is not set
|
||||
# CONFIG_NLS_CODEPAGE_857 is not set
|
||||
# CONFIG_NLS_CODEPAGE_860 is not set
|
||||
# CONFIG_NLS_CODEPAGE_861 is not set
|
||||
# CONFIG_NLS_CODEPAGE_862 is not set
|
||||
# CONFIG_NLS_CODEPAGE_863 is not set
|
||||
# CONFIG_NLS_CODEPAGE_864 is not set
|
||||
# CONFIG_NLS_CODEPAGE_865 is not set
|
||||
# CONFIG_NLS_CODEPAGE_866 is not set
|
||||
# CONFIG_NLS_CODEPAGE_869 is not set
|
||||
# CONFIG_NLS_CODEPAGE_936 is not set
|
||||
# CONFIG_NLS_CODEPAGE_950 is not set
|
||||
# CONFIG_NLS_CODEPAGE_932 is not set
|
||||
# CONFIG_NLS_CODEPAGE_949 is not set
|
||||
# CONFIG_NLS_CODEPAGE_874 is not set
|
||||
# CONFIG_NLS_ISO8859_8 is not set
|
||||
# CONFIG_NLS_CODEPAGE_1250 is not set
|
||||
# CONFIG_NLS_CODEPAGE_1251 is not set
|
||||
# CONFIG_NLS_ASCII is not set
|
||||
# CONFIG_NLS_ISO8859_1 is not set
|
||||
# CONFIG_NLS_ISO8859_2 is not set
|
||||
# CONFIG_NLS_ISO8859_3 is not set
|
||||
# CONFIG_NLS_ISO8859_4 is not set
|
||||
# CONFIG_NLS_ISO8859_5 is not set
|
||||
# CONFIG_NLS_ISO8859_6 is not set
|
||||
# CONFIG_NLS_ISO8859_7 is not set
|
||||
# CONFIG_NLS_ISO8859_9 is not set
|
||||
# CONFIG_NLS_ISO8859_13 is not set
|
||||
# CONFIG_NLS_ISO8859_14 is not set
|
||||
# CONFIG_NLS_ISO8859_15 is not set
|
||||
# CONFIG_NLS_KOI8_R is not set
|
||||
# CONFIG_NLS_KOI8_U is not set
|
||||
# CONFIG_NLS_UTF8 is not set
|
||||
|
||||
#
|
||||
# Profiling support
|
||||
#
|
||||
# CONFIG_PROFILING is not set
|
||||
|
||||
#
|
||||
# Kernel hacking
|
||||
#
|
||||
CONFIG_PRINTK_TIME=y
|
||||
CONFIG_DEBUG_KERNEL=y
|
||||
# CONFIG_MAGIC_SYSRQ is not set
|
||||
CONFIG_LOG_BUF_SHIFT=14
|
||||
CONFIG_DETECT_SOFTLOCKUP=y
|
||||
# CONFIG_SCHEDSTATS is not set
|
||||
# CONFIG_DEBUG_SLAB is not set
|
||||
CONFIG_DEBUG_PREEMPT=y
|
||||
# CONFIG_DEBUG_SPINLOCK is not set
|
||||
# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
|
||||
# CONFIG_DEBUG_KOBJECT is not set
|
||||
# CONFIG_DEBUG_BUGVERBOSE is not set
|
||||
CONFIG_DEBUG_INFO=y
|
||||
# CONFIG_DEBUG_FS is not set
|
||||
CONFIG_FRAME_POINTER=y
|
||||
CONFIG_DEBUG_USER=y
|
||||
CONFIG_DEBUG_WAITQ=y
|
||||
CONFIG_DEBUG_ERRORS=y
|
||||
CONFIG_DEBUG_LL=y
|
||||
# CONFIG_DEBUG_ICEDCC is not set
|
||||
# CONFIG_DEBUG_CLPS711X_UART2 is not set
|
||||
|
||||
#
|
||||
# Security options
|
||||
#
|
||||
# CONFIG_KEYS is not set
|
||||
# CONFIG_SECURITY is not set
|
||||
|
||||
#
|
||||
# Cryptographic options
|
||||
#
|
||||
CONFIG_CRYPTO=y
|
||||
# CONFIG_CRYPTO_HMAC 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_DES=y
|
||||
# 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_DEFLATE is not set
|
||||
# CONFIG_CRYPTO_MICHAEL_MIC is not set
|
||||
# CONFIG_CRYPTO_CRC32C is not set
|
||||
# CONFIG_CRYPTO_TEST is not set
|
||||
|
||||
#
|
||||
# Hardware crypto devices
|
||||
#
|
||||
|
||||
#
|
||||
# Library routines
|
||||
#
|
||||
# CONFIG_CRC_CCITT is not set
|
||||
# CONFIG_CRC16 is not set
|
||||
CONFIG_CRC32=y
|
||||
# CONFIG_LIBCRC32C is not set
|
||||
CONFIG_ZLIB_INFLATE=m
|
||||
CONFIG_ZLIB_DEFLATE=m
|
|
@ -2,7 +2,7 @@
|
|||
# Makefile for the linux kernel.
|
||||
#
|
||||
|
||||
AFLAGS_head.o := -DTEXTADDR=$(TEXTADDR) -DDATAADDR=$(DATAADDR)
|
||||
AFLAGS_head.o := -DKERNEL_RAM_ADDR=$(TEXTADDR)
|
||||
|
||||
# Object file lists.
|
||||
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
#include <linux/stddef.h>
|
||||
#include <linux/signal.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/sched.h>
|
||||
|
||||
#include <asm/ptrace.h>
|
||||
|
||||
|
|
|
@ -94,7 +94,6 @@ int main(void)
|
|||
DEFINE(VM_EXEC, VM_EXEC);
|
||||
BLANK();
|
||||
DEFINE(PAGE_SZ, PAGE_SIZE);
|
||||
DEFINE(VIRT_OFFSET, PAGE_OFFSET);
|
||||
BLANK();
|
||||
DEFINE(SYS_ERROR0, 0x9f0000);
|
||||
BLANK();
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
*/
|
||||
#include <linux/config.h>
|
||||
|
||||
#include <asm/memory.h>
|
||||
#include <asm/glue.h>
|
||||
#include <asm/vfpmacros.h>
|
||||
#include <asm/hardware.h> /* should be moved into entry-macro.S */
|
||||
|
@ -310,7 +311,7 @@ __pabt_svc:
|
|||
|
||||
#if __LINUX_ARM_ARCH__ < 6 && !defined(CONFIG_NEEDS_SYSCALL_FOR_CMPXCHG)
|
||||
@ make sure our user space atomic helper is aborted
|
||||
cmp r2, #VIRT_OFFSET
|
||||
cmp r2, #TASK_SIZE
|
||||
bichs r3, r3, #PSR_Z_BIT
|
||||
#endif
|
||||
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
#include <asm/procinfo.h>
|
||||
#include <asm/ptrace.h>
|
||||
#include <asm/asm-offsets.h>
|
||||
#include <asm/memory.h>
|
||||
#include <asm/thread_info.h>
|
||||
#include <asm/system.h>
|
||||
|
||||
|
@ -33,52 +34,28 @@
|
|||
#define MACHINFO_PGOFFIO 12
|
||||
#define MACHINFO_NAME 16
|
||||
|
||||
#ifndef CONFIG_XIP_KERNEL
|
||||
/*
|
||||
* We place the page tables 16K below TEXTADDR. Therefore, we must make sure
|
||||
* that TEXTADDR is correctly set. Currently, we expect the least significant
|
||||
* 16 bits to be 0x8000, but we could probably relax this restriction to
|
||||
* TEXTADDR >= PAGE_OFFSET + 0x4000
|
||||
*
|
||||
* Note that swapper_pg_dir is the virtual address of the page tables, and
|
||||
* pgtbl gives us a position-independent reference to these tables. We can
|
||||
* do this because stext == TEXTADDR
|
||||
* swapper_pg_dir is the virtual address of the initial page table.
|
||||
* We place the page tables 16K below KERNEL_RAM_ADDR. Therefore, we must
|
||||
* make sure that KERNEL_RAM_ADDR is correctly set. Currently, we expect
|
||||
* the least significant 16 bits to be 0x8000, but we could probably
|
||||
* relax this restriction to KERNEL_RAM_ADDR >= PAGE_OFFSET + 0x4000.
|
||||
*/
|
||||
#if (TEXTADDR & 0xffff) != 0x8000
|
||||
#error TEXTADDR must start at 0xXXXX8000
|
||||
#if (KERNEL_RAM_ADDR & 0xffff) != 0x8000
|
||||
#error KERNEL_RAM_ADDR must start at 0xXXXX8000
|
||||
#endif
|
||||
|
||||
.globl swapper_pg_dir
|
||||
.equ swapper_pg_dir, TEXTADDR - 0x4000
|
||||
.equ swapper_pg_dir, KERNEL_RAM_ADDR - 0x4000
|
||||
|
||||
.macro pgtbl, rd, phys
|
||||
adr \rd, stext
|
||||
sub \rd, \rd, #0x4000
|
||||
.macro pgtbl, rd
|
||||
ldr \rd, =(__virt_to_phys(KERNEL_RAM_ADDR - 0x4000))
|
||||
.endm
|
||||
|
||||
#ifdef CONFIG_XIP_KERNEL
|
||||
#define TEXTADDR XIP_VIRT_ADDR(CONFIG_XIP_PHYS_ADDR)
|
||||
#else
|
||||
/*
|
||||
* XIP Kernel:
|
||||
*
|
||||
* We place the page tables 16K below DATAADDR. Therefore, we must make sure
|
||||
* that DATAADDR is correctly set. Currently, we expect the least significant
|
||||
* 16 bits to be 0x8000, but we could probably relax this restriction to
|
||||
* DATAADDR >= PAGE_OFFSET + 0x4000
|
||||
*
|
||||
* Note that pgtbl is meant to return the physical address of swapper_pg_dir.
|
||||
* We can't make it relative to the kernel position in this case since
|
||||
* the kernel can physically be anywhere.
|
||||
*/
|
||||
#if (DATAADDR & 0xffff) != 0x8000
|
||||
#error DATAADDR must start at 0xXXXX8000
|
||||
#endif
|
||||
|
||||
.globl swapper_pg_dir
|
||||
.equ swapper_pg_dir, DATAADDR - 0x4000
|
||||
|
||||
.macro pgtbl, rd, phys
|
||||
ldr \rd, =((DATAADDR - 0x4000) - VIRT_OFFSET)
|
||||
add \rd, \rd, \phys
|
||||
.endm
|
||||
#define TEXTADDR KERNEL_RAM_ADDR
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
@ -279,7 +256,7 @@ __turn_mmu_on:
|
|||
.type __create_page_tables, %function
|
||||
__create_page_tables:
|
||||
ldr r5, [r8, #MACHINFO_PHYSRAM] @ physram
|
||||
pgtbl r4, r5 @ page table address
|
||||
pgtbl r4 @ page table address
|
||||
|
||||
/*
|
||||
* Clear the 16K level 1 swapper page table
|
||||
|
@ -324,7 +301,7 @@ __create_page_tables:
|
|||
/*
|
||||
* Then map first 1MB of ram in case it contains our boot params.
|
||||
*/
|
||||
add r0, r4, #VIRT_OFFSET >> 18
|
||||
add r0, r4, #PAGE_OFFSET >> 18
|
||||
orr r6, r5, r7
|
||||
str r6, [r0]
|
||||
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
*/
|
||||
#include <linux/config.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/moduleloader.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/elf.h>
|
||||
#include <linux/vmalloc.h>
|
||||
|
|
|
@ -782,7 +782,7 @@ static int do_ptrace(int request, struct task_struct *child, long addr, long dat
|
|||
return ret;
|
||||
}
|
||||
|
||||
asmlinkage int sys_ptrace(long request, long pid, long addr, long data)
|
||||
asmlinkage long sys_ptrace(long request, long pid, long addr, long data)
|
||||
{
|
||||
struct task_struct *child;
|
||||
int ret;
|
||||
|
|
|
@ -139,93 +139,33 @@ struct iwmmxt_sigframe {
|
|||
unsigned long storage[0x98/4];
|
||||
};
|
||||
|
||||
static int page_present(struct mm_struct *mm, void __user *uptr, int wr)
|
||||
{
|
||||
unsigned long addr = (unsigned long)uptr;
|
||||
pgd_t *pgd = pgd_offset(mm, addr);
|
||||
if (pgd_present(*pgd)) {
|
||||
pmd_t *pmd = pmd_offset(pgd, addr);
|
||||
if (pmd_present(*pmd)) {
|
||||
pte_t *pte = pte_offset_map(pmd, addr);
|
||||
return (pte_present(*pte) && (!wr || pte_write(*pte)));
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int copy_locked(void __user *uptr, void *kptr, size_t size, int write,
|
||||
void (*copyfn)(void *, void __user *))
|
||||
{
|
||||
unsigned char v, __user *userptr = uptr;
|
||||
int err = 0;
|
||||
|
||||
do {
|
||||
struct mm_struct *mm;
|
||||
|
||||
if (write) {
|
||||
__put_user_error(0, userptr, err);
|
||||
__put_user_error(0, userptr + size - 1, err);
|
||||
} else {
|
||||
__get_user_error(v, userptr, err);
|
||||
__get_user_error(v, userptr + size - 1, err);
|
||||
}
|
||||
|
||||
if (err)
|
||||
break;
|
||||
|
||||
mm = current->mm;
|
||||
spin_lock(&mm->page_table_lock);
|
||||
if (page_present(mm, userptr, write) &&
|
||||
page_present(mm, userptr + size - 1, write)) {
|
||||
copyfn(kptr, uptr);
|
||||
} else
|
||||
err = 1;
|
||||
spin_unlock(&mm->page_table_lock);
|
||||
} while (err);
|
||||
|
||||
return err;
|
||||
}
|
||||
|
||||
static int preserve_iwmmxt_context(struct iwmmxt_sigframe *frame)
|
||||
{
|
||||
int err = 0;
|
||||
char kbuf[sizeof(*frame) + 8];
|
||||
struct iwmmxt_sigframe *kframe;
|
||||
|
||||
/* the iWMMXt context must be 64 bit aligned */
|
||||
WARN_ON((unsigned long)frame & 7);
|
||||
|
||||
__put_user_error(IWMMXT_MAGIC0, &frame->magic0, err);
|
||||
__put_user_error(IWMMXT_MAGIC1, &frame->magic1, err);
|
||||
|
||||
/*
|
||||
* iwmmxt_task_copy() doesn't check user permissions.
|
||||
* Let's do a dummy write on the upper boundary to ensure
|
||||
* access to user mem is OK all way up.
|
||||
*/
|
||||
err |= copy_locked(&frame->storage, current_thread_info(),
|
||||
sizeof(frame->storage), 1, iwmmxt_task_copy);
|
||||
return err;
|
||||
kframe = (struct iwmmxt_sigframe *)((unsigned long)(kbuf + 8) & ~7);
|
||||
kframe->magic0 = IWMMXT_MAGIC0;
|
||||
kframe->magic1 = IWMMXT_MAGIC1;
|
||||
iwmmxt_task_copy(current_thread_info(), &kframe->storage);
|
||||
return __copy_to_user(frame, kframe, sizeof(*frame));
|
||||
}
|
||||
|
||||
static int restore_iwmmxt_context(struct iwmmxt_sigframe *frame)
|
||||
{
|
||||
unsigned long magic0, magic1;
|
||||
int err = 0;
|
||||
char kbuf[sizeof(*frame) + 8];
|
||||
struct iwmmxt_sigframe *kframe;
|
||||
|
||||
/* the iWMMXt context is 64 bit aligned */
|
||||
WARN_ON((unsigned long)frame & 7);
|
||||
|
||||
/*
|
||||
* Validate iWMMXt context signature.
|
||||
* Also, iwmmxt_task_restore() doesn't check user permissions.
|
||||
* Let's do a dummy write on the upper boundary to ensure
|
||||
* access to user mem is OK all way up.
|
||||
*/
|
||||
__get_user_error(magic0, &frame->magic0, err);
|
||||
__get_user_error(magic1, &frame->magic1, err);
|
||||
if (!err && magic0 == IWMMXT_MAGIC0 && magic1 == IWMMXT_MAGIC1)
|
||||
err = copy_locked(&frame->storage, current_thread_info(),
|
||||
sizeof(frame->storage), 0, iwmmxt_task_restore);
|
||||
return err;
|
||||
/* the iWMMXt context must be 64 bit aligned */
|
||||
kframe = (struct iwmmxt_sigframe *)((unsigned long)(kbuf + 8) & ~7);
|
||||
if (__copy_from_user(kframe, frame, sizeof(*frame)))
|
||||
return -1;
|
||||
if (kframe->magic0 != IWMMXT_MAGIC0 ||
|
||||
kframe->magic1 != IWMMXT_MAGIC1)
|
||||
return -1;
|
||||
iwmmxt_task_restore(current_thread_info(), &kframe->storage);
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
@ -36,10 +36,6 @@
|
|||
#include <asm/thread_info.h>
|
||||
#include <asm/mach/time.h>
|
||||
|
||||
u64 jiffies_64 = INITIAL_JIFFIES;
|
||||
|
||||
EXPORT_SYMBOL(jiffies_64);
|
||||
|
||||
/*
|
||||
* Our system timer.
|
||||
*/
|
||||
|
|
|
@ -198,25 +198,16 @@ void show_stack(struct task_struct *tsk, unsigned long *sp)
|
|||
barrier();
|
||||
}
|
||||
|
||||
DEFINE_SPINLOCK(die_lock);
|
||||
|
||||
/*
|
||||
* This function is protected against re-entrancy.
|
||||
*/
|
||||
NORET_TYPE void die(const char *str, struct pt_regs *regs, int err)
|
||||
static void __die(const char *str, int err, struct thread_info *thread, struct pt_regs *regs)
|
||||
{
|
||||
struct task_struct *tsk = current;
|
||||
struct task_struct *tsk = thread->task;
|
||||
static int die_counter;
|
||||
|
||||
console_verbose();
|
||||
spin_lock_irq(&die_lock);
|
||||
bust_spinlocks(1);
|
||||
|
||||
printk("Internal error: %s: %x [#%d]\n", str, err, ++die_counter);
|
||||
print_modules();
|
||||
__show_regs(regs);
|
||||
printk("Process %s (pid: %d, stack limit = 0x%p)\n",
|
||||
tsk->comm, tsk->pid, tsk->thread_info + 1);
|
||||
tsk->comm, tsk->pid, thread + 1);
|
||||
|
||||
if (!user_mode(regs) || in_interrupt()) {
|
||||
dump_mem("Stack: ", regs->ARM_sp,
|
||||
|
@ -224,7 +215,21 @@ NORET_TYPE void die(const char *str, struct pt_regs *regs, int err)
|
|||
dump_backtrace(regs, tsk);
|
||||
dump_instr(regs);
|
||||
}
|
||||
}
|
||||
|
||||
DEFINE_SPINLOCK(die_lock);
|
||||
|
||||
/*
|
||||
* This function is protected against re-entrancy.
|
||||
*/
|
||||
NORET_TYPE void die(const char *str, struct pt_regs *regs, int err)
|
||||
{
|
||||
struct thread_info *thread = current_thread_info();
|
||||
|
||||
console_verbose();
|
||||
spin_lock_irq(&die_lock);
|
||||
bust_spinlocks(1);
|
||||
__die(str, err, thread, regs);
|
||||
bust_spinlocks(0);
|
||||
spin_unlock_irq(&die_lock);
|
||||
do_exit(SIGSEGV);
|
||||
|
@ -345,7 +350,9 @@ static int bad_syscall(int n, struct pt_regs *regs)
|
|||
struct thread_info *thread = current_thread_info();
|
||||
siginfo_t info;
|
||||
|
||||
if (current->personality != PER_LINUX && thread->exec_domain->handler) {
|
||||
if (current->personality != PER_LINUX &&
|
||||
current->personality != PER_LINUX_32BIT &&
|
||||
thread->exec_domain->handler) {
|
||||
thread->exec_domain->handler(n, regs);
|
||||
return regs->ARM_r0;
|
||||
}
|
||||
|
@ -481,29 +488,33 @@ asmlinkage int arm_syscall(int no, struct pt_regs *regs)
|
|||
unsigned long addr = regs->ARM_r2;
|
||||
struct mm_struct *mm = current->mm;
|
||||
pgd_t *pgd; pmd_t *pmd; pte_t *pte;
|
||||
spinlock_t *ptl;
|
||||
|
||||
regs->ARM_cpsr &= ~PSR_C_BIT;
|
||||
spin_lock(&mm->page_table_lock);
|
||||
down_read(&mm->mmap_sem);
|
||||
pgd = pgd_offset(mm, addr);
|
||||
if (!pgd_present(*pgd))
|
||||
goto bad_access;
|
||||
pmd = pmd_offset(pgd, addr);
|
||||
if (!pmd_present(*pmd))
|
||||
goto bad_access;
|
||||
pte = pte_offset_map(pmd, addr);
|
||||
if (!pte_present(*pte) || !pte_write(*pte))
|
||||
pte = pte_offset_map_lock(mm, pmd, addr, &ptl);
|
||||
if (!pte_present(*pte) || !pte_write(*pte)) {
|
||||
pte_unmap_unlock(pte, ptl);
|
||||
goto bad_access;
|
||||
}
|
||||
val = *(unsigned long *)addr;
|
||||
val -= regs->ARM_r0;
|
||||
if (val == 0) {
|
||||
*(unsigned long *)addr = regs->ARM_r1;
|
||||
regs->ARM_cpsr |= PSR_C_BIT;
|
||||
}
|
||||
spin_unlock(&mm->page_table_lock);
|
||||
pte_unmap_unlock(pte, ptl);
|
||||
up_read(&mm->mmap_sem);
|
||||
return val;
|
||||
|
||||
bad_access:
|
||||
spin_unlock(&mm->page_table_lock);
|
||||
up_read(&mm->mmap_sem);
|
||||
/* simulate a write access fault */
|
||||
do_DataAbort(addr, 15 + (1 << 11), regs);
|
||||
return -1;
|
||||
|
|
|
@ -6,14 +6,23 @@
|
|||
#include <asm-generic/vmlinux.lds.h>
|
||||
#include <linux/config.h>
|
||||
#include <asm/thread_info.h>
|
||||
#include <asm/memory.h>
|
||||
|
||||
OUTPUT_ARCH(arm)
|
||||
ENTRY(stext)
|
||||
|
||||
#ifndef __ARMEB__
|
||||
jiffies = jiffies_64;
|
||||
#else
|
||||
jiffies = jiffies_64 + 4;
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_XIP_KERNEL
|
||||
#define TEXTADDR XIP_VIRT_ADDR(CONFIG_XIP_PHYS_ADDR)
|
||||
#else
|
||||
#define TEXTADDR KERNEL_RAM_ADDR
|
||||
#endif
|
||||
|
||||
SECTIONS
|
||||
{
|
||||
. = TEXTADDR;
|
||||
|
@ -95,7 +104,7 @@ SECTIONS
|
|||
|
||||
#ifdef CONFIG_XIP_KERNEL
|
||||
__data_loc = ALIGN(4); /* location in binary */
|
||||
. = DATAADDR;
|
||||
. = KERNEL_RAM_ADDR;
|
||||
#else
|
||||
. = ALIGN(THREAD_SIZE);
|
||||
__data_loc = .;
|
||||
|
|
|
@ -11,7 +11,7 @@ lib-y := backtrace.o changebit.o csumipv6.o csumpartial.o \
|
|||
strnlen_user.o strchr.o strrchr.o testchangebit.o \
|
||||
testclearbit.o testsetbit.o uaccess.o getuser.o \
|
||||
putuser.o ashldi3.o ashrdi3.o lshrdi3.o muldi3.o \
|
||||
ucmpdi2.o lib1funcs.o div64.o \
|
||||
ucmpdi2.o lib1funcs.o div64.o sha1.o \
|
||||
io-readsb.o io-writesb.o io-readsl.o io-writesl.o
|
||||
|
||||
ifeq ($(CONFIG_CPU_32v3),y)
|
||||
|
|
48
arch/arm/lib/ashldi3.S
Normal file
48
arch/arm/lib/ashldi3.S
Normal file
|
@ -0,0 +1,48 @@
|
|||
/* Copyright 1995, 1996, 1998, 1999, 2000, 2003, 2004, 2005
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
This file is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by the
|
||||
Free Software Foundation; either version 2, or (at your option) any
|
||||
later version.
|
||||
|
||||
In addition to the permissions in the GNU General Public License, the
|
||||
Free Software Foundation gives you unlimited permission to link the
|
||||
compiled version of this file into combinations with other programs,
|
||||
and to distribute those combinations without any restriction coming
|
||||
from the use of this file. (The General Public License restrictions
|
||||
do apply in other respects; for example, they cover modification of
|
||||
the file, and distribution when not linked into a combine
|
||||
executable.)
|
||||
|
||||
This file is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; see the file COPYING. If not, write to
|
||||
the Free Software Foundation, 51 Franklin Street, Fifth Floor,
|
||||
Boston, MA 02110-1301, USA. */
|
||||
|
||||
|
||||
#include <linux/linkage.h>
|
||||
|
||||
#ifdef __ARMEB__
|
||||
#define al r1
|
||||
#define ah r0
|
||||
#else
|
||||
#define al r0
|
||||
#define ah r1
|
||||
#endif
|
||||
|
||||
ENTRY(__ashldi3)
|
||||
|
||||
subs r3, r2, #32
|
||||
rsb ip, r2, #32
|
||||
movmi ah, ah, lsl r2
|
||||
movpl ah, al, lsl r3
|
||||
orrmi ah, ah, al, lsr ip
|
||||
mov al, al, lsl r2
|
||||
mov pc, lr
|
||||
|
|
@ -1,56 +0,0 @@
|
|||
/* More subroutines needed by GCC output code on some machines. */
|
||||
/* Compile this one with gcc. */
|
||||
/* Copyright (C) 1989, 92-98, 1999 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU CC.
|
||||
|
||||
GNU CC is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2, or (at your option)
|
||||
any later version.
|
||||
|
||||
GNU CC is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GNU CC; see the file COPYING. If not, write to
|
||||
the Free Software Foundation, 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
/* As a special exception, if you link this library with other files,
|
||||
some of which are compiled with GCC, to produce an executable,
|
||||
this library does not by itself cause the resulting executable
|
||||
to be covered by the GNU General Public License.
|
||||
This exception does not however invalidate any other reasons why
|
||||
the executable file might be covered by the GNU General Public License.
|
||||
*/
|
||||
/* support functions required by the kernel. based on code from gcc-2.95.3 */
|
||||
/* I Molton 29/07/01 */
|
||||
|
||||
#include "gcclib.h"
|
||||
|
||||
s64 __ashldi3(s64 u, int b)
|
||||
{
|
||||
DIunion w;
|
||||
int bm;
|
||||
DIunion uu;
|
||||
|
||||
if (b == 0)
|
||||
return u;
|
||||
|
||||
uu.ll = u;
|
||||
|
||||
bm = (sizeof(s32) * BITS_PER_UNIT) - b;
|
||||
if (bm <= 0) {
|
||||
w.s.low = 0;
|
||||
w.s.high = (u32) uu.s.low << -bm;
|
||||
} else {
|
||||
u32 carries = (u32) uu.s.low >> bm;
|
||||
w.s.low = (u32) uu.s.low << b;
|
||||
w.s.high = ((u32) uu.s.high << b) | carries;
|
||||
}
|
||||
|
||||
return w.ll;
|
||||
}
|
48
arch/arm/lib/ashrdi3.S
Normal file
48
arch/arm/lib/ashrdi3.S
Normal file
|
@ -0,0 +1,48 @@
|
|||
/* Copyright 1995, 1996, 1998, 1999, 2000, 2003, 2004, 2005
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
This file is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by the
|
||||
Free Software Foundation; either version 2, or (at your option) any
|
||||
later version.
|
||||
|
||||
In addition to the permissions in the GNU General Public License, the
|
||||
Free Software Foundation gives you unlimited permission to link the
|
||||
compiled version of this file into combinations with other programs,
|
||||
and to distribute those combinations without any restriction coming
|
||||
from the use of this file. (The General Public License restrictions
|
||||
do apply in other respects; for example, they cover modification of
|
||||
the file, and distribution when not linked into a combine
|
||||
executable.)
|
||||
|
||||
This file is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; see the file COPYING. If not, write to
|
||||
the Free Software Foundation, 51 Franklin Street, Fifth Floor,
|
||||
Boston, MA 02110-1301, USA. */
|
||||
|
||||
|
||||
#include <linux/linkage.h>
|
||||
|
||||
#ifdef __ARMEB__
|
||||
#define al r1
|
||||
#define ah r0
|
||||
#else
|
||||
#define al r0
|
||||
#define ah r1
|
||||
#endif
|
||||
|
||||
ENTRY(__ashrdi3)
|
||||
|
||||
subs r3, r2, #32
|
||||
rsb ip, r2, #32
|
||||
movmi al, al, lsr r2
|
||||
movpl al, ah, asr r3
|
||||
orrmi al, al, ah, lsl ip
|
||||
mov ah, ah, asr r2
|
||||
mov pc, lr
|
||||
|
|
@ -1,57 +0,0 @@
|
|||
/* More subroutines needed by GCC output code on some machines. */
|
||||
/* Compile this one with gcc. */
|
||||
/* Copyright (C) 1989, 92-98, 1999 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU CC.
|
||||
|
||||
GNU CC is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2, or (at your option)
|
||||
any later version.
|
||||
|
||||
GNU CC is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GNU CC; see the file COPYING. If not, write to
|
||||
the Free Software Foundation, 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
/* As a special exception, if you link this library with other files,
|
||||
some of which are compiled with GCC, to produce an executable,
|
||||
this library does not by itself cause the resulting executable
|
||||
to be covered by the GNU General Public License.
|
||||
This exception does not however invalidate any other reasons why
|
||||
the executable file might be covered by the GNU General Public License.
|
||||
*/
|
||||
/* support functions required by the kernel. based on code from gcc-2.95.3 */
|
||||
/* I Molton 29/07/01 */
|
||||
|
||||
#include "gcclib.h"
|
||||
|
||||
s64 __ashrdi3(s64 u, int b)
|
||||
{
|
||||
DIunion w;
|
||||
int bm;
|
||||
DIunion uu;
|
||||
|
||||
if (b == 0)
|
||||
return u;
|
||||
|
||||
uu.ll = u;
|
||||
|
||||
bm = (sizeof(s32) * BITS_PER_UNIT) - b;
|
||||
if (bm <= 0) {
|
||||
/* w.s.high = 1..1 or 0..0 */
|
||||
w.s.high = uu.s.high >> (sizeof(s32) * BITS_PER_UNIT - 1);
|
||||
w.s.low = uu.s.high >> -bm;
|
||||
} else {
|
||||
u32 carries = (u32) uu.s.high << bm;
|
||||
w.s.high = uu.s.high >> b;
|
||||
w.s.low = ((u32) uu.s.low >> b) | carries;
|
||||
}
|
||||
|
||||
return w.ll;
|
||||
}
|
|
@ -1,22 +0,0 @@
|
|||
/* gcclib.h -- definitions for various functions 'borrowed' from gcc-2.95.3 */
|
||||
/* I Molton 29/07/01 */
|
||||
|
||||
#include <linux/types.h>
|
||||
|
||||
#define BITS_PER_UNIT 8
|
||||
#define SI_TYPE_SIZE (sizeof(s32) * BITS_PER_UNIT)
|
||||
|
||||
#ifdef __ARMEB__
|
||||
struct DIstruct {
|
||||
s32 high, low;
|
||||
};
|
||||
#else
|
||||
struct DIstruct {
|
||||
s32 low, high;
|
||||
};
|
||||
#endif
|
||||
|
||||
typedef union {
|
||||
struct DIstruct s;
|
||||
s64 ll;
|
||||
} DIunion;
|
48
arch/arm/lib/lshrdi3.S
Normal file
48
arch/arm/lib/lshrdi3.S
Normal file
|
@ -0,0 +1,48 @@
|
|||
/* Copyright 1995, 1996, 1998, 1999, 2000, 2003, 2004, 2005
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
This file is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by the
|
||||
Free Software Foundation; either version 2, or (at your option) any
|
||||
later version.
|
||||
|
||||
In addition to the permissions in the GNU General Public License, the
|
||||
Free Software Foundation gives you unlimited permission to link the
|
||||
compiled version of this file into combinations with other programs,
|
||||
and to distribute those combinations without any restriction coming
|
||||
from the use of this file. (The General Public License restrictions
|
||||
do apply in other respects; for example, they cover modification of
|
||||
the file, and distribution when not linked into a combine
|
||||
executable.)
|
||||
|
||||
This file is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; see the file COPYING. If not, write to
|
||||
the Free Software Foundation, 51 Franklin Street, Fifth Floor,
|
||||
Boston, MA 02110-1301, USA. */
|
||||
|
||||
|
||||
#include <linux/linkage.h>
|
||||
|
||||
#ifdef __ARMEB__
|
||||
#define al r1
|
||||
#define ah r0
|
||||
#else
|
||||
#define al r0
|
||||
#define ah r1
|
||||
#endif
|
||||
|
||||
ENTRY(__lshrdi3)
|
||||
|
||||
subs r3, r2, #32
|
||||
rsb ip, r2, #32
|
||||
movmi al, al, lsr r2
|
||||
movpl al, ah, lsr r3
|
||||
orrmi al, al, ah, lsl ip
|
||||
mov ah, ah, lsr r2
|
||||
mov pc, lr
|
||||
|
|
@ -1,56 +0,0 @@
|
|||
/* More subroutines needed by GCC output code on some machines. */
|
||||
/* Compile this one with gcc. */
|
||||
/* Copyright (C) 1989, 92-98, 1999 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU CC.
|
||||
|
||||
GNU CC is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2, or (at your option)
|
||||
any later version.
|
||||
|
||||
GNU CC is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GNU CC; see the file COPYING. If not, write to
|
||||
the Free Software Foundation, 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
/* As a special exception, if you link this library with other files,
|
||||
some of which are compiled with GCC, to produce an executable,
|
||||
this library does not by itself cause the resulting executable
|
||||
to be covered by the GNU General Public License.
|
||||
This exception does not however invalidate any other reasons why
|
||||
the executable file might be covered by the GNU General Public License.
|
||||
*/
|
||||
/* support functions required by the kernel. based on code from gcc-2.95.3 */
|
||||
/* I Molton 29/07/01 */
|
||||
|
||||
#include "gcclib.h"
|
||||
|
||||
s64 __lshrdi3(s64 u, int b)
|
||||
{
|
||||
DIunion w;
|
||||
int bm;
|
||||
DIunion uu;
|
||||
|
||||
if (b == 0)
|
||||
return u;
|
||||
|
||||
uu.ll = u;
|
||||
|
||||
bm = (sizeof(s32) * BITS_PER_UNIT) - b;
|
||||
if (bm <= 0) {
|
||||
w.s.high = 0;
|
||||
w.s.low = (u32) uu.s.high >> -bm;
|
||||
} else {
|
||||
u32 carries = (u32) uu.s.high << bm;
|
||||
w.s.high = (u32) uu.s.high >> b;
|
||||
w.s.low = ((u32) uu.s.low >> b) | carries;
|
||||
}
|
||||
|
||||
return w.ll;
|
||||
}
|
44
arch/arm/lib/muldi3.S
Normal file
44
arch/arm/lib/muldi3.S
Normal file
|
@ -0,0 +1,44 @@
|
|||
/*
|
||||
* linux/arch/arm/lib/muldi3.S
|
||||
*
|
||||
* Author: Nicolas Pitre
|
||||
* Created: Oct 19, 2005
|
||||
* Copyright: Monta Vista Software, Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*/
|
||||
|
||||
#include <linux/linkage.h>
|
||||
|
||||
#ifdef __ARMEB__
|
||||
#define xh r0
|
||||
#define xl r1
|
||||
#define yh r2
|
||||
#define yl r3
|
||||
#else
|
||||
#define xl r0
|
||||
#define xh r1
|
||||
#define yl r2
|
||||
#define yh r3
|
||||
#endif
|
||||
|
||||
ENTRY(__muldi3)
|
||||
|
||||
mul xh, yl, xh
|
||||
mla xh, xl, yh, xh
|
||||
mov ip, xl, asr #16
|
||||
mov yh, yl, asr #16
|
||||
bic xl, xl, ip, lsl #16
|
||||
bic yl, yl, yh, lsl #16
|
||||
mla xh, yh, ip, xh
|
||||
mul yh, xl, yh
|
||||
mul xl, yl, xl
|
||||
mul ip, yl, ip
|
||||
adds xl, xl, yh, lsl #16
|
||||
adc xh, xh, yh, lsr #16
|
||||
adds xl, xl, ip, lsl #16
|
||||
adc xh, xh, ip, lsr #16
|
||||
mov pc, lr
|
||||
|
|
@ -1,72 +0,0 @@
|
|||
/* More subroutines needed by GCC output code on some machines. */
|
||||
/* Compile this one with gcc. */
|
||||
/* Copyright (C) 1989, 92-98, 1999 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU CC.
|
||||
|
||||
GNU CC is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2, or (at your option)
|
||||
any later version.
|
||||
|
||||
GNU CC is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GNU CC; see the file COPYING. If not, write to
|
||||
the Free Software Foundation, 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
/* As a special exception, if you link this library with other files,
|
||||
some of which are compiled with GCC, to produce an executable,
|
||||
this library does not by itself cause the resulting executable
|
||||
to be covered by the GNU General Public License.
|
||||
This exception does not however invalidate any other reasons why
|
||||
the executable file might be covered by the GNU General Public License.
|
||||
*/
|
||||
/* support functions required by the kernel. based on code from gcc-2.95.3 */
|
||||
/* I Molton 29/07/01 */
|
||||
|
||||
#include "gcclib.h"
|
||||
|
||||
#define umul_ppmm(xh, xl, a, b) \
|
||||
{register u32 __t0, __t1, __t2; \
|
||||
__asm__ ("%@ Inlined umul_ppmm \n\
|
||||
mov %2, %5, lsr #16 \n\
|
||||
mov %0, %6, lsr #16 \n\
|
||||
bic %3, %5, %2, lsl #16 \n\
|
||||
bic %4, %6, %0, lsl #16 \n\
|
||||
mul %1, %3, %4 \n\
|
||||
mul %4, %2, %4 \n\
|
||||
mul %3, %0, %3 \n\
|
||||
mul %0, %2, %0 \n\
|
||||
adds %3, %4, %3 \n\
|
||||
addcs %0, %0, #65536 \n\
|
||||
adds %1, %1, %3, lsl #16 \n\
|
||||
adc %0, %0, %3, lsr #16" \
|
||||
: "=&r" ((u32) (xh)), \
|
||||
"=r" ((u32) (xl)), \
|
||||
"=&r" (__t0), "=&r" (__t1), "=r" (__t2) \
|
||||
: "r" ((u32) (a)), \
|
||||
"r" ((u32) (b)));}
|
||||
|
||||
#define __umulsidi3(u, v) \
|
||||
({DIunion __w; \
|
||||
umul_ppmm (__w.s.high, __w.s.low, u, v); \
|
||||
__w.ll; })
|
||||
|
||||
s64 __muldi3(s64 u, s64 v)
|
||||
{
|
||||
DIunion w;
|
||||
DIunion uu, vv;
|
||||
|
||||
uu.ll = u, vv.ll = v;
|
||||
|
||||
w.ll = __umulsidi3(uu.s.low, vv.s.low);
|
||||
w.s.high += ((u32) uu.s.low * (u32) vv.s.high
|
||||
+ (u32) uu.s.high * (u32) vv.s.low);
|
||||
|
||||
return w.ll;
|
||||
}
|
206
arch/arm/lib/sha1.S
Normal file
206
arch/arm/lib/sha1.S
Normal file
|
@ -0,0 +1,206 @@
|
|||
/*
|
||||
* linux/arch/arm/lib/sha1.S
|
||||
*
|
||||
* SHA transform optimized for ARM
|
||||
*
|
||||
* Copyright: (C) 2005 by Nicolas Pitre <nico@cam.org>
|
||||
* Created: September 17, 2005
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* The reference implementation for this code is linux/lib/sha1.c
|
||||
*/
|
||||
|
||||
#include <linux/linkage.h>
|
||||
|
||||
.text
|
||||
|
||||
|
||||
/*
|
||||
* void sha_transform(__u32 *digest, const char *in, __u32 *W)
|
||||
*
|
||||
* Note: the "in" ptr may be unaligned.
|
||||
*/
|
||||
|
||||
ENTRY(sha_transform)
|
||||
|
||||
stmfd sp!, {r4 - r8, lr}
|
||||
|
||||
@ for (i = 0; i < 16; i++)
|
||||
@ W[i] = be32_to_cpu(in[i]); */
|
||||
|
||||
#ifdef __ARMEB__
|
||||
mov r4, r0
|
||||
mov r0, r2
|
||||
mov r2, #64
|
||||
bl memcpy
|
||||
mov r2, r0
|
||||
mov r0, r4
|
||||
#else
|
||||
mov r3, r2
|
||||
mov lr, #16
|
||||
1: ldrb r4, [r1], #1
|
||||
ldrb r5, [r1], #1
|
||||
ldrb r6, [r1], #1
|
||||
ldrb r7, [r1], #1
|
||||
subs lr, lr, #1
|
||||
orr r5, r5, r4, lsl #8
|
||||
orr r6, r6, r5, lsl #8
|
||||
orr r7, r7, r6, lsl #8
|
||||
str r7, [r3], #4
|
||||
bne 1b
|
||||
#endif
|
||||
|
||||
@ for (i = 0; i < 64; i++)
|
||||
@ W[i+16] = ror(W[i+13] ^ W[i+8] ^ W[i+2] ^ W[i], 31);
|
||||
|
||||
sub r3, r2, #4
|
||||
mov lr, #64
|
||||
2: ldr r4, [r3, #4]!
|
||||
subs lr, lr, #1
|
||||
ldr r5, [r3, #8]
|
||||
ldr r6, [r3, #32]
|
||||
ldr r7, [r3, #52]
|
||||
eor r4, r4, r5
|
||||
eor r4, r4, r6
|
||||
eor r4, r4, r7
|
||||
mov r4, r4, ror #31
|
||||
str r4, [r3, #64]
|
||||
bne 2b
|
||||
|
||||
/*
|
||||
* The SHA functions are:
|
||||
*
|
||||
* f1(B,C,D) = (D ^ (B & (C ^ D)))
|
||||
* f2(B,C,D) = (B ^ C ^ D)
|
||||
* f3(B,C,D) = ((B & C) | (D & (B | C)))
|
||||
*
|
||||
* Then the sub-blocks are processed as follows:
|
||||
*
|
||||
* A' = ror(A, 27) + f(B,C,D) + E + K + *W++
|
||||
* B' = A
|
||||
* C' = ror(B, 2)
|
||||
* D' = C
|
||||
* E' = D
|
||||
*
|
||||
* We therefore unroll each loop 5 times to avoid register shuffling.
|
||||
* Also the ror for C (and also D and E which are successivelyderived
|
||||
* from it) is applied in place to cut on an additional mov insn for
|
||||
* each round.
|
||||
*/
|
||||
|
||||
.macro sha_f1, A, B, C, D, E
|
||||
ldr r3, [r2], #4
|
||||
eor ip, \C, \D
|
||||
add \E, r1, \E, ror #2
|
||||
and ip, \B, ip, ror #2
|
||||
add \E, \E, \A, ror #27
|
||||
eor ip, ip, \D, ror #2
|
||||
add \E, \E, r3
|
||||
add \E, \E, ip
|
||||
.endm
|
||||
|
||||
.macro sha_f2, A, B, C, D, E
|
||||
ldr r3, [r2], #4
|
||||
add \E, r1, \E, ror #2
|
||||
eor ip, \B, \C, ror #2
|
||||
add \E, \E, \A, ror #27
|
||||
eor ip, ip, \D, ror #2
|
||||
add \E, \E, r3
|
||||
add \E, \E, ip
|
||||
.endm
|
||||
|
||||
.macro sha_f3, A, B, C, D, E
|
||||
ldr r3, [r2], #4
|
||||
add \E, r1, \E, ror #2
|
||||
orr ip, \B, \C, ror #2
|
||||
add \E, \E, \A, ror #27
|
||||
and ip, ip, \D, ror #2
|
||||
add \E, \E, r3
|
||||
and r3, \B, \C, ror #2
|
||||
orr ip, ip, r3
|
||||
add \E, \E, ip
|
||||
.endm
|
||||
|
||||
ldmia r0, {r4 - r8}
|
||||
|
||||
mov lr, #4
|
||||
ldr r1, .L_sha_K + 0
|
||||
|
||||
/* adjust initial values */
|
||||
mov r6, r6, ror #30
|
||||
mov r7, r7, ror #30
|
||||
mov r8, r8, ror #30
|
||||
|
||||
3: subs lr, lr, #1
|
||||
sha_f1 r4, r5, r6, r7, r8
|
||||
sha_f1 r8, r4, r5, r6, r7
|
||||
sha_f1 r7, r8, r4, r5, r6
|
||||
sha_f1 r6, r7, r8, r4, r5
|
||||
sha_f1 r5, r6, r7, r8, r4
|
||||
bne 3b
|
||||
|
||||
ldr r1, .L_sha_K + 4
|
||||
mov lr, #4
|
||||
|
||||
4: subs lr, lr, #1
|
||||
sha_f2 r4, r5, r6, r7, r8
|
||||
sha_f2 r8, r4, r5, r6, r7
|
||||
sha_f2 r7, r8, r4, r5, r6
|
||||
sha_f2 r6, r7, r8, r4, r5
|
||||
sha_f2 r5, r6, r7, r8, r4
|
||||
bne 4b
|
||||
|
||||
ldr r1, .L_sha_K + 8
|
||||
mov lr, #4
|
||||
|
||||
5: subs lr, lr, #1
|
||||
sha_f3 r4, r5, r6, r7, r8
|
||||
sha_f3 r8, r4, r5, r6, r7
|
||||
sha_f3 r7, r8, r4, r5, r6
|
||||
sha_f3 r6, r7, r8, r4, r5
|
||||
sha_f3 r5, r6, r7, r8, r4
|
||||
bne 5b
|
||||
|
||||
ldr r1, .L_sha_K + 12
|
||||
mov lr, #4
|
||||
|
||||
6: subs lr, lr, #1
|
||||
sha_f2 r4, r5, r6, r7, r8
|
||||
sha_f2 r8, r4, r5, r6, r7
|
||||
sha_f2 r7, r8, r4, r5, r6
|
||||
sha_f2 r6, r7, r8, r4, r5
|
||||
sha_f2 r5, r6, r7, r8, r4
|
||||
bne 6b
|
||||
|
||||
ldmia r0, {r1, r2, r3, ip, lr}
|
||||
add r4, r1, r4
|
||||
add r5, r2, r5
|
||||
add r6, r3, r6, ror #2
|
||||
add r7, ip, r7, ror #2
|
||||
add r8, lr, r8, ror #2
|
||||
stmia r0, {r4 - r8}
|
||||
|
||||
ldmfd sp!, {r4 - r8, pc}
|
||||
|
||||
.L_sha_K:
|
||||
.word 0x5a827999, 0x6ed9eba1, 0x8f1bbcdc, 0xca62c1d6
|
||||
|
||||
|
||||
/*
|
||||
* void sha_init(__u32 *buf)
|
||||
*/
|
||||
|
||||
.L_sha_initial_digest:
|
||||
.word 0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476, 0xc3d2e1f0
|
||||
|
||||
ENTRY(sha_init)
|
||||
|
||||
str lr, [sp, #-4]!
|
||||
adr r1, .L_sha_initial_digest
|
||||
ldmia r1, {r1, r2, r3, ip, lr}
|
||||
stmia r0, {r1, r2, r3, ip, lr}
|
||||
ldr pc, [sp], #4
|
||||
|
35
arch/arm/lib/ucmpdi2.S
Normal file
35
arch/arm/lib/ucmpdi2.S
Normal file
|
@ -0,0 +1,35 @@
|
|||
/*
|
||||
* linux/arch/arm/lib/ucmpdi2.S
|
||||
*
|
||||
* Author: Nicolas Pitre
|
||||
* Created: Oct 19, 2005
|
||||
* Copyright: Monta Vista Software, Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*/
|
||||
|
||||
#include <linux/linkage.h>
|
||||
|
||||
#ifdef __ARMEB__
|
||||
#define xh r0
|
||||
#define xl r1
|
||||
#define yh r2
|
||||
#define yl r3
|
||||
#else
|
||||
#define xl r0
|
||||
#define xh r1
|
||||
#define yl r2
|
||||
#define yh r3
|
||||
#endif
|
||||
|
||||
ENTRY(__ucmpdi2)
|
||||
|
||||
cmp xh, yh
|
||||
cmpeq xl, yl
|
||||
movlo r0, #0
|
||||
moveq r0, #1
|
||||
movhi r0, #2
|
||||
mov pc, lr
|
||||
|
|
@ -1,49 +0,0 @@
|
|||
/* More subroutines needed by GCC output code on some machines. */
|
||||
/* Compile this one with gcc. */
|
||||
/* Copyright (C) 1989, 92-98, 1999 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU CC.
|
||||
|
||||
GNU CC is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2, or (at your option)
|
||||
any later version.
|
||||
|
||||
GNU CC is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GNU CC; see the file COPYING. If not, write to
|
||||
the Free Software Foundation, 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
/* As a special exception, if you link this library with other files,
|
||||
some of which are compiled with GCC, to produce an executable,
|
||||
this library does not by itself cause the resulting executable
|
||||
to be covered by the GNU General Public License.
|
||||
This exception does not however invalidate any other reasons why
|
||||
the executable file might be covered by the GNU General Public License.
|
||||
*/
|
||||
/* support functions required by the kernel. based on code from gcc-2.95.3 */
|
||||
/* I Molton 29/07/01 */
|
||||
|
||||
#include "gcclib.h"
|
||||
|
||||
int __ucmpdi2(s64 a, s64 b)
|
||||
{
|
||||
DIunion au, bu;
|
||||
|
||||
au.ll = a, bu.ll = b;
|
||||
|
||||
if ((u32) au.s.high < (u32) bu.s.high)
|
||||
return 0;
|
||||
else if ((u32) au.s.high > (u32) bu.s.high)
|
||||
return 2;
|
||||
if ((u32) au.s.low < (u32) bu.s.low)
|
||||
return 0;
|
||||
else if ((u32) au.s.low > (u32) bu.s.low)
|
||||
return 2;
|
||||
return 1;
|
||||
}
|
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
|
||||
# Common support (must be linked before board specific support)
|
||||
obj-y += core.o
|
||||
obj-y += core.o clock.o
|
||||
|
||||
# Specific board support
|
||||
obj-$(CONFIG_MACH_AAED2000) += aaed2000.o
|
||||
|
|
|
@ -27,16 +27,65 @@
|
|||
#include <asm/mach/map.h>
|
||||
#include <asm/mach/irq.h>
|
||||
|
||||
#include <asm/arch/aaed2000.h>
|
||||
|
||||
#include "core.h"
|
||||
|
||||
static void aaed2000_clcd_disable(struct clcd_fb *fb)
|
||||
{
|
||||
AAED_EXT_GPIO &= ~AAED_EGPIO_LCD_PWR_EN;
|
||||
}
|
||||
|
||||
static void aaed2000_clcd_enable(struct clcd_fb *fb)
|
||||
{
|
||||
AAED_EXT_GPIO |= AAED_EGPIO_LCD_PWR_EN;
|
||||
}
|
||||
|
||||
struct aaec2000_clcd_info clcd_info = {
|
||||
.enable = aaed2000_clcd_enable,
|
||||
.disable = aaed2000_clcd_disable,
|
||||
.panel = {
|
||||
.mode = {
|
||||
.name = "Sharp",
|
||||
.refresh = 60,
|
||||
.xres = 640,
|
||||
.yres = 480,
|
||||
.pixclock = 39721,
|
||||
.left_margin = 20,
|
||||
.right_margin = 44,
|
||||
.upper_margin = 21,
|
||||
.lower_margin = 34,
|
||||
.hsync_len = 96,
|
||||
.vsync_len = 2,
|
||||
.sync = 0,
|
||||
.vmode = FB_VMODE_NONINTERLACED,
|
||||
},
|
||||
.width = -1,
|
||||
.height = -1,
|
||||
.tim2 = TIM2_IVS | TIM2_IHS,
|
||||
.cntl = CNTL_LCDTFT,
|
||||
.bpp = 16,
|
||||
},
|
||||
};
|
||||
|
||||
static void __init aaed2000_init_irq(void)
|
||||
{
|
||||
aaec2000_init_irq();
|
||||
}
|
||||
|
||||
static void __init aaed2000_init(void)
|
||||
{
|
||||
aaec2000_set_clcd_plat_data(&clcd_info);
|
||||
}
|
||||
|
||||
static struct map_desc aaed2000_io_desc[] __initdata = {
|
||||
{ EXT_GPIO_VBASE, EXT_GPIO_PBASE, EXT_GPIO_LENGTH, MT_DEVICE }, /* Ext GPIO */
|
||||
};
|
||||
|
||||
static void __init aaed2000_map_io(void)
|
||||
{
|
||||
aaec2000_map_io();
|
||||
iotable_init(aaed2000_io_desc, ARRAY_SIZE(aaed2000_io_desc));
|
||||
}
|
||||
|
||||
MACHINE_START(AAED2000, "Agilent AAED-2000 Development Platform")
|
||||
|
@ -47,4 +96,5 @@ MACHINE_START(AAED2000, "Agilent AAED-2000 Development Platform")
|
|||
.map_io = aaed2000_map_io,
|
||||
.init_irq = aaed2000_init_irq,
|
||||
.timer = &aaec2000_timer,
|
||||
.init_machine = aaed2000_init,
|
||||
MACHINE_END
|
||||
|
|
110
arch/arm/mach-aaec2000/clock.c
Normal file
110
arch/arm/mach-aaec2000/clock.c
Normal file
|
@ -0,0 +1,110 @@
|
|||
/*
|
||||
* linux/arch/arm/mach-aaec2000/clock.c
|
||||
*
|
||||
* Copyright (C) 2005 Nicolas Bellido Y Ortega
|
||||
*
|
||||
* Based on linux/arch/arm/mach-integrator/clock.c
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*/
|
||||
#include <linux/module.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/list.h>
|
||||
#include <linux/errno.h>
|
||||
#include <linux/err.h>
|
||||
|
||||
#include <asm/semaphore.h>
|
||||
#include <asm/hardware/clock.h>
|
||||
|
||||
#include "clock.h"
|
||||
|
||||
static LIST_HEAD(clocks);
|
||||
static DECLARE_MUTEX(clocks_sem);
|
||||
|
||||
struct clk *clk_get(struct device *dev, const char *id)
|
||||
{
|
||||
struct clk *p, *clk = ERR_PTR(-ENOENT);
|
||||
|
||||
down(&clocks_sem);
|
||||
list_for_each_entry(p, &clocks, node) {
|
||||
if (strcmp(id, p->name) == 0 && try_module_get(p->owner)) {
|
||||
clk = p;
|
||||
break;
|
||||
}
|
||||
}
|
||||
up(&clocks_sem);
|
||||
|
||||
return clk;
|
||||
}
|
||||
EXPORT_SYMBOL(clk_get);
|
||||
|
||||
void clk_put(struct clk *clk)
|
||||
{
|
||||
module_put(clk->owner);
|
||||
}
|
||||
EXPORT_SYMBOL(clk_put);
|
||||
|
||||
int clk_enable(struct clk *clk)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL(clk_enable);
|
||||
|
||||
void clk_disable(struct clk *clk)
|
||||
{
|
||||
}
|
||||
EXPORT_SYMBOL(clk_disable);
|
||||
|
||||
int clk_use(struct clk *clk)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL(clk_use);
|
||||
|
||||
void clk_unuse(struct clk *clk)
|
||||
{
|
||||
}
|
||||
EXPORT_SYMBOL(clk_unuse);
|
||||
|
||||
unsigned long clk_get_rate(struct clk *clk)
|
||||
{
|
||||
return clk->rate;
|
||||
}
|
||||
EXPORT_SYMBOL(clk_get_rate);
|
||||
|
||||
long clk_round_rate(struct clk *clk, unsigned long rate)
|
||||
{
|
||||
return rate;
|
||||
}
|
||||
EXPORT_SYMBOL(clk_round_rate);
|
||||
|
||||
int clk_set_rate(struct clk *clk, unsigned long rate)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL(clk_set_rate);
|
||||
|
||||
int clk_register(struct clk *clk)
|
||||
{
|
||||
down(&clocks_sem);
|
||||
list_add(&clk->node, &clocks);
|
||||
up(&clocks_sem);
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL(clk_register);
|
||||
|
||||
void clk_unregister(struct clk *clk)
|
||||
{
|
||||
down(&clocks_sem);
|
||||
list_del(&clk->node);
|
||||
up(&clocks_sem);
|
||||
}
|
||||
EXPORT_SYMBOL(clk_unregister);
|
||||
|
||||
static int __init clk_init(void)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
arch_initcall(clk_init);
|
23
arch/arm/mach-aaec2000/clock.h
Normal file
23
arch/arm/mach-aaec2000/clock.h
Normal file
|
@ -0,0 +1,23 @@
|
|||
/*
|
||||
* linux/arch/arm/mach-aaec2000/clock.h
|
||||
*
|
||||
* Copyright (C) 2005 Nicolas Bellido Y Ortega
|
||||
*
|
||||
* Based on linux/arch/arm/mach-integrator/clock.h
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
struct module;
|
||||
|
||||
struct clk {
|
||||
struct list_head node;
|
||||
unsigned long rate;
|
||||
struct module *owner;
|
||||
const char *name;
|
||||
void *data;
|
||||
};
|
||||
|
||||
int clk_register(struct clk *clk);
|
||||
void clk_unregister(struct clk *clk);
|
|
@ -13,19 +13,27 @@
|
|||
#include <linux/module.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/list.h>
|
||||
#include <linux/errno.h>
|
||||
#include <linux/dma-mapping.h>
|
||||
#include <linux/interrupt.h>
|
||||
#include <linux/timex.h>
|
||||
#include <linux/signal.h>
|
||||
|
||||
#include <asm/hardware.h>
|
||||
#include <asm/irq.h>
|
||||
#include <asm/sizes.h>
|
||||
#include <asm/hardware/amba.h>
|
||||
|
||||
#include <asm/mach/flash.h>
|
||||
#include <asm/mach/irq.h>
|
||||
#include <asm/mach/time.h>
|
||||
#include <asm/mach/map.h>
|
||||
|
||||
#include "core.h"
|
||||
#include "clock.h"
|
||||
|
||||
/*
|
||||
* Common I/O mapping:
|
||||
*
|
||||
|
@ -40,9 +48,17 @@
|
|||
* default mapping provided here.
|
||||
*/
|
||||
static struct map_desc standard_io_desc[] __initdata = {
|
||||
/* virtual physical length type */
|
||||
{ VIO_APB_BASE, PIO_APB_BASE, IO_APB_LENGTH, MT_DEVICE },
|
||||
{ VIO_AHB_BASE, PIO_AHB_BASE, IO_AHB_LENGTH, MT_DEVICE }
|
||||
{
|
||||
.virtual = VIO_APB_BASE,
|
||||
.physical = __phys_to_pfn(PIO_APB_BASE),
|
||||
.length = IO_APB_LENGTH,
|
||||
.type = MT_DEVICE
|
||||
}, {
|
||||
.virtual = VIO_AHB_BASE,
|
||||
.physical = __phys_to_pfn(PIO_AHB_BASE),
|
||||
.length = IO_AHB_LENGTH,
|
||||
.type = MT_DEVICE
|
||||
}
|
||||
};
|
||||
|
||||
void __init aaec2000_map_io(void)
|
||||
|
@ -155,3 +171,116 @@ struct sys_timer aaec2000_timer = {
|
|||
.offset = aaec2000_gettimeoffset,
|
||||
};
|
||||
|
||||
static struct clcd_panel mach_clcd_panel;
|
||||
|
||||
static int aaec2000_clcd_setup(struct clcd_fb *fb)
|
||||
{
|
||||
dma_addr_t dma;
|
||||
|
||||
fb->panel = &mach_clcd_panel;
|
||||
|
||||
fb->fb.screen_base = dma_alloc_writecombine(&fb->dev->dev, SZ_1M,
|
||||
&dma, GFP_KERNEL);
|
||||
|
||||
if (!fb->fb.screen_base) {
|
||||
printk(KERN_ERR "CLCD: unable to map framebuffer\n");
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
fb->fb.fix.smem_start = dma;
|
||||
fb->fb.fix.smem_len = SZ_1M;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int aaec2000_clcd_mmap(struct clcd_fb *fb, struct vm_area_struct *vma)
|
||||
{
|
||||
return dma_mmap_writecombine(&fb->dev->dev, vma,
|
||||
fb->fb.screen_base,
|
||||
fb->fb.fix.smem_start,
|
||||
fb->fb.fix.smem_len);
|
||||
}
|
||||
|
||||
static void aaec2000_clcd_remove(struct clcd_fb *fb)
|
||||
{
|
||||
dma_free_writecombine(&fb->dev->dev, fb->fb.fix.smem_len,
|
||||
fb->fb.screen_base, fb->fb.fix.smem_start);
|
||||
}
|
||||
|
||||
static struct clcd_board clcd_plat_data = {
|
||||
.name = "AAEC-2000",
|
||||
.check = clcdfb_check,
|
||||
.decode = clcdfb_decode,
|
||||
.setup = aaec2000_clcd_setup,
|
||||
.mmap = aaec2000_clcd_mmap,
|
||||
.remove = aaec2000_clcd_remove,
|
||||
};
|
||||
|
||||
static struct amba_device clcd_device = {
|
||||
.dev = {
|
||||
.bus_id = "mb:16",
|
||||
.coherent_dma_mask = ~0,
|
||||
.platform_data = &clcd_plat_data,
|
||||
},
|
||||
.res = {
|
||||
.start = AAEC_CLCD_PHYS,
|
||||
.end = AAEC_CLCD_PHYS + SZ_4K - 1,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
.irq = { INT_LCD, NO_IRQ },
|
||||
.periphid = 0x41110,
|
||||
};
|
||||
|
||||
static struct amba_device *amba_devs[] __initdata = {
|
||||
&clcd_device,
|
||||
};
|
||||
|
||||
static struct clk aaec2000_clcd_clk = {
|
||||
.name = "CLCDCLK",
|
||||
};
|
||||
|
||||
void __init aaec2000_set_clcd_plat_data(struct aaec2000_clcd_info *clcd)
|
||||
{
|
||||
clcd_plat_data.enable = clcd->enable;
|
||||
clcd_plat_data.disable = clcd->disable;
|
||||
memcpy(&mach_clcd_panel, &clcd->panel, sizeof(struct clcd_panel));
|
||||
}
|
||||
|
||||
static struct flash_platform_data aaec2000_flash_data = {
|
||||
.map_name = "cfi_probe",
|
||||
.width = 4,
|
||||
};
|
||||
|
||||
static struct resource aaec2000_flash_resource = {
|
||||
.start = AAEC_FLASH_BASE,
|
||||
.end = AAEC_FLASH_BASE + AAEC_FLASH_SIZE,
|
||||
.flags = IORESOURCE_MEM,
|
||||
};
|
||||
|
||||
static struct platform_device aaec2000_flash_device = {
|
||||
.name = "armflash",
|
||||
.id = 0,
|
||||
.dev = {
|
||||
.platform_data = &aaec2000_flash_data,
|
||||
},
|
||||
.num_resources = 1,
|
||||
.resource = &aaec2000_flash_resource,
|
||||
};
|
||||
|
||||
static int __init aaec2000_init(void)
|
||||
{
|
||||
int i;
|
||||
|
||||
clk_register(&aaec2000_clcd_clk);
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(amba_devs); i++) {
|
||||
struct amba_device *d = amba_devs[i];
|
||||
amba_device_register(d, &iomem_resource);
|
||||
}
|
||||
|
||||
platform_device_register(&aaec2000_flash_device);
|
||||
|
||||
return 0;
|
||||
};
|
||||
arch_initcall(aaec2000_init);
|
||||
|
||||
|
|
|
@ -9,8 +9,19 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#include <asm/hardware/amba_clcd.h>
|
||||
|
||||
struct sys_timer;
|
||||
|
||||
extern struct sys_timer aaec2000_timer;
|
||||
extern void __init aaec2000_map_io(void);
|
||||
extern void __init aaec2000_init_irq(void);
|
||||
|
||||
struct aaec2000_clcd_info {
|
||||
struct clcd_panel panel;
|
||||
void (*disable)(struct clcd_fb *);
|
||||
void (*enable)(struct clcd_fb *);
|
||||
};
|
||||
|
||||
extern void __init aaec2000_set_clcd_plat_data(struct aaec2000_clcd_info *);
|
||||
|
||||
|
|
|
@ -69,6 +69,17 @@ config EP72XX_ROM_BOOT
|
|||
|
||||
You almost surely want to say N here.
|
||||
|
||||
config MACH_MP1000
|
||||
bool "MACH_MP1000"
|
||||
help
|
||||
Say Y if you intend to run the kernel on the Comdial MP1000 platform.
|
||||
|
||||
config MP1000_90MHZ
|
||||
bool "MP1000_90MHZ"
|
||||
depends on MACH_MP1000
|
||||
help
|
||||
Say Y if you have the MP1000 configured to be set at 90MHZ rather than 74MHZ
|
||||
|
||||
endmenu
|
||||
|
||||
endif
|
||||
|
|
|
@ -15,6 +15,7 @@ obj-$(CONFIG_ARCH_CDB89712) += cdb89712.o
|
|||
obj-$(CONFIG_ARCH_CLEP7312) += clep7312.o
|
||||
obj-$(CONFIG_ARCH_EDB7211) += edb7211-arch.o edb7211-mm.o
|
||||
obj-$(CONFIG_ARCH_FORTUNET) += fortunet.o
|
||||
obj-$(CONFIG_MACH_MP1000) += mp1000-mach.o mp1000-mm.o mp1000-seprom.o
|
||||
obj-$(CONFIG_ARCH_P720T) += p720t.o
|
||||
leds-$(CONFIG_ARCH_P720T) += p720t-leds.o
|
||||
obj-$(CONFIG_LEDS) += $(leds-y)
|
||||
|
|
|
@ -46,10 +46,14 @@
|
|||
*/
|
||||
|
||||
static struct map_desc autcpu12_io_desc[] __initdata = {
|
||||
/* virtual, physical, length, type */
|
||||
/* memory-mapped extra io and CS8900A Ethernet chip */
|
||||
/* ethernet chip */
|
||||
{ AUTCPU12_VIRT_CS8900A, AUTCPU12_PHYS_CS8900A, SZ_1M, MT_DEVICE }
|
||||
/* memory-mapped extra io and CS8900A Ethernet chip */
|
||||
/* ethernet chip */
|
||||
{
|
||||
.virtual = AUTCPU12_VIRT_CS8900A,
|
||||
.pfn = __phys_to_pfn(AUTCPU12_PHYS_CS8900A),
|
||||
.length = SZ_1M,
|
||||
.type = MT_DEVICE
|
||||
}
|
||||
};
|
||||
|
||||
void __init autcpu12_map_io(void)
|
||||
|
|
|
@ -39,7 +39,12 @@
|
|||
* ethernet driver, perhaps.
|
||||
*/
|
||||
static struct map_desc cdb89712_io_desc[] __initdata = {
|
||||
{ ETHER_BASE, ETHER_START, ETHER_SIZE, MT_DEVICE }
|
||||
{
|
||||
.virtual = ETHER_BASE,
|
||||
.pfn =__phys_to_pfn(ETHER_START),
|
||||
.length = ETHER_SIZE,
|
||||
.type = MT_DEVICE
|
||||
}
|
||||
};
|
||||
|
||||
static void __init cdb89712_map_io(void)
|
||||
|
|
|
@ -37,11 +37,13 @@
|
|||
#include "common.h"
|
||||
|
||||
static struct map_desc ceiva_io_desc[] __initdata = {
|
||||
/* virtual, physical, length, type */
|
||||
|
||||
/* SED1355 controlled video RAM & registers */
|
||||
{ CEIVA_VIRT_SED1355, CEIVA_PHYS_SED1355, SZ_2M, MT_DEVICE }
|
||||
|
||||
/* SED1355 controlled video RAM & registers */
|
||||
{
|
||||
.virtual = CEIVA_VIRT_SED1355,
|
||||
.pfn = __phys_to_pfn(CEIVA_PHYS_SED1355),
|
||||
.length = SZ_2M,
|
||||
.type = MT_DEVICE
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -51,15 +51,27 @@ extern void clps711x_map_io(void);
|
|||
* happens).
|
||||
*/
|
||||
static struct map_desc edb7211_io_desc[] __initdata = {
|
||||
/* virtual, physical, length, type */
|
||||
|
||||
/* memory-mapped extra keyboard row and CS8900A Ethernet chip */
|
||||
{ EP7211_VIRT_EXTKBD, EP7211_PHYS_EXTKBD, SZ_1M, MT_DEVICE },
|
||||
{ EP7211_VIRT_CS8900A, EP7211_PHYS_CS8900A, SZ_1M, MT_DEVICE },
|
||||
|
||||
/* flash banks */
|
||||
{ EP7211_VIRT_FLASH1, EP7211_PHYS_FLASH1, SZ_8M, MT_DEVICE },
|
||||
{ EP7211_VIRT_FLASH2, EP7211_PHYS_FLASH2, SZ_8M, MT_DEVICE }
|
||||
{ /* memory-mapped extra keyboard row */
|
||||
.virtual = EP7211_VIRT_EXTKBD,
|
||||
.pfn = __phys_to_pfn(EP7211_PHYS_EXTKBD),
|
||||
.length = SZ_1M,
|
||||
.type - MT_DEVICE
|
||||
}, { /* and CS8900A Ethernet chip */
|
||||
.virtual = EP7211_VIRT_CS8900A,
|
||||
.pfn = __phys_to_pfn(EP7211_PHYS_CS8900A),
|
||||
.length = SZ_1M,
|
||||
.type = MT_DEVICE
|
||||
}, { /* flash banks */
|
||||
.virtual = EP7211_VIRT_FLASH1,
|
||||
.pfn = __phys_to_pfn(EP7211_PHYS_FLASH1),
|
||||
.length = SZ_8M,
|
||||
.type = MT_DEVICE
|
||||
}, {
|
||||
.virtual = EP7211_VIRT_FLASH2,
|
||||
.pfn = __phys_to_pfn(EP7211_PHYS_FLASH2),
|
||||
.length = SZ_8M,
|
||||
.type = MT_DEVICE
|
||||
}
|
||||
};
|
||||
|
||||
void __init edb7211_map_io(void)
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
#include <linux/init.h>
|
||||
#include <linux/bootmem.h>
|
||||
|
||||
#include <asm/sizes.h>
|
||||
#include <asm/hardware.h>
|
||||
#include <asm/pgtable.h>
|
||||
#include <asm/page.h>
|
||||
|
@ -34,7 +35,12 @@
|
|||
* This maps the generic CLPS711x registers
|
||||
*/
|
||||
static struct map_desc clps711x_io_desc[] __initdata = {
|
||||
{ CLPS7111_VIRT_BASE, CLPS7111_PHYS_BASE, 1048576, MT_DEVICE }
|
||||
{
|
||||
.virtual = CLPS7111_VIRT_BASE,
|
||||
.pfn = __phys_to_pfn(CLPS7111_PHYS_BASE),
|
||||
.length = SZ_1M,
|
||||
.type = MT_DEVICE
|
||||
}
|
||||
};
|
||||
|
||||
void __init clps711x_map_io(void)
|
||||
|
|
49
arch/arm/mach-clps711x/mp1000-mach.c
Normal file
49
arch/arm/mach-clps711x/mp1000-mach.c
Normal file
|
@ -0,0 +1,49 @@
|
|||
/*
|
||||
* linux/arch/arm/mach-mp1000/mp1000.c
|
||||
*
|
||||
* Copyright (C) 2005 Comdial Corporation
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
#include <linux/init.h>
|
||||
#include <linux/types.h>
|
||||
#include <linux/string.h>
|
||||
|
||||
#include <asm/setup.h>
|
||||
#include <asm/mach-types.h>
|
||||
#include <asm/mach/arch.h>
|
||||
#include <asm/arch/mp1000-seprom.h>
|
||||
|
||||
#include "common.h"
|
||||
|
||||
extern void mp1000_map_io(void);
|
||||
|
||||
static void __init mp1000_init(void)
|
||||
{
|
||||
seprom_init();
|
||||
}
|
||||
|
||||
MACHINE_START(MP1000, "Comdial MP1000")
|
||||
/* Maintainer: Jon Ringle */
|
||||
.phys_ram = 0xc0000000,
|
||||
.phys_io = 0x80000000,
|
||||
.io_pg_offst = ((0xff000000) >> 18) & 0xfffc,
|
||||
.boot_params = 0xc0015100,
|
||||
.map_io = mp1000_map_io,
|
||||
.init_irq = clps711x_init_irq,
|
||||
.init_machine = mp1000_init,
|
||||
.timer = &clps711x_timer,
|
||||
MACHINE_END
|
||||
|
47
arch/arm/mach-clps711x/mp1000-mm.c
Normal file
47
arch/arm/mach-clps711x/mp1000-mm.c
Normal file
|
@ -0,0 +1,47 @@
|
|||
/*
|
||||
* linux/arch/arm/mach-mp1000/mm.c
|
||||
*
|
||||
* Extra MM routines for the MP1000
|
||||
*
|
||||
* Copyright (C) 2005 Comdial Corporation
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/init.h>
|
||||
|
||||
#include <asm/hardware.h>
|
||||
#include <asm/page.h>
|
||||
#include <asm/pgtable.h>
|
||||
#include <asm/sizes.h>
|
||||
|
||||
#include <asm/mach/map.h>
|
||||
|
||||
extern void clps711x_map_io(void);
|
||||
|
||||
static struct map_desc mp1000_io_desc[] __initdata = {
|
||||
{ MP1000_EIO_BASE, MP1000_EIO_START, MP1000_EIO_SIZE, MT_DEVICE },
|
||||
{ MP1000_FIO_BASE, MP1000_FIO_START, MP1000_FIO_SIZE, MT_DEVICE },
|
||||
{ MP1000_LIO_BASE, MP1000_LIO_START, MP1000_LIO_SIZE, MT_DEVICE },
|
||||
{ MP1000_NIO_BASE, MP1000_NIO_START, MP1000_NIO_SIZE, MT_DEVICE },
|
||||
{ MP1000_IDE_BASE, MP1000_IDE_START, MP1000_IDE_SIZE, MT_DEVICE },
|
||||
{ MP1000_DSP_BASE, MP1000_DSP_START, MP1000_DSP_SIZE, MT_DEVICE }
|
||||
};
|
||||
|
||||
void __init mp1000_map_io(void)
|
||||
{
|
||||
clps711x_map_io();
|
||||
iotable_init(mp1000_io_desc, ARRAY_SIZE(mp1000_io_desc));
|
||||
}
|
195
arch/arm/mach-clps711x/mp1000-seprom.c
Normal file
195
arch/arm/mach-clps711x/mp1000-seprom.c
Normal file
|
@ -0,0 +1,195 @@
|
|||
/*`
|
||||
* mp1000-seprom.c
|
||||
*
|
||||
* This file contains the Serial EEPROM code for the MP1000 board
|
||||
*
|
||||
* Copyright (C) 2005 Comdial Corporation
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
*/
|
||||
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/init.h>
|
||||
#include <asm/hardware.h>
|
||||
#include <asm/hardware/clps7111.h>
|
||||
#include <asm/arch/mp1000-seprom.h>
|
||||
|
||||
/* If SepromInit() can initialize and checksum the seprom successfully, */
|
||||
/* then it will point seprom_data_ptr at the shadow copy. */
|
||||
|
||||
static eeprom_struct seprom_data; /* shadow copy of seprom content */
|
||||
|
||||
eeprom_struct *seprom_data_ptr = 0; /* 0 => not initialized */
|
||||
|
||||
/*
|
||||
* Port D Bit 5 is Chip Select for EEPROM
|
||||
* Port E Bit 0 is Input, Data out from EEPROM
|
||||
* Port E Bit 1 is Output, Data in to EEPROM
|
||||
* Port E Bit 2 is Output, CLK to EEPROM
|
||||
*/
|
||||
|
||||
static char *port_d_ptr = (char *)(CLPS7111_VIRT_BASE + PDDR);
|
||||
static char *port_e_ptr = (char *)(CLPS7111_VIRT_BASE + PEDR);
|
||||
|
||||
#define NO_OF_SHORTS 64 // Device is 64 x 16 bits
|
||||
#define ENABLE_RW 0
|
||||
#define DISABLE_RW 1
|
||||
|
||||
static inline void toggle_seprom_clock(void)
|
||||
{
|
||||
*port_e_ptr |= HwPortESepromCLK;
|
||||
*port_e_ptr &= ~(HwPortESepromCLK);
|
||||
}
|
||||
|
||||
static inline void select_eeprom(void)
|
||||
{
|
||||
*port_d_ptr |= HwPortDEECS;
|
||||
*port_e_ptr &= ~(HwPortESepromCLK);
|
||||
}
|
||||
|
||||
static inline void deselect_eeprom(void)
|
||||
{
|
||||
*port_d_ptr &= ~(HwPortDEECS);
|
||||
*port_e_ptr &= ~(HwPortESepromDIn);
|
||||
}
|
||||
|
||||
/*
|
||||
* GetSepromDataPtr - returns pointer to shadow (RAM) copy of seprom
|
||||
* and returns 0 if seprom is not initialized or
|
||||
* has a checksum error.
|
||||
*/
|
||||
|
||||
eeprom_struct* get_seprom_ptr(void)
|
||||
{
|
||||
return seprom_data_ptr;
|
||||
}
|
||||
|
||||
unsigned char* get_eeprom_mac_address(void)
|
||||
{
|
||||
return seprom_data_ptr->variant.eprom_struct.mac_Address;
|
||||
}
|
||||
|
||||
/*
|
||||
* ReadSProm, Physically reads data from the Serial PROM
|
||||
*/
|
||||
static void read_sprom(short address, int length, eeprom_struct *buffer)
|
||||
{
|
||||
short data = COMMAND_READ | (address & 0x3F);
|
||||
short bit;
|
||||
int i;
|
||||
|
||||
select_eeprom();
|
||||
|
||||
// Clock in 9 bits of the command
|
||||
for (i = 0, bit = 0x100; i < 9; i++, bit >>= 1) {
|
||||
if (data & bit)
|
||||
*port_e_ptr |= HwPortESepromDIn;
|
||||
else
|
||||
*port_e_ptr &= ~(HwPortESepromDIn);
|
||||
|
||||
toggle_seprom_clock();
|
||||
}
|
||||
|
||||
//
|
||||
// Now read one or more shorts of data from the Seprom
|
||||
//
|
||||
while (length-- > 0) {
|
||||
data = 0;
|
||||
|
||||
// Read 16 bits at a time
|
||||
for (i = 0; i < 16; i++) {
|
||||
data <<= 1;
|
||||
toggle_seprom_clock();
|
||||
data |= *port_e_ptr & HwPortESepromDOut;
|
||||
|
||||
}
|
||||
|
||||
buffer->variant.eprom_short_data[address++] = data;
|
||||
}
|
||||
|
||||
deselect_eeprom();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* ReadSerialPROM
|
||||
*
|
||||
* Input: Pointer to array of 64 x 16 Bits
|
||||
*
|
||||
* Output: if no problem reading data is filled in
|
||||
*/
|
||||
static void read_serial_prom(eeprom_struct *data)
|
||||
{
|
||||
read_sprom(0, 64, data);
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Compute Serial EEPROM checksum
|
||||
//
|
||||
// Input: Pointer to struct with Eprom data
|
||||
//
|
||||
// Output: The computed Eprom checksum
|
||||
//
|
||||
static short compute_seprom_checksum(eeprom_struct *data)
|
||||
{
|
||||
short checksum = 0;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < 126; i++) {
|
||||
checksum += (short)data->variant.eprom_byte_data[i];
|
||||
}
|
||||
|
||||
return((short)(0x5555 - (checksum & 0xFFFF)));
|
||||
}
|
||||
|
||||
//
|
||||
// Make sure the data port bits for the SEPROM are correctly initialised
|
||||
//
|
||||
|
||||
void __init seprom_init(void)
|
||||
{
|
||||
short checksum;
|
||||
|
||||
// Init Port D
|
||||
*(char *)(CLPS7111_VIRT_BASE + PDDDR) = 0x0;
|
||||
*(char *)(CLPS7111_VIRT_BASE + PDDR) = 0x15;
|
||||
|
||||
// Init Port E
|
||||
*(int *)(CLPS7111_VIRT_BASE + PEDDR) = 0x06;
|
||||
*(int *)(CLPS7111_VIRT_BASE + PEDR) = 0x04;
|
||||
|
||||
//
|
||||
// Make sure that EEPROM struct size never exceeds 128 bytes
|
||||
//
|
||||
if (sizeof(eeprom_struct) > 128) {
|
||||
panic("Serial PROM struct size > 128, aborting read\n");
|
||||
}
|
||||
|
||||
read_serial_prom(&seprom_data);
|
||||
|
||||
checksum = compute_seprom_checksum(&seprom_data);
|
||||
|
||||
if (checksum != seprom_data.variant.eprom_short_data[63]) {
|
||||
panic("Serial EEPROM checksum failed\n");
|
||||
}
|
||||
|
||||
seprom_data_ptr = &seprom_data;
|
||||
}
|
||||
|
|
@ -29,6 +29,7 @@
|
|||
#include <asm/pgtable.h>
|
||||
#include <asm/page.h>
|
||||
#include <asm/setup.h>
|
||||
#include <asm/sizes.h>
|
||||
#include <asm/mach-types.h>
|
||||
#include <asm/mach/arch.h>
|
||||
#include <asm/mach/map.h>
|
||||
|
@ -42,8 +43,17 @@
|
|||
* We map both here.
|
||||
*/
|
||||
static struct map_desc p720t_io_desc[] __initdata = {
|
||||
{ SYSPLD_VIRT_BASE, SYSPLD_PHYS_BASE, 1048576, MT_DEVICE },
|
||||
{ 0xfe400000, 0x10400000, 1048576, MT_DEVICE }
|
||||
{
|
||||
.virtual = SYSPLD_VIRT_BASE,
|
||||
.pfn = __phys_to_pfn(SYSPLD_PHYS_BASE),
|
||||
.length = SZ_1M,
|
||||
.type = MT_DEVICE
|
||||
}, {
|
||||
.virtual = 0xfe400000,
|
||||
.pfn = __phys_to_pfn(0x10400000),
|
||||
.length = SZ_1M,
|
||||
.type = MT_DEVICE
|
||||
}
|
||||
};
|
||||
|
||||
static void __init
|
||||
|
|
|
@ -259,10 +259,27 @@ static void __init clps7500_init_irq(void)
|
|||
}
|
||||
|
||||
static struct map_desc cl7500_io_desc[] __initdata = {
|
||||
{ IO_BASE, IO_START, IO_SIZE, MT_DEVICE }, /* IO space */
|
||||
{ ISA_BASE, ISA_START, ISA_SIZE, MT_DEVICE }, /* ISA space */
|
||||
{ FLASH_BASE, FLASH_START, FLASH_SIZE, MT_DEVICE }, /* Flash */
|
||||
{ LED_BASE, LED_START, LED_SIZE, MT_DEVICE } /* LED */
|
||||
{ /* IO space */
|
||||
.virtual = IO_BASE,
|
||||
.pfn = __phys_to_pfn(IO_START),
|
||||
.length = IO_SIZE,
|
||||
.type = MT_DEVICE
|
||||
}, { /* ISA space */
|
||||
.virtual = ISA_BASE,
|
||||
.pfn = __phys_to_pfn(ISA_START),
|
||||
.length = ISA_SIZE,
|
||||
.type = MT_DEVICE
|
||||
}, { /* Flash */
|
||||
.virtual = FLASH_BASE,
|
||||
.pfn = __phys_to_pfn(FLASH_START),
|
||||
.length = FLASH_SIZE,
|
||||
.type = MT_DEVICE
|
||||
}, { /* LED */
|
||||
.virtual = LED_BASE,
|
||||
.pfn = __phys_to_pfn(LED_START),
|
||||
.length = LED_SIZE,
|
||||
.type = MT_DEVICE
|
||||
}
|
||||
};
|
||||
|
||||
static void __init clps7500_map_io(void)
|
||||
|
|
|
@ -76,16 +76,42 @@ static struct map_desc ebsa110_io_desc[] __initdata = {
|
|||
/*
|
||||
* sparse external-decode ISAIO space
|
||||
*/
|
||||
{ IRQ_STAT, TRICK4_PHYS, PGDIR_SIZE, MT_DEVICE }, /* IRQ_STAT/IRQ_MCLR */
|
||||
{ IRQ_MASK, TRICK3_PHYS, PGDIR_SIZE, MT_DEVICE }, /* IRQ_MASK/IRQ_MSET */
|
||||
{ SOFT_BASE, TRICK1_PHYS, PGDIR_SIZE, MT_DEVICE }, /* SOFT_BASE */
|
||||
{ PIT_BASE, TRICK0_PHYS, PGDIR_SIZE, MT_DEVICE }, /* PIT_BASE */
|
||||
{ /* IRQ_STAT/IRQ_MCLR */
|
||||
.virtual = IRQ_STAT,
|
||||
.pfn = __phys_to_pfn(TRICK4_PHYS),
|
||||
.length = PGDIR_SIZE,
|
||||
.type = MT_DEVICE
|
||||
}, { /* IRQ_MASK/IRQ_MSET */
|
||||
.virtual = IRQ_MASK,
|
||||
.pfn = __phys_to_pfn(TRICK3_PHYS),
|
||||
.length = PGDIR_SIZE,
|
||||
.type = MT_DEVICE
|
||||
}, { /* SOFT_BASE */
|
||||
.virtual = SOFT_BASE,
|
||||
.pfn = __phys_to_pfn(TRICK1_PHYS),
|
||||
.length = PGDIR_SIZE,
|
||||
.type = MT_DEVICE
|
||||
}, { /* PIT_BASE */
|
||||
.virtual = PIT_BASE,
|
||||
.pfn = __phys_to_pfn(TRICK0_PHYS),
|
||||
.length = PGDIR_SIZE,
|
||||
.type = MT_DEVICE
|
||||
},
|
||||
|
||||
/*
|
||||
* self-decode ISAIO space
|
||||
*/
|
||||
{ ISAIO_BASE, ISAIO_PHYS, ISAIO_SIZE, MT_DEVICE },
|
||||
{ ISAMEM_BASE, ISAMEM_PHYS, ISAMEM_SIZE, MT_DEVICE }
|
||||
{
|
||||
.virtual = ISAIO_BASE,
|
||||
.pfn = __phys_to_pfn(ISAIO_PHYS),
|
||||
.length = ISAIO_SIZE,
|
||||
.type = MT_DEVICE
|
||||
}, {
|
||||
.virtual = ISAMEM_BASE,
|
||||
.pfn = __phys_to_pfn(ISAMEM_PHYS),
|
||||
.length = ISAMEM_SIZE,
|
||||
.type = MT_DEVICE
|
||||
}
|
||||
};
|
||||
|
||||
static void __init ebsa110_map_io(void)
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
#include <linux/kernel.h>
|
||||
#include <linux/types.h>
|
||||
|
||||
#include <asm/hardware.h>
|
||||
#include <asm/io.h>
|
||||
#include <asm/page.h>
|
||||
|
||||
|
|
|
@ -31,12 +31,37 @@
|
|||
/* Page table mapping for I/O region */
|
||||
|
||||
static struct map_desc epxa10db_io_desc[] __initdata = {
|
||||
{ IO_ADDRESS(EXC_REGISTERS_BASE), EXC_REGISTERS_BASE, SZ_16K, MT_DEVICE },
|
||||
{ IO_ADDRESS(EXC_PLD_BLOCK0_BASE), EXC_PLD_BLOCK0_BASE, SZ_16K, MT_DEVICE },
|
||||
{ IO_ADDRESS(EXC_PLD_BLOCK1_BASE), EXC_PLD_BLOCK1_BASE, SZ_16K, MT_DEVICE },
|
||||
{ IO_ADDRESS(EXC_PLD_BLOCK2_BASE), EXC_PLD_BLOCK2_BASE, SZ_16K, MT_DEVICE },
|
||||
{ IO_ADDRESS(EXC_PLD_BLOCK3_BASE), EXC_PLD_BLOCK3_BASE, SZ_16K, MT_DEVICE },
|
||||
{ FLASH_VADDR(EXC_EBI_BLOCK0_BASE), EXC_EBI_BLOCK0_BASE, SZ_16M, MT_DEVICE }
|
||||
{
|
||||
.virtual = IO_ADDRESS(EXC_REGISTERS_BASE),
|
||||
.pfn = __phys_to_pfn(EXC_REGISTERS_BASE),
|
||||
.length = SZ_16K,
|
||||
.type = MT_DEVICE
|
||||
}, {
|
||||
.virtual = IO_ADDRESS(EXC_PLD_BLOCK0_BASE),
|
||||
.pfn = __phys_to_pfn(EXC_PLD_BLOCK0_BASE),
|
||||
.length = SZ_16K,
|
||||
.type = MT_DEVICE
|
||||
}, {
|
||||
.virtual = IO_ADDRESS(EXC_PLD_BLOCK1_BASE),
|
||||
.pfn =__phys_to_pfn(EXC_PLD_BLOCK1_BASE),
|
||||
.length = SZ_16K,
|
||||
.type = MT_DEVICE
|
||||
}, {
|
||||
.virtual = IO_ADDRESS(EXC_PLD_BLOCK2_BASE),
|
||||
.physical = __phys_to_pfn(EXC_PLD_BLOCK2_BASE),
|
||||
.length = SZ_16K,
|
||||
.type = MT_DEVICE
|
||||
}, {
|
||||
.virtual = IO_ADDRESS(EXC_PLD_BLOCK3_BASE),
|
||||
.pfn = __phys_to_pfn(EXC_PLD_BLOCK3_BASE),
|
||||
.length = SZ_16K,
|
||||
.type = MT_DEVICE
|
||||
}, {
|
||||
.virtual = FLASH_VADDR(EXC_EBI_BLOCK0_BASE),
|
||||
.pfn = __phys_to_pfn(EXC_EBI_BLOCK0_BASE),
|
||||
.length = SZ_16M,
|
||||
.type = MT_DEVICE
|
||||
}
|
||||
};
|
||||
|
||||
void __init epxa10db_map_io(void)
|
||||
|
|
|
@ -130,8 +130,17 @@ void __init footbridge_init_irq(void)
|
|||
* it means that we have extra bullet protection on our feet.
|
||||
*/
|
||||
static struct map_desc fb_common_io_desc[] __initdata = {
|
||||
{ ARMCSR_BASE, DC21285_ARMCSR_BASE, ARMCSR_SIZE, MT_DEVICE },
|
||||
{ XBUS_BASE, 0x40000000, XBUS_SIZE, MT_DEVICE }
|
||||
{
|
||||
.virtual = ARMCSR_BASE,
|
||||
.pfn = DC21285_ARMCSR_BASE,
|
||||
.length = ARMCSR_SIZE,
|
||||
.type = MT_DEVICE
|
||||
}, {
|
||||
.virtual = XBUS_BASE,
|
||||
.pfn = __phys_to_pfn(0x40000000),
|
||||
.length = XBUS_SIZE,
|
||||
.type = MT_DEVICE
|
||||
}
|
||||
};
|
||||
|
||||
/*
|
||||
|
@ -140,11 +149,32 @@ static struct map_desc fb_common_io_desc[] __initdata = {
|
|||
*/
|
||||
static struct map_desc ebsa285_host_io_desc[] __initdata = {
|
||||
#if defined(CONFIG_ARCH_FOOTBRIDGE) && defined(CONFIG_FOOTBRIDGE_HOST)
|
||||
{ PCIMEM_BASE, DC21285_PCI_MEM, PCIMEM_SIZE, MT_DEVICE },
|
||||
{ PCICFG0_BASE, DC21285_PCI_TYPE_0_CONFIG, PCICFG0_SIZE, MT_DEVICE },
|
||||
{ PCICFG1_BASE, DC21285_PCI_TYPE_1_CONFIG, PCICFG1_SIZE, MT_DEVICE },
|
||||
{ PCIIACK_BASE, DC21285_PCI_IACK, PCIIACK_SIZE, MT_DEVICE },
|
||||
{ PCIO_BASE, DC21285_PCI_IO, PCIO_SIZE, MT_DEVICE }
|
||||
{
|
||||
.virtual = PCIMEM_BASE,
|
||||
.pfn = __phys_to_pfn(DC21285_PCI_MEM),
|
||||
.length = PCIMEM_SIZE,
|
||||
.type = MT_DEVICE
|
||||
}, {
|
||||
.virtual = PCICFG0_BASE,
|
||||
.pfn = __phys_to_pfn(DC21285_PCI_TYPE_0_CONFIG),
|
||||
.length = PCICFG0_SIZE,
|
||||
.type = MT_DEVICE
|
||||
}, {
|
||||
.virtual = PCICFG1_BASE,
|
||||
.pfn = __phys_to_pfn(DC21285_PCI_TYPE_1_CONFIG),
|
||||
.length = PCICFG1_SIZE,
|
||||
.type = MT_DEVICE
|
||||
}, {
|
||||
.virtual = PCIIACK_BASE,
|
||||
.pfn = __phys_to_pfn(DC21285_PCI_IACK),
|
||||
.length = PCIIACK_SIZE,
|
||||
.type = MT_DEVICE
|
||||
}, {
|
||||
.virtual = PCIO_BASE,
|
||||
.pfn = __phys_to_pfn(DC21285_PCI_IO),
|
||||
.length = PCIO_SIZE,
|
||||
.type = MT_DEVICE
|
||||
}
|
||||
#endif
|
||||
};
|
||||
|
||||
|
@ -153,8 +183,17 @@ static struct map_desc ebsa285_host_io_desc[] __initdata = {
|
|||
*/
|
||||
static struct map_desc co285_io_desc[] __initdata = {
|
||||
#ifdef CONFIG_ARCH_CO285
|
||||
{ PCIO_BASE, DC21285_PCI_IO, PCIO_SIZE, MT_DEVICE },
|
||||
{ PCIMEM_BASE, DC21285_PCI_MEM, PCIMEM_SIZE, MT_DEVICE }
|
||||
{
|
||||
.virtual = PCIO_BASE,
|
||||
.pfn = __phys_to_pfn(DC21285_PCI_IO),
|
||||
.length = PCIO_SIZE,
|
||||
.type = MT_DEVICE
|
||||
}, {
|
||||
.virtual = PCIMEM_BASE,
|
||||
.pfn = __phys_to_pfn(DC21285_PCI_MEM),
|
||||
.length = PCIMEM_SIZE,
|
||||
.type = MT_DEVICE
|
||||
}
|
||||
#endif
|
||||
};
|
||||
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue