Commit Graph

318 Commits

Author SHA1 Message Date
Jesper Juhl
b8e513a2ec ARM: static should be at beginning of declaration
Make sure that the 'static' keywork is at the beginning of declaration
for arch/arm/mach-shmobile/board-ap4evb.c

This gets rid of warnings like
  warning: ‘static’ is not at beginning of declaration
when building with -Wold-style-declaration (and/or -Wextra which also
enables it).

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-07-11 15:11:40 +09:00
Magnus Damm
0ed61fc9da ARM: mach-shmobile: Use CMT2 for timer on sh7372
Switch the sh7372 CPU support to use CMT2 instead
of CMT1 for system timer.

CMT1 is located in the A3SP power domain while CMT2
is located in the always-on power domain C5.

This improves our PM situation - with CMT2 as timer
we can power down A3SP and still access the timer.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-07-11 15:11:35 +09:00
Guennadi Liakhovetski
4d4d6fbb7c ARM: mach-shmobile: make a struct in board-ap4evb.c static
struct soc_camera_link imx074_link in board-ap4evb.c doesn't have
to be global.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-06-30 14:37:06 +09:00
Simon Horman
9e05cdde0c ARM: mach-shmobile: ag5evm: consistently name sdhi info structures
Name the SDHI1 instance sh_sdhi1_info to be consistent with sh_sdhi0_info.

Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-06-21 17:49:43 +09:00
Kuninori Morimoto
5a5685525d ARM: mach-shmobile: mackerel: change usbhs devices order
USB1 can use IRQ interrupt and notify function for usbhs driver,
but USB0 is using polling for it.
The priority of usbhs devices order USB1 > USB0 is good idea

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-06-21 17:49:36 +09:00
Kuninori Morimoto
05a7929f31 ARM: mach-shmobile: mackerel: tidyup usbhs driver settings
- usb0 pipe is same as default. own pipe config is not needed
- usb1 lost get_id function

Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Acked-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-06-15 16:03:17 +09:00
Paul Mundt
311057250e ARM: mach-shmobile: Correct SCIF port types for SH7367.
While SH7377 and others were updated to properly use SCIFA/B port types,
SH7367 was left behind. Fix it up accordingly.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-06-14 15:12:09 +09:00
Magnus Damm
485b2ab554 ARM: mach-shmobile: sh73a0 gic_arch_extn.irq_set_wake() fix
Initialize ->irq_set_wake() in gic_arch_extn to unbreak wake
up from the KEYSC device on AG5EVM in case of Suspend-to-RAM.

Without this patch "echo mem > /sys/power/state" and a key
press results in the following message on resume:

WARNING: at kernel/irq/manage.c:507 irq_set_irq_wake+0x7c/0xd8()
Unbalanced IRQ 103 wake disable

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-06-14 15:12:05 +09:00
Magnus Damm
e2a53b7c5b ARM: mach-shmobile: Mackerel USB platform data update
This patch updates the board specific USB support
code for the sh7372 Mackerel board.

With this patch applied port CN22 is driven by the
recently added renesas_usbhs driver using the first
USB controller included in sh7372 aka USBHS0.

Hotplugging of USBHS0 unfortunately has to be
handled by software polling. The sh7372 SoC itself
obviously supports hotplug notification by IRQ but
on the Mackerel board this IRQ happens to be used
for the touch screen.

Also fix the pinmux configuration to avoid setting
up unused pins and fix minor spelling errors.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-06-14 15:11:49 +09:00
Magnus Damm
5294206053 ARM: mach-shmobile: AG5EVM SDHI1 platform data update
Add a flag for SDHI1 to enable SDIO IRQ, and remove DMA Engine
slave id:s to disable DMA as a workaround.

Tested on sh73a0/AG5EVM with a BCM4318-based SDIO card.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-06-14 15:11:45 +09:00
Guennadi Liakhovetski
816af7422f ARM: mach-shmobile: add DMAC clock definitions on SH7372
These definitions are needed to let the runtime PM subsystem turn off
DMAC clocks, when it is suspended by the driver.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-06-02 14:45:33 +09:00
Guennadi Liakhovetski
4bff4a7ee4 ARM: arch-shmobile: support SDHI card detection on mackerel, using a GPIO
On sh7372 the card-detection pin of SDHI0 can also produce interrupts,
when configured as GPIO. Use this feature to power down SDHI0, when no
card is plugged in.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-05-26 15:07:10 +09:00
Paul Mundt
dce65a6a92 Merge branch 'rmobile/fbdev' into rmobile-latest 2011-05-26 15:05:21 +09:00
Kuninori Morimoto
66ee3bef3c ARM: mach-shmobile: mackerel: add renesas_usbhs support for USB1
renesas_usbhs driver can use external interrupt mode
(which come from USB-PHY) or autonomy mode (it use own interrupt)
for detecting connection/disconnection when Function.
And it will be power OFF while it has been disconnecting
if external interrupt mode is selected.

mackerel board has 2 USB ports.

But we can not use external interrupt mode
on CN22 USB0 port which is only for USB Function.
IRQ7-PORT40 is already used by Touchscreen,
and USB-PHY needs IRQ7-PORT167.
It is impossible to use IRQ7 demux on mackerel.

We can use external interrupt mode USB-Function on "USB1".
USB1 can become Host by r8a66597, and become Function by renesas_usbhs.
But don't select both drivers in same time.
These 2 drivers are not supporting IRQ SHARD.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-05-25 17:07:36 +09:00
Paul Mundt
1acd3de54e ARM: mach-shmobile: Correct the G4EVM SDHI0 I/O range.
This obviously should have been 0xe6d500ff, fix it up accordingly.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-05-25 14:54:30 +09:00
Kuninori Morimoto
cc0a5a587d ARM: arch-shmobile: sh7372: add renesas_usbhs irq support
renesas_usbhs is remake version of r8a66597

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-05-25 11:58:25 +09:00
Damian
1c7fcbed1a sh_mobile_meram: MERAM platform data for LCDC
Based on the patch by Takanari Hayama <taki@igel.co.jp>

Add the necessary platform data to add MERAM functionality to LCDC

Includes platform data for both the AP4EVB and mackerel

Signed-off-by: Damian Hobson-Garcia <dhobsong@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-05-25 11:47:52 +09:00
Magnus Damm
416656ca42 ARM: mach-shmobile: sh73a0: mark DMA slave ID 0 as invalid
This makes it possible to leave DMA slave IDs in the platform data
at default 0 value without hitting DMA channel allocation error paths.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-05-25 11:37:24 +09:00
Guennadi Liakhovetski
f7481d0120 ARM: mach-shmobile: mark DMA slave ID 0 as invalid
This makes it possible to leave DMA slave IDs in the platform data
at default 0 value without hitting DMA channel allocation error paths.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-05-25 11:37:19 +09:00
Magnus Damm
6820e69c5e ARM: mach-shmobile: Enable DMAEngine for SDHI on AG5EVM
Add SDHI0 and SDHI1 slave ids for RX and TX to enable
DMA Engine support for SDHI on the AG5EVM board.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-05-25 11:37:00 +09:00
Magnus Damm
19aec34bd8 ARM: mach-shmobile: Enable DMAEngine for MMCIF on AG5EVM
Simply add MMCIF slave ids for RX and TX to enable
DMA Engine support for the AG5EVM board.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-05-25 11:36:55 +09:00
Magnus Damm
681e1b3eeb ARM: mach-shmobile: sh73a0 DMA Engine support for SY-DMAC
Add SY-DMAC support via shdma.c to the sh73a0 SoC
including slave ids, platform data and clock bindings.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-05-25 11:36:51 +09:00
Paul Mundt
66ad12931d ARM: mach-shmobile: Tidy up after SH7372 pm changes.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-05-25 11:22:58 +09:00
Magnus Damm
082a8ca1d3 ARM: mach-shmobile: sh7372 Core Standby CPUIdle
This patch ties in the previously added sh7372 sleep
mode known as Core Standby together with the shared
SH-Mobile ARM CPUIdle implementation.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-05-25 11:19:24 +09:00
Magnus Damm
0af4817b80 ARM: mach-shmobile: CPUIdle support
This patch adds a shared SH-Mobile ARM specific CPUIdle
implementation supporting WFI only at this point. It
serves as a common point for late registration of the
arch-specific CPUIdle code, and supports adding extra
sleep modes using the callback shmobile_cpuidle_setup()
together with shmobile_cpuidle_modes[].

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-05-25 11:19:23 +09:00
Magnus Damm
97991657be ARM: mach-shmobile: sh7372 Core Standby Suspend-to-RAM
Add sh7372 Core Standby sleep mode support and tie it
in with the shared SH-Mobile ARM suspend code.

The Core Standby mode is the lightest sh7372-specific
sleep mode, cutting power to the ARM core excluding the
L2 cache. Any interrupt source can be used for wakeups.

The low level portion of this code is based on the
TI OMAP sleep code in sleep34xx.S, thanks to them.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-05-25 11:19:20 +09:00
Magnus Damm
c3dada1894 ARM: mach-shmobile: Suspend-to-RAM support
This patch adds a simple Suspend-to-RAM implementation
for SH-Mobile ARM. The struct shmobile_suspend_ops are
kept global to allow cpu-specific code to override
the callbacks if needed.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-05-25 11:19:17 +09:00
Guennadi Liakhovetski
86a73144a7 ARM: switch mackerel to dynamically manage the platform camera
Use soc_camera_platform helper functions to dynamically manage the
camera device.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-05-24 15:25:02 +09:00
Magnus Damm
fb66c52385 ARM: mach-shmobile: Add SDHI support for AG5EVM and sh73a0
Add SDHI0 and SDHI1 support to the AG5EVM board
including platform data, pinmux configuration
and clock bindings.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-05-24 12:42:52 +09:00
Simon Horman
2007aea18c ARM: arch-shmobile: Use multiple irq vectors for SDHI
This patch reverts "ARM: mach-shmobile: sh7372 SDHI vector merge" and
supplies 3 IRQ resources for each SDHI block.

Some blocks have a 4th IRQ, but this is used for DRM feathres
that I do not have access tot he documentation for and are almost
certainly tainted by licensing issues. So the 4th IRQ is not
hooked-up even if it exists.

Cc: Chris Ball <cjb@laptop.org>
Cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Cc: Paul Mundt <lethal@linux-sh.org>
Cc: Magnus Damm <magnus.damm@gmail.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-05-24 12:42:46 +09:00
Magnus Damm
6b36fdd11b ARM: mach-shmobile: AG5EVM DSI resource string update
Update the struct resources for DSI0 to include the
hardware block name. Purely cosmetic, makes /proc/iomem
look slightly better.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-05-24 12:41:51 +09:00
Magnus Damm
60116a7378 ARM: mach-shmobile: sh73a0 twd_base fix
Fix the case of too late twd_base initialization for SMP
on sh73a0 which bas been broken because sh73a0 specific
smp_prepare_cpu() and percpu_timer_setup() changed order
in the commits:

05c74a6cbc
c413521eb4

Without this fix the sh73a0 SMP kernel panics on boot.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-05-24 12:31:17 +09:00
Magnus Damm
34154f3559 ARM: mach-shmobile: headsmp.S build fix
Git commit f4117ac9e2
introduced PLAT_PHYS_OFFSET, but headsmp.S was left
unchanged which results in a compile error:

  AS      arch/arm/mach-shmobile/headsmp.o
arch/arm/mach-shmobile/headsmp.S: Assembler messages:
arch/arm/mach-shmobile/headsmp.S:27: Error: undefined symbol `secondary_startup' in operation
arch/arm/mach-shmobile/headsmp.S:27: Error: undefined symbol `PHYS_OFFSET' in operation
make[1]: *** [arch/arm/mach-shmobile/headsmp.o] Error 1
make[1]: *** Waiting for unfinished jobs....

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-05-24 12:29:14 +09:00
Magnus Damm
6776fba7e2 ARM: mach-shmobile: Disable sh7372 RT side MSTP bits
Update the sh7372 clock code to set the RT side
set of MSTP bits to a fixed disabled state.

The sh7372 SoC contains two sets of MSTP bits,
one for the ARM (SYS) side, and one for the
SH4AL-DSP (RT) side. The actual clock associated
with the MSTP bit will only be stopped when both
sides have set the MSTP bit to disabled mode.

Some MSTP bits are enabled by default after
hardware reset, so this patch adjusts the code
to disable all MSTP bits associated with the RT
side to allow the SYS side to have full control.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-05-24 12:28:56 +09:00
Guennadi Liakhovetski
a63666c146 ARM: mach-shmobile: PLL does not have to run constantly for HDMI
The PLLC2 clock on AP4 systems does not need to run constantly to be
able to use HDMI. The HDMI hotplug interrupt works without the PLL
too, after which all the necessary clocks will be turned on by the
runtime PM.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-05-24 12:21:54 +09:00
Guennadi Liakhovetski
fe78e68ab8 ARM: mach-shmobile: add DMA for MMCIF on mackerel
Add DMA mode support for the MMCIF controller on mackerel.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Reviewed-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-05-24 12:20:14 +09:00
Guennadi Liakhovetski
5bcd75177b ARM: mach-shmobile: MMCIF on mackerel can also be a module
Remember to also check for the CONFIG_MMC_SH_MMCIF_MODULE option
for the case of a modular MMCIF driver.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Reviewed-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-05-24 12:20:08 +09:00
Magnus Damm
c9fcf007f1 ARM: mach-shmobile: sh7377 UIO platform data V3
Export the following sh7377 multimedia hardware blocks
using UIO: VPU, VEU[0-3], JPU and SPU2[0-1]

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-05-24 12:19:30 +09:00
Magnus Damm
6822471e29 ARM: mach-shmobile: sh7372 UIO platform data V3
Export the following sh7372 multimedia hardware blocks
using UIO: VPU, VEU[0-3], JPU and SPU2[0-1]

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-05-24 12:17:40 +09:00
Magnus Damm
de3283511f ARM: mach-shmobile: sh7367 UIO platform data V3
Export the following sh7367 multimedia hardware blocks
using UIO: VPU, VEU[0-3], VEU2H, JPU and SPU1

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-05-24 12:17:35 +09:00
Magnus Damm
1d0738ea48 ARM: mach-shmobile: Use SCIFA and SCIFB port types on sh7377
Update the sh7377 serial port types to make use of
PORT_SCIFA and PORT_SCIFB. This makes the software
match the sh7377 data sheet.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-05-24 12:16:54 +09:00
Simon Horman
f61831ee61 ARM: mach-shmobile: ap4evb, mackerel: fixup scif initialisation for zboot
* Set receive enable and transmit enable bits of SCASCR0 (E6C400089).
  Values previously written to this register was bogus.

  Curiously earlyprintk works with the previous code.

* Remove duplicate initialisation of GPIO port 152, SCIFA0_TXD (0xE6053098).
  This should have no effect other than to very slightly reduce the amount of
  code.

Reported-by: Magnus Damm <magnus.damm@gmail.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-05-24 12:15:20 +09:00
Paul Mundt
8b1aaeaf54 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 into rmobile-latest 2011-05-24 12:05:26 +09:00
Russell King
4b60e5f90d Merge branches 'consolidate-clksrc', 'consolidate-flash', 'consolidate-generic', 'consolidate-smp', 'consolidate-stmp' and 'consolidate-zones' into consolidate 2011-05-23 18:05:10 +01:00
Russell King
0f7b332f97 ARM: consolidate SMP cross call implementation
Rather than having each platform class provide a mach/smp.h header for
smp_cross_call(), arrange for them to register the function with the
core ARM SMP code instead.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2011-05-23 16:53:17 +01:00
Damian
bca606a646 sh_mobile: Add MSTP clock for MERAM
Signed-off-by: Damian Hobson-Garcia <dhobsong@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-05-23 16:07:43 +09:00
Rafael J. Wysocki
85eb8c8d0b PM / Runtime: Generic clock manipulation rountines for runtime PM (v6)
Many different platforms and subsystems may want to disable device
clocks during suspend and enable them during resume which is going to
be done in a very similar way in all those cases.  For this reason,
provide generic routines for the manipulation of device clocks during
suspend and resume.

Convert the ARM shmobile platform to using the new routines.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
2011-04-30 00:25:44 +02:00
Rafael J. Wysocki
1d2b71f61b PM / Runtime: Add subsystem data field to struct dev_pm_info
Some subsystems need to attach PM-related data to struct device and
they need to use devres for this purpose.  For their convenience
and to make code more straightforward, add a new field called
subsys_data to struct dev_pm_info and let subsystems use it for
attaching PM-related information to devices.

Convert the ARM shmobile platform to using the new field.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
2011-04-29 00:36:53 +02:00
Rafael J. Wysocki
38ade3a1fa shmobile: Use power domains for platform runtime PM
shmobile platforms replace the runtime PM callbacks of the platform
bus type with their own routines, but this means that the callbacks
are replaced system-wide.  This may not be the right approach if the
platform devices on the system are not of the same type (e.g. some
of them belong to an SoC and the others are located in separate
chips), because in those cases they may require different handling.
Thus it is better to use power domains to override the platform bus
type's PM handling, as it generally is possible to use different
power domains for devices with different PM requirements.

Define a default power domain for shmobile in both the SH and ARM
falvors and use it to override the platform bus type's PM callbacks.
Since the suspend and hibernate callbacks of the new "default" power
domains need to be the same and the platform bus type's suspend and
hibernate callbacks for the time being, export those callbacks so
that can be used outside of the platform bus type code.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
2011-04-29 00:36:21 +02:00
Kuninori Morimoto
a7f800131f ARM: mach-shmobile: clock-sh7372: remove status check from fsidiv_recalc
clock status check is not needed in recalc function.
clk->rate will be 0 in clk_set_rate without this patch.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-04-18 18:35:45 +09:00