diff options
author | Paul Mundt <lethal@linux-sh.org> | 2011-01-12 14:47:21 +0900 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2011-01-12 14:47:21 +0900 |
commit | 53582c4c508a95ece9f7c907edef9911c7eb79eb (patch) | |
tree | c099e9880f7bf7d60e87dfa6a19cb4e8780ec860 /arch/blackfin/mach-bf527/include/mach/pll.h | |
parent | 6ae1e19dbb43ff0d429a9f45087c513212686836 (diff) | |
parent | da97da73d418533187a8390cf6541f48bed653e8 (diff) | |
download | talos-op-linux-53582c4c508a95ece9f7c907edef9911c7eb79eb.tar.gz talos-op-linux-53582c4c508a95ece9f7c907edef9911c7eb79eb.zip |
Merge branch 'rmobile/sdio' into rmobile-latest
Diffstat (limited to 'arch/blackfin/mach-bf527/include/mach/pll.h')
-rw-r--r-- | arch/blackfin/mach-bf527/include/mach/pll.h | 64 |
1 files changed, 1 insertions, 63 deletions
diff --git a/arch/blackfin/mach-bf527/include/mach/pll.h b/arch/blackfin/mach-bf527/include/mach/pll.h index 24f1d7c02325..94cca674d835 100644 --- a/arch/blackfin/mach-bf527/include/mach/pll.h +++ b/arch/blackfin/mach-bf527/include/mach/pll.h @@ -1,63 +1 @@ -/* - * Copyright 2007-2008 Analog Devices Inc. - * - * Licensed under the GPL-2 or later - */ - -#ifndef _MACH_PLL_H -#define _MACH_PLL_H - -#include <asm/blackfin.h> -#include <asm/irqflags.h> - -/* Writing to PLL_CTL initiates a PLL relock sequence. */ -static __inline__ void bfin_write_PLL_CTL(unsigned int val) -{ - unsigned long flags, iwr0, iwr1; - - if (val == bfin_read_PLL_CTL()) - return; - - flags = hard_local_irq_save(); - /* Enable the PLL Wakeup bit in SIC IWR */ - iwr0 = bfin_read32(SIC_IWR0); - iwr1 = bfin_read32(SIC_IWR1); - /* Only allow PPL Wakeup) */ - bfin_write32(SIC_IWR0, IWR_ENABLE(0)); - bfin_write32(SIC_IWR1, 0); - - bfin_write16(PLL_CTL, val); - SSYNC(); - asm("IDLE;"); - - bfin_write32(SIC_IWR0, iwr0); - bfin_write32(SIC_IWR1, iwr1); - hard_local_irq_restore(flags); -} - -/* Writing to VR_CTL initiates a PLL relock sequence. */ -static __inline__ void bfin_write_VR_CTL(unsigned int val) -{ - unsigned long flags, iwr0, iwr1; - - if (val == bfin_read_VR_CTL()) - return; - - flags = hard_local_irq_save(); - /* Enable the PLL Wakeup bit in SIC IWR */ - iwr0 = bfin_read32(SIC_IWR0); - iwr1 = bfin_read32(SIC_IWR1); - /* Only allow PPL Wakeup) */ - bfin_write32(SIC_IWR0, IWR_ENABLE(0)); - bfin_write32(SIC_IWR1, 0); - - bfin_write16(VR_CTL, val); - SSYNC(); - asm("IDLE;"); - - bfin_write32(SIC_IWR0, iwr0); - bfin_write32(SIC_IWR1, iwr1); - hard_local_irq_restore(flags); -} - -#endif /* _MACH_PLL_H */ +#include <mach-common/pll.h> |