1.1 --- a/stage2/nanonote_gpm940b0.h Tue Jun 09 00:03:27 2015 +0200
1.2 +++ b/stage2/nanonote_gpm940b0.h Tue Jun 09 21:10:40 2015 +0200
1.3 @@ -1,7 +1,8 @@
1.4 /*
1.5 - * JzRISC lcd controller
1.6 + * Ben NanoNote panel-specific definitions
1.7 *
1.8 - * Xiangfu Liu <xiangfu@sharism.cc>
1.9 + * Copyright (C) Xiangfu Liu <xiangfu@sharism.cc>
1.10 + * Copyright (C) 2015 Paul Boddie <paul@boddie.org.uk>
1.11 *
1.12 * This program is free software; you can redistribute it and/or
1.13 * modify it under the terms of the GNU General Public License as
1.14 @@ -25,75 +26,6 @@
1.15 #include "nanonote.h"
1.16 #include "jz4740.h"
1.17
1.18 -unsigned long lcd_get_size(void);
1.19 -void lcd_ctrl_init(void *lcdbase);
1.20 -void lcd_enable(void);
1.21 -void lcd_disable(void);
1.22 -
1.23 -struct lcd_desc{
1.24 - unsigned int next_desc; /* LCDDAx */
1.25 - unsigned int databuf; /* LCDSAx */
1.26 - unsigned int frame_id; /* LCDFIDx */
1.27 - unsigned int cmd; /* LCDCMDx */
1.28 -};
1.29 -
1.30 -#define MODE_MASK 0x0f
1.31 -#define MODE_TFT_GEN 0x00
1.32 -#define MODE_TFT_SHARP 0x01
1.33 -#define MODE_TFT_CASIO 0x02
1.34 -#define MODE_TFT_SAMSUNG 0x03
1.35 -#define MODE_CCIR656_NONINT 0x04
1.36 -#define MODE_CCIR656_INT 0x05
1.37 -#define MODE_STN_COLOR_SINGLE 0x08
1.38 -#define MODE_STN_MONO_SINGLE 0x09
1.39 -#define MODE_STN_COLOR_DUAL 0x0a
1.40 -#define MODE_STN_MONO_DUAL 0x0b
1.41 -#define MODE_8BIT_SERIAL_TFT 0x0c
1.42 -
1.43 -#define MODE_TFT_18BIT (1<<7)
1.44 -
1.45 -#define STN_DAT_PIN1 (0x00 << 4)
1.46 -#define STN_DAT_PIN2 (0x01 << 4)
1.47 -#define STN_DAT_PIN4 (0x02 << 4)
1.48 -#define STN_DAT_PIN8 (0x03 << 4)
1.49 -#define STN_DAT_PINMASK STN_DAT_PIN8
1.50 -
1.51 -#define STFT_PSHI (1 << 15)
1.52 -#define STFT_CLSHI (1 << 14)
1.53 -#define STFT_SPLHI (1 << 13)
1.54 -#define STFT_REVHI (1 << 12)
1.55 -
1.56 -#define SYNC_MASTER (0 << 16)
1.57 -#define SYNC_SLAVE (1 << 16)
1.58 -
1.59 -#define DE_P (0 << 9)
1.60 -#define DE_N (1 << 9)
1.61 -
1.62 -#define PCLK_P (0 << 10)
1.63 -#define PCLK_N (1 << 10)
1.64 -
1.65 -#define HSYNC_P (0 << 11)
1.66 -#define HSYNC_N (1 << 11)
1.67 -
1.68 -#define VSYNC_P (0 << 8)
1.69 -#define VSYNC_N (1 << 8)
1.70 -
1.71 -#define DATA_NORMAL (0 << 17)
1.72 -#define DATA_INVERSE (1 << 17)
1.73 -
1.74 -
1.75 -/* Jz LCDFB supported I/O controls. */
1.76 -#define FBIOSETBACKLIGHT 0x4688
1.77 -#define FBIODISPON 0x4689
1.78 -#define FBIODISPOFF 0x468a
1.79 -#define FBIORESET 0x468b
1.80 -#define FBIOPRINT_REG 0x468c
1.81 -
1.82 -/*
1.83 - * LCD panel specific definition
1.84 - */
1.85 -#define MODE (0xc9) /* 8bit serial RGB */
1.86 -
1.87 #define __spi_write_reg1(reg, val) \
1.88 do { \
1.89 unsigned char no; \