generic.c (e259a3aecbfb61981175ddc7fc02dd180da7d73e) | generic.c (15a4033354c68eb75e417ab60771f36212610820) |
---|---|
1/* 2 * linux/arch/arm/mach-pxa/generic.c 3 * 4 * Author: Nicolas Pitre 5 * Created: Jun 15, 2001 6 * Copyright: MontaVista Software Inc. 7 * 8 * Code common to all PXA machines. --- 29 unchanged lines hidden (view full) --- 38#include <asm/arch/mmc.h> 39#include <asm/arch/irda.h> 40#include <asm/arch/i2c.h> 41 42#include "devices.h" 43#include "generic.h" 44 45/* | 1/* 2 * linux/arch/arm/mach-pxa/generic.c 3 * 4 * Author: Nicolas Pitre 5 * Created: Jun 15, 2001 6 * Copyright: MontaVista Software Inc. 7 * 8 * Code common to all PXA machines. --- 29 unchanged lines hidden (view full) --- 38#include <asm/arch/mmc.h> 39#include <asm/arch/irda.h> 40#include <asm/arch/i2c.h> 41 42#include "devices.h" 43#include "generic.h" 44 45/* |
46 * Get the clock frequency as reflected by CCCR and the turbo flag. 47 * We assume these values have been applied via a fcs. 48 * If info is not 0 we also display the current settings. 49 */ 50unsigned int get_clk_frequency_khz(int info) 51{ 52 if (cpu_is_pxa21x() || cpu_is_pxa25x()) 53 return pxa25x_get_clk_frequency_khz(info); 54 else 55 return pxa27x_get_clk_frequency_khz(info); 56} 57EXPORT_SYMBOL(get_clk_frequency_khz); 58 59/* 60 * Return the current memory clock frequency in units of 10kHz 61 */ 62unsigned int get_memclk_frequency_10khz(void) 63{ 64 if (cpu_is_pxa21x() || cpu_is_pxa25x()) 65 return pxa25x_get_memclk_frequency_10khz(); 66 else 67 return pxa27x_get_memclk_frequency_10khz(); 68} 69EXPORT_SYMBOL(get_memclk_frequency_10khz); 70 71/* 72 * Return the current LCD clock frequency in units of 10kHz 73 */ 74unsigned int get_lcdclk_frequency_10khz(void) 75{ 76 if (cpu_is_pxa21x() || cpu_is_pxa25x()) 77 return pxa25x_get_memclk_frequency_10khz(); 78 else 79 return pxa27x_get_lcdclk_frequency_10khz(); 80} 81EXPORT_SYMBOL(get_lcdclk_frequency_10khz); 82 83/* |
|
46 * Handy function to set GPIO alternate functions 47 */ 48 49int pxa_gpio_mode(int gpio_mode) 50{ 51 unsigned long flags; 52 int gpio = gpio_mode & GPIO_MD_MASK_NR; 53 int fn = (gpio_mode & GPIO_MD_MASK_FN) >> 8; --- 355 unchanged lines hidden --- | 84 * Handy function to set GPIO alternate functions 85 */ 86 87int pxa_gpio_mode(int gpio_mode) 88{ 89 unsigned long flags; 90 int gpio = gpio_mode & GPIO_MD_MASK_NR; 91 int fn = (gpio_mode & GPIO_MD_MASK_FN) >> 8; --- 355 unchanged lines hidden --- |