[2/5] ARM: keystone: Merge PM function into main support file
Commit Message
The one function left in this file does not justify a whole extra
file nor the keystone.h support file used to forward declare that
function. Merge this into the main keystone.c file.
Signed-off-by: Andrew Davis <afd@ti.com>
---
arch/arm/mach-keystone/Makefile | 3 --
arch/arm/mach-keystone/keystone.c | 37 ++++++++++++++++++++--
arch/arm/mach-keystone/keystone.h | 16 ----------
arch/arm/mach-keystone/pm_domain.c | 50 ------------------------------
4 files changed, 35 insertions(+), 71 deletions(-)
delete mode 100644 arch/arm/mach-keystone/keystone.h
delete mode 100644 arch/arm/mach-keystone/pm_domain.c
Comments
Hi Andrew,
kernel test robot noticed the following build warnings:
[auto build test WARNING on robh/for-next]
[also build test WARNING on soc/for-next linus/master v6.4-rc2 next-20230516]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Andrew-Davis/ARM-keystone-Merge-PM-function-into-main-support-file/20230516-032259
base: https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git for-next
patch link: https://lore.kernel.org/r/20230515183515.509371-2-afd%40ti.com
patch subject: [PATCH 2/5] ARM: keystone: Merge PM function into main support file
config: arm-defconfig
compiler: arm-linux-gnueabi-gcc (GCC) 12.1.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/intel-lab-lkp/linux/commit/808c850f1d92e61962f738945a2f20797e198d56
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Andrew-Davis/ARM-keystone-Merge-PM-function-into-main-support-file/20230516-032259
git checkout 808c850f1d92e61962f738945a2f20797e198d56
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=arm olddefconfig
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=arm SHELL=/bin/bash
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
| Link: https://lore.kernel.org/oe-kbuild-all/202305170448.WqAqcLJO-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> arch/arm/mach-keystone/keystone.c:55:12: warning: no previous prototype for 'keystone_pm_runtime_init' [-Wmissing-prototypes]
55 | int __init keystone_pm_runtime_init(void)
| ^~~~~~~~~~~~~~~~~~~~~~~~
vim +/keystone_pm_runtime_init +55 arch/arm/mach-keystone/keystone.c
54
> 55 int __init keystone_pm_runtime_init(void)
56 {
57 struct device_node *np;
58
59 np = of_find_matching_node(NULL, of_keystone_table);
60 if (!np)
61 return 0;
62
63 pm_clk_add_notifier(&platform_bus_type, &platform_domain_notifier);
64
65 return 0;
66 }
67
@@ -1,5 +1,2 @@
# SPDX-License-Identifier: GPL-2.0
obj-y := keystone.o
-
-# PM domain driver for Keystone SOCs
-obj-$(CONFIG_ARCH_KEYSTONE) += pm_domain.o
@@ -6,10 +6,13 @@
* 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/pm_runtime.h>
+#include <linux/pm_clock.h>
#include <linux/of_platform.h>
#include <linux/of_address.h>
#include <linux/memblock.h>
@@ -20,8 +23,6 @@
#include <asm/mach/time.h>
#include <asm/memory.h>
-#include "keystone.h"
-
#define KEYSTONE_LOW_PHYS_START 0x80000000ULL
#define KEYSTONE_LOW_PHYS_SIZE 0x80000000ULL /* 2G */
#define KEYSTONE_LOW_PHYS_END (KEYSTONE_LOW_PHYS_START + \
@@ -32,6 +33,38 @@
#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 */ },
+};
+
+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,
unsigned long event, void *data)
deleted file mode 100644
@@ -1,16 +0,0 @@
-/* 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__ */
deleted file mode 100644
@@ -1,50 +0,0 @@
-// 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;
-}