From owner-svn-src-projects@FreeBSD.ORG Mon Apr 2 22:25:27 2012 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5CAE7106566B; Mon, 2 Apr 2012 22:25:27 +0000 (UTC) (envelope-from dmarion@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 481278FC1F; Mon, 2 Apr 2012 22:25:27 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q32MPRj8019432; Mon, 2 Apr 2012 22:25:27 GMT (envelope-from dmarion@svn.freebsd.org) Received: (from dmarion@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q32MPRdW019429; Mon, 2 Apr 2012 22:25:27 GMT (envelope-from dmarion@svn.freebsd.org) Message-Id: <201204022225.q32MPRdW019429@svn.freebsd.org> From: Damjan Marion Date: Mon, 2 Apr 2012 22:25:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r233819 - projects/armv6/sys/arm/ti X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Apr 2012 22:25:27 -0000 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_ */