From 0050ea241584f931c6089f7b7a7aca3804131397 Mon Sep 17 00:00:00 2001 From: Michal Meloun Date: Thu, 30 Jul 2020 14:45:05 +0000 Subject: Move Ti AM335x to dev/extres/clk framework. Re-implement clocks for these SoC by using now standard extres/clk framework. This is necessary for future expansion of these. The new implementation is (due to the size of the patch) only the initial (minimum) version. It will be updated/expanded with a subsequent set of particular patches. This patch is also not tested on OMAP4 based boards (BeagleBone), so all possible issues should be (and will be) fixed by ASAP once identified. Submited by: Oskar Holmlund (oskar.holmlund@ohdata.se) Differential Revision: https://reviews.freebsd.org/D25118 --- sys/dev/uart/uart_dev_ti8250.c | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) (limited to 'sys/dev/uart') diff --git a/sys/dev/uart/uart_dev_ti8250.c b/sys/dev/uart/uart_dev_ti8250.c index f5a230908da3..ebe777ed7fdb 100644 --- a/sys/dev/uart/uart_dev_ti8250.c +++ b/sys/dev/uart/uart_dev_ti8250.c @@ -39,9 +39,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include -#include - #include #include #include @@ -52,6 +49,8 @@ __FBSDID("$FreeBSD$"); #include #include +#include + #include "uart_if.h" /* @@ -74,16 +73,8 @@ static int ti8250_bus_probe(struct uart_softc *sc) { int status; - clk_ident_t clkid; - - /* Enable clocks for this device. We can't continue if that fails. */ - clkid = ti_hwmods_get_clock(sc->sc_dev); - if (clkid == INVALID_CLK_IDENT) { - device_printf(sc->sc_dev, - "failed to get clock based on hwmods\n"); - clkid = UART1_CLK + device_get_unit(sc->sc_dev); - } - if ((status = ti_prcm_clk_enable(clkid)) != 0) + + if ((status = ti_sysc_clock_enable(device_get_parent(sc->sc_dev))) != 0) return (status); /* -- cgit v1.2.3