Fixed SD card detection and display init stuff

This commit is contained in:
Thomas Kaiser 2016-02-24 14:58:09 +01:00
parent 3a0f93f122
commit 67424bfb2b
6 changed files with 19 additions and 26 deletions

View File

@ -698,7 +698,7 @@ di_used = 1
;--------------------------------------------------------------------------------
[mmc0_para]
sdc_used = 1
sdc_detmode = 1
sdc_detmode = 3
sdc_buswidth = 4
sdc_clk = port:PF02<2><1><2><default>
sdc_cmd = port:PF03<2><1><2><default>

View File

@ -436,7 +436,7 @@ di_used = 1
[mmc0_para]
sdc_used = 1
sdc_detmode = 1
sdc_detmode = 3
sdc_buswidth = 4
sdc_clk = port:PF02<2><1><2><default>
sdc_cmd = port:PF03<2><1><2><default>

View File

@ -436,7 +436,7 @@ di_used = 1
[mmc0_para]
sdc_used = 1
sdc_detmode = 1
sdc_detmode = 3
sdc_buswidth = 4
sdc_clk = port:PF02<2><1><2><default>
sdc_cmd = port:PF03<2><1><2><default>

View File

@ -438,7 +438,7 @@ di_used = 1
[mmc0_para]
sdc_used = 1
sdc_detmode = 1
sdc_detmode = 3
sdc_buswidth = 4
sdc_clk = port:PF02<2><1><2><default>
sdc_cmd = port:PF03<2><1><2><default>

View File

@ -712,7 +712,7 @@ di_used = 1
;--------------------------------------------------------------------------------
[mmc0_para]
sdc_used = 1
sdc_detmode = 1
sdc_detmode = 3
sdc_buswidth = 4
sdc_clk = port:PF02<2><1><2><default>
sdc_cmd = port:PF03<2><1><2><default>

View File

@ -1,5 +1,5 @@
diff --git a/drivers/video/sunxi/disp2/disp/dev_disp.c b/drivers/video/sunxi/disp2/disp/dev_disp.c
index 7ad900b..27f56c6 100755
index 7ad900b..1761309 100755
--- a/drivers/video/sunxi/disp2/disp/dev_disp.c
+++ b/drivers/video/sunxi/disp2/disp/dev_disp.c
@@ -12,6 +12,38 @@
@ -27,7 +27,7 @@ index 7ad900b..27f56c6 100755
+
+static char *screen1_output_mode;
+module_param(screen1_output_mode, charp, 0444);
+MODULE_PARM_DESC(screen1_output_mode, "See screen0_output_mode");
+MODULE_PARM_DESC(screen1_output_mode, "See screen1_output_mode");
+
+static int screen2_output_type = -1;
+module_param(screen2_output_type, int, 0444);
@ -35,7 +35,7 @@ index 7ad900b..27f56c6 100755
+
+static char *screen2_output_mode;
+module_param(screen2_output_mode, charp, 0444);
+MODULE_PARM_DESC(screen2_output_mode, "See screen0_output_mode");
+MODULE_PARM_DESC(screen2_output_mode, "See screen2_output_mode");
+#endif
+
disp_drv_info g_disp_drv;
@ -93,7 +93,7 @@ index 7ad900b..27f56c6 100755
+ if (screen1_output_mode != NULL) {
+ // TODO: support sunxi mode
+ sscanf(screen1_output_mode, "%d", &value);
+ pr_info("[DISP]%s: screen1_output_mode(%s) value(%d)\n", __func__, screen0_output_mode, value);
+ pr_info("[DISP]%s: screen1_output_mode(%s) value(%d)\n", __func__, screen1_output_mode, value);
+ }
+ else
+#endif
@ -129,19 +129,17 @@ index 7ad900b..27f56c6 100755
if(disp_sys_script_get_item("disp_init", "screen2_output_mode", &value, 1) < 0) {
__inf("fetch script data disp_init.screen2_output_mode fail\n");
}
@@ -902,7 +980,10 @@ static s32 disp_init(struct platform_device *pdev)
@@ -902,7 +980,8 @@ static s32 disp_init(struct platform_device *pdev)
para->start_process = start_process;
//para.capture_event = capture_event;
- value = disp_boot_para_parse();
+ //Justin Porting 20150707 Start
+ //value = disp_boot_para_parse();
+ //Justin Porting 20150707 End
+
output_type = (value >> 8) & 0xff;
output_mode = (value) & 0xff;
if(output_type != (int)DISP_OUTPUT_TYPE_NONE) {
@@ -1126,7 +1207,8 @@ static int disp_remove(struct platform_device *pdev)
@@ -1126,7 +1205,8 @@ static int disp_remove(struct platform_device *pdev)
return 0;
}
@ -151,7 +149,7 @@ index 7ad900b..27f56c6 100755
{
u32 screen_id = 0;
int num_screens;
@@ -1137,23 +1219,18 @@ void suspend()
@@ -1137,23 +1217,18 @@ void suspend()
num_screens = bsp_disp_feat_get_num_screens();
@ -177,7 +175,7 @@ index 7ad900b..27f56c6 100755
disp_list = disp_device_get_list_head();
list_for_each_entry(dispdev_suspend, disp_list, list) {
if (dispdev_suspend->suspend) {
@@ -1161,9 +1238,13 @@ void suspend()
@@ -1161,9 +1236,13 @@ void suspend()
}
}
@ -192,7 +190,7 @@ index 7ad900b..27f56c6 100755
{
u32 screen_id = 0;
int num_screens;
@@ -1171,8 +1252,6 @@ void resume()
@@ -1171,8 +1250,6 @@ void resume()
struct disp_device* dispdev = NULL;
struct list_head* disp_list= NULL;
pr_info("%s\n", __func__);
@ -201,7 +199,7 @@ index 7ad900b..27f56c6 100755
num_screens = bsp_disp_feat_get_num_screens();
disp_list = disp_device_get_list_head();
@@ -1186,13 +1265,15 @@ void resume()
@@ -1186,13 +1263,15 @@ void resume()
mgr = g_disp_drv.mgr[screen_id];
if(!mgr || !mgr->device)
continue;
@ -220,7 +218,7 @@ index 7ad900b..27f56c6 100755
mgr->device->backlight_enable(mgr->device);
}
} else if(suspend_output_type[screen_id] != DISP_OUTPUT_TYPE_NONE) {
@@ -1205,25 +1286,11 @@ void resume()
@@ -1205,25 +1284,11 @@ void resume()
}
}
@ -249,7 +247,7 @@ index 7ad900b..27f56c6 100755
pr_info("%s finish\n", __func__);
}
@@ -1237,30 +1304,120 @@ static struct early_suspend backlight_early_suspend_handler =
@@ -1237,30 +1302,120 @@ static struct early_suspend backlight_early_suspend_handler =
static int disp_suspend(struct platform_device *pdev, pm_message_t state)
{
@ -280,14 +278,14 @@ index 7ad900b..27f56c6 100755
+ }
+
+ /*suspend for all display device*/
+
+ disp_list = disp_device_get_list_head();
+ list_for_each_entry(dispdev_suspend, disp_list, list) {
+ if (dispdev_suspend->suspend) {
+ dispdev_suspend->suspend(dispdev_suspend);
+ }
+ }
+
+#else
+ pr_info("%s\n", __func__);
+ num_screens = bsp_disp_feat_get_num_screens();
@ -378,9 +376,4 @@ index 7ad900b..27f56c6 100755
return 0;
}
@@ -1783,4 +1940,3 @@ MODULE_DESCRIPTION("display driver");
MODULE_LICENSE("GPL");
MODULE_ALIAS("platform:disp");
-