From patchwork Mon Dec 11 16:23:28 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Griffin X-Patchwork-Id: 13487567 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 2DC8BC10DC3 for ; Mon, 11 Dec 2023 16:25:36 +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=Oy7HZkF6xYQO96ZxRJnvQjawwoE/aOyvNWhr24wKajA=; b=GCNfSxSRaM0zT+ TH1z2zr0rtxsixjNG/QQ6YuR1QUsBh9r8tfQ/DhisuGrijdpLw7uv6vXxCG4N/m9MByAPCn4d5sK2 VFczs5EeZAW/U90WdBgUABR5/Q9oFOM02kGQqxyPRmxTs7CJytkvzB69cr3EvGXPG4jYOiIWWwd9y ySrDKpc7808Q+KuV7G1Da3OAhW9IFcTKcMbzQtn3FSMqWJ6rjh8ZyH9KadHY5up0BqIBq/Aeeolqd TRsbGMREa0/5AgOYtp+olXLCKDl5jkFxIKECbzcABy2MMUEkax7yXGc+go5jsWGi3i7hhR7V3/OHj K0h3dw8ZpVY1Q/mPFElQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rCj5j-005moM-0C; Mon, 11 Dec 2023 16:25:11 +0000 Received: from mail-wr1-x429.google.com ([2a00:1450:4864:20::429]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rCj5A-005mSl-0W for linux-arm-kernel@lists.infradead.org; Mon, 11 Dec 2023 16:24:44 +0000 Received: by mail-wr1-x429.google.com with SMTP id ffacd0b85a97d-3360ae2392eso2955595f8f.2 for ; Mon, 11 Dec 2023 08:24:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1702311873; x=1702916673; 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=soCDsbziWMjEDTQYnQ64foy2UwOB+R/XTZlhNIOpiP0=; b=BgURwRTBbv09CxmYu06aDOSRdm9c5vQGfEiFFRlZdNpYtzmgV88l2KlPlc1v+fNjA1 pBsK2k1XwYLcYW/7wo/O0BFq6XdUsNfAW3im4f54/DX4gtn1j9+4rdIJ+rV4A3Inriv6 MpcXLVRNykC/HQ1w9iKFXuZCOdc4x6QbbUQlsMyv4UZujDyevgnb4B38R8WHINQJHWWV wONOK1GTJF2bmbMRLuhXu7x3V+24hcP+mJOUV/jgw5iP3fJV3yXT48NOv7q6iFcOCV0a LzOpCO62IPD1bQ4dfP/SHyRkZ5BeBod9ihVc8fgPRvxrYRRdvGKUjt9kiktEGHHrYpkH kPGg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702311873; x=1702916673; 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=soCDsbziWMjEDTQYnQ64foy2UwOB+R/XTZlhNIOpiP0=; b=gsHVdxPwsFLAa14tyNhvxp0TT52KpkGp6Nq9dHzjphU0+7IaIAewr3zR71JFwmDPsg 42jcgF/MUnCNvv78CImNmpaZexba968uGAd6vWB0gNuJ59AXXKnh6tR5plTfImLnMFBO 9YEN0ec5X3nBwSxvafjXQLk2EF9z2Nuk8LfLdKR+mVv019OSXRqVeWVc3pdd3/6Uk3CP Q3BEj2D9CTCPDXpYS3TYtdiE2n+srPMe5z7FbBOv6DLwIDhhAZak+Vv/nC9Vb1G3CjOR EowKkorN8xFvgyqaBqnkJPBU+4So/4/uxqIqZaJ7X/g/gbKlxhnkZHepUUL1iwXm0I9c MQNA== X-Gm-Message-State: AOJu0Yw96Q2iYpz1Cj9T5b5wareR7opb33EQTKF/lLAYNGo+2ksT+1qE P1AR5GaAUCarff+yUJw10au91A== X-Google-Smtp-Source: AGHT+IG8umBo1u1ZfEfeCl0PvULKc4ZOBWDQmYUZk0RSYEHoF9NTjOzHwGb+4PRIdrH5nk5CfFUEqQ== X-Received: by 2002:adf:f70f:0:b0:333:3af7:a4ef with SMTP id r15-20020adff70f000000b003333af7a4efmr2016600wrp.8.1702311873314; Mon, 11 Dec 2023 08:24:33 -0800 (PST) Received: from gpeter-l.lan (host-92-29-28-58.as13285.net. [92.29.28.58]) by smtp.gmail.com with ESMTPSA id o4-20020a5d58c4000000b0033333bee379sm8923103wrf.107.2023.12.11.08.24.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Dec 2023 08:24:32 -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 v7 13/16] tty: serial: samsung: Add gs101 compatible and common fifoszdt_serial_drv_data Date: Mon, 11 Dec 2023 16:23:28 +0000 Message-ID: <20231211162331.435900-14-peter.griffin@linaro.org> X-Mailer: git-send-email 2.43.0.472.g3155946c3a-goog In-Reply-To: <20231211162331.435900-1-peter.griffin@linaro.org> References: <20231211162331.435900-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-20231211_082436_747708_4F18C0D6 X-CRM114-Status: GOOD ( 12.13 ) 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. Tested-by: Will McVicker Acked-by: Greg Kroah-Hartman Reviewed-by: Sam Protsenko Reviewed-by: Arnd Bergmann Signed-off-by: Peter Griffin Reviewed-by: Alim Akhtar --- 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..71d17d804fda 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 samsung,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);