Received: by 2002:a05:7412:e794:b0:fa:551:50a7 with SMTP id o20csp305965rdd; Tue, 9 Jan 2024 05:00:38 -0800 (PST) X-Google-Smtp-Source: AGHT+IEkFyjkE67LamArlG5hzfcjuDPDcFuthpBCjM66YQZV2YayihFz3h8QV1mCGm7daQnJiG6X X-Received: by 2002:a05:6359:4c1c:b0:174:f664:e477 with SMTP id kj28-20020a0563594c1c00b00174f664e477mr7681104rwc.60.1704805238524; Tue, 09 Jan 2024 05:00:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704805238; cv=none; d=google.com; s=arc-20160816; b=xebdR7kcVhoGuXDztkTx85bBrE/vGaR7ZzGGrPvw1vwRAMUbz+amDBO0F7KZlko5hG yewWrV5/bWWepnM/SLtc4gK/xRSEDH/5d6BmQA69kkcp+z9TLddN7ZDCf42TNhBh57Y3 QWQVZuYo/I+FmlbYPfiqqLrOu71hAhCn5dgpUe4Q8hy276yks6PAFoFgo0sO7mnUpn+Z NbsfMW4v6O02JxYJFnj5ozFUQWjQ9Cly2ej2J40rq8Tr9hkIrd9E2a90sXKPUUUbFPl5 +cFaW0cjRVuNsV8EY6yZrrgmMVBN/CiGly7shY6iBLevVKpeQUQLAkOm961wTHM8oyJI 8HQQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=76U22CGER4KqXBDXUKva048KHZBhjzcIPjnq3/iJdsQ=; fh=KRW4fzhV3eOc4twE+iXDUbxVgJ+KUhsw6c6yMTWC5QE=; b=d5iKI8ttoExzhElaVSxwqjAeaS4iEmhlI5CJ7iP46hiWGEapRcuoJ2Rf0yaytL1KHi gMsNTiXGaXVt6vHnD1OwdKAvumqE9f186i4IIydDP4H2pHlRR4GHgIhHQ/vMKE5im4Hf XSAtOB3IasMHHOjR42dKApiuz4actMbOhK6OODSKNoYPICMAXeiMgHyX96wyJmacxvC/ 3ZIqkRgAMBHbjn7l9in5TH+MoMyyal4jxHEw7r2Euqu3BRzLCwB+jEtMC9hisfjONRV9 q37lHLN7QmBvZFGbNT9qr5UBcbbpQ5gIW+5xL2e0JbTjVVpgh+VWCZyAtkEnUVQ2bZzS VjaA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=XmA0cchq; spf=pass (google.com: domain of linux-kernel+bounces-20864-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-20864-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id i33-20020a635861000000b005cdf93487basi1383979pgm.585.2024.01.09.05.00.38 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Jan 2024 05:00:38 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-20864-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=XmA0cchq; spf=pass (google.com: domain of linux-kernel+bounces-20864-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-20864-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 27540284CBC for ; Tue, 9 Jan 2024 13:00:32 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BC7A73A1BF; Tue, 9 Jan 2024 12:58:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="XmA0cchq" Received: from mail-wr1-f41.google.com (mail-wr1-f41.google.com [209.85.221.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5053739FDA for ; Tue, 9 Jan 2024 12:58:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-wr1-f41.google.com with SMTP id ffacd0b85a97d-33674f60184so2976122f8f.1 for ; Tue, 09 Jan 2024 04:58:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1704805117; x=1705409917; darn=vger.kernel.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=76U22CGER4KqXBDXUKva048KHZBhjzcIPjnq3/iJdsQ=; b=XmA0cchqPso2PFLQlH5YpMaKpq58JiSdBnh4J38xOhs6Yte1HG+LPPk/0GfgNa1AKc htRSK1DRHfwSP0ZbiAqkM29mMt8cXxQ/hzEac2ThT93kyjbJWtVMtcDmGqDuGu0lYL8C N92Q0eVcqF5F84i6nY9giWfg5sOWlLtqe9clSZbMr2vF/AgZbAI1b59YitA/0fNTSd55 /ErjveA+lOaocoAyPClasFUNGVNSG+vK6ywKTymv0NQsrJfWWlAYAKEabcTov5ICilFR VHGMF0BFmX1vkEqTmtVk+I+u3lzhGGk/Jb8DiJtFHNK1BAbpgFb2rLLxWwkQa+AhA288 EKdQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704805117; x=1705409917; 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=76U22CGER4KqXBDXUKva048KHZBhjzcIPjnq3/iJdsQ=; b=IsXL0SCjGZhRYVjdCO8RUqkX9dSVK6JmQXq8XN6nBmdbxwri3iXv3Q22Woyb/7t5Pj cGzhCkTLPajVhhZlcxhIpYBNhoZcPJf5zgUoQZYWYllOftaTYiVc4k9RynSE2nuGLLUh m8HoKiKT2GKs9BFSNNNoFyZOT9WtSwwYWlhFy7F7vp4aZjXY3r8mXJ9U0495cexMaMcO MQ+G+URNNmt7Iwr4hoBp7J1SOT7IHx552+PAwr3MubcRBUxmXKPJpaOS8Kq0SajUxc/8 J15Qey4mM/cMl1f96qEK4G7IH3M0WAzfAUZLGeKjA9wXYRrPOWg/J7P6f8sg1uZD8+lO /m8A== X-Gm-Message-State: AOJu0YwH2xtbLVwV9OH5oOXPDT+eH5KLtMhEEb0LZ6h7aj5UA5O0awIe xRZC5rl745gpS/vc/BAjdPRuOmC8rldZ2g== X-Received: by 2002:a5d:614d:0:b0:336:8d4f:6b1b with SMTP id y13-20020a5d614d000000b003368d4f6b1bmr443504wrt.131.1704805117683; Tue, 09 Jan 2024 04:58:37 -0800 (PST) Received: from ta2.c.googlers.com.com (88.140.78.34.bc.googleusercontent.com. [34.78.140.88]) by smtp.gmail.com with ESMTPSA id cw16-20020a056000091000b0033753a61e96sm2351302wrb.108.2024.01.09.04.58.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Jan 2024 04:58:36 -0800 (PST) From: Tudor Ambarus To: peter.griffin@linaro.org, krzysztof.kozlowski+dt@linaro.org, gregkh@linuxfoundation.org Cc: mturquette@baylibre.com, sboyd@kernel.org, robh+dt@kernel.org, conor+dt@kernel.org, andi.shyti@kernel.org, alim.akhtar@samsung.com, jirislaby@kernel.org, s.nawrocki@samsung.com, tomasz.figa@gmail.com, cw00.choi@samsung.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, andre.draszik@linaro.org, kernel-team@android.com, willmcvicker@google.com, Tudor Ambarus Subject: [PATCH v3 06/12] tty: serial: samsung: add gs101 earlycon support Date: Tue, 9 Jan 2024 12:58:08 +0000 Message-ID: <20240109125814.3691033-7-tudor.ambarus@linaro.org> X-Mailer: git-send-email 2.43.0.472.g3155946c3a-goog In-Reply-To: <20240109125814.3691033-1-tudor.ambarus@linaro.org> References: <20240109125814.3691033-1-tudor.ambarus@linaro.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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. Reviewed-by: Peter Griffin Signed-off-by: Tudor Ambarus --- v3: collect Peter's R-b tag 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 a81b61953a28..fed50423b7c1 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) -- 2.43.0.472.g3155946c3a-goog