aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap1/clock.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-03-04 16:15:48 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-03-04 16:15:48 -0500
commit42270035c6550101f7dc742a630c2590dd2d3ae0 (patch)
tree7b3d198f01b5c4c6b64f4cedf747f729438b7247 /arch/arm/mach-omap1/clock.c
parent2c89a8d09f03bc569d3237d97e2293d67c36d75d (diff)
parent8d91cbad8e6fd5b37bf584740f134508709ba035 (diff)
Merge master.kernel.org:/home/rmk/linux-2.6-arm
* master.kernel.org:/home/rmk/linux-2.6-arm: (30 commits) [ARM] Acorn: move the i2c bus driver into drivers/i2c [ARM] ARM SCSI: Don't try to dma_map_sg too many scatterlist entries [ARM] ARM FAS216: don't modify scsi_cmnd request_bufflen [ARM] rtc-pcf8583: Final fixes for this RTC on RiscPC [ARM] rtc-pcf8583: correct month and year offsets [ARM] rtc-pcf8583: don't use BCD_TO_BIN/BIN_TO_BCD [ARM] EBSA110: Work around build errors [ARM] 4241/1: Define mb() as compiler barrier on a uniprocessor system [ARM] 4239/1: S3C24XX: Update kconfig entries for PM [ARM] 4238/1: S3C24XX: docs: update suspend and resume [ARM] 4237/2: oprofile: Always allow backtraces on ARM [ARM] Yet more asm/apm-emulation.h stuff ARM: OMAP: Add missing get_irqnr_preamble and arch_ret_to_user for omap2 ARM: OMAP: Use linux/delay.h not asm/delay.h ARM: OMAP: Remove obsolete alsa typedefs ARM: OMAP: omap1510->15xx conversions needed for sx1 ARM: OMAP: Add missing includes to board-nokia770 ARM: OMAP: Workqueue changes for board-h4.c ARM: OMAP: dmtimer.c omap1 register fix ARM: OMAP: board-nokia770: correct lcd name ...
Diffstat (limited to 'arch/arm/mach-omap1/clock.c')
-rw-r--r--arch/arm/mach-omap1/clock.c20
1 files changed, 13 insertions, 7 deletions
diff --git a/arch/arm/mach-omap1/clock.c b/arch/arm/mach-omap1/clock.c
index 638490e62d5f..f625f6dd228a 100644
--- a/arch/arm/mach-omap1/clock.c
+++ b/arch/arm/mach-omap1/clock.c
@@ -432,8 +432,7 @@ static int omap1_clk_enable(struct clk *clk)
432 } 432 }
433 433
434 if (clk->flags & CLOCK_NO_IDLE_PARENT) 434 if (clk->flags & CLOCK_NO_IDLE_PARENT)
435 if (!cpu_is_omap24xx()) 435 omap1_clk_deny_idle(clk->parent);
436 omap1_clk_deny_idle(clk->parent);
437 } 436 }
438 437
439 ret = clk->enable(clk); 438 ret = clk->enable(clk);
@@ -454,8 +453,7 @@ static void omap1_clk_disable(struct clk *clk)
454 if (likely(clk->parent)) { 453 if (likely(clk->parent)) {
455 omap1_clk_disable(clk->parent); 454 omap1_clk_disable(clk->parent);
456 if (clk->flags & CLOCK_NO_IDLE_PARENT) 455 if (clk->flags & CLOCK_NO_IDLE_PARENT)
457 if (!cpu_is_omap24xx()) 456 omap1_clk_allow_idle(clk->parent);
458 omap1_clk_allow_idle(clk->parent);
459 } 457 }
460 } 458 }
461} 459}
@@ -471,7 +469,7 @@ static int omap1_clk_enable_generic(struct clk *clk)
471 if (unlikely(clk->enable_reg == 0)) { 469 if (unlikely(clk->enable_reg == 0)) {
472 printk(KERN_ERR "clock.c: Enable for %s without enable code\n", 470 printk(KERN_ERR "clock.c: Enable for %s without enable code\n",
473 clk->name); 471 clk->name);
474 return 0; 472 return -EINVAL;
475 } 473 }
476 474
477 if (clk->flags & ENABLE_REG_32BIT) { 475 if (clk->flags & ENABLE_REG_32BIT) {
@@ -651,10 +649,18 @@ int __init omap1_clk_init(void)
651 int crystal_type = 0; /* Default 12 MHz */ 649 int crystal_type = 0; /* Default 12 MHz */
652 u32 reg; 650 u32 reg;
653 651
652#ifdef CONFIG_DEBUG_LL
653 /* Resets some clocks that may be left on from bootloader,
654 * but leaves serial clocks on.
655 */
656 omap_writel(0x3 << 29, MOD_CONF_CTRL_0);
657#endif
658
654 /* USB_REQ_EN will be disabled later if necessary (usb_dc_ck) */ 659 /* USB_REQ_EN will be disabled later if necessary (usb_dc_ck) */
655 reg = omap_readw(SOFT_REQ_REG) & (1 << 4); 660 reg = omap_readw(SOFT_REQ_REG) & (1 << 4);
656 omap_writew(reg, SOFT_REQ_REG); 661 omap_writew(reg, SOFT_REQ_REG);
657 omap_writew(0, SOFT_REQ_REG2); 662 if (!cpu_is_omap15xx())
663 omap_writew(0, SOFT_REQ_REG2);
658 664
659 clk_init(&omap1_clk_functions); 665 clk_init(&omap1_clk_functions);
660 666
@@ -685,7 +691,7 @@ int __init omap1_clk_init(void)
685 691
686 info = omap_get_config(OMAP_TAG_CLOCK, struct omap_clock_config); 692 info = omap_get_config(OMAP_TAG_CLOCK, struct omap_clock_config);
687 if (info != NULL) { 693 if (info != NULL) {
688 if (!cpu_is_omap1510()) 694 if (!cpu_is_omap15xx())
689 crystal_type = info->system_clock_type; 695 crystal_type = info->system_clock_type;
690 } 696 }
691 697