Lines Matching refs:dr_cell
65 struct of_drconf_cell_v1 *dr_cell; in drmem_update_dt_v1() local
76 dr_cell = (struct of_drconf_cell_v1 *)p; in drmem_update_dt_v1()
79 dr_cell->base_addr = cpu_to_be64(lmb->base_addr); in drmem_update_dt_v1()
80 dr_cell->drc_index = cpu_to_be32(lmb->drc_index); in drmem_update_dt_v1()
81 dr_cell->aa_index = cpu_to_be32(lmb->aa_index); in drmem_update_dt_v1()
82 dr_cell->flags = cpu_to_be32(drmem_lmb_flags(lmb)); in drmem_update_dt_v1()
84 dr_cell++; in drmem_update_dt_v1()
91 static void init_drconf_v2_cell(struct of_drconf_cell_v2 *dr_cell, in init_drconf_v2_cell() argument
94 dr_cell->base_addr = cpu_to_be64(lmb->base_addr); in init_drconf_v2_cell()
95 dr_cell->drc_index = cpu_to_be32(lmb->drc_index); in init_drconf_v2_cell()
96 dr_cell->aa_index = cpu_to_be32(lmb->aa_index); in init_drconf_v2_cell()
97 dr_cell->flags = cpu_to_be32(drmem_lmb_flags(lmb)); in init_drconf_v2_cell()
104 struct of_drconf_cell_v2 *dr_cell; in drmem_update_dt_v2() local
126 prop_sz = lmb_sets * sizeof(*dr_cell) + sizeof(__be32); in drmem_update_dt_v2()
134 dr_cell = (struct of_drconf_cell_v2 *)p; in drmem_update_dt_v2()
143 init_drconf_v2_cell(dr_cell, lmb); in drmem_update_dt_v2()
151 dr_cell->seq_lmbs = cpu_to_be32(seq_lmbs); in drmem_update_dt_v2()
152 dr_cell++; in drmem_update_dt_v2()
154 init_drconf_v2_cell(dr_cell, lmb); in drmem_update_dt_v2()
164 dr_cell->seq_lmbs = cpu_to_be32(seq_lmbs); in drmem_update_dt_v2()
224 static void __init read_drconf_v2_cell(struct of_drconf_cell_v2 *dr_cell, in read_drconf_v2_cell() argument
229 dr_cell->seq_lmbs = of_read_number(p++, 1); in read_drconf_v2_cell()
230 dr_cell->base_addr = dt_mem_next_cell(dt_root_addr_cells, &p); in read_drconf_v2_cell()
231 dr_cell->drc_index = of_read_number(p++, 1); in read_drconf_v2_cell()
232 dr_cell->aa_index = of_read_number(p++, 1); in read_drconf_v2_cell()
233 dr_cell->flags = of_read_number(p++, 1); in read_drconf_v2_cell()
241 struct of_drconf_cell_v2 dr_cell; in __walk_drmem_v2_lmbs() local
250 read_drconf_v2_cell(&dr_cell, &prop); in __walk_drmem_v2_lmbs()
252 for (j = 0; j < dr_cell.seq_lmbs; j++) { in __walk_drmem_v2_lmbs()
253 lmb.base_addr = dr_cell.base_addr; in __walk_drmem_v2_lmbs()
254 dr_cell.base_addr += drmem_lmb_size(); in __walk_drmem_v2_lmbs()
256 lmb.drc_index = dr_cell.drc_index; in __walk_drmem_v2_lmbs()
257 dr_cell.drc_index++; in __walk_drmem_v2_lmbs()
259 lmb.aa_index = dr_cell.aa_index; in __walk_drmem_v2_lmbs()
260 lmb.flags = dr_cell.flags; in __walk_drmem_v2_lmbs()
374 struct of_drconf_cell_v2 dr_cell; in init_drmem_v2_lmbs() local
386 read_drconf_v2_cell(&dr_cell, &p); in init_drmem_v2_lmbs()
387 drmem_info->n_lmbs += dr_cell.seq_lmbs; in init_drmem_v2_lmbs()
400 read_drconf_v2_cell(&dr_cell, &p); in init_drmem_v2_lmbs()
402 for (j = 0; j < dr_cell.seq_lmbs; j++) { in init_drmem_v2_lmbs()
405 lmb->base_addr = dr_cell.base_addr; in init_drmem_v2_lmbs()
406 dr_cell.base_addr += drmem_info->lmb_size; in init_drmem_v2_lmbs()
408 lmb->drc_index = dr_cell.drc_index; in init_drmem_v2_lmbs()
409 dr_cell.drc_index++; in init_drmem_v2_lmbs()
411 lmb->aa_index = dr_cell.aa_index; in init_drmem_v2_lmbs()
412 lmb->flags = dr_cell.flags; in init_drmem_v2_lmbs()