From patchwork Thu Dec 28 12:57:59 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tudor Ambarus X-Patchwork-Id: 13505992 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 7B9A8C47073 for ; Thu, 28 Dec 2023 12:58:57 +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:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=0tR3Bce/riZmnD9LY0K1yg3XJPI5wdNSbAKLt0vNjck=; b=JObpySWwGXUD48 t+HUkAZnGvmm5hY9Qfo1YWHsJQrqtHzC949mweVel7inRW+bZR5RQ1/d1AsTeca2ZCKFwtYbZYLNW snNEJnx+mb5nw9GyC5WH/RO1yNMU8MO3oBAmwHXyYsPY3b37csxoA4be7QxkfO+JIU+p0mKlhydIe zew7GCJtqcxuZolAqKCExUcy/XloWqbgDok5UwmL1Oa9lQVUWvVXwW8GyuCtH88KBXi0a7tKUtAYW z9uEOU+d8DDLPmkeFBOIIBgtejtI3v0neeG/rJ9KlmCLwzpQ1quzifRJE8jU+bzoNaGvF6nT+AsUW wLWxsco1uvnWcgjmiPeQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rIpy1-00Gr4r-0E; Thu, 28 Dec 2023 12:58:29 +0000 Received: from mail-wm1-x336.google.com ([2a00:1450:4864:20::336]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rIpxp-00GqzQ-2D for linux-arm-kernel@lists.infradead.org; Thu, 28 Dec 2023 12:58:19 +0000 Received: by mail-wm1-x336.google.com with SMTP id 5b1f17b1804b1-40d5ae89c7bso16124585e9.2 for ; Thu, 28 Dec 2023 04:58:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1703768296; x=1704373096; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=XX8RT8/KwRnpjqmauq2VuiREugBeuTfdnmzmXRQSLkY=; b=Zqgnjit47PfyQjPT0/HH9zPz5cwOnFABTNeE4iw3XIO7Yqe6O4nJIv7BhwEqZNQAwT BdNbtkRWd4odCLhdDOfOB4ql85C5Dtd2YLtLnDeNBMzXypwNFQR5rh/i25VirIVhDbA6 PpJHCPDSkhhsivzjD0AoJxyaYgBqexKSXXfczUJ/plhh1XW5gtaAoeHSSJpkCLt/BQNL YTg78PbzbIFWUjz6Y3YRNmShB2Y8eiV+1Zl48+A7ByGgYFVDrOKO/3IPFPclAPfHDc/f 1lgOW+CEcX0NMbzb8aZGdFeNbRPIl5l49MHSUfumQYnNQz897BuXKLt/lG+W3htbYUA0 XdDg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703768296; x=1704373096; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=XX8RT8/KwRnpjqmauq2VuiREugBeuTfdnmzmXRQSLkY=; b=ifpEXbdaQL094YebuSGAkT6u8wInP2H8W6VKbW0Cxw8lHr1zegK+RXSzGzaWHkIX8z BRwCvh0mfWZPhT/OaL5uaB8E8R4vbb5RZkyMZ37hg6+2jBx4pMNiuDh2axqLmbMNsrob 8I9sQteUU8BjZ8Tsr5FFl4tK9Oud+M1IUUnoayAHEP2oEFSbDLYNsaxvjHHiVCXIKd9f gA96/JmPOQsqNpuKRWeT95UAtrvB6klz3FQq/f9bVjnR/4h4MYZZvMGT7WxmWaGi1nhB fmcA8CiAXwvTu9AlHk7eOchrC4HNevJ506KDCMePBZSKzgSTiFieiY0w6Xoq0Ag4jWXZ iJog== X-Gm-Message-State: AOJu0YxvS4QXW46tLffPWTdK5xd0J5uuW/V6c03sPovCiqUXyCZkIK5k T7TuJeKEaT8fdFkHUeStaDLxtXcZgp/6Zw== X-Google-Smtp-Source: AGHT+IEqHso+KU0TXJoWGdwqMKaajVLMSvd+/nBs9vEkdpDVBsUvd/aUEZUWWnBCnEZtLsrpzQL1bA== X-Received: by 2002:a05:600c:4f83:b0:40d:5d82:d0f4 with SMTP id n3-20020a05600c4f8300b0040d5d82d0f4mr1363489wmq.61.1703768296198; Thu, 28 Dec 2023 04:58:16 -0800 (PST) Received: from ta2.c.googlers.com.com (216.131.76.34.bc.googleusercontent.com. [34.76.131.216]) by smtp.gmail.com with ESMTPSA id h9-20020a05600c350900b0040d5aca25f1sm8615807wmq.17.2023.12.28.04.58.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Dec 2023 04:58:15 -0800 (PST) From: Tudor Ambarus To: peter.griffin@linaro.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, mturquette@baylibre.com, sboyd@kernel.org, conor+dt@kernel.org, andi.shyti@kernel.org, alim.akhtar@samsung.com, gregkh@linuxfoundation.org, jirislaby@kernel.org, s.nawrocki@samsung.com, tomasz.figa@gmail.com, cw00.choi@samsung.com, arnd@arndb.de, semen.protsenko@linaro.org Cc: andre.draszik@linaro.org, saravanak@google.com, willmcvicker@google.com, 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, kernel-team@android.com, Tudor Ambarus Subject: [PATCH v2 06/12] tty: serial: samsung: add gs101 earlycon support Date: Thu, 28 Dec 2023 12:57:59 +0000 Message-ID: <20231228125805.661725-7-tudor.ambarus@linaro.org> X-Mailer: git-send-email 2.43.0.472.g3155946c3a-goog In-Reply-To: <20231228125805.661725-1-tudor.ambarus@linaro.org> References: <20231228125805.661725-1-tudor.ambarus@linaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231228_045817_728684_48A33F9C X-CRM114-Status: UNSURE ( 9.25 ) X-CRM114-Notice: Please train this message. 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The entire bus (PERIC) on which the GS101 serial resides only allows 32-bit register accesses. The reg-io-width dt property is disallowed for the "google,gs101-uart" compatible and instead the iotype is inferred from the compatible. Always set UPIO_MEM32 iotype for the gs101 earlycon. Signed-off-by: Tudor Ambarus Reviewed-by: Peter Griffin --- v2: update commit message drivers/tty/serial/samsung_tty.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/drivers/tty/serial/samsung_tty.c b/drivers/tty/serial/samsung_tty.c index 938127179acf..2fbaaf0e756b 100644 --- a/drivers/tty/serial/samsung_tty.c +++ b/drivers/tty/serial/samsung_tty.c @@ -2812,6 +2812,17 @@ OF_EARLYCON_DECLARE(exynos4210, "samsung,exynos4210-uart", OF_EARLYCON_DECLARE(artpec8, "axis,artpec8-uart", s5pv210_early_console_setup); +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); + /* Apple S5L */ static int __init apple_s5l_early_console_setup(struct earlycon_device *device, const char *opt)