Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754667AbbHJIw5 (ORCPT ); Mon, 10 Aug 2015 04:52:57 -0400 Received: from mail-pa0-f43.google.com ([209.85.220.43]:35109 "EHLO mail-pa0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754082AbbHJIwz (ORCPT ); Mon, 10 Aug 2015 04:52:55 -0400 Date: Mon, 10 Aug 2015 16:52:44 +0800 From: Leo Yan To: Jassi Brar Cc: Rob Herring , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala , Catalin Marinas , Will Deacon , Wei Xu , Bintian Wang , Haojian Zhuang , Devicetree List , Linux Kernel Mailing List , "linux-arm-kernel@lists.infradead.org" , Guodong Xu , Jian Zhang , Zhenwei Wang , Haoju Mo , Dan Zhao , kongfei@hisilicon.com, Guangyue Zeng Subject: Re: [RFC PATCH 0/3] mailbox: hisilicon: add mailbox driver Message-ID: <20150810085244.GA13147@leoy-linaro> References: <1438564390-28111-1-git-send-email-leo.yan@linaro.org> <20150805231743.GB6880@leoy-linaro> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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 Content-Length: 2335 Lines: 55 Hi Jassi, On Mon, Aug 10, 2015 at 12:32:05PM +0530, Jassi Brar wrote: > On Thu, Aug 6, 2015 at 4:47 AM, Leo Yan wrote: > > Hi Jassi, > > > > Thanks for review. > > > > On Wed, Aug 05, 2015 at 04:22:01PM +0530, Jassi Brar wrote: > >> On Mon, Aug 3, 2015 at 6:43 AM, Leo Yan wrote: > > > > [...] > > > >> > For easily extending for Hisilicon series SoCs (SoCs may have difference > >> > for register's definition with each other), so firstly implement common > >> > mailbox driver; this common mailbox driver provides three mainly > >> > functionality: > >> > > >> > - help register channels into framework; > >> > - hook low level callback functions for register's operations; > >> > - Enhance rx channel's message queue, which is based on the code in > >> > drivers/mailbox/omap-mailbox.c. > >> > > >> Not cool. > >> Please don't reinvent the wheel by having platform specific > >> implementation of the mailbox api. Which vendor doesn't plan to roll > >> out new SoCs, and hence variations of mailbox controllers? The OMAP > >> stack predates the common api, and was actually supposed to be > >> converted over eventually. Please implement just the > >> drivers/mailbox/hi6220-mailbox.c (preferably by the name of the > >> mailbox controller, if any) > > > > Understood. Here i have one question, the rx channel's message queue is > > looks like a common mechanism and can be added into framework file > > mailbox.c, then Soc driver file can _ONLY_ focus on register level's > > operations. If so, the common driver in this patch also is unnecessary. > > > Yes, that's what I say, no 'common' driver for a platform. > > > Do you suggest to use upper method to rework patches? Or just think > > it's okay to implement rx channel's message queue in hi6220-mailbox.c? > > > The code in drivers/mailbox/ should only manage the controller > (registers and interrupts). Everything else (queues, shmem etc) should > be in platform specific client driver(s). Thanks for suggestion, will send new version patches for reviewing. Thanks, Leo Yan -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/