Re: [U-Boot] [ANN] v2014.01-rc2

2013-12-16 Thread Wolfgang Denk
Dear Tom,

In message <20131216180941.GX420@bill-the-cat> you wrote:
> 
> I've put v2014.01-rc2 out and we should have a tarball soon.

The tarball is on the FTP server now.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
"It follows that any commander in chief who undertakes to carry out a
plan which he considers defective is at fault; he must put forth  his
reasons,  insist  of  the  plan being changed, and finally tender his
resignation rather than be the instrument of his army's downfall."
- Napoleon, "Military Maxims and Thought"
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] Please pull u-boot-ti

2013-12-16 Thread Wolfgang Denk
Dear Tom,

In message <20131213133732.GF420@bill-the-cat> you wrote:
> 
> > remote: error: refs/remotes/origin/GPL-Cleanup does not point to a
> > valid object!
> > remote: error: refs/remotes/origin/i.MX31 does not point to a valid
> > object!
> > remote: error: refs/remotes/origin/lwmon5 does not point to a valid
> > object!
> 
> Wolfgang, any idea about this part?

Oops.  Sory for the late response.  Should be fixed now (I ran a
"git remote prune origin" to get rid of the stale branches).

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
Simplicity boils down to two steps: Identify the essential. Eliminate
the rest.   - Leo Babauta
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 6/6] port omap4 boards to use generic distro configs

2013-12-16 Thread Dennis Gilmore
Signed-off-by: Dennis Gilmore 
---
 include/configs/omap4_common.h | 30 +++---
 1 file changed, 27 insertions(+), 3 deletions(-)

diff --git a/include/configs/omap4_common.h b/include/configs/omap4_common.h
index ea56eeb..96c94a1 100644
--- a/include/configs/omap4_common.h
+++ b/include/configs/omap4_common.h
@@ -55,6 +55,9 @@
 
 #include 
 
+/* enable generic distro config */
+#define DISTRO_DEFAULTS 1
+
 /*
  * Hardware drivers
  */
@@ -88,9 +91,13 @@
  */
 #define CONFIG_EXTRA_ENV_SETTINGS \
"loadaddr=0x8200\0" \
+   "pxefile_addr_r=0x8200\0" \
+   "kernel_addr_r=0x8400\0" \
+   "ramdisk_addr_r=0x9000\0" \
+   "fdt_addr_r=0x8300\0" \
"console=ttyO2,115200n8\0" \
"fdt_high=0x\0" \
-   "fdtaddr=0x80f8\0" \
+   "fdt_addr=0x80f8\0" \
"fdtfile=undefined\0" \
"bootpart=0:2\0" \
"bootdir=/boot\0" \
@@ -104,6 +111,22 @@
"vram=${vram} " \
"root=${mmcroot} " \
"rootfstype=${mmcrootfstype}\0" \
+   "bootcmd_setup=mmc rescan\0" \
+   "bootcmd_pxe=setenv bootfile \"\" ;dhcp; pxe get; pxe boot\0" \
+   "bootcmd_disk_scr=load ${boot_ifc} ${bootdevice} ${scr_addr_r} boot.scr 
&& source ${scr_addr_r}\0" \
+   "bootcmd_disk_sysboot1=setenv bootfile /boot/extlinux/extlinux.conf; 
sysboot ${boot_ifc} ${bootdevice} any\0" \
+   "bootcmd_disk_sysboot2=setenv bootfile /extlinux/extlinux.conf; sysboot 
${boot_ifc} ${bootdevice} any\0" \
+   "bootcmd_disk_uenv=load ${boot_ifc} ${bootdevice} ${uenv_addr_r} 
uEnv.txt; env import -t ${uenv_addr_r} ${filesize}; run bootcmd_uenv\0" \
+   "bootcmd_disk_kernel=load ${boot_ifc} ${bootdevice} ${kernel_addr_r} 
vmlinuz && load ${boot_ifc} ${bootdevice} ${ramdisk_addr_r} initrd.img && bootz 
${kernel_addr_r} ${ramdisk_addr_r}:${filesize} ${fdt_addr}\0" \
+   "bootcmd_disk=run bootcmd_disk_sysboot1; run bootcmd_disk_sysboot2; run 
bootcmd_disk_uenv; run bootcmd_disk_scr; run bootcmd_disk_kernel\0" \
+   "bootcmd_mmc=setenv boot_ifc mmc; mmc rescan && run bootcmd_disk\0" \
+   "bootcmd_default=run bootcmd_mmc; run bootcmd_pxe\0" \
+   "localcmd=run bootcmd_mmc\0" \
+   "bootdevice=0\0" \
+   "bootargs=console=${console} root=LABEL=rootfs\0" \
+   "bootdelay=2\0" \
+   "bootretry=90\0" \
+   "netretry=once\0" \
"loadbootscript=fatload mmc ${mmcdev} ${loadaddr} boot.scr\0" \
"bootscript=echo Running bootscript from mmc${mmcdev} ...; " \
"source ${loadaddr}\0" \
@@ -113,7 +136,7 @@
"loadimage=load mmc ${bootpart} ${loadaddr} ${bootdir}/${bootfile}\0" \
"mmcboot=echo Booting from mmc${mmcdev} ...; " \
"run mmcargs; " \
-   "bootz ${loadaddr} - ${fdtaddr}\0" \
+   "bootz ${loadaddr} - ${fdt_addr}\0" \
"findfdt="\
"if test $board_name = sdp4430; then " \
"setenv fdtfile omap4-sdp.dtb; fi; " \
@@ -125,12 +148,13 @@
"setenv fdtfile omap4-panda-es.dtb; fi;" \
"if test $fdtfile = undefined; then " \
"echo WARNING: Could not determine device tree to use; 
fi; \0" \
-   "loadfdt=load mmc ${bootpart} ${fdtaddr} ${bootdir}/${fdtfile}\0" \
+   "loadfdt=load mmc ${bootpart} ${fdt_addr} ${bootdir}/${fdtfile}\0" \
 
 #define CONFIG_BOOTCOMMAND \
"run findfdt; " \
"mmc dev ${mmcdev}; if mmc rescan; then " \
"echo SD/MMC found on device ${mmcdev};" \
+   "run bootcmd_default; " \
"if run loadbootscript; then " \
"run bootscript; " \
"else " \
-- 
1.8.4.2

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 3/6] port andboard to use generic distro config

2013-12-16 Thread Dennis Gilmore
Signed-off-by: Dennis Gilmore 
---
 include/configs/wandboard.h | 40 +++-
 1 file changed, 35 insertions(+), 5 deletions(-)

diff --git a/include/configs/wandboard.h b/include/configs/wandboard.h
index e9c7e64..41c84ae 100644
--- a/include/configs/wandboard.h
+++ b/include/configs/wandboard.h
@@ -40,6 +40,9 @@
 #define CONFIG_CONS_INDEX  1
 #define CONFIG_BAUDRATE115200
 
+/* enable generic distro config */
+#define DISTRO_DEFAULTS 1
+
 /* Command definition */
 #include 
 
@@ -48,7 +51,6 @@
 #define CONFIG_CMD_BMODE
 #define CONFIG_CMD_SETEXPR
 
-#define CONFIG_BOOTDELAY   5
 
 #define CONFIG_SYS_MEMTEST_START   0x1000
 #define CONFIG_SYS_MEMTEST_END (CONFIG_SYS_MEMTEST_START + 500 * SZ_1M)
@@ -65,6 +67,9 @@
 #define CONFIG_CMD_MMC
 #define CONFIG_GENERIC_MMC
 #define CONFIG_BOUNCE_BUFFER
+
+#define CONFIG_BOOTDELAY   5
+
 #define CONFIG_CMD_EXT2
 #define CONFIG_CMD_FAT
 #define CONFIG_DOS_PARTITION
@@ -74,6 +79,11 @@
 #define CONFIG_CMD_DHCP
 #define CONFIG_CMD_MII
 #define CONFIG_CMD_NET
+
+#define CONFIG_OF_LIBFDT
+#define CONFIG_CMD_BOOTZ
+
+/* Ethernet Configuration */
 #define CONFIG_FEC_MXC
 #define CONFIG_MII
 #define IMX_FEC_BASE   ENET_BASE_ADDR
@@ -113,8 +123,30 @@
"fdt_high=0x\0" \
"initrd_high=0x\0" \
"fdt_file=" CONFIG_DEFAULT_FDT_FILE "\0" \
-   "fdt_addr=0x1100\0" \
+   "fdt_addr=0x1110\0" \
+   "fdt_addr_r=0x1120\0" \
+   "pxefile_addr_r=0x1130\0" \
+   "scr_addr_r=0x1140\0" \
+   "kernel_addr_r=0x1150\0" \
+   "ramdisk_addr_r=0x1350\0" \
"boot_fdt=try\0" \
+   "bootcmd_setup=mmc rescan\0" \
+   "bootcmd_pxe=setenv bootfile \"\" ;dhcp; tftp ${fdt_addr} 
/dtb/${fdt_file}; pxe get; pxe boot\0" \
+   "bootcmd_disk_scr=load ${boot_ifc} ${bootdevice} ${scr_addr_r} boot.scr 
&& source ${scr_addr_r}\0" \
+   "bootcmd_disk_sysboot1=setenv bootfile /boot/extlinux/extlinux.conf; 
sysboot ${boot_ifc} ${bootdevice} any\0" \
+   "bootcmd_disk_sysboot2=setenv bootfile /extlinux/extlinux.conf; sysboot 
${boot_ifc} ${bootdevice} any\0" \
+   "bootcmd_disk_uenv=load ${boot_ifc} ${bootdevice} ${uenv_addr_r} 
uEnv.txt; env import -t ${uenv_addr_r} ${filesize}; run bootcmd_uenv\0" \
+   "bootcmd_disk_kernel=load ${boot_ifc} ${bootdevice} ${kernel_addr_r} 
vmlinuz && load ${boot_ifc} ${bootdevice} ${ramdisk_addr_r} initrd.img && bootz 
${kernel_addr_r} ${ramdisk_addr_r}:${filesize} ${fdt_addr}\0" \
+   "bootcmd_disk=load ${boot_ifc} ${bootdevice} ${fdt_addr} 
/boot/dtb/${fdt_file}; load ${boot_ifc} ${bootdevice} ${fdt_addr} 
/dtb/${fdt_file};run bootcmd_disk_sysboot1; run bootcmd_disk_sysboot2; run 
bootcmd_disk_uenv; run bootcmd_disk_scr; run bootcmd_disk_kernel\0" \
+   "bootcmd_sata=setenv boot_ifc scsi; scsi scan && run bootcmd_disk\0" \
+   "bootcmd_mmc=setenv boot_ifc mmc; mmc rescan && run bootcmd_disk\0" \
+   "bootcmd_default=run bootcmd_mmc; run bootcmd_sata; run bootcmd_pxe\0" \
+   "localcmd=run bootcmd_mmc\0" \
+   "bootdevice=0\0" \
+   "bootargs=console=ttymxc0 root=LABEL=rootfs\0" \
+   "bootdelay=2\0" \
+   "bootretry=90\0" \
+   "netretry=once\0" \
"ip_dyn=yes\0" \
"mmcdev=" __stringify(CONFIG_SYS_MMC_ENV_DEV) "\0" \
"mmcpart=1\0" \
@@ -183,6 +215,7 @@
 
 #define CONFIG_BOOTCOMMAND \
   "mmc dev ${mmcdev}; if mmc rescan; then " \
+   "run bootcmd_default; " \
   "if run loadbootscript; then " \
   "run bootscript; " \
   "else " \
@@ -230,9 +263,6 @@
 #define CONFIG_ENV_OFFSET  (6 * 64 * 1024)
 #define CONFIG_SYS_MMC_ENV_DEV 0
 
-#define CONFIG_OF_LIBFDT
-#define CONFIG_CMD_BOOTZ
-
 #ifndef CONFIG_SYS_DCACHE_OFF
 #define CONFIG_CMD_CACHE
 #endif
-- 
1.8.4.2

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 4/6] port am335x_evm to use generic distro configs

2013-12-16 Thread Dennis Gilmore
Signed-off-by: Dennis Gilmore 
---
 include/configs/am335x_evm.h | 23 +--
 1 file changed, 13 insertions(+), 10 deletions(-)

diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h
index 8af4d6a..206166f 100644
--- a/include/configs/am335x_evm.h
+++ b/include/configs/am335x_evm.h
@@ -55,11 +55,14 @@
 
 #ifndef CONFIG_SPL_BUILD
 #define CONFIG_EXTRA_ENV_SETTINGS \
-   "loadaddr=0x8020\0" \
-   "fdtaddr=0x80F8\0" \
+   "loadaddr=0x8100\0" \
+   "pxefile_addr_r=0x8130\0" \
+   "kernel_addr_r=0x8140\0" \
+   "ramdisk_addr_r=0x8340\0" \
+   "fdt_addr_r=0x8110\0" \
+   "fdt_addr=0x8120\0" \
"fdt_high=0x\0" \
"boot_fdt=try\0" \
-   "rdaddr=0x8100\0" \
"bootpart=0:2\0" \
"bootdir=/boot\0" \
"bootfile=zImage\0" \
@@ -75,7 +78,7 @@
"nfsopts=nolock\0" \
"static_ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}" \
"::off\0" \
-   "ramroot=/dev/ram0 rw ramdisk_size=65536 initrd=${rdaddr},64M\0" \
+   "ramroot=/dev/ram0 rw ramdisk_size=65536 
initrd=${ramdisk_addr_r},64M\0" \
"ramrootfstype=ext2\0" \
"mmcargs=setenv bootargs console=${console} " \
"${optargs} " \
@@ -104,13 +107,13 @@
"${optargs} " \
"root=${ramroot} " \
"rootfstype=${ramrootfstype}\0" \
-   "loadramdisk=load mmc ${mmcdev} ${rdaddr} ramdisk.gz\0" \
+   "loadramdisk=load mmc ${mmcdev} ${ramdisk_addr_r} ramdisk.gz\0" \
"loadimage=load mmc ${bootpart} ${loadaddr} ${bootdir}/${bootfile}\0" \
-   "loadfdt=load mmc ${bootpart} ${fdtaddr} ${bootdir}/${fdtfile}\0" \
+   "loadfdt=load mmc ${bootpart} ${fdt_addr_r} ${bootdir}/${fdtfile}\0" \
"mmcloados=run mmcargs; " \
"if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
"if run loadfdt; then " \
-   "bootz ${loadaddr} - ${fdtaddr}; " \
+   "bootz ${loadaddr} - ${fdt_addr_r}; " \
"else " \
"if test ${boot_fdt} = try; then " \
"bootz; " \
@@ -145,12 +148,12 @@
"setenv autoload no; " \
"dhcp; " \
"tftp ${loadaddr} ${bootfile}; " \
-   "tftp ${fdtaddr} ${fdtfile}; " \
+   "tftp ${fdt_addr_r} ${fdtfile}; " \
"run netargs; " \
-   "bootz ${loadaddr} - ${fdtaddr}\0" \
+   "bootz ${loadaddr} - ${fdt_addr_r}\0" \
"ramboot=echo Booting from ramdisk ...; " \
"run ramargs; " \
-   "bootz ${loadaddr} ${rdaddr} ${fdtaddr}\0" \
+   "bootz ${loadaddr} ${ramdisk_addr_r} ${fdt_addr_r}\0" \
"findfdt="\
"if test $board_name = A335BONE; then " \
"setenv fdtfile am335x-bone.dtb; fi; " \
-- 
1.8.4.2

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 2/6] add a generic set of configs to enable Distros to more easier support u-boot based systems

2013-12-16 Thread Dennis Gilmore
Signed-off-by: Dennis Gilmore 
---
 include/common.h|  5 
 include/config_distro_default.h | 55 +
 2 files changed, 60 insertions(+)
 create mode 100644 include/config_distro_default.h

diff --git a/include/common.h b/include/common.h
index d49c514..00969a5 100644
--- a/include/common.h
+++ b/include/common.h
@@ -99,6 +99,11 @@ typedef volatile unsigned char   vu_char;
 #include 
 #include 
 
+/* use generic distro config */
+#ifdef DISTRO_DEFAULTS
+#include 
+#endif
+
 #ifdef DEBUG
 #define _DEBUG 1
 #else
diff --git a/include/config_distro_default.h b/include/config_distro_default.h
new file mode 100644
index 000..7b13586
--- /dev/null
+++ b/include/config_distro_default.h
@@ -0,0 +1,55 @@
+/*
+ * Copyright 2013 Red Hat, Inc.
+ *
+ * SPDX-License-Identifier: GPL-2.0+
+ */
+
+#ifndef _CONFIG_CMD_DISTRO_DEFAULT_H
+#define _CONFIG_CMD_DISTRO_DEFAULT_H
+
+/*
+ * List of all commands and options that when defined enables support for 
features
+ * required by distros to support boards in a standardised and consitant 
manner.
+ */
+
+#define CONFIG_BOOTP_BOOTPATH
+#define CONFIG_BOOTP_DNS
+#define CONFIG_BOOTP_GATEWAY
+#define CONFIG_BOOTP_HOSTNAME
+#define CONFIG_BOOTP_PXE
+#define CONFIG_BOOTP_SUBNETMASK
+
+#if defined(__arm__)
+#define CONFIG_BOOTP_PXE_CLIENTARCH 0x100
+#if defined(__ARM_ARCH_7__) || defined(__ARM_ARCH_7A__)
+#define CONFIG_BOOTP_VCI_STRING "U-boot.armv7"
+#else
+#define CONFIG_BOOTP_VCI_STRING "U-boot.arm"
+#endif
+#endif
+
+#define CONFIG_OF_LIBFDT
+
+#define CONFIG_CMD_BOOTZ
+#define CONFIG_CMD_DHCP
+#define CONFIG_CMD_ELF
+#define CONFIG_CMD_EXT2
+#define CONFIG_CMD_EXT4
+#define CONFIG_CMD_FAT
+#define CONFIG_CMD_FS_GENERIC
+#define CONFIG_CMD_MII
+#define CONFIG_CMD_NET
+#define CONFIG_CMD_PING
+#define CONFIG_CMD_PXE
+
+#define CONFIG_CMDLINE_EDITING
+#define CONFIG_AUTO_COMPLETE
+#define CONFIG_BOOTDELAY 2
+#define CONFIG_SYS_LONGHELP
+#define CONFIG_MENU
+#define CONFIG_DOS_PARTITION
+#define CONFIG_EFI_PARTITION
+#define CONFIG_SUPPORT_RAW_INITRD
+#define CONFIG_SYS_HUSH_PARSER
+
+#endif /* _CONFIG_CMD_DISTRO_DEFAULT_H */
-- 
1.8.4.2

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 5/6] port beagleboard to use generic distro configs

2013-12-16 Thread Dennis Gilmore
Signed-off-by: Dennis Gilmore 
---
 include/configs/omap3_beagle.h | 30 +++---
 1 file changed, 27 insertions(+), 3 deletions(-)

diff --git a/include/configs/omap3_beagle.h b/include/configs/omap3_beagle.h
index 3acb854..7d0fa45 100644
--- a/include/configs/omap3_beagle.h
+++ b/include/configs/omap3_beagle.h
@@ -127,6 +127,9 @@
 /* commands to include */
 #include 
 
+/* enable generic distro config */
+#define DISTRO_DEFAULTS 1
+
 #define CONFIG_CMD_ASKENV
 
 #define CONFIG_CMD_CACHE
@@ -190,9 +193,13 @@
 
 #define CONFIG_EXTRA_ENV_SETTINGS \
"loadaddr=0x8020\0" \
+   "pxefile_addr_r=0x8200\0" \
+   "kernel_addr_r=0x8400\0" \
+   "ramdisk_addr_r=0x9000\0" \
+   "fdt_addr_r=0x8300\0" \
"rdaddr=0x8100\0" \
"fdt_high=0x\0" \
-   "fdtaddr=0x80f8\0" \
+   "fdt_addr=0x80f8\0" \
"usbtty=cdc_acm\0" \
"bootfile=uImage\0" \
"ramdisk=ramdisk.gz\0" \
@@ -244,6 +251,22 @@
"setenv fdtfile omap3-beagle-xm.dtb; fi; " \
"if test $fdtfile = undefined; then " \
"echo WARNING: Could not determine device tree to use; 
fi; \0" \
+   "bootcmd_setup=mmc rescan\0" \
+   "bootcmd_pxe=setenv bootfile \"\" ;dhcp; pxe get; pxe boot\0" \
+   "bootcmd_disk_scr=ext2load ${boot_ifc} ${bootdevice} ${scr_addr_r} 
boot.scr && source ${scr_addr_r}\0" \
+   "bootcmd_disk_sysboot1=setenv bootfile /boot/extlinux/extlinux.conf; 
sysboot ${boot_ifc} ${bootdevice} any\0" \
+   "bootcmd_disk_sysboot2=setenv bootfile /extlinux/extlinux.conf; sysboot 
${boot_ifc} ${bootdevice} any\0" \
+   "bootcmd_disk_uenv=ext2load ${boot_ifc} ${bootdevice} ${uenv_addr_r} 
uEnv.txt; env import -t ${uenv_addr_r} ${filesize}; run bootcmd_uenv\0" \
+   "bootcmd_disk_kernel=ext2load ${boot_ifc} ${bootdevice} 
${kernel_addr_r} vmlinuz && ext2load ${boot_ifc} ${bootdevice} 
${ramdisk_addr_r} initrd.img && bootz ${kernel_addr_r} 
${ramdisk_addr_r}:${filesize} ${fdt_addr}\0" \
+   "bootcmd_disk=run bootcmd_disk_sysboot1; run bootcmd_disk_sysboot2; run 
bootcmd_disk_uenv; run bootcmd_disk_scr; run bootcmd_disk_kernel\0" \
+   "bootcmd_mmc=setenv boot_ifc mmc; mmc rescan && run bootcmd_disk\0" \
+   "bootcmd_default=run bootcmd_mmc; run bootcmd_pxe\0" \
+   "localcmd=run bootcmd_mmc\0" \
+   "bootdevice=0\0" \
+   "bootargs=console=${console} root=LABEL=rootfs\0" \
+   "bootdelay=2\0" \
+   "bootretry=90\0" \
+   "netretry=once\0" \
"bootenv=uEnv.txt\0" \
"loadbootenv=fatload mmc ${mmcdev} ${loadaddr} ${bootenv}\0" \
"importbootenv=echo Importing environment from mmc ...; " \
@@ -259,13 +282,13 @@
"rootfstype=${ramrootfstype}\0" \
"loadramdisk=load mmc ${bootpart} ${rdaddr} ${bootdir}/${ramdisk}\0" \
"loadimage=load mmc ${bootpart} ${loadaddr} ${bootdir}/${bootfile}\0" \
-   "loadfdt=load mmc ${bootpart} ${fdtaddr} ${bootdir}/${fdtfile}\0" \
+   "loadfdt=load mmc ${bootpart} ${fdt_addr} ${bootdir}/${fdtfile}\0" \
"mmcboot=echo Booting from mmc ...; " \
"run mmcargs; " \
"bootm ${loadaddr}\0" \
"mmcbootz=echo Booting with DT from mmc${mmcdev} ...; " \
"run mmcargs; " \
-   "bootz ${loadaddr} - ${fdtaddr}\0" \
+   "bootz ${loadaddr} - ${fdt_addr}\0" \
"nandboot=echo Booting from nand ...; " \
"run nandargs; " \
"nand read ${loadaddr} 28 40; " \
@@ -281,6 +304,7 @@
 #define CONFIG_BOOTCOMMAND \
"run findfdt; " \
"mmc dev ${mmcdev}; if mmc rescan; then " \
+"run bootcmd_default; " \
"if run userbutton; then " \
"setenv bootenv uEnv.txt;" \
"else " \
-- 
1.8.4.2

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [RFC v2] implementation of generic distro configs

2013-12-16 Thread Dennis Gilmore
>From V2 ive added support to cmd_pxe.c for any filesystem and added generic
suppport to the distro config, the result is /boot can be vfat or ext and will
just work.

I have fixed up the arch in pxe so taht it is only represented as armv7 on v7 
builds

Left to go is to deal with memory addresses correctly in the most flexible way, 
and 
Wolfgang's objections to the use of fdt_addr to have u-boot load a dtb 
automatically
without the need to pass in a fdt line in the extlinux.conf

the patches are all posted at 
http://fedorapeople.org/cgit/ausil/public_git/u-boot.git/ as well

Dennis

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 1/6] cmd_pxe.c add any option for filesystem with sysboot uses generic load

2013-12-16 Thread Dennis Gilmore
Signed-off-by: Dennis Gilmore 
---
 common/cmd_pxe.c | 22 +++---
 1 file changed, 19 insertions(+), 3 deletions(-)

diff --git a/common/cmd_pxe.c b/common/cmd_pxe.c
index db6b156..08c0ff5 100644
--- a/common/cmd_pxe.c
+++ b/common/cmd_pxe.c
@@ -11,6 +11,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include "menu.h"
 
@@ -160,6 +161,19 @@ static int do_get_fat(cmd_tbl_t *cmdtp, const char 
*file_path, char *file_addr)
return -ENOENT;
 }
 
+static int do_get_any(cmd_tbl_t *cmdtp, const char *file_path, char *file_addr)
+{
+#ifdef CONFIG_CMD_FS_GENERIC
+   fs_argv[0] = "load";
+   fs_argv[3] = file_addr;
+   fs_argv[4] = (void *)file_path;
+
+   if (!do_load(cmdtp, 0, 5, fs_argv, FS_TYPE_ANY))
+   return 1;
+#endif
+   return -ENOENT;
+}
+
 /*
  * As in pxelinux, paths to files referenced from files we retrieve are
  * relative to the location of bootfile. get_relfile takes such a path and
@@ -1539,6 +1553,8 @@ int do_sysboot(cmd_tbl_t *cmdtp, int flag, int argc, char 
* const argv[])
do_getfile = do_get_ext2;
else if (strstr(argv[3], "fat"))
do_getfile = do_get_fat;
+   else if (strstr(argv[3], "any"))
+   do_getfile = do_get_any;
else {
printf("Invalid filesystem: %s\n", argv[3]);
return 1;
@@ -1576,7 +1592,7 @@ int do_sysboot(cmd_tbl_t *cmdtp, int flag, int argc, char 
* const argv[])
 U_BOOT_CMD(
sysboot, 7, 1, do_sysboot,
"command to get and boot from syslinux files",
-   "[-p][addr] [filename]\n"
-   "- load and parse syslinux menu file 'filename' from ext2 or fat\n"
-   "  filesystem on 'dev' on 'interface' to address 'addr'"
+   "[-p][addr] [filename]\n"
+   "- load and parse syslinux menu file 'filename' from ext2, fat\n"
+   "  or any filesystem on 'dev' on 'interface' to address 'addr'"
 );
-- 
1.8.4.2

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH][v2] powerpc/t1040qds: Update DDR initialization related settings

2013-12-16 Thread Priyanka Jain
Update following DDR related settings for T1040QDS
-Correct number of chip selects to two as t1040qds supports
 two Chip selects.
-Update board_specific_parameters udimm structure with settings
 derived via calibration.
-Reduced I2C speed to 50KHz as DDR-SPD does not get reliably
 read at 400KHz.

Signed-off-by: Poonam Aggrwal 
Signed-off-by: Priyanka Jain 
---
 Changes for v2:
Reduced I2C speed to 50KHz.

 board/freescale/t1040qds/ddr.h |   22 --
 include/configs/T1040QDS.h |6 +++---
 2 files changed, 15 insertions(+), 13 deletions(-)

diff --git a/board/freescale/t1040qds/ddr.h b/board/freescale/t1040qds/ddr.h
index 8ee206e..afa72af 100644
--- a/board/freescale/t1040qds/ddr.h
+++ b/board/freescale/t1040qds/ddr.h
@@ -31,16 +31,18 @@ static const struct board_specific_parameters udimm0[] = {
 *   num|  hi| rank|  clk| wrlvl |   wrlvl   |  wrlvl | cpo  |wrdata|2T
 * ranks| mhz| GB  |adjst| start |   ctl2|  ctl3  |  |delay |
 */
-   {2,  1350, 4, 4, 8, 0x0809090b, 0x0c0c0d0a,   0xff,2,  0},
-   {2,  1350, 0, 5, 7, 0x0709090b, 0x0c0c0d09,   0xff,2,  0},
-   {2,  1666, 4, 4, 8, 0x080a0a0d, 0x0d10100b,   0xff,2,  0},
-   {2,  1666, 0, 5, 7, 0x080a0a0c, 0x0d0d0e0a,   0xff,2,  0},
-   {2,  1900, 0, 4, 8, 0x090a0b0e, 0x0f11120c,   0xff,2,  0},
-   {2,  2140, 0, 4, 8, 0x090a0b0e, 0x0f11120c,   0xff,2,  0},
-   {1,  1350, 0, 5, 8, 0x0809090b, 0x0c0c0d0a,   0xff,2,  0},
-   {1,  1700, 0, 5, 8, 0x080a0a0c, 0x0c0d0e0a,   0xff,2,  0},
-   {1,  1900, 0, 4, 8, 0x080a0a0c, 0x0e0e0f0a,   0xff,2,  0},
-   {1,  2140, 0, 4, 8, 0x090a0b0c, 0x0e0f100b,   0xff,2,  0},
+   {2,  833,  4, 4, 6, 0x06060607, 0x08080807,   0xff,2,  0},
+   {2,  833,  0, 4, 6, 0x06060607, 0x08080807,   0xff,2,  0},
+   {2,  1350, 4, 4, 7, 0x0708080A, 0x0A0B0C09,   0xff,2,  0},
+   {2,  1350, 0, 4, 7, 0x0708080A, 0x0A0B0C09,   0xff,2,  0},
+   {2,  1666, 4, 4, 7, 0x0808090B, 0x0C0D0E0A,   0xff,2,  0},
+   {2,  1666, 0, 4, 7, 0x0808090B, 0x0C0D0E0A,   0xff,2,  0},
+   {1,  833,  4, 4, 6, 0x06060607, 0x08080807,   0xff,2,  0},
+   {1,  833,  0, 4, 6, 0x06060607, 0x08080807,   0xff,2,  0},
+   {1,  1350, 4, 4, 7, 0x0708080A, 0x0A0B0C09,   0xff,2,  0},
+   {1,  1350, 0, 4, 7, 0x0708080A, 0x0A0B0C09,   0xff,2,  0},
+   {1,  1666, 4, 4, 7, 0x0808090B, 0x0C0D0E0A,   0xff,2,  0},
+   {1,  1666, 0, 4, 7, 0x0808090B, 0x0C0D0E0A,   0xff,2,  0},
{}
 };
 
diff --git a/include/configs/T1040QDS.h b/include/configs/T1040QDS.h
index 43a5778..484b237 100644
--- a/include/configs/T1040QDS.h
+++ b/include/configs/T1040QDS.h
@@ -167,7 +167,7 @@ unsigned long get_board_ddr_clk(void);
 
 /* CONFIG_NUM_DDR_CONTROLLERS is defined in include/asm/config_mpc85xx.h */
 #define CONFIG_DIMM_SLOTS_PER_CTLR 1
-#define CONFIG_CHIP_SELECTS_PER_CTRL   (4 * CONFIG_DIMM_SLOTS_PER_CTLR)
+#define CONFIG_CHIP_SELECTS_PER_CTRL   (2 * CONFIG_DIMM_SLOTS_PER_CTLR)
 
 #define CONFIG_DDR_SPD
 #define CONFIG_SYS_FSL_DDR3
@@ -413,9 +413,9 @@ unsigned long get_board_ddr_clk(void);
 /* I2C */
 #define CONFIG_SYS_I2C
 #define CONFIG_SYS_I2C_FSL /* Use FSL common I2C driver */
-#define CONFIG_SYS_FSL_I2C_SPEED   40  /* I2C speed in Hz */
+#define CONFIG_SYS_FSL_I2C_SPEED   5   /* I2C speed in Hz */
 #define CONFIG_SYS_FSL_I2C_SLAVE   0x7F
-#define CONFIG_SYS_FSL_I2C2_SPEED  40  /* I2C speed in Hz */
+#define CONFIG_SYS_FSL_I2C2_SPEED  5   /* I2C speed in Hz */
 #define CONFIG_SYS_FSL_I2C2_SLAVE  0x7F
 #define CONFIG_SYS_FSL_I2C_OFFSET  0x118000
 #define CONFIG_SYS_FSL_I2C2_OFFSET 0x119000
-- 
1.7.4.1



___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] how to limit sandbox to a single thread/core?

2013-12-16 Thread Abraham V.
On Tue, Dec 17, 2013 at 2:00 AM, Simon Glass  wrote:
> Hi,
>
> On 13 December 2013 01:47, Abraham V.  wrote:
>> Hello,
>>
>> I just discovered that uboot has a "sandbox" build - output binary is
>> a standard linux application. This prompted me to try stepping through
>> the code with gdb and I'm running into an annoyance.
>>
>> The sandbox binary is splitting into 4 threads (I'm guessing one for
>> each of my cores, am running this on an intel i3). This results in gdb
>> jumping between the different threads every once in a while.
>>
>> Is there anyway to setup the sandbox to run as a single thread?
>
> This is news to me - I have not hit this problem yet. Can you see what
> the threads are?
>
> Regards,
> Simon

I'm ... embarrassed to report that this is a false alarm. Took me a
couple of days and I was about to send a reply today morning when I
saw your response. What happened is that I used the eclipse-cdt
debugger to try tracing the sandbox application. An interesting
'feature' of this debugger is that it shows which core a process is
running on. Here are a few (links) screenshots,

http://imageshack.us/a/img14/2202/ze37.png
http://imageshack.us/a/img855/1153/uwul.png
http://imageshack.us/a/img585/8499/ibz3.png

It wasn't until yesterday when I realized that, while the application
was jumping between cores, the thread number was exactly the same - it
wasn't a multi-threaded application, but a single threaded one just
bouncing around! This puzzled me so much that I even started a SO
question over the matter,

http://stackoverflow.com/questions/20608032/while-debugging-will-a-single-threaded-application-jump-between-cores

Turns out that the scheduler knocked me off-balance. Can't believe I'm
saying this, but I miss the days when everything ran on a single
thread/processor core.

A little embarrassed,
Abraham V.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] examples: add again x86 standalone example

2013-12-16 Thread Masahiro Yamada
Hi.

We no longer need this patch on Patchwork.
Please reject it.



Best Regards
Masahiro Yamada

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2 3/4] Add dumpimage, a tool to extract data from U-Boot images

2013-12-16 Thread Masahiro Yamada
Hello Guilherme, Simon


> diff --git a/Makefile b/Makefile
> index a2fb037..653d3b3 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -796,6 +796,7 @@ clean:
>  $(obj)tools/envcrc \
>  $(obj)tools/gdb/{astest,gdbcont,gdbsend}   \
>  $(obj)tools/gen_eth_addr$(obj)tools/img2srec   \
> +$(obj)tools/dump{env,}image\
>  $(obj)tools/mk{env,}image   $(obj)tools/mpc86x_clk \
>  $(obj)tools/mk{$(BOARD),}spl   \
>  $(obj)tools/mxsboot\

Where is tools/dumpenvimage created?


Best Regards
Masahiro Yamada

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 3/3] serial_sh: add support for the SH7753 instead of SH7752

2013-12-16 Thread Shimoda, Yoshihiro
This patch changes the support for SH7752 to SH7753.

Signed-off-by: Yoshihiro Shimoda 
---
 drivers/serial/serial_sh.h |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/serial/serial_sh.h b/drivers/serial/serial_sh.h
index 556b868..c832252 100644
--- a/drivers/serial/serial_sh.h
+++ b/drivers/serial/serial_sh.h
@@ -143,7 +143,7 @@ struct uart_port {
 #elif defined(CONFIG_H8S2678)
 # define SCSCR_INIT(port)  0x30 /* TIE=0,RIE=0,TE=1,RE=1 */
 # define H8300_SCI_DR(ch) (*(volatile char *)(P1DR + h8300_sci_pins[ch].port))
-#elif defined(CONFIG_CPU_SH7757) || defined(CONFIG_CPU_SH7752)
+#elif defined(CONFIG_CPU_SH7757) || defined(CONFIG_CPU_SH7753)
 # define SCSPTR0 0xfe4b0020
 # define SCSPTR1 0xfe4b0020
 # define SCSPTR2 0xfe4b0020
-- 
1.7.1

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 2/3] net: sh-eth: add support for SH7753 instead of SH7752

2013-12-16 Thread Shimoda, Yoshihiro
SH7753 has two fast ethernet controllers and two gigabit ethernet
controllers. It is similar to SH7757.

This patch changes the support for SH7752 to SH7753.

Signed-off-by: Yoshihiro Shimoda 
---
 drivers/net/sh_eth.h |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/net/sh_eth.h b/drivers/net/sh_eth.h
index 8aa7109..579b8ac 100644
--- a/drivers/net/sh_eth.h
+++ b/drivers/net/sh_eth.h
@@ -287,7 +287,7 @@ static const u16 
sh_eth_offset_fast_sh4[SH_ETH_MAX_REGISTER_OFFSET] = {
 #if defined(CONFIG_CPU_SH7763) || defined(CONFIG_CPU_SH7734)
 #define SH_ETH_TYPE_GETHER
 #define BASE_IO_ADDR   0xfee0
-#elif defined(CONFIG_CPU_SH7757) || defined(CONFIG_CPU_SH7752)
+#elif defined(CONFIG_CPU_SH7757) || defined(CONFIG_CPU_SH7753)
 #if defined(CONFIG_SH_ETHER_USE_GETHER)
 #define SH_ETH_TYPE_GETHER
 #define BASE_IO_ADDR   0xfee0
-- 
1.7.1

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 4/4] arm: pxa: update LP-8x4x to boot DTS kernel

2013-12-16 Thread Sergei Ianovich
On Sun, 2013-12-15 at 20:22 +0100, Marek Vasut wrote:
> On Sunday, December 15, 2013 at 07:56:35 PM, Sergei Ianovich wrote:
> > While testing, I've run into an issue with USB support. If I do
> > 
> >   $ usb start
> > 
> > in U-Boot, not only it doesn't see an attached flash storage, but also
> > it break USB in the kernel. If I just boot the kernel from flash or
> > tftp, USB works in the kernel.
> 
> The OHCI controller is not properly shut down before booting kernel, that's 
> what 
> I'd check first.

Thanks for the tip. That was practically it. USB was started and stopped
twice (first by board then by CPU code). The driver is fine.


___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH v2 4/5] arm: pxa: update LP-8x4x to boot DT kernel

2013-12-16 Thread Sergei Ianovich
DT kernel requires CONFIG_OF_LIBFDT. 'bootm' needs to know DT location.
In addition, fix kernel console device and enable U-Boot long help.

Signed-off-by: Sergei Ianovich 
CC: Marek Vasut 
---
 Changes v1..v2
 * don't disable USB
 * update serial console

 include/configs/lp8x4x.h | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/include/configs/lp8x4x.h b/include/configs/lp8x4x.h
index 565940c..501b94a 100644
--- a/include/configs/lp8x4x.h
+++ b/include/configs/lp8x4x.h
@@ -20,18 +20,18 @@
 #defineCONFIG_SYS_MALLOC_LEN   (128*1024)
 #defineCONFIG_ARCH_CPU_INIT
 #defineCONFIG_BOOTCOMMAND  \
-   "bootm 8;"
+   "bootm 8 - 24;"
 
 #defineCONFIG_BOOTARGS \
-   "console=ttySA0,115200 mem=128M root=/dev/mmcblk0p1 rw" \
-   "init=/sbin/init rootfstype=ext3"
+   "console=ttyS0,115200 mem=128M root=/dev/mmcblk0p1 rw" \
+   "init=/sbin/init rootfstype=ext4 rootwait"
 
 #defineCONFIG_TIMESTAMP
 #defineCONFIG_BOOTDELAY2   /* Autoboot delay */
 #defineCONFIG_CMDLINE_TAG
 #defineCONFIG_SETUP_MEMORY_TAGS
 #defineCONFIG_LZMA /* LZMA compression support */
-#undef CONFIG_OF_LIBFDT
+#defineCONFIG_OF_LIBFDT
 
 /*
  * Serial Console Configuration
@@ -101,7 +101,7 @@
  */
 #defineCONFIG_SYS_HUSH_PARSER  1
 
-#undef CONFIG_SYS_LONGHELP
+#defineCONFIG_SYS_LONGHELP
 #ifdef CONFIG_SYS_HUSH_PARSER
 #defineCONFIG_SYS_PROMPT   "$ "
 #else
-- 
1.8.5.1

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH v2 1/5] ARM: pxa: prevent PXA270 occasional reboot freezes

2013-12-16 Thread Sergei Ianovich
Erratum 71 of PXA270M Processor Family Specification Update
(April 19, 2010) explains that watchdog reset time is just
8us insead of 10ms in EMTS.

If SDRAM is not reset, it causes memory bus congestion and
the device hangs.

We put SDRAM in selfresh mode before watchdog reset, removing
potential freezes.

Signed-off-by: Sergei Ianovich 
CC: Marek Vasut 
---
 Changes v1..v2
 * write to MDREFR once instead of in a cycle as suggested by
   Marek Vasut

 arch/arm/cpu/pxa/pxa2xx.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm/cpu/pxa/pxa2xx.c b/arch/arm/cpu/pxa/pxa2xx.c
index c9a7d45..7e861e2 100644
--- a/arch/arm/cpu/pxa/pxa2xx.c
+++ b/arch/arm/cpu/pxa/pxa2xx.c
@@ -279,6 +279,7 @@ void reset_cpu(ulong ignored)
tmp = readl(OSCR);
tmp += 0x1000;
writel(tmp, OSMR3);
+   writel(MDREFR_SLFRSH, MDREFR);
 
for (;;)
;
-- 
1.8.5.1

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH v2 5/5] arm: pxa: init ethaddr for LP-8x4x using DT

2013-12-16 Thread Sergei Ianovich
When DT define aliases for etherner0 and ethernet1, U-Boot
automatically patched MAC addresses using ethaddr and eth1addr
environment variables respectively.

Custom initialization is no longer needed.

Signed-off-by: Sergei Ianovich 
CC: Marek Vasut 
---
 Changes v1..v2
 * use alias instead of manual updating as suggested by Marek Vasut

 board/icpdas/lp8x4x/lp8x4x.c | 17 -
 1 file changed, 17 deletions(-)

diff --git a/board/icpdas/lp8x4x/lp8x4x.c b/board/icpdas/lp8x4x/lp8x4x.c
index 0888960..a7a2e21 100644
--- a/board/icpdas/lp8x4x/lp8x4x.c
+++ b/board/icpdas/lp8x4x/lp8x4x.c
@@ -114,25 +114,8 @@ int usb_board_stop(void)
 #endif
 
 #ifdef CONFIG_DRIVER_DM9000
-void lp8x4x_eth1_mac_init(void)
-{
-   u8 eth1addr[8];
-   int i;
-   u8 reg;
-
-   eth_getenv_enetaddr_by_index("eth", 1, eth1addr);
-   if (!is_valid_ether_addr(eth1addr))
-   return;
-
-   for (i = 0, reg = 0x10; i < 6; i++, reg++) {
-   writeb(reg, (u8 *)(DM9000_IO_2));
-   writeb(eth1addr[i], (u8 *)(DM9000_DATA_2));
-   }
-}
-
 int board_eth_init(bd_t *bis)
 {
-   lp8x4x_eth1_mac_init();
return dm9000_initialize(bis);
 }
 #endif
-- 
1.8.5.1

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH v2 0/5] fix and update LP-8x4x to boot DT kernel

2013-12-16 Thread Sergei Ianovich
Linux kernel maintainers require new machnines to support device
tree boot. The config for LP-8x4x needs updating.

In addition, there are a few fixes to board's configuration.

v2 fixes review comments made by Marek Vasut.

Sergei Ianovich (5):
  ARM: pxa: prevent PXA270 occasional reboot freezes
  arm: pxa: fix LP-8x4x USB support
  arm: pxa: fix 2nd flash chip address on LP-8x4x
  arm: pxa: update LP-8x4x to boot DT kernel
  arm: pxa: init ethaddr for LP-8x4x using DT

 arch/arm/cpu/pxa/pxa2xx.c|  1 +
 board/icpdas/lp8x4x/lp8x4x.c | 39 +--
 include/configs/lp8x4x.h | 15 +++
 3 files changed, 21 insertions(+), 34 deletions(-)

-- 
1.8.5.1

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH v2 3/5] arm: pxa: fix 2nd flash chip address on LP-8x4x

2013-12-16 Thread Sergei Ianovich
Initial configuration has worng address of the second chip.
There is an alias for the 1st chip at 0x0200 in earlier
verions of LP-8x4x, so the boot normally.

However, new LP-8x4xs have a bigger 1st flash chip, and hang on
boot without this patch.

Signed-off-by: Sergei Ianovich 
CC: Marek Vasut 
---
 Changes v1..v2
 * no changes

 include/configs/lp8x4x.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/configs/lp8x4x.h b/include/configs/lp8x4x.h
index 2c03425..565940c 100644
--- a/include/configs/lp8x4x.h
+++ b/include/configs/lp8x4x.h
@@ -150,7 +150,7 @@
 #defineCONFIG_ENV_SECT_SIZE0x4
 
 #definePHYS_FLASH_10x  /* Flash Bank 
#1 */
-#definePHYS_FLASH_20x0200  /* Flash Bank 
#2 */
+#definePHYS_FLASH_20x0400  /* Flash Bank 
#2 */
 
 #defineCONFIG_SYS_FLASH_CFI
 #defineCONFIG_FLASH_CFI_DRIVER 1
-- 
1.8.5.1

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH v2 2/5] arm: pxa: fix LP-8x4x USB support

2013-12-16 Thread Sergei Ianovich
USB was broken initially. Power polarity should be direct.

Signed-off-by: Sergei Ianovich 
CC: Marek Vasut 
---
 Changes v1..v2
 * new patch

 board/icpdas/lp8x4x/lp8x4x.c | 22 +-
 include/configs/lp8x4x.h |  3 +--
 2 files changed, 14 insertions(+), 11 deletions(-)

diff --git a/board/icpdas/lp8x4x/lp8x4x.c b/board/icpdas/lp8x4x/lp8x4x.c
index 1b68ef3..0888960 100644
--- a/board/icpdas/lp8x4x/lp8x4x.c
+++ b/board/icpdas/lp8x4x/lp8x4x.c
@@ -60,15 +60,21 @@ int board_mmc_init(bd_t *bis)
 #ifdef CONFIG_CMD_USB
 int usb_board_init(void)
 {
-   writel((UHCHR | UHCHR_PCPL | UHCHR_PSPL) &
-   ~(UHCHR_SSEP0 | UHCHR_SSEP1 | UHCHR_SSEP2 | UHCHR_SSE),
-   UHCHR);
+   writel(readl(CKEN) | CKEN10_USBHOST, CKEN);
+
+   writel(readl(UHCHR) | UHCHR_FHR, UHCHR);
+   udelay(11);
+   writel(readl(UHCHR) & ~UHCHR_FHR, UHCHR);
 
writel(readl(UHCHR) | UHCHR_FSBIR, UHCHR);
 
while (readl(UHCHR) & UHCHR_FSBIR)
continue; /* required by checkpath.pl */
 
+   writel(readl(UHCHR) & ~UHCHR_SSEP0, UHCHR);
+   writel(readl(UHCRHDA) & ~(0x1000), UHCRHDA);
+   writel(readl(UHCRHDA) | 0x800, UHCRHDA);
+
writel(readl(UHCHR) & ~UHCHR_SSE, UHCHR);
writel((UHCHIE_UPRIE | UHCHIE_RWIE), UHCHIE);
 
@@ -82,10 +88,6 @@ int usb_board_init(void)
/* Set port power control mask bits, only 3 ports. */
writel(readl(UHCRHDB) | (0x7<<17), UHCRHDB);
 
-   /* enable port 2 */
-   writel(readl(UP2OCR) | UP2OCR_HXOE | UP2OCR_HXS |
-   UP2OCR_DMPDE | UP2OCR_DPPDE, UP2OCR);
-
return 0;
 }
 
@@ -94,7 +96,7 @@ void usb_board_init_fail(void)
return;
 }
 
-void usb_board_stop(void)
+int usb_board_stop(void)
 {
writel(readl(UHCHR) | UHCHR_FHR, UHCHR);
udelay(11);
@@ -103,9 +105,11 @@ void usb_board_stop(void)
writel(readl(UHCCOMS) | 1, UHCCOMS);
udelay(10);
 
+   writel(readl(UHCHR) | UHCHR_SSEP0 | UHCHR_SSE, UHCHR);
+
writel(readl(CKEN) & ~CKEN10_USBHOST, CKEN);
 
-   return;
+   return 0;
 }
 #endif
 
diff --git a/include/configs/lp8x4x.h b/include/configs/lp8x4x.h
index 6df6f2b..2c03425 100644
--- a/include/configs/lp8x4x.h
+++ b/include/configs/lp8x4x.h
@@ -190,7 +190,7 @@
 #defineCONFIG_SYS_GAFR1_L_VAL  0x999a955a
 #defineCONFIG_SYS_GAFR1_U_VAL  0xaaa5a00a
 #defineCONFIG_SYS_GAFR2_L_VAL  0x
-#defineCONFIG_SYS_GAFR2_U_VAL  0x55f0a402
+#defineCONFIG_SYS_GAFR2_U_VAL  0x55f9a402
 #defineCONFIG_SYS_GAFR3_L_VAL  0x540a950c
 #defineCONFIG_SYS_GAFR3_U_VAL  0x1599
 
@@ -238,7 +238,6 @@
  */
 #ifdef CONFIG_CMD_USB
 #defineCONFIG_USB_OHCI_NEW
-#defineCONFIG_SYS_USB_OHCI_CPU_INIT
 #defineCONFIG_SYS_USB_OHCI_BOARD_INIT
 #defineCONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS  2
 #defineCONFIG_SYS_USB_OHCI_REGS_BASE   0x4C00
-- 
1.8.5.1

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [U-boot] the relationship between CONFIG_LCD / CONFIG_VIDEO / CONFIG_CFB_CONSOLE

2013-12-16 Thread TigerLiu
Hi, Simon:
>Some drivers uses CONFIG_VIDEO and some use CONFIG_LCD. We tried to
>unify the API calls a little a year or so ago. They serve a very
>similar purpose. I hope that with driver model they will become the
>same.
Thanks a lot!

Best wishes,
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 2/2] mtd: nand: omap: fix ecc ops assignment when changing ecc

2013-12-16 Thread Scott Wood
On Mon, 2013-12-16 at 19:19 +0200, Nikita Kiryanov wrote:
> If we change to software ecc and then back to hardware ecc, the nand ecc ops
> pointers are populated with incorrect function pointers. This is related to 
> the
> way nand_scan_tail() handles assigning functions to ecc ops:
> 
> If we are switching to software ecc/no ecc, it assigns default functions to 
> the
> ecc ops pointers unconditionally, but if we are switching to hardware ecc,
> the default hardware ecc functions are assigned to ops pointers only if these
> pointers are NULL (so that drivers could set their own functions). In the case
> of omap_gpmc.c driver, when we switch to sw ecc, sw ecc functions are
> assigned to ecc ops by nand_scan_tail(), and when we later switch to hw ecc,
> the ecc ops pointers are not NULL, so nand_scan_tail() does not overwrite
> them with hw ecc functions.
> The result: sw ecc functions used to write hw ecc data.
> 
> Clear the ecc ops pointers in omap_gpmc.c when switching ecc types, so that
> ops which were not assigned by the driver will get the correct default values
> from nand_scan_tail().
> 
> Cc: Scott Wood 
> Cc: Pekon Gupta 
> Signed-off-by: Nikita Kiryanov 
> ---
>  drivers/mtd/nand/omap_gpmc.c | 13 +
>  1 file changed, 13 insertions(+)
> 
> diff --git a/drivers/mtd/nand/omap_gpmc.c b/drivers/mtd/nand/omap_gpmc.c
> index fda1df2..19dcd45 100644
> --- a/drivers/mtd/nand/omap_gpmc.c
> +++ b/drivers/mtd/nand/omap_gpmc.c
> @@ -765,6 +765,19 @@ static int omap_select_ecc_scheme(struct nand_chip *nand,
>   int eccsteps = pagesize / SECTOR_BYTES;
>   int i;
>  
> + nand->ecc.calculate = NULL;
> + nand->ecc.correct = NULL;
> + nand->ecc.hwctl = NULL;
> + nand->ecc.read_oob = NULL;
> + nand->ecc.read_oob_raw = NULL;
> + nand->ecc.read_page = NULL;
> + nand->ecc.read_page_raw = NULL;
> + nand->ecc.read_subpage = NULL;
> + nand->ecc.write_oob = NULL;
> + nand->ecc.write_oob_raw = NULL;
> + nand->ecc.write_page = NULL;
> + nand->ecc.write_page_raw = NULL;
> +
>   switch (ecc_scheme) {
>   case OMAP_ECC_HAM1_CODE_SW:
>   debug("nand: selected OMAP_ECC_HAM1_CODE_SW\n");

This will leave you with a broken nand->ecc if the function returns an
error.  Instead, each case in the switch should NULL out whichever
members it is not initializing (or perhaps just memset it, once past the
error checks).

-Scott


___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH v3 6/8] mx28evk: Extend environment to easy write of NAND system

2013-12-16 Thread Otavio Salvador
This adds following new targets:

 - update_nand_kernel
 - update_nand_fdt
 - update_nand_filesystem

and to avoid confusion, the 'update_nand_full' has been renamed to
'update_nand_firmware_full'.

Signed-off-by: Otavio Salvador 
---
Changes in v3: None
Changes in v2: None

 include/configs/mx28evk.h | 35 ++-
 1 file changed, 34 insertions(+), 1 deletion(-)

diff --git a/include/configs/mx28evk.h b/include/configs/mx28evk.h
index 6c9fa00..4fd67eb 100644
--- a/include/configs/mx28evk.h
+++ b/include/configs/mx28evk.h
@@ -160,6 +160,7 @@
 
 /* Extra Environment */
 #define CONFIG_EXTRA_ENV_SETTINGS \
+   "ubifs_file=filesystem.ubifs\0" \
"update_nand_full_filename=u-boot.nand\0" \
"update_nand_firmware_filename=u-boot.sb\0" \
"update_nand_firmware_maxsz=0x10\0" \
@@ -170,7 +171,7 @@
"nand info ; " \
"setexpr fcb_sz ${update_nand_stride} * ${update_nand_count};" \
"setexpr update_nand_fcb ${fcb_sz} * ${nand_writesize}\0" \
-   "update_nand_full=" /* Update FCB, DBBT and FW */ \
+   "update_nand_firmware_full=" /* Update FCB, DBBT and FW */ \
"if tftp ${update_nand_full_filename} ; then " \
"run update_nand_get_fcb_size ; " \
"nand scrub -y 0x0 ${filesize} ; " \
@@ -189,6 +190,38 @@
"nand write ${loadaddr} ${fcb_sz} ${filesize} ; " \
"nand write ${loadaddr} ${fw_off} ${filesize} ; " \
"fi\0" \
+   "update_nand_kernel="   /* Update kernel */ \
+   "mtdparts default; " \
+   "nand erase.part kernel; " \
+   "if test ${ip_dyn} = yes; then " \
+   "setenv get_cmd dhcp; " \
+   "else " \
+   "setenv get_cmd tftp; " \
+   "fi; " \
+   "${get_cmd} ${uimage}; " \
+   "nand write ${loadaddr} kernel ${filesize}\0" \
+   "update_nand_fdt="  /* Update fdt */ \
+   "mtdparts default; " \
+   "nand erase.part fdt; " \
+   "if test ${ip_dyn} = yes; then " \
+   "setenv get_cmd dhcp; " \
+   "else " \
+   "setenv get_cmd tftp; " \
+   "fi; " \
+   "${get_cmd} ${fdt_file}; " \
+   "nand write ${loadaddr} fdt ${filesize}\0" \
+   "update_nand_filesystem="   /* Update filesystem */ \
+   "mtdparts default; " \
+   "nand erase.part filesystem; " \
+   "if test ${ip_dyn} = yes; then " \
+   "setenv get_cmd dhcp; " \
+   "else " \
+   "setenv get_cmd tftp; " \
+   "fi; " \
+   "${get_cmd} ${ubifs_file}; " \
+   "ubi part filesystem; " \
+   "ubi create filesystem; " \
+   "ubi write ${loadaddr} filesystem ${filesize}\0" \
"nandargs=setenv bootargs console=${console_mainline},${baudrate} " \
"rootfstype=ubifs ubi.mtd=6 root=ubi0_0 ${mtdparts}\0" \
"nandboot=" /* Boot from NAND */ \
-- 
1.8.4.3

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH REPOST2] spi: tegra: clear RDY bit prior to every transfer

2013-12-16 Thread Stephen Warren
From: Yen Lin 

The RDY bit indicates that a transfer is complete. This needs to be
cleared by SW before every single HW transaction, rather than only
at the start of each SW transaction (those being made up of n HW
transactions).

It seems that earlier HW may have cleared this bit autonomously when
starting a new transfer, and hence this code was not needed in practice.
However, this is generally a good idea in all cases. In Tegra124, the
HW behaviour appears to have changed, and SW must explicitly clear this
bit. Otherwise, SW will believe that transfers have completed when they
have not, and may e.g. read stale data from the RX FIFO.

Signed-off-by: Yen Lin 
[swarren, rewrote commit description, unified duplicate RDY clearing code
and moved it right before the start of the HW transaction, unconditionally
exit loop after reading RX data, rather than checking if TX FIFO is empty,
since it is guaranteed to be]
Signed-off-by: Stephen Warren 
---
 drivers/spi/tegra1x4_spi.c | 21 -
 1 file changed, 8 insertions(+), 13 deletions(-)

diff --git a/drivers/spi/tegra1x4_spi.c b/drivers/spi/tegra1x4_spi.c
index 2742443e184c..a0c6537e8f5c 100644
--- a/drivers/spi/tegra1x4_spi.c
+++ b/drivers/spi/tegra1x4_spi.c
@@ -275,9 +275,6 @@ int tegra114_spi_xfer(struct spi_slave *slave, unsigned int 
bitlen,
reg = readl(®s->fifo_status);
writel(reg, ®s->fifo_status);
 
-   /* clear ready bit */
-   setbits_le32(®s->xfer_status, SPI_XFER_STS_RDY);
-
clrsetbits_le32(®s->command1, SPI_CMD1_CS_SW_VAL,
SPI_CMD1_RX_EN | SPI_CMD1_TX_EN | SPI_CMD1_LSBY_FE |
(slave->cs << SPI_CMD1_CS_SEL_SHIFT));
@@ -291,7 +288,6 @@ int tegra114_spi_xfer(struct spi_slave *slave, unsigned int 
bitlen,
/* handle data in 32-bit chunks */
while (num_bytes > 0) {
int bytes;
-   int is_read = 0;
int tm, i;
 
tmpdout = 0;
@@ -305,6 +301,9 @@ int tegra114_spi_xfer(struct spi_slave *slave, unsigned int 
bitlen,
 
num_bytes -= bytes;
 
+   /* clear ready bit */
+   setbits_le32(®s->xfer_status, SPI_XFER_STS_RDY);
+
clrsetbits_le32(®s->command1,
SPI_CMD1_BIT_LEN_MASK << SPI_CMD1_BIT_LEN_SHIFT,
(bytes * 8 - 1) << SPI_CMD1_BIT_LEN_SHIFT);
@@ -315,20 +314,14 @@ int tegra114_spi_xfer(struct spi_slave *slave, unsigned 
int bitlen,
 * Wait for SPI transmit FIFO to empty, or to time out.
 * The RX FIFO status will be read and cleared last
 */
-   for (tm = 0, is_read = 0; tm < SPI_TIMEOUT; ++tm) {
+   for (tm = 0; tm < SPI_TIMEOUT; ++tm) {
u32 fifo_status, xfer_status;
 
-   fifo_status = readl(®s->fifo_status);
-
-   /* We can exit when we've had both RX and TX activity */
-   if (is_read &&
-   (fifo_status & SPI_FIFO_STS_TX_FIFO_EMPTY))
-   break;
-
xfer_status = readl(®s->xfer_status);
if (!(xfer_status & SPI_XFER_STS_RDY))
continue;
 
+   fifo_status = readl(®s->fifo_status);
if (fifo_status & SPI_FIFO_STS_ERR) {
debug("%s: got a fifo error: ", __func__);
if (fifo_status & SPI_FIFO_STS_TX_FIFO_OVF)
@@ -353,7 +346,6 @@ int tegra114_spi_xfer(struct spi_slave *slave, unsigned int 
bitlen,
 
if (!(fifo_status & SPI_FIFO_STS_RX_FIFO_EMPTY)) {
tmpdin = readl(®s->rx_fifo);
-   is_read = 1;
 
/* swap bytes read in */
if (din != NULL) {
@@ -363,6 +355,9 @@ int tegra114_spi_xfer(struct spi_slave *slave, unsigned int 
bitlen,
}
din += bytes;
}
+
+   /* We can exit when we've had both RX and TX */
+   break;
}
}
 
-- 
1.8.1.5

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH v3 7/8] ARM: mx6: Change the FDT loading address to avoid overlaping

2013-12-16 Thread Otavio Salvador
This patch fixes allow for the DeviceTree and initrd relocation fixing
the boot of FSL 3.10.9-1.0.0-alpha kernel.

This changes following boards:

 - mx6sabreauto
 - mx6sabresd
 - wandboard
 - udoo
 - nitrogen6x
 - cgtqmx6eval

The reasoning, as explained by Hui Liu, is:

,
| The FDT blob will be placed at DDR physical addr: 0x1100. When Linux 
kernel
| Boot up, it will decompress the compressed kernel image and place the 
decompressed
| kernel image at the low end of the DDR memory and start running from it. If 
the
| decompressed kernel image is bigger for example than 16M, it may over written 
the
| fdt blob which u-boot loaded to the DDR memory @0x1100 with 
fdt_addr=0x1100
|
| To expand the fdt_addr from 0x1100 to 0x1800, which can avoid the 
override
| Since we will not likely have one kernel image larger than 128MB.
`

Signed-off-by: Otavio Salvador 
---
Changes in v3: None
Changes in v2:
- Change loadaddr to allow use with more than 1G of RAM

 include/configs/cgtqmx6eval.h | 2 +-
 include/configs/mx6sabre_common.h | 2 +-
 include/configs/nitrogen6x.h  | 2 +-
 include/configs/udoo.h| 2 +-
 include/configs/wandboard.h   | 2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/include/configs/cgtqmx6eval.h b/include/configs/cgtqmx6eval.h
index d5db8f5..29a023c 100644
--- a/include/configs/cgtqmx6eval.h
+++ b/include/configs/cgtqmx6eval.h
@@ -81,7 +81,7 @@
"console=ttymxc1\0" \
"fdt_high=0x\0" \
"initrd_high=0x\0" \
-   "fdt_addr=0x1100\0" \
+   "fdt_addr=0x1800\0" \
"boot_fdt=try\0" \
"mmcdev=1\0" \
"mmcpart=1\0" \
diff --git a/include/configs/mx6sabre_common.h 
b/include/configs/mx6sabre_common.h
index a214324..d6ebf83 100644
--- a/include/configs/mx6sabre_common.h
+++ b/include/configs/mx6sabre_common.h
@@ -116,7 +116,7 @@
"script=boot.scr\0" \
"uimage=uImage\0" \
"fdt_file=" CONFIG_DEFAULT_FDT_FILE "\0" \
-   "fdt_addr=0x1100\0" \
+   "fdt_addr=0x1800\0" \
"boot_fdt=try\0" \
"ip_dyn=yes\0" \
"console=" CONFIG_CONSOLE_DEV "\0" \
diff --git a/include/configs/nitrogen6x.h b/include/configs/nitrogen6x.h
index 957dabe..41a6d71 100644
--- a/include/configs/nitrogen6x.h
+++ b/include/configs/nitrogen6x.h
@@ -179,7 +179,7 @@
"fdt_high=0x\0" \
"initrd_high=0x\0" \
"fdt_file=imx6q-sabrelite.dtb\0" \
-   "fdt_addr=0x1100\0" \
+   "fdt_addr=0x1800\0" \
"boot_fdt=try\0" \
"ip_dyn=yes\0" \
"mmcdev=0\0" \
diff --git a/include/configs/udoo.h b/include/configs/udoo.h
index b9a493c..c187361 100644
--- a/include/configs/udoo.h
+++ b/include/configs/udoo.h
@@ -93,7 +93,7 @@
"fdt_high=0x\0" \
"initrd_high=0x\0" \
"fdt_file=" CONFIG_DEFAULT_FDT_FILE "\0" \
-   "fdt_addr=0x1100\0" \
+   "fdt_addr=0x1800\0" \
"boot_fdt=try\0" \
"ip_dyn=yes\0" \
"mmcdev=0\0" \
diff --git a/include/configs/wandboard.h b/include/configs/wandboard.h
index 85f3c16..5252705 100644
--- a/include/configs/wandboard.h
+++ b/include/configs/wandboard.h
@@ -120,7 +120,7 @@
"fdt_high=0x\0" \
"initrd_high=0x\0" \
"fdt_file=" CONFIG_DEFAULT_FDT_FILE "\0" \
-   "fdt_addr=0x1100\0" \
+   "fdt_addr=0x1800\0" \
"boot_fdt=try\0" \
"ip_dyn=yes\0" \
"mmcdev=" __stringify(CONFIG_SYS_MMC_ENV_DEV) "\0" \
-- 
1.8.4.3

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH v3 5/8] mx28evk: Add 'nandboot' environment command

2013-12-16 Thread Otavio Salvador
This reads the kernel, ftd and boot into ubifs filesystem. While on
that, the SD firmware filename definition has been moved next to the
other SD related commands.

Signed-off-by: Otavio Salvador 
---
Changes in v3: None
Changes in v2: None

 include/configs/mx28evk.h | 18 +-
 1 file changed, 17 insertions(+), 1 deletion(-)

diff --git a/include/configs/mx28evk.h b/include/configs/mx28evk.h
index 3de0599..6c9fa00 100644
--- a/include/configs/mx28evk.h
+++ b/include/configs/mx28evk.h
@@ -162,7 +162,6 @@
 #define CONFIG_EXTRA_ENV_SETTINGS \
"update_nand_full_filename=u-boot.nand\0" \
"update_nand_firmware_filename=u-boot.sb\0" \
-   "update_sd_firmware_filename=u-boot.sd\0" \
"update_nand_firmware_maxsz=0x10\0" \
"update_nand_stride=0x40\0" /* MX28 datasheet ch. 12.12 */ \
"update_nand_count=0x4\0"   /* MX28 datasheet ch. 12.12 */ \
@@ -190,6 +189,23 @@
"nand write ${loadaddr} ${fcb_sz} ${filesize} ; " \
"nand write ${loadaddr} ${fw_off} ${filesize} ; " \
"fi\0" \
+   "nandargs=setenv bootargs console=${console_mainline},${baudrate} " \
+   "rootfstype=ubifs ubi.mtd=6 root=ubi0_0 ${mtdparts}\0" \
+   "nandboot=" /* Boot from NAND */ \
+   "mtdparts default; " \
+   "run nandargs; " \
+   "nand read ${loadaddr} kernel 0x0040; " \
+   "if test ${boot_fdt} = yes; then " \
+   "nand read ${fdt_addr} fdt 0x0008; " \
+   "bootm ${loadaddr} - ${fdt_addr}; " \
+   "else " \
+   "if test ${boot_fdt} = no; then " \
+   "bootm; " \
+   "else " \
+   "echo \"ERROR: Set boot_fdt to yes or no.\"; " \
+   "fi; " \
+   "fi\0" \
+   "update_sd_firmware_filename=u-boot.sd\0" \
"update_sd_firmware="   /* Update the SD firmware partition */ \
"if mmc rescan ; then " \
"if tftp ${update_sd_firmware_filename} ; then " \
-- 
1.8.4.3

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH v3 8/8] ARM: mx6: Allow enablement of FEC Anatop based clock for all MX6

2013-12-16 Thread Otavio Salvador
The enable_fec_anatop_clock method should be available for all MX6
variant as it is not MX6 SoloLite specific. This moves the code out of
the #ifdef/#endif and we make it conditional to CONFIG_FEC_MXC
instead.

Signed-off-by: Otavio Salvador 
---
Changes in v3:
- new patch

Changes in v2: None

 arch/arm/cpu/armv7/mx6/clock.c | 21 +++--
 1 file changed, 11 insertions(+), 10 deletions(-)

diff --git a/arch/arm/cpu/armv7/mx6/clock.c b/arch/arm/cpu/armv7/mx6/clock.c
index 873d9d0..d87e73b 100644
--- a/arch/arm/cpu/armv7/mx6/clock.c
+++ b/arch/arm/cpu/armv7/mx6/clock.c
@@ -310,7 +310,18 @@ static u32 get_mmdc_ch0_clk(void)
return freq / (podf + 1);
 
 }
+#else
+static u32 get_mmdc_ch0_clk(void)
+{
+   u32 cbcdr = __raw_readl(&imx_ccm->cbcdr);
+   u32 mmdc_ch0_podf = (cbcdr & MXC_CCM_CBCDR_MMDC_CH0_PODF_MASK) >>
+   MXC_CCM_CBCDR_MMDC_CH0_PODF_OFFSET;
+
+   return get_periph_clk() / (mmdc_ch0_podf + 1);
+}
+#endif
 
+#ifdef CONFIG_FEC_MXC
 int enable_fec_anatop_clock(void)
 {
u32 reg = 0;
@@ -339,16 +350,6 @@ int enable_fec_anatop_clock(void)
 
return 0;
 }
-
-#else
-static u32 get_mmdc_ch0_clk(void)
-{
-   u32 cbcdr = __raw_readl(&imx_ccm->cbcdr);
-   u32 mmdc_ch0_podf = (cbcdr & MXC_CCM_CBCDR_MMDC_CH0_PODF_MASK) >>
-   MXC_CCM_CBCDR_MMDC_CH0_PODF_OFFSET;
-
-   return get_periph_clk() / (mmdc_ch0_podf + 1);
-}
 #endif
 
 static u32 get_usdhc_clk(u32 port)
-- 
1.8.4.3

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH v3 4/8] mx28evk: Use 512k for fdt partition to align it

2013-12-16 Thread Otavio Salvador
Using 512k for fdt partition allow it to be aligned with the other
small partitions and 512k erase block size.

Signed-off-by: Otavio Salvador 
---
Changes in v3: None
Changes in v2: None

 include/configs/mx28evk.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/configs/mx28evk.h b/include/configs/mx28evk.h
index 22fdb3a..3de0599 100644
--- a/include/configs/mx28evk.h
+++ b/include/configs/mx28evk.h
@@ -96,7 +96,7 @@
"512k(environment),"\
"512k(redundant-environment),"  \
"4m(kernel),"   \
-   "128k(fdt),"\
+   "512k(fdt),"\
"8m(ramdisk),"  \
"-(filesystem)"
 #endif
-- 
1.8.4.3

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH v3 1/8] wandboard: add Future Eletronics 7" WVGA LCD extension board

2013-12-16 Thread Otavio Salvador
This adds support for the 7" WVGA produced by Future Eletronics and
make it dynamically detect if it is connected or not based on the
touchscreen controller.

Signed-off-by: Otavio Salvador 
---
Changes in v3:
- rebased on imx/master

Changes in v2: None

 board/wandboard/wandboard.c | 240 +++-
 include/configs/wandboard.h |  35 ++-
 2 files changed, 251 insertions(+), 24 deletions(-)

diff --git a/board/wandboard/wandboard.c b/board/wandboard/wandboard.c
index 0043bc6..7debf30 100644
--- a/board/wandboard/wandboard.c
+++ b/board/wandboard/wandboard.c
@@ -15,6 +15,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -25,6 +26,7 @@
 #include 
 #include 
 #include 
+#include 
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -39,6 +41,10 @@ DECLARE_GLOBAL_DATA_PTR;
 #define ENET_PAD_CTRL  (PAD_CTL_PUS_100K_UP |  \
PAD_CTL_SPEED_MED | PAD_CTL_DSE_40ohm | PAD_CTL_HYS)
 
+#define I2C_PAD_CTRL   (PAD_CTL_PUS_100K_UP |  \
+   PAD_CTL_SPEED_MED | PAD_CTL_DSE_40ohm | PAD_CTL_HYS |   \
+   PAD_CTL_ODE | PAD_CTL_SRE_FAST)
+
 #define USDHC1_CD_GPIO IMX_GPIO_NR(1, 2)
 #define USDHC3_CD_GPIO IMX_GPIO_NR(3, 9)
 #define ETH_PHY_RESET  IMX_GPIO_NR(3, 29)
@@ -208,50 +214,236 @@ int board_phy_config(struct phy_device *phydev)
 }
 
 #if defined(CONFIG_VIDEO_IPUV3)
-static struct fb_videomode const hdmi = {
-   .name   = "HDMI",
-   .refresh= 60,
-   .xres   = 1024,
-   .yres   = 768,
-   .pixclock   = 15385,
-   .left_margin= 220,
-   .right_margin   = 40,
-   .upper_margin   = 21,
-   .lower_margin   = 7,
-   .hsync_len  = 60,
-   .vsync_len  = 10,
-   .sync   = FB_SYNC_EXT,
-   .vmode  = FB_VMODE_NONINTERLACED
+struct i2c_pads_info i2c_pad_info = {
+   .scl = {
+   .i2c_mode = MX6_PAD_KEY_COL3__I2C2_SCL
+   | MUX_PAD_CTRL(I2C_PAD_CTRL),
+   .gpio_mode = MX6_PAD_KEY_COL3__GPIO4_IO12
+   | MUX_PAD_CTRL(I2C_PAD_CTRL),
+   .gp = IMX_GPIO_NR(4, 12)
+   },
+   .sda = {
+   .i2c_mode = MX6_PAD_KEY_ROW3__I2C2_SDA
+   | MUX_PAD_CTRL(I2C_PAD_CTRL),
+   .gpio_mode = MX6_PAD_KEY_ROW3__GPIO4_IO13
+   | MUX_PAD_CTRL(I2C_PAD_CTRL),
+   .gp = IMX_GPIO_NR(4, 13)
+   }
 };
 
-int board_video_skip(void)
-{
-   int ret;
+static iomux_v3_cfg_t const fwadapt_7wvga_pads[] = {
+   MX6_PAD_DI0_DISP_CLK__IPU1_DI0_DISP_CLK,
+   MX6_PAD_DI0_PIN2__IPU1_DI0_PIN02, /* HSync */
+   MX6_PAD_DI0_PIN3__IPU1_DI0_PIN03, /* VSync */
+   MX6_PAD_DI0_PIN4__IPU1_DI0_PIN04
+   | MUX_PAD_CTRL(PAD_CTL_DSE_120ohm), /* Contrast */
+   MX6_PAD_DI0_PIN15__IPU1_DI0_PIN15, /* DISP0_DRDY */
+
+   MX6_PAD_DISP0_DAT0__IPU1_DISP0_DATA00,
+   MX6_PAD_DISP0_DAT1__IPU1_DISP0_DATA01,
+   MX6_PAD_DISP0_DAT2__IPU1_DISP0_DATA02,
+   MX6_PAD_DISP0_DAT3__IPU1_DISP0_DATA03,
+   MX6_PAD_DISP0_DAT4__IPU1_DISP0_DATA04,
+   MX6_PAD_DISP0_DAT5__IPU1_DISP0_DATA05,
+   MX6_PAD_DISP0_DAT6__IPU1_DISP0_DATA06,
+   MX6_PAD_DISP0_DAT7__IPU1_DISP0_DATA07,
+   MX6_PAD_DISP0_DAT8__IPU1_DISP0_DATA08,
+   MX6_PAD_DISP0_DAT9__IPU1_DISP0_DATA09,
+   MX6_PAD_DISP0_DAT10__IPU1_DISP0_DATA10,
+   MX6_PAD_DISP0_DAT11__IPU1_DISP0_DATA11,
+   MX6_PAD_DISP0_DAT12__IPU1_DISP0_DATA12,
+   MX6_PAD_DISP0_DAT13__IPU1_DISP0_DATA13,
+   MX6_PAD_DISP0_DAT14__IPU1_DISP0_DATA14,
+   MX6_PAD_DISP0_DAT15__IPU1_DISP0_DATA15,
+   MX6_PAD_DISP0_DAT16__IPU1_DISP0_DATA16,
+   MX6_PAD_DISP0_DAT17__IPU1_DISP0_DATA17,
+
+   MX6_PAD_SD4_DAT2__GPIO2_IO10
+   | MUX_PAD_CTRL(NO_PAD_CTRL), /* DISP0_BKLEN */
+   MX6_PAD_SD4_DAT3__GPIO2_IO11
+   | MUX_PAD_CTRL(NO_PAD_CTRL), /* DISP0_VDDEN */
+};
 
-   ret = ipuv3_fb_init(&hdmi, 0, IPU_PIX_FMT_RGB24);
+struct display_info_t {
+   int bus;
+   int addr;
+   int pixfmt;
+   int (*detect)(struct display_info_t const *dev);
+   void(*enable)(struct display_info_t const *dev);
+   struct  fb_videomode mode;
+};
 
-   if (ret) {
-   printf("HDMI cannot be configured: %d\n", ret);
-   return ret;
-   }
+static int detect_hdmi(struct display_info_t const *dev)
+{
+   struct hdmi_regs *hdmi  = (struct hdmi_regs *)HDMI_ARB_BASE_ADDR;
+   return readb(&hdmi->phy_stat0) & HDMI_DVI_STAT;
+}
 
+static void do_enable_hdmi(struct display_info_t const *dev)
+{
imx_enable_hdmi_phy();
+}
 
-   return ret;
+static int detect_i2c(struct display_info_t const *dev)
+{
+   return ((0 == i2c_set_bus_num(dev->bus)) &&
+   (0 == i2c_probe(dev->addr)));
+}
+
+static void enable_fwadapt_7wvga(struct display_info_t const *dev)
+{
+   imx_iomux_v3_set

[U-Boot] [PATCH v3 3/8] imx: Easy enabling of SION per-pin using MUX_MODE_SION helper macro

2013-12-16 Thread Otavio Salvador
The macro allows easy setting in per-pin, as for example:

,
| imx_iomux_v3_setup_pad(MX6_PAD_NANDF_D1__GPIO_2_1 | MUX_MODE_SION);
`

The IOMUX_CONFIG_SION allows for reading PAD value from PSR register.

The following quote from the datasheet:

,
| ...
| 28.4.2.2 GPIO Write Mode
| The programming sequence for driving output signals should be as follows:
| 1. Configure IOMUX to select GPIO mode (Via IOMUXC), also enable SION if need
| to read loopback pad value through PSR
| 2. Configure GPIO direction register to output (GPIO_GDIR[GDIR] set to 1b).
| 3. Write value to data register (GPIO_DR).
| ...
`

This fixes the gpio_get_value to properly work when a GPIO is set for
output and has no conflicts.

Thanks for Benoît Thébaudeau , Fabio
Estevam  and Eric Bénard
 for helping to properly trace this down.

Signed-off-by: Otavio Salvador 
---
Changes in v3: None
Changes in v2: None

 arch/arm/include/asm/imx-common/iomux-v3.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/arm/include/asm/imx-common/iomux-v3.h 
b/arch/arm/include/asm/imx-common/iomux-v3.h
index dc2b3ef..dec11a1 100644
--- a/arch/arm/include/asm/imx-common/iomux-v3.h
+++ b/arch/arm/include/asm/imx-common/iomux-v3.h
@@ -63,6 +63,8 @@ typedef u64 iomux_v3_cfg_t;
 #define MUX_SEL_INPUT_SHIFT59
 #define MUX_SEL_INPUT_MASK ((iomux_v3_cfg_t)0xf << MUX_SEL_INPUT_SHIFT)
 
+#define MUX_MODE_SION  ((iomux_v3_cfg_t)IOMUX_CONFIG_SION << \
+   MUX_MODE_SHIFT)
 #define MUX_PAD_CTRL(x)((iomux_v3_cfg_t)(x) << 
MUX_PAD_CTRL_SHIFT)
 
 #define IOMUX_PAD(pad_ctrl_ofs, mux_ctrl_ofs, mux_mode, sel_input_ofs, \
-- 
1.8.4.3

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH v3 2/8] mx6sabresd: Add eMMC specific environment to allow U-Boot update

2013-12-16 Thread Otavio Salvador
A new 'update_emmc_firmware' target is added to allow for easy U-Boot
update in the eMMC as it has secury boot partition and this needs
specific handling on how to program the specific partition.

Signed-off-by: Otavio Salvador 
---
Changes in v3: None
Changes in v2: None

 include/configs/mx6sabre_common.h | 23 +++
 include/configs/mx6sabresd.h  |  2 ++
 2 files changed, 25 insertions(+)

diff --git a/include/configs/mx6sabre_common.h 
b/include/configs/mx6sabre_common.h
index d52c9a8..a214324 100644
--- a/include/configs/mx6sabre_common.h
+++ b/include/configs/mx6sabre_common.h
@@ -90,6 +90,28 @@
 #define CONFIG_LOADADDR0x1200
 #define CONFIG_SYS_TEXT_BASE   0x1780
 
+#ifdef CONFIG_SUPPORT_EMMC_BOOT
+#define EMMC_ENV \
+   "emmcdev=2\0" \
+   "update_emmc_firmware=" \
+   "if test ${ip_dyn} = yes; then " \
+   "setenv get_cmd dhcp; " \
+   "else " \
+   "setenv get_cmd tftp; " \
+   "fi; " \
+   "if ${get_cmd} ${update_sd_firmware_filename}; then " \
+   "if mmc dev ${emmcdev} && " \
+   "mmc open ${emmcdev} 1; then "  \
+   "setexpr fw_sz ${filesize} / 0x200; " \
+   "setexpr fw_sz ${fw_sz} + 1; "  \
+   "mmc write ${loadaddr} 0x2 ${fw_sz}; " \
+   "mmc close ${emmcdev} 1; " \
+   "fi; "  \
+   "fi\0"
+#else
+#define EMMC_DEV ""
+#endif
+
 #define CONFIG_EXTRA_ENV_SETTINGS \
"script=boot.scr\0" \
"uimage=uImage\0" \
@@ -116,6 +138,7 @@
"mmc write ${loadaddr} 0x2 ${fw_sz}; " \
"fi; "  \
"fi\0" \
+   EMMC_ENV  \
"mmcargs=setenv bootargs console=${console},${baudrate} " \
"root=${mmcroot}\0" \
"loadbootscript=" \
diff --git a/include/configs/mx6sabresd.h b/include/configs/mx6sabresd.h
index 3229bc7..7653ecb 100644
--- a/include/configs/mx6sabresd.h
+++ b/include/configs/mx6sabresd.h
@@ -30,6 +30,8 @@
 #define CONFIG_SYS_MMC_ENV_DEV 1   /* SDHC3 */
 #endif
 
+#define CONFIG_SUPPORT_EMMC_BOOT /* eMMC specific */
+
 /* Framebuffer */
 #define CONFIG_VIDEO
 #define CONFIG_VIDEO_IPUV3
-- 
1.8.4.3

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH v3 0/8] Pending patches for merging

2013-12-16 Thread Otavio Salvador
This sends all the patches I've been keeping in my tree and are awaiting to be
applied. Basically:

 * Wandboard LCD support and environment changes
 * mx28evk environment changes
 * SabreSD eMMC installation support
 * IOMUX fix
 * FDT loadaddr fix
 * FEC Anatop clock fix

Changes in v3:
- rebased on imx/master
- new patch

Changes in v2:
- Change loadaddr to allow use with more than 1G of RAM

Otavio Salvador (8):
  wandboard: add Future Eletronics 7" WVGA LCD extension board
  mx6sabresd: Add eMMC specific environment to allow U-Boot update
  imx: Easy enabling of SION per-pin using MUX_MODE_SION helper macro
  mx28evk: Use 512k for fdt partition to align it
  mx28evk: Add 'nandboot' environment command
  mx28evk: Extend environment to easy write of NAND system
  ARM: mx6: Change the FDT loading address to avoid overlaping
  ARM: mx6: Allow enablement of FEC Anatop based clock for all MX6

 arch/arm/cpu/armv7/mx6/clock.c |  21 +--
 arch/arm/include/asm/imx-common/iomux-v3.h |   2 +
 board/wandboard/wandboard.c| 240 ++---
 include/configs/cgtqmx6eval.h  |   2 +-
 include/configs/mx28evk.h  |  55 ++-
 include/configs/mx6sabre_common.h  |  25 ++-
 include/configs/mx6sabresd.h   |   2 +
 include/configs/nitrogen6x.h   |   2 +-
 include/configs/udoo.h |   2 +-
 include/configs/wandboard.h|  37 -
 10 files changed, 346 insertions(+), 42 deletions(-)

-- 
1.8.4.3

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] how to limit sandbox to a single thread/core?

2013-12-16 Thread Simon Glass
Hi,

On 13 December 2013 01:47, Abraham V.  wrote:
> Hello,
>
> I just discovered that uboot has a "sandbox" build - output binary is
> a standard linux application. This prompted me to try stepping through
> the code with gdb and I'm running into an annoyance.
>
> The sandbox binary is splitting into 4 threads (I'm guessing one for
> each of my cores, am running this on an intel i3). This results in gdb
> jumping between the different threads every once in a while.
>
> Is there anyway to setup the sandbox to run as a single thread?

This is news to me - I have not hit this problem yet. Can you see what
the threads are?

Regards,
Simon
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [U-boot] the relationship between CONFIG_LCD / CONFIG_VIDEO / CONFIG_CFB_CONSOLE

2013-12-16 Thread Simon Glass
Hi,

On 10 December 2013 01:42,   wrote:
> Hi, experts:
>
> I am confused by CONFIG_LCD / CONFIG_VIDEO / CONFIG_CFB_CONSOLE.
>
> Some board config files defined : CONFIG_VIDEO and CONFIG_CFB_CONSOLE.
>
> But not define CONFIG_LCD.
>
>
>
> It seemed CONFIG_LCD was out of date?

Some drivers uses CONFIG_VIDEO and some use CONFIG_LCD. We tried to
unify the API calls a little a year or so ago. They serve a very
similar purpose. I hope that with driver model they will become the
same.

Regards,
Simon
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH] ARM: tegra: accept any SKU ID for most chips

2013-12-16 Thread Stephen Warren
From: Stephen Warren 

For Tegra20, the SKU ID actually impacts how U-Boot programs the chip,
and hence we need to explicitly know about each and every SKU ID in order
to operate correctly.

However, for Tegra30/114, this isn't the case. Rather than forcing each
new user with a different SKU to manually add their SKU ID into the code,
simply accept any SKU ID.

If U-Boot ever starts e.g. programming maximal CPU clocks etc., we'll
need to undo this, or make the default case map to conservative defaults,
but for now it's likely the path to least support cost.

Reported-by: Olof Johansson 
Signed-off-by: Stephen Warren 
---
 arch/arm/cpu/tegra-common/ap.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/arm/cpu/tegra-common/ap.c b/arch/arm/cpu/tegra-common/ap.c
index 60d71a6c30ad..f205be402abe 100644
--- a/arch/arm/cpu/tegra-common/ap.c
+++ b/arch/arm/cpu/tegra-common/ap.c
@@ -72,6 +72,7 @@ int tegra_get_chip_sku(void)
case SKU_ID_T33:
case SKU_ID_T30:
case SKU_ID_TM30MQS_P_A3:
+   default:
return TEGRA_SOC_T30;
}
break;
@@ -79,6 +80,7 @@ int tegra_get_chip_sku(void)
switch (sku_id) {
case SKU_ID_T114_ENG:
case SKU_ID_T114_1:
+   default:
return TEGRA_SOC_T114;
}
break;
-- 
1.8.1.5

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2] nand_util.c: Use '%zd' for length in nand_unlock debug print

2013-12-16 Thread Scott Wood
On Mon, 2013-12-16 at 09:59 -0500, Tom Rini wrote:
> length is size_t so needs to be '%zd' not '%d' to avoid warnings.
> 
> Cc: Scott Wood 
> Signed-off-by: Tom Rini 
> 
> ---
> Changes in v2:
> - Use %zd, the correct format, rather than %ld, a differntly incorrect
>   one.
> ---
>  drivers/mtd/nand/nand_util.c |2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/mtd/nand/nand_util.c b/drivers/mtd/nand/nand_util.c
> index eeaa7e8..b292826 100644
> --- a/drivers/mtd/nand/nand_util.c
> +++ b/drivers/mtd/nand/nand_util.c
> @@ -315,7 +315,7 @@ int nand_unlock(struct mtd_info *mtd, loff_t start, 
> size_t length,
>   int page;
>   struct nand_chip *chip = mtd->priv;
>  
> - debug("nand_unlock%s: start: %08llx, length: %d!\n",
> + debug("nand_unlock%s: start: %08llx, length: %zd!\n",
>   allexcept ? " (allexcept)" : "", start, length);
>  
>   /* select the NAND device */

Acked-by: Scott Wood 

Though length should really be a loff_t instead.

-Scott


___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v16 04/10] arm64: Add tool to statically apply RELA relocations

2013-12-16 Thread Scott Wood
On Sat, 2013-12-14 at 10:39 +0530, Jagan Teki wrote:
> On Sat, Dec 14, 2013 at 9:17 AM,   wrote:
> > From: Scott Wood 
> >
[snip]
> > +   if (argc != 5) {
> > +   fprintf(stderr, "Statically apply ELF rela relocations\n");
> > +   fprintf(stderr, "Usage: %s   " \
> > +   " \n", argv[0]);
> 
> Try to avoid unnecessary line continuations at fprintf

FWIW, it wasn't like that it in my original patch.  I'm guessing he
changed it due to checkpatch output; checkpatch recognizes printf() but
not fprintf().  It should probably be changed to recognize *printf(),
just as it recognizes *printk().

-Scott


___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [ANN] v2014.01-rc2

2013-12-16 Thread Tom Rini
Hey all,

I've put v2014.01-rc2 out and we should have a tarball soon.

In general, working on clearing out queues and pull requests.

I think there's stil a few ARM subtrees that need to pick things up and
send them along to Albert, along with some general ARM patches
outstanding / platforms that don't have an official subtree.  I hope
these can be picked up soon.

Please let us all know if something has stopped working.

Thanks all!

-- 
Tom


signature.asc
Description: Digital signature
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 0/2] omap_gpmc nand ecc switch bug fixes

2013-12-16 Thread Nikita Kiryanov
This patchset fixes two omap_gpmc.c bugs which are related to ecc switching.
The first bug fixes a situation in which sw->hw->sw ecc switch corrupts ecc
layout data, resulting in incorrect sw ecc layout.
The second bug fixes an issue where switching from sw to hw ecc results in hw
ecc data being read/written using sw ecc functions.

Cc: Scott Wood 
Cc: Pekon Gupta 

Nikita Kiryanov (2):
  mtd: nand: omap: fix sw->hw->sw ecc switch
  mtd: nand: omap: fix ecc ops assignment when changing ecc

 drivers/mtd/nand/omap_gpmc.c | 20 +++-
 1 file changed, 19 insertions(+), 1 deletion(-)

-- 
1.8.1.2

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 1/2] mtd: nand: omap: fix sw->hw->sw ecc switch

2013-12-16 Thread Nikita Kiryanov
When switching ecc mode, omap_select_ecc_scheme() assigns the appropriate values
into the current nand chip's ecc.layout struct. This is done under the
assumption that the struct exists only to store values, so it is OK to overwrite
it, but there is at least one situation where this assumption is incorrect:

When switching to 1 bit hamming code sw ecc, the job of assigning layout data
is outsourced to nand_scan_tail(), which simply assigns into ecc.layout a
pointer to an existing struct prefilled with the appropriate values. This struct
doubles as both data and layout definition, and therefore shouldn't be
overwritten, but on the next switch to hardware ecc, this is exactly what's
going to happen. The next time the user switches to software ecc, they're
going to get a messed up ecc layout.

Prevent this and possible similar bugs by explicitly using the
private-to-omap_gpmc.c omap_ecclayout struct when switching ecc mode.

Cc: Scott Wood 
Cc: Pekon Gupta 
Signed-off-by: Nikita Kiryanov 
---
 drivers/mtd/nand/omap_gpmc.c | 7 ++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/mtd/nand/omap_gpmc.c b/drivers/mtd/nand/omap_gpmc.c
index e61788f..fda1df2 100644
--- a/drivers/mtd/nand/omap_gpmc.c
+++ b/drivers/mtd/nand/omap_gpmc.c
@@ -761,7 +761,7 @@ static void __maybe_unused omap_free_bch(struct mtd_info 
*mtd)
 static int omap_select_ecc_scheme(struct nand_chip *nand,
enum omap_ecc ecc_scheme, unsigned int pagesize, unsigned int oobsize) {
struct nand_bch_priv*bch= nand->priv;
-   struct nand_ecclayout   *ecclayout  = nand->ecc.layout;
+   struct nand_ecclayout   *ecclayout  = &omap_ecclayout;
int eccsteps = pagesize / SECTOR_BYTES;
int i;
 
@@ -895,6 +895,11 @@ static int omap_select_ecc_scheme(struct nand_chip *nand,
debug("nand: error: ecc scheme not enabled or supported\n");
return -EINVAL;
}
+
+   /* nand_scan_tail() sets ham1 sw ecc; hw ecc layout is set by driver */
+   if (ecc_scheme != OMAP_ECC_HAM1_CODE_SW)
+   nand->ecc.layout = ecclayout;
+
return 0;
 }
 
-- 
1.8.1.2

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 2/2] mtd: nand: omap: fix ecc ops assignment when changing ecc

2013-12-16 Thread Nikita Kiryanov
If we change to software ecc and then back to hardware ecc, the nand ecc ops
pointers are populated with incorrect function pointers. This is related to the
way nand_scan_tail() handles assigning functions to ecc ops:

If we are switching to software ecc/no ecc, it assigns default functions to the
ecc ops pointers unconditionally, but if we are switching to hardware ecc,
the default hardware ecc functions are assigned to ops pointers only if these
pointers are NULL (so that drivers could set their own functions). In the case
of omap_gpmc.c driver, when we switch to sw ecc, sw ecc functions are
assigned to ecc ops by nand_scan_tail(), and when we later switch to hw ecc,
the ecc ops pointers are not NULL, so nand_scan_tail() does not overwrite
them with hw ecc functions.
The result: sw ecc functions used to write hw ecc data.

Clear the ecc ops pointers in omap_gpmc.c when switching ecc types, so that
ops which were not assigned by the driver will get the correct default values
from nand_scan_tail().

Cc: Scott Wood 
Cc: Pekon Gupta 
Signed-off-by: Nikita Kiryanov 
---
 drivers/mtd/nand/omap_gpmc.c | 13 +
 1 file changed, 13 insertions(+)

diff --git a/drivers/mtd/nand/omap_gpmc.c b/drivers/mtd/nand/omap_gpmc.c
index fda1df2..19dcd45 100644
--- a/drivers/mtd/nand/omap_gpmc.c
+++ b/drivers/mtd/nand/omap_gpmc.c
@@ -765,6 +765,19 @@ static int omap_select_ecc_scheme(struct nand_chip *nand,
int eccsteps = pagesize / SECTOR_BYTES;
int i;
 
+   nand->ecc.calculate = NULL;
+   nand->ecc.correct = NULL;
+   nand->ecc.hwctl = NULL;
+   nand->ecc.read_oob = NULL;
+   nand->ecc.read_oob_raw = NULL;
+   nand->ecc.read_page = NULL;
+   nand->ecc.read_page_raw = NULL;
+   nand->ecc.read_subpage = NULL;
+   nand->ecc.write_oob = NULL;
+   nand->ecc.write_oob_raw = NULL;
+   nand->ecc.write_page = NULL;
+   nand->ecc.write_page_raw = NULL;
+
switch (ecc_scheme) {
case OMAP_ECC_HAM1_CODE_SW:
debug("nand: selected OMAP_ECC_HAM1_CODE_SW\n");
-- 
1.8.1.2

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] toolchain problems when building iMX6 mx6qsabreauto (and another bootloader tool)

2013-12-16 Thread Stefano Babic
Hi Måns,

On 04/12/2013 16:35, Måns Rullgård wrote:
>>
>> mx6: compute PLL PFD frequencies rather than using defines
> 
> That commit introduces a 64-bit division without using the lldiv()
> function, which pulls in previously unused libgcc stuff.
> 
> Try this patch:

As it was proofed that your patch fixes the issue, can you send aagain
the patch using git send-email and adding your Signed-off-by for merging
into the release ?

Thanks,
Stefano Babic

-- 
=
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de
=
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] Makefile: fix the typo error for mrproper

2013-12-16 Thread Simon Glass
Hi Tom,

On 16 December 2013 09:38, Tom Rini  wrote:
> On Mon, Dec 16, 2013 at 08:53:08AM -0700, Simon Glass wrote:
>> On 16 December 2013 00:27, Bo Shen  wrote:
>> > Fix the typo error for mrproper from mkproper.
>> >
>> > Signed-off-by: Bo Shen 
>>
>> Adding Masahiro.
>>
>> > ---
>> > In Makefile, there is no object name is mkproper, so I think this is
>> > a typo error.
>> >
>> >  Makefile |2 +-
>> >  1 file changed, 1 insertion(+), 1 deletion(-)
>> >
>> > diff --git a/Makefile b/Makefile
>> > index 7310c4e..ddbaaf0 100644
>> > --- a/Makefile
>> > +++ b/Makefile
>> > @@ -168,7 +168,7 @@ endif
>> >  include $(TOPDIR)/config.mk
>> >
>> >  # Targets which don't build the source code
>> > -NON_BUILD_TARGETS = backup clean clobber distclean mkproper tidy unconfig
>> > +NON_BUILD_TARGETS = backup clean clobber distclean mrproper tidy unconfig
>> >
>> >  # Only do the generic board check when actually building, not configuring
>> >  ifeq ($(filter $(NON_BUILD_TARGETS),$(MAKECMDGOALS)),)
>
> Note all of this logic came in with fada9e2 which is you, Simon :)  But
> I'm pretty sure this is trivially correct, so I'll take it soon.

OK, I see. Yes looks right.

Acked-by: Simon Glass 

Regards,
Simon
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2 01/12] TI:armv7: Change CONFIG_SPL_STACK to not be CONFIG_SYS_INIT_SP_ADDR

2013-12-16 Thread Tom Rini
On Mon, Dec 09, 2013 at 01:08:47PM -0500, Tom Rini wrote:

> There are times where we may need more than a few kilobytes of stack
> space.  We also will not be using CONFIG_SPL_STACK location prior to DDR
> being initialized (CONFIG_SYS_INIT_SP_ADDR is still used there) so pick
> a good location within DDR for this to be.  Tested on
> OMAP4/AM335x/OMAP5/DRA7xx.
> 
> Signed-off-by: Tom Rini 

After getting this tested on AM43xx, there's something to be changed /
solved here as those boards do not like this change.  So, some sort of
change is requested, but I'm not sure just what yet.

-- 
Tom


signature.asc
Description: Digital signature
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] Pull request: u-boot-video/master

2013-12-16 Thread Tom Rini
On Mon, Dec 16, 2013 at 03:25:40PM +0100, Anatolij Gustschin wrote:

> Hey Tom,
> 
> The following changes since commit f44483b57c49282299da0e5c10073b909cdad979:
> 
>   Merge branch 'serial' of git://git.denx.de/u-boot-microblaze (2013-12-02 
> 08:48:02 -0500)
> 
> are available in the git repository at:
> 
> 
>   git://git.denx.de/u-boot-video.git master
> 
> for you to fetch changes up to d1486e3352c8e6b91da8e610993ea591466cb223:
> 
>   video: ipu_disp: Return a negative value on error (2013-12-04 13:27:55 
> +0100)
> 
> 
> Fabio Estevam (1):
>   video: ipu_disp: Return a negative value on error
> 
>  drivers/video/ipu_disp.c |2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Applied to u-boot/master, thanks!

-- 
Tom


signature.asc
Description: Digital signature
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] Makefile: fix the typo error for mrproper

2013-12-16 Thread Tom Rini
On Mon, Dec 16, 2013 at 08:53:08AM -0700, Simon Glass wrote:
> On 16 December 2013 00:27, Bo Shen  wrote:
> > Fix the typo error for mrproper from mkproper.
> >
> > Signed-off-by: Bo Shen 
> 
> Adding Masahiro.
> 
> > ---
> > In Makefile, there is no object name is mkproper, so I think this is
> > a typo error.
> >
> >  Makefile |2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/Makefile b/Makefile
> > index 7310c4e..ddbaaf0 100644
> > --- a/Makefile
> > +++ b/Makefile
> > @@ -168,7 +168,7 @@ endif
> >  include $(TOPDIR)/config.mk
> >
> >  # Targets which don't build the source code
> > -NON_BUILD_TARGETS = backup clean clobber distclean mkproper tidy unconfig
> > +NON_BUILD_TARGETS = backup clean clobber distclean mrproper tidy unconfig
> >
> >  # Only do the generic board check when actually building, not configuring
> >  ifeq ($(filter $(NON_BUILD_TARGETS),$(MAKECMDGOALS)),)

Note all of this logic came in with fada9e2 which is you, Simon :)  But
I'm pretty sure this is trivially correct, so I'll take it soon.

-- 
Tom


signature.asc
Description: Digital signature
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 2/2] vexpress: Add vexpress qemu variant

2013-12-16 Thread Albert ARIBAUD
Hi Ian,

On Sun, 17 Nov 2013 15:17:43 +, Ian Campbell 
wrote:

> The main purpose of this is to disable the use of the virtualisation 
> extensions
> which Qemu does not emulate.
> 
> Also enable a few additional commands and the u-boot API.
> 
> This works for me with:
> $ dd if=/dev/zero of=pflash0.img bs=1M count=64
> $ dd if=/dev/zero of=pflash1.img bs=1M count=64
> $ qemu-system-arm -M vexpress-a15 -cpu cortex-a15 -kernel u-boot -m 1024m -sd 
> mmc.img -nographic -pflash pflash0.img -pflash pflash1.img
> 
> (for some reason both pflash images are needed for saveenv to work)

Please split the above as follows:

- a short problem and solution description in the commit message,
  above the commit message delimiter '---';

- anything else (examples, comments, etc) below the commit delimiter.
 
> Signed-off-by: Ian Campbell 
> Cc: albert.u.b...@aribaud.net
> ---
>  boards.cfg  | 1 +
>  include/configs/vexpress_ca15_tc2.h | 2 ++
>  include/configs/vexpress_common.h   | 4 
>  3 files changed, 7 insertions(+)
> 
> diff --git a/boards.cfg b/boards.cfg
> index caba64e..6e2fccc 100644
> --- a/boards.cfg
> +++ b/boards.cfg
> @@ -245,6 +245,7 @@ Active  arm arm926ejs  versatile   armltd 
>  versatile
>  Active  arm arm946es   -   armltd  integrator
>   integratorap_cm946es integratorap:CM946ES   
>   
>  Linus Walleij 
>  Active  arm arm946es   -   armltd  integrator
>   integratorcp_cm946es integratorcp:CM946ES   
>   
>  Linus Walleij 
>  Active  arm armv7  -   armltd  vexpress  
>   vexpress_ca15_tc2-  
>   
>  -
> +Active  arm armv7  -   armltd  vexpress  
>   vexpress_ca15_tc2_qemu   
> vexpress_ca15_tc2:ARCH_VEXPRESS_QEMU  
> -
>  Active  arm armv7  -   armltd  vexpress  
>   vexpress_ca5x2   -  
>   
>  Matt Waddel 
>  Active  arm armv7  -   armltd  vexpress  
>   vexpress_ca9x4   -  
>   
>  Matt Waddel 
>  Active  arm armv7  am33xx  iseeigep0033  
>   am335x_igep0033  -  
>   
>  Enric Balletbo i Serra 
> diff --git a/include/configs/vexpress_ca15_tc2.h 
> b/include/configs/vexpress_ca15_tc2.h
> index 982f4a7..ccdb3c5 100644
> --- a/include/configs/vexpress_ca15_tc2.h
> +++ b/include/configs/vexpress_ca15_tc2.h
> @@ -18,6 +18,8 @@
>  #define CONFIG_SYSFLAGS_ADDR 0x1c010030
>  #define CONFIG_SMP_PEN_ADDR  CONFIG_SYSFLAGS_ADDR
>  
> +#ifndef CONFIG_ARCH_VEXPRESS_QEMU
>  #define CONFIG_ARMV7_VIRT
> +#endif
>  
>  #endif
> diff --git a/include/configs/vexpress_common.h 
> b/include/configs/vexpress_common.h
> index 7e78f8a..fbb9993 100644
> --- a/include/configs/vexpress_common.h
> +++ b/include/configs/vexpress_common.h
> @@ -157,6 +157,7 @@
>  #define CONFIG_CMD_DHCP
>  #define CONFIG_CMD_PXE
>  #define CONFIG_MENU
> +#define CONFIG_CMD_ECHO

Here and below, you are adding commands generally, i.e. not specifically
for the new boards you're creating. I'd rather have this in a separate
patch.

>  #define CONFIG_CMD_ELF
>  #define CONFIG_CMD_ENV
>  #define CONFIG_CMD_FLASH
> @@ -164,6 +165,7 @@
>  #define CONFIG_CMD_MEMORY
>  #define CONFIG_CMD_NET
>  #define CONFIG_CMD_PING
> +#define CONFIG_CMD_EXT2
>  #define CONFIG_CMD_SAVEENV
>  #define CONFIG_CMD_RUN
>  #define CONFIG_CMD_BOOTZ
> @@ -176,6 +178,7 @@
>  #define CONFIG_GENERIC_MMC
>  #define CONFIG_ARM_PL180_MMCI
>  #define CONFIG_ARM_PL180_MMCI_BASE   V2M_MMCI
> +#define CONFIG_SYS_MMC_MAX_DEVICE2
>  #define CONFIG_SYS_MMC_MAX_BLK_COUNT 127
>  #define CONFIG_ARM_PL180_MMCI_CLOCK_FREQ 625
>  
> @@ -253,6 +256,7 @@
>  #define CONFIG_SYS_FLASH_BASE0   V2M_NOR0
>  #define CONFIG_SYS_FLASH_BASE1   V2M_NOR1
>  #define CONFIG_SYS_MONITOR_BASE  CONFIG_SYS_FLASH_BASE0
> +#define CONFIG_API
>  
>  /* Timeout values in ticks */
>  #define CONFIG_SYS_FLASH_ERASE_TOUT  (2 * CONFIG_SYS_HZ) /* Erase Timeout

Re: [U-Boot] [PATCH] Makefile: fix the typo error for mrproper

2013-12-16 Thread Simon Glass
On 16 December 2013 00:27, Bo Shen  wrote:
> Fix the typo error for mrproper from mkproper.
>
> Signed-off-by: Bo Shen 

Adding Masahiro.

> ---
> In Makefile, there is no object name is mkproper, so I think this is
> a typo error.
>
>  Makefile |2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/Makefile b/Makefile
> index 7310c4e..ddbaaf0 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -168,7 +168,7 @@ endif
>  include $(TOPDIR)/config.mk
>
>  # Targets which don't build the source code
> -NON_BUILD_TARGETS = backup clean clobber distclean mkproper tidy unconfig
> +NON_BUILD_TARGETS = backup clean clobber distclean mrproper tidy unconfig
>
>  # Only do the generic board check when actually building, not configuring
>  ifeq ($(filter $(NON_BUILD_TARGETS),$(MAKECMDGOALS)),)
> --
> 1.7.9.5
>
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 0/2 v2] socfpga: Adding Scan Manager

2013-12-16 Thread Chin Liang See
Hi Albert,

Can you help to apply this patches as I believe there are not further
comments on this? Thanks and have a nice day!

Chin Liang


On Mon, 2013-12-02 at 14:31 -0600, Chin Liang See wrote:
> Adding Scan Manager driver and handoff files. Scan Manager driver
> will be called to configure the IO buffer setting.
> 
> Signed-off-by: Chin Liang See 
> Cc: Dinh Nguyen 
> Cc: Wolfgang Denk 
> CC: Pavel Machek 
> Cc: Tom Rini 
> Cc: Albert Aribaud 
> ---
> Changes for v2
> - Rebase with latest v2014.01-rc1
> 
> Chin Liang See (2):
>   socfpga: Adding Scan Manager driver
>   socfpga: Adding Scan Manager IOCSR handoff files
> 
>  arch/arm/cpu/armv7/socfpga/Makefile|2 +-
>  arch/arm/cpu/armv7/socfpga/scan_manager.c  |  231 +++
>  arch/arm/cpu/armv7/socfpga/spl.c   |4 +
>  arch/arm/include/asm/arch-socfpga/scan_manager.h   |   97 +++
>  .../include/asm/arch-socfpga/socfpga_base_addrs.h  |1 +
>  board/altera/socfpga/iocsr_config.c|  653 
> 
>  board/altera/socfpga/iocsr_config.h|   12 +
>  include/configs/socfpga_cyclone5.h |1 +
>  8 files changed, 1000 insertions(+), 1 deletion(-)
>  create mode 100644 arch/arm/cpu/armv7/socfpga/scan_manager.c
>  create mode 100644 arch/arm/include/asm/arch-socfpga/scan_manager.h
>  create mode 100644 board/altera/socfpga/iocsr_config.c
>  create mode 100644 board/altera/socfpga/iocsr_config.h
> 



___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH v2] nand_util.c: Use '%zd' for length in nand_unlock debug print

2013-12-16 Thread Tom Rini
length is size_t so needs to be '%zd' not '%d' to avoid warnings.

Cc: Scott Wood 
Signed-off-by: Tom Rini 

---
Changes in v2:
- Use %zd, the correct format, rather than %ld, a differntly incorrect
  one.
---
 drivers/mtd/nand/nand_util.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mtd/nand/nand_util.c b/drivers/mtd/nand/nand_util.c
index eeaa7e8..b292826 100644
--- a/drivers/mtd/nand/nand_util.c
+++ b/drivers/mtd/nand/nand_util.c
@@ -315,7 +315,7 @@ int nand_unlock(struct mtd_info *mtd, loff_t start, size_t 
length,
int page;
struct nand_chip *chip = mtd->priv;
 
-   debug("nand_unlock%s: start: %08llx, length: %d!\n",
+   debug("nand_unlock%s: start: %08llx, length: %zd!\n",
allexcept ? " (allexcept)" : "", start, length);
 
/* select the NAND device */
-- 
1.7.9.5

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] nand_util.c: Use '%ld' for length in nand_unlock debug print

2013-12-16 Thread Tom Rini
On Mon, Dec 16, 2013 at 09:28:46AM -0500, Tom Rini wrote:

> length is size_t so needs to be '%ld' not '%d' to avoid warnings.
> 
> Cc: Scott Wood 
> Signed-off-by: Tom Rini 
> ---
>  drivers/mtd/nand/nand_util.c |2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/mtd/nand/nand_util.c b/drivers/mtd/nand/nand_util.c
> index eeaa7e8..119355a 100644
> --- a/drivers/mtd/nand/nand_util.c
> +++ b/drivers/mtd/nand/nand_util.c
> @@ -315,7 +315,7 @@ int nand_unlock(struct mtd_info *mtd, loff_t start, 
> size_t length,
>   int page;
>   struct nand_chip *chip = mtd->priv;
>  
> - debug("nand_unlock%s: start: %08llx, length: %d!\n",
> + debug("nand_unlock%s: start: %08llx, length: %ld!\n",
>   allexcept ? " (allexcept)" : "", start, length);
>  
>   /* select the NAND device */

Bah, that's not the right portable identifier for size_t, redoing..

-- 
Tom


signature.asc
Description: Digital signature
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] mmc: add setdsr support

2013-12-16 Thread Pantelis Antoniou
Hi Markus,

On Dec 16, 2013, at 4:52 PM, Markus Niebel wrote:

> From: Markus Niebel 
> 
> The eMMC and the SD-Card specifications describe the optional SET_DSR command.
> During measurements at our lab we found that some cards implementing this 
> feature
> having really strong driver strengts per default. This can lead to voltage 
> peaks
> above the specification of the host on signal edges for data sent from a card 
> to
> the host.
> 
> Since availability of a given card type may be shorter than the time a certain
> hardware will be produced it is useful to have support for this command 
> (Alternative
> would be changing termination resistors and adapting the driver strength of 
> the
> host to the used card.)
> 
> Following proposal for an implementation:
> 
> - new field that reflects CSD field DSR_IMP in struct mmc
> - new field for design specific DSR value in struct mmc
> - board code can set DSR value in mmc struct just after registering an 
> controller
> - mmc_startup sends the the stored DSR value before selecting a card, if 
> DSR_IMP is set
> 
> Additionally the mmc command is extended to make is possible to play around 
> with different
> DSR values.
> 
> The concept was tested on a i.MX53 based platform using a Micron eMMC card 
> where the default
> DSR is 0x0400 (12mA) but in our design 0x0100 (0x0100) were enough. To use 
> this feature for
> instance on a mx53loco one have to add a call to mmc_set_dsr() in 
> board_mmc_init() after
> calling fsl_esdhc_initialize() for the eMMC.
> 
> Signed-off-by: Markus Niebel 
> ---
> changes for V2:
>   - extend documentation according to the comments from Pantelis Antoniou
> changes for V3:
>   - correct formatting of if condition in mmc_startup as sugested by 
> Pantelis Antoniou
>  the stray new line comment for V1 of patch is left as is since the 
> patch doesn't 
> bring in an new line. (simply overlooked the comments, sorry for that)
> 
> common/cmd_mmc.c  |   23 +++
> drivers/mmc/mmc.c |   18 ++
> include/mmc.h |3 +++
> 3 files changed, 44 insertions(+)
> 
> diff --git a/common/cmd_mmc.c b/common/cmd_mmc.c
> index 67a94a7..da5fef9 100644
> --- a/common/cmd_mmc.c
> +++ b/common/cmd_mmc.c
> @@ -340,6 +340,28 @@ static int do_mmcops(cmd_tbl_t *cmdtp, int flag, int 
> argc, char * const argv[])
>   }
> #endif /* CONFIG_SUPPORT_EMMC_BOOT */
>   }
> +
> + else if (argc == 3 && strcmp(argv[1], "setdsr") == 0) {
> + struct mmc *mmc = find_mmc_device(curr_device);
> + u32 val = simple_strtoul(argv[2], NULL, 16);
> + int ret;
> +
> + if (!mmc) {
> + printf("no mmc device at slot %x\n", curr_device);
> + return 1;
> + }
> + ret = mmc_set_dsr(mmc, val);
> + printf("set dsr %s\n", (!ret) ? "OK, force rescan" : "ERROR");
> + if (!ret) {
> + mmc->has_init = 0;
> + if (mmc_init(mmc))
> + return 1;
> + else
> + return 0;
> + }
> + return ret;
> + }
> +
>   state = MMC_INVALID;
>   if (argc == 5 && strcmp(argv[1], "read") == 0)
>   state = MMC_READ;
> @@ -423,5 +445,6 @@ U_BOOT_CMD(
>   "mmc bootpart   \n"
>   " - change sizes of boot and RPMB partitions of specified device\n"
> #endif
> + "mmc setdsr - set DSR register value\n"
>   );
> #endif /* !CONFIG_GENERIC_MMC */
> diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c
> index e1461a9..85eb89c 100644
> --- a/drivers/mmc/mmc.c
> +++ b/drivers/mmc/mmc.c
> @@ -877,6 +877,7 @@ static int mmc_startup(struct mmc *mmc)
> 
>   mmc->tran_speed = freq * mult;
> 
> + mmc->dsr_imp = ((cmd.response[1] >> 12) & 0x1);
>   mmc->read_bl_len = 1 << ((cmd.response[1] >> 16) & 0xf);
> 
>   if (IS_SD(mmc))
> @@ -907,6 +908,14 @@ static int mmc_startup(struct mmc *mmc)
>   if (mmc->write_bl_len > MMC_MAX_BLOCK_LEN)
>   mmc->write_bl_len = MMC_MAX_BLOCK_LEN;
> 
> + if (mmc->dsr_imp && mmc->dsr != 0x) {
> + cmd.cmdidx = MMC_CMD_SET_DSR;
> + cmd.cmdarg = (mmc->dsr & 0x) << 16;
> + cmd.resp_type = MMC_RSP_NONE;
> + if (mmc_send_cmd(mmc, &cmd, NULL))
> + printf("MMC: SET_DSR failed\n");
> + }
> +
>   /* Select the card, and put it into Transfer Mode */
>   if (!mmc_host_is_spi(mmc)) { /* cmd not supported in spi */
>   cmd.cmdidx = MMC_CMD_SELECT_CARD;
> @@ -1163,6 +1172,9 @@ static int mmc_send_if_cond(struct mmc *mmc)
> 
> int mmc_register(struct mmc *mmc)
> {
> + /* Setup dsr related values */
> + mmc->dsr_imp = 0;
> + mmc->dsr = 0x;
>   /* Setup the universal parts of the block interface just once */
>   mmc->block_dev.if_type = IF_TYPE_MMC;
>   mmc->block_dev.de

[U-Boot] [PATCH] mmc: add setdsr support

2013-12-16 Thread Markus Niebel
From: Markus Niebel 

The eMMC and the SD-Card specifications describe the optional SET_DSR command.
During measurements at our lab we found that some cards implementing this 
feature
having really strong driver strengts per default. This can lead to voltage peaks
above the specification of the host on signal edges for data sent from a card to
the host.

Since availability of a given card type may be shorter than the time a certain
hardware will be produced it is useful to have support for this command 
(Alternative
would be changing termination resistors and adapting the driver strength of the
host to the used card.)

Following proposal for an implementation:

- new field that reflects CSD field DSR_IMP in struct mmc
- new field for design specific DSR value in struct mmc
- board code can set DSR value in mmc struct just after registering an 
controller
- mmc_startup sends the the stored DSR value before selecting a card, if 
DSR_IMP is set

Additionally the mmc command is extended to make is possible to play around 
with different
DSR values.

The concept was tested on a i.MX53 based platform using a Micron eMMC card 
where the default
DSR is 0x0400 (12mA) but in our design 0x0100 (0x0100) were enough. To use this 
feature for
instance on a mx53loco one have to add a call to mmc_set_dsr() in 
board_mmc_init() after
calling fsl_esdhc_initialize() for the eMMC.

Signed-off-by: Markus Niebel 
---
changes for V2:
- extend documentation according to the comments from Pantelis Antoniou
changes for V3:
- correct formatting of if condition in mmc_startup as sugested by 
Pantelis Antoniou
  the stray new line comment for V1 of patch is left as is since the 
patch doesn't 
  bring in an new line. (simply overlooked the comments, sorry for that)

 common/cmd_mmc.c  |   23 +++
 drivers/mmc/mmc.c |   18 ++
 include/mmc.h |3 +++
 3 files changed, 44 insertions(+)

diff --git a/common/cmd_mmc.c b/common/cmd_mmc.c
index 67a94a7..da5fef9 100644
--- a/common/cmd_mmc.c
+++ b/common/cmd_mmc.c
@@ -340,6 +340,28 @@ static int do_mmcops(cmd_tbl_t *cmdtp, int flag, int argc, 
char * const argv[])
}
 #endif /* CONFIG_SUPPORT_EMMC_BOOT */
}
+
+   else if (argc == 3 && strcmp(argv[1], "setdsr") == 0) {
+   struct mmc *mmc = find_mmc_device(curr_device);
+   u32 val = simple_strtoul(argv[2], NULL, 16);
+   int ret;
+
+   if (!mmc) {
+   printf("no mmc device at slot %x\n", curr_device);
+   return 1;
+   }
+   ret = mmc_set_dsr(mmc, val);
+   printf("set dsr %s\n", (!ret) ? "OK, force rescan" : "ERROR");
+   if (!ret) {
+   mmc->has_init = 0;
+   if (mmc_init(mmc))
+   return 1;
+   else
+   return 0;
+   }
+   return ret;
+   }
+
state = MMC_INVALID;
if (argc == 5 && strcmp(argv[1], "read") == 0)
state = MMC_READ;
@@ -423,5 +445,6 @@ U_BOOT_CMD(
"mmc bootpart   \n"
" - change sizes of boot and RPMB partitions of specified device\n"
 #endif
+   "mmc setdsr - set DSR register value\n"
);
 #endif /* !CONFIG_GENERIC_MMC */
diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c
index e1461a9..85eb89c 100644
--- a/drivers/mmc/mmc.c
+++ b/drivers/mmc/mmc.c
@@ -877,6 +877,7 @@ static int mmc_startup(struct mmc *mmc)
 
mmc->tran_speed = freq * mult;
 
+   mmc->dsr_imp = ((cmd.response[1] >> 12) & 0x1);
mmc->read_bl_len = 1 << ((cmd.response[1] >> 16) & 0xf);
 
if (IS_SD(mmc))
@@ -907,6 +908,14 @@ static int mmc_startup(struct mmc *mmc)
if (mmc->write_bl_len > MMC_MAX_BLOCK_LEN)
mmc->write_bl_len = MMC_MAX_BLOCK_LEN;
 
+   if (mmc->dsr_imp && mmc->dsr != 0x) {
+   cmd.cmdidx = MMC_CMD_SET_DSR;
+   cmd.cmdarg = (mmc->dsr & 0x) << 16;
+   cmd.resp_type = MMC_RSP_NONE;
+   if (mmc_send_cmd(mmc, &cmd, NULL))
+   printf("MMC: SET_DSR failed\n");
+   }
+
/* Select the card, and put it into Transfer Mode */
if (!mmc_host_is_spi(mmc)) { /* cmd not supported in spi */
cmd.cmdidx = MMC_CMD_SELECT_CARD;
@@ -1163,6 +1172,9 @@ static int mmc_send_if_cond(struct mmc *mmc)
 
 int mmc_register(struct mmc *mmc)
 {
+   /* Setup dsr related values */
+   mmc->dsr_imp = 0;
+   mmc->dsr = 0x;
/* Setup the universal parts of the block interface just once */
mmc->block_dev.if_type = IF_TYPE_MMC;
mmc->block_dev.dev = cur_dev_num++;
@@ -1280,6 +1292,12 @@ int mmc_init(struct mmc *mmc)
return err;
 }
 
+int mmc_set_dsr(struct mmc *mmc, u16 val)
+{
+   mmc->dsr = val;
+   return 0;
+}
+
 /*
  * CPU and board

[U-Boot] [PATCH] nand_util.c: Use '%ld' for length in nand_unlock debug print

2013-12-16 Thread Tom Rini
length is size_t so needs to be '%ld' not '%d' to avoid warnings.

Cc: Scott Wood 
Signed-off-by: Tom Rini 
---
 drivers/mtd/nand/nand_util.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mtd/nand/nand_util.c b/drivers/mtd/nand/nand_util.c
index eeaa7e8..119355a 100644
--- a/drivers/mtd/nand/nand_util.c
+++ b/drivers/mtd/nand/nand_util.c
@@ -315,7 +315,7 @@ int nand_unlock(struct mtd_info *mtd, loff_t start, size_t 
length,
int page;
struct nand_chip *chip = mtd->priv;
 
-   debug("nand_unlock%s: start: %08llx, length: %d!\n",
+   debug("nand_unlock%s: start: %08llx, length: %ld!\n",
allexcept ? " (allexcept)" : "", start, length);
 
/* select the NAND device */
-- 
1.7.9.5

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] Pull request: u-boot-video/master

2013-12-16 Thread Anatolij Gustschin
Hey Tom,

The following changes since commit f44483b57c49282299da0e5c10073b909cdad979:

  Merge branch 'serial' of git://git.denx.de/u-boot-microblaze (2013-12-02 
08:48:02 -0500)

are available in the git repository at:


  git://git.denx.de/u-boot-video.git master

for you to fetch changes up to d1486e3352c8e6b91da8e610993ea591466cb223:

  video: ipu_disp: Return a negative value on error (2013-12-04 13:27:55 +0100)


Fabio Estevam (1):
  video: ipu_disp: Return a negative value on error

 drivers/video/ipu_disp.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Please pull. Thanks!

Anatolij
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] Pull request: u-boot-blackfin

2013-12-16 Thread Tom Rini
On Mon, Dec 16, 2013 at 11:49:37AM +0800, Sonic Zhang wrote:

> Hi Tom,
> 
> Please pull the following bug fixing patches from u-boot-blackfin into
> your tree.
> 
> Thanks
> 
> Sonic Zhang
> 
> 
> The following changes since commit e03c76c30342797a25ef9350e51c8daa0b56f1df:
> 
>   powerpc/mpc85xx: Update CONFIG_SYS_FSL_TBCLK_DIV for T1040
> (2013-12-11 11:12:54 -0800)
> 
> are available in the git repository at:
> 
>   git://git.denx.de/u-boot-blackfin.git master
> 
> for you to fetch changes up to ecf9ce2149bdb884ac294e9b39c673046bb9b572:
> 
>   blackfin: remove build warning (2013-12-16 11:38:33 +0800)
> 
> 
> Sonic Zhang (6):
>   blackfin: fix build error by adding CONFIG_BFIN_SERIAL
>   blackfin: fix building error by adding macro CONFIG_SYS_I2C
>   blackfin: Disable commands to reduce l1 ram requirement
>   blackfin: fix building error by enlarging the memory size
>   blackfin: fixing warning by including proper headers
>   blackfin: remove build warning
> 
>  arch/blackfin/cpu/initcode.c   |   18 ++
>  arch/blackfin/include/asm/blackfin_local.h |7 +--
>  arch/blackfin/lib/board.c  |1 +
>  arch/blackfin/lib/clocks.c |5 -
>  board/bf609-ezkit/bf609-ezkit.c|1 +
>  include/configs/bf506f-ezkit.h |8 ++--
>  include/configs/bf561-acvilon.h|2 +-
>  include/configs/bf561-ezkit.h  |1 +
>  include/configs/blackvme.h |1 +
>  include/configs/cm-bf537e.h|4 ++--
>  include/configs/cm-bf537u.h|3 ++-
>  include/configs/tcm-bf537.h|3 ++-
>  12 files changed, 36 insertions(+), 18 deletions(-)

Applied to u-boot/master, thanks!

-- 
Tom


signature.asc
Description: Digital signature
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] Correct vxWorks elf boot to load at correct address

2013-12-16 Thread Tom Rini
On Wed, Nov 27, 2013 at 02:48:43PM +0100, Stany MARCEL wrote:

> argv[0] contains bootvx (command name) not the load address, if called with
> argv < 2 use load_addr, else use address argument given to the command.
> 
> Signed-off-by: Stany MARCEL 

Applied to u-boot/master, thanks!

-- 
Tom


signature.asc
Description: Digital signature
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [U-Boot, v3, 1/5] common/cmd_bootm.c: seperate do_bootm_vxworks related code from CONFIG_CMD_ELF.

2013-12-16 Thread Tom Rini
On Thu, Nov 28, 2013 at 05:51:36PM +0800, miao@windriver.com wrote:

> From: Miao Yan 
> 
> do_bootm_vxworks now is available under the configuration option
> CONFIG_BOOTM_VXWORKS, thus aligned with other operating systems
> that supported by bootm command. The bootvx command still depneds
> on CONFIG_CMD_ELF.
> 
> Signed-off-by: Miao Yan 

Applied to u-boot/master, thanks!

-- 
Tom


signature.asc
Description: Digital signature
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [U-Boot,v3] netbsd:fix documentation typo.

2013-12-16 Thread Tom Rini
On Thu, Dec 12, 2013 at 04:18:35PM +0100, Kees Jongenburger wrote:

> The documentation suggested the arguments where passed over r3-r6
> while the code below simply does that over r0-r3.
> 
> Cc: Kumar Gala 

Applied to u-boot/master, thanks!

-- 
Tom


signature.asc
Description: Digital signature
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [U-Boot, 2/2] Makefile, .gitignore: Cleanup non-existing binaries

2013-12-16 Thread Tom Rini
On Fri, Dec 06, 2013 at 04:34:10PM +0900, Masahiro Yamada wrote:

> Signed-off-by: Masahiro Yamada 

Applied to u-boot/master, thanks!

-- 
Tom


signature.asc
Description: Digital signature
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [U-Boot,5/5] yaffs2: Use lldiv for 64bit division

2013-12-16 Thread Tom Rini
On Thu, Dec 05, 2013 at 02:48:39PM -0500, Tom Rini wrote:

> Signed-off-by: Tom Rini 
> 
> ---
> fs/yaffs2/yaffs_uboot_glue.c |3 ++-
>  fs/yaffs2/yaffsfs.c  |5 +++--
>  2 files changed, 5 insertions(+), 3 deletions(-)

Applied to u-boot/master, thanks!

-- 
Tom


signature.asc
Description: Digital signature
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] spl/Makefile: merge LIBS-y += arch/$(ARCH)/imx-common

2013-12-16 Thread Tom Rini
On Wed, Dec 11, 2013 at 10:00:08AM +0900, Masahiro Yamada wrote:

> Signed-off-by: Masahiro Yamada 
> 
> ---
> spl/Makefile | 6 +-
>  1 file changed, 1 insertion(+), 5 deletions(-)

Applied to u-boot/master, thanks!

-- 
Tom


signature.asc
Description: Digital signature
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [U-Boot, 3/5] ARM:PXA: Correct tick_to_time / us_to_tick to use lldiv

2013-12-16 Thread Tom Rini
On Thu, Dec 05, 2013 at 02:48:37PM -0500, Tom Rini wrote:

> Cc: Marek Vasut 
> Signed-off-by: Tom Rini 
> Acked-by: Marek Vasut 

Applied to u-boot/master, thanks!

-- 
Tom


signature.asc
Description: Digital signature
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [U-Boot, 4/5] JFFS2: Correct jffs2_1pass_build_lists to use lldiv

2013-12-16 Thread Tom Rini
On Thu, Dec 05, 2013 at 02:48:38PM -0500, Tom Rini wrote:

> Since part_info size became 64bit we need to use lldiv here.
> 
> Signed-off-by: Tom Rini 
> 
> ---
> fs/jffs2/jffs2_1pass.c |4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)

Applied to u-boot/master, thanks!

-- 
Tom


signature.asc
Description: Digital signature
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [U-Boot,1/2] examples: x86: delete 82559_eeprom

2013-12-16 Thread Tom Rini
On Fri, Dec 06, 2013 at 04:34:09PM +0900, Masahiro Yamada wrote:

> Commit fea25720 renamed arch/i386 to arch/x86.
> But it missed to modify examples/standalone/Makefile.
> 
> Since then, examples/standalone/82559_eeprom has
> never compiled and nobody has noticed that.
> 
> After some discussion on ML, we agreed to delete this example.
> 
> Signed-off-by: Masahiro Yamada 

Applied to u-boot/master, thanks!

-- 
Tom


signature.asc
Description: Digital signature
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [U-Boot,2/5] ARM:zynq: Correct __udelay to use lldiv

2013-12-16 Thread Tom Rini
On Thu, Dec 05, 2013 at 02:48:36PM -0500, Tom Rini wrote:

> Cc: Michal Simek 
> Signed-off-by: Tom Rini 
> 
> ---
> arch/arm/cpu/armv7/zynq/timer.c |3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)

Applied to u-boot/master, thanks!

-- 
Tom


signature.asc
Description: Digital signature
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] time: fix usec_to_tick()

2013-12-16 Thread Tom Rini
On Thu, Dec 05, 2013 at 12:08:09PM -0700, Stephen Warren wrote:

> From: Stephen Warren 
> 
> Commit 8dfafdde88eb ("Introduce common timer functions") created a
> common definition of usec_to_tick() which had a couple problems:
> 
> static unsigned long long usec_to_tick(unsigned long usec)
> {
>uint64_t tick = usec * get_tbclk();
> 
> That likely overflows.
> 
>usec *= get_tbclk();
> 
> That was an attempt to fix it by performing the multiply after the
> promotion of usec to 64-bit, but was applied to the wrong variable,
> which was never used.
> 
> This patch fixes these issues. A user-visible symptom of the problem was
> the e.g. "dhcp zImage" using an ASIX USB Ethernet dongle would print:
> 
> Waiting for Ethernet connection... unable to connect.
> 
> ... with no delay before "unable to connect". There are likely other
> symptoms.
> 
> Signed-off-by: Stephen Warren 
> Acked-by: Rob Herring 

Applied to u-boot/master, thanks!

-- 
Tom


signature.asc
Description: Digital signature
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [U-Boot, v2] Makefile: use two double-quotations as a pair

2013-12-16 Thread Tom Rini
On Thu, Dec 05, 2013 at 03:08:31PM +0900, Masahiro Yamada wrote:

> Some editors such as Emacs can highlight source files.
> But their parser algorithm is not perfect.
> 
> If you use one double-quotation alone, some editor cannot
> handle it nicely and mark source lines as a string by mistake.
> 
> It is preferable to use two double-quotations as a pair.
> 
> Signed-off-by: Masahiro Yamada 

Applied to u-boot/master, thanks!

-- 
Tom


signature.asc
Description: Digital signature
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] Makefile: correct dependencies of asm-offsets.[hs]

2013-12-16 Thread Tom Rini
On Thu, Dec 05, 2013 at 03:30:18PM +0900, Masahiro Yamada wrote:

> These four generated files depends on neither {spl,tpl}-autoconf.mk
> nor autoconf.mk.dep.
> 
> Signed-off-by: Masahiro Yamada 

Applied to u-boot/master, thanks!

-- 
Tom


signature.asc
Description: Digital signature
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [U-Boot, v2] Makefile: Do not create empty autoconf.mk on error

2013-12-16 Thread Tom Rini
On Mon, Dec 02, 2013 at 02:57:29PM +0900, Masahiro Yamada wrote:

> The build rules of
>   - include/autoconf.mk.dep
>   - include/autoconf.mk
>   - include/spl-autoconf.mk
>   - include/tpl-autoconf.mk
> were not nice.
> 
> They created empty files (which are never updated)
> if an error occurs during preprocessing.
> 
> Signed-off-by: Masahiro Yamada 

Applied to u-boot/master, thanks!

-- 
Tom


signature.asc
Description: Digital signature
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [U-Boot, v2, 1/4] mkimage: added 'static' specifier to match function's prototype.

2013-12-16 Thread Tom Rini
On Sun, Dec 01, 2013 at 12:43:09PM -0700, Simon Glass wrote:

> From: Guilherme Maciel Ferreira 
> 
> This function should be declared static.
> 
> Signed-off-by: Guilherme Maciel Ferreira 
> Signed-off-by: Simon Glass 

Applied to u-boot/master, thanks!

-- 
Tom


signature.asc
Description: Digital signature
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [U-Boot,v2,4/4] sandbox: dumpimage: Test dumpimage

2013-12-16 Thread Tom Rini
On Sun, Dec 01, 2013 at 12:43:12PM -0700, Simon Glass wrote:

> From: Guilherme Maciel Ferreira 
> 
> Add a test for dumpimage.
> 
> Signed-off-by: Guilherme Maciel Ferreira 
> Signed-off-by: Simon Glass 

Applied to u-boot/master, thanks!

-- 
Tom


signature.asc
Description: Digital signature
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [U-Boot, v2, 3/4] Add dumpimage, a tool to extract data from U-Boot images

2013-12-16 Thread Tom Rini
On Sun, Dec 01, 2013 at 12:43:11PM -0700, Simon Glass wrote:

> From: Guilherme Maciel Ferreira 
> 
> Given a multi-file image created through the mkimage's -d option:
> 
>   $ mkimage -A x86 -O linux -T multi -n x86 -d vmlinuz:initrd.img:System.map \
>   multi.img
> 
>   Image Name:   x86
>   Created:  Thu Jul 25 10:29:13 2013
>   Image Type:   Intel x86 Linux Multi-File Image (gzip compressed)
>   Data Size:13722956 Bytes = 13401.32 kB = 13.09 MB
>   Load Address: 
>   Entry Point:  
>   Contents:
>  Image 0: 4040128 Bytes = 3945.44 kB = 3.85 MB
>  Image 1: 7991719 Bytes = 7804.41 kB = 7.62 MB
>  Image 2: 1691092 Bytes = 1651.46 kB = 1.61 MB
> 
> It is possible to perform the innverse operation -- extracting any file from
> the image -- by using the dumpimage's -i option:
> 
>   $ dumpimage -i multi.img -p 2 System.map
> 
> Although it's feasible to retrieve "data files" from image through scripting,
> the requirement to embed tools such 'dd', 'awk' and 'sed' for this sole 
> purpose
> is cumbersome and unreliable -- once you must keep track of file sizes inside
> the image. Furthermore, extracting data files using "dumpimage" tool is faster
> than through scripting.
> 
> Signed-off-by: Guilherme Maciel Ferreira 
> Signed-off-by: Simon Glass 

Applied to u-boot/master, thanks!

-- 
Tom


signature.asc
Description: Digital signature
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [U-Boot, v2, 2/4] tools: moved code common to all image tools to a separated module.

2013-12-16 Thread Tom Rini
On Sun, Dec 01, 2013 at 12:43:10PM -0700, Simon Glass wrote:

> From: Guilherme Maciel Ferreira 
> 
> In order to avoid duplicating code and keep only one point of modification,
> the functions, structs and defines useful for "dumpimage" were moved from
> "mkimage" to a common module called "imagetool".
> 
> This modification also weakens the coupling between image types (FIT, IMX, 
> MXS,
> and so on) and image tools (mkimage and dumpimage). Any tool may initialize 
> the
> "imagetool" through register_image_tool() function, while the image types
> register themselves within an image tool using the register_image_type()
> function:
> 
>   +---+
>+--|   fit_image   |
>  +--+  +---+   |  +---+
>  |mkimage   |> |   | <-+
>  +--+  |   |  +---+
>| imagetool | <|imximage   |
>  +--+  |   |  +---+
>  |  dumpimage   |> |   | <-+
>  +--+  +---+   |  +---+
>+--| default_image |
>   +---+
> 
>   register_image_tool()   register_image_type()
> 
> Also, the struct "mkimage_params" was renamed to "image_tool_params" to make
> clear its general purpose.
> 
> Signed-off-by: Guilherme Maciel Ferreira 
> Signed-off-by: Simon Glass 

Applied to u-boot/master, thanks!

-- 
Tom


signature.asc
Description: Digital signature
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] Makefile: delete unnecessary lines

2013-12-16 Thread Tom Rini
On Fri, Nov 29, 2013 at 09:43:57AM +0900, Masahiro Yamada wrote:

> REMOTE_BUILD is not used any more.
> 
> Signed-off-by: Masahiro Yamada 

Applied to u-boot/master, thanks!

-- 
Tom


signature.asc
Description: Digital signature
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [U-Boot, RFC] kgdb: configs: remove obsolete CONFIG_KGDB_SER_INDEX

2013-12-16 Thread Tom Rini
On Sun, Dec 01, 2013 at 08:07:28PM +0200, Vladimir Zapolskiy wrote:

> The last users of CONFIG_KGDB_SER_INDEX were removed more than 3 years
> ago in commits 550650ddd0 and bf16500f79, either kgdb subsystem should
> care about this parameter or it should be gone completely.
> 
> Signed-off-by: Vladimir Zapolskiy 

Applied to u-boot/master, thanks!

-- 
Tom


signature.asc
Description: Digital signature
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] serial: lpc32xx: send CR before LF

2013-12-16 Thread Tom Rini
On Sat, Nov 30, 2013 at 04:47:01PM +0200, Vladimir Zapolskiy wrote:

> For LPC32XX high-speed UART it is required to send a carriage return
> symbol along with line feed. The problem was introduced in e503f90a
> commit.
> 
> Signed-off-by: Vladimir Zapolskiy 
> Cc: Marek Vasut 
> Acked-by: Marek Vasut 

Applied to u-boot/master, thanks!

-- 
Tom


signature.asc
Description: Digital signature
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [U-Boot, v3, 5/5] README.vxworks: add a document describing the new VxWorks boot interface

2013-12-16 Thread Tom Rini
On Thu, Nov 28, 2013 at 05:51:40PM +0800, miao@windriver.com wrote:

> From: Miao Yan 
> 
> Signed-off-by: Miao Yan 

Applied to u-boot/master, thanks!

-- 
Tom


signature.asc
Description: Digital signature
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] Makefile: Move some scripts imported from Linux

2013-12-16 Thread Tom Rini
On Thu, Nov 28, 2013 at 04:29:23PM +0900, Masahiro Yamada wrote:

> We have some scripts imported from Linux Kernel:
> setlocalversion, checkstack.pl, checkpatch.pl, cleanpatch
> 
> They are located under tools/ directory in U-Boot now.
> But they were originally located under scripts/ directory
> in Linux Kernel.
> 
> This commit moves them to the original location.
> 
> It is true that binutils-version.sh and dtc-version.sh
> do not originate in Linux Kernel, but they should
> be moved by analogy to gcc-version.sh.
> 
> Signed-off-by: Masahiro Yamada 

Applied to u-boot/master, thanks!

-- 
Tom


signature.asc
Description: Digital signature
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [U-Boot, v3, 2/5] common/config_defaults.h: make CONFIG_BOOTM_VXWORKS default configuration

2013-12-16 Thread Tom Rini
On Thu, Nov 28, 2013 at 05:51:37PM +0800, miao@windriver.com wrote:

> From: Miao Yan 
> 
> Signed-off-by: Miao Yan 

Applied to u-boot/master, thanks!

-- 
Tom


signature.asc
Description: Digital signature
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] Makefile: delete unnecessary CPPFLAGS settings

2013-12-16 Thread Tom Rini
On Thu, Nov 28, 2013 at 06:31:59PM +0900, Masahiro Yamada wrote:

> Signed-off-by: Masahiro Yamada 
> 
> ---
> Note that changing CPPFLAGS locally is meaningless.
> 
> $(CPPFLAGS) is evaluated around line 260 of $(TOPDIR)/config.mk:
> 
> CFLAGS := $(CPPFLAGS) -Wall -Wstrict-prototypes
> 
> $(TOPDIR)/config.mk is included at the top of
> sub makefiles, which is before adding CPPFLAGS locally.
> 
> Please be aware that GNU make has the two different flavor
> of substition operator, ":=" and "=".
> 
> 
>  board/freescale/common/p_corenet/Makefile | 2 --
>  common/Makefile   | 2 --
>  2 files changed, 4 deletions(-)

Applied to u-boot/master, thanks!

-- 
Tom


signature.asc
Description: Digital signature
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [U-Boot, v3, 3/5] common/cmd_bootm: extend do_bootm_vxworks to support the new VxWorks boot interface.

2013-12-16 Thread Tom Rini
On Thu, Nov 28, 2013 at 05:51:38PM +0800, miao@windriver.com wrote:

> From: Miao Yan 
> 
> The next version VxWorks adopts device tree (for PowerPC and ARM) as its 
> hardware
> description mechanism. For PowerPC, the boot interface conforms to
> the ePAPR standard, which is:
> 
>void (*kernel_entry)(ulong fdt_addr,
>   ulong r4 /* 0 */,
>   ulong r5 /* 0 */,
>   ulong r6 /* EPAPR_MAGIC */, ulong r7 /* IMA size */,
>   ulong r8 /* 0 */, ulong r9 /* 0 */)
> 
> For ARM, the boot interface is:
> 
>void (*kernel_entry)(void *fdt_addr)
> 
> Signed-off-by: Miao Yan 

Applied to u-boot/master, thanks!

-- 
Tom


signature.asc
Description: Digital signature
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [U-Boot, v3, 4/5] common/fdt_support.c: avoid unintended return from fdt_fixup_memory_banks()

2013-12-16 Thread Tom Rini
On Thu, Nov 28, 2013 at 05:51:39PM +0800, miao@windriver.com wrote:

> From: Miao Yan 
> 
> fdt_fixup_memory_banks() will add and update /memory node in
> device tree blob. In the case that /memory node doesn't exist,
> after adding a new one, this function returns error.
> 
> The correct behavior should be continuing to update its properties.
> 
> Signed-off-by: Miao Yan 

Applied to u-boot/master, thanks!

-- 
Tom


signature.asc
Description: Digital signature
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] drivers/mtd: descend into sub directories only when it is necessary

2013-12-16 Thread Tom Rini
On Thu, Nov 28, 2013 at 12:22:17PM +0900, Masahiro Yamada wrote:

> Signed-off-by: Masahiro Yamada 
> 
> ---
> Makefile  | 4 ++--
>  drivers/mtd/nand/Makefile | 3 ---
>  drivers/mtd/ubi/Makefile  | 3 ---
>  spl/Makefile  | 2 +-
>  4 files changed, 3 insertions(+), 9 deletions(-)

Applied to u-boot/master, thanks!

-- 
Tom


signature.asc
Description: Digital signature
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [U-Boot, 2/2] Makefile: Select objects by CONFIG_ rather than $(ARCH) or $(CPU)

2013-12-16 Thread Tom Rini
On Thu, Nov 28, 2013 at 12:09:59PM +0900, Masahiro Yamada wrote:

> Convert like follows:
> 
>  CPU mpc83xx  -> CONFIG_MPC83xx
>  CPU mpc85xx  -> CONFIG_MPC85xx
>  CPU mpc86xx  -> CONFIG_MPC86xx
>  CPU mpc5xxx  -> CONFIG_MPC5xxx
>  CPU mpc8xx   -> CONFIG_8xx
>  CPU mpc8260  -> CONFIG_8260
>  CPU ppc4xx   -> CONFIG_4xx
>  CPU x86  -> CONFIG_X86
>  ARCH x86 -> CONFIG_X86
>  ARCH powerpc -> CONFIG_PPC
> 
> Signed-off-by: Masahiro Yamada 

Applied to u-boot/master, thanks!

-- 
Tom


signature.asc
Description: Digital signature
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] drivers/usb/gadget: select objects by obj-$(CONFIG-...)

2013-12-16 Thread Tom Rini
On Thu, Nov 28, 2013 at 12:20:14PM +0900, Masahiro Yamada wrote:

> Before switching to the real Kbuild, drivers/usb/gadget/Makefile
> must be fixed.
> If none of CONFIG_USB_GADGET, CONFIG_USB_ETHER, CONFIG_USB_DEVICE
> is defined, both obj- and obj-y get empty.
> 
> We need non-empty obj- or obj-y on each Makefile
> to generate built-in.o on the real Kbuild.
> 
> Signed-off-by: Masahiro Yamada 

Applied to u-boot/master, thanks!

-- 
Tom


signature.asc
Description: Digital signature
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [U-Boot, 1/2] post: descend only when CONFIG_HAS_POST is defined

2013-12-16 Thread Tom Rini
On Thu, Nov 28, 2013 at 12:09:58PM +0900, Masahiro Yamada wrote:

> All objects under post/ directory are enabled by CONFIG_HAS_POST.
> (post/tests.o is enabled by CONFIG_POST_STD_LIST.
> But CONFIG_POST_STD_LIST depends on CONFIG_HAS_POST.)
> 
> We can move CONFIG_HAS_POST switch to the top Makefile.
> 
> Signed-off-by: Masahiro Yamada 

Applied to u-boot/master, thanks!

-- 
Tom


signature.asc
Description: Digital signature
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] Makefile: delete a make rule of $(LDSCRIPT)

2013-12-16 Thread Tom Rini
On Thu, Nov 28, 2013 at 11:06:03AM +0900, Masahiro Yamada wrote:

> $(LDSCRIPT) is a source file, not a generated file.
> We do not need a make rule of $(LDSCRIPT).
> 
> And one more trivial fix:
> $(obj)/u-boot should not dierectly depend on $(LDSCRIPTS).
> 
> Signed-off-by: Masahiro Yamada 

Applied to u-boot/master, thanks!

-- 
Tom


signature.asc
Description: Digital signature
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] board_f: explicitly disable console on early boot

2013-12-16 Thread Tom Rini
On Wed, Nov 27, 2013 at 10:32:40PM +0400, Alexey Brodkin wrote:

> If U-Boot build with DEBUG enabled/defined the first call of "debug"
> function (that dumps data to any available console) will happen before
> zeroing of initial "gd" in init call "zero_global_data" in
> "init_sequence_f".
> 
> And if stack was not filled with zeros chances are high that
> "gd->have_console" won't be 0. In its turn it will cause attempt to
> output things to non-initialized yet serial console.
> 
> So for safety and predictability we set "gd->have_console = 0".
> 
> Signed-off-by: Alexey Brodkin 
> 
> Cc: Mischa Jonker 
> Cc: Wolfgang Denk 
> Cc: Simon Glass 
> Acked-by: Simon Glass 

Applied to u-boot/master, thanks!

-- 
Tom


signature.asc
Description: Digital signature
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] PowerPC: merge commonly-defined flags

2013-12-16 Thread Tom Rini
On Tue, Nov 26, 2013 at 10:53:58AM +0900, Masahiro Yamada wrote:

> PLATFORM_RELFLAGS += -meabi
> PLATFORM_CPPFLAGS += -ffixed-r2
> were defined in all arch/powerpc/${CPU}/config.mk.
> 
> This commit moves them to arch/powerpc/config.mk.
> 
> Signed-off-by: Masahiro Yamada 

Applied to u-boot/master, thanks!

-- 
Tom


signature.asc
Description: Digital signature
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [U-Boot, v2] .gitignore: ignore spl/ and tpl/ directories except spl/Makefile

2013-12-16 Thread Tom Rini
On Tue, Nov 26, 2013 at 06:05:45PM +0900, Masahiro Yamada wrote:
> Before this commit, output files under tpl/ directry
> were not ignored.
> This commit fixes this problem.
> 
> And we have only one source file under spl/ directory:
>  spl/Makefile
> 
> So, we can describe .gitignore more simply.
> 
> Signed-off-by: Masahiro Yamada 

Applied to u-boot/master, thanks!

-- 
Tom


signature.asc
Description: Digital signature
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH V2] mmc: add setdsr support

2013-12-16 Thread Pantelis Antoniou
Hi Markus,

You missed the code comment about the format of the if statement.

Regards

-- Pantelis

On Dec 16, 2013, at 2:40 PM, Markus Niebel wrote:

> From: Markus Niebel 
> 
> The eMMC and the SD-Card specifications describe the optional SET_DSR command.
> During measurements at our lab we found that some cards implementing this 
> feature
> having really strong driver strengts per default. This can lead to voltage 
> peaks
> above the specification of the host on signal edges for data sent from a card 
> to
> the host.
> 
> Since availability of a given card type may be shorter than the time a certain
> hardware will be produced it is useful to have support for this command 
> (Alternative
> would be changing termination resistors and adapting the driver strength of 
> the
> host to the used card.)
> 
> Following proposal for an implementation:
> 
> - new field that reflects CSD field DSR_IMP in struct mmc
> - new field for design specific DSR value in struct mmc
> - board code can set DSR value in mmc struct just after registering an 
> controller
> - mmc_startup sends the the stored DSR value before selecting a card, if 
> DSR_IMP is set
> 
> Additionally the mmc command is extended to make is possible to play around 
> with different
> DSR values.
> 
> The concept was tested on a i.MX53 based platform using a Micron eMMC card 
> where the default
> DSR is 0x0400 (12mA) but in our design 0x0100 (0x0100) were enough. To use 
> this feature for
> instance on a mx53loco one have to add a call to mmc_set_dsr() in 
> board_mmc_init() after
> calling fsl_esdhc_initialize() for the eMMC.
> 
> Signed-off-by: Markus Niebel 
> ---
> changes for V2:
>   - extend documentation according to the comments from Pantelis Antoniou
> 
> common/cmd_mmc.c  |   23 +++
> drivers/mmc/mmc.c |   18 ++
> include/mmc.h |3 +++
> 3 files changed, 44 insertions(+)
> 
> diff --git a/common/cmd_mmc.c b/common/cmd_mmc.c
> index 67a94a7..da5fef9 100644
> --- a/common/cmd_mmc.c
> +++ b/common/cmd_mmc.c
> @@ -340,6 +340,28 @@ static int do_mmcops(cmd_tbl_t *cmdtp, int flag, int 
> argc, char * const argv[])
>   }
> #endif /* CONFIG_SUPPORT_EMMC_BOOT */
>   }
> +
> + else if (argc == 3 && strcmp(argv[1], "setdsr") == 0) {
> + struct mmc *mmc = find_mmc_device(curr_device);
> + u32 val = simple_strtoul(argv[2], NULL, 16);
> + int ret;
> +
> + if (!mmc) {
> + printf("no mmc device at slot %x\n", curr_device);
> + return 1;
> + }
> + ret = mmc_set_dsr(mmc, val);
> + printf("set dsr %s\n", (!ret) ? "OK, force rescan" : "ERROR");
> + if (!ret) {
> + mmc->has_init = 0;
> + if (mmc_init(mmc))
> + return 1;
> + else
> + return 0;
> + }
> + return ret;
> + }
> +
>   state = MMC_INVALID;
>   if (argc == 5 && strcmp(argv[1], "read") == 0)
>   state = MMC_READ;
> @@ -423,5 +445,6 @@ U_BOOT_CMD(
>   "mmc bootpart   \n"
>   " - change sizes of boot and RPMB partitions of specified device\n"
> #endif
> + "mmc setdsr - set DSR register value\n"
>   );
> #endif /* !CONFIG_GENERIC_MMC */
> diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c
> index e1461a9..c6a1c23 100644
> --- a/drivers/mmc/mmc.c
> +++ b/drivers/mmc/mmc.c
> @@ -877,6 +877,7 @@ static int mmc_startup(struct mmc *mmc)
> 
>   mmc->tran_speed = freq * mult;
> 
> + mmc->dsr_imp = ((cmd.response[1] >> 12) & 0x1);
>   mmc->read_bl_len = 1 << ((cmd.response[1] >> 16) & 0xf);
> 
>   if (IS_SD(mmc))
> @@ -907,6 +908,14 @@ static int mmc_startup(struct mmc *mmc)
>   if (mmc->write_bl_len > MMC_MAX_BLOCK_LEN)
>   mmc->write_bl_len = MMC_MAX_BLOCK_LEN;
> 
> + if ((mmc->dsr_imp) && (0x != mmc->dsr)) {
> + cmd.cmdidx = MMC_CMD_SET_DSR;
> + cmd.cmdarg = (mmc->dsr & 0x) << 16;
> + cmd.resp_type = MMC_RSP_NONE;
> + if (mmc_send_cmd(mmc, &cmd, NULL))
> + printf("MMC: SET_DSR failed\n");
> + }
> +
>   /* Select the card, and put it into Transfer Mode */
>   if (!mmc_host_is_spi(mmc)) { /* cmd not supported in spi */
>   cmd.cmdidx = MMC_CMD_SELECT_CARD;
> @@ -1163,6 +1172,9 @@ static int mmc_send_if_cond(struct mmc *mmc)
> 
> int mmc_register(struct mmc *mmc)
> {
> + /* Setup dsr related values */
> + mmc->dsr_imp = 0;
> + mmc->dsr = 0x;
>   /* Setup the universal parts of the block interface just once */
>   mmc->block_dev.if_type = IF_TYPE_MMC;
>   mmc->block_dev.dev = cur_dev_num++;
> @@ -1280,6 +1292,12 @@ int mmc_init(struct mmc *mmc)
>   return err;
> }
> 
> +int mmc_set_dsr(struct mmc *mmc, u16 val)
> +{
> + mmc->dsr = val;
> + return 0;
> +}

[U-Boot] [PATCH V2] mmc: add setdsr support

2013-12-16 Thread Markus Niebel
From: Markus Niebel 

The eMMC and the SD-Card specifications describe the optional SET_DSR command.
During measurements at our lab we found that some cards implementing this 
feature
having really strong driver strengts per default. This can lead to voltage peaks
above the specification of the host on signal edges for data sent from a card to
the host.

Since availability of a given card type may be shorter than the time a certain
hardware will be produced it is useful to have support for this command 
(Alternative
would be changing termination resistors and adapting the driver strength of the
host to the used card.)

Following proposal for an implementation:

- new field that reflects CSD field DSR_IMP in struct mmc
- new field for design specific DSR value in struct mmc
- board code can set DSR value in mmc struct just after registering an 
controller
- mmc_startup sends the the stored DSR value before selecting a card, if 
DSR_IMP is set

Additionally the mmc command is extended to make is possible to play around 
with different
DSR values.

The concept was tested on a i.MX53 based platform using a Micron eMMC card 
where the default
DSR is 0x0400 (12mA) but in our design 0x0100 (0x0100) were enough. To use this 
feature for
instance on a mx53loco one have to add a call to mmc_set_dsr() in 
board_mmc_init() after
calling fsl_esdhc_initialize() for the eMMC.

Signed-off-by: Markus Niebel 
---
changes for V2:
- extend documentation according to the comments from Pantelis Antoniou

 common/cmd_mmc.c  |   23 +++
 drivers/mmc/mmc.c |   18 ++
 include/mmc.h |3 +++
 3 files changed, 44 insertions(+)

diff --git a/common/cmd_mmc.c b/common/cmd_mmc.c
index 67a94a7..da5fef9 100644
--- a/common/cmd_mmc.c
+++ b/common/cmd_mmc.c
@@ -340,6 +340,28 @@ static int do_mmcops(cmd_tbl_t *cmdtp, int flag, int argc, 
char * const argv[])
}
 #endif /* CONFIG_SUPPORT_EMMC_BOOT */
}
+
+   else if (argc == 3 && strcmp(argv[1], "setdsr") == 0) {
+   struct mmc *mmc = find_mmc_device(curr_device);
+   u32 val = simple_strtoul(argv[2], NULL, 16);
+   int ret;
+
+   if (!mmc) {
+   printf("no mmc device at slot %x\n", curr_device);
+   return 1;
+   }
+   ret = mmc_set_dsr(mmc, val);
+   printf("set dsr %s\n", (!ret) ? "OK, force rescan" : "ERROR");
+   if (!ret) {
+   mmc->has_init = 0;
+   if (mmc_init(mmc))
+   return 1;
+   else
+   return 0;
+   }
+   return ret;
+   }
+
state = MMC_INVALID;
if (argc == 5 && strcmp(argv[1], "read") == 0)
state = MMC_READ;
@@ -423,5 +445,6 @@ U_BOOT_CMD(
"mmc bootpart   \n"
" - change sizes of boot and RPMB partitions of specified device\n"
 #endif
+   "mmc setdsr - set DSR register value\n"
);
 #endif /* !CONFIG_GENERIC_MMC */
diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c
index e1461a9..c6a1c23 100644
--- a/drivers/mmc/mmc.c
+++ b/drivers/mmc/mmc.c
@@ -877,6 +877,7 @@ static int mmc_startup(struct mmc *mmc)
 
mmc->tran_speed = freq * mult;
 
+   mmc->dsr_imp = ((cmd.response[1] >> 12) & 0x1);
mmc->read_bl_len = 1 << ((cmd.response[1] >> 16) & 0xf);
 
if (IS_SD(mmc))
@@ -907,6 +908,14 @@ static int mmc_startup(struct mmc *mmc)
if (mmc->write_bl_len > MMC_MAX_BLOCK_LEN)
mmc->write_bl_len = MMC_MAX_BLOCK_LEN;
 
+   if ((mmc->dsr_imp) && (0x != mmc->dsr)) {
+   cmd.cmdidx = MMC_CMD_SET_DSR;
+   cmd.cmdarg = (mmc->dsr & 0x) << 16;
+   cmd.resp_type = MMC_RSP_NONE;
+   if (mmc_send_cmd(mmc, &cmd, NULL))
+   printf("MMC: SET_DSR failed\n");
+   }
+
/* Select the card, and put it into Transfer Mode */
if (!mmc_host_is_spi(mmc)) { /* cmd not supported in spi */
cmd.cmdidx = MMC_CMD_SELECT_CARD;
@@ -1163,6 +1172,9 @@ static int mmc_send_if_cond(struct mmc *mmc)
 
 int mmc_register(struct mmc *mmc)
 {
+   /* Setup dsr related values */
+   mmc->dsr_imp = 0;
+   mmc->dsr = 0x;
/* Setup the universal parts of the block interface just once */
mmc->block_dev.if_type = IF_TYPE_MMC;
mmc->block_dev.dev = cur_dev_num++;
@@ -1280,6 +1292,12 @@ int mmc_init(struct mmc *mmc)
return err;
 }
 
+int mmc_set_dsr(struct mmc *mmc, u16 val)
+{
+   mmc->dsr = val;
+   return 0;
+}
+
 /*
  * CPU and board-specific MMC initializations.  Aliased function
  * signals caller to move on
diff --git a/include/mmc.h b/include/mmc.h
index cb558da..facb819 100644
--- a/include/mmc.h
+++ b/include/mmc.h
@@ -262,6 +262,8 @@ struct mmc {
uint card_caps;
uint host_caps;
   

[U-Boot] [PATCH] drivers/designware_i2c - add suppor of CONFIG_SYS_I2C_EEPROM_ADDR_OVERFLOW

2013-12-16 Thread Alexey Brodkin
Since we agreed on legacy implementation of "eeprom_{read|write}"
(http://patchwork.ozlabs.org/patch/295825/) I had to fix/make it work
again DesignWare I2C driver for cases when 1 EEPROM IC fake I2C with
anumber of "built-in" ICs with different chip addresses.

Signed-off-by: Alexey Brodkin 

Cc: Tom Rini 
cc: Armando Visconti 
Cc: Stefan Roese 
Cc: Albert ARIBAUD 
Cc: Heiko Schocher 
Cc: Vipin KUMAR 
Cc: Tom Rix 
Cc: Mischa Jonker 
Cc: Kuo-Jung Su 
---
 drivers/i2c/designware_i2c.c | 38 ++
 1 file changed, 38 insertions(+)

diff --git a/drivers/i2c/designware_i2c.c b/drivers/i2c/designware_i2c.c
index cb2ac04..9ed9295 100644
--- a/drivers/i2c/designware_i2c.c
+++ b/drivers/i2c/designware_i2c.c
@@ -266,6 +266,25 @@ int i2c_read(uchar chip, uint addr, int alen, uchar 
*buffer, int len)
 {
unsigned long start_time_rx;
 
+#ifdef CONFIG_SYS_I2C_EEPROM_ADDR_OVERFLOW
+   /*
+* EEPROM chips that implement "address overflow" are ones
+* like Catalyst 24WC04/08/16 which has 9/10/11 bits of
+* address and the extra bits end up in the "chip address"
+* bit slots. This makes a 24WC08 (1Kbyte) chip look like
+* four 256 byte chips.
+*
+* Note that we consider the length of the address field to
+* still be one byte because the extra address bits are
+* hidden in the chip address.
+*/
+   chip |= ((addr >> (alen * 8)) & CONFIG_SYS_I2C_EEPROM_ADDR_OVERFLOW);
+   addr &= ~(CONFIG_SYS_I2C_EEPROM_ADDR_OVERFLOW << (alen * 8));
+
+   debug("%s: fix addr_overflow: chip %02x addr %02x\n", __func__, chip,
+ addr);
+#endif
+
if (check_params(addr, alen, buffer, len))
return 1;
 
@@ -307,6 +326,25 @@ int i2c_write(uchar chip, uint addr, int alen, uchar 
*buffer, int len)
int nb = len;
unsigned long start_time_tx;
 
+#ifdef CONFIG_SYS_I2C_EEPROM_ADDR_OVERFLOW
+   /*
+* EEPROM chips that implement "address overflow" are ones
+* like Catalyst 24WC04/08/16 which has 9/10/11 bits of
+* address and the extra bits end up in the "chip address"
+* bit slots. This makes a 24WC08 (1Kbyte) chip look like
+* four 256 byte chips.
+*
+* Note that we consider the length of the address field to
+* still be one byte because the extra address bits are
+* hidden in the chip address.
+*/
+   chip |= ((addr >> (alen * 8)) & CONFIG_SYS_I2C_EEPROM_ADDR_OVERFLOW);
+   addr &= ~(CONFIG_SYS_I2C_EEPROM_ADDR_OVERFLOW << (alen * 8));
+
+   debug("%s: fix addr_overflow: chip %02x addr %02x\n", __func__, chip,
+ addr);
+#endif
+
if (check_params(addr, alen, buffer, len))
return 1;
 
-- 
1.8.4.2

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [RFC] mmc: add setdsr support

2013-12-16 Thread Pantelis Antoniou
Hi Markus,

On Dec 16, 2013, at 1:57 PM, Markus Niebel wrote:

> From: Markus Niebel 
> 
> The eMMC and the SD-Card specifications describe the optional SET_DSR command.
> During measurements at our lab we found that some cards implementing this 
> feature
> having really strong driver strengts per default. This can lead to voltage 
> peaks
> above the specification of the host on signal edges for data sent from a card 
> to 
> the host.
> 
> Since availability of a given card type may be shorter than the time a certain
> hardware will be produced it is useful to have support for this command 
> (Alternative
> would be changing termination resistors and adapting the driver strength of 
> the 
> host to the used card.)
> 
> Following proposal for an implementation:
> 
> - new field that reflects CSD field DSR_IMP in struct mmc
> - new field for design specific DSR value in struct mmc
> - board code can set DSR value in mmc struct just after registering an 
> controller
> - mmc_startup sends the the stored DSR value before selecting a card, if 
> DSR_IMP is set
> 
> Additionally the mmc command is extended to make is possible to play around 
> with different DSR values.
> 
> Signed-off-by: Markus Niebel 
> 

In general looks good. Please add a line describing which platform/board this 
pertains to, and
example setting the signal strength.

> 
> ---
> common/cmd_mmc.c  |   23 +++
> drivers/mmc/mmc.c |   18 ++
> include/mmc.h |3 +++
> 3 files changed, 44 insertions(+)
> 
> diff --git a/common/cmd_mmc.c b/common/cmd_mmc.c
> index 67a94a7..da5fef9 100644
> --- a/common/cmd_mmc.c
> +++ b/common/cmd_mmc.c
> @@ -340,6 +340,28 @@ static int do_mmcops(cmd_tbl_t *cmdtp, int flag, int 
> argc, char * const argv[])
>   }
> #endif /* CONFIG_SUPPORT_EMMC_BOOT */
>   }
> +
> + else if (argc == 3 && strcmp(argv[1], "setdsr") == 0) {
> + struct mmc *mmc = find_mmc_device(curr_device);
> + u32 val = simple_strtoul(argv[2], NULL, 16);
> + int ret;
> +
> + if (!mmc) {
> + printf("no mmc device at slot %x\n", curr_device);
> + return 1;
> + }
> + ret = mmc_set_dsr(mmc, val);
> + printf("set dsr %s\n", (!ret) ? "OK, force rescan" : "ERROR");
> + if (!ret) {
> + mmc->has_init = 0;
> + if (mmc_init(mmc))
> + return 1;
> + else
> + return 0;
> + }
> + return ret;
> + }
> +
>   state = MMC_INVALID;
>   if (argc == 5 && strcmp(argv[1], "read") == 0)
>   state = MMC_READ;
> @@ -423,5 +445,6 @@ U_BOOT_CMD(
>   "mmc bootpart   \n"
>   " - change sizes of boot and RPMB partitions of specified device\n"
> #endif
> + "mmc setdsr - set DSR register value\n"
>   );
> #endif /* !CONFIG_GENERIC_MMC */
> diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c
> index e1461a9..c6a1c23 100644
> --- a/drivers/mmc/mmc.c
> +++ b/drivers/mmc/mmc.c
> @@ -877,6 +877,7 @@ static int mmc_startup(struct mmc *mmc)
> 
>   mmc->tran_speed = freq * mult;
> 
> + mmc->dsr_imp = ((cmd.response[1] >> 12) & 0x1);
>   mmc->read_bl_len = 1 << ((cmd.response[1] >> 16) & 0xf);
> 

^ stray new line

>   if (IS_SD(mmc))
> @@ -907,6 +908,14 @@ static int mmc_startup(struct mmc *mmc)
>   if (mmc->write_bl_len > MMC_MAX_BLOCK_LEN)
>   mmc->write_bl_len = MMC_MAX_BLOCK_LEN;
> 
> + if ((mmc->dsr_imp) && (0x != mmc->dsr)) {

^ weird formatting for the if, change to:

  if (mmc->dsr_imp && mmc->dsr != 0x) {

> + cmd.cmdidx = MMC_CMD_SET_DSR;
> + cmd.cmdarg = (mmc->dsr & 0x) << 16;
> + cmd.resp_type = MMC_RSP_NONE;
> + if (mmc_send_cmd(mmc, &cmd, NULL))
> + printf("MMC: SET_DSR failed\n");
> + }
> +
>   /* Select the card, and put it into Transfer Mode */
>   if (!mmc_host_is_spi(mmc)) { /* cmd not supported in spi */
>   cmd.cmdidx = MMC_CMD_SELECT_CARD;
> @@ -1163,6 +1172,9 @@ static int mmc_send_if_cond(struct mmc *mmc)
> 
> int mmc_register(struct mmc *mmc)
> {
> + /* Setup dsr related values */
> + mmc->dsr_imp = 0;
> + mmc->dsr = 0x;
>   /* Setup the universal parts of the block interface just once */
>   mmc->block_dev.if_type = IF_TYPE_MMC;
>   mmc->block_dev.dev = cur_dev_num++;
> @@ -1280,6 +1292,12 @@ int mmc_init(struct mmc *mmc)
>   return err;
> }
> 
> +int mmc_set_dsr(struct mmc *mmc, u16 val)
> +{
> + mmc->dsr = val;
> + return 0;
> +}
> +
> /*
>  * CPU and board-specific MMC initializations.  Aliased function
>  * signals caller to move on
> diff --git a/include/mmc.h b/include/mmc.h
> index cb558da..facb819 100644
> --- a/include/mmc.h
> +++ b/include/mmc.h
> @@ -262,6 +262,8 @@ struct mmc {
>

[U-Boot] [RFC] mmc: add setdsr support

2013-12-16 Thread Markus Niebel
From: Markus Niebel 

The eMMC and the SD-Card specifications describe the optional SET_DSR command.
During measurements at our lab we found that some cards implementing this 
feature
having really strong driver strengts per default. This can lead to voltage peaks
above the specification of the host on signal edges for data sent from a card 
to 
the host.

Since availability of a given card type may be shorter than the time a certain
hardware will be produced it is useful to have support for this command 
(Alternative
would be changing termination resistors and adapting the driver strength of the 
host to the used card.)

Following proposal for an implementation:

- new field that reflects CSD field DSR_IMP in struct mmc
- new field for design specific DSR value in struct mmc
- board code can set DSR value in mmc struct just after registering an 
controller
- mmc_startup sends the the stored DSR value before selecting a card, if 
DSR_IMP is set

Additionally the mmc command is extended to make is possible to play around 
with different DSR values.

Signed-off-by: Markus Niebel 


---
 common/cmd_mmc.c  |   23 +++
 drivers/mmc/mmc.c |   18 ++
 include/mmc.h |3 +++
 3 files changed, 44 insertions(+)

diff --git a/common/cmd_mmc.c b/common/cmd_mmc.c
index 67a94a7..da5fef9 100644
--- a/common/cmd_mmc.c
+++ b/common/cmd_mmc.c
@@ -340,6 +340,28 @@ static int do_mmcops(cmd_tbl_t *cmdtp, int flag, int argc, 
char * const argv[])
}
 #endif /* CONFIG_SUPPORT_EMMC_BOOT */
}
+
+   else if (argc == 3 && strcmp(argv[1], "setdsr") == 0) {
+   struct mmc *mmc = find_mmc_device(curr_device);
+   u32 val = simple_strtoul(argv[2], NULL, 16);
+   int ret;
+
+   if (!mmc) {
+   printf("no mmc device at slot %x\n", curr_device);
+   return 1;
+   }
+   ret = mmc_set_dsr(mmc, val);
+   printf("set dsr %s\n", (!ret) ? "OK, force rescan" : "ERROR");
+   if (!ret) {
+   mmc->has_init = 0;
+   if (mmc_init(mmc))
+   return 1;
+   else
+   return 0;
+   }
+   return ret;
+   }
+
state = MMC_INVALID;
if (argc == 5 && strcmp(argv[1], "read") == 0)
state = MMC_READ;
@@ -423,5 +445,6 @@ U_BOOT_CMD(
"mmc bootpart   \n"
" - change sizes of boot and RPMB partitions of specified device\n"
 #endif
+   "mmc setdsr - set DSR register value\n"
);
 #endif /* !CONFIG_GENERIC_MMC */
diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c
index e1461a9..c6a1c23 100644
--- a/drivers/mmc/mmc.c
+++ b/drivers/mmc/mmc.c
@@ -877,6 +877,7 @@ static int mmc_startup(struct mmc *mmc)
 
mmc->tran_speed = freq * mult;
 
+   mmc->dsr_imp = ((cmd.response[1] >> 12) & 0x1);
mmc->read_bl_len = 1 << ((cmd.response[1] >> 16) & 0xf);
 
if (IS_SD(mmc))
@@ -907,6 +908,14 @@ static int mmc_startup(struct mmc *mmc)
if (mmc->write_bl_len > MMC_MAX_BLOCK_LEN)
mmc->write_bl_len = MMC_MAX_BLOCK_LEN;
 
+   if ((mmc->dsr_imp) && (0x != mmc->dsr)) {
+   cmd.cmdidx = MMC_CMD_SET_DSR;
+   cmd.cmdarg = (mmc->dsr & 0x) << 16;
+   cmd.resp_type = MMC_RSP_NONE;
+   if (mmc_send_cmd(mmc, &cmd, NULL))
+   printf("MMC: SET_DSR failed\n");
+   }
+
/* Select the card, and put it into Transfer Mode */
if (!mmc_host_is_spi(mmc)) { /* cmd not supported in spi */
cmd.cmdidx = MMC_CMD_SELECT_CARD;
@@ -1163,6 +1172,9 @@ static int mmc_send_if_cond(struct mmc *mmc)
 
 int mmc_register(struct mmc *mmc)
 {
+   /* Setup dsr related values */
+   mmc->dsr_imp = 0;
+   mmc->dsr = 0x;
/* Setup the universal parts of the block interface just once */
mmc->block_dev.if_type = IF_TYPE_MMC;
mmc->block_dev.dev = cur_dev_num++;
@@ -1280,6 +1292,12 @@ int mmc_init(struct mmc *mmc)
return err;
 }
 
+int mmc_set_dsr(struct mmc *mmc, u16 val)
+{
+   mmc->dsr = val;
+   return 0;
+}
+
 /*
  * CPU and board-specific MMC initializations.  Aliased function
  * signals caller to move on
diff --git a/include/mmc.h b/include/mmc.h
index cb558da..facb819 100644
--- a/include/mmc.h
+++ b/include/mmc.h
@@ -262,6 +262,8 @@ struct mmc {
uint card_caps;
uint host_caps;
uint ocr;
+   uint dsr;
+   uint dsr_imp;
uint scr[2];
uint csd[4];
uint cid[4];
@@ -304,6 +306,7 @@ int board_mmc_getcd(struct mmc *mmc);
 int mmc_switch_part(int dev_num, unsigned int part_num);
 int mmc_getcd(struct mmc *mmc);
 int mmc_getwp(struct mmc *mmc);
+int mmc_set_dsr(struct mmc *mmc, u16 val);
 void spl_mmc_load(void) __noreturn;
 /* Function to change the size of boo

[U-Boot] [PATCH 07/11 V11] Exynos5420: Add support for 5420 in pinmux and gpio

2013-12-16 Thread Rajeshwari S Shinde
Adds code in pinmux and gpio framework to support Exynos5420.

Signed-off-by: Naveen Krishna Chatradhi 
Signed-off-by: Akshay Saraswat 
Signed-off-by: Rajeshwari S Shinde 
Acked-by: Simon Glass 
---
Changes in V2:
- None
Changes in V3:
- None
Changes in V4:
- Added correct calculation of gpio based addresses.
Changes in V5:
- None
Changes in V6:
- None
Changes in V7:
- Corrected the coding style nits.
Chnages in V8:
- Corrected the coding style nits pointed by Minkyu Kang.
Changes in V9:
- None
Changes in V10:
- None
Changes in V11:
- None
 arch/arm/cpu/armv7/exynos/pinmux.c| 260 +-
 arch/arm/include/asm/arch-exynos/gpio.h   | 143 ++--
 arch/arm/include/asm/arch-exynos/periph.h |   3 +
 3 files changed, 390 insertions(+), 16 deletions(-)

diff --git a/arch/arm/cpu/armv7/exynos/pinmux.c 
b/arch/arm/cpu/armv7/exynos/pinmux.c
index 74cc700..904177a 100644
--- a/arch/arm/cpu/armv7/exynos/pinmux.c
+++ b/arch/arm/cpu/armv7/exynos/pinmux.c
@@ -46,6 +46,42 @@ static void exynos5_uart_config(int peripheral)
}
 }
 
+static void exynos5420_uart_config(int peripheral)
+{
+   struct exynos5420_gpio_part1 *gpio1 =
+   (struct exynos5420_gpio_part1 *)samsung_get_base_gpio_part1();
+   struct s5p_gpio_bank *bank;
+   int i, start, count;
+
+   switch (peripheral) {
+   case PERIPH_ID_UART0:
+   bank = &gpio1->a0;
+   start = 0;
+   count = 4;
+   break;
+   case PERIPH_ID_UART1:
+   bank = &gpio1->a0;
+   start = 4;
+   count = 4;
+   break;
+   case PERIPH_ID_UART2:
+   bank = &gpio1->a1;
+   start = 0;
+   count = 4;
+   break;
+   case PERIPH_ID_UART3:
+   bank = &gpio1->a1;
+   start = 4;
+   count = 2;
+   break;
+   }
+
+   for (i = start; i < start + count; i++) {
+   s5p_gpio_set_pull(bank, i, GPIO_PULL_NONE);
+   s5p_gpio_cfg_pin(bank, i, GPIO_FUNC(0x2));
+   }
+}
+
 static int exynos5_mmc_config(int peripheral, int flags)
 {
struct exynos5_gpio_part1 *gpio1 =
@@ -101,6 +137,75 @@ static int exynos5_mmc_config(int peripheral, int flags)
return 0;
 }
 
+static int exynos5420_mmc_config(int peripheral, int flags)
+{
+   struct exynos5420_gpio_part3 *gpio3 =
+   (struct exynos5420_gpio_part3 *)samsung_get_base_gpio_part3();
+   struct s5p_gpio_bank *bank = NULL, *bank_ext = NULL;
+   int i, start;
+
+   switch (peripheral) {
+   case PERIPH_ID_SDMMC0:
+   bank = &gpio3->c0;
+   bank_ext = &gpio3->c3;
+   start = 0;
+   break;
+   case PERIPH_ID_SDMMC1:
+   bank = &gpio3->c1;
+   bank_ext = &gpio3->d1;
+   start = 4;
+   break;
+   case PERIPH_ID_SDMMC2:
+   bank = &gpio3->c2;
+   bank_ext = NULL;
+   start = 0;
+   break;
+   default:
+   start = 0;
+   debug("%s: invalid peripheral %d", __func__, peripheral);
+   return -1;
+   }
+
+   if ((flags & PINMUX_FLAG_8BIT_MODE) && !bank_ext) {
+   debug("SDMMC device %d does not support 8bit mode",
+ peripheral);
+   return -1;
+   }
+
+   if (flags & PINMUX_FLAG_8BIT_MODE) {
+   for (i = start; i <= (start + 3); i++) {
+   s5p_gpio_cfg_pin(bank_ext, i, GPIO_FUNC(0x2));
+   s5p_gpio_set_pull(bank_ext, i, GPIO_PULL_UP);
+   s5p_gpio_set_drv(bank_ext, i, GPIO_DRV_4X);
+   }
+   }
+
+   for (i = 0; i < 3; i++) {
+   /*
+* MMC0 is intended to be used for eMMC. The
+* card detect pin is used as a VDDEN signal to
+* power on the eMMC. The 5420 iROM makes
+* this same assumption.
+*/
+   if ((peripheral == PERIPH_ID_SDMMC0) && (i == 2)) {
+   s5p_gpio_set_value(bank, i, 1);
+   s5p_gpio_cfg_pin(bank, i, GPIO_OUTPUT);
+   } else {
+   s5p_gpio_cfg_pin(bank, i, GPIO_FUNC(0x2));
+   }
+   s5p_gpio_set_pull(bank, i, GPIO_PULL_NONE);
+   s5p_gpio_set_drv(bank, i, GPIO_DRV_4X);
+   }
+
+   for (i = 3; i <= 6; i++) {
+   s5p_gpio_cfg_pin(bank, i, GPIO_FUNC(0x2));
+   s5p_gpio_set_pull(bank, i, GPIO_PULL_UP);
+   s5p_gpio_set_drv(bank, i, GPIO_DRV_4X);
+   }
+
+   return 0;
+}
+
 static void exynos5_sromc_config(int flags)
 {
struct exynos5_gpio_part1 *gpio1 =
@@ -216,6 +321,59 @@ static void exynos5_i2c_config(int peripheral, int flag

[U-Boot] [PATCH 09/11 V11] DTS: Add dts support for SMDK5420

2013-12-16 Thread Rajeshwari S Shinde
This patch adds dts support for SMDK5420.
exynos5.dtsi created is a common file which has the nodes common
to both 5420 and 5250.

Signed-off-by: Akshay Saraswat 
Signed-off-by: Rajeshwari S Shinde 
Acked-by: Simon Glass 
---
Changes in V2:
- None
Changes in V3:
- None
Changes in V4:
- Added /include/ "exynos5420.dtsi
Changes in V5:
- None
Changes in V6:
- None
Changes in V7:
- Corrected the license.
Changes in V8:
- None
Changes in V9:
- Rebased on latest code.
Changes in V10:
- Rebased on latest code.
Changes in V11:
- None
 arch/arm/dts/exynos5.dtsi | 198 ++
 arch/arm/dts/exynos5250.dtsi  | 194 +
 arch/arm/dts/exynos5420.dtsi  |  70 +++
 board/samsung/dts/exynos5420-smdk5420.dts | 169 +
 4 files changed, 441 insertions(+), 190 deletions(-)
 create mode 100644 arch/arm/dts/exynos5.dtsi
 create mode 100644 arch/arm/dts/exynos5420.dtsi
 create mode 100644 board/samsung/dts/exynos5420-smdk5420.dts

diff --git a/arch/arm/dts/exynos5.dtsi b/arch/arm/dts/exynos5.dtsi
new file mode 100644
index 000..f8c8741
--- /dev/null
+++ b/arch/arm/dts/exynos5.dtsi
@@ -0,0 +1,198 @@
+/*
+ * Copyright (c) 2013 The Chromium OS Authors
+ * SAMSUNG EXYNOS5 SoC device tree source
+ *
+ * SPDX-License-Identifier:GPL-2.0+
+ */
+
+/include/ "skeleton.dtsi"
+
+/ {
+   compatible = "samsung,exynos5";
+
+   sromc@1225 {
+   compatible = "samsung,exynos-sromc";
+   reg = <0x1225 0x20>;
+   #address-cells = <1>;
+   #size-cells = <0>;
+   };
+
+   i2c@12c6 {
+   #address-cells = <1>;
+   #size-cells = <0>;
+   compatible = "samsung,s3c2440-i2c";
+   reg = <0x12C6 0x100>;
+   interrupts = <0 56 0>;
+   };
+
+   i2c@12c7 {
+   #address-cells = <1>;
+   #size-cells = <0>;
+   compatible = "samsung,s3c2440-i2c";
+   reg = <0x12C7 0x100>;
+   interrupts = <0 57 0>;
+   };
+
+   i2c@12c8 {
+   #address-cells = <1>;
+   #size-cells = <0>;
+   compatible = "samsung,s3c2440-i2c";
+   reg = <0x12C8 0x100>;
+   interrupts = <0 58 0>;
+   };
+
+   i2c@12c9 {
+   #address-cells = <1>;
+   #size-cells = <0>;
+   compatible = "samsung,s3c2440-i2c";
+   reg = <0x12C9 0x100>;
+   interrupts = <0 59 0>;
+   };
+
+   spi@12d2 {
+   #address-cells = <1>;
+   #size-cells = <0>;
+   compatible = "samsung,exynos-spi";
+   reg = <0x12d2 0x30>;
+   interrupts = <0 68 0>;
+   };
+
+   spi@12d3 {
+   #address-cells = <1>;
+   #size-cells = <0>;
+   compatible = "samsung,exynos-spi";
+   reg = <0x12d3 0x30>;
+   interrupts = <0 69 0>;
+   };
+
+   spi@12d4 {
+   #address-cells = <1>;
+   #size-cells = <0>;
+   compatible = "samsung,exynos-spi";
+   reg = <0x12d4 0x30>;
+   clock-frequency = <5000>;
+   interrupts = <0 70 0>;
+};
+
+   spi@131a {
+   #address-cells = <1>;
+   #size-cells = <0>;
+   compatible = "samsung,exynos-spi";
+   reg = <0x131a 0x30>;
+   interrupts = <0 129 0>;
+   };
+
+   spi@131b {
+   #address-cells = <1>;
+   #size-cells = <0>;
+   compatible = "samsung,exynos-spi";
+   reg = <0x131b 0x30>;
+   interrupts = <0 130 0>;
+   };
+
+   ehci@1211 {
+   compatible = "samsung,exynos-ehci";
+   reg = <0x1211 0x100>;
+   #address-cells = <1>;
+   #size-cells = <1>;
+
+   phy {
+   compatible = "samsung,exynos-usb-phy";
+   reg = <0x1213 0x100>;
+   };
+   };
+
+   tmu@1006 {
+   compatible = "samsung,exynos-tmu";
+   reg = <0x1006 0x1>;
+   };
+
+   fimd@1440 {
+   compatible = "samsung,exynos-fimd";
+   reg = <0x1440 0x1>;
+   #address-cells = <1>;
+   #size-cells = <1>;
+   };
+
+   dp@145b {
+   compatible = "samsung,exynos5-dp";
+   reg = <0x145b 0x1000>;
+   #address-cells = <1>;
+   #size-cells = <1>;
+   };
+
+   xhci0: xhci@1200 {
+   compatible = "samsung,exynos5250-xhci";
+   reg = <0x1200 0x1>;
+   #address-cells 

  1   2   >