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: 12536069 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E0E4CC433F5 for ; Tue, 5 Oct 2021 09:59:54 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id B19D86137D for ; Tue, 5 Oct 2021 09:59:54 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org B19D86137D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org 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: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:In-Reply-To:References: List-Owner; bh=zzp7+AolXF43z/HCS0ugI/8UKyD1WVdBWcdD11gfKdc=; b=AvUcyrf2DB/quU RbCOsxBy3ZPzzi1LQix+QtQYq7Pdrt0Z9W74xgJjmBG/5DrMtvEQUDId1NE0lmpDCpN7ik7a7WUEd i2IgaCuO6AKA2pOaHh5QF1eGeSFQiFah9nDuiO0skjh2jQ2EsixxjjQxKWFaBncu0yJJ2H/NAj1Ef +uur1EvRoE+STjZNO7HEZD0UTMjxIVIxcltaLg7m7vWAjchIER5RsC+vyyEuTsfgAYIdCX0dQ+9If cNz4iRRwFXNUh4swcSjJFeILVeT2EEFaYtPFSIjdryDIlvdlNdL5Sum8b+HAhhuWBPZ6mg7YVreo9 iCzTxeOLchny14dteivw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mXhD4-009snT-Sj; Tue, 05 Oct 2021 09:58:07 +0000 Received: from mail-lf1-x130.google.com ([2a00:1450:4864:20::130]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mXhD1-009smb-BW for linux-arm-kernel@lists.infradead.org; Tue, 05 Oct 2021 09:58:04 +0000 Received: by mail-lf1-x130.google.com with SMTP id x27so83244020lfa.9 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=mls8sBKG3ax1Ivv0inhSH3NqTknmkT/LZLPvE3ga5JIhki/7vpz94+9rEU5GzHHuiq noAc3xulGUoAQpkqxhvJXOYJe+NOGDlsUytZQlqxsY2NJNEB2RDut6VBSdqaTmBYk2jR 9VpLnnaP3HiPc0t6vQGi2XJ/6+CXuhaBYVvHCT1JcyQx8YFL6NALNzrsq0u+zgzGhw8m nbHyi/MS8MGd7vKZdcroMoH0GBrNO5Odm/wtv1KjbTKCM5A3s4G1evkzXLSGOUW+sDnt ZrP5oOTGbB2ZTmfvrdNgDy6Qzj0BOzRZmZMKG0tu6KM3bpoLIEG7sKRS8RXmYXwG39Ns /XIQ== X-Gm-Message-State: AOAM530qgRDEK/ilJgY9MubvQTO+SW7lyVCd6tKsCOgrxVZwif40U3ZK 5Eem/PP0BjPxsxA8Bk9AHrdwy/yeGhak1Bv6 X-Google-Smtp-Source: ABdhPJztJNS0D67j+1Xh2JJk3ONd902XRoJ8JO2wypn685qKb8NkIEto9fs/OTRtiLIIdaA347rP9A== 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211005_025803_414271_CC7D4AB9 X-CRM114-Status: GOOD ( 13.47 ) 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 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 Reviewed-by: Krzysztof Kozlowski --- 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(-) 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 }, };