summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2016-08-22 11:24:46 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2016-08-22 11:24:46 +0000
commit074e38c1e402b877c925ce56de2a2df824b833a9 (patch)
tree6035105888117f72b0db7448019d8db473c91b7f /sys/arch
parent16334b0c869279be3b454e5d70866eab1697ee0c (diff)
Use the new clock API.
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/armv7/sunxi/sxiahci.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/sys/arch/armv7/sunxi/sxiahci.c b/sys/arch/armv7/sunxi/sxiahci.c
index c797b9375d5..8f9ef44cf3d 100644
--- a/sys/arch/armv7/sunxi/sxiahci.c
+++ b/sys/arch/armv7/sunxi/sxiahci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sxiahci.c,v 1.10 2016/08/15 09:16:26 kettenis Exp $ */
+/* $OpenBSD: sxiahci.c,v 1.11 2016/08/22 11:24:45 kettenis Exp $ */
/*
* Copyright (c) 2013 Patrick Wildt <patrick@blueri.se>
* Copyright (c) 2013,2014 Artturi Alm
@@ -32,9 +32,9 @@
#include <armv7/armv7/armv7var.h>
#include <armv7/sunxi/sunxireg.h>
-#include <armv7/sunxi/sxiccmuvar.h>
#include <dev/ofw/openfirm.h>
+#include <dev/ofw/ofw_clock.h>
#include <dev/ofw/ofw_regulator.h>
#include <dev/ofw/fdt.h>
@@ -111,8 +111,8 @@ sxiahci_attach(struct device *parent, struct device *self, void *aux)
faa->fa_reg[0].size, 0, &sc->sc_ioh))
panic("sxiahci_attach: bus_space_map failed!");
- /* enable clock */
- sxiccmu_enablemodule(CCMU_AHCI);
+ /* enable clocks */
+ clock_enable_all(faa->fa_node);
delay(5000);
/* XXX setup magix */
@@ -195,7 +195,7 @@ clrpwr:
if (target_supply)
regulator_disable(target_supply);
dismod:
- sxiccmu_disablemodule(CCMU_AHCI);
+ clock_disable_all(faa->fa_node);
bus_space_unmap(sc->sc_iot, sc->sc_ioh, sc->sc_ios);
}
@@ -222,7 +222,7 @@ sxiahci_activate(struct device *self, int act)
int
sxiahci_port_start(struct ahci_port *ap, int fre_only)
{
- u_int32_t r;
+ uint32_t r;
/* Setup DMA */
r = ahci_pread(ap, SXIAHCI_PREG_DMA);