Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/arm/allwinner Move awin_ahci_set_clear to awin_var....



details:   https://anonhg.NetBSD.org/src/rev/967991f74022
branches:  trunk
changeset: 789760:967991f74022
user:      matt <matt%NetBSD.org@localhost>
date:      Sat Sep 07 02:10:02 2013 +0000

description:
Move awin_ahci_set_clear to awin_var.h and rename to awin_reg_set_clear.

diffstat:

 sys/arch/arm/allwinner/awin_ahcisata.c |  15 ++-------------
 sys/arch/arm/allwinner/awin_var.h      |  13 ++++++++++++-
 2 files changed, 14 insertions(+), 14 deletions(-)

diffs (64 lines):

diff -r cf78ac4290ba -r 967991f74022 sys/arch/arm/allwinner/awin_ahcisata.c
--- a/sys/arch/arm/allwinner/awin_ahcisata.c    Sat Sep 07 02:09:23 2013 +0000
+++ b/sys/arch/arm/allwinner/awin_ahcisata.c    Sat Sep 07 02:10:02 2013 +0000
@@ -31,7 +31,7 @@
 
 #include <sys/cdefs.h>
 
-__KERNEL_RCSID(1, "$NetBSD: awin_ahcisata.c,v 1.3 2013/09/07 00:35:52 matt Exp $");
+__KERNEL_RCSID(1, "$NetBSD: awin_ahcisata.c,v 1.4 2013/09/07 02:10:02 matt Exp $");
 
 #include <sys/param.h>
 #include <sys/bus.h>
@@ -72,17 +72,6 @@
        return 1;
 }
 
-static void inline
-awin_ahci_set_clear(bus_space_tag_t bst, bus_space_handle_t bsh,
-    bus_size_t o, uint32_t set_mask, uint32_t clr_mask)
-{
-       const uint32_t old = bus_space_read_4(bst, bsh, o);
-       const uint32_t new = set_mask | (old & ~clr_mask);
-       if (old != new) {
-               bus_space_write_4(bst, bsh, o, new);
-       }
-}
-
 static void
 awin_ahci_enable(bus_space_tag_t bst, bus_space_handle_t bsh)
 {
@@ -94,7 +83,7 @@
        /*
         * Make sure it's enabled for the AHB.
         */
-       awin_ahci_set_clear(bst, bsh, AWIN_AHB_GATING0_REG,
+       awin_reg_set_clear(bst, bsh, AWIN_AHB_GATING0_REG,
            AWIN_AHB_GATING0_SATA, 0);
        delay(10000);
 
diff -r cf78ac4290ba -r 967991f74022 sys/arch/arm/allwinner/awin_var.h
--- a/sys/arch/arm/allwinner/awin_var.h Sat Sep 07 02:09:23 2013 +0000
+++ b/sys/arch/arm/allwinner/awin_var.h Sat Sep 07 02:10:02 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: awin_var.h,v 1.4 2013/09/07 00:35:52 matt Exp $ */
+/* $NetBSD: awin_var.h,v 1.5 2013/09/07 02:10:02 matt Exp $ */
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -79,4 +79,15 @@
 
 void   awin_wdog_reset(void);
 
+static void inline
+awin_reg_set_clear(bus_space_tag_t bst, bus_space_handle_t bsh,
+    bus_size_t o, uint32_t set_mask, uint32_t clr_mask)
+{
+       const uint32_t old = bus_space_read_4(bst, bsh, o);
+       const uint32_t new = set_mask | (old & ~clr_mask);
+       if (old != new) {
+               bus_space_write_4(bst, bsh, o, new);
+       }
+}
+
 #endif /* _ARM_ALLWINNER_AWIN_VAR_H_ */



Home | Main Index | Thread Index | Old Index