From patchwork Tue Nov 22 10:21:13 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 24245 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp2118499wrr; Tue, 22 Nov 2022 02:23:33 -0800 (PST) X-Google-Smtp-Source: AA0mqf5w6oPjEqbF7LEPVhXNPHhLQndQNYNcj26QzOPWI9JQUnQNUJAQ1jqyTaphkRtRQXOQtvgY X-Received: by 2002:a05:6402:f:b0:468:56c3:7c8 with SMTP id d15-20020a056402000f00b0046856c307c8mr20738981edu.109.1669112613629; Tue, 22 Nov 2022 02:23:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669112613; cv=none; d=google.com; s=arc-20160816; b=RYUS3gVpC22tzfSDqH4swci5iJLWtO6RIjMnzx+/uJ3J7+CwIu2wtd1VjP146N0FhS EhS3tlxFcvlyVvegzNTjq3JegZe2qcF5EnsZ5cMbrriHQxv0Mfmgg1dZL/CP96ebOE3+ TwGPHZNerX4J6VWbi+Nxbw596cCiF+bOCSkbIWXyfve3CVw6+lXDDRFChtCtf+vI7mp7 +B4nuAeUgNe7ldh8Hu+RcmO0K+4tTpmPzVPLKle1EAX9QUJb1ecb+NSy6sRoGAPDbyvF jtaR6lPe6Uf1kzpxVGuVQGS/g20BxR+CfeiLR4G4EtMGZiP0jlDc/m5hLumM5D7eZ1VP m0kg== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=7EJrTQIS5zIHcJVe/CbMMVgFbpImlTtQ6/Fo8uf0cQs=; b=CGOOjkWvsfNQd4ZEyIcmoXkSYdy002vFKjEHy6FpJjRbR44dt9fu1BydRcvBrla6BM N6ulratmULRv7s89JrzUPdX4Q59tu890Y8YntsIPGYSln/N9XZfk3Qev6DHvJVGVC+az qbgvxFwfNTjWH2GbgCekds+l6HX8vcNg0ouEYGu3+16o8/kRGFBh6Nh60KkUm3Yzw53I TPlvJaE0E8ME0DgEJ9iHhmiLKcizVo9nPOVPWRkyY8pOgGmOg4EVrApQg59HCssZiO+8 YYLYOqdRw0LXh8KMtwVPIQ4H7gaNBcX3/XrlltdMitOzDFfDJR1/WwlJI4YJpIHfAhDi 5zbw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bgdev-pl.20210112.gappssmtp.com header.s=20210112 header.b=FYfzwS4C; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id cy17-20020a0564021c9100b00463cdad3915si9892507edb.521.2022.11.22.02.23.09; Tue, 22 Nov 2022 02:23:33 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@bgdev-pl.20210112.gappssmtp.com header.s=20210112 header.b=FYfzwS4C; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233483AbiKVKWa (ORCPT + 99 others); Tue, 22 Nov 2022 05:22:30 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43756 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230468AbiKVKVw (ORCPT ); Tue, 22 Nov 2022 05:21:52 -0500 Received: from mail-wr1-x42c.google.com (mail-wr1-x42c.google.com [IPv6:2a00:1450:4864:20::42c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 67A9C20367 for ; Tue, 22 Nov 2022 02:21:45 -0800 (PST) Received: by mail-wr1-x42c.google.com with SMTP id i12so20113319wrb.0 for ; Tue, 22 Nov 2022 02:21:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20210112.gappssmtp.com; s=20210112; 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=7EJrTQIS5zIHcJVe/CbMMVgFbpImlTtQ6/Fo8uf0cQs=; b=FYfzwS4CBrRcXV5ZFnLGwjwIz55YZzRUisru4kJviiTfhx0Xb7YABMkuRTXPsZQtuZ Tgl+WByJ+uyYYK4OhOAotaGNnq5eawB9MQ7SzTc2PqanALdWpXM5uvw+U++3rjvruaVc UnlpPICZ2pLTyb/GWYXsKowF2O7698PNkDgCMiX0yrA3+NmSajm7YgRohZgmIcbm4t7p RjFFyr5yBvekdoQgybn0OQzdPNlp+ilYm2ahefYR5hDjRqQZxrk4O2hwQpWv1ka+jbAA leihr0Z3RpKbmLuhIaXy3omF+C1kWJ0KQoyFpTNy+508uT0DJKmuxpUKQfFjHwmJW/x/ eGXg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=7EJrTQIS5zIHcJVe/CbMMVgFbpImlTtQ6/Fo8uf0cQs=; b=OH3jJwyE6pVIUgiofY3PcfxGsrsma6f30TZW8qfHp5J3HzvY+TG1lSwh9jEmFBbwNu hKHufSa1h5W5sUiWyODDMuli/w+RDVzK8LLq79uhcft7LtK3nVn/vX3QvKTlo3g9XTYj 8Ds6vCUKQk7/v8VuKuNR1BA2Ut05bZfrYNShineM0kldTgLoonAzoEi0EtDp26Hzx6LU 5vYkaV8AOmfgzVVAGNNf5mwmtRZZ8ZQGOA6tSp2HVeOaPJvlqOxNn9rHTN+9/z3Ul8i5 PPVc1usMhkZklX4Xi5cJjlU7dPsTlKF9SaZEL3vX0QQj+RiZrJ6KVEgDlbMlMC3HuDt2 Le1A== X-Gm-Message-State: ANoB5pltRhseUcAIGnMsPD3Hv3+Qm0kfqQxnzP12keQ52jKa0YnCdMCG n1WsDCFPIvPZAQQHLqPJZ5K+aw== X-Received: by 2002:adf:e190:0:b0:241:d451:7fc9 with SMTP id az16-20020adfe190000000b00241d4517fc9mr3861780wrb.223.1669112503975; Tue, 22 Nov 2022 02:21:43 -0800 (PST) Received: from brgl-uxlite.home ([2a01:cb1d:334:ac00:e011:9e81:66f1:3415]) by smtp.gmail.com with ESMTPSA id o3-20020a5d4083000000b002366e8eee11sm13432873wrp.101.2022.11.22.02.21.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 22 Nov 2022 02:21:43 -0800 (PST) From: Bartosz Golaszewski To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Greg Kroah-Hartman , Jiri Slaby , Srinivas Kandagatla , Vinod Koul , Alex Elder , =?utf-8?q?Ilp?= =?utf-8?q?o_J=C3=A4rvinen?= Cc: linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-serial@vger.kernel.org, Bartosz Golaszewski , Konrad Dybcio Subject: [PATCH v2 03/15] tty: serial: qcom-geni-serial: align #define values Date: Tue, 22 Nov 2022 11:21:13 +0100 Message-Id: <20221122102125.142075-4-brgl@bgdev.pl> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20221122102125.142075-1-brgl@bgdev.pl> References: <20221122102125.142075-1-brgl@bgdev.pl> MIME-Version: 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_NONE,UPPERCASE_50_75 autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1750191427848831850?= X-GMAIL-MSGID: =?utf-8?q?1750191427848831850?= From: Bartosz Golaszewski Keep the #define symbols aligned for better readability. Signed-off-by: Bartosz Golaszewski Reviewed-by: Konrad Dybcio --- drivers/tty/serial/qcom_geni_serial.c | 62 +++++++++++++-------------- 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/drivers/tty/serial/qcom_geni_serial.c b/drivers/tty/serial/qcom_geni_serial.c index 7af5df6833c7..97ee7c074b79 100644 --- a/drivers/tty/serial/qcom_geni_serial.c +++ b/drivers/tty/serial/qcom_geni_serial.c @@ -39,57 +39,57 @@ #define SE_UART_MANUAL_RFR 0x2ac /* SE_UART_TRANS_CFG */ -#define UART_TX_PAR_EN BIT(0) -#define UART_CTS_MASK BIT(1) +#define UART_TX_PAR_EN BIT(0) +#define UART_CTS_MASK BIT(1) /* SE_UART_TX_STOP_BIT_LEN */ -#define TX_STOP_BIT_LEN_1 0 -#define TX_STOP_BIT_LEN_2 2 +#define TX_STOP_BIT_LEN_1 0 +#define TX_STOP_BIT_LEN_2 2 /* SE_UART_RX_TRANS_CFG */ -#define UART_RX_PAR_EN BIT(3) +#define UART_RX_PAR_EN BIT(3) /* SE_UART_RX_WORD_LEN */ -#define RX_WORD_LEN_MASK GENMASK(9, 0) +#define RX_WORD_LEN_MASK GENMASK(9, 0) /* SE_UART_RX_STALE_CNT */ -#define RX_STALE_CNT GENMASK(23, 0) +#define RX_STALE_CNT GENMASK(23, 0) /* SE_UART_TX_PARITY_CFG/RX_PARITY_CFG */ -#define PAR_CALC_EN BIT(0) -#define PAR_EVEN 0x00 -#define PAR_ODD 0x01 -#define PAR_SPACE 0x10 +#define PAR_CALC_EN BIT(0) +#define PAR_EVEN 0x00 +#define PAR_ODD 0x01 +#define PAR_SPACE 0x10 /* SE_UART_MANUAL_RFR register fields */ -#define UART_MANUAL_RFR_EN BIT(31) -#define UART_RFR_NOT_READY BIT(1) -#define UART_RFR_READY BIT(0) +#define UART_MANUAL_RFR_EN BIT(31) +#define UART_RFR_NOT_READY BIT(1) +#define UART_RFR_READY BIT(0) /* UART M_CMD OP codes */ -#define UART_START_TX 0x1 +#define UART_START_TX 0x1 /* UART S_CMD OP codes */ -#define UART_START_READ 0x1 - -#define UART_OVERSAMPLING 32 -#define STALE_TIMEOUT 16 -#define DEFAULT_BITS_PER_CHAR 10 -#define GENI_UART_CONS_PORTS 1 -#define GENI_UART_PORTS 3 -#define DEF_FIFO_DEPTH_WORDS 16 -#define DEF_TX_WM 2 -#define DEF_FIFO_WIDTH_BITS 32 -#define UART_RX_WM 2 +#define UART_START_READ 0x1 + +#define UART_OVERSAMPLING 32 +#define STALE_TIMEOUT 16 +#define DEFAULT_BITS_PER_CHAR 10 +#define GENI_UART_CONS_PORTS 1 +#define GENI_UART_PORTS 3 +#define DEF_FIFO_DEPTH_WORDS 16 +#define DEF_TX_WM 2 +#define DEF_FIFO_WIDTH_BITS 32 +#define UART_RX_WM 2 /* SE_UART_LOOPBACK_CFG */ -#define RX_TX_SORTED BIT(0) -#define CTS_RTS_SORTED BIT(1) -#define RX_TX_CTS_RTS_SORTED (RX_TX_SORTED | CTS_RTS_SORTED) +#define RX_TX_SORTED BIT(0) +#define CTS_RTS_SORTED BIT(1) +#define RX_TX_CTS_RTS_SORTED (RX_TX_SORTED | CTS_RTS_SORTED) /* UART pin swap value */ -#define DEFAULT_IO_MACRO_IO0_IO1_MASK GENMASK(3, 0) +#define DEFAULT_IO_MACRO_IO0_IO1_MASK GENMASK(3, 0) #define IO_MACRO_IO0_SEL 0x3 -#define DEFAULT_IO_MACRO_IO2_IO3_MASK GENMASK(15, 4) +#define DEFAULT_IO_MACRO_IO2_IO3_MASK GENMASK(15, 4) #define IO_MACRO_IO2_IO3_SWAP 0x4640 /* We always configure 4 bytes per FIFO word */