Skip to content

Commit

Permalink
Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git…
Browse files Browse the repository at this point in the history
…/tmlind/linux-omap-2.6

* 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6:
  OMAP1: PM: register notifiers with generic clock ops even when !PM_RUNTIME
  omap: pandora: fix NAND support
  OMAP: PM: omap_device: fix device power domain callbacks
  OMAP: PM debug: fix section mismatch warnings
  • Loading branch information
Linus Torvalds committed Jun 17, 2011
2 parents 8796699 + b8ce9fb commit add7944
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 9 deletions.
4 changes: 2 additions & 2 deletions arch/arm/mach-omap1/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@

# Common support
obj-y := io.o id.o sram.o time.o irq.o mux.o flash.o serial.o devices.o dma.o
obj-y += clock.o clock_data.o opp_data.o reset.o
obj-y += clock.o clock_data.o opp_data.o reset.o pm_bus.o

obj-$(CONFIG_OMAP_MCBSP) += mcbsp.o

obj-$(CONFIG_OMAP_32K_TIMER) += timer32k.o

# Power Management
obj-$(CONFIG_PM) += pm.o sleep.o pm_bus.o
obj-$(CONFIG_PM) += pm.o sleep.o

# DSP
obj-$(CONFIG_OMAP_MBOX_FWK) += mailbox_mach.o
Expand Down
8 changes: 6 additions & 2 deletions arch/arm/mach-omap1/pm_bus.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,13 @@ static struct dev_power_domain default_power_domain = {
USE_PLATFORM_PM_SLEEP_OPS
},
};
#define OMAP1_PWR_DOMAIN (&default_power_domain)
#else
#define OMAP1_PWR_DOMAIN NULL
#endif /* CONFIG_PM_RUNTIME */

static struct pm_clk_notifier_block platform_bus_notifier = {
.pwr_domain = &default_power_domain,
.pwr_domain = OMAP1_PWR_DOMAIN,
.con_ids = { "ick", "fck", NULL, },
};

Expand All @@ -72,4 +76,4 @@ static int __init omap1_pm_runtime_init(void)
return 0;
}
core_initcall(omap1_pm_runtime_init);
#endif /* CONFIG_PM_RUNTIME */

3 changes: 2 additions & 1 deletion arch/arm/mach-omap2/board-omap3pandora.c
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,8 @@ static struct mtd_partition omap3pandora_nand_partitions[] = {

static struct omap_nand_platform_data pandora_nand_data = {
.cs = 0,
.devsize = 1, /* '0' for 8-bit, '1' for 16-bit device */
.devsize = NAND_BUSWIDTH_16,
.xfer_type = NAND_OMAP_PREFETCH_DMA,
.parts = omap3pandora_nand_partitions,
.nr_parts = ARRAY_SIZE(omap3pandora_nand_partitions),
};
Expand Down
4 changes: 2 additions & 2 deletions arch/arm/mach-omap2/pm-debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ static struct dentry *pm_dbg_dir;

static int pm_dbg_init_done;

static int __init pm_dbg_init(void);
static int pm_dbg_init(void);

enum {
DEBUG_FILE_COUNTERS = 0,
Expand Down Expand Up @@ -595,7 +595,7 @@ static int option_set(void *data, u64 val)

DEFINE_SIMPLE_ATTRIBUTE(pm_dbg_option_fops, option_get, option_set, "%llu\n");

static int __init pm_dbg_init(void)
static int pm_dbg_init(void)
{
int i;
struct dentry *d;
Expand Down
19 changes: 17 additions & 2 deletions arch/arm/plat-omap/omap_device.c
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@
#include <linux/io.h>
#include <linux/clk.h>
#include <linux/clkdev.h>
#include <linux/pm_runtime.h>

#include <plat/omap_device.h>
#include <plat/omap_hwmod.h>
Expand Down Expand Up @@ -539,20 +540,34 @@ int omap_early_device_register(struct omap_device *od)
static int _od_runtime_suspend(struct device *dev)
{
struct platform_device *pdev = to_platform_device(dev);
int ret;

ret = pm_generic_runtime_suspend(dev);

if (!ret)
omap_device_idle(pdev);

return ret;
}

return omap_device_idle(pdev);
static int _od_runtime_idle(struct device *dev)
{
return pm_generic_runtime_idle(dev);
}

static int _od_runtime_resume(struct device *dev)
{
struct platform_device *pdev = to_platform_device(dev);

return omap_device_enable(pdev);
omap_device_enable(pdev);

return pm_generic_runtime_resume(dev);
}

static struct dev_power_domain omap_device_power_domain = {
.ops = {
.runtime_suspend = _od_runtime_suspend,
.runtime_idle = _od_runtime_idle,
.runtime_resume = _od_runtime_resume,
USE_PLATFORM_PM_SLEEP_OPS
}
Expand Down

0 comments on commit add7944

Please sign in to comment.