aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-omap
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/plat-omap')
-rw-r--r--arch/arm/plat-omap/clock.c1
-rw-r--r--arch/arm/plat-omap/dma.c2
-rw-r--r--arch/arm/plat-omap/dmtimer.c19
-rw-r--r--arch/arm/plat-omap/include/plat/cpu.h2
-rw-r--r--arch/arm/plat-omap/include/plat/omap_device.h7
-rw-r--r--arch/arm/plat-omap/include/plat/sram.h1
-rw-r--r--arch/arm/plat-omap/mailbox.c2
-rw-r--r--arch/arm/plat-omap/omap_device.c20
-rw-r--r--arch/arm/plat-omap/sram.c14
9 files changed, 45 insertions, 23 deletions
diff --git a/arch/arm/plat-omap/clock.c b/arch/arm/plat-omap/clock.c
index 567e4b54f245..56b6f8b7053e 100644
--- a/arch/arm/plat-omap/clock.c
+++ b/arch/arm/plat-omap/clock.c
@@ -20,7 +20,6 @@
20#include <linux/clk.h> 20#include <linux/clk.h>
21#include <linux/mutex.h> 21#include <linux/mutex.h>
22#include <linux/cpufreq.h> 22#include <linux/cpufreq.h>
23#include <linux/debugfs.h>
24#include <linux/io.h> 23#include <linux/io.h>
25 24
26#include <plat/clock.h> 25#include <plat/clock.h>
diff --git a/arch/arm/plat-omap/dma.c b/arch/arm/plat-omap/dma.c
index 002fb4d96bbc..cb856fe0434a 100644
--- a/arch/arm/plat-omap/dma.c
+++ b/arch/arm/plat-omap/dma.c
@@ -2125,7 +2125,7 @@ static int __devexit omap_system_dma_remove(struct platform_device *pdev)
2125 2125
2126static struct platform_driver omap_system_dma_driver = { 2126static struct platform_driver omap_system_dma_driver = {
2127 .probe = omap_system_dma_probe, 2127 .probe = omap_system_dma_probe,
2128 .remove = omap_system_dma_remove, 2128 .remove = __devexit_p(omap_system_dma_remove),
2129 .driver = { 2129 .driver = {
2130 .name = "omap_dma_system" 2130 .name = "omap_dma_system"
2131 }, 2131 },
diff --git a/arch/arm/plat-omap/dmtimer.c b/arch/arm/plat-omap/dmtimer.c
index af3b92be8459..0b77fe87e010 100644
--- a/arch/arm/plat-omap/dmtimer.c
+++ b/arch/arm/plat-omap/dmtimer.c
@@ -80,9 +80,9 @@ static void omap_dm_timer_write_reg(struct omap_dm_timer *timer, u32 reg,
80 80
81static void omap_timer_restore_context(struct omap_dm_timer *timer) 81static void omap_timer_restore_context(struct omap_dm_timer *timer)
82{ 82{
83 omap_dm_timer_write_reg(timer, OMAP_TIMER_OCP_CFG_OFFSET, 83 __raw_writel(timer->context.tiocp_cfg,
84 timer->context.tiocp_cfg); 84 timer->io_base + OMAP_TIMER_OCP_CFG_OFFSET);
85 if (timer->revision > 1) 85 if (timer->revision == 1)
86 __raw_writel(timer->context.tistat, timer->sys_stat); 86 __raw_writel(timer->context.tistat, timer->sys_stat);
87 87
88 __raw_writel(timer->context.tisr, timer->irq_stat); 88 __raw_writel(timer->context.tisr, timer->irq_stat);
@@ -357,6 +357,19 @@ int omap_dm_timer_stop(struct omap_dm_timer *timer)
357 357
358 __omap_dm_timer_stop(timer, timer->posted, rate); 358 __omap_dm_timer_stop(timer, timer->posted, rate);
359 359
360 if (timer->loses_context && timer->get_context_loss_count)
361 timer->ctx_loss_count =
362 timer->get_context_loss_count(&timer->pdev->dev);
363
364 /*
365 * Since the register values are computed and written within
366 * __omap_dm_timer_stop, we need to use read to retrieve the
367 * context.
368 */
369 timer->context.tclr =
370 omap_dm_timer_read_reg(timer, OMAP_TIMER_CTRL_REG);
371 timer->context.tisr = __raw_readl(timer->irq_stat);
372 omap_dm_timer_disable(timer);
360 return 0; 373 return 0;
361} 374}
362EXPORT_SYMBOL_GPL(omap_dm_timer_stop); 375EXPORT_SYMBOL_GPL(omap_dm_timer_stop);
diff --git a/arch/arm/plat-omap/include/plat/cpu.h b/arch/arm/plat-omap/include/plat/cpu.h
index 6b51086fce18..4f18eaed4511 100644
--- a/arch/arm/plat-omap/include/plat/cpu.h
+++ b/arch/arm/plat-omap/include/plat/cpu.h
@@ -250,7 +250,6 @@ IS_AM_SUBCLASS(335x, 0x335)
250 * cpu_is_omap2423(): True for OMAP2423 250 * cpu_is_omap2423(): True for OMAP2423
251 * cpu_is_omap2430(): True for OMAP2430 251 * cpu_is_omap2430(): True for OMAP2430
252 * cpu_is_omap3430(): True for OMAP3430 252 * cpu_is_omap3430(): True for OMAP3430
253 * cpu_is_omap4430(): True for OMAP4430
254 * cpu_is_omap3505(): True for OMAP3505 253 * cpu_is_omap3505(): True for OMAP3505
255 * cpu_is_omap3517(): True for OMAP3517 254 * cpu_is_omap3517(): True for OMAP3517
256 */ 255 */
@@ -299,7 +298,6 @@ IS_OMAP_TYPE(3517, 0x3517)
299#define cpu_is_omap3505() 0 298#define cpu_is_omap3505() 0
300#define cpu_is_omap3517() 0 299#define cpu_is_omap3517() 0
301#define cpu_is_omap3430() 0 300#define cpu_is_omap3430() 0
302#define cpu_is_omap4430() 0
303#define cpu_is_omap3630() 0 301#define cpu_is_omap3630() 0
304 302
305/* 303/*
diff --git a/arch/arm/plat-omap/include/plat/omap_device.h b/arch/arm/plat-omap/include/plat/omap_device.h
index 51423d2727a5..05f7615b61f0 100644
--- a/arch/arm/plat-omap/include/plat/omap_device.h
+++ b/arch/arm/plat-omap/include/plat/omap_device.h
@@ -100,6 +100,13 @@ struct platform_device *omap_device_build_ss(const char *pdev_name, int pdev_id,
100 struct omap_device_pm_latency *pm_lats, 100 struct omap_device_pm_latency *pm_lats,
101 int pm_lats_cnt, int is_early_device); 101 int pm_lats_cnt, int is_early_device);
102 102
103struct omap_device *omap_device_alloc(struct platform_device *pdev,
104 struct omap_hwmod **ohs, int oh_cnt,
105 struct omap_device_pm_latency *pm_lats,
106 int pm_lats_cnt);
107void omap_device_delete(struct omap_device *od);
108int omap_device_register(struct platform_device *pdev);
109
103void __iomem *omap_device_get_rt_va(struct omap_device *od); 110void __iomem *omap_device_get_rt_va(struct omap_device *od);
104struct device *omap_device_get_by_hwmod_name(const char *oh_name); 111struct device *omap_device_get_by_hwmod_name(const char *oh_name);
105 112
diff --git a/arch/arm/plat-omap/include/plat/sram.h b/arch/arm/plat-omap/include/plat/sram.h
index 75aa1b2bef51..227ae2657554 100644
--- a/arch/arm/plat-omap/include/plat/sram.h
+++ b/arch/arm/plat-omap/include/plat/sram.h
@@ -101,4 +101,5 @@ static inline void omap_push_sram_idle(void) {}
101#else 101#else
102#define OMAP4_SRAM_PA 0x40300000 102#define OMAP4_SRAM_PA 0x40300000
103#endif 103#endif
104#define AM33XX_SRAM_PA 0x40300000
104#endif 105#endif
diff --git a/arch/arm/plat-omap/mailbox.c b/arch/arm/plat-omap/mailbox.c
index ad80112c2275..ad32621aa52e 100644
--- a/arch/arm/plat-omap/mailbox.c
+++ b/arch/arm/plat-omap/mailbox.c
@@ -307,7 +307,7 @@ static void omap_mbox_fini(struct omap_mbox *mbox)
307 if (!--mbox->use_count) { 307 if (!--mbox->use_count) {
308 free_irq(mbox->irq, mbox); 308 free_irq(mbox->irq, mbox);
309 tasklet_kill(&mbox->txq->tasklet); 309 tasklet_kill(&mbox->txq->tasklet);
310 flush_work_sync(&mbox->rxq->work); 310 flush_work_sync(&mbox->rxq->work);
311 mbox_queue_free(mbox->txq); 311 mbox_queue_free(mbox->txq);
312 mbox_queue_free(mbox->rxq); 312 mbox_queue_free(mbox->rxq);
313 } 313 }
diff --git a/arch/arm/plat-omap/omap_device.c b/arch/arm/plat-omap/omap_device.c
index e8d98693d2dd..2d00ab01d150 100644
--- a/arch/arm/plat-omap/omap_device.c
+++ b/arch/arm/plat-omap/omap_device.c
@@ -1,3 +1,4 @@
1
1/* 2/*
2 * omap_device implementation 3 * omap_device implementation
3 * 4 *
@@ -97,14 +98,7 @@
97#define USE_WAKEUP_LAT 0 98#define USE_WAKEUP_LAT 0
98#define IGNORE_WAKEUP_LAT 1 99#define IGNORE_WAKEUP_LAT 1
99 100
100static int omap_device_register(struct platform_device *pdev);
101static int omap_early_device_register(struct platform_device *pdev); 101static int omap_early_device_register(struct platform_device *pdev);
102static struct omap_device *omap_device_alloc(struct platform_device *pdev,
103 struct omap_hwmod **ohs, int oh_cnt,
104 struct omap_device_pm_latency *pm_lats,
105 int pm_lats_cnt);
106static void omap_device_delete(struct omap_device *od);
107
108 102
109static struct omap_device_pm_latency omap_default_latency[] = { 103static struct omap_device_pm_latency omap_default_latency[] = {
110 { 104 {
@@ -509,7 +503,7 @@ static int omap_device_fill_resources(struct omap_device *od,
509 * 503 *
510 * Returns an struct omap_device pointer or ERR_PTR() on error; 504 * Returns an struct omap_device pointer or ERR_PTR() on error;
511 */ 505 */
512static struct omap_device *omap_device_alloc(struct platform_device *pdev, 506struct omap_device *omap_device_alloc(struct platform_device *pdev,
513 struct omap_hwmod **ohs, int oh_cnt, 507 struct omap_hwmod **ohs, int oh_cnt,
514 struct omap_device_pm_latency *pm_lats, 508 struct omap_device_pm_latency *pm_lats,
515 int pm_lats_cnt) 509 int pm_lats_cnt)
@@ -591,7 +585,7 @@ oda_exit1:
591 return ERR_PTR(ret); 585 return ERR_PTR(ret);
592} 586}
593 587
594static void omap_device_delete(struct omap_device *od) 588void omap_device_delete(struct omap_device *od)
595{ 589{
596 if (!od) 590 if (!od)
597 return; 591 return;
@@ -619,7 +613,7 @@ static void omap_device_delete(struct omap_device *od)
619 * information. Returns ERR_PTR(-EINVAL) if @oh is NULL; otherwise, 613 * information. Returns ERR_PTR(-EINVAL) if @oh is NULL; otherwise,
620 * passes along the return value of omap_device_build_ss(). 614 * passes along the return value of omap_device_build_ss().
621 */ 615 */
622struct platform_device *omap_device_build(const char *pdev_name, int pdev_id, 616struct platform_device __init *omap_device_build(const char *pdev_name, int pdev_id,
623 struct omap_hwmod *oh, void *pdata, 617 struct omap_hwmod *oh, void *pdata,
624 int pdata_len, 618 int pdata_len,
625 struct omap_device_pm_latency *pm_lats, 619 struct omap_device_pm_latency *pm_lats,
@@ -652,7 +646,7 @@ struct platform_device *omap_device_build(const char *pdev_name, int pdev_id,
652 * platform_device record. Returns an ERR_PTR() on error, or passes 646 * platform_device record. Returns an ERR_PTR() on error, or passes
653 * along the return value of omap_device_register(). 647 * along the return value of omap_device_register().
654 */ 648 */
655struct platform_device *omap_device_build_ss(const char *pdev_name, int pdev_id, 649struct platform_device __init *omap_device_build_ss(const char *pdev_name, int pdev_id,
656 struct omap_hwmod **ohs, int oh_cnt, 650 struct omap_hwmod **ohs, int oh_cnt,
657 void *pdata, int pdata_len, 651 void *pdata, int pdata_len,
658 struct omap_device_pm_latency *pm_lats, 652 struct omap_device_pm_latency *pm_lats,
@@ -717,7 +711,7 @@ odbs_exit:
717 * platform_early_add_device() on the underlying platform_device. 711 * platform_early_add_device() on the underlying platform_device.
718 * Returns 0 by default. 712 * Returns 0 by default.
719 */ 713 */
720static int omap_early_device_register(struct platform_device *pdev) 714static int __init omap_early_device_register(struct platform_device *pdev)
721{ 715{
722 struct platform_device *devices[1]; 716 struct platform_device *devices[1];
723 717
@@ -817,7 +811,7 @@ static struct dev_pm_domain omap_device_pm_domain = {
817 * platform_device_register() on the underlying platform_device. 811 * platform_device_register() on the underlying platform_device.
818 * Returns the return value of platform_device_register(). 812 * Returns the return value of platform_device_register().
819 */ 813 */
820static int omap_device_register(struct platform_device *pdev) 814int omap_device_register(struct platform_device *pdev)
821{ 815{
822 pr_debug("omap_device: %s: registering\n", pdev->name); 816 pr_debug("omap_device: %s: registering\n", pdev->name);
823 817
diff --git a/arch/arm/plat-omap/sram.c b/arch/arm/plat-omap/sram.c
index 4243bdcc87bc..596f2224e15a 100644
--- a/arch/arm/plat-omap/sram.c
+++ b/arch/arm/plat-omap/sram.c
@@ -86,7 +86,7 @@ static int is_sram_locked(void)
86 __raw_writel(0xCFDE, OMAP24XX_VA_READPERM0); /* all i-read */ 86 __raw_writel(0xCFDE, OMAP24XX_VA_READPERM0); /* all i-read */
87 __raw_writel(0xCFDE, OMAP24XX_VA_WRITEPERM0); /* all i-write */ 87 __raw_writel(0xCFDE, OMAP24XX_VA_WRITEPERM0); /* all i-write */
88 } 88 }
89 if (cpu_is_omap34xx()) { 89 if (cpu_is_omap34xx() && !cpu_is_am33xx()) {
90 __raw_writel(0xFFFF, OMAP34XX_VA_REQINFOPERM0); /* all q-vects */ 90 __raw_writel(0xFFFF, OMAP34XX_VA_REQINFOPERM0); /* all q-vects */
91 __raw_writel(0xFFFF, OMAP34XX_VA_READPERM0); /* all i-read */ 91 __raw_writel(0xFFFF, OMAP34XX_VA_READPERM0); /* all i-read */
92 __raw_writel(0xFFFF, OMAP34XX_VA_WRITEPERM0); /* all i-write */ 92 __raw_writel(0xFFFF, OMAP34XX_VA_WRITEPERM0); /* all i-write */
@@ -124,7 +124,10 @@ static void __init omap_detect_sram(void)
124 omap_sram_size = 0x800; /* 2K */ 124 omap_sram_size = 0x800; /* 2K */
125 } 125 }
126 } else { 126 } else {
127 if (cpu_is_omap34xx()) { 127 if (cpu_is_am33xx()) {
128 omap_sram_start = AM33XX_SRAM_PA;
129 omap_sram_size = 0x10000; /* 64K */
130 } else if (cpu_is_omap34xx()) {
128 omap_sram_start = OMAP3_SRAM_PA; 131 omap_sram_start = OMAP3_SRAM_PA;
129 omap_sram_size = 0x10000; /* 64K */ 132 omap_sram_size = 0x10000; /* 64K */
130 } else if (cpu_is_omap44xx()) { 133 } else if (cpu_is_omap44xx()) {
@@ -368,6 +371,11 @@ static inline int omap34xx_sram_init(void)
368 return 0; 371 return 0;
369} 372}
370 373
374static inline int am33xx_sram_init(void)
375{
376 return 0;
377}
378
371int __init omap_sram_init(void) 379int __init omap_sram_init(void)
372{ 380{
373 omap_detect_sram(); 381 omap_detect_sram();
@@ -379,6 +387,8 @@ int __init omap_sram_init(void)
379 omap242x_sram_init(); 387 omap242x_sram_init();
380 else if (cpu_is_omap2430()) 388 else if (cpu_is_omap2430())
381 omap243x_sram_init(); 389 omap243x_sram_init();
390 else if (cpu_is_am33xx())
391 am33xx_sram_init();
382 else if (cpu_is_omap34xx()) 392 else if (cpu_is_omap34xx())
383 omap34xx_sram_init(); 393 omap34xx_sram_init();
384 394