Changes in kernel/arch/sparc64/src/drivers/scr.c [9d58539:9a5abb78] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/sparc64/src/drivers/scr.c
r9d58539 r9a5abb78 46 46 #include <align.h> 47 47 #include <print.h> 48 #include <log.h> 48 49 49 50 #define FFB_REG_24BPP 7 … … 81 82 82 83 if (scr_type == SCR_UNKNOWN) { 83 printf("Unknown screen device.\n");84 log(LF_ARCH, LVL_ERROR, "Unknown screen device."); 84 85 return; 85 86 } … … 117 118 case SCR_ATYFB: 118 119 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."); 120 121 return; 121 122 } … … 124 125 125 126 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."); 127 129 return; 128 130 } … … 130 132 if (!ofw_pci_apply_ranges(node->parent, &pci_abs_reg, 131 133 &fb_addr)) { 132 printf("Failed to determine screen address.\n"); 134 log(LF_ARCH, LVL_ERROR, 135 "Failed to determine screen address."); 133 136 return; 134 137 } … … 152 155 break; 153 156 default: 154 printf("Unsupported bits per pixel.\n"); 157 log(LF_ARCH, LVL_ERROR, 158 "Unsupported bits per pixel."); 155 159 return; 156 160 } … … 159 163 case SCR_XVR: 160 164 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."); 162 167 return; 163 168 } … … 166 171 167 172 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."); 169 175 return; 170 176 } … … 172 178 if (!ofw_pci_apply_ranges(node->parent, &pci_abs_reg, 173 179 &fb_addr)) { 174 printf("Failed to determine screen address.\n"); 180 log(LF_ARCH, LVL_ERROR, 181 "Failed to determine screen address."); 175 182 return; 176 183 } … … 196 203 break; 197 204 default: 198 printf("Unsupported bits per pixel.\n"); 205 log(LF_ARCH, LVL_ERROR, 206 "Unsupported bits per pixel."); 199 207 return; 200 208 } … … 207 215 upa_reg = &((ofw_upa_reg_t *) prop->value)[FFB_REG_24BPP]; 208 216 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."); 210 219 return; 211 220 } … … 219 228 break; 220 229 default: 221 printf("Not implemented.\n");230 log(LF_ARCH, LVL_WARN, "Not implemented."); 222 231 return; 223 232 } … … 225 234 sbus_reg = &((ofw_sbus_reg_t *) prop->value)[0]; 226 235 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."); 228 238 return; 229 239 } … … 233 243 case SCR_QEMU_VGA: 234 244 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."); 236 246 return; 237 247 } … … 240 250 241 251 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."); 243 254 return; 244 255 } … … 246 257 if (!ofw_pci_apply_ranges(node->parent, &pci_abs_reg, 247 258 &fb_addr)) { 248 printf("Failed to determine screen address.\n"); 259 log(LF_ARCH, LVL_ERROR, 260 "Failed to determine screen address."); 249 261 return; 250 262 } … … 268 280 break; 269 281 default: 270 printf("Unsupported bits per pixel.\n");282 log(LF_ARCH, LVL_ERROR, "Unsupported bits per pixel."); 271 283 return; 272 284 }
Note:
See TracChangeset
for help on using the changeset viewer.