Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(162)

Side by Side Diff: common/lcd.c

Issue 5989010: Create Chrome OS recovery firmware procedure. (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/u-boot-next.git
Patch Set: add kernel verification and more Created 9 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Common LCD routines for supported CPUs 2 * Common LCD routines for supported CPUs
3 * 3 *
4 * Copyright (c) 2009, Code Aurora Forum. All rights reserved. 4 * Copyright (c) 2009, Code Aurora Forum. All rights reserved.
5 * 5 *
6 * (C) Copyright 2001-2002 6 * (C) Copyright 2001-2002
7 * Wolfgang Denk, DENX Software Engineering -- wd@denx.de 7 * Wolfgang Denk, DENX Software Engineering -- wd@denx.de
8 * 8 *
9 * See file CREDITS for list of people who contributed to this 9 * See file CREDITS for list of people who contributed to this
10 * project. 10 * project.
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 DECLARE_GLOBAL_DATA_PTR; 73 DECLARE_GLOBAL_DATA_PTR;
74 74
75 ulong lcd_setmem(ulong addr); 75 ulong lcd_setmem(ulong addr);
76 76
77 static void lcd_drawchars(ushort x, ushort y, uchar *str, int count); 77 static void lcd_drawchars(ushort x, ushort y, uchar *str, int count);
78 static inline void lcd_puts_xy(ushort x, ushort y, uchar *s); 78 static inline void lcd_puts_xy(ushort x, ushort y, uchar *s);
79 static inline void lcd_putc_xy(ushort x, ushort y, uchar c); 79 static inline void lcd_putc_xy(ushort x, ushort y, uchar c);
80 80
81 static int lcd_init(void *lcdbase); 81 static int lcd_init(void *lcdbase);
82 82
83 static int lcd_clear(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[]); 83 static int do_lcd_clear(cmd_tbl_t *cmdtp, int flag, int argc,
84 » » » char *const argv[]);
robotboy 2011/03/08 21:07:26 This should be a separate CL so that rebasing is e
Tom Wai-Hong Tam 2011/03/09 10:15:05 Done.
84 static void *lcd_logo(void); 85 static void *lcd_logo(void);
85 int lcd_display_bitmap_24(ulong bmp_image, int x, int y); 86 int lcd_display_bitmap_24(ulong bmp_image, int x, int y);
86 87
87 static int lcd_getbgcolor(void); 88 static int lcd_getbgcolor(void);
88 static void lcd_setfgcolor(int color); 89 static void lcd_setfgcolor(int color);
89 static void lcd_setbgcolor(int color); 90 static void lcd_setbgcolor(int color);
90 91
91 #ifdef CONFIG_QSD8X50_LCDC 92 #ifdef CONFIG_QSD8X50_LCDC
92 extern void lcdc_drawchar(ushort x, ushort y, uchar c); 93 extern void lcdc_drawchar(ushort x, ushort y, uchar c);
93 extern void lcd_disable(void); 94 extern void lcd_disable(void);
(...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after
392 lcddev.flags = DEV_FLAGS_OUTPUT; /* Output only */ 393 lcddev.flags = DEV_FLAGS_OUTPUT; /* Output only */
393 lcddev.putc = lcd_putc; /* 'putc' function */ 394 lcddev.putc = lcd_putc; /* 'putc' function */
394 lcddev.puts = lcd_puts; /* 'puts' function */ 395 lcddev.puts = lcd_puts; /* 'puts' function */
395 396
396 rc = stdio_register(&lcddev); 397 rc = stdio_register(&lcddev);
397 398
398 return (rc == 0) ? 1 : rc; 399 return (rc == 0) ? 1 : rc;
399 } 400 }
400 401
401 /*----------------------------------------------------------------------*/ 402 /*----------------------------------------------------------------------*/
402 static int lcd_clear(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[]) 403 int lcd_clear()
Che-Liang Chiou 2011/03/09 02:37:53 Maybe you should put a declaration of lcd_clear()
Tom Wai-Hong Tam 2011/03/09 10:15:05 Done.
403 { 404 {
404 #if LCD_BPP == LCD_MONOCHROME 405 #if LCD_BPP == LCD_MONOCHROME
405 /* Setting the palette */ 406 /* Setting the palette */
406 lcd_initcolregs(); 407 lcd_initcolregs();
407 408
408 #elif (LCD_BPP == LCD_COLOR8) || (LCD_BPP == LCD_COLOR24) 409 #elif (LCD_BPP == LCD_COLOR8) || (LCD_BPP == LCD_COLOR24)
409 /* Setting the palette */ 410 /* Setting the palette */
410 lcd_setcolreg(CONSOLE_COLOR_BLACK, 0, 0, 0); 411 lcd_setcolreg(CONSOLE_COLOR_BLACK, 0, 0, 0);
411 lcd_setcolreg(CONSOLE_COLOR_RED, 0xFF, 0, 0); 412 lcd_setcolreg(CONSOLE_COLOR_RED, 0xFF, 0, 0);
412 lcd_setcolreg(CONSOLE_COLOR_GREEN, 0, 0xFF, 0); 413 lcd_setcolreg(CONSOLE_COLOR_GREEN, 0, 0xFF, 0);
(...skipping 24 matching lines...) Expand all
437 /* Paint the logo and retrieve LCD base address */ 438 /* Paint the logo and retrieve LCD base address */
438 debug("[LCD] Drawing the logo...\n"); 439 debug("[LCD] Drawing the logo...\n");
439 lcd_console_address = lcd_logo(); 440 lcd_console_address = lcd_logo();
440 441
441 console_col = 0; 442 console_col = 0;
442 console_row = 0; 443 console_row = 0;
443 444
444 return 0; 445 return 0;
445 } 446 }
446 447
448 static int do_lcd_clear(cmd_tbl_t *cmdtp, int flag, int argc,
449 char *const argv[])
450 {
451 return lcd_clear();
452 }
453
447 U_BOOT_CMD( 454 U_BOOT_CMD(
448 » cls,» 1,» 1,» lcd_clear, 455 » cls,» 1,» 1,» do_lcd_clear,
449 "clear screen", 456 "clear screen",
450 "" 457 ""
451 ); 458 );
452 459
453 /*----------------------------------------------------------------------*/ 460 /*----------------------------------------------------------------------*/
454 461
455 static int lcd_init(void *lcdbase) 462 static int lcd_init(void *lcdbase)
456 { 463 {
457 /* Initialize the lcd controller */ 464 /* Initialize the lcd controller */
458 debug("[LCD] Initializing LCD frambuffer at %p\n", lcdbase); 465 debug("[LCD] Initializing LCD frambuffer at %p\n", lcdbase);
459 466
460 lcd_ctrl_init(lcdbase); 467 lcd_ctrl_init(lcdbase);
461 lcd_is_enabled = 1; 468 lcd_is_enabled = 1;
462 » lcd_clear(NULL, 1, 1, NULL);» /* dummy args */ 469 » lcd_clear();» /* dummy args */
463 #ifdef CONFIG_QSD8X50_LCDC 470 #ifdef CONFIG_QSD8X50_LCDC
464 lcd_enable(); 471 lcd_enable();
465 #endif 472 #endif
466 /* Initialize the console */ 473 /* Initialize the console */
467 console_col = 0; 474 console_col = 0;
468 #ifdef CONFIG_LCD_INFO_BELOW_LOGO 475 #ifdef CONFIG_LCD_INFO_BELOW_LOGO
469 console_row = 7 + BMP_LOGO_HEIGHT / VIDEO_FONT_HEIGHT; 476 console_row = 7 + BMP_LOGO_HEIGHT / VIDEO_FONT_HEIGHT;
470 #else 477 #else
471 console_row = 1; /* leave 1 blank line below logo */ 478 console_row = 1; /* leave 1 blank line below logo */
472 #endif 479 #endif
(...skipping 640 matching lines...) Expand 10 before | Expand all | Expand 10 after
1113 1120
1114 #if defined(CONFIG_LCD_LOGO) && !defined(CONFIG_LCD_INFO_BELOW_LOGO) 1121 #if defined(CONFIG_LCD_LOGO) && !defined(CONFIG_LCD_INFO_BELOW_LOGO)
1115 return (void *)((ulong)lcd_base + BMP_LOGO_HEIGHT * lcd_line_length); 1122 return (void *)((ulong)lcd_base + BMP_LOGO_HEIGHT * lcd_line_length);
1116 #else 1123 #else
1117 return (void *)lcd_base; 1124 return (void *)lcd_base;
1118 #endif /* CONFIG_LCD_LOGO && !CONFIG_LCD_INFO_BELOW_LOGO */ 1125 #endif /* CONFIG_LCD_LOGO && !CONFIG_LCD_INFO_BELOW_LOGO */
1119 } 1126 }
1120 1127
1121 /************************************************************************/ 1128 /************************************************************************/
1122 /************************************************************************/ 1129 /************************************************************************/
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698