aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-omap
diff options
context:
space:
mode:
authorTony Lindgren <tony@atomide.com>2012-05-08 13:17:32 -0400
committerTony Lindgren <tony@atomide.com>2012-05-08 13:17:32 -0400
commit7a8bcf067d2b11964cb83ce3d753ac2d3ab9843c (patch)
tree71c9b1660769bb83e038328c21cc6bf6eb299ef8 /arch/arm/plat-omap
parentd48b97b403d23f6df0b990cee652bdf9a52337a3 (diff)
parent1df82cd6d7673006ae2ecbe8745bcf44f61c53a8 (diff)
Merge branch 'devel-hwmod' into cleanup
Diffstat (limited to 'arch/arm/plat-omap')
-rw-r--r--arch/arm/plat-omap/include/plat/omap_hwmod.h41
1 files changed, 31 insertions, 10 deletions
diff --git a/arch/arm/plat-omap/include/plat/omap_hwmod.h b/arch/arm/plat-omap/include/plat/omap_hwmod.h
index 3f26db4ee8e..c835b7194ff 100644
--- a/arch/arm/plat-omap/include/plat/omap_hwmod.h
+++ b/arch/arm/plat-omap/include/plat/omap_hwmod.h
@@ -213,11 +213,17 @@ 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)
217#define OCP_USER_IVA (1 << 3)
216 218
217/* omap_hwmod_ocp_if.flags bits */ 219/* omap_hwmod_ocp_if.flags bits */
218#define OCPIF_SWSUP_IDLE (1 << 0) 220#define OCPIF_SWSUP_IDLE (1 << 0)
219#define OCPIF_CAN_BURST (1 << 1) 221#define OCPIF_CAN_BURST (1 << 1)
220 222
223/* omap_hwmod_ocp_if._int_flags possibilities */
224#define _OCPIF_INT_FLAGS_REGISTERED (1 << 0)
225
226
221/** 227/**
222 * struct omap_hwmod_ocp_if - OCP interface data 228 * struct omap_hwmod_ocp_if - OCP interface data
223 * @master: struct omap_hwmod that initiates OCP transactions on this link 229 * @master: struct omap_hwmod that initiates OCP transactions on this link
@@ -229,6 +235,7 @@ struct omap_hwmod_addr_space {
229 * @width: OCP data width 235 * @width: OCP data width
230 * @user: initiators using this interface (see OCP_USER_* macros above) 236 * @user: initiators using this interface (see OCP_USER_* macros above)
231 * @flags: OCP interface flags (see OCPIF_* macros above) 237 * @flags: OCP interface flags (see OCPIF_* macros above)
238 * @_int_flags: internal flags (see _OCPIF_INT_FLAGS* macros above)
232 * 239 *
233 * It may also be useful to add a tag_cnt field for OCP2.x devices. 240 * It may also be useful to add a tag_cnt field for OCP2.x devices.
234 * 241 *
@@ -247,6 +254,7 @@ struct omap_hwmod_ocp_if {
247 u8 width; 254 u8 width;
248 u8 user; 255 u8 user;
249 u8 flags; 256 u8 flags;
257 u8 _int_flags;
250}; 258};
251 259
252 260
@@ -327,9 +335,9 @@ struct omap_hwmod_sysc_fields {
327 * then this field has to be populated with the correct offset structure. 335 * then this field has to be populated with the correct offset structure.
328 */ 336 */
329struct omap_hwmod_class_sysconfig { 337struct omap_hwmod_class_sysconfig {
330 u16 rev_offs; 338 u32 rev_offs;
331 u16 sysc_offs; 339 u32 sysc_offs;
332 u16 syss_offs; 340 u32 syss_offs;
333 u16 sysc_flags; 341 u16 sysc_flags;
334 struct omap_hwmod_sysc_fields *sysc_fields; 342 struct omap_hwmod_sysc_fields *sysc_fields;
335 u8 srst_udelay; 343 u8 srst_udelay;
@@ -476,6 +484,16 @@ struct omap_hwmod_class {
476}; 484};
477 485
478/** 486/**
487 * struct omap_hwmod_link - internal structure linking hwmods with ocp_ifs
488 * @ocp_if: OCP interface structure record pointer
489 * @node: list_head pointing to next struct omap_hwmod_link in a list
490 */
491struct omap_hwmod_link {
492 struct omap_hwmod_ocp_if *ocp_if;
493 struct list_head node;
494};
495
496/**
479 * struct omap_hwmod - integration data for OMAP hardware "modules" (IP blocks) 497 * struct omap_hwmod - integration data for OMAP hardware "modules" (IP blocks)
480 * @name: name of the hwmod 498 * @name: name of the hwmod
481 * @class: struct omap_hwmod_class * to the class of this hwmod 499 * @class: struct omap_hwmod_class * to the class of this hwmod
@@ -487,12 +505,10 @@ struct omap_hwmod_class {
487 * @_clk: pointer to the main struct clk (filled in at runtime) 505 * @_clk: pointer to the main struct clk (filled in at runtime)
488 * @opt_clks: other device clocks that drivers can request (0..*) 506 * @opt_clks: other device clocks that drivers can request (0..*)
489 * @voltdm: pointer to voltage domain (filled in at runtime) 507 * @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 508 * @dev_attr: arbitrary device attributes that can be passed to the driver
493 * @_sysc_cache: internal-use hwmod flags 509 * @_sysc_cache: internal-use hwmod flags
494 * @_mpu_rt_va: cached register target start address (internal use) 510 * @_mpu_rt_va: cached register target start address (internal use)
495 * @_mpu_port_index: cached MPU register target slave ID (internal use) 511 * @_mpu_port: cached MPU register target slave (internal use)
496 * @opt_clks_cnt: number of @opt_clks 512 * @opt_clks_cnt: number of @opt_clks
497 * @master_cnt: number of @master entries 513 * @master_cnt: number of @master entries
498 * @slaves_cnt: number of @slave entries 514 * @slaves_cnt: number of @slave entries
@@ -511,6 +527,8 @@ struct omap_hwmod_class {
511 * 527 *
512 * Parameter names beginning with an underscore are managed internally by 528 * Parameter names beginning with an underscore are managed internally by
513 * the omap_hwmod code and should not be set during initialization. 529 * the omap_hwmod code and should not be set during initialization.
530 *
531 * @masters and @slaves are now deprecated.
514 */ 532 */
515struct omap_hwmod { 533struct omap_hwmod {
516 const char *name; 534 const char *name;
@@ -529,15 +547,15 @@ struct omap_hwmod {
529 struct omap_hwmod_opt_clk *opt_clks; 547 struct omap_hwmod_opt_clk *opt_clks;
530 char *clkdm_name; 548 char *clkdm_name;
531 struct clockdomain *clkdm; 549 struct clockdomain *clkdm;
532 struct omap_hwmod_ocp_if **masters; /* connect to *_IA */ 550 struct list_head master_ports; /* connect to *_IA */
533 struct omap_hwmod_ocp_if **slaves; /* connect to *_TA */ 551 struct list_head slave_ports; /* connect to *_TA */
534 void *dev_attr; 552 void *dev_attr;
535 u32 _sysc_cache; 553 u32 _sysc_cache;
536 void __iomem *_mpu_rt_va; 554 void __iomem *_mpu_rt_va;
537 spinlock_t _lock; 555 spinlock_t _lock;
538 struct list_head node; 556 struct list_head node;
557 struct omap_hwmod_ocp_if *_mpu_port;
539 u16 flags; 558 u16 flags;
540 u8 _mpu_port_index;
541 u8 response_lat; 559 u8 response_lat;
542 u8 rst_lines_cnt; 560 u8 rst_lines_cnt;
543 u8 opt_clks_cnt; 561 u8 opt_clks_cnt;
@@ -549,7 +567,6 @@ struct omap_hwmod {
549 u8 _postsetup_state; 567 u8 _postsetup_state;
550}; 568};
551 569
552int omap_hwmod_register(struct omap_hwmod **ohs);
553struct omap_hwmod *omap_hwmod_lookup(const char *name); 570struct omap_hwmod *omap_hwmod_lookup(const char *name);
554int omap_hwmod_for_each(int (*fn)(struct omap_hwmod *oh, void *data), 571int omap_hwmod_for_each(int (*fn)(struct omap_hwmod *oh, void *data),
555 void *data); 572 void *data);
@@ -581,6 +598,8 @@ int omap_hwmod_softreset(struct omap_hwmod *oh);
581 598
582int omap_hwmod_count_resources(struct omap_hwmod *oh); 599int omap_hwmod_count_resources(struct omap_hwmod *oh);
583int omap_hwmod_fill_resources(struct omap_hwmod *oh, struct resource *res); 600int omap_hwmod_fill_resources(struct omap_hwmod *oh, struct resource *res);
601int omap_hwmod_get_resource_byname(struct omap_hwmod *oh, unsigned int type,
602 const char *name, struct resource *res);
584 603
585struct powerdomain *omap_hwmod_get_pwrdm(struct omap_hwmod *oh); 604struct powerdomain *omap_hwmod_get_pwrdm(struct omap_hwmod *oh);
586void __iomem *omap_hwmod_get_mpu_rt_va(struct omap_hwmod *oh); 605void __iomem *omap_hwmod_get_mpu_rt_va(struct omap_hwmod *oh);
@@ -619,4 +638,6 @@ extern int omap2430_hwmod_init(void);
619extern int omap3xxx_hwmod_init(void); 638extern int omap3xxx_hwmod_init(void);
620extern int omap44xx_hwmod_init(void); 639extern int omap44xx_hwmod_init(void);
621 640
641extern int __init omap_hwmod_register_links(struct omap_hwmod_ocp_if **ois);
642
622#endif 643#endif