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()
517 static void __init of_at91rm9200_clk_periph_setup(struct device_node *np) in of_at91rm9200_clk_periph_setup() argument
519 of_at91_clk_periph_setup(np, PERIPHERAL_AT91RM9200); in of_at91rm9200_clk_periph_setup()
524 static void __init of_at91sam9x5_clk_periph_setup(struct device_node *np) in of_at91sam9x5_clk_periph_setup() argument
526 of_at91_clk_periph_setup(np, PERIPHERAL_AT91SAM9X5); in of_at91sam9x5_clk_periph_setup()
532 of_at91_clk_pll_get_characteristics(struct device_node *np) in of_at91_clk_pll_get_characteristics() argument
545 if (of_at91_get_clk_range(np, "atmel,clk-input-range", &input)) in of_at91_clk_pll_get_characteristics()
548 if (of_property_read_u32(np, "#atmel,pll-clk-output-range-cells", in of_at91_clk_pll_get_characteristics()
555 if (!of_get_property(np, "atmel,pll-clk-output-ranges", &tmp)) in of_at91_clk_pll_get_characteristics()
581 if (of_property_read_u32_index(np, in of_at91_clk_pll_get_characteristics()
586 if (of_property_read_u32_index(np, in of_at91_clk_pll_get_characteristics()
595 if (of_property_read_u32_index(np, in of_at91_clk_pll_get_characteristics()
604 if (of_property_read_u32_index(np, in of_at91_clk_pll_get_characteristics()
628 of_at91_clk_pll_setup(struct device_node *np, in of_at91_clk_pll_setup() argument
635 const char *name = np->name; in of_at91_clk_pll_setup()
639 if (of_property_read_u32(np, "reg", &id)) in of_at91_clk_pll_setup()
642 parent_name = of_clk_get_parent_name(np, 0); in of_at91_clk_pll_setup()
644 of_property_read_string(np, "clock-output-names", &name); in of_at91_clk_pll_setup()
646 parent_np = of_get_parent(np); in of_at91_clk_pll_setup()
652 characteristics = of_at91_clk_pll_get_characteristics(np); in of_at91_clk_pll_setup()
661 of_clk_add_hw_provider(np, of_clk_hw_simple_get, hw); in of_at91_clk_pll_setup()
668 static void __init of_at91rm9200_clk_pll_setup(struct device_node *np) in of_at91rm9200_clk_pll_setup() argument
670 of_at91_clk_pll_setup(np, &at91rm9200_pll_layout); in of_at91rm9200_clk_pll_setup()
675 static void __init of_at91sam9g45_clk_pll_setup(struct device_node *np) in of_at91sam9g45_clk_pll_setup() argument
677 of_at91_clk_pll_setup(np, &at91sam9g45_pll_layout); in of_at91sam9g45_clk_pll_setup()
682 static void __init of_at91sam9g20_clk_pllb_setup(struct device_node *np) in of_at91sam9g20_clk_pllb_setup() argument
684 of_at91_clk_pll_setup(np, &at91sam9g20_pllb_layout); in of_at91sam9g20_clk_pllb_setup()
689 static void __init of_sama5d3_clk_pll_setup(struct device_node *np) in of_sama5d3_clk_pll_setup() argument
691 of_at91_clk_pll_setup(np, &sama5d3_pll_layout); in of_sama5d3_clk_pll_setup()
697 of_at91sam9x5_clk_plldiv_setup(struct device_node *np) in of_at91sam9x5_clk_plldiv_setup() argument
701 const char *name = np->name; in of_at91sam9x5_clk_plldiv_setup()
705 parent_name = of_clk_get_parent_name(np, 0); in of_at91sam9x5_clk_plldiv_setup()
707 of_property_read_string(np, "clock-output-names", &name); in of_at91sam9x5_clk_plldiv_setup()
709 parent_np = of_get_parent(np); in of_at91sam9x5_clk_plldiv_setup()
719 of_clk_add_hw_provider(np, of_clk_hw_simple_get, hw); in of_at91sam9x5_clk_plldiv_setup()
725 of_at91_clk_prog_setup(struct device_node *np, in of_at91_clk_prog_setup() argument
738 num_parents = of_clk_get_parent_count(np); in of_at91_clk_prog_setup()
742 of_clk_parent_fill(np, parent_names, num_parents); in of_at91_clk_prog_setup()
744 num = of_get_child_count(np); in of_at91_clk_prog_setup()
748 parent_np = of_get_parent(np); in of_at91_clk_prog_setup()
754 for_each_child_of_node(np, progclknp) { in of_at91_clk_prog_setup()
758 if (of_property_read_string(np, "clock-output-names", &name)) in of_at91_clk_prog_setup()
771 static void __init of_at91rm9200_clk_prog_setup(struct device_node *np) in of_at91rm9200_clk_prog_setup() argument
773 of_at91_clk_prog_setup(np, &at91rm9200_programmable_layout, NULL); in of_at91rm9200_clk_prog_setup()
778 static void __init of_at91sam9g45_clk_prog_setup(struct device_node *np) in of_at91sam9g45_clk_prog_setup() argument
780 of_at91_clk_prog_setup(np, &at91sam9g45_programmable_layout, NULL); in of_at91sam9g45_clk_prog_setup()
785 static void __init of_at91sam9x5_clk_prog_setup(struct device_node *np) in of_at91sam9x5_clk_prog_setup() argument
787 of_at91_clk_prog_setup(np, &at91sam9x5_programmable_layout, NULL); in of_at91sam9x5_clk_prog_setup()
792 static void __init of_at91sam9260_clk_slow_setup(struct device_node *np) in of_at91sam9260_clk_slow_setup() argument
797 const char *name = np->name; in of_at91sam9260_clk_slow_setup()
801 num_parents = of_clk_get_parent_count(np); in of_at91sam9260_clk_slow_setup()
805 of_clk_parent_fill(np, parent_names, num_parents); in of_at91sam9260_clk_slow_setup()
806 parent_np = of_get_parent(np); in of_at91sam9260_clk_slow_setup()
812 of_property_read_string(np, "clock-output-names", &name); in of_at91sam9260_clk_slow_setup()
819 of_clk_add_hw_provider(np, of_clk_hw_simple_get, hw); in of_at91sam9260_clk_slow_setup()
827 static void __init of_at91sam9x5_clk_smd_setup(struct device_node *np) in of_at91sam9x5_clk_smd_setup() argument
832 const char *name = np->name; in of_at91sam9x5_clk_smd_setup()
836 num_parents = of_clk_get_parent_count(np); in of_at91sam9x5_clk_smd_setup()
840 of_clk_parent_fill(np, parent_names, num_parents); in of_at91sam9x5_clk_smd_setup()
842 of_property_read_string(np, "clock-output-names", &name); in of_at91sam9x5_clk_smd_setup()
844 parent_np = of_get_parent(np); in of_at91sam9x5_clk_smd_setup()
855 of_clk_add_hw_provider(np, of_clk_hw_simple_get, hw); in of_at91sam9x5_clk_smd_setup()
861 static void __init of_at91rm9200_clk_sys_setup(struct device_node *np) in of_at91rm9200_clk_sys_setup() argument
871 num = of_get_child_count(np); in of_at91rm9200_clk_sys_setup()
875 parent_np = of_get_parent(np); in of_at91rm9200_clk_sys_setup()
881 for_each_child_of_node(np, sysclknp) { in of_at91rm9200_clk_sys_setup()
885 if (of_property_read_string(np, "clock-output-names", &name)) in of_at91rm9200_clk_sys_setup()
903 static void __init of_at91sam9x5_clk_usb_setup(struct device_node *np) in of_at91sam9x5_clk_usb_setup() argument
908 const char *name = np->name; in of_at91sam9x5_clk_usb_setup()
912 num_parents = of_clk_get_parent_count(np); in of_at91sam9x5_clk_usb_setup()
916 of_clk_parent_fill(np, parent_names, num_parents); in of_at91sam9x5_clk_usb_setup()
918 of_property_read_string(np, "clock-output-names", &name); in of_at91sam9x5_clk_usb_setup()
920 parent_np = of_get_parent(np); in of_at91sam9x5_clk_usb_setup()
931 of_clk_add_hw_provider(np, of_clk_hw_simple_get, hw); in of_at91sam9x5_clk_usb_setup()
936 static void __init of_at91sam9n12_clk_usb_setup(struct device_node *np) in of_at91sam9n12_clk_usb_setup() argument
940 const char *name = np->name; in of_at91sam9n12_clk_usb_setup()
944 parent_name = of_clk_get_parent_name(np, 0); in of_at91sam9n12_clk_usb_setup()
948 of_property_read_string(np, "clock-output-names", &name); in of_at91sam9n12_clk_usb_setup()
950 parent_np = of_get_parent(np); in of_at91sam9n12_clk_usb_setup()
960 of_clk_add_hw_provider(np, of_clk_hw_simple_get, hw); in of_at91sam9n12_clk_usb_setup()
965 static void __init of_at91rm9200_clk_usb_setup(struct device_node *np) in of_at91rm9200_clk_usb_setup() argument
969 const char *name = np->name; in of_at91rm9200_clk_usb_setup()
974 parent_name = of_clk_get_parent_name(np, 0); in of_at91rm9200_clk_usb_setup()
978 of_property_read_u32_array(np, "atmel,clk-divisors", divisors, 4); in of_at91rm9200_clk_usb_setup()
982 of_property_read_string(np, "clock-output-names", &name); in of_at91rm9200_clk_usb_setup()
984 parent_np = of_get_parent(np); in of_at91rm9200_clk_usb_setup()
993 of_clk_add_hw_provider(np, of_clk_hw_simple_get, hw); in of_at91rm9200_clk_usb_setup()
1000 static void __init of_at91sam9x5_clk_utmi_setup(struct device_node *np) in of_at91sam9x5_clk_utmi_setup() argument
1004 const char *name = np->name; in of_at91sam9x5_clk_utmi_setup()
1008 parent_name = of_clk_get_parent_name(np, 0); in of_at91sam9x5_clk_utmi_setup()
1010 of_property_read_string(np, "clock-output-names", &name); in of_at91sam9x5_clk_utmi_setup()
1012 parent_np = of_get_parent(np); in of_at91sam9x5_clk_utmi_setup()
1040 of_clk_add_hw_provider(np, of_clk_hw_simple_get, hw); in of_at91sam9x5_clk_utmi_setup()