From patchwork Wed Feb 14 17:09:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 201129 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:bc8a:b0:106:860b:bbdd with SMTP id dn10csp1504302dyb; Wed, 14 Feb 2024 13:15:46 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCX+Wt1ZqtrfqyciO0LRK8RzoLaK8T5d3fOVuYKmP74j49sTPRNJ7cdkYNPktWyeiWVmtoxIBNHlfbXd+2Sv08jUCD2rlg== X-Google-Smtp-Source: AGHT+IGbwGrscUMqa93mlqothPmtbfK0cBUfghgNtDrfzGLejRP4SNgtynB4CoV4rRPJDxuG3KZm X-Received: by 2002:a0c:e303:0:b0:68c:aeef:d72b with SMTP id s3-20020a0ce303000000b0068caeefd72bmr3654609qvl.13.1707945346691; Wed, 14 Feb 2024 13:15:46 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707945346; cv=pass; d=google.com; s=arc-20160816; b=v4vVwzZEebFnUFvpXBsvbTLq6badR4MIT97YP/t/ndn8jECDUm/IdHBTER4f1kanRo 5+hwWMaOsy+DVhhTtNx6EiqrcjZlwjWjxXyTwNXamEMarmoi4dyr3k2zbDjdx48E79zF 5MVAl3yTBBPvqqY4aUdQu7kjg5MmBD8GpsBztacQ0kKSd/Lpg7sRzXgQ7KjNUI1Jm+30 3BnrG45uOv4VjdiQaG/sKvIuSVXUpgKUT7hBPkEYDT7R/dIa2xQhoZxjBpr4v87P9sB+ sq7bP7LqZ7Vm4B3paQcvhKEXD1dZstwUTHkgakfKzklVubQMP0+VBDFG/M+hN2nIZ+zv kKfA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=4yFCMjNmyMWRVWQJv603p0t3bEFW/gLucz4IBkaCGJc=; fh=pGWj8UxgRvi4spmmjMr5HbavWiLJ1AtIYBM55oZR+xs=; b=LGH9rzQPEXP+iCuaLK1UwYwIfVRWDorvCuIE1ppmT1+4HAB0nyWHzkLXBtIqPdWv5H RlIdqil0LdQsyN5SvM3hKdIaXi4tzWVKvTuxFp2zKcl5lMo08TgjS0kw3Y6PF9V9QoqX /mGa28oAgIkReRFiiyS8kNSKNLvnK0CUo7dbjr49P7xOTcBORU+wrzqZRtnd2j2i+BsD 6kzNllirREplWUqKOqUwIn8bPV4hvE25nLzfh9uGR2SQc3bs11Fc7jZ+WgthsOgskF5e 2EBI6LnQ3KDDNv/11zY01FuSS6SRji9fIlFjZ/ar5AlzpMTDH622RJApO0pPFTPKlC9g yLag==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=jil45KuT; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-65620-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-65620-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com X-Forwarded-Encrypted: i=2; AJvYcCWbVk17HbJlD+Mla/Ai2QmSmPYsQ24MPJVCWStkhWGM/NKccY/XIa5Ifkv1Nfq4MRLdeZ7IYOh0EduW1x9HW9d1Gdd+hw== Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id 9-20020ad45b89000000b0068cbf78a4aasi6209627qvp.310.2024.02.14.13.15.46 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Feb 2024 13:15:46 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-65620-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=jil45KuT; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-65620-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-65620-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id EFAFF1C272C3 for ; Wed, 14 Feb 2024 17:11:55 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3364D61682; Wed, 14 Feb 2024 17:10:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="jil45KuT" Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.9]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0583D6088E; Wed, 14 Feb 2024 17:10:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.9 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707930655; cv=none; b=olGfz4lvbVNZMXLZznOymKvl/At2ywjZ38//RAeSZuAf9oLg+X19rJN93ptnPoo7nEbnENVBFy7RVi/szbNT2zFLLpNlgagY20SQVxNYDup/k0VQgQgYTTfbSVigym/j0Nz59U71QEn9+wjVM0ZWUP0fznkd44Ikg99oWHWvCbo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707930655; c=relaxed/simple; bh=6SSOUnIBqCm1UlIPDdIu3o/LhTRQZBXFqS1PUYB3XUQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=IvxlkhqysQyIU68Nwjlm9S8G6YFSf2zt+QfanJCOERZea3jStT7MPYp6bBaWZrh4r4tBTpU7976mUw8kxPgsXU94hzYAjHHaQndhDBCFJDCBHQrBj5y47PeDp5haqP5hc7qwO7pTzb/wLae7LeDu/scxHWdZhIF1qhus4KPmkoA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=jil45KuT; arc=none smtp.client-ip=198.175.65.9 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1707930654; x=1739466654; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=6SSOUnIBqCm1UlIPDdIu3o/LhTRQZBXFqS1PUYB3XUQ=; b=jil45KuTZP8wEccwSX/Avc2xP4QG07kUPh5aY1NubwKO8S5NFnIsCy9U 45rz8w6SXtvOjZQ+jP6XdktjgzlHgHu7jwuhGk32B1ijJeJ0vsC7yNNzu y8YPSOh6RdVLbOB3okOnDE4DHvXpmGgyBbHqQYi6FRtOAUwxyY8x8PAw+ i+a0aqiKIBazoo9t4VCtD2G4qpIdRktTk/hL7bnTBqcVORmZeOjmPbyOV Nr8boVZvrkeSH2/SjD9wIKCH/ENEgPwVBo9hs0i+S3GTcDFkmoUOiUSHR Wl0Bk4BQIfpzMv8DtHsr5Zirst3dsupMPo0mUjdcqk9RzEFwGG62ZZogW w==; X-IronPort-AV: E=McAfee;i="6600,9927,10984"; a="24458023" X-IronPort-AV: E=Sophos;i="6.06,160,1705392000"; d="scan'208";a="24458023" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orvoesa101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Feb 2024 09:10:53 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10984"; a="935617216" X-IronPort-AV: E=Sophos;i="6.06,160,1705392000"; d="scan'208";a="935617216" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga001.fm.intel.com with ESMTP; 14 Feb 2024 09:10:49 -0800 Received: by black.fi.intel.com (Postfix, from userid 1003) id A70A6A3; Wed, 14 Feb 2024 19:10:48 +0200 (EET) From: Andy Shevchenko To: linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org Cc: Greg Kroah-Hartman , Jiri Slaby , Andy Shevchenko Subject: [PATCH v1 1/5] serial: 8250_exar: Clear interrupts before registering handler Date: Wed, 14 Feb 2024 19:09:34 +0200 Message-ID: <20240214171044.3551032-2-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.43.0.rc1.1.gbec44491f096 In-Reply-To: <20240214171044.3551032-1-andriy.shevchenko@linux.intel.com> References: <20240214171044.3551032-1-andriy.shevchenko@linux.intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790910500119171856 X-GMAIL-MSGID: 1790910500119171856 While now there is no issue if IRQ is fired before we clearing the interrupts as the handler does the same, but strictly speaking it might be problematic if IRQ handler wants to do something more. Move clearing interrupt code to be called before registering the IRQ handler. Signed-off-by: Andy Shevchenko --- drivers/tty/serial/8250/8250_exar.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/tty/serial/8250/8250_exar.c b/drivers/tty/serial/8250/8250_exar.c index 23366f868ae3..32a56ce626b5 100644 --- a/drivers/tty/serial/8250/8250_exar.c +++ b/drivers/tty/serial/8250/8250_exar.c @@ -713,14 +713,14 @@ exar_pci_probe(struct pci_dev *pcidev, const struct pci_device_id *ent) uart.port.irq = pci_irq_vector(pcidev, 0); uart.port.dev = &pcidev->dev; + /* Clear interrupts */ + exar_misc_clear(priv); + rc = devm_request_irq(&pcidev->dev, uart.port.irq, exar_misc_handler, IRQF_SHARED, "exar_uart", priv); if (rc) return rc; - /* Clear interrupts */ - exar_misc_clear(priv); - for (i = 0; i < nr_ports && i < maxnr; i++) { rc = board->setup(priv, pcidev, &uart, i); if (rc) { From patchwork Wed Feb 14 17:09:35 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 201089 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:bc8a:b0:106:860b:bbdd with SMTP id dn10csp1408190dyb; Wed, 14 Feb 2024 10:19:31 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCX8nwwTc6TU6bEZJitva+mEL35Z0HV/ldt+QwLuf/8DiESqD3dyMHJ9zRFOK2CcmZ6FIBTfUj9V3dRaL52yD2Xsc8R+MQ== X-Google-Smtp-Source: AGHT+IEzLh9eFywszDx91yJze7STa7I01xMhEkmsWv9VZBUhqiGf6B/4QsRQwlt1TU1NF3yotQ3+ X-Received: by 2002:a17:903:120f:b0:1da:1d3d:7978 with SMTP id l15-20020a170903120f00b001da1d3d7978mr4400532plh.34.1707934770951; Wed, 14 Feb 2024 10:19:30 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707934770; cv=pass; d=google.com; s=arc-20160816; b=ClHwLblI0d9X6QnPWw5GwsVicfBuMncP9mTNNHAevkmAlQiUdxdZv++vWYFLdKoiS2 yGTngRHQ9kXOdOz8e0dxr9gMGW9GkCFYnQcARNd+95VC3GA55ZGYHpxv8N0nkWj8l03y VgtJT3lvU2ZWVDVz2WlpMi27DlY8q3Q/V/uSTTsBlVq+dd2wqD/xMq9dVC4zb5kzKjlB ju631DGyRg8D+S7wd6TVv+8TsTEurIMpwzEfAeD9t23bM9srd9p0nDS9w4aUbRc314fD Gy7J32CTTlR+gauBMg/X93op+VebveYbfkY7dxI8A0QR0B8kANdFVXbSvU1GEuSW5vQJ F4Vw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=zM4A12j8k7HwZB2sNXOsnVr8nsjic2JBweVebjH/PIk=; fh=UeWJ49slfe1DAiPK3S74GouNgruSzRx1y/3Tk/gYbNI=; b=OItGQPiOCxfmI3/dzYgzEmWPFkFbRJM49Z6V8/6unwaNa5T8BcLG9wEGTrhOlRGnhC Nn76QlSBFF7TEw6R4nITzkC6VU3NxBdwmaMVf9v+/2VMswUWReDiWsJGLzB7Bs2OnrUV u+PFa11FQJIHWbTRocnPGk/HZleaaMthcrlOrwN/akmfZFGz+selT8fC1jhU/Me3vI87 ylapvf190P/tDEdzcMfLUkEJq+b+i/K+zrUmtiMOkY/4cy883dDDfXhQS0EZdlYfp86L vpXOykFoC1zO10cDvEFPeZC9NWJOAh/5i7K2UCJwcF667SJ8HXGwbUGk7P7516++Hb8E 0W7Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="nAaAs3/K"; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-65621-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-65621-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com X-Forwarded-Encrypted: i=2; AJvYcCUfx+tz5Gs1lNAhKVtYDzT+C5gZbqPE0hgbVi1BifoANvTkP8MFdY8VYzthspGyClg8rvvb46I15JPY3nRFH4xPnjebKw== Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id q10-20020a170902eb8a00b001d98fc60058si2013420plg.190.2024.02.14.10.19.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Feb 2024 10:19:30 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-65621-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="nAaAs3/K"; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-65621-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-65621-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 01E6F28B7B0 for ; Wed, 14 Feb 2024 17:12:01 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7BA9760887; Wed, 14 Feb 2024 17:10:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="nAaAs3/K" Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.9]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6189A60BA5; Wed, 14 Feb 2024 17:10:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.9 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707930655; cv=none; b=g0Q+diDJFjnP2W2GSTiwoUt0k/BLyAQ1liPR7tGVlz3i5wNgg0nl3QnkYKHITZUdLJwXIQf6t9cJ20SwHqhp26N1DkTmmiGq8we+TR7Un4Hy3pvO0C/3eLOsFRrNzGP7lb7JEXe29irE7HljniT/AdC1Ts7MbXiz3Ue8Z497dmU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707930655; c=relaxed/simple; bh=kUiZbiEMkh/Xz3+hmq1lLEQ7AxDT02YREhPln3pQnvs=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=donvmMCErqWbOAci3x9+XweYAvRtX1R6Au4uQRsZsEZmmi7LFTdQPmZQEBvZoatMArKKz4TuK+wwzmPppLNeMS3iTF6BfBDi3oo+FjLkx5hK8AlR8MtYTWhpDMC9qYOFmMwR/BbZbS8502ARs5ggLsxuHQI6TRGbt+BgFdPZlf8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=nAaAs3/K; arc=none smtp.client-ip=198.175.65.9 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1707930655; x=1739466655; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=kUiZbiEMkh/Xz3+hmq1lLEQ7AxDT02YREhPln3pQnvs=; b=nAaAs3/Ky88yt1uqfJVfCufWYYnvlsVSCtBbwakDfuFpvsAdZ5W1SNoE veubS1Pr0Icuo0vrTOflqGo6q27AQ+pdgJ0fQzUJilDDmvGpX9SoCCICn f6QReehPW4Gj7mXjSDixiDg9qnigmTeoCKkCSDqLoUL27HnB0a1oL1L0O P/99hd45ZDRizIBp0TxLWqH7FArx/uh78w2yc3iFziDkX+X8MCN0lwppO OKgLMrrSOXP5kzas9sRQHLaSSbpiEAaCXbVkldmHJuxFAWvTJV3ug7cm9 lr4sAoCsivnwO5Rqv/kdPnXeNgNYDIS905lg6vzXMILSvMzfjK+gPkris Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10984"; a="24458026" X-IronPort-AV: E=Sophos;i="6.06,160,1705392000"; d="scan'208";a="24458026" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orvoesa101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Feb 2024 09:10:53 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10984"; a="935617217" X-IronPort-AV: E=Sophos;i="6.06,160,1705392000"; d="scan'208";a="935617217" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga001.fm.intel.com with ESMTP; 14 Feb 2024 09:10:49 -0800 Received: by black.fi.intel.com (Postfix, from userid 1003) id B5BE926D; Wed, 14 Feb 2024 19:10:48 +0200 (EET) From: Andy Shevchenko To: linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org Cc: Greg Kroah-Hartman , Jiri Slaby , Andy Shevchenko Subject: [PATCH v1 2/5] serial: 8250_exar: Use generic function to set firmware node Date: Wed, 14 Feb 2024 19:09:35 +0200 Message-ID: <20240214171044.3551032-3-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.43.0.rc1.1.gbec44491f096 In-Reply-To: <20240214171044.3551032-1-andriy.shevchenko@linux.intel.com> References: <20240214171044.3551032-1-andriy.shevchenko@linux.intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790899410140273555 X-GMAIL-MSGID: 1790899410140273555 Use generic function to set firmware node instead of ACPI specific one. Signed-off-by: Andy Shevchenko --- drivers/tty/serial/8250/8250_exar.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/tty/serial/8250/8250_exar.c b/drivers/tty/serial/8250/8250_exar.c index 32a56ce626b5..7dfb995ec927 100644 --- a/drivers/tty/serial/8250/8250_exar.c +++ b/drivers/tty/serial/8250/8250_exar.c @@ -6,12 +6,12 @@ * * Copyright (C) 2017 Sudip Mukherjee, All Rights Reserved. */ -#include #include #include #include #include #include +#include #include #include #include @@ -375,7 +375,7 @@ static struct platform_device *__xr17v35x_register_gpio(struct pci_dev *pcidev, return NULL; pdev->dev.parent = &pcidev->dev; - ACPI_COMPANION_SET(&pdev->dev, ACPI_COMPANION(&pcidev->dev)); + device_set_node(&pdev->dev, dev_fwnode(&pcidev->dev)); if (device_add_software_node(&pdev->dev, node) < 0 || platform_device_add(pdev) < 0) { From patchwork Wed Feb 14 17:09:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 201109 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:bc8a:b0:106:860b:bbdd with SMTP id dn10csp1471765dyb; Wed, 14 Feb 2024 12:11:48 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWWlQX95AzOfltl6Yt3TmhTxuSA3knpM+XGoUR5y4uwpxCo5COL5eWbYxqXHewV7qj9oL6OH1dvcJMVZ6h55/P0lzP17Q== X-Google-Smtp-Source: AGHT+IGoxPfQTGgTarBGL+0TfiUhM5M73sw/jnKVMZZ52oMMiS2bXf+P4zO+B4DG1g3pt1XuXxRv X-Received: by 2002:a2e:808e:0:b0:2d0:caf2:3ad4 with SMTP id i14-20020a2e808e000000b002d0caf23ad4mr2541419ljg.50.1707941508193; Wed, 14 Feb 2024 12:11:48 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707941508; cv=pass; d=google.com; s=arc-20160816; b=rPKZyf/2W1t0lXC+xRwiU+Q+wM9Nh6IRKY61RyCTLKHJCMZ8uYy1AA+QfjDhBrc5Nb Xg+6NN13lcr7wThSiYJoX7Z8yNQPjmWbn24CtkNITksIR6+4ZD6Phdrf9i7cBgpmaCZ6 TVUbICkfrBwgdoRJnv0WWp5mU4vQKrxAPPg5e5yJYJegLvCjpKw/sXwA6Ey/VLizErIW f5tdxDe5pkua01kFe+sFtIJR+FL8cgsBJIluaYgMRfg52ZFqQxR2rjT5ahV96RrKD6Qv j0xZehf2TY2tqiYz7FI9cAG4qP9aMadGITIZD3NnY4RSpgZa7WOlFivETODlnwWrk/CL LWLw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=0hj2wZSsoZc21ql4bet033UZUQwI+35n3YTQLvF1lqY=; fh=kJcS0flNkY24oHmzmUh4N/eNsfC161ylnEEyRReLTZs=; b=e++xXTSvKBHyEeH9eQhRp6vJVXQdZQtaf2KNN0J4tzX7se5L6cVjs7WfW7cZ5gbm5+ sI2mSoC8/MwVOqGDfS6slQ2issFvJjU8E5v3brv3GL+70CM9pgOLUllk7WzrsayLK4kG MKBLVDSHD91RZ3UwpBHtrsmFb0oT7wHtrtvlOioGbm/UVmCYVHp1hbQVQFHJPxFVrOD5 eQOZ1nnYu30jaPzirrm1c8Oc1IM7usJBRalEavDHvzmFCUgqvGF5tvABcrGDK1x84p79 kowvCRmJzpMhY/ZGAvqVuDKtcsyV2C9b8C7+PV7h/B6bhaQFaxrvxLArKEceID8aAsj7 ZLCQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=EzwMNcYx; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-65619-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-65619-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com X-Forwarded-Encrypted: i=2; AJvYcCXUB8TjZhluXFrgiTU8apr78M9pGN8ehj0LssVrwrQ34RNCmIrL91H77yhtT/heqHpAnCIFOzLPAnHExQBmzad96Ua7Qw== Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id u27-20020a50951b000000b0056101f41c6asi5016345eda.223.2024.02.14.12.11.47 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Feb 2024 12:11:48 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-65619-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=EzwMNcYx; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-65619-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-65619-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 4F61A1F21882 for ; Wed, 14 Feb 2024 17:11:48 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id CED5E612E3; Wed, 14 Feb 2024 17:10:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="EzwMNcYx" Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.9]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 92D5F6087C; Wed, 14 Feb 2024 17:10:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.9 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707930655; cv=none; b=cfikmelu81OGadJSceyyUNxQ+mgO//6jtn/NI3u4QJjuQcKMCaO9G4S6p8Ha+tt2w1VKO97CHM9AhQTehIXU20IfKn0wUg8jGjAsjCzdU3BdDBuIRDxxj/MgUuh3DYP9T6e9ha2ToZ0opUb/r89co2jsLkBZ0Kr+0I3z83H65mc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707930655; c=relaxed/simple; bh=lh/6QP+fLjWx7NnRnuGXCG0uePmFC6Mmb21smh0lUm4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=KDq/szPi6ApbeqK9Gglc3t1++gEtKstOzLZc9XMPsw1KHWtDSX9C38BDaL+isA1HJAKQOHTBJAyz+ryYVxmPIvBdAXNVgkKmlyhQcdVCq4sAucoSTmmUJzTgC3LpPY/NIez67wrOnI85uP0ua+8QDRbOInSDMkY1lZwM5sZRjNc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=EzwMNcYx; arc=none smtp.client-ip=198.175.65.9 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1707930654; x=1739466654; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=lh/6QP+fLjWx7NnRnuGXCG0uePmFC6Mmb21smh0lUm4=; b=EzwMNcYxXHO12VzOFfLoLm3P6TmNQyy4XzYCQ7eg/Dlyo3vy61iw7UMM MATd7EVwwKKDYkUf3tbosClxHNiLLI38z2l/DBpzfiDYn/EGkm4ZZASJy 7fihBGH6tocPhWVYybXtuW1eEDZLeRKGPCj8t13E9nnnnQ6GzKfdMAdMu ytjMH/zCvmrSxEut8GLT/2olvmRbuvShjcDCHzN0m3+bPFTpV9gEwD4C0 QX/GGVFav5rO5oiv1h3lmEOmSY+vSqiQb9IYmG7eXZZaGRCOT48Au6psr N0CS5BONn/vq58L86RUdVKuzJ4c4C2ModabF+pVRfshg3JozjdL+i2PID g==; X-IronPort-AV: E=McAfee;i="6600,9927,10984"; a="24458020" X-IronPort-AV: E=Sophos;i="6.06,160,1705392000"; d="scan'208";a="24458020" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orvoesa101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Feb 2024 09:10:52 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10984"; a="935617214" X-IronPort-AV: E=Sophos;i="6.06,160,1705392000"; d="scan'208";a="935617214" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga001.fm.intel.com with ESMTP; 14 Feb 2024 09:10:49 -0800 Received: by black.fi.intel.com (Postfix, from userid 1003) id BE3FC2DC; Wed, 14 Feb 2024 19:10:48 +0200 (EET) From: Andy Shevchenko To: linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org Cc: Greg Kroah-Hartman , Jiri Slaby , Andy Shevchenko Subject: [PATCH v1 3/5] serial: 8250_exar: switch to DEFINE_SIMPLE_DEV_PM_OPS() Date: Wed, 14 Feb 2024 19:09:36 +0200 Message-ID: <20240214171044.3551032-4-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.43.0.rc1.1.gbec44491f096 In-Reply-To: <20240214171044.3551032-1-andriy.shevchenko@linux.intel.com> References: <20240214171044.3551032-1-andriy.shevchenko@linux.intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790906474972186889 X-GMAIL-MSGID: 1790906474972186889 SIMPLE_DEV_PM_OPS() is deprecated, replace it with DEFINE_SIMPLE_DEV_PM_OPS() and use pm_sleep_ptr() for setting the driver's PM routines. We can now remove the __maybe_unused qualifier in the suspend and resume functions. Signed-off-by: Andy Shevchenko --- drivers/tty/serial/8250/8250_exar.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/tty/serial/8250/8250_exar.c b/drivers/tty/serial/8250/8250_exar.c index 7dfb995ec927..fa750c586b1f 100644 --- a/drivers/tty/serial/8250/8250_exar.c +++ b/drivers/tty/serial/8250/8250_exar.c @@ -12,6 +12,7 @@ #include #include #include +#include #include #include #include @@ -757,7 +758,7 @@ static void exar_pci_remove(struct pci_dev *pcidev) priv->board->exit(pcidev); } -static int __maybe_unused exar_suspend(struct device *dev) +static int exar_suspend(struct device *dev) { struct pci_dev *pcidev = to_pci_dev(dev); struct exar8250 *priv = pci_get_drvdata(pcidev); @@ -774,7 +775,7 @@ static int __maybe_unused exar_suspend(struct device *dev) return 0; } -static int __maybe_unused exar_resume(struct device *dev) +static int exar_resume(struct device *dev) { struct exar8250 *priv = dev_get_drvdata(dev); unsigned int i; @@ -788,7 +789,7 @@ static int __maybe_unused exar_resume(struct device *dev) return 0; } -static SIMPLE_DEV_PM_OPS(exar_pci_pm, exar_suspend, exar_resume); +static DEFINE_SIMPLE_DEV_PM_OPS(exar_pci_pm, exar_suspend, exar_resume); static const struct exar8250_board pbn_fastcom335_2 = { .num_ports = 2, @@ -938,7 +939,7 @@ static struct pci_driver exar_pci_driver = { .probe = exar_pci_probe, .remove = exar_pci_remove, .driver = { - .pm = &exar_pci_pm, + .pm = pm_sleep_ptr(&exar_pci_pm), }, .id_table = exar_pci_tbl, }; From patchwork Wed Feb 14 17:09:37 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 201101 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:bc8a:b0:106:860b:bbdd with SMTP id dn10csp1454981dyb; Wed, 14 Feb 2024 11:41:23 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXbH/YVxuNqLohCJUv4ivfk0NquHjff1y9pNRl1zCPWlJyIgBfOVi2EzN5K9s+muKWm5CoPiUocCru6/+qaz8G5Uyb4Sg== X-Google-Smtp-Source: AGHT+IEaq5n+m/+IjBgwX62uqtnJCevPJu7wziHbBOG1RwnpQXiBZFKGcoFs5/tLZ47pSS+AsUzJ X-Received: by 2002:a17:906:ccc1:b0:a3d:30a0:2e79 with SMTP id ot1-20020a170906ccc100b00a3d30a02e79mr2407790ejb.54.1707939683045; Wed, 14 Feb 2024 11:41:23 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707939683; cv=pass; d=google.com; s=arc-20160816; b=WcXQYH1XyQxxX+ZpoN8bKZLIrSxyMbHuFx3OBafqkip/nxe3zWP4jo8KrpU6aPIA5y oq5kdKBOTPfmWkd4I+D0l/QYlqQM9YhhgeZkLCHV6blC+B397xo4BGwTYG6HvLd7JGe4 Ozx6rI5U9BIDNDKaCLOodV1k9QNkVHJRc1nPN4U2G0va6jSavpFUP+Z90oI5BwFTJA8S NjXnPSR9T4A4x24S9PCp1CjV4PRbZCaAI+v6TRE6fsCeCL98Zptet7DMyZ0uZ3JDMK9p 9V+F50iqHDXi+QWTlD5A83x+MFAo1xGGHMJ5h+4pY1JOTar2GHfjtMFxHko7CJ3UUrZi 2o5g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=Rz+c3eadtqBXgdbTM4S3R1OUeFAXyaSL04fJZrIboas=; fh=AdUYs/2w+aCai534I18yofAJfOZazx1ON0oC+NizVHg=; b=zSq2dVB9535q2/QUHEgyIyXPfVBbd4yoWTgyivkyJ6EbY2zcGGZ8OefDxVBP8X8B6X X7+bLe45YjetEYysZO4om2fDPVt1e5N2LVlJfbJdPvfxBIelhJO2xItehK+ADsKChILv TBO9bOaetjNPSXla2VHb79mjO4VDEheX3JJG+X0MfiO8935NRwf7HSeLxEto6w38jots OsiG/1ecpBL+r+EetCwOsSlDEg4OosCvTc5p1r5pAb9227HXIH4eI5npGRyJN8pKKKzA NDivZR9qOBDNGnL55JSiJ6AX5/Wt9SYwP1h4f8N91u0JyRbQBbNXJZXJQhyLfABt8DSl WqFA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=T0TZ4zlh; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-65622-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-65622-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com X-Forwarded-Encrypted: i=2; AJvYcCULMh8QWJBz1TpMVZ8+xPIYfFzTY4PS0F6x1dj5ERXW4z6K/tSY+dOK9gEkvjgqBmuOusRMTwiWRA242xVoSMSSvaIc0Q== Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id d19-20020a17090648d300b00a3d4cc634e1si774479ejt.96.2024.02.14.11.41.22 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Feb 2024 11:41:23 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-65622-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=T0TZ4zlh; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-65622-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-65622-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id A6C491F2A2B5 for ; Wed, 14 Feb 2024 17:12:13 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5A785627F3; Wed, 14 Feb 2024 17:10:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="T0TZ4zlh" Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.9]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 48FFD60DC4; Wed, 14 Feb 2024 17:10:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.9 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707930656; cv=none; b=N1M7lGuHvoG37VWEoRS4j1IaBzhXrS1GhviKrFFJ8Ugn5WCCpSOGW8p2DnJbczVCTXZNFOrWk+1dUSlnjLE6qLHj6o3DAiOq5keZdW+y0TdpUpfmcan9n9PMyfb0n8Facw0oRIROXFpWQs8LQqLHcM8m2OUqPBP/ONZRyyy/IR4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707930656; c=relaxed/simple; bh=iqu0R7URicehdQ5woAZiYQWwq+ZkriMjICQ++/Ppr5c=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=KRFI8oGMOxNbQjSLKk1Zlwbdl8Yof16nm4EctETbmpzjDKhD3npOsEAoiYCfoEBnrJ2WO7FfWigLhvRpC8eGnu8P7pEvMq/eXmvOXU5UpqMXGbvpnCZTEPPZVWwHKJGTWf6/W9mkhNZV5pDBvakMUou0mDDXZ1fIxqRDKJ3Ocj4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=T0TZ4zlh; arc=none smtp.client-ip=198.175.65.9 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1707930656; x=1739466656; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=iqu0R7URicehdQ5woAZiYQWwq+ZkriMjICQ++/Ppr5c=; b=T0TZ4zlhTdZqL4/snzN9WRUlMxCUYyNKHjTS266XxMmsVLSYiB29zRFk n0qdWk6YSnTQf+rooH/XsPU8MDKCLCLKM3x9Lvu5C27RxQAFIU2f819X3 PbeIz8PP/zBzBYbwdXPnGWCa4zo0qMTKWFnukdkLQz4utYgZc6u0QLUJx 2K6p5ClAiOql5RcK3RrqtpfLBLnVQk4ur2XS0XbTX7WZ63hUKtJ8J4y1M q5F8GFKDJ1vPMlwSau0kJrhNB7YGSSzXwREauiqvpW7QXsnHujzeLuOcR Ng1BpQAYiiARiFv5ofOGhXxKsHJ/nWgo4O9/iU35XNn0ql8BzYAKKgHr+ g==; X-IronPort-AV: E=McAfee;i="6600,9927,10984"; a="24458029" X-IronPort-AV: E=Sophos;i="6.06,160,1705392000"; d="scan'208";a="24458029" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orvoesa101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Feb 2024 09:10:53 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10984"; a="935617218" X-IronPort-AV: E=Sophos;i="6.06,160,1705392000"; d="scan'208";a="935617218" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga001.fm.intel.com with ESMTP; 14 Feb 2024 09:10:49 -0800 Received: by black.fi.intel.com (Postfix, from userid 1003) id C6A572E9; Wed, 14 Feb 2024 19:10:48 +0200 (EET) From: Andy Shevchenko To: linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org Cc: Greg Kroah-Hartman , Jiri Slaby , Andy Shevchenko Subject: [PATCH v1 4/5] serial: 8250_exar: Use 8250 PCI library to map and assign resources Date: Wed, 14 Feb 2024 19:09:37 +0200 Message-ID: <20240214171044.3551032-5-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.43.0.rc1.1.gbec44491f096 In-Reply-To: <20240214171044.3551032-1-andriy.shevchenko@linux.intel.com> References: <20240214171044.3551032-1-andriy.shevchenko@linux.intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790904560918650007 X-GMAIL-MSGID: 1790904560918650007 8250 PCI library provides a common code to map and assign resources. Use it in order to deduplicate existing code and support IO port variants. Signed-off-by: Andy Shevchenko --- drivers/tty/serial/8250/8250_exar.c | 10 +++++----- drivers/tty/serial/8250/Kconfig | 1 + 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/drivers/tty/serial/8250/8250_exar.c b/drivers/tty/serial/8250/8250_exar.c index fa750c586b1f..3913b8a99161 100644 --- a/drivers/tty/serial/8250/8250_exar.c +++ b/drivers/tty/serial/8250/8250_exar.c @@ -24,6 +24,7 @@ #include #include "8250.h" +#include "8250_pcilib.h" #define PCI_DEVICE_ID_ACCESSIO_COM_2S 0x1052 #define PCI_DEVICE_ID_ACCESSIO_COM_4S 0x105d @@ -230,13 +231,12 @@ static int default_setup(struct exar8250 *priv, struct pci_dev *pcidev, struct uart_8250_port *port) { const struct exar8250_board *board = priv->board; - unsigned int bar = 0; unsigned char status; + int err; - port->port.iotype = UPIO_MEM; - port->port.mapbase = pci_resource_start(pcidev, bar) + offset; - port->port.membase = priv->virt + offset; - port->port.regshift = board->reg_shift; + err = serial8250_pci_setup_port(pcidev, port, 0, offset, board->reg_shift); + if (err) + return err; /* * XR17V35x UARTs have an extra divisor register, DLD that gets enabled diff --git a/drivers/tty/serial/8250/Kconfig b/drivers/tty/serial/8250/Kconfig index a5eb2657f279..52d8589f1dbe 100644 --- a/drivers/tty/serial/8250/Kconfig +++ b/drivers/tty/serial/8250/Kconfig @@ -149,6 +149,7 @@ config SERIAL_8250_PCI config SERIAL_8250_EXAR tristate "8250/16550 Exar/Commtech PCI/PCIe device support" depends on SERIAL_8250 && PCI + select SERIAL_8250_PCILIB default SERIAL_8250 help This builds support for XR17C1xx, XR17V3xx and some Commtech From patchwork Wed Feb 14 17:09:38 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 201098 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:bc8a:b0:106:860b:bbdd with SMTP id dn10csp1439370dyb; Wed, 14 Feb 2024 11:12:00 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWedr/07/UtTjMFkAQfXhqxyAYSRSJxc9I1wlECZHyCdmhO7mX2IjQkh71q4vWQHDsPRLg1uQJq/0wryJkkySKun5XpGg== X-Google-Smtp-Source: AGHT+IF4vMTT+tuCxYrpiSYERFkz4UxYebJqFrRJnRhyKG5Ght92H1h5x9239LfwxxZ8KiqJAhQw X-Received: by 2002:a17:902:eb42:b0:1d9:6984:2b14 with SMTP id i2-20020a170902eb4200b001d969842b14mr3545725pli.46.1707937919792; Wed, 14 Feb 2024 11:11:59 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707937919; cv=pass; d=google.com; s=arc-20160816; b=dh+AaLEeUastwILZfsxnIyxBml1SYM+qFXCy+hgrX444vpEHWSL5xFIkHQxGmqqazy dGSUv7JT6zfhBTNoPYaI+7r7FmN8+kIUwGvDWxk5rHTtHDOcV0HH8d08GvPHM23pY68q r+HmhkohvZQsR022z7l8AJkmrWUhdb4yFDD3FrQfAIeExxAj6PQu9/Nr2l8SG0hvySsm A+Ug5ir6za1Lv0W6+gIay3Z5eqx78WJbASTq/0K/q/9B15zk3zQDx4mZM+Gb5YHjqHzM oGU5tqHjjSJRo2+qxs6C3nPsFFpSaCxZ7vADYMqBnn9MPx/cc3q455wWwzZ2tapLJlwQ f8Ww== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=KWBkGSIeu78EQF/K92E1Iz8q67cp4sE7U4nucUrvMCA=; fh=6h6HxvjuSZNHCn6J3k/eMDqv1wLJloVQd+MC9yVSpCs=; b=0DkTmgqu3HTUXRlHpigJX1I72LzfsIz6ro8t7hY4NSrBuUL56s1ruzDCismtfgSmTO I/flxhT9Fo+ttNo3wOue7Sj1yMgUkxdtUP6SzIZboeFfhWywP8cWiDqC4flDwd1TkYEN 1Vf1fZ2kITNG9ifzpag+D0D+QXMnTMVxkGLAZl+2wP+rpZRzDykdibrp4+TwVpEbKbBh HhDE6lwxb0dBJ5HzUvOTWd+PHsXDxlMx8AhrknJZuiqVsLl6Mdtmn/8tpz2aghTXnYl4 DUIKEt3YKzmlWyGVHNTTEyDqpLFj0idOJfGHFF8cBLQ1WzxZQ64bNv6vsAD022QGyTgK qmlQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=lwVTDd3L; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-65623-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-65623-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com X-Forwarded-Encrypted: i=2; AJvYcCXJfH+UnLv/djgDPDtt9kukK/dJv2fz53fU4cXfkGsVW00lDPHOhVBNIlx0Ge9ixuZrnywQYJjshXGCY7SG03lP8NK8GQ== Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id c8-20020a170902d48800b001da2a3e4b27si4347095plg.294.2024.02.14.11.11.59 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Feb 2024 11:11:59 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-65623-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=lwVTDd3L; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-65623-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-65623-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id EB40028D814 for ; Wed, 14 Feb 2024 17:12:16 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BCE4E629E1; Wed, 14 Feb 2024 17:10:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="lwVTDd3L" Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.9]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9C6ED60DD7; Wed, 14 Feb 2024 17:10:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.9 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707930657; cv=none; b=dmfXkG4c8Bijn7QRZbR0OQ/QIpA5CU+slWN4fUksXnQbi3Iyg4wzSad9B4OT2rr+CMjOBgkVQPfw1cKpICXZMD9CAlGtTT2mMU1iMKh7f+ZatKVurgvR9MWykwCpSY3i4ioI83V2GBxLUyxEXqmPjp0OByMtaisrSx2eJVN947I= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707930657; c=relaxed/simple; bh=cWneu4cGadnP43AtfM005VSnasQf0LJKmBQueS3iyM0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=VDCX1cReGgi/JWzaJe7xWgi03QFNdWcsQS7FHoiQZC2SH6J5NW/9EJTAlPTsqYakc0gF2ZvkLipcANqmsimWkBU5tyQMsaqDVs/fYAFKPFOmcjhTCVeM1Ps+XBvGX+Un/nSot+AXyXeZPuum5s6JIHCGZdYjrO3ox3loQzeP3DQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=lwVTDd3L; arc=none smtp.client-ip=198.175.65.9 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1707930656; x=1739466656; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=cWneu4cGadnP43AtfM005VSnasQf0LJKmBQueS3iyM0=; b=lwVTDd3L01cP5pIsqSOlhggcwtfyQMNKyN3xpayznZXYpx5n4kw/Y9go 6ly/VQnMNlX28+bSrtYZuwUTxgRDYGRZ4XeLp4fo5b9CxL48Ub0einC1M GNKp6kVEvqhd3JNmcD2BuRQrjy+Kd6SdCAt7NPkRB4kORcF+6/Z1VRCxN kMgf5Jd4fa4hOn8ItgWIeDqpn4wWp0jrdSlkye6kpUY3QREl5+bBLJFLz bMW9fmqQsLikGMC9XSbtEcuKK9kDYdHc7bP5poG3N4KqlHqdmYGOM6I4g 98oFO4M69YBBrvrrpunOoPfbFX2iRUQ4K+CjG9XRRBfySonqbWw6w0MMy w==; X-IronPort-AV: E=McAfee;i="6600,9927,10984"; a="24458033" X-IronPort-AV: E=Sophos;i="6.06,160,1705392000"; d="scan'208";a="24458033" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orvoesa101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Feb 2024 09:10:54 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10984"; a="935617219" X-IronPort-AV: E=Sophos;i="6.06,160,1705392000"; d="scan'208";a="935617219" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga001.fm.intel.com with ESMTP; 14 Feb 2024 09:10:52 -0800 Received: by black.fi.intel.com (Postfix, from userid 1003) id CF7E9338; Wed, 14 Feb 2024 19:10:48 +0200 (EET) From: Andy Shevchenko To: linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org Cc: Greg Kroah-Hartman , Jiri Slaby , Andy Shevchenko Subject: [PATCH v1 5/5] serial: 8250_exar: Don't use "proxy" headers Date: Wed, 14 Feb 2024 19:09:38 +0200 Message-ID: <20240214171044.3551032-6-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.43.0.rc1.1.gbec44491f096 In-Reply-To: <20240214171044.3551032-1-andriy.shevchenko@linux.intel.com> References: <20240214171044.3551032-1-andriy.shevchenko@linux.intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790902712143902046 X-GMAIL-MSGID: 1790902712143902046 Update header inclusions to follow IWYU (Include What You Use) principle. Signed-off-by: Andy Shevchenko --- drivers/tty/serial/8250/8250_exar.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/drivers/tty/serial/8250/8250_exar.c b/drivers/tty/serial/8250/8250_exar.c index 3913b8a99161..0afd33a9cf0d 100644 --- a/drivers/tty/serial/8250/8250_exar.c +++ b/drivers/tty/serial/8250/8250_exar.c @@ -6,20 +6,24 @@ * * Copyright (C) 2017 Sudip Mukherjee, All Rights Reserved. */ +#include +#include +#include #include +#include #include -#include +#include #include #include #include #include #include +#include +#include + +#include #include #include -#include -#include -#include -#include #include