Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[POWERPC] 85xx: Enable DMA engine on the MPC8544 DS

Add the device tree node for the DMA engine on 8544, publish
the device and enable the driver in the defconfig.

Signed-off-by: Sebastian Siewior <bigeasy@linutronix.de>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>

authored by

Sebastian Siewior and committed by
Kumar Gala
1028d4f1 370131c3

+70 -1
+41
arch/powerpc/boot/dts/mpc8544ds.dts
··· 116 116 }; 117 117 }; 118 118 119 + dma@21300 { 120 + #address-cells = <1>; 121 + #size-cells = <1>; 122 + compatible = "fsl,mpc8544-dma", "fsl,eloplus-dma"; 123 + reg = <21300 4>; 124 + ranges = <0 21100 200>; 125 + cell-index = <0>; 126 + dma-channel@0 { 127 + compatible = "fsl,mpc8544-dma-channel", 128 + "fsl,eloplus-dma-channel"; 129 + reg = <0 80>; 130 + cell-index = <0>; 131 + interrupt-parent = <&mpic>; 132 + interrupts = <14 2>; 133 + }; 134 + dma-channel@80 { 135 + compatible = "fsl,mpc8544-dma-channel", 136 + "fsl,eloplus-dma-channel"; 137 + reg = <80 80>; 138 + cell-index = <1>; 139 + interrupt-parent = <&mpic>; 140 + interrupts = <15 2>; 141 + }; 142 + dma-channel@100 { 143 + compatible = "fsl,mpc8544-dma-channel", 144 + "fsl,eloplus-dma-channel"; 145 + reg = <100 80>; 146 + cell-index = <2>; 147 + interrupt-parent = <&mpic>; 148 + interrupts = <16 2>; 149 + }; 150 + dma-channel@180 { 151 + compatible = "fsl,mpc8544-dma-channel", 152 + "fsl,eloplus-dma-channel"; 153 + reg = <180 80>; 154 + cell-index = <3>; 155 + interrupt-parent = <&mpic>; 156 + interrupts = <17 2>; 157 + }; 158 + }; 159 + 119 160 enet0: ethernet@24000 { 120 161 cell-index = <0>; 121 162 device_type = "network";
+16 -1
arch/powerpc/configs/85xx/mpc8544_ds_defconfig
··· 162 162 # CONFIG_MPC85xx_CDS is not set 163 163 # CONFIG_MPC85xx_MDS is not set 164 164 CONFIG_MPC85xx_DS=y 165 + # CONFIG_KSI8560 is not set 165 166 # CONFIG_STX_GP3 is not set 166 167 # CONFIG_TQM8540 is not set 167 168 # CONFIG_TQM8541 is not set ··· 203 202 # CONFIG_PREEMPT is not set 204 203 CONFIG_BINFMT_ELF=y 205 204 CONFIG_BINFMT_MISC=m 205 + CONFIG_FORCE_MAX_ZONEORDER=11 206 206 CONFIG_MATH_EMULATION=y 207 207 # CONFIG_IOMMU_HELPER is not set 208 208 CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y ··· 1257 1255 # 1258 1256 # on-CPU RTC drivers 1259 1257 # 1260 - # CONFIG_DMADEVICES is not set 1258 + CONFIG_DMADEVICES=y 1259 + 1260 + # 1261 + # DMA Devices 1262 + # 1263 + CONFIG_FSL_DMA=y 1264 + # CONFIG_FSL_DMA_SELFTEST is not set 1265 + CONFIG_DMA_ENGINE=y 1266 + 1267 + # 1268 + # DMA Clients 1269 + # 1270 + # CONFIG_NET_DMA is not set 1261 1271 1262 1272 # 1263 1273 # Userspace I/O ··· 1461 1447 CONFIG_HAS_IOMEM=y 1462 1448 CONFIG_HAS_IOPORT=y 1463 1449 CONFIG_HAS_DMA=y 1450 + CONFIG_HAVE_LMB=y 1464 1451 1465 1452 # 1466 1453 # Kernel hacking
+13
arch/powerpc/platforms/85xx/mpc85xx_ds.c
··· 19 19 #include <linux/delay.h> 20 20 #include <linux/seq_file.h> 21 21 #include <linux/interrupt.h> 22 + #include <linux/of_platform.h> 22 23 23 24 #include <asm/system.h> 24 25 #include <asm/time.h> ··· 183 182 return 0; 184 183 } 185 184 } 185 + 186 + static struct of_device_id mpc85xxds_ids[] = { 187 + { .type = "soc", }, 188 + { .compatible = "soc", }, 189 + {}, 190 + }; 191 + 192 + static int __init mpc85xxds_publish_devices(void) 193 + { 194 + return of_platform_bus_probe(NULL, mpc85xxds_ids, NULL); 195 + } 196 + machine_device_initcall(mpc8544_ds, mpc85xxds_publish_devices); 186 197 187 198 /* 188 199 * Called very early, device-tree isn't unflattened