Module Name:    src
Committed By:   matt
Date:           Sat Sep  7 02:10:02 UTC 2013

Modified Files:
        src/sys/arch/arm/allwinner: awin_ahcisata.c awin_var.h

Log Message:
Move awin_ahci_set_clear to awin_var.h and rename to awin_reg_set_clear.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/arm/allwinner/awin_ahcisata.c
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/arm/allwinner/awin_var.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/arm/allwinner/awin_ahcisata.c
diff -u src/sys/arch/arm/allwinner/awin_ahcisata.c:1.3 src/sys/arch/arm/allwinner/awin_ahcisata.c:1.4
--- src/sys/arch/arm/allwinner/awin_ahcisata.c:1.3	Sat Sep  7 00:35:52 2013
+++ src/sys/arch/arm/allwinner/awin_ahcisata.c	Sat Sep  7 02:10:02 2013
@@ -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 @@ awin_ahci_match(device_t parent, cfdata_
 	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 @@ awin_ahci_enable(bus_space_tag_t bst, bu
 	/*
 	 * 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);
 

Index: src/sys/arch/arm/allwinner/awin_var.h
diff -u src/sys/arch/arm/allwinner/awin_var.h:1.4 src/sys/arch/arm/allwinner/awin_var.h:1.5
--- src/sys/arch/arm/allwinner/awin_var.h:1.4	Sat Sep  7 00:35:52 2013
+++ src/sys/arch/arm/allwinner/awin_var.h	Sat Sep  7 02:10:02 2013
@@ -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_gpio_pinset_release(const stru
 
 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_ */

Reply via email to