]> Pileus Git - ~andy/linux/log
~andy/linux
12 years agoMerge branch 'clk-next' of git://git.linaro.org/people/mturquette/linux into next...
Arnd Bergmann [Wed, 16 May 2012 14:35:25 +0000 (16:35 +0200)]
Merge branch 'clk-next' of git://git.linaro.org/people/mturquette/linux into next/clock

* 'clk-next' of git://git.linaro.org/people/mturquette/linux:
  clk: Fix CLK_SET_RATE_GATE flag validation in clk_set_rate().
  clk: Provide dummy clk_unregister()
  ARM: Kirkwood: Replace clock gating
  ARM: Orion: Audio: Add clk/clkdev support
  ARM: Orion: PCIE: Add support for clk
  ARM: Orion: XOR: Add support for clk
  ARM: Orion: CESA: Add support for clk
  ARM: Orion: SDIO: Add support for clk.
  ARM: Orion: NAND: Add support for clk, if there is one.
  ARM: Orion: EHCI: Add support for enabling clocks
  ARM: Orion: SATA: Add per channel clk/clkdev support.
  ARM: Orion: UART: Get the clock rate via clk_get_rate().
  ARM: Orion: WDT: Add clk/clkdev support
  ARM: Orion: Eth: Add clk/clkdev support.
  ARM: Orion: SPI: Add clk/clkdev support.
  ARM: Orion: Add clocks using the generic clk infrastructure.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
12 years agoclk: Fix CLK_SET_RATE_GATE flag validation in clk_set_rate().
Saravana Kannan [Tue, 15 May 2012 20:43:42 +0000 (13:43 -0700)]
clk: Fix CLK_SET_RATE_GATE flag validation in clk_set_rate().

The clk_set_rate() code shouldn't check the clock's enable count when
validating CLK_SET_RATE_GATE flag since the enable count could change after
the validation. Similar to clk_set_parent(), it should instead check the
prepare count. The prepare count should go to zero only when the end user
expects the clock to not be enabled in the future. Since the code already
grabs the prepare count before validation, it's not possible for prepare
count to change after validation and by association not possible for a well
behaving end user to enable the clock while the set rate is in progress.

Signed-off-by: Saravana Kannan <skannan@codeaurora.org>
Reviewed-by: Richard Zhao <richard.zhao@freescale.com>
Signed-off-by: Mike Turquette <mturquette@linaro.org>
12 years agoclk: Provide dummy clk_unregister()
Mark Brown [Wed, 18 Apr 2012 08:07:12 +0000 (09:07 +0100)]
clk: Provide dummy clk_unregister()

While there's no actual implementation behind it having the call to use
in drivers makes them feel neater from a driver author point of view. An
actual implementation can wait for someone who needs to use the function
in a real system.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
[mturquette@linaro.org: void return type instead of int -EINVAL]
Signed-off-by: Mike Turquette <mturquette@linaro.org>
12 years agoMerge branches 'spear/clock' and 'imx/clock' into next/clock
Arnd Bergmann [Mon, 14 May 2012 15:43:35 +0000 (17:43 +0200)]
Merge branches 'spear/clock' and 'imx/clock' into next/clock

Updated to resolve dependencies.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
12 years agoMerge branch 'spear/dt' into spear/clock
Arnd Bergmann [Mon, 14 May 2012 15:31:45 +0000 (17:31 +0200)]
Merge branch 'spear/dt' into spear/clock

Conflicts:
arch/arm/mach-spear3xx/clock.c
arch/arm/mach-spear3xx/include/mach/generic.h
arch/arm/mach-spear3xx/include/mach/misc_regs.h
arch/arm/mach-spear3xx/spear320.c
arch/arm/mach-spear6xx/clock.c
arch/arm/mach-spear6xx/include/mach/misc_regs.h

Resolve even more merge conflicts.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
12 years agoMerge branch 'spear/pinctrl' into spear/clock
Arnd Bergmann [Mon, 14 May 2012 13:33:42 +0000 (15:33 +0200)]
Merge branch 'spear/pinctrl' into spear/clock

Conflicts:
arch/arm/mach-spear3xx/Makefile
arch/arm/mach-spear3xx/clock.c
arch/arm/mach-spear3xx/include/mach/generic.h
arch/arm/mach-spear6xx/clock.c
arch/arm/plat-spear/Makefile
drivers/pinctrl/core.c

This resolves some annoying merge conflicts.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
12 years agoMerge branch 'imx/pinctrl' into imx/clock
Arnd Bergmann [Mon, 14 May 2012 13:30:52 +0000 (15:30 +0200)]
Merge branch 'imx/pinctrl' into imx/clock

Conflicts:
drivers/mmc/host/sdhci-esdhc-imx.c
drivers/net/ethernet/freescale/fec.c
drivers/spi/spi-imx.c
drivers/tty/serial/imx.c

This resolves dependencies between the pinctrl and clock changes
in imx.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
12 years agoMerge branch 'spear/clock' into next/clock
Arnd Bergmann [Sat, 12 May 2012 22:11:06 +0000 (00:11 +0200)]
Merge branch 'spear/clock' into next/clock

Viresh Kumar <viresh.kumar@st.com> writes:

 This is rebased over a (merge of Mike's/clk-next & SPEAr's DT) + Russell's
 patch: CLKDEV: provide helpers for common clock framework rebased over them.

* spear/clock:
  SPEAr: Switch to common clock framework
  SPEAr: Call clk_prepare() before calling clk_enable
  SPEAr: clk: Add General Purpose Timer Synthesizer clock
  SPEAr: clk: Add Fractional Synthesizer clock
  SPEAr: clk: Add Auxiliary Synthesizer clock
  SPEAr: clk: Add VCO-PLL Synthesizer clock

Conflicts:
drivers/clk/Makefile

[Arnd: rebased again without the spear/dt branch]

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
12 years agoSPEAr: Update defconfigs
Viresh Kumar [Tue, 1 May 2012 12:46:50 +0000 (18:16 +0530)]
SPEAr: Update defconfigs

This patch updates following configuration:
- Update MTD specific configurations
- Enables JFFS2 FS support
- Updates 6xx defconfig, with recent changes done by Arnd in 6xx Kconfig

Signed-off-by: Viresh Kumar <viresh.kumar@st.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Stefan Roese <sr@denx.de>
12 years agoSPEAr: Add SMI NOR partition info in dts files
Viresh Kumar [Tue, 1 May 2012 12:39:22 +0000 (18:09 +0530)]
SPEAr: Add SMI NOR partition info in dts files

This patch adds NOR partitions in all SPEAr boards dts files.

Signed-off-by: Viresh Kumar <viresh.kumar@st.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Stefan Roese <sr@denx.de>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
12 years agoSPEAr: Switch to common clock framework
Viresh Kumar [Tue, 10 Apr 2012 03:32:35 +0000 (09:02 +0530)]
SPEAr: Switch to common clock framework

SPEAr SoCs used its own clock framework since now. From now on they will move to
use common clock framework.

This patch updates existing SPEAr machine support to adapt for common clock
framework.

Signed-off-by: Viresh Kumar <viresh.kumar@st.com>
Reviewed-by: Mike Turquette <mturquette@linaro.org>
Acked-by: Arnd Bergmann <arnd@arndb.de>
12 years agoSPEAr: Call clk_prepare() before calling clk_enable
Viresh Kumar [Mon, 16 Apr 2012 08:26:18 +0000 (13:56 +0530)]
SPEAr: Call clk_prepare() before calling clk_enable

With common clock framework, it is must to call clk_{un}prepare() before/after
clk_{dis}enable. This patch fixes this for SPEAr timer.

Signed-off-by: Viresh Kumar <viresh.kumar@st.com>
Reviewed-by: Mike Turquette <mturquette@linaro.org>
12 years agoSPEAr: clk: Add General Purpose Timer Synthesizer clock
Viresh Kumar [Wed, 11 Apr 2012 12:34:23 +0000 (18:04 +0530)]
SPEAr: clk: Add General Purpose Timer Synthesizer clock

All SPEAr SoC's contain GPT Synthesizers. Their Fout is derived from
following equations:

Fout= Fin/((2 ^ (N+1)) * (M+1))

This patch adds in support for this type of clock.

Signed-off-by: Viresh Kumar <viresh.kumar@st.com>
Reviewed-by: Mike Turquette <mturquette@linaro.org>
12 years agoSPEAr: clk: Add Fractional Synthesizer clock
Viresh Kumar [Wed, 11 Apr 2012 12:34:23 +0000 (18:04 +0530)]
SPEAr: clk: Add Fractional Synthesizer clock

All SPEAr SoC's contain Fractional Synthesizers. Their Fout is derived from
following equations:

Fout = Fin / (2 * div) (division factor)
div is 17 bits:-
     0-13 (fractional part)
     14-16 (integer part)
     div is (16-14 bits).(13-0 bits) (in binary)

     Fout = Fin/(2 * div)
     Fout = ((Fin / 10000)/(2 * div)) * 10000
     Fout = (2^14 * (Fin / 10000)/(2^14 * (2 * div))) * 10000
     Fout = (((Fin / 10000) << 14)/(2 * (div << 14))) * 10000

div << 14 is simply 17 bit value written at register.

This patch adds in support for this type of clock.

Signed-off-by: Viresh Kumar <viresh.kumar@st.com>
Reviewed-by: Mike Turquette <mturquette@linaro.org>
12 years agoSPEAr: clk: Add Auxiliary Synthesizer clock
Viresh Kumar [Wed, 11 Apr 2012 12:34:23 +0000 (18:04 +0530)]
SPEAr: clk: Add Auxiliary Synthesizer clock

All SPEAr SoC's contain Auxiliary Synthesizers. Their Fout is derived based on
values of eq, x and y.

Fout from synthesizer can be given from two equations:
Fout1 = (Fin * X/Y)/2 EQ1
Fout2 = Fin * X/Y EQ2

This patch adds in support for this type of clock.

Signed-off-by: Viresh Kumar <viresh.kumar@st.com>
Reviewed-by: Mike Turquette <mturquette@linaro.org>
12 years agoSPEAr: clk: Add VCO-PLL Synthesizer clock
Viresh Kumar [Tue, 10 Apr 2012 03:32:35 +0000 (09:02 +0530)]
SPEAr: clk: Add VCO-PLL Synthesizer clock

All SPEAr SoC's contain PLLs. Their Fout is derived based on following equations

- In normal mode
  vco = (2 * M[15:8] * Fin)/N

- In Dithered mode
  vco = (2 * M[15:0] * Fin)/(256 * N)

pll_rate = vco/2^p

vco and pll are very closely bound to each other,
"vco needs to program: mode, m & n" and "pll needs to program p",
both share common enable/disable logic and registers.

This patch adds in support for this type of clock.

Signed-off-by: Viresh Kumar <viresh.kumar@st.com>
Reviewed-by: Mike Turquette <mturquette@linaro.org>
12 years agoSPEAr: Add DT bindings for SPEAr's timer
Viresh Kumar [Sat, 21 Apr 2012 07:45:37 +0000 (13:15 +0530)]
SPEAr: Add DT bindings for SPEAr's timer

All SPEAr SoC's use ST's Timer module. This patch adds device tree probing
capability for that.

Signed-off-by: Viresh Kumar <viresh.kumar@st.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
12 years agoMerge branches 'depends/pinctrl/devel' and 'depends/rmk/clkdev' into spear/pinctrl
Arnd Bergmann [Sat, 12 May 2012 18:38:42 +0000 (20:38 +0200)]
Merge branches 'depends/pinctrl/devel' and 'depends/rmk/clkdev' into spear/pinctrl

The spear/pinctrl branch has hard dependencies on both the
pinctrl branch and the clkdev branch. We merge those here
to fix it up without having to rebase a branch that has
been pulled into other stable branches already.

Conflicts:
Documentation/driver-model/devres.txt

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
12 years agoARM: mxs: enable pinctrl support
Shawn Guo [Sun, 6 May 2012 15:13:13 +0000 (23:13 +0800)]
ARM: mxs: enable pinctrl support

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
12 years agovideo: mxsfb: adopt pinctrl support
Shawn Guo [Sun, 6 May 2012 15:01:41 +0000 (23:01 +0800)]
video: mxsfb: adopt pinctrl support

Cc: linux-fbdev@vger.kernel.org
Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
12 years agoASoC: mxs-saif: adopt pinctrl support
Shawn Guo [Sun, 6 May 2012 15:00:50 +0000 (23:00 +0800)]
ASoC: mxs-saif: adopt pinctrl support

Cc: alsa-devel@alsa-project.org
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoi2c: mxs: adopt pinctrl support
Shawn Guo [Sun, 6 May 2012 14:59:45 +0000 (22:59 +0800)]
i2c: mxs: adopt pinctrl support

Cc: linux-i2c@vger.kernel.org
Cc: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
12 years agomtd: nand: gpmi: adopt pinctrl support
Shawn Guo [Sun, 6 May 2012 14:57:41 +0000 (22:57 +0800)]
mtd: nand: gpmi: adopt pinctrl support

Cc: linux-mtd@lists.infradead.org
Cc: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
12 years agommc: mxs-mmc: adopt pinctrl support
Shawn Guo [Sun, 6 May 2012 14:56:16 +0000 (22:56 +0800)]
mmc: mxs-mmc: adopt pinctrl support

Cc: linux-mmc@vger.kernel.org
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Acked-by: Chris Ball <cjb@laptop.org>
12 years agoserial: mxs-auart: adopt pinctrl support
Shawn Guo [Sun, 6 May 2012 14:54:26 +0000 (22:54 +0800)]
serial: mxs-auart: adopt pinctrl support

Cc: linux-serial@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
12 years agoserial: amba-pl011: adopt pinctrl support
Shawn Guo [Sun, 6 May 2012 14:53:35 +0000 (22:53 +0800)]
serial: amba-pl011: adopt pinctrl support

Cc: linux-serial@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Acked-by: Russell King <rmk+kernel@arm.linux.org.uk>
12 years agospi/imx: adopt pinctrl support
Shawn Guo [Sun, 6 May 2012 12:28:12 +0000 (20:28 +0800)]
spi/imx: adopt pinctrl support

Cc: spi-devel-general@lists.sourceforge.net
Cc: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Acked-by: Dong Aisheng <dong.aisheng@linaro.org>
12 years agoi2c: imx: adopt pinctrl support
Shawn Guo [Sun, 6 May 2012 12:27:17 +0000 (20:27 +0800)]
i2c: imx: adopt pinctrl support

Cc: linux-i2c@vger.kernel.org
Cc: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Acked-by: Dong Aisheng <dong.aisheng@linaro.org>
12 years agocan: flexcan: adopt pinctrl support
Shawn Guo [Sun, 6 May 2012 12:25:13 +0000 (20:25 +0800)]
can: flexcan: adopt pinctrl support

Cc: linux-can@vger.kernel.org
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Acked-by: Marc Kleine-Budde <mkl@pengutronix.de>
Acked-by: Dong Aisheng <dong.aisheng@linaro.org>
12 years agonet: fec: adopt pinctrl support
Shawn Guo [Sun, 6 May 2012 12:24:04 +0000 (20:24 +0800)]
net: fec: adopt pinctrl support

Cc: netdev@vger.kernel.org
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Acked-by: Dong Aisheng <dong.aisheng@linaro.org>
Acked-by: David S. Miller <davem@davemloft.net>
12 years agoMerge branch 'clk/mxs' of git://git.linaro.org/people/shawnguo/linux-2.6 into next...
Arnd Bergmann [Fri, 11 May 2012 15:15:31 +0000 (17:15 +0200)]
Merge branch 'clk/mxs' of git://git.linaro.org/people/shawnguo/linux-2.6 into next/clock

Shawn Guo <shawn.guo@linaro.org> writes:

  mxs common clk porting for v3.5.  It depends on the following two branches.

  [1] git://git.linaro.org/people/mturquette/linux.git clk-next
  [2] http://ftp.arm.linux.org.uk/pub/linux/arm/kernel/git-cur/linux-arm.git clkdev

  As the mxs device tree conversion will constantly touch clock files,
  to save the conflicts, the updated mxs/dt branch coming later will
  based on this pull-request.

* 'clk/mxs' of git://git.linaro.org/people/shawnguo/linux-2.6:
  ARM: mxs: remove now unused timer_clk argument from mxs_timer_init
  ARM: mxs: remove old clock support
  ARM: mxs: switch to common clk framework
  ARM: mxs: change the lookup name for fec phy clock
  ARM: mxs: request clock for timer
  clk: mxs: add clock support for imx28
  clk: mxs: add clock support for imx23
  clk: mxs: add mxs specific clocks

Includes an update to Linux 3.4-rc6

Conflicts:
drivers/clk/Makefile

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
12 years agoMerge tag 'imx-common-clk' of git://git.pengutronix.de/git/imx/linux-2.6 into next...
Arnd Bergmann [Fri, 11 May 2012 15:09:51 +0000 (17:09 +0200)]
Merge tag 'imx-common-clk' of git://git.pengutronix.de/git/imx/linux-2.6 into next/clock

Sascha Hauer <s.hauer@pengutronix.de> writes:

 ARM i.MX common clock framework support

 Same as with Shawns series this one depends on:
   git://git.linaro.org/people/mturquette/linux.git clk-next
   http://ftp.arm.linux.org.uk/pub/linux/arm/kernel/git-cur/linux-arm.git clkdev

* tag 'imx-common-clk' of git://git.pengutronix.de/git/imx/linux-2.6: (34 commits)
  ARM i.MX: remove now unused clock files
  ARM: i.MX6: implement clocks using common clock framework
  ARM i.MX35: implement clocks using common clock framework
  ARM i.MX5: implement clocks using common clock framework
  ARM i.MX31: implement clocks using common clock framework
  ARM i.MX27: implement clocks using common clock framework
  ARM i.MX21: implement clocks using common clock framework
  ARM i.MX1: implement clocks using common clock framework
  ARM i.MX25: implement clocks using common clock framework
  ARM: imx: add common clock support for clk busy
  ARM: imx: add common clock support for pfd
  ARM i.MX: Add common clock support for 2bit gate
  ARM: imx: add common clock support for pllv3
  ARM i.MX: Add common clock support for pllv2
  ARM i.MX: Add common clock support for pllv1
  ARM i.MX: prepare for common clock framework
  ARM i.MX3: Make ccm base address a variable
  ARM i.MX timer: request correct clock
  ARM i.MX5: prepare gpc_dvfs_clk
  rtc: imx dryice: Add missing clk_prepare
  ...

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
12 years agoMerge branch 'depends/rmk/clkdev' into next/clock
Arnd Bergmann [Fri, 11 May 2012 15:13:00 +0000 (17:13 +0200)]
Merge branch 'depends/rmk/clkdev' into next/clock

* depends/rmk/clkdev:
  CLKDEV: provide helpers for common clock framework
  ARM: 7392/1: CLKDEV: Optimize clk_find()
  ARM: 7376/1: clkdev: Implement managed clk_get()

12 years agoMerge branch 'depends/clk/clk-next' into next/clock
Arnd Bergmann [Fri, 11 May 2012 14:34:55 +0000 (16:34 +0200)]
Merge branch 'depends/clk/clk-next' into next/clock

Mike Turquette <mturquette@ti.com> has asked me to take the clock
changes through the arm-soc tree while there are still so many
inderdependencies, so this is the entire branch.

* depends/clk/clk-next: (30 commits)
  clk: add a fixed factor clock
  clk: mux: assign init data
  clk: remove COMMON_CLK_DISABLE_UNUSED
  clk: prevent spurious parent rate propagation
  MAINTAINERS: add entry for common clk framework
  clk: clk_set_rate() must fail if CLK_SET_RATE_GATE is set and clk is enabled
  clk: Use a separate struct for holding init data.
  clk: constify parent name arrays in macros
  clk: remove trailing whitespace from clk.h
  clk: select CLKDEV_LOOKUP for COMMON_CLK
  clk: Don't set clk->new_rate twice
  clk: clk-private: Add DEFINE_CLK macro
  clk: clk-gate: Create clk_gate_endisable()
  clk: Fix typo in comment
  clk: propagate round_rate for CLK_SET_RATE_PARENT case
  clk: pass parent_rate into .set_rate
  clk: always pass parent_rate into .round_rate
  clk: basic: improve parent_names & return errors
  clk: core: copy parent_names & return error codes
  clk: Constify parent name arrays
  ...

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
12 years agotty: serial: imx: adopt pinctrl support
Shawn Guo [Sun, 6 May 2012 12:21:05 +0000 (20:21 +0800)]
tty: serial: imx: adopt pinctrl support

Cc: linux-serial@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Acked-by: Dong Aisheng <dong.aisheng@linaro.org>
12 years agommc: sdhci-imx-esdhc: adopt pinctrl support
Dong Aisheng [Fri, 11 May 2012 06:56:01 +0000 (14:56 +0800)]
mmc: sdhci-imx-esdhc: adopt pinctrl support

Cc: linux-mmc@vger.kernel.org
Cc: Chris Ball <cjb@laptop.org>
Signed-off-by: Dong Aisheng <dong.aisheng@linaro.org>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Acked-by: Stephen Warren <swarren@wwwdotorg.org>
12 years agopinctrl: (cosmetic) fix two entries in DocBook comments
Guennadi Liakhovetski [Wed, 9 May 2012 07:22:40 +0000 (09:22 +0200)]
pinctrl: (cosmetic) fix two entries in DocBook comments

This removes a repeated word and a repeated and incomplete line from two
pinctrl headers.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
12 years agoARM i.MX: remove now unused clock files
Sascha Hauer [Wed, 9 May 2012 07:00:40 +0000 (09:00 +0200)]
ARM i.MX: remove now unused clock files

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
12 years agoARM: i.MX6: implement clocks using common clock framework
Shawn Guo [Wed, 4 Apr 2012 12:53:22 +0000 (20:53 +0800)]
ARM: i.MX6: implement clocks using common clock framework

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
12 years agoARM i.MX35: implement clocks using common clock framework
Sascha Hauer [Tue, 3 Apr 2012 10:41:13 +0000 (12:41 +0200)]
ARM i.MX35: implement clocks using common clock framework

This patch also adds the SPDIF baud clock mux and dividers.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
12 years agoARM i.MX5: implement clocks using common clock framework
Sascha Hauer [Mon, 19 Mar 2012 11:36:57 +0000 (12:36 +0100)]
ARM i.MX5: implement clocks using common clock framework

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
12 years agoARM: Kirkwood: Replace clock gating
Andrew Lunn [Wed, 11 Apr 2012 19:07:45 +0000 (21:07 +0200)]
ARM: Kirkwood: Replace clock gating

Add a varient of the basic clk-gate code. This variant calls a
function before gating the clock off. This function is used to disable
the SATA or PCIe PHY.

Now that all the drivers prepare and enable there clk as needed, there
is no need for the common code to keep track of which clocks need
gating on. Let the common clock framework turn off clocks which are
not used.

Buy using the added clk varient, when the clk framework turns off SATA
or PCIe clocks, we also disabled SATA and PCIe PHYs which were not
needed.

The function kirkwood_pcie_id() can now be called outside of __init
code, so remove this property for it, and functions it calls.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Tested-by: Jamie Lentin <jm@lentin.co.uk>
Signed-off-by: Mike Turquette <mturquette@linaro.org>
12 years agoARM: Orion: Audio: Add clk/clkdev support
Andrew Lunn [Fri, 9 Mar 2012 08:56:41 +0000 (09:56 +0100)]
ARM: Orion: Audio: Add clk/clkdev support

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Tested-by: Jamie Lentin <jm@lentin.co.uk>
Signed-off-by: Mike Turquette <mturquette@linaro.org>
12 years agoARM: Orion: PCIE: Add support for clk
Andrew Lunn [Thu, 8 Mar 2012 20:45:59 +0000 (21:45 +0100)]
ARM: Orion: PCIE: Add support for clk

Prepare and enable the clocks when the board indicates the pcie buses
will be used.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Tested-by: Jamie Lentin <jm@lentin.co.uk>
Signed-off-by: Mike Turquette <mturquette@linaro.org>
12 years agoARM: Orion: XOR: Add support for clk
Andrew Lunn [Sun, 19 Feb 2012 12:30:26 +0000 (13:30 +0100)]
ARM: Orion: XOR: Add support for clk

Some orion platforms can gate the XOR driver clock. If the clock
exisits, unable/disable it as appropriate.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Tested-by: Jamie Lentin <jm@lentin.co.uk>
Signed-off-by: Mike Turquette <mturquette@linaro.org>
12 years agoARM: Orion: CESA: Add support for clk
Andrew Lunn [Sun, 19 Feb 2012 10:56:19 +0000 (11:56 +0100)]
ARM: Orion: CESA: Add support for clk

Some orion platforms support gating of the clock. If the clock exists
enable/disbale it as appropriate.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Tested-by: Jamie Lentin <jm@lentin.co.uk>
Signed-off-by: Mike Turquette <mturquette@linaro.org>
12 years agoARM: Orion: SDIO: Add support for clk.
Andrew Lunn [Sun, 19 Feb 2012 10:39:27 +0000 (11:39 +0100)]
ARM: Orion: SDIO: Add support for clk.

Some orion devices can gate the SDIO clock. If the clock exists,
enable/disable it as appropriate.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Tested-by: Jamie Lentin <jm@lentin.co.uk>
Signed-off-by: Mike Turquette <mturquette@linaro.org>
12 years agoARM: Orion: NAND: Add support for clk, if there is one.
Andrew Lunn [Sun, 19 Feb 2012 10:01:22 +0000 (11:01 +0100)]
ARM: Orion: NAND: Add support for clk, if there is one.

Not all orion platforms can gate the clock, but if it does exist,
enable/disable it as appropriate.

v2: Fix the name of the clkdev entry.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Tested-by: Jamie Lentin <jm@lentin.co.uk>
Signed-off-by: Mike Turquette <mturquette@linaro.org>
12 years agoARM: Orion: EHCI: Add support for enabling clocks
Andrew Lunn [Sun, 15 Apr 2012 10:53:47 +0000 (12:53 +0200)]
ARM: Orion: EHCI: Add support for enabling clocks

Not all platforms support gating the clock, so it is not an error if
the clock does not exist. However, if it does exist, we should
enable/disable it as appropriate.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Tested-by: Jamie Lentin <jm@lentin.co.uk>
Signed-off-by: Mike Turquette <mturquette@linaro.org>
12 years agoARM: Orion: SATA: Add per channel clk/clkdev support.
Andrew Lunn [Sat, 18 Feb 2012 21:26:42 +0000 (22:26 +0100)]
ARM: Orion: SATA: Add per channel clk/clkdev support.

The Orion kirkwood chips have a gatable clock per SATA channel. Add
code to get and enable this clk if it exists.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Tested-by: Jamie Lentin <jm@lentin.co.uk>
Signed-off-by: Mike Turquette <mturquette@linaro.org>
12 years agoARM: Orion: UART: Get the clock rate via clk_get_rate().
Andrew Lunn [Sat, 24 Dec 2011 02:06:34 +0000 (03:06 +0100)]
ARM: Orion: UART: Get the clock rate via clk_get_rate().

Let the machine pass to the platform which clock is used by the uart.
Enable the clock and use clk_get_rate() to determine its rate.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Tested-by: Jamie Lentin <jm@lentin.co.uk>
Signed-off-by: Mike Turquette <mturquette@linaro.org>
12 years agoARM: Orion: WDT: Add clk/clkdev support
Andrew Lunn [Sun, 4 Mar 2012 15:57:31 +0000 (16:57 +0100)]
ARM: Orion: WDT: Add clk/clkdev support

Remove tclk from platform data.  This makes the platform data
structure empty, so remove it.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Tested-by: Jamie Lentin <jm@lentin.co.uk>
Signed-off-by: Mike Turquette <mturquette@linaro.org>
12 years agoARM: Orion: Eth: Add clk/clkdev support.
Andrew Lunn [Sat, 24 Dec 2011 00:24:24 +0000 (01:24 +0100)]
ARM: Orion: Eth: Add clk/clkdev support.

The t_clk is moved from the shared part of the ethernet driver into
the per port section. Each port can have its own gated clock, which it
needs to enable/disable, as oppossed to there being one clock shared
by all ports. In practice, only kirkwood supports this at the moment.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Tested-by: Jamie Lentin <jm@lentin.co.uk>
Signed-off-by: Mike Turquette <mturquette@linaro.org>
12 years agoARM: Orion: SPI: Add clk/clkdev support.
Andrew Lunn [Fri, 6 Apr 2012 15:17:26 +0000 (17:17 +0200)]
ARM: Orion: SPI: Add clk/clkdev support.

Remove now redundant tclk from SPI platform data. This makes the platform
data empty, so remove it.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Tested-by: Jamie Lentin <jm@lentin.co.uk>
Signed-off-by: Mike Turquette <mturquette@linaro.org>
12 years agoARM: Orion: Add clocks using the generic clk infrastructure.
Andrew Lunn [Thu, 15 Dec 2011 07:15:07 +0000 (08:15 +0100)]
ARM: Orion: Add clocks using the generic clk infrastructure.

Add tclk as a fixed rate clock for all platforms. In addition, on
kirkwood, add a gated clock for most of the clocks which can be gated.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Tested-by: Jamie Lentin <jm@lentin.co.uk>
[mturquette@linaro.org: removed redundant CLKDEV_LOOKUP from Kconfig]
[mturquette@linaro.org: removed redundant clk.h from mach-dove/common.c]
Signed-off-by: Mike Turquette <mturquette@linaro.org>
12 years agoclk: add a fixed factor clock
Sascha Hauer [Thu, 3 May 2012 10:06:14 +0000 (15:36 +0530)]
clk: add a fixed factor clock

Having fixed factors/dividers in hardware is a common pattern, so
add a basic clock type doing this. It basically describes a fixed
factor clock using a nominator and a denominator.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Reviewed-by: Viresh Kumar <viresh.kumar@st.com>
Tested-by: Shawn Guo <shawn.guo@linaro.org>
[mturquette@linaro.org: constify parent_names in static init macro]
[mturquette@linaro.org: copy/paste bug from mux in static init macro]
[mturquette@linaro.org: fix error handling in clk_register_fixed_factor]
[mturquette@linaro.org: improve division accuracy; thanks to Saravana]
Signed-off-by: Mike Turquette <mturquette@linaro.org>
12 years agoclk: mux: assign init data
Mike Turquette [Mon, 7 May 2012 01:48:11 +0000 (18:48 -0700)]
clk: mux: assign init data

The original conversion to struct clk_hw_init failed to add the pointer
assignment in clk_register_mux.

Signed-off-by: Mike Turquette <mturquette@linaro.org>
Reported-by: Sascha Hauer <s.hauer@pengutronix.de>
12 years agoclk: remove COMMON_CLK_DISABLE_UNUSED
Mike Turquette [Wed, 2 May 2012 22:45:32 +0000 (15:45 -0700)]
clk: remove COMMON_CLK_DISABLE_UNUSED

Exposing this option generates confusion and incorrect behavior for
single-image builds across platforms.  Enable this behavior permanently.

Signed-off-by: Mike Turquette <mturquette@linaro.org>
Acked-by: Saravana Kannan <skannan@codeaurora.org>
12 years agoclk: prevent spurious parent rate propagation
Mike Turquette [Wed, 2 May 2012 23:23:43 +0000 (16:23 -0700)]
clk: prevent spurious parent rate propagation

Patch 'clk: always pass parent_rate into .round_rate' made a subtle
change to the semantics of .round_rate.  It is now expected for the
parent's rate to always be passed in, simplifying the implemenation of
various .round_rate callback definitions.

However the patch also introduced a bug in clk_calc_new_rates whereby a
clock without the CLK_SET_RATE_PARENT flag set could still propagate a
rate change up to a parent clock if the the .round_rate callback
modified the &best_parent_rate value in any way.

This patch fixes the issue at the framework level (in
clk_calc_new_rates) by specifically handling the case where the
CLK_SET_RATE_PARENT flag is not set.

Signed-off-by: Mike Turquette <mturquette@linaro.org>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
12 years agoARM: mxs: remove now unused timer_clk argument from mxs_timer_init
Shawn Guo [Sat, 28 Apr 2012 16:02:41 +0000 (00:02 +0800)]
ARM: mxs: remove now unused timer_clk argument from mxs_timer_init

With old mxs clock support removed, the timer_clk argument of
mxs_timer_init is unused now, so remove it.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
12 years agoARM: mxs: remove old clock support
Shawn Guo [Sat, 28 Apr 2012 16:02:40 +0000 (00:02 +0800)]
ARM: mxs: remove old clock support

The mxs clock has been switched to common clock framework, so the old
clock support can be removed now.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
12 years agoARM: mxs: switch to common clk framework
Shawn Guo [Sat, 28 Apr 2012 16:02:39 +0000 (00:02 +0800)]
ARM: mxs: switch to common clk framework

It switches mxs clock support to common clk framework based drivers.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
12 years agoARM: mxs: change the lookup name for fec phy clock
Shawn Guo [Sat, 28 Apr 2012 16:02:38 +0000 (00:02 +0800)]
ARM: mxs: change the lookup name for fec phy clock

Change the fec phy clock lookup name to be more accurate.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
12 years agoARM: mxs: request clock for timer
Shawn Guo [Sat, 28 Apr 2012 16:02:37 +0000 (00:02 +0800)]
ARM: mxs: request clock for timer

When mxs_timer_init() does not have a timer_clk passed in, it should
try to request clock from clkdev system.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
12 years agoclk: mxs: add clock support for imx28
Shawn Guo [Sat, 28 Apr 2012 16:02:36 +0000 (00:02 +0800)]
clk: mxs: add clock support for imx28

Add imx28 clock support based on common clk framework.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
12 years agoclk: mxs: add clock support for imx23
Shawn Guo [Sat, 28 Apr 2012 16:02:35 +0000 (00:02 +0800)]
clk: mxs: add clock support for imx23

Add imx23 clock support based on common clk framework.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
12 years agoclk: mxs: add mxs specific clocks
Shawn Guo [Sat, 28 Apr 2012 16:02:34 +0000 (00:02 +0800)]
clk: mxs: add mxs specific clocks

Add mxs specific clocks, pll, reference clock (PFD), integer divider
and fractional divider.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
12 years agoARM: imx6q: switch to use pinctrl subsystem
Dong Aisheng [Wed, 2 May 2012 11:31:21 +0000 (19:31 +0800)]
ARM: imx6q: switch to use pinctrl subsystem

Acked-by: Stephen Warren <swarren@wwwdotorg.org>
Signed-off-by: Dong Aisheng <dong.aisheng@linaro.org>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
12 years agoARM: mxs: enable pinctrl dummy states
Shawn Guo [Sun, 6 May 2012 14:14:13 +0000 (22:14 +0800)]
ARM: mxs: enable pinctrl dummy states

The mxs pinctrl driver will only support DT probe.  That said, the mxs
device drivers can only get pinctrl state from pinctrl subsystem when
the drivers get probed from device tree.

Before converting the whole mxs platform support over to device tree,
we need to enable pinctrl dummy states for those non-DT board files
to ensure the pinctrl API adopted by mxs device drivers will work for
both DT and non-DT probe.

Instead of calling pinctrl_provide_dummies() directly in every board
file, the patch introduces soc specific calls mx23_soc_init() and
mx28_soc_init() for boards' .init_machine hook to invoke, so that
any soc specific setup for non-DT boot only can be added there.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
12 years agoARM: imx: enable pinctrl dummy states
Dong Aisheng [Wed, 2 May 2012 11:31:20 +0000 (19:31 +0800)]
ARM: imx: enable pinctrl dummy states

Enable pinctrl dummy states for imx platforms without pinctrl
support.

Acked-by: Stephen Warren <swarren@wwwdotorg.org>
Signed-off-by: Dong Aisheng <dong.aisheng@linaro.org>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
12 years agopinctrl: add more info to error msgs in pin_request
Stephen Warren [Tue, 1 May 2012 17:14:15 +0000 (11:14 -0600)]
pinctrl: add more info to error msgs in pin_request

Additionally print which pin the request failed for, which entity already
claimed it, and what entity was trying to claim it.

Remove duplicate device name from a debug message.

Clean up some indentation.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
12 years agoMAINTAINERS: add entry for common clk framework
Mike Turquette [Thu, 3 May 2012 01:37:45 +0000 (18:37 -0700)]
MAINTAINERS: add entry for common clk framework

Signed-off-by: Mike Turquette <mturquette@linaro.org>
12 years agoLinux 3.4-rc6 v3.4-rc6
Linus Torvalds [Sun, 6 May 2012 22:07:32 +0000 (15:07 -0700)]
Linux 3.4-rc6

12 years agoMerge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sun, 6 May 2012 19:19:38 +0000 (12:19 -0700)]
Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull x86 fixes form Peter Anvin

* 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  intel_mid_powerbtn: mark irq as IRQF_NO_SUSPEND
  arch/x86/platform/geode/net5501.c: change active_low to 0 for LED driver
  x86, relocs: Remove an unused variable
  asm-generic: Use __BITS_PER_LONG in statfs.h
  x86/amd: Re-enable CPU topology extensions in case BIOS has disabled it

12 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux...
Linus Torvalds [Sun, 6 May 2012 17:20:07 +0000 (10:20 -0700)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs

Pull btrfs fixes from Chris Mason:
 "The big ones here are a memory leak we introduced in rc1, and a
  scheduling while atomic if the transid on disk doesn't match the
  transid we expected.  This happens for corrupt blocks, or out of date
  disks.

  It also fixes up the ioctl definition for our ioctl to resolve logical
  inode numbers.  The __u32 was a merging error and doesn't match what
  we ship in the progs."

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs:
  Btrfs: avoid sleeping in verify_parent_transid while atomic
  Btrfs: fix crash in scrub repair code when device is missing
  btrfs: Fix mismatching struct members in ioctl.h
  Btrfs: fix page leak when allocing extent buffers
  Btrfs: Add properly locking around add_root_to_dirty_list

12 years agox86: fix broken TASK_SIZE for ia32_aout
Al Viro [Sun, 6 May 2012 16:20:00 +0000 (17:20 +0100)]
x86: fix broken TASK_SIZE for ia32_aout

Setting TIF_IA32 in load_aout_binary() used to be enough; these days
TASK_SIZE is controlled by TIF_ADDR32 and that one doesn't get set
there.  Switch to use of set_personality_ia32()...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agoBtrfs: avoid sleeping in verify_parent_transid while atomic
Chris Mason [Sun, 6 May 2012 11:23:47 +0000 (07:23 -0400)]
Btrfs: avoid sleeping in verify_parent_transid while atomic

verify_parent_transid needs to lock the extent range to make
sure no IO is underway, and so it can safely clear the
uptodate bits if our checks fail.

But, a few callers are using it with spinlocks held.  Most
of the time, the generation numbers are going to match, and
we don't want to switch to a blocking lock just for the error
case.  This adds an atomic flag to verify_parent_transid,
and changes it to return EAGAIN if it needs to block to
properly verifiy things.

Signed-off-by: Chris Mason <chris.mason@oracle.com>
12 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mattst88...
Linus Torvalds [Sat, 5 May 2012 23:34:38 +0000 (16:34 -0700)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mattst88/alpha

Pull alpha fixes from Matt Turner:
 "My alpha tree is back up (after taking quite some time to get my GPG
  key signed).  It contains just some simple fixes."

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mattst88/alpha:
  alpha: silence 'const' warning in sys_marvel.c
  alpha: include module.h to fix modpost on Tsunami
  alpha: properly define get/set_rtc_time on Marvel/SMP
  alpha: VGA_HOSE depends on VGA_CONSOLE

12 years agoTTY: pdc_cons, fix regression in close
Jiri Slaby [Sat, 5 May 2012 20:49:10 +0000 (22:49 +0200)]
TTY: pdc_cons, fix regression in close

The test in pdc_console_tty_close '!tty->count' was always wrong
because tty->count is decremented after tty->ops->close is called and
thus can never be zero. Hence the 'then' branch was never executed and
the timer never deleted.

This did not matter until commit 5dd5bc40f3b6 ("TTY: pdc_cons, use
tty_port").  There we needed to set TTY in tty_port to NULL, but this
never happened due to the bug above.

So change the test to really trigger at the last close by changing the
condition to 'tty->count == 1'.

Well, the driver should not touch tty->count at all.  It should use
tty_port->count and count open count there itself.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Reported-and-tested-by: Mikulas Patocka <mpatocka@redhat.com>
Cc: Kyle McMartin <kyle@mcmartin.ca>
Cc: Helge Deller <deller@gmx.de>
Cc: "James E.J. Bottomley" <jejb@parisc-linux.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agoMerge tag 'sound-3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
Linus Torvalds [Sat, 5 May 2012 17:07:06 +0000 (10:07 -0700)]
Merge tag 'sound-3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound

Pull sound sound fixes from Takashi Iwai:
 "As good as nothing exciting here; just a few trivial fixes for various
  ASoC stuff."

* tag 'sound-3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
  ASoC: omap-pcm: Free dma buffers in case of error.
  ASoC: s3c2412-i2s: Fix dai registration
  ASoC: wm8350: Don't use locally allocated codec struct
  ASoC: tlv312aic23: unbreak resume
  ASoC: bf5xx-ssm2602: Set DAI format
  ASoC: core: check of_property_count_strings failure
  ASoC: dt: sgtl5000.txt: Add description for 'reg' field
  ASoC: wm_hubs: Make sure we don't disable differential line outputs

12 years agoMerge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux
Linus Torvalds [Sat, 5 May 2012 17:06:06 +0000 (10:06 -0700)]
Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux

Pull an ACPI patch from Len Brown:
 "It fixes a D3 issue new in 3.4-rc1."

By Lin Ming via Len Brown:
* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux:
  ACPI: Fix D3hot v D3cold confusion

12 years agoinit: don't try mounting device as nfs root unless type fully matches
Sasha Levin [Sat, 5 May 2012 15:06:35 +0000 (17:06 +0200)]
init: don't try mounting device as nfs root unless type fully matches

Currently, we'll try mounting any device who's major device number is
UNNAMED_MAJOR as NFS root.  This would happen for non-NFS devices as
well (such as 9p devices) but it wouldn't cause any issues since
mounting the device as NFS would fail quickly and the code proceeded to
doing the proper mount:

       [  101.522716] VFS: Unable to mount root fs via NFS, trying floppy.
       [  101.534499] VFS: Mounted root (9p filesystem) on device 0:18.

Commit 6829a048102a ("NFS: Retry mounting NFSROOT") introduced retries
when mounting NFS root, which means that now we don't immediately fail
and instead it takes an additional 90+ seconds until we stop retrying,
which has revealed the issue this patch fixes.

This meant that it would take an additional 90 seconds to boot when
we're not using a device type which gets detected in order before NFS.

This patch modifies the NFS type check to require device type to be
'Root_NFS' instead of requiring the device to have an UNNAMED_MAJOR
major.  This makes boot process cleaner since we now won't go through
the NFS mounting code at all when the device isn't an NFS root
("/dev/nfs").

Signed-off-by: Sasha Levin <levinsasha928@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agoMerge branch 'fix/asoc' into for-linus
Takashi Iwai [Sat, 5 May 2012 09:27:26 +0000 (11:27 +0200)]
Merge branch 'fix/asoc' into for-linus

12 years agoMerge branch 'for-3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/lrg/asoc...
Takashi Iwai [Sat, 5 May 2012 09:26:50 +0000 (11:26 +0200)]
Merge branch 'for-3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/lrg/asoc into fix/asoc

12 years agoMerge tag 'asoc-3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound...
Takashi Iwai [Sat, 5 May 2012 09:25:17 +0000 (11:25 +0200)]
Merge tag 'asoc-3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus

ASoC: Updates for 3.4

Nothing terribly exciting here, a bunch of small and simple fixes
scattered around the place.

12 years agoACPI: Fix D3hot v D3cold confusion
Lin Ming [Mon, 23 Apr 2012 01:03:49 +0000 (09:03 +0800)]
ACPI: Fix D3hot v D3cold confusion

Before this patch, ACPI_STATE_D3 incorrectly referenced D3hot
in some places, but D3cold in other places.

After this patch, ACPI_STATE_D3 always means ACPI_STATE_D3_COLD;
and all references to D3hot use ACPI_STATE_D3_HOT.

ACPI's _PR3 method is used to enter both D3hot and D3cold states.
What distinguishes D3hot from D3cold is the presence _PR3
(Power Resources for D3hot)  If these resources are all ON,
then the state is D3hot.  If _PR3 is not present,
or all _PR0 resources for the devices are OFF,
then the state is D3cold.

This patch applies after Linux-3.4-rc1.
A future syntax cleanup may remove ACPI_STATE_D3
to emphasize that it always means ACPI_STATE_D3_COLD.

Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Acked-by: Rafael J. Wysocki <rjw@sisk.pl>
Reviewed-by: Aaron Lu <aaron.lu@amd.com>
Signed-off-by: Len Brown <len.brown@intel.com>
12 years agohfsplus: Fix potential buffer overflows
Greg Kroah-Hartman [Fri, 4 May 2012 19:09:39 +0000 (12:09 -0700)]
hfsplus: Fix potential buffer overflows

Commit ec81aecb2966 ("hfs: fix a potential buffer overflow") fixed a few
potential buffer overflows in the hfs filesystem.  But as Timo Warns
pointed out, these changes also need to be made on the hfsplus
filesystem as well.

Reported-by: Timo Warns <warns@pre-sense.de>
Acked-by: WANG Cong <amwang@redhat.com>
Cc: Alexey Khoroshilov <khoroshilov@ispras.ru>
Cc: Miklos Szeredi <mszeredi@suse.cz>
Cc: Sage Weil <sage@newdream.net>
Cc: Eugene Teo <eteo@redhat.com>
Cc: Roman Zippel <zippel@linux-m68k.org>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Alexey Dobriyan <adobriyan@gmail.com>
Cc: Dave Anderson <anderson@redhat.com>
Cc: stable <stable@vger.kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agoMerge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Fri, 4 May 2012 22:35:09 +0000 (15:35 -0700)]
Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull timer fix from Thomas Gleixner.

* 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  rtc: Fix possible null pointer dereference in rtc-mpc5121.c

12 years agoMerge git://git.samba.org/sfrench/cifs-2.6
Linus Torvalds [Fri, 4 May 2012 22:34:21 +0000 (15:34 -0700)]
Merge git://git.samba.org/sfrench/cifs-2.6

Pull CIFS fixes from Steve French.

* git://git.samba.org/sfrench/cifs-2.6:
  fs/cifs: fix parsing of dfs referrals
  cifs: make sure we ignore the credentials= and cred= options
  [CIFS] Update cifs version to 1.78
  cifs - check S_AUTOMOUNT in revalidate
  cifs: add missing initialization of server->req_lock
  cifs: don't cap ra_pages at the same level as default_backing_dev_info
  CIFS: Fix indentation in cifs_show_options

12 years agoCPU frequency drivers MAINTAINERS update
Dave Jones [Fri, 4 May 2012 16:04:17 +0000 (12:04 -0400)]
CPU frequency drivers MAINTAINERS update

Remove myself as cpufreq maintainer.
x86 driver changes can go through the regular x86/ACPI trees.
ARM driver changes through the ARM trees.
cpufreq core changes are rare these days, and can just go to lkml/direct.

Signed-off-by: Dave Jones <davej@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agoseqlock: add 'raw_seqcount_begin()' function
Linus Torvalds [Fri, 4 May 2012 22:13:54 +0000 (15:13 -0700)]
seqlock: add 'raw_seqcount_begin()' function

The normal read_seqcount_begin() function will wait for any current
writers to exit their critical region by looping until the sequence
count is even.

That "wait for sequence count to stabilize" is the right thing to do if
the read-locker will just retry the whole operation on contention: no
point in doing a potentially expensive reader sequence if we know at the
beginning that we'll just end up re-doing it all.

HOWEVER.  Some users don't actually retry the operation, but instead
will abort and do the operation with proper locking.  So the sequence
count case may be the optimistic quick case, but in the presense of
writers you may want to do full locking in order to guarantee forward
progress.  The prime example of this would be the RCU name lookup.

And in that case, you may well be better off without the "retry early",
and are in a rush to instead get to the failure handling.  Thus this
"raw" interface that just returns the sequence number without testing it
- it just forces the low bit to zero so that read_seqcount_retry() will
always fail such a "active concurrent writer" scenario.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agoFix __read_seqcount_begin() to use ACCESS_ONCE for sequence value read
Linus Torvalds [Fri, 4 May 2012 21:46:02 +0000 (14:46 -0700)]
Fix __read_seqcount_begin() to use ACCESS_ONCE for sequence value read

We really need to use a ACCESS_ONCE() on the sequence value read in
__read_seqcount_begin(), because otherwise the compiler might end up
reloading the value in between the test and the return of it.  As a
result, it might end up returning an odd value (which means that a write
is in progress).

If the reader is then fast enough that that odd value is still the
current one when the read_seqcount_retry() is done, we might end up with
a "successful" read sequence, even despite the concurrent write being
active.

In practice this probably never really happens - there just isn't
anything else going on around the read of the sequence count, and the
common case is that we end up having a read barrier immediately
afterwards.

So the code sequence in which gcc might decide to reaload from memory is
small, and there's no reason to believe it would ever actually do the
reload.  But if the compiler ever were to decide to do so, it would be
incredibly annoying to debug.  Let's just make sure.

Cc: stable@kernel.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agointel_mid_powerbtn: mark irq as IRQF_NO_SUSPEND
Yong Wang [Fri, 4 May 2012 21:02:44 +0000 (14:02 -0700)]
intel_mid_powerbtn: mark irq as IRQF_NO_SUSPEND

So that the power button still wakes up the platform.

Signed-off-by: Pierre Tardy <pierre.tardy@intel.com>
Link: http://lkml.kernel.org/r/20120504210244.F2EA5A018B@akpm.mtv.corp.google.com
Tested-by: Kangkai Yin <kangkai.yin@intel.com>
Tested-by: Yong Wang <yong.y.wang@intel.com>
Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Cc: Matthew Garrett <mjg@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
12 years agoarch/x86/platform/geode/net5501.c: change active_low to 0 for LED driver
Bjarke Istrup Pedersen [Fri, 4 May 2012 21:01:45 +0000 (14:01 -0700)]
arch/x86/platform/geode/net5501.c: change active_low to 0 for LED driver

It seems that there was an error with the active_low = 1 for the
LED, since it should be set to 0 (meaning that active is high,
since 0 is false, hence the confusion.

The wiki article about it confuses it, since it contradicts itself,
regarding what turns on the LED.

I have tested 3.4-rc2 on my net5501 with this patch, and it makes the LED
behave correctly, where "none" turns it off, and "default-on" turns it on,
when echoed onto the trigger "file" in /sys/class/leds.

Signed-off-by: Bjarke Istrup Pedersen <gurligebis@gentoo.org>
Link: http://lkml.kernel.org/r/20120504210146.62186A018B@akpm.mtv.corp.google.com
Cc: Philip Prindeville <philipp@redfish-solutions.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
12 years agoBtrfs: fix crash in scrub repair code when device is missing
Stefan Behrens [Fri, 4 May 2012 19:16:07 +0000 (15:16 -0400)]
Btrfs: fix crash in scrub repair code when device is missing

Fix that when scrub tries to repair an I/O or checksum error and one of
the devices containing the mirror is missing, it crashes in bio_add_page
because the bdev is a NULL pointer for missing devices.

Reported-by: Marco L. Crociani <marco.crociani@gmail.com>
Signed-off-by: Stefan Behrens <sbehrens@giantdisaster.de>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
12 years agobtrfs: Fix mismatching struct members in ioctl.h
Alexander Block [Fri, 4 May 2012 19:16:06 +0000 (15:16 -0400)]
btrfs: Fix mismatching struct members in ioctl.h

Fix the size members of btrfs_ioctl_ino_path_args and
btrfs_ioctl_logical_ino_args. The user space btrfs-progs utilities used
__u64 and the kernel headers used __u32 before.

Signed-off-by: Alexander Block <ablock84@googlemail.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
12 years agoBtrfs: fix page leak when allocing extent buffers
Josef Bacik [Fri, 4 May 2012 19:16:06 +0000 (15:16 -0400)]
Btrfs: fix page leak when allocing extent buffers

If we happen to alloc a extent buffer and then alloc a page and notice that
page is already attached to an extent buffer, we will only unlock it and
free our existing eb.  Any pages currently attached to that eb will be
properly freed, but we don't do the page_cache_release() on the page where
we noticed the other extent buffer which can cause us to leak pages and I
hope cause the weird issues we've been seeing in this area.  Thanks,

Signed-off-by: Josef Bacik <josef@redhat.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
12 years agoBtrfs: Add properly locking around add_root_to_dirty_list
Chris Mason [Thu, 3 May 2012 16:08:48 +0000 (12:08 -0400)]
Btrfs: Add properly locking around add_root_to_dirty_list

add_root_to_dirty_list happens once at the very beginning of the
transaction, but it is still racey.

Signed-off-by: Chris Mason <chris.mason@oracle.com>
12 years agoMerge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux
Linus Torvalds [Fri, 4 May 2012 14:57:13 +0000 (07:57 -0700)]
Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux

Pull drm fixes from Dave Airlie:
 "Some minor fixes from Intel and a radeon fix.

  I have the nouveau fix for the i2c regression queued for next week,
  its mostly a revert and seems to work on the system it was originally
  introduced for thanks to some i2c core changes."

* 'drm-fixes' of git://people.freedesktop.org/~airlied/linux:
  drm/radeon: clarify and extend wb setup on APUs and NI+ asics
  drm/i915: enable dip before writing data on gen4
  fixing dmi match for hp t5745 and hp st5747 thin client
  drm/i915: Only enable IPS polling for gen5
  drm/i915: Do not read non-existent DPLL registers on PCH hardware

12 years agoMerge tag 'md-3.4-fixes' of git://neil.brown.name/md
Linus Torvalds [Fri, 4 May 2012 14:56:22 +0000 (07:56 -0700)]
Merge tag 'md-3.4-fixes' of git://neil.brown.name/md

Pull one small fix for md/bitmaps from NeilBrown:
 "This fixes a regression that was introduced in the merge window."

* tag 'md-3.4-fixes' of git://neil.brown.name/md:
  md/bitmap: fix calculation of 'chunks' - missing shift.