diff mbox

[09/14] ARM: tegra: Move pmc.h to include/mach

Message ID 1357764194-12677-10-git-send-email-thierry.reding@avionic-design.de (mailing list archive)
State New, archived
Headers show

Commit Message

Thierry Reding Jan. 9, 2013, 8:43 p.m. UTC
In preparation for moving the PCIe driver into the drivers/pci/host
directory, this header, which contains prototypes that are required by
the PCIe driver, needs to be moved to a globally visible location.

Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
---
Note that eventually the code in pmc.c and powergate.c should probably
be split out into a separate driver. The PMC registers are also directly
accessed from tegra20_clocks.c and tegra30_clocks.c, so that it might be
required to provide that functionality through the new driver as well.
---
 arch/arm/mach-tegra/common.c           |  2 +-
 arch/arm/mach-tegra/include/mach/pmc.h | 24 ++++++++++++++++++++++++
 arch/arm/mach-tegra/pmc.h              | 24 ------------------------
 3 files changed, 25 insertions(+), 25 deletions(-)
 create mode 100644 arch/arm/mach-tegra/include/mach/pmc.h
 delete mode 100644 arch/arm/mach-tegra/pmc.h

Comments

Stephen Warren Jan. 11, 2013, 12:15 a.m. UTC | #1
On 01/09/2013 01:43 PM, Thierry Reding wrote:
> In preparation for moving the PCIe driver into the drivers/pci/host
> directory, this header, which contains prototypes that are required by
> the PCIe driver, needs to be moved to a globally visible location.
> 
> Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
> ---
> Note that eventually the code in pmc.c and powergate.c should probably
> be split out into a separate driver. The PMC registers are also directly
> accessed from tegra20_clocks.c and tegra30_clocks.c, so that it might be
> required to provide that functionality through the new driver as well.
> ---
>  arch/arm/mach-tegra/common.c           |  2 +-
>  arch/arm/mach-tegra/include/mach/pmc.h | 24 ++++++++++++++++++++++++
>  arch/arm/mach-tegra/pmc.h              | 24 ------------------------

On IRC, we'd talked about putting the public functionality in
include/linux/tegra-pmc.h so that we wouldn't add to include/mach, which
would make it harder to make Tegra support ARM multi-platform. Perhaps
that IRC discussion happened after you posted this series?
Thierry Reding Jan. 11, 2013, 4:08 a.m. UTC | #2
On Thu, Jan 10, 2013 at 05:15:07PM -0700, Stephen Warren wrote:
> On 01/09/2013 01:43 PM, Thierry Reding wrote:
> > In preparation for moving the PCIe driver into the drivers/pci/host
> > directory, this header, which contains prototypes that are required by
> > the PCIe driver, needs to be moved to a globally visible location.
> > 
> > Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
> > ---
> > Note that eventually the code in pmc.c and powergate.c should probably
> > be split out into a separate driver. The PMC registers are also directly
> > accessed from tegra20_clocks.c and tegra30_clocks.c, so that it might be
> > required to provide that functionality through the new driver as well.
> > ---
> >  arch/arm/mach-tegra/common.c           |  2 +-
> >  arch/arm/mach-tegra/include/mach/pmc.h | 24 ++++++++++++++++++++++++
> >  arch/arm/mach-tegra/pmc.h              | 24 ------------------------
> 
> On IRC, we'd talked about putting the public functionality in
> include/linux/tegra-pmc.h so that we wouldn't add to include/mach, which
> would make it harder to make Tegra support ARM multi-platform. Perhaps
> that IRC discussion happened after you posted this series?

I'm not sure, it's equally possible that I just forgot. Will fix it up.

Thierry
diff mbox

Patch

diff --git a/arch/arm/mach-tegra/common.c b/arch/arm/mach-tegra/common.c
index 3efe80b..2498f74 100644
--- a/arch/arm/mach-tegra/common.c
+++ b/arch/arm/mach-tegra/common.c
@@ -26,6 +26,7 @@ 
 #include <asm/hardware/cache-l2x0.h>
 #include <asm/hardware/gic.h>
 
+#include <mach/pmc.h>
 #include <mach/powergate.h>
 
 #include "board.h"
@@ -33,7 +34,6 @@ 
 #include "common.h"
 #include "fuse.h"
 #include "iomap.h"
-#include "pmc.h"
 #include "apbio.h"
 #include "sleep.h"
 #include "pm.h"
diff --git a/arch/arm/mach-tegra/include/mach/pmc.h b/arch/arm/mach-tegra/include/mach/pmc.h
new file mode 100644
index 0000000..2631c9a
--- /dev/null
+++ b/arch/arm/mach-tegra/include/mach/pmc.h
@@ -0,0 +1,24 @@ 
+/*
+ * Copyright (C) 2012 NVIDIA CORPORATION. All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms and conditions of the GNU General Public License,
+ * version 2, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef __MACH_TEGRA_PMC_H
+#define __MACH_TEGRA_PMC_H
+
+void tegra_pmc_init(void);
+void tegra_pmc_pcie_xclk_clamp(bool clamp);
+
+#endif
diff --git a/arch/arm/mach-tegra/pmc.h b/arch/arm/mach-tegra/pmc.h
deleted file mode 100644
index 2631c9a..0000000
--- a/arch/arm/mach-tegra/pmc.h
+++ /dev/null
@@ -1,24 +0,0 @@ 
-/*
- * Copyright (C) 2012 NVIDIA CORPORATION. All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms and conditions of the GNU General Public License,
- * version 2, as published by the Free Software Foundation.
- *
- * This program is distributed in the hope it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- *
- */
-
-#ifndef __MACH_TEGRA_PMC_H
-#define __MACH_TEGRA_PMC_H
-
-void tegra_pmc_init(void);
-void tegra_pmc_pcie_xclk_clamp(bool clamp);
-
-#endif