mirror of
https://github.com/torvalds/linux.git
synced 2024-12-03 17:41:22 +00:00
Merge branch 'master' of /pub/scm/linux/kernel/git/torvalds/linux-2.6
Pull fixes in from 2.6.31 so that people testing the iommu-2.6.git tree no longer trip over bugs which were already fixed (sorry, Horms).
This commit is contained in:
commit
a131bc1855
8
CREDITS
8
CREDITS
@ -1856,7 +1856,7 @@ E: rfkoenig@immd4.informatik.uni-erlangen.de
|
||||
D: The Linux Support Team Erlangen
|
||||
|
||||
N: Andreas Koensgen
|
||||
E: ajk@iehk.rwth-aachen.de
|
||||
E: ajk@comnets.uni-bremen.de
|
||||
D: 6pack driver for AX.25
|
||||
|
||||
N: Harald Koerfgen
|
||||
@ -2006,6 +2006,9 @@ E: paul@laufernet.com
|
||||
D: Soundblaster driver fixes, ISAPnP quirk
|
||||
S: California, USA
|
||||
|
||||
N: Jonathan Layes
|
||||
D: ARPD support
|
||||
|
||||
N: Tom Lees
|
||||
E: tom@lpsg.demon.co.uk
|
||||
W: http://www.lpsg.demon.co.uk/
|
||||
@ -3802,6 +3805,9 @@ S: van Bronckhorststraat 12
|
||||
S: 2612 XV Delft
|
||||
S: The Netherlands
|
||||
|
||||
N: Thomas Woller
|
||||
D: CS461x Cirrus Logic sound driver
|
||||
|
||||
N: David Woodhouse
|
||||
E: dwmw2@infradead.org
|
||||
D: JFFS2 file system, Memory Technology Device subsystem,
|
||||
|
@ -94,28 +94,37 @@ What: /sys/block/<disk>/queue/physical_block_size
|
||||
Date: May 2009
|
||||
Contact: Martin K. Petersen <martin.petersen@oracle.com>
|
||||
Description:
|
||||
This is the smallest unit the storage device can write
|
||||
without resorting to read-modify-write operation. It is
|
||||
usually the same as the logical block size but may be
|
||||
bigger. One example is SATA drives with 4KB sectors
|
||||
that expose a 512-byte logical block size to the
|
||||
operating system.
|
||||
This is the smallest unit a physical storage device can
|
||||
write atomically. It is usually the same as the logical
|
||||
block size but may be bigger. One example is SATA
|
||||
drives with 4KB sectors that expose a 512-byte logical
|
||||
block size to the operating system. For stacked block
|
||||
devices the physical_block_size variable contains the
|
||||
maximum physical_block_size of the component devices.
|
||||
|
||||
What: /sys/block/<disk>/queue/minimum_io_size
|
||||
Date: April 2009
|
||||
Contact: Martin K. Petersen <martin.petersen@oracle.com>
|
||||
Description:
|
||||
Storage devices may report a preferred minimum I/O size,
|
||||
which is the smallest request the device can perform
|
||||
without incurring a read-modify-write penalty. For disk
|
||||
drives this is often the physical block size. For RAID
|
||||
arrays it is often the stripe chunk size.
|
||||
Storage devices may report a granularity or preferred
|
||||
minimum I/O size which is the smallest request the
|
||||
device can perform without incurring a performance
|
||||
penalty. For disk drives this is often the physical
|
||||
block size. For RAID arrays it is often the stripe
|
||||
chunk size. A properly aligned multiple of
|
||||
minimum_io_size is the preferred request size for
|
||||
workloads where a high number of I/O operations is
|
||||
desired.
|
||||
|
||||
What: /sys/block/<disk>/queue/optimal_io_size
|
||||
Date: April 2009
|
||||
Contact: Martin K. Petersen <martin.petersen@oracle.com>
|
||||
Description:
|
||||
Storage devices may report an optimal I/O size, which is
|
||||
the device's preferred unit of receiving I/O. This is
|
||||
rarely reported for disk drives. For RAID devices it is
|
||||
usually the stripe width or the internal block size.
|
||||
the device's preferred unit for sustained I/O. This is
|
||||
rarely reported for disk drives. For RAID arrays it is
|
||||
usually the stripe width or the internal track size. A
|
||||
properly aligned multiple of optimal_io_size is the
|
||||
preferred request size for workloads where sustained
|
||||
throughput is desired. If no optimal I/O size is
|
||||
reported this file contains 0.
|
||||
|
@ -449,8 +449,8 @@ printk(KERN_INFO "i = %u\n", i);
|
||||
</para>
|
||||
|
||||
<programlisting>
|
||||
__u32 ipaddress;
|
||||
printk(KERN_INFO "my ip: %d.%d.%d.%d\n", NIPQUAD(ipaddress));
|
||||
__be32 ipaddress;
|
||||
printk(KERN_INFO "my ip: %pI4\n", &ipaddress);
|
||||
</programlisting>
|
||||
|
||||
<para>
|
||||
|
@ -184,8 +184,6 @@ usage should require reading the full document.
|
||||
!Finclude/net/mac80211.h ieee80211_ctstoself_get
|
||||
!Finclude/net/mac80211.h ieee80211_ctstoself_duration
|
||||
!Finclude/net/mac80211.h ieee80211_generic_frame_duration
|
||||
!Finclude/net/mac80211.h ieee80211_get_hdrlen_from_skb
|
||||
!Finclude/net/mac80211.h ieee80211_hdrlen
|
||||
!Finclude/net/mac80211.h ieee80211_wake_queue
|
||||
!Finclude/net/mac80211.h ieee80211_stop_queue
|
||||
!Finclude/net/mac80211.h ieee80211_wake_queues
|
||||
|
@ -83,11 +83,12 @@ not detect it missed following items in original chain.
|
||||
obj = kmem_cache_alloc(...);
|
||||
lock_chain(); // typically a spin_lock()
|
||||
obj->key = key;
|
||||
atomic_inc(&obj->refcnt);
|
||||
/*
|
||||
* we need to make sure obj->key is updated before obj->next
|
||||
* or obj->refcnt
|
||||
*/
|
||||
smp_wmb();
|
||||
atomic_set(&obj->refcnt, 1);
|
||||
hlist_add_head_rcu(&obj->obj_node, list);
|
||||
unlock_chain(); // typically a spin_unlock()
|
||||
|
||||
@ -159,6 +160,10 @@ out:
|
||||
obj = kmem_cache_alloc(cachep);
|
||||
lock_chain(); // typically a spin_lock()
|
||||
obj->key = key;
|
||||
/*
|
||||
* changes to obj->key must be visible before refcnt one
|
||||
*/
|
||||
smp_wmb();
|
||||
atomic_set(&obj->refcnt, 1);
|
||||
/*
|
||||
* insert obj in RCU way (readers might be traversing chain)
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* cn_test.c
|
||||
*
|
||||
* 2004-2005 Copyright (c) Evgeniy Polyakov <johnpol@2ka.mipt.ru>
|
||||
* 2004+ Copyright (c) Evgeniy Polyakov <zbr@ioremap.net>
|
||||
* All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@ -194,5 +194,5 @@ module_init(cn_test_init);
|
||||
module_exit(cn_test_fini);
|
||||
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_AUTHOR("Evgeniy Polyakov <johnpol@2ka.mipt.ru>");
|
||||
MODULE_AUTHOR("Evgeniy Polyakov <zbr@ioremap.net>");
|
||||
MODULE_DESCRIPTION("Connector's test module");
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* ucon.c
|
||||
*
|
||||
* Copyright (c) 2004+ Evgeniy Polyakov <johnpol@2ka.mipt.ru>
|
||||
* Copyright (c) 2004+ Evgeniy Polyakov <zbr@ioremap.net>
|
||||
*
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
|
@ -207,8 +207,8 @@ Attributes
|
||||
~~~~~~~~~~
|
||||
struct driver_attribute {
|
||||
struct attribute attr;
|
||||
ssize_t (*show)(struct device_driver *, char * buf, size_t count, loff_t off);
|
||||
ssize_t (*store)(struct device_driver *, const char * buf, size_t count, loff_t off);
|
||||
ssize_t (*show)(struct device_driver *driver, char *buf);
|
||||
ssize_t (*store)(struct device_driver *, const char * buf, size_t count);
|
||||
};
|
||||
|
||||
Device drivers can export attributes via their sysfs directories.
|
||||
|
@ -25,7 +25,7 @@ use IO::Handle;
|
||||
"tda10046lifeview", "av7110", "dec2000t", "dec2540t",
|
||||
"dec3000s", "vp7041", "dibusb", "nxt2002", "nxt2004",
|
||||
"or51211", "or51132_qam", "or51132_vsb", "bluebird",
|
||||
"opera1", "cx231xx", "cx18", "cx23885", "pvrusb2" );
|
||||
"opera1", "cx231xx", "cx18", "cx23885", "pvrusb2", "mpc718" );
|
||||
|
||||
# Check args
|
||||
syntax() if (scalar(@ARGV) != 1);
|
||||
@ -381,6 +381,57 @@ sub cx18 {
|
||||
$allfiles;
|
||||
}
|
||||
|
||||
sub mpc718 {
|
||||
my $archive = 'Yuan MPC718 TV Tuner Card 2.13.10.1016.zip';
|
||||
my $url = "ftp://ftp.work.acer-euro.com/desktop/aspire_idea510/vista/Drivers/$archive";
|
||||
my $fwfile = "dvb-cx18-mpc718-mt352.fw";
|
||||
my $tmpdir = tempdir(DIR => "/tmp", CLEANUP => 1);
|
||||
|
||||
checkstandard();
|
||||
wgetfile($archive, $url);
|
||||
unzip($archive, $tmpdir);
|
||||
|
||||
my $sourcefile = "$tmpdir/Yuan MPC718 TV Tuner Card 2.13.10.1016/mpc718_32bit/yuanrap.sys";
|
||||
my $found = 0;
|
||||
|
||||
open IN, '<', $sourcefile or die "Couldn't open $sourcefile to extract $fwfile data\n";
|
||||
binmode IN;
|
||||
open OUT, '>', $fwfile;
|
||||
binmode OUT;
|
||||
{
|
||||
# Block scope because we change the line terminator variable $/
|
||||
my $prevlen = 0;
|
||||
my $currlen;
|
||||
|
||||
# Buried in the data segment are 3 runs of almost identical
|
||||
# register-value pairs that end in 0x5d 0x01 which is a "TUNER GO"
|
||||
# command for the MT352.
|
||||
# Pull out the middle run (because it's easy) of register-value
|
||||
# pairs to make the "firmware" file.
|
||||
|
||||
local $/ = "\x5d\x01"; # MT352 "TUNER GO"
|
||||
|
||||
while (<IN>) {
|
||||
$currlen = length($_);
|
||||
if ($prevlen == $currlen && $currlen <= 64) {
|
||||
chop; chop; # Get rid of "TUNER GO"
|
||||
s/^\0\0//; # get rid of leading 00 00 if it's there
|
||||
printf OUT "$_";
|
||||
$found = 1;
|
||||
last;
|
||||
}
|
||||
$prevlen = $currlen;
|
||||
}
|
||||
}
|
||||
close OUT;
|
||||
close IN;
|
||||
if (!$found) {
|
||||
unlink $fwfile;
|
||||
die "Couldn't find valid register-value sequence in $sourcefile for $fwfile\n";
|
||||
}
|
||||
$fwfile;
|
||||
}
|
||||
|
||||
sub cx23885 {
|
||||
my $url = "http://linuxtv.org/downloads/firmware/";
|
||||
|
||||
|
@ -458,3 +458,13 @@ Why: Remove the old legacy 32bit machine check code. This has been
|
||||
but the old version has been kept around for easier testing. Note this
|
||||
doesn't impact the old P5 and WinChip machine check handlers.
|
||||
Who: Andi Kleen <andi@firstfloor.org>
|
||||
|
||||
----------------------------
|
||||
|
||||
What: lock_policy_rwsem_* and unlock_policy_rwsem_* will not be
|
||||
exported interface anymore.
|
||||
When: 2.6.33
|
||||
Why: cpu_policy_rwsem has a new cleaner definition making it local to
|
||||
cpufreq core and contained inside cpufreq.c. Other dependent
|
||||
drivers should not use it in order to safely avoid lockdep issues.
|
||||
Who: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
|
||||
|
@ -23,7 +23,8 @@ interface.
|
||||
Using sysfs
|
||||
~~~~~~~~~~~
|
||||
|
||||
sysfs is always compiled in. You can access it by doing:
|
||||
sysfs is always compiled in if CONFIG_SYSFS is defined. You can access
|
||||
it by doing:
|
||||
|
||||
mount -t sysfs sysfs /sys
|
||||
|
||||
|
@ -1720,8 +1720,8 @@ and is between 256 and 4096 characters. It is defined in the file
|
||||
oprofile.cpu_type= Force an oprofile cpu type
|
||||
This might be useful if you have an older oprofile
|
||||
userland or if you want common events.
|
||||
Format: { archperfmon }
|
||||
archperfmon: [X86] Force use of architectural
|
||||
Format: { arch_perfmon }
|
||||
arch_perfmon: [X86] Force use of architectural
|
||||
perfmon on Intel CPUs instead of the
|
||||
CPU specific event set.
|
||||
|
||||
|
@ -36,8 +36,6 @@ detailed description):
|
||||
- Bluetooth enable and disable
|
||||
- video output switching, expansion control
|
||||
- ThinkLight on and off
|
||||
- limited docking and undocking
|
||||
- UltraBay eject
|
||||
- CMOS/UCMS control
|
||||
- LED control
|
||||
- ACPI sounds
|
||||
@ -729,131 +727,6 @@ cannot be read or if it is unknown, thinkpad-acpi will report it as "off".
|
||||
It is impossible to know if the status returned through sysfs is valid.
|
||||
|
||||
|
||||
Docking / undocking -- /proc/acpi/ibm/dock
|
||||
------------------------------------------
|
||||
|
||||
Docking and undocking (e.g. with the X4 UltraBase) requires some
|
||||
actions to be taken by the operating system to safely make or break
|
||||
the electrical connections with the dock.
|
||||
|
||||
The docking feature of this driver generates the following ACPI events:
|
||||
|
||||
ibm/dock GDCK 00000003 00000001 -- eject request
|
||||
ibm/dock GDCK 00000003 00000002 -- undocked
|
||||
ibm/dock GDCK 00000000 00000003 -- docked
|
||||
|
||||
NOTE: These events will only be generated if the laptop was docked
|
||||
when originally booted. This is due to the current lack of support for
|
||||
hot plugging of devices in the Linux ACPI framework. If the laptop was
|
||||
booted while not in the dock, the following message is shown in the
|
||||
logs:
|
||||
|
||||
Mar 17 01:42:34 aero kernel: thinkpad_acpi: dock device not present
|
||||
|
||||
In this case, no dock-related events are generated but the dock and
|
||||
undock commands described below still work. They can be executed
|
||||
manually or triggered by Fn key combinations (see the example acpid
|
||||
configuration files included in the driver tarball package available
|
||||
on the web site).
|
||||
|
||||
When the eject request button on the dock is pressed, the first event
|
||||
above is generated. The handler for this event should issue the
|
||||
following command:
|
||||
|
||||
echo undock > /proc/acpi/ibm/dock
|
||||
|
||||
After the LED on the dock goes off, it is safe to eject the laptop.
|
||||
Note: if you pressed this key by mistake, go ahead and eject the
|
||||
laptop, then dock it back in. Otherwise, the dock may not function as
|
||||
expected.
|
||||
|
||||
When the laptop is docked, the third event above is generated. The
|
||||
handler for this event should issue the following command to fully
|
||||
enable the dock:
|
||||
|
||||
echo dock > /proc/acpi/ibm/dock
|
||||
|
||||
The contents of the /proc/acpi/ibm/dock file shows the current status
|
||||
of the dock, as provided by the ACPI framework.
|
||||
|
||||
The docking support in this driver does not take care of enabling or
|
||||
disabling any other devices you may have attached to the dock. For
|
||||
example, a CD drive plugged into the UltraBase needs to be disabled or
|
||||
enabled separately. See the provided example acpid configuration files
|
||||
for how this can be accomplished.
|
||||
|
||||
There is no support yet for PCI devices that may be attached to a
|
||||
docking station, e.g. in the ThinkPad Dock II. The driver currently
|
||||
does not recognize, enable or disable such devices. This means that
|
||||
the only docking stations currently supported are the X-series
|
||||
UltraBase docks and "dumb" port replicators like the Mini Dock (the
|
||||
latter don't need any ACPI support, actually).
|
||||
|
||||
|
||||
UltraBay eject -- /proc/acpi/ibm/bay
|
||||
------------------------------------
|
||||
|
||||
Inserting or ejecting an UltraBay device requires some actions to be
|
||||
taken by the operating system to safely make or break the electrical
|
||||
connections with the device.
|
||||
|
||||
This feature generates the following ACPI events:
|
||||
|
||||
ibm/bay MSTR 00000003 00000000 -- eject request
|
||||
ibm/bay MSTR 00000001 00000000 -- eject lever inserted
|
||||
|
||||
NOTE: These events will only be generated if the UltraBay was present
|
||||
when the laptop was originally booted (on the X series, the UltraBay
|
||||
is in the dock, so it may not be present if the laptop was undocked).
|
||||
This is due to the current lack of support for hot plugging of devices
|
||||
in the Linux ACPI framework. If the laptop was booted without the
|
||||
UltraBay, the following message is shown in the logs:
|
||||
|
||||
Mar 17 01:42:34 aero kernel: thinkpad_acpi: bay device not present
|
||||
|
||||
In this case, no bay-related events are generated but the eject
|
||||
command described below still works. It can be executed manually or
|
||||
triggered by a hot key combination.
|
||||
|
||||
Sliding the eject lever generates the first event shown above. The
|
||||
handler for this event should take whatever actions are necessary to
|
||||
shut down the device in the UltraBay (e.g. call idectl), then issue
|
||||
the following command:
|
||||
|
||||
echo eject > /proc/acpi/ibm/bay
|
||||
|
||||
After the LED on the UltraBay goes off, it is safe to pull out the
|
||||
device.
|
||||
|
||||
When the eject lever is inserted, the second event above is
|
||||
generated. The handler for this event should take whatever actions are
|
||||
necessary to enable the UltraBay device (e.g. call idectl).
|
||||
|
||||
The contents of the /proc/acpi/ibm/bay file shows the current status
|
||||
of the UltraBay, as provided by the ACPI framework.
|
||||
|
||||
EXPERIMENTAL warm eject support on the 600e/x, A22p and A3x (To use
|
||||
this feature, you need to supply the experimental=1 parameter when
|
||||
loading the module):
|
||||
|
||||
These models do not have a button near the UltraBay device to request
|
||||
a hot eject but rather require the laptop to be put to sleep
|
||||
(suspend-to-ram) before the bay device is ejected or inserted).
|
||||
The sequence of steps to eject the device is as follows:
|
||||
|
||||
echo eject > /proc/acpi/ibm/bay
|
||||
put the ThinkPad to sleep
|
||||
remove the drive
|
||||
resume from sleep
|
||||
cat /proc/acpi/ibm/bay should show that the drive was removed
|
||||
|
||||
On the A3x, both the UltraBay 2000 and UltraBay Plus devices are
|
||||
supported. Use "eject2" instead of "eject" for the second bay.
|
||||
|
||||
Note: the UltraBay eject support on the 600e/x, A22p and A3x is
|
||||
EXPERIMENTAL and may not work as expected. USE WITH CAUTION!
|
||||
|
||||
|
||||
CMOS/UCMS control
|
||||
-----------------
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,7 +1,7 @@
|
||||
This is the 6pack-mini-HOWTO, written by
|
||||
|
||||
Andreas Könsgen DG3KQ
|
||||
Internet: ajk@iehk.rwth-aachen.de
|
||||
Internet: ajk@comnets.uni-bremen.de
|
||||
AMPR-net: dg3kq@db0pra.ampr.org
|
||||
AX.25: dg3kq@db0ach.#nrw.deu.eu
|
||||
|
||||
|
@ -73,7 +73,7 @@ The remaining CPU time will be used for user input and other tasks. Because
|
||||
realtime tasks have explicitly allocated the CPU time they need to perform
|
||||
their tasks, buffer underruns in the graphics or audio can be eliminated.
|
||||
|
||||
NOTE: the above example is not fully implemented as of yet (2.6.25). We still
|
||||
NOTE: the above example is not fully implemented yet. We still
|
||||
lack an EDF scheduler to make non-uniform periods usable.
|
||||
|
||||
|
||||
@ -140,14 +140,15 @@ The other option is:
|
||||
|
||||
.o CONFIG_CGROUP_SCHED (aka "Basis for grouping tasks" = "Control groups")
|
||||
|
||||
This uses the /cgroup virtual file system and "/cgroup/<cgroup>/cpu.rt_runtime_us"
|
||||
to control the CPU time reserved for each control group instead.
|
||||
This uses the /cgroup virtual file system and
|
||||
"/cgroup/<cgroup>/cpu.rt_runtime_us" to control the CPU time reserved for each
|
||||
control group instead.
|
||||
|
||||
For more information on working with control groups, you should read
|
||||
Documentation/cgroups/cgroups.txt as well.
|
||||
|
||||
Group settings are checked against the following limits in order to keep the configuration
|
||||
schedulable:
|
||||
Group settings are checked against the following limits in order to keep the
|
||||
configuration schedulable:
|
||||
|
||||
\Sum_{i} runtime_{i} / global_period <= global_runtime / global_period
|
||||
|
||||
@ -189,7 +190,7 @@ Implementing SCHED_EDF might take a while to complete. Priority Inheritance is
|
||||
the biggest challenge as the current linux PI infrastructure is geared towards
|
||||
the limited static priority levels 0-99. With deadline scheduling you need to
|
||||
do deadline inheritance (since priority is inversely proportional to the
|
||||
deadline delta (deadline - now).
|
||||
deadline delta (deadline - now)).
|
||||
|
||||
This means the whole PI machinery will have to be reworked - and that is one of
|
||||
the most complex pieces of code we have.
|
||||
|
@ -101,6 +101,8 @@ card*/pcm*/xrun_debug
|
||||
bit 0 = Enable XRUN/jiffies debug messages
|
||||
bit 1 = Show stack trace at XRUN / jiffies check
|
||||
bit 2 = Enable additional jiffies check
|
||||
bit 3 = Log hwptr update at each period interrupt
|
||||
bit 4 = Log hwptr update at each snd_pcm_update_hw_ptr()
|
||||
|
||||
When the bit 0 is set, the driver will show the messages to
|
||||
kernel log when an xrun is detected. The debug message is
|
||||
@ -117,6 +119,9 @@ card*/pcm*/xrun_debug
|
||||
buggy) hardware that doesn't give smooth pointer updates.
|
||||
This feature is enabled via the bit 2.
|
||||
|
||||
Bits 3 and 4 are for logging the hwptr records. Note that
|
||||
these will give flood of kernel messages.
|
||||
|
||||
card*/pcm*/sub*/info
|
||||
The general information of this PCM sub-stream.
|
||||
|
||||
|
@ -66,7 +66,8 @@ On all - write a character to /proc/sysrq-trigger. e.g.:
|
||||
'b' - Will immediately reboot the system without syncing or unmounting
|
||||
your disks.
|
||||
|
||||
'c' - Will perform a kexec reboot in order to take a crashdump.
|
||||
'c' - Will perform a system crash by a NULL pointer dereference.
|
||||
A crashdump will be taken if configured.
|
||||
|
||||
'd' - Shows all locks that are held.
|
||||
|
||||
@ -141,8 +142,8 @@ useful when you want to exit a program that will not let you switch consoles.
|
||||
re'B'oot is good when you're unable to shut down. But you should also 'S'ync
|
||||
and 'U'mount first.
|
||||
|
||||
'C'rashdump can be used to manually trigger a crashdump when the system is hung.
|
||||
The kernel needs to have been built with CONFIG_KEXEC enabled.
|
||||
'C'rash can be used to manually trigger a crashdump when the system is hung.
|
||||
Note that this just triggers a crash if there is no dump mechanism available.
|
||||
|
||||
'S'ync is great when your system is locked up, it allows you to sync your
|
||||
disks and will certainly lessen the chance of data loss and fscking. Note
|
||||
|
@ -20,7 +20,7 @@
|
||||
19 -> EM2860/SAA711X Reference Design (em2860)
|
||||
20 -> AMD ATI TV Wonder HD 600 (em2880) [0438:b002]
|
||||
21 -> eMPIA Technology, Inc. GrabBeeX+ Video Encoder (em2800) [eb1a:2801]
|
||||
22 -> Unknown EM2750/EM2751 webcam grabber (em2750) [eb1a:2750,eb1a:2751]
|
||||
22 -> EM2710/EM2750/EM2751 webcam grabber (em2750) [eb1a:2750,eb1a:2751]
|
||||
23 -> Huaqi DLCW-130 (em2750)
|
||||
24 -> D-Link DUB-T210 TV Tuner (em2820/em2840) [2001:f112]
|
||||
25 -> Gadmei UTV310 (em2820/em2840)
|
||||
@ -66,3 +66,4 @@
|
||||
68 -> Terratec AV350 (em2860) [0ccd:0084]
|
||||
69 -> KWorld ATSC 315U HDTV TV Box (em2882) [eb1a:a313]
|
||||
70 -> Evga inDtube (em2882)
|
||||
71 -> Silvercrest Webcam 1.3mpix (em2820/em2840)
|
||||
|
@ -44,7 +44,9 @@ zc3xx 0458:7007 Genius VideoCam V2
|
||||
zc3xx 0458:700c Genius VideoCam V3
|
||||
zc3xx 0458:700f Genius VideoCam Web V2
|
||||
sonixj 0458:7025 Genius Eye 311Q
|
||||
sn9c20x 0458:7029 Genius Look 320s
|
||||
sonixj 0458:702e Genius Slim 310 NB
|
||||
sn9c20x 045e:00f4 LifeCam VX-6000 (SN9C20x + OV9650)
|
||||
sonixj 045e:00f5 MicroSoft VX3000
|
||||
sonixj 045e:00f7 MicroSoft VX1000
|
||||
ov519 045e:028c Micro$oft xbox cam
|
||||
@ -282,6 +284,28 @@ sonixj 0c45:613a Microdia Sonix PC Camera
|
||||
sonixj 0c45:613b Surfer SN-206
|
||||
sonixj 0c45:613c Sonix Pccam168
|
||||
sonixj 0c45:6143 Sonix Pccam168
|
||||
sn9c20x 0c45:6240 PC Camera (SN9C201 + MT9M001)
|
||||
sn9c20x 0c45:6242 PC Camera (SN9C201 + MT9M111)
|
||||
sn9c20x 0c45:6248 PC Camera (SN9C201 + OV9655)
|
||||
sn9c20x 0c45:624e PC Camera (SN9C201 + SOI968)
|
||||
sn9c20x 0c45:624f PC Camera (SN9C201 + OV9650)
|
||||
sn9c20x 0c45:6251 PC Camera (SN9C201 + OV9650)
|
||||
sn9c20x 0c45:6253 PC Camera (SN9C201 + OV9650)
|
||||
sn9c20x 0c45:6260 PC Camera (SN9C201 + OV7670)
|
||||
sn9c20x 0c45:6270 PC Camera (SN9C201 + MT9V011/MT9V111/MT9V112)
|
||||
sn9c20x 0c45:627b PC Camera (SN9C201 + OV7660)
|
||||
sn9c20x 0c45:627c PC Camera (SN9C201 + HV7131R)
|
||||
sn9c20x 0c45:627f PC Camera (SN9C201 + OV9650)
|
||||
sn9c20x 0c45:6280 PC Camera (SN9C202 + MT9M001)
|
||||
sn9c20x 0c45:6282 PC Camera (SN9C202 + MT9M111)
|
||||
sn9c20x 0c45:6288 PC Camera (SN9C202 + OV9655)
|
||||
sn9c20x 0c45:628e PC Camera (SN9C202 + SOI968)
|
||||
sn9c20x 0c45:628f PC Camera (SN9C202 + OV9650)
|
||||
sn9c20x 0c45:62a0 PC Camera (SN9C202 + OV7670)
|
||||
sn9c20x 0c45:62b0 PC Camera (SN9C202 + MT9V011/MT9V111/MT9V112)
|
||||
sn9c20x 0c45:62b3 PC Camera (SN9C202 + OV9655)
|
||||
sn9c20x 0c45:62bb PC Camera (SN9C202 + OV7660)
|
||||
sn9c20x 0c45:62bc PC Camera (SN9C202 + HV7131R)
|
||||
sunplus 0d64:0303 Sunplus FashionCam DXG
|
||||
etoms 102c:6151 Qcam Sangha CIF
|
||||
etoms 102c:6251 Qcam xxxxxx VGA
|
||||
@ -290,6 +314,7 @@ spca561 10fd:7e50 FlyCam Usb 100
|
||||
zc3xx 10fd:8050 Typhoon Webshot II USB 300k
|
||||
ov534 1415:2000 Sony HD Eye for PS3 (SLEH 00201)
|
||||
pac207 145f:013a Trust WB-1300N
|
||||
sn9c20x 145f:013d Trust WB-3600R
|
||||
vc032x 15b8:6001 HP 2.0 Megapixel
|
||||
vc032x 15b8:6002 HP 2.0 Megapixel rz406aa
|
||||
spca501 1776:501c Arowana 300K CMOS Camera
|
||||
@ -300,4 +325,11 @@ spca500 2899:012c Toptro Industrial
|
||||
spca508 8086:0110 Intel Easy PC Camera
|
||||
spca500 8086:0630 Intel Pocket PC Camera
|
||||
spca506 99fa:8988 Grandtec V.cap
|
||||
sn9c20x a168:0610 Dino-Lite Digital Microscope (SN9C201 + HV7131R)
|
||||
sn9c20x a168:0611 Dino-Lite Digital Microscope (SN9C201 + HV7131R)
|
||||
sn9c20x a168:0613 Dino-Lite Digital Microscope (SN9C201 + HV7131R)
|
||||
sn9c20x a168:0618 Dino-Lite Digital Microscope (SN9C201 + HV7131R)
|
||||
sn9c20x a168:0614 Dino-Lite Digital Microscope (SN9C201 + MT9M111)
|
||||
sn9c20x a168:0615 Dino-Lite Digital Microscope (SN9C201 + MT9M111)
|
||||
sn9c20x a168:0617 Dino-Lite Digital Microscope (SN9C201 + MT9M111)
|
||||
spca561 abcd:cdee Petcam
|
||||
|
@ -2,3 +2,5 @@
|
||||
- this file
|
||||
mtrr.txt
|
||||
- how to use x86 Memory Type Range Registers to increase performance
|
||||
exception-tables.txt
|
||||
- why and how Linux kernel uses exception tables on x86
|
||||
|
@ -1,123 +1,123 @@
|
||||
Kernel level exception handling in Linux 2.1.8
|
||||
Kernel level exception handling in Linux
|
||||
Commentary by Joerg Pommnitz <joerg@raleigh.ibm.com>
|
||||
|
||||
When a process runs in kernel mode, it often has to access user
|
||||
mode memory whose address has been passed by an untrusted program.
|
||||
When a process runs in kernel mode, it often has to access user
|
||||
mode memory whose address has been passed by an untrusted program.
|
||||
To protect itself the kernel has to verify this address.
|
||||
|
||||
In older versions of Linux this was done with the
|
||||
int verify_area(int type, const void * addr, unsigned long size)
|
||||
In older versions of Linux this was done with the
|
||||
int verify_area(int type, const void * addr, unsigned long size)
|
||||
function (which has since been replaced by access_ok()).
|
||||
|
||||
This function verified that the memory area starting at address
|
||||
This function verified that the memory area starting at address
|
||||
'addr' and of size 'size' was accessible for the operation specified
|
||||
in type (read or write). To do this, verify_read had to look up the
|
||||
virtual memory area (vma) that contained the address addr. In the
|
||||
normal case (correctly working program), this test was successful.
|
||||
in type (read or write). To do this, verify_read had to look up the
|
||||
virtual memory area (vma) that contained the address addr. In the
|
||||
normal case (correctly working program), this test was successful.
|
||||
It only failed for a few buggy programs. In some kernel profiling
|
||||
tests, this normally unneeded verification used up a considerable
|
||||
amount of time.
|
||||
|
||||
To overcome this situation, Linus decided to let the virtual memory
|
||||
To overcome this situation, Linus decided to let the virtual memory
|
||||
hardware present in every Linux-capable CPU handle this test.
|
||||
|
||||
How does this work?
|
||||
|
||||
Whenever the kernel tries to access an address that is currently not
|
||||
accessible, the CPU generates a page fault exception and calls the
|
||||
page fault handler
|
||||
Whenever the kernel tries to access an address that is currently not
|
||||
accessible, the CPU generates a page fault exception and calls the
|
||||
page fault handler
|
||||
|
||||
void do_page_fault(struct pt_regs *regs, unsigned long error_code)
|
||||
|
||||
in arch/i386/mm/fault.c. The parameters on the stack are set up by
|
||||
the low level assembly glue in arch/i386/kernel/entry.S. The parameter
|
||||
regs is a pointer to the saved registers on the stack, error_code
|
||||
in arch/x86/mm/fault.c. The parameters on the stack are set up by
|
||||
the low level assembly glue in arch/x86/kernel/entry_32.S. The parameter
|
||||
regs is a pointer to the saved registers on the stack, error_code
|
||||
contains a reason code for the exception.
|
||||
|
||||
do_page_fault first obtains the unaccessible address from the CPU
|
||||
control register CR2. If the address is within the virtual address
|
||||
space of the process, the fault probably occurred, because the page
|
||||
was not swapped in, write protected or something similar. However,
|
||||
we are interested in the other case: the address is not valid, there
|
||||
is no vma that contains this address. In this case, the kernel jumps
|
||||
to the bad_area label.
|
||||
do_page_fault first obtains the unaccessible address from the CPU
|
||||
control register CR2. If the address is within the virtual address
|
||||
space of the process, the fault probably occurred, because the page
|
||||
was not swapped in, write protected or something similar. However,
|
||||
we are interested in the other case: the address is not valid, there
|
||||
is no vma that contains this address. In this case, the kernel jumps
|
||||
to the bad_area label.
|
||||
|
||||
There it uses the address of the instruction that caused the exception
|
||||
(i.e. regs->eip) to find an address where the execution can continue
|
||||
(fixup). If this search is successful, the fault handler modifies the
|
||||
return address (again regs->eip) and returns. The execution will
|
||||
There it uses the address of the instruction that caused the exception
|
||||
(i.e. regs->eip) to find an address where the execution can continue
|
||||
(fixup). If this search is successful, the fault handler modifies the
|
||||
return address (again regs->eip) and returns. The execution will
|
||||
continue at the address in fixup.
|
||||
|
||||
Where does fixup point to?
|
||||
|
||||
Since we jump to the contents of fixup, fixup obviously points
|
||||
to executable code. This code is hidden inside the user access macros.
|
||||
I have picked the get_user macro defined in include/asm/uaccess.h as an
|
||||
example. The definition is somewhat hard to follow, so let's peek at
|
||||
Since we jump to the contents of fixup, fixup obviously points
|
||||
to executable code. This code is hidden inside the user access macros.
|
||||
I have picked the get_user macro defined in arch/x86/include/asm/uaccess.h
|
||||
as an example. The definition is somewhat hard to follow, so let's peek at
|
||||
the code generated by the preprocessor and the compiler. I selected
|
||||
the get_user call in drivers/char/console.c for a detailed examination.
|
||||
the get_user call in drivers/char/sysrq.c for a detailed examination.
|
||||
|
||||
The original code in console.c line 1405:
|
||||
The original code in sysrq.c line 587:
|
||||
get_user(c, buf);
|
||||
|
||||
The preprocessor output (edited to become somewhat readable):
|
||||
|
||||
(
|
||||
{
|
||||
long __gu_err = - 14 , __gu_val = 0;
|
||||
const __typeof__(*( ( buf ) )) *__gu_addr = ((buf));
|
||||
if (((((0 + current_set[0])->tss.segment) == 0x18 ) ||
|
||||
(((sizeof(*(buf))) <= 0xC0000000UL) &&
|
||||
((unsigned long)(__gu_addr ) <= 0xC0000000UL - (sizeof(*(buf)))))))
|
||||
{
|
||||
long __gu_err = - 14 , __gu_val = 0;
|
||||
const __typeof__(*( ( buf ) )) *__gu_addr = ((buf));
|
||||
if (((((0 + current_set[0])->tss.segment) == 0x18 ) ||
|
||||
(((sizeof(*(buf))) <= 0xC0000000UL) &&
|
||||
((unsigned long)(__gu_addr ) <= 0xC0000000UL - (sizeof(*(buf)))))))
|
||||
do {
|
||||
__gu_err = 0;
|
||||
switch ((sizeof(*(buf)))) {
|
||||
case 1:
|
||||
__asm__ __volatile__(
|
||||
"1: mov" "b" " %2,%" "b" "1\n"
|
||||
"2:\n"
|
||||
".section .fixup,\"ax\"\n"
|
||||
"3: movl %3,%0\n"
|
||||
" xor" "b" " %" "b" "1,%" "b" "1\n"
|
||||
" jmp 2b\n"
|
||||
".section __ex_table,\"a\"\n"
|
||||
" .align 4\n"
|
||||
" .long 1b,3b\n"
|
||||
".text" : "=r"(__gu_err), "=q" (__gu_val): "m"((*(struct __large_struct *)
|
||||
( __gu_addr )) ), "i"(- 14 ), "0"( __gu_err )) ;
|
||||
break;
|
||||
case 2:
|
||||
__gu_err = 0;
|
||||
switch ((sizeof(*(buf)))) {
|
||||
case 1:
|
||||
__asm__ __volatile__(
|
||||
"1: mov" "w" " %2,%" "w" "1\n"
|
||||
"2:\n"
|
||||
".section .fixup,\"ax\"\n"
|
||||
"3: movl %3,%0\n"
|
||||
" xor" "w" " %" "w" "1,%" "w" "1\n"
|
||||
" jmp 2b\n"
|
||||
".section __ex_table,\"a\"\n"
|
||||
" .align 4\n"
|
||||
" .long 1b,3b\n"
|
||||
"1: mov" "b" " %2,%" "b" "1\n"
|
||||
"2:\n"
|
||||
".section .fixup,\"ax\"\n"
|
||||
"3: movl %3,%0\n"
|
||||
" xor" "b" " %" "b" "1,%" "b" "1\n"
|
||||
" jmp 2b\n"
|
||||
".section __ex_table,\"a\"\n"
|
||||
" .align 4\n"
|
||||
" .long 1b,3b\n"
|
||||
".text" : "=r"(__gu_err), "=q" (__gu_val): "m"((*(struct __large_struct *)
|
||||
( __gu_addr )) ), "i"(- 14 ), "0"( __gu_err )) ;
|
||||
break;
|
||||
case 2:
|
||||
__asm__ __volatile__(
|
||||
"1: mov" "w" " %2,%" "w" "1\n"
|
||||
"2:\n"
|
||||
".section .fixup,\"ax\"\n"
|
||||
"3: movl %3,%0\n"
|
||||
" xor" "w" " %" "w" "1,%" "w" "1\n"
|
||||
" jmp 2b\n"
|
||||
".section __ex_table,\"a\"\n"
|
||||
" .align 4\n"
|
||||
" .long 1b,3b\n"
|
||||
".text" : "=r"(__gu_err), "=r" (__gu_val) : "m"((*(struct __large_struct *)
|
||||
( __gu_addr )) ), "i"(- 14 ), "0"( __gu_err ));
|
||||
break;
|
||||
case 4:
|
||||
__asm__ __volatile__(
|
||||
"1: mov" "l" " %2,%" "" "1\n"
|
||||
"2:\n"
|
||||
".section .fixup,\"ax\"\n"
|
||||
"3: movl %3,%0\n"
|
||||
" xor" "l" " %" "" "1,%" "" "1\n"
|
||||
" jmp 2b\n"
|
||||
".section __ex_table,\"a\"\n"
|
||||
" .align 4\n" " .long 1b,3b\n"
|
||||
( __gu_addr )) ), "i"(- 14 ), "0"( __gu_err ));
|
||||
break;
|
||||
case 4:
|
||||
__asm__ __volatile__(
|
||||
"1: mov" "l" " %2,%" "" "1\n"
|
||||
"2:\n"
|
||||
".section .fixup,\"ax\"\n"
|
||||
"3: movl %3,%0\n"
|
||||
" xor" "l" " %" "" "1,%" "" "1\n"
|
||||
" jmp 2b\n"
|
||||
".section __ex_table,\"a\"\n"
|
||||
" .align 4\n" " .long 1b,3b\n"
|
||||
".text" : "=r"(__gu_err), "=r" (__gu_val) : "m"((*(struct __large_struct *)
|
||||
( __gu_addr )) ), "i"(- 14 ), "0"(__gu_err));
|
||||
break;
|
||||
default:
|
||||
(__gu_val) = __get_user_bad();
|
||||
}
|
||||
} while (0) ;
|
||||
((c)) = (__typeof__(*((buf))))__gu_val;
|
||||
( __gu_addr )) ), "i"(- 14 ), "0"(__gu_err));
|
||||
break;
|
||||
default:
|
||||
(__gu_val) = __get_user_bad();
|
||||
}
|
||||
} while (0) ;
|
||||
((c)) = (__typeof__(*((buf))))__gu_val;
|
||||
__gu_err;
|
||||
}
|
||||
);
|
||||
@ -127,12 +127,12 @@ see what code gcc generates:
|
||||
|
||||
> xorl %edx,%edx
|
||||
> movl current_set,%eax
|
||||
> cmpl $24,788(%eax)
|
||||
> je .L1424
|
||||
> cmpl $24,788(%eax)
|
||||
> je .L1424
|
||||
> cmpl $-1073741825,64(%esp)
|
||||
> ja .L1423
|
||||
> ja .L1423
|
||||
> .L1424:
|
||||
> movl %edx,%eax
|
||||
> movl %edx,%eax
|
||||
> movl 64(%esp),%ebx
|
||||
> #APP
|
||||
> 1: movb (%ebx),%dl /* this is the actual user access */
|
||||
@ -149,17 +149,17 @@ see what code gcc generates:
|
||||
> .L1423:
|
||||
> movzbl %dl,%esi
|
||||
|
||||
The optimizer does a good job and gives us something we can actually
|
||||
understand. Can we? The actual user access is quite obvious. Thanks
|
||||
to the unified address space we can just access the address in user
|
||||
The optimizer does a good job and gives us something we can actually
|
||||
understand. Can we? The actual user access is quite obvious. Thanks
|
||||
to the unified address space we can just access the address in user
|
||||
memory. But what does the .section stuff do?????
|
||||
|
||||
To understand this we have to look at the final kernel:
|
||||
|
||||
> objdump --section-headers vmlinux
|
||||
>
|
||||
>
|
||||
> vmlinux: file format elf32-i386
|
||||
>
|
||||
>
|
||||
> Sections:
|
||||
> Idx Name Size VMA LMA File off Algn
|
||||
> 0 .text 00098f40 c0100000 c0100000 00001000 2**4
|
||||
@ -198,18 +198,18 @@ final kernel executable:
|
||||
|
||||
The whole user memory access is reduced to 10 x86 machine instructions.
|
||||
The instructions bracketed in the .section directives are no longer
|
||||
in the normal execution path. They are located in a different section
|
||||
in the normal execution path. They are located in a different section
|
||||
of the executable file:
|
||||
|
||||
> objdump --disassemble --section=.fixup vmlinux
|
||||
>
|
||||
>
|
||||
> c0199ff5 <.fixup+10b5> movl $0xfffffff2,%eax
|
||||
> c0199ffa <.fixup+10ba> xorb %dl,%dl
|
||||
> c0199ffc <.fixup+10bc> jmp c017e7a7 <do_con_write+e3>
|
||||
|
||||
And finally:
|
||||
> objdump --full-contents --section=__ex_table vmlinux
|
||||
>
|
||||
>
|
||||
> c01aa7c4 93c017c0 e09f19c0 97c017c0 99c017c0 ................
|
||||
> c01aa7d4 f6c217c0 e99f19c0 a5e717c0 f59f19c0 ................
|
||||
> c01aa7e4 080a18c0 01a019c0 0a0a18c0 04a019c0 ................
|
||||
@ -235,8 +235,8 @@ sections in the ELF object file. So the instructions
|
||||
ended up in the .fixup section of the object file and the addresses
|
||||
.long 1b,3b
|
||||
ended up in the __ex_table section of the object file. 1b and 3b
|
||||
are local labels. The local label 1b (1b stands for next label 1
|
||||
backward) is the address of the instruction that might fault, i.e.
|
||||
are local labels. The local label 1b (1b stands for next label 1
|
||||
backward) is the address of the instruction that might fault, i.e.
|
||||
in our case the address of the label 1 is c017e7a5:
|
||||
the original assembly code: > 1: movb (%ebx),%dl
|
||||
and linked in vmlinux : > c017e7a5 <do_con_write+e1> movb (%ebx),%dl
|
||||
@ -254,7 +254,7 @@ The assembly code
|
||||
becomes the value pair
|
||||
> c01aa7d4 c017c2f6 c0199fe9 c017e7a5 c0199ff5 ................
|
||||
^this is ^this is
|
||||
1b 3b
|
||||
1b 3b
|
||||
c017e7a5,c0199ff5 in the exception table of the kernel.
|
||||
|
||||
So, what actually happens if a fault from kernel mode with no suitable
|
||||
@ -266,9 +266,9 @@ vma occurs?
|
||||
3.) CPU calls do_page_fault
|
||||
4.) do page fault calls search_exception_table (regs->eip == c017e7a5);
|
||||
5.) search_exception_table looks up the address c017e7a5 in the
|
||||
exception table (i.e. the contents of the ELF section __ex_table)
|
||||
exception table (i.e. the contents of the ELF section __ex_table)
|
||||
and returns the address of the associated fault handle code c0199ff5.
|
||||
6.) do_page_fault modifies its own return address to point to the fault
|
||||
6.) do_page_fault modifies its own return address to point to the fault
|
||||
handle code and returns.
|
||||
7.) execution continues in the fault handling code.
|
||||
8.) 8a) EAX becomes -EFAULT (== -14)
|
2791
MAINTAINERS
2791
MAINTAINERS
File diff suppressed because it is too large
Load Diff
7
Makefile
7
Makefile
@ -1,7 +1,7 @@
|
||||
VERSION = 2
|
||||
PATCHLEVEL = 6
|
||||
SUBLEVEL = 31
|
||||
EXTRAVERSION = -rc2
|
||||
EXTRAVERSION = -rc5
|
||||
NAME = Man-Eating Seals of Antiquity
|
||||
|
||||
# *DOCUMENTATION*
|
||||
@ -343,7 +343,8 @@ KBUILD_CPPFLAGS := -D__KERNEL__
|
||||
KBUILD_CFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \
|
||||
-fno-strict-aliasing -fno-common \
|
||||
-Werror-implicit-function-declaration \
|
||||
-Wno-format-security
|
||||
-Wno-format-security \
|
||||
-fno-delete-null-pointer-checks
|
||||
KBUILD_AFLAGS := -D__ASSEMBLY__
|
||||
|
||||
# Read KERNELRELEASE from include/config/kernel.release (if it exists)
|
||||
@ -565,7 +566,7 @@ KBUILD_CFLAGS += $(call cc-option,-Wdeclaration-after-statement,)
|
||||
KBUILD_CFLAGS += $(call cc-option,-Wno-pointer-sign,)
|
||||
|
||||
# disable invalid "can't wrap" optimizations for signed / pointers
|
||||
KBUILD_CFLAGS += $(call cc-option,-fwrapv)
|
||||
KBUILD_CFLAGS += $(call cc-option,-fno-strict-overflow)
|
||||
|
||||
# revert to pre-gcc-4.4 behaviour of .eh_frame
|
||||
KBUILD_CFLAGS += $(call cc-option,-fno-dwarf2-cfi-asm)
|
||||
|
@ -37,6 +37,7 @@ struct thread_info {
|
||||
.task = &tsk, \
|
||||
.exec_domain = &default_exec_domain, \
|
||||
.addr_limit = KERNEL_DS, \
|
||||
.preempt_count = INIT_PREEMPT_COUNT, \
|
||||
.restart_block = { \
|
||||
.fn = do_no_restart_syscall, \
|
||||
}, \
|
||||
|
@ -9,7 +9,7 @@
|
||||
|
||||
#include <asm-generic/tlb.h>
|
||||
|
||||
#define __pte_free_tlb(tlb, pte) pte_free((tlb)->mm, pte)
|
||||
#define __pmd_free_tlb(tlb, pmd) pmd_free((tlb)->mm, pmd)
|
||||
#define __pte_free_tlb(tlb, pte, address) pte_free((tlb)->mm, pte)
|
||||
#define __pmd_free_tlb(tlb, pmd, address) pmd_free((tlb)->mm, pmd)
|
||||
|
||||
#endif
|
||||
|
@ -8,7 +8,6 @@
|
||||
#include <linux/sched.h>
|
||||
#include <linux/mm.h>
|
||||
#include <linux/smp.h>
|
||||
#include <linux/smp_lock.h>
|
||||
#include <linux/errno.h>
|
||||
#include <linux/ptrace.h>
|
||||
#include <linux/user.h>
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,7 +1,7 @@
|
||||
#
|
||||
# Automatically generated make config: don't edit
|
||||
# Linux kernel version: 2.6.30-rc6
|
||||
# Mon Jun 1 09:18:22 2009
|
||||
# Linux kernel version: 2.6.31-rc3
|
||||
# Thu Jul 16 23:36:10 2009
|
||||
#
|
||||
CONFIG_ARM=y
|
||||
CONFIG_SYS_SUPPORTS_APM_EMULATION=y
|
||||
@ -9,7 +9,6 @@ CONFIG_GENERIC_GPIO=y
|
||||
CONFIG_GENERIC_TIME=y
|
||||
CONFIG_GENERIC_CLOCKEVENTS=y
|
||||
CONFIG_MMU=y
|
||||
# CONFIG_NO_IOPORT is not set
|
||||
CONFIG_GENERIC_HARDIRQS=y
|
||||
CONFIG_STACKTRACE_SUPPORT=y
|
||||
CONFIG_HAVE_LATENCYTOP_SUPPORT=y
|
||||
@ -18,13 +17,12 @@ CONFIG_TRACE_IRQFLAGS_SUPPORT=y
|
||||
CONFIG_HARDIRQS_SW_RESEND=y
|
||||
CONFIG_GENERIC_IRQ_PROBE=y
|
||||
CONFIG_RWSEM_GENERIC_SPINLOCK=y
|
||||
# CONFIG_ARCH_HAS_ILOG2_U32 is not set
|
||||
# CONFIG_ARCH_HAS_ILOG2_U64 is not set
|
||||
CONFIG_GENERIC_HWEIGHT=y
|
||||
CONFIG_GENERIC_CALIBRATE_DELAY=y
|
||||
CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
|
||||
CONFIG_VECTORS_BASE=0xffff0000
|
||||
CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
|
||||
CONFIG_CONSTRUCTORS=y
|
||||
|
||||
#
|
||||
# General setup
|
||||
@ -68,7 +66,6 @@ CONFIG_SYSCTL_SYSCALL=y
|
||||
CONFIG_KALLSYMS=y
|
||||
# CONFIG_KALLSYMS_ALL is not set
|
||||
# CONFIG_KALLSYMS_EXTRA_PASS is not set
|
||||
# CONFIG_STRIP_ASM_SYMS is not set
|
||||
CONFIG_HOTPLUG=y
|
||||
CONFIG_PRINTK=y
|
||||
CONFIG_BUG=y
|
||||
@ -81,8 +78,13 @@ CONFIG_TIMERFD=y
|
||||
CONFIG_EVENTFD=y
|
||||
CONFIG_SHMEM=y
|
||||
# CONFIG_AIO is not set
|
||||
|
||||
#
|
||||
# Performance Counters
|
||||
#
|
||||
# CONFIG_VM_EVENT_COUNTERS is not set
|
||||
CONFIG_SLUB_DEBUG=y
|
||||
# CONFIG_STRIP_ASM_SYMS is not set
|
||||
CONFIG_COMPAT_BRK=y
|
||||
# CONFIG_SLAB is not set
|
||||
CONFIG_SLUB=y
|
||||
@ -94,6 +96,10 @@ CONFIG_HAVE_OPROFILE=y
|
||||
CONFIG_HAVE_KPROBES=y
|
||||
CONFIG_HAVE_KRETPROBES=y
|
||||
CONFIG_HAVE_CLK=y
|
||||
|
||||
#
|
||||
# GCOV-based kernel profiling
|
||||
#
|
||||
# CONFIG_SLOW_WORK is not set
|
||||
CONFIG_HAVE_GENERIC_DMA_COHERENT=y
|
||||
CONFIG_SLABINFO=y
|
||||
@ -106,7 +112,7 @@ CONFIG_MODULE_UNLOAD=y
|
||||
# CONFIG_MODVERSIONS is not set
|
||||
# CONFIG_MODULE_SRCVERSION_ALL is not set
|
||||
CONFIG_BLOCK=y
|
||||
# CONFIG_LBD is not set
|
||||
# CONFIG_LBDAF is not set
|
||||
# CONFIG_BLK_DEV_BSG is not set
|
||||
# CONFIG_BLK_DEV_INTEGRITY is not set
|
||||
|
||||
@ -138,9 +144,9 @@ CONFIG_DEFAULT_IOSCHED="deadline"
|
||||
# CONFIG_ARCH_EP93XX is not set
|
||||
# CONFIG_ARCH_FOOTBRIDGE is not set
|
||||
# CONFIG_ARCH_MXC is not set
|
||||
# CONFIG_ARCH_STMP3XXX is not set
|
||||
# CONFIG_ARCH_NETX is not set
|
||||
# CONFIG_ARCH_H720X is not set
|
||||
# CONFIG_ARCH_IMX is not set
|
||||
# CONFIG_ARCH_IOP13XX is not set
|
||||
# CONFIG_ARCH_IOP32X is not set
|
||||
# CONFIG_ARCH_IOP33X is not set
|
||||
@ -216,8 +222,8 @@ CONFIG_ARM_THUMB=y
|
||||
# CONFIG_CPU_DCACHE_DISABLE is not set
|
||||
# CONFIG_CPU_DCACHE_WRITETHROUGH is not set
|
||||
# CONFIG_CPU_CACHE_ROUND_ROBIN is not set
|
||||
# CONFIG_OUTER_CACHE is not set
|
||||
CONFIG_ARM_VIC=y
|
||||
CONFIG_ARM_VIC_NR=2
|
||||
CONFIG_COMMON_CLKDEV=y
|
||||
|
||||
#
|
||||
@ -243,7 +249,6 @@ CONFIG_PREEMPT=y
|
||||
CONFIG_HZ=100
|
||||
CONFIG_AEABI=y
|
||||
CONFIG_OABI_COMPAT=y
|
||||
CONFIG_ARCH_FLATMEM_HAS_HOLES=y
|
||||
# CONFIG_ARCH_SPARSEMEM_DEFAULT is not set
|
||||
# CONFIG_ARCH_SELECT_MEMORY_MODEL is not set
|
||||
# CONFIG_HIGHMEM is not set
|
||||
@ -258,17 +263,18 @@ CONFIG_SPLIT_PTLOCK_CPUS=4096
|
||||
# CONFIG_PHYS_ADDR_T_64BIT is not set
|
||||
CONFIG_ZONE_DMA_FLAG=0
|
||||
CONFIG_VIRT_TO_BUS=y
|
||||
CONFIG_UNEVICTABLE_LRU=y
|
||||
CONFIG_HAVE_MLOCK=y
|
||||
CONFIG_HAVE_MLOCKED_PAGE_BIT=y
|
||||
CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
|
||||
CONFIG_ALIGNMENT_TRAP=y
|
||||
# CONFIG_UACCESS_WITH_MEMCPY is not set
|
||||
|
||||
#
|
||||
# Boot options
|
||||
#
|
||||
CONFIG_ZBOOT_ROM_TEXT=0x0
|
||||
CONFIG_ZBOOT_ROM_BSS=0x0
|
||||
CONFIG_CMDLINE="root=/dev/mtdblock2 rw rootfstype=yaffs2 console=ttyAMA0,115200n8 ab3100.force=0,0x48 mtdparts=u300nand:128k@0x0(bootrecords)ro,8064k@128k(free)ro,253952k@8192k(platform) lpj=515072"
|
||||
CONFIG_CMDLINE="root=/dev/ram0 rw rootfstype=rootfs console=ttyAMA0,115200n8 lpj=515072"
|
||||
# CONFIG_XIP_KERNEL is not set
|
||||
# CONFIG_KEXEC is not set
|
||||
|
||||
@ -359,6 +365,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
|
||||
# CONFIG_ECONET is not set
|
||||
# CONFIG_WAN_ROUTER is not set
|
||||
# CONFIG_PHONET is not set
|
||||
# CONFIG_IEEE802154 is not set
|
||||
# CONFIG_NET_SCHED is not set
|
||||
# CONFIG_DCB is not set
|
||||
|
||||
@ -497,6 +504,7 @@ CONFIG_MISC_DEVICES=y
|
||||
# CONFIG_EEPROM_AT24 is not set
|
||||
# CONFIG_EEPROM_AT25 is not set
|
||||
# CONFIG_EEPROM_LEGACY is not set
|
||||
# CONFIG_EEPROM_MAX6875 is not set
|
||||
# CONFIG_EEPROM_93CX6 is not set
|
||||
CONFIG_HAVE_IDE=y
|
||||
# CONFIG_IDE is not set
|
||||
@ -533,12 +541,14 @@ CONFIG_INPUT_EVDEV=y
|
||||
#
|
||||
CONFIG_INPUT_KEYBOARD=y
|
||||
# CONFIG_KEYBOARD_ATKBD is not set
|
||||
# CONFIG_KEYBOARD_SUNKBD is not set
|
||||
# CONFIG_KEYBOARD_LKKBD is not set
|
||||
# CONFIG_KEYBOARD_XTKBD is not set
|
||||
# CONFIG_KEYBOARD_GPIO is not set
|
||||
# CONFIG_KEYBOARD_MATRIX is not set
|
||||
# CONFIG_KEYBOARD_LM8323 is not set
|
||||
# CONFIG_KEYBOARD_NEWTON is not set
|
||||
# CONFIG_KEYBOARD_STOWAWAY is not set
|
||||
# CONFIG_KEYBOARD_GPIO is not set
|
||||
# CONFIG_KEYBOARD_SUNKBD is not set
|
||||
# CONFIG_KEYBOARD_XTKBD is not set
|
||||
# CONFIG_INPUT_MOUSE is not set
|
||||
# CONFIG_INPUT_JOYSTICK is not set
|
||||
# CONFIG_INPUT_TABLET is not set
|
||||
@ -597,9 +607,11 @@ CONFIG_I2C_HELPER_AUTO=y
|
||||
#
|
||||
# I2C system bus drivers (mostly embedded / system-on-chip)
|
||||
#
|
||||
# CONFIG_I2C_DESIGNWARE is not set
|
||||
# CONFIG_I2C_GPIO is not set
|
||||
# CONFIG_I2C_OCORES is not set
|
||||
# CONFIG_I2C_SIMTEC is not set
|
||||
CONFIG_I2C_STU300=y
|
||||
|
||||
#
|
||||
# External I2C/SMBus adapter drivers
|
||||
@ -620,7 +632,6 @@ CONFIG_I2C_HELPER_AUTO=y
|
||||
# CONFIG_SENSORS_PCF8574 is not set
|
||||
# CONFIG_PCF8575 is not set
|
||||
# CONFIG_SENSORS_PCA9539 is not set
|
||||
# CONFIG_SENSORS_MAX6875 is not set
|
||||
# CONFIG_SENSORS_TSL2550 is not set
|
||||
# CONFIG_I2C_DEBUG_CORE is not set
|
||||
# CONFIG_I2C_DEBUG_ALGO is not set
|
||||
@ -635,6 +646,7 @@ CONFIG_SPI_MASTER=y
|
||||
#
|
||||
# CONFIG_SPI_BITBANG is not set
|
||||
# CONFIG_SPI_GPIO is not set
|
||||
CONFIG_SPI_PL022=y
|
||||
|
||||
#
|
||||
# SPI Protocol Masters
|
||||
@ -647,6 +659,7 @@ CONFIG_POWER_SUPPLY=y
|
||||
# CONFIG_PDA_POWER is not set
|
||||
# CONFIG_BATTERY_DS2760 is not set
|
||||
# CONFIG_BATTERY_BQ27x00 is not set
|
||||
# CONFIG_BATTERY_MAX17040 is not set
|
||||
# CONFIG_HWMON is not set
|
||||
# CONFIG_THERMAL is not set
|
||||
# CONFIG_THERMAL_HWMON is not set
|
||||
@ -657,6 +670,7 @@ CONFIG_WATCHDOG=y
|
||||
# Watchdog Device Drivers
|
||||
#
|
||||
# CONFIG_SOFT_WATCHDOG is not set
|
||||
CONFIG_COH901327_WATCHDOG=y
|
||||
CONFIG_SSB_POSSIBLE=y
|
||||
|
||||
#
|
||||
@ -678,22 +692,9 @@ CONFIG_SSB_POSSIBLE=y
|
||||
# CONFIG_MFD_WM8400 is not set
|
||||
# CONFIG_MFD_WM8350_I2C is not set
|
||||
# CONFIG_MFD_PCF50633 is not set
|
||||
|
||||
#
|
||||
# Multimedia devices
|
||||
#
|
||||
|
||||
#
|
||||
# Multimedia core support
|
||||
#
|
||||
# CONFIG_VIDEO_DEV is not set
|
||||
# CONFIG_DVB_CORE is not set
|
||||
# CONFIG_VIDEO_MEDIA is not set
|
||||
|
||||
#
|
||||
# Multimedia drivers
|
||||
#
|
||||
# CONFIG_DAB is not set
|
||||
CONFIG_AB3100_CORE=y
|
||||
# CONFIG_EZX_PCAP is not set
|
||||
# CONFIG_MEDIA_SUPPORT is not set
|
||||
|
||||
#
|
||||
# Graphics support
|
||||
@ -760,6 +761,11 @@ CONFIG_SND_JACK=y
|
||||
# CONFIG_SND_VERBOSE_PROCFS is not set
|
||||
# CONFIG_SND_VERBOSE_PRINTK is not set
|
||||
# CONFIG_SND_DEBUG is not set
|
||||
# CONFIG_SND_RAWMIDI_SEQ is not set
|
||||
# CONFIG_SND_OPL3_LIB_SEQ is not set
|
||||
# CONFIG_SND_OPL4_LIB_SEQ is not set
|
||||
# CONFIG_SND_SBAWE_SEQ is not set
|
||||
# CONFIG_SND_EMU10K1_SEQ is not set
|
||||
# CONFIG_SND_DRIVERS is not set
|
||||
# CONFIG_SND_ARM is not set
|
||||
# CONFIG_SND_SPI is not set
|
||||
@ -770,7 +776,7 @@ CONFIG_SND_SOC_I2C_AND_SPI=y
|
||||
# CONFIG_HID_SUPPORT is not set
|
||||
# CONFIG_USB_SUPPORT is not set
|
||||
CONFIG_MMC=y
|
||||
# CONFIG_MMC_DEBUG is not set
|
||||
CONFIG_MMC_DEBUG=y
|
||||
# CONFIG_MMC_UNSAFE_RESUME is not set
|
||||
|
||||
#
|
||||
@ -797,7 +803,7 @@ CONFIG_LEDS_CLASS=y
|
||||
#
|
||||
# CONFIG_LEDS_PCA9532 is not set
|
||||
# CONFIG_LEDS_GPIO is not set
|
||||
# CONFIG_LEDS_LP5521 is not set
|
||||
# CONFIG_LEDS_LP3944 is not set
|
||||
# CONFIG_LEDS_PCA955X is not set
|
||||
# CONFIG_LEDS_DAC124S085 is not set
|
||||
# CONFIG_LEDS_BD2802 is not set
|
||||
@ -845,6 +851,7 @@ CONFIG_RTC_INTF_DEV=y
|
||||
# CONFIG_RTC_DRV_S35390A is not set
|
||||
# CONFIG_RTC_DRV_FM3130 is not set
|
||||
# CONFIG_RTC_DRV_RX8581 is not set
|
||||
# CONFIG_RTC_DRV_RX8025 is not set
|
||||
|
||||
#
|
||||
# SPI RTC drivers
|
||||
@ -887,7 +894,10 @@ CONFIG_REGULATOR=y
|
||||
# CONFIG_REGULATOR_DEBUG is not set
|
||||
# CONFIG_REGULATOR_FIXED_VOLTAGE is not set
|
||||
# CONFIG_REGULATOR_VIRTUAL_CONSUMER is not set
|
||||
# CONFIG_REGULATOR_USERSPACE_CONSUMER is not set
|
||||
# CONFIG_REGULATOR_BQ24022 is not set
|
||||
# CONFIG_REGULATOR_MAX1586 is not set
|
||||
# CONFIG_REGULATOR_LP3971 is not set
|
||||
# CONFIG_UIO is not set
|
||||
# CONFIG_STAGING is not set
|
||||
|
||||
@ -900,16 +910,19 @@ CONFIG_REGULATOR=y
|
||||
# CONFIG_REISERFS_FS is not set
|
||||
# CONFIG_JFS_FS is not set
|
||||
# CONFIG_FS_POSIX_ACL is not set
|
||||
CONFIG_FILE_LOCKING=y
|
||||
# CONFIG_XFS_FS is not set
|
||||
# CONFIG_OCFS2_FS is not set
|
||||
# CONFIG_BTRFS_FS is not set
|
||||
CONFIG_FILE_LOCKING=y
|
||||
CONFIG_FSNOTIFY=y
|
||||
# CONFIG_DNOTIFY is not set
|
||||
# CONFIG_INOTIFY is not set
|
||||
CONFIG_INOTIFY_USER=y
|
||||
# CONFIG_QUOTA is not set
|
||||
# CONFIG_AUTOFS_FS is not set
|
||||
# CONFIG_AUTOFS4_FS is not set
|
||||
CONFIG_FUSE_FS=y
|
||||
# CONFIG_CUSE is not set
|
||||
|
||||
#
|
||||
# Caches
|
||||
@ -1033,6 +1046,7 @@ CONFIG_TIMER_STATS=y
|
||||
# CONFIG_DEBUG_OBJECTS is not set
|
||||
# CONFIG_SLUB_DEBUG_ON is not set
|
||||
# CONFIG_SLUB_STATS is not set
|
||||
# CONFIG_DEBUG_KMEMLEAK is not set
|
||||
# CONFIG_DEBUG_PREEMPT is not set
|
||||
# CONFIG_DEBUG_RT_MUTEXES is not set
|
||||
# CONFIG_RT_MUTEX_TESTER is not set
|
||||
@ -1063,18 +1077,16 @@ CONFIG_DEBUG_INFO=y
|
||||
# CONFIG_PAGE_POISONING is not set
|
||||
CONFIG_HAVE_FUNCTION_TRACER=y
|
||||
CONFIG_TRACING_SUPPORT=y
|
||||
|
||||
#
|
||||
# Tracers
|
||||
#
|
||||
CONFIG_FTRACE=y
|
||||
# CONFIG_FUNCTION_TRACER is not set
|
||||
# CONFIG_IRQSOFF_TRACER is not set
|
||||
# CONFIG_PREEMPT_TRACER is not set
|
||||
# CONFIG_SCHED_TRACER is not set
|
||||
# CONFIG_CONTEXT_SWITCH_TRACER is not set
|
||||
# CONFIG_EVENT_TRACER is not set
|
||||
# CONFIG_ENABLE_DEFAULT_TRACERS is not set
|
||||
# CONFIG_BOOT_TRACER is not set
|
||||
# CONFIG_TRACE_BRANCH_PROFILING is not set
|
||||
CONFIG_BRANCH_PROFILE_NONE=y
|
||||
# CONFIG_PROFILE_ANNOTATED_BRANCHES is not set
|
||||
# CONFIG_PROFILE_ALL_BRANCHES is not set
|
||||
# CONFIG_STACK_TRACER is not set
|
||||
# CONFIG_KMEMTRACE is not set
|
||||
# CONFIG_WORKQUEUE_TRACER is not set
|
||||
|
@ -285,15 +285,6 @@ extern struct page *empty_zero_page;
|
||||
#define pte_young(pte) (pte_val(pte) & L_PTE_YOUNG)
|
||||
#define pte_special(pte) (0)
|
||||
|
||||
/*
|
||||
* The following only works if pte_present() is not true.
|
||||
*/
|
||||
#define pte_file(pte) (pte_val(pte) & L_PTE_FILE)
|
||||
#define pte_to_pgoff(x) (pte_val(x) >> 2)
|
||||
#define pgoff_to_pte(x) __pte(((x) << 2) | L_PTE_FILE)
|
||||
|
||||
#define PTE_FILE_MAX_BITS 30
|
||||
|
||||
#define PTE_BIT_FUNC(fn,op) \
|
||||
static inline pte_t pte_##fn(pte_t pte) { pte_val(pte) op; return pte; }
|
||||
|
||||
@ -384,16 +375,50 @@ static inline pte_t pte_modify(pte_t pte, pgprot_t newprot)
|
||||
|
||||
extern pgd_t swapper_pg_dir[PTRS_PER_PGD];
|
||||
|
||||
/* Encode and decode a swap entry.
|
||||
/*
|
||||
* Encode and decode a swap entry. Swap entries are stored in the Linux
|
||||
* page tables as follows:
|
||||
*
|
||||
* We support up to 32GB of swap on 4k machines
|
||||
* 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1
|
||||
* 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
|
||||
* <--------------- offset --------------------> <--- type --> 0 0
|
||||
*
|
||||
* This gives us up to 127 swap files and 32GB per swap file. Note that
|
||||
* the offset field is always non-zero.
|
||||
*/
|
||||
#define __swp_type(x) (((x).val >> 2) & 0x7f)
|
||||
#define __swp_offset(x) ((x).val >> 9)
|
||||
#define __swp_entry(type,offset) ((swp_entry_t) { ((type) << 2) | ((offset) << 9) })
|
||||
#define __SWP_TYPE_SHIFT 2
|
||||
#define __SWP_TYPE_BITS 7
|
||||
#define __SWP_TYPE_MASK ((1 << __SWP_TYPE_BITS) - 1)
|
||||
#define __SWP_OFFSET_SHIFT (__SWP_TYPE_BITS + __SWP_TYPE_SHIFT)
|
||||
|
||||
#define __swp_type(x) (((x).val >> __SWP_TYPE_SHIFT) & __SWP_TYPE_MASK)
|
||||
#define __swp_offset(x) ((x).val >> __SWP_OFFSET_SHIFT)
|
||||
#define __swp_entry(type,offset) ((swp_entry_t) { ((type) << __SWP_TYPE_SHIFT) | ((offset) << __SWP_OFFSET_SHIFT) })
|
||||
|
||||
#define __pte_to_swp_entry(pte) ((swp_entry_t) { pte_val(pte) })
|
||||
#define __swp_entry_to_pte(swp) ((pte_t) { (swp).val })
|
||||
|
||||
/*
|
||||
* It is an error for the kernel to have more swap files than we can
|
||||
* encode in the PTEs. This ensures that we know when MAX_SWAPFILES
|
||||
* is increased beyond what we presently support.
|
||||
*/
|
||||
#define MAX_SWAPFILES_CHECK() BUILD_BUG_ON(MAX_SWAPFILES_SHIFT > __SWP_TYPE_BITS)
|
||||
|
||||
/*
|
||||
* Encode and decode a file entry. File entries are stored in the Linux
|
||||
* page tables as follows:
|
||||
*
|
||||
* 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1
|
||||
* 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
|
||||
* <------------------------ offset -------------------------> 1 0
|
||||
*/
|
||||
#define pte_file(pte) (pte_val(pte) & L_PTE_FILE)
|
||||
#define pte_to_pgoff(x) (pte_val(x) >> 2)
|
||||
#define pgoff_to_pte(x) __pte(((x) << 2) | L_PTE_FILE)
|
||||
|
||||
#define PTE_FILE_MAX_BITS 30
|
||||
|
||||
/* Needs to be defined here and not in linux/mm.h, as it is arch dependent */
|
||||
/* FIXME: this is not correct */
|
||||
#define kern_addr_valid(addr) (1)
|
||||
|
@ -73,7 +73,7 @@ struct thread_info {
|
||||
.task = &tsk, \
|
||||
.exec_domain = &default_exec_domain, \
|
||||
.flags = 0, \
|
||||
.preempt_count = 1, \
|
||||
.preempt_count = INIT_PREEMPT_COUNT, \
|
||||
.addr_limit = KERNEL_DS, \
|
||||
.cpu_domain = domain_val(DOMAIN_USER, DOMAIN_MANAGER) | \
|
||||
domain_val(DOMAIN_KERNEL, DOMAIN_MANAGER) | \
|
||||
|
@ -102,8 +102,8 @@ tlb_end_vma(struct mmu_gather *tlb, struct vm_area_struct *vma)
|
||||
}
|
||||
|
||||
#define tlb_remove_page(tlb,page) free_page_and_swap_cache(page)
|
||||
#define pte_free_tlb(tlb, ptep) pte_free((tlb)->mm, ptep)
|
||||
#define pmd_free_tlb(tlb, pmdp) pmd_free((tlb)->mm, pmdp)
|
||||
#define pte_free_tlb(tlb, ptep, addr) pte_free((tlb)->mm, ptep)
|
||||
#define pmd_free_tlb(tlb, pmdp, addr) pmd_free((tlb)->mm, pmdp)
|
||||
|
||||
#define tlb_migrate_finish(mm) do { } while (0)
|
||||
|
||||
|
102
arch/arm/mach-at91/include/mach/at_hdmac.h
Normal file
102
arch/arm/mach-at91/include/mach/at_hdmac.h
Normal file
@ -0,0 +1,102 @@
|
||||
/*
|
||||
* Header file for the Atmel AHB DMA Controller driver
|
||||
*
|
||||
* Copyright (C) 2008 Atmel 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.
|
||||
*/
|
||||
#ifndef AT_HDMAC_H
|
||||
#define AT_HDMAC_H
|
||||
|
||||
#include <linux/dmaengine.h>
|
||||
|
||||
/**
|
||||
* struct at_dma_platform_data - Controller configuration parameters
|
||||
* @nr_channels: Number of channels supported by hardware (max 8)
|
||||
* @cap_mask: dma_capability flags supported by the platform
|
||||
*/
|
||||
struct at_dma_platform_data {
|
||||
unsigned int nr_channels;
|
||||
dma_cap_mask_t cap_mask;
|
||||
};
|
||||
|
||||
/**
|
||||
* enum at_dma_slave_width - DMA slave register access width.
|
||||
* @AT_DMA_SLAVE_WIDTH_8BIT: Do 8-bit slave register accesses
|
||||
* @AT_DMA_SLAVE_WIDTH_16BIT: Do 16-bit slave register accesses
|
||||
* @AT_DMA_SLAVE_WIDTH_32BIT: Do 32-bit slave register accesses
|
||||
*/
|
||||
enum at_dma_slave_width {
|
||||
AT_DMA_SLAVE_WIDTH_8BIT = 0,
|
||||
AT_DMA_SLAVE_WIDTH_16BIT,
|
||||
AT_DMA_SLAVE_WIDTH_32BIT,
|
||||
};
|
||||
|
||||
/**
|
||||
* struct at_dma_slave - Controller-specific information about a slave
|
||||
* @dma_dev: required DMA master device
|
||||
* @tx_reg: physical address of data register used for
|
||||
* memory-to-peripheral transfers
|
||||
* @rx_reg: physical address of data register used for
|
||||
* peripheral-to-memory transfers
|
||||
* @reg_width: peripheral register width
|
||||
* @cfg: Platform-specific initializer for the CFG register
|
||||
* @ctrla: Platform-specific initializer for the CTRLA register
|
||||
*/
|
||||
struct at_dma_slave {
|
||||
struct device *dma_dev;
|
||||
dma_addr_t tx_reg;
|
||||
dma_addr_t rx_reg;
|
||||
enum at_dma_slave_width reg_width;
|
||||
u32 cfg;
|
||||
u32 ctrla;
|
||||
};
|
||||
|
||||
|
||||
/* Platform-configurable bits in CFG */
|
||||
#define ATC_SRC_PER(h) (0xFU & (h)) /* Channel src rq associated with periph handshaking ifc h */
|
||||
#define ATC_DST_PER(h) ((0xFU & (h)) << 4) /* Channel dst rq associated with periph handshaking ifc h */
|
||||
#define ATC_SRC_REP (0x1 << 8) /* Source Replay Mod */
|
||||
#define ATC_SRC_H2SEL (0x1 << 9) /* Source Handshaking Mod */
|
||||
#define ATC_SRC_H2SEL_SW (0x0 << 9)
|
||||
#define ATC_SRC_H2SEL_HW (0x1 << 9)
|
||||
#define ATC_DST_REP (0x1 << 12) /* Destination Replay Mod */
|
||||
#define ATC_DST_H2SEL (0x1 << 13) /* Destination Handshaking Mod */
|
||||
#define ATC_DST_H2SEL_SW (0x0 << 13)
|
||||
#define ATC_DST_H2SEL_HW (0x1 << 13)
|
||||
#define ATC_SOD (0x1 << 16) /* Stop On Done */
|
||||
#define ATC_LOCK_IF (0x1 << 20) /* Interface Lock */
|
||||
#define ATC_LOCK_B (0x1 << 21) /* AHB Bus Lock */
|
||||
#define ATC_LOCK_IF_L (0x1 << 22) /* Master Interface Arbiter Lock */
|
||||
#define ATC_LOCK_IF_L_CHUNK (0x0 << 22)
|
||||
#define ATC_LOCK_IF_L_BUFFER (0x1 << 22)
|
||||
#define ATC_AHB_PROT_MASK (0x7 << 24) /* AHB Protection */
|
||||
#define ATC_FIFOCFG_MASK (0x3 << 28) /* FIFO Request Configuration */
|
||||
#define ATC_FIFOCFG_LARGESTBURST (0x0 << 28)
|
||||
#define ATC_FIFOCFG_HALFFIFO (0x1 << 28)
|
||||
#define ATC_FIFOCFG_ENOUGHSPACE (0x2 << 28)
|
||||
|
||||
/* Platform-configurable bits in CTRLA */
|
||||
#define ATC_SCSIZE_MASK (0x7 << 16) /* Source Chunk Transfer Size */
|
||||
#define ATC_SCSIZE_1 (0x0 << 16)
|
||||
#define ATC_SCSIZE_4 (0x1 << 16)
|
||||
#define ATC_SCSIZE_8 (0x2 << 16)
|
||||
#define ATC_SCSIZE_16 (0x3 << 16)
|
||||
#define ATC_SCSIZE_32 (0x4 << 16)
|
||||
#define ATC_SCSIZE_64 (0x5 << 16)
|
||||
#define ATC_SCSIZE_128 (0x6 << 16)
|
||||
#define ATC_SCSIZE_256 (0x7 << 16)
|
||||
#define ATC_DCSIZE_MASK (0x7 << 20) /* Destination Chunk Transfer Size */
|
||||
#define ATC_DCSIZE_1 (0x0 << 20)
|
||||
#define ATC_DCSIZE_4 (0x1 << 20)
|
||||
#define ATC_DCSIZE_8 (0x2 << 20)
|
||||
#define ATC_DCSIZE_16 (0x3 << 20)
|
||||
#define ATC_DCSIZE_32 (0x4 << 20)
|
||||
#define ATC_DCSIZE_64 (0x5 << 20)
|
||||
#define ATC_DCSIZE_128 (0x6 << 20)
|
||||
#define ATC_DCSIZE_256 (0x7 << 20)
|
||||
|
||||
#endif /* AT_HDMAC_H */
|
@ -33,6 +33,7 @@
|
||||
#include <linux/err.h>
|
||||
#include <linux/interrupt.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/io.h>
|
||||
|
||||
#include <mach/dma.h>
|
||||
#include <mach/hardware.h>
|
||||
|
@ -289,7 +289,7 @@
|
||||
|
||||
#define MPP48_GPIO MPP( 48, 0x0, 1, 1, 0, 0, 0, 1 )
|
||||
#define MPP48_TSMP12 MPP( 48, 0x1, 1, 1, 0, 0, 0, 1 )
|
||||
#define MPP48_TDM_DTX MPP( 48. 0x2, 0, 1, 0, 0, 0, 1 )
|
||||
#define MPP48_TDM_DTX MPP( 48, 0x2, 0, 1, 0, 0, 0, 1 )
|
||||
|
||||
#define MPP49_GPIO MPP( 49, 0x0, 1, 1, 0, 0, 0, 1 )
|
||||
#define MPP49_TSMP9 MPP( 49, 0x1, 1, 1, 0, 0, 0, 1 )
|
||||
|
@ -36,6 +36,14 @@ config MACH_PCM037
|
||||
Include support for Phytec pcm037 platform. This includes
|
||||
specific configurations for the board and its peripherals.
|
||||
|
||||
config MACH_PCM037_EET
|
||||
bool "Support pcm037 EET board extensions"
|
||||
depends on MACH_PCM037
|
||||
help
|
||||
Add support for PCM037 EET baseboard extensions. If you are using the
|
||||
OLED display with EET, use "video=mx3fb:CMEL-OLED" kernel
|
||||
command-line parameter.
|
||||
|
||||
config MACH_MX31LITE
|
||||
bool "Support MX31 LITEKIT (LogicPD)"
|
||||
select ARCH_MX31
|
||||
|
@ -11,6 +11,7 @@ obj-$(CONFIG_MACH_MX31ADS) += mx31ads.o
|
||||
obj-$(CONFIG_MACH_MX31LILLY) += mx31lilly.o mx31lilly-db.o
|
||||
obj-$(CONFIG_MACH_MX31LITE) += mx31lite.o
|
||||
obj-$(CONFIG_MACH_PCM037) += pcm037.o
|
||||
obj-$(CONFIG_MACH_PCM037_EET) += pcm037_eet.o
|
||||
obj-$(CONFIG_MACH_MX31_3DS) += mx31pdk.o
|
||||
obj-$(CONFIG_MACH_MX31MOBOARD) += mx31moboard.o mx31moboard-devboard.o \
|
||||
mx31moboard-marxbot.o
|
||||
|
@ -31,6 +31,8 @@
|
||||
#include <linux/smsc911x.h>
|
||||
#include <linux/interrupt.h>
|
||||
#include <linux/irq.h>
|
||||
#include <linux/mtd/physmap.h>
|
||||
#include <linux/io.h>
|
||||
|
||||
#include <mach/hardware.h>
|
||||
#include <asm/mach-types.h>
|
||||
@ -46,8 +48,10 @@
|
||||
#include <mach/mmc.h>
|
||||
#include <mach/ipu.h>
|
||||
#include <mach/mx3fb.h>
|
||||
#include <mach/mxc_nand.h>
|
||||
|
||||
#include "devices.h"
|
||||
#include "crm_regs.h"
|
||||
|
||||
static int armadillo5x0_pins[] = {
|
||||
/* UART1 */
|
||||
@ -93,7 +97,56 @@ static int armadillo5x0_pins[] = {
|
||||
MX31_PIN_FPSHIFT__FPSHIFT,
|
||||
MX31_PIN_DRDY0__DRDY0,
|
||||
IOMUX_MODE(MX31_PIN_LCS1, IOMUX_CONFIG_GPIO), /*ADV7125_PSAVE*/
|
||||
};
|
||||
|
||||
/*
|
||||
* NAND Flash
|
||||
*/
|
||||
static struct mxc_nand_platform_data armadillo5x0_nand_flash_pdata = {
|
||||
.width = 1,
|
||||
.hw_ecc = 1,
|
||||
};
|
||||
|
||||
/*
|
||||
* MTD NOR Flash
|
||||
*/
|
||||
static struct mtd_partition armadillo5x0_nor_flash_partitions[] = {
|
||||
{
|
||||
.name = "nor.bootloader",
|
||||
.offset = 0x00000000,
|
||||
.size = 4*32*1024,
|
||||
}, {
|
||||
.name = "nor.kernel",
|
||||
.offset = MTDPART_OFS_APPEND,
|
||||
.size = 16*128*1024,
|
||||
}, {
|
||||
.name = "nor.userland",
|
||||
.offset = MTDPART_OFS_APPEND,
|
||||
.size = 110*128*1024,
|
||||
}, {
|
||||
.name = "nor.config",
|
||||
.offset = MTDPART_OFS_APPEND,
|
||||
.size = 1*128*1024,
|
||||
},
|
||||
};
|
||||
|
||||
static struct physmap_flash_data armadillo5x0_nor_flash_pdata = {
|
||||
.width = 2,
|
||||
.parts = armadillo5x0_nor_flash_partitions,
|
||||
.nr_parts = ARRAY_SIZE(armadillo5x0_nor_flash_partitions),
|
||||
};
|
||||
|
||||
static struct resource armadillo5x0_nor_flash_resource = {
|
||||
.flags = IORESOURCE_MEM,
|
||||
.start = CS0_BASE_ADDR,
|
||||
.end = CS0_BASE_ADDR + SZ_64M - 1,
|
||||
};
|
||||
|
||||
static struct platform_device armadillo5x0_nor_flash = {
|
||||
.name = "physmap-flash",
|
||||
.id = -1,
|
||||
.num_resources = 1,
|
||||
.resource = &armadillo5x0_nor_flash_resource,
|
||||
};
|
||||
|
||||
/*
|
||||
@ -272,6 +325,16 @@ static void __init armadillo5x0_init(void)
|
||||
/* Register FB */
|
||||
mxc_register_device(&mx3_ipu, &mx3_ipu_data);
|
||||
mxc_register_device(&mx3_fb, &mx3fb_pdata);
|
||||
|
||||
/* Register NOR Flash */
|
||||
mxc_register_device(&armadillo5x0_nor_flash,
|
||||
&armadillo5x0_nor_flash_pdata);
|
||||
|
||||
/* Register NAND Flash */
|
||||
mxc_register_device(&mxc_nand_device, &armadillo5x0_nand_flash_pdata);
|
||||
|
||||
/* set NAND page size to 2k if not configured via boot mode pins */
|
||||
__raw_writel(__raw_readl(MXC_CCM_RCSR) | (1 << 30), MXC_CCM_RCSR);
|
||||
}
|
||||
|
||||
static void __init armadillo5x0_timer_init(void)
|
||||
|
@ -22,7 +22,6 @@
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/serial.h>
|
||||
#include <linux/gpio.h>
|
||||
#include <linux/dma-mapping.h>
|
||||
#include <mach/hardware.h>
|
||||
#include <mach/irqs.h>
|
||||
#include <mach/common.h>
|
||||
|
@ -18,7 +18,7 @@
|
||||
|
||||
#include <linux/types.h>
|
||||
#include <linux/init.h>
|
||||
|
||||
#include <linux/dma-mapping.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/mtd/physmap.h>
|
||||
#include <linux/mtd/plat-ram.h>
|
||||
@ -33,29 +33,67 @@
|
||||
#include <linux/irq.h>
|
||||
#include <linux/fsl_devices.h>
|
||||
|
||||
#include <mach/hardware.h>
|
||||
#include <media/soc_camera.h>
|
||||
|
||||
#include <asm/mach-types.h>
|
||||
#include <asm/mach/arch.h>
|
||||
#include <asm/mach/time.h>
|
||||
#include <asm/mach/map.h>
|
||||
#include <mach/board-pcm037.h>
|
||||
#include <mach/common.h>
|
||||
#include <mach/hardware.h>
|
||||
#include <mach/i2c.h>
|
||||
#include <mach/imx-uart.h>
|
||||
#include <mach/iomux-mx3.h>
|
||||
#include <mach/ipu.h>
|
||||
#include <mach/board-pcm037.h>
|
||||
#include <mach/mmc.h>
|
||||
#include <mach/mx3_camera.h>
|
||||
#include <mach/mx3fb.h>
|
||||
#include <mach/mxc_nand.h>
|
||||
#include <mach/mmc.h>
|
||||
#ifdef CONFIG_I2C_IMX
|
||||
#include <mach/i2c.h>
|
||||
#endif
|
||||
|
||||
#include "devices.h"
|
||||
#include "pcm037.h"
|
||||
|
||||
static enum pcm037_board_variant pcm037_instance = PCM037_PCM970;
|
||||
|
||||
static int __init pcm037_variant_setup(char *str)
|
||||
{
|
||||
if (!strcmp("eet", str))
|
||||
pcm037_instance = PCM037_EET;
|
||||
else if (strcmp("pcm970", str))
|
||||
pr_warning("Unknown pcm037 baseboard variant %s\n", str);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* Supported values: "pcm970" (default) and "eet" */
|
||||
__setup("pcm037_variant=", pcm037_variant_setup);
|
||||
|
||||
enum pcm037_board_variant pcm037_variant(void)
|
||||
{
|
||||
return pcm037_instance;
|
||||
}
|
||||
|
||||
/* UART1 with RTS/CTS handshake signals */
|
||||
static unsigned int pcm037_uart1_handshake_pins[] = {
|
||||
MX31_PIN_CTS1__CTS1,
|
||||
MX31_PIN_RTS1__RTS1,
|
||||
MX31_PIN_TXD1__TXD1,
|
||||
MX31_PIN_RXD1__RXD1,
|
||||
};
|
||||
|
||||
/* UART1 without RTS/CTS handshake signals */
|
||||
static unsigned int pcm037_uart1_pins[] = {
|
||||
MX31_PIN_TXD1__TXD1,
|
||||
MX31_PIN_RXD1__RXD1,
|
||||
};
|
||||
|
||||
static unsigned int pcm037_pins[] = {
|
||||
/* I2C */
|
||||
MX31_PIN_CSPI2_MOSI__SCL,
|
||||
MX31_PIN_CSPI2_MISO__SDA,
|
||||
MX31_PIN_CSPI2_SS2__I2C3_SDA,
|
||||
MX31_PIN_CSPI2_SCLK__I2C3_SCL,
|
||||
/* SDHC1 */
|
||||
MX31_PIN_SD1_DATA3__SD1_DATA3,
|
||||
MX31_PIN_SD1_DATA2__SD1_DATA2,
|
||||
@ -73,11 +111,6 @@ static unsigned int pcm037_pins[] = {
|
||||
MX31_PIN_CSPI1_SS0__SS0,
|
||||
MX31_PIN_CSPI1_SS1__SS1,
|
||||
MX31_PIN_CSPI1_SS2__SS2,
|
||||
/* UART1 */
|
||||
MX31_PIN_CTS1__CTS1,
|
||||
MX31_PIN_RTS1__RTS1,
|
||||
MX31_PIN_TXD1__TXD1,
|
||||
MX31_PIN_RXD1__RXD1,
|
||||
/* UART2 */
|
||||
MX31_PIN_TXD2__TXD2,
|
||||
MX31_PIN_RXD2__RXD2,
|
||||
@ -120,6 +153,22 @@ static unsigned int pcm037_pins[] = {
|
||||
MX31_PIN_D3_SPL__D3_SPL,
|
||||
MX31_PIN_D3_CLS__D3_CLS,
|
||||
MX31_PIN_LCS0__GPI03_23,
|
||||
/* CSI */
|
||||
IOMUX_MODE(MX31_PIN_CSI_D5, IOMUX_CONFIG_GPIO),
|
||||
MX31_PIN_CSI_D6__CSI_D6,
|
||||
MX31_PIN_CSI_D7__CSI_D7,
|
||||
MX31_PIN_CSI_D8__CSI_D8,
|
||||
MX31_PIN_CSI_D9__CSI_D9,
|
||||
MX31_PIN_CSI_D10__CSI_D10,
|
||||
MX31_PIN_CSI_D11__CSI_D11,
|
||||
MX31_PIN_CSI_D12__CSI_D12,
|
||||
MX31_PIN_CSI_D13__CSI_D13,
|
||||
MX31_PIN_CSI_D14__CSI_D14,
|
||||
MX31_PIN_CSI_D15__CSI_D15,
|
||||
MX31_PIN_CSI_HSYNC__CSI_HSYNC,
|
||||
MX31_PIN_CSI_MCLK__CSI_MCLK,
|
||||
MX31_PIN_CSI_PIXCLK__CSI_PIXCLK,
|
||||
MX31_PIN_CSI_VSYNC__CSI_VSYNC,
|
||||
};
|
||||
|
||||
static struct physmap_flash_data pcm037_flash_data = {
|
||||
@ -250,19 +299,43 @@ static struct mxc_nand_platform_data pcm037_nand_board_info = {
|
||||
.hw_ecc = 1,
|
||||
};
|
||||
|
||||
#ifdef CONFIG_I2C_IMX
|
||||
static struct imxi2c_platform_data pcm037_i2c_1_data = {
|
||||
.bitrate = 100000,
|
||||
};
|
||||
|
||||
static struct imxi2c_platform_data pcm037_i2c_2_data = {
|
||||
.bitrate = 20000,
|
||||
};
|
||||
|
||||
static struct at24_platform_data board_eeprom = {
|
||||
.byte_len = 4096,
|
||||
.page_size = 32,
|
||||
.flags = AT24_FLAG_ADDR16,
|
||||
};
|
||||
|
||||
static int pcm037_camera_power(struct device *dev, int on)
|
||||
{
|
||||
/* disable or enable the camera in X7 or X8 PCM970 connector */
|
||||
gpio_set_value(IOMUX_TO_GPIO(MX31_PIN_CSI_D5), !on);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct i2c_board_info pcm037_i2c_2_devices[] = {
|
||||
{
|
||||
I2C_BOARD_INFO("mt9t031", 0x5d),
|
||||
},
|
||||
};
|
||||
|
||||
static struct soc_camera_link iclink = {
|
||||
.bus_id = 0, /* Must match with the camera ID */
|
||||
.power = pcm037_camera_power,
|
||||
.board_info = &pcm037_i2c_2_devices[0],
|
||||
.i2c_adapter_id = 2,
|
||||
.module_name = "mt9t031",
|
||||
};
|
||||
|
||||
static struct i2c_board_info pcm037_i2c_devices[] = {
|
||||
{
|
||||
{
|
||||
I2C_BOARD_INFO("at24", 0x52), /* E0=0, E1=1, E2=0 */
|
||||
.platform_data = &board_eeprom,
|
||||
}, {
|
||||
@ -270,7 +343,14 @@ static struct i2c_board_info pcm037_i2c_devices[] = {
|
||||
.type = "pcf8563",
|
||||
}
|
||||
};
|
||||
#endif
|
||||
|
||||
static struct platform_device pcm037_camera = {
|
||||
.name = "soc-camera-pdrv",
|
||||
.id = 0,
|
||||
.dev = {
|
||||
.platform_data = &iclink,
|
||||
},
|
||||
};
|
||||
|
||||
/* Not connected by default */
|
||||
#ifdef PCM970_SDHC_RW_SWITCH
|
||||
@ -334,9 +414,41 @@ static struct imxmmc_platform_data sdhc_pdata = {
|
||||
.exit = pcm970_sdhc1_exit,
|
||||
};
|
||||
|
||||
struct mx3_camera_pdata camera_pdata = {
|
||||
.dma_dev = &mx3_ipu.dev,
|
||||
.flags = MX3_CAMERA_DATAWIDTH_8 | MX3_CAMERA_DATAWIDTH_10,
|
||||
.mclk_10khz = 2000,
|
||||
};
|
||||
|
||||
static int __init pcm037_camera_alloc_dma(const size_t buf_size)
|
||||
{
|
||||
dma_addr_t dma_handle;
|
||||
void *buf;
|
||||
int dma;
|
||||
|
||||
if (buf_size < 2 * 1024 * 1024)
|
||||
return -EINVAL;
|
||||
|
||||
buf = dma_alloc_coherent(NULL, buf_size, &dma_handle, GFP_KERNEL);
|
||||
if (!buf) {
|
||||
pr_err("%s: cannot allocate camera buffer-memory\n", __func__);
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
memset(buf, 0, buf_size);
|
||||
|
||||
dma = dma_declare_coherent_memory(&mx3_camera.dev,
|
||||
dma_handle, dma_handle, buf_size,
|
||||
DMA_MEMORY_MAP | DMA_MEMORY_EXCLUSIVE);
|
||||
|
||||
/* The way we call dma_declare_coherent_memory only a malloc can fail */
|
||||
return dma & DMA_MEMORY_MAP ? 0 : -ENOMEM;
|
||||
}
|
||||
|
||||
static struct platform_device *devices[] __initdata = {
|
||||
&pcm037_flash,
|
||||
&pcm037_sram_device,
|
||||
&pcm037_camera,
|
||||
};
|
||||
|
||||
static struct ipu_platform_data mx3_ipu_data = {
|
||||
@ -377,6 +489,22 @@ static const struct fb_videomode fb_modedb[] = {
|
||||
.sync = FB_SYNC_VERT_HIGH_ACT | FB_SYNC_OE_ACT_HIGH,
|
||||
.vmode = FB_VMODE_NONINTERLACED,
|
||||
.flag = 0,
|
||||
}, {
|
||||
/* 240x320 @ 60 Hz */
|
||||
.name = "CMEL-OLED",
|
||||
.refresh = 60,
|
||||
.xres = 240,
|
||||
.yres = 320,
|
||||
.pixclock = 185925,
|
||||
.left_margin = 9,
|
||||
.right_margin = 16,
|
||||
.upper_margin = 7,
|
||||
.lower_margin = 9,
|
||||
.hsync_len = 1,
|
||||
.vsync_len = 1,
|
||||
.sync = FB_SYNC_OE_ACT_HIGH | FB_SYNC_CLK_INVERT,
|
||||
.vmode = FB_VMODE_NONINTERLACED,
|
||||
.flag = 0,
|
||||
},
|
||||
};
|
||||
|
||||
@ -397,6 +525,14 @@ static void __init mxc_board_init(void)
|
||||
mxc_iomux_setup_multiple_pins(pcm037_pins, ARRAY_SIZE(pcm037_pins),
|
||||
"pcm037");
|
||||
|
||||
if (pcm037_variant() == PCM037_EET)
|
||||
mxc_iomux_setup_multiple_pins(pcm037_uart1_pins,
|
||||
ARRAY_SIZE(pcm037_uart1_pins), "pcm037_uart1");
|
||||
else
|
||||
mxc_iomux_setup_multiple_pins(pcm037_uart1_handshake_pins,
|
||||
ARRAY_SIZE(pcm037_uart1_handshake_pins),
|
||||
"pcm037_uart1");
|
||||
|
||||
platform_add_devices(devices, ARRAY_SIZE(devices));
|
||||
|
||||
mxc_register_device(&mxc_uart_device0, &uart_pdata);
|
||||
@ -415,18 +551,30 @@ static void __init mxc_board_init(void)
|
||||
}
|
||||
|
||||
|
||||
#ifdef CONFIG_I2C_IMX
|
||||
/* I2C adapters and devices */
|
||||
i2c_register_board_info(1, pcm037_i2c_devices,
|
||||
ARRAY_SIZE(pcm037_i2c_devices));
|
||||
|
||||
mxc_register_device(&mxc_i2c_device1, &pcm037_i2c_1_data);
|
||||
#endif
|
||||
mxc_register_device(&mxc_i2c_device2, &pcm037_i2c_2_data);
|
||||
|
||||
mxc_register_device(&mxc_nand_device, &pcm037_nand_board_info);
|
||||
mxc_register_device(&mxcsdhc_device0, &sdhc_pdata);
|
||||
mxc_register_device(&mx3_ipu, &mx3_ipu_data);
|
||||
mxc_register_device(&mx3_fb, &mx3fb_pdata);
|
||||
if (!gpio_usbotg_hs_activate())
|
||||
mxc_register_device(&mxc_otg_udc_device, &usb_pdata);
|
||||
|
||||
/* CSI */
|
||||
/* Camera power: default - off */
|
||||
ret = gpio_request(IOMUX_TO_GPIO(MX31_PIN_CSI_D5), "mt9t031-power");
|
||||
if (!ret)
|
||||
gpio_direction_output(IOMUX_TO_GPIO(MX31_PIN_CSI_D5), 1);
|
||||
else
|
||||
iclink.power = NULL;
|
||||
|
||||
if (!pcm037_camera_alloc_dma(4 * 1024 * 1024))
|
||||
mxc_register_device(&mx3_camera, &camera_pdata);
|
||||
}
|
||||
|
||||
static void __init pcm037_timer_init(void)
|
||||
@ -448,4 +596,3 @@ MACHINE_START(PCM037, "Phytec Phycore pcm037")
|
||||
.init_machine = mxc_board_init,
|
||||
.timer = &pcm037_timer,
|
||||
MACHINE_END
|
||||
|
||||
|
11
arch/arm/mach-mx3/pcm037.h
Normal file
11
arch/arm/mach-mx3/pcm037.h
Normal file
@ -0,0 +1,11 @@
|
||||
#ifndef __PCM037_H__
|
||||
#define __PCM037_H__
|
||||
|
||||
enum pcm037_board_variant {
|
||||
PCM037_PCM970,
|
||||
PCM037_EET,
|
||||
};
|
||||
|
||||
extern enum pcm037_board_variant pcm037_variant(void);
|
||||
|
||||
#endif
|
204
arch/arm/mach-mx3/pcm037_eet.c
Normal file
204
arch/arm/mach-mx3/pcm037_eet.c
Normal file
@ -0,0 +1,204 @@
|
||||
/*
|
||||
* Copyright (C) 2009
|
||||
* Guennadi Liakhovetski, DENX Software Engineering, <lg@denx.de>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*/
|
||||
#include <linux/gpio.h>
|
||||
#include <linux/gpio_keys.h>
|
||||
#include <linux/input.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/spi/spi.h>
|
||||
|
||||
#include <mach/common.h>
|
||||
#if defined(CONFIG_SPI_IMX) || defined(CONFIG_SPI_IMX_MODULE)
|
||||
#include <mach/spi.h>
|
||||
#endif
|
||||
#include <mach/iomux-mx3.h>
|
||||
|
||||
#include <asm/mach-types.h>
|
||||
|
||||
#include "pcm037.h"
|
||||
#include "devices.h"
|
||||
|
||||
static unsigned int pcm037_eet_pins[] = {
|
||||
/* SPI #1 */
|
||||
MX31_PIN_CSPI1_MISO__MISO,
|
||||
MX31_PIN_CSPI1_MOSI__MOSI,
|
||||
MX31_PIN_CSPI1_SCLK__SCLK,
|
||||
MX31_PIN_CSPI1_SPI_RDY__SPI_RDY,
|
||||
MX31_PIN_CSPI1_SS0__SS0,
|
||||
MX31_PIN_CSPI1_SS1__SS1,
|
||||
MX31_PIN_CSPI1_SS2__SS2,
|
||||
|
||||
/* Reserve and hardwire GPIO 57 high - S6E63D6 chipselect */
|
||||
IOMUX_MODE(MX31_PIN_KEY_COL7, IOMUX_CONFIG_GPIO),
|
||||
/* GPIO keys */
|
||||
IOMUX_MODE(MX31_PIN_GPIO1_0, IOMUX_CONFIG_GPIO), /* 0 */
|
||||
IOMUX_MODE(MX31_PIN_GPIO1_1, IOMUX_CONFIG_GPIO), /* 1 */
|
||||
IOMUX_MODE(MX31_PIN_GPIO1_2, IOMUX_CONFIG_GPIO), /* 2 */
|
||||
IOMUX_MODE(MX31_PIN_GPIO1_3, IOMUX_CONFIG_GPIO), /* 3 */
|
||||
IOMUX_MODE(MX31_PIN_SVEN0, IOMUX_CONFIG_GPIO), /* 32 */
|
||||
IOMUX_MODE(MX31_PIN_STX0, IOMUX_CONFIG_GPIO), /* 33 */
|
||||
IOMUX_MODE(MX31_PIN_SRX0, IOMUX_CONFIG_GPIO), /* 34 */
|
||||
IOMUX_MODE(MX31_PIN_SIMPD0, IOMUX_CONFIG_GPIO), /* 35 */
|
||||
IOMUX_MODE(MX31_PIN_RTS1, IOMUX_CONFIG_GPIO), /* 38 */
|
||||
IOMUX_MODE(MX31_PIN_CTS1, IOMUX_CONFIG_GPIO), /* 39 */
|
||||
IOMUX_MODE(MX31_PIN_KEY_ROW4, IOMUX_CONFIG_GPIO), /* 50 */
|
||||
IOMUX_MODE(MX31_PIN_KEY_ROW5, IOMUX_CONFIG_GPIO), /* 51 */
|
||||
IOMUX_MODE(MX31_PIN_KEY_ROW6, IOMUX_CONFIG_GPIO), /* 52 */
|
||||
IOMUX_MODE(MX31_PIN_KEY_ROW7, IOMUX_CONFIG_GPIO), /* 53 */
|
||||
|
||||
/* LEDs */
|
||||
IOMUX_MODE(MX31_PIN_DTR_DTE1, IOMUX_CONFIG_GPIO), /* 44 */
|
||||
IOMUX_MODE(MX31_PIN_DSR_DTE1, IOMUX_CONFIG_GPIO), /* 45 */
|
||||
IOMUX_MODE(MX31_PIN_KEY_COL5, IOMUX_CONFIG_GPIO), /* 55 */
|
||||
IOMUX_MODE(MX31_PIN_KEY_COL6, IOMUX_CONFIG_GPIO), /* 56 */
|
||||
};
|
||||
|
||||
/* SPI */
|
||||
static struct spi_board_info pcm037_spi_dev[] = {
|
||||
{
|
||||
.modalias = "dac124s085",
|
||||
.max_speed_hz = 400000,
|
||||
.bus_num = 0,
|
||||
.chip_select = 0, /* Index in pcm037_spi1_cs[] */
|
||||
.mode = SPI_CPHA,
|
||||
},
|
||||
};
|
||||
|
||||
/* Platform Data for MXC CSPI */
|
||||
#if defined(CONFIG_SPI_IMX) || defined(CONFIG_SPI_IMX_MODULE)
|
||||
static int pcm037_spi1_cs[] = {MXC_SPI_CS(1), IOMUX_TO_GPIO(MX31_PIN_KEY_COL7)};
|
||||
|
||||
struct spi_imx_master pcm037_spi1_master = {
|
||||
.chipselect = pcm037_spi1_cs,
|
||||
.num_chipselect = ARRAY_SIZE(pcm037_spi1_cs),
|
||||
};
|
||||
#endif
|
||||
|
||||
/* GPIO-keys input device */
|
||||
static struct gpio_keys_button pcm037_gpio_keys[] = {
|
||||
{
|
||||
.type = EV_KEY,
|
||||
.code = KEY_L,
|
||||
.gpio = 0,
|
||||
.desc = "Wheel Manual",
|
||||
.wakeup = 0,
|
||||
}, {
|
||||
.type = EV_KEY,
|
||||
.code = KEY_A,
|
||||
.gpio = 1,
|
||||
.desc = "Wheel AF",
|
||||
.wakeup = 0,
|
||||
}, {
|
||||
.type = EV_KEY,
|
||||
.code = KEY_V,
|
||||
.gpio = 2,
|
||||
.desc = "Wheel View",
|
||||
.wakeup = 0,
|
||||
}, {
|
||||
.type = EV_KEY,
|
||||
.code = KEY_M,
|
||||
.gpio = 3,
|
||||
.desc = "Wheel Menu",
|
||||
.wakeup = 0,
|
||||
}, {
|
||||
.type = EV_KEY,
|
||||
.code = KEY_UP,
|
||||
.gpio = 32,
|
||||
.desc = "Nav Pad Up",
|
||||
.wakeup = 0,
|
||||
}, {
|
||||
.type = EV_KEY,
|
||||
.code = KEY_RIGHT,
|
||||
.gpio = 33,
|
||||
.desc = "Nav Pad Right",
|
||||
.wakeup = 0,
|
||||
}, {
|
||||
.type = EV_KEY,
|
||||
.code = KEY_DOWN,
|
||||
.gpio = 34,
|
||||
.desc = "Nav Pad Down",
|
||||
.wakeup = 0,
|
||||
}, {
|
||||
.type = EV_KEY,
|
||||
.code = KEY_LEFT,
|
||||
.gpio = 35,
|
||||
.desc = "Nav Pad Left",
|
||||
.wakeup = 0,
|
||||
}, {
|
||||
.type = EV_KEY,
|
||||
.code = KEY_ENTER,
|
||||
.gpio = 38,
|
||||
.desc = "Nav Pad Ok",
|
||||
.wakeup = 0,
|
||||
}, {
|
||||
.type = EV_KEY,
|
||||
.code = KEY_O,
|
||||
.gpio = 39,
|
||||
.desc = "Wheel Off",
|
||||
.wakeup = 0,
|
||||
}, {
|
||||
.type = EV_KEY,
|
||||
.code = BTN_FORWARD,
|
||||
.gpio = 50,
|
||||
.desc = "Focus Forward",
|
||||
.wakeup = 0,
|
||||
}, {
|
||||
.type = EV_KEY,
|
||||
.code = BTN_BACK,
|
||||
.gpio = 51,
|
||||
.desc = "Focus Backward",
|
||||
.wakeup = 0,
|
||||
}, {
|
||||
.type = EV_KEY,
|
||||
.code = BTN_MIDDLE,
|
||||
.gpio = 52,
|
||||
.desc = "Release Half",
|
||||
.wakeup = 0,
|
||||
}, {
|
||||
.type = EV_KEY,
|
||||
.code = BTN_EXTRA,
|
||||
.gpio = 53,
|
||||
.desc = "Release Full",
|
||||
.wakeup = 0,
|
||||
},
|
||||
};
|
||||
|
||||
static struct gpio_keys_platform_data pcm037_gpio_keys_platform_data = {
|
||||
.buttons = pcm037_gpio_keys,
|
||||
.nbuttons = ARRAY_SIZE(pcm037_gpio_keys),
|
||||
.rep = 0, /* No auto-repeat */
|
||||
};
|
||||
|
||||
static struct platform_device pcm037_gpio_keys_device = {
|
||||
.name = "gpio-keys",
|
||||
.id = -1,
|
||||
.dev = {
|
||||
.platform_data = &pcm037_gpio_keys_platform_data,
|
||||
},
|
||||
};
|
||||
|
||||
static int eet_init_devices(void)
|
||||
{
|
||||
if (!machine_is_pcm037() || pcm037_variant() != PCM037_EET)
|
||||
return 0;
|
||||
|
||||
mxc_iomux_setup_multiple_pins(pcm037_eet_pins,
|
||||
ARRAY_SIZE(pcm037_eet_pins), "pcm037_eet");
|
||||
|
||||
/* SPI */
|
||||
spi_register_board_info(pcm037_spi_dev, ARRAY_SIZE(pcm037_spi_dev));
|
||||
#if defined(CONFIG_SPI_IMX) || defined(CONFIG_SPI_IMX_MODULE)
|
||||
mxc_register_device(&mxc_spi_device0, &pcm037_spi1_master);
|
||||
#endif
|
||||
|
||||
platform_device_register(&pcm037_gpio_keys_device);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
late_initcall(eet_init_devices);
|
@ -567,9 +567,9 @@
|
||||
#define GPIO37_ULPI_DATA_OUT_7 MFP_CFG(GPIO37, AF3)
|
||||
#define GPIO33_ULPI_OTG_INTR MFP_CFG(GPIO33, AF1)
|
||||
|
||||
#define ULPI_DIR MFP_CFG_DRV(ULPI_DIR, MFP_AF0, MFP_DS01X)
|
||||
#define ULPI_NXT MFP_CFG_DRV(ULPI_NXT, MFP_AF0, MFP_DS01X)
|
||||
#define ULPI_STP MFP_CFG_DRV(ULPI_STP, MFP_AF0, MFP_DS01X)
|
||||
#define ULPI_DIR MFP_CFG_DRV(ULPI_DIR, AF0, DS01X)
|
||||
#define ULPI_NXT MFP_CFG_DRV(ULPI_NXT, AF0, DS01X)
|
||||
#define ULPI_STP MFP_CFG_DRV(ULPI_STP, AF0, DS01X)
|
||||
#endif /* CONFIG_CPU_PXA310 */
|
||||
|
||||
#endif /* __ASM_ARCH_MFP_PXA300_H */
|
||||
|
@ -250,7 +250,7 @@ static DEFINE_PXA3_CKEN(pxa3xx_mmc2, MMC2, 19500000, 0);
|
||||
static struct clk_lookup pxa3xx_clkregs[] = {
|
||||
INIT_CLKREG(&clk_pxa3xx_pout, NULL, "CLK_POUT"),
|
||||
/* Power I2C clock is always on */
|
||||
INIT_CLKREG(&clk_dummy, "pxa2xx-i2c.1", NULL),
|
||||
INIT_CLKREG(&clk_dummy, "pxa3xx-pwri2c.1", NULL),
|
||||
INIT_CLKREG(&clk_pxa3xx_lcd, "pxa2xx-fb", NULL),
|
||||
INIT_CLKREG(&clk_pxa3xx_camera, NULL, "CAMCLK"),
|
||||
INIT_CLKREG(&clk_pxa3xx_ac97, NULL, "AC97CLK"),
|
||||
|
@ -208,8 +208,7 @@ struct platform_device realview_i2c_device = {
|
||||
|
||||
static struct i2c_board_info realview_i2c_board_info[] = {
|
||||
{
|
||||
I2C_BOARD_INFO("rtc-ds1307", 0xd0 >> 1),
|
||||
.type = "ds1338",
|
||||
I2C_BOARD_INFO("ds1338", 0xd0 >> 1),
|
||||
},
|
||||
};
|
||||
|
||||
|
@ -24,6 +24,7 @@
|
||||
#include <linux/init.h>
|
||||
#include <linux/timer.h>
|
||||
#include <linux/io.h>
|
||||
#include <linux/seq_file.h>
|
||||
|
||||
#include <asm/clkdev.h>
|
||||
#include <mach/hardware.h>
|
||||
@ -702,6 +703,7 @@ static struct clk amba_clk = {
|
||||
.rate = 52000000, /* this varies! */
|
||||
.hw_ctrld = true,
|
||||
.reset = false,
|
||||
.lock = __SPIN_LOCK_UNLOCKED(amba_clk.lock),
|
||||
};
|
||||
|
||||
/*
|
||||
@ -720,6 +722,7 @@ static struct clk cpu_clk = {
|
||||
.set_rate = clk_set_rate_cpuclk,
|
||||
.get_rate = clk_get_rate_cpuclk,
|
||||
.round_rate = clk_round_rate_cpuclk,
|
||||
.lock = __SPIN_LOCK_UNLOCKED(cpu_clk.lock),
|
||||
};
|
||||
|
||||
static struct clk nandif_clk = {
|
||||
@ -732,6 +735,7 @@ static struct clk nandif_clk = {
|
||||
.clk_val = U300_SYSCON_SBCER_NANDIF_CLK_EN,
|
||||
.enable = syscon_clk_enable,
|
||||
.disable = syscon_clk_disable,
|
||||
.lock = __SPIN_LOCK_UNLOCKED(nandif_clk.lock),
|
||||
};
|
||||
|
||||
static struct clk semi_clk = {
|
||||
@ -744,6 +748,7 @@ static struct clk semi_clk = {
|
||||
.clk_val = U300_SYSCON_SBCER_SEMI_CLK_EN,
|
||||
.enable = syscon_clk_enable,
|
||||
.disable = syscon_clk_disable,
|
||||
.lock = __SPIN_LOCK_UNLOCKED(semi_clk.lock),
|
||||
};
|
||||
|
||||
#ifdef CONFIG_MACH_U300_BS335
|
||||
@ -758,6 +763,7 @@ static struct clk isp_clk = {
|
||||
.clk_val = U300_SYSCON_SBCER_ISP_CLK_EN,
|
||||
.enable = syscon_clk_enable,
|
||||
.disable = syscon_clk_disable,
|
||||
.lock = __SPIN_LOCK_UNLOCKED(isp_clk.lock),
|
||||
};
|
||||
|
||||
static struct clk cds_clk = {
|
||||
@ -771,6 +777,7 @@ static struct clk cds_clk = {
|
||||
.clk_val = U300_SYSCON_SBCER_CDS_CLK_EN,
|
||||
.enable = syscon_clk_enable,
|
||||
.disable = syscon_clk_disable,
|
||||
.lock = __SPIN_LOCK_UNLOCKED(cds_clk.lock),
|
||||
};
|
||||
#endif
|
||||
|
||||
@ -785,6 +792,7 @@ static struct clk dma_clk = {
|
||||
.clk_val = U300_SYSCON_SBCER_DMAC_CLK_EN,
|
||||
.enable = syscon_clk_enable,
|
||||
.disable = syscon_clk_disable,
|
||||
.lock = __SPIN_LOCK_UNLOCKED(dma_clk.lock),
|
||||
};
|
||||
|
||||
static struct clk aaif_clk = {
|
||||
@ -798,6 +806,7 @@ static struct clk aaif_clk = {
|
||||
.clk_val = U300_SYSCON_SBCER_AAIF_CLK_EN,
|
||||
.enable = syscon_clk_enable,
|
||||
.disable = syscon_clk_disable,
|
||||
.lock = __SPIN_LOCK_UNLOCKED(aaif_clk.lock),
|
||||
};
|
||||
|
||||
static struct clk apex_clk = {
|
||||
@ -811,6 +820,7 @@ static struct clk apex_clk = {
|
||||
.clk_val = U300_SYSCON_SBCER_APEX_CLK_EN,
|
||||
.enable = syscon_clk_enable,
|
||||
.disable = syscon_clk_disable,
|
||||
.lock = __SPIN_LOCK_UNLOCKED(apex_clk.lock),
|
||||
};
|
||||
|
||||
static struct clk video_enc_clk = {
|
||||
@ -825,6 +835,7 @@ static struct clk video_enc_clk = {
|
||||
.clk_val = U300_SYSCON_SBCER_VIDEO_ENC_CLK_EN,
|
||||
.enable = syscon_clk_enable,
|
||||
.disable = syscon_clk_disable,
|
||||
.lock = __SPIN_LOCK_UNLOCKED(video_enc_clk.lock),
|
||||
};
|
||||
|
||||
static struct clk xgam_clk = {
|
||||
@ -839,6 +850,7 @@ static struct clk xgam_clk = {
|
||||
.get_rate = clk_get_rate_xgamclk,
|
||||
.enable = syscon_clk_enable,
|
||||
.disable = syscon_clk_disable,
|
||||
.lock = __SPIN_LOCK_UNLOCKED(xgam_clk.lock),
|
||||
};
|
||||
|
||||
/* This clock is used to activate the video encoder */
|
||||
@ -854,6 +866,7 @@ static struct clk ahb_clk = {
|
||||
.enable = syscon_clk_enable,
|
||||
.disable = syscon_clk_disable,
|
||||
.get_rate = clk_get_rate_ahb_clk,
|
||||
.lock = __SPIN_LOCK_UNLOCKED(ahb_clk.lock),
|
||||
};
|
||||
|
||||
|
||||
@ -871,6 +884,7 @@ static struct clk ahb_subsys_clk = {
|
||||
.enable = syscon_clk_enable,
|
||||
.disable = syscon_clk_disable,
|
||||
.get_rate = clk_get_rate_ahb_clk,
|
||||
.lock = __SPIN_LOCK_UNLOCKED(ahb_subsys_clk.lock),
|
||||
};
|
||||
|
||||
static struct clk intcon_clk = {
|
||||
@ -882,6 +896,8 @@ static struct clk intcon_clk = {
|
||||
.res_reg = U300_SYSCON_VBASE + U300_SYSCON_RRR,
|
||||
.res_mask = U300_SYSCON_RRR_INTCON_RESET_EN,
|
||||
/* INTCON can be reset but not clock-gated */
|
||||
.lock = __SPIN_LOCK_UNLOCKED(intcon_clk.lock),
|
||||
|
||||
};
|
||||
|
||||
static struct clk mspro_clk = {
|
||||
@ -895,6 +911,7 @@ static struct clk mspro_clk = {
|
||||
.clk_val = U300_SYSCON_SBCER_MSPRO_CLK_EN,
|
||||
.enable = syscon_clk_enable,
|
||||
.disable = syscon_clk_disable,
|
||||
.lock = __SPIN_LOCK_UNLOCKED(mspro_clk.lock),
|
||||
};
|
||||
|
||||
static struct clk emif_clk = {
|
||||
@ -909,6 +926,7 @@ static struct clk emif_clk = {
|
||||
.enable = syscon_clk_enable,
|
||||
.disable = syscon_clk_disable,
|
||||
.get_rate = clk_get_rate_emif_clk,
|
||||
.lock = __SPIN_LOCK_UNLOCKED(emif_clk.lock),
|
||||
};
|
||||
|
||||
|
||||
@ -926,6 +944,7 @@ static struct clk fast_clk = {
|
||||
.clk_val = U300_SYSCON_SBCER_FAST_BRIDGE_CLK_EN,
|
||||
.enable = syscon_clk_enable,
|
||||
.disable = syscon_clk_disable,
|
||||
.lock = __SPIN_LOCK_UNLOCKED(fast_clk.lock),
|
||||
};
|
||||
|
||||
static struct clk mmcsd_clk = {
|
||||
@ -942,6 +961,7 @@ static struct clk mmcsd_clk = {
|
||||
.round_rate = clk_round_rate_mclk,
|
||||
.disable = syscon_clk_disable,
|
||||
.enable = syscon_clk_enable,
|
||||
.lock = __SPIN_LOCK_UNLOCKED(mmcsd_clk.lock),
|
||||
};
|
||||
|
||||
static struct clk i2s0_clk = {
|
||||
@ -956,6 +976,7 @@ static struct clk i2s0_clk = {
|
||||
.enable = syscon_clk_enable,
|
||||
.disable = syscon_clk_disable,
|
||||
.get_rate = clk_get_rate_i2s_i2c_spi,
|
||||
.lock = __SPIN_LOCK_UNLOCKED(i2s0_clk.lock),
|
||||
};
|
||||
|
||||
static struct clk i2s1_clk = {
|
||||
@ -970,6 +991,7 @@ static struct clk i2s1_clk = {
|
||||
.enable = syscon_clk_enable,
|
||||
.disable = syscon_clk_disable,
|
||||
.get_rate = clk_get_rate_i2s_i2c_spi,
|
||||
.lock = __SPIN_LOCK_UNLOCKED(i2s1_clk.lock),
|
||||
};
|
||||
|
||||
static struct clk i2c0_clk = {
|
||||
@ -984,6 +1006,7 @@ static struct clk i2c0_clk = {
|
||||
.enable = syscon_clk_enable,
|
||||
.disable = syscon_clk_disable,
|
||||
.get_rate = clk_get_rate_i2s_i2c_spi,
|
||||
.lock = __SPIN_LOCK_UNLOCKED(i2c0_clk.lock),
|
||||
};
|
||||
|
||||
static struct clk i2c1_clk = {
|
||||
@ -998,6 +1021,7 @@ static struct clk i2c1_clk = {
|
||||
.enable = syscon_clk_enable,
|
||||
.disable = syscon_clk_disable,
|
||||
.get_rate = clk_get_rate_i2s_i2c_spi,
|
||||
.lock = __SPIN_LOCK_UNLOCKED(i2c1_clk.lock),
|
||||
};
|
||||
|
||||
static struct clk spi_clk = {
|
||||
@ -1012,6 +1036,7 @@ static struct clk spi_clk = {
|
||||
.enable = syscon_clk_enable,
|
||||
.disable = syscon_clk_disable,
|
||||
.get_rate = clk_get_rate_i2s_i2c_spi,
|
||||
.lock = __SPIN_LOCK_UNLOCKED(spi_clk.lock),
|
||||
};
|
||||
|
||||
#ifdef CONFIG_MACH_U300_BS335
|
||||
@ -1026,6 +1051,7 @@ static struct clk uart1_clk = {
|
||||
.clk_val = U300_SYSCON_SBCER_UART1_CLK_EN,
|
||||
.enable = syscon_clk_enable,
|
||||
.disable = syscon_clk_disable,
|
||||
.lock = __SPIN_LOCK_UNLOCKED(uart1_clk.lock),
|
||||
};
|
||||
#endif
|
||||
|
||||
@ -1044,6 +1070,7 @@ static struct clk slow_clk = {
|
||||
.clk_val = U300_SYSCON_SBCER_SLOW_BRIDGE_CLK_EN,
|
||||
.enable = syscon_clk_enable,
|
||||
.disable = syscon_clk_disable,
|
||||
.lock = __SPIN_LOCK_UNLOCKED(slow_clk.lock),
|
||||
};
|
||||
|
||||
/* TODO: implement SYSCON clock? */
|
||||
@ -1055,6 +1082,7 @@ static struct clk wdog_clk = {
|
||||
.rate = 32768,
|
||||
.reset = false,
|
||||
/* This is always on, cannot be enabled/disabled or reset */
|
||||
.lock = __SPIN_LOCK_UNLOCKED(wdog_clk.lock),
|
||||
};
|
||||
|
||||
/* This one is hardwired to PLL13 */
|
||||
@ -1069,6 +1097,7 @@ static struct clk uart_clk = {
|
||||
.clk_val = U300_SYSCON_SBCER_UART_CLK_EN,
|
||||
.enable = syscon_clk_enable,
|
||||
.disable = syscon_clk_disable,
|
||||
.lock = __SPIN_LOCK_UNLOCKED(uart_clk.lock),
|
||||
};
|
||||
|
||||
static struct clk keypad_clk = {
|
||||
@ -1082,6 +1111,7 @@ static struct clk keypad_clk = {
|
||||
.clk_val = U300_SYSCON_SBCER_KEYPAD_CLK_EN,
|
||||
.enable = syscon_clk_enable,
|
||||
.disable = syscon_clk_disable,
|
||||
.lock = __SPIN_LOCK_UNLOCKED(keypad_clk.lock),
|
||||
};
|
||||
|
||||
static struct clk gpio_clk = {
|
||||
@ -1095,6 +1125,7 @@ static struct clk gpio_clk = {
|
||||
.clk_val = U300_SYSCON_SBCER_GPIO_CLK_EN,
|
||||
.enable = syscon_clk_enable,
|
||||
.disable = syscon_clk_disable,
|
||||
.lock = __SPIN_LOCK_UNLOCKED(gpio_clk.lock),
|
||||
};
|
||||
|
||||
static struct clk rtc_clk = {
|
||||
@ -1106,6 +1137,7 @@ static struct clk rtc_clk = {
|
||||
.res_reg = U300_SYSCON_VBASE + U300_SYSCON_RSR,
|
||||
.res_mask = U300_SYSCON_RSR_RTC_RESET_EN,
|
||||
/* This clock is always on, cannot be enabled/disabled */
|
||||
.lock = __SPIN_LOCK_UNLOCKED(rtc_clk.lock),
|
||||
};
|
||||
|
||||
static struct clk bustr_clk = {
|
||||
@ -1119,6 +1151,7 @@ static struct clk bustr_clk = {
|
||||
.clk_val = U300_SYSCON_SBCER_BTR_CLK_EN,
|
||||
.enable = syscon_clk_enable,
|
||||
.disable = syscon_clk_disable,
|
||||
.lock = __SPIN_LOCK_UNLOCKED(bustr_clk.lock),
|
||||
};
|
||||
|
||||
static struct clk evhist_clk = {
|
||||
@ -1132,6 +1165,7 @@ static struct clk evhist_clk = {
|
||||
.clk_val = U300_SYSCON_SBCER_EH_CLK_EN,
|
||||
.enable = syscon_clk_enable,
|
||||
.disable = syscon_clk_disable,
|
||||
.lock = __SPIN_LOCK_UNLOCKED(evhist_clk.lock),
|
||||
};
|
||||
|
||||
static struct clk timer_clk = {
|
||||
@ -1145,6 +1179,7 @@ static struct clk timer_clk = {
|
||||
.clk_val = U300_SYSCON_SBCER_ACC_TMR_CLK_EN,
|
||||
.enable = syscon_clk_enable,
|
||||
.disable = syscon_clk_disable,
|
||||
.lock = __SPIN_LOCK_UNLOCKED(timer_clk.lock),
|
||||
};
|
||||
|
||||
static struct clk app_timer_clk = {
|
||||
@ -1158,6 +1193,7 @@ static struct clk app_timer_clk = {
|
||||
.clk_val = U300_SYSCON_SBCER_APP_TMR_CLK_EN,
|
||||
.enable = syscon_clk_enable,
|
||||
.disable = syscon_clk_disable,
|
||||
.lock = __SPIN_LOCK_UNLOCKED(app_timer_clk.lock),
|
||||
};
|
||||
|
||||
#ifdef CONFIG_MACH_U300_BS335
|
||||
@ -1172,6 +1208,7 @@ static struct clk ppm_clk = {
|
||||
.clk_val = U300_SYSCON_SBCER_PPM_CLK_EN,
|
||||
.enable = syscon_clk_enable,
|
||||
.disable = syscon_clk_disable,
|
||||
.lock = __SPIN_LOCK_UNLOCKED(ppm_clk.lock),
|
||||
};
|
||||
#endif
|
||||
|
||||
@ -1187,53 +1224,53 @@ static struct clk ppm_clk = {
|
||||
*/
|
||||
static struct clk_lookup lookups[] = {
|
||||
/* Connected directly to the AMBA bus */
|
||||
DEF_LOOKUP("amba", &amba_clk),
|
||||
DEF_LOOKUP("cpu", &cpu_clk),
|
||||
DEF_LOOKUP("nandif", &nandif_clk),
|
||||
DEF_LOOKUP("semi", &semi_clk),
|
||||
DEF_LOOKUP("amba", &amba_clk),
|
||||
DEF_LOOKUP("cpu", &cpu_clk),
|
||||
DEF_LOOKUP("fsmc", &nandif_clk),
|
||||
DEF_LOOKUP("semi", &semi_clk),
|
||||
#ifdef CONFIG_MACH_U300_BS335
|
||||
DEF_LOOKUP("isp", &isp_clk),
|
||||
DEF_LOOKUP("cds", &cds_clk),
|
||||
DEF_LOOKUP("isp", &isp_clk),
|
||||
DEF_LOOKUP("cds", &cds_clk),
|
||||
#endif
|
||||
DEF_LOOKUP("dma", &dma_clk),
|
||||
DEF_LOOKUP("aaif", &aaif_clk),
|
||||
DEF_LOOKUP("apex", &apex_clk),
|
||||
DEF_LOOKUP("dma", &dma_clk),
|
||||
DEF_LOOKUP("msl", &aaif_clk),
|
||||
DEF_LOOKUP("apex", &apex_clk),
|
||||
DEF_LOOKUP("video_enc", &video_enc_clk),
|
||||
DEF_LOOKUP("xgam", &xgam_clk),
|
||||
DEF_LOOKUP("ahb", &ahb_clk),
|
||||
DEF_LOOKUP("xgam", &xgam_clk),
|
||||
DEF_LOOKUP("ahb", &ahb_clk),
|
||||
/* AHB bridge clocks */
|
||||
DEF_LOOKUP("ahb", &ahb_subsys_clk),
|
||||
DEF_LOOKUP("intcon", &intcon_clk),
|
||||
DEF_LOOKUP("mspro", &mspro_clk),
|
||||
DEF_LOOKUP("pl172", &emif_clk),
|
||||
DEF_LOOKUP("ahb_subsys", &ahb_subsys_clk),
|
||||
DEF_LOOKUP("intcon", &intcon_clk),
|
||||
DEF_LOOKUP("mspro", &mspro_clk),
|
||||
DEF_LOOKUP("pl172", &emif_clk),
|
||||
/* FAST bridge clocks */
|
||||
DEF_LOOKUP("fast", &fast_clk),
|
||||
DEF_LOOKUP("mmci", &mmcsd_clk),
|
||||
DEF_LOOKUP("fast", &fast_clk),
|
||||
DEF_LOOKUP("mmci", &mmcsd_clk),
|
||||
/*
|
||||
* The .0 and .1 identifiers on these comes from the platform device
|
||||
* .id field and are assigned when the platform devices are registered.
|
||||
*/
|
||||
DEF_LOOKUP("i2s.0", &i2s0_clk),
|
||||
DEF_LOOKUP("i2s.1", &i2s1_clk),
|
||||
DEF_LOOKUP("stddci2c.0", &i2c0_clk),
|
||||
DEF_LOOKUP("stddci2c.1", &i2c1_clk),
|
||||
DEF_LOOKUP("pl022", &spi_clk),
|
||||
DEF_LOOKUP("i2s.0", &i2s0_clk),
|
||||
DEF_LOOKUP("i2s.1", &i2s1_clk),
|
||||
DEF_LOOKUP("stu300.0", &i2c0_clk),
|
||||
DEF_LOOKUP("stu300.1", &i2c1_clk),
|
||||
DEF_LOOKUP("pl022", &spi_clk),
|
||||
#ifdef CONFIG_MACH_U300_BS335
|
||||
DEF_LOOKUP("uart1", &uart1_clk),
|
||||
DEF_LOOKUP("uart1", &uart1_clk),
|
||||
#endif
|
||||
/* SLOW bridge clocks */
|
||||
DEF_LOOKUP("slow", &slow_clk),
|
||||
DEF_LOOKUP("wdog", &wdog_clk),
|
||||
DEF_LOOKUP("uart0", &uart_clk),
|
||||
DEF_LOOKUP("apptimer", &app_timer_clk),
|
||||
DEF_LOOKUP("keypad", &keypad_clk),
|
||||
DEF_LOOKUP("slow", &slow_clk),
|
||||
DEF_LOOKUP("coh901327_wdog", &wdog_clk),
|
||||
DEF_LOOKUP("uart0", &uart_clk),
|
||||
DEF_LOOKUP("apptimer", &app_timer_clk),
|
||||
DEF_LOOKUP("coh901461-keypad", &keypad_clk),
|
||||
DEF_LOOKUP("u300-gpio", &gpio_clk),
|
||||
DEF_LOOKUP("rtc0", &rtc_clk),
|
||||
DEF_LOOKUP("bustr", &bustr_clk),
|
||||
DEF_LOOKUP("evhist", &evhist_clk),
|
||||
DEF_LOOKUP("timer", &timer_clk),
|
||||
DEF_LOOKUP("rtc-coh901331", &rtc_clk),
|
||||
DEF_LOOKUP("bustr", &bustr_clk),
|
||||
DEF_LOOKUP("evhist", &evhist_clk),
|
||||
DEF_LOOKUP("timer", &timer_clk),
|
||||
#ifdef CONFIG_MACH_U300_BS335
|
||||
DEF_LOOKUP("ppm", &ppm_clk),
|
||||
DEF_LOOKUP("ppm", &ppm_clk),
|
||||
#endif
|
||||
};
|
||||
|
||||
@ -1427,16 +1464,20 @@ static const struct file_operations u300_clocks_operations = {
|
||||
.release = single_release,
|
||||
};
|
||||
|
||||
static void init_clk_read_procfs(void)
|
||||
static int __init init_clk_read_debugfs(void)
|
||||
{
|
||||
/* Expose a simple debugfs interface to view all clocks */
|
||||
(void) debugfs_create_file("u300_clocks", S_IFREG | S_IRUGO,
|
||||
NULL, NULL, &u300_clocks_operations);
|
||||
}
|
||||
#else
|
||||
static inline void init_clk_read_procfs(void)
|
||||
{
|
||||
NULL, NULL,
|
||||
&u300_clocks_operations);
|
||||
return 0;
|
||||
}
|
||||
/*
|
||||
* This needs to come in after the core_initcall() for the
|
||||
* overall clocks, because debugfs is not available until
|
||||
* the subsystems come up.
|
||||
*/
|
||||
module_init(init_clk_read_debugfs);
|
||||
#endif
|
||||
|
||||
static int __init u300_clock_init(void)
|
||||
@ -1462,8 +1503,6 @@ static int __init u300_clock_init(void)
|
||||
|
||||
clk_register();
|
||||
|
||||
init_clk_read_procfs();
|
||||
|
||||
/*
|
||||
* Some of these may be on when we boot the system so make sure they
|
||||
* are turned OFF.
|
||||
|
@ -455,8 +455,8 @@ void __init u300_init_irq(void)
|
||||
for (i = 0; i < NR_IRQS; i++)
|
||||
set_bit(i, (unsigned long *) &mask[0]);
|
||||
u300_enable_intcon_clock();
|
||||
vic_init((void __iomem *) U300_INTCON0_VBASE, 0, mask[0], 0);
|
||||
vic_init((void __iomem *) U300_INTCON1_VBASE, 32, mask[1], 0);
|
||||
vic_init((void __iomem *) U300_INTCON0_VBASE, 0, mask[0], mask[0]);
|
||||
vic_init((void __iomem *) U300_INTCON1_VBASE, 32, mask[1], mask[1]);
|
||||
}
|
||||
|
||||
|
||||
|
@ -342,8 +342,7 @@ static struct platform_device versatile_i2c_device = {
|
||||
|
||||
static struct i2c_board_info versatile_i2c_board_info[] = {
|
||||
{
|
||||
I2C_BOARD_INFO("rtc-ds1307", 0xd0 >> 1),
|
||||
.type = "ds1338",
|
||||
I2C_BOARD_INFO("ds1338", 0xd0 >> 1),
|
||||
},
|
||||
};
|
||||
|
||||
|
@ -27,6 +27,7 @@ EXPORT_SYMBOL(__cpuc_flush_kern_all);
|
||||
EXPORT_SYMBOL(__cpuc_flush_user_all);
|
||||
EXPORT_SYMBOL(__cpuc_flush_user_range);
|
||||
EXPORT_SYMBOL(__cpuc_coherent_kern_range);
|
||||
EXPORT_SYMBOL(__cpuc_flush_dcache_page);
|
||||
EXPORT_SYMBOL(dmac_inv_range); /* because of flush_ioremap_region() */
|
||||
#else
|
||||
EXPORT_SYMBOL(cpu_cache);
|
||||
|
@ -602,6 +602,8 @@ enum iomux_pins {
|
||||
#define MX31_PIN_I2C_DAT__SDA IOMUX_MODE(MX31_PIN_I2C_DAT, IOMUX_CONFIG_FUNC)
|
||||
#define MX31_PIN_DCD_DTE1__I2C2_SDA IOMUX_MODE(MX31_PIN_DCD_DTE1, IOMUX_CONFIG_ALT2)
|
||||
#define MX31_PIN_RI_DTE1__I2C2_SCL IOMUX_MODE(MX31_PIN_RI_DTE1, IOMUX_CONFIG_ALT2)
|
||||
#define MX31_PIN_CSPI2_SS2__I2C3_SDA IOMUX_MODE(MX31_PIN_CSPI2_SS2, IOMUX_CONFIG_ALT1)
|
||||
#define MX31_PIN_CSPI2_SCLK__I2C3_SCL IOMUX_MODE(MX31_PIN_CSPI2_SCLK, IOMUX_CONFIG_ALT1)
|
||||
#define MX31_PIN_CSI_D4__CSI_D4 IOMUX_MODE(MX31_PIN_CSI_D4, IOMUX_CONFIG_FUNC)
|
||||
#define MX31_PIN_CSI_D5__CSI_D5 IOMUX_MODE(MX31_PIN_CSI_D5, IOMUX_CONFIG_FUNC)
|
||||
#define MX31_PIN_CSI_D6__CSI_D6 IOMUX_MODE(MX31_PIN_CSI_D6, IOMUX_CONFIG_FUNC)
|
||||
|
@ -16,7 +16,7 @@
|
||||
#include <linux/irq.h>
|
||||
#include <linux/io.h>
|
||||
#include <linux/sysdev.h>
|
||||
#include <linux/bootmem.h>
|
||||
#include <linux/slab.h>
|
||||
|
||||
#include <mach/gpio.h>
|
||||
|
||||
@ -112,17 +112,12 @@ static int __init pxa_init_gpio_chip(int gpio_end)
|
||||
int i, gpio, nbanks = gpio_to_bank(gpio_end) + 1;
|
||||
struct pxa_gpio_chip *chips;
|
||||
|
||||
/* this is early, we have to use bootmem allocator, and we really
|
||||
* want this to be allocated dynamically for different 'gpio_end'
|
||||
*/
|
||||
chips = alloc_bootmem_low(nbanks * sizeof(struct pxa_gpio_chip));
|
||||
chips = kzalloc(nbanks * sizeof(struct pxa_gpio_chip), GFP_KERNEL);
|
||||
if (chips == NULL) {
|
||||
pr_err("%s: failed to allocate GPIO chips\n", __func__);
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
memset(chips, 0, nbanks * sizeof(struct pxa_gpio_chip));
|
||||
|
||||
for (i = 0, gpio = 0; i < nbanks; i++, gpio += 32) {
|
||||
struct gpio_chip *c = &chips[i].chip;
|
||||
|
||||
|
@ -83,7 +83,7 @@ static inline void pte_free(struct mm_struct *mm, pgtable_t pte)
|
||||
quicklist_free_page(QUICK_PT, NULL, pte);
|
||||
}
|
||||
|
||||
#define __pte_free_tlb(tlb,pte) \
|
||||
#define __pte_free_tlb(tlb,pte,addr) \
|
||||
do { \
|
||||
pgtable_page_dtor(pte); \
|
||||
tlb_remove_page((tlb), pte); \
|
||||
|
@ -40,7 +40,7 @@ struct thread_info {
|
||||
.exec_domain = &default_exec_domain, \
|
||||
.flags = 0, \
|
||||
.cpu = 0, \
|
||||
.preempt_count = 1, \
|
||||
.preempt_count = INIT_PREEMPT_COUNT, \
|
||||
.restart_block = { \
|
||||
.fn = do_no_restart_syscall \
|
||||
} \
|
||||
|
@ -32,22 +32,25 @@ void NORET_TYPE die(const char *str, struct pt_regs *regs, long err)
|
||||
spin_lock_irq(&die_lock);
|
||||
bust_spinlocks(1);
|
||||
|
||||
printk(KERN_ALERT "Oops: %s, sig: %ld [#%d]\n" KERN_EMERG,
|
||||
printk(KERN_ALERT "Oops: %s, sig: %ld [#%d]\n",
|
||||
str, err, ++die_counter);
|
||||
|
||||
printk(KERN_EMERG);
|
||||
|
||||
#ifdef CONFIG_PREEMPT
|
||||
printk("PREEMPT ");
|
||||
printk(KERN_CONT "PREEMPT ");
|
||||
#endif
|
||||
#ifdef CONFIG_FRAME_POINTER
|
||||
printk("FRAME_POINTER ");
|
||||
printk(KERN_CONT "FRAME_POINTER ");
|
||||
#endif
|
||||
if (current_cpu_data.features & AVR32_FEATURE_OCD) {
|
||||
unsigned long did = ocd_read(DID);
|
||||
printk("chip: 0x%03lx:0x%04lx rev %lu\n",
|
||||
printk(KERN_CONT "chip: 0x%03lx:0x%04lx rev %lu\n",
|
||||
(did >> 1) & 0x7ff,
|
||||
(did >> 12) & 0x7fff,
|
||||
(did >> 28) & 0xf);
|
||||
} else {
|
||||
printk("cpu: arch %u r%u / core %u r%u\n",
|
||||
printk(KERN_CONT "cpu: arch %u r%u / core %u r%u\n",
|
||||
current_cpu_data.arch_type,
|
||||
current_cpu_data.arch_revision,
|
||||
current_cpu_data.cpu_type,
|
||||
|
@ -223,9 +223,10 @@
|
||||
[--sp] = RETN;
|
||||
[--sp] = RETE;
|
||||
[--sp] = SEQSTAT;
|
||||
#ifdef CONFIG_KGDB
|
||||
r1.l = lo(IPEND);
|
||||
r1.h = hi(IPEND);
|
||||
#ifdef CONFIG_DEBUG_KERNEL
|
||||
p1.l = lo(IPEND);
|
||||
p1.h = hi(IPEND);
|
||||
r1 = [p1];
|
||||
[--sp] = r1;
|
||||
#else
|
||||
[--sp] = r0; /* Skip IPEND as well. */
|
||||
|
@ -32,7 +32,6 @@ struct blackfin_cpudata {
|
||||
struct task_struct *idle;
|
||||
unsigned int imemctl;
|
||||
unsigned int dmemctl;
|
||||
unsigned long loops_per_jiffy;
|
||||
unsigned long dcache_invld_count;
|
||||
unsigned long icache_invld_count;
|
||||
};
|
||||
|
@ -6,6 +6,9 @@
|
||||
extern void ack_bad_irq(unsigned int irq);
|
||||
#define ack_bad_irq ack_bad_irq
|
||||
|
||||
/* Define until common code gets sane defaults */
|
||||
#define HARDIRQ_BITS 9
|
||||
|
||||
#include <asm-generic/hardirq.h>
|
||||
|
||||
#endif
|
||||
|
@ -105,23 +105,16 @@ static inline uint32_t __pure bfin_revid(void)
|
||||
/* Always use CHIPID, to work around ANOMALY_05000234 */
|
||||
uint32_t revid = (bfin_read_CHIPID() & CHIPID_VERSION) >> 28;
|
||||
|
||||
#ifdef CONFIG_BF52x
|
||||
/* ANOMALY_05000357
|
||||
#ifdef _BOOTROM_GET_DXE_ADDRESS_TWI
|
||||
/*
|
||||
* ANOMALY_05000364
|
||||
* Incorrect Revision Number in DSPID Register
|
||||
*/
|
||||
if (revid == 0)
|
||||
switch (bfin_read16(_BOOTROM_GET_DXE_ADDRESS_TWI)) {
|
||||
case 0x0010:
|
||||
revid = 0;
|
||||
break;
|
||||
case 0x2796:
|
||||
revid = 1;
|
||||
break;
|
||||
default:
|
||||
revid = 0xFFFF;
|
||||
break;
|
||||
}
|
||||
if (ANOMALY_05000364 &&
|
||||
bfin_read16(_BOOTROM_GET_DXE_ADDRESS_TWI) == 0x2796)
|
||||
revid = 1;
|
||||
#endif
|
||||
|
||||
return revid;
|
||||
}
|
||||
|
||||
|
@ -77,7 +77,7 @@ struct thread_info {
|
||||
.exec_domain = &default_exec_domain, \
|
||||
.flags = 0, \
|
||||
.cpu = 0, \
|
||||
.preempt_count = 1, \
|
||||
.preempt_count = INIT_PREEMPT_COUNT, \
|
||||
.restart_block = { \
|
||||
.fn = do_no_restart_syscall, \
|
||||
}, \
|
||||
|
@ -253,32 +253,31 @@ void __init early_dma_memcpy(void *pdst, const void *psrc, size_t size)
|
||||
BUG_ON(src % 4);
|
||||
BUG_ON(size % 4);
|
||||
|
||||
src_ch = 0;
|
||||
/* Find an avalible memDMA channel */
|
||||
while (1) {
|
||||
if (src_ch == (struct dma_register *)MDMA_S0_NEXT_DESC_PTR) {
|
||||
dst_ch = (struct dma_register *)MDMA_D1_NEXT_DESC_PTR;
|
||||
src_ch = (struct dma_register *)MDMA_S1_NEXT_DESC_PTR;
|
||||
} else {
|
||||
dst_ch = (struct dma_register *)MDMA_D0_NEXT_DESC_PTR;
|
||||
src_ch = (struct dma_register *)MDMA_S0_NEXT_DESC_PTR;
|
||||
}
|
||||
|
||||
if (!bfin_read16(&src_ch->cfg))
|
||||
break;
|
||||
else if (bfin_read16(&dst_ch->irq_status) & DMA_DONE) {
|
||||
bfin_write16(&src_ch->cfg, 0);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/* Force a sync in case a previous config reset on this channel
|
||||
* occurred. This is needed so subsequent writes to DMA registers
|
||||
* are not spuriously lost/corrupted.
|
||||
*/
|
||||
__builtin_bfin_ssync();
|
||||
|
||||
src_ch = 0;
|
||||
/* Find an avalible memDMA channel */
|
||||
while (1) {
|
||||
if (!src_ch || src_ch == (struct dma_register *)MDMA_S1_NEXT_DESC_PTR) {
|
||||
dst_ch = (struct dma_register *)MDMA_D0_NEXT_DESC_PTR;
|
||||
src_ch = (struct dma_register *)MDMA_S0_NEXT_DESC_PTR;
|
||||
} else {
|
||||
dst_ch = (struct dma_register *)MDMA_D1_NEXT_DESC_PTR;
|
||||
src_ch = (struct dma_register *)MDMA_S1_NEXT_DESC_PTR;
|
||||
}
|
||||
|
||||
if (!bfin_read16(&src_ch->cfg)) {
|
||||
break;
|
||||
} else {
|
||||
if (bfin_read16(&src_ch->irq_status) & DMA_DONE)
|
||||
bfin_write16(&src_ch->cfg, 0);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/* Destination */
|
||||
bfin_write32(&dst_ch->start_addr, dst);
|
||||
bfin_write16(&dst_ch->x_count, size >> 2);
|
||||
|
@ -686,14 +686,12 @@ void bfin_gpio_pm_hibernate_restore(void)
|
||||
*port_fer[bank] = gpio_bank_saved[bank].fer;
|
||||
#endif
|
||||
gpio_array[bank]->inen = gpio_bank_saved[bank].inen;
|
||||
gpio_array[bank]->data_set = gpio_bank_saved[bank].data
|
||||
& gpio_bank_saved[bank].dir;
|
||||
gpio_array[bank]->dir = gpio_bank_saved[bank].dir;
|
||||
gpio_array[bank]->polar = gpio_bank_saved[bank].polar;
|
||||
gpio_array[bank]->edge = gpio_bank_saved[bank].edge;
|
||||
gpio_array[bank]->both = gpio_bank_saved[bank].both;
|
||||
|
||||
gpio_array[bank]->data_set = gpio_bank_saved[bank].data
|
||||
| gpio_bank_saved[bank].dir;
|
||||
|
||||
gpio_array[bank]->maska = gpio_bank_saved[bank].maska;
|
||||
}
|
||||
AWA_DUMMY_READ(maska);
|
||||
|
@ -72,13 +72,24 @@ void __init generate_cplb_tables_cpu(unsigned int cpu)
|
||||
}
|
||||
|
||||
/* Cover L1 memory. One 4M area for code and data each is enough. */
|
||||
if (L1_DATA_A_LENGTH || L1_DATA_B_LENGTH) {
|
||||
d_tbl[i_d].addr = L1_DATA_A_START;
|
||||
d_tbl[i_d++].data = L1_DMEMORY | PAGE_SIZE_4MB;
|
||||
if (cpu == 0) {
|
||||
if (L1_DATA_A_LENGTH || L1_DATA_B_LENGTH) {
|
||||
d_tbl[i_d].addr = L1_DATA_A_START;
|
||||
d_tbl[i_d++].data = L1_DMEMORY | PAGE_SIZE_4MB;
|
||||
}
|
||||
i_tbl[i_i].addr = L1_CODE_START;
|
||||
i_tbl[i_i++].data = L1_IMEMORY | PAGE_SIZE_4MB;
|
||||
}
|
||||
i_tbl[i_i].addr = L1_CODE_START;
|
||||
i_tbl[i_i++].data = L1_IMEMORY | PAGE_SIZE_4MB;
|
||||
|
||||
#ifdef CONFIG_SMP
|
||||
else {
|
||||
if (L1_DATA_A_LENGTH || L1_DATA_B_LENGTH) {
|
||||
d_tbl[i_d].addr = COREB_L1_DATA_A_START;
|
||||
d_tbl[i_d++].data = L1_DMEMORY | PAGE_SIZE_4MB;
|
||||
}
|
||||
i_tbl[i_i].addr = COREB_L1_CODE_START;
|
||||
i_tbl[i_i++].data = L1_IMEMORY | PAGE_SIZE_4MB;
|
||||
}
|
||||
#endif
|
||||
first_switched_dcplb = i_d;
|
||||
first_switched_icplb = i_i;
|
||||
|
||||
|
@ -361,7 +361,7 @@ static inline
|
||||
int in_mem_const(unsigned long addr, unsigned long size,
|
||||
unsigned long const_addr, unsigned long const_size)
|
||||
{
|
||||
return in_mem_const_off(addr, 0, size, const_addr, const_size);
|
||||
return in_mem_const_off(addr, size, 0, const_addr, const_size);
|
||||
}
|
||||
#define IN_ASYNC(bnum, bctlnum) \
|
||||
({ \
|
||||
@ -390,13 +390,13 @@ int bfin_mem_access_type(unsigned long addr, unsigned long size)
|
||||
if (in_mem_const(addr, size, L1_DATA_B_START, L1_DATA_B_LENGTH))
|
||||
return cpu == 0 ? BFIN_MEM_ACCESS_CORE : BFIN_MEM_ACCESS_IDMA;
|
||||
#ifdef COREB_L1_CODE_START
|
||||
if (in_mem_const(addr, size, COREB_L1_CODE_START, L1_CODE_LENGTH))
|
||||
if (in_mem_const(addr, size, COREB_L1_CODE_START, COREB_L1_CODE_LENGTH))
|
||||
return cpu == 1 ? BFIN_MEM_ACCESS_ITEST : BFIN_MEM_ACCESS_IDMA;
|
||||
if (in_mem_const(addr, size, COREB_L1_SCRATCH_START, L1_SCRATCH_LENGTH))
|
||||
return cpu == 1 ? BFIN_MEM_ACCESS_CORE_ONLY : -EFAULT;
|
||||
if (in_mem_const(addr, size, COREB_L1_DATA_A_START, L1_DATA_A_LENGTH))
|
||||
if (in_mem_const(addr, size, COREB_L1_DATA_A_START, COREB_L1_DATA_A_LENGTH))
|
||||
return cpu == 1 ? BFIN_MEM_ACCESS_CORE : BFIN_MEM_ACCESS_IDMA;
|
||||
if (in_mem_const(addr, size, COREB_L1_DATA_B_START, L1_DATA_B_LENGTH))
|
||||
if (in_mem_const(addr, size, COREB_L1_DATA_B_START, COREB_L1_DATA_B_LENGTH))
|
||||
return cpu == 1 ? BFIN_MEM_ACCESS_CORE : BFIN_MEM_ACCESS_IDMA;
|
||||
#endif
|
||||
if (in_mem_const(addr, size, L2_START, L2_LENGTH))
|
||||
@ -472,13 +472,13 @@ int _access_ok(unsigned long addr, unsigned long size)
|
||||
if (in_mem_const_off(addr, size, _ebss_b_l1 - _sdata_b_l1, L1_DATA_B_START, L1_DATA_B_LENGTH))
|
||||
return 1;
|
||||
#ifdef COREB_L1_CODE_START
|
||||
if (in_mem_const(addr, size, COREB_L1_CODE_START, L1_CODE_LENGTH))
|
||||
if (in_mem_const(addr, size, COREB_L1_CODE_START, COREB_L1_CODE_LENGTH))
|
||||
return 1;
|
||||
if (in_mem_const(addr, size, COREB_L1_SCRATCH_START, L1_SCRATCH_LENGTH))
|
||||
return 1;
|
||||
if (in_mem_const(addr, size, COREB_L1_DATA_A_START, L1_DATA_A_LENGTH))
|
||||
if (in_mem_const(addr, size, COREB_L1_DATA_A_START, COREB_L1_DATA_A_LENGTH))
|
||||
return 1;
|
||||
if (in_mem_const(addr, size, COREB_L1_DATA_B_START, L1_DATA_B_LENGTH))
|
||||
if (in_mem_const(addr, size, COREB_L1_DATA_B_START, COREB_L1_DATA_B_LENGTH))
|
||||
return 1;
|
||||
#endif
|
||||
if (in_mem_const_off(addr, size, _ebss_l2 - _stext_l2, L2_START, L2_LENGTH))
|
||||
|
@ -31,7 +31,6 @@
|
||||
#include <linux/sched.h>
|
||||
#include <linux/mm.h>
|
||||
#include <linux/smp.h>
|
||||
#include <linux/smp_lock.h>
|
||||
#include <linux/errno.h>
|
||||
#include <linux/ptrace.h>
|
||||
#include <linux/user.h>
|
||||
|
@ -168,7 +168,6 @@ void __cpuinit bfin_setup_cpudata(unsigned int cpu)
|
||||
struct blackfin_cpudata *cpudata = &per_cpu(cpu_data, cpu);
|
||||
|
||||
cpudata->idle = current;
|
||||
cpudata->loops_per_jiffy = loops_per_jiffy;
|
||||
cpudata->imemctl = bfin_read_IMEM_CONTROL();
|
||||
cpudata->dmemctl = bfin_read_DMEM_CONTROL();
|
||||
}
|
||||
@ -408,13 +407,14 @@ static void __init print_memory_map(char *who)
|
||||
bfin_memmap.map[i].addr + bfin_memmap.map[i].size);
|
||||
switch (bfin_memmap.map[i].type) {
|
||||
case BFIN_MEMMAP_RAM:
|
||||
printk("(usable)\n");
|
||||
break;
|
||||
printk(KERN_CONT "(usable)\n");
|
||||
break;
|
||||
case BFIN_MEMMAP_RESERVED:
|
||||
printk("(reserved)\n");
|
||||
break;
|
||||
default: printk("type %lu\n", bfin_memmap.map[i].type);
|
||||
break;
|
||||
printk(KERN_CONT "(reserved)\n");
|
||||
break;
|
||||
default:
|
||||
printk(KERN_CONT "type %lu\n", bfin_memmap.map[i].type);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -567,17 +567,23 @@ static __init void memory_setup(void)
|
||||
# endif /* ANOMALY_05000263 */
|
||||
# endif /* CONFIG_ROMFS_FS */
|
||||
|
||||
memory_end -= mtd_size;
|
||||
/* Since the default MTD_UCLINUX has no magic number, we just blindly
|
||||
* read 8 past the end of the kernel's image, and look at it.
|
||||
* When no image is attached, mtd_size is set to a random number
|
||||
* Do some basic sanity checks before operating on things
|
||||
*/
|
||||
if (mtd_size == 0 || memory_end <= mtd_size) {
|
||||
pr_emerg("Could not find valid ram mtd attached.\n");
|
||||
} else {
|
||||
memory_end -= mtd_size;
|
||||
|
||||
if (mtd_size == 0) {
|
||||
console_init();
|
||||
panic("Don't boot kernel without rootfs attached.");
|
||||
/* Relocate MTD image to the top of memory after the uncached memory area */
|
||||
uclinux_ram_map.phys = memory_mtd_start = memory_end;
|
||||
uclinux_ram_map.size = mtd_size;
|
||||
pr_info("Found mtd parition at 0x%p, (len=0x%lx), moving to 0x%p\n",
|
||||
_end, mtd_size, (void *)memory_mtd_start);
|
||||
dma_memcpy((void *)uclinux_ram_map.phys, _end, uclinux_ram_map.size);
|
||||
}
|
||||
|
||||
/* Relocate MTD image to the top of memory after the uncached memory area */
|
||||
uclinux_ram_map.phys = memory_mtd_start = memory_end;
|
||||
uclinux_ram_map.size = mtd_size;
|
||||
dma_memcpy((void *)uclinux_ram_map.phys, _end, uclinux_ram_map.size);
|
||||
#endif /* CONFIG_MTD_UCLINUX */
|
||||
|
||||
#if (defined(CONFIG_BFIN_EXTMEM_ICACHEABLE) && ANOMALY_05000263)
|
||||
@ -614,19 +620,19 @@ static __init void memory_setup(void)
|
||||
printk(KERN_INFO "Kernel Managed Memory: %ldMB\n", _ramend >> 20);
|
||||
|
||||
printk(KERN_INFO "Memory map:\n"
|
||||
KERN_INFO " fixedcode = 0x%p-0x%p\n"
|
||||
KERN_INFO " text = 0x%p-0x%p\n"
|
||||
KERN_INFO " rodata = 0x%p-0x%p\n"
|
||||
KERN_INFO " bss = 0x%p-0x%p\n"
|
||||
KERN_INFO " data = 0x%p-0x%p\n"
|
||||
KERN_INFO " stack = 0x%p-0x%p\n"
|
||||
KERN_INFO " init = 0x%p-0x%p\n"
|
||||
KERN_INFO " available = 0x%p-0x%p\n"
|
||||
" fixedcode = 0x%p-0x%p\n"
|
||||
" text = 0x%p-0x%p\n"
|
||||
" rodata = 0x%p-0x%p\n"
|
||||
" bss = 0x%p-0x%p\n"
|
||||
" data = 0x%p-0x%p\n"
|
||||
" stack = 0x%p-0x%p\n"
|
||||
" init = 0x%p-0x%p\n"
|
||||
" available = 0x%p-0x%p\n"
|
||||
#ifdef CONFIG_MTD_UCLINUX
|
||||
KERN_INFO " rootfs = 0x%p-0x%p\n"
|
||||
" rootfs = 0x%p-0x%p\n"
|
||||
#endif
|
||||
#if DMA_UNCACHED_REGION > 0
|
||||
KERN_INFO " DMA Zone = 0x%p-0x%p\n"
|
||||
" DMA Zone = 0x%p-0x%p\n"
|
||||
#endif
|
||||
, (void *)FIXED_CODE_START, (void *)FIXED_CODE_END,
|
||||
_stext, _etext,
|
||||
@ -859,20 +865,13 @@ void __init setup_arch(char **cmdline_p)
|
||||
#endif
|
||||
printk(KERN_INFO "Hardware Trace ");
|
||||
if (bfin_read_TBUFCTL() & 0x1)
|
||||
printk("Active ");
|
||||
printk(KERN_CONT "Active ");
|
||||
else
|
||||
printk("Off ");
|
||||
printk(KERN_CONT "Off ");
|
||||
if (bfin_read_TBUFCTL() & 0x2)
|
||||
printk("and Enabled\n");
|
||||
printk(KERN_CONT "and Enabled\n");
|
||||
else
|
||||
printk("and Disabled\n");
|
||||
|
||||
#if defined(CONFIG_CHR_DEV_FLASH) || defined(CONFIG_BLK_DEV_FLASH)
|
||||
/* we need to initialize the Flashrom device here since we might
|
||||
* do things with flash early on in the boot
|
||||
*/
|
||||
flash_probe();
|
||||
#endif
|
||||
printk(KERN_CONT "and Disabled\n");
|
||||
|
||||
printk(KERN_INFO "Boot Mode: %i\n", bfin_read_SYSCR() & 0xF);
|
||||
|
||||
@ -937,10 +936,6 @@ void __init setup_arch(char **cmdline_p)
|
||||
CPU, bfin_revid());
|
||||
}
|
||||
|
||||
/* We can't run on BF548-0.1 due to ANOMALY 05000448 */
|
||||
if (bfin_cpuid() == 0x27de && bfin_revid() == 1)
|
||||
panic("You can't run on this processor due to 05000448");
|
||||
|
||||
printk(KERN_INFO "Blackfin Linux support by http://blackfin.uclinux.org/\n");
|
||||
|
||||
printk(KERN_INFO "Processor Speed: %lu MHz core clock and %lu MHz System Clock\n",
|
||||
@ -1163,9 +1158,9 @@ static int show_cpuinfo(struct seq_file *m, void *v)
|
||||
sclk/1000000, sclk%1000000);
|
||||
seq_printf(m, "bogomips\t: %lu.%02lu\n"
|
||||
"Calibration\t: %lu loops\n",
|
||||
(cpudata->loops_per_jiffy * HZ) / 500000,
|
||||
((cpudata->loops_per_jiffy * HZ) / 5000) % 100,
|
||||
(cpudata->loops_per_jiffy * HZ));
|
||||
(loops_per_jiffy * HZ) / 500000,
|
||||
((loops_per_jiffy * HZ) / 5000) % 100,
|
||||
(loops_per_jiffy * HZ));
|
||||
|
||||
/* Check Cache configutation */
|
||||
switch (cpudata->dmemctl & (1 << DMC0_P | 1 << DMC1_P)) {
|
||||
|
@ -29,7 +29,6 @@
|
||||
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#include <linux/smp_lock.h>
|
||||
#include <linux/spinlock.h>
|
||||
#include <linux/sem.h>
|
||||
#include <linux/msg.h>
|
||||
|
@ -212,7 +212,7 @@ asmlinkage void double_fault_c(struct pt_regs *fp)
|
||||
console_verbose();
|
||||
oops_in_progress = 1;
|
||||
#ifdef CONFIG_DEBUG_VERBOSE
|
||||
printk(KERN_EMERG "\n" KERN_EMERG "Double Fault\n");
|
||||
printk(KERN_EMERG "Double Fault\n");
|
||||
#ifdef CONFIG_DEBUG_DOUBLEFAULT_PRINT
|
||||
if (((long)fp->seqstat & SEQSTAT_EXCAUSE) == VEC_UNCOV) {
|
||||
unsigned int cpu = smp_processor_id();
|
||||
@ -570,11 +570,12 @@ asmlinkage void trap_c(struct pt_regs *fp)
|
||||
if (kernel_mode_regs(fp) || (current && !current->mm)) {
|
||||
console_verbose();
|
||||
oops_in_progress = 1;
|
||||
if (strerror)
|
||||
verbose_printk(strerror);
|
||||
}
|
||||
|
||||
if (sig != SIGTRAP) {
|
||||
if (strerror)
|
||||
verbose_printk(strerror);
|
||||
|
||||
dump_bfin_process(fp);
|
||||
dump_bfin_mem(fp);
|
||||
show_regs(fp);
|
||||
@ -583,15 +584,14 @@ asmlinkage void trap_c(struct pt_regs *fp)
|
||||
#ifndef CONFIG_DEBUG_BFIN_NO_KERN_HWTRACE
|
||||
if (trapnr == VEC_CPLB_I_M || trapnr == VEC_CPLB_M)
|
||||
verbose_printk(KERN_NOTICE "No trace since you do not have "
|
||||
"CONFIG_DEBUG_BFIN_NO_KERN_HWTRACE enabled\n"
|
||||
KERN_NOTICE "\n");
|
||||
"CONFIG_DEBUG_BFIN_NO_KERN_HWTRACE enabled\n\n");
|
||||
else
|
||||
#endif
|
||||
dump_bfin_trace_buffer();
|
||||
|
||||
if (oops_in_progress) {
|
||||
/* Dump the current kernel stack */
|
||||
verbose_printk(KERN_NOTICE "\n" KERN_NOTICE "Kernel Stack\n");
|
||||
verbose_printk(KERN_NOTICE "Kernel Stack\n");
|
||||
show_stack(current, NULL);
|
||||
print_modules();
|
||||
#ifndef CONFIG_ACCESS_CHECK
|
||||
@ -620,7 +620,9 @@ asmlinkage void trap_c(struct pt_regs *fp)
|
||||
force_sig_info(sig, &info, current);
|
||||
}
|
||||
|
||||
if (ANOMALY_05000461 && trapnr == VEC_HWERR && !access_ok(VERIFY_READ, fp->pc, 8))
|
||||
if ((ANOMALY_05000461 && trapnr == VEC_HWERR && !access_ok(VERIFY_READ, fp->pc, 8)) ||
|
||||
(ANOMALY_05000281 && trapnr == VEC_HWERR) ||
|
||||
(ANOMALY_05000189 && (trapnr == VEC_CPLB_I_VL || trapnr == VEC_CPLB_VL)))
|
||||
fp->pc = SAFE_USER_INSTRUCTION;
|
||||
|
||||
traps_done:
|
||||
@ -906,7 +908,7 @@ void show_stack(struct task_struct *task, unsigned long *stack)
|
||||
|
||||
ret_addr = 0;
|
||||
if (!j && i % 8 == 0)
|
||||
printk("\n" KERN_NOTICE "%p:",addr);
|
||||
printk(KERN_NOTICE "%p:",addr);
|
||||
|
||||
/* if it is an odd address, or zero, just skip it */
|
||||
if (*addr & 0x1 || !*addr)
|
||||
@ -996,9 +998,9 @@ void dump_bfin_process(struct pt_regs *fp)
|
||||
|
||||
printk(KERN_NOTICE "CPU = %d\n", current_thread_info()->cpu);
|
||||
if (!((unsigned long)current->mm & 0x3) && (unsigned long)current->mm >= FIXED_CODE_START)
|
||||
verbose_printk(KERN_NOTICE "TEXT = 0x%p-0x%p DATA = 0x%p-0x%p\n"
|
||||
KERN_NOTICE " BSS = 0x%p-0x%p USER-STACK = 0x%p\n"
|
||||
KERN_NOTICE "\n",
|
||||
verbose_printk(KERN_NOTICE
|
||||
"TEXT = 0x%p-0x%p DATA = 0x%p-0x%p\n"
|
||||
" BSS = 0x%p-0x%p USER-STACK = 0x%p\n\n",
|
||||
(void *)current->mm->start_code,
|
||||
(void *)current->mm->end_code,
|
||||
(void *)current->mm->start_data,
|
||||
@ -1009,8 +1011,8 @@ void dump_bfin_process(struct pt_regs *fp)
|
||||
else
|
||||
verbose_printk(KERN_NOTICE "invalid mm\n");
|
||||
} else
|
||||
verbose_printk(KERN_NOTICE "\n" KERN_NOTICE
|
||||
"No Valid process in current context\n");
|
||||
verbose_printk(KERN_NOTICE
|
||||
"No Valid process in current context\n");
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -1028,7 +1030,7 @@ void dump_bfin_mem(struct pt_regs *fp)
|
||||
addr < (unsigned short *)((unsigned long)erraddr & ~0xF) + 0x10;
|
||||
addr++) {
|
||||
if (!((unsigned long)addr & 0xF))
|
||||
verbose_printk("\n" KERN_NOTICE "0x%p: ", addr);
|
||||
verbose_printk(KERN_NOTICE "0x%p: ", addr);
|
||||
|
||||
if (!get_instruction(&val, addr)) {
|
||||
val = 0;
|
||||
@ -1056,9 +1058,9 @@ void dump_bfin_mem(struct pt_regs *fp)
|
||||
oops_in_progress)){
|
||||
verbose_printk(KERN_NOTICE "Looks like this was a deferred error - sorry\n");
|
||||
#ifndef CONFIG_DEBUG_HWERR
|
||||
verbose_printk(KERN_NOTICE "The remaining message may be meaningless\n"
|
||||
KERN_NOTICE "You should enable CONFIG_DEBUG_HWERR to get a"
|
||||
" better idea where it came from\n");
|
||||
verbose_printk(KERN_NOTICE
|
||||
"The remaining message may be meaningless\n"
|
||||
"You should enable CONFIG_DEBUG_HWERR to get a better idea where it came from\n");
|
||||
#else
|
||||
/* If we are handling only one peripheral interrupt
|
||||
* and current mm and pid are valid, and the last error
|
||||
@ -1114,9 +1116,10 @@ void show_regs(struct pt_regs *fp)
|
||||
|
||||
verbose_printk(KERN_NOTICE "%s", linux_banner);
|
||||
|
||||
verbose_printk(KERN_NOTICE "\n" KERN_NOTICE "SEQUENCER STATUS:\t\t%s\n", print_tainted());
|
||||
verbose_printk(KERN_NOTICE "\nSEQUENCER STATUS:\t\t%s\n",
|
||||
print_tainted());
|
||||
verbose_printk(KERN_NOTICE " SEQSTAT: %08lx IPEND: %04lx SYSCFG: %04lx\n",
|
||||
(long)fp->seqstat, fp->ipend, fp->syscfg);
|
||||
(long)fp->seqstat, fp->ipend, fp->syscfg);
|
||||
if ((fp->seqstat & SEQSTAT_EXCAUSE) == VEC_HWERR) {
|
||||
verbose_printk(KERN_NOTICE " HWERRCAUSE: 0x%lx\n",
|
||||
(fp->seqstat & SEQSTAT_HWERRCAUSE) >> 14);
|
||||
@ -1184,7 +1187,7 @@ unlock:
|
||||
verbose_printk(KERN_NOTICE "ICPLB_FAULT_ADDR: %s\n", buf);
|
||||
}
|
||||
|
||||
verbose_printk(KERN_NOTICE "\n" KERN_NOTICE "PROCESSOR STATE:\n");
|
||||
verbose_printk(KERN_NOTICE "PROCESSOR STATE:\n");
|
||||
verbose_printk(KERN_NOTICE " R0 : %08lx R1 : %08lx R2 : %08lx R3 : %08lx\n",
|
||||
fp->r0, fp->r1, fp->r2, fp->r3);
|
||||
verbose_printk(KERN_NOTICE " R4 : %08lx R5 : %08lx R6 : %08lx R7 : %08lx\n",
|
||||
|
@ -27,21 +27,7 @@
|
||||
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#define BITS_PER_UNIT 8
|
||||
|
||||
typedef int SItype __attribute__ ((mode(SI)));
|
||||
typedef unsigned int USItype __attribute__ ((mode(SI)));
|
||||
typedef int DItype __attribute__ ((mode(DI)));
|
||||
typedef int word_type __attribute__ ((mode(__word__)));
|
||||
|
||||
struct DIstruct {
|
||||
SItype high, low;
|
||||
};
|
||||
|
||||
typedef union {
|
||||
struct DIstruct s;
|
||||
DItype ll;
|
||||
} DIunion;
|
||||
#include "gcclib.h"
|
||||
|
||||
#ifdef CONFIG_ARITHMETIC_OPS_L1
|
||||
DItype __lshrdi3(DItype u, word_type b)__attribute__((l1_text));
|
||||
|
@ -534,7 +534,7 @@ static struct platform_device i2c_bfin_twi_device = {
|
||||
#endif
|
||||
|
||||
static struct i2c_board_info __initdata bfin_i2c_board_info[] = {
|
||||
#if defined(CONFIG_BFIN_TWI_LCD) || defined(CONFIG_TWI_LCD_MODULE)
|
||||
#if defined(CONFIG_BFIN_TWI_LCD) || defined(CONFIG_BFIN_TWI_LCD_MODULE)
|
||||
{
|
||||
I2C_BOARD_INFO("pcf8574_lcd", 0x22),
|
||||
},
|
||||
|
@ -82,6 +82,7 @@
|
||||
#define ANOMALY_05000179 (0)
|
||||
#define ANOMALY_05000182 (0)
|
||||
#define ANOMALY_05000183 (0)
|
||||
#define ANOMALY_05000189 (0)
|
||||
#define ANOMALY_05000198 (0)
|
||||
#define ANOMALY_05000202 (0)
|
||||
#define ANOMALY_05000215 (0)
|
||||
@ -117,6 +118,7 @@
|
||||
#define ANOMALY_05000357 (0)
|
||||
#define ANOMALY_05000362 (1)
|
||||
#define ANOMALY_05000363 (0)
|
||||
#define ANOMALY_05000364 (0)
|
||||
#define ANOMALY_05000371 (0)
|
||||
#define ANOMALY_05000380 (0)
|
||||
#define ANOMALY_05000386 (0)
|
||||
|
@ -53,7 +53,7 @@
|
||||
#define UART_SET_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) | DLAB); SSYNC(); } while (0)
|
||||
#define UART_CLEAR_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) & ~DLAB); SSYNC(); } while (0)
|
||||
|
||||
#define UART_GET_CTS(x) (!gpio_get_value(x->cts_pin))
|
||||
#define UART_GET_CTS(x) gpio_get_value(x->cts_pin)
|
||||
#define UART_DISABLE_RTS(x) gpio_set_value(x->rts_pin, 1)
|
||||
#define UART_ENABLE_RTS(x) gpio_set_value(x->rts_pin, 0)
|
||||
#define UART_ENABLE_INTS(x, v) UART_PUT_IER(x, v)
|
||||
|
@ -793,7 +793,7 @@ static struct platform_device i2c_bfin_twi_device = {
|
||||
#endif
|
||||
|
||||
static struct i2c_board_info __initdata bfin_i2c_board_info[] = {
|
||||
#if defined(CONFIG_BFIN_TWI_LCD) || defined(CONFIG_TWI_LCD_MODULE)
|
||||
#if defined(CONFIG_BFIN_TWI_LCD) || defined(CONFIG_BFIN_TWI_LCD_MODULE)
|
||||
{
|
||||
I2C_BOARD_INFO("pcf8574_lcd", 0x22),
|
||||
.type = "pcf8574_lcd",
|
||||
|
@ -591,7 +591,7 @@ static struct platform_device i2c_bfin_twi_device = {
|
||||
#endif
|
||||
|
||||
static struct i2c_board_info __initdata bfin_i2c_board_info[] = {
|
||||
#if defined(CONFIG_BFIN_TWI_LCD) || defined(CONFIG_TWI_LCD_MODULE)
|
||||
#if defined(CONFIG_BFIN_TWI_LCD) || defined(CONFIG_BFIN_TWI_LCD_MODULE)
|
||||
{
|
||||
I2C_BOARD_INFO("pcf8574_lcd", 0x22),
|
||||
},
|
||||
|
@ -858,7 +858,7 @@ static struct platform_device i2c_bfin_twi_device = {
|
||||
#endif
|
||||
|
||||
static struct i2c_board_info __initdata bfin_i2c_board_info[] = {
|
||||
#if defined(CONFIG_BFIN_TWI_LCD) || defined(CONFIG_TWI_LCD_MODULE)
|
||||
#if defined(CONFIG_BFIN_TWI_LCD) || defined(CONFIG_BFIN_TWI_LCD_MODULE)
|
||||
{
|
||||
I2C_BOARD_INFO("pcf8574_lcd", 0x22),
|
||||
},
|
||||
|
@ -176,6 +176,8 @@
|
||||
#define ANOMALY_05000443 (1)
|
||||
/* The WURESET Bit in the SYSCR Register is not Functional */
|
||||
#define ANOMALY_05000445 (1)
|
||||
/* USB DMA Short Packet Data Corruption */
|
||||
#define ANOMALY_05000450 (1)
|
||||
/* BCODE_QUICKBOOT, BCODE_ALLBOOT, and BCODE_FULLBOOT Settings in SYSCR Register Not Functional */
|
||||
#define ANOMALY_05000451 (1)
|
||||
/* Incorrect Default Hysteresis Setting for RESET, NMI, and BMODE Signals */
|
||||
@ -201,6 +203,7 @@
|
||||
#define ANOMALY_05000179 (0)
|
||||
#define ANOMALY_05000182 (0)
|
||||
#define ANOMALY_05000183 (0)
|
||||
#define ANOMALY_05000189 (0)
|
||||
#define ANOMALY_05000198 (0)
|
||||
#define ANOMALY_05000202 (0)
|
||||
#define ANOMALY_05000215 (0)
|
||||
@ -238,6 +241,5 @@
|
||||
#define ANOMALY_05000412 (0)
|
||||
#define ANOMALY_05000447 (0)
|
||||
#define ANOMALY_05000448 (0)
|
||||
#define ANOMALY_05000450 (0)
|
||||
|
||||
#endif
|
||||
|
@ -53,7 +53,7 @@
|
||||
#define UART_SET_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) | DLAB); SSYNC(); } while (0)
|
||||
#define UART_CLEAR_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) & ~DLAB); SSYNC(); } while (0)
|
||||
|
||||
#define UART_GET_CTS(x) (!gpio_get_value(x->cts_pin))
|
||||
#define UART_GET_CTS(x) gpio_get_value(x->cts_pin)
|
||||
#define UART_DISABLE_RTS(x) gpio_set_value(x->rts_pin, 1)
|
||||
#define UART_ENABLE_RTS(x) gpio_set_value(x->rts_pin, 0)
|
||||
#define UART_ENABLE_INTS(x, v) UART_PUT_IER(x, v)
|
||||
|
@ -453,7 +453,7 @@ static struct i2c_board_info __initdata bfin_i2c_board_info[] = {
|
||||
.irq = 39,
|
||||
},
|
||||
#endif
|
||||
#if defined(CONFIG_BFIN_TWI_LCD) || defined(CONFIG_TWI_LCD_MODULE)
|
||||
#if defined(CONFIG_BFIN_TWI_LCD) || defined(CONFIG_BFIN_TWI_LCD_MODULE)
|
||||
{
|
||||
I2C_BOARD_INFO("pcf8574_lcd", 0x22),
|
||||
},
|
||||
|
@ -335,6 +335,7 @@
|
||||
#define ANOMALY_05000323 (0)
|
||||
#define ANOMALY_05000353 (1)
|
||||
#define ANOMALY_05000362 (1)
|
||||
#define ANOMALY_05000364 (0)
|
||||
#define ANOMALY_05000380 (0)
|
||||
#define ANOMALY_05000386 (1)
|
||||
#define ANOMALY_05000389 (0)
|
||||
|
@ -53,7 +53,7 @@
|
||||
#define UART_SET_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) | DLAB); SSYNC(); } while (0)
|
||||
#define UART_CLEAR_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) & ~DLAB); SSYNC(); } while (0)
|
||||
|
||||
#define UART_GET_CTS(x) (!gpio_get_value(x->cts_pin))
|
||||
#define UART_GET_CTS(x) gpio_get_value(x->cts_pin)
|
||||
#define UART_DISABLE_RTS(x) gpio_set_value(x->rts_pin, 1)
|
||||
#define UART_ENABLE_RTS(x) gpio_set_value(x->rts_pin, 0)
|
||||
#define UART_ENABLE_INTS(x, v) UART_PUT_IER(x, v)
|
||||
|
@ -1313,10 +1313,10 @@ static struct i2c_board_info __initdata bfin_i2c_board_info[] = {
|
||||
#if defined(CONFIG_JOYSTICK_AD7142) || defined(CONFIG_JOYSTICK_AD7142_MODULE)
|
||||
{
|
||||
I2C_BOARD_INFO("ad7142_joystick", 0x2C),
|
||||
.irq = IRQ_PF5,
|
||||
.irq = IRQ_PG5,
|
||||
},
|
||||
#endif
|
||||
#if defined(CONFIG_BFIN_TWI_LCD) || defined(CONFIG_TWI_LCD_MODULE)
|
||||
#if defined(CONFIG_BFIN_TWI_LCD) || defined(CONFIG_BFIN_TWI_LCD_MODULE)
|
||||
{
|
||||
I2C_BOARD_INFO("pcf8574_lcd", 0x22),
|
||||
},
|
||||
|
@ -167,6 +167,7 @@
|
||||
#define ANOMALY_05000179 (0)
|
||||
#define ANOMALY_05000182 (0)
|
||||
#define ANOMALY_05000183 (0)
|
||||
#define ANOMALY_05000189 (0)
|
||||
#define ANOMALY_05000198 (0)
|
||||
#define ANOMALY_05000202 (0)
|
||||
#define ANOMALY_05000215 (0)
|
||||
@ -186,6 +187,7 @@
|
||||
#define ANOMALY_05000353 (1)
|
||||
#define ANOMALY_05000362 (1)
|
||||
#define ANOMALY_05000363 (0)
|
||||
#define ANOMALY_05000364 (0)
|
||||
#define ANOMALY_05000380 (0)
|
||||
#define ANOMALY_05000386 (1)
|
||||
#define ANOMALY_05000389 (0)
|
||||
|
@ -53,7 +53,7 @@
|
||||
#define UART_SET_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) | DLAB); SSYNC(); } while (0)
|
||||
#define UART_CLEAR_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) & ~DLAB); SSYNC(); } while (0)
|
||||
|
||||
#define UART_GET_CTS(x) (!gpio_get_value(x->cts_pin))
|
||||
#define UART_GET_CTS(x) gpio_get_value(x->cts_pin)
|
||||
#define UART_DISABLE_RTS(x) gpio_set_value(x->rts_pin, 1)
|
||||
#define UART_ENABLE_RTS(x) gpio_set_value(x->rts_pin, 0)
|
||||
#define UART_ENABLE_INTS(x, v) UART_PUT_IER(x, v)
|
||||
|
@ -137,6 +137,7 @@
|
||||
#define ANOMALY_05000158 (0)
|
||||
#define ANOMALY_05000171 (0)
|
||||
#define ANOMALY_05000182 (0)
|
||||
#define ANOMALY_05000189 (0)
|
||||
#define ANOMALY_05000198 (0)
|
||||
#define ANOMALY_05000202 (0)
|
||||
#define ANOMALY_05000215 (0)
|
||||
@ -160,6 +161,7 @@
|
||||
#define ANOMALY_05000353 (1)
|
||||
#define ANOMALY_05000362 (1)
|
||||
#define ANOMALY_05000363 (0)
|
||||
#define ANOMALY_05000364 (0)
|
||||
#define ANOMALY_05000380 (0)
|
||||
#define ANOMALY_05000386 (1)
|
||||
#define ANOMALY_05000389 (0)
|
||||
|
@ -53,7 +53,7 @@
|
||||
#define UART_SET_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) | DLAB); SSYNC(); } while (0)
|
||||
#define UART_CLEAR_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) & ~DLAB); SSYNC(); } while (0)
|
||||
|
||||
#define UART_GET_CTS(x) (!gpio_get_value(x->cts_pin))
|
||||
#define UART_GET_CTS(x) gpio_get_value(x->cts_pin)
|
||||
#define UART_DISABLE_RTS(x) gpio_set_value(x->rts_pin, 1)
|
||||
#define UART_ENABLE_RTS(x) gpio_set_value(x->rts_pin, 0)
|
||||
#define UART_ENABLE_INTS(x, v) UART_PUT_IER(x, v)
|
||||
|
@ -864,7 +864,7 @@ static struct i2c_board_info __initdata bfin_i2c_board_info0[] = {
|
||||
|
||||
#if !defined(CONFIG_BF542) /* The BF542 only has 1 TWI */
|
||||
static struct i2c_board_info __initdata bfin_i2c_board_info1[] = {
|
||||
#if defined(CONFIG_BFIN_TWI_LCD) || defined(CONFIG_TWI_LCD_MODULE)
|
||||
#if defined(CONFIG_BFIN_TWI_LCD) || defined(CONFIG_BFIN_TWI_LCD_MODULE)
|
||||
{
|
||||
I2C_BOARD_INFO("pcf8574_lcd", 0x22),
|
||||
},
|
||||
|
@ -195,6 +195,7 @@
|
||||
#define ANOMALY_05000179 (0)
|
||||
#define ANOMALY_05000182 (0)
|
||||
#define ANOMALY_05000183 (0)
|
||||
#define ANOMALY_05000189 (0)
|
||||
#define ANOMALY_05000198 (0)
|
||||
#define ANOMALY_05000202 (0)
|
||||
#define ANOMALY_05000215 (0)
|
||||
@ -226,6 +227,7 @@
|
||||
#define ANOMALY_05000323 (0)
|
||||
#define ANOMALY_05000362 (1)
|
||||
#define ANOMALY_05000363 (0)
|
||||
#define ANOMALY_05000364 (0)
|
||||
#define ANOMALY_05000380 (0)
|
||||
#define ANOMALY_05000400 (0)
|
||||
#define ANOMALY_05000412 (0)
|
||||
|
@ -288,6 +288,7 @@
|
||||
#define ANOMALY_05000273 (0)
|
||||
#define ANOMALY_05000311 (0)
|
||||
#define ANOMALY_05000353 (1)
|
||||
#define ANOMALY_05000364 (0)
|
||||
#define ANOMALY_05000380 (0)
|
||||
#define ANOMALY_05000386 (1)
|
||||
#define ANOMALY_05000389 (0)
|
||||
|
@ -53,7 +53,7 @@
|
||||
#define UART_SET_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) | DLAB); SSYNC(); } while (0)
|
||||
#define UART_CLEAR_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) & ~DLAB); SSYNC(); } while (0)
|
||||
|
||||
#define UART_GET_CTS(x) (!gpio_get_value(x->cts_pin))
|
||||
#define UART_GET_CTS(x) gpio_get_value(x->cts_pin)
|
||||
#define UART_DISABLE_RTS(x) gpio_set_value(x->rts_pin, 1)
|
||||
#define UART_ENABLE_RTS(x) gpio_set_value(x->rts_pin, 0)
|
||||
#define UART_ENABLE_INTS(x, v) UART_PUT_IER(x, v)
|
||||
|
@ -37,7 +37,6 @@
|
||||
|
||||
/* Memory Map for ADSP-BF561 processors */
|
||||
|
||||
#ifdef CONFIG_BF561
|
||||
#define COREA_L1_CODE_START 0xFFA00000
|
||||
#define COREA_L1_DATA_A_START 0xFF800000
|
||||
#define COREA_L1_DATA_B_START 0xFF900000
|
||||
@ -74,6 +73,28 @@
|
||||
#define BFIN_DCACHESIZE (0*1024)
|
||||
#define BFIN_DSUPBANKS 0
|
||||
#endif /*CONFIG_BFIN_DCACHE*/
|
||||
|
||||
/*
|
||||
* If we are in SMP mode, then the cache settings of Core B will match
|
||||
* the settings of Core A. If we aren't, then we assume Core B is not
|
||||
* using any cache. This allows the rest of the kernel to work with
|
||||
* the core in either mode as we are only loading user code into it and
|
||||
* it is the user's problem to make sure they aren't doing something
|
||||
* stupid there.
|
||||
*
|
||||
* Note that we treat the L1 code region as a contiguous blob to make
|
||||
* the rest of the kernel simpler. Easier to check one region than a
|
||||
* bunch of small ones. Again, possible misbehavior here is the fault
|
||||
* of the user -- don't try to use memory that doesn't exist.
|
||||
*/
|
||||
#ifdef CONFIG_SMP
|
||||
# define COREB_L1_CODE_LENGTH L1_CODE_LENGTH
|
||||
# define COREB_L1_DATA_A_LENGTH L1_DATA_A_LENGTH
|
||||
# define COREB_L1_DATA_B_LENGTH L1_DATA_B_LENGTH
|
||||
#else
|
||||
# define COREB_L1_CODE_LENGTH 0x14000
|
||||
# define COREB_L1_DATA_A_LENGTH 0x8000
|
||||
# define COREB_L1_DATA_B_LENGTH 0x8000
|
||||
#endif
|
||||
|
||||
/* Level 2 Memory */
|
||||
|
@ -218,7 +218,7 @@ ENTRY(_ex_single_step)
|
||||
/* Single stepping only a single instruction, so clear the trace
|
||||
* bit here. */
|
||||
r7 = syscfg;
|
||||
bitclr (r7, 0);
|
||||
bitclr (r7, SYSCFG_SSSTEP_P);
|
||||
syscfg = R7;
|
||||
jump _ex_trap_c;
|
||||
|
||||
@ -251,7 +251,7 @@ ENTRY(_ex_single_step)
|
||||
if !cc jump _bfin_return_from_exception;
|
||||
|
||||
r7 = syscfg;
|
||||
bitclr (r7, 0);
|
||||
bitclr (r7, SYSCFG_SSSTEP_P); /* Turn off single step */
|
||||
syscfg = R7;
|
||||
|
||||
/* Fall through to _bfin_return_from_exception. */
|
||||
@ -342,9 +342,11 @@ ENTRY(_ex_trap_c)
|
||||
r6 = retx;
|
||||
[p5 + PDA_RETX] = r6;
|
||||
#endif
|
||||
/* Save the state of single stepping */
|
||||
r6 = SYSCFG;
|
||||
[p5 + PDA_SYSCFG] = r6;
|
||||
BITCLR(r6, 0);
|
||||
/* Clear it while we handle the exception in IRQ5 mode */
|
||||
BITCLR(r6, SYSCFG_SSSTEP_P);
|
||||
SYSCFG = r6;
|
||||
|
||||
/* Disable all interrupts, but make sure level 5 is enabled so
|
||||
@ -367,7 +369,7 @@ ENDPROC(_ex_trap_c)
|
||||
* exception. This is a unrecoverable event, so crash.
|
||||
* Note: this cannot be ENTRY() as we jump here with "if cc jump" ...
|
||||
*/
|
||||
_double_fault:
|
||||
ENTRY(_double_fault)
|
||||
/* Turn caches & protection off, to ensure we don't get any more
|
||||
* double exceptions
|
||||
*/
|
||||
@ -872,7 +874,7 @@ ENTRY(_ret_from_exception)
|
||||
raise 15; /* raise evt15 to do signal or reschedule */
|
||||
4:
|
||||
r0 = syscfg;
|
||||
bitclr(r0, 0);
|
||||
bitclr(r0, SYSCFG_SSSTEP_P); /* Turn off single step */
|
||||
syscfg = r0;
|
||||
5:
|
||||
rts;
|
||||
|
@ -211,6 +211,8 @@ int smp_call_function(void (*func)(void *info), void *info, int wait)
|
||||
return 0;
|
||||
|
||||
msg = kmalloc(sizeof(*msg), GFP_ATOMIC);
|
||||
if (!msg)
|
||||
return -ENOMEM;
|
||||
INIT_LIST_HEAD(&msg->list);
|
||||
msg->call_struct.func = func;
|
||||
msg->call_struct.info = info;
|
||||
@ -252,6 +254,8 @@ int smp_call_function_single(int cpuid, void (*func) (void *info), void *info,
|
||||
cpu_set(cpu, callmap);
|
||||
|
||||
msg = kmalloc(sizeof(*msg), GFP_ATOMIC);
|
||||
if (!msg)
|
||||
return -ENOMEM;
|
||||
INIT_LIST_HEAD(&msg->list);
|
||||
msg->call_struct.func = func;
|
||||
msg->call_struct.info = info;
|
||||
@ -287,6 +291,8 @@ void smp_send_reschedule(int cpu)
|
||||
return;
|
||||
|
||||
msg = kmalloc(sizeof(*msg), GFP_ATOMIC);
|
||||
if (!msg)
|
||||
return;
|
||||
memset(msg, 0, sizeof(msg));
|
||||
INIT_LIST_HEAD(&msg->list);
|
||||
msg->type = BFIN_IPI_RESCHEDULE;
|
||||
@ -314,6 +320,8 @@ void smp_send_stop(void)
|
||||
return;
|
||||
|
||||
msg = kmalloc(sizeof(*msg), GFP_ATOMIC);
|
||||
if (!msg)
|
||||
return;
|
||||
memset(msg, 0, sizeof(msg));
|
||||
INIT_LIST_HEAD(&msg->list);
|
||||
msg->type = BFIN_IPI_CPU_STOP;
|
||||
@ -450,7 +458,7 @@ void __init smp_cpus_done(unsigned int max_cpus)
|
||||
unsigned int cpu;
|
||||
|
||||
for_each_online_cpu(cpu)
|
||||
bogosum += per_cpu(cpu_data, cpu).loops_per_jiffy;
|
||||
bogosum += loops_per_jiffy;
|
||||
|
||||
printk(KERN_INFO "SMP: Total of %d processors activated "
|
||||
"(%lu.%02lu BogoMIPS).\n",
|
||||
|
@ -47,7 +47,7 @@ static inline void pte_free(struct mm_struct *mm, pgtable_t pte)
|
||||
__free_page(pte);
|
||||
}
|
||||
|
||||
#define __pte_free_tlb(tlb,pte) \
|
||||
#define __pte_free_tlb(tlb,pte,address) \
|
||||
do { \
|
||||
pgtable_page_dtor(pte); \
|
||||
tlb_remove_page((tlb), pte); \
|
||||
|
@ -50,8 +50,6 @@ struct thread_info {
|
||||
|
||||
/*
|
||||
* macros/functions for gaining access to the thread information structure
|
||||
*
|
||||
* preempt_count needs to be 1 initially, until the scheduler is functional.
|
||||
*/
|
||||
#ifndef __ASSEMBLY__
|
||||
#define INIT_THREAD_INFO(tsk) \
|
||||
@ -60,7 +58,7 @@ struct thread_info {
|
||||
.exec_domain = &default_exec_domain, \
|
||||
.flags = 0, \
|
||||
.cpu = 0, \
|
||||
.preempt_count = 1, \
|
||||
.preempt_count = INIT_PREEMPT_COUNT, \
|
||||
.addr_limit = KERNEL_DS, \
|
||||
.restart_block = { \
|
||||
.fn = do_no_restart_syscall, \
|
||||
|
@ -15,7 +15,6 @@
|
||||
#include <linux/mm.h>
|
||||
#include <linux/fs.h>
|
||||
#include <linux/smp.h>
|
||||
#include <linux/smp_lock.h>
|
||||
#include <linux/sem.h>
|
||||
#include <linux/msg.h>
|
||||
#include <linux/shm.h>
|
||||
|
@ -49,7 +49,7 @@ static inline void pte_free(struct mm_struct *mm, pgtable_t pte)
|
||||
__free_page(pte);
|
||||
}
|
||||
|
||||
#define __pte_free_tlb(tlb,pte) \
|
||||
#define __pte_free_tlb(tlb,pte,address) \
|
||||
do { \
|
||||
pgtable_page_dtor(pte); \
|
||||
tlb_remove_page((tlb),(pte)); \
|
||||
@ -62,7 +62,7 @@ do { \
|
||||
*/
|
||||
#define pmd_alloc_one(mm, addr) ({ BUG(); ((pmd_t *) 2); })
|
||||
#define pmd_free(mm, x) do { } while (0)
|
||||
#define __pmd_free_tlb(tlb,x) do { } while (0)
|
||||
#define __pmd_free_tlb(tlb,x,a) do { } while (0)
|
||||
|
||||
#endif /* CONFIG_MMU */
|
||||
|
||||
|
@ -225,7 +225,7 @@ static inline pud_t *pud_offset(pgd_t *pgd, unsigned long address)
|
||||
*/
|
||||
#define pud_alloc_one(mm, address) NULL
|
||||
#define pud_free(mm, x) do { } while (0)
|
||||
#define __pud_free_tlb(tlb, x) do { } while (0)
|
||||
#define __pud_free_tlb(tlb, x, address) do { } while (0)
|
||||
|
||||
/*
|
||||
* The "pud_xxx()" functions here are trivial for a folded two-level
|
||||
|
@ -56,8 +56,6 @@ struct thread_info {
|
||||
|
||||
/*
|
||||
* macros/functions for gaining access to the thread information structure
|
||||
*
|
||||
* preempt_count needs to be 1 initially, until the scheduler is functional.
|
||||
*/
|
||||
#ifndef __ASSEMBLY__
|
||||
|
||||
@ -67,7 +65,7 @@ struct thread_info {
|
||||
.exec_domain = &default_exec_domain, \
|
||||
.flags = 0, \
|
||||
.cpu = 0, \
|
||||
.preempt_count = 1, \
|
||||
.preempt_count = INIT_PREEMPT_COUNT, \
|
||||
.addr_limit = KERNEL_DS, \
|
||||
.restart_block = { \
|
||||
.fn = do_no_restart_syscall, \
|
||||
|
@ -36,7 +36,7 @@ struct thread_info {
|
||||
.exec_domain = &default_exec_domain, \
|
||||
.flags = 0, \
|
||||
.cpu = 0, \
|
||||
.preempt_count = 1, \
|
||||
.preempt_count = INIT_PREEMPT_COUNT, \
|
||||
.restart_block = { \
|
||||
.fn = do_no_restart_syscall, \
|
||||
}, \
|
||||
|
@ -6,6 +6,8 @@
|
||||
* David Mosberger-Tang <davidm@hpl.hp.com>
|
||||
*/
|
||||
|
||||
#include <linux/types.h>
|
||||
|
||||
/* floating point status register: */
|
||||
#define FPSR_TRAP_VD (1 << 0) /* invalid op trap disabled */
|
||||
#define FPSR_TRAP_DD (1 << 1) /* denormal trap disabled */
|
||||
|
@ -48,7 +48,7 @@ static inline void pud_free(struct mm_struct *mm, pud_t *pud)
|
||||
{
|
||||
quicklist_free(0, NULL, pud);
|
||||
}
|
||||
#define __pud_free_tlb(tlb, pud) pud_free((tlb)->mm, pud)
|
||||
#define __pud_free_tlb(tlb, pud, address) pud_free((tlb)->mm, pud)
|
||||
#endif /* CONFIG_PGTABLE_4 */
|
||||
|
||||
static inline void
|
||||
@ -67,7 +67,7 @@ static inline void pmd_free(struct mm_struct *mm, pmd_t *pmd)
|
||||
quicklist_free(0, NULL, pmd);
|
||||
}
|
||||
|
||||
#define __pmd_free_tlb(tlb, pmd) pmd_free((tlb)->mm, pmd)
|
||||
#define __pmd_free_tlb(tlb, pmd, address) pmd_free((tlb)->mm, pmd)
|
||||
|
||||
static inline void
|
||||
pmd_populate(struct mm_struct *mm, pmd_t * pmd_entry, pgtable_t pte)
|
||||
@ -117,6 +117,6 @@ static inline void check_pgt_cache(void)
|
||||
quicklist_trim(0, NULL, 25, 16);
|
||||
}
|
||||
|
||||
#define __pte_free_tlb(tlb, pte) pte_free((tlb)->mm, pte)
|
||||
#define __pte_free_tlb(tlb, pte, address) pte_free((tlb)->mm, pte)
|
||||
|
||||
#endif /* _ASM_IA64_PGALLOC_H */
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user