Home
last modified time | relevance | path

Searched +full:sc +full:- +full:resource (Results 1 – 25 of 945) sorted by relevance

12345678910>>...38

/freebsd/sys/dev/bhnd/bhndb/
H A Dbhndb.c1 /*-
2 * Copyright (c) 2015-2016 Landon Fuller <landon@landonf.org>
39 * a BHND-compatible bus (e.g. bcma or siba).
51 #include <machine/resource.h>
79 static bool bhndb_hw_matches(struct bhndb_softc *sc,
83 static int bhndb_init_region_cfg(struct bhndb_softc *sc,
89 static int bhndb_find_hwspec(struct bhndb_softc *sc,
93 bhndb_addrspace bhndb_get_addrspace(struct bhndb_softc *sc,
96 static struct rman *bhndb_get_rman(struct bhndb_softc *sc,
99 static int bhndb_init_child_resource(struct resource *r,
[all …]
H A Dbhndb_private.h1 /*-
2 * Copyright (c) 2015-2016 Landon Fuller <landon@landonf.org>
48 #include <machine/resource.h>
77 struct resource *r, rman_res_t *start,
81 struct resource *r,
106 struct resource *r);
115 struct resource *res);
120 struct resource *res);
149 struct resource *dw_res; /**< child resource */
158 struct resource *parent_res; /**< enclosing resource */
[all …]
/freebsd/sys/dev/bhnd/cores/chipc/
H A Dchipc_subr.c1 /*-
2 * SPDX-License-Identifier: BSD-2-Clause
5 * Copyright (c) 2015-2016 Landon Fuller <landon@landonf.org>
40 * Return a human-readable name for the given flash @p type.
127 * Initialize child resource @p r with a virtual address, tag, and handle
132 * @param parent The parent bus resource that fully contains the subregion.
137 chipc_init_child_resource(struct resource *r, in chipc_init_child_resource()
138 struct resource *parent, bhnd_size_t offset, bhnd_size_t size) in chipc_init_child_resource()
145 /* Fetch the parent resource's bus values */ in chipc_init_child_resource()
150 /* Configure child resource with offset-adjusted values */ in chipc_init_child_resource()
[all …]
H A Dchipc.c1 /*-
2 * SPDX-License-Identifier: BSD-2-Clause
4 * Copyright (c) 2015-2016 Landon Fuller <landon@landonf.org>
59 #include <machine/resource.h>
112 static int chipc_add_children(struct chipc_softc *sc);
114 static bhnd_nvram_src chipc_find_nvram_src(struct chipc_softc *sc,
116 static int chipc_read_caps(struct chipc_softc *sc,
120 struct chipc_softc *sc);
121 static int chipc_enable_otp_power(struct chipc_softc *sc);
122 static void chipc_disable_otp_power(struct chipc_softc *sc);
[all …]
/freebsd/sys/dev/pci/
H A Dpci_pci.c1 /*-
2 * SPDX-License-Identifier: BSD-3-Clause
147 "Clear firmware-assigned resources for PCI-PCI bridge I/O windows.");
150 * Get the corresponding window if this resource from a child device was
151 * sub-allocated from one of our window resource managers.
154 pcib_get_resource_window(struct pcib_softc *sc, struct resource *r) in pcib_get_resource_window() argument
158 if (rman_is_region_manager(r, &sc->io.rman)) in pcib_get_resource_window()
159 return (&sc->io); in pcib_get_resource_window()
164 rman_is_region_manager(r, &sc->pmem.rman)) in pcib_get_resource_window()
165 return (&sc->pmem); in pcib_get_resource_window()
[all …]
H A Disa_pci.c1 /*-
2 * SPDX-License-Identifier: BSD-3-Clause
50 #include <machine/resource.h>
54 static struct resource * isab_pci_alloc_resource(device_t dev,
58 struct resource *r);
82 struct resource *ip_res;
142 printf("PCI-ISA bridge with incorrect subclass 0x%x\n", in isab_pci_probe()
153 device_set_desc(dev, "PCI-ISA bridge"); in isab_pci_probe()
154 return(-10000); in isab_pci_probe()
167 static struct resource *
[all …]
/freebsd/sys/dev/dpaa2/
H A Ddpaa2_mc.c1 /*-
2 * SPDX-License-Identifier: BSD-2-Clause
4 * Copyright © 2021-2022 Dmitry Salychev
32 * MC is a hardware resource manager which can be found in several NXP
34 * hardware objects used in network-oriented packet processing applications.
53 #include <machine/resource.h>
73 #define mcreg_read_4(_sc, _r) bus_read_4(&(_sc)->map[1], (_r))
74 #define mcreg_write_4(_sc, _r, _v) bus_write_4(&(_sc)->map[1], (_r), (_v))
99 * @brief Structure to describe a DPAA2 device as a managed resource.
131 struct dpaa2_mc_softc *sc; in dpaa2_mc_attach() local
[all …]
/freebsd/sys/dev/pccbb/
H A Dpccbbvar.h1 /*-
2 * SPDX-License-Identifier: BSD-2-Clause
5 * Copyright (c) 2003-2004 M. Warner Losh <imp@FreeBSD.org>
37 struct cbb_softc *sc; member
43 struct resource *res;
46 /* note: unlike the regular resource list, there can be
48 * combination of rid and res->r_dev should be unique.
50 bus_addr_t cardaddr; /* for 16-bit pccard memory */
58 struct resource *base_res;
59 struct resource *irq_res;
[all …]
H A Dpccbb.c1 /*-
2 * SPDX-License-Identifier: BSD-2-Clause
4 * Copyright (c) 2000-2001 Jonathan Chen All rights reserved.
5 * Copyright (c) 2002-2004 M. Warner Losh <imp@FreeBSD.org>
30 /*-
65 * http://www-s.ti.com/cgi-bin/sc/generic2.cgi?family=PCI+CARDBUS+CONTROLLERS
90 #include <machine/resource.h>
137 "Starting ioport for 16-bit cards");
142 "Starting ioport for 32-bit cards");
148 static void cbb_insert(struct cbb_softc *sc);
[all …]
/freebsd/sys/dev/ofw/
H A Dofw_pcib.c1 /*-
47 #include <machine/resource.h>
68 static struct resource * ofw_pcib_alloc_resource(device_t, device_t,
70 static int ofw_pcib_release_resource(device_t, device_t, struct resource *);
71 static int ofw_pcib_activate_resource(device_t, device_t, struct resource *);
72 static int ofw_pcib_deactivate_resource(device_t, device_t, struct resource *);
74 struct resource *, rman_res_t, rman_res_t);
75 static int ofw_pcib_map_resource(device_t, device_t, struct resource *,
77 static int ofw_pcib_unmap_resource(device_t, device_t, struct resource *,
143 struct ofw_pci_softc *sc; in ofw_pcib_init() local
[all …]
/freebsd/sys/dev/exca/
H A Dexca.c1 /*-
2 * SPDX-License-Identifier: BSD-4-Clause AND BSD-2-Clause
4 * Copyright (c) 2002-2005 M. Warner Losh <imp@FreeBSD.org>
72 #include <machine/resource.h>
91 "Intel i82365SL-
144 exca_mem_getb(struct exca_softc * sc,int reg) exca_mem_getb() argument
150 exca_mem_putb(struct exca_softc * sc,int reg,uint8_t val) exca_mem_putb() argument
156 exca_io_getb(struct exca_softc * sc,int reg) exca_io_getb() argument
163 exca_io_putb(struct exca_softc * sc,int reg,uint8_t val) exca_io_putb() argument
176 exca_do_mem_map(struct exca_softc * sc,int win) exca_do_mem_map() argument
246 exca_mem_map(struct exca_softc * sc,int kind,struct resource * res) exca_mem_map() argument
299 exca_mem_unmap(struct exca_softc * sc,int window) exca_mem_unmap() argument
316 exca_mem_findmap(struct exca_softc * sc,struct resource * res) exca_mem_findmap() argument
339 exca_mem_set_flags(struct exca_softc * sc,struct resource * res,uint32_t flags) exca_mem_set_flags() argument
374 exca_mem_unmap_res(struct exca_softc * sc,struct resource * res) exca_mem_unmap_res() argument
392 exca_mem_set_offset(struct exca_softc * sc,struct resource * res,uint32_t cardaddr,uint32_t * deltap) exca_mem_set_offset() argument
453 exca_do_io_map(struct exca_softc * sc,int win) exca_do_io_map() argument
486 exca_io_map(struct exca_softc * sc,int width,struct resource * r) exca_io_map() argument
516 exca_io_unmap(struct exca_softc * sc,int window) exca_io_unmap() argument
534 exca_io_findmap(struct exca_softc * sc,struct resource * res) exca_io_findmap() argument
549 exca_io_unmap_res(struct exca_softc * sc,struct resource * res) exca_io_unmap_res() argument
570 exca_wait_ready(struct exca_softc * sc) exca_wait_ready() argument
598 exca_reset(struct exca_softc * sc,device_t child) exca_reset() argument
634 exca_init(struct exca_softc * sc,device_t dev,bus_space_tag_t bst,bus_space_handle_t bsh,uint32_t offset) exca_init() argument
[all...]
H A Dexcavar.h2 /*-
3 * SPDX-License-Identifier: BSD-4-Clause AND BSD-2-Clause
85 #define EXCA_I82365 1 /* Intel i82365SL-A/B or clone */
86 #define EXCA_I82365SL_DF 2 /* Intel i82365sl-DF step */
99 #define EXCA_BOGUS -1 /* Invalid/not present/etc */
106 void exca_init(struct exca_softc *sc, device_t dev,
108 void exca_insert(struct exca_softc *sc);
109 int exca_io_map(struct exca_softc *sc, int width, struct resource *r);
110 int exca_io_unmap_res(struct exca_softc *sc, struct resource *res);
111 int exca_is_pcic(struct exca_softc *sc);
[all …]
/freebsd/sys/powerpc/powermac/
H A Dmacio.c1 /*-
2 * SPDX-License-Identifier: BSD-3-Clause
47 #include <machine/resource.h>
71 struct resource *sc_memr;
84 static struct resource *macio_alloc_resource(device_t, device_t, int, int *,
87 static int macio_adjust_resource(device_t, device_t, struct resource *,
89 static int macio_activate_resource(device_t, device_t, struct resource *);
90 static int macio_deactivate_resource(device_t, device_t, struct resource *);
91 static int macio_release_resource(device_t, device_t, struct resource *);
92 static int macio_map_resource(device_t, device_t, struct resource *,
[all …]
H A Duninorth.c1 /*-
2 * SPDX-License-Identifier: BSD-2-Clause
47 #include <machine/resource.h>
75 static struct resource *unin_chip_alloc_resource(device_t, device_t, int, int *,
79 struct resource *, rman_res_t,
82 struct resource *);
84 struct resource *);
85 static int unin_chip_map_resource(device_t, device_t, struct resource *,
88 static int unin_chip_unmap_resource(device_t, device_t, struct resource *,
90 static int unin_chip_release_resource(device_t, device_t, struct resource *);
[all …]
H A Dmacgpio.c1 /*-
2 * SPDX-License-Identifier: BSD-2-Clause
45 #include <machine/resource.h>
59 struct resource *sc_gpios;
72 static struct resource *macgpio_alloc_resource(device_t, device_t, int, int *,
75 struct resource *);
77 struct resource *);
153 struct macgpio_softc *sc; in macgpio_attach() local
159 sc = device_get_softc(dev); in macgpio_attach()
160 root = sc->sc_node = ofw_bus_get_node(dev); in macgpio_attach()
[all …]
/freebsd/sys/powerpc/psim/
H A Diobus.c1 /*-
2 * SPDX-License-Identifier: BSD-3-Clause
33 * /iobus@0x80000000/name psim-iobus
35 * Code borrowed from various nexus.c and uninorth.c :-)
54 #include <machine/resource.h>
74 static struct resource *iobus_alloc_resource(device_t, device_t, int, int *,
77 static int iobus_adjust_resource(device_t, device_t, struct resource *,
79 static int iobus_activate_resource(device_t, device_t, struct resource *);
80 static int iobus_deactivate_resource(device_t, device_t, struct resource *);
81 static int iobus_map_resource(device_t, device_t, struct resource *,
[all …]
/freebsd/sys/arm64/cavium/
H A Dthunder_pcie_pem.c1 /*-
58 #include <machine/resource.h>
110 * as we want. To support 32-bit cards let's assume
113 * 0x00000000 - 0x000FFFFF IO
114 * 0x00100000 - 0xFFFFFFFF Memory
123 static int thunder_pem_activate_resource(device_t, device_t, struct resource *);
125 struct resource *, rman_res_t, rman_res_t);
126 static struct resource * thunder_pem_alloc_resource(device_t, device_t, int,
137 struct resource *);
138 static int thunder_pem_map_resource(device_t, device_t, struct resource *,
[all …]
/freebsd/sys/dev/atkbdc/
H A Datkbdc_isa.c1 /*-
2 * SPDX-License-Identifier: BSD-2-Clause
4 * Copyright (c) 1999 Kazutaka YOKOTA <yokota@zodiac.mech.utsunomiya-u.ac.jp>
38 #include <machine/resource.h>
52 static struct resource *atkbdc_isa_alloc_resource(device_t dev, device_t child,
56 struct resource *r);
97 struct resource *port0; in atkbdc_isa_probe()
98 struct resource *port1; in atkbdc_isa_probe()
120 * one resource (0x60 through 0x64) or as two separate resources in atkbdc_isa_probe()
121 * (0x60 and 0x64). Some brain-damaged ACPI BIOS has reversed in atkbdc_isa_probe()
[all …]
/freebsd/sys/dev/vmd/
H A Dvmd.c1 /*-
2 * SPDX-License-Identifier: BSD-2-Clause
42 #include <machine/resource.h>
81 * By default all VMD devices remap children MSI/MSI-X interrupts into their
99 * MSI-X can use different addresses, but we have limited number of MSI-X
104 "Maximum number of MSI-X vectors per device");
126 for (t = vmd_devs; t->vmd_name != NULL; t++) { in vmd_probe()
127 if (vid == t->vmd_vid && did == t->vmd_did) { in vmd_probe()
128 device_set_desc(dev, t->vmd_name); in vmd_probe()
136 vmd_free(struct vmd_softc *sc) in vmd_free() argument
[all …]
/freebsd/sys/powerpc/mpc85xx/
H A Dmpc85xx_gpio.c1 /*-
36 #include <sys/resource.h>
42 #include <machine/resource.h>
55 #define GPIO_LOCK(sc) mtx_lock(&(sc)->sc_mtx) argument
56 #define GPIO_UNLOCK(sc) mtx_unlock(&(sc)->sc_mtx) argument
57 #define GPIO_LOCK_INIT(sc) \ argument
58 mtx_init(&(sc)->sc_mtx, device_get_nameunit((sc)->dev), \
60 #define GPIO_LOCK_DESTROY(_sc) mtx_destroy(&_sc->sc_mtx);
66 struct resource *out_res; /* Memory resource */
67 struct resource *in_res;
[all …]
H A Dlbc.c1 /*-
2 * SPDX-License-Identifier: BSD-3-Clause
4 * Copyright (c) 2006-2008, Juniper Networks, Inc.
72 static int lbc_map_resource(device_t, device_t, struct resource *,
74 static int lbc_unmap_resource(device_t, device_t, struct resource *,
77 struct resource *r);
79 struct resource *r);
81 static struct resource *lbc_alloc_resource(device_t, device_t, int, int *,
83 static int lbc_adjust_resource(device_t, device_t, struct resource *,
86 static int lbc_release_resource(device_t, device_t, struct resource *);
[all …]
/freebsd/sys/dev/acpica/
H A Dacpi_pcib_acpi.c1 /*-
66 int ap_bus; /* bios-assigned bus number */
67 int ap_addr; /* device/func of PCI-Host bridge */
92 static struct resource *acpi_pcib_acpi_alloc_resource(device_t dev,
97 device_t child, struct resource *r,
100 device_t child, struct resource *r);
102 device_t child, struct resource *r);
104 device_t child, struct resource *r);
161 root = (devinfo->Flags & ACPI_PCI_ROOT_BRIDGE) != 0; in acpi_pcib_acpi_probe()
166 device_set_desc(dev, "ACPI Host-PCI bridge"); in acpi_pcib_acpi_probe()
[all …]
/freebsd/sys/dev/sec/
H A Dsec.h1 /*-
2 * SPDX-License-Identifier: BSD-2-Clause
4 * Copyright (C) 2008-2009 Semihalf, Piotr Ziecik
147 int (*sem_make_desc)(struct sec_softc *sc,
196 struct resource *sc_rres; /* register resource */
203 struct resource *sc_pri_ires; /* primary irq resource */
205 int sc_pri_irid; /* primary irq resource id */
207 struct resource *sc_sec_ires; /* secondary irq resource */
209 int sc_sec_irid; /* secondary irq resource id */
213 #define SEC_LOCK(sc, what) \ argument
[all …]
/freebsd/sys/dev/superio/
H A Dsuperio.c1 /*-
2 * SPDX-License-Identifier: BSD-2-Clause
44 #include <machine/resource.h>
53 typedef void (*sio_conf_enter_f)(struct resource*, uint16_t);
54 typedef void (*sio_conf_exit_f)(struct resource*, uint16_t);
82 struct resource* io_res;
108 sio_read(struct resource* res, uint8_t reg) in sio_read()
114 /* Read a word from two one-byte registers, big endian. */
116 sio_readw(struct resource* res, uint8_t reg) in sio_readw()
127 sio_write(struct resource* res, uint8_t reg, uint8_t val) in sio_write()
[all …]
/freebsd/sys/arm/nvidia/
H A Dtegra_lic.c1 /*-
41 #include <machine/resource.h>
65 #define WR4(_sc, _b, _r, _v) bus_write_4((_sc)->mem_res[_b], (_r), (_v))
66 #define RD4(_sc, _b, _r) bus_read_4((_sc)->mem_res[_b], (_r))
74 { -1, 0 }
78 {"nvidia,tegra124-ictlr", 1},
79 {"nvidia,tegra210-ictlr", 1},
85 struct resource *mem_res[nitems(lic_spec)];
91 struct resource *res, struct intr_map_data *data) in tegra_lic_activate_intr()
93 struct tegra_lic_sc *sc = device_get_softc(dev); in tegra_lic_activate_intr() local
[all …]

12345678910>>...38