Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch use designated initializer to make adaptability and...
details: https://anonhg.NetBSD.org/src/rev/231b6ec74897
branches: trunk
changeset: 321449:231b6ec74897
user: ryo <ryo%NetBSD.org@localhost>
date: Fri Mar 16 17:56:31 2018 +0000
description:
use designated initializer to make adaptability and flexibility for changing struct bus_space.
no functional change.
diffstat:
sys/arch/acorn32/eb7500atx/rsbus_io.c | 94 ++++----
sys/arch/acorn32/podulebus/podulebus_io.c | 94 ++++----
sys/arch/arm/arm32/armv7_generic_space.c | 280 ++++++++++++++--------------
sys/arch/arm/at91/at91_bus_space.c | 110 +++++-----
sys/arch/arm/broadcom/bcmgen_space.c | 142 +++++++-------
sys/arch/arm/clps711x/clps711x_space.c | 94 ++++----
sys/arch/arm/ep93xx/ep93xx_space.c | 110 +++++-----
sys/arch/arm/footbridge/footbridge_com_io.c | 94 ++++----
sys/arch/arm/footbridge/footbridge_io.c | 94 ++++----
sys/arch/arm/footbridge/isa/isa_io.c | 184 +++++++++---------
sys/arch/arm/gemini/gemini_a4x_space.c | 94 ++++----
sys/arch/arm/gemini/gemini_space.c | 94 ++++----
sys/arch/arm/imx/imx23_space.c | 92 ++++----
sys/arch/arm/imx/imx_space.c | 142 +++++++-------
sys/arch/arm/iomd/iomd_io.c | 94 ++++----
sys/arch/arm/ixp12x0/ixp12x0_io.c | 94 ++++----
sys/arch/arm/mainbus/mainbus_io.c | 142 +++++++-------
sys/arch/arm/marvell/mvsoc_space.c | 187 +++++++++++-------
sys/arch/arm/mpcore/mpcore_a2x_space.c | 92 ++++----
sys/arch/arm/mpcore/mpcore_a4x_space.c | 94 ++++----
sys/arch/arm/mpcore/mpcore_space.c | 92 ++++----
sys/arch/arm/omap/omap_a2x_space.c | 142 +++++++-------
sys/arch/arm/omap/omap_a4x_space.c | 142 +++++++-------
sys/arch/arm/omap/omap_nobyteacc_space.c | 142 +++++++-------
sys/arch/arm/omap/omap_space.c | 142 +++++++-------
sys/arch/arm/s3c2xx0/s3c2xx0_space.c | 94 ++++----
sys/arch/arm/sa11x0/sa11x0_io.c | 94 ++++----
sys/arch/arm/xscale/becc_space.c | 94 ++++----
sys/arch/arm/xscale/i80312_space.c | 94 ++++----
sys/arch/arm/xscale/i80321_space.c | 94 ++++----
sys/arch/arm/xscale/ixp425_a4x_space.c | 94 ++++----
sys/arch/arm/xscale/ixp425_pci_space.c | 94 ++++----
sys/arch/arm/xscale/ixp425_space.c | 94 ++++----
sys/arch/arm/xscale/pxa2x0_a4x_space.c | 94 ++++----
sys/arch/arm/xscale/pxa2x0_space.c | 94 ++++----
sys/arch/arm/zynq/zynq_space.c | 142 +++++++-------
sys/arch/epoc32/epoc32/external_io.c | 94 ++++----
sys/arch/evbarm/adi_brh/obio_space.c | 94 ++++----
sys/arch/evbarm/hdl_g/obio_space.c | 94 ++++----
sys/arch/evbarm/ifpga/ifpga_io.c | 184 +++++++++---------
sys/arch/evbarm/iq80310/obio_space.c | 94 ++++----
sys/arch/evbarm/iq80321/obio_space.c | 94 ++++----
sys/arch/evbarm/lubbock/sm_obio_space.c | 94 ++++----
sys/arch/evbarm/tsarm/isa/isa_io.c | 184 +++++++++---------
sys/arch/iyonix/iyonix/obio_space.c | 94 ++++----
sys/arch/shark/isa/isa_io.c | 280 ++++++++++++++--------------
46 files changed, 2753 insertions(+), 2716 deletions(-)
diffs (truncated from 8177 to 300 lines):
diff -r 30150e00b869 -r 231b6ec74897 sys/arch/acorn32/eb7500atx/rsbus_io.c
--- a/sys/arch/acorn32/eb7500atx/rsbus_io.c Fri Mar 16 17:35:13 2018 +0000
+++ b/sys/arch/acorn32/eb7500atx/rsbus_io.c Fri Mar 16 17:56:31 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rsbus_io.c,v 1.4 2012/05/10 10:27:10 skrll Exp $ */
+/* $NetBSD: rsbus_io.c,v 1.5 2018/03/16 17:56:31 ryo Exp $ */
/*
* Copyright (c) 1997 Mark Brinicombe.
@@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rsbus_io.c,v 1.4 2012/05/10 10:27:10 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rsbus_io.c,v 1.5 2018/03/16 17:56:31 ryo Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -52,79 +52,79 @@
/* Declare the rsbus bus space tag */
struct bus_space rsbus_bs_tag = {
/* cookie */
- (void *) 2, /* Shift to apply to registers */
+ .bs_cookie = (void *) 2, /* Shift to apply to registers */
/* mapping/unmapping */
- mainbus_bs_map,
- mainbus_bs_unmap,
- mainbus_bs_subregion,
+ .bs_map = mainbus_bs_map,
+ .bs_unmap = mainbus_bs_unmap,
+ .bs_subregion = mainbus_bs_subregion,
/* allocation/deallocation */
- mainbus_bs_alloc,
- mainbus_bs_free,
+ .bs_alloc = mainbus_bs_alloc,
+ .bs_free = mainbus_bs_free,
/* get kernel virtual address */
- 0, /* there is no linear mapping */
+ .bs_vaddr = 0, /* there is no linear mapping */
/* mmap bus space for userland */
- mainbus_bs_mmap,
+ .bs_mmap = mainbus_bs_mmap,
/* barrier */
- mainbus_bs_barrier,
+ .bs_barrier = mainbus_bs_barrier,
/* read (single) */
- rsbus_bs_r_1,
- rsbus_bs_r_2,
- rsbus_bs_r_4,
- bs_notimpl_bs_r_8,
+ .bs_r_1 = rsbus_bs_r_1,
+ .bs_r_2 = rsbus_bs_r_2,
+ .bs_r_4 = rsbus_bs_r_4,
+ .bs_r_8 = bs_notimpl_bs_r_8,
/* read multiple */
- rsbus_bs_rm_1,
- rsbus_bs_rm_2,
- bs_notimpl_bs_rm_4,
- bs_notimpl_bs_rm_8,
+ .bs_rm_1 = rsbus_bs_rm_1,
+ .bs_rm_2 = rsbus_bs_rm_2,
+ .bs_rm_4 = bs_notimpl_bs_rm_4,
+ .bs_rm_8 = bs_notimpl_bs_rm_8,
/* read region */
- rsbus_bs_rr_1,
- rsbus_bs_rr_2,
- bs_notimpl_bs_rr_4,
- bs_notimpl_bs_rr_8,
+ .bs_rr_1 = rsbus_bs_rr_1,
+ .bs_rr_2 = rsbus_bs_rr_2,
+ .bs_rr_4 = bs_notimpl_bs_rr_4,
+ .bs_rr_8 = bs_notimpl_bs_rr_8,
/* write (single) */
- rsbus_bs_w_1,
- rsbus_bs_w_2,
- rsbus_bs_w_4,
- bs_notimpl_bs_w_8,
+ .bs_w_1 = rsbus_bs_w_1,
+ .bs_w_2 = rsbus_bs_w_2,
+ .bs_w_4 = rsbus_bs_w_4,
+ .bs_w_8 = bs_notimpl_bs_w_8,
/* write multiple */
- rsbus_bs_wm_1,
- rsbus_bs_wm_2,
- bs_notimpl_bs_wm_4,
- bs_notimpl_bs_wm_8,
+ .bs_wm_1 = rsbus_bs_wm_1,
+ .bs_wm_2 = rsbus_bs_wm_2,
+ .bs_wm_4 = bs_notimpl_bs_wm_4,
+ .bs_wm_8 = bs_notimpl_bs_wm_8,
/* write region */
- rsbus_bs_wr_1,
- rsbus_bs_wr_2,
- bs_notimpl_bs_wr_4,
- bs_notimpl_bs_wr_8,
+ .bs_wr_1 = rsbus_bs_wr_1,
+ .bs_wr_2 = rsbus_bs_wr_2,
+ .bs_wr_4 = bs_notimpl_bs_wr_4,
+ .bs_wr_8 = bs_notimpl_bs_wr_8,
/* set multiple */
- bs_notimpl_bs_sm_1,
- bs_notimpl_bs_sm_2,
- bs_notimpl_bs_sm_4,
- bs_notimpl_bs_sm_8,
+ .bs_sm_1 = bs_notimpl_bs_sm_1,
+ .bs_sm_2 = bs_notimpl_bs_sm_2,
+ .bs_sm_4 = bs_notimpl_bs_sm_4,
+ .bs_sm_8 = bs_notimpl_bs_sm_8,
/* set region */
- rsbus_bs_sr_1,
- rsbus_bs_sr_2,
- bs_notimpl_bs_sr_4,
- bs_notimpl_bs_sr_8,
+ .bs_sr_1 = rsbus_bs_sr_1,
+ .bs_sr_2 = rsbus_bs_sr_2,
+ .bs_sr_4 = bs_notimpl_bs_sr_4,
+ .bs_sr_8 = bs_notimpl_bs_sr_8,
/* copy */
- bs_notimpl_bs_c_1,
- bs_notimpl_bs_c_2,
- bs_notimpl_bs_c_4,
- bs_notimpl_bs_c_8,
+ .bs_c_1 = bs_notimpl_bs_c_1,
+ .bs_c_2 = bs_notimpl_bs_c_2,
+ .bs_c_4 = bs_notimpl_bs_c_4,
+ .bs_c_8 = bs_notimpl_bs_c_8,
};
/* bus space functions */
diff -r 30150e00b869 -r 231b6ec74897 sys/arch/acorn32/podulebus/podulebus_io.c
--- a/sys/arch/acorn32/podulebus/podulebus_io.c Fri Mar 16 17:35:13 2018 +0000
+++ b/sys/arch/acorn32/podulebus/podulebus_io.c Fri Mar 16 17:56:31 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: podulebus_io.c,v 1.8 2012/05/10 10:27:10 skrll Exp $ */
+/* $NetBSD: podulebus_io.c,v 1.9 2018/03/16 17:56:31 ryo Exp $ */
/*
* Copyright (c) 1997 Mark Brinicombe.
@@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: podulebus_io.c,v 1.8 2012/05/10 10:27:10 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: podulebus_io.c,v 1.9 2018/03/16 17:56:31 ryo Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -52,79 +52,79 @@
struct bus_space podulebus_bs_tag = {
/* cookie */
- (void *) 2, /* Shift to apply to registers */
+ .bs_cookie = (void *) 2, /* Shift to apply to registers */
/* mapping/unmapping */
- podulebus_bs_map,
- podulebus_bs_unmap,
- podulebus_bs_subregion,
+ .bs_map = podulebus_bs_map,
+ .bs_unmap = podulebus_bs_unmap,
+ .bs_subregion = podulebus_bs_subregion,
/* allocation/deallocation */
- podulebus_bs_alloc,
- podulebus_bs_free,
+ .bs_alloc = podulebus_bs_alloc,
+ .bs_free = podulebus_bs_free,
/* get kernel virtual address */
- 0, /* there is no linear mapping */
+ .bs_vaddr = 0, /* there is no linear mapping */
/* mmap bus space for userland */
- bs_notimpl_bs_mmap, /* there is no bus mapping ... well maybe EASI space? */
+ .bs_mmap = bs_notimpl_bs_mmap, /* there is no bus mapping ... well maybe EASI space? */
/* barrier */
- podulebus_bs_barrier,
+ .bs_barrier = podulebus_bs_barrier,
/* read (single) */
- podulebus_bs_r_1,
- podulebus_bs_r_2,
- podulebus_bs_r_4,
- bs_notimpl_bs_r_8,
+ .bs_r_1 = podulebus_bs_r_1,
+ .bs_r_2 = podulebus_bs_r_2,
+ .bs_r_4 = podulebus_bs_r_4,
+ .bs_r_8 = bs_notimpl_bs_r_8,
/* read multiple */
- podulebus_bs_rm_1,
- podulebus_bs_rm_2,
- bs_notimpl_bs_rm_4,
- bs_notimpl_bs_rm_8,
+ .bs_rm_1 = podulebus_bs_rm_1,
+ .bs_rm_2 = podulebus_bs_rm_2,
+ .bs_rm_4 = bs_notimpl_bs_rm_4,
+ .bs_rm_8 = bs_notimpl_bs_rm_8,
/* read region */
- podulebus_bs_rr_1,
- podulebus_bs_rr_2,
- bs_notimpl_bs_rr_4,
- bs_notimpl_bs_rr_8,
+ .bs_rr_1 = podulebus_bs_rr_1,
+ .bs_rr_2 = podulebus_bs_rr_2,
+ .bs_rr_4 = bs_notimpl_bs_rr_4,
+ .bs_rr_8 = bs_notimpl_bs_rr_8,
/* write (single) */
- podulebus_bs_w_1,
- podulebus_bs_w_2,
- podulebus_bs_w_4,
- bs_notimpl_bs_w_8,
+ .bs_w_1 = podulebus_bs_w_1,
+ .bs_w_2 = podulebus_bs_w_2,
+ .bs_w_4 = podulebus_bs_w_4,
+ .bs_w_8 = bs_notimpl_bs_w_8,
/* write multiple */
- podulebus_bs_wm_1,
- podulebus_bs_wm_2,
- bs_notimpl_bs_wm_4,
- bs_notimpl_bs_wm_8,
+ .bs_wm_1 = podulebus_bs_wm_1,
+ .bs_wm_2 = podulebus_bs_wm_2,
+ .bs_wm_4 = bs_notimpl_bs_wm_4,
+ .bs_wm_8 = bs_notimpl_bs_wm_8,
/* write region */
- podulebus_bs_wr_1,
- podulebus_bs_wr_2,
- bs_notimpl_bs_wr_4,
- bs_notimpl_bs_wr_8,
+ .bs_wr_1 = podulebus_bs_wr_1,
+ .bs_wr_2 = podulebus_bs_wr_2,
+ .bs_wr_4 = bs_notimpl_bs_wr_4,
+ .bs_wr_8 = bs_notimpl_bs_wr_8,
/* set multiple */
- bs_notimpl_bs_sm_1,
- bs_notimpl_bs_sm_2,
- bs_notimpl_bs_sm_4,
- bs_notimpl_bs_sm_8,
+ .bs_sm_1 = bs_notimpl_bs_sm_1,
+ .bs_sm_2 = bs_notimpl_bs_sm_2,
+ .bs_sm_4 = bs_notimpl_bs_sm_4,
+ .bs_sm_8 = bs_notimpl_bs_sm_8,
/* set region */
- podulebus_bs_sr_1,
- podulebus_bs_sr_2,
- bs_notimpl_bs_sr_4,
- bs_notimpl_bs_sr_8,
+ .bs_sr_1 = podulebus_bs_sr_1,
+ .bs_sr_2 = podulebus_bs_sr_2,
+ .bs_sr_4 = bs_notimpl_bs_sr_4,
+ .bs_sr_8 = bs_notimpl_bs_sr_8,
/* copy */
- bs_notimpl_bs_c_1,
- bs_notimpl_bs_c_2,
- bs_notimpl_bs_c_4,
- bs_notimpl_bs_c_8,
+ .bs_c_1 = bs_notimpl_bs_c_1,
+ .bs_c_2 = bs_notimpl_bs_c_2,
+ .bs_c_4 = bs_notimpl_bs_c_4,
+ .bs_c_8 = bs_notimpl_bs_c_8,
};
/* bus space functions */
diff -r 30150e00b869 -r 231b6ec74897 sys/arch/arm/arm32/armv7_generic_space.c
--- a/sys/arch/arm/arm32/armv7_generic_space.c Fri Mar 16 17:35:13 2018 +0000
+++ b/sys/arch/arm/arm32/armv7_generic_space.c Fri Mar 16 17:56:31 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: armv7_generic_space.c,v 1.6 2018/01/22 13:29:28 skrll Exp $ */
+/* $NetBSD: armv7_generic_space.c,v 1.7 2018/03/16 17:56:31 ryo Exp $ */
/*-
* Copyright (c) 2012 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: armv7_generic_space.c,v 1.6 2018/01/22 13:29:28 skrll Exp $");
Home |
Main Index |
Thread Index |
Old Index