Received: by 10.223.164.202 with SMTP id h10csp1592218wrb; Mon, 27 Nov 2017 04:59:26 -0800 (PST) X-Google-Smtp-Source: AGs4zMY1/TsSyPWdkaLjI1WnRvwULpBx4cRE8PAgVSUE0BKhFmJ0+moK9x6JB2TvwUaz2bnf7P4B X-Received: by 10.101.100.215 with SMTP id t23mr11294610pgv.433.1511787566346; Mon, 27 Nov 2017 04:59:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511787566; cv=none; d=google.com; s=arc-20160816; b=mt9H9N9XtZg9Xy76KxZUEar+CWB2ejBazwIFESDdsT6tVO3Lc0fCNT6wwu2ec1tmYV MhmOibtSO8VbeM2ylnVupBlKjePk7sI9xzNMVwit5wJKZGmJEdRlf6Bz4NIFCNnQHbiW bfPE/g8wA5r4p52RDDjpZGVMdUrA/9MbPL3mDI/bhLGXljdvaLE+5Y5ZULbYvAAh73mV qHvoJqgf6IU694hnb7JuxkGxYAWJ9lIFY5OXELX6jIszgu2C/5h9/jeTECgKaHRIjSH/ 4Jj7BkA0eCnNyNmFh6QRNroU2CmQ4L00HcKNIbW5tH9MjTfaKfkYmdWtY+4snrBb47Q2 4Rgg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=E2xiAUUmNt3V5p4OcXYkNBWpOnHrVJ0EG70SnHRHUx4=; b=UCzQgTsCImi7zkrrjpeWgl28r58BHV6pzkDQJO0FFp4xU9Zo3i3UfAOzqBhkWrOv3l lMjXQGAmItcFfEyooOcO4JTzK3ZK99fIu2gy124/Yhw3jFQgeXJfIHJJmfna/dbsvo9U /hxSBsbNkNOuHBVGqfiflFkiSagDbAKiYzIXfKxbenFPsX0PmSug6ih9ZxDMi3xI+l3Q 1q1VQtOQutysxPFkB7HbjGcadoRU10IDdVPV1YovAhHj/xe8UmDthfAZuwd3iR0uvIwQ q/weul+1NEnFli96JuO+TG/PbRvynWWjHdKaBH0ILlgdEYYUtrx+Yu6L2BMdoGob3KzJ uv4w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=jrzPzqdc; 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=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f4si22257992plr.346.2017.11.27.04.59.14; Mon, 27 Nov 2017 04:59:26 -0800 (PST) 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=@gmail.com header.s=20161025 header.b=jrzPzqdc; 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=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752996AbdK0M5V (ORCPT + 77 others); Mon, 27 Nov 2017 07:57:21 -0500 Received: from mail-pl0-f67.google.com ([209.85.160.67]:40847 "EHLO mail-pl0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752148AbdK0MzN (ORCPT ); Mon, 27 Nov 2017 07:55:13 -0500 Received: by mail-pl0-f67.google.com with SMTP id 62so8429687plc.7; Mon, 27 Nov 2017 04:55:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=E2xiAUUmNt3V5p4OcXYkNBWpOnHrVJ0EG70SnHRHUx4=; b=jrzPzqdcbI2qYmKwXvYZyAzfj+jnuw0zQmpFQJGVV0Iu58WSt9TN76DcXPVKBNyVGY QvDqqtMFNNHib7y9grRIJG6oycLqp3W3PJHG8zsqeky8z57nw4Gp63rpEzzcjQCiTvkv qiVJyOhrpf/UCYzFdDk2eWX3btyeC2Dij7bnHG2VWrZ9UDBrTSUQDz2MprT/br4mXjN2 sCV8i9vbQLBvftWWQ/NNM/qO/74U5WelXCSZYq8t7Og8vIq780fN4V4jePAGVxIy0TRL eauIM/Sg32qYoxpAuDgGFHpVlHnosFfxec1FqD2wVJKgsHm7KrYtFhwWJJtBiHTozFuW ZW/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=E2xiAUUmNt3V5p4OcXYkNBWpOnHrVJ0EG70SnHRHUx4=; b=sUQSBdkY8dn+BETjw+BFQmkyWv46eIfXJzs0MXiBtFe4NhFK6oEFlmvoWmDmIgjrFw ZMeCufKxppE8Q1MMDInq4HDE6VWeRRuG7dG66UUxh6qtGp2lXsSHymG8h4+OBmgyqLM+ f/xXuDsCJzEQGokk9+FYvZWFav4yB3cb9cjltRetAdHuMMvqAfj//FekA5v/NgLeHDo7 qutzJWAEDluMe+dLvGne3A5mDMHAA1dVLqfBBfMyVboEJ+aMjgWMwDE+vSjr8Vyzhso+ 5lKMS73vcIfcwqV9XPcPHiiLL4N91UOv4AoU1OweHYZD229A1EL3rgtVnApu7L0r9lfw hs3g== X-Gm-Message-State: AJaThX7tL8kkFmFvNqTunP9rcg/gKCTZPl6x770OepGkwG9cyFf+m/Cv WstwI4Dp0s7ExNU5+Lr/fxE= X-Received: by 10.84.176.65 with SMTP id u59mr14270438plb.419.1511787312669; Mon, 27 Nov 2017 04:55:12 -0800 (PST) Received: from app09.andestech.com ([118.163.51.199]) by smtp.gmail.com with ESMTPSA id w64sm55225459pfj.62.2017.11.27.04.55.09 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 27 Nov 2017 04:55:11 -0800 (PST) From: Greentime Hu To: greentime@andestech.com, linux-kernel@vger.kernel.org, arnd@arndb.de, linux-arch@vger.kernel.org, tglx@linutronix.de, jason@lakedaemon.net, marc.zyngier@arm.com, robh+dt@kernel.org, netdev@vger.kernel.org, deanbo422@gmail.com, devicetree@vger.kernel.org, viro@zeniv.linux.org.uk, dhowells@redhat.com, will.deacon@arm.com, daniel.lezcano@linaro.org, linux-serial@vger.kernel.org Cc: green.hu@gmail.com Subject: [PATCH v2 31/35] earlycon: add reg-offset to physical address before mapping Date: Mon, 27 Nov 2017 20:28:18 +0800 Message-Id: <5b5f07ffd75d509a661398d02d6f1336156554ae.1511785528.git.green.hu@gmail.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: References: In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Greentime Hu It will get the wrong virtual address because port->mapbase is not added the correct reg-offset yet. We have to update it before earlycon_map() is called --- drivers/tty/serial/earlycon.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/tty/serial/earlycon.c b/drivers/tty/serial/earlycon.c index 98928f0..17dba0a 100644 --- a/drivers/tty/serial/earlycon.c +++ b/drivers/tty/serial/earlycon.c @@ -253,11 +253,12 @@ int __init of_setup_earlycon(const struct earlycon_id *match, } port->mapbase = addr; port->uartclk = BASE_BAUD * 16; - port->membase = earlycon_map(port->mapbase, SZ_4K); val = of_get_flat_dt_prop(node, "reg-offset", NULL); if (val) port->mapbase += be32_to_cpu(*val); + port->membase = earlycon_map(port->mapbase, SZ_4K); + val = of_get_flat_dt_prop(node, "reg-shift", NULL); if (val) port->regshift = be32_to_cpu(*val); -- 1.7.9.5 From 1585381562041123537@xxx Wed Nov 29 06:41:17 +0000 2017 X-GM-THRID: 1584741620848037506 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread