aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/uart
diff options
context:
space:
mode:
authorMichal Meloun <mmel@FreeBSD.org>2020-07-30 14:45:05 +0000
committerMichal Meloun <mmel@FreeBSD.org>2020-07-30 14:45:05 +0000
commit0050ea241584f931c6089f7b7a7aca3804131397 (patch)
tree63835a0ff1686af782321fa0acefd75a8511df8f /sys/dev/uart
parent98369a6980f5448fa9ab8bde9f04ba10c4ca3c93 (diff)
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
Notes
Notes: svn path=/head/; revision=363700
Diffstat (limited to 'sys/dev/uart')
-rw-r--r--sys/dev/uart/uart_dev_ti8250.c17
1 files changed, 4 insertions, 13 deletions
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 <sys/sysctl.h>
#include <machine/bus.h>
-#include <arm/ti/ti_prcm.h>
-#include <arm/ti/ti_hwmods.h>
-
#include <dev/fdt/fdt_common.h>
#include <dev/ofw/ofw_bus.h>
#include <dev/ofw/ofw_bus_subr.h>
@@ -52,6 +49,8 @@ __FBSDID("$FreeBSD$");
#include <dev/uart/uart_bus.h>
#include <dev/uart/uart_dev_ns8250.h>
+#include <arm/ti/ti_sysc.h>
+
#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);
/*