Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp5582556img; Wed, 27 Mar 2019 11:07:21 -0700 (PDT) X-Google-Smtp-Source: APXvYqzlF/ZZ3RPQz1QuvJOMNwUOdV0Y6fbSEKRgh9ys+1RFJxNa7HXOn022tWDZQ8Y3YqQrsBW/ X-Received: by 2002:a63:530e:: with SMTP id h14mr11446470pgb.136.1553710041579; Wed, 27 Mar 2019 11:07:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553710041; cv=none; d=google.com; s=arc-20160816; b=vdRRPOeTt1d8W5FOW0qW2Y048dxxl7+F9/qJahC3srd6OwrCUHi3kcFOuYG/TVs8p3 8cG7evCvH5bMrXegvMRcKJm/JZVmKhVJXX/OlKySWv7zyXG97Dt+mDwfsNyasrd4d1N/ UGaEMsVujsgPaPWBbZFlhHluwSRv/1bxA4prCWe8kl6f8luli00DbSHrTpd4ICnosgut zYicm0RLkPqbF68fqcOLfpN3MKLq4yzjCe0mTy3uOLFUHB73udl7DgiiDIxgbqUCCE0g SvwQ8eVzBzoW3gCTKJEfH3GXeaFTD6ULEGDMsVmV6z1W/6Yu2JQwmg9NFAMIVCGQZufz ylyw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=HhB6QoRAP8DSfnvKqmOzGSBW+Fz9vSGIlOrH7g17C2g=; b=VxXaDnbZTEpX6ZF6P6YbNnArcuo5gkVhlKHtvJUaf40nd9J72dmlMb1ZcOhklovSjK U8jspHobuqqqPgVIhOHrUIqIU854D99+qnRwppJe6Ozu4CDpia4rQc/XFQx4A3HIWvxU 6zDNmqpjNVLZauUVOIqGDS0YLXGkEF5d6y+m9O63w6uDC3nR6BscvRmPlN55H8/PoNUI zM7AalbxtlN/1iMhBURTb71GRLO1FPA0Ja6viUEWz8pqp3Bt6jdI51pfmjSIRV4TB4/8 9guD1WoXGnug1DvVB09pl/F1hFQPy+ANG9TQ3q6EP6fJCsmWOvJm4u0iPoIE13FCNcSR qXgQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=GPAPntfi; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k131si8968512pga.267.2019.03.27.11.07.06; Wed, 27 Mar 2019 11:07:21 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=GPAPntfi; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1733302AbfC0SEe (ORCPT + 99 others); Wed, 27 Mar 2019 14:04:34 -0400 Received: from mail.kernel.org ([198.145.29.99]:45254 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1733281AbfC0SEc (ORCPT ); Wed, 27 Mar 2019 14:04:32 -0400 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 6D5F5217F5; Wed, 27 Mar 2019 18:04:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1553709872; bh=iMmcy8l6fQyXQugGMiuXU/pVATVpFRkESNIuDS8i0og=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GPAPntfikYuETmOemYhZp2NvkrF6hQFlGEGcHfgvCkZ3nTfvcs4rjIcBaIc/uHD1c OFyI+WPVA4OBDzlOt+ker3B7g4z2DkLg+tQQWGrj38oGRnjHAwFl74xc2ZiJPl8/ux TePhnPt3EQKqdFYTuNNDAldZDTRwedQEe7egy27w= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Lubomir Rintel , Greg Kroah-Hartman , Sasha Levin , linux-serial@vger.kernel.org Subject: [PATCH AUTOSEL 5.0 082/262] serial: 8250_pxa: honor the port number from devicetree Date: Wed, 27 Mar 2019 13:58:57 -0400 Message-Id: <20190327180158.10245-82-sashal@kernel.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20190327180158.10245-1-sashal@kernel.org> References: <20190327180158.10245-1-sashal@kernel.org> MIME-Version: 1.0 X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Lubomir Rintel [ Upstream commit fe9ed6d2483fda55465f32924fb15bce0fac3fac ] Like the other OF-enabled drivers, use the port number from the firmware if the devicetree specifies an alias: aliases { ... serial2 = &uart2; /* Should be ttyS2 */ } This is how the deprecated pxa.c driver behaved, switching to 8250_pxa messes up the numbering. Signed-off-by: Lubomir Rintel Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin --- drivers/tty/serial/8250/8250_pxa.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/tty/serial/8250/8250_pxa.c b/drivers/tty/serial/8250/8250_pxa.c index b9bcbe20a2be..c47188860e32 100644 --- a/drivers/tty/serial/8250/8250_pxa.c +++ b/drivers/tty/serial/8250/8250_pxa.c @@ -113,6 +113,10 @@ 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; -- 2.19.1