-/* ** GENERIC Initialization Routines */
-/************************************************************************/
-
-int drv_lcd_init (void)
-{
- DECLARE_GLOBAL_DATA_PTR;
-
- device_t lcddev;
- int rc;
-
- lcd_base = (void *)(gd->fb_base);
-
- lcd_line_length = (panel_info.vl_col * NBITS (panel_info.vl_bpix)) / 8;
-
- lcd_init (lcd_base); /* LCD initialization */
-
- /* Device initialization */
- memset (&lcddev, 0, sizeof (lcddev));
-
- strcpy (lcddev.name, "lcd");
- lcddev.ext = 0; /* No extensions */
- lcddev.flags = DEV_FLAGS_OUTPUT; /* Output only */
- lcddev.putc = lcd_putc; /* 'putc' function */
- lcddev.puts = lcd_puts; /* 'puts' function */
-
- rc = device_register (&lcddev);
-
- return (rc == 0) ? 1 : rc;
-}
-
-/*----------------------------------------------------------------------*/
-
-static int lcd_init (void *lcdbase)
-{
- /* Initialize the lcd controller */
- debug ("[LCD] Initializing LCD frambuffer at %p\n", lcdbase);
-
- lcd_ctrl_init (lcdbase);
-
-#if LCD_BPP == LCD_MONOCHROME
- /* Setting the palette */
- lcd_initcolregs();
-
-#elif LCD_BPP == LCD_COLOR8
- /* Setting the palette */
- lcd_setcolreg (CONSOLE_COLOR_BLACK, 0, 0, 0);
- lcd_setcolreg (CONSOLE_COLOR_RED, 0xFF, 0, 0);
- lcd_setcolreg (CONSOLE_COLOR_GREEN, 0, 0xFF, 0);
- lcd_setcolreg (CONSOLE_COLOR_YELLOW, 0xFF, 0xFF, 0);
- lcd_setcolreg (CONSOLE_COLOR_BLUE, 0, 0, 0xFF);
- lcd_setcolreg (CONSOLE_COLOR_MAGENTA, 0xFF, 0, 0xFF);
- lcd_setcolreg (CONSOLE_COLOR_CYAN, 0, 0xFF, 0xFF);
- lcd_setcolreg (CONSOLE_COLOR_GREY, 0xAA, 0xAA, 0xAA);
- lcd_setcolreg (CONSOLE_COLOR_WHITE, 0xFF, 0xFF, 0xFF);
-#endif
-
-#ifndef CFG_WHITE_ON_BLACK
- lcd_setfgcolor (CONSOLE_COLOR_BLACK);
- lcd_setbgcolor (CONSOLE_COLOR_WHITE);
-#else
- lcd_setfgcolor (CONSOLE_COLOR_WHITE);
- lcd_setbgcolor (CONSOLE_COLOR_BLACK);
-#endif /* CFG_WHITE_ON_BLACK */
-
-#ifdef LCD_TEST_PATTERN
- test_pattern();
-#else
- /* set framebuffer to background color */
- memset ((char *)lcd_base,
- COLOR_MASK(lcd_getbgcolor()),
- lcd_line_length*panel_info.vl_row);
-#endif
-
- lcd_enable ();
-
- /* Paint the logo and retrieve LCD base address */
- debug ("[LCD] Drawing the logo...\n");
- lcd_console_address = lcd_logo ();
-
- /* Initialize the console */
- console_col = 0;
-#ifdef LCD_INFO_BELOW_LOGO
- console_row = 7 + BMP_LOGO_HEIGHT / VIDEO_FONT_HEIGHT;
-#else
- console_row = 1; /* leave 1 blank line below logo */
-#endif
- lcd_is_enabled = 1;
-
- return 0;
-}
-
-
-/************************************************************************/
-/* ** ROM capable initialization part - needed to reserve FB memory */