From patchwork Tue Jul 22 20:02:13 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brian Norris X-Patchwork-Id: 4605421 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 642B8C0514 for ; Tue, 22 Jul 2014 20:05:04 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 745BE20155 for ; Tue, 22 Jul 2014 20:05:03 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 80F86200D0 for ; Tue, 22 Jul 2014 20:05:02 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1X9gGn-0006UO-11; Tue, 22 Jul 2014 20:02:41 +0000 Received: from mail-pa0-x230.google.com ([2607:f8b0:400e:c03::230]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1X9gGk-0006Nb-7B for linux-arm-kernel@lists.infradead.org; Tue, 22 Jul 2014 20:02:38 +0000 Received: by mail-pa0-f48.google.com with SMTP id et14so196345pad.7 for ; Tue, 22 Jul 2014 13:02:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=R+2XoprANGcAmavsDRjdxr9T6nUBkSuNFNXeHWY2Eb4=; b=tUr7/J/YzEeI3UdVemTnisOey1db7ut7bGWdsOSa2yP3g8eNR9Bu8GWu7sqKXmCJGZ 1apO+KIdKaYA+m8d/7cFwNtf26+6eKIJgkq0bIiW5r9da+y0SyKHVF9LzSKYQxE00TpV lCMR2iJEyKoPkwhqoATH5Ep6sRKNCl9MjZBj/Mu00UoLb2gikn9Ozm6TCF6QaOzTt9dz BdzVaOi5//mMm4NvBHIQqG6PMHD3XVISG29/hVtnwdYxUOmyrez6oFvPVN7zx4/lj36K 3VOKDSaRG1sePvUBBVFtbLGJwIhewl+tjNRIAMj7jBQdELc7UFMdZb4QWJnsEQhbY5v4 O+1A== X-Received: by 10.66.174.17 with SMTP id bo17mr21611669pac.98.1406059336895; Tue, 22 Jul 2014 13:02:16 -0700 (PDT) Received: from ld-irv-0074 (5520-maca-inet1-outside.broadcom.com. [216.31.211.11]) by mx.google.com with ESMTPSA id pu10sm52458pbc.46.2014.07.22.13.02.15 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 22 Jul 2014 13:02:16 -0700 (PDT) Date: Tue, 22 Jul 2014 13:02:13 -0700 From: Brian Norris To: Arnd Bergmann Subject: Re: [PATCH v8 02/11] power: reset: Add reboot driver for brcmstb Message-ID: <20140722200213.GF28323@ld-irv-0074> References: <1405976886-27807-1-git-send-email-computersforpeace@gmail.com> <1405976886-27807-3-git-send-email-computersforpeace@gmail.com> <62122849.RXJHvac7Iy@wuerfel> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <62122849.RXJHvac7Iy@wuerfel> User-Agent: Mutt/1.5.21 (2010-09-15) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140722_130238_277654_B202B42C X-CRM114-Status: GOOD ( 22.44 ) X-Spam-Score: -0.8 (/) Cc: devicetree@vger.kernel.org, Florian Fainelli , Russell King , Dmitry Eremin-Solenikov , Christian Daudt , Linux Kernel , Matt Porter , Marc Carino , Gregory Fong , Olof Johansson , David Woodhouse , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=no version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On Tue, Jul 22, 2014 at 09:28:39AM +0200, Arnd Bergmann wrote: > On Monday 21 July 2014 14:07:57 Brian Norris wrote: > > diff --git a/arch/arm/mach-bcm/Kconfig b/arch/arm/mach-bcm/Kconfig > > index 0073633e7699..9782e8d80647 100644 > > --- a/arch/arm/mach-bcm/Kconfig > > +++ b/arch/arm/mach-bcm/Kconfig > > @@ -94,6 +94,7 @@ config ARCH_BRCMSTB > > select MIGHT_HAVE_PCI > > select HAVE_SMP > > select HAVE_ARM_ARCH_TIMER > > + select POWER_RESET_BRCMSTB > > help > > Say Y if you intend to run the kernel on a Broadcom ARM-based STB > > chipset. > > diff --git a/drivers/power/reset/Kconfig b/drivers/power/reset/Kconfig > > index bdcf5173e377..fcb9825debe5 100644 > > --- a/drivers/power/reset/Kconfig > > +++ b/drivers/power/reset/Kconfig > > @@ -20,6 +20,16 @@ config POWER_RESET_AXXIA > > > > Say Y if you have an Axxia family SoC. > > > > +config POWER_RESET_BRCMSTB > > + bool "Broadcom STB reset driver" > > + depends on POWER_RESET && ARCH_BRCMSTB > > + help > > + This driver provides restart support for ARM-based Broadcom STB > > + boards. > > + > > + Say Y here if you have an ARM-based Broadcom STB board and you wish > > + to have restart support. > > + > > config POWER_RESET_GPIO > > bool "GPIO power-off driver" > > depends on OF_GPIO && POWER_RESET > > > > (nitpicking) > > You shouldn't have both a user-selectable option and 'select' it from > the platform, because it makes it inherently not selectable, in particular > in the combination with 'depends on ARCH_BRCMSTB'. OK, thanks for the comment. Note that there is some precedent for this bad Kconfig behavior in the same subsystem (POWER_RESET_GPIO and POWER_RESET_VEXPRESS are both 'select'ed in arch/arm/mach-*/Kconfig). [...] > My preference in this case however would be to just drop the 'select' > statement and add the driver to the defconfig file. How about a third option, where we drop the 'select' statement and set POWER_RESET_BRCMSTB to be 'default y'? Then we don't have to modify the defconfig, and it gives the added bonus of choosing a sane default even if you're not based on the multi_v7_defconfig. i.e.: Brian diff --git a/arch/arm/mach-bcm/Kconfig b/arch/arm/mach-bcm/Kconfig index 58c01aed9752..634de7b7fd28 100644 --- a/arch/arm/mach-bcm/Kconfig +++ b/arch/arm/mach-bcm/Kconfig @@ -94,7 +94,6 @@ config ARCH_BRCMSTB select MIGHT_HAVE_PCI select HAVE_SMP select HAVE_ARM_ARCH_TIMER - select POWER_RESET_BRCMSTB select BRCMSTB_GISB_ARB select BRCMSTB_L2_IRQ help diff --git a/drivers/power/reset/Kconfig b/drivers/power/reset/Kconfig index fcb9825debe5..ab5d57e2766d 100644 --- a/drivers/power/reset/Kconfig +++ b/drivers/power/reset/Kconfig @@ -23,6 +23,7 @@ config POWER_RESET_AXXIA config POWER_RESET_BRCMSTB bool "Broadcom STB reset driver" depends on POWER_RESET && ARCH_BRCMSTB + default y help This driver provides restart support for ARM-based Broadcom STB boards.