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 299314 2016-05-10 04:55:57Z adrian $");
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_alloc_resource(dev, SYS_RES_MEMORY,
102 &dinfo->rid_agent, r_start, r_end, r_count, RF_ACTIVE);
103 if (dinfo->res_agent == NULL) {
104 device_printf(dev, "failed allocating agent register "
105 "block for core %d\n", i);
106 error = ENXIO;
107 goto cleanup;
108 }
109 }
110
--- 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 299314 2016-05-10 04:55:57Z adrian $");
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_alloc_resource(dev, SYS_RES_MEMORY,
102 &dinfo->rid_agent, r_start, r_end, r_count, RF_ACTIVE);
103 if (dinfo->res_agent == NULL) {
104 device_printf(dev, "failed allocating agent register "
105 "block for core %d\n", i);
106 error = ENXIO;
107 goto cleanup;
108 }
109 }
110
--- 386 unchanged lines hidden ---