platform/kernel/linux-rpi.git
11 years agoMerge tag 'omap-for-v3.10/gpmc-signed' of git://git.kernel.org/pub/scm/linux/kernel...
Arnd Bergmann [Mon, 8 Apr 2013 17:40:57 +0000 (19:40 +0200)]
Merge tag 'omap-for-v3.10/gpmc-signed' of git://git./linux/kernel/git/tmlind/linux-omap into next/drivers

From Tony Lindgren <tony@atomide.com>:

GPMC updates from Jon Hunter <jon-hunter@ti.com>:

Adds GPMC (General Purpose Memory Controller) DT support for
NOR flash and Ethernet and includes various GPMC cleans-up
and fixes.

This series is dependent on commit 7185684 (ARM: OMAP: use
consistent error checking) from RMK's clean-up branch and commit
31d9adc (ARM: OMAP2+: Fix broken gpmc support).

* tag 'omap-for-v3.10/gpmc-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: (29 commits)
  ARM: OMAP2+: Add GPMC DT support for Ethernet child nodes
  ARM: OMAP2+: rename gpmc_probe_nor_child() to gpmc_probe_generic_child()
  ARM: OMAP2+: return -ENODEV if GPMC child device creation fails
  ARM: OMAP2+: Allow GPMC probe to complete even if CS mapping fails
  ARM: OMAP2+: Remove unnecesssary GPMC definitions and variable
  ARM: OMAP2+: Detect incorrectly aligned GPMC base address
  ARM: OMAP2+: Convert ONENAND to retrieve GPMC settings from DT
  ARM: OMAP2+: Convert NAND to retrieve GPMC settings from DT
  ARM: OMAP2+: Add device-tree support for NOR flash
  ARM: OMAP2+: Add additional GPMC timing parameters
  ARM: OMAP2+: Add function to read GPMC settings from device-tree
  ARM: OMAP2+: Don't configure of chip-select options in gpmc_cs_configure()
  ARM: OMAP2+: Convert TUSB to use gpmc_cs_program_settings()
  ARM: OMAP2+: Convert SMC91x to use gpmc_cs_program_settings()
  ARM: OMAP2+: Convert NAND to use gpmc_cs_program_settings()
  ARM: OMAP2+: Convert ONENAND to use gpmc_cs_program_settings()
  ARM: OMAP2+: Add function for configuring GPMC settings
  ARM: OMAP2+: Add structure for storing GPMC settings
  ARM: OMAP2+: Add variable to store number of GPMC waitpins
  ARM: OMAP2+: Simplify code configuring ONENAND devices
  ...

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
11 years agoMerge tag 'omap-for-v3.10/timer-signed' of git://git.kernel.org/pub/scm/linux/kernel...
Arnd Bergmann [Mon, 8 Apr 2013 17:30:48 +0000 (19:30 +0200)]
Merge tag 'omap-for-v3.10/timer-signed' of git://git./linux/kernel/git/tmlind/linux-omap into next/drivers

From Tony Lindgren <tony@atomide.com>:

Clean-up for omap2+ timers from Jon Hunter <jon-hunter@ti.com>:

This series consists mainly of clean-ups for clockevents and
clocksource timers on OMAP2+ devices. The most significant change
in functionality comes from the 5th patch which is changing the
selection of the clocksource timer for OMAP3 and AM335x devices
when gptimers are used for clocksource.

Note that this series depends on 7185684 (ARM: OMAP: use
consistent error checking) in RMK's tree and 960cba6 (ARM:
OMAP5: timer: Update the clocksource name as per clock data)
in omap-for-v3.10/fixes-non-critical. So this branch is based
on a merge of 7185684 and omap-for-v3.10/fixes-non-critical
to avoid non-trivial merge conflicts.

* tag 'omap-for-v3.10/timer-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
  ARM: OMAP4+: Fix sparse warning in system timers
  ARM: OMAP2+: Store ID of system timers in timer structure
  ARM: OMAP3: Update clocksource timer selection
  ARM: OMAP2+: Simplify system timers definitions
  ARM: OMAP2+: Simplify system timer clock definitions
  ARM: OMAP2+: Remove hard-coded test on timer ID
  ARM: OMAP2+: Display correct system timer name
  ARM: OMAP2+: fix typo "CONFIG_BRIDGE_DVFS"
  ARM: OMAP1: remove "config MACH_OMAP_HTCWIZARD"
  ARM: OMAP: dpll: enable bypass clock only when attempting dpll bypass
  ARM: OMAP2+: powerdomain: avoid testing whether an unsigned char is less than 0
  ARM: OMAP2+: hwmod: Remove unused _HWMOD_WAKEUP_ENABLED flag
  ARM: OMAP2+: am335x: Change the wdt1 func clk src to per_32k clk
  ARM: OMAP2+: AM33xx: hwmod: Add missing sysc definition to wdt1 entry

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
11 years agoMerge tag 'omap-for-v3.10/usb-signed' of git://git.kernel.org/pub/scm/linux/kernel...
Arnd Bergmann [Mon, 8 Apr 2013 17:06:51 +0000 (19:06 +0200)]
Merge tag 'omap-for-v3.10/usb-signed' of git://git./linux/kernel/git/tmlind/linux-omap into next/drivers

From Tony Lindgren <tony@atomide.com>:

EHCI platform data related changes for v3.10 merge window.
These are needed for the USB PHY support, and are based on
commit 1f0972f5 from Felipe Balbi's tree as agreed on the
mailing lists.

* tag 'omap-for-v3.10/usb-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: (21 commits)
  ARM: dts: omap3-beagle: Add USB Host support
  ARM: dts: OMAP3: Add HS USB Host IP nodes
  ARM: dts: OMAP4: Add HS USB Host IP nodes
  ARM: OMAP: zoom: Adapt to ehci-omap changes
  ARM: OMAP3: overo: Adapt to ehci-omap changes
  ARM: OMAP3: omap3touchbook: Adapt to ehci-omap changes
  ARM: OMAP3: omap3stalker: Adapt to ehci-omap changes
  ARM: OMAP3: omap3pandora: Adapt to ehci-omap changes
  ARM: OMAP3: omap3evm: Adapt to ehci-omap changes
  ARM: OMAP3: igep0020: Adapt to ehci-omap changes
  ARM: OMAP: devkit8000: Adapt to ehci-omap changes
  ARM: OMAP3: cm-t3517: Adapt to ehci-omap changes
  ARM: OMAP3: cm-t35: Adapt to ehci-omap changes
  ARM: OMAP: AM3517evm: Adapt to ehci-omap changes
  ARM: OMAP: AM3517crane: Adapt to ehci-omap changes
  ARM: OMAP3: 3630SDP: Adapt to ehci-omap changes
  ARM: OMAP3: 3430SDP: Adapt to ehci-omap changes
  ARM: OMAP3: Beagle: Adapt to ehci-omap changes
  ARM: OMAP2+: omap4panda: Adapt to ehci-omap changes
  ARM: OMAP2+: omap-usb-host: Add usbhs_init_phys()
  ...

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
11 years agoMerge branch 'zynq/clksrc/cleanup' of git://git.xilinx.com/linux-xlnx into next/drivers
Arnd Bergmann [Mon, 8 Apr 2013 16:34:19 +0000 (18:34 +0200)]
Merge branch 'zynq/clksrc/cleanup' of git://git.xilinx.com/linux-xlnx into next/drivers

From Michal Simek <michal.simek@xilinx.com>:

* 'zynq/clksrc/cleanup' of git://git.xilinx.com/linux-xlnx:
  arm: zynq: Move timer to generic location
  arm: zynq: Do not use xilinx specific function names
  arm: zynq: Move timer to clocksource interface
  arm: zynq: Use standard timer binding

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
11 years agoMerge tag 'vt8500/pinctrl' of git://server.prisktech.co.nz/git/linuxwmt into next...
Arnd Bergmann [Mon, 8 Apr 2013 16:26:15 +0000 (18:26 +0200)]
Merge tag 'vt8500/pinctrl' of git://server.prisktech.co.nz/git/linuxwmt into next/drivers

From Tony Prisk <linux@prisktech.co.nz>:

arm: vt8500: Add pinctrl driver for arch-vt8500

This series adds support for the pinctrl/gpio module on all arch-vt8500
supported SoCs.

As part of the review process, some tidy up is also done to
drivers/of/base.c to remove some code that is being constantly duplicated.

Also, a patch for the bcm2835 pinctrl driver is included to take advantage
of the new of/base.c code.

* tag 'vt8500/pinctrl' of git://server.prisktech.co.nz/git/linuxwmt: (606 commits)
  pinctrl: bcm2835: make use of of_property_read_u32_index()
  gpio: vt8500: Remove arch-vt8500 gpio driver
  arm: vt8500: Remove gpio devicetree nodes
  arm: dts: vt8500: Update Wondermedia SoC dtsi files for pinctrl driver
  pinctrl: gpio: vt8500: Add pincontrol driver for arch-vt8500
  arm: vt8500: Increase available GPIOs on arch-vt8500
  of: Remove duplicated code for validating property and value
  of: Add support for reading a u32 from a multi-value property.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
11 years agoMerge tag 'renesas-intc-external-irq2-for-v3.10' of git://git.kernel.org/pub/scm...
Arnd Bergmann [Mon, 8 Apr 2013 15:52:35 +0000 (17:52 +0200)]
Merge tag 'renesas-intc-external-irq2-for-v3.10' of git://git./linux/kernel/git/horms/renesas into next/drivers

From Simon Horman <horms+renesas@verge.net.au>:

Update for Renesas INTC External IRQ pin driver for v3.10

This adds support for shared interrupt lines to the
Renesas INTC External IRQ pin driver which has already
been queued up for v3.10 (tag renesas-intc-external-irq-for-v3.10).

* tag 'renesas-intc-external-irq2-for-v3.10' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas:
  irqchip: intc-irqpin: Add support for shared interrupt lines

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
11 years agoMerge branch 'omap-gpmc-for-v3.10-take2' of git://github.com/jonhunter/linux into...
Tony Lindgren [Thu, 4 Apr 2013 18:22:33 +0000 (11:22 -0700)]
Merge branch 'omap-gpmc-for-v3.10-take2' of git://github.com/jonhunter/linux into omap-for-v3.10/gpmc

11 years agoarm: zynq: Move timer to generic location
Michal Simek [Wed, 20 Mar 2013 09:46:01 +0000 (10:46 +0100)]
arm: zynq: Move timer to generic location

Move zynq timer out of mach folder to generic location
and enable it.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
11 years agoarm: zynq: Do not use xilinx specific function names
Michal Simek [Wed, 27 Mar 2013 11:05:28 +0000 (12:05 +0100)]
arm: zynq: Do not use xilinx specific function names

Remove all xilinx specific names from the driver
because this is generic driver for cadence ttc.
xttc->ttc
ttcps->ttc
...

No functional changes in this driver.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
11 years agoarm: zynq: Move timer to clocksource interface
Michal Simek [Wed, 20 Mar 2013 09:24:59 +0000 (10:24 +0100)]
arm: zynq: Move timer to clocksource interface

Use clocksource timer initialization.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
11 years agoarm: zynq: Use standard timer binding
Michal Simek [Wed, 20 Mar 2013 09:15:28 +0000 (10:15 +0100)]
arm: zynq: Use standard timer binding

Use cdns,ttc because this driver is Cadence Rev06
Triple Timer Counter and everybody can use it
without xilinx specific function name or probing.

Also use standard dt description for timer
and also prepare for moving to clocksource
initialization.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
11 years agopinctrl: bcm2835: make use of of_property_read_u32_index()
Stephen Warren [Thu, 28 Mar 2013 05:09:57 +0000 (05:09 +0000)]
pinctrl: bcm2835: make use of of_property_read_u32_index()

Use the new standard API of_property_read_u32_index() instead of open-
coding it.

Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>
Signed-off-by: Tony Prisk <linux@prisktech.co.nz>
11 years agogpio: vt8500: Remove arch-vt8500 gpio driver
Tony Prisk [Wed, 20 Feb 2013 04:29:33 +0000 (17:29 +1300)]
gpio: vt8500: Remove arch-vt8500 gpio driver

With the move to a combined pinctrl/gpio driver, the arch-vt8500
gpio driver is no longer required.

Signed-off-by: Tony Prisk <linux@prisktech.co.nz>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
11 years agoarm: vt8500: Remove gpio devicetree nodes
Tony Prisk [Wed, 20 Feb 2013 04:28:56 +0000 (17:28 +1300)]
arm: vt8500: Remove gpio devicetree nodes

Remove the gpio related devicetree nodes as these are no longer required
with the move to a combined pinctrl/gpio driver.

Signed-off-by: Tony Prisk <linux@prisktech.co.nz>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
11 years agoarm: dts: vt8500: Update Wondermedia SoC dtsi files for pinctrl driver
Tony Prisk [Tue, 19 Feb 2013 20:52:23 +0000 (09:52 +1300)]
arm: dts: vt8500: Update Wondermedia SoC dtsi files for pinctrl driver

This patch adds pinctrl nodes to the VIA VT8500 and Wondermedia SoC dtsi
files to support the pinctrl driver.

Signed-off-by: Tony Prisk <linux@prisktech.co.nz>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
11 years agopinctrl: gpio: vt8500: Add pincontrol driver for arch-vt8500
Tony Prisk [Tue, 19 Feb 2013 20:32:19 +0000 (09:32 +1300)]
pinctrl: gpio: vt8500: Add pincontrol driver for arch-vt8500

This patch adds support for the GPIO/pinmux controller found on the VIA
VT8500 and Wondermedia WM8xxx-series SoCs.

Each pin within the controller is capable of operating as a GPIO or as
an alternate function. The pins are numbered according to their control
bank/bit so that if new pins are added, the existing numbering is maintained.

All currently supported SoCs are included: VT8500, WM8505, WM8650, WM8750 and
WM8850.

Signed-off-by: Tony Prisk <linux@prisktech.co.nz>
Reviewed-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
11 years agoarm: vt8500: Increase available GPIOs on arch-vt8500
Tony Prisk [Sat, 9 Mar 2013 05:22:30 +0000 (18:22 +1300)]
arm: vt8500: Increase available GPIOs on arch-vt8500

With the inclusion of the pin control driver, more GPIO pins have been
identified on the arch-vt8500 SoCs requiring an increase in the available
GPIOs.

Signed-off-by: Tony Prisk <linux@prisktech.co.nz>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
11 years agoof: Remove duplicated code for validating property and value
Tony Prisk [Wed, 3 Apr 2013 04:57:11 +0000 (17:57 +1300)]
of: Remove duplicated code for validating property and value

Several functions in of/base.c have the same code duplicated for
finding and validating a property and value.

struct property *prop = of_find_property(np, propname, NULL);
if (!prop)
return -EINVAL;
if (!prop->value)
return -ENODATA;
if (<some length> > prop->length)
return -EOVERFLOW;

This patch adds of_find_property_value_of_size() which performs the
equivalent of the above code and removes the instances where it was
duplicated in several functions.

Reported-by: Rob Herring <robherring2@gmail.com>
Signed-off-by: Tony Prisk <linux@prisktech.co.nz>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Rob Herring <rob.herring@calxeda.com>
11 years agoof: Add support for reading a u32 from a multi-value property.
Tony Prisk [Sat, 23 Mar 2013 04:02:15 +0000 (17:02 +1300)]
of: Add support for reading a u32 from a multi-value property.

This patch adds an of_property_read_u32_index() function to allow
reading a single indexed u32 value from a property containing multiple
u32 values.

Signed-off-by: Tony Prisk <linux@prisktech.co.nz>
Reviewed-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Rob Herring <robherring2@gmail.com>
11 years agoARM: OMAP2+: Add GPMC DT support for Ethernet child nodes
Javier Martinez Canillas [Thu, 14 Mar 2013 21:54:11 +0000 (22:54 +0100)]
ARM: OMAP2+: Add GPMC DT support for Ethernet child nodes

Besides being used to interface with external memory devices,
the General-Purpose Memory Controller can be used to connect
Pseudo-SRAM devices such as ethernet controllers to OMAP2+
processors using the TI GPMC as a data bus.

This patch allows an ethernet chip to be defined as an GPMC
child device node.

Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
Signed-off-by: Jon Hunter <jon-hunter@ti.com>
11 years agoARM: OMAP2+: rename gpmc_probe_nor_child() to gpmc_probe_generic_child()
Javier Martinez Canillas [Thu, 14 Mar 2013 15:09:21 +0000 (16:09 +0100)]
ARM: OMAP2+: rename gpmc_probe_nor_child() to gpmc_probe_generic_child()

The gpmc_probe_nor_child() function is used in the GPMC driver to
configure the GPMC for a NOR child device node.

But this function is quite generic and all the NOR specific configuration
is made by the driver of the actual NOR flash memory used.

Other Pseudo-SRAM devices such as ethernet controllers need a similar
setup so by making this function generic it can be used for those too.

Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
Signed-off-by: Jon Hunter <jon-hunter@ti.com>
11 years agoARM: OMAP2+: return -ENODEV if GPMC child device creation fails
Javier Martinez Canillas [Thu, 14 Mar 2013 15:09:20 +0000 (16:09 +0100)]
ARM: OMAP2+: return -ENODEV if GPMC child device creation fails

gpmc_probe_nor_child() calls of_platform_device_create() to create a
platform device for the NOR child. If this function fails the value
of ret is returned to the caller but this value is zero since it was
assigned the return of a previous call to gpmc_cs_program_settings()
that had to succeed or otherwise gpmc_probe_nor_child() would have
returned before.

This means that if of_platform_device_create() fails, 0 will be returned
to the caller instead of an appropriate error code.

Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
Signed-off-by: Jon Hunter <jon-hunter@ti.com>
Tested-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
11 years agoARM: OMAP2+: Allow GPMC probe to complete even if CS mapping fails
Jon Hunter [Wed, 6 Mar 2013 20:36:47 +0000 (14:36 -0600)]
ARM: OMAP2+: Allow GPMC probe to complete even if CS mapping fails

When the GPMC driver is probed, we call gpmc_mem_init() to see which
chip-selects have already been configured and enabled by the boot-loader
and allocate space for them. If we fail to allocate space for one
chip-select, then we return failure from the probe and the GPMC driver
will not be available.

Rather than render the GPMC useless for all GPMC devices, if we fail to
allocate space for one chip-select print a warning and disable the
chip-select. This way other GPMC clients can still be used.

There is no downside to this approach, because all GPMC clients need to
request a chip-select before they can use the GPMC and on requesting a
chip-select, if memory has not already been reserved for the chip-select
then it will be.

Signed-off-by: Jon Hunter <jon-hunter@ti.com>
Tested-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
11 years agoARM: OMAP2+: Remove unnecesssary GPMC definitions and variable
Jon Hunter [Wed, 6 Mar 2013 20:12:59 +0000 (14:12 -0600)]
ARM: OMAP2+: Remove unnecesssary GPMC definitions and variable

With commit 21cc2bd (ARM: OMAP2+: Remove apollon board support) the
variable "boot_rom_space" is now not needed and the code surrounding
this variable can be cleaned up and simplified. Remove unnecessary
definitions and clean-up the comment as well.

Signed-off-by: Jon Hunter <jon-hunter@ti.com>
Tested-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
11 years agoARM: OMAP2+: Detect incorrectly aligned GPMC base address
Jon Hunter [Wed, 6 Mar 2013 18:00:10 +0000 (12:00 -0600)]
ARM: OMAP2+: Detect incorrectly aligned GPMC base address

Each GPMC chip-select can be configured to map 16MB, 32MB, 64MB or 128MB
of address space. The physical base address where a chip-select starts
is also configurable and must be aligned on a boundary that is equal to
or greater than the size of the address space mapped bt the chip-select.
When enabling a GPMC chip-select, ensure that the base address is aligned
to the appropriate boundary.

Reported-by: Mark Jackson <mpfj-list@mimc.co.uk>
Signed-off-by: Jon Hunter <jon-hunter@ti.com>
Tested-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
11 years agoARM: OMAP2+: Convert ONENAND to retrieve GPMC settings from DT
Jon Hunter [Mon, 25 Feb 2013 17:37:58 +0000 (11:37 -0600)]
ARM: OMAP2+: Convert ONENAND to retrieve GPMC settings from DT

When booting with device-tree, retrieve GPMC settings for ONENAND from
the device-tree blob. This will allow us to remove all static settings
stored in the gpmc-nand.c in the future once the migration to
device-tree is complete.

The user must now specify the ONENAND device width in the device-tree
binding so that the GPMC can be programmed correctly. Therefore, update
the device-tree binding documentation for ONENAND devices connected to
the GPMC to reflect this.

Please note that this does not include GPMC timings for ONENAND. The
timings are being calculated at runtime.

There is some legacy code that only enables read wait monitoring for
non-OMAP3 devices. There are no known OMAP3 device issues that prevent
this feature being enabled and so when booting with device-tree use the
wait-monitoring settings described in the device-tree blob.

Signed-off-by: Jon Hunter <jon-hunter@ti.com>
Tested-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
11 years agoARM: OMAP2+: Convert NAND to retrieve GPMC settings from DT
Jon Hunter [Mon, 25 Feb 2013 17:36:47 +0000 (11:36 -0600)]
ARM: OMAP2+: Convert NAND to retrieve GPMC settings from DT

When booting with device-tree, retrieve GPMC settings for NAND from
the device-tree blob. This will allow us to remove all static settings
stored in the gpmc-nand.c in the future once the migration to
device-tree is complete.

Signed-off-by: Jon Hunter <jon-hunter@ti.com>
Tested-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
11 years agoARM: OMAP2+: Add device-tree support for NOR flash
Jon Hunter [Fri, 8 Feb 2013 22:46:13 +0000 (16:46 -0600)]
ARM: OMAP2+: Add device-tree support for NOR flash

NOR flash is not currently supported when booting with device-tree
on OMAP2+ devices. Add support to detect and configure NOR devices
when booting with device-tree.

Add documentation for the TI GPMC NOR binding.

Signed-off-by: Jon Hunter <jon-hunter@ti.com>
Tested-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
11 years agoARM: OMAP2+: Add additional GPMC timing parameters
Jon Hunter [Fri, 22 Feb 2013 00:51:27 +0000 (18:51 -0600)]
ARM: OMAP2+: Add additional GPMC timing parameters

Some of the GPMC timings parameters are currently missing from the GPMC
device-tree binding. Add these parameters to the binding documentation
as well as code to read them. Also add either "-ps" or "-ns" suffix to
the GPMC timing properties to indicate whether the timing is in
picoseconds or nanoseconds.

The existing code in gpmc_read_timings_dt() is checking the value of
of_property_read_u32() and only is successful storing the value read
in the gpmc_timings structure. Checking the return value in this case
is not necessary and we can simply read the value, if present, and
store directly in the gpmc_timings structure. Therefore, simplify the
code by removing these checks.

The comment in the gpmc_read_timings_dt() function, "only for OMAP3430"
is also incorrect as it is applicable to all OMAP3+ devices. So correct
this too.

Signed-off-by: Jon Hunter <jon-hunter@ti.com>
Tested-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
11 years agoMerge branch 'omap-timer-for-v3.10' of git://github.com/jonhunter/linux into omap...
Tony Lindgren [Wed, 3 Apr 2013 17:47:59 +0000 (10:47 -0700)]
Merge branch 'omap-timer-for-v3.10' of git://github.com/jonhunter/linux into omap-for-v3.10/timer

Conflicts:
arch/arm/mach-omap2/timer.c

11 years agoMerge commit '7185684' into omap-for-v3.10/timer
Tony Lindgren [Wed, 3 Apr 2013 17:32:47 +0000 (10:32 -0700)]
Merge commit '7185684' into omap-for-v3.10/timer

Conflicts:
arch/arm/plat-omap/dmtimer.c

Resolve merge conflict in omap_device.c as per
Lothar Waßmann <LW@KARO-electronics.de>.

11 years agoARM: dts: omap3-beagle: Add USB Host support
Roger Quadros [Wed, 20 Mar 2013 15:45:00 +0000 (17:45 +0200)]
ARM: dts: omap3-beagle: Add USB Host support

Provide RESET and Power regulators for the USB PHY,
the USB Host port mode and the PHY device.

Also provide pin multiplexer information for USB host
pins.

CC: Benoît Cousson <b-cousson@ti.com>
Signed-off-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
11 years agoARM: dts: OMAP3: Add HS USB Host IP nodes
Roger Quadros [Wed, 20 Mar 2013 15:44:59 +0000 (17:44 +0200)]
ARM: dts: OMAP3: Add HS USB Host IP nodes

Adds device nodes for HS USB Host module, TLL module,
OHCI and EHCI controllers.

CC: Benoît Cousson <b-cousson@ti.com>
Signed-off-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
11 years agoARM: dts: OMAP4: Add HS USB Host IP nodes
Roger Quadros [Wed, 20 Mar 2013 15:44:58 +0000 (17:44 +0200)]
ARM: dts: OMAP4: Add HS USB Host IP nodes

Adds device nodes for HS USB Host module, TLL module,
OHCI and EHCI controllers.

CC: Benoît Cousson <b-cousson@ti.com>
Signed-off-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
11 years agoARM: OMAP: zoom: Adapt to ehci-omap changes
Roger Quadros [Wed, 20 Mar 2013 15:44:57 +0000 (17:44 +0200)]
ARM: OMAP: zoom: Adapt to ehci-omap changes

Use usbhs_init_phys() to register the PHY's RESET regulator
and the NOP PHY device.

Signed-off-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
11 years agoARM: OMAP3: overo: Adapt to ehci-omap changes
Roger Quadros [Wed, 20 Mar 2013 15:44:56 +0000 (17:44 +0200)]
ARM: OMAP3: overo: Adapt to ehci-omap changes

Use usbhs_init_phys() to register the PHY's RESET regulator
and the NOP PHY device.

Signed-off-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
11 years agoARM: OMAP3: omap3touchbook: Adapt to ehci-omap changes
Roger Quadros [Wed, 20 Mar 2013 15:44:55 +0000 (17:44 +0200)]
ARM: OMAP3: omap3touchbook: Adapt to ehci-omap changes

Use usbhs_init_phys() to register the PHY's RESET regulator
and the NOP PHY device.

Signed-off-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
11 years agoARM: OMAP3: omap3stalker: Adapt to ehci-omap changes
Roger Quadros [Wed, 20 Mar 2013 15:44:54 +0000 (17:44 +0200)]
ARM: OMAP3: omap3stalker: Adapt to ehci-omap changes

Use usbhs_init_phys() to register the PHY's RESET regulator
and the NOP PHY device.

Signed-off-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
11 years agoARM: OMAP3: omap3pandora: Adapt to ehci-omap changes
Roger Quadros [Wed, 20 Mar 2013 15:44:53 +0000 (17:44 +0200)]
ARM: OMAP3: omap3pandora: Adapt to ehci-omap changes

Use usbhs_init_phys() to register the PHY's RESET regulator
and NOP PHY device. VAUX2 supplies the PHY's VCC.

Signed-off-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
11 years agoARM: OMAP3: omap3evm: Adapt to ehci-omap changes
Roger Quadros [Wed, 20 Mar 2013 15:44:52 +0000 (17:44 +0200)]
ARM: OMAP3: omap3evm: Adapt to ehci-omap changes

Use usbhs_init_phys() to register the PHY's RESET regulator
and the NOP PHY device. VAUX2 supplies the PHY's VCC.

Signed-off-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
11 years agoARM: OMAP3: igep0020: Adapt to ehci-omap changes
Roger Quadros [Wed, 20 Mar 2013 15:44:51 +0000 (17:44 +0200)]
ARM: OMAP3: igep0020: Adapt to ehci-omap changes

Use usbhs_init_phys() to register the PHY's RESET regulators
and the NOP PHY devices.

Signed-off-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
11 years agoARM: OMAP: devkit8000: Adapt to ehci-omap changes
Roger Quadros [Wed, 20 Mar 2013 15:44:50 +0000 (17:44 +0200)]
ARM: OMAP: devkit8000: Adapt to ehci-omap changes

Remove deprecated USBHS platform data.

Signed-off-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
11 years agoARM: OMAP3: cm-t3517: Adapt to ehci-omap changes
Roger Quadros [Wed, 20 Mar 2013 15:44:49 +0000 (17:44 +0200)]
ARM: OMAP3: cm-t3517: Adapt to ehci-omap changes

Use usbhs_init_phys() to register the PHY's RESET regulators
and the NOP PHY devices.

Signed-off-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
11 years agoARM: OMAP3: cm-t35: Adapt to ehci-omap changes
Roger Quadros [Wed, 20 Mar 2013 15:44:48 +0000 (17:44 +0200)]
ARM: OMAP3: cm-t35: Adapt to ehci-omap changes

Use usbhs_init_phys() to register the PHY's RESET regulators
and the NOP PHY devices.

Signed-off-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
11 years agoARM: OMAP: AM3517evm: Adapt to ehci-omap changes
Roger Quadros [Wed, 20 Mar 2013 15:44:47 +0000 (17:44 +0200)]
ARM: OMAP: AM3517evm: Adapt to ehci-omap changes

Use usbhs_init_phys() to register the PHY's RESET regulators
and the NOP PHY device.

Signed-off-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
11 years agoARM: OMAP: AM3517crane: Adapt to ehci-omap changes
Roger Quadros [Wed, 20 Mar 2013 15:44:46 +0000 (17:44 +0200)]
ARM: OMAP: AM3517crane: Adapt to ehci-omap changes

Use usbhs_init_phys() to register the PHY's VCC and RESET
regulators and the NOP PHY device.

Signed-off-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
11 years agoARM: OMAP3: 3630SDP: Adapt to ehci-omap changes
Roger Quadros [Wed, 20 Mar 2013 15:44:45 +0000 (17:44 +0200)]
ARM: OMAP3: 3630SDP: Adapt to ehci-omap changes

Use usbhs_init_phys() to register the PHY's RESET regulators
and the NOP PHY devices.

Signed-off-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
11 years agoARM: OMAP3: 3430SDP: Adapt to ehci-omap changes
Roger Quadros [Wed, 20 Mar 2013 15:44:44 +0000 (17:44 +0200)]
ARM: OMAP3: 3430SDP: Adapt to ehci-omap changes

Use usbhs_init_phys() to register the PHY's RESET regulators
and the NOP PHY devices.

Signed-off-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
11 years agoARM: OMAP3: Beagle: Adapt to ehci-omap changes
Roger Quadros [Wed, 20 Mar 2013 15:44:43 +0000 (17:44 +0200)]
ARM: OMAP3: Beagle: Adapt to ehci-omap changes

Use usbhs_init_phys() to register the PHY's VCC and RESET
regulators and the NOP PHY device.

Signed-off-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
11 years agoARM: OMAP2+: omap4panda: Adapt to ehci-omap changes
Roger Quadros [Wed, 20 Mar 2013 15:44:42 +0000 (17:44 +0200)]
ARM: OMAP2+: omap4panda: Adapt to ehci-omap changes

Use usbhs_init_phys() to register the PHY's VCC and RESET
regulators and the NOP PHY device.

Get rid of managing the PHY clock as it will be done by the PHY driver.
For that to work we create a clock alias that links the PHY clock name
to the PHY device name.

Signed-off-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
11 years agoARM: OMAP2+: omap-usb-host: Add usbhs_init_phys()
Roger Quadros [Wed, 20 Mar 2013 15:44:41 +0000 (17:44 +0200)]
ARM: OMAP2+: omap-usb-host: Add usbhs_init_phys()

This helper allows board support code to add the PHY's
VCC and RESET regulators which are GPIO controlled as well
as the NOP PHY device.

Signed-off-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
11 years agoARM: OMAP2+: Add function to read GPMC settings from device-tree
Jon Hunter [Wed, 20 Feb 2013 21:53:12 +0000 (15:53 -0600)]
ARM: OMAP2+: Add function to read GPMC settings from device-tree

Adds a function to read the various GPMC chip-select settings from
device-tree and store them in the gpmc_settings structure.

Update the GPMC device-tree binding documentation to describe these
options.

Signed-off-by: Jon Hunter <jon-hunter@ti.com>
Tested-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
11 years agoARM: OMAP2+: Don't configure of chip-select options in gpmc_cs_configure()
Jon Hunter [Thu, 21 Feb 2013 19:00:21 +0000 (13:00 -0600)]
ARM: OMAP2+: Don't configure of chip-select options in gpmc_cs_configure()

With the addition of the gpmc_cs_program_settings(), we no longer need
or use gpmc_cs_configure() to configure some of the GPMC chip-select
options. So rename the function to gpmc_configure() and remove code that
modifies options in the CONFIG1 register.

Signed-off-by: Jon Hunter <jon-hunter@ti.com>
Tested-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
11 years agoARM: OMAP2+: Convert TUSB to use gpmc_cs_program_settings()
Jon Hunter [Thu, 21 Feb 2013 19:01:47 +0000 (13:01 -0600)]
ARM: OMAP2+: Convert TUSB to use gpmc_cs_program_settings()

Convert the OMAP2+ TUSB code to use the gpmc_cs_program_settings()
function for configuring the various GPMC options instead of directly
programming the CONFIG1 register.

Signed-off-by: Jon Hunter <jon-hunter@ti.com>
Tested-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
11 years agoARM: OMAP2+: Convert SMC91x to use gpmc_cs_program_settings()
Jon Hunter [Thu, 21 Feb 2013 19:01:37 +0000 (13:01 -0600)]
ARM: OMAP2+: Convert SMC91x to use gpmc_cs_program_settings()

Convert the OMAP2+ SMC91x code to use the gpmc_cs_program_settings()
function for configuring the various GPMC options instead of directly
programming the CONFIG1 register.

Move configuration of the GPMC settings outside retime function and
this does not need to be done if the timings are changed dynamically
at runtime.

Signed-off-by: Jon Hunter <jon-hunter@ti.com>
Tested-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
11 years agoARM: OMAP2+: Convert NAND to use gpmc_cs_program_settings()
Jon Hunter [Thu, 21 Feb 2013 21:43:08 +0000 (15:43 -0600)]
ARM: OMAP2+: Convert NAND to use gpmc_cs_program_settings()

Convert the OMAP2+ NAND code to use the gpmc_cs_program_settings()
function for configuring the various GPMC options instead of directly
programming the CONFIG1 register.

This moves the configuration of some GPMC options outside the
nand_gpmc_retime() because these options should only need to be set once
regardless of whether the gpmc timing is changing dynamically at runtime.
The programming of where the wait-pin is also moved slightly, but this
will not have any impact to existing devices as no boards are currently
setting the dev_ready variable.

Signed-off-by: Jon Hunter <jon-hunter@ti.com>
Tested-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
11 years agoARM: OMAP2+: Convert ONENAND to use gpmc_cs_program_settings()
Jon Hunter [Thu, 21 Feb 2013 18:42:22 +0000 (12:42 -0600)]
ARM: OMAP2+: Convert ONENAND to use gpmc_cs_program_settings()

Convert the OMAP2+ ONENAND code to use the gpmc_cs_program_settings()
function for configuring the various GPMC options instead of directly
programming the CONFIG1 register.

Signed-off-by: Jon Hunter <jon-hunter@ti.com>
Tested-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
11 years agoARM: OMAP2+: Add function for configuring GPMC settings
Jon Hunter [Thu, 21 Feb 2013 21:25:23 +0000 (15:25 -0600)]
ARM: OMAP2+: Add function for configuring GPMC settings

The GPMC has various different configuration options such as bus-width,
synchronous or asychronous mode selection, burst mode options etc.
Currently, there is no common function for configuring these options and
various devices set these options by either programming the GPMC CONFIG1
register directly or by calling gpmc_cs_configure() to set some of the
options.

Add a new function for configuring all of the GPMC options. Having a common
function for configuring this options will simplify code and ease the
migration to device-tree.

Also add a new capability flag to detect devices that support the
address-address-data multiplexing mode.

Signed-off-by: Jon Hunter <jon-hunter@ti.com>
Tested-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
11 years agoARM: OMAP2+: Add structure for storing GPMC settings
Jon Hunter [Thu, 21 Feb 2013 19:46:22 +0000 (13:46 -0600)]
ARM: OMAP2+: Add structure for storing GPMC settings

The GPMC has various different configuration options such as bus-width,
synchronous or asychronous mode selection, burst mode options etc.
Currently, there is no central structure for storing all these options
when configuring the GPMC for a given device. Some of the options are
stored in the GPMC timing structure and some are directly programmed
into the GPMC configuration register. Add a new structure to store
these options and convert code to use this structure. Adding this
structure will allow us to create a common function for configuring
these options.

Signed-off-by: Jon Hunter <jon-hunter@ti.com>
Tested-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
11 years agoARM: OMAP2+: Add variable to store number of GPMC waitpins
Jon Hunter [Wed, 20 Feb 2013 21:53:38 +0000 (15:53 -0600)]
ARM: OMAP2+: Add variable to store number of GPMC waitpins

The GPMC has wait-pin signals that can be assigned to a chip-select
to monitor the ready signal of an external device. Add a variable to
indicate the total number of wait-pins for a given device. This will
allow us to detect if the wait-pin being selected is valid or not.

When booting with device-tree read the number of wait-pins from the
device-tree blob. When device-tree is not used set the number of
wait-pins to 4 which is valid for OMAP2-5 devices. Newer devices
that have less wait-pins (such as AM335x) only support booting with
device-tree and so hard-coding the wait-pin number when not using
device-tree is fine.

Signed-off-by: Jon Hunter <jon-hunter@ti.com>
Tested-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
11 years agoARM: OMAP2+: Simplify code configuring ONENAND devices
Jon Hunter [Thu, 21 Feb 2013 21:20:53 +0000 (15:20 -0600)]
ARM: OMAP2+: Simplify code configuring ONENAND devices

The OMAP2+ code that configures the GPMC for ONENAND devices is copying
structures between functions unnecessarily. Avoid this by passing
pointers instead and simplify the code.

A pointer to structure "omap_onenand_platform_data" is passed to the
function omap2_onenand_calc_sync_timings(), but only the flags member
of the structure is used. Simplify the code by only passing the flags
member and not the entire structure.

Signed-off-by: Jon Hunter <jon-hunter@ti.com>
Tested-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
11 years agoARM: omap2: gpmc: Remove redundant chip select out of range check
Ezequiel Garcia [Tue, 12 Feb 2013 19:22:24 +0000 (16:22 -0300)]
ARM: omap2: gpmc: Remove redundant chip select out of range check

This check is done before the call to gpmc_cs_reserved() and
gpmc_cs_set_reserved() and it's redundant to do it again in each
function. This simplifies the code a bit.

Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
Reviewed-by: Jon Hunter <jon-hunter@ti.com>
Signed-off-by: Jon Hunter <jon-hunter@ti.com>
11 years agoARM: omap2: gpmc-onenand: Replace printk KERN_ERR with dev_warn()
Ezequiel Garcia [Tue, 12 Feb 2013 19:22:23 +0000 (16:22 -0300)]
ARM: omap2: gpmc-onenand: Replace printk KERN_ERR with dev_warn()

Since the condition is not an error but a warning, replace
printk KERN_ERR with dev_warn.

Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
Reviewed-by: Jon Hunter <jon-hunter@ti.com>
Signed-off-by: Jon Hunter <jon-hunter@ti.com>
11 years agoARM: omap2: gpmc-onenand: Replace pr_err() with dev_err()
Ezequiel Garcia [Tue, 12 Feb 2013 19:22:22 +0000 (16:22 -0300)]
ARM: omap2: gpmc-onenand: Replace pr_err() with dev_err()

Do this becasue dev_err() is preferred over pr_err() and because
it will match gpmc-nand, thus the code shows looks more consistent.

Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
Reviewed-by: Jon Hunter <jon-hunter@ti.com>
Signed-off-by: Jon Hunter <jon-hunter@ti.com>
11 years agoARM: omap2: gpmc-onenand: Print something useful on CS request failure
Ezequiel Garcia [Tue, 12 Feb 2013 19:22:21 +0000 (16:22 -0300)]
ARM: omap2: gpmc-onenand: Print something useful on CS request failure

If CS request fails the current error message is rather unhelpful.
Fix it by printing the failing chip select and the error code.

Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
Reviewed-by: Jon Hunter <jon-hunter@ti.com>
Signed-off-by: Jon Hunter <jon-hunter@ti.com>
11 years agoARM: omap2: gpmc-nand: Print something useful on CS request failure
Ezequiel Garcia [Tue, 12 Feb 2013 19:22:20 +0000 (16:22 -0300)]
ARM: omap2: gpmc-nand: Print something useful on CS request failure

If CS request fails the current error message is rather unhelpful.
Fix it by printing the failing chip select and the error code.

Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
Reviewed-by: Jon Hunter <jon-hunter@ti.com>
Signed-off-by: Jon Hunter <jon-hunter@ti.com>
11 years agoARM: omap2: gpmc: Fix gpmc_cs_reserved() return value
Ezequiel Garcia [Tue, 12 Feb 2013 19:22:19 +0000 (16:22 -0300)]
ARM: omap2: gpmc: Fix gpmc_cs_reserved() return value

Currently gpmc_cs_reserved() return value is somewhat inconsistent,
returning a negative value on an error condition, a positive value
if the chip select is reserved and zero if it's available.

Fix this by returning a boolean value as the function name suggests:
  * true if the chip select is reserved,
  * false if it's available

Suggested-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
Reviewed-by: Jon Hunter <jon-hunter@ti.com>
Signed-off-by: Jon Hunter <jon-hunter@ti.com>
11 years agoARM: omap2: gpmc: Remove unused gpmc_round_ns_to_ticks() function
Ezequiel Garcia [Tue, 12 Feb 2013 19:22:18 +0000 (16:22 -0300)]
ARM: omap2: gpmc: Remove unused gpmc_round_ns_to_ticks() function

This function is not used anywhere, so it's safe to remove it.
This means less code to maintain.

Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
Reviewed-by: Jon Hunter <jon-hunter@ti.com>
Signed-off-by: Jon Hunter <jon-hunter@ti.com>
11 years agoARM: omap2: gpmc: Mark local scoped functions static
Ezequiel Garcia [Tue, 12 Feb 2013 19:22:17 +0000 (16:22 -0300)]
ARM: omap2: gpmc: Mark local scoped functions static

This patch marks a bunch of functions that are local
to gpmc.c file only as static.

Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
Reviewed-by: Jon Hunter <jon-hunter@ti.com>
Signed-off-by: Jon Hunter <jon-hunter@ti.com>
11 years agoARM: OMAP: Clear GPMC bits when applying new setting.
Mark Jackson [Tue, 5 Mar 2013 10:13:40 +0000 (10:13 +0000)]
ARM: OMAP: Clear GPMC bits when applying new setting.

When setting the GPMC device type, make sure any previous
bits are cleared down, before applying the new setting.

For OMAP4+ devices MUXADDDATA is a 2-bit field (bits 9:8)
where as for OMAP2/3 devices it was only a one bit field
(bit 9). For OMAP2/3 devices bit 8 is reserved and the
OMAP documentation says to write a 0 to this bit. So
clearing bit 8 on OMAP2/3 devices should not be a problem.
Hence update the code to handle both bits 8 and 9 for all
devices.

Signed-off-by: Mark Jackson <mpfj@newflow.co.uk>
[jon-hunter@ti.com: updated changelog]
Signed-off-by: Jon Hunter <jon-hunter@ti.com>
11 years agoMerge commit '31d9adca82ce65e5c99d045b5fd917c702b6fce3' into tmp
Jon Hunter [Mon, 1 Apr 2013 19:33:50 +0000 (14:33 -0500)]
Merge commit '31d9adca82ce65e5c99d045b5fd917c702b6fce3' into tmp

Conflicts:
arch/arm/plat-omap/dmtimer.c

11 years agoARM: OMAP4+: Fix sparse warning in system timers
Jon Hunter [Fri, 1 Feb 2013 23:25:42 +0000 (17:25 -0600)]
ARM: OMAP4+: Fix sparse warning in system timers

Commit 6bb27d7 (ARM: delete struct sys_timer) changed the function
created by the macro OMAP_SYS_32K_TIMER_INIT from static void to void.
For OMAP4+ devices this created the following sparse warning ...

arch/arm/mach-omap2/timer.c:585:1: warning: symbol
'omap4_sync32k_timer_init' was not declared. Should it be static?

The function omap4_sync32k_timer_init() is not referenced outside of the
file timer.c and so make this function static.

Signed-off-by: Jon Hunter <jon-hunter@ti.com>
11 years agoARM: OMAP2+: Store ID of system timers in timer structure
Jon Hunter [Fri, 1 Feb 2013 22:40:09 +0000 (16:40 -0600)]
ARM: OMAP2+: Store ID of system timers in timer structure

Currently, the timer ID is being passed to the function
omap_dm_timer_init_one(). Instead of passing the ID separately, store it
in the omap_dm_timer structure, that is also passed, and access the ID
from this structure.

Signed-off-by: Jon Hunter <jon-hunter@ti.com>
11 years agoARM: OMAP3: Update clocksource timer selection
Jon Hunter [Mon, 28 Jan 2013 23:53:57 +0000 (17:53 -0600)]
ARM: OMAP3: Update clocksource timer selection

When booting with device-tree for OMAP3 and AM335x devices and a gptimer
is used as the clocksource (which is always the case for AM335x), a
gptimer located in a power domain that is not always-on is selected.
Ideally we should use a gptimer for clocksource that is located in a
power domain that is always on (such as the wake-up domain) so that time
can be maintained during a kernel suspend without keeping on additional
power domains unnecessarily.

In order to fix this so that we can select a gptimer located in a power
domain that is always-on, the following changes were made ...
1. Currently, only when selecting a gptimer to use for a clockevent
   timer, do we pass a timer property that can be used to select a
   specific gptimer. Change this so that we can pass a property when
   selecting a gptimer to use for a clocksource timer too.
2. Currently, when selecting either a gptimer to use for a clockevent
   timer or a clocksource timer and no timer property is passed, then
   the first available timer is selected regardless of the properties
   it has. Change this so that if no properties are passed, then a timer
   that does not have additional features (such as always-on, dsp-irq,
   pwm, and secure) is selected.

For OMAP3 and AM335x devices that use a gptimer for clocksource, change
the selection of the gptimer so that by default the gptimer located in
the always-on power domain is used for clocksource instead of
clockevents.

Please note that using a gptimer for both clocksource and clockevents
can have a system power impact during idle. The reason being is that
OMAP and AMxxx devices typically only have one gptimer in a power domain
that is always-on. Therefore when the kernel is idle both the clocksource
and clockevent timers will be active and this will keep additional power
domains on. During kernel suspend, only the clocksource timer is active
and therefore, it is better to use a gptimer in a power domain that is
always-on for clocksource.

Signed-off-by: Jon Hunter <jon-hunter@ti.com>
Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Acked-by: Igor Grinberg <grinberg@compulab.co.il>
11 years agoARM: OMAP2+: Simplify system timers definitions
Jon Hunter [Sat, 12 Jan 2013 02:23:09 +0000 (20:23 -0600)]
ARM: OMAP2+: Simplify system timers definitions

There is a lot of redundancy in the definitions for the various system
timers for OMAP2+ devices. For example, the omap3_am33xx_gptimer_timer_init()
function is the same as the omap3_gp_gptimer_timer_init() function and the
function omap4_sync32k_timer_init() can be re-used for OMAP5 devices.
Therefore, consolidate the definitions to simplify the code.

Signed-off-by: Jon Hunter <jon-hunter@ti.com>
Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Acked-by: Igor Grinberg <grinberg@compulab.co.il>
11 years agoARM: OMAP2+: Simplify system timer clock definitions
Jon Hunter [Sat, 12 Jan 2013 01:17:38 +0000 (19:17 -0600)]
ARM: OMAP2+: Simplify system timer clock definitions

In commit c59b537 (ARM: OMAP2+: Simplify dmtimer clock aliases), new
clock aliases for dmtimers were added to simplify the code. These clock
aliases can also be used when configuring the system timers and allow us
to remove the current definitions, simplifying the code.

Please note that for OMAP4/5 devices (unlike OMAP2/3 devices), there is
no clock alias for "timer_sys_ck" with NULL as the device name. Therefore
we still need to use the alias "sys_clkin_ck" for these devices.

Signed-off-by: Jon Hunter <jon-hunter@ti.com>
Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
11 years agoARM: OMAP2+: Remove hard-coded test on timer ID
Jon Hunter [Tue, 12 Mar 2013 22:17:57 +0000 (17:17 -0500)]
ARM: OMAP2+: Remove hard-coded test on timer ID

Currently, when configuring the clock-events and clock-source timers
for OMAP2+ devices, we check whether the timer ID is 12 before
attempting to set the parent clock for the timer.

This test was added for OMAP3 general purpose devices (no security
features enabled) that a 12th timer available but unlike the other
timers only has a single functional clock source. Calling
clk_set_parent() for this 12th timer would always return an error
because there is only one choice for a parent clock. Therefore,
this hard-coded timer ID test was added.

To avoid this timer ID test, simply check to see if the timer's current
parent clock is the desired parent clock and only call clk_set_parent()
if this is not the case.

Also if clk_get() fails, then use PTR_ERR() to return the error code.

Signed-off-by: Jon Hunter <jon-hunter@ti.com>
Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
11 years agoARM: OMAP2+: Display correct system timer name
Jon Hunter [Tue, 29 Jan 2013 19:55:25 +0000 (13:55 -0600)]
ARM: OMAP2+: Display correct system timer name

Currently on boot, when displaying the name of the gptimer used for
clockevents and clocksource timers, the timer ID is shown. However,
when booting with device-tree, the timer ID is not used to select a
gptimer but a timer property. Hence, it is possible that the timer
selected when booting with device-tree does not match the ID shown.
Therefore, instead display the HWMOD name of the gptimer and use
the HWMOD name as the name of clockevent and clocksource timer (if a
gptimer is used).

Signed-off-by: Jon Hunter <jon-hunter@ti.com>
Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
11 years agoMerge commit '6bb27d7349db51b50c40534710fe164ca0d58902' into omap-timer-for-v3.10
Jon Hunter [Mon, 1 Apr 2013 18:47:29 +0000 (13:47 -0500)]
Merge commit '6bb27d7349db51b50c40534710fe164ca0d58902' into omap-timer-for-v3.10

11 years agoMerge branch 'for_3.10/omap5_generic_updates' of git://git.kernel.org/pub/scm/linux...
Tony Lindgren [Mon, 1 Apr 2013 16:30:47 +0000 (09:30 -0700)]
Merge branch 'for_3.10/omap5_generic_updates' of git://git./linux/kernel/git/ssantosh/linux into omap-for-v3.10/fixes-non-critical

11 years agoMerge tag 'omap-devel-b-for-3.10' of git://git.kernel.org/pub/scm/linux/kernel/git...
Tony Lindgren [Mon, 1 Apr 2013 15:55:04 +0000 (08:55 -0700)]
Merge tag 'omap-devel-b-for-3.10' of git://git./linux/kernel/git/pjw/omap-pending into omap-for-v3.10/fixes-non-critical

Some miscellaneous OMAP hwmod, powerdomain, and clock fixes for 3.10.

Basic test logs are here:

http://www.pwsan.com/omap/testlogs/prcm_fixes_a_3.10/20130331205716/

11 years agoARM: OMAP2+: fix typo "CONFIG_BRIDGE_DVFS"
Paul Bolle [Mon, 25 Mar 2013 23:30:05 +0000 (00:30 +0100)]
ARM: OMAP2+: fix typo "CONFIG_BRIDGE_DVFS"

Commit 90173882ed15a8034d6d162da5f343a2c7d87587 ("omap: add dsp platform
device") used CONFIG_BRIDGE_DVFS were it obviously meant
CONFIG_TIDSPBRIDGE_DVFS. Fix that.

Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Signed-off-by: Tony Lindgren <tony@atomide.com>
11 years agoARM: OMAP1: remove "config MACH_OMAP_HTCWIZARD"
Paul Bolle [Thu, 21 Mar 2013 21:36:09 +0000 (22:36 +0100)]
ARM: OMAP1: remove "config MACH_OMAP_HTCWIZARD"

The Kconfig symbol MACH_OMAP_HTCWIZARD got added in v2.6.30. It has
never been used. Its entry can safely be removed.

Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Signed-off-by: Tony Lindgren <tony@atomide.com>
11 years agoARM: OMAP: dpll: enable bypass clock only when attempting dpll bypass
Rajendra Nayak [Mon, 1 Apr 2013 02:22:23 +0000 (20:22 -0600)]
ARM: OMAP: dpll: enable bypass clock only when attempting dpll bypass

omap3_noncore_dpll_set_rate() attempts an enable of bypass clk as well
as ref clk for every .set_rate attempt on a noncore DPLL, regardless of
whether the .set_rate results in the DPLL being locked or put in bypass.
Early at boot, while some of these DPLLs are programmed and locked
(using .set_rate for the DPLL), this causes an ordering issue.

For instance, on OMAP5, the USB DPLL derives its bypass clk from ABE DPLL.
If a .set_rate of USB DPLL which programmes the M,N and locks it is called
before the one for ABE, the enable of USB bypass clk (derived from ABE DPLL)
then attempts to lock the ABE DPLL and fails as the M,N values for ABE
are yet to be programmed.

To get rid of this ordering needs, enable bypass clk for a DPLL as part
of its .set_rate only when its being put in bypass, and only enable the
ref clk when its locked.

Reported-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Rajendra Nayak <rnayak@ti.com>
Signed-off-by: Paul Walmsley <paul@pwsan.com>
11 years agoARM: OMAP2+: powerdomain: avoid testing whether an unsigned char is less than 0
Paul Walmsley [Mon, 1 Apr 2013 02:22:22 +0000 (20:22 -0600)]
ARM: OMAP2+: powerdomain: avoid testing whether an unsigned char is less than 0

_pwrdm_save_clkdm_state_and_activate() tried to test one of its
unsigned arguments to determine whether it was less than zero.  Fix by
moving the error test to the caller.

Reported-by: Chen Gang <gang.chen@asianux.com>
Signed-off-by: Paul Walmsley <paul@pwsan.com>
11 years agoARM: OMAP2+: hwmod: Remove unused _HWMOD_WAKEUP_ENABLED flag
Rajendra Nayak [Mon, 1 Apr 2013 02:22:22 +0000 (20:22 -0600)]
ARM: OMAP2+: hwmod: Remove unused _HWMOD_WAKEUP_ENABLED flag

_HWMOD_WAKEUP_ENABLED is currently unused across the hwmod
framework. Just get rid of it, so we have one less flag to
worry about.

Tested-by: Vaibhav Bedia <vaibhav.bedia@ti.com>
Signed-off-by: Rajendra Nayak <rnayak@ti.com>
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Signed-off-by: Paul Walmsley <paul@pwsan.com>
11 years agoARM: OMAP2+: am335x: Change the wdt1 func clk src to per_32k clk
Vaibhav Hiremath [Mon, 1 Apr 2013 02:22:21 +0000 (20:22 -0600)]
ARM: OMAP2+: am335x: Change the wdt1 func clk src to per_32k clk

WDT1 module can take one of the below clocks as input functional
clock -
     - On-Chip 32K RC Osc [default/reset]
     - 32K from PRCM

The On-Chip 32K RC Osc clock is not an accurate clock-source as per
the design/spec, so as a result, for example, timer which supposed
to get expired @60Sec, but will expire somewhere ~@40Sec, which is
not expected by any use-case.

The solution here is to switch the input clock-source to PRCM
generated 32K clock-source during boot-time itself.

Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
Cc: Santosh Shilimkar <santosh.shilimkar@ti.com>
Cc: Benoit Cousson <benoit.cousson@linaro.org>
Cc: Paul Walmsley <paul@pwsan.com>
11 years agoARM: OMAP2+: AM33xx: hwmod: Add missing sysc definition to wdt1 entry
Vaibhav Hiremath [Mon, 1 Apr 2013 02:22:21 +0000 (20:22 -0600)]
ARM: OMAP2+: AM33xx: hwmod: Add missing sysc definition to wdt1 entry

This patch adds sysc definitions to the wdt1 hwmod entry, which in-turn
makes sure that sysc idle bit-fields are configured to valid state on
enable/disable callbacks.

With the recent submitted patch from Santosh Shilimkar,
"ARM: OMAP2+: hwmod: Don't call _init_mpu_rt_base if no sysc"
(commit: 4a98c2d89), it is required to add sysconf
information to each valid hwmod entry, else device will not be
come out from idle state properly and leads to below kernel
crash  -

[2.190237] Unhandled fault: external abort on non-linefetch (0x1028) at
0xf9e35034
[2.198325] Internal error: : 1028 [#1] SMP ARM
[2.203101] Modules linked in:
[2.206334] CPU: 0    Not tainted  (3.9.0-rc3-00059-gd114294#1)
[2.212679] PC is at omap_wdt_disable.clone.5+0xc/0x60
[2.218090] LR is at omap_wdt_probe+0x184/0x1fc

Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
Cc: Santosh Shilimkar <santosh.shilimkar@ti.com>
Cc: Benoit Cousson <benoit.cousson@linaro.org>
Cc: Paul Walmsley <paul@pwsan.com>
11 years agoLinux 3.9-rc5
Linus Torvalds [Sun, 31 Mar 2013 22:12:43 +0000 (15:12 -0700)]
Linux 3.9-rc5

11 years agoMerge branch 'fixes' of git://git.infradead.org/users/vkoul/slave-dma
Linus Torvalds [Sun, 31 Mar 2013 18:41:47 +0000 (11:41 -0700)]
Merge branch 'fixes' of git://git.infradead.org/users/vkoul/slave-dma

Pull slave-dmaengine fixes from Vinod Koul:
 "Two fixes for slave-dmaengine.

  The first one is for making slave_id value correct for dw_dmac and
  the other one fixes the endieness in DT parsing"

* 'fixes' of git://git.infradead.org/users/vkoul/slave-dma:
  dw_dmac: adjust slave_id accordingly to request line base
  dmaengine: dw_dma: fix endianess for DT xlate function

11 years agoMerge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab...
Linus Torvalds [Sun, 31 Mar 2013 18:40:33 +0000 (11:40 -0700)]
Merge branch 'v4l_for_linus' of git://git./linux/kernel/git/mchehab/linux-media

Pull media fixes from Mauro Carvalho Chehab:
 "For a some fixes for Kernel 3.9:
   - subsystem build fix when VIDEO_DEV=y, VIDEO_V4L2=m and I2C=m
   - compilation fix for arm multiarch preventing IR_RX51 to be selected
   - regression fix at bttv crop logic
   - s5p-mfc/m5mols/exynos: a few fixes for cameras on exynos hardware"

* 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media:
  [media] [REGRESSION] bt8xx: Fix too large height in cropcap
  [media] fix compilation with both V4L2 and I2C as 'm'
  [media] m5mols: Fix bug in stream on handler
  [media] s5p-fimc: Do not attempt to disable not enabled media pipeline
  [media] s5p-mfc: Fix encoder control 15 issue
  [media] s5p-mfc: Fix frame skip bug
  [media] s5p-fimc: send valid m2m ctx to fimc_m2m_job_finish
  [media] exynos-gsc: send valid m2m ctx to gsc_m2m_job_finish
  [media] fimc-lite: Fix the variable type to avoid possible crash
  [media] fimc-lite: Initialize 'step' field in fimc_lite_ctrl structure
  [media] ir: IR_RX51 only works on OMAP2

11 years agoMerge tag 'for-linus-20130331' of git://git.kernel.dk/linux-block
Linus Torvalds [Sun, 31 Mar 2013 18:38:59 +0000 (11:38 -0700)]
Merge tag 'for-linus-20130331' of git://git.kernel.dk/linux-block

Pull block fixes from Jens Axboe:
 "Alright, this time from 10K up in the air.

  Collection of fixes that have been queued up since the merge window
  opened, hence postponed until later in the cycle.  The pull request
  contains:

   - A bunch of fixes for the xen blk front/back driver.

   - A round of fixes for the new IBM RamSan driver, fixing various
     nasty issues.

   - Fixes for multiple drives from Wei Yongjun, bad handling of return
     values and wrong pointer math.

   - A fix for loop properly killing partitions when being detached."

* tag 'for-linus-20130331' of git://git.kernel.dk/linux-block: (25 commits)
  mg_disk: fix error return code in mg_probe()
  rsxx: remove unused variable
  rsxx: enable error return of rsxx_eeh_save_issued_dmas()
  block: removes dynamic allocation on stack
  Block: blk-flush: Fixed indent code style
  cciss: fix invalid use of sizeof in cciss_find_cfgtables()
  loop: cleanup partitions when detaching loop device
  loop: fix error return code in loop_add()
  mtip32xx: fix error return code in mtip_pci_probe()
  xen-blkfront: remove frame list from blk_shadow
  xen-blkfront: pre-allocate pages for requests
  xen-blkback: don't store dev_bus_addr
  xen-blkfront: switch from llist to list
  xen-blkback: fix foreach_grant_safe to handle empty lists
  xen-blkfront: replace kmalloc and then memcpy with kmemdup
  xen-blkback: fix dispatch_rw_block_io() error path
  rsxx: fix missing unlock on error return in rsxx_eeh_remap_dmas()
  Adding in EEH support to the IBM FlashSystem 70/80 device driver
  block: IBM RamSan 70/80 error message bug fix.
  block: IBM RamSan 70/80 branding changes.
  ...

11 years agoRevert "lockdep: check that no locks held at freeze time"
Paul Walmsley [Sun, 31 Mar 2013 00:04:40 +0000 (00:04 +0000)]
Revert "lockdep: check that no locks held at freeze time"

This reverts commit 6aa9707099c4b25700940eb3d016f16c4434360d.

Commit 6aa9707099c4 ("lockdep: check that no locks held at freeze time")
causes problems with NFS root filesystems.  The failures were noticed on
OMAP2 and 3 boards during kernel init:

  [ BUG: swapper/0/1 still has locks held! ]
  3.9.0-rc3-00344-ga937536 #1 Not tainted
  -------------------------------------
  1 lock held by swapper/0/1:
   #0:  (&type->s_umount_key#13/1){+.+.+.}, at: [<c011e84c>] sget+0x248/0x574

  stack backtrace:
    rpc_wait_bit_killable
    __wait_on_bit
    out_of_line_wait_on_bit
    __rpc_execute
    rpc_run_task
    rpc_call_sync
    nfs_proc_get_root
    nfs_get_root
    nfs_fs_mount_common
    nfs_try_mount
    nfs_fs_mount
    mount_fs
    vfs_kern_mount
    do_mount
    sys_mount
    do_mount_root
    mount_root
    prepare_namespace
    kernel_init_freeable
    kernel_init

Although the rootfs mounts, the system is unstable.  Here's a transcript
from a PM test:

  http://www.pwsan.com/omap/testlogs/test_v3.9-rc3/20130317194234/pm/37xxevm/37xxevm_log.txt

Here's what the test log should look like:

  http://www.pwsan.com/omap/testlogs/test_v3.8/20130218214403/pm/37xxevm/37xxevm_log.txt

Mailing list discussion is here:

  http://lkml.org/lkml/2013/3/4/221

Deal with this for v3.9 by reverting the problem commit, until folks can
figure out the right long-term course of action.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Mandeep Singh Baines <msb@chromium.org>
Cc: Jeff Layton <jlayton@redhat.com>
Cc: Shawn Guo <shawn.guo@linaro.org>
Cc: <maciej.rutecki@gmail.com>
Cc: Fengguang Wu <fengguang.wu@intel.com>
Cc: Trond Myklebust <Trond.Myklebust@netapp.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Ben Chan <benchan@chromium.org>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Tejun Heo <tj@kernel.org>
Cc: Rafael J. Wysocki <rjw@sisk.pl>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
11 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending
Linus Torvalds [Sat, 30 Mar 2013 20:13:05 +0000 (13:13 -0700)]
Merge git://git./linux/kernel/git/nab/target-pending

Pull SCSI target fixes from Nicholas Bellinger:
 "This includes the bug-fix for a >= v3.8-rc1 regression specific to
  iscsi-target persistent reservation conflict handling (CC'ed to
  stable), and a tcm_vhost patch to drop VIRTIO_RING_F_EVENT_IDX usage
  so that in-flight qemu vhost-scsi-pci device code can detect the
  proper vhost feature bits.

  Also, there are two more tcm_vhost patches still being discussed by
  MST and Asias for v3.9 that will be required for the in-flight qemu
  vhost-scsi-pci device patch to function properly, and that should
  (hopefully) be the last target fixes for this round."

* git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending:
  target: Fix RESERVATION_CONFLICT status regression for iscsi-target special case
  tcm_vhost: Avoid VIRTIO_RING_F_EVENT_IDX feature bit

11 years agodw_dmac: adjust slave_id accordingly to request line base
Andy Shevchenko [Wed, 20 Feb 2013 11:52:17 +0000 (13:52 +0200)]
dw_dmac: adjust slave_id accordingly to request line base

On some hardware configurations we have got the request line with the offset.
The patch introduces convert_slave_id() helper for that cases. The request line
base is came from the driver data provided by the platform_device_id table.

Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Viresh Kumar <viresh.kumar@linaro.org>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
11 years agodmaengine: dw_dma: fix endianess for DT xlate function
Arnd Bergmann [Sun, 3 Mar 2013 20:51:28 +0000 (20:51 +0000)]
dmaengine: dw_dma: fix endianess for DT xlate function

As reported by Wu Fengguang's build robot tracking sparse warnings, the
dma_spec arguments in the dw_dma_xlate are already byte swapped on
little-endian platforms and must not get swapped again. This code is
currently not used anywhere, but will be used in Linux 3.10 when the
ARM SPEAr platform starts using the generic DMA DT binding.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
11 years agoPNP: List Rafael Wysocki as a maintainer
Rafael J. Wysocki [Fri, 29 Mar 2013 21:59:53 +0000 (22:59 +0100)]
PNP: List Rafael Wysocki as a maintainer

The Adam Belay's e-mail address in MAINTAINERS under PNP SUPPORT
is not valid any more and I started to maintain that code in the
meantime as a matter of fact, so list myself as a maintainer of it
along with Bjorn and remove the Adam's entry from it.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
11 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph...
Linus Torvalds [Fri, 29 Mar 2013 18:47:43 +0000 (11:47 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/sage/ceph-client

Pull ceph fix from Sage Weil:
 "This fixes a regression introduced during the last merge window when
  mapping non-existent images."

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client:
  rbd: don't zero-fill non-image object requests

11 years agorbd: don't zero-fill non-image object requests
Alex Elder [Wed, 27 Mar 2013 14:16:30 +0000 (09:16 -0500)]
rbd: don't zero-fill non-image object requests

A result of ENOENT from a read request for an object that's part of
an rbd image indicates that there is a hole in that portion of the
image.  Similarly, a short read for such an object indicates that
the remainder of the read should be interpreted a full read with
zeros filling out the end of the request.

This behavior is not correct for objects that are not backing rbd
image data.  Currently rbd_img_obj_request_callback() assumes it
should be done for all objects.

Change rbd_img_obj_request_callback() so it only does this zeroing
for image objects.  Encapsulate that special handling in its own
function.  Add an assertion that the image object request is a bio
request, since we assume that (and we currently don't support any
other types).

This resolves a problem identified here:
    http://tracker.ceph.com/issues/4559

The regression was introduced by bf0d5f503dc11d6314c0503591d258d60ee9c944.

Reported-by: Dan van der Ster <dan@vanderster.com>
Signed-off-by: Alex Elder <elder@inktank.com>
Reviewed-off-by: Sage Weil <sage@inktank.com>
11 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux...
Linus Torvalds [Fri, 29 Mar 2013 18:13:25 +0000 (11:13 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/mason/linux-btrfs

Pull btrfs fixes from Chris Mason:
 "We've had a busy two weeks of bug fixing.  The biggest patches in here
  are some long standing early-enospc problems (Josef) and a very old
  race where compression and mmap combine forces to lose writes (me).
  I'm fairly sure the mmap bug goes all the way back to the introduction
  of the compression code, which is proof that fsx doesn't trigger every
  possible mmap corner after all.

  I'm sure you'll notice one of these is from this morning, it's a small
  and isolated use-after-free fix in our scrub error reporting.  I
  double checked it here."

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs:
  Btrfs: don't drop path when printing out tree errors in scrub
  Btrfs: fix wrong return value of btrfs_lookup_csum()
  Btrfs: fix wrong reservation of csums
  Btrfs: fix double free in the btrfs_qgroup_account_ref()
  Btrfs: limit the global reserve to 512mb
  Btrfs: hold the ordered operations mutex when waiting on ordered extents
  Btrfs: fix space accounting for unlink and rename
  Btrfs: fix space leak when we fail to reserve metadata space
  Btrfs: fix EIO from btrfs send in is_extent_unchanged for punched holes
  Btrfs: fix race between mmap writes and compression
  Btrfs: fix memory leak in btrfs_create_tree()
  Btrfs: fix locking on ROOT_REPLACE operations in tree mod log
  Btrfs: fix missing qgroup reservation before fallocating
  Btrfs: handle a bogus chunk tree nicely
  Btrfs: update to use fs_state bit