Tony SIM | 1d7a894 | 2010-01-28 17:04:55 +0900 | [diff] [blame] | 1 | /**************************************************************************** |
| 2 | **************************************************************************** |
| 3 | *** |
| 4 | *** This header was automatically generated from a Linux kernel header |
| 5 | *** of the same name, to make information necessary for userspace to |
| 6 | *** call into the kernel available to libc. It contains only constants, |
| 7 | *** structures, and macros generated from the original header, and thus, |
| 8 | *** contains no copyrightable information. |
| 9 | *** |
| 10 | **************************************************************************** |
| 11 | ****************************************************************************/ |
| 12 | #ifndef _ASM_SH_SH7760FB_H |
| 13 | #define _ASM_SH_SH7760FB_H |
| 14 | |
| 15 | #define SH7760FB_PALETTE_MASK 0x00f8fcf8 |
| 16 | |
| 17 | #define SH7760FB_DMA_MASK 0x0C000000 |
| 18 | |
| 19 | #define LDPR(x) (((x) << 2)) |
| 20 | |
| 21 | #define LDICKR 0x400 |
| 22 | #define LDMTR 0x402 |
| 23 | |
| 24 | #define LDDFR 0x404 |
| 25 | #define LDDFR_PABD (1 << 8) |
| 26 | #define LDDFR_COLOR_MASK 0x7F |
| 27 | #define LDSMR 0x406 |
| 28 | #define LDSMR_ROT (1 << 13) |
| 29 | #define LDSARU 0x408 |
| 30 | #define LDSARL 0x40c |
| 31 | #define LDLAOR 0x410 |
| 32 | #define LDPALCR 0x412 |
| 33 | #define LDPALCR_PALS (1 << 4) |
| 34 | #define LDPALCR_PALEN (1 << 0) |
| 35 | #define LDHCNR 0x414 |
| 36 | #define LDHSYNR 0x416 |
| 37 | #define LDVDLNR 0x418 |
| 38 | #define LDVTLNR 0x41a |
| 39 | #define LDVSYNR 0x41c |
| 40 | #define LDACLNR 0x41e |
| 41 | #define LDINTR 0x420 |
| 42 | #define LDPMMR 0x424 |
| 43 | #define LDPSPR 0x426 |
| 44 | #define LDCNTR 0x428 |
| 45 | #define LDCNTR_DON (1 << 0) |
| 46 | #define LDCNTR_DON2 (1 << 4) |
| 47 | |
| 48 | #define LDINTR_VINTSEL (1 << 12) |
| 49 | #define LDINTR_VINTE (1 << 8) |
| 50 | #define LDINTR_VINTS (1 << 0) |
| 51 | #define VINT_START (LDINTR_VINTSEL) |
| 52 | #define VINT_CHECK (LDINTR_VINTS) |
| 53 | |
| 54 | #define LDMTR_FLMPOL (1 << 15) |
| 55 | |
| 56 | #define LDMTR_CL1POL (1 << 14) |
| 57 | |
| 58 | #define LDMTR_DISPEN_LOWACT (1 << 13) |
| 59 | |
| 60 | #define LDMTR_DPOL_LOWACT (1 << 12) |
| 61 | |
| 62 | #define LDMTR_MCNT (1 << 10) |
| 63 | |
| 64 | #define LDMTR_CL1CNT (1 << 9) |
| 65 | |
| 66 | #define LDMTR_CL2CNT (1 << 8) |
| 67 | |
| 68 | #define LDMTR_STN_MONO_4 0x00 |
| 69 | #define LDMTR_STN_MONO_8 0x01 |
| 70 | #define LDMTR_STN_COLOR_4 0x08 |
| 71 | #define LDMTR_STN_COLOR_8 0x09 |
| 72 | #define LDMTR_STN_COLOR_12 0x0A |
| 73 | #define LDMTR_STN_COLOR_16 0x0B |
| 74 | #define LDMTR_DSTN_MONO_8 0x11 |
| 75 | #define LDMTR_DSTN_MONO_16 0x13 |
| 76 | #define LDMTR_DSTN_COLOR_8 0x19 |
| 77 | #define LDMTR_DSTN_COLOR_12 0x1A |
| 78 | #define LDMTR_DSTN_COLOR_16 0x1B |
| 79 | #define LDMTR_TFT_COLOR_16 0x2B |
| 80 | |
| 81 | #define LDDFR_1BPP_MONO 0x00 |
| 82 | #define LDDFR_2BPP_MONO 0x01 |
| 83 | #define LDDFR_4BPP_MONO 0x02 |
| 84 | #define LDDFR_6BPP_MONO 0x04 |
| 85 | #define LDDFR_4BPP 0x0A |
| 86 | #define LDDFR_8BPP 0x0C |
| 87 | #define LDDFR_16BPP_RGB555 0x1D |
| 88 | #define LDDFR_16BPP_RGB565 0x2D |
| 89 | |
| 90 | #define LCDC_CLKSRC_BUSCLOCK 0 |
| 91 | #define LCDC_CLKSRC_PERIPHERAL 1 |
| 92 | #define LCDC_CLKSRC_EXTERNAL 2 |
| 93 | |
| 94 | #define LDICKR_CLKSRC(x) (((x) & 3) << 12) |
| 95 | |
| 96 | #define LDICKR_CLKDIV(x) ((x) & 0x1f) |
| 97 | |
| 98 | struct sh7760fb_platdata { |
| 99 | |
| 100 | struct fb_videomode *def_mode; |
| 101 | |
| 102 | u16 ldmtr; |
| 103 | |
| 104 | u16 lddfr; |
| 105 | |
| 106 | u16 ldpmmr; |
| 107 | u16 ldpspr; |
| 108 | |
| 109 | u16 ldaclnr; |
| 110 | |
| 111 | u16 ldickr; |
| 112 | |
| 113 | int rotate; |
| 114 | |
| 115 | int novsync; |
| 116 | |
| 117 | void (*blank) (int); |
| 118 | }; |
| 119 | |
| 120 | #endif |