rk3288 chromium: fix Kconfig waring and remove unused files
authoryzq <yzq@rock-chips.com>
Wed, 26 Mar 2014 07:42:34 +0000 (15:42 +0800)
committeryzq <yzq@rock-chips.com>
Wed, 26 Mar 2014 07:44:18 +0000 (15:44 +0800)
14 files changed:
drivers/gpu/drm/rockchip/Kconfig
drivers/gpu/drm/rockchip/Makefile
drivers/gpu/drm/rockchip/screen/.gitignore [deleted file]
drivers/gpu/drm/rockchip/screen/Kconfig [deleted file]
drivers/gpu/drm/rockchip/screen/Makefile [deleted file]
drivers/gpu/drm/rockchip/screen/lcd_B080XAN02_mipi.c [deleted file]
drivers/gpu/drm/rockchip/screen/lcd_LD089WU1_mipi.c [deleted file]
drivers/gpu/drm/rockchip/screen/lcd_general.c [deleted file]
drivers/gpu/drm/rockchip/screen/rk_screen.c [deleted file]
drivers/gpu/drm/rockchip/transmitter/Kconfig [deleted file]
drivers/gpu/drm/rockchip/transmitter/Makefile [deleted file]
drivers/gpu/drm/rockchip/transmitter/rk32_lvds.c [deleted file]
drivers/gpu/drm/rockchip/transmitter/rk32_lvds.h [deleted file]
drivers/video/rockchip/screen/Kconfig

index 3c7efc47f45a627a25eae2809459ebdf1f0a7c48..19ccbb1b7ddcc093de88aa8be0172588d7d7c994 100644 (file)
@@ -51,4 +51,3 @@ config DRM_ROCKCHIP_VIDI
        help
          Choose this option if you want to use rockchip VIDI for DRM.
 
-source "drivers/gpu/drm/rockchip/screen/Kconfig"
index ad6e460a6a79b5ada98174bb1e83f8a7fc4e5861..0af2aa51c44be742ccc720ac315070f6f82f1772 100644 (file)
@@ -18,5 +18,5 @@ rockchipdrm-$(CONFIG_DRM_ROCKCHIP_HDMI)       += rockchip_hdmi.o rockchip_mixer.o \
 rockchipdrm-$(CONFIG_DRM_ROCKCHIP_VIDI)        += rockchip_drm_vidi.o
 
 obj-$(CONFIG_DRM_ROCKCHIP)             += rockchipdrm.o
-obj-y += screen/
-obj-y += transmitter/
+obj-$(CONFIG_DRM_ROCKCHIP) += ../../../video/rockchip/screen/
+obj-$(CONFIG_DRM_ROCKCHIP) += ../../../video/rockchip/transmitter/
diff --git a/drivers/gpu/drm/rockchip/screen/.gitignore b/drivers/gpu/drm/rockchip/screen/.gitignore
deleted file mode 100644 (file)
index 262e546..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-#
-# Generated files
-#
-*lcd.h
diff --git a/drivers/gpu/drm/rockchip/screen/Kconfig b/drivers/gpu/drm/rockchip/screen/Kconfig
deleted file mode 100755 (executable)
index 78d3405..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-choice
-       prompt  "LCD Panel Select"
-
-config LCD_GENERAL
-       bool "General lcd panel"
-       help 
-         select if the panel do not need initialization
-config LCD_LD089WU1_MIPI
-       bool "mipi dsi lcd LD089WU1 1920X1200"
-config LCD_B080XAN02_MIPI
-       bool "mipi dsi lcd B080XAN02 1024X768"  
-endchoice
-
-
diff --git a/drivers/gpu/drm/rockchip/screen/Makefile b/drivers/gpu/drm/rockchip/screen/Makefile
deleted file mode 100644 (file)
index bf42611..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-obj-$(CONFIG_LCD_GENERAL) += lcd_general.o
-obj-$(CONFIG_LCD_LD089WU1_MIPI)   += lcd_LD089WU1_mipi.o
-obj-$(CONFIG_LCD_B080XAN02_MIPI)   += lcd_B080XAN02_mipi.o
-
-
-quiet_cmd_gen = GEN     $@
-      cmd_gen = cmp -s $< $@ || cp $< $@
-
-lcd-obj := $(filter lcd_%.o,$(obj-y))
-lcd-cfile := $(patsubst %.o,%.c,$(lcd-obj))
-lcd-cpath := $(src)/$(lcd-cfile)
-
-obj-y := $(filter-out $(lcd-obj),$(obj-y))
-
-$(obj)/lcd.h: $(lcd-cpath)  FORCE
-       $(call if_changed,gen)
-
-$(obj)/rk_screen.o: $(obj)/lcd.h
-obj-y += rk_screen.o
-
-clean-files := lcd.h
-
-
-
diff --git a/drivers/gpu/drm/rockchip/screen/lcd_B080XAN02_mipi.c b/drivers/gpu/drm/rockchip/screen/lcd_B080XAN02_mipi.c
deleted file mode 100755 (executable)
index 5d5997e..0000000
+++ /dev/null
@@ -1,72 +0,0 @@
-#ifndef __LCD_B080XAN02__
-#define __LCD_B080XAN02__
-
-#if defined(CONFIG_MIPI_DSI)
-#include "../transmitter/mipi_dsi.h"
-#endif
-#include <linux/delay.h>
-
-
-
-#define RK_SCREEN_INIT         1
-
-/* about mipi */
-#define MIPI_DSI_LANE 4
-#define MIPI_DSI_HS_CLK 528*1000000 //1000*1000000
-
-
-#if defined(RK_SCREEN_INIT)
-static struct rk29lcd_info *gLcd_info = NULL;
-
-int rk_lcd_init(void) {
-
-       u8 dcs[16] = {0};
-       if(dsi_is_active() != 1)
-               return -1;
-       /*below is changeable*/
-       dsi_enable_hs_clk(1);
-
-       dcs[0] = LPDT;
-       dcs[1] = dcs_exit_sleep_mode; 
-       dsi_send_dcs_packet(dcs, 2);
-       msleep(1);
-       dcs[0] = LPDT;
-       dcs[1] = dcs_set_display_on;
-       dsi_send_dcs_packet(dcs, 2);
-       msleep(10);
-       //dsi_enable_command_mode(0);
-       dsi_enable_video_mode(1);
-       
-       printk("++++++++++++++++%s:%d\n", __func__, __LINE__);
-    return 0;
-}
-
-int rk_lcd_standby(u8 enable) {
-
-       u8 dcs[16] = {0};
-       if(dsi_is_active() != 1)
-               return -1;
-               
-       if(enable) {
-               /*below is changeable*/
-               dcs[0] = LPDT;
-               dcs[1] = dcs_set_display_off; 
-               dsi_send_dcs_packet(dcs, 2);
-               msleep(1);
-               dcs[0] = LPDT;
-               dcs[1] = dcs_enter_sleep_mode; 
-               dsi_send_dcs_packet(dcs, 2);
-               msleep(1);
-
-               printk("++++enable++++++++++++%s:%d\n", __func__, __LINE__);
-       
-       } else {
-               /*below is changeable*/
-               rk_lcd_init();
-               printk("++++++++++++++++%s:%d\n", __func__, __LINE__);  
-       }
-    return 0;
-}
-#endif
-
-#endif  
diff --git a/drivers/gpu/drm/rockchip/screen/lcd_LD089WU1_mipi.c b/drivers/gpu/drm/rockchip/screen/lcd_LD089WU1_mipi.c
deleted file mode 100644 (file)
index 30db8f0..0000000
+++ /dev/null
@@ -1,70 +0,0 @@
-#ifndef __LCD_LD089WU1__
-#define __LCD_LD089WU1__
-
-#if defined(CONFIG_MIPI_DSI)
-#include "../transmitter/mipi_dsi.h"
-#endif
-
-
-
-
-#define RK_SCREEN_INIT         1
-
-/* about mipi */
-#define MIPI_DSI_LANE 4
-#define MIPI_DSI_HS_CLK 1000*1000000
-
-#if defined(RK_SCREEN_INIT)
-static struct rk29lcd_info *gLcd_info = NULL;
-
-int rk_lcd_init(void) {
-
-       u8 dcs[16] = {0};
-       if(dsi_is_active() != 1)
-               return -1;
-               
-       /*below is changeable*/
-       dsi_enable_hs_clk(1);
-       dsi_enable_video_mode(0);
-       dsi_enable_command_mode(1);
-       dcs[0] = dcs_exit_sleep_mode; 
-       dsi_send_dcs_packet(dcs, 1);
-       msleep(1);
-       dcs[0] = dcs_set_display_on;
-       dsi_send_dcs_packet(dcs, 1);
-       msleep(10);
-       dsi_enable_command_mode(0);
-       dsi_enable_video_mode(1);
-       //printk("++++++++++++++++%s:%d\n", __func__, __LINE__);
-};
-
-
-
-int rk_lcd_standby(u8 enable) {
-
-       u8 dcs[16] = {0};
-       if(dsi_is_active() != 1)
-               return -1;
-               
-       if(enable) {
-               dsi_enable_video_mode(0);
-               dsi_enable_command_mode(1);
-               /*below is changeable*/
-               dcs[0] = dcs_set_display_off; 
-               dsi_send_dcs_packet(dcs, 1);
-               msleep(1);
-               dcs[0] = dcs_enter_sleep_mode; 
-               dsi_send_dcs_packet(dcs, 1);
-               msleep(1);
-               //printk("++++++++++++++++%s:%d\n", __func__, __LINE__);
-       
-       } else {
-               /*below is changeable*/
-               rk_lcd_init();
-               //printk("++++++++++++++++%s:%d\n", __func__, __LINE__);
-       
-       }
-};
-#endif
-
-#endif  
diff --git a/drivers/gpu/drm/rockchip/screen/lcd_general.c b/drivers/gpu/drm/rockchip/screen/lcd_general.c
deleted file mode 100644 (file)
index b57dc2c..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-
-#ifndef __LCD_NULL__
-#define __LCD_NULL__
-
-
-
-#endif
-
diff --git a/drivers/gpu/drm/rockchip/screen/rk_screen.c b/drivers/gpu/drm/rockchip/screen/rk_screen.c
deleted file mode 100644 (file)
index 5579d28..0000000
+++ /dev/null
@@ -1,65 +0,0 @@
-
-#include <linux/rk_fb.h>
-#include <linux/device.h>
-#include "lcd.h"
-
-static struct rk_screen *rk_screen;
-int  rk_fb_get_prmry_screen(struct rk_screen *screen)
-{
-       memcpy(screen, rk_screen, sizeof(struct rk_screen));
-       return 0;
-}
-
-
-size_t get_fb_size(void)
-{
-       
-}
-
-static int rk_screen_probe(struct platform_device *pdev)
-{
-       struct device_node *np = pdev->dev.of_node;
-       int ret;
-
-       if (!np) {
-               dev_err(&pdev->dev, "Missing device tree node.\n");
-               return -EINVAL;
-       }
-       rk_screen = devm_kzalloc(&pdev->dev, sizeof(struct rk_screen), GFP_KERNEL);
-       if (!rk_screen) {
-               dev_err(&pdev->dev, "kmalloc for rk screen fail!");
-               return  -ENOMEM;
-       }
-       ret = rk_fb_prase_timing_dt(np,rk_screen);
-       dev_info(&pdev->dev, "rockchip screen probe %s\n",
-                               ret? "failed" : "success");
-       return ret;
-}
-
-static const struct of_device_id rk_screen_dt_ids[] = {
-       { .compatible = "rockchip,screen", },
-       {}
-};
-
-static struct platform_driver rk_screen_driver = {
-       .probe          = rk_screen_probe,
-       .driver         = {
-               .name   = "rk-screen",
-               .owner  = THIS_MODULE,
-               .of_match_table = of_match_ptr(rk_screen_dt_ids),
-       },
-};
-
-static int __init rk_screen_init(void)
-{
-       return platform_driver_register(&rk_screen_driver);
-}
-
-static void __exit rk_screen_exit(void)
-{
-       platform_driver_unregister(&rk_screen_driver);
-}
-
-subsys_initcall_sync(rk_screen_init);
-module_exit(rk_screen_exit);
-
diff --git a/drivers/gpu/drm/rockchip/transmitter/Kconfig b/drivers/gpu/drm/rockchip/transmitter/Kconfig
deleted file mode 100644 (file)
index edf8e3c..0000000
+++ /dev/null
@@ -1,72 +0,0 @@
-
-menuconfig RK_TRSM
-       bool "RockChip display transmitter support"
-       depends on FB_ROCKCHIP
-
-config RK2928_LVDS
-       bool "RK2928/RK2926 lvds transmitter support"
-        depends on ARCH_RK2928 && RK_TRSM
-
-config RK3026_LVDS
-       depends on ARCH_RK3026 && RK_TRSM
-       bool "RK3026/RK3028A lvds transmitter support"
-       default y       
-
-config RK32_LVDS
-       bool "RK32 lvds transmitter support"
-       depends on RK_TRSM
-
-config RK610_LVDS
-       bool "RK610(Jetta) lvds transmitter support"
-       depends on MFD_RK610 && RK_TRSM 
-       help
-               Support Jetta(RK610) to output LCD1 and LVDS.
-
-config RK616_LVDS
-        bool "RK616(JettaB) lvds,lcd,scaler vido interface support"
-        depends on MFD_RK616 && RK_TRSM
-        help
-           RK616(Jetta B) LVDS,LCD,scaler transmitter support.
-               
-
-config DP_ANX6345
-       bool "RGB to DisplayPort transmitter anx6345,anx9804,anx9805 support"
-       depends on RK_TRSM
-
-config DP501
-       bool"RGB to DisplayPort transmitter dp501 support"
-       depends on RK_TRSM
-
-config RK32_DP
-       bool "RK32 RGB to DisplayPort transmitter support "
-       depends on RK_TRSM
-
-config MIPI_DSI
-       depends on RK_TRSM
-       bool "Rockchip MIPI DSI support"
-
-config TC358768_RGB2MIPI
-        tristate "toshiba TC358768 RGB to MIPI DSI"
-               depends on MIPI_DSI
-        help
-        "a chip that change RGB interface parallel signal into DSI serial signal"
-
-config SSD2828_RGB2MIPI
-        tristate "solomon SSD2828 RGB to MIPI DSI"
-               depends on MIPI_DSI
-        help
-        "a chip that change RGB interface parallel signal into DSI serial signal"
-
-config RK616_MIPI_DSI
-        tristate "Rockchip mipi dsi support"
-        depends on MIPI_DSI
-        help
-           Rockchip mipi dsi support.          
-
-                       
-config RK616_MIPI_DSI_RST
-       bool "Reset the rockchip mipi dsi"
-       depends on MFD_RK616 && RK616_MIPI_DSI && RK616_USE_MCLK_12M
-       default y
-       help
-        if you say y here: inset the hdmi, mipi lcd will be reset.  
diff --git a/drivers/gpu/drm/rockchip/transmitter/Makefile b/drivers/gpu/drm/rockchip/transmitter/Makefile
deleted file mode 100644 (file)
index c03b0a7..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-#
-# Makefile for display transmitter like lvds edp mipi
-#
-obj-$(CONFIG_RK2928_LVDS)       += rk2928_lvds.o
-obj-$(CONFIG_RK3026_LVDS)       += rk3026_lvds.o
-obj-$(CONFIG_RK610_LVDS)       += rk610_lcd.o
-obj-$(CONFIG_RK616_LVDS)        += rk616_lvds.o
-obj-y                          += rk32_lvds.o
-obj-$(CONFIG_DP_ANX6345)        += dp_anx6345.o
-obj-$(CONFIG_DP501)            += dp501.o
-obj-$(CONFIG_RK32_DP)          += rk32_dp.o rk32_dp_reg.o
-obj-$(CONFIG_MIPI_DSI)         += mipi_dsi.o 
-obj-$(CONFIG_RK616_MIPI_DSI)   += rk616_mipi_dsi.o
-obj-$(CONFIG_TC358768_RGB2MIPI) += tc358768.o
-obj-$(CONFIG_SSD2828_RGB2MIPI)  += ssd2828.o
-
diff --git a/drivers/gpu/drm/rockchip/transmitter/rk32_lvds.c b/drivers/gpu/drm/rockchip/transmitter/rk32_lvds.c
deleted file mode 100755 (executable)
index d25c2c3..0000000
+++ /dev/null
@@ -1,323 +0,0 @@
-#include <linux/module.h>
-#include <linux/kernel.h>
-#include <linux/init.h>
-#include <linux/device.h>
-#include <linux/errno.h>
-#include <linux/string.h>
-#include <linux/mm.h>
-#include <linux/slab.h>
-#include <linux/delay.h>
-#include <linux/platform_device.h>
-#include <linux/clk.h>
-#include <linux/rk_fb.h>
-#include <linux/rockchip/iomap.h>
-#include <linux/rockchip/grf.h>
-#include "rk32_lvds.h"
-
-//#define TTL_TO_LVDS 1
-static struct rk32_lvds *rk32_lvds;
-static int rk32_lvds_disable(void)
-{
-       struct rk32_lvds *lvds = rk32_lvds;
-       writel_relaxed(0x80008000, RK_GRF_VIRT + RK3288_GRF_SOC_CON7);
-       writel_relaxed(0x00, lvds->regs + LVDS_CFG_REG_21); /*disable tx*/
-       writel_relaxed(0xff, lvds->regs + LVDS_CFG_REG_c); /*disable pll*/
-       clk_disable_unprepare(lvds->clk);
-       return 0;
-}
-
-static int rk32_lvds_en(void)
-{
-       struct rk32_lvds *lvds = rk32_lvds;
-       struct rk_screen *screen = &lvds->screen;
-       u32 h_bp = screen->mode.hsync_len + screen->mode.left_margin;
-       u32 i,j, val ;
-
-       clk_prepare_enable(lvds->clk);
-       screen->type = SCREEN_RGB;
-       
-       screen->lcdc_id = 1;
-       if (screen->lcdc_id == 1) /*lcdc1 = vop little,lcdc0 = vop big*/
-               val = LVDS_SEL_VOP_LIT | (LVDS_SEL_VOP_LIT << 16);
-       else
-               val = LVDS_SEL_VOP_LIT << 16;
-       writel_relaxed(val, RK_GRF_VIRT + RK3288_GRF_SOC_CON6);
-
-       val = screen->lvds_format;
-       if (screen->type == SCREEN_DUAL_LVDS)
-               val |= LVDS_DUAL | LVDS_CH0_EN | LVDS_CH1_EN;
-       else if(screen->type == SCREEN_LVDS)
-               val |= LVDS_CH0_EN;
-
-               //val |= LVDS_MSB;
-       else if (screen->type == SCREEN_RGB)
-               val |= LVDS_TTL_EN | LVDS_CH0_EN | LVDS_CH1_EN;
-
-       if (h_bp & 0x01)
-               val |= LVDS_START_PHASE_RST_1;
-
-       val |= (screen->pin_dclk << 8) | (screen->pin_hsync << 9) |
-               (screen->pin_den << 10);
-       val |= 0xffff << 16;
-       //val = 0x08010801;
-       writel_relaxed(val, RK_GRF_VIRT + RK3288_GRF_SOC_CON7);
-
-       if (screen->type == SCREEN_LVDS)
-               val = 0xbf;
-       else
-               val = 0x7f;
-#if 0
-       for(i=0;i<0x200;){
-               val  = readl_relaxed(lvds->regs + i);
-               printk("0x%08x:0x%08x  ",i,val);
-               i += 4;
-               if(i % 16 == 0)
-                       printk("\n");
-       }
-#endif 
-       #ifdef  TTL_TO_LVDS // 0 ttl  1 lvds
-       val = 0x007f007f;//0x1<<6 |0x1 <<4;
-       writel_relaxed(val, RK_GRF_VIRT + 0xc);
-
-       
-       lvds_writel(lvds, LVDS_CH0_REG_0, 0x7f);
-       lvds_writel(lvds, LVDS_CH0_REG_1, 0x40);
-       lvds_writel(lvds, LVDS_CH0_REG_2, 0x00);
-
-       if (screen->type == SCREEN_RGB)
-               val = 0x1f;
-       else
-               val = 0x00;
-       lvds_writel(lvds, LVDS_CH0_REG_4, 0x3f);
-       lvds_writel(lvds, LVDS_CH0_REG_5, 0x3f);
-       lvds_writel(lvds, LVDS_CH0_REG_3, 0x46);
-       lvds_writel(lvds, LVDS_CH0_REG_d, 0x0a);
-       lvds_writel(lvds, LVDS_CH0_REG_20,0x44);/* 44:LSB  45:MSB*/
-       writel_relaxed(0x00, lvds->regs + LVDS_CFG_REG_c); /*eanble pll*/
-       writel_relaxed(0x92, lvds->regs + LVDS_CFG_REG_21); /*enable tx*/
-
-       lvds_writel(lvds, 0x100, 0x7f);
-       lvds_writel(lvds, 0x104, 0x40);
-       lvds_writel(lvds, 0x108, 0x00);
-       lvds_writel(lvds, 0x10c, 0x46);
-       lvds_writel(lvds, 0x110, 0x3f);
-       lvds_writel(lvds, 0x114, 0x3f);
-       lvds_writel(lvds, 0x134, 0x0a);
-       #else
-       val  = readl_relaxed(lvds->regs + 0x88);
-       printk("0x88:0x%x\n",val);
-
-       lvds_writel(lvds, LVDS_CH0_REG_0, 0xbf);
-       lvds_writel(lvds, LVDS_CH0_REG_1, 0x3f);//  3f
-       lvds_writel(lvds, LVDS_CH0_REG_2, 0xfe);
-       lvds_writel(lvds, LVDS_CH0_REG_3, 0x46);//0x46
-       lvds_writel(lvds, LVDS_CH0_REG_4, 0x00);
-       //lvds_writel(lvds, LVDS_CH0_REG_9, 0x20);
-       //lvds_writel(lvds, LVDS_CH0_REG_d, 0x4b);
-       //lvds_writel(lvds, LVDS_CH0_REG_f, 0x0d);
-       lvds_writel(lvds, LVDS_CH0_REG_d, 0x0a);//0a
-       lvds_writel(lvds, LVDS_CH0_REG_20,0x44);/* 44:LSB  45:MSB*/
-       //lvds_writel(lvds, 0x24,0x20);
-       //writel_relaxed(0x23, lvds->regs + 0x88);
-       writel_relaxed(0x00, lvds->regs + LVDS_CFG_REG_c); /*eanble pll*/
-       writel_relaxed(0x92, lvds->regs + LVDS_CFG_REG_21); /*enable tx*/
-
-
-       //lvds_writel(lvds, 0x100, 0xbf);
-       //lvds_writel(lvds, 0x104, 0x3f);
-       //lvds_writel(lvds, 0x108, 0xfe);
-       //lvds_writel(lvds, 0x10c, 0x46); //0x46
-       //lvds_writel(lvds, 0x110, 0x00);
-       //lvds_writel(lvds, 0x114, 0x00);
-       //lvds_writel(lvds, 0x134, 0x0a);
-
-       #endif
-#if 0
-       for(i=0;i<100;i++){
-               mdelay(1000);
-               mdelay(1000);
-               mdelay(1000);
-               mdelay(1000);
-               mdelay(1000);
-               printk("write LVDS_CH0_REG_20 :0x40\n");
-               //writel_relaxed(0x10, lvds->regs + LVDS_CFG_REG_c);
-               lvds_writel(lvds, LVDS_CH0_REG_20,0x40);/* 44:LSB  45:MSB*/
-               val  = readl_relaxed(lvds->regs + LVDS_CH0_REG_20);
-               printk("read back LVDS_CH0_REG_20:0x%x\n",val);
-               mdelay(1000);
-               mdelay(1000);
-               mdelay(1000);
-               mdelay(1000);
-               mdelay(1000);
-               printk("write LVDS_CH0_REG_20 :0x44\n");
-               lvds_writel(lvds, LVDS_CH0_REG_20,0x44);/* 44:LSB  45:MSB*/
-               val  = readl_relaxed(lvds->regs + LVDS_CH0_REG_20);
-               printk("read back LVDS_CH0_REG_20:0x%x\n",val);
-       }
-#endif 
-       //while(1)
-#if 0
-       {
-       val  = readl_relaxed(RK_GRF_VIRT + RK3288_GRF_SOC_CON6);
-       printk("RK3288_GRF_SOC_CON6:0x%x\n",val);
-       val  = readl_relaxed(RK_GRF_VIRT + RK3288_GRF_SOC_CON7);
-       printk("RK3288_GRF_SOC_CON7:0x%x\n",val);
-       val  = readl_relaxed(RK_GRF_VIRT + RK3288_GRF_SOC_CON15);
-       printk("RK3288_GRF_SOC_CON15:0x%x\n",val);
-       
-
-       val  = readl_relaxed(lvds->regs + LVDS_CH0_REG_0);
-       printk("LVDS_CH0_REG_0:0x%x\n",val);
-
-       val  = readl_relaxed(lvds->regs + LVDS_CH0_REG_1);
-       printk("LVDS_CH0_REG_1:0x%x\n",val);
-
-       val  = readl_relaxed(lvds->regs + LVDS_CH0_REG_2);
-       printk("LVDS_CH0_REG_2:0x%x\n",val);
-
-       val  = readl_relaxed(lvds->regs + LVDS_CH0_REG_3);
-       printk("LVDS_CH0_REG_3:0x%x\n",val);
-       
-       val  = readl_relaxed(lvds->regs + LVDS_CH0_REG_4);
-       printk("LVDS_CH0_REG_4:0x%x\n",val);
-
-       val  = readl_relaxed(lvds->regs + LVDS_CH0_REG_5);
-       printk("LVDS_CH0_REG_5:0x%x\n",val);
-
-       val  = readl_relaxed(lvds->regs + LVDS_CH0_REG_d);
-       printk("LVDS_CH0_REG_d:0x%x\n",val);
-
-       val  = readl_relaxed(lvds->regs + LVDS_CH0_REG_f);
-               printk("LVDS_CH0_REG_f:0x%x\n",val);
-
-       
-       val  = readl_relaxed(lvds->regs + LVDS_CFG_REG_c);
-       printk("LVDS_CFG_REG_c:0x%x\n",val);
-
-       val  = readl_relaxed(lvds->regs + LVDS_CFG_REG_21);
-       printk("LVDS_CFG_REG_21:0x%x\n",val);
-       val  = readl_relaxed(lvds->regs + 0x100);
-       printk("0x100:0x%x\n",val);
-
-       val  = readl_relaxed(lvds->regs + 0x104);
-       printk("0x104:0x%x\n",val);
-               val  = readl_relaxed(lvds->regs + 0x108);
-       printk("0x108:0x%x\n",val);
-
-       val  = readl_relaxed(lvds->regs + 0x10c);
-       printk("0x10c:0x%x\n",val);
-       
-       val  = readl_relaxed(lvds->regs + 0x110);
-       printk("0x110:0x%x\n",val);
-
-       val  = readl_relaxed(lvds->regs + 0x114);
-       printk("0x114:0x%x\n",val);
-               val  = readl_relaxed(lvds->regs + 0x118);
-       printk("0x118:0x%x\n",val);
-
-       val  = readl_relaxed(lvds->regs + 0x11c);
-       printk("0x11c:0x%x\n",val);     
-       mdelay(1000);
-               }
-
-       for(i=0;i<0x200;){
-               val  = readl_relaxed(lvds->regs + i);
-               printk("0x%08x:0x%08x  ",i,val);
-               i += 4;
-               if(i % 16 == 0)
-                       printk("\n");
-       }
-#endif
-       return 0;
-}
-
-
-
-static struct rk_fb_trsm_ops trsm_lvds_ops = {
-       .enable = rk32_lvds_en,
-       .disable = rk32_lvds_disable,
-};
-
-static int rk32_lvds_probe(struct platform_device *pdev)
-{
-       struct rk32_lvds *lvds;
-       struct resource *res;
-       struct device_node *np = pdev->dev.of_node;
-
-       if (!np) {
-               dev_err(&pdev->dev, "Missing device tree node.\n");
-               return -EINVAL;
-       }
-
-       lvds = devm_kzalloc(&pdev->dev, sizeof(struct rk32_lvds), GFP_KERNEL);
-       if (!lvds) {
-               dev_err(&pdev->dev, "no memory for state\n");
-               return -ENOMEM;
-       }
-       lvds->dev = &pdev->dev;
-       rk_fb_get_prmry_screen(&lvds->screen);
-       if ((lvds->screen.type != SCREEN_RGB) && 
-               (lvds->screen.type != SCREEN_LVDS) &&
-               (lvds->screen.type != SCREEN_DUAL_LVDS)) {
-               dev_err(&pdev->dev, "screen is not lvds/rgb!\n");
-               return -EINVAL;
-       }
-       platform_set_drvdata(pdev, lvds);
-       dev_set_name(lvds->dev, "rk32-lvds");
-       res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-       lvds->regs = devm_ioremap_resource(&pdev->dev, res);
-       if (IS_ERR(lvds->regs)) {
-               dev_err(&pdev->dev, "ioremap reg failed\n");
-               return PTR_ERR(lvds->regs);
-       }
-       lvds->clk = devm_clk_get(&pdev->dev,NULL);
-       if (IS_ERR(lvds->clk)) {
-               dev_err(&pdev->dev, "get clk failed\n");
-               return PTR_ERR(lvds->clk);
-       }
-       rk32_lvds = lvds;
-       rk_fb_trsm_ops_register(&trsm_lvds_ops,SCREEN_LVDS);
-       dev_info(&pdev->dev, "rk32 lvds driver probe success\n");
-
-       return 0;
-}
-
-static void rk32_lvds_shutdown(struct platform_device *pdev)
-{
-
-}
-
-#if defined(CONFIG_OF)
-static const struct of_device_id rk32_lvds_dt_ids[] = {
-       {.compatible = "rockchip, rk32-lvds",},
-       {}
-};
-
-MODULE_DEVICE_TABLE(of, rk32_lvds_dt_ids);
-#endif
-
-static struct platform_driver rk32_lvds_driver = {
-       .probe = rk32_lvds_probe,
-       .driver = {
-                  .name = "rk32-lvds",
-                  .owner = THIS_MODULE,
-#if defined(CONFIG_OF)
-                  .of_match_table = of_match_ptr(rk32_lvds_dt_ids),
-#endif
-       },
-       .shutdown = rk32_lvds_shutdown,
-};
-
-static int __init rk32_lvds_module_init(void)
-{
-       return platform_driver_register(&rk32_lvds_driver);
-}
-
-static void __exit rk32_lvds_module_exit(void)
-{
-
-}
-
-fs_initcall(rk32_lvds_module_init);
-module_exit(rk32_lvds_module_exit);
-
diff --git a/drivers/gpu/drm/rockchip/transmitter/rk32_lvds.h b/drivers/gpu/drm/rockchip/transmitter/rk32_lvds.h
deleted file mode 100755 (executable)
index d2f8d56..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-#ifndef __RK32_LVDS__
-#define __RK32_LVDS__
-
-#define LVDS_CH0_REG_0                 0x00
-#define LVDS_CH0_REG_1                 0x04
-#define LVDS_CH0_REG_2                 0x08
-#define LVDS_CH0_REG_3                 0x0c
-#define LVDS_CH0_REG_4                 0x10
-#define LVDS_CH0_REG_5                 0x14
-#define LVDS_CH0_REG_9                 0x24
-#define LVDS_CFG_REG_c                 0x30
-#define LVDS_CH0_REG_d                 0x34
-#define LVDS_CH0_REG_f                 0x3c
-#define LVDS_CH0_REG_20                        0x80
-#define LVDS_CFG_REG_21                        0x84
-
-#define LVDS_SEL_VOP_LIT               (1 << 3)
-
-#define LVDS_FMT_MASK                  (0x07 << 16)
-#define LVDS_MSB                       (0x01 << 3)
-#define LVDS_DUAL                      (0x01 << 4)
-#define LVDS_FMT_1                     (0x01 << 5)
-#define LVDS_TTL_EN                    (0x01 << 6)
-#define LVDS_START_PHASE_RST_1         (0x01 << 7)
-#define LVDS_DCLK_INV                  (0x01 << 8)
-#define LVDS_CH0_EN                    (0x01 << 11)
-#define LVDS_CH1_EN                    (0x01 << 12)
-#define LVDS_PWRDN                     (0x01 << 15)
-
-struct rk32_lvds {
-       struct device           *dev;
-       void __iomem            *regs;
-       struct clk              *clk; /*phb clk*/
-       struct rk_screen        screen;
-};
-
-static int inline lvds_writel(struct rk32_lvds *lvds, u32 offset, u32 val)
-{
-       writel_relaxed(val, lvds->regs + offset);
-       //if (lvds->screen.type == SCREEN_DUAL_LVDS)
-               writel_relaxed(val, lvds->regs + offset + 0x100);
-       return 0;
-}
-#endif
index d95bc00d7ae2fc2b65808263df5305d908f7d4b2..c75f3197e01dae4de06f83383f3048707dc977cf 100755 (executable)
@@ -1,5 +1,5 @@
 choice
-       depends on FB_ROCKCHIP
+       depends on FB_ROCKCHIP || DRM_ROCKCHIP
        prompt  "LCD Panel Select"
 
 config LCD_GENERAL