From owner-svn-src-all@FreeBSD.ORG Wed May 14 23:57:09 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 24793EAC; Wed, 14 May 2014 23:57:09 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 108B927E3; Wed, 14 May 2014 23:57:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4ENv8Gt031223; Wed, 14 May 2014 23:57:08 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4ENv8sh031217; Wed, 14 May 2014 23:57:08 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201405142357.s4ENv8sh031217@svn.freebsd.org> From: Ian Lepore Date: Wed, 14 May 2014 23:57:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266098 - stable/10/sys/arm/ti X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 May 2014 23:57:09 -0000 Author: ian Date: Wed May 14 23:57:07 2014 New Revision: 266098 URL: http://svnweb.freebsd.org/changeset/base/266098 Log: MFC r258209, r258210, r261211, Add a driver for the Texas Instruments Mailbox hardware. Add a driver for the TI Programmable Realtime Unit Subsystem. fix args to mtx_init Added: stable/10/sys/arm/ti/ti_mbox.c - copied, changed from r258209, head/sys/arm/ti/ti_mbox.c stable/10/sys/arm/ti/ti_mbox.h - copied unchanged from r258209, head/sys/arm/ti/ti_mbox.h stable/10/sys/arm/ti/ti_pruss.c - copied, changed from r258210, head/sys/arm/ti/ti_pruss.c stable/10/sys/arm/ti/ti_pruss.h - copied unchanged from r258210, head/sys/arm/ti/ti_pruss.h Modified: Directory Properties: stable/10/ (props changed) Copied and modified: stable/10/sys/arm/ti/ti_mbox.c (from r258209, head/sys/arm/ti/ti_mbox.c) ============================================================================== --- head/sys/arm/ti/ti_mbox.c Sat Nov 16 08:20:50 2013 (r258209, copy source) +++ stable/10/sys/arm/ti/ti_mbox.c Wed May 14 23:57:07 2014 (r266098) @@ -140,7 +140,7 @@ ti_mbox_attach(device_t dev) } sc = device_get_softc(dev); rid = 0; - mtx_init(&sc->sc_mtx, "TI mbox", MTX_DEF, 0); + mtx_init(&sc->sc_mtx, "TI mbox", NULL, MTX_DEF); sc->sc_mem_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, RF_ACTIVE); if (sc->sc_mem_res == NULL) { Copied: stable/10/sys/arm/ti/ti_mbox.h (from r258209, head/sys/arm/ti/ti_mbox.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/arm/ti/ti_mbox.h Wed May 14 23:57:07 2014 (r266098, copy of r258209, head/sys/arm/ti/ti_mbox.h) @@ -0,0 +1,44 @@ +/*- + * Copyright (c) 2013 Rui Paulo + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef _TI_MBOX_H_ +#define _TI_MBOX_H_ + +#define TI_MBOX_REVISION 0x00 +#define TI_MBOX_SYSCONFIG 0x10 +#define TI_MBOX_SYSCONFIG_SOFTRST 0x01 +#define TI_MBOX_SYSCONFIG_SMARTIDLE (0x02 << 2) +#define TI_MBOX_MESSAGE(n) (0x40 + (n) * 0x4) +#define TI_MBOX_FIFOSTATUS(n) (0x80 + (n) * 0x4) +#define TI_MBOX_MSGSTATUS(n) (0xc0 + (n) * 0x4) +#define TI_MBOX_IRQSTATUS_RAW(n) (0x100 + (n) * 0x10) +#define TI_MBOX_IRQSTATUS_CLR(n) (0x104 + (n) * 0x10) +#define TI_MBOX_IRQENABLE_SET(n) (0x108 + (n) * 0x10) +#define TI_MBOX_IRQENABLE_CLR(n) (0x10c + (n) * 0x10) + +#endif /* _TI_MBOX_H_ */ Copied and modified: stable/10/sys/arm/ti/ti_pruss.c (from r258210, head/sys/arm/ti/ti_pruss.c) ============================================================================== --- head/sys/arm/ti/ti_pruss.c Sat Nov 16 08:23:15 2013 (r258210, copy source) +++ stable/10/sys/arm/ti/ti_pruss.c Wed May 14 23:57:07 2014 (r266098) @@ -166,7 +166,7 @@ ti_pruss_attach(device_t dev) } sc = device_get_softc(dev); rid = 0; - mtx_init(&sc->sc_mtx, "TI PRUSS", MTX_DEF, 0); + mtx_init(&sc->sc_mtx, "TI PRUSS", NULL, MTX_DEF); sc->sc_mem_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, RF_ACTIVE); if (sc->sc_mem_res == NULL) { Copied: stable/10/sys/arm/ti/ti_pruss.h (from r258210, head/sys/arm/ti/ti_pruss.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/arm/ti/ti_pruss.h Wed May 14 23:57:07 2014 (r266098, copy of r258210, head/sys/arm/ti/ti_pruss.h) @@ -0,0 +1,36 @@ +/*- + * Copyright (c) 2013 Rui Paulo + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * $FreeBSD$ + */ +#ifndef _TI_PRUSS_H_ +#define _TI_PRUSS_H_ + +#define PRUSS_AM18XX_INTC 0x04000 +#define PRUSS_AM18XX_REV 0x4e825900 +#define PRUSS_AM33XX_REV 0x4e82A900 +#define PRUSS_AM33XX_INTC 0x20000 + +#endif /* _TI_PRUSS_H_ */