Lines Matching refs:np

30 static void __init of_sama5d2_clk_audio_pll_frac_setup(struct device_node *np)  in of_sama5d2_clk_audio_pll_frac_setup()  argument
33 const char *name = np->name; in of_sama5d2_clk_audio_pll_frac_setup()
38 parent_np = of_get_parent(np); in of_sama5d2_clk_audio_pll_frac_setup()
44 parent_name = of_clk_get_parent_name(np, 0); in of_sama5d2_clk_audio_pll_frac_setup()
50 of_clk_add_hw_provider(np, of_clk_hw_simple_get, hw); in of_sama5d2_clk_audio_pll_frac_setup()
56 static void __init of_sama5d2_clk_audio_pll_pad_setup(struct device_node *np) in of_sama5d2_clk_audio_pll_pad_setup() argument
59 const char *name = np->name; in of_sama5d2_clk_audio_pll_pad_setup()
64 parent_np = of_get_parent(np); in of_sama5d2_clk_audio_pll_pad_setup()
70 parent_name = of_clk_get_parent_name(np, 0); in of_sama5d2_clk_audio_pll_pad_setup()
76 of_clk_add_hw_provider(np, of_clk_hw_simple_get, hw); in of_sama5d2_clk_audio_pll_pad_setup()
82 static void __init of_sama5d2_clk_audio_pll_pmc_setup(struct device_node *np) in of_sama5d2_clk_audio_pll_pmc_setup() argument
85 const char *name = np->name; in of_sama5d2_clk_audio_pll_pmc_setup()
90 parent_np = of_get_parent(np); in of_sama5d2_clk_audio_pll_pmc_setup()
96 parent_name = of_clk_get_parent_name(np, 0); in of_sama5d2_clk_audio_pll_pmc_setup()
102 of_clk_add_hw_provider(np, of_clk_hw_simple_get, hw); in of_sama5d2_clk_audio_pll_pmc_setup()
124 static void __init of_sama5d2_clk_generated_setup(struct device_node *np) in of_sama5d2_clk_generated_setup() argument
136 num_parents = of_clk_get_parent_count(np); in of_sama5d2_clk_generated_setup()
140 of_clk_parent_fill(np, parent_names, num_parents); in of_sama5d2_clk_generated_setup()
142 num = of_get_child_count(np); in of_sama5d2_clk_generated_setup()
146 parent_np = of_get_parent(np); in of_sama5d2_clk_generated_setup()
152 for_each_child_of_node(np, gcknp) { in of_sama5d2_clk_generated_setup()
161 if (of_property_read_string(np, "clock-output-names", &name)) in of_sama5d2_clk_generated_setup()
167 if (of_device_is_compatible(np, "atmel,sama5d2-clk-generated") && in of_sama5d2_clk_generated_setup()
188 static void __init of_sama5d4_clk_h32mx_setup(struct device_node *np) in of_sama5d4_clk_h32mx_setup() argument
191 const char *name = np->name; in of_sama5d4_clk_h32mx_setup()
196 parent_np = of_get_parent(np); in of_sama5d4_clk_h32mx_setup()
202 parent_name = of_clk_get_parent_name(np, 0); in of_sama5d4_clk_h32mx_setup()
208 of_clk_add_hw_provider(np, of_clk_hw_simple_get, hw); in of_sama5d4_clk_h32mx_setup()
217 static void __init of_sama5d2_clk_i2s_mux_setup(struct device_node *np) in of_sama5d2_clk_i2s_mux_setup() argument
230 for_each_child_of_node(np, i2s_mux_np) { in of_sama5d2_clk_i2s_mux_setup()
253 static void __init of_at91rm9200_clk_main_osc_setup(struct device_node *np) in of_at91rm9200_clk_main_osc_setup() argument
256 const char *name = np->name; in of_at91rm9200_clk_main_osc_setup()
262 of_property_read_string(np, "clock-output-names", &name); in of_at91rm9200_clk_main_osc_setup()
263 bypass = of_property_read_bool(np, "atmel,osc-bypass"); in of_at91rm9200_clk_main_osc_setup()
264 parent_name = of_clk_get_parent_name(np, 0); in of_at91rm9200_clk_main_osc_setup()
266 parent_np = of_get_parent(np); in of_at91rm9200_clk_main_osc_setup()
276 of_clk_add_hw_provider(np, of_clk_hw_simple_get, hw); in of_at91rm9200_clk_main_osc_setup()
281 static void __init of_at91sam9x5_clk_main_rc_osc_setup(struct device_node *np) in of_at91sam9x5_clk_main_rc_osc_setup() argument
286 const char *name = np->name; in of_at91sam9x5_clk_main_rc_osc_setup()
290 of_property_read_string(np, "clock-output-names", &name); in of_at91sam9x5_clk_main_rc_osc_setup()
291 of_property_read_u32(np, "clock-frequency", &frequency); in of_at91sam9x5_clk_main_rc_osc_setup()
292 of_property_read_u32(np, "clock-accuracy", &accuracy); in of_at91sam9x5_clk_main_rc_osc_setup()
294 parent_np = of_get_parent(np); in of_at91sam9x5_clk_main_rc_osc_setup()
304 of_clk_add_hw_provider(np, of_clk_hw_simple_get, hw); in of_at91sam9x5_clk_main_rc_osc_setup()
309 static void __init of_at91rm9200_clk_main_setup(struct device_node *np) in of_at91rm9200_clk_main_setup() argument
313 const char *name = np->name; in of_at91rm9200_clk_main_setup()
317 parent_name = of_clk_get_parent_name(np, 0); in of_at91rm9200_clk_main_setup()
318 of_property_read_string(np, "clock-output-names", &name); in of_at91rm9200_clk_main_setup()
320 parent_np = of_get_parent(np); in of_at91rm9200_clk_main_setup()
330 of_clk_add_hw_provider(np, of_clk_hw_simple_get, hw); in of_at91rm9200_clk_main_setup()
335 static void __init of_at91sam9x5_clk_main_setup(struct device_node *np) in of_at91sam9x5_clk_main_setup() argument
340 const char *name = np->name; in of_at91sam9x5_clk_main_setup()
344 num_parents = of_clk_get_parent_count(np); in of_at91sam9x5_clk_main_setup()
348 of_clk_parent_fill(np, parent_names, num_parents); in of_at91sam9x5_clk_main_setup()
349 parent_np = of_get_parent(np); in of_at91sam9x5_clk_main_setup()
355 of_property_read_string(np, "clock-output-names", &name); in of_at91sam9x5_clk_main_setup()
362 of_clk_add_hw_provider(np, of_clk_hw_simple_get, hw); in of_at91sam9x5_clk_main_setup()
368 of_at91_clk_master_get_characteristics(struct device_node *np) in of_at91_clk_master_get_characteristics() argument
376 if (of_at91_get_clk_range(np, "atmel,clk-output-range", &characteristics->output)) in of_at91_clk_master_get_characteristics()
379 of_property_read_u32_array(np, "atmel,clk-divisors", in of_at91_clk_master_get_characteristics()
383 of_property_read_bool(np, "atmel,master-clk-have-div3-pres"); in of_at91_clk_master_get_characteristics()
393 of_at91_clk_master_setup(struct device_node *np, in of_at91_clk_master_setup() argument
399 const char *name = np->name; in of_at91_clk_master_setup()
404 num_parents = of_clk_get_parent_count(np); in of_at91_clk_master_setup()
408 of_clk_parent_fill(np, parent_names, num_parents); in of_at91_clk_master_setup()
410 of_property_read_string(np, "clock-output-names", &name); in of_at91_clk_master_setup()
412 characteristics = of_at91_clk_master_get_characteristics(np); in of_at91_clk_master_setup()
416 parent_np = of_get_parent(np); in of_at91_clk_master_setup()
434 of_clk_add_hw_provider(np, of_clk_hw_simple_get, hw); in of_at91_clk_master_setup()
441 static void __init of_at91rm9200_clk_master_setup(struct device_node *np) in of_at91rm9200_clk_master_setup() argument
443 of_at91_clk_master_setup(np, &at91rm9200_master_layout); in of_at91rm9200_clk_master_setup()
448 static void __init of_at91sam9x5_clk_master_setup(struct device_node *np) in of_at91sam9x5_clk_master_setup() argument
450 of_at91_clk_master_setup(np, &at91sam9x5_master_layout); in of_at91sam9x5_clk_master_setup()
456 of_at91_clk_periph_setup(struct device_node *np, u8 type) in of_at91_clk_periph_setup() argument
467 parent_name = of_clk_get_parent_name(np, 0); in of_at91_clk_periph_setup()
471 num = of_get_child_count(np); in of_at91_clk_periph_setup()
475 parent_np = of_get_parent(np); in of_at91_clk_periph_setup()
481 for_each_child_of_node(np, periphclknp) { in of_at91_clk_periph_setup()
488 if (of_property_read_string(np, "clock-output-names", &name)) in of_at91_clk_periph_setup()
528 static void __init of_at91rm9200_clk_periph_setup(struct device_node *np) in of_at91rm9200_clk_periph_setup() argument
530 of_at91_clk_periph_setup(np, PERIPHERAL_AT91RM9200); in of_at91rm9200_clk_periph_setup()
535 static void __init of_at91sam9x5_clk_periph_setup(struct device_node *np) in of_at91sam9x5_clk_periph_setup() argument
537 of_at91_clk_periph_setup(np, PERIPHERAL_AT91SAM9X5); in of_at91sam9x5_clk_periph_setup()
543 of_at91_clk_pll_get_characteristics(struct device_node *np) in of_at91_clk_pll_get_characteristics() argument
556 if (of_at91_get_clk_range(np, "atmel,clk-input-range", &input)) in of_at91_clk_pll_get_characteristics()
559 if (of_property_read_u32(np, "#atmel,pll-clk-output-range-cells", in of_at91_clk_pll_get_characteristics()
566 if (!of_get_property(np, "atmel,pll-clk-output-ranges", &tmp)) in of_at91_clk_pll_get_characteristics()
592 if (of_property_read_u32_index(np, in of_at91_clk_pll_get_characteristics()
597 if (of_property_read_u32_index(np, in of_at91_clk_pll_get_characteristics()
606 if (of_property_read_u32_index(np, in of_at91_clk_pll_get_characteristics()
615 if (of_property_read_u32_index(np, in of_at91_clk_pll_get_characteristics()
639 of_at91_clk_pll_setup(struct device_node *np, in of_at91_clk_pll_setup() argument
646 const char *name = np->name; in of_at91_clk_pll_setup()
650 if (of_property_read_u32(np, "reg", &id)) in of_at91_clk_pll_setup()
653 parent_name = of_clk_get_parent_name(np, 0); in of_at91_clk_pll_setup()
655 of_property_read_string(np, "clock-output-names", &name); in of_at91_clk_pll_setup()
657 parent_np = of_get_parent(np); in of_at91_clk_pll_setup()
663 characteristics = of_at91_clk_pll_get_characteristics(np); in of_at91_clk_pll_setup()
672 of_clk_add_hw_provider(np, of_clk_hw_simple_get, hw); in of_at91_clk_pll_setup()
679 static void __init of_at91rm9200_clk_pll_setup(struct device_node *np) in of_at91rm9200_clk_pll_setup() argument
681 of_at91_clk_pll_setup(np, &at91rm9200_pll_layout); in of_at91rm9200_clk_pll_setup()
686 static void __init of_at91sam9g45_clk_pll_setup(struct device_node *np) in of_at91sam9g45_clk_pll_setup() argument
688 of_at91_clk_pll_setup(np, &at91sam9g45_pll_layout); in of_at91sam9g45_clk_pll_setup()
693 static void __init of_at91sam9g20_clk_pllb_setup(struct device_node *np) in of_at91sam9g20_clk_pllb_setup() argument
695 of_at91_clk_pll_setup(np, &at91sam9g20_pllb_layout); in of_at91sam9g20_clk_pllb_setup()
700 static void __init of_sama5d3_clk_pll_setup(struct device_node *np) in of_sama5d3_clk_pll_setup() argument
702 of_at91_clk_pll_setup(np, &sama5d3_pll_layout); in of_sama5d3_clk_pll_setup()
708 of_at91sam9x5_clk_plldiv_setup(struct device_node *np) in of_at91sam9x5_clk_plldiv_setup() argument
712 const char *name = np->name; in of_at91sam9x5_clk_plldiv_setup()
716 parent_name = of_clk_get_parent_name(np, 0); in of_at91sam9x5_clk_plldiv_setup()
718 of_property_read_string(np, "clock-output-names", &name); in of_at91sam9x5_clk_plldiv_setup()
720 parent_np = of_get_parent(np); in of_at91sam9x5_clk_plldiv_setup()
730 of_clk_add_hw_provider(np, of_clk_hw_simple_get, hw); in of_at91sam9x5_clk_plldiv_setup()
736 of_at91_clk_prog_setup(struct device_node *np, in of_at91_clk_prog_setup() argument
749 num_parents = of_clk_get_parent_count(np); in of_at91_clk_prog_setup()
753 of_clk_parent_fill(np, parent_names, num_parents); in of_at91_clk_prog_setup()
755 num = of_get_child_count(np); in of_at91_clk_prog_setup()
759 parent_np = of_get_parent(np); in of_at91_clk_prog_setup()
765 for_each_child_of_node(np, progclknp) { in of_at91_clk_prog_setup()
769 if (of_property_read_string(np, "clock-output-names", &name)) in of_at91_clk_prog_setup()
782 static void __init of_at91rm9200_clk_prog_setup(struct device_node *np) in of_at91rm9200_clk_prog_setup() argument
784 of_at91_clk_prog_setup(np, &at91rm9200_programmable_layout, NULL); in of_at91rm9200_clk_prog_setup()
789 static void __init of_at91sam9g45_clk_prog_setup(struct device_node *np) in of_at91sam9g45_clk_prog_setup() argument
791 of_at91_clk_prog_setup(np, &at91sam9g45_programmable_layout, NULL); in of_at91sam9g45_clk_prog_setup()
796 static void __init of_at91sam9x5_clk_prog_setup(struct device_node *np) in of_at91sam9x5_clk_prog_setup() argument
798 of_at91_clk_prog_setup(np, &at91sam9x5_programmable_layout, NULL); in of_at91sam9x5_clk_prog_setup()
803 static void __init of_at91sam9260_clk_slow_setup(struct device_node *np) in of_at91sam9260_clk_slow_setup() argument
808 const char *name = np->name; in of_at91sam9260_clk_slow_setup()
812 num_parents = of_clk_get_parent_count(np); in of_at91sam9260_clk_slow_setup()
816 of_clk_parent_fill(np, parent_names, num_parents); in of_at91sam9260_clk_slow_setup()
817 parent_np = of_get_parent(np); in of_at91sam9260_clk_slow_setup()
823 of_property_read_string(np, "clock-output-names", &name); in of_at91sam9260_clk_slow_setup()
830 of_clk_add_hw_provider(np, of_clk_hw_simple_get, hw); in of_at91sam9260_clk_slow_setup()
838 static void __init of_at91sam9x5_clk_smd_setup(struct device_node *np) in of_at91sam9x5_clk_smd_setup() argument
843 const char *name = np->name; in of_at91sam9x5_clk_smd_setup()
847 num_parents = of_clk_get_parent_count(np); in of_at91sam9x5_clk_smd_setup()
851 of_clk_parent_fill(np, parent_names, num_parents); in of_at91sam9x5_clk_smd_setup()
853 of_property_read_string(np, "clock-output-names", &name); in of_at91sam9x5_clk_smd_setup()
855 parent_np = of_get_parent(np); in of_at91sam9x5_clk_smd_setup()
866 of_clk_add_hw_provider(np, of_clk_hw_simple_get, hw); in of_at91sam9x5_clk_smd_setup()
872 static void __init of_at91rm9200_clk_sys_setup(struct device_node *np) in of_at91rm9200_clk_sys_setup() argument
882 num = of_get_child_count(np); in of_at91rm9200_clk_sys_setup()
886 parent_np = of_get_parent(np); in of_at91rm9200_clk_sys_setup()
892 for_each_child_of_node(np, sysclknp) { in of_at91rm9200_clk_sys_setup()
898 if (of_property_read_string(np, "clock-output-names", &name)) in of_at91rm9200_clk_sys_setup()
925 static void __init of_at91sam9x5_clk_usb_setup(struct device_node *np) in of_at91sam9x5_clk_usb_setup() argument
930 const char *name = np->name; in of_at91sam9x5_clk_usb_setup()
934 num_parents = of_clk_get_parent_count(np); in of_at91sam9x5_clk_usb_setup()
938 of_clk_parent_fill(np, parent_names, num_parents); in of_at91sam9x5_clk_usb_setup()
940 of_property_read_string(np, "clock-output-names", &name); in of_at91sam9x5_clk_usb_setup()
942 parent_np = of_get_parent(np); in of_at91sam9x5_clk_usb_setup()
953 of_clk_add_hw_provider(np, of_clk_hw_simple_get, hw); in of_at91sam9x5_clk_usb_setup()
958 static void __init of_at91sam9n12_clk_usb_setup(struct device_node *np) in of_at91sam9n12_clk_usb_setup() argument
962 const char *name = np->name; in of_at91sam9n12_clk_usb_setup()
966 parent_name = of_clk_get_parent_name(np, 0); in of_at91sam9n12_clk_usb_setup()
970 of_property_read_string(np, "clock-output-names", &name); in of_at91sam9n12_clk_usb_setup()
972 parent_np = of_get_parent(np); in of_at91sam9n12_clk_usb_setup()
982 of_clk_add_hw_provider(np, of_clk_hw_simple_get, hw); in of_at91sam9n12_clk_usb_setup()
987 static void __init of_at91rm9200_clk_usb_setup(struct device_node *np) in of_at91rm9200_clk_usb_setup() argument
991 const char *name = np->name; in of_at91rm9200_clk_usb_setup()
996 parent_name = of_clk_get_parent_name(np, 0); in of_at91rm9200_clk_usb_setup()
1000 of_property_read_u32_array(np, "atmel,clk-divisors", divisors, 4); in of_at91rm9200_clk_usb_setup()
1004 of_property_read_string(np, "clock-output-names", &name); in of_at91rm9200_clk_usb_setup()
1006 parent_np = of_get_parent(np); in of_at91rm9200_clk_usb_setup()
1015 of_clk_add_hw_provider(np, of_clk_hw_simple_get, hw); in of_at91rm9200_clk_usb_setup()
1022 static void __init of_at91sam9x5_clk_utmi_setup(struct device_node *np) in of_at91sam9x5_clk_utmi_setup() argument
1026 const char *name = np->name; in of_at91sam9x5_clk_utmi_setup()
1030 parent_name = of_clk_get_parent_name(np, 0); in of_at91sam9x5_clk_utmi_setup()
1032 of_property_read_string(np, "clock-output-names", &name); in of_at91sam9x5_clk_utmi_setup()
1034 parent_np = of_get_parent(np); in of_at91sam9x5_clk_utmi_setup()
1062 of_clk_add_hw_provider(np, of_clk_hw_simple_get, hw); in of_at91sam9x5_clk_utmi_setup()