]> git.karo-electronics.de Git - karo-tx-linux.git/log
karo-tx-linux.git
11 years agoMerge branch 'depends/cleanup' into next/dt
Olof Johansson [Tue, 29 Jan 2013 17:35:27 +0000 (09:35 -0800)]
Merge branch 'depends/cleanup' into next/dt

11 years agoMerge tag 'davinci-for-v3.9/dt' of git://gitorious.org/linux-davinci/linux-davinci...
Olof Johansson [Tue, 29 Jan 2013 17:28:59 +0000 (09:28 -0800)]
Merge tag 'davinci-for-v3.9/dt' of git://gitorious.org/linux-davinci/linux-davinci into next/dt

From Sekhar Nori:
DaVinci DT changes for v3.9

This pull requests adds support for pinctrl, NAND
and RTC support when DA850 is booting using DT.

* tag 'davinci-for-v3.9/dt' of git://gitorious.org/linux-davinci/linux-davinci:
  ARM: davinci: da850: add RTC DT entries
  ARM: davinci: da850: move interrupt-parent property to soc node
  ARM: davinci: da8xx defconfig: enable pinctrl config option
  ARM: davinci: da850: add NAND driver DT entries
  ARM: davinci: da850: add pinctrl driver DT entries

11 years agoMerge tag 'davinci-for-v3.9/soc' of git://gitorious.org/linux-davinci/linux-davinci...
Olof Johansson [Tue, 29 Jan 2013 17:23:51 +0000 (09:23 -0800)]
Merge tag 'davinci-for-v3.9/soc' of git://gitorious.org/linux-davinci/linux-davinci into next/soc

From Sekhar Nori:
DaVinci SoC changes for v3.9

This pull request:

1) Fixes a bug with the way SPI devices were registered on DA850
2) Adds support for DSP clock and resetting the DSP on DA850
3) Fixes checkpatch issue with some existing files.

* tag 'davinci-for-v3.9/soc' of git://gitorious.org/linux-davinci/linux-davinci:
  ARM: davinci: da850: add dsp clock definition
  ARM: davinci: psc: introduce reset API
  ARM: davinci: psc.c: change pr_warning() to pr_warn()
  ARM: davinci: devices-da8xx.c: change pr_warning() to pr_warn()
  ARM: davinci: da8xx_register_spi() should not register SPI board info

Signed-off-by: Olof Johansson <olof@lixom.net>
11 years agoALSA: hda - Fix non-snoop page handling
Takashi Iwai [Tue, 29 Jan 2013 17:07:22 +0000 (18:07 +0100)]
ALSA: hda - Fix non-snoop page handling

For non-snoop mode, we fiddle with the page attributes of CORB/RIRB
and the position buffer, but also the ring buffers.  The problem is
that the current code blindly assumes that the buffer is contiguous.
However, the ring buffers may be SG-buffers, thus a wrong vmapped
address is passed there, leading to Oops.

This patch fixes the handling for SG-buffers.

Bugzilla: https://bugzilla.novell.com/show_bug.cgi?id=800701

Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
11 years agoMerge branch 'soc' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas...
Olof Johansson [Tue, 29 Jan 2013 17:09:39 +0000 (09:09 -0800)]
Merge branch 'soc' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into next/soc

From Simon Horman, a series of SoC updates for shmobile.

* 'soc' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas:
  ARM: shmobile: r8a7779: scif .irqs used SCIx_IRQ_MUXED()
  ARM: mach-shmobile: sh73a0: Initialise MMCIF using DT
  ARM: mach-shmobile: sh73a0: Minimal setup using DT
  ARM: mach-shmobile: sh73a0: Allow initialisation of GIC by DT
  ARM: SH-Mobile: sh73a0: Add CPU Hotplug
  ARM: SH-Mobile: sh73a0: Secondary CPUs handle own SCU flags
  ARM: shmobile: r8a7740: Add CPU sleep suspend
  ARM: shmobile: sh73a0: Add CPU sleep suspend
  ARM: shmobile: add function declarations for sh7372 DT helper functions
  ARM: sh7372: fix cache clean / invalidate order
  ARM: sh7372: add clock lookup entries for DT-based devices
  ARM: mach-shmobile: sh73a0 external IRQ wake update
  ARM: shmobile: sh73a0: fixup div4_clks bitmap
  ARM: shmobile: r8a7740: add TMU timer support
  ARM: shmobile: Remove duplicate inclusion of dma-mapping.h in setup-r8a7740.c

Signed-off-by: Olof Johansson <olof@lixom.net>
Fix trivial conflict in board_bcm due to Simon resolving the same conflict
with one less line of whitespace. Keeping end result common with what
we already have in arm-soc.

Conflicts:
arch/arm/mach-bcm/board_bcm.c

11 years agoARM: dts: mxs: Add the LCD to the 10049 board
Maxime Ripard [Fri, 25 Jan 2013 08:54:07 +0000 (09:54 +0100)]
ARM: dts: mxs: Add the LCD to the 10049 board

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
11 years agoARM: dts: mxs: Add muxing options for the third PWM
Maxime Ripard [Fri, 25 Jan 2013 08:54:06 +0000 (09:54 +0100)]
ARM: dts: mxs: Add muxing options for the third PWM

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
11 years agoALSA: hda - Enable LPIB delay count for Poulsbo / Oaktrail
Takashi Iwai [Tue, 29 Jan 2013 09:12:23 +0000 (10:12 +0100)]
ALSA: hda - Enable LPIB delay count for Poulsbo / Oaktrail

Currently we use LPIB forcibly for both playback and capture for
Poulsbo and Oaktrail devices, and this seems rather problematic.
The recent fix for LPIB delay count seems working well with these
devices, so let's enable it instead.

Reported-by: Martin Weishart <martin.weishart@telosalliance.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
11 years agoARM: dts: cfa10049: Change the SPI3 bus to spi-gpio
Maxime Ripard [Fri, 25 Jan 2013 08:39:35 +0000 (09:39 +0100)]
ARM: dts: cfa10049: Change the SPI3 bus to spi-gpio

The DAC found on the last chip select requires a word length of 12 bits,
which is not supported by the SSP controller of the iMX28. Use
bitbanging for that bus to support such a length.

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
11 years agoMerge tag 'regulator-3.8-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/brooni...
Linus Torvalds [Tue, 29 Jan 2013 06:44:53 +0000 (22:44 -0800)]
Merge tag 'regulator-3.8-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator

Pull regulator fixes from Mark Brown:
 "Fairly small stuff - a build failure fix for ST platforms, an error
  checking fix and an update to the MAINTAINERS file for Liam."

* tag 'regulator-3.8-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator:
  regulator: tps80031: Use IS_ERR to check return value of regulator_register()
  regulators: db8500: Fix compile failure for drivers/regulator/dbx500-prcmu.c
  regulator: MAINTAINERS: update email address

11 years agoARM: imx: Remove mx508 support
Fabio Estevam [Tue, 22 Jan 2013 12:40:55 +0000 (10:40 -0200)]
ARM: imx: Remove mx508 support

Only mx508 based board is mach-mx50_rdp and it has been marked as BROKEN
for several releases.

mx508 currently lacks clock support.

In case someone needs to add mx508 support back, then the recommended approach
is to use device tree.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
11 years agoARM: imx: Remove mach-mx51_3ds board
Fabio Estevam [Mon, 21 Jan 2013 04:02:08 +0000 (12:02 +0800)]
ARM: imx: Remove mach-mx51_3ds board

mach-mx51_3ds only supports old silicon version of MX51 and was replaced
with mx51 babbage, which is the official MX51 development board.

No need to maintain it anymore.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
11 years agoARM: imx: use debug_ll_io_init() for imx6q
Shawn Guo [Thu, 17 Jan 2013 08:37:42 +0000 (16:37 +0800)]
ARM: imx: use debug_ll_io_init() for imx6q

Use debug_ll_io_init() to map low level debug port for imx6q, so that
arch/arm/mach-imx/lluart.c can be removed.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
11 years agoARM: imx: remove unused imx6q_clock_map_io()
Shawn Guo [Thu, 17 Jan 2013 08:26:29 +0000 (16:26 +0800)]
ARM: imx: remove unused imx6q_clock_map_io()

imx6q_clock_map_io() becomes an empty function since imx6q clock driver
is moved to common clock framework.  It's used nowhere now.  Remove it.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
11 years agoMerge remote-tracking branch 'regulator/fix/lrg' into tmp
Mark Brown [Tue, 29 Jan 2013 03:14:41 +0000 (11:14 +0800)]
Merge remote-tracking branch 'regulator/fix/lrg' into tmp

11 years agoMerge remote-tracking branch 'regulator/fix/tps80031' into tmp
Mark Brown [Tue, 29 Jan 2013 03:14:35 +0000 (11:14 +0800)]
Merge remote-tracking branch 'regulator/fix/tps80031' into tmp

11 years agoMerge remote-tracking branch 'regulator/fix/db8500' into tmp
Mark Brown [Tue, 29 Jan 2013 03:14:28 +0000 (11:14 +0800)]
Merge remote-tracking branch 'regulator/fix/db8500' into tmp

11 years agoARM: mach-shmobile: emev2: Add reg and device_type properties to cpus
Simon Horman [Mon, 28 Jan 2013 00:41:40 +0000 (09:41 +0900)]
ARM: mach-shmobile: emev2:  Add reg and device_type properties to cpus

Cc: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
11 years agoARM: mach-shmobile: sh73a0: Add reg and device_type properties to cpus
Simon Horman [Mon, 28 Jan 2013 00:41:40 +0000 (09:41 +0900)]
ARM: mach-shmobile: sh73a0:  Add reg and device_type properties to cpus

Cc: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
11 years agoMerge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc
Linus Torvalds [Tue, 29 Jan 2013 00:23:07 +0000 (16:23 -0800)]
Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc

Pull powerpc fixes from Benjamin Herrenschmidt:
 "Whenever you have a chance between two dives, you might want to
  consider pulling my merge branch to pickup a few fixes for 3.8 that
  have been accumulating for the last couple of weeks (I was myself
  travelling then on vacation).

  Nothing major, just a handful of powerpc bug fixes that I consider
  worth getting in before 3.8 goes final."

And I'll have everybody know that I'm not diving for several days yet.
Snif.

* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc:
  powerpc: Max next_tb to prevent from replaying timer interrupt
  powerpc: kernel/kgdb.c: Fix memory leakage
  powerpc/book3e: Disable interrupt after preempt_schedule_irq
  powerpc/oprofile: Fix error in oprofile power7_marked_instr_event() function
  powerpc/pasemi: Fix crash on reboot
  powerpc: Fix MAX_STACK_TRACE_ENTRIES too low warning for ppc32

11 years agopowerpc: Max next_tb to prevent from replaying timer interrupt
Tiejun Chen [Tue, 15 Jan 2013 17:01:19 +0000 (17:01 +0000)]
powerpc: Max next_tb to prevent from replaying timer interrupt

With lazy interrupt, we always call __check_irq_replaysome with
decrementers_next_tb to check if we need to replay timer interrupt.
So in hotplug case we also need to set decrementers_next_tb as MAX
to make sure __check_irq_replay don't replay timer interrupt
when return as we expect, otherwise we'll trap here infinitely.

Signed-off-by: Tiejun Chen <tiejun.chen@windriver.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
11 years agopowerpc: kernel/kgdb.c: Fix memory leakage
Cong Ding [Mon, 14 Jan 2013 07:26:32 +0000 (07:26 +0000)]
powerpc: kernel/kgdb.c: Fix memory leakage

the variable backup_current_thread_info isn't freed before existing the
function.

Signed-off-by: Cong Ding <dinggnu@gmail.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
11 years agopowerpc/book3e: Disable interrupt after preempt_schedule_irq
Tiejun Chen [Sun, 6 Jan 2013 00:49:34 +0000 (00:49 +0000)]
powerpc/book3e: Disable interrupt after preempt_schedule_irq

In preempt case current arch_local_irq_restore() from
preempt_schedule_irq() may enable hard interrupt but we really
should disable interrupts when we return from the interrupt,
and so that we don't get interrupted after loading SRR0/1.

Signed-off-by: Tiejun Chen <tiejun.chen@windriver.com>
CC: <stable@vger.kernel.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
11 years agopowerpc/oprofile: Fix error in oprofile power7_marked_instr_event() function
Carl E. Love [Thu, 29 Nov 2012 06:42:03 +0000 (06:42 +0000)]
powerpc/oprofile: Fix error in oprofile power7_marked_instr_event() function

The calculation for the left shift of the mask OPROFILE_PM_PMCSEL_MSK has an
error.  The calculation is should be to shift left by (max_cntrs - cntr) times
the width of the pmsel field width.  However, the #define OPROFILE_MAX_PMC_NUM
was used instead of OPROFILE_PMSEL_FIELD_WIDTH.  This patch fixes the
calculation.

Signed-off-by: Carl Love <cel@us.ibm.com>
Acked-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
11 years agopowerpc/pasemi: Fix crash on reboot
Steven Rostedt [Mon, 21 Jan 2013 17:23:26 +0000 (17:23 +0000)]
powerpc/pasemi: Fix crash on reboot

commit f96972f2dc "kernel/sys.c: call disable_nonboot_cpus() in
kernel_restart()"

added a call to disable_nonboot_cpus() on kernel_restart(), which tries
to shutdown all the CPUs except the first one. The issue with the PA
Semi, is that it does not support CPU hotplug.

When the call is made to __cpu_down(), it calls the notifiers
CPU_DOWN_PREPARE, and then tries to take the CPU down.

One of the notifiers to the CPU hotplug code, is the cpufreq. The
DOWN_PREPARE will call __cpufreq_remove_dev() which calls
cpufreq_driver->exit. The PA Semi exit handler unmaps regions of I/O
that is used by an interrupt that goes off constantly
(system_reset_common, but it goes off during normal system operations
too). I'm not sure exactly what this interrupt does.

Running a simple function trace, you can see it goes off quite a bit:

# tracer: function
#
#           TASK-PID    CPU#    TIMESTAMP  FUNCTION
#              | |       |          |         |
          <idle>-0     [001]  1558.859363: .pasemi_system_reset_exception <-.system_reset_exception
          <idle>-0     [000]  1558.860112: .pasemi_system_reset_exception <-.system_reset_exception
          <idle>-0     [000]  1558.861109: .pasemi_system_reset_exception <-.system_reset_exception
          <idle>-0     [001]  1558.861361: .pasemi_system_reset_exception <-.system_reset_exception
          <idle>-0     [000]  1558.861437: .pasemi_system_reset_exception <-.system_reset_exception

When the region is unmapped, the system crashes with:

Disabling non-boot CPUs ...
Error taking CPU1 down: -38
Unable to handle kernel paging request for data at address 0xd0000800903a0100
Faulting instruction address: 0xc000000000055fcc
Oops: Kernel access of bad area, sig: 11 [#1]
PREEMPT SMP NR_CPUS=64 NUMA PA Semi PWRficient
Modules linked in: shpchp
NIP: c000000000055fcc LR: c000000000055fb4 CTR: c0000000000df1fc
REGS: c0000000012175d0 TRAP: 0300   Not tainted  (3.8.0-rc4-test-dirty)
MSR: 9000000000009032 <SF,HV,EE,ME,IR,DR,RI>  CR: 24000088  XER: 00000000
SOFTE: 0
DAR: d0000800903a0100, DSISR: 42000000
TASK = c0000000010e9008[0] 'swapper/0' THREAD: c000000001214000 CPU: 0
GPR00: d0000800903a0000 c000000001217850 c0000000012167e0 0000000000000000
GPR04: 0000000000000000 0000000000000724 0000000000000724 0000000000000000
GPR08: 0000000000000000 0000000000000000 0000000000000001 0000000000a70000
GPR12: 0000000024000080 c00000000fff0000 ffffffffffffffff 000000003ffffae0
GPR16: ffffffffffffffff 0000000000a21198 0000000000000060 0000000000000000
GPR20: 00000000008fdd35 0000000000a21258 000000003ffffaf0 0000000000000417
GPR24: 0000000000a226d0 c000000000000000 0000000000000000 0000000000000000
GPR28: c00000000138b358 0000000000000000 c000000001144818 d0000800903a0100
NIP [c000000000055fcc] .set_astate+0x5c/0xa4
LR [c000000000055fb4] .set_astate+0x44/0xa4
Call Trace:
[c000000001217850] [c000000000055fb4] .set_astate+0x44/0xa4 (unreliable)
[c0000000012178f0] [c00000000005647c] .restore_astate+0x2c/0x34
[c000000001217980] [c000000000054668] .pasemi_system_reset_exception+0x6c/0x88
[c000000001217a00] [c000000000019ef0] .system_reset_exception+0x48/0x84
[c000000001217a80] [c000000000001e40] system_reset_common+0x140/0x180

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
11 years agoMerge tag 'md-3.8-fixes' of git://neil.brown.name/md
Linus Torvalds [Mon, 28 Jan 2013 23:15:34 +0000 (15:15 -0800)]
Merge tag 'md-3.8-fixes' of git://neil.brown.name/md

Pull dmraid fix from NeilBrown:
 "Just one fix for md in 3.8

  dmraid assess redundancy and replacements slightly inaccurately which
  could lead to some degraded arrays failing to assemble."

* tag 'md-3.8-fixes' of git://neil.brown.name/md:
  DM-RAID: Fix RAID10's check for sufficient redundancy

11 years agopowerpc: Fix MAX_STACK_TRACE_ENTRIES too low warning for ppc32
Li Zhong [Sun, 2 Dec 2012 20:19:22 +0000 (20:19 +0000)]
powerpc: Fix MAX_STACK_TRACE_ENTRIES too low warning for ppc32

This patch fixes MAX_STACK_TRACE_ENTRIES too low warning for ppc32,
which is similar to commit 12660b17.

Reported-by: Christian Kujau <lists@nerdbynature.de>
Signed-off-by: Li Zhong <zhong@linux.vnet.ibm.com>
Tested-by: Christian Kujau <lists@nerdbynature.de>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
11 years agoARM: nomadik: get rid of <mach/hardware.h>
Linus Walleij [Sun, 6 Jan 2013 01:58:43 +0000 (02:58 +0100)]
ARM: nomadik: get rid of <mach/hardware.h>

This was only used from the core machine, source it into the machine
file and delete, also convert all direct references using the
physical-to-virtual macros in this file to ioremap() and only
default-remap the 4K used by the debug UART.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
11 years agoARM: nomadik: delete old board files
Linus Walleij [Sun, 6 Jan 2013 01:25:20 +0000 (02:25 +0100)]
ARM: nomadik: delete old board files

The Device Tree support on Nomadik can do everything the old board
files could do, so delete the old board files and make the nomadik
select CONFIG_OF.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
11 years agoARM: nomadik: add I2C devices to the device tree
Linus Walleij [Sun, 6 Jan 2013 01:10:27 +0000 (02:10 +0100)]
ARM: nomadik: add I2C devices to the device tree

This adds the GPIO-based I2C devices to the Nomadik device tree.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
11 years agoARM: nomadik: migrate MMC/SD card support to device tree
Linus Walleij [Sun, 6 Jan 2013 00:47:29 +0000 (01:47 +0100)]
ARM: nomadik: migrate MMC/SD card support to device tree

This moves over the MMC/SD card support to the device tree probe
path. The special GPIO to bias the card detect line is kept,
but the pin property is moved to the device tree as part of
the MMC/SD card node.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
11 years agoARM: nomadik: convert SMSC91x ethernet to device tree
Linus Walleij [Sun, 6 Jan 2013 00:02:42 +0000 (01:02 +0100)]
ARM: nomadik: convert SMSC91x ethernet to device tree

This converts the SMSC91x ethernet controller to use device
tree. The existing solution from the board file, to request the
GPIO triggering the ethernet IRQ from the board file is kept
for the time being, but the GPIO number assignment is moved
over to the device tree.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
11 years agoARM: nomadik: move GPIO and pinctrl to device tree
Linus Walleij [Sat, 5 Jan 2013 22:10:09 +0000 (23:10 +0100)]
ARM: nomadik: move GPIO and pinctrl to device tree

This moves the instances of the Nomadik pin controller and the
Nomadik GPIO blocks (also handled by the GPIO driver) over to
the device tree. A new compatible string is added to the
pin control driver in the process.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
11 years agoARM: nomadik: add FSMC NAND
Linus Walleij [Sat, 5 Jan 2013 21:28:32 +0000 (22:28 +0100)]
ARM: nomadik: add FSMC NAND

This adds the FSMC NAND driver and flash partitions to the Nomadik
device tree.

The only compatible string accepted by this driver is currently
"st,spear600-fsmc-nand" which is inappropriate for this system, so
this patch adds the compatible value "stericsson,fsmc-nand" as
well.

Cc: linux-mtd@vger.kernel.org
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Artem Bityutskiy <dedekind1@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
11 years agoARM: nomadik: move remaining PrimeCells to device tree
Linus Walleij [Sat, 5 Jan 2013 09:38:57 +0000 (10:38 +0100)]
ARM: nomadik: move remaining PrimeCells to device tree

The two remaining PrimeCells, RNG and RTC, are migrated to the
device tree for device tree boot.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
11 years agoARM: nomadik: move pin maps to cpu file
Linus Walleij [Sat, 5 Jan 2013 00:00:59 +0000 (01:00 +0100)]
ARM: nomadik: move pin maps to cpu file

Move the pinctrl maps over to the CPU file and register them
right before the pin controller itself. This way the pinmaps
will also benefit the device tree boot.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
11 years agoARM: nomadik: initial devicetree support
Linus Walleij [Fri, 4 Jan 2013 23:29:31 +0000 (00:29 +0100)]
ARM: nomadik: initial devicetree support

Support basic device tree boot on the Nomadik. Implement the
support in the cpu file with the intent of deleting the board
files later. At this stage IRQ controllers, system timer,
l2x0 cache, UARTs and thus console boot is fully functional.
Patch out the code adding devices by initcalls for now so
as not to disturb the boot.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
11 years agoxfs: Fix xfs_swap_extents() after removal of xfs_flushinval_pages()
Torsten Kaiser [Sun, 20 Jan 2013 09:24:49 +0000 (10:24 +0100)]
xfs: Fix xfs_swap_extents() after removal of xfs_flushinval_pages()

Commit fb59581404ab7ec5075299065c22cb211a9262a9 removed
xfs_flushinval_pages() and changed its callers to use
filemap_write_and_wait() and  truncate_pagecache_range() directly.

But in xfs_swap_extents() this change accidental switched the argument
for 'tip' to 'ip'. This patch switches it back to 'tip'

Signed-off-by: Torsten Kaiser <just.for.lkml@googlemail.com>
Reviewed-by: Ben Myers <bpm@sgi.com>
Signed-off-by: Ben Myers <bpm@sgi.com>
11 years agoARM: nomadik: move last custom calls to pinctrl
Linus Walleij [Thu, 3 Jan 2013 22:39:44 +0000 (23:39 +0100)]
ARM: nomadik: move last custom calls to pinctrl

The I2C pins were still set up using custom nmk_* calls, move
these to use the pinctrl mapping table instead. There was also
a remaining call to turn the Ethernet pin to GPIO, and this is
now done implicitly by the GPIO-to-pinctrl range translation
calls.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
11 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-3.0-fixes
Linus Torvalds [Mon, 28 Jan 2013 19:53:49 +0000 (11:53 -0800)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-3.0-fixes

Pull GFS2 fix from Steven Whitehouse.

* git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-3.0-fixes:
  GFS2: fix skip unlock condition

11 years agoMerge tag 'iommu-fixes-v3.8-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Mon, 28 Jan 2013 19:52:56 +0000 (11:52 -0800)]
Merge tag 'iommu-fixes-v3.8-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu

Pull IOMMU fix from Joerg Roedel:
 "One fix for the AMD IOMMU driver to work around broken BIOSes found in
  the field.  Some BIOSes forget to enable a workaround for a hardware
  problem which might cause the IOMMU to stop working under high load
  conditions.  The fix makes sure this workaround is enabled."

* tag 'iommu-fixes-v3.8-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu:
  IOMMU, AMD Family15h Model10-1Fh erratum 746 Workaround

11 years agoMerge tag 'mfd-for-linus-3.8-1' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Mon, 28 Jan 2013 19:51:57 +0000 (11:51 -0800)]
Merge tag 'mfd-for-linus-3.8-1' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6

Pull MFD fixes from Samuel Ortiz:
 "This is the first pull request for MFD fixes for 3.8

  We have some build failure fixes (twl4030, vexpress, abx500 and
  tps65910), some actual runtime oops and lockup fixes (rtsx, da9052),
  and some more hypothetical NULL pointers dereferences fixes for
  pcf50633 and max776xx.

  Then we also have additional rtsx fixes for a correct switch output
  voltage and clock divider correctness for rtl8411 (rtsx driver), and
  irqdomain fix for db8550-prcmu, and some more cosmetic fixes for
  arizona and wm5102."

* tag 'mfd-for-linus-3.8-1' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6:
  mfd: rtsx: Fix oops when rtsx_pci_sdmmc is not probed
  mfd: wm5102: Fix definition of WM5102_MAX_REGISTER
  mfd: twl4030: Don't warn about uninitialized return code
  mfd: da9052/53 lockup fix
  mfd: rtsx: Add clock divider hook
  mmc: rtsx: Call MFD hook to switch output voltage
  mfd: rtsx: Add output voltage switch hook
  mfd: Fix compile errors and warnings when !CONFIG_AB8500_BM
  mfd: vexpress: Export global functions to fix build error
  mfd: arizona: Check errors from regcache_sync()
  mfd: tc3589x: Use simple irqdomain
  mfd: pcf50633: Init pcf->dev before using it
  mfd: max77693: Init max77693->dev before using it
  mfd: max77686: Init max77686->dev before using it
  mfd: db8500-prcmu: Fix irqdomain usage
  mfd: tps65910: Select REGMAP_IRQ in Kconfig to fix build error
  mfd: arizona: Disable control interface reporting for WM5102 and WM5110

11 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Linus Torvalds [Mon, 28 Jan 2013 19:41:37 +0000 (11:41 -0800)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net

Pull networking updates from David Miller:
 "Much more accumulated than I would have liked due to an unexpected
  bout with a nasty flu:

   1) AH and ESP input don't set ECN field correctly because the
      transport head of the SKB isn't set correctly, fix from Li
      RongQing.

   2) If netfilter conntrack zones are disabled, we can return an
      uninitialized variable instead of the proper error code.  Fix from
      Borislav Petkov.

   3) Fix double SKB free in ath9k driver beacon handling, from Felix
      Feitkau.

   4) Remove bogus assumption about netns cleanup ordering in
      nf_conntrack, from Pablo Neira Ayuso.

   5) Remove a bogus BUG_ON in the new TCP fastopen code, from Eric
      Dumazet.  It uses spin_is_locked() in it's test and is therefore
      unsuitable for UP.

   6) Fix SELINUX labelling regressions added by the tuntap multiqueue
      changes, from Paul Moore.

   7) Fix CRC errors with jumbo frame receive in tg3 driver, from Nithin
      Nayak Sujir.

   8) CXGB4 driver sets interrupt coalescing parameters only on first
      queue, rather than all of them.  Fix from Thadeu Lima de Souza
      Cascardo.

   9) Fix regression in the dispatch of read/write registers in dm9601
      driver, from Tushar Behera.

  10) ipv6_append_data miscalculates header length, from Romain KUNTZ.

  11) Fix PMTU handling regressions on ipv4 routes, from Steffen
      Klassert, Timo Teräs, and Julian Anastasov.

  12) In 3c574_cs driver, add necessary parenthesis to "x << y & z"
      expression.  From Nickolai Zeldovich.

  13) macvlan_get_size() causes underallocation netlink message space,
      fix from Eric Dumazet.

  14) Avoid division by zero in xfrm_replay_advance_bmp(), from Nickolai
      Zeldovich.  Amusingly the zero check was already there, we were
      just performing it after the modulus :-)

  15) Some more splice bug fixes from Eric Dumazet, which fix things
      mostly eminating from how we now more aggressively use high-order
      pages in SKBs.

  16) Fix size calculation bug when freeing hash tables in the IPSEC
      xfrm code, from Michal Kubecek.

  17) Fix PMTU event propagation into socket cached routes, from Steffen
      Klassert.

  18) Fix off by one in TX buffer release in netxen driver, from Eric
      Dumazet.

  19) Fix rediculous memory allocation requirements introduced by the
      tuntap multiqueue changes, from Jason Wang.

  20) Remove bogus AMD platform workaround in r8169 driver that causes
      major problems in normal operation, from Timo Teräs.

  21) virtio-net set affinity and select queue don't handle
      discontiguous cpu numbers properly, fix from Wanlong Gao.

  22) Fix a route refcounting issue in loopback driver, from Eric
      Dumazet.  There's a similar fix coming that we might add to the
      macvlan driver as well.

  23) Fix SKB leaks in batman-adv's distributed arp table code, from
      Matthias Schiffer.

  24) r8169 driver gives descriptor ownership back the hardware before
      we're done reading the VLAN tag out of it, fix from Francois
      Romieu.

  25) Checksums not calculated properly in GRE tunnel driver fix from
      Pravin B Shelar.

26) Fix SCTP memory leak on namespace exit."

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (101 commits)
  dm9601: support dm9620 variant
  SCTP: Free the per-net sysctl table on net exit. v2
  net: phy: icplus: fix broken INTR pin settings
  net: phy: icplus: Use the RGMII interface mode to configure clock delays
  IP_GRE: Fix kernel panic in IP_GRE with GRE csum.
  sctp: set association state to established in dupcook_a handler
  ip6mr: limit IPv6 MRT_TABLE identifiers
  r8169: fix vlan tag read ordering.
  net: cdc_ncm: use IAD provided by the USB core
  batman-adv: filter ARP packets with invalid MAC addresses in DAT
  batman-adv: check for more types of invalid IP addresses in DAT
  batman-adv: fix skb leak in batadv_dat_snoop_incoming_arp_reply()
  net: loopback: fix a dst refcounting issue
  virtio-net: reset virtqueue affinity when doing cpu hotplug
  virtio-net: split out clean affinity function
  virtio-net: fix the set affinity bug when CPU IDs are not consecutive
  can: pch_can: fix invalid error codes
  can: ti_hecc: fix invalid error codes
  can: c_can: fix invalid error codes
  r8169: remove the obsolete and incorrect AMD workaround
  ...

11 years agoARM: tegra: add AHB entry to Tegra114 DT
Hiroshi Doyu [Tue, 15 Jan 2013 08:17:27 +0000 (10:17 +0200)]
ARM: tegra: add AHB entry to Tegra114 DT

Add AHB entry.

Signed-off-by: Hiroshi Doyu <hdoyu@nvidia.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
11 years agoxfs: Fix possible use-after-free with AIO
Jan Kara [Wed, 23 Jan 2013 12:56:18 +0000 (13:56 +0100)]
xfs: Fix possible use-after-free with AIO

Running AIO is pinning inode in memory using file reference. Once AIO
is completed using aio_complete(), file reference is put and inode can
be freed from memory. So we have to be sure that calling aio_complete()
is the last thing we do with the inode.

CC: xfs@oss.sgi.com
CC: Ben Myers <bpm@sgi.com>
CC: stable@vger.kernel.org
Signed-off-by: Jan Kara <jack@suse.cz>
Reviewed-by: Ben Myers <bpm@sgi.com>
Signed-off-by: Ben Myers <bpm@sgi.com>
11 years agoxfs: fix shutdown hang on invalid inode during create
Dave Chinner [Mon, 21 Jan 2013 12:53:55 +0000 (23:53 +1100)]
xfs: fix shutdown hang on invalid inode during create

When the new inode verify in xfs_iread() fails, the create
transaction is aborted and a shutdown occurs. The subsequent unmount
then hangs in xfs_wait_buftarg() on a buffer that has an elevated
hold count. Debug showed that it was an AGI buffer getting stuck:

[   22.576147] XFS (vdb): buffer 0x2/0x1, hold 0x2 stuck
[   22.976213] XFS (vdb): buffer 0x2/0x1, hold 0x2 stuck
[   23.376206] XFS (vdb): buffer 0x2/0x1, hold 0x2 stuck
[   23.776325] XFS (vdb): buffer 0x2/0x1, hold 0x2 stuck

The trace of this buffer leading up to the shutdown (trimmed for
brevity) looks like:

xfs_buf_init:        bno 0x2 nblks 0x1 hold 1 caller xfs_buf_get_map
xfs_buf_get:         bno 0x2 len 0x200 hold 1 caller xfs_buf_read_map
xfs_buf_read:        bno 0x2 len 0x200 hold 1 caller xfs_trans_read_buf_map
xfs_buf_iorequest:   bno 0x2 nblks 0x1 hold 1 caller _xfs_buf_read
xfs_buf_hold:        bno 0x2 nblks 0x1 hold 1 caller xfs_buf_iorequest
xfs_buf_rele:        bno 0x2 nblks 0x1 hold 2 caller xfs_buf_iorequest
xfs_buf_iowait:      bno 0x2 nblks 0x1 hold 1 caller _xfs_buf_read
xfs_buf_ioerror:     bno 0x2 len 0x200 hold 1 caller xfs_buf_bio_end_io
xfs_buf_iodone:      bno 0x2 nblks 0x1 hold 1 caller _xfs_buf_ioend
xfs_buf_iowait_done: bno 0x2 nblks 0x1 hold 1 caller _xfs_buf_read
xfs_buf_hold:        bno 0x2 nblks 0x1 hold 1 caller xfs_buf_item_init
xfs_trans_read_buf:  bno 0x2 len 0x200 hold 2 recur 0 refcount 1
xfs_trans_brelse:    bno 0x2 len 0x200 hold 2 recur 0 refcount 1
xfs_buf_item_relse:  bno 0x2 nblks 0x1 hold 2 caller xfs_trans_brelse
xfs_buf_rele:        bno 0x2 nblks 0x1 hold 2 caller xfs_buf_item_relse
xfs_buf_unlock:      bno 0x2 nblks 0x1 hold 1 caller xfs_trans_brelse
xfs_buf_rele:        bno 0x2 nblks 0x1 hold 1 caller xfs_trans_brelse
xfs_buf_trylock:     bno 0x2 nblks 0x1 hold 2 caller _xfs_buf_find
xfs_buf_find:        bno 0x2 len 0x200 hold 2 caller xfs_buf_get_map
xfs_buf_get:         bno 0x2 len 0x200 hold 2 caller xfs_buf_read_map
xfs_buf_read:        bno 0x2 len 0x200 hold 2 caller xfs_trans_read_buf_map
xfs_buf_hold:        bno 0x2 nblks 0x1 hold 2 caller xfs_buf_item_init
xfs_trans_read_buf:  bno 0x2 len 0x200 hold 3 recur 0 refcount 1
xfs_trans_log_buf:   bno 0x2 len 0x200 hold 3 recur 0 refcount 1
xfs_buf_item_unlock: bno 0x2 len 0x200 hold 3 flags DIRTY liflags ABORTED
xfs_buf_unlock:      bno 0x2 nblks 0x1 hold 3 caller xfs_buf_item_unlock
xfs_buf_rele:        bno 0x2 nblks 0x1 hold 3 caller xfs_buf_item_unlock

And that is the AGI buffer from cold cache read into memory to
transaction abort. You can see at transaction abort the bli is dirty
and only has a single reference. The item is not pinned, and it's
not in the AIL. Hence the only reference to it is this transaction.

The problem is that the xfs_buf_item_unlock() call is dropping the
last reference to the xfs_buf_log_item attached to the buffer (which
holds a reference to the buffer), but it is not freeing the
xfs_buf_log_item. Hence nothing will ever release the buffer, and
the unmount hangs waiting for this reference to go away.

The fix is simple - xfs_buf_item_unlock needs to detect the last
reference going away in this case and free the xfs_buf_log_item to
release the reference it holds on the buffer.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Ben Myers <bpm@sgi.com>
Signed-off-by: Ben Myers <bpm@sgi.com>
11 years agoxfs: limit speculative prealloc near ENOSPC thresholds
Dave Chinner [Mon, 21 Jan 2013 12:53:54 +0000 (23:53 +1100)]
xfs: limit speculative prealloc near ENOSPC thresholds

There is a window on small filesytsems where specualtive
preallocation can be larger than that ENOSPC throttling thresholds,
resulting in specualtive preallocation trying to reserve more space
than there is space available. This causes immediate ENOSPC to be
triggered, prealloc to be turned off and flushing to occur. One the
next write (i.e. next 4k page), we do exactly the same thing, and so
effective drive into synchronous 4k writes by triggering ENOSPC
flushing on every page while in the window between the prealloc size
and the ENOSPC prealloc throttle threshold.

Fix this by checking to see if the prealloc size would consume all
free space, and throttle it appropriately to avoid premature
ENOSPC...

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Signed-off-by: Ben Myers <bpm@sgi.com>
11 years agoxfs: fix _xfs_buf_find oops on blocks beyond the filesystem end
Dave Chinner [Mon, 21 Jan 2013 12:53:52 +0000 (23:53 +1100)]
xfs: fix _xfs_buf_find oops on blocks beyond the filesystem end

When _xfs_buf_find is passed an out of range address, it will fail
to find a relevant struct xfs_perag and oops with a null
dereference. This can happen when trying to walk a filesystem with a
metadata inode that has a partially corrupted extent map (i.e. the
block number returned is corrupt, but is otherwise intact) and we
try to read from the corrupted block address.

In this case, just fail the lookup. If it is readahead being issued,
it will simply not be done, but if it is real read that fails we
will get an error being reported.  Ideally this case should result
in an EFSCORRUPTED error being reported, but we cannot return an
error through xfs_buf_read() or xfs_buf_get() so this lookup failure
may result in ENOMEM or EIO errors being reported instead.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Reviewed-by: Ben Myers <bpm@sgi.com>
Signed-off-by: Ben Myers <bpm@sgi.com>
11 years agoxfs: pull up stack_switch check into xfs_bmapi_write
Brian Foster [Thu, 17 Jan 2013 18:11:29 +0000 (13:11 -0500)]
xfs: pull up stack_switch check into xfs_bmapi_write

The stack_switch check currently occurs in __xfs_bmapi_allocate,
which means the stack switch only occurs when xfs_bmapi_allocate()
is called in a loop. Pull the check up before the loop in
xfs_bmapi_write() such that the first iteration of the loop has
consistent behavior.

Signed-off-by: Brian Foster <bfoster@redhat.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Ben Myers <bpm@sgi.com>
11 years agoxfs: Do not return EFSCORRUPTED when filesystem probe finds no XFS magic
Eric Sandeen [Wed, 16 Jan 2013 23:33:53 +0000 (17:33 -0600)]
xfs: Do not return EFSCORRUPTED when filesystem probe finds no XFS magic

9802182 changed the return value from EWRONGFS (aka EINVAL)
to EFSCORRUPTED which doesn't seem to be handled properly by
the root filesystem probe.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Tested-by: Sergei Trofimovich <slyfox@gentoo.org>
Reviewed-by: Ben Myers <bpm@sgi.com>
Signed-off-by: Ben Myers <bpm@sgi.com>
11 years agousb: host: tegra: make use of PHY pointer of HCD
Venu Byravarasu [Thu, 24 Jan 2013 10:27:03 +0000 (15:57 +0530)]
usb: host: tegra: make use of PHY pointer of HCD

As pointer to PHY structure can be stored in struct usb_hcd
making use of it, to call Tegra PHY APIs.

Call to usb_phy_shutdown() is moved up in tegra_ehci_remove(),
so that to avoid dereferencing of hcd after its freed up.

Signed-off-by: Venu Byravarasu <vbyravarasu@nvidia.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Acked-by: Felipe Balbi <balbi@ti.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
11 years agoARM: tegra: Add reset GPIO information to PHY DT node
Venu Byravarasu [Thu, 24 Jan 2013 10:16:46 +0000 (15:46 +0530)]
ARM: tegra: Add reset GPIO information to PHY DT node

As reset GPIO information is PHY specific detail, adding
it to PHY DT node.

Signed-off-by: Venu Byravarasu <vbyravarasu@nvidia.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
11 years agoARM: tegra: move serial clock-frequency attr into the Tegra30 dtsi
Stephen Warren [Wed, 23 Jan 2013 16:43:49 +0000 (09:43 -0700)]
ARM: tegra: move serial clock-frequency attr into the Tegra30 dtsi

No Tegra30 Platform is running PLL_P at another rate than 408MHz, nor is
any using any other PLL as UART source clock. Move attribute into SoC
level dtsi file to slim down board DT files.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
11 years agoARM: tegra: Add Toradex Iris carrier board DT with T20 512MB COM
Lucas Stach [Tue, 22 Jan 2013 21:46:09 +0000 (22:46 +0100)]
ARM: tegra: Add Toradex Iris carrier board DT with T20 512MB COM

This adds the device tree for the Toradex Iris carrier board used
together with a Colibri T20 512MB COM.

The Iris has the following features, in brackets the current status:
- DVI and VGA output through DVI-I connector (DVI-D enabled and tested)
- LVDS output
- 1 USB host port (enabled and tested)
- 1 USB OTG port (enabled)
- 100 MBit Ethernet (enabled and tested)
- 5 UART ports  (2 on 10way headers enabled and tested)
- 1 MicroSD Slot (enabled and tested)
- Audio connectors (enabled, only HP out and Line-in tested)
- i2c RTC
- GPIO connector (enabled, only sparsely tested)
- external i2c bus
- 4 PWM out
- analog in

Signed-off-by: Lucas Stach <dev@lynxeye.de>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
11 years agoARM: tegra: Add Colibri T20 512MB COM device tree
Lucas Stach [Tue, 22 Jan 2013 21:46:08 +0000 (22:46 +0100)]
ARM: tegra: Add Colibri T20 512MB COM device tree

This adds the device tree include file for the Toradex Colibri T20
Computer on Module (COM). It's only valid for the 512MB RAM version of
the module, as the 256MB version needs different EMC tables and flash
configuration. To make this clear the suffix -512 was added to the board
compatible string.

The Colibri T20 uses a Tegra20 SoC and has onboard USB Ethernet and AC97
sound.

Still some things like onboard NAND support missing, but should be a
good base for further development.

Signed-off-by: Lucas Stach <dev@lynxeye.de>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
11 years agoARM: tegra: move serial clock-frequency attr into the Tegra20 dtsi
Lucas Stach [Tue, 22 Jan 2013 21:46:07 +0000 (22:46 +0100)]
ARM: tegra: move serial clock-frequency attr into the Tegra20 dtsi

No Tegra20 Platform is running PLL_P at another rate than 216MHz, nor is
any using any other PLL as UART source clock. Move attribute into SoC
level dtsi file to slim down board DT files.

Signed-off-by: Lucas Stach <dev@lynxeye.de>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
11 years agoARM: tegra: harmony: enable keyboard in DT
Laxman Dewangan [Mon, 21 Jan 2013 17:44:05 +0000 (23:14 +0530)]
ARM: tegra: harmony: enable keyboard in DT

Enable Tegra based keyboard interfacing for keys and provide
all key mapping through DTS file.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
11 years agoARM: tegra: whistler: enable keyboard in DT
Laxman Dewangan [Fri, 18 Jan 2013 05:58:43 +0000 (11:28 +0530)]
ARM: tegra: whistler: enable keyboard in DT

Enable Tegra based keyboard controller and populate the key mapping
for Whistler.

With this patch, HOME, BACK, POWER and MENU keys will work.
Still other keys which are in ROW3 and ROW4 will not work as it
conflicts with KBC pins on SDIO2 pinmux.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
11 years agoARM: tegra: cardhu: register UARTC
Laxman Dewangan [Wed, 16 Jan 2013 13:06:12 +0000 (18:36 +0530)]
ARM: tegra: cardhu: register UARTC

UARTC is used for the interfacing with bluetooth device.
Register this UART channel as high speed serial channel
so that it can use the APB DMA for data transfer.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
11 years agoARM: tegra: seaboard: enable keyboard in DT
Laxman Dewangan [Tue, 15 Jan 2013 07:24:49 +0000 (12:54 +0530)]
ARM: tegra: seaboard: enable keyboard in DT

Enable Tegra based keyboard controller and populate the key matrix for
seaboard. The key matrix was originally on driver code which is removed
to have clean driver. The key mapping is now passed through dts file.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
11 years agoARM: tegra: add DT entry for KBC controller
Laxman Dewangan [Fri, 11 Jan 2013 13:33:03 +0000 (19:03 +0530)]
ARM: tegra: add DT entry for KBC controller

NVIDIA's Tegra SoCs have the matrix keyboard controller which
supports 16x8 type of matrix. The number of rows and columns
are configurable.

Add DT entry for KBC controller.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
[swarren: added clocks property]
Signed-off-by: Stephen Warren <swarren@nvidia.com>
11 years agoARM: tegra: swap cache-/interrupt-ctrlr nodes in DT
Stephen Warren [Mon, 14 Jan 2013 17:09:16 +0000 (10:09 -0700)]
ARM: tegra: swap cache-/interrupt-ctrlr nodes in DT

This ensures nodes are sorted in order of reg address. This makes it
easier to compare against e.g. the U-Boot device trees, and is simply
consistent and clean.

While we're at it, remove the unit address from the cache-controller
node name, since it's unique without it.

Reported-by: Allen Martin <amartin@nvidia.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
11 years agoASoC: tegra: add ac97 host controller to device tree
Lucas Stach [Sat, 5 Jan 2013 01:18:44 +0000 (02:18 +0100)]
ASoC: tegra: add ac97 host controller to device tree

Add default entry for the AC97 host controller.

Signed-off-by: Lucas Stach <dev@lynxeye.de>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
11 years agoARM: DT: tegra: Add Tegra30 Beaver board support
Bryan Wu [Wed, 2 Jan 2013 23:53:51 +0000 (15:53 -0800)]
ARM: DT: tegra: Add Tegra30 Beaver board support

This patch adds support for Tegra30 Beaver board in upstream kernel.

Beaver board is a Tegra30 SoC based development board, it has
following features:
 - T30 or T33 SoC (Qual core ARM Cortex A9)
 - 2 GB DDR3L
 - 16 GB EMMC
 - 1 SD slot
 - 1 USB Standart A port and 1 USB micro AB port
 - PCI-E Gig Ethernet
 - Audio input/output
 - SATA port
 - HDMI output
 - UART and JTAG

Signed-off-by: Bryan Wu <pengw@nvidia.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
11 years agoARM: DT: tegra: Add board level compatible properties
Bryan Wu [Wed, 2 Jan 2013 23:53:50 +0000 (15:53 -0800)]
ARM: DT: tegra: Add board level compatible properties

The compatible properties of Tegra SoC based boards or machines need
to be documented. This patch adds these board levle compatible
properties into device tree binding document.

Signed-off-by: Bryan Wu <pengw@nvidia.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
11 years agoARM: tegra: paz00: enable HDMI port
Stephen Warren [Wed, 2 Jan 2013 21:53:22 +0000 (14:53 -0700)]
ARM: tegra: paz00: enable HDMI port

Signed-off-by: Stephen Warren <swarren@nvidia.com>
11 years agoARM: tegra: ventana: enable HDMI port
Stephen Warren [Wed, 2 Jan 2013 21:53:21 +0000 (14:53 -0700)]
ARM: tegra: ventana: enable HDMI port

Signed-off-by: Stephen Warren <swarren@nvidia.com>
11 years agoARM: tegra: seaboard: enable HDMI port
Stephen Warren [Wed, 2 Jan 2013 21:53:20 +0000 (14:53 -0700)]
ARM: tegra: seaboard: enable HDMI port

Signed-off-by: Stephen Warren <swarren@nvidia.com>
11 years agoARM: tegra: trimslice: add gpio-poweroff node to DT
Stephen Warren [Thu, 6 Dec 2012 21:23:52 +0000 (14:23 -0700)]
ARM: tegra: trimslice: add gpio-poweroff node to DT

... and disable tri-state from the pingroup that contains the poweroff
GPIO.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
11 years agoARM: DT: tegra: Unify the description of Tegra20 boards
Bryan Wu [Thu, 20 Dec 2012 09:41:29 +0000 (09:41 +0000)]
ARM: DT: tegra: Unify the description of Tegra20 boards

Use engineering name 'Tegra20' instead of 'Tegra2'

Signed-off-by: Bryan Wu <pengw@nvidia.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
11 years agoARM: tegra: dts: add aliases and DMA requestor for serial controller
Laxman Dewangan [Wed, 19 Dec 2012 06:31:11 +0000 (12:01 +0530)]
ARM: tegra: dts: add aliases and DMA requestor for serial controller

Add APB DMA requestor and serial aliases for serial controller.
There will be two serial driver i.e. 8250 based simple serial driver
and APB DMA based serial driver for higher baudrate and performace.

The simple serial driver get enabled with compatible nvidia,tegra20-uart
and APB DMA based driver will get enabled with compatible
nvidia,tegra20-hsuart.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
11 years agoARM: tegra30: tegra30 gpio is not compatible with tegra20 gpio
Laxman Dewangan [Wed, 19 Dec 2012 14:57:12 +0000 (20:27 +0530)]
ARM: tegra30: tegra30 gpio is not compatible with tegra20 gpio

tegra30 gpio controller is not compatible with the tegra20 due to
their bank stride i.e. Tegra20 bank stride is 0x80 where Tegra30
bank stride is 0x100.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
[swarren: fixed typo syntax error]
Signed-off-by: Stephen Warren <swarren@nvidia.com>
11 years agoARM: tegra: Add initial support for Tegra114 SoC.
Hiroshi Doyu [Thu, 24 Jan 2013 01:10:26 +0000 (01:10 +0000)]
ARM: tegra: Add initial support for Tegra114 SoC.

Add new Tegra 114 SoC support.

Signed-off-by: Hiroshi Doyu <hdoyu@nvidia.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
11 years agoARM: dt: tegra114: Add new board, Pluto
Hiroshi Doyu [Thu, 24 Jan 2013 01:10:25 +0000 (01:10 +0000)]
ARM: dt: tegra114: Add new board, Pluto

Add a new evaluation board, Pluto for Tegra 114 family.

Signed-off-by: Hiroshi Doyu <hdoyu@nvidia.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
11 years agoARM: dt: tegra114: Add new board, Dalmore
Hiroshi Doyu [Thu, 24 Jan 2013 01:10:24 +0000 (01:10 +0000)]
ARM: dt: tegra114: Add new board, Dalmore

Add a new evaluation board, Dalmore for Tegra 114 family.

Signed-off-by: Hiroshi Doyu <hdoyu@nvidia.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
11 years agoARM: dt: tegra114: Add new SoC base, Tegra114 SoC
Hiroshi Doyu [Thu, 24 Jan 2013 01:10:23 +0000 (01:10 +0000)]
ARM: dt: tegra114: Add new SoC base, Tegra114 SoC

Initial support for Tegra 114 SoC. This is expected to be included in
the board DTS files, Tegra 114 SoC based evaluation board family.

Signed-off-by: Hiroshi Doyu <hdoyu@nvidia.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
11 years agoARM: tegra: fuse: Add chip ID Tegra114 0x35
Hiroshi Doyu [Thu, 24 Jan 2013 01:10:22 +0000 (01:10 +0000)]
ARM: tegra: fuse: Add chip ID Tegra114 0x35

Add tegra_chip_id TEGRA114 0x35

Signed-off-by: Hiroshi Doyu <hdoyu@nvidia.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
11 years agoMerge branch 'for-3.9/scu-base-rework' into for-3.9/soc-t114
Stephen Warren [Mon, 28 Jan 2013 18:22:46 +0000 (11:22 -0700)]
Merge branch 'for-3.9/scu-base-rework' into for-3.9/soc-t114

Conflicts:
arch/arm/mach-tegra/platsmp.c

11 years agoARM: tegra20: cpuidle: apply coupled cpuidle for powered-down mode
Joseph Lo [Wed, 16 Jan 2013 17:33:55 +0000 (17:33 +0000)]
ARM: tegra20: cpuidle: apply coupled cpuidle for powered-down mode

The "powered-down" cpuidle mode of Tegra20 needs the CPU0 be the last one
core to go into this mode before other core. The coupled cpuidle framework
can help to sync the MPCore to coupled state then go into "powered-down"
idle mode together. The driver can just assume the MPCore come into
"powered-down" mode at the same time. No need to take care if the CPU_0
goes into this mode along and only can put it into safe idle mode (WFI).

The powered-down state of Tegra20 requires power gating both CPU cores.
When the secondary CPU requests to enter powered-down state, it saves
its own contexts and then enters WFI for waiting CPU0 in the same state.
When the CPU0 requests powered-down state, it attempts to put the secondary
CPU into reset to prevent it from waking up. Then power down both CPUs
together and power off the cpu rail.

Be aware of that, you may see the legacy power state "LP2" in the code
which is exactly the same meaning of "CPU power down".

Based on the work by:
Colin Cross <ccross@android.com>
Gary King <gking@nvidia.com>

Signed-off-by: Joseph Lo <josephl@nvidia.com>
Acked-by: Colin Cross <ccross@android.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
11 years agoARM: tegra20: flowctrl: add support for cpu_suspend_enter/exit
Joseph Lo [Tue, 15 Jan 2013 22:11:01 +0000 (22:11 +0000)]
ARM: tegra20: flowctrl: add support for cpu_suspend_enter/exit

The flow controller can help CPU to go into suspend mode (powered-down
state). When CPU go into powered-down state, it needs some careful
settings before getting into and after leaving. The enter and exit
functions do that by configuring appropriate mode for flow controller.

Signed-off-by: Joseph Lo <josephl@nvidia.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
11 years agoclk: tegra20: Implementing CPU low-power function for tegra_cpu_car_ops
Joseph Lo [Tue, 15 Jan 2013 22:10:48 +0000 (22:10 +0000)]
clk: tegra20: Implementing CPU low-power function for tegra_cpu_car_ops

Implementing suspend, resume and rail_off_ready API for tegra_cpu_car_ops. These
functions were used for CPU powered-down state maintenance.

Signed-off-by: Joseph Lo <josephl@nvidia.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
11 years agoARM: tegra20: cpuidle: add powered-down state for secondary CPU
Joseph Lo [Tue, 15 Jan 2013 22:10:38 +0000 (22:10 +0000)]
ARM: tegra20: cpuidle: add powered-down state for secondary CPU

The powered-down state of Tegra20 requires power gating both CPU cores.
When the secondary CPU requests to enter powered-down state, it saves
its own contexts and then enters WFI. The Tegra20 had a limition to
power down both CPU cores. The secondary CPU must waits for CPU0 in
powered-down state too. If the secondary CPU be woken up before CPU0
entering powered-down state, then it needs to restore its CPU states
and waits for next chance.

Be aware of that, you may see the legacy power state "LP2" in the code
which is exactly the same meaning of "CPU power down".

Based on the work by:
Colin Cross <ccross@android.com>
Gary King <gking@nvidia.com>

Signed-off-by: Joseph Lo <josephl@nvidia.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
11 years agoARM: tegra: add pending SGI checking API
Joseph Lo [Tue, 15 Jan 2013 22:10:26 +0000 (22:10 +0000)]
ARM: tegra: add pending SGI checking API

The "powered-down" CPU idle mode of Tegra cut off the vdd_cpu rail, it
include the power of GIC. That caused the SGI (Software Generated
Interrupt) been lost. Because the SGI can't wake up the CPU that in
the "powered-down" CPU idle mode. We need to check if there is any
pending SGI when go into "powered-down" CPU idle mode. This is important
especially when applying the coupled cpuidle framework into "power-down"
cpuidle dirver. Because the coupled cpuidle framework may have the
chance that misses IPI_SINGLE_FUNC handling sometimes.

For the PPI or SPI, something like the legacy peripheral interrupt. It
still can be maintained by Tegra legacy interrupt controller. If there
is any pending PPI or SPI when CPU in "powered-down" CPU idle mode. The
CPU can be woken up immediately. So we don't need to take care the same
situation for PPI or SPI.

Signed-off-by: Joseph Lo <josephl@nvidia.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
11 years agousb: host: tegra: don't touch EMC clock
Stephen Warren [Wed, 23 Jan 2013 00:06:32 +0000 (17:06 -0700)]
usb: host: tegra: don't touch EMC clock

Clock "emc" is for the External Memory Controller. The USB driver has no
business touching this clock directly. Remove the code that does so.

Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
11 years agousb: add APIs to access host registers from Tegra PHY
Venu Byravarasu [Thu, 17 Jan 2013 20:15:37 +0000 (20:15 +0000)]
usb: add APIs to access host registers from Tegra PHY

As Tegra PHY driver needs to access one of the host registers,
added few APIs.

Signed-off-by: Venu Byravarasu <vbyravarasu@nvidia.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
[swarren: moved assignment of phy->is_ulpi_phy to previous patch.]
Signed-off-by: Stephen Warren <swarren@nvidia.com>
11 years agoUSB: PHY: tegra: Get rid of instance number to differentiate PHY type
Venu Byravarasu [Wed, 16 Jan 2013 03:30:21 +0000 (03:30 +0000)]
USB: PHY: tegra: Get rid of instance number to differentiate PHY type

Tegra20 USB has 3 PHY instances:
Instance 1 and 3 are UTMI. Instance 2 is ULPI.

As instance number was used to differentiate ULPI from UTMI,
used DT param to get this info and processed accordingly.

Signed-off-by: Venu Byravarasu <vbyravarasu@nvidia.com>
Acked-by: Felipe Balbi <balbi@ti.com>
[swarren: moved assignment of phy->is_ulpi_phy into this patch out
of next patch.]
Signed-off-by: Stephen Warren <swarren@nvidia.com>
11 years agoUSB: PHY: tegra: get rid of instance number to differentiate legacy controller
Venu Byravarasu [Wed, 16 Jan 2013 03:30:20 +0000 (03:30 +0000)]
USB: PHY: tegra: get rid of instance number to differentiate legacy controller

Tegra20 USB has 3 PHY instances. Instance 0 is based on
legacy PHY interface and other two are standard interfaces.

As instance number was used to differentiate legacy from
standard interfaces, used DT param to get this info and
processed accordingly.

Signed-off-by: Venu Byravarasu <vbyravarasu@nvidia.com>
Acked-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
11 years agoARM: tegra: add clocks properties to USB PHY nodes
Stephen Warren [Wed, 23 Jan 2013 00:12:25 +0000 (17:12 -0700)]
ARM: tegra: add clocks properties to USB PHY nodes

The patch to add USB PHY nodes to device tree was written before Tegra
supported the clocks property in device tree. Now that it does, add the
required clocks properties to these nodes.

This will allow all clk_get_sys() calls in tegra_usb_phy.c to be replaced
by clk_get(phy->dev, clock_name), as part of converting the PHY driver to
a platform driver.

Acked-by: Venu Byravarasu <vbyravarasu@nvidia.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
11 years agoARM: tegra: add DT nodes for Tegra USB PHY
Venu Byravarasu [Wed, 16 Jan 2013 03:30:19 +0000 (03:30 +0000)]
ARM: tegra: add DT nodes for Tegra USB PHY

Add DT nodes for Tegra USB PHY along with related documentation.
Also added a phandle property to controller DT node, for referring
to connected PHY instance.

Signed-off-by: Venu Byravarasu <vbyravarasu@nvidia.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
11 years agousb: phy: remove unused APIs from Tegra PHY.
Venu Byravarasu [Tue, 15 Jan 2013 10:19:30 +0000 (15:49 +0530)]
usb: phy: remove unused APIs from Tegra PHY.

As tegra_usb_phy_clk_disable/enable() are not being
used, removing them.

Signed-off-by: Venu Byravarasu <vbyravarasu@nvidia.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
11 years agousb: host: tegra: Resetting PORT0 based on information received via DT.
Venu Byravarasu [Thu, 13 Dec 2012 20:59:08 +0000 (20:59 +0000)]
usb: host: tegra: Resetting PORT0 based on information received via DT.

Tegra USB host driver is using port instance number,
to handle some of the hardware issues on SOC e.g. reset PORT0
twice etc. As instance number based handling looks ugly,
making use of information passed through DT for achieving this.

Signed-off-by: Venu Byravarasu <vbyravarasu@nvidia.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
11 years agoARM: tegra: Add new DT property to USB node.
Venu Byravarasu [Thu, 13 Dec 2012 20:59:07 +0000 (20:59 +0000)]
ARM: tegra: Add new DT property to USB node.

As Tegra USB host driver is using instance number for resetting
PORT0 twice, adding a new DT property for handling this.

Signed-off-by: Venu Byravarasu <vbyravarasu@nvidia.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
11 years agousb: phy: use kzalloc to allocate struct tegra_usb_phy
Venu Byravarasu [Sat, 12 Jan 2013 00:31:29 +0000 (17:31 -0700)]
usb: phy: use kzalloc to allocate struct tegra_usb_phy

Use kzalloc instead of kmalloc to allocate struct tegra_usb_phy.
This ensures that all function pointers in member u_phy are
initialized to NULL.

Signed-off-by: Venu Byravarasu <vbyravarasu@nvidia.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
11 years agoARM: tegra: remove USB address related macros from iomap.h
Venu Byravarasu [Mon, 17 Dec 2012 18:31:01 +0000 (18:31 +0000)]
ARM: tegra: remove USB address related macros from iomap.h

USB register base address and sizes defined in iomap.h
are not used in any files other than board-dt-tegra20.c.
Hence removed those defines from header file and using
the absolute values in board files.

Signed-off-by: Venu Byravarasu <vbyravarasu@nvidia.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
11 years agoclk: tegra30: remove unused TEGRA_CLK_DUPLICATE()s
Prashant Gaikwad [Fri, 11 Jan 2013 08:01:29 +0000 (13:31 +0530)]
clk: tegra30: remove unused TEGRA_CLK_DUPLICATE()s

With device tree support added for Tegra clocks look up is done from
device tree, remove unused TEGRA_CLK_DUPLICATE()s.

Signed-off-by: Prashant Gaikwad <pgaikwad@nvidia.com>
Acked-by: Mike Turquette <mturquette@linaro.org>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
11 years agoclk: tegra20: remove unused TEGRA_CLK_DUPLICATE()s
Prashant Gaikwad [Fri, 11 Jan 2013 08:01:28 +0000 (13:31 +0530)]
clk: tegra20: remove unused TEGRA_CLK_DUPLICATE()s

With device tree support added for Tegra clocks look up is done from
device tree, remove unused TEGRA_CLK_DUPLICATE()s.

Signed-off-by: Prashant Gaikwad <pgaikwad@nvidia.com>
Acked-by: Mike Turquette <mturquette@linaro.org>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
11 years agoARM: tegra30: remove auxdata
Prashant Gaikwad [Fri, 11 Jan 2013 08:01:27 +0000 (13:31 +0530)]
ARM: tegra30: remove auxdata

Remove AUXDATA as clocks are initialized from device node.

Signed-off-by: Prashant Gaikwad <pgaikwad@nvidia.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
11 years agoARM: tegra20: remove auxdata
Prashant Gaikwad [Fri, 11 Jan 2013 08:01:26 +0000 (13:31 +0530)]
ARM: tegra20: remove auxdata

Remove AUXDATA as clock are initialized from device node.

Signed-off-by: Prashant Gaikwad <pgaikwad@nvidia.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
11 years agoASoC: tegra: remove auxdata
Prashant Gaikwad [Fri, 11 Jan 2013 08:01:25 +0000 (13:31 +0530)]
ASoC: tegra: remove auxdata

Configlink clock information is added to device tree. Get the clocks
using device node. Remove AUXDATA.

Signed-off-by: Prashant Gaikwad <pgaikwad@nvidia.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
11 years agostaging: nvec: remove use of clk_get_sys
Prashant Gaikwad [Fri, 11 Jan 2013 08:01:24 +0000 (13:31 +0530)]
staging: nvec: remove use of clk_get_sys

As clock information is added to device tree clock can be looked up
using clk_get. Remove use of clk_get_sys.

Signed-off-by: Prashant Gaikwad <pgaikwad@nvidia.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Acked-by: Marc Dietrich <marvin24@gmx.de>
Acked-by: Julian Andres Klode <jak@jak-linux.org>
[swarren: updated TODO file to remove entry that requested this change]
Signed-off-by: Stephen Warren <swarren@nvidia.com>