Received: by 2002:a05:7208:9594:b0:7e:5202:c8b4 with SMTP id gs20csp1492616rbb; Mon, 26 Feb 2024 10:57:32 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXeeOahuGzzHHB5jULr8Zh9Et0tVbEqhCQ+GYAAT3yZ0YfCZCsm2CAFNDYYLHXO+8Wp6hbjC7P8jp19tPIm9rnt3YgV+XmyGnrCiP4U8A== X-Google-Smtp-Source: AGHT+IGVG4+I/6z4q4fVXpQlZ5yPzt0847JVWxMuGr7YiNvLburGkCINA0+TdqfQy3N+hRic9cMy X-Received: by 2002:a05:6a21:3a81:b0:1a1:237:7aee with SMTP id zv1-20020a056a213a8100b001a102377aeemr29756pzb.2.1708973852667; Mon, 26 Feb 2024 10:57:32 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708973852; cv=pass; d=google.com; s=arc-20160816; b=EQmq7taBwAI9eYUJ53/4+U4s5rIA6Yiy2IqpDg6dl+67OpctluWVGVZRCfhkbS4a4c EXWEUtf3YtS9R0lsOG1EgoGpwGkjCDNE7MgGZv4ykxw1PbCHa57VYkGmcI4TvOZNsxpC 4i6qfUyLOULu2XkkA4wdbSwpPew7l8PkVJx791tLzBlOBr4HQULRBfF/nGL9aRZR0Uqr MtxVGVq0t7ZPSHV+4B0eqmAix8In2rRi5HfgeXJZXN0lFL6HJMRpLyO8zvKgSttNMXFj J8VBzbtJEesT7yNUdn2146Skva5atucdllbjw7mD8fxhCxrXRijzvwRbWGMUbqXM3Skv Z/IQ== 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=Z0dj9W8VWDub2GWGN8QZyEttLdutj4Rai0HLPSh4DKQ=; fh=x+GyWh+d0fSlsBO19rBAGT/zXvddHk2lhaP+wXtmjdg=; b=uH12ktk9FWEdsOLa/gJ5zB6Nb23UcJWPkhvxLviIyN+9AQfeeZiIXfr+gM9sRrhRct 4BkjuW5WKAt6X+Xt0V7kg7MpBRTAym2dH6BsbjhH0KhU+GcA1bGjYBkVnChSvj8ctNX8 1zLTnJidj5s6s1GalMac4J2ay96GzkHxb9ErxGGaL8H3pjvHN90GAu+l/y3gtUkiEtMv gmksyW85e8Qzb0nIDxhh8Tcf9DxgqwITvfWAwAL8MjfDl5XUYcC9lVLRJ7Z54UEztOco CX9PWhbriVPX8DsHB/ito81k5+Fjw0eaFjSh1/2r0tDJBvj9TE6yeMUKmgPDY1jMDZVr DWqQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Z+MKX2kW; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-81615-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-81615-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id u35-20020a631423000000b005db918c79b2si4133281pgl.326.2024.02.26.10.57.32 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Feb 2024 10:57:32 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-81615-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Z+MKX2kW; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-81615-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-81615-linux.lists.archive=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 sy.mirrors.kernel.org (Postfix) with ESMTPS id E7A92B254F9 for ; Mon, 26 Feb 2024 14:28:15 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2130C12E1D9; Mon, 26 Feb 2024 14:25:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="Z+MKX2kW" Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.16]) (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 833EA12C7FC; Mon, 26 Feb 2024 14:25:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.16 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708957536; cv=none; b=uQyzlKPswkb1Mkbe79Cg88jK7TZHpXs+O7ndSyaipkEvk5Qx9YBob+8OhZgeWEuZw0cetvgAcEss6SuQbltkLBxKJQz6xXAUkndcUbKr+uQfsQ2PsBaHg3lAgN+MKYEkJHgCbNxs6ql+8nNsVLnMa5ABXSSt6Y+SsdemrTNKXvM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708957536; c=relaxed/simple; bh=J0xi+n8uZBq6TA4lbxbqQ3C4vIDv86jFL+mrVMUmGoA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=WBbFt3c5alT1mb/1facOb4vK0+efv1fCDatylDzRkSAZZ2p7SwsiJ4f6v50cvNm3DF0dGbFMpl9moR4KqS+htp2rIybOOFwuAyDt2jy2RSRTjxpHsMsC1+SdtmcF5nJu915pRBRekuAI2EwSXK+95hZoBQdWy4ORQwii/p/ZqO0= 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=Z+MKX2kW; arc=none smtp.client-ip=198.175.65.16 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=1708957535; x=1740493535; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=J0xi+n8uZBq6TA4lbxbqQ3C4vIDv86jFL+mrVMUmGoA=; b=Z+MKX2kWCWOIqP6LcpXKezsJSGWZKITA9oaGGQ+f6Hcvl02ij9plBqzm midO6vxWsLh3ts2sp2r5toez+ef/x47v0qfO7SYzdrQUgURHFwX32o/zM TNvVRLj7XYJznHcGY0sW6QvpplvumkPfj/VCXPFBugQ1GwGqov6mOohzc zQFzNjhtbp+RHN7xu+lrUupzY7Wp1D9H42P1lh4X+RMvS5klm6MvEORA8 iBpua3b1+Zv1ezAb8ucU/zF3fi9hnaxIk3ThW7Ut2IZ+B/fv1Gjyj5FAX tx/Hd3kFwRQsSPyl5GCHe60qTgWXkcoHy5YxwhAwZ+weDut+6NaaN6ze0 Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10995"; a="3375237" X-IronPort-AV: E=Sophos;i="6.06,185,1705392000"; d="scan'208";a="3375237" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orvoesa108.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Feb 2024 06:25:31 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10995"; a="937030149" X-IronPort-AV: E=Sophos;i="6.06,185,1705392000"; d="scan'208";a="937030149" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga001.fm.intel.com with ESMTP; 26 Feb 2024 06:25:24 -0800 Received: by black.fi.intel.com (Postfix, from userid 1003) id 98B77A0D; Mon, 26 Feb 2024 16:25:16 +0200 (EET) From: Andy Shevchenko To: Greg Kroah-Hartman , Andy Shevchenko , Thomas Gleixner , linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-aspeed@lists.ozlabs.org, linux-rpi-kernel@lists.infradead.org, linux-mips@vger.kernel.org, linux-tegra@vger.kernel.org Cc: Jiri Slaby , Joel Stanley , Andrew Jeffery , Florian Fainelli , Broadcom internal kernel review list , Ray Jui , Scott Branden , Al Cooper , =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= , Paul Cercueil , Vladimir Zapolskiy , Thierry Reding , Jonathan Hunter , Kunihiko Hayashi , Masami Hiramatsu Subject: [PATCH v2 12/14] serial: 8250_pxa: Switch to use uart_read_port_properties() Date: Mon, 26 Feb 2024 16:19:28 +0200 Message-ID: <20240226142514.1485246-13-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.43.0.rc1.1.gbec44491f096 In-Reply-To: <20240226142514.1485246-1-andriy.shevchenko@linux.intel.com> References: <20240226142514.1485246-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 Content-Transfer-Encoding: 8bit Since we have now a common helper to read port properties use it instead of sparse home grown solution. Signed-off-by: Andy Shevchenko --- drivers/tty/serial/8250/8250_pxa.c | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/drivers/tty/serial/8250/8250_pxa.c b/drivers/tty/serial/8250/8250_pxa.c index 77686da42ce8..0c9140b93414 100644 --- a/drivers/tty/serial/8250/8250_pxa.c +++ b/drivers/tty/serial/8250/8250_pxa.c @@ -92,11 +92,7 @@ static int serial_pxa_probe(struct platform_device *pdev) struct uart_8250_port uart = {}; struct pxa8250_data *data; struct resource *mmres; - int irq, ret; - - irq = platform_get_irq(pdev, 0); - if (irq < 0) - return irq; + int ret; mmres = platform_get_resource(pdev, IORESOURCE_MEM, 0); if (!mmres) @@ -114,21 +110,21 @@ static int serial_pxa_probe(struct platform_device *pdev) if (ret) return ret; - ret = of_alias_get_id(pdev->dev.of_node, "serial"); - if (ret >= 0) - uart.port.line = ret; - uart.port.type = PORT_XSCALE; - uart.port.iotype = UPIO_MEM32; uart.port.mapbase = mmres->start; - uart.port.regshift = 2; - uart.port.irq = irq; - uart.port.fifosize = 64; uart.port.flags = UPF_IOREMAP | UPF_SKIP_TEST | UPF_FIXED_TYPE; uart.port.dev = &pdev->dev; uart.port.uartclk = clk_get_rate(data->clk); uart.port.pm = serial_pxa_pm; uart.port.private_data = data; + + ret = uart_read_port_properties(&uart.port, true); + if (ret) + return ret; + + uart.port.iotype = UPIO_MEM32; + uart.port.regshift = 2; + uart.port.fifosize = 64; uart.dl_write = serial_pxa_dl_write; ret = serial8250_register_8250_port(&uart); -- 2.43.0.rc1.1.gbec44491f096