diff options
Diffstat (limited to 'arch/arm/common/scoop.c')
-rw-r--r-- | arch/arm/common/scoop.c | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/arch/arm/common/scoop.c b/arch/arm/common/scoop.c index 9e5245c702de..4af0cf5f3bfb 100644 --- a/arch/arm/common/scoop.c +++ b/arch/arm/common/scoop.c | |||
@@ -12,6 +12,9 @@ | |||
12 | */ | 12 | */ |
13 | 13 | ||
14 | #include <linux/device.h> | 14 | #include <linux/device.h> |
15 | #include <linux/string.h> | ||
16 | #include <linux/slab.h> | ||
17 | |||
15 | #include <asm/io.h> | 18 | #include <asm/io.h> |
16 | #include <asm/hardware/scoop.h> | 19 | #include <asm/hardware/scoop.h> |
17 | 20 | ||
@@ -102,26 +105,24 @@ static void check_scoop_reg(struct scoop_dev *sdev) | |||
102 | } | 105 | } |
103 | 106 | ||
104 | #ifdef CONFIG_PM | 107 | #ifdef CONFIG_PM |
105 | static int scoop_suspend(struct device *dev, pm_message_t state, uint32_t level) | 108 | static int scoop_suspend(struct device *dev, pm_message_t state) |
106 | { | 109 | { |
107 | if (level == SUSPEND_POWER_DOWN) { | 110 | struct scoop_dev *sdev = dev_get_drvdata(dev); |
108 | struct scoop_dev *sdev = dev_get_drvdata(dev); | 111 | |
112 | check_scoop_reg(sdev); | ||
113 | sdev->scoop_gpwr = SCOOP_REG(sdev->base, SCOOP_GPWR); | ||
114 | SCOOP_REG(sdev->base, SCOOP_GPWR) = (sdev->scoop_gpwr & ~sdev->suspend_clr) | sdev->suspend_set; | ||
109 | 115 | ||
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; | 116 | return 0; |
115 | } | 117 | } |
116 | 118 | ||
117 | static int scoop_resume(struct device *dev, uint32_t level) | 119 | static int scoop_resume(struct device *dev) |
118 | { | 120 | { |
119 | if (level == RESUME_POWER_ON) { | 121 | struct scoop_dev *sdev = dev_get_drvdata(dev); |
120 | struct scoop_dev *sdev = dev_get_drvdata(dev); | 122 | |
123 | check_scoop_reg(sdev); | ||
124 | SCOOP_REG(sdev->base,SCOOP_GPWR) = sdev->scoop_gpwr; | ||
121 | 125 | ||
122 | check_scoop_reg(sdev); | ||
123 | SCOOP_REG(sdev->base,SCOOP_GPWR) = sdev->scoop_gpwr; | ||
124 | } | ||
125 | return 0; | 126 | return 0; |
126 | } | 127 | } |
127 | #else | 128 | #else |