aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/common/scoop.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/common/scoop.c')
-rw-r--r--arch/arm/common/scoop.c24
1 files changed, 11 insertions, 13 deletions
diff --git a/arch/arm/common/scoop.c b/arch/arm/common/scoop.c
index 9e5245c702de..e8356b76d7c6 100644
--- a/arch/arm/common/scoop.c
+++ b/arch/arm/common/scoop.c
@@ -102,26 +102,24 @@ static void check_scoop_reg(struct scoop_dev *sdev)
102} 102}
103 103
104#ifdef CONFIG_PM 104#ifdef CONFIG_PM
105static int scoop_suspend(struct device *dev, pm_message_t state, uint32_t level) 105static int scoop_suspend(struct device *dev, pm_message_t state)
106{ 106{
107 if (level == SUSPEND_POWER_DOWN) { 107 struct scoop_dev *sdev = dev_get_drvdata(dev);
108 struct scoop_dev *sdev = dev_get_drvdata(dev); 108
109 check_scoop_reg(sdev);
110 sdev->scoop_gpwr = SCOOP_REG(sdev->base, SCOOP_GPWR);
111 SCOOP_REG(sdev->base, SCOOP_GPWR) = (sdev->scoop_gpwr & ~sdev->suspend_clr) | sdev->suspend_set;
109 112
110 check_scoop_reg(sdev);
111 sdev->scoop_gpwr = SCOOP_REG(sdev->base, SCOOP_GPWR);
112 SCOOP_REG(sdev->base, SCOOP_GPWR) = (sdev->scoop_gpwr & ~sdev->suspend_clr) | sdev->suspend_set;
113 }
114 return 0; 113 return 0;
115} 114}
116 115
117static int scoop_resume(struct device *dev, uint32_t level) 116static int scoop_resume(struct device *dev)
118{ 117{
119 if (level == RESUME_POWER_ON) { 118 struct scoop_dev *sdev = dev_get_drvdata(dev);
120 struct scoop_dev *sdev = dev_get_drvdata(dev); 119
120 check_scoop_reg(sdev);
121 SCOOP_REG(sdev->base,SCOOP_GPWR) = sdev->scoop_gpwr;
121 122
122 check_scoop_reg(sdev);
123 SCOOP_REG(sdev->base,SCOOP_GPWR) = sdev->scoop_gpwr;
124 }
125 return 0; 123 return 0;
126} 124}
127#else 125#else