pxa25x.c (39fe5434cb9de5da40510028b17b96bc4eb312b3) | pxa25x.c (15a4033354c68eb75e417ab60771f36212610820) |
---|---|
1/* 2 * linux/arch/arm/mach-pxa/pxa25x.c 3 * 4 * Author: Nicolas Pitre 5 * Created: Jun 15, 2001 6 * Copyright: MontaVista Software Inc. 7 * 8 * Code specific to PXA21x/25x/26x variants. --- 39 unchanged lines hidden (view full) --- 48/* Crystal clock */ 49#define BASE_CLK 3686400 50 51/* 52 * Get the clock frequency as reflected by CCCR and the turbo flag. 53 * We assume these values have been applied via a fcs. 54 * If info is not 0 we also display the current settings. 55 */ | 1/* 2 * linux/arch/arm/mach-pxa/pxa25x.c 3 * 4 * Author: Nicolas Pitre 5 * Created: Jun 15, 2001 6 * Copyright: MontaVista Software Inc. 7 * 8 * Code specific to PXA21x/25x/26x variants. --- 39 unchanged lines hidden (view full) --- 48/* Crystal clock */ 49#define BASE_CLK 3686400 50 51/* 52 * Get the clock frequency as reflected by CCCR and the turbo flag. 53 * We assume these values have been applied via a fcs. 54 * If info is not 0 we also display the current settings. 55 */ |
56unsigned int get_clk_frequency_khz(int info) | 56unsigned int pxa25x_get_clk_frequency_khz(int info) |
57{ 58 unsigned long cccr, turbo; 59 unsigned int l, L, m, M, n2, N; 60 61 cccr = CCCR; 62 asm( "mrc\tp14, 0, %0, c6, c0, 0" : "=r" (turbo) ); 63 64 l = L_clk_mult[(cccr >> 0) & 0x1f]; --- 16 unchanged lines hidden (view full) --- 81 printk( KERN_INFO "Turbo Mode clock: %d.%02dMHz (*%d.%d, %sactive)\n", 82 N / 1000000, (N % 1000000) / 10000, n2 / 2, (n2 % 2) * 5, 83 (turbo & 1) ? "" : "in" ); 84 } 85 86 return (turbo & 1) ? (N/1000) : (M/1000); 87} 88 | 57{ 58 unsigned long cccr, turbo; 59 unsigned int l, L, m, M, n2, N; 60 61 cccr = CCCR; 62 asm( "mrc\tp14, 0, %0, c6, c0, 0" : "=r" (turbo) ); 63 64 l = L_clk_mult[(cccr >> 0) & 0x1f]; --- 16 unchanged lines hidden (view full) --- 81 printk( KERN_INFO "Turbo Mode clock: %d.%02dMHz (*%d.%d, %sactive)\n", 82 N / 1000000, (N % 1000000) / 10000, n2 / 2, (n2 % 2) * 5, 83 (turbo & 1) ? "" : "in" ); 84 } 85 86 return (turbo & 1) ? (N/1000) : (M/1000); 87} 88 |
89EXPORT_SYMBOL(get_clk_frequency_khz); 90 | |
91/* 92 * Return the current memory clock frequency in units of 10kHz 93 */ | 89/* 90 * Return the current memory clock frequency in units of 10kHz 91 */ |
94unsigned int get_memclk_frequency_10khz(void) | 92unsigned int pxa25x_get_memclk_frequency_10khz(void) |
95{ 96 return L_clk_mult[(CCCR >> 0) & 0x1f] * BASE_CLK / 10000; 97} 98 | 93{ 94 return L_clk_mult[(CCCR >> 0) & 0x1f] * BASE_CLK / 10000; 95} 96 |
99EXPORT_SYMBOL(get_memclk_frequency_10khz); 100 101/* 102 * Return the current LCD clock frequency in units of 10kHz 103 */ 104unsigned int get_lcdclk_frequency_10khz(void) 105{ 106 return get_memclk_frequency_10khz(); 107} 108 109EXPORT_SYMBOL(get_lcdclk_frequency_10khz); 110 | |
111#ifdef CONFIG_PM 112 113#define SAVE(x) sleep_save[SLEEP_SAVE_##x] = x 114#define RESTORE(x) x = sleep_save[SLEEP_SAVE_##x] 115 116#define RESTORE_GPLEVEL(n) do { \ 117 GPSR##n = sleep_save[SLEEP_SAVE_GPLR##n]; \ 118 GPCR##n = ~sleep_save[SLEEP_SAVE_GPLR##n]; \ --- 129 unchanged lines hidden --- | 97#ifdef CONFIG_PM 98 99#define SAVE(x) sleep_save[SLEEP_SAVE_##x] = x 100#define RESTORE(x) x = sleep_save[SLEEP_SAVE_##x] 101 102#define RESTORE_GPLEVEL(n) do { \ 103 GPSR##n = sleep_save[SLEEP_SAVE_GPLR##n]; \ 104 GPCR##n = ~sleep_save[SLEEP_SAVE_GPLR##n]; \ --- 129 unchanged lines hidden --- |