aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAge
* [ARM] OMAP2: Fix definition of SGX clock register bitsDaniel Stone2009-02-08
| | | | | | | | | | | | | | | The GFX/SGX functional and interface clocks have different masks, for some unknown reason, so split EN_SGX_SHIFT into one each for fclk and iclk. Correct according to the TRM and the far more important 'does this actually work at all?' metric. linux-omap source commit is de1121fdb899f762b9e717f44eaf3fae7c00cd3e. Signed-off-by: Daniel Stone <daniel.stone@nokia.com> Signed-off-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* [ARM] OMAP3 clock: fix 96MHz clocksPaul Walmsley2009-02-08
| | | | | | | | | | | | | | | | Fix some bugs in the OMAP3 clock tree pertaining to the 96MHz clocks. The 96MHz portion of the clock tree should now have reasonable fidelity to the 34xx TRM Rev I. One remaining question mark: it's not clear exactly which 96MHz source clock the USIM uses. This patch sticks with the previous setting, which seems reasonable. linux-omap source commit is 15c706e8179ce238c3ba70a25846a36b73bd2359. Signed-off-by: Paul Walmsley <paul@pwsan.com> Signed-off-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* [ARM] OMAP3: move USBHOST SAR handling from clock framework to powerdomain layerPaul Walmsley2009-02-08
| | | | | | | | | | | | | | | | | | Remove usbhost_sar_fclk from the OMAP3 clock framework. The bit that the clock was tweaking doesn't actually enable or disable a clock; it controls whether the hardware will save and restore USBHOST state when the powerdomain changes state. (That happens to coincidentally enable a clock for the duration of the operation, hence the earlier confusion.) In place of the clock, mark the USBHOST powerdomain as supporting hardware save-and-restore functionality. linux-omap source commit is f3ceac86a9d425d101d606d87a5af44afef27179. Signed-off-by: Paul Walmsley <paul@pwsan.com> Signed-off-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* [ARM] OMAP24xx clock: add missing SSI L4 interface clockPaul Walmsley2009-02-08
| | | | | | | | | | | This patch adds a missing OMAP24xx clock, the SSI L4 interface clock, as "ssi_l4_ick". linux-omap source commit is ace129d39b3107d330d4cf6934385d13521f2fec. Signed-off-by: Paul Walmsley <paul@pwsan.com> Signed-off-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* [ARM] OMAP: Fix sparse, checkpatch warnings in OMAP2/3 PRCM/PM codePaul Walmsley2009-02-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix sparse & checkpatch warnings in OMAP2/3 PRCM & PM code. This mostly consists of: - converting pointer comparisons to integers in form similar to (ptr == 0) to the standard idiom (!ptr) - labeling a few non-static private functions as static - adding prototypes for *_init() functions in the appropriate header files, and getting rid of the corresponding open-coded extern prototypes in other C files - renaming the variable 'sclk' in mach-omap2/clock.c:omap2_get_apll_clkin to avoid shadowing an earlier declaration Clean up checkpatch issues. This mostly involves: - converting some asm/ includes to linux/ includes - cleaning up some whitespace - getting rid of braces for conditionals with single following statements Also take care of a few odds and ends, including: - getting rid of unlikely() and likely() - none of this code is particularly fast-path code, so the performance impact seems slim; and some of those likely() and unlikely() indicators are probably not as accurate as the ARM's branch predictor - removing some superfluous casts linux-omap source commit is 347df59f5d20fdf905afbc26b1328b0e28a8a01b. Signed-off-by: Paul Walmsley <paul@pwsan.com> Signed-off-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* [ARM] OMAP2/3: Add non-CORE DPLL rate set code and M, N programmingPaul Walmsley2009-02-08
| | | | | | | | | | | | | | | | Add non-CORE DPLL rate set code and M,N programming for OMAP3. Connect it to OMAP34xx DPLLs 1, 2, 4, 5 via the clock framework. You may see some warnings on rate sets from the freqsel code. The table that TI presented in the 3430 TRM Rev F does not cover Fint < 750000, which definitely occurs in practice. However, the lack of this freqsel case does not appear to impair the DPLL rate change. linux-omap source commit is 689fe67c6d1ad8f52f7f7b139a3274b79bf3e784. Signed-off-by: Paul Walmsley <paul@pwsan.com> Signed-off-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* [ARM] omap: hsmmc: new short connection id namesRussell King2009-02-08
| | | | | | ... rather than the clock names themselves. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* [ARM] omap: omap24xxcam: use short connection IDs for omap2 clocksRussell King2009-02-08
| | | | Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* [ARM] omap: convert omap RNG clocks to match by devid and conidRussell King2009-02-08
| | | | Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* [ARM] omap: spi: arrange for omap_uwire to use connection IDRussell King2009-02-08
| | | | | | | | ... which now means no driver requests the "armxor_ck" clock directly. Also, fix the error handling for clk_get(), ensuring that we propagate the error returned from clk_get(). Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* [ARM] omap: w1: convert omap HDQ clocks to match by devid and conidRussell King2009-02-08
| | | | Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* [ARM] omap: i2c: remove conditional ick clocksRussell King2009-02-08
| | | | | | | | | By providing a dummy ick for OMAP1510 and OMAP310, we avoid having SoC conditional clock information in i2c-omap.c. Also, fix the error handling by making sure we propagate the error returned via clk_get(). Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* [ARM] omap: i2c: remove armxor_ckRussell King2009-02-08
| | | | | | | On OMAP1, the I2C functional clock (fck) is the armxor_ck, so there's no need to get "armxor_ck" separately. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* [ARM] omap: i2c: use short connection idsRussell King2009-02-08
| | | | Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* [ARM] omap: mcbsp: convert to use fck/ick clocks directlyRussell King2009-02-08
| | | | | | | | | | | | | Rather than introducing a special 'mcbsp_clk' with code behind it in mach-omap*/mcbsp.c to handle the SoC specifics, arrange for the mcbsp driver to be like any other driver. mcbsp requests its fck and ick clocks directly, and the SoC specific code deals with selecting the correct clock. There is one oddity to deal with - OMAP1 fiddles with the DSP clocks and DSP reset, so we move this to the two callback functions. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* [ARM] omap: mcspi: new short connection id namesRussell King2009-02-08
| | | | | | ... rather than the clock names themselves. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* [ARM] omap: MMC: provide a dummy ick for OMAP1Russell King2009-02-08
| | | | | | Eliminate the OMAP1 vs OMAP2 clock knowledge in the MMC driver. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* [ARM] omap: MMC: convert clocks to match by devid and conidRussell King2009-02-08
| | | | | | | | Convert OMAP MMC driver to match clocks using the device ID and a connection ID rather than a clock name. This allows us to eliminate the OMAP1/OMAP2 differences for the function clock. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* [ARM] omap: watchdog: provide a dummy ick for OMAP1Russell King2009-02-08
| | | | | | Eliminate the OMAP1 vs OMAP2 clock knowledge in the watchdog driver. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* [ARM] omap: watchdog: convert clocks to match by devid and conidRussell King2009-02-08
| | | | | | | This eliminates the need for separate OMAP24xx and OMAP34xx clock requesting code sections. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* [ARM] omap: provide a dummy clock nodeRussell King2009-02-08
| | | | | | | | By providing a dummy clock node, we can eliminate the SoC conditional clock handing in the OMAP drivers, moving this knowledge out of the driver and into the machine clock support code. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* [ARM] omap: remove pre-CLKDEV clk_get/clk_putRussell King2009-02-08
| | | | Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* [ARM] omap: convert OMAP3 to use clkdevRussell King2009-02-08
| | | | Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* [ARM] omap: convert OMAP2 to use clkdevRussell King2009-02-08
| | | | Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* [ARM] omap: convert OMAP1 to use clkdevRussell King2009-02-08
| | | | Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* [ARM] omap: allow double-registering of clocksRussell King2009-02-08
| | | | | | | | This stops things blowing up if a 'struct clk' to be passed more than once to clk_register(), which will be required when we decouple struct clk's from their names. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* [ARM] omap: ensure devname is set for dummy devicesRussell King2009-02-08
| | | | | | This is needed to use these with the clkdev helpers. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* [ARM] omap: handle RATE_CKCTL via .set_rate/.round_rate methodsRussell King2009-02-08
| | | | | | | | | | It makes no sense to have the CKCTL rate selection implemented as a flag and a special exception in the top level set_rate/round_rate methods. Provide CKCTL set_rate/round_rate methods, and use these for where ever RATE_CKCTL is used and they're not already overridden. This allows us to remove the RATE_CKCTL flag. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* [ARM] omap: move propagate_rate() calls into generic omap clock codeRussell King2009-02-08
| | | | | | | | | propagate_rate() is recursive, so it makes sense to minimise the amount of stack which is used for each recursion. So, rather than recursing back into it from the ->recalc functions if RATE_PROPAGATES is set, do that test at the higher level. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* [ARM] omap: remove unnecessary calls to propagate_rate()Russell King2009-02-08
| | | | | | | | | We've always called propagate_rate() in the parent function to the .set_rate methods, so there's no point having the .set_rate methods also call this heavy-weight function - it's mere duplication of what's happening elsewhere. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* [ARM] omap: move clock propagation into core omap clock codeRussell King2009-02-08
| | | | | | | | Move the clock propagation calls for set_parent and set_rate into the core omap clock code, rather than having these calls scattered throughout the OMAP1 and OMAP2 implementations. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* [ARM] omap: provide a standard clk_get_parent() implementationRussell King2009-02-08
| | | | | | which only has to return clk->parent. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* [ARM] omap: remove clk_deny_idle and clk_allow_idleRussell King2009-02-08
| | | | | | | Nothing makes any use of these functions, so there's little point in providing them. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* [ARM] omap: rearrange clock.h structure orderRussell King2009-02-08
| | | | | | | | ... to eliminate unnecessary padding. We have rather a lot of these structures, so eliminating unnecessary padding results in a saving of 1488 bytes. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* [ARM] omap: remove clk->ownerRussell King2009-02-08
| | | | | | | clk->owner is always NULL, so its existence doesn't serve any useful function other than bloating the kernel by 992 bytes. Remove it. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* [ARM] omap: don't use clkops_omap2_dflt_wait for non-ICLK/FCLK clocksRussell King2009-02-08
| | | | | | | | | | | | | | | | | The original code in omap2_clk_wait_ready() used to check the low 8 bits to determine whether they were within the FCLKEN or ICLKEN registers. Specifically, the test is satisfied when these offsets are used: CM_FCLKEN, CM_FCLKEN1, CM_CLKEN, OMAP24XX_CM_FCLKEN2, CM_ICLKEN, CM_ICLKEN1, CM_ICLKEN2, CM_ICLKEN3, OMAP24XX_CM_ICLKEN4 OMAP3430_CM_CLKEN_PLL, OMAP3430ES2_CM_CLKEN2 If one of these offsets isn't used, omap2_clk_wait_ready() merely returns without doing anything. So we should use the non-wait clkops version instead and eliminate that conditional. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* [ARM] omap: eliminate unnecessary conditionals in omap2_clk_wait_readyRussell King2009-02-08
| | | | | | | | | | Rather than employing run-time tests in omap2_clk_wait_ready() to decide whether we need to wait for the clock to become ready, we can set the .ops appropriately. This change deals with the OMAP24xx and OMAP34xx conditionals only. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* [ARM] omap: add default .ops to all remaining OMAP2 clocksRussell King2009-02-08
| | | | Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* [ARM] omap: kill PARENT_CONTROLS_CLOCKRussell King2009-02-08
| | | | | | | | PARENT_CONTROLS_CLOCK just makes enable/disable no-op, and is functionally an alias for ALWAYS_ENABLED. This can be handled in the same way, using clkops_null. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* [ARM] omap: provide a NULL clock operations structureRussell King2009-02-08
| | | | | | | | ... and use it for clocks which are ALWAYS_ENABLED. These clocks use a non-NULL enable_reg pointer for other purposes (such as selecting clock rates.) Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* [ARM] omap: introduce clock operations structureRussell King2009-02-02
| | | | | | | Collect up all the common enable/disable clock operation functions into a separate operations structure. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* [ARM] omap: remove VIRTUAL_CLOCKRussell King2009-02-02
| | | | | | | Nothing tests the clock flags for this bit, so it serves no purpose. Remove it. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* Merge branch 'omap-fixes' of ↵Russell King2009-02-01
|\ | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6
| * ARM: OMAP: fix fault in enter_full_retention()Kevin Hilman2009-01-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In omap24xx_cpu_suspend assembly routine, the r2 register which holds the address of the SDRC_POWER reg is set to zero before the value is written back triggering a fault due to writing to address zero. It's hard to tell where this change was introduced since this file has been moved and merged. While this fix prevents a crash, suspend on my n810 is broken with current kernels. I never come out of suspend. Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
| * ARM: OMAP: Mask interrupts when disabling interrupts, v2김규원2009-01-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | By Ingo Molnar, interrupts are not masked by default. (refer to 76d2160147f43f982dfe881404cfde9fd0a9da21) But if interrupts are not masked, the processor can wake up while in Suspend-to-RAM state by an external interrupt. For example, if an OMAP3 board is connected to Host PC by USB and entered to Suspend-to-RAM state, it wake up automatically by M_IRQ_92. The disable_irq() function can't disable the interrupt in H/W level, So I modified arch/arm/mach-omap2/irq.c Signed-off-by: Kim Kyuwon <chammoru@gmail.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
| * ARM: OMAP: gptimer min_delta_ns correctedAaro Koskinen2009-01-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When 32 kHz timer is used the min_delta_ns should be initialized so that it reflects the timer programming cost. A write to the timer device will be usually posted, but it takes roughly 3 cycles before it is effective. If the timer is reprogrammed before that, the CPU will stall until the previous write completes. This was pointed out by Richard Woodruff. Since the lower bound for min_delta_ns is 1000, the change is visible only with tick rates less than 3 MHz. Also note that the old value is incorrect for 32 kHz also due to a rounding error, and it can cause the timer queue to hang (due to clockevent code trying to program the timer with zero ticks). Signed-off-by: Aaro Koskinen <Aaro.Koskinen@nokia.com> Reviewed-by: Richard Woodruff <r-woodruff2@ti.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
| * ARM: OMAP: Fix hsmmc init, v2Tony Lindgren2009-01-29
| | | | | | | | | | | | | | | | | | | | The naming accidentally broke while changing the name for the driver to not to conflict with the other mmc driver. Signed-off-by: Tony Lindgren <tony@atomide.com>
| * ARM: OMAP: Fix omap34xx revision detection for ES3.1Tony Lindgren2009-01-29
| | | | | | | | | | | | | | | | | | Fix omap34xx revision detection for ES3.1 Signed-off-by: Tony Lindgren <tony@atomide.com>
| * ARM: OMAP: DMA: Fix uninitialized channel flagsJarkko Nikula2009-01-29
| | | | | | | | | | | | | | | | | | | | | | This has similar symptoms than 66c23551b1b774e2be3c7bdf91c0ebf2c7a3519e where just omap_request_dma, omap_dma_link_lch and omap_dma_unlink_lch can cause incorrect dump_stack(). Here it can happen if channel has been used before and the channel flags variable holds old status. Signed-off-by: Jarkko Nikula <jarkko.nikula@nokia.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
| * ARM: OMAP: Fix race in OMAP2/3 DMA IRQ handlingJuha Yrjola2009-01-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | CSR must be cleared before invoking the callback. If the callback function starts a new, fast DMA transfer on the same channel, the completion status might lost if CSR is cleared after the callback invocation. Signed-off-by: Juha Yrjola <juha.yrjola@solidboot.com> Signed-off-by: Tony Lindgren <tony@atomide.com>