/freebsd/sys/dev/fdt/ |
H A D | fdt_clock.c | 53 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 D | hwreset.c | 96 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 D | phy.c | 445 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 D | aw_gmacclk.c | 184 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 D | aw_nmi.c | 158 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 D | rk_usb2phy.c | 241 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/dev/gpio/ |
H A D | ofw_gpiobus.c | 65 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/arm/ti/clk/ |
H A D | clock_common.c | 57 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 D | ti_clkctrl.c | 90 int clkctrl_ofw_map(struct clkdom *clkdom, uint32_t ncells, 256 clkctrl_ofw_map(struct clkdom *clkdom, uint32_t ncells, in clkctrl_ofw_map() argument 258 if (ncells == 0) in clkctrl_ofw_map() 260 else if (ncells == 1) in clkctrl_ofw_map() 262 else if (ncells == 2) { in clkctrl_ofw_map()
|
/freebsd/sys/dev/pwm/ |
H A D | ofw_pwm.c | 46 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/arm64/nvidia/tegra210/ |
H A D | tegra210_coretemp.c | 134 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/nvidia/tegra124/ |
H A D | tegra124_coretemp.c | 129 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/arm/mv/ |
H A D | a37x0_gpio.c | 266 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 D | mv_cp110_icu.c | 178 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 D | mv_ap806_gicp.c | 205 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 D | xdma.c | 348 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/sdhci/ |
H A D | sdhci_fdt.c | 103 sdhci_clock_ofw_map(struct clkdom *clkdom, uint32_t ncells, in sdhci_clock_ofw_map() argument 108 if (ncells != 0) in sdhci_clock_ofw_map() 128 int i, nclocks, ncells, error; in sdhci_export_clocks() local 138 "#clock-cells", &ncells); in sdhci_export_clocks() 139 if (error != 0 || ncells != 2) { in sdhci_export_clocks()
|
/freebsd/sys/dev/syscon/ |
H A D | syscon.c | 286 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/riscv/sifive/ |
H A D | sifive_prci.c | 447 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/ofw/ |
H A D | ofw_bus_subr.h | 61 u_int ncells; member 144 const char *cells_name, int idx, phandle_t *producer, int *ncells,
|
H A D | ofw_bus_subr.c | 705 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/dev/mailbox/arm/ |
H A D | arm_doorbell.c | 189 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/riscv/riscv/ |
H A D | plic.c | 228 if (daf->ncells != 1 && daf->ncells != 2) { in plic_map_intr() 229 device_printf(dev, "invalid ncells value: %u\n", daf->ncells); in plic_map_intr() 234 type = daf->ncells == 2 ? daf->cells[1] : IRQ_TYPE_LEVEL_HIGH; in plic_map_intr()
|
/freebsd/sys/riscv/eswin/ |
H A D | eswin_reset.c | 158 eswin_rst_map(device_t provider_dev, phandle_t xref, int ncells, in eswin_rst_map() argument 162 KASSERT(ncells == 2, ("wrong ncells")); in eswin_rst_map()
|
/freebsd/sys/dev/regulator/ |
H A D | regulator.c | 1122 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()
|