[PATCH v9 2/9] qcom: spm: Add Subsystem Power Manager driver
From: Stephen Boyd <hidden>
Date: 2014-11-18 20:28:24
Also in:
linux-arm-msm, linux-devicetree, linux-pm
On 11/18/2014 08:56 AM, Lina Iyer wrote:
On Fri, Nov 14 2014 at 15:46 -0700, Stephen Boyd wrote:quoted
On 10/24, Lina Iyer wrote:quoted
quoted
+{ + struct spm_driver_data *drv = this_cpu_ptr(&cpu_spm_drv); + u32 start_index; + u32 ctl_val; + + if (!drv->available) + return -ENXIO;It would be nice if we didn't need this by only registering the cpuidle device for this CPU once we've initialized the SPM hardware.I did explore it. It strays our cpuidle code away from the standard code that we are trying to go towards with idle-states framework.
So fix the framework?
quoted
quoted
+ + /* Write the SPM sequences, first.. */ + addr = drv->reg_base + drv->reg_data->reg_offset[SPM_REG_SEQ_ENTRY]; + seq_data = (const u32 *)drv->reg_data->seq;Why do we need a cast?Compiler warns otherwise.
How?
$ cat main.c
extern int magic(const void *d);
struct m {
unsigned int data[2];
};
struct s {
const struct m *m;
};
static const struct m m = {
.data = { 0x345, 0x34},
};
static const struct s s = {
.m = &m,
};
int main()
{
const unsigned int *d;
d = s.m->data;
return magic(d);
}
$ gcc -c main.c
quoted
quoted
+ .of_match_table = spm_match_table, + }, +}; + +module_platform_driver(spm_driver);MODULE_LICENSE()? MODULE_ALIAS()?MODULE_DESCRIPTION() would work?
Sure, add them all please. -- Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project