Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp3781926ybl; Mon, 12 Aug 2019 06:20:52 -0700 (PDT) X-Google-Smtp-Source: APXvYqzLEVre4Pm688KBJYrf5IZXUxUww+EgQj20sorEpm9CJ8xzTSRixbPCEmO5HkWZJwj9ocHp X-Received: by 2002:aa7:93cf:: with SMTP id y15mr1005131pff.251.1565616052369; Mon, 12 Aug 2019 06:20:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565616052; cv=none; d=google.com; s=arc-20160816; b=xARIWd/qIpaKYuj0niGTzLF9vqt6VOhMEeyqremMO1l8hRX7UUXmXHHDHNlMiGi5VY cMk95Zs8MPigErzQG4I5UgId+rt1wn9ITxMbXjbBU7TAITso6R3/95HRHxhaXPy3Bw9S QnpB/7UufMGw9W4QGaff1NU16tUXoBvZzchY4VU2+gx7z+NvILIZQJqKuYiAGZjQnDz/ kc8Lkm+TmSIDEZF6A+u/aotFEOvXELNCRJWA+mk2BQNn+u56GCPZxXSxtho5wmoTK2ZY xu8DNB0Fi2CWhG9lpP057NZnH+ZeD3sLZXXKoiIS2ZDVGlGUhNFT98iCuFGDCn4cMDg8 smhQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=HNEbzs/HL8CTvhT7rsJD9+hSXjyCG3yPBjGPE6dVGcE=; b=SkoEcyUbufGJTOnsjrMI0qZCLiF66K/tQPq5RMGukYXkOlBEjrOLHVLoRTaKQAcPPU C59/ielPhciFW8yVFlnWfUaHZwfBT52XXvHU7cj3yM3XvPMdwQZ39UCV07ZG1wa1o2S6 9Op7wzdcZhNhKJyawLoecewYmkshgbtlk9aoeCxU81igNA+t3r5c4UITF2TCCo+djT+n d7RCMK0pUQ/H+N3+jjd4uwe46V/A5w21+TxNoKZZkbx7J+Igd2dppssa5LZf9/dHsrO6 OsTFN6b1HmtHw06jU5qEaG7FFHCl4QoB58ySHNteWMPfnEY+PuxTOePVDdzTF/WIJGqL e1/A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=YhLcJikB; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l2si12074214pjw.0.2019.08.12.06.20.35; Mon, 12 Aug 2019 06:20:52 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=YhLcJikB; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728826AbfHLNT5 (ORCPT + 99 others); Mon, 12 Aug 2019 09:19:57 -0400 Received: from mail.kernel.org ([198.145.29.99]:55624 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726502AbfHLNT5 (ORCPT ); Mon, 12 Aug 2019 09:19:57 -0400 Received: from X250 (37.80-203-192.nextgentel.com [80.203.192.37]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 2120320684; Mon, 12 Aug 2019 13:19:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1565615996; bh=pVSfYIlzn3yG2Vhxq1/FZ/qGcjO5DT4ZLCyifUSAIvc=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=YhLcJikBIG9LKg9xa66AKfYk2OmZ4MBG46Dv9DR4sJmgPNTZn5XXVMlqTVTpoK7s8 jhBn2d0DndTJMzExTIACSpx93BWVtkd31c1JIj/cQ3LwGk97Pga9h0xW+aRenUglLt 0pCsaSolP6RkIkumevR6zoJbpI9gCIEhKXG8JW/k= Date: Mon, 12 Aug 2019 15:19:45 +0200 From: Shawn Guo To: Daniel Baluta Cc: s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, aisheng.dong@nxp.com, anson.huang@nxp.com, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, gregkh@linuxfoundation.org, tglx@linutronix.de, o.rempel@pengutronix.de Subject: Re: [PATCH v4] firmware: imx: Add DSP IPC protocol interface Message-ID: <20190812131944.GE27041@X250> References: <20190801095636.22944-1-daniel.baluta@nxp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190801095636.22944-1-daniel.baluta@nxp.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Aug 01, 2019 at 12:56:36PM +0300, Daniel Baluta wrote: > Some of i.MX8 processors (e.g i.MX8QM, i.MX8QXP) contain > the Tensilica HiFi4 DSP for advanced pre- and post-audio > processing. > > The communication between Host CPU and DSP firmware is > taking place using a shared memory area for message passing > and a dedicated Messaging Unit for notifications. > > DSP IPC protocol offers a doorbell interface using > imx-mailbox API. > > We use 4 MU channels (2 x TXDB, 2 x RXDB) to implement a > request-reply protocol. > > Connection 0 (txdb0, rxdb0): > - Host writes messasge to shared memory [SHMEM] > - Host sends a request [MU] > - DSP handles request [SHMEM] > - DSP sends reply [MU] > > Connection 1 (txdb1, rxdb1): > - DSP writes a message to shared memory [SHMEM] > - DSP sends a request [MU] > - Host handles request [SHMEM] > - Host sends reply [MU] > > The protocol interface will be used by a Host client to > communicate with the DSP. First client will be the i.MX8 > part from Sound Open Firmware infrastructure. > > The protocol offers the following interface: > > On Tx: > - imx_dsp_ring_doorbell, will be called to notify the DSP > that it needs to handle a request. > > On Rx: > - clients need to provide two callbacks: > .handle_reply > .handle_request > - the callbacks will be used by the protocol on > notification arrival from DSP. > > Signed-off-by: Daniel Baluta Applied, thanks.