From 94673892b7b28179327a9d4cb100f53993b0bd92 Mon Sep 17 00:00:00 2001 From: jsg Date: Fri, 22 Sep 2023 01:10:43 +0000 Subject: [PATCH] move simplebusvar.h so it can be used without ifdef ok kettenis@ phessler@ --- sys/arch/arm/cortex/ampintc.c | 4 ++-- sys/arch/arm/{simplebus => include}/simplebusvar.h | 2 +- sys/arch/arm/simplebus/simplebus.c | 6 +++--- sys/arch/arm64/dev/agintc.c | 4 ++-- sys/arch/arm64/dev/ampintc.c | 4 ++-- sys/arch/arm64/dev/apldc.c | 4 ++-- sys/arch/arm64/dev/simplebus.c | 6 +++--- sys/arch/arm64/{dev => include}/simplebusvar.h | 2 +- sys/arch/armv7/exynos/exdwusb.c | 5 ++--- sys/arch/armv7/exynos/expower.c | 4 ++-- sys/arch/armv7/include/simplebusvar.h | 3 +++ sys/arch/armv7/marvell/mvmbus.c | 4 ++-- sys/arch/armv7/omap/omcm.c | 4 ++-- sys/arch/armv7/omap/omsysc.c | 4 ++-- sys/arch/octeon/dev/simplebus.c | 4 ++-- sys/arch/octeon/{dev => include}/simplebusvar.h | 2 +- sys/arch/riscv64/dev/simplebus.c | 6 +++--- sys/arch/riscv64/{dev => include}/simplebusvar.h | 2 +- sys/dev/fdt/amldwusb.c | 5 ++--- sys/dev/fdt/hidwusb.c | 5 ++--- sys/dev/fdt/imxdwusb.c | 5 ++--- sys/dev/fdt/mvmdio.c | 9 ++------- sys/dev/fdt/qcdwusb.c | 5 ++--- sys/dev/fdt/rkdwusb.c | 5 ++--- sys/dev/fdt/rkgrf.c | 8 ++------ sys/dev/fdt/rkpinctrl.c | 8 ++------ sys/dev/fdt/syscon.c | 10 ++-------- 27 files changed, 54 insertions(+), 76 deletions(-) rename sys/arch/arm/{simplebus => include}/simplebusvar.h (94%) rename sys/arch/arm64/{dev => include}/simplebusvar.h (94%) create mode 100644 sys/arch/armv7/include/simplebusvar.h rename sys/arch/octeon/{dev => include}/simplebusvar.h (94%) rename sys/arch/riscv64/{dev => include}/simplebusvar.h (95%) diff --git a/sys/arch/arm/cortex/ampintc.c b/sys/arch/arm/cortex/ampintc.c index f0d4e3f72bc..75a55831ba1 100644 --- a/sys/arch/arm/cortex/ampintc.c +++ b/sys/arch/arm/cortex/ampintc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ampintc.c,v 1.31 2022/03/12 14:40:41 mpi Exp $ */ +/* $OpenBSD: ampintc.c,v 1.32 2023/09/22 01:10:43 jsg Exp $ */ /* * Copyright (c) 2007,2009,2011 Dale Rahn * @@ -37,7 +37,7 @@ #include #include -#include +#include /* registers */ #define ICD_DCR 0x000 diff --git a/sys/arch/arm/simplebus/simplebusvar.h b/sys/arch/arm/include/simplebusvar.h similarity index 94% rename from sys/arch/arm/simplebus/simplebusvar.h rename to sys/arch/arm/include/simplebusvar.h index dd6670dd143..d7da93d542c 100644 --- a/sys/arch/arm/simplebus/simplebusvar.h +++ b/sys/arch/arm/include/simplebusvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: simplebusvar.h,v 1.3 2020/04/29 15:25:07 kettenis Exp $ */ +/* $OpenBSD: simplebusvar.h,v 1.1 2023/09/22 01:10:43 jsg Exp $ */ /* * Copyright (c) 2016 Patrick Wildt * diff --git a/sys/arch/arm/simplebus/simplebus.c b/sys/arch/arm/simplebus/simplebus.c index 7fac1db12ce..020348c5c71 100644 --- a/sys/arch/arm/simplebus/simplebus.c +++ b/sys/arch/arm/simplebus/simplebus.c @@ -1,4 +1,4 @@ -/* $OpenBSD: simplebus.c,v 1.19 2022/03/12 14:40:41 mpi Exp $ */ +/* $OpenBSD: simplebus.c,v 1.20 2023/09/22 01:10:43 jsg Exp $ */ /* * Copyright (c) 2016 Patrick Wildt * @@ -26,8 +26,8 @@ #include #include -#include -#include +#include +#include int simplebus_match(struct device *, void *, void *); void simplebus_attach(struct device *, struct device *, void *); diff --git a/sys/arch/arm64/dev/agintc.c b/sys/arch/arm64/dev/agintc.c index 81fa97f70b2..944e5472592 100644 --- a/sys/arch/arm64/dev/agintc.c +++ b/sys/arch/arm64/dev/agintc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: agintc.c,v 1.53 2023/09/12 08:29:28 jmatthew Exp $ */ +/* $OpenBSD: agintc.c,v 1.54 2023/09/22 01:10:43 jsg Exp $ */ /* * Copyright (c) 2007, 2009, 2011, 2017 Dale Rahn * Copyright (c) 2018 Mark Kettenis @@ -35,7 +35,7 @@ #include #include -#include +#include #define ICC_PMR s3_0_c4_c6_0 #define ICC_IAR0 s3_0_c12_c8_0 diff --git a/sys/arch/arm64/dev/ampintc.c b/sys/arch/arm64/dev/ampintc.c index f7926fe1299..3c0ccb8ed47 100644 --- a/sys/arch/arm64/dev/ampintc.c +++ b/sys/arch/arm64/dev/ampintc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ampintc.c,v 1.30 2022/12/21 22:30:42 kettenis Exp $ */ +/* $OpenBSD: ampintc.c,v 1.31 2023/09/22 01:10:43 jsg Exp $ */ /* * Copyright (c) 2007,2009,2011 Dale Rahn * @@ -35,7 +35,7 @@ #include #include -#include +#include /* registers */ #define ICD_DCR 0x000 diff --git a/sys/arch/arm64/dev/apldc.c b/sys/arch/arm64/dev/apldc.c index 26edab2c20a..c11f0de0ea1 100644 --- a/sys/arch/arm64/dev/apldc.c +++ b/sys/arch/arm64/dev/apldc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: apldc.c,v 1.10 2023/09/05 11:04:06 tobhe Exp $ */ +/* $OpenBSD: apldc.c,v 1.11 2023/09/22 01:10:43 jsg Exp $ */ /* * Copyright (c) 2022 Mark Kettenis * @@ -40,7 +40,7 @@ #include #include -#include +#include #include "apldc.h" diff --git a/sys/arch/arm64/dev/simplebus.c b/sys/arch/arm64/dev/simplebus.c index 4bd468eaa10..7137ecc1278 100644 --- a/sys/arch/arm64/dev/simplebus.c +++ b/sys/arch/arm64/dev/simplebus.c @@ -1,4 +1,4 @@ -/* $OpenBSD: simplebus.c,v 1.17 2023/07/19 20:26:11 kettenis Exp $ */ +/* $OpenBSD: simplebus.c,v 1.18 2023/09/22 01:10:43 jsg Exp $ */ /* * Copyright (c) 2016 Patrick Wildt * @@ -26,8 +26,8 @@ #include #include -#include -#include +#include +#include int simplebus_match(struct device *, void *, void *); void simplebus_attach(struct device *, struct device *, void *); diff --git a/sys/arch/arm64/dev/simplebusvar.h b/sys/arch/arm64/include/simplebusvar.h similarity index 94% rename from sys/arch/arm64/dev/simplebusvar.h rename to sys/arch/arm64/include/simplebusvar.h index 5b236c1b162..3802d25171a 100644 --- a/sys/arch/arm64/dev/simplebusvar.h +++ b/sys/arch/arm64/include/simplebusvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: simplebusvar.h,v 1.3 2019/04/16 13:15:31 kettenis Exp $ */ +/* $OpenBSD: simplebusvar.h,v 1.1 2023/09/22 01:10:43 jsg Exp $ */ /* * Copyright (c) 2016 Patrick Wildt * diff --git a/sys/arch/armv7/exynos/exdwusb.c b/sys/arch/armv7/exynos/exdwusb.c index b6100255525..b21ea762e8c 100644 --- a/sys/arch/armv7/exynos/exdwusb.c +++ b/sys/arch/armv7/exynos/exdwusb.c @@ -1,4 +1,4 @@ -/* $OpenBSD: exdwusb.c,v 1.5 2021/10/24 17:52:27 mpi Exp $ */ +/* $OpenBSD: exdwusb.c,v 1.6 2023/09/22 01:10:43 jsg Exp $ */ /* * Copyright (c) 2017 Mark Kettenis * @@ -19,8 +19,7 @@ #include #include - -#include +#include #include #include diff --git a/sys/arch/armv7/exynos/expower.c b/sys/arch/armv7/exynos/expower.c index 50a91c84cb7..0b0a64a8f89 100644 --- a/sys/arch/armv7/exynos/expower.c +++ b/sys/arch/armv7/exynos/expower.c @@ -1,4 +1,4 @@ -/* $OpenBSD: expower.c,v 1.10 2021/10/24 17:52:27 mpi Exp $ */ +/* $OpenBSD: expower.c,v 1.11 2023/09/22 01:10:43 jsg Exp $ */ /* * Copyright (c) 2012-2013 Patrick Wildt * @@ -26,7 +26,7 @@ #include #include -#include +#include #define HREAD4(sc, reg) \ (bus_space_read_4((sc)->sc_iot, (sc)->sc_ioh, (reg))) diff --git a/sys/arch/armv7/include/simplebusvar.h b/sys/arch/armv7/include/simplebusvar.h new file mode 100644 index 00000000000..c26232bf248 --- /dev/null +++ b/sys/arch/armv7/include/simplebusvar.h @@ -0,0 +1,3 @@ +/* $OpenBSD: simplebusvar.h,v 1.1 2023/09/22 01:10:43 jsg Exp $ */ + +#include diff --git a/sys/arch/armv7/marvell/mvmbus.c b/sys/arch/armv7/marvell/mvmbus.c index aa7fa27b0c7..bdaf047facd 100644 --- a/sys/arch/armv7/marvell/mvmbus.c +++ b/sys/arch/armv7/marvell/mvmbus.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mvmbus.c,v 1.4 2021/10/24 17:52:27 mpi Exp $ */ +/* $OpenBSD: mvmbus.c,v 1.5 2023/09/22 01:10:43 jsg Exp $ */ /* * Copyright (c) 2016 Patrick Wildt * @@ -22,7 +22,7 @@ #include #include -#include +#include #include #include diff --git a/sys/arch/armv7/omap/omcm.c b/sys/arch/armv7/omap/omcm.c index 6a8c03c82c0..c7fa03ae50a 100644 --- a/sys/arch/armv7/omap/omcm.c +++ b/sys/arch/armv7/omap/omcm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: omcm.c,v 1.3 2022/04/06 18:59:26 naddy Exp $ */ +/* $OpenBSD: omcm.c,v 1.4 2023/09/22 01:10:43 jsg Exp $ */ /* * Copyright (c) 2020 Mark Kettenis * @@ -22,7 +22,7 @@ #include -#include +#include struct omcm_softc { struct simplebus_softc sc_bus; diff --git a/sys/arch/armv7/omap/omsysc.c b/sys/arch/armv7/omap/omsysc.c index ba97e3face0..95aeb5589b3 100644 --- a/sys/arch/armv7/omap/omsysc.c +++ b/sys/arch/armv7/omap/omsysc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: omsysc.c,v 1.3 2022/04/06 18:59:26 naddy Exp $ */ +/* $OpenBSD: omsysc.c,v 1.4 2023/09/22 01:10:43 jsg Exp $ */ /* * Copyright (c) 2020 Mark Kettenis * @@ -24,7 +24,7 @@ #include #include -#include +#include struct omsysc_softc { struct simplebus_softc sc_bus; diff --git a/sys/arch/octeon/dev/simplebus.c b/sys/arch/octeon/dev/simplebus.c index 489a7f3dda8..0776986394a 100644 --- a/sys/arch/octeon/dev/simplebus.c +++ b/sys/arch/octeon/dev/simplebus.c @@ -1,4 +1,4 @@ -/* $OpenBSD: simplebus.c,v 1.2 2019/01/05 11:59:39 jsg Exp $ */ +/* $OpenBSD: simplebus.c,v 1.3 2023/09/22 01:10:43 jsg Exp $ */ /* * Copyright (c) 2016 Patrick Wildt @@ -26,7 +26,7 @@ #include #include -#include +#include int simplebus_match(struct device *, void *, void *); void simplebus_attach(struct device *, struct device *, void *); diff --git a/sys/arch/octeon/dev/simplebusvar.h b/sys/arch/octeon/include/simplebusvar.h similarity index 94% rename from sys/arch/octeon/dev/simplebusvar.h rename to sys/arch/octeon/include/simplebusvar.h index 6445d386d2d..085215be952 100644 --- a/sys/arch/octeon/dev/simplebusvar.h +++ b/sys/arch/octeon/include/simplebusvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: simplebusvar.h,v 1.1 2016/12/08 16:24:51 visa Exp $ */ +/* $OpenBSD: simplebusvar.h,v 1.1 2023/09/22 01:10:43 jsg Exp $ */ /* * Copyright (c) 2016 Patrick Wildt diff --git a/sys/arch/riscv64/dev/simplebus.c b/sys/arch/riscv64/dev/simplebus.c index 6325af6233e..3f74e2367e0 100644 --- a/sys/arch/riscv64/dev/simplebus.c +++ b/sys/arch/riscv64/dev/simplebus.c @@ -1,4 +1,4 @@ -/* $OpenBSD: simplebus.c,v 1.5 2022/04/06 18:59:27 naddy Exp $ */ +/* $OpenBSD: simplebus.c,v 1.6 2023/09/22 01:10:44 jsg Exp $ */ /* * Copyright (c) 2016 Patrick Wildt @@ -24,8 +24,8 @@ #include #include -#include -#include +#include +#include int simplebus_match(struct device *, void *, void *); void simplebus_attach(struct device *, struct device *, void *); diff --git a/sys/arch/riscv64/dev/simplebusvar.h b/sys/arch/riscv64/include/simplebusvar.h similarity index 95% rename from sys/arch/riscv64/dev/simplebusvar.h rename to sys/arch/riscv64/include/simplebusvar.h index 57d3e71adf5..ae49f6d721f 100644 --- a/sys/arch/riscv64/dev/simplebusvar.h +++ b/sys/arch/riscv64/include/simplebusvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: simplebusvar.h,v 1.2 2021/05/12 01:20:52 jsg Exp $ */ +/* $OpenBSD: simplebusvar.h,v 1.1 2023/09/22 01:10:44 jsg Exp $ */ /* * Copyright (c) 2016 Patrick Wildt diff --git a/sys/dev/fdt/amldwusb.c b/sys/dev/fdt/amldwusb.c index 9cffb0fa86f..bd34666daa9 100644 --- a/sys/dev/fdt/amldwusb.c +++ b/sys/dev/fdt/amldwusb.c @@ -1,4 +1,4 @@ -/* $OpenBSD: amldwusb.c,v 1.4 2021/10/24 17:52:26 mpi Exp $ */ +/* $OpenBSD: amldwusb.c,v 1.5 2023/09/22 01:10:44 jsg Exp $ */ /* * Copyright (c) 2019 Mark kettenis * @@ -22,8 +22,7 @@ #include #include - -#include +#include #include #include diff --git a/sys/dev/fdt/hidwusb.c b/sys/dev/fdt/hidwusb.c index 002a69d029a..85cb060cfc8 100644 --- a/sys/dev/fdt/hidwusb.c +++ b/sys/dev/fdt/hidwusb.c @@ -1,4 +1,4 @@ -/* $OpenBSD: hidwusb.c,v 1.3 2021/10/24 17:52:26 mpi Exp $ */ +/* $OpenBSD: hidwusb.c,v 1.4 2023/09/22 01:10:44 jsg Exp $ */ /* * Copyright (c) 2017, 2018 Mark Kettenis * @@ -21,8 +21,7 @@ #include #include - -#include +#include #include #include diff --git a/sys/dev/fdt/imxdwusb.c b/sys/dev/fdt/imxdwusb.c index d7b51ff3608..09e8f4ddc9d 100644 --- a/sys/dev/fdt/imxdwusb.c +++ b/sys/dev/fdt/imxdwusb.c @@ -1,4 +1,4 @@ -/* $OpenBSD: imxdwusb.c,v 1.5 2022/04/06 18:59:28 naddy Exp $ */ +/* $OpenBSD: imxdwusb.c,v 1.6 2023/09/22 01:10:44 jsg Exp $ */ /* * Copyright (c) 2017, 2018 Mark Kettenis * Copyright (c) 2020 Patrick Wildt @@ -22,8 +22,7 @@ #include #include - -#include +#include #include #include diff --git a/sys/dev/fdt/mvmdio.c b/sys/dev/fdt/mvmdio.c index 914fc03ce82..a3adee9f8fe 100644 --- a/sys/dev/fdt/mvmdio.c +++ b/sys/dev/fdt/mvmdio.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mvmdio.c,v 1.4 2021/10/24 17:52:26 mpi Exp $ */ +/* $OpenBSD: mvmdio.c,v 1.5 2023/09/22 01:10:44 jsg Exp $ */ /* $NetBSD: if_mvneta.c,v 1.41 2015/04/15 10:15:40 hsuenaga Exp $ */ /* * Copyright (c) 2007, 2008, 2013 KIYOHARA Takashi @@ -35,12 +35,7 @@ #include #include - -#ifdef __armv7__ -#include -#else -#include -#endif +#include #include #include diff --git a/sys/dev/fdt/qcdwusb.c b/sys/dev/fdt/qcdwusb.c index 4a36dc32762..2ad99f6e6f0 100644 --- a/sys/dev/fdt/qcdwusb.c +++ b/sys/dev/fdt/qcdwusb.c @@ -1,4 +1,4 @@ -/* $OpenBSD: qcdwusb.c,v 1.1 2022/11/06 12:12:45 patrick Exp $ */ +/* $OpenBSD: qcdwusb.c,v 1.2 2023/09/22 01:10:44 jsg Exp $ */ /* * Copyright (c) 2017, 2018 Mark Kettenis * Copyright (c) 2020, 2022 Patrick Wildt @@ -22,8 +22,7 @@ #include #include - -#include +#include #include #include diff --git a/sys/dev/fdt/rkdwusb.c b/sys/dev/fdt/rkdwusb.c index 7cb99c7d096..bcef26cf0c5 100644 --- a/sys/dev/fdt/rkdwusb.c +++ b/sys/dev/fdt/rkdwusb.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rkdwusb.c,v 1.4 2021/10/24 17:52:26 mpi Exp $ */ +/* $OpenBSD: rkdwusb.c,v 1.5 2023/09/22 01:10:44 jsg Exp $ */ /* * Copyright (c) 2017 Mark Kettenis * @@ -21,8 +21,7 @@ #include #include - -#include +#include #include #include diff --git a/sys/dev/fdt/rkgrf.c b/sys/dev/fdt/rkgrf.c index b3c5d76474b..585a471757e 100644 --- a/sys/dev/fdt/rkgrf.c +++ b/sys/dev/fdt/rkgrf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rkgrf.c,v 1.6 2023/04/06 19:02:29 kettenis Exp $ */ +/* $OpenBSD: rkgrf.c,v 1.7 2023/09/22 01:10:44 jsg Exp $ */ /* * Copyright (c) 2017 Mark Kettenis * @@ -27,11 +27,7 @@ #include #include -#ifdef __armv7__ -#include -#else -#include -#endif +#include struct rkgrf_softc { struct simplebus_softc sc_sbus; diff --git a/sys/dev/fdt/rkpinctrl.c b/sys/dev/fdt/rkpinctrl.c index 8b036c8c5f0..159b8cc4980 100644 --- a/sys/dev/fdt/rkpinctrl.c +++ b/sys/dev/fdt/rkpinctrl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rkpinctrl.c,v 1.13 2023/06/21 01:10:17 jsg Exp $ */ +/* $OpenBSD: rkpinctrl.c,v 1.14 2023/09/22 01:10:44 jsg Exp $ */ /* * Copyright (c) 2017, 2018 Mark Kettenis * @@ -29,11 +29,7 @@ #include #include -#ifdef __armv7__ -#include -#else -#include -#endif +#include /* Pin numbers (from devicetree bindings) */ #define RK_PA0 0 diff --git a/sys/dev/fdt/syscon.c b/sys/dev/fdt/syscon.c index 314f27667b2..09a87c1b74d 100644 --- a/sys/dev/fdt/syscon.c +++ b/sys/dev/fdt/syscon.c @@ -1,4 +1,4 @@ -/* $OpenBSD: syscon.c,v 1.7 2021/10/24 17:52:27 mpi Exp $ */ +/* $OpenBSD: syscon.c,v 1.8 2023/09/22 01:10:44 jsg Exp $ */ /* * Copyright (c) 2017 Mark Kettenis * @@ -26,13 +26,7 @@ #include #include -#ifdef __armv7__ -#include -#elif defined(__riscv64__) -#include -#else -#include -#endif +#include extern void (*cpuresetfn)(void); extern void (*powerdownfn)(void); -- 2.20.1