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. r4283 - branches/src/target/kernel/2.6.24.x/patches
([EMAIL PROTECTED])
2. r4284 - in
trunk/src/target/OM-2007.2/applications/openmoko-messages2: . src
([EMAIL PROTECTED])
3. r4285 - branches/src/target/kernel/2.6.24.x/patches
([EMAIL PROTECTED])
4. r4286 - trunk/src/target/u-boot/patches ([EMAIL PROTECTED])
5. r4287 - trunk/src/host/devirginator ([EMAIL PROTECTED])
6. r4288 - in trunk/src/target: . dynenv ([EMAIL PROTECTED])
--- Begin Message ---
Author: werner
Date: 2008-04-01 05:11:43 +0200 (Tue, 01 Apr 2008)
New Revision: 4283
Modified:
branches/src/target/kernel/2.6.24.x/patches/bq27000-battery-driver.patch
branches/src/target/kernel/2.6.24.x/patches/fiq-hdq.patch
branches/src/target/kernel/2.6.24.x/patches/gta02-core.patch
branches/src/target/kernel/2.6.24.x/patches/gta02-power_control.patch
Log:
Introduce GTA02v6, for now as equivalent of GTA02v5.
gta02-core.patch:
- include/asm-arm/arch-s3c2410/gta02.h (GTA02v6_SYSTEM_REV): added revision
0x360
- arch/arm/mach-s3c2440/mach-gta02.c (mangle_pmu_pdata_by_system_rev,
gta02_glamo_mmc_set_power): added GTA02v6_SYSTEM_REV (equivalent to
GTA02v5_SYSTEM_REV)
gta02-power_control.patch:
- arch/arm/plat-s3c24xx/neo1973_pm_gsm.c (gsm_write, gta01_gsm_probe): added
GTA02v6_SYSTEM_REV (equivalent to GTA02v5_SYSTEM_REV)
- arch/arm/plat-s3c24xx/neo1973_pm_gps.c (gta01_pm_gps_probe): added
GTA02v6_SYSTEM_REV (equivalent to GTA02v5_SYSTEM_REV)
bq27000-battery-driver.patch:
- arch/arm/mach-s3c2440/mach-gta02.c (gta02_machine_init): added
GTA02v6_SYSTEM_REV (equivalent to GTA02v5_SYSTEM_REV)
fiq-hdq.patch:
- arch/arm/mach-s3c2440/mach-gta02.c (gta02_machine_init): added
GTA02v6_SYSTEM_REV (equivalent to GTA02v5_SYSTEM_REV)
Modified:
branches/src/target/kernel/2.6.24.x/patches/bq27000-battery-driver.patch
===================================================================
--- branches/src/target/kernel/2.6.24.x/patches/bq27000-battery-driver.patch
2008-04-01 01:53:34 UTC (rev 4282)
+++ branches/src/target/kernel/2.6.24.x/patches/bq27000-battery-driver.patch
2008-04-01 03:11:43 UTC (rev 4283)
@@ -11,7 +11,7 @@
/* define FIQ IPC struct */
/*
-@@ -578,6 +580,24 @@
+@@ -580,6 +582,24 @@
};
#endif
@@ -36,9 +36,9 @@
/* NOR Flash */
#define GTA02_FLASH_BASE 0x18000000 /* GCS3 */
-@@ -1245,6 +1265,7 @@
- switch (system_rev) {
+@@ -1250,6 +1270,7 @@
case GTA02v5_SYSTEM_REV:
+ case GTA02v6_SYSTEM_REV:
platform_device_register(>a02_hdq_device);
+ platform_device_register(&bq27000_battery_device);
break;
Modified: branches/src/target/kernel/2.6.24.x/patches/fiq-hdq.patch
===================================================================
--- branches/src/target/kernel/2.6.24.x/patches/fiq-hdq.patch 2008-04-01
01:53:34 UTC (rev 4282)
+++ branches/src/target/kernel/2.6.24.x/patches/fiq-hdq.patch 2008-04-01
03:11:43 UTC (rev 4283)
@@ -103,7 +103,7 @@
+ hdq_state = HDQB_WAIT_RX;
+ s3c2410_gpio_cfgpin(fiq_ipc.hdq_gpio_pin, S3C2410_GPIO_INPUT);
+ break;
-+
+
+ case HDQB_WAIT_TX: /* issue low for > 40us */
+ if (--hdq_ctr)
+ break;
@@ -120,7 +120,7 @@
+ /* idle in input mode, it's pulled up by 10K */
+ s3c2410_gpio_cfgpin(fiq_ipc.hdq_gpio_pin, S3C2410_GPIO_INPUT);
+ break;
-+
+
+ case HDQB_WAIT_RX: /* wait for battery to talk to us */
+ if (s3c2410_gpio_getpin(fiq_ipc.hdq_gpio_pin) == 0) {
+ /* it talks to us! */
@@ -168,7 +168,7 @@
+ fiq_ipc.hdq_transaction_ctr++;
+ hdq_state = HDQB_IDLE; /* abort */
+ break;
-
++
+ case HDQB_DATA_RX_HIGH:
+ if (!s3c2410_gpio_getpin(fiq_ipc.hdq_gpio_pin)) {
+ /* it talks to us! */
@@ -187,7 +187,7 @@
+ hdq_state = HDQB_IDLE; /* abort */
+ break;
+ }
-
++
+ if (hdq_state != HDQB_IDLE) /* ie, not idle */
+ if (divisor > FIQ_DIVISOR_HDQ)
+ divisor = FIQ_DIVISOR_HDQ; /* keep us going */
@@ -195,7 +195,7 @@
/* disable further timer interrupts if nobody has any work
* or adjust rate according to who still has work
-@@ -386,6 +561,23 @@
+@@ -388,6 +563,23 @@
.resource = sc32440_fiq_resources,
};
@@ -219,13 +219,14 @@
/* NOR Flash */
#define GTA02_FLASH_BASE 0x18000000 /* GCS3 */
-@@ -1049,6 +1241,15 @@
+@@ -1053,6 +1245,16 @@
platform_add_devices(gta02_devices, ARRAY_SIZE(gta02_devices));
+#ifdef CONFIG_GTA02_HDQ
+ switch (system_rev) {
+ case GTA02v5_SYSTEM_REV:
++ case GTA02v6_SYSTEM_REV:
+ platform_device_register(>a02_hdq_device);
+ break;
+ default:
@@ -560,7 +561,7 @@
===================================================================
--- linux-2.6.24.orig/include/asm-arm/arch-s3c2410/gta02.h
+++ linux-2.6.24/include/asm-arm/arch-s3c2410/gta02.h
-@@ -36,6 +36,7 @@
+@@ -37,6 +37,7 @@
#define GTA02v3_GPIO_nG1_CS S3C2410_GPD12 /* v3 + v4 only */
#define GTA02v3_GPIO_nG2_CS S3C2410_GPD13 /* v3 + v4 only */
Modified: branches/src/target/kernel/2.6.24.x/patches/gta02-core.patch
===================================================================
--- branches/src/target/kernel/2.6.24.x/patches/gta02-core.patch
2008-04-01 01:53:34 UTC (rev 4282)
+++ branches/src/target/kernel/2.6.24.x/patches/gta02-core.patch
2008-04-01 03:11:43 UTC (rev 4283)
@@ -2,7 +2,7 @@
===================================================================
--- /dev/null
+++ linux-2.6.24/arch/arm/mach-s3c2440/mach-gta02.c
-@@ -0,0 +1,824 @@
+@@ -0,0 +1,826 @@
+/*
+ * linux/arch/arm/mach-s3c2440/mach-gta02.c
+ *
@@ -261,6 +261,7 @@
+ case GTA02v3_SYSTEM_REV:
+ case GTA02v4_SYSTEM_REV:
+ case GTA02v5_SYSTEM_REV:
++ case GTA02v6_SYSTEM_REV:
+ /* we need to keep the 1.8V going since this is the SDRAM
+ * self-refresh voltage */
+ gta02_pcf_pdata.rails[PCF50633_REGULATOR_DOWN2].flags =
@@ -612,6 +613,7 @@
+ case GTA02v3_SYSTEM_REV:
+ case GTA02v4_SYSTEM_REV:
+ case GTA02v5_SYSTEM_REV:
++ case GTA02v6_SYSTEM_REV:
+ /* depend on pcf50633 driver init */
+ if (!pcf50633_global)
+ while (!pcf50633_global)
@@ -831,7 +833,7 @@
===================================================================
--- /dev/null
+++ linux-2.6.24/include/asm-arm/arch-s3c2410/gta02.h
-@@ -0,0 +1,98 @@
+@@ -0,0 +1,99 @@
+#ifndef _GTA02_H
+#define _GTA02_H
+
@@ -844,6 +846,7 @@
+#define GTA02v3_SYSTEM_REV 0x00000330
+#define GTA02v4_SYSTEM_REV 0x00000340
+#define GTA02v5_SYSTEM_REV 0x00000350
++#define GTA02v6_SYSTEM_REV 0x00000360
+
+#define GTA02_GPIO_n3DL_GSM S3C2410_GPA13 /* v1 + v2 + v3 only */
+
Modified: branches/src/target/kernel/2.6.24.x/patches/gta02-power_control.patch
===================================================================
--- branches/src/target/kernel/2.6.24.x/patches/gta02-power_control.patch
2008-04-01 01:53:34 UTC (rev 4282)
+++ branches/src/target/kernel/2.6.24.x/patches/gta02-power_control.patch
2008-04-01 03:11:43 UTC (rev 4283)
@@ -12,7 +12,7 @@
#define DRVMSG "FIC Neo1973 Bluetooth Power Management"
-@@ -27,14 +29,30 @@ static ssize_t bt_read(struct device *de
+@@ -27,14 +29,30 @@
char *buf)
{
if (!strcmp(attr->attr.name, "power_on")) {
@@ -50,7 +50,7 @@
}
return strlcpy(buf, "0\n", 3);
-@@ -48,20 +66,37 @@ static ssize_t bt_write(struct device *d
+@@ -48,20 +66,37 @@
unsigned long on = simple_strtoul(buf, NULL, 10);
if (!strcmp(attr->attr.name, "power_on")) {
@@ -99,7 +99,7 @@
}
return count;
-@@ -107,9 +142,16 @@ static int __init gta01_bt_probe(struct
+@@ -107,9 +142,16 @@
{
dev_info(&pdev->dev, DRVMSG ": starting\n");
@@ -139,7 +139,7 @@
struct gta01pm_priv {
int gpio_ngsm_en;
struct console *con;
-@@ -54,8 +61,16 @@ static ssize_t gsm_read(struct device *d
+@@ -54,8 +61,16 @@
if (s3c2410_gpio_getpin(GTA01_GPIO_MODEM_RST))
goto out_1;
} else if (!strcmp(attr->attr.name, "download")) {
@@ -158,7 +158,7 @@
}
return strlcpy(buf, "0\n", 3);
-@@ -70,32 +85,65 @@ static ssize_t gsm_write(struct device *
+@@ -70,32 +85,67 @@
if (!strcmp(attr->attr.name, "power_on")) {
if (on) {
@@ -181,6 +181,7 @@
+ case GTA02v3_SYSTEM_REV:
+ case GTA02v4_SYSTEM_REV:
+ case GTA02v5_SYSTEM_REV:
++ case GTA02v6_SYSTEM_REV:
+ pcf50633_gpio_set(pcf50633_global,
+ PCF50633_GPIO2, 1);
+ break;
@@ -197,6 +198,7 @@
+ case GTA02v3_SYSTEM_REV:
+ case GTA02v4_SYSTEM_REV:
+ case GTA02v5_SYSTEM_REV:
++ case GTA02v6_SYSTEM_REV:
+ pcf50633_gpio_set(pcf50633_global,
+ PCF50633_GPIO2, 0);
+ break;
@@ -231,7 +233,7 @@
}
return count;
-@@ -111,6 +159,9 @@ static int gta01_gsm_suspend(struct plat
+@@ -111,6 +161,9 @@
/* GPIO state is saved/restored by S3C2410 core GPIO driver, so we
* don't need to do anything here */
@@ -241,7 +243,7 @@
return 0;
}
-@@ -124,6 +175,8 @@ static int gta01_gsm_resume(struct platf
+@@ -124,6 +177,8 @@
if (s3c2410_gpio_getpin(GTA01_GPIO_MODEM_ON) && gta01_gsm.con)
console_stop(gta01_gsm.con);
@@ -250,7 +252,7 @@
return 0;
}
#else
-@@ -134,7 +187,7 @@ static int gta01_gsm_resume(struct platf
+@@ -134,7 +189,7 @@
static struct attribute *gta01_gsm_sysfs_entries[] = {
&dev_attr_power_on.attr,
&dev_attr_reset.attr,
@@ -259,7 +261,7 @@
NULL
};
-@@ -158,8 +211,17 @@ static int __init gta01_gsm_probe(struct
+@@ -158,8 +213,18 @@
gta01_gsm.gpio_ngsm_en = GTA01Bv2_GPIO_nGSM_EN;
s3c2410_gpio_setpin(GTA01v3_GPIO_nGSM_EN, 0);
break;
@@ -269,6 +271,7 @@
+ case GTA02v3_SYSTEM_REV:
+ case GTA02v4_SYSTEM_REV:
+ case GTA02v5_SYSTEM_REV:
++ case GTA02v6_SYSTEM_REV:
+ gta01_gsm.gpio_ngsm_en = 0;
+ break;
+#endif
@@ -278,7 +281,7 @@
"some PM features not available!!!\n",
system_rev);
break;
-@@ -175,9 +237,13 @@ static int __init gta01_gsm_probe(struct
+@@ -175,9 +240,13 @@
break;
}
@@ -320,7 +323,7 @@
/* This is the 2.8V supply for the RTC crystal, the mail clock crystal and
* the input to VDD_RF */
-@@ -248,15 +256,42 @@ static int gps_power_1v5_get(void)
+@@ -248,15 +256,42 @@
/* This is the POWERON pin */
static void gps_pwron_set(int on)
{
@@ -368,7 +371,7 @@
}
/* This is the nRESET pin */
-@@ -441,17 +476,40 @@ static DEVICE_ATTR(power_sequence, 0644,
+@@ -441,17 +476,40 @@
static int gta01_pm_gps_suspend(struct platform_device *pdev,
pm_message_t state)
{
@@ -413,7 +416,7 @@
return 0;
}
#else
-@@ -476,59 +534,109 @@ static struct attribute_group gta01_gps_
+@@ -476,59 +534,110 @@
.attrs = gta01_gps_sysfs_entries,
};
@@ -524,6 +527,7 @@
+ case GTA02v3_SYSTEM_REV:
+ case GTA02v4_SYSTEM_REV:
+ case GTA02v5_SYSTEM_REV:
++ case GTA02v6_SYSTEM_REV:
+ pcf50633_voltage_set(pcf50633_global,
+ PCF50633_REGULATOR_LDO5, 3000);
+ pcf50633_onoff_set(pcf50633_global,
--- End Message ---
--- Begin Message ---
Author: erin_yueh
Date: 2008-04-01 05:27:12 +0200 (Tue, 01 Apr 2008)
New Revision: 4284
Modified:
trunk/src/target/OM-2007.2/applications/openmoko-messages2/ChangeLog
trunk/src/target/OM-2007.2/applications/openmoko-messages2/src/sms-dbus.c
Log:
openmoko-messages2: fix the unitialised variable error
Modified: trunk/src/target/OM-2007.2/applications/openmoko-messages2/ChangeLog
===================================================================
--- trunk/src/target/OM-2007.2/applications/openmoko-messages2/ChangeLog
2008-04-01 03:11:43 UTC (rev 4283)
+++ trunk/src/target/OM-2007.2/applications/openmoko-messages2/ChangeLog
2008-04-01 03:27:12 UTC (rev 4284)
@@ -1,3 +1,8 @@
+2008-04-01 Erin Yueh <[EMAIL PROTECTED]>
+
+ * src/sms-dbus.c: (sms_dbus_send_message):
+ fix unitialised variable error
+
2008-03-31 Thomas Wood <[EMAIL PROTECTED]>
* src/sms-notes.c: (page_shown), (sms_notes_page_new):
Modified:
trunk/src/target/OM-2007.2/applications/openmoko-messages2/src/sms-dbus.c
===================================================================
--- trunk/src/target/OM-2007.2/applications/openmoko-messages2/src/sms-dbus.c
2008-04-01 03:11:43 UTC (rev 4283)
+++ trunk/src/target/OM-2007.2/applications/openmoko-messages2/src/sms-dbus.c
2008-04-01 03:27:12 UTC (rev 4284)
@@ -116,12 +116,8 @@
sms_dbus_send_message (SmsDbus *sms_dbus, const gchar *uid, const gchar
*number,
const gchar *message, GError **error)
{
- EContact *contact;
-
SmsDbusData *data;
- g_object_unref (contact);
-
data = g_slice_new0 (SmsDbusData);
data->data = sms_dbus->priv;
data->uid = g_strdup (uid);
--- End Message ---
--- Begin Message ---
Author: werner
Date: 2008-04-01 05:47:47 +0200 (Tue, 01 Apr 2008)
New Revision: 4285
Modified:
branches/src/target/kernel/2.6.24.x/patches/gta02-acc.patch
branches/src/target/kernel/2.6.24.x/patches/introduce-fiq-basis.patch
Log:
fix-lis302dl-isr-lock.patch
It seems that the two accelermoter interrupts can interrupt each other after
some
time and destroy one interrupt acknowledge action by starting an acknowledge for
the second accelermoter partway through. Since the two are edge-triggered
interrupts
after this happens we do not see any more interrupts from the one whose
acknowledge
was broken.
This patch protects the acknowldge / poll ISR with a spinlock that defers
interrupt
acknowledge by the processor until the service for the first accelerometer is
completed.
Signed-off-by: Andy Green <[EMAIL PROTECTED]>
---
arch/arm/mach-s3c2440/mach-gta02.c | 13 +++++++++++--
1 files changed, 11 insertions(+), 2 deletions(-)
gta02-acc.patch: applied fix-lis302dl-isr-lock.patch
introduce-fiq-basis.patch: make sure motion_irq_lock stays below the includes
Modified: branches/src/target/kernel/2.6.24.x/patches/gta02-acc.patch
===================================================================
--- branches/src/target/kernel/2.6.24.x/patches/gta02-acc.patch 2008-04-01
03:27:12 UTC (rev 4284)
+++ branches/src/target/kernel/2.6.24.x/patches/gta02-acc.patch 2008-04-01
03:47:47 UTC (rev 4285)
@@ -2,7 +2,17 @@
===================================================================
--- linux-2.6.24.orig/arch/arm/mach-s3c2440/mach-gta02.c
+++ linux-2.6.24/arch/arm/mach-s3c2440/mach-gta02.c
-@@ -375,8 +375,6 @@
+@@ -78,6 +78,9 @@
+
+ #include <linux/glamofb.h>
+
++/* arbitrates which sensor IRQ owns the shared SPI bus */
++static spinlock_t motion_irq_lock;
++
+ static struct map_desc gta02_iodesc[] __initdata = {
+ {
+ .virtual = 0xe0000000,
+@@ -377,8 +380,6 @@
&s3c_device_usbgadget,
&s3c_device_nand,
&s3c_device_ts,
@@ -11,7 +21,7 @@
>a02_nor_flash,
};
-@@ -476,10 +474,12 @@
+@@ -478,10 +479,12 @@
},
};
@@ -24,7 +34,7 @@
static struct glamo_spigpio_info glamo_spigpio_cfg = {
.pin_clk = GLAMO_GPIO10_OUTPUT,
-@@ -505,16 +505,93 @@
+@@ -507,16 +510,97 @@
/* SPI: Accelerometers attached to SPI of s3c244x */
@@ -39,8 +49,9 @@
+ * Foreground / interrupt arbitration is okay because the interrupts are
+ * disabled around all the foreground SPI code.
+ *
-+ * Interrupt / Interrupt arbitration is okay because the interrupts are
-+ * at the same priority (I think)
++ * Interrupt / Interrupt arbitration is evidently needed, otherwise we
++ * lose edge-triggered service after a while due to the two sensors sharing
++ * the SPI bus having irqs at the same time eventually.
+ *
+ * Servicing is typ 75 - 100us at 400MHz.
+ */
@@ -54,10 +65,12 @@
+ struct lis302dl_platform_data *pdata = lis->pdata;
+ u8 shifter = 0xc0 | LIS302DL_REG_OUT_X; /* read, autoincrement */
+ int n, n1;
++ unsigned long flags;
+#ifdef DEBUG_SPEW_MS
+ s8 x, y, z;
+#endif
+
++ spin_lock_irqsave(&motion_irq_lock, flags);
+ s3c2410_gpio_setpin(pdata->pin_chip_select, 0);
+ for (n = 0; n < 8; n++) { /* write the r/w, inc and address */
+ s3c2410_gpio_setpin(pdata->pin_clk, 0);
@@ -95,6 +108,7 @@
+ }
+ }
+ s3c2410_gpio_setpin(pdata->pin_chip_select, 1);
++ spin_unlock_irqrestore(&motion_irq_lock, flags);
+ input_sync(lis->input_dev);
+#ifdef DEBUG_SPEW_MS
+ printk("%s: %d %d %d\n", pdata->name, x, y, z);
@@ -123,7 +137,7 @@
},
};
-@@ -523,26 +600,75 @@
+@@ -525,26 +609,75 @@
.modalias = "lis302dl",
.platform_data = &lis302_pdata[0],
.irq = GTA02_IRQ_GSENSOR_1,
@@ -205,7 +219,12 @@
};
static struct resource gta02_led_resources[] = {
-@@ -785,7 +911,6 @@
+@@ -786,10 +919,11 @@
+ {
+ int rc;
+
++ spin_lock_init(&motion_irq_lock);
++
s3c_device_usb.dev.platform_data = >a02_usb_info;
s3c_device_nand.dev.platform_data = >a02_nand_info;
s3c_device_sdi.dev.platform_data = >a02_mmc_cfg;
@@ -213,7 +232,7 @@
/* Only GTA02v1 has a SD_DETECT GPIO. Since the slot is not
* hot-pluggable, this is not required anyway */
-@@ -797,6 +922,12 @@
+@@ -801,6 +935,12 @@
break;
}
@@ -226,7 +245,7 @@
INIT_WORK(>a02_udc_vbus_drawer.work, __gta02_udc_vbus_draw);
s3c24xx_udc_set_platdata(>a02_udc_cfg);
set_s3c2410ts_info(>a02_ts_cfg);
-@@ -825,6 +956,7 @@
+@@ -829,6 +969,7 @@
break;
}
@@ -944,7 +963,7 @@
===================================================================
--- linux-2.6.24.orig/arch/arm/mach-s3c2410/mach-gta01.c
+++ linux-2.6.24/arch/arm/mach-s3c2410/mach-gta01.c
-@@ -521,7 +521,7 @@
+@@ -510,7 +510,7 @@
},
};
Modified: branches/src/target/kernel/2.6.24.x/patches/introduce-fiq-basis.patch
===================================================================
--- branches/src/target/kernel/2.6.24.x/patches/introduce-fiq-basis.patch
2008-04-01 03:27:12 UTC (rev 4284)
+++ branches/src/target/kernel/2.6.24.x/patches/introduce-fiq-basis.patch
2008-04-01 03:47:47 UTC (rev 4285)
@@ -368,13 +368,16 @@
===================================================================
--- linux-2.6.24.orig/arch/arm/mach-s3c2440/mach-gta02.c
+++ linux-2.6.24/arch/arm/mach-s3c2440/mach-gta02.c
-@@ -78,6 +78,28 @@
+@@ -78,9 +78,31 @@
#include <linux/glamofb.h>
+#include <asm/arch/fiq_ipc_gta02.h>
+#include "fiq_c_isr.h"
+
+ /* arbitrates which sensor IRQ owns the shared SPI bus */
+ static spinlock_t motion_irq_lock;
+
+/* define FIQ IPC struct */
+/*
+ * contains stuff FIQ ISR modifies and normal kernel code can see and use
--- End Message ---
--- Begin Message ---
Author: werner
Date: 2008-04-01 05:54:33 +0200 (Tue, 01 Apr 2008)
New Revision: 4286
Modified:
trunk/src/target/u-boot/patches/fix-cpu-input-pulldowns.patch
Log:
Reverted changes to drivers/video/smedia3362.c (spill)
Modified: trunk/src/target/u-boot/patches/fix-cpu-input-pulldowns.patch
===================================================================
--- trunk/src/target/u-boot/patches/fix-cpu-input-pulldowns.patch
2008-04-01 03:47:47 UTC (rev 4285)
+++ trunk/src/target/u-boot/patches/fix-cpu-input-pulldowns.patch
2008-04-01 03:54:33 UTC (rev 4286)
@@ -43,29 +43,3 @@
gpio->GPJDAT |= (1 << 4) | (1 << 6);
/* Set GPJ4 to high (nGSM_EN) */
/* Set GPJ6 to high (nDL_GSM) */
-Index: u-boot/drivers/video/smedia3362.c
-===================================================================
---- u-boot.orig/drivers/video/smedia3362.c
-+++ u-boot/drivers/video/smedia3362.c
-@@ -95,7 +95,7 @@
- 0x2020, 0x3650, 0x0002, 0x01FF, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x000D, 0x000B, 0x00EE, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
-- 0x1839, 0x0000, 0x2000, 0x0101, 0x0100, 0x0000, 0x0000, 0x0000,
-+ 0x1839, 0x0000, 0x2000, 0x0001 /*0101*/, 0x0100, 0x0000, 0x0000, 0x0000,
- 0x05DB, 0x5231, 0x09C3, 0x8261, 0x0003, 0x0000, 0x0000, 0x0000,
- 0x000F, 0x101E, 0xC0C3, 0x101E, 0x000F, 0x0001, 0x030F, 0x020F,
- 0x080F, 0x0F0F
-@@ -118,10 +118,10 @@
- 0x00C0, 0x00C0, 0x00C0, 0x00C0, 0x00C0, 0x00C0, 0x00C0, 0x00C0,
- 0x00C0, 0x00C0, 0x00C0, 0x00C0, 0x00C0, 0x00C0, 0x00C0, 0x00C0,
- 0x00C0, 0x00C0, 0x00C0, 0x00C0, 0x00C0, 0x00C0, 0x00C0, 0x00C0,
-- 0x0873, 0xAFAF, 0x0108, 0x0010, 0x0000, 0x0000, 0x0000, 0x0000,
-+ 0x0c74, 0xAFAF, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x1002, 0x6006, 0x00FF, 0x0001, 0x0020, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
-- 0x3210, 0x5432, 0xE100, 0x01D6
-+ 0x3210, 0x5432, 0xE100, 0x00d6/*0x01D6 */
- };
-
- #define glamofb_cmdq_empty() (glamo_reg_read(GLAMO_REGOFS_LCD + \
--- End Message ---
--- Begin Message ---
Author: werner
Date: 2008-04-01 06:36:34 +0200 (Tue, 01 Apr 2008)
New Revision: 4287
Modified:
trunk/src/host/devirginator/environment.in
Log:
environment.in: changed menu item "Reset" to "Reboot"
Modified: trunk/src/host/devirginator/environment.in
===================================================================
--- trunk/src/host/devirginator/environment.in 2008-04-01 03:54:33 UTC (rev
4286)
+++ trunk/src/host/devirginator/environment.in 2008-04-01 04:36:34 UTC (rev
4287)
@@ -130,7 +130,7 @@
setenv stderr serial
menu_6=
- Reset:
+ Reboot:
reset
#ifdef UNUSED
--- End Message ---
--- Begin Message ---
Author: werner
Date: 2008-04-01 07:35:32 +0200 (Tue, 01 Apr 2008)
New Revision: 4288
Added:
trunk/src/target/dynenv/
trunk/src/target/dynenv/Makefile
trunk/src/target/dynenv/README
trunk/src/target/dynenv/dynenv.c
trunk/src/target/dynenv/mtd-abi.h
Log:
"dynenv" is a utility to read or write the u-boot environment pointer stored
in the OOB area of NAND.
Added: trunk/src/target/dynenv/Makefile
===================================================================
--- trunk/src/target/dynenv/Makefile 2008-04-01 04:36:34 UTC (rev 4287)
+++ trunk/src/target/dynenv/Makefile 2008-04-01 05:35:32 UTC (rev 4288)
@@ -0,0 +1,14 @@
+CC=arm-angstrom-linux-gnueabi-gcc
+
+CFLAGS=-Wall -g
+
+.PHONY: all clean spotless
+
+all: dynenv
+
+dynenv: dynenv.c
+
+clean:
+
+spotless:
+ rm -f dynenv
Added: trunk/src/target/dynenv/README
===================================================================
--- trunk/src/target/dynenv/README 2008-04-01 04:36:34 UTC (rev 4287)
+++ trunk/src/target/dynenv/README 2008-04-01 05:35:32 UTC (rev 4288)
@@ -0,0 +1,29 @@
+dynenv - Read and write the Dynamic Environment Pointer
+=======================================================
+
+*
+* Copyright (C) 2008 by OpenMoko, Inc.
+* Written by Werner Almesberger <[EMAIL PROTECTED]>
+* All Rights Reserved
+*
+* mtd-abi.h is a verbatim copy from mtd-utils.
+*
+
+
+usage: dynenv device [pointer]
+
+"dynenv" reads or writes the pointer that indicates to u-boot from which
+NAND location to load the environment. This pointer is stored in the OOB
+area of the first page of the NAND Flash.
+
+"device" is the device containing the first page of the NAND. "pointer"
+is the new value to write. "pointer" follows the usual C notation.
+
+Examples:
+
+# dynenv /dev/mtd1
+# dynenv /dev/mtd1 0x40000
+# dynenv /dev/mtd1 0x`awk '/mtd1/{print $2}' </proc/mtd`
+
+(Note that the NAND Flash starts with /dev/mtd1 on GTA02 but with
+/dev/mtd0 on GTA01.)
Added: trunk/src/target/dynenv/dynenv.c
===================================================================
--- trunk/src/target/dynenv/dynenv.c 2008-04-01 04:36:34 UTC (rev 4287)
+++ trunk/src/target/dynenv/dynenv.c 2008-04-01 05:35:32 UTC (rev 4288)
@@ -0,0 +1,147 @@
+/*
+ * dynenv - Read and write the Dynamic Environment Pointer
+ *
+ * Copyright (C) 2008 by OpenMoko, Inc.
+ * Written by Werner Almesberger <[EMAIL PROTECTED]>
+ * All Rights Reserved
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ */
+
+
+#include <stdint.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <unistd.h>
+#include <string.h>
+#include <fcntl.h>
+#include <sys/ioctl.h>
+
+#include "mtd-abi.h"
+
+
+static void get_buf(int fd, uint8_t *buf)
+{
+ struct mtd_oob_buf oob = {
+ .start = 8,
+ .length = 8,
+ .ptr = buf,
+ };
+
+ if (ioctl(fd, MEMREADOOB, &oob) != 0) {
+ perror("ioctl(MEMREADOOB)");
+ exit(1);
+ }
+
+}
+
+
+static int erased_q(int fd)
+{
+ uint8_t buf[8];
+
+ get_buf(fd, buf);
+ return !memcmp(buf, "\xff\xff\xff\xff\xff\xff\xff\xff", 8);
+}
+
+
+static uint32_t get_ptr(int fd)
+{
+ uint8_t buf[8];
+
+ get_buf(fd, buf);
+ if (memcmp(buf, "ENV0", 4)) {
+ fprintf(stderr, "environment pointer marker is absent\n");
+ exit(1);
+ }
+ return buf[4] | (buf[5] << 8) | (buf[6] << 16) | (buf[7] << 24);
+}
+
+
+static void set_ptr(int fd, uint32_t ptr)
+{
+ uint8_t buf[8] = "ENV0";
+ struct mtd_oob_buf oob = {
+ .start = 8,
+ .length = 8,
+ .ptr = buf,
+ };
+
+ buf[4] = ptr;
+ buf[5] = ptr >> 8;
+ buf[6] = ptr >> 16;
+ buf[7] = ptr >> 24;
+ if (ioctl(fd, MEMWRITEOOB, &oob) != 0) {
+ perror("ioctl(MEMWRITEOOB)");
+ exit(1);
+ }
+}
+
+
+static void usage(const char *name)
+{
+ fprintf(stderr, "usage: %s device [pointer]\n", name);
+ exit(1);
+}
+
+
+int main(int argc, char **argv)
+{
+ char *end;
+ int wr = 0;
+ unsigned long ptr;
+ int fd;
+
+ switch (argc) {
+ case 2:
+ break;
+ case 3:
+ wr = 1;
+ ptr = strtoul(argv[2], &end, 0);
+ if (*end || (ptr & ~0xffffffffUL))
+ usage(*argv);
+ break;
+ default:
+ usage(*argv);
+ }
+
+ fd = open(argv[1], wr ? O_RDWR : O_RDONLY);
+ if (fd < 0) {
+ perror(argv[1]);
+ exit(1);
+ }
+ if (wr) {
+ uint32_t got;
+
+ if (!erased_q(fd)) {
+ got = get_ptr(fd);
+ if (ptr == got)
+ return 0;
+/*
+ * We could use the following check instead of the stricter check for either
+ * identity or complete erasure (this is what u-boot does). However, it's quite
+ * unlikely that anything good would come from this, so we don't.
+ *
+ * if (ptr & ~got) {
+ */
+ fprintf(stderr, "please erase OOB block first\n");
+ exit(1);
+ }
+ set_ptr(fd, ptr);
+ got = get_ptr(fd);
+ if (ptr != got) {
+ fprintf(stderr, "write failed (0x%lx != 0x%lx)\n",
+ (unsigned long) got, (unsigned long) ptr);
+ exit(1);
+
+ }
+ }
+ else {
+ printf("0x%lx\n", (unsigned long) get_ptr(fd));
+ exit(1);
+ }
+ return 0;
+}
Added: trunk/src/target/dynenv/mtd-abi.h
===================================================================
--- trunk/src/target/dynenv/mtd-abi.h 2008-04-01 04:36:34 UTC (rev 4287)
+++ trunk/src/target/dynenv/mtd-abi.h 2008-04-01 05:35:32 UTC (rev 4288)
@@ -0,0 +1,158 @@
+/*
+ * $Id: mtd-abi.h,v 1.13 2005/11/07 11:14:56 gleixner Exp $
+ *
+ * Portions of MTD ABI definition which are shared by kernel and user space
+ */
+
+#ifndef __MTD_ABI_H__
+#define __MTD_ABI_H__
+
+#ifndef __KERNEL__ /* Urgh. The whole point of splitting this out into
+ separate files was to avoid #ifdef __KERNEL__ */
+#define __user
+#endif
+
+struct erase_info_user {
+ uint32_t start;
+ uint32_t length;
+};
+
+struct mtd_oob_buf {
+ uint32_t start;
+ uint32_t length;
+ unsigned char __user *ptr;
+};
+
+#define MTD_ABSENT 0
+#define MTD_NORFLASH 3
+#define MTD_NANDFLASH 4
+#define MTD_DATAFLASH 6
+#define MTD_GENERIC_TYPE 7
+
+#define MTD_WRITEABLE 0x400 /* Device is writeable */
+#define MTD_BIT_WRITEABLE 0x800 /* Single bits can be flipped */
+#define MTD_NO_ERASE 0x1000 /* No erase necessary */
+
+// Some common devices / combinations of capabilities
+#define MTD_CAP_ROM 0
+#define MTD_CAP_RAM (MTD_WRITEABLE | MTD_BIT_WRITEABLE |
MTD_NO_ERASE)
+#define MTD_CAP_NORFLASH (MTD_WRITEABLE | MTD_BIT_WRITEABLE)
+#define MTD_CAP_NANDFLASH (MTD_WRITEABLE)
+
+
+// Types of automatic ECC/Checksum available
+#define MTD_ECC_NONE 0 // No automatic ECC available
+#define MTD_ECC_RS_DiskOnChip 1 // Automatic ECC on DiskOnChip
+#define MTD_ECC_SW 2 // SW ECC for Toshiba & Samsung devices
+
+/* ECC byte placement */
+#define MTD_NANDECC_OFF 0 // Switch off ECC (Not
recommended)
+#define MTD_NANDECC_PLACE 1 // Use the given placement in the
structure (YAFFS1 legacy mode)
+#define MTD_NANDECC_AUTOPLACE 2 // Use the default placement scheme
+#define MTD_NANDECC_PLACEONLY 3 // Use the given placement in the
structure (Do not store ecc result on read)
+#define MTD_NANDECC_AUTOPL_USR 4 // Use the given autoplacement
scheme rather than using the default
+
+/* OTP mode selection */
+#define MTD_OTP_OFF 0
+#define MTD_OTP_FACTORY 1
+#define MTD_OTP_USER 2
+
+struct mtd_info_user {
+ uint8_t type;
+ uint32_t flags;
+ uint32_t size; // Total size of the MTD
+ uint32_t erasesize;
+ uint32_t writesize;
+ uint32_t oobsize; // Amount of OOB data per block (e.g. 16)
+ uint32_t ecctype;
+ uint32_t eccsize;
+};
+
+struct region_info_user {
+ uint32_t offset; /* At which this region starts,
+ * from the beginning of the MTD */
+ uint32_t erasesize; /* For this region */
+ uint32_t numblocks; /* Number of blocks in this region */
+ uint32_t regionindex;
+};
+
+struct otp_info {
+ uint32_t start;
+ uint32_t length;
+ uint32_t locked;
+};
+
+#define MEMGETINFO _IOR('M', 1, struct mtd_info_user)
+#define MEMERASE _IOW('M', 2, struct erase_info_user)
+#define MEMWRITEOOB _IOWR('M', 3, struct mtd_oob_buf)
+#define MEMREADOOB _IOWR('M', 4, struct mtd_oob_buf)
+#define MEMLOCK _IOW('M', 5, struct erase_info_user)
+#define MEMUNLOCK _IOW('M', 6, struct erase_info_user)
+#define MEMGETREGIONCOUNT _IOR('M', 7, int)
+#define MEMGETREGIONINFO _IOWR('M', 8, struct region_info_user)
+#define MEMSETOOBSEL _IOW('M', 9, struct nand_oobinfo)
+#define MEMGETOOBSEL _IOR('M', 10, struct nand_oobinfo)
+#define MEMGETBADBLOCK _IOW('M', 11, loff_t)
+#define MEMSETBADBLOCK _IOW('M', 12, loff_t)
+#define OTPSELECT _IOR('M', 13, int)
+#define OTPGETREGIONCOUNT _IOW('M', 14, int)
+#define OTPGETREGIONINFO _IOW('M', 15, struct otp_info)
+#define OTPLOCK _IOR('M', 16, struct otp_info)
+#define ECCGETLAYOUT _IOR('M', 17, struct nand_ecclayout)
+#define ECCGETSTATS _IOR('M', 18, struct mtd_ecc_stats)
+#define MTDFILEMODE _IO('M', 19)
+
+/*
+ * Obsolete legacy interface. Keep it in order not to break userspace
+ * interfaces
+ */
+struct nand_oobinfo {
+ uint32_t useecc;
+ uint32_t eccbytes;
+ uint32_t oobfree[8][2];
+ uint32_t eccpos[32];
+};
+
+struct nand_oobfree {
+ uint32_t offset;
+ uint32_t length;
+};
+
+#define MTD_MAX_OOBFREE_ENTRIES 8
+/*
+ * ECC layout control structure. Exported to userspace for
+ * diagnosis and to allow creation of raw images
+ */
+struct nand_ecclayout {
+ uint32_t eccbytes;
+ uint32_t eccpos[64];
+ uint32_t oobavail;
+ struct nand_oobfree oobfree[MTD_MAX_OOBFREE_ENTRIES];
+};
+
+/**
+ * struct mtd_ecc_stats - error correction status
+ *
+ * @corrected: number of corrected bits
+ * @failed: number of uncorrectable errors
+ * @badblocks: number of bad blocks in this partition
+ * @bbtblocks: number of blocks reserved for bad block tables
+ */
+struct mtd_ecc_stats {
+ uint32_t corrected;
+ uint32_t failed;
+ uint32_t badblocks;
+ uint32_t bbtblocks;
+};
+
+/*
+ * Read/write file modes for access to MTD
+ */
+enum mtd_file_modes {
+ MTD_MODE_NORMAL = MTD_OTP_OFF,
+ MTD_MODE_OTP_FACTORY = MTD_OTP_FACTORY,
+ MTD_MODE_OTP_USER = MTD_OTP_USER,
+ MTD_MODE_RAW,
+};
+
+#endif /* __MTD_ABI_H__ */
--- End Message ---
_______________________________________________
commitlog mailing list
[email protected]
http://lists.openmoko.org/mailman/listinfo/commitlog