Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/marvell marvell: Reconcile arm vs powerpc marvell_in...



details:   https://anonhg.NetBSD.org/src/rev/2c0f51ebeea3
branches:  trunk
changeset: 377470:2c0f51ebeea3
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Thu Jul 13 16:51:33 2023 +0000

description:
marvell: Reconcile arm vs powerpc marvell_intr_establish.

If there's a better way to do this without #ifdef __powerpc__, please
have at it!

diffstat:

 sys/arch/arm/marvell/mvsoc_intr.h |  13 ++++++++++++-
 sys/dev/marvell/marvellvar.h      |  17 +++++++++++++++--
 2 files changed, 27 insertions(+), 3 deletions(-)

diffs (59 lines):

diff -r 52639445a9f6 -r 2c0f51ebeea3 sys/arch/arm/marvell/mvsoc_intr.h
--- a/sys/arch/arm/marvell/mvsoc_intr.h Thu Jul 13 13:34:15 2023 +0000
+++ b/sys/arch/arm/marvell/mvsoc_intr.h Thu Jul 13 16:51:33 2023 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: mvsoc_intr.h,v 1.8 2022/06/25 13:24:35 jmcneill Exp $  */
+/*     $NetBSD: mvsoc_intr.h,v 1.9 2023/07/13 16:51:33 riastradh Exp $ */
 /*
  * Copyright (c) 2010 KIYOHARA Takashi
  * All rights reserved.
@@ -47,6 +47,17 @@ void mvsoc_irq_handler(void *);
 
 #include <arm/pic/picvar.h>
 
+/*
+ * Note: arm and powerpc Marvell platforms have a conflicting idea of
+ * marvell_intr_establish.
+ *
+ * On arm-based Marvell platforms, there is a static inline
+ * marvell_intr_establish defined in mvsoc_intr.h.
+ *
+ * On powerpc-based Marvell platforms, there is an out-of-line
+ * marvell_intr_establish defined in a SoC-specific gt_mainbus.c
+ * (evbppc/ev64260, ofppc) and declared in dev/marvell/marvellvar.h.
+ */
 static __inline void *
 marvell_intr_establish(int irq, int ipl, int (*func)(void *), void *arg)
 {
diff -r 52639445a9f6 -r 2c0f51ebeea3 sys/dev/marvell/marvellvar.h
--- a/sys/dev/marvell/marvellvar.h      Thu Jul 13 13:34:15 2023 +0000
+++ b/sys/dev/marvell/marvellvar.h      Thu Jul 13 16:51:33 2023 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: marvellvar.h,v 1.6 2017/01/07 14:26:37 kiyohara Exp $  */
+/*     $NetBSD: marvellvar.h,v 1.7 2023/07/13 16:51:33 riastradh Exp $ */
 /*
  * Copyright (c) 2009 KIYOHARA Takashi
  * All rights reserved.
@@ -71,8 +71,21 @@ struct marvell_attach_args {
 #define MVA_OFFSET_DEFAULT     GTCF_OFFSET_DEFAULT
 #define MVA_IRQ_DEFAULT                GTCF_IRQ_DEFAULT
 
+#ifdef __powerpc__
+/*
+ * Note: arm and powerpc Marvell platforms have a conflicting idea of
+ * marvell_intr_establish.
+ *
+ * On arm-based Marvell platforms, there is a static inline
+ * marvell_intr_establish defined in mvsoc_intr.h.
+ *
+ * On powerpc-based Marvell platforms, there is an out-of-line
+ * marvell_intr_establish defined in a SoC-specific gt_mainbus.c
+ * (evbppc/ev64260, ofppc) and declared in dev/marvell/marvellvar.h.
+ */
+void *marvell_intr_establish(int, int, int (*)(void *), void *);
+#endif
 
-void *marvell_intr_establish(int, int, int (*)(void *), void *);
 int marvell_winparams_by_tag(device_t, int, int *, int *, uint64_t *,
                             uint32_t *);
 



Home | Main Index | Thread Index | Old Index