From 67424bfb2b9cef518b66e890918a8658b100ed5d Mon Sep 17 00:00:00 2001 From: Thomas Kaiser Date: Wed, 24 Feb 2016 14:58:09 +0100 Subject: [PATCH] Fixed SD card detection and display init stuff --- config/orangepi2.fex | 2 +- config/orangepilite.fex | 2 +- config/orangepione.fex | 2 +- config/orangepipc.fex | 2 +- config/orangepiplus.fex | 2 +- .../0006-h3-videomode-cmdline.patch | 35 ++++++++----------- 6 files changed, 19 insertions(+), 26 deletions(-) diff --git a/config/orangepi2.fex b/config/orangepi2.fex index bb25723a21..2928d6f918 100644 --- a/config/orangepi2.fex +++ b/config/orangepi2.fex @@ -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> sdc_cmd = port:PF03<2><1><2> diff --git a/config/orangepilite.fex b/config/orangepilite.fex index 04b9d4d782..d40009b616 100644 --- a/config/orangepilite.fex +++ b/config/orangepilite.fex @@ -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> sdc_cmd = port:PF03<2><1><2> diff --git a/config/orangepione.fex b/config/orangepione.fex index 522ac61ca9..4cb4ea1dc5 100644 --- a/config/orangepione.fex +++ b/config/orangepione.fex @@ -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> sdc_cmd = port:PF03<2><1><2> diff --git a/config/orangepipc.fex b/config/orangepipc.fex index b11066f6de..0cc4da33f3 100644 --- a/config/orangepipc.fex +++ b/config/orangepipc.fex @@ -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> sdc_cmd = port:PF03<2><1><2> diff --git a/config/orangepiplus.fex b/config/orangepiplus.fex index aad46014f8..cab2ce9e99 100644 --- a/config/orangepiplus.fex +++ b/config/orangepiplus.fex @@ -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> sdc_cmd = port:PF03<2><1><2> diff --git a/patch/kernel/sun8i-default/0006-h3-videomode-cmdline.patch b/patch/kernel/sun8i-default/0006-h3-videomode-cmdline.patch index 3511d65a60..ade7f41d4a 100644 --- a/patch/kernel/sun8i-default/0006-h3-videomode-cmdline.patch +++ b/patch/kernel/sun8i-default/0006-h3-videomode-cmdline.patch @@ -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"); - --