Lines Matching refs:np
34 static int __init mv64x60_mpsc_register_shared_pdev(struct device_node *np) in mv64x60_mpsc_register_shared_pdev() argument
43 ph = of_get_property(np, "mpscrouting", NULL); in mv64x60_mpsc_register_shared_pdev()
53 ph = of_get_property(np, "mpscintr", NULL); in mv64x60_mpsc_register_shared_pdev()
89 static int __init mv64x60_mpsc_device_setup(struct device_node *np, int id) in mv64x60_mpsc_device_setup() argument
101 if (id == 0 && (err = mv64x60_mpsc_register_shared_pdev(np))) in mv64x60_mpsc_device_setup()
106 err = of_address_to_resource(np, 0, &r[0]); in mv64x60_mpsc_device_setup()
110 of_irq_to_resource(np, 0, &r[4]); in mv64x60_mpsc_device_setup()
112 ph = of_get_property(np, "sdma", NULL); in mv64x60_mpsc_device_setup()
123 ph = of_get_property(np, "brg", NULL); in mv64x60_mpsc_device_setup()
133 prop = of_get_property(np, "cell-index", NULL); in mv64x60_mpsc_device_setup()
143 prop = of_get_property(np, "max_idle", NULL); in mv64x60_mpsc_device_setup()
156 prop = of_get_property(np, "chr_1", NULL); in mv64x60_mpsc_device_setup()
160 prop = of_get_property(np, "chr_2", NULL); in mv64x60_mpsc_device_setup()
164 prop = of_get_property(np, "chr_10", NULL); in mv64x60_mpsc_device_setup()
168 prop = of_get_property(np, "mpcr", NULL); in mv64x60_mpsc_device_setup()
214 struct device_node *np, int id) in mv64x60_eth_register_shared_pdev() argument
220 err = of_address_to_resource(np, 0, &r[0]); in mv64x60_eth_register_shared_pdev()
241 static int __init mv64x60_eth_device_setup(struct device_node *np, int id, in mv64x60_eth_device_setup() argument
254 of_irq_to_resource(np, 0, &r[0]); in mv64x60_eth_device_setup()
260 prop = of_get_property(np, "reg", NULL); in mv64x60_eth_device_setup()
265 mac_addr = of_get_mac_address(np); in mv64x60_eth_device_setup()
269 prop = of_get_property(np, "speed", NULL); in mv64x60_eth_device_setup()
273 prop = of_get_property(np, "tx_queue_size", NULL); in mv64x60_eth_device_setup()
277 prop = of_get_property(np, "rx_queue_size", NULL); in mv64x60_eth_device_setup()
281 prop = of_get_property(np, "tx_sram_addr", NULL); in mv64x60_eth_device_setup()
285 prop = of_get_property(np, "tx_sram_size", NULL); in mv64x60_eth_device_setup()
289 prop = of_get_property(np, "rx_sram_addr", NULL); in mv64x60_eth_device_setup()
293 prop = of_get_property(np, "rx_sram_size", NULL); in mv64x60_eth_device_setup()
297 ph = of_get_property(np, "phy", NULL); in mv64x60_eth_device_setup()
338 static int __init mv64x60_i2c_device_setup(struct device_node *np, int id) in mv64x60_i2c_device_setup() argument
348 err = of_address_to_resource(np, 0, &r[0]); in mv64x60_i2c_device_setup()
352 of_irq_to_resource(np, 0, &r[1]); in mv64x60_i2c_device_setup()
357 prop = of_get_property(np, "freq_m", NULL); in mv64x60_i2c_device_setup()
362 prop = of_get_property(np, "freq_n", NULL); in mv64x60_i2c_device_setup()
394 static int __init mv64x60_wdt_device_setup(struct device_node *np, int id) in mv64x60_wdt_device_setup() argument
402 err = of_address_to_resource(np, 0, &r); in mv64x60_wdt_device_setup()
410 np = of_get_parent(np); in mv64x60_wdt_device_setup()
411 if (!np) in mv64x60_wdt_device_setup()
414 prop = of_get_property(np, "clock-frequency", NULL); in mv64x60_wdt_device_setup()
415 of_node_put(np); in mv64x60_wdt_device_setup()
445 struct device_node *np, *np2; in mv64x60_device_setup() local
451 for_each_compatible_node(np, NULL, "marvell,mv64360-mpsc") { in mv64x60_device_setup()
452 err = mv64x60_mpsc_device_setup(np, id++); in mv64x60_device_setup()
456 np->full_name, err); in mv64x60_device_setup()
461 for_each_compatible_node(np, NULL, "marvell,mv64360-eth-group") { in mv64x60_device_setup()
462 pdev = mv64x60_eth_register_shared_pdev(np, id++); in mv64x60_device_setup()
467 np->full_name, err); in mv64x60_device_setup()
470 for_each_child_of_node(np, np2) { in mv64x60_device_setup()
484 for_each_compatible_node(np, "i2c", "marvell,mv64360-i2c") { in mv64x60_device_setup()
485 err = mv64x60_i2c_device_setup(np, id++); in mv64x60_device_setup()
489 np->full_name, err); in mv64x60_device_setup()
493 np = of_find_compatible_node(np, NULL, "marvell,mv64360-wdt"); in mv64x60_device_setup()
494 if (np) { in mv64x60_device_setup()
495 if ((err = mv64x60_wdt_device_setup(np, id))) in mv64x60_device_setup()
498 np->full_name, err); in mv64x60_device_setup()
499 of_node_put(np); in mv64x60_device_setup()
503 for_each_compatible_node(np, NULL, "marvell,mv64360") in mv64x60_device_setup()
504 of_platform_bus_probe(np, of_mv64x60_devices, NULL); in mv64x60_device_setup()
512 struct device_node *np = NULL; in mv64x60_add_mpsc_console() local
519 np = of_find_node_by_path(prop); in mv64x60_add_mpsc_console()
520 if (!np) in mv64x60_add_mpsc_console()
523 if (!of_device_is_compatible(np, "marvell,mv64360-mpsc")) in mv64x60_add_mpsc_console()
526 prop = of_get_property(np, "cell-index", NULL); in mv64x60_add_mpsc_console()