platform/kernel/linux-exynos.git
12 years agoMerge branch 'at91-3.4-cleanup2+DT' of git://github.com/at91linux/linux-at91 into...
Arnd Bergmann [Fri, 2 Mar 2012 13:22:28 +0000 (13:22 +0000)]
Merge branch 'at91-3.4-cleanup2+DT' of git://github.com/at91linux/linux-at91 into next/dt

* 'at91-3.4-cleanup2+DT' of git://github.com/at91linux/linux-at91: (22 commits)
  ARM: at91: at91sam9x5cm/dt: add leds support
  ARM: at91: usb_a9g20/dt: add gpio-keys support
  ARM: at91: at91sam9m10g45ek/dt: add gpio-keys support
  ARM: at91: at91sam9m10g45ek/dt: add leds support
  ARM: at91: usb_a9g20/dt: add leds support
  ARM: at91/pio: add new PIO3 features
  ARM: at91: add sam9_smc.o to at91sam9x5 build
  ARM: at91/tc/clocksource: Add 32 bit variant to Timer Counter
  ARM: at91/tc: add device tree support to atmel_tclib
  ARM: at91/tclib: take iomem size from resource
  ARM: at91/pit: add traces in case of error
  ARM: at91: pit add DT support
  ARM: at91: AIC and GPIO IRQ device tree initialization
  ARM: at91/board-dt: remove AIC irq domain from board file
  ARM: at91/gpio: remove the static specification of gpio_chip.base
  ARM: at91/gpio: add .to_irq gpio_chip handler
  ARM: at91/gpio: non-DT builds do not have gpio_chip.of_node field
  ARM: at91/gpio: add irqdomain and DT support
  ARM: at91/gpio: change comments and one variable name
  ARM/USB: at91/ohci-at91: remove the use of irq_to_gpio
  ...

12 years agoMerge branches 'depends/irqdomain' and 'at91/base2+cleanup' into next/dt
Arnd Bergmann [Fri, 2 Mar 2012 13:14:02 +0000 (13:14 +0000)]
Merge branches 'depends/irqdomain' and 'at91/base2+cleanup' into next/dt

These two branches are a dependency for the at91 device tree changes,
so we pull them in here. at91/base2+cleanup will get merged through
the arm-soc cleanup2 branch, while the irqdomain tree will be sent
by Grant before this one gets integrated.

Conflicts:
drivers/rtc/rtc-at91sam9.c

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
12 years agoARM: at91: at91sam9x5cm/dt: add leds support
Jean-Christophe PLAGNIOL-VILLARD [Thu, 23 Feb 2012 15:09:41 +0000 (23:09 +0800)]
ARM: at91: at91sam9x5cm/dt: add leds support

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
12 years agoARM: at91: usb_a9g20/dt: add gpio-keys support
Jean-Christophe PLAGNIOL-VILLARD [Sat, 4 Feb 2012 04:43:10 +0000 (12:43 +0800)]
ARM: at91: usb_a9g20/dt: add gpio-keys support

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
12 years agoARM: at91: at91sam9m10g45ek/dt: add gpio-keys support
Jean-Christophe PLAGNIOL-VILLARD [Sat, 4 Feb 2012 04:42:35 +0000 (12:42 +0800)]
ARM: at91: at91sam9m10g45ek/dt: add gpio-keys support

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
12 years agoARM: at91: at91sam9m10g45ek/dt: add leds support
Jean-Christophe PLAGNIOL-VILLARD [Sat, 4 Feb 2012 04:26:01 +0000 (12:26 +0800)]
ARM: at91: at91sam9m10g45ek/dt: add leds support

Use the gpio for d7 as we do not support yet the pwm led via dt.

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
12 years agoARM: at91: usb_a9g20/dt: add leds support
Jean-Christophe PLAGNIOL-VILLARD [Fri, 3 Feb 2012 17:24:22 +0000 (01:24 +0800)]
ARM: at91: usb_a9g20/dt: add leds support

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
12 years agoARM: at91/pio: add new PIO3 features
Nicolas Ferre [Tue, 20 Jul 2010 17:18:51 +0000 (19:18 +0200)]
ARM: at91/pio: add new PIO3 features

This patch adds the support for new PIO controller found on some
at91sam SOCs.
- more peripheral multiplexing
- more features to configure on a PIO (pull-down, Schmitt trigger, debouncer)
- support for several IRQ triggering features (type and polarity)

Support for those new features are retrieved from the device tree
compatibility string.

Debugfs at91_gpio file is updated to monitor configuration.

Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
12 years agoARM: at91: add sam9_smc.o to at91sam9x5 build
Nicolas Ferre [Tue, 21 Feb 2012 08:54:00 +0000 (09:54 +0100)]
ARM: at91: add sam9_smc.o to at91sam9x5 build

Add these SMC accessors to the at91sam9x5 as we will need them for
NAND flash (for instance).

Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
12 years agoARM: at91/tc/clocksource: Add 32 bit variant to Timer Counter
Nicolas Ferre [Thu, 19 Jan 2012 17:44:49 +0000 (18:44 +0100)]
ARM: at91/tc/clocksource: Add 32 bit variant to Timer Counter

Some SoC have a 32 bit variant of Timer Counter Blocks. We do not
need the chaining of two 16 bit counters anymore for them.

The SoC nature is deduced from the device tree "compatible" string.
For non-device-tree configurations, backward compatibility is maintained
by using the default 16 bit counter configuration.

This patch addresses both the atmel_tclib and its user: tcb_clksrc
clocksource.

Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
12 years agoARM: at91/tc: add device tree support to atmel_tclib
Nicolas Ferre [Thu, 19 Jan 2012 09:13:40 +0000 (10:13 +0100)]
ARM: at91/tc: add device tree support to atmel_tclib

Device tree support added to atmel_tclib: the generic Timer Counter
library. This is used by the clocksource/clockevent driver tcb_clksrc.

The current DT enabled platforms are also modified to use it:
- .dtsi files are modified to add Timer Counter Block entries
- alias are created to allow identification of each block
- clkdev lookup tables are added for clocks identification.

Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
12 years agoARM: at91/tclib: take iomem size from resource
Nicolas Ferre [Wed, 18 Jan 2012 15:56:36 +0000 (16:56 +0100)]
ARM: at91/tclib: take iomem size from resource

Requesting iomem region and ioremaping is now done using
the resource size specified instead of a constant value.

Each <SoC>_device.c file is modified accordingly to reflect
actual user interface size.

Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
12 years agoARM: at91/pit: add traces in case of error
Nicolas Ferre [Fri, 17 Feb 2012 10:54:29 +0000 (11:54 +0100)]
ARM: at91/pit: add traces in case of error

Traces related to IRQ management are useful for timers in case of
non-working IRQ subsystem (switch to irq_domain for instance).

Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
12 years agoARM: at91: pit add DT support
Jean-Christophe PLAGNIOL-VILLARD [Mon, 27 Feb 2012 10:19:34 +0000 (11:19 +0100)]
ARM: at91: pit add DT support

Retreive registers address and IRQ from device tree entry.
Called from at91_dt_init_irq() so that timers are up-n-running
when timers initialization will occur.

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
[nicolas.ferre@atmel.com: change error path and interrupts property handling]
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
12 years agoARM: at91: AIC and GPIO IRQ device tree initialization
Nicolas Ferre [Tue, 14 Feb 2012 17:08:14 +0000 (18:08 +0100)]
ARM: at91: AIC and GPIO IRQ device tree initialization

Both AIC and GPIO controllers are now using the standard of_irq_init()
function to initialize IRQs in case of DT use.
The DT specific initialization functions are now separated from the
non-DT case and are now using "linear" irq domains.
The .map() irqdomain operation is responsible for positioning the IRQ
handlers. In AIC case, the Linux IRQ number is directly programmed in
the hardware to avoid an additional reverse mapping operation.
The AIC position its irq domain as the "default" irq domain.

For DT case, the priority is not yet filled in the SMR. It will be the
subject of another patch.

Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
12 years agoARM: at91/board-dt: remove AIC irq domain from board file
Nicolas Ferre [Thu, 2 Feb 2012 14:47:58 +0000 (15:47 +0100)]
ARM: at91/board-dt: remove AIC irq domain from board file

Adding of irqdomain in AIC code make the specification
of the irq domain in board file useless.

Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
12 years agoARM: at91/gpio: remove the static specification of gpio_chip.base
Nicolas Ferre [Thu, 8 Dec 2011 14:35:22 +0000 (15:35 +0100)]
ARM: at91/gpio: remove the static specification of gpio_chip.base

This value is determined at runtime using device tree or platform data
information.

Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
12 years agoARM: at91/gpio: add .to_irq gpio_chip handler
Nicolas Ferre [Sat, 11 Feb 2012 14:56:01 +0000 (15:56 +0100)]
ARM: at91/gpio: add .to_irq gpio_chip handler

Replace the gpio_to_irq() macro by a plain gpiolib .to_irq() handler.
This call is using the irqdomain to translate hardware to Linux
IRQ numbers.
The irq_to_gpio() macro is completely removed.

Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
12 years agoARM: at91/gpio: non-DT builds do not have gpio_chip.of_node field
Nicolas Ferre [Mon, 13 Feb 2012 10:26:25 +0000 (11:26 +0100)]
ARM: at91/gpio: non-DT builds do not have gpio_chip.of_node field

Protect build failure in case of non-DT configuration: the
gpio_chip structure does not have a of_node field in case of
!CONFIG_OF_GPIO.

Keep this in a separate patch as it can be reverted if the
field is added for both DT/non-DT cases.

Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
12 years agoARM: at91/gpio: add irqdomain and DT support
Nicolas Ferre [Sat, 11 Feb 2012 14:41:40 +0000 (15:41 +0100)]
ARM: at91/gpio: add irqdomain and DT support

Add "legacy" type of irqdomain to preserve old-style numbering
and allow smooth transition for both DT and non-DT cases.

Original idea and code by Jean-Christophe Plagniol-Villard.

Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
12 years agoARM: at91/gpio: change comments and one variable name
Nicolas Ferre [Sat, 11 Feb 2012 14:28:08 +0000 (15:28 +0100)]
ARM: at91/gpio: change comments and one variable name

What was true only on at91sam9263 about the sharing of a single AIC
IRQ line for several GPIO banks is now used by several Atmel SoCs.

Change a variable name to allow better understanding while
introducing IRQ domains in following patches.

Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
12 years agoARM/USB: at91/ohci-at91: remove the use of irq_to_gpio
Nicolas Ferre [Sat, 11 Feb 2012 13:23:06 +0000 (14:23 +0100)]
ARM/USB: at91/ohci-at91: remove the use of irq_to_gpio

irq_to_gpio() macro will be removed from AT91 GPIO interrupt
controller. So we replace it with the use of gpio_to_irq()
and a reworked test.

Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: linux-usb@vger.kernel.org
12 years agoARM: at91/snapper9260: move gpio_to_irq out of structure initialization
Nicolas Ferre [Sat, 11 Feb 2012 19:48:52 +0000 (20:48 +0100)]
ARM: at91/snapper9260: move gpio_to_irq out of structure initialization

gpio_to_irq() implementation will be moved from a macro to a
plain function: we cannot use it in a structure initialization
anymore.

Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Reviewed-by: Ryan Mallon <rmallon@gmail.com>
12 years agoARM: at91/aic: add irq domain and device tree support
Nicolas Ferre [Tue, 22 Nov 2011 21:26:09 +0000 (22:26 +0100)]
ARM: at91/aic: add irq domain and device tree support

Add an irqdomain for the AIC interrupt controller.
The device tree support is mapping the registers and
is using the irq_domain_add_legacy() to manage hwirq
translation.
The documentation is describing the meaning of the
two cells required for using this "interrupt-controller"
in a device tree node.

Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
12 years agoMerge branch 'irqdomain/next' of git://git.secretlab.ca/git/linux-2.6
Nicolas Ferre [Thu, 1 Mar 2012 12:24:22 +0000 (13:24 +0100)]
Merge branch 'irqdomain/next' of git://git.secretlab.ca/git/linux-2.6

12 years agoMerge branch 'dt' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap...
Arnd Bergmann [Wed, 29 Feb 2012 21:08:48 +0000 (21:08 +0000)]
Merge branch 'dt' of git://git./linux/kernel/git/tmlind/linux-omap into next/dt

* 'dt' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
  arm/dts: Add support for TI OMAP3 EVM board
  arm/dts: OMAP4: Update DTS file with new GIC bindings
  arm/dts: OMAP3: Add i2c controller nodes
  arm/dts: OMAP4: Add i2c controller nodes
  ARM: OMAP2+: Set Kconfig dependencies for PROC_DEVICETREE
  arm/dts: OMAP3&4: Remove the '0x' prefix for serial nodes
  ARM: OMAP1: kconfig: Enable IRQ_DOMAIN by default for OMAP1 platforms
  ARM: OMAP2+: pm: Do not init statically the SR and voltage layer with DT
  ARM: OMAP2+: omap_device: Replace dev_warn by dev_dbg in omap_device_build_from_dt
  ARM: OMAP2+: board-generic: Remove un-needed .atag_offset for DT_MACHINE
  ARM: OMAP2+: kconfig: Enable devicetree by default for OMAP2+ systems
  arm/dts: OMAP: Remove bootargs node from board files

12 years agoMerge branch 'at91-3.4-base2+cleanup' of git://github.com/at91linux/linux-at91 into...
Arnd Bergmann [Mon, 27 Feb 2012 17:22:36 +0000 (17:22 +0000)]
Merge branch 'at91-3.4-base2+cleanup' of git://github.com/at91linux/linux-at91 into at91/staging/base2+cleanup

* 'at91-3.4-base2+cleanup' of git://github.com/at91linux/linux-at91: (20 commits)
  ARM: at91: properly sort dtb files in Makefile.boot
  ARM: at91: add at91sam9g25ek.dts in Makefile.boot
  ARM: at91/board-dt: drop default console
  Atmel: move console default platform_device to serial driver
  ARM: at91: merge SRAM Memory banks thanks to mirroring
  ARM: at91: finally drop at91_sys_read/write
  ARM: at91/rtc-at91sam9: pass the GPBR to use via resources
  ARM: at91:rtc/rtc-at91sam9: ioremap register bank
  ARM: at91/rtc-at91sam9: each SoC can select the RTT device to use
  ARM: at91/PMC: make register base soc independent
  ARM: at91/PMC: move assignment out of printf
  ARM: at91/pm_slowclock: add runtime detection of memory contoller
  ARM: at91: make sdram/ddr register base soc independent
  ARM: at91: move at91rm9200 sdramc defines to at91rm9200_sdramc.h
  ARM: at91/pm_slowclock: function slow_clock() accepts parameters
  ARM: at91/pm_slowclock: rename register to named define
  ARM: at91/ST: remove not needed casts
  ARM: at91: make ST (System Timer) soc independent
  ARM: at91: make matrix register base soc independent
  ARM: at91/at91x40: remove use of at91_sys_read/write

Based on top of the at91/9x5, rmk/for-armsoc, at91/device-board,
at91/pm_cleanup and at91/base.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
12 years agoMerge branch 'imx/dt' of git://git.linaro.org/people/shawnguo/linux-2.6 into next/dt
Arnd Bergmann [Tue, 28 Feb 2012 12:26:06 +0000 (12:26 +0000)]
Merge branch 'imx/dt' of git://git.linaro.org/people/shawnguo/linux-2.6 into next/dt

* 'imx/dt' of git://git.linaro.org/people/shawnguo/linux-2.6: (7 commits)
  ARM: dts: imx6q-sabrelite: add vmmc-supply for usdhc
  ARM: dts: imx6q-arm2: add vmmc-supply for usdhc
  ARM: dts: imx51-babbage: update mc13892 device
  ARM: dts: imx6q-sabrelite: add sgtl5000 audio codec
  ARM: dts: imx6q-sabrelite: add 2p5v and 3p3v regulators
  ARM i.MX5/6: Add dt support for generic boards
  ARM: imx5: generate dtbs for imx5 boards

(update to Linux 3.3-rc5)

12 years agoARM: dts: imx6q-sabrelite: add vmmc-supply for usdhc
Shawn Guo [Mon, 27 Feb 2012 09:15:12 +0000 (17:15 +0800)]
ARM: dts: imx6q-sabrelite: add vmmc-supply for usdhc

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
12 years agoARM: dts: imx6q-arm2: add vmmc-supply for usdhc
Shawn Guo [Mon, 27 Feb 2012 09:11:12 +0000 (17:11 +0800)]
ARM: dts: imx6q-arm2: add vmmc-supply for usdhc

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
12 years agoARM: dts: imx51-babbage: update mc13892 device
Shawn Guo [Mon, 27 Feb 2012 05:50:31 +0000 (13:50 +0800)]
ARM: dts: imx51-babbage: update mc13892 device

It adds regulators, removes invalid property fsl,mc13xxx-uses-regulator,
and fixes interrupt for mc13892.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
12 years agoARM: dts: imx6q-sabrelite: add sgtl5000 audio codec
Richard Zhao [Thu, 2 Feb 2012 02:12:03 +0000 (10:12 +0800)]
ARM: dts: imx6q-sabrelite: add sgtl5000 audio codec

Signed-off-by: Richard Zhao <richard.zhao@linaro.org>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
12 years agoARM: dts: imx6q-sabrelite: add 2p5v and 3p3v regulators
Richard Zhao [Thu, 2 Feb 2012 02:12:02 +0000 (10:12 +0800)]
ARM: dts: imx6q-sabrelite: add 2p5v and 3p3v regulators

Signed-off-by: Richard Zhao <richard.zhao@linaro.org>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
12 years agoARM i.MX5/6: Add dt support for generic boards
Sascha Hauer [Fri, 17 Feb 2012 11:07:00 +0000 (12:07 +0100)]
ARM i.MX5/6: Add dt support for generic boards

Apart from the iomux setup which may not be needed on custom
boards the kernel starts fine using the devicetree, so add
generic boards to the dt_compat entries.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
12 years agoARM: imx5: generate dtbs for imx5 boards
Shawn Guo [Tue, 31 Jan 2012 07:33:26 +0000 (15:33 +0800)]
ARM: imx5: generate dtbs for imx5 boards

It helps to generate device tree blobs for imx5 boards with command
'make ARCH=arm dtbs'.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
12 years agomfd: twl-core: Add IRQ_DOMAIN dependency
Grant Likely [Fri, 24 Feb 2012 21:58:54 +0000 (14:58 -0700)]
mfd: twl-core: Add IRQ_DOMAIN dependency

TWL4030 depends on IRQ_DOMAIN support, so this patch selects it in Kconfig.
It used to be that CONFIG_IRQ_DOMAIN must only be selected by the architecture,
but recent cleanups have fixed it so that it is safe to select from anywhere.

Signed-off-by: Benoit Cousson <b-cousson@ti.com>
[grant.likely: Changed from a depends to a select]
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Cc: Samuel Ortiz <sameo@linux.intel.com>
12 years agodevicetree: Add empty of_platform_populate() for !CONFIG_OF_ADDRESS (sparc)
Grant Likely [Fri, 24 Feb 2012 21:58:34 +0000 (14:58 -0700)]
devicetree: Add empty of_platform_populate() for !CONFIG_OF_ADDRESS (sparc)

Sparc has its own helpers for translating address ranges when the device
tree is parsed at boot time, and it isn't able to use of_platform_populate().
However, there are some device drivers that want to use that function on
other DT enabled platforms (ie. TWL4030).  This patch adds an empty
of_platform_populate() implementation that returns an error when
CONFIG_OF_ADDRESS is not selected.

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Cc: Benoit Cousson <b-cousson@ti.com>
Cc: Samuel Ortiz <sameo@linux.intel.com>
12 years agoirq_domain: Centralize definition of irq_dispose_mapping()
Grant Likely [Fri, 24 Feb 2012 15:24:17 +0000 (08:24 -0700)]
irq_domain: Centralize definition of irq_dispose_mapping()

Several architectures define their own empty irq_dispose_mapping().  Since
the irq_domain code is centralized now, there is little need to do so.  This
patch removes them and creates a new empty copy when !CONFIG_IRQ_DOMAIN is
selected.

The patch also means that IRQ_DOMAIN becomes selectable on all architectures.

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Cc: Rob Herring <rob.herring@calxeda.com>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Jonas Bonn <jonas@southpole.se>
Cc: sparclinux@vger.kernel.org
Cc: linux@lists.openrisc.net
12 years agoLinux 3.3-rc5 v3.3-rc5
Linus Torvalds [Sat, 25 Feb 2012 20:18:16 +0000 (12:18 -0800)]
Linux 3.3-rc5

12 years agoMerge tag 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck...
Linus Torvalds [Sat, 25 Feb 2012 20:12:08 +0000 (12:12 -0800)]
Merge tag 'hwmon-for-linus' of git://git./linux/kernel/git/groeck/linux-staging

Couple of minor driver fixes.

* tag 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging:
  hwmon: (max34440) Fix resetting temperature history
  hwmon: (f75375s) Fix register write order when setting fans to full speed
  hwmon: (ads1015) Fix file leak in probe function
  hwmon: (max6639) Fix PPR register initialization to set both channels
  hwmon: (max6639) Fix FAN_FROM_REG calculation

12 years agoMerge branch 'rc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild
Linus Torvalds [Sat, 25 Feb 2012 20:11:25 +0000 (12:11 -0800)]
Merge branch 'rc-fixes' of git://git./linux/kernel/git/mmarek/kbuild

three kbuild fixes for 3.3:
 - make deb-pkg symlink race fix.
 - make coccicheck fix.
 - Dropping the check for modutils.  This is not a regression, but
   allows the module-init-tools replacement kmod work with the 3.3
   kernel.

* 'rc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild:
  coccicheck: change handling of C={1,2} when M= is set
  builddeb: Don't create files in /tmp with predictable names
  kbuild: do not check for ancient modutils tools

12 years agoautofs: work around unhappy compat problem on x86-64
Ian Kent [Wed, 22 Feb 2012 12:45:44 +0000 (20:45 +0800)]
autofs: work around unhappy compat problem on x86-64

When the autofs protocol version 5 packet type was added in commit
5c0a32fc2cd0 ("autofs4: add new packet type for v5 communications"), it
obvously tried quite hard to be word-size agnostic, and uses explicitly
sized fields that are all correctly aligned.

However, with the final "char name[NAME_MAX+1]" array at the end, the
actual size of the structure ends up being not very well defined:
because the struct isn't marked 'packed', doing a "sizeof()" on it will
align the size of the struct up to the biggest alignment of the members
it has.

And despite all the members being the same, the alignment of them is
different: a "__u64" has 4-byte alignment on x86-32, but native 8-byte
alignment on x86-64.  And while 'NAME_MAX+1' ends up being a nice round
number (256), the name[] array starts out a 4-byte aligned.

End result: the "packed" size of the structure is 300 bytes: 4-byte, but
not 8-byte aligned.

As a result, despite all the fields being in the same place on all
architectures, sizeof() will round up that size to 304 bytes on
architectures that have 8-byte alignment for u64.

Note that this is *not* a problem for 32-bit compat mode on POWER, since
there __u64 is 8-byte aligned even in 32-bit mode.  But on x86, 32-bit
and 64-bit alignment is different for 64-bit entities, and as a result
the structure that has exactly the same layout has different sizes.

So on x86-64, but no other architecture, we will just subtract 4 from
the size of the structure when running in a compat task.  That way we
will write the properly sized packet that user mode expects.

Not pretty.  Sadly, this very subtle, and unnecessary, size difference
has been encoded in user space that wants to read packets of *exactly*
the right size, and will refuse to touch anything else.

Reported-and-tested-by: Thomas Meyer <thomas@m3y3r.de>
Signed-off-by: Ian Kent <raven@themaw.net>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agoMerge tag 'rdma-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland...
Linus Torvalds [Sat, 25 Feb 2012 04:03:14 +0000 (20:03 -0800)]
Merge tag 'rdma-for-linus' of git://git./linux/kernel/git/roland/infiniband

One InfiniBand/RDMA regression fix for 3.3:

 - mlx4 SR-IOV changes added static exported functions, which doesn't
   build on powerpc at least.  Fix from Doug Ledford for this.

* tag 'rdma-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband:
  mlx4_core: Exported functions can't be static

12 years agoMerge branch 'for_3.4/dts_updates' of git://git.kernel.org/pub/scm/linux/kernel/git...
Tony Lindgren [Sat, 25 Feb 2012 00:48:27 +0000 (16:48 -0800)]
Merge branch 'for_3.4/dts_updates' of git://git./linux/kernel/git/bcousson/linux-omap-dt into dt

12 years agoMerge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi...
Linus Torvalds [Sat, 25 Feb 2012 00:08:51 +0000 (16:08 -0800)]
Merge tag 'scsi-fixes' of git://git./linux/kernel/git/jejb/scsi-rc-fixes-2.6

SCSI fixes on 20120224:
 "This is a set of assorted bug fixes for power management, mpt2sas,
  ipr, the rdac device handler and quite a big chunk for qla2xxx (plus a
  use after free of scsi_host in scsi_scan.c). "

* tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6:
  [SCSI] scsi_dh_rdac: Fix for unbalanced reference count
  [SCSI] scsi_pm: Fix bug in the SCSI power management handler
  [SCSI] scsi_scan: Fix 'Poison overwritten' warning caused by using freed 'shost'
  [SCSI] qla2xxx: Update version number to 8.03.07.13-k.
  [SCSI] qla2xxx: Proper detection of firmware abort error code for ISP82xx.
  [SCSI] qla2xxx: Remove resetting memory during device initialization for ISP82xx.
  [SCSI] qla2xxx: Complete mailbox command timedout to avoid initialization failures during next reset cycle.
  [SCSI] qla2xxx: Remove check for null fcport from host reset handler.
  [SCSI] qla2xxx: Correct out of bounds read of ISP2200 mailbox registers.
  [SCSI] qla2xxx: Remove errant clearing of MBX_INTERRUPT flag during CT-IOCB processing.
  [SCSI] qla2xxx: Clear options-flags while issuing stop-firmware mbx command.
  [SCSI] qla2xxx: Add an "is reset active" helper.
  [SCSI] qla2xxx: Add check for null fcport references in qla2xxx_queuecommand.
  [SCSI] qla2xxx: Propagate up abort failures.
  [SCSI] isci: Fix NULL ptr dereference when no firmware is being loaded
  [SCSI] ipr: fix eeh recovery for 64-bit adapters
  [SCSI] mpt2sas: Fix mismatch in mpt2sas_base_hard_reset_handler() mutex lock-unlock

12 years agococcicheck: change handling of C={1,2} when M= is set
Greg Dietsche [Fri, 20 Jan 2012 23:10:35 +0000 (17:10 -0600)]
coccicheck: change handling of C={1,2} when M= is set

This patch reverts a portion of d0bc1fb4 so that coccicheck will
work properly when C=1 or C=2.

Reported-and-tested-by: Brice Goglin <Brice.Goglin@inria.fr>
Signed-off-by: Greg Dietsche <Gregory.Dietsche@cuw.edu>
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Michal Marek <mmarek@suse.cz>
12 years agoarm/dts: Add support for TI OMAP3 EVM board
Vaibhav Hiremath [Fri, 16 Dec 2011 07:05:53 +0000 (12:35 +0530)]
arm/dts: Add support for TI OMAP3 EVM board

Add OMAP3 EVM (OMAP3530, AM/DM37x) DTS file to use the omap3.dtsi SoC file,
along with memory node information.

Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
Signed-off-by: Benoit Cousson <b-cousson@ti.com>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
12 years agoarm/dts: OMAP4: Update DTS file with new GIC bindings
Benoit Cousson [Fri, 25 Nov 2011 11:11:52 +0000 (12:11 +0100)]
arm/dts: OMAP4: Update DTS file with new GIC bindings

The GIC binding was updated in 3.2 and expects 3 interrupt-cells.
- Update the #interrupt-cells

Signed-off-by: Benoit Cousson <b-cousson@ti.com>
Acked-by: Rob Herring <rob.herring@calxeda.com>
12 years agoarm/dts: OMAP3: Add i2c controller nodes
Benoit Cousson [Tue, 30 Aug 2011 14:50:24 +0000 (16:50 +0200)]
arm/dts: OMAP3: Add i2c controller nodes

Add i2c controllers nodes into the main ocp bus.

Signed-off-by: Benoit Cousson <b-cousson@ti.com>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Rob Herring <rob.herring@calxeda.com>
12 years agoarm/dts: OMAP4: Add i2c controller nodes
Benoit Cousson [Wed, 17 Aug 2011 13:30:03 +0000 (19:00 +0530)]
arm/dts: OMAP4: Add i2c controller nodes

Add i2c controllers nodes into the main ocp bus.

Signed-off-by: Benoit Cousson <b-cousson@ti.com>
Acked-by: Rob Herring <rob.herring@calxeda.com>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
12 years agoMerge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab...
Linus Torvalds [Fri, 24 Feb 2012 20:32:51 +0000 (12:32 -0800)]
Merge branch 'v4l_for_linus' of git://git./linux/kernel/git/mchehab/linux-media

* 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media:
  [media] hdpvr: update picture controls to support firmware versions > 0.15
  [media] wl128x: fix build errors when GPIOLIB is not enabled
  [media] hdpvr: fix race conditon during start of streaming
  [media] omap3isp: Fix crash caused by subdevs now having a pointer to devnodes
  [media] imon: don't wedge hardware after early callbacks

12 years agoepoll: ep_unregister_pollwait() can use the freed pwq->whead
Oleg Nesterov [Fri, 24 Feb 2012 19:07:29 +0000 (20:07 +0100)]
epoll: ep_unregister_pollwait() can use the freed pwq->whead

signalfd_cleanup() ensures that ->signalfd_wqh is not used, but
this is not enough. eppoll_entry->whead still points to the memory
we are going to free, ep_unregister_pollwait()->remove_wait_queue()
is obviously unsafe.

Change ep_poll_callback(POLLFREE) to set eppoll_entry->whead = NULL,
change ep_unregister_pollwait() to check pwq->whead != NULL under
rcu_read_lock() before remove_wait_queue(). We add the new helper,
ep_remove_wait_queue(), for this.

This works because sighand_cachep is SLAB_DESTROY_BY_RCU and because
->signalfd_wqh is initialized in sighand_ctor(), not in copy_sighand.
ep_unregister_pollwait()->remove_wait_queue() can play with already
freed and potentially reused ->sighand, but this is fine. This memory
must have the valid ->signalfd_wqh until rcu_read_unlock().

Reported-by: Maxime Bizon <mbizon@freebox.fr>
Cc: <stable@kernel.org>
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agoepoll: introduce POLLFREE to flush ->signalfd_wqh before kfree()
Oleg Nesterov [Fri, 24 Feb 2012 19:07:11 +0000 (20:07 +0100)]
epoll: introduce POLLFREE to flush ->signalfd_wqh before kfree()

This patch is intentionally incomplete to simplify the review.
It ignores ep_unregister_pollwait() which plays with the same wqh.
See the next change.

epoll assumes that the EPOLL_CTL_ADD'ed file controls everything
f_op->poll() needs. In particular it assumes that the wait queue
can't go away until eventpoll_release(). This is not true in case
of signalfd, the task which does EPOLL_CTL_ADD uses its ->sighand
which is not connected to the file.

This patch adds the special event, POLLFREE, currently only for
epoll. It expects that init_poll_funcptr()'ed hook should do the
necessary cleanup. Perhaps it should be defined as EPOLLFREE in
eventpoll.

__cleanup_sighand() is changed to do wake_up_poll(POLLFREE) if
->signalfd_wqh is not empty, we add the new signalfd_cleanup()
helper.

ep_poll_callback(POLLFREE) simply does list_del_init(task_list).
This make this poll entry inconsistent, but we don't care. If you
share epoll fd which contains our sigfd with another process you
should blame yourself. signalfd is "really special". I simply do
not know how we can define the "right" semantics if it used with
epoll.

The main problem is, epoll calls signalfd_poll() once to establish
the connection with the wait queue, after that signalfd_poll(NULL)
returns the different/inconsistent results depending on who does
EPOLL_CTL_MOD/signalfd_read/etc. IOW: apart from sigmask, signalfd
has nothing to do with the file, it works with the current thread.

In short: this patch is the hack which tries to fix the symptoms.
It also assumes that nobody can take tasklist_lock under epoll
locks, this seems to be true.

Note:

- we do not have wake_up_all_poll() but wake_up_poll()
  is fine, poll/epoll doesn't use WQ_FLAG_EXCLUSIVE.

- signalfd_cleanup() uses POLLHUP along with POLLFREE,
  we need a couple of simple changes in eventpoll.c to
  make sure it can't be "lost".

Reported-by: Maxime Bizon <mbizon@freebox.fr>
Cc: <stable@kernel.org>
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux...
Linus Torvalds [Fri, 24 Feb 2012 17:02:53 +0000 (09:02 -0800)]
Merge branch 'for-linus' of git://git./linux/kernel/git/mason/linux-btrfs

Quoth Chris:
 "This is later than I wanted because I got backed up running through
  btrfs bugs from the Oracle QA teams.  But they are all bug fixes that
  we've queued and tested since rc1.

  Nothing in particular stands out, this just reflects bug fixing and QA
  done in parallel by all the btrfs developers.  The most user visible
  of these is:

    Btrfs: clear the extent uptodate bits during parent transid failures

  Because that helps deal with out of date drives (say an iscsi disk
  that has gone away and come back).  The old code wasn't always
  properly retrying the other mirror for this type of failure."

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs: (24 commits)
  Btrfs: fix compiler warnings on 32 bit systems
  Btrfs: increase the global block reserve estimates
  Btrfs: clear the extent uptodate bits during parent transid failures
  Btrfs: add extra sanity checks on the path names in btrfs_mksubvol
  Btrfs: make sure we update latest_bdev
  Btrfs: improve error handling for btrfs_insert_dir_item callers
  Btrfs: be less strict on finding next node in clear_extent_bit
  Btrfs: fix a bug on overcommit stuff
  Btrfs: kick out redundant stuff in convert_extent_bit
  Btrfs: skip states when they does not contain bits to clear
  Btrfs: check return value of lookup_extent_mapping() correctly
  Btrfs: fix deadlock on page lock when doing auto-defragment
  Btrfs: fix return value check of extent_io_ops
  btrfs: honor umask when creating subvol root
  btrfs: silence warning in raid array setup
  btrfs: fix structs where bitfields and spinlock/atomic share 8B word
  btrfs: delalloc for page dirtied out-of-band in fixup worker
  Btrfs: fix memory leak in load_free_space_cache()
  btrfs: don't check DUP chunks twice
  Btrfs: fix trim 0 bytes after a device delete
  ...

12 years agoMerge tag 'for-linus' of git://linux-c6x.org/git/projects/linux-c6x-upstreaming
Linus Torvalds [Fri, 24 Feb 2012 17:01:46 +0000 (09:01 -0800)]
Merge tag 'for-linus' of git://linux-c6x.org/git/projects/linux-c6x-upstreaming

This is the arch/c6x part of commit 7c43185138cf ("Kbuild: Use dtc's -d
(dependency) option") which was dropped because c6x had not yet been
merged at the time.

* tag 'for-linus' of git://linux-c6x.org/git/projects/linux-c6x-upstreaming:
  Kbuild: Use dtc's -d (dependency) option

12 years agoMAINTAINERS: drop me from PA-RISC maintenance
Kyle McMartin [Fri, 24 Feb 2012 15:36:16 +0000 (10:36 -0500)]
MAINTAINERS: drop me from PA-RISC maintenance

I don't even live in the same country as any of my PA-RISC hardware
these days, so the odds of me touching the code are pretty low.
(Also re-order things to ensure jejb gets CC'd since he's been the
primary maintainer for the last few years.)

Signed-off-by: Kyle McMartin <kyle@mcmartin.ca>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agoNOMMU: Don't need to clear vm_mm when deleting a VMA
David Howells [Thu, 23 Feb 2012 13:51:00 +0000 (13:51 +0000)]
NOMMU: Don't need to clear vm_mm when deleting a VMA

Don't clear vm_mm in a deleted VMA as it's unnecessary and might
conceivably break the filesystem or driver VMA close routine.

Reported-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: David Howells <dhowells@redhat.com>
Acked-by: Al Viro <viro@zeniv.linux.org.uk>
cc: stable@vger.kernel.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agoNOMMU: Lock i_mmap_mutex for access to the VMA prio list
David Howells [Thu, 23 Feb 2012 13:50:35 +0000 (13:50 +0000)]
NOMMU: Lock i_mmap_mutex for access to the VMA prio list

Lock i_mmap_mutex for access to the VMA prio list to prevent concurrent
access.  Currently, certain parts of the mmap handling are protected by
the region mutex, but not all.

Reported-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: David Howells <dhowells@redhat.com>
Acked-by: Al Viro <viro@zeniv.linux.org.uk>
cc: stable@vger.kernel.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agoMerge tag 'rmobile-for-linus' of git://github.com/pmundt/linux-sh
Linus Torvalds [Fri, 24 Feb 2012 16:57:22 +0000 (08:57 -0800)]
Merge tag 'rmobile-for-linus' of git://github.com/pmundt/linux-sh

SH/R-Mobile fixes for 3.3-rc5

* tag 'rmobile-for-linus' of git://github.com/pmundt/linux-sh:
  arch/arm/mach-shmobile/board-ag5evm.c: included linux/dma-mapping.h twice
  ARM: mach-shmobile: r8a7779 PFC IPSR4 fix
  ARM: mach-shmobile: sh73a0 PSTR 32-bit access fix
  ARM: mach-shmobile: add GPIO-to-IRQ translation to sh7372
  ARM: mach-shmobile: clock-sh73a0: add DSIxPHY clock support
  arm: fix compile failure in mach-shmobile/board-ag5evm.c
  ARM: mach-shmobile: mackerel: add ak4642 amixer settings on comment
  ARM: mach-shmobile: mackerel: use renesas_usbhs instead of r8a66597_hcd
  ARM: mach-shmobile: simplify MMCIF DMA configuration
  ARM: mach-shmobile: IRQ driven GPIO key support for Kota2
  ARM: mach-shmobile: sh73a0 IRQ sparse alloc fix
  ARM: mach-shmobile: sh73a0 PINT IRQ base fix

12 years agoMerge tag 'sh-for-linus' of git://github.com/pmundt/linux-sh
Linus Torvalds [Fri, 24 Feb 2012 16:56:51 +0000 (08:56 -0800)]
Merge tag 'sh-for-linus' of git://github.com/pmundt/linux-sh

SuperH fixes for 3.3-rc5

* tag 'sh-for-linus' of git://github.com/pmundt/linux-sh:
  sh: Fix sh2a build error for CONFIG_CACHE_WRITETHROUGH
  sh: modify a resource of sh_eth_giga1_resources in board-sh7757lcr
  arch/sh: remove references to cpu_*_map.
  sh: Fix typo in pci-sh7780.c
  sh: add platform_device for SPI1 in setup-sh7757
  sh: modify resource for SPI0 in setup-sh7757
  sh: se7724: fix compile breakage
  sh: clkfwk: bugfix: use clk_reparent() for div6 clocks
  sh: clock-sh7724: fixup sh_fsi clock settings
  sh: sh7757lcr: update to the new MMCIF DMA configuration
  sh: fix the sh_mmcif_plat_data in board-sh7757lcr
  video: pvr2fb: Fix up spurious section mismatch warnings.
  sh: Defer to asm-generic/device.h.

12 years agomm: memcg: Correct unregistring of events attached to the same eventfd
Anton Vorontsov [Fri, 24 Feb 2012 01:14:46 +0000 (05:14 +0400)]
mm: memcg: Correct unregistring of events attached to the same eventfd

There is an issue when memcg unregisters events that were attached to
the same eventfd:

- On the first call mem_cgroup_usage_unregister_event() removes all
  events attached to a given eventfd, and if there were no events left,
  thresholds->primary would become NULL;

- Since there were several events registered, cgroups core will call
  mem_cgroup_usage_unregister_event() again, but now kernel will oops,
  as the function doesn't expect that threshold->primary may be NULL.

That's a good question whether mem_cgroup_usage_unregister_event()
should actually remove all events in one go, but nowadays it can't
do any better as cftype->unregister_event callback doesn't pass
any private event-associated cookie. So, let's fix the issue by
simply checking for threshold->primary.

FWIW, w/o the patch the following oops may be observed:

 BUG: unable to handle kernel NULL pointer dereference at 0000000000000004
 IP: [<ffffffff810be32c>] mem_cgroup_usage_unregister_event+0x9c/0x1f0
 Pid: 574, comm: kworker/0:2 Not tainted 3.3.0-rc4+ #9 Bochs Bochs
 RIP: 0010:[<ffffffff810be32c>]  [<ffffffff810be32c>] mem_cgroup_usage_unregister_event+0x9c/0x1f0
 RSP: 0018:ffff88001d0b9d60  EFLAGS: 00010246
 Process kworker/0:2 (pid: 574, threadinfo ffff88001d0b8000, task ffff88001de91cc0)
 Call Trace:
  [<ffffffff8107092b>] cgroup_event_remove+0x2b/0x60
  [<ffffffff8103db94>] process_one_work+0x174/0x450
  [<ffffffff8103e413>] worker_thread+0x123/0x2d0

Cc: stable <stable@vger.kernel.org>
Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
Acked-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Kirill A. Shutemov <kirill@shutemov.name>
Cc: Michal Hocko <mhocko@suse.cz>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agoirq_domain/mips: Allow irq_domain on MIPS
Grant Likely [Fri, 24 Feb 2012 15:07:06 +0000 (08:07 -0700)]
irq_domain/mips: Allow irq_domain on MIPS

This patch makes IRQ_DOMAIN usable on MIPS.  It uses an ugly workaround
to preserve current behaviour so that MIPS has time to add irq_domain
registration to the irq controller drivers.  The workaround will be
removed in Linux v3.6

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Rob Herring <rob.herring@calxeda.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-mips@linux-mips.org
12 years agohwmon: (max34440) Fix resetting temperature history
Guenter Roeck [Fri, 24 Feb 2012 11:44:34 +0000 (03:44 -0800)]
hwmon: (max34440) Fix resetting temperature history

Temperature history is reset by writing 0x8000 into the peak temperature
register, not 0xffff.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Acked-by: Jean Delvare <khali@linux-fr.org>
12 years agoBtrfs: fix compiler warnings on 32 bit systems
Chris Mason [Fri, 24 Feb 2012 15:39:05 +0000 (10:39 -0500)]
Btrfs: fix compiler warnings on 32 bit systems

The enospc tracing code added some interesting uses of
u64 pointer casts.

Signed-off-by: Chris Mason <chris.mason@oracle.com>
12 years agoMerge branch 'vexpress-dt-v3.3-rc4' of git://git.linaro.org/people/pawelmoll/linux...
Arnd Bergmann [Fri, 24 Feb 2012 12:39:18 +0000 (12:39 +0000)]
Merge branch 'vexpress-dt-v3.3-rc4' of git://git.linaro.org/people/pawelmoll/linux into next/dt

* 'vexpress-dt-v3.3-rc4' of git://git.linaro.org/people/pawelmoll/linux: (573 commits)
  ARM: vexpress: Add Device Tree for V2P-CA15 core tile (TC1 variant)
  ARM: vexpress: Add Device Tree for V2P-CA9 core tile
  ARM: vexpress: Add Device Tree for V2P-CA5s core tile
  ARM: vexpress: Motherboard RS1 memory map support
  ARM: vexpress: Add Device Tree support
  ARM: vexpress: Use FDT data in platform SMP calls
  ARM: versatile: Map local timers using Device Tree when possible
  ARM: vexpress: Get rid of MMIO_P2V

This adds full device tree boot support for the versatile express
platform, as has been awaited for a long time.

Conflicts:
arch/arm/mach-vexpress/core.h

The definition of AMBA_DEVICE was removed in one branch, and the
definition of MMIO_P2V was removed in the other branch.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
12 years agoARM: vexpress: Add Device Tree for V2P-CA15 core tile (TC1 variant)
Pawel Moll [Thu, 15 Dec 2011 10:57:28 +0000 (10:57 +0000)]
ARM: vexpress: Add Device Tree for V2P-CA15 core tile (TC1 variant)

This patch adds Device Tree file for the CoreTile Express A15x2
(V2P-CA15) with Test Chip 1.

As the chip's GIC has 160 interrupt inputs and equivalent SMM
(FPGA) has GIC synthesised with 256 interrupts, NR_IRQS is
increased.

Signed-off-by: Pawel Moll <pawel.moll@arm.com>
12 years agoARM: vexpress: Add Device Tree for V2P-CA9 core tile
Pawel Moll [Fri, 9 Dec 2011 18:40:31 +0000 (18:40 +0000)]
ARM: vexpress: Add Device Tree for V2P-CA9 core tile

This patch adds Device Tree file for the CoreTile Express A9x4 (V2P-CA9).

Signed-off-by: Pawel Moll <pawel.moll@arm.com>
12 years agoARM: vexpress: Add Device Tree for V2P-CA5s core tile
Pawel Moll [Fri, 9 Dec 2011 18:41:27 +0000 (18:41 +0000)]
ARM: vexpress: Add Device Tree for V2P-CA5s core tile

This patch adds Device Tree file for the CoreTile Express A5x2 (V2P-CA5s).

Signed-off-by: Pawel Moll <pawel.moll@arm.com>
12 years agoARM: vexpress: Motherboard RS1 memory map support
Pawel Moll [Fri, 9 Dec 2011 18:47:39 +0000 (18:47 +0000)]
ARM: vexpress: Motherboard RS1 memory map support

This patch adds support for RS1 memory map based Versatile Express
motherboard.

Signed-off-by: Pawel Moll <pawel.moll@arm.com>
12 years agoARM: vexpress: Add Device Tree support
Pawel Moll [Thu, 23 Feb 2012 13:04:51 +0000 (13:04 +0000)]
ARM: vexpress: Add Device Tree support

This patch adds generic Versatile Express DT machine description,
Device Tree description for the motherboard and documentation for
the bindings.

Signed-off-by: Pawel Moll <pawel.moll@arm.com>
12 years agoARM: vexpress: Use FDT data in platform SMP calls
Pawel Moll [Fri, 24 Feb 2012 09:18:14 +0000 (09:18 +0000)]
ARM: vexpress: Use FDT data in platform SMP calls

Scan flatten device looking for A5/A9 SCU node and initialize
it using base address in "reg" property. If nothing is found,
assume that there is no special SCU initialization required
and initialize CPUs basing on numbers of "cpu" type devices
in "cpus" node of the Device Tree.

All this happens only if the board was booted with FDT,
otherwise ct_desc callbacks are used.

Signed-off-by: Pawel Moll <pawel.moll@arm.com>
12 years agoarch/arm/mach-shmobile/board-ag5evm.c: included linux/dma-mapping.h twice
Danny Kukawka [Thu, 16 Feb 2012 14:46:38 +0000 (15:46 +0100)]
arch/arm/mach-shmobile/board-ag5evm.c: included linux/dma-mapping.h twice

arch/arm/mach-shmobile/board-ag5evm.c: included 'linux/dma-mapping.h'
twice, remove the duplicate.

Signed-off-by: Danny Kukawka <danny.kukawka@bisect.de>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
12 years agoARM: mach-shmobile: r8a7779 PFC IPSR4 fix
Magnus Damm [Mon, 30 Jan 2012 02:25:07 +0000 (11:25 +0900)]
ARM: mach-shmobile: r8a7779 PFC IPSR4 fix

Fix the bit field width information for the IPSR4 register
in the r8a7779 pin function controller (PFC).

Without this fix the Marzen board fails to receive data
over the serial console due to misconfigured pin function
for the RX pin.

Signed-off-by: Magnus Damm <damm@opensource.se>
Tested-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tested-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
12 years agoARM: mach-shmobile: sh73a0 PSTR 32-bit access fix
Magnus Damm [Mon, 30 Jan 2012 02:03:49 +0000 (11:03 +0900)]
ARM: mach-shmobile: sh73a0 PSTR 32-bit access fix

Convert the sh73a0 SMP code to use 32-bit PSTR access.

This fixes wakeup from deep sleep for sh73a0 secondary CPUs.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
12 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux into rmobile-fixes...
Paul Mundt [Fri, 24 Feb 2012 04:23:23 +0000 (13:23 +0900)]
Merge git://git./linux/kernel/git/torvalds/linux into rmobile-fixes-for-linus

12 years agosh: Fix sh2a build error for CONFIG_CACHE_WRITETHROUGH
Phil Edworthy [Tue, 21 Feb 2012 08:29:57 +0000 (08:29 +0000)]
sh: Fix sh2a build error for CONFIG_CACHE_WRITETHROUGH

Signed-off-by: Phil Edworthy <phil.edworthy@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
12 years agosh: modify a resource of sh_eth_giga1_resources in board-sh7757lcr
Shimoda, Yoshihiro [Mon, 20 Feb 2012 08:26:50 +0000 (17:26 +0900)]
sh: modify a resource of sh_eth_giga1_resources in board-sh7757lcr

The latest sh_eth driver needs a resource of TSU in the channel 1,
if the controller has TSU registers. So, this patch adds the resource.

Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
12 years agoarch/sh: remove references to cpu_*_map.
Rusty Russell [Wed, 15 Feb 2012 04:58:04 +0000 (15:28 +1030)]
arch/sh: remove references to cpu_*_map.

This has been obsolescent for a while; time for the final push.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Cc: Paul Mundt <lethal@linux-sh.org>
Cc: linux-sh@vger.kernel.org
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
12 years agosh: Fix typo in pci-sh7780.c
Masanari Iida [Sat, 4 Feb 2012 12:40:24 +0000 (21:40 +0900)]
sh: Fix typo in pci-sh7780.c

Correct spelling "erorr" to "error" in
arch/sh/drivers/pci/pci-sh7780.c

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
12 years agoRestore direct_io / truncate locking API
Anton Altaparmakov [Thu, 23 Feb 2012 23:40:05 +0000 (23:40 +0000)]
Restore direct_io / truncate locking API

With kernel 3.1, Christoph removed i_alloc_sem and replaced it with
calls (namely inode_dio_wait() and inode_dio_done()) which are
EXPORT_SYMBOL_GPL() thus they cannot be used by non-GPL file systems and
further inode_dio_wait() was pushed from notify_change() into the file
system ->setattr() method but no non-GPL file system can make this call.

That means non-GPL file systems cannot exist any more unless they do not
use any VFS functionality related to reading/writing as far as I can
tell or at least as long as they want to implement direct i/o.

Both Linus and Al (and others) have said on LKML that this breakage of
the VFS API should not have happened and that the change was simply
missed as it was not documented in the change logs of the patches that
did those changes.

This patch changes the two function exports in question to be
EXPORT_SYMBOL() thus restoring the VFS API as it used to be - accessible
for all modules.

Christoph, who introduced the two functions and exported them GPL-only
is CC-ed on this patch to give him the opportunity to object to the
symbols being changed in this manner if he did indeed intend them to be
GPL-only and does not want them to become available to all modules.

Signed-off-by: Anton Altaparmakov <anton@tuxera.com>
CC: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agoMerge branch 'for-linus' of git://oss.sgi.com/xfs/xfs
Linus Torvalds [Thu, 23 Feb 2012 23:38:57 +0000 (15:38 -0800)]
Merge branch 'for-linus' of git://oss.sgi.com/xfs/xfs

A fix from Jesper Juhl removes an assignment in an ASSERT when a compare
is intended.  Two fixes from Mitsuo Hayasaka address off-by-ones in XFS
quota enforcement.

* 'for-linus' of git://oss.sgi.com/xfs/xfs:
  xfs: make inode quota check more general
  xfs: change available ranges of softlimit and hardlimit in quota check
  XFS: xfs_trans_add_item() - don't assign in ASSERT() when compare is intended

12 years agoARM: OMAP2+: Set Kconfig dependencies for PROC_DEVICETREE
Tony Lindgren [Thu, 23 Feb 2012 18:17:02 +0000 (10:17 -0800)]
ARM: OMAP2+: Set Kconfig dependencies for PROC_DEVICETREE

Otherwise we get:

warning: (ARCH_OMAP2PLUS) selects PROC_DEVICETREE which has
unmet direct dependencies (OF && PROC_FS && !SPARC)

Signed-off-by: Tony Lindgren <tony@atomide.com>
12 years agoirq_domain/x86: Convert x86 (embedded) to use common irq_domain
Grant Likely [Fri, 16 Dec 2011 22:50:17 +0000 (15:50 -0700)]
irq_domain/x86: Convert x86 (embedded) to use common irq_domain

This patch removes the x86-specific definition of irq_domain and replaces
it with the common implementation.

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: Rob Herring <rob.herring@calxeda.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
12 years agoMerge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc
Linus Torvalds [Thu, 23 Feb 2012 19:48:36 +0000 (11:48 -0800)]
Merge branch 'merge' of git://git./linux/kernel/git/benh/powerpc

BenH says:
 'Here are a few more powerpc bits for you.  A stupid regression I
  introduced with my previous commit to "fix" program check exceptions
  (brown paper bag for me), fix the cpuidle default, a bug fix for
  something that isn't strictly speaking a regression but some upstream
  changes causes it to show in lockdep now while it didn't before, and
  finally a trivial one for rusty to make his life easier later on
  removing the old cpumask cruft. '

* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc:
  powerpc: Fix various issues with return to userspace
  cpuidle: Default y on powerpc pSeries
  powerpc: Fix program check handling when lockdep is enabled
  powerpc: Remove references to cpu_*_map

12 years agoMerge tag 'sound-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
Linus Torvalds [Thu, 23 Feb 2012 19:28:05 +0000 (11:28 -0800)]
Merge tag 'sound-fixes' of git://git./linux/kernel/git/tiwai/sound

sound fixes for 3.3-rc5

Just a collection of boring small fixes for ASoC, HD-audio Realtek
and USB-audio drivers.

* tag 'sound-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
  ALSA: snd-usb-caiaq: Fix the return of XRUN
  ASoC: ak4642: fixup HeadPhone L/R dapm settings
  ALSA: hda/realtek - Fix surround output regression on Acer Aspire 5935
  ALSA: hda/realtek - Fix overflow of vol/sw check bitmap
  ALSA: usb-audio: avoid integer overflow in create_fixed_stream_quirk()
  ASoC: wm8962: Fix sidetone enumeration texts

12 years agoBtrfs: increase the global block reserve estimates
Liu Bo [Thu, 23 Feb 2012 15:49:04 +0000 (10:49 -0500)]
Btrfs: increase the global block reserve estimates

When doing IO with large amounts of data fragmentation, the global block
reserve calulations are too low.  This increases them to avoid
ENOSPC crashes.

Signed-off-by: Liu Bo <liubo2009@cn.fujitsu.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
12 years agoBtrfs: clear the extent uptodate bits during parent transid failures
Chris Mason [Wed, 22 Feb 2012 17:36:24 +0000 (12:36 -0500)]
Btrfs: clear the extent uptodate bits during parent transid failures

If btrfs reads a block and finds a parent transid mismatch, it clears
the uptodate flags on the extent buffer, and the pages inside it.  But
we only clear the uptodate bits in the state tree if the block straddles
more than one page.

This is from an old optimization from to reduce contention on the extent
state tree.  But it is buggy because the code that retries a read from
a different copy of the block is going to find the uptodate state bits
set and skip the IO.

The end result of the bug is that we'll never actually read the good
copy (if there is one).

The fix here is to always clear the uptodate state bits, which is safe
because this code is only called when the parent transid fails.

Signed-off-by: Chris Mason <chris.mason@oracle.com>
12 years agoBtrfs: add extra sanity checks on the path names in btrfs_mksubvol
Chris Mason [Tue, 21 Feb 2012 03:14:55 +0000 (22:14 -0500)]
Btrfs: add extra sanity checks on the path names in btrfs_mksubvol

Signed-off-by: Chris Mason <chris.mason@oracle.com>
12 years agoBtrfs: make sure we update latest_bdev
Chris Mason [Tue, 21 Feb 2012 01:53:43 +0000 (20:53 -0500)]
Btrfs: make sure we update latest_bdev

When we are setting up the mount, we close all the
devices that were not actually part of the metadata we found.

But, we don't make sure that one of those devices wasn't
fs_devices->latest_bdev, which means we can do a use after free
on the one we closed.

This updates latest_bdev as it goes.

Signed-off-by: Chris Mason <chris.mason@oracle.com>
12 years agoBtrfs: improve error handling for btrfs_insert_dir_item callers
Chris Mason [Mon, 20 Feb 2012 13:40:56 +0000 (08:40 -0500)]
Btrfs: improve error handling for btrfs_insert_dir_item callers

This allows us to gracefully continue if we aren't able to insert
directory items, both for normal files/dirs and snapshots.

Signed-off-by: Chris Mason <chris.mason@oracle.com>
12 years agoARM: versatile: Map local timers using Device Tree when possible
Pawel Moll [Thu, 23 Feb 2012 14:57:11 +0000 (14:57 +0000)]
ARM: versatile: Map local timers using Device Tree when possible

Try to map TWD registers basing on a "arm,*-twd-timer" Device Tree
node. This overrides existing twd_base value.

Signed-off-by: Pawel Moll <pawel.moll@arm.com>
12 years agoARM: vexpress: Get rid of MMIO_P2V
Pawel Moll [Wed, 25 Jan 2012 15:37:29 +0000 (15:37 +0000)]
ARM: vexpress: Get rid of MMIO_P2V

This patch gets rid of the MMIO_P2V and __MMIO_P2V macros,
defining constant virtual base for motherboard and tile
peripherals instead.

Additionally, in preparation for the new motherboard memory
map, the motherboard peripherals are using base pointers
calculated in runtime, instead of compile-time calculated
values.

Signed-off-by: Pawel Moll <pawel.moll@arm.com>
12 years agohwmon: (f75375s) Fix register write order when setting fans to full speed
Nikolaus Schulz [Wed, 22 Feb 2012 22:18:44 +0000 (23:18 +0100)]
hwmon: (f75375s) Fix register write order when setting fans to full speed

By hwmon sysfs interface convention, setting pwm_enable to zero sets a fan
to full speed.  In the f75375s driver, this need be done by enabling
manual fan control, plus duty mode for the F875387 chip, and then setting
the maximum duty cycle.  Fix a bug where the two necessary register writes
were swapped, effectively discarding the setting to full-speed.

Signed-off-by: Nikolaus Schulz <mail@microschulz.de>
Cc: Riku Voipio <riku.voipio@iki.fi>
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
12 years agohwmon: (ads1015) Fix file leak in probe function
Guenter Roeck [Wed, 22 Feb 2012 16:13:52 +0000 (08:13 -0800)]
hwmon: (ads1015) Fix file leak in probe function

An error while creating sysfs attribute files in the driver's probe function
results in an error abort, but already created files are not removed. This patch
fixes the problem.

Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
Cc: stable@vger.kernel.org # 3.0+
Cc: Dirk Eibach <eibach@gdsys.de>
Acked-by: Jean Delvare <khali@linux-fr.org>
12 years agoARM: at91: properly sort dtb files in Makefile.boot
Jean-Christophe PLAGNIOL-VILLARD [Wed, 22 Feb 2012 16:04:04 +0000 (17:04 +0100)]
ARM: at91: properly sort dtb files in Makefile.boot

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
12 years agoARM: at91: add at91sam9g25ek.dts in Makefile.boot
Nicolas Ferre [Wed, 22 Feb 2012 11:17:36 +0000 (12:17 +0100)]
ARM: at91: add at91sam9g25ek.dts in Makefile.boot

Reported-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
12 years agoARM: at91/board-dt: drop default console
Jean-Christophe PLAGNIOL-VILLARD [Sun, 5 Feb 2012 18:54:46 +0000 (02:54 +0800)]
ARM: at91/board-dt: drop default console

This default console mechanism is not used if the console is selected
by command line (console= parameter).
Dropping this will simplify the compilation of multiple SoC in the same
kernel image.

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
12 years agoAtmel: move console default platform_device to serial driver
Jean-Christophe PLAGNIOL-VILLARD [Wed, 15 Feb 2012 16:24:07 +0000 (00:24 +0800)]
Atmel: move console default platform_device to serial driver

This variable spread on every SoC that is using the atmel_serial.c
driver can be included directly into the latter.

This will allow to compile multiple soc in the same kernel.

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Cc: Hans-Christian Egtvedt <egtvedt@samfundet.no>
Cc: kernel@avr32linux.org
12 years agoARM: at91: merge SRAM Memory banks thanks to mirroring
Jean-Christophe PLAGNIOL-VILLARD [Wed, 7 Dec 2011 10:34:47 +0000 (18:34 +0800)]
ARM: at91: merge SRAM Memory banks thanks to mirroring

On at91sam9260 and at91sam9g20 the SRAM banks are mirrored. We can
merge them together to be able to have bigger and continuous
internal RAM.

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
12 years agoARM: at91: finally drop at91_sys_read/write
Jean-Christophe PLAGNIOL-VILLARD [Wed, 15 Feb 2012 13:27:34 +0000 (21:27 +0800)]
ARM: at91: finally drop at91_sys_read/write

Remove at91_sys_read/write() from io.h file. This function
is not used anymore and was a stopper on the way to single
zImage kernel for AT91.

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>