r2081 - trunk/src/target/u-boot/patches
laforge at sita.openmoko.org
laforge at sita.openmoko.org
Fri May 25 01:13:10 CEST 2007
Author: laforge
Date: 2007-05-25 01:13:09 +0200 (Fri, 25 May 2007)
New Revision: 2081
Removed:
trunk/src/target/u-boot/patches/set-hwswp.patch
Modified:
trunk/src/target/u-boot/patches/series
trunk/src/target/u-boot/patches/uboot-20061030-neo1973.patch
trunk/src/target/u-boot/patches/uboot-20061030-qt2410.patch
trunk/src/target/u-boot/patches/uboot-s3c2410_fb.patch
Log:
* merge set-hwswp.patch into uboot-s3c2410_fb.patch
* move LCD controller register initialization into per-board function
* implement this function for neo1973 and qt2410
Modified: trunk/src/target/u-boot/patches/series
===================================================================
--- trunk/src/target/u-boot/patches/series 2007-05-24 19:28:30 UTC (rev 2080)
+++ trunk/src/target/u-boot/patches/series 2007-05-24 23:13:09 UTC (rev 2081)
@@ -42,7 +42,6 @@
# splash screen
raise-limits.patch
-set-hwswp.patch
splashimage-command.patch
cmd-unzip.patch
enable-splash-bmp.patch
Deleted: trunk/src/target/u-boot/patches/set-hwswp.patch
===================================================================
--- trunk/src/target/u-boot/patches/set-hwswp.patch 2007-05-24 19:28:30 UTC (rev 2080)
+++ trunk/src/target/u-boot/patches/set-hwswp.patch 2007-05-24 23:13:09 UTC (rev 2081)
@@ -1,57 +0,0 @@
-drivers/cfb_console.c: set SHORTSWAP to swap nibbles
- [ clean this up when and if HWSWP is confirmed ]
-drivers/s3c2410_fb.c (video_hw_init): set HWSWP in LCDCON5
-drivers/s3c2410_fb.c (video_hw_init): use memset instead of open-coded
- equivalent
-
-- Werner Almesberger <werner at openmoko.org>
-
-Index: u-boot/drivers/cfb_console.c
-===================================================================
---- u-boot.orig/drivers/cfb_console.c
-+++ u-boot/drivers/cfb_console.c
-@@ -315,6 +315,11 @@ void console_cursor (int state);
- #define SHORTSWAP32(x) (x)
- #endif
-
-+#ifdef CONFIG_VIDEO_S3C2410
-+#undef SHORTSWAP32
-+#define SHORTSWAP32(x) ((((x) & 0xffff) << 16) | (((x) >> 16) & 0xffff))
-+#endif
-+
- #if defined(DEBUG) || defined(DEBUG_CFB_CONSOLE)
- #define PRINTD(x) printf(x)
- #else
-Index: u-boot/drivers/s3c2410_fb.c
-===================================================================
---- u-boot.orig/drivers/s3c2410_fb.c
-+++ u-boot/drivers/s3c2410_fb.c
-@@ -47,7 +47,6 @@ void *video_hw_init (void)
- struct ctfb_res_modes *res_mode;
- struct ctfb_res_modes var_mode;
- unsigned char videoout;
-- unsigned int *vm;
-
- /* Search for video chip */
- printf("Video: ");
-@@ -148,7 +147,7 @@ void *video_hw_init (void)
- lcd->LCDCON2 = 0x019fc3c1;
- lcd->LCDCON3 = 0x0039df67;
- lcd->LCDCON4 = 0x00000007;
-- lcd->LCDCON5 = 0x0001cf08;
-+ lcd->LCDCON5 = 0x0001cf09;
- lcd->LPCSEL = 0x00000000;
-
- lcd->LCDSADDR1 = LCD_VIDEO_ADDR >> 1;
-@@ -164,10 +163,7 @@ void *video_hw_init (void)
- }
-
- /* Clear video memory */
-- i = pGD->memSize/4;
-- vm = (unsigned int *)pGD->frameAdrs;
-- while(i--)
-- *vm++ = 0;
-+ memset(pGD->frameAdrs, 0, pGD->memSize);
-
- /* Enable Display */
- lcd->LCDCON1 |= 0x01; /* ENVID = 1 */
Modified: trunk/src/target/u-boot/patches/uboot-20061030-neo1973.patch
===================================================================
--- trunk/src/target/u-boot/patches/uboot-20061030-neo1973.patch 2007-05-24 19:28:30 UTC (rev 2080)
+++ trunk/src/target/u-boot/patches/uboot-20061030-neo1973.patch 2007-05-24 23:13:09 UTC (rev 2081)
@@ -559,7 +559,7 @@
===================================================================
--- /dev/null
+++ u-boot/board/neo1973/common/jbt6k74.c
-@@ -0,0 +1,406 @@
+@@ -0,0 +1,420 @@
+/* u-boot driver for the tpo JBT6K74-AS LCM ASIC
+ *
+ * Copyright (C) 2006-2007 by OpenMoko, Inc.
@@ -584,6 +584,7 @@
+ */
+#include <common.h>
+#include <spi.h>
++#include <video_fb.h>
+#include <asm/errno.h>
+#include <s3c2410.h>
+#include "jbt6k74.h"
@@ -966,6 +967,19 @@
+
+ return 0;
+}
++
++void board_video_init(GraphicDevice *pGD)
++{
++ S3C24X0_LCD * const lcd = S3C24X0_GetBase_LCD();
++
++ lcd->LCDCON1 = 0x00000178; /* CLKVAL=1, BPPMODE=16bpp, TFT, ENVID=0 */
++
++ lcd->LCDCON2 = 0x019fc3c1;
++ lcd->LCDCON3 = 0x0039df67;
++ lcd->LCDCON4 = 0x00000007;
++ lcd->LCDCON5 = 0x0001cf09;
++ lcd->LPCSEL = 0x00000000;
++}
Index: u-boot/board/neo1973/common/jbt6k74.h
===================================================================
--- /dev/null
Modified: trunk/src/target/u-boot/patches/uboot-20061030-qt2410.patch
===================================================================
--- trunk/src/target/u-boot/patches/uboot-20061030-qt2410.patch 2007-05-24 19:28:30 UTC (rev 2080)
+++ trunk/src/target/u-boot/patches/uboot-20061030-qt2410.patch 2007-05-24 23:13:09 UTC (rev 2081)
@@ -7,7 +7,7 @@
===================================================================
--- u-boot.orig/Makefile
+++ u-boot/Makefile
-@@ -1976,6 +1976,9 @@
+@@ -2009,6 +2009,9 @@
sbc2410x_config: unconfig
@$(MKCONFIG) $(@:_config=) arm arm920t sbc2410x NULL s3c24x0
@@ -721,7 +721,7 @@
===================================================================
--- /dev/null
+++ u-boot/board/qt2410/qt2410.c
-@@ -0,0 +1,128 @@
+@@ -0,0 +1,145 @@
+/*
+ * (C) 2006 by OpenMoko, Inc.
+ * Author: Harald Welte <laforge at openmoko.org>
@@ -755,6 +755,7 @@
+ */
+
+#include <common.h>
++#include <video_fb.h>
+#include <s3c2410.h>
+
+DECLARE_GLOBAL_DATA_PTR;
@@ -843,6 +844,22 @@
+ return 0;
+}
+
++void board_video_init(GraphicDevice *pGD)
++{
++ S3C24X0_LCD * const lcd = S3C24X0_GetBase_LCD();
++
++ /* FIXME: select LCM type by env variable */
++
++ /* Configuration for GTA01 LCM on QT2410 */
++ lcd->LCDCON1 = 0x00000178; /* CLKVAL=1, BPPMODE=16bpp, TFT, ENVID=0 */
++
++ lcd->LCDCON2 = 0x019fc3c1;
++ lcd->LCDCON3 = 0x0039df67;
++ lcd->LCDCON4 = 0x00000007;
++ lcd->LCDCON5 = 0x0001cf09;
++ lcd->LPCSEL = 0x00000000;
++}
++
+int dram_init (void)
+{
+ gd->bd->bi_dram[0].start = PHYS_SDRAM_1;
Modified: trunk/src/target/u-boot/patches/uboot-s3c2410_fb.patch
===================================================================
--- trunk/src/target/u-boot/patches/uboot-s3c2410_fb.patch 2007-05-24 19:28:30 UTC (rev 2080)
+++ trunk/src/target/u-boot/patches/uboot-s3c2410_fb.patch 2007-05-24 23:13:09 UTC (rev 2081)
@@ -15,7 +15,7 @@
===================================================================
--- /dev/null
+++ u-boot/drivers/s3c2410_fb.c
-@@ -0,0 +1,187 @@
+@@ -0,0 +1,166 @@
+/*
+ * (C) Copyright 2006 by OpenMoko, Inc.
+ * Author: Harald Welte <laforge at openmoko.org>
@@ -50,6 +50,8 @@
+
+#define VIDEO_MEM_SIZE 0x200000 /* 480x640x16bit = 614400 bytes */
+
++extern void board_video_init(GraphicDevice *pGD);
++
+/*******************************************************************************
+ *
+ * Init video chip with common Linux graphic modes (lilo)
@@ -65,7 +67,6 @@
+ struct ctfb_res_modes *res_mode;
+ struct ctfb_res_modes var_mode;
+ unsigned char videoout;
-+ unsigned int *vm;
+
+ /* Search for video chip */
+ printf("Video: ");
@@ -151,41 +152,19 @@
+ pGD->gdfBytesPP = 2;
+ pGD->gdfIndex = GDF_16BIT_565RGB;
+
-+#if 0
-+ pGD->isaBase = CFG_ISA_IO;
-+ pGD->pciBase = pci_mem_base;
-+ pGD->dprBase = (pci_mem_base + 0x400000 + 0x8000);
-+ pGD->vprBase = (pci_mem_base + 0x400000 + 0xc000);
-+ pGD->cprBase = (pci_mem_base + 0x400000 + 0xe000);
-+#endif
+ pGD->frameAdrs = LCD_VIDEO_ADDR;
+ pGD->memSize = VIDEO_MEM_SIZE;
+
-+ lcd->LCDCON1 = 0x00000178; /* CLKVAL=1, BPPMODE=16bpp, TFT, ENVID=0 */
++ board_video_init(pGD);
+
-+ lcd->LCDCON2 = 0x019fc3c1;
-+ lcd->LCDCON3 = 0x0039df67;
-+ lcd->LCDCON4 = 0x00000007;
-+ lcd->LCDCON5 = 0x0001cf08;
-+ lcd->LPCSEL = 0x00000000;
++ lcd->LCDSADDR1 = pGD->frameAdrs >> 1;
+
-+ lcd->LCDSADDR1 = LCD_VIDEO_ADDR >> 1;
-+
+ /* This marks the end of the frame buffer. */
+ lcd->LCDSADDR2 = (lcd->LCDSADDR1&0x1fffff) + (pGD->winSizeX+0) * pGD->winSizeY;
+ lcd->LCDSADDR3 = pGD->winSizeX;
+
-+ videoout = 2; /* Default output is CRT */
-+ if ((penv = getenv ("videoout")) != NULL) {
-+ /* deceide if it is a string */
-+ videoout = (int) simple_strtoul (penv, NULL, 16);
-+ }
-+
+ /* Clear video memory */
-+ i = pGD->memSize/4;
-+ vm = (unsigned int *)pGD->frameAdrs;
-+ while(i--)
-+ *vm++ = 0;
++ memset(pGD->frameAdrs, 0, pGD->memSize);
+
+ /* Enable Display */
+ lcd->LCDCON1 |= 0x01; /* ENVID = 1 */
@@ -222,3 +201,15 @@
/* Include video_fb.h after definitions of VIDEO_HW_RECTFILL etc */
/*****************************************************************************/
#include <video_fb.h>
+@@ -307,6 +315,11 @@
+ #define SHORTSWAP32(x) (x)
+ #endif
+
++#ifdef CONFIG_VIDEO_S3C2410
++#undef SHORTSWAP32
++#define SHORTSWAP32(x) ((((x) & 0xffff) << 16) | (((x) >> 16) & 0xffff))
++#endif
++
+ #if defined(DEBUG) || defined(DEBUG_CFB_CONSOLE)
+ #define PRINTD(x) printf(x)
+ #else
More information about the commitlog
mailing list