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. r3742 - in trunk/src/host/devirginator: . tests
      ([EMAIL PROTECTED])
   2. r3743 - trunk/src/target/kernel/patches ([EMAIL PROTECTED])
   3. r3744 - trunk/src/host/devirginator/tests
      ([EMAIL PROTECTED])
   4. r3745 - trunk/src/host/qemu-neo1973/hw ([EMAIL PROTECTED])
   5. r3746 - trunk/src/host/qemu-neo1973/openmoko
      ([EMAIL PROTECTED])
   6. r3747 - trunk/src/target/kernel/config ([EMAIL PROTECTED])
   7. r3748 - trunk/src/target/u-boot/patches ([EMAIL PROTECTED])
--- Begin Message ---
Author: werner
Date: 2007-12-27 17:17:12 +0100 (Thu, 27 Dec 2007)
New Revision: 3742

Modified:
   trunk/src/host/devirginator/envedit.pl
   trunk/src/host/devirginator/tests/macro
Log:
- devirginator/envedit.pl, devirginator/tests/macro: macro expansion yielded
  incorrect results if there were multiple macros in the same line
- devirginator/envedit.pl, devirginator/tests/define: added #define directive



Modified: trunk/src/host/devirginator/envedit.pl
===================================================================
--- trunk/src/host/devirginator/envedit.pl      2007-12-27 05:55:24 UTC (rev 
3741)
+++ trunk/src/host/devirginator/envedit.pl      2007-12-27 16:17:12 UTC (rev 
3742)
@@ -33,6 +33,7 @@
 #
 # Macro expansion:
 #
+# #define MACRO TEXT ...
 # MACRO
 # MACRO##TOKEN
 #
@@ -245,14 +246,33 @@
            }
            next if $false;
 
+           if (/^\s*#define\s+(\S+)(\s*(.*?))?\s*$/) {
+               if (defined $def{$1} && $def{$1} ne $3) {
+                   print STDERR "$file:$.: redefinition of macro \"$1\"\n";
+                   exit(1);
+               }
+               $def{$1} = $3;
+           }
+
            $tmp = "";
-           for $def (keys %def) {
-               while (/(##)?\b$def\b(##)?/) {
-                   $tmp = $`.$def{$def};
-                   $_ = $';
+           while (length $_) {
+               $pre = $_;
+               $exp = "";
+               $post = "";
+               for $def (keys %def) {
+                   if (/(##)?\b$def\b(##)?/) {
+                       if (length $` < length $pre) {
+                           $pre = $`;
+                           $exp = $def{$def};
+                           $post = $';
+                       }
+                   }
                }
+               $tmp .= $pre.$exp;
+               $_ = $post;
            }
-           $_ = $tmp.$_;
+           $_ = $tmp;
+
            s/#.*//;
            s/\s*$//;
            next if /^\s*$/;

Modified: trunk/src/host/devirginator/tests/macro
===================================================================
--- trunk/src/host/devirginator/tests/macro     2007-12-27 05:55:24 UTC (rev 
3741)
+++ trunk/src/host/devirginator/tests/macro     2007-12-27 16:17:12 UTC (rev 
3742)
@@ -112,3 +112,16 @@
 b=2
 c=3
 EOF
+
+# -----------------------------------------------------------------------------
+
+setup "expand multiple macros" <<EOF
+EOF
+
+edit -D foo=bar -D x=y -p <<EOF
+foo=x
+EOF
+
+expect <<EOF
+bar=y
+EOF




--- End Message ---
--- Begin Message ---
Author: werner
Date: 2007-12-27 20:40:12 +0100 (Thu, 27 Dec 2007)
New Revision: 3743

Added:
   trunk/src/target/kernel/patches/gta02-nor.patch
Modified:
   trunk/src/target/kernel/patches/series
Log:
- committing Andy Green's gta02-nor.patch for final testing and merging



Added: trunk/src/target/kernel/patches/gta02-nor.patch
===================================================================
--- trunk/src/target/kernel/patches/gta02-nor.patch     2007-12-27 16:17:12 UTC 
(rev 3742)
+++ trunk/src/target/kernel/patches/gta02-nor.patch     2007-12-27 19:40:12 UTC 
(rev 3743)
@@ -0,0 +1,94 @@
+Add support for NEO1973 NOR flash to MTD
+
+From: warmcat <[EMAIL PROTECTED]>
+
+You will need an updated default config from svn (work in progress)
+
+http://svn.openmoko.org/trunk/src/target/kernel/config/
+
+in the top level of your kernel dir to apply this patch -- and
+you need to use the patched config to build the kernel
+
+Whether the NOR flash is present at 0x18000000 or not (it
+varies according to GTA revision... -02 A3 and A4 should work
+fine and A2 if booted from NOR only) the whole 2MByte NOR
+region appears as /dev/mtdblock0 and the NAND partitions start
+from /dev/mtdblock1 up.
+
+/dev/mtdblock0  2MB NOR
+/dev/mtdblock1  U-Boot
+/dev/mtdblock2  U-Boot env
+/dev/mtdblock3  Kernel
+/dev/mtdblock4  Splash
+/dev/mtdblock5  rootfs
+
+After applying this patch, you need to adjust the kernel cmdline
+to identify root=/dev/mtdblock5 in order to boot into the rootfs
+
+Once booted, you can do, eg
+
+# mount -t jffs2 /dev/mtdblock0 /mnt
+
+to mount the NOR 2MB partition on /mnt
+
+Signed-off-by: Andy Green <[EMAIL PROTECTED]>
+Reviewed-by: Werner Almesberger <[EMAIL PROTECTED]>
+
+---
+
+Index: linux-2.6.22.5/arch/arm/mach-s3c2440/mach-gta02.c
+===================================================================
+--- linux-2.6.22.5.orig/arch/arm/mach-s3c2440/mach-gta02.c     2007-12-27 
08:33:37.000000000 -0300
++++ linux-2.6.22.5/arch/arm/mach-s3c2440/mach-gta02.c  2007-12-27 
08:39:24.000000000 -0300
+@@ -67,6 +67,8 @@
+ #include <asm/arch/spi-gpio.h>
+ #include <asm/arch/usb-control.h>
+ 
++#include <linux/mtd/physmap.h>
++
+ #include <asm/arch/gta01.h>
+ #include <asm/arch/gta02.h>
+ 
+@@ -304,6 +306,34 @@
+       },
+ };
+ 
++
++/* NOR Flash */
++
++#define GTA02_FLASH_BASE      0x18000000 /* GCS3 */
++#define GTA02_FLASH_SIZE      0x200000 /* 2MBytes */
++
++static struct physmap_flash_data gta02_nor_flash_data = {
++      .width          = 2,
++};
++
++static struct resource gta02_nor_flash_resource = {
++      .start          = GTA02_FLASH_BASE,
++      .end            = GTA02_FLASH_BASE + GTA02_FLASH_SIZE - 1,
++      .flags          = IORESOURCE_MEM,
++};
++
++static struct platform_device gta02_nor_flash = {
++      .name           = "physmap-flash",
++      .id             = 0,
++      .dev            = {
++                              .platform_data  = &gta02_nor_flash_data,
++                      },
++      .resource       = &gta02_nor_flash_resource,
++      .num_resources  = 1,
++};
++
++
++
+ static struct platform_device *gta02_devices[] __initdata = {
+       &s3c_device_usb,
+       &s3c_device_wdt,
+@@ -315,6 +345,7 @@
+       &s3c_device_ts,
+       &s3c_device_spi0,
+       &s3c_device_spi1,
++      &gta02_nor_flash,
+ };
+ 
+ static struct s3c2410_nand_set gta02_nand_sets[] = {

Modified: trunk/src/target/kernel/patches/series
===================================================================
--- trunk/src/target/kernel/patches/series      2007-12-27 16:17:12 UTC (rev 
3742)
+++ trunk/src/target/kernel/patches/series      2007-12-27 19:40:12 UTC (rev 
3743)
@@ -48,5 +48,7 @@
 s3c24xx-nand-largepage.patch
 s3c2442b-cpuid.patch
 gta02-core.patch
+# merge into gta02-core as soon as compatibility issues are resolved
+gta02-nor.patch
 lis302dl.patch
 gta02-leds.patch




--- End Message ---
--- Begin Message ---
Author: werner
Date: 2007-12-27 20:51:02 +0100 (Thu, 27 Dec 2007)
New Revision: 3744

Added:
   trunk/src/host/devirginator/tests/define
Log:
- devirginator/envedit.pl, devirginator/tests/define: added #define directive



Added: trunk/src/host/devirginator/tests/define
===================================================================
--- trunk/src/host/devirginator/tests/define    2007-12-27 19:40:12 UTC (rev 
3743)
+++ trunk/src/host/devirginator/tests/define    2007-12-27 19:51:02 UTC (rev 
3744)
@@ -0,0 +1,95 @@
+#!/bin/sh
+. Common
+
+# -----------------------------------------------------------------------------
+
+setup "#define foo bar" <<EOF
+EOF
+
+edit -p <<EOF
+#define foo bar
+foo=1
+EOF
+
+expect <<EOF
+bar=1
+EOF
+
+# -----------------------------------------------------------------------------
+
+setup "#define foo" <<EOF
+EOF
+
+edit -p <<EOF
+#define foo
+bar##foo=2
+EOF
+
+expect <<EOF
+bar=2
+EOF
+
+# -----------------------------------------------------------------------------
+
+setup "re-#define foo to different value" <<EOF
+EOF
+
+edit_fail -p <<EOF
+#define foo a
+#define foo b
+EOF
+
+expect <<EOF
+-:2: redefinition of macro "foo"
+EOF
+
+# -----------------------------------------------------------------------------
+
+setup "re-#define foo to same value" <<EOF
+EOF
+
+edit -p <<EOF
+#define foo a
+#define foo a
+foo=bar
+EOF
+
+expect <<EOF
+a=bar
+EOF
+
+# -----------------------------------------------------------------------------
+
+setup "#define with conditionals (1)" <<EOF
+EOF
+
+edit -D foo=x -p <<EOF
+#ifdef foo
+#define bar a
+#else
+#define bar b
+#endif
+foo=bar
+EOF
+
+expect <<EOF
+x=a
+EOF
+
+# -----------------------------------------------------------------------------
+
+setup "#define with conditionals (2)" <<EOF
+EOF
+
+edit -p <<EOF
+#ifdef foo
+#define bar a
+#else
+#define bar b
+#endif
+foo=bar
+EOF
+
+expect <<EOF
+foo=b
+EOF


Property changes on: trunk/src/host/devirginator/tests/define
___________________________________________________________________
Name: svn:executable
   + *




--- End Message ---
--- Begin Message ---
Author: andrew
Date: 2007-12-27 21:44:01 +0100 (Thu, 27 Dec 2007)
New Revision: 3745

Modified:
   trunk/src/host/qemu-neo1973/hw/ar6000.c
Log:
Fix CMD53 opcode bit no.
Implement basic HIF registers.
Implement basic BMI commands.


Modified: trunk/src/host/qemu-neo1973/hw/ar6000.c
===================================================================
--- trunk/src/host/qemu-neo1973/hw/ar6000.c     2007-12-27 19:51:02 UTC (rev 
3744)
+++ trunk/src/host/qemu-neo1973/hw/ar6000.c     2007-12-27 20:44:01 UTC (rev 
3745)
@@ -414,7 +414,7 @@
             }
 
             sd->transfer.dir = (req.arg >> 31) & 1;            /* R/W */
-            sd->transfer.step = (req.arg >> 27) & 1;           /* OPCode */
+            sd->transfer.step = (req.arg >> 26) & 1;           /* OPCode */
             sd->transfer.func = fun;
             sd->transfer.data_start = addr;
             sd->transfer.data_offset = 0;
@@ -944,9 +944,311 @@
 struct ar6k_s {
     struct sdio_s sd;
     NICInfo *nd;
+    struct {
+        uint8_t host_int_stat;
+        uint8_t cpu_int_stat;
+        uint8_t error_int_stat;
+        uint8_t counter_int_stat;
+        uint8_t mbox_frame;
+        uint8_t rx_la_valid;
+        uint8_t rx_la[4];
+        uint8_t int_stat_ena;
+        uint8_t cpu_int_stat_ena;
+        uint8_t err_int_stat_ena;
+        uint8_t cnt_int_stat_ena;
+        uint8_t cnt[8];
+        uint32_t cnt_dec[8];
+        uint8_t scratch[8];
+
+        uint8_t mbox[0x800 * 4];
+        int mbox_count[4];
+    } hif;
+    struct {
+        int done;
+    } bmi;
     uint8_t cis[0];
 };
 
+static void ar6k_bmi_reset(struct ar6k_s *s)
+{
+    int i;
+
+    for (i = 0; i < 8; i ++) {
+        s->hif.cnt[i] = 0x00;
+        s->hif.cnt_dec[i] = 0xff;
+    }
+
+    for (i = 0; i < 4; i ++)
+        s->hif.mbox_count[i] = 0;
+
+    s->bmi.done = 0;
+}
+
+enum {
+    bmi_no_command = 0,
+    bmi_done,                  /* Host is done using BMI */
+    bmi_read_memory,           /* Host reads AR6K memory */
+    bmi_write_memory,          /* Host writes AR6K memory */
+    bmi_execute,               /* Causes AR6K to execute code */
+    bmi_set_app_start,         /* Set Target application starting address */
+    bmi_read_soc_register,     /* Read a 32-bit Target SOC register */
+    bmi_Write_soc_register,    /* Write a 32-bit Target SOC register */
+    bmi_get_target_id,         /* Fetch the 4-byte Target information */
+    bmi_rompatch_install,      /* Install a ROM Patch */
+    bmi_rompatch_uninstall,    /* Uninstall a previously-installed ROM Patch */
+    bmi_rompatch_activate,     /* Activate a list of installed ROM Patches */
+    bmi_rompatch_deactivate,   /* Deactivate a list of active ROM Patches */
+};
+
+#define BMI_TARGET_VERSION_SENTINAL    0xffffffff
+#define BMI_TARGET_VERSION_ID          0x11000044
+#define BMI_TARGET_TYPE_AR6001         1
+#define BMI_TARGET_TYPE_AR6002         2
+
+static void ar6k_bmi_write(struct ar6k_s *s, uint8_t *data, int len)
+{
+    uint32_t cmd;
+    uint32_t *cmdp, *resp;
+    int rlen = 0;
+
+    if (len < 4) {
+        fprintf(stderr, "%s: short command (%ib)\n", __FUNCTION__, len);
+        return;
+    }
+
+    cmdp = (void *) data + 0x800 - len;
+    cmd = le32_to_cpup(cmdp ++);
+
+    switch (cmd) {
+    case bmi_no_command:
+        break;
+    case bmi_done:
+        s->bmi.done = 1;
+        break;
+    case bmi_get_target_id:
+#ifndef NEW_FIRMWARE
+        rlen = 4;
+        resp = (void *) data + 0x800 - rlen;
+        cpu_to_le32wu(resp, BMI_TARGET_VERSION_ID);
+#else
+        rlen = 16;
+        resp = (void *) data + 0x800 - rlen;
+        cpu_to_le32wu(resp ++, BMI_TARGET_VERSION_SENTINAL);
+        cpu_to_le32wu(resp ++, 0x0000000c);    /* target_info_byte_count */
+        cpu_to_le32wu(resp ++, BMI_TARGET_VERSION_ID); /* target_ver */
+        cpu_to_le32wu(resp ++, BMI_TARGET_TYPE_AR6001);        /* target_type 
*/
+#endif
+        break;
+    default:
+        fprintf(stderr, "%s: bad command (%i)\n", __FUNCTION__, cmd);
+        return;
+    }
+
+    s->hif.cnt_dec[4] = 0xff;
+    s->hif.cnt[4] = rlen;
+}
+
+#define AR6K_HOST_INT_STAT             0x400
+#define AR6K_CPU_INT_STAT              0x401
+#define AR6K_ERROR_INT_STAT            0x402
+#define AR6K_COUNTER_INT_STAT          0x403
+#define AR6K_MBOX_FRAME                        0x404
+#define AR6K_RX_LOOKAHEAD_VALID                0x405
+#define AR6K_RX_LOOKAHEAD0             0x408
+#define AR6K_RX_LOOKAHEAD1             0x40c
+#define AR6K_RX_LOOKAHEAD2             0x410
+#define AR6K_RX_LOOKAHEAD3             0x414
+#define AR6K_INT_STAT_ENABLE           0x418
+#define AR6K_CPU_INT_STAT_ENABLE       0x419
+#define AR6K_ERROR_STAT_ENABLE         0x41a
+#define AR6K_COUNTER_INT_STAT_ENABLE   0x41b
+#define AR6K_COUNT                     0x420
+#define AR6K_COUNT_DEC                 0x440
+#define AR6K_SCRATCH                   0x460
+#define AR6K_FIFO_TIMEOUT              0x468
+#define AR6K_FIFO_TIMEOUT_ENABLE       0x469
+#define AR6K_DISABLE_SLEEP             0x46a
+#define AR6K_LOCAL_BUS_ENDIAN          0x46e
+#define AR6K_LOCAL_BUS                 0x470
+#define AR6K_INT_WLAN                  0x472
+#define AR6K_WINDOW_DATA               0x474
+#define AR6K_WRITE_ADDR                        0x478
+#define AR6K_READ_ADDR                 0x47c
+#define AR6K_SPI_CONFIG                        0x480
+#define AR6K_SPI_STATUS                        0x481
+#define AR6K_CIS_WINDOW                        0x600
+#define AR6K_HIF_MBOX_BASE             0x800
+#define AR6K_HIF_MBOX0_BASE            0x800
+#define AR6K_HIF_MBOX1_BASE            0x1000
+#define AR6K_HIF_MBOX2_BASE            0x1800
+#define AR6K_HIF_MBOX3_BASE            0x2000
+#define AR6K_HIF_MBOX_END              0x27ff
+
+static void ar6k_hif_write(struct ar6k_s *s, uint32_t addr, uint8_t value)
+{
+    int mbox;
+
+    switch (addr) {
+    case AR6K_MBOX_FRAME:
+        s->hif.mbox_frame = value;
+        break;
+    case AR6K_RX_LOOKAHEAD_VALID:
+        s->hif.rx_la_valid = value;
+        break;
+    case AR6K_RX_LOOKAHEAD0:
+        s->hif.rx_la[0] = value;
+        break;
+    case AR6K_RX_LOOKAHEAD1:
+        s->hif.rx_la[1] = value;
+        break;
+    case AR6K_RX_LOOKAHEAD2:
+        s->hif.rx_la[2] = value;
+        break;
+    case AR6K_RX_LOOKAHEAD3:
+        s->hif.rx_la[3] = value;
+        break;
+    case AR6K_INT_STAT_ENABLE:
+        s->hif.int_stat_ena = value;
+        break;
+    case AR6K_CPU_INT_STAT_ENABLE:
+        s->hif.cpu_int_stat_ena = value;
+        break;
+    case AR6K_ERROR_STAT_ENABLE:
+        s->hif.err_int_stat_ena = value;
+        break;
+    case AR6K_COUNTER_INT_STAT_ENABLE:
+        s->hif.cnt_int_stat_ena = value;
+        break;
+    case AR6K_SCRATCH ... (AR6K_SCRATCH + 7):
+        s->hif.scratch[addr - AR6K_SCRATCH] = value;
+        break;
+    case AR6K_FIFO_TIMEOUT:
+    case AR6K_FIFO_TIMEOUT_ENABLE:
+    case AR6K_DISABLE_SLEEP:
+    case AR6K_LOCAL_BUS_ENDIAN:
+    case AR6K_LOCAL_BUS:
+    case AR6K_INT_WLAN:
+    case AR6K_WINDOW_DATA:
+    case AR6K_WRITE_ADDR:
+    case AR6K_READ_ADDR:
+    case AR6K_SPI_CONFIG:
+        goto bad_reg;
+    case AR6K_HIF_MBOX_BASE ... AR6K_HIF_MBOX_END:
+        mbox = (addr - AR6K_HIF_MBOX_BASE) >> 11;
+        s->hif.mbox[addr - AR6K_HIF_MBOX_BASE] = value;
+        s->hif.mbox_count[mbox] ++;
+        /* XXX how do we know when a BMI command is executed?  */
+        if (mbox == 0 && !s->bmi.done) {
+            s->hif.cnt_dec[4] = 0x00;
+            s->hif.cnt[4] = 0x00;
+            if ((addr & 0x7ff) == 0x7ff) {
+                ar6k_bmi_write(s, s->hif.mbox + (mbox << 11),
+                                s->hif.mbox_count[0]);
+                s->hif.mbox_count[mbox] = 0;
+            }
+        }
+        break;
+    default:
+    bad_reg:
+        printf("%s: unknown register %02x\n", __FUNCTION__, addr);
+        break;
+    }
+}
+
+static uint8_t ar6k_hif_read(struct ar6k_s *s, uint32_t addr)
+{
+    switch (addr) {
+    case AR6K_HOST_INT_STAT:
+        return s->hif.host_int_stat;
+    case AR6K_CPU_INT_STAT:
+        return s->hif.cpu_int_stat;
+    case AR6K_ERROR_INT_STAT:
+        return s->hif.error_int_stat;
+    case AR6K_COUNTER_INT_STAT:
+        return s->hif.counter_int_stat;
+    case AR6K_MBOX_FRAME:
+        return s->hif.mbox_frame;
+    case AR6K_RX_LOOKAHEAD_VALID:
+        return s->hif.rx_la_valid;
+    case AR6K_RX_LOOKAHEAD0:
+        return s->hif.rx_la[0];
+    case AR6K_RX_LOOKAHEAD1:
+        return s->hif.rx_la[1];
+    case AR6K_RX_LOOKAHEAD2:
+        return s->hif.rx_la[2];
+    case AR6K_RX_LOOKAHEAD3:
+        return s->hif.rx_la[3];
+    case AR6K_INT_STAT_ENABLE:
+        return s->hif.int_stat_ena;
+    case AR6K_CPU_INT_STAT_ENABLE:
+        return s->hif.cpu_int_stat_ena;
+    case AR6K_ERROR_STAT_ENABLE:
+        return s->hif.err_int_stat_ena;
+    case AR6K_COUNTER_INT_STAT_ENABLE:
+        return s->hif.cnt_int_stat_ena;
+    case AR6K_COUNT ... (AR6K_COUNT + 0x7):
+        return s->hif.cnt[addr - AR6K_COUNT];
+    case AR6K_COUNT_DEC + 0x00:
+    case AR6K_COUNT_DEC + 0x04:
+    case AR6K_COUNT_DEC + 0x08:
+    case AR6K_COUNT_DEC + 0x0c:
+    case AR6K_COUNT_DEC + 0x10:
+    case AR6K_COUNT_DEC + 0x14:
+    case AR6K_COUNT_DEC + 0x18:
+    case AR6K_COUNT_DEC + 0x1c:
+        return s->hif.cnt_dec[(addr - AR6K_COUNT_DEC) >> 2];
+    case AR6K_SCRATCH ... (AR6K_SCRATCH + 7):
+        return s->hif.scratch[addr - AR6K_SCRATCH];
+    case AR6K_FIFO_TIMEOUT:
+    case AR6K_FIFO_TIMEOUT_ENABLE:
+    case AR6K_DISABLE_SLEEP:
+    case AR6K_LOCAL_BUS_ENDIAN:
+    case AR6K_LOCAL_BUS:
+    case AR6K_INT_WLAN:
+    case AR6K_WINDOW_DATA:
+    case AR6K_WRITE_ADDR:
+    case AR6K_READ_ADDR:
+    case AR6K_SPI_CONFIG:
+    case AR6K_SPI_STATUS:
+        goto bad_reg;
+
+    case AR6K_CIS_WINDOW ... (AR6K_CIS_WINDOW + 0x1ff):
+        if (addr >= AR6K_CIS_WINDOW + s->sd.cislen)
+            goto bad_reg;
+
+        return s->sd.cis[addr - AR6K_CIS_WINDOW];
+
+    case AR6K_HIF_MBOX_BASE ... AR6K_HIF_MBOX_END:
+        return s->hif.mbox[addr - AR6K_HIF_MBOX_BASE];
+    default:
+    bad_reg:
+        printf("%s: unknown register %02x\n", __FUNCTION__, addr);
+        break;
+    }
+
+    return 0;
+}
+
+static void ar6k_fn1_write(struct sdio_s *sd,
+                uint32_t addr, uint8_t *data, int len)
+{
+    struct ar6k_s *s = (void *) sd;
+
+    fprintf(stderr, "%s: writing %i bytes at %x\n", __FUNCTION__, len, addr);
+    for (; len; len --, addr += sd->transfer.step)
+        ar6k_hif_write(s, addr, *data ++);
+}
+
+static void ar6k_fn1_read(struct sdio_s *sd,
+                uint32_t addr, uint8_t *data, int len)
+{
+    struct ar6k_s *s = (void *) sd;
+
+    fprintf(stderr, "%s: reading %i bytes at %x\n", __FUNCTION__, len, addr);
+    for (; len; len --, addr += sd->transfer.step)
+        *data ++ = ar6k_hif_read(s, addr);
+}
+
 static void ar6k_set_ioocr(struct sdio_s *sd)
 {
     /* 2.9 - 3.6 V, No memory present, Two functions only */
@@ -956,6 +1258,7 @@
 static void ar6k_reset(struct ar6k_s *s)
 {
     ar6k_set_ioocr(&s->sd);
+    ar6k_bmi_reset(s);
 }
 
 /* TODO: dump real values from an Atheros AR6001 - need hw access! */
@@ -1036,6 +1339,9 @@
     memcpy(s->cis + s->sd.fbr[0].cis_offset,
                     ar6k_fn1_cis, sizeof(ar6k_fn1_cis));
 
+    s->sd.write[1] = ar6k_fn1_write;
+    s->sd.read[1]  = ar6k_fn1_read;
+
     ar6k_reset(s);
 
     return ret;




--- End Message ---
--- Begin Message ---
Author: andrew
Date: 2007-12-27 21:50:34 +0100 (Thu, 27 Dec 2007)
New Revision: 3746

Modified:
   trunk/src/host/qemu-neo1973/openmoko/env
Log:
Download rootfs/kernel daily builds by default, instead of OM2007.2.


Modified: trunk/src/host/qemu-neo1973/openmoko/env
===================================================================
--- trunk/src/host/qemu-neo1973/openmoko/env    2007-12-27 20:44:01 UTC (rev 
3745)
+++ trunk/src/host/qemu-neo1973/openmoko/env    2007-12-27 20:50:34 UTC (rev 
3746)
@@ -27,6 +27,6 @@
 rootfs_wildcard="OpenMoko-openmoko-*image*.rootfs.jffs2"
 uboot_wildcard="u-boot-gta01bv4-1*.bin"
 
-download_dir="http://buildhost.openmoko.org/OM2007.2/tmp/deploy/glibc/images/neo1973/";
+download_dir="http://buildhost.openmoko.org/daily/tmp/deploy/glibc/images/neo1973/";
 dev_download_dir="http://buildhost.openmoko.org/snapshots/2007.08/images/";
 backup_download_dir="http://buildhost.automated.it/OM2007.2/";




--- End Message ---
--- Begin Message ---
Author: werner
Date: 2007-12-27 22:23:08 +0100 (Thu, 27 Dec 2007)
New Revision: 3747

Modified:
   trunk/src/target/kernel/config/defconfig-2.6.22.5
Log:
- defconfig-2.6.22.5: enabled support for GTA02 NOR Flash



Modified: trunk/src/target/kernel/config/defconfig-2.6.22.5
===================================================================
--- trunk/src/target/kernel/config/defconfig-2.6.22.5   2007-12-27 20:50:34 UTC 
(rev 3746)
+++ trunk/src/target/kernel/config/defconfig-2.6.22.5   2007-12-27 21:23:08 UTC 
(rev 3747)
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
 # Linux kernel version: 2.6.22.5
-# Tue Nov 27 09:09:32 2007
+# Thu Dec 27 17:54:43 2007
 #
 CONFIG_ARM=y
 CONFIG_SYS_SUPPORTS_APM_EMULATION=y
@@ -658,8 +658,10 @@
 #
 # RAM/ROM/Flash chip drivers
 #
-# CONFIG_MTD_CFI is not set
+CONFIG_MTD_CFI=y
 # CONFIG_MTD_JEDECPROBE is not set
+CONFIG_MTD_GEN_PROBE=y
+# CONFIG_MTD_CFI_ADV_OPTIONS is not set
 CONFIG_MTD_MAP_BANK_WIDTH_1=y
 CONFIG_MTD_MAP_BANK_WIDTH_2=y
 CONFIG_MTD_MAP_BANK_WIDTH_4=y
@@ -670,14 +672,23 @@
 CONFIG_MTD_CFI_I2=y
 # CONFIG_MTD_CFI_I4 is not set
 # CONFIG_MTD_CFI_I8 is not set
+CONFIG_MTD_CFI_INTELEXT=y
+# CONFIG_MTD_CFI_AMDSTD is not set
+# CONFIG_MTD_CFI_STAA is not set
+CONFIG_MTD_CFI_UTIL=y
 # CONFIG_MTD_RAM is not set
 # CONFIG_MTD_ROM is not set
-# CONFIG_MTD_ABSENT is not set
+CONFIG_MTD_ABSENT=y
 
 #
 # Mapping drivers for chip access
 #
 # CONFIG_MTD_COMPLEX_MAPPINGS is not set
+CONFIG_MTD_PHYSMAP=y
+CONFIG_MTD_PHYSMAP_START=0x8000000
+CONFIG_MTD_PHYSMAP_LEN=0
+CONFIG_MTD_PHYSMAP_BANKWIDTH=2
+# CONFIG_MTD_ARM_INTEGRATOR is not set
 # CONFIG_MTD_PLATRAM is not set
 
 #




--- End Message ---
--- Begin Message ---
Author: werner
Date: 2007-12-28 07:04:05 +0100 (Fri, 28 Dec 2007)
New Revision: 3748

Modified:
   trunk/src/target/u-boot/patches/uboot-s3c24xx-nand-boot.patch
Log:
uboot-s3c24xx-nand-boot.patch:
- cpu/arm920t/start.S: file was patched twice, gravely upsetting quilt



Modified: trunk/src/target/u-boot/patches/uboot-s3c24xx-nand-boot.patch
===================================================================
--- trunk/src/target/u-boot/patches/uboot-s3c24xx-nand-boot.patch       
2007-12-27 21:23:08 UTC (rev 3747)
+++ trunk/src/target/u-boot/patches/uboot-s3c24xx-nand-boot.patch       
2007-12-28 06:04:05 UTC (rev 3748)
@@ -124,7 +124,21 @@
  #include <status_led.h>
  
  /*
-@@ -178,9 +183,10 @@
+@@ -116,8 +121,13 @@
+       orr     r0,r0,#0xd3
+       msr     cpsr,r0
+ 
++      /* in case we run from the s3c24xx NAND stepping stone, the symbols
++       * for LED support are in lib_arm/board.o, i.e. outside of the
++       * steppingstone */
++#ifndef CONFIG_S3C2410_NAND_BOOT
+       bl coloured_LED_init
+       bl red_LED_on
++#endif
+ 
+ #if   defined(CONFIG_AT91RM9200DK) || defined(CONFIG_AT91RM9200EK) || 
defined(CONFIG_AT91RM9200DF)
+       /*
+@@ -178,9 +188,10 @@
        bl      cpu_init_crit
  #endif
  
@@ -136,7 +150,7 @@
  relocate:                             /* relocate U-Boot to RAM           */
        adr     r0, _start              /* r0 <- current position of code   */
        ldr     r1, _TEXT_BASE          /* test if we run from flash or RAM */
-@@ -197,6 +203,87 @@
+@@ -197,6 +208,87 @@
        stmia   r1!, {r3-r10}           /* copy to   target address [r1]    */
        cmp     r0, r2                  /* until source end addreee [r2]    */
        ble     copy_loop
@@ -286,21 +300,3 @@
  
  SRCS  := $(SOBJS:.o=.S) $(COBJS:.o=.c)
  OBJS  := $(addprefix $(obj),$(SOBJS) $(COBJS))
-Index: u-boot/cpu/arm920t/start.S
-===================================================================
---- u-boot.orig/cpu/arm920t/start.S
-+++ u-boot/cpu/arm920t/start.S
-@@ -141,8 +141,13 @@
-       orr     r0,r0,#0xd3
-       msr     cpsr,r0
- 
-+      /* in case we run from the s3c24xx NAND stepping stone, the symbols
-+       * for LED support are in lib_arm/board.o, i.e. outside of the
-+       * steppingstone */
-+#ifndef CONFIG_S3C2410_NAND_BOOT
-       bl coloured_LED_init
-       bl red_LED_on
-+#endif
- 
- #if   defined(CONFIG_AT91RM9200DK) || defined(CONFIG_AT91RM9200EK) || 
defined(CONFIG_AT91RM9200DF)
-       /*




--- End Message ---
_______________________________________________
commitlog mailing list
[email protected]
http://lists.openmoko.org/mailman/listinfo/commitlog

Reply via email to