Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/sparc64/src/drivers/scr.c

    r9d58539 r9a5abb78  
    4646#include <align.h>
    4747#include <print.h>
     48#include <log.h>
    4849
    4950#define FFB_REG_24BPP   7
     
    8182       
    8283        if (scr_type == SCR_UNKNOWN) {
    83                 printf("Unknown screen device.\n");
     84                log(LF_ARCH, LVL_ERROR, "Unknown screen device.");
    8485                return;
    8586        }
     
    117118        case SCR_ATYFB:
    118119                if (prop->size / sizeof(ofw_pci_reg_t) < 2) {
    119                         printf("Too few screen registers.\n");
     120                        log(LF_ARCH, LVL_ERROR, "Too few screen registers.");
    120121                        return;
    121122                }
     
    124125               
    125126                if (!ofw_pci_reg_absolutize(node, pci_reg, &pci_abs_reg)) {
    126                         printf("Failed to absolutize fb register.\n");
     127                        log(LF_ARCH, LVL_ERROR,
     128                            "Failed to absolutize fb register.");
    127129                        return;
    128130                }
     
    130132                if (!ofw_pci_apply_ranges(node->parent, &pci_abs_reg,
    131133                    &fb_addr)) {
    132                         printf("Failed to determine screen address.\n");
     134                        log(LF_ARCH, LVL_ERROR,
     135                            "Failed to determine screen address.");
    133136                        return;
    134137                }
     
    152155                        break;
    153156                default:
    154                         printf("Unsupported bits per pixel.\n");
     157                        log(LF_ARCH, LVL_ERROR,
     158                            "Unsupported bits per pixel.");
    155159                        return;
    156160                }
     
    159163        case SCR_XVR:
    160164                if (prop->size / sizeof(ofw_pci_reg_t) < 2) {
    161                         printf("Too few screen registers.\n");
     165                        log(LF_ARCH, LVL_ERROR,
     166                            "Too few screen registers.");
    162167                        return;
    163168                }
     
    166171               
    167172                if (!ofw_pci_reg_absolutize(node, pci_reg, &pci_abs_reg)) {
    168                         printf("Failed to absolutize fb register.\n");
     173                        log(LF_ARCH, LVL_ERROR,
     174                            "Failed to absolutize fb register.");
    169175                        return;
    170176                }
     
    172178                if (!ofw_pci_apply_ranges(node->parent, &pci_abs_reg,
    173179                    &fb_addr)) {
    174                         printf("Failed to determine screen address.\n");
     180                        log(LF_ARCH, LVL_ERROR,
     181                            "Failed to determine screen address.");
    175182                        return;
    176183                }
     
    196203                        break;
    197204                default:
    198                         printf("Unsupported bits per pixel.\n");
     205                        log(LF_ARCH, LVL_ERROR,
     206                            "Unsupported bits per pixel.");
    199207                        return;
    200208                }
     
    207215                upa_reg = &((ofw_upa_reg_t *) prop->value)[FFB_REG_24BPP];
    208216                if (!ofw_upa_apply_ranges(node->parent, upa_reg, &fb_addr)) {
    209                         printf("Failed to determine screen address.\n");
     217                        log(LF_ARCH, LVL_ERROR,
     218                            "Failed to determine screen address.");
    210219                        return;
    211220                }
     
    219228                        break;
    220229                default:
    221                         printf("Not implemented.\n");
     230                        log(LF_ARCH, LVL_WARN, "Not implemented.");
    222231                        return;
    223232                }
     
    225234                sbus_reg = &((ofw_sbus_reg_t *) prop->value)[0];
    226235                if (!ofw_sbus_apply_ranges(node->parent, sbus_reg, &fb_addr)) {
    227                         printf("Failed to determine screen address.\n");
     236                        log(LF_ARCH, LVL_ERROR,
     237                            "Failed to determine screen address.");
    228238                        return;
    229239                }
     
    233243        case SCR_QEMU_VGA:
    234244                if (prop->size / sizeof(ofw_pci_reg_t) < 2) {
    235                         printf("Too few screen registers.\n");
     245                        log(LF_ARCH, LVL_ERROR, "Too few screen registers.");
    236246                        return;
    237247                }
     
    240250
    241251                if (!ofw_pci_reg_absolutize(node, pci_reg, &pci_abs_reg)) {
    242                         printf("Failed to absolutize fb register.\n");
     252                        log(LF_ARCH, LVL_ERROR,
     253                            "Failed to absolutize fb register.");
    243254                        return;
    244255                }
     
    246257                if (!ofw_pci_apply_ranges(node->parent, &pci_abs_reg,
    247258                    &fb_addr)) {
    248                         printf("Failed to determine screen address.\n");
     259                        log(LF_ARCH, LVL_ERROR,
     260                            "Failed to determine screen address.");
    249261                        return;
    250262                }
     
    268280                        break;
    269281                default:
    270                         printf("Unsupported bits per pixel.\n");
     282                        log(LF_ARCH, LVL_ERROR, "Unsupported bits per pixel.");
    271283                        return;
    272284                }
Note: See TracChangeset for help on using the changeset viewer.