Merged changes from git://jfumg-gcrmirror.jf.intel.com/a/bsp/hardware/intel/linux-2.6.git
commit
9281a8b9e1ce267b74e5b73fa6ac822f5c1a8aa4
Author: Pavan <pavan.kumar.s@intel.com>
Date: Thu Sep 15 16:23:50 2011 +0100
mid_pmu: implement mfld_shutdown to send S5 pmu command
BZ: 5512
mfld_shutdown function is implemented to issue S5 pmu command
This will be invoked from mrst.c to enter into S5. S5 sequence is
necessary to sync vRTC to RTC
Change-Id: Ie31291a24fdd1437b9ab6711907ce90aff08a65b
Signed-off-by: Pavan <pavan.kumar.s@intel.com>
Orig-Change-Id: Ifb39bcc457c59aaa9865559e45b7429327edf05e
Reviewed-on: http://android.intel.com:8080/19746
Reviewed-by: Martin, LoicX <loicx.martin@intel.com>
Reviewed-by: Mansoor, Illyas <illyas.mansoor@intel.com>
Reviewed-by: Mendi, EduardoX <eduardox.mendi@intel.com>
Tested-by: Martin, LoicX <loicx.martin@intel.com>
Reviewed-by: buildbot <buildbot@intel.com>
Tested-by: buildbot <buildbot@intel.com>
Change-Id: I83f74c2c8a172ae19b06bc79b2cd51f661d66008
Reviewed-on: http://android.intel.com:8080/24608
Reviewed-by: Gross, Mark <mark.gross@intel.com>
Tested-by: Gross, Mark <mark.gross@intel.com>
return ret;
}
+void mfld_shutdown(void)
+{
+ down(&scu_ready_sem);
+ /* wait till SCU is ready */
+ if (_pmu2_wait_not_busy())
+ dev_err(&pmu_dev->dev, "SCU BUSY. Unable to Enter S5\n");
+ else
+ /*send S5 command to SCU*/
+ writel(S5_VALUE, &pmu_reg->pm_cmd);
+
+ /* no more pm command expected. So not doing sem up */
+
+}
+
static void mid_end(void)
{
#ifdef CONFIG_HAS_WAKELOCK
/* some random number for initvalue */
#define MID_PCI_INDEX_HASH_INITVALUE 0x27041975
+#define S5_VALUE 0x309D2601
#define S0I1_VALUE 0X30992601
#define LPMP3_VALUE 0X40492601
#define S0I3_VALUE 0X309B2601
#include <linux/irq.h>
#include <linux/module.h>
#include <linux/notifier.h>
+#include <linux/intel_mid_pm.h>
#include <asm/setup.h>
#include <asm/mpspec_def.h>
{
if (__mrst_cpu_chip == MRST_CPU_CHIP_LINCROFT)
intel_scu_ipc_simple_command(IPCMSG_COLD_RESET, 1);
+ else {
+ mfld_shutdown();
+ }
+
}
static void mrst_reboot(void)
extern unsigned long pmu_get_cstate(unsigned long eax);
extern int pmu_nc_set_power_state
(int islands, int state_type, int reg_type);
+extern void mfld_shutdown(void);
#else