On Tue, Nov 03, 2009 at 00:51:51, Kevin Hilman wrote:
> Sekhar Nori <[email protected]> writes:
>
[...]
> > diff --git a/arch/arm/mach-davinci/cpuidle.c
> > b/arch/arm/mach-davinci/cpuidle.c
> > new file mode 100644
> > +#include <linux/kernel.h>
> > +#include <linux/init.h>
> > +#include <linux/platform_device.h>
> > +#include <linux/cpuidle.h>
> > +#include <linux/io.h>
> > +#include <asm/proc-fns.h>
> > +
> > +#include <mach/cpuidle.h>
> > +
> > +#define DAVINCI_CPUIDLE_MAX_STATES 2
> > +
> > +struct davinci_ops {
> > + void (*enter) (void);
> > + void (*exit) (void);
> > +};
> > +
> > +static struct cpuidle_driver davinci_idle_driver = {
> > + .name = "cpuidle-davinci",
> > + .owner = THIS_MODULE,
> > +};
> > +
> > +static DEFINE_PER_CPU(struct cpuidle_device, davinci_cpuidle_device);
> > +static void __iomem *ddr2_reg_base;
> > +static int ddr2_pdown;
>
> Hmm, not crazy about this global. I think it should probably be a per
> C-state flag/bool instead.
>
> Maybe adding a 'u32 flags' field to davinci_states where this could be
> one of the options.
Kevin,
Power down support as such is platform specific, not state
specific. OTOH, having a per-state flag enables extension
to doing self-refresh in one state and power down in another
if so desired.
I guess it makes some sense both ways and I have gone ahead
and added the flags to davinci_ops as you asked for.
Thanks,
Sekhar
_______________________________________________
Davinci-linux-open-source mailing list
[email protected]
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source