From patchwork Thu Jan 5 12:47:41 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Ilpo_J=C3=A4rvinen?= X-Patchwork-Id: 3613 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp283131wrt; Thu, 5 Jan 2023 04:48:41 -0800 (PST) X-Google-Smtp-Source: AMrXdXula0bBXyshR26jLHIAEk2gR9FA9yz/RNuqraRSvQH5GSKiLGZO5T3D6UQIR+vtPp/h57UC X-Received: by 2002:a17:907:d389:b0:7c1:5a37:825 with SMTP id vh9-20020a170907d38900b007c15a370825mr57303718ejc.34.1672922921439; Thu, 05 Jan 2023 04:48:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672922921; cv=none; d=google.com; s=arc-20160816; b=n/boqDk2xVECZ/AFWnxmwrkS8+5uAp4Ix9jdessfdxzrD0R2bWsTDdIvEogl8HN3T6 +YmujA2LeMuh7XirWP2D/XEk9rbIg4sIjH/55Y9XyO67iHrAodD5dWMV8YijIBYvpVFh Zg7XYY+Jd5skPC8S1JgnRU2cot/VVpqOlo4YRvqT6F8/JdmXU0IjnvKaKgYwWgu4q2F2 EPlHJHo1AYLJwtU8o6ufxR25N6RvdfozMSVmwDkVb0FSwaTyzWk3xxpG91Vqx8RGvaBf tymA1HLAVpuJHLld96lkgiKQ/AYWWmF/79h1ZaQ4CB8uHu8vN2I/6qK2Ms/KSfSGdhmL bL5Q== 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=w+IYZqf+5jbHrc0/O/DdgR9xc7TCTrG8lZ+g2m890G4=; b=vBiSlMAkcDF44MFvTGF/JNQFQu9ClXRk+bM9q5iRmsmOwdmPSyIAfXW6+BLdM/TUkb blWlHFmb/w24BjfEr3c66mmarzc/odzNUuA1YAuH+C+iJFfl44FVSiTlB+nOG5M/B6CN dl4i529Apfr9t/H9tJJxPNO0XVF4cmJAXiyZhLuEfpnCYOrEyRzaaX5RVWvHupLQlXfx q/EVQRHdX71AAhupHGaR3PghcZ0Zj+gM1ID94lhxTAztTqgjhlyLURzwKYLNEEB6tGpH Vf0qIy54VsNgnrK6CBIgqbW5EkbDa1bdI61Z9M0iNeAqFkrQ2dfNQe25SHr1Ni8ATch1 b5rw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=LnrnqHmy; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o13-20020a17090611cd00b007c0dcc41dbasi30320523eja.879.2023.01.05.04.48.17; Thu, 05 Jan 2023 04:48:41 -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=@intel.com header.s=Intel header.b=LnrnqHmy; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232992AbjAEMsA (ORCPT + 99 others); Thu, 5 Jan 2023 07:48:00 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38202 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232952AbjAEMrz (ORCPT ); Thu, 5 Jan 2023 07:47:55 -0500 Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4A12E479E8; Thu, 5 Jan 2023 04:47:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1672922874; x=1704458874; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=jXQCTdIu2ZeMuZ/yZOgheaRyF6UCRmg5kST3NNxQhro=; b=LnrnqHmyvMATPd6RpuaCaPW1waiSAUd/+j+NDcNnYHxRPj2aiCsk7yyD 7TBg+KfGRJvDd08gPsl67FUa/0APmPQqVAswGl2tWpX+Y2UoHD/QZ1Z7a p8rfFxkyM2GDxw2X4T0sqPCJ0CP7YaRIagK8B6McWEC7/vxDVA1l7jjLf KeDvY6FYVamJvF/I16GUZ/efX2qW8JhYfDWMvjqTE61GlyHnQ41IUl6Qn g+Ciry2SdAHQeJRPAKEOzNDpEjEy35PWOH0+w4TQvflEXyURQFERomQkS X+Y/QoJNDosoeYszXSsbnqnOnmcN8jUXCtPZ2UXO86+NsBMlvWbMoCZCc A==; X-IronPort-AV: E=McAfee;i="6500,9779,10580"; a="301889805" X-IronPort-AV: E=Sophos;i="5.96,302,1665471600"; d="scan'208";a="301889805" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Jan 2023 04:47:54 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10580"; a="984287770" X-IronPort-AV: E=Sophos;i="5.96,302,1665471600"; d="scan'208";a="984287770" Received: from khaunx-mobl1.ger.corp.intel.com (HELO ijarvine-MOBL2.ger.corp.intel.com) ([10.252.35.181]) by fmsmga005-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Jan 2023 04:47:52 -0800 From: =?utf-8?q?Ilpo_J=C3=A4rvinen?= To: linux-serial@vger.kernel.org, Greg Kroah-Hartman , Jiri Slaby , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Cc: linux-kernel@vger.kernel.org, =?utf-8?q?Ilpo_J=C3=A4rvinen?= Subject: [PATCH v2 0/3] serial: Separate RT288x/Au1xxx code into own file Date: Thu, 5 Jan 2023 14:47:41 +0200 Message-Id: <20230105124744.105950-1-ilpo.jarvinen@linux.intel.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_PASS, SPF_NONE autolearn=ham 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?1754186825078424105?= X-GMAIL-MSGID: =?utf-8?q?1754186825078424105?= A non-trivial amount of RT288x/Au1xxx code is encapsulated into ifdeffery in 8250_port / 8250_early and some if/switch UPIO_AU blocks. Create a separate file from them and do a few additional cleanups. I kept the Kconfig entry as bool because the code has somewhat tricky dependency chain (mips arch code and 8250_of driver). It would be nice to make it tristate but I don't know how blocking some invalid =m + =y combinations would be best addressed. It should probably be best done on top of this series independent of the split itself anyway. UPIO_AU could now be removed because it's same as UPIO_MEM for the remaining code path but I'm unsure if that's allowed (is the port iotype part of stable ABI or not)? v2: - Define register map array lengths explicitly to avoid creating declaration trap. Ilpo Järvinen (3): serial: 8250: RT288x/Au1xxx code away from core serial: 8250_rt288x: Name non-standard divisor latch reg serial: 8250_rt288x: Remove unnecessary UART_REG_UNMAPPED arch/mips/alchemy/common/platform.c | 10 +- drivers/tty/serial/8250/8250_core.c | 4 + drivers/tty/serial/8250/8250_early.c | 21 ---- drivers/tty/serial/8250/8250_of.c | 4 +- drivers/tty/serial/8250/8250_port.c | 78 --------------- drivers/tty/serial/8250/8250_rt288x.c | 135 ++++++++++++++++++++++++++ drivers/tty/serial/8250/Makefile | 1 + include/linux/serial_8250.h | 14 ++- 8 files changed, 163 insertions(+), 104 deletions(-) create mode 100644 drivers/tty/serial/8250/8250_rt288x.c