1.1 --- a/include/jz4740.h Mon Jun 08 00:35:35 2015 +0200
1.2 +++ b/include/jz4740.h Mon Jun 08 00:56:31 2015 +0200
1.3 @@ -2740,8 +2740,8 @@
1.4 /* LCD_D0~LCD_D7, SLCD_RS, SLCD_CS */
1.5 #define __gpio_as_slcd_8bit() \
1.6 do { \
1.7 - REG_GPIO_PXFUNS(2) = 0x001800ff; \
1.8 - REG_GPIO_PXSELC(2) = 0x001800ff; \
1.9 + REG_GPIO_PXFUNS(2) = 0x001c00ff; \
1.10 + REG_GPIO_PXSELC(2) = 0x001c00ff; \
1.11 } while (0)
1.12
1.13 /* LCD_D0~LCD_D7, SLCD_RS, SLCD_CS */
2.1 --- a/stage2/lcd.c Mon Jun 08 00:35:35 2015 +0200
2.2 +++ b/stage2/lcd.c Mon Jun 08 00:56:31 2015 +0200
2.3 @@ -41,29 +41,17 @@
2.4 return addr;
2.5 }
2.6
2.7 -#define N_BLK_VERT 2
2.8 -#define N_BLK_HOR 3
2.9 -
2.10 -static int test_colors[N_BLK_HOR * N_BLK_VERT] = {
2.11 - 0x00ff0000, 0x0000ff00, 0x00ffff00,
2.12 - 0x000000ff, 0x00ff00ff, 0x0000ffff,
2.13 -};
2.14 -
2.15 static void test_pattern(void *lcd_base)
2.16 {
2.17 unsigned short v_max = panel_info.vl_row;
2.18 unsigned short h_max = panel_info.vl_col;
2.19 - unsigned short v_step = (v_max + N_BLK_VERT - 1) / N_BLK_VERT;
2.20 - unsigned short h_step = (h_max + N_BLK_HOR - 1) / N_BLK_HOR;
2.21 unsigned short v, h;
2.22 - unsigned char *pix = (unsigned char *)lcd_base;
2.23 + u32 *pix = (u32 *)lcd_base;
2.24
2.25 - /* WARNING: Code silently assumes 8bit/pixel */
2.26 - for (v = 0; v < v_max; ++v) {
2.27 - unsigned char iy = v / v_step;
2.28 - for (h = 0; h < h_max; ++h) {
2.29 - unsigned char ix = N_BLK_HOR * iy + h / h_step;
2.30 - *pix++ = test_colors[ix];
2.31 + /* WARNING: Code silently assumes 32 bit/pixel */
2.32 + for (v = 0; v < v_max; v += 1) {
2.33 + for (h = 0; h < h_max; h += 1) {
2.34 + *pix++ = 0x0000ff00;
2.35 }
2.36 }
2.37 }
3.1 --- a/stage2/nanonote_gpm940b0.c Mon Jun 08 00:35:35 2015 +0200
3.2 +++ b/stage2/nanonote_gpm940b0.c Mon Jun 08 00:56:31 2015 +0200
3.3 @@ -22,7 +22,8 @@
3.4
3.5 /* virt_to_phys() from u-boot/arch/mips/include/asm/addrspace.h
3.6 via u-boot/arch/mips/include/asm/io.h */
3.7 -#define virt_to_phys(n) (((int) n) & 0x1fffffff)
3.8 +/* #define virt_to_phys(n) (((int) n) & 0x1fffffff) */
3.9 +#define virt_to_phys(n) ((int) n)
3.10
3.11 #include "jz4740.h"
3.12 #include "nanonote_gpm940b0.h"