aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/common
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/common')
-rw-r--r--arch/arm/common/locomo.c10
-rw-r--r--arch/arm/common/sa1111.c11
-rw-r--r--arch/arm/common/scoop.c24
3 files changed, 15 insertions, 30 deletions
diff --git a/arch/arm/common/locomo.c b/arch/arm/common/locomo.c
index e8053d16829b..5cdb4122f057 100644
--- a/arch/arm/common/locomo.c
+++ b/arch/arm/common/locomo.c
@@ -550,15 +550,12 @@ struct locomo_save_data {
550 u16 LCM_SPIMD; 550 u16 LCM_SPIMD;
551}; 551};
552 552
553static int locomo_suspend(struct device *dev, pm_message_t state, u32 level) 553static int locomo_suspend(struct device *dev, pm_message_t state)
554{ 554{
555 struct locomo *lchip = dev_get_drvdata(dev); 555 struct locomo *lchip = dev_get_drvdata(dev);
556 struct locomo_save_data *save; 556 struct locomo_save_data *save;
557 unsigned long flags; 557 unsigned long flags;
558 558
559 if (level != SUSPEND_DISABLE)
560 return 0;
561
562 save = kmalloc(sizeof(struct locomo_save_data), GFP_KERNEL); 559 save = kmalloc(sizeof(struct locomo_save_data), GFP_KERNEL);
563 if (!save) 560 if (!save)
564 return -ENOMEM; 561 return -ENOMEM;
@@ -597,16 +594,13 @@ static int locomo_suspend(struct device *dev, pm_message_t state, u32 level)
597 return 0; 594 return 0;
598} 595}
599 596
600static int locomo_resume(struct device *dev, u32 level) 597static int locomo_resume(struct device *dev)
601{ 598{
602 struct locomo *lchip = dev_get_drvdata(dev); 599 struct locomo *lchip = dev_get_drvdata(dev);
603 struct locomo_save_data *save; 600 struct locomo_save_data *save;
604 unsigned long r; 601 unsigned long r;
605 unsigned long flags; 602 unsigned long flags;
606 603
607 if (level != RESUME_ENABLE)
608 return 0;
609
610 save = (struct locomo_save_data *) dev->power.saved_state; 604 save = (struct locomo_save_data *) dev->power.saved_state;
611 if (!save) 605 if (!save)
612 return 0; 606 return 0;
diff --git a/arch/arm/common/sa1111.c b/arch/arm/common/sa1111.c
index 1a47fbf9cbbc..21e2a518ad3a 100644
--- a/arch/arm/common/sa1111.c
+++ b/arch/arm/common/sa1111.c
@@ -801,7 +801,7 @@ struct sa1111_save_data {
801 801
802#ifdef CONFIG_PM 802#ifdef CONFIG_PM
803 803
804static int sa1111_suspend(struct device *dev, pm_message_t state, u32 level) 804static int sa1111_suspend(struct device *dev, pm_message_t state)
805{ 805{
806 struct sa1111 *sachip = dev_get_drvdata(dev); 806 struct sa1111 *sachip = dev_get_drvdata(dev);
807 struct sa1111_save_data *save; 807 struct sa1111_save_data *save;
@@ -809,9 +809,6 @@ static int sa1111_suspend(struct device *dev, pm_message_t state, u32 level)
809 unsigned int val; 809 unsigned int val;
810 void __iomem *base; 810 void __iomem *base;
811 811
812 if (level != SUSPEND_DISABLE)
813 return 0;
814
815 save = kmalloc(sizeof(struct sa1111_save_data), GFP_KERNEL); 812 save = kmalloc(sizeof(struct sa1111_save_data), GFP_KERNEL);
816 if (!save) 813 if (!save)
817 return -ENOMEM; 814 return -ENOMEM;
@@ -856,23 +853,19 @@ static int sa1111_suspend(struct device *dev, pm_message_t state, u32 level)
856/* 853/*
857 * sa1111_resume - Restore the SA1111 device state. 854 * sa1111_resume - Restore the SA1111 device state.
858 * @dev: device to restore 855 * @dev: device to restore
859 * @level: resume level
860 * 856 *
861 * Restore the general state of the SA1111; clock control and 857 * Restore the general state of the SA1111; clock control and
862 * interrupt controller. Other parts of the SA1111 must be 858 * interrupt controller. Other parts of the SA1111 must be
863 * restored by their respective drivers, and must be called 859 * restored by their respective drivers, and must be called
864 * via LDM after this function. 860 * via LDM after this function.
865 */ 861 */
866static int sa1111_resume(struct device *dev, u32 level) 862static int sa1111_resume(struct device *dev)
867{ 863{
868 struct sa1111 *sachip = dev_get_drvdata(dev); 864 struct sa1111 *sachip = dev_get_drvdata(dev);
869 struct sa1111_save_data *save; 865 struct sa1111_save_data *save;
870 unsigned long flags, id; 866 unsigned long flags, id;
871 void __iomem *base; 867 void __iomem *base;
872 868
873 if (level != RESUME_ENABLE)
874 return 0;
875
876 save = (struct sa1111_save_data *)dev->power.saved_state; 869 save = (struct sa1111_save_data *)dev->power.saved_state;
877 if (!save) 870 if (!save)
878 return 0; 871 return 0;
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