summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-ep93xx/clock.c
Commit message (Collapse)AuthorAgeFilesLines
* ep93xx: Make syscon access functions private to SoCRyan Mallon2012-03-141-0/+1
| | | | | | | | | The syscon access functions are no longer used outside of the core EP93xx code. Move their definitions into the SoC code. Signed-off-by: Ryan Mallon <rmallon@gmail.com> Reviewed-by: Mika Westerberg <mika.westerberg@iki.fi> Acked-by: Hartley Sweeten <hsweeten@visionengravers.com>
* ARM: 6483/1: arm & sh: factorised duplicated clkdev.cJean-Christop PLAGNIOL-VILLARD2010-11-261-1/+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>
* replace nested max/min macros with {max,min}3 macroHagen Paul Pfeifer2010-10-261-2/+1
| | | | | | | | | | | | | | | | | | | Use the new {max,min}3 macros to save some cycles and bytes on the stack. This patch substitutes trivial nested macros with their counterpart. Signed-off-by: Hagen Paul Pfeifer <hagen@jauu.net> Cc: Joe Perches <joe@perches.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: Hartley Sweeten <hsweeten@visionengravers.com> Cc: Russell King <linux@arm.linux.org.uk> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Herbert Xu <herbert@gondor.apana.org.au> Cc: Roland Dreier <rolandd@cisco.com> Cc: Sean Hefty <sean.hefty@intel.com> Cc: Pekka Enberg <penberg@cs.helsinki.fi> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* ARM: 6359/1: ep93xx: move clock initialization earlierMika Westerberg2010-09-081-1/+1
| | | | | | | | | | | | | | | Commit 7cfe24947 ("ARM: AMBA: Add pclk support to AMBA bus infrastructure") changed AMBA bus to handle the PCLK automatically. However, in EP93xx clock initialization is arch_initcall which is done later than AMBA device identification. This causes amba_get_enable_pclk() to fail resulting device where UARTs are not functional. So change ep93xx_clock_init() to be postcore_initcall. Signed-off-by: Mika Westerberg <mika.westerberg@iki.fi> Acked-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* Merge branch 'for-linus' of ↵Linus Torvalds2010-08-071-1/+66
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6 * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6: (214 commits) ALSA: hda - Add pin-fix for HP dc5750 ALSA: als4000: Fix potentially invalid DMA mode setup ALSA: als4000: enable burst mode ALSA: hda - Fix initial capsrc selection in patch_alc269() ASoC: TWL4030: Capture route runtime DAPM ordering fix ALSA: hda - Add PC-beep whitelist for an Intel board ALSA: hda - More relax for pending period handling ALSA: hda - Define AC_FMT_* constants ALSA: hda - Fix beep frequency on IDT 92HD73xx and 92HD71Bxx codecs ALSA: hda - Add support for HDMI HBR passthrough ALSA: hda - Set Stream Type in Stream Format according to AES0 ALSA: hda - Fix Thinkpad X300 so SPDIF is not exposed ALSA: hda - FIX to not expose SPDIF on Thinkpad X301, since it does not have the ability to use SPDIF ASoC: wm9081: fix resource reclaim in wm9081_register error path ASoC: wm8978: fix a memory leak if a wm8978_register fail ASoC: wm8974: fix a memory leak if another WM8974 is registered ASoC: wm8961: fix resource reclaim in wm8961_register error path ASoC: wm8955: fix resource reclaim in wm8955_register error path ASoC: wm8940: fix a memory leak if wm8940_register return error ASoC: wm8904: fix resource reclaim in wm8904_register error path ...
| * Merge branch 'ep93xx' into for-2.6.36Mark Brown2010-06-091-1/+66
| |\ | | | | | | | | | | | | | | | | | | Trivial add/add fixup required in the clock table. Conflicts: arch/arm/mach-ep93xx/clock.c
| | * EP93xx: Add i2s core supportRyan Mallon2010-06-091-1/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | Add core support for EP93xx i2s audio Signed-off-by: Ryan Mallon <ryan@bluewatersys.com> Acked-by: H Hartley Sweeten <hsweeten@visionengravers.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | | ARM: AMBA: Add pclk definition for platforms using primecellsRussell King2010-07-221-1/+1
|/ / | | | | | | | | | | | | | | Add a dummy clk definition for the APB pclk signal on all platforms using the AMBA bus infrastructure. This ensures that these platforms continue to work when the core amba bus code controls the APB pclk. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* | ARM: 6124/1: ep93xx: SPI driver platform support codeMika Westerberg2010-05-131-0/+13
|/ | | | | | | | | | | | | | | | | | This patch adds platform side support code for the EP93xx SPI driver. This includes clock, resources and muxing. There is a new function: ep93xx_register_spi() which can be used by board support code to register new SPI devices for the board. This patch depends on patch 5998/1 ep93xx: added chip revision reading function Cc: Ryan Mallon <ryan@bluewatersys.com> Cc: David Brownell <dbrownell@users.sourceforge.net> Cc: Grant Likely <grant.likely@secretlab.ca> Signed-off-by: Mika Westerberg <mika.westerberg@iki.fi> Acked-by: H Hartley Sweeten <hsweeten@visionengravers.com> Acked-by: Martin Guy <martinwguy@gmail.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* Merge branches 'clks' and 'pnx' into develRussell King2010-02-251-3/+1
|\
| * ARM: Consolidate clks_register() and similarRussell King2010-02-121-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Most machine classes want some way to register a block of clk_lookup structures, and most do it by implementing a clks_register() type function which walks an array, or by open-coding a loop. Consolidate all this into clkdev_add_table(). Acked-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Kevin Hilman <khilman@deeprootsystems.com> Acked-by: Eric Miao <eric.y.miao@gmail.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* | ARM: 5953/1: ep93xx: fix broken build of clock.cHartley Sweeten2010-02-241-1/+1
| | | | | | | | | | | | | | | | | | | | Patch 5879/1: ep93xx: define magic numbers for pll1 and pll2 broke the ep93xx build due to one missing rename of EP93XX_SYSCON_CLOCK_SET2. The correct name should be EP93XX_SYSCON_CLKSET2. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Acked-by: Ryan Mallon <ryan@bluewatersys.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* | ARM: 5879/1: ep93xx: define magic numbers for pll1 and pll2Hartley Sweeten2010-01-121-8/+12
| | | | | | | | | | | | | | | | | | | | | | | | Add defines for the pll register magic numbers that determine if the pll's are bypassed and if pll2 is enabled. Rename the clock set registers to more closely match the datasheet. Also, remove the unnecessary braces since each conditional statement is a single statement. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Acked-by: Ryan Mallon <ryan@bluewatersys.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* | ARM: 5875/1: ep93xx: use pr_fmt in clock.cHartley Sweeten2010-01-121-2/+4
|/ | | | | | | | | Use pr_fmt to prefix kernel output with the module name and change all printk messages to pr_<level> format. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Acked-by: Ryan Mallon <ryan@bluewatersys.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* ARM: 5756/1: ep93xx: introduce clk parentHartley Sweeten2009-10-101-47/+119
| | | | | | | | | | | | | | | | | | The clock generation system in the ep93xx uses two external oscillator's and two internal PLLs to derive all the internal clocks. Many of these internal clocks can be stopped to save power. This introduces a "parent" hierarchy for the clocks so that the users count can be correctly tracked for power management. The "parent" for the video clock can either be one of the PLL outputs or the external oscillator. In order to correctly track the "parent" for the video clock calc_clk_div() needed to be modified. It now returns an error code if the desired rate cannot be generated. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Acked-by: Ryan Mallon <ryan@bluewatersys.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* ep93xx video driver platform supportRyan Mallon2009-09-231-1/+87
| | | | | | | | | | Signed-off-by: Ryan Mallon <ryan@bluewatersys.com> Acked-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Daniele Venzano <linux@brownhat.org> Cc: Russell King <rmk@arm.linux.org.uk> Cc: Krzysztof Helt <krzysztof.h1@poczta.fm> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* ARM: 5628/1: ep93xx: Introduce Pulse Width Modulator (PWM) driverHartley Sweeten2009-07-301-0/+4
| | | | | | | | | | | | | | | | | | | The EP93xx features two PWMs (one on the EP9307) with the following features: * Configurable dual output * Separate input clocks for each PWM output * 16-bit resolution * Programmable pulse width (duty cycle), interval (frequency), and polarity This adds the necessary core support as well as the driver. A sysfs interface is provided to control the PWM outputs. Signed-off-by: Matthieu Crapet <mcrapet@gmail.com> Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Acked-by: Ryan Mallon <ryan@bluewatersys.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* [ARM] 5593/1: ep93xx: clock.c __iomem pointerHartley Sweeten2009-07-091-1/+1
| | | | | | | | To ensure typesafe io, the enable_reg variable should be a void __iomem pointer not u32. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* [ARM] 5578/1: ep93xx: add ep93xx-keypad clockHartley Sweeten2009-07-091-33/+68
| | | | | | | | | | | | | | | | | | | | | | | | Add clkdev support for the ep93xx_keypad driver. A matrix keypad driver for the ep93xx just got merged via the input subsystem group. For this driver to work the keypad clock needs to be added to the ep93xx clkdev support. In order to accomplish this the following changes are implemented: 1) Move the EP93XX_EXT_*_RATE defines to mach/include/hardware.h. 2) Add EP93XX_KEYTCHCLK_DIV{4/16} for the keypad driver. 3) Add support for programmable clocks (set_rate() callback). 4) Add clk_keypad for the keypad driver. 5) tab indent the clk_lookup table for easier reading. 6) Add the set_rate() callback to program the keypad clock. This callback is generalized since the ADC clock (touchscreen) can use the same callback. 7) Use the ep93xx_syscon_swlocked_write() core function for updating the software locked register. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Acked-by: Ryan Mallon <ryan@bluewatersys.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* [ARM] 5577/2: ep93xx: syscon locked register functionsHartley Sweeten2009-07-091-10/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add core functions to handle writes to the ep93xx software locked registers. There are a number of registers in the EP93xx System Controller that require a write to the software lock register before they can be updated. This patch adds a number of exported functions to the ep93xx core that handle this access. The software locked clock divider registers, VidClkDiv, MIRClkDiv, I2SClkDiv and KeyTchClkDiv would typically involve writing a specific value to the register. To support this the ep93xx_syscon_swlocked_write() function is provided. For the DeviceCfg register it's more typical to only need to set or clear a single bit. A generic ep93xx_devcfg_set_clear() function is provided to handle both operations. Two inline functions, ep93xx_devcfg_set_bits() and ep93xx_devcfg_clear_bits() are also provided to improve code readability. In addition, the remaining bits in the System Controller Device Config Register have been documented and the previously defined names shortened. All code paths that use this functionality have been updated except for arch/arm/kernel/crunch.c. That code is in a context switch path, which is not reentrant, so it is safe against itself. Cc: Lennert Buytenhek <buytenh@wantstofly.org> Cc: Matthias Kaehlcke <matthias@kaehlcke.net> Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Acked-by: Ryan Mallon <ryan@bluewatersys.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* [ARM] 5552/1: ep93xx get_uart_rate(): use EP93XX_SYSCON_PWRCNT and ↵Matthias Kaehlcke2009-06-111-2/+2
| | | | | | | | | | | EP93XX_SYSCON_PWRCN ep93xx: get_uart_rate() uses the constants EP93XX_SYSCON_CLOCK_CONTROL and EP93XX_SYSCON_CLOCK_UARTBAUD, which no longer exist. Use EP93XX_SYSCON_PWRCNT and EP93XX_SYSCON_PWRCNT_UARTBAUD instead Signed-off-by: Matthias Kaehlcke <matthias@kaehlcke.net> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* Merge branch 'ep93xx' into develRussell King2009-06-101-27/+27
|\
| * [ARM] 5528/1: ep93xx: add defines for dma clock magic numbersHartley Sweeten2009-05-291-26/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Update the dma clocks so that the magic numbers are named. All the dma clocks have an enable bit to turn them on/off as needed. Currently these bits are in the code as "magic" numbers. This changes all of them to named defines to improve code readability. Also, the EP93XX_SYSCON_CLOCK_CONTROL register is improperly named. In the EP93xx User's Guide this register is called PwrCnt (Power Control). All of the uses of this register are associated with the clock support so this patch also modifies the names to match the User's Guide. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
| * [ARM] 5526/1: ep93xx: usb driver cleanupHartley Sweeten2009-05-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Cleanup the ohci-ep93xx driver. 1) Use the usb.h dbg() macro instead of pr_debug() so that the source filename is prefixed to the message and it is terminated with a linefeed. 2) Add error handling for the clk_get() call. 3) Update clkdev support so that the usb clock is matched by the dev_id instead of the con_id. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* | [ARM] 5509/1: ep93xx: clkdev enable UARTSHartley Sweeten2009-05-161-8/+61
|/ | | | | | | | | | | | | | | | | | | Fix the clkdev API support for the ep93xx uart clocks. The uarts available in the ep93xx have individual clock controls. The current implementation assumes that the bootloader has enabled the clocks before the kernel has booted. It also assumes that the bootloader has set the UARTBAUD bit indicating that the uarts are running off the 14.7456MHz external crystal. This fixes both issues. It also allows the uart clocks to be stopped when there are no users. Tested-by: Matthias Kaehlcke <matthias@kaehlcke.net> Cc: Ryan Mallon <ryan@bluewatersys.com> Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* [ARM] 5413/1: Add ep93xx dma m2p clocksRyan Mallon2009-02-271-0/+79
| | | | | | | | Add the clocks for ep93xx m2p dma engine. Signed-off-by: Ryan Mallon <ryan@bluewatersys.com> Acked-by: Lennert Buytenhek <buytenh@wantstofly.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* [ARM] ep93xx: convert to clkdev and match clocks by struct device where possibleRussell King2008-11-301-45/+23
| | | | Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* [ARM] Convert asm/io.h to linux/io.hRussell King2008-09-061-1/+1
| | | | Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* [ARM] Move include/asm-arm/arch-* to arch/arm/*/include/machRussell King2008-08-071-1/+1
| | | | | | This just leaves include/asm-arm/plat-* to deal with. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* [ARM] Remove asm/hardware.h, use asm/arch/hardware.h insteadRussell King2008-08-071-1/+1
| | | | | | | | | Remove includes of asm/hardware.h in addition to asm/arch/hardware.h. Then, since asm/hardware.h only exists to include asm/arch/hardware.h, update everything to directly include asm/arch/hardware.h and remove asm/hardware.h. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* [ARM] 5171/1: ep93xx: fix compilation of modules using clocksDmitry Baryshkov2008-07-101-0/+5
| | | | | Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* [ARM] Convert AMBA PL010 driver to use the clk infrastructureRussell King2007-04-221-0/+5
| | | | | | | Convert the AMBA PL010 serial driver to use the clock infrastructure to allow EP93xx platforms to properly gate the clock to the UARTs. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* [ARM] 4120/1: ep93xx: make clock init an arch_initcall()Lennert Buytenhek2007-02-081-1/+5
| | | | | Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* [ARM] 3634/1: ep93xx: initial implementation of the clk_* APILennert Buytenhek2006-06-241-0/+156
Patch from Lennert Buytenhek Add an initial implementation of the clk_* API for the cirrus ep93xx to the tree. The initial implementation is somewhat minimal, with the intention of extending it as we go along. Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
OpenPOWER on IntegriCloud