From patchwork Wed Sep 23 10:42:46 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Walle X-Patchwork-Id: 1369821 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=walle.cc Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=walle.cc header.i=@walle.cc header.a=rsa-sha256 header.s=mail2016061301 header.b=t/5hYihc; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4BxFCL4rfFz9sTg for ; Wed, 23 Sep 2020 20:43:24 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 687D28244E; Wed, 23 Sep 2020 12:43:07 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=walle.cc Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; secure) header.d=walle.cc header.i=@walle.cc header.b="t/5hYihc"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id C50CF82453; Wed, 23 Sep 2020 12:43:04 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from ssl.serverraum.org (ssl.serverraum.org [176.9.125.105]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 7FE6A823E3 for ; Wed, 23 Sep 2020 12:43:01 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=walle.cc Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=michael@walle.cc Received: from mwalle01.sab.local. (unknown [213.135.10.150]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ssl.serverraum.org (Postfix) with ESMTPSA id 6CCDB22F00; Wed, 23 Sep 2020 12:43:00 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=walle.cc; s=mail2016061301; t=1600857780; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=7hqCLNioHIZlU9n1nu0lcx9FhqcliGDmWI9Fww2AUOE=; b=t/5hYihcyYeN2UALyz2a/Sr7zrTGqN+qvFfUMEnql3WLW47enajcXLtzw60s+mn6TCnkLn YXJVejFzh3f1qUynyZZWybhV+/zZ+0dhICyQipjHl3Bhy17qVvLBrCsG5+TrlEiWabhl3v Hw6fDnQqoHzMlmfkK2RPDQPH8fYL+4o= From: Michael Walle To: u-boot@lists.denx.de Cc: Michal Simek , Peng Fan , Yangbo Lu , Michael Walle Subject: [PATCH 0/6] mmc: fsl_esdhc: add ADMA2 support Date: Wed, 23 Sep 2020 12:42:46 +0200 Message-Id: <20200923104252.14919-1-michael@walle.cc> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.3 at phobos.denx.de X-Virus-Status: Clean Add ADMA2 support mainly because it supports 64bit DMA addresses. These are for example used if you use EFI on a LS1028A board which has more than 2GB of RAM, because only the lower 2GB are mapped into the lower 32bit address space. Patches 1-4 clean the fsl_esdhc driver up. Patch 5 moves ADMA2 table handling code out of the sdhci core code. Patch 6 finally adds the ADMA2 support to the fsl_esdhc driver. This was tested on a custom board LS1028A board. A passing travis-ci build is available at: https://travis-ci.org/github/mwalle/u-boot/builds/729431087 Michael Walle (6): mmc: fsl_esdhc: simplify 64bit check for SDMA transfers mmc: fsl_esdhc: use dma-mapping API mmc: fsl_esdhc: simplify esdhc_setup_data() mmc: fsl_esdhc: replace most #ifdefs by IS_ENABLED() mmc: sdhci: move the ADMA2 table handling into own module mmc: fsl_esdhc: add ADMA2 support drivers/mmc/Kconfig | 13 ++ drivers/mmc/Makefile | 1 + drivers/mmc/fsl_esdhc.c | 267 ++++++++++++++++++++------------------- drivers/mmc/sdhci-adma.c | 73 +++++++++++ drivers/mmc/sdhci.c | 63 ++------- include/fsl_esdhc.h | 14 ++ include/sdhci.h | 8 +- 7 files changed, 252 insertions(+), 187 deletions(-) create mode 100644 drivers/mmc/sdhci-adma.c