pandora-kernel.git
11 years agoab8500-charger: Run detect workaround only on AB8500
Rabin Vincent [Wed, 26 Sep 2012 11:36:38 +0000 (13:36 +0200)]
ab8500-charger: Run detect workaround only on AB8500

Only AB8500 has this hardware bug, so these works only need to be run
there.

Signed-off-by: Rabin Vincent <rabin.vincent@stericsson.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Reviewed-by: Marcus COOPER <marcus.xm.cooper@stericsson.com>
Reviewed-by: Martin SJOBLOM <martin.w.sjoblom@stericsson.com>
Reviewed-by: Jonas ABERG <jonas.aberg@stericsson.com>
11 years agopm2301-charger: Add pm_runtime_resume & pm_runtime_suspend
Lee Jones [Mon, 25 Feb 2013 14:28:59 +0000 (14:28 +0000)]
pm2301-charger: Add pm_runtime_resume & pm_runtime_suspend

To optimize the current consumption we use pm_runtime autosuspend
functions which execute the pm_runtime_suspend after a delay of
inactivity on the other hand we use pm_runtime_resume every time
we receive an interruption to wake up the pm2301.

Signed-off-by: M BenZoubeir <mustapha.ben.zoubeir-xsig@stericsson.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Reviewed-by: Philippe LANGLAIS <philippe.langlais@stericsson.com>
11 years agopm2301-charger: Adjust interrupt handler behavior
M BenZoubeir [Thu, 13 Sep 2012 08:34:18 +0000 (10:34 +0200)]
pm2301-charger: Adjust interrupt handler behavior

Signed-off-by: M BenZoubeir <mustapha.ben.zoubeir-xsig@stericsson.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Reviewed-by: Philippe LANGLAIS <philippe.langlais@stericsson.com>
11 years agoab8500-charger: Add UsbLineCtrl2 reference
Marcus Cooper [Wed, 29 Aug 2012 15:56:19 +0000 (17:56 +0200)]
ab8500-charger: Add UsbLineCtrl2 reference

When the state of USB Charge detection is changed then the calls
use a define for another register in other bank. This change
creates a new define for the correct register and removes the
magic numbers that are present.

Signed-off-by: Marcus Cooper <marcus.xm.cooper@stericsson.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Reviewed-by: Hakan BERG <hakan.berg@stericsson.com>
Reviewed-by: Jonas ABERG <jonas.aberg@stericsson.com>
11 years agoab8500-chargalg: Use hrtimer
Lee Jones [Wed, 13 Feb 2013 15:15:03 +0000 (15:15 +0000)]
ab8500-chargalg: Use hrtimer

Timers used for charging safety and maintenance must work even when
CPU power has collapsed. By using hrtimers with the realtime clock
the system is able to trigger an alarm that wakes-up the CPU and makes
it possible to handle events.

Allow a little slack time of 5 minutes for the hrtimers to allow CPU
to be woken-up in a more optimal power saving way. A 5 minute delay
to time-out timers relative to hours does not impact on safety.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
11 years agoabx500-chargalg: Prevent the watchdog from being kicked twice
Lee Jones [Wed, 13 Feb 2013 13:38:00 +0000 (13:38 +0000)]
abx500-chargalg: Prevent the watchdog from being kicked twice

Charging watchdog kicker work-thread gets started twice causing
'failed to kick watchdog' message after removing charger and
when re-inserting charger. This patch removes the superfluous
start of watchdog kicker-thread.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
11 years agoab8500-charger: Use USBLink1Status Register
Marcus Cooper [Thu, 30 Aug 2012 12:12:53 +0000 (14:12 +0200)]
ab8500-charger: Use USBLink1Status Register

The newer AB's such as the AB8505, AB9540 etc include a
USBLink1 Status register which detects a larger range of
external devices. This should be used instead of the
USBLine Status register.

Signed-off-by: Marcus Cooper <marcus.xm.cooper@stericsson.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Reviewed-by: Hakan BERG <hakan.berg@stericsson.com>
Reviewed-by: Jonas ABERG <jonas.aberg@stericsson.com>
Tested-by: Yang QU <yang.qu@stericsson.com>
11 years agoab8500-bm: Add support for the new ab8540 platform
Lee Jones [Wed, 29 Aug 2012 12:36:51 +0000 (20:36 +0800)]
ab8500-bm: Add support for the new ab8540 platform

Provide AB8540 platform specific information required to run the
Battery Management subsystem on AB8540 based devices. For this to
happen we see the introduction of separate platform specific data
structures and a means in which to process them.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
11 years agoab8500-btemp: Defer btemp filtering while initialising
Rupesh Kumar [Wed, 22 Aug 2012 09:44:22 +0000 (15:14 +0530)]
ab8500-btemp: Defer btemp filtering while initialising

Due to btemp filtering enabled during init, temp values reported
to charge algorithm driver started from 0. As a result,charge
algorithm was going into wrong state and charging was stopped.

Signed-off-by: Rupesh Kumar <rupesh.kumar@stericsson.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Reviewed-by: Marcus COOPER <marcus.xm.cooper@stericsson.com>
Reviewed-by: Martin SJOBLOM <martin.w.sjoblom@stericsson.com>
Reviewed-by: Philippe LANGLAIS <philippe.langlais@stericsson.com>
11 years agoab8500-bm: Add usb power path support
Lee Jones [Thu, 14 Feb 2013 12:39:15 +0000 (12:39 +0000)]
ab8500-bm: Add usb power path support

AB8540 supports power path function in USB charging mode for fast
power up with dead and weak battery, and it could extend
the battery age.

When USB charging starts, if the Vbattrue is below than SW cut off
voltage, power path and pre-charge should be enabled. If Vbattrue
is higher than SW cut off voltage, power path and pre-charge should
be disabled. This is to make sure full current to battery charge.
At the end of charge, power path should be enable again to reduce
charging the battery again.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
11 years agopm2301-charger: Always compile the PM2301 Charger driver with AB8500 Battery Mgnt
Marcus Cooper [Fri, 10 Aug 2012 10:59:06 +0000 (12:59 +0200)]
pm2301-charger: Always compile the PM2301 Charger driver with AB8500 Battery Mgnt

The PM2301 Charger should always be available when using the AB8500
Battery Management system, we're ensuring this will be the case.

Signed-off-by: Marcus Cooper <marcus.xm.cooper@stericsson.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Reviewed-by: Hakan BERG <hakan.berg@stericsson.com>
Reviewed-by: Mian Yousaf KAUKAB <mian.yousaf.kaukab@stericsson.com>
11 years agoab8500-charger: Add AB8505_USB_LINK_STATUS
Hakan Berg [Thu, 26 Jul 2012 09:10:35 +0000 (11:10 +0200)]
ab8500-charger: Add AB8505_USB_LINK_STATUS

The AB8505 does not have the same address for USB link-status
as has ab8500. Add AB8505_USB_LINK_STATUS and code to switch
to correct constant.

Signed-off-by: Hakan Berg <hakan.berg@stericsson.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Reviewed-by: Mian Yousaf KAUKAB <mian.yousaf.kaukab@stericsson.com>
Reviewed-by: Marcus COOPER <marcus.xm.cooper@stericsson.com>
Reviewed-by: Rabin VINCENT <rabin.vincent@stericsson.com>
11 years agoab8500-fg: Allow capacity to raise from 1% when charging
Hakan Berg [Mon, 23 Jul 2012 12:00:50 +0000 (14:00 +0200)]
ab8500-fg: Allow capacity to raise from 1% when charging

When battery capacity was going below 1% fg is not supposed
to report 0% unless we've got the LOW_BAT IRQ, no matter
what the FG-algorithm says. This made fg get stuck at 1% if
charger is connected when capacity is 1%.

Signed-off-by: Hakan BERG <hakan.berg@stericsson.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Reviewed-by: Marcus COOPER <marcus.xm.cooper@stericsson.com>
Reviewed-by: Srinidhi KASAGAR <srinidhi.kasagar@stericsson.com>
11 years agoab8500-btemp: Filter btemp readings
Hakan Berg [Tue, 17 Jul 2012 12:17:16 +0000 (14:17 +0200)]
ab8500-btemp: Filter btemp readings

Battery tempreature readings sometimes fail and results in
a value far from recent values. This patch adds a software
filter that disposes such readings, by allowing direct
updates on temperature only if two samples result in the
same temperature. Else only allow 1 degree change from previous
reported value in the direction of the new measurement.

Signed-off-by: Hakan Berg <hakan.berg@stericsson.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Reviewed-by: Marcus COOPER <marcus.xm.cooper@stericsson.com>
Reviewed-by: Martin SJOBLOM <martin.w.sjoblom@stericsson.com>
Reviewed-by: Rabin VINCENT <rabin.vincent@stericsson.com>
11 years agopm2301-charger: Wake system when ext charger is plugged-in
Rupesh Kumar [Thu, 28 Jun 2012 13:01:19 +0000 (18:31 +0530)]
pm2301-charger: Wake system when ext charger is plugged-in

When in suspend state, upon plug-in of external AC charger the
device needs to wake-up and charging operation started.

Signed-off-by: Rupesh Kumar <rupesh.kumar@stericsson.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Reviewed-by: Philippe LANGLAIS <philippe.langlais@stericsson.com>
11 years agopm2301-charger: Die temp thermal protection
Rupesh Kumar [Mon, 16 Jul 2012 07:15:19 +0000 (12:45 +0530)]
pm2301-charger: Die temp thermal protection

This patch adds support for die temperature thermal protection
in pm2301 driver.

Signed-off-by: Rupesh Kumar <rupesh.kumar@stericsson.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Reviewed-by: Hakan BERG <hakan.berg@stericsson.com>
Reviewed-by: Philippe LANGLAIS <philippe.langlais@stericsson.com>
11 years agoab8500_charger: Prevent auto drop of VBUS
Lee Jones [Thu, 14 Feb 2013 12:37:29 +0000 (12:37 +0000)]
ab8500_charger: Prevent auto drop of VBUS

Do not set higher current in stepping functionality if VBUS is dropping.
After VBUS has dropped try to set current once again. If dropping again
then we have found the maximum capability of the charger.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
11 years agopm2301-charger: Resolve I2C detection problem on ab9540
Mustapha Ben Zoubeir [Wed, 27 Jun 2012 13:40:58 +0000 (15:40 +0200)]
pm2301-charger: Resolve I2C detection problem on ab9540

Signed-off-by: Mustapha Ben Zoubeir <mustapha.ben.zoubeir-nonst@stericsson.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Reviewed-by: Marcus COOPER <marcus.xm.cooper@stericsson.com>
Reviewed-by: Philippe LANGLAIS <philippe.langlais@stericsson.com>
Tested-by: Olivier CLERGEAUD <olivier.clergeaud@stericsson.com>
11 years agopm2301-charger: Force main charger detect
Per Forlin [Thu, 5 Jul 2012 14:52:55 +0000 (16:52 +0200)]
pm2301-charger: Force main charger detect

Force main charger detect in turn on status.

Signed-off-by: Rajkumar Kasirajan <rajkumar.kasirajan@stericsson.com>
Signed-off-by: Per Forlin <per.forlin@stericsson.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Reviewed-by: Philippe LANGLAIS <philippe.langlais@stericsson.com>
Tested-by: Philippe LANGLAIS <philippe.langlais@stericsson.com>
11 years agoab8500-bm: Charge only mode fixes for the ab9540
Lee Jones [Wed, 13 Feb 2013 11:39:19 +0000 (11:39 +0000)]
ab8500-bm: Charge only mode fixes for the ab9540

Fix for charging not getting enabled in charge only mode by
external charger.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
11 years agopm2301-charger: Support for over voltage protection on the ab9540
Rupesh Kumar [Tue, 19 Jun 2012 04:51:24 +0000 (10:21 +0530)]
pm2301-charger: Support for over voltage protection on the ab9540

Added support for main charger over voltage protection.

Signed-off-by: Rupesh Kumar <rupesh.kumar@stericsson.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Reviewed-by: Philippe LANGLAIS <philippe.langlais@stericsson.com>
Tested-by: Michel JAOUEN <michel.jaouen@stericsson.com>
11 years agoab8500-bm: Quick re-attach charging behaviour
Lee Jones [Thu, 14 Feb 2013 09:24:10 +0000 (09:24 +0000)]
ab8500-bm: Quick re-attach charging behaviour

Due to a bug in some AB8500 ASICs charger removal cannot always
be detected if the removal and reinsertion is done to close in time.
This patch detects above described case and handles the situation
so that charging will be kept turned on.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
11 years agoab8500-charger: Trivial coding style changes
Lee Jones [Thu, 14 Feb 2013 09:22:48 +0000 (09:22 +0000)]
ab8500-charger: Trivial coding style changes

Enforce the white space character after 'if'.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
11 years agoab8500-charger: Add backup battery charge voltages on the ab8540
Yang QU [Tue, 26 Jun 2012 11:25:52 +0000 (19:25 +0800)]
ab8500-charger: Add backup battery charge voltages on the ab8540

Add 2.7v, 2.9v, 3.0v, 3.2v and 3.3v charging voltages for backup
battery. Before that only 2.5v, 2.6v, 2.8v, 3.1v were available.

Signed-off-by: Yang QU <yang.qu@stericsson.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Reviewed-by: Maxime COQUELIN <maxime.coquelin@stericsson.com>
Reviewed-by: Marcus COOPER <marcus.xm.cooper@stericsson.com>
Tested-by: Xiao Mei ZHANG <xiaomei.zhang@stericsson.com>
11 years agoab8500-fg: Report unscaled capacity
Martin Bergstrom [Fri, 8 Jun 2012 14:21:48 +0000 (16:21 +0200)]
ab8500-fg: Report unscaled capacity

Unscaled capacity should be reported for POWER_SUPPLY_PROP_CAPACITY.

Signed-off-by: Martin Bergstrom <martin.bergstrom@stericsson.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Reviewed-by: Marcus COOPER <marcus.xm.cooper@stericsson.com>
Tested-by: Jonas ABERG <jonas.aberg@stericsson.com>
11 years agoab8500-fg: Add power cut feature for ab8505 and ab8540
Lee Jones [Thu, 31 May 2012 14:16:36 +0000 (16:16 +0200)]
ab8500-fg: Add power cut feature for ab8505 and ab8540

Add support for a power cut feature which allows user to
configure when ab8505 and ab8540 based platforms should shut
down system due to low battery.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
11 years agoabx500-chargalg: Store the AB8500 MFD parent device for platform differentiation
Lee Jones [Fri, 15 Feb 2013 10:53:57 +0000 (10:53 +0000)]
abx500-chargalg: Store the AB8500 MFD parent device for platform differentiation

Any platform can be dynamically probed for model and version number
provided the AB8500 MFD parent device pointer is available. This
patch obtains that pointer and stores it in a locally controlled
struct for later use.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
11 years agopm2301-charger: Enable SW EOC control on the ab9540
Rajkumar Kasirajan [Tue, 5 Jun 2012 07:01:25 +0000 (12:31 +0530)]
pm2301-charger: Enable SW EOC control on the ab9540

End of charging is managed by SW.

Signed-off-by: Rajkumar Kasirajan <rajkumar.kasirajan@stericsson.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Reviewed-by: Jonas ABERG <jonas.aberg@stericsson.com>
Tested-by: Jonas ABERG <jonas.aberg@stericsson.com>
11 years agopm2301_charger: Remove __exit, __init and __devexit_p()
Lee Jones [Mon, 25 Feb 2013 14:26:52 +0000 (14:26 +0000)]
pm2301_charger: Remove __exit, __init and __devexit_p()

Signed-off-by: Lee Jones <lee.jones@linaro.org>
11 years agomfd: ab8500-debugfs: Trivially beautify the debugfs driver
Lee Jones [Tue, 26 Feb 2013 12:05:15 +0000 (12:05 +0000)]
mfd: ab8500-debugfs: Trivially beautify the debugfs driver

Just lots of white space corrections, changing some of the 4 space
tabs to 8 and pulling back some of the double tabbing back into
singles, such as the remaining of the driver.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: ab8500-core: Hierarchical interrupt registers
Dariusz Szymczak [Mon, 26 Nov 2012 12:31:26 +0000 (13:31 +0100)]
mfd: ab8500-core: Hierarchical interrupt registers

Make use of the hierarchical interrupt rergister called
ITLatchHier1 - 3 also for the 8500 platform (currently the
hierarchical interrupt registers are used only for the 8540
and 9540 platforms). This will make the interrupt routing
go faster since fewer i2c reads need to made in the most
common cases.

Signed-off-by: Dariusz Szymczak <dariusz.xd.szymczak@stericsson.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Reviewed-by: Mian Yousaf KAUKAB <mian.yousaf.kaukab@stericsson.com>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: ab8500-debug: Convert to kstrtoul_from_user
srinidhi kasagar [Fri, 23 Nov 2012 09:41:00 +0000 (15:11 +0530)]
mfd: ab8500-debug: Convert to kstrtoul_from_user

Use kstrtoul_from_user for getting an unsigned long from userspace
which is less error prone.

Signed-off-by: srinidhi kasagar <srinidhi.kasagar@stericsson.com>
Signed-off-by: Linus Walleij <linus.walleij@stericsson.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Reviewed-by: Jonas ABERG <jonas.aberg@stericsson.com>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: ab8500-debug: Add explicit dependencies
Linus Walleij [Thu, 22 Nov 2012 17:50:06 +0000 (18:50 +0100)]
mfd: ab8500-debug: Add explicit dependencies

As I am working on SPARSE_IRQ a number of implicit resource
grabs in the kernel become evident. For example, some includes
like <linux/irqs.h> would implicitly include <mach/irqs.h>
and then from there <mach/db8500-regs.h>.

In many cases it is masking the fact that drivers do not
properly use resources to pass their dependencies, base
addresses etc. So write explicit #include statements with
TODO items to have this fixed the proper way to all drivers
doing this.

Signed-off-by: Linus Walleij <linus.walleij@stericsson.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Reviewed-by: Philippe LANGLAIS <philippe.langlais@stericsson.com>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: ab8500-core: Add abx500-clk as an mfd child device
Ulf Hansson [Tue, 20 Nov 2012 13:57:25 +0000 (14:57 +0100)]
mfd: ab8500-core: Add abx500-clk as an mfd child device

Hierarchically, the abx500-clk shall be considered as a child of the
ab8500 core. The abx500-clk is intiated at arch init and thus the clks
will be available when clients needs them.

Signed-off-by: Ulf Hansson <ulf.hansson@stericsson.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Reviewed-by: Philippe LANGLAIS <philippe.langlais@stericsson.com>
Reviewed-by: Patrice CHOTARD <patrice.chotard@stericsson.com>
Reviewed-by: Gabriel FERNANDEZ <gabriel.fernandez@stericsson.com>
Reviewed-by: Philippe BEGNIC <philippe.begnic@stericsson.com>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: ab8500-debug: Add register map for ab8540.
Lee Jones [Mon, 19 Nov 2012 11:20:03 +0000 (12:20 +0100)]
mfd: ab8500-debug: Add register map for ab8540.

Required to read out correct debug information from the AB chip.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: ab8500-debugfs: Change AB8500 debug permissions
Lee Jones [Tue, 26 Feb 2013 14:09:08 +0000 (14:09 +0000)]
mfd: ab8500-debugfs: Change AB8500 debug permissions

Enable group write permissions for ab8500 debug MFD driver.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: ab8500-core: Show turn on status at boot
Mattias Wallin [Fri, 28 Sep 2012 07:34:24 +0000 (09:34 +0200)]
mfd: ab8500-core: Show turn on status at boot

Several states can be detected when a device is initially turned on.
This patch displays these states in the log. If none of the states
are true, then we report that too.

Signed-off-by: Mattias Wallin <mattias.wallin@stericsson.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Reviewed-by: Marcus COOPER <marcus.xm.cooper@stericsson.com>
Reviewed-by: Jonas ABERG <jonas.aberg@stericsson.com>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: ab8500-debug: Add ADC input channel usb_id in debugfs
Lee Jones [Tue, 26 Feb 2013 14:04:37 +0000 (14:04 +0000)]
mfd: ab8500-debug: Add ADC input channel usb_id in debugfs

Signed-off-by: Yang QU <yang.qu@stericsson.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Reviewed-by: Alexandre BOURDIOL <alexandre.bourdiol@stericsson.com>
Reviewed-by: Philippe LANGLAIS <philippe.langlais@stericsson.com>
Reviewed-by: Mattias WALLIN <mattias.wallin@stericsson.com>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: ab8500-debugfs: Dump sim registers
Lee Jones [Tue, 26 Feb 2013 14:03:33 +0000 (14:03 +0000)]
mfd: ab8500-debugfs: Dump sim registers

This patch allows to dump the SIM registers from debugfs. It will
temporary change the config to allow APE side to read the SIM registers.
Note that this read can cause problem on modem side since the modem
can't read these registers while the operation is ongoing.

Signed-off-by: Mattias Wallin <mattias.wallin@stericsson.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Reviewed-by: Marcus COOPER <marcus.xm.cooper@stericsson.com>
Reviewed-by: Jonas ABERG <jonas.aberg@stericsson.com>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: ab8500-sysctrl: AB8505 doesn't have SYSCLKREQ5..8
Rabin Vincent [Wed, 22 Aug 2012 11:08:11 +0000 (13:08 +0200)]
mfd: ab8500-sysctrl: AB8505 doesn't have SYSCLKREQ5..8

So we're removing support for it.

Signed-off-by: Rabin Vincent <rabin.vincent@stericsson.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Tested-by: Marcus COOPER <marcus.xm.cooper@stericsson.com>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: ab8500-core: Add additional resources to ab8505_iddet_resources
Lee Jones [Mon, 25 Feb 2013 15:06:18 +0000 (15:06 +0000)]
mfd: ab8500-core: Add additional resources to ab8505_iddet_resources

Add VBUS_DET_R, VBUS_DET_F IRQ, ID_DET_PLUGR and ID_DET_PLUGF IRQ
information to ab8505_iddet_resources. These are required to get
interrupts for AB8505 cut-2.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: ab8500-gpadc: Optimise GPADC driver
Lee Jones [Mon, 11 Feb 2013 10:49:41 +0000 (10:49 +0000)]
mfd: ab8500-gpadc: Optimise GPADC driver

Optimise GPADC driver:
 * for code readability and maintenance by grouping similar cheking
 * for performance by grouping several writing to control register

Signed-off-by: Alexandre Bourdiol <alexandre.bourdiol@stericsson.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Reviewed-by: Philippe LANGLAIS <philippe.langlais@stericsson.com>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: ab8500-debug: Add support for the AB8540
Lee Jones [Tue, 26 Feb 2013 14:02:31 +0000 (14:02 +0000)]
mfd: ab8500-debug: Add support for the AB8540

Allow GPADC debug information to be shown when executing on an AB8540
based platform.

Signed-off-by: Alexandre Bourdiol <alexandre.bourdiol@stericsson.com>
Reviewed-by: Marcus COOPER <marcus.xm.cooper@stericsson.com>
Reviewed-by: Philippe LANGLAIS <philippe.langlais@stericsson.com>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: ab8500-gpadc: Add support for the AB8540
Lee Jones [Mon, 11 Feb 2013 10:38:00 +0000 (10:38 +0000)]
mfd: ab8500-gpadc: Add support for the AB8540

This patch enables the GPADC to work on AB8540 based platforms.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: ab8500-sysctrl: Add new reset function
Lee Jones [Tue, 12 Feb 2013 15:11:19 +0000 (15:11 +0000)]
mfd: ab8500-sysctrl: Add new reset function

Add a new reset function which uses the AB WD with 0 timeout.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: ab8500-debug: Add support for ab8505 and ab9540
Lee Jones [Fri, 6 Jul 2012 14:11:50 +0000 (16:11 +0200)]
mfd: ab8500-debug: Add support for ab8505 and ab9540

Make it possible to dump all registers in ab8505 and ab9540.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: ab8500-debugfs: Add tests for ab8540 based platform initialisations
Lee Jones [Tue, 26 Feb 2013 10:09:41 +0000 (10:09 +0000)]
mfd: ab8500-debugfs: Add tests for ab8540 based platform initialisations

Signed-off-by: Alexandre Torgue <alexandre.torgue@stericsson.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Reviewed-by: Marcus COOPER <marcus.xm.cooper@stericsson.com>
Reviewed-by: Mattias WALLIN <mattias.wallin@stericsson.com>
Tested-by: Maxime COQUELIN <maxime.coquelin@stericsson.com>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: ab8500-sysctrl: Error check clean up
Marcus Danielsson [Mon, 18 Jun 2012 13:00:40 +0000 (15:00 +0200)]
mfd: ab8500-sysctrl: Error check clean up

Add error checks to see if sysctrl was probed as it should.
If the sysctrl_dev is not set the return value is -EINVAL.

Signed-off-by: Marcus Danielsson <marcus.danielsson@stericsson.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Reviewed-by: Mattias WALLIN <mattias.wallin@stericsson.com>
Tested-by: Per FORLIN <per.forlin@stericsson.com>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: ab8500-debug: Add wake-up info
Jonas Aaberg [Thu, 31 May 2012 05:57:07 +0000 (07:57 +0200)]
mfd: ab8500-debug: Add wake-up info

Add information regarding what ab interrupt that caused
a wake-up from suspend in <debugfs>/ab8500/interrupts.
Also print the name of the interrupts, not just the numbers.

Signed-off-by: Jonas Aaberg <jonas.aberg@stericsson.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Reviewed-by: Per FORLIN <per.forlin@stericsson.com>
Tested-by: Mattias WALLIN <mattias.wallin@stericsson.com>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: ab8500-debug: Better error handling on crash
Jonas Aaberg [Mon, 18 Jun 2012 08:35:28 +0000 (10:35 +0200)]
mfd: ab8500-debug: Better error handling on crash

Stop trying to read i2c registers if one fail.

Signed-off-by: Jonas Aaberg <jonas.aberg@stericsson.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Reviewed-by: Mattias WALLIN <mattias.wallin@stericsson.com>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: ab8500-core: Add Interrupt support for ab8540
Lee Jones [Mon, 25 Feb 2013 14:57:35 +0000 (14:57 +0000)]
mfd: ab8500-core: Add Interrupt support for ab8540

ITSource/ITLatch 7, 8, 9 and 10 don't exist on AB8540. This patch
replaces them with '-1' in the interrupt list, and handles the '-1'
in the code accordingly.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: ab8500-core: Rework MFD sub-device initialisation structures
Lee Jones [Mon, 25 Feb 2013 14:42:00 +0000 (14:42 +0000)]
mfd: ab8500-core: Rework MFD sub-device initialisation structures

Here we're separating Battery Management devices into their own
structure, removing the common device structure & redistribute them
amongst the individual platform structs and completing the population
of them.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: ab8500-core: Add ADC support for ab8540
Lee Jones [Tue, 12 Feb 2013 15:04:09 +0000 (15:04 +0000)]
mfd: ab8500-core: Add ADC support for ab8540

Signed-off-by: Lee Jones <lee.jones@linaro.org>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: ab8500-debug: Function to save all ABB registers to mem
Lee Jones [Tue, 12 Feb 2013 14:35:28 +0000 (14:35 +0000)]
mfd: ab8500-debug: Function to save all ABB registers to mem

Dump function that stores all readable ABB registers to a memory
areas where they can be accessed from dump file.

Signed-off-by: Jonas Aaberg <jonas.aberg@stericsson.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Reviewed-by: Mattias WALLIN <mattias.wallin@stericsson.com>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: ab8500-debug: Print banks in hex
Mattias Wallin [Mon, 28 May 2012 13:53:58 +0000 (15:53 +0200)]
mfd: ab8500-debug: Print banks in hex

This patch changes bank prints to use hex value.

Signed-off-by: Mattias Wallin <mattias.wallin@stericsson.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Reviewed-by: Marcus COOPER <marcus.xm.cooper@stericsson.com>
Reviewed-by: Daniel WILLERUD <daniel.willerud@stericsson.com>
Tested-by: Jonas ABERG <jonas.aberg@stericsson.com>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: ab8500-core: APE Interrupts are not cleared
Lee Jones [Mon, 25 Feb 2013 14:34:26 +0000 (14:34 +0000)]
mfd: ab8500-core: APE Interrupts are not cleared

There are missing register descriptions from the AB8505 user manual
and these need to be masked so that the APEINT line can toggle.
This patch also affects the behaviour of AB9540.

Signed-off-by: Marcus Cooper <marcus.xm.cooper@stericsson.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Reviewed-by: Maxime COQUELIN <maxime.coquelin@stericsson.com>
Reviewed-by: Alexandre TORGUE <alexandre.torgue@stericsson.com>
Reviewed-by: Mattias WALLIN <mattias.wallin@stericsson.com>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: ab8500-gpadc: Add gpadc hw conversion
Lee Jones [Tue, 26 Feb 2013 10:06:55 +0000 (10:06 +0000)]
mfd: ab8500-gpadc: Add gpadc hw conversion

Add the support of gpacd hw conversion and make the number of
sample configurable.

Signed-off-by: M'boumba Cedric Madianga <cedric.madianga@stericsson.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Reviewed-by: Mattias WALLIN <mattias.wallin@stericsson.com>
Tested-by: Michel JAOUEN <michel.jaouen@stericsson.com>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: ab8500-gpadc: Reread on failure
Jonas Aaberg [Tue, 17 Apr 2012 14:10:46 +0000 (16:10 +0200)]
mfd: ab8500-gpadc: Reread on failure

Reread the gpadc once upon failure.

Signed-off-by: Jonas Aaberg <jonas.aberg@stericsson.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Reviewed-by: Mattias WALLIN <mattias.wallin@stericsson.com>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: ab8500-gpadc: Implemented suspend/resume
Daniel WILLERUD [Thu, 12 Apr 2012 06:15:05 +0000 (08:15 +0200)]
mfd: ab8500-gpadc: Implemented suspend/resume

suspend/resume methods implemented to prevent suspend while the gpadc
driver is busy.

Signed-off-by: Daniel WILLERUD <daniel.willerud@stericsson.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Reviewed-by: Jonas ABERG <jonas.aberg@stericsson.com>
Reviewed-by: Ulf HANSSON <ulf.hansson@stericsson.com>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: ab8500-sysctrl: Update correct turn on status
Rajkumar Kasirajan [Wed, 30 May 2012 11:02:37 +0000 (16:32 +0530)]
mfd: ab8500-sysctrl: Update correct turn on status

In L9540, turn_on_status register is not updated correctly if
the device is rebooted with AC/USB charger connected. Due to
this, the device boots android instead of entering into charge
only mode. Read the AC/USB status register to detect the charger
presence and update the turn on status manually.

Signed-off-by: Rajkumar Kasirajan <rajkumar.kasirajan@stericsson.com>
Signed-off-by: Per Forlin <per.forlin@stericsson.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Reviewed-by: Rupesh KUMAR <rupesh.kumar@stericsson.com>
Reviewed-by: Philippe LANGLAIS <philippe.langlais@stericsson.com>
Tested-by: Rupesh KUMAR <rupesh.kumar@stericsson.com>
Tested-by: Philippe LANGLAIS <philippe.langlais@stericsson.com>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agoLinux 3.9-rc1 v3.9-rc1
Linus Torvalds [Sun, 3 Mar 2013 23:11:05 +0000 (15:11 -0800)]
Linux 3.9-rc1

11 years agoMerge tag 'disintegrate-fbdev-20121220' of git://git.infradead.org/users/dhowells...
Linus Torvalds [Sun, 3 Mar 2013 22:24:59 +0000 (14:24 -0800)]
Merge tag 'disintegrate-fbdev-20121220' of git://git.infradead.org/users/dhowells/linux-headers

Pull fbdev UAPI disintegration from David Howells:
 "You'll be glad to here that the end is nigh for the UAPI patches.
  Only the fbdev/framebuffer piece remains now that the SCSI stuff has
  gone in.

  Here are the UAPI disintegration bits for the fbdev drivers.  It
  appears that Florian hasn't had time to deal with my patch, but back
  in December he did say he didn't mind if I pushed it forward."

Yay.  No more uapi movement.  And hopefully no more big header file
cleanups coming up either, it just tends to be very painful.

* tag 'disintegrate-fbdev-20121220' of git://git.infradead.org/users/dhowells/linux-headers:
  UAPI: (Scripted) Disintegrate include/video

11 years agoMerge tag 'stable/for-linus-3.9-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sun, 3 Mar 2013 22:22:53 +0000 (14:22 -0800)]
Merge tag 'stable/for-linus-3.9-rc1-tag' of git://git./linux/kernel/git/konrad/xen

Pull Xen bug-fixes from Konrad Rzeszutek Wilk:
 - Update the Xen ACPI memory and CPU hotplug locking mechanism.
 - Fix PAT issues wherein various applications would not start
 - Fix handling of multiple MSI as AHCI now does it.
 - Fix ARM compile failures.

* tag 'stable/for-linus-3.9-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen:
  xenbus: fix compile failure on ARM with Xen enabled
  xen/pci: We don't do multiple MSI's.
  xen/pat: Disable PAT using pat_enabled value.
  xen/acpi: xen cpu hotplug minor updates
  xen/acpi: xen memory hotplug minor updates

11 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Linus Torvalds [Sun, 3 Mar 2013 21:23:02 +0000 (13:23 -0800)]
Merge branch 'for-linus' of git://git./linux/kernel/git/viro/vfs

Pull  more VFS bits from Al Viro:
 "Unfortunately, it looks like xattr series will have to wait until the
  next cycle ;-/

  This pile contains 9p cleanups and fixes (races in v9fs_fid_add()
  etc), fixup for nommu breakage in shmem.c, several cleanups and a bit
  more file_inode() work"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
  constify path_get/path_put and fs_struct.c stuff
  fix nommu breakage in shmem.c
  cache the value of file_inode() in struct file
  9p: if v9fs_fid_lookup() gets to asking server, it'd better have hashed dentry
  9p: make sure ->lookup() adds fid to the right dentry
  9p: untangle ->lookup() a bit
  9p: double iput() in ->lookup() if d_materialise_unique() fails
  9p: v9fs_fid_add() can't fail now
  v9fs: get rid of v9fs_dentry
  9p: turn fid->dlist into hlist
  9p: don't bother with private lock in ->d_fsdata; dentry->d_lock will do just fine
  more file_inode() open-coded instances
  selinux: opened file can't have NULL or negative ->f_path.dentry

(In the meantime, the hlist traversal macros have changed, so this
required a semantic conflict fixup for the newly hlistified fid->dlist)

11 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux...
Linus Torvalds [Sun, 3 Mar 2013 21:13:20 +0000 (13:13 -0800)]
Merge branch 'for-linus' of git://git./linux/kernel/git/mason/linux-btrfs

Pull btrfs fixup from Chris Mason:
 "Geert and James both sent this one in, sorry guys"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs:
  btrfs/raid56: Add missing #include <linux/vmalloc.h>

11 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux
Linus Torvalds [Sun, 3 Mar 2013 20:58:43 +0000 (12:58 -0800)]
Merge branch 'for-linus' of git://git./linux/kernel/git/s390/linux

Pull second set of s390 patches from Martin Schwidefsky:
 "The main part of this merge are Heikos uaccess patches.  Together with
  commit 09884964335e ("mm: do not grow the stack vma just because of an
  overrun on preceding vma") the user string access is hopefully fixed
  for good.

  In addition some bug fixes and two cleanup patches."

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux:
  s390/module: fix compile warning
  qdio: remove unused parameters
  s390/uaccess: fix kernel ds access for page table walk
  s390/uaccess: fix strncpy_from_user string length check
  input: disable i8042 PC Keyboard controller for s390
  s390/dis: Fix invalid array size
  s390/uaccess: remove pointless access_ok() checks
  s390/uaccess: fix strncpy_from_user/strnlen_user zero maxlen case
  s390/uaccess: shorten strncpy_from_user/strnlen_user
  s390/dasd: fix unresponsive device after all channel paths were lost
  s390/mm: ignore change bit for vmemmap
  s390/page table dumper: add support for change-recording override bit

11 years agoMerge branch 'fixes-for-3.9-latest' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sun, 3 Mar 2013 20:57:38 +0000 (12:57 -0800)]
Merge branch 'fixes-for-3.9-latest' of git://git./linux/kernel/git/deller/parisc-linux

Pull second round of PARISC updates from Helge Deller:
 "The most important fix in this branch is the switch of io_setup,
  io_getevents and io_submit syscalls to use the available compat
  syscalls when running 32bit userspace on 64bit kernel.  Other than
  that it's mostly removal of compile warnings."

* 'fixes-for-3.9-latest' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux:
  parisc: fix redefinition of SET_PERSONALITY
  parisc: do not install modules when installing kernel
  parisc: fix compile warnings triggered by atomic_sub(sizeof(),v)
  parisc: check return value of down_interruptible() in hp_sdc_rtc.c
  parisc: avoid unitialized variable warning in pa_memcpy()
  parisc: remove unused variable 'compat_val'
  parisc: switch to compat_functions of io_setup, io_getevents and io_submit
  parisc: select ARCH_WANT_FRAME_POINTERS

11 years agoMerge tag 'metag-v3.9-rc1-v4' of git://git.kernel.org/pub/scm/linux/kernel/git/jhogan...
Linus Torvalds [Sun, 3 Mar 2013 20:06:09 +0000 (12:06 -0800)]
Merge tag 'metag-v3.9-rc1-v4' of git://git./linux/kernel/git/jhogan/metag

Pull new ImgTec Meta architecture from James Hogan:
 "This adds core architecture support for Imagination's Meta processor
  cores, followed by some later miscellaneous arch/metag cleanups and
  fixes which I kept separate to ease review:

   - Support for basic Meta 1 (ATP) and Meta 2 (HTP) core architecture
   - A few fixes all over, particularly for symbol prefixes
   - A few privilege protection fixes
   - Several cleanups (setup.c includes, split out a lot of
     metag_ksyms.c)
   - Fix some missing exports
   - Convert hugetlb to use vm_unmapped_area()
   - Copy device tree to non-init memory
   - Provide dma_get_sgtable()"

* tag 'metag-v3.9-rc1-v4' of git://git.kernel.org/pub/scm/linux/kernel/git/jhogan/metag: (61 commits)
  metag: Provide dma_get_sgtable()
  metag: prom.h: remove declaration of metag_dt_memblock_reserve()
  metag: copy devicetree to non-init memory
  metag: cleanup metag_ksyms.c includes
  metag: move mm/init.c exports out of metag_ksyms.c
  metag: move usercopy.c exports out of metag_ksyms.c
  metag: move setup.c exports out of metag_ksyms.c
  metag: move kick.c exports out of metag_ksyms.c
  metag: move traps.c exports out of metag_ksyms.c
  metag: move irq enable out of irqflags.h on SMP
  genksyms: fix metag symbol prefix on crc symbols
  metag: hugetlb: convert to vm_unmapped_area()
  metag: export clear_page and copy_page
  metag: export metag_code_cache_flush_all
  metag: protect more non-MMU memory regions
  metag: make TXPRIVEXT bits explicit
  metag: kernel/setup.c: sort includes
  perf: Enable building perf tools for Meta
  metag: add boot time LNKGET/LNKSET check
  metag: add __init to metag_cache_probe()
  ...

11 years agoMerge branch 'for-linus' of git://git.linaro.org/people/rmk/linux-arm
Linus Torvalds [Sun, 3 Mar 2013 19:54:39 +0000 (11:54 -0800)]
Merge branch 'for-linus' of git://git.linaro.org/people/rmk/linux-arm

Pull late ARM updates from Russell King:
 "Here is the late set of ARM updates for this merge window; in here is:

   - The ARM parts of the broadcast timer support, core parts merged
     through tglx's tree.  This was left over from the previous merge to
     allow the dependency on tglx's tree to be resolved.

   - A fix to the VFP code which shows up on Raspberry Pi's, as well as
     fixing the fallout from a previous commit in this area.

   - A number of smaller fixes scattered throughout the ARM tree"

* 'for-linus' of git://git.linaro.org/people/rmk/linux-arm:
  ARM: Fix broken commit 0cc41e4a21d43 corrupting kernel messages
  ARM: fix scheduling while atomic warning in alignment handling code
  ARM: VFP: fix emulation of second VFP instruction
  ARM: 7656/1: uImage: Error out on build of multiplatform without LOADADDR
  ARM: 7640/1: memory: tegra_ahb_enable_smmu() depends on TEGRA_IOMMU_SMMU
  ARM: 7654/1: Preserve L_PTE_VALID in pte_modify()
  ARM: 7653/2: do not scale loops_per_jiffy when using a constant delay clock
  ARM: 7651/1: remove unused smp_timer_broadcast #define

11 years agoMerge tag 'char-misc-3.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh...
Linus Torvalds [Sun, 3 Mar 2013 18:25:47 +0000 (10:25 -0800)]
Merge tag 'char-misc-3.9-rc1' of git://git./linux/kernel/git/gregkh/char-misc

Pull char/misc patch from Greg Kroah-Hartman:
 "Here is one remaining patch for 3.9-rc1.  It is for the hyper-v
  drivers, and had to wait until some other patches went in through the
  x86 tree."

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* tag 'char-misc-3.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc:
  Drivers: hv: vmbus: Use the new infrastructure for delivering VMBUS interrupts

11 years agoMerge tag 'usb-3.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb
Linus Torvalds [Sun, 3 Mar 2013 18:24:57 +0000 (10:24 -0800)]
Merge tag 'usb-3.9-rc1' of git://git./linux/kernel/git/gregkh/usb

Pull USB patch revert from Greg Kroah-Hartman:
 "Here is one remaining USB patch for 3.9-rc1, it reverts a 3.8 patch
  that has caused a lot of regressions for some VIA EHCI controllers."

* tag 'usb-3.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb:
  USB: EHCI: revert "remove ASS/PSS polling timeout"

11 years agoMerge git://www.linux-watchdog.org/linux-watchdog
Linus Torvalds [Sun, 3 Mar 2013 18:23:29 +0000 (10:23 -0800)]
Merge git://www.linux-watchdog.org/linux-watchdog

Pull watchdog updates from Wim Van Sebroeck:
 "This contains:
   - fixes and improvements
   - devicetree bindings
   - conversion to watchdog generic framework of the following drivers:
        - booke_wdt
        - bcm47xx_wdt.c
        - at91sam9_wdt
   - Removal of old STMP3xxx driver
   - Addition of following new drivers:
        - new driver for STMP3xxx and i.MX23/28
        - Retu watchdog driver"

* git://www.linux-watchdog.org/linux-watchdog: (30 commits)
  watchdog: sp805_wdt depends on ARM
  watchdog: davinci_wdt: update to devm_* API
  watchdog: davinci_wdt: use devm managed clk get
  watchdog: at91rm9200: add DT support
  watchdog: add timeout-sec property binding
  watchdog: at91sam9_wdt: Convert to use the watchdog framework
  watchdog: omap_wdt: Add option nowayout
  watchdog: core: dt: add support for the timeout-sec dt property
  watchdog: bcm47xx_wdt.c: add hard timer
  watchdog: bcm47xx_wdt.c: rename wdt_time to timeout
  watchdog: bcm47xx_wdt.c: rename ops methods
  watchdog: bcm47xx_wdt.c: use platform device
  watchdog: bcm47xx_wdt.c: convert to watchdog core api
  watchdog: Convert BookE watchdog driver to watchdog infrastructure
  watchdog: s3c2410_wdt: Use devm_* functions
  watchdog: remove old STMP3xxx driver
  watchdog: add new driver for STMP3xxx and i.MX23/28
  rtc: stmp3xxx: add wdt-accessor function
  watchdog: introduce retu_wdt driver
  watchdog: intel_scu_watchdog: fix Kconfig dependency
  ...

11 years agoMerge branch 'next' of git://git.infradead.org/users/vkoul/slave-dma
Linus Torvalds [Sun, 3 Mar 2013 18:20:22 +0000 (10:20 -0800)]
Merge branch 'next' of git://git.infradead.org/users/vkoul/slave-dma

Pull second set of slave-dmaengine updates from Vinod Koul:
 "Arnd's patch moves the dw_dmac to use generic DMA binding.  I agreed
  to merge this late as it will avoid the conflicts between trees.

  The second patch from Matt adding a dma_request_slave_channel_compat
  API was supposed to be picked up, but somehow never got picked up.
  Some patches dependent on this are already in -next :("

* 'next' of git://git.infradead.org/users/vkoul/slave-dma:
  dmaengine: dw_dmac: move to generic DMA binding
  dmaengine: add dma_request_slave_channel_compat()

11 years agoMerge branch 'for_linus' of git://cavan.codon.org.uk/platform-drivers-x86
Linus Torvalds [Sun, 3 Mar 2013 18:16:19 +0000 (10:16 -0800)]
Merge branch 'for_linus' of git://cavan.codon.org.uk/platform-drivers-x86

Pull x86 platform driver updates from Matthew Garrett:
 "Mostly relatively small updates, along with some hardware enablement
  for Sony hardware and a pile of updates to Google's Chromebook driver"

* 'for_linus' of git://cavan.codon.org.uk/platform-drivers-x86: (49 commits)
  ideapad-laptop: Depend on BACKLIGHT_CLASS_DEVICE instead of selecting it
  ideapad: depends on backlight subsystem and update comment
  Platform: x86: chromeos_laptop - add i915 gmbuses to adapter names
  Platform: x86: chromeos_laptop - Add isl light sensor for Pixel
  Platform: x86: chromeos_laptop - Add a more general add_i2c_device
  Platform: x86: chromeos_laptop - Add Pixel Touchscreen
  Platform: x86: chromeos_laptop - Add support for probing devices
  Platform: x86: chromeos_laptop - Add Pixel Trackpad
  hp-wmi: fix handling of platform device
  sony-laptop: leak in error handling sony_nc_lid_resume_setup()
  hp-wmi: Add support for SMBus hotkeys
  asus-wmi: Fix unused function build warning
  acer-wmi: avoid the warning of 'devices' may be used uninitialized
  drivers/platform/x86/thinkpad_acpi.c: Handle HKEY event 0x6040
  Platform: x86: chromeos_laptop - Add HP Pavilion 14
  Platform: x86: chromeos_laptop - Add Taos tsl2583 device
  Platform: x86: chromeos_laptop - Add Taos tsl2563 device
  Platform: x86: chromeos_laptop - Add Acer C7 trackpad
  Platform: x86: chromeos_laptop - Rename setup_lumpy_tp to setup_cyapa_smbus_tp
  asus-laptop: always report brightness key events
  ...

11 years agobtrfs/raid56: Add missing #include <linux/vmalloc.h>
Geert Uytterhoeven [Sun, 3 Mar 2013 11:44:41 +0000 (04:44 -0700)]
btrfs/raid56: Add missing #include <linux/vmalloc.h>

tilegx_defconfig:

fs/btrfs/raid56.c: In function 'btrfs_alloc_stripe_hash_table':
fs/btrfs/raid56.c:206:3: error: implicit declaration of function 'vzalloc' [-Werror=implicit-function-declaration]
fs/btrfs/raid56.c:206:9: warning: assignment makes pointer from integer without a cast [enabled by default]
fs/btrfs/raid56.c:226:4: error: implicit declaration of function 'vfree' [-Werror=implicit-function-declaration]

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
11 years agoMerge tag 'ext4_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso...
Linus Torvalds [Sun, 3 Mar 2013 03:33:21 +0000 (19:33 -0800)]
Merge tag 'ext4_for_linus' of git://git./linux/kernel/git/tytso/ext4

Pull ext4 bug fixes from Ted Ts'o:
 "Various bug fixes for ext4.  The most important is a fix for the new
  extent cache's slab shrinker which can cause significant, user-visible
  pauses when the system is under memory pressure."

* tag 'ext4_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4:
  ext4: enable quotas before orphan cleanup
  ext4: don't allow quota mount options when quota feature enabled
  ext4: fix a warning from sparse check for ext4_dir_llseek
  ext4: convert number of blocks to clusters properly
  ext4: fix possible memory leak in ext4_remount()
  jbd2: fix ERR_PTR dereference in jbd2__journal_start
  ext4: use percpu counter for extent cache count
  ext4: optimize ext4_es_shrink()

11 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/signal
Linus Torvalds [Sun, 3 Mar 2013 03:32:06 +0000 (19:32 -0800)]
Merge branch 'for-linus' of git://git./linux/kernel/git/viro/signal

Pull sigprocmask compat fix from Al Viro:
 "generic compat_sys_rt_sigprocmask() had a very dumb braino; I'd spent
  quite a while staring at the offending commit before finally managing
  to spot the idiocy ;-/"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/signal:
  fix compat_sys_rt_sigprocmask()

11 years agofix compat_sys_rt_sigprocmask()
Al Viro [Sun, 3 Mar 2013 01:39:15 +0000 (20:39 -0500)]
fix compat_sys_rt_sigprocmask()

Converting bitmask to 32bit granularity is fine, but we'd better
_do_ something with the result.  Such as "copy it to userland"...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
11 years agoMerge tag 'nfs-for-3.9-2' of git://git.linux-nfs.org/projects/trondmy/linux-nfs
Linus Torvalds [Sun, 3 Mar 2013 00:46:07 +0000 (16:46 -0800)]
Merge tag 'nfs-for-3.9-2' of git://git.linux-nfs.org/projects/trondmy/linux-nfs

Pull NFS client bugfixes from Trond Myklebust:
 "We've just concluded another Connectathon interoperability testing
  week, and so here are the fixes for the bugs that were discovered:

   - Don't allow NFS silly-renamed files to be deleted
   - Don't start the retransmission timer when out of socket space
   - Fix a couple of pnfs-related Oopses.
   - Fix one more NFSv4 state recovery deadlock
   - Don't loop forever when LAYOUTGET returns NFS4ERR_LAYOUTTRYLATER"

* tag 'nfs-for-3.9-2' of git://git.linux-nfs.org/projects/trondmy/linux-nfs:
  SUNRPC: One line comment fix
  NFSv4.1: LAYOUTGET EDELAY loops timeout to the MDS
  SUNRPC: add call to get configured timeout
  PNFS: set the default DS timeout to 60 seconds
  NFSv4: Fix another open/open_recovery deadlock
  nfs: don't allow nfs_find_actor to match inodes of the wrong type
  NFSv4.1: Hold reference to layout hdr in layoutget
  pnfs: fix resend_to_mds for directio
  SUNRPC: Don't start the retransmission timer when out of socket space
  NFS: Don't allow NFS silly-renamed files to be deleted, no signal

11 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux...
Linus Torvalds [Sun, 3 Mar 2013 00:41:54 +0000 (16:41 -0800)]
Merge branch 'for-linus' of git://git./linux/kernel/git/mason/linux-btrfs

Pull btrfs update from Chris Mason:
 "The biggest feature in the pull is the new (and still experimental)
  raid56 code that David Woodhouse started long ago.  I'm still working
  on the parity logging setup that will avoid inconsistent parity after
  a crash, so this is only for testing right now.  But, I'd really like
  to get it out to a broader audience to hammer out any performance
  issues or other problems.

  scrub does not yet correct errors on raid5/6 either.

  Josef has another pass at fsync performance.  The big change here is
  to combine waiting for metadata with waiting for data, which is a big
  latency win.  It is also step one toward using atomics from the
  hardware during a commit.

  Mark Fasheh has a new way to use btrfs send/receive to send only the
  metadata changes.  SUSE is using this to make snapper more efficient
  at finding changes between snapshosts.

  Snapshot-aware defrag is also included.

  Otherwise we have a large number of fixes and cleanups.  Eric Sandeen
  wins the award for removing the most lines, and I'm hoping we steal
  this idea from XFS over and over again."

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs: (118 commits)
  btrfs: fixup/remove module.h usage as required
  Btrfs: delete inline extents when we find them during logging
  btrfs: try harder to allocate raid56 stripe cache
  Btrfs: cleanup to make the function btrfs_delalloc_reserve_metadata more logic
  Btrfs: don't call btrfs_qgroup_free if just btrfs_qgroup_reserve fails
  Btrfs: remove reduplicate check about root in the function btrfs_clean_quota_tree
  Btrfs: return ENOMEM rather than use BUG_ON when btrfs_alloc_path fails
  Btrfs: fix missing deleted items in btrfs_clean_quota_tree
  btrfs: use only inline_pages from extent buffer
  Btrfs: fix wrong reserved space when deleting a snapshot/subvolume
  Btrfs: fix wrong reserved space in qgroup during snap/subv creation
  Btrfs: remove unnecessary dget_parent/dput when creating the pending snapshot
  btrfs: remove a printk from scan_one_device
  Btrfs: fix NULL pointer after aborting a transaction
  Btrfs: fix memory leak of log roots
  Btrfs: copy everything if we've created an inline extent
  btrfs: cleanup for open-coded alignment
  Btrfs: do not change inode flags in rename
  Btrfs: use reserved space for creating a snapshot
  clear chunk_alloc flag on retryable failure
  ...

11 years agoMerge tag 'for-linus-20130301' of git://git.infradead.org/linux-mtd
Linus Torvalds [Sun, 3 Mar 2013 00:33:54 +0000 (16:33 -0800)]
Merge tag 'for-linus-20130301' of git://git.infradead.org/linux-mtd

Pull MTD update from David Woodhouse:
 "Fairly unexciting MTD merge for 3.9:

   - misc clean-ups in the MTD command-line partitioning parser
     (cmdlinepart)
   - add flash locking support for STmicro chips serial flash chips, as
     well as for CFI command set 2 chips.
   - new driver for the ELM error correction HW module found in various
     TI chips, enable the OMAP NAND driver to use the ELM HW error
     correction
   - added number of new serial flash IDs
   - various fixes and improvements in the gpmi NAND driver
   - bcm47xx NAND driver improvements
   - make the mtdpart module actually removable"

* tag 'for-linus-20130301' of git://git.infradead.org/linux-mtd: (45 commits)
  mtd: map: BUG() in non handled cases
  mtd: bcm47xxnflash: use pr_fmt for module prefix in messages
  mtd: davinci_nand: Use managed resources
  mtd: mtd_torturetest can cause stack overflows
  mtd: physmap_of: Convert device allocation to managed devm_kzalloc()
  mtd: at91: atmel_nand: for PMECC, add code to check the ONFI parameter ECC requirement.
  mtd: atmel_nand: make pmecc-cap, pmecc-sector-size in dts is optional.
  mtd: atmel_nand: avoid to report an error when lookup table offset is 0.
  mtd: bcm47xxsflash: adjust names of bus-specific functions
  mtd: bcm47xxpart: improve probing of nvram partition
  mtd: bcm47xxpart: add support for other erase sizes
  mtd: bcm47xxnflash: register this as normal driver
  mtd: bcm47xxnflash: fix message
  mtd: bcm47xxsflash: register this as normal driver
  mtd: bcm47xxsflash: write number of written bytes
  mtd: gpmi: add sanity check for the ECC
  mtd: gpmi: set the Golois Field bit for mx6q's BCH
  mtd: devices: elm: Removes <xx> literals in elm DT node
  mtd: gpmi: fix a dereferencing freed memory error
  mtd: fix the wrong timeo for panic_nand_wait()
  ...

11 years agoMerge branches 'devel-stable', 'fixes' and 'mmci' into for-linus
Russell King [Sun, 3 Mar 2013 00:32:50 +0000 (00:32 +0000)]
Merge branches 'devel-stable', 'fixes' and 'mmci' into for-linus

11 years agoSUNRPC: One line comment fix
Trond Myklebust [Sat, 2 Mar 2013 23:54:11 +0000 (15:54 -0800)]
SUNRPC: One line comment fix

Reported-by: Weston Andros Adamson <dros@netapp.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
11 years agoext4: enable quotas before orphan cleanup
Jan Kara [Sat, 2 Mar 2013 23:22:38 +0000 (18:22 -0500)]
ext4: enable quotas before orphan cleanup

When using quota feature we need to enable quotas before orphan cleanup
so that changes happening during it are properly reflected in quota
accounting.

Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
11 years agoext4: don't allow quota mount options when quota feature enabled
Jan Kara [Sat, 2 Mar 2013 22:57:08 +0000 (17:57 -0500)]
ext4: don't allow quota mount options when quota feature enabled

So far we silently ignored when quota mount options were set while quota
feature was enabled.  But this can create confusion in userspace when
mount options are set but silently ignored and also creates opportunities
for bugs when we don't properly test all quota types.  Actually
ext4_mark_dquot_dirty() forgets to test for quota feature so it was
dependent on journaled quota options being set.  OTOH ext4_orphan_cleanup()
tries to enable journaled quota when quota options are specified which is
wrong when quota feature is enabled.

Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
11 years agoext4: fix a warning from sparse check for ext4_dir_llseek
Zheng Liu [Sat, 2 Mar 2013 22:24:05 +0000 (17:24 -0500)]
ext4: fix a warning from sparse check for ext4_dir_llseek

ext4_dir_llseek is only used as a callback function, and no one calls
it directly.  So make it as a static function in order to remove a
warning message from sparse check.

Signed-off-by: Zheng Liu <wenqing.lz@taobao.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
11 years agoext4: convert number of blocks to clusters properly
Lukas Czerner [Sat, 2 Mar 2013 22:18:58 +0000 (17:18 -0500)]
ext4: convert number of blocks to clusters properly

We're using macro EXT4_B2C() to convert number of blocks to number of
clusters for bigalloc file systems.  However, we should be using
EXT4_NUM_B2C().

Signed-off-by: Lukas Czerner <lczerner@redhat.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Cc: stable@vger.kernel.org
11 years agoext4: fix possible memory leak in ext4_remount()
Wei Yongjun [Sat, 2 Mar 2013 22:13:55 +0000 (17:13 -0500)]
ext4: fix possible memory leak in ext4_remount()

'orig_data' is malloced in ext4_remount() and should be freed
before leaving from the error handling cases, otherwise it will
cause memory leak.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Reviewed-by: Lukas Czerner <lczerner@redhat.com>
Cc: stable@vger.kernel.org
11 years agojbd2: fix ERR_PTR dereference in jbd2__journal_start
Dmitry Monakhov [Sat, 2 Mar 2013 22:08:46 +0000 (17:08 -0500)]
jbd2: fix ERR_PTR dereference in jbd2__journal_start

If start_this_handle() failed handle will be initialized
to ERR_PTR() and can not be dereferenced.

paging request at fffffffffffffff6
IP: [<ffffffff813c073f>] jbd2__journal_start+0x18f/0x290
PGD 200e067 PUD 200f067 PMD 0
Oops: 0000 [#1] SMP
Modules linked in: cpufreq_ondemand acpi_cpufreq freq_table mperf coretemp kvm_intel kvm crc32c_intel ghash_clmulni_intel microcode sg xhci_hcd button sd_mod crc_t10dif aesni_intel ablk_helper cryptd lrw aes_x86_64 xts gf128mul ahci libahci pata_acpi ata_generic dm_mirror dm_region_hash dm_log dm_mod
CPU 0 journal commit I/O error

Pid: 2694, comm: fio Not tainted 3.8.0-rc3+ #79                  /DQ67SW
RIP: 0010:[<ffffffff813c073f>]  [<ffffffff813c073f>] jbd2__journal_start+0x18f/0x290
RSP: 0018:ffff880233b8ba58  EFLAGS: 00010292
RAX: 00000000ffffffe2 RBX: ffffffffffffffe2 RCX: 0000000000000006
RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffffffff82128f48
RBP: ffff880233b8ba98 R08: 0000000000000000 R09: ffff88021440a6e0

Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
11 years agometag: Provide dma_get_sgtable()
James Hogan [Tue, 19 Feb 2013 13:25:46 +0000 (13:25 +0000)]
metag: Provide dma_get_sgtable()

metag/allmodconfig:

drivers/media/v4l2-core/videobuf2-dma-contig.c: In function 'vb2_dc_get_base_sgt':
drivers/media/v4l2-core/videobuf2-dma-contig.c:387: error: implicit declaration of function 'dma_get_sgtable'

For architectures using dma_map_ops, dma_get_sgtable() is provided in
<asm-generic/dma-mapping-common.h>.

Metag does not use dma_map_ops yet, hence it should implement it as an
inline stub using dma_common_get_sgtable().

Signed-off-by: James Hogan <james.hogan@imgtec.com>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Marek Szyprowski <m.szyprowski@samsung.com>
11 years agometag: prom.h: remove declaration of metag_dt_memblock_reserve()
James Hogan [Wed, 20 Feb 2013 14:19:54 +0000 (14:19 +0000)]
metag: prom.h: remove declaration of metag_dt_memblock_reserve()

Metag doesn't have a metag_dt_memblock_reserve() function so remove the
declaration from asm/prom.h.

Signed-off-by: James Hogan <james.hogan@imgtec.com>
11 years agometag: copy devicetree to non-init memory
James Hogan [Wed, 20 Feb 2013 13:59:13 +0000 (13:59 +0000)]
metag: copy devicetree to non-init memory

Make a copy of the device tree blob in non-init memory. It is required
when using built-in device tree files that the platform code copies the
blob to non-init memory prior to calling unflatten_device_tree(),
otherwise the strings that the device tree refer to will get poisoned
and potentially reused, breaking later reading of the device tree
post-init (such as compatible matching in modules, debugfs, and the
procfs interface).

Signed-off-by: James Hogan <james.hogan@imgtec.com>
Reviewed-by: Vineet Gupta <vgupta@synopsys.com>
11 years agometag: cleanup metag_ksyms.c includes
James Hogan [Wed, 13 Feb 2013 13:30:15 +0000 (13:30 +0000)]
metag: cleanup metag_ksyms.c includes

Minimise metag_ksyms.c includes to directly include the <asm/*.h> files
that declare a particular symbol, and not include any unnecessary ones.

Signed-off-by: James Hogan <james.hogan@imgtec.com>
11 years agometag: move mm/init.c exports out of metag_ksyms.c
James Hogan [Wed, 13 Feb 2013 13:19:15 +0000 (13:19 +0000)]
metag: move mm/init.c exports out of metag_ksyms.c

It's less error prone to have function symbols exported immediately
after the function rather than in metag_ksyms.c. Move each EXPORT_SYMBOL
in metag_ksyms.c for symbols defined in mm/init.c into mm/init.c.

Signed-off-by: James Hogan <james.hogan@imgtec.com>
11 years agometag: move usercopy.c exports out of metag_ksyms.c
James Hogan [Wed, 13 Feb 2013 12:57:10 +0000 (12:57 +0000)]
metag: move usercopy.c exports out of metag_ksyms.c

It's less error prone to have function symbols exported immediately
after the function rather than in metag_ksyms.c. Move each EXPORT_SYMBOL
in metag_ksyms.c for symbols defined in usercopy.c into usercopy.c

Signed-off-by: James Hogan <james.hogan@imgtec.com>
11 years agometag: move setup.c exports out of metag_ksyms.c
James Hogan [Wed, 13 Feb 2013 12:55:51 +0000 (12:55 +0000)]
metag: move setup.c exports out of metag_ksyms.c

It's less error prone to have function symbols exported immediately
after the function rather than in metag_ksyms.c. Move each EXPORT_SYMBOL
in metag_ksyms.c for symbols defined in setup.c into setup.c

Signed-off-by: James Hogan <james.hogan@imgtec.com>
11 years agometag: move kick.c exports out of metag_ksyms.c
James Hogan [Wed, 13 Feb 2013 13:01:55 +0000 (13:01 +0000)]
metag: move kick.c exports out of metag_ksyms.c

It's less error prone to have function symbols exported immediately
after the function rather than in metag_ksyms.c. Move each EXPORT_SYMBOL
in metag_ksyms.c for symbols defined in kick.c into kick.c

Signed-off-by: James Hogan <james.hogan@imgtec.com>
11 years agometag: move traps.c exports out of metag_ksyms.c
James Hogan [Wed, 13 Feb 2013 12:19:03 +0000 (12:19 +0000)]
metag: move traps.c exports out of metag_ksyms.c

It's less error prone to have function symbols exported immediately
after the function rather than in metag_ksyms.c. Move each EXPORT_SYMBOL
in metag_ksyms.c for symbols defined in traps.c into traps.c

Signed-off-by: James Hogan <james.hogan@imgtec.com>
11 years agometag: move irq enable out of irqflags.h on SMP
James Hogan [Tue, 12 Feb 2013 16:04:53 +0000 (16:04 +0000)]
metag: move irq enable out of irqflags.h on SMP

The SMP version of arch_local_irq_enable() uses preempt_disable(), but
<asm/irqflags.h> doesn't include <linux/preempt.h> causing the following
errors on SMP when pstore/ftrace is enabled (caught by buildbot smp
allyesconfig):

In file included from include/linux/irqflags.h:15,
                 from fs/pstore/ftrace.c:16:
arch/metag/include/asm/irqflags.h: In function 'arch_local_irq_enable':
arch/metag/include/asm/irqflags.h:84: error: implicit declaration of function 'preempt_disable'
arch/metag/include/asm/irqflags.h:86: error: implicit declaration of function 'preempt_enable_no_resched'

However <linux/preempt.h> cannot be easily included from
<asm/irqflags.h> as it can cause circular include dependencies in the
!SMP case, and potentially in the SMP case in the future. Therefore move
the SMP implementation of arch_local_irq_enable() into traps.c and use
an inline version of get_trigger_mask() which is also defined in traps.c
for SMP.

This adds an extra layer of function call / stack push when
preempt_disable needs to call other functions, however in the
non-preemptive SMP case it should be about as fast, as it was already
calling the get_trigger_mask() function which is now used inline.

Signed-off-by: James Hogan <james.hogan@imgtec.com>
11 years agogenksyms: fix metag symbol prefix on crc symbols
James Hogan [Mon, 11 Feb 2013 15:40:24 +0000 (15:40 +0000)]
genksyms: fix metag symbol prefix on crc symbols

Meta uses symbol prefixes, so add "metag" to the list of architectures
to set the mod_prefix to "_" for. This fixes __crc_* symbols to add the
extra underscore to match _CRC_SYMBOL macro in <linux/export.h> and so
that modpost finds them.

Signed-off-by: James Hogan <james.hogan@imgtec.com>