From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751901AbbJBJcI (ORCPT ); Fri, 2 Oct 2015 05:32:08 -0400 Received: from mail-wi0-f170.google.com ([209.85.212.170]:34586 "EHLO mail-wi0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751100AbbJBJcF (ORCPT ); Fri, 2 Oct 2015 05:32:05 -0400 Date: Fri, 2 Oct 2015 10:32:01 +0100 From: Lee Jones To: Jassi Brar Cc: "linux-arm-kernel@lists.infradead.org" , Linux Kernel Mailing List , kernel@stlinux.com, Devicetree List Subject: Re: [PATCH v3 2/5] mailbox: Add support for ST's Mailbox IP Message-ID: <20151002093201.GA23213@x1> References: <1439994175-13360-1-git-send-email-lee.jones@linaro.org> <1439994175-13360-3-git-send-email-lee.jones@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 02 Oct 2015, Jassi Brar wrote: > On Wed, Aug 19, 2015 at 7:52 PM, Lee Jones wrote: > > .... > > > + > > +#define MBOX_BASE(mdev, inst) ((mdev)->base + (inst * 4)) > > > It should be (inst) * 4 I'm guessing you mean: ((mdev)->base + ((inst) * 4)) ? > > +/** > > + * STi Mailbox device data > > + * > > + * An IP Mailbox is currently composed of 4 instances > > + * Each instance is currently composed of 32 channels > > + * This means that we have 128 channels per Mailbox > > + * A channel an be used for TX or RX > > + * > > + * @dev: Device to which it is attached > > + * @mbox: Representation of a communication channel controller > > + * @base: Base address of the register mapping region > > + * @name: Name of the mailbox > > + * @enabled: Local copy of enabled channels > > + * @lock: Mutex protecting enabled status > > + */ > > +struct sti_mbox_device { > > + struct device *dev; > > + struct mbox_controller *mbox; > > + void __iomem *base; > > + const char *name; > > + u32 enabled[STI_MBOX_INST_MAX]; > > + spinlock_t lock; > > + bool txonly; > > > txonly is never used after being initialized from DT :) which is a > good sign. So maybe just drop it and the optional property 'tx-only'. Okay. -- Lee Jones Linaro STMicroelectronics Landing Team Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog