summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/arm/boards/versatile/env/config43
-rw-r--r--drivers/nor/cfi_flash.c18
2 files changed, 51 insertions, 10 deletions
diff --git a/arch/arm/boards/versatile/env/config b/arch/arm/boards/versatile/env/config
new file mode 100644
index 0000000000..9dec3f25bd
--- /dev/null
+++ b/arch/arm/boards/versatile/env/config
@@ -0,0 +1,43 @@
+#!/bin/sh
+
+# use 'dhcp' to do dhcp in barebox and in kernel
+# use 'none' if you want to skip kernel ip autoconfiguration
+ip=dhcp
+
+# or set your networking parameters here
+#eth0.ipaddr=a.b.c.d
+#eth0.netmask=a.b.c.d
+#eth0.gateway=a.b.c.d
+#eth0.serverip=a.b.c.d
+
+# can be either 'net' or 'nor'
+kernel_loc=net
+# can be either 'net', 'nor' or 'initrd'
+rootfs_loc=initrd
+
+# can be either 'jffs2' or 'ubifs'
+rootfs_type=ubifs
+rootfsimage=root.$rootfs_type
+
+# The image type of the kernel. Can be uimage, zimage, raw, or raw_lzo
+#kernelimage_type=zimage
+#kernelimage=zImage
+kernelimage_type=uimage
+kernelimage=uImage
+#kernelimage_type=raw
+#kernelimage=Image
+#kernelimage_type=raw_lzo
+#kernelimage=Image.lzo
+
+nfsroot="$eth0.serverip:/opt/work/busybox/arm9/rootfs_arm"
+
+nor_parts="256k(barebox)ro,64k(bareboxenv),1536k(kernel),-(root)"
+rootfs_mtdblock_nor=3
+
+autoboot_timeout=3
+
+bootargs="console=ttyAMA0,115200n8 CONSOLE=/dev/ttyAMA0"
+
+# set a fancy prompt (if support is compiled in)
+PS1="\e[1;31m[barebox@\h]:\w\e[0m\n# "
+
diff --git a/drivers/nor/cfi_flash.c b/drivers/nor/cfi_flash.c
index efe87856c4..fccb0086ee 100644
--- a/drivers/nor/cfi_flash.c
+++ b/drivers/nor/cfi_flash.c
@@ -424,14 +424,12 @@ static ulong flash_get_size (struct flash_info *info, ulong base)
/* multiply the size by the number of chips */
info->size = (1 << qry.dev_size) * size_ratio;
info->buffer_size = (1 << le16_to_cpu(qry.max_buf_write_size));
- tmp = 1 << qry.block_erase_timeout_typ;
- info->erase_blk_tout = (tmp * (1 << qry.block_erase_timeout_max));
- tmp = (1 << qry.buf_write_timeout_typ) *
- (1 << qry.buf_write_timeout_max);
- info->buffer_write_tout = tmp * 1000;
- tmp = (1 << qry.word_write_timeout_typ) *
- (1 << qry.word_write_timeout_max);
- info->write_tout = tmp * 1000;
+ info->erase_blk_tout = 1 << (qry.block_erase_timeout_typ +
+ qry.block_erase_timeout_max);
+ info->buffer_write_tout = 1 << (qry.buf_write_timeout_typ +
+ qry.buf_write_timeout_max);
+ info->write_tout = 1 << (qry.word_write_timeout_typ +
+ qry.word_write_timeout_max);
info->flash_id = FLASH_MAN_CFI;
if ((info->interface == FLASH_CFI_X8X16) && (info->chipwidth == FLASH_CFI_BY8)) {
info->portwidth >>= 1; /* XXX - Need to test on x8/x16 in parallel. */
@@ -699,11 +697,11 @@ static void cfi_info (struct device_d* dev)
if (info->device_id == 0x7E) {
printf("%04X", info->device_id2);
}
- printf ("\n Erase timeout: %ld ms, write timeout: %ld ms\n",
+ printf ("\n Erase timeout: %ld ms, write timeout: %ld us\n",
info->erase_blk_tout,
info->write_tout);
if (info->buffer_size > 1) {
- printf (" Buffer write timeout: %ld ms, buffer size: %d bytes\n",
+ printf (" Buffer write timeout: %ld us, buffer size: %d bytes\n",
info->buffer_write_tout,
info->buffer_size);
}