]> git.karo-electronics.de Git - karo-tx-linux.git/log
karo-tx-linux.git
11 years agosh-pfc: Initial r8a7790 PFC support
Koji Matsuoka [Mon, 8 Apr 2013 02:08:53 +0000 (11:08 +0900)]
sh-pfc: Initial r8a7790 PFC support

Add initial PFC support for the r8a7790 SoC.

At this point only GPIO interface is supported, move to
newer interfaces planned as incremental changes.

Original authors is Koji Matsuoka-san, thanks for him
and his team for the heavy lifting. Adjusted by Magnus
to work together with updated code in drivers/pinctrl.

Signed-off-by: Koji Matsuoka <koji.matsuoka.xm@rms.renesas.com>
Signed-off-by: Magnus Damm <damm@opensource.se>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
11 years agoMerge branches 'soc-r8a7778' and 'soc-r8a7790' into pinmux-base
Simon Horman [Wed, 24 Apr 2013 08:33:39 +0000 (17:33 +0900)]
Merge branches 'soc-r8a7778' and 'soc-r8a7790' into pinmux-base

11 years agoARM: sh-mobile: r8a7790: Make private clock arrays static
Laurent Pinchart [Tue, 16 Apr 2013 15:16:20 +0000 (17:16 +0200)]
ARM: sh-mobile: r8a7790: Make private clock arrays static

Both clock-r8a7740.c and clock-r8a7790.c define a div4_clks array as
non-static. Compiling support for both SoCs thus result in a symbol
redefinition. Fix it by defining the arrays as static.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
11 years agoARM: shmobile: r8a7790: add div6 clocks
Kuninori Morimoto [Fri, 12 Apr 2013 07:43:09 +0000 (00:43 -0700)]
ARM: shmobile: r8a7790: add div6 clocks

DIV6 clocks control SD*/MMC* core clocks.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
11 years agoARM: shmobile: r8a7790: add div4 clocks
Kuninori Morimoto [Fri, 12 Apr 2013 07:42:52 +0000 (00:42 -0700)]
ARM: shmobile: r8a7790: add div4 clocks

DIV4 clocks control SD* core clocks.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
11 years agoARM: shmobile: r8a7790: add main clock
Kuninori Morimoto [Fri, 12 Apr 2013 07:42:22 +0000 (00:42 -0700)]
ARM: shmobile: r8a7790: add main clock

Almost all clock needs main clock which is basis clock on r8a7790.
This patch adds it, and, set its parent/ratio via MD pin.
It is based on v0.05 datasheet

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
11 years agoARM: shmobile: r8a7778: Register SDHI device
Kuninori Morimoto [Wed, 17 Apr 2013 05:17:25 +0000 (22:17 -0700)]
ARM: shmobile: r8a7778: Register SDHI device

This patch adds SDHI register function which needs id number (= 0/1/2)

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
11 years agoARM: shmobile: r8a7778: add SDHI clock support
Kuninori Morimoto [Wed, 17 Apr 2013 05:17:04 +0000 (22:17 -0700)]
ARM: shmobile: r8a7778: add SDHI clock support

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
11 years agoARM: shmobile: r8a7778: Register PFC device
Kuninori Morimoto [Fri, 12 Apr 2013 05:37:50 +0000 (05:37 +0000)]
ARM: shmobile: r8a7778: Register PFC device

Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
11 years agoARM: shmobile: r8a7778: use fixed ratio clock
Kuninori Morimoto [Fri, 12 Apr 2013 08:13:14 +0000 (01:13 -0700)]
ARM: shmobile: r8a7778: use fixed ratio clock

R-Car M1 has many clocks, and it is possible to
read/use clock ratio of these clocks from FRQMRx.
But, these ratio are fixed value and
these are decided by MD pin status.

This patch reads MD pin status,
and used fixed ratio clock for other clocks.
It was tesed on bock-w board.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
11 years agoARM: shmobile: R8A7778: fix Ether device name
Sergei Shtylyov [Tue, 9 Apr 2013 17:47:51 +0000 (21:47 +0400)]
ARM: shmobile: R8A7778: fix Ether device name

While recasting the commit "ARM: shmobile: R8A7778: add Ether support", I made a
typo in the platform device's name: used underscore instead of hyphen.

Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
11 years agoARM: shmobile: r8a7778: fixup Ether setup code position
Kuninori Morimoto [Tue, 9 Apr 2013 05:33:44 +0000 (22:33 -0700)]
ARM: shmobile: r8a7778: fixup Ether setup code position

Ether setup code position was scattering.
This patch fixes it up

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
11 years agoMerge branch 'soc-common' into soc-r8a7778-base
Simon Horman [Wed, 24 Apr 2013 07:28:24 +0000 (16:28 +0900)]
Merge branch 'soc-common' into soc-r8a7778-base

11 years agoARM: shmobile: add GPIO IRQ macro
Kuninori Morimoto [Thu, 18 Apr 2013 06:41:30 +0000 (23:41 -0700)]
ARM: shmobile: add GPIO IRQ macro

R-Car series gpio_rcar driver can control GPIO IRQ today.
It needs base IRQ number for gpio_rcar_config :: .irq_base
This patch adds macro for GPIO IRQ.
This patch was tested on Bock-W board

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
11 years agoARM: shmobile: use do{ }while() on SH_CLK_SET_RATIO()
Kuninori Morimoto [Fri, 12 Apr 2013 07:41:07 +0000 (00:41 -0700)]
ARM: shmobile: use do{ }while() on SH_CLK_SET_RATIO()

SH_CLK_SET_RATIO() will be trouble without this patch

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
11 years agoARM: shmobile: remove ";" from SH_FIXED_RATIO_CLK*() macro
Kuninori Morimoto [Thu, 4 Apr 2013 07:05:42 +0000 (00:05 -0700)]
ARM: shmobile: remove ";" from SH_FIXED_RATIO_CLK*() macro

Acked-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
11 years agoARM: shmobile: force enable of r8a7790 arch timer
Magnus Damm [Mon, 8 Apr 2013 01:23:28 +0000 (10:23 +0900)]
ARM: shmobile: force enable of r8a7790 arch timer

Implement a SoC-specific timer init function for
r8a7790 that makes sure the architected timer
is started regardless of boot loader setting.

Signed-off-by: Magnus Damm <damm@opensource.se>
Tested-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
11 years agoARM: shmobile: Add second I/O range for r8a7790 PFC
Magnus Damm [Mon, 8 Apr 2013 02:08:44 +0000 (11:08 +0900)]
ARM: shmobile: Add second I/O range for r8a7790 PFC

Add the GPIO I/O memory range to the r8a7790 PFC device.

This extra I/O memory range is needed when using the PFC
tables to drive both pin functions (using PINCTRL or
function GPIO for old code) and actual GPIO. The goal is
however to use a separate GPIO driver in the long run
and when that happens this extra I/O memory range can
be removed.

Signed-off-by: Magnus Damm <damm@opensource.se>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
11 years agoARM: shmobile: R8A7778: add Ether support
Sergei Shtylyov [Thu, 4 Apr 2013 18:55:46 +0000 (18:55 +0000)]
ARM: shmobile: R8A7778: add Ether support

Add Ether clock and platform device for R8A7778 SoC; add a function to register
this device with board-specific platform data.

Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
11 years agoARM: shmobile: r8a7778: add r8a7778_init_irq_extpin()
Kuninori Morimoto [Tue, 2 Apr 2013 04:19:37 +0000 (21:19 -0700)]
ARM: shmobile: r8a7778: add r8a7778_init_irq_extpin()

This patch adds r8a7778_init_irq_extpin() for IRQ0 - IRQ3.
But this patch doesn't enable DT settings on r8a7778.dts,
because R8A7778 chip external IRQ depends on
IRQ0 - IRQ3 pin encoding which came from platform board
implementation.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
11 years agoARM: shmobile: r8a7778: remove pointless PLATFORM_INFO()
Kuninori Morimoto [Tue, 2 Apr 2013 04:19:17 +0000 (21:19 -0700)]
ARM: shmobile: r8a7778: remove pointless PLATFORM_INFO()

remove pointless PLATFORM_INFO() macro from setup-r8a7778,
and, used original platform_device_register_xxx()

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
11 years agoARM: shmobile: mackerel: clean up MMCIF vs. SDHI1 selection
Guennadi Liakhovetski [Fri, 29 Mar 2013 21:05:52 +0000 (22:05 +0100)]
ARM: shmobile: mackerel: clean up MMCIF vs. SDHI1 selection

MMCIF and SDHI1 share the same slot on mackerel. One of them is selected
by a jumper, which cannot be queried from software. Currently in software
one of the two interfaces is selected, depending whether or not the MMCIF
driver is enabled. This is not optimal, since the kernel has to be rebuilt
to switch from one interface to another. Still, so far there isn't a
better option. At least make this selection consistent.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski+renesas@gmail.com>
Acked-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
11 years agoARM: shmobile: mackerel: add interrupt names for SDHI0
Guennadi Liakhovetski [Fri, 29 Mar 2013 21:05:51 +0000 (22:05 +0100)]
ARM: shmobile: mackerel: add interrupt names for SDHI0

To unify with SDHI1 also use named IRQs for SDHI0. This also clarifies
which specific IRQs are used.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski+renesas@gmail.com>
Acked-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
11 years agoARM: shmobile: mackerel: switch SDHI and MMCIF interfaces to slot-gpio
Guennadi Liakhovetski [Fri, 29 Mar 2013 21:05:50 +0000 (22:05 +0100)]
ARM: shmobile: mackerel: switch SDHI and MMCIF interfaces to slot-gpio

Both SDHI and MMCIF drivers can use the standard slot-gpio card-detection
functions. Switch mackerel to using them instead of platform callbacks.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski+renesas@gmail.com>
Acked-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
11 years agoARM: shmobile: mackerel: remove OCR masks, where regulators are used
Guennadi Liakhovetski [Fri, 29 Mar 2013 21:05:49 +0000 (22:05 +0100)]
ARM: shmobile: mackerel: remove OCR masks, where regulators are used

Both SDHI and MMCIF drivers ignore their OCR platform values, when
available voltages can be retrieved from regulators.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski+renesas@gmail.com>
Acked-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
11 years agoARM: shmobile: mackerel: SDHI resources do not have to be numbered
Guennadi Liakhovetski [Fri, 29 Mar 2013 21:05:48 +0000 (22:05 +0100)]
ARM: shmobile: mackerel: SDHI resources do not have to be numbered

The SDHI driver doesn't care about platform resource order, explicit
resource numbering is redundant.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski+renesas@gmail.com>
Acked-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
11 years agoARM: shmobile: Initial r8a7790 Lager board support
Magnus Damm [Fri, 29 Mar 2013 08:49:37 +0000 (17:49 +0900)]
ARM: shmobile: Initial r8a7790 Lager board support

Lager base board support making use of 2 GiB of memory,
the r8a7790 SoC with the SCIF0 serial port and CA15 with
ARM architected timer.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
11 years agoARM: shmobile: APE6EVM LAN9220 support
Magnus Damm [Fri, 29 Mar 2013 08:00:21 +0000 (17:00 +0900)]
ARM: shmobile: APE6EVM LAN9220 support

Add LAN9220 support to the APE6EVM board using C and DT.
At this point the PFC driver lacks DT bindings so to
configure the PFC we use PINCTRL in C board code.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
11 years agoARM: shmobile: APE6EVM PFC support
Magnus Damm [Fri, 29 Mar 2013 08:00:12 +0000 (17:00 +0900)]
ARM: shmobile: APE6EVM PFC support

Start using the r8a73a4 PFC on the APE6EVM board
and configure the SCIFA0 console signals in the
PFC via PINCTRL.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
11 years agoARM: shmobile: APE6EVM base support
Magnus Damm [Fri, 29 Mar 2013 08:00:02 +0000 (17:00 +0900)]
ARM: shmobile: APE6EVM base support

V3 of APE6EVM base board support making use of
1 GiB of memory, the SCIFA0 serial port and
ARM architected timer.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
11 years agoARM: shmobile: kzm9g-reference: add ethernet support
Guennadi Liakhovetski [Thu, 21 Mar 2013 16:05:44 +0000 (17:05 +0100)]
ARM: shmobile: kzm9g-reference: add ethernet support

Add a DT node for the SMSC 9221 ethernet chip, found on kzm9g, to its
reference implementation.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
11 years agoARM: shmobile: add R-Car M1A Bock-W platform support
Kuninori Morimoto [Thu, 21 Mar 2013 10:03:38 +0000 (03:03 -0700)]
ARM: shmobile: add R-Car M1A Bock-W platform support

Add basic Bock-W board support

More devices will be added on top of this patch after
PICNTRL and clock framework are in better shape.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
11 years agoMerge tag 'renesas-pinmux2-for-v3.10' into boards-base
Simon Horman [Wed, 3 Apr 2013 01:49:18 +0000 (10:49 +0900)]
Merge tag 'renesas-pinmux2-for-v3.10' into boards-base

Second round of Renesas ARM and SH based SoC pinmux updates for v3.10

Highlights:

* Compilation fixes for sh7269 and for when CONFIG_BUG is not set
* sh-pfc Support for r8a73a4 SoC
* Move GPIOs handling from the PFC device to separate GPIO devices on the r8a7779 SoC

This pull request is based on a merge of:
git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas renesas-pinmux-for-v3.10
git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas renesas-soc2-for-v3.10

This merge is made to supply run-time dependencies for the following
patches that will bea added on top:

ARM: shmobile: APE6EVM LAN9220 support
ARM: shmobile: APE6EVM PFC support

11 years agosh-pfc: r8a73a4: Remove unused GPIO bias data
Magnus Damm [Tue, 26 Mar 2013 13:51:53 +0000 (22:51 +0900)]
sh-pfc: r8a73a4: Remove unused GPIO bias data

Remove unused pull-up/down data from the r8a73a4 PFC code.

Signed-off-by: Magnus Damm <damm@opensource.se>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
11 years agoARM: shmobile: r8a73a4: Remove all GPIO enums
Magnus Damm [Tue, 26 Mar 2013 13:51:43 +0000 (22:51 +0900)]
ARM: shmobile: r8a73a4: Remove all GPIO enums

Function GPIOs are not used anymore, and all code use the GPIO numbers
directly. Remove the GPIOs enumeration.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
11 years agosh-pfc: r8a73a4: Remove function GPIOs
Magnus Damm [Tue, 26 Mar 2013 13:51:34 +0000 (22:51 +0900)]
sh-pfc: r8a73a4: Remove function GPIOs

All r8a73a4 platforms use the pinctrl API to control pin functions.
Function GPIOs are no longer needed.

Signed-off-by: Magnus Damm <damm@opensource.se>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
11 years agoARM: shmobile: r8a73a4: Remove IRQC function GPIOs
Magnus Damm [Tue, 26 Mar 2013 13:51:24 +0000 (22:51 +0900)]
ARM: shmobile: r8a73a4: Remove IRQC function GPIOs

Remove IRQ pin function GPIOs that have been deprecated by the pinctrl
API.

Signed-off-by: Magnus Damm <damm@opensource.se>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
11 years agoARM: shmobile: r8a73a4: Remove SCIF function GPIOs
Magnus Damm [Tue, 26 Mar 2013 13:51:15 +0000 (22:51 +0900)]
ARM: shmobile: r8a73a4: Remove SCIF function GPIOs

Remove SCIF function GPIOs that have been deprecated by the pinctrl API.

Signed-off-by: Magnus Damm <damm@opensource.se>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
11 years agosh-pfc: r8a73a4: Remove IRQC function GPIOS
Magnus Damm [Tue, 26 Mar 2013 13:51:05 +0000 (22:51 +0900)]
sh-pfc: r8a73a4: Remove IRQC function GPIOS

The r8a73a4 board support will use the pinctrl API to control the
external IRQ pins so remove the unused function GPIOS.

Signed-off-by: Magnus Damm <damm@opensource.se>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
11 years agosh-pfc: r8a73a4: Remove SCIF function GPIOS
Magnus Damm [Tue, 26 Mar 2013 13:50:55 +0000 (22:50 +0900)]
sh-pfc: r8a73a4: Remove SCIF function GPIOS

The r8a73a4 board support will use the pinctrl API to control the SCIF
pins, remove the corresponding unused function GPIOS.

Signed-off-by: Magnus Damm <damm@opensource.se>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
11 years agosh-pfc: r8a73a4: Add IRQC pin groups and functions
Magnus Damm [Wed, 27 Mar 2013 15:16:37 +0000 (00:16 +0900)]
sh-pfc: r8a73a4: Add IRQC pin groups and functions

V2 of PINCTRL support for r8a73a4 IRQC hardware
and in particular the external pins IRQ0 -> IRQ57.

Signed-off-by: Magnus Damm <damm@opensource.se>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
11 years agosh-pfc: r8a73a4: Add SCIF pin groups and functions
Magnus Damm [Tue, 26 Mar 2013 13:50:36 +0000 (22:50 +0900)]
sh-pfc: r8a73a4: Add SCIF pin groups and functions

Add PINCTRL support for r8a73a4 SCIF ports SCIFA0->SCIFA1 and
SCIFB0->SCIFB3.

Signed-off-by: Magnus Damm <damm@opensource.se>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
11 years agosh-pfc: r8a73a4: Add bias (pull-up/down) pinconf support
Magnus Damm [Tue, 26 Mar 2013 13:50:27 +0000 (22:50 +0900)]
sh-pfc: r8a73a4: Add bias (pull-up/down) pinconf support

Implement pull-up/down support for r8a73a4 similar to the implementation
for sh73a0.

Signed-off-by: Magnus Damm <damm@opensource.se>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
11 years agosh-pfc: r8a73a4: GPIO IRQ support
Magnus Damm [Tue, 26 Mar 2013 13:50:09 +0000 (22:50 +0900)]
sh-pfc: r8a73a4: GPIO IRQ support

V2 of code to add GPIO -> IRQ mappings to the
PFC table for the r8a73a4 SoC. Requires the IRQs
to be mapped at a fixed location in Linux IRQ
space. The actual IRQs are not handled by the
PFC, instead IRQC is used on r8a73a4.

Signed-off-by: Magnus Damm <damm@opensource.se>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
11 years agosh-pfc: r8a73a4: Support sparse GPIO numbers
Magnus Damm [Tue, 26 Mar 2013 13:49:59 +0000 (22:49 +0900)]
sh-pfc: r8a73a4: Support sparse GPIO numbers

The r8a73a4 SoC has sparse GPIO numbers. Declare ranges for pin numbers
in the PFC SoC data. Pin numbers shall be used with the GPIO API from
this point on.

Signed-off-by: Magnus Damm <damm@opensource.se>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
11 years agosh-pfc: Add r8a73a4 pinmux support
Magnus Damm [Tue, 26 Mar 2013 13:49:49 +0000 (22:49 +0900)]
sh-pfc: Add r8a73a4 pinmux support

Add initial PFC support for the r8a73a4 SoC.

At this point only GPIO interface is supported, move to newer interfaces
planned as incremental changes.

Original authors are Morimoto-san with help from Yoshii-san, thanks to
them for the heavy lifting. Adjusted by Magnus to work together with
updated code in drivers/pinctrl.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Takashi Yoshii <takashi.yoshii.zj@renesas.com>
Signed-off-by: Magnus Damm <damm@opensource.se>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
11 years agosh-pfc: r8a7779: Split DU input and output pixel clocks
Laurent Pinchart [Wed, 27 Mar 2013 10:06:37 +0000 (11:06 +0100)]
sh-pfc: r8a7779: Split DU input and output pixel clocks

The output pixel clocks can be used without the input pixel clocks.
Split them in different groups.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
11 years agosh-pfc: r8a7779: Remove GPIO data
Laurent Pinchart [Sun, 10 Mar 2013 03:02:15 +0000 (04:02 +0100)]
sh-pfc: r8a7779: Remove GPIO data

GPIOs are now handled by a separate driver, remove GPIO data from the
SoC information structure.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
11 years agoARM: shmobile: r8a7779: Register GPIO devices
Laurent Pinchart [Sun, 10 Mar 2013 02:31:51 +0000 (03:31 +0100)]
ARM: shmobile: r8a7779: Register GPIO devices

Move GPIOs handling from the PFC device to separate GPIO devices.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
11 years agosh-pfc: Configure pins as GPIOs at request time when handled externally
Laurent Pinchart [Sun, 10 Mar 2013 16:30:25 +0000 (17:30 +0100)]
sh-pfc: Configure pins as GPIOs at request time when handled externally

When a GPIO is handled by a separate driver the pinmux
gpio_set_direction() handler won't be called. The pin mux type then need
to be configured to GPIO at request time.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
11 years agosh-pfc: Skip gpiochip registration when no GPIO resource is found
Laurent Pinchart [Sun, 10 Mar 2013 02:19:44 +0000 (03:19 +0100)]
sh-pfc: Skip gpiochip registration when no GPIO resource is found

Boards/platforms that register dedicated GPIO devices will not supply a
memory resource for GPIOs. Try to locate the GPIO memory resource at
initialization time, and skip registration of the gpiochip if the
resource can't be found.

This is a temporary modification to ease the transition to separate GPIO
drivers. It should be reverted when all boards and platforms will have
been moved.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
11 years agosh-pfc: Make GPIO support optional
Laurent Pinchart [Sun, 10 Mar 2013 02:19:44 +0000 (03:19 +0100)]
sh-pfc: Make GPIO support optional

When implemented as a separate IP block, GPIOs should be handled by a
separate driver. To make this possible GPIO support needs to be optional
in the sh-pfc driver.

If no GPIO data registers are supplied in the SoC information structure
skip registration of the gpiochip.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
11 years agosh-pfc: Make function GPIOs support optional
Laurent Pinchart [Thu, 7 Mar 2013 13:31:57 +0000 (14:31 +0100)]
sh-pfc: Make function GPIOs support optional

The target is to get rid of function GPIOs completely. To reach this,
make function GPIOs support optional by skipping the function GPIO chip
registration if no function GPIOS are defined in SoC data.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
11 years agoARM: shmobile: marzen: Add GPIO LEDs
Laurent Pinchart [Sun, 10 Mar 2013 02:43:32 +0000 (03:43 +0100)]
ARM: shmobile: marzen: Add GPIO LEDs

The board has 3 LEDs connected to GPIOs. Add a led-gpio device to
support them.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
11 years agogpio-rcar: Add pinctrl support
Laurent Pinchart [Sun, 10 Mar 2013 02:27:00 +0000 (03:27 +0100)]
gpio-rcar: Add pinctrl support

Register the GPIO pin range, and request and free GPIO pins using the
pinctrl API.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
11 years agogpio: Renesas R-Car GPIO driver V3
Magnus Damm [Wed, 13 Mar 2013 11:32:13 +0000 (20:32 +0900)]
gpio: Renesas R-Car GPIO driver V3

This patch is V3 of a GPIO driver for the R-Car series of
SoCs from Renesas. This driver is designed to be reusable
between multiple SoCs that share the same basic building block,
but so far it has only been used on R-Car H1 (r8a7779).

Each driver instance handles 32 GPIOs with individually
maskable IRQs. The driver operates on a single I/O memory
range and the 32 GPIOs are hooked up a single interrupt.

In the case of R-Car H1 either external IRQ pins or GPIOs
with interrupts can be used for on-board interupts. For
external IRQs 4 pins are supported, and in the case of GPIO
there are 202 GPIOS as 202 interrupts hooked up via 6 driver
instances and to the GIC and the Cortex-A9 Quad.

At this point this driver is interfacing as a regular
platform device driver. In the future DT support will be
submitted as an incremental feature patch.

Signed-off-by: Magnus Damm <damm@opensource.se>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
11 years agoARM: shmobile: r8a7779: Remove all GPIOs
Laurent Pinchart [Thu, 7 Mar 2013 13:44:27 +0000 (14:44 +0100)]
ARM: shmobile: r8a7779: Remove all GPIOs

Function GPIOs are not used anymore, and all code use the GPIO numbers
directly. Remove the GPIOs enumeration.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
11 years agosh-pfc: r8a7779: Don't use GPIO enum entries
Laurent Pinchart [Thu, 7 Mar 2013 22:47:18 +0000 (23:47 +0100)]
sh-pfc: r8a7779: Don't use GPIO enum entries

Refactor the GPIO macro magic to use GPIO numbers directly instead of
the GPIO_GP_x_y enum entries. This will allow removing the GPIO enum
entries from the mach/r8a7779.h header.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
11 years agosh-pfc: r8a7779: Remove function GPIOs
Laurent Pinchart [Thu, 7 Mar 2013 13:33:32 +0000 (14:33 +0100)]
sh-pfc: r8a7779: Remove function GPIOs

All r8a7779 platforms use the pinctrl API to control functions. Function
GPIOs are unused and unneeded, remove them.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
11 years agosh: sh7269: Fix compilation by adding missing includes
Laurent Pinchart [Tue, 26 Mar 2013 01:07:51 +0000 (02:07 +0100)]
sh: sh7269: Fix compilation by adding missing includes

struct resource is defined in linux/ioport.h. Include it.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
11 years agosh-pfc: Fix compiler warning when BUG()
Laurent Pinchart [Tue, 26 Mar 2013 00:44:52 +0000 (01:44 +0100)]
sh-pfc: Fix compiler warning when BUG()

The sh_pfc_phys_to_virt() function ends with a BUG() statement without a
return. When CONFIG_BUG isn't set the function will thus have no return
value. Fix it.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
11 years agoMerge branch 'soc' into pinmux-base
Simon Horman [Tue, 2 Apr 2013 02:08:34 +0000 (11:08 +0900)]
Merge branch 'soc' into pinmux-base

Conflicts:
drivers/pinctrl/sh-pfc/pfc-r8a7740.c

This merge is to provide r8a73a4 SoC files, which are added in the
soc branch and depended on by r8a73a4 pfc-changes which are to
be added to the pinmux branch.

11 years agoARM: shmobile: r8a7790 SoC 64-bit DT support
Takashi Yoshii [Fri, 29 Mar 2013 07:49:17 +0000 (16:49 +0900)]
ARM: shmobile: r8a7790 SoC 64-bit DT support

The r8a7790 SoC supports LPAE and has memory window up to
0x2ffffffff. Convert to 64-bit addresses by enlarging
#addr-cells and #size-cells to 2.

Signed-off-by: Takashi Yoshii <takashi.yoshii.zj@renesas.com>
Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
11 years agoARM: shmobile: r8a73a4 SoC 64-bit DT support
Takashi Yoshii [Fri, 29 Mar 2013 07:45:56 +0000 (16:45 +0900)]
ARM: shmobile: r8a73a4 SoC 64-bit DT support

The r8a73a4 SoC supports LPAE and has memory window up to
0x2ffffffff. Convert to 64-bit addresses by enlarging
#addr-cells and #size-cells to 2.

Signed-off-by: Takashi Yoshii <takashi.yoshii.zj@renesas.com>
Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
11 years agoARM: shmobile: r8a7790 PFC support
Magnus Damm [Wed, 27 Mar 2013 15:50:03 +0000 (00:50 +0900)]
ARM: shmobile: r8a7790 PFC support

Add a platform device for the r8a7790 PFC.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
11 years agoARM: shmobile: r8a7790 IRQC support
Magnus Damm [Wed, 27 Mar 2013 15:49:54 +0000 (00:49 +0900)]
ARM: shmobile: r8a7790 IRQC support

Add IRQC interrupt controller support to r8a7790 by
hooking up a single IRQC instances to handle 4 external
IRQ signals. The IRQC controller is tied to SPIs of
the GIC. On r8a7790 the external IRQ pins routing is
handled by the PFC which is excluded from this patch.

Both platform devices and DT devices are added in this
patch. The platform device versions are used to provide
a static interrupt map configuration for board code
written in C.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
11 years agoARM: shmobile: r8a7790 SCIF support
Magnus Damm [Wed, 27 Mar 2013 15:49:44 +0000 (00:49 +0900)]
ARM: shmobile: r8a7790 SCIF support

Add SCIF serial port support to the r8a7790 SoC by
adding platform devices for SCIFA0 -> SCIFA2 as well
as SCIFB0 -> SCIFB2 and SCIF0 -> SCIF1 together with
clock bindings. DT device description is excluded at
this point since such bindings are still under
development.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
11 years agoARM: shmobile: Initial r8a7790 SoC support
Magnus Damm [Wed, 27 Mar 2013 15:49:34 +0000 (00:49 +0900)]
ARM: shmobile: Initial r8a7790 SoC support

Add initial support for the r8a7790 SoC including:
 - Single Cortex-A15 CPU Core
 - GIC
 - Architecture timer

No static virtual mappings are used, all the components
make use of ioremap(). DT_MACHINE_START is still wrapped
in CONFIG_USE_OF to match other mach-shmobile code.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
11 years agoARM: shmobile: r8a7779: move global functions to r8a7779.h
Kuninori Morimoto [Thu, 28 Mar 2013 08:49:27 +0000 (01:49 -0700)]
ARM: shmobile: r8a7779: move global functions to r8a7779.h

There is no reason each CPU's own function has to exist in common.h.
r8a7779_xxx() go to r8a7779.h

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
11 years agoARM: shmobile: r8a7740: move global functions to r8a7740.h
Kuninori Morimoto [Thu, 28 Mar 2013 08:49:15 +0000 (01:49 -0700)]
ARM: shmobile: r8a7740: move global functions to r8a7740.h

There is no reason each CPU's own function has to exist in common.h.
r8a7740_xxx() go to r8a7740.h

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
11 years agoARM: shmobile: sh73a0: move global functions to sh73a0.h
Kuninori Morimoto [Thu, 28 Mar 2013 08:48:30 +0000 (01:48 -0700)]
ARM: shmobile: sh73a0: move global functions to sh73a0.h

There is no reason each CPU's own function has to exist in common.h.
sh73a0_xxx() go to sh73a0.h

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
11 years agoARM: shmobile: sh7372: move global functions to sh7372.h
Kuninori Morimoto [Thu, 28 Mar 2013 08:48:19 +0000 (01:48 -0700)]
ARM: shmobile: sh7372: move global functions to sh7372.h

There is no reason each CPU's own function has to exist in common.h.
sh7372_xxx() go to sh7372.h

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
11 years agoARM: shmobile: r8a7779: remove DIV4 clocks and use fixed ratio clock
Kuninori Morimoto [Wed, 27 Mar 2013 07:57:38 +0000 (00:57 -0700)]
ARM: shmobile: r8a7779: remove DIV4 clocks and use fixed ratio clock

R-Car H1 has many clocks, and it is possible to read/use clock ratio
of these clocks from FRQMRx as DIV4 clocks.
But, these ratio are fixed value and these are decided
by MD pin status.
This means that we can use fixed ratio clock via MD pin status,
instead of DIV4 clocks.

This patch reads MD pin status, and sets PLLA clock (= root clock),
and used fixed ratio clock for other clocks.
It was tesed on marzen board.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
11 years agoARM: shmobile: r8a7740: use fixed ratio clock
Kuninori Morimoto [Wed, 27 Mar 2013 07:56:57 +0000 (00:56 -0700)]
ARM: shmobile: r8a7740: use fixed ratio clock

Current clock-r8a7740 is using own implement
for each divX clocks.
This patch switches to use fixed ratio clock,
and was tesed on armadillo board.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
11 years agoARM: shmobile: r8a7740: tidyup comment/implementation mismatch
Kuninori Morimoto [Wed, 27 Mar 2013 07:56:40 +0000 (00:56 -0700)]
ARM: shmobile: r8a7740: tidyup comment/implementation mismatch

Current clock-r8a7740's DIV4/DIV6/MSTP implemented area and
its comment are mismatching.
This patch tidyup its comment/implementation area.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
11 years agoARM: shmobile: sh73a0: use fixed ratio clock
Kuninori Morimoto [Wed, 27 Mar 2013 07:56:14 +0000 (00:56 -0700)]
ARM: shmobile: sh73a0: use fixed ratio clock

Current clock-sh73a0 is using own implement
for each divX clocks.
This patch switches to use fixed ratio clock,
and was tesed on kzm9g board.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
11 years agoARM: shmobile: sh7372: use fixed ratio clock
Kuninori Morimoto [Wed, 27 Mar 2013 07:55:54 +0000 (00:55 -0700)]
ARM: shmobile: sh7372: use fixed ratio clock

Current clock-sh7372 is using own implement
for each divX clocks.
This patch switches to use fixed ratio clock,
and was tesed on mackerel board.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
11 years agoARM: shmobile: add struct clk_ratio and fixed ratio clock macro
Kuninori Morimoto [Wed, 27 Mar 2013 07:55:41 +0000 (00:55 -0700)]
ARM: shmobile: add struct clk_ratio and fixed ratio clock macro

Renesas chip has many clocks inside,
and some of them are using fixed ratio via parent clock.
Current shmobile clock code is using own divX_recalc function
and divX_clk_ops.
This patch can reduce these code

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
11 years agoARM: shmobile: sh7372: remove DIV4_ZT* clocks
Kuninori Morimoto [Wed, 27 Mar 2013 07:55:24 +0000 (00:55 -0700)]
ARM: shmobile: sh7372: remove DIV4_ZT* clocks

DIV4_ZT* clocks are for debugging and trace bus clock.
It is not necessary to control it from Linux/Software.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
11 years agoARM: shmobile: sh73a0: remove DIV4_ZT* clocks
Kuninori Morimoto [Wed, 27 Mar 2013 07:55:07 +0000 (00:55 -0700)]
ARM: shmobile: sh73a0: remove DIV4_ZT* clocks

DIV4_ZT* clocks are for debugging and trace bus clock.
It is not necessary to control it from Linux/Software.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
11 years agoARM: shmobile: sh73a0: add a TWD clock
Guennadi Liakhovetski [Thu, 7 Mar 2013 19:00:48 +0000 (20:00 +0100)]
ARM: shmobile: sh73a0: add a TWD clock

Add a TWD clock on sh73a0 for the smp_twd driver to properly update the
clock's frequency upon cpufreq events.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
11 years agoARM: shmobile: r8a7740: Migrate from INTC to GIC
Bastian Hecht [Wed, 27 Mar 2013 13:54:04 +0000 (14:54 +0100)]
ARM: shmobile: r8a7740: Migrate from INTC to GIC

With the added capabilty of the intc_irqpin driver to handle shared
external IRQs, all prerequisites are fulfilled and we are ready to
migrate completely to GIC. This includes the following steps:

- Kconfig: select ARM_GIC and RENESAS_INTC_IRQPIN
- intc-r8a7740: Throw out all legacy INTC code and init the GIC. We need
   to mask out all shared IRQs as it is needed by the
shared intc_irqpin driver.
- setup-r8a7740: Add 4 irqpin devices to handle external IRQs and update
all IRQ numbers to point to the GIC SPI.
- board-armadillo: Update all IRQ numbers to point to the GIC SPI.
- pfc-r8a7740: Update all IRQ numbers of the GPIOs to point to the GIC
SPI.

Signed-off-by: Bastian Hecht <hechtb+renesas@gmail.com>
Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
11 years agoARM: shmobile: r8a73a4: add thermal driver support
Kuninori Morimoto [Tue, 26 Mar 2013 06:18:15 +0000 (23:18 -0700)]
ARM: shmobile: r8a73a4: add thermal driver support

You can get current thermal by
> cat /sys/class/thermal/thermal_zone?/temp

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
11 years agoARM: shmobile: Disallow PINCTRL without GPIOLIB
Magnus Damm [Mon, 18 Mar 2013 13:58:18 +0000 (22:58 +0900)]
ARM: shmobile: Disallow PINCTRL without GPIOLIB

Modify mach-shmobile to only select PINCTRL in case of
ARCH_WANT_OPTIONAL_GPIOLIB is set.

This fixes a build error triggered when adding a new SoC
lacking GPIO software support (ARCH_WANT_OPTIONAL_GPIOLIB=n):

 CC      drivers/tty/vt/keyboard.o
In file included from drivers/pinctrl/core.c:30:0:
include/asm-generic/gpio.h: In function 'gpio_get_value_cansleep':
include/asm-generic/gpio.h:270:2: error: implicit declaration of function '__gpio_get_value'
include/asm-generic/gpio.h: In function 'gpio_set_value_cansleep':
include/asm-generic/gpio.h:276:2: error: implicit declaration of function '__gpio_set_value'
drivers/pinctrl/core.c: In function 'pinctrl_ready_for_gpio_range':
drivers/pinctrl/core.c:297:9: error: implicit declaration of function 'gpio_to_chip'
drivers/pinctrl/core.c:297:27: warning: initialization makes pointer from integer without a cast
drivers/pinctrl/core.c:304:45: error: dereferencing pointer to incomplete type
drivers/pinctrl/core.c:305:26: error: dereferencing pointer to incomplete type
drivers/pinctrl/core.c:305:39: error: dereferencing pointer to incomplete type
make[2]: *** [drivers/pinctrl/core.o] Error 1
make[1]: *** [drivers/pinctrl] Error 2
make[1]: *** Waiting for unfinished jobs....
  LD      drivers/sh/built-in.o

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
11 years agoARM: shmobile: sh73a0: add irqpin DT nodes
Guennadi Liakhovetski [Thu, 21 Mar 2013 16:05:40 +0000 (17:05 +0100)]
ARM: shmobile: sh73a0: add irqpin DT nodes

Add DT nodes for the 4 irqpin interrupt controllers on sh73a0. We add them
to sh73a0.dtsi, which is also used by configurations, doing all their
device instantiation from board the .c code. We rely on the fact, that
such configurations don't instantiate devices from the device-tree.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
11 years agoARM: shmobile: r8a7778 SCIF support
Kuninori Morimoto [Thu, 21 Mar 2013 10:02:38 +0000 (03:02 -0700)]
ARM: shmobile: r8a7778 SCIF support

Add SCIF serial port support to the r8a7778 SoC by
adding platform devices together with clock bindings.
DT device description is excluded at this point since
such bindings are still under development.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
11 years agoARM: shmobile: add R8A7778 basis support
Kuninori Morimoto [Thu, 21 Mar 2013 10:01:36 +0000 (03:01 -0700)]
ARM: shmobile: add R8A7778 basis support

Add initial support for the R8A7778 R-Car M1A SoC.
No static virtual mappings are used, all the components
make use of ioremap().
DT_MACHINE_START is still wrapped
in CONFIG_USE_OF to match other mach-shmobile code.

It is based on v1.0 datasheet

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
11 years agoARM: shmobile: sh73a0: wait for completion when kicking the clock
Guennadi Liakhovetski [Thu, 28 Feb 2013 12:21:58 +0000 (13:21 +0100)]
ARM: shmobile: sh73a0: wait for completion when kicking the clock

To reconfigure clocks, controlled by FRQCRA and FRQCRB, a kick bit has to
be set and to make sure the setting has taken effect, it has to be read
back repeatedly until it is cleared by the hardware. This patch adds the
waiting part, that was missing until now.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Acked-by: Magnus Damm <damm@opensource.se
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
11 years agoARM: shmobile: r8a73a4 PFC support
Magnus Damm [Tue, 26 Mar 2013 01:34:52 +0000 (10:34 +0900)]
ARM: shmobile: r8a73a4 PFC support

Add a platform device for the r8a73a4 PFC.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
11 years agoARM: shmobile: r8a73a4 IRQC support V2
Magnus Damm [Tue, 26 Mar 2013 01:34:42 +0000 (10:34 +0900)]
ARM: shmobile: r8a73a4 IRQC support V2

Add IRQC interrupt controller support to r8a73a4 by
hooking up two IRQC instances to handle 58 external
IRQ signals. There IRQC controllers are tied to SPIs
of the GIC. On r8a73a4 exact IRQ pin routing is handled
by the PFC which is excluded from this patch.

Both platform devices and DT devices are added in this
patch. The platform device versions are used to provide
a static interrupt map configuration for board code
written in C.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
11 years agoARM: shmobile: r8a73a4 SCIF support V3
Magnus Damm [Tue, 26 Mar 2013 01:34:33 +0000 (10:34 +0900)]
ARM: shmobile: r8a73a4 SCIF support V3

V3 of SCIF serial port support for the r8a73a4 SoC.
This is done by adding platform devices for SCIFA0
-> SCIFA1 as well as SCIFB0 -> SCIFB3 together with
clock bindings. DT device description is excluded at
this point since such bindings are still under
development.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
11 years agoARM: shmobile: Initial r8a73a4 SoC support V3
Magnus Damm [Tue, 26 Mar 2013 01:34:24 +0000 (10:34 +0900)]
ARM: shmobile: Initial r8a73a4 SoC support V3

V3 of initial support for the r8a73a4 SoC including:
 - Single Cortex-A15 CPU Core
 - GIC
 - Architecture timer

No static virtual mappings are used, all the components
make use of ioremap(). DT_MACHINE_START is still wrapped
in CONFIG_USE_OF to match other mach-shmobile code.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
11 years agoMerge tag 'renesas-intc-external-irq2-for-v3.10' into soc-base
Simon Horman [Tue, 2 Apr 2013 01:55:57 +0000 (10:55 +0900)]
Merge tag 'renesas-intc-external-irq2-for-v3.10' into soc-base

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).

The patch "irqchip: intc-irqpin: Add support for shared interrupt lines"
in renesas-intc-external-irq2-for-v3.10 is a dependency for
"ARM: shmobile: r8a7740: Migrate from INTC to GIC". That dependency is
the reason for this merge.

11 years agoirqchip: intc-irqpin: Add support for shared interrupt lines
Bastian Hecht [Wed, 27 Mar 2013 13:54:03 +0000 (14:54 +0100)]
irqchip: intc-irqpin: Add support for shared interrupt lines

On some hardware we don't have a 1-1 mapping from the external
interrupts coming from INTC to the GIC SPI pins. We can however
share lines to demux incoming IRQs on these SoCs.

This patch enables the intc_irqpin driver to detect requests for shared
interrupt lines and demuxes them properly by querying the INTC INTREQx0A
registers.

If you need multiple shared intc_irqpin device instances, be sure to mask
out all interrupts on the INTC that share the one line before you start
to register them. Else you run into IRQ floods that would be caused by
interrupts for which no handler has been set up yet when the first
intc_irqpin device is registered.

Signed-off-by: Bastian Hecht <hechtb+renesas@gmail.com>
Acked-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
11 years agoRevert "ARM: shmobile: streamline mackerel SD and MMC devices"
Simon Horman [Thu, 21 Mar 2013 11:18:12 +0000 (20:18 +0900)]
Revert "ARM: shmobile: streamline mackerel SD and MMC devices"

This reverts commit 626a645eb75415255aad3162f4da3f6988f0c8ec.

This appears to be incompatible with
"ARM: shmobile: sh7372: Remove SDHI and MMCIF function GPIOs"

Reverting this change resolves the following build failure:

arch/arm/mach-shmobile/board-mackerel.c: In function ‘mackerel_init’:
arch/arm/mach-shmobile/board-mackerel.c:1468: error: ‘GPIO_FN_SDHICMD1’ undeclared (first use in this function)
arch/arm/mach-shmobile/board-mackerel.c:1468: error: (Each undeclared identifier is reported only once
arch/arm/mach-shmobile/board-mackerel.c:1468: error: for each function it appears in.)
arch/arm/mach-shmobile/board-mackerel.c:1469: error: ‘GPIO_FN_SDHICLK1’ undeclared (first use in this function)
arch/arm/mach-shmobile/board-mackerel.c:1470: error: ‘GPIO_FN_SDHID1_3’ undeclared (first use in this function)
arch/arm/mach-shmobile/board-mackerel.c:1471: error: ‘GPIO_FN_SDHID1_2’ undeclared (first use in this function)
arch/arm/mach-shmobile/board-mackerel.c:1472: error: ‘GPIO_FN_SDHID1_1’ undeclared (first use in this function)
arch/arm/mach-shmobile/board-mackerel.c:1473: error: ‘GPIO_FN_SDHID1_0’ undeclared (first use in this function)
arch/arm/mach-shmobile/board-mackerel.c:1489: error: ‘GPIO_FN_SDHICMD2’ undeclared (first use in this function)
arch/arm/mach-shmobile/board-mackerel.c:1490: error: ‘GPIO_FN_SDHICLK2’ undeclared (first use in this function)
arch/arm/mach-shmobile/board-mackerel.c:1491: error: ‘GPIO_FN_SDHID2_3’ undeclared (first use in this function)
arch/arm/mach-shmobile/board-mackerel.c:1492: error: ‘GPIO_FN_SDHID2_2’ undeclared (first use in this function)
arch/arm/mach-shmobile/board-mackerel.c:1493: error: ‘GPIO_FN_SDHID2_1’ undeclared (first use in this function)
arch/arm/mach-shmobile/board-mackerel.c:1494: error: ‘GPIO_FN_SDHID2_0’ undeclared (first use in this function)

Cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
11 years agoARM: shmobile: kzm9g-reference: fix device-tree bindings and device names
Guennadi Liakhovetski [Tue, 19 Mar 2013 17:38:50 +0000 (18:38 +0100)]
ARM: shmobile: kzm9g-reference: fix device-tree bindings and device names

Fix several device-tree bindings, that haven't been updated for newest
versions of respective drivers, and device names and pin numbers, left over
from non-DT and old pinctrl versions.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
11 years agoARM: shmobile: kzm9g: add fixed voltage regulators for SDHI0 and SDHI2
Guennadi Liakhovetski [Mon, 18 Mar 2013 18:26:44 +0000 (19:26 +0100)]
ARM: shmobile: kzm9g: add fixed voltage regulators for SDHI0 and SDHI2

Both SDHI0 and SDHI2 power supplies on kzm9g can be switched on and off. In
the current version this is not used and the regulators are hard-wired to
"on." This patch switches SDHI0 and SDHI2 to proper fixed-voltage
regulators, using GPIOs to enable and disable them. Both ports shall
now be specifying the MMC_CAP_POWER_OFF_CARD MMC capability. Only SDHI0
has been tested with an SDIO card, since SDHI2 is a microSD slot.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
11 years agoARM: shmobile: armadillo800eva: add a fixed voltage regulator for SDHI1
Guennadi Liakhovetski [Mon, 18 Mar 2013 18:26:40 +0000 (19:26 +0100)]
ARM: shmobile: armadillo800eva: add a fixed voltage regulator for SDHI1

The SDHI1 power supply on armadillo800eva can be switched on and off. In
the current version this is not used and the regulator is hard-wired to
"on." This patch switches SDHI1 to a proper fixed-voltage regulator,
using a GPIO to enable and disable it. Both SDHI0 and SDHI1 ports shall
now be specifying the MMC_CAP_POWER_OFF_CARD MMC capability. Both
interfaces tested with an SDIO card.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
11 years agoARM: shmobile: sh73a0: move SDHI and MMCIF DT nodes to sh73a0.dtsi
Guennadi Liakhovetski [Tue, 19 Mar 2013 12:47:43 +0000 (13:47 +0100)]
ARM: shmobile: sh73a0: move SDHI and MMCIF DT nodes to sh73a0.dtsi

To avoid having to repeat common DT node properties in all .dts files
move them to SoC's .dtsi file, setting their status to "disabled."
Individual boards will pick up devices, that they want to use and
change their DT node status to enabled.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
11 years agoARM: shmobile: kzm9g: SDHI0 and SDHI1 use a 3.3V power supply
Guennadi Liakhovetski [Tue, 19 Mar 2013 12:47:39 +0000 (13:47 +0100)]
ARM: shmobile: kzm9g: SDHI0 and SDHI1 use a 3.3V power supply

kzm9g supplies 3.3V to its SDHI0 and SDHI2 interfaces. Specifying 2.8V
prevents some (e.g. certain SDIO) cards from working. This patch fixes the
voltage and removes redundant OCR masks from platform data.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>