From patchwork Fri Dec 1 16:09:22 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Griffin X-Patchwork-Id: 13476057 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 B14AAC07E97 for ; Fri, 1 Dec 2023 16:12:00 +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=DkWF9BUA1OjyDFVKBSTMEhmcHHYtRWNeuPKrKIt6V3M=; b=lJpw4xZuAK9Orb vBaTUvpxQkN7nLjiwUz67xdXn5Fh/9tC1pyeFZ3PpWz92nz35+Tzh3GoVDpOlxU/tY5nPhmynlh3d +oj6hcCMatL5vbx6YGyV324nyAAwVkol1SJ9+mLt6X2aHoaPUzJYMd+AGQPv6RuZgtOnuB1pqe6J4 OxcKLDu5ABNKqnw7pk9oltw+E16MR5/i3WsA08plA3mdFRMYRubtQmhxiTdUlaXulbbnVFq/BQV4w ceTHDJ2EAC/7u16CeiKyeFjjLUBhVsSoIqQlxWCQcWbaJnF1abX69gRDtyUBdoIkTR1dthbsqR46V m/Dse9i1BxDrIyS+DdXQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1r966x-00E8Bh-1d; Fri, 01 Dec 2023 16:11:27 +0000 Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1r966p-00E80e-0b for linux-arm-kernel@lists.infradead.org; Fri, 01 Dec 2023 16:11:21 +0000 Received: by mail-wm1-x334.google.com with SMTP id 5b1f17b1804b1-40b552deba0so23867275e9.1 for ; Fri, 01 Dec 2023 08:11:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1701447075; x=1702051875; 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=N6X5vVAlls/XtdCFtdQoEfrejT5TccvyQro4u4ajLPE=; b=rkPptbBSnfhPp/J8wzC++yC37E+sPdLBJGfxt3eZr6Fngh2lgnqwv/rmKuj9cJTtlz UgXn9x+NOHCiz35v6JXKTFuwi9a/Qch0cKhxYEf5dU55Huk10zYNpBQ/Tgfa5iDl+RS8 jAMiD7oHlDanZm2/w6vkYgf77dAoyNdLModsJTPK4sinoRYbT2CKW3z3l3sZe6IcmbE7 kdjPPmCxFT+fmYLDgqPXBFw/UKJyMmTlVJKoHKqmqjys5X8aqg56V7TM6Z+CKFMI8YxH BrnXz1n9QPdSiG9SW9DF/wFUEKm8g3d4St+seF6wct2esCqBa5hsJxT6jhQHhPRSIgzz ylRQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701447075; x=1702051875; 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=N6X5vVAlls/XtdCFtdQoEfrejT5TccvyQro4u4ajLPE=; b=w61xsCV4s5+k4aV0OGTGP/hzCbYZIho2ep3El9IPV3ZRpWjvTyf1ws6Xaps7fuJxjH VxtnhsK20kBd7RVWc8qEr75bT95dHNzgxz5fBab1ZtzOLBl4duquOfw01DsvhMUYWv8S 1hm71b4HmttkYG27GMRosg2PAsog3/S7Cc/lutOWYd5XtirtBh03sEt+MU+jGE2CVyNH XVG+O/hh5M1NbFIyHTb5ILqr6f+Dg6rsD37UeNtpweXFy1b/z/hG0FqQe5hFrExRDUWW CGh9wVgJOMYGfOw/FoRAYc4UP80Jf7/selU/wiwrERpFs7OiwauEsriVtuAYZS1tw5Cy NDUQ== X-Gm-Message-State: AOJu0YyueysLZHWLoqHe81bdL+Nmbvj4ZmIVkK45qZgxUhgQwyZr7gY6 9/ePCMO5Ooqsb39/tJ03ubKLJg== X-Google-Smtp-Source: AGHT+IGDALCDuLFU1YQ+h+wr7UohRR0OcUFUK/djXShHghoJYpXFb8S89wEYypH79BAexl0QUCJeDw== X-Received: by 2002:adf:cf06:0:b0:333:2fd2:5d16 with SMTP id o6-20020adfcf06000000b003332fd25d16mr892081wrj.72.1701447075706; Fri, 01 Dec 2023 08:11:15 -0800 (PST) Received: from gpeter-l.lan (host-92-29-24-243.as13285.net. [92.29.24.243]) by smtp.gmail.com with ESMTPSA id cg16-20020a5d5cd0000000b003332656cd73sm3907386wrb.105.2023.12.01.08.11.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Dec 2023 08:11:15 -0800 (PST) From: Peter Griffin To: robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, mturquette@baylibre.com, conor+dt@kernel.org, sboyd@kernel.org, tomasz.figa@gmail.com, s.nawrocki@samsung.com, linus.walleij@linaro.org, wim@linux-watchdog.org, linux@roeck-us.net, catalin.marinas@arm.com, will@kernel.org, arnd@arndb.de, olof@lixom.net, gregkh@linuxfoundation.org, jirislaby@kernel.org, cw00.choi@samsung.com, alim.akhtar@samsung.com Cc: peter.griffin@linaro.org, tudor.ambarus@linaro.org, andre.draszik@linaro.org, semen.protsenko@linaro.org, saravanak@google.com, willmcvicker@google.com, soc@kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-clk@vger.kernel.org, linux-gpio@vger.kernel.org, linux-watchdog@vger.kernel.org, kernel-team@android.com, linux-serial@vger.kernel.org Subject: [PATCH v5 17/20] tty: serial: samsung: Add gs101 compatible and common fifoszdt_serial_drv_data Date: Fri, 1 Dec 2023 16:09:22 +0000 Message-ID: <20231201160925.3136868-18-peter.griffin@linaro.org> X-Mailer: git-send-email 2.43.0.rc2.451.g8631bc7472-goog In-Reply-To: <20231201160925.3136868-1-peter.griffin@linaro.org> References: <20231201160925.3136868-1-peter.griffin@linaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231201_081119_241773_35CAB6C6 X-CRM114-Status: GOOD ( 12.24 ) 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 Add serial driver data for Google Tensor gs101 SoC and a common fifoszdt_serial_drv_data that can be used by platforms that specify the samsung,uart-fifosize DT property. A corresponding dt-bindings patch updates the yaml to ensure samsung,uart-fifosize is a required property. Acked-by: Greg Kroah-Hartman Reviewed-by: Sam Protsenko Reviewed-by: Arnd Bergmann Signed-off-by: Peter Griffin Tested-by: Will McVicker --- drivers/tty/serial/samsung_tty.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/drivers/tty/serial/samsung_tty.c b/drivers/tty/serial/samsung_tty.c index 1b0c2b467a30..f8d98f1006de 100644 --- a/drivers/tty/serial/samsung_tty.c +++ b/drivers/tty/serial/samsung_tty.c @@ -2490,14 +2490,25 @@ static const struct s3c24xx_serial_drv_data exynos850_serial_drv_data = { .fifosize = { 256, 64, 64, 64 }, }; +/* + * Common drv_data struct for platforms that specify uart,fifosize in + * device tree. + */ +static const struct s3c24xx_serial_drv_data exynos_fifoszdt_serial_drv_data = { + EXYNOS_COMMON_SERIAL_DRV_DATA(), + .fifosize = { 0 }, +}; + #define EXYNOS4210_SERIAL_DRV_DATA (&exynos4210_serial_drv_data) #define EXYNOS5433_SERIAL_DRV_DATA (&exynos5433_serial_drv_data) #define EXYNOS850_SERIAL_DRV_DATA (&exynos850_serial_drv_data) +#define EXYNOS_FIFOSZDT_DRV_DATA (&exynos_fifoszdt_serial_drv_data) #else #define EXYNOS4210_SERIAL_DRV_DATA NULL #define EXYNOS5433_SERIAL_DRV_DATA NULL #define EXYNOS850_SERIAL_DRV_DATA NULL +#define EXYNOS_FIFOSZDT_DRV_DATA NULL #endif #ifdef CONFIG_ARCH_APPLE @@ -2581,6 +2592,9 @@ static const struct platform_device_id s3c24xx_serial_driver_ids[] = { }, { .name = "artpec8-uart", .driver_data = (kernel_ulong_t)ARTPEC8_SERIAL_DRV_DATA, + }, { + .name = "gs101-uart", + .driver_data = (kernel_ulong_t)EXYNOS_FIFOSZDT_DRV_DATA, }, { }, }; @@ -2602,6 +2616,8 @@ static const struct of_device_id s3c24xx_uart_dt_match[] = { .data = EXYNOS850_SERIAL_DRV_DATA }, { .compatible = "axis,artpec8-uart", .data = ARTPEC8_SERIAL_DRV_DATA }, + { .compatible = "google,gs101-uart", + .data = EXYNOS_FIFOSZDT_DRV_DATA }, {}, }; MODULE_DEVICE_TABLE(of, s3c24xx_uart_dt_match);