1 // SPDX-License-Identifier: GPL-2.0 1 2 #undef DEBUG 3 4 #include <linux/kernel.h> 5 #include <linux/string.h> 6 #include <linux/ioport.h> 7 #include <linux/etherdevice.h> 8 #include <linux/of_address.h> 9 #include <asm/prom.h> 10 11 void of_parse_dma_window(struct device_node *d 12 unsigned long *busno, 13 unsigned long *size) 14 { 15 u32 cells; 16 const __be32 *prop; 17 18 /* busno is always one cell */ 19 *busno = of_read_number(dma_window, 1) 20 dma_window++; 21 22 prop = of_get_property(dn, "ibm,#dma-a 23 if (!prop) 24 prop = of_get_property(dn, "#a 25 26 cells = prop ? of_read_number(prop, 1) 27 *phys = of_read_number(dma_window, cel 28 29 dma_window += cells; 30 31 prop = of_get_property(dn, "ibm,#dma-s 32 cells = prop ? of_read_number(prop, 1) 33 *size = of_read_number(dma_window, cel 34 } 35
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.