Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 2 Apr 2012 22:25:27 +0000 (UTC)
From:      Damjan Marion <dmarion@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-projects@freebsd.org
Subject:   svn commit: r233819 - projects/armv6/sys/arm/ti
Message-ID:  <201204022225.q32MPRdW019429@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: dmarion
Date: Mon Apr  2 22:25:26 2012
New Revision: 233819
URL: http://svn.freebsd.org/changeset/base/233819

Log:
  Add ti_scm_reg_write_4, so other drivers
  can write control registers.

Modified:
  projects/armv6/sys/arm/ti/ti_scm.c
  projects/armv6/sys/arm/ti/ti_scm.h

Modified: projects/armv6/sys/arm/ti/ti_scm.c
==============================================================================
--- projects/armv6/sys/arm/ti/ti_scm.c	Mon Apr  2 21:59:40 2012	(r233818)
+++ projects/armv6/sys/arm/ti/ti_scm.c	Mon Apr  2 22:25:26 2012	(r233819)
@@ -465,6 +465,17 @@ ti_scm_reg_read_4(uint32_t reg, uint32_t
 	return (0);
 }
 
+int
+ti_scm_reg_write_4(uint32_t reg, uint32_t val)
+{
+	if (!ti_scm_sc)
+		return (ENXIO);
+
+	ti_scm_write_4(ti_scm_sc, reg, val);
+	return (0);
+}
+
+
 static device_method_t ti_scm_methods[] = {
 	DEVMETHOD(device_probe,		ti_scm_probe),
 	DEVMETHOD(device_attach,	ti_scm_attach),

Modified: projects/armv6/sys/arm/ti/ti_scm.h
==============================================================================
--- projects/armv6/sys/arm/ti/ti_scm.h	Mon Apr  2 21:59:40 2012	(r233818)
+++ projects/armv6/sys/arm/ti/ti_scm.h	Mon Apr  2 22:25:26 2012	(r233819)
@@ -77,5 +77,6 @@ int ti_scm_padconf_get_gpiomode(uint32_t
 int ti_scm_padconf_set_gpioflags(uint32_t gpio, uint32_t flags);
 void ti_scm_padconf_get_gpioflags(uint32_t gpio, uint32_t *flags);
 int ti_scm_reg_read_4(uint32_t reg, uint32_t *val);
+int ti_scm_reg_write_4(uint32_t reg, uint32_t val);
 
 #endif /* _TI_SCM_H_ */



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