]> git.karo-electronics.de Git - karo-tx-linux.git/log
karo-tx-linux.git
11 years agoMerge branch 'heads/phy-rcar-usb' into next
Simon Horman [Tue, 18 Jun 2013 07:47:50 +0000 (16:47 +0900)]
Merge branch 'heads/phy-rcar-usb' into next

Conflicts:
arch/arm/mach-shmobile/board-bockw.c
arch/arm/mach-shmobile/board-marzen.c
arch/arm/mach-shmobile/clock-r8a7778.c
arch/arm/mach-shmobile/include/mach/r8a7778.h
arch/arm/mach-shmobile/setup-r8a7778.c

11 years agoMerge branches 'heads/defconfig', 'heads/boards', 'heads/dt', 'heads/intc-external...
Simon Horman [Tue, 18 Jun 2013 07:47:43 +0000 (16:47 +0900)]
Merge branches 'heads/defconfig', 'heads/boards', 'heads/dt', 'heads/intc-external-irq', 'heads/pinmux', 'heads/boards-marzen-fixes', 'heads/sh-sci', 'heads/gpio-rcar', 'heads/cleanup-boot' and 'heads/cleanup' into next

Conflicts:
arch/arm/mach-shmobile/setup-r8a7790.c

11 years agoARM: shmobile: BOCK-W: change Ether device name
Sergei Shtylyov [Mon, 17 Jun 2013 19:39:44 +0000 (23:39 +0400)]
ARM: shmobile: BOCK-W: change Ether device name

When changing the name of Ether platform device in the commit c02f846938fe (ARM:
shmobile: r8a7778: fix Ether device name), I completely forgot that there's also
platform  device name used in bockw_pinctrl_map[], so the commit "ARM: shmobile:
BOCK-W: add Ether support" went in with the old "sh-eth" device name. Now change
it to "r8a777x-ether" in accordance with the commits that are now in  the  'net-
next.git' repository,  otherwise BOCK-W Ether support won't work in 3.11.

Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
11 years agoARM: shmobile: sh73a0: remove "0x" prefix from DT node names
Guennadi Liakhovetski [Thu, 6 Jun 2013 15:38:12 +0000 (17:38 +0200)]
ARM: shmobile: sh73a0: remove "0x" prefix from DT node names

The convention for Device Tree node names is <device>@<hex-address>, where
the part after '@' shouldn't contain the "0x" prefix. Fix the sh73a0.dtsi
DT names.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski+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 [Thu, 13 Jun 2013 09:23:38 +0000 (11:23 +0200)]
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: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
11 years agosh-pfc: r8a7778: tidyup MMC_D1 pin
Kuninori Morimoto [Wed, 12 Jun 2013 02:02:20 +0000 (19:02 -0700)]
sh-pfc: r8a7778: tidyup MMC_D1 pin

MMC_D1 is RCAR_GP_PIN(1, 8), not RCAR_GP_PIN(2, 8)

Reported-by: Yusuke Goda <yusuke.goda.sx@renesas.com>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
11 years agoARM: shmobile: r8a7790: don't use external clock for SCIFs
Ulrich Hecht [Fri, 31 May 2013 15:57:04 +0000 (17:57 +0200)]
ARM: shmobile: r8a7790: don't use external clock for SCIFs

This is an external component and may or may not be there, while the
internal clock always works.

Signed-off-by: Ulrich Hecht <ulrich.hecht@gmail.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
11 years agoARM: shmobile: r8a7790: HSCIF support
Ulrich Hecht [Fri, 31 May 2013 15:57:02 +0000 (17:57 +0200)]
ARM: shmobile: r8a7790: HSCIF support

Adds support for HSCIF0 and HSCIF1 on the r8a7790.

Signed-off-by: Ulrich Hecht <ulrich.hecht@gmail.com>
[ horms+renesas@verge.net.au this is the setup-r8a7790.c
  which I somehow miss-applied as part of another patch.
  The clock-r8a7790.c portion of this patch has already been merged. ]
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
11 years agoserial: sh-sci: HSCIF support
Ulrich Hecht [Fri, 31 May 2013 15:57:01 +0000 (17:57 +0200)]
serial: sh-sci: HSCIF support

Adds support for "High Speed Serial Communications Interface with FIFO",
essentially a SCIF with 128-byte FIFOs and more accurate baud rate
generator.

Signed-off-by: Ulrich Hecht <ulrich.hecht@gmail.com>
Acked-by: Paul Mundt <lethal@linux-sh.org>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
11 years agoARM: shmobile: Remove Bonito board support
Kuninori Morimoto [Thu, 13 Jun 2013 05:11:46 +0000 (22:11 -0700)]
ARM: shmobile: Remove Bonito board support

Remove board support for the r8a7740 based Bonito board

The r8a7740 SoC support code is still kept around since it
is in use by the Armadillo800eva board which is basically a more
recent board where the design is based on Bonito.

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 AP4EVB board support
Magnus Damm [Wed, 12 Jun 2013 09:18:19 +0000 (18:18 +0900)]
ARM: shmobile: Remove AP4EVB board support

Remove board support for the sh7372 based AP4EVB board

The sh7372 SoC support code is still kept around since it
is in use by the Mackerel board which is basically a more
recent board where the design is based on AP4EVB.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
11 years agoARM: shmobile: Remove mach/memory.h
Magnus Damm [Mon, 10 Jun 2013 09:47:06 +0000 (18:47 +0900)]
ARM: shmobile: Remove mach/memory.h

Remove mach-shmobile memory.h since it is no longer needed.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
11 years agoARM: shmobile: Remove MEMORY_START/SIZE
Magnus Damm [Mon, 10 Jun 2013 09:46:57 +0000 (18:46 +0900)]
ARM: shmobile: Remove MEMORY_START/SIZE

Remove CONFIG_MEMORY_START and CONFIG_MEMORY_SIZE from mach-shmobile.

Boards should use DT to specify their memory setup. Boards that still
not support DT may pass ATAGS with memory information from the boot
loader. If those ATAGS turn out to be incorrect then appended DTB with
memory information should be used as a workaround.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
11 years agoARM: shmobile: Enable ARM_PATCH_PHYS_VIRT
Magnus Damm [Mon, 10 Jun 2013 09:46:47 +0000 (18:46 +0900)]
ARM: shmobile: Enable ARM_PATCH_PHYS_VIRT

Adjust mach-shmobile to add a select for CONFIG_ARM_PATCH_PHYS_VIRT
and at the same time remove NEED_MACH_MEMORY_H.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
11 years agoARM: shmobile: Remove old SCU boot code
Magnus Damm [Mon, 10 Jun 2013 09:20:25 +0000 (18:20 +0900)]
ARM: shmobile: Remove old SCU boot code

Remove shmobile_secondary_vector_scu now when all SCU enabled
SMP platforms instead make use of shmobile_boot_scu. This
removes two inline virtual to physical address conversions.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
11 years agoARM: shmobile: EMEV2 SMP with SCU boot fn and args
Magnus Damm [Mon, 10 Jun 2013 09:20:15 +0000 (18:20 +0900)]
ARM: shmobile: EMEV2 SMP with SCU boot fn and args

Let EMEV2 make use of shmobile_boot_fn and shmobile_boot_arg
together with shmobile_boot_scu and the SCU base address.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
11 years agoARM: shmobile: sh73a0 SMP with SCU boot fn and args
Magnus Damm [Mon, 10 Jun 2013 09:20:06 +0000 (18:20 +0900)]
ARM: shmobile: sh73a0 SMP with SCU boot fn and args

Let sh73a0 make use of shmobile_boot_fn and shmobile_boot_arg
together with shmobile_boot_scu and the SCU base address.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
11 years agoARM: shmobile: r8a7779 SMP with SCU boot fn and args
Magnus Damm [Mon, 10 Jun 2013 09:19:56 +0000 (18:19 +0900)]
ARM: shmobile: r8a7779 SMP with SCU boot fn and args

Let r8a7779 make use of shmobile_boot_fn and shmobile_boot_arg
together with shmobile_boot_scu and the SCU base address.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
11 years agoARM: shmobile: Add SCU boot function using argument
Magnus Damm [Mon, 10 Jun 2013 09:19:46 +0000 (18:19 +0900)]
ARM: shmobile: Add SCU boot function using argument

Add a shmoible_boot_scu function that assumes that the base address
of the SCU is passed in r0. This code is free from inline virtual
to physical address conversion.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
11 years agoARM: shmobile: Add SMP boot function and argument
Magnus Damm [Mon, 10 Jun 2013 09:19:36 +0000 (18:19 +0900)]
ARM: shmobile: Add SMP boot function and argument

Add code for mach-shmobile to allow specifying boot function
and argument. Will initially be used for SMP together with SCU
but may in the future also be used for deep sleep resume. This
patch removes one inline virtual to physical address conversion.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
11 years agoARM: shmobile: Rework sh7372 sleep code to use virt_to_phys()
Magnus Damm [Wed, 5 Jun 2013 07:45:53 +0000 (16:45 +0900)]
ARM: shmobile: Rework sh7372 sleep code to use virt_to_phys()

Instead of having a hard coded virt-to-phys address
conversion code in sleep-sh7372.S, rework the code
to do the conversion in C using virt_to_phys().

This removes the need for PLAT_PHYS_OFFSET which
in turn is needed for ARCH_MULTIPLATFORM.

Signed-off-by: Magnus Damm <damm@opensource.se>
[horms+renesas@verge.net.au: squashed in build fix posted as
 "ARM: shmobile: sh7372 build fix for SUSPEND=n && CPU_IDLE=n"]
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
11 years agopinctrl: r8a7790: fix two pin numbers
Guennadi Liakhovetski [Tue, 11 Jun 2013 11:42:17 +0000 (11:42 +0000)]
pinctrl: r8a7790: fix two pin numbers

Fix two erroneous MMCIF1 pin numbers on r8a7790.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski+renesas@gmail.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
11 years agoARM: shmobile: r8a7790: add __initdata on resource and device data
Kuninori Morimoto [Wed, 12 Jun 2013 02:03:59 +0000 (02:03 +0000)]
ARM: shmobile: r8a7790: add __initdata on resource and device data

These data will be kmemdup()'ed on
platform_device_add_resources() and platform_device_add_data()
This patch removed "const" to avoid section type conflict
with r8a7790_boards_compat_dt

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
11 years agoMerge tags 'renesas-pinmux-for-v3.11' and 'renesas-soc-for-v3.11' into cleanup
Simon Horman [Thu, 13 Jun 2013 05:45:20 +0000 (14:45 +0900)]
Merge tags 'renesas-pinmux-for-v3.11' and 'renesas-soc-for-v3.11' into cleanup

This merge has been performed in order to provide the pre-requisites for
a cleanup patch for the lager board to annotate various structures
with __initdata.

Conflicts:
arch/arm/mach-shmobile/Kconfig
arch/arm/mach-shmobile/include/mach/r8a7778.h
arch/arm/mach-shmobile/setup-r8a7778.c

11 years agoARM: shmobile: bockw: add MMCIF support
Kuninori Morimoto [Wed, 12 Jun 2013 02:12:06 +0000 (19:12 -0700)]
ARM: shmobile: bockw: add MMCIF support

This patch enables CN26 MMCIF

Signed-off-by: Yusuke Goda <yusuke.goda.sx@renesas.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: add SPI FLASH support
Kuninori Morimoto [Wed, 12 Jun 2013 02:11:41 +0000 (19:11 -0700)]
ARM: shmobile: bockw: add SPI FLASH support

This patch enables Spansion S25FL008K chip on HSPI0

Signed-off-by: Yusuke Goda <yusuke.goda.sx@renesas.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: add I2C device support
Kuninori Morimoto [Wed, 12 Jun 2013 02:11:17 +0000 (19:11 -0700)]
ARM: shmobile: bockw: add I2C device support

This patch enables rx8581 on I2C0

Signed-off-by: Yusuke Goda <yusuke.goda.sx@renesas.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: BOCK-W: add Ether support
Sergei Shtylyov [Sat, 1 Jun 2013 22:40:55 +0000 (02:40 +0400)]
ARM: shmobile: BOCK-W: add Ether support

Register Ether device from bockw_init(), passing the platform data to it, adding
only the RMII pin group to bockw_pinctrl_map[].  Although the LINK signal exists
on the board, it's connected to the link/activity LED  output of the PHY, thus
the link disappears and reappears after each packet. We'd be better off ignoring
such signal and getting the link state from the PHY indirectly.

Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
[horms+renesas@verge.net.au: manually applied]
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
11 years agoMerge branch 'soc2' into boards-base
Simon Horman [Thu, 13 Jun 2013 05:41:41 +0000 (14:41 +0900)]
Merge branch 'soc2' into boards-base

This is to provide MMC support for the r8a7778 SoC which
which required by patches to add MMC support to the
bockw board.

11 years agogpio-rcar: Add DT support
Laurent Pinchart [Tue, 21 May 2013 11:40:06 +0000 (13:40 +0200)]
gpio-rcar: Add DT support

Add DT bindings for the gpio-rcar driver and read the device
configuration from the DT node at probe time if available.

Cc: devicetree-discuss@lists.ozlabs.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: r8a7790: add clock definitions and aliases for MMCIF and SDHI
Guennadi Liakhovetski [Fri, 17 May 2013 14:55:15 +0000 (16:55 +0200)]
ARM: shmobile: r8a7790: add clock definitions and aliases for MMCIF and SDHI

Add MSTP clock definitions and fix aliases for the two MMCIF and four SDHI
interfaces on r8a7790 (H2).

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski+renesas@gmail.com>
[horms+renesas@verge.net.au: applied manually]
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
11 years agoARM: shmobile: r8a73a4: add clock definitions and aliases for MMCIF and SDHI
Guennadi Liakhovetski [Fri, 17 May 2013 14:55:14 +0000 (16:55 +0200)]
ARM: shmobile: r8a73a4: add clock definitions and aliases for MMCIF and SDHI

Add MSTP clock definitions and fix aliases for the two MMCIF and three SDHI
interfaces on r8a73a4 (APE6).

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski+renesas@gmail.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
11 years agoARM: shmobile: Remove romImage CONFIG_MEMORY_START
Magnus Damm [Wed, 5 Jun 2013 07:55:31 +0000 (16:55 +0900)]
ARM: shmobile: Remove romImage CONFIG_MEMORY_START

Instead of relying on CONFIG_MEMORY_START for memory
base address, let each romImage board header file
specify this information.

This is reworks code not to rely on CONFIG_MEMORY_START
which in turn is needed for ARCH_MULTIPLATFORM.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
11 years agoARM: shmobile: Let romImage rely on default ATAGS
Magnus Damm [Wed, 5 Jun 2013 07:55:22 +0000 (07:55 +0000)]
ARM: shmobile: Let romImage rely on default ATAGS

Remove the ATAGS data structure from head-shmobile.S
since a default ATAGS is already provided by the code
in arch/arm/kernel/atags_parser.c. Passing a NULL as
ATAGS is valid. For actual hardware specific setup
the fixup callback in the board code may be used.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
11 years agoARM: shmobile: uImage load address rework
Magnus Damm [Mon, 10 Jun 2013 09:28:57 +0000 (18:28 +0900)]
ARM: shmobile: uImage load address rework

This is V2 of the mach-shmobile uImage load address rework patch.

Rework the mach-shmobile uImage load address calculation by storing
the per-board load addresses in Makefile.boot. This removes the
CONFIG_MEMORY_START dependency from Makefile.boot, and it also makes
it possible to create safe kernel images that boot on multiple boards.

This is one of several series of code that reworks code not to rely on
CONFIG_MEMORY_START/SIZE which in turn is needed for ARCH_MULTIPLATFORM.

Signed-off-by: Magnus Damm <damm@opensource.se>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
11 years agosh-pfc: r8a7790: add HSCIF pin groups
Ulrich Hecht [Fri, 31 May 2013 15:57:03 +0000 (15:57 +0000)]
sh-pfc: r8a7790: add HSCIF pin groups

Adds HSCIF data/clk/ctrl groups to R8A7790 PFC driver.

Signed-off-by: Ulrich Hecht <ulrich.hecht@gmail.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
11 years agopinctrl: r8a73a4: add pinmux data for MMCIF and SDHI interfaces
Guennadi Liakhovetski [Tue, 11 Jun 2013 11:37:48 +0000 (13:37 +0200)]
pinctrl: r8a73a4: add pinmux data for MMCIF and SDHI interfaces

This patch adds pinmux groups and functions for the two MMCIF and three
SDHI interfaces on r8a73a4 (APE6).

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski+renesas@gmail.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
11 years agoARM: shmobile: bockw defconfig: add MMCIF support
Kuninori Morimoto [Wed, 12 Jun 2013 02:16:58 +0000 (19:16 -0700)]
ARM: shmobile: bockw defconfig: add MMCIF 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: bockw defconfig: add M25P80 support
Kuninori Morimoto [Wed, 12 Jun 2013 02:16:38 +0000 (19:16 -0700)]
ARM: shmobile: bockw defconfig: add M25P80 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: bockw defconfig: add RTC RX8581 support
Kuninori Morimoto [Wed, 12 Jun 2013 02:14:53 +0000 (19:14 -0700)]
ARM: shmobile: bockw defconfig: add RTC RX8581 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: add support MMC driver
Kuninori Morimoto [Tue, 4 Jun 2013 05:12:22 +0000 (22:12 -0700)]
ARM: shmobile: r8a7778: add support MMC driver

Add a platform device for the r8a7778 MMC.

Signed-off-by: Yusuke Goda <yusuke.goda.sx@renesas.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: add support HSPI driver
Kuninori Morimoto [Tue, 4 Jun 2013 05:12:08 +0000 (22:12 -0700)]
ARM: shmobile: r8a7778: add support HSPI driver

Add a platform device for the r8a7778 HSPI.

Signed-off-by: Yusuke Goda <yusuke.goda.sx@renesas.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: add support I2C driver
Kuninori Morimoto [Tue, 4 Jun 2013 05:11:58 +0000 (22:11 -0700)]
ARM: shmobile: r8a7778: add support I2C driver

Add a platform device for the r8a7778 I2C.

Signed-off-by: Yusuke Goda <yusuke.goda.sx@renesas.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: add support MMC clock
Kuninori Morimoto [Tue, 4 Jun 2013 05:11:39 +0000 (22:11 -0700)]
ARM: shmobile: r8a7778: add support MMC clock

This patch adds r8a7778 MMC clock support.

Signed-off-by: Yusuke Goda <yusuke.goda.sx@renesas.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: add support HSPI clock
Kuninori Morimoto [Tue, 4 Jun 2013 05:11:24 +0000 (22:11 -0700)]
ARM: shmobile: r8a7778: add support HSPI clock

This patch adds r8a7778 HSPI clock support.
It also adds shyway_clk which is requiested
from sh-hspi driver

Signed-off-by: Yusuke Goda <yusuke.goda.sx@renesas.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: add support I2C clock
Kuninori Morimoto [Tue, 4 Jun 2013 05:10:24 +0000 (22:10 -0700)]
ARM: shmobile: r8a7778: add support I2C clock

This patch adds r8a7778 I2C clock support.
It also adds peripheral_clk which is requiested
from i2c-rcar driver

Signed-off-by: Yusuke Goda <yusuke.goda.sx@renesas.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: BOCK-W: add USB support
Sergei Shtylyov [Sat, 8 Jun 2013 20:38:41 +0000 (00:38 +0400)]
ARM: shmobile: BOCK-W: add USB support

Register the USB PHY device from bockw_init(), passing the platform  data to it.
Set machine's init_late() method to r8a7778_init_late() in order for [EO]HCI to
get registered too...

Don't forget to add USB PENC0/1 pins to bockw_pinctrl_map[].

The patch has been tested on the BOCK-W board.

Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
11 years agoARM: shmobile: r8a7778: add USB support
Sergei Shtylyov [Sat, 8 Jun 2013 20:36:05 +0000 (00:36 +0400)]
ARM: shmobile: r8a7778: add USB support

Add USB clock and EHCI, OHCI, and USB PHY platform devices for R8A7778 SoC;  add
a function to register PHY device with board-specific platform data and register
EHCI and OHCI platfrom devices from the init_late() board method.

Also,  don't forget to enable CONFIG_ARCH_HAS_[EO]HCI options for R8A7778 SoC in
Kconfig...

The patch has been tested on the BOCK-W board.

Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
11 years agophy-rcar-usb: add R8A7778 support
Sergei Shtylyov [Sat, 8 Jun 2013 20:34:36 +0000 (00:34 +0400)]
phy-rcar-usb: add R8A7778 support

The driver currently only supports R8A7779 SoC. Compared to it, R8A7778 USB-PHY
has extra register range containing two high-speed signal quality characteristic
control registers which should be set up  during USB-PHY  startup depending on
whether a ferrite bead is in use or not.  So, we now handle an optional second
memory range in the driver's probe method, add the 'ferrite_bead' field to the
driver's platform data, and add an extra (optional) step to the USB-PHY startup
routine which sets up the extended registers.

Also mark in the driver's Kconfig section  that R8A7778 is now supported and
generally clarify that section, uppercasing the word "phy" and also changing
the module name that got lost in the big driver rename, while at it...

The patch has been tested on the Marzen and BOCK-W boards.

Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Acked-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
11 years agophy-rcar-usb: handle platform data
Sergei Shtylyov [Sat, 1 Jun 2013 21:57:18 +0000 (01:57 +0400)]
phy-rcar-usb: handle platform data

Set the USBPCTRL0 register from the passed platform data in rcar_usb_phy_init();
don't reset it to 0 in  rcar_usb_phy_shutdown()  anymore as that does not make
sense.  Also, don't allow the driver's probe to succeed when the platform data
are not supplied with a device.

The patch has been tested on the Marzen and BOCK-W boards.

Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Simon Horman <horms+renesas@verge.net.au>
Acked-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
11 years agoARM: shmobile: Marzen: pass platform data to USB PHY device
Sergei Shtylyov [Sat, 1 Jun 2013 21:55:04 +0000 (01:55 +0400)]
ARM: shmobile: Marzen: pass platform data to USB PHY device

Since we're now going to setup the USBPCTRL0 register using the USB PHY device's
platform data, we now need a way to pass those platform data from the board file
to the device which is situated in setup-r8a7779.c -- and what I'm suggesting is
r8a7779_add_usb_phy_device() that will register USB PHY platform device with the
passed platform data using platform_device_register_resndata() call; creating
this function involves deletion of 'usb_phy_device' from r8a7779_devices_dt[],
so that it will no longer be registered for the generic R8A7779 machine (where
we can't provide the platform data anyway), hence EHCI/OHCI drivers will fail
to load as well.

For the Marzen board, this new function will be called from marzen_init() to
register the USB PHY device early enough.

Note that the board and the SoC code have to be in one patch to keep the code
bisectable...

The patch has been tested on the Marzen board.

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]
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
11 years agophy-rcar-usb: add platform data
Sergei Shtylyov [Sat, 1 Jun 2013 21:52:28 +0000 (01:52 +0400)]
phy-rcar-usb: add platform data

Currently the driver hard-codes  USBPCTRL0 register to 0. It is wrong since this
register contains board-specific USB ports configuration and so its value should
be somehow passed via the platform data.  Add the global header file containing
'struct rcar_phy_platform_data' consisting of the various bit fields describing
USB ports' pin configuration.

Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
11 years agophy-rcar-usb: correct base address
Sergei Shtylyov [Sat, 1 Jun 2013 21:50:25 +0000 (01:50 +0400)]
phy-rcar-usb: correct base address

The memory region that is used by the driver overlaps EHCI and OHCI  register
regions for absolutely no reason now  -- fix it  by adding offset of 0x800 to
the base address, changing the register #define's accordingly. This has extra
positive effect that we now can use devm_ioremap_resource()...

Note that the driver and the SoC code have to be in one patch to keep the code
bisectable...

The patch has been tested on the Marzen board.

Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
11 years agoARM: shmobile: r8a7779: remove USB PHY 2nd memory resource
Sergei Shtylyov [Sat, 1 Jun 2013 21:48:42 +0000 (01:48 +0400)]
ARM: shmobile: r8a7779: remove USB PHY 2nd memory resource

Now that 'drivers/usb/phy/phy-rcar-usb.c' doesn't require the second memory
resource anymore, we can remove it from the R8A7779's USB PHY platform device.

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 agophy-rcar-usb: remove EHCI internal buffer setup
Sergei Shtylyov [Sat, 1 Jun 2013 21:42:26 +0000 (01:42 +0400)]
phy-rcar-usb: remove EHCI internal buffer setup

Now that the EHCI internal  buffer setup is done by the platform code,  we  can
remove  such code from this driver as it  never  really belonged here.  We also
no longer need the 2nd memory region now (2nd EHCI controller is simply missing
in e.g. R8A7778 SoC).

The patch has been tested on the Marzen and BOCK-W boards.

Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
11 years agoARM: shmobile: r8a7779: setup EHCI internal buffer
Sergei Shtylyov [Sat, 1 Jun 2013 21:37:01 +0000 (01:37 +0400)]
ARM: shmobile: r8a7779: setup EHCI internal buffer

Setup the EHCI internal buffer (before EHCI driver has a chance to touch the
registers) using the pre_setup() method in 'struct usb_ehci_pdata'.

The patch has been tested on the Marzen board.

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 agoehci-platform: add pre_setup() method to platform data
Sergei Shtylyov [Sat, 1 Jun 2013 21:33:56 +0000 (01:33 +0400)]
ehci-platform: add pre_setup() method to platform data

Sometimes there is a need  to initialize some non-standard registers mapped to
the EHCI region before accessing the standard EHCI registers.  Add pre_setup()
method with 'struct usb_hcd *' parameter to be called just before ehci_setup()
to the 'ehci-platform'  driver's platform data for this purpose...

While at it, add the missing incomplete declaration of 'struct platform_device'
to <linux/usb/ehci_pdriver.h>...

The patch has been tested on the Marzen and BOCK-W boards.

Suggested-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
11 years agoARM: shmobile: Marzen: move USB EHCI, OHCI, and PHY devices to R8A7779 code
Sergei Shtylyov [Sat, 1 Jun 2013 21:30:15 +0000 (01:30 +0400)]
ARM: shmobile: Marzen: move USB EHCI, OHCI, and PHY devices to R8A7779 code

USB EHCI, OHCI, and common PHY are the SoC devices but are wrongly defined and
registered in the Marzen board file.  Move the data and code to their proper
place in setup-r8a7779.c; while at it, we have to rename r8a7779_late_devices[]
to r8a7779_standard_devices[] -- this seems legitimate since they are registered
from r8a7779_add_standard_devices() anyway.

Note that I'm deliberately changing the USB PHY platform device's 'id' field
from (previously just omitted) 0 to -1 as the device is a single of its kind.

Note also that the board and SoC code have to be in one patch to keep the code
bisectable...

The patch has been tested on the Marzen board.

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]
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
11 years agoARM: shmobile: r8a7790: HSCIF support
Ulrich Hecht [Fri, 31 May 2013 15:57:02 +0000 (17:57 +0200)]
ARM: shmobile: r8a7790: HSCIF support

Adds support for HSCIF0 and HSCIF1 on the r8a7790.

Signed-off-by: Ulrich Hecht <ulrich.hecht@gmail.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
11 years agoARM: shmobile: r8a7778: fix Ether device name
Sergei Shtylyov [Sat, 8 Jun 2013 21:23:24 +0000 (01:23 +0400)]
ARM: shmobile: r8a7778: fix Ether device name

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

However, there's now patch merged to net-next.git renaming the platform device
from "sh-eth" to "r8a777x-ehter", so it makes the most sense to change the name
straight to that one.

Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
11 years agoARM: shmobile: r8a7779: fix Ether device name
Sergei Shtylyov [Sat, 8 Jun 2013 21:24:35 +0000 (01:24 +0400)]
ARM: shmobile: r8a7779: fix Ether device name

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

However, there's now patch merged to net-next.git renaming the platform device
from "sh-eth" to "r8a777x-ehter", so it makes the most sense to change the name
straight to that one.

Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
11 years agoMerge branches 'heads/pinmux' and 'heads/soc' into phy-rcar-usb-base
Simon Horman [Tue, 11 Jun 2013 05:58:57 +0000 (14:58 +0900)]
Merge branches 'heads/pinmux' and 'heads/soc' into phy-rcar-usb-base

This branch acts as a base for adding USB support to
r8A7778/BOCK-W and r8A7779/Marzen.

It includes the soc branch to provide dependencies in
the r8A7778 clock code.

It includes pinmux to provide pinmux initialisation for Bock-W
which is a dependency.

Conflicts:
arch/arm/mach-shmobile/Kconfig
arch/arm/mach-shmobile/include/mach/r8a7778.h
arch/arm/mach-shmobile/setup-r8a7778.c

11 years agoARM: shmobile: marzen: keep local function as static
Kuninori Morimoto [Thu, 18 Apr 2013 06:33:47 +0000 (23:33 -0700)]
ARM: shmobile: marzen: keep local function as static

marzen_init_late() should be static

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: add SDHI0 support
Kuninori Morimoto [Wed, 17 Apr 2013 05:17:56 +0000 (05:17 +0000)]
ARM: shmobile: bockw: add SDHI0 support

This patch is directly accessing to PUPR4 register which can
control SDHI0 CD/WP pin pull-up setting.
It should be replaced in the future.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
11 years agoARM: shmobile: marzen: Use INTC External IRQ pin driver for SMSC
Simon Horman [Thu, 18 Apr 2013 12:21:09 +0000 (21:21 +0900)]
ARM: shmobile: marzen: Use INTC External IRQ pin driver for SMSC

Update the marzen board to use the INTC External IRQ pin driver for SMSC.

This code was originally posted by Magnus Damm as part of
"ARM: shmobile: INTC External IRQ pin driver on r8a7779"
but somehow omitted when I applied that patch.

Cc: Magnus Damm <damm@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
11 years agoARM: shmobile: lager: support GPIO switches
Simon Horman [Mon, 13 May 2013 07:04:31 +0000 (16:04 +0900)]
ARM: shmobile: lager: support GPIO switches

The lager board has pins 1 - 4 of SW2 wired up to GPIO pins.
This patch allows access to those pins as KEYS 1 - 4 using
gpio-keys.

Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
11 years agoARM: shmobile: lager: Add GPIO LEDs
Simon Horman [Tue, 23 Apr 2013 02:37:05 +0000 (02:37 +0000)]
ARM: shmobile: lager: Add GPIO LEDs

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

Based on "ARM: shmobile: marzen: Add GPIO LEDs" by Laurent Pinchart.

Cc: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
11 years agoARM: shmobile: bockw: add dummy regulators for SMSC
Kuninori Morimoto [Tue, 9 Apr 2013 09:37:15 +0000 (02:37 -0700)]
ARM: shmobile: bockw: add dummy regulators for SMSC

SMSC driver will try to get regulator if .config had CONFIG_REGULATOR,
and, shmobile_defconfig has it.
SMSC driver on Bock-W board will be failed if it doens't have
dummy regulator settings.

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: add CN9 SCIF/RCAN selection dipswitch explanation
Kuninori Morimoto [Tue, 9 Apr 2013 06:54:16 +0000 (23:54 -0700)]
ARM: shmobile: bockw: add CN9 SCIF/RCAN selection dipswitch explanation

Debug serial (= SCIF0) is connected to CN9 upper side,
and it is shared by RCAN.
This patch adds SCIF/RCAN dipswitch explanation on
comment area for developers.

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

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: bockw: define FPGA address and rename iomem variable
Kuninori Morimoto [Wed, 17 Apr 2013 05:17:42 +0000 (22:17 -0700)]
ARM: shmobile: bockw: define FPGA address and rename iomem variable

Bock-W board will needs more board specific ioremap() method.
This patch tidyup current FPGA specific settings

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
11 years agoARM: shmobile: ape6evm: MP clock parent become EXTAL2
Kuninori Morimoto [Fri, 5 Apr 2013 04:24:27 +0000 (21:24 -0700)]
ARM: shmobile: ape6evm: MP clock parent become EXTAL2

The orignal commit 3263e09d287fbaa8a9424b5e69396599a3bbd518
(ARM: shmobile: Initial r8a73a4 SoC support V3)
put MP clock parent as EXTAL2, but its code was removed
on DIV6 clock support commit.
This patch makes it consistent.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
11 years agoMerge branches 'pinmux' and 'soc' into boards-base
Simon Horman [Fri, 7 Jun 2013 05:26:22 +0000 (14:26 +0900)]
Merge branches 'pinmux' and 'soc' into boards-base

Conflicts:
arch/arm/mach-shmobile/Kconfig
arch/arm/mach-shmobile/include/mach/r8a7778.h
arch/arm/mach-shmobile/setup-r8a7778.c

11 years agoARM: shmobile: sh73a0: div4 clocks must check the kick bit before changing rate
Guennadi Liakhovetski [Wed, 22 May 2013 22:10:00 +0000 (00:10 +0200)]
ARM: shmobile: sh73a0: div4 clocks must check the kick bit before changing rate

According to the datasheet, it is not allowed to change div4 clock rates
if an earlier rate change operation is still in progress, as indicated by
a set kick bit.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski+renesas@gmail.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
11 years agoARM: shmobile: sh73a0: do not overwrite all div4 clock operations
Guennadi Liakhovetski [Wed, 22 May 2013 22:09:36 +0000 (00:09 +0200)]
ARM: shmobile: sh73a0: do not overwrite all div4 clock operations

An earlier commit "ARM: shmobile: sh73a0: add support for adjusting CPU
frequency" intended to replace some clock operations only for the Z-clock,
instead it replaced them for all div4 clocks, since all div4 clocks share
the same copy of clock operations. Fix this by using a separate clock
operations structure for Z-clock.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski+renesas@gmail.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
11 years agoARM: shmobile: sh73a0: Always use shmobile_setup_delay()
Magnus Damm [Wed, 22 May 2013 06:04:14 +0000 (15:04 +0900)]
ARM: shmobile: sh73a0: Always use shmobile_setup_delay()

Break out the function sh73a0_init_delay() that now
gets called both for the C version of the code and
the DT -reference boards. This way we handle both
cases in the same way.

Allows us to boot with TWD only in the kernel configuration
for C board code. TWD is not yet enabled in the case of
DT -reference - this due to a dependency on CCF.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
11 years agoARM: shmobile: sh73a0: add CPUFreq support
Guennadi Liakhovetski [Fri, 5 Apr 2013 10:00:38 +0000 (12:00 +0200)]
ARM: shmobile: sh73a0: add CPUFreq support

This patch enables the use of the generic cpufreq-cpu0 driver on sh73a0.
Providing a regulator, a list of OPPs in DT, combined with a virtual
cpufreq-cpu0 platform device and a clock, attached to it is everything,
the cpufreq-cpu0 driver needs. The first sh73a0 platform, implementing
such CPUFreq support is kzm9g-reference.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski+renesas@gmail.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
11 years agoARM: shmobile: sh73a0: add support for adjusting CPU frequency
Guennadi Liakhovetski [Fri, 5 Apr 2013 10:00:36 +0000 (12:00 +0200)]
ARM: shmobile: sh73a0: add support for adjusting CPU frequency

On SH73A0 the output of PLL0 is supplied to two dividers, feeding clock to
the CPU core and SGX. Lower CPU frequencies allow the use of lower supply
voltages and thus reduce power consumption.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski+renesas@gmail.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
11 years agoARM: shmobile: r8a7790: add TPU PWM support
Laurent Pinchart [Wed, 24 Apr 2013 20:36:01 +0000 (22:36 +0200)]
ARM: shmobile: r8a7790: add TPU PWM support

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: Make private clock arrays static
Laurent Pinchart [Tue, 16 Apr 2013 15:16:20 +0000 (17:16 +0200)]
ARM: shmobile: 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: 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: 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: 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: shmobile: r8a7740: add TPU PWM support
Laurent Pinchart [Fri, 26 Oct 2012 13:38:47 +0000 (15:38 +0200)]
ARM: shmobile: r8a7740: add TPU PWM support

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Tested-by: Simon Horman <horms@verge.net.au>
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: r8a7740: Add interim sh-eth device name to clocks list
Bastian Hecht [Tue, 18 Dec 2012 17:22:38 +0000 (17:22 +0000)]
ARM: shmobile: 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 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 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: sh73a0: Use DEFINE_RES_MEM*() everywhere
Simon Horman [Tue, 23 Apr 2013 02:27:15 +0000 (02:27 +0000)]
ARM: shmobile: sh73a0: Use DEFINE_RES_MEM*() everywhere

Convert code to use DEFINE_RES_MEM*() macros.
These macros were already used in this file,
this change makes their usage consistent throughout the file.

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]
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>