From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr0-x235.google.com (mail-wr0-x235.google.com [IPv6:2a00:1450:400c:c0c::235]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 9D93021E95E0F for ; Wed, 30 Aug 2017 01:18:36 -0700 (PDT) Received: by mail-wr0-x235.google.com with SMTP id z91so16346210wrc.1 for ; Wed, 30 Aug 2017 01:21:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=59qYgT7BVpUTADGgs0bY15l5Z/7ntt+2LAqWIEd29Ng=; b=JlEkFi3A0m1f05IT84EVEp3CkzO1uYeK5iVOQzVkj5P49DNDp1t+f83mxI73qP8kYY iSW3h4lgOXJA/BGumqcQ6vw4zBwl9FI3beTNhYOXbwlhm/65JQgMkQG7A7hRbw4e9tBs opPfBdDwoEXjy8wsUYfJeC1W9fAWG0l/CHFws= 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; bh=59qYgT7BVpUTADGgs0bY15l5Z/7ntt+2LAqWIEd29Ng=; b=uGydHP+ZYlkHg4CZVFSxPphRxVeHdYHxeJVVOPP/lHCm6X3Kh76NK+vg0jEbics06h x8vjf3XloatCTK+HHlskJUysU9qjfBPNYyjoM9TxLSLo7BAyuntO4ySC26CEsC0Yz5Ce f1weoE8OmomlDUpmrMKCwRBWP7urb67Er81coOHZjEH1mL6u0O4tqAoIbVMUPxhTzzm/ RdPgSN+K0fhI4fZnIzrwTBcAL50MvaQvKoSKWqUXI3aMRt8+ALzY+qJG1Kk+m2lWa1Zr dokkpuQ6x8rzzw6BIj+CTZAx1dRb9YAzrog0ZEYLXsEHJ9iWcudeDoHa8Lq7e0Hd3171 GoNQ== X-Gm-Message-State: AHYfb5jiy5yR0ZrdG5K1b+WDogwCIIrQSHxuwaDwUjP/EU8eke4BhI8K 28umxUmULV2kfnsO3F47hQ== X-Received: by 10.223.164.19 with SMTP id d19mr502443wra.302.1504081275961; Wed, 30 Aug 2017 01:21:15 -0700 (PDT) Received: from localhost.localdomain ([105.133.189.215]) by smtp.gmail.com with ESMTPSA id h8sm3051642wma.46.2017.08.30.01.21.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 30 Aug 2017 01:21:15 -0700 (PDT) From: Ard Biesheuvel To: edk2-devel@lists.01.org, leif.lindholm@linaro.org Cc: Ard Biesheuvel Date: Wed, 30 Aug 2017 09:21:02 +0100 Message-Id: <20170830082108.7470-1-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.11.0 Subject: [PATCH 0/6] ArmPkg EmbeddedPkg: clean up DmaLib implementations X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Aug 2017 08:18:37 -0000 Currently, we have two DmaLib implementations: a cache coherent one called 'NullDmaLib' residing in EmbeddedPkg, and a non-cache coherent one called 'ArmDmaLib', residinh in ArmPkg. In both cases, this is slightly awkward: NullDmaLib suggests no functionality whatsoever, which is slightly misleading because 'nothing' is the correct action in case of cache coherent DMA, rather than a lack of action. As for ArmDmalib, this was never specific to ARM, and no longer depends on anything that ArmPkg provides, so it does not really belong in ArmPkg anymore. So let's rename them to CoherentDmaLib and NonCoherentDmaLib, respectively, and move that latter into EmbeddedPkg where it arguably belongs. To align the two further, add support for non-1:1 DMA mappings to CoherentDmaLib as well. Note that the final patch can only be merged after out-of-tree platforms have switched from ArmDmaLib to NonCoherentDmaLib. Ard Biesheuvel (6): EmbeddedPkg: rename NullDmaLib to CoherentDmaLib EmbeddedPkg/CoherentDmaLib: add support for non-1:1 DMA translation EmbeddedPkg: implement NonCoherentDmaLib based on ArmDmaLib Omap35xxPkg: switch to EmbeddedPkg's NonCoherentDmaLib BeagleBoardPkg: switch to generic non-coherent DmaLib ArmPkg: remove ArmDmaLib ArmPkg/ArmPkg.dsc | 2 - ArmPkg/Library/ArmDmaLib/ArmDmaLib.inf | 49 --------- BeagleBoardPkg/BeagleBoardPkg.dsc | 2 +- EmbeddedPkg/EmbeddedPkg.dec | 7 ++ EmbeddedPkg/EmbeddedPkg.dsc | 3 +- EmbeddedPkg/Library/{NullDmaLib/NullDmaLib.c => CoherentDmaLib/CoherentDmaLib.c} | 10 +- EmbeddedPkg/Library/{NullDmaLib/NullDmaLib.inf => CoherentDmaLib/CoherentDmaLib.inf} | 19 ++-- ArmPkg/Library/ArmDmaLib/ArmDmaLib.c => EmbeddedPkg/Library/NonCoherentDmaLib/NonCoherentDmaLib.c | 105 +++++++++++--------- EmbeddedPkg/Library/NonCoherentDmaLib/NonCoherentDmaLib.inf | 50 ++++++++++ Omap35xxPkg/Omap35xxPkg.dsc | 2 +- 10 files changed, 136 insertions(+), 113 deletions(-) delete mode 100644 ArmPkg/Library/ArmDmaLib/ArmDmaLib.inf rename EmbeddedPkg/Library/{NullDmaLib/NullDmaLib.c => CoherentDmaLib/CoherentDmaLib.c} (94%) rename EmbeddedPkg/Library/{NullDmaLib/NullDmaLib.inf => CoherentDmaLib/CoherentDmaLib.inf} (75%) rename ArmPkg/Library/ArmDmaLib/ArmDmaLib.c => EmbeddedPkg/Library/NonCoherentDmaLib/NonCoherentDmaLib.c (82%) create mode 100644 EmbeddedPkg/Library/NonCoherentDmaLib/NonCoherentDmaLib.inf -- 2.11.0