mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-07 00:59:06 +00:00
net: ipa: move IPA flags field
The ipa->flags field is only ever used in "ipa_clock.c", related to suspend/resume activity. Move the definition of the ipa_flag enumerated type to "ipa_clock.c". And move the flags field from the ipa structure and to the ipa_clock structure. Rename the type and its values to include "power" or "POWER" in the name. Signed-off-by: Alex Elder <elder@linaro.org> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
afe1baa82d
commit
afb08b7e22
2 changed files with 14 additions and 14 deletions
|
@ -27,20 +27,9 @@ struct ipa_clock;
|
||||||
struct ipa_smp2p;
|
struct ipa_smp2p;
|
||||||
struct ipa_interrupt;
|
struct ipa_interrupt;
|
||||||
|
|
||||||
/**
|
|
||||||
* enum ipa_flag - IPA state flags
|
|
||||||
* @IPA_FLAG_RESUMED: Whether resume from suspend has been signaled
|
|
||||||
* @IPA_FLAG_COUNT: Number of defined IPA flags
|
|
||||||
*/
|
|
||||||
enum ipa_flag {
|
|
||||||
IPA_FLAG_RESUMED,
|
|
||||||
IPA_FLAG_COUNT, /* Last; not a flag */
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* struct ipa - IPA information
|
* struct ipa - IPA information
|
||||||
* @gsi: Embedded GSI structure
|
* @gsi: Embedded GSI structure
|
||||||
* @flags: Boolean state flags
|
|
||||||
* @version: IPA hardware version
|
* @version: IPA hardware version
|
||||||
* @pdev: Platform device
|
* @pdev: Platform device
|
||||||
* @completion: Used to signal pipeline clear transfer complete
|
* @completion: Used to signal pipeline clear transfer complete
|
||||||
|
@ -83,7 +72,6 @@ enum ipa_flag {
|
||||||
*/
|
*/
|
||||||
struct ipa {
|
struct ipa {
|
||||||
struct gsi gsi;
|
struct gsi gsi;
|
||||||
DECLARE_BITMAP(flags, IPA_FLAG_COUNT);
|
|
||||||
enum ipa_version version;
|
enum ipa_version version;
|
||||||
struct platform_device *pdev;
|
struct platform_device *pdev;
|
||||||
struct completion completion;
|
struct completion completion;
|
||||||
|
|
|
@ -45,11 +45,22 @@ struct ipa_interconnect {
|
||||||
u32 peak_bandwidth;
|
u32 peak_bandwidth;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* enum ipa_power_flag - IPA power flags
|
||||||
|
* @IPA_POWER_FLAG_RESUMED: Whether resume from suspend has been signaled
|
||||||
|
* @IPA_POWER_FLAG_COUNT: Number of defined power flags
|
||||||
|
*/
|
||||||
|
enum ipa_power_flag {
|
||||||
|
IPA_POWER_FLAG_RESUMED,
|
||||||
|
IPA_POWER_FLAG_COUNT, /* Last; not a flag */
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* struct ipa_clock - IPA clocking information
|
* struct ipa_clock - IPA clocking information
|
||||||
* @count: Clocking reference count
|
* @count: Clocking reference count
|
||||||
* @mutex: Protects clock enable/disable
|
* @mutex: Protects clock enable/disable
|
||||||
* @core: IPA core clock
|
* @core: IPA core clock
|
||||||
|
* @flags: Boolean state flags
|
||||||
* @interconnect_count: Number of elements in interconnect[]
|
* @interconnect_count: Number of elements in interconnect[]
|
||||||
* @interconnect: Interconnect array
|
* @interconnect: Interconnect array
|
||||||
*/
|
*/
|
||||||
|
@ -57,6 +68,7 @@ struct ipa_clock {
|
||||||
refcount_t count;
|
refcount_t count;
|
||||||
struct mutex mutex; /* protects clock enable/disable */
|
struct mutex mutex; /* protects clock enable/disable */
|
||||||
struct clk *core;
|
struct clk *core;
|
||||||
|
DECLARE_BITMAP(flags, IPA_POWER_FLAG_COUNT);
|
||||||
u32 interconnect_count;
|
u32 interconnect_count;
|
||||||
struct ipa_interconnect *interconnect;
|
struct ipa_interconnect *interconnect;
|
||||||
};
|
};
|
||||||
|
@ -295,7 +307,7 @@ static void ipa_suspend_handler(struct ipa *ipa, enum ipa_irq_id irq_id)
|
||||||
* More than one endpoint could signal this; if so, ignore
|
* More than one endpoint could signal this; if so, ignore
|
||||||
* all but the first.
|
* all but the first.
|
||||||
*/
|
*/
|
||||||
if (!test_and_set_bit(IPA_FLAG_RESUMED, ipa->flags))
|
if (!test_and_set_bit(IPA_POWER_FLAG_RESUMED, ipa->clock->flags))
|
||||||
pm_wakeup_dev_event(&ipa->pdev->dev, 0, true);
|
pm_wakeup_dev_event(&ipa->pdev->dev, 0, true);
|
||||||
|
|
||||||
/* Acknowledge/clear the suspend interrupt on all endpoints */
|
/* Acknowledge/clear the suspend interrupt on all endpoints */
|
||||||
|
@ -388,7 +400,7 @@ static int ipa_suspend(struct device *dev)
|
||||||
|
|
||||||
/* Endpoints aren't usable until setup is complete */
|
/* Endpoints aren't usable until setup is complete */
|
||||||
if (ipa->setup_complete) {
|
if (ipa->setup_complete) {
|
||||||
__clear_bit(IPA_FLAG_RESUMED, ipa->flags);
|
__clear_bit(IPA_POWER_FLAG_RESUMED, ipa->clock->flags);
|
||||||
ipa_endpoint_suspend(ipa);
|
ipa_endpoint_suspend(ipa);
|
||||||
gsi_suspend(&ipa->gsi);
|
gsi_suspend(&ipa->gsi);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue