Merge branch 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm

* 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm:
  [ARM] 4835/1: Fix stale comment in struct machine_desc description
  [ARM] 4829/1: add .get method to pxa-cpufreq to silence a warning
  [ARM] 4828/1: fix 3 warnings in drivers/video/pxafb.c
  [ARM] 4827/1: fix two warnings in drivers/i2c/busses/i2c-pxa.c
  [ARM] 4826/1: Orion: Register the RTC interrupt on the TS-209
  [ARM] pxa: fix clock lookup to find specific device clocks
This commit is contained in:
Linus Torvalds 2008-02-21 16:19:34 -08:00
commit 06165752c8
6 changed files with 46 additions and 14 deletions

View File

@ -192,9 +192,13 @@ static struct mv643xx_eth_platform_data qnap_ts209_eth_data = {
/***************************************************************************** /*****************************************************************************
* RTC S35390A on I2C bus * RTC S35390A on I2C bus
****************************************************************************/ ****************************************************************************/
#define TS209_RTC_GPIO 3
static struct i2c_board_info __initdata qnap_ts209_i2c_rtc = { static struct i2c_board_info __initdata qnap_ts209_i2c_rtc = {
.driver_name = "rtc-s35390a", .driver_name = "rtc-s35390a",
.addr = 0x30, .addr = 0x30,
.irq = 0,
}; };
/**************************************************************************** /****************************************************************************
@ -328,7 +332,18 @@ static void __init qnap_ts209_init(void)
platform_add_devices(qnap_ts209_devices, platform_add_devices(qnap_ts209_devices,
ARRAY_SIZE(qnap_ts209_devices)); ARRAY_SIZE(qnap_ts209_devices));
/* Get RTC IRQ and register the chip */
if (gpio_request(TS209_RTC_GPIO, "rtc") == 0) {
if (gpio_direction_input(TS209_RTC_GPIO) == 0)
qnap_ts209_i2c_rtc.irq = gpio_to_irq(TS209_RTC_GPIO);
else
gpio_free(TS209_RTC_GPIO);
}
if (qnap_ts209_i2c_rtc.irq == 0)
pr_warning("qnap_ts209_init: failed to get RTC IRQ\n");
i2c_register_board_info(0, &qnap_ts209_i2c_rtc, 1); i2c_register_board_info(0, &qnap_ts209_i2c_rtc, 1);
orion_eth_init(&qnap_ts209_eth_data); orion_eth_init(&qnap_ts209_eth_data);
orion_sata_init(&qnap_ts209_sata_data); orion_sata_init(&qnap_ts209_sata_data);
} }

View File

@ -23,18 +23,27 @@ static LIST_HEAD(clocks);
static DEFINE_MUTEX(clocks_mutex); static DEFINE_MUTEX(clocks_mutex);
static DEFINE_SPINLOCK(clocks_lock); static DEFINE_SPINLOCK(clocks_lock);
static struct clk *clk_lookup(struct device *dev, const char *id)
{
struct clk *p;
list_for_each_entry(p, &clocks, node)
if (strcmp(id, p->name) == 0 && p->dev == dev)
return p;
return NULL;
}
struct clk *clk_get(struct device *dev, const char *id) struct clk *clk_get(struct device *dev, const char *id)
{ {
struct clk *p, *clk = ERR_PTR(-ENOENT); struct clk *p, *clk = ERR_PTR(-ENOENT);
mutex_lock(&clocks_mutex); mutex_lock(&clocks_mutex);
list_for_each_entry(p, &clocks, node) { p = clk_lookup(dev, id);
if (strcmp(id, p->name) == 0 && if (!p)
(p->dev == NULL || p->dev == dev)) { p = clk_lookup(NULL, id);
if (p)
clk = p; clk = p;
break;
}
}
mutex_unlock(&clocks_mutex); mutex_unlock(&clocks_mutex);
return clk; return clk;

View File

@ -134,7 +134,7 @@ static int pxa_set_target(struct cpufreq_policy *policy,
struct cpufreq_frequency_table *pxa_freqs_table; struct cpufreq_frequency_table *pxa_freqs_table;
pxa_freqs_t *pxa_freq_settings; pxa_freqs_t *pxa_freq_settings;
struct cpufreq_freqs freqs; struct cpufreq_freqs freqs;
int idx; unsigned int idx;
unsigned long flags; unsigned long flags;
unsigned int unused, preset_mdrefr, postset_mdrefr; unsigned int unused, preset_mdrefr, postset_mdrefr;
void *ramstart = phys_to_virt(0xa0000000); void *ramstart = phys_to_virt(0xa0000000);
@ -233,6 +233,11 @@ static int pxa_set_target(struct cpufreq_policy *policy,
return 0; return 0;
} }
static unsigned int pxa_cpufreq_get(unsigned int cpu)
{
return get_clk_frequency_khz(0);
}
static int pxa_cpufreq_init(struct cpufreq_policy *policy) static int pxa_cpufreq_init(struct cpufreq_policy *policy)
{ {
int i; int i;
@ -269,6 +274,7 @@ static struct cpufreq_driver pxa_cpufreq_driver = {
.verify = pxa_verify_policy, .verify = pxa_verify_policy,
.target = pxa_set_target, .target = pxa_set_target,
.init = pxa_cpufreq_init, .init = pxa_cpufreq_init,
.get = pxa_cpufreq_get,
.name = "PXA25x", .name = "PXA25x",
}; };

View File

@ -138,11 +138,13 @@ static const struct bits icr_bits[] = {
PXA_BIT(ICR_UR, "UR", "ur"), PXA_BIT(ICR_UR, "UR", "ur"),
}; };
#ifdef CONFIG_I2C_PXA_SLAVE
static void decode_ICR(unsigned int val) static void decode_ICR(unsigned int val)
{ {
decode_bits(KERN_DEBUG "ICR", icr_bits, ARRAY_SIZE(icr_bits), val); decode_bits(KERN_DEBUG "ICR", icr_bits, ARRAY_SIZE(icr_bits), val);
printk("\n"); printk("\n");
} }
#endif
static unsigned int i2c_debug = DEBUG; static unsigned int i2c_debug = DEBUG;
@ -1122,7 +1124,7 @@ static int __init i2c_adap_pxa_init(void)
static void i2c_adap_pxa_exit(void) static void i2c_adap_pxa_exit(void)
{ {
return platform_driver_unregister(&i2c_pxa_driver); platform_driver_unregister(&i2c_pxa_driver);
} }
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");

View File

@ -1046,7 +1046,7 @@ pxafb_freq_policy(struct notifier_block *nb, unsigned long val, void *data)
switch (val) { switch (val) {
case CPUFREQ_ADJUST: case CPUFREQ_ADJUST:
case CPUFREQ_INCOMPATIBLE: case CPUFREQ_INCOMPATIBLE:
printk(KERN_DEBUG "min dma period: %d ps, " pr_debug("min dma period: %d ps, "
"new clock %d kHz\n", pxafb_display_dma_period(var), "new clock %d kHz\n", pxafb_display_dma_period(var),
policy->max); policy->max);
// TODO: fill in min/max values // TODO: fill in min/max values
@ -1361,7 +1361,7 @@ static int __init pxafb_parse_options(struct device *dev, char *options)
} }
#endif #endif
int __init pxafb_probe(struct platform_device *dev) static int __init pxafb_probe(struct platform_device *dev)
{ {
struct pxafb_info *fbi; struct pxafb_info *fbi;
struct pxafb_mach_info *inf; struct pxafb_mach_info *inf;
@ -1486,7 +1486,7 @@ static struct platform_driver pxafb_driver = {
}; };
#ifndef MODULE #ifndef MODULE
int __devinit pxafb_setup(char *options) static int __devinit pxafb_setup(char *options)
{ {
# ifdef CONFIG_FB_PXA_PARAMETERS # ifdef CONFIG_FB_PXA_PARAMETERS
if (options) if (options)
@ -1501,7 +1501,7 @@ MODULE_PARM_DESC(options, "LCD parameters (see Documentation/fb/pxafb.txt)");
# endif # endif
#endif #endif
int __devinit pxafb_init(void) static int __devinit pxafb_init(void)
{ {
#ifndef MODULE #ifndef MODULE
char *option = NULL; char *option = NULL;

View File

@ -17,7 +17,7 @@ struct sys_timer;
struct machine_desc { struct machine_desc {
/* /*
* Note! The first four elements are used * Note! The first four elements are used
* by assembler code in head-armv.S * by assembler code in head.S, head-common.S
*/ */
unsigned int nr; /* architecture number */ unsigned int nr; /* architecture number */
unsigned int phys_io; /* start of physical io */ unsigned int phys_io; /* start of physical io */