From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 24A8AC35274 for ; Thu, 21 Dec 2023 07:41:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:From:References:Cc:To: Subject:MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=VsLUJKxinrVSsmFCkuHrkNmHvI4MOTMWi42d9h34UwE=; b=ql0BPn6fC8tbd0 g9U31Fkya5hIW8IXLPSIsl4Ol8Zv16DrBGKHa40C2lPJqGckuMOj1hjPepM2Q1ONAB0Z+2cX1ppe6 uU/7rwnOmcHRt4GXl12VsBDv2iRbXjk9uamOz7eerzGnAWAgM2+/EnQNoeJMkhP7TY0qCvV0M7Q81 1tFxcDMpJES4e1E1Sus+wtNz36KMcTxtg4n2W4aFcNViMQwCAG5x/hLOAPgHzZXJJySAA36hvQwA+ eq1i7usN6gH2ICSavF/KcWrJ3+cC1tQ0m8dfh9AnzTr5T7VAb8mgd0bTQep6wIR2tm6vbQkEtfz/K hvdDQhp7Wo/R8GisJXvA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rGDgO-001xtU-21; Thu, 21 Dec 2023 07:41:28 +0000 Received: from mail-wm1-x332.google.com ([2a00:1450:4864:20::332]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rGDgM-001xsM-13 for linux-arm-kernel@lists.infradead.org; Thu, 21 Dec 2023 07:41:27 +0000 Received: by mail-wm1-x332.google.com with SMTP id 5b1f17b1804b1-40d3bebbf6eso3624475e9.1 for ; Wed, 20 Dec 2023 23:41:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1703144484; x=1703749284; darn=lists.infradead.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=e3H+A+A2A0Iu6R6Q5Gw3uNtOBHWeA7g0CxKvBb0xiXs=; b=emCnOUUWmjrFFhRngedmBshCeNaDfwejS6qUfGPtEoa4iVgi/e9V2MdtU3lgfFQEQf ckI1YClrBtpXuMjLSRmib8D7Cp85qtUtSfco6RB2WGe7dsjmV06NgDEZETmAGr+Plt7e HZ7PILobaxFvxvWaFkveBrOG6bStzO+0IT7By7Mmu0QonGO6Jcfwh9UV6Ggb0kVrni36 P6P0wY3LGS4hnPOnQTWRPOaoEFdg/cDy34/EfeqRTPgxa16L9M0NvEouMNxCz42UxU0U HMPSLknufvIQe6wYG4K0TFZTUMie3hk+Pz4tfH2Cyjhz8E6vVwpSC23wgXUPdFEyaGvN 8VJQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703144484; x=1703749284; 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=e3H+A+A2A0Iu6R6Q5Gw3uNtOBHWeA7g0CxKvBb0xiXs=; b=bXCmSvEOBjqdde0I8ZdZ7TicfO54d27f9FXeXrZ2sgPxftuRTPyiN86HzVIfsqyq95 6d6uZ/00Q7uJVyEcY32sruBXl1kch6vhHLPlqjhukogRhnF0Rl+LweSkfXEPXc+Zu4VS KQK+nFsBsmdmsBDUfkG1+6/+6cgkKwZCWN0w8moQkLLkmNwEFmOx01XcgfvpEyXvJRU5 II/OJVe7YCFqsDdsqa+IEnmrNFrIMR8bRvC7Uve9A12+I4m/NUJtz40iIoG09RocRjXq kl2YG9Z8jZDodV4zWxft74ec5s1uIu8WT9IU7H+U/YAOxcBldhbm0bDIw37e5UTsdJCw xSXw== X-Gm-Message-State: AOJu0YwDdHcVr/TjGAj1Y8Oxo8sMwYpKr0/gJlPEnc90h95FiFnb+XIY YiHGzFTABeuBndiWqmuJLuWLrQ== X-Google-Smtp-Source: AGHT+IF0w9SH6vM+8j42w2i5q5G1YaglqA/Y2vt+0fOQwzslfJ2iApbivhzltwHxvSOIjCtSrTI+fw== X-Received: by 2002:a05:600c:510b:b0:40d:247f:3266 with SMTP id o11-20020a05600c510b00b0040d247f3266mr478314wms.42.1703144484020; Wed, 20 Dec 2023 23:41:24 -0800 (PST) Received: from [192.168.2.107] ([79.115.63.202]) by smtp.gmail.com with ESMTPSA id k8-20020a05600c1c8800b0040d376ac369sm2219698wms.40.2023.12.20.23.41.21 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 20 Dec 2023 23:41:23 -0800 (PST) Message-ID: Date: Thu, 21 Dec 2023 07:41:21 +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: Krzysztof Kozlowski , 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> <8808ceeb-35dc-4094-aec4-f43c7acd6174@linaro.org> <6962ac73-2f44-4c9e-8731-152087815454@app.fastmail.com> <584e036a-2ae7-4b88-a517-8f79c6baed4a@linaro.org> <914b634d-444c-4eae-bc7e-0f20d0629470@linaro.org> From: Tudor Ambarus In-Reply-To: <914b634d-444c-4eae-bc7e-0f20d0629470@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231220_234126_387469_A41A5664 X-CRM114-Status: GOOD ( 20.70 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 12/15/23 08:01, Krzysztof Kozlowski wrote: > On 14/12/2023 15:31, Tudor Ambarus wrote: >> >> >> On 12/14/23 14:19, Arnd Bergmann wrote: >>> On Thu, Dec 14, 2023, at 13:52, Tudor Ambarus wrote: >>>> On 12/14/23 12:01, Arnd Bergmann wrote: >>>>> On Thu, Dec 14, 2023, at 11:52, Tudor Ambarus wrote: >>>>>> +static int __init gs101_early_console_setup(struct earlycon_device *device, >>>>> >>>> >>>> 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. >>> >>> In the case of incorrect DT data like a missing reg-io-width property, >>> I would expect it to still fail once the regular console or tty takes >>> over from earlycon. >>> >>>> 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. >>> >>> But that in turn is the same as specifying any other incorrect earlycon. >> >> I don't think you can crash the kernel if you use other earlycon as you >> don't make accesses on the 32bit restricted bus. But I agree that if >> using the correct earlycon name, and mmio instead mmio32, is equivalent >> to not specifying reg-io-width in dt. >> >>> >>>> If you think the change is fine, I can amend the commit message with the >>>> description from above. >>> >>> I'm still not convinced we need a special case here when everything else >>> just requires passing the correct data. > > We shouldn't need any data from DT for this case, because this property > apparently can be inferred from the compatible. IOW, GS101 SoC requires > reg-io-width=4, everywhere, for each node, thus there is no need to > specify this property. It should be deduced from the compatible. > The entire peric0/1 block requires 32 bit data widths indeed. PERIC is used by the Universal Serial Interface (USI) and I3C. I've checked few other hardware blocks and all require 32 bit data widths (G3D, TPU, TNR, PERIC, PDP, MFC, MCSC, IPP, HSI, GSA and I stopped here). If the reg-io-width shall be inferred from the compatible in the gs101 case, then this patch stands. I'll update the serial driver as well. Thanks, ta _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel