aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2013-06-11phy-rcar-usb: correct base addressSergei Shtylyov2-19/+11
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 <[email protected]> Acked-by: Kuninori Morimoto <[email protected]> Acked-by: Felipe Balbi <[email protected]> Signed-off-by: Simon Horman <[email protected]>
2013-06-11ARM: shmobile: r8a7779: remove USB PHY 2nd memory resourceSergei Shtylyov1-5/+0
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 <[email protected]> Acked-by: Kuninori Morimoto <[email protected]> Signed-off-by: Simon Horman <[email protected]>
2013-06-11phy-rcar-usb: remove EHCI internal buffer setupSergei Shtylyov1-24/+4
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 <[email protected]> Acked-by: Kuninori Morimoto <[email protected]> Acked-by: Felipe Balbi <[email protected]> Signed-off-by: Simon Horman <[email protected]>
2013-06-11ARM: shmobile: r8a7779: setup EHCI internal bufferSergei Shtylyov1-0/+16
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 <[email protected]> Acked-by: Kuninori Morimoto <[email protected]> Signed-off-by: Simon Horman <[email protected]>
2013-06-11ehci-platform: add pre_setup() method to platform dataSergei Shtylyov2-0/+10
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 <[email protected]> Signed-off-by: Sergei Shtylyov <[email protected]> Acked-by: Kuninori Morimoto <[email protected]> Acked-by: Alan Stern <[email protected]> Signed-off-by: Simon Horman <[email protected]>
2013-06-11ARM: shmobile: Marzen: move USB EHCI, OHCI, and PHY devices to R8A7779 codeSergei Shtylyov3-180/+184
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 <[email protected]> Acked-by: Kuninori Morimoto <[email protected]> [[email protected]: manually applied] Signed-off-by: Simon Horman <[email protected]>
2013-06-11Merge branches 'heads/pinmux' and 'heads/soc' into phy-rcar-usb-baseSimon Horman11-132/+924
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
2013-06-07ARM: shmobile: sh73a0: div4 clocks must check the kick bit before changing rateGuennadi Liakhovetski1-5/+19
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 <[email protected]> Signed-off-by: Simon Horman <[email protected]>
2013-06-07ARM: shmobile: sh73a0: do not overwrite all div4 clock operationsGuennadi Liakhovetski1-13/+15
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 <[email protected]> Signed-off-by: Simon Horman <[email protected]>
2013-06-07ARM: shmobile: sh73a0: Always use shmobile_setup_delay()Magnus Damm1-5/+6
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 <[email protected]> Signed-off-by: Simon Horman <[email protected]>
2013-06-07ARM: shmobile: sh73a0: add CPUFreq supportGuennadi Liakhovetski2-0/+7
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 <[email protected]> Signed-off-by: Simon Horman <[email protected]>
2013-06-07ARM: shmobile: sh73a0: add support for adjusting CPU frequencyGuennadi Liakhovetski1-2/+93
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 <[email protected]> Signed-off-by: Simon Horman <[email protected]>
2013-06-07ARM: shmobile: r8a7790: add TPU PWM supportLaurent Pinchart1-2/+9
Signed-off-by: Laurent Pinchart <[email protected]> Signed-off-by: Simon Horman <[email protected]>
2013-06-07ARM: shmobile: r8a7790: Make private clock arrays staticLaurent Pinchart1-1/+1
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 <[email protected]> Signed-off-by: Simon Horman <[email protected]>
2013-06-07ARM: shmobile: r8a7790: add div6 clocksKuninori Morimoto1-0/+34
DIV6 clocks control SD*/MMC* core clocks. Signed-off-by: Kuninori Morimoto <[email protected]> Signed-off-by: Simon Horman <[email protected]>
2013-06-07ARM: shmobile: r8a7790: add div4 clocksKuninori Morimoto1-0/+32
DIV4 clocks control SD* core clocks. Signed-off-by: Kuninori Morimoto <[email protected]> Signed-off-by: Simon Horman <[email protected]>
2013-06-07ARM: shmobile: r8a7790: add main clockKuninori Morimoto1-5/+156
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 <[email protected]> Signed-off-by: Simon Horman <[email protected]>
2013-06-07ARM: shmobile: r8a7778: Register SDHI deviceKuninori Morimoto2-0/+26
This patch adds SDHI register function which needs id number (= 0/1/2) Signed-off-by: Kuninori Morimoto <[email protected]> Signed-off-by: Simon Horman <[email protected]>
2013-06-07ARM: shmobile: r8a7778: add SDHI clock supportKuninori Morimoto1-0/+7
Signed-off-by: Kuninori Morimoto <[email protected]> Signed-off-by: Simon Horman <[email protected]>
2013-06-07ARM: shmobile: r8a7778: use fixed ratio clockKuninori Morimoto1-13/+136
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 <[email protected]> Signed-off-by: Simon Horman <[email protected]>
2013-06-07ARM: shmobile: r8a7779: Add PCIe clocksPhil Edworthy1-1/+3
Signed-off-by: Phil Edworthy <[email protected]> Signed-off-by: Simon Horman <[email protected]>
2013-06-07ARM: shmobile: r8a73a4: add div6 clocksKuninori Morimoto1-19/+163
DIV6 clocks control each core clocks. Signed-off-by: Kuninori Morimoto <[email protected]> Signed-off-by: Simon Horman <[email protected]>
2013-06-07ARM: shmobile: r8a73a4: add div4 clocksKuninori Morimoto1-0/+45
DIV4 clocks control each core clocks. Signed-off-by: Kuninori Morimoto <[email protected]> Signed-off-by: Simon Horman <[email protected]>
2013-06-07ARM: shmobile: r8a73a4: add pll clocksKuninori Morimoto1-0/+101
PLL clocks are basis clock for other clock. Signed-off-by: Kuninori Morimoto <[email protected]> Signed-off-by: Simon Horman <[email protected]>
2013-06-07ARM: shmobile: r8a73a4: add main clockKuninori Morimoto1-0/+53
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 <[email protected]> Signed-off-by: Simon Horman <[email protected]>
2013-06-07ARM: shmobile: r8a7740: add TPU PWM supportLaurent Pinchart1-1/+3
Signed-off-by: Laurent Pinchart <[email protected]> Tested-by: Simon Horman <[email protected]> Signed-off-by: Simon Horman <[email protected]>
2013-06-07ARM: shmobile: r8a7740: Add I2C DT clock namesBastian Hecht1-0/+2
Add clock association for i2c0 and i2c1 for the new DT names. Signed-off-by: Bastian Hecht <[email protected]> Signed-off-by: Simon Horman <[email protected]>
2013-06-07ARM: shmobile: r8a7740: Add interim sh-eth device name to clocks listBastian Hecht1-0/+1
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 <[email protected]> Signed-off-by: Simon Horman <[email protected]>
2013-06-07ARM: shmobile: r8a7778: fixup Ether setup code positionKuninori Morimoto1-14/+14
Ether setup code position was scattering. This patch fixes it up Signed-off-by: Kuninori Morimoto <[email protected]> Signed-off-by: Simon Horman <[email protected]>
2013-06-07ARM: shmobile: use do{ }while() on SH_CLK_SET_RATIO()Kuninori Morimoto1-2/+2
SH_CLK_SET_RATIO() will be trouble without this patch Signed-off-by: Kuninori Morimoto <[email protected]> Signed-off-by: Simon Horman <[email protected]>
2013-06-07ARM: shmobile: remove ";" from SH_FIXED_RATIO_CLK*() macroKuninori Morimoto1-2/+2
Acked-by: Sergei Shtylyov <[email protected]> Signed-off-by: Kuninori Morimoto <[email protected]> Signed-off-by: Simon Horman <[email protected]>
2013-06-06ARM: shmobile: sh73a0: Use DEFINE_RES_MEM*() everywhereSimon Horman1-66/+13
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 <[email protected]>
2013-06-06ARM: shmobile: r8a7778: correct model name in KconfigSergei Shtylyov1-1/+1
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 <[email protected]> Acked-by: Kuninori Morimoto <[email protected]> [[email protected]: manually applied] Signed-off-by: Simon Horman <[email protected]>
2013-06-06ARM: shmobile: r8a7740: Make private clock arrays staticLaurent Pinchart1-2/+2
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 <[email protected]> Signed-off-by: Simon Horman <[email protected]>
2013-06-05ARM: shmobile: marzen: Use RCAR_GP_PIN macroLaurent Pinchart1-3/+4
Replace hardcoded pin numbers with the RCAR_GP_PIN macro to make the code match the documentation. Signed-off-by: Laurent Pinchart <[email protected]> Signed-off-by: Simon Horman <[email protected]>
2013-06-05ARM: shmobile: lager: Initialize pinmuxLaurent Pinchart1-0/+15
Initialize r8a7790 pinmuxing and register mappings for the two debug serial ports. Signed-off-by: Laurent Pinchart <[email protected]> Signed-off-by: Simon Horman <[email protected]>
2013-06-05ARM: shmobile: bockw: add pinctrl supportKuninori Morimoto1-0/+13
SCIF0 support as 1st step Acked-by: Laurent Pinchart <[email protected]> Signed-off-by: Kuninori Morimoto <[email protected]> Signed-off-by: Simon Horman <[email protected]>
2013-06-05ARM: shmobile: kzm9g: tidyup FSI pinctrlKuninori Morimoto1-4/+4
sh73a0 needs "sh_fsi2", not "sh_fsi2.0" Tested-by: Hiep Cao Minh <[email protected]> Acked-by: Laurent Pinchart <[email protected]> Signed-off-by: Kuninori Morimoto <[email protected]> Signed-off-by: Simon Horman <[email protected]>
2013-06-05ARM: shmobile: r8a7740 pinmux platform device cleanupMagnus Damm1-19/+5
Use DEFINE_RES_MEM() and platform_device_register_simple() to save a couple of lines of code. Signed-off-by: Magnus Damm <[email protected]> Acked-by: Laurent Pinchart <[email protected]> Signed-off-by: Simon Horman <[email protected]>
2013-06-05ARM: shmobile: r8a7790: Configure R-Car GPIO for IRQ_TYPE_EDGE_BOTHSimon Horman1-0/+1
"gpio-rcar: Support IRQ_TYPE_EDGE_BOTH" adds support to the R-Car GPIO driver for IRQ_TYPE_EDGE_BOTH. As hardware support for this feature is not universal for all SoCs a flag, has_both_edge_trigger, has been added to the platform data of the driver to allow this feature to be enabled. As the r8a7790 SoC hardware supports this feature enable it. Signed-off-by: Simon Horman <[email protected]>
2013-06-05pinctrl: sh-pfc: r8a7779: Fix missing MOD_SEL2 entryPhil Edworthy1-1/+1
The list of functions selected by the MOD_SEL2 register was missing an entry. This caused all entries after this to modify the MOD_SEL2 register incorrectly. This bug showed up when selecting i2c2_c pins on the Renesas Hurricane board. This bug has been present since pinmux support was added for the r8a7779 SoC by 881023d28b465eb457067dc8bbca0f24d8b34279 ("sh-pfc: Add r8a7779 pinmux support") in v3.8-rc4. Signed-off-by: Phil Edworthy <[email protected]> Signed-off-by: Simon Horman <[email protected]>
2013-06-05Revert "ARM: shmobile: Disallow PINCTRL without GPIOLIB"Laurent Pinchart1-1/+1
GPIOLIB dependency handling was added to the PINCTRL core by commit 2afe8229687ec24cbc07e78449a588bb8b68f858 Author: Haojian Zhuang <[email protected]> Date: Thu Mar 28 07:34:19 2013 +0800 pinctrl: core: add dependence of GPIOLIB There is not need to handle that dependency at the SH Mobile level anymore. Revert commit 6722f6cb763203cab775297b6e9d00834af0d6d7 Author: Magnus Damm <[email protected]> Date: Mon Mar 18 22:58:18 2013 +0900 ARM: shmobile: Disallow PINCTRL without GPIOLIB Modify mach-shmobile to only select PINCTRL in case of ARCH_WANT_OPTIONAL_GPIOLIB is set. This fixes a build error triggered when adding a new SoC lacking GPIO software support (ARCH_WANT_OPTIONAL_GPIOLIB=n): Signed-off-by: Laurent Pinchart <[email protected]> Signed-off-by: Simon Horman <[email protected]>
2013-06-05pinctrl: r8a7790: add pinmux data for MMCIF and SDHI interfacesGuennadi Liakhovetski1-0/+294
This patch adds pinmux groups and functions for the two MMCIF and four SDHI interfaces on r8a73a4 (APE6). Signed-off-by: Guennadi Liakhovetski <[email protected]> Signed-off-by: Simon Horman <[email protected]>
2013-06-05sh-pfc: r8a7778: add MMCIF pin groupsKuninori Morimoto1-0/+38
Add MMCIF CLK/CMD/DATA groups to R8A7778 PFC driver. Signed-off-by: Kuninori Morimoto <[email protected]> Signed-off-by: Simon Horman <[email protected]>
2013-06-05sh-pfc: r8a7778: add HSPI pin groupsKuninori Morimoto1-0/+61
Add HSPI CLK/CS/RX/TX pin groups to R8A7778 PFC driver. Signed-off-by: Kuninori Morimoto <[email protected]> Signed-off-by: Simon Horman <[email protected]>
2013-06-05sh-pfc: r8a7778: add I2C pin groupsKuninori Morimoto1-0/+54
Add I2C SDA/SCL pin groups to R8A7778 PFC driver. Signed-off-by: Kuninori Morimoto <[email protected]> Signed-off-by: Simon Horman <[email protected]>
2013-06-05pinctrl: sh-pfc: fix a typo in pfc-r8a7790Guennadi Liakhovetski1-9/+9
Fix multiple occurrences of the "RESEVED" typo. Signed-off-by: Guennadi Liakhovetski <[email protected]> Acked-by: Laurent Pinchart <[email protected]> Acked-by: Linus Walleij <[email protected]> Signed-off-by: Simon Horman <[email protected]>
2013-06-05pinctrl: sh-pfc: fix r8a7790 Function Select register tablesGuennadi Liakhovetski1-8/+6
Fix several errors in Peripheral Function Select register tables for r8a7790, which prevent various function pins from being correctly configured. Signed-off-by: Guennadi Liakhovetski <[email protected]> Acked-by: Laurent Pinchart <[email protected]> Acked-by: Linus Walleij <[email protected]> Signed-off-by: Simon Horman <[email protected]>
2013-06-05sh-pfc: r8a7778: fixup IRQ1A settingsKuninori Morimoto1-1/+1
IP2[31] func2 is IRQ1A, not IRQ3A Reported-by: Yusuke Goda <[email protected]> Signed-off-by: Kuninori Morimoto <[email protected]> Signed-off-by: Simon Horman <[email protected]>
2013-06-05sh-pfc: r8a7779: add Ether pin groupsSergei Shtylyov1-0/+42
Add Ether RMII/LINK/MAGIC pin groups to R8A7779 PFC driver. Signed-off-by: Sergei Shtylyov <[email protected]> Acked-by: Laurent Pinchart<[email protected]> Acked-by: Linus Walleij <[email protected]> Signed-off-by: Simon Horman <[email protected]>