Send commitlog mailing list submissions to
[email protected]
To subscribe or unsubscribe via the World Wide Web, visit
http://lists.openmoko.org/mailman/listinfo/commitlog
or, via email, send a message with subject or body 'help' to
[EMAIL PROTECTED]
You can reach the person managing the list at
[EMAIL PROTECTED]
When replying, please edit your Subject line so it is more specific
than "Re: Contents of commitlog digest..."
Today's Topics:
1. r1052 - trunk/src/target/u-boot/patches ([EMAIL PROTECTED])
2. r1053 - trunk/src/target/OM-2007/openmoko-libs/libmokoui
([EMAIL PROTECTED])
3. r1054 - trunk/src/target/kernel/patches
([EMAIL PROTECTED])
4. r1055 - trunk/src/target/kernel/patches
([EMAIL PROTECTED])
5. r1056 - trunk/src/target/kernel/patches
([EMAIL PROTECTED])
6. r1057 - trunk/src/target/u-boot/patches
([EMAIL PROTECTED])
--- Begin Message ---
Author: werner
Date: 2007-02-20 17:27:30 +0100 (Tue, 20 Feb 2007)
New Revision: 1052
Modified:
trunk/src/target/u-boot/patches/uboot-s3c2410-splash.patch
Log:
include/configs/neo1973.h: remove #if 1 ... #endif around video definitions
common/cmd_mem.c: new command "unzip srcaddr dstaddr [dstsize]" to unzip from
memory to memory, and option CONFIG_UNZIP to enable it
Modified: trunk/src/target/u-boot/patches/uboot-s3c2410-splash.patch
===================================================================
--- trunk/src/target/u-boot/patches/uboot-s3c2410-splash.patch 2007-02-20
08:10:31 UTC (rev 1051)
+++ trunk/src/target/u-boot/patches/uboot-s3c2410-splash.patch 2007-02-20
16:27:30 UTC (rev 1052)
@@ -19,6 +19,9 @@
include/configs/neo1973.h (CONFIG_COMMANDS): add CFG_CMD_BMP
include/configs/neo1973.h: raise number of command line arguments from 16 to 64
include/configs/neo1973.h: enable splash screen and BMP support
+include/configs/neo1973.h: remove #if 1 ... #endif around video definitions
+common/cmd_mem.c: new command "unzip srcaddr dstaddr [dstsize]" to unzip from
+ memory to memory, and option CONFIG_UNZIP to enable it
- Werner Almesberger <[EMAIL PROTECTED]>
@@ -56,7 +59,7 @@
+ addr = simple_strtoul (s, &end, 16);
+ if (*end) {
+ run_command(s, 0);
-+ return (void *) video_fb_address;
++ return video_fb_address;
+ }
if (video_display_bitmap (addr, 0, 0) == 0) {
@@ -125,7 +128,12 @@
#define CFG_BARGSIZE CFG_CBSIZE /* Boot Argument Buffer Size
*/
#define CFG_MEMTEST_START 0x30000000 /* memtest works on */
-@@ -253,6 +255,9 @@
+@@ -248,19 +250,21 @@
+ /* we have a board_late_init() function */
+ #define BOARD_LATE_INIT 1
+
+-#if 1
+ #define CONFIG_VIDEO
#define CONFIG_VIDEO_S3C2410
#define CONFIG_CFB_CONSOLE
#define CONFIG_VIDEO_LOGO
@@ -133,5 +141,67 @@
+#define CFG_VIDEO_LOGO_MAX_SIZE (640*480+1024+100) /* 100 = slack */
+#define CONFIG_VIDEO_BMP_GZIP
#define CONFIG_VGA_AS_SINGLE_DEVICE
++#define CONFIG_UNZIP
#define VIDEO_KBD_INIT_FCT 0
+ #define VIDEO_TSTC_FCT serial_tstc
+ #define VIDEO_GETC_FCT serial_getc
+
+ #define LCD_VIDEO_ADDR 0x33d00000
+-#endif
+
+ #define CONFIG_S3C2410_NAND_BBT 1
+
+Index: u-boot/common/cmd_mem.c
+===================================================================
+--- u-boot.orig/common/cmd_mem.c
++++ u-boot/common/cmd_mem.c
+@@ -1185,6 +1185,34 @@ int do_mem_crc (cmd_tbl_t *cmdtp, int fl
+ }
+ #endif /* CONFIG_CRC32_VERIFY */
+
++
++#ifdef CONFIG_UNZIP
++int gunzip (void *, int, unsigned char *, unsigned long *);
++
++int do_unzip ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
++{
++ unsigned long src, dst;
++ unsigned long src_len = ~0UL, dst_len = ~0UL;
++ int err;
++
++ switch (argc) {
++ case 4:
++ dst_len = simple_strtoul(argv[3], NULL, 16);
++ /* fall through */
++ case 3:
++ src = simple_strtoul(argv[1], NULL, 16);
++ dst = simple_strtoul(argv[2], NULL, 16);
++ break;
++ default:
++ printf ("Usage:\n%s\n", cmdtp->usage);
++ return 1;
++ }
++
++ return !!gunzip((void *) dst, dst_len, (void *) src, &src_len);
++}
++#endif /* CONFIG_UNZIP */
++
++
+ /**************************************************/
+ #if (CONFIG_COMMANDS & CFG_CMD_MEMORY)
+ U_BOOT_CMD(
+@@ -1288,5 +1316,13 @@ U_BOOT_CMD(
+ );
+ #endif /* CONFIG_MX_CYCLIC */
+
++#ifdef CONFIG_UNZIP
++U_BOOT_CMD(
++ unzip, CFG_MAXARGS, 1, do_unzip,
++ "unzip - unzip a memory region\n",
++ "srcaddr dstaddr [dstsize]\n"
++);
++#endif /* CONFIG_UNZIP */
++
+ #endif
+ #endif /* CFG_CMD_MEMORY */
--- End Message ---
--- Begin Message ---
Author: thomas
Date: 2007-02-20 17:53:50 +0100 (Tue, 20 Feb 2007)
New Revision: 1053
Modified:
trunk/src/target/OM-2007/openmoko-libs/libmokoui/moko-alignment.c
Log:
* Remove access to private parent struct
* Don't set the padding in the size request. Fixes bug 186.
Modified: trunk/src/target/OM-2007/openmoko-libs/libmokoui/moko-alignment.c
===================================================================
--- trunk/src/target/OM-2007/openmoko-libs/libmokoui/moko-alignment.c
2007-02-20 16:27:30 UTC (rev 1052)
+++ trunk/src/target/OM-2007/openmoko-libs/libmokoui/moko-alignment.c
2007-02-20 16:53:50 UTC (rev 1053)
@@ -100,14 +100,6 @@
"padding", &padding,
NULL);
- GtkAlignmentPrivate *priv = GTK_ALIGNMENT_GET_PRIVATE(widget);
- if ( padding )
- {
- priv->padding_top = padding->top;
- priv->padding_bottom = padding->bottom;
- priv->padding_left = padding->left;
- priv->padding_right = padding->right;
- }
GtkBin* bin = GTK_BIN(widget);
@@ -124,8 +116,11 @@
requisition->height += child_requisition.height;
/* Request extra space for the padding: */
- requisition->width += (priv->padding_left + priv->padding_right);
- requisition->height += (priv->padding_top + priv->padding_bottom);
+ if ( padding )
+ {
+ requisition->width += (padding->left + padding->right);
+ requisition->height += (padding->top + padding->bottom);
+ }
}
}
--- End Message ---
--- Begin Message ---
Author: laforge
Date: 2007-02-20 19:49:55 +0100 (Tue, 20 Feb 2007)
New Revision: 1054
Modified:
trunk/src/target/kernel/patches/gta01-core.patch
Log:
Add headphone insertion GPIO to list of gta01kbd resources
Modified: trunk/src/target/kernel/patches/gta01-core.patch
===================================================================
--- trunk/src/target/kernel/patches/gta01-core.patch 2007-02-20 16:53:50 UTC
(rev 1053)
+++ trunk/src/target/kernel/patches/gta01-core.patch 2007-02-20 18:49:55 UTC
(rev 1054)
@@ -3,8 +3,8 @@
Index: linux-2.6.20/arch/arm/mach-s3c2410/Kconfig
===================================================================
---- linux-2.6.20.orig/arch/arm/mach-s3c2410/Kconfig 2007-02-18
17:18:58.000000000 +0100
-+++ linux-2.6.20/arch/arm/mach-s3c2410/Kconfig 2007-02-18 17:19:37.000000000
+0100
+--- linux-2.6.20.orig/arch/arm/mach-s3c2410/Kconfig 2007-02-20
18:43:31.000000000 +0100
++++ linux-2.6.20/arch/arm/mach-s3c2410/Kconfig 2007-02-20 18:56:10.000000000
+0100
@@ -86,6 +86,14 @@
help
Say Y here if you are using the Armzone QT2410
@@ -22,8 +22,8 @@
select CPU_S3C2440
Index: linux-2.6.20/arch/arm/mach-s3c2410/Makefile
===================================================================
---- linux-2.6.20.orig/arch/arm/mach-s3c2410/Makefile 2007-02-18
17:18:36.000000000 +0100
-+++ linux-2.6.20/arch/arm/mach-s3c2410/Makefile 2007-02-18
17:19:16.000000000 +0100
+--- linux-2.6.20.orig/arch/arm/mach-s3c2410/Makefile 2007-02-20
18:43:31.000000000 +0100
++++ linux-2.6.20/arch/arm/mach-s3c2410/Makefile 2007-02-20
18:43:31.000000000 +0100
@@ -89,5 +89,6 @@
obj-$(CONFIG_MACH_NEXCODER_2440) += mach-nexcoder.o
obj-$(CONFIG_MACH_VSTMS) += mach-vstms.o
@@ -34,8 +34,8 @@
Index: linux-2.6.20/arch/arm/mach-s3c2410/mach-gta01.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.20/arch/arm/mach-s3c2410/mach-gta01.c 2007-02-18
17:19:16.000000000 +0100
-@@ -0,0 +1,516 @@
++++ linux-2.6.20/arch/arm/mach-s3c2410/mach-gta01.c 2007-02-20
18:57:42.000000000 +0100
+@@ -0,0 +1,520 @@
+/*
+ * linux/arch/arm/mach-s3c2410/mach-gta01.c
+ *
@@ -461,6 +461,10 @@
+ .start = GTA01_GPIO_HOLD_KEY,
+ .end = GTA01_GPIO_HOLD_KEY,
+ },
++ [2] = {
++ .start = GTA01_GPIO_JACK_INSERT,
++ .end = GTA01_GPIO_JACK_INSERT,
++ },
+};
+
+struct platform_device gta01_button_dev = {
@@ -555,7 +559,7 @@
Index: linux-2.6.20/include/asm-arm/arch-s3c2410/gta01.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.20/include/asm-arm/arch-s3c2410/gta01.h 2007-02-18
17:19:16.000000000 +0100
++++ linux-2.6.20/include/asm-arm/arch-s3c2410/gta01.h 2007-02-20
18:43:31.000000000 +0100
@@ -0,0 +1,60 @@
+#ifndef _GTA01_H
+#define _GTA01_H
--- End Message ---
--- Begin Message ---
Author: laforge
Date: 2007-02-20 19:51:14 +0100 (Tue, 20 Feb 2007)
New Revision: 1055
Modified:
trunk/src/target/kernel/patches/gta01-pcf50606.patch
Log:
Implement suspend/resume for those registers of the PMU that don't survive
STANDBY mode. This might be bogus, since we can't switch the PMU to standby
in Power_off CPU mode anyway. Anyway, it doesn't make things worse to have it
;)
Modified: trunk/src/target/kernel/patches/gta01-pcf50606.patch
===================================================================
--- trunk/src/target/kernel/patches/gta01-pcf50606.patch 2007-02-20
18:49:55 UTC (rev 1054)
+++ trunk/src/target/kernel/patches/gta01-pcf50606.patch 2007-02-20
18:51:14 UTC (rev 1055)
@@ -3,8 +3,8 @@
Index: linux-2.6.20/drivers/i2c/chips/pcf50606.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.20/drivers/i2c/chips/pcf50606.c 2007-02-18 17:18:58.000000000
+0100
-@@ -0,0 +1,1497 @@
++++ linux-2.6.20/drivers/i2c/chips/pcf50606.c 2007-02-20 16:46:19.000000000
+0100
+@@ -0,0 +1,1596 @@
+/* Philips PCF50606 Power Management Unit (PMU) driver
+ *
+ * (C) 2006 by OpenMoko, Inc.
@@ -101,6 +101,21 @@
+ struct input_dev *input_dev;
+ int allow_close;
+ int onkey_seconds;
++#ifdef CONFIG_PM
++ struct {
++ u_int8_t dcdc1, dcdc2;
++ u_int8_t dcdec1;
++ u_int8_t dcudc1;
++ u_int8_t ioregc;
++ u_int8_t d1regc1;
++ u_int8_t d2regc1;
++ u_int8_t d3regc1;
++ u_int8_t lpregc1;
++ u_int8_t adcc1, adcc2;
++ u_int8_t pwmc1;
++ u_int8_t int1m, int2m, int3m;
++ } standby_regs;
++#endif
+};
+
+struct pcf50606_data *pcf50606_global;
@@ -529,7 +544,7 @@
+
+static void pcf50606_work(struct work_struct *work)
+{
-+ struct pcf50606_data *pcf =
++ struct pcf50606_data *pcf =
+ container_of(work, struct pcf50606_data, work);
+ u_int8_t int1, int2, int3;
+
@@ -1391,6 +1406,10 @@
+ if (err < 0)
+ goto exit_detach;
+
++ if (enable_irq_wake(GTA01_IRQ_PCF50606) < 0)
++ printk(KERN_ERR "PCF50606: IRQ %u cannot be enabled as wake-up"
++ "source in this hardware revision!");
++
+ data->rtc = rtc_device_register("pcf50606", &new_client->dev,
+ &pcf50606_rtc_ops, THIS_MODULE);
+ if (IS_ERR(data->rtc)) {
@@ -1476,9 +1495,89 @@
+ return 0;
+}
+
++#ifdef CONFIG_PM
++#define INT1M_RESUMERS
(PCF50606_INT1_ALARM|PCF50606_INT1_ONKEYF|PCF50606_INT1_EXTONR)
++#define INT2M_RESUMERS
(PCF50606_INT2_CHGWD10S|PCF50606_INT2_CHGPROT|PCF50606_INT2_CHGERR)
++#define INT3M_RESUMERS (PCF50606_INT3_LOWBAT|PCF50606_INT3_HIGHTMP)
++static int pcf50606_suspend(struct device *dev, pm_message_t state)
++{
++ struct i2c_client *client = to_i2c_client(dev);
++ struct pcf50606_data *pcf = i2c_get_clientdata(client);
++
++ /* The general idea is to power down all unused power supplies,
++ * and then mask all PCF50606 interrup sources but EXTONR, ONKEYF
++ * and ALARM */
++
++ mutex_lock(&pcf->lock);
++
++ /* Save all registers that don't "survive" standby state */
++ pcf->standby_regs.dcdc1 = __reg_read(pcf, PCF50606_REG_DCDC1);
++ pcf->standby_regs.dcdc2 = __reg_read(pcf, PCF50606_REG_DCDC2);
++ pcf->standby_regs.dcdec1 = __reg_read(pcf, PCF50606_REG_DCDEC1);
++ pcf->standby_regs.dcudc1 = __reg_read(pcf, PCF50606_REG_DCUDC1);
++ pcf->standby_regs.ioregc = __reg_read(pcf, PCF50606_REG_IOREGC);
++ pcf->standby_regs.d1regc1 = __reg_read(pcf, PCF50606_REG_D1REGC1);
++ pcf->standby_regs.d2regc1 = __reg_read(pcf, PCF50606_REG_D2REGC1);
++ pcf->standby_regs.d3regc1 = __reg_read(pcf, PCF50606_REG_D3REGC1);
++ pcf->standby_regs.lpregc1 = __reg_read(pcf, PCF50606_REG_LPREGC1);
++ pcf->standby_regs.adcc1 = __reg_read(pcf, PCF50606_REG_ADCC1);
++ pcf->standby_regs.adcc2 = __reg_read(pcf, PCF50606_REG_ADCC2);
++ pcf->standby_regs.pwmc1 = __reg_read(pcf, PCF50606_REG_PWMC1);
++
++
++ /* FIXME: switch off unneeded power supplies */
++
++ pcf->standby_regs.int1m = __reg_read(pcf, PCF50606_REG_INT1M);
++ pcf->standby_regs.int2m = __reg_read(pcf, PCF50606_REG_INT2M);
++ pcf->standby_regs.int3m = __reg_read(pcf, PCF50606_REG_INT3M);
++ __reg_write(pcf, PCF50606_REG_INT1M, ~INT1M_RESUMERS & 0xff);
++ __reg_write(pcf, PCF50606_REG_INT2M, ~INT2M_RESUMERS & 0xff);
++ __reg_write(pcf, PCF50606_REG_INT3M, ~INT3M_RESUMERS & 0xff);
++
++ mutex_unlock(&pcf->lock);
++
++ return 0;
++}
++
++static int pcf50606_resume(struct device *dev)
++{
++ struct i2c_client *client = to_i2c_client(dev);
++ struct pcf50606_data *pcf = i2c_get_clientdata(client);
++
++ mutex_lock(&pcf->lock);
++
++ /* Resume all saved registers that don't "survive" standby state */
++ __reg_write(pcf, PCF50606_REG_INT1M, pcf->standby_regs.int1m);
++ __reg_write(pcf, PCF50606_REG_INT2M, pcf->standby_regs.int2m);
++ __reg_write(pcf, PCF50606_REG_INT3M, pcf->standby_regs.int3m);
++
++ __reg_write(pcf, PCF50606_REG_DCDC1, pcf->standby_regs.dcdc1);
++ __reg_write(pcf, PCF50606_REG_DCDC2, pcf->standby_regs.dcdc2);
++ __reg_write(pcf, PCF50606_REG_DCDEC1, pcf->standby_regs.dcdec1);
++ __reg_write(pcf, PCF50606_REG_DCUDC1, pcf->standby_regs.dcudc1);
++ __reg_write(pcf, PCF50606_REG_IOREGC, pcf->standby_regs.ioregc);
++ __reg_write(pcf, PCF50606_REG_D1REGC1, pcf->standby_regs.d1regc1);
++ __reg_write(pcf, PCF50606_REG_D2REGC1, pcf->standby_regs.d2regc1);
++ __reg_write(pcf, PCF50606_REG_D3REGC1, pcf->standby_regs.d3regc1);
++ __reg_write(pcf, PCF50606_REG_LPREGC1, pcf->standby_regs.lpregc1);
++ __reg_write(pcf, PCF50606_REG_ADCC1, pcf->standby_regs.adcc1);
++ __reg_write(pcf, PCF50606_REG_ADCC2, pcf->standby_regs.adcc2);
++ __reg_write(pcf, PCF50606_REG_PWMC1, pcf->standby_regs.pwmc1);
++
++ mutex_unlock(&pcf->lock);
++
++ return 0;
++}
++#else
++#define pcf50606_suspend NULL
++#define pcf50606_resume NULL
++#endif
++
+static struct i2c_driver pcf50606_driver = {
+ .driver = {
+ .name = "pcf50606",
++ .suspend= &pcf50606_suspend,
++ .resume = &pcf50606_resume,
+ },
+ .id = I2C_DRIVERID_PCF50606,
+ .attach_adapter = &pcf50606_attach_adapter,
--- End Message ---
--- Begin Message ---
Author: laforge
Date: 2007-02-20 19:51:57 +0100 (Tue, 20 Feb 2007)
New Revision: 1056
Modified:
trunk/src/target/kernel/patches/gta01-inputdevice.patch
Log:
* add HOLD key support to gta01kbd
* make both HOLD and 911 key events wake-up sources
Modified: trunk/src/target/kernel/patches/gta01-inputdevice.patch
===================================================================
--- trunk/src/target/kernel/patches/gta01-inputdevice.patch 2007-02-20
18:51:14 UTC (rev 1055)
+++ trunk/src/target/kernel/patches/gta01-inputdevice.patch 2007-02-20
18:51:57 UTC (rev 1056)
@@ -2,8 +2,8 @@
Index: linux-2.6.20/drivers/input/keyboard/Kconfig
===================================================================
---- linux-2.6.20.orig/drivers/input/keyboard/Kconfig 2007-02-15
16:15:18.000000000 +0100
-+++ linux-2.6.20/drivers/input/keyboard/Kconfig 2007-02-15
16:18:52.000000000 +0100
+--- linux-2.6.20.orig/drivers/input/keyboard/Kconfig 2007-02-20
18:56:10.000000000 +0100
++++ linux-2.6.20/drivers/input/keyboard/Kconfig 2007-02-20
18:58:03.000000000 +0100
@@ -214,4 +214,16 @@
To compile this driver as a module, choose M here: the
module will be called aaed2000_kbd.
@@ -23,8 +23,8 @@
endif
Index: linux-2.6.20/drivers/input/keyboard/Makefile
===================================================================
---- linux-2.6.20.orig/drivers/input/keyboard/Makefile 2007-02-15
16:15:18.000000000 +0100
-+++ linux-2.6.20/drivers/input/keyboard/Makefile 2007-02-15
16:18:52.000000000 +0100
+--- linux-2.6.20.orig/drivers/input/keyboard/Makefile 2007-02-20
18:56:10.000000000 +0100
++++ linux-2.6.20/drivers/input/keyboard/Makefile 2007-02-20
18:58:03.000000000 +0100
@@ -13,6 +13,7 @@
obj-$(CONFIG_KEYBOARD_NEWTON) += newtonkbd.o
obj-$(CONFIG_KEYBOARD_STOWAWAY) += stowaway.o
@@ -36,8 +36,8 @@
Index: linux-2.6.20/drivers/input/keyboard/gta01kbd.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.20/drivers/input/keyboard/gta01kbd.c 2007-02-15
16:20:10.000000000 +0100
-@@ -0,0 +1,214 @@
++++ linux-2.6.20/drivers/input/keyboard/gta01kbd.c 2007-02-20
19:48:56.000000000 +0100
+@@ -0,0 +1,234 @@
+/*
+ * Keyboard driver for FIC GTA01 (Neo1973) GSM phone
+ *
@@ -79,6 +79,11 @@
+ else
+ input_report_key(gta01kbd_data->input, KEY_PHONE, 0);
+
++ if (s3c2410_gpio_getpin(GTA01_GPIO_HOLD_KEY))
++ input_report_key(gta01kbd_data->input, KEY_PAUSE, 1);
++ else
++ input_report_key(gta01kbd_data->input, KEY_PAUSE, 0);
++
+ input_sync(gta01kbd_data->input);
+
+ return IRQ_HANDLED;
@@ -114,7 +119,7 @@
+{
+ struct gta01kbd *gta01kbd;
+ struct input_dev *input_dev;
-+ int irq;
++ int irq_911, irq_hold;
+
+ gta01kbd = kzalloc(sizeof(struct gta01kbd), GFP_KERNEL);
+ input_dev = input_allocate_device();
@@ -124,13 +129,17 @@
+ return -ENOMEM;
+ }
+
-+ if (pdev->resource[0].flags != IORESOURCE_MEM)
++ if (pdev->resource[0].flags != 0)
+ return -EINVAL;
+
-+ irq = s3c2410_gpio_getirq(pdev->resource[0].start);
-+ if (irq < 0)
++ irq_911 = s3c2410_gpio_getirq(pdev->resource[0].start);
++ if (irq_911 < 0)
+ return -EINVAL;
+
++ irq_hold = s3c2410_gpio_getirq(pdev->resource[1].start);
++ if (irq_hold < 0)
++ return -EINVAL;
++
+ platform_set_drvdata(pdev, gta01kbd);
+
+ gta01kbd->input = input_dev;
@@ -162,6 +171,7 @@
+ input_dev->private = gta01kbd;
+
+ input_dev->evbit[0] = BIT(EV_KEY);
++ set_bit(SW_HEADPHONE_INSERT, input_dev->swbit);
+#if 0
+ input_dev->keycode = gta01kbd->keycode;
+ input_dev->keycodesize = sizeof(unsigned char);
@@ -177,11 +187,20 @@
+
+ input_register_device(gta01kbd->input);
+
-+ if (request_irq(irq, gta01kbd_interrupt,
++ if (request_irq(irq_911, gta01kbd_interrupt,
+ SA_INTERRUPT | SA_TRIGGER_RISING | SA_TRIGGER_FALLING,
-+ "gta01kbd", gta01kbd))
++ "gta01kbd_911", gta01kbd))
+ printk(KERN_WARNING "gta01kbd: Can't get IRQ\n");
++ enable_irq_wake(irq_911);
+
++ if (request_irq(irq_hold, gta01kbd_interrupt,
++ SA_INTERRUPT | SA_TRIGGER_RISING | SA_TRIGGER_FALLING,
++ "gta01kbd_hold", gta01kbd))
++ printk(KERN_WARNING "gta01kbd: Can't get IRQ\n");
++ enable_irq_wake(irq_hold);
++
++ /* FIXME: headphone insert */
++
+#if 0
+ mod_timer(&corgikbd->htimer, jiffies +
msecs_to_jiffies(HINGE_SCAN_INTERVAL));
+
@@ -210,6 +229,7 @@
+ struct gta01kbd *gta01kbd = platform_get_drvdata(pdev);
+
+ free_irq(s3c2410_gpio_getirq(pdev->resource[0].start), gta01kbd);
++ free_irq(s3c2410_gpio_getirq(pdev->resource[1].start), gta01kbd);
+#if 0
+ int i;
+
--- End Message ---
--- Begin Message ---
Author: laforge
Date: 2007-02-20 19:53:38 +0100 (Tue, 20 Feb 2007)
New Revision: 1057
Modified:
trunk/src/target/u-boot/patches/uboot-s3c2410-mmc.patch
Log:
cosmetic cleanup, as requested by u-boot folks
* use 'debug' function rather than custom macros
* fix indentation
Modified: trunk/src/target/u-boot/patches/uboot-s3c2410-mmc.patch
===================================================================
--- trunk/src/target/u-boot/patches/uboot-s3c2410-mmc.patch 2007-02-20
18:51:57 UTC (rev 1056)
+++ trunk/src/target/u-boot/patches/uboot-s3c2410-mmc.patch 2007-02-20
18:53:38 UTC (rev 1057)
@@ -5,8 +5,8 @@
Index: u-boot/cpu/arm920t/s3c24x0/Makefile
===================================================================
---- u-boot.orig/cpu/arm920t/s3c24x0/Makefile 2007-02-16 23:42:19.000000000
+0100
-+++ u-boot/cpu/arm920t/s3c24x0/Makefile 2007-02-16 23:42:19.000000000
+0100
+--- u-boot.orig/cpu/arm920t/s3c24x0/Makefile 2007-02-17 11:55:28.000000000
+0100
++++ u-boot/cpu/arm920t/s3c24x0/Makefile 2007-02-17 11:55:31.000000000
+0100
@@ -26,7 +26,7 @@
LIB = $(obj)lib$(SOC).a
@@ -19,8 +19,8 @@
Index: u-boot/cpu/arm920t/s3c24x0/mmc.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ u-boot/cpu/arm920t/s3c24x0/mmc.c 2007-02-16 23:43:28.000000000 +0100
-@@ -0,0 +1,504 @@
++++ u-boot/cpu/arm920t/s3c24x0/mmc.c 2007-02-17 12:13:10.000000000 +0100
+@@ -0,0 +1,469 @@
+/*
+ * u-boot S3C2410 MMC/SD card driver
+ * (C) Copyright 2006 by OpenMoko, Inc.
@@ -52,24 +52,14 @@
+#include <asm/io.h>
+#include <s3c2410.h>
+#include <part.h>
++#include <fat.h>
+
+#ifdef CONFIG_MMC
+
+#define CONFIG_MMC_WIDE
+
-+//#define MMC_DEBUG
-+
-+#ifdef MMC_DEBUG
-+#define DEBUGP printf
-+#else
-+#define DEBUGP(x, args ...) do { } while(0)
-+#endif
-+
+static S3C2410_SDI *sdi;
+
-+extern int
-+fat_register_device(block_dev_desc_t *dev_desc, int part_no);
-+
+static block_dev_desc_t mmc_dev;
+
+block_dev_desc_t * mmc_get_dev(int dev)
@@ -90,10 +80,7 @@
+#define CMD_F_RESP 0x01
+#define CMD_F_RESP_LONG 0x02
+
-+static u_int32_t *
-+/****************************************************/
-+mmc_cmd(ushort cmd, ulong arg, ushort flags)
-+/****************************************************/
++static u_int32_t *mmc_cmd(ushort cmd, ulong arg, ushort flags)
+{
+ static u_int32_t resp[5];
+ ulong status;
@@ -104,7 +91,7 @@
+
+ memset(resp, 0, sizeof(resp));
+
-+ DEBUGP("mmc_cmd CMD%d arg=0x%08x flags=%x\n", cmd, arg, flags);
++ debug("mmc_cmd CMD%d arg=0x%08x flags=%x\n", cmd, arg, flags);
+
+ sdi->SDICSTA = 0xffffffff;
+ sdi->SDIDSTA = 0xffffffff;
@@ -136,7 +123,7 @@
+ }
+ }
+
-+ DEBUGP("final MMC CMD status 0x%x\n", csta);
++ debug("final MMC CMD status 0x%x\n", csta);
+
+ sdi->SDICSTA |= csta_rdy_bit;
+
@@ -152,20 +139,16 @@
+
+#define FIFO_FILL(host) ((host->SDIFSTA & S3C2410_SDIFSTA_COUNTMASK) >> 2)
+
-+static int
-+/****************************************************/
-+mmc_block_read(uchar *dst, ulong src, ulong len)
-+/****************************************************/
++static int mmc_block_read(uchar *dst, ulong src, ulong len)
+{
+ u_int32_t dcon, fifo;
+ u_int32_t *dst_u32 = (u_int32_t *)dst;
+ u_int32_t *resp;
+
-+ if (len == 0) {
++ if (len == 0)
+ return 0;
-+ }
+
-+ DEBUGP("mmc_block_rd dst %lx src %lx len %d\n", (ulong)dst, src, len);
++ debug("mmc_block_rd dst %lx src %lx len %d\n", (ulong)dst, src, len);
+
+ /* set block len */
+ resp = mmc_cmd(MMC_CMD_SET_BLOCKLEN, len, CMD_F_RESP);
@@ -196,7 +179,7 @@
+ }
+
+ while (fifo--) {
-+ //DEBUGP("dst_u32 = 0x%08x\n", dst_u32);
++ //debug("dst_u32 = 0x%08x\n", dst_u32);
+ *(dst_u32++) = sdi->SDIDAT;
+ if (len >= 4)
+ len -= 4;
@@ -207,39 +190,32 @@
+ }
+ }
+
-+ DEBUGP("waiting for SDIDSTA (currently 0x%08x\n", sdi->SDIDSTA);
++ debug("waiting for SDIDSTA (currently 0x%08x\n", sdi->SDIDSTA);
+ while (!(sdi->SDIDSTA & (1 << 4))) {}
-+ DEBUGP("done waiting for SDIDSTA (currently 0x%08x\n", sdi->SDIDSTA);
++ debug("done waiting for SDIDSTA (currently 0x%08x\n", sdi->SDIDSTA);
+
+ sdi->SDIDCON = 0;
+
+ if (!(sdi->SDIDSTA & S3C2410_SDIDSTA_XFERFINISH))
-+ DEBUGP("mmc_block_read; transfer not finished!\n");
++ debug("mmc_block_read; transfer not finished!\n");
+
+ return 0;
+}
+
-+static int
-+/****************************************************/
-+mmc_block_write(ulong dst, uchar *src, int len)
-+/****************************************************/
++static int mmc_block_write(ulong dst, uchar *src, int len)
+{
+ printf("MMC block write not yet supported on S3C2410!\n");
+ return -1;
+}
+
+
-+int
-+/****************************************************/
-+mmc_read(ulong src, uchar *dst, int size)
-+/****************************************************/
++int mmc_read(ulong src, uchar *dst, int size)
+{
+ ulong end, part_start, part_end, part_len, aligned_start, aligned_end;
+ ulong mmc_block_size, mmc_block_address;
+
-+ if (size == 0) {
++ if (size == 0)
+ return 0;
-+ }
+
+ if (!mmc_ready) {
+ printf("Please initialize the MMC first\n");
@@ -257,52 +233,47 @@
+ aligned_end = mmc_block_address & end;
+
+ /* all block aligned accesses */
-+ DEBUGP("src %lx dst %lx end %lx pstart %lx pend %lx astart %lx aend
%lx\n",
++ debug("src %lx dst %lx end %lx pstart %lx pend %lx astart %lx aend
%lx\n",
+ src, (ulong)dst, end, part_start, part_end, aligned_start, aligned_end);
+ if (part_start) {
+ part_len = mmc_block_size - part_start;
-+ DEBUGP("ps src %lx dst %lx end %lx pstart %lx pend %lx astart
%lx aend %lx\n",
++ debug("ps src %lx dst %lx end %lx pstart %lx pend %lx astart
%lx aend %lx\n",
+ src, (ulong)dst, end, part_start, part_end, aligned_start,
aligned_end);
-+ if ((mmc_block_read(mmc_buf, aligned_start, mmc_block_size)) <
0) {
++ if ((mmc_block_read(mmc_buf, aligned_start, mmc_block_size)) <
0)
+ return -1;
-+ }
++
+ memcpy(dst, mmc_buf+part_start, part_len);
+ dst += part_len;
+ src += part_len;
+ }
-+ DEBUGP("src %lx dst %lx end %lx pstart %lx pend %lx astart %lx aend
%lx\n",
++ debug("src %lx dst %lx end %lx pstart %lx pend %lx astart %lx aend
%lx\n",
+ src, (ulong)dst, end, part_start, part_end, aligned_start, aligned_end);
+ for (; src < aligned_end; src += mmc_block_size, dst += mmc_block_size)
{
-+ DEBUGP("al src %lx dst %lx end %lx pstart %lx pend %lx astart
%lx aend %lx\n",
++ debug("al src %lx dst %lx end %lx pstart %lx pend %lx astart
%lx aend %lx\n",
+ src, (ulong)dst, end, part_start, part_end, aligned_start,
aligned_end);
-+ if ((mmc_block_read((uchar *)(dst), src, mmc_block_size)) < 0) {
++ if ((mmc_block_read((uchar *)(dst), src, mmc_block_size)) < 0)
+ return -1;
-+ }
+ }
-+ DEBUGP("src %lx dst %lx end %lx pstart %lx pend %lx astart %lx aend
%lx\n",
++ debug("src %lx dst %lx end %lx pstart %lx pend %lx astart %lx aend
%lx\n",
+ src, (ulong)dst, end, part_start, part_end, aligned_start, aligned_end);
+ if (part_end && src < end) {
-+ DEBUGP("pe src %lx dst %lx end %lx pstart %lx pend %lx astart
%lx aend %lx\n",
++ debug("pe src %lx dst %lx end %lx pstart %lx pend %lx astart
%lx aend %lx\n",
+ src, (ulong)dst, end, part_start, part_end, aligned_start,
aligned_end);
-+ if ((mmc_block_read(mmc_buf, aligned_end, mmc_block_size)) < 0)
{
++ if ((mmc_block_read(mmc_buf, aligned_end, mmc_block_size)) < 0)
+ return -1;
-+ }
++
+ memcpy(dst, mmc_buf, part_end);
+ }
+ return 0;
+}
+
-+int
-+/****************************************************/
-+mmc_write(uchar *src, ulong dst, int size)
-+/****************************************************/
++int mmc_write(uchar *src, ulong dst, int size)
+{
+ ulong end, part_start, part_end, part_len, aligned_start, aligned_end;
+ ulong mmc_block_size, mmc_block_address;
+
-+ if (size == 0) {
++ if (size == 0)
+ return 0;
-+ }
+
+ if (!mmc_ready) {
+ printf("Please initialize the MMC first\n");
@@ -320,51 +291,48 @@
+ aligned_end = mmc_block_address & end;
+
+ /* all block aligned accesses */
-+ DEBUGP("src %lx dst %lx end %lx pstart %lx pend %lx astart %lx aend
%lx\n",
++ debug("src %lx dst %lx end %lx pstart %lx pend %lx astart %lx aend
%lx\n",
+ src, (ulong)dst, end, part_start, part_end, aligned_start, aligned_end);
+ if (part_start) {
+ part_len = mmc_block_size - part_start;
-+ DEBUGP("ps src %lx dst %lx end %lx pstart %lx pend %lx astart
%lx aend %lx\n",
++ debug("ps src %lx dst %lx end %lx pstart %lx pend %lx astart
%lx aend %lx\n",
+ (ulong)src, dst, end, part_start, part_end, aligned_start,
aligned_end);
-+ if ((mmc_block_read(mmc_buf, aligned_start, mmc_block_size)) <
0) {
++ if ((mmc_block_read(mmc_buf, aligned_start, mmc_block_size)) <
0)
+ return -1;
-+ }
++
+ memcpy(mmc_buf+part_start, src, part_len);
-+ if ((mmc_block_write(aligned_start, mmc_buf, mmc_block_size)) <
0) {
++ if ((mmc_block_write(aligned_start, mmc_buf, mmc_block_size)) <
0)
+ return -1;
-+ }
++
+ dst += part_len;
+ src += part_len;
+ }
-+ DEBUGP("src %lx dst %lx end %lx pstart %lx pend %lx astart %lx aend
%lx\n",
++ debug("src %lx dst %lx end %lx pstart %lx pend %lx astart %lx aend
%lx\n",
+ src, (ulong)dst, end, part_start, part_end, aligned_start, aligned_end);
+ for (; dst < aligned_end; src += mmc_block_size, dst += mmc_block_size)
{
-+ DEBUGP("al src %lx dst %lx end %lx pstart %lx pend %lx astart
%lx aend %lx\n",
++ debug("al src %lx dst %lx end %lx pstart %lx pend %lx astart
%lx aend %lx\n",
+ src, (ulong)dst, end, part_start, part_end, aligned_start,
aligned_end);
-+ if ((mmc_block_write(dst, (uchar *)src, mmc_block_size)) < 0) {
++ if ((mmc_block_write(dst, (uchar *)src, mmc_block_size)) < 0)
+ return -1;
-+ }
++
+ }
-+ DEBUGP("src %lx dst %lx end %lx pstart %lx pend %lx astart %lx aend
%lx\n",
++ debug("src %lx dst %lx end %lx pstart %lx pend %lx astart %lx aend
%lx\n",
+ src, (ulong)dst, end, part_start, part_end, aligned_start, aligned_end);
+ if (part_end && dst < end) {
-+ DEBUGP("pe src %lx dst %lx end %lx pstart %lx pend %lx astart
%lx aend %lx\n",
++ debug("pe src %lx dst %lx end %lx pstart %lx pend %lx astart
%lx aend %lx\n",
+ src, (ulong)dst, end, part_start, part_end, aligned_start,
aligned_end);
-+ if ((mmc_block_read(mmc_buf, aligned_end, mmc_block_size)) < 0)
{
++ if ((mmc_block_read(mmc_buf, aligned_end, mmc_block_size)) < 0)
+ return -1;
-+ }
++
+ memcpy(mmc_buf, src, part_end);
-+ if ((mmc_block_write(aligned_end, mmc_buf, mmc_block_size)) <
0) {
++ if ((mmc_block_write(aligned_end, mmc_buf, mmc_block_size)) < 0)
+ return -1;
-+ }
++
+ }
+ return 0;
+}
+
-+ulong
-+/****************************************************/
-+mmc_bread(int dev_num, ulong blknr, ulong blkcnt, ulong *dst)
-+/****************************************************/
++ulong mmc_bread(int dev_num, ulong blknr, ulong blkcnt, ulong *dst)
+{
+ int mmc_block_size = MMC_BLOCK_SIZE;
+ ulong src = blknr * mmc_block_size + CFG_MMC_BASE;
@@ -386,10 +354,7 @@
+ return blocknr * block_len;
+}
+
-+int
-+/****************************************************/
-+mmc_init(int verbose)
-+/****************************************************/
++int mmc_init(int verbose)
+{
+ int retries, rc = -ENODEV;
+ int is_sd = 0;
@@ -398,7 +363,7 @@
+
+ sdi = S3C2410_GetBase_SDI();
+
-+ DEBUGP("mmc_init(PCLK=%u)\n", get_PCLK());
++ debug("mmc_init(PCLK=%u)\n", get_PCLK());
+
+ clk_power->CLKCON |= (1 << 9);
+
@@ -435,7 +400,7 @@
+ printf("failed to detect SD Card, trying MMC\n");
+ resp = mmc_cmd(MMC_CMD_SEND_OP_COND, 0x00ffc000, CMD_F_RESP);
+ while (retries-- && resp && !(resp[4] & 0x80)) {
-+ DEBUGP("resp %x %x\n", resp[0], resp[1]);
++ debug("resp %x %x\n", resp[0], resp[1]);
+ udelay(50);
+ resp = mmc_cmd(1, 0x00ffff00, CMD_F_RESP);
+ }
@@ -518,9 +483,9 @@
+mmc2info(ulong addr)
+{
+ /* FIXME hard codes to 32 MB device */
-+ if (addr >= CFG_MMC_BASE && addr < CFG_MMC_BASE + 0x02000000) {
++ if (addr >= CFG_MMC_BASE && addr < CFG_MMC_BASE + 0x02000000)
+ return 1;
-+ }
++
+ return 0;
+}
+
@@ -528,7 +493,7 @@
Index: u-boot/include/asm-arm/arch-s3c24x0/mmc.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ u-boot/include/asm-arm/arch-s3c24x0/mmc.h 2007-02-16 23:42:19.000000000
+0100
++++ u-boot/include/asm-arm/arch-s3c24x0/mmc.h 2007-02-17 12:16:41.000000000
+0100
@@ -0,0 +1,112 @@
+/*
+ * linux/drivers/mmc/mmc_pxa.h
@@ -590,14 +555,14 @@
+
+typedef struct mmc_cid
+{
-+/* FIXME: BYTE_ORDER */
-+ uchar year:4,
-+ month:4;
-+ uchar sn[3];
-+ uchar fwrev:4,
-+ hwrev:4;
-+ uchar name[6];
-+ uchar id[3];
++ /* FIXME: BYTE_ORDER */
++ uchar year:4,
++ month:4;
++ uchar sn[3];
++ uchar fwrev:4,
++ hwrev:4;
++ uchar name[6];
++ uchar id[3];
+} mmc_cid_t;
+
+typedef struct mmc_csd
@@ -645,7 +610,7 @@
Index: u-boot/include/asm-arm/arch-s3c24x0/regs-sdi.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ u-boot/include/asm-arm/arch-s3c24x0/regs-sdi.h 2007-02-16
23:42:19.000000000 +0100
++++ u-boot/include/asm-arm/arch-s3c24x0/regs-sdi.h 2007-02-17
11:55:31.000000000 +0100
@@ -0,0 +1,110 @@
+/* linux/include/asm/arch-s3c2410/regs-sdi.h
+ *
@@ -759,8 +724,8 @@
+#endif /* __ASM_ARM_REGS_SDI */
Index: u-boot/include/s3c24x0.h
===================================================================
---- u-boot.orig/include/s3c24x0.h 2007-02-16 23:42:02.000000000 +0100
-+++ u-boot/include/s3c24x0.h 2007-02-16 23:42:19.000000000 +0100
+--- u-boot.orig/include/s3c24x0.h 2007-02-17 11:46:25.000000000 +0100
++++ u-boot/include/s3c24x0.h 2007-02-17 11:55:31.000000000 +0100
@@ -637,13 +637,7 @@
S3C24X0_REG32 SDIDCNT;
S3C24X0_REG32 SDIDSTA;
--- End Message ---
_______________________________________________
commitlog mailing list
[email protected]
http://lists.openmoko.org/mailman/listinfo/commitlog