summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Jansa <Martin.Jansa@gmail.com>2010-05-17 12:53:23 +0200
committerMartin Jansa <Martin.Jansa@gmail.com>2010-05-17 13:40:02 +0200
commit98bed2876d7dd88cc25f1c70929f1d632b8f95ee (patch)
tree25ed3bfcb309c15ff7fdef52a9733920a674afac
parent90fc51ebe1c85b8c539dcb3a62e44933b74b1649 (diff)
linux-openmoko-2.6.32: move to 2.6.32.13, add 2 more patches
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
-rw-r--r--recipes/linux/linux-openmoko-2.6.32/0025-Almost-make-rotation-work.patch212
-rw-r--r--recipes/linux/linux-openmoko-2.6.32/0025-pcf50633-fix-merge.patch28
-rw-r--r--recipes/linux/linux-openmoko-2.6.32/0026-gta02-defconfigs-enable-LEDS_S3C24XX.patch48
-rw-r--r--recipes/linux/linux-openmoko-2.6.32/0031-ar6000-minimise-possibility-of-race-in-ar6000_ioctl_.patch33
-rw-r--r--recipes/linux/linux-openmoko-2.6.32_git.bb8
5 files changed, 265 insertions, 64 deletions
diff --git a/recipes/linux/linux-openmoko-2.6.32/0025-Almost-make-rotation-work.patch b/recipes/linux/linux-openmoko-2.6.32/0025-Almost-make-rotation-work.patch
new file mode 100644
index 0000000000..84132c7649
--- /dev/null
+++ b/recipes/linux/linux-openmoko-2.6.32/0025-Almost-make-rotation-work.patch
@@ -0,0 +1,212 @@
+From 2f37934f81b3f46ad5c3dac6484a2c3c255066fc Mon Sep 17 00:00:00 2001
+From: Thomas White <taw@bitwiz.org.uk>
+Date: Wed, 28 Apr 2010 00:09:00 +0200
+Subject: [PATCH 27/27] Almost make rotation work
+
+Signed-off-by: Thomas White <taw@bitwiz.org.uk>
+---
+ drivers/mfd/glamo/glamo-display.c | 171 ++++++++++++++++++++++++++++---------
+ 1 files changed, 129 insertions(+), 42 deletions(-)
+
+diff --git a/drivers/mfd/glamo/glamo-display.c b/drivers/mfd/glamo/glamo-display.c
+index a551968..75ad734 100644
+--- a/drivers/mfd/glamo/glamo-display.c
++++ b/drivers/mfd/glamo/glamo-display.c
+@@ -298,6 +298,7 @@ static int glamo_crtc_mode_set(struct drm_crtc *crtc,
+ struct glamodrm_handle *gdrm;
+ struct glamo_crtc *gcrtc;
+ int retr_start, retr_end, disp_start, disp_end;
++ int rot;
+
+ /* Dig out our handle */
+ gcrtc = to_glamo_crtc(crtc);
+@@ -310,49 +311,135 @@ static int glamo_crtc_mode_set(struct drm_crtc *crtc,
+ msleep(500);
+ }
+
++ /* Rotate? */
++ if ( (mode->hdisplay == 640) && (mode->vdisplay == 480) ) {
++ rot = GLAMO_LCD_ROT_MODE_90;
++ } else if ( (mode->hdisplay == 480) && (mode->vdisplay == 640) ) {
++ rot = GLAMO_LCD_ROT_MODE_0;
++ } else if ( (mode->hdisplay == 320) && (mode->vdisplay == 240) ) {
++ rot = GLAMO_LCD_ROT_MODE_90;
++ } else if ( (mode->hdisplay == 240) && (mode->vdisplay == 320) ) {
++ rot = GLAMO_LCD_ROT_MODE_0;
++ } else {
++ printk(KERN_WARNING "[glamo-drm] Couldn't choose rotation.\n");
++ rot = GLAMO_LCD_ROT_MODE_0;
++ }
++
+ glamo_lcd_cmd_mode(gdrm, 1);
+
+- glamo_engine_reclock(gdrm->glamo_core, GLAMO_ENGINE_LCD, mode->clock);
+- gdrm->saved_clock = mode->clock;
++ /* Set dimensions */
++ if ( rot == GLAMO_LCD_ROT_MODE_0 ) {
++
++ glamo_engine_reclock(gdrm->glamo_core, GLAMO_ENGINE_LCD,
++ mode->clock);
++
++ reg_set_bit_mask_lcd(gdrm, GLAMO_REG_LCD_WIDTH,
++ GLAMO_LCD_WIDTH_MASK, mode->hdisplay);
++ reg_set_bit_mask_lcd(gdrm, GLAMO_REG_LCD_HEIGHT,
++ GLAMO_LCD_HEIGHT_MASK, mode->vdisplay);
++ reg_set_bit_mask_lcd(gdrm, GLAMO_REG_LCD_PITCH,
++ GLAMO_LCD_PITCH_MASK, mode->hdisplay*2);
++
++ /* Set rotation */
++ reg_set_bit_mask_lcd(gdrm, GLAMO_REG_LCD_WIDTH,
++ GLAMO_LCD_ROT_MODE_MASK, rot);
++ reg_set_bit_mask_lcd(gdrm, GLAMO_REG_LCD_MODE1,
++ GLAMO_LCD_MODE1_ROTATE_EN,
++ (rot != GLAMO_LCD_ROT_MODE_0) ?
++ GLAMO_LCD_MODE1_ROTATE_EN : 0);
++
++ /* Convert "X modeline timings" into "Glamo timings" */
++ retr_start = 0;
++ retr_end = retr_start + mode->hsync_end - mode->hsync_start;
++ disp_start = mode->htotal - mode->hsync_start;
++ disp_end = disp_start + mode->hdisplay;
++
++ reg_set_bit_mask_lcd(gdrm, GLAMO_REG_LCD_HORIZ_TOTAL,
++ GLAMO_LCD_HV_TOTAL_MASK, mode->htotal);
++ reg_set_bit_mask_lcd(gdrm, GLAMO_REG_LCD_HORIZ_RETR_START,
++ GLAMO_LCD_HV_RETR_START_MASK, retr_start);
++ reg_set_bit_mask_lcd(gdrm, GLAMO_REG_LCD_HORIZ_RETR_END,
++ GLAMO_LCD_HV_RETR_END_MASK, retr_end);
++ reg_set_bit_mask_lcd(gdrm, GLAMO_REG_LCD_HORIZ_DISP_START,
++ GLAMO_LCD_HV_RETR_DISP_START_MASK, disp_start);
++ reg_set_bit_mask_lcd(gdrm, GLAMO_REG_LCD_HORIZ_DISP_END,
++ GLAMO_LCD_HV_RETR_DISP_END_MASK, disp_end);
++
++ /* The same in the vertical direction */
++ retr_start = 0;
++ retr_end = retr_start + mode->vsync_end - mode->vsync_start;
++ disp_start = mode->vtotal - mode->vsync_start;
++ disp_end = disp_start + mode->vdisplay;
++ reg_set_bit_mask_lcd(gdrm, GLAMO_REG_LCD_VERT_TOTAL,
++ GLAMO_LCD_HV_TOTAL_MASK, mode->vtotal);
++ reg_set_bit_mask_lcd(gdrm, GLAMO_REG_LCD_VERT_RETR_START,
++ GLAMO_LCD_HV_RETR_START_MASK, retr_start);
++ reg_set_bit_mask_lcd(gdrm, GLAMO_REG_LCD_VERT_RETR_END,
++ GLAMO_LCD_HV_RETR_END_MASK, retr_end);
++ reg_set_bit_mask_lcd(gdrm, GLAMO_REG_LCD_VERT_DISP_START,
++ GLAMO_LCD_HV_RETR_DISP_START_MASK,
++ disp_start);
++ reg_set_bit_mask_lcd(gdrm, GLAMO_REG_LCD_VERT_DISP_END,
++ GLAMO_LCD_HV_RETR_DISP_END_MASK, disp_end);
++
++ } else {
++
++ glamo_engine_reclock(gdrm->glamo_core, GLAMO_ENGINE_LCD,
++ mode->clock/2);
++
++ reg_set_bit_mask_lcd(gdrm, GLAMO_REG_LCD_WIDTH,
++ GLAMO_LCD_WIDTH_MASK, mode->vdisplay);
++ reg_set_bit_mask_lcd(gdrm, GLAMO_REG_LCD_HEIGHT,
++ GLAMO_LCD_HEIGHT_MASK, mode->hdisplay);
++ reg_set_bit_mask_lcd(gdrm, GLAMO_REG_LCD_PITCH,
++ GLAMO_LCD_PITCH_MASK, mode->hdisplay*2);
++
++ /* Set rotation */
++ reg_set_bit_mask_lcd(gdrm, GLAMO_REG_LCD_WIDTH,
++ GLAMO_LCD_ROT_MODE_MASK, rot);
++ reg_set_bit_mask_lcd(gdrm, GLAMO_REG_LCD_MODE1,
++ GLAMO_LCD_MODE1_ROTATE_EN,
++ (rot != GLAMO_LCD_ROT_MODE_0) ?
++ GLAMO_LCD_MODE1_ROTATE_EN : 0);
++
++ /* Apply "vertical" numbers to the horizontal registers */
++ retr_start = 0;
++ retr_end = retr_start + mode->vsync_end - mode->vsync_start;
++ disp_start = mode->vtotal - mode->vsync_start;
++ disp_end = disp_start + mode->vdisplay;
++
++ reg_set_bit_mask_lcd(gdrm, GLAMO_REG_LCD_HORIZ_TOTAL,
++ GLAMO_LCD_HV_TOTAL_MASK, mode->vtotal);
++ reg_set_bit_mask_lcd(gdrm, GLAMO_REG_LCD_HORIZ_RETR_START,
++ GLAMO_LCD_HV_RETR_START_MASK, retr_start);
++ reg_set_bit_mask_lcd(gdrm, GLAMO_REG_LCD_HORIZ_RETR_END,
++ GLAMO_LCD_HV_RETR_END_MASK, retr_end);
++ reg_set_bit_mask_lcd(gdrm, GLAMO_REG_LCD_HORIZ_DISP_START,
++ GLAMO_LCD_HV_RETR_DISP_START_MASK,
++ disp_start);
++ reg_set_bit_mask_lcd(gdrm, GLAMO_REG_LCD_HORIZ_DISP_END,
++ GLAMO_LCD_HV_RETR_DISP_END_MASK, disp_end);
++
++ /* Apply "horizontal" numbers to the vertical registers */
++ retr_start = 0;
++ retr_end = retr_start + mode->hsync_end - mode->hsync_start;
++ disp_start = mode->htotal - mode->hsync_start;
++ disp_end = disp_start + mode->hdisplay;
++ reg_set_bit_mask_lcd(gdrm, GLAMO_REG_LCD_VERT_TOTAL,
++ GLAMO_LCD_HV_TOTAL_MASK, mode->htotal);
++ reg_set_bit_mask_lcd(gdrm, GLAMO_REG_LCD_VERT_RETR_START,
++ GLAMO_LCD_HV_RETR_START_MASK, retr_start);
++ reg_set_bit_mask_lcd(gdrm, GLAMO_REG_LCD_VERT_RETR_END,
++ GLAMO_LCD_HV_RETR_END_MASK, retr_end);
++ reg_set_bit_mask_lcd(gdrm, GLAMO_REG_LCD_VERT_DISP_START,
++ GLAMO_LCD_HV_RETR_DISP_START_MASK,
++ disp_start);
++ reg_set_bit_mask_lcd(gdrm, GLAMO_REG_LCD_VERT_DISP_END,
++ GLAMO_LCD_HV_RETR_DISP_END_MASK, disp_end);
+
+- reg_set_bit_mask_lcd(gdrm, GLAMO_REG_LCD_WIDTH,
+- GLAMO_LCD_WIDTH_MASK, mode->hdisplay);
+- reg_set_bit_mask_lcd(gdrm, GLAMO_REG_LCD_HEIGHT,
+- GLAMO_LCD_HEIGHT_MASK, mode->vdisplay);
+- reg_set_bit_mask_lcd(gdrm, GLAMO_REG_LCD_PITCH,
+- GLAMO_LCD_PITCH_MASK, mode->hdisplay*2);
+-
+- /* Convert "X modeline timings" into "Glamo timings" */
+- retr_start = 0;
+- retr_end = retr_start + mode->hsync_end - mode->hsync_start;
+- disp_start = mode->htotal - mode->hsync_start;
+- disp_end = disp_start + mode->hdisplay;
+- reg_set_bit_mask_lcd(gdrm, GLAMO_REG_LCD_HORIZ_TOTAL,
+- GLAMO_LCD_HV_TOTAL_MASK, mode->htotal);
+- reg_set_bit_mask_lcd(gdrm, GLAMO_REG_LCD_HORIZ_RETR_START,
+- GLAMO_LCD_HV_RETR_START_MASK, retr_start);
+- reg_set_bit_mask_lcd(gdrm, GLAMO_REG_LCD_HORIZ_RETR_END,
+- GLAMO_LCD_HV_RETR_END_MASK, retr_end);
+- reg_set_bit_mask_lcd(gdrm, GLAMO_REG_LCD_HORIZ_DISP_START,
+- GLAMO_LCD_HV_RETR_DISP_START_MASK, disp_start);
+- reg_set_bit_mask_lcd(gdrm, GLAMO_REG_LCD_HORIZ_DISP_END,
+- GLAMO_LCD_HV_RETR_DISP_END_MASK, disp_end);
+-
+- /* The same in the vertical direction */
+- retr_start = 0;
+- retr_end = retr_start + mode->vsync_end - mode->vsync_start;
+- disp_start = mode->vtotal - mode->vsync_start;
+- disp_end = disp_start + mode->vdisplay;
+- reg_set_bit_mask_lcd(gdrm, GLAMO_REG_LCD_VERT_TOTAL,
+- GLAMO_LCD_HV_TOTAL_MASK, mode->vtotal);
+- reg_set_bit_mask_lcd(gdrm, GLAMO_REG_LCD_VERT_RETR_START,
+- GLAMO_LCD_HV_RETR_START_MASK, retr_start);
+- reg_set_bit_mask_lcd(gdrm, GLAMO_REG_LCD_VERT_RETR_END,
+- GLAMO_LCD_HV_RETR_END_MASK, retr_end);
+- reg_set_bit_mask_lcd(gdrm, GLAMO_REG_LCD_VERT_DISP_START,
+- GLAMO_LCD_HV_RETR_DISP_START_MASK, disp_start);
+- reg_set_bit_mask_lcd(gdrm, GLAMO_REG_LCD_VERT_DISP_END,
+- GLAMO_LCD_HV_RETR_DISP_END_MASK, disp_end);
++ }
++
++ gdrm->saved_clock = mode->clock;
+
+ glamo_lcd_cmd_mode(gdrm, 0);
+
+@@ -747,8 +834,8 @@ int glamo_display_init(struct drm_device *dev)
+ drm_mode_config_init(dev);
+
+ dev->mode_config.min_width = 240;
+- dev->mode_config.min_height = 320;
+- dev->mode_config.max_width = 480;
++ dev->mode_config.min_height = 240;
++ dev->mode_config.max_width = 640;
+ dev->mode_config.max_height = 640;
+
+ dev->mode_config.funcs = (void *)&glamo_mode_funcs;
+--
+1.7.1
+
diff --git a/recipes/linux/linux-openmoko-2.6.32/0025-pcf50633-fix-merge.patch b/recipes/linux/linux-openmoko-2.6.32/0025-pcf50633-fix-merge.patch
deleted file mode 100644
index 612b332a94..0000000000
--- a/recipes/linux/linux-openmoko-2.6.32/0025-pcf50633-fix-merge.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From 475d20cdb1bfefd32d5ed64dff745648df6311ed Mon Sep 17 00:00:00 2001
-From: Martin Jansa <Martin.Jansa@gmail.com>
-Date: Mon, 26 Apr 2010 10:40:05 +0200
-Subject: [PATCH 25/31] pcf50633: fix merge
-
-from: http://git.openmoko.org/?p=kernel.git;a=blobdiff;f=arch/arm/mach-s3c2442/mach-gta02.c;h=a96903712cb0139133350d6443d9cee33f0397fd;hp=083b54c9bcf0b5311c29d38c976e3c6b04fe32d5;hb=8833244fb8a818a8429d686ba2b5626a1f2681bc;hpb=2f04ffc8dd97e15ce30358c3bf00cf6a0e7dcc19
----
- arch/arm/mach-s3c2442/mach-gta02.c | 4 ++--
- 1 files changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/arch/arm/mach-s3c2442/mach-gta02.c b/arch/arm/mach-s3c2442/mach-gta02.c
-index f1d4d51..8b59fa7 100644
---- a/arch/arm/mach-s3c2442/mach-gta02.c
-+++ b/arch/arm/mach-s3c2442/mach-gta02.c
-@@ -631,8 +631,8 @@ struct pcf50633_platform_data gta02_pcf_pdata = {
- .min_uV = 2000000,
- .max_uV = 3300000,
- .valid_modes_mask = REGULATOR_MODE_NORMAL,
-- .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE |
-- REGULATOR_CHANGE_VOLTAGE,
-+ .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE |
-+ REGULATOR_CHANGE_STATUS,
- .always_on = 1,
- },
- .num_consumer_supplies = ARRAY_SIZE(hcldo_consumers),
---
-1.7.0.4
-
diff --git a/recipes/linux/linux-openmoko-2.6.32/0026-gta02-defconfigs-enable-LEDS_S3C24XX.patch b/recipes/linux/linux-openmoko-2.6.32/0026-gta02-defconfigs-enable-LEDS_S3C24XX.patch
new file mode 100644
index 0000000000..7a40345689
--- /dev/null
+++ b/recipes/linux/linux-openmoko-2.6.32/0026-gta02-defconfigs-enable-LEDS_S3C24XX.patch
@@ -0,0 +1,48 @@
+From f80beb203e503696cd2e74e194176b8d6f49b27b Mon Sep 17 00:00:00 2001
+From: Martin Jansa <Martin.Jansa@gmail.com>
+Date: Mon, 17 May 2010 12:41:06 +0200
+Subject: [PATCH] gta02 defconfigs, enable LEDS_S3C24XX and dummy battery driver
+
+---
+ arch/arm/configs/gta02_defconfig | 2 +-
+ arch/arm/configs/gta02_drm_defconfig | 4 ++--
+ 2 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/arch/arm/configs/gta02_defconfig b/arch/arm/configs/gta02_defconfig
+index 73d26ba..55832ac 100644
+--- a/arch/arm/configs/gta02_defconfig
++++ b/arch/arm/configs/gta02_defconfig
+@@ -1635,7 +1635,7 @@ CONFIG_LEDS_CLASS=y
+ #
+ # LED drivers
+ #
+-# CONFIG_LEDS_S3C24XX is not set
++CONFIG_LEDS_S3C24XX=y
+ # CONFIG_LEDS_PCA9532 is not set
+ CONFIG_LEDS_GPIO=y
+ CONFIG_LEDS_GPIO_PLATFORM=y
+diff --git a/arch/arm/configs/gta02_drm_defconfig b/arch/arm/configs/gta02_drm_defconfig
+index 05aa130..4d85e9a 100644
+--- a/arch/arm/configs/gta02_drm_defconfig
++++ b/arch/arm/configs/gta02_drm_defconfig
+@@ -1233,7 +1233,7 @@ CONFIG_POWER_SUPPLY=y
+ CONFIG_CHARGER_PCF50633=y
+ CONFIG_BATTERY_BQ27000_HDQ=y
+ CONFIG_HDQ_GPIO_BITBANG=y
+-# CONFIG_BATTERY_PLATFORM is not set
++CONFIG_BATTERY_PLATFORM=y
+ # CONFIG_HWMON is not set
+ # CONFIG_THERMAL is not set
+ CONFIG_WATCHDOG=y
+@@ -1681,7 +1681,7 @@ CONFIG_LEDS_CLASS=y
+ #
+ # LED drivers
+ #
+-# CONFIG_LEDS_S3C24XX is not set
++CONFIG_LEDS_S3C24XX=y
+ # CONFIG_LEDS_PCA9532 is not set
+ CONFIG_LEDS_GPIO=y
+ CONFIG_LEDS_GPIO_PLATFORM=y
+--
+1.7.1
+
diff --git a/recipes/linux/linux-openmoko-2.6.32/0031-ar6000-minimise-possibility-of-race-in-ar6000_ioctl_.patch b/recipes/linux/linux-openmoko-2.6.32/0031-ar6000-minimise-possibility-of-race-in-ar6000_ioctl_.patch
deleted file mode 100644
index 4640a6b71a..0000000000
--- a/recipes/linux/linux-openmoko-2.6.32/0031-ar6000-minimise-possibility-of-race-in-ar6000_ioctl_.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From 926753617ff0961104567c7c0944d5a4bb2b94e5 Mon Sep 17 00:00:00 2001
-From: Paul Fertser <fercerpav@gmail.com>
-Date: Sat, 6 Mar 2010 15:44:10 +0300
-Subject: [PATCH 31/31] ar6000: minimise possibility of race in ar6000_ioctl_siwscan
-
-This stupid patch should make driver not do NULL pointer dereference when
-there's a race between scan and removing of the device. As clumsy as the
-rest of the driver, this is not a proper solution, of course.
-
-Screw the anonymous dev who's written the original code!
-
-Signed-off-by: Paul Fertser <fercerpav@gmail.com>
----
- drivers/ar6000/ar6000/wireless_ext.c | 3 +++
- 1 files changed, 3 insertions(+), 0 deletions(-)
-
-diff --git a/drivers/ar6000/ar6000/wireless_ext.c b/drivers/ar6000/ar6000/wireless_ext.c
-index af78ae0..52a4675 100644
---- a/drivers/ar6000/ar6000/wireless_ext.c
-+++ b/drivers/ar6000/ar6000/wireless_ext.c
-@@ -1813,6 +1813,9 @@ ar6000_ioctl_siwscan(struct net_device *dev,
- wait_event_interruptible_timeout(ar6000_scan_queue, ar->scan_complete,
- 5 * HZ);
-
-+ if (ar->arWmiReady == FALSE || ar->arWlanState == WLAN_DISABLED)
-+ return -EIO;
-+
- if (wmi_bssfilter_cmd(ar->arWmi, NONE_BSS_FILTER, 0) != A_OK) {
- printk("Couldn't set filtering\n");
- ret = -EIO;
---
-1.7.0.4
-
diff --git a/recipes/linux/linux-openmoko-2.6.32_git.bb b/recipes/linux/linux-openmoko-2.6.32_git.bb
index bb1bc50082..fb842419dd 100644
--- a/recipes/linux/linux-openmoko-2.6.32_git.bb
+++ b/recipes/linux/linux-openmoko-2.6.32_git.bb
@@ -3,7 +3,7 @@ require linux-openmoko.inc
DESCRIPTION_${PN} = "Linux ${KERNEL_RELEASE} kernel for the Openmoko Neo GSM Smartphones"
-KERNEL_RELEASE="2.6.32.12"
+KERNEL_RELEASE="2.6.32.13"
SRCREV = "a9254be10ac2294ea20165a87c09ea6afcf66d94"
OEV = "oe1"
@@ -40,10 +40,12 @@ SRC_URI = "\
file://0022-JBT6k74-tweaks-Make-resolution-switch-work.patch;patch=1 \
file://0023-Remove-a-couple-of-debugging-messages.patch;patch=1 \
file://0024-Enable-dummy-frames-when-switching-resolution.patch;patch=1 \
+ file://0025-Almost-make-rotation-work.patch;patch=1 \
+ file://0026-gta02-defconfigs-enable-LEDS_S3C24XX.patch;patch=1 \
"
-SRC_URI[stablepatch.md5sum] = "9d097d34648a1734b1a7f97c5d000f03"
-SRC_URI[stablepatch.sha256sum] = "e03ffcd2c88e936e581e5f7a7c675d11345064f2e3df96e335e5438c6593e3e7"
+SRC_URI[stablepatch.md5sum] = "ba6abb1ffee513a1d4f831599ddae490"
+SRC_URI[stablepatch.sha256sum] = "baf6dff5d1c478e65decf2e8b704c60e546ea37c4de59ee8eb6af9dd3d63f145"
S = "${WORKDIR}/git"