From patchwork Mon Nov 20 09:48:23 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Th=C3=A9o_Lebrun?= X-Patchwork-Id: 16784 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9910:0:b0:403:3b70:6f57 with SMTP id i16csp2087292vqn; Mon, 20 Nov 2023 01:49:12 -0800 (PST) X-Google-Smtp-Source: AGHT+IEYUULYAHMpsRaa521jUV5ShNOUSy6wEnCeRwo3ht3gLj3vUfwO3xSKL+/tNapaMt8f+dO6 X-Received: by 2002:a05:6a20:938c:b0:187:c8ca:75ad with SMTP id x12-20020a056a20938c00b00187c8ca75admr8846941pzh.31.1700473751827; Mon, 20 Nov 2023 01:49:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700473751; cv=none; d=google.com; s=arc-20160816; b=lR8Hs9v8QEuDFHQOzhuzAhBSvIQ9oNuh4NFu4jlY4FEPj0Z1JtINyLKfu8aabrNTik lKkmS9ttT1E10dqVT7hGDklcnxz/YWqMbcINyl+g9EmzATDYtQwGhRM3Ih7R7bSu79kA oQ39gPOm0+QEjZJyepxp6HYaEMq8DCxC2/L1CgAmJORZDjwjzvotNtOAyYdTzdSoYZAu RUnUxT8o9q1rw9yQ56YuibrLWbBm4yAhvOKbr7H2ZRU1KBOo9VVASECsy82YGSaP5O7c CJfCZeRQHexxvomddNg1KWN09KS3rPs14rxsvu3skH54W/bGiArFTMDIE8QA+pmUGf97 kkHg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:content-transfer-encoding:mime-version :message-id:date:subject:from:dkim-signature; bh=Hj6bwwF80hCVZud43IrkasSpNlgaA1s6m8gFcAg5NDQ=; fh=AHZzcI0NKFNU1WuuS/FWF2LprSMGsTAGL8gmMiTfjNU=; b=VPGwelcNB04z5f0wIbvnxMQjkqeVZJqSEUPxFNlHtD+PF+cSV4CIHPELIfpmgHluQx 0C7x3jvCrKWYEuiquCGJCcs1byvHavuLrwo5kMQ+KBGJiTv/GiJ23NItwJU577gmNXA3 7uKN4LruMqfdPu8iwETkiSEPENkUzPiAPdjNY9GYt4NfS2W2/evX+XbfZANZDsAIeJY9 BASSFkRhw10FMPZcRfda5o4/Bf+aviCor9u/ftVRbFNS2UINKKrKk9SwsVZsKXrK1j/U DqZGaElzW6K4hMN/JNb5csuo/mqvmpnD6TzjIrI1cBGlAy4v5amvwjZLx5njB/n0KR9o Xaww== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=FyFIFaXj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id v1-20020a170902b7c100b001ca81fa0661si7547138plz.508.2023.11.20.01.49.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Nov 2023 01:49:11 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=FyFIFaXj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 5ADFC80B121C; Mon, 20 Nov 2023 01:48:57 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232523AbjKTJsl (ORCPT + 27 others); Mon, 20 Nov 2023 04:48:41 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52154 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232138AbjKTJsj (ORCPT ); Mon, 20 Nov 2023 04:48:39 -0500 Received: from relay7-d.mail.gandi.net (relay7-d.mail.gandi.net [217.70.183.200]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4BB5194; Mon, 20 Nov 2023 01:48:35 -0800 (PST) Received: by mail.gandi.net (Postfix) with ESMTPSA id DE1BD20009; Mon, 20 Nov 2023 09:48:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1700473713; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Hj6bwwF80hCVZud43IrkasSpNlgaA1s6m8gFcAg5NDQ=; b=FyFIFaXjQ6txcrROLo8Ssy+cqZO+RllOLJDyzBDojGSZFv/KGC6tyOHLOCu+yx9Egd2HkR 6wtBSQZQU+BNUZlE3BMNtvUw4Dvt8T1NoxfloL3itClKLMv1lPvJ6MPLf56SB+1nw6phkX 5G6LF3UZXlIfnkoqJmiYP2sfPQENjyU24l4Qe+kcWPV8jWiLeld9hp83ioYXZbKLxs6g2F d0V+3Bzs6RB8RCHtPwoDpseHVJH8UK0NLR2DwGPX7OGOJLIJZHowYShyMfKBAdUnfsk/QV KtrVHjOzv7bENrdKV0nLd7FGxiUKke3QdIrC+61IFsecu12+HvOqL8aVyox+pg== From: =?utf-8?q?Th=C3=A9o_Lebrun?= Subject: [PATCH v3 0/6] Cleanup AMBA PL011 driver Date: Mon, 20 Nov 2023 10:48:23 +0100 Message-Id: <20231120-mbly-uart-v3-0-07ae35979f1f@bootlin.com> MIME-Version: 1.0 X-B4-Tracking: v=1; b=H4sIAGgrW2UC/1WMQQ6DIBBFr2JmXRqBSLGr3qPpAnCoJCoGLKkx3 r1o0rQuZvEm/70FIgaHEa7FAgGTi84PGfipANOq4YnENZmBlYzTfKTX3UxeKkxEWaOM1rW0UkP ejwGte++t+yNz6+Lkw7ynE92+34r4qyRKSlKzSiIqVl8aftPeT50bzsb3sHUS+7mUHlyWXSm4F aIyWLHy6K7r+gHdREx14AAAAA== To: Russell King , Greg Kroah-Hartman , Jiri Slaby Cc: linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org, Linus Walleij , =?utf-8?q?Gr=C3=A9gory_Clement?= , Alexandre Belloni , Thomas Petazzoni , Vladimir Kondratiev , Tawfik Bayouk , =?utf-8?q?Ilpo_J=C3=A4rvinen?= , =?utf-8?q?T?= =?utf-8?q?h=C3=A9o_Lebrun?= X-Mailer: b4 0.12.3 X-GND-Sasl: theo.lebrun@bootlin.com X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Mon, 20 Nov 2023 01:48:57 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1783075964753956168 X-GMAIL-MSGID: 1783075964753956168 Hi, While adding upstream support to a new platform (Mobileye EyeQ5[1]) that uses the AMBA PL011 driver, I took some time to look at the PL011 driver and ended up with a few patches that cleanup parts of it. The line-diff is big mostly because of the checkpatch-fixing commits. The driver hadn't received any love for quite some time. See commit messages for more information. We can thank Ilpo Järvinen for this V3! See below for changes compared to V2. [1]: https://lore.kernel.org/all/202310050726.GDpZbMDO-lkp@intel.com/T/ Have a nice day, Théo Lebrun Signed-off-by: Théo Lebrun --- Changes in v3: - Replace magic constants in linux/amba/serial.h by FIELD_PREP_CONST calls - Refactor QDF2400 SoC erratum 44 handling out of probe in a new patch - A nit in "unindent pl011_console_get_options function body" - Link to v2: https://lore.kernel.org/r/20231116-mbly-uart-v2-0-863f665ce520@bootlin.com Changes in v2: - [PATCH 2]: add #include in include/linux/amba/serial.h as we use the BIT() macro. - Move one whitespace cleanup from [PATCH 4/6] to [PATCH v2 3/5] where it belongs. - Drop [PATCH 6/6]: console will never have a word length of 5 or 6. - Link to v1: https://lore.kernel.org/r/20231026-mbly-uart-v1-0-9258eea297d3@bootlin.com --- Théo Lebrun (6): tty: serial: amba: cleanup whitespace tty: serial: amba: Use linux/bits.h macros for constant declarations tty: serial: amba-pl011: cleanup driver tty: serial: amba-pl011: replace TIOCMBIT macros by static functions tty: serial: amba-pl011: unindent pl011_console_get_options function body tty: serial: amba-pl011: factor QDF2400 SoC erratum 44 out of probe drivers/tty/serial/amba-pl011.c | 260 +++++++++++++++++++++------------------- include/linux/amba/serial.h | 257 ++++++++++++++++++++------------------- 2 files changed, 265 insertions(+), 252 deletions(-) --- base-commit: 82251bf0515a7c32121b0e833922708d4dd70da9 change-id: 20231023-mbly-uart-afcacbb98f8b Best regards,