aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-imx/clk-imx51-imx53.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2014-07-18ARM: i.MX: Use CLOCKSOURCE_OF_DECLARE() for DT targetsAlexander Shiyan1-7/+0
This patch uses clocksource_of_init() call for DT targets. Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
2014-07-18ARM: clk-imx51-imx53: Remove clk_register_clkdev()Fabio Estevam1-76/+0
mx51 and mx53 are device tree only platforms, so we no longer need all these calls to clk_register_clkdev(). Only keep cpu0 and gpc_dvfs clk_register_clkdev() calls. Tested on imx51-babbage and imx53-qsb boards. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
2014-07-18ARM: i.MX clk: Move clock check function in common locationAlexander Shiyan1-28/+9
This patch moves clock check function in common i.MX location and switch i.MX clk drivers to use this new function. Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
2014-07-18ARM: i.MX: Use of_clk_get_by_name() for timer clocks for DT case.Alexander Shiyan1-2/+0
Use of_clk_get_by_name() for timer clocks for DT case. This patch eliminates a lot of unneeded clk_register_clkdev() calls for GPT. Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
2014-07-18ARM: imx5: reuse clock CCM mapping in pm codeShawn Guo1-0/+2
The imx5 pm code needs to access CCM registers. Let's remove the use of CCM static mapping in pm code by reusing the dynamic mapping created in clock code. Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
2014-07-18ARM: imx5: use dynamic mapping for DPLL blockShawn Guo1-17/+48
Replace the static mapping of DPLL block with dynamic mapping by calling ioremap(). Ideally, this should be done by calling of_iomap(), so that the physical address of DPLL can also be retrieved from device tree. But unfortunately, DPLL blocks are not defined in DT in the first place. So to maintain the compatibility of existing DTB, we use ioremap() with physical address defines in the code. Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
2014-07-18ARM: imx5: use dynamic mapping for CCM blockShawn Guo1-39/+51
Replace the static mapping of CCM block with dynamic mapping and retrieve CCM base address from device tree. Though it's not nice to encode the variable ccm_base in macros, it helps to avoid a massive churn on the code. Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
2014-07-18ARM: imx5: remove header crm-regs-imx5.hShawn Guo1-1/+44
Most of the macros in crm-regs-imx5.h are used nowhere. Let's move the needed ones into the C files, and remove the header. Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
2014-07-18ARM: imx5: call mxc_timer_init_dt() on imx51Shawn Guo1-1/+1
Since i.MX51 supports DT only, it's more appropriate to call mxc_timer_init_dt() than mxc_timer_init() to initialize timer. Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
2014-07-18ARM: imx5: drop arguments from mx5_clocks_common_init()Shawn Guo1-10/+8
The function mx5_clocks_common_init() was created with a number of arguments to pass oscillator clock rate in non-DT boot. Since i.MX5 is DT only platform, the arguments can be dropped, and the clock rate can just be retrieved from device tree. Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
2014-07-18ARM: imx5: make mx51_clocks_init() a DT callShawn Guo1-13/+3
Since i.MX51 becomes a DT only platform, we can make mx51_clocks_init() a DT call and save function mx51_clocks_init_dt() now. Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
2014-04-30ARM: imx: factor device tree timer initializationGilles Chanteperdrix1-14/+4
Signed-off-by: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org> Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
2014-04-30ARM: i.MX5: Remove outdated VPU clock lookupsPhilipp Zabel1-2/+0
CODA7 clock lookups are now defined in the device tree. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
2014-03-05ARM i.MX: remove PWM platform supportSascha Hauer1-2/+0
As the i.MX pwm driver is devicetree only, remove the platform support for this device. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
2013-12-31ARM i.MX5: fix obvious typo in ldb_di0_gate clk definitionLothar Waßmann1-1/+1
ldb_di0_gate is registerd with the clk index of IMX5_CLK_LDB_DI1_GATE, thus the DI0 interface will be turned off inadvertently during boot. Signed-off-by: Lothar Waßmann <LW@KARO-electronics.de> Reviewed-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
2013-12-31ARM i.MX5: set CAN peripheral clock to 24 MHz parentMarc Kleine-Budde1-0/+3
This patch sets the parent of CAN peripheral clock (a.k.a. CPI clock) to the lp_apm clock, which has a rate of 24 MHz. In the CAN world a base clock with multiple of 8 MHz is suited best for all CIA recommented bit rates. Without this patch the CAN peripheral clock on i.MX53 has a rate of 66.666 MHz which produces quite large bit rate errors. Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
2013-12-31ARM i.MX5: fix "shift" value for lp_apm_sel on i.MX50 and i.MX53Marc Kleine-Budde1-2/+6
According to the i.MX50 Rev. 1 and i.MX53 Rev. 2.1 datasheet the lp_apm_sel is bit 10 in the CCM_CCSR register not bit 9. On the i.MX51 it's bit 9. This patch fixes this issue. Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
2013-12-31ARM: imx: imx53: Add SATA PHY clockMarek Vasut1-0/+1
Add SATA PHY clock which are derived from the USB PHY1 clock. Note that this patch derives the SATA PHY clock from USB PHY1 clock gate so that the SATA driver can ungate both the SATA PHY clock and USB PHY1 clock for the SATA to work correctly. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Richard Zhu <r65037@freescale.com> Cc: Tejun Heo <tj@kernel.org> Cc: Linux-IDE <linux-ide@vger.kernel.org> Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
2013-12-31ARM: imx5: introduce DT includes for clock providerLucas Stach1-414/+372
Use clock defines in order to make devicetrees more human readable. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
2013-12-09ARM: i.MX5x: Add SAHARA clock for i.MX5x CPUsAlexander Shiyan1-1/+2
Patch adds missing Security Accelerator (SAHARA) clock for i.MX5x CPUs. Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
2013-12-09ARM i.MX53: remove duplicated include from clk-imx51-imx53.cWei Yongjun1-1/+0
Remove duplicated include. Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
2013-12-09ARM: imx: add clocking support code for the IMX50 SoCGreg Ungerer1-0/+58
Add code to support the specific clock tree of the Freescale IMX50 SoC. It can use much of the common IMX51/IMX53 clocking code. Signed-off-by: Greg Ungerer <gerg@uclinux.org> Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
2013-10-21ARM: mach-imx: clk-imx51-imx53: Retrieve base address and irq from dtFabio Estevam1-4/+11
As mx53 is a dt-only SoC, we should retrieve the gpt base address and irq from the device tree, instead of using the old MX53_IO_ADDRESS method. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
2013-10-21Merge remote-tracking branch 'shesselba/clk-of-init-v2_for-3.13' into imx/socShawn Guo1-19/+10
2013-09-29ARM: imx: remove custom .init_time hookSebastian Hesselbarth1-19/+10
With arch/arm calling of_clk_init(NULL) from time_init(), we can now remove custom .init_time hooks. Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> Acked-by: Shawn Guo <shawn.guo@linaro.org>
2013-09-20Merge tag 'pm+acpi-3.12-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pmLinus Torvalds1-1/+1
Pull ACPI and power management fixes from Rafael Wysocki: 1) Four fixes for cpufreq regressions introduced by the changes that removed Device Tree parsing for CPU device nodes from cpufreq drivers from Sudeep KarkadaNagesha. 2) Two fixes for recent cpufreq regressions introduced by changes related to the preservation of sysfs attributes over system suspend/resume cycles from Viresh Kumar. 3) Fix for ACPI-based wakeup signaling in the PCI subsystem that fails to stop PME polling for devices put into the D3cold power state from Rafael J Wysocki. 4) Fix for bad interactions between cpufreq and udev on systems supporting intel_pstate where acpi-cpufreq is available as well from Yinghai Lu. * tag 'pm+acpi-3.12-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: cpufreq: return EEXIST instead of EBUSY for second registering PCI / ACPI / PM: Clear pme_poll for devices in D3cold on wakeup ARM: shmobile: change dev_id to cpu0 while registering cpu clock ARM: i.MX: change dev_id to cpu0 while registering cpu clock cpufreq: imx6q-cpufreq: assign cpu_dev correctly to cpu0 device cpufreq: cpufreq-cpu0: assign cpu_dev correctly to cpu0 device cpufreq: unlock correct rwsem while updating policy->cpu cpufreq: Clear policy->cpus bits in __cpufreq_remove_dev_finish()
2013-09-19ARM: i.MX: change dev_id to cpu0 while registering cpu clockSudeep KarkadaNagesha1-1/+1
Currently all clkdev registration use "cpufreq-cpu0.0" as dev_id for cpu clock which refers to virtual platform device. It needs to be "cpu0" instead which is actual cpu0 device id. This patch changes the dev_id from "cpufreq-cpu0.0" to "cpu0". Reported-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Tested-by: Shawn Guo <shawn.guo@linaro.org> Signed-off-by: Sudeep KarkadaNagesha <sudeep.karkadanagesha@arm.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2013-09-17ARM: mach-imx: clk-imx51-imx53: Fix 'spdif1_pred' clock registrationFabio Estevam1-1/+1
Since commit beb2d1c1ba (ARM i.MX5: Add S/PDIF clocks), the following clock error appears on mx51: TrustZone Interrupt Controller (TZIC) initialized i.MX51 clk 180: register failed with -17 i.MX5 clk 180: register failed with -17 sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 178956ms CPU identified as i.MX51, silicon rev 3.0 ... Clock 180 corresponds to 'spdif1_podf' and this clock is getting registered twice. Fix it, by properly registering the 'spdif1_pred' clock, which should not reference 'spdif1_podf'. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
2013-08-22ARM: imx: add ocram clock for imx53Shawn Guo1-1/+2
Add missing ocram gate clock for imx53 and also represent it in device tree ocram node. Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
2013-06-17ARM: imx: move imx53-qsb audio codec clk lookup into DTShawn Guo1-2/+0
With device tree clk lookup support in place, we can move audio codec clk lookup for ssi_ext1 into device tree now, so that imx53_qsb_init() can be saved. Since ssi_ext2 lookup is used nowhere, it gets removed together with ssi_ext1 lookup from clk driver. Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
2013-06-17ARM i.MX5: Add S/PDIF clocksPhilipp Zabel1-1/+27
This patch adds the S/PDIF clocks for i.MX51 and i.MX53. Tested on i.MX53. The i.MX51 has a second set of spdif_root clock dividers, and on i.MX53 there is an additional input to the spdif_xtal mux. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
2013-06-17ARM i.MX53: Add SATA clockSascha Hauer1-1/+2
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
2013-06-17ARM: i.MX5: Allow DT clock providersMartin Fuzzey1-36/+8
Currently clock providers defined in the DT are not registered on i.MX5 platforms since of_clk_init() is not called. This is not a problem for the SOC's own clocks, which are registered in code, but prevents the DT being used to define clocks for external hardware. Fix this by calling of_clk_init() and actually using the DT to obtain the 4 SOC fixed clocks. These are already defined in the DT but were previously just used to manually obtain the rate. Fall back to the old scheme for non DT platforms. Since the same method may be useful for other i.MX platforms implement the imx_obtain_fixed_clock() function in common code. Actually changing other i.MX platforms to use this should be done later by someone with access to the appropriate hardware. Signed-off-by: Martin Fuzzey <mfuzzey@parkeon.com> Tested-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
2013-05-07Merge tag 'soc-for-linus-3' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-socLinus Torvalds1-16/+59
Pull ARM SoC platform updates (part 3) from Arnd Bergmann: "This is the third and smallest of the SoC specific updates. Changes include: - SMP support for the Xilinx zynq platform - Smaller imx changes - LPAE support for mvebu - Moving the orion5x, kirkwood, dove and mvebu platforms to a common "mbus" driver for their internal devices. It would be good to get feedback on the location of the "mbus" driver. Since this is used on multiple platforms may potentially get shared with other architectures (powerpc and arm64), it was moved to drivers/bus/. We expect other similar drivers to get moved to the same place in order to avoid creating more top-level directories under drivers/ or cluttering up the messy drivers/misc/ even more." * tag 'soc-for-linus-3' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (50 commits) ARM: imx: reset_controller may be disabled ARM: mvebu: Align the internal registers virtual base to support LPAE ARM: mvebu: Limit the DMA zone when LPAE is selected arm: plat-orion: remove addr-map code arm: mach-mv78xx0: convert to use the mvebu-mbus driver arm: mach-orion5x: convert to use mvebu-mbus driver arm: mach-dove: convert to use mvebu-mbus driver arm: mach-kirkwood: convert to use mvebu-mbus driver arm: mach-mvebu: convert to use mvebu-mbus driver ARM i.MX53: set CLK_SET_RATE_PARENT flag on the tve_ext_sel clock ARM i.MX53: tve_di clock is not part of the CCM, but of TVE ARM i.MX53: make tve_ext_sel propagate rate change to PLL ARM i.MX53: Remove unused tve_gate clkdev entry ARM i.MX5: Remove tve_sel clock from i.MX53 clock tree ARM: i.MX5: Add PATA and SRTC clocks ARM: imx: do not bring up unavailable cores ARM: imx: add initial imx6dl support ARM: imx1: mm: add call to mxc_device_init ARM: imx_v4_v5_defconfig: Add CONFIG_GPIO_SYSFS ARM: imx_v6_v7_defconfig: Select CONFIG_PERF_EVENTS ...
2013-04-12ARM i.MX53: set CLK_SET_RATE_PARENT flag on the tve_ext_sel clockPhilipp Zabel1-2/+2
Use imx_clk_mux_flags to set the appropriate flags for the TVE selector clock. This is needed so tve_clk rate changes can propagate up to pll4_sw. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
2013-04-12ARM i.MX53: tve_di clock is not part of the CCM, but of TVEPhilipp Zabel1-2/+1
Remove the tve_di clock from the CCM clock tree. It will be provided by the Television Encoder driver, as this clock is an output signal of the TVE module. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
2013-04-12ARM i.MX53: make tve_ext_sel propagate rate change to PLLPhilipp Zabel1-2/+2
This is needed so the Television Encoder driver can set the rate on tve_clk and have it propagated up to pll4_sw. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
2013-04-12ARM i.MX53: Remove unused tve_gate clkdev entryPhilipp Zabel1-1/+0
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
2013-04-12ARM i.MX5: Remove tve_sel clock from i.MX53 clock treePhilipp Zabel1-2/+3
On i.MX53, there is only tve_ext_sel. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
2013-04-12ARM: i.MX5: Add PATA and SRTC clocksSascha Hauer1-0/+3
This adds the clock gates and the binding documentation for PATA and SRTC. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
2013-04-12ARM: i.MX53 Add the cko1, cko2 clock outputs.Martin Fuzzey1-0/+34
These two clocks connect to external pins and can be muxed to various internal clocks. They are typically used either for debugging or to provide clocks to external chips (eg audio codecs). Currently only the selectable clocks that already exist in the clock tree have been added. Signed-off-by: Martin Fuzzey <mfuzzey@parkeon.com> Acked-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
2013-04-12ARM i.MX53: fix ldb di divider and selector clocksPhilipp Zabel1-6/+6
Use imx_clk_mux_flags and imx_clk_divider_flags to set the appropriate flags for the LDB display interface divider and selector clocks. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
2013-04-12ARM i.MX53: Add GPU clocks to clock treePhilipp Zabel1-1/+8
This patch adds the missing GPU2D and GPU3D mux and gate clocks, and the graphics arbiter gate clock. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
2013-04-09ARM: imx5 DT init cpufreq-cpu0 deviceMarkus Pargmann1-1/+1
Add cpufreq-cpu0 platform device for imx5 DT init and register the clock for imx5. Signed-off-by: Markus Pargmann <mpa@pengutronix.de> Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
2013-04-09ARM i.MX5: Move IPU clock lookups into device treePhilipp Zabel1-7/+0
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
2013-02-10ARM: i.MX53: Add clocks for i.mx53 onewire master.Martin Fuzzey1-1/+3
Signed-off-by: Martin Fuzzey <mfuzzey@parkeon.com> Acked-by: Sascha Hauer <s.hauer@pengutronix.de> Acked-by: Evgeniy Polyakov <zbr@ioremap.net> Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
2013-01-18ARM: i.MX clock: Change the connection-id for fsl-usb2-udcPeter Chen1-3/+3
As we use platform_device_id for fsl-usb2-udc driver, it needs to change clk connection-id, or the related devm_clk_get will be failed. Signed-off-by: Peter Chen <peter.chen@freescale.com> Acked-by: Shawn Guo <shawn.guo@linaro.org> Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-12-17ARM i.MX51 clock: Fix regression since enabling MIPI/HSP clocksSascha Hauer1-0/+16
The MIPI/HSP clocks were recently turned on in the i.MX51 clock tree. It turned out that the system does not work properly when the MIPI/HSP clocks are enabled, but the IPU clock is disabled. This happens when IPU support is disabled. In this case the IPU clock gets disabled when the clock framework turns off unused clock in a late_initcall. This is broken since: | commit 9a2d4825a9368e018003a2732a61be063d178f67 | Author: Sascha Hauer <s.hauer@pengutronix.de> | Date: Tue Jun 5 13:53:32 2012 +0200 | | ARM i.MX5: switch IPU clk support to devicetree bindings | | The i.MX5 clk support has platform based clock bindings for the | IPU. IPU support is devicetree only, so move them over to devicetree | based bindings. Also, enable MIPI clocks which do not have a device | associated with, but still need to be enabled to do graphics on | i.MX51. This patch fixes this by setting some reserved bits in the CCM as recommended in the reference manual. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Tested-by: Shawn Guo <shawn.guo@linaro.org>
2012-11-22ARM: mx5: Replace clk_register_clkdev with clock DT lookupFabio Estevam1-13/+13
Similarly as it was done for mx6q, use a DT lookup in order to make maintainance task for the clock devices easier. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Acked-by: Shawn Guo <shawn.guo@linaro.org> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-11-16ARM i.MX5: switch IPU clk support to devicetree bindingsSascha Hauer1-8/+11
The i.MX5 clk support has platform based clock bindings for the IPU. IPU support is devicetree only, so move them over to devicetree based bindings. Also, enable MIPI clocks which do not have a device associated with, but still need to be enabled to do graphics on i.MX51. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Acked-by: Shawn Guo <shawn.guo@linaro.org>