Laurent Pinchart [Wed, 11 Dec 2013 14:13:57 +0000 (15:13 +0100)]
ARM: shmobile: Remove non-multiplatform Koelsch reference support
Now that r8a7791 has CCF support remove the legacy Koelsch reference
Kconfig bits CONFIG_MACH_KOELSCH_REFERENCE for the non-multiplatform
case.
Starting from this commit Koelsch board support is always enabled via
CONFIG_MACH_KOELSCH, and CONFIG_ARCH_MULTIPLATFORM is used to select
between board-koelsch.c and board-koelsch-reference.c
The file board-koelsch-reference.c can no longer be used together with
the legacy sh-clk clock framework, instead CCF is used.
Laurent Pinchart [Wed, 11 Dec 2013 14:13:56 +0000 (15:13 +0100)]
ARM: shmobile: Remove non-multiplatform Lager reference support
Now that r8a7790 has CCF support remove the legacy Lager reference
Kconfig bits CONFIG_MACH_LAGER_REFERENCE for the non-multiplatform
case.
Starting from this commit Lager board support is always enabled via
CONFIG_MACH_LAGER, and CONFIG_ARCH_MULTIPLATFORM is used to select
between board-lager.c and board-lager-reference.c
The file board-lager-reference.c can no longer be used together with
the legacy sh-clk clock framework, instead CCF is used.
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Laurent Pinchart [Wed, 11 Dec 2013 14:13:55 +0000 (15:13 +0100)]
ARM: shmobile: koelsch-reference: Instantiate clkdevs for SCIF and CMT
Now that the common clock framework is supported, the clock lookup
entries in clock-r8a7791.c are not registered anymore. Devices must
instead reference their clocks in the device tree. However, SCIF and CMT
devices are still instantiated through platform code, and thus need a
clock lookup entry.
Retrieve the SCIF and CMT clock entries by name and register clkdevs for
the corresponding devices. This will be removed when the SCIF and CMT
devices will be instantiated from the device tree.
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Laurent Pinchart [Wed, 11 Dec 2013 14:13:54 +0000 (15:13 +0100)]
ARM: shmobile: lager-reference: Instantiate clkdevs for SCIF and CMT
Now that the common clock framework is supported, the clock lookup
entries in clock-r8a7790.c are not registered anymore. Devices must
instead reference their clocks in the device tree. However, SCIF and CMT
devices are still instantiated through platform code, and thus need a
clock lookup entry.
Retrieve the SCIF and CMT clock entries by name and register clkdevs for
the corresponding devices. This will be removed when the SCIF and CMT
devices will be instantiated from the device tree.
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Laurent Pinchart [Wed, 11 Dec 2013 14:13:52 +0000 (15:13 +0100)]
ARM: shmobile: lager-reference: Enable multiplaform kernel support
Enable multiplaform ARM architecture support for the Lager reference
board. Common clock framework initialization will be handled by the
rcar_gen2_init_timer() call, we just need to remove the legacy clock
code initialization.
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Laurent Pinchart [Wed, 11 Dec 2013 02:48:16 +0000 (03:48 +0100)]
ARM: shmobile: armadillo: Set backlight enable GPIO
The Armadillo 800 EVA panel module has a backlight enable signal
connected to GPIO 61. Instead of requesting the GPIO in board code and
setting it to a high level unconditionally, pass the GPIO number to the
PWM backlight driver as the backlight enable GPIO.
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
The koelsch board uses has an SH ethernet controller which uses a Micrel
phy. Select MICREL_PHY for koelsch if SH_ETH is enabled to make use of the
Micrel-specific phy driver rather than relying on the generic phy driver.
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Laurent Pinchart [Wed, 11 Dec 2013 14:13:51 +0000 (15:13 +0100)]
ARM: shmobile: rcar-gen2: Initialize CCF before clock sources
When CONFIG_COMMON_CLOCK is enabled, call rcar_gen2_clocks_init() in the
timer init function to initialize the common clock framework before
initializing the clock sources. This will take care of clock
initialization when the r8a779[01] boards will be switched to
multiplatform kernels.
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Ben Dooks [Thu, 12 Dec 2013 18:14:21 +0000 (18:14 +0000)]
ARM: shmobile: Add select MIGHT_HAVE_PCI for PCI-AHB bridge code
The PCI sub-system is not enabled by default on ARM and on certain
Renesas devices the build does not select it. This means that there
are configurations that do not allow the AHB-PCI bridge used for the
USB sub-systems to be built.
For the R8A7790, R8A7791 and EMEV-2 select MIGHT_HAVE_PCI to allow the
PCI drivers to be built. Also select MIGHT_HAVE_PCI for the multi-config
where there may be many Reneasas devices selected.
Reviewed-by: Ian Molton <ian.molton@codethink.co.uk> Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Ben Dooks [Wed, 11 Dec 2013 10:07:42 +0000 (10:07 +0000)]
ARM: rcar-gen2: Do not setup timer in non-secure mode
If the system has been started in non-secure mode, then the ARM generic
timer is not configurable during the kernel initialisation. Currently
the only thing we can check for is if the timer has been correctly
configured during the boot process.
Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk> Reviewed-by: Ian Molton <ian.molton@codethink.co.uk> Acked-by: Magnus Damm <damm@opensource.se> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
ARM: shmobile: lager: add gpio/fixed regulator for SDHI
Fixed regulator is used for SDHI0/2 Vcc.
We should use da9063 driver for Vccq,
but, it doesn't have regulator support at this point.
This patch uses gpio-regulator for it as quick-hack.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Acked-by: Mark Brown <broonie@linaro.org> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Laurent Pinchart [Thu, 28 Nov 2013 16:27:29 +0000 (17:27 +0100)]
ARM: Kconfig: Mention Renesas ARM SoCs instead of SH-Mobile
Only the SH-Mobile product name is mentioned in the Kconfig descriptions
and help texts. This makes it difficult for external engineers working
on other Renesas platforms to find upstream platform support as the
combination of the SH-Mobile name and using the product number proved an
effective method of concealment.
Replace the "SH-Mobile" name with "Renesas ARM SoCs" in all the related
descriptions, help texts and comments.
Reported-by: Phil Edworthy <phil.edworthy@renesas.com> Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Laurent Pinchart [Thu, 28 Nov 2013 15:17:58 +0000 (16:17 +0100)]
ARM: shmobile: mackerel: Use pinconf API to configure pin pull-down
The USB0 and USB1 VBUS pins must be pulled down. Add corresponding
configuration entries in the pinctrl map table instead of manually
poking the pin control registers.
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Paul Walmsley [Wed, 27 Nov 2013 00:49:38 +0000 (16:49 -0800)]
ARM: shmobile: mackerel: clk_round_rate() can return a zero to indicate an error
Treat both negative and zero return values from clk_round_rate() as
errors. This is needed since subsequent patches will convert
clk_round_rate()'s return value to be an unsigned type, rather than a
signed type, since some clock sources can generate rates higher than
(2^31)-1 Hz.
Eventually, when calling clk_round_rate(), only a return value of zero
will be considered a error. All other values will be considered valid
rates. The comparison against values less than 0 is kept to preserve
the correct behavior in the meantime.
Signed-off-by: Paul Walmsley <pwalmsley@nvidia.com> Acked-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Magnus Damm [Wed, 20 Nov 2013 07:41:48 +0000 (16:41 +0900)]
ARM: shmobile: Add pinctrl_register_mappings() for Koelsch
Add code to setup the r8a7791 PFC for the Koelsch board.
At this point serial consoles are added, and in the near
future other platform-device-only devices will be added
here like for instance the r8a7791 DU.
Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Magnus Damm [Wed, 20 Nov 2013 00:02:31 +0000 (09:02 +0900)]
ARM: shmobile: Use ->init_late() on Lager
Hook in shmobile_init_late() on Lager V2. This enables some PM
related things like CPUIdle and Suspend-to-RAM.
With this patch applied it is possible to use Suspend-to-RAM:
# echo enabled > /sys/class/tty/ttySC6/power/wakeup
# echo mem > /sys/power/state
(wake by sending a character on the serial console)
Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Magnus Damm [Wed, 20 Nov 2013 03:54:34 +0000 (12:54 +0900)]
ARM: shmobile: Use ->init_late() on Koelsch
Hook in shmobile_init_late() on Koelsch. This enables some PM
related things like CPUIdle and Suspend-to-RAM.
With this patch applied it is possible to use Suspend-to-RAM:
# echo enabled > /sys/class/tty/ttySC6/power/wakeup
# echo mem > /sys/power/state
(wake by sending a character on the serial console)
Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Magnus Damm [Wed, 6 Nov 2013 10:40:01 +0000 (19:40 +0900)]
ARM: shmobile: Initial r8a7791 and Koelsch multiplatform support
Add Koelsch and r8a7791 to CONFIG_SHMOBILE_MULTI. At this
point CCF is not yet supported so you cannot run this code
yet. For CCF support to happen several different components
are needed, and this is one simple portion that moves us
forward. Other patches need to build on top of this one.
Koelsch board support exists in 3 flavors:
1) SHMOBILE_MULTI, MACH_KOELSCH - board-koelsch-reference.c (CCF + DT)
2) SHMOBILE, MACH_KOELSCH_REFERENCE - board-koelsch-reference.c (DT)
3) SHMOBILE, MACH_KOELSCH - board-koelsch.c (legacy C code)
When CCF is done then 2) will be removed. When 1) includes same features
as 3) then 3) will be removed.
Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
When regulators are used with MMC devices, sh_mmcif_plat_data::ocr
is not needed, they can be removed from platform data.
This patch adds v3.3 regulator settings,
and moved fixed-dummy regulator registration position
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Simon Horman [Tue, 10 Dec 2013 08:22:55 +0000 (17:22 +0900)]
Merge tag 'renesas-cleanup-for-v3.14' into boards-base
Renesas ARM based SoC cleanups for v3.14
* Tidy up clock table order for r7s72100, r8a7779, r8a7779, r8a7790,
sh7372 and sh73a0 SoCs.
* Tidy up camera-rcar header for r8a7779 SoC
* Tidy up registration of VIN on r8a7779 SoC
* Tidy up PFC registration on r8a7790 SoC
* Correct typo in clocks for r8a7790 SoC
* Don't use named resources for IPMMU, I2C and TMU on sh73a0 SoC
* Don't use named resources for MMCIF and SDHI on ape6evm board
* Don't use named resources for MMCIF on lager board
* Tidy up device registration on lager board
* Tidy up headers for bockw board
Simon Horman [Tue, 10 Dec 2013 07:43:16 +0000 (16:43 +0900)]
ARM: shmobile: Select AUTO_ZRELADDR for EMEV2
Since ("ARM: shmobile: Remove legacy KZM9D board code")
It is now necessary for AUTO_ZRELADDR to be selected
in order for the kernel to build with kzm9d_defconfig.
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
SuperH lookups clock is using CLKDEV_CON/DEV/ICK_ID() macro
for a long term.
But in these days, the ICK clock is defined in random place.
This patch arranges it.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
SH-Mobile platforms are transitioning from non-multiplatform to
multiplatform kernel. A new ARCH_SHMOBILE_MULTI configuration symbol has
been created to group all multiplatform-enabled SH-Mobile SoCs. The
existing ARCH_SHMOBILE configuration symbol groups SoCs that haven't
been converted yet.
This arrangement works fine for the arch/ code, but lots of drivers
needed on both ARCH_SHMOBILE and ARCH_SHMOBILE_MULTI depend on
ARCH_SHMOBILE only. In order to avoid changing them, rename
ARCH_SHMOBILE to ARCH_SHMOBILE_LEGACY, and create a new boolean
ARCH_SHMOBILE configuration symbol that is selected by both
ARCH_SHMOBILE_LEGACY and ARCH_SHMOBILE_MULTI.
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Acked-by: Magnus Damm <damm@opensource.se> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
10e8d4f6dddb0f9dc408c2f2bde8399b243a42ca
(ARM: mach-shmobile: r8a7779: Minimal setup using DT)
added I2C driver for DT, but it didn't add clock.
This patch adds missing clock for I2C
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
SuperH lookups clock is using CLKDEV_CON/DEV/ICK_ID() macro
for a long term.
But in these days, the ICK clock is defined in random place.
This patch arranges it.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
SuperH lookups clock is using CLKDEV_CON/DEV/ICK_ID() macro
for a long term.
But in these days, the ICK clock is defined in random place.
This patch arranges it.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
SuperH lookups clock is using CLKDEV_CON/DEV/ICK_ID() macro
for a long term.
But in these days, the ICK clock is defined in random place.
This patch arranges it.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
ARM: shmobile: r8a7779: cleanup registration of sh_eth
sh_eth driver which needs platform data at the time of
registration is not used.
Now, ARM/shmobile aims to support DT,
and the C code base board support will be removed
if DT support is completed.
Current driver registration method which needs platform data
and which is not shared complicates codes.
This means legacy C code cleanup after DT supporting
will be more complicated
This patch removes r8a7779_add_ether_device()
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
ARM: shmobile: r8a7779: cleanup registration of VIN
VIN driver which needs platform data at the time of
registration is used from Marzen only.
Now, ARM/shmobile aims to support DT,
and the C code base board support will be removed
if DT support is completed.
Current driver registration method which needs platform data
and which is not shared complicates codes.
This means legacy C code cleanup after DT supporting
will be more complicated
This patch registers it on board code as cleanup C code
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Acked-by: Magnus Damm <damm@opensource.se> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>