Lines Matching refs:console

422 	struct octeon_console *console;  in octeon_console_handle_result()  local
424 console = &oct->console[console_num]; in octeon_console_handle_result()
426 console->waiting = 0; in octeon_console_handle_result()
432 struct octeon_console *console, in output_console_line() argument
453 if (console->leftover[0] && in output_console_line()
454 (line != console->leftover)) { in output_console_line()
455 if (console->print) in output_console_line()
456 (*console->print)(oct, (u32)console_num, in output_console_line()
457 console->leftover, in output_console_line()
459 console->leftover[0] = '\0'; in output_console_line()
461 if (console->print) in output_console_line()
462 (*console->print)(oct, (u32)console_num, in output_console_line()
472 len = strlen(console->leftover); in output_console_line()
473 strscpy(&console->leftover[len], line, in output_console_line()
474 sizeof(console->leftover) - len + 1); in output_console_line()
482 struct octeon_console *console; in check_console() local
488 console = &oct->console[console_num]; in check_console()
501 if (console->waiting) in check_console()
503 if (console->print) { in check_console()
504 output_console_line(oct, console, console_num, in check_console()
518 if (console->print && (total_read == 0) && in check_console()
519 (console->leftover[0])) { in check_console()
521 len = strlen(console->leftover); in check_console()
522 console->leftover[len] = '\n'; in check_console()
523 output_console_line(oct, console, console_num, in check_console()
524 console->leftover, (s32)(len + 1)); in check_console()
525 console->leftover[0] = '\0'; in check_console()
579 struct octeon_console *console; in octeon_get_uboot_version() local
600 console = &oct->console[console_num]; in octeon_get_uboot_version()
617 if (console->waiting) in octeon_get_uboot_version()
630 if ((total_read == 0) && (console->leftover[0])) { in octeon_get_uboot_version()
632 console_num, console->leftover); in octeon_get_uboot_version()
633 console->leftover[0] = '\0'; in octeon_get_uboot_version()
659 struct octeon_console *console; in octeon_add_console() local
666 console = &oct->console[console_num]; in octeon_add_console()
668 console->waiting = 0; in octeon_add_console()
673 console->addr = octeon_read_device_mem64(oct, coreaddr); in octeon_add_console()
674 coreaddr = console->addr + offsetof(struct octeon_pci_console, in octeon_add_console()
676 console->buffer_size = octeon_read_device_mem32(oct, coreaddr); in octeon_add_console()
677 coreaddr = console->addr + offsetof(struct octeon_pci_console, in octeon_add_console()
679 console->input_base_addr = in octeon_add_console()
681 coreaddr = console->addr + offsetof(struct octeon_pci_console, in octeon_add_console()
683 console->output_base_addr = in octeon_add_console()
685 console->leftover[0] = '\0'; in octeon_add_console()
703 console->active = 1; in octeon_add_console()
717 struct octeon_console *console; in octeon_remove_consoles() local
720 console = &oct->console[i]; in octeon_remove_consoles()
722 if (!console->active) in octeon_remove_consoles()
727 console->addr = 0; in octeon_remove_consoles()
728 console->buffer_size = 0; in octeon_remove_consoles()
729 console->input_base_addr = 0; in octeon_remove_consoles()
730 console->output_base_addr = 0; in octeon_remove_consoles()
762 struct octeon_console *console; in octeon_console_read() local
770 console = &oct->console[console_num]; in octeon_console_read()
775 rd_idx = octeon_read_device_mem32(oct, console->addr + in octeon_console_read()
777 wr_idx = octeon_read_device_mem32(oct, console->addr + in octeon_console_read()
780 bytes_to_read = octeon_console_avail_bytes(console->buffer_size, in octeon_console_read()
790 if (rd_idx + bytes_to_read >= console->buffer_size) in octeon_console_read()
791 bytes_to_read = console->buffer_size - rd_idx; in octeon_console_read()
793 octeon_pci_read_core_mem(oct, console->output_base_addr + rd_idx, in octeon_console_read()
795 octeon_write_device_mem32(oct, console->addr + in octeon_console_read()
799 console->buffer_size); in octeon_console_read()