[Armadeus-commitlog] SF.net SVN: armadeus:[1259] trunk/buildroot/target/device/armadeus/linux/ kern
Brought to you by:
sszy
|
From: <ar...@us...> - 2009-05-06 16:22:21
|
Revision: 1259
http://armadeus.svn.sourceforge.net/armadeus/?rev=1259&view=rev
Author: artemys
Date: 2009-05-06 16:21:57 +0000 (Wed, 06 May 2009)
Log Message:
-----------
[LINUX] Add init/exit gpios to imxfb (2.6.29)
Modified Paths:
--------------
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/021-armadeus-apf9328.patch
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/294b-apf27-armadeus-imxfb-create_imxfb_h.patch
Added Paths:
-----------
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/016-armadeus-imxfb-add_platform_specific_init_exit_functions.patch
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/323-pengu-imxfb-add_platform_specific_init_exit_functions.patch
Added: trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/016-armadeus-imxfb-add_platform_specific_init_exit_functions.patch
===================================================================
--- trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/016-armadeus-imxfb-add_platform_specific_init_exit_functions.patch (rev 0)
+++ trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/016-armadeus-imxfb-add_platform_specific_init_exit_functions.patch 2009-05-06 16:21:57 UTC (rev 1259)
@@ -0,0 +1,21 @@
+
+This patch will have to be removed when MX1 platform will be functionnal.
+(redundant with 323-xxxxx.patch)
+
+Signed-off-by: Julien Boibessot <jul...@ar...>
+---
+
+diff --git a/arch/arm/mach-imx/include/mach/imxfb.h b/arch/arm/mach-imx/include/mach/imxfb.h
+index 870d0d9..762a7b0 100644
+--- a/arch/arm/mach-imx/include/mach/imxfb.h
++++ b/arch/arm/mach-imx/include/mach/imxfb.h
+@@ -76,6 +76,9 @@ struct imx_fb_platform_data {
+ u_char * fixed_screen_cpu;
+ dma_addr_t fixed_screen_dma;
+
++ int (*init)(struct platform_device*);
++ int (*exit)(struct platform_device*);
++
+ void (*lcd_power)(int);
+ void (*backlight_power)(int);
+ };
Modified: trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/021-armadeus-apf9328.patch
===================================================================
--- trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/021-armadeus-apf9328.patch 2009-05-06 14:33:17 UTC (rev 1258)
+++ trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/021-armadeus-apf9328.patch 2009-05-06 16:21:57 UTC (rev 1259)
@@ -4,8 +4,8 @@
Index: linux-2.6.29/arch/arm/mach-imx/apf9328.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.29/arch/arm/mach-imx/apf9328.c 2009-05-01 11:35:08.000000000 +0200
-@@ -0,0 +1,788 @@
++++ linux-2.6.29/arch/arm/mach-imx/apf9328.c 2009-05-06 18:00:37.000000000 +0200
+@@ -0,0 +1,787 @@
+/*
+ * linux/arch/arm/mach-imx/apf9328.c
+ *
@@ -719,7 +719,6 @@
+
+#ifdef CONFIG_FB_IMX /* LCD */
+ set_imx_fb_info(&apf9328_fb_info);
-+ imx_fb_set_gpios(&apf9328_fb_info); /* init PORTD ....*/
+#endif
+#ifdef CONFIG_CAN_MCP251X
+ mcp251X_init_gpio();
@@ -797,8 +796,8 @@
Index: linux-2.6.29/arch/arm/mach-imx/apf9328_lcd_config.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.29/arch/arm/mach-imx/apf9328_lcd_config.h 2009-05-01 10:16:10.000000000 +0200
-@@ -0,0 +1,263 @@
++++ linux-2.6.29/arch/arm/mach-imx/apf9328_lcd_config.h 2009-05-06 18:01:27.000000000 +0200
+@@ -0,0 +1,278 @@
+/*
+ *
+ * Armadeus LCD configuration file
@@ -829,6 +828,10 @@
+
+#define DEFAULT_DMA_SETTINGS (DMACR_BURST | DMACR_HM(8) | DMACR_TM(4))
+
++
++static int imx_fb_gpios_init(struct platform_device *pdev);
++static int imx_fb_gpios_exit(struct platform_device *pdev);
++
+/*
+ * Power on/off LCD's internal logic
+ */
@@ -890,7 +893,7 @@
+}
+
+
-+static struct imx_fb_platform_data apf9328_fb_info __initdata = {
++static struct imx_fb_platform_data apf9328_fb_info /*__initdata*/ = {
+#ifdef CONFIG_FB_IMX_SHARP_LQ043_TFT
+ .pixclock = 62500,
+ .bpp = 16,
@@ -985,13 +988,16 @@
+#else
+#error Please define a imxfb_mach_info structure with your LCD parameters here
+#endif
++ .init = imx_fb_gpios_init,
++ .exit = imx_fb_gpios_exit,
+};
+
+/*
+ * Configure all GPIOs needed by LCDs
+ */
-+static void imx_fb_set_gpios(struct imx_fb_platform_data *fb_inf)
++static int imx_fb_gpios_init(struct platform_device *pdev)
+{
++ struct imx_fb_platform_data *fb_inf = &apf9328_fb_info;
+ int width;
+
+ pr_debug("%s\n", __func__);
@@ -1057,15 +1063,23 @@
+ /* GPIO Function for CONTRAST pin */
+ imx_gpio_mode(CONTRAST_LINE | GPIO_OUT | GPIO_GIUS | GPIO_DR);
+ }
++
++ return 0;
+}
+
++static int imx_fb_gpios_exit(struct platform_device *pdev)
++{
++ /* TO BE DONE */
++ return 0;
++}
++
+#endif /* CONFIG_FB_IMX */
+
+#endif /* APF9328_LCD_CONFIG_H */
Index: linux-2.6.29/arch/arm/mach-imx/include/mach/apf9328.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.29/arch/arm/mach-imx/include/mach/apf9328.h 2009-05-01 10:16:10.000000000 +0200
++++ linux-2.6.29/arch/arm/mach-imx/include/mach/apf9328.h 2009-05-06 18:00:37.000000000 +0200
@@ -0,0 +1,63 @@
+/*
+ * linux/include/asm-arm/arch-imx/apf9328.h
Modified: trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/294b-apf27-armadeus-imxfb-create_imxfb_h.patch
===================================================================
--- trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/294b-apf27-armadeus-imxfb-create_imxfb_h.patch 2009-05-06 14:33:17 UTC (rev 1258)
+++ trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/294b-apf27-armadeus-imxfb-create_imxfb_h.patch 2009-05-06 16:21:57 UTC (rev 1259)
@@ -2,12 +2,11 @@
Will have to be replaced when merging i.MX1 & i.MX2/3 framebuffer drivers
---
-diff --git a/arch/arm/plat-mxc/include/mach/imxfb.h b/arch/arm/plat-mxc/include/mach/imxfb.h
-new file mode 100644
-index 0000000..9179e90
---- /dev/null
-+++ b/arch/arm/plat-mxc/include/mach/imxfb.h
-@@ -0,0 +1,85 @@
+Index: linux-2.6.29/arch/arm/plat-mxc/include/mach/imxfb.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.29/arch/arm/plat-mxc/include/mach/imxfb.h 2009-05-06 16:31:22.000000000 +0200
+@@ -0,0 +1,83 @@
+/*
+ * This structure describes the machine which we are running on.
+ */
@@ -86,8 +85,6 @@
+ u_char * fixed_screen_cpu;
+ dma_addr_t fixed_screen_dma;
+
-+ int (*init)(struct platform_device*);
-+ int (*exit)(struct platform_device*);
+ void (*lcd_power)(int);
+ void (*backlight_power)(int);
+};
Added: trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/323-pengu-imxfb-add_platform_specific_init_exit_functions.patch
===================================================================
--- trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/323-pengu-imxfb-add_platform_specific_init_exit_functions.patch (rev 0)
+++ trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/323-pengu-imxfb-add_platform_specific_init_exit_functions.patch 2009-05-06 16:21:57 UTC (rev 1259)
@@ -0,0 +1,70 @@
+From: Sascha Hauer <s....@pe...>
+Date: Thu, 15 Jan 2009 14:37:22 +0000 (+0100)
+Subject: imxfb: add platform specific init/exit functions
+X-Git-Url: http://pasiphae.extern.pengutronix.de/?p=imx%2Flinux-2.6.git;a=commitdiff_plain;h=563d8a4c0ab788043aaf8b41e406b645fdcb51f9
+
+imxfb: add platform specific init/exit functions
+
+Signed-off-by: Sascha Hauer <s....@pe...>
+---
+
+Index: linux-2.6.29/arch/arm/plat-mxc/include/mach/imxfb.h
+===================================================================
+--- linux-2.6.29.orig/arch/arm/plat-mxc/include/mach/imxfb.h 2009-05-06 16:31:53.000000000 +0200
++++ linux-2.6.29/arch/arm/plat-mxc/include/mach/imxfb.h 2009-05-06 16:31:53.000000000 +0200
+@@ -76,6 +76,9 @@
+ u_char * fixed_screen_cpu;
+ dma_addr_t fixed_screen_dma;
+
++ int (*init)(struct platform_device*);
++ int (*exit)(struct platform_device*);
++
+ void (*lcd_power)(int);
+ void (*backlight_power)(int);
+ };
+Index: linux-2.6.29/drivers/video/imxfb.c
+===================================================================
+--- linux-2.6.29.orig/drivers/video/imxfb.c 2009-05-06 16:23:38.000000000 +0200
++++ linux-2.6.29/drivers/video/imxfb.c 2009-05-06 16:31:53.000000000 +0200
+@@ -651,6 +651,12 @@
+ info->fix.smem_start = fbi->screen_dma;
+ }
+
++ if (pdata->init) {
++ ret = pdata->init(fbi->pdev);
++ if (ret)
++ goto failed_platform_init;
++ }
++
+ /*
+ * This makes sure that our colour bitfield
+ * descriptors are correctly initialised.
+@@ -681,6 +687,9 @@
+ failed_register:
+ fb_dealloc_cmap(&info->cmap);
+ failed_cmap:
++ if (pdata->exit)
++ pdata->exit(fbi->pdev);
++failed_platform_init:
+ if (!pdata->fixed_screen_cpu)
+ dma_free_writecombine(&pdev->dev,fbi->map_size,fbi->map_cpu,
+ fbi->map_dma);
+@@ -698,6 +707,7 @@
+
+ static int __devexit imxfb_remove(struct platform_device *pdev)
+ {
++ struct imx_fb_platform_data *pdata;
+ struct fb_info *info = platform_get_drvdata(pdev);
+ struct imxfb_info *fbi = info->par;
+ struct resource *res;
+@@ -708,6 +718,10 @@
+
+ unregister_framebuffer(info);
+
++ pdata = pdev->dev.platform_data;
++ if (pdata->exit)
++ pdata->exit(fbi->pdev);
++
+ fb_dealloc_cmap(&info->cmap);
+ kfree(info->pseudo_palette);
+ framebuffer_release(info);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|