Path: blob/master/arch/blackfin/mach-bf561/include/mach/pll.h
10820 views
/*1* Copyright 2005-2010 Analog Devices Inc.2*3* Licensed under the GPL-2 or later.4*/56#ifndef _MACH_PLL_H7#define _MACH_PLL_H89#ifndef __ASSEMBLY__1011#ifdef CONFIG_SMP1213#include <asm/blackfin.h>14#include <asm/irqflags.h>15#include <mach/irq.h>1617#define SUPPLE_0_WAKEUP ((IRQ_SUPPLE_0 - (IRQ_CORETMR + 1)) % 32)1819static inline void20bfin_iwr_restore(unsigned long iwr0, unsigned long iwr1, unsigned long iwr2)21{22unsigned long SICA_SICB_OFF = ((bfin_read_DSPID() & 0xff) ? 0x1000 : 0);2324bfin_write32(SIC_IWR0 + SICA_SICB_OFF, iwr0);25bfin_write32(SIC_IWR1 + SICA_SICB_OFF, iwr1);26}27#define bfin_iwr_restore bfin_iwr_restore2829static inline void30bfin_iwr_save(unsigned long niwr0, unsigned long niwr1, unsigned long niwr2,31unsigned long *iwr0, unsigned long *iwr1, unsigned long *iwr2)32{33unsigned long SICA_SICB_OFF = ((bfin_read_DSPID() & 0xff) ? 0x1000 : 0);3435*iwr0 = bfin_read32(SIC_IWR0 + SICA_SICB_OFF);36*iwr1 = bfin_read32(SIC_IWR1 + SICA_SICB_OFF);37bfin_iwr_restore(niwr0, niwr1, niwr2);38}39#define bfin_iwr_save bfin_iwr_save4041static inline void42bfin_iwr_set_sup0(unsigned long *iwr0, unsigned long *iwr1, unsigned long *iwr2)43{44bfin_iwr_save(0, IWR_ENABLE(SUPPLE_0_WAKEUP), 0, iwr0, iwr1, iwr2);45}4647#endif4849#endif5051#include <mach-common/pll.h>5253#endif545556