summaryrefslogtreecommitdiff
path: root/arch/arm/mach-shmobile/clock-sh73a0.c
AgeCommit message (Collapse)Author
2013-06-07ARM: shmobile: sh73a0: div4 clocks must check the kick bit before changing rateGuennadi Liakhovetski
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>
2013-06-07ARM: shmobile: sh73a0: do not overwrite all div4 clock operationsGuennadi Liakhovetski
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>
2013-06-07ARM: shmobile: sh73a0: add support for adjusting CPU frequencyGuennadi Liakhovetski
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>
2013-04-02ARM: shmobile: sh73a0: use fixed ratio clockKuninori Morimoto
Current clock-sh73a0 is using own implement for each divX clocks. This patch switches to use fixed ratio clock, and was tesed on kzm9g board. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Acked-by: Magnus Damm <damm@opensource.se> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-04-02ARM: shmobile: sh73a0: remove DIV4_ZT* clocksKuninori Morimoto
DIV4_ZT* clocks are for debugging and trace bus clock. It is not necessary to control it from Linux/Software. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Acked-by: Magnus Damm <damm@opensource.se> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-04-02ARM: shmobile: sh73a0: add a TWD clockGuennadi Liakhovetski
Add a TWD clock on sh73a0 for the smp_twd driver to properly update the clock's frequency upon cpufreq events. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-04-02ARM: shmobile: sh73a0: wait for completion when kicking the clockGuennadi Liakhovetski
To reconfigure clocks, controlled by FRQCRA and FRQCRB, a kick bit has to be set and to make sure the setting has taken effect, it has to be read back repeatedly until it is cleared by the hardware. This patch adds the waiting part, that was missing until now. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Acked-by: Magnus Damm <damm@opensource.se Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-03-12ARM: shmobile: sh73a0: fix Z and ZG clock hierarchyGuennadi Liakhovetski
Z and ZG clocks on sh73a0 have pll0 as their parent, not pll1. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-03-12ARM: shmobile: add MMCIF and SDHI DT clock aliases to sh73a0 and r8a7740Guennadi Liakhovetski
Add clock lookup entries for SDHI and MMCIF device names, for the FDT case. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Linus Walleij <linus.walleij@linaro.org> [horms+renesas@verge.net.au: resolved trivial conflict in clock-r8a7740.c] Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-01-25ARM: mach-shmobile: sh73a0: Initialise MMCIF using DTSimon Horman
This device also requires a voltage regulator which should be defined in a board-specific maner. An example dts snipped follows. / { fixedregulator1v8: fixedregulator@0 { compatible = "regulator-fixed"; regulator-name = "fixed-1.8V"; regulator-min-microvolt = <1800000>; regulator-max-microvolt = <1800000>; }; }; &mmcif { vmmc-supply = <&fixedregulator1v8>; vqmmc-supply = <&fixedregulator1v8>; }; Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-01-25ARM: mach-shmobile: sh73a0: Minimal setup using DTSimon Horman
Allow a minimal setup of the sh73a0 SoC using a flattened device tree. In particular, Configure the i2c controllers using a flattened device tree. SCI serial controller and CMT clock source, whose drivers do not yet support configuration using a flattened device tree, are still configured using C code in order to allow booting of a board with this SoC. *** Please note that the clock initialisation scheme used in this patch does not currently work with SMP as there is a yet to be resolved lock-up in workqueue initialisation. CONFIG_SMP must be disabled when using this code. *** Includes update from Thierry Reding to no longer use gic_handle_irq() Cc: Thierry Reding <thierry.reding@avionic-design.de> Signed-off-by: Simon Horman <horms+renesas@verge.net.au> fix
2013-01-25ARM: shmobile: sh73a0: fixup div4_clks bitmapKuninori Morimoto
div4_clks's bitmap of sh73a0 was wrong. This patch is based on v2.0 datasheet. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2012-09-18ARM: shmobile: use __iomem pointers for MMIOArnd Bergmann
ARM is moving to stricter checks on readl/write functions, so we need to use the correct types everywhere. This patch is a bit ugly for shmobile, which is the only platform that just uses integer literals all over the place, but I can't see a better way to do this. Acked-by: Simon Horman <horms@verge.net.au> Cc: Magnus Damm <magnus.damm@gmail.com> Cc: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Cc: Paul Mundt <lethal@linux-sh.org> Cc: linux-sh@vger.kernel.org Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2012-07-11Merge branch 'renesas-sh73a0' into renesas-socRafael J. Wysocki
* renesas-sh73a0: ARM: shmobile: use common DMAEngine definitions on sh73a0 ARM: shmobile: sh73a0: add DMAEngine support for MPDMAC ARM: shmobile: sh73a0: add USB clock support
2012-07-11Merge branch 'renesas-soc-core' into renesas-socRafael J. Wysocki
* renesas-soc-core: ARM: shmobile: soc-core: add R-mobile PM domain common APIs ARM: mach-shmobile: Convert sh_clk_mstp32_register to sh_clk_mstp_register ARM: shmobile: add common DMAEngine definitions ARM: shmobile: add common extra gpio functions Conflicts: arch/arm/mach-shmobile/clock-r8a7740.c
2012-07-02ARM: mach-shmobile: Convert sh_clk_mstp32_register to sh_clk_mstp_registerNobuhiro Iwamatsu
sh_clk_mstp32_register is deprecated. This convert to sh_clk_mstp_register. Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com> Acked-by: Magnus Damm <damm@opensource.se> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
2012-06-30ARM: shmobile: sh73a0: add DMAEngine support for MPDMACKuninori Morimoto
Current shdmac can support MPDMAC (= sound DMA) on sh73a0. This support reduce CPU load when sound was playback. On v2.0 manual, MPDMAC MID/RID number were wrong. This patch is using the number which seems correct. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Acked-by: Magnus Damm <damm@opensource.se> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
2012-06-30ARM: shmobile: sh73a0: add USB clock supportKuninori Morimoto
It is required from renesas_usbhs driver. This patch is based on v2.0 manual. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Acked-by: Magnus Damm <damm@opensource.se> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
2012-06-20ARM: shmobile: sh73a0: add FSI clockKuninori Morimoto
This patch is required from FSI sound driver Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Tested-by: Simon Horman <horms@verge.net.au> Acked-by: Magnus Damm <damm@opensource.se> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
2012-06-20ARM: shmobile: sh73a0: bugfix: SY-DMAC numberKuninori Morimoto
681e1b3eeb3606e06a7c4984e8058df84296f8bb (ARM: mach-shmobile: sh73a0 DMA Engine support for SY-DMAC) adds SY-DMAC, but it is 218, not 318 This patch is based on v2.0 manual Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Acked-by: Magnus Damm <damm@opensource.se> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
2012-03-12ARM: mach-shmobile: rename clk_init() to shmobile_clk_init()Magnus Damm
Rename clk_init() to shmobile_clk_init() to avoid a potential future name space collision with the common clock framework. Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
2012-03-12ARM: mach-shmobile: sh73a0 sh_clk_ops renameMagnus Damm
Convert sh73a0 to use sh_clk_ops. Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
2012-01-24ARM: mach-shmobile: clock-sh73a0: add DSIxPHY clock supportKuninori Morimoto
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2012-01-14Merge branch 'fbdev-next' of git://github.com/schandinat/linux-2.6Linus Torvalds
* 'fbdev-next' of git://github.com/schandinat/linux-2.6: (175 commits) module_param: make bool parameters really bool (drivers/video/i810) Revert "atmel_lcdfb: Adjust HFP calculation so it matches the manual." OMAPDSS: HDMI: Disable DDC internal pull up OMAPDSS: HDMI: Move duplicate code from boardfile OMAPDSS: add OrtusTech COM43H4M10XTC display support OMAP: DSS2: Support for UMSH-8173MD TFT panel ASoC: OMAP: HDMI: Move HDMI codec trigger function to generic HDMI driver OMAPDSS: HDMI: Create function to enable HDMI audio ASoC: OMAP: HDMI: Correct signature of ASoC functions ASoC: OMAP: HDMI: Introduce driver data for audio codec grvga: fix section mismatch warnings video: s3c-fb: Don't keep device runtime active when open video: s3c-fb: Hold runtime PM references when touching registers video: s3c-fb: Take a runtime PM reference when unblanked video: s3c-fb: Disable runtime PM in error paths from probe video: s3c-fb: Use s3c_fb_enable() to enable the framebuffer video: s3c-fb: Make runtime PM functional again drivers/video: fsl-diu-fb: merge fsl_diu_alloc() into map_video_memory() drivers/video: fsl-diu-fb: add default platform ops functions drivers/video: fsl-diu-fb: remove broken reference count enabling the display ...
2012-01-09Merge branch 'master' of ↵Paul Mundt
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux into sh-latest Conflicts: arch/arm/mach-shmobile/clock-sh73a0.c Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-12-06sh: clkfwk: clock-sh73a0: all div6_clks use SH_CLK_DIV6_EXT()Kuninori Morimoto
Current div6 clocks can specify their current parent clocks from its register value if it is registered by sh_clk_div6_reparent_register(). This patch modifies all div6 clocks into SH_CLK_DIV6_EXT(). Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-11-24Merge branches 'rmobile/core', 'rmobile/kota2' and 'rmobile/ag5' into ↵Paul Mundt
rmobile-fixes-for-linus
2011-11-24ARM: mach-shmobile: SH73A0 external Ethernet fixMagnus Damm
Keep the ZB clock enabled on sh73a0 to allow the BSC to access external peripherals hooked up to CS signals. This is needed to unbreak Ethernet support on sh73a0 boards such as AG5EVM and Kota2 together with the following patch: 794d78f drivers: sh: late disabling of clocks V2 Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-11-24ARM: mach-shmobile: Kota2 TPU LED platform dataMagnus Damm
This patch updates the Kota2 board support code to use the recently merged TPU LED driver whenever possible. The sh73a0 SoC has 5 TPU hardware blocks each with 4 timer channels which in theory allows a total of 20 LEDs to be controlled by "leds-renesas-tpu" driver instances. The Kota2 board has 4 LEDs connected to GPIO pins that also come with TPU pin functions, so this patch ties up these 4 LEDS and leaves the remaining 3 LEDS for the GPIO based LED driver. Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-11-21fbdev: sh_mipi_dsi: tidyup dsip_clkKuninori Morimoto
dsipck clock is controled by CLKDEV_ICK_ID() in clock-shxxx. dsi0p_clk/dsi1p_clk naming is not needed. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Acked-by: Magnus Damm <damm@opensource.se> Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
2011-08-29ARM: mach-shmobile: clock-sh73a0: tidyup CKSCR main clock selecterKuninori Morimoto
MAINCKSEL is [29:28], not [27:24] Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-07-11sh: move CLKDEV_xxx_ID macro to sh_clk.hKuninori Morimoto
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-05-25ARM: mach-shmobile: sh73a0 DMA Engine support for SY-DMACMagnus Damm
Add SY-DMAC support via shdma.c to the sh73a0 SoC including slave ids, platform data and clock bindings. Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-05-24ARM: mach-shmobile: Add SDHI support for AG5EVM and sh73a0Magnus Damm
Add SDHI0 and SDHI1 support to the AG5EVM board including platform data, pinmux configuration and clock bindings. Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-02-01ARM: mach-shmobile: Add sh73a0 MIPI-CSI and CEU clocksMagnus Damm
Update the sh73a0 CPGA to support clocks for CEU and MIPI-CSI. This includes MSTP bits for CSI and CEU and div6 clkdev bindings for VCK1-3. Fix the order of the MSTP32 entries in the clkdev table while at it. Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-01-20ARM: mach-shmobile: AG5EVM LCDC / MIPI-DSI platform dataMagnus Damm
Add platform data for MIPI-DSI and LCDC on the AG5EVM board. The sh73a0 clkdev bindings are also updated. Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-01-20ARM: mach-shmobile: sh73a0 CPGA fix for PLL CFG bitMagnus Damm
PLL1 and PLL2 in the sh73a0 CPGA has a CFG bit that must be taken into account to correctly calculate the frequency. Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-01-18ARM: mach-shmobile: sh73a0 CPGA fix for IrDA MSTPMagnus Damm
Fix a typo for the sh73a0 CPGA code dealing with the IrDA hardware block on the AG5EVM board. Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-01-18ARM: mach-shmobile: sh73a0 CPGA fix for FRQCRA M3Magnus Damm
Fix the M3 field offset for the FRQCRA register in the sh73a0 CPGA. It should be 12, not 8. Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-01-18ARM: mach-shmobile: ag5evm: Add IrDA supportKuninori Morimoto
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-01-07ARM: mach-shmobile: Fix up clkdev fallout for SH73A0.Paul Mundt
Use the new linux/clkdev.h to get it building again. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-01-05Merge branches 'rmobile/mmcif', 'rmobile/ag5' and 'rmobile/mackerel' into ↵Paul Mundt
rmobile-latest Conflicts: arch/arm/mach-shmobile/Kconfig Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-01-05ARM: mach-shmobile: sh73a0: fix div4 tableTakashi YOSHII
sh73a0 has divisor[12] setting as 1/7 on FRQCRA. Signed-off-by: Takashi YOSHII <takashi.yoshii.zj@renesas.com> Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-12-22ARM: mach-shmobile: Add eMMC support through MMCIF on AG5EVMTakashi YOSHII
Adding platform resources, PFC setting and release reset pin for eMMC on ag5evm. [damm@opensource.se: Add MSTP code for MMCIF] Signed-off-by: Takashi YOSHII <takashi.yoshii.zj@renesas.com> Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-12-22ARM: mach-shmobile: sh73a0 CPGA fix for KEYSCMagnus Damm
Fix the sh73a0 KEYSC clock control by adding MSTP403 to mstp_clks[]. Use KEYSC instead of KEYSC0 in comments. Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-12-22ARM: mach-shmobile: sh73a0 TMU supportMagnus Damm
Add support for 2 TMU timer channels on sh73a0. One timer channel is used for clocksource and the other is used for clockevents. All channels in the same TMU block share MSTP bit as usual. Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-12-03ARM: mach-shmobile: AG5 clock framework improvementsMagnus Damm
This patch improves the state of the AG5 clock framework support. The main clock parent is automatically detected, but most of the clocks are not used by any driver or subsystem at this point. More work is needed for support of multi media hardware such as FSI and/or LCDC/MIPI-DSI. Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-11-25ARM: mach-shmobile: clock-sh73a0: modify MSTP orderKuninori Morimoto
This patch permuted clock arrays in the order of MSTP Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-11-24ARM: mach-shmobile: sh73a0 i2c_shmobile support.Yoshii Takashi
Platform device resource/data definition for CPU, and clkdev entries Signed-off-by: Takashi YOSHII <takashi.yoshii.zj@renesas.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-11-24ARM: mach-shmobile: ag5evm: scan keyboard supportYoshii Takashi
This consists of platform device resources/data for the board, and simple clvdev entry for MSTP bit for keysc module. This support only 49 of 80 key-switches on the board. Signed-off-by: Takashi YOSHII <takashi.yoshii.zj@renesas.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>