/* Small utility to check that you got the colours right  */
int drv_lcd_init(void)
/* Small utility to check that you got the colours right  */
int drv_lcd_init(void)
{
	struct stdio_dev 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);
	memset (&lcddev, 0, sizeof (lcddev));
	strcpy (lcddev.name, "lcd");
	lcddev.ext   = 0;
	lcddev.flags = DEV_FLAGS_OUTPUT;
	lcddev.putc  = lcd_putc;
	lcddev.puts  = lcd_puts;
	rc = stdio_register (&lcddev);
	return (rc == 0) ? 1 : rc;
}