video, da8xx: move da8xx-fb.h to drivers/video
authorHeiko Schocher <hs@denx.de>
Sat, 3 Aug 2013 05:22:48 +0000 (07:22 +0200)
committerAnatolij Gustschin <agust@denx.de>
Sat, 10 Aug 2013 08:37:48 +0000 (10:37 +0200)
the da8xx-fb driver works also on am335x boards. So move
the da8xx-fb.h file from arch/arm/include/asm/arch-davinci
to drivers/video, so this driver can used from am335x
based boards. Also add WVGA panel_type.

Signed-off-by: Heiko Schocher <hs@denx.de>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Anatolij Gustschin <agust@denx.de>
Cc: Tom Rini <trini@ti.com>
Acked-by: Tom Rini <trini@ti.com>
arch/arm/include/asm/arch-davinci/da8xx-fb.h [deleted file]
board/davinci/ea20/ea20.c
drivers/video/da8xx-fb.c
drivers/video/da8xx-fb.h [new file with mode: 0644]

diff --git a/arch/arm/include/asm/arch-davinci/da8xx-fb.h b/arch/arm/include/asm/arch-davinci/da8xx-fb.h
deleted file mode 100644 (file)
index c115034..0000000
+++ /dev/null
@@ -1,113 +0,0 @@
-/*
- * Porting to u-boot:
- *
- * (C) Copyright 2011
- * Stefano Babic, DENX Software Engineering, sbabic@denx.de.
- *
- * Copyright (C) 2008-2009 MontaVista Software Inc.
- * Copyright (C) 2008-2009 Texas Instruments Inc
- *
- * Based on the LCD driver for TI Avalanche processors written by
- * Ajay Singh and Shalom Hai.
- *
- * SPDX-License-Identifier:    GPL-2.0+
- */
-
-#ifndef DA8XX_FB_H
-#define DA8XX_FB_H
-
-enum panel_type {
-       QVGA = 0
-};
-
-enum panel_shade {
-       MONOCHROME = 0,
-       COLOR_ACTIVE,
-       COLOR_PASSIVE,
-};
-
-enum raster_load_mode {
-       LOAD_DATA = 1,
-       LOAD_PALETTE,
-};
-
-struct display_panel {
-       enum panel_type panel_type; /* QVGA */
-       int max_bpp;
-       int min_bpp;
-       enum panel_shade panel_shade;
-};
-
-struct da8xx_panel {
-       const char      name[25];       /* Full name <vendor>_<model> */
-       unsigned short  width;
-       unsigned short  height;
-       int             hfp;            /* Horizontal front porch */
-       int             hbp;            /* Horizontal back porch */
-       int             hsw;            /* Horizontal Sync Pulse Width */
-       int             vfp;            /* Vertical front porch */
-       int             vbp;            /* Vertical back porch */
-       int             vsw;            /* Vertical Sync Pulse Width */
-       unsigned int    pxl_clk;        /* Pixel clock */
-       unsigned char   invert_pxl_clk; /* Invert Pixel clock */
-};
-
-struct da8xx_lcdc_platform_data {
-       const char manu_name[10];
-       void *controller_data;
-       const char type[25];
-       void (*panel_power_ctrl)(int);
-};
-
-struct lcd_ctrl_config {
-       const struct display_panel *p_disp_panel;
-
-       /* AC Bias Pin Frequency */
-       int ac_bias;
-
-       /* AC Bias Pin Transitions per Interrupt */
-       int ac_bias_intrpt;
-
-       /* DMA burst size */
-       int dma_burst_sz;
-
-       /* Bits per pixel */
-       int bpp;
-
-       /* FIFO DMA Request Delay */
-       int fdd;
-
-       /* TFT Alternative Signal Mapping (Only for active) */
-       unsigned char tft_alt_mode;
-
-       /* 12 Bit Per Pixel (5-6-5) Mode (Only for passive) */
-       unsigned char stn_565_mode;
-
-       /* Mono 8-bit Mode: 1=D0-D7 or 0=D0-D3 */
-       unsigned char mono_8bit_mode;
-
-       /* Invert line clock */
-       unsigned char invert_line_clock;
-
-       /* Invert frame clock  */
-       unsigned char invert_frm_clock;
-
-       /* Horizontal and Vertical Sync Edge: 0=rising 1=falling */
-       unsigned char sync_edge;
-
-       /* Horizontal and Vertical Sync: Control: 0=ignore */
-       unsigned char sync_ctrl;
-
-       /* Raster Data Order Select: 1=Most-to-least 0=Least-to-most */
-       unsigned char raster_order;
-};
-
-struct lcd_sync_arg {
-       int back_porch;
-       int front_porch;
-       int pulse_width;
-};
-
-void da8xx_video_init(const struct da8xx_panel *panel, int bits_pixel);
-
-#endif  /* ifndef DA8XX_FB_H */
index c786997799004deeb82517aa318e5650fd082d67..89ee079ea60ff0f836c7caabbe89a60947740dfe 100644 (file)
@@ -24,7 +24,7 @@
 #include <asm/io.h>
 #include <asm/arch/davinci_misc.h>
 #include <asm/gpio.h>
-#include <asm/arch/da8xx-fb.h>
+#include "../../../drivers/video/da8xx-fb.h"
 
 DECLARE_GLOBAL_DATA_PTR;
 
index 373991ddee16a4c05a85b81ece15428f85c9b84c..dd7ce360609c3b02bf2bd4655a6d57d1b8cc56fd 100644 (file)
@@ -24,7 +24,7 @@
 #include <asm/arch/hardware.h>
 
 #include "videomodes.h"
-#include <asm/arch/da8xx-fb.h>
+#include "da8xx-fb.h"
 
 #define DRIVER_NAME "da8xx_lcdc"
 
diff --git a/drivers/video/da8xx-fb.h b/drivers/video/da8xx-fb.h
new file mode 100644 (file)
index 0000000..f48fdfd
--- /dev/null
@@ -0,0 +1,114 @@
+/*
+ * Porting to u-boot:
+ *
+ * (C) Copyright 2011
+ * Stefano Babic, DENX Software Engineering, sbabic@denx.de.
+ *
+ * Copyright (C) 2008-2009 MontaVista Software Inc.
+ * Copyright (C) 2008-2009 Texas Instruments Inc
+ *
+ * Based on the LCD driver for TI Avalanche processors written by
+ * Ajay Singh and Shalom Hai.
+ *
+ * SPDX-License-Identifier:    GPL-2.0+
+ */
+
+#ifndef DA8XX_FB_H
+#define DA8XX_FB_H
+
+enum panel_type {
+       QVGA = 0,
+       WVGA
+};
+
+enum panel_shade {
+       MONOCHROME = 0,
+       COLOR_ACTIVE,
+       COLOR_PASSIVE,
+};
+
+enum raster_load_mode {
+       LOAD_DATA = 1,
+       LOAD_PALETTE,
+};
+
+struct display_panel {
+       enum panel_type panel_type; /* QVGA */
+       int max_bpp;
+       int min_bpp;
+       enum panel_shade panel_shade;
+};
+
+struct da8xx_panel {
+       const char      name[25];       /* Full name <vendor>_<model> */
+       unsigned short  width;
+       unsigned short  height;
+       int             hfp;            /* Horizontal front porch */
+       int             hbp;            /* Horizontal back porch */
+       int             hsw;            /* Horizontal Sync Pulse Width */
+       int             vfp;            /* Vertical front porch */
+       int             vbp;            /* Vertical back porch */
+       int             vsw;            /* Vertical Sync Pulse Width */
+       unsigned int    pxl_clk;        /* Pixel clock */
+       unsigned char   invert_pxl_clk; /* Invert Pixel clock */
+};
+
+struct da8xx_lcdc_platform_data {
+       const char manu_name[10];
+       void *controller_data;
+       const char type[25];
+       void (*panel_power_ctrl)(int);
+};
+
+struct lcd_ctrl_config {
+       const struct display_panel *p_disp_panel;
+
+       /* AC Bias Pin Frequency */
+       int ac_bias;
+
+       /* AC Bias Pin Transitions per Interrupt */
+       int ac_bias_intrpt;
+
+       /* DMA burst size */
+       int dma_burst_sz;
+
+       /* Bits per pixel */
+       int bpp;
+
+       /* FIFO DMA Request Delay */
+       int fdd;
+
+       /* TFT Alternative Signal Mapping (Only for active) */
+       unsigned char tft_alt_mode;
+
+       /* 12 Bit Per Pixel (5-6-5) Mode (Only for passive) */
+       unsigned char stn_565_mode;
+
+       /* Mono 8-bit Mode: 1=D0-D7 or 0=D0-D3 */
+       unsigned char mono_8bit_mode;
+
+       /* Invert line clock */
+       unsigned char invert_line_clock;
+
+       /* Invert frame clock  */
+       unsigned char invert_frm_clock;
+
+       /* Horizontal and Vertical Sync Edge: 0=rising 1=falling */
+       unsigned char sync_edge;
+
+       /* Horizontal and Vertical Sync: Control: 0=ignore */
+       unsigned char sync_ctrl;
+
+       /* Raster Data Order Select: 1=Most-to-least 0=Least-to-most */
+       unsigned char raster_order;
+};
+
+struct lcd_sync_arg {
+       int back_porch;
+       int front_porch;
+       int pulse_width;
+};
+
+void da8xx_video_init(const struct da8xx_panel *panel, int bits_pixel);
+
+#endif  /* ifndef DA8XX_FB_H */