diff options
Diffstat (limited to 'arch/arm/plat-omap')
-rw-r--r-- | arch/arm/plat-omap/Makefile | 3 | ||||
-rw-r--r-- | arch/arm/plat-omap/common.c | 1 | ||||
-rw-r--r-- | arch/arm/plat-omap/counter_32k.c | 6 | ||||
-rw-r--r-- | arch/arm/plat-omap/dma.c | 13 | ||||
-rw-r--r-- | arch/arm/plat-omap/dmtimer.c | 3 | ||||
-rw-r--r-- | arch/arm/plat-omap/include/plat/board.h | 2 | ||||
-rw-r--r-- | arch/arm/plat-omap/include/plat/common.h | 2 | ||||
-rw-r--r-- | arch/arm/plat-omap/include/plat/dma.h | 1 | ||||
-rw-r--r-- | arch/arm/plat-omap/include/plat/dmtimer.h | 4 | ||||
-rw-r--r-- | arch/arm/plat-omap/include/plat/omap_hwmod.h | 40 | ||||
-rw-r--r-- | arch/arm/plat-omap/ocpi.c | 109 | ||||
-rw-r--r-- | arch/arm/plat-omap/omap_device.c | 2 | ||||
-rw-r--r-- | arch/arm/plat-omap/sram.c | 4 | ||||
-rw-r--r-- | arch/arm/plat-omap/usb.c | 8 |
14 files changed, 60 insertions, 138 deletions
diff --git a/arch/arm/plat-omap/Makefile b/arch/arm/plat-omap/Makefile index c0fe2757b695..ed8605f01155 100644 --- a/arch/arm/plat-omap/Makefile +++ b/arch/arm/plat-omap/Makefile | |||
@@ -9,9 +9,6 @@ obj-m := | |||
9 | obj-n := | 9 | obj-n := |
10 | obj- := | 10 | obj- := |
11 | 11 | ||
12 | # OCPI interconnect support for 1710, 1610 and 5912 | ||
13 | obj-$(CONFIG_ARCH_OMAP16XX) += ocpi.o | ||
14 | |||
15 | # omap_device support (OMAP2+ only at the moment) | 12 | # omap_device support (OMAP2+ only at the moment) |
16 | obj-$(CONFIG_ARCH_OMAP2) += omap_device.o | 13 | obj-$(CONFIG_ARCH_OMAP2) += omap_device.o |
17 | obj-$(CONFIG_ARCH_OMAP3) += omap_device.o | 14 | obj-$(CONFIG_ARCH_OMAP3) += omap_device.o |
diff --git a/arch/arm/plat-omap/common.c b/arch/arm/plat-omap/common.c index f1e46ea6b81d..0a9b9a970113 100644 --- a/arch/arm/plat-omap/common.c +++ b/arch/arm/plat-omap/common.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <plat/board.h> | 20 | #include <plat/board.h> |
21 | #include <plat/vram.h> | 21 | #include <plat/vram.h> |
22 | #include <plat/dsp.h> | 22 | #include <plat/dsp.h> |
23 | #include <plat/dma.h> | ||
23 | 24 | ||
24 | #include <plat/omap-secure.h> | 25 | #include <plat/omap-secure.h> |
25 | 26 | ||
diff --git a/arch/arm/plat-omap/counter_32k.c b/arch/arm/plat-omap/counter_32k.c index 5068fe5a6910..44ae077dbc28 100644 --- a/arch/arm/plat-omap/counter_32k.c +++ b/arch/arm/plat-omap/counter_32k.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/io.h> | 19 | #include <linux/io.h> |
20 | #include <linux/clocksource.h> | 20 | #include <linux/clocksource.h> |
21 | 21 | ||
22 | #include <asm/mach/time.h> | ||
22 | #include <asm/sched_clock.h> | 23 | #include <asm/sched_clock.h> |
23 | 24 | ||
24 | #include <plat/hardware.h> | 25 | #include <plat/hardware.h> |
@@ -43,7 +44,7 @@ static u32 notrace omap_32k_read_sched_clock(void) | |||
43 | } | 44 | } |
44 | 45 | ||
45 | /** | 46 | /** |
46 | * read_persistent_clock - Return time from a persistent clock. | 47 | * omap_read_persistent_clock - Return time from a persistent clock. |
47 | * | 48 | * |
48 | * Reads the time from a source which isn't disabled during PM, the | 49 | * Reads the time from a source which isn't disabled during PM, the |
49 | * 32k sync timer. Convert the cycles elapsed since last read into | 50 | * 32k sync timer. Convert the cycles elapsed since last read into |
@@ -52,7 +53,7 @@ static u32 notrace omap_32k_read_sched_clock(void) | |||
52 | static struct timespec persistent_ts; | 53 | static struct timespec persistent_ts; |
53 | static cycles_t cycles, last_cycles; | 54 | static cycles_t cycles, last_cycles; |
54 | static unsigned int persistent_mult, persistent_shift; | 55 | static unsigned int persistent_mult, persistent_shift; |
55 | void read_persistent_clock(struct timespec *ts) | 56 | static void omap_read_persistent_clock(struct timespec *ts) |
56 | { | 57 | { |
57 | unsigned long long nsecs; | 58 | unsigned long long nsecs; |
58 | cycles_t delta; | 59 | cycles_t delta; |
@@ -116,6 +117,7 @@ int __init omap_init_clocksource_32k(void) | |||
116 | printk(err, "32k_counter"); | 117 | printk(err, "32k_counter"); |
117 | 118 | ||
118 | setup_sched_clock(omap_32k_read_sched_clock, 32, 32768); | 119 | setup_sched_clock(omap_32k_read_sched_clock, 32, 32768); |
120 | register_persistent_clock(NULL, omap_read_persistent_clock); | ||
119 | } | 121 | } |
120 | return 0; | 122 | return 0; |
121 | } | 123 | } |
diff --git a/arch/arm/plat-omap/dma.c b/arch/arm/plat-omap/dma.c index c58d896cd5c3..987e6101267d 100644 --- a/arch/arm/plat-omap/dma.c +++ b/arch/arm/plat-omap/dma.c | |||
@@ -41,6 +41,15 @@ | |||
41 | 41 | ||
42 | #include <plat/tc.h> | 42 | #include <plat/tc.h> |
43 | 43 | ||
44 | /* | ||
45 | * MAX_LOGICAL_DMA_CH_COUNT: the maximum number of logical DMA | ||
46 | * channels that an instance of the SDMA IP block can support. Used | ||
47 | * to size arrays. (The actual maximum on a particular SoC may be less | ||
48 | * than this -- for example, OMAP1 SDMA instances only support 17 logical | ||
49 | * DMA channels.) | ||
50 | */ | ||
51 | #define MAX_LOGICAL_DMA_CH_COUNT 32 | ||
52 | |||
44 | #undef DEBUG | 53 | #undef DEBUG |
45 | 54 | ||
46 | #ifndef CONFIG_ARCH_OMAP1 | 55 | #ifndef CONFIG_ARCH_OMAP1 |
@@ -883,7 +892,7 @@ void omap_start_dma(int lch) | |||
883 | 892 | ||
884 | if (!omap_dma_in_1510_mode() && dma_chan[lch].next_lch != -1) { | 893 | if (!omap_dma_in_1510_mode() && dma_chan[lch].next_lch != -1) { |
885 | int next_lch, cur_lch; | 894 | int next_lch, cur_lch; |
886 | char dma_chan_link_map[dma_lch_count]; | 895 | char dma_chan_link_map[MAX_LOGICAL_DMA_CH_COUNT]; |
887 | 896 | ||
888 | dma_chan_link_map[lch] = 1; | 897 | dma_chan_link_map[lch] = 1; |
889 | /* Set the link register of the first channel */ | 898 | /* Set the link register of the first channel */ |
@@ -981,7 +990,7 @@ void omap_stop_dma(int lch) | |||
981 | 990 | ||
982 | if (!omap_dma_in_1510_mode() && dma_chan[lch].next_lch != -1) { | 991 | if (!omap_dma_in_1510_mode() && dma_chan[lch].next_lch != -1) { |
983 | int next_lch, cur_lch = lch; | 992 | int next_lch, cur_lch = lch; |
984 | char dma_chan_link_map[dma_lch_count]; | 993 | char dma_chan_link_map[MAX_LOGICAL_DMA_CH_COUNT]; |
985 | 994 | ||
986 | memset(dma_chan_link_map, 0, sizeof(dma_chan_link_map)); | 995 | memset(dma_chan_link_map, 0, sizeof(dma_chan_link_map)); |
987 | do { | 996 | do { |
diff --git a/arch/arm/plat-omap/dmtimer.c b/arch/arm/plat-omap/dmtimer.c index 652139c0339e..c4ed35e89fbd 100644 --- a/arch/arm/plat-omap/dmtimer.c +++ b/arch/arm/plat-omap/dmtimer.c | |||
@@ -349,11 +349,12 @@ EXPORT_SYMBOL_GPL(omap_dm_timer_start); | |||
349 | int omap_dm_timer_stop(struct omap_dm_timer *timer) | 349 | int omap_dm_timer_stop(struct omap_dm_timer *timer) |
350 | { | 350 | { |
351 | unsigned long rate = 0; | 351 | unsigned long rate = 0; |
352 | struct dmtimer_platform_data *pdata = timer->pdev->dev.platform_data; | 352 | struct dmtimer_platform_data *pdata; |
353 | 353 | ||
354 | if (unlikely(!timer)) | 354 | if (unlikely(!timer)) |
355 | return -EINVAL; | 355 | return -EINVAL; |
356 | 356 | ||
357 | pdata = timer->pdev->dev.platform_data; | ||
357 | if (!pdata->needs_manual_reset) | 358 | if (!pdata->needs_manual_reset) |
358 | rate = clk_get_rate(timer->fclk); | 359 | rate = clk_get_rate(timer->fclk); |
359 | 360 | ||
diff --git a/arch/arm/plat-omap/include/plat/board.h b/arch/arm/plat-omap/include/plat/board.h index d5eb4c87db9d..4814c5b65306 100644 --- a/arch/arm/plat-omap/include/plat/board.h +++ b/arch/arm/plat-omap/include/plat/board.h | |||
@@ -91,6 +91,8 @@ struct omap_usb_config { | |||
91 | u32 (*usb0_init)(unsigned nwires, unsigned is_device); | 91 | u32 (*usb0_init)(unsigned nwires, unsigned is_device); |
92 | u32 (*usb1_init)(unsigned nwires); | 92 | u32 (*usb1_init)(unsigned nwires); |
93 | u32 (*usb2_init)(unsigned nwires, unsigned alt_pingroup); | 93 | u32 (*usb2_init)(unsigned nwires, unsigned alt_pingroup); |
94 | |||
95 | int (*ocpi_enable)(void); | ||
94 | }; | 96 | }; |
95 | 97 | ||
96 | struct omap_lcd_config { | 98 | struct omap_lcd_config { |
diff --git a/arch/arm/plat-omap/include/plat/common.h b/arch/arm/plat-omap/include/plat/common.h index b4d7ec3fbfbe..a557b8484e6c 100644 --- a/arch/arm/plat-omap/include/plat/common.h +++ b/arch/arm/plat-omap/include/plat/common.h | |||
@@ -32,6 +32,8 @@ | |||
32 | 32 | ||
33 | extern int __init omap_init_clocksource_32k(void); | 33 | extern int __init omap_init_clocksource_32k(void); |
34 | 34 | ||
35 | extern void __init omap_check_revision(void); | ||
36 | |||
35 | extern void omap_reserve(void); | 37 | extern void omap_reserve(void); |
36 | extern int omap_dss_reset(struct omap_hwmod *); | 38 | extern int omap_dss_reset(struct omap_hwmod *); |
37 | 39 | ||
diff --git a/arch/arm/plat-omap/include/plat/dma.h b/arch/arm/plat-omap/include/plat/dma.h index dc562a5c0a8a..42afb4c45517 100644 --- a/arch/arm/plat-omap/include/plat/dma.h +++ b/arch/arm/plat-omap/include/plat/dma.h | |||
@@ -442,6 +442,7 @@ struct omap_system_dma_plat_info { | |||
442 | u32 (*dma_read)(int reg, int lch); | 442 | u32 (*dma_read)(int reg, int lch); |
443 | }; | 443 | }; |
444 | 444 | ||
445 | extern void __init omap_init_consistent_dma_size(void); | ||
445 | extern void omap_set_dma_priority(int lch, int dst_port, int priority); | 446 | extern void omap_set_dma_priority(int lch, int dst_port, int priority); |
446 | extern int omap_request_dma(int dev_id, const char *dev_name, | 447 | extern int omap_request_dma(int dev_id, const char *dev_name, |
447 | void (*callback)(int lch, u16 ch_status, void *data), | 448 | void (*callback)(int lch, u16 ch_status, void *data), |
diff --git a/arch/arm/plat-omap/include/plat/dmtimer.h b/arch/arm/plat-omap/include/plat/dmtimer.h index 9418f00b6c38..230ff91be491 100644 --- a/arch/arm/plat-omap/include/plat/dmtimer.h +++ b/arch/arm/plat-omap/include/plat/dmtimer.h | |||
@@ -316,12 +316,12 @@ static inline void __omap_dm_timer_init_regs(struct omap_dm_timer *timer) | |||
316 | OMAP_TIMER_V1_SYS_STAT_OFFSET; | 316 | OMAP_TIMER_V1_SYS_STAT_OFFSET; |
317 | timer->irq_stat = timer->io_base + OMAP_TIMER_V1_STAT_OFFSET; | 317 | timer->irq_stat = timer->io_base + OMAP_TIMER_V1_STAT_OFFSET; |
318 | timer->irq_ena = timer->io_base + OMAP_TIMER_V1_INT_EN_OFFSET; | 318 | timer->irq_ena = timer->io_base + OMAP_TIMER_V1_INT_EN_OFFSET; |
319 | timer->irq_dis = 0; | 319 | timer->irq_dis = NULL; |
320 | timer->pend = timer->io_base + _OMAP_TIMER_WRITE_PEND_OFFSET; | 320 | timer->pend = timer->io_base + _OMAP_TIMER_WRITE_PEND_OFFSET; |
321 | timer->func_base = timer->io_base; | 321 | timer->func_base = timer->io_base; |
322 | } else { | 322 | } else { |
323 | timer->revision = 2; | 323 | timer->revision = 2; |
324 | timer->sys_stat = 0; | 324 | timer->sys_stat = NULL; |
325 | timer->irq_stat = timer->io_base + OMAP_TIMER_V2_IRQSTATUS; | 325 | timer->irq_stat = timer->io_base + OMAP_TIMER_V2_IRQSTATUS; |
326 | timer->irq_ena = timer->io_base + OMAP_TIMER_V2_IRQENABLE_SET; | 326 | timer->irq_ena = timer->io_base + OMAP_TIMER_V2_IRQENABLE_SET; |
327 | timer->irq_dis = timer->io_base + OMAP_TIMER_V2_IRQENABLE_CLR; | 327 | timer->irq_dis = timer->io_base + OMAP_TIMER_V2_IRQENABLE_CLR; |
diff --git a/arch/arm/plat-omap/include/plat/omap_hwmod.h b/arch/arm/plat-omap/include/plat/omap_hwmod.h index 3f26db4ee8e6..14dde32cd406 100644 --- a/arch/arm/plat-omap/include/plat/omap_hwmod.h +++ b/arch/arm/plat-omap/include/plat/omap_hwmod.h | |||
@@ -213,11 +213,16 @@ struct omap_hwmod_addr_space { | |||
213 | */ | 213 | */ |
214 | #define OCP_USER_MPU (1 << 0) | 214 | #define OCP_USER_MPU (1 << 0) |
215 | #define OCP_USER_SDMA (1 << 1) | 215 | #define OCP_USER_SDMA (1 << 1) |
216 | #define OCP_USER_DSP (1 << 2) | ||
216 | 217 | ||
217 | /* omap_hwmod_ocp_if.flags bits */ | 218 | /* omap_hwmod_ocp_if.flags bits */ |
218 | #define OCPIF_SWSUP_IDLE (1 << 0) | 219 | #define OCPIF_SWSUP_IDLE (1 << 0) |
219 | #define OCPIF_CAN_BURST (1 << 1) | 220 | #define OCPIF_CAN_BURST (1 << 1) |
220 | 221 | ||
222 | /* omap_hwmod_ocp_if._int_flags possibilities */ | ||
223 | #define _OCPIF_INT_FLAGS_REGISTERED (1 << 0) | ||
224 | |||
225 | |||
221 | /** | 226 | /** |
222 | * struct omap_hwmod_ocp_if - OCP interface data | 227 | * struct omap_hwmod_ocp_if - OCP interface data |
223 | * @master: struct omap_hwmod that initiates OCP transactions on this link | 228 | * @master: struct omap_hwmod that initiates OCP transactions on this link |
@@ -229,6 +234,7 @@ struct omap_hwmod_addr_space { | |||
229 | * @width: OCP data width | 234 | * @width: OCP data width |
230 | * @user: initiators using this interface (see OCP_USER_* macros above) | 235 | * @user: initiators using this interface (see OCP_USER_* macros above) |
231 | * @flags: OCP interface flags (see OCPIF_* macros above) | 236 | * @flags: OCP interface flags (see OCPIF_* macros above) |
237 | * @_int_flags: internal flags (see _OCPIF_INT_FLAGS* macros above) | ||
232 | * | 238 | * |
233 | * It may also be useful to add a tag_cnt field for OCP2.x devices. | 239 | * It may also be useful to add a tag_cnt field for OCP2.x devices. |
234 | * | 240 | * |
@@ -247,6 +253,7 @@ struct omap_hwmod_ocp_if { | |||
247 | u8 width; | 253 | u8 width; |
248 | u8 user; | 254 | u8 user; |
249 | u8 flags; | 255 | u8 flags; |
256 | u8 _int_flags; | ||
250 | }; | 257 | }; |
251 | 258 | ||
252 | 259 | ||
@@ -327,9 +334,9 @@ struct omap_hwmod_sysc_fields { | |||
327 | * then this field has to be populated with the correct offset structure. | 334 | * then this field has to be populated with the correct offset structure. |
328 | */ | 335 | */ |
329 | struct omap_hwmod_class_sysconfig { | 336 | struct omap_hwmod_class_sysconfig { |
330 | u16 rev_offs; | 337 | u32 rev_offs; |
331 | u16 sysc_offs; | 338 | u32 sysc_offs; |
332 | u16 syss_offs; | 339 | u32 syss_offs; |
333 | u16 sysc_flags; | 340 | u16 sysc_flags; |
334 | struct omap_hwmod_sysc_fields *sysc_fields; | 341 | struct omap_hwmod_sysc_fields *sysc_fields; |
335 | u8 srst_udelay; | 342 | u8 srst_udelay; |
@@ -476,6 +483,16 @@ struct omap_hwmod_class { | |||
476 | }; | 483 | }; |
477 | 484 | ||
478 | /** | 485 | /** |
486 | * struct omap_hwmod_link - internal structure linking hwmods with ocp_ifs | ||
487 | * @ocp_if: OCP interface structure record pointer | ||
488 | * @node: list_head pointing to next struct omap_hwmod_link in a list | ||
489 | */ | ||
490 | struct omap_hwmod_link { | ||
491 | struct omap_hwmod_ocp_if *ocp_if; | ||
492 | struct list_head node; | ||
493 | }; | ||
494 | |||
495 | /** | ||
479 | * struct omap_hwmod - integration data for OMAP hardware "modules" (IP blocks) | 496 | * struct omap_hwmod - integration data for OMAP hardware "modules" (IP blocks) |
480 | * @name: name of the hwmod | 497 | * @name: name of the hwmod |
481 | * @class: struct omap_hwmod_class * to the class of this hwmod | 498 | * @class: struct omap_hwmod_class * to the class of this hwmod |
@@ -487,12 +504,10 @@ struct omap_hwmod_class { | |||
487 | * @_clk: pointer to the main struct clk (filled in at runtime) | 504 | * @_clk: pointer to the main struct clk (filled in at runtime) |
488 | * @opt_clks: other device clocks that drivers can request (0..*) | 505 | * @opt_clks: other device clocks that drivers can request (0..*) |
489 | * @voltdm: pointer to voltage domain (filled in at runtime) | 506 | * @voltdm: pointer to voltage domain (filled in at runtime) |
490 | * @masters: ptr to array of OCP ifs that this hwmod can initiate on | ||
491 | * @slaves: ptr to array of OCP ifs that this hwmod can respond on | ||
492 | * @dev_attr: arbitrary device attributes that can be passed to the driver | 507 | * @dev_attr: arbitrary device attributes that can be passed to the driver |
493 | * @_sysc_cache: internal-use hwmod flags | 508 | * @_sysc_cache: internal-use hwmod flags |
494 | * @_mpu_rt_va: cached register target start address (internal use) | 509 | * @_mpu_rt_va: cached register target start address (internal use) |
495 | * @_mpu_port_index: cached MPU register target slave ID (internal use) | 510 | * @_mpu_port: cached MPU register target slave (internal use) |
496 | * @opt_clks_cnt: number of @opt_clks | 511 | * @opt_clks_cnt: number of @opt_clks |
497 | * @master_cnt: number of @master entries | 512 | * @master_cnt: number of @master entries |
498 | * @slaves_cnt: number of @slave entries | 513 | * @slaves_cnt: number of @slave entries |
@@ -511,6 +526,8 @@ struct omap_hwmod_class { | |||
511 | * | 526 | * |
512 | * Parameter names beginning with an underscore are managed internally by | 527 | * Parameter names beginning with an underscore are managed internally by |
513 | * the omap_hwmod code and should not be set during initialization. | 528 | * the omap_hwmod code and should not be set during initialization. |
529 | * | ||
530 | * @masters and @slaves are now deprecated. | ||
514 | */ | 531 | */ |
515 | struct omap_hwmod { | 532 | struct omap_hwmod { |
516 | const char *name; | 533 | const char *name; |
@@ -529,15 +546,15 @@ struct omap_hwmod { | |||
529 | struct omap_hwmod_opt_clk *opt_clks; | 546 | struct omap_hwmod_opt_clk *opt_clks; |
530 | char *clkdm_name; | 547 | char *clkdm_name; |
531 | struct clockdomain *clkdm; | 548 | struct clockdomain *clkdm; |
532 | struct omap_hwmod_ocp_if **masters; /* connect to *_IA */ | 549 | struct list_head master_ports; /* connect to *_IA */ |
533 | struct omap_hwmod_ocp_if **slaves; /* connect to *_TA */ | 550 | struct list_head slave_ports; /* connect to *_TA */ |
534 | void *dev_attr; | 551 | void *dev_attr; |
535 | u32 _sysc_cache; | 552 | u32 _sysc_cache; |
536 | void __iomem *_mpu_rt_va; | 553 | void __iomem *_mpu_rt_va; |
537 | spinlock_t _lock; | 554 | spinlock_t _lock; |
538 | struct list_head node; | 555 | struct list_head node; |
556 | struct omap_hwmod_ocp_if *_mpu_port; | ||
539 | u16 flags; | 557 | u16 flags; |
540 | u8 _mpu_port_index; | ||
541 | u8 response_lat; | 558 | u8 response_lat; |
542 | u8 rst_lines_cnt; | 559 | u8 rst_lines_cnt; |
543 | u8 opt_clks_cnt; | 560 | u8 opt_clks_cnt; |
@@ -549,7 +566,6 @@ struct omap_hwmod { | |||
549 | u8 _postsetup_state; | 566 | u8 _postsetup_state; |
550 | }; | 567 | }; |
551 | 568 | ||
552 | int omap_hwmod_register(struct omap_hwmod **ohs); | ||
553 | struct omap_hwmod *omap_hwmod_lookup(const char *name); | 569 | struct omap_hwmod *omap_hwmod_lookup(const char *name); |
554 | int omap_hwmod_for_each(int (*fn)(struct omap_hwmod *oh, void *data), | 570 | int omap_hwmod_for_each(int (*fn)(struct omap_hwmod *oh, void *data), |
555 | void *data); | 571 | void *data); |
@@ -581,6 +597,8 @@ int omap_hwmod_softreset(struct omap_hwmod *oh); | |||
581 | 597 | ||
582 | int omap_hwmod_count_resources(struct omap_hwmod *oh); | 598 | int omap_hwmod_count_resources(struct omap_hwmod *oh); |
583 | int omap_hwmod_fill_resources(struct omap_hwmod *oh, struct resource *res); | 599 | int omap_hwmod_fill_resources(struct omap_hwmod *oh, struct resource *res); |
600 | int omap_hwmod_get_resource_byname(struct omap_hwmod *oh, unsigned int type, | ||
601 | const char *name, struct resource *res); | ||
584 | 602 | ||
585 | struct powerdomain *omap_hwmod_get_pwrdm(struct omap_hwmod *oh); | 603 | struct powerdomain *omap_hwmod_get_pwrdm(struct omap_hwmod *oh); |
586 | void __iomem *omap_hwmod_get_mpu_rt_va(struct omap_hwmod *oh); | 604 | void __iomem *omap_hwmod_get_mpu_rt_va(struct omap_hwmod *oh); |
@@ -619,4 +637,6 @@ extern int omap2430_hwmod_init(void); | |||
619 | extern int omap3xxx_hwmod_init(void); | 637 | extern int omap3xxx_hwmod_init(void); |
620 | extern int omap44xx_hwmod_init(void); | 638 | extern int omap44xx_hwmod_init(void); |
621 | 639 | ||
640 | extern int __init omap_hwmod_register_links(struct omap_hwmod_ocp_if **ois); | ||
641 | |||
622 | #endif | 642 | #endif |
diff --git a/arch/arm/plat-omap/ocpi.c b/arch/arm/plat-omap/ocpi.c deleted file mode 100644 index ebe0c73c8901..000000000000 --- a/arch/arm/plat-omap/ocpi.c +++ /dev/null | |||
@@ -1,109 +0,0 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/plat-omap/ocpi.c | ||
3 | * | ||
4 | * Minimal OCP bus support for omap16xx | ||
5 | * | ||
6 | * Copyright (C) 2003 - 2005 Nokia Corporation | ||
7 | * Written by Tony Lindgren <tony@atomide.com> | ||
8 | * | ||
9 | * Modified for clock framework by Paul Mundt <paul.mundt@nokia.com>. | ||
10 | * | ||
11 | * This program is free software; you can redistribute it and/or modify | ||
12 | * it under the terms of the GNU General Public License as published by | ||
13 | * the Free Software Foundation; either version 2 of the License, or | ||
14 | * (at your option) any later version. | ||
15 | * | ||
16 | * This program is distributed in the hope that it will be useful, | ||
17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
19 | * GNU General Public License for more details. | ||
20 | * | ||
21 | * You should have received a copy of the GNU General Public License | ||
22 | * along with this program; if not, write to the Free Software | ||
23 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
24 | */ | ||
25 | |||
26 | #include <linux/module.h> | ||
27 | #include <linux/types.h> | ||
28 | #include <linux/errno.h> | ||
29 | #include <linux/kernel.h> | ||
30 | #include <linux/init.h> | ||
31 | #include <linux/spinlock.h> | ||
32 | #include <linux/err.h> | ||
33 | #include <linux/clk.h> | ||
34 | #include <linux/io.h> | ||
35 | |||
36 | #include <mach/hardware.h> | ||
37 | |||
38 | #define OCPI_BASE 0xfffec320 | ||
39 | #define OCPI_FAULT (OCPI_BASE + 0x00) | ||
40 | #define OCPI_CMD_FAULT (OCPI_BASE + 0x04) | ||
41 | #define OCPI_SINT0 (OCPI_BASE + 0x08) | ||
42 | #define OCPI_TABORT (OCPI_BASE + 0x0c) | ||
43 | #define OCPI_SINT1 (OCPI_BASE + 0x10) | ||
44 | #define OCPI_PROT (OCPI_BASE + 0x14) | ||
45 | #define OCPI_SEC (OCPI_BASE + 0x18) | ||
46 | |||
47 | /* USB OHCI OCPI access error registers */ | ||
48 | #define HOSTUEADDR 0xfffba0e0 | ||
49 | #define HOSTUESTATUS 0xfffba0e4 | ||
50 | |||
51 | static struct clk *ocpi_ck; | ||
52 | |||
53 | /* | ||
54 | * Enables device access to OMAP buses via the OCPI bridge | ||
55 | * FIXME: Add locking | ||
56 | */ | ||
57 | int ocpi_enable(void) | ||
58 | { | ||
59 | unsigned int val; | ||
60 | |||
61 | if (!cpu_is_omap16xx()) | ||
62 | return -ENODEV; | ||
63 | |||
64 | /* Enable access for OHCI in OCPI */ | ||
65 | val = omap_readl(OCPI_PROT); | ||
66 | val &= ~0xff; | ||
67 | //val &= (1 << 0); /* Allow access only to EMIFS */ | ||
68 | omap_writel(val, OCPI_PROT); | ||
69 | |||
70 | val = omap_readl(OCPI_SEC); | ||
71 | val &= ~0xff; | ||
72 | omap_writel(val, OCPI_SEC); | ||
73 | |||
74 | return 0; | ||
75 | } | ||
76 | EXPORT_SYMBOL(ocpi_enable); | ||
77 | |||
78 | static int __init omap_ocpi_init(void) | ||
79 | { | ||
80 | if (!cpu_is_omap16xx()) | ||
81 | return -ENODEV; | ||
82 | |||
83 | ocpi_ck = clk_get(NULL, "l3_ocpi_ck"); | ||
84 | if (IS_ERR(ocpi_ck)) | ||
85 | return PTR_ERR(ocpi_ck); | ||
86 | |||
87 | clk_enable(ocpi_ck); | ||
88 | ocpi_enable(); | ||
89 | printk("OMAP OCPI interconnect driver loaded\n"); | ||
90 | |||
91 | return 0; | ||
92 | } | ||
93 | |||
94 | static void __exit omap_ocpi_exit(void) | ||
95 | { | ||
96 | /* REVISIT: Disable OCPI */ | ||
97 | |||
98 | if (!cpu_is_omap16xx()) | ||
99 | return; | ||
100 | |||
101 | clk_disable(ocpi_ck); | ||
102 | clk_put(ocpi_ck); | ||
103 | } | ||
104 | |||
105 | MODULE_AUTHOR("Tony Lindgren <tony@atomide.com>"); | ||
106 | MODULE_DESCRIPTION("OMAP OCPI bus controller module"); | ||
107 | MODULE_LICENSE("GPL"); | ||
108 | module_init(omap_ocpi_init); | ||
109 | module_exit(omap_ocpi_exit); | ||
diff --git a/arch/arm/plat-omap/omap_device.c b/arch/arm/plat-omap/omap_device.c index d50cbc6385bd..c490240bb82c 100644 --- a/arch/arm/plat-omap/omap_device.c +++ b/arch/arm/plat-omap/omap_device.c | |||
@@ -475,13 +475,11 @@ static int omap_device_count_resources(struct omap_device *od) | |||
475 | static int omap_device_fill_resources(struct omap_device *od, | 475 | static int omap_device_fill_resources(struct omap_device *od, |
476 | struct resource *res) | 476 | struct resource *res) |
477 | { | 477 | { |
478 | int c = 0; | ||
479 | int i, r; | 478 | int i, r; |
480 | 479 | ||
481 | for (i = 0; i < od->hwmods_cnt; i++) { | 480 | for (i = 0; i < od->hwmods_cnt; i++) { |
482 | r = omap_hwmod_fill_resources(od->hwmods[i], res); | 481 | r = omap_hwmod_fill_resources(od->hwmods[i], res); |
483 | res += r; | 482 | res += r; |
484 | c += r; | ||
485 | } | 483 | } |
486 | 484 | ||
487 | return 0; | 485 | return 0; |
diff --git a/arch/arm/plat-omap/sram.c b/arch/arm/plat-omap/sram.c index f9a8c5341ee9..477363c163ec 100644 --- a/arch/arm/plat-omap/sram.c +++ b/arch/arm/plat-omap/sram.c | |||
@@ -196,8 +196,8 @@ static void __init omap_map_sram(void) | |||
196 | * Looks like we need to preserve some bootloader code at the | 196 | * Looks like we need to preserve some bootloader code at the |
197 | * beginning of SRAM for jumping to flash for reboot to work... | 197 | * beginning of SRAM for jumping to flash for reboot to work... |
198 | */ | 198 | */ |
199 | memset((void *)omap_sram_base + SRAM_BOOTLOADER_SZ, 0, | 199 | memset_io(omap_sram_base + SRAM_BOOTLOADER_SZ, 0, |
200 | omap_sram_size - SRAM_BOOTLOADER_SZ); | 200 | omap_sram_size - SRAM_BOOTLOADER_SZ); |
201 | } | 201 | } |
202 | 202 | ||
203 | /* | 203 | /* |
diff --git a/arch/arm/plat-omap/usb.c b/arch/arm/plat-omap/usb.c index d2bbfd1cb0b5..daa0327381b5 100644 --- a/arch/arm/plat-omap/usb.c +++ b/arch/arm/plat-omap/usb.c | |||
@@ -31,15 +31,12 @@ | |||
31 | 31 | ||
32 | #include <mach/hardware.h> | 32 | #include <mach/hardware.h> |
33 | 33 | ||
34 | #include "../mach-omap2/common.h" | ||
35 | |||
36 | #ifdef CONFIG_ARCH_OMAP_OTG | 34 | #ifdef CONFIG_ARCH_OMAP_OTG |
37 | 35 | ||
38 | void __init | 36 | void __init |
39 | omap_otg_init(struct omap_usb_config *config) | 37 | omap_otg_init(struct omap_usb_config *config) |
40 | { | 38 | { |
41 | u32 syscon; | 39 | u32 syscon; |
42 | int status; | ||
43 | int alt_pingroup = 0; | 40 | int alt_pingroup = 0; |
44 | 41 | ||
45 | /* NOTE: no bus or clock setup (yet?) */ | 42 | /* NOTE: no bus or clock setup (yet?) */ |
@@ -104,6 +101,7 @@ omap_otg_init(struct omap_usb_config *config) | |||
104 | #ifdef CONFIG_USB_GADGET_OMAP | 101 | #ifdef CONFIG_USB_GADGET_OMAP |
105 | if (config->otg || config->register_dev) { | 102 | if (config->otg || config->register_dev) { |
106 | struct platform_device *udc_device = config->udc_device; | 103 | struct platform_device *udc_device = config->udc_device; |
104 | int status; | ||
107 | 105 | ||
108 | syscon &= ~DEV_IDLE_EN; | 106 | syscon &= ~DEV_IDLE_EN; |
109 | udc_device->dev.platform_data = config; | 107 | udc_device->dev.platform_data = config; |
@@ -116,6 +114,7 @@ omap_otg_init(struct omap_usb_config *config) | |||
116 | #if defined(CONFIG_USB_OHCI_HCD) || defined(CONFIG_USB_OHCI_HCD_MODULE) | 114 | #if defined(CONFIG_USB_OHCI_HCD) || defined(CONFIG_USB_OHCI_HCD_MODULE) |
117 | if (config->otg || config->register_host) { | 115 | if (config->otg || config->register_host) { |
118 | struct platform_device *ohci_device = config->ohci_device; | 116 | struct platform_device *ohci_device = config->ohci_device; |
117 | int status; | ||
119 | 118 | ||
120 | syscon &= ~HST_IDLE_EN; | 119 | syscon &= ~HST_IDLE_EN; |
121 | ohci_device->dev.platform_data = config; | 120 | ohci_device->dev.platform_data = config; |
@@ -128,6 +127,7 @@ omap_otg_init(struct omap_usb_config *config) | |||
128 | #ifdef CONFIG_USB_OTG | 127 | #ifdef CONFIG_USB_OTG |
129 | if (config->otg) { | 128 | if (config->otg) { |
130 | struct platform_device *otg_device = config->otg_device; | 129 | struct platform_device *otg_device = config->otg_device; |
130 | int status; | ||
131 | 131 | ||
132 | syscon &= ~OTG_IDLE_EN; | 132 | syscon &= ~OTG_IDLE_EN; |
133 | otg_device->dev.platform_data = config; | 133 | otg_device->dev.platform_data = config; |
@@ -138,8 +138,6 @@ omap_otg_init(struct omap_usb_config *config) | |||
138 | #endif | 138 | #endif |
139 | pr_debug("OTG_SYSCON_1 = %08x\n", omap_readl(OTG_SYSCON_1)); | 139 | pr_debug("OTG_SYSCON_1 = %08x\n", omap_readl(OTG_SYSCON_1)); |
140 | omap_writel(syscon, OTG_SYSCON_1); | 140 | omap_writel(syscon, OTG_SYSCON_1); |
141 | |||
142 | status = 0; | ||
143 | } | 141 | } |
144 | 142 | ||
145 | #else | 143 | #else |