|
6 | 6 | * Cyril Chemparathy <cyril@ti.com>
|
7 | 7 | * Santosh Shilimkar <santosh.shillimkar@ti.com>
|
8 | 8 | */
|
| 9 | + |
9 | 10 | #include <linux/io.h>
|
10 |
| -#include <linux/of.h> |
11 | 11 | #include <linux/dma-map-ops.h>
|
12 | 12 | #include <linux/init.h>
|
13 |
| -#include <linux/of_platform.h> |
14 |
| -#include <linux/of_address.h> |
| 13 | +#include <linux/pm_runtime.h> |
| 14 | +#include <linux/pm_clock.h> |
15 | 15 | #include <linux/memblock.h>
|
| 16 | +#include <linux/of.h> |
| 17 | +#include <linux/platform_device.h> |
16 | 18 |
|
17 | 19 | #include <asm/setup.h>
|
18 | 20 | #include <asm/mach/map.h>
|
19 | 21 | #include <asm/mach/arch.h>
|
20 | 22 | #include <asm/mach/time.h>
|
21 | 23 | #include <asm/page.h>
|
22 | 24 |
|
23 |
| -#include "memory.h" |
| 25 | +#define KEYSTONE_LOW_PHYS_START 0x80000000ULL |
| 26 | +#define KEYSTONE_LOW_PHYS_SIZE 0x80000000ULL /* 2G */ |
| 27 | +#define KEYSTONE_LOW_PHYS_END (KEYSTONE_LOW_PHYS_START + \ |
| 28 | + KEYSTONE_LOW_PHYS_SIZE - 1) |
| 29 | + |
| 30 | +#define KEYSTONE_HIGH_PHYS_START 0x800000000ULL |
| 31 | +#define KEYSTONE_HIGH_PHYS_SIZE 0x400000000ULL /* 16G */ |
| 32 | +#define KEYSTONE_HIGH_PHYS_END (KEYSTONE_HIGH_PHYS_START + \ |
| 33 | + KEYSTONE_HIGH_PHYS_SIZE - 1) |
| 34 | + |
| 35 | +static struct dev_pm_domain keystone_pm_domain = { |
| 36 | + .ops = { |
| 37 | + USE_PM_CLK_RUNTIME_OPS |
| 38 | + USE_PLATFORM_PM_SLEEP_OPS |
| 39 | + }, |
| 40 | +}; |
| 41 | + |
| 42 | +static struct pm_clk_notifier_block platform_domain_notifier = { |
| 43 | + .pm_domain = &keystone_pm_domain, |
| 44 | + .con_ids = { NULL }, |
| 45 | +}; |
| 46 | + |
| 47 | +static const struct of_device_id of_keystone_table[] = { |
| 48 | + {.compatible = "ti,k2hk"}, |
| 49 | + {.compatible = "ti,k2e"}, |
| 50 | + {.compatible = "ti,k2l"}, |
| 51 | + { /* end of list */ }, |
| 52 | +}; |
| 53 | + |
| 54 | +static int __init keystone_pm_runtime_init(void) |
| 55 | +{ |
| 56 | + struct device_node *np; |
24 | 57 |
|
25 |
| -#include "keystone.h" |
| 58 | + np = of_find_matching_node(NULL, of_keystone_table); |
| 59 | + if (!np) |
| 60 | + return 0; |
| 61 | + |
| 62 | + pm_clk_add_notifier(&platform_bus_type, &platform_domain_notifier); |
| 63 | + |
| 64 | + return 0; |
| 65 | +} |
26 | 66 |
|
27 | 67 | #ifdef CONFIG_ARM_LPAE
|
28 | 68 | static int keystone_platform_notifier(struct notifier_block *nb,
|
|
0 commit comments