Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 25 May 2017 14:19:20 +0000 (UTC)
From:      Zbigniew Bodek <zbb@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r318875 - in head/sys/arm/mv: . armada38x
Message-ID:  <201705251419.v4PEJKfU048763@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: zbb
Date: Thu May 25 14:19:20 2017
New Revision: 318875
URL: https://svnweb.freebsd.org/changeset/base/318875

Log:
  Enable SCU Speculative linefills to L2 on Armada 38x
  
  Submitted by: Marcin Wojtas <mw@semihalf.com>
  Obtained from: Semihalf
  Sponsored by: Stormshield
  Differential revision: https://reviews.freebsd.org/D10709

Modified:
  head/sys/arm/mv/armada38x/armada38x.c
  head/sys/arm/mv/mvreg.h

Modified: head/sys/arm/mv/armada38x/armada38x.c
==============================================================================
--- head/sys/arm/mv/armada38x/armada38x.c	Thu May 25 14:16:43 2017	(r318874)
+++ head/sys/arm/mv/armada38x/armada38x.c	Thu May 25 14:19:20 2017	(r318875)
@@ -173,9 +173,13 @@ armada38x_scu_enable(void)
 
 	/* Enable SCU */
 	val = bus_space_read_4(fdtbus_bs_tag, vaddr_scu, MV_SCU_REG_CTRL);
-	if (!(val & MV_SCU_ENABLE))
+	if (!(val & MV_SCU_ENABLE)) {
+		/* Enable SCU Speculative linefills to L2 */
+		val |= MV_SCU_SL_L2_ENABLE;
+
 		bus_space_write_4(fdtbus_bs_tag, vaddr_scu, 0,
 		    val | MV_SCU_ENABLE);
+	}
 
 	bus_space_unmap(fdtbus_bs_tag, vaddr_scu, MV_SCU_REGS_LEN);
 	return (0);

Modified: head/sys/arm/mv/mvreg.h
==============================================================================
--- head/sys/arm/mv/mvreg.h	Thu May 25 14:16:43 2017	(r318874)
+++ head/sys/arm/mv/mvreg.h	Thu May 25 14:19:20 2017	(r318875)
@@ -424,7 +424,8 @@
 #define	MV_SCU_REGS_LEN		0x100
 #define	MV_SCU_REG_CTRL		0x00
 #define	MV_SCU_REG_CONFIG	0x04
-#define	MV_SCU_ENABLE		1
+#define	MV_SCU_ENABLE		(1 << 0)
+#define	MV_SCU_SL_L2_ENABLE	(1 << 3)
 #define	SCU_CFG_REG_NCPU_MASK	0x3
 #endif
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201705251419.v4PEJKfU048763>