diff options
author | David S. Miller <davem@davemloft.net> | 2010-02-17 01:09:29 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-02-17 01:09:29 -0500 |
commit | 2bb4646fce8d09916b351d1a62f98db7cec6fc41 (patch) | |
tree | c1f0d002e69868606eca9d1b919835f422892063 /arch/arm/plat-omap | |
parent | 6836b9bdd98e3b500cd49512484df68f46e14659 (diff) | |
parent | b0483e78e5c4c9871fc5541875b3bc006846d46b (diff) |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Diffstat (limited to 'arch/arm/plat-omap')
-rw-r--r-- | arch/arm/plat-omap/clock.c | 4 | ||||
-rw-r--r-- | arch/arm/plat-omap/common.c | 26 | ||||
-rw-r--r-- | arch/arm/plat-omap/dma.c | 2 | ||||
-rw-r--r-- | arch/arm/plat-omap/dmtimer.c | 13 | ||||
-rw-r--r-- | arch/arm/plat-omap/gpio.c | 4 | ||||
-rw-r--r-- | arch/arm/plat-omap/include/plat/cpu.h | 1 | ||||
-rw-r--r-- | arch/arm/plat-omap/include/plat/irqs.h | 3 | ||||
-rw-r--r-- | arch/arm/plat-omap/include/plat/omap_hwmod.h | 1 | ||||
-rw-r--r-- | arch/arm/plat-omap/omap_device.c | 10 |
9 files changed, 49 insertions, 15 deletions
diff --git a/arch/arm/plat-omap/clock.c b/arch/arm/plat-omap/clock.c index d9f8c844c385..4becbdd1935c 100644 --- a/arch/arm/plat-omap/clock.c +++ b/arch/arm/plat-omap/clock.c | |||
@@ -391,7 +391,7 @@ static struct dentry *clk_debugfs_root; | |||
391 | static int clk_debugfs_register_one(struct clk *c) | 391 | static int clk_debugfs_register_one(struct clk *c) |
392 | { | 392 | { |
393 | int err; | 393 | int err; |
394 | struct dentry *d, *child; | 394 | struct dentry *d, *child, *child_tmp; |
395 | struct clk *pa = c->parent; | 395 | struct clk *pa = c->parent; |
396 | char s[255]; | 396 | char s[255]; |
397 | char *p = s; | 397 | char *p = s; |
@@ -423,7 +423,7 @@ static int clk_debugfs_register_one(struct clk *c) | |||
423 | 423 | ||
424 | err_out: | 424 | err_out: |
425 | d = c->dent; | 425 | d = c->dent; |
426 | list_for_each_entry(child, &d->d_subdirs, d_u.d_child) | 426 | list_for_each_entry_safe(child, child_tmp, &d->d_subdirs, d_u.d_child) |
427 | debugfs_remove(child); | 427 | debugfs_remove(child); |
428 | debugfs_remove(c->dent); | 428 | debugfs_remove(c->dent); |
429 | return err; | 429 | return err; |
diff --git a/arch/arm/plat-omap/common.c b/arch/arm/plat-omap/common.c index bf1eaf3a27d4..dddc0273bc8b 100644 --- a/arch/arm/plat-omap/common.c +++ b/arch/arm/plat-omap/common.c | |||
@@ -172,6 +172,32 @@ unsigned long long sched_clock(void) | |||
172 | clocksource_32k.mult, clocksource_32k.shift); | 172 | clocksource_32k.mult, clocksource_32k.shift); |
173 | } | 173 | } |
174 | 174 | ||
175 | /** | ||
176 | * read_persistent_clock - Return time from a persistent clock. | ||
177 | * | ||
178 | * Reads the time from a source which isn't disabled during PM, the | ||
179 | * 32k sync timer. Convert the cycles elapsed since last read into | ||
180 | * nsecs and adds to a monotonically increasing timespec. | ||
181 | */ | ||
182 | static struct timespec persistent_ts; | ||
183 | static cycles_t cycles, last_cycles; | ||
184 | void read_persistent_clock(struct timespec *ts) | ||
185 | { | ||
186 | unsigned long long nsecs; | ||
187 | cycles_t delta; | ||
188 | struct timespec *tsp = &persistent_ts; | ||
189 | |||
190 | last_cycles = cycles; | ||
191 | cycles = clocksource_32k.read(&clocksource_32k); | ||
192 | delta = cycles - last_cycles; | ||
193 | |||
194 | nsecs = clocksource_cyc2ns(delta, | ||
195 | clocksource_32k.mult, clocksource_32k.shift); | ||
196 | |||
197 | timespec_add_ns(tsp, nsecs); | ||
198 | *ts = *tsp; | ||
199 | } | ||
200 | |||
175 | static int __init omap_init_clocksource_32k(void) | 201 | static int __init omap_init_clocksource_32k(void) |
176 | { | 202 | { |
177 | static char err[] __initdata = KERN_ERR | 203 | static char err[] __initdata = KERN_ERR |
diff --git a/arch/arm/plat-omap/dma.c b/arch/arm/plat-omap/dma.c index 09d82b3c66ce..728c64204184 100644 --- a/arch/arm/plat-omap/dma.c +++ b/arch/arm/plat-omap/dma.c | |||
@@ -1183,7 +1183,7 @@ void omap_dma_unlink_lch(int lch_head, int lch_queue) | |||
1183 | } | 1183 | } |
1184 | 1184 | ||
1185 | if ((dma_chan[lch_head].flags & OMAP_DMA_ACTIVE) || | 1185 | if ((dma_chan[lch_head].flags & OMAP_DMA_ACTIVE) || |
1186 | (dma_chan[lch_head].flags & OMAP_DMA_ACTIVE)) { | 1186 | (dma_chan[lch_queue].flags & OMAP_DMA_ACTIVE)) { |
1187 | printk(KERN_ERR "omap_dma: You need to stop the DMA channels " | 1187 | printk(KERN_ERR "omap_dma: You need to stop the DMA channels " |
1188 | "before unlinking\n"); | 1188 | "before unlinking\n"); |
1189 | dump_stack(); | 1189 | dump_stack(); |
diff --git a/arch/arm/plat-omap/dmtimer.c b/arch/arm/plat-omap/dmtimer.c index 64f407ee0f4e..08ccf8922520 100644 --- a/arch/arm/plat-omap/dmtimer.c +++ b/arch/arm/plat-omap/dmtimer.c | |||
@@ -551,6 +551,19 @@ void omap_dm_timer_stop(struct omap_dm_timer *timer) | |||
551 | if (l & OMAP_TIMER_CTRL_ST) { | 551 | if (l & OMAP_TIMER_CTRL_ST) { |
552 | l &= ~0x1; | 552 | l &= ~0x1; |
553 | omap_dm_timer_write_reg(timer, OMAP_TIMER_CTRL_REG, l); | 553 | omap_dm_timer_write_reg(timer, OMAP_TIMER_CTRL_REG, l); |
554 | #if defined(CONFIG_ARCH_OMAP2) || defined(CONFIG_ARCH_OMAP3) || \ | ||
555 | defined(CONFIG_ARCH_OMAP4) | ||
556 | /* Readback to make sure write has completed */ | ||
557 | omap_dm_timer_read_reg(timer, OMAP_TIMER_CTRL_REG); | ||
558 | /* | ||
559 | * Wait for functional clock period x 3.5 to make sure that | ||
560 | * timer is stopped | ||
561 | */ | ||
562 | udelay(3500000 / clk_get_rate(timer->fclk) + 1); | ||
563 | /* Ack possibly pending interrupt */ | ||
564 | omap_dm_timer_write_reg(timer, OMAP_TIMER_STAT_REG, | ||
565 | OMAP_TIMER_INT_OVERFLOW); | ||
566 | #endif | ||
554 | } | 567 | } |
555 | } | 568 | } |
556 | EXPORT_SYMBOL_GPL(omap_dm_timer_stop); | 569 | EXPORT_SYMBOL_GPL(omap_dm_timer_stop); |
diff --git a/arch/arm/plat-omap/gpio.c b/arch/arm/plat-omap/gpio.c index d17620c50c28..d2422c766cca 100644 --- a/arch/arm/plat-omap/gpio.c +++ b/arch/arm/plat-omap/gpio.c | |||
@@ -750,6 +750,7 @@ static inline void set_24xx_gpio_triggering(struct gpio_bank *bank, int gpio, | |||
750 | } | 750 | } |
751 | #endif | 751 | #endif |
752 | 752 | ||
753 | #ifdef CONFIG_ARCH_OMAP1 | ||
753 | /* | 754 | /* |
754 | * This only applies to chips that can't do both rising and falling edge | 755 | * This only applies to chips that can't do both rising and falling edge |
755 | * detection at once. For all other chips, this function is a noop. | 756 | * detection at once. For all other chips, this function is a noop. |
@@ -760,11 +761,9 @@ static void _toggle_gpio_edge_triggering(struct gpio_bank *bank, int gpio) | |||
760 | u32 l = 0; | 761 | u32 l = 0; |
761 | 762 | ||
762 | switch (bank->method) { | 763 | switch (bank->method) { |
763 | #ifdef CONFIG_ARCH_OMAP1 | ||
764 | case METHOD_MPUIO: | 764 | case METHOD_MPUIO: |
765 | reg += OMAP_MPUIO_GPIO_INT_EDGE; | 765 | reg += OMAP_MPUIO_GPIO_INT_EDGE; |
766 | break; | 766 | break; |
767 | #endif | ||
768 | #ifdef CONFIG_ARCH_OMAP15XX | 767 | #ifdef CONFIG_ARCH_OMAP15XX |
769 | case METHOD_GPIO_1510: | 768 | case METHOD_GPIO_1510: |
770 | reg += OMAP1510_GPIO_INT_CONTROL; | 769 | reg += OMAP1510_GPIO_INT_CONTROL; |
@@ -787,6 +786,7 @@ static void _toggle_gpio_edge_triggering(struct gpio_bank *bank, int gpio) | |||
787 | 786 | ||
788 | __raw_writel(l, reg); | 787 | __raw_writel(l, reg); |
789 | } | 788 | } |
789 | #endif | ||
790 | 790 | ||
791 | static int _set_gpio_triggering(struct gpio_bank *bank, int gpio, int trigger) | 791 | static int _set_gpio_triggering(struct gpio_bank *bank, int gpio, int trigger) |
792 | { | 792 | { |
diff --git a/arch/arm/plat-omap/include/plat/cpu.h b/arch/arm/plat-omap/include/plat/cpu.h index 9a028bdebb06..a162f585b1e3 100644 --- a/arch/arm/plat-omap/include/plat/cpu.h +++ b/arch/arm/plat-omap/include/plat/cpu.h | |||
@@ -434,6 +434,7 @@ IS_OMAP_TYPE(3517, 0x3517) | |||
434 | #define OMAP3430_REV_ES2_1 0x34302034 | 434 | #define OMAP3430_REV_ES2_1 0x34302034 |
435 | #define OMAP3430_REV_ES3_0 0x34303034 | 435 | #define OMAP3430_REV_ES3_0 0x34303034 |
436 | #define OMAP3430_REV_ES3_1 0x34304034 | 436 | #define OMAP3430_REV_ES3_1 0x34304034 |
437 | #define OMAP3430_REV_ES3_1_2 0x34305034 | ||
437 | 438 | ||
438 | #define OMAP3630_REV_ES1_0 0x36300034 | 439 | #define OMAP3630_REV_ES1_0 0x36300034 |
439 | 440 | ||
diff --git a/arch/arm/plat-omap/include/plat/irqs.h b/arch/arm/plat-omap/include/plat/irqs.h index 97d6c50c3dcb..c0ab7c80f72e 100644 --- a/arch/arm/plat-omap/include/plat/irqs.h +++ b/arch/arm/plat-omap/include/plat/irqs.h | |||
@@ -499,6 +499,9 @@ extern void omap_init_irq(void); | |||
499 | extern int omap_irq_pending(void); | 499 | extern int omap_irq_pending(void); |
500 | void omap_intc_save_context(void); | 500 | void omap_intc_save_context(void); |
501 | void omap_intc_restore_context(void); | 501 | void omap_intc_restore_context(void); |
502 | void omap3_intc_suspend(void); | ||
503 | void omap3_intc_prepare_idle(void); | ||
504 | void omap3_intc_resume_idle(void); | ||
502 | #endif | 505 | #endif |
503 | 506 | ||
504 | #include <mach/hardware.h> | 507 | #include <mach/hardware.h> |
diff --git a/arch/arm/plat-omap/include/plat/omap_hwmod.h b/arch/arm/plat-omap/include/plat/omap_hwmod.h index 007935a921ea..33933256a226 100644 --- a/arch/arm/plat-omap/include/plat/omap_hwmod.h +++ b/arch/arm/plat-omap/include/plat/omap_hwmod.h | |||
@@ -227,6 +227,7 @@ struct omap_hwmod_ocp_if { | |||
227 | #define SYSC_HAS_SIDLEMODE (1 << 5) | 227 | #define SYSC_HAS_SIDLEMODE (1 << 5) |
228 | #define SYSC_HAS_MIDLEMODE (1 << 6) | 228 | #define SYSC_HAS_MIDLEMODE (1 << 6) |
229 | #define SYSS_MISSING (1 << 7) | 229 | #define SYSS_MISSING (1 << 7) |
230 | #define SYSC_NO_CACHE (1 << 8) /* XXX SW flag, belongs elsewhere */ | ||
230 | 231 | ||
231 | /* omap_hwmod_sysconfig.clockact flags */ | 232 | /* omap_hwmod_sysconfig.clockact flags */ |
232 | #define CLOCKACT_TEST_BOTH 0x0 | 233 | #define CLOCKACT_TEST_BOTH 0x0 |
diff --git a/arch/arm/plat-omap/omap_device.c b/arch/arm/plat-omap/omap_device.c index 1e5648d3e3d8..2ed72013c2e2 100644 --- a/arch/arm/plat-omap/omap_device.c +++ b/arch/arm/plat-omap/omap_device.c | |||
@@ -89,16 +89,6 @@ | |||
89 | #define USE_WAKEUP_LAT 0 | 89 | #define USE_WAKEUP_LAT 0 |
90 | #define IGNORE_WAKEUP_LAT 1 | 90 | #define IGNORE_WAKEUP_LAT 1 |
91 | 91 | ||
92 | /* XXX this should be moved into a separate file */ | ||
93 | #if defined(CONFIG_ARCH_OMAP2420) | ||
94 | # define OMAP_32KSYNCT_BASE 0x48004000 | ||
95 | #elif defined(CONFIG_ARCH_OMAP2430) | ||
96 | # define OMAP_32KSYNCT_BASE 0x49020000 | ||
97 | #elif defined(CONFIG_ARCH_OMAP3430) | ||
98 | # define OMAP_32KSYNCT_BASE 0x48320000 | ||
99 | #else | ||
100 | # error Unknown OMAP device | ||
101 | #endif | ||
102 | 92 | ||
103 | /* Private functions */ | 93 | /* Private functions */ |
104 | 94 | ||