* Author: Sreedhara DS (sreedhara.ds@intel.com)
* (C) Copyright 2010 Intel Corporation
* Author: Sudha Krishnakumar (sudha.krishnakumar@intel.com)
+ * (C) Copyright 2012 Intel Corporation
+ * Author: Shijie Zhang (shijie.zhang@intel.com)
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
#define INTEL_SCU_IPC_WRITE_RR_TO_OSNIB 0xC2
#define INTEL_SCU_IPC_READ_VBATTCRIT 0xC4
#define INTEL_SCU_IPC_WRITE_ALARM_FLAG_TO_OSNIB 0xC5
+#define INTEL_SCU_IPC_OSC_CLK_CNTL 0xC6
#define OSHOB_PMIT_OFFSET 0x0000002c
#define OSNIB_RR_OFFSET OSNIB_OFFSET
u8 data[16]; /* version data */
};
+struct osc_clk_t {
+ unsigned int id; /* clock id */
+ unsigned int khz; /* clock frequency */
+};
+
/**
* scu_reg_access - implement register access ioctls
* @cmd: command we are doing (read/write/update)
ret = -EFAULT;
break;
}
+ case INTEL_SCU_IPC_OSC_CLK_CNTL:
+ {
+ struct osc_clk_t osc_clk;
+
+ if (copy_from_user(&osc_clk, argp, sizeof(struct osc_clk_t)))
+ return -EFAULT;
+
+ ret = intel_scu_ipc_osc_clk(osc_clk.id, osc_clk.khz);
+ if (ret)
+ pr_err("%s: failed to set osc clk\n", __func__);
+
+ break;
+ }
default:
if (copy_from_user(&data, argp, sizeof(struct scu_ipc_data)))
return -EFAULT;