aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-lpc32xx/clock.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2016-02-11arm: lpc32xx: switch to common clock frameworkVladimir Zapolskiy1-1284/+0
The change switches NXP LPC32xx platforms to LPC32xx clock driver powered by common clock framework, this obsoletes mach-lpc32xx/clock.o legacy clock driver and thus it is removed. Legacy timer driver mach-lpc32xx/timer.o strictly depends on legacy clock support, but fortunately an existing LPC32xx clock source and clock event driver completely replaces it, and thus it can be removed as well. Noticeably platform UART driver directly operates on LPC32xx source control block registers, remove this dependency to avoid overlapping with common clock framework driver, also this guarantees that UART is working expectedly. Tested-by: Sylvain Lemieux <slemieux@tycoint.com> Signed-off-by: Vladimir Zapolskiy <vz@mleia.com>
2015-05-06ARM: lpc32xx: convert to use clkdev_add_table()Russell King1-4/+1
We have always had an efficient way of registering a table of clock lookups - it's called clkdev_add_table(). However, some people seem to really love writing inefficient and unnecessary code. Convert LPC32xx to use the correct interface. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2012-11-12ARM: LPC32xx: Add the motor PWM clockAlban Bedel1-0/+8
2012-07-20ARM: LPC32xx: Add PWM clockAlexandre Pereira da Silva1-0/+14
Signed-off-by: Alexandre Pereira da Silva <aletes.xgr@gmail.com> Signed-off-by: Roland Stigge <stigge@antcom.de>
2012-07-01ARM: LPC32xx: Cleanup USB clock initAlexandre Pereira da Silva1-1/+67
Move most of usb clock initialization from lpc32xx_udc and ohci-nxp to clock.c. Also adds ohci clocks and otg clocks. Signed-off-by: Alexandre Pereira da Silva <aletes.xgr@gmail.com> Signed-off-by: Roland Stigge <stigge@antcom.de>
2012-07-01ARM: LPC32xx: Remove wrong re-initialization of MMC clock registerRoland Stigge1-7/+3
This patch fixes a bug, (wrongfully) resetting the value of LPC32XX_CLKPWR_MS_CTRL back to its initial contents (after careful setup). This was discovered only with a board/bootloader combination (EA3250) where the contents of the respective register wasn't already at the correct value on Linux boot. Signed-off-by: Roland Stigge <stigge@antcom.de> Acked-by: Alexandre Pereira da Silva <aletes.xgr@gmail.com>
2012-07-01ARM: LPC32xx: Add further bits to MMC initRoland Stigge1-1/+5
This patch makes sure certain MMC bits are cleared as they should for initialization. Signed-off-by: Roland Stigge <stigge@antcom.de> Acked-by: Alexandre Pereira da Silva <aletes.xgr@gmail.com>
2012-07-01ARM: LPC32xx: Init MMC via clockRoland Stigge1-2/+4
This patch moves MMC/SD controller initialization from the board specific file phy3250.c to clock.c. Signed-off-by: Roland Stigge <stigge@antcom.de> Acked-by: Alexandre Pereira da Silva <aletes.xgr@gmail.com>
2012-06-14ARM: LPC32xx: Move i2s1 dma enabling to clock.cAlexandre Pereira da Silva1-1/+2
Move i2s1 dma init to be done when it's clock is enabled. Signed-off-by: Alexandre Pereira da Silva <aletes.xgr@gmail.com> Signed-off-by: Roland Stigge <stigge@antcom.de>
2012-06-14ARM: LPC32xx: Clock adjustment for key matrix controllerRoland Stigge1-1/+1
The clock.c file needs to be changed to match the automatic device name to its clock. Signed-off-by: Roland Stigge <stigge@antcom.de> Acked-by: Rob Herring <rob.herring@calxeda.com>
2012-06-14ARM: LPC32xx: Clock initialization for NAND controllersRoland Stigge1-2/+14
This patch adds clock initialization for the MLC NAND controller of the LPC32xx SoC and adjusts it for the SLC controller. Signed-off-by: Roland Stigge <stigge@antcom.de>
2012-04-22ARM: LPC32xx: clock.c registration adjustmentRoland Stigge1-10/+10
This patch adjusts the clocks of the LPC32xx SoC to be picked up correctly by the respective drivers. * AMBA dmaengine * watchdog * I2C * TSC * MMC * Ethernet * ADC * USB Device (All except the pl08xdmac AMBA dmaengine via DT generated device name) Signed-off-by: Roland Stigge <stigge@antcom.de>
2012-04-22ARM: LPC32xx: clock.c cleanupRoland Stigge1-42/+35
This patch makes use of the default macro CLKDEV_INIT() for clock registration. Signed-off-by: Roland Stigge <stigge@antcom.de>
2012-03-29ARM: LPC32xx: clock.c: Fix lpc-eth clock referenceRoland Stigge1-1/+1
During a complex merge for v3.4, one line of the commit c20b909be9ba27173294a52d08cab293ec030a2c ("ARM: LPC32xx: Ethernet support") was reverted wrongly ("lpc-eth.0" -> "lpc-net.0") while the other conflicts were merged correctly. This patch re-applies the clock name "lpc-eth.0". Signed-off-by: Roland Stigge <stigge@antcom.de> Signed-off-by: Olof Johansson <olof@lixom.net>
2012-03-27Merge branch 'fixes-non-critical' into next/drivers2Olof Johansson1-2/+2
fixes-non-critical has already been merged upstream, and there are a handful of annoying context conflicts that it makes sense to resolve before sending up. Part of this is because there was parallel development going on between more urgent fixes and general driver fixups, it should settle down once the lpc32xx platform reaches a more steady state. Conflicts: arch/arm/mach-lpc32xx/clock.c arch/arm/mach-lpc32xx/common.h Signed-off-by: Olof Johansson <olof@lixom.net>
2012-03-13ARM: LPC32xx: Ethernet supportRoland Stigge1-1/+1
This patch adds ethernet support to the LPC32xx ARM architecture. The actual driver in drivers/net is contained in a separate patch. Signed-off-by: Roland Stigge <stigge@antcom.de> Acked-by: Arnd Bergmann <arnd@arndb.de>
2012-03-13ARM: LPC32xx: USB SupportRoland Stigge1-24/+63
This patch adds OHCI support to the LPC32xx ARM platform. Besides the trivial addition of platform "usb-ohci" support, fixes for the USB PLL have been added to arch/arm/mach-lpc32xx/clock.c, ported from NXP's lpclinux.com. (This is the mach-lpc32xx specific part, the USB subsystem specific changes are in a separate patch for the USB maintainers.) Signed-off-by: Roland Stigge <stigge@antcom.de>
2012-03-13Merge branch 'lpc32xx/drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc into lpc32xx/tmpRoland Stigge1-0/+36
Conflicts: arch/arm/mach-lpc32xx/clock.c
2012-02-22ARM: LPC32xx: ADC support for mach-lpc32xxRoland Stigge1-0/+36
This patch adds the mach specific support for the LPC32XX ADC driver (the latter being already in staging/iio) Signed-off-by: Roland Stigge <stigge@antcom.de> Acked-by: Jonathan Cameron <jic23@kernel.org> Acked-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2012-02-09ARM: LPC32xx: clock.c: Clock registration fixesRoland Stigge1-3/+3
This patch adjusts the clock registration list, ported from the latest version of Kevin Wells' latest version of clock.c: i2s0_ck, i2s1_ck and dev:mmc0 have NULL pointers associated as the .dev_id and .con_id, respectively. The old values were not useful. Signed-off-by: Roland Stigge <stigge@antcom.de> Acked-by: Kevin Wells <kevin.wells@nxp.com> Signed-off-by: Olof Johansson <olof@lixom.net>
2012-02-09ARM: LPC32xx: clock.c: jiffies wrappingRoland Stigge1-6/+6
This patch fixes the jiffies wrapping bug in clock.c. It corrects the timeout computation based on jiffies, uses time_before() for correct wrapping handling and replaces a binary "&" which should really be a logical "&&" in a truth expression. Signed-off-by: Roland Stigge <stigge@antcom.de> Acked-by: Wolfram Sang <w.sang@pengutronix.de> Tested-by: Wolfram Sang <w.sang@pengutronix.de> Acked-by: Kevin Wells <kevin.wells@nxp.com> Signed-off-by: Olof Johansson <olof@lixom.net>
2012-02-09ARM: LPC32xx: clock.c: Missing header fileRoland Stigge1-0/+1
This patch fixes the compiler warnings regarding the EXPORT_SYMBOL usage Signed-off-by: Roland Stigge <stigge@antcom.de> Acked-by: Wolfram Sang <w.sang@pengutronix.de> Acked-by: Kevin Wells <kevin.wells@nxp.com> Signed-off-by: Olof Johansson <olof@lixom.net>
2012-02-09ARM: LPC32xx: clock.c: Fix mutex lock issuesRoland Stigge1-30/+11
This patch fixes the mutex issue in clock.c, as done in Kevin Wells' original driver update: In some cases, the clock drivers could grab a mutex twice in an improper context. This patch changes the mutex mechanism to a simple irq lock/unlock mechanism and removes un-needed locks from some functions. (See also git.lpclinux.com) Signed-off-by: Roland Stigge <stigge@antcom.de> Tested-by: Wolfram Sang <w.sang@pengutronix.de> Acked-by: Kevin Wells <kevin.wells@nxp.com> Signed-off-by: Olof Johansson <olof@lixom.net>
2012-02-09ARM: LPC32xx: clock.c: warning fixRoland Stigge1-2/+0
This patch removes the debug warning on local_clk_disable() as done in Kevin Wells' driver update Signed-off-by: Roland Stigge <stigge@antcom.de> Acked-by: Wolfram Sang <w.sang@pengutronix.de> Tested-by: Wolfram Sang <w.sang@pengutronix.de> Acked-by: Kevin Wells <kevin.wells@nxp.com> Signed-off-by: Olof Johansson <olof@lixom.net>
2012-02-09ARM: LPC32xx: clock.c: Clock registration fixesRoland Stigge1-3/+3
This patch adjusts the clock registration list, ported from the latest version of Kevin Wells' latest version of clock.c: i2s0_ck, i2s1_ck and dev:mmc0 have NULL pointers associated as the .dev_id and .con_id, respectively. The old values were not useful. Signed-off-by: Roland Stigge <stigge@antcom.de> Acked-by: Kevin Wells <kevin.wells@nxp.com> Signed-off-by: Olof Johansson <olof@lixom.net>
2012-02-09ARM: LPC32xx: clock.c: jiffies wrappingRoland Stigge1-6/+6
This patch fixes the jiffies wrapping bug in clock.c. It corrects the timeout computation based on jiffies, uses time_before() for correct wrapping handling and replaces a binary "&" which should really be a logical "&&" in a truth expression. Signed-off-by: Roland Stigge <stigge@antcom.de> Acked-by: Wolfram Sang <w.sang@pengutronix.de> Tested-by: Wolfram Sang <w.sang@pengutronix.de> Acked-by: Kevin Wells <kevin.wells@nxp.com> Signed-off-by: Olof Johansson <olof@lixom.net>
2012-02-09ARM: LPC32xx: clock.c: Missing header fileRoland Stigge1-0/+1
This patch fixes the compiler warnings regarding the EXPORT_SYMBOL usage Signed-off-by: Roland Stigge <stigge@antcom.de> Acked-by: Wolfram Sang <w.sang@pengutronix.de> Acked-by: Kevin Wells <kevin.wells@nxp.com> Signed-off-by: Olof Johansson <olof@lixom.net>
2012-02-09ARM: LPC32xx: clock.c: Fix mutex lock issuesRoland Stigge1-30/+11
This patch fixes the mutex issue in clock.c, as done in Kevin Wells' original driver update: In some cases, the clock drivers could grab a mutex twice in an improper context. This patch changes the mutex mechanism to a simple irq lock/unlock mechanism and removes un-needed locks from some functions. (See also git.lpclinux.com) Signed-off-by: Roland Stigge <stigge@antcom.de> Tested-by: Wolfram Sang <w.sang@pengutronix.de> Acked-by: Kevin Wells <kevin.wells@nxp.com> Signed-off-by: Olof Johansson <olof@lixom.net>
2012-02-09ARM: LPC32xx: clock.c: warning fixRoland Stigge1-2/+0
This patch removes the debug warning on local_clk_disable() as done in Kevin Wells' driver update Signed-off-by: Roland Stigge <stigge@antcom.de> Acked-by: Wolfram Sang <w.sang@pengutronix.de> Tested-by: Wolfram Sang <w.sang@pengutronix.de> Acked-by: Kevin Wells <kevin.wells@nxp.com> Signed-off-by: Olof Johansson <olof@lixom.net>
2011-07-12arm: lpc32xx: add tsc-deviceWolfram Sang1-1/+1
Fix the clock name, too. Signed-off-by: Wolfram Sang <w.sang@pengutronix.de> Tested-by: Kevin Wells <Kevin.wells@nxp.com>
2010-11-26ARM: 6483/1: arm & sh: factorised duplicated clkdev.cJean-Christop PLAGNIOL-VILLARD1-2/+1
factorise some generic infrastructure to assist looking up struct clks for the ARM & SH architecture. as the code is identical at 99% put the arch specific code for allocation as example in asm/clkdev.h Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Acked-by: Paul Mundt <lethal@linux-sh.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2010-07-27ARM: LPC32XX: Clock driverKevin Wells1-0/+1137
Clock driver for the LPC32XX architecture Signed-off-by: Kevin Wells <wellsk40@gmail.com> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>