-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge tag 'davinci-v3.6-dt' of git://gitorious.org/linux-davinci/linu…
…x-davinci into next/dt From Sekhar Nori <nsekhar@ti.com>: DaVinci DT support Add DT support for DaVinci cp_intc interrupt controller * tag 'davinci-v3.6-dt' of git://gitorious.org/linux-davinci/linux-davinci: ARM: davinci: cp_intc: Add OF support for TI interrupt controller ARM: davinci: add runtime PM support for clock management ARM: davinci: cp_intc: Add irq domain support Signed-off-by: Arnd Bergmann <arnd@arndb.de>
- Loading branch information
Showing
6 changed files
with
154 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
* TI Common Platform Interrupt Controller | ||
|
||
Common Platform Interrupt Controller (cp_intc) is used on | ||
OMAP-L1x SoCs and can support several configurable number | ||
of interrupts. | ||
|
||
Main node required properties: | ||
|
||
- compatible : should be: | ||
"ti,cp-intc" | ||
- interrupt-controller : Identifies the node as an interrupt controller | ||
- #interrupt-cells : Specifies the number of cells needed to encode an | ||
interrupt source. The type shall be a <u32> and the value shall be 1. | ||
|
||
The cell contains the interrupt number in the range [0-128]. | ||
- ti,intc-size: Number of interrupts handled by the interrupt controller. | ||
- reg: physical base address and size of the intc registers map. | ||
|
||
Example: | ||
|
||
intc: interrupt-controller@1 { | ||
compatible = "ti,cp-intc"; | ||
interrupt-controller; | ||
#interrupt-cells = <1>; | ||
ti,intc-size = <101>; | ||
reg = <0xfffee000 0x2000>; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,7 @@ config AINTC | |
bool | ||
|
||
config CP_INTC | ||
select IRQ_DOMAIN | ||
bool | ||
|
||
config ARCH_DAVINCI_DMx | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
/* | ||
* Runtime PM support code for DaVinci | ||
* | ||
* Author: Kevin Hilman | ||
* | ||
* Copyright (C) 2012 Texas Instruments, Inc. | ||
* | ||
* This file is licensed under the terms of the GNU General Public | ||
* License version 2. This program is licensed "as is" without any | ||
* warranty of any kind, whether express or implied. | ||
*/ | ||
#include <linux/init.h> | ||
#include <linux/pm_runtime.h> | ||
#include <linux/pm_clock.h> | ||
#include <linux/platform_device.h> | ||
|
||
#ifdef CONFIG_PM_RUNTIME | ||
static int davinci_pm_runtime_suspend(struct device *dev) | ||
{ | ||
int ret; | ||
|
||
dev_dbg(dev, "%s\n", __func__); | ||
|
||
ret = pm_generic_runtime_suspend(dev); | ||
if (ret) | ||
return ret; | ||
|
||
ret = pm_clk_suspend(dev); | ||
if (ret) { | ||
pm_generic_runtime_resume(dev); | ||
return ret; | ||
} | ||
|
||
return 0; | ||
} | ||
|
||
static int davinci_pm_runtime_resume(struct device *dev) | ||
{ | ||
dev_dbg(dev, "%s\n", __func__); | ||
|
||
pm_clk_resume(dev); | ||
return pm_generic_runtime_resume(dev); | ||
} | ||
#endif | ||
|
||
static struct dev_pm_domain davinci_pm_domain = { | ||
.ops = { | ||
SET_RUNTIME_PM_OPS(davinci_pm_runtime_suspend, | ||
davinci_pm_runtime_resume, NULL) | ||
USE_PLATFORM_PM_SLEEP_OPS | ||
}, | ||
}; | ||
|
||
static struct pm_clk_notifier_block platform_bus_notifier = { | ||
.pm_domain = &davinci_pm_domain, | ||
}; | ||
|
||
static int __init davinci_pm_runtime_init(void) | ||
{ | ||
pm_clk_add_notifier(&platform_bus_type, &platform_bus_notifier); | ||
|
||
return 0; | ||
} | ||
core_initcall(davinci_pm_runtime_init); |