summaryrefslogtreecommitdiffstats
path: root/include/video
diff options
context:
space:
mode:
authorKristoffer Ericson <kristoffer.ericson@gmail.com>2009-03-31 15:25:31 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2009-04-01 08:59:32 -0700
commitafbb9d8d5266b4121cb503b4e097f8e65286a077 (patch)
tree51463d6338f1e541c3bfc004c05a7fb76c4ebbe1 /include/video
parent91ad1203535da95bb13072bdb59e1dc3ca76ec5d (diff)
downloadop-kernel-dev-afbb9d8d5266b4121cb503b4e097f8e65286a077.zip
op-kernel-dev-afbb9d8d5266b4121cb503b4e097f8e65286a077.tar.gz
fbdev: update s1d13xxxfb to differ between revisions and production ids
The s1d13xxx chip provides two values of identification value: the Production id (e.g 13506/13505/13806..) and a revision number 0,1,2,3). Together these can help us to differentiate between similiar setups. This patch adds the proper way of grabbing both those values and save them for future reference (in order to decide what functions a card supports, e.g acceleration). We also move away from the concept of all s1d13xxx = s1d13806 when we really support alot more. [akpm@linux-foundation.org: coding-style fixes] [akpm@linux-foundation.org: simplify s1d13xxxfb_probe()] Signed-off-by: Kristoffer Ericson <kristoffer.ericson@gmail.com Cc: Krzysztof Helt <krzysztof.h1@poczta.fm> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/video')
-rw-r--r--include/video/s1d13xxxfb.h16
1 files changed, 10 insertions, 6 deletions
diff --git a/include/video/s1d13xxxfb.h b/include/video/s1d13xxxfb.h
index fe41b84..c3b2a2a 100644
--- a/include/video/s1d13xxxfb.h
+++ b/include/video/s1d13xxxfb.h
@@ -14,13 +14,16 @@
#define S1D13XXXFB_H
#define S1D_PALETTE_SIZE 256
-#define S1D13506_CHIP_REV 4 /* expected chip revision number for s1d13506 */
-#define S1D13806_CHIP_REV 7 /* expected chip revision number for s1d13806 */
-#define S1D_FBID "S1D13806"
-#define S1D_DEVICENAME "s1d13806fb"
+#define S1D_FBID "S1D13xxx"
+#define S1D_DEVICENAME "s1d13xxxfb"
+
+/* S1DREG_REV_CODE register = prod_id (6 bits) + revision (2 bits) */
+#define S1D13505_PROD_ID 0x3 /* 000011 */
+#define S1D13506_PROD_ID 0x4 /* 000100 */
+#define S1D13806_PROD_ID 0x7 /* 000111 */
/* register definitions (tested on s1d13896) */
-#define S1DREG_REV_CODE 0x0000 /* Revision Code Register */
+#define S1DREG_REV_CODE 0x0000 /* Prod + Rev Code Register */
#define S1DREG_MISC 0x0001 /* Miscellaneous Register */
#define S1DREG_GPIO_CNF0 0x0004 /* General IO Pins Configuration Register 0 */
#define S1DREG_GPIO_CNF1 0x0005 /* General IO Pins Configuration Register 1 */
@@ -141,10 +144,11 @@ struct s1d13xxxfb_regval {
u8 value;
};
-
struct s1d13xxxfb_par {
void __iomem *regs;
unsigned char display;
+ unsigned char prod_id;
+ unsigned char revision;
unsigned int pseudo_palette[16];
#ifdef CONFIG_PM
OpenPOWER on IntegriCloud