Lines Matching +full:tegra210 +full:- +full:emc +full:- +full:table

1 /*-
2 * SPDX-License-Identifier: BSD-2-Clause
51 #include <dt-bindings/clock/tegra210-car.h>
58 {"nvidia,tegra210-car", 1},
260 /* Initial setup table. */
293 {"emc", NULL, 0, 1},
321 rv = clknode_div_register(sc->clkdom, clks + i); in init_divs()
334 rv = clknode_gate_register(sc->clkdom, clks + i); in init_gates()
347 rv = clknode_mux_register(sc->clkdom, clks + i); in init_muxes()
361 CLKDEV_READ_4(sc->dev, OSC_CTRL, &val); in init_fixeds()
366 rv = clknode_fixed_register(sc->clkdom, &fixed_osc); in init_fixeds()
371 rv = clknode_fixed_register(sc->clkdom, &fixed_osc_div); in init_fixeds()
375 CLKDEV_READ_4(sc->dev, SPARE_REG0, &val); in init_fixeds()
377 rv = clknode_fixed_register(sc->clkdom, &fixed_clk_m); in init_fixeds()
382 rv = clknode_fixed_register(sc->clkdom, clks + i); in init_fixeds()
399 clknode = clknode_find_by_name(tbl->name); in postinit_clock()
401 device_printf(sc->dev, "Cannot find clock %s\n", in postinit_clock()
402 tbl->name); in postinit_clock()
405 if (tbl->parent != NULL) { in postinit_clock()
406 rv = clknode_set_parent_by_name(clknode, tbl->parent); in postinit_clock()
408 device_printf(sc->dev, in postinit_clock()
410 tbl->name, tbl->parent, rv); in postinit_clock()
414 if (tbl->frequency != 0) { in postinit_clock()
415 rv = clknode_set_freq(clknode, tbl->frequency, 0 , 9999); in postinit_clock()
417 device_printf(sc->dev, in postinit_clock()
419 tbl->name, rv); in postinit_clock()
423 if (tbl->enable!= 0) { in postinit_clock()
426 device_printf(sc->dev, in postinit_clock()
427 "Cannot enable %s: %d\n", tbl->name, rv); in postinit_clock()
440 sc->clkdom = clkdom_create(dev); in register_clocks()
441 if (sc->clkdom == NULL) in register_clocks()
451 clkdom_finit(sc->clkdom); in register_clocks()
452 clkdom_xlock(sc->clkdom); in register_clocks()
454 clkdom_unlock(sc->clkdom); in register_clocks()
456 clkdom_dump(sc->clkdom); in register_clocks()
465 *val = bus_read_4(sc->mem_res, addr); in tegra210_car_clkdev_read_4()
475 bus_write_4(sc->mem_res, addr, val); in tegra210_car_clkdev_write_4()
487 reg = bus_read_4(sc->mem_res, addr); in tegra210_car_clkdev_modify_4()
490 bus_write_4(sc->mem_res, addr, reg); in tegra210_car_clkdev_modify_4()
500 mtx_lock(&sc->mtx); in tegra210_car_clkdev_device_lock()
509 mtx_unlock(&sc->mtx); in tegra210_car_clkdev_device_unlock()
527 if (ofw_bus_search_compatible(dev, compat_data)->ocd_data != 0) { in tegra210_car_probe()
541 sc->dev = dev; in tegra210_car_attach()
543 mtx_init(&sc->mtx, device_get_nameunit(dev), NULL, MTX_DEF); in tegra210_car_attach()
544 sc->type = ofw_bus_search_compatible(dev, compat_data)->ocd_data; in tegra210_car_attach()
548 sc->mem_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, in tegra210_car_attach()
550 if (!sc->mem_res) { in tegra210_car_attach()
561 if (sc->mem_res) in tegra210_car_attach()
562 bus_release_resource(dev, SYS_RES_MEMORY, 0, sc->mem_res); in tegra210_car_attach()