summaryrefslogtreecommitdiffstats
path: root/drivers/video/atmel_lcdfb.h
diff options
context:
space:
mode:
authorJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>2013-01-31 12:54:55 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2013-01-31 19:05:50 +0100
commit0f9770a6fe6f4a258dd9c25ca4efd6713e9c5a66 (patch)
tree89421d8b0ceace94ab1c5cbaeaf2be1cb17d6396 /drivers/video/atmel_lcdfb.h
parenta719d7c44531571a9470b90d9add2099fd0cd707 (diff)
downloadbarebox-0f9770a6fe6f4a258dd9c25ca4efd6713e9c5a66.tar.gz
barebox-0f9770a6fe6f4a258dd9c25ca4efd6713e9c5a66.tar.xz
atmel_lcdfb: factorise common code between lcdc and new hlcdc IP
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers/video/atmel_lcdfb.h')
-rw-r--r--drivers/video/atmel_lcdfb.h37
1 files changed, 37 insertions, 0 deletions
diff --git a/drivers/video/atmel_lcdfb.h b/drivers/video/atmel_lcdfb.h
new file mode 100644
index 0000000000..6c53dd46d2
--- /dev/null
+++ b/drivers/video/atmel_lcdfb.h
@@ -0,0 +1,37 @@
+
+#include <fb.h>
+#include <video/atmel_lcdc.h>
+
+struct atmel_lcdfb_info;
+
+struct atmel_lcdfb_devdata {
+ void (*start)(struct atmel_lcdfb_info *sinfo);
+ void (*stop)(struct atmel_lcdfb_info *sinfo, u32 flags);
+ void (*update_dma)(struct fb_info *info);
+ void (*setup_core)(struct fb_info *info);
+ void (*init_contrast)(struct atmel_lcdfb_info *sinfo);
+ void (*limit_screeninfo)(struct fb_videomode *mode);
+ int fbinfo_flags;
+ int dma_desc_size;
+};
+
+struct atmel_lcdfb_info {
+ struct fb_info info;
+ void __iomem *mmio;
+ struct device_d *device;
+
+ unsigned int guard_time;
+ unsigned int smem_len;
+ struct clk *bus_clk;
+ struct clk *lcdc_clk;
+
+ struct atmel_lcdfb_platform_data *pdata;
+ struct atmel_lcdfb_devdata *dev_data;
+};
+
+#define lcdc_readl(sinfo, reg) __raw_readl((sinfo)->mmio+(reg))
+#define lcdc_writel(sinfo, reg, val) __raw_writel((val), (sinfo)->mmio+(reg))
+
+#define ATMEL_LCDC_STOP_NOWAIT (1 << 0)
+
+int atmel_lcdc_register(struct device_d *dev, struct atmel_lcdfb_devdata *data);