Ignore:
Timestamp:
02/13/07 02:21:56 (6 years ago)
Author:
laforge
Message:

console output is now completely working at full 480x640. However, byte
swapping problem of image display still persists. Check
https://people.openmoko.org/laforge/photos/uboot-s3c2410fb/uboot-s3c2410fb-hwswap-better.jpg

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/target/u-boot/patches/uboot-s3c2410_fb.patch

    r692 r976  
    1 Index: u-boot.git/drivers/Makefile 
     1Index: u-boot/drivers/Makefile 
    22=================================================================== 
    3 --- u-boot.git.orig/drivers/Makefile    2007-02-06 11:56:37.000000000 +0100 
    4 +++ u-boot.git/drivers/Makefile 2007-02-06 11:59:08.000000000 +0100 
     3--- u-boot.orig/drivers/Makefile        2007-02-12 20:56:01.000000000 +0100 
     4+++ u-boot/drivers/Makefile     2007-02-13 02:20:11.000000000 +0100 
    55@@ -51,7 +51,7 @@ 
    66          ks8695eth.o \ 
     
    1212 SRCS   := $(COBJS:.o=.c) 
    1313 OBJS   := $(addprefix $(obj),$(COBJS)) 
    14 Index: u-boot.git/drivers/s3c2410_fb.c 
     14Index: u-boot/drivers/s3c2410_fb.c 
    1515=================================================================== 
    1616--- /dev/null   1970-01-01 00:00:00.000000000 +0000 
    17 +++ u-boot.git/drivers/s3c2410_fb.c     2007-02-06 11:59:08.000000000 +0100 
    18 @@ -0,0 +1,183 @@ 
     17+++ u-boot/drivers/s3c2410_fb.c 2007-02-13 01:54:27.000000000 +0100 
     18@@ -0,0 +1,189 @@ 
    1919+/* 
    2020+ * (C) Copyright 2006 by OpenMoko, Inc. 
     
    4949+GraphicDevice smi; 
    5050+ 
    51 +#define VIDEO_MEM_SIZE 0x200000 
     51+#define VIDEO_MEM_SIZE 0x200000        /* 480x640x16bit = 614400 bytes */ 
    5252+ 
    5353+/******************************************************************************* 
     
    146146+       } 
    147147+ 
     148+       /* statically configure settings */ 
     149+       pGD->winSizeX = pGD->plnSizeX = 480; 
     150+       pGD->winSizeY = pGD->plnSizeY = 640; 
     151+       pGD->gdfBytesPP = 2; 
     152+       pGD->gdfIndex = GDF_16BIT_565RGB; 
     153+ 
    148154+#if 0 
    149155+       pGD->isaBase = CFG_ISA_IO; 
     
    156162+       pGD->memSize = VIDEO_MEM_SIZE; 
    157163+ 
     164+       lcd->LCDCON1 = 0x00000178; /* CLKVAL=1, BPPMODE=16bpp, TFT, ENVID=0 */ 
     165+ 
     166+       lcd->LCDCON2 = 0x019fc3c1; 
     167+       lcd->LCDCON3 = 0x0039df67; 
     168+       lcd->LCDCON4 = 0x00000007; 
     169+       lcd->LCDCON5 = 0x0001cb08; 
     170+       lcd->LPCSEL  = 0x00000000; 
     171+ 
    158172+       lcd->LCDSADDR1 = LCD_VIDEO_ADDR >> 1; 
    159 +       lcd->LCDSADDR2 = (LCD_VIDEO_ADDR + 0x4b000) >> 1; 
    160 +       lcd->LCDSADDR3 = 0x000000f0; 
    161 + 
    162 +       lcd->LCDCON1 = 0x00000479; 
    163 +       lcd->LCDCON2 = 0x014fc183; 
    164 +       lcd->LCDCON3 = 0x0060ef07; 
    165 +       lcd->LCDCON4 = 0x00000003; 
    166 +       lcd->LCDCON5 = 0x00000b09; 
    167 +       lcd->LPCSEL  = 0x00000cf0; 
    168 + 
    169 +       pGD->winSizeX = pGD->plnSizeX = 240; 
    170 +       pGD->winSizeY = pGD->plnSizeY = 320; 
    171 +       pGD->gdfBytesPP = 2; 
    172 +       pGD->gdfIndex = GDF_16BIT_565RGB; 
    173 + 
    174 +       /* Enable  Display  */ 
     173+ 
     174+       /* This marks the end of the frame buffer. */ 
     175+       lcd->LCDSADDR2 = (lcd->LCDSADDR1&0x1fffff) + (pGD->winSizeX+0) * pGD->winSizeY; 
     176+       lcd->LCDSADDR3 = pGD->winSizeX; 
     177+ 
    175178+       videoout = 2;       /* Default output is CRT */ 
    176179+       if ((penv = getenv ("videoout")) != NULL) { 
     
    185188+       while(i--) 
    186189+               *vm++ = 0; 
     190+ 
     191+       /* Enable  Display  */ 
     192+       lcd->LCDCON1 |= 0x01;   /* ENVID = 1 */ 
    187193+ 
    188194+       printf("returning from video_hw_init\n"); 
     
    200206+ 
    201207+#endif /* CONFIG_VIDEO_S3C2410 */ 
     208Index: u-boot/drivers/cfb_console.c 
     209=================================================================== 
     210--- u-boot.orig/drivers/cfb_console.c   2007-02-12 22:31:30.000000000 +0100 
     211+++ u-boot/drivers/cfb_console.c        2007-02-12 22:37:27.000000000 +0100 
     212@@ -141,6 +141,14 @@ 
     213 #endif 
     214  
     215 /*****************************************************************************/ 
     216+/* Defines for the S3C2410 driver                                           */ 
     217+/*****************************************************************************/ 
     218+#ifdef CONFIG_VIDEO_S3C2410 
     219+/* it actually is little-endian, but the host CPU, too ! */ 
     220+//#define VIDEO_FB_LITTLE_ENDIAN 
     221+#endif 
     222+ 
     223+/*****************************************************************************/ 
     224 /* Include video_fb.h after definitions of VIDEO_HW_RECTFILL etc            */ 
     225 /*****************************************************************************/ 
     226 #include <video_fb.h> 
Note: See TracChangeset for help on using the changeset viewer.