From patchwork Tue Oct 5 09:58:00 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sam Protsenko X-Patchwork-Id: 515241 Delivered-To: patch@linaro.org Received: by 2002:ac0:890a:0:0:0:0:0 with SMTP id 10csp1837740imy; Tue, 5 Oct 2021 02:58:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwyZMluJxEhwg7Yo9ZbBFcMllQtYdkuLei3IpGnO8M+uHX6AyHce2jcLPCVFyhFbZh1ipyT X-Received: by 2002:a17:906:7c86:: with SMTP id w6mr16383285ejo.283.1633427887811; Tue, 05 Oct 2021 02:58:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633427887; cv=none; d=google.com; s=arc-20160816; b=ZfkpsJAf1ItoTEKF7QxwQisIjFEKaBQRJxz6rjmdpSqsI5c9OBOyFt8ODh/ETcjXX/ 2Y3QfSZGYMOZM6iHNxnt7P20V1wHwfTw6ewj1JxqZuvkBm/xjHKiBgrTTlwWa1glyEnm KJkE+CzLM8CxhQghDrkGtIzM5KomAfQgNenA3aJUTzsanv11weqsw58gURMZK7rbOaMi YnO6cW1INNHjOFaAdUsgnia8tXhrBcB316tFBQCVIV1J6I848qhOzGeCwDGVvqKoacu7 qgw5Nlzn/nqKQ0psGn89cXd1CyYrc7Gye7+UWmcC/ExyTTMAXKNH/WCznWeWxzQKLAWT 6BqQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=rq7MKM2zrv9Ik3HYA0sfeiFO+Ud/aiQ0uN8CoLNzjP8=; b=QtBlxHT42VRGnAU+DZcERPLXAXN+j6SaAbBCqVzui0EyT+LMrGnogwmkNSkLlIkyv7 g9pJcNoY0L8TmX7VCJaUnS8i0P1+ukzUdT7SGacYSTjCe5+1IU/iXd84IPRYt80Lziif /Qrb0uEiduhguxac00xjta2ZjQQDEVCpp1wkLm8HVQZk3c1AOSpyEo7QSvbmTinvbRgx 3VcWqHz3ysp5ThtucLri0sSrCr1aNjw9Sgswr8K9lkB1hnLdkyQFrO+JiNdyWPuC1PlI kkGizDdYVZEoOOjP/TSwePtsn5Jd/ONjNiFG6gCkNve0DNL7M7Kme49eGouP5RVjiI+m NAeQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=q6xeJSXD; spf=pass (google.com: domain of linux-samsung-soc-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-samsung-soc-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v7si18224981ejx.484.2021.10.05.02.58.07; Tue, 05 Oct 2021 02:58:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-samsung-soc-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=q6xeJSXD; spf=pass (google.com: domain of linux-samsung-soc-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-samsung-soc-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233810AbhJEJ74 (ORCPT + 4 others); Tue, 5 Oct 2021 05:59:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37456 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233469AbhJEJ7x (ORCPT ); Tue, 5 Oct 2021 05:59:53 -0400 Received: from mail-lf1-x12b.google.com (mail-lf1-x12b.google.com [IPv6:2a00:1450:4864:20::12b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 826E0C06161C for ; Tue, 5 Oct 2021 02:58:03 -0700 (PDT) Received: by mail-lf1-x12b.google.com with SMTP id i24so34265080lfj.13 for ; Tue, 05 Oct 2021 02:58:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=rq7MKM2zrv9Ik3HYA0sfeiFO+Ud/aiQ0uN8CoLNzjP8=; b=q6xeJSXDEJCDu7zY5yhSM415ImPMMcJXjo5jezsYRWmGPbMU3MD9kDDhCzV8xbhh5J xuMucvdJ8sKJZQ9rq29tm0S7V0FTdEzd/dty+Z7IbagtQbFRaf6p5f8IOGfIk1tqbWYh /mGljqys/66QZoamXvHtEXjHm8AOLPxo99x26Dsrh3Kbtm9mbpx3cQcNji8t+en5PtOF EeTVWMIPYYeA7cU54LsXvZg/lcix3FPyEBW0m+61lAIdBBuG0TnqY0iSVxkt8tedVGEn rHhY+AcXYhBj4VURLrWv4Kft89rkEL7tqv2xZu1kLgdMp/cBH5dDbI0HQYCHHrtB9ecO AvRg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=rq7MKM2zrv9Ik3HYA0sfeiFO+Ud/aiQ0uN8CoLNzjP8=; b=qla2u7uBS1Qq00VLN2ddcQzBgkQSc9ap7QBREHgGObu2/ZXhvCtJnjEt81yUu91fGp E+KbIb2OEL0/N8khFc8iwW13OVfJCWU2Bz6UcAqiGsrSv2As9EzIMrNT5jX+ehLqv6WA EKVJa2+5Xrm5jXaaKxjSRVQgO8O0SfnVkb3iCN81rS1CGEgqB8XeXqWf0SSvl70A3hO0 c4tQjwMlvaCjWwZTNMxrn1VbQTF8sl1QwBGLzy2o6Q7+U27EvZU+6/KXA+17i+np/MAz vFtoyA1+s/gtlm/jYu/MrzinABscEuWXadurcxzI8YJHt5k0Iinl/KVZSwPHXXMmW6OG 199g== X-Gm-Message-State: AOAM530rZphUCJOsYrGAKLPn03k9L11JWxLjUJEtRbxBuP2FssZ4gheN eq0o+10+OSNFmZ/qkdsV7Lul2g== X-Received: by 2002:a19:790c:: with SMTP id u12mr2535757lfc.490.1633427881861; Tue, 05 Oct 2021 02:58:01 -0700 (PDT) Received: from localhost ([31.134.121.151]) by smtp.gmail.com with ESMTPSA id b15sm2088546lji.126.2021.10.05.02.58.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Oct 2021 02:58:01 -0700 (PDT) From: Sam Protsenko To: Krzysztof Kozlowski , Greg Kroah-Hartman Cc: Jiri Slaby , linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2] tty: serial: samsung: Improve naming for common macro Date: Tue, 5 Oct 2021 12:58:00 +0300 Message-Id: <20211005095800.2165-1-semen.protsenko@linaro.org> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org Having "_USI" suffix in EXYNOS_COMMON_SERIAL_DRV_DATA_USI() macro is confusing. Rename it to just EXYNOS_COMMON_SERIAL_DRV_DATA() and provide USI registers availability for all Exynos variants instead. While at it, also convert .has_usi field type to bool, so its usage is more obvious. Signed-off-by: Sam Protsenko --- Changes in v2: - Converted .has_usi field to boolean - Used true/false instead of 1/0 values in EXYNOS_COMMON_SERIAL_DRV_DATA() macro drivers/tty/serial/samsung_tty.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) -- 2.30.2 diff --git a/drivers/tty/serial/samsung_tty.c b/drivers/tty/serial/samsung_tty.c index e2f49863e9c2..ca084c10d0bb 100644 --- a/drivers/tty/serial/samsung_tty.c +++ b/drivers/tty/serial/samsung_tty.c @@ -65,7 +65,7 @@ enum s3c24xx_port_type { struct s3c24xx_uart_info { char *name; enum s3c24xx_port_type type; - unsigned int has_usi; + bool has_usi; unsigned int port_type; unsigned int fifosize; unsigned long rx_fifomask; @@ -2780,7 +2780,7 @@ static struct s3c24xx_serial_drv_data s5pv210_serial_drv_data = { #endif #if defined(CONFIG_ARCH_EXYNOS) -#define EXYNOS_COMMON_SERIAL_DRV_DATA_USI(_has_usi) \ +#define EXYNOS_COMMON_SERIAL_DRV_DATA(_has_usi) \ .info = &(struct s3c24xx_uart_info) { \ .name = "Samsung Exynos UART", \ .type = TYPE_S3C6400, \ @@ -2804,21 +2804,18 @@ static struct s3c24xx_serial_drv_data s5pv210_serial_drv_data = { .has_fracval = 1, \ } \ -#define EXYNOS_COMMON_SERIAL_DRV_DATA \ - EXYNOS_COMMON_SERIAL_DRV_DATA_USI(0) - static struct s3c24xx_serial_drv_data exynos4210_serial_drv_data = { - EXYNOS_COMMON_SERIAL_DRV_DATA, + EXYNOS_COMMON_SERIAL_DRV_DATA(false), .fifosize = { 256, 64, 16, 16 }, }; static struct s3c24xx_serial_drv_data exynos5433_serial_drv_data = { - EXYNOS_COMMON_SERIAL_DRV_DATA, + EXYNOS_COMMON_SERIAL_DRV_DATA(false), .fifosize = { 64, 256, 16, 256 }, }; static struct s3c24xx_serial_drv_data exynos850_serial_drv_data = { - EXYNOS_COMMON_SERIAL_DRV_DATA_USI(1), + EXYNOS_COMMON_SERIAL_DRV_DATA(true), .fifosize = { 256, 64, 64, 64 }, };