linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Michael Ellerman <mpe@ellerman.id.au>
To: Christophe Leroy <christophe.leroy@csgroup.eu>,
	Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	Paul Mackerras <paulus@samba.org>
Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org
Subject: Re: [RFC PATCH v1 05/11] powerpc/machdep: Move sys_ctrler_t definition into pmac.h
Date: Mon, 07 Feb 2022 22:18:06 +1100	[thread overview]
Message-ID: <874k5blyc1.fsf@mpe.ellerman.id.au> (raw)
In-Reply-To: <7dd5ead4bbca749e2da089ff6fe2b1878d6bf40e.1630667612.git.christophe.leroy@csgroup.eu>

Christophe Leroy <christophe.leroy@csgroup.eu> writes:
> sys_ctrler_t definitions are tied to pmac. Move it in pmac.h
>
> Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
> ---
>  arch/powerpc/include/asm/machdep.h     | 15 ---------------
>  arch/powerpc/platforms/powermac/pmac.h | 12 ++++++++++++
>  2 files changed, 12 insertions(+), 15 deletions(-)

This broke a few things in drivers/macintosh and sound/ppc, I fixed it
up with the delta below.

cheers


diff --git a/arch/powerpc/include/asm/pmac_feature.h b/arch/powerpc/include/asm/pmac_feature.h
index e08e829261b6..2495866f2e97 100644
--- a/arch/powerpc/include/asm/pmac_feature.h
+++ b/arch/powerpc/include/asm/pmac_feature.h
@@ -401,5 +401,17 @@ extern u32 __iomem *uninorth_base;
  */
 extern int pmac_get_uninorth_variant(void);
 
+/*
+ * Power macintoshes have either a CUDA, PMU or SMU controlling
+ * system reset, power, NVRAM, RTC.
+ */
+typedef enum sys_ctrler_kind {
+	SYS_CTRLER_UNKNOWN = 0,
+	SYS_CTRLER_CUDA = 1,
+	SYS_CTRLER_PMU = 2,
+	SYS_CTRLER_SMU = 3,
+} sys_ctrler_t;
+extern sys_ctrler_t sys_ctrler;
+
 #endif /* __ASM_POWERPC_PMAC_FEATURE_H */
 #endif /* __KERNEL__ */
diff --git a/arch/powerpc/platforms/powermac/pmac.h b/arch/powerpc/platforms/powermac/pmac.h
index b96d28dd26cf..ba8d4e97095b 100644
--- a/arch/powerpc/platforms/powermac/pmac.h
+++ b/arch/powerpc/platforms/powermac/pmac.h
@@ -5,17 +5,7 @@
 #include <linux/pci.h>
 #include <linux/irq.h>
 
-/*
- * Power macintoshes have either a CUDA, PMU or SMU controlling
- * system reset, power, NVRAM, RTC.
- */
-typedef enum sys_ctrler_kind {
-	SYS_CTRLER_UNKNOWN = 0,
-	SYS_CTRLER_CUDA = 1,
-	SYS_CTRLER_PMU = 2,
-	SYS_CTRLER_SMU = 3,
-} sys_ctrler_t;
-extern sys_ctrler_t sys_ctrler;
+#include <asm/pmac_feature.h>
 
 /*
  * Declaration for the various functions exported by the
diff --git a/drivers/macintosh/via-cuda.c b/drivers/macintosh/via-cuda.c
index cd267392289c..3d0d0b9d471d 100644
--- a/drivers/macintosh/via-cuda.c
+++ b/drivers/macintosh/via-cuda.c
@@ -21,6 +21,7 @@
 #ifdef CONFIG_PPC
 #include <asm/prom.h>
 #include <asm/machdep.h>
+#include <asm/pmac_feature.h>
 #else
 #include <asm/macintosh.h>
 #include <asm/macints.h>
diff --git a/sound/ppc/pmac.h b/sound/ppc/pmac.h
index a758caf689d2..b6f454130463 100644
--- a/sound/ppc/pmac.h
+++ b/sound/ppc/pmac.h
@@ -26,6 +26,7 @@
 #include <asm/dbdma.h>
 #include <asm/prom.h>
 #include <asm/machdep.h>
+#include <asm/pmac_feature.h>
 
 /* maximum number of fragments */
 #define PMAC_MAX_FRAGS		32


  reply	other threads:[~2022-02-07 11:18 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-03 11:18 [RFC PATCH v1 00/11] powerpc/machdep: Remove dust and convert to static calls Christophe Leroy
2021-09-03 11:18 ` [RFC PATCH v1 01/11] powerpc/time: Remove generic_suspend_{dis/en}able_irqs() Christophe Leroy
2021-09-03 11:18 ` [RFC PATCH v1 02/11] powerpc/machdep: Remove stale functions from ppc_md structure Christophe Leroy
2021-09-03 11:18 ` [RFC PATCH v1 03/11] powerpc/machdep: Remove CONFIG_PPC_HAS_FEATURE_CALLS Christophe Leroy
2021-09-03 11:18 ` [RFC PATCH v1 04/11] powerpc/machdep: Make probe_machine() static Christophe Leroy
2021-09-03 11:18 ` [RFC PATCH v1 05/11] powerpc/machdep: Move sys_ctrler_t definition into pmac.h Christophe Leroy
2022-02-07 11:18   ` Michael Ellerman [this message]
2021-09-03 11:18 ` [RFC PATCH v1 06/11] powerpc/machdep: Add helpers to use ppc_md. functions Christophe Leroy
2021-09-03 11:18 ` [RFC PATCH v1 07/11] powerpc/mpc86xx_hpcn: Remove obsolete statement Christophe Leroy
2021-09-03 11:18 ` [RFC PATCH v1 08/11] powerpc/corenet: Change criteria to set MPIC_ENABLE_COREINT Christophe Leroy
2021-09-03 11:18 ` [RFC PATCH v1 09/11] powerpc/platforms: Use ppc_md. helpers Christophe Leroy
2021-09-03 11:18 ` [RFC PATCH v1 10/11] powerpc/platforms: Use ppc_md_update() instead of define_machine() Christophe Leroy
2021-09-03 11:18 ` [RFC PATCH v1 11/11] powerpc/machdep: Convert ppc_md to static calls Christophe Leroy
2022-02-16 12:25 ` [RFC PATCH v1 00/11] powerpc/machdep: Remove dust and convert " Michael Ellerman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=874k5blyc1.fsf@mpe.ellerman.id.au \
    --to=mpe@ellerman.id.au \
    --cc=benh@kernel.crashing.org \
    --cc=christophe.leroy@csgroup.eu \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=paulus@samba.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).