summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap1/clock.c
Commit message (Collapse)AuthorAgeFilesLines
* omap1: omap_udc: Add clocking and disable vbus sense for omap7xxCory Maccarrone2009-11-221-1/+2
| | | | | | | | | | | | | | | | | | | | The l3_ocpi_ck clock is needed on omap7xx processors for USB. Additionally, bit 8 of the SOFT_REQ_REG needs to be enabled for the usb_dc_ck on omap7xx, which is a different bit than that of the omap16xx-defined clock of the same name. I added a provision for the usb_dc_ck and l3_ocpi_ck clocks as dc_clk and hhc_clk, respectively, for omap7xx CPUs. Additionally, I added a check in machine_without_vbus_sense for all omap7xx devices, as presently I know of no omap7xx-based devices that have vbus sense, and it made more sense to me to use a cpu check here than to spell out each machine one at a time. Finally, DMA is disabled for omap7xx, as it causes problems with these chips. Cc: linux-usb@vger.kernel.org Cc: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Cory Maccarrone <darkstar6262@gmail.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
* omap1: mmc: Add platform init for omap7xxCory Maccarrone2009-11-221-1/+2
| | | | | | | | | | | | | | | | | | | | | | The MMC mux pins normally used by omap chips in devices.c are different from what is needed by omap7xx chips. This change adds a conditional around the mux setup code to enable the correct mux pins. The omap730 and omap850 both use a different clock for the "fck" clock of the MMC interface than other omap processors based on the SOFT_REQ_REG, pin 12. The "ick" clock is the same as that used by other omap processors. * Added the missing clock definition as mmc3_ck to clock.h * Added the clock definition to omap_clks in clock.c * Added CK_7XX to the mmci-omap.0 "ick" clock already in clock.c With these changes, it is now possible to initialize and use MMC cards with omap730 and omap850 devices. Signed-off-by: Cory Maccarrone <darkstar6262@gmail.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
* omap: headers: Move remaining headers from include/mach to include/platTony Lindgren2009-10-201-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move the remaining headers under plat-omap/include/mach to plat-omap/include/plat. Also search and replace the files using these headers to include using the right path. This was done with: #!/bin/bash mach_dir_old="arch/arm/plat-omap/include/mach" plat_dir_new="arch/arm/plat-omap/include/plat" headers=$(cd $mach_dir_old && ls *.h) omap_dirs="arch/arm/*omap*/ \ drivers/video/omap \ sound/soc/omap" other_files="drivers/leds/leds-ams-delta.c \ drivers/mfd/menelaus.c \ drivers/mfd/twl4030-core.c \ drivers/mtd/nand/ams-delta.c" for header in $headers; do old="#include <mach\/$header" new="#include <plat\/$header" for dir in $omap_dirs; do find $dir -type f -name \*.[chS] | \ xargs sed -i "s/$old/$new/" done find drivers/ -type f -name \*omap*.[chS] | \ xargs sed -i "s/$old/$new/" for file in $other_files; do sed -i "s/$old/$new/" $file done done for header in $(ls $mach_dir_old/*.h); do git mv $header $plat_dir_new/ done Signed-off-by: Tony Lindgren <tony@atomide.com>
* OMAP7XX: Clocks: Add ck_ref and armxorAngelo Arrifano2009-10-071-2/+2
| | | | | | | | These clocks are required for booting. Signed-off-by: Angelo Arrifano <miknix@gmail.com> Signed-off-by: Alistair Buxton <a.j.buxton@gmail.com> Reviewed-by: Zebediah C. McClure <zmc@lurian.net>
* OMAP7XX: Rename all the rest of the omap730 references in omap1 coreAlistair Buxton2009-10-071-4/+4
| | | | | | | | | | | This patch is part of a series which removes references to omap730 in code which is shared with omap850, replacing them with references to omap7xx. This updates all the remaining omap730 references in miscellaneous local variables, macros and similar. Signed-off-by: Alistair Buxton <a.j.buxton@gmail.com> Reviewed-by: Zebediah C. McClure <zmc@lurian.net>
* OMAP7XX: Update core omap1 files to use omap7xx.hAlistair Buxton2009-10-071-1/+1
| | | | | | | | This patch is part of a series which removes references to omap730 in code which is shared with omap850, replacing them with references to omap7xx. Signed-off-by: Alistair Buxton <a.j.buxton@gmail.com> Reviewed-by: Zebediah C. McClure <zmc@lurian.net>
* OMAP7XX: Clocks: Add omap850 supportAlistair Buxton2009-10-071-5/+5
| | | | | | | | | | | | This patch is part of a series which unifies all duplicated code between omap730 and omap850. All cpu checks are converted to cpu_is_omap7xx() and CONFIG_ARCH_OMAP850 is added to all CONFIG_ARCH_OMAP730 checks. This file had no omap850 specific code. Initial clock support was done in the Linwizard tree by Zebediah C. McClure. Signed-off-by: Alistair Buxton <a.j.buxton@gmail.com> Reviewed-by: Zebediah C. McClure <zmc@lurian.net>
* OMAP2xxx clock: rename clk_init_one() to clk_preinit()Paul Walmsley2009-05-121-1/+1
| | | | | | Rename clk_init_one() to clk_preinit() to distinguish its function from clk_init() and the individual struct clk init functions. Signed-off-by: Paul Walmsley <paul@pwsan.com>
* [ARM] omap: fix omap1 clock usecount decrement bugRussell King2009-04-061-10/+11
| | | | | | Same fix as per a7f8c59, but for OMAP1 instead. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* [ARM] omap: arrange for clock recalc methods to return the rateRussell King2009-02-141-20/+12
| | | | | | | | | | | | | linux-omap source commit 33d000c99ee393fe2042f93e8422f94976d276ce introduces a way to "dry run" clock changes before they're committed. However, this involves putting logic to handle this into each and every recalc function, and unfortunately due to the caching, led to some bugs. Solve both of issues by making the recalc methods always return the clock rate for the clock, which the caller decides what to do with. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* [ARM] omap: create a proper tree of clocksRussell King2009-02-081-0/+3
| | | | | | | | | | | Traditionally, we've tracked the parent/child relationships between clk structures by setting the child's parent member to point at the upstream clock. As a result, when decending the tree, we have had to scan all clocks to find the children. Avoid this wasteful scanning by keeping a list of the clock's children. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* [ARM] omap: Fix omap1 clock issuesTony Lindgren2009-02-081-54/+23
| | | | | | | | | | | | | | | | | | This fixes booting, and is a step toward fixing things properly: - Make enable_reg u32 instead of u16 [rmk: virtual addresses are void __iomem *, not u32] - Get rid of VIRTUAL_IO_ADDRESS for clocks - Use __raw_read/write instead of omap_read/write for clock registers This patch adds a bunch of compile warnings until omap1 clock also uses offsets. linux-omap source commit is 9d1dff8638c9e96a401e1885f9948662e9ff9636. Signed-off-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Paul Walmsley <paul@pwsan.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* [ARM] omap: spi: arrange for omap_uwire to use connection IDRussell King2009-02-081-0/+1
| | | | | | | | ... 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: i2c: remove conditional ick clocksRussell King2009-02-081-0/+1
| | | | | | | | | 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: use short connection idsRussell King2009-02-081-2/+2
| | | | Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* [ARM] omap: mcbsp: convert to use fck/ick clocks directlyRussell King2009-02-081-0/+9
| | | | | | | | | | | | | 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: MMC: provide a dummy ick for OMAP1Russell King2009-02-081-0/+2
| | | | | | 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-081-2/+2
| | | | | | | | 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-081-0/+2
| | | | | | 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-081-1/+1
| | | | | | | 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-081-0/+20
| | | | | | | | 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: convert OMAP1 to use clkdevRussell King2009-02-081-23/+94
| | | | Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* [ARM] omap: handle RATE_CKCTL via .set_rate/.round_rate methodsRussell King2009-02-081-51/+45
| | | | | | | | | | 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-081-6/+0
| | | | | | | | | 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-081-8/+1
| | | | | | | | | 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-081-3/+0
| | | | | | | | 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 NULL clock operations structureRussell King2009-02-081-3/+0
| | | | | | | | ... 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-021-3/+27
| | | | | | | 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>
* Merge branch 'omap-all' into develRussell King2008-10-141-5/+5
|\ | | | | | | | | | | | | Conflicts: arch/arm/mach-omap2/gpmc.c arch/arm/mach-omap2/irq.c
| * [ARM] omap: fix lots of 'Using plain integer as NULL pointer'Russell King2008-09-051-4/+4
| | | | | | | | Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
| * [ARM] omap: DSP registers don't need to be castedRussell King2008-09-051-1/+1
| | | | | | | | | | | | | | We're now assigning/comparing void __iomem pointers with void __iomem pointer variables. 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-4/+4
| | | | | | This just leaves include/asm-arm/plat-* to deal with. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* ARM: OMAP1: Change the comments to C styleDavid Cohen2008-02-081-4/+3
| | | | | | | Change the comments to C style Signed-off-by: David Cohen <david.cohen@indt.org.br> Signed-off-by: Tony Lindgren <tony@atomide.com>
* ARM: OMAP: add SoSSI clockImre Deak2007-09-201-0/+34
| | | | | | | | This is needed, so that disabling the SoSSI clock during idle can be prevented. Signed-off-by: Imre Deak <imre.deak@solidboot.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
* ARM: OMAP: omap1510->15xx conversions needed for sx1Vladimir Ananiev2007-03-021-1/+1
| | | | | | | Convert 1510->15xx in generic omap code, so that sx1 can work. Signed-off-by: Pavel Machek <pavel@suse.cz> Signed-off-by: Tony Lindgren <tony@atomide.com>
* ARM: OMAP: Fix CONFIG_DEBUG_LLDirk Behme2007-03-021-0/+7
| | | | | | | | | | | | | | Fix broken CONFIG_DEBUG_LL. In case of low level debugging reconfigure some clocks early. See http://source.mvista.com/git/gitweb.cgi?p=linux-omap-2.6.git;a=commitdiff;h=3bfb289ccc6c4624fd5ff0381546935e105f4093 too. Signed-off-by: Dirk Behme <dirk.behme_at_gmail.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
* ARM: OMAP: Fix warning in clock.cDirk Behme2007-03-021-6/+4
| | | | | | | | | | | | Fix warning: arch/arm/mach-omap1/clock.c: In function 'omap1_clk_enable_generic': arch/arm/mach-omap1/clock.c:499: warning: 'return' with no value, in function returning non-void Signed-off-by: Dirk Behme <dirk.behme_at_gmail.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
* ARM: OMAP: correct misc 15xx and non-15xx platform codeAndrzej Zaborowski2007-03-021-2/+3
| | | | | | | | | | | | | | | Disable accesses to SOFT_REQ_REG2 and ULPD_SOFT_DISABLE_REQ_REG registers for 15xx processors that don't have these registers. Enable level 2 interrupt handler for processors that identify as OMAP 15xx (e.g 310) and not 1510 specifically. Also fix the following compiler warning (only visible with CONFIG_OMAP_RESET_CLOCKS): arch/arm/mach-omap1/clock.c: In function 'omap1_clk_disable_unused': arch/arm/mach-omap1/clock.c:634: warning: 'return' with a value, in function returning void Signed-off-by: Andrzej Zaborowski <balrog@zabor.org> Signed-off-by: Tony Lindgren <tony@atomide.com>
* ARM: OMAP: Sync clocks with linux-omap treeTony Lindgren2006-09-251-59/+48
| | | | | | | Mostly clean up CONFIG_OMAP_RESET_CLOCKS. Also includes a patch from Imre Deak to make McSPI clocks use id. Signed-off-by: Tony Lindgren <tony@atomide.com>
* ARM: OMAP: Add core fsample supportBrian Swetland2006-06-261-4/+14
| | | | | | | This patch adds core support for the TI F-Sample Board (OMAP 850). Signed-off-by: Brian Swetland <swetland@google.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
* [ARM] 3426/1: ARM: OMAP: 1/8 Update clock frameworkTony Lindgren2006-04-021-2/+7
| | | | | | | | | | | | | | | Patch from Tony Lindgren Update OMAP clock framework from linux-omap tree. The highlights of the patch are: - Add support for omap730 clocks by Andrzej Zaborowski - Fix compile warnings by Dirk Behme - Add support for using dev id by Tony Lindgren and Komal Shah - Move memory timings and PRCM into separate files by Tony Lindgren Signed-off-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* ARM: OMAP: 2/4 Fix clock framework to use clk_enable/disable for omap1Tony Lindgren2006-01-171-22/+22
| | | | | | | This patch fixes OMAP clock framework to use clk_enable/disable instead of clk_use/unuse as specified in include/linux/clk.h. Signed-off-by: Tony Lindgren <tony@atomide.com>
* [ARM] Move asm/hardware/clock.h to linux/clk.hRussell King2006-01-071-1/+1
| | | | | | | This is needs to be visible to other architectures using the AMBA bus and peripherals. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* [ARM] 3141/1: OMAP 1/5: Update omap1 specific filesTony Lindgren2005-11-101-0/+792
Patch from Tony Lindgren This patch syncs the mainline kernel with linux-omap tree. The highlights of the patch are: - Omap1 serial pport and framebuffer init updates by Imre Deak - Add support for omap310 processor and Palm Tungsten E PDA by Laurent Gonzales, Romain Goyet, et al. Omap310 and omap1510 processors are now handled as omap15xx. - Omap1 specific changes to shared omap clock framework by Tony Lindgren - Omap1 specific changes to shared omap pin mux framework by Tony Lindgren - Other misc fixes, such as update memory timings for smc91x, omap1 specific device initialization etc. Signed-off-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
OpenPOWER on IntegriCloud