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. r1806 - in
trunk/src/target/OM-2007/applications/openmoko-contacts: . src
([EMAIL PROTECTED])
2. r1807 - in
trunk/src/target/OM-2007/applications/openmoko-contacts: . src
([EMAIL PROTECTED])
3. r1808 - trunk/src/target/u-boot/patches
([EMAIL PROTECTED])
4. r1809 - trunk/src/target/u-boot/patches
([EMAIL PROTECTED])
--- Begin Message ---
Author: thomas
Date: 2007-04-19 13:47:35 +0200 (Thu, 19 Apr 2007)
New Revision: 1806
Modified:
trunk/src/target/OM-2007/applications/openmoko-contacts/ChangeLog
trunk/src/target/OM-2007/applications/openmoko-contacts/src/contacts-contact-pane.c
Log:
* src/contacts-contact-pane.c: (make_widget), (update_ui):
- Add support for internally tagging multi line fields
- Add address, birthday and notes fields
Modified: trunk/src/target/OM-2007/applications/openmoko-contacts/ChangeLog
===================================================================
--- trunk/src/target/OM-2007/applications/openmoko-contacts/ChangeLog
2007-04-19 09:07:56 UTC (rev 1805)
+++ trunk/src/target/OM-2007/applications/openmoko-contacts/ChangeLog
2007-04-19 11:47:35 UTC (rev 1806)
@@ -1,3 +1,9 @@
+2007-04-19 Thomas Wood <[EMAIL PROTECTED]>
+
+ * src/contacts-contact-pane.c: (make_widget), (update_ui):
+ - Add support for internally tagging multi line fields
+ - Add address, birthday and notes fields
+
2007-04-18 Thomas Wood <[EMAIL PROTECTED]>
* src/contacts-callbacks-ebook.c: (contacts_changed_cb):
Modified:
trunk/src/target/OM-2007/applications/openmoko-contacts/src/contacts-contact-pane.c
===================================================================
---
trunk/src/target/OM-2007/applications/openmoko-contacts/src/contacts-contact-pane.c
2007-04-19 09:07:56 UTC (rev 1805)
+++
trunk/src/target/OM-2007/applications/openmoko-contacts/src/contacts-contact-pane.c
2007-04-19 11:47:35 UTC (rev 1806)
@@ -70,26 +70,41 @@
{}
};
+typedef enum {
+ FIELD_UNIQUE = (1 << 1),
+ FIELD_MULTILINE = (1 << 2),
+ FIELD_NOLABEL = (1 << 3),
+} FieldOptions;
+
typedef struct {
char *vcard_field; /* vCard field name */
char *display_name; /* Human-readable name for display */
char *icon; /* Icon name for the menu */
- gboolean unique; /* If there can be only one of this field */
+ FieldOptions options; /* If there can be only one of this field */
char *format; /* format string */
VCardTypes *types;
/* TODO: add an extra changed callback so that N handler can update FN, etc
*/
} FieldInfo;
+#define FIELD_IS_UNIQUE(x) (x->options & FIELD_UNIQUE)
+#define FIELD_IS_MULTILINE(x) (x->options & FIELD_MULTILINE)
+#define FIELD_IS_NOLABEL(x) (x->options & FIELD_NOLABEL)
+
+
static GQuark attr_quark = 0;
static GQuark field_quark = 0;
static GQuark entry_quark = 0;
static FieldInfo fields[] = {
- { EVC_FN, "Name", NULL, TRUE, "<big><b>%s</b></big>", NULL },
- { EVC_ORG, "Organization", NULL, TRUE, "<span size=\"small\">%s</span>",
NULL },
- { EVC_EMAIL, "E-Mail", "stock_mail", FALSE, NULL, email_types },
- { EVC_TEL, "Telephone", NULL, FALSE, NULL, phone_types },
- { EVC_X_JABBER, "Jabber", GTK_STOCK_MISSING_IMAGE, FALSE, NULL, email_types
},
+ { EVC_FN, "Name", NULL, FIELD_UNIQUE | FIELD_NOLABEL,
"<big><b>%s</b></big>", NULL },
+ { EVC_ORG, "Organization", NULL, FIELD_UNIQUE | FIELD_NOLABEL, "<span
size=\"small\">%s</span>", NULL },
+
+ { EVC_EMAIL, "E-Mail", "stock_mail", 0, NULL, email_types },
+ { EVC_TEL, "Telephone", "stock_telephone", 0, NULL, phone_types },
+ { EVC_BDAY, "Birthday", "stock_birthday", FIELD_UNIQUE, NULL, NULL },
+ { EVC_ADR, "Address", "stock_address", FIELD_MULTILINE, NULL, email_types },
+
+ { EVC_NOTE, "Notes", NULL, FIELD_UNIQUE | FIELD_MULTILINE, NULL, NULL },
};
/* Function prototypes */
@@ -502,7 +517,7 @@
}
/* insert add/remove buttons */
- if (pane->priv->editable && !info->unique)
+ if (pane->priv->editable && !FIELD_IS_UNIQUE (info))
{
/* need to use an alignment here to stop the button expanding vertically */
GtkWidget *btn, *alignment;
@@ -525,23 +540,32 @@
/* The label (if required) */
- if (!info->unique && !pane->priv->editable && type)
+ if (!FIELD_IS_NOLABEL (info) && (!pane->priv->editable ||
FIELD_IS_UNIQUE(info)))
{
s = NULL;
- /* find the display name for the type */
- for (i = 0; info->types[i].display; i++)
+ /* Unique fields don't have different types, so just use the display name
+ * for the label */
+ if (FIELD_IS_UNIQUE (info))
{
- if (compare_types (type, info->types[i].vcard))
- {
- s = g_strdup_printf ("%s:", info->types[i].display);
- break;
- }
+ s = g_strdup_printf ("%s:", info->display_name);
}
-
- if (!s)
+ else
{
- s = g_strdup_printf ("%s:", type);
+ /* find the display name for the current type */
+ for (i = 0; info->types[i].display; i++)
+ {
+ if (compare_types (type, info->types[i].vcard))
+ {
+ s = g_strdup_printf ("%s:", info->types[i].display);
+ break;
+ }
+ }
+ /* if we couldn't find a display name, use the raw vcard name */
+ if (!s)
+ {
+ s = g_strdup_printf ("%s:", type);
+ }
}
@@ -553,7 +577,8 @@
g_free (s);
}
- if (info->types && pane->priv->editable)
+ /* Create the type selector, or label, depending on field */
+ if (!FIELD_IS_UNIQUE(info) && pane->priv->editable)
{
GtkWidget *combo;
gboolean is_custom_type = TRUE;
@@ -693,7 +718,7 @@
GtkWidget *table = gtk_table_new (2, 4, FALSE);
gtk_box_pack_start (GTK_BOX (pane), table, FALSE, FALSE, 4);
- /* Fast path unique fields, no need to search the entire contact */
+ /* Name Field */
attr = e_vcard_get_attribute (E_VCARD (pane->priv->contact),
fields[0].vcard_field);
if (!attr && pane->priv->editable) {
attr = e_vcard_attribute_new ("", fields[0].vcard_field);
@@ -702,6 +727,7 @@
w = make_widget (pane, attr, &fields[0]);
gtk_table_attach_defaults (GTK_TABLE (table), w, 1, 2, 0, 1);
+ /* Organisation Field (if required) */
attr = e_vcard_get_attribute (E_VCARD (pane->priv->contact),
fields[1].vcard_field);
if (!attr && pane->priv->editable) {
attr = e_vcard_attribute_new ("", fields[1].vcard_field);
@@ -715,12 +741,13 @@
has_org_field = TRUE;
}
+ /* Add Photo */
GtkImage *photo = contacts_load_photo (pane->priv->contact);
if (pane->priv->editable)
{
w = gtk_button_new ();
gtk_widget_set_name (w, "mokofingerbutton-big");
- gtk_container_add (GTK_CONTAINER (w), GTK_WIDGET (photo));
+ gtk_button_set_image (GTK_BUTTON (w), GTK_WIDGET (photo));
g_signal_connect (w, "clicked", (GCallback) choose_photo_cb, pane);
}
else
@@ -728,9 +755,9 @@
w = GTK_WIDGET (photo);
}
if (has_org_field)
- gtk_table_attach (GTK_TABLE (table), w, 0, 1, 0, 2, 0, 0, 6, 6);
+ gtk_table_attach (GTK_TABLE (table), w, 0, 1, 0, 2, 0, 0, 0, 0);
else
- gtk_table_attach (GTK_TABLE (table), w, 0, 1, 0, 1, 0, 0, 6, 6);
+ gtk_table_attach (GTK_TABLE (table), w, 0, 1, 0, 1, 0, 0, 0, 0);
gtk_widget_show_all (table);
@@ -739,7 +766,7 @@
FieldInfo *info;
info = &fields[i];
- if (info->unique) {
+ if (FIELD_IS_UNIQUE (info)) {
/* Fast path unique fields, no need to search the entire contact */
attr = e_vcard_get_attribute (E_VCARD (pane->priv->contact),
info->vcard_field);
if (!attr && pane->priv->editable) {
@@ -767,7 +794,7 @@
}
}
}
-
+
g_object_unref (pane->priv->size_group);
}
--- End Message ---
--- Begin Message ---
Author: thomas
Date: 2007-04-19 17:47:07 +0200 (Thu, 19 Apr 2007)
New Revision: 1807
Modified:
trunk/src/target/OM-2007/applications/openmoko-contacts/ChangeLog
trunk/src/target/OM-2007/applications/openmoko-contacts/src/contacts-callbacks-ebook.c
trunk/src/target/OM-2007/applications/openmoko-contacts/src/contacts-contact-pane.c
Log:
* src/contacts-callbacks-ebook.c: (contacts_added_cb),
(contacts_changed_cb):
* src/contacts-contact-pane.c: (field_changed), (make_widget):
Plug some leaks and other potential problems
Modified: trunk/src/target/OM-2007/applications/openmoko-contacts/ChangeLog
===================================================================
--- trunk/src/target/OM-2007/applications/openmoko-contacts/ChangeLog
2007-04-19 11:47:35 UTC (rev 1806)
+++ trunk/src/target/OM-2007/applications/openmoko-contacts/ChangeLog
2007-04-19 15:47:07 UTC (rev 1807)
@@ -1,5 +1,13 @@
2007-04-19 Thomas Wood <[EMAIL PROTECTED]>
+ * src/contacts-callbacks-ebook.c: (contacts_added_cb),
+ (contacts_changed_cb):
+ * src/contacts-contact-pane.c: (field_changed), (make_widget):
+
+ Plug some leaks and other potential problems
+
+2007-04-19 Thomas Wood <[EMAIL PROTECTED]>
+
* src/contacts-contact-pane.c: (make_widget), (update_ui):
- Add support for internally tagging multi line fields
- Add address, birthday and notes fields
Modified:
trunk/src/target/OM-2007/applications/openmoko-contacts/src/contacts-callbacks-ebook.c
===================================================================
---
trunk/src/target/OM-2007/applications/openmoko-contacts/src/contacts-callbacks-ebook.c
2007-04-19 11:47:35 UTC (rev 1806)
+++
trunk/src/target/OM-2007/applications/openmoko-contacts/src/contacts-callbacks-ebook.c
2007-04-19 15:47:07 UTC (rev 1807)
@@ -98,6 +98,7 @@
(data->contacts_groups, group->data);
}
}
+ g_list_foreach (contact_groups, (GFunc) g_free, NULL);
g_list_free (contact_groups);
}
}
@@ -134,7 +135,7 @@
/* TODO: There's some funniness going on here... */
/* Replace contact */
- g_object_unref (hash->contact);
+ /* g_object_unref (hash->contact); */
hash->contact = g_object_ref (contact);
hash->contacts_data = data;
g_hash_table_steal (data->contacts_table, uid);
Modified:
trunk/src/target/OM-2007/applications/openmoko-contacts/src/contacts-contact-pane.c
===================================================================
---
trunk/src/target/OM-2007/applications/openmoko-contacts/src/contacts-contact-pane.c
2007-04-19 11:47:35 UTC (rev 1806)
+++
trunk/src/target/OM-2007/applications/openmoko-contacts/src/contacts-contact-pane.c
2007-04-19 15:47:07 UTC (rev 1807)
@@ -215,15 +215,18 @@
/* don't save the value if we're just displaying the field name */
if (value && !strcmp (info->display_name, value))
return;
-
- /* TODO: this only handles single-valued attributes at the moment */
+
+ /* remove the current attributes */
e_vcard_attribute_remove_values (attr);
+ /* add the new attributes */
int i = 0;
gchar* s;
gchar** values = g_strsplit (value, ";", 0);
while ((s = values[i])) {
- e_vcard_attribute_add_value (attr, g_strstrip (s));
+ g_strstrip (s);
+ if (s)
+ e_vcard_attribute_add_value (attr, s);
i++;
}
g_strfreev (values);
@@ -513,7 +516,7 @@
if (type == NULL && info->types != NULL)
{
- type = info->types[0].vcard;
+ type = g_strdup (info->types[0].vcard);
}
/* insert add/remove buttons */
@@ -672,6 +675,7 @@
gtk_widget_show_all (box);
g_free (attr_value);
+ g_free (type);
return box;
}
--- End Message ---
--- Begin Message ---
Author: laforge
Date: 2007-04-19 18:09:23 +0200 (Thu, 19 Apr 2007)
New Revision: 1808
Modified:
trunk/src/target/u-boot/patches/uboot-s3c2440.patch
Log:
* add S3C2440 NAND driver support
Modified: trunk/src/target/u-boot/patches/uboot-s3c2440.patch
===================================================================
--- trunk/src/target/u-boot/patches/uboot-s3c2440.patch 2007-04-19 15:47:07 UTC
(rev 1807)
+++ trunk/src/target/u-boot/patches/uboot-s3c2440.patch 2007-04-19 16:09:23 UTC
(rev 1808)
@@ -2,8 +2,8 @@
Index: u-boot/include/s3c24x0.h
===================================================================
---- u-boot.orig/include/s3c24x0.h 2007-03-28 21:10:45.000000000 +0200
-+++ u-boot/include/s3c24x0.h 2007-03-28 21:10:49.000000000 +0200
+--- u-boot.orig/include/s3c24x0.h
++++ u-boot/include/s3c24x0.h
@@ -82,7 +82,7 @@
S3C24X0_REG32 PRIORITY;
S3C24X0_REG32 INTPND;
@@ -149,8 +149,8 @@
Index: u-boot/rtc/s3c24x0_rtc.c
===================================================================
---- u-boot.orig/rtc/s3c24x0_rtc.c 2007-03-28 21:10:45.000000000 +0200
-+++ u-boot/rtc/s3c24x0_rtc.c 2007-03-28 21:10:49.000000000 +0200
+--- u-boot.orig/rtc/s3c24x0_rtc.c
++++ u-boot/rtc/s3c24x0_rtc.c
@@ -34,6 +34,8 @@
#include <s3c2400.h>
#elif defined(CONFIG_S3C2410)
@@ -162,8 +162,8 @@
#include <rtc.h>
Index: u-boot/include/s3c2440.h
===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ u-boot/include/s3c2440.h 2007-03-29 18:46:17.000000000 +0200
+--- /dev/null
++++ u-boot/include/s3c2440.h
@@ -0,0 +1,300 @@
+/*
+ * (C) Copyright 2003
@@ -467,8 +467,8 @@
+#endif /*__S3C2440_H__*/
Index: u-boot/include/common.h
===================================================================
---- u-boot.orig/include/common.h 2007-03-28 21:10:45.000000000 +0200
-+++ u-boot/include/common.h 2007-03-28 21:10:49.000000000 +0200
+--- u-boot.orig/include/common.h
++++ u-boot/include/common.h
@@ -452,7 +452,7 @@
ulong get_OPB_freq (void);
ulong get_PCI_freq (void);
@@ -480,8 +480,8 @@
ulong get_FCLK (void);
Index: u-boot/cpu/arm920t/s3c24x0/usb_ohci.c
===================================================================
---- u-boot.orig/cpu/arm920t/s3c24x0/usb_ohci.c 2007-03-28 21:10:45.000000000
+0200
-+++ u-boot/cpu/arm920t/s3c24x0/usb_ohci.c 2007-03-28 21:10:49.000000000
+0200
+--- u-boot.orig/cpu/arm920t/s3c24x0/usb_ohci.c
++++ u-boot/cpu/arm920t/s3c24x0/usb_ohci.c
@@ -44,6 +44,8 @@
#include <s3c2400.h>
#elif defined(CONFIG_S3C2410)
@@ -493,8 +493,8 @@
#include <malloc.h>
Index: u-boot/cpu/arm920t/s3c24x0/speed.c
===================================================================
---- u-boot.orig/cpu/arm920t/s3c24x0/speed.c 2007-03-28 21:10:45.000000000
+0200
-+++ u-boot/cpu/arm920t/s3c24x0/speed.c 2007-03-28 21:10:49.000000000 +0200
+--- u-boot.orig/cpu/arm920t/s3c24x0/speed.c
++++ u-boot/cpu/arm920t/s3c24x0/speed.c
@@ -30,12 +30,15 @@
*/
@@ -557,8 +557,8 @@
+ defined(CONFIG_S3C2440) || defined (CONFIG_TRAB) */
Index: u-boot/cpu/arm920t/s3c24x0/interrupts.c
===================================================================
---- u-boot.orig/cpu/arm920t/s3c24x0/interrupts.c 2007-03-28
21:10:45.000000000 +0200
-+++ u-boot/cpu/arm920t/s3c24x0/interrupts.c 2007-03-28 21:10:49.000000000
+0200
+--- u-boot.orig/cpu/arm920t/s3c24x0/interrupts.c
++++ u-boot/cpu/arm920t/s3c24x0/interrupts.c
@@ -30,13 +30,16 @@
*/
@@ -612,8 +612,8 @@
+ defined(CONFIG_S3C2440) || defined (CONFIG_TRAB) */
Index: u-boot/cpu/arm920t/s3c24x0/serial.c
===================================================================
---- u-boot.orig/cpu/arm920t/s3c24x0/serial.c 2007-03-28 21:10:45.000000000
+0200
-+++ u-boot/cpu/arm920t/s3c24x0/serial.c 2007-03-28 21:10:49.000000000
+0200
+--- u-boot.orig/cpu/arm920t/s3c24x0/serial.c
++++ u-boot/cpu/arm920t/s3c24x0/serial.c
@@ -19,12 +19,15 @@
*/
@@ -640,8 +640,8 @@
+ defined(CONFIG_S3C2440) || defined (CONFIG_TRAB) */
Index: u-boot/cpu/arm920t/s3c24x0/i2c.c
===================================================================
---- u-boot.orig/cpu/arm920t/s3c24x0/i2c.c 2007-03-28 21:10:45.000000000
+0200
-+++ u-boot/cpu/arm920t/s3c24x0/i2c.c 2007-03-28 21:10:49.000000000 +0200
+--- u-boot.orig/cpu/arm920t/s3c24x0/i2c.c
++++ u-boot/cpu/arm920t/s3c24x0/i2c.c
@@ -34,6 +34,8 @@
#include <s3c2400.h>
#elif defined(CONFIG_S3C2410)
@@ -698,8 +698,8 @@
#ifdef CONFIG_S3C2400
Index: u-boot/drivers/usbdcore_s3c2410.c
===================================================================
---- u-boot.orig/drivers/usbdcore_s3c2410.c 2007-03-28 21:10:45.000000000
+0200
-+++ u-boot/drivers/usbdcore_s3c2410.c 2007-03-28 21:10:49.000000000 +0200
+--- u-boot.orig/drivers/usbdcore_s3c2410.c
++++ u-boot/drivers/usbdcore_s3c2410.c
@@ -24,7 +24,7 @@
#include <config.h>
@@ -711,8 +711,8 @@
Index: u-boot/drivers/usbtty.h
===================================================================
---- u-boot.orig/drivers/usbtty.h 2007-03-28 21:10:49.000000000 +0200
-+++ u-boot/drivers/usbtty.h 2007-03-28 21:10:49.000000000 +0200
+--- u-boot.orig/drivers/usbtty.h
++++ u-boot/drivers/usbtty.h
@@ -29,7 +29,7 @@
#include "usbdcore_mpc8xx.h"
#elif defined(CONFIG_OMAP1510)
@@ -724,8 +724,8 @@
Index: u-boot/cpu/arm920t/start.S
===================================================================
---- u-boot.orig/cpu/arm920t/start.S 2007-03-28 21:11:04.000000000 +0200
-+++ u-boot/cpu/arm920t/start.S 2007-03-29 20:28:29.000000000 +0200
+--- u-boot.orig/cpu/arm920t/start.S
++++ u-boot/cpu/arm920t/start.S
@@ -31,7 +31,11 @@
#include <config.h>
@@ -862,8 +862,8 @@
@ get ready to call C functions (for nand_read())
Index: u-boot/cpu/arm920t/s3c24x0/nand_read.c
===================================================================
---- u-boot.orig/cpu/arm920t/s3c24x0/nand_read.c 2007-03-28
22:40:45.000000000 +0200
-+++ u-boot/cpu/arm920t/s3c24x0/nand_read.c 2007-03-29 21:40:30.000000000
+0200
+--- u-boot.orig/cpu/arm920t/s3c24x0/nand_read.c
++++ u-boot/cpu/arm920t/s3c24x0/nand_read.c
@@ -16,30 +16,141 @@
*/
@@ -1070,3 +1070,153 @@
return 0;
}
+Index: u-boot/cpu/arm920t/s3c24x0/nand.c
+===================================================================
+--- u-boot.orig/cpu/arm920t/s3c24x0/nand.c
++++ u-boot/cpu/arm920t/s3c24x0/nand.c
+@@ -36,24 +36,54 @@
+ #define __REGi(x) (*(volatile unsigned int *)(x))
+
+ #define NF_BASE 0x4e000000
++
+ #define NFCONF __REGi(NF_BASE + 0x0)
+-#define NFCMD __REGb(NF_BASE + 0x4)
+-#define NFADDR __REGb(NF_BASE + 0x8)
+-#define NFDATA __REGb(NF_BASE + 0xc)
+-#define NFSTAT __REGb(NF_BASE + 0x10)
++
++#if defined(CONFIG_S3C2410)
++
++#define oNFCMD 0x4
++#define oNFADDR 0x8
++#define oNFDATA 0xc
++#define oNFSTAT 0x10
+ #define NFECC0 __REGb(NF_BASE + 0x14)
+ #define NFECC1 __REGb(NF_BASE + 0x15)
+ #define NFECC2 __REGb(NF_BASE + 0x16)
++#define NFCONF_nFCE (1<<11)
+
+ #define S3C2410_NFCONF_EN (1<<15)
+ #define S3C2410_NFCONF_512BYTE (1<<14)
+ #define S3C2410_NFCONF_4STEP (1<<13)
+ #define S3C2410_NFCONF_INITECC (1<<12)
+-#define S3C2410_NFCONF_nFCE (1<<11)
+ #define S3C2410_NFCONF_TACLS(x) ((x)<<8)
+ #define S3C2410_NFCONF_TWRPH0(x) ((x)<<4)
+ #define S3C2410_NFCONF_TWRPH1(x) ((x)<<0)
+
++#elif defined(CONFIG_S3C2440)
++
++#define oNFCMD 0x8
++#define oNFADDR 0xc
++#define oNFDATA 0x10
++#define oNFSTAT 0x20
++
++#define NFCONT __REGi(NF_BASE + 0x04)
++#define NFMECC0 __REGi(NF_BASE + 0x2C)
++#define NFCONF_nFCE (1<<1)
++#define S3C2440_NFCONF_INITECC (1<<4)
++#define S3C2440_NFCONF_MAINECCLOCK (1<<5)
++#define nand_select() (NFCONT &= ~(1 << 1))
++#define nand_deselect() (NFCONT |= (1 << 1))
++#define nand_clear_RnB() (NFSTAT |= (1 << 2))
++#define nand_detect_RB() { while(!(NFSTAT&(1<<2))); }
++#define nand_wait() { while(!(NFSTAT & 0x4)); } /* RnB_TransDectect
*/
++
++#endif
++
++#define NFCMD __REGb(NF_BASE + oNFCMD)
++#define NFADDR __REGb(NF_BASE + oNFADDR)
++#define NFDATA __REGb(NF_BASE + oNFDATA)
++#define NFSTAT __REGb(NF_BASE + oNFSTAT)
++
++
+ static void s3c2410_hwcontrol(struct mtd_info *mtd, int cmd)
+ {
+ struct nand_chip *chip = mtd->priv;
+@@ -62,23 +92,31 @@
+
+ switch (cmd) {
+ case NAND_CTL_SETNCE:
+- NFCONF &= ~S3C2410_NFCONF_nFCE;
++#if defined(CONFIG_S3C2410)
++ NFCONF &= ~NFCONF_nFCE;
++#elif defined(CONFIG_S3C2440)
++ NFCONT &= ~NFCONF_nFCE;
++#endif
+ DEBUGN("NFCONF=0x%08x\n", NFCONF);
+ break;
+ case NAND_CTL_CLRNCE:
+- NFCONF |= S3C2410_NFCONF_nFCE;
++#if defined(CONFIG_S3C2410)
++ NFCONF |= NFCONF_nFCE;
++#elif defined(CONFIG_S3C2440)
++ NFCONT &= ~NFCONF_nFCE;
++#endif
+ DEBUGN("NFCONF=0x%08x\n", NFCONF);
+ break;
+ case NAND_CTL_SETALE:
+- chip->IO_ADDR_W = NF_BASE + 0x8;
++ chip->IO_ADDR_W = NF_BASE + oNFADDR;
+ DEBUGN("SETALE\n");
+ break;
+ case NAND_CTL_SETCLE:
+- chip->IO_ADDR_W = NF_BASE + 0x4;
++ chip->IO_ADDR_W = NF_BASE + oNFCMD;
+ DEBUGN("SETCLE\n");
+ break;
+ default:
+- chip->IO_ADDR_W = NF_BASE + 0xc;
++ chip->IO_ADDR_W = NF_BASE + oNFDATA;
+ break;
+ }
+ return;
+@@ -180,16 +218,21 @@
+ /* initialize hardware */
+ twrph0 = 3; twrph1 = 0; tacls = 0;
+
++#if defined(CONFIG_S3C2410)
+ cfg = S3C2410_NFCONF_EN;
+ cfg |= S3C2410_NFCONF_TACLS(tacls - 1);
+ cfg |= S3C2410_NFCONF_TWRPH0(twrph0 - 1);
+ cfg |= S3C2410_NFCONF_TWRPH1(twrph1 - 1);
+
+ NFCONF = cfg;
+- //NFCONF = 0xf842;
++#elif defined(CONFIG_S3C2440)
++ twrph0 = 7; twrph1 = 7; tacls = 7;
++ NFCONF = (tacls<<12)|(twrph0<<8)|(twrph1<<4)|(0<<0);
++ NFCONT =
(0<<13)|(0<<12)|(0<<10)|(0<<9)|(0<<8)|(1<<6)|(1<<5)|(1<<4)|(1<<1)|(1<<0);
++#endif
+
+ /* initialize nand_chip data structure */
+- nand->IO_ADDR_R = nand->IO_ADDR_W = 0x4e00000c;
++ nand->IO_ADDR_R = nand->IO_ADDR_W = NF_BASE + oNFDATA;
+
+ /* read_buf and write_buf are default */
+ /* read_byte and write_byte are default */
+@@ -214,12 +257,23 @@
+ nand->options = 0;
+ #endif
+
++#if defined(CONFIG_S3C2440)
++/*
++ nand_select();
++ nand_clear_RnB();
++ NFCMD = NAND_CMD_RESET;
++ { volatile int i; for (i = 0; i < 10; i ++); }
++ nand_detect_RB();
++ nand_deselect();
++*/
++#endif
++
+ DEBUGN("end of nand_init\n");
+
+ return 0;
+ }
+
+ #else
+- #error "U-Boot legacy NAND support not available for S3C2410"
++ #error "U-Boot legacy NAND support not available for S3C24xx"
+ #endif
+ #endif
--- End Message ---
--- Begin Message ---
Author: laforge
Date: 2007-04-19 18:10:50 +0200 (Thu, 19 Apr 2007)
New Revision: 1809
Modified:
trunk/src/target/u-boot/patches/uboot-hxd8.patch
Log:
* use correct serial UART (3) for HXD8
* add lowlevel_foo.bin building for HXD8
* only use 300MHz core frequency due to PLL capacitor bug in early hardware
Modified: trunk/src/target/u-boot/patches/uboot-hxd8.patch
===================================================================
--- trunk/src/target/u-boot/patches/uboot-hxd8.patch 2007-04-19 16:09:23 UTC
(rev 1808)
+++ trunk/src/target/u-boot/patches/uboot-hxd8.patch 2007-04-19 16:10:50 UTC
(rev 1809)
@@ -2,9 +2,9 @@
Index: u-boot/Makefile
===================================================================
---- u-boot.orig/Makefile 2007-03-29 21:46:29.000000000 +0200
-+++ u-boot/Makefile 2007-03-29 21:46:30.000000000 +0200
-@@ -1988,6 +1988,9 @@
+--- u-boot.orig/Makefile
++++ u-boot/Makefile
+@@ -1995,6 +1995,9 @@
qt2410_config : unconfig
@./mkconfig $(@:_config=) arm arm920t qt2410 NULL s3c24x0
@@ -16,9 +16,9 @@
Index: u-boot/board/hxd8/Makefile
===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ u-boot/board/hxd8/Makefile 2007-03-29 21:46:30.000000000 +0200
-@@ -0,0 +1,51 @@
+--- /dev/null
++++ u-boot/board/hxd8/Makefile
+@@ -0,0 +1,65 @@
+#
+# (C) Copyright 2000-2006
+# Wolfgang Denk, DENX Software Engineering, [EMAIL PROTECTED]
@@ -53,9 +53,23 @@
+OBJS := $(addprefix $(obj),$(COBJS))
+SOBJS := $(addprefix $(obj),$(SOBJS))
+
++all: $(LIB) lowevel_foo.bin
++
+$(LIB): $(obj).depend $(OBJS) $(SOBJS)
+ $(AR) $(ARFLAGS) $@ $(OBJS) $(SOBJS)
+
++lowlevel_foo.o: lowlevel_foo.S
++ $(CC) -c -DTEXT_BASE=0x33F80000 -march=armv4 \
++ -o lowlevel_foo.o lowlevel_foo.S
++
++lowlevel_foo: lowlevel_foo.o lowlevel_init.o lowlevel_foo.lds
++ $(LD) -T ./lowlevel_foo.lds -Ttext 0x33f80000 -Bstatic \
++ lowlevel_init.o lowlevel_foo.o -o lowlevel_foo
++
++lowevel_foo.bin: lowlevel_foo
++ $(CROSS_COMPILE)objcopy --gap-fill=0xff -O binary \
++ lowlevel_foo lowlevel_foo.bin
++
+clean:
+ rm -f $(SOBJS) $(OBJS)
+
@@ -72,9 +86,9 @@
+#########################################################################
Index: u-boot/board/hxd8/hxd8.c
===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ u-boot/board/hxd8/hxd8.c 2007-03-29 21:46:30.000000000 +0200
-@@ -0,0 +1,152 @@
+--- /dev/null
++++ u-boot/board/hxd8/hxd8.c
+@@ -0,0 +1,169 @@
+/*
+ * (C) Copyright 2007 by OpenMoko, Inc.
+ * Author: Harald Welte <[EMAIL PROTECTED]>
@@ -116,11 +130,17 @@
+#define M_MDIV 0xC3
+#define M_PDIV 0x4
+#define M_SDIV 0x1
-+#elif FCLK_SPEED==1 /* Fout = 399.65MHz */
-+#define M_MDIV 0x6e
++#elif FCLK_SPEED==1
++#if 0
++#define M_MDIV 0x6e /* Fout = 399.65MHz */
+#define M_PDIV 0x3
+#define M_SDIV 0x1
++#else
++#define M_MDIV 0x61 /* Fout = 296.35MHz due to wrong PLL capacitors
*/
++#define M_PDIV 0x1
++#define M_SDIV 0x2
+#endif
++#endif
+
+#define USB_CLOCK 1
+
@@ -227,11 +247,22 @@
+{
+ return 0x00000110;
+}
++
++/* The sum of all part_size[]s must equal to the NAND size, i.e., 0x4000000.
++ "initrd" is sized such that it can hold two uncompressed 16 bit 640*480
++ images: 640*480*2*2 = 1228800 < 1245184. */
++
++unsigned int dynpart_size[] = {
++ CFG_UBOOT_SIZE, 0x20000, 0x200000, 0xa0000, 0x3d5c000-CFG_UBOOT_SIZE, 0 };
++char *dynpart_names[] = {
++ "u-boot", "u-boot_env", "kernel", "splash", "rootfs", NULL };
++
++
Index: u-boot/board/hxd8/lowlevel_init.S
===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ u-boot/board/hxd8/lowlevel_init.S 2007-03-29 21:57:23.000000000 +0200
-@@ -0,0 +1,166 @@
+--- /dev/null
++++ u-boot/board/hxd8/lowlevel_init.S
+@@ -0,0 +1,171 @@
+/*
+ * Memory Setup stuff - taken from blob memsetup.S
+ *
@@ -378,6 +409,11 @@
+ cmp r2, r0
+ bne 0b
+
++ /* setup asynchronous bus mode */
++ mrc p15, 0, r1 ,c1 ,c0, 0
++ orr r1, r1, #0xc0000000
++ mcr p15, 0, r1, c1, c0, 0
++
+ /* everything is fine now */
+ mov pc, lr
+
@@ -400,9 +436,9 @@
+ .word 0x30
Index: u-boot/include/configs/hxd8.h
===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ u-boot/include/configs/hxd8.h 2007-03-29 21:46:30.000000000 +0200
-@@ -0,0 +1,268 @@
+--- /dev/null
++++ u-boot/include/configs/hxd8.h
+@@ -0,0 +1,272 @@
+/*
+ * (C) Copyright 2007 OpenMoko, Inc.
+ * Author: Harald Welte <[EMAIL PROTECTED]>
@@ -467,7 +503,7 @@
+/*
+ * select serial console configuration
+ */
-+#define CONFIG_SERIAL1 1 /* we use SERIAL 1 on GTA01 */
++#define CONFIG_SERIAL3 1 /* we use SERIAL 3 on HXD8 */
+
+/************************************************************
+ * RTC
@@ -528,7 +564,7 @@
+#if (CONFIG_COMMANDS & CFG_CMD_KGDB)
+#define CONFIG_KGDB_BAUDRATE 115200 /* speed to run kgdb serial
port */
+/* what's this ? it's not used anywhere */
-+#define CONFIG_KGDB_SER_INDEX 1 /* which serial port to use */
++#define CONFIG_KGDB_SER_INDEX 3 /* which serial port to use */
+#endif
+
+/*
@@ -570,6 +606,7 @@
+#define CONFIG_USB_OHCI 1
+#endif
+
++#if 0
+#define CONFIG_USB_DEVICE 1
+#define CONFIG_USB_TTY 1
+#define CFG_CONSOLE_IS_IN_ENV 1
@@ -581,10 +618,12 @@
+#define CONFIG_USBD_DFU 1
+#define CONFIG_USBD_DFU_XFER_SIZE 4096 /* 0x4000 */
+#define CONFIG_USBD_DFU_INTERFACE 2
++#endif
++#define CFG_CONSOLE_IS_IN_ENV 1
+
+#define CONFIG_EXTRA_ENV_SETTINGS \
+ "usbtty=cdc_acm\0" \
-+ "bootargs_base=rootfstype=jffs2 root=/dev/mtdblock4
console=ttySAC0,115200 console=tty0 loglevel=8\0" \
++ "bootargs_base=rootfstype=jffs2 root=/dev/mtdblock4
console=ttySAC2,115200 console=tty0 loglevel=8\0" \
+ ""
+
+/*-----------------------------------------------------------------------
@@ -663,18 +702,19 @@
+#define LCD_VIDEO_ADDR 0x33d00000
+
+#define CONFIG_S3C2410_NAND_BBT 1
-+#define CONFIG_S3C2410_NAND_HWECC 1
++//#define CONFIG_S3C2410_NAND_HWECC 1
+
+#define CONFIG_DRIVER_PCF50606 1
+
+#define MTDIDS_DEFAULT "nand0=hxd8-nand"
+#define MTPARTS_DEFAULT
"hxd8-nand:256k(u-boot),16k(u-boot_env),2M(kernel),640k(splash),-(jffs2)"
++#define CFG_NAND_DYNPART_MTD_KERNEL_NAME "hxd8-nand"
+
+#endif /* __CONFIG_H */
Index: u-boot/board/hxd8/udc.c
===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ u-boot/board/hxd8/udc.c 2007-03-29 21:46:30.000000000 +0200
+--- /dev/null
++++ u-boot/board/hxd8/udc.c
@@ -0,0 +1,30 @@
+
+#include <common.h>
@@ -708,8 +748,8 @@
+#endif /* CONFIG_USB_DEVICE */
Index: u-boot/board/hxd8/pcf50606.c
===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ u-boot/board/hxd8/pcf50606.c 2007-03-29 21:46:30.000000000 +0200
+--- /dev/null
++++ u-boot/board/hxd8/pcf50606.c
@@ -0,0 +1,67 @@
+
+#include <common.h>
@@ -780,8 +820,8 @@
+
Index: u-boot/board/hxd8/config.mk
===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ u-boot/board/hxd8/config.mk 2007-03-29 21:46:30.000000000 +0200
+--- /dev/null
++++ u-boot/board/hxd8/config.mk
@@ -0,0 +1,22 @@
+#
+# (C) Copyright 2002
@@ -807,8 +847,8 @@
+TEXT_BASE = 0x33F80000
Index: u-boot/board/hxd8/u-boot.lds
===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ u-boot/board/hxd8/u-boot.lds 2007-03-29 21:46:30.000000000 +0200
+--- /dev/null
++++ u-boot/board/hxd8/u-boot.lds
@@ -0,0 +1,58 @@
+/*
+ * (C) Copyright 2002
@@ -868,3 +908,156 @@
+ .bss : { *(.bss) }
+ _end = .;
+}
+Index: u-boot/board/hxd8/lowlevel_foo.S
+===================================================================
+--- /dev/null
++++ u-boot/board/hxd8/lowlevel_foo.S
+@@ -0,0 +1,87 @@
++
++_start:
++ b reset
++undefvec:
++ b undefvec
++swivec:
++ b swivec
++pabtvec:
++ b pabtvec
++dabtvec:
++ b dabtvec
++rsvdvec:
++ b rsvdvec
++irqvec:
++ b irqvec
++fiqvec:
++ b fiqvec
++
++reset:
++ /*
++ * set the cpu to SVC32 mode
++ */
++ mrs r0,cpsr
++ bic r0,r0,#0x1f
++ orr r0,r0,#0xd3
++ msr cpsr,r0
++
++/* turn off the watchdog */
++#define pWTCON 0x53000000
++#define INTMSK 0x4A000008 /* Interupt-Controller base
addresses */
++#define INTSUBMSK 0x4A00001C
++#define CLKDIVN 0x4C000014 /* clock divisor register */
++#define CAMDIVN 0x4C000018
++
++ ldr r0, =pWTCON
++ mov r1, #0x0
++ str r1, [r0]
++
++ mov r1, #0xffffffff
++ ldr r0, =INTMSK
++ str r1, [r0]
++ ldr r1, =0x7ff
++ ldr r0, =INTSUBMSK
++ str r1, [r0]
++
++ /* FCLK:HCLK:PCLK = 1:3:6 */
++ ldr r0, =CAMDIVN
++ mov r1, #0
++ str r1, [r0]
++
++ /* FCLK:HCLK:PCLK = 1:3:6 */
++ ldr r0, =CLKDIVN
++ mov r1, #7
++ str r1, [r0]
++
++ bl cpu_init_crit
++ ldr r0,=TEXT_BASE
++ mov pc, r0
++
++cpu_init_crit:
++ /*
++ * flush v4 I/D caches
++ */
++ mov r0, #0
++ mcr p15, 0, r0, c7, c7, 0 /* flush v3/v4 cache */
++ mcr p15, 0, r0, c8, c7, 0 /* flush v4 TLB */
++
++ /*
++ * disable MMU stuff and caches
++ */
++ mrc p15, 0, r0, c1, c0, 0
++ bic r0, r0, #0x00002300 @ clear bits 13, 9:8 (--V- --RS)
++ bic r0, r0, #0x00000087 @ clear bits 7, 2:0 (B--- -CAM)
++ orr r0, r0, #0x00000002 @ set bit 2 (A) Align
++ orr r0, r0, #0x00001000 @ set bit 12 (I) I-Cache
++ mcr p15, 0, r0, c1, c0, 0
++
++ /*
++ * before relocating, we have to setup RAM timing
++ * because memory timing is board-dependend, you will
++ * find a lowlevel_init.S in your board directory.
++ */
++ mov ip, lr
++ bl lowlevel_init
++ mov lr, ip
++ mov pc, lr
++
+Index: u-boot/board/hxd8/lowlevel_foo.lds
+===================================================================
+--- /dev/null
++++ u-boot/board/hxd8/lowlevel_foo.lds
+@@ -0,0 +1,56 @@
++/*
++ * (C) Copyright 2002
++ * Gary Jennejohn, DENX Software Engineering, <[EMAIL PROTECTED]>
++ *
++ * See file CREDITS for list of people who contributed to this
++ * project.
++ *
++ * 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.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the Free Software
++ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
++ * MA 02111-1307 USA
++ */
++
++OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm")
++OUTPUT_ARCH(arm)
++ENTRY(_start)
++SECTIONS
++{
++ . = 0x00000000;
++
++ . = ALIGN(4);
++ .text :
++ {
++ lowlevel_foo.o (.text)
++ *(.text)
++ }
++
++ . = ALIGN(4);
++ .rodata : { *(.rodata) }
++
++ . = ALIGN(4);
++ .data : { *(.data) }
++
++ . = ALIGN(4);
++ .got : { *(.got) }
++
++ . = .;
++ __u_boot_cmd_start = .;
++ .u_boot_cmd : { *(.u_boot_cmd) }
++ __u_boot_cmd_end = .;
++
++ . = ALIGN(4);
++ __bss_start = .;
++ .bss : { *(.bss) }
++ _end = .;
++}
--- End Message ---
_______________________________________________
commitlog mailing list
[email protected]
http://lists.openmoko.org/mailman/listinfo/commitlog