davinci: da850/omap-l138 EVM: register for suspend support
authorSekhar Nori <nsekhar@ti.com>
Thu, 17 Dec 2009 12:59:33 +0000 (18:29 +0530)
committerKevin Hilman <khilman@deeprootsystems.com>
Thu, 4 Feb 2010 21:29:57 +0000 (13:29 -0800)
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
arch/arm/mach-davinci/board-da850-evm.c

index 76e4347c666f2a23c54590eb24d9425216c15fa2..411284d0b0faab646d6c39d1d0fe8c5259ca70fd 100644 (file)
@@ -89,6 +89,18 @@ static struct platform_device da850_evm_norflash_device = {
        .resource       = da850_evm_norflash_resource,
 };
 
+static struct davinci_pm_config da850_pm_pdata = {
+       .sleepcount = 128,
+};
+
+static struct platform_device da850_pm_device = {
+       .name           = "pm-davinci",
+       .dev = {
+               .platform_data  = &da850_pm_pdata,
+       },
+       .id             = -1,
+};
+
 /* DA850/OMAP-L138 EVM includes a 512 MByte large-page NAND flash
  * (128K blocks). It may be used instead of the (default) SPI flash
  * to boot, using TI's tools to install the secondary boot loader
@@ -709,6 +721,11 @@ static __init void da850_evm_init(void)
        if (ret)
                pr_warning("da850_evm_init: cpuidle registration failed: %d\n",
                                ret);
+
+       ret = da850_register_pm(&da850_pm_device);
+       if (ret)
+               pr_warning("da850_evm_init: suspend registration failed: %d\n",
+                               ret);
 }
 
 #ifdef CONFIG_SERIAL_8250_CONSOLE