Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp5997120rdb; Thu, 14 Dec 2023 05:53:02 -0800 (PST) X-Google-Smtp-Source: AGHT+IEwy5TZSc0nd1cp9PyXiA76UV0gZdNQjOTZp9Wv033lxznsS4LtdzgHJqTdb+J8a5A5dFNI X-Received: by 2002:a17:903:28e:b0:1d3:77a0:c9f9 with SMTP id j14-20020a170903028e00b001d377a0c9f9mr388366plr.78.1702561982362; Thu, 14 Dec 2023 05:53:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702561982; cv=none; d=google.com; s=arc-20160816; b=TakAmv4P4qWHwywHkZHRCzDqiJTpcuVJ/oFQhMbiBdXc2h5pgx1tHc3R6XR7JJaxDK BY1rgnb/h1tkXMiSaftKOtXcEGxv4mVB7K+OjXnfYpYkpt1HXQmMFarwimgpCA+XY/VX 07mHB5OZBH/usC2A2+wAlsMAehJyWHIAhrZwXd2v8eGDBrK50bmTaYzdttNmyuuiIM5Z RABHh6QOs/z5bmva7p7eQt0nwNQLPSkzwI5a+EkU1d0Zpn8J7ppBmaoa4bwGdVunTJck XQ9ALSWf72+ugej4QNQerI1xzgAvJGcqqiTL1VunKE3oIowySHZJdveKw+cfAclqDtE7 RRqA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=ZG094W4dIVF1EKcUo638joyg5PWzf0NNJBExtH6MdeE=; fh=qndxIwPpE8jyiaFeTyjK8TWq/ZvrEgwef27RjTLxVf0=; b=Cl5ZNf4r9WCBV7Vb+ob84r4721qPbGuNOhWNwjfOh+cZf0c50UPxrf4s8NDb2pszeF /kwj6s5nhraEGm59DCWcJusBU57vnS+B0GEyL/woB3pwws5/p3Zrl7Bfd6w8rT4K860k hIsnHDk06wHl75Wxw6mrAah4+IKQL4Qpe68+NGrRtf03PJ0OqCKXs4tslBkfb4okktMo rkLe9lcFqK1QT11h2SdfceTIBVvGuywbbCHFeiB37m1DiE/TbHE3qXrdm7ZuJHhRhnOf +JkCjLh3qFlEkgnul5IOT0blQ7uJRjWZcae6KxZMcUobc7inliVO+JDnZsnClrb+Au/z hR5g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=VdUHvjAY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id s3-20020a170902ea0300b001cc529610e3si11573105plg.342.2023.12.14.05.53.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Dec 2023 05:53:02 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=VdUHvjAY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 966238089E58; Thu, 14 Dec 2023 05:52:59 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1573200AbjLNNwg (ORCPT + 99 others); Thu, 14 Dec 2023 08:52:36 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47128 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1573072AbjLNNwf (ORCPT ); Thu, 14 Dec 2023 08:52:35 -0500 Received: from mail-wr1-x429.google.com (mail-wr1-x429.google.com [IPv6:2a00:1450:4864:20::429]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1EEE1114 for ; Thu, 14 Dec 2023 05:52:41 -0800 (PST) Received: by mail-wr1-x429.google.com with SMTP id ffacd0b85a97d-3364a657564so423497f8f.0 for ; Thu, 14 Dec 2023 05:52:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1702561959; x=1703166759; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=ZG094W4dIVF1EKcUo638joyg5PWzf0NNJBExtH6MdeE=; b=VdUHvjAYm17GgQFNbWiT9C3kGtSC9fO2fbnkgcUk0T5RTlCsREE0jyzWULmLPqhgU+ fh39Hl9h6gPHDiVJamBiga32l69U8+tFnhOyMP8+i6J2BwBpbdUFZpc7Bj8ZhhlqZRAy ktzFT928Kc5GeINswMSOySga6WjiGa8en+pQpY2y7VvfA+ArANGXOQdtDsjHlV6C5xIA ANHp5brvSSFkCEoAWHCKMq0wT2CUbeNOTOFgG1sW8l1tziYGx/O3J5gApIvi6w5gIZqZ +qPWIE8a7xP3EhE9zJYtnUAWJIp8zDkm4q9zA39D2jwtVlgvCIZzdrNBfQMobhPk4spB TQSQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702561959; x=1703166759; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=ZG094W4dIVF1EKcUo638joyg5PWzf0NNJBExtH6MdeE=; b=GaXJMRn728X6Q1VdmQNPIi2BSs6FFVg6F4p3/gH8KVX9AXbkugKgvqIDQnGTtffg93 gPu/C2qvih1vhcd2PTNlMcHgG/aA/iNqnNYqxjO2zrBRa1OjwMzn7HNS4gvAm/7EwLLF sR3Zr9703VyOtuzErh5NqHSZJTJ+6TzNbUunffrV5mplozAPaLL8GjN5KDNnqHWHudv5 ejuM2ak9aOf9LhlmIP2/Qjf5+wOy7C+/FnF1RXp22BCqXvODozPTaqV5tb4tzEH3NNFt Y7CGAwUPe02nedtAYUH2YMuF2eDzXHzd5ZEYiWBxoQi+/Ge2ux/Uus/YsyyPtKHytY+7 Mdzw== X-Gm-Message-State: AOJu0YyXhq9pF47MzJIoC6BtQo6lboTxXVVDhBFuwHEYL2ZWq0fkiWyB pRSmRhAXuLslu5vqFqLhURjXmQ== X-Received: by 2002:a05:600c:4591:b0:40c:325a:545c with SMTP id r17-20020a05600c459100b0040c325a545cmr4356398wmo.221.1702561959544; Thu, 14 Dec 2023 05:52:39 -0800 (PST) Received: from [192.168.2.107] ([79.115.63.202]) by smtp.gmail.com with ESMTPSA id tx17-20020a1709078e9100b00a1b75e0e061sm9483197ejc.130.2023.12.14.05.52.37 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 14 Dec 2023 05:52:38 -0800 (PST) Message-ID: <8808ceeb-35dc-4094-aec4-f43c7acd6174@linaro.org> Date: Thu, 14 Dec 2023 13:52:35 +0000 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 05/13] tty: serial: samsung: add gs101 earlycon support Content-Language: en-US To: Arnd Bergmann , Peter Griffin , Rob Herring , krzysztof.kozlowski+dt@linaro.org, Michael Turquette , Stephen Boyd , Conor Dooley , andi.shyti@kernel.org, Alim Akhtar , Greg Kroah-Hartman , Jiri Slaby , Catalin Marinas , Will Deacon , Sylwester Nawrocki , Tomasz Figa , Chanwoo Choi , Sam Protsenko Cc: =?UTF-8?Q?Andr=C3=A9_Draszik?= , saravanak@google.com, William McVicker , linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-i2c@vger.kernel.org, linux-serial@vger.kernel.org References: <20231214105243.3707730-1-tudor.ambarus@linaro.org> <20231214105243.3707730-6-tudor.ambarus@linaro.org> <1938fcf1-eb5d-4723-a6c6-d2fe2c6dd1c0@app.fastmail.com> From: Tudor Ambarus In-Reply-To: <1938fcf1-eb5d-4723-a6c6-d2fe2c6dd1c0@app.fastmail.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Thu, 14 Dec 2023 05:52:59 -0800 (PST) On 12/14/23 12:01, Arnd Bergmann wrote: Hi, Arnd, Thanks for the review! > On Thu, Dec 14, 2023, at 11:52, Tudor Ambarus wrote: >> +static int __init gs101_early_console_setup(struct earlycon_device *device, >> + const char *opt) >> +{ >> + /* gs101 always expects MMIO32 register accesses. */ >> + device->port.iotype = UPIO_MEM32; >> + >> + return s5pv210_early_console_setup(device, opt); >> +} >> + >> +OF_EARLYCON_DECLARE(gs101, "google,gs101-uart", gs101_early_console_setup); > > It looks like this is already done by of_setup_earlycon() based on > the reg-io-width property. Any idea why it doesn't work with the > normal s5pv210_early_console_setup() function? > It works if in device tree one specifies the reg-io-width property and sets it to 4. If the reg-io-width is not specified, the iotype defaults to UPIO_MEM causing the SError interrupt on gs101 which makes the system unusable. Also, if the earlycon comes specified from the kernel params, the of_setup_earlycon() is no longer called and the earlycon will be set solely based on the kernel params buffer, thus allowing users to crash the kernel on wrong earlycon definitions. If you think the change is fine, I can amend the commit message with the description from above. Cheers, ta