From patchwork Tue Jun 10 10:47:00 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 4327831 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 12B40BEEAA for ; Tue, 10 Jun 2014 10:49:32 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 37B7F202A1 for ; Tue, 10 Jun 2014 10:49:31 +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 4185720145 for ; Tue, 10 Jun 2014 10:49:30 +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 1WuJaW-0002RO-8y; Tue, 10 Jun 2014 10:47:32 +0000 Received: from mail-wi0-f172.google.com ([209.85.212.172]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WuJaS-0002NV-Vz for linux-arm-kernel@lists.infradead.org; Tue, 10 Jun 2014 10:47:29 +0000 Received: by mail-wi0-f172.google.com with SMTP id hi2so3656169wib.11 for ; Tue, 10 Jun 2014 03:47:06 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :cc:subject:references:in-reply-to:content-type :content-transfer-encoding; bh=VeKGkkYDXHRfjpnJsP3/JvCF5fMAcl7rvT/YRHXIyM4=; b=M00I+E2Q3Vr6oUuhRDSRpjI/RTtKErT5SeAbcKkMZTwwgDWKCnQcfzyVoXy8LCi70p R8cxJZ+vSGhSwzLMQ5pEnPR2RU0MLio8LwpP+fu6pcXVpeuuM5HUnW0digKzFR0aCJde 5MKoJ4jOTt+yHA+ZHi76rkk3GIYGi1nAHILR9kboLu7gErquilSE610J50Z4wX6xGd2x 73GkY5qdaCK4HQVUm+Wc7Z7/aBKBPx+K9HEaSjuWFdw3fcKQ6Xgzg5Iguz8VH1VIJXdI MooYcnAcGsSWZB2qyHjHZfjfsNDByD1OJ7LJUYIu8cRnlTwtAFUg/wVNFb9aiSTgLlhr QyDw== X-Gm-Message-State: ALoCoQkDO6N3bixJhQSCG12JnOMUjPlkfv2Dg+afkDX6og2ciZ4VfrX/4LgpDwZ5sRA5wvSexvOX X-Received: by 10.180.7.227 with SMTP id m3mr38824273wia.59.1402397226415; Tue, 10 Jun 2014 03:47:06 -0700 (PDT) Received: from [192.168.1.2] (host-78-144-120-232.as13285.net. [78.144.120.232]) by mx.google.com with ESMTPSA id lo18sm20068035wic.1.2014.06.10.03.47.04 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 10 Jun 2014 03:47:05 -0700 (PDT) Message-ID: <5396E224.1070806@linaro.org> Date: Tue, 10 Jun 2014 11:47:00 +0100 From: Srinivas Kandagatla User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0 MIME-Version: 1.0 To: Russell King - ARM Linux Subject: Re: [PATCH] ARM: debug: fix broken DEBUG_LL_INCLUDE for multi platform References: <1402394236-14778-1-git-send-email-srinivas.kandagatla@linaro.org> <20140610101021.GX23430@n2100.arm.linux.org.uk> In-Reply-To: <20140610101021.GX23430@n2100.arm.linux.org.uk> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140610_034729_176065_04242444 X-CRM114-Status: GOOD ( 22.28 ) X-Spam-Score: -0.7 (/) Cc: linux-kernel@vger.kernel.org, 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=-2.5 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable 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 10/06/14 11:10, Russell King - ARM Linux wrote: > On Tue, Jun 10, 2014 at 10:57:16AM +0100, Srinivas Kandagatla wrote: >> On multi_v7_defconfig using def_bool in Kconfig can override the selection >> made as part of DEBUG_LL. This is because def_bool will set the config to true >> if the expression evaluates to true, which is what was happening in >> multi_v7_defconfig. ARCH_SPEAR13XX selects DEBUG_UART_PL01X overiding any >> previous DEBUG_LL selections. >> >> Making the def_bool to bool and depends made sense in this case, and >> fixes the issue too. > > NAK. > > 1. you haven't tested this - if you select DEBUG_BCM2835 in the choice, > it will select DEBUG_UART_PL01X, which, with your patch, will not > have its new dependencies satisfied. I see your point. > > 2. there is nothing to select this debug option on the platforms which > you make it depend upon. > > The real solution here is to convert these (and the other) remaining > platforms to the choice mechanism. Same for the 8250 one. > Yes, I can see the mess here, Choice menu already provides options for selecting pl01x and 8250 via DEBUG_LL_UART_PL01X and DEBUG_LL_UART_8250 options. so I don't see point of having dependencies or def_bool options for PL01X and 8250. Other then getting them selected automatically and overriding DEBUG_LL selections. This new patch removes those dependencies or default selections and forces the platforms to go via choice mechanism. What do you think? Subject: [PATCH v2] ARM: debug: fix broken DEBUG_LL_INCLUDE for multi platform On multi_v7_defconfig using def_bool in Kconfig can override the selection made as part of DEBUG_LL. This is because def_bool will set the config to true if the expression evaluates to true, which is what was happening in multi_v7_defconfig. ARCH_SPEAR13XX selects DEBUG_UART_PL01X overiding any previous DEBUG_LL selections. Making the def_bool to bool made sense in this case, and fixes the issue too. This means that the platforms should go via DEBUG_LL choice mechanism to select PL01X or 8250 debug uart. Signed-off-by: Srinivas Kandagatla --- arch/arm/Kconfig.debug | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug index 40ee328..ce676bb 100644 --- a/arch/arm/Kconfig.debug +++ b/arch/arm/Kconfig.debug @@ -962,22 +962,11 @@ config DEBUG_LL_INCLUDE default "debug/zynq.S" if DEBUG_ZYNQ_UART0 || DEBUG_ZYNQ_UART1 default "mach/debug-macro.S" -# Compatibility options for PL01x config DEBUG_UART_PL01X - def_bool ARCH_EP93XX || \ - ARCH_INTEGRATOR || \ - ARCH_SPEAR3XX || \ - ARCH_SPEAR6XX || \ - ARCH_SPEAR13XX || \ - ARCH_VERSATILE - -# Compatibility options for 8250 + bool + config DEBUG_UART_8250 - def_bool ARCH_DOVE || ARCH_EBSA110 || \ - (FOOTBRIDGE && !DEBUG_DC21285_PORT) || \ - ARCH_GEMINI || ARCH_IOP13XX || ARCH_IOP32X || \ - ARCH_IOP33X || ARCH_IXP4XX || ARCH_KIRKWOOD || \ - ARCH_LPC32XX || ARCH_MV78XX0 || ARCH_ORION5X || ARCH_RPC + bool config DEBUG_UART_PHYS hex "Physical base address of debug UART"