Skip to content

Commit 446f0a4

Browse files
committed
Merge tag 'ti-keystone-soc-for-v6.6' of https://git.kernel.org/pub/scm/linux/kernel/git/ti/linux into soc/arm
TI keystone SoC updates for v6.6 Updates: - Consolidation of files and drop pm_domain.c and keystone.h * tag 'ti-keystone-soc-for-v6.6' of https://git.kernel.org/pub/scm/linux/kernel/git/ti/linux: ARM: keystone: Merge PM function into main support file ARM: keystone: Merge memory.h into the only file that uses it ARM: keystone: Drop unused includes Link: https://lore.kernel.org/r/20230814160702.6l2fcujbx33eogap@junction Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2 parents 8787bc5 + d33dbdd commit 446f0a4

File tree

5 files changed

+45
-92
lines changed

5 files changed

+45
-92
lines changed

arch/arm/mach-keystone/Makefile

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,2 @@
11
# SPDX-License-Identifier: GPL-2.0
22
obj-y := keystone.o
3-
4-
# PM domain driver for Keystone SOCs
5-
obj-$(CONFIG_ARCH_KEYSTONE) += pm_domain.o

arch/arm/mach-keystone/keystone.c

Lines changed: 45 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,23 +6,63 @@
66
* Cyril Chemparathy <cyril@ti.com>
77
* Santosh Shilimkar <santosh.shillimkar@ti.com>
88
*/
9+
910
#include <linux/io.h>
10-
#include <linux/of.h>
1111
#include <linux/dma-map-ops.h>
1212
#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>
1515
#include <linux/memblock.h>
16+
#include <linux/of.h>
17+
#include <linux/platform_device.h>
1618

1719
#include <asm/setup.h>
1820
#include <asm/mach/map.h>
1921
#include <asm/mach/arch.h>
2022
#include <asm/mach/time.h>
2123
#include <asm/page.h>
2224

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;
2457

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+
}
2666

2767
#ifdef CONFIG_ARM_LPAE
2868
static int keystone_platform_notifier(struct notifier_block *nb,

arch/arm/mach-keystone/keystone.h

Lines changed: 0 additions & 16 deletions
This file was deleted.

arch/arm/mach-keystone/memory.h

Lines changed: 0 additions & 18 deletions
This file was deleted.

arch/arm/mach-keystone/pm_domain.c

Lines changed: 0 additions & 50 deletions
This file was deleted.

0 commit comments

Comments
 (0)