* [PATCH 0/4] agilex5: Update agilex5 device tree and device tree bindings
@ 2025-05-16 4:05 adrianhoyin.ng
2025-05-16 4:05 ` [PATCH 1/4] dt-bindings: dma: snps,dw-axi-dmac: Add iommus dma-coherent and dma bit-mask quirk adrianhoyin.ng
` (3 more replies)
0 siblings, 4 replies; 7+ messages in thread
From: adrianhoyin.ng @ 2025-05-16 4:05 UTC (permalink / raw)
To: dinguyen, robh, krzk+dt, conor+dt, Eugeniy.Paltsev, vkoul,
dmaengine, devicetree
Cc: adrianhoyin.ng
From: Adrian Ng Ho Yin <adrianhoyin.ng@altera.com>
This patch set is to update Agilex5 device tree and the related device
tree bindings.
Altera Agilex5 address bus only supports up to 40 bits. This patch set
adds support for a new property that is used to configure the
dma-bit-mask if its present in the device tree.
This patch set includes the following changes:
-Add property for dw-axi-dmac that configures the dma-bit-mask to the
required bits.
-Update cdns nand dt binding with iommus and dma-coherent as an optional
property.
-Update Agilex5 dtsi and dts.
-Add implementation to set dma bit-mask to value configured in dma
bit-mask quirk if present.
Adrian Ng Ho Yin (4):
dt-bindings: dma: snps,dw-axi-dmac: Add iommus dma-coherent and dma
bit-mask quirk
dt-bindings: mtd: cadence: Add iommus and dma-coherent properties
arm64: dts: socfpga: agilex5: Update Agilex5 DTSI and DTS
dma: dw-axi-dmac: Add support for dma-bit-mask property
.../bindings/dma/snps,dw-axi-dmac.yaml | 13 +++++++++++
.../devicetree/bindings/mtd/cdns,hp-nfc.yaml | 5 +++++
.../arm64/boot/dts/intel/socfpga_agilex5.dtsi | 22 +++++++++++++++++++
.../boot/dts/intel/socfpga_agilex5_socdk.dts | 4 ++++
.../dma/dw-axi-dmac/dw-axi-dmac-platform.c | 14 ++++++++++--
5 files changed, 56 insertions(+), 2 deletions(-)
--
2.49.GIT
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 1/4] dt-bindings: dma: snps,dw-axi-dmac: Add iommus dma-coherent and dma bit-mask quirk
2025-05-16 4:05 [PATCH 0/4] agilex5: Update agilex5 device tree and device tree bindings adrianhoyin.ng
@ 2025-05-16 4:05 ` adrianhoyin.ng
2025-05-16 4:05 ` [PATCH 2/4] dt-bindings: mtd: cadence: Add iommus and dma-coherent properties adrianhoyin.ng
` (2 subsequent siblings)
3 siblings, 0 replies; 7+ messages in thread
From: adrianhoyin.ng @ 2025-05-16 4:05 UTC (permalink / raw)
To: dinguyen, robh, krzk+dt, conor+dt, Eugeniy.Paltsev, vkoul,
dmaengine, devicetree
Cc: adrianhoyin.ng, Matthew Gerlach
From: Adrian Ng Ho Yin <adrianhoyin.ng@altera.com>
Intel Agilex5 address bus only supports up to 40 bits. Add dma-bit-mask
property to allow configuration of dma bit-mask size. Add iommu property
for SMMU support. Add dma-coherent property for cache coherent support.
Signed-off-by: Adrian Ng Ho Yin <adrianhoyin.ng@altera.com>
Reviewed-by: Matthew Gerlach <matthew.gerlach@altrera.com>
---
.../devicetree/bindings/dma/snps,dw-axi-dmac.yaml | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/Documentation/devicetree/bindings/dma/snps,dw-axi-dmac.yaml b/Documentation/devicetree/bindings/dma/snps,dw-axi-dmac.yaml
index 935735a59afd..f0a54a1031e7 100644
--- a/Documentation/devicetree/bindings/dma/snps,dw-axi-dmac.yaml
+++ b/Documentation/devicetree/bindings/dma/snps,dw-axi-dmac.yaml
@@ -42,6 +42,9 @@ properties:
minItems: 1
maxItems: 8
+ iommus:
+ maxItems: 1
+
clocks:
items:
- description: Bus Clock
@@ -61,6 +64,8 @@ properties:
dma-noncoherent: true
+ dma-coherent: true
+
resets:
minItems: 1
maxItems: 2
@@ -101,6 +106,14 @@ properties:
minimum: 1
maximum: 256
+ snps,dma-bit-mask:
+ description:
+ Defines the number of addressable bits for DMA.
+ If this property is missing, the default 64bit will be used.
+ $ref: /schemas/types.yaml#/definitions/uint32
+ minimum: 32
+ maximum: 64
+
required:
- compatible
- reg
--
2.49.GIT
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 2/4] dt-bindings: mtd: cadence: Add iommus and dma-coherent properties
2025-05-16 4:05 [PATCH 0/4] agilex5: Update agilex5 device tree and device tree bindings adrianhoyin.ng
2025-05-16 4:05 ` [PATCH 1/4] dt-bindings: dma: snps,dw-axi-dmac: Add iommus dma-coherent and dma bit-mask quirk adrianhoyin.ng
@ 2025-05-16 4:05 ` adrianhoyin.ng
2025-05-16 4:05 ` [PATCH 3/4] arm64: dts: socfpga: agilex5: Update Agilex5 DTSI and DTS adrianhoyin.ng
2025-05-16 4:05 ` [PATCH 4/4] dma: dw-axi-dmac: Add support for dma-bit-mask property adrianhoyin.ng
3 siblings, 0 replies; 7+ messages in thread
From: adrianhoyin.ng @ 2025-05-16 4:05 UTC (permalink / raw)
To: dinguyen, robh, krzk+dt, conor+dt, Eugeniy.Paltsev, vkoul,
dmaengine, devicetree
Cc: adrianhoyin.ng, Matthew Gerlach
From: Adrian Ng Ho Yin <adrianhoyin.ng@altera.com>
Update bindings to include iommus and dma-coherent as an optional
properties.
Signed-off-by: Adrian Ng Ho Yin <adrianhoyin.ng@altera.com>
Reviewed-by: Matthew Gerlach <matthew.gerlach@altrera.com>
---
Documentation/devicetree/bindings/mtd/cdns,hp-nfc.yaml | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/Documentation/devicetree/bindings/mtd/cdns,hp-nfc.yaml b/Documentation/devicetree/bindings/mtd/cdns,hp-nfc.yaml
index e1f4d7c35a88..367257a227b1 100644
--- a/Documentation/devicetree/bindings/mtd/cdns,hp-nfc.yaml
+++ b/Documentation/devicetree/bindings/mtd/cdns,hp-nfc.yaml
@@ -40,6 +40,11 @@ properties:
dmas:
maxItems: 1
+ dma-coherent: true
+
+ iommus:
+ maxItems: 1
+
cdns,board-delay-ps:
description: |
Estimated Board delay. The value includes the total round trip
--
2.49.GIT
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 3/4] arm64: dts: socfpga: agilex5: Update Agilex5 DTSI and DTS
2025-05-16 4:05 [PATCH 0/4] agilex5: Update agilex5 device tree and device tree bindings adrianhoyin.ng
2025-05-16 4:05 ` [PATCH 1/4] dt-bindings: dma: snps,dw-axi-dmac: Add iommus dma-coherent and dma bit-mask quirk adrianhoyin.ng
2025-05-16 4:05 ` [PATCH 2/4] dt-bindings: mtd: cadence: Add iommus and dma-coherent properties adrianhoyin.ng
@ 2025-05-16 4:05 ` adrianhoyin.ng
2025-05-16 4:05 ` [PATCH 4/4] dma: dw-axi-dmac: Add support for dma-bit-mask property adrianhoyin.ng
3 siblings, 0 replies; 7+ messages in thread
From: adrianhoyin.ng @ 2025-05-16 4:05 UTC (permalink / raw)
To: dinguyen, robh, krzk+dt, conor+dt, Eugeniy.Paltsev, vkoul,
dmaengine, devicetree
Cc: adrianhoyin.ng, Matthew Gerlach
From: Adrian Ng Ho Yin <adrianhoyin.ng@altera.com>
Add SMMU node in Agilex5 DTSI and enable it in socdk DTS.
Add IOMMU support to the Agilex5 DMA controllers by adding the iommus,
dma-coherent, and dma-bit-mask properties to the device tree nodes.
Add IOMMU support Agilex5 NAND controller by adding iommus and
dma-coherent properties.
Add IOMMU support Agilex5 DWC2 controller by adding iommus property.
Add ADP support for Agilex5 DWC2 controller by adding otg-rev property.
Signed-off-by: Adrian Ng Ho Yin <adrianhoyin.ng@altera.com>
Reviewed-by: Matthew Gerlach <matthew.gerlach@altrera.com>
---
.../arm64/boot/dts/intel/socfpga_agilex5.dtsi | 22 +++++++++++++++++++
.../boot/dts/intel/socfpga_agilex5_socdk.dts | 4 ++++
2 files changed, 26 insertions(+)
diff --git a/arch/arm64/boot/dts/intel/socfpga_agilex5.dtsi b/arch/arm64/boot/dts/intel/socfpga_agilex5.dtsi
index 51c6e19e40b8..61a0a24cda22 100644
--- a/arch/arm64/boot/dts/intel/socfpga_agilex5.dtsi
+++ b/arch/arm64/boot/dts/intel/socfpga_agilex5.dtsi
@@ -272,6 +272,8 @@ nand: nand-controller@10b80000 {
interrupts = <GIC_SPI 97 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&clkmgr AGILEX5_NAND_NF_CLK>;
cdns,board-delay-ps = <4830>;
+ iommus = <&smmu 4>;
+ dma-coherent;
status = "disabled";
};
@@ -291,6 +293,7 @@ dmac0: dma-controller@10db0000 {
clock-names = "core-clk", "cfgr-clk";
interrupt-parent = <&intc>;
interrupts = <GIC_SPI 86 IRQ_TYPE_LEVEL_HIGH>;
+ iommus = <&smmu 8>;
#dma-cells = <1>;
dma-channels = <4>;
snps,dma-masters = <1>;
@@ -298,6 +301,8 @@ dmac0: dma-controller@10db0000 {
snps,block-size = <32767 32767 32767 32767>;
snps,priority = <0 1 2 3>;
snps,axi-max-burst-len = <8>;
+ snps,dma-bit-mask = <40>;
+ dma-coherent;
};
dmac1: dma-controller@10dc0000 {
@@ -308,6 +313,7 @@ dmac1: dma-controller@10dc0000 {
clock-names = "core-clk", "cfgr-clk";
interrupt-parent = <&intc>;
interrupts = <GIC_SPI 171 IRQ_TYPE_LEVEL_HIGH>;
+ iommus = <&smmu 9>;
#dma-cells = <1>;
dma-channels = <4>;
snps,dma-masters = <1>;
@@ -315,6 +321,8 @@ dmac1: dma-controller@10dc0000 {
snps,block-size = <32767 32767 32767 32767>;
snps,priority = <0 1 2 3>;
snps,axi-max-burst-len = <8>;
+ snps,dma-bit-mask = <40>;
+ dma-coherent;
};
rst: rstmgr@10d11000 {
@@ -323,6 +331,18 @@ rst: rstmgr@10d11000 {
#reset-cells = <1>;
};
+ smmu: iommu@16000000 {
+ compatible = "arm,smmu-v3";
+ reg = <0x16000000 0x30000>;
+ interrupts = <GIC_SPI 134 IRQ_TYPE_EDGE_RISING>,
+ <GIC_SPI 129 IRQ_TYPE_EDGE_RISING>,
+ <GIC_SPI 132 IRQ_TYPE_EDGE_RISING>;
+ interrupt-names = "eventq", "gerror", "priq";
+ dma-coherent;
+ #iommu-cells = <1>;
+ status = "disabled";
+ };
+
spi0: spi@10da4000 {
compatible = "snps,dw-apb-ssi";
reg = <0x10da4000 0x1000>;
@@ -423,8 +443,10 @@ usb0: usb@10b00000 {
phy-names = "usb2-phy";
resets = <&rst USB0_RESET>, <&rst USB0_OCP_RESET>;
reset-names = "dwc2", "dwc2-ecc";
+ iommus = <&smmu 6>;
clocks = <&clkmgr AGILEX5_USB2OTG_HCLK>;
clock-names = "otg";
+ otg-rev = <0x0200>;
status = "disabled";
};
diff --git a/arch/arm64/boot/dts/intel/socfpga_agilex5_socdk.dts b/arch/arm64/boot/dts/intel/socfpga_agilex5_socdk.dts
index c533e5a3a610..d64eb14ccee0 100644
--- a/arch/arm64/boot/dts/intel/socfpga_agilex5_socdk.dts
+++ b/arch/arm64/boot/dts/intel/socfpga_agilex5_socdk.dts
@@ -25,6 +25,10 @@ &osc1 {
clock-frequency = <25000000>;
};
+&smmu {
+ status = "okay";
+};
+
&uart0 {
status = "okay";
};
--
2.49.GIT
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 4/4] dma: dw-axi-dmac: Add support for dma-bit-mask property
2025-05-16 4:05 [PATCH 0/4] agilex5: Update agilex5 device tree and device tree bindings adrianhoyin.ng
` (2 preceding siblings ...)
2025-05-16 4:05 ` [PATCH 3/4] arm64: dts: socfpga: agilex5: Update Agilex5 DTSI and DTS adrianhoyin.ng
@ 2025-05-16 4:05 ` adrianhoyin.ng
2025-05-16 17:36 ` kernel test robot
2025-05-16 17:47 ` kernel test robot
3 siblings, 2 replies; 7+ messages in thread
From: adrianhoyin.ng @ 2025-05-16 4:05 UTC (permalink / raw)
To: dinguyen, robh, krzk+dt, conor+dt, Eugeniy.Paltsev, vkoul,
dmaengine, devicetree
Cc: adrianhoyin.ng, Matthew Gerlach
From: Adrian Ng Ho Yin <adrianhoyin.ng@altera.com>
Intel Agilex5 address bus only supports up to 40 bits. Add dma-bit-mask
property support where configure dma-bit-mask based on dma-bit-mask
property or fallback to default value if property is not present.
Signed-off-by: Adrian Ng Ho Yin <adrianhoyin.ng@altera.com>
Reviewed-by: Matthew Gerlach <matthew.gerlach@altrera.com>
---
drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c b/drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c
index b23536645ff7..c345fd4a374c 100644
--- a/drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c
+++ b/drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c
@@ -265,13 +265,23 @@ static inline bool axi_chan_is_hw_enable(struct axi_dma_chan *chan)
static void axi_dma_hw_init(struct axi_dma_chip *chip)
{
int ret;
- u32 i;
+ u32 i, tmp;
for (i = 0; i < chip->dw->hdata->nr_channels; i++) {
axi_chan_irq_disable(&chip->dw->chan[i], DWAXIDMAC_IRQ_ALL);
axi_chan_disable(&chip->dw->chan[i]);
}
- ret = dma_set_mask_and_coherent(chip->dev, DMA_BIT_MASK(64));
+
+ ret = device_property_read_u32(dev, "snps,dma-bit-mask", &tmp);
+ if (ret)
+ ret = dma_set_mask_and_coherent(chip->dev, DMA_BIT_MASK(64));
+ else {
+ if (tmp == 0 || tmp << 32 || tmp > 64)
+ dev_err(chip->dev, "Invalid dma bit mask\n");
+
+ ret = dma_set_mask_and_coherent(chip->dev, DMA_BIT_MASK(tmp));
+ }
+
if (ret)
dev_warn(chip->dev, "Unable to set coherent mask\n");
}
--
2.49.GIT
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 4/4] dma: dw-axi-dmac: Add support for dma-bit-mask property
2025-05-16 4:05 ` [PATCH 4/4] dma: dw-axi-dmac: Add support for dma-bit-mask property adrianhoyin.ng
@ 2025-05-16 17:36 ` kernel test robot
2025-05-16 17:47 ` kernel test robot
1 sibling, 0 replies; 7+ messages in thread
From: kernel test robot @ 2025-05-16 17:36 UTC (permalink / raw)
To: adrianhoyin.ng, dinguyen, robh, krzk+dt, conor+dt,
Eugeniy.Paltsev, vkoul, dmaengine, devicetree
Cc: oe-kbuild-all, adrianhoyin.ng, Matthew Gerlach
Hi,
kernel test robot noticed the following build warnings:
[auto build test WARNING on robh/for-next]
[also build test WARNING on vkoul-dmaengine/next mtd/mtd/next mtd/mtd/fixes linus/master v6.15-rc6]
[cannot apply to next-20250516]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/adrianhoyin-ng-altera-com/dt-bindings-dma-snps-dw-axi-dmac-Add-iommus-dma-coherent-and-dma-bit-mask-quirk/20250516-120810
base: https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git for-next
patch link: https://lore.kernel.org/r/a10c000b7c8301018eb2b0a20fbf2d2d10e74a02.1747367749.git.adrianhoyin.ng%40altera.com
patch subject: [PATCH 4/4] dma: dw-axi-dmac: Add support for dma-bit-mask property
config: arc-randconfig-001-20250517 (https://download.01.org/0day-ci/archive/20250517/202505170152.aOv0x3eD-lkp@intel.com/config)
compiler: arc-linux-gcc (GCC) 10.5.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250517/202505170152.aOv0x3eD-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202505170152.aOv0x3eD-lkp@intel.com/
All warnings (new ones prefixed by >>):
drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c: In function 'axi_dma_hw_init':
drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c:275:33: error: 'dev' undeclared (first use in this function); did you mean 'cdev'?
275 | ret = device_property_read_u32(dev, "snps,dma-bit-mask", &tmp);
| ^~~
| cdev
drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c:275:33: note: each undeclared identifier is reported only once for each function it appears in
>> drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c:279:23: warning: left shift count >= width of type [-Wshift-count-overflow]
279 | if (tmp == 0 || tmp << 32 || tmp > 64)
| ^~
vim +279 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c
264
265 static void axi_dma_hw_init(struct axi_dma_chip *chip)
266 {
267 int ret;
268 u32 i, tmp;
269
270 for (i = 0; i < chip->dw->hdata->nr_channels; i++) {
271 axi_chan_irq_disable(&chip->dw->chan[i], DWAXIDMAC_IRQ_ALL);
272 axi_chan_disable(&chip->dw->chan[i]);
273 }
274
275 ret = device_property_read_u32(dev, "snps,dma-bit-mask", &tmp);
276 if (ret)
277 ret = dma_set_mask_and_coherent(chip->dev, DMA_BIT_MASK(64));
278 else {
> 279 if (tmp == 0 || tmp << 32 || tmp > 64)
280 dev_err(chip->dev, "Invalid dma bit mask\n");
281
282 ret = dma_set_mask_and_coherent(chip->dev, DMA_BIT_MASK(tmp));
283 }
284
285 if (ret)
286 dev_warn(chip->dev, "Unable to set coherent mask\n");
287 }
288
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 4/4] dma: dw-axi-dmac: Add support for dma-bit-mask property
2025-05-16 4:05 ` [PATCH 4/4] dma: dw-axi-dmac: Add support for dma-bit-mask property adrianhoyin.ng
2025-05-16 17:36 ` kernel test robot
@ 2025-05-16 17:47 ` kernel test robot
1 sibling, 0 replies; 7+ messages in thread
From: kernel test robot @ 2025-05-16 17:47 UTC (permalink / raw)
To: adrianhoyin.ng, dinguyen, robh, krzk+dt, conor+dt,
Eugeniy.Paltsev, vkoul, dmaengine, devicetree
Cc: llvm, oe-kbuild-all, adrianhoyin.ng, Matthew Gerlach
Hi,
kernel test robot noticed the following build errors:
[auto build test ERROR on robh/for-next]
[also build test ERROR on vkoul-dmaengine/next mtd/mtd/next mtd/mtd/fixes linus/master v6.15-rc6]
[cannot apply to next-20250516]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/adrianhoyin-ng-altera-com/dt-bindings-dma-snps-dw-axi-dmac-Add-iommus-dma-coherent-and-dma-bit-mask-quirk/20250516-120810
base: https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git for-next
patch link: https://lore.kernel.org/r/a10c000b7c8301018eb2b0a20fbf2d2d10e74a02.1747367749.git.adrianhoyin.ng%40altera.com
patch subject: [PATCH 4/4] dma: dw-axi-dmac: Add support for dma-bit-mask property
config: arm-randconfig-001-20250517 (https://download.01.org/0day-ci/archive/20250517/202505170130.I0p9B66f-lkp@intel.com/config)
compiler: clang version 21.0.0git (https://github.com/llvm/llvm-project f819f46284f2a79790038e1f6649172789734ae8)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250517/202505170130.I0p9B66f-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202505170130.I0p9B66f-lkp@intel.com/
All error/warnings (new ones prefixed by >>):
>> drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c:275:33: error: use of undeclared identifier 'dev'
275 | ret = device_property_read_u32(dev, "snps,dma-bit-mask", &tmp);
| ^
drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c:277:46: warning: shift count >= width of type [-Wshift-count-overflow]
277 | ret = dma_set_mask_and_coherent(chip->dev, DMA_BIT_MASK(64));
| ^~~~~~~~~~~~~~~~
include/linux/dma-mapping.h:73:54: note: expanded from macro 'DMA_BIT_MASK'
73 | #define DMA_BIT_MASK(n) (((n) == 64) ? ~0ULL : ((1ULL<<(n))-1))
| ^ ~~~
>> drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c:279:23: warning: shift count >= width of type [-Wshift-count-overflow]
279 | if (tmp == 0 || tmp << 32 || tmp > 64)
| ^ ~~
2 warnings and 1 error generated.
vim +/dev +275 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c
264
265 static void axi_dma_hw_init(struct axi_dma_chip *chip)
266 {
267 int ret;
268 u32 i, tmp;
269
270 for (i = 0; i < chip->dw->hdata->nr_channels; i++) {
271 axi_chan_irq_disable(&chip->dw->chan[i], DWAXIDMAC_IRQ_ALL);
272 axi_chan_disable(&chip->dw->chan[i]);
273 }
274
> 275 ret = device_property_read_u32(dev, "snps,dma-bit-mask", &tmp);
276 if (ret)
277 ret = dma_set_mask_and_coherent(chip->dev, DMA_BIT_MASK(64));
278 else {
> 279 if (tmp == 0 || tmp << 32 || tmp > 64)
280 dev_err(chip->dev, "Invalid dma bit mask\n");
281
282 ret = dma_set_mask_and_coherent(chip->dev, DMA_BIT_MASK(tmp));
283 }
284
285 if (ret)
286 dev_warn(chip->dev, "Unable to set coherent mask\n");
287 }
288
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2025-05-16 17:48 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-16 4:05 [PATCH 0/4] agilex5: Update agilex5 device tree and device tree bindings adrianhoyin.ng
2025-05-16 4:05 ` [PATCH 1/4] dt-bindings: dma: snps,dw-axi-dmac: Add iommus dma-coherent and dma bit-mask quirk adrianhoyin.ng
2025-05-16 4:05 ` [PATCH 2/4] dt-bindings: mtd: cadence: Add iommus and dma-coherent properties adrianhoyin.ng
2025-05-16 4:05 ` [PATCH 3/4] arm64: dts: socfpga: agilex5: Update Agilex5 DTSI and DTS adrianhoyin.ng
2025-05-16 4:05 ` [PATCH 4/4] dma: dw-axi-dmac: Add support for dma-bit-mask property adrianhoyin.ng
2025-05-16 17:36 ` kernel test robot
2025-05-16 17:47 ` kernel test robot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).