Module Name:    src
Committed By:   reinoud
Date:           Tue Sep 30 14:24:26 UTC 2014

Modified Files:
        src/sys/arch/evbarm/odroid: odroid_machdep.c

Log Message:
Accept the Odroid specific tweaks for selecting clkout for external USB
devices on the Odroid boards


To generate a diff of this commit:
cvs rdiff -u -r1.38 -r1.39 src/sys/arch/evbarm/odroid/odroid_machdep.c

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/evbarm/odroid/odroid_machdep.c
diff -u src/sys/arch/evbarm/odroid/odroid_machdep.c:1.38 src/sys/arch/evbarm/odroid/odroid_machdep.c:1.39
--- src/sys/arch/evbarm/odroid/odroid_machdep.c:1.38	Fri Sep 26 19:27:05 2014
+++ src/sys/arch/evbarm/odroid/odroid_machdep.c	Tue Sep 30 14:24:26 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: odroid_machdep.c,v 1.38 2014/09/26 19:27:05 reinoud Exp $ */
+/*	$NetBSD: odroid_machdep.c,v 1.39 2014/09/30 14:24:26 reinoud Exp $ */
 
 /*
  * Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: odroid_machdep.c,v 1.38 2014/09/26 19:27:05 reinoud Exp $");
+__KERNEL_RCSID(0, "$NetBSD: odroid_machdep.c,v 1.39 2014/09/30 14:24:26 reinoud Exp $");
 
 #include "opt_evbarm_boardtype.h"
 #include "opt_exynos.h"
@@ -318,7 +318,7 @@ initarm(void *arg)
 			EXYNOS_IOPHYSTOVIRT(armreg_cbar_read());
 
 #ifdef ARM_TRUSTZONE_FIRMWARE
-		exynos_l2cc_init();
+		exynos4_l2cc_init();
 #endif
 		arml2cc_init(&exynos_bs_tag, pl310_bh, 0x2000);
 	}
@@ -887,3 +887,26 @@ odroid_device_register_post_config(devic
 	}
 }
 
+
+/*
+ * Odroid specific tweaks
+ */
+/*
+ * The external USB devices are clocked trough the DEBUG clkout
+ * XXX is this Odroid specific? XXX
+ */
+void
+exynos_init_clkout_for_usb(void)
+{
+#ifdef EXYNOS4
+	/* Select XUSBXTI as source for CLKOUT */
+	bus_space_write_4(&exynos_bs_tag, exynos_pmu_bsh,
+		EXYNOS_PMU_DEBUG_CLKOUT, 0x900);
+#endif
+#ifdef EXYNOS5
+	/* Select XUSBXTI as source for CLKOUT */
+	bus_space_write_4(&exynos_bs_tag, exynos_pmu_bsh,
+		EXYNOS_PMU_DEBUG_CLKOUT, 0x1000);
+#endif
+}
+

Reply via email to