Received: by 2002:a89:d88:0:b0:1fa:5c73:8e2d with SMTP id eb8csp749423lqb; Fri, 24 May 2024 11:57:37 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCX9FEDVhDD6KtD9dcIGGR7wdpuJMD98+rbE754DILXp9fRz3NE0h6mtnkXN0hvcY8J0LPkWXDDQVdDPw8StM295m/hyZf97CWcYRLfS+A== X-Google-Smtp-Source: AGHT+IG1UoCN77INcCzlYfhrRc35QdW72k442wedx5wkYRoG8QEENcXvkKFGEp9h/jWPGXWOMWma X-Received: by 2002:a05:6870:71d3:b0:24f:c7cf:17fb with SMTP id 586e51a60fabf-24fc7cf1b69mr3286fac.22.1716577057483; Fri, 24 May 2024 11:57:37 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716577057; cv=pass; d=google.com; s=arc-20160816; b=q5kdW/tTzjzgDoGfkZZ5eCTMMC76zXcBcabp093tWMBcH/3uP6Sdu8H1xjJhx0YXfH 7cxmgnuUjtnfq/fyJ1ttWvB90hpAxMc6AHAY/1zYwh/gpIElY1mrav0R+qT2zdshiGV+ uT9JfRVF0tVOkowdIfqgJGsWv47oN88omN/J2RSnTv2cl00G2CRLFGE3tF9DtvvZvJVH Mr8n8p55fIoi1FNk5Nw5Z344sQhlbqjluqIEL06K/I+kSOwjWfd9XHo0IsZn7RldHaBV nQBnkCzI93LqIPSBKFqu8vED00g7fq9rAXG34vDZc63G6QbvN3LKPtEqZM0bqncJC/pr mWqg== 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=JtSsjB9R4+UVIqScRuc1I4bk33cfKERDT5iPQWCGPm4=; fh=S5/gBqeadq7S2IunBrAp5URdLdzB30jB1+CzA08Htzo=; b=iGm/p4cSB7BFyAPCGQbjrA0ZmvK/pj/XreiPAyBhpDiialCxlfPtwhVU16e2Ut1W6L /JT7q0X9s6C8Wsd4KUjy1ndy9W8XoW1nU5Nr7/GzAqcGt5j1DmGZL7GhT+VgovH2pgfe kp/4YFqR8E0aVPntK3awMT0Y3fee2AZWjjP5N2ZOKWwXTnseDCBKtVbGg2jc+lxZQQN9 pM6MULLL3Rzhf62XyHU+/K5AWvrjvcQ4UNX0K6OvBvWOQKVnnkpshv6Y79zf+m9UELNC dGGxGUanqgVzYfRO5QwzSI0LA1llgl3nGYspcwDCehjJQe8ZvuxT/gL3xd8ZhMEkU6+5 VkFA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@raspberrypi.com header.s=google header.b=pbw6huoW; arc=pass (i=1 spf=pass spfdomain=raspberrypi.com dkim=pass dkdomain=raspberrypi.com dmarc=pass fromdomain=raspberrypi.com); spf=pass (google.com: domain of linux-kernel+bounces-189009-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-189009-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=raspberrypi.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id d75a77b69052e-43fb18ea0acsi23418821cf.743.2024.05.24.11.57.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 May 2024 11:57:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-189009-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@raspberrypi.com header.s=google header.b=pbw6huoW; arc=pass (i=1 spf=pass spfdomain=raspberrypi.com dkim=pass dkdomain=raspberrypi.com dmarc=pass fromdomain=raspberrypi.com); spf=pass (google.com: domain of linux-kernel+bounces-189009-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-189009-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=raspberrypi.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 B36331C2289B for ; Fri, 24 May 2024 18:32:56 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 68134130E3B; Fri, 24 May 2024 18:28:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=raspberrypi.com header.i=@raspberrypi.com header.b="pbw6huoW" Received: from mail-lj1-f226.google.com (mail-lj1-f226.google.com [209.85.208.226]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 567C356B79 for ; Fri, 24 May 2024 18:28:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.226 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716575289; cv=none; b=JOHOQ9Z4IEFUJS6c0iPJ1oG7L7tBYPB3aQC3mq4BC01OXMrSLfkAEacBw3Ma5idEYQbLsaEJP/OpN4+d99J0lgpcXYgb5qX6VI3jir3AopQDGCCIDwRzD5qS9vIkoyKZUnk6zEL5dyEflhEVKmcw0Vhv+7J0sWLTeKKhO5h8SMs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716575289; c=relaxed/simple; bh=HegCCdIEY4pR36AZ8QiWEFIcmksLTJsNsXIyFUq7yl8=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=QNNaJVlkKWvauuRn8MHrKzpghYTGyyjOgrqLf4NKZfEqjjw3Q1kQpp7xJMEAwih2GUoz0GpwaNWGqoAsNWEkIBokihUdS0L2YYDzkc1Uu14JO75/QbJZblxAIb04lTuGHo+84Rihrl2eCfDIP9TSQ7EPr244unS+hG9oNtw6s5M= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=raspberrypi.com; spf=pass smtp.mailfrom=raspberrypi.com; dkim=pass (2048-bit key) header.d=raspberrypi.com header.i=@raspberrypi.com header.b=pbw6huoW; arc=none smtp.client-ip=209.85.208.226 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=raspberrypi.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=raspberrypi.com Received: by mail-lj1-f226.google.com with SMTP id 38308e7fff4ca-2e724bc46c4so67782771fa.2 for ; Fri, 24 May 2024 11:28:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi.com; s=google; t=1716575279; x=1717180079; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=JtSsjB9R4+UVIqScRuc1I4bk33cfKERDT5iPQWCGPm4=; b=pbw6huoWpJHSkW6rnnTfQHXZo+T89snmADZc68eQy+0rB5V25z3dVo7uOfjJ0fDEEd zFOtb8HeB4NlGE20heQin92G9n1stH9HhEBMXEvJ++dDmD/nS4f1XuSN5zuaDgxKHLcH whvf3vUUxc2AL520bsjKTzHKcZFtnB95vKCUg6lpQzyO47SiNk82Rj9b0zZE9EcklSkO 1HK/YSTdz1Kwnxnn7wACrWjXXfVXdoUMyE7OlbAe9Vwe9vcTyNFnqlQ2+yVeytmpe6ku xIqExOH/FcBwmEOlQDaQzIBuDKrw4Gd6iuvvPp1lLfNK5yxju917WcONYsLkk3Chit2u z53A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716575279; x=1717180079; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=JtSsjB9R4+UVIqScRuc1I4bk33cfKERDT5iPQWCGPm4=; b=VEYGgj205Vfa4MIRxERRzEVwTzuvOLi24g7wgRuq4IsS5JlLajowVhHvhEYStyEs+/ aG75NQ7WCoDbPYfwQe3b0XGhGXwMD7F9aQOYkWaH5ktfSYfDHrfq8z/iCiBjqRuN+tMz u1hFo32LMHRNVRkAT3M/Y1nZuu4+24A1CJHqytSrtSo28v/HvPZyhjEpCj7e6gCrYcv4 37HtYMC5TuFBnWPK0QevotEUzEjr6Yqi1MLy0qkSTPOaSsLmhcvbBKjIFBe6kwK2wJpv JKCxX3h4YlVOLNbCij1JQMBFaQrrhPWAM/HqSa3jM9Q61E21QvqipaFQJH+K853Rv7GD LUlg== X-Forwarded-Encrypted: i=1; AJvYcCVfwESZG8L26c+xZnw2xAfG8UvHJpzuAXD70x8Os/JQG8datTdt92hvAeSisw0GSNbQgPDdUbiG1wgM7gEZ4gst3VzwiOldxN7NnYGL X-Gm-Message-State: AOJu0Yz9bBqo8o2FT3MEpYmzhyOYQgaarPIS2yQRD7Qa9XDSLG3G74Sj JBhWXq8Eml2cXe6/oXkiU/bipx2wRs+LXSXmijXkjfpLURWDQ7LdnvHVTJpxcWrJTTBER3A2YHz 0vivjC+E7vcqBoGym9TUSaItrR1sVpFss X-Received: by 2002:a2e:9c8f:0:b0:2e6:f59e:226f with SMTP id 38308e7fff4ca-2e95b0bce90mr19539971fa.5.1716575279453; Fri, 24 May 2024 11:27:59 -0700 (PDT) Received: from raspberrypi.com ([188.39.149.98]) by smtp-relay.gmail.com with ESMTPS id 38308e7fff4ca-2e95be01800sm348091fa.53.2024.05.24.11.27.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 May 2024 11:27:59 -0700 (PDT) X-Relaying-Domain: raspberrypi.com From: Dave Stevenson To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Florian Fainelli , Broadcom internal kernel review list , Ray Jui , Scott Branden , Vinod Koul , Maxime Ripard , Maarten Lankhorst , Thomas Zimmermann , David Airlie , Daniel Vetter , Ulf Hansson , Mark Brown , Christoph Hellwig , Marek Szyprowski , Robin Murphy , Liam Girdwood , Jaroslav Kysela , Takashi Iwai , Vladimir Murzin , Phil Elwell , Stefan Wahren , Serge Semin Cc: devicetree@vger.kernel.org, linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, dmaengine@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-mmc@vger.kernel.org, linux-spi@vger.kernel.org, iommu@lists.linux.dev, linux-sound@vger.kernel.org, Dave Stevenson Subject: [PATCH 14/18] mmc: bcm2835: Use phys addresses for slave DMA config Date: Fri, 24 May 2024 19:26:58 +0100 Message-Id: <20240524182702.1317935-15-dave.stevenson@raspberrypi.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240524182702.1317935-1-dave.stevenson@raspberrypi.com> References: <20240524182702.1317935-1-dave.stevenson@raspberrypi.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 From: Phil Elwell Contrary to what struct snd_dmaengine_dai_dma_data suggests, the configuration of addresses of DMA slave interfaces should be done in CPU physical addresses. Signed-off-by: Phil Elwell Signed-off-by: Dave Stevenson --- drivers/mmc/host/bcm2835.c | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/drivers/mmc/host/bcm2835.c b/drivers/mmc/host/bcm2835.c index 35d8fdea668b..746a60fac0f0 100644 --- a/drivers/mmc/host/bcm2835.c +++ b/drivers/mmc/host/bcm2835.c @@ -38,7 +38,6 @@ #include #include #include -#include #include #include #include @@ -1347,8 +1346,8 @@ static int bcm2835_probe(struct platform_device *pdev) struct device *dev = &pdev->dev; struct clk *clk; struct bcm2835_host *host; + struct resource *iomem; struct mmc_host *mmc; - const __be32 *regaddr_p; int ret; dev_dbg(dev, "%s\n", __func__); @@ -1361,23 +1360,13 @@ static int bcm2835_probe(struct platform_device *pdev) host->pdev = pdev; spin_lock_init(&host->lock); - host->ioaddr = devm_platform_ioremap_resource(pdev, 0); + host->ioaddr = devm_platform_get_and_ioremap_resource(pdev, 0, &iomem); if (IS_ERR(host->ioaddr)) { ret = PTR_ERR(host->ioaddr); goto err; } - /* Parse OF address directly to get the physical address for - * DMA to our registers. - */ - regaddr_p = of_get_address(pdev->dev.of_node, 0, NULL, NULL); - if (!regaddr_p) { - dev_err(dev, "Can't get phys address\n"); - ret = -EINVAL; - goto err; - } - - host->phys_addr = be32_to_cpup(regaddr_p); + host->phys_addr = iomem->start; host->dma_chan = NULL; host->dma_desc = NULL; -- 2.34.1