16fb238
From patchwork Mon Jul 23 15:34:31 2018
16fb238
Content-Type: text/plain; charset="utf-8"
16fb238
MIME-Version: 1.0
16fb238
Content-Transfer-Encoding: 7bit
16fb238
X-Patchwork-Submitter: Andre Przywara <andre.przywara@arm.com>
16fb238
X-Patchwork-Id: 10540521
16fb238
Return-Path: <linux-mmc-owner@kernel.org>
16fb238
Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org
16fb238
 [172.30.200.125])
16fb238
	by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 1B83B157A
16fb238
	for <patchwork-linux-mmc@patchwork.kernel.org>;
16fb238
 Mon, 23 Jul 2018 15:34:37 +0000 (UTC)
16fb238
Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1])
16fb238
	by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 08A2228B94
16fb238
	for <patchwork-linux-mmc@patchwork.kernel.org>;
16fb238
 Mon, 23 Jul 2018 15:34:37 +0000 (UTC)
16fb238
Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486)
16fb238
	id F046028C33; Mon, 23 Jul 2018 15:34:36 +0000 (UTC)
16fb238
X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on
16fb238
	pdx-wl-mail.web.codeaurora.org
16fb238
X-Spam-Level: 
16fb238
X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI,
16fb238
	RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1
16fb238
Received: from vger.kernel.org (vger.kernel.org [209.132.180.67])
16fb238
	by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 903BC28B94
16fb238
	for <patchwork-linux-mmc@patchwork.kernel.org>;
16fb238
 Mon, 23 Jul 2018 15:34:36 +0000 (UTC)
16fb238
Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
16fb238
        id S2387995AbeGWQgV (ORCPT
16fb238
        <rfc822;patchwork-linux-mmc@patchwork.kernel.org>);
16fb238
        Mon, 23 Jul 2018 12:36:21 -0400
16fb238
Received: from foss.arm.com ([217.140.101.70]:35828 "EHLO foss.arm.com"
16fb238
        rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP
16fb238
        id S2387968AbeGWQgV (ORCPT <rfc822;linux-mmc@vger.kernel.org>);
16fb238
        Mon, 23 Jul 2018 12:36:21 -0400
16fb238
Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249])
16fb238
        by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 3D7E580D;
16fb238
        Mon, 23 Jul 2018 08:34:35 -0700 (PDT)
16fb238
Received: from e104803-lin.Emea.Arm.com (e104803-lin.Emea.Arm.com
16fb238
 [10.4.12.215])
16fb238
        by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id
16fb238
 B9BD43F237;
16fb238
        Mon, 23 Jul 2018 08:34:33 -0700 (PDT)
16fb238
From: Andre Przywara <andre.przywara@arm.com>
16fb238
To: Ulf Hansson <ulf.hansson@linaro.org>
16fb238
Cc: Maxime Ripard <maxime.ripard@free-electrons.com>,
16fb238
        Chen-Yu Tsai <wens@csie.org>,
16fb238
        Robin Murphy <robin.murphy@arm.com>, linux-mmc@vger.kernel.org,
16fb238
        linux-arm-kernel@lists.infradead.org, linux-sunxi@googlegroups.com
16fb238
Subject: [PATCH v3] mmc: sunxi: remove output of virtual base address
16fb238
Date: Mon, 23 Jul 2018 16:34:31 +0100
16fb238
Message-Id: <20180723153431.8669-1-andre.przywara@arm.com>
16fb238
X-Mailer: git-send-email 2.14.4
16fb238
Sender: linux-mmc-owner@vger.kernel.org
16fb238
Precedence: bulk
16fb238
List-ID: <linux-mmc.vger.kernel.org>
16fb238
X-Mailing-List: linux-mmc@vger.kernel.org
16fb238
X-Virus-Scanned: ClamAV using ClamSMTP
16fb238
16fb238
Recent Linux versions refuse to print actual virtual kernel addresses,
16fb238
to not give a hint about the location of the kernel in a randomized virtual
16fb238
address space. This affects the output of the sunxi MMC controller
16fb238
driver, which now produces the rather uninformative line:
16fb238
16fb238
[    1.482660] sunxi-mmc 1c0f000.mmc: base:0x(____ptrval____) irq:8
16fb238
16fb238
Since the virtual base address is not really interesting in the first
16fb238
place, let's just drop this value. The same applies to Linux' notion of
16fb238
the interrupt number, which is independent from the GIC SPI number.
16fb238
We have the physical address as part of the DT node name, which is way
16fb238
more useful for debugging purposes.
16fb238
To keep a success message in the driver, we make this purpose explicit
16fb238
with the word "initialized", plus print some information that is not too
16fb238
obvious and that we learned while probing the device:
16fb238
the maximum request size and whether it uses the new timing mode.
16fb238
So the output turns into:
16fb238
[    1.750626] sunxi-mmc 1c0f000.mmc: initialized, max. request size: 16384 KB, uses new timings mode
16fb238
[    1.786699] sunxi-mmc 1c11000.mmc: initialized, max. request size: 2048 KB
16fb238
16fb238
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
16fb238
Acked-by: Maxime Ripard <maxime.ripard@bootlin.com>
16fb238
---
16fb238
 drivers/mmc/host/sunxi-mmc.c | 5 ++++-
16fb238
 1 file changed, 4 insertions(+), 1 deletion(-)
16fb238
16fb238
diff --git a/drivers/mmc/host/sunxi-mmc.c b/drivers/mmc/host/sunxi-mmc.c
16fb238
index 8e7f3e35ee3d..c18cf035ac00 100644
16fb238
--- a/drivers/mmc/host/sunxi-mmc.c
16fb238
+++ b/drivers/mmc/host/sunxi-mmc.c
16fb238
@@ -1407,7 +1407,10 @@ static int sunxi_mmc_probe(struct platform_device *pdev)
16fb238
 	if (ret)
16fb238
 		goto error_free_dma;
16fb238
 
16fb238
-	dev_info(&pdev->dev, "base:0x%p irq:%u\n", host->reg_base, host->irq);
16fb238
+	dev_info(&pdev->dev, "initialized, max. request size: %u KB%s\n",
16fb238
+		 mmc->max_req_size >> 10,
16fb238
+		 host->use_new_timings ? ", uses new timings mode" : "");
16fb238
+
16fb238
 	return 0;
16fb238
 
16fb238
 error_free_dma: