Lines Matching full:area

349 static void tsa_cpm1_init_entries_area(struct tsa *tsa, struct tsa_entries_area *area,  in tsa_cpm1_init_entries_area()  argument
362 area->entries_start = tsa->si_ram; in tsa_cpm1_init_entries_area()
363 area->entries_next = area->entries_start + half; in tsa_cpm1_init_entries_area()
364 area->last_entry = NULL; in tsa_cpm1_init_entries_area()
367 area->entries_start = tsa->si_ram + half; in tsa_cpm1_init_entries_area()
368 area->entries_next = area->entries_start + half; in tsa_cpm1_init_entries_area()
369 area->last_entry = NULL; in tsa_cpm1_init_entries_area()
376 area->entries_start = tsa->si_ram; in tsa_cpm1_init_entries_area()
377 area->entries_next = area->entries_start + quarter; in tsa_cpm1_init_entries_area()
378 area->last_entry = NULL; in tsa_cpm1_init_entries_area()
381 area->entries_start = tsa->si_ram + (2 * quarter); in tsa_cpm1_init_entries_area()
382 area->entries_next = area->entries_start + quarter; in tsa_cpm1_init_entries_area()
383 area->last_entry = NULL; in tsa_cpm1_init_entries_area()
388 area->entries_start = tsa->si_ram + quarter; in tsa_cpm1_init_entries_area()
389 area->entries_next = area->entries_start + quarter; in tsa_cpm1_init_entries_area()
390 area->last_entry = NULL; in tsa_cpm1_init_entries_area()
393 area->entries_start = tsa->si_ram + (3 * quarter); in tsa_cpm1_init_entries_area()
394 area->entries_next = area->entries_start + quarter; in tsa_cpm1_init_entries_area()
395 area->last_entry = NULL; in tsa_cpm1_init_entries_area()
401 static void tsa_qe_init_entries_area(struct tsa *tsa, struct tsa_entries_area *area, in tsa_qe_init_entries_area() argument
412 * In each half, 1/4 of the area is assigned to each TDM. in tsa_qe_init_entries_area()
416 area->entries_start = tsa->si_ram + half + (eighth * tdm_id); in tsa_qe_init_entries_area()
417 area->entries_next = area->entries_start + eighth; in tsa_qe_init_entries_area()
418 area->last_entry = NULL; in tsa_qe_init_entries_area()
421 area->entries_start = tsa->si_ram + (eighth * tdm_id); in tsa_qe_init_entries_area()
422 area->entries_next = area->entries_start + eighth; in tsa_qe_init_entries_area()
423 area->last_entry = NULL; in tsa_qe_init_entries_area()
427 static void tsa_init_entries_area(struct tsa *tsa, struct tsa_entries_area *area, in tsa_init_entries_area() argument
431 tsa_qe_init_entries_area(tsa, area, tdms, tdm_id, is_rx); in tsa_init_entries_area()
433 tsa_cpm1_init_entries_area(tsa, area, tdms, tdm_id, is_rx); in tsa_init_entries_area()
487 static int tsa_cpm1_add_entry(struct tsa *tsa, struct tsa_entries_area *area, in tsa_cpm1_add_entry() argument
496 addr = area->last_entry ? area->last_entry + 4 : area->entries_start; in tsa_cpm1_add_entry()
499 if ((addr + (nb * 4)) > area->entries_next) { in tsa_cpm1_add_entry()
500 dev_err(tsa->dev, "si ram area full\n"); in tsa_cpm1_add_entry()
504 if (area->last_entry) { in tsa_cpm1_add_entry()
506 tsa_clrbits32(area->last_entry, TSA_CPM1_SIRAM_ENTRY_LAST); in tsa_cpm1_add_entry()
518 area->last_entry = addr; in tsa_cpm1_add_entry()
544 static int tsa_qe_add_entry(struct tsa *tsa, struct tsa_entries_area *area, in tsa_qe_add_entry() argument
553 addr = area->last_entry ? area->last_entry + 2 : area->entries_start; in tsa_qe_add_entry()
556 if ((addr + (nb * 2)) > area->entries_next) { in tsa_qe_add_entry()
557 dev_err(tsa->dev, "si ram area full\n"); in tsa_qe_add_entry()
561 if (area->last_entry) { in tsa_qe_add_entry()
563 tsa_clrbits16(area->last_entry, TSA_QE_SIRAM_ENTRY_LAST); in tsa_qe_add_entry()
575 area->last_entry = addr; in tsa_qe_add_entry()
587 static int tsa_add_entry(struct tsa *tsa, struct tsa_entries_area *area, in tsa_add_entry() argument
591 tsa_qe_add_entry(tsa, area, count, serial_id) : in tsa_add_entry()
592 tsa_cpm1_add_entry(tsa, area, count, serial_id); in tsa_add_entry()
598 struct tsa_entries_area area; in tsa_of_parse_tdm_route() local
621 tsa_init_entries_area(tsa, &area, tdms, tdm_id, is_rx); in tsa_of_parse_tdm_route()
644 ret = tsa_add_entry(tsa, &area, count, serial_id); in tsa_of_parse_tdm_route()