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: 31621 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pa0-f69.google.com (mail-pa0-f69.google.com [209.85.220.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id A96DB20675 for ; Tue, 10 Jun 2014 10:47:23 +0000 (UTC) Received: by mail-pa0-f69.google.com with SMTP id kq14sf2055814pab.8 for ; Tue, 10 Jun 2014 03:47:22 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:message-id:date:from:user-agent :mime-version:to:cc:subject:references:in-reply-to:sender:precedence :list-id:x-original-sender:x-original-authentication-results :mailing-list:list-post:list-help:list-archive:list-unsubscribe :content-type:content-transfer-encoding; bh=JOQ2jE2TYphCU4B8drtpUiKCBzhBISOtFHnisQgF8CQ=; b=BC9LXYxFsOqxO1HW6zT3MtqhSX4R9BMTCOefKZIiz90Dd/UcY9FtzzUda0nlhKxqkX n4cnTDjRs9ro0NkdUWDuzfhgKcT4YdwsEz49rcqswkr10RJX4y+WraWMo9uf7ZPW1GNF SghhDyza/pRuPDXSpKMhVVzjnHl3XsawCV1+KWU1DQtyT7xmlxE2yzFNEr4s/wEiI6Q9 fQ70DYMd9YhCpk3siH+FpD8CTy22Q0rltzdoUw1bn5/ReiXlwjI8FwUeTSiM25JNCo2V 6DlNp2S0QsgblEsCfy0+Zkt2pHGcZFfGeZMc3njLQH/9riqQrODeRH7X23GcxgTUcF9P sfpA== X-Gm-Message-State: ALoCoQmUuIEMyDw048AMzvichNJN6ssbgKovEjjVPUk3uNpHTgHR5RRK9Xrnm4wRgyXEx5geSbhy X-Received: by 10.68.195.9 with SMTP id ia9mr4531845pbc.7.1402397242789; Tue, 10 Jun 2014 03:47:22 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.83.240 with SMTP id j103ls2068844qgd.47.gmail; Tue, 10 Jun 2014 03:47:22 -0700 (PDT) X-Received: by 10.220.159.4 with SMTP id h4mr31530909vcx.1.1402397242628; Tue, 10 Jun 2014 03:47:22 -0700 (PDT) Received: from mail-vc0-f170.google.com (mail-vc0-f170.google.com [209.85.220.170]) by mx.google.com with ESMTPS id 7si11673851vcu.41.2014.06.10.03.47.22 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 10 Jun 2014 03:47:22 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.170 as permitted sender) client-ip=209.85.220.170; Received: by mail-vc0-f170.google.com with SMTP id hy10so3379417vcb.29 for ; Tue, 10 Jun 2014 03:47:22 -0700 (PDT) X-Received: by 10.221.26.10 with SMTP id rk10mr32067625vcb.0.1402397242533; Tue, 10 Jun 2014 03:47:22 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.221.54.6 with SMTP id vs6csp215261vcb; Tue, 10 Jun 2014 03:47:22 -0700 (PDT) X-Received: by 10.68.197.99 with SMTP id it3mr10697556pbc.37.1402397241565; Tue, 10 Jun 2014 03:47:21 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id gp11si33933176pbd.79.2014.06.10.03.47.20; Tue, 10 Jun 2014 03:47:20 -0700 (PDT) Received-SPF: none (google.com: linux-kernel-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750902AbaFJKrJ (ORCPT + 27 others); Tue, 10 Jun 2014 06:47:09 -0400 Received: from mail-wi0-f182.google.com ([209.85.212.182]:63868 "EHLO mail-wi0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750716AbaFJKrH (ORCPT ); Tue, 10 Jun 2014 06:47:07 -0400 Received: by mail-wi0-f182.google.com with SMTP id r20so5849841wiv.15 for ; Tue, 10 Jun 2014 03:47:06 -0700 (PDT) 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 CC: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org 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> Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: srinivas.kandagatla@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.170 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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"