Replace the bubble sort in sanitize_e820_map() with a call to the generic
[linux-2.6/next.git] / arch / blackfin / mach-bf561 / include / mach / pll.h
blob7977db2f1c1268d15d0f0b7092401f32abd41db3
1 /*
2 * Copyright 2005-2010 Analog Devices Inc.
4 * Licensed under the GPL-2 or later.
5 */
7 #ifndef _MACH_PLL_H
8 #define _MACH_PLL_H
10 #ifndef __ASSEMBLY__
12 #ifdef CONFIG_SMP
14 #include <asm/blackfin.h>
15 #include <asm/irqflags.h>
16 #include <mach/irq.h>
18 #define SUPPLE_0_WAKEUP ((IRQ_SUPPLE_0 - (IRQ_CORETMR + 1)) % 32)
20 static inline void
21 bfin_iwr_restore(unsigned long iwr0, unsigned long iwr1, unsigned long iwr2)
23 unsigned long SICA_SICB_OFF = ((bfin_read_DSPID() & 0xff) ? 0x1000 : 0);
25 bfin_write32(SIC_IWR0 + SICA_SICB_OFF, iwr0);
26 bfin_write32(SIC_IWR1 + SICA_SICB_OFF, iwr1);
28 #define bfin_iwr_restore bfin_iwr_restore
30 static inline void
31 bfin_iwr_save(unsigned long niwr0, unsigned long niwr1, unsigned long niwr2,
32 unsigned long *iwr0, unsigned long *iwr1, unsigned long *iwr2)
34 unsigned long SICA_SICB_OFF = ((bfin_read_DSPID() & 0xff) ? 0x1000 : 0);
36 *iwr0 = bfin_read32(SIC_IWR0 + SICA_SICB_OFF);
37 *iwr1 = bfin_read32(SIC_IWR1 + SICA_SICB_OFF);
38 bfin_iwr_restore(niwr0, niwr1, niwr2);
40 #define bfin_iwr_save bfin_iwr_save
42 static inline void
43 bfin_iwr_set_sup0(unsigned long *iwr0, unsigned long *iwr1, unsigned long *iwr2)
45 bfin_iwr_save(0, IWR_ENABLE(SUPPLE_0_WAKEUP), 0, iwr0, iwr1, iwr2);
48 #endif
50 #endif
52 #include <mach-common/pll.h>
54 #endif