Hi<br><br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">> +#<br>
> +# (C) Copyright 2007 Juergen Beisert <<a href="mailto:jbe@pengutronix.de">jbe@pengutronix.de</a>><br>
<br>
</div>You should replace this with your own copyright. I think Jürgen can live<br>
with not having a copyright on trivial files ;)<br></blockquote><div><br></div><div>Ok, will do.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
> diff --git a/arch/arm/boards/fq-sid1-mx25-noah/env/config<br>
<br>
Have you considered using one of the environment templates? You<br>
shouldn't duplicate them.</blockquote><div><br></div><div>I haven't, I'll have look into them once I get NOR and SD card functionality inside barebox ... for which I have exactly one day left :).</div><div> </div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5">
> +# or set your networking parameters here<br>
> +#eth0.ipaddr=192.168.1.80<br>
> +#eth0.netmask=255.255.255.0<br>
> +#eth0.gateway=a.b.c.d<br>
> +eth0.serverip=192.168.1.23<br>
> +eth0.ethaddr=00:50:c2:8c:e6:0e<br>
<br>
</div></div>*never* *ever* add MAC addresses to the default environment.</blockquote><div><br></div><div> Ok. In my case, the MAC address is actually stored inside a secured at24 EEPROM buffer. Unfortunately, at24 via I2C does not seem to be available in barebox. I reckon I have to port it from the kernel or uboot :).</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">
> + { .ptr_type = 4, .addr = 0xb8001004, .val = 0x0076e83a, }, /* initial<br>
> value for ESDCFG0 */<br>
<br>
</div>Your mailer wraps lines.</blockquote><div><br></div><div>Yeah, sorry for that, gmail is all I have at the moment, however for serious inclusion or review of any patches, I'll definitely try to resort to ``<span style="background-color:rgb(255,245,245)">git send-email''</span></div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">
> +#endif<br>
> +#ifdef CONFIG_DRIVER_VIDEO_IMX<br>
> + //imx25_add_fb(&noah_fb_data);<br>
<br>
</div>Please remove dead code before posting this for inclusion</blockquote><div><br></div><div>Will do, thanks.</div><div><br></div><div>I have included some more debugging and also workarounds for the mx25. This is the current debug output, where it clearly indicates that for some reason the mx25 esdhc related registers never show a transfer complete for a multiblock write:</div>
<div><br></div><div>Board: SID1 NOAH</div><div>registered netconsole as cs1</div><div>noah_read_ccm_regs: CCM CRDR = 00000000</div><div>noah_read_ccm_regs: CCM RCSR = 01020820</div><div>noah_read_ccm_regs: Booting from WEIM: NOR</div>
<div>imx-esdhc@mci0: registered as mci0</div><div>imx-esdhc@imx-esdhc0: set clock: wanted: 400000 got: 377840</div><div>imx-esdhc@imx-esdhc0: pre_div: 8 div: 10</div><div>imx-esdhc@imx-esdhc0: set clock: wanted: 200000 got: 188920</div>
<div>imx-esdhc@imx-esdhc0: pre_div: 16 div: 10</div><div>imx-esdhc@imx-esdhc0: set clock: wanted: 200000 got: 188920</div><div>imx-esdhc@imx-esdhc0: pre_div: 16 div: 10</div><div>mci@mci0: SD Card Rev. 2.00 or later detected</div>
<div>mci@mci0: Put the Card in Identify Mode</div><div>mci@mci0: Card's identification data is: 1B534D30-30303030-101ABB6A-9500AB00</div><div>mci@mci0: Get/Set relative address</div><div>mci@mci0: Get card's specific data</div>
<div>mci@mci0: Card's specific data is: 007FFF32-5B5A83BA-F6DBDFFF-0E800000</div><div>mci@mci0: Transfer speed: 25000000</div><div>mci@mci0: Max. block length are: Write=1024, Read=1024 Bytes</div><div>mci@mci0: Capacity: 1910 MiB</div>
<div>mci@mci0: Limiting max. read block size down to 512</div><div>mci@mci0: Limiting max. write block size down to 512</div><div>mci@mci0: Read block length: 512, Write block length: 512</div><div>mci@mci0: Select the card, and put it into Transfer Mode</div>
<div>mci@mci0: Changing transfer frequency</div><div>mci@mci0: Trying to read the SCR (try 1 of 3)</div><div>esdhc_setup_data: Check if workaround ENGcm01112 is needed on i.MX25 (0x00000008)</div><div>
esdhc_setup_data: Enabling workaround for ENGcm01112 on i.MX25</div><div>esdhc_setup_data: Check if workaround ENGcm01112 is needed on i.MX25 (0x00000008)</div><div>esdhc_setup_data: Enabling workaround for ENGcm01112 on i.MX25</div>
<div>esdhc_setup_data: Check if workaround ENGcm01112 is needed on i.MX25 (0x00000040)</div><div>esdhc_setup_data: Enabling workaround for ENGcm01112 on i.MX25</div><div>mci@mci0: Prepare for bus width change</div>
<div>mci@mci0: Set SD bus width to 4 bit</div><div>imx-esdhc@imx-esdhc0: set clock: wanted: 200000 got: 188920</div><div>imx-esdhc@imx-esdhc0: pre_div: 16 div: 10</div><div>imx-esdhc@imx-esdhc0: set clock: wanted: 50000000 got: 33250000</div>
<div>imx-esdhc@imx-esdhc0: pre_div: 0 div: 1</div><div>mci@mci0: Card is up and running now, registering as a disk</div><div>mci@mci0: registered disk0</div><div>mci@mci0: mci_sd_read: Read 1 block(s), starting at 0</div>
<div>mci@mci0: READ: Activating single block transfer</div><div>esdhc_setup_data: Check if workaround ENGcm01112 is needed on i.MX25 (0x00000040)</div><div>esdhc_setup_data: Enabling workaround for ENGcm01112 on i.MX25</div>
<div>mci@mci0: SD Card successfully added</div><div>imx25_devices_init: Adding NOR flash device</div><div>cfi_flash@cfi_flash0: cfi flash (id=01000000 vend=000002 manu=000001 devid=00007E extid=002301) at a0000000, size 64MB</div>
<div>imx25_devices_init: Adding initial NOR flash partitions</div><div>ehci@ehci0: USB EHCI 1.00</div><div>Malloc space: 0x83b00000 -> 0x83efffff (size 4 MB)</div><div>Stack space : 0x83af8000 -> 0x83b00000 (size 32 kB)</div>
<div>envfs: wrong magic on /dev/env0</div><div>no valid environment found on /dev/env0. Using default environment</div><div>running /env/bin/init...</div><div><br></div><div>Hit any key to stop autoboot: 4</div><div><br>
</div><div>type update_kernel nor [<imagename>] to update kernel into flash</div><div>type update_root nor [<imagename>] to update rootfs into flash</div><div><br></div><div>sid1-noah:/ mkdir /mnt</div><div>sid1-noah:/ mount /dev/disk0.0 fat /mnt</div>
<div>mci@mci0: mci_sd_read: Read 128 block(s), starting at 2048</div><div>mci@mci0: READ: Activating multiple block transfer</div><div>block_cache: blk->ops->read returned 0</div><div>sid1-noah:/ cp /mnt/conmci@mci0: mci_sd_read: Read 128 block(s), starting at 2560</div>
<div>mci@mci0: READ: Activating multiple block transfer</div><div>block_cache: blk->ops->read returned 0</div><div>sole_image.jffs2 /mnt/console_image.jffs2-backup</div><div>mci@mci0: mci_sd_read: Read 128 block(s), starting at 3584</div>
<div>mci@mci0: READ: Activating multiple block transfer</div><div>block_cache: blk->ops->read returned 0</div><div>mci@mci0: mci_sd_read: Read 128 block(s), starting at 2304</div><div>mci@mci0: READ: Activating multiple block transfer</div>
<div>block_cache: blk->ops->read returned 0</div><div>mci@mci0: mci_sd_read: Read 128 block(s), starting at 53760</div><div>mci@mci0: READ: Activating multiple block transfer</div><div>block_cache: blk->ops->read returned 0</div>
<div>mci@mci0: mci_sd_read: Read 128 block(s), starting at 3712</div><div>mci@mci0: READ: Activating multiple block transfer</div><div>block_cache: blk->ops->read returned 0</div><div>mci@mci0: mci_sd_read: Read 128 block(s), starting at 53888</div>
<div>mci@mci0: READ: Activating multiple block transfer</div><div>block_cache: blk->ops->read returned 0</div><div>mci@mci0: mci_sd_read: Read 128 block(s), starting at 3840</div><div>mci@mci0: READ: Activating multiple block transfer</div>
<div>block_cache: blk->ops->read returned 0</div><div>mci@mci0: mci_sd_write: Write 128 block(s), starting at 2560</div><div>mci@mci0: WRITE: Activating multiple block transfer</div><div><br></div><div>Data Write Failed in PIO Mode.imx-esdhc@imx-esdhc0: timeout 2</div>
<div>esdhc_send_cmd: busy loop 1 CMD=0x00000000 (0x0000000c) cap=0x07f30000 irqstat=0x00000000 proctl=0x00000022 prsstat=0xf7880587 xfertyp=0x0c3b0022 sysctl=0x000e0017 blkattr=0x00700200</div><div>
esdhc_send_cmd: busy loop 2 CMD=0x00000000 (0x0000000c) cap=0x07f30000 irqstat=0x00000000 proctl=0x00000022 prsstat=0xf7880587 xfertyp=0x0c3b0022 sysctl=0x000e0017 blkattr=0x00700200</div><div>esdhc_send_cmd: busy loop 3 CMD=0x00000000 (0x0000000c) cap=0x07f30000 irqstat=0x00000000 proctl=0x00000022 prsstat=0xf7880587 xfertyp=0x0c3b0022 sysctl=0x000e0017 blkattr=0x00700200</div>
<div>imx-esdhc@imx-esdhc0: timeout 1</div><div>mci@mci0: Writing block 2560 failed with -110</div><div>mci@mci0: mci_sd_read: Read 128 block(s), starting at 54016</div><div>mci@mci0: READ: Activating multiple block transfer</div>
<div>esdhc_send_cmd: busy loop 1 CMD=0x01a60000 (0x00000012) cap=0x07f30000 irqstat=0x00000000 proctl=0x00000022 prsstat=0xf7880587 xfertyp=0x0c3b0022 sysctl=0x000e0017 blkattr=0x00700200</div><div>
esdhc_send_cmd: busy loop 2 CMD=0x01a60000 (0x00000012) cap=0x07f30000 irqstat=0x00000000 proctl=0x00000022 prsstat=0xf7880587 xfertyp=0x0c3b0022 sysctl=0x000e0017 blkattr=0x00700200</div><div>esdhc_send_cmd: busy loop 3 CMD=0x01a60000 (0x00000012) cap=0x07f30000 irqstat=0x00000000 proctl=0x00000022 prsstat=0xf7880587 xfertyp=0x0c3b0022 sysctl=0x000e0017 blkattr=0x00700200</div>
<div>imx-esdhc@imx-esdhc0: timeout 1</div><div>esdhc_send_cmd: busy loop 1 CMD=0x00000000 (0x0000000c) cap=0x07f30000 irqstat=0x00000000 proctl=0x00000022 prsstat=0xf7880587 xfertyp=0x0c3b0022 sysctl=0x000e0017 blkattr=0x00700200</div>
<div>esdhc_send_cmd: busy loop 2 CMD=0x00000000 (0x0000000c) cap=0x07f30000 irqstat=0x00000000 proctl=0x00000022 prsstat=0xf7880587 xfertyp=0x0c3b0022 sysctl=0x000e0017 blkattr=0x00700200</div><div>
esdhc_send_cmd: busy loop 3 CMD=0x00000000 (0x0000000c) cap=0x07f30000 irqstat=0x00000000 proctl=0x00000022 prsstat=0xf7880587 xfertyp=0x0c3b0022 sysctl=0x000e0017 blkattr=0x00700200</div><div>imx-esdhc@imx-esdhc0: timeout 1</div>
<div>mci@mci0: Reading block 54016 failed with -110</div><div>block_cache: blk->ops->read returned -110</div><div>write: I/O error</div><div>mci@mci0: mci_sd_write: Write 128 block(s), starting at 2048</div><div>mci@mci0: WRITE: Activating multiple block transfer</div>
<div>esdhc_send_cmd: busy loop 1 CMD=0x00100000 (0x00000019) cap=0x07f30000 irqstat=0x00000000 proctl=0x00000022 prsstat=0xf7880587 xfertyp=0x0c3b0022 sysctl=0x000e0017 blkattr=0x00700200</div><div>
esdhc_send_cmd: busy loop 2 CMD=0x00100000 (0x00000019) cap=0x07f30000 irqstat=0x00000000 proctl=0x00000022 prsstat=0xf7880587 xfertyp=0x0c3b0022 sysctl=0x000e0017 blkattr=0x00700200</div><div>esdhc_send_cmd: busy loop 3 CMD=0x00100000 (0x00000019) cap=0x07f30000 irqstat=0x00000000 proctl=0x00000022 prsstat=0xf7880587 xfertyp=0x0c3b0022 sysctl=0x000e0017 blkattr=0x00700200</div>
<div>imx-esdhc@imx-esdhc0: timeout 1</div><div>esdhc_send_cmd: busy loop 1 CMD=0x00000000 (0x0000000c) cap=0x07f30000 irqstat=0x00000000 proctl=0x00000022 prsstat=0xf7880587 xfertyp=0x0c3b0022 sysctl=0x000e0017 blkattr=0x00700200</div>
<div>esdhc_send_cmd: busy loop 2 CMD=0x00000000 (0x0000000c) cap=0x07f30000 irqstat=0x00000000 proctl=0x00000022 prsstat=0xf7880587 xfertyp=0x0c3b0022 sysctl=0x000e0017 blkattr=0x00700200</div><div>
esdhc_send_cmd: busy loop 3 CMD=0x00000000 (0x0000000c) cap=0x07f30000 irqstat=0x00000000 proctl=0x00000022 prsstat=0xf7880587 xfertyp=0x0c3b0022 sysctl=0x000e0017 blkattr=0x00700200</div><div>imx-esdhc@imx-esdhc0: timeout 1</div>
<div>mci@mci0: Writing block 2048 failed with -110</div><div>mci@mci0: mci_sd_write: Write 128 block(s), starting at 2304</div><div>mci@mci0: WRITE: Activating multiple block transfer</div><div>esdhc_send_cmd: busy loop 1 CMD=0x00120000 (0x00000019) cap=0x07f30000 irqstat=0x00000000 proctl=0x00000022 prsstat=0xf7880587 xfertyp=0x0c3b0022 sysctl=0x000e0017 blkattr=0x00700200</div>
<div>esdhc_send_cmd: busy loop 2 CMD=0x00120000 (0x00000019) cap=0x07f30000 irqstat=0x00000000 proctl=0x00000022 prsstat=0xf7880587 xfertyp=0x0c3b0022 sysctl=0x000e0017 blkattr=0x00700200</div><div>
esdhc_send_cmd: busy loop 3 CMD=0x00120000 (0x00000019) cap=0x07f30000 irqstat=0x00000000 proctl=0x00000022 prsstat=0xf7880587 xfertyp=0x0c3b0022 sysctl=0x000e0017 blkattr=0x00700200</div><div>imx-esdhc@imx-esdhc0: timeout 1</div>
<div>esdhc_send_cmd: busy loop 1 CMD=0x00000000 (0x0000000c) cap=0x07f30000 irqstat=0x00000000 proctl=0x00000022 prsstat=0xf7880587 xfertyp=0x0c3b0022 sysctl=0x000e0017 blkattr=0x00700200</div><div>
esdhc_send_cmd: busy loop 2 CMD=0x00000000 (0x0000000c) cap=0x07f30000 irqstat=0x00000000 proctl=0x00000022 prsstat=0xf7880587 xfertyp=0x0c3b0022 sysctl=0x000e0017 blkattr=0x00700200</div><div>esdhc_send_cmd: busy loop 3 CMD=0x00000000 (0x0000000c) cap=0x07f30000 irqstat=0x00000000 proctl=0x00000022 prsstat=0xf7880587 xfertyp=0x0c3b0022 sysctl=0x000e0017 blkattr=0x00700200</div>
<div>imx-esdhc@imx-esdhc0: timeout 1</div><div>mci@mci0: Writing block 2304 failed with -110</div><div>mci@mci0: mci_sd_write: Write 128 block(s), starting at 53888</div><div>mci@mci0: WRITE: Activating multiple block transfer</div>
<div>esdhc_send_cmd: busy loop 1 CMD=0x01a50000 (0x00000019) cap=0x07f30000 irqstat=0x00000000 proctl=0x00000022 prsstat=0xf7880587 xfertyp=0x0c3b0022 sysctl=0x000e0017 blkattr=0x00700200</div><div>
esdhc_send_cmd: busy loop 2 CMD=0x01a50000 (0x00000019) cap=0x07f30000 irqstat=0x00000000 proctl=0x00000022 prsstat=0xf7880587 xfertyp=0x0c3b0022 sysctl=0x000e0017 blkattr=0x00700200</div><div>esdhc_send_cmd: busy loop 3 CMD=0x01a50000 (0x00000019) cap=0x07f30000 irqstat=0x00000000 proctl=0x00000022 prsstat=0xf7880587 xfertyp=0x0c3b0022 sysctl=0x000e0017 blkattr=0x00700200</div>
<div>imx-esdhc@imx-esdhc0: timeout 1</div><div>esdhc_send_cmd: busy loop 1 CMD=0x00000000 (0x0000000c) cap=0x07f30000 irqstat=0x00000000 proctl=0x00000022 prsstat=0xf7880587 xfertyp=0x0c3b0022 sysctl=0x000e0017 blkattr=0x00700200</div>
<div>esdhc_send_cmd: busy loop 2 CMD=0x00000000 (0x0000000c) cap=0x07f30000 irqstat=0x00000000 proctl=0x00000022 prsstat=0xf7880587 xfertyp=0x0c3b0022 sysctl=0x000e0017 blkattr=0x00700200</div><div>
esdhc_send_cmd: busy loop 3 CMD=0x00000000 (0x0000000c) cap=0x07f30000 irqstat=0x00000000 proctl=0x00000022 prsstat=0xf7880587 xfertyp=0x0c3b0022 sysctl=0x000e0017 blkattr=0x00700200</div><div>imx-esdhc@imx-esdhc0: timeout 1</div>
<div>mci@mci0: Writing block 53888 failed with -110</div><div>mci@mci0: mci_sd_write: Write 128 block(s), starting at 53760</div><div>mci@mci0: WRITE: Activating multiple block transfer</div><div>esdhc_send_cmd: busy loop 1 CMD=0x01a40000 (0x00000019) cap=0x07f30000 irqstat=0x00000000 proctl=0x00000022 prsstat=0xf7880587 xfertyp=0x0c3b0022 sysctl=0x000e0017 blkattr=0x00700200</div>
<div>esdhc_send_cmd: busy loop 2 CMD=0x01a40000 (0x00000019) cap=0x07f30000 irqstat=0x00000000 proctl=0x00000022 prsstat=0xf7880587 xfertyp=0x0c3b0022 sysctl=0x000e0017 blkattr=0x00700200</div><div>
esdhc_send_cmd: busy loop 3 CMD=0x01a40000 (0x00000019) cap=0x07f30000 irqstat=0x00000000 proctl=0x00000022 prsstat=0xf7880587 xfertyp=0x0c3b0022 sysctl=0x000e0017 blkattr=0x00700200</div><div>imx-esdhc@imx-esdhc0: timeout 1</div>
<div>esdhc_send_cmd: busy loop 1 CMD=0x00000000 (0x0000000c) cap=0x07f30000 irqstat=0x00000000 proctl=0x00000022 prsstat=0xf7880587 xfertyp=0x0c3b0022 sysctl=0x000e0017 blkattr=0x00700200</div><div>
esdhc_send_cmd: busy loop 2 CMD=0x00000000 (0x0000000c) cap=0x07f30000 irqstat=0x00000000 proctl=0x00000022 prsstat=0xf7880587 xfertyp=0x0c3b0022 sysctl=0x000e0017 blkattr=0x00700200</div><div>esdhc_send_cmd: busy loop 3 CMD=0x00000000 (0x0000000c) cap=0x07f30000 irqstat=0x00000000 proctl=0x00000022 prsstat=0xf7880587 xfertyp=0x0c3b0022 sysctl=0x000e0017 blkattr=0x00700200</div>
<div>imx-esdhc@imx-esdhc0: timeout 1</div><div>mci@mci0: Writing block 53760 failed with -110</div><div>mci@mci0: mci_sd_read: Read 128 block(s), starting at 2560</div><div>mci@mci0: READ: Activating multiple block transfer</div>
<div>esdhc_send_cmd: busy loop 1 CMD=0x00140000 (0x00000012) cap=0x07f30000 irqstat=0x00000000 proctl=0x00000022 prsstat=0xf7880587 xfertyp=0x0c3b0022 sysctl=0x000e0017 blkattr=0x00700200</div><div>
esdhc_send_cmd: busy loop 2 CMD=0x00140000 (0x00000012) cap=0x07f30000 irqstat=0x00000000 proctl=0x00000022 prsstat=0xf7880587 xfertyp=0x0c3b0022 sysctl=0x000e0017 blkattr=0x00700200</div><div>esdhc_send_cmd: busy loop 3 CMD=0x00140000 (0x00000012) cap=0x07f30000 irqstat=0x00000000 proctl=0x00000022 prsstat=0xf7880587 xfertyp=0x0c3b0022 sysctl=0x000e0017 blkattr=0x00700200</div>
<div>imx-esdhc@imx-esdhc0: timeout 1</div><div>esdhc_send_cmd: busy loop 1 CMD=0x00000000 (0x0000000c) cap=0x07f30000 irqstat=0x00000000 proctl=0x00000022 prsstat=0xf7880587 xfertyp=0x0c3b0022 sysctl=0x000e0017 blkattr=0x00700200</div>
<div>esdhc_send_cmd: busy loop 2 CMD=0x00000000 (0x0000000c) cap=0x07f30000 irqstat=0x00000000 proctl=0x00000022 prsstat=0xf7880587 xfertyp=0x0c3b0022 sysctl=0x000e0017 blkattr=0x00700200</div><div>
esdhc_send_cmd: busy loop 3 CMD=0x00000000 (0x0000000c) cap=0x07f30000 irqstat=0x00000000 proctl=0x00000022 prsstat=0xf7880587 xfertyp=0x0c3b0022 sysctl=0x000e0017 blkattr=0x00700200</div><div>imx-esdhc@imx-esdhc0: timeout 1</div>
<div>mci@mci0: Reading block 2560 failed with -110</div><div>block_cache: blk->ops->read returned -110</div><div><br></div><div>I'll start looking at the uboot drivers, since the kernel drivers are quite messy with regard to the software stack a SD cmd has to travel. In any case, you before dropping a new barebox release, you might want to consider this cosmetic change:</div>
<div><br></div><div><div>diff --git a/drivers/mci/imx-esdhc.h b/drivers/mci/imx-esdhc.h</div><div>index 19fed5a..d9be69e 100644</div><div>--- a/drivers/mci/imx-esdhc.h</div><div>+++ b/drivers/mci/imx-esdhc.h</div><div>@@ -39,7 +39,6 @@</div>
<div> #define SYSCTL_PEREN 0x00000004</div><div> #define SYSCTL_HCKEN 0x00000002</div><div> #define SYSCTL_IPGEN 0x00000001</div><div>-#define SYSCTL_RSTA 0x01000000</div><div> </div>
<div> #define IRQSTAT 0x0002e030</div><div> #define IRQSTAT_DMAE (0x10000000)</div></div><div><br></div><div>Best regards</div><div>Roberto</div><div><br></div><div><br></div></div>