aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-omap/include
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/plat-omap/include')
-rw-r--r--arch/arm/plat-omap/include/plat/board.h2
-rw-r--r--arch/arm/plat-omap/include/plat/common.h2
-rw-r--r--arch/arm/plat-omap/include/plat/dma.h1
-rw-r--r--arch/arm/plat-omap/include/plat/dmtimer.h4
-rw-r--r--arch/arm/plat-omap/include/plat/omap_hwmod.h40
5 files changed, 37 insertions, 12 deletions
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
96struct omap_lcd_config { 98struct 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
33extern int __init omap_init_clocksource_32k(void); 33extern int __init omap_init_clocksource_32k(void);
34 34
35extern void __init omap_check_revision(void);
36
35extern void omap_reserve(void); 37extern void omap_reserve(void);
36extern int omap_dss_reset(struct omap_hwmod *); 38extern 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
445extern void __init omap_init_consistent_dma_size(void);
445extern void omap_set_dma_priority(int lch, int dst_port, int priority); 446extern void omap_set_dma_priority(int lch, int dst_port, int priority);
446extern int omap_request_dma(int dev_id, const char *dev_name, 447extern 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 */
329struct omap_hwmod_class_sysconfig { 336struct 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 */
490struct 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 */
515struct omap_hwmod { 532struct 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
552int omap_hwmod_register(struct omap_hwmod **ohs);
553struct omap_hwmod *omap_hwmod_lookup(const char *name); 569struct omap_hwmod *omap_hwmod_lookup(const char *name);
554int omap_hwmod_for_each(int (*fn)(struct omap_hwmod *oh, void *data), 570int 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
582int omap_hwmod_count_resources(struct omap_hwmod *oh); 598int omap_hwmod_count_resources(struct omap_hwmod *oh);
583int omap_hwmod_fill_resources(struct omap_hwmod *oh, struct resource *res); 599int omap_hwmod_fill_resources(struct omap_hwmod *oh, struct resource *res);
600int omap_hwmod_get_resource_byname(struct omap_hwmod *oh, unsigned int type,
601 const char *name, struct resource *res);
584 602
585struct powerdomain *omap_hwmod_get_pwrdm(struct omap_hwmod *oh); 603struct powerdomain *omap_hwmod_get_pwrdm(struct omap_hwmod *oh);
586void __iomem *omap_hwmod_get_mpu_rt_va(struct omap_hwmod *oh); 604void __iomem *omap_hwmod_get_mpu_rt_va(struct omap_hwmod *oh);
@@ -619,4 +637,6 @@ extern int omap2430_hwmod_init(void);
619extern int omap3xxx_hwmod_init(void); 637extern int omap3xxx_hwmod_init(void);
620extern int omap44xx_hwmod_init(void); 638extern int omap44xx_hwmod_init(void);
621 639
640extern int __init omap_hwmod_register_links(struct omap_hwmod_ocp_if **ois);
641
622#endif 642#endif