Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/arm/omap Enable sata port



details:   https://anonhg.NetBSD.org/src/rev/3ec29069199a
branches:  trunk
changeset: 795190:3ec29069199a
user:      matt <matt%NetBSD.org@localhost>
date:      Thu Apr 03 17:12:15 2014 +0000

description:
Enable sata port

diffstat:

 sys/arch/arm/omap/omap5_ahcisata.c |  19 +++++++++++++++++--
 1 files changed, 17 insertions(+), 2 deletions(-)

diffs (40 lines):

diff -r ff3ad2061c69 -r 3ec29069199a sys/arch/arm/omap/omap5_ahcisata.c
--- a/sys/arch/arm/omap/omap5_ahcisata.c        Thu Apr 03 17:11:35 2014 +0000
+++ b/sys/arch/arm/omap/omap5_ahcisata.c        Thu Apr 03 17:12:15 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: omap5_ahcisata.c,v 1.1 2013/06/15 21:55:09 matt Exp $ */
+/* $NetBSD: omap5_ahcisata.c,v 1.2 2014/04/03 17:12:15 matt Exp $ */
 
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: omap5_ahcisata.c,v 1.1 2013/06/15 21:55:09 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: omap5_ahcisata.c,v 1.2 2014/04/03 17:12:15 matt Exp $");
 
 #include "locators.h"
 
@@ -83,6 +83,21 @@
        aprint_naive("\n");
        aprint_normal(": OMAP AHCI controller\n");
 
+#ifdef OMAP5
+       {
+               bus_space_handle_t ioh;
+               rv = bus_space_map(obio->obio_iot,
+                   OMAP5_CM_L3INIT_SATA_CLKCTRL, 4, 0, &ioh);
+               KASSERT(rv == 0);
+               uint32_t v = bus_space_read_4(obio->obio_iot, ioh, 0);
+               v &= ~OMAP5_CM_L3INIT_MODE;
+               v |= OMAP5_CM_L3INIT_ENABLE;
+               bus_space_write_4(obio->obio_iot, ioh, 0, v);
+               bus_space_unmap(obio->obio_iot, ioh, 4);
+       }
+#endif
+
+       sc->sc_ahci_ports = 1;
        sc->sc_dmat = obio->obio_dmat;
        sc->sc_ahcit = obio->obio_iot;
        sc->sc_ahcis = obio->obio_size;



Home | Main Index | Thread Index | Old Index