Lines Matching +full:conf +full:- +full:clk

1 /*-
36 #include <sys/conf.h>
42 #include <dev/clk/clk.h>
56 * High-level UART interface.
60 clk_t clk; member
72 struct uart_bas *bas = &sc->sc_bas; in tegra_uart_attach()
78 ns8250->ier_rxbits = 0x1d; in tegra_uart_attach()
79 ns8250->ier_mask = 0xc0; in tegra_uart_attach()
80 ns8250->ier = uart_getreg(bas, REG_IER) & ns8250->ier_mask; in tegra_uart_attach()
81 ns8250->ier |= ns8250->ier_rxbits; in tegra_uart_attach()
82 uart_setreg(bas, REG_IER, ns8250->ier); in tegra_uart_attach()
90 struct uart_bas *bas = &sc->sc_bas; in tegra_uart_grab()
99 uart_lock(sc->sc_hwmtx); in tegra_uart_grab()
101 uart_setreg(bas, REG_IER, ier & ns8250->ier_mask); in tegra_uart_grab()
108 uart_unlock(sc->sc_hwmtx); in tegra_uart_grab()
115 struct uart_bas *bas = &sc->sc_bas; in tegra_uart_ungrab()
120 uart_lock(sc->sc_hwmtx); in tegra_uart_ungrab()
121 uart_setreg(bas, REG_FCR, ns8250->fcr); in tegra_uart_ungrab()
122 uart_setreg(bas, REG_IER, ns8250->ier); in tegra_uart_ungrab()
124 uart_unlock(sc->sc_hwmtx); in tegra_uart_ungrab()
156 {"nvidia,tegra124-uart", (uintptr_t)&tegra_uart_class},
157 {"nvidia,tegra210-uart", (uintptr_t)&tegra_uart_class},
171 if ((OF_getencprop(node, "reg-shift", &shift, sizeof(shift))) <= 0) in uart_fdt_get_shift1()
190 if (cd->ocd_data == 0) in tegra_uart_probe()
192 sc->ns8250_base.base.sc_class = (struct uart_class *)cd->ocd_data; in tegra_uart_probe()
193 rv = hwreset_get_by_ofw_name(dev, 0, "serial", &sc->reset); in tegra_uart_probe()
198 rv = hwreset_deassert(sc->reset); in tegra_uart_probe()
205 rv = clk_get_by_ofw_index(dev, 0, 0, &sc->clk); in tegra_uart_probe()
210 rv = clk_enable(sc->clk); in tegra_uart_probe()
215 rv = clk_get_freq(sc->clk, &freq); in tegra_uart_probe()
229 if (sc->clk != NULL) { in tegra_uart_detach()
230 clk_release(sc->clk); in tegra_uart_detach()