Message ID | 1461099580-3866-31-git-send-email-swarren@wwwdotorg.org |
---|---|
State | Rejected |
Delegated to: | Tom Warren |
Headers | show |
Hi Stephen, On 19 April 2016 at 14:59, Stephen Warren <swarren@wwwdotorg.org> wrote: > From: Stephen Warren <swarren@nvidia.com> > > This header is duplicated many times, and does nothing but prototype a > single function that's used solely by mach-tegra code. Move the proto- > type of mach-tegra/cpu.h. That's not an awesome location for it, but > other similar functions like pmic_enable_cpu_vdd() are already there. > > Signed-off-by: Stephen Warren <swarren@nvidia.com> > --- > arch/arm/include/asm/arch-tegra114/pmu.h | 13 ------------- > arch/arm/include/asm/arch-tegra124/pmu.h | 14 -------------- > arch/arm/include/asm/arch-tegra20/pmu.h | 14 -------------- > arch/arm/include/asm/arch-tegra210/pmu.h | 14 -------------- > arch/arm/include/asm/arch-tegra30/pmu.h | 13 ------------- > arch/arm/mach-tegra/board2.c | 1 - > arch/arm/mach-tegra/cpu.h | 2 ++ > arch/arm/mach-tegra/emc.c | 1 - > 8 files changed, 2 insertions(+), 70 deletions(-) > delete mode 100644 arch/arm/include/asm/arch-tegra114/pmu.h > delete mode 100644 arch/arm/include/asm/arch-tegra124/pmu.h > delete mode 100644 arch/arm/include/asm/arch-tegra20/pmu.h > delete mode 100644 arch/arm/include/asm/arch-tegra210/pmu.h > delete mode 100644 arch/arm/include/asm/arch-tegra30/pmu.h Reviewed-by: Simon Glass <sjg@chromium.org> I wonder if it would be better to retain the header name and move pmic_enable_cpu_vdd()? - Simon
On 04/22/2016 12:32 PM, Simon Glass wrote: > Hi Stephen, > > On 19 April 2016 at 14:59, Stephen Warren <swarren@wwwdotorg.org> wrote: >> From: Stephen Warren <swarren@nvidia.com> >> >> This header is duplicated many times, and does nothing but prototype a >> single function that's used solely by mach-tegra code. Move the proto- >> type of mach-tegra/cpu.h. That's not an awesome location for it, but >> other similar functions like pmic_enable_cpu_vdd() are already there. > Reviewed-by: Simon Glass <sjg@chromium.org> > > I wonder if it would be better to retain the header name and move > pmic_enable_cpu_vdd()? I think that pmu_set_nominal() (the function moved into cpu.h by this patch) and pmic_enable_cpu_vdd() serve essentially the same semantic purpose, but are used on different sets of SoCs via ifdefs or weak functions. I expect that early in the part 2 series, I'll get rid of more code in board2.c's board_init() and put it into something like tegra_board_init_soc(), prototyped in board_init.h or soc_init.h. Or put another way, I expect I'll clean up the "not a great location" issue mentioned in this patch description pretty soon.
diff --git a/arch/arm/include/asm/arch-tegra114/pmu.h b/arch/arm/include/asm/arch-tegra114/pmu.h deleted file mode 100644 index 3104a1b855b8..000000000000 --- a/arch/arm/include/asm/arch-tegra114/pmu.h +++ /dev/null @@ -1,13 +0,0 @@ -/* - * Copyright (c) 2010-2013, NVIDIA CORPORATION. All rights reserved. - * - * SPDX-License-Identifier: GPL-2.0 - */ - -#ifndef _TEGRA114_PMU_H_ -#define _TEGRA114_PMU_H_ - -/* Set core and CPU voltages to nominal levels */ -int pmu_set_nominal(void); - -#endif /* _TEGRA114_PMU_H_ */ diff --git a/arch/arm/include/asm/arch-tegra124/pmu.h b/arch/arm/include/asm/arch-tegra124/pmu.h deleted file mode 100644 index b10100a63671..000000000000 --- a/arch/arm/include/asm/arch-tegra124/pmu.h +++ /dev/null @@ -1,14 +0,0 @@ -/* - * (C) Copyright 2010-2013 - * NVIDIA Corporation <www.nvidia.com> - * - * SPDX-License-Identifier: GPL-2.0+ - */ - -#ifndef _TEGRA124_PMU_H_ -#define _TEGRA124_PMU_H_ - -/* Set core and CPU voltages to nominal levels */ -int pmu_set_nominal(void); - -#endif /* _TEGRA124_PMU_H_ */ diff --git a/arch/arm/include/asm/arch-tegra20/pmu.h b/arch/arm/include/asm/arch-tegra20/pmu.h deleted file mode 100644 index 46effb47e18d..000000000000 --- a/arch/arm/include/asm/arch-tegra20/pmu.h +++ /dev/null @@ -1,14 +0,0 @@ -/* - * (C) Copyright 2010,2011 - * NVIDIA Corporation <www.nvidia.com> - * - * SPDX-License-Identifier: GPL-2.0+ - */ - -#ifndef _ARCH_PMU_H_ -#define _ARCH_PMU_H_ - -/* Set core and CPU voltages to nominal levels */ -int pmu_set_nominal(void); - -#endif /* _ARCH_PMU_H_ */ diff --git a/arch/arm/include/asm/arch-tegra210/pmu.h b/arch/arm/include/asm/arch-tegra210/pmu.h deleted file mode 100644 index 1e5f3886c675..000000000000 --- a/arch/arm/include/asm/arch-tegra210/pmu.h +++ /dev/null @@ -1,14 +0,0 @@ -/* - * (C) Copyright 2010-2015 - * NVIDIA Corporation <www.nvidia.com> - * - * SPDX-License-Identifier: GPL-2.0+ - */ - -#ifndef _TEGRA210_PMU_H_ -#define _TEGRA210_PMU_H_ - -/* Set core and CPU voltages to nominal levels */ -int pmu_set_nominal(void); - -#endif /* _TEGRA210_PMU_H_ */ diff --git a/arch/arm/include/asm/arch-tegra30/pmu.h b/arch/arm/include/asm/arch-tegra30/pmu.h deleted file mode 100644 index f01c37ed673b..000000000000 --- a/arch/arm/include/asm/arch-tegra30/pmu.h +++ /dev/null @@ -1,13 +0,0 @@ -/* - * Copyright (c) 2010-2012, NVIDIA CORPORATION. All rights reserved. - * - * SPDX-License-Identifier: GPL-2.0 - */ - -#ifndef _TEGRA30_PMU_H_ -#define _TEGRA30_PMU_H_ - -/* Set core and CPU voltages to nominal levels */ -int pmu_set_nominal(void); - -#endif /* _TEGRA30_PMU_H_ */ diff --git a/arch/arm/mach-tegra/board2.c b/arch/arm/mach-tegra/board2.c index 269afdf7a6e5..684d4a5ad853 100644 --- a/arch/arm/mach-tegra/board2.c +++ b/arch/arm/mach-tegra/board2.c @@ -15,7 +15,6 @@ #include <asm/arch/clock.h> #include <asm/arch/funcmux.h> #include <asm/arch/pinmux.h> -#include <asm/arch/pmu.h> #include <asm/arch/tegra.h> #include <asm/arch-tegra/clk_rst.h> #include "../../../drivers/usb/host/ehci-tegra-priv.h" diff --git a/arch/arm/mach-tegra/cpu.h b/arch/arm/mach-tegra/cpu.h index e6dcfe25dfe3..f1f5b179c198 100644 --- a/arch/arm/mach-tegra/cpu.h +++ b/arch/arm/mach-tegra/cpu.h @@ -82,6 +82,8 @@ int tegra_get_sku_info(void); */ int tegra_get_chip_sku(void); void adjust_pllp_out_freqs(void); +/* Set core and CPU voltages to nominal levels */ +int pmu_set_nominal(void); void pmic_enable_cpu_vdd(void); /* Do any chip-specific cache config */ void config_cache(void); diff --git a/arch/arm/mach-tegra/emc.c b/arch/arm/mach-tegra/emc.c index 945bdedaf82d..86aba51e398e 100644 --- a/arch/arm/mach-tegra/emc.c +++ b/arch/arm/mach-tegra/emc.c @@ -8,7 +8,6 @@ #include <common.h> #include <asm/io.h> #include <asm/arch/clock.h> -#include <asm/arch/pmu.h> #include <asm/arch/tegra.h> #include <asm/arch-tegra/clk_rst.h> #include "emc.h"