Home
last modified time | relevance | path

Searched refs:ncells (Results 1 – 25 of 81) sorted by relevance

1234

/freebsd/sys/dev/fdt/
H A Dfdt_clock.c53 int clocknum, err, i, ncells; in enable_disable_all() local
58 ncells = OF_getencprop_alloc_multi(cnode, "clocks", sizeof(*clks), in enable_disable_all()
60 if (enable && ncells < 2) { in enable_disable_all()
66 for (i = 0; i < ncells; i += 2) { in enable_disable_all()
98 int clocknum, err, ncells; in fdt_clock_get_info() local
102 ncells = OF_getencprop_alloc_multi(cnode, "clocks", sizeof(*clks), in fdt_clock_get_info()
104 if (ncells <= 0) in fdt_clock_get_info()
107 if (ncells <= n) in fdt_clock_get_info()
/freebsd/sys/dev/hwreset/
H A Dhwreset.c96 hwreset_default_ofw_map(device_t provider_dev, phandle_t xref, int ncells, in hwreset_default_ofw_map() argument
99 if (ncells == 0) in hwreset_default_ofw_map()
101 else if (ncells == 1) in hwreset_default_ofw_map()
116 int ncells, rv; in hwreset_get_by_ofw_idx() local
128 idx, &xnode, &ncells, &cells); in hwreset_get_by_ofw_idx()
139 rv = HWRESET_MAP(rstdev, xnode, ncells, cells, &id); in hwreset_get_by_ofw_idx()
/freebsd/sys/dev/phy/
H A Dphy.c445 int phydev_default_ofw_map(device_t provider, phandle_t xref, int ncells, in phydev_default_ofw_map() argument
452 if (ncells == 0) { in phydev_default_ofw_map()
469 if (ncells == 1) { in phydev_default_ofw_map()
484 int ncells, rv; in phy_get_by_ofw_idx() local
495 &xnode, &ncells, &cells); in phy_get_by_ofw_idx()
506 rv = PHYDEV_MAP(phydev, xnode, ncells, cells, &id); in phy_get_by_ofw_idx()
539 int ncells, rv; in phy_get_by_ofw_property() local
549 ncells = OF_getencprop_alloc_multi(cnode, name, sizeof(pcell_t), in phy_get_by_ofw_property()
551 if (ncells < 1) in phy_get_by_ofw_property()
561 rv = PHYDEV_MAP(phydev, cells[0], ncells - 1 , cells + 1, &id); in phy_get_by_ofw_property()
/freebsd/sys/arm/allwinner/
H A Daw_gmacclk.c184 int error, ncells, i; in aw_gmacclk_attach() local
194 "#clock-cells", &ncells); in aw_gmacclk_attach()
195 if (error != 0 || ncells != CLK_IDX_COUNT) { in aw_gmacclk_attach()
210 def.parent_names = malloc(sizeof(char *) * ncells, M_OFWPROP, M_WAITOK); in aw_gmacclk_attach()
211 for (i = 0; i < ncells; i++) { in aw_gmacclk_attach()
220 def.parent_cnt = ncells; in aw_gmacclk_attach()
H A Daw_nmi.c158 aw_nmi_map_fdt(device_t dev, u_int ncells, pcell_t *cells, u_int *irqp, in aw_nmi_map_fdt() argument
165 if (ncells != 2) { in aw_nmi_map_fdt()
224 error = aw_nmi_map_fdt(dev, daf->ncells, daf->cells, &irq, NULL, NULL); in aw_nmi_map_intr()
251 error = aw_nmi_map_fdt(dev, daf->ncells, daf->cells, &irq, &pol, &trig); in aw_nmi_setup_intr()
/freebsd/sys/arm64/rockchip/
H A Drk_usb2phy.c241 rk_usb2phy_clk_ofw_map(struct clkdom *clkdom, uint32_t ncells, in rk_usb2phy_clk_ofw_map() argument
245 if (ncells != 0) in rk_usb2phy_clk_ofw_map()
266 int i, nclocks, ncells, error; in rk_usb2phy_export_clock() local
271 "#clock-cells", &ncells); in rk_usb2phy_export_clock()
272 if (error != 0 || ncells != 1) { in rk_usb2phy_export_clock()
288 def.parent_names = malloc(sizeof(char *) * ncells, M_OFWPROP, M_WAITOK); in rk_usb2phy_export_clock()
289 for (i = 0; i < ncells; i++) { in rk_usb2phy_export_clock()
298 def.parent_cnt = ncells; in rk_usb2phy_export_clock()
/freebsd/sys/arm/ti/clk/
H A Dclock_common.c57 int index, ncells, rv; in read_clock_cells() local
78 clk->num_real_clocks, &parent, &ncells, &cells); in read_clock_cells()
85 clk->clock_cells_ncells[index] = ncells; in read_clock_cells()
86 index += ncells; in read_clock_cells()
H A Dti_clkctrl.c90 int clkctrl_ofw_map(struct clkdom *clkdom, uint32_t ncells,
255 clkctrl_ofw_map(struct clkdom *clkdom, uint32_t ncells, in clkctrl_ofw_map() argument
257 if (ncells == 0) in clkctrl_ofw_map()
259 else if (ncells == 1) in clkctrl_ofw_map()
261 else if (ncells == 2) { in clkctrl_ofw_map()
/freebsd/sys/dev/gpio/
H A Dofw_gpiobus.c65 int ncells, rv; in gpio_pin_get_by_ofw_propidx() local
71 idx, &xref, &ncells, &cells); in gpio_pin_get_by_ofw_propidx()
90 rv = gpio_map_gpios(pin.dev, cnode, OF_node_from_xref(xref), ncells, in gpio_pin_get_by_ofw_propidx()
282 int gpiocells, i, j, ncells, npins; in ofw_gpiobus_parse_gpios_impl() local
286 ncells = OF_getencprop_alloc_multi(cnode, pname, sizeof(*gpios), in ofw_gpiobus_parse_gpios_impl()
288 if (ncells == -1) { in ofw_gpiobus_parse_gpios_impl()
301 while (i < ncells) { in ofw_gpiobus_parse_gpios_impl()
325 if (ncells - i < gpiocells + 1) { in ofw_gpiobus_parse_gpios_impl()
349 while (i < ncells) { in ofw_gpiobus_parse_gpios_impl()
/freebsd/sys/dev/pwm/
H A Dofw_pwm.c46 int ncells, rv; in pwm_get_by_ofw_propidx() local
49 idx, &xref, &ncells, &cells); in pwm_get_by_ofw_propidx()
62 if (ncells >= 3) in pwm_get_by_ofw_propidx()
/freebsd/sys/arm/nvidia/tegra124/
H A Dtegra124_coretemp.c129 int rv, ncells; in tegra124_coretemp_ofw_parse() local
146 "#thermal-sensor-cells", 0, &xnode, &ncells, &cells); in tegra124_coretemp_ofw_parse()
152 if (ncells != 1) { in tegra124_coretemp_ofw_parse()
155 ncells); in tegra124_coretemp_ofw_parse()
/freebsd/sys/arm64/nvidia/tegra210/
H A Dtegra210_coretemp.c134 int rv, ncells; in tegra210_coretemp_ofw_parse() local
151 "#thermal-sensor-cells", 0, &xnode, &ncells, &cells); in tegra210_coretemp_ofw_parse()
157 if (ncells != 1) { in tegra210_coretemp_ofw_parse()
160 ncells); in tegra210_coretemp_ofw_parse()
/freebsd/sys/arm/mv/
H A Da37x0_gpio.c266 int err, ncells; in a37x0_gpio_attach() local
279 ncells = OF_getencprop_alloc(ofw_bus_get_node(dev), "gpio-ranges", in a37x0_gpio_attach()
281 if (ncells == -1) in a37x0_gpio_attach()
283 if (ncells != sizeof(*ranges) * 4 || ranges[1] != 0 || ranges[2] != 0) { in a37x0_gpio_attach()
H A Dmv_cp110_icu.c178 if (daf->ncells != 2) in mv_cp110_icu_convert_map_data()
194 sc->parent_map_data->ncells = 2; in mv_cp110_icu_convert_map_data()
283 if (daf->ncells != 2) in mv_cp110_icu_map_intr()
356 if (daf->ncells != 2) in mv_cp110_icu_deactivate_intr()
H A Dmv_ap806_gicp.c205 if (daf->ncells != 2) in mv_ap806_gicp_convert_map_data()
213 sc->parent_map_data->ncells = 3; in mv_ap806_gicp_convert_map_data()
362 sc->parent_map_data->ncells = 3; in mv_ap806_gicp_alloc_msi()
/freebsd/sys/dev/xdma/
H A Dxdma.c348 xdma_ofw_md_data(xdma_controller_t *xdma, pcell_t *cells, int ncells) in xdma_ofw_md_data() argument
353 cells, ncells, (void **)&xdma->data); in xdma_ofw_md_data()
456 int ncells; in xdma_ofw_get() local
488 idx, &parent, &ncells, &cells); in xdma_ofw_get()
509 xdma_ofw_md_data(xdma, cells, ncells); in xdma_ofw_get()
/freebsd/sys/dev/syscon/
H A Dsyscon.c286 int ncells; in syscon_get_by_ofw_property() local
295 ncells = OF_getencprop_alloc_multi(cnode, name, sizeof(pcell_t), in syscon_get_by_ofw_property()
297 if (ncells < 1) in syscon_get_by_ofw_property()
/freebsd/sys/dev/ofw/
H A Dofw_bus_subr.h61 u_int ncells; member
144 const char *cells_name, int idx, phandle_t *producer, int *ncells,
H A Dofw_bus_subr.c705 phandle_t *producer, int *ncells, pcell_t **cells) in ofw_bus_intr_by_rid() argument
764 *ncells= icells; in ofw_bus_intr_by_rid()
874 const char *cells_name, int idx, phandle_t *producer, int *ncells, in ofw_bus_parse_xref_list_internal() argument
907 *ncells = pcells; in ofw_bus_parse_xref_list_internal()
917 *ncells = cnt; in ofw_bus_parse_xref_list_internal()
936 const char *cells_name, int idx, phandle_t *producer, int *ncells, in ofw_bus_parse_xref_list_alloc() argument
944 idx, producer, ncells, cells)); in ofw_bus_parse_xref_list_alloc()
/freebsd/sys/riscv/sifive/
H A Dsifive_prci.c447 int i, ncells, error; in prci_attach() local
471 "#clock-cells", &ncells); in prci_attach()
472 if (error != 0 || ncells < 1) { in prci_attach()
478 clkdef.parent_names = mallocarray(ncells, sizeof(char *), M_OFWPROP, in prci_attach()
480 for (i = 0; i < ncells; i++) { in prci_attach()
492 clkdef.parent_cnt = ncells; in prci_attach()
/freebsd/sys/dev/mailbox/arm/
H A Darm_doorbell.c189 int ncells; in arm_doorbell_ofw_get() local
217 idx, &parent, &ncells, &cells); in arm_doorbell_ofw_get()
224 if (ncells != 2) { in arm_doorbell_ofw_get()
/freebsd/sys/dev/regulator/
H A Dregulator.c1122 regdev_default_ofw_map(device_t dev, phandle_t xref, int ncells, in regdev_default_ofw_map() argument
1125 if (ncells == 0) in regdev_default_ofw_map()
1127 else if (ncells == 1) in regdev_default_ofw_map()
1208 int ncells, rv; in regulator_get_by_ofw_property() local
1222 ncells = OF_getencprop_alloc_multi(cnode, name, sizeof(*cells), in regulator_get_by_ofw_property()
1224 if (ncells <= 0) in regulator_get_by_ofw_property()
1235 rv = REGDEV_MAP(regdev, cells[0], ncells - 1, cells + 1, &id); in regulator_get_by_ofw_property()
/freebsd/sys/dev/sdhci/
H A Dsdhci_fdt.c172 sdhci_clock_ofw_map(struct clkdom *clkdom, uint32_t ncells, in sdhci_clock_ofw_map() argument
177 if (ncells != 0) in sdhci_clock_ofw_map()
197 int i, nclocks, ncells, error; in sdhci_export_clocks() local
207 "#clock-cells", &ncells); in sdhci_export_clocks()
208 if (error != 0 || ncells != 2) { in sdhci_export_clocks()
/freebsd/sys/arm64/iommu/
H A Diommu.c258 int ncells; in iommu_get_ctx_ofw() local
281 channel, &parent, &ncells, &cells); in iommu_get_ctx_ofw()
318 error = IOMMU_OFW_MD_DATA(iommu->dev, ioctx, cells, ncells); in iommu_get_ctx_ofw()
/freebsd/stand/powerpc/boot1.chrp/
H A Dboot1.c187 int ret, i, ncells; in call_ofw() local
189 ncells = 3 + buf[1] + buf[2]; in call_ofw()
190 for (i = 0; i < ncells; i++) in call_ofw()
194 for (i = 0; i < ncells; i++) in call_ofw()

1234