forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-09-20 a36159eec6ca17402b0e146b86efaf76568dc353
kernel/arch/mips/sgi-ip22/ip22-platform.c
....@@ -3,6 +3,7 @@
33 #include <linux/if_ether.h>
44 #include <linux/kernel.h>
55 #include <linux/platform_device.h>
6
+#include <linux/dma-mapping.h>
67
78 #include <asm/paccess.h>
89 #include <asm/sgi/ip22.h>
....@@ -25,6 +26,8 @@
2526 .irq = SGI_WD93_0_IRQ,
2627 };
2728
29
+static u64 sgiwd93_0_dma_mask = DMA_BIT_MASK(32);
30
+
2831 static struct platform_device sgiwd93_0_device = {
2932 .name = "sgiwd93",
3033 .id = 0,
....@@ -32,6 +35,8 @@
3235 .resource = sgiwd93_0_resources,
3336 .dev = {
3437 .platform_data = &sgiwd93_0_pd,
38
+ .dma_mask = &sgiwd93_0_dma_mask,
39
+ .coherent_dma_mask = DMA_BIT_MASK(32),
3540 },
3641 };
3742
....@@ -49,6 +54,8 @@
4954 .irq = SGI_WD93_1_IRQ,
5055 };
5156
57
+static u64 sgiwd93_1_dma_mask = DMA_BIT_MASK(32);
58
+
5259 static struct platform_device sgiwd93_1_device = {
5360 .name = "sgiwd93",
5461 .id = 1,
....@@ -56,6 +63,8 @@
5663 .resource = sgiwd93_1_resources,
5764 .dev = {
5865 .platform_data = &sgiwd93_1_pd,
66
+ .dma_mask = &sgiwd93_1_dma_mask,
67
+ .coherent_dma_mask = DMA_BIT_MASK(32),
5968 },
6069 };
6170
....@@ -96,6 +105,8 @@
96105
97106 static struct sgiseeq_platform_data eth0_pd;
98107
108
+static u64 sgiseeq_dma_mask = DMA_BIT_MASK(32);
109
+
99110 static struct platform_device eth0_device = {
100111 .name = "sgiseeq",
101112 .id = 0,
....@@ -103,6 +114,8 @@
103114 .resource = sgiseeq_0_resources,
104115 .dev = {
105116 .platform_data = &eth0_pd,
117
+ .dma_mask = &sgiseeq_dma_mask,
118
+ .coherent_dma_mask = DMA_BIT_MASK(32),
106119 },
107120 };
108121