From patchwork Thu May 11 12:10:23 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: 681554 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E5C1DC77B7C for ; Thu, 11 May 2023 12:11:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237628AbjEKMLk (ORCPT ); Thu, 11 May 2023 08:11:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49952 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237756AbjEKMLf (ORCPT ); Thu, 11 May 2023 08:11:35 -0400 Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8BDA593EB; Thu, 11 May 2023 05:11:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1683807061; x=1715343061; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=GgId0k8oBG7lRV4xr41min05HrG3B+vzXuK7KKW5Bc8=; b=DxbfSPnUpFa5kbMdJbrnIRel+IWx+mhBv18J3qnPM+mnBBHJ5Vr8JeT0 r9ZEm90vY7WN44ujVit6pIDT1vzsKZgE8nzF0Wi1T6d/F2iuRK1hPBdiP llKkiEUZHjmzBzmvpzDeSF/UFERjqp4ZLux24KcQxyeacyNL34KJT7lHO egUbnn+Db1j6KE0FwT0odSjV1B/jr+1LJeuFazNpScqCVzGHjvuXeckfZ NnU/5tZGhG28JPzeVrmaOqCEwca22SOL4pYBryslM2UlxJeljagw5Gn2t pd9CrSjxFMbHaOBWpf9oe8RoMq9cAnndA3OnkFVXrQ4/EaDYmNu4+D/3X w==; X-IronPort-AV: E=McAfee;i="6600,9927,10706"; a="330839030" X-IronPort-AV: E=Sophos;i="5.99,266,1677571200"; d="scan'208";a="330839030" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 May 2023 05:10:38 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10706"; a="843921173" X-IronPort-AV: E=Sophos;i="5.99,266,1677571200"; d="scan'208";a="843921173" Received: from jsanche3-mobl1.ger.corp.intel.com (HELO ijarvine-MOBL2.ger.corp.intel.com) ([10.252.39.112]) by fmsmga001-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 May 2023 05:10:35 -0700 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, Niklas Schnelle , =?utf-8?q?Ilpo_J=C3=A4rvinen?= Subject: [PATCH v4 0/6] serial: Separate RT288x/Au1xxx code into own file Date: Thu, 11 May 2023 15:10:23 +0300 Message-Id: <20230511121029.13128-1-ilpo.jarvinen@linux.intel.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-serial@vger.kernel.org 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). v4: - Type changes - bugs: unsigned short -> u16 - use u32 for old_dl too v3: - Convert dl_read/write() to take u32 arg + name the args - Separatate the non-driver datastructure changes & document them better - Fix build when SERIAL_8250=m + SERIAL_8250_RT288X=y (+note reasoning in the commit message for future reference) - Use u8 for arrays that no longer have < 0 values v2: - Define register map array lengths explicitly to avoid creating declaration trap. Ilpo Järvinen (6): serial: 8250: Change dl_read/write to handle value as u32 serial: 8250: Document uart_8250_port's ->dl_read/write() serial: 8250: Add dl_read/write, bugs and mapsize into plat_serial8250_port 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.h | 4 +- drivers/tty/serial/8250/8250_core.c | 4 + drivers/tty/serial/8250/8250_early.c | 21 ---- drivers/tty/serial/8250/8250_em.c | 4 +- drivers/tty/serial/8250/8250_of.c | 4 +- drivers/tty/serial/8250/8250_port.c | 84 +-------------- drivers/tty/serial/8250/8250_pxa.c | 2 +- drivers/tty/serial/8250/8250_rt288x.c | 136 ++++++++++++++++++++++++ drivers/tty/serial/8250/8250_uniphier.c | 4 +- drivers/tty/serial/8250/Makefile | 1 + drivers/tty/serial/Makefile | 2 +- include/linux/serial_8250.h | 44 ++++++-- 13 files changed, 201 insertions(+), 119 deletions(-) create mode 100644 drivers/tty/serial/8250/8250_rt288x.c