| .. | .. |
|---|
| 1 | +/* SPDX-License-Identifier: GPL-2.0-only */ |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * omap_hwmod macros, structures |
|---|
| 3 | 4 | * |
|---|
| .. | .. |
|---|
| 8 | 9 | * Created in collaboration with (alphabetical order): BenoƮt Cousson, |
|---|
| 9 | 10 | * Kevin Hilman, Tony Lindgren, Rajendra Nayak, Vikram Pandita, Sakari |
|---|
| 10 | 11 | * Poussa, Anand Sawant, Santosh Shilimkar, Richard Woodruff |
|---|
| 11 | | - * |
|---|
| 12 | | - * This program is free software; you can redistribute it and/or modify |
|---|
| 13 | | - * it under the terms of the GNU General Public License version 2 as |
|---|
| 14 | | - * published by the Free Software Foundation. |
|---|
| 15 | 12 | * |
|---|
| 16 | 13 | * These headers and macros are used to define OMAP on-chip module |
|---|
| 17 | 14 | * data and their integration with other OMAP modules and Linux. |
|---|
| .. | .. |
|---|
| 24 | 21 | * - init_conn_id_bit (CONNID_BIT_VECTOR) |
|---|
| 25 | 22 | * - implement default hwmod SMS/SDRC flags? |
|---|
| 26 | 23 | * - move Linux-specific data ("non-ROM data") out |
|---|
| 27 | | - * |
|---|
| 28 | 24 | */ |
|---|
| 29 | 25 | #ifndef __ARCH_ARM_PLAT_OMAP_INCLUDE_MACH_OMAP_HWMOD_H |
|---|
| 30 | 26 | #define __ARCH_ARM_PLAT_OMAP_INCLUDE_MACH_OMAP_HWMOD_H |
|---|
| .. | .. |
|---|
| 493 | 489 | #define _HWMOD_STATE_IDLE 5 |
|---|
| 494 | 490 | #define _HWMOD_STATE_DISABLED 6 |
|---|
| 495 | 491 | |
|---|
| 492 | +#ifdef CONFIG_PM |
|---|
| 493 | +#define _HWMOD_STATE_DEFAULT _HWMOD_STATE_IDLE |
|---|
| 494 | +#else |
|---|
| 495 | +#define _HWMOD_STATE_DEFAULT _HWMOD_STATE_ENABLED |
|---|
| 496 | +#endif |
|---|
| 497 | + |
|---|
| 496 | 498 | /** |
|---|
| 497 | 499 | * struct omap_hwmod_class - the type of an IP block |
|---|
| 498 | 500 | * @name: name of the hwmod_class |
|---|
| 499 | 501 | * @sysc: device SYSCONFIG/SYSSTATUS register data |
|---|
| 500 | | - * @rev: revision of the IP class |
|---|
| 501 | 502 | * @pre_shutdown: ptr to fn to be executed immediately prior to device shutdown |
|---|
| 502 | 503 | * @reset: ptr to fn to be executed in place of the standard hwmod reset fn |
|---|
| 503 | | - * @enable_preprogram: ptr to fn to be executed during device enable |
|---|
| 504 | 504 | * @lock: ptr to fn to be executed to lock IP registers |
|---|
| 505 | 505 | * @unlock: ptr to fn to be executed to unlock IP registers |
|---|
| 506 | 506 | * |
|---|
| .. | .. |
|---|
| 523 | 523 | struct omap_hwmod_class { |
|---|
| 524 | 524 | const char *name; |
|---|
| 525 | 525 | struct omap_hwmod_class_sysconfig *sysc; |
|---|
| 526 | | - u32 rev; |
|---|
| 527 | 526 | int (*pre_shutdown)(struct omap_hwmod *oh); |
|---|
| 528 | 527 | int (*reset)(struct omap_hwmod *oh); |
|---|
| 529 | | - int (*enable_preprogram)(struct omap_hwmod *oh); |
|---|
| 530 | 528 | void (*lock)(struct omap_hwmod *oh); |
|---|
| 531 | 529 | void (*unlock)(struct omap_hwmod *oh); |
|---|
| 532 | 530 | }; |
|---|
| .. | .. |
|---|
| 646 | 644 | struct powerdomain *omap_hwmod_get_pwrdm(struct omap_hwmod *oh); |
|---|
| 647 | 645 | void __iomem *omap_hwmod_get_mpu_rt_va(struct omap_hwmod *oh); |
|---|
| 648 | 646 | |
|---|
| 649 | | -int omap_hwmod_enable_wakeup(struct omap_hwmod *oh); |
|---|
| 650 | | -int omap_hwmod_disable_wakeup(struct omap_hwmod *oh); |
|---|
| 651 | | - |
|---|
| 652 | 647 | int omap_hwmod_for_each_by_class(const char *classname, |
|---|
| 653 | 648 | int (*fn)(struct omap_hwmod *oh, |
|---|
| 654 | 649 | void *user), |
|---|
| .. | .. |
|---|
| 665 | 660 | * |
|---|
| 666 | 661 | */ |
|---|
| 667 | 662 | |
|---|
| 668 | | -extern int omap_hwmod_aess_preprogram(struct omap_hwmod *oh); |
|---|
| 669 | 663 | void omap_hwmod_rtc_unlock(struct omap_hwmod *oh); |
|---|
| 670 | 664 | void omap_hwmod_rtc_lock(struct omap_hwmod *oh); |
|---|
| 671 | 665 | |
|---|