]> git.karo-electronics.de Git - karo-tx-linux.git/log
karo-tx-linux.git
11 years agoMerge branches 'heads/soc-emev2', 'heads/soc-r8a73a4', 'heads/soc-r8a7740', 'heads...
Simon Horman [Wed, 15 May 2013 02:09:41 +0000 (11:09 +0900)]
Merge branches 'heads/soc-emev2', 'heads/soc-r8a73a4', 'heads/soc-r8a7740', 'heads/soc-r8a7779', 'heads/soc-r8a7778', 'heads/soc-r8a7790', 'heads/soc-sh7372', 'heads/defconfig-armadillo800eva', 'heads/defconfig-bockw', 'heads/defconfig-kzm9g', 'heads/boards-kzm9d', 'heads/boards-kzm9g', 'heads/pinmux-fixes', 'heads/clocksource', 'heads/intc-external-irq', 'heads/fbdev-fixes' and 'heads/gpio-rcar' into next

11 years agogpio-rcar: Make the platform data gpio_base field signed
Laurent Pinchart [Fri, 10 May 2013 14:48:36 +0000 (16:48 +0200)]
gpio-rcar: Make the platform data gpio_base field signed

The gpio_base field is used to specify the desired GPIO base for the
GPIO controller. The GPIO core can automatically allocate a GPIO number
range when the base is set to -1. To make this possible, make the field
signed.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
11 years agoARM: shmobile: r8a7790: Remove init_irq declaration in machine description
Maxime Ripard [Tue, 14 May 2013 15:38:43 +0000 (17:38 +0200)]
ARM: shmobile: r8a7790: Remove init_irq declaration in machine description

Commit ebafed7a ("ARM: irq: Call irqchip_init if no init_irq function is
specified") removed the need to explictly setup the init_irq field in
the machine description when using only irqchip_init. Remove that
declaration for shmobile as well.

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
11 years agoARM: shmobile: r8a73a4: Remove init_irq declaration in machine description
Maxime Ripard [Tue, 14 May 2013 15:38:42 +0000 (17:38 +0200)]
ARM: shmobile: r8a73a4: Remove init_irq declaration in machine description

Commit ebafed7a ("ARM: irq: Call irqchip_init if no init_irq function is
specified") removed the need to explictly setup the init_irq field in
the machine description when using only irqchip_init. Remove that
declaration for shmobile as well.

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
11 years agoARM: shmobile: emev2: Remove init_irq declaration in machine description
Maxime Ripard [Tue, 14 May 2013 15:38:41 +0000 (17:38 +0200)]
ARM: shmobile: emev2: Remove init_irq declaration in machine description

Commit ebafed7a ("ARM: irq: Call irqchip_init if no init_irq function is
specified") removed the need to explictly setup the init_irq field in
the machine description when using only irqchip_init. Remove that
declaration for shmobile as well.

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
11 years agoARM: shmobile: kzm9g: Remove init_irq declaration in machine description
Maxime Ripard [Tue, 14 May 2013 15:38:39 +0000 (17:38 +0200)]
ARM: shmobile: kzm9g: Remove init_irq declaration in machine description

Commit ebafed7a ("ARM: irq: Call irqchip_init if no init_irq function is
specified") removed the need to explictly setup the init_irq field in
the machine description when using only irqchip_init. Remove that
declaration for shmobile as well.

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
11 years agoARM: shmobile: r8a7778: correct model name in Kconfig
Sergei Shtylyov [Thu, 9 May 2013 00:05:40 +0000 (00:05 +0000)]
ARM: shmobile: r8a7778: correct model name in Kconfig

The correct model name is R-Car M1A or R8A77781; R8A77780 corresponds to R-Car
M1S which is a SH based SoC.

Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
[horms+renesas@verge.net.au: manually applied to soc-r8a7778 branch]
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
11 years agoARM: shmobile: fix sleep-r8a7740.S miscompiles
Arnd Bergmann [Wed, 8 May 2013 12:18:04 +0000 (14:18 +0200)]
ARM: shmobile: fix sleep-r8a7740.S miscompiles

The newly added sleep-r8a7740.S file in shmobile does not
actually build because of renamed symbols.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Bastian Hecht <hechtb+renesas@gmail.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
11 years agoirqchip: Add irqchip_init dummy function
Bastian Hecht [Wed, 8 May 2013 13:20:04 +0000 (15:20 +0200)]
irqchip: Add irqchip_init dummy function

We add an empty irqchip_init dummy function for cases in which
CONFIG_IRQCHIP is not used. In these cases irqchip.c is not compiled,
but a funtion call may still be present in architecture code, that in
runtime doesn't get hit.

E.g. this is needed in the arch/arm/mach-shmobile/intc-r8a7740.c
interrupt setup code where OF use and non OF us is both handled in one
file.

Signed-off-by: Bastian Hecht <hechtb+renesas@gmail.com>
[horms+renesas@verge.net.au: Make non-CONFIG_IRQCHIP version static inline
 and remove trailing ';'.]
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
11 years agoirqchip: renesas-irqc: Fix irqc_probe error handling
Axel Lin [Mon, 6 May 2013 09:03:32 +0000 (17:03 +0800)]
irqchip: renesas-irqc: Fix irqc_probe error handling

The code in goto err3 path is wrong because it will call fee_irq() with k == 0,
which means it does free_irq(p->irq[-1].requested_irq, &p->irq[-1]);

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
11 years agoARM: shmobile: r8a7740: Add CPUIdle
Bastian Hecht [Wed, 17 Apr 2013 10:56:30 +0000 (10:56 +0000)]
ARM: shmobile: r8a7740: Add CPUIdle

We make use of the r8a7740 Suspend To Ram code to plug together a
CPUIdle driver.

Signed-off-by: Bastian Hecht <hechtb+renesas@gmail.com>
Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org>
11 years agoARM: shmobile: r8a7740: Add Suspend-To-RAM A3SM
Bastian Hecht [Wed, 17 Apr 2013 10:56:29 +0000 (10:56 +0000)]
ARM: shmobile: r8a7740: Add Suspend-To-RAM A3SM

We add 2 Suspend to RAM modes:
- A3SM PLL0 on/off:     Power domain A3SM that contains the ARM core
                        and the 2nd level cache with either PLL0 on
                        or off

As the suspend to memory mechanism we use A3SM PLL off. A3SM PLL on
is included here too, so CPUIdle can use both power down modes (not
included in this patch).

The setup of the SYSC regarding the external IRQs is taken from
pm-sh7372.c from Magnus Damm.

Signed-off-by: Bastian Hecht <hechtb+renesas@gmail.com>
11 years agoARM: shmobile: R8A7779: fix Ether device name
Sergei Shtylyov [Tue, 9 Apr 2013 17:48:59 +0000 (21:48 +0400)]
ARM: shmobile: R8A7779: fix Ether device name

While recasting the commit "ARM: shmobile: R8A7779: 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: r8a7779: Add PCIe clocks
Phil Edworthy [Tue, 9 Apr 2013 14:35:15 +0000 (14:35 +0000)]
ARM: shmobile: r8a7779: Add PCIe clocks

Signed-off-by: Phil Edworthy <phil.edworthy@renesas.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
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 agogpio-rcar: R-Car GPIO IRQ share interrupt
Kuninori Morimoto [Thu, 18 Apr 2013 06:40:57 +0000 (23:40 -0700)]
gpio-rcar: R-Car GPIO IRQ share interrupt

R-Car H1 or Gen2 GPIO interrupts are assigned per each GPIO domain,
but, Gen1 E1/M1 GPIO interrupts are shared for all GPIO domain.
gpio-rcar driver needs IRQF_SHARED flags for these.
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: 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: BOCK-W: enable USB in defconfig
Sergei Shtylyov [Tue, 16 Apr 2013 21:35:09 +0000 (01:35 +0400)]
ARM: shmobile: BOCK-W: enable USB in defconfig

Enable USB platform EHCI/OHCI and common PHY drivers in 'bockw_defconfig'.
Enable USB storage driver and SCSI disk driver that it needs as well...

Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
11 years agoARM: shmobile: BOCK-W: enable CONFIG_PM_RUNTIME in defconfig
Vladimir Barinov [Tue, 16 Apr 2013 23:03:45 +0000 (03:03 +0400)]
ARM: shmobile: BOCK-W: enable CONFIG_PM_RUNTIME in defconfig

Enable CONFIG_PM_RUNTIME in 'bockw_defconfig' -- it's already used by TMU, SCI,
I2C, and Ether drivers to control the clocks...

Signed-off-by: Vladimir Barinov <vladimir.barinov@cogentembedded.com>
Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
11 years agoARM: shmobile: kzm9g-reference: add AS3711 and CPUFreq DT bindings
Guennadi Liakhovetski [Fri, 5 Apr 2013 10:00:37 +0000 (12:00 +0200)]
ARM: shmobile: kzm9g-reference: add AS3711 and CPUFreq DT bindings

This adds DT bindings for an AS3711 PMIC, used for supplying power to the
CPU, some peripherals and the backlight, as well as extends the cpu0 DT
node with OPPs and a reference to the PMIC to support the CPUFreq and
CPU DVFS functions.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski+renesas@gmail.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
11 years agoARM: shmobile: BOCK-W: enable I2C in defconfig
Vladimir Barinov [Wed, 17 Apr 2013 18:47:27 +0000 (22:47 +0400)]
ARM: shmobile: BOCK-W: enable I2C in defconfig

Enable I2C driver in 'bockw_defconfig'.

Signed-off-by: Vladimir Barinov <vladimir.barinov@cogentembedded.com>
Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
[ horms+renesas@verge.net.au: resolved trivial conflicts ]
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
11 years agoARM: shmobile: r8a7740: Prepare for reference DT setup
Bastian Hecht [Wed, 17 Apr 2013 10:34:05 +0000 (12:34 +0200)]
ARM: shmobile: r8a7740: Prepare for reference DT setup

We need three steps to prepare for the new Armadillo reference DT board code:
 - Split the device list into r8a7740_early_devices used by the old platform
   data setup (board-armadillo.c) and r8a7740_devices_dt used by both
   setup variants.
 - Introduce new r8a7740_init_delay() to be more flexible about calling
   shmobile_setup_delay().
 - For the generic r8a7740 support, we switch to device tree setup for
   the GIC, the irqpin devices and the I2C controllers.

This is slightly similar to commit 3b00f9342623a5ebc
"ARM: shmobile: sh73a0: Do not use early devices with DT reference"

Signed-off-by: Bastian Hecht <hechtb+renesas@gmail.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
11 years agoARM: shmobile: r8a7740: Add OF support to initialze the GIC
Bastian Hecht [Wed, 17 Apr 2013 10:34:04 +0000 (12:34 +0200)]
ARM: shmobile: r8a7740: Add OF support to initialze the GIC

We add a variant to initalize the interrupt controller in case we describe
the GIC using the Device Tree and not platform data.

Signed-off-by: Bastian Hecht <hechtb+renesas@gmail.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
11 years agoARM: shmobile: r8a7740: Add I2C DT clock names
Bastian Hecht [Wed, 17 Apr 2013 10:34:03 +0000 (12:34 +0200)]
ARM: shmobile: r8a7740: Add I2C DT clock names

Add clock association for i2c0 and i2c1 for the new DT names.

Signed-off-by: Bastian Hecht <hechtb+renesas@gmail.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
11 years agoARM: shmobile: bockw: enable SDHI on defconfig
Kuninori Morimoto [Wed, 17 Apr 2013 05:18:11 +0000 (22:18 -0700)]
ARM: shmobile: bockw: enable SDHI on defconfig

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
11 years agoARM: sh-mobile: r8a7740: Make private clock arrays static
Laurent Pinchart [Tue, 16 Apr 2013 15:16:19 +0000 (17:16 +0200)]
ARM: sh-mobile: r8a7740: 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.

To avoid further similar issues, also define the main_clks 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: 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: r8a7740: Add DT name to clock list for CMT10
Bastian Hecht [Thu, 11 Apr 2013 11:24:02 +0000 (13:24 +0200)]
ARM: shmobile: r8a7740: Add DT name to clock list for CMT10

This adds temporarily the alternative device name to the clock list
that is used when booting via Device Tree setup.

Signed-off-by: Bastian Hecht <hechtb+renesas@gmail.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
11 years agoclocksource: sh_tmu: Add OF support
Bastian Hecht [Thu, 11 Apr 2013 11:23:59 +0000 (13:23 +0200)]
clocksource: sh_tmu: Add OF support

We add the capabilty to probe SH CMT timer devices using Device Tree
setup.

Signed-off-by: Bastian Hecht <hechtb+renesas@gmail.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
11 years agoclocksource: sh_cmt: Add OF support
Bastian Hecht [Thu, 11 Apr 2013 11:23:58 +0000 (13:23 +0200)]
clocksource: sh_cmt: Add OF support

We add the capabilty to probe SH CMT timer devices using Device Tree
setup.

Signed-off-by: Bastian Hecht <hechtb+renesas@gmail.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
11 years agoARM: shmobile: Define DT bindings for timer devices
Bastian Hecht [Thu, 11 Apr 2013 11:23:57 +0000 (13:23 +0200)]
ARM: shmobile: Define DT bindings for timer devices

The SH mobile series currently features 3 timer devices in the kernel:
Compare Match Timer (CMT), Timer Unit (TMU) and MTU2. These devices
share register layout characteristics amongst each that enable us to
define common DT bindings for them.

Signed-off-by: Bastian Hecht <hechtb+renesas@gmail.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
11 years agoarm: shmobile: armadillo800eva: Fix maximum number of SCIF
Nobuhiro Iwamatsu [Mon, 15 Apr 2013 04:44:52 +0000 (13:44 +0900)]
arm: shmobile: armadillo800eva: Fix maximum number of SCIF

The r8a77740 has 9ch SCIF. It is not 8ch.

Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
11 years agoARM: shmobile: r8a73a4: add div6 clocks
Kuninori Morimoto [Fri, 5 Apr 2013 04:22:41 +0000 (21:22 -0700)]
ARM: shmobile: r8a73a4: add div6 clocks

DIV6 clocks control each 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: r8a73a4: add div4 clocks
Kuninori Morimoto [Fri, 5 Apr 2013 04:22:16 +0000 (21:22 -0700)]
ARM: shmobile: r8a73a4: add div4 clocks

DIV4 clocks control each 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: r8a73a4: add pll clocks
Kuninori Morimoto [Fri, 5 Apr 2013 04:21:39 +0000 (21:21 -0700)]
ARM: shmobile: r8a73a4: add pll clocks

PLL clocks are basis clock for other clock.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
11 years agoARM: shmobile: r8a73a4: add main clock
Kuninori Morimoto [Fri, 5 Apr 2013 04:20:40 +0000 (21:20 -0700)]
ARM: shmobile: r8a73a4: add main clock

Almost all clock needs main clock which is basis clock on r8a73a4.
This patch adds it, and, set parent clock via CKSCR register.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
11 years agoARM: r8a7740: Add interim sh-eth device name to clocks list
Bastian Hecht [Tue, 18 Dec 2012 17:22:38 +0000 (17:22 +0000)]
ARM: r8a7740: Add interim sh-eth device name to clocks list

When we use the ethernet device via DT setup, we need to add it
to a lookup list until this is properly handled later in a DT-only
fashion.

Signed-off-by: Bastian Hecht <hechtb+renesas@gmail.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
11 years agoirqchip: renesas-intc-irqpin: DT binding for sense bitfield width
Guennadi Liakhovetski [Mon, 8 Apr 2013 08:08:40 +0000 (08:08 +0000)]
irqchip: renesas-intc-irqpin: DT binding for sense bitfield width

Most Renesas irqpin controllers have 4-bit sense fields, however, some
have different widths. This patch adds a DT binding to optionally
specify such non-standard values.

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: 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 agosh-pfc: r8a7779: tidyup intc_irq3_b typo
Kuninori Morimoto [Mon, 8 Apr 2013 02:49:17 +0000 (02:49 +0000)]
sh-pfc: r8a7779: tidyup intc_irq3_b typo

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
11 years agoirqchip: irqc: Add runtime PM support
Simon Horman [Thu, 4 Apr 2013 06:21:06 +0000 (06:21 +0000)]
irqchip: irqc: Add runtime PM support

This was tested using the SMSC LAN on the APE6EVM board.

Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
11 years agoARM: shmobile: add AS3711 PMIC platform data on kzm9g
Guennadi Liakhovetski [Tue, 12 Feb 2013 17:15:31 +0000 (17:15 +0000)]
ARM: shmobile: add AS3711 PMIC platform data on kzm9g

KZM9G uses an AS3711 PMIC to supply power to the CPU and the LCD backlight.
The PMIC on the board is pre-programmed to supply correct voltages to the
CPU, power supply to the backlight has to be turned on at run-time. The
latter is currently performed by a hard-coded I2C command sequence in the
board file. This patch removes the backlight hack and instead adds an I2C
device to instantiate the AS3711 MFD driver, which will add a regulator
device to dynamically adjust CPU voltages and a backlight device.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
11 years agoARM: shmobile: kzm9d: resigser smsc911x platform device with id -1
Simon Horman [Thu, 4 Apr 2013 02:20:33 +0000 (11:20 +0900)]
ARM: shmobile: kzm9d: resigser smsc911x platform device with id -1

As the kzm9d only has one smsc911x device it
may be registered as a platform device with id -1.

This allows the kzm9d board to access the smsc911x device
when CONFIG_REGULATOR (and CONFIG_REGULATOR_FIXED_VOLTAGE)
are set. The motivation for which is twofold: using regulators
seems to be generally a good thing; it will move the kzm9d defconfig
one step closer to being able to be consolidated with other
shmobile defconfigs.

An alternate but so far untested approach would be to
update the definition of dummy_supplies in board-kzm9d.c
to use "smsc911x.0" instead of "smsc911x".

Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
11 years agoARM: shmobile: sh7372 pinmux platform device cleanup
Magnus Damm [Wed, 3 Apr 2013 06:33:18 +0000 (15:33 +0900)]
ARM: shmobile: sh7372 pinmux platform device cleanup

Use DEFINE_RES_MEM() and platform_device_register_simple()
to save a couple of lines of code.

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: r8a7740 pinmux platform device cleanup
Magnus Damm [Wed, 3 Apr 2013 06:32:58 +0000 (15:32 +0900)]
ARM: shmobile: r8a7740 pinmux platform device cleanup

Use DEFINE_RES_MEM() and platform_device_register_simple()
to save a couple of lines of code.

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: R8A7779: add Ether support
Sergei Shtylyov [Thu, 4 Apr 2013 18:53:50 +0000 (18:53 +0000)]
ARM: shmobile: R8A7779: add Ether support

Add Ether clock and platform device for R8A7779 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: r8a7779: add each clocks ratio on comment area
Kuninori Morimoto [Thu, 4 Apr 2013 07:07:14 +0000 (00:07 -0700)]
ARM: shmobile: r8a7779: add each clocks ratio on comment area

Adding comment describing the r8a7779 clock frequencies depending on
MD pin settings.

Acked-by: Magnus Damm <damm@opensource.se>
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: bockw: enable SMSC ethernet on defconfig
Kuninori Morimoto [Tue, 2 Apr 2013 04:20:49 +0000 (21:20 -0700)]
ARM: shmobile: bockw: enable SMSC ethernet on defconfig

This patch adds SMSC ethernet support on Bock-W defconfig

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: 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: kzm9g: enable AS3711 PMIC in defconfig
Guennadi Liakhovetski [Wed, 3 Apr 2013 15:53:54 +0000 (17:53 +0200)]
ARM: shmobile: kzm9g: enable AS3711 PMIC in defconfig

An AS3711 PMIC is used on kzm9g to supply CPU power and LCD backlight.
This patch enables it in board defconfig.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski+renesas@gmail.com>
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>