1/*-
2 * Copyright (c) 2015 Landon Fuller <landon@landonf.org>
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright
--- 14 unchanged lines hidden (view full) ---
23 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
24 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
25 * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
26 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
27 * THE POSSIBILITY OF SUCH DAMAGES.
28 */
29
30#include <sys/cdefs.h>
31__FBSDID("$FreeBSD: head/sys/dev/bhnd/bcma/bcma.c 301410 2016-06-04 19:53:47Z landonf $");
32
33#include <sys/param.h>
34#include <sys/bus.h>
35#include <sys/kernel.h>
36#include <sys/malloc.h>
37#include <sys/module.h>
38#include <sys/systm.h>
39
--- 53 unchanged lines hidden (view full) ---
93 }
94
95 /* Allocate the resource */
96 r_start = addr;
97 r_count = size;
98 r_end = r_start + r_count - 1;
99
100 dinfo->rid_agent = i + 1;
101 dinfo->res_agent = BHND_BUS_ALLOC_RESOURCE(dev, dev,
102 SYS_RES_MEMORY, &dinfo->rid_agent, r_start, r_end, r_count,
103 RF_ACTIVE);
104 if (dinfo->res_agent == NULL) {
105 device_printf(dev, "failed allocating agent register "
106 "block for core %d\n", i);
107 error = ENXIO;
108 goto cleanup;
109 }
110 }
111
--- 386 unchanged lines hidden ---
2 * Copyright (c) 2015 Landon Fuller <landon@landonf.org>
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright
--- 14 unchanged lines hidden (view full) ---
23 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
24 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
25 * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
26 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
27 * THE POSSIBILITY OF SUCH DAMAGES.
28 */
29
30#include <sys/cdefs.h>
31__FBSDID("$FreeBSD: head/sys/dev/bhnd/bcma/bcma.c 301410 2016-06-04 19:53:47Z landonf $");
32
33#include <sys/param.h>
34#include <sys/bus.h>
35#include <sys/kernel.h>
36#include <sys/malloc.h>
37#include <sys/module.h>
38#include <sys/systm.h>
39
--- 53 unchanged lines hidden (view full) ---
93 }
94
95 /* Allocate the resource */
96 r_start = addr;
97 r_count = size;
98 r_end = r_start + r_count - 1;
99
100 dinfo->rid_agent = i + 1;
101 dinfo->res_agent = BHND_BUS_ALLOC_RESOURCE(dev, dev,
102 SYS_RES_MEMORY, &dinfo->rid_agent, r_start, r_end, r_count,
103 RF_ACTIVE);
104 if (dinfo->res_agent == NULL) {
105 device_printf(dev, "failed allocating agent register "
106 "block for core %d\n", i);
107 error = ENXIO;
108 goto cleanup;
109 }
110 }
111
--- 386 unchanged lines hidden ---