[Armadeus-commitlog] armadeus branch, master, updated. release-3.3-291-g532662d
Brought to you by:
sszy
|
From: Julien B a. A. <ar...@us...> - 2011-02-08 21:28:38
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "armadeus".
The branch, master has been updated
via 532662d1142719b90f7ccd1c381e4b7015d8e6a4 (commit)
via f93797395b4bad52b2adb8c63b7949cd9ee41c42 (commit)
via f3e8d809dd06f79982a0b30efac59889d35a5cae (commit)
from 974fb11c2a59d4ce4ce9f9263a1d8f68ee62d0e2 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 532662d1142719b90f7ccd1c381e4b7015d8e6a4
Merge: f93797395b4bad52b2adb8c63b7949cd9ee41c42 974fb11c2a59d4ce4ce9f9263a1d8f68ee62d0e2
Author: Julien Boibessot <jul...@ar...>
Date: Tue Feb 8 22:27:39 2011 +0100
Merge branch 'master' of ssh://artemys@armadeus.git.sourceforge.net/gitroot/armadeus/armadeus
Conflicts:
buildroot/target/device/armadeus/linux/kernel-patches/2.6.38/281-apf27-armadeus-add_apf27.c.patch
commit f93797395b4bad52b2adb8c63b7949cd9ee41c42
Author: Julien Boibessot <jul...@ar...>
Date: Tue Feb 8 21:53:41 2011 +0100
[LINUX] 2.6.38: Now LCD type can be fully passed as boot parameters (tested on APF27)
commit f3e8d809dd06f79982a0b30efac59889d35a5cae
Author: Julien Boibessot <jul...@ar...>
Date: Mon Feb 7 19:32:45 2011 +0100
[LINUX] 2.6.29 patches cleanup
-----------------------------------------------------------------------
Summary of changes:
...093-armadeus-add_ssi_registers_definition.patch | 16 --
...352-armadeus-time-fix_timekeeping_resume.patch} | 0
.../2.6.38/021-armadeus-apf9328.patch | 124 ++++++------
.../2.6.38/023-armadeus-fblcd-kconfig.patch | 83 --------
.../2.6.38/281-apf27-armadeus-add_apf27.c.patch | 198 +++++++-------------
5 files changed, 131 insertions(+), 290 deletions(-)
delete mode 100644 buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/093-armadeus-add_ssi_registers_definition.patch
rename buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/{352-armadeus-timekeeping.patch => 352-armadeus-time-fix_timekeeping_resume.patch} (100%)
delete mode 100644 buildroot/target/device/armadeus/linux/kernel-patches/2.6.38/023-armadeus-fblcd-kconfig.patch
diff --git a/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/093-armadeus-add_ssi_registers_definition.patch b/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/093-armadeus-add_ssi_registers_definition.patch
deleted file mode 100644
index 7671a09..0000000
--- a/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/093-armadeus-add_ssi_registers_definition.patch
+++ /dev/null
@@ -1,16 +0,0 @@
---- linux-org/arch/arm/mach-imx/include/mach/imx-regs.h 2008-07-18 18:51:40.000000000 +0200
-+++ linux/arch/arm/mach-imx/include/mach/imx-regs.h 2008-07-18 09:55:17.000000000 +0200
-@@ -316,11 +316,12 @@
- #define RTOR(x) __REG2( IMX_DMAC_BASE + 0x98, (x) << 6) /* Request timeout Registers */
- #define BUCR(x) __REG2( IMX_DMAC_BASE + 0x98, (x) << 6) /* Bus Utilization Registers */
-
-+#define MAX_DMA_CNTR (0xffffff)
- #define DCR_DRST (1<<1)
- #define DCR_DEN (1<<0)
- #define DBTOCR_EN (1<<15)
- #define DBTOCR_CNT(x) ((x) & 0x7fff )
--#define CNTR_CNT(x) ((x) & 0xffffff )
-+#define CNTR_CNT(x) ((x) & MAX_DMA_CNTR )
- #define CCR_DMOD_LINEAR ( 0x0 << 12 )
- #define CCR_DMOD_2D ( 0x1 << 12 )
- #define CCR_DMOD_FIFO ( 0x2 << 12 )
diff --git a/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/352-armadeus-timekeeping.patch b/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/352-armadeus-time-fix_timekeeping_resume.patch
similarity index 100%
rename from buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/352-armadeus-timekeeping.patch
rename to buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/352-armadeus-time-fix_timekeeping_resume.patch
diff --git a/buildroot/target/device/armadeus/linux/kernel-patches/2.6.38/021-armadeus-apf9328.patch b/buildroot/target/device/armadeus/linux/kernel-patches/2.6.38/021-armadeus-apf9328.patch
index 02a964c..4a2164d 100644
--- a/buildroot/target/device/armadeus/linux/kernel-patches/2.6.38/021-armadeus-apf9328.patch
+++ b/buildroot/target/device/armadeus/linux/kernel-patches/2.6.38/021-armadeus-apf9328.patch
@@ -1,7 +1,7 @@
Index: linux-2.6.38-rc3/arch/arm/mach-imx/apf9328.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.38-rc3/arch/arm/mach-imx/apf9328.c 2011-02-07 09:30:20.000000000 +0100
++++ linux-2.6.38-rc3/arch/arm/mach-imx/apf9328.c 2011-02-08 19:33:09.000000000 +0100
@@ -0,0 +1,587 @@
+/*
+ * linux/arch/arm/mach-imx/apf9328.c
@@ -593,7 +593,7 @@ Index: linux-2.6.38-rc3/arch/arm/mach-imx/apf9328.c
Index: linux-2.6.38-rc3/arch/arm/mach-imx/apf9328_lcd_config.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.38-rc3/arch/arm/mach-imx/apf9328_lcd_config.h 2011-02-07 11:01:05.000000000 +0100
++++ linux-2.6.38-rc3/arch/arm/mach-imx/apf9328_lcd_config.h 2011-02-08 21:42:50.000000000 +0100
@@ -0,0 +1,329 @@
+/*
+ *
@@ -642,9 +642,14 @@ Index: linux-2.6.38-rc3/arch/arm/mach-imx/apf9328_lcd_config.h
+
+#ifdef CONFIG_MACH_APF9328
+static int apf9328_fb_init(struct platform_device *pdev);
-+static void apf9328_fb_exit(struct platform_device *pdev);
+#endif
+
++char lcd_name[32];
++void apf_set_lcd_name(const char *name) {
++ printk(KERN_DEBUG "--- Setting LCD name to (%s)\n", name);
++ strlcpy(lcd_name, name, sizeof(lcd_name));
++}
++
+/*
+ * Power on/off LCD's internal logic
+ */
@@ -652,46 +657,47 @@ Index: linux-2.6.38-rc3/arch/arm/mach-imx/apf9328_lcd_config.h
+{
+ u32 isr;
+
-+ printk(KERN_DEBUG "%s: %s\n", __func__, on ? "on":"off");
++ printk(KERN_DEBUG "%s: %s, %s\n", __func__, on ? "on":"off", lcd_name);
+ isr = 0;
-+#ifdef CONFIG_FB_IMX_OPTREX_F51900_CSTN
-+ if (on)
-+ gpio_set_value(OPTREX_F51900_POWER_DOWN, 1);
-+ else
-+ gpio_set_value(OPTREX_F51900_POWER_DOWN, 0);
-+#elif defined(CONFIG_FB_IMX_MICROTIPS_MTF_T035_TFT)
-+ /* No LCD powerdown yet */
-+#elif defined(CONFIG_FB_IMX_SHARP_LQ043_TFT)
-+ if (on) {
-+ mdelay(200); /* at least ten frames have to be processed before
-+ enabling the display */
-+ /* Waits end of current frame */
-+ isr = readl(MXC_IO_ADDRESS(LCDC_BASE_ADDR) + 0x40);
-+ printk("isr %08x\n", isr);
-+ do {
++
++ if (!strcmp("Optrex-FS1900", lcd_name)) {
++ if (on)
++ gpio_set_value(OPTREX_F51900_POWER_DOWN, 1);
++ else
++ gpio_set_value(OPTREX_F51900_POWER_DOWN, 0);
++ } else if (!strcmp("Microtips-T035", lcd_name)) {
++ /* No LCD powerdown yet */
++ } else if (!strcmp("Sharp-LQ043", lcd_name)) {
++ if (on) {
++ mdelay(200); /* at least ten frames have to be processed before
++ enabling the display */
++ /* Waits end of current frame */
+ isr = readl(MXC_IO_ADDRESS(LCDC_BASE_ADDR) + 0x40);
+ printk("isr %08x\n", isr);
-+ udelay(1000);
-+ pr_debug("%08x\n", isr);
-+ } while ((isr & LCDISR_EOF) == 0);
-+
-+ gpio_set_value(SHARP_LQ043_POWER_DOWN, 1);
-+ mdelay(200);
++ do {
++ isr = readl(MXC_IO_ADDRESS(LCDC_BASE_ADDR) + 0x40);
++ pr_debug("isr %08x\n", isr);
++ udelay(1000);
++ pr_debug("%08x\n", isr);
++ } while ((isr & LCDISR_EOF) == 0);
++
++ gpio_set_value(SHARP_LQ043_POWER_DOWN, 1);
++ mdelay(200);
++ } else {
++ gpio_set_value(SHARP_LQ043_POWER_DOWN, 0);
++ mdelay(200); /* needs to wait 10 frames after DISP goes down
++ before shutting down LCDC (done in imxfb) */
++ }
++ } else if (!strcmp("Chimei-LW700AT9003", lcd_name)) {
++ /* No LCD powerdown yet */
+ } else {
-+ gpio_set_value(SHARP_LQ043_POWER_DOWN, 0);
-+ mdelay(200); /* needs to wait 10 frames after DISP goes down
-+ before shutting down LCDC (done in imxfb) */
++ /* All other cases: use CONTRAST as PWDN */
++ if (on) {
++ gpio_set_value(CONTRAST_LINE, 0);
++ } else {
++ gpio_set_value(CONTRAST_LINE, 1);
++ }
+ }
-+#elif defined(CONFIG_FB_IMX_CHIMEI_LW700AT9003_TFT)
-+ /* No LCD powerdown yet */
-+#else
-+ /* All other cases: use CONTRAST as PWDN */
-+ if (on) {
-+ gpio_set_value(CONTRAST_LINE, 0);
-+ } else {
-+ gpio_set_value(CONTRAST_LINE, 1);
-+ }
-+#endif
+}
+
+/*
@@ -815,30 +821,28 @@ Index: linux-2.6.38-rc3/arch/arm/mach-imx/apf9328_lcd_config.h
+ .dmacr = DEFAULT_DMA_SETTINGS,
+ .lcd_power = apf_lcd_power,
+ .backlight_power= apf_lcd_backlight_power,
-+#ifdef CONFIG_FB_IMX_SHARP_LQ043_TFT
-+ .pwmr = 0x000003ff, /* Contrast with PWM @ Pixel clock / 256, max width by default */
-+#elif defined(CONFIG_FB_IMX_MICROTIPS_MTF_T035_TFT)
-+ .pwmr = 0x00000150, /* Contrast with PWM @ Line Pulse / 256, medium width by default */
-+#elif defined(CONFIG_FB_IMX_SHARP_LQ057_TFT)
-+ .pwmr = 0, /* No contrast management */
-+#elif defined(CONFIG_FB_IMX_OPTREX_F51900_CSTN)
-+ .pwmr = 0, /* No contrast management */
-+#elif defined(CONFIG_FB_IMX_MOTOROLA_A910_TFT)
-+ .pwmr = 0, /* No contrast management */
-+#elif defined(CONFIG_FB_IMX_CHIMEI_LW700AT9003_TFT)
-+ .pwmr = 0x00a903ff, /* Contrast with PWM @ Pixel clock / 256, max width by default */
-+#else
-+#error Please define a imx_fb_platform_data structure with your LCD parameters
-+#endif
+#ifdef CONFIG_MACH_APF9328
-+ .init = apf9328_fb_init,
-+ .exit = apf9328_fb_exit,
++ .init = apf9328_fb_init,
+#elif CONFIG_MACH_APF27
+ .init = apf27_fb_init,
-+ .exit = apf27_fb_exit,
+#endif
+};
+
++void apf_fb_set_default_contrast(void /*char *name*/)
++{
++ if (!strcmp("Optrex-FS1900", lcd_name)) {
++ apf_fb_data.pwmr = 0; /* No contrast management */
++ } else if (!strcmp("Microtips-T035", lcd_name)) {
++ apf_fb_data.pwmr = 0x00000150; /* Contrast with PWM @ Line Pulse / 256, medium width by default */
++ } else if (!strcmp("Sharp-LQ043", lcd_name)) {
++ apf_fb_data.pwmr = 0x000003ff; /* Contrast with PWM @ Pixel clock / 256, max width by default */
++ } else if (!strcmp("Chimei-LW700AT9003", lcd_name)) {
++ apf_fb_data.pwmr = 0x00a903ff; /* Contrast with PWM @ Pixel clock / 256, max width by default */
++ } else {
++ apf_fb_data.pwmr = 0; /* No contrast management */
++ }
++}
++
+/*
+ * Configure all GPIOs needed by LCDs
+ */
@@ -911,10 +915,6 @@ Index: linux-2.6.38-rc3/arch/arm/mach-imx/apf9328_lcd_config.h
+ return 0;
+}
+
-+static void apf9328_fb_exit(struct platform_device *pdev)
-+{
-+ /* TO BE DONE */
-+}
+static void apf9328_init_lcd(void)
+{
+ mxc_register_device(&mxc_fb_device, &apf_fb_data);
@@ -927,7 +927,7 @@ Index: linux-2.6.38-rc3/arch/arm/mach-imx/apf9328_lcd_config.h
Index: linux-2.6.38-rc3/arch/arm/plat-mxc/include/mach/board-apf9328.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.38-rc3/arch/arm/plat-mxc/include/mach/board-apf9328.h 2011-02-07 09:30:20.000000000 +0100
++++ linux-2.6.38-rc3/arch/arm/plat-mxc/include/mach/board-apf9328.h 2011-02-08 19:33:09.000000000 +0100
@@ -0,0 +1,71 @@
+/*
+ * linux/include/asm-arm/arch-imx/apf9328.h
@@ -1003,7 +1003,7 @@ Index: linux-2.6.38-rc3/arch/arm/plat-mxc/include/mach/board-apf9328.h
Index: linux-2.6.38-rc3/arch/arm/mach-imx/apf9328-dev.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.38-rc3/arch/arm/mach-imx/apf9328-dev.c 2011-02-07 09:30:20.000000000 +0100
++++ linux-2.6.38-rc3/arch/arm/mach-imx/apf9328-dev.c 2011-02-08 19:33:09.000000000 +0100
@@ -0,0 +1,325 @@
+/*
+ * apf9328-dev.c
diff --git a/buildroot/target/device/armadeus/linux/kernel-patches/2.6.38/023-armadeus-fblcd-kconfig.patch b/buildroot/target/device/armadeus/linux/kernel-patches/2.6.38/023-armadeus-fblcd-kconfig.patch
deleted file mode 100644
index 9abc9db..0000000
--- a/buildroot/target/device/armadeus/linux/kernel-patches/2.6.38/023-armadeus-fblcd-kconfig.patch
+++ /dev/null
@@ -1,83 +0,0 @@
---- a/drivers/video/Kconfig 2010-10-20 22:30:22.000000000 +0200
-+++ b/drivers/video/Kconfig 2010-12-16 12:46:56.000000000 +0100
-@@ -410,6 +410,80 @@
- select FB_CFB_COPYAREA
- select FB_CFB_IMAGEBLIT
-
-+choice
-+ depends on FB_IMX || FB_MXC
-+ prompt "LCD Panel"
-+ default FB_IMX_SHARP_LQ043_TFT
-+
-+# Please order LCDs by constructor alphabetical order !
-+
-+config FB_IMX_CHIMEI_LW700AT9003_TFT
-+ bool "Chimei LW700AT9003"
-+ depends on MACH_APF27
-+ help
-+ Chimei LW700AT9003, a 7" 18 bits, TFT panel.
-+ The native resolution is 800x600.
-+
-+config FB_IMX_HITACHI_TX12D17VM1BDP_TFT
-+ bool "Hitachi TX12D17VM1BDP"
-+ depends on MACH_APF27
-+ help
-+ HITACHI_TX12D17VM1BDP, a 5.7" 18 bits, TFT panel.
-+ The native resolution is 640x480.
-+
-+config FB_IMX_MICROTIPS_MTF_T035_TFT
-+ bool "Microtips MTF-T035"
-+ depends on MACH_APF9328
-+ help
-+ Microtips MTF-T035, a 3.5" 24 bits color 320x240, TFT panel.
-+ The native resolution is 320x240.
-+
-+config FB_IMX_MOTOROLA_A910_TFT
-+ bool "Motorola A910 TFT"
-+ depends on MACH_APF9328
-+ help
-+ Motorola A910 screen, a 1.2" color QVGA, TFT panel.
-+ The native resolution is 240x320.
-+
-+config FB_IMX_OPTREX_F51900_CSTN
-+ bool "Optrex F-51900"
-+ depends on MACH_APF9328
-+ help
-+ Optrex 5.7" 8 bits color STN.
-+ The native resolution is 320x240.
-+
-+config FB_IMX_OPTREX_T51638D084_TFT
-+ bool "Optrex T51638D084"
-+ depends on MACH_APF27
-+ help
-+ OPTREX_T51638D084, a 8.4" 18 bits, TFT panel.
-+ The native resolution is 640x480.
-+
-+config FB_IMX_SHARP_LQ043_TFT
-+ bool "Sharp LQ043"
-+ help
-+ Sharp LQ043, a 4.3" 24 bits color 480x272, TFT panel.
-+ The native resolution is 480x272.
-+
-+config FB_IMX_SHARP_LQ057_TFT
-+ bool "Sharp LQ057"
-+ help
-+ Sharp LQ057, a 3.5" 18 bits color QVGA, TFT panel.
-+ The native resolution is 320x240.
-+
-+# Please let the following entry always in last position:
-+config FB_IMX_CUSTOM_LCD
-+ bool "Custom LCD"
-+ depends on MACH_APF27
-+ help
-+ Freely hackable LCD. Modify its parameters directly in
-+ drivers/video/mxc/mxcfb_modedb.c.
-+
-+# Please let these
-+# two lines here
-+
-+endchoice
-+
- config FB_CYBER2000
- tristate "CyberPro 2000/2010/5000 support"
- depends on FB && PCI && (BROKEN || !SPARC64)
diff --git a/buildroot/target/device/armadeus/linux/kernel-patches/2.6.38/281-apf27-armadeus-add_apf27.c.patch b/buildroot/target/device/armadeus/linux/kernel-patches/2.6.38/281-apf27-armadeus-add_apf27.c.patch
index 3622735..7d93a8c 100644
--- a/buildroot/target/device/armadeus/linux/kernel-patches/2.6.38/281-apf27-armadeus-add_apf27.c.patch
+++ b/buildroot/target/device/armadeus/linux/kernel-patches/2.6.38/281-apf27-armadeus-add_apf27.c.patch
@@ -154,8 +154,8 @@ Index: linux-2.6.38-rc3/arch/arm/mach-imx/apf27.c
+
+ int rc = phy_read(phydev, LAN87xx_SPECIAL_REG);
+
-+ phy_write(phydev,LAN87xx_SPECIAL_REG, rc | 0xE0);
-+ phy_write(phydev,MII_BMCR, BMCR_RESET);
++ phy_write(phydev, LAN87xx_SPECIAL_REG, rc | 0xE0);
++ phy_write(phydev, MII_BMCR, BMCR_RESET);
+ udelay(1000);
+ return 0;
+}
@@ -693,7 +693,7 @@ Index: linux-2.6.38-rc3/arch/arm/mach-imx/apf27.c
+ /* APF27 has an onboard Ethernet PHY */
+#ifdef CONFIG_FEC
+ /* bring lan8700 out of power down mode */
-+ phy_register_fixup_for_id("1:1f", lan8700_wakeup );
++ phy_register_fixup_for_id("1:1f", lan8700_wakeup);
+ imx27_add_fec(NULL);
+#endif
+
@@ -760,8 +760,8 @@ Index: linux-2.6.38-rc3/arch/arm/mach-imx/apf27.c
Index: linux-2.6.38-rc3/arch/arm/mach-imx/apf27-dev.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.38-rc3/arch/arm/mach-imx/apf27-dev.c 2011-02-07 16:56:02.000000000 +0100
-@@ -0,0 +1,935 @@
++++ linux-2.6.38-rc3/arch/arm/mach-imx/apf27-dev.c 2011-02-08 09:46:00.000000000 +0100
+@@ -0,0 +1,933 @@
+ /*
+ * apf27-dev.c
+ * Support for AFP27 module's development baseboard
@@ -1630,10 +1630,8 @@ Index: linux-2.6.38-rc3/arch/arm/mach-imx/apf27-dev.c
+
+ imx27_add_imx_ssi(0, &apf27_ssi0_pdata);
+
-+#if defined(CONFIG_FB_MXC) || defined(CONFIG_FB_IMX)
+ /* APF27Dev has an LCD connector */
+ apf27_lcd_init();
-+#endif
+
+ apf27dev_pwr_ctrl_gpio_active();
+
@@ -1700,14 +1698,14 @@ Index: linux-2.6.38-rc3/arch/arm/mach-imx/apf27-dev.c
Index: linux-2.6.38-rc3/arch/arm/mach-imx/apf27-lcd.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.38-rc3/arch/arm/mach-imx/apf27-lcd.c 2011-02-07 16:56:02.000000000 +0100
-@@ -0,0 +1,226 @@
++++ linux-2.6.38-rc3/arch/arm/mach-imx/apf27-lcd.c 2011-02-08 17:38:31.000000000 +0100
+@@ -0,0 +1,168 @@
+/*
+ * apf27-lcd.c
+ *
+ * Handle support of multiple LCDs on the APF27Dev
+ *
-+ * Copyright (C) 2009 Armadeus Systems
++ * Copyright (C) 2009-2011 Armadeus Systems
+ * Authors: Julien Boibessot <jul...@ar...>
+ * Nicolas Colombain <nic...@ar...>
+ *
@@ -1739,58 +1737,36 @@ Index: linux-2.6.38-rc3/arch/arm/mach-imx/apf27-lcd.c
+
+#include "devices-imx27.h"
+
-+#ifdef CONFIG_IMX_BACKLIGHT_MODULE
-+#define CONFIG_IMX_BACKLIGHT
-+#endif
-+
-+#ifdef CONFIG_FB_IMX_OPTREX_T51638D084_TFT
-+# define LCD_NAME "Optrex-T51638D084"
-+/* PS is used as LCD Display ON/OFF */
-+# define LCD_USES_PS_AS_GPIO
-+/* activates LCD at startup */
-+# define LCD_POWER_GPIO (GPIO_PORTA | 26)
-+# define LCD_POWER_ON (1)
-+#endif
++static int apf27_fb_init(struct platform_device*);
+
-+#ifdef CONFIG_FB_IMX_SHARP_LQ057_TFT
-+# define LCD_NAME "Sharp-LQ057"
-+/* CONTRAST is used as backlight's ON/OFF */
-+# define LCD_USES_CONTRAST_AS_GPIO
-+/* activates backlight at startup */
-+# define LCD_BACKLIGHT_GPIO (GPIO_PORTA | 30)
-+# define LCD_BACKLIGHT_ON (0)
-+#endif
-+
-+#ifdef CONFIG_FB_IMX_SHARP_LQ043_TFT
-+# define LCD_NAME "Sharp-LQ043"
-+/* OE_ACD is used as LCD Display ON/OFF */
-+# define LCD_USES_OE_ACD_AS_GPIO
-+/* activates LCD at startup */
-+# define LCD_POWER_GPIO (GPIO_PORTA | 31)
-+# define LCD_POWER_ON (1)
-+#endif
-+
-+#ifdef CONFIG_FB_IMX_CHIMEI_LW700AT9003_TFT
-+# define LCD_NAME "Chimei-LW700AT9003"
-+#endif
-+
-+#ifdef CONFIG_FB_IMX_HITACHI_TX12D17VM1BDP_TFT
-+# define LCD_NAME "Hitachi-TX12D17VM1BDP"
-+#endif
-+
-+/* Please always let the custom LCD in this (last) position: */
-+#ifdef CONFIG_FB_IMX_CUSTOM_LCD
-+# define LCD_NAME "Custom" /* Clone of LQ043 by default */
-+/* OE_ACD is used as LCD Display ON/OFF */
-+# define LCD_USES_OE_ACD_AS_GPIO
-+/* activates LCD at startup */
-+# define LCD_POWER_GPIO (GPIO_PORTA | 31)
-+# define LCD_POWER_ON (1)
-+#endif
++static void apf_lcd_custom_init(const char *name)
++{
++ if (!name)
++ return;
++
++ if (!strcmp("Optrex-T51638D084", name)) {
++ /* Activates LCD at startup: PS is used as LCD Display ON/OFF */
++ gpio_set_value((GPIO_PORTA | 26), 1);
++ mxc_gpio_mode(GPIO_PORTA | 26 | GPIO_OUT | GPIO_GPIO);
++ } else if (!strcmp("Sharp-LQ057", name)) {
++ /* Activates backlight at startup: CONTRAST is used as backlight's ON/OFF */
++ gpio_set_value((GPIO_PORTA | 30), 0);
++ mxc_gpio_mode(GPIO_PORTA | 30 | GPIO_OUT | GPIO_GPIO);
++ } else if (!strcmp("Sharp-LQ043", name)) {
++ /* Activates LCD at startup: OE_ACD is used as LCD Display ON/OFF */
++ gpio_set_value((GPIO_PORTA | 31), 1);
++ mxc_gpio_mode(GPIO_PORTA | 31 | GPIO_OUT | GPIO_GPIO);
++ } else if (!strcmp("Custom", name)) {
++ /* Please always let the custom LCD in this (last) position: */
++ ;
++ } else {
++ /* "Chimei-LW700AT9003" / "Hitachi-TX12D17VM1BDP" */
++ ;
++ }
+/* Please let these 2 lines here
+*/
++}
+
-+#if defined(CONFIG_FB_MXC) || defined(CONFIG_FB_IMX)
+static int mxc_lcd_pins[] = {
+ PA5_PF_LSCLK,
+ PA6_PF_LD0,
@@ -1813,95 +1789,40 @@ Index: linux-2.6.38-rc3/arch/arm/mach-imx/apf27-lcd.c
+ PA23_PF_LD17,
+ PA24_PF_REV,
+ PA25_PF_CLS,
-+#ifdef LCD_USES_PS_AS_GPIO
-+ (GPIO_PORTA | 26 | GPIO_OUT | GPIO_GPIO),
-+#else
+ PA26_PF_PS,
-+#endif
+ PA27_PF_SPL_SPR,
+ PA28_PF_HSYNC,
+ PA29_PF_VSYNC,
-+#ifdef LCD_USES_CONTRAST_AS_GPIO
-+ (GPIO_PORTA | 30 | GPIO_OUT | GPIO_GPIO),
-+#else
+ PA30_PF_CONTRAST,
-+#endif
-+#ifdef LCD_USES_OE_ACD_AS_GPIO
-+ (GPIO_PORTA | 31 | GPIO_OUT | GPIO_GPIO)
-+#else
+ PA31_PF_OE_ACD
-+#endif
+};
+
-+static int apf27_fb_init(struct platform_device *pdev)
-+{
-+#ifdef CONFIG_FB_MXC
-+# ifdef LCD_POWER_GPIO
-+ /* activates LCD power at startup */
-+ gpio_set_value(LCD_POWER_GPIO, LCD_POWER_ON);
-+# endif
-+# ifdef LCD_BACKLIGHT_GPIO
-+ /* activates backlight at startup */
-+ gpio_set_value(LCD_BACKLIGHT_GPIO, LCD_BACKLIGHT_ON);
-+# endif
-+#endif
-+
-+ return mxc_gpio_setup_multiple_pins(mxc_lcd_pins, ARRAY_SIZE(mxc_lcd_pins), "LCD");
-+}
-+
-+#ifdef CONFIG_FB_MXC
-+static int
-+#else
-+static void
-+#endif
-+apf27_fb_exit(struct platform_device *pdev)
-+{
-+ mxc_gpio_release_multiple_pins(mxc_lcd_pins, ARRAY_SIZE(mxc_lcd_pins));
-+
-+#ifdef CONFIG_FB_MXC
-+ return 0;
-+#endif
-+}
-+
+/* Freescale driver */
+#ifdef CONFIG_FB_MXC
+static struct mxc_fb_platform_data apf_fb_data = {
+ .mode = LCD_NAME,
+ .init = apf27_fb_init,
-+ .exit = apf27_fb_exit,
+};
+/* Mainline driver */
+#elif CONFIG_FB_IMX
+#include "../mach-imx/apf9328_lcd_config.h"
+#endif
+
-+# ifdef CONFIG_IMX_BACKLIGHT
-+static struct imxbl_machinfo imx_bl_machinfo = {
-+ .max_intensity = 0xff,
-+ .default_intensity = 0x90,
-+ .limit_mask = 0x7f, /* when battery is low */
-+ /* set_bl_intensity = put a function here if you want to overload default one, */
-+};
-+
-+static struct platform_device imxbl_device = {
-+ .name = "imx-bl",
-+ .dev = {
-+ /* .parent = &imxfb_device.dev, crash kernel even if EXPORT_SYMBOL() is done in generic.c */
-+ .platform_data = &imx_bl_machinfo,
-+ },
-+ .id = 0,
-+};
-+# endif /* CONFIG_IMX_BACKLIGHT */
++static int apf27_fb_init(struct platform_device *pdev)
++{
++ int ret;
+
-+#endif /* CONFIG_FB_MXC || CONFIG_FB_IMX */
++ ret = mxc_gpio_setup_multiple_pins(mxc_lcd_pins,
++ ARRAY_SIZE(mxc_lcd_pins), "LCD");
++ if (ret)
++ return ret;
+
++ apf_lcd_custom_init(lcd_name);
+
-+#ifdef CONFIG_IMX_BACKLIGHT
-+static struct platform_device *platform_devices[] __initdata = {
-+ &imxbl_device,
-+};
-+#endif
++ return 0;
++}
+
++#ifdef CONFIG_FB_MXC
+void apf27_lcd_startup(void)
+{
+ int i;
@@ -1917,15 +1838,34 @@ Index: linux-2.6.38-rc3/arch/arm/mach-imx/apf27-lcd.c
+ /* wait a few milli */
+ mdelay(100);
+}
++#endif
+
+void apf27_lcd_init(void)
+{
-+#ifdef CONFIG_IMX_BACKLIGHT
-+ platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices));
++ char *opt, *name = NULL, *options = NULL;
++
++ if (fb_get_options("imxfb", &options))
++ goto end;
++
++ if (!options || !*options)
++ goto end;
++
++ while ((opt = strsep(&options, ",")) != NULL) {
++ if (!*opt)
++ continue;
++ else
++ name = opt;
++ }
++
++#ifdef CONFIG_FB_MXC
++ apf27_lcd_startup();
+#endif
-+#if defined(CONFIG_FB_MXC) || defined(CONFIG_FB_IMX)
++ apf_set_lcd_name(name);
++ apf_fb_set_default_contrast();
++
+ imx27_add_imx_fb(&apf_fb_data);
-+#endif
++end:
++ return;
+}
+
Index: linux-2.6.38-rc3/arch/arm/mach-imx/apf27-dev-ext-apw.c
@@ -2126,7 +2066,7 @@ Index: linux-2.6.38-rc3/arch/arm/mach-imx/apf27-dev-ext-apw.c
Index: linux-2.6.38-rc3/arch/arm/plat-mxc/include/mach/uncompress.h
===================================================================
--- linux-2.6.38-rc3.orig/arch/arm/plat-mxc/include/mach/uncompress.h 2011-02-01 04:05:49.000000000 +0100
-+++ linux-2.6.38-rc3/arch/arm/plat-mxc/include/mach/uncompress.h 2011-02-07 17:05:16.000000000 +0100
++++ linux-2.6.38-rc3/arch/arm/plat-mxc/include/mach/uncompress.h 2011-02-08 18:23:26.000000000 +0100
@@ -83,6 +83,7 @@
case MACH_TYPE_MX21ADS:
case MACH_TYPE_PCA100:
hooks/post-receive
--
armadeus
|