Lines Matching refs:drmem
394 static void read_drconf_cell(struct of_drconf_cell *drmem, const __be32 **cellp) in read_drconf_cell() argument
398 drmem->base_addr = read_n_cells(n_mem_addr_cells, cellp); in read_drconf_cell()
401 drmem->drc_index = of_read_number(cp, 1); in read_drconf_cell()
402 drmem->reserved = of_read_number(&cp[1], 1); in read_drconf_cell()
403 drmem->aa_index = of_read_number(&cp[2], 1); in read_drconf_cell()
404 drmem->flags = of_read_number(&cp[3], 1); in read_drconf_cell()
496 static int of_drconf_to_nid_single(struct of_drconf_cell *drmem, in of_drconf_to_nid_single() argument
504 !(drmem->flags & DRCONF_MEM_AI_INVALID) && in of_drconf_to_nid_single()
505 drmem->aa_index < aa->n_arrays) { in of_drconf_to_nid_single()
506 index = drmem->aa_index * aa->array_sz + min_common_depth - 1; in of_drconf_to_nid_single()
513 index = drmem->aa_index * aa->array_sz; in of_drconf_to_nid_single()
682 struct of_drconf_cell drmem; in parse_drconf_memory() local
684 read_drconf_cell(&drmem, &dm); in parse_drconf_memory()
688 if ((drmem.flags & DRCONF_MEM_RESERVED) in parse_drconf_memory()
689 || !(drmem.flags & DRCONF_MEM_ASSIGNED)) in parse_drconf_memory()
692 base = drmem.base_addr; in parse_drconf_memory()
706 nid = of_drconf_to_nid_single(&drmem, &aa); in parse_drconf_memory()
1062 struct of_drconf_cell drmem; in hot_add_drconf_scn_to_nid() local
1064 read_drconf_cell(&drmem, &dm); in hot_add_drconf_scn_to_nid()
1068 if ((drmem.flags & DRCONF_MEM_RESERVED) in hot_add_drconf_scn_to_nid()
1069 || !(drmem.flags & DRCONF_MEM_ASSIGNED)) in hot_add_drconf_scn_to_nid()
1072 if ((scn_addr < drmem.base_addr) in hot_add_drconf_scn_to_nid()
1073 || (scn_addr >= (drmem.base_addr + lmb_size))) in hot_add_drconf_scn_to_nid()
1076 nid = of_drconf_to_nid_single(&drmem, &aa); in hot_add_drconf_scn_to_nid()