MFp4 CH=227440:
Convert the structures to C99 style initialisation, which makes it a lot easier to check that all of them are set and to generate a derived template from them. Sponsored by: DARPA, AFRL MFC after: 2 weeks
This commit is contained in:
parent
7536215f31
commit
08eaffd830
@ -94,109 +94,109 @@ static int fdt_bs_map(void *, bus_addr_t, bus_size_t, int,
|
||||
|
||||
static struct bus_space fdt_space = {
|
||||
/* cookie */
|
||||
(void *) 0,
|
||||
.bs_cookie = (void *) 0,
|
||||
|
||||
/* mapping/unmapping */
|
||||
fdt_bs_map,
|
||||
generic_bs_unmap,
|
||||
generic_bs_subregion,
|
||||
.bs_map = fdt_bs_map,
|
||||
.bs_unmap = generic_bs_unmap,
|
||||
.bs_subregion = generic_bs_subregion,
|
||||
|
||||
/* allocation/deallocation */
|
||||
generic_bs_alloc,
|
||||
generic_bs_free,
|
||||
.bs_alloc = generic_bs_alloc,
|
||||
.bs_free = generic_bs_free,
|
||||
|
||||
/* barrier */
|
||||
generic_bs_barrier,
|
||||
.bs_barrier = generic_bs_barrier,
|
||||
|
||||
/* read (single) */
|
||||
generic_bs_r_1,
|
||||
generic_bs_r_2,
|
||||
generic_bs_r_4,
|
||||
generic_bs_r_8,
|
||||
.bs_r_1 = generic_bs_r_1,
|
||||
.bs_r_2 = generic_bs_r_2,
|
||||
.bs_r_4 = generic_bs_r_4,
|
||||
.bs_r_8 = generic_bs_r_8,
|
||||
|
||||
/* read multiple */
|
||||
generic_bs_rm_1,
|
||||
generic_bs_rm_2,
|
||||
generic_bs_rm_4,
|
||||
generic_bs_rm_8,
|
||||
.bs_rm_1 = generic_bs_rm_1,
|
||||
.bs_rm_2 = generic_bs_rm_2,
|
||||
.bs_rm_4 = generic_bs_rm_4,
|
||||
.bs_rm_8 = generic_bs_rm_8,
|
||||
|
||||
/* read region */
|
||||
generic_bs_rr_1,
|
||||
generic_bs_rr_2,
|
||||
generic_bs_rr_4,
|
||||
generic_bs_rr_8,
|
||||
.bs_rr_1 = generic_bs_rr_1,
|
||||
.bs_rr_2 = generic_bs_rr_2,
|
||||
.bs_rr_4 = generic_bs_rr_4,
|
||||
.bs_rr_8 = generic_bs_rr_8,
|
||||
|
||||
/* write (single) */
|
||||
generic_bs_w_1,
|
||||
generic_bs_w_2,
|
||||
generic_bs_w_4,
|
||||
generic_bs_w_8,
|
||||
.bs_w_1 = generic_bs_w_1,
|
||||
.bs_w_2 = generic_bs_w_2,
|
||||
.bs_w_4 = generic_bs_w_4,
|
||||
.bs_w_8 = generic_bs_w_8,
|
||||
|
||||
/* write multiple */
|
||||
generic_bs_wm_1,
|
||||
generic_bs_wm_2,
|
||||
generic_bs_wm_4,
|
||||
generic_bs_wm_8,
|
||||
.bs_wm_1 = generic_bs_wm_1,
|
||||
.bs_wm_2 = generic_bs_wm_2,
|
||||
.bs_wm_4 = generic_bs_wm_4,
|
||||
.bs_wm_8 = generic_bs_wm_8,
|
||||
|
||||
/* write region */
|
||||
generic_bs_wr_1,
|
||||
generic_bs_wr_2,
|
||||
generic_bs_wr_4,
|
||||
generic_bs_wr_8,
|
||||
.bs_wr_1 = generic_bs_wr_1,
|
||||
.bs_wr_2 = generic_bs_wr_2,
|
||||
.bs_wr_4 = generic_bs_wr_4,
|
||||
.bs_wr_8 = generic_bs_wr_8,
|
||||
|
||||
/* set multiple */
|
||||
generic_bs_sm_1,
|
||||
generic_bs_sm_2,
|
||||
generic_bs_sm_4,
|
||||
generic_bs_sm_8,
|
||||
.bs_sm_1 = generic_bs_sm_1,
|
||||
.bs_sm_2 = generic_bs_sm_2,
|
||||
.bs_sm_4 = generic_bs_sm_4,
|
||||
.bs_sm_8 = generic_bs_sm_8,
|
||||
|
||||
/* set region */
|
||||
generic_bs_sr_1,
|
||||
generic_bs_sr_2,
|
||||
generic_bs_sr_4,
|
||||
generic_bs_sr_8,
|
||||
.bs_sr_1 = generic_bs_sr_1,
|
||||
.bs_sr_2 = generic_bs_sr_2,
|
||||
.bs_sr_4 = generic_bs_sr_4,
|
||||
.bs_sr_8 = generic_bs_sr_8,
|
||||
|
||||
/* copy */
|
||||
generic_bs_c_1,
|
||||
generic_bs_c_2,
|
||||
generic_bs_c_4,
|
||||
generic_bs_c_8,
|
||||
.bs_c_1 = generic_bs_c_1,
|
||||
.bs_c_2 = generic_bs_c_2,
|
||||
.bs_c_4 = generic_bs_c_4,
|
||||
.bs_c_8 = generic_bs_c_8,
|
||||
|
||||
/* read (single) stream */
|
||||
generic_bs_r_1,
|
||||
generic_bs_r_2,
|
||||
generic_bs_r_4,
|
||||
generic_bs_r_8,
|
||||
.bs_r_1_s = generic_bs_r_1,
|
||||
.bs_r_2_s = generic_bs_r_2,
|
||||
.bs_r_4_s = generic_bs_r_4,
|
||||
.bs_r_8_s = generic_bs_r_8,
|
||||
|
||||
/* read multiple stream */
|
||||
generic_bs_rm_1,
|
||||
generic_bs_rm_2,
|
||||
generic_bs_rm_4,
|
||||
generic_bs_rm_8,
|
||||
.bs_rm_1_s = generic_bs_rm_1,
|
||||
.bs_rm_2_s = generic_bs_rm_2,
|
||||
.bs_rm_4_s = generic_bs_rm_4,
|
||||
.bs_rm_8_s = generic_bs_rm_8,
|
||||
|
||||
/* read region stream */
|
||||
generic_bs_rr_1,
|
||||
generic_bs_rr_2,
|
||||
generic_bs_rr_4,
|
||||
generic_bs_rr_8,
|
||||
.bs_rr_1_s = generic_bs_rr_1,
|
||||
.bs_rr_2_s = generic_bs_rr_2,
|
||||
.bs_rr_4_s = generic_bs_rr_4,
|
||||
.bs_rr_8_s = generic_bs_rr_8,
|
||||
|
||||
/* write (single) stream */
|
||||
generic_bs_w_1,
|
||||
generic_bs_w_2,
|
||||
generic_bs_w_4,
|
||||
generic_bs_w_8,
|
||||
.bs_w_1_s = generic_bs_w_1,
|
||||
.bs_w_2_s = generic_bs_w_2,
|
||||
.bs_w_4_s = generic_bs_w_4,
|
||||
.bs_w_8_s = generic_bs_w_8,
|
||||
|
||||
/* write multiple stream */
|
||||
generic_bs_wm_1,
|
||||
generic_bs_wm_2,
|
||||
generic_bs_wm_4,
|
||||
generic_bs_wm_8,
|
||||
.bs_wm_1_s = generic_bs_wm_1,
|
||||
.bs_wm_2_s = generic_bs_wm_2,
|
||||
.bs_wm_4_s = generic_bs_wm_4,
|
||||
.bs_wm_8_s = generic_bs_wm_8,
|
||||
|
||||
/* write region stream */
|
||||
generic_bs_wr_1,
|
||||
generic_bs_wr_2,
|
||||
generic_bs_wr_4,
|
||||
generic_bs_wr_8,
|
||||
.bs_wr_1_s = generic_bs_wr_1,
|
||||
.bs_wr_2_s = generic_bs_wr_2,
|
||||
.bs_wr_4_s = generic_bs_wr_4,
|
||||
.bs_wr_8_s = generic_bs_wr_8,
|
||||
};
|
||||
|
||||
/* generic bus_space tag */
|
||||
|
@ -91,109 +91,109 @@ __FBSDID("$FreeBSD$");
|
||||
|
||||
static struct bus_space generic_space = {
|
||||
/* cookie */
|
||||
(void *) 0,
|
||||
.bs_cookie = (void *) 0,
|
||||
|
||||
/* mapping/unmapping */
|
||||
generic_bs_map,
|
||||
generic_bs_unmap,
|
||||
generic_bs_subregion,
|
||||
.bs_map = generic_bs_map,
|
||||
.bs_unmap = generic_bs_unmap,
|
||||
.bs_subregion = generic_bs_subregion,
|
||||
|
||||
/* allocation/deallocation */
|
||||
generic_bs_alloc,
|
||||
generic_bs_free,
|
||||
.bs_alloc = generic_bs_alloc,
|
||||
.bs_free = generic_bs_free,
|
||||
|
||||
/* barrier */
|
||||
generic_bs_barrier,
|
||||
.bs_barrier = generic_bs_barrier,
|
||||
|
||||
/* read (single) */
|
||||
generic_bs_r_1,
|
||||
generic_bs_r_2,
|
||||
generic_bs_r_4,
|
||||
generic_bs_r_8,
|
||||
.bs_r_1 = generic_bs_r_1,
|
||||
.bs_r_2 = generic_bs_r_2,
|
||||
.bs_r_4 = generic_bs_r_4,
|
||||
.bs_r_8 = generic_bs_r_8,
|
||||
|
||||
/* read multiple */
|
||||
generic_bs_rm_1,
|
||||
generic_bs_rm_2,
|
||||
generic_bs_rm_4,
|
||||
generic_bs_rm_8,
|
||||
.bs_rm_1 = generic_bs_rm_1,
|
||||
.bs_rm_2 = generic_bs_rm_2,
|
||||
.bs_rm_4 = generic_bs_rm_4,
|
||||
.bs_rm_8 = generic_bs_rm_8,
|
||||
|
||||
/* read region */
|
||||
generic_bs_rr_1,
|
||||
generic_bs_rr_2,
|
||||
generic_bs_rr_4,
|
||||
generic_bs_rr_8,
|
||||
.bs_rr_1 = generic_bs_rr_1,
|
||||
.bs_rr_2 = generic_bs_rr_2,
|
||||
.bs_rr_4 = generic_bs_rr_4,
|
||||
.bs_rr_8 = generic_bs_rr_8,
|
||||
|
||||
/* write (single) */
|
||||
generic_bs_w_1,
|
||||
generic_bs_w_2,
|
||||
generic_bs_w_4,
|
||||
generic_bs_w_8,
|
||||
.bs_w_1 = generic_bs_w_1,
|
||||
.bs_w_2 = generic_bs_w_2,
|
||||
.bs_w_4 = generic_bs_w_4,
|
||||
.bs_w_8 = generic_bs_w_8,
|
||||
|
||||
/* write multiple */
|
||||
generic_bs_wm_1,
|
||||
generic_bs_wm_2,
|
||||
generic_bs_wm_4,
|
||||
generic_bs_wm_8,
|
||||
.bs_wm_1 = generic_bs_wm_1,
|
||||
.bs_wm_2 = generic_bs_wm_2,
|
||||
.bs_wm_4 = generic_bs_wm_4,
|
||||
.bs_wm_8 = generic_bs_wm_8,
|
||||
|
||||
/* write region */
|
||||
generic_bs_wr_1,
|
||||
generic_bs_wr_2,
|
||||
generic_bs_wr_4,
|
||||
generic_bs_wr_8,
|
||||
.bs_wr_1 = generic_bs_wr_1,
|
||||
.bs_wr_2 = generic_bs_wr_2,
|
||||
.bs_wr_4 = generic_bs_wr_4,
|
||||
.bs_wr_8 = generic_bs_wr_8,
|
||||
|
||||
/* set multiple */
|
||||
generic_bs_sm_1,
|
||||
generic_bs_sm_2,
|
||||
generic_bs_sm_4,
|
||||
generic_bs_sm_8,
|
||||
.bs_sm_1 = generic_bs_sm_1,
|
||||
.bs_sm_2 = generic_bs_sm_2,
|
||||
.bs_sm_4 = generic_bs_sm_4,
|
||||
.bs_sm_8 = generic_bs_sm_8,
|
||||
|
||||
/* set region */
|
||||
generic_bs_sr_1,
|
||||
generic_bs_sr_2,
|
||||
generic_bs_sr_4,
|
||||
generic_bs_sr_8,
|
||||
.bs_sr_1 = generic_bs_sr_1,
|
||||
.bs_sr_2 = generic_bs_sr_2,
|
||||
.bs_sr_4 = generic_bs_sr_4,
|
||||
.bs_sr_8 = generic_bs_sr_8,
|
||||
|
||||
/* copy */
|
||||
generic_bs_c_1,
|
||||
generic_bs_c_2,
|
||||
generic_bs_c_4,
|
||||
generic_bs_c_8,
|
||||
.bs_c_1 = generic_bs_c_1,
|
||||
.bs_c_2 = generic_bs_c_2,
|
||||
.bs_c_4 = generic_bs_c_4,
|
||||
.bs_c_8 = generic_bs_c_8,
|
||||
|
||||
/* read (single) stream */
|
||||
generic_bs_r_1,
|
||||
generic_bs_r_2,
|
||||
generic_bs_r_4,
|
||||
generic_bs_r_8,
|
||||
.bs_r_1_s = generic_bs_r_1,
|
||||
.bs_r_2_s = generic_bs_r_2,
|
||||
.bs_r_4_s = generic_bs_r_4,
|
||||
.bs_r_8_s = generic_bs_r_8,
|
||||
|
||||
/* read multiple stream */
|
||||
generic_bs_rm_1,
|
||||
generic_bs_rm_2,
|
||||
generic_bs_rm_4,
|
||||
generic_bs_rm_8,
|
||||
.bs_rm_1_s = generic_bs_rm_1,
|
||||
.bs_rm_2_s = generic_bs_rm_2,
|
||||
.bs_rm_4_s = generic_bs_rm_4,
|
||||
.bs_rm_8_s = generic_bs_rm_8,
|
||||
|
||||
/* read region stream */
|
||||
generic_bs_rr_1,
|
||||
generic_bs_rr_2,
|
||||
generic_bs_rr_4,
|
||||
generic_bs_rr_8,
|
||||
.bs_rr_1_s = generic_bs_rr_1,
|
||||
.bs_rr_2_s = generic_bs_rr_2,
|
||||
.bs_rr_4_s = generic_bs_rr_4,
|
||||
.bs_rr_8_s = generic_bs_rr_8,
|
||||
|
||||
/* write (single) stream */
|
||||
generic_bs_w_1,
|
||||
generic_bs_w_2,
|
||||
generic_bs_w_4,
|
||||
generic_bs_w_8,
|
||||
.bs_w_1_s = generic_bs_w_1,
|
||||
.bs_w_2_s = generic_bs_w_2,
|
||||
.bs_w_4_s = generic_bs_w_4,
|
||||
.bs_w_8_s = generic_bs_w_8,
|
||||
|
||||
/* write multiple stream */
|
||||
generic_bs_wm_1,
|
||||
generic_bs_wm_2,
|
||||
generic_bs_wm_4,
|
||||
generic_bs_wm_8,
|
||||
.bs_wm_1_s = generic_bs_wm_1,
|
||||
.bs_wm_2_s = generic_bs_wm_2,
|
||||
.bs_wm_4_s = generic_bs_wm_4,
|
||||
.bs_wm_8_s = generic_bs_wm_8,
|
||||
|
||||
/* write region stream */
|
||||
generic_bs_wr_1,
|
||||
generic_bs_wr_2,
|
||||
generic_bs_wr_4,
|
||||
generic_bs_wr_8,
|
||||
.bs_wr_1_s = generic_bs_wr_1,
|
||||
.bs_wr_2_s = generic_bs_wr_2,
|
||||
.bs_wr_4_s = generic_bs_wr_4,
|
||||
.bs_wr_8_s = generic_bs_wr_8,
|
||||
};
|
||||
|
||||
/* Ultra-gross kludge */
|
||||
|
Loading…
Reference in New Issue
Block a user