Unverified Commit 446f0a4b authored by Arnd Bergmann's avatar Arnd Bergmann
Browse files

Merge tag 'ti-keystone-soc-for-v6.6' of...

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: default avatarArnd Bergmann <arnd@arndb.de>
parents 8787bc51 d33dbddf
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
# SPDX-License-Identifier: GPL-2.0
obj-y					:= keystone.o

# PM domain driver for Keystone SOCs
obj-$(CONFIG_ARCH_KEYSTONE)		+= pm_domain.o
+45 −5
Original line number Diff line number Diff line
@@ -6,13 +6,15 @@
 *	Cyril Chemparathy <cyril@ti.com>
 *	Santosh Shilimkar <santosh.shillimkar@ti.com>
 */

#include <linux/io.h>
#include <linux/of.h>
#include <linux/dma-map-ops.h>
#include <linux/init.h>
#include <linux/of_platform.h>
#include <linux/of_address.h>
#include <linux/pm_runtime.h>
#include <linux/pm_clock.h>
#include <linux/memblock.h>
#include <linux/of.h>
#include <linux/platform_device.h>

#include <asm/setup.h>
#include <asm/mach/map.h>
@@ -20,9 +22,47 @@
#include <asm/mach/time.h>
#include <asm/page.h>

#include "memory.h"
#define KEYSTONE_LOW_PHYS_START		0x80000000ULL
#define KEYSTONE_LOW_PHYS_SIZE		0x80000000ULL /* 2G */
#define KEYSTONE_LOW_PHYS_END		(KEYSTONE_LOW_PHYS_START + \
					 KEYSTONE_LOW_PHYS_SIZE - 1)

#define KEYSTONE_HIGH_PHYS_START	0x800000000ULL
#define KEYSTONE_HIGH_PHYS_SIZE		0x400000000ULL	/* 16G */
#define KEYSTONE_HIGH_PHYS_END		(KEYSTONE_HIGH_PHYS_START + \
					 KEYSTONE_HIGH_PHYS_SIZE - 1)

static struct dev_pm_domain keystone_pm_domain = {
	.ops = {
		USE_PM_CLK_RUNTIME_OPS
		USE_PLATFORM_PM_SLEEP_OPS
	},
};

static struct pm_clk_notifier_block platform_domain_notifier = {
	.pm_domain = &keystone_pm_domain,
	.con_ids = { NULL },
};

static const struct of_device_id of_keystone_table[] = {
	{.compatible = "ti,k2hk"},
	{.compatible = "ti,k2e"},
	{.compatible = "ti,k2l"},
	{ /* end of list */ },
};

#include "keystone.h"
static int __init keystone_pm_runtime_init(void)
{
	struct device_node *np;

	np = of_find_matching_node(NULL, of_keystone_table);
	if (!np)
		return 0;

	pm_clk_add_notifier(&platform_bus_type, &platform_domain_notifier);

	return 0;
}

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

arch/arm/mach-keystone/keystone.h

deleted100644 → 0
+0 −16
Original line number Diff line number Diff line
/* SPDX-License-Identifier: GPL-2.0-only */
/*
 * Copyright 2013 Texas Instruments, Inc.
 *	Cyril Chemparathy <cyril@ti.com>
 *	Santosh Shilimkar <santosh.shillimkar@ti.com>
 */

#ifndef __KEYSTONE_H__
#define __KEYSTONE_H__

#ifndef __ASSEMBLER__

extern int keystone_pm_runtime_init(void);

#endif /* __ASSEMBLER__ */
#endif /* __KEYSTONE_H__ */

arch/arm/mach-keystone/memory.h

deleted100644 → 0
+0 −18
Original line number Diff line number Diff line
/* SPDX-License-Identifier: GPL-2.0-only */
/*
 * Copyright 2014 Texas Instruments, Inc.
 *	Santosh Shilimkar <santosh.shilimkar@ti.com>
 */
#ifndef __MEMORY_H
#define __MEMORY_H

#define KEYSTONE_LOW_PHYS_START		0x80000000ULL
#define KEYSTONE_LOW_PHYS_SIZE		0x80000000ULL /* 2G */
#define KEYSTONE_LOW_PHYS_END		(KEYSTONE_LOW_PHYS_START + \
					 KEYSTONE_LOW_PHYS_SIZE - 1)

#define KEYSTONE_HIGH_PHYS_START	0x800000000ULL
#define KEYSTONE_HIGH_PHYS_SIZE		0x400000000ULL	/* 16G */
#define KEYSTONE_HIGH_PHYS_END		(KEYSTONE_HIGH_PHYS_START + \
					 KEYSTONE_HIGH_PHYS_SIZE - 1)
#endif /* __MEMORY_H */
+0 −50
Original line number Diff line number Diff line
// SPDX-License-Identifier: GPL-2.0-only
/*
 * PM domain driver for Keystone2 devices
 *
 * Copyright 2013 Texas Instruments, Inc.
 *	Santosh Shilimkar <santosh.shillimkar@ti.com>
 *
 * Based on Kevins work on DAVINCI SOCs
 *	Kevin Hilman <khilman@linaro.org>
 */

#include <linux/init.h>
#include <linux/pm_runtime.h>
#include <linux/pm_clock.h>
#include <linux/platform_device.h>
#include <linux/of.h>

#include "keystone.h"

static struct dev_pm_domain keystone_pm_domain = {
	.ops = {
		USE_PM_CLK_RUNTIME_OPS
		USE_PLATFORM_PM_SLEEP_OPS
	},
};

static struct pm_clk_notifier_block platform_domain_notifier = {
	.pm_domain = &keystone_pm_domain,
	.con_ids = { NULL },
};

static const struct of_device_id of_keystone_table[] = {
	{.compatible = "ti,k2hk"},
	{.compatible = "ti,k2e"},
	{.compatible = "ti,k2l"},
	{ /* end of list */ },
};

int __init keystone_pm_runtime_init(void)
{
	struct device_node *np;

	np = of_find_matching_node(NULL, of_keystone_table);
	if (!np)
		return 0;

	pm_clk_add_notifier(&platform_bus_type, &platform_domain_notifier);

	return 0;
}