From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933330AbcETJKg (ORCPT ); Fri, 20 May 2016 05:10:36 -0400 Received: from mail-wm0-f46.google.com ([74.125.82.46]:37210 "EHLO mail-wm0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755016AbcETJKe (ORCPT ); Fri, 20 May 2016 05:10:34 -0400 Subject: Re: [PATCH 1/3] reset: Add support for the Amlogic Meson GXBB Reset Controller To: Carlo Caione References: <1463732875-23141-1-git-send-email-narmstrong@baylibre.com> <1463732875-23141-2-git-send-email-narmstrong@baylibre.com> <20160520090448.GA19888@mephisto> Cc: linux-kernel@vger.kernel.org, p.zabel@pengutronix.de, linux-arm-kernel@lists.infradead.org, linux-amlogic@lists.infradead.org, jerry.cao@amlogic.com, xing.xu@amlogic.com, victor.wan@amlogic.com From: Neil Armstrong Organization: Baylibre Message-ID: <573ED483.10101@baylibre.com> Date: Fri, 20 May 2016 11:10:27 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 MIME-Version: 1.0 In-Reply-To: <20160520090448.GA19888@mephisto> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 05/20/2016 11:04 AM, Carlo Caione wrote: > On 20/05/16 10:27, Neil Armstrong wrote: >> This patch adds the platform driver for the Amlogic Meson GXBB Reset >> Controller. >> >> Signed-off-by: Neil Armstrong >> --- >> drivers/reset/Kconfig | 6 ++ >> drivers/reset/Makefile | 1 + >> drivers/reset/reset-meson-gxbb.c | 129 +++++++++++++++++++++++++++++++++++++++ >> 3 files changed, 136 insertions(+) >> create mode 100644 drivers/reset/reset-meson-gxbb.c > > Do we really need to be that specific (-gxbb)? This driver looks generic > and simple enough to be used for several Amlogic families. You are > already differentiating between them with the include file defining the > reset indexes for the SoC. This is a good question, do the S805 have similar registers ? Same count and width ? I no, it should need a rework to add a data structure per-SoC. > >> diff --git a/drivers/reset/Kconfig b/drivers/reset/Kconfig >> index df37212..4ac5c4d 100644 >> --- a/drivers/reset/Kconfig >> +++ b/drivers/reset/Kconfig >> @@ -12,5 +12,11 @@ menuconfig RESET_CONTROLLER >> >> If unsure, say no. >> >> +config MESON_GXBB_RESET >> + tristate "Amlogic Meson GXBB Reset Driver" >> + depends on (ARCH_MESON && RESET_CONTROLLER) >> + help >> + Build the Amlogic Meson GxBB reset driver. >> + >> source "drivers/reset/sti/Kconfig" >> source "drivers/reset/hisilicon/Kconfig" >> diff --git a/drivers/reset/Makefile b/drivers/reset/Makefile >> index a1fc8ed..5ff83a1 100644 >> --- a/drivers/reset/Makefile >> +++ b/drivers/reset/Makefile >> @@ -3,6 +3,7 @@ obj-$(CONFIG_ARCH_LPC18XX) += reset-lpc18xx.o >> obj-$(CONFIG_ARCH_SOCFPGA) += reset-socfpga.o >> obj-$(CONFIG_ARCH_BERLIN) += reset-berlin.o >> obj-$(CONFIG_MACH_PISTACHIO) += reset-pistachio.o >> +obj-$(CONFIG_MESON_GXBB_RESET) += reset-meson-gxbb.o > > obj-$(CONFIG_ARCH_MESON) ? > > [...] >> +static const struct reset_control_ops meson_gxbb_reset_ops = { >> + .reset = meson_gxbb_reset_reset, >> +}; > > nit: unfortunate name :) > > Any reason to not have also .assert / .deassert? The registers seems write-only and does no retain the bit written, assert and deassert makes no sense in this case. > > [...] >> +static struct platform_driver meson_gxbb_reset_driver = { >> + .probe = meson_gxbb_reset_probe, >> + .remove = meson_gxbb_reset_remove, >> + .driver = { >> + .name = "meson_gxbb_reset", >> + .of_match_table = meson_gxbb_reset_dt_ids, >> + }, >> +}; >> + >> +module_platform_driver(meson_gxbb_reset_driver); > > No MODULE_AUTHOR, MODULE_LICENSE, etc... ? What is the MODULE_LICENCE format for dual licensing ? Thanks, Neil