From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752199AbcGOBkF (ORCPT ); Thu, 14 Jul 2016 21:40:05 -0400 Received: from mailgw01.mediatek.com ([210.61.82.183]:64716 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1751287AbcGOBkC (ORCPT ); Thu, 14 Jul 2016 21:40:02 -0400 Message-ID: <1468546795.31101.2.camel@mtksdaap41> Subject: Re: [PATCH v10 2/4] CMDQ: Mediatek CMDQ driver From: Horng-Shyang Liao To: Paul Gortmaker CC: Rob Herring , Matthias Brugger , Daniel Kurtz , "Sascha Hauer" , , LKML , "linux-arm-kernel@lists.infradead.org" , , , Sascha Hauer , "Philipp Zabel" , Nicolas Boichat , "CK HU" , cawa cheng , Bibby Hsieh , YT Shen , Daoyuan Huang , Damon Chu , "Josh-YC Liu" , Glory Hung , Jiaguang Zhang , Dennis-YC Hsieh , Monica Wang , Date: Fri, 15 Jul 2016 09:39:55 +0800 In-Reply-To: References: <1468495733-12178-1-git-send-email-hs.liao@mediatek.com> <1468495733-12178-3-git-send-email-hs.liao@mediatek.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.2.3-0ubuntu6 Content-Transfer-Encoding: 7bit MIME-Version: 1.0 X-MTK: N Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Paul, On Thu, 2016-07-14 at 19:38 -0400, Paul Gortmaker wrote: > On Thu, Jul 14, 2016 at 7:28 AM, HS Liao wrote: > > This patch is first version of Mediatek Command Queue(CMDQ) driver. The > > CMDQ is used to help write registers with critical time limitation, > > such as updating display configuration during the vblank. It controls > > Global Command Engine (GCE) hardware to achieve this requirement. > > Currently, CMDQ only supports display related hardwares, but we expect > > it can be extended to other hardwares for future requirements. > > > > Signed-off-by: HS Liao > > Signed-off-by: CK Hu > > --- > > drivers/soc/mediatek/Kconfig | 11 + > > drivers/soc/mediatek/Makefile | 1 + > > drivers/soc/mediatek/mtk-cmdq.c | 948 ++++++++++++++++++++++++++++++++++++++++ > > include/soc/mediatek/cmdq.h | 179 ++++++++ > > 4 files changed, 1139 insertions(+) > > create mode 100644 drivers/soc/mediatek/mtk-cmdq.c > > create mode 100644 include/soc/mediatek/cmdq.h > > > > diff --git a/drivers/soc/mediatek/Kconfig b/drivers/soc/mediatek/Kconfig > > index 0a4ea80..50869e4 100644 > > --- a/drivers/soc/mediatek/Kconfig > > +++ b/drivers/soc/mediatek/Kconfig > > @@ -1,6 +1,17 @@ > > # > > # MediaTek SoC drivers > > # > > +config MTK_CMDQ > > + bool "MediaTek CMDQ Support" > > + depends on ARM64 && ( ARCH_MEDIATEK || COMPILE_TEST ) > > + select MAILBOX > > + select MTK_INFRACFG > > + help > > + Say yes here to add support for the MediaTek Command Queue (CMDQ) > > + driver. The CMDQ is used to help read/write registers with critical > > + time limitation, such as updating display configuration during the > > + vblank. > > + > > config MTK_INFRACFG > > bool "MediaTek INFRACFG Support" > > depends on ARCH_MEDIATEK || COMPILE_TEST > > diff --git a/drivers/soc/mediatek/Makefile b/drivers/soc/mediatek/Makefile > > index 12998b0..f7397ef 100644 > > --- a/drivers/soc/mediatek/Makefile > > +++ b/drivers/soc/mediatek/Makefile > > @@ -1,3 +1,4 @@ > > +obj-$(CONFIG_MTK_CMDQ) += mtk-cmdq.o > > obj-$(CONFIG_MTK_INFRACFG) += mtk-infracfg.o > > obj-$(CONFIG_MTK_PMIC_WRAP) += mtk-pmic-wrap.o > > obj-$(CONFIG_MTK_SCPSYS) += mtk-scpsys.o > > diff --git a/drivers/soc/mediatek/mtk-cmdq.c b/drivers/soc/mediatek/mtk-cmdq.c > > new file mode 100644 > > index 0000000..d032603 > > --- /dev/null > > +++ b/drivers/soc/mediatek/mtk-cmdq.c > > @@ -0,0 +1,948 @@ > > +/* > > + * Copyright (c) 2015 MediaTek Inc. > > + * > > + * This program is free software; you can redistribute it and/or modify > > + * it under the terms of the GNU General Public License version 2 as > > + * published by the Free Software Foundation. > > + * > > + * This program is distributed in the hope that it will be useful, > > + * but WITHOUT ANY WARRANTY; without even the implied warranty of > > + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > > + * GNU General Public License for more details. > > + */ > > + > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > Please don't use module.h and MODULE_* stuff in a driver that has > a bool Kconfig. Either make it tristate if that has a sensible use case > or get rid of the modular stuff. Will remove it. > Thanks, > Paul. > -- Thanks, HS