pandora-kernel.git
13 years agoinput: misc: introduce retu-pwrbutton
Aaro Koskinen [Mon, 24 Sep 2012 02:39:02 +0000 (19:39 -0700)]
input: misc: introduce retu-pwrbutton

Add Retu power button driver.

Cc: linux-input@vger.kernel.org
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
13 years agowatchdog: introduce retu_wdt driver
Aaro Koskinen [Mon, 24 Sep 2012 02:39:02 +0000 (19:39 -0700)]
watchdog: introduce retu_wdt driver

Introduce Retu watchdog driver.

Cc: linux-watchdog@vger.kernel.org
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
13 years agomfd: introduce retu-mfd driver
Aaro Koskinen [Mon, 24 Sep 2012 02:39:02 +0000 (19:39 -0700)]
mfd: introduce retu-mfd driver

Retu is a multi-function device found on Nokia Internet Tablets
implementing at least watchdog, RTC, headset detection and power button
functionality.

This patch implements minimum functionality providing register access,
IRQ handling and power off functions.

Cc: sameo@linux.intel.com
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
13 years agoi2c: introduce i2c-cbus driver
Aaro Koskinen [Mon, 24 Sep 2012 02:39:01 +0000 (19:39 -0700)]
i2c: introduce i2c-cbus driver

Add i2c driver to enable access to devices behind CBUS on Nokia Internet
Tablets.

The patch also adds CBUS I2C configuration for N8x0 which is one of the
users of this driver.

Cc: linux-i2c@vger.kernel.org
Acked-by: Felipe Balbi <balbi@ti.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
13 years agoMerge branch 'devel-dt-arch-timer' into tmp-merge
Tony Lindgren [Mon, 24 Sep 2012 02:38:26 +0000 (19:38 -0700)]
Merge branch 'devel-dt-arch-timer' into tmp-merge

13 years agoMerge branch 'devel-late' into tmp-merge
Tony Lindgren [Mon, 24 Sep 2012 02:38:15 +0000 (19:38 -0700)]
Merge branch 'devel-late' into tmp-merge

Conflicts:
arch/arm/mach-omap2/devices.c
drivers/spi/spi-omap2-mcspi.c

13 years agoMerge tag 'omap-devel-b-c-2-for-3.7' of git://git.kernel.org/pub/scm/linux/kernel... omap-devel-late-for-v3.7
Tony Lindgren [Mon, 24 Sep 2012 02:31:35 +0000 (19:31 -0700)]
Merge tag 'omap-devel-b-c-2-for-3.7' of git://git./linux/kernel/git/pjw/omap-pending into devel-late

OMAP patches intended for the 3.7 merge window:

- Runtime PM conversions for the GPMC and RNG IP blocks
- Preparation patches for the OMAP common clock framework conversion
- clkdev alias additions required by other drivers
- Performance Monitoring Unit (PMU) support for OMAP2, 3, and non-4430 OMAP4
- OMAP hwmod code and data improvements
- Preparation patches for the IOMMU runtime PM conversion
- Preparation patches for OMAP4 full-chip retention support

Based on a merge of v3.6-rc6, the omap-cleanup-b-for-3.7 tag
(7852ec0536ca39cefffc6301dc77f8ae55592926),the cleanup-fixes-for-v3.7
tag (de6ca33a96a6bf61fcb91d3d399703e19ead9d1e), and the
omap-devel-am33xx-for-v3.7 tag
(11964f53eb4d9ce59a058be9999d9cfcb1ced878), due to dependencies.

These patches have been tested for meaningful warnings from
checkpatch, sparse, smatch, and cppcheck.  Basic build, boot[1], and
PM test logs are available here:

    http://www.pwsan.com/omap/testlogs/hwmod_prcm_clock_a_3.7/20120923173830/

...

1. Note that the N800 boot fails due to a known issue present in the
   base commit:

    http://www.spinics.net/lists/arm-kernel/msg196034.html

13 years agoARM: OMAP4460/4470: PMU: Enable PMU for OMAP4460/70
Jon Hunter [Sun, 23 Sep 2012 23:28:30 +0000 (17:28 -0600)]
ARM: OMAP4460/4470: PMU: Enable PMU for OMAP4460/70

OMAP4460 and OMAP4470 devices have dedicated PMU interrupts and so add these
interrupts to the MPU HWMOD so we can use these for PMU events on these
devices. The PMU interrupts need to be the first interrupts in the array of
interrupts as the ARM PMU driver assumes this.

By using these dedicated interrupts we only need to enable the MPU and DEBUG
sub-systems for PMU to work. This is different to OMAP4430 that did not have
dedicated interrupts and required other power domains in addition to the DEBUG
sub-system to be enabled so we could route the PMU events to the CTI interrupts.
Hence, OMAP4460 and OMAP4470 devices can use the same list of HWMODs to create
the PMU device that is using by OMAP3.

Cc: Ming Lei <ming.lei@canonical.com>
Cc: Will Deacon <will.deacon@arm.com>
Cc: Benoit Cousson <b-cousson@ti.com>
Cc: Paul Walmsley <paul@pwsan.com>
Cc: Kevin Hilman <khilman@ti.com>
Signed-off-by: Jon Hunter <jon-hunter@ti.com>
[paul@pwsan.com: updated to apply]
Signed-off-by: Paul Walmsley <paul@pwsan.com>
13 years agoARM: OMAP2+: PMU: Add runtime PM support
Jon Hunter [Sun, 23 Sep 2012 23:28:30 +0000 (17:28 -0600)]
ARM: OMAP2+: PMU: Add runtime PM support

The original implementation of this patch was done by Ming Lei for PMU on OMAP4
[1]. Since then the PM runtime calls have been moved into the ARM PMU code and
this greatly simplifies the changes.

The another differnce since the original version, is that it is no longer
necessary to call pm_runtime_get/put during the PMU initialisation was we are no
longer accessing the hardware at this stage.

By adding runtime PM support, we can ensure that the appropriate power and clock
domains are kept on while PMU is being used.

[1] http://lists.infradead.org/pipermail/linux-arm-kernel/2011-November/074153.html

Cc: Ming Lei <ming.lei@canonical.com>
Cc: Will Deacon <will.deacon@arm.com>
Cc: Benoit Cousson <b-cousson@ti.com>
Cc: Paul Walmsley <paul@pwsan.com>
Cc: Kevin Hilman <khilman@ti.com>
Signed-off-by: Jon Hunter <jon-hunter@ti.com>
Signed-off-by: Paul Walmsley <paul@pwsan.com>
13 years agoARM: OMAP4430: PMU: prepare to create PMU device via HWMOD
Ming Lei [Sun, 23 Sep 2012 23:28:29 +0000 (17:28 -0600)]
ARM: OMAP4430: PMU: prepare to create PMU device via HWMOD

For OMAP4430 PMU events are routed to the CPU via the cross trigger interface
(CTI) because there are no dedicated interrupts. In order to route the PMU
events via the CTI IRQs, the following modules must be enabled:

        l3_instr, l3_main_3, debugss

Therefore, build the arm-pmu device via these three HWMODs.

However, the CTI support for this platform still needs some work.  Until
that's finished, temporarily disable the PMU on OMAP4430.

Cc: Ming Lei <ming.lei@canonical.com>
Cc: Will Deacon <will.deacon@arm.com>
Cc: Benoit Cousson <b-cousson@ti.com>
Cc: Paul Walmsley <paul@pwsan.com>
Cc: Kevin Hilman <khilman@ti.com>
Signed-off-by: Ming Lei <ming.lei@canonical.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Jon Hunter <jon-hunter@ti.com>
[paul@pwsan.com: temporarily disabled OMAP4430 PMU support until a
 better CTI interface can be implemented; added patch description note]
Signed-off-by: Paul Walmsley <paul@pwsan.com>
13 years agoARM: OMAP2+: PMU: Convert OMAP2/3 devices to use HWMOD
Jon Hunter [Sun, 23 Sep 2012 23:28:29 +0000 (17:28 -0600)]
ARM: OMAP2+: PMU: Convert OMAP2/3 devices to use HWMOD

Convert OMAP2/3 devices to use HWMOD for creating a PMU device. To support PMU
on OMAP2 devices we only need to use MPU sub-system and so we can simply use
the MPU HWMOD to create the PMU device. To support PMU on OMAP3 devices, we need
to use the MPU and DEBUG sub-systems and so use these HWMODs to create the PMU
device for OMAP3.

The MPU HWMOD for OMAP2/3 devices is currently missing the PMU interrupt and so
add the PMU interrupt to the MPU HWMOD for these devices.

This change also moves the PMU code out of the mach-omap2/devices.c files into
its own pmu.c file as suggested by Kevin Hilman to de-clutter devices.c.

Cc: Ming Lei <ming.lei@canonical.com>
Cc: Will Deacon <will.deacon@arm.com>
Cc: Benoit Cousson <b-cousson@ti.com>
Cc: Paul Walmsley <paul@pwsan.com>
Cc: Kevin Hilman <khilman@ti.com>
Signed-off-by: Jon Hunter <jon-hunter@ti.com>
[paul@pwsan.com: fixed checkpatch messages; updated to apply; dropped old-style
 initial filename line in header comments]
Signed-off-by: Paul Walmsley <paul@pwsan.com>
13 years agoARM: OMAP3: hwmod data: Add debugss HWMOD data
Jon Hunter [Sun, 23 Sep 2012 23:28:28 +0000 (17:28 -0600)]
ARM: OMAP3: hwmod data: Add debugss HWMOD data

To enable PMU with runtime PM support on OMAP3 devices we need to be able to
dynamically enable and disable the debug sub-system at runtime. By adding HWMOD
data for the debug sub-system for OMAP3, we can build the PMU device using the
debug sub-system HWMOD and control this power domain using runtime PM.

Reviewed-by: Benoit Cousson <b-cousson@ti.com>
Signed-off-by: Jon Hunter <jon-hunter@ti.com>
[paul@pwsan.com: updated to apply; added L4-EMU address space]
Signed-off-by: Paul Walmsley <paul@pwsan.com>
13 years agoARM: OMAP2+: clockdomain/hwmod: add workaround for EMU clockdomain idle problems
Paul Walmsley [Sun, 23 Sep 2012 23:28:28 +0000 (17:28 -0600)]
ARM: OMAP2+: clockdomain/hwmod: add workaround for EMU clockdomain idle problems

The idle status of the IP blocks and clocks inside the EMU clockdomain
isn't taken into account by the PRCM hardware when deciding whether
the clockdomain is idle.  Add a workaround flag in the clockdomain
code, CLKDM_MISSING_IDLE_REPORTING, to deal with this problem, and add
the code necessary to support it.

If CLKDM_MISSING_IDLE_REPORTING is set on a clockdomain, the
clockdomain will be forced active whenever an IP block inside that
clockdomain is in use, even if the clockdomain supports
hardware-supervised idle.  When the kernel indicates that the last
active IP block inside the clockdomain is no longer used, the
clockdomain will be forced idle, or, if that mode is not supported in
the hardware, it will be placed into hardware-supervised idle.

This patch is an equal collaboration with Jon Hunter
<jon-hunter@ti.com>.  Ming Lei <ming.lei@canonical.com>, Will Deacon
<will.deacon@arm.com>, Madhav Vij <mvij@ti.com>, Kevin Hilman
<khilman@ti.com>, Benoît Cousson <b-cousson@ti.com>, and Santosh
Shilimkar <santosh.shilimkar@ti.com> all made essential contributions
to the understanding of EMU clockdomain power management on OMAP.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Jon Hunter <jon-hunter@ti.com>
Cc: Ming Lei <ming.lei@canonical.com>
Cc: Will Deacon <will.deacon@arm.com>
Cc: Madhav Vij <mvij@ti.com>
Cc: Kevin Hilman <khilman@ti.com>
Cc: Benoît Cousson <b-cousson@ti.com>
Cc: Santosh Shilimkar <santosh.shilimkar@ti.com>
Tested-by: Jon Hunter <jon-hunter@ti.com>
13 years agoARM: OMAP: Add a timer attribute for timers that can interrupt the DSP
Jon Hunter [Sun, 23 Sep 2012 23:28:27 +0000 (17:28 -0600)]
ARM: OMAP: Add a timer attribute for timers that can interrupt the DSP

Some instances of the DMTIMER peripheral on OMAP devices have the ability
to interrupt the on-chip DSP in addition to the ARM CPU. Add a DMTIMER
attribute to indicate which timers can interrupt the DSP. By using the
omap_dm_timer_request_by_cap() API, driver will now be able to allocate
a DMTIMER that can interrupt the DSP based upon this attribute and not require
the driver to know which instance has this capability.

DMTIMERs that have the ability to interrupt the DSP on OMAP devices are as
follows ...

- OMAP1 (OMAP5912/16xx/17xx) devices - All 8 DMTIMERs
- OMAP2/3/4 devices - DMTIMERs 5-8

Please note that for OMAP3+, timer8 has the ability to interrupt the DSP and
generate a PWM output.

Signed-off-by: Jon Hunter <jon-hunter@ti.com>
Signed-off-by: Paul Walmsley <paul@pwsan.com>
13 years agohwrng: OMAP: remove SoC restrictions from driver registration
Paul Walmsley [Sun, 23 Sep 2012 23:28:27 +0000 (17:28 -0600)]
hwrng: OMAP: remove SoC restrictions from driver registration

Remove the SoC restriction code from the OMAP RNG driver.  The
integration code in arch/arm/*omap* should handle this.  The device
shouldn't be created if it doesn't exist on the currently-booted SoC.

This allows us to remove some OMAP-specific cpu_is_omap*() calls from
the driver.  Also, if other OMAP chips have RNGs that can be used
by Linux, there will be no need to modify the driver.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Matt Mackall <mpm@selenic.com>
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Acked-by: Herbert Xu <herbert@gondor.apana.org.au>
13 years agoARM: OMAP: split OMAP1, OMAP2+ RNG device registration
Paul Walmsley [Sun, 23 Sep 2012 23:28:27 +0000 (17:28 -0600)]
ARM: OMAP: split OMAP1, OMAP2+ RNG device registration

Move the OMAP1-specific RNG device creation off to mach-omap1/devices.c,
and create a omap_device-backed registration function for OMAP2+ devices
in mach-omap2/devices.c.

As a nice side-benefit, we can also get rid of
arch/arm/plat-omap/devices.c, thanks to some recent changes from Tony.

One change from the previous behavior is that the RNG devices are now
registered unconditionally.  This should allow the RNG drivers to be
loaded as modules, even if the original kernel was not built that way.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
13 years agohwrng: OMAP: convert to use runtime PM
Paul Walmsley [Sun, 23 Sep 2012 23:28:26 +0000 (17:28 -0600)]
hwrng: OMAP: convert to use runtime PM

Convert the OMAP onboard hardware RNG driver to use runtime PM.

This allows us to remove some OMAP-specific cpu_is_omap*() calls from
the RNG driver.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Matt Mackall <mpm@selenic.com>
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Acked-by: Herbert Xu <herbert@gondor.apana.org.au>
13 years agohwrng: OMAP: store per-device data in per-device variables, not file statics
Paul Walmsley [Sun, 23 Sep 2012 23:28:26 +0000 (17:28 -0600)]
hwrng: OMAP: store per-device data in per-device variables, not file statics

Encapsulate all of the RNG per-device state into a single per-device
structure record, as opposed to a set of per-driver file variables.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Matt Mackall <mpm@selenic.com>
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Acked-by: Herbert Xu <herbert@gondor.apana.org.au>
13 years agoARM: OMAP2xxx: hwmod/CM: add RNG integration data
Paul Walmsley [Sun, 23 Sep 2012 23:28:25 +0000 (17:28 -0600)]
ARM: OMAP2xxx: hwmod/CM: add RNG integration data

Add integration data for the hardware random number generator IP block
on some OMAP SoCs.  This appears to be present on at least OMAP2xxx
and OMAP3xxx SoCs, although it is not so easy to tell.  It may also be
present on other OMAP2+ SoCs.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
13 years agoARM: OMAP2+: gpmc: minimal driver support
Afzal Mohammed [Sun, 23 Sep 2012 23:28:25 +0000 (17:28 -0600)]
ARM: OMAP2+: gpmc: minimal driver support

Create a minimal driver out of gpmc code.  Responsibilities handled by
earlier gpmc initialization is now achieved in probe.

Signed-off-by: Afzal Mohammed <afzal@ti.com>
Reviewed-by: Jon Hunter <jon-hunter@ti.com>
[paul@pwsan.com: fixed some checkpatch messages]
Signed-off-by: Paul Walmsley <paul@pwsan.com>
13 years agoARM: OMAP2+: gpmc: Adapt to HWMOD
Afzal Mohammed [Sun, 23 Sep 2012 23:28:24 +0000 (17:28 -0600)]
ARM: OMAP2+: gpmc: Adapt to HWMOD

Create API for platforms to adapt GPMC to HWMOD

Signed-off-by: Afzal Mohammed <afzal@ti.com>
Reviewed-by: Jon Hunter <jon-hunter@ti.com>
Signed-off-by: Paul Walmsley <paul@pwsan.com>
13 years agoARM: OMAP2/3: hwmod data: add gpmc
Afzal Mohammed [Sun, 23 Sep 2012 23:28:24 +0000 (17:28 -0600)]
ARM: OMAP2/3: hwmod data: add gpmc

Add gpmc hwmod and associated interconnect data

Signed-off-by: Afzal Mohammed <afzal@ti.com>
[paul@pwsan.com: added comments to the use of HWMOD_INIT_NO_RESET]
Signed-off-by: Paul Walmsley <paul@pwsan.com>
13 years agoARM: OMAP4: hwmod data: add mmu hwmod for ipu and dsp
Omar Ramirez Luna [Sun, 23 Sep 2012 23:28:24 +0000 (17:28 -0600)]
ARM: OMAP4: hwmod data: add mmu hwmod for ipu and dsp

Add mmu hwmod data for ipu and dsp.

Cc: Benoit Cousson <b-cousson@ti.com>
Signed-off-by: Omar Ramirez Luna <omar.luna@linaro.org>
Acked-by: Benoit Cousson <b-cousson@ti.com>
[paul@pwsan.com: cleaned up whitespace]
Signed-off-by: Paul Walmsley <paul@pwsan.com>
13 years agoARM: OMAP3: hwmod data: add mmu data for iva and isp
Paul Walmsley [Sun, 23 Sep 2012 23:28:23 +0000 (17:28 -0600)]
ARM: OMAP3: hwmod data: add mmu data for iva and isp

Add mmu hwmod data for iva and isp.

Due to compatibility an ifdef CONFIG_OMAP_IOMMU_IVA2 needs to be
propagated (previously on iommu resource info) to hwmod data in OMAP3,
so users of iommu and tidspbridge can avoid issues of two modules
managing mmu data/irqs/resets; this until tidspbridge can be migrated
to iommu framework.

Cc: Benoit Cousson <b-cousson@ti.com>
Signed-off-by: Omar Ramirez Luna <omar.luna@linaro.org>
[paul@pwsan.com: fixed some kerneldoc and whitespace; ISP MMUs not present
 on AM35xx so restricted these hwmods to 34xx/36xx]
Signed-off-by: Paul Walmsley <paul@pwsan.com>
13 years agoARM: OMAP: iommu: fix including iommu.h without IOMMU_API selected
Omar Ramirez Luna [Sun, 23 Sep 2012 23:28:23 +0000 (17:28 -0600)]
ARM: OMAP: iommu: fix including iommu.h without IOMMU_API selected

If included without IOMMU_API being selected it will break
compilation:

arch/arm/plat-omap/include/plat/iommu.h:
In function 'dev_to_omap_iommu':
arch/arm/plat-omap/include/plat/iommu.h:148:
error: 'struct dev_archdata' has no member named 'iommu'

This will be seen when hwmod includes iommu.h to get the
structure for attributes. Also needed for tidspbridge
incremental migration to use iommu code.

Cc: Tony Lindgren <tony@atomide.com>
Signed-off-by: Omar Ramirez Luna <omar.luna@linaro.org>
Signed-off-by: Paul Walmsley <paul@pwsan.com>
13 years agoARM: OMAP4: hwmod data: add missing HWMOD_NO_IDLEST flags to some PRCM IP blocks
Paul Walmsley [Sun, 23 Sep 2012 23:28:22 +0000 (17:28 -0600)]
ARM: OMAP4: hwmod data: add missing HWMOD_NO_IDLEST flags to some PRCM IP blocks

Some struct omap_hwmod records belonging to PRCM IP blocks are missing
HWMOD_NO_IDLEST flags; add them.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Benoît Cousson <b-cousson@ti.com>
13 years agoARM: OMAP4: hwmod data: make *phy_48m* as the main_clk of ocp2scp
Kishon Vijay Abraham I [Sun, 23 Sep 2012 23:28:22 +0000 (17:28 -0600)]
ARM: OMAP4: hwmod data: make *phy_48m* as the main_clk of ocp2scp

Made *ocp2scp_usb_phy_phy_48m* as the main_clk for ocp2scp.
Since this ocp2scp module does not have any fck but does have a
single opt_clock, it is added as the main_clk for ocp2scp. Also
removed phy_48m as the optional clock since it is now made as the
main clock. By this the driver need not enable/disable phy_48m clk
separately and runtime_get/runtime_put will take care of that.

Cc: Benoît Cousson <b-cousson@ti.com>
Reviewed-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Acked-by: Benoît Cousson <b-cousson@ti.com>
Signed-off-by: Paul Walmsley <paul@pwsan.com>
13 years agoARM: OMAP4: hwmod data: Fix ocp2scp_usb_phy and usb_host_hs entries
Benoit Cousson [Sun, 23 Sep 2012 23:28:21 +0000 (17:28 -0600)]
ARM: OMAP4: hwmod data: Fix ocp2scp_usb_phy and usb_host_hs entries

ocp2scp_usb_phy was missing the address space data and thus
the sysconfig was not populated either.
The usb_host_hs address space was wrong.

Fix both of them and add the missing sysconfig entry.

Reported-by: Kishon Vijay Abraham <kishon@ti.com>
Signed-off-by: Benoit Cousson <b-cousson@ti.com>
Signed-off-by: Paul Walmsley <paul@pwsan.com>
13 years agoARM: OMAP3: hwmod data: add sad2d hwmod
Tero Kristo [Sun, 23 Sep 2012 23:28:21 +0000 (17:28 -0600)]
ARM: OMAP3: hwmod data: add sad2d hwmod

SAD2D stands for the die to die interface, and is used for communicating
with the optional stacked modem. This hwmod is added in preparation for
the d2d_idle move from pm34xx.c to hwmod data.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
[paul@pwsan.com: SAD2D presumably doesn't exist on non-OMAP34xx/OMAP36xx,
 so only add it to the OMAP34xx/OMAP36xx lists]
Signed-off-by: Paul Walmsley <paul@pwsan.com>
13 years agoARM: OMAP: hwmod: revise deassert sequence
Omar Ramirez Luna [Sun, 23 Sep 2012 23:28:21 +0000 (17:28 -0600)]
ARM: OMAP: hwmod: revise deassert sequence

For a reset sequence to complete cleanly, a module needs its
associated clocks to be enabled, otherwise the timeout check
in prcm code can print a false failure (failed to hardreset)
that occurs because the clocks aren't powered ON and the status
bit checked can't transition without them.

Signed-off-by: Omar Ramirez Luna <omar.luna@linaro.org>
Signed-off-by: Paul Walmsley <paul@pwsan.com>
13 years agoARM: OMAP: hwmod: partially un-reset hwmods might not be properly enabled
Omar Ramirez Luna [Sun, 23 Sep 2012 23:28:20 +0000 (17:28 -0600)]
ARM: OMAP: hwmod: partially un-reset hwmods might not be properly enabled

Some IP blocks might not be using/controlling more than one
reset line, this check loosens the restriction to fully use
hwmod framework for those drivers.

E.g.: ipu has reset lines: mmu_cache, cpu0 and cpu1.
- As of now cpu1 is not used and hence (with previous check) the
  IP block isn't fully enabled by hwmod code.
- Usually ipu and dsp processors configure their mmu module first
  and then enable the processors, this involves:
    * Deasserting mmu reset line, and enabling the module.
    * Deasserting cpu0 reset line, and enabling the processor.
  The ones portrayed in this example are controlled through
  rproc_fw_boot in drivers/remoteproc/remoteproc_core.c

While at it, prevent _omap4_module_disable if all the hardreset
lines on an IP block are not under reset.

This will allow the driver to:
  a. Deassert the reset line.
  b. Enable the hwmod through runtime PM default callbacks.
  c. Do its usecase.
  d. Disable hwmod through runtime PM.
  e. Assert the reset line.

Signed-off-by: Omar Ramirez Luna <omar.luna@linaro.org>
[paul@pwsan.com: updated to apply]
Signed-off-by: Paul Walmsley <paul@pwsan.com>
13 years agoARM: OMAP4: hwmod: flag hwmods/modules not supporting module level context status
Tero Kristo [Sun, 23 Sep 2012 23:28:20 +0000 (17:28 -0600)]
ARM: OMAP4: hwmod: flag hwmods/modules not supporting module level context status

On OMAP4 most modules/hwmods support module level context status. On
OMAP3 and earlier, we relied on the power domain level context status.
Identify all modules that don't support 'context_offs' by adding a
flag bit, HWMOD_OMAP4_NO_CONTEXT_LOSS_BIT.  Rest have a valid
'context_offs' populated in .prcm structure already.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
[paul@pwsan.com: add flag bit rather than overloading .context_offs;
 update changelog message]
Signed-off-by: Paul Walmsley <paul@pwsan.com>
13 years agoARM: OMAP4: hwmod data: add support for lostcontext_mask
Tero Kristo [Sun, 23 Sep 2012 23:28:19 +0000 (17:28 -0600)]
ARM: OMAP4: hwmod data: add support for lostcontext_mask

Currently hwmod only provides the offset for the context lose
register, and if we attempt to share the same register between two or
more hwmods, the resulting context loss counts get wrong. Thus, we
need a way to specify which bits are used for the context loss
information for each.  This is accomplished by adding a new field to
the omap4 prcm struct, 'lostcontext_mask', which specifies a bit-mask
to use for filtering the register.

Mark the affected hwmods appropriately.  'l4_abe' hwmod uses the
LOSTMEM_AESSMEM bit of RM_ABE_AESS_CONTEXT register, as l4_abe doesn't
have its own dedicated register for this purpose. This register is
shared with 'aess' hwmod, thus both hwmods must also specify which
bits of the register are used for them.

This patch only adds the hwmod data, but a future patch should add
code support such that only the specified bits are read and cleared by
the context lose counter update code. If a hwmod doesn't specify
'lostcontext_mask' (default behavior), the whole contents of the
context register should be used without any filtering.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
[paul@pwsan.com: updated to apply after conversion to use flag bit for
 missing module context-loss register; combined data and code patches;
 dropped code change due to serial driver breakage]
Signed-off-by: Paul Walmsley <paul@pwsan.com>
13 years agoARM: OMAP4: powerdomain: add support for reading prev logic and mem states
Tero Kristo [Sun, 23 Sep 2012 23:28:19 +0000 (17:28 -0600)]
ARM: OMAP4: powerdomain: add support for reading prev logic and mem states

On OMAP4, there is no support to read previous logic state
or previous memory state achieved when a power domain transitions
to RET. Instead there are module level context registers.

In order to support the powerdomain level logic/mem_off_counters
on OMAP4, instead use the previous power state achieved (RET) and
the *programmed* logic/mem RET state to derive if a powerdomain lost
logic or did not.

If the powerdomain is programmed to enter RET state and lose logic
in RET state, knowing that the powerdomain entered RET is good enough
to derive that the logic was lost as well, in such cases.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
[paul@pwsan.com: removed dependency on functional power state series for now;
 bumped copyright date]
Signed-off-by: Paul Walmsley <paul@pwsan.com>
13 years agoARM: OMAP2+: hwmod code: convert missing clockdomain warnings to debug messages
Paul Walmsley [Sun, 23 Sep 2012 23:28:18 +0000 (17:28 -0600)]
ARM: OMAP2+: hwmod code: convert missing clockdomain warnings to debug messages

The decision was made a few months ago to allow struct omap_hwmod
records and struct clk records to omit clockdomain information if the
clockdomain is not software-controllable.  See for example commit
868c157df9721675c19729eed2c96bac6c3f1d01 ("ARM: OMAP2+: hwmod: remove
prm_clkdm, cm_clkdm; allow hwmods to have no clockdomain").

So convert an existing pr_warning() to a pr_debug() (regarding missing
clockdomains in clocks), and add a pr_debug() for missing hwmod
clockdomains.  It's still useful to enable these messages for
debugging, since missing clockdomains can cause hard-to-debug problems
with power management; see for example commit
6c4a057bffe9823221eab547e11fac181dc18a2b ("ARM: OMAP4: clock data:
Force a DPLL clkdm/pwrdm ON before a relock").

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Benoît Cousson <b-cousson@ti.com>
13 years agoARM: OMAP4+: hwmod code: remove clkdm requirement in _omap4_wait_target_*()
Paul Walmsley [Sun, 23 Sep 2012 23:28:18 +0000 (17:28 -0600)]
ARM: OMAP4+: hwmod code: remove clkdm requirement in _omap4_wait_target_*()

We're no longer requiring struct omap_hwmod records to contain a
clockdomain.  So we shouldn't return -EINVAL any more from
_omap4_wait_target_disable() or _omap4_wait_target_ready() if there's
no clockdomain defined, since that just gets passed back to the
caller.  This can result in pointless warnings under the relaxed data
format.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Benoît Cousson <b-cousson@ti.com>
13 years agoARM: OMAP2+: omap_device: expose hwmod assert/deassert to omap devices
Omar Ramirez Luna [Sun, 23 Sep 2012 23:28:18 +0000 (17:28 -0600)]
ARM: OMAP2+: omap_device: expose hwmod assert/deassert to omap devices

This API is meant to be an interface to hwmod assert/deassert
function, omap devices can call them through their platform data to
control their reset lines, they are expected to know the name of the
reset line they are trying to control.

Signed-off-by: Omar Ramirez Luna <omar.luna@linaro.org>
[paul@pwsan.com: tweaked some documentation; fixed CodingStyle issue]
Signed-off-by: Paul Walmsley <paul@pwsan.com>
13 years agoARM: OMAP: hwmod code: remove unused hwmod function prototypes
Igor Grinberg [Sun, 23 Sep 2012 23:28:17 +0000 (17:28 -0600)]
ARM: OMAP: hwmod code: remove unused hwmod function prototypes

Several hwmod function prototypes appear to not have an implementation
because the corresponding functions were removed or renamed.
Those prototypes are unneeded anymore - remove them.

Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>
[paul@pwsan.com: tweaked subject]
Signed-off-by: Paul Walmsley <paul@pwsan.com>
13 years agoMerge branch 'clock_devel_3.7' into hwmod_prcm_clock_a_3.7
Paul Walmsley [Sun, 23 Sep 2012 23:27:43 +0000 (17:27 -0600)]
Merge branch 'clock_devel_3.7' into hwmod_prcm_clock_a_3.7

Conflicts:
arch/arm/mach-omap2/clkt34xx_dpll3m2.c
arch/arm/mach-omap2/clkt_clksel.c
arch/arm/mach-omap2/clock.c

13 years agoMerge tag 'omap-devel-am33xx-for-v3.7' into test_v3.6-rc6_ocb3.7_cff3.7_odaf3.7
Paul Walmsley [Sun, 23 Sep 2012 23:16:04 +0000 (17:16 -0600)]
Merge tag 'omap-devel-am33xx-for-v3.7' into test_v3.6-rc6_ocb3.7_cff3.7_odaf3.7

From Paul Walmsley <paul@pwsan.com>:

AM33xx hwmod data and miscellaneous clock and hwmod fixes.  AM33xx
should now boot on mainline after this is applied, according to
Vaibhav.

13 years agoMerge tag 'cleanup-fixes-for-v3.7' into test_v3.6-rc6_ocb3.7_cff3.7_odaf3.7
Paul Walmsley [Sun, 23 Sep 2012 23:15:44 +0000 (17:15 -0600)]
Merge tag 'cleanup-fixes-for-v3.7' into test_v3.6-rc6_ocb3.7_cff3.7_odaf3.7

These fixes are needed to fix non-omap build breakage for
twl-core driver and to fix omap1_defconfig compile when
led driver changes and omap sparse IRQ changes are merged
together. Also fix warnings for omaps not using pinctrl
framework yet.

13 years agoMerge tag 'omap-cleanup-b-for-3.7' into test_v3.6-rc6_ocb3.7_cff3.7_odaf3.7
Paul Walmsley [Sun, 23 Sep 2012 23:15:11 +0000 (17:15 -0600)]
Merge tag 'omap-cleanup-b-for-3.7' into test_v3.6-rc6_ocb3.7_cff3.7_odaf3.7

smatch and string-wrapping cleanups for the OMAP subarch code.

These changes fix some of the more meaningful warnings that smatch
returns for the OMAP subarch code, and unwraps strings that are
wrapped at the 80-column boundary, to conform with the current
practice.

Basic build, boot, and PM logs are available here:

http://www.pwsan.com/omap/testlogs/warnings_a_cleanup_3.7/20120912025927/

13 years agoARM: AM33XX: cm: Add bit-field width values
Vaibhav Hiremath [Thu, 20 Sep 2012 00:05:15 +0000 (18:05 -0600)]
ARM: AM33XX: cm: Add bit-field width values

The new common clk framework includes basic definitions for mux and
divider clocks.  These definitions depend on shift and width values
instead of the pre-computed masks that the OMAP/AM33XX clk framework
has traditionally used when accessing the register to control the
mux or divisor.

To ease this transition the masks are left intact and
the width field is simply added alongside the shift and mask data.

Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
Cc: Rajendra Nayak <rnayak@ti.com>
Cc: Paul Walmsley <paul@pwsan.com>
Cc: Mike Turquette <mturquette@ti.com>
Signed-off-by: Paul Walmsley <paul@pwsan.com>
13 years agoARM: OMAP4: cm: add bitfield width values
Mike Turquette [Thu, 20 Sep 2012 00:04:14 +0000 (18:04 -0600)]
ARM: OMAP4: cm: add bitfield width values

The new common clk framework includes basic definitions for mux and
divider clocks.  These definitions depend on shift and width values
instead of the pre-computed masks that the OMAP clk framework has
traditionally used when accessing the register to control the mux or
divisor.

To ease this transition the masks are left intact and the width field is
simply added alongside the shift and mask data.

Signed-off-by: Mike Turquette <mturquette@ti.com>
Signed-off-by: Rajendra Nayak <rnayak@ti.com>
Signed-off-by: Paul Walmsley <paul@pwsan.com>
13 years agoARM: OMAP2+: clock: Remove all direct dereferencing of struct clk
Rajendra Nayak [Sat, 22 Sep 2012 08:24:17 +0000 (02:24 -0600)]
ARM: OMAP2+: clock: Remove all direct dereferencing of struct clk

While we move to Common Clk Framework (CCF), direct deferencing of struct
clk wouldn't be possible anymore. Hence get rid of all such instances
in the current clock code and use macros/helpers similar to the ones that
are provided by CCF.

While here also concatenate some strings split across multiple lines
which seem to be needed anyway.

Signed-off-by: Rajendra Nayak <rnayak@ti.com>
[paul@pwsan.com: simplified some compound expressions; reformatted some
 messages]
Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Mike Turquette <mturquette@linaro.org>
13 years agoARM: OMAP2+: hwmod: get rid of all omap_clk_get_by_name usage
Rajendra Nayak [Sat, 22 Sep 2012 08:24:16 +0000 (02:24 -0600)]
ARM: OMAP2+: hwmod: get rid of all omap_clk_get_by_name usage

Moving to Common clk framework for OMAP would mean we no longer use
internal lookup mechanism like omap_clk_get_by_name().
get rid of all its usage mostly from hwmod and omap_device
code.

Moving to clk_get() also means the respective platforms
need the clkdev tables updated with an entry for all clocks
used by hwmod to have clock name same as the alias.

Based on original changes from Mike Turquette.

Signed-off-by: Rajendra Nayak <rnayak@ti.com>
Cc: Russell King - ARM Linux <linux@arm.linux.org.uk>
[paul@pwsan.com: removed IS_ERR_OR_NULL() conversion (rmk comment);
 restricted omap_96m_alwon_fck_3630 to OMAP36xx; added missing AM35xx
 clock aliases for emac_fck, emac_ick, vpfe_ick, vpfe_fck; added
 aliases rng_ick and several emulation clocks]
Signed-off-by: Paul Walmsley <paul@pwsan.com>
13 years agoARM: omap: clk: add clk_prepare and clk_unprepare
Rajendra Nayak [Sat, 22 Sep 2012 08:24:16 +0000 (02:24 -0600)]
ARM: omap: clk: add clk_prepare and clk_unprepare

As part of Common Clk Framework (CCF) the clk_enable() operation
was split into a clk_prepare() which could sleep, and a clk_enable()
which should never sleep. Similarly the clk_disable() was
split into clk_disable() and clk_unprepare(). This was
needed to handle complex cases where in a clk gate/ungate
would require a slow and a fast part to be implemented.
None of the clocks below seem to be in the 'complex' clocks
category and are just simple clocks which are enabled/disabled
through simple register writes.
Most of the instances also seem to be called in non-atomic
context which means its safe to move all of those from
using a clk_enable() to clk_prepare_enable() and clk_disable() to
clk_disable_unprepare().

For some others, mainly the ones handled through the hwmod framework
there is a possibility that they get called in either an atomic
or a non-atomic context.

The way these get handled below work only as long as clk_prepare
is implemented as a no-op (which is the case today) since this gets
called very early at boot while most subsystems are unavailable.
Hence these are marked with a *HACK* comment, which says we need
to re-visit these once we start doing something meaningful with
clk_prepare/clk_unprepare like doing voltage scaling or something
that involves i2c.

This is in preparation of OMAP moving to CCF.

Based on initial changes from Mike Turquette.

Signed-off-by: Rajendra Nayak <rnayak@ti.com>
Signed-off-by: Paul Walmsley <paul@pwsan.com>
13 years agoSPI: OMAP: remove unnecessary includes of plat/clock.h
Paul Walmsley [Sat, 22 Sep 2012 08:24:16 +0000 (02:24 -0600)]
SPI: OMAP: remove unnecessary includes of plat/clock.h

Remove unnecessary includes of plat/clock.h from the OMAP SPI
controller drivers.  These need to be removed to build multi-subarch
ARM kernels which include these drivers.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
13 years agoARM: OMAP4: Add timer clock aliases for device-tree
Jon Hunter [Sat, 22 Sep 2012 08:24:15 +0000 (02:24 -0600)]
ARM: OMAP4: Add timer clock aliases for device-tree

For OMAP4, the dmtimers are located in the Wake-up, ABE and Peripheral (PER)
power domains. Hence, when the dmtimer is configured to use the "timer_sys_ck"
as its functional clock the actual clock used is different depending on whether
the clock is in the Wake-up, ABE or PER domain. So when we look-up the dmtimer's
"timer_sys_ck" we need to specify the timer device name as well as clock alias
to find the right clock.

Currently, the device names for the timers have the format "omap_timer.X" where
X is the timer instance number. When using to device tree, the format of the
device name created by device-tree is different and has the format
"<reg-address>.<device-name>" (this is assuming that the device-tree "reg"
property is specified). This causes the look-up for the OMAP4 "timer_sys_ck" to
fail. To fix this add new timer clock alias for using device-tree.

Please note that adding a 2nd set of clock aliases for the same clocks to only
temporary until device-tree migration is complete. Then we can remove the legacy
aliases. Hence, I have marked the legacy aliases with a "TODO" to remove them.

Signed-off-by: Jon Hunter <jon-hunter@ti.com>
[paul@pwsan.com: updated to apply]
Signed-off-by: Paul Walmsley <paul@pwsan.com>
13 years agoARM: OMAP2+: AM33XX: clock data: Add clkdev alias for cpu0
AnilKumar Ch [Sat, 22 Sep 2012 08:24:15 +0000 (02:24 -0600)]
ARM: OMAP2+: AM33XX: clock data: Add clkdev alias for cpu0

Add AM335x cpu0 clock entry to the corresponding clock data file. This
is useful in getting the correct mpu clock pointer to change the cpu
frequency in cpufreq driver.

Signed-off-by: AnilKumar Ch <anilkumar@ti.com>
[paul@pwsan.com: changed patch subject]
Signed-off-by: Paul Walmsley <paul@pwsan.com>
13 years agoARM: OMAP2+: clock data: add some aliases for use by CPUFreq only
Paul Walmsley [Sat, 22 Sep 2012 08:24:14 +0000 (02:24 -0600)]
ARM: OMAP2+: clock data: add some aliases for use by CPUFreq only

These clkdev aliases should make it possible to remove the
cpu_is_omap*() calls and the omap_device*() call from
drivers/cpufreq/omap-cpufreq.c during the next merge window.  Those
are interfering with multi-subarch ARM kernels.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Kevin Hilman <khilman@ti.com>
Cc: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Kevin Hilman <khilman@ti.com>
13 years agoARM: OMAP3: clock data: Add the USB TLL clocks device name
Paul Walmsley [Sat, 22 Sep 2012 08:24:14 +0000 (02:24 -0600)]
ARM: OMAP3: clock data: Add the USB TLL clocks device name

The platform device name "usbhs_tll" is added for the functional,
interface and channel clocks of the TLL module.

Signed-off-by: Keshava Munegowda <keshava_mgowda@ti.com>
Reviewed-by: Partha Basak <parthab@india.ti.com>
Signed-off-by: Paul Walmsley <paul@pwsan.com>
13 years agoARM: OMAP2420: Cosmetic fix for timer clock aliases
Jon Hunter [Sat, 22 Sep 2012 08:24:14 +0000 (02:24 -0600)]
ARM: OMAP2420: Cosmetic fix for timer clock aliases

In commit c59b537 (ARM: OMAP2+: Simplify dmtimer clock aliases) new clock
aliases were added for OMAP2+ devices. For OMAP2420, I incorrectly set the
clock flag as CK_243X instead of CK_242X. This did not introduce a regression
as the clock flags are not checked for OMAP2 devices. This also explains why
I did not catch this when testing on OMAP2420.

Fix the clock flags for these aliases for correctness.

Signed-off-by: Jon Hunter <jon-hunter@ti.com>
13 years agoARM: OMAP3: clock data: remove obsolete comment
Michael Jones [Sat, 22 Sep 2012 08:24:13 +0000 (02:24 -0600)]
ARM: OMAP3: clock data: remove obsolete comment

The file is currently called 'clock3xxx_data.c', so this comment is
out of date.

Signed-off-by: Michael Jones <michael.jones@matrix-vision.de>
[paul@pwsan.com: wrote changelog]
Signed-off-by: Paul Walmsley <paul@pwsan.com>
13 years agoMerge tag 'omap-devel-am33xx-for-v3.7' into test_v3.6-rc6_cff3.7_odaf3.7
Paul Walmsley [Sat, 22 Sep 2012 16:00:35 +0000 (10:00 -0600)]
Merge tag 'omap-devel-am33xx-for-v3.7' into test_v3.6-rc6_cff3.7_odaf3.7

From Paul Walmsley <paul@pwsan.com>:

AM33xx hwmod data and miscellaneous clock and hwmod fixes.  AM33xx
should now boot on mainline after this is applied, according to
Vaibhav.

13 years agoMerge tag 'cleanup-fixes-for-v3.7' into test_v3.6-rc6_cff3.7_odaf3.7
Paul Walmsley [Sat, 22 Sep 2012 16:00:11 +0000 (10:00 -0600)]
Merge tag 'cleanup-fixes-for-v3.7' into test_v3.6-rc6_cff3.7_odaf3.7

These fixes are needed to fix non-omap build breakage for
twl-core driver and to fix omap1_defconfig compile when
led driver changes and omap sparse IRQ changes are merged
together. Also fix warnings for omaps not using pinctrl
framework yet.

13 years agoMerge branch 'for_3.7/omap5_arch_timer' of git://github.com/SantoshShilimkar/linux...
Tony Lindgren [Fri, 21 Sep 2012 20:48:01 +0000 (13:48 -0700)]
Merge branch 'for_3.7/omap5_arch_timer' of git://github.com/SantoshShilimkar/linux into devel-dt-arch-timer

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

13 years agoMerge tag 'omap-cleanup-local-headers-for-v3.7' into tmp-merge
Tony Lindgren [Fri, 21 Sep 2012 20:39:10 +0000 (13:39 -0700)]
Merge tag 'omap-cleanup-local-headers-for-v3.7' into tmp-merge

This branch contains mostly scripted changes to make omap
header files local where possible to get us closer to supporting
the ARM single zImage. After these changes mach includes are
pretty much out of the way for omap2+, but still lots of manual
work remains to sort through the remaining plat includes.

13 years agoARM: OMAP2+: Make omap4-keypad.h local omap-cleanup-local-headers-for-v3.7
Tony Lindgren [Thu, 20 Sep 2012 18:42:20 +0000 (11:42 -0700)]
ARM: OMAP2+: Make omap4-keypad.h local

This can be local to mach-omap2.

Signed-off-by: Tony Lindgren <tony@atomide.com>
13 years agoARM: OMAP2+: Make l4_3xxx.h local
Tony Lindgren [Thu, 20 Sep 2012 18:42:10 +0000 (11:42 -0700)]
ARM: OMAP2+: Make l4_3xxx.h local

This can be local to mach-omap2.

Signed-off-by: Tony Lindgren <tony@atomide.com>
13 years agoARM: OMAP2+: Make l4_2xxx.h local
Tony Lindgren [Thu, 20 Sep 2012 18:42:07 +0000 (11:42 -0700)]
ARM: OMAP2+: Make l4_2xxx.h local

This can be local to mach-omap2.

Signed-off-by: Tony Lindgren <tony@atomide.com>
13 years agoARM: OMAP2+: Make l3_3xxx.h local
Tony Lindgren [Thu, 20 Sep 2012 18:42:04 +0000 (11:42 -0700)]
ARM: OMAP2+: Make l3_3xxx.h local

This can be local to mach-omap2.

Signed-off-by: Tony Lindgren <tony@atomide.com>
13 years agoARM: OMAP2+: Make l3_2xxx.h local
Tony Lindgren [Thu, 20 Sep 2012 18:42:02 +0000 (11:42 -0700)]
ARM: OMAP2+: Make l3_2xxx.h local

This can be local to mach-omap2.

Signed-off-by: Tony Lindgren <tony@atomide.com>
13 years agoARM: OMAP1: Move irda.h from plat to mach
Tony Lindgren [Thu, 20 Sep 2012 18:41:59 +0000 (11:41 -0700)]
ARM: OMAP1: Move irda.h from plat to mach

This is only used by omap1.

Signed-off-by: Tony Lindgren <tony@atomide.com>
13 years agoARM: OMAP2+: Make hdq1w.h local
Tony Lindgren [Thu, 20 Sep 2012 18:41:48 +0000 (11:41 -0700)]
ARM: OMAP2+: Make hdq1w.h local

This can be local to mach-omap2.

Signed-off-by: Tony Lindgren <tony@atomide.com>
13 years agoARM: OMAP2+: Make gpmc-smsc911x.h local
Tony Lindgren [Thu, 20 Sep 2012 18:41:46 +0000 (11:41 -0700)]
ARM: OMAP2+: Make gpmc-smsc911x.h local

This can be local to mach-omap2.

Signed-off-by: Tony Lindgren <tony@atomide.com>
13 years agoARM: OMAP2+: Make gpmc-smc91x.h local
Tony Lindgren [Thu, 20 Sep 2012 18:41:43 +0000 (11:41 -0700)]
ARM: OMAP2+: Make gpmc-smc91x.h local

This can be local to mach-omap2.

Signed-off-by: Tony Lindgren <tony@atomide.com>
13 years agoARM: OMAP1: Move flash.h from plat to mach
Tony Lindgren [Thu, 20 Sep 2012 18:41:37 +0000 (11:41 -0700)]
ARM: OMAP1: Move flash.h from plat to mach

This is only used by omap1.

Signed-off-by: Tony Lindgren <tony@atomide.com>
13 years agoARM: OMAP2+: Make debug-devices.h local
Tony Lindgren [Thu, 20 Sep 2012 18:41:30 +0000 (11:41 -0700)]
ARM: OMAP2+: Make debug-devices.h local

This can be local to mach-omap2.

Signed-off-by: Tony Lindgren <tony@atomide.com>
13 years agoARM: OMAP1: Move board-voiceblue.h from plat to mach
Tony Lindgren [Thu, 20 Sep 2012 18:41:25 +0000 (11:41 -0700)]
ARM: OMAP1: Move board-voiceblue.h from plat to mach

This is only used by omap1.

Signed-off-by: Tony Lindgren <tony@atomide.com>
13 years agoARM: OMAP1: Move board-sx1.h from plat to mach
Tony Lindgren [Thu, 20 Sep 2012 18:41:22 +0000 (11:41 -0700)]
ARM: OMAP1: Move board-sx1.h from plat to mach

This is only used by omap1.

Signed-off-by: Tony Lindgren <tony@atomide.com>
13 years agoARM: OMAP2+: Make omap-wakeupgen.h local
Tony Lindgren [Thu, 20 Sep 2012 18:41:16 +0000 (11:41 -0700)]
ARM: OMAP2+: Make omap-wakeupgen.h local

This can be local to mach-omap2.

Signed-off-by: Tony Lindgren <tony@atomide.com>
13 years agoARM: OMAP2+: Make omap-secure.h local
Tony Lindgren [Thu, 20 Sep 2012 18:41:14 +0000 (11:41 -0700)]
ARM: OMAP2+: Make omap-secure.h local

This can be local to mach-omap2.

Signed-off-by: Tony Lindgren <tony@atomide.com>
13 years agoARM: OMAP2+: Make ctrl_module_wkup_44xx.h local
Tony Lindgren [Thu, 20 Sep 2012 18:41:06 +0000 (11:41 -0700)]
ARM: OMAP2+: Make ctrl_module_wkup_44xx.h local

This can be local to mach-omap2.

Signed-off-by: Tony Lindgren <tony@atomide.com>
13 years agoARM: OMAP2+: Make ctrl_module_pad_wkup_44xx.h local
Tony Lindgren [Thu, 20 Sep 2012 18:41:04 +0000 (11:41 -0700)]
ARM: OMAP2+: Make ctrl_module_pad_wkup_44xx.h local

This can be local to mach-omap2.

Signed-off-by: Tony Lindgren <tony@atomide.com>
13 years agoARM: OMAP2+: Make ctrl_module_pad_core_44xx.h local
Tony Lindgren [Thu, 20 Sep 2012 18:41:01 +0000 (11:41 -0700)]
ARM: OMAP2+: Make ctrl_module_pad_core_44xx.h local

This can be local to mach-omap2.

Signed-off-by: Tony Lindgren <tony@atomide.com>
13 years agoARM: OMAP2+: Make ctrl_module_core_44xx.h local
Tony Lindgren [Thu, 20 Sep 2012 18:40:59 +0000 (11:40 -0700)]
ARM: OMAP2+: Make ctrl_module_core_44xx.h local

This can be local to mach-omap2.

Signed-off-by: Tony Lindgren <tony@atomide.com>
13 years agoARM: OMAP2+: Make board-rx51.h local
Tony Lindgren [Thu, 20 Sep 2012 18:40:56 +0000 (11:40 -0700)]
ARM: OMAP2+: Make board-rx51.h local

This can be local to mach-omap2.

Signed-off-by: Tony Lindgren <tony@atomide.com>
13 years agoARM: OMAP2+: Make am35xx.h local
Tony Lindgren [Thu, 20 Sep 2012 18:40:52 +0000 (11:40 -0700)]
ARM: OMAP2+: Make am35xx.h local

This can be local to mach-omap2.

Signed-off-by: Tony Lindgren <tony@atomide.com>
13 years agoARM: OMAP2+: Make id.h local
Tony Lindgren [Wed, 19 Sep 2012 17:33:40 +0000 (10:33 -0700)]
ARM: OMAP2+: Make id.h local

This can be local to mach-omap2.

Signed-off-by: Tony Lindgren <tony@atomide.com>
13 years agoARM: OMAP1: Move board-ams-delta.h from plat to mach
Tony Lindgren [Wed, 19 Sep 2012 17:33:43 +0000 (10:33 -0700)]
ARM: OMAP1: Move board-ams-delta.h from plat to mach

This is only used by omap1.

And to fix things properly, this should not be included
from the drivers at all.

Acked-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: linux-fbdev@vger.kernel.org
Cc: Artem Bityutskiy <Artem.Bityutskiy@linux.intel.com>
Cc: linux-mtd@lists.infradead.org
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: linux-input@vger.kernel.org
Cc: Peter Ujfalusi <peter.ujfalusi@ti.com>
Cc: Liam Girdwood <lrg@ti.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: alsa-devel@alsa-project.org
Signed-off-by: Tony Lindgren <tony@atomide.com>
13 years agoARM: OMAP1: Make plat/mux.h omap1 only
Tony Lindgren [Wed, 19 Sep 2012 17:46:56 +0000 (10:46 -0700)]
ARM: OMAP1: Make plat/mux.h omap1 only

We are moving omap2+ to use the device tree based pinctrl-single.c
and will be removing the old mux framework. This will remove the
omap1 specific parts from plat-omap.

Acked-by: Felipe Balbi <balbi@ti.com>
Cc: Grant Likely <grant.likely@secretlab.ca>
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Richard Purdie <rpurdie@rpsys.net>
Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: linux-usb@vger.kernel.org
Cc: linux-pcmcia@lists.infradead.org
Cc: spi-devel-general@lists.sourceforge.net
Signed-off-by: Tony Lindgren <tony@atomide.com>
13 years agoARM: OMAP: Remove smp.h
Tony Lindgren [Wed, 19 Sep 2012 17:33:40 +0000 (10:33 -0700)]
ARM: OMAP: Remove smp.h

This is no longer needed.

Signed-off-by: Tony Lindgren <tony@atomide.com>
13 years agoARM: OMAP: Remove unused param.h
Tony Lindgren [Wed, 19 Sep 2012 18:06:06 +0000 (11:06 -0700)]
ARM: OMAP: Remove unused param.h

This is no longer needed.

Signed-off-by: Tony Lindgren <tony@atomide.com>
13 years agoARM: omap: move platform_data definitions
Arnd Bergmann [Fri, 24 Aug 2012 13:21:06 +0000 (15:21 +0200)]
ARM: omap: move platform_data definitions

Platform data for device drivers should be defined in
include/linux/platform_data/*.h, not in the architecture
and platform specific directories.

This moves such data out of the omap include directories

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Acked-by: Nicolas Pitre <nico@linaro.org>
Acked-by: Tony Lindgren <tony@atomide.com>
Cc: Kevin Hilman <khilman@ti.com>
Cc: "Benoît Cousson" <b-cousson@ti.com>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Ohad Ben-Cohen <ohad@wizery.com>
Cc: Grant Likely <grant.likely@secretlab.ca>
Cc: Omar Ramirez Luna <omar.ramirez@ti.com>
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Cc: Peter Ujfalusi <peter.ujfalusi@ti.com>
Cc: Jarkko Nikula <jarkko.nikula@bitmer.com>
Cc: Liam Girdwood <lrg@ti.com>
Cc: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Cc: Jean Pihet <j-pihet@ti.com>
Cc: J Keerthy <j-keerthy@ti.com>
Cc: linux-omap@vger.kernel.org
13 years agoARM: OMAP5: Enable arch timer support
Santosh Shilimkar [Mon, 13 Aug 2012 09:09:03 +0000 (14:39 +0530)]
ARM: OMAP5: Enable arch timer support

Enable Cortex A15 generic timer support for OMAP5 based SOCs.
The CPU local timers run on the free running real time counter clock.

Acked-by: Benoit Cousson <b-cousson@ti.com>
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
13 years agoARM: OMAP: Add initialisation for the real-time counter.
Santosh Shilimkar [Mon, 13 Aug 2012 08:54:24 +0000 (14:24 +0530)]
ARM: OMAP: Add initialisation for the real-time counter.

The real time counter also called master counter, is a free-running
counter. It produces the count used by the CPU local timer peripherals
in the MPU cluster. The timer counts at a rate of 6.144 MHz.

The ratio registers needs to be configured based on system clock
only onetime. After initialisation, hardware takes care of adjusting
the clock in different low power modes to keep counter rate constant.

Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
13 years agoMerge tag 'cleanup-fixes-for-v3.7' of git://git.kernel.org/pub/scm/linux/kernel/git...
Olof Johansson [Tue, 18 Sep 2012 02:35:22 +0000 (19:35 -0700)]
Merge tag 'cleanup-fixes-for-v3.7' of git://git./linux/kernel/git/tmlind/linux-omap into next/cleanup

From Tony Lindgren:

These fixes are needed to fix non-omap build breakage for
twl-core driver and to fix omap1_defconfig compile when
led driver changes and omap sparse IRQ changes are merged
together. Also fix warnings for omaps not using pinctrl
framework yet.

* tag 'cleanup-fixes-for-v3.7' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
  ARM: OMAP1: Include gpio-omap.h for board-h2 and board-h3
  ARM: OMAP2+: Enable pinctrl dummy states
  mfd: Fix compile for twl-core.c by removing cpu_is_omap usage

13 years agoMerge tag 'omap-devel-dt-merged-for-v3.7' into tmp-merge
Tony Lindgren [Tue, 18 Sep 2012 02:33:38 +0000 (19:33 -0700)]
Merge tag 'omap-devel-dt-merged-for-v3.7' into tmp-merge

Device tree related changes for omaps.

Note that this branch is based on omap-cleanup-sparseirq-for-v3.7
to avoid merge conflicts with the sparseirq changes for gpio-twl4030
driver.

13 years agoMerge tag 'cleanup-fixes-for-v3.7' into tmp-merge
Tony Lindgren [Tue, 18 Sep 2012 02:33:31 +0000 (19:33 -0700)]
Merge tag 'cleanup-fixes-for-v3.7' into tmp-merge

These fixes are needed to fix non-omap build breakage for
twl-core driver and to fix omap1_defconfig compile when
led driver changes and omap sparse IRQ changes are merged
together. Also fix warnings for omaps not using pinctrl
framework yet.

13 years agoMerge tag 'omap-devel-am33xx-for-v3.7' into tmp-merge
Tony Lindgren [Tue, 18 Sep 2012 02:33:22 +0000 (19:33 -0700)]
Merge tag 'omap-devel-am33xx-for-v3.7' into tmp-merge

From Paul Walmsley <paul@pwsan.com>:

AM33xx hwmod data and miscellaneous clock and hwmod fixes.  AM33xx
should now boot on mainline after this is applied, according to
Vaibhav.

13 years agoMerge tag 'omap-cleanup-makefile-sparse-for-v3.7' into tmp-merge
Tony Lindgren [Tue, 18 Sep 2012 02:33:15 +0000 (19:33 -0700)]
Merge tag 'omap-cleanup-makefile-sparse-for-v3.7' into tmp-merge

From Paul Walmsley <paul@pwsan.com>:

Clean up and standardize several parts of
arch/arm/mach-omap2/Makefile.  Beyond readability and diffstat
improvements, the series should reduce the risk of conflicts during
future cleanups by ensuring related lines are in the same section of the
Makefile.

smatch and string-wrapping cleanups for the OMAP subarch code.

These changes fix some of the more meaningful warnings that smatch
returns for the OMAP subarch code, and unwraps strings that are
wrapped at the 80-column boundary, to conform with the current
practice.

13 years agoMerge tag 'omap-cleanup-sparseirq-for-v3.7' into tmp-merge
Tony Lindgren [Tue, 18 Sep 2012 02:33:02 +0000 (19:33 -0700)]
Merge tag 'omap-cleanup-sparseirq-for-v3.7' into tmp-merge

This branch contains changes needed to make omap2+
work properly with sparse IRQ. It also removes
dependencies to mach/hardware.h. These help moving
things towards ARM single zImage support.

This branch is based on a commit in tty-next
branch with omap-devel-gpmc-fixed-for-v3.7 and
cleanup-omap-tags-for-v3.7 merged in to keep things
compiling and sort out some merge conflicts.

13 years agoMerge tag 'cleanup-omap-tags-for-v3.7' into tmp-merge
Tony Lindgren [Tue, 18 Sep 2012 02:32:54 +0000 (19:32 -0700)]
Merge tag 'cleanup-omap-tags-for-v3.7' into tmp-merge

Remove the ancient omap specific atags that are no longer needed.

At some point we were planning to pass the bootloader information
with custom atags that did not work out too well.

There's no need for these any longer as the kernel has been booting
fine without them for quite some time. And Now we have device tree
support that can be used instead.

13 years agoMerge tag 'omap-devel-gpmc-fixed-for-v3.7' into tmp-merge
Tony Lindgren [Tue, 18 Sep 2012 02:32:45 +0000 (19:32 -0700)]
Merge tag 'omap-devel-gpmc-fixed-for-v3.7' into tmp-merge

Changes for GPMC (General Purpose Memory Controller) that take it
closer for being just a regular device driver.

13 years agoMerge tag 'devel-omap-device-for-v3.7' into tmp-merge
Tony Lindgren [Tue, 18 Sep 2012 02:32:36 +0000 (19:32 -0700)]
Merge tag 'devel-omap-device-for-v3.7' into tmp-merge

Kevin Hilman <khilman@ti.com>:

Updates for omap_device layer for v3.7.

Allows omap_device layer to keep track of driver bound status in order
to make more intelligent decisions about idling unused devices.

13 years agoMerge tag 'omap-fixes-noncritical-for-v3.7' into tmp-merge
Tony Lindgren [Tue, 18 Sep 2012 02:32:27 +0000 (19:32 -0700)]
Merge tag 'omap-fixes-noncritical-for-v3.7' into tmp-merge

Non critical omap fixes that we not considered necessary
for the v3.6 -rc cycle.

13 years agoARM: OMAP1: Include gpio-omap.h for board-h2 and board-h3 cleanup-fixes-for-v3.7
Tony Lindgren [Mon, 17 Sep 2012 23:24:20 +0000 (16:24 -0700)]
ARM: OMAP1: Include gpio-omap.h for board-h2 and board-h3

Merge of the LED related changes with omap sparse IRQ and
hardware.h related changes causes a build issue otherwise:

arch/arm/mach-omap1/board-h2.c:319: error: implicit declaration of function ‘OMAP_MPUIO’
arch/arm/mach-omap1/board-h2.c:319: error: initializer element is not constant
arch/arm/mach-omap1/board-h2.c:319: error: (near initialization for ‘h2_gpio_led_pins[1].gpio’)

Signed-off-by: Tony Lindgren <tony@atomide.com>
13 years agoARM: OMAP2+: Enable pinctrl dummy states
Matt Porter [Mon, 17 Sep 2012 23:26:11 +0000 (16:26 -0700)]
ARM: OMAP2+: Enable pinctrl dummy states

Enable pinctrl dummy states for all OMAP platforms that don't
populate DT. This allows drivers to be converted to pinctrl
and not generate new warnings on platforms that do not provide
pinctrl data. These platforms already have pinmuxes configured
before the drivers probe.

Signed-off-by: Matt Porter <mporter@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
13 years agomfd: Fix compile for twl-core.c by removing cpu_is_omap usage
Tony Lindgren [Mon, 17 Sep 2012 23:26:10 +0000 (16:26 -0700)]
mfd: Fix compile for twl-core.c by removing cpu_is_omap usage

Commit 7d7e1eba (ARM: OMAP2+: Prepare for irqs.h removal) broke
compile for non-omap as include plat/cpu.h was added. This header
was indirectly included earlier when SPARSE_IRQ was not set, but
does not exist on most platforms.

Fix the problem by removing the cpu_is_omap usage that should
not exist in drivers at all. We can do this by adding proper
clock aliases for the twl-core.c drivers, and drop separate
handling for cases when clock framework is not available as
the behaviour will stay the same.

Note that we need to add a platform device to avoid using the
i2c provided names that may be different on various omaps.

Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Paul Walmsley <paul@pwsan.com>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Cc: Olof Johansson <olof@lixom.net>
Cc: Felipe Balbi <balbi@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>