diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-02-28 20:57:30 -0500 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-02-28 20:57:30 -0500 |
| commit | 4f427634b127f5fdc4e9fd2e5780f0a6caef936b (patch) | |
| tree | 1c1651abea7d54a9de8d852030a344a1705253f6 | |
| parent | 7f233dee2149245bc7ee1194c31a04ea43cd127e (diff) | |
| parent | 02fa9f0451ac639a687bfc145eefe58703ff220e (diff) | |
Merge branch 'omap-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6
* 'omap-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6:
omap4: prcm: Fix the CPUx clockdomain offsets
OMAP2+: clocksource: fix crash on boot when !CONFIG_OMAP_32K_TIMER
OMAP2/3: clock: fix fint calculation for DPLL_FREQSEL
OMAP2+: mailbox: fix lookups for multiple mailboxes
OMAP2420: mailbox: fix IVA vs DSP IRQ numbering
mach-omap2: smartreflex: world-writable debugfs voltage files
mach-omap2: pm: world-writable debugfs timer files
mach-omap2: mux: world-writable debugfs files
| -rw-r--r-- | arch/arm/mach-omap2/clkt_dpll.c | 2 | ||||
| -rw-r--r-- | arch/arm/mach-omap2/mailbox.c | 2 | ||||
| -rw-r--r-- | arch/arm/mach-omap2/mux.c | 2 | ||||
| -rw-r--r-- | arch/arm/mach-omap2/pm-debug.c | 8 | ||||
| -rw-r--r-- | arch/arm/mach-omap2/prcm_mpu44xx.h | 4 | ||||
| -rw-r--r-- | arch/arm/mach-omap2/smartreflex.c | 4 | ||||
| -rw-r--r-- | arch/arm/mach-omap2/timer-gp.c | 13 | ||||
| -rw-r--r-- | arch/arm/plat-omap/mailbox.c | 11 |
8 files changed, 31 insertions, 15 deletions
diff --git a/arch/arm/mach-omap2/clkt_dpll.c b/arch/arm/mach-omap2/clkt_dpll.c index 337392c3f549..acb7ae5b0a25 100644 --- a/arch/arm/mach-omap2/clkt_dpll.c +++ b/arch/arm/mach-omap2/clkt_dpll.c | |||
| @@ -77,7 +77,7 @@ static int _dpll_test_fint(struct clk *clk, u8 n) | |||
| 77 | dd = clk->dpll_data; | 77 | dd = clk->dpll_data; |
| 78 | 78 | ||
| 79 | /* DPLL divider must result in a valid jitter correction val */ | 79 | /* DPLL divider must result in a valid jitter correction val */ |
| 80 | fint = clk->parent->rate / (n + 1); | 80 | fint = clk->parent->rate / n; |
| 81 | if (fint < DPLL_FINT_BAND1_MIN) { | 81 | if (fint < DPLL_FINT_BAND1_MIN) { |
| 82 | 82 | ||
| 83 | pr_debug("rejecting n=%d due to Fint failure, " | 83 | pr_debug("rejecting n=%d due to Fint failure, " |
diff --git a/arch/arm/mach-omap2/mailbox.c b/arch/arm/mach-omap2/mailbox.c index 394413dc7deb..0a585dfa9874 100644 --- a/arch/arm/mach-omap2/mailbox.c +++ b/arch/arm/mach-omap2/mailbox.c | |||
| @@ -334,7 +334,7 @@ static struct omap_mbox mbox_iva_info = { | |||
| 334 | .priv = &omap2_mbox_iva_priv, | 334 | .priv = &omap2_mbox_iva_priv, |
| 335 | }; | 335 | }; |
| 336 | 336 | ||
| 337 | struct omap_mbox *omap2_mboxes[] = { &mbox_iva_info, &mbox_dsp_info, NULL }; | 337 | struct omap_mbox *omap2_mboxes[] = { &mbox_dsp_info, &mbox_iva_info, NULL }; |
| 338 | #endif | 338 | #endif |
| 339 | 339 | ||
| 340 | #if defined(CONFIG_ARCH_OMAP4) | 340 | #if defined(CONFIG_ARCH_OMAP4) |
diff --git a/arch/arm/mach-omap2/mux.c b/arch/arm/mach-omap2/mux.c index 98148b6c36e9..6c84659cf846 100644 --- a/arch/arm/mach-omap2/mux.c +++ b/arch/arm/mach-omap2/mux.c | |||
| @@ -605,7 +605,7 @@ static void __init omap_mux_dbg_create_entry( | |||
| 605 | list_for_each_entry(e, &partition->muxmodes, node) { | 605 | list_for_each_entry(e, &partition->muxmodes, node) { |
| 606 | struct omap_mux *m = &e->mux; | 606 | struct omap_mux *m = &e->mux; |
| 607 | 607 | ||
| 608 | (void)debugfs_create_file(m->muxnames[0], S_IWUGO, mux_dbg_dir, | 608 | (void)debugfs_create_file(m->muxnames[0], S_IWUSR, mux_dbg_dir, |
| 609 | m, &omap_mux_dbg_signal_fops); | 609 | m, &omap_mux_dbg_signal_fops); |
| 610 | } | 610 | } |
| 611 | } | 611 | } |
diff --git a/arch/arm/mach-omap2/pm-debug.c b/arch/arm/mach-omap2/pm-debug.c index 125f56591fb5..a5a83b358ddd 100644 --- a/arch/arm/mach-omap2/pm-debug.c +++ b/arch/arm/mach-omap2/pm-debug.c | |||
| @@ -637,14 +637,14 @@ static int __init pm_dbg_init(void) | |||
| 637 | 637 | ||
| 638 | } | 638 | } |
| 639 | 639 | ||
| 640 | (void) debugfs_create_file("enable_off_mode", S_IRUGO | S_IWUGO, d, | 640 | (void) debugfs_create_file("enable_off_mode", S_IRUGO | S_IWUSR, d, |
| 641 | &enable_off_mode, &pm_dbg_option_fops); | 641 | &enable_off_mode, &pm_dbg_option_fops); |
| 642 | (void) debugfs_create_file("sleep_while_idle", S_IRUGO | S_IWUGO, d, | 642 | (void) debugfs_create_file("sleep_while_idle", S_IRUGO | S_IWUSR, d, |
| 643 | &sleep_while_idle, &pm_dbg_option_fops); | 643 | &sleep_while_idle, &pm_dbg_option_fops); |
| 644 | (void) debugfs_create_file("wakeup_timer_seconds", S_IRUGO | S_IWUGO, d, | 644 | (void) debugfs_create_file("wakeup_timer_seconds", S_IRUGO | S_IWUSR, d, |
| 645 | &wakeup_timer_seconds, &pm_dbg_option_fops); | 645 | &wakeup_timer_seconds, &pm_dbg_option_fops); |
| 646 | (void) debugfs_create_file("wakeup_timer_milliseconds", | 646 | (void) debugfs_create_file("wakeup_timer_milliseconds", |
| 647 | S_IRUGO | S_IWUGO, d, &wakeup_timer_milliseconds, | 647 | S_IRUGO | S_IWUSR, d, &wakeup_timer_milliseconds, |
| 648 | &pm_dbg_option_fops); | 648 | &pm_dbg_option_fops); |
| 649 | pm_dbg_init_done = 1; | 649 | pm_dbg_init_done = 1; |
| 650 | 650 | ||
diff --git a/arch/arm/mach-omap2/prcm_mpu44xx.h b/arch/arm/mach-omap2/prcm_mpu44xx.h index 729a644ce852..3300ff6e3cfe 100644 --- a/arch/arm/mach-omap2/prcm_mpu44xx.h +++ b/arch/arm/mach-omap2/prcm_mpu44xx.h | |||
| @@ -38,8 +38,8 @@ | |||
| 38 | #define OMAP4430_PRCM_MPU_CPU1_INST 0x0800 | 38 | #define OMAP4430_PRCM_MPU_CPU1_INST 0x0800 |
| 39 | 39 | ||
| 40 | /* PRCM_MPU clockdomain register offsets (from instance start) */ | 40 | /* PRCM_MPU clockdomain register offsets (from instance start) */ |
| 41 | #define OMAP4430_PRCM_MPU_CPU0_MPU_CDOFFS 0x0000 | 41 | #define OMAP4430_PRCM_MPU_CPU0_MPU_CDOFFS 0x0018 |
| 42 | #define OMAP4430_PRCM_MPU_CPU1_MPU_CDOFFS 0x0000 | 42 | #define OMAP4430_PRCM_MPU_CPU1_MPU_CDOFFS 0x0018 |
| 43 | 43 | ||
| 44 | 44 | ||
| 45 | /* | 45 | /* |
diff --git a/arch/arm/mach-omap2/smartreflex.c b/arch/arm/mach-omap2/smartreflex.c index c37e823266d3..95ac336fe3f7 100644 --- a/arch/arm/mach-omap2/smartreflex.c +++ b/arch/arm/mach-omap2/smartreflex.c | |||
| @@ -900,7 +900,7 @@ static int __init omap_sr_probe(struct platform_device *pdev) | |||
| 900 | return PTR_ERR(dbg_dir); | 900 | return PTR_ERR(dbg_dir); |
| 901 | } | 901 | } |
| 902 | 902 | ||
| 903 | (void) debugfs_create_file("autocomp", S_IRUGO | S_IWUGO, dbg_dir, | 903 | (void) debugfs_create_file("autocomp", S_IRUGO | S_IWUSR, dbg_dir, |
| 904 | (void *)sr_info, &pm_sr_fops); | 904 | (void *)sr_info, &pm_sr_fops); |
| 905 | (void) debugfs_create_x32("errweight", S_IRUGO, dbg_dir, | 905 | (void) debugfs_create_x32("errweight", S_IRUGO, dbg_dir, |
| 906 | &sr_info->err_weight); | 906 | &sr_info->err_weight); |
| @@ -939,7 +939,7 @@ static int __init omap_sr_probe(struct platform_device *pdev) | |||
| 939 | strcpy(name, "volt_"); | 939 | strcpy(name, "volt_"); |
| 940 | sprintf(volt_name, "%d", volt_data[i].volt_nominal); | 940 | sprintf(volt_name, "%d", volt_data[i].volt_nominal); |
| 941 | strcat(name, volt_name); | 941 | strcat(name, volt_name); |
| 942 | (void) debugfs_create_x32(name, S_IRUGO | S_IWUGO, nvalue_dir, | 942 | (void) debugfs_create_x32(name, S_IRUGO | S_IWUSR, nvalue_dir, |
| 943 | &(sr_info->nvalue_table[i].nvalue)); | 943 | &(sr_info->nvalue_table[i].nvalue)); |
| 944 | } | 944 | } |
| 945 | 945 | ||
diff --git a/arch/arm/mach-omap2/timer-gp.c b/arch/arm/mach-omap2/timer-gp.c index 7b7c2683ae7b..0fc550e7e482 100644 --- a/arch/arm/mach-omap2/timer-gp.c +++ b/arch/arm/mach-omap2/timer-gp.c | |||
| @@ -39,6 +39,7 @@ | |||
| 39 | #include <asm/mach/time.h> | 39 | #include <asm/mach/time.h> |
| 40 | #include <plat/dmtimer.h> | 40 | #include <plat/dmtimer.h> |
| 41 | #include <asm/localtimer.h> | 41 | #include <asm/localtimer.h> |
| 42 | #include <asm/sched_clock.h> | ||
| 42 | 43 | ||
| 43 | #include "timer-gp.h" | 44 | #include "timer-gp.h" |
| 44 | 45 | ||
| @@ -190,6 +191,7 @@ static void __init omap2_gp_clocksource_init(void) | |||
| 190 | /* | 191 | /* |
| 191 | * clocksource | 192 | * clocksource |
| 192 | */ | 193 | */ |
| 194 | static DEFINE_CLOCK_DATA(cd); | ||
| 193 | static struct omap_dm_timer *gpt_clocksource; | 195 | static struct omap_dm_timer *gpt_clocksource; |
| 194 | static cycle_t clocksource_read_cycles(struct clocksource *cs) | 196 | static cycle_t clocksource_read_cycles(struct clocksource *cs) |
| 195 | { | 197 | { |
| @@ -204,6 +206,15 @@ static struct clocksource clocksource_gpt = { | |||
| 204 | .flags = CLOCK_SOURCE_IS_CONTINUOUS, | 206 | .flags = CLOCK_SOURCE_IS_CONTINUOUS, |
| 205 | }; | 207 | }; |
| 206 | 208 | ||
| 209 | static void notrace dmtimer_update_sched_clock(void) | ||
| 210 | { | ||
| 211 | u32 cyc; | ||
| 212 | |||
| 213 | cyc = omap_dm_timer_read_counter(gpt_clocksource); | ||
| 214 | |||
| 215 | update_sched_clock(&cd, cyc, (u32)~0); | ||
| 216 | } | ||
| 217 | |||
| 207 | /* Setup free-running counter for clocksource */ | 218 | /* Setup free-running counter for clocksource */ |
| 208 | static void __init omap2_gp_clocksource_init(void) | 219 | static void __init omap2_gp_clocksource_init(void) |
| 209 | { | 220 | { |
| @@ -224,6 +235,8 @@ static void __init omap2_gp_clocksource_init(void) | |||
| 224 | 235 | ||
| 225 | omap_dm_timer_set_load_start(gpt, 1, 0); | 236 | omap_dm_timer_set_load_start(gpt, 1, 0); |
| 226 | 237 | ||
| 238 | init_sched_clock(&cd, dmtimer_update_sched_clock, 32, tick_rate); | ||
| 239 | |||
| 227 | if (clocksource_register_hz(&clocksource_gpt, tick_rate)) | 240 | if (clocksource_register_hz(&clocksource_gpt, tick_rate)) |
| 228 | printk(err2, clocksource_gpt.name); | 241 | printk(err2, clocksource_gpt.name); |
| 229 | } | 242 | } |
diff --git a/arch/arm/plat-omap/mailbox.c b/arch/arm/plat-omap/mailbox.c index 459b319a9fad..49d3208793e5 100644 --- a/arch/arm/plat-omap/mailbox.c +++ b/arch/arm/plat-omap/mailbox.c | |||
| @@ -322,15 +322,18 @@ static void omap_mbox_fini(struct omap_mbox *mbox) | |||
| 322 | 322 | ||
| 323 | struct omap_mbox *omap_mbox_get(const char *name, struct notifier_block *nb) | 323 | struct omap_mbox *omap_mbox_get(const char *name, struct notifier_block *nb) |
| 324 | { | 324 | { |
| 325 | struct omap_mbox *mbox; | 325 | struct omap_mbox *_mbox, *mbox = NULL; |
| 326 | int ret; | 326 | int i, ret; |
| 327 | 327 | ||
| 328 | if (!mboxes) | 328 | if (!mboxes) |
| 329 | return ERR_PTR(-EINVAL); | 329 | return ERR_PTR(-EINVAL); |
| 330 | 330 | ||
| 331 | for (mbox = *mboxes; mbox; mbox++) | 331 | for (i = 0; (_mbox = mboxes[i]); i++) { |
| 332 | if (!strcmp(mbox->name, name)) | 332 | if (!strcmp(_mbox->name, name)) { |
| 333 | mbox = _mbox; | ||
| 333 | break; | 334 | break; |
| 335 | } | ||
| 336 | } | ||
| 334 | 337 | ||
| 335 | if (!mbox) | 338 | if (!mbox) |
| 336 | return ERR_PTR(-ENOENT); | 339 | return ERR_PTR(-ENOENT); |
