Lines Matching refs:nodes
703 int (*get_smp_nodes)(struct sunxi_mc_smp_nodes *nodes);
707 static void __init sunxi_mc_smp_put_nodes(struct sunxi_mc_smp_nodes *nodes) in sunxi_mc_smp_put_nodes() argument
709 of_node_put(nodes->prcm_node); in sunxi_mc_smp_put_nodes()
710 of_node_put(nodes->cpucfg_node); in sunxi_mc_smp_put_nodes()
711 of_node_put(nodes->sram_node); in sunxi_mc_smp_put_nodes()
712 of_node_put(nodes->r_cpucfg_node); in sunxi_mc_smp_put_nodes()
713 memset(nodes, 0, sizeof(*nodes)); in sunxi_mc_smp_put_nodes()
716 static int __init sun9i_a80_get_smp_nodes(struct sunxi_mc_smp_nodes *nodes) in sun9i_a80_get_smp_nodes() argument
718 nodes->prcm_node = of_find_compatible_node(NULL, NULL, in sun9i_a80_get_smp_nodes()
720 if (!nodes->prcm_node) { in sun9i_a80_get_smp_nodes()
725 nodes->cpucfg_node = of_find_compatible_node(NULL, NULL, in sun9i_a80_get_smp_nodes()
727 if (!nodes->cpucfg_node) { in sun9i_a80_get_smp_nodes()
732 nodes->sram_node = of_find_compatible_node(NULL, NULL, in sun9i_a80_get_smp_nodes()
734 if (!nodes->sram_node) { in sun9i_a80_get_smp_nodes()
742 static int __init sun8i_a83t_get_smp_nodes(struct sunxi_mc_smp_nodes *nodes) in sun8i_a83t_get_smp_nodes() argument
744 nodes->prcm_node = of_find_compatible_node(NULL, NULL, in sun8i_a83t_get_smp_nodes()
746 if (!nodes->prcm_node) { in sun8i_a83t_get_smp_nodes()
751 nodes->cpucfg_node = of_find_compatible_node(NULL, NULL, in sun8i_a83t_get_smp_nodes()
753 if (!nodes->cpucfg_node) { in sun8i_a83t_get_smp_nodes()
758 nodes->r_cpucfg_node = of_find_compatible_node(NULL, NULL, in sun8i_a83t_get_smp_nodes()
760 if (!nodes->r_cpucfg_node) { in sun8i_a83t_get_smp_nodes()
782 struct sunxi_mc_smp_nodes nodes = { 0 }; in sunxi_mc_smp_init() local
826 ret = sunxi_mc_smp_data[i].get_smp_nodes(&nodes); in sunxi_mc_smp_init()
834 prcm_base = of_iomap(nodes.prcm_node, 0); in sunxi_mc_smp_init()
841 cpucfg_base = of_io_request_and_map(nodes.cpucfg_node, 0, in sunxi_mc_smp_init()
851 r_cpucfg_base = of_io_request_and_map(nodes.r_cpucfg_node, in sunxi_mc_smp_init()
860 sram_b_smp_base = of_io_request_and_map(nodes.sram_node, 0, in sunxi_mc_smp_init()
878 sunxi_mc_smp_put_nodes(&nodes); in sunxi_mc_smp_init()
897 of_address_to_resource(nodes.r_cpucfg_node, 0, &res); in sunxi_mc_smp_init()
900 of_address_to_resource(nodes.sram_node, 0, &res); in sunxi_mc_smp_init()
905 of_address_to_resource(nodes.cpucfg_node, 0, &res); in sunxi_mc_smp_init()
910 sunxi_mc_smp_put_nodes(&nodes); in sunxi_mc_smp_init()